Commit Graph

1583 Commits

Author SHA1 Message Date
Peter Steinberger 72ba2b3653 chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
Peter Steinberger b643f92447 refactor: use main sdk barrels for model and whatsapp helpers 2026-03-28 01:10:44 +00:00
Peter Steinberger b4fe0faf1b test: dedupe config and utility suites 2026-03-28 00:46:53 +00:00
Peter Steinberger fef688fb7a test: dedupe utility and config suites 2026-03-28 00:26:55 +00:00
Peter Steinberger fc5e5f1e8e fix: resolve loader and test fallout after sdk split 2026-03-27 23:27:55 +00:00
Jacob Tomlinson 8eaa3417c3
Config: skip nonexistent Tavily web-search migration 2026-03-27 20:45:59 +00:00
Peter Steinberger c28e76c490 refactor: move provider model helpers into plugins 2026-03-27 20:20:31 +00:00
Tak Hoffman c3d45fbb19
Fallback to Jiti when bun is unavailable 2026-03-27 15:16:19 -05:00
Peter Steinberger 6e107b8857
fix(runtime): stabilize provider and channel runtime tests 2026-03-27 18:15:40 +00:00
Peter Steinberger 1086acf3c2 fix: repair latest-main ci gate 2026-03-27 17:57:23 +00:00
Peter Steinberger ef1784d264 refactor: move bundled plugin policy into manifests 2026-03-27 16:40:27 +00:00
Josh Avant 6ade9c474c
feat(hooks): add async requireApproval to before_tool_call (#55339)
* Plugins: add native ask dialog for before_tool_call hooks

Extend the before_tool_call plugin hook with a requireApproval return field
that pauses agent execution and waits for real user approval via channels
(Telegram, Discord, /approve command) instead of relying on the agent to
cooperate with a soft block.

- Add requireApproval field to PluginHookBeforeToolCallResult with id, title,
  description, severity, timeout, and timeoutBehavior options
- Extend runModifyingHook merge callback to receive hook registration so
  mergers can stamp pluginId; always invoke merger even for the first result
- Make ExecApprovalManager generic so it can be reused for plugin approvals
- Add plugin.approval.request/waitDecision/resolve gateway methods with
  schemas, scope guards, and broadcast events
- Handle requireApproval in pi-tools via two-phase gateway RPC with fallback
  to soft block when the gateway is unavailable
- Extend the exec approval forwarder with plugin approval message builders
  and forwarding methods
- Update /approve command to fall back to plugin.approval.resolve when exec
  approval lookup fails
- Document before_tool_call requireApproval in hooks docs and unified
  /approve behavior in exec-approvals docs

* Plugins: simplify plugin approval code

- Extract mergeParamsWithApprovalOverrides helper to deduplicate param
  merge logic in before_tool_call hook handling
- Use idiomatic conditional spread syntax in toolContext construction
- Extract callApprovalMethod helper in /approve command to eliminate
  duplicated callGateway calls
- Simplify plugin approval schema by removing unnecessary Type.Union
  with Type.Null on optional fields
- Extract normalizeTrimmedString helper for turn source field trimming

* Tests: add plugin approval wiring and /approve fallback coverage

Fix 3 broken assertions expecting old "Exec approval" message text.
Add tests for the /approve command's exec→plugin fallback path,
plugin approval method registration and scope authorization, and
handler factory key verification.

* UI: wire plugin approval events into the exec approval overlay

Handle plugin.approval.requested and plugin.approval.resolved gateway
events by extending the existing exec approval queue with a kind
discriminator. Plugin approvals reuse the same overlay, queue management,
and expiry timer, with branched rendering for plugin-specific content
(title, description, severity). The decision handler routes resolve calls
to the correct gateway method based on kind.

* fix: read plugin approval fields from nested request payload

The gateway broadcasts plugin approval payloads with title, description,
severity, pluginId, agentId, and sessionKey nested inside the request
object (PluginApprovalRequestPayload), not at the top level. Fix the
parser to read from the correct location so the overlay actually appears.

* feat: invoke plugin onResolution callback after approval decision

Adds onResolution to the requireApproval type and invokes it after
the user resolves the approval dialog, enabling plugins to react to
allow-always vs allow-once decisions.

* docs: add onResolution callback to requireApproval hook documentation

* test: fix /approve assertion for unified approval response text

* docs: regenerate plugin SDK API baseline

* docs: add changelog entry for plugin approval hooks

* fix: harden plugin approval hook reliability

- Add APPROVAL_NOT_FOUND error code so /approve fallback uses structured
  matching instead of fragile string comparison
- Check block before requireApproval so higher-priority plugin blocks
  cannot be overridden by a lower-priority approval
- Race waitDecision against abort signal so users are not stuck waiting
  for the full approval timeout after cancelling a run
- Use null consistently for missing pluginDescription instead of
  converting to undefined
- Add comments explaining the +10s timeout buffer on gateway RPCs

* docs: document block > requireApproval precedence in hooks

* fix: address Phase 1 critical correctness issues for plugin approval hooks

- Fix timeout-allow param bug: return merged hook params instead of
  original params when timeoutBehavior is "allow", preventing security
  plugins from having their parameter rewrites silently discarded.

- Host-generate approval IDs: remove plugin-provided id field from the
  requireApproval type, gateway request, and protocol schema. Server
  always generates IDs via randomUUID() to prevent forged/predictable
  ID attacks.

- Define onResolution semantics: add PluginApprovalResolutions constants
  and PluginApprovalResolution type. onResolution callback now fires on
  every exit path (allow, deny, timeout, abort, gateway error, no-ID).
  Decision branching uses constants instead of hard-coded strings.

- Fix pre-existing test infrastructure issues: bypass CJS mock cache for
  getGlobalHookRunner global singleton, reset gateway mock between tests,
  fix hook merger priority ordering in block+requireApproval test.

* fix: tighten plugin approval schema and add kind-prefixed IDs

Harden the plugin approval request schema: restrict severity to
enum (info|warning|critical), cap timeoutMs at 600s, limit title
to 80 chars and description to 256 chars. Prefix plugin approval
IDs with `plugin:` so /approve routing can distinguish them from
exec approvals deterministically instead of relying on fallback.

* fix: address remaining PR feedback (Phases 1-3 source changes)

* chore: regenerate baselines and protocol artifacts

* fix: exclude requesting connection from approval-client availability check

hasExecApprovalClients() counted the backend connection that issued
the plugin.approval.request RPC as an approval client, preventing
the no-approval-route fast path from firing in headless setups and
causing 120s stalls. Pass the caller's connId so it is skipped.
Applied to both plugin and exec approval handlers.

* Approvals: complete Discord parity and compatibility fallback

* Hooks: make plugin approval onResolution non-blocking

* Hooks: freeze params after approval owner is selected

* Gateway: harden plugin approval request/decision flow

* Discord/Telegram: fix plugin approval delivery parity

* Approvals: fix Telegram plugin approval edge cases

* Auto-reply: enforce Telegram plugin approval approvers

* Approvals: harden Telegram and plugin resolve policies

* Agents: static-import gateway approval call and fix e2e mock loading

* Auto-reply: restore /approve Telegram import boundary

* Approvals: fail closed on no-route and neutralize Discord mentions

* docs: refresh generated config and plugin API baselines

---------

Co-authored-by: Václav Belák <vaclav.belak@gendigital.com>
2026-03-27 09:06:40 -07:00
Peter Steinberger 97297049e7 fix(ci): restore boundary and test seams 2026-03-27 15:08:33 +00:00
Peter Steinberger a10763e118 refactor: generate bundled channel seams 2026-03-27 13:46:16 +00:00
Peter Steinberger 9a775aa59c refactor: continue plugin seam cleanup 2026-03-27 13:46:16 +00:00
Ayaan Zaidi d6662e2aa7
fix(test): stabilize windows lock and cache paths 2026-03-27 13:29:15 +05:30
Tak Hoffman 75534f7a47
docs(config): refresh bundled channel config metadata 2026-03-27 00:25:43 -05:00
Tak Hoffman ed2798417e
check: restore bundled channel config metadata gate 2026-03-27 00:11:15 -05:00
Peter Steinberger ffa2a47c58
test: stabilize slow contract and integration suites 2026-03-27 05:07:50 +00:00
Peter Steinberger 3557bce827 fix: adapt to upstream agent api changes 2026-03-27 04:45:17 +00:00
Tak Hoffman 5eee793669
test(config): align legacy routing snapshot expectation 2026-03-26 23:17:43 -05:00
Peter Steinberger 490b2f881c
fix(ci): restore codex oauth refresh fallback 2026-03-27 04:08:12 +00:00
Peter Steinberger 35b132884c
refactor: add zod helpers for json file readers 2026-03-27 03:41:40 +00:00
Peter Steinberger 9df9bd436e refactor(config): dedupe legacy migration metadata 2026-03-27 02:37:47 +00:00
Peter Steinberger 66e7e29219 refactor(config): simplify version and allowed-value resolution 2026-03-27 02:37:17 +00:00
Peter Steinberger 417b3dd5e0
refactor: move channel prefer-over metadata into manifests 2026-03-27 02:36:56 +00:00
Peter Steinberger 465f830bcd fix(config): support uri formats in schema validation 2026-03-27 02:29:32 +00:00
Peter Steinberger dd098596cf
refactor: collapse bundled channel metadata into plugin manifests 2026-03-27 02:29:19 +00:00
Peter Steinberger ea60bc01b9 refactor(config): drop stale legacy migrations 2026-03-27 02:29:08 +00:00
Vincent Koc fa2a318f40
Align ACPX built-in agent registry with latest acpx (#55476)
* Add Cursor CLI to ACP allowedAgents

- acpx: add cursor to ACPX_BUILTIN_AGENT_COMMANDS (agent acp)
- docs: add cursor to acp-agents harness list and allowedAgents example

Fixes #28321

Made-with: Cursor

* ACP Cursor: add to acp-router skill, system-prompt, and schema help

- acp-router SKILL: add Cursor to description, intent, agentId mapping,
  harness aliases, and built-in adapter commands (agent acp)
- system-prompt: add cursor to ACP harness example
- schema.help: add cursor to runtime.acp.agent example

Fixes #28321

Made-with: Cursor

* fix(acpx): align built-in agent registry with latest acpx

---------

Co-authored-by: Rob MacDonald <rob@robmacdonald.com>
2026-03-26 19:15:17 -07:00
Peter Steinberger 14b3360c22
chore: bump versions to 2026.3.26 2026-03-27 02:03:22 +00:00
Peter Steinberger 40bd36e35d
refactor: move channel config metadata into plugin-owned manifests 2026-03-27 01:59:30 +00:00
Peter Steinberger b9c60fd37a
fix: default and gate apply_patch like write 2026-03-27 01:14:42 +00:00
Peter Steinberger dbf78de7c6
refactor: move memory engine behind plugin adapters 2026-03-27 00:47:01 +00:00
Coy Geek 8e285d112d
fix(cr-mbx-feishu-encryptkey-config-redaction-bypass): apply security fix (#53414)
Generated by staged fix workflow.
2026-03-26 19:58:37 -04:00
Peter Steinberger 01bcbcf8d5
refactor: require legacy config migration on read 2026-03-26 23:23:47 +00:00
Peter Steinberger 4b40d4dfa8 perf: optimize cold import paths 2026-03-26 23:11:00 +00:00
Peter Steinberger d72115c9df
refactor: genericize speech provider config surface 2026-03-26 22:48:57 +00:00
Peter Steinberger 12100719b8
fix: preserve cli sessions across model changes 2026-03-26 20:25:20 +00:00
Peter Steinberger 663ba5a3cd perf: speed up test parallelism 2026-03-26 20:09:40 +00:00
Peter Steinberger 2fc017788c test: reduce remaining clone seams 2026-03-26 20:01:01 +00:00
Peter Steinberger ab4de18982
fix: auto-load bundled plugin capabilities from config refs 2026-03-26 19:15:56 +00:00
Peter Steinberger e774fe1286 refactor: share browser and sandbox helpers 2026-03-26 18:43:57 +00:00
Jacob Tomlinson c2c136ae95
telegram: throttle repeated webhook auth guesses (#55142)
* telegram: throttle repeated webhook auth guesses

* telegram: use per-listener webhook rate limits

* config: stabilize doc baseline ordering
2026-03-26 16:19:31 +00:00
Peter Steinberger 4ed5895637 test: dedupe config compatibility fixtures 2026-03-26 15:45:14 +00:00
Peter Steinberger 9bc3d33b53 test: dedupe web search provider fixtures 2026-03-26 15:26:11 +00:00
Peter Steinberger 65a1afb9df test: share redact and approval fixtures 2026-03-26 15:23:12 +00:00
Tak Hoffman 9f0305420a
docs: add beta blocker contributor guidance (#55199)
* docs: add beta blocker contributor guidance

* fix: tighten beta blocker labeling and flaky config test
2026-03-26 09:31:59 -05:00
Peter Steinberger 883239a560
build: prepare 2026.3.25 unreleased 2026-03-26 13:57:45 +00:00
Tyler Yust e43600c9e5 fix(bluebubbles): auto-allow private network for local serverUrl and add allowPrivateNetwork to channel schema 2026-03-26 04:55:46 -07:00