Skip to content

Add install-owned event prompts for Slack root messages#475

Open
dcramer wants to merge 7 commits into
mainfrom
codex/refine-plugin-event-plan
Open

Add install-owned event prompts for Slack root messages#475
dcramer wants to merge 7 commits into
mainfrom
codex/refine-plugin-event-plan

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented Jun 2, 2026

Summary

  • Add the first event-prompt support slice with install-owned Markdown bindings under app/events/**/*.md
  • Register plugin-built event definitions and validate bindings at startup
  • Add the built-in slack.channel.message.created event and dispatch it for new root channel messages, while skipping thread replies and direct mention conflicts
  • Tighten the event-prompt spec and add unit/integration coverage for parsing, matching, dispatch, and Slack ingress

Testing

  • Added new unit tests for binding parsing/validation, Slack event extraction, plugin event registration, and dispatch behavior
  • Added an integration test covering Slack root-message dispatch and thread-reply suppression
  • Lint, formatting, typecheck, and targeted event/plugin tests passed

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

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

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 3, 2026 2:26pm

Request Review

Comment thread packages/junior/src/chat/events/dispatch.ts Outdated
Comment thread packages/junior/src/handlers/webhooks.ts
Comment thread packages/junior/src/handlers/webhooks.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 d1d8da0. Configure here.

binding: match.binding,
definition: match.definition,
envelope,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Render error skips other bindings

Medium Severity

When one matched binding’s renderContextBlocks throws, the whole dispatchEventPromptRuns loop aborts, so other bindings that matched the same envelope never get a dispatch.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d1d8da0. Configure here.

dcramer and others added 7 commits June 3, 2026 16:10
Add version-controlled event prompt bindings and the first Slack root-message event producer. Route matching events through core dispatch with idempotency and explicit Slack mention suppression.

Also keep the example build test in sync with the dashboard trusted plugin package after rebasing onto main.

Refs GH-435
Co-Authored-By: GPT-5 Codex <codex@openai.com>
Initialize the Slack adapter before passive event prompt extraction so cold starts can discover the bot user id. Run multi-workspace event dispatch inside the resolved Slack installation context so ambient channel events do not fail closed incorrectly.

Refs GH-435
Co-Authored-By: GPT-5 Codex <codex@openai.com>
Let event prompt dispatches complete without visible Slack delivery when the agent returns no assistant-visible text or files.

Block Slack mutating and schedule-management tools for event prompt runs until binding-level tool policy is implemented below the model.

Share Slack side-channel installation context handling across edited mentions and event prompts so Enterprise Grid installs resolve through the enterprise installation.

Refs GH-435

Co-Authored-By: GPT-5 Codex <codex@openai.com>
Add app-level coverage for install-owned event prompt bindings and tighten Slack event prompt tests so they avoid leaking process state or asserting prompt scaffolding. Document the event observability boundary around sparse logs and lifecycle spans.

Refs #435

Co-Authored-By: GPT-5 Codex <codex@openai.com>
Move Slack-specific webhook body handling into a route submodule and keep the generic webhook handler focused on platform dispatch. Remove unsupported event prompt policy fields from the frontmatter schema so future behavior is not reserved without executor enforcement.

Refs #435

Co-Authored-By: GPT-5 Codex <codex@openai.com>
Remove delivery targets and declarative filters from the first event prompt API. The current Slack event prompt path derives delivery from the Slack event envelope and only needs event id, scope, context blocks, and a prompt body.

Refs #435

Co-Authored-By: GPT-5 Codex <codex@openai.com>
Keep event prompt dispatches on the runtime-bound options type after delegated credential support split plugin input from persisted dispatch records. This preserves the no-credential event prompt path without widening createOrGetDispatch.

Refs GH-435

Co-Authored-By: GPT-5 Codex <codex@openai.com>
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