Commit Graph

416 Commits

Author SHA1 Message Date
Shakker
86bdeb0561 perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
Peter Steinberger
4b4cde7187 fix(memory): back off qmd open failures 2026-04-28 04:16:25 +01:00
hclsys
ba80695bba fix(cli): exit 0 when invoking parent commands without a subcommand (#73077)
Several `openclaw <parent>` commands (channels, plugins, approvals, devices,
cron, mcp) were exiting with code 1 when invoked bare, while printing the
same help-style content that `<parent> --help` produces (which exits 0).
This broke `&&` chains and surfaced a misleading
`ELIFECYCLE Command failed with exit code 1.` line under pnpm.

Add a small `applyParentDefaultHelpAction(cmd)` helper in
`src/cli/program/parent-default-help.ts` that attaches a default action
which prints the parent's own help and sets `process.exitCode = 0`. The
helper is a no-op when the parent already has its own action (e.g.
`agents` defaulting to `agents list`), so existing intentional defaults
are preserved.

Apply it to the six core parents listed in #73077.
2026-04-28 02:40:44 +01:00
Peter Steinberger
983fd775e2 fix(memory-core): stream embedding cache seed during reindex
- stream safe-reindex embedding-cache seeding with SQLite iterate()
- avoid no-op empty-cache transactions and keep regression coverage explicit
- supersedes #73067

Thanks @parkertoddbrooks.
2026-04-28 01:44:03 +01:00
Peter Steinberger
864c4f7ff4 fix(memory-core): bound fallback vector chunk scoring
- stream fallback Memory Core vector scoring with SQLite iterate() and a bounded top-K result set
- add regression coverage and live-main lint/boundary helper repairs
- supersedes #73069

Thanks @parkertoddbrooks.
2026-04-28 01:23:40 +01:00
Peter Steinberger
56875c4d32 refactor: split generic plugin test fixtures 2026-04-28 01:21:39 +01:00
Peter Steinberger
802f13ac15 fix(memory): cap ollama non-batch embedding concurrency 2026-04-28 00:34:18 +01:00
Vincent Koc
24c39de9c1 test(memory): allow packed index suite timeout
Allow the memory index suite to exceed the global 120s test timeout when it runs inside a packed extension shard. The scoped Vitest config is reset after the file.
2026-04-27 15:30:47 -07:00
Peter Steinberger
d7dcd0e21e test: stabilize release validation lanes 2026-04-27 23:00:45 +01:00
Peter Steinberger
6f80ba7b78 fix(test): avoid memory provider discovery in registration test 2026-04-27 22:58:55 +01:00
Peter Steinberger
75c03b28e0 test(memory): reset timers in index suite 2026-04-27 22:41:56 +01:00
Peter Steinberger
d24b78e96d test(extensions): use scoped config runtime imports 2026-04-27 22:24:30 +01:00
Peter Steinberger
74e62c32c3 test: route extension tests through sdk subpaths 2026-04-27 21:58:48 +01:00
RayWoo
ad6e1cd3a0 fix(memory-core): raise NARRATIVE_TIMEOUT_MS from 15s to 60s
Closes #72837. The 15s narrative-subagent timeout was empirically too
tight for warm-gateway runs across light, REM, and deep phases —
gpt-5.4-mini latency through OpenAI alone routinely brushes 12s+, so the
first sweep after a restart deterministically times out across all three
phases. 60s gives realistic LLM-call headroom while still capping the
worst case at one minute, preserving the original comment's "don't leave
parent cron running for minutes" constraint.

Test: updates the matching toMatchObject assertion in
dreaming-narrative.test.ts from 15_000 to 60_000.
2026-04-27 21:19:38 +01:00
Peter Steinberger
f0000ab72d refactor(plugin-sdk): split infra runtime barrel 2026-04-27 20:50:35 +01:00
Peter Steinberger
9090457da7 test(plugin-sdk): use narrow config runtime mocks 2026-04-27 15:14:02 +01:00
Peter Steinberger
4336a7f3a9 refactor(plugin-sdk): narrow config runtime imports 2026-04-27 14:58:32 +01:00
Peter Steinberger
f9946eb069 fix(memory): parse qmd vector status variants 2026-04-27 14:57:28 +01:00
Peter Steinberger
4ebec8b5dc fix(memory): group qmd collection searches 2026-04-27 14:37:12 +01:00
Peter Steinberger
c3c8f25bab fix(memory): report qmd dirty watcher state 2026-04-27 14:20:10 +01:00
Peter Steinberger
67a447c175 refactor: tighten plugin runtime sdk boundaries 2026-04-27 14:15:53 +01:00
Peter Steinberger
b181930c23 fix(memory): skip qmd vectors in lexical mode 2026-04-27 14:09:42 +01:00
Peter Steinberger
df65a75f92 fix(memory): avoid live embedding probes in status 2026-04-27 13:55:51 +01:00
Peter Steinberger
7f3f108521 refactor(config): migrate plugin config access 2026-04-27 12:35:58 +01:00
Peter Steinberger
3bc29dd604 fix(sqlite): bound WAL sidecar growth 2026-04-27 12:25:10 +01:00
Peter Steinberger
9dcd53c0b6 fix(memory): avoid watchers for memory CLI commands 2026-04-27 11:50:44 +01:00
Peter Steinberger
8a8cc8dc9f fix(memory): refresh tool config at execution 2026-04-27 11:36:02 +01:00
Peter Steinberger
775ed36c16 feat(memory): support asymmetric embedding input types 2026-04-27 11:25:40 +01:00
Peter Steinberger
f6ee2877e0 refactor: share memory dreaming cron constants 2026-04-27 11:19:09 +01:00
Peter Steinberger
4003e4389a fix(memory-core): support dreaming model override 2026-04-27 11:08:21 +01:00
Peter Steinberger
c9e6f371e4 fix(memory-core): quiet request-scoped fallback 2026-04-27 10:45:55 +01:00
Peter Steinberger
16eae4b4b4 fix(memory-core): skip cleanup after narrative fallback 2026-04-27 10:44:21 +01:00
Peter Steinberger
9b79eef750 fix(memory-core): honor configured index concurrency 2026-04-27 02:47:39 +01:00
Peter Steinberger
be56f172ab fix: scope qmd root memory collection 2026-04-27 01:01:58 +01:00
Vincent Koc
e53c068d78 fix: repair skills and memory watcher refresh paths 2026-04-26 11:21:21 -07:00
Peter Steinberger
9a529ca78b chore: update dependencies 2026-04-26 10:54:58 +01:00
Peter Steinberger
27aedcfd56 style: format repository 2026-04-26 05:47:12 +01:00
Peter Steinberger
650dc59b6f fix: skip checkpoint transcripts in memory dreaming 2026-04-26 01:30:50 +01:00
pash-openai
edb618c6c4 Manage the Codex app-server binary in OpenClaw (#71808)
* Manage Codex app-server binary

* Use plugin deps for Codex app-server binary

* Stabilize media model registry test

* Exclude checkpoint transcripts from memory ingestion
2026-04-25 16:51:14 -07:00
Peter Steinberger
956cb1c7db fix: keep local embedding batches from flooding providers 2026-04-26 00:11:35 +01:00
Peter Steinberger
f1b1c3dc99 chore: update workspace dependencies 2026-04-25 22:48:44 +01:00
Ted Li
8e83e52213 fix(memory-core): skip stale dreaming recall sources (#71695)
* fix(memory-core): skip stale dreaming recall sources

* fix(memory-core): parallelize live recall filtering
2026-04-25 17:10:38 -04:00
Mara 🌿
4038f734f7 fix(memory-core): add runtime cron service fallback for dreaming reconciliation (#71694)
* fix(memory-core): add runtime cron service fallback for dreaming reconciliation

When the cron service is unavailable during gateway_start (e.g., due to
a startup timing race or deferred initialization), the startupCronSource
is captured as null and never refreshed. All subsequent runtime
reconciliation attempts fail with 'cron service unavailable', even when
the cron service is fully operational.

This adds a fallback path in the runtime reconciliation that attempts to
obtain the cron service from the plugin API runtime when the startup
capture was null. This handles the case where the cron service becomes
available after the initial startup event.

Fixes #67362

* fix(memory-core): hold gateway context for runtime cron resolution

The previous attempt tried to access api.runtime.cron which doesn't exist
on the PluginRuntime type. The cron service is only accessible through
PluginHookGatewayContext.getCron().

This fix stores the gateway context from the gateway_start event and uses
it to retry cron resolution at runtime when the initial capture was null.
This handles the race condition where the cron service isn't available
during gateway_start (250ms deferred init) but is ready later.

Also refreshes the startupCron capture when the runtime retry succeeds,
so subsequent reconciliation calls resolve immediately.

Addresses review feedback on #71694
2026-04-25 17:07:45 -04:00
Peter Steinberger
7fcefd56b7 chore: bump version to 2026.4.25 2026-04-25 10:31:52 +01:00
Vincent Koc
9895ecead3 fix(memory): keep llama runtime optional (#71425)
* fix(memory): keep llama runtime optional

* fix(memory): harden optional llama runtime guard
2026-04-25 00:09:12 -07:00
Alex Fries
66e66f19c6 feat(memory-core): expose hybrid search component scores
Expose raw `vectorScore` and `textScore` alongside the combined hybrid memory search `score`.

- Preserve vector/text component scores from `mergeHybridResults` output.
- Add optional component-score fields to both memory host SDK type surfaces.
- Extend hybrid merge tests for vector-only, text-only, and overlapping result cases.
- Document that component scores remain raw retrieval diagnostics while temporal decay/MMR only adjust or reorder the combined ranking `score`.

Closes #68166.

Maintainer verification:
- `pnpm test extensions/memory-core/src/memory/hybrid.test.ts`
- `pnpm check:changed`
- Fresh GitHub checks passed.

Co-authored-by: Alex Fries <alex@engramlabs.io>
2026-04-25 01:46:03 -05:00
Michiel van den Donker
2c716f5677 fix: enforce memory search session visibility (#70761) (thanks @nefainl)
* [EV-001] memory-core: filter memory_search session hits by visibility

- Move session visibility + listSpawnedSessionKeys to plugin-sdk; sync test
  hook with sessions-resolution __testing.setDepsForTest
- Extract loadCombinedSessionStoreForGateway to config/sessions; re-export
  from gateway session-utils
- Add session-transcript-hit stem resolver for builtin + QMD paths
- Post-filter memory_search results before citations/recall; fail closed when
  requester session key missing; optional corpus=sessions
- Tests: stem extraction, visibility filter smoke, existing suites green

* chore: sync plugin-sdk exports for session-transcript-hit and session-visibility

Run pnpm plugin-sdk:sync-exports so package.json exports match
scripts/lib/plugin-sdk-entrypoints.json. Fixes contract tests and
lint:plugins:plugin-sdk-subpaths-exported for memory-core imports.

* fix(EV-001): cross-agent session memory hits + hoist combined store load

- resolveTranscriptStemToSessionKeys: stop filtering by requester agentId so
  keys from other agents reach createSessionVisibilityGuard (a2a + visibility=all).
- Re-export loadCombinedSessionStoreForGateway from session-transcript-hit;
  filterMemorySearchHitsBySessionVisibility loads the combined store once per pass.
- Drop unused agentId from filter params; extend tests (Greptile/Codex review).

* fix(memory_search): honor corpus=sessions before maxResults cap

Pass sources into MemoryIndexManager.search so FTS/vector queries add
source IN (...) before ranking and top-N slice (Codex: non-session hits
could fill the window).

QMD path: oversample fetch limit for single-source recall, filter by
source, then diversify/clamp to the requested maxResults.

Wire corpus=sessions from tools; extend MemorySearchManager opts and
wrappers.

* fix(memory_search): apply corpus=memory source filter like sessions

Pass sources: ["memory"] into manager.search so maxResults applies only
within the memory index; post-filter for defense in depth. Document
corpus=memory in the tool description.

* fix: scope qmd session memory search

* fix: enforce memory search session visibility (#70761) (thanks @nefainl)

---------

Co-authored-by: NefAI <info@nefai.nl>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-25 09:30:21 +05:30
Peter Steinberger
0764f86e18 test(memory): keep embedding provider selection isolated 2026-04-25 04:17:27 +01:00
Peter Steinberger
f70e439699 fix(amazon-bedrock): skip auto memory embeddings without credentials (#71245)
Co-authored-by: bitloi <raphaelaloi.eth@gmail.com>
2026-04-25 02:47:52 +01:00
Peter Steinberger
27c61ed0d4 chore(deps): update workspace dependencies 2026-04-24 16:55:08 +01:00