Commit Graph

977 Commits

Author SHA1 Message Date
Peter Steinberger f5c985d92c fix(memory): remove interrupted Dreaming sessions after Gateway restart (#117885)
* fix(memory): clean interrupted Dreaming sessions after Gateway restart

* test(sessions): preserve historical timestamps in lifecycle fixtures

* test(plugins): remove duplicate registry handle mock from main

* style(sessions): format lifecycle conformance assertion
2026-08-02 01:17:31 -07:00
Peter Steinberger 9a433136c4 test(memory-core): consolidate dreaming fixtures (#117804) 2026-08-01 21:37:46 -07:00
Peter Steinberger 7d1d721d62 fix(memory): qualify stale memory search results (#117706)
* fix(memory): qualify stale search results

* fix(memory): satisfy staleness checks

* fix(memory): normalize absent staleness
2026-08-01 17:40:14 -07:00
Peter Steinberger 35e4563fa8 refactor(memory): deduplicate memory search test fixtures (#117691) 2026-08-01 16:52:50 -07:00
Peter Steinberger 165c968f95 fix(memory): recover restored session freshness (#117548) 2026-08-01 12:39:24 -07:00
Vincent Koc 6dcb95a947 test(memory): isolate mocked embedding providers 2026-08-02 01:18:43 +08:00
Peter Steinberger 568ea29d2e refactor(plugins): inherit shared package boundary settings (#117474) 2026-08-01 09:11:09 -07:00
Peter Steinberger e4d1b7e0d3 refactor(plugins): move plugin contributions into the registry bundle (#117372)
* refactor(plugins): move plugin contributions into the registry bundle

* fix(plugins): guard embedding owner union and drop unused test-util imports

* fix(plugins): break registry facade import cycles

* fix(plugins): remove obsolete registry snapshot seams

* test(gateway): preserve plugin runtime mock exports

* test(auto-reply): install builder registry in diagnostics fixture

* test(plugins): activate registry-backed capability fixtures
2026-08-01 06:57:01 -07:00
Peter Steinberger 597699401a refactor(memory): use sqlite transcript identities (#117334) 2026-08-01 04:38:40 -07:00
Peter Steinberger f216d3cc86 refactor(memory): unify session ingestion (#117293) 2026-08-01 02:12:50 -07:00
Peter Steinberger 04f9a204fd fix(memory): reuse targeted session corpus snapshot (#117247) 2026-08-01 00:53:14 -07:00
Peter Steinberger ea1d6cc35e refactor(memory): unify embedding provider adaptation (#117094) 2026-07-31 16:30:22 -07:00
chelsealong fc545773cc fix(memory): suggest reindex, not --fix, for a missing qmd index (#116958)
`memory status` always appended "Fix: openclaw memory status --fix"
when any audit issue was present, even when none of the issues were
actually repaired by --fix. A missing qmd index file (qmd-index-missing)
is marked fixable: false, so running the suggested --fix left the
issue unresolved. Gate the --fix hint on at least one fixable issue,
and suggest `openclaw memory index --agent <id>` (which builds a fresh
index) when the qmd index file is missing.
2026-07-31 15:14:59 -07:00
Vincent Koc 007fdb1f7c test(extensions): remove duplicate coverage (#116643) 2026-07-31 11:59:12 +08:00
pash-openai e52354ea13 fix(build): pin typebox to a published release (#116333) 2026-07-30 09:58:51 +00:00
WhatsSkiLL e5cee36b46 fix(memory): retry failed queued session targets (#115923)
* fix(memory): retain failed queued sync targets

* fix(memory): drain retained targets on idle sync

* test(memory): prove idle queued sync recovery

* fix(memory): preserve queued sync ownership

* fix(memory): avoid queued sync self-deadlock

* fix(memory): stop queued recovery during close

* fix(memory): clear retained sync state on close

* test(memory): prove live queued rejection transition

* fix(memory): enforce sync repro invariants

* test(memory): bound archive recovery proof

* test(memory): seed archive proof transcript

* test(memory): exercise archived transcript recovery

* chore(knip): register memory sync repro

* fix(memory): reject blank queries before settings

* style(memory): satisfy queue recovery lint

* test(memory): align doctor migration expectations

* test(memory): insert explicit provenance fixture

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-30 02:47:59 -07:00
Yuval Dinodia d952566385 fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (#116180)
* fix(memory-core): stop MEMORY.md compaction from deleting marker-free user sections

Budget compaction decided that a MEMORY.md section belonged to OpenClaw purely
from its heading text, so a user-authored section under a heading that looks
generated, such as "## Promoted From Short-Term Memory (2026-04-10)", was
eligible for deletion once the file plus the new promotion exceeded
memoryFileMaxChars. The rewrite succeeded silently and the atomic replace made
the loss durable.

A matching heading is now provisional: the block is classified as a promotion
only when it structurally contains at least one
"<!-- openclaw-memory-promotion:... -->" marker, which buildPromotionSection
emits for every promoted candidate. Marker-free sections are preserved.
Generated sections, including the multi-project shape whose markers sit under
"### Global" and "### Project:" subsections, are still dropped oldest-first, so
the size bound from #73691 is unchanged.

Extends #116057, which made only subsection handling marker-aware and left the
top-level heading classifier trusting presentation text.

* fix(memory-core): preserve mixed promotion blocks

Validate the complete marker-and-entry grammar before treating a promotion-shaped block as writer-owned. Preserve marker-only and mixed blocks so unheaded operator notes cannot be deleted during budget compaction.

Co-authored-by: yetval <yetvald@gmail.com>

* test(memory-core): allow cold citation startup

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-30 16:24:32 +08:00
Yuval Dinodia 772235cc55 fix(memory-core): stop MEMORY.md compaction from deleting user headings (#116057)
* fix(memory-core): stop MEMORY.md compaction from deleting user headings

parseMemoryBlocks segmented MEMORY.md only on "## ", so a user heading of
any other level did not close the promotion section above it. The section
ran on to the next "## " heading or EOF, and dropping it to fit the budget
deleted the user text it had swallowed, with no backup and no diagnostic.

Close the current block on any ATX heading, keeping the generator's own
"### Global" and "### Project: <key>" subheadings inside the promotion
body so multi-project sections stay droppable whole.

* fix(memory-core): identify generated promotion subsections by their entry marker

The first exception treated every "### Global" and "### Project: <key>"
heading under a promotion block as dreaming-owned, so a user who wrote one
of those headings themselves still lost it to compaction, which is the same
data-loss class this change set out to fix.

A generated subsection always leads with an openclaw-memory-promotion entry
marker comment, so require that marker as the next non-blank line before
treating the heading as part of the promotion body. User headings that
collide with the generated names now terminate the block and survive.

* fix(memory-core): recognize tab-delimited and empty ATX headings

The heading detector required a literal ASCII space after the opening #
sequence. CommonMark also allows a tab or end of line, so a user note
starting with a tab-delimited heading stayed inside the promotion block
above it and was deleted when compaction dropped that block.

Accept a space, a tab, or end of line after the # sequence. The generated
subsection pattern stays space-only because that is what buildPromotionSection
emits, so a tab-delimited heading is user-authored and is preserved.

* fix(memory-core): preserve Setext headings during compaction

Setext headings were still absorbed into the generated promotion block above them, so dropping that block could silently delete durable user notes. Move the heading paragraph into a preserved block when its underline is encountered, while keeping marker-backed generated content compactable.

* fix(memory-core): preserve indented ATX headings

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-30 09:13:57 +08:00
EricKwan e00ef16ee7 fix(xai): follow OAuth default model automatically (#115617)
* fix(xai): default OAuth login to Grok 4.5

* fix(xai): follow OAuth default model automatically

* fix(xai): send OAuth proxy request headers

* fix(xai): avoid provider API shadowing

* fix(qa): restore current main validation gates

---------

Co-authored-by: echeung <echeung@agentsonly.com>
Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
2026-07-29 23:05:29 +00:00
Peter Steinberger 7380875375 fix(memory): keep degraded status actionable (#116074)
* fix(memory): diagnose degraded auth owners

* fix(memory): use shared sqlite opener
2026-07-29 16:58:57 -04:00
Vincent Koc 83aca8a59c fix(memory): return early for blank searches (#116034) 2026-07-30 02:48:50 +08:00
Jason (Json) cf927f7b1b fix(memory): keep rollbacks compatible after recall metadata upgrade (#116003)
* fix(memory): keep agent database rollbacks compatible

* fix(memory): satisfy rollback migration guards
2026-07-29 11:19:22 -06:00
Peter Steinberger 841bfcdcb8 fix(memory): make legacy session backfill rollback re-applicable (#116004)
* fix(memory): reset legacy backfill cursors on rollback

* fix(memory): track complete backfill rewind baselines
2026-07-29 13:08:25 -04:00
Peter Steinberger 6dc13c63b6 fix(memory-core): adopt legacy dreaming jobs (#115986) 2026-07-29 12:26:43 -04:00
Peter Steinberger 5bfc65d7f4 refactor: remove 3,543 lines of redundant runtime and tests (#115961)
* refactor: remove 3,543 lines of redundant runtime and tests

* refactor: ratchet production environment variable budget
2026-07-29 11:43:41 -04:00
Peter Steinberger 53815217e9 fix(memory): session backfill drains and rolls back reversibly (#115926)
* fix(memory): complete reversible session backfill

* refactor(memory): split backfill lifecycle helpers

* fix(memory): break backfill lifecycle import cycle

* fix(memory): keep lifecycle contract exports minimal
2026-07-29 10:48:16 -04:00
Peter Steinberger 1f9dd150e8 fix(memory-core): harden dreaming lifecycle (#115925)
* fix(memory-core): harden dreaming lifecycle

* fix(memory-core): keep sweep result internal
2026-07-29 10:06:27 -04:00
Vincent Koc dcd3c5b202 fix(test): restore isolated memory manager tests (#115880) 2026-07-29 20:24:14 +08:00
Peter Steinberger a2ead0a929 fix(memory): recover divergent dreaming journals (#115855)
* fix(memory): recover divergent dreaming journals

Co-authored-by: brokemac79 <martin_cleary@yahoo.co.uk>

* chore: drop changelog edit (release generation owns it)

---------

Co-authored-by: brokemac79 <martin_cleary@yahoo.co.uk>
2026-07-29 07:32:26 -04:00
loong 7bdd1f646b fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (#99318)
* fix(memory): survive Homebrew Node upgrades

Co-authored-by: 袁龙辉0668001277 <yuan.longhui@xydigit.com>

* test(whatsapp): isolate last-route coverage

* fix(deepinfra): preserve offline model compatibility

* test(memory): isolate migration cleanup lifecycle

* test: stabilize aggregate extension gates

* ci: retrigger pull request workflow

* test: preserve inherited Node options

* test(cli): tolerate cold hosted startup

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 06:49:02 -04:00
Peter Steinberger 20668eed03 fix(memory): quarantine writes from tainted agent turns (#115818)
* feat(memory): taint writes after network tools

* fix(memory): keep provenance mutations recoverable

* fix(memory): roll back failed provenance writes

* fix(memory): serialize provenance mutations

* docs(memory): explain flush provenance boundary

* refactor(memory): share provenance mutation wrapper

* docs(memory): clarify flush provenance fallback

* fix(memory): canonicalize provenance paths
2026-07-29 06:02:06 -04:00
Vincent Koc 47c1921d5d fix(ui): stabilize memory engine selection (#115750) 2026-07-29 11:37:39 +02:00
Hannes Rudolph 6dc55fa65e fix(plugins): recover user turns with scoped reply hooks (#114836)
Allow before_agent_reply plugins to declare host-enforced trigger eligibility so scheduled-only hooks do not block interrupted user-turn recovery. Keep omitted and malformed scopes fail-closed, scope both memory-core maintenance hooks, and cover three runner reload cycles through the public registration contract.

Refs: #111442

Source: #114836

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-29 17:22:16 +08:00
Peter Steinberger 4232126bba chore: update dependencies across workspace (#115677)
* chore(deps): update dependencies

* fix(deps): restore CI compatibility
2026-07-29 05:16:42 -04:00
Peter Steinberger fb788b79cf feat(memory): retain recent project scopes per session (#115731)
* feat(memory): retain active project set

* refactor(memory): require prepared active set

* docs(memory): explain active project set
2026-07-29 04:58:14 -04:00
Peter Steinberger ed6010ed54 fix(memory): keep dreaming consolidation within project scope (#115721)
* fix(memory): isolate consolidation by project

* test(memory): align dreaming status threshold
2026-07-29 04:27:24 -04:00
Peter Steinberger 1b6ad8da8f fix(memory): avoid phantom continuation pages (#115722)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 04:24:19 -04:00
Peter Steinberger 5692baafc3 fix(memory): exclude annotation carriers from recall text (#115719) 2026-07-29 04:03:12 -04:00
Peter Steinberger b2cc5f5042 fix(memory): promote durable facts after repeated recall (#115715)
* fix(memory): calibrate promotion gate defaults

* docs: refresh generated docs map
2026-07-29 03:51:59 -04:00
Peter Steinberger dd459ac1d7 refactor(memory): deduplicate promotion and CLI flows (#115706) 2026-07-29 03:29:48 -04:00
Peter Steinberger ddd0b48673 refactor: remove 3,527 lines of runtime and test duplication (#115626)
* refactor: remove obsolete runtime and test duplication

* test: preserve typed cron and realtime fixtures
2026-07-29 02:21:20 -04:00
Peter Steinberger 1084f6dda8 fix(memory): preserve Unicode in short-term promotion (#115591)
Use the existing surrogate-safe helpers at the dreaming lead and heading boundaries. Preserve contributor investigations in #107882 and #107910.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 01:29:43 -04:00
Peter Steinberger d41a56fca1 feat(memory): isolate curated entries by project (#115438)
* feat(memory): scope recall to active projects

* feat(memory): preserve project scope in promotion

* docs(memory): explain project-scoped recall

* fix(memory): chunk curated files per entry

* refactor(memory): narrow project scope internals

* fix(memory): exclude annotations from concept tags

* fix(memory): tighten project isolation boundaries

* fix(memory): preserve project path casing

* fix(memory): prioritize project bootstrap candidates

* docs: refresh memory architecture map

* test(memory): cover project scope schema repair

* fix(memory): complete project isolation paths

* fix(memory): close project ranking checks

* fix(memory): reinitialize search provider before ranking

* fix(memory): tolerate missing bootstrap paths
2026-07-28 23:55:49 -04:00
Peter Steinberger 5922dd4380 fix(memory): fall back to keyword search when embeddings cannot start (#115397)
* fix(memory): degrade bootstrap failures to keyword search

* docs(memory): clarify recovery status projection

* fix(memory): handle bootstrap embedding failures

* fix(memory): trust resolved provider diagnostics

* fix(memory): keep degraded syncs keyword-only

* fix(memory): confirm embedding recovery before semantic mode

* fix(memory): restore semantic readiness after recovery
2026-07-28 21:01:44 -04:00
Shakker 5578d01777 test: remove stale persisted session file identity (#115442) 2026-07-29 00:55:13 +01:00
Christian Lallo 811444d6db fix(memory-core): avoid cubic MMR similarity rescans (#113359)
* fix(memory): avoid cubic MMR similarity rescans

* style(memory-core): oxfmt mmr.test.ts

* test(memory-core): allow packed CI integration tests

* fix(ci): serialize targeted memory-core tests

* fix(ci): pin agentic cli worker count

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-29 03:53:43 +08:00
Peter Steinberger ca48f6c0fb feat(memory): backfill past sessions from Control UI (#115266)
* feat(memory): expose session backfill gateway methods

* feat(ui): add session memory backfill controls

* fix(memory): keep session backfill internals private
2026-07-28 12:57:21 -04:00
WhatsSkiLL bb06e0fbcc fix(memory-core): recover dreaming cron reconciliation (#115174)
Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
2026-07-28 11:51:34 -04:00
Peter Steinberger 10c6c0cb98 fix(memory-core): dream diary stays empty because narrative sessions have no agent scope (#115069)
* fix(memory-core): scope dream narrative sessions to their owning agent

Dreaming narratives built unscoped subagent session keys
(`dreaming-narrative-<phase>-<hash>`). Sessions live in per-agent SQLite
stores, so the plugin-runtime ownership pre-check could not resolve a store
and every narrative call failed with "Cannot resolve SQLite session scope
without an agent id" — the whole diary pipeline produced nothing while the
sweep still logged "dreaming promotion complete".

The agent id was available all along: `resolveMemoryDreamingWorkspaces`
returns it per workspace and the hook context carries the triggering agent.
Both were dropped. Session keys are now `agent:<id>:dreaming-narrative-...`,
while runIds stay unscoped so the orphan-transcript scrub marker still
matches. An unexpected narrative failure now writes the same dated fallback
diary entry the other failure branches write, and the promotion summary
warns instead of informing when every workspace failed.

* fix(memory-core): narrow the narrative export surface and type the sweep test double

* test(memory-core): drop the now-unused missing-path helper

* fix(memory-core): scope the narrative run id and keep empty sweeps a no-op

* fix(memory-core): route the ownerless narrative fallback through detached dispatch
2026-07-28 08:15:37 -04:00
Peter Steinberger f0bf74bad4 feat(memory): backfill retained session transcripts (#115162)
* feat(memory): enumerate retained session transcripts

* feat(memory): add session transcript backfill

* test(memory): cover session backfill workflows

* docs(memory): document session transcript backfill

* fix(memory): preserve oldest session backfill ordering

* fix(memory): harden session archive backfill

* test(memory): prove owner-turn provenance gating

* fix(memory): persist session backfill progress

* fix(memory): preserve ranged backfill progress

* fix(memory): order per-file backfill candidates

* fix(memory): retain paged backfill diary entries

* fix(memory): preserve rem backfill diary history

* fix(memory): adapt backfill to retained session identity

* fix(memory): keep rem backfill preview-only

* fix(memory): satisfy backfill CI guards
2026-07-28 08:12:30 -04:00