Commit Graph

1928 Commits

Author SHA1 Message Date
Tak Hoffman
39048e054d fix(regression): invalidate remote skill snapshots on disconnect 2026-03-27 20:24:15 -05:00
Tak Hoffman
a9e9c7cbfd fix: use session origin delivery metadata in outbound targets 2026-03-27 20:21:06 -05:00
Peter Steinberger
d38ec0c9c9 test: dedupe loader heartbeat and audit cases 2026-03-28 00:53:34 +00:00
Peter Steinberger
6a039bca30 test: dedupe loader and audit suites 2026-03-28 00:46:53 +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
2a98464a28 test: dedupe outbound routing and queue suites 2026-03-28 00:02:09 +00:00
Peter Steinberger
0b013bdd94 test: dedupe exec approval and system run suites 2026-03-28 00:02:09 +00:00
Peter Steinberger
eef2f82986 test: dedupe infra utility suites 2026-03-27 23:33:08 +00:00
Peter Steinberger
8a788e2c0c test: dedupe infra and plugin-sdk utility suites 2026-03-27 23:08:57 +00:00
Peter Steinberger
be67c0de1d test: debrand queue retry fixtures 2026-03-27 21:58:29 +00:00
Peter Steinberger
884247f8d8 test: debrand generic setup helper fixtures 2026-03-27 21:57:58 +00:00
Peter Steinberger
2019b649af test: debrand generic session binding fixtures 2026-03-27 21:54:56 +00:00
Peter Steinberger
a9cc830ded test: debrand generic outbound channel fixtures 2026-03-27 21:53:19 +00:00
Peter Steinberger
992b30604d refactor: move extension-owned tests to extensions 2026-03-27 21:37:09 +00:00
Jacob Tomlinson
d61f8e5672 Net: block missing IPv6 special-use ranges (#56008)
* Net: block missing IPv6 special-use ranges

* Tests: refresh public IPv6 pinning fixtures
2026-03-27 20:28:25 +00:00
Peter Steinberger
d73dbb6753 fix: restore provider auth and build checks 2026-03-27 20:20:31 +00:00
Tak Hoffman
4430805719 Allow inherited AWS config file paths 2026-03-27 15:16:19 -05:00
Jacob Tomlinson
4d7cc6bb4f gateway: restrict node pairing approvals (#55951)
* gateway: restrict node pairing approvals

* gateway: tighten node pairing scope checks

* gateway: harden node pairing reconnects

* agents: request elevated node pairing scopes

* agents: fix node pairing approval preflight scopes
2026-03-27 19:14:16 +00:00
Jacob Tomlinson
9ec44fad39 Exec approvals: reject wrapper carrier allow-always targets (#55947)
* Exec approvals: reject wrapper carrier allow-always targets

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

* Tests: add shell wrapper carrier follow-up assertion

---------

Co-authored-by: nexrin <268879349+nexrin@users.noreply.github.com>
2026-03-27 19:07:47 +00:00
Jacob Tomlinson
4ee4960de2 Pairing: forward caller scopes during approval (#55950)
* Pairing: require caller scopes on approvals

* Gateway: reject forbidden silent pairing results
2026-03-27 18:55:33 +00:00
Jacob Tomlinson
6eb82fba3c Infra: block additional host exec env keys (#55977) 2026-03-27 18:50:37 +00:00
Jacob Tomlinson
78e2f3d66d Exec: tighten jq safe-bin env checks (#55905) 2026-03-27 18:37:31 +00: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
Peter Steinberger
ed055f44ae refactor: route plugin runtime through bundled seams 2026-03-27 16:40:27 +00:00
Peter Steinberger
425032ed4d refactor: move public artifact metadata into plugins 2026-03-27 16:39:42 +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
8ddeada97d test: move extension-owned coverage into plugins 2026-03-27 15:11:33 +00:00
Peter Steinberger
02d9f0d631 refactor: route exec approval surface test through extension entrypoints 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
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
Anmol Ahuja
c40884d306 Prefer non-user writeable paths (#54346)
* infra: trust system binary roots

* infra: isolate windows install root overrides

* infra: narrow windows reg lookup

* browser: restore windows executable comments

---------

Co-authored-by: Jacob Tomlinson <jtomlinson@nvidia.com>
2026-03-27 11:29:32 +00:00
Jacob Tomlinson
83da3cfe31 infra: unwrap script wrapper approval targets (#55685)
* infra: unwrap script wrapper approvals

* infra: handle script short option values

* infra: gate script wrapper unwrapping by platform

* infra: narrow script wrapper option parsing
2026-03-27 10:05:35 +00:00
Tak Hoffman
f5643544c2 Reduce lint suppressions in core tests and runtime 2026-03-27 02:11:26 -05:00
Peter Steinberger
35b132884c refactor: add zod helpers for json file readers 2026-03-27 03:41:40 +00:00
Kinfey
c959ac3a25 fix: WSL2 Ollama networking and provider discovery diagnostics (#55435)
- Fix Ollama stream handling for WSL2 environments
- Update undici global dispatcher for WSL2 networking compatibility
- Adjust provider discovery configuration
- Add WSL2 networking tests
2026-03-26 21:41:05 -05:00
MiloStack
b33ad4d7cb fix: guarantee heartbeat timer re-arm with try/finally (#52270)
Merged via squash.

Prepared head SHA: cd0bcc2fb8
Co-authored-by: MiloStack <265805734+MiloStack@users.noreply.github.com>
Co-authored-by: grp06 <1573959+grp06@users.noreply.github.com>
Reviewed-by: @grp06
2026-03-26 18:29:33 -07:00
Peter Steinberger
ba60154826 fix: unify upload-file message actions 2026-03-27 01:04:01 +00:00
Peter Steinberger
e955d574b2 refactor: move memory tooling into memory-core extension 2026-03-26 22:00:13 +00:00
Peter Steinberger
2fc017788c test: reduce remaining clone seams 2026-03-26 20:01:01 +00:00
Peter Steinberger
8f1716ae5a refactor: share slack and telegram action helpers 2026-03-26 19:07:35 +00:00
Peter Steinberger
4069844795 refactor: share discord outbound session routing 2026-03-26 18:51:02 +00:00
Peter Steinberger
e774fe1286 refactor: share browser and sandbox helpers 2026-03-26 18:43:57 +00:00
Peter Steinberger
cca577a0cc refactor: share plugin setup helpers 2026-03-26 18:34:51 +00:00
Peter Steinberger
e7e4fbcab9 test: dedupe secrets and guardrail fixtures 2026-03-26 17:39:58 +00:00
Peter Steinberger
d9a7dcec4b test: share matrix migration fixtures 2026-03-26 16:25:23 +00:00