docs(state): record gmail pass completion evidence

This commit is contained in:
zap
2026-03-12 20:58:09 +00:00
parent 111dda91b8
commit d06679f967
3 changed files with 87 additions and 17 deletions

View File

@@ -4,7 +4,7 @@
Immediate baton-pass for the next fresh implementation session.
## Current objective
Advance the Google Workspace action bus beyond create-only proofs now that real approval-routed Gmail draft + Calendar event tests have been re-verified in a fresh session.
Run calendar pass (2/3): extend the action bus beyond create-only calendar support now that Gmail pass 1 is complete.
## Use these state files first
1. `WIP.md` — full standing plan and checkpoints
@@ -32,14 +32,26 @@ Advance the Google Workspace action bus beyond create-only proofs now that real
- verified via `gog calendar get primary <eventId>`
- cleaned via `gog calendar delete primary <eventId> --force`
## Gmail pass 1 completed in this handoff cycle
- Added workflow actions:
- `list_email_drafts`
- `delete_email_draft`
- `send_gmail_draft` (alias: `send_approved_email`)
- Added host bridge executors:
- `email_list_drafts` (`gog gmail drafts list`)
- `email_draft_delete` (`gog gmail drafts delete`)
- `email_draft_send` (`gog gmail drafts send`)
- Added explicit approval metadata in workflow responses (`approval.policy`, `approval.required`, `approval.mutation_level`).
- Updated docs/test payloads/validator to match the expanded Gmail contract.
## Highest-priority next actions
1. Add `list_email_drafts` and `delete_email_draft` actions to the workflow contract and host executor path.
2. Add `list_upcoming_events`, `update_calendar_event`, and `delete_calendar_event` actions.
3. Keep approval policy explicit per action (default-gated for mutating operations).
4. Add one compact operator test playbook for recurring verification (queue → approve → verify → cleanup).
1. Add `list_upcoming_events`, `update_calendar_event`, and `delete_calendar_event` actions.
2. Keep approval policy explicit per action (default-gated for mutating operations).
3. Add one compact operator test playbook for recurring verification (queue → approve → verify → cleanup).
## Success criteria for the next session
- At least one new Gmail action and one new Calendar action implemented and validated end-to-end.
- Calendar action coverage expanded (`list_upcoming_events`, `update_calendar_event`, `delete_calendar_event`) with workflow + bridge + docs alignment.
- Approval policy remains explicit/safe for mutating calendar actions.
- `WIP.md` and memory updated with concrete IDs/evidence.
- Meaningful commit(s) captured.

56
WIP.md
View File

@@ -96,9 +96,9 @@ Started: `2026-03-12`
4. delete the test event
### Then expand useful Google actions
- [ ] Add `delete_email_draft`
- [ ] Add `list_email_drafts`
- [ ] Add `send_gmail_draft` / send-approved-email path
- [x] Add `delete_email_draft`
- [x] Add `list_email_drafts`
- [x] Add `send_gmail_draft` / send-approved-email path
- [ ] Add `update_calendar_event`
- [ ] Add `delete_calendar_event`
- [ ] Add `list_upcoming_events`
@@ -126,11 +126,11 @@ Started: `2026-03-12`
Execution should proceed in staged fresh sessions using `WIP.md` as the canonical state file.
Planned passes:
1. Gmail pass:
- add `delete_email_draft`
- add `list_email_drafts`
- add `send_gmail_draft` / send-approved-email path
- update `WIP.md` with evidence before ending the pass
1. Gmail pass: ✅ complete
- added `delete_email_draft`
- added `list_email_drafts`
- added `send_gmail_draft` / send-approved-email path
- updated workflow contract/docs/test payloads/bridge + WIP evidence
2. Calendar pass:
- add `update_calendar_event`
- add `delete_calendar_event`
@@ -158,13 +158,47 @@ Planned passes:
- verified via `gog calendar get primary <eventId>`
- cleaned via `gog calendar delete primary <eventId> --force`
## Gmail pass 1 completion (2026-03-12)
Implemented in this pass:
- workflow contract + router logic for:
- `list_email_drafts`
- `delete_email_draft`
- `send_gmail_draft` (alias: `send_approved_email`)
- explicit per-action approval metadata in queued responses (`approval.policy`, `approval.required`, `approval.mutation_level`)
- host bridge executor coverage for new approval kinds:
- `email_list_drafts``gog gmail drafts list`
- `email_draft_delete``gog gmail drafts delete`
- `email_draft_send``gog gmail drafts send`
- docs + sample payloads + workflow validator updates for the new contract
Targeted verification evidence:
- `python3 skills/n8n-webhook/scripts/validate-workflow.py skills/n8n-webhook/assets/openclaw-action.workflow.json`
- result: `OK: workflow asset structure looks consistent`
- Router simulation against the shipped workflow JS (`verify-list-001`, `verify-delete-001`, `verify-send-001`, `verify-send-alias-001`):
- all returned `status: queued_for_approval`
- alias normalization confirmed (`send_approved_email``result.action = send_gmail_draft`)
- approval metadata returned with expected mutation levels (`low` for list, `high` for delete/send)
- generated pending ids in the simulation run:
- `approval-mmny879w-5sncgd98`
- `approval-mmny879w-a353xg8q`
- `approval-mmny879w-yvqzokpz`
- `approval-mmny879w-md99hqxs`
- Bridge dry-run command execution (via real `gog` CLI) for new Gmail kinds:
- list: exit `0`, returned draft list JSON
- delete: exit `0`, returned dry-run op `delete gmail draft r-example-draft-id`
- send: exit `0`, returned dry-run op `gmail.drafts.send`
- `python3 -m py_compile skills/n8n-webhook/scripts/resolve-approval-with-gog.py` passed.
## Next-session handoff
For the next fresh implementation session, start from `HANDOFF.md` + `WIP.md` rather than from old chat context.
Immediate target:
- implement at least one new Gmail action and one new Calendar action
- verify through the same approval+bridge flow
- refresh WIP/memory/tasks and commit
- calendar pass only:
- add `update_calendar_event`
- add `delete_calendar_event`
- add `list_upcoming_events`
- keep approval policy explicit for mutating calendar actions
- run targeted verification and refresh WIP/memory/tasks before ending
## Relevant files
- `skills/n8n-webhook/assets/openclaw-action.workflow.json`

View File

@@ -149,3 +149,27 @@
- `AGENTS.md` (workspace routing guidance section)
- `USER.md` (user preference line)
- `MEMORY.md` (durable preference line)
## Gmail pass 1 (fresh subagent implementation)
- Added to `openclaw-action` workflow contract:
- `list_email_drafts`
- `delete_email_draft`
- `send_gmail_draft` (plus alias `send_approved_email`)
- Added explicit approval metadata in queued action responses (`approval.policy`, `approval.required`, `approval.mutation_level`) and set mutating Gmail actions to `high`.
- Extended host bridge `resolve-approval-with-gog.py` with executor coverage for:
- `email_list_drafts``gog gmail drafts list`
- `email_draft_delete``gog gmail drafts delete`
- `email_draft_send``gog gmail drafts send`
- Verification evidence (local/targeted):
- workflow structure + contract validator passed
- route-action simulation request IDs:
- `verify-list-001`
- `verify-delete-001`
- `verify-send-001`
- `verify-send-alias-001`
- simulation produced pending IDs:
- `approval-mmny879w-5sncgd98`
- `approval-mmny879w-a353xg8q`
- `approval-mmny879w-yvqzokpz`
- `approval-mmny879w-md99hqxs`
- `gog` dry-run command checks for list/delete/send each exited `0`.