Commit Graph

35 Commits

Author SHA1 Message Date
Yuval Dinodia 623a015928 fix(memory-wiki): preserve user edits when rolling back ChatGPT imports (#116517)
* fix(memory-wiki): preserve user edits when rolling back ChatGPT imports

Rollback deleted created pages and overwrote updated pages unconditionally,
destroying content the user added after the import with no recovery copy.
Import runs now record a content hash of each written page after vault
compile, and rollback preserves any page whose current content no longer
matches into the run's recovered directory before deleting or restoring.
Legacy run records without hashes preserve unconditionally.

Fixes #116457

* fix(memory-wiki): move pages aside atomically during rollback

Rollback now renames the live page into the recovery location before
inspecting it, so a concurrent external save cannot land between the
content read and the delete or snapshot restore. Matching pages drop
the moved copy; mismatching pages keep it as the recovery file.

* fix(memory-wiki): make rollback snapshot restore collision-safe

The snapshot restore wrote directly to the page path after the
move-aside, so a page recreated by an editor in that window was
overwritten with no recovery copy. Restore now creates the snapshot
exclusively and on collision moves the recreated page aside and
retries; recovery filenames are uniqued so a second move-aside cannot
clobber an earlier preserved copy.

* fix(memory-wiki): record rollback hashes at write time

* fix(memory-wiki): make ChatGPT rollback retry-safe

* fix(memory-wiki): fence ChatGPT rollback phases

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 08:01:52 +00:00
Peter Steinberger f81f9d8570 chore: enforce max-lines suppression ratchet (#107315)
* ci: enforce max-lines suppression ratchet

* chore: prune stale max-lines suppression

* fix: close max-lines ratchet enforcement gaps

* fix: harden max-lines ratchet checks

* fix(ci): satisfy max-lines ratchet checks

* style: format max-lines declarations

* fix(ci): match oxlint suppression grammar

* test: isolate max-lines git fixtures

* chore: prune resolved max-lines debt

* test: skip newline path fixture on Windows

* fix: harden max-lines suppression ratchet

* chore: refresh max-lines baseline

* fix: close max-lines ratchet bypasses

* fix: derive ratchet base from PR merge tree

* fix: support older Git in staged ratchet

* fix: align max-lines declarations and baseline

* chore: refresh max-lines baseline for current main

* fix: exclude generated wizard locales from max-lines

* chore: prune resolved max-lines debt
2026-07-14 09:27:02 -07:00
Peter Steinberger bdc91cb4af refactor(memory-wiki): trim internal exports (#107157) 2026-07-13 22:19:01 -07:00
Peter Steinberger 2237196871 refactor(extensions): remove dead QA and utility exports (#105914)
* refactor(extensions): remove dead QA and utility exports

* refactor(extensions): trim Matrix QA internal exports

* chore(deadcode): refresh extension export baseline

* chore(ci): reconcile deadcode and LOC baselines

* chore(deadcode): refresh baseline after main advance

* chore(deadcode): refresh baseline after main advance

* refactor(plugins): keep channel snapshot type private

* fix(ci): align Linux deadcode baseline
2026-07-13 00:34:46 -07:00
pick-cat 2894a42a3f fix(memory-wiki): keep terminal truncation UTF-16 safe (#103178)
Use the canonical plugin SDK UTF-16 helper at the rendered Gateway status boundary and exercise the real status output path at a split surrogate.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-10 10:15:17 +01:00
Peter Steinberger 98b8c8c4ae feat(memory-wiki): isolate vaults per agent (#103349)
* feat(memory-wiki): isolate per-agent vaults

Refs #63829.

Co-authored-by: SunnyShu <shu.zongyu@xydigit.com>

* fix(memory-wiki): scope agent status metadata

Refs #103088 and #103196.

Co-authored-by: SunnyShu <shu.zongyu@xydigit.com>

---------

Co-authored-by: SunnyShu <shu.zongyu@xydigit.com>
2026-07-10 05:19:13 +01:00
Vincent Koc e242c61400 refactor(deadcode): localize extension helpers (#101860) 2026-07-07 12:12:32 -07:00
Vincent Koc 4cf4e54179 feat(memory-wiki): import OKF bundles 2026-06-13 19:27:52 +08:00
Peter Steinberger 96e5812426 docs: document medium extension sources 2026-06-04 21:33:54 -04:00
Peter Steinberger 3430a2d26f fix(memory-wiki): centralize cli line option parsing 2026-05-29 06:16:44 -04:00
Peter Steinberger 0786f586af fix: parse memory wiki cli numbers strictly 2026-05-28 14:49:02 -04:00
Peter Steinberger d569e41c58 fix(memory): reject invalid CLI numeric options
Fixes memory CLI numeric parsing bugs found by clawpatch.

- memory CLI numeric options now reject non-finite values before command runtime.
- wiki apply `--confidence` now enforces the documented 0..1 range before metadata mutation.
- Commander parse-error UX is preserved without importing `commander` at bundled plugin runtime.

Proof:
- `node scripts/run-vitest.mjs extensions/memory-core/src/cli.test.ts extensions/memory-wiki/src/cli.test.ts`
- `pnpm exec oxfmt --check --threads=1 extensions/memory-core/src/cli.ts extensions/memory-core/src/cli.test.ts extensions/memory-wiki/src/cli.ts extensions/memory-wiki/src/cli.test.ts`
- `git diff --check`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main`
- Real CLI proof: invalid memory `--max-results` and wiki `--confidence` both fail with Commander parse errors before actions run.
- GitHub PR checks green: 67 success, 29 skipped, 1 neutral.
2026-05-26 22:42:48 +01:00
Peter Steinberger 77d9ac30bb refactor: reuse shared coercion helpers (#86419)
* refactor: share talk event metric extraction

* refactor: reuse shared coercion helpers

* refactor: reuse shared primitive guards

* refactor: reuse shared record guard

* refactor: reuse shared primitive helpers

* refactor: reuse shared string guards

* refactor: reuse shared non-empty string guard

* refactor: share plugin primitive coercion helpers

* refactor: reuse plugin coercion helpers

* refactor: reuse plugin coercion helpers in more plugins

* refactor: reuse channel coercion helpers

* refactor: reuse monitor coercion helpers

* refactor: reuse provider coercion helpers

* refactor: reuse core coercion helpers

* refactor: reuse runtime coercion helpers

* refactor: reuse helper coercion in codex paths

* refactor: reuse helper coercion in runtime paths

* refactor: reuse codex app-server coercion helpers

* refactor: reuse codex record helpers

* refactor: reuse migration and qa record helpers

* refactor: reuse feishu and core helper guards

* refactor: reuse browser and policy coercion helpers

* refactor: reuse memory wiki record helper

* refactor: share boolean coercion helpers

* refactor: reuse finite number coercion

* refactor: reuse trimmed string list helpers

* refactor: reuse string list normalization

* refactor: reuse remaining string list helpers

* refactor: reuse string entry normalizer

* refactor: share sorted string helpers

* refactor: share string list normalization

* test: preserve command registry browser imports

* refactor: reuse trimmed list helpers

* refactor: reuse string dedupe helpers

* refactor: reuse local dedupe helpers

* refactor: reuse more string dedupe helpers

* refactor: reuse command string dedupe helpers

* refactor: dedupe memory path lists with helper

* refactor: expose string dedupe helpers to plugins

* refactor: reuse core string dedupe helpers

* refactor: reuse shared unique value helpers

* refactor: reuse unique helpers in agent utilities

* refactor: reuse unique helpers in config plumbing

* refactor: reuse unique helpers in extensions

* refactor: reuse unique helpers in core utilities

* refactor: reuse unique helpers in qa plugins

* refactor: reuse unique helpers in memory plugins

* refactor: reuse unique helpers in channel plugins

* refactor: reuse unique helpers in core tails

* refactor: reuse unique helper in comfy workflow

* refactor: reuse unique helpers in test utilities

* refactor: expose unique value helper to plugins

* refactor: reuse unique helpers for numeric lists

* refactor: replace index dedupe filters

* refactor: reuse string entry normalization

* refactor: reuse string normalization in plugin helpers

* refactor: reuse string normalization in extension helpers

* refactor: reuse string normalization in channel parsers

* refactor: reuse string normalization in memory search

* refactor: reuse string normalization in provider parsers

* refactor: reuse string normalization in qa helpers

* refactor: reuse string normalization in infra parsers

* refactor: reuse string normalization in messaging parsers

* refactor: reuse string normalization in core parsers

* refactor: reuse string normalization in extension parsers

* refactor: reuse string normalization in remaining parsers

* refactor: reuse string normalization in final parser spots

* refactor: reuse string normalization in qa media helpers

* refactor: reuse normalization in provider and media lists

* refactor: reuse normalization for remaining set filters

* refactor: reuse normalization in policy allowlists

* refactor: reuse normalization in session and owner lists

* refactor: centralize primitive string lists

* refactor: reuse lowercase entry helpers

* refactor: reuse sorted string helpers

* refactor: reuse unique trimmed helpers

* refactor: reuse string normalization helpers

* refactor: reuse catalog string helpers

* refactor: reuse remaining string helpers

* refactor: simplify remaining list normalization

* refactor: reuse codex auth order normalization

* chore: refresh plugin sdk api baseline

* fix: make shared string sorting deterministic

* chore: refresh plugin sdk api baseline

* fix: align host env security ordering
2026-05-25 21:20:41 +01:00
Peter Steinberger 3059702687 feat(memory-wiki): add agent-facing people wiki metadata 2026-04-29 20:17:37 +01:00
Vincent Koc e2f3044b8f fix(memory-wiki): route bridge CLI through gateway
Route Memory Wiki bridge-mode status, doctor, and bridge import CLI paths through Gateway RPC when bridge artifact reads are active, while preserving local/offline fallbacks.

Harden Gateway CLI rendering and imported-source writes: validate RPC response shapes, bound response strings before rendering/JSON serialization, sanitize/escape terminal-controlled output, avoid redundant JSON forwarding, and replace imported source pages through a temp-file rename path with symlink and hardlink regressions.

Fixes #65722
Fixes #65976
Fixes #66082
Fixes #67979
Fixes #68371
Fixes #68828
Fixes #69019
Fixes #70181
Fixes #70242
Fixes #70842

Thanks @moorsecopers99, @vincentkoc, and @prasad-yashdeep.
2026-04-28 03:22:12 -07:00
Mariano 64693d2e96 [codex] Dreaming: surface memory wiki imports and palace (#64505)
Merged via squash.

Prepared head SHA: 12d5e37222
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-11 07:04:08 +02:00
Vincent Koc 947a43dae3 feat(memory-wiki): add belief-layer digests and compat migration 2026-04-07 08:56:24 +01:00
Peter Steinberger 5f7fa588db refactor: dedupe memory wiki cli summary runners 2026-04-06 22:21:01 +01:00
Peter Steinberger 1b9a1328a1 refactor: dedupe memory wiki cli result formatting 2026-04-06 20:45:31 +01:00
Peter Steinberger 23d4aec907 refactor: dedupe memory wiki cli helpers 2026-04-06 20:45:31 +01:00
Vincent Koc 5716d83336 feat(memory-wiki): restore llm wiki stack 2026-04-06 04:56:52 +01:00
Vincent Koc 94256ea1a0 revert(memory-wiki): back out llm wiki stack 2026-04-05 22:44:20 +01:00
Vincent Koc 64f889cd4b feat(memory-wiki): allow per-call search corpus overrides 2026-04-05 22:34:02 +01:00
Vincent Koc cd564bf5a5 feat(memory-wiki): surface imported source provenance 2026-04-05 22:34:01 +01:00
Vincent Koc 00372508b5 feat(memory-wiki): add shared memory search bridge 2026-04-05 22:34:01 +01:00
Vincent Koc ca94f02959 feat(memory-wiki): add import gateway methods 2026-04-05 22:34:01 +01:00
Vincent Koc 5a6d80da7f feat(memory-wiki): add wiki doctor diagnostics 2026-04-05 22:34:01 +01:00
Vincent Koc afb89b439a feat(memory-wiki): add wiki apply cli commands 2026-04-05 22:34:01 +01:00
Vincent Koc a213a580d5 feat(memory-wiki): auto-refresh indexes after imported sync 2026-04-05 22:34:01 +01:00
Vincent Koc a78c4de737 feat(memory-wiki): make imported source sync incremental 2026-04-05 22:34:01 +01:00
Vincent Koc 7b62fcd87d feat(memory-wiki): add unsafe-local source sync 2026-04-05 22:34:01 +01:00
Vincent Koc fbbe2a1675 feat(memory-wiki): add bridge sync and obsidian cli adapter 2026-04-05 22:34:01 +01:00
Vincent Koc 82710f2add feat(memory-wiki): add wiki search and get surfaces 2026-04-05 22:34:01 +01:00
Vincent Koc 516a43f9f2 feat(memory-wiki): add ingest compile lint pipeline 2026-04-05 22:34:01 +01:00
Vincent Koc 57d1685a65 feat(memory-wiki): scaffold wiki vault plugin 2026-04-05 22:34:01 +01:00