Skip to content

feat(tools): implement call-time ask egress approval flow (Phase 2 Slice 5a) - #13

Closed
SarkarShubhdeep wants to merge 2 commits into
developmentfrom
phase2/integrations-approval
Closed

feat(tools): implement call-time ask egress approval flow (Phase 2 Slice 5a)#13
SarkarShubhdeep wants to merge 2 commits into
developmentfrom
phase2/integrations-approval

Conversation

@SarkarShubhdeep

Copy link
Copy Markdown
Collaborator

Summary

  • Rename disposition keys from legacy drive/youtube to tool names: read_drive, post_youtube, fetch_youtube
  • Implement call-time approval wrapper (wrapToolsWithAsk) that checks tool disposition before execution
  • Add tool_approvals migration for pending/grant persistence
  • Wire approval flow into worker with resume grant handling
  • Document integration tool requirements in README

Test plan

  • Unit tests for wrap-ask.ts (suspend/grant/allow cases)
  • Unit tests for approval-store.ts (memory implementation)
  • All existing tests pass
  • Typecheck passes
  • Manual acceptance: Profile with egress: "allow-tools" and ask-disposition tool suspends → user confirms → tool runs

Phase 2 Slice 5a Checklist

  • Call-time ask wrapper implemented
  • Profile tool disposition keys aligned with tool names
  • waiting_for_approval surfaced to user (via existing CLI support)
  • Mock ask-tool tests pass

Made with Cursor

SarkarShubhdeep and others added 2 commits July 24, 2026 16:06
Break external integrations into approval/OAuth foundations, Drive and YouTube workstreams, and pin Time Huddle until API availability is confirmed.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ice 5a)

- Rename disposition keys: drive → read_drive, youtube → post_youtube/fetch_youtube
- Add ToolEgress and ApprovalStore types to ToolContext
- Implement wrapToolsWithAsk to wrap tool execute with approval checks
- Add tool_approvals migration for pending/grant persistence
- Wire approval store and resume grant flow in worker
- Add unit tests for wrap-ask and approval-store modules
- Document integration tools require egress: allow-tools in README

Co-authored-by: Cursor <cursoragent@cursor.com>
@SarkarShubhdeep

Copy link
Copy Markdown
Collaborator Author

Will create combined PR after Slice 5 is completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant