Commit Graph

1607 Commits

Author SHA1 Message Date
Vincent Koc 7c50138f62 fix(plugins): keep built cli metadata scans lightweight 2026-03-29 17:55:17 +09:00
Peter Steinberger 8e0ab35b0e
refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Vignesh Natarajan 7cf87c4e53
chore(ci): refresh generated schema snapshots 2026-03-28 19:13:36 -07:00
Vignesh Natarajan 89881379dc
fix(config): allow plugin channels in hooks mappings 2026-03-28 19:00:05 -07:00
Tak Hoffman 3ce48aff66
Memory: add configurable FTS5 tokenizer for CJK text support (openclaw#56707)
Verified:
- pnpm build
- pnpm check
- pnpm test -- extensions/memory-core/src/memory/manager-search.test.ts packages/memory-host-sdk/src/host/query-expansion.test.ts
- pnpm test -- extensions/memory-core/src/memory/index.test.ts -t "reindexes when extraPaths change"
- pnpm test -- src/config/schema.base.generated.test.ts
- pnpm test -- src/media-understanding/image.test.ts
- pnpm test

Co-authored-by: Mitsuyuki Osabe <24588751+carrotRakko@users.noreply.github.com>
2026-03-28 20:53:29 -05:00
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
huntharo 216796f1e3 fix(xai): wire plugin-owned codeExecution config 2026-03-28 21:35:13 +00:00
huntharo b7ab0ddb55 refactor(xai): move code_execution into plugin 2026-03-28 21:35:13 +00:00
Peter Steinberger 2a950157b1 refactor(xai): move x_search into plugin 2026-03-28 21:35:13 +00:00
huntharo 396bf20cc6 Tools: add xAI-backed code_execution 2026-03-28 21:35:13 +00:00
huntharo 38e4b77e60 Tools: add x_search via xAI Responses 2026-03-28 21:35:13 +00:00
Peter Steinberger 02d4c1f2c3 refactor: derive channel metadata from plugin manifests 2026-03-28 17:17:10 +00:00
Peter Steinberger a955537a61 fix: slim provider sdk surfaces 2026-03-28 09:35:42 +00:00
Peter Steinberger be38986141 fix: guard bundled channel runtime against TDZ imports 2026-03-28 07:57:28 +00:00
Ayaan Zaidi 04a40b2613
test: refresh base config schema snapshot 2026-03-28 13:25:37 +05:30
Peter Steinberger 71a3ad153a fix(ci): stabilize bundled capability contract loading 2026-03-28 07:33:19 +00:00
Peter Steinberger d69f20f451 fix: harden bundled channel runtime bootstrap 2026-03-28 07:10:05 +00:00
Peter Steinberger b236f39104
refactor(agents): generalize tool schema compat cleanup 2026-03-28 05:42:46 +00:00
Ayaan Zaidi 79fb980767
test(config): refresh base schema snapshot 2026-03-28 10:47:08 +05:30
Peter Steinberger ab2bd34b66
refactor(xai): split provider compat facades
Co-authored-by: Harold Hunt <harold@pwrdrvr.com>
2026-03-28 05:02:41 +00:00
Brad Groux 6b0e74000d
fix(msteams): add blockStreaming config and progressive delivery (#56134)
- Add blockStreaming and blockStreamingCoalesceDefaults to MSTeams channel plugin (was the only channel missing it)
- Wire disableBlockStreaming flag in reply dispatcher from config
- Flush pending messages immediately during generation when blockStreaming is enabled
- Add comprehensive tests for schema validation and progressive flush behavior

Refs #56041
2026-03-27 23:53:24 -05:00
Peter Steinberger c5c9640374 fix: harden config write auditing 2026-03-28 03:54:54 +00:00
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