Skip to content

feat(resource-events): Add conversation event subscriptions - #697

Merged
dcramer merged 9 commits into
mainfrom
feat/resource-event-subscriptions
Jun 30, 2026
Merged

dcramer merged 9 commits into
mainfrom
feat/resource-event-subscriptions

Conversation

@dcramer

@dcramer dcramer commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

Adds the initial conversation-bound resource event subscription path. Provider tools can return a strict subscribable hint with an opaque resourceRef, the agent can subscribe the current conversation to provider-defined event types, and matching normalized events are queued through the existing conversation mailbox instead of steering an active run.

Core owns subscription storage, TTLs, cancellation, event matching, and mailbox delivery. Provider-specific refs, event names, and summaries stay in provider code; the GitHub MVP exposes pull request hints and normalized PR events. Queued Slack resource notifications run as resource-event system-actor turns with no synthetic user credential context.

The plugin/runtime specs and generated API reference are updated for the MVP surface, including the zod-backed SubscribableResource type and resource_event conversation source.

Refs GH-682

Add conversation-bound subscriptions for provider resource events so agents can subscribe to tool-result resources and receive queued mailbox notifications later.

Expose subscribable resource hints through the plugin API, add the core subscription tools and state store, and document the plugin/runtime contract for normalized resource events.

Refs GH-682

Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 30, 2026 9:47pm

Request Review

Store active resource event subscription records and indexes with TTLs derived from the subscription expiry instead of the shorter conversation state TTL.

Refs GH-682

Co-Authored-By: GPT-5 Codex <[email protected]>
Include Slack installation metadata on resource event mailbox records so event-only deliveries can resolve the workspace token.

Refs GH-682

Co-Authored-By: GPT-5 Codex <[email protected]>
Re-read matched resource event subscriptions under their status lock before enqueueing notifications so cancellation, expiry, and terminal completion cannot race stale matches.

Refs GH-682

Co-Authored-By: GPT-5 Codex <[email protected]>
Keep resource-event subscriptions generic in core while leaving provider-specific refs and event names in provider code.

Parse public and runtime event boundaries strictly, remove unused subscription state, and run queued resource notifications as system-actor Slack turns instead of synthetic user requests.

Refs GH-682
Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer dcramer changed the title feat(events): Add resource event subscriptions feat(resource-events): Add conversation event subscriptions Jun 30, 2026
@dcramer
dcramer marked this pull request as ready for review June 30, 2026 20:34
@github-actions github-actions Bot added the risk: high PR risk score: high label Jun 30, 2026
Keep resource-event auth failures out of requester-backed pause flows, continue event ingest when one subscription lock is busy, and replay GitHub PR subscription hints from stored idempotency input.

Refs GH-682
Co-Authored-By: GPT-5 Codex <[email protected]>
Fail resource-event ingest after best-effort delivery when a matched subscription cannot be delivered, so provider retries can recover skipped notifications without blocking later subscriptions.

Keep terminal delivery from completing a subscription that was refreshed during delivery, and prepare resource-event Slack turns without a synthetic requester.

Refs GH-682

Co-Authored-By: GPT-5 Codex <[email protected]>
Keep createPullRequest idempotency parsing compatible with records written before stored input was added, while using stored input for new completed replays.

Refs GH-682

Co-Authored-By: GPT-5 Codex <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bf521ba. Configure here.

Propagate the mailbox append result through resource-event delivery so duplicate provider event keys do not inflate ingest counters.

Keep the existing idempotent queue nudge behavior while reporting enqueued only for newly appended mailbox messages.

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer merged commit 16550f7 into main Jun 30, 2026
17 checks passed
@dcramer
dcramer deleted the feat/resource-event-subscriptions branch June 30, 2026 22:04

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 63d8b9eb Deployed Jun 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant