@astragenie/astramemory-local 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +341 -0
- package/README.md +419 -0
- package/dist/backup/retention.d.ts +15 -0
- package/dist/backup/retention.js +62 -0
- package/dist/backup/retention.js.map +1 -0
- package/dist/backup/snapshot.d.ts +21 -0
- package/dist/backup/snapshot.js +55 -0
- package/dist/backup/snapshot.js.map +1 -0
- package/dist/backup/verify.d.ts +23 -0
- package/dist/backup/verify.js +77 -0
- package/dist/backup/verify.js.map +1 -0
- package/dist/budget/tracker.d.ts +58 -0
- package/dist/budget/tracker.js +102 -0
- package/dist/budget/tracker.js.map +1 -0
- package/dist/capture/codex.d.ts +63 -0
- package/dist/capture/codex.js +0 -0
- package/dist/capture/codex.js.map +1 -0
- package/dist/cli/backup.d.ts +1 -0
- package/dist/cli/backup.js +112 -0
- package/dist/cli/backup.js.map +1 -0
- package/dist/cli/budget.d.ts +7 -0
- package/dist/cli/budget.js +44 -0
- package/dist/cli/budget.js.map +1 -0
- package/dist/cli/capture.d.ts +10 -0
- package/dist/cli/capture.js +113 -0
- package/dist/cli/capture.js.map +1 -0
- package/dist/cli/consolidate.d.ts +16 -0
- package/dist/cli/consolidate.js +146 -0
- package/dist/cli/consolidate.js.map +1 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.js +54 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/entity-backfill.d.ts +10 -0
- package/dist/cli/entity-backfill.js +46 -0
- package/dist/cli/entity-backfill.js.map +1 -0
- package/dist/cli/hook-install.d.ts +45 -0
- package/dist/cli/hook-install.js +77 -0
- package/dist/cli/hook-install.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +312 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +16 -0
- package/dist/cli/init.js +431 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/mcp-stdio.d.ts +18 -0
- package/dist/cli/mcp-stdio.js +67 -0
- package/dist/cli/mcp-stdio.js.map +1 -0
- package/dist/cli/memory.d.ts +15 -0
- package/dist/cli/memory.js +52 -0
- package/dist/cli/memory.js.map +1 -0
- package/dist/cli/open-runtime-db.d.ts +15 -0
- package/dist/cli/open-runtime-db.js +37 -0
- package/dist/cli/open-runtime-db.js.map +1 -0
- package/dist/cli/pair.d.ts +29 -0
- package/dist/cli/pair.js +64 -0
- package/dist/cli/pair.js.map +1 -0
- package/dist/cli/providers.d.ts +10 -0
- package/dist/cli/providers.js +97 -0
- package/dist/cli/providers.js.map +1 -0
- package/dist/cli/queue-purge.d.ts +5 -0
- package/dist/cli/queue-purge.js +92 -0
- package/dist/cli/queue-purge.js.map +1 -0
- package/dist/cli/queue.d.ts +29 -0
- package/dist/cli/queue.js +73 -0
- package/dist/cli/queue.js.map +1 -0
- package/dist/cli/rebuild.d.ts +15 -0
- package/dist/cli/rebuild.js +70 -0
- package/dist/cli/rebuild.js.map +1 -0
- package/dist/cli/reembed-dim.d.ts +21 -0
- package/dist/cli/reembed-dim.js +199 -0
- package/dist/cli/reembed-dim.js.map +1 -0
- package/dist/cli/reinstall.d.ts +1 -0
- package/dist/cli/reinstall.js +205 -0
- package/dist/cli/reinstall.js.map +1 -0
- package/dist/cli/restore.d.ts +1 -0
- package/dist/cli/restore.js +167 -0
- package/dist/cli/restore.js.map +1 -0
- package/dist/cli/retag.d.ts +14 -0
- package/dist/cli/retag.js +62 -0
- package/dist/cli/retag.js.map +1 -0
- package/dist/cli/search.d.ts +66 -0
- package/dist/cli/search.js +174 -0
- package/dist/cli/search.js.map +1 -0
- package/dist/cli/serve.d.ts +9 -0
- package/dist/cli/serve.js +364 -0
- package/dist/cli/serve.js.map +1 -0
- package/dist/cli/service.d.ts +1 -0
- package/dist/cli/service.js +121 -0
- package/dist/cli/service.js.map +1 -0
- package/dist/cli/sync.d.ts +15 -0
- package/dist/cli/sync.js +61 -0
- package/dist/cli/sync.js.map +1 -0
- package/dist/cli/token.d.ts +24 -0
- package/dist/cli/token.js +77 -0
- package/dist/cli/token.js.map +1 -0
- package/dist/cli/wait-health.d.ts +4 -0
- package/dist/cli/wait-health.js +23 -0
- package/dist/cli/wait-health.js.map +1 -0
- package/dist/config/config.d.ts +127 -0
- package/dist/config/config.js +38 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/datadir.d.ts +30 -0
- package/dist/config/datadir.js +65 -0
- package/dist/config/datadir.js.map +1 -0
- package/dist/config/loader.d.ts +23 -0
- package/dist/config/loader.js +102 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/migrate-dirs.d.ts +36 -0
- package/dist/config/migrate-dirs.js +132 -0
- package/dist/config/migrate-dirs.js.map +1 -0
- package/dist/config/persist-envs.d.ts +23 -0
- package/dist/config/persist-envs.js +119 -0
- package/dist/config/persist-envs.js.map +1 -0
- package/dist/config/resolve-runtime.d.ts +19 -0
- package/dist/config/resolve-runtime.js +53 -0
- package/dist/config/resolve-runtime.js.map +1 -0
- package/dist/config/secrets.d.ts +28 -0
- package/dist/config/secrets.js +38 -0
- package/dist/config/secrets.js.map +1 -0
- package/dist/config/sync-settings.d.ts +16 -0
- package/dist/config/sync-settings.js +34 -0
- package/dist/config/sync-settings.js.map +1 -0
- package/dist/config/writer.d.ts +19 -0
- package/dist/config/writer.js +121 -0
- package/dist/config/writer.js.map +1 -0
- package/dist/consolidate/consolidate.d.ts +80 -0
- package/dist/consolidate/consolidate.js +0 -0
- package/dist/consolidate/consolidate.js.map +1 -0
- package/dist/consolidate/proposals.d.ts +35 -0
- package/dist/consolidate/proposals.js +66 -0
- package/dist/consolidate/proposals.js.map +1 -0
- package/dist/contracts/atom-wire.d.ts +48 -0
- package/dist/contracts/atom-wire.js +55 -0
- package/dist/contracts/atom-wire.js.map +1 -0
- package/dist/contracts/embed.d.ts +41 -0
- package/dist/contracts/embed.js +20 -0
- package/dist/contracts/embed.js.map +1 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/job.d.ts +113 -0
- package/dist/contracts/job.js +32 -0
- package/dist/contracts/job.js.map +1 -0
- package/dist/contracts/llm.d.ts +30 -0
- package/dist/contracts/llm.js +2 -0
- package/dist/contracts/llm.js.map +1 -0
- package/dist/contracts/memory.d.ts +47 -0
- package/dist/contracts/memory.js +5 -0
- package/dist/contracts/memory.js.map +1 -0
- package/dist/contracts/vector.d.ts +29 -0
- package/dist/contracts/vector.js +2 -0
- package/dist/contracts/vector.js.map +1 -0
- package/dist/distill/flatten-turns.d.ts +1 -0
- package/dist/distill/flatten-turns.js +50 -0
- package/dist/distill/flatten-turns.js.map +1 -0
- package/dist/distill/pipeline.d.ts +45 -0
- package/dist/distill/pipeline.js +113 -0
- package/dist/distill/pipeline.js.map +1 -0
- package/dist/distill/prompts/extract.d.ts +122 -0
- package/dist/distill/prompts/extract.js +67 -0
- package/dist/distill/prompts/extract.js.map +1 -0
- package/dist/distill/stages/01-cleanup.d.ts +9 -0
- package/dist/distill/stages/01-cleanup.js +67 -0
- package/dist/distill/stages/01-cleanup.js.map +1 -0
- package/dist/distill/stages/02-normalize.d.ts +9 -0
- package/dist/distill/stages/02-normalize.js +76 -0
- package/dist/distill/stages/02-normalize.js.map +1 -0
- package/dist/distill/stages/03-chunk.d.ts +22 -0
- package/dist/distill/stages/03-chunk.js +138 -0
- package/dist/distill/stages/03-chunk.js.map +1 -0
- package/dist/distill/stages/04-compact.d.ts +28 -0
- package/dist/distill/stages/04-compact.js +69 -0
- package/dist/distill/stages/04-compact.js.map +1 -0
- package/dist/distill/stages/05-extract.d.ts +35 -0
- package/dist/distill/stages/05-extract.js +101 -0
- package/dist/distill/stages/05-extract.js.map +1 -0
- package/dist/distill/stages/06-reduce.d.ts +16 -0
- package/dist/distill/stages/06-reduce.js +30 -0
- package/dist/distill/stages/06-reduce.js.map +1 -0
- package/dist/distill/stages/07-memory-normalize.d.ts +27 -0
- package/dist/distill/stages/07-memory-normalize.js +65 -0
- package/dist/distill/stages/07-memory-normalize.js.map +1 -0
- package/dist/distill/stages/08-embed-index.d.ts +31 -0
- package/dist/distill/stages/08-embed-index.js +82 -0
- package/dist/distill/stages/08-embed-index.js.map +1 -0
- package/dist/doctor/checks.d.ts +77 -0
- package/dist/doctor/checks.js +626 -0
- package/dist/doctor/checks.js.map +1 -0
- package/dist/doctor/hardening-checks.d.ts +9 -0
- package/dist/doctor/hardening-checks.js +182 -0
- package/dist/doctor/hardening-checks.js.map +1 -0
- package/dist/doctor/probes/embed-probe.d.ts +19 -0
- package/dist/doctor/probes/embed-probe.js +47 -0
- package/dist/doctor/probes/embed-probe.js.map +1 -0
- package/dist/doctor/probes/llm-chat-probe.d.ts +11 -0
- package/dist/doctor/probes/llm-chat-probe.js +41 -0
- package/dist/doctor/probes/llm-chat-probe.js.map +1 -0
- package/dist/doctor/probes/plugin-coexistence.d.ts +14 -0
- package/dist/doctor/probes/plugin-coexistence.js +60 -0
- package/dist/doctor/probes/plugin-coexistence.js.map +1 -0
- package/dist/doctor/runner.d.ts +17 -0
- package/dist/doctor/runner.js +53 -0
- package/dist/doctor/runner.js.map +1 -0
- package/dist/doctor/types.d.ts +12 -0
- package/dist/doctor/types.js +2 -0
- package/dist/doctor/types.js.map +1 -0
- package/dist/entity/backfill.d.ts +30 -0
- package/dist/entity/backfill.js +55 -0
- package/dist/entity/backfill.js.map +1 -0
- package/dist/entity/extract-entities.d.ts +27 -0
- package/dist/entity/extract-entities.js +86 -0
- package/dist/entity/extract-entities.js.map +1 -0
- package/dist/entity/normalize.d.ts +17 -0
- package/dist/entity/normalize.js +20 -0
- package/dist/entity/normalize.js.map +1 -0
- package/dist/eval/harness.d.ts +96 -0
- package/dist/eval/harness.js +119 -0
- package/dist/eval/harness.js.map +1 -0
- package/dist/eval/metrics.d.ts +23 -0
- package/dist/eval/metrics.js +44 -0
- package/dist/eval/metrics.js.map +1 -0
- package/dist/log/correlation.d.ts +24 -0
- package/dist/log/correlation.js +33 -0
- package/dist/log/correlation.js.map +1 -0
- package/dist/log/logger.d.ts +38 -0
- package/dist/log/logger.js +129 -0
- package/dist/log/logger.js.map +1 -0
- package/dist/log/scrub.d.ts +33 -0
- package/dist/log/scrub.js +91 -0
- package/dist/log/scrub.js.map +1 -0
- package/dist/mcp/server.d.ts +36 -0
- package/dist/mcp/server.js +553 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/memory-tool/adapter.d.ts +73 -0
- package/dist/memory-tool/adapter.js +269 -0
- package/dist/memory-tool/adapter.js.map +1 -0
- package/dist/pipeline/errors.d.ts +21 -0
- package/dist/pipeline/errors.js +34 -0
- package/dist/pipeline/errors.js.map +1 -0
- package/dist/pipeline/failure-classifier.d.ts +13 -0
- package/dist/pipeline/failure-classifier.js +72 -0
- package/dist/pipeline/failure-classifier.js.map +1 -0
- package/dist/pipeline/handler-ctx-ext.d.ts +23 -0
- package/dist/pipeline/handler-ctx-ext.js +19 -0
- package/dist/pipeline/handler-ctx-ext.js.map +1 -0
- package/dist/pipeline/handler.d.ts +20 -0
- package/dist/pipeline/handler.js +2 -0
- package/dist/pipeline/handler.js.map +1 -0
- package/dist/pipeline/handlers/cleanup.d.ts +14 -0
- package/dist/pipeline/handlers/cleanup.js +47 -0
- package/dist/pipeline/handlers/cleanup.js.map +1 -0
- package/dist/pipeline/handlers/consolidate.d.ts +8 -0
- package/dist/pipeline/handlers/consolidate.js +23 -0
- package/dist/pipeline/handlers/consolidate.js.map +1 -0
- package/dist/pipeline/handlers/distill-events.d.ts +15 -0
- package/dist/pipeline/handlers/distill-events.js +134 -0
- package/dist/pipeline/handlers/distill-events.js.map +1 -0
- package/dist/pipeline/handlers/distill.d.ts +17 -0
- package/dist/pipeline/handlers/distill.js +110 -0
- package/dist/pipeline/handlers/distill.js.map +1 -0
- package/dist/pipeline/handlers/reembed.d.ts +10 -0
- package/dist/pipeline/handlers/reembed.js +34 -0
- package/dist/pipeline/handlers/reembed.js.map +1 -0
- package/dist/pipeline/job-repo.d.ts +86 -0
- package/dist/pipeline/job-repo.js +168 -0
- package/dist/pipeline/job-repo.js.map +1 -0
- package/dist/pipeline/mock-providers.d.ts +49 -0
- package/dist/pipeline/mock-providers.js +175 -0
- package/dist/pipeline/mock-providers.js.map +1 -0
- package/dist/pipeline/registry.d.ts +15 -0
- package/dist/pipeline/registry.js +20 -0
- package/dist/pipeline/registry.js.map +1 -0
- package/dist/pipeline/worker.d.ts +41 -0
- package/dist/pipeline/worker.js +167 -0
- package/dist/pipeline/worker.js.map +1 -0
- package/dist/providers/embed/azure-openai.d.ts +25 -0
- package/dist/providers/embed/azure-openai.js +138 -0
- package/dist/providers/embed/azure-openai.js.map +1 -0
- package/dist/providers/embed/ollama.d.ts +17 -0
- package/dist/providers/embed/ollama.js +106 -0
- package/dist/providers/embed/ollama.js.map +1 -0
- package/dist/providers/index.d.ts +19 -0
- package/dist/providers/index.js +72 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/llm/azure-openai.d.ts +20 -0
- package/dist/providers/llm/azure-openai.js +135 -0
- package/dist/providers/llm/azure-openai.js.map +1 -0
- package/dist/providers/llm/ollama.d.ts +13 -0
- package/dist/providers/llm/ollama.js +113 -0
- package/dist/providers/llm/ollama.js.map +1 -0
- package/dist/providers/llm/pricing.d.ts +21 -0
- package/dist/providers/llm/pricing.js +22 -0
- package/dist/providers/llm/pricing.js.map +1 -0
- package/dist/recall/pack.d.ts +32 -0
- package/dist/recall/pack.js +90 -0
- package/dist/recall/pack.js.map +1 -0
- package/dist/recall/policy.d.ts +39 -0
- package/dist/recall/policy.js +96 -0
- package/dist/recall/policy.js.map +1 -0
- package/dist/redact/detectors.d.ts +20 -0
- package/dist/redact/detectors.js +85 -0
- package/dist/redact/detectors.js.map +1 -0
- package/dist/redact/entropy.d.ts +24 -0
- package/dist/redact/entropy.js +77 -0
- package/dist/redact/entropy.js.map +1 -0
- package/dist/redact/index.d.ts +47 -0
- package/dist/redact/index.js +165 -0
- package/dist/redact/index.js.map +1 -0
- package/dist/search/fuse.d.ts +108 -0
- package/dist/search/fuse.js +135 -0
- package/dist/search/fuse.js.map +1 -0
- package/dist/search/query.d.ts +28 -0
- package/dist/search/query.js +70 -0
- package/dist/search/query.js.map +1 -0
- package/dist/search/search.d.ts +164 -0
- package/dist/search/search.js +310 -0
- package/dist/search/search.js.map +1 -0
- package/dist/server/app.d.ts +17 -0
- package/dist/server/app.js +133 -0
- package/dist/server/app.js.map +1 -0
- package/dist/server/health-state.d.ts +29 -0
- package/dist/server/health-state.js +28 -0
- package/dist/server/health-state.js.map +1 -0
- package/dist/server/lib/network.d.ts +12 -0
- package/dist/server/lib/network.js +16 -0
- package/dist/server/lib/network.js.map +1 -0
- package/dist/server/lib/score-contract.d.ts +36 -0
- package/dist/server/lib/score-contract.js +54 -0
- package/dist/server/lib/score-contract.js.map +1 -0
- package/dist/server/lib/stable-stringify.d.ts +10 -0
- package/dist/server/lib/stable-stringify.js +27 -0
- package/dist/server/lib/stable-stringify.js.map +1 -0
- package/dist/server/lib/wire-meta.d.ts +7 -0
- package/dist/server/lib/wire-meta.js +29 -0
- package/dist/server/lib/wire-meta.js.map +1 -0
- package/dist/server/queries/dashboard.d.ts +142 -0
- package/dist/server/queries/dashboard.js +166 -0
- package/dist/server/queries/dashboard.js.map +1 -0
- package/dist/server/routes/consolidation.d.ts +14 -0
- package/dist/server/routes/consolidation.js +67 -0
- package/dist/server/routes/consolidation.js.map +1 -0
- package/dist/server/routes/dashboard-api-html.d.ts +15 -0
- package/dist/server/routes/dashboard-api-html.js +144 -0
- package/dist/server/routes/dashboard-api-html.js.map +1 -0
- package/dist/server/routes/dashboard-consolidation-html.d.ts +26 -0
- package/dist/server/routes/dashboard-consolidation-html.js +202 -0
- package/dist/server/routes/dashboard-consolidation-html.js.map +1 -0
- package/dist/server/routes/dashboard-html.d.ts +15 -0
- package/dist/server/routes/dashboard-html.js +365 -0
- package/dist/server/routes/dashboard-html.js.map +1 -0
- package/dist/server/routes/dashboard-jobs-html.d.ts +18 -0
- package/dist/server/routes/dashboard-jobs-html.js +186 -0
- package/dist/server/routes/dashboard-jobs-html.js.map +1 -0
- package/dist/server/routes/dashboard-search-html.d.ts +18 -0
- package/dist/server/routes/dashboard-search-html.js +189 -0
- package/dist/server/routes/dashboard-search-html.js.map +1 -0
- package/dist/server/routes/dashboard.d.ts +19 -0
- package/dist/server/routes/dashboard.js +68 -0
- package/dist/server/routes/dashboard.js.map +1 -0
- package/dist/server/routes/digest.d.ts +9 -0
- package/dist/server/routes/digest.js +37 -0
- package/dist/server/routes/digest.js.map +1 -0
- package/dist/server/routes/entities.d.ts +12 -0
- package/dist/server/routes/entities.js +46 -0
- package/dist/server/routes/entities.js.map +1 -0
- package/dist/server/routes/health.d.ts +14 -0
- package/dist/server/routes/health.js +100 -0
- package/dist/server/routes/health.js.map +1 -0
- package/dist/server/routes/ingest.d.ts +209 -0
- package/dist/server/routes/ingest.js +454 -0
- package/dist/server/routes/ingest.js.map +1 -0
- package/dist/server/routes/lifecycle.d.ts +21 -0
- package/dist/server/routes/lifecycle.js +132 -0
- package/dist/server/routes/lifecycle.js.map +1 -0
- package/dist/server/routes/mcp.d.ts +15 -0
- package/dist/server/routes/mcp.js +36 -0
- package/dist/server/routes/mcp.js.map +1 -0
- package/dist/server/routes/memory-tool.d.ts +14 -0
- package/dist/server/routes/memory-tool.js +28 -0
- package/dist/server/routes/memory-tool.js.map +1 -0
- package/dist/server/routes/memory.d.ts +7 -0
- package/dist/server/routes/memory.js +19 -0
- package/dist/server/routes/memory.js.map +1 -0
- package/dist/server/routes/recall.d.ts +15 -0
- package/dist/server/routes/recall.js +74 -0
- package/dist/server/routes/recall.js.map +1 -0
- package/dist/server/routes/search.d.ts +12 -0
- package/dist/server/routes/search.js +203 -0
- package/dist/server/routes/search.js.map +1 -0
- package/dist/server/routes/version.d.ts +2 -0
- package/dist/server/routes/version.js +11 -0
- package/dist/server/routes/version.js.map +1 -0
- package/dist/server/routes/why.d.ts +9 -0
- package/dist/server/routes/why.js +38 -0
- package/dist/server/routes/why.js.map +1 -0
- package/dist/service/index.d.ts +10 -0
- package/dist/service/index.js +25 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/install-flow.d.ts +18 -0
- package/dist/service/install-flow.js +47 -0
- package/dist/service/install-flow.js.map +1 -0
- package/dist/service/instance-lock.d.ts +26 -0
- package/dist/service/instance-lock.js +150 -0
- package/dist/service/instance-lock.js.map +1 -0
- package/dist/service/launchd.d.ts +11 -0
- package/dist/service/launchd.js +196 -0
- package/dist/service/launchd.js.map +1 -0
- package/dist/service/schtasks.d.ts +31 -0
- package/dist/service/schtasks.js +274 -0
- package/dist/service/schtasks.js.map +1 -0
- package/dist/service/shim.d.ts +21 -0
- package/dist/service/shim.js +80 -0
- package/dist/service/shim.js.map +1 -0
- package/dist/service/systemd.d.ts +11 -0
- package/dist/service/systemd.js +150 -0
- package/dist/service/systemd.js.map +1 -0
- package/dist/service/task-xml.d.ts +36 -0
- package/dist/service/task-xml.js +91 -0
- package/dist/service/task-xml.js.map +1 -0
- package/dist/service/types.d.ts +47 -0
- package/dist/service/types.js +2 -0
- package/dist/service/types.js.map +1 -0
- package/dist/storage/archival.d.ts +29 -0
- package/dist/storage/archival.js +47 -0
- package/dist/storage/archival.js.map +1 -0
- package/dist/storage/bearer-keystore.d.ts +34 -0
- package/dist/storage/bearer-keystore.js +75 -0
- package/dist/storage/bearer-keystore.js.map +1 -0
- package/dist/storage/db.d.ts +37 -0
- package/dist/storage/db.js +92 -0
- package/dist/storage/db.js.map +1 -0
- package/dist/storage/entities.d.ts +71 -0
- package/dist/storage/entities.js +141 -0
- package/dist/storage/entities.js.map +1 -0
- package/dist/storage/ingest-idempotency.d.ts +26 -0
- package/dist/storage/ingest-idempotency.js +29 -0
- package/dist/storage/ingest-idempotency.js.map +1 -0
- package/dist/storage/keystore.d.ts +64 -0
- package/dist/storage/keystore.js +194 -0
- package/dist/storage/keystore.js.map +1 -0
- package/dist/storage/memories.d.ts +51 -0
- package/dist/storage/memories.js +67 -0
- package/dist/storage/memories.js.map +1 -0
- package/dist/storage/memory-events.d.ts +145 -0
- package/dist/storage/memory-events.js +287 -0
- package/dist/storage/memory-events.js.map +1 -0
- package/dist/storage/migrate-encrypt.d.ts +16 -0
- package/dist/storage/migrate-encrypt.js +121 -0
- package/dist/storage/migrate-encrypt.js.map +1 -0
- package/dist/storage/migrate.d.ts +27 -0
- package/dist/storage/migrate.js +105 -0
- package/dist/storage/migrate.js.map +1 -0
- package/dist/storage/redaction-log.d.ts +18 -0
- package/dist/storage/redaction-log.js +27 -0
- package/dist/storage/redaction-log.js.map +1 -0
- package/dist/storage/usefulness.d.ts +115 -0
- package/dist/storage/usefulness.js +203 -0
- package/dist/storage/usefulness.js.map +1 -0
- package/dist/sync/conflict-resolve.d.ts +26 -0
- package/dist/sync/conflict-resolve.js +139 -0
- package/dist/sync/conflict-resolve.js.map +1 -0
- package/dist/sync/puller.d.ts +115 -0
- package/dist/sync/puller.js +173 -0
- package/dist/sync/puller.js.map +1 -0
- package/dist/sync/shipper.d.ts +112 -0
- package/dist/sync/shipper.js +189 -0
- package/dist/sync/shipper.js.map +1 -0
- package/dist/tag-hygiene/backfill.d.ts +50 -0
- package/dist/tag-hygiene/backfill.js +117 -0
- package/dist/tag-hygiene/backfill.js.map +1 -0
- package/dist/tag-hygiene/derive-repo.d.ts +9 -0
- package/dist/tag-hygiene/derive-repo.js +19 -0
- package/dist/tag-hygiene/derive-repo.js.map +1 -0
- package/dist/tag-hygiene/tier2-infer.d.ts +28 -0
- package/dist/tag-hygiene/tier2-infer.js +72 -0
- package/dist/tag-hygiene/tier2-infer.js.map +1 -0
- package/dist/vector/sqlite-vec.d.ts +16 -0
- package/dist/vector/sqlite-vec.js +49 -0
- package/dist/vector/sqlite-vec.js.map +1 -0
- package/migrations/001-init.sql +117 -0
- package/migrations/002-wire-v1.sql +16 -0
- package/migrations/003-expand-memory-types.sql +81 -0
- package/migrations/004-provenance.sql +4 -0
- package/migrations/005-security.sql +12 -0
- package/migrations/006-atom-v3.sql +28 -0
- package/migrations/007-memory-events.sql +30 -0
- package/migrations/008-consolidation.sql +31 -0
- package/migrations/009-tag-hygiene.sql +13 -0
- package/migrations/010-sync-pull.sql +53 -0
- package/migrations/011-embed-dim-migration.sql +28 -0
- package/migrations/012-entities.sql +36 -0
- package/migrations/013-archival.sql +50 -0
- package/package.json +50 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [0.7.2] — 2026-07-05
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **CI: npm publish on self-hosted runners** — dropped `--provenance` from `npm publish`. npm rejects sigstore provenance from self-hosted runners (`E422 Unsupported GitHub Actions runner environment: "self-hosted"`) and fleet policy is self-hosted only, so provenance and the publish were mutually exclusive. Completes the publish fix started in 0.7.1 (#58). No runtime change.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## [0.7.1] — 2026-07-05
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- **CI: npm publish workflow** — `bun install` in the publish job now runs with `--ignore-scripts`, skipping `better-sqlite3`'s node-gyp native compile that crashed the fleet runner (`webidl.util.markAsUncloneable is not a function`; no prebuilt binary for the target). The publish only needs the TS `dist/` build; the native driver is compiled on the consumer's install. Fixes #58. No runtime changes.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## [0.7.0] — 2026-07-05
|
|
25
|
+
|
|
26
|
+
Project- and agent-scoped recall (FEAT-423, issue #56).
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **`project` and `agent` recall filters** — `POST /recall` (`filters.project`, `filters.agent`), `GET /search` (`&project=`, `&agent=`), and MCP `search_memory`/`recall_memory` now narrow results by `provenance.project` / `provenance.agent` (exact match, AND-composed). Both accept a single value (`col = ?`) or a comma-list / array (`col IN (...)`, OR-semantics; empty list = no constraint). `agent` is a hard filter; role-scoped soft-boost (FEAT-219) is deferred.
|
|
31
|
+
- **CLI `--project` / `--agent`** on `search`, `recall`, and `remember` (`astramem-local`). `remember` persists them via `metadata.project` / `metadata.agent`.
|
|
32
|
+
- **MCP parity**: `search_memory`/`recall_memory` gained the missing `entity` filter alongside `project`/`agent`.
|
|
33
|
+
- **Docs**: `docs/recall-filters.md` — end-to-end integration contract (wire shapes, CLI, precedence, tests). `/dashboard/api` route table updated.
|
|
34
|
+
- **Tests**: `tests/search/project-filter.test.ts`, `tests/cli/project-filter.test.ts`, and `tests/smoke/smoke.test.ts` filter battery (GET + POST + CLI over a real daemon).
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- The recall `project` filter was inert end-to-end because the client never sent it under `filters` (issue #56). Server always supported it; the companion `astramem-plugin` client fix nests the filter correctly.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## [0.6.0] — 2026-07-02
|
|
43
|
+
|
|
44
|
+
Waves 3 + 4 of the migration map: the cloud bridge and the moat. The full local→cloud loop now works end to end: pair → capture → distill → ship → cloud ledger.
|
|
45
|
+
|
|
46
|
+
### Added — Wave 3: cloud bridge
|
|
47
|
+
|
|
48
|
+
- **Contracts package** (`contracts/`): versioned JSON Schemas for `atom@1`, `retrieval-query/result@1`, `sync-envelope@1`, `capture-envelope@1` with valid/invalid fixtures, an eval corpus + graded query set (ADR-005), and `contracts:validate` wired into lint CI.
|
|
49
|
+
- **Sync shipper** (ADR-003): one-way log shipping of team/org-scoped `memory_events` to the cloud ledger (`astramem-sync@1` envelopes, `acked_seq` cursor, exponential backoff). Personal-scoped atoms never ship (ADR-009). Off by default; requires pairing.
|
|
50
|
+
- **Erasure v1** (ADR-006): `DELETE /memory/:id` + MCP `erase_memory` — hard-delete with an `erase_request` tombstone event that ships to the cloud and blocks re-distillation from resurrecting the memory (stage-8 replay filter).
|
|
51
|
+
- **Device pairing**: `astramem-local pair <claim-code> --url <cloud-url>` redeems a FEAT-278 claim code; the device ApiKey goes to the OS credential store, `sync.json` persists url/workspace, and the daemon starts the shipper on next boot.
|
|
52
|
+
- Cloud side (astragenie/memory): `POST /sync/events` with dual dedup fences, ledger materialization (create/invalidate/supersede/erase), and per-device cursors.
|
|
53
|
+
|
|
54
|
+
### Added — Wave 4: the moat
|
|
55
|
+
|
|
56
|
+
- **Retrieval eval harness** (ADR-005): the shared corpus + query set runs in CI as a quality gate — mean recall@10 ≥ 0.90 / NDCG@10 ≥ 0.70 (deterministic baseline 0.929 / 0.748). `as_of` time-travel reported as a known engine gap, not silently dropped.
|
|
57
|
+
- **Usefulness feeds ranking** (ADR-010 v1.x): fusion gains an ε component (`search.epsilon`, default 0.1) over a Laplace-smoothed per-atom score — `recall_used` lifts, `memory_corrected` demotes, no signal stays neutral (0.5), so unsignaled corpora rank identically.
|
|
58
|
+
- **Consolidation stage 9** (ADR-004, migration 008): deterministic offline pass per `(repo, type)` group — cosine ≥ 0.95 auto-merges as supersede (originals kept, `derived_from` lineage), 0.85–0.95 lands in a propose-only queue requiring user confirm. REST `POST /consolidation/run`, proposal accept/reject; `consolidate` job kind.
|
|
59
|
+
- **Anthropic memory-tool adapter** (ADR-007): `POST /memory-tool` maps `view`/`create`/`str_replace`/`delete` onto memories — writes are redacted, edits supersede, deletes erase with tombstones.
|
|
60
|
+
- **Injection policy** (ADR-005 when-to-recall): `/recall` with a `prompt` gains a decide-before-inject gate (smalltalk/short-prompt suppression, memory-reference override, min-score filter, budget shrink for long prompts).
|
|
61
|
+
- **Codex CLI capture connector** (ADR-008): `astramem-local capture codex` ingests Codex sessions (open JSONL) through the normal redaction + distill path; content-stable idempotency keys make re-runs safe. Cursor postponed — proprietary chat store; Cursor users connect via MCP recall.
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- `SCHEMA_VERSION` 7 → 8 (migration 008 consolidation proposals).
|
|
66
|
+
- MCP server exposes 12 tools (+ `erase_memory`).
|
|
67
|
+
- Cloud embeddings default to self-hosted HuggingFace TEI (BGE-large, 1024-d); local embeddings remain Ollama `mxbai-embed-large` (1024-d).
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## [0.5.0] — 2026-07-02
|
|
72
|
+
|
|
73
|
+
Waves 1 + 2 of the target-architecture migration map: the trust floor and the contract + flywheel.
|
|
74
|
+
|
|
75
|
+
### Added — Wave 1: trust floor (SEC-1..10)
|
|
76
|
+
|
|
77
|
+
- **Encryption at rest** (SEC-1/2/7/8): production driver is now `better-sqlite3-multiple-ciphers`; `memory.sqlite` is encrypted by default (`security.encryption.enabled`, default `true`). Key lives in the OS credential store (Windows Credential Manager / macOS Keychain / libsecret via `@napi-rs/keyring`) with a `0600` `db.key` file fallback. Pre-existing plaintext DBs auto-migrate on startup (`PRAGMA rekey` on a verified copy) keeping a `.pre-encryption.bak`; backups of encrypted DBs stay encrypted (`VACUUM INTO` fallback).
|
|
78
|
+
- **Stage-0 secret redaction** (SEC-3..6): pattern + entropy detectors (AWS/GitHub/Azure/GCP/Slack keys, generic credentials, JWTs, PEM blocks, connection strings, config custom patterns) run at the ingest choke point and on `/remember` before anything is persisted. Placeholders `[REDACTED:<type>:<hash8>]`; counts-only `redaction_log` (migration 005); surfaced via `doctor` and `/health`.
|
|
79
|
+
- **Bearer token → OS credential store** (SEC-10): `secrets.env` kept as read-only fallback; file-only bearers are promoted one-way into the store.
|
|
80
|
+
- **D-DEF1 fixed**: canonical JSON turns are flattened to `role: text` lines at pipeline entry — role attribution reaches extraction.
|
|
81
|
+
- **D-DEF2 fixed**: `ingest_idempotency.summary_memory_id` is backfilled with the first real memory id after distillation.
|
|
82
|
+
- **CLI un-stubbed**: `queue` (job state counts + recent failures), `rebuild` (enqueues reembed jobs), `providers` (config + live chat/embed probes).
|
|
83
|
+
- **Dashboard auth hardening**: bearer no longer lives in the URL — `?token=` is a one-time bootstrap exchanged for an HttpOnly SameSite=Strict cookie via 302; `Authorization` header also accepted; 401 logs strip the query string.
|
|
84
|
+
|
|
85
|
+
### Added — Wave 2: contract + flywheel
|
|
86
|
+
|
|
87
|
+
- **Atom v3** (ADR-001, migration 006): `memories` gains bitemporal validity (`valid_from`/`valid_to`), `superseded_by`, `derived_from` lineage, and `scope` (`personal`/`team`/`org`, default `personal`). Search and `/recall/pack` exclude invalidated memories; receipts (`why_memory`) still see them.
|
|
88
|
+
- **`memory_events` append-only log** (ADR-002, migration 007): `create`/`invalidate`/`supersede`/`promote_scope`/`erase_request`/`usefulness` events with synthetic hash-stable `create` backfill; state change + event append in one transaction. Lifecycle REST: `POST /memory/:id/{invalidate,supersede,promote}`, `GET /memory/:id/history`.
|
|
89
|
+
- **MCP lifecycle tools** (ADR-007): `invalidate_memory`, `supersede_memory`, `promote_memory`, `memory_history`; `why_memory` now returns the populated `history` chain. MCP server exposes 11 tools.
|
|
90
|
+
- **`events` capture kind** (ADR-008): `POST /ingest/transcript` accepts `kind: "events"` — pre-typed atom candidates (runner-plugin grades/lessons/verdicts) that are redacted, stored, and enter the pipeline at stage 6 (reduce → normalize → embed+index) via the new `distill-events` job. Public protocol doc: `docs/capture-protocol.md`.
|
|
91
|
+
- **Recall-usefulness metric** (ADR-010 v1): `recall_served` / `recall_used` / `memory_corrected` event families captured from day 1 (query text never stored — sha256/16 hash only). Explicit feedback via MCP `mark_memory_used` + `REST POST /memory/:id/used`. Rate surfaced on `/health`, `doctor`, and a dashboard section. Measure-only in v1.
|
|
92
|
+
- **init: memory-pack hook auto-install**: `astramem-local init` offers to install the KF-B SessionStart hook into `~/.claude/settings.json` (idempotent, platform-appropriate command, `--no-hook` to skip); flips `recallPack.enabled`.
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
|
|
96
|
+
- `SCHEMA_VERSION` 4 → 7 (migrations 005 security, 006 atom v3, 007 memory events).
|
|
97
|
+
- `/health` gains `security: { encryption, redaction }` and `usefulness: { served_7d, used_7d, rate_7d }`.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## [0.4.0] — 2026-07-01
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
#### Read-only HTML dashboard at `GET /dashboard`
|
|
106
|
+
- **`GET /dashboard?token=<bearer>`** — single-file HTML metrics page auto-refreshing every 5 seconds via `<meta http-equiv="refresh" content="5">`. No JS, no CDN, no external assets. Dark mode by default (`#1a1a1a` bg, `#e0e0e0` text).
|
|
107
|
+
- **Metrics rendered** (one SQLite pass):
|
|
108
|
+
- Memory counts by type — CSS bar chart driven by `SELECT type, COUNT(*) FROM memories GROUP BY type`.
|
|
109
|
+
- Recent captures — last 25 memories with truncated text (120 chars), `HH:MM:SS` timestamp, type badge, importance, confidence, session prefix.
|
|
110
|
+
- Job queue state — colored badges: `poison` red, `pending` yellow if >3, `completed` green, `running` blue.
|
|
111
|
+
- Distill throughput last 24h — text-bar histogram by hour.
|
|
112
|
+
- Provider state — table with health status and last-check timestamp.
|
|
113
|
+
- Budget — today spend + MTD spend vs daily cap from config; delta color (green <50%, yellow 50-80%, red >80%).
|
|
114
|
+
- Pending queue — file count + oldest age from `%APPDATA%\Astramem\pending\`; shows "0 pending" if dir absent or empty; wrapped in try/catch.
|
|
115
|
+
- **Auth**: same Bearer token as all other authenticated routes, supplied as `?token=`. Missing/wrong token → 401 plain text (not HTML). Dashboard is excluded from the `Authorization` header preHandler check; it enforces its own query-param auth.
|
|
116
|
+
- **New files**:
|
|
117
|
+
- `src/server/routes/dashboard.ts` — Fastify route factory.
|
|
118
|
+
- `src/server/routes/dashboard-html.ts` — `renderDashboard(data, config): string` server-side HTML renderer.
|
|
119
|
+
- `src/server/queries/dashboard.ts` — extracted read queries (testable without route layer).
|
|
120
|
+
- `tests/server/dashboard.test.ts` — 16 inject tests covering 401/200, content-type, all section headers, meta-refresh, no-script, cache-control, public-route preservation.
|
|
121
|
+
- **`AppOpts`** gains optional `config?: Config` field (defaults to `defaultConfig()`); used by dashboard for budget cap display.
|
|
122
|
+
|
|
123
|
+
### Changed
|
|
124
|
+
- `src/server/app.ts` preHandler skip-list extended to include `/dashboard` (dashboard handles own auth via `?token=`).
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## [0.2.0] — 2026-06-30
|
|
129
|
+
|
|
130
|
+
### Added
|
|
131
|
+
|
|
132
|
+
#### Wire protocol alignment (SaaS-canonical envelope)
|
|
133
|
+
- **`POST /ingest/transcript` accepts SaaS-canonical envelope** — new shape: `{event, session_id, turns[], wire_version (required, regex `^v\d+\.\d+$`), captured_at, client_version, client_scrub_version, client_scrub_hits_by_label, project_id?, cwd?, agent_type?}`. Legacy `{session_id, source, content}` shape still accepted — both parse and ingest correctly, backward-compatible distiller dual-reads.
|
|
134
|
+
- **`GET /version` endpoint** — public endpoint (no Bearer required), returns `{name, version, wire_versions_supported: ['v0.0', 'v1.0'], schema_version: 2, ts: ISO-8601}`. Matches SaaS discovery contract.
|
|
135
|
+
- **`GET /health` wire metadata** — extended response to include `wire_versions_supported` and `schema_version` (was `ok` + `version` only).
|
|
136
|
+
- **Idempotency header support** — `Idempotency-Key` on `POST /ingest/transcript` deduplicates via SHA-256 body hash. New `ingest_idempotency` table (PK: `idempotency_key`, unique index: `(idempotency_key, request_hash)`). Same key + same body → 200 + original `transcript_id` (replay); same key + different body → 409 Conflict.
|
|
137
|
+
|
|
138
|
+
#### Schema extension (migration 002)
|
|
139
|
+
- **`transcripts` table gains 8 new nullable columns**:
|
|
140
|
+
- `event: TEXT` — event type ('pre_compact', 'session_end', 'subagent_stop')
|
|
141
|
+
- `turns: TEXT` — newline-joined `role: text` pairs from `turns[]` array
|
|
142
|
+
- `captured_at: TIMESTAMP` — ISO-8601 event timestamp
|
|
143
|
+
- `client_scrub_version: TEXT` — scrubber version from client
|
|
144
|
+
- `client_scrub_hits_json: TEXT` — stringified `{label: count}` map
|
|
145
|
+
- `client_version: TEXT` — client plugin version
|
|
146
|
+
- `project_id: TEXT` — SaaS project identifier
|
|
147
|
+
- `cwd: TEXT` — working directory context
|
|
148
|
+
- **`wire_version` column on `transcripts`** — TEXT NOT NULL DEFAULT `'v0.0'`. Existing v0.1.x rows automatically backfilled; new rows adopt the sent `wire_version` (or default 'v0.0' if omitted in legacy envelope).
|
|
149
|
+
- **`ingest_idempotency` table** — stores `(idempotency_key TEXT PRIMARY KEY, request_hash TEXT UNIQUE, transcript_id TEXT, created_at TIMESTAMP)`.
|
|
150
|
+
|
|
151
|
+
#### Testing
|
|
152
|
+
- **9 new E2E integration tests** covering dual-envelope parsing, idempotency replay/conflict, `/version` endpoint, `/health` metadata, wire_version backfill. Full integration test suite: 429 passing.
|
|
153
|
+
|
|
154
|
+
### Changed
|
|
155
|
+
|
|
156
|
+
- **No breaking changes** — legacy `{session_id, source, content}` envelope preserved and fully supported. Daemon recognizes both shapes; distiller dual-reads with fallback.
|
|
157
|
+
- **`POST /ingest/transcript` response shape** — now includes: `{summary_memory_id, extraction_job_id, extracted_count, failed_atom_count, scrub_hits: {client, server}, queued_extraction_types}`. Extraction fields stubbed (full job queue in v0.3.0+).
|
|
158
|
+
- **Service metadata** — daemon reports `schema_version: 2` on health and version endpoints.
|
|
159
|
+
|
|
160
|
+
### Commits
|
|
161
|
+
|
|
162
|
+
- `2a6d517` — Migration 002: wire-v1 columns + ingest_idempotency table
|
|
163
|
+
- `df4aef3` — Dual-envelope Zod schema (legacy + SaaS canonical)
|
|
164
|
+
- `c45d762` — Canonical insert + idempotency wired
|
|
165
|
+
- `70a0f2a` — /version endpoint + /health wire-support metadata
|
|
166
|
+
- `4d945ac` — E2E integration tests (9 cases)
|
|
167
|
+
|
|
168
|
+
### Known issues
|
|
169
|
+
|
|
170
|
+
- **KNOWN ISSUE: D-DEF1 — Distill pipeline turn-flattening** *(FIXED in 0.5.0)*: The distill pipeline currently consumes `transcripts.content` as a flat string. Canonical ingests write `JSON.stringify(turns)` into that column. Distillation quality silently degrades on canonical paths until the distill handler is updated to flatten turns to `role: text\n` pairs before pipeline entry.
|
|
171
|
+
- **KNOWN ISSUE: D-DEF2 — `summary_memory_id` semantic change** *(FIXED in 0.5.0)*: The `summary_memory_id` returned by `POST /ingest/transcript` is currently the transcript row UUID. Wave-3 distillation will produce a real summary memory with a different UUID. Clients MUST treat the value as opaque — in 0.5.0 the idempotency row is backfilled with the real memory id once distillation completes.
|
|
172
|
+
|
|
173
|
+
### Related specification
|
|
174
|
+
|
|
175
|
+
- [astramemory-plugin FEAT 4a](https://github.com/astragenie/astramemory-plugin/blob/main/docs/superpowers/specs/2026-06-29-hooks-provider-migration-4a.md) — end-to-end three-repo wire contract convergence (daemon, plugin, SaaS). Daemon v0.2.0 = Phase 2 implementation.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## [0.1.4] - 2026-06-28
|
|
180
|
+
|
|
181
|
+
### Fixed
|
|
182
|
+
|
|
183
|
+
#### Windows install hardening
|
|
184
|
+
- **Startup-folder fallback** when `schtasks /sc onlogon` returns "Access is denied"
|
|
185
|
+
even with `/RU "%USERNAME%" /IT /RL LIMITED`. Adapter now drops a `.cmd` shim into
|
|
186
|
+
`%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\` so the daemon launches
|
|
187
|
+
at next logon without admin privileges.
|
|
188
|
+
- **Auto-read bearer from `secrets.env`** during `astramem-local install` so a
|
|
189
|
+
freshly seeded secrets file is picked up without manual env var export.
|
|
190
|
+
|
|
191
|
+
### Changed
|
|
192
|
+
- `GET /health` and MCP daemon-version constant bumped `0.1.3` → `0.1.4`.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## [0.1.3] - 2026-06-27
|
|
197
|
+
|
|
198
|
+
### Added
|
|
199
|
+
|
|
200
|
+
#### MCP HTTP server (Wave 5)
|
|
201
|
+
- `POST /mcp` — MCP Streamable HTTP transport (JSON-RPC 2.0, stateless per-request).
|
|
202
|
+
Auth enforced by existing Bearer preHandler; no new auth code.
|
|
203
|
+
- 4 MCP tools auto-discovered by Claude Code:
|
|
204
|
+
- `search_memory` — hybrid FTS + vector search with filters (type, repo, project, since).
|
|
205
|
+
- `recall_memory` — top-K semantic recall (alias of search_memory, default k=5).
|
|
206
|
+
- `remember` — direct memory insert, bypasses distillation pipeline.
|
|
207
|
+
- `get_health` — daemon health probe (`{ ok, version }`).
|
|
208
|
+
- Zod-validated input schemas on all 4 tools; structured text/JSON output.
|
|
209
|
+
- 7 integration tests in `tests/mcp/server.test.ts` covering tools/list, each tool/call, and auth gates.
|
|
210
|
+
- Uses `@modelcontextprotocol/sdk@^1.29.0` (`McpServer` + `StreamableHTTPServerTransport`).
|
|
211
|
+
|
|
212
|
+
### Changed
|
|
213
|
+
|
|
214
|
+
- Version bumped from `0.0.1` to `0.1.3`.
|
|
215
|
+
- `GET /health` now reports version `0.1.3`.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## [0.1.0] - 2026-06-27
|
|
220
|
+
|
|
221
|
+
First public release. Covers Milestones 1-5 of the v1 design spec: storage, pipeline,
|
|
222
|
+
distillation, hybrid search, and installer.
|
|
223
|
+
|
|
224
|
+
### Added
|
|
225
|
+
|
|
226
|
+
#### Storage (Wave 1)
|
|
227
|
+
- SQLite schema v1: `sessions`, `messages`, `transcripts`, `memories`, `jobs`, `artifacts`,
|
|
228
|
+
`provider_state`, `budget_spend` tables.
|
|
229
|
+
- FTS5 virtual table `memories_fts` with auto-maintained triggers on insert, update, delete.
|
|
230
|
+
- sqlite-vec virtual table `memories_vec` — 1024-dim FLOAT vector index.
|
|
231
|
+
- `schema_version` migration runner — idempotent, append-only migration files under `migrations/`.
|
|
232
|
+
- WAL mode + `foreign_keys ON` + `synchronous = NORMAL` pragmas applied at DB open.
|
|
233
|
+
- `MemoryRepo` — insert with hash deduplication, FTS5 keyword search.
|
|
234
|
+
- `SqliteVecStore` — upsert and cosine-distance ANN search via sqlite-vec.
|
|
235
|
+
|
|
236
|
+
#### HTTP daemon (Wave 1)
|
|
237
|
+
- Fastify HTTP server bound to `127.0.0.1` (loopback only).
|
|
238
|
+
- `GET /health` — returns `{ok: true, version}`. No auth required.
|
|
239
|
+
- `POST /ingest/transcript` — wire-compatible with `memory-plugin` hooks. Writes session +
|
|
240
|
+
transcript + queues a `distill` job atomically. Requires Bearer token.
|
|
241
|
+
- `POST /recall` — hybrid search with body `{query, k, filters}`.
|
|
242
|
+
- `POST /remember` — direct memory insert, bypasses distillation pipeline.
|
|
243
|
+
- `GET /search` — query-string hybrid search.
|
|
244
|
+
- `GET /memory/:id` — single memory lookup.
|
|
245
|
+
- Zod request validation on all endpoints. 400 on schema failure, 401 on missing/wrong token.
|
|
246
|
+
|
|
247
|
+
#### Pipeline and workers (Wave 2)
|
|
248
|
+
- Job table state machine: `pending -> running -> completed | failed | poison | paused`.
|
|
249
|
+
- In-process polling worker loop — configurable poll interval.
|
|
250
|
+
- Retry with exponential backoff; job transitions to `poison` after 3 failed attempts.
|
|
251
|
+
- Handler registry — `register(kind, handler)` map.
|
|
252
|
+
- `cleanup` handler — prunes sessions and artifacts older than 30 days.
|
|
253
|
+
|
|
254
|
+
#### Hybrid search (Wave 2)
|
|
255
|
+
- Score fusion: `alpha * norm(BM25) + beta * norm(cosine) + gamma * importance + delta * freshness`.
|
|
256
|
+
- Default weights: alpha=0.4, beta=0.4, gamma=0.1, delta=0.1 (config-overridable).
|
|
257
|
+
- Query filter parser: `type:decision`, `repo:astramemory-local`, `since:7d`.
|
|
258
|
+
- FTS-only fallback when no embeddings exist for a memory (beta=0 path).
|
|
259
|
+
|
|
260
|
+
#### Service install (Wave 2)
|
|
261
|
+
- `ServiceAdapter` interface with per-OS implementations: systemd (Linux), launchd (macOS),
|
|
262
|
+
schtasks (Windows).
|
|
263
|
+
- User-scope install — no admin/UAC required on any platform.
|
|
264
|
+
- `astra-memory service install|status|start|stop|uninstall` CLI commands.
|
|
265
|
+
- Doctor checks contributed by each track owner via plugin architecture.
|
|
266
|
+
|
|
267
|
+
#### Providers (Wave 2)
|
|
268
|
+
- `LLMProvider` interface: `chat(messages, opts) -> {text, usage}` + `health()`.
|
|
269
|
+
- `EmbedProvider` interface: `embed(texts) -> Float32Array[]` + `health()`.
|
|
270
|
+
- Ollama LLM adapter — chat via `/api/chat`, health via `/api/tags`. Cost always `$0`.
|
|
271
|
+
- Ollama embed adapter — embed via `/api/embeddings`, validates 1024-dim output.
|
|
272
|
+
- Azure OpenAI LLM adapter — chat completions, cost computed from token usage + pricing table.
|
|
273
|
+
- Azure OpenAI embed adapter — `text-embedding-3-small` with `dimensions=1024` parameter.
|
|
274
|
+
- Contract test suite shared across all four provider implementations.
|
|
275
|
+
|
|
276
|
+
#### Distillation pipeline (Wave 3)
|
|
277
|
+
- 8-stage distillation pipeline: cleanup, normalize, chunk, compact, extract, reduce,
|
|
278
|
+
memory-normalize, embed+index.
|
|
279
|
+
- Stage 1 (cleanup): regex deduplication, whitespace normalization, repeated tool output removal.
|
|
280
|
+
- Stage 2 (normalize): path canonicalization, timestamp normalization, agent name normalization.
|
|
281
|
+
- Stage 3 (chunk): token-aware chunking (~800 tokens), respects turn boundaries.
|
|
282
|
+
- Stage 4 (compact): LLM call per chunk to remove redundancy.
|
|
283
|
+
- Stage 5 (extract): LLM JSON-mode, emits typed atoms. Zod-validated. Retries once on parse
|
|
284
|
+
failure with stricter prompt.
|
|
285
|
+
- Stage 6 (reduce): hash-merge duplicate atoms across chunks.
|
|
286
|
+
- Stage 7 (memory-normalize): canonical text, lowercase entity dictionary, final hash.
|
|
287
|
+
- Stage 8 (embed+index): embed via configured provider, write `memories` row + `memories_vec`
|
|
288
|
+
row + FTS5 update.
|
|
289
|
+
- `ExtractionSchema` (Zod): `{type, text, importance, confidence, evidence}`.
|
|
290
|
+
- Memory types: `decision`, `fact`, `lesson`, `command`, `todo`.
|
|
291
|
+
- Idempotency: same `session_id + source_hash` short-circuits without re-processing.
|
|
292
|
+
- Budget tracker: pre-call cap check, `paused` job state on cap exceeded, per-day spend record.
|
|
293
|
+
- `astra-memory budget` CLI: show today + month spend. `--reset` override (logged).
|
|
294
|
+
|
|
295
|
+
#### Install wizard (Wave 4)
|
|
296
|
+
- `astra-memory init` — interactive wizard using `@inquirer/prompts`.
|
|
297
|
+
- Wizard flow: vector store, embedding provider, LLM provider, data directory, port, budget cap,
|
|
298
|
+
service install.
|
|
299
|
+
- Conditional provider checks: Ollama reachability, model presence, Azure ping.
|
|
300
|
+
- Writes `config.yaml` + `secrets.env` (mode 0600) + generates 32-byte random Bearer token.
|
|
301
|
+
- Runs migrations and doctor on completion; prints next-steps block.
|
|
302
|
+
- `astra-memory token rotate` — generate new token, invalidate old, rewrite secrets.env.
|
|
303
|
+
- `astra-memory token print` — print current Bearer token.
|
|
304
|
+
|
|
305
|
+
#### Doctor (Wave 2-4)
|
|
306
|
+
- `astra-memory doctor` — prints check table; exits 0 if all green, 1 if any red.
|
|
307
|
+
- `--json` mode for CI/scripting.
|
|
308
|
+
- Checks: SQLite writable + WAL, FTS5 + sqlite-vec loadable, daemon reachable, LLM provider
|
|
309
|
+
< 5s, embed provider 1024-dim, pipeline queue not stuck, disk free > 1GB, service unit
|
|
310
|
+
present and active, budget within cap, embedding provider mismatch.
|
|
311
|
+
|
|
312
|
+
#### CI (Wave 4)
|
|
313
|
+
- GitHub Actions matrix: ubuntu-latest, macos-latest, windows-latest x node-20, node-22.
|
|
314
|
+
- sqlite-vec prebuilt verified on all three OS targets.
|
|
315
|
+
|
|
316
|
+
#### Documentation (Wave 4)
|
|
317
|
+
- Full README with architecture diagram, provider matrix, commands index.
|
|
318
|
+
- `docs/migration-from-saas.md` — step-by-step guide for switching from SaaS to local.
|
|
319
|
+
- `docs/configuration.md` — config.yaml reference with all fields and defaults.
|
|
320
|
+
- `docs/providers.md` — Ollama and Azure OpenAI setup instructions.
|
|
321
|
+
- `docs/troubleshooting.md` — common issues and fixes.
|
|
322
|
+
- `docs/contracts.md` — frozen type interfaces for contributors.
|
|
323
|
+
|
|
324
|
+
### Changed
|
|
325
|
+
|
|
326
|
+
- `README.md` replaced Wave 1 stub with full v1 documentation.
|
|
327
|
+
|
|
328
|
+
### Known limitations
|
|
329
|
+
|
|
330
|
+
- Distillation lag: memories are not searchable until the distillation worker processes the
|
|
331
|
+
queue (~5-30s typical with Ollama running locally). Ingest is synchronous; distillation is
|
|
332
|
+
async.
|
|
333
|
+
- Loopback only: daemon binds `127.0.0.1`. Remote access requires `--allow-network` flag (not
|
|
334
|
+
recommended; no TLS in v0.1.0).
|
|
335
|
+
- Single embedding space: all memories must use the same embedding model. Changing the model
|
|
336
|
+
requires `astra-memory rebuild --reembed`.
|
|
337
|
+
- No SaaS sync: local memories are not synchronized to the AstraMemory cloud.
|
|
338
|
+
- No knowledge graph: relationships between memories are not modeled. Entity graph is deferred
|
|
339
|
+
to v1.1.
|
|
340
|
+
|
|
341
|
+
[0.1.0]: https://github.com/astragenie/astramemory-local/releases/tag/v0.1.0
|