Commit Graph

407 Commits

Author SHA1 Message Date
Peter Steinberger f9b1079283
build: cut 2026.3.28 stable 2026-03-29 02:33:41 +01:00
Peter Steinberger 587e18cd3f chore: prepare 2026.3.28-beta.1 release 2026-03-28 22:24:51 +00:00
Peter Steinberger 8a24cbf450 chore: bump version to 2026.3.28 2026-03-28 22:05:21 +00:00
Peter Steinberger 02d4c1f2c3 refactor: derive channel metadata from plugin manifests 2026-03-28 17:17:10 +00:00
Saurabh Mishra 90e82fabb3
fix: display model name instead of ID in Telegram model selector (#56165) (#56175)
* fix: display model name instead of ID in Telegram model selector (#56165)

* fix(telegram): scope model display names by provider

Signed-off-by: sallyom <somalley@redhat.com>

---------

Signed-off-by: sallyom <somalley@redhat.com>
Co-authored-by: sallyom <somalley@redhat.com>
2026-03-28 09:23:09 -04:00
Peter Steinberger f4cd06cb1a refactor: finish test cleanup off infra runtime 2026-03-28 06:59:32 +00:00
Peter Steinberger df4c9c5bd8 refactor: narrow test mocks off infra runtime 2026-03-28 06:54:03 +00:00
Peter Steinberger 7db10d2103 refactor: route discord channel through outbound runtime 2026-03-28 06:45:20 +00:00
Peter Steinberger c65ec46490 refactor: trim remaining infra runtime residue 2026-03-28 06:41:56 +00:00
Peter Steinberger 922c90e9fa refactor: add approval runtime sdk seam 2026-03-28 06:33:07 +00:00
Peter Steinberger 1db1c75a98 refactor: trim state persistence runtime seams 2026-03-28 06:08:18 +00:00
Peter Steinberger c222a44e6f refactor: add retry runtime sdk seam 2026-03-28 05:59:07 +00:00
Peter Steinberger a126d23f0d refactor: add fetch runtime sdk seam 2026-03-28 05:44:33 +00:00
Peter Steinberger 7d7883aa38 refactor: use temp-path sdk in discord voice manager 2026-03-28 04:56:53 +00:00
Peter Steinberger eca6b8f4e8 refactor: use temp-path sdk in discord voice message 2026-03-28 04:23:39 +00:00
Peter Steinberger 9fa1674a56 refactor: use temp-path sdk in discord send 2026-03-28 04:20:20 +00:00
Peter Steinberger 2b450ab629 refactor: move discord system events onto channel runtime 2026-03-28 03:27:12 +00:00
Peter Steinberger 71795c5323 refactor: move discord error formatting onto ssrf runtime 2026-03-28 03:22:16 +00:00
Peter Steinberger c04ceb5cc2 refactor: route discord preflight activity through channel runtime 2026-03-28 03:19:50 +00:00
Peter Steinberger 0825ff9619 refactor: move discord duration formatting onto runtime env 2026-03-28 03:17:40 +00:00
Peter Steinberger 8ed25f95dd refactor: route discord activity through channel runtime 2026-03-28 03:15:03 +00:00
Peter Steinberger 21136238ce
test(discord): add acp bind flow integration coverage 2026-03-28 03:09:38 +00:00
Peter Steinberger b34b03dd9e refactor: move channel dedupe helpers onto core sdk 2026-03-28 02:58:45 +00:00
Peter Steinberger 68416fdf83
refactor(acp): generalize message-channel binds 2026-03-28 02:53:54 +00:00
Peter Steinberger 72ba2b3653 chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
Tak Hoffman b598cdf968
fix(regression): preserve discord thread bindings for plugin commands 2026-03-27 20:24:14 -05:00
Peter Steinberger 78160b5f88 fix: align discord registry and runtime test helpers 2026-03-28 00:13:44 +00:00
Peter Steinberger ac68494dae fix(ci): harden discord rate-limit helpers 2026-03-27 23:43:43 +00:00
Peter Steinberger 4ca07559ab refactor: move provider seams behind plugin sdk surfaces 2026-03-27 23:26:26 +00:00
Peter Steinberger 992b30604d refactor: move extension-owned tests to extensions 2026-03-27 21:37:09 +00:00
Tak Hoffman 9134dbd252
fix(regression): fail discord startup on reconnect exhaustion 2026-03-27 16:20:02 -05:00
Peter Steinberger b50b9b16ab fix(ci): isolate discord session-key facade 2026-03-27 20:59:39 +00:00
Peter Steinberger c813222671 fix(ci): support discord rate limit ctor drift 2026-03-27 20:54:23 +00:00
Peter Steinberger 03333100ba fix(ci): align discord rate limit calls and telegram test imports 2026-03-27 20:48:21 +00:00
Peter Steinberger 2bdbb189bd refactor: route plugin sdk facades through extension barrels 2026-03-27 20:47:36 +00:00
Jacob Tomlinson 511093d4b3
Discord: apply component interaction policy gates (#56014)
* Discord: apply component interaction policy gates

Co-authored-by: nexrin <268879349+nexrin@users.noreply.github.com>

* Discord: pass carbon rate limit request

* Discord: reply to blocked component interactions

---------

Co-authored-by: nexrin <268879349+nexrin@users.noreply.github.com>
2026-03-27 20:38:40 +00:00
Jacob Tomlinson 355abe5eba
Discord: enforce approver checks for text approvals (#56015)
* Discord: gate text approvals by approver policy

* Discord: require approvers for plugin text approvals

* Discord: preserve legacy text approval fallback
2026-03-27 20:37:15 +00:00
Peter Steinberger 953a438420 fix(discord): align rate-limit error callsites 2026-03-27 20:09:15 +00:00
Vincent Koc 02e3061aa7
fix(discord): stop queued reconnect exhaustion crash (#55991) 2026-03-27 12:39:38 -07:00
Peter Steinberger 605c9306ab fix(ci): repair extension and discord test gates 2026-03-27 19:26:25 +00:00
Jacob Tomlinson febcb01128
discord: fix Carbon RateLimitError calls 2026-03-27 19:16:36 +00:00
Nimrod Gutman 7ce2670043
fix(discord): update carbon beta (#55980)
* fix(discord): update carbon beta

* fix: update carbon beta (#55980) (thanks @ngutman)
2026-03-27 22:06:20 +03:00
Peter Steinberger ed055f44ae refactor: route plugin runtime through bundled seams 2026-03-27 16:40:27 +00:00
Peter Steinberger cd92549119 test: split extension-owned core coverage 2026-03-27 16:08:57 +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 351a931a62 fix(ci): restore runtime-api guardrails 2026-03-27 15:56:54 +00:00
Peter Steinberger 87dddb818d fix(ci): restore plugin runtime boundaries 2026-03-27 14:38:40 +00:00
Peter Steinberger 66a2e72bee fix: restore CI runtime seams 2026-03-27 14:07:01 +00:00
Peter Steinberger 169bf6adba refactor: route outbound payload tests through extension test seams 2026-03-27 13:46:17 +00:00
Peter Steinberger c2b28753e7 refactor: route more test seams through public plugin APIs 2026-03-27 13:46:17 +00:00