Skip to content

feat: move stream approvals to AgentStream.Approve and deprecate Agent.OnApproval - #56

Merged
vinodvx merged 1 commit into
mainfrom
feat/agent-stream-approve
Jul 27, 2026
Merged

feat: move stream approvals to AgentStream.Approve and deprecate Agent.OnApproval#56
vinodvx merged 1 commit into
mainfrom
feat/agent-stream-approve

Conversation

@vinodvx

@vinodvx vinodvx commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

  • Add AgentStream.Approve / StreamHandle.Approve as the preferred stream HITL path (token from CUSTOM events).
  • Keep Agent.OnApproval / Runtime.OnApproval as deprecated wrappers until v0.4.0; share private approve in local and Temporal runtimes.
  • Point docs, README, examples, and CLI at stream.Approve only. Run path stays WithApprovalHandler + req.Respond.

Test plan

  • go test ./pkg/agent/ ./internal/runtime/local/ ./internal/runtime/temporal/ -count=1
  • cd examples && go run ./agent_with_subagents — answer y/n on delegation approval
  • Spot-check Run approval still works: go run ./agent_with_tools/approval

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / chore

Related issues

Closes #55

Checklist

  • I have run task check
  • I have run task examples:all
  • I have run task tidy if I added or removed dependencies
  • Commit messages follow conventional commits (e.g. feat:, fix:, docs:)
  • I have added/updated tests for my changes
  • Documentation is updated if needed

@mintlify

mintlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
agent-sdk-go 🟢 Ready View Preview Jul 27, 2026, 3:28 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
agent-sdk-go 🟡 Building Jul 27, 2026, 3:28 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

@vinodvx
vinodvx merged commit c416604 into main Jul 27, 2026
6 checks passed
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.

[Feature]: Move stream approval API from Agent to AgentStream

1 participant