Skip to content

feat(plugin): intercept user prompts before admission - #45550

Merged
nexxeln merged 1 commit into
v2from
prompt-interception
Aug 27, 2026
Merged

nexxeln merged 1 commit into
v2from
prompt-interception

Conversation

@nexxeln

@nexxeln nexxeln commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add ctx.session.hook("prompt", ...) for transforming text, files, agent mentions, skills, metadata, and delivery before durable admission
  • prepare drafts in one location scope after plugin readiness, then use normal attachment/skill resolution
  • bypass hooks and payload resolution for already-admitted IDs while retaining concurrent first-admission-wins behavior
  • keep preparation interruptible and staged reverts intact on retries or preparation failure; typed rejection remains out of scope

Testing

  • bun test test/session-*.test.ts test/plugin-hooks.test.ts test/plugin/promise.test.ts in packages/core: 541 passing across 35 files
  • core and plugin package typechecks, including readonly-ID and provider-filter type tests
  • repository-wide pre-push typecheck: 33 successful tasks
  • thermo-nuclear maintainability review and fix/review loop performed without subagents; no remaining blockers found

@nexxeln
nexxeln merged commit 23f0ee5 into v2 Aug 27, 2026
9 of 10 checks passed
@nexxeln
nexxeln deleted the prompt-interception branch August 27, 2026 13:28
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
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