Skip to content

feat(agents): admit gateway-owned workflow prompts - #161

Merged
tee8z merged 1 commit into
tee8z/paseo-daemon-imagefrom
tee8z/gateway-workflows
Nov 12, 2026
Merged

tee8z merged 1 commit into
tee8z/paseo-daemon-imagefrom
tee8z/gateway-workflows

Conversation

@tee8z

@tee8z tee8z commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior

A gateway-owned workflow can now prompt that gateway's owner's remote agents. The relay must sign the workflow prompt and prove that the stored step explicitly named the target agent. The launcher and harness then apply the same live owner grant, posting membership and channel scope checks used for direct gateway prompts.

This replaces #157 with a linear consumer branch while preserving that published history. Its feature patch is byte-identical to the reviewed implementation.

This consumer depends on #154 and targets its branch. Onboarding and terminal attach are separate consumers of that foundation.

Boundary Required authority
Mention listener Verified relay identity, workflow owner and explicitly authored agent mention
Launch Fresh grant, current owner/agent/gateway posting membership, current remote registration and channel state
Model ingress and queued dispatch Verified workflow signature and target; live grant and matching bound channel membership

The final launch boundary verifies the workflow proof again. Custom owner tags and substituted mentions convey no authority. Gateway-owned workflow definitions retain ordinary account permissions; this adds no authority over the human owner's workflow definitions, administration, DMs or model settings.

ACP reuses the relay identity from the same bounded membership snapshot. Reaper channel and registration authority reads now also request the writer explicitly.

Validation

  • ACP full library suite: 1133 passed, 3 ignored. Reaper full suite: 145 passed, 3 ignored.
  • Focused gateway tests: ACP8 and reaper4 passed. They cover a successful workflow launch, forged or tampered proof, wrong channel or target, expired/revoked grants and membership removal. The ACP cases exercise both ingress and queued dispatch.
  • The PostgreSQL discovery and wrapper convention checks also pass with the foundation fix included.
  • Both packages pass all-target Clippy with warnings denied; formatting, differential file-size and diff checks pass.
  • Three production guard mutations failed regression assertions: trusting a raw owner tag, omitting the bound-channel comparison, and omitting the final launch proof. Sources were restored; ACP8, the full reaper suite and Clippy passed again.
  • Repository-wide just ci, the complete relay integration gate, the final combined runtime review and human acceptance remain pending.

Human acceptance: grant a separate gateway already admitted to the relay and test channel, create a workflow with that gateway key and an explicit agent mention in the stored step, then trigger it. Confirm one owned agent sandbox answers. Revoke the gateway or remove its channel membership, wait for the 30-second harness cache bound, and trigger again: no further gateway model prompt or cancellation should be admitted. A target introduced only through substituted trigger text must remain unauthorized.

@tee8z tee8z self-assigned this Nov 10, 2026
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 23 billable files and costs up to $5.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 9 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 34 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7be76db and dfba871.

Files selected for processing: 23

  • crates/buzz-acp/src/gateway.rs
  • crates/buzz-acp/src/gateway/tests.rs
  • crates/buzz-acp/src/gateway/tests/workflow.rs
  • crates/buzz-acp/src/lib.rs
  • crates/buzz-acp/src/pool.rs
  • crates/buzz-relay/src/handlers/command_executor.rs
  • crates/buzz-relay/src/push_runtime.rs
  • crates/buzz-relay/src/workflow_sink.rs
  • crates/buzz-sandbox-reaper/src/manager.rs
  • crates/buzz-sandbox-reaper/src/mentions/gateways.rs
  • crates/buzz-sandbox-reaper/src/mentions/tests.rs
  • crates/buzz-sandbox-reaper/src/mentions/tests/gateway.rs
  • crates/buzz-sandbox-reaper/src/mentions/tests/relay.rs
  • crates/buzz-sandbox-reaper/src/mentions/tests/workflow.rs
  • crates/buzz-sandbox-reaper/src/mentions/tests/workflow_live.rs
  • crates/buzz-sandbox-reaper/src/mentions/worker.rs
  • crates/buzz-sandbox-reaper/src/mobile_launch.rs
  • crates/buzz-sandbox-reaper/src/mobile_launch/tests.rs
  • crates/buzz-sdk/src/workflow.rs
  • crates/buzz-workflow/src/action_sink.rs
  • crates/buzz-workflow/src/executor.rs
  • crates/buzz-workflow/src/lib.rs
  • docs/agent-gateway-key.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@tee8z

tee8z commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

Independent review of the gateway workflow consumer change (9370cfad4, equivalent consumer patch to 2a73e9a68): no concrete blocker found. Minimalism 9/10, elegance 9/10, correctness 9/10.

I traced ACP ingress and queued dispatch, relay-signature and explicitly authored agent-target proof, signed channel scope, fresh delegation/membership reads, reaper delivery admission, and final Start validation. Invalid proof, mismatched target/channel, expiration, revocation, and channel removal fail closed; the gateway does not gain owner workflow administration.

I independently reran the compiled production-seam journeys gateway::tests::workflow::gateway_workflows_require_provenance_scope_and_live_authority and mentions::tests::workflow::gateway_owned_workflow_launches_only_with_live_proven_authority; both pass. Live local relay testing separately confirms direct gateway dispatch, decryptable telemetry, and cancellation reaching a deterministic ACP peer, with no model calls. The full deployment and human testing gate remains open.

The optional documentation correction is resolved in d0149cdfc: the workflow example now passes YAML through stdin (--yaml - < workflow.yaml), matching the CLI contract. The PR remains draft pending human runtime confirmation.

@tee8z
tee8z force-pushed the tee8z/gateway-workflows branch from d0149cd to 5921c6d Compare November 11, 2026 05:31
@tee8z
tee8z changed the base branch from tee8z/agent-gateway-key to tee8z/paseo-daemon-image November 11, 2026 05:31
@tee8z
tee8z added this pull request to stack #178 November 11, 2026 05:31
@tee8z
tee8z force-pushed the tee8z/gateway-workflows branch 5 times, most recently from b299990 to 67e3458 Compare November 12, 2026 14:48
Admit a gateway-owned workflow prompt only when the server captured schedule origin and the stored workflow uses a literal prompt. Seal the relay assertion and verify it at launch and queued dispatch with current gateway delegation, membership and thread binding.

Persist the origin bit in the existing trigger context with a fail-closed default for old or untrusted contexts. Refuse message/webhook provenance, substitutions, forged relay assertions and lost authority without expanding ordinary member permissions.

Keep launch admission inside the owner's existing namespace and primary-session quotas. Exercise proof production and consumers through workflow, manager and harness seams.

Signed-off-by: Tee8z <tee8z@protonmail.com>
@tee8z
tee8z force-pushed the tee8z/gateway-workflows branch from 67e3458 to dfba871 Compare November 12, 2026 15:29
@tee8z
tee8z marked this pull request as ready for review November 12, 2026 15:30
@tee8z
tee8z merged commit 80044f5 into main Nov 12, 2026
108 checks passed
@tee8z
tee8z deleted the tee8z/gateway-workflows branch November 12, 2026 16:26
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.

2 participants