80 Commits

Author SHA1 Message Date
Rohit Ghumare 798700f2a3 chore: bump version to 0.8.0 v0.8.0 2026-04-09 09:07:57 +01:00
Rohit Ghumare 6894843a92 docs: add MiniMax provider, ANTHROPIC_BASE_URL, search project filter
- LLM Providers table: add MiniMax, note ANTHROPIC_BASE_URL support
- Env vars: add MINIMAX_API_KEY, MINIMAX_MODEL, ANTHROPIC_BASE_URL
- Search endpoint: note optional project/cwd filters
- Fallback chain example: include minimax
2026-04-09 09:06:56 +01:00
Rohit Ghumare cdb06bb5a5 Merge pull request #103 from Garygaoxiang/feat/minimax-provider-and-anthropic-base-url
feat: add MiniMax provider and fix ANTHROPIC_BASE_URL not passed to SDK
2026-04-09 09:04:39 +01:00
Rohit Ghumare 7d644491d1 Merge pull request #105 from Getty/feat/search-project-filter
feat(search): add optional project/cwd filter to mem::search and /agentmemory/search
2026-04-09 09:04:37 +01:00
Rohit Ghumare 6614d0c9d7 Merge pull request #102 from rohitg00/feat/dx-improvements
feat: DX improvements — dark mode, status command, memory previews
2026-04-09 08:58:54 +01:00
Rohit Ghumare 4c1184b185 fix: address review findings on DX improvements
- README: add `text` language tag to fenced code blocks (MD040)
- cli.ts: sessions endpoint returns {sessions: [...]}, not a raw array
- viewer: token budget from URL param instead of hardcoded 2000
- viewer: applyTheme takes persist param, auto-detection doesn't save to
  localStorage (prevents OS preference from being overridden on first load)
2026-04-09 08:53:40 +01:00
Torsten Raudssus d145b0e3ab perf(search): load observations in parallel after session filter
Address CodeRabbit nitpick on #105: split the result-building loop into
two phases. First filter sequentially (benefits from the per-call
session cache), then batch the kv.get(observations) calls through
Promise.all instead of awaiting them one at a time.
2026-04-09 05:17:32 +02:00
Torsten Raudssus 26fea3a675 fix(search): validate inputs and avoid logging raw paths
Address CodeRabbit review on #105:

- mem::search now validates query (non-empty string), limit
  (positive integer, capped at MAX_LIMIT=100), project and cwd
  (must be strings if provided). Throws on invalid input instead
  of silently coercing.
- Renamed local 'limit' to 'effectiveLimit' to avoid shadowing.
- ctx.logger no longer emits raw cwd/project (host paths) — logs
  only hasProjectFilter/hasCwdFilter booleans.
- api::search whitelists request body fields, returns 400 on
  malformed input, and constructs an explicit payload for
  sdk.trigger instead of forwarding req.body.
2026-04-09 05:01:56 +02:00
Torsten Raudssus a732ad1e23 feat(search): add optional project/cwd filter to mem::search and /agentmemory/search
Closes #104

The /agentmemory/search HTTP endpoint and the underlying mem::search
function previously accepted only { query, limit }, returning hits
across all projects on the host. Sessions are already created with
{ project, cwd } via session::start, so this just exposes that scope
on search.

- mem::search now accepts optional project and cwd. When set, results
  are filtered by looking up each hit's owning Session.
- To keep the post-filter from starving the result set, the index
  fetch is over-fetched (max(limit*10, 100)) when filtering, then
  trimmed to limit after filter.
- Session lookups are cached per call.
- api::search forwards the new params; fully backward compatible.
2026-04-09 04:29:46 +02:00
翔 高 ab0901f25d feat: add MiniMax provider and fix ANTHROPIC_BASE_URL not passed to SDK
- Add `MinimaxProvider` (`src/providers/minimax.ts`) that calls MiniMax's
  Anthropic-compatible API via raw `fetch` instead of the Anthropic SDK.
  The SDK auto-injects `x-stainless-*` headers that MiniMax rejects with 403;
  using `fetch` directly avoids this entirely.

- Fix `AnthropicProvider` constructor to accept an optional `baseURL` and
  forward it to `new Anthropic({ apiKey, baseURL })`.  Previously the provider
  always connected to `api.anthropic.com` even when `ANTHROPIC_BASE_URL` was
  set in `.env`, because `getMergedEnv()` returns a plain JS object that the
  Anthropic SDK never sees.

- `detectProvider()` in `config.ts`:
  - Checks `MINIMAX_API_KEY` first and returns `provider: "minimax"`.
  - Propagates `ANTHROPIC_BASE_URL` as `baseURL` in the Anthropic config.

- Update `ProviderConfig` in `types.ts` to include optional `baseURL` field.
- Update `ProviderType` union to include `"minimax"`.
- Update `VALID_PROVIDERS` set in `config.ts` to include `"minimax"`.
2026-04-09 09:11:03 +08:00
Rohit Ghumare 75a2d35ed6 feat: DX improvements — dark mode, status command, memory previews, token savings
Viewer:
- Dark mode toggle (persists to localStorage, respects prefers-color-scheme)
- Fix hardcoded canvas colors for dark theme (grid, labels, tooltips)
- Memory search shows 2-line content preview with search term highlighting
- Concept tags shown inline on memory cards (max 4)
- Token Savings stat card on dashboard (estimates savings vs full context)

CLI:
- New `agentmemory status` command — shows connection, health, sessions,
  graph stats, viewer URL without opening browser

README:
- SkillKit universal install: `npx skillkit install agentmemory` (32+ agents)
- "First Steps After Install" section with worked Session 1 → Session 2 example
- Shows actual compressed observation format and context injection
- "How to verify" checklist
2026-04-09 00:18:27 +01:00
Rohit Ghumare 8c1890e64e revert: keep original banner.png, remove banner.svg 2026-04-08 17:57:50 +01:00
Rohit Ghumare 0e4a57570e assets: add SVG logo, icon, and banner
- logo.svg: full logo mark with memory tiers + retrieval spark
- icon.svg: compact 64x64 app icon variant
- banner.svg: README banner with tagline, stats, supported agents
- README: switch from banner.png to banner.svg

Design: 4 memory tiers (cold→hot) with orange accent (#FF6B35),
retrieval lines converging to a spark node, fading dots for decay.
2026-04-08 13:13:17 +01:00
Rohit Ghumare 29cbaa7624 chore: bump version to 0.7.9 v0.7.9 2026-04-08 10:52:30 +01:00
Rohit Ghumare e6366e5c03 fix: skills path ./skills/ instead of ../skills/ (#94)
Claude Code resolves skill paths relative to the plugin root (the
directory containing .claude-plugin/), not relative to plugin.json.
2026-04-08 10:51:56 +01:00
Rohit Ghumare 4ce4003a10 docs: lead with outcomes, not architecture
Rewrite README opening to focus on what the user gets ("your agent
remembers everything, no more re-explaining") instead of internal
architecture ("triple-stream retrieval, 4-tier consolidation").
2026-04-08 10:35:31 +01:00
Rohit Ghumare 185a784ba7 Merge pull request #101 from Tanmay-008/ui/graph-viewer
Thanks @Tanmay-008! Nice UI improvements to the graph viewer.
2026-04-08 10:29:51 +01:00
Rohit Ghumare 805620aca1 chore: bump version to 0.7.8 v0.7.8 2026-04-08 10:28:11 +01:00
Rohit Ghumare 740c7b90a1 fix: plugin hooks and skills validation errors (#100)
- hooks.json: wrap each hook in { hooks: [{ type, command }] } format
  (Claude Code expects nested hooks array, not flat type/command)
- plugin.json: change skills from explicit file paths to directory
  reference ["../skills/"] matching working plugin convention
2026-04-08 10:27:25 +01:00
Rohit Ghumare 61d0c43798 docs: update agent references — Gemini CLI, OpenCode, Cursor over Windsurf
Replace Windsurf with Gemini CLI and OpenCode in Quick Start, Supported
Agents, and MCP sections. Add concrete setup commands for each agent.
2026-04-08 10:25:07 +01:00
Rohit Ghumare 57b0eeebfa docs: update README with LongMemEval results and fix inconsistencies
- Lead with 95.2% R@5 on LongMemEval-S (ICLR 2025) instead of old 64% internal number
- Add LongMemEval benchmark table to README benchmarks section
- Fix Quick Start: reorder to start→connect→verify, add MCP configs for
  Cursor/Windsurf/Claude Desktop/REST API (not just Claude Code plugin)
- Fix version in health example (0.7.4 → 0.7.7)
- Fix test count (627 → 646)
- Fix source file count (113 → 118)
- Fix LOC count (~20,000 → ~21,800)
- Fix function count (89 → 123 mem:: functions)
- Fix MCP tools table header (38 → 43)
- Fix MCP tools reference in chooser table (41 → 43)
- Cross-reference LongMemEval from QUALITY.md
2026-04-08 10:24:24 +01:00
Rohit Ghumare 565c2388a2 bench: add LongMemEval-S benchmark (95.2% R@5 hybrid, 86.2% BM25) (#91)
Run agentmemory on LongMemEval-S (ICLR 2025, 500 questions) using the
same dataset and metric (recall_any@5) as MemPalace for direct comparison.

Results:
- BM25+Vector hybrid: 95.2% R@5, 98.6% R@10, 87.9% NDCG@10
- BM25-only: 86.2% R@5, 94.6% R@10, 73.0% NDCG@10
- MemPalace raw vector: 96.6% R@5 (1.4pp gap, same embedding model)

Clearly labels these as retrieval recall, not end-to-end QA accuracy.
2026-04-08 10:17:28 +01:00
tanmaishi 3652276448 ui(viewer): update graph interface with grid, zoom, and glow effects 2026-04-08 13:36:42 +05:30
Rohit Ghumare 8704131745 chore: bump version to 0.7.7 v0.7.7 2026-04-07 19:56:12 +01:00
Rohit Ghumare fbded55b29 fix: plugin.json validation errors (#94)
- author: change from string to object {name, url}
- hooks: remove field (auto-loaded by convention from hooks/hooks.json)
- skills: change from directory string to explicit file path array
v0.7.6
2026-04-07 19:54:13 +01:00
Rohit Ghumare b81682da8b chore: bump version to 0.7.6 2026-04-07 19:43:17 +01:00
Rohit Ghumare 69bb787629 feat: cross-encoder reranking, working memory, skill extraction (#93)
* feat: cross-encoder reranking, working memory, skill extraction (#90, #58, #57)

- reranker.ts: opt-in cross-encoder rerank after hybrid search via
  RERANK_ENABLED=true, uses @xenova/transformers MiniLM-L-6-v2,
  graceful fallback when unavailable
- working-memory.ts: core memory (pinned facts always in context) +
  auto-paging of archival memories by importance/recency/access score,
  5 new functions (core-add, core-remove, core-list, working-context,
  auto-page)
- skill-extract.ts: auto-generate reusable procedural skills from
  completed sessions via LLM, with reinforcement on re-extraction,
  skill-match for querying relevant skills (3 new functions)
- ProceduralMemory type extended with expectedOutcome, tags, concepts,
  sourceObservationIds
- 19 new tests, 646 total passing

Closes #90, closes #58, closes #57

* fix: add 0.8.0 to supported import versions, bump plugin.json

* fix: address CodeRabbit review — audit, fingerprint, guards, archive

- skill-extract: reject non-completed sessions, fingerprint full
  procedure (title+trigger+steps) not just title, audit reinforcement
- working-memory: add recordAudit for core-add/core-remove/auto-page,
  auto-page now archives to KV.memories instead of deleting
- reranker: cache pipelineUnavailable to avoid repeated import retries
- hybrid-search: rerank over larger pool (max(limit,20)) then slice
- types: add skill_extract/core_add/core_remove/auto_page to AuditEntry

* fix: address remaining CodeRabbit review findings

- Parse RERANK_ENABLED with === "true" instead of truthy coercion
- Remove unused project param from mem::skill-list
- Remove unused sessionId/project/query params from mem::working-context
- Use generateId("mem") for archived core entries to avoid ID collision

* fix: address CodeRabbit round-2 findings

- Make skill reinforcement idempotent (skip if sessionId already present)
- Parallelize summary + observations fetch in skill-extract
- Use continue instead of break for oversized unpinned core entries
- Buffer access-counter writes with Promise.allSettled (non-blocking)
- Decouple rerank window (fixed 20) from retrieval depth
2026-04-07 19:42:07 +01:00
Tanmay Shirbhayye 57bf5f136c fix: update graph viewer env variable instruction (#97)
* fix: update graph viewer env variable instruction

* Delete pnpm-lock.yaml

---------

Co-authored-by: tanmaishi <tanmays@>
2026-04-07 18:44:50 +01:00
Rohit Ghumare ea2eddce83 chore: bump version to 0.7.5 v0.7.5 2026-04-07 16:27:50 +01:00
Rohit Ghumare 9d607c1c37 fix: resolve 6 installation bugs breaking fresh setup (#95)
- Update zod from ^3.23.0 to ^4.0.0 (claude-agent-sdk peer dep conflict)
- Mount iii-config.yaml in docker-compose.yml (missing /app/config.yaml)
- Change host binding from 127.0.0.1 to 0.0.0.0 for Docker compatibility
- Switch npm start from index.mjs to cli.mjs (auto-starts iii-engine)
- Fix CLI health check to detect engine via any HTTP response, not just worker route
- Handle EADDRINUSE on viewer port gracefully instead of crashing
- Fix README step numbering and version in health example
2026-04-07 16:25:28 +01:00
Rohit Ghumare 1fa0dcefab chore: bump version to 0.7.4 v0.7.4 2026-04-06 16:18:04 +01:00
Rohit Ghumare 9c27eff610 feat: implement reflect — auto-synthesize insights from memory clusters (#89)
Adds mem::reflect: traverses knowledge graph, groups related memories
by concept clusters, synthesizes higher-order insights via LLM.

New files:
- src/prompts/reflect.ts — LLM prompt for insight synthesis
- src/functions/reflect.ts — 4 functions: reflect, insight-list,
  insight-search, insight-decay-sweep
- test/reflect.test.ts — 13 tests

New type: Insight (confidence-scored, fingerprint-deduped, decayable)
New KV scope: mem:insights
New MCP tools: memory_reflect, memory_insight_list (in ESSENTIAL set)
New REST: POST /reflect, GET /insights, POST /insights/search
Hooks into consolidation pipeline as "reflect" tier after semantic

Review fixes applied:
- Fixed project filter no-op (was discarding filter result)
- Fixed BFS depth tracking (standard level-count pattern)
- Added attribute-order constraint to LLM prompt
- Whitelisted fields in api::insight-search (no raw body passthrough)
- Fixed Jaccard fallback to compare document-id sets not concept strings

43 MCP tools, 103 REST endpoints, 627 tests passing
2026-04-06 16:08:34 +01:00
Rohit Ghumare 034869b42c chore: bump version to 0.7.3 v0.7.3 2026-04-06 15:38:10 +01:00
Rohit Ghumare b597e639bd feat: viewer Actions + Crystals tabs (#88)
Actions tab:
- List view with status badges, priority, tags
- Status filter dropdown (pending/active/done/blocked/cancelled)
- Search across title, description, tags
- Frontier actions highlighted with lightning bolt
- Parallel fetch of actions + frontier data

Crystals tab:
- Card layout with narrative, key outcomes, lessons
- Files affected and source action IDs
- Reuses dashboard crystals data to avoid duplicate fetch
- Search across narrative, outcomes, lessons

Review fixes applied:
- Declared frontier: [] in state init
- Sort on copy (items.slice().sort) not in-place
- Escaped tags with .map(esc)
- Guarded c.keyOutcomes/c.lessons/c.narrative with || [] in search
- Reuse dashboard crystals to avoid duplicate API call

614 tests passing
2026-04-06 13:28:07 +01:00
Rohit Ghumare 5510e94e39 fix: simplify review — temporal-graph name, test precision, stale counts
- Fix README: temporal-graph → temporal-graph-extract + temporal-query
- Fix test precision: toBeCloseTo(0.55, 1) → precision 2 (±0.005)
- Fix stale test counts: 581 → 614 across README and AGENTS.md
- Add obsidian export error-path test (errors undefined on success)

614 tests passing
2026-04-06 13:17:48 +01:00
Rohit Ghumare 1717083bff docs: complete function table — 89 functions organized by category
Fixes #92

Replaced flat 57-row table with categorized table covering all 89
mem:: functions. Organized into 22 categories: Core Memory, Search,
Memory Evolution, Knowledge Graph, Actions, Leases, Routines, Signals,
Checkpoints, Mesh, Sentinels, Sketches, Crystals, Lessons, Facets,
Diagnostics, Flow, Branch, Team, Governance, Snapshots, Export.
2026-04-06 12:41:50 +01:00
Rohit Ghumare 45eb99d656 fix: CrystallizableAction type, npm package size, add lesson + obsidian tests
Fixes #84: Change CrystallizableAction to Action in crystallize.ts:157
Fixes #85: Add "files" field to package.json (40MB → 11.6MB)
Fixes #86: Add 22 tests for all 5 lesson functions
Fixes #87: Add 10 tests for obsidian-export

613 tests passing (was 581)
2026-04-06 12:20:20 +01:00
Rohit Ghumare 031eff7322 chore: bump version to 0.7.2 across all files v0.7.2 2026-04-05 11:32:15 +01:00
Rohit Ghumare e26320e3aa feat: auto-install iii-engine, clack CLI, viewer lessons tab, README update
CLI (src/cli.ts):
- Auto-install iii-engine via curl | sh with interactive clack/prompts
- Edge cases: Windows (manual install note), curl missing, PATH fallback
- Error shows all install methods: curl | sh, cargo install, Docker
- Spinner feedback for install, engine start, readiness check

Viewer (src/viewer/index.html):
- Version v0.5.0 → v0.7.0
- Added Lessons tab with search, confidence gauges, source badges
- Added Lessons + Crystals stat cards to dashboard
- Dashboard fetches lessons and crystals data

README:
- Quick start is now single command: npx @agentmemory/agentmemory
- Prerequisites: iii-engine via curl | sh (not npm)
- Updated all stale counts and version references

AGENTS.md: test count 573 → 581

581 tests passing, all builds clean
2026-04-05 11:28:49 +01:00
Rohit Ghumare ed6f1d64d5 docs: update README for v0.7.0 — npm install, lessons, obsidian, correct counts
- Add `npm install -g @agentmemory/agentmemory` as primary install method
- Add npx agentmemory to Quick Start
- Fix stale counts: 38→41 tools, 93→100 endpoints, 573→581 tests,
  105→113 source files, 16K→20K LOC, 33→34 KV scopes, 52→57 functions
- Fix version in health example: 0.6.1→0.7.1
- Add v0.7.0 functions to table: lesson-save/recall/list/strengthen/decay-sweep, obsidian-export
- Add mem:lessons to KV scopes table
- Add 5 new REST endpoints to API table
- Add v0.7.0 env vars: LESSON_DECAY_ENABLED, OBSIDIAN_AUTO_EXPORT, AGENTMEMORY_TOOLS
- Update CONSOLIDATION_ENABLED example to true (opt-in)
- Update Node.js requirement to >=20
- Update export format reference to include v0.7.0 + lessons
2026-04-05 01:10:18 +01:00
Rohit Ghumare d3477c4592 fix: add repository.url for npm provenance verification v0.7.1 2026-04-05 01:02:22 +01:00
Rohit Ghumare 241504e5e0 fix: scope npm package as @agentmemory/agentmemory (#83)
npm rejected unscoped 'agentmemory' as too similar to existing
'agent-memory'. Publishing under the @agentmemory org scope.
2026-04-04 18:33:02 +01:00
Rohit Ghumare e8f410b537 feat: v0.7.0 — lessons, tool visibility, auto-consolidation, obsidian export, npx bootstrap (#82)
* feat: v0.7.0 — lessons, tool visibility, auto-consolidation, obsidian export, npx bootstrap

Five DX improvements based on competitive research against Mem0, Engram, CodeMem:

1. `npx agentmemory` zero-config startup
   - New CLI bootstrap (src/cli.ts) auto-detects and starts iii-engine
   - Tries `iii` binary first, falls back to `docker compose up -d`
   - Bundles iii-config.yaml and docker-compose.yml in dist/

2. Simplified MCP tool surface (7 core tools by default)
   - AGENTMEMORY_TOOLS=all unlocks all 49 tools
   - Default: save, recall, consolidate, forget, sessions, diagnose, lesson_save
   - Call handler remains unfiltered — any tool callable by name

3. Auto-consolidation on session end
   - CONSOLIDATION_ENABLED defaults to true (was false)
   - Session-end hook: session/end → crystallize → consolidate → bridge sync
   - Consolidation pipeline always registered (timer gated by config)

4. First-class lesson memory type with confidence decay
   - Lesson interface: confidence (0-1), reinforcements, decayRate, source
   - 5 functions: lesson-save, lesson-recall, lesson-list, lesson-strengthen, lesson-decay-sweep
   - Dedup via SHA-256 fingerprint — duplicate saves strengthen existing
   - Crystal lessons auto-flow into lesson system at confidence 0.6
   - Daily decay sweep with parallel KV writes

5. Obsidian-compatible Markdown export
   - Export to ~/.agentmemory/vault/ with YAML frontmatter + wikilinks
   - MOC.md (Map of Content) index file
   - Parallel KV reads, auto-export via OBSIDIAN_AUTO_EXPORT=true

Stats: 49 MCP tools, 99 REST endpoints, 573 tests passing

* docs: add AGENTS.md, fix tool/endpoint counts across README, plugin, cli

- Create AGENTS.md with strict consistency rules for MCP tools, REST
  endpoints, versions, KV scopes, and audit operations
- Fix MCP tool count: 38 → 41 across README.md (4 occurrences)
- Fix REST endpoint count: 93/95 → 99 across README.md and index.ts
- Fix plugin.json: version 0.6.1 → 0.7.0, tool count 5 → 41
- Fix cli.ts help text: 48+ → 41 MCP tools
- Fix README api.ts path reference → triggers/api.ts

* fix: address code review findings — consolidation guard, decay bug, async fs, export-import lessons

Inline fixes:
- Revert CONSOLIDATION_ENABLED to opt-in (=== "true"), matching original behavior
- Add early-exit guard in consolidation-pipeline handler when disabled
- Gate session-end crystallize+consolidation calls on CONSOLIDATION_ENABLED
- Fix lesson decay over-decay bug: add lastDecayedAt to Lesson, compute
  incremental delta instead of reapplying full age every sweep run
- Add LESSON_DECAY_ENABLED flag (default true) to gate the sweep timer

Outside diff fixes:
- Add lessons to export-import (export + import + replace cleanup)
- Log warning instead of swallowing obsidian auto-export errors

Nitpick fixes:
- Switch obsidian-export to async fs/promises (mkdir, writeFile)
- Add per-item try/catch in obsidian-export, return errors array
- Replace governance_delete with smart_search in ESSENTIAL_TOOLS (non-destructive default)
- Fix CLI whichBinary for Windows (uses "where" on win32)
- Use dynamic port in CLI error message instead of hardcoded 3111
- Return 201 for newly created lessons, 200 for strengthened
- Wrap lesson audit calls in try/catch so audit failure doesn't surface
- Fix build script to not swallow tsdown failure
- Remove exact tool count from test, use >=41 + uniqueness + required names
- Add test/consistency.test.ts: validates version, tool count, README consistency
- Add isConsolidationEnabled mock to consolidation-pipeline test

579 tests passing (573 original + 6 new consistency checks)

* fix: guard remaining audit calls, correct endpoint count, add CI + npm publish

Review fixes:
- Wrap lesson_recall and lesson_strengthen audit calls in try/catch
- Fix REST endpoint count: 99 → 100 (verified via grep) across index.ts,
  README.md, and AGENTS.md
- Use regex in consistency test for README assertions (flexible phrasing)
- Add consolidation gate tests: disabled returns early, force=true bypasses

CI/CD:
- Add .github/workflows/ci.yml — test on Node 18/20/22
- Add .github/workflows/publish.yml — auto-publish to npm on GitHub release
  (uses NPM_TOKEN secret + provenance)

Nitpick:
- Single-char term filter (t.length > 1) kept intentionally — prevents noise
  from single-letter matches; documented in AGENTS.md if needed

581 tests passing

* fix(ci): add --legacy-peer-deps for zod v3/v4 peer conflict

@anthropic-ai/claude-agent-sdk@0.2.56 requires zod@^4.0.0 as a peer
dependency but the project uses zod@^3.23.0. The lock file resolves
this locally but npm ci is strict about peer deps in CI.

* fix(ci): drop Node 18 from matrix — tsdown requires Node 20+

tsdown/rolldown uses node:util.styleText which is only available in
Node 20.12+. Updated engines field to >=20.0.0 to match.

* fix(ci): add inlineOnly: false to tsdown config, target node20

tsdown errors on CI with "Consider adding inlineOnly option" when
dependencies are bundled. Setting inlineOnly: false suppresses this.
Also updated target from node18 to node20 to match engines field.
v0.7.0
2026-04-04 17:57:01 +01:00
Rohit Ghumare fa608ed29e fix: add missing name/owner fields to marketplace.json (#75) (#81)
marketplace.json was missing required top-level name and owner fields,
and plugins[].source was incorrectly named path. Fixes plugin install
validation error in Claude Code.
2026-03-27 16:29:12 +00:00
Rohit Ghumare e5f42c4d01 docs: update README for v0.6.1 — punchy intro, updated stats (#80)
- Add two-paragraph technical pitch above the fold with 3-line quick start
- Update tool count 37→38 (memory_verify), function count 50→52, test count 573
- Add memory_verify to MCP tools table, mem::verify and mem::cascade-update to functions table
- Add citation provenance and cascading staleness to capabilities table
- Add cross-agent sync and memory trust to comparison table
- Update API endpoint count 93→95, version 0.6.0→0.6.1
2026-03-25 21:21:01 +00:00
Rohit Ghumare 005b8c8087 feat: v0.6.1 — citations, cascading updates, expanded mesh (#79)
* feat: v0.6.1 — citations, cascading updates, expanded mesh (#53 #56 #59)

Add JIT verification with citation chains, self-organizing memory via
cascading staleness propagation, and expand mesh sync to 7 scopes
(semantic, procedural, relations, graph nodes/edges).

- mem::verify traces memory/observation provenance back to source
- mem::cascade-update flags stale graph items and sibling memories
- Mesh default scopes expanded from 2 to 7 with project-based filtering
- Memory.sourceObservationIds, CompressedObservation.confidence fields
- GraphNode.stale, GraphEdge.stale for staleness tracking
- MeshPeer.syncFilter for project-scoped action sync
- 573 tests passing across 49 files

* fix: address code review — stale filtering, LWW clock, validation, scoping

- Filter stale nodes/edges in graph-retrieval.ts and graph.ts traversals
- Use updatedAt (not createdAt) as LWW clock for graph node mesh sync
- Set updatedAt in cascade.ts when flagging nodes as stale
- Skip non-project scopes (semantic, procedural, relations, graph) when
  syncFilter.project is set to prevent leaking unscoped data
- Validate sourceObservationIds as array of strings in remember.ts
- Deduplicate observation IDs in consolidate.ts sourceObservationIds
- mesh-export endpoint uses updatedAt for graph nodes, accepts project param
- Extract shared test helpers into test/helpers/mocks.ts
- Assert memory_verify tool name in mcp-standalone.test.ts
2026-03-25 21:12:12 +00:00
Rohit Ghumare c248e6b042 fix: resolve 6 issues — performance, scheduling, TTL, plugin (#28 #29 #30 #36 #63 #75) (#78)
Performance:
- auto-forget.ts (#29): concept-bucketed contradiction detection with
  pre-tokenized cache, O(n * avg_bucket) instead of O(n^2)
- consolidate.ts (#28): cap LLM calls at 10, process largest concept
  groups first
- vector-index.ts (#30): bounded min-heap search replaces full sort,
  early skip for low-scoring entries

Scheduling (#36):
- index.ts: setInterval auto-forget (1h default) and consolidation
  (2h, opt-in via CONSOLIDATION_ENABLED=true)
- Configurable via AUTO_FORGET_INTERVAL_MS, CONSOLIDATION_INTERVAL_MS
- Timers use .unref() to not prevent process exit

Memory TTL (#63):
- remember.ts: optional ttlDays parameter auto-sets forgetAfter

Plugin (#75):
- plugin.json: version 0.2.0 -> 0.6.0

Closes #28 #29 #30 #36 #63 #75
2026-03-18 15:52:41 +05:30
Rohit Ghumare 39c39c545b fix: resolve 8 performance and architecture issues (#77)
* fix: resolve 8 performance and architecture issues (#18 #20 #23 #24 #42 #43 #48 #66)

N+1 query fixes (#18, #42):
- context.ts: parallelize summary + observation fetches with Promise.all
- profile.ts: parallelize per-session observation loading
- consolidate.ts: parallelize observation fetches across sessions
- auto-forget.ts: parallelize observation loading
- search.ts rebuildIndex: parallelize all session observation fetches

smart-search O(sessions*expandIds) fix (#23):
- findObservation accepts sessionIdHint for O(1) direct lookup
- expandIds accepts {obsId, sessionId} objects for hint passthrough
- fallback session scan parallelized with Promise.all

Viewer proxy refactor (#20, #66):
- Replace ~340 lines of duplicated API handlers with proxyToRestApi
- Remove buildGraphFromData (~200 lines), buildProfileFromRawObs (~90 lines)
- Preserve static HTML serving, WebSocket streaming, auth
- Eliminates graph builder duplication (#66)

buildGraphFromData O(n^3) fix (#24):
- Pre-build edgesBySource/edgesByTarget lookup maps for O(1) checks
- Replace triple-nested edges.some() with hasEdgeBetween() map lookups

Export pagination (#43):
- Add maxSessions (default 100) and offset parameters
- Parallelize per-session observation + profile loading
- Parallelize all independent KV list calls
- Return pagination metadata when hasMore

Health KV probe (#48):
- Add KV connectivity check in collectHealth()
- Write/read _probe key with latency measurement
- Add kvConnectivity field to HealthSnapshot type

* fix: address CodeRabbit review — bounded concurrency, input validation, timeouts

Bounded concurrency:
- auto-forget.ts: batch kv.list calls in groups of 10
- consolidate.ts: batch kv.list calls in groups of 10
- search.ts: batch rebuild in groups of 10, log failed sessions
- smart-search.ts: sequential batch of 5 with early return

Input validation:
- export-import.ts: validate/clamp maxSessions (1-1000) and offset (>=0)
- export-import.ts: full export by default, paginate only when explicit
- export-import.ts: ExportPagination type moved to types.ts on ExportData
- smart-search.ts: guard against malformed expandIds entries

Security/resilience:
- monitor.ts: sanitize KV probe error to generic "kv_probe_failed"
- monitor.ts: 5s timeout on KV probe via Promise.race
- viewer/server.ts: 10s AbortController timeout on upstream fetch
- viewer/server.ts: accept explicit restPort parameter
2026-03-18 09:42:21 +00:00
Rohit Ghumare 857f71e3c6 feat: v0.6.0 advanced retrieval with real-world benchmarks (#76)
* feat: add 9 orchestration modules for v0.5.0

Add actions, frontier, leases, routines, signals, checkpoints,
flow-compress, mesh, and branch-aware modules with full MCP tools,
REST endpoints, and 170 new tests. Includes SSRF protection,
race-condition-safe keyed mutex locking, SHA-256 fingerprinting,
and fixes for 29 CodeRabbit review findings.

- 9 new source files (src/functions/*)
- 8 new test files (170 tests, total 386)
- 10 new MCP tools, 23 new REST endpoints
- 8 new KV scopes, new types for orchestration
- Version bump to 0.5.0, README and viewer updated

* feat: add sentinels, sketches, crystallize, diagnostics, facets modules

5 new modules inspired by beads patterns but with original naming and
iii-engine real-time streaming (no polling):

- sentinels: event-driven condition watchers (webhook, timer, threshold,
  pattern, approval) that auto-unblock gated actions via SSE
- sketches: ephemeral action graphs with auto-expiry, promote or discard
- crystallize: LLM-powered compaction of completed action chains into
  compact crystal digests with key outcomes and lessons
- diagnostics: self-diagnosis across 8 categories (actions, leases,
  sentinels, sketches, signals, sessions, memories, mesh) with auto-heal
- facets: multi-dimensional tagging (dimension:value) with AND/OR queries

- 5 new source files, 5 new test files (132 tests, total 518)
- 9 new MCP tools (total 37), 21 new REST endpoints (total 93)
- 4 new KV scopes (total 33), new types for all modules
- README stats and function table updated

* fix: address code review findings across v0.5.0 modules

- actions: validate edges before persisting, set blocked status for requires deps
- leases: use mem:action lock key, reject blocked actions, check expiry on release
- checkpoints: validate linkedActionIds exist, check requires edges in unblock
- mesh: add SSRF validation on peer registration
- routines: remove invalid "failed" action status check
- export-import: add v0.5.0 scope export/import (actions, sentinels, sketches, etc)
- mcp/server: validate CSV inputs are strings before splitting
- schema: replace runtime require with static import
- README: fix stale tool/endpoint counts (28→37, 72→93)

* fix: second round code review — mesh locks, routines DAG, MCP input validation, README counts

- mesh.ts: add withKeyedLock on action writes in receive path, add IPv6 private ranges to SSRF check
- routines.ts: validate DAG (duplicate orders, unknown deps), set dep actions to blocked, refresh stepStatus in routine-status
- checkpoints.ts: runtime type enum validation, set linked pending actions to blocked
- leases.ts: validate ttlMs is finite positive number
- export-import.ts: add skip strategy checks for all v0.5.0 import blocks
- mcp/server.ts: typeof guards on tags, config JSON.parse, actionIds, linkedActionIds, categories
- README.md: Tools 18→37, Functions 33→50, stats line updated
- test: update checkpoint test for new blocked-on-create behavior

* fix: third round review — lease renew/release safety, mesh locking, export replace cleanup, MCP input guards

- leases.ts: renew extends from max(now, existing expiry) instead of now; release verifies action ownership before mutation
- mesh.ts: withKeyedLock on memory writes in mesh-receive; applySyncData validates id/updatedAt and locks both memory and action writes
- routines.ts: stepStatus maps "blocked" to "pending" explicitly; progress includes blocked/cancelled counts; routine-freeze wrapped in withKeyedLock
- export-import.ts: remove unused RoutineRun import; replace strategy clears all orchestration namespaces; skip strategy for graphNodes/graphEdges/semantic/procedural
- mcp/server.ts: sentinel_trigger JSON.parse with typeof+try/catch; facet_query typeof guards on matchAll/matchAny; remove redundant requires cast; .filter(Boolean) on concepts/files/tags/requires CSV splits
- README.md: clarify API table is a representative subset

* fix: fourth round review — redirect SSRF, blocked-on-create, missing action handling, boolean normalization

- mesh.ts: add redirect:"error" to both outbound fetch calls to prevent SSRF via redirect
- routines.ts: create actions with status "blocked" directly when hasDeps (eliminates two-pass race); handle missing actions in routine-status as cancelled; progress.total uses run.actionIds.length
- mcp/server.ts: sentinel config accepts object values directly; normalize unreadOnly/dryRun for both JSON booleans and string values
- README.md: consistent bundle size (365KB) across both occurrences

* feat: v0.6.0 advanced retrieval — triple-stream search, stemming, real benchmarks

Search improvements:
- Porter stemmer for word normalization (authentication ↔ authenticating)
- 40+ coding-domain synonym groups (db ↔ database, k8s ↔ kubernetes)
- Binary-search prefix matching replaces O(n) full scan
- Session diversification (max 3 results per session)
- Co-occurrence graph edges between all concept pairs

New retrieval modules:
- Sliding window inference pipeline (context enrichment at ingestion)
- Adaptive query expansion (LLM-generated reformulations)
- Triple-stream search (BM25 + Vector + Graph with RRF fusion)
- Append-only temporal knowledge graph (versioned edges, point-in-time queries)
- Graph-augmented retrieval (entity search + neighborhood expansion)
- Ebbinghaus retention scoring (decay + tiered hot/warm/cold/evictable)

Real-world benchmarks (240 observations, 20 labeled queries):
- Quality eval: 64.1% recall@10 with Xenova embeddings (vs 55.8% grep)
- Scale eval: 92-100% token savings vs built-in memory at 240-50K observations
- Cross-session: 12/12 queries found vs 10/12 for 200-line MEMORY.md cap
- Token measurement uses actual search results (fixed fake constant bug)
- Removed old microbenchmarks (bench.ts, run-bench.ts, COMPARISON.md)
2026-03-18 08:47:35 +00:00
Rohit Ghumare 1ca0ec0414 feat: v0.5.0 orchestration layer — 14 modules, 518 tests (#74)
* feat: add 9 orchestration modules for v0.5.0

Add actions, frontier, leases, routines, signals, checkpoints,
flow-compress, mesh, and branch-aware modules with full MCP tools,
REST endpoints, and 170 new tests. Includes SSRF protection,
race-condition-safe keyed mutex locking, SHA-256 fingerprinting,
and fixes for 29 CodeRabbit review findings.

- 9 new source files (src/functions/*)
- 8 new test files (170 tests, total 386)
- 10 new MCP tools, 23 new REST endpoints
- 8 new KV scopes, new types for orchestration
- Version bump to 0.5.0, README and viewer updated

* feat: add sentinels, sketches, crystallize, diagnostics, facets modules

5 new modules inspired by beads patterns but with original naming and
iii-engine real-time streaming (no polling):

- sentinels: event-driven condition watchers (webhook, timer, threshold,
  pattern, approval) that auto-unblock gated actions via SSE
- sketches: ephemeral action graphs with auto-expiry, promote or discard
- crystallize: LLM-powered compaction of completed action chains into
  compact crystal digests with key outcomes and lessons
- diagnostics: self-diagnosis across 8 categories (actions, leases,
  sentinels, sketches, signals, sessions, memories, mesh) with auto-heal
- facets: multi-dimensional tagging (dimension:value) with AND/OR queries

- 5 new source files, 5 new test files (132 tests, total 518)
- 9 new MCP tools (total 37), 21 new REST endpoints (total 93)
- 4 new KV scopes (total 33), new types for all modules
- README stats and function table updated

* fix: address code review findings across v0.5.0 modules

- actions: validate edges before persisting, set blocked status for requires deps
- leases: use mem:action lock key, reject blocked actions, check expiry on release
- checkpoints: validate linkedActionIds exist, check requires edges in unblock
- mesh: add SSRF validation on peer registration
- routines: remove invalid "failed" action status check
- export-import: add v0.5.0 scope export/import (actions, sentinels, sketches, etc)
- mcp/server: validate CSV inputs are strings before splitting
- schema: replace runtime require with static import
- README: fix stale tool/endpoint counts (28→37, 72→93)

* fix: second round code review — mesh locks, routines DAG, MCP input validation, README counts

- mesh.ts: add withKeyedLock on action writes in receive path, add IPv6 private ranges to SSRF check
- routines.ts: validate DAG (duplicate orders, unknown deps), set dep actions to blocked, refresh stepStatus in routine-status
- checkpoints.ts: runtime type enum validation, set linked pending actions to blocked
- leases.ts: validate ttlMs is finite positive number
- export-import.ts: add skip strategy checks for all v0.5.0 import blocks
- mcp/server.ts: typeof guards on tags, config JSON.parse, actionIds, linkedActionIds, categories
- README.md: Tools 18→37, Functions 33→50, stats line updated
- test: update checkpoint test for new blocked-on-create behavior

* fix: third round review — lease renew/release safety, mesh locking, export replace cleanup, MCP input guards

- leases.ts: renew extends from max(now, existing expiry) instead of now; release verifies action ownership before mutation
- mesh.ts: withKeyedLock on memory writes in mesh-receive; applySyncData validates id/updatedAt and locks both memory and action writes
- routines.ts: stepStatus maps "blocked" to "pending" explicitly; progress includes blocked/cancelled counts; routine-freeze wrapped in withKeyedLock
- export-import.ts: remove unused RoutineRun import; replace strategy clears all orchestration namespaces; skip strategy for graphNodes/graphEdges/semantic/procedural
- mcp/server.ts: sentinel_trigger JSON.parse with typeof+try/catch; facet_query typeof guards on matchAll/matchAny; remove redundant requires cast; .filter(Boolean) on concepts/files/tags/requires CSV splits
- README.md: clarify API table is a representative subset

* fix: fourth round review — redirect SSRF, blocked-on-create, missing action handling, boolean normalization

- mesh.ts: add redirect:"error" to both outbound fetch calls to prevent SSRF via redirect
- routines.ts: create actions with status "blocked" directly when hasDeps (eliminates two-pass race); handle missing actions in routine-status as cancelled; progress.total uses run.actionIds.length
- mcp/server.ts: sentinel config accepts object values directly; normalize unreadOnly/dryRun for both JSON booleans and string values
- README.md: consistent bundle size (365KB) across both occurrences
2026-03-09 09:08:56 +00:00