@remnic/core 9.69.55 → 9.69.57
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/dist/abort-error.d.ts +5 -6
- package/dist/abort-error.d.ts.map +1 -0
- package/dist/abstraction-nodes.d.ts +12 -13
- package/dist/abstraction-nodes.d.ts.map +1 -0
- package/dist/access-admin-ops-surface.d.ts +20 -153
- package/dist/access-admin-ops-surface.d.ts.map +1 -0
- package/dist/access-admin-ops-surface.js +65 -60
- package/dist/access-audit.d.ts +6 -10
- package/dist/access-audit.d.ts.map +1 -0
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +7 -152
- package/dist/access-authorization-probe.d.ts.map +1 -0
- package/dist/access-authorization-probe.js +66 -61
- package/dist/access-boundary.d.ts +156 -145
- package/dist/access-boundary.d.ts.map +1 -0
- package/dist/access-boundary.js +65 -60
- package/dist/access-citation-namespace.d.ts +3 -3
- package/dist/access-citation-namespace.d.ts.map +1 -0
- package/dist/access-citation.d.ts +6 -7
- package/dist/access-citation.d.ts.map +1 -0
- package/dist/access-cli.d.ts +7 -7
- package/dist/access-cli.d.ts.map +1 -0
- package/dist/access-cli.js +157 -152
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +4 -23
- package/dist/access-coding-context-resolution.d.ts.map +1 -0
- package/dist/access-errors.d.ts +57 -5
- package/dist/access-errors.d.ts.map +1 -0
- package/dist/access-errors.js +13 -3
- package/dist/access-extraction-force-flush.d.ts +5 -150
- package/dist/access-extraction-force-flush.d.ts.map +1 -0
- package/dist/access-extraction-force-flush.js +65 -60
- package/dist/access-health-types.d.ts +7 -30
- package/dist/access-health-types.d.ts.map +1 -0
- package/dist/access-http-briefing.d.ts +5 -150
- package/dist/access-http-briefing.d.ts.map +1 -0
- package/dist/access-http-briefing.js +66 -61
- package/dist/access-http-lcm-compaction.d.ts +12 -156
- package/dist/access-http-lcm-compaction.d.ts.map +1 -0
- package/dist/access-http-lifecycle-flush.d.ts +6 -150
- package/dist/access-http-lifecycle-flush.d.ts.map +1 -0
- package/dist/access-http-offline-stream.d.ts +6 -151
- package/dist/access-http-offline-stream.d.ts.map +1 -0
- package/dist/access-http-query.d.ts +6 -26
- package/dist/access-http-query.d.ts.map +1 -0
- package/dist/access-http-query.js +67 -62
- package/dist/access-http.d.ts +22 -189
- package/dist/access-http.d.ts.map +1 -0
- package/dist/access-http.js +93 -89
- package/dist/access-idempotency.d.ts +5 -5
- package/dist/access-idempotency.d.ts.map +1 -0
- package/dist/access-identity-continuity-surface.d.ts +4 -115
- package/dist/access-identity-continuity-surface.d.ts.map +1 -0
- package/dist/access-identity-continuity-surface.js +65 -60
- package/dist/access-lcm-surface.d.ts +5 -151
- package/dist/access-lcm-surface.d.ts.map +1 -0
- package/dist/access-lcm-surface.js +65 -60
- package/dist/access-mcp-admin-tools.d.ts +4 -5
- package/dist/access-mcp-admin-tools.d.ts.map +1 -0
- package/dist/access-mcp-output-schemas.d.ts +2 -3
- package/dist/access-mcp-output-schemas.d.ts.map +1 -0
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp-shared-context-tools.d.ts +3 -150
- package/dist/access-mcp-shared-context-tools.d.ts.map +1 -0
- package/dist/access-mcp-sse.d.ts +3 -5
- package/dist/access-mcp-sse.d.ts.map +1 -0
- package/dist/access-mcp-tool-names.d.ts +9 -10
- package/dist/access-mcp-tool-names.d.ts.map +1 -0
- package/dist/access-mcp.d.ts +178 -145
- package/dist/access-mcp.d.ts.map +1 -0
- package/dist/access-mcp.js +80 -76
- package/dist/access-memory-search-fanout.d.ts +18 -37
- package/dist/access-memory-search-fanout.d.ts.map +1 -0
- package/dist/access-memory-search-fanout.js +2 -2
- package/dist/access-namespace-preflight.d.ts +18 -22
- package/dist/access-namespace-preflight.d.ts.map +1 -0
- package/dist/access-namespace-preflight.js +65 -60
- package/dist/access-observe-helpers.d.ts +4 -5
- package/dist/access-observe-helpers.d.ts.map +1 -0
- package/dist/access-observe-transcript.d.ts +5 -115
- package/dist/access-observe-transcript.d.ts.map +1 -0
- package/dist/access-observe-write-category.d.ts +5 -42
- package/dist/access-observe-write-category.d.ts.map +1 -0
- package/dist/access-observe-write-category.js +7 -7
- package/dist/access-observe-write-surface.d.ts +6 -151
- package/dist/access-observe-write-surface.d.ts.map +1 -0
- package/dist/access-observe-write-surface.js +65 -60
- package/dist/access-offline-manifest.d.ts +10 -124
- package/dist/access-offline-manifest.d.ts.map +1 -0
- package/dist/access-offline-manifest.js +7 -7
- package/dist/access-operations-batch.d.ts +12 -2
- package/dist/access-operations-batch.d.ts.map +1 -0
- package/dist/access-operations-batch.js +69 -66
- package/dist/access-operations.d.ts +66 -188
- package/dist/access-operations.d.ts.map +1 -0
- package/dist/access-operations.js +76 -73
- package/dist/access-recall-concurrency.d.ts +11 -156
- package/dist/access-recall-concurrency.d.ts.map +1 -0
- package/dist/access-recall-concurrency.js +65 -60
- package/dist/access-recall-diagnostics.d.ts +64 -0
- package/dist/access-recall-diagnostics.d.ts.map +1 -0
- package/dist/access-recall-diagnostics.js +26 -0
- package/dist/access-recall-response.d.ts +7 -151
- package/dist/access-recall-response.d.ts.map +1 -0
- package/dist/access-recall-response.js +65 -60
- package/dist/access-recall-surface.d.ts +11 -152
- package/dist/access-recall-surface.d.ts.map +1 -0
- package/dist/access-recall-surface.js +65 -60
- package/dist/access-schema.d.ts +106 -124
- package/dist/access-schema.d.ts.map +1 -0
- package/dist/access-schema.js +3 -3
- package/dist/access-service-helpers.d.ts +33 -145
- package/dist/access-service-helpers.d.ts.map +1 -0
- package/dist/access-service.d.ts +1825 -145
- package/dist/access-service.d.ts.map +1 -0
- package/dist/access-service.js +65 -60
- package/dist/access-surface-catalog.d.ts +7 -154
- package/dist/access-surface-catalog.d.ts.map +1 -0
- package/dist/access-surface-catalog.js +69 -62
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-token-capabilities.d.ts +19 -22
- package/dist/access-token-capabilities.d.ts.map +1 -0
- package/dist/access-token-capabilities.js +2 -2
- package/dist/access-wearables-meetings-surface.d.ts +14 -54
- package/dist/access-wearables-meetings-surface.d.ts.map +1 -0
- package/dist/action-confidence.d.ts +19 -40
- package/dist/action-confidence.d.ts.map +1 -0
- package/dist/active-context-config.d.ts +7 -8
- package/dist/active-context-config.d.ts.map +1 -0
- package/dist/active-context-transform.d.ts +31 -33
- package/dist/active-context-transform.d.ts.map +1 -0
- package/dist/active-memory-bridge.d.ts +10 -28
- package/dist/active-memory-bridge.d.ts.map +1 -0
- package/dist/active-recall.d.ts +11 -30
- package/dist/active-recall.d.ts.map +1 -0
- package/dist/active-recall.js +23 -23
- package/dist/activity/config.d.ts +24 -0
- package/dist/activity/config.d.ts.map +1 -0
- package/dist/activity/digest.d.ts +15 -35
- package/dist/activity/digest.d.ts.map +1 -0
- package/dist/activity/dwell.d.ts +14 -0
- package/dist/activity/dwell.d.ts.map +1 -0
- package/dist/activity/from-ms.d.ts +7 -0
- package/dist/activity/from-ms.d.ts.map +1 -0
- package/dist/activity/heading-level.d.ts +15 -0
- package/dist/activity/heading-level.d.ts.map +1 -0
- package/dist/activity/heading-title.d.ts +15 -0
- package/dist/activity/heading-title.d.ts.map +1 -0
- package/dist/activity/index.d.ts +46 -0
- package/dist/activity/index.d.ts.map +1 -0
- package/dist/activity/journal-extract.d.ts +68 -0
- package/dist/activity/journal-extract.d.ts.map +1 -0
- package/dist/activity/journal-heading.d.ts +26 -0
- package/dist/activity/journal-heading.d.ts.map +1 -0
- package/dist/activity/journal-path.d.ts +9 -0
- package/dist/activity/journal-path.d.ts.map +1 -0
- package/dist/activity/journal-read.d.ts +31 -0
- package/dist/activity/journal-read.d.ts.map +1 -0
- package/dist/activity/journal-section.d.ts +17 -0
- package/dist/activity/journal-section.d.ts.map +1 -0
- package/dist/activity/journal-source.d.ts +25 -0
- package/dist/activity/journal-source.d.ts.map +1 -0
- package/dist/activity/journal-state.d.ts +21 -0
- package/dist/activity/journal-state.d.ts.map +1 -0
- package/dist/activity/journal-state.lock-worker.d.ts +2 -0
- package/dist/activity/journal-state.lock-worker.d.ts.map +1 -0
- package/dist/activity/journal-strip.d.ts +6 -0
- package/dist/activity/journal-strip.d.ts.map +1 -0
- package/dist/activity/journal-vault-prereq.d.ts +23 -0
- package/dist/activity/journal-vault-prereq.d.ts.map +1 -0
- package/dist/activity/journal-vault-provenance.d.ts +12 -0
- package/dist/activity/journal-vault-provenance.d.ts.map +1 -0
- package/dist/activity/journal-vault-read.d.ts +32 -0
- package/dist/activity/journal-vault-read.d.ts.map +1 -0
- package/dist/activity/journal.d.ts +29 -0
- package/dist/activity/journal.d.ts.map +1 -0
- package/dist/activity/memory-gen.d.ts +71 -0
- package/dist/activity/memory-gen.d.ts.map +1 -0
- package/dist/activity/pipeline.d.ts +44 -0
- package/dist/activity/pipeline.d.ts.map +1 -0
- package/dist/activity/privacy-delete-plan.d.ts +22 -0
- package/dist/activity/privacy-delete-plan.d.ts.map +1 -0
- package/dist/activity/privacy-enabled.d.ts +16 -0
- package/dist/activity/privacy-enabled.d.ts.map +1 -0
- package/dist/activity/privacy-gate-resolve.d.ts +17 -0
- package/dist/activity/privacy-gate-resolve.d.ts.map +1 -0
- package/dist/activity/privacy-keys.d.ts +8 -0
- package/dist/activity/privacy-keys.d.ts.map +1 -0
- package/dist/activity/privacy-redact.d.ts +13 -0
- package/dist/activity/privacy-redact.d.ts.map +1 -0
- package/dist/activity/privacy-status.d.ts +30 -0
- package/dist/activity/privacy-status.d.ts.map +1 -0
- package/dist/activity/privacy-window.d.ts +15 -0
- package/dist/activity/privacy-window.d.ts.map +1 -0
- package/dist/activity/privacy.d.ts +17 -0
- package/dist/activity/privacy.d.ts.map +1 -0
- package/dist/activity/reindex.d.ts +23 -0
- package/dist/activity/reindex.d.ts.map +1 -0
- package/dist/activity/retain-days.d.ts +8 -0
- package/dist/activity/retain-days.d.ts.map +1 -0
- package/dist/activity/runner.d.ts +100 -0
- package/dist/activity/runner.d.ts.map +1 -0
- package/dist/activity/scheduler.d.ts +90 -0
- package/dist/activity/scheduler.d.ts.map +1 -0
- package/dist/activity/source-client.d.ts +24 -0
- package/dist/activity/source-client.d.ts.map +1 -0
- package/dist/activity/store.d.ts +53 -0
- package/dist/activity/store.d.ts.map +1 -0
- package/dist/activity/sync-registration.d.ts +83 -0
- package/dist/activity/sync-registration.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-batch-empty.d.ts +8 -0
- package/dist/activity/timeline/analysis-batch-empty.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-batch.d.ts +12 -0
- package/dist/activity/timeline/analysis-batch.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-claim.d.ts +14 -0
- package/dist/activity/timeline/analysis-claim.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-dup.d.ts +8 -0
- package/dist/activity/timeline/analysis-dup.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-empty.d.ts +8 -0
- package/dist/activity/timeline/analysis-empty.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-evidence.d.ts +12 -0
- package/dist/activity/timeline/analysis-evidence.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-failure.d.ts +19 -0
- package/dist/activity/timeline/analysis-failure.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-max.d.ts +8 -0
- package/dist/activity/timeline/analysis-max.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-metadata.d.ts +30 -0
- package/dist/activity/timeline/analysis-metadata.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-order.d.ts +8 -0
- package/dist/activity/timeline/analysis-order.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-overlap.d.ts +8 -0
- package/dist/activity/timeline/analysis-overlap.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-prompt.d.ts +13 -0
- package/dist/activity/timeline/analysis-prompt.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-provider.d.ts +84 -0
- package/dist/activity/timeline/analysis-provider.d.ts.map +1 -0
- package/dist/activity/timeline/analysis-run.d.ts +40 -0
- package/dist/activity/timeline/analysis-run.d.ts.map +1 -0
- package/dist/activity/timeline/analysis.d.ts +63 -0
- package/dist/activity/timeline/analysis.d.ts.map +1 -0
- package/dist/activity/timeline/build.d.ts +50 -0
- package/dist/activity/timeline/build.d.ts.map +1 -0
- package/dist/activity/timeline/categories.d.ts +27 -0
- package/dist/activity/timeline/categories.d.ts.map +1 -0
- package/dist/activity/timeline/classify.d.ts +20 -0
- package/dist/activity/timeline/classify.d.ts.map +1 -0
- package/dist/activity/timeline/corrections.d.ts +37 -0
- package/dist/activity/timeline/corrections.d.ts.map +1 -0
- package/dist/activity/timeline/index.d.ts +35 -0
- package/dist/activity/timeline/index.d.ts.map +1 -0
- package/dist/activity/timeline/journal-recap-persist.d.ts +14 -0
- package/dist/activity/timeline/journal-recap-persist.d.ts.map +1 -0
- package/dist/activity/timeline/journal-recap.d.ts +21 -0
- package/dist/activity/timeline/journal-recap.d.ts.map +1 -0
- package/dist/activity/timeline/publish-cli.d.ts +17 -0
- package/dist/activity/timeline/publish-cli.d.ts.map +1 -0
- package/dist/activity/timeline/query.d.ts +86 -0
- package/dist/activity/timeline/query.d.ts.map +1 -0
- package/dist/activity/timeline/recap-card-count.d.ts +7 -0
- package/dist/activity/timeline/recap-card-count.d.ts.map +1 -0
- package/dist/activity/timeline/recap-card-id.d.ts +14 -0
- package/dist/activity/timeline/recap-card-id.d.ts.map +1 -0
- package/dist/activity/timeline/recap-date.d.ts +15 -0
- package/dist/activity/timeline/recap-date.d.ts.map +1 -0
- package/dist/activity/timeline/recap-empty.d.ts +8 -0
- package/dist/activity/timeline/recap-empty.d.ts.map +1 -0
- package/dist/activity/timeline/recap-export-range.d.ts +55 -0
- package/dist/activity/timeline/recap-export-range.d.ts.map +1 -0
- package/dist/activity/timeline/recap-export.d.ts +48 -0
- package/dist/activity/timeline/recap-export.d.ts.map +1 -0
- package/dist/activity/timeline/recap-fallback.d.ts +47 -0
- package/dist/activity/timeline/recap-fallback.d.ts.map +1 -0
- package/dist/activity/timeline/recap-id.d.ts +8 -0
- package/dist/activity/timeline/recap-id.d.ts.map +1 -0
- package/dist/activity/timeline/recap-markdown.d.ts +15 -0
- package/dist/activity/timeline/recap-markdown.d.ts.map +1 -0
- package/dist/activity/timeline/recap-merge-edits.d.ts +24 -0
- package/dist/activity/timeline/recap-merge-edits.d.ts.map +1 -0
- package/dist/activity/timeline/recap-sort-key.d.ts +9 -0
- package/dist/activity/timeline/recap-sort-key.d.ts.map +1 -0
- package/dist/activity/timeline/recap-tz.d.ts +15 -0
- package/dist/activity/timeline/recap-tz.d.ts.map +1 -0
- package/dist/activity/timeline/recap-window.d.ts +19 -0
- package/dist/activity/timeline/recap-window.d.ts.map +1 -0
- package/dist/activity/timeline/regenerate.d.ts +84 -0
- package/dist/activity/timeline/regenerate.d.ts.map +1 -0
- package/dist/activity/timeline/types.d.ts +98 -0
- package/dist/activity/timeline/types.d.ts.map +1 -0
- package/dist/activity/timeline/week-config-hash.d.ts +13 -0
- package/dist/activity/timeline/week-config-hash.d.ts.map +1 -0
- package/dist/activity/timeline/week-count.d.ts +7 -0
- package/dist/activity/timeline/week-count.d.ts.map +1 -0
- package/dist/activity/timeline/week-dashboard.d.ts +79 -0
- package/dist/activity/timeline/week-dashboard.d.ts.map +1 -0
- package/dist/activity/timeline/week-days.d.ts +6 -0
- package/dist/activity/timeline/week-days.d.ts.map +1 -0
- package/dist/activity/timeline/week-export.d.ts +27 -0
- package/dist/activity/timeline/week-export.d.ts.map +1 -0
- package/dist/activity/timeline/week-iso.d.ts +16 -0
- package/dist/activity/timeline/week-iso.d.ts.map +1 -0
- package/dist/activity/timeline/week-monday.d.ts +3 -0
- package/dist/activity/timeline/week-monday.d.ts.map +1 -0
- package/dist/activity/timeline/week-previous.d.ts +39 -0
- package/dist/activity/timeline/week-previous.d.ts.map +1 -0
- package/dist/activity/timeline/week-range.d.ts +10 -0
- package/dist/activity/timeline/week-range.d.ts.map +1 -0
- package/dist/activity/timeline/week-recurring.d.ts +21 -0
- package/dist/activity/timeline/week-recurring.d.ts.map +1 -0
- package/dist/activity/timeline/week-snapshot.d.ts +17 -0
- package/dist/activity/timeline/week-snapshot.d.ts.map +1 -0
- package/dist/activity/timeline/week-span.d.ts +2 -0
- package/dist/activity/timeline/week-span.d.ts.map +1 -0
- package/dist/activity/timeline/week-sunday.d.ts +3 -0
- package/dist/activity/timeline/week-sunday.d.ts.map +1 -0
- package/dist/activity/timeline/weekly-persist.d.ts +18 -0
- package/dist/activity/timeline/weekly-persist.d.ts.map +1 -0
- package/dist/activity/timeline/weekly.d.ts +42 -0
- package/dist/activity/timeline/weekly.d.ts.map +1 -0
- package/dist/activity/to-ms.d.ts +7 -0
- package/dist/activity/to-ms.d.ts.map +1 -0
- package/dist/activity/types.d.ts +208 -0
- package/dist/activity/types.d.ts.map +1 -0
- package/dist/activity/vault-begin.d.ts +8 -0
- package/dist/activity/vault-begin.d.ts.map +1 -0
- package/dist/activity/vault-body-trim.d.ts +7 -0
- package/dist/activity/vault-body-trim.d.ts.map +1 -0
- package/dist/activity/vault-dry-run.d.ts +13 -0
- package/dist/activity/vault-dry-run.d.ts.map +1 -0
- package/dist/activity/vault-end.d.ts +8 -0
- package/dist/activity/vault-end.d.ts.map +1 -0
- package/dist/activity/vault-frontmatter.d.ts +41 -0
- package/dist/activity/vault-frontmatter.d.ts.map +1 -0
- package/dist/activity/vault-insert.d.ts +24 -0
- package/dist/activity/vault-insert.d.ts.map +1 -0
- package/dist/activity/vault-join.d.ts +2 -0
- package/dist/activity/vault-join.d.ts.map +1 -0
- package/dist/activity/vault-marker.d.ts +12 -0
- package/dist/activity/vault-marker.d.ts.map +1 -0
- package/dist/activity/vault-name-trim.d.ts +7 -0
- package/dist/activity/vault-name-trim.d.ts.map +1 -0
- package/dist/activity/vault-path.d.ts +20 -0
- package/dist/activity/vault-path.d.ts.map +1 -0
- package/dist/activity/vault-publish.d.ts +71 -0
- package/dist/activity/vault-publish.d.ts.map +1 -0
- package/dist/activity/vault-publisher.d.ts +58 -0
- package/dist/activity/vault-publisher.d.ts.map +1 -0
- package/dist/activity/vault-region-pair.d.ts +17 -0
- package/dist/activity/vault-region-pair.d.ts.map +1 -0
- package/dist/activity/vault-region.d.ts +24 -0
- package/dist/activity/vault-region.d.ts.map +1 -0
- package/dist/activity/vault-status.d.ts +32 -0
- package/dist/activity/vault-status.d.ts.map +1 -0
- package/dist/activity/vault-suffix.d.ts +7 -0
- package/dist/activity/vault-suffix.d.ts.map +1 -0
- package/dist/activity/vault-wikilink.d.ts +2 -0
- package/dist/activity/vault-wikilink.d.ts.map +1 -0
- package/dist/activity/window-order.d.ts +17 -0
- package/dist/activity/window-order.d.ts.map +1 -0
- package/dist/adapters/claude-code.d.ts +3 -5
- package/dist/adapters/claude-code.d.ts.map +1 -0
- package/dist/adapters/codex.d.ts +3 -5
- package/dist/adapters/codex.d.ts.map +1 -0
- package/dist/adapters/grok.d.ts +23 -0
- package/dist/adapters/grok.d.ts.map +1 -0
- package/dist/adapters/hermes.d.ts +3 -5
- package/dist/adapters/hermes.d.ts.map +1 -0
- package/dist/adapters/index.d.ts +9 -51
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/opencode.d.ts +22 -0
- package/dist/adapters/opencode.d.ts.map +1 -0
- package/dist/adapters/registry.d.ts +3 -5
- package/dist/adapters/registry.d.ts.map +1 -0
- package/dist/adapters/registry.js +2 -2
- package/dist/adapters/replit.d.ts +3 -5
- package/dist/adapters/replit.d.ts.map +1 -0
- package/dist/adapters/types.d.ts +5 -6
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/admin/admin-surfaces.d.ts +362 -0
- package/dist/admin/admin-surfaces.d.ts.map +1 -0
- package/dist/ambient-provenance.d.ts +10 -30
- package/dist/ambient-provenance.d.ts.map +1 -0
- package/dist/archive-mutation-version.d.ts +8 -9
- package/dist/archive-mutation-version.d.ts.map +1 -0
- package/dist/artifact-search.d.ts +5 -25
- package/dist/artifact-search.d.ts.map +1 -0
- package/dist/auto-sync-CWSZDLLW.js +1 -1
- package/dist/background-generation-config.d.ts +3 -4
- package/dist/background-generation-config.d.ts.map +1 -0
- package/dist/background-generation.d.ts +5 -24
- package/dist/background-generation.d.ts.map +1 -0
- package/dist/behavior-learner.d.ts +6 -25
- package/dist/behavior-learner.d.ts.map +1 -0
- package/dist/behavior-signals.d.ts +5 -24
- package/dist/behavior-signals.d.ts.map +1 -0
- package/dist/binary-lifecycle/backend.d.ts +46 -0
- package/dist/binary-lifecycle/backend.d.ts.map +1 -0
- package/dist/binary-lifecycle/index.d.ts +13 -0
- package/dist/binary-lifecycle/index.d.ts.map +1 -0
- package/dist/binary-lifecycle/manifest.d.ts +22 -0
- package/dist/binary-lifecycle/manifest.d.ts.map +1 -0
- package/dist/binary-lifecycle/pipeline.d.ts +33 -0
- package/dist/binary-lifecycle/pipeline.d.ts.map +1 -0
- package/dist/binary-lifecycle/scanner.d.ts +21 -0
- package/dist/binary-lifecycle/scanner.d.ts.map +1 -0
- package/dist/binary-lifecycle/types.d.ts +70 -0
- package/dist/binary-lifecycle/types.d.ts.map +1 -0
- package/dist/bootstrap.d.ts +6 -115
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bounded-jsonl-state.d.ts +5 -5
- package/dist/bounded-jsonl-state.d.ts.map +1 -0
- package/dist/boxes.d.ts +9 -9
- package/dist/boxes.d.ts.map +1 -0
- package/dist/briefing-window.d.ts +8 -40
- package/dist/briefing-window.d.ts.map +1 -0
- package/dist/briefing.d.ts +28 -61
- package/dist/briefing.d.ts.map +1 -0
- package/dist/briefing.js +14 -14
- package/dist/buffer-surprise-report.d.ts +6 -26
- package/dist/buffer-surprise-report.d.ts.map +1 -0
- package/dist/buffer-surprise.d.ts +5 -6
- package/dist/buffer-surprise.d.ts.map +1 -0
- package/dist/buffer-turn-helpers.d.ts +32 -18
- package/dist/buffer-turn-helpers.d.ts.map +1 -0
- package/dist/buffer.d.ts +9 -41
- package/dist/buffer.d.ts.map +1 -0
- package/dist/buffer.js +3 -3
- package/dist/bulk-import/index.d.ts +4 -44
- package/dist/bulk-import/index.d.ts.map +1 -0
- package/dist/bulk-import/pipeline.d.ts +30 -0
- package/dist/bulk-import/pipeline.d.ts.map +1 -0
- package/dist/bulk-import/registry.d.ts +23 -0
- package/dist/bulk-import/registry.d.ts.map +1 -0
- package/dist/bulk-import/types.d.ts +83 -0
- package/dist/bulk-import/types.d.ts.map +1 -0
- package/dist/calibration.d.ts +14 -37
- package/dist/calibration.d.ts.map +1 -0
- package/dist/capabilities.d.ts +64 -84
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capsule-cli.d.ts +23 -24
- package/dist/capsule-cli.d.ts.map +1 -0
- package/dist/capsule-crypto-7FJQINUR.js +18 -0
- package/dist/causal-behavior.d.ts +9 -38
- package/dist/causal-behavior.d.ts.map +1 -0
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.d.ts +13 -17
- package/dist/causal-chain.d.ts.map +1 -0
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +10 -29
- package/dist/causal-consolidation.d.ts.map +1 -0
- package/dist/causal-consolidation.js +17 -17
- package/dist/causal-retrieval.d.ts +6 -11
- package/dist/causal-retrieval.d.ts.map +1 -0
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +7 -29
- package/dist/causal-trajectory-graph.d.ts.map +1 -0
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.d.ts +23 -25
- package/dist/causal-trajectory.d.ts.map +1 -0
- package/dist/causal-trajectory.js +1 -1
- package/dist/census-validation.d.ts +5 -6
- package/dist/census-validation.d.ts.map +1 -0
- package/dist/chat/chat-cli.d.ts +38 -0
- package/dist/chat/chat-cli.d.ts.map +1 -0
- package/dist/chat/chat-config.d.ts +25 -0
- package/dist/chat/chat-config.d.ts.map +1 -0
- package/dist/chat/chat-engine.d.ts +82 -0
- package/dist/chat/chat-engine.d.ts.map +1 -0
- package/dist/chat/chat-executor.d.ts +26 -0
- package/dist/chat/chat-executor.d.ts.map +1 -0
- package/dist/chat/chat-factory.d.ts +46 -0
- package/dist/chat/chat-factory.d.ts.map +1 -0
- package/dist/chat/chat-http.d.ts +83 -0
- package/dist/chat/chat-http.d.ts.map +1 -0
- package/dist/chat/chat-llm.d.ts +77 -0
- package/dist/chat/chat-llm.d.ts.map +1 -0
- package/dist/chat/chat-session.d.ts +118 -0
- package/dist/chat/chat-session.d.ts.map +1 -0
- package/dist/chat/chat-system-prompt.d.ts +23 -0
- package/dist/chat/chat-system-prompt.d.ts.map +1 -0
- package/dist/chat/chat-tools.d.ts +22 -0
- package/dist/chat/chat-tools.d.ts.map +1 -0
- package/dist/chat/chat-types.d.ts +134 -0
- package/dist/chat/chat-types.d.ts.map +1 -0
- package/dist/chunk-2CBWEIS4.js +1286 -0
- package/dist/chunk-2JQZSQXI.js +81 -0
- package/dist/chunk-2KHIBLO5.js +33 -0
- package/dist/chunk-2KHIBLO5.js.map +1 -0
- package/dist/chunk-2NLLXCJG.js +112 -0
- package/dist/chunk-2WMXZYMS.js +25 -0
- package/dist/chunk-34ZGBAGE.js +61 -0
- package/dist/chunk-36S7UHAW.js +623 -0
- package/dist/chunk-3JLWSFTV.js +801 -0
- package/dist/chunk-3MUKQQ7A.js +157 -0
- package/dist/chunk-3MUKQQ7A.js.map +1 -0
- package/dist/chunk-3RZOLUZT.js +140 -0
- package/dist/chunk-3SL52JKD.js +160 -0
- package/dist/chunk-4ALOINQ4.js +18512 -0
- package/dist/chunk-4ALOINQ4.js.map +1 -0
- package/dist/chunk-4QEZS7PK.js +502 -0
- package/dist/chunk-52VL6LCY.js +648 -0
- package/dist/chunk-52VL6LCY.js.map +1 -0
- package/dist/chunk-5HFVWYHL.js +111 -0
- package/dist/chunk-5HFVWYHL.js.map +1 -0
- package/dist/chunk-5QRYGLZN.js +35 -0
- package/dist/chunk-5R3C5LEZ.js +263 -0
- package/dist/chunk-634UKELB.js +77 -0
- package/dist/chunk-64JK4TL7.js +801 -0
- package/dist/chunk-6E5GYDIE.js +141 -0
- package/dist/chunk-6ISP2EN2.js +51 -0
- package/dist/chunk-6RD7MSIO.js +212 -0
- package/dist/chunk-6UDLN4IA.js +70 -0
- package/dist/chunk-754XN6LX.js +256 -0
- package/dist/chunk-7H2LEYYJ.js +256 -0
- package/dist/chunk-A7AISUJI.js +103 -0
- package/dist/chunk-AULKCNZW.js +727 -0
- package/dist/chunk-B7SSU55V.js +1686 -0
- package/dist/chunk-BICNRVEC.js +224 -0
- package/dist/chunk-BJI2D4SU.js +53 -0
- package/dist/chunk-BQB5ZMYO.js +28 -0
- package/dist/chunk-BSDBDFKZ.js +168 -0
- package/dist/chunk-BSDBDFKZ.js.map +1 -0
- package/dist/chunk-C5CPYMLX.js +315 -0
- package/dist/chunk-C6LRFPZL.js +4007 -0
- package/dist/chunk-C6LRFPZL.js.map +1 -0
- package/dist/chunk-CS2JO77A.js +95 -0
- package/dist/chunk-DTABICJ3.js +549 -0
- package/dist/chunk-DXODYQ7J.js +319 -0
- package/dist/chunk-DXODYQ7J.js.map +1 -0
- package/dist/chunk-E6UNM67F.js +432 -0
- package/dist/chunk-ENUI3IO7.js +271 -0
- package/dist/chunk-FF2XYADH.js +1084 -0
- package/dist/chunk-FF6N7BXC.js +389 -0
- package/dist/chunk-FNQEXI3D.js +22 -0
- package/dist/chunk-FNQEXI3D.js.map +1 -0
- package/dist/chunk-FSXD6Y4H.js +203 -0
- package/dist/chunk-GK6NOQE6.js +3400 -0
- package/dist/chunk-GRSFFLUY.js +43 -0
- package/dist/chunk-GWK7FEUL.js +761 -0
- package/dist/chunk-GWQVMKUJ.js +218 -0
- package/dist/chunk-H7O5L2IQ.js +3560 -0
- package/dist/chunk-H7O5L2IQ.js.map +1 -0
- package/dist/chunk-HKHZWJ3E.js +63 -0
- package/dist/chunk-IAZPYX6W.js +182 -0
- package/dist/chunk-IG747LRN.js +189 -0
- package/dist/chunk-IK63WA5A.js +30 -0
- package/dist/chunk-IRGQYQQ7.js +143 -0
- package/dist/chunk-IRGQYQQ7.js.map +1 -0
- package/dist/chunk-IUD6NLNM.js +24 -0
- package/dist/chunk-JSJZ2NXS.js +9782 -0
- package/dist/chunk-JUOJGZPV.js +566 -0
- package/dist/chunk-KA4U5GQN.js +960 -0
- package/dist/chunk-KQAFEZQX.js +264 -0
- package/dist/chunk-L4WBADKG.js +72 -0
- package/dist/chunk-LAL4B37X.js +275 -0
- package/dist/chunk-LELJRLPY.js +253 -0
- package/dist/chunk-LMMQKZK3.js +403 -0
- package/dist/chunk-LQ23DMTT.js +74 -0
- package/dist/chunk-LV6ZB6CA.js +285 -0
- package/dist/chunk-M5IJP3YW.js +5505 -0
- package/dist/chunk-MMMYRC7Q.js +606 -0
- package/dist/chunk-MMMYRC7Q.js.map +1 -0
- package/dist/chunk-MWZMVLXL.js +415 -0
- package/dist/chunk-MZUQVWVC.js +72 -0
- package/dist/chunk-MZUQVWVC.js.map +1 -0
- package/dist/chunk-N4VCHRLD.js +29 -0
- package/dist/chunk-NKXHCCLB.js +879 -0
- package/dist/chunk-NVCWA4QC.js +112 -0
- package/dist/chunk-ONWVMYHX.js +122 -0
- package/dist/chunk-P6P35FY4.js +54 -0
- package/dist/chunk-P7M22CYB.js +346 -0
- package/dist/chunk-QMWKENNK.js +111 -0
- package/dist/chunk-QOPB6KE3.js +1530 -0
- package/dist/chunk-RBULO7DO.js +223 -0
- package/dist/chunk-RDESQOEE.js +1008 -0
- package/dist/chunk-RMF763SX.js +115 -0
- package/dist/chunk-RN6ZCNM5.js +321 -0
- package/dist/chunk-S2OBXHMN.js +11341 -0
- package/dist/chunk-S3JPD4N7.js +216 -0
- package/dist/chunk-SF6RFI5Z.js +165 -0
- package/dist/chunk-SJV3AOZ2.js +2453 -0
- package/dist/chunk-SLULR4GC.js +202 -0
- package/dist/chunk-TFXXMTHV.js +1476 -0
- package/dist/chunk-TYP7GYRI.js +216 -0
- package/dist/chunk-TYZK56OA.js +2440 -0
- package/dist/chunk-VLDVNZQE.js +921 -0
- package/dist/chunk-W6YK672C.js +511 -0
- package/dist/chunk-X2NFFBTO.js +576 -0
- package/dist/chunk-X45KZOT2.js +1917 -0
- package/dist/chunk-X7Y7WX73.js +249 -0
- package/dist/chunk-XIXM6G7I.js +43 -0
- package/dist/chunk-XLXYARWC.js +210 -0
- package/dist/chunk-XVW52M6I.js +223 -0
- package/dist/chunk-YHU5XUF4.js +342 -0
- package/dist/chunk-YRH3C2OJ.js +73 -0
- package/dist/chunk-YXQE67A7.js +137 -0
- package/dist/chunk-ZHUVMSHI.js +731 -0
- package/dist/chunk-ZHXSOMYH.js +297 -0
- package/dist/chunk-ZIEZJMFW.js +768 -0
- package/dist/chunk-ZMT4ZVJU.js +31013 -0
- package/dist/chunk-ZMT4ZVJU.js.map +1 -0
- package/dist/chunk-ZOASYXBS.js +629 -0
- package/dist/chunk-ZOASYXBS.js.map +1 -0
- package/dist/chunk-ZSEFGDCI.js +98 -0
- package/dist/chunk-ZX5N5D6M.js +65 -0
- package/dist/chunking.d.ts +9 -10
- package/dist/chunking.d.ts.map +1 -0
- package/dist/citations.d.ts +8 -9
- package/dist/citations.d.ts.map +1 -0
- package/dist/cli/creation-ledger-commands.d.ts +24 -0
- package/dist/cli/creation-ledger-commands.d.ts.map +1 -0
- package/dist/cli/deep-recall-commands.d.ts +19 -0
- package/dist/cli/deep-recall-commands.d.ts.map +1 -0
- package/dist/cli/harmonic-search.d.ts +12 -0
- package/dist/cli/harmonic-search.d.ts.map +1 -0
- package/dist/cli/meetings-commands.d.ts +16 -0
- package/dist/cli/meetings-commands.d.ts.map +1 -0
- package/dist/cli/memory-browse-commands.d.ts +11 -0
- package/dist/cli/memory-browse-commands.d.ts.map +1 -0
- package/dist/cli/okf-commands.d.ts +5 -0
- package/dist/cli/okf-commands.d.ts.map +1 -0
- package/dist/cli/recall-navigation-commands.d.ts +11 -0
- package/dist/cli/recall-navigation-commands.d.ts.map +1 -0
- package/dist/cli/research-status-commands.d.ts +26 -0
- package/dist/cli/research-status-commands.d.ts.map +1 -0
- package/dist/cli/skills-commands.d.ts +14 -0
- package/dist/cli/skills-commands.d.ts.map +1 -0
- package/dist/cli/timeline-publish-commands.d.ts +11 -0
- package/dist/cli/timeline-publish-commands.d.ts.map +1 -0
- package/dist/cli-fallback.d.ts +13 -14
- package/dist/cli-fallback.d.ts.map +1 -0
- package/dist/cli.d.ts +1036 -165
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +120 -116
- package/dist/coding/action-gate.d.ts +176 -0
- package/dist/coding/action-gate.d.ts.map +1 -0
- package/dist/coding/architecture-card.d.ts +135 -0
- package/dist/coding/architecture-card.d.ts.map +1 -0
- package/dist/coding/architecture-surfaces.d.ts +166 -0
- package/dist/coding/architecture-surfaces.d.ts.map +1 -0
- package/dist/coding/codegraph-runtime.d.ts +321 -0
- package/dist/coding/codegraph-runtime.d.ts.map +1 -0
- package/dist/coding/codegraph-surfaces.d.ts +191 -0
- package/dist/coding/codegraph-surfaces.d.ts.map +1 -0
- package/dist/coding/coding-graph-types.d.ts +16 -17
- package/dist/coding/coding-graph-types.d.ts.map +1 -0
- package/dist/coding/coding-knowledge-config.d.ts +69 -0
- package/dist/coding/coding-knowledge-config.d.ts.map +1 -0
- package/dist/coding/coding-namespace.d.ts +214 -0
- package/dist/coding/coding-namespace.d.ts.map +1 -0
- package/dist/coding/decision-records.d.ts +120 -0
- package/dist/coding/decision-records.d.ts.map +1 -0
- package/dist/coding/decision-surfaces.d.ts +143 -0
- package/dist/coding/decision-surfaces.d.ts.map +1 -0
- package/dist/coding/export-okf-codegraph.d.ts +9 -28
- package/dist/coding/export-okf-codegraph.d.ts.map +1 -0
- package/dist/coding/export-okf-codegraph.js +13 -13
- package/dist/coding/git-context.d.ts +92 -0
- package/dist/coding/git-context.d.ts.map +1 -0
- package/dist/coding/optional-coding-graph.d.ts +9 -10
- package/dist/coding/optional-coding-graph.d.ts.map +1 -0
- package/dist/coding/pre-action-gate.d.ts +58 -18
- package/dist/coding/pre-action-gate.d.ts.map +1 -0
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/coding/review-context.d.ts +147 -0
- package/dist/coding/review-context.d.ts.map +1 -0
- package/dist/coding/session-delta-surfaces.d.ts +138 -0
- package/dist/coding/session-delta-surfaces.d.ts.map +1 -0
- package/dist/coding/session-delta.d.ts +201 -0
- package/dist/coding/session-delta.d.ts.map +1 -0
- package/dist/coding/structural-context.d.ts +194 -0
- package/dist/coding/structural-context.d.ts.map +1 -0
- package/dist/coding/structural-subprocess-provider.d.ts +50 -0
- package/dist/coding/structural-subprocess-provider.d.ts.map +1 -0
- package/dist/commitment-ledger.d.ts +13 -14
- package/dist/commitment-ledger.d.ts.map +1 -0
- package/dist/compat/checks.d.ts +3 -5
- package/dist/compat/checks.d.ts.map +1 -0
- package/dist/compat/codex-cli-fallback.d.ts +15 -1
- package/dist/compat/codex-cli-fallback.d.ts.map +1 -0
- package/dist/compat/codex-thread-key.d.ts +15 -1
- package/dist/compat/codex-thread-key.d.ts.map +1 -0
- package/dist/compat/types.d.ts +7 -8
- package/dist/compat/types.d.ts.map +1 -0
- package/dist/compounding/engine.d.ts +11 -44
- package/dist/compounding/engine.d.ts.map +1 -0
- package/dist/compounding/engine.js +14 -14
- package/dist/compounding/preference-consolidator.d.ts +10 -37
- package/dist/compounding/preference-consolidator.d.ts.map +1 -0
- package/dist/compression-optimizer.d.ts +10 -29
- package/dist/compression-optimizer.d.ts.map +1 -0
- package/dist/config-discovery.d.ts +4 -5
- package/dist/config-discovery.d.ts.map +1 -0
- package/dist/config-qmd.d.ts +7 -8
- package/dist/config-qmd.d.ts.map +1 -0
- package/dist/config-record.d.ts +2 -3
- package/dist/config-record.d.ts.map +1 -0
- package/dist/config-security.d.ts +2 -3
- package/dist/config-security.d.ts.map +1 -0
- package/dist/config.d.ts +7 -26
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +23 -23
- package/dist/connectors/codex-marketplace.d.ts +124 -0
- package/dist/connectors/codex-marketplace.d.ts.map +1 -0
- package/dist/connectors/codex-materialize-runner.d.ts +7 -27
- package/dist/connectors/codex-materialize-runner.d.ts.map +1 -0
- package/dist/connectors/codex-materialize-runner.js +14 -14
- package/dist/connectors/codex-materialize.d.ts +23 -41
- package/dist/connectors/codex-materialize.d.ts.map +1 -0
- package/dist/connectors/coerce.d.ts +73 -0
- package/dist/connectors/coerce.d.ts.map +1 -0
- package/dist/connectors/droid-mcp.d.ts +122 -0
- package/dist/connectors/droid-mcp.d.ts.map +1 -0
- package/dist/connectors/hermes-shim.d.ts +135 -0
- package/dist/connectors/hermes-shim.d.ts.map +1 -0
- package/dist/connectors/index.d.ts +42 -247
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +20 -20
- package/dist/connectors/label.d.ts +19 -0
- package/dist/connectors/label.d.ts.map +1 -0
- package/dist/connectors/live/framework.d.ts +169 -0
- package/dist/connectors/live/framework.d.ts.map +1 -0
- package/dist/connectors/live/github.d.ts +156 -0
- package/dist/connectors/live/github.d.ts.map +1 -0
- package/dist/connectors/live/gmail.d.ts +253 -0
- package/dist/connectors/live/gmail.d.ts.map +1 -0
- package/dist/connectors/live/google-drive.d.ts +198 -0
- package/dist/connectors/live/google-drive.d.ts.map +1 -0
- package/dist/connectors/live/index.d.ts +20 -0
- package/dist/connectors/live/index.d.ts.map +1 -0
- package/dist/connectors/live/notion.d.ts +146 -0
- package/dist/connectors/live/notion.d.ts.map +1 -0
- package/dist/connectors/live/registry.d.ts +53 -0
- package/dist/connectors/live/registry.d.ts.map +1 -0
- package/dist/connectors/live/state-store.d.ts +120 -0
- package/dist/connectors/live/state-store.d.ts.map +1 -0
- package/dist/connectors/live/transient-errors.d.ts +45 -0
- package/dist/connectors/live/transient-errors.d.ts.map +1 -0
- package/dist/connectors/materialize-paths.d.ts +15 -0
- package/dist/connectors/materialize-paths.d.ts.map +1 -0
- package/dist/connectors/materialize-skills.d.ts +52 -0
- package/dist/connectors/materialize-skills.d.ts.map +1 -0
- package/dist/connectors/paths.d.ts +78 -0
- package/dist/connectors/paths.d.ts.map +1 -0
- package/dist/connectors/prime-agent.d.ts +13 -0
- package/dist/connectors/prime-agent.d.ts.map +1 -0
- package/dist/connectors-cli.d.ts +170 -2
- package/dist/connectors-cli.d.ts.map +1 -0
- package/dist/console/state.d.ts +154 -0
- package/dist/console/state.d.ts.map +1 -0
- package/dist/console/trace.d.ts +199 -0
- package/dist/console/trace.d.ts.map +1 -0
- package/dist/console/tui.d.ts +106 -0
- package/dist/console/tui.d.ts.map +1 -0
- package/dist/consolidation-operator.d.ts +8 -9
- package/dist/consolidation-operator.d.ts.map +1 -0
- package/dist/consolidation-provenance-check.d.ts +5 -40
- package/dist/consolidation-provenance-check.d.ts.map +1 -0
- package/dist/consolidation-undo.d.ts +10 -44
- package/dist/consolidation-undo.d.ts.map +1 -0
- package/dist/content-hash.d.ts +6 -7
- package/dist/content-hash.d.ts.map +1 -0
- package/dist/context-summary.d.ts +8 -9
- package/dist/context-summary.d.ts.map +1 -0
- package/dist/contradiction/contradiction-judge.d.ts +65 -0
- package/dist/contradiction/contradiction-judge.d.ts.map +1 -0
- package/dist/contradiction/contradiction-review.d.ts +117 -0
- package/dist/contradiction/contradiction-review.d.ts.map +1 -0
- package/dist/contradiction/contradiction-scan.d.ts +74 -0
- package/dist/contradiction/contradiction-scan.d.ts.map +1 -0
- package/dist/contradiction/index.d.ts +12 -41
- package/dist/contradiction/index.d.ts.map +1 -0
- package/dist/contradiction/index.js +11 -11
- package/dist/contradiction/resolution.d.ts +57 -0
- package/dist/contradiction/resolution.d.ts.map +1 -0
- package/dist/contradiction-config.d.ts +5 -6
- package/dist/contradiction-config.d.ts.map +1 -0
- package/dist/converge-config.d.ts +9 -28
- package/dist/converge-config.d.ts.map +1 -0
- package/dist/convergence-refresh.d.ts +5 -40
- package/dist/convergence-refresh.d.ts.map +1 -0
- package/dist/convergence-refresh.js +16 -16
- package/dist/conversation-index/backend.d.ts +12 -31
- package/dist/conversation-index/backend.d.ts.map +1 -0
- package/dist/conversation-index/chunker.d.ts +4 -23
- package/dist/conversation-index/chunker.d.ts.map +1 -0
- package/dist/conversation-index/cleanup.d.ts +2 -3
- package/dist/conversation-index/cleanup.d.ts.map +1 -0
- package/dist/conversation-index/faiss-adapter.d.ts +63 -22
- package/dist/conversation-index/faiss-adapter.d.ts.map +1 -0
- package/dist/conversation-index/indexer.d.ts +9 -31
- package/dist/conversation-index/indexer.d.ts.map +1 -0
- package/dist/conversation-index/search.d.ts +10 -22
- package/dist/conversation-index/search.d.ts.map +1 -0
- package/dist/corpus-read-cancellation.d.ts +3 -4
- package/dist/corpus-read-cancellation.d.ts.map +1 -0
- package/dist/corpus-watermark.d.ts +19 -40
- package/dist/corpus-watermark.d.ts.map +1 -0
- package/dist/corpus-watermark.js +18 -18
- package/dist/correction/correction-access-wiring.d.ts +129 -0
- package/dist/correction/correction-access-wiring.d.ts.map +1 -0
- package/dist/correction/correction-contract.d.ts +220 -0
- package/dist/correction/correction-contract.d.ts.map +1 -0
- package/dist/correction/correction-executor.d.ts +174 -0
- package/dist/correction/correction-executor.d.ts.map +1 -0
- package/dist/correction/correction-planner.d.ts +162 -0
- package/dist/correction/correction-planner.d.ts.map +1 -0
- package/dist/correction/correction-service.d.ts +124 -0
- package/dist/correction/correction-service.d.ts.map +1 -0
- package/dist/correction/index.d.ts +23 -0
- package/dist/correction/index.d.ts.map +1 -0
- package/dist/correction/passive-capture.d.ts +107 -0
- package/dist/correction/passive-capture.d.ts.map +1 -0
- package/dist/correction/passive-correction-detector.d.ts +60 -0
- package/dist/correction/passive-correction-detector.d.ts.map +1 -0
- package/dist/correction/passive-correction-notifications.d.ts +36 -0
- package/dist/correction/passive-correction-notifications.d.ts.map +1 -0
- package/dist/cross-lingual-recall.d.ts +10 -29
- package/dist/cross-lingual-recall.d.ts.map +1 -0
- package/dist/cross-namespace-budget.d.ts +9 -10
- package/dist/cross-namespace-budget.d.ts.map +1 -0
- package/dist/cue-anchors.d.ts +11 -12
- package/dist/cue-anchors.d.ts.map +1 -0
- package/dist/curation/index.d.ts +98 -0
- package/dist/curation/index.d.ts.map +1 -0
- package/dist/dashboard-runtime.d.ts +4 -5
- package/dist/dashboard-runtime.d.ts.map +1 -0
- package/dist/day-summary.d.ts +5 -24
- package/dist/day-summary.d.ts.map +1 -0
- package/dist/dedup/connector-scope.d.ts +28 -0
- package/dist/dedup/connector-scope.d.ts.map +1 -0
- package/dist/dedup/index.d.ts +78 -0
- package/dist/dedup/index.d.ts.map +1 -0
- package/dist/dedup/merge-content.d.ts +24 -0
- package/dist/dedup/merge-content.d.ts.map +1 -0
- package/dist/dedup/merge-count.d.ts +7 -0
- package/dist/dedup/merge-count.d.ts.map +1 -0
- package/dist/dedup/merge-decision.d.ts +26 -0
- package/dist/dedup/merge-decision.d.ts.map +1 -0
- package/dist/dedup/merge-dup.d.ts +8 -0
- package/dist/dedup/merge-dup.d.ts.map +1 -0
- package/dist/dedup/merge-empty.d.ts +15 -0
- package/dist/dedup/merge-empty.d.ts.map +1 -0
- package/dist/dedup/merge-id.d.ts +8 -0
- package/dist/dedup/merge-id.d.ts.map +1 -0
- package/dist/dedup/merge-judge.d.ts +33 -0
- package/dist/dedup/merge-judge.d.ts.map +1 -0
- package/dist/dedup/merge-min-score.d.ts +2 -0
- package/dist/dedup/merge-min-score.d.ts.map +1 -0
- package/dist/dedup/merge-on-write-wire.d.ts +17 -0
- package/dist/dedup/merge-on-write-wire.d.ts.map +1 -0
- package/dist/dedup/merge-on-write.d.ts +32 -0
- package/dist/dedup/merge-on-write.d.ts.map +1 -0
- package/dist/dedup/merge-pair.d.ts +8 -0
- package/dist/dedup/merge-pair.d.ts.map +1 -0
- package/dist/dedup/merge-provenance.d.ts +43 -0
- package/dist/dedup/merge-provenance.d.ts.map +1 -0
- package/dist/dedup/merge-score.d.ts +7 -0
- package/dist/dedup/merge-score.d.ts.map +1 -0
- package/dist/dedup/merge-self.d.ts +13 -0
- package/dist/dedup/merge-self.d.ts.map +1 -0
- package/dist/dedup/merge-threshold.d.ts +13 -0
- package/dist/dedup/merge-threshold.d.ts.map +1 -0
- package/dist/dedup/merge-tie.d.ts +8 -0
- package/dist/dedup/merge-tie.d.ts.map +1 -0
- package/dist/dedup/merge-unique.d.ts +7 -0
- package/dist/dedup/merge-unique.d.ts.map +1 -0
- package/dist/dedup/merge-verdict.d.ts +19 -0
- package/dist/dedup/merge-verdict.d.ts.map +1 -0
- package/dist/dedup/merge.d.ts +122 -0
- package/dist/dedup/merge.d.ts.map +1 -0
- package/dist/dedup/novelty-gate.d.ts +60 -0
- package/dist/dedup/novelty-gate.d.ts.map +1 -0
- package/dist/dedup/semantic.d.ts +86 -0
- package/dist/dedup/semantic.d.ts.map +1 -0
- package/dist/deep-recall-config.d.ts +7 -8
- package/dist/deep-recall-config.d.ts.map +1 -0
- package/dist/deep-recall-config.js +2 -2
- package/dist/deep-recall-http-glue.d.ts +5 -151
- package/dist/deep-recall-http-glue.d.ts.map +1 -0
- package/dist/deep-recall-http-glue.js +6 -6
- package/dist/deep-recall-mcp-tools.d.ts +3 -150
- package/dist/deep-recall-mcp-tools.d.ts.map +1 -0
- package/dist/deep-recall-policy-llm.d.ts +6 -30
- package/dist/deep-recall-policy-llm.d.ts.map +1 -0
- package/dist/deep-recall-renderer.d.ts +3 -9
- package/dist/deep-recall-renderer.d.ts.map +1 -0
- package/dist/deep-recall-seeds.d.ts +7 -30
- package/dist/deep-recall-seeds.d.ts.map +1 -0
- package/dist/deep-recall.d.ts +15 -17
- package/dist/deep-recall.d.ts.map +1 -0
- package/dist/delinearize.d.ts +5 -25
- package/dist/delinearize.d.ts.map +1 -0
- package/dist/dependency-propagation-config.d.ts +3 -22
- package/dist/dependency-propagation-config.d.ts.map +1 -0
- package/dist/deterministic-order.d.ts +3 -4
- package/dist/deterministic-order.d.ts.map +1 -0
- package/dist/direct-answer-wiring.d.ts +8 -28
- package/dist/direct-answer-wiring.d.ts.map +1 -0
- package/dist/direct-answer.d.ts +10 -30
- package/dist/direct-answer.d.ts.map +1 -0
- package/dist/directory-sidecars.d.ts +17 -18
- package/dist/directory-sidecars.d.ts.map +1 -0
- package/dist/embedding-fallback.d.ts +6 -25
- package/dist/embedding-fallback.d.ts.map +1 -0
- package/dist/emit-legacy-tools.d.ts +3 -4
- package/dist/emit-legacy-tools.d.ts.map +1 -0
- package/dist/enrichment/audit.d.ts +27 -0
- package/dist/enrichment/audit.d.ts.map +1 -0
- package/dist/enrichment/index.d.ts +8 -177
- package/dist/enrichment/index.d.ts.map +1 -0
- package/dist/enrichment/pipeline.d.ts +15 -0
- package/dist/enrichment/pipeline.d.ts.map +1 -0
- package/dist/enrichment/provider-registry.d.ts +28 -0
- package/dist/enrichment/provider-registry.d.ts.map +1 -0
- package/dist/enrichment/types.d.ts +65 -0
- package/dist/enrichment/types.d.ts.map +1 -0
- package/dist/enrichment/web-search-provider.d.ts +26 -0
- package/dist/enrichment/web-search-provider.d.ts.map +1 -0
- package/dist/entity-id-normalization.d.ts +3 -4
- package/dist/entity-id-normalization.d.ts.map +1 -0
- package/dist/entity-origin-fields.d.ts +6 -24
- package/dist/entity-origin-fields.d.ts.map +1 -0
- package/dist/entity-recall-cancellation.d.ts +6 -7
- package/dist/entity-recall-cancellation.d.ts.map +1 -0
- package/dist/entity-retrieval-boundaries.d.ts +2 -3
- package/dist/entity-retrieval-boundaries.d.ts.map +1 -0
- package/dist/entity-retrieval-i18n.d.ts +5 -6
- package/dist/entity-retrieval-i18n.d.ts.map +1 -0
- package/dist/entity-retrieval.d.ts +8 -41
- package/dist/entity-retrieval.d.ts.map +1 -0
- package/dist/entity-retrieval.js +14 -14
- package/dist/entity-schema.d.ts +9 -28
- package/dist/entity-schema.d.ts.map +1 -0
- package/dist/episodic-context.d.ts +10 -30
- package/dist/episodic-context.d.ts.map +1 -0
- package/dist/eval-trajectory-contracts.d.ts +48 -68
- package/dist/eval-trajectory-contracts.d.ts.map +1 -0
- package/dist/eval-trajectory-store.d.ts +7 -28
- package/dist/eval-trajectory-store.d.ts.map +1 -0
- package/dist/eval-trajectory.d.ts +9 -30
- package/dist/eval-trajectory.d.ts.map +1 -0
- package/dist/evals.d.ts +29 -30
- package/dist/evals.d.ts.map +1 -0
- package/dist/event-order-query.d.ts +2 -3
- package/dist/event-order-query.d.ts.map +1 -0
- package/dist/event-order-recall.d.ts +6 -8
- package/dist/event-order-recall.d.ts.map +1 -0
- package/dist/event-time.d.ts +7 -8
- package/dist/event-time.d.ts.map +1 -0
- package/dist/evidence-pack.d.ts +7 -8
- package/dist/evidence-pack.d.ts.map +1 -0
- package/dist/experience/session-experience-config.d.ts +19 -0
- package/dist/experience/session-experience-config.d.ts.map +1 -0
- package/dist/experience/session-experience-mining.d.ts +31 -0
- package/dist/experience/session-experience-mining.d.ts.map +1 -0
- package/dist/experience/session-experience-recall.d.ts +19 -0
- package/dist/experience/session-experience-recall.d.ts.map +1 -0
- package/dist/experience/session-experience.d.ts +74 -0
- package/dist/experience/session-experience.d.ts.map +1 -0
- package/dist/explicit-capture.d.ts +20 -128
- package/dist/explicit-capture.d.ts.map +1 -0
- package/dist/explicit-capture.js +1 -1
- package/dist/explicit-cue-recall.d.ts +17 -19
- package/dist/explicit-cue-recall.d.ts.map +1 -0
- package/dist/external-wiki-access.d.ts +4 -152
- package/dist/external-wiki-access.d.ts.map +1 -0
- package/dist/external-wiki-access.js +66 -61
- package/dist/external-wiki-cli.d.ts +4 -5
- package/dist/external-wiki-cli.d.ts.map +1 -0
- package/dist/external-wiki-collection-registration.d.ts +7 -27
- package/dist/external-wiki-collection-registration.d.ts.map +1 -0
- package/dist/external-wiki-collection.d.ts +9 -29
- package/dist/external-wiki-collection.d.ts.map +1 -0
- package/dist/external-wiki-config.d.ts +3 -4
- package/dist/external-wiki-config.d.ts.map +1 -0
- package/dist/external-wiki-guard.d.ts +6 -7
- package/dist/external-wiki-guard.d.ts.map +1 -0
- package/dist/external-wiki-mcp-tools.d.ts +3 -149
- package/dist/external-wiki-mcp-tools.d.ts.map +1 -0
- package/dist/external-wiki-search.d.ts +12 -13
- package/dist/external-wiki-search.d.ts.map +1 -0
- package/dist/external-wiki.d.ts +12 -13
- package/dist/external-wiki.d.ts.map +1 -0
- package/dist/extraction-error-classification.d.ts +5 -24
- package/dist/extraction-error-classification.d.ts.map +1 -0
- package/dist/extraction-evidence-class.d.ts +13 -33
- package/dist/extraction-evidence-class.d.ts.map +1 -0
- package/dist/extraction-evidence-class.js +2 -2
- package/dist/extraction-faithfulness.d.ts +23 -46
- package/dist/extraction-faithfulness.d.ts.map +1 -0
- package/dist/extraction-judge-telemetry.d.ts +9 -36
- package/dist/extraction-judge-telemetry.d.ts.map +1 -0
- package/dist/extraction-judge-training.d.ts +9 -36
- package/dist/extraction-judge-training.d.ts.map +1 -0
- package/dist/extraction-judge.d.ts +20 -44
- package/dist/extraction-judge.d.ts.map +1 -0
- package/dist/extraction-liveness.d.ts +161 -18
- package/dist/extraction-liveness.d.ts.map +1 -0
- package/dist/extraction-normalization.d.ts +7 -26
- package/dist/extraction-normalization.d.ts.map +1 -0
- package/dist/extraction-prompt.d.ts +14 -34
- package/dist/extraction-prompt.d.ts.map +1 -0
- package/dist/extraction-redaction-rules.d.ts +6 -7
- package/dist/extraction-redaction-rules.d.ts.map +1 -0
- package/dist/extraction-source-grounding-helpers.d.ts +31 -32
- package/dist/extraction-source-grounding-helpers.d.ts.map +1 -0
- package/dist/extraction-source-grounding-rules.d.ts +6 -25
- package/dist/extraction-source-grounding-rules.d.ts.map +1 -0
- package/dist/extraction-source-grounding.d.ts +7 -25
- package/dist/extraction-source-grounding.d.ts.map +1 -0
- package/dist/extraction-source-grounding.js +3 -3
- package/dist/extraction-span-bench.d.ts +3 -4
- package/dist/extraction-span-bench.d.ts.map +1 -0
- package/dist/extraction-span-clip.d.ts +5 -6
- package/dist/extraction-span-clip.d.ts.map +1 -0
- package/dist/extraction-span-config.d.ts +40 -18
- package/dist/extraction-span-config.d.ts.map +1 -0
- package/dist/extraction-span-contains.d.ts +2 -3
- package/dist/extraction-span-contains.d.ts.map +1 -0
- package/dist/extraction-span-fallback.d.ts +5 -6
- package/dist/extraction-span-fallback.d.ts.map +1 -0
- package/dist/extraction-span-gap.d.ts +2 -3
- package/dist/extraction-span-gap.d.ts.map +1 -0
- package/dist/extraction-span-gate.d.ts +7 -8
- package/dist/extraction-span-gate.d.ts.map +1 -0
- package/dist/extraction-span-join.d.ts +5 -6
- package/dist/extraction-span-join.d.ts.map +1 -0
- package/dist/extraction-span-length.d.ts +2 -3
- package/dist/extraction-span-length.d.ts.map +1 -0
- package/dist/extraction-span-materialize.d.ts +18 -37
- package/dist/extraction-span-materialize.d.ts.map +1 -0
- package/dist/extraction-span-materialize.js +2 -2
- package/dist/extraction-span-overlap.d.ts +2 -3
- package/dist/extraction-span-overlap.d.ts.map +1 -0
- package/dist/extraction-span-provenance.d.ts +4 -5
- package/dist/extraction-span-provenance.d.ts.map +1 -0
- package/dist/extraction-span-shift.d.ts +2 -3
- package/dist/extraction-span-shift.d.ts.map +1 -0
- package/dist/extraction-span-slice.d.ts +2 -3
- package/dist/extraction-span-slice.d.ts.map +1 -0
- package/dist/extraction-span-source-hash.d.ts +5 -6
- package/dist/extraction-span-source-hash.d.ts.map +1 -0
- package/dist/extraction-span-tokens.d.ts +4 -5
- package/dist/extraction-span-tokens.d.ts.map +1 -0
- package/dist/extraction-span-validate.d.ts +5 -6
- package/dist/extraction-span-validate.d.ts.map +1 -0
- package/dist/extraction-span-wire.d.ts +5 -25
- package/dist/extraction-span-wire.d.ts.map +1 -0
- package/dist/extraction-span.d.ts +4 -5
- package/dist/extraction-span.d.ts.map +1 -0
- package/dist/extraction.d.ts +11 -44
- package/dist/extraction.d.ts.map +1 -0
- package/dist/extraction.js +26 -26
- package/dist/faithfulness-config.d.ts +3 -4
- package/dist/faithfulness-config.d.ts.map +1 -0
- package/dist/fallback-llm-codex-subscription.d.ts +23 -42
- package/dist/fallback-llm-codex-subscription.d.ts.map +1 -0
- package/dist/fallback-llm.d.ts +9 -30
- package/dist/fallback-llm.d.ts.map +1 -0
- package/dist/focused-list-recall.d.ts +5 -8
- package/dist/focused-list-recall.d.ts.map +1 -0
- package/dist/graph-append-error.d.ts +3 -27
- package/dist/graph-append-error.d.ts.map +1 -0
- package/dist/graph-dashboard-diff.d.ts +5 -28
- package/dist/graph-dashboard-diff.d.ts.map +1 -0
- package/dist/graph-dashboard-key.d.ts +3 -26
- package/dist/graph-dashboard-key.d.ts.map +1 -0
- package/dist/graph-dashboard-parser.d.ts +6 -29
- package/dist/graph-dashboard-parser.d.ts.map +1 -0
- package/dist/graph-edge-decay-ROSUPDX3.js +30 -0
- package/dist/graph-edge-reinforcement.d.ts +12 -36
- package/dist/graph-edge-reinforcement.d.ts.map +1 -0
- package/dist/graph-events.d.ts +13 -16
- package/dist/graph-events.d.ts.map +1 -0
- package/dist/graph-jsonl.d.ts +8 -31
- package/dist/graph-jsonl.d.ts.map +1 -0
- package/dist/graph-jsonl.js +3 -3
- package/dist/graph-path-reconstruction.d.ts +22 -22
- package/dist/graph-path-reconstruction.d.ts.map +1 -0
- package/dist/graph-path-scoring-config.d.ts +3 -4
- package/dist/graph-path-scoring-config.d.ts.map +1 -0
- package/dist/graph-path-scoring.d.ts +8 -30
- package/dist/graph-path-scoring.d.ts.map +1 -0
- package/dist/graph-recall.d.ts +7 -10
- package/dist/graph-recall.d.ts.map +1 -0
- package/dist/graph-retrieval.d.ts +19 -20
- package/dist/graph-retrieval.d.ts.map +1 -0
- package/dist/graph-snapshot.d.ts +14 -38
- package/dist/graph-snapshot.d.ts.map +1 -0
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph-write-lock.d.ts +7 -10
- package/dist/graph-write-lock.d.ts.map +1 -0
- package/dist/graph.d.ts +325 -22
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +2 -2
- package/dist/harmonic-construction.d.ts +11 -13
- package/dist/harmonic-construction.d.ts.map +1 -0
- package/dist/harmonic-retrieval.d.ts +10 -12
- package/dist/harmonic-retrieval.d.ts.map +1 -0
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/himem.d.ts +3 -4
- package/dist/himem.d.ts.map +1 -0
- package/dist/host-embedding-provider.d.ts +7 -8
- package/dist/host-embedding-provider.d.ts.map +1 -0
- package/dist/http-retry.d.ts +9 -10
- package/dist/http-retry.d.ts.map +1 -0
- package/dist/hygiene.d.ts +4 -5
- package/dist/hygiene.d.ts.map +1 -0
- package/dist/identity-continuity.d.ts +9 -11
- package/dist/identity-continuity.d.ts.map +1 -0
- package/dist/importance.d.ts +6 -26
- package/dist/importance.d.ts.map +1 -0
- package/dist/importers/base.d.ts +261 -0
- package/dist/importers/base.d.ts.map +1 -0
- package/dist/importers/index.d.ts +3 -280
- package/dist/importers/index.d.ts.map +1 -0
- package/dist/importers/test-utils.d.ts +5 -24
- package/dist/importers/test-utils.d.ts.map +1 -0
- package/dist/in-flight-reads.d.ts +10 -29
- package/dist/in-flight-reads.d.ts.map +1 -0
- package/dist/included-memories.d.ts +6 -7
- package/dist/included-memories.d.ts.map +1 -0
- package/dist/index.d.ts +185 -9836
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +275 -229
- package/dist/inline-script.d.ts +2 -3
- package/dist/inline-script.d.ts.map +1 -0
- package/dist/intent.d.ts +7 -26
- package/dist/intent.d.ts.map +1 -0
- package/dist/json-extract.d.ts +3 -4
- package/dist/json-extract.d.ts.map +1 -0
- package/dist/json-store.d.ts +9 -9
- package/dist/json-store.d.ts.map +1 -0
- package/dist/lcm/archive.d.ts +11 -13
- package/dist/lcm/archive.d.ts.map +1 -0
- package/dist/lcm/dag.d.ts +5 -7
- package/dist/lcm/dag.d.ts.map +1 -0
- package/dist/lcm/engine.d.ts +10 -32
- package/dist/lcm/engine.d.ts.map +1 -0
- package/dist/lcm/engine.js +4 -4
- package/dist/lcm/evidence-identity.d.ts +20 -0
- package/dist/lcm/evidence-identity.d.ts.map +1 -0
- package/dist/lcm/index.d.ts +9 -52
- package/dist/lcm/index.d.ts.map +1 -0
- package/dist/lcm/index.js +13 -13
- package/dist/lcm/queue.d.ts +7 -10
- package/dist/lcm/queue.d.ts.map +1 -0
- package/dist/lcm/recall.d.ts +8 -13
- package/dist/lcm/recall.d.ts.map +1 -0
- package/dist/lcm/schema.d.ts +5 -8
- package/dist/lcm/schema.d.ts.map +1 -0
- package/dist/lcm/summarizer.d.ts +7 -11
- package/dist/lcm/summarizer.d.ts.map +1 -0
- package/dist/lcm/tools.d.ts +4 -30
- package/dist/lcm/tools.d.ts.map +1 -0
- package/dist/lcm-fallback-read.d.ts +4 -5
- package/dist/lcm-fallback-read.d.ts.map +1 -0
- package/dist/lifecycle/seed-graduation-config-types.d.ts +21 -0
- package/dist/lifecycle/seed-graduation-config-types.d.ts.map +1 -0
- package/dist/lifecycle/seed-graduation.d.ts +97 -0
- package/dist/lifecycle/seed-graduation.d.ts.map +1 -0
- package/dist/lifecycle/tombstones.d.ts +389 -0
- package/dist/lifecycle/tombstones.d.ts.map +1 -0
- package/dist/lifecycle.d.ts +14 -33
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/live-connectors-runner.d.ts +11 -29
- package/dist/live-connectors-runner.d.ts.map +1 -0
- package/dist/local-llm-config.d.ts +5 -7
- package/dist/local-llm-config.d.ts.map +1 -0
- package/dist/local-llm-config.js +1 -1
- package/dist/local-llm-helpers.d.ts +102 -20
- package/dist/local-llm-helpers.d.ts.map +1 -0
- package/dist/local-llm-transport.d.ts +4 -6
- package/dist/local-llm-transport.d.ts.map +1 -0
- package/dist/local-llm.d.ts +145 -20
- package/dist/local-llm.d.ts.map +1 -0
- package/dist/local-model-endpoint.d.ts +10 -29
- package/dist/local-model-endpoint.d.ts.map +1 -0
- package/dist/location/access-operations.d.ts +9 -0
- package/dist/location/access-operations.d.ts.map +1 -0
- package/dist/location/backfill.d.ts +57 -0
- package/dist/location/backfill.d.ts.map +1 -0
- package/dist/location/cli.d.ts +67 -0
- package/dist/location/cli.d.ts.map +1 -0
- package/dist/location/config.d.ts +11 -0
- package/dist/location/config.d.ts.map +1 -0
- package/dist/location/http-glue.d.ts +20 -0
- package/dist/location/http-glue.d.ts.map +1 -0
- package/dist/location/index.d.ts +21 -534
- package/dist/location/index.d.ts.map +1 -0
- package/dist/location/index.js +17 -17
- package/dist/location/intervals.d.ts +61 -0
- package/dist/location/intervals.d.ts.map +1 -0
- package/dist/location/matching.d.ts +124 -0
- package/dist/location/matching.d.ts.map +1 -0
- package/dist/location/mcp-tools.d.ts +12 -0
- package/dist/location/mcp-tools.d.ts.map +1 -0
- package/dist/location/parse-companions.d.ts +7 -0
- package/dist/location/parse-companions.d.ts.map +1 -0
- package/dist/location/pipeline.d.ts +44 -0
- package/dist/location/pipeline.d.ts.map +1 -0
- package/dist/location/provider-setup.d.ts +33 -0
- package/dist/location/provider-setup.d.ts.map +1 -0
- package/dist/location/registry.d.ts +15 -0
- package/dist/location/registry.d.ts.map +1 -0
- package/dist/location/scheduler.d.ts +48 -0
- package/dist/location/scheduler.d.ts.map +1 -0
- package/dist/location/store.d.ts +95 -0
- package/dist/location/store.d.ts.map +1 -0
- package/dist/location/surfaces.d.ts +76 -0
- package/dist/location/surfaces.d.ts.map +1 -0
- package/dist/location/tagging.d.ts +116 -0
- package/dist/location/tagging.d.ts.map +1 -0
- package/dist/location/types.d.ts +109 -0
- package/dist/location/types.d.ts.map +1 -0
- package/dist/logger.d.ts +7 -8
- package/dist/logger.d.ts.map +1 -0
- package/dist/maintenance/archive-observations.d.ts +5 -5
- package/dist/maintenance/archive-observations.d.ts.map +1 -0
- package/dist/maintenance/atomic-file.d.ts +4 -5
- package/dist/maintenance/atomic-file.d.ts.map +1 -0
- package/dist/maintenance/backup-stamp.d.ts +2 -3
- package/dist/maintenance/backup-stamp.d.ts.map +1 -0
- package/dist/maintenance/day-summary-cron.d.ts +20 -0
- package/dist/maintenance/day-summary-cron.d.ts.map +1 -0
- package/dist/maintenance/dreams-ledger.d.ts +172 -0
- package/dist/maintenance/dreams-ledger.d.ts.map +1 -0
- package/dist/maintenance/first-start-migration.d.ts +61 -0
- package/dist/maintenance/first-start-migration.d.ts.map +1 -0
- package/dist/maintenance/forget.d.ts +59 -0
- package/dist/maintenance/forget.d.ts.map +1 -0
- package/dist/maintenance/graph-edge-decay.d.ts +122 -0
- package/dist/maintenance/graph-edge-decay.d.ts.map +1 -0
- package/dist/maintenance/memory-governance-cron.d.ts +9 -10
- package/dist/maintenance/memory-governance-cron.d.ts.map +1 -0
- package/dist/maintenance/memory-governance.d.ts +25 -43
- package/dist/maintenance/memory-governance.d.ts.map +1 -0
- package/dist/maintenance/memory-governance.js +14 -14
- package/dist/maintenance/migrate-observations.d.ts +4 -5
- package/dist/maintenance/migrate-observations.d.ts.map +1 -0
- package/dist/maintenance/namespace-maintenance-fanout.d.ts +132 -0
- package/dist/maintenance/namespace-maintenance-fanout.d.ts.map +1 -0
- package/dist/maintenance/namespace-planner.d.ts +96 -0
- package/dist/maintenance/namespace-planner.d.ts.map +1 -0
- package/dist/maintenance/observation-ledger-utils.d.ts +5 -6
- package/dist/maintenance/observation-ledger-utils.d.ts.map +1 -0
- package/dist/maintenance/pattern-reinforcement.d.ts +129 -0
- package/dist/maintenance/pattern-reinforcement.d.ts.map +1 -0
- package/dist/maintenance/projection-support.d.ts +76 -0
- package/dist/maintenance/projection-support.d.ts.map +1 -0
- package/dist/maintenance/purge.d.ts +85 -0
- package/dist/maintenance/purge.d.ts.map +1 -0
- package/dist/maintenance/rebuild-memory-lifecycle-ledger-cli.d.ts +24 -0
- package/dist/maintenance/rebuild-memory-lifecycle-ledger-cli.d.ts.map +1 -0
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +11 -43
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts.map +1 -0
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +14 -14
- package/dist/maintenance/rebuild-memory-projection.d.ts +14 -72
- package/dist/maintenance/rebuild-memory-projection.d.ts.map +1 -0
- package/dist/maintenance/rebuild-memory-projection.js +15 -15
- package/dist/maintenance/rebuild-observations.d.ts +4 -5
- package/dist/maintenance/rebuild-observations.d.ts.map +1 -0
- package/dist/maintenance/tier-stats.d.ts +59 -0
- package/dist/maintenance/tier-stats.d.ts.map +1 -0
- package/dist/mcp-memory-inspector-app.d.ts +15 -158
- package/dist/mcp-memory-inspector-app.d.ts.map +1 -0
- package/dist/mcp-read-only-tools.d.ts +2 -3
- package/dist/mcp-read-only-tools.d.ts.map +1 -0
- package/dist/mcp-read-only-tools.js +1 -1
- package/dist/meetings/build-scheduler.d.ts +43 -0
- package/dist/meetings/build-scheduler.d.ts.map +1 -0
- package/dist/meetings/build.d.ts +137 -0
- package/dist/meetings/build.d.ts.map +1 -0
- package/dist/meetings/cli.d.ts +37 -0
- package/dist/meetings/cli.d.ts.map +1 -0
- package/dist/meetings/config.d.ts +18 -0
- package/dist/meetings/config.d.ts.map +1 -0
- package/dist/meetings/day-source.d.ts +103 -0
- package/dist/meetings/day-source.d.ts.map +1 -0
- package/dist/meetings/detect.d.ts +33 -0
- package/dist/meetings/detect.d.ts.map +1 -0
- package/dist/meetings/errors.d.ts +10 -0
- package/dist/meetings/errors.d.ts.map +1 -0
- package/dist/meetings/fuse.d.ts +30 -0
- package/dist/meetings/fuse.d.ts.map +1 -0
- package/dist/meetings/http-glue.d.ts +37 -0
- package/dist/meetings/http-glue.d.ts.map +1 -0
- package/dist/meetings/index.d.ts +20 -0
- package/dist/meetings/index.d.ts.map +1 -0
- package/dist/meetings/mcp-tools.d.ts +10 -0
- package/dist/meetings/mcp-tools.d.ts.map +1 -0
- package/dist/meetings/memory-gen.d.ts +157 -0
- package/dist/meetings/memory-gen.d.ts.map +1 -0
- package/dist/meetings/memory-generator.d.ts +113 -0
- package/dist/meetings/memory-generator.d.ts.map +1 -0
- package/dist/meetings/service.d.ts +80 -0
- package/dist/meetings/service.d.ts.map +1 -0
- package/dist/meetings/store.d.ts +121 -0
- package/dist/meetings/store.d.ts.map +1 -0
- package/dist/meetings/summary-extractor.d.ts +96 -0
- package/dist/meetings/summary-extractor.d.ts.map +1 -0
- package/dist/meetings/types.d.ts +155 -0
- package/dist/meetings/types.d.ts.map +1 -0
- package/dist/memory-action-policy.d.ts +6 -25
- package/dist/memory-action-policy.d.ts.map +1 -0
- package/dist/memory-age.d.ts +16 -17
- package/dist/memory-age.d.ts.map +1 -0
- package/dist/memory-browse-http-glue.d.ts +5 -151
- package/dist/memory-browse-http-glue.d.ts.map +1 -0
- package/dist/memory-browse-http-glue.js +2 -2
- package/dist/memory-browse-mcp-tools.d.ts +3 -150
- package/dist/memory-browse-mcp-tools.d.ts.map +1 -0
- package/dist/memory-browse-operations.d.ts +11 -2
- package/dist/memory-browse-operations.d.ts.map +1 -0
- package/dist/memory-browse-operations.js +66 -61
- package/dist/memory-browse.d.ts +16 -36
- package/dist/memory-browse.d.ts.map +1 -0
- package/dist/memory-browse.js +4 -4
- package/dist/memory-cache.d.ts +27 -46
- package/dist/memory-cache.d.ts.map +1 -0
- package/dist/memory-controller.d.ts +29 -50
- package/dist/memory-controller.d.ts.map +1 -0
- package/dist/memory-corpus-version.d.ts +3 -4
- package/dist/memory-corpus-version.d.ts.map +1 -0
- package/dist/memory-extension/claude-code-publisher.d.ts +18 -0
- package/dist/memory-extension/claude-code-publisher.d.ts.map +1 -0
- package/dist/memory-extension/codex-publisher.d.ts +22 -0
- package/dist/memory-extension/codex-publisher.d.ts.map +1 -0
- package/dist/memory-extension/hermes-publisher.d.ts +18 -0
- package/dist/memory-extension/hermes-publisher.d.ts.map +1 -0
- package/dist/memory-extension/index.d.ts +57 -0
- package/dist/memory-extension/index.d.ts.map +1 -0
- package/dist/memory-extension/shared-instructions.d.ts +30 -0
- package/dist/memory-extension/shared-instructions.d.ts.map +1 -0
- package/dist/memory-extension/types.d.ts +88 -0
- package/dist/memory-extension/types.d.ts.map +1 -0
- package/dist/memory-extension-host/host-discovery.d.ts +38 -0
- package/dist/memory-extension-host/host-discovery.d.ts.map +1 -0
- package/dist/memory-extension-host/index.d.ts +7 -0
- package/dist/memory-extension-host/index.d.ts.map +1 -0
- package/dist/memory-extension-host/render-extensions-block.d.ts +23 -0
- package/dist/memory-extension-host/render-extensions-block.d.ts.map +1 -0
- package/dist/memory-extension-host/types.d.ts +20 -0
- package/dist/memory-extension-host/types.d.ts.map +1 -0
- package/dist/memory-lifecycle-ledger-utils.d.ts +19 -38
- package/dist/memory-lifecycle-ledger-utils.d.ts.map +1 -0
- package/dist/memory-projection-format.d.ts +3 -4
- package/dist/memory-projection-format.d.ts.map +1 -0
- package/dist/memory-projection-mutations.d.ts +3 -4
- package/dist/memory-projection-mutations.d.ts.map +1 -0
- package/dist/memory-projection-store.d.ts +35 -54
- package/dist/memory-projection-store.d.ts.map +1 -0
- package/dist/memory-provenance.d.ts +10 -29
- package/dist/memory-provenance.d.ts.map +1 -0
- package/dist/memory-snapshot.d.ts +3 -22
- package/dist/memory-snapshot.d.ts.map +1 -0
- package/dist/memory-subject-cli.d.ts +9 -156
- package/dist/memory-subject-cli.d.ts.map +1 -0
- package/dist/memory-subject.d.ts +132 -145
- package/dist/memory-subject.d.ts.map +1 -0
- package/dist/memory-worth-bench.d.ts +4 -5
- package/dist/memory-worth-bench.d.ts.map +1 -0
- package/dist/memory-worth-filter.d.ts +8 -11
- package/dist/memory-worth-filter.d.ts.map +1 -0
- package/dist/memory-worth-outcomes.d.ts +11 -45
- package/dist/memory-worth-outcomes.d.ts.map +1 -0
- package/dist/memory-worth.d.ts +4 -5
- package/dist/memory-worth.d.ts.map +1 -0
- package/dist/message-parts/index.d.ts +15 -16
- package/dist/message-parts/index.d.ts.map +1 -0
- package/dist/migrate/from-engram.d.ts +6 -7
- package/dist/migrate/from-engram.d.ts.map +1 -0
- package/dist/model-registry.d.ts +3 -4
- package/dist/model-registry.d.ts.map +1 -0
- package/dist/models-json.d.ts +5 -24
- package/dist/models-json.d.ts.map +1 -0
- package/dist/namespaces/catalog.d.ts +473 -0
- package/dist/namespaces/catalog.d.ts.map +1 -0
- package/dist/namespaces/identity.d.ts +5 -0
- package/dist/namespaces/identity.d.ts.map +1 -0
- package/dist/namespaces/migrate.d.ts +11 -46
- package/dist/namespaces/migrate.d.ts.map +1 -0
- package/dist/namespaces/migrate.js +15 -15
- package/dist/namespaces/path.d.ts +3 -0
- package/dist/namespaces/path.d.ts.map +1 -0
- package/dist/namespaces/principal.d.ts +9 -28
- package/dist/namespaces/principal.d.ts.map +1 -0
- package/dist/namespaces/scope-profile-config.d.ts +5 -0
- package/dist/namespaces/scope-profile-config.d.ts.map +1 -0
- package/dist/namespaces/scope-profiles.d.ts +46 -0
- package/dist/namespaces/scope-profiles.d.ts.map +1 -0
- package/dist/namespaces/search.d.ts +10 -28
- package/dist/namespaces/search.d.ts.map +1 -0
- package/dist/namespaces/search.js +5 -5
- package/dist/namespaces/storage.d.ts +8 -41
- package/dist/namespaces/storage.d.ts.map +1 -0
- package/dist/namespaces/storage.js +14 -14
- package/dist/native-binding-hint.d.ts +3 -4
- package/dist/native-binding-hint.d.ts.map +1 -0
- package/dist/native-knowledge.d.ts +15 -34
- package/dist/native-knowledge.d.ts.map +1 -0
- package/dist/negative.d.ts +3 -4
- package/dist/negative.d.ts.map +1 -0
- package/dist/network/tailscale.d.ts +7 -8
- package/dist/network/tailscale.d.ts.map +1 -0
- package/dist/network/webdav.d.ts +9 -10
- package/dist/network/webdav.d.ts.map +1 -0
- package/dist/objective-state-writers.d.ts +8 -9
- package/dist/objective-state-writers.d.ts.map +1 -0
- package/dist/objective-state.d.ts +15 -16
- package/dist/objective-state.d.ts.map +1 -0
- package/dist/offline-sync-exclude-globs.d.ts +3 -4
- package/dist/offline-sync-exclude-globs.d.ts.map +1 -0
- package/dist/offline-sync-file-io.d.ts +8 -9
- package/dist/offline-sync-file-io.d.ts.map +1 -0
- package/dist/offline-sync-impression-drain.d.ts +8 -26
- package/dist/offline-sync-impression-drain.d.ts.map +1 -0
- package/dist/offline-sync-impression-drain.js +2 -2
- package/dist/offline-sync.d.ts +57 -58
- package/dist/offline-sync.d.ts.map +1 -0
- package/dist/okf/cli.d.ts +10 -0
- package/dist/okf/cli.d.ts.map +1 -0
- package/dist/okf/config.d.ts +11 -0
- package/dist/okf/config.d.ts.map +1 -0
- package/dist/okf/index-files.d.ts +7 -0
- package/dist/okf/index-files.d.ts.map +1 -0
- package/dist/okf/lint.d.ts +12 -0
- package/dist/okf/lint.d.ts.map +1 -0
- package/dist/okf/render.d.ts +29 -0
- package/dist/okf/render.d.ts.map +1 -0
- package/dist/okf/sweep.d.ts +9 -0
- package/dist/okf/sweep.d.ts.map +1 -0
- package/dist/okf/type-mapping.d.ts +30 -0
- package/dist/okf/type-mapping.d.ts.map +1 -0
- package/dist/onboarding/index.d.ts +63 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/openai-chat-compat.d.ts +6 -7
- package/dist/openai-chat-compat.d.ts.map +1 -0
- package/dist/operator-doctor-corpus.d.ts +8 -29
- package/dist/operator-doctor-corpus.d.ts.map +1 -0
- package/dist/operator-doctor-corpus.js +21 -21
- package/dist/operator-doctor-replica.d.ts +8 -29
- package/dist/operator-doctor-replica.d.ts.map +1 -0
- package/dist/operator-doctor-replica.js +4 -4
- package/dist/operator-doctor-types.d.ts +2 -3
- package/dist/operator-doctor-types.d.ts.map +1 -0
- package/dist/operator-toolkit.d.ts +43 -75
- package/dist/operator-toolkit.d.ts.map +1 -0
- package/dist/operator-toolkit.js +37 -37
- package/dist/opik-exporter.d.ts +6 -8
- package/dist/opik-exporter.d.ts.map +1 -0
- package/dist/orchestration/compression-guideline-coordinator.d.ts +6 -40
- package/dist/orchestration/compression-guideline-coordinator.d.ts.map +1 -0
- package/dist/orchestration/consolidation-run.d.ts +93 -0
- package/dist/orchestration/consolidation-run.d.ts.map +1 -0
- package/dist/orchestration/contradiction-linking-coordinator.d.ts +102 -0
- package/dist/orchestration/contradiction-linking-coordinator.d.ts.map +1 -0
- package/dist/orchestration/conversation-index-coordinator.d.ts +99 -0
- package/dist/orchestration/conversation-index-coordinator.d.ts.map +1 -0
- package/dist/orchestration/dependency-propagation-delivery.d.ts +129 -0
- package/dist/orchestration/dependency-propagation-delivery.d.ts.map +1 -0
- package/dist/orchestration/dependency-propagation-queue-state.d.ts +15 -0
- package/dist/orchestration/dependency-propagation-queue-state.d.ts.map +1 -0
- package/dist/orchestration/dependency-propagation-recovery-replay.d.ts +49 -0
- package/dist/orchestration/dependency-propagation-recovery-replay.d.ts.map +1 -0
- package/dist/orchestration/dependency-propagation-replay-reconciliation.d.ts +25 -0
- package/dist/orchestration/dependency-propagation-replay-reconciliation.d.ts.map +1 -0
- package/dist/orchestration/dependency-propagation.d.ts +64 -0
- package/dist/orchestration/dependency-propagation.d.ts.map +1 -0
- package/dist/orchestration/dependency-revalidation.d.ts +45 -0
- package/dist/orchestration/dependency-revalidation.d.ts.map +1 -0
- package/dist/orchestration/entity-synthesis-coordinator.d.ts +64 -0
- package/dist/orchestration/entity-synthesis-coordinator.d.ts.map +1 -0
- package/dist/orchestration/episodic-context-section.d.ts +30 -0
- package/dist/orchestration/episodic-context-section.d.ts.map +1 -0
- package/dist/orchestration/extraction-anchor-snapshot.d.ts +20 -0
- package/dist/orchestration/extraction-anchor-snapshot.d.ts.map +1 -0
- package/dist/orchestration/extraction-envelope.d.ts +40 -0
- package/dist/orchestration/extraction-envelope.d.ts.map +1 -0
- package/dist/orchestration/extraction-injection-gate.d.ts +51 -0
- package/dist/orchestration/extraction-injection-gate.d.ts.map +1 -0
- package/dist/orchestration/extraction-origin-context.d.ts +19 -0
- package/dist/orchestration/extraction-origin-context.d.ts.map +1 -0
- package/dist/orchestration/extraction-persist-deps.d.ts +76 -0
- package/dist/orchestration/extraction-persist-deps.d.ts.map +1 -0
- package/dist/orchestration/extraction-persist-promotion.d.ts +203 -0
- package/dist/orchestration/extraction-persist-promotion.d.ts.map +1 -0
- package/dist/orchestration/extraction-persist.d.ts +19 -0
- package/dist/orchestration/extraction-persist.d.ts.map +1 -0
- package/dist/orchestration/extraction-queue-coordinator.d.ts +103 -0
- package/dist/orchestration/extraction-queue-coordinator.d.ts.map +1 -0
- package/dist/orchestration/extraction-run-helpers.d.ts +123 -0
- package/dist/orchestration/extraction-run-helpers.d.ts.map +1 -0
- package/dist/orchestration/extraction-run.d.ts +174 -0
- package/dist/orchestration/extraction-run.d.ts.map +1 -0
- package/dist/orchestration/extraction-shutdown.d.ts +6 -0
- package/dist/orchestration/extraction-shutdown.d.ts.map +1 -0
- package/dist/orchestration/extraction-watermark.d.ts +28 -0
- package/dist/orchestration/extraction-watermark.d.ts.map +1 -0
- package/dist/orchestration/generic-recall-paths.d.ts +36 -0
- package/dist/orchestration/generic-recall-paths.d.ts.map +1 -0
- package/dist/orchestration/graph-path-state-loader.d.ts +15 -0
- package/dist/orchestration/graph-path-state-loader.d.ts.map +1 -0
- package/dist/orchestration/graph-recall-coordinator.d.ts +107 -0
- package/dist/orchestration/graph-recall-coordinator.d.ts.map +1 -0
- package/dist/orchestration/harmonic-construction-persist.d.ts +58 -0
- package/dist/orchestration/harmonic-construction-persist.d.ts.map +1 -0
- package/dist/orchestration/lifecycle-policy-coordinator.d.ts +81 -0
- package/dist/orchestration/lifecycle-policy-coordinator.d.ts.map +1 -0
- package/dist/orchestration/maintenance.d.ts +229 -37
- package/dist/orchestration/maintenance.d.ts.map +1 -0
- package/dist/orchestration/maintenance.js +25 -25
- package/dist/orchestration/namespace-read-fanout.d.ts +95 -0
- package/dist/orchestration/namespace-read-fanout.d.ts.map +1 -0
- package/dist/orchestration/orchestrator-helpers.d.ts +408 -0
- package/dist/orchestration/orchestrator-helpers.d.ts.map +1 -0
- package/dist/orchestration/orchestrator-init.d.ts +124 -0
- package/dist/orchestration/orchestrator-init.d.ts.map +1 -0
- package/dist/orchestration/orchestrator-namespace-scope.d.ts +19 -0
- package/dist/orchestration/orchestrator-namespace-scope.d.ts.map +1 -0
- package/dist/orchestration/persistence-index.d.ts +141 -0
- package/dist/orchestration/persistence-index.d.ts.map +1 -0
- package/dist/orchestration/projection-rebuild-schedule.d.ts +21 -0
- package/dist/orchestration/projection-rebuild-schedule.d.ts.map +1 -0
- package/dist/orchestration/qmd-result-resolver.d.ts +75 -0
- package/dist/orchestration/qmd-result-resolver.d.ts.map +1 -0
- package/dist/orchestration/recall-background-writes.d.ts +3 -0
- package/dist/orchestration/recall-background-writes.d.ts.map +1 -0
- package/dist/orchestration/recall-entry.d.ts +78 -0
- package/dist/orchestration/recall-entry.d.ts.map +1 -0
- package/dist/orchestration/recall-internal-deps.d.ts +311 -0
- package/dist/orchestration/recall-internal-deps.d.ts.map +1 -0
- package/dist/orchestration/recall-internal.d.ts +30 -0
- package/dist/orchestration/recall-internal.d.ts.map +1 -0
- package/dist/orchestration/recall-introspection.d.ts +108 -0
- package/dist/orchestration/recall-introspection.d.ts.map +1 -0
- package/dist/orchestration/recall-profile-storage.d.ts +20 -0
- package/dist/orchestration/recall-profile-storage.d.ts.map +1 -0
- package/dist/orchestration/recall-recognition-index.d.ts +23 -0
- package/dist/orchestration/recall-recognition-index.d.ts.map +1 -0
- package/dist/orchestration/recall-recognition-search.d.ts +7 -0
- package/dist/orchestration/recall-recognition-search.d.ts.map +1 -0
- package/dist/orchestration/recall-rerank-coordinator.d.ts +126 -0
- package/dist/orchestration/recall-rerank-coordinator.d.ts.map +1 -0
- package/dist/orchestration/recall-result-formatter.d.ts +128 -0
- package/dist/orchestration/recall-result-formatter.d.ts.map +1 -0
- package/dist/orchestration/recall-search-pipeline.d.ts +284 -0
- package/dist/orchestration/recall-search-pipeline.d.ts.map +1 -0
- package/dist/orchestration/recall-search-prefilter.d.ts +31 -0
- package/dist/orchestration/recall-search-prefilter.d.ts.map +1 -0
- package/dist/orchestration/recall-section-coordinator.d.ts +92 -0
- package/dist/orchestration/recall-section-coordinator.d.ts.map +1 -0
- package/dist/orchestration/self-deps.d.ts +27 -0
- package/dist/orchestration/self-deps.d.ts.map +1 -0
- package/dist/orchestration/semantic-consolidation-coordinator.d.ts +64 -0
- package/dist/orchestration/semantic-consolidation-coordinator.d.ts.map +1 -0
- package/dist/orchestration/semantic-merge-commit-effects.d.ts +193 -0
- package/dist/orchestration/semantic-merge-commit-effects.d.ts.map +1 -0
- package/dist/orchestration/semantic-merge-persist.d.ts +318 -0
- package/dist/orchestration/semantic-merge-persist.d.ts.map +1 -0
- package/dist/orchestration/semantic-merge-promotion-payload.d.ts +132 -0
- package/dist/orchestration/semantic-merge-promotion-payload.d.ts.map +1 -0
- package/dist/orchestration/session-context.d.ts +225 -0
- package/dist/orchestration/session-context.d.ts.map +1 -0
- package/dist/orchestration/startup-collection-checks.d.ts +23 -0
- package/dist/orchestration/startup-collection-checks.d.ts.map +1 -0
- package/dist/orchestration/tier-migration-coordinator.d.ts +65 -0
- package/dist/orchestration/tier-migration-coordinator.d.ts.map +1 -0
- package/dist/orchestration/turn-ingestion.d.ts +227 -0
- package/dist/orchestration/turn-ingestion.d.ts.map +1 -0
- package/dist/orchestration/update-localization.d.ts +37 -0
- package/dist/orchestration/update-localization.d.ts.map +1 -0
- package/dist/orchestration/workspace-ops.d.ts +154 -0
- package/dist/orchestration/workspace-ops.d.ts.map +1 -0
- package/dist/orchestration/xray-capture-queue.d.ts +17 -0
- package/dist/orchestration/xray-capture-queue.d.ts.map +1 -0
- package/dist/orchestrator.d.ts +867 -109
- package/dist/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator.js +157 -152
- package/dist/page-versioning.d.ts +16 -17
- package/dist/page-versioning.d.ts.map +1 -0
- package/dist/patterns-cli.d.ts +20 -40
- package/dist/patterns-cli.d.ts.map +1 -0
- package/dist/peers/index.d.ts +17 -327
- package/dist/peers/index.d.ts.map +1 -0
- package/dist/peers/migrate-from-identity-anchor.d.ts +119 -0
- package/dist/peers/migrate-from-identity-anchor.d.ts.map +1 -0
- package/dist/peers/profile-reasoner.d.ts +204 -0
- package/dist/peers/profile-reasoner.d.ts.map +1 -0
- package/dist/peers/storage.d.ts +163 -0
- package/dist/peers/storage.d.ts.map +1 -0
- package/dist/peers/types.d.ts +125 -0
- package/dist/peers/types.d.ts.map +1 -0
- package/dist/plugin-entry-resolver.d.ts +3 -4
- package/dist/plugin-entry-resolver.d.ts.map +1 -0
- package/dist/plugin-id.d.ts +4 -5
- package/dist/plugin-id.d.ts.map +1 -0
- package/dist/policy-runtime.d.ts +7 -26
- package/dist/policy-runtime.d.ts.map +1 -0
- package/dist/preferences/drift-config.d.ts +27 -0
- package/dist/preferences/drift-config.d.ts.map +1 -0
- package/dist/preferences/drift-recall.d.ts +74 -0
- package/dist/preferences/drift-recall.d.ts.map +1 -0
- package/dist/preferences/drift-types.d.ts +59 -0
- package/dist/preferences/drift-types.d.ts.map +1 -0
- package/dist/preferences/index.d.ts +12 -0
- package/dist/preferences/index.d.ts.map +1 -0
- package/dist/preferences/preference-drift.d.ts +144 -0
- package/dist/preferences/preference-drift.d.ts.map +1 -0
- package/dist/prioritized-embed.d.ts +3 -4
- package/dist/prioritized-embed.d.ts.map +1 -0
- package/dist/proactive-contention.d.ts +4 -24
- package/dist/proactive-contention.d.ts.map +1 -0
- package/dist/procedural/library-maintenance.d.ts +102 -0
- package/dist/procedural/library-maintenance.d.ts.map +1 -0
- package/dist/procedural/maintenance-config.d.ts +9 -0
- package/dist/procedural/maintenance-config.d.ts.map +1 -0
- package/dist/procedural/procedure-miner.d.ts +20 -0
- package/dist/procedural/procedure-miner.d.ts.map +1 -0
- package/dist/procedural/procedure-recall.d.ts +30 -0
- package/dist/procedural/procedure-recall.d.ts.map +1 -0
- package/dist/procedural/procedure-stats.d.ts +68 -0
- package/dist/procedural/procedure-stats.d.ts.map +1 -0
- package/dist/procedural/procedure-types.d.ts +26 -0
- package/dist/procedural/procedure-types.d.ts.map +1 -0
- package/dist/procedural/reinforcement-core.d.ts +39 -0
- package/dist/procedural/reinforcement-core.d.ts.map +1 -0
- package/dist/procedural/skill-io.d.ts +70 -0
- package/dist/procedural/skill-io.d.ts.map +1 -0
- package/dist/procedural/skill-projection.d.ts +98 -0
- package/dist/procedural/skill-projection.d.ts.map +1 -0
- package/dist/profiling.d.ts +10 -11
- package/dist/profiling.d.ts.map +1 -0
- package/dist/projection/index.d.ts +62 -0
- package/dist/projection/index.d.ts.map +1 -0
- package/dist/provenance.d.ts +13 -33
- package/dist/provenance.d.ts.map +1 -0
- package/dist/provenance.js +2 -2
- package/dist/providers/codex-subscription.d.ts +115 -0
- package/dist/providers/codex-subscription.d.ts.map +1 -0
- package/dist/qmd-preflight.d.ts +31 -21
- package/dist/qmd-preflight.d.ts.map +1 -0
- package/dist/qmd-recall-cache.d.ts +11 -30
- package/dist/qmd-recall-cache.d.ts.map +1 -0
- package/dist/qmd-status.d.ts +10 -11
- package/dist/qmd-status.d.ts.map +1 -0
- package/dist/qmd.d.ts +325 -21
- package/dist/qmd.d.ts.map +1 -0
- package/dist/reasoning-trace-recall.d.ts +7 -8
- package/dist/reasoning-trace-recall.d.ts.map +1 -0
- package/dist/reasoning-trace-types.d.ts +9 -10
- package/dist/reasoning-trace-types.d.ts.map +1 -0
- package/dist/recall-audit-anomaly.d.ts +11 -15
- package/dist/recall-audit-anomaly.d.ts.map +1 -0
- package/dist/recall-audit.d.ts +6 -8
- package/dist/recall-audit.d.ts.map +1 -0
- package/dist/recall-composition-decision.d.ts +9 -12
- package/dist/recall-composition-decision.d.ts.map +1 -0
- package/dist/recall-concurrency-config.d.ts +3 -22
- package/dist/recall-concurrency-config.d.ts.map +1 -0
- package/dist/recall-context-composition.d.ts +21 -22
- package/dist/recall-context-composition.d.ts.map +1 -0
- package/dist/recall-deep-access.d.ts +9 -12
- package/dist/recall-deep-access.d.ts.map +1 -0
- package/dist/recall-deep-budget-left.d.ts +2 -3
- package/dist/recall-deep-budget-left.d.ts.map +1 -0
- package/dist/recall-deep-budget.d.ts +2 -3
- package/dist/recall-deep-budget.d.ts.map +1 -0
- package/dist/recall-deep-expand-select.d.ts +4 -5
- package/dist/recall-deep-expand-select.d.ts.map +1 -0
- package/dist/recall-deep-expand.d.ts +2 -3
- package/dist/recall-deep-expand.d.ts.map +1 -0
- package/dist/recall-deep-frontier.d.ts +4 -5
- package/dist/recall-deep-frontier.d.ts.map +1 -0
- package/dist/recall-deep-policy.d.ts +5 -6
- package/dist/recall-deep-policy.d.ts.map +1 -0
- package/dist/recall-deep-query.d.ts +3 -4
- package/dist/recall-deep-query.d.ts.map +1 -0
- package/dist/recall-deep-refine.d.ts +2 -3
- package/dist/recall-deep-refine.d.ts.map +1 -0
- package/dist/recall-deep-render.d.ts +3 -6
- package/dist/recall-deep-render.d.ts.map +1 -0
- package/dist/recall-deep-rewrite.d.ts +4 -5
- package/dist/recall-deep-rewrite.d.ts.map +1 -0
- package/dist/recall-deep-step-count.d.ts +2 -3
- package/dist/recall-deep-step-count.d.ts.map +1 -0
- package/dist/recall-deep-stop-reason.d.ts +5 -6
- package/dist/recall-deep-stop-reason.d.ts.map +1 -0
- package/dist/recall-deep-stop.d.ts +6 -7
- package/dist/recall-deep-stop.d.ts.map +1 -0
- package/dist/recall-deep-trace-empty.d.ts +2 -3
- package/dist/recall-deep-trace-empty.d.ts.map +1 -0
- package/dist/recall-deep-working-set.d.ts +2 -3
- package/dist/recall-deep-working-set.d.ts.map +1 -0
- package/dist/recall-deep.d.ts +11 -12
- package/dist/recall-deep.d.ts.map +1 -0
- package/dist/recall-disclosure-escalation.d.ts +9 -29
- package/dist/recall-disclosure-escalation.d.ts.map +1 -0
- package/dist/recall-explain-renderer.d.ts +12 -38
- package/dist/recall-explain-renderer.d.ts.map +1 -0
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-handles.d.ts +23 -24
- package/dist/recall-handles.d.ts.map +1 -0
- package/dist/recall-memory-map.d.ts +8 -27
- package/dist/recall-memory-map.d.ts.map +1 -0
- package/dist/recall-mmr.d.ts +13 -14
- package/dist/recall-mmr.d.ts.map +1 -0
- package/dist/recall-navigate-access.d.ts +6 -27
- package/dist/recall-navigate-access.d.ts.map +1 -0
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-action.d.ts +5 -5
- package/dist/recall-navigate-action.d.ts.map +1 -0
- package/dist/recall-navigate-budget.d.ts +3 -4
- package/dist/recall-navigate-budget.d.ts.map +1 -0
- package/dist/recall-navigate-cost.d.ts +2 -3
- package/dist/recall-navigate-cost.d.ts.map +1 -0
- package/dist/recall-navigate-depth.d.ts +2 -3
- package/dist/recall-navigate-depth.d.ts.map +1 -0
- package/dist/recall-navigate-disclosure.d.ts +5 -25
- package/dist/recall-navigate-disclosure.d.ts.map +1 -0
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate-link.d.ts +5 -5
- package/dist/recall-navigate-link.d.ts.map +1 -0
- package/dist/recall-navigate-max-children.d.ts +2 -3
- package/dist/recall-navigate-max-children.d.ts.map +1 -0
- package/dist/recall-navigate-node.d.ts +3 -4
- package/dist/recall-navigate-node.d.ts.map +1 -0
- package/dist/recall-navigate-path.d.ts +2 -3
- package/dist/recall-navigate-path.d.ts.map +1 -0
- package/dist/recall-navigate-render.d.ts +3 -4
- package/dist/recall-navigate-render.d.ts.map +1 -0
- package/dist/recall-navigate-traverse.d.ts +5 -6
- package/dist/recall-navigate-traverse.d.ts.map +1 -0
- package/dist/recall-navigate-window.d.ts +5 -6
- package/dist/recall-navigate-window.d.ts.map +1 -0
- package/dist/recall-navigate.d.ts +13 -33
- package/dist/recall-navigate.d.ts.map +1 -0
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation-config.d.ts +7 -8
- package/dist/recall-navigation-config.d.ts.map +1 -0
- package/dist/recall-navigation-http-glue.d.ts +5 -151
- package/dist/recall-navigation-http-glue.d.ts.map +1 -0
- package/dist/recall-navigation-http-glue.js +2 -2
- package/dist/recall-navigation-mcp-tools.d.ts +3 -150
- package/dist/recall-navigation-mcp-tools.d.ts.map +1 -0
- package/dist/recall-navigation-operations.d.ts +11 -2
- package/dist/recall-navigation-operations.d.ts.map +1 -0
- package/dist/recall-navigation-operations.js +66 -61
- package/dist/recall-navigation-renderer.d.ts +4 -28
- package/dist/recall-navigation-renderer.d.ts.map +1 -0
- package/dist/recall-navigation.d.ts +13 -34
- package/dist/recall-navigation.d.ts.map +1 -0
- package/dist/recall-navigation.js +65 -60
- package/dist/recall-pipeline-stages.d.ts +6 -9
- package/dist/recall-pipeline-stages.d.ts.map +1 -0
- package/dist/recall-planner-i18n.d.ts +13 -14
- package/dist/recall-planner-i18n.d.ts.map +1 -0
- package/dist/recall-planner-llm.d.ts +8 -30
- package/dist/recall-planner-llm.d.ts.map +1 -0
- package/dist/recall-qos.d.ts +13 -15
- package/dist/recall-qos.d.ts.map +1 -0
- package/dist/recall-query-policy.d.ts +9 -10
- package/dist/recall-query-policy.d.ts.map +1 -0
- package/dist/recall-recognition-tier.d.ts +27 -28
- package/dist/recall-recognition-tier.d.ts.map +1 -0
- package/dist/recall-state-view-admission.d.ts +7 -26
- package/dist/recall-state-view-admission.d.ts.map +1 -0
- package/dist/recall-state-view-admission.js +3 -3
- package/dist/recall-state-view-anchors.d.ts +10 -29
- package/dist/recall-state-view-anchors.d.ts.map +1 -0
- package/dist/recall-state-view-current.d.ts +4 -5
- package/dist/recall-state-view-current.d.ts.map +1 -0
- package/dist/recall-state-view-inject.d.ts +3 -7
- package/dist/recall-state-view-inject.d.ts.map +1 -0
- package/dist/recall-state-view-kind.d.ts +5 -5
- package/dist/recall-state-view-kind.d.ts.map +1 -0
- package/dist/recall-state-view-label.d.ts +3 -6
- package/dist/recall-state-view-label.d.ts.map +1 -0
- package/dist/recall-state-view-packet.d.ts +7 -9
- package/dist/recall-state-view-packet.d.ts.map +1 -0
- package/dist/recall-state-view-render.d.ts +4 -7
- package/dist/recall-state-view-render.d.ts.map +1 -0
- package/dist/recall-state-view-successor.d.ts +3 -4
- package/dist/recall-state-view-successor.d.ts.map +1 -0
- package/dist/recall-state-view-superseded.d.ts +3 -4
- package/dist/recall-state-view-superseded.d.ts.map +1 -0
- package/dist/recall-state-view-transition.d.ts +4 -5
- package/dist/recall-state-view-transition.d.ts.map +1 -0
- package/dist/recall-state-view-widen.d.ts +3 -6
- package/dist/recall-state-view-widen.d.ts.map +1 -0
- package/dist/recall-state-view-wire.d.ts +3 -6
- package/dist/recall-state-view-wire.d.ts.map +1 -0
- package/dist/recall-state-view-zero-diff.d.ts +4 -5
- package/dist/recall-state-view-zero-diff.d.ts.map +1 -0
- package/dist/recall-state-view.d.ts +16 -17
- package/dist/recall-state-view.d.ts.map +1 -0
- package/dist/recall-state.d.ts +17 -35
- package/dist/recall-state.d.ts.map +1 -0
- package/dist/recall-tag-filter.d.ts +10 -33
- package/dist/recall-tag-filter.d.ts.map +1 -0
- package/dist/recall-timings.d.ts +10 -29
- package/dist/recall-timings.d.ts.map +1 -0
- package/dist/recall-tokenization.d.ts +7 -8
- package/dist/recall-tokenization.d.ts.map +1 -0
- package/dist/recall-why-cli.d.ts +25 -0
- package/dist/recall-why-cli.d.ts.map +1 -0
- package/dist/recall-why-cli.js +9 -0
- package/dist/recall-why-cli.js.map +1 -0
- package/dist/recall-why-renderer.d.ts +25 -0
- package/dist/recall-why-renderer.d.ts.map +1 -0
- package/dist/recall-why-renderer.js +18 -0
- package/dist/recall-why-renderer.js.map +1 -0
- package/dist/recall-why-service.d.ts +49 -0
- package/dist/recall-why-service.d.ts.map +1 -0
- package/dist/recall-why-service.js +46 -0
- package/dist/recall-why-service.js.map +1 -0
- package/dist/recall-why.d.ts +175 -0
- package/dist/recall-why.d.ts.map +1 -0
- package/dist/recall-why.js +25 -0
- package/dist/recall-why.js.map +1 -0
- package/dist/recall-xray-cli.d.ts +7 -31
- package/dist/recall-xray-cli.d.ts.map +1 -0
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +9 -33
- package/dist/recall-xray-renderer.d.ts.map +1 -0
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +19 -39
- package/dist/recall-xray.d.ts.map +1 -0
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +15 -37
- package/dist/reconcile/cursor.d.ts.map +1 -0
- package/dist/reconcile/manifest.d.ts +19 -40
- package/dist/reconcile/manifest.d.ts.map +1 -0
- package/dist/reconcile/manifest.js +2 -2
- package/dist/reconcile/plan.d.ts +22 -42
- package/dist/reconcile/plan.d.ts.map +1 -0
- package/dist/reconstruct.d.ts +2 -3
- package/dist/reconstruct.d.ts.map +1 -0
- package/dist/relay/mission-access.d.ts +28 -0
- package/dist/relay/mission-access.d.ts.map +1 -0
- package/dist/relay/mission-fixture.d.ts +11 -0
- package/dist/relay/mission-fixture.d.ts.map +1 -0
- package/dist/relay/mission.d.ts +3952 -0
- package/dist/relay/mission.d.ts.map +1 -0
- package/dist/release-changelog.d.ts +3 -4
- package/dist/release-changelog.d.ts.map +1 -0
- package/dist/relevance.d.ts +3 -3
- package/dist/relevance.d.ts.map +1 -0
- package/dist/replay/normalizers/chatgpt.d.ts +3 -23
- package/dist/replay/normalizers/chatgpt.d.ts.map +1 -0
- package/dist/replay/normalizers/claude.d.ts +3 -23
- package/dist/replay/normalizers/claude.d.ts.map +1 -0
- package/dist/replay/normalizers/openclaw.d.ts +3 -23
- package/dist/replay/normalizers/openclaw.d.ts.map +1 -0
- package/dist/replay/normalizers/shared.d.ts +6 -25
- package/dist/replay/normalizers/shared.d.ts.map +1 -0
- package/dist/replay/runner.d.ts +10 -30
- package/dist/replay/runner.d.ts.map +1 -0
- package/dist/replay/types.d.ts +18 -37
- package/dist/replay/types.d.ts.map +1 -0
- package/dist/replica-divergence.d.ts +24 -45
- package/dist/replica-divergence.d.ts.map +1 -0
- package/dist/replica-divergence.js +3 -3
- package/dist/replica-peers-config.d.ts +50 -18
- package/dist/replica-peers-config.d.ts.map +1 -0
- package/dist/rerank.d.ts +8 -9
- package/dist/rerank.d.ts.map +1 -0
- package/dist/resolution-CHNISQJB.js +36 -0
- package/dist/resolution-CHNISQJB.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +9 -27
- package/dist/resolve-auth-token.d.ts.map +1 -0
- package/dist/resolve-provider-secret.d.ts +10 -11
- package/dist/resolve-provider-secret.d.ts.map +1 -0
- package/dist/response-guidance-recall.d.ts +5 -8
- package/dist/response-guidance-recall.d.ts.map +1 -0
- package/dist/resume-bundles.d.ts +9 -10
- package/dist/resume-bundles.d.ts.map +1 -0
- package/dist/resume-bundles.js +24 -24
- package/dist/retrieval-agents.d.ts +14 -36
- package/dist/retrieval-agents.d.ts.map +1 -0
- package/dist/retrieval-tiers.d.ts +4 -24
- package/dist/retrieval-tiers.d.ts.map +1 -0
- package/dist/retrieval.d.ts +5 -6
- package/dist/retrieval.d.ts.map +1 -0
- package/dist/review/frontmatter.d.ts +6 -0
- package/dist/review/frontmatter.d.ts.map +1 -0
- package/dist/review/index.d.ts +81 -0
- package/dist/review/index.d.ts.map +1 -0
- package/dist/review/review-deck-http-base.d.ts +10 -0
- package/dist/review/review-deck-http-base.d.ts.map +1 -0
- package/dist/review/review-deck-mutation.d.ts +51 -0
- package/dist/review/review-deck-mutation.d.ts.map +1 -0
- package/dist/review/review-deck-snapshot.d.ts +10 -0
- package/dist/review/review-deck-snapshot.d.ts.map +1 -0
- package/dist/review/review-deck-surface.d.ts +33 -0
- package/dist/review/review-deck-surface.d.ts.map +1 -0
- package/dist/review/review-deck.d.ts +107 -0
- package/dist/review/review-deck.d.ts.map +1 -0
- package/dist/routing/engine.d.ts +12 -31
- package/dist/routing/engine.d.ts.map +1 -0
- package/dist/routing/store.d.ts +3 -23
- package/dist/routing/store.d.ts.map +1 -0
- package/dist/runtime/better-sqlite.d.ts +9 -10
- package/dist/runtime/better-sqlite.d.ts.map +1 -0
- package/dist/runtime/child-process.d.ts +5 -5
- package/dist/runtime/child-process.d.ts.map +1 -0
- package/dist/runtime/daemon-health.d.ts +2 -0
- package/dist/runtime/daemon-health.d.ts.map +1 -0
- package/dist/runtime/env.d.ts +5 -6
- package/dist/runtime/env.d.ts.map +1 -0
- package/dist/runtime/http-transport.d.ts +3 -4
- package/dist/runtime/http-transport.d.ts.map +1 -0
- package/dist/salvage-envelope.d.ts +3 -23
- package/dist/salvage-envelope.d.ts.map +1 -0
- package/dist/sanitize.d.ts +5 -7
- package/dist/sanitize.d.ts.map +1 -0
- package/dist/schemas.d.ts +135 -137
- package/dist/schemas.d.ts.map +1 -0
- package/dist/scopes/scope-plan.d.ts +258 -0
- package/dist/scopes/scope-plan.d.ts.map +1 -0
- package/dist/sdk-compat.d.ts +4 -5
- package/dist/sdk-compat.d.ts.map +1 -0
- package/dist/search/abort.d.ts +5 -0
- package/dist/search/abort.d.ts.map +1 -0
- package/dist/search/document-scanner.d.ts +3 -4
- package/dist/search/document-scanner.d.ts.map +1 -0
- package/dist/search/embed-helper.d.ts +8 -26
- package/dist/search/embed-helper.d.ts.map +1 -0
- package/dist/search/factory.d.ts +10 -31
- package/dist/search/factory.d.ts.map +1 -0
- package/dist/search/factory.js +4 -4
- package/dist/search/index.d.ts +11 -32
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +10 -10
- package/dist/search/lancedb-backend.d.ts +5 -26
- package/dist/search/lancedb-backend.d.ts.map +1 -0
- package/dist/search/meilisearch-backend.d.ts +4 -24
- package/dist/search/meilisearch-backend.d.ts.map +1 -0
- package/dist/search/noop-backend.d.ts +3 -23
- package/dist/search/noop-backend.d.ts.map +1 -0
- package/dist/search/orama-backend.d.ts +6 -27
- package/dist/search/orama-backend.d.ts.map +1 -0
- package/dist/search/orama-cjk-tokenizer.d.ts +53 -0
- package/dist/search/orama-cjk-tokenizer.d.ts.map +1 -0
- package/dist/search/port.d.ts +10 -29
- package/dist/search/port.d.ts.map +1 -0
- package/dist/search/remote-backend.d.ts +4 -24
- package/dist/search/remote-backend.d.ts.map +1 -0
- package/dist/secure-store/cipher.d.ts +127 -0
- package/dist/secure-store/cipher.d.ts.map +1 -0
- package/dist/secure-store/cli-handlers.d.ts +134 -0
- package/dist/secure-store/cli-handlers.d.ts.map +1 -0
- package/dist/secure-store/cli-renderer.d.ts +16 -0
- package/dist/secure-store/cli-renderer.d.ts.map +1 -0
- package/dist/secure-store/header.d.ts +137 -0
- package/dist/secure-store/header.d.ts.map +1 -0
- package/dist/secure-store/index.d.ts +23 -899
- package/dist/secure-store/index.d.ts.map +1 -0
- package/dist/secure-store/kdf.d.ts +101 -0
- package/dist/secure-store/kdf.d.ts.map +1 -0
- package/dist/secure-store/keyring.d.ts +58 -0
- package/dist/secure-store/keyring.d.ts.map +1 -0
- package/dist/secure-store/metadata.d.ts +104 -0
- package/dist/secure-store/metadata.d.ts.map +1 -0
- package/dist/secure-store/passphrase-reader.d.ts +40 -0
- package/dist/secure-store/passphrase-reader.d.ts.map +1 -0
- package/dist/secure-store/secure-fs.d.ts +227 -0
- package/dist/secure-store/secure-fs.d.ts.map +1 -0
- package/dist/security/audit-memory-cli.d.ts +9 -0
- package/dist/security/audit-memory-cli.d.ts.map +1 -0
- package/dist/security/audit-memory.d.ts +48 -0
- package/dist/security/audit-memory.d.ts.map +1 -0
- package/dist/security/injection-screen.d.ts +19 -0
- package/dist/security/injection-screen.d.ts.map +1 -0
- package/dist/security/origin-authority.d.ts +30 -0
- package/dist/security/origin-authority.d.ts.map +1 -0
- package/dist/security/types.d.ts +13 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/semantic-chunking.d.ts +13 -16
- package/dist/semantic-chunking.d.ts.map +1 -0
- package/dist/semantic-consolidation.d.ts +126 -22
- package/dist/semantic-consolidation.d.ts.map +1 -0
- package/dist/semantic-consolidation.js +15 -15
- package/dist/semantic-merge-config.d.ts +2 -3
- package/dist/semantic-merge-config.d.ts.map +1 -0
- package/dist/semantic-rule-promotion.d.ts +7 -7
- package/dist/semantic-rule-promotion.d.ts.map +1 -0
- package/dist/semantic-rule-promotion.js +14 -14
- package/dist/semantic-rule-verifier.d.ts +6 -25
- package/dist/semantic-rule-verifier.d.ts.map +1 -0
- package/dist/semantic-rule-verifier.js +14 -14
- package/dist/session-identity.d.ts +10 -11
- package/dist/session-identity.d.ts.map +1 -0
- package/dist/session-integrity.d.ts +14 -15
- package/dist/session-integrity.d.ts.map +1 -0
- package/dist/session-namespace-bindings.d.ts +10 -11
- package/dist/session-namespace-bindings.d.ts.map +1 -0
- package/dist/session-observer-bands.d.ts +4 -23
- package/dist/session-observer-bands.d.ts.map +1 -0
- package/dist/session-observer-state.d.ts +6 -25
- package/dist/session-observer-state.d.ts.map +1 -0
- package/dist/session-summaries/adapters.d.ts +5 -0
- package/dist/session-summaries/adapters.d.ts.map +1 -0
- package/dist/session-summaries/index.d.ts +7 -0
- package/dist/session-summaries/index.d.ts.map +1 -0
- package/dist/session-summaries/redaction.d.ts +8 -0
- package/dist/session-summaries/redaction.d.ts.map +1 -0
- package/dist/session-summaries/types.d.ts +113 -0
- package/dist/session-summaries/types.d.ts.map +1 -0
- package/dist/session-toggles.d.ts +4 -4
- package/dist/session-toggles.d.ts.map +1 -0
- package/dist/session-transcript-migration.d.ts +9 -10
- package/dist/session-transcript-migration.d.ts.map +1 -0
- package/dist/shared-context/authority-precedence.d.ts +22 -0
- package/dist/shared-context/authority-precedence.d.ts.map +1 -0
- package/dist/shared-context/authority.d.ts +18 -0
- package/dist/shared-context/authority.d.ts.map +1 -0
- package/dist/shared-context/claim-key.d.ts +14 -0
- package/dist/shared-context/claim-key.d.ts.map +1 -0
- package/dist/shared-context/contradictions.d.ts +20 -0
- package/dist/shared-context/contradictions.d.ts.map +1 -0
- package/dist/shared-context/curation-lint.d.ts +23 -0
- package/dist/shared-context/curation-lint.d.ts.map +1 -0
- package/dist/shared-context/envelope-actor.d.ts +14 -0
- package/dist/shared-context/envelope-actor.d.ts.map +1 -0
- package/dist/shared-context/envelope-at.d.ts +19 -0
- package/dist/shared-context/envelope-at.d.ts.map +1 -0
- package/dist/shared-context/envelope-id.d.ts +14 -0
- package/dist/shared-context/envelope-id.d.ts.map +1 -0
- package/dist/shared-context/envelope-io.d.ts +100 -0
- package/dist/shared-context/envelope-io.d.ts.map +1 -0
- package/dist/shared-context/envelope-required.d.ts +14 -0
- package/dist/shared-context/envelope-required.d.ts.map +1 -0
- package/dist/shared-context/envelope-ttl.d.ts +12 -0
- package/dist/shared-context/envelope-ttl.d.ts.map +1 -0
- package/dist/shared-context/governance.d.ts +28 -0
- package/dist/shared-context/governance.d.ts.map +1 -0
- package/dist/shared-context/iso-instant.d.ts +19 -0
- package/dist/shared-context/iso-instant.d.ts.map +1 -0
- package/dist/shared-context/manager.d.ts +13 -40
- package/dist/shared-context/manager.d.ts.map +1 -0
- package/dist/shared-context/provenance.d.ts +18 -0
- package/dist/shared-context/provenance.d.ts.map +1 -0
- package/dist/shared-context/staleness.d.ts +18 -0
- package/dist/shared-context/staleness.d.ts.map +1 -0
- package/dist/shared-context/supersession-chain.d.ts +41 -0
- package/dist/shared-context/supersession-chain.d.ts.map +1 -0
- package/dist/shared-context/trajectories.d.ts +24 -0
- package/dist/shared-context/trajectories.d.ts.map +1 -0
- package/dist/shared-context/write-output-controls.d.ts +4 -5
- package/dist/shared-context/write-output-controls.d.ts.map +1 -0
- package/dist/signal.d.ts +4 -23
- package/dist/signal.d.ts.map +1 -0
- package/dist/skills-registry.d.ts +4 -5
- package/dist/skills-registry.d.ts.map +1 -0
- package/dist/source-agent-qualifier.d.ts +8 -27
- package/dist/source-agent-qualifier.d.ts.map +1 -0
- package/dist/source-agent-qualifier.js +23 -23
- package/dist/source-attribution.d.ts +20 -21
- package/dist/source-attribution.d.ts.map +1 -0
- package/dist/spaces/index.d.ts +148 -0
- package/dist/spaces/index.d.ts.map +1 -0
- package/dist/standing-memory-block.d.ts +25 -26
- package/dist/standing-memory-block.d.ts.map +1 -0
- package/dist/standup/access-operations.d.ts +2 -0
- package/dist/standup/access-operations.d.ts.map +1 -0
- package/dist/standup/build.d.ts +6 -7
- package/dist/standup/build.d.ts.map +1 -0
- package/dist/standup/build.js +15 -15
- package/dist/standup/http-glue.d.ts +4 -0
- package/dist/standup/http-glue.d.ts.map +1 -0
- package/dist/standup/mcp-tools.d.ts +3 -0
- package/dist/standup/mcp-tools.d.ts.map +1 -0
- package/dist/storage/cas-revision-host.d.ts +34 -0
- package/dist/storage/cas-revision-host.d.ts.map +1 -0
- package/dist/storage/cas-revision-store.d.ts +176 -0
- package/dist/storage/cas-revision-store.d.ts.map +1 -0
- package/dist/storage/citation-hash-source.d.ts +3 -0
- package/dist/storage/citation-hash-source.d.ts.map +1 -0
- package/dist/storage/committed-invalidation.d.ts +9 -0
- package/dist/storage/committed-invalidation.d.ts.map +1 -0
- package/dist/storage/content-hash-index.d.ts +269 -0
- package/dist/storage/content-hash-index.d.ts.map +1 -0
- package/dist/storage/context-transform-ledger.d.ts +10 -0
- package/dist/storage/context-transform-ledger.d.ts.map +1 -0
- package/dist/storage/deletion-revision-store.d.ts +79 -0
- package/dist/storage/deletion-revision-store.d.ts.map +1 -0
- package/dist/storage/entity-alias-config.d.ts +2 -0
- package/dist/storage/entity-alias-config.d.ts.map +1 -0
- package/dist/storage/entity-canonical-id-lock.d.ts +4 -0
- package/dist/storage/entity-canonical-id-lock.d.ts.map +1 -0
- package/dist/storage/entity-canonical-id-migration-adapter.d.ts +24 -0
- package/dist/storage/entity-canonical-id-migration-adapter.d.ts.map +1 -0
- package/dist/storage/entity-canonical-id-migration-runner.d.ts +16 -0
- package/dist/storage/entity-canonical-id-migration-runner.d.ts.map +1 -0
- package/dist/storage/entity-canonical-id-migration.d.ts +44 -0
- package/dist/storage/entity-canonical-id-migration.d.ts.map +1 -0
- package/dist/storage/entity-canonical-id-references.d.ts +173 -0
- package/dist/storage/entity-canonical-id-references.d.ts.map +1 -0
- package/dist/storage/entity-id-safety.d.ts +2 -0
- package/dist/storage/entity-id-safety.d.ts.map +1 -0
- package/dist/storage/entity-ref-repair.d.ts +45 -0
- package/dist/storage/entity-ref-repair.d.ts.map +1 -0
- package/dist/storage/entity-store.d.ts +131 -0
- package/dist/storage/entity-store.d.ts.map +1 -0
- package/dist/storage/entity-timeline.d.ts +34 -0
- package/dist/storage/entity-timeline.d.ts.map +1 -0
- package/dist/storage/identity-continuity-store.d.ts +40 -0
- package/dist/storage/identity-continuity-store.d.ts.map +1 -0
- package/dist/storage/memory-frontmatter-metadata.d.ts +4 -0
- package/dist/storage/memory-frontmatter-metadata.d.ts.map +1 -0
- package/dist/storage/memory-lifecycle-ledger-access.d.ts +194 -0
- package/dist/storage/memory-lifecycle-ledger-access.d.ts.map +1 -0
- package/dist/storage/memory-migration-serialization.d.ts +5 -0
- package/dist/storage/memory-migration-serialization.d.ts.map +1 -0
- package/dist/storage/memory-read-store.d.ts +193 -0
- package/dist/storage/memory-read-store.d.ts.map +1 -0
- package/dist/storage/profile-header.d.ts +16 -0
- package/dist/storage/profile-header.d.ts.map +1 -0
- package/dist/storage/questions-file.d.ts +11 -0
- package/dist/storage/questions-file.d.ts.map +1 -0
- package/dist/storage/secure-line-reader.d.ts +53 -0
- package/dist/storage/secure-line-reader.d.ts.map +1 -0
- package/dist/storage/supersession-audit.d.ts +7 -0
- package/dist/storage/supersession-audit.d.ts.map +1 -0
- package/dist/storage/supersession-side-effects.d.ts +51 -0
- package/dist/storage/supersession-side-effects.d.ts.map +1 -0
- package/dist/storage/tombstone-blocked-capture-index.d.ts +93 -0
- package/dist/storage/tombstone-blocked-capture-index.d.ts.map +1 -0
- package/dist/storage/tombstone-blocked-capture-mutation.d.ts +53 -0
- package/dist/storage/tombstone-blocked-capture-mutation.d.ts.map +1 -0
- package/dist/storage/tombstone-blocked-capture-sync.d.ts +96 -0
- package/dist/storage/tombstone-blocked-capture-sync.d.ts.map +1 -0
- package/dist/storage/tombstone-migration-sources.d.ts +24 -0
- package/dist/storage/tombstone-migration-sources.d.ts.map +1 -0
- package/dist/storage/windowed-memory-read.d.ts +28 -0
- package/dist/storage/windowed-memory-read.d.ts.map +1 -0
- package/dist/storage-contract/harness.d.ts +59 -0
- package/dist/storage-contract/harness.d.ts.map +1 -0
- package/dist/storage-guards.d.ts +6 -7
- package/dist/storage-guards.d.ts.map +1 -0
- package/dist/storage-paths.d.ts +8 -9
- package/dist/storage-paths.d.ts.map +1 -0
- package/dist/storage.d.ts +1362 -33
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +15 -15
- package/dist/store-contract.d.ts +9 -10
- package/dist/store-contract.d.ts.map +1 -0
- package/dist/structured-attributes.d.ts +6 -7
- package/dist/structured-attributes.d.ts.map +1 -0
- package/dist/subject-config.d.ts +4 -24
- package/dist/subject-config.d.ts.map +1 -0
- package/dist/summarizer.d.ts +7 -27
- package/dist/summarizer.d.ts.map +1 -0
- package/dist/summarizer.js +3 -3
- package/dist/summary-snapshot.d.ts +6 -25
- package/dist/summary-snapshot.d.ts.map +1 -0
- package/dist/support-passport/access-http-base.d.ts +20 -0
- package/dist/support-passport/access-http-base.d.ts.map +1 -0
- package/dist/support-passport/access-http.d.ts +64 -0
- package/dist/support-passport/access-http.d.ts.map +1 -0
- package/dist/support-passport/access-operations.d.ts +197 -0
- package/dist/support-passport/access-operations.d.ts.map +1 -0
- package/dist/support-passport/access-service-base.d.ts +86 -0
- package/dist/support-passport/access-service-base.d.ts.map +1 -0
- package/dist/support-passport/access-surface.d.ts +118 -0
- package/dist/support-passport/access-surface.d.ts.map +1 -0
- package/dist/support-passport/card-projection.d.ts +83 -0
- package/dist/support-passport/card-projection.d.ts.map +1 -0
- package/dist/support-passport/card-replacement.d.ts +21 -0
- package/dist/support-passport/card-replacement.d.ts.map +1 -0
- package/dist/support-passport/card-service.d.ts +65 -0
- package/dist/support-passport/card-service.d.ts.map +1 -0
- package/dist/support-passport/card-state.d.ts +28 -0
- package/dist/support-passport/card-state.d.ts.map +1 -0
- package/dist/support-passport/config.d.ts +4 -0
- package/dist/support-passport/config.d.ts.map +1 -0
- package/dist/support-passport/contracts.d.ts +165 -0
- package/dist/support-passport/contracts.d.ts.map +1 -0
- package/dist/support-passport/errors.d.ts +7 -0
- package/dist/support-passport/errors.d.ts.map +1 -0
- package/dist/support-passport/generated-batch.d.ts +47 -0
- package/dist/support-passport/generated-batch.d.ts.map +1 -0
- package/dist/support-passport/grant-contracts.d.ts +443 -0
- package/dist/support-passport/grant-contracts.d.ts.map +1 -0
- package/dist/support-passport/grant-service.d.ts +48 -0
- package/dist/support-passport/grant-service.d.ts.map +1 -0
- package/dist/support-passport/grant-store.d.ts +84 -0
- package/dist/support-passport/grant-store.d.ts.map +1 -0
- package/dist/support-passport/index.d.ts +17 -571
- package/dist/support-passport/index.d.ts.map +1 -0
- package/dist/support-passport/index.js +75 -70
- package/dist/support-passport/mcp-tools.d.ts +16 -0
- package/dist/support-passport/mcp-tools.d.ts.map +1 -0
- package/dist/support-passport/model-adapter.d.ts +90 -0
- package/dist/support-passport/model-adapter.d.ts.map +1 -0
- package/dist/support-passport/model-audit.d.ts +115 -0
- package/dist/support-passport/model-audit.d.ts.map +1 -0
- package/dist/support-passport/model-bridge.d.ts +105 -0
- package/dist/support-passport/model-bridge.d.ts.map +1 -0
- package/dist/support-passport/model-contracts.d.ts +219 -0
- package/dist/support-passport/model-contracts.d.ts.map +1 -0
- package/dist/support-passport/model-service.d.ts +58 -0
- package/dist/support-passport/model-service.d.ts.map +1 -0
- package/dist/support-passport/offline-sync-guard.d.ts +46 -0
- package/dist/support-passport/offline-sync-guard.d.ts.map +1 -0
- package/dist/support-passport/owner-lock.d.ts +16 -0
- package/dist/support-passport/owner-lock.d.ts.map +1 -0
- package/dist/support-passport/private-file.d.ts +16 -0
- package/dist/support-passport/private-file.d.ts.map +1 -0
- package/dist/support-passport/public-http.d.ts +23 -0
- package/dist/support-passport/public-http.d.ts.map +1 -0
- package/dist/surfaces/dreams.d.ts +4 -5
- package/dist/surfaces/dreams.d.ts.map +1 -0
- package/dist/surfaces/heartbeat.d.ts +4 -5
- package/dist/surfaces/heartbeat.d.ts.map +1 -0
- package/dist/sync/index.d.ts +69 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/targeted-fact-recall.d.ts +5 -8
- package/dist/targeted-fact-recall.d.ts.map +1 -0
- package/dist/task-llm-config.d.ts +4 -5
- package/dist/task-llm-config.d.ts.map +1 -0
- package/dist/taxonomy/default-taxonomy.d.ts +7 -0
- package/dist/taxonomy/default-taxonomy.d.ts.map +1 -0
- package/dist/taxonomy/index.d.ts +11 -0
- package/dist/taxonomy/index.d.ts.map +1 -0
- package/dist/taxonomy/resolver-doc-generator.d.ts +17 -0
- package/dist/taxonomy/resolver-doc-generator.d.ts.map +1 -0
- package/dist/taxonomy/resolver.d.ts +25 -0
- package/dist/taxonomy/resolver.d.ts.map +1 -0
- package/dist/taxonomy/taxonomy-loader.d.ts +38 -0
- package/dist/taxonomy/taxonomy-loader.d.ts.map +1 -0
- package/dist/taxonomy/types.d.ts +49 -0
- package/dist/taxonomy/types.d.ts.map +1 -0
- package/dist/telemetry-transcript.d.ts +6 -7
- package/dist/telemetry-transcript.d.ts.map +1 -0
- package/dist/temporal-index-batch.d.ts +30 -1
- package/dist/temporal-index-batch.d.ts.map +1 -0
- package/dist/temporal-index-compat.d.ts +7 -267
- package/dist/temporal-index-compat.d.ts.map +1 -0
- package/dist/temporal-index.d.ts +230 -1
- package/dist/temporal-index.d.ts.map +1 -0
- package/dist/temporal-supersession.d.ts +14 -34
- package/dist/temporal-supersession.d.ts.map +1 -0
- package/dist/temporal-timeline-recall.d.ts +5 -24
- package/dist/temporal-timeline-recall.d.ts.map +1 -0
- package/dist/temporal-validity.d.ts +7 -27
- package/dist/temporal-validity.d.ts.map +1 -0
- package/dist/testing/lifecycle-matrix.d.ts +11 -12
- package/dist/testing/lifecycle-matrix.d.ts.map +1 -0
- package/dist/testing/orchestrator-lite.d.ts +80 -0
- package/dist/testing/orchestrator-lite.d.ts.map +1 -0
- package/dist/testing/subjects/meetings-namespace-harness.d.ts +32 -0
- package/dist/testing/subjects/meetings-namespace-harness.d.ts.map +1 -0
- package/dist/testing/tmp-dir.d.ts +9 -0
- package/dist/testing/tmp-dir.d.ts.map +1 -0
- package/dist/thread-key.d.ts +2 -3
- package/dist/thread-key.d.ts.map +1 -0
- package/dist/threading.d.ts +3 -23
- package/dist/threading.d.ts.map +1 -0
- package/dist/tier-migration.d.ts +10 -43
- package/dist/tier-migration.d.ts.map +1 -0
- package/dist/tier-routing.d.ts +8 -27
- package/dist/tier-routing.d.ts.map +1 -0
- package/dist/tmt.d.ts +18 -19
- package/dist/tmt.d.ts.map +1 -0
- package/dist/token-estimate.d.ts +2 -3
- package/dist/token-estimate.d.ts.map +1 -0
- package/dist/tokens.d.ts +15 -19
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +3 -3
- package/dist/tool-scoped-memory.d.ts +7 -8
- package/dist/tool-scoped-memory.d.ts.map +1 -0
- package/dist/topics.d.ts +4 -24
- package/dist/topics.d.ts.map +1 -0
- package/dist/training-export/converter.d.ts +18 -0
- package/dist/training-export/converter.d.ts.map +1 -0
- package/dist/training-export/date-parse.d.ts +38 -0
- package/dist/training-export/date-parse.d.ts.map +1 -0
- package/dist/training-export/index.d.ts +10 -0
- package/dist/training-export/index.d.ts.map +1 -0
- package/dist/training-export/registry.d.ts +27 -0
- package/dist/training-export/registry.d.ts.map +1 -0
- package/dist/training-export/types.d.ts +29 -0
- package/dist/training-export/types.d.ts.map +1 -0
- package/dist/transcript.d.ts +5 -24
- package/dist/transcript.d.ts.map +1 -0
- package/dist/transfer/autodetect.d.ts +3 -4
- package/dist/transfer/autodetect.d.ts.map +1 -0
- package/dist/transfer/backup.d.ts +3 -4
- package/dist/transfer/backup.d.ts.map +1 -0
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-crypto.d.ts +168 -0
- package/dist/transfer/capsule-crypto.d.ts.map +1 -0
- package/dist/transfer/capsule-export.d.ts +6 -9
- package/dist/transfer/capsule-export.d.ts.map +1 -0
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-fork.d.ts +117 -0
- package/dist/transfer/capsule-fork.d.ts.map +1 -0
- package/dist/transfer/capsule-import.d.ts +10 -13
- package/dist/transfer/capsule-import.d.ts.map +1 -0
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/capsule-merge.d.ts +124 -0
- package/dist/transfer/capsule-merge.d.ts.map +1 -0
- package/dist/transfer/conflict-policy.d.ts +5 -0
- package/dist/transfer/conflict-policy.d.ts.map +1 -0
- package/dist/transfer/constants.d.ts +4 -5
- package/dist/transfer/constants.d.ts.map +1 -0
- package/dist/transfer/exclusions.d.ts +8 -0
- package/dist/transfer/exclusions.d.ts.map +1 -0
- package/dist/transfer/export-json.d.ts +3 -4
- package/dist/transfer/export-json.d.ts.map +1 -0
- package/dist/transfer/export-md.d.ts +4 -5
- package/dist/transfer/export-md.d.ts.map +1 -0
- package/dist/transfer/export-okf.d.ts +11 -31
- package/dist/transfer/export-okf.d.ts.map +1 -0
- package/dist/transfer/export-okf.js +14 -14
- package/dist/transfer/export-sqlite.d.ts +3 -4
- package/dist/transfer/export-sqlite.d.ts.map +1 -0
- package/dist/transfer/fs-utils.d.ts +20 -21
- package/dist/transfer/fs-utils.d.ts.map +1 -0
- package/dist/transfer/import-json.d.ts +6 -7
- package/dist/transfer/import-json.d.ts.map +1 -0
- package/dist/transfer/import-md.d.ts +5 -6
- package/dist/transfer/import-md.d.ts.map +1 -0
- package/dist/transfer/import-sqlite.d.ts +5 -6
- package/dist/transfer/import-sqlite.d.ts.map +1 -0
- package/dist/transfer/integrity.d.ts +8 -0
- package/dist/transfer/integrity.d.ts.map +1 -0
- package/dist/transfer/sqlite-schema.d.ts +3 -4
- package/dist/transfer/sqlite-schema.d.ts.map +1 -0
- package/dist/transfer/types.d.ts +48 -50
- package/dist/transfer/types.d.ts.map +1 -0
- package/dist/trust-score-stage.d.ts +21 -40
- package/dist/trust-score-stage.d.ts.map +1 -0
- package/dist/trust-score.d.ts +15 -34
- package/dist/trust-score.d.ts.map +1 -0
- package/dist/trust-zones.d.ts +29 -30
- package/dist/trust-zones.d.ts.map +1 -0
- package/dist/types-continuity.d.ts +10 -11
- package/dist/types-continuity.d.ts.map +1 -0
- package/dist/types.d.ts +3500 -18
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -1
- package/dist/user-message-cleaning.d.ts +3 -4
- package/dist/user-message-cleaning.d.ts.map +1 -0
- package/dist/user-model.d.ts +17 -18
- package/dist/user-model.d.ts.map +1 -0
- package/dist/utility-learner.d.ts +10 -12
- package/dist/utility-learner.d.ts.map +1 -0
- package/dist/utility-runtime.d.ts +6 -27
- package/dist/utility-runtime.d.ts.map +1 -0
- package/dist/utility-telemetry.d.ts +12 -13
- package/dist/utility-telemetry.d.ts.map +1 -0
- package/dist/utils/category-dir.d.ts +45 -0
- package/dist/utils/category-dir.d.ts.map +1 -0
- package/dist/utils/errno.d.ts +4 -0
- package/dist/utils/errno.d.ts.map +1 -0
- package/dist/utils/iso-timestamp.d.ts +18 -0
- package/dist/utils/iso-timestamp.d.ts.map +1 -0
- package/dist/utils/path-containment.d.ts +50 -0
- package/dist/utils/path-containment.d.ts.map +1 -0
- package/dist/utils/path.d.ts +2 -3
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/script-aware-text.d.ts +27 -0
- package/dist/utils/script-aware-text.d.ts.map +1 -0
- package/dist/utils/serialize-mutations.d.ts +6 -7
- package/dist/utils/serialize-mutations.d.ts.map +1 -0
- package/dist/utils/yaml-scalar.d.ts +9 -0
- package/dist/utils/yaml-scalar.d.ts.map +1 -0
- package/dist/verified-recall.d.ts +5 -7
- package/dist/verified-recall.d.ts.map +1 -0
- package/dist/verified-recall.js +14 -14
- package/dist/version-utils.d.ts +3 -4
- package/dist/version-utils.d.ts.map +1 -0
- package/dist/wearables/auto-sync.d.ts +63 -0
- package/dist/wearables/auto-sync.d.ts.map +1 -0
- package/dist/wearables/cleanup.d.ts +39 -0
- package/dist/wearables/cleanup.d.ts.map +1 -0
- package/dist/wearables/cli.d.ts +24 -0
- package/dist/wearables/cli.d.ts.map +1 -0
- package/dist/wearables/config.d.ts +22 -0
- package/dist/wearables/config.d.ts.map +1 -0
- package/dist/wearables/corrections.d.ts +46 -0
- package/dist/wearables/corrections.d.ts.map +1 -0
- package/dist/wearables/day-store.d.ts +152 -0
- package/dist/wearables/day-store.d.ts.map +1 -0
- package/dist/wearables/errors.d.ts +19 -0
- package/dist/wearables/errors.d.ts.map +1 -0
- package/dist/wearables/fusion/cluster.d.ts +70 -0
- package/dist/wearables/fusion/cluster.d.ts.map +1 -0
- package/dist/wearables/fusion/fuse.d.ts +40 -0
- package/dist/wearables/fusion/fuse.d.ts.map +1 -0
- package/dist/wearables/fusion/index.d.ts +16 -0
- package/dist/wearables/fusion/index.d.ts.map +1 -0
- package/dist/wearables/fusion/reconcile.d.ts +52 -0
- package/dist/wearables/fusion/reconcile.d.ts.map +1 -0
- package/dist/wearables/fusion/reconstruct.d.ts +37 -0
- package/dist/wearables/fusion/reconstruct.d.ts.map +1 -0
- package/dist/wearables/fusion/store.d.ts +131 -0
- package/dist/wearables/fusion/store.d.ts.map +1 -0
- package/dist/wearables/fusion/types.d.ts +219 -0
- package/dist/wearables/fusion/types.d.ts.map +1 -0
- package/dist/wearables/http-glue.d.ts +12 -0
- package/dist/wearables/http-glue.d.ts.map +1 -0
- package/dist/wearables/index.d.ts +23 -0
- package/dist/wearables/index.d.ts.map +1 -0
- package/dist/wearables/mcp-tools.d.ts +12 -0
- package/dist/wearables/mcp-tools.d.ts.map +1 -0
- package/dist/wearables/memory-gen.d.ts +139 -0
- package/dist/wearables/memory-gen.d.ts.map +1 -0
- package/dist/wearables/pipeline.d.ts +81 -0
- package/dist/wearables/pipeline.d.ts.map +1 -0
- package/dist/wearables/redaction.d.ts +75 -0
- package/dist/wearables/redaction.d.ts.map +1 -0
- package/dist/wearables/registry.d.ts +47 -0
- package/dist/wearables/registry.d.ts.map +1 -0
- package/dist/wearables/service.d.ts +225 -0
- package/dist/wearables/service.d.ts.map +1 -0
- package/dist/wearables/speakers.d.ts +83 -0
- package/dist/wearables/speakers.d.ts.map +1 -0
- package/dist/wearables/sync-state.d.ts +52 -0
- package/dist/wearables/sync-state.d.ts.map +1 -0
- package/dist/wearables/text-language.d.ts +41 -0
- package/dist/wearables/text-language.d.ts.map +1 -0
- package/dist/wearables/trust.d.ts +93 -0
- package/dist/wearables/trust.d.ts.map +1 -0
- package/dist/wearables/types.d.ts +389 -0
- package/dist/wearables/types.d.ts.map +1 -0
- package/dist/whitespace.d.ts +7 -8
- package/dist/whitespace.d.ts.map +1 -0
- package/dist/who-knows-cli.d.ts +8 -155
- package/dist/who-knows-cli.d.ts.map +1 -0
- package/dist/who-knows-cli.js +16 -16
- package/dist/who-knows.d.ts +97 -145
- package/dist/who-knows.d.ts.map +1 -0
- package/dist/who-knows.js +15 -15
- package/dist/work/board.d.ts +8 -10
- package/dist/work/board.d.ts.map +1 -0
- package/dist/work/boundary.d.ts +5 -6
- package/dist/work/boundary.d.ts.map +1 -0
- package/dist/work/storage.d.ts +4 -6
- package/dist/work/storage.d.ts.map +1 -0
- package/dist/work/types.d.ts +11 -12
- package/dist/work/types.d.ts.map +1 -0
- package/dist/work-product-ledger.d.ts +12 -13
- package/dist/work-product-ledger.d.ts.map +1 -0
- package/dist/write-envelope.d.ts +23 -42
- package/dist/write-envelope.d.ts.map +1 -0
- package/dist/write-quarantine.d.ts +8 -9
- package/dist/write-quarantine.d.ts.map +1 -0
- package/dist/write-rate-limiter.d.ts +4 -4
- package/dist/write-rate-limiter.d.ts.map +1 -0
- package/package.json +2 -2
- package/scripts/build-with-heap.mjs +40 -19
- package/src/access-boundary.ts +1 -0
- package/src/access-errors.test.ts +182 -0
- package/src/access-errors.ts +252 -1
- package/src/access-http.ts +36 -103
- package/src/access-mcp-output-schemas.ts +1 -0
- package/src/access-mcp.ts +21 -2
- package/src/access-operations-batch.ts +8 -0
- package/src/access-recall-diagnostics.ts +236 -0
- package/src/access-service.ts +6 -0
- package/src/access-surface-catalog.ts +2 -0
- package/src/index.ts +11 -0
- package/src/mcp-read-only-tools.ts +1 -0
- package/src/orchestration/orchestrator-helpers.ts +7 -0
- package/src/orchestration/recall-internal.ts +1 -1
- package/src/recall-degradation-sink.test.ts +144 -0
- package/src/recall-why-cli.ts +59 -0
- package/src/recall-why-renderer.ts +142 -0
- package/src/recall-why-service.test.ts +306 -0
- package/src/recall-why-service.ts +218 -0
- package/src/recall-why.test.ts +511 -0
- package/src/recall-why.ts +568 -0
- package/src/types.ts +1 -0
- package/dist/access-namespace-preflight-U9RAdxqZ.d.ts +0 -146
- package/dist/access-service-H-qEdnSs.d.ts +0 -4700
- package/dist/capsule-crypto-YO5QJ6L3.js +0 -18
- package/dist/catalog-BuMyYPUn.d.ts +0 -473
- package/dist/chunk-27MKMTBY.js +0 -342
- package/dist/chunk-2HJKAVAS.js +0 -216
- package/dist/chunk-2QZJ4P27.js +0 -203
- package/dist/chunk-2SIKTXWX.js +0 -502
- package/dist/chunk-2Z24E5W2.js +0 -22
- package/dist/chunk-2Z24E5W2.js.map +0 -1
- package/dist/chunk-3R23DDD3.js +0 -9782
- package/dist/chunk-3S6URXEH.js +0 -63
- package/dist/chunk-43IQRLEF.js +0 -256
- package/dist/chunk-4UVJ6EIT.js +0 -22
- package/dist/chunk-4UVJ6EIT.js.map +0 -1
- package/dist/chunk-5FAGCOZD.js +0 -761
- package/dist/chunk-75YZ5VAI.js +0 -140
- package/dist/chunk-7IRZK6MM.js +0 -256
- package/dist/chunk-7QVYVSEH.js +0 -285
- package/dist/chunk-7RGX7BMF.js +0 -103
- package/dist/chunk-7RKAE6Y4.js +0 -727
- package/dist/chunk-AH44WTLJ.js +0 -415
- package/dist/chunk-AHVJ6GLL.js +0 -95
- package/dist/chunk-AIVRD66I.js +0 -511
- package/dist/chunk-AQ55YKEV.js +0 -29
- package/dist/chunk-AQWGCHIV.js +0 -263
- package/dist/chunk-ARRKSBQU.js +0 -72
- package/dist/chunk-AYHNTYVG.js +0 -43
- package/dist/chunk-BSCNBIF4.js +0 -24
- package/dist/chunk-BXLOS5AJ.js +0 -112
- package/dist/chunk-BXOPUJ3W.js +0 -801
- package/dist/chunk-CEO4DONG.js +0 -28
- package/dist/chunk-CVILPI77.js +0 -432
- package/dist/chunk-D2N3PMAE.js +0 -51
- package/dist/chunk-D7VT2LED.js +0 -253
- package/dist/chunk-DAOMWGO2.js +0 -65
- package/dist/chunk-DGS34QSY.js +0 -141
- package/dist/chunk-DI52XAKG.js +0 -223
- package/dist/chunk-DQEMWVMT.js +0 -249
- package/dist/chunk-DZP2XMZC.js +0 -1084
- package/dist/chunk-EVQ33D3N.js +0 -731
- package/dist/chunk-FPB5LQWW.js +0 -71
- package/dist/chunk-FPB5LQWW.js.map +0 -1
- package/dist/chunk-FROKVQQY.js +0 -3997
- package/dist/chunk-FROKVQQY.js.map +0 -1
- package/dist/chunk-G7S37WD4.js +0 -801
- package/dist/chunk-GRDRVYXJ.js +0 -1917
- package/dist/chunk-H6WOFMOV.js +0 -346
- package/dist/chunk-HMDYSGY6.js +0 -54
- package/dist/chunk-HNHIHXSD.js +0 -879
- package/dist/chunk-HWLIMQE2.js +0 -165
- package/dist/chunk-IWO6QXWJ.js +0 -224
- package/dist/chunk-IYNCJKBM.js +0 -3602
- package/dist/chunk-IYNCJKBM.js.map +0 -1
- package/dist/chunk-J54B5DGD.js +0 -1530
- package/dist/chunk-JMZQS6OS.js +0 -81
- package/dist/chunk-K4KE5MYE.js +0 -648
- package/dist/chunk-K4KE5MYE.js.map +0 -1
- package/dist/chunk-KH2D26LQ.js +0 -2440
- package/dist/chunk-KIGC55FQ.js +0 -5505
- package/dist/chunk-KQVBR7BC.js +0 -1286
- package/dist/chunk-L63GFNKL.js +0 -403
- package/dist/chunk-LIAKZGOY.js +0 -25
- package/dist/chunk-LVFI5LG7.js +0 -576
- package/dist/chunk-MTWD4KMM.js +0 -223
- package/dist/chunk-MWVYHNSU.js +0 -623
- package/dist/chunk-MZWSOLMT.js +0 -189
- package/dist/chunk-NNEWBRUL.js +0 -271
- package/dist/chunk-NPX6WMFJ.js +0 -1686
- package/dist/chunk-O7OVWKT4.js +0 -768
- package/dist/chunk-PLJ2MQFT.js +0 -182
- package/dist/chunk-Q4AUIFUA.js +0 -111
- package/dist/chunk-QWQB7TOB.js +0 -11341
- package/dist/chunk-QZ4U67KO.js +0 -98
- package/dist/chunk-RMMVQQA6.js +0 -70
- package/dist/chunk-RSMNPYBM.js +0 -61
- package/dist/chunk-RUUJXAGT.js +0 -122
- package/dist/chunk-S45INSV3.js +0 -389
- package/dist/chunk-SCXURCVT.js +0 -218
- package/dist/chunk-SGUDMW2K.js +0 -3400
- package/dist/chunk-SLGD36MM.js +0 -53
- package/dist/chunk-SMBWBEE7.js +0 -73
- package/dist/chunk-SPFNGHHP.js +0 -115
- package/dist/chunk-SPWNCGSM.js +0 -77
- package/dist/chunk-SZ7IVZGD.js +0 -112
- package/dist/chunk-TJNDFNCU.js +0 -597
- package/dist/chunk-TJNDFNCU.js.map +0 -1
- package/dist/chunk-TQT4AOPO.js +0 -321
- package/dist/chunk-TTFJQ5B5.js +0 -43
- package/dist/chunk-U2SK45U3.js +0 -1476
- package/dist/chunk-UCH2RWFX.js +0 -216
- package/dist/chunk-UDJMJNBK.js +0 -549
- package/dist/chunk-UJBIWY5M.js +0 -212
- package/dist/chunk-ULQVG6G3.js +0 -275
- package/dist/chunk-VDX2J7OX.js +0 -264
- package/dist/chunk-VGO57TU7.js +0 -960
- package/dist/chunk-VUV472VH.js +0 -1008
- package/dist/chunk-VVX5PZFS.js +0 -297
- package/dist/chunk-WH7RINGG.js +0 -315
- package/dist/chunk-WUJD4CHZ.js +0 -137
- package/dist/chunk-X7WAM3IY.js +0 -30
- package/dist/chunk-XPFJSUOR.js +0 -921
- package/dist/chunk-XVZA6VXC.js +0 -160
- package/dist/chunk-XZRZJHBW.js +0 -31013
- package/dist/chunk-XZRZJHBW.js.map +0 -1
- package/dist/chunk-Y4G6LHJW.js +0 -35
- package/dist/chunk-Y7LZ5V7N.js +0 -202
- package/dist/chunk-YEIKOBOW.js +0 -628
- package/dist/chunk-YEIKOBOW.js.map +0 -1
- package/dist/chunk-YIIW2OH2.js +0 -566
- package/dist/chunk-ZBYVR5W4.js +0 -18504
- package/dist/chunk-ZBYVR5W4.js.map +0 -1
- package/dist/chunk-ZN7SMKAK.js +0 -210
- package/dist/chunk-ZP73EM2X.js +0 -74
- package/dist/chunk-ZXQPAYCS.js +0 -2453
- package/dist/cli-VGDSn2zY.d.ts +0 -1136
- package/dist/conflict-policy-DyJ2wd-h.d.ts +0 -4
- package/dist/connectors-cli-2iaQ5tX2.d.ts +0 -263
- package/dist/dependency-propagation-delivery-BrhPjAHQ.d.ts +0 -41
- package/dist/faiss-adapter-BHecI1fF.d.ts +0 -73
- package/dist/framework-CNDn2164.d.ts +0 -170
- package/dist/generic-recall-paths-C0J1Oxb7.d.ts +0 -23
- package/dist/graph-DRkl22KE.d.ts +0 -347
- package/dist/graph-edge-decay-MKIRZ762.js +0 -30
- package/dist/index-B735x-tK.d.ts +0 -284
- package/dist/local-llm-BkkEK9rn.d.ts +0 -247
- package/dist/maintenance-CLBIvVxg.d.ts +0 -749
- package/dist/orchestrator-iexgVLow.d.ts +0 -2701
- package/dist/pipeline-DvtDtyo9.d.ts +0 -32
- package/dist/public-http-P0cnHzYB.d.ts +0 -25
- package/dist/qmd-CBYBJ6HW.d.ts +0 -353
- package/dist/resolution-LXFQQ4AE.js +0 -36
- package/dist/scope-profiles-BN1Dgfha.d.ts +0 -30
- package/dist/semantic-BalR6EXU.d.ts +0 -87
- package/dist/semantic-consolidation-D--qe0eE.d.ts +0 -180
- package/dist/service-VealHeqO.d.ts +0 -846
- package/dist/storage-BhS9gUx3.d.ts +0 -166
- package/dist/storage-CMm-3aD3.d.ts +0 -2421
- package/dist/tagging-BjsNFKWz.d.ts +0 -240
- package/dist/types-B1VHaf2w.d.ts +0 -126
- package/dist/types-DJhqDJUV.d.ts +0 -50
- package/dist/types-Du6VdoAg.d.ts +0 -5482
- /package/dist/{capsule-crypto-YO5QJ6L3.js.map → access-recall-diagnostics.js.map} +0 -0
- /package/dist/{graph-edge-decay-MKIRZ762.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-KQVBR7BC.js.map → chunk-2CBWEIS4.js.map} +0 -0
- /package/dist/{chunk-JMZQS6OS.js.map → chunk-2JQZSQXI.js.map} +0 -0
- /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-LIAKZGOY.js.map → chunk-2WMXZYMS.js.map} +0 -0
- /package/dist/{chunk-RSMNPYBM.js.map → chunk-34ZGBAGE.js.map} +0 -0
- /package/dist/{chunk-MWVYHNSU.js.map → chunk-36S7UHAW.js.map} +0 -0
- /package/dist/{chunk-G7S37WD4.js.map → chunk-3JLWSFTV.js.map} +0 -0
- /package/dist/{chunk-75YZ5VAI.js.map → chunk-3RZOLUZT.js.map} +0 -0
- /package/dist/{chunk-XVZA6VXC.js.map → chunk-3SL52JKD.js.map} +0 -0
- /package/dist/{chunk-2SIKTXWX.js.map → chunk-4QEZS7PK.js.map} +0 -0
- /package/dist/{chunk-Y4G6LHJW.js.map → chunk-5QRYGLZN.js.map} +0 -0
- /package/dist/{chunk-AQWGCHIV.js.map → chunk-5R3C5LEZ.js.map} +0 -0
- /package/dist/{chunk-SPWNCGSM.js.map → chunk-634UKELB.js.map} +0 -0
- /package/dist/{chunk-BXOPUJ3W.js.map → chunk-64JK4TL7.js.map} +0 -0
- /package/dist/{chunk-DGS34QSY.js.map → chunk-6E5GYDIE.js.map} +0 -0
- /package/dist/{chunk-D2N3PMAE.js.map → chunk-6ISP2EN2.js.map} +0 -0
- /package/dist/{chunk-UJBIWY5M.js.map → chunk-6RD7MSIO.js.map} +0 -0
- /package/dist/{chunk-RMMVQQA6.js.map → chunk-6UDLN4IA.js.map} +0 -0
- /package/dist/{chunk-7IRZK6MM.js.map → chunk-754XN6LX.js.map} +0 -0
- /package/dist/{chunk-43IQRLEF.js.map → chunk-7H2LEYYJ.js.map} +0 -0
- /package/dist/{chunk-7RGX7BMF.js.map → chunk-A7AISUJI.js.map} +0 -0
- /package/dist/{chunk-7RKAE6Y4.js.map → chunk-AULKCNZW.js.map} +0 -0
- /package/dist/{chunk-NPX6WMFJ.js.map → chunk-B7SSU55V.js.map} +0 -0
- /package/dist/{chunk-IWO6QXWJ.js.map → chunk-BICNRVEC.js.map} +0 -0
- /package/dist/{chunk-SLGD36MM.js.map → chunk-BJI2D4SU.js.map} +0 -0
- /package/dist/{chunk-CEO4DONG.js.map → chunk-BQB5ZMYO.js.map} +0 -0
- /package/dist/{chunk-WH7RINGG.js.map → chunk-C5CPYMLX.js.map} +0 -0
- /package/dist/{chunk-AHVJ6GLL.js.map → chunk-CS2JO77A.js.map} +0 -0
- /package/dist/{chunk-UDJMJNBK.js.map → chunk-DTABICJ3.js.map} +0 -0
- /package/dist/{chunk-CVILPI77.js.map → chunk-E6UNM67F.js.map} +0 -0
- /package/dist/{chunk-NNEWBRUL.js.map → chunk-ENUI3IO7.js.map} +0 -0
- /package/dist/{chunk-DZP2XMZC.js.map → chunk-FF2XYADH.js.map} +0 -0
- /package/dist/{chunk-S45INSV3.js.map → chunk-FF6N7BXC.js.map} +0 -0
- /package/dist/{chunk-2QZJ4P27.js.map → chunk-FSXD6Y4H.js.map} +0 -0
- /package/dist/{chunk-SGUDMW2K.js.map → chunk-GK6NOQE6.js.map} +0 -0
- /package/dist/{chunk-TTFJQ5B5.js.map → chunk-GRSFFLUY.js.map} +0 -0
- /package/dist/{chunk-5FAGCOZD.js.map → chunk-GWK7FEUL.js.map} +0 -0
- /package/dist/{chunk-SCXURCVT.js.map → chunk-GWQVMKUJ.js.map} +0 -0
- /package/dist/{chunk-3S6URXEH.js.map → chunk-HKHZWJ3E.js.map} +0 -0
- /package/dist/{chunk-PLJ2MQFT.js.map → chunk-IAZPYX6W.js.map} +0 -0
- /package/dist/{chunk-MZWSOLMT.js.map → chunk-IG747LRN.js.map} +0 -0
- /package/dist/{chunk-X7WAM3IY.js.map → chunk-IK63WA5A.js.map} +0 -0
- /package/dist/{chunk-BSCNBIF4.js.map → chunk-IUD6NLNM.js.map} +0 -0
- /package/dist/{chunk-3R23DDD3.js.map → chunk-JSJZ2NXS.js.map} +0 -0
- /package/dist/{chunk-YIIW2OH2.js.map → chunk-JUOJGZPV.js.map} +0 -0
- /package/dist/{chunk-VGO57TU7.js.map → chunk-KA4U5GQN.js.map} +0 -0
- /package/dist/{chunk-VDX2J7OX.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-ARRKSBQU.js.map → chunk-L4WBADKG.js.map} +0 -0
- /package/dist/{chunk-ULQVG6G3.js.map → chunk-LAL4B37X.js.map} +0 -0
- /package/dist/{chunk-D7VT2LED.js.map → chunk-LELJRLPY.js.map} +0 -0
- /package/dist/{chunk-L63GFNKL.js.map → chunk-LMMQKZK3.js.map} +0 -0
- /package/dist/{chunk-ZP73EM2X.js.map → chunk-LQ23DMTT.js.map} +0 -0
- /package/dist/{chunk-7QVYVSEH.js.map → chunk-LV6ZB6CA.js.map} +0 -0
- /package/dist/{chunk-KIGC55FQ.js.map → chunk-M5IJP3YW.js.map} +0 -0
- /package/dist/{chunk-AH44WTLJ.js.map → chunk-MWZMVLXL.js.map} +0 -0
- /package/dist/{chunk-AQ55YKEV.js.map → chunk-N4VCHRLD.js.map} +0 -0
- /package/dist/{chunk-HNHIHXSD.js.map → chunk-NKXHCCLB.js.map} +0 -0
- /package/dist/{chunk-SZ7IVZGD.js.map → chunk-NVCWA4QC.js.map} +0 -0
- /package/dist/{chunk-RUUJXAGT.js.map → chunk-ONWVMYHX.js.map} +0 -0
- /package/dist/{chunk-HMDYSGY6.js.map → chunk-P6P35FY4.js.map} +0 -0
- /package/dist/{chunk-H6WOFMOV.js.map → chunk-P7M22CYB.js.map} +0 -0
- /package/dist/{chunk-Q4AUIFUA.js.map → chunk-QMWKENNK.js.map} +0 -0
- /package/dist/{chunk-J54B5DGD.js.map → chunk-QOPB6KE3.js.map} +0 -0
- /package/dist/{chunk-DI52XAKG.js.map → chunk-RBULO7DO.js.map} +0 -0
- /package/dist/{chunk-VUV472VH.js.map → chunk-RDESQOEE.js.map} +0 -0
- /package/dist/{chunk-SPFNGHHP.js.map → chunk-RMF763SX.js.map} +0 -0
- /package/dist/{chunk-TQT4AOPO.js.map → chunk-RN6ZCNM5.js.map} +0 -0
- /package/dist/{chunk-QWQB7TOB.js.map → chunk-S2OBXHMN.js.map} +0 -0
- /package/dist/{chunk-UCH2RWFX.js.map → chunk-S3JPD4N7.js.map} +0 -0
- /package/dist/{chunk-HWLIMQE2.js.map → chunk-SF6RFI5Z.js.map} +0 -0
- /package/dist/{chunk-ZXQPAYCS.js.map → chunk-SJV3AOZ2.js.map} +0 -0
- /package/dist/{chunk-Y7LZ5V7N.js.map → chunk-SLULR4GC.js.map} +0 -0
- /package/dist/{chunk-U2SK45U3.js.map → chunk-TFXXMTHV.js.map} +0 -0
- /package/dist/{chunk-2HJKAVAS.js.map → chunk-TYP7GYRI.js.map} +0 -0
- /package/dist/{chunk-KH2D26LQ.js.map → chunk-TYZK56OA.js.map} +0 -0
- /package/dist/{chunk-XPFJSUOR.js.map → chunk-VLDVNZQE.js.map} +0 -0
- /package/dist/{chunk-AIVRD66I.js.map → chunk-W6YK672C.js.map} +0 -0
- /package/dist/{chunk-LVFI5LG7.js.map → chunk-X2NFFBTO.js.map} +0 -0
- /package/dist/{chunk-GRDRVYXJ.js.map → chunk-X45KZOT2.js.map} +0 -0
- /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-AYHNTYVG.js.map → chunk-XIXM6G7I.js.map} +0 -0
- /package/dist/{chunk-ZN7SMKAK.js.map → chunk-XLXYARWC.js.map} +0 -0
- /package/dist/{chunk-MTWD4KMM.js.map → chunk-XVW52M6I.js.map} +0 -0
- /package/dist/{chunk-27MKMTBY.js.map → chunk-YHU5XUF4.js.map} +0 -0
- /package/dist/{chunk-SMBWBEE7.js.map → chunk-YRH3C2OJ.js.map} +0 -0
- /package/dist/{chunk-WUJD4CHZ.js.map → chunk-YXQE67A7.js.map} +0 -0
- /package/dist/{chunk-EVQ33D3N.js.map → chunk-ZHUVMSHI.js.map} +0 -0
- /package/dist/{chunk-VVX5PZFS.js.map → chunk-ZHXSOMYH.js.map} +0 -0
- /package/dist/{chunk-O7OVWKT4.js.map → chunk-ZIEZJMFW.js.map} +0 -0
- /package/dist/{chunk-QZ4U67KO.js.map → chunk-ZSEFGDCI.js.map} +0 -0
- /package/dist/{chunk-DAOMWGO2.js.map → chunk-ZX5N5D6M.js.map} +0 -0
- /package/dist/{resolution-LXFQQ4AE.js.map → graph-edge-decay-ROSUPDX3.js.map} +0 -0
package/dist/chunk-FROKVQQY.js
DELETED
|
@@ -1,3997 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
RECALL_NAVIGATION_MCP_TOOLS
|
|
3
|
-
} from "./chunk-TE6S7KDF.js";
|
|
4
|
-
import {
|
|
5
|
-
MEMORY_BROWSE_MCP_TOOLS
|
|
6
|
-
} from "./chunk-EIB4FJVR.js";
|
|
7
|
-
import {
|
|
8
|
-
MCP_READ_ONLY_TOOL_SUFFIXES
|
|
9
|
-
} from "./chunk-FPB5LQWW.js";
|
|
10
|
-
import {
|
|
11
|
-
EXTERNAL_WIKI_MCP_TOOLS
|
|
12
|
-
} from "./chunk-A5KNZSNA.js";
|
|
13
|
-
import {
|
|
14
|
-
DEEP_RECALL_MCP_TOOLS
|
|
15
|
-
} from "./chunk-HUSTM6PU.js";
|
|
16
|
-
import {
|
|
17
|
-
buildCitationGuidance
|
|
18
|
-
} from "./chunk-D24OXEPB.js";
|
|
19
|
-
import {
|
|
20
|
-
REMNIC_CHATGPT_MEMORY_INSPECTOR_MIME_TYPE,
|
|
21
|
-
REMNIC_CHATGPT_MEMORY_INSPECTOR_TOOL,
|
|
22
|
-
REMNIC_CHATGPT_MEMORY_INSPECTOR_WIDGET_HTML,
|
|
23
|
-
REMNIC_CHATGPT_MEMORY_INSPECTOR_WIDGET_URI
|
|
24
|
-
} from "./chunk-E4RMZGRS.js";
|
|
25
|
-
import {
|
|
26
|
-
sharedContextMcpTools
|
|
27
|
-
} from "./chunk-JATHBCAV.js";
|
|
28
|
-
import {
|
|
29
|
-
CANONICAL_MCP_PREFIX,
|
|
30
|
-
LEGACY_MCP_PREFIX,
|
|
31
|
-
toCanonicalToolName,
|
|
32
|
-
toLegacyToolName,
|
|
33
|
-
toolNameSuffix,
|
|
34
|
-
withToolAliases
|
|
35
|
-
} from "./chunk-ZQUVBZI4.js";
|
|
36
|
-
import {
|
|
37
|
-
MCP_ADMIN_OPS_MIGRATED_OPERATIONS,
|
|
38
|
-
MCP_ADMIN_OPS_TOOLS,
|
|
39
|
-
MCP_GIT_CONTEXT_SCHEMA_PROPS_IGNORED
|
|
40
|
-
} from "./chunk-AB3A7EFH.js";
|
|
41
|
-
import {
|
|
42
|
-
applyToolOutputSchemas
|
|
43
|
-
} from "./chunk-YEIKOBOW.js";
|
|
44
|
-
import {
|
|
45
|
-
getOperation
|
|
46
|
-
} from "./chunk-ZBYVR5W4.js";
|
|
47
|
-
import {
|
|
48
|
-
WHO_KNOWS_MCP_TOOLS
|
|
49
|
-
} from "./chunk-43IQRLEF.js";
|
|
50
|
-
import {
|
|
51
|
-
PROMOTION_CANDIDATES_MCP_TOOLS
|
|
52
|
-
} from "./chunk-VYCOJKSX.js";
|
|
53
|
-
import {
|
|
54
|
-
validateRequest
|
|
55
|
-
} from "./chunk-YIIW2OH2.js";
|
|
56
|
-
import {
|
|
57
|
-
SUPPORT_PASSPORT_SOURCE_MEMORY_ID_MAX_LENGTH
|
|
58
|
-
} from "./chunk-PWPIERBM.js";
|
|
59
|
-
import {
|
|
60
|
-
assertOperationAllowed,
|
|
61
|
-
capabilityAllowsOp,
|
|
62
|
-
enforceNamespaceAllowList,
|
|
63
|
-
tokenCapabilityStore
|
|
64
|
-
} from "./chunk-MZWSOLMT.js";
|
|
65
|
-
import {
|
|
66
|
-
readEnvVar
|
|
67
|
-
} from "./chunk-P2QRMMVQ.js";
|
|
68
|
-
import {
|
|
69
|
-
EngramAccessInputError
|
|
70
|
-
} from "./chunk-2Z24E5W2.js";
|
|
71
|
-
import {
|
|
72
|
-
abortError,
|
|
73
|
-
isAbortError
|
|
74
|
-
} from "./chunk-BTTPKDIL.js";
|
|
75
|
-
|
|
76
|
-
// src/access-mcp.ts
|
|
77
|
-
import { randomUUID as randomUUID2 } from "crypto";
|
|
78
|
-
import { readFile as readFile2 } from "fs/promises";
|
|
79
|
-
|
|
80
|
-
// src/chat/chat-system-prompt.ts
|
|
81
|
-
function buildChatSystemPrompt(opts) {
|
|
82
|
-
const lines = [
|
|
83
|
-
"You are Remnic Chat \u2014 a conversational memory inspector and corrector.",
|
|
84
|
-
"You help the user understand, explore, and fix what Remnic remembers.",
|
|
85
|
-
"",
|
|
86
|
-
"## Core rules",
|
|
87
|
-
"",
|
|
88
|
-
"1. GROUND EVERY ASSERTION. When you state what Remnic remembers, you MUST",
|
|
89
|
-
" cite the memory id or handle, include the source quote, and the date.",
|
|
90
|
-
" If no tool result in this turn supports the claim, say",
|
|
91
|
-
' "I found nothing" instead of guessing.',
|
|
92
|
-
"",
|
|
93
|
-
"2. NO MUTATION WITHOUT CONFIRMATION. You may propose a correction plan",
|
|
94
|
-
" (correction_plan), but you must NEVER apply it (correction_apply) until",
|
|
95
|
-
" the user explicitly confirms in the conversation.",
|
|
96
|
-
"",
|
|
97
|
-
"3. RENDER PLANS AS DIFFS. When you surface a correction plan, render it",
|
|
98
|
-
" as the diff preview the plan returns \u2014 before/after, affected memory",
|
|
99
|
-
" ids, and the supersession reason.",
|
|
100
|
-
"",
|
|
101
|
-
"4. BE HONEST ABOUT LIMITS. If a tool returns no results, say so. If you",
|
|
102
|
-
" are unsure, say so. Never fabricate memory content.",
|
|
103
|
-
"",
|
|
104
|
-
"5. RESPECT SCOPE. You operate within the caller's namespace and principal.",
|
|
105
|
-
" Do not attempt to access memories outside the caller's scope."
|
|
106
|
-
];
|
|
107
|
-
if (opts.correctionAvailable) {
|
|
108
|
-
lines.push(
|
|
109
|
-
"",
|
|
110
|
-
"## Mutation protocol",
|
|
111
|
-
"",
|
|
112
|
-
"When the user asks to change or forget memories:",
|
|
113
|
-
"1. Call correction_plan to generate a diff preview.",
|
|
114
|
-
"2. Present the diff to the user and ask them to reply 'apply' to confirm.",
|
|
115
|
-
"3. Only after explicit confirmation, call correction_apply.",
|
|
116
|
-
"",
|
|
117
|
-
"For bulk/destructive requests ('forget everything about X'), always go",
|
|
118
|
-
"through correction_plan first \u2014 there is no direct-delete tool."
|
|
119
|
-
);
|
|
120
|
-
} else {
|
|
121
|
-
lines.push(
|
|
122
|
-
"",
|
|
123
|
-
"## Mutation status",
|
|
124
|
-
"",
|
|
125
|
-
"Correction (mutation) tools are not yet available in this build.",
|
|
126
|
-
"You can inspect and search memories but cannot apply corrections.",
|
|
127
|
-
"When the user asks to change memories, explain that correction tools",
|
|
128
|
-
"require the Correction Contract (#1580) which is pending."
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
return lines.join("\n");
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// src/chat/chat-tools.ts
|
|
135
|
-
var MUTATING_TOOLS = /* @__PURE__ */ new Set([
|
|
136
|
-
"correction_apply",
|
|
137
|
-
"memory_promote"
|
|
138
|
-
]);
|
|
139
|
-
var MEMORY_SEARCH_SCHEMA = {
|
|
140
|
-
type: "function",
|
|
141
|
-
function: {
|
|
142
|
-
name: "memory_search",
|
|
143
|
-
description: "Semantic search across stored memories. Returns matching memory paths, scores, and snippets. Use this to find what Remnic remembers about a topic.",
|
|
144
|
-
parameters: {
|
|
145
|
-
type: "object",
|
|
146
|
-
properties: {
|
|
147
|
-
query: { type: "string", description: "The search query." },
|
|
148
|
-
maxResults: { type: "number", description: "Maximum results (default 8)." }
|
|
149
|
-
},
|
|
150
|
-
required: ["query"],
|
|
151
|
-
additionalProperties: false
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
var MEMORY_GET_SCHEMA = {
|
|
156
|
-
type: "function",
|
|
157
|
-
function: {
|
|
158
|
-
name: "memory_get",
|
|
159
|
-
description: "Fetch a single memory by its id. Returns the full memory content, category, tags, and source attribution.",
|
|
160
|
-
parameters: {
|
|
161
|
-
type: "object",
|
|
162
|
-
properties: {
|
|
163
|
-
memoryId: { type: "string", description: "The memory id to fetch." }
|
|
164
|
-
},
|
|
165
|
-
required: ["memoryId"],
|
|
166
|
-
additionalProperties: false
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
var MEMORY_TIMELINE_SCHEMA = {
|
|
171
|
-
type: "function",
|
|
172
|
-
function: {
|
|
173
|
-
name: "memory_timeline",
|
|
174
|
-
description: "Read the lifecycle timeline of a single memory \u2014 creation, updates, consolidations, and tier transitions.",
|
|
175
|
-
parameters: {
|
|
176
|
-
type: "object",
|
|
177
|
-
properties: {
|
|
178
|
-
memoryId: { type: "string", description: "The memory id." },
|
|
179
|
-
limit: { type: "number", description: "Maximum rows (default 200)." }
|
|
180
|
-
},
|
|
181
|
-
required: ["memoryId"],
|
|
182
|
-
additionalProperties: false
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
var RECALL_EXPLAIN_SCHEMA = {
|
|
187
|
-
type: "function",
|
|
188
|
-
function: {
|
|
189
|
-
name: "recall_explain",
|
|
190
|
-
description: "Explain why Remnic would recall certain memories for a given query. Returns tier scoring and matching details. Use this to answer 'why did you remember this?'",
|
|
191
|
-
parameters: {
|
|
192
|
-
type: "object",
|
|
193
|
-
properties: {
|
|
194
|
-
query: { type: "string", description: "Optional query to explain recall for. When omitted, explains the most recent recall." }
|
|
195
|
-
},
|
|
196
|
-
required: [],
|
|
197
|
-
additionalProperties: false
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
var ENTITY_GET_SCHEMA = {
|
|
202
|
-
type: "function",
|
|
203
|
-
function: {
|
|
204
|
-
name: "entity_get",
|
|
205
|
-
description: "Fetch the compiled entity record for a named entity (person, project, tool, etc.). Returns traits, timeline, and associated memories.",
|
|
206
|
-
parameters: {
|
|
207
|
-
type: "object",
|
|
208
|
-
properties: {
|
|
209
|
-
name: { type: "string", description: "Entity name." }
|
|
210
|
-
},
|
|
211
|
-
required: ["name"],
|
|
212
|
-
additionalProperties: false
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
var STATS_SCHEMA = {
|
|
217
|
-
type: "function",
|
|
218
|
-
function: {
|
|
219
|
-
name: "stats",
|
|
220
|
-
description: "Return aggregate memory statistics \u2014 memory count, entity count, profile summary, and open questions. Use this for high-level 'what do you know?' questions.",
|
|
221
|
-
parameters: {
|
|
222
|
-
type: "object",
|
|
223
|
-
properties: {},
|
|
224
|
-
additionalProperties: false
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
var CORRECTION_PLAN_SCHEMA = {
|
|
229
|
-
type: "function",
|
|
230
|
-
function: {
|
|
231
|
-
name: "correction_plan",
|
|
232
|
-
description: "Generate a correction plan (diff preview) for a requested memory change. This does NOT apply the change \u2014 it previews what would happen. The user must confirm before correction_apply runs.",
|
|
233
|
-
parameters: {
|
|
234
|
-
type: "object",
|
|
235
|
-
properties: {
|
|
236
|
-
request: {
|
|
237
|
-
type: "string",
|
|
238
|
-
description: "Natural-language description of the correction, e.g. 'we finished the MySQL migration in March' or 'forget the outdated database credentials'."
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
required: ["request"],
|
|
242
|
-
additionalProperties: false
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
var CORRECTION_APPLY_SCHEMA = {
|
|
247
|
-
type: "function",
|
|
248
|
-
function: {
|
|
249
|
-
name: "correction_apply",
|
|
250
|
-
description: "Apply a previously generated correction plan. The engine intercepts this call and requires explicit user confirmation before it executes.",
|
|
251
|
-
parameters: {
|
|
252
|
-
type: "object",
|
|
253
|
-
properties: {
|
|
254
|
-
planId: { type: "string", description: "The plan id from correction_plan." }
|
|
255
|
-
},
|
|
256
|
-
required: ["planId"],
|
|
257
|
-
additionalProperties: false
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
var MEMORY_PROMOTE_SCHEMA = {
|
|
262
|
-
type: "function",
|
|
263
|
-
function: {
|
|
264
|
-
name: "memory_promote",
|
|
265
|
-
description: "Promote a memory's tier (e.g. from cold to hot). The engine requires user confirmation before executing.",
|
|
266
|
-
parameters: {
|
|
267
|
-
type: "object",
|
|
268
|
-
properties: {
|
|
269
|
-
memoryId: { type: "string", description: "The memory id to promote." }
|
|
270
|
-
},
|
|
271
|
-
required: ["memoryId"],
|
|
272
|
-
additionalProperties: false
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
var REVIEW_LIST_SCHEMA = {
|
|
277
|
-
type: "function",
|
|
278
|
-
function: {
|
|
279
|
-
name: "review_list",
|
|
280
|
-
description: "List items in the contradiction/quality review queue. Returns pairs of potentially conflicting memories awaiting resolution.",
|
|
281
|
-
parameters: {
|
|
282
|
-
type: "object",
|
|
283
|
-
properties: {
|
|
284
|
-
runId: { type: "string", description: "Optional governance run id." }
|
|
285
|
-
},
|
|
286
|
-
additionalProperties: false
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
var SCOPE_INSPECT_SCHEMA = {
|
|
291
|
-
type: "function",
|
|
292
|
-
function: {
|
|
293
|
-
name: "scope_inspect",
|
|
294
|
-
description: "Inspect the current scope/namespace resolution \u2014 which namespace the chat session operates in and how it was resolved.",
|
|
295
|
-
parameters: {
|
|
296
|
-
type: "object",
|
|
297
|
-
properties: {},
|
|
298
|
-
additionalProperties: false
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
var READONLY_SCHEMAS = [
|
|
303
|
-
MEMORY_SEARCH_SCHEMA,
|
|
304
|
-
MEMORY_GET_SCHEMA,
|
|
305
|
-
MEMORY_TIMELINE_SCHEMA,
|
|
306
|
-
RECALL_EXPLAIN_SCHEMA,
|
|
307
|
-
ENTITY_GET_SCHEMA,
|
|
308
|
-
STATS_SCHEMA,
|
|
309
|
-
REVIEW_LIST_SCHEMA
|
|
310
|
-
];
|
|
311
|
-
function buildChatToolSchemas(opts) {
|
|
312
|
-
const tools = [...READONLY_SCHEMAS];
|
|
313
|
-
if (opts.correctionAvailable) {
|
|
314
|
-
tools.push(CORRECTION_PLAN_SCHEMA, CORRECTION_APPLY_SCHEMA, MEMORY_PROMOTE_SCHEMA);
|
|
315
|
-
}
|
|
316
|
-
if (opts.scopeInspectAvailable) {
|
|
317
|
-
tools.push(SCOPE_INSPECT_SCHEMA);
|
|
318
|
-
}
|
|
319
|
-
return tools;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
// src/chat/chat-engine.ts
|
|
323
|
-
var CONFIRMATION_KEYWORDS = {
|
|
324
|
-
yes: true,
|
|
325
|
-
y: true,
|
|
326
|
-
apply: true,
|
|
327
|
-
confirm: true,
|
|
328
|
-
"\u306F\u3044": true,
|
|
329
|
-
// Japanese
|
|
330
|
-
"s\xED": true,
|
|
331
|
-
// Spanish
|
|
332
|
-
ja: true,
|
|
333
|
-
// German/Dutch
|
|
334
|
-
"\u0646\u0639\u0645": true
|
|
335
|
-
// Arabic
|
|
336
|
-
};
|
|
337
|
-
function isConfirmationMessage(text) {
|
|
338
|
-
return CONFIRMATION_KEYWORDS[text.trim().toLowerCase()] === true;
|
|
339
|
-
}
|
|
340
|
-
var ChatEngine = class {
|
|
341
|
-
llm;
|
|
342
|
-
executor;
|
|
343
|
-
maxToolCallsPerTurn;
|
|
344
|
-
model;
|
|
345
|
-
correctionAvailable;
|
|
346
|
-
scopeInspectAvailable;
|
|
347
|
-
systemPrompt;
|
|
348
|
-
toolSchemas;
|
|
349
|
-
allowedToolNames;
|
|
350
|
-
constructor(opts) {
|
|
351
|
-
this.llm = opts.llm;
|
|
352
|
-
this.executor = opts.executor;
|
|
353
|
-
this.maxToolCallsPerTurn = opts.maxToolCallsPerTurn;
|
|
354
|
-
this.model = opts.model;
|
|
355
|
-
this.correctionAvailable = opts.correctionAvailable;
|
|
356
|
-
this.scopeInspectAvailable = opts.scopeInspectAvailable;
|
|
357
|
-
this.systemPrompt = buildChatSystemPrompt({
|
|
358
|
-
correctionAvailable: opts.correctionAvailable
|
|
359
|
-
});
|
|
360
|
-
this.toolSchemas = buildChatToolSchemas({
|
|
361
|
-
correctionAvailable: opts.correctionAvailable,
|
|
362
|
-
scopeInspectAvailable: opts.scopeInspectAvailable
|
|
363
|
-
});
|
|
364
|
-
this.allowedToolNames = new Set(this.toolSchemas.map((t) => t.function.name));
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Process a single user message. The session state is mutated in place
|
|
368
|
-
* (confirmedPlanIds, pendingPlanId) — the caller persists the transcript.
|
|
369
|
-
*/
|
|
370
|
-
async processMessage(userMessage, session) {
|
|
371
|
-
if (isConfirmationMessage(userMessage) && this.correctionAvailable) {
|
|
372
|
-
if (session.pendingPlanId) {
|
|
373
|
-
const planId = session.pendingPlanId;
|
|
374
|
-
session.confirmedPlanIds.add(planId);
|
|
375
|
-
session.pendingPlanId = void 0;
|
|
376
|
-
try {
|
|
377
|
-
const applyResult = await this.executor.correctionApply(planId);
|
|
378
|
-
session.confirmedPlanIds.delete(planId);
|
|
379
|
-
return {
|
|
380
|
-
reply: `Correction applied.
|
|
381
|
-
|
|
382
|
-
${applyResult}`,
|
|
383
|
-
chatSessionId: session.id,
|
|
384
|
-
...session.pendingPromotionId ? {} : {}
|
|
385
|
-
};
|
|
386
|
-
} catch (err) {
|
|
387
|
-
session.confirmedPlanIds.delete(planId);
|
|
388
|
-
session.pendingPlanId = planId;
|
|
389
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
390
|
-
return {
|
|
391
|
-
reply: "[error] Failed to apply the correction. Please try again or re-request the plan.",
|
|
392
|
-
chatSessionId: session.id,
|
|
393
|
-
error: msg
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
if (session.pendingPromotionId) {
|
|
398
|
-
const memoryId = session.pendingPromotionId;
|
|
399
|
-
session.pendingPromotionId = void 0;
|
|
400
|
-
try {
|
|
401
|
-
const promoteResult = await this.executor.memoryPromote(memoryId);
|
|
402
|
-
return {
|
|
403
|
-
reply: `Memory promoted.
|
|
404
|
-
|
|
405
|
-
${promoteResult}`,
|
|
406
|
-
chatSessionId: session.id
|
|
407
|
-
};
|
|
408
|
-
} catch (err) {
|
|
409
|
-
session.pendingPromotionId = memoryId;
|
|
410
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
411
|
-
return {
|
|
412
|
-
reply: "[error] Failed to promote the memory. Please try again.",
|
|
413
|
-
chatSessionId: session.id,
|
|
414
|
-
error: msg
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
const recentEntries = session.transcript.slice(-21).filter((e) => e.role !== "system" || e.seq !== 0).filter((e) => !(e.role === "system" && /^[a-z_]+:/.test(e.content))).filter((e, _i, arr) => {
|
|
420
|
-
if (e.role === "user" && e.content === userMessage) {
|
|
421
|
-
const lastUser = [...arr].reverse().find((x) => x.role === "user");
|
|
422
|
-
return e !== lastUser;
|
|
423
|
-
}
|
|
424
|
-
return true;
|
|
425
|
-
});
|
|
426
|
-
const conversation = [
|
|
427
|
-
{ role: "system", content: this.systemPrompt },
|
|
428
|
-
...recentEntries.map((e) => ({
|
|
429
|
-
role: e.role,
|
|
430
|
-
content: e.content,
|
|
431
|
-
...e.toolCallId ? { toolCallId: e.toolCallId } : {}
|
|
432
|
-
})),
|
|
433
|
-
{ role: "user", content: userMessage }
|
|
434
|
-
];
|
|
435
|
-
let toolCallCount = 0;
|
|
436
|
-
const skippedTools = [];
|
|
437
|
-
let pendingPlan;
|
|
438
|
-
for (; ; ) {
|
|
439
|
-
let response;
|
|
440
|
-
try {
|
|
441
|
-
response = await this.llm.complete(conversation, {
|
|
442
|
-
tools: this.toolSchemas,
|
|
443
|
-
...this.model ? { model: this.model } : {}
|
|
444
|
-
});
|
|
445
|
-
} catch (err) {
|
|
446
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
447
|
-
return {
|
|
448
|
-
reply: "[error] The model request failed. Check your model configuration and retry.",
|
|
449
|
-
chatSessionId: session.id,
|
|
450
|
-
error: msg
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
if (!response) {
|
|
454
|
-
return {
|
|
455
|
-
reply: "[error] No LLM model is available. Configure a local or cloud model to use Remnic Chat.",
|
|
456
|
-
chatSessionId: session.id,
|
|
457
|
-
error: "no_llm_available"
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
if (response.toolCalls.length === 0) {
|
|
461
|
-
let reply = response.content;
|
|
462
|
-
if (toolCallCount === 0 && looksLikeMemoryAssertion(reply)) {
|
|
463
|
-
reply += "\n\n\u26A0\uFE0F The above assertion was not grounded in a tool result this turn. Please verify with memory_search or memory_get.";
|
|
464
|
-
}
|
|
465
|
-
return {
|
|
466
|
-
reply,
|
|
467
|
-
chatSessionId: session.id,
|
|
468
|
-
...pendingPlan ? { pendingPlan } : {},
|
|
469
|
-
...skippedTools.length > 0 ? { skippedTools } : {}
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
conversation.push({ role: "assistant", content: response.content });
|
|
473
|
-
for (const tc of response.toolCalls) {
|
|
474
|
-
if (toolCallCount >= this.maxToolCallsPerTurn) {
|
|
475
|
-
skippedTools.push(tc.name);
|
|
476
|
-
continue;
|
|
477
|
-
}
|
|
478
|
-
toolCallCount++;
|
|
479
|
-
if (!this.allowedToolNames.has(tc.name)) {
|
|
480
|
-
conversation.push({
|
|
481
|
-
role: "tool",
|
|
482
|
-
content: JSON.stringify({ error: `Tool '${tc.name}' is not available in this configuration.` }),
|
|
483
|
-
toolCallId: tc.id
|
|
484
|
-
});
|
|
485
|
-
continue;
|
|
486
|
-
}
|
|
487
|
-
if (MUTATING_TOOLS.has(tc.name)) {
|
|
488
|
-
if (tc.name === "correction_apply") {
|
|
489
|
-
const planId = typeof tc.arguments.planId === "string" ? tc.arguments.planId : "";
|
|
490
|
-
if (!session.confirmedPlanIds.has(planId)) {
|
|
491
|
-
try {
|
|
492
|
-
const plan = await this.executor.correctionPlan(
|
|
493
|
-
`retrieve plan ${planId}`
|
|
494
|
-
);
|
|
495
|
-
pendingPlan = { planId, preview: plan.preview };
|
|
496
|
-
session.pendingPlanId = planId;
|
|
497
|
-
conversation.push({
|
|
498
|
-
role: "tool",
|
|
499
|
-
content: JSON.stringify({
|
|
500
|
-
intercepted: true,
|
|
501
|
-
message: "This mutation requires confirmation. The plan preview has been shown to the user."
|
|
502
|
-
}),
|
|
503
|
-
toolCallId: tc.id
|
|
504
|
-
});
|
|
505
|
-
return {
|
|
506
|
-
reply: formatPlanPreview(plan.preview),
|
|
507
|
-
chatSessionId: session.id,
|
|
508
|
-
pendingPlan
|
|
509
|
-
};
|
|
510
|
-
} catch {
|
|
511
|
-
conversation.push({
|
|
512
|
-
role: "tool",
|
|
513
|
-
content: JSON.stringify({ error: "Plan not found or expired." }),
|
|
514
|
-
toolCallId: tc.id
|
|
515
|
-
});
|
|
516
|
-
continue;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
session.confirmedPlanIds.delete(planId);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
if (tc.name === "memory_promote" && this.correctionAvailable) {
|
|
523
|
-
const memoryId = typeof tc.arguments.memoryId === "string" ? tc.arguments.memoryId : "";
|
|
524
|
-
session.pendingPromotionId = memoryId;
|
|
525
|
-
conversation.push({
|
|
526
|
-
role: "tool",
|
|
527
|
-
content: JSON.stringify({
|
|
528
|
-
intercepted: true,
|
|
529
|
-
message: `Memory promotion requires confirmation. Reply 'apply' to promote memory '${memoryId}'.`
|
|
530
|
-
}),
|
|
531
|
-
toolCallId: tc.id
|
|
532
|
-
});
|
|
533
|
-
return {
|
|
534
|
-
reply: `I want to promote memory \`${memoryId}\`. Reply **apply** to confirm this promotion, or **cancel** to discard it.`,
|
|
535
|
-
chatSessionId: session.id
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
let result;
|
|
539
|
-
try {
|
|
540
|
-
result = await this.executeTool(tc.name, tc.arguments, session);
|
|
541
|
-
} catch (err) {
|
|
542
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
543
|
-
result = { content: JSON.stringify({ error: msg }) };
|
|
544
|
-
}
|
|
545
|
-
conversation.push({
|
|
546
|
-
role: "tool",
|
|
547
|
-
content: result.content,
|
|
548
|
-
toolCallId: tc.id
|
|
549
|
-
});
|
|
550
|
-
if (tc.name === "correction_plan" && this.correctionAvailable) {
|
|
551
|
-
try {
|
|
552
|
-
const parsed = JSON.parse(result.content);
|
|
553
|
-
if (parsed.planId && parsed.preview) {
|
|
554
|
-
pendingPlan = { planId: parsed.planId, preview: parsed.preview };
|
|
555
|
-
session.pendingPlanId = parsed.planId;
|
|
556
|
-
}
|
|
557
|
-
} catch {
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
if (skippedTools.length > 0) {
|
|
562
|
-
conversation.push({
|
|
563
|
-
role: "user",
|
|
564
|
-
content: `[system] Tool budget exhausted (${this.maxToolCallsPerTurn} calls). ${skippedTools.length} tool(s) were skipped: ${skippedTools.join(", ")}. Please summarize what you found.`
|
|
565
|
-
});
|
|
566
|
-
let summaryResponse;
|
|
567
|
-
try {
|
|
568
|
-
summaryResponse = await this.llm.complete(conversation, {
|
|
569
|
-
tools: [],
|
|
570
|
-
// No more tools — force a text reply.
|
|
571
|
-
...this.model ? { model: this.model } : {}
|
|
572
|
-
});
|
|
573
|
-
} catch {
|
|
574
|
-
summaryResponse = null;
|
|
575
|
-
}
|
|
576
|
-
const summaryText = summaryResponse?.content ?? "I reached my tool-call budget. Here is what I found so far, but some queries were skipped.";
|
|
577
|
-
return {
|
|
578
|
-
reply: summaryText,
|
|
579
|
-
chatSessionId: session.id,
|
|
580
|
-
...pendingPlan ? { pendingPlan } : {},
|
|
581
|
-
skippedTools
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* Execute a single tool by name, delegating to the executor.
|
|
588
|
-
*/
|
|
589
|
-
async executeTool(name, args, _session) {
|
|
590
|
-
switch (name) {
|
|
591
|
-
case "memory_search": {
|
|
592
|
-
const query = typeof args.query === "string" ? args.query : "";
|
|
593
|
-
const maxResults = typeof args.maxResults === "number" ? args.maxResults : void 0;
|
|
594
|
-
return { content: await this.executor.memorySearch(query, maxResults) };
|
|
595
|
-
}
|
|
596
|
-
case "memory_get": {
|
|
597
|
-
const memoryId = typeof args.memoryId === "string" ? args.memoryId : "";
|
|
598
|
-
return { content: await this.executor.memoryGet(memoryId) };
|
|
599
|
-
}
|
|
600
|
-
case "memory_timeline": {
|
|
601
|
-
const memoryId = typeof args.memoryId === "string" ? args.memoryId : "";
|
|
602
|
-
const limit = typeof args.limit === "number" ? args.limit : void 0;
|
|
603
|
-
return { content: await this.executor.memoryTimeline(memoryId, limit) };
|
|
604
|
-
}
|
|
605
|
-
case "recall_explain": {
|
|
606
|
-
const query = typeof args.query === "string" ? args.query : "";
|
|
607
|
-
return { content: await this.executor.recallExplain(query) };
|
|
608
|
-
}
|
|
609
|
-
case "entity_get": {
|
|
610
|
-
const entityName = typeof args.name === "string" ? args.name : "";
|
|
611
|
-
return { content: await this.executor.entityGet(entityName) };
|
|
612
|
-
}
|
|
613
|
-
case "stats": {
|
|
614
|
-
return { content: await this.executor.stats() };
|
|
615
|
-
}
|
|
616
|
-
case "correction_plan": {
|
|
617
|
-
const request = typeof args.request === "string" ? args.request : "";
|
|
618
|
-
const plan = await this.executor.correctionPlan(request);
|
|
619
|
-
return { content: JSON.stringify(plan) };
|
|
620
|
-
}
|
|
621
|
-
case "correction_apply": {
|
|
622
|
-
const planId = typeof args.planId === "string" ? args.planId : "";
|
|
623
|
-
return { content: await this.executor.correctionApply(planId) };
|
|
624
|
-
}
|
|
625
|
-
case "memory_promote": {
|
|
626
|
-
const memoryId = typeof args.memoryId === "string" ? args.memoryId : "";
|
|
627
|
-
return { content: await this.executor.memoryPromote(memoryId) };
|
|
628
|
-
}
|
|
629
|
-
case "review_list": {
|
|
630
|
-
const runId = typeof args.runId === "string" ? args.runId : void 0;
|
|
631
|
-
return { content: await this.executor.reviewList(runId) };
|
|
632
|
-
}
|
|
633
|
-
case "scope_inspect": {
|
|
634
|
-
return { content: await this.executor.scopeInspect() };
|
|
635
|
-
}
|
|
636
|
-
default:
|
|
637
|
-
return { content: JSON.stringify({ error: `Unknown tool: ${name}` }) };
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
function looksLikeMemoryAssertion(text) {
|
|
642
|
-
const lower = text.toLowerCase();
|
|
643
|
-
const assertionPhrases = [
|
|
644
|
-
"you remember",
|
|
645
|
-
"i remember",
|
|
646
|
-
"according to my memory",
|
|
647
|
-
"your memory",
|
|
648
|
-
"stored memory",
|
|
649
|
-
"remnic remembers",
|
|
650
|
-
"remnic knows"
|
|
651
|
-
];
|
|
652
|
-
const hasAssertion = assertionPhrases.some((p) => lower.includes(p));
|
|
653
|
-
const hasCitation = lower.includes("[id:") || lower.includes("memory id") || lower.includes("source:");
|
|
654
|
-
return hasAssertion && !hasCitation;
|
|
655
|
-
}
|
|
656
|
-
function formatPlanPreview(preview) {
|
|
657
|
-
return [
|
|
658
|
-
"Here is the correction plan I generated:",
|
|
659
|
-
"",
|
|
660
|
-
"```diff",
|
|
661
|
-
preview,
|
|
662
|
-
"```",
|
|
663
|
-
"",
|
|
664
|
-
"Reply **apply** to confirm and apply this correction.",
|
|
665
|
-
"Reply **cancel** to discard it."
|
|
666
|
-
].join("\n");
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
// src/chat/chat-llm.ts
|
|
670
|
-
function createProductionChatLlmAdapter(client) {
|
|
671
|
-
return {
|
|
672
|
-
async complete(messages, options) {
|
|
673
|
-
const toolInstruction = formatToolInstruction(options.tools);
|
|
674
|
-
const mapped = messages.map((m) => {
|
|
675
|
-
if (m.role === "system") {
|
|
676
|
-
return { role: m.role, content: m.content + "\n\n" + toolInstruction };
|
|
677
|
-
}
|
|
678
|
-
if (m.role === "tool") {
|
|
679
|
-
const tag = m.toolCallId ? `[tool:${m.toolCallId}]` : "[tool]";
|
|
680
|
-
return { role: "user", content: `${tag} ${m.content}` };
|
|
681
|
-
}
|
|
682
|
-
return { role: m.role, content: m.content };
|
|
683
|
-
});
|
|
684
|
-
const result = await client.chatCompletion(mapped, {
|
|
685
|
-
...options.model ? { model: options.model } : {},
|
|
686
|
-
...options.signal ? { signal: options.signal } : {}
|
|
687
|
-
});
|
|
688
|
-
if (!result) return null;
|
|
689
|
-
const toolCalls = parseToolCalls(result.content);
|
|
690
|
-
return {
|
|
691
|
-
content: stripToolCallJson(result.content, toolCalls),
|
|
692
|
-
toolCalls
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
};
|
|
696
|
-
}
|
|
697
|
-
function formatToolInstruction(tools) {
|
|
698
|
-
if (tools.length === 0) return "";
|
|
699
|
-
const lines = [
|
|
700
|
-
"## Available tools",
|
|
701
|
-
"",
|
|
702
|
-
"You may call the following tools by emitting a JSON block on its own line:",
|
|
703
|
-
"```json",
|
|
704
|
-
'{"tool": "<name>", "arguments": { ... }}',
|
|
705
|
-
"```",
|
|
706
|
-
"",
|
|
707
|
-
"Call one tool at a time. After receiving the tool result, continue your",
|
|
708
|
-
"reasoning or emit another tool call. When you have a final answer, reply",
|
|
709
|
-
"with text only (no tool-call JSON).",
|
|
710
|
-
"",
|
|
711
|
-
"Tools:"
|
|
712
|
-
];
|
|
713
|
-
for (const t of tools) {
|
|
714
|
-
const params = JSON.stringify(t.function.parameters);
|
|
715
|
-
lines.push(`- ${t.function.name}: ${t.function.description}`);
|
|
716
|
-
lines.push(` Parameters: ${params}`);
|
|
717
|
-
}
|
|
718
|
-
return lines.join("\n");
|
|
719
|
-
}
|
|
720
|
-
function parseToolCalls(content) {
|
|
721
|
-
const calls = [];
|
|
722
|
-
const patterns = [
|
|
723
|
-
/```json\s*\n([\s\S]*?)\n```/g,
|
|
724
|
-
/```\s*\n([\s\S]*?)\n```/g
|
|
725
|
-
];
|
|
726
|
-
const candidates = [];
|
|
727
|
-
for (const pattern of patterns) {
|
|
728
|
-
let match;
|
|
729
|
-
while ((match = pattern.exec(content)) !== null) {
|
|
730
|
-
candidates.push(match[1]);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
for (const line of content.split("\n")) {
|
|
734
|
-
const trimmed = line.trim();
|
|
735
|
-
if (trimmed.startsWith("{") && trimmed.includes('"tool"')) {
|
|
736
|
-
candidates.push(trimmed);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
const seen = /* @__PURE__ */ new Set();
|
|
740
|
-
for (const candidate of candidates) {
|
|
741
|
-
try {
|
|
742
|
-
const parsed = JSON.parse(candidate);
|
|
743
|
-
if (typeof parsed.tool === "string" && parsed.tool.length > 0) {
|
|
744
|
-
const args = parsed.arguments ?? {};
|
|
745
|
-
const key = parsed.tool + ":" + JSON.stringify(args);
|
|
746
|
-
if (seen.has(key)) continue;
|
|
747
|
-
seen.add(key);
|
|
748
|
-
calls.push({
|
|
749
|
-
id: `call_${calls.length + 1}`,
|
|
750
|
-
name: parsed.tool,
|
|
751
|
-
arguments: args
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
} catch {
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
return calls;
|
|
758
|
-
}
|
|
759
|
-
function stripToolCallJson(content, toolCalls) {
|
|
760
|
-
if (toolCalls.length === 0) return content;
|
|
761
|
-
let result = content;
|
|
762
|
-
result = result.replace(/```json\s*\n[\s\S]*?\n```/g, "");
|
|
763
|
-
result = result.replace(/```\s*\n[\s\S]*?\n```/g, "");
|
|
764
|
-
result = result.split("\n").filter((line) => {
|
|
765
|
-
const trimmed = line.trim();
|
|
766
|
-
return !(trimmed.startsWith("{") && trimmed.includes('"tool"'));
|
|
767
|
-
}).join("\n");
|
|
768
|
-
return result.trim();
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
// src/chat/chat-executor.ts
|
|
772
|
-
function createChatExecutor(bindings) {
|
|
773
|
-
const { service, principal, namespace, sessionKey } = bindings;
|
|
774
|
-
return {
|
|
775
|
-
async memorySearch(query, maxResults) {
|
|
776
|
-
const result = await service.memorySearch({
|
|
777
|
-
query,
|
|
778
|
-
...namespace ? { namespace } : {},
|
|
779
|
-
...maxResults !== void 0 ? { maxResults } : {},
|
|
780
|
-
...principal ? { principal } : {}
|
|
781
|
-
});
|
|
782
|
-
return JSON.stringify(result);
|
|
783
|
-
},
|
|
784
|
-
async memoryGet(memoryId) {
|
|
785
|
-
const result = await service.memoryGet(memoryId, namespace, principal, sessionKey);
|
|
786
|
-
return JSON.stringify(result);
|
|
787
|
-
},
|
|
788
|
-
async memoryTimeline(memoryId, limit) {
|
|
789
|
-
const result = await service.memoryTimeline(memoryId, namespace, limit ?? 200, principal);
|
|
790
|
-
return JSON.stringify(result);
|
|
791
|
-
},
|
|
792
|
-
async recallExplain(query) {
|
|
793
|
-
const result = await service.recallExplain({
|
|
794
|
-
...sessionKey ? { sessionKey } : {},
|
|
795
|
-
...namespace ? { namespace } : {},
|
|
796
|
-
...principal ? { authenticatedPrincipal: principal } : {},
|
|
797
|
-
...query ? { query } : {}
|
|
798
|
-
});
|
|
799
|
-
return JSON.stringify(result);
|
|
800
|
-
},
|
|
801
|
-
async entityGet(name) {
|
|
802
|
-
const result = await service.entityGet(name, namespace);
|
|
803
|
-
return JSON.stringify(result);
|
|
804
|
-
},
|
|
805
|
-
async stats() {
|
|
806
|
-
const [profile, entities, questions] = await Promise.all([
|
|
807
|
-
service.memoryProfile(namespace, principal),
|
|
808
|
-
service.memoryEntitiesList(namespace, principal),
|
|
809
|
-
service.memoryQuestions(namespace, principal)
|
|
810
|
-
]);
|
|
811
|
-
return JSON.stringify({ profile, entities, questions });
|
|
812
|
-
},
|
|
813
|
-
async reviewList(runId) {
|
|
814
|
-
const result = await service.reviewQueue(runId, namespace, principal);
|
|
815
|
-
return JSON.stringify(result);
|
|
816
|
-
},
|
|
817
|
-
async scopeInspect() {
|
|
818
|
-
return JSON.stringify({
|
|
819
|
-
namespace: namespace ?? "default",
|
|
820
|
-
principal: principal ?? "default",
|
|
821
|
-
sessionKey: sessionKey ?? void 0
|
|
822
|
-
});
|
|
823
|
-
},
|
|
824
|
-
// ── Correction tools — stubbed until #1580 merges ──────────────────
|
|
825
|
-
// When the Correction Contract lands, replace these stubs with calls to
|
|
826
|
-
// the correction module's plan/apply interface. The engine, CLI, and
|
|
827
|
-
// MCP tool all consume this interface, so the stub-to-real swap is a
|
|
828
|
-
// single-file change here.
|
|
829
|
-
async correctionPlan(request) {
|
|
830
|
-
return {
|
|
831
|
-
planId: `stub-${Date.now()}`,
|
|
832
|
-
preview: `[Correction Contract (#1580) not yet available]
|
|
833
|
-
|
|
834
|
-
Requested correction: "${request}"
|
|
835
|
-
|
|
836
|
-
The plan/apply pipeline is pending. Inspection tools are fully functional.`
|
|
837
|
-
};
|
|
838
|
-
},
|
|
839
|
-
async correctionApply(planId) {
|
|
840
|
-
return JSON.stringify({
|
|
841
|
-
applied: false,
|
|
842
|
-
planId,
|
|
843
|
-
reason: "Correction Contract (#1580) not yet available. No mutation was applied."
|
|
844
|
-
});
|
|
845
|
-
},
|
|
846
|
-
async memoryPromote(memoryId) {
|
|
847
|
-
try {
|
|
848
|
-
const serviceWithPromote = service;
|
|
849
|
-
if (typeof serviceWithPromote.memoryPromote === "function") {
|
|
850
|
-
const result = await serviceWithPromote.memoryPromote(memoryId, namespace, principal);
|
|
851
|
-
return JSON.stringify(result);
|
|
852
|
-
}
|
|
853
|
-
} catch {
|
|
854
|
-
}
|
|
855
|
-
return JSON.stringify({
|
|
856
|
-
promoted: false,
|
|
857
|
-
memoryId,
|
|
858
|
-
reason: "Memory promotion is not available in this build."
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
};
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
// src/chat/chat-session.ts
|
|
865
|
-
import { mkdir, readFile, appendFile, readdir, stat, unlink, open } from "fs/promises";
|
|
866
|
-
import { constants as fsConstants } from "fs";
|
|
867
|
-
import { join } from "path";
|
|
868
|
-
import { randomUUID } from "crypto";
|
|
869
|
-
var CHAT_DIR_NAME = "state/chat";
|
|
870
|
-
function chatSessionDir(memoryDir) {
|
|
871
|
-
return join(memoryDir, CHAT_DIR_NAME);
|
|
872
|
-
}
|
|
873
|
-
function isSafeChatSessionId(chatSessionId) {
|
|
874
|
-
return /^[A-Za-z0-9]{8,128}$/.test(chatSessionId.replace(/-/g, ""));
|
|
875
|
-
}
|
|
876
|
-
function chatSessionFile(memoryDir, chatSessionId) {
|
|
877
|
-
if (!isSafeChatSessionId(chatSessionId)) {
|
|
878
|
-
throw new Error("Invalid chat session id");
|
|
879
|
-
}
|
|
880
|
-
return join(chatSessionDir(memoryDir), `${chatSessionId}.jsonl`);
|
|
881
|
-
}
|
|
882
|
-
var lastTranscriptSeq = 0;
|
|
883
|
-
function nextTranscriptSeq() {
|
|
884
|
-
const now = Date.now();
|
|
885
|
-
lastTranscriptSeq = now > lastTranscriptSeq ? now : lastTranscriptSeq + 1;
|
|
886
|
-
return lastTranscriptSeq;
|
|
887
|
-
}
|
|
888
|
-
async function createChatSession(memoryDir, opts) {
|
|
889
|
-
const id = randomUUID();
|
|
890
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
891
|
-
const state = {
|
|
892
|
-
id,
|
|
893
|
-
principal: opts.principal,
|
|
894
|
-
sessionKey: opts.sessionKey,
|
|
895
|
-
namespace: opts.namespace,
|
|
896
|
-
transcript: [],
|
|
897
|
-
confirmedPlanIds: /* @__PURE__ */ new Set(),
|
|
898
|
-
createdAt: now
|
|
899
|
-
};
|
|
900
|
-
await mkdir(chatSessionDir(memoryDir), { recursive: true });
|
|
901
|
-
await appendFile(
|
|
902
|
-
chatSessionFile(memoryDir, id),
|
|
903
|
-
JSON.stringify({
|
|
904
|
-
seq: 0,
|
|
905
|
-
ts: now,
|
|
906
|
-
role: "system",
|
|
907
|
-
content: `Chat session created. Principal: ${opts.principal ?? "default"}. Namespace: ${opts.namespace ?? "default"}. work_task: Excluded from memory extraction`,
|
|
908
|
-
// Structured binding fields so loadChatSession doesn't need to regex-parse
|
|
909
|
-
// prose (robust against dotted principals like alice@example.com).
|
|
910
|
-
...opts.principal ? { principal: opts.principal } : {},
|
|
911
|
-
...opts.namespace ? { namespace: opts.namespace } : {},
|
|
912
|
-
...opts.sessionKey ? { sessionKey: opts.sessionKey } : {}
|
|
913
|
-
}) + "\n",
|
|
914
|
-
"utf8"
|
|
915
|
-
);
|
|
916
|
-
return state;
|
|
917
|
-
}
|
|
918
|
-
async function loadChatSession(memoryDir, chatSessionId) {
|
|
919
|
-
let raw;
|
|
920
|
-
try {
|
|
921
|
-
raw = await readFile(chatSessionFile(memoryDir, chatSessionId), "utf8");
|
|
922
|
-
} catch {
|
|
923
|
-
return null;
|
|
924
|
-
}
|
|
925
|
-
const lines = raw.split("\n").filter((l) => l.trim().length > 0);
|
|
926
|
-
const transcript = [];
|
|
927
|
-
let principal;
|
|
928
|
-
let sessionKey;
|
|
929
|
-
let namespace;
|
|
930
|
-
let createdAt = "";
|
|
931
|
-
let pendingPlanId;
|
|
932
|
-
let pendingPromotionId;
|
|
933
|
-
for (const line of lines) {
|
|
934
|
-
try {
|
|
935
|
-
const entry = JSON.parse(line);
|
|
936
|
-
transcript.push(entry);
|
|
937
|
-
if (entry.role === "system" && entry.seq === 0) {
|
|
938
|
-
const metaPrincipal = typeof entry.principal === "string" ? entry.principal : void 0;
|
|
939
|
-
const metaNamespace = typeof entry.namespace === "string" ? entry.namespace : void 0;
|
|
940
|
-
const metaSessionKey = typeof entry.sessionKey === "string" ? entry.sessionKey : void 0;
|
|
941
|
-
if (metaPrincipal) principal = metaPrincipal;
|
|
942
|
-
else {
|
|
943
|
-
const pMatch = entry.content.match(/Principal: (.+?)\.\s/);
|
|
944
|
-
if (pMatch) principal = pMatch[1]?.trim() === "default" ? void 0 : pMatch[1]?.trim();
|
|
945
|
-
}
|
|
946
|
-
if (metaNamespace) namespace = metaNamespace;
|
|
947
|
-
else {
|
|
948
|
-
const nsMatch = entry.content.match(/Namespace: (.+?)\.\s/);
|
|
949
|
-
if (nsMatch) namespace = nsMatch[1]?.trim() === "default" ? void 0 : nsMatch[1]?.trim();
|
|
950
|
-
}
|
|
951
|
-
if (metaSessionKey) sessionKey = metaSessionKey;
|
|
952
|
-
createdAt = entry.ts;
|
|
953
|
-
}
|
|
954
|
-
if (entry.role === "system") {
|
|
955
|
-
const pm = entry.content.match(/^pending_plan:(.+)$/);
|
|
956
|
-
if (pm) pendingPlanId = pm[1];
|
|
957
|
-
const pp = entry.content.match(/^pending_promotion:(.+)$/);
|
|
958
|
-
if (pp) pendingPromotionId = pp[1];
|
|
959
|
-
const resolved = entry.content.match(/^(plan_applied|plan_cancelled|promotion_applied|promotion_cancelled):/);
|
|
960
|
-
if (resolved) {
|
|
961
|
-
if (entry.content.startsWith("plan_")) {
|
|
962
|
-
pendingPlanId = void 0;
|
|
963
|
-
}
|
|
964
|
-
if (entry.content.startsWith("promotion_")) {
|
|
965
|
-
pendingPromotionId = void 0;
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
} catch {
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
for (const e of transcript) {
|
|
973
|
-
if (typeof e.seq === "number" && e.seq + 1 > lastTranscriptSeq) {
|
|
974
|
-
lastTranscriptSeq = e.seq + 1;
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
return {
|
|
978
|
-
id: chatSessionId,
|
|
979
|
-
principal,
|
|
980
|
-
sessionKey,
|
|
981
|
-
namespace,
|
|
982
|
-
transcript,
|
|
983
|
-
confirmedPlanIds: /* @__PURE__ */ new Set(),
|
|
984
|
-
...pendingPlanId ? { pendingPlanId } : {},
|
|
985
|
-
...pendingPromotionId ? { pendingPromotionId } : {},
|
|
986
|
-
createdAt
|
|
987
|
-
};
|
|
988
|
-
}
|
|
989
|
-
async function enforceChatSessionNamespace(service, chatSessionId) {
|
|
990
|
-
const session = await loadChatSession(service.memoryDir, chatSessionId);
|
|
991
|
-
if (!session) return;
|
|
992
|
-
enforceNamespaceAllowList(tokenCapabilityStore.getStore(), session.namespace, service.configRef?.defaultNamespace);
|
|
993
|
-
}
|
|
994
|
-
async function appendTranscriptEntry(memoryDir, chatSessionId, entry) {
|
|
995
|
-
const filePath = chatSessionFile(memoryDir, chatSessionId);
|
|
996
|
-
const full = {
|
|
997
|
-
...entry,
|
|
998
|
-
seq: nextTranscriptSeq(),
|
|
999
|
-
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
1000
|
-
};
|
|
1001
|
-
let fh;
|
|
1002
|
-
try {
|
|
1003
|
-
fh = await open(filePath, fsConstants.O_APPEND | fsConstants.O_WRONLY);
|
|
1004
|
-
} catch (err) {
|
|
1005
|
-
if (err instanceof Error && err.code === "ENOENT") {
|
|
1006
|
-
throw new Error("chat_session_expired");
|
|
1007
|
-
}
|
|
1008
|
-
throw err;
|
|
1009
|
-
}
|
|
1010
|
-
try {
|
|
1011
|
-
await fh.appendFile(JSON.stringify(full) + "\n", "utf8");
|
|
1012
|
-
} finally {
|
|
1013
|
-
await fh.close();
|
|
1014
|
-
}
|
|
1015
|
-
try {
|
|
1016
|
-
await stat(filePath);
|
|
1017
|
-
} catch (err) {
|
|
1018
|
-
if (err instanceof Error && err.code === "ENOENT") {
|
|
1019
|
-
throw new Error("chat_session_expired");
|
|
1020
|
-
}
|
|
1021
|
-
throw err;
|
|
1022
|
-
}
|
|
1023
|
-
notifyTranscriptListeners(memoryDir, chatSessionId, full);
|
|
1024
|
-
return full;
|
|
1025
|
-
}
|
|
1026
|
-
var transcriptListeners = /* @__PURE__ */ new Map();
|
|
1027
|
-
function transcriptListenerKey(memoryDir, chatSessionId) {
|
|
1028
|
-
return `${memoryDir}\0${chatSessionId}`;
|
|
1029
|
-
}
|
|
1030
|
-
function notifyTranscriptListeners(memoryDir, chatSessionId, entry) {
|
|
1031
|
-
const set = transcriptListeners.get(transcriptListenerKey(memoryDir, chatSessionId));
|
|
1032
|
-
if (!set) return;
|
|
1033
|
-
for (const fn of set) {
|
|
1034
|
-
try {
|
|
1035
|
-
fn(entry);
|
|
1036
|
-
} catch {
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
function subscribeChatTranscript(memoryDir, chatSessionId, listener) {
|
|
1041
|
-
const key = transcriptListenerKey(memoryDir, chatSessionId);
|
|
1042
|
-
let set = transcriptListeners.get(key);
|
|
1043
|
-
if (!set) {
|
|
1044
|
-
set = /* @__PURE__ */ new Set();
|
|
1045
|
-
transcriptListeners.set(key, set);
|
|
1046
|
-
}
|
|
1047
|
-
set.add(listener);
|
|
1048
|
-
return () => {
|
|
1049
|
-
const current = transcriptListeners.get(key);
|
|
1050
|
-
if (!current) return;
|
|
1051
|
-
current.delete(listener);
|
|
1052
|
-
if (current.size === 0) {
|
|
1053
|
-
transcriptListeners.delete(key);
|
|
1054
|
-
}
|
|
1055
|
-
};
|
|
1056
|
-
}
|
|
1057
|
-
async function markPendingPlan(memoryDir, chatSessionId, planId) {
|
|
1058
|
-
await appendTranscriptEntry(memoryDir, chatSessionId, {
|
|
1059
|
-
role: "system",
|
|
1060
|
-
content: `pending_plan:${planId}`
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
async function markPendingPromotion(memoryDir, chatSessionId, memoryId) {
|
|
1064
|
-
await appendTranscriptEntry(memoryDir, chatSessionId, {
|
|
1065
|
-
role: "system",
|
|
1066
|
-
content: `pending_promotion:${memoryId}`
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
async function markPlanResolved(memoryDir, chatSessionId, planId) {
|
|
1070
|
-
await appendTranscriptEntry(memoryDir, chatSessionId, {
|
|
1071
|
-
role: "system",
|
|
1072
|
-
content: `plan_applied:${planId}`
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
async function markPromotionResolved(memoryDir, chatSessionId, memoryId) {
|
|
1076
|
-
await appendTranscriptEntry(memoryDir, chatSessionId, {
|
|
1077
|
-
role: "system",
|
|
1078
|
-
content: `promotion_applied:${memoryId}`
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
1081
|
-
async function cleanupExpiredChatSessions(memoryDir, ttlHours) {
|
|
1082
|
-
const dir = chatSessionDir(memoryDir);
|
|
1083
|
-
let files;
|
|
1084
|
-
try {
|
|
1085
|
-
files = await readdir(dir);
|
|
1086
|
-
} catch {
|
|
1087
|
-
return 0;
|
|
1088
|
-
}
|
|
1089
|
-
const now = Date.now();
|
|
1090
|
-
let removed = 0;
|
|
1091
|
-
for (const file of files) {
|
|
1092
|
-
if (!file.endsWith(".jsonl")) continue;
|
|
1093
|
-
try {
|
|
1094
|
-
const filePath = join(dir, file);
|
|
1095
|
-
const st = await stat(filePath);
|
|
1096
|
-
const ageHours = (now - st.mtimeMs) / (1e3 * 60 * 60);
|
|
1097
|
-
if (ttlHours <= 0 || ageHours >= ttlHours) {
|
|
1098
|
-
if (ttlHours > 0) {
|
|
1099
|
-
const fresh = await stat(filePath);
|
|
1100
|
-
const freshAge = (Date.now() - fresh.mtimeMs) / (1e3 * 60 * 60);
|
|
1101
|
-
if (freshAge < ttlHours) continue;
|
|
1102
|
-
}
|
|
1103
|
-
await unlink(filePath);
|
|
1104
|
-
removed++;
|
|
1105
|
-
}
|
|
1106
|
-
} catch {
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
return removed;
|
|
1110
|
-
}
|
|
1111
|
-
function sessionBelongsToPrincipal(session, principal) {
|
|
1112
|
-
if (!session.principal) return true;
|
|
1113
|
-
return session.principal === principal;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
// src/chat/chat-factory.ts
|
|
1117
|
-
function createChatEngine(opts) {
|
|
1118
|
-
const llmClient = opts.fallbackLlm ?? opts.localLlm;
|
|
1119
|
-
if (!llmClient) return null;
|
|
1120
|
-
const adapter = createProductionChatLlmAdapter(llmClient);
|
|
1121
|
-
const executor = createChatExecutor({
|
|
1122
|
-
service: opts.service,
|
|
1123
|
-
principal: opts.principal,
|
|
1124
|
-
namespace: opts.namespace,
|
|
1125
|
-
sessionKey: opts.sessionKey
|
|
1126
|
-
});
|
|
1127
|
-
return new ChatEngine({
|
|
1128
|
-
llm: adapter,
|
|
1129
|
-
executor,
|
|
1130
|
-
maxToolCallsPerTurn: opts.config.maxToolCallsPerTurn,
|
|
1131
|
-
...opts.config.model ? { model: opts.config.model } : {},
|
|
1132
|
-
correctionAvailable: false,
|
|
1133
|
-
scopeInspectAvailable: false
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
async function processChatMessage(opts) {
|
|
1137
|
-
if (!opts.config?.enabled) {
|
|
1138
|
-
throw new Error("chat_disabled");
|
|
1139
|
-
}
|
|
1140
|
-
if (!opts.service.fallbackLlmRef && !opts.service.localLlmRef) {
|
|
1141
|
-
throw new Error("no_llm_available");
|
|
1142
|
-
}
|
|
1143
|
-
let session;
|
|
1144
|
-
if (opts.chatSessionId) {
|
|
1145
|
-
session = await loadChatSession(opts.memoryDir, opts.chatSessionId);
|
|
1146
|
-
if (!session) throw new Error("chat_session_not_found");
|
|
1147
|
-
if (!sessionBelongsToPrincipal(session, opts.principal)) {
|
|
1148
|
-
throw new Error("access_denied");
|
|
1149
|
-
}
|
|
1150
|
-
} else {
|
|
1151
|
-
session = await createChatSession(opts.memoryDir, {
|
|
1152
|
-
principal: opts.principal,
|
|
1153
|
-
...opts.namespace ? { namespace: opts.namespace } : {},
|
|
1154
|
-
...opts.sessionKey ? { sessionKey: opts.sessionKey } : {}
|
|
1155
|
-
});
|
|
1156
|
-
}
|
|
1157
|
-
const engine = createChatEngine({
|
|
1158
|
-
service: opts.service,
|
|
1159
|
-
config: opts.config,
|
|
1160
|
-
fallbackLlm: opts.service.fallbackLlmRef,
|
|
1161
|
-
localLlm: opts.service.localLlmRef,
|
|
1162
|
-
principal: opts.principal,
|
|
1163
|
-
...session.namespace ? { namespace: session.namespace } : {},
|
|
1164
|
-
...session.sessionKey ? { sessionKey: session.sessionKey } : {}
|
|
1165
|
-
});
|
|
1166
|
-
if (!engine) {
|
|
1167
|
-
throw new Error("engine_unavailable");
|
|
1168
|
-
}
|
|
1169
|
-
await appendTranscriptEntry(opts.memoryDir, session.id, {
|
|
1170
|
-
role: "user",
|
|
1171
|
-
content: opts.message
|
|
1172
|
-
});
|
|
1173
|
-
const priorPendingPlanId = session.pendingPlanId;
|
|
1174
|
-
const priorPendingPromotionId = session.pendingPromotionId;
|
|
1175
|
-
const result = await engine.processMessage(opts.message, session);
|
|
1176
|
-
await appendTranscriptEntry(opts.memoryDir, session.id, {
|
|
1177
|
-
role: "assistant",
|
|
1178
|
-
content: result.reply
|
|
1179
|
-
});
|
|
1180
|
-
if (result.pendingPlan?.planId) {
|
|
1181
|
-
await markPendingPlan(opts.memoryDir, session.id, result.pendingPlan.planId);
|
|
1182
|
-
} else if (session.pendingPromotionId && !priorPendingPromotionId) {
|
|
1183
|
-
await markPendingPromotion(opts.memoryDir, session.id, session.pendingPromotionId);
|
|
1184
|
-
} else if (priorPendingPlanId && !session.pendingPlanId) {
|
|
1185
|
-
await markPlanResolved(opts.memoryDir, session.id, priorPendingPlanId);
|
|
1186
|
-
} else if (priorPendingPromotionId && !session.pendingPromotionId) {
|
|
1187
|
-
await markPromotionResolved(opts.memoryDir, session.id, priorPendingPromotionId);
|
|
1188
|
-
}
|
|
1189
|
-
return result;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
// src/meetings/mcp-tools.ts
|
|
1193
|
-
var MEETINGS_MCP_TOOLS = [
|
|
1194
|
-
{
|
|
1195
|
-
name: "engram.meetings_list",
|
|
1196
|
-
description: "List stored meeting records (issue #1900), across all days or one day. Returns per-day meeting summaries; empty when meetings.enabled is off.",
|
|
1197
|
-
inputSchema: {
|
|
1198
|
-
type: "object",
|
|
1199
|
-
properties: {
|
|
1200
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1201
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
|
|
1202
|
-
date: {
|
|
1203
|
-
type: "string",
|
|
1204
|
-
description: "Optional day to list (YYYY-MM-DD). Omit for all days."
|
|
1205
|
-
}
|
|
1206
|
-
},
|
|
1207
|
-
additionalProperties: false
|
|
1208
|
-
}
|
|
1209
|
-
},
|
|
1210
|
-
{
|
|
1211
|
-
name: "engram.meetings_get",
|
|
1212
|
-
description: "Return one stored meeting record's markdown by id (mtg-YYYY-MM-DD-<hash>). Absent when not found or meetings.enabled is off.",
|
|
1213
|
-
inputSchema: {
|
|
1214
|
-
type: "object",
|
|
1215
|
-
properties: {
|
|
1216
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1217
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
|
|
1218
|
-
id: {
|
|
1219
|
-
type: "string",
|
|
1220
|
-
description: "Meeting id (mtg-YYYY-MM-DD-<hash>). Required."
|
|
1221
|
-
}
|
|
1222
|
-
},
|
|
1223
|
-
required: ["id"],
|
|
1224
|
-
additionalProperties: false
|
|
1225
|
-
}
|
|
1226
|
-
},
|
|
1227
|
-
{
|
|
1228
|
-
name: "engram.meetings_build",
|
|
1229
|
-
description: "Detect + fuse + store a day's meetings from ingested audio + screen activity. No-op (enabled:false) when meetings.enabled is off.",
|
|
1230
|
-
inputSchema: {
|
|
1231
|
-
type: "object",
|
|
1232
|
-
properties: {
|
|
1233
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1234
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
|
|
1235
|
-
date: {
|
|
1236
|
-
type: "string",
|
|
1237
|
-
description: "Day to build (YYYY-MM-DD). Required."
|
|
1238
|
-
}
|
|
1239
|
-
},
|
|
1240
|
-
required: ["date"],
|
|
1241
|
-
additionalProperties: false
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
];
|
|
1245
|
-
|
|
1246
|
-
// src/wearables/mcp-tools.ts
|
|
1247
|
-
var WEARABLES_MCP_TOOLS = [
|
|
1248
|
-
{
|
|
1249
|
-
name: "engram.wearables_status",
|
|
1250
|
-
description: "Status of wearable transcript sources (Limitless / Bee / Omi): configured sources, connector availability, last sync, stored transcript days.",
|
|
1251
|
-
inputSchema: {
|
|
1252
|
-
type: "object",
|
|
1253
|
-
properties: {
|
|
1254
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1255
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." }
|
|
1256
|
-
},
|
|
1257
|
-
additionalProperties: false
|
|
1258
|
-
}
|
|
1259
|
-
},
|
|
1260
|
-
{
|
|
1261
|
-
name: "engram.wearables_sync",
|
|
1262
|
-
description: "Pull, clean, and store wearable transcripts for one source or all enabled sources; optionally creates trust-gated memories per the source's memoryMode.",
|
|
1263
|
-
inputSchema: {
|
|
1264
|
-
type: "object",
|
|
1265
|
-
properties: {
|
|
1266
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1267
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
|
|
1268
|
-
source: {
|
|
1269
|
-
type: "string",
|
|
1270
|
-
description: "Source id (e.g. limitless, bee, omi). Omit to sync every enabled source."
|
|
1271
|
-
},
|
|
1272
|
-
date: {
|
|
1273
|
-
type: "string",
|
|
1274
|
-
description: "Sync exactly this day (YYYY-MM-DD). Overrides days."
|
|
1275
|
-
},
|
|
1276
|
-
days: {
|
|
1277
|
-
type: "integer",
|
|
1278
|
-
minimum: 1,
|
|
1279
|
-
maximum: 90,
|
|
1280
|
-
description: "Lookback window in days ending today (default 2)."
|
|
1281
|
-
},
|
|
1282
|
-
forceMemories: {
|
|
1283
|
-
type: "boolean",
|
|
1284
|
-
description: "Re-run memory extraction even for unchanged days."
|
|
1285
|
-
}
|
|
1286
|
-
},
|
|
1287
|
-
additionalProperties: false
|
|
1288
|
-
}
|
|
1289
|
-
},
|
|
1290
|
-
{
|
|
1291
|
-
name: "engram.transcript_day",
|
|
1292
|
-
description: "Return the full stored wearable transcript(s) for a day, across all sources or one source, with cross-source overlap hints.",
|
|
1293
|
-
inputSchema: {
|
|
1294
|
-
type: "object",
|
|
1295
|
-
properties: {
|
|
1296
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1297
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
|
|
1298
|
-
date: {
|
|
1299
|
-
type: "string",
|
|
1300
|
-
description: "Day to read (YYYY-MM-DD). Required."
|
|
1301
|
-
},
|
|
1302
|
-
source: {
|
|
1303
|
-
type: "string",
|
|
1304
|
-
description: "Optional source id to scope to (e.g. limitless)."
|
|
1305
|
-
}
|
|
1306
|
-
},
|
|
1307
|
-
required: ["date"],
|
|
1308
|
-
additionalProperties: false
|
|
1309
|
-
}
|
|
1310
|
-
},
|
|
1311
|
-
{
|
|
1312
|
-
name: "engram.transcript_search",
|
|
1313
|
-
description: "Search stored wearable transcripts. Results carry source + date so callers can pull the full day via engram.transcript_day.",
|
|
1314
|
-
inputSchema: {
|
|
1315
|
-
type: "object",
|
|
1316
|
-
properties: {
|
|
1317
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1318
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
|
|
1319
|
-
query: {
|
|
1320
|
-
type: "string",
|
|
1321
|
-
description: "Search query. Required; non-empty."
|
|
1322
|
-
},
|
|
1323
|
-
source: {
|
|
1324
|
-
type: "string",
|
|
1325
|
-
description: "Optional source id filter."
|
|
1326
|
-
},
|
|
1327
|
-
from: {
|
|
1328
|
-
type: "string",
|
|
1329
|
-
description: "Optional inclusive start date (YYYY-MM-DD)."
|
|
1330
|
-
},
|
|
1331
|
-
to: {
|
|
1332
|
-
type: "string",
|
|
1333
|
-
description: "Optional inclusive end date (YYYY-MM-DD)."
|
|
1334
|
-
},
|
|
1335
|
-
limit: {
|
|
1336
|
-
type: "integer",
|
|
1337
|
-
minimum: 1,
|
|
1338
|
-
maximum: 50,
|
|
1339
|
-
description: "Maximum results (default 10)."
|
|
1340
|
-
}
|
|
1341
|
-
},
|
|
1342
|
-
required: ["query"],
|
|
1343
|
-
additionalProperties: false
|
|
1344
|
-
}
|
|
1345
|
-
},
|
|
1346
|
-
{
|
|
1347
|
-
name: "engram.transcript_memories",
|
|
1348
|
-
description: "List memories created from wearable transcripts, filterable by source and/or day. Includes pending_review candidates awaiting approval.",
|
|
1349
|
-
inputSchema: {
|
|
1350
|
-
type: "object",
|
|
1351
|
-
properties: {
|
|
1352
|
-
namespace: { type: "string", description: "Caller namespace to scope this operation to (issue #2123)." },
|
|
1353
|
-
sessionKey: { type: "string", description: "Session key for principal/namespace resolution." },
|
|
1354
|
-
source: {
|
|
1355
|
-
type: "string",
|
|
1356
|
-
description: "Optional source id filter (e.g. limitless)."
|
|
1357
|
-
},
|
|
1358
|
-
date: {
|
|
1359
|
-
type: "string",
|
|
1360
|
-
description: "Optional transcript day filter (YYYY-MM-DD)."
|
|
1361
|
-
},
|
|
1362
|
-
limit: {
|
|
1363
|
-
type: "integer",
|
|
1364
|
-
minimum: 1,
|
|
1365
|
-
maximum: 200,
|
|
1366
|
-
description: "Maximum results (default 50)."
|
|
1367
|
-
}
|
|
1368
|
-
},
|
|
1369
|
-
additionalProperties: false
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
];
|
|
1373
|
-
|
|
1374
|
-
// src/location/mcp-tools.ts
|
|
1375
|
-
var LOCATION_MCP_TOOLS = [
|
|
1376
|
-
{
|
|
1377
|
-
name: "engram.location_status",
|
|
1378
|
-
description: "Location sync status: master gate, timezone, per-source provider registration, last sync, and recent stored day counts. Never returns secrets, addresses, coordinates, or place labels.",
|
|
1379
|
-
inputSchema: {
|
|
1380
|
-
type: "object",
|
|
1381
|
-
properties: {},
|
|
1382
|
-
additionalProperties: false
|
|
1383
|
-
}
|
|
1384
|
-
},
|
|
1385
|
-
{
|
|
1386
|
-
name: "engram.location_check",
|
|
1387
|
-
description: "Probe every enabled location provider (auth/connectivity). Reports ok/detail per source; a disabled master gate or source reports a skip reason, never an error.",
|
|
1388
|
-
inputSchema: {
|
|
1389
|
-
type: "object",
|
|
1390
|
-
properties: {},
|
|
1391
|
-
additionalProperties: false
|
|
1392
|
-
}
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
name: "engram.location_sync",
|
|
1396
|
-
description: "Sync local-day place observations from every enabled location provider (default: location.syncDays ending yesterday). Same shared runner as the CLI and HTTP surfaces; a forced sync never bypasses the enabled gates or validation. Returns per-day, per-source synced/skipped/failed results.",
|
|
1397
|
-
inputSchema: {
|
|
1398
|
-
type: "object",
|
|
1399
|
-
properties: {
|
|
1400
|
-
date: {
|
|
1401
|
-
type: "string",
|
|
1402
|
-
description: "Optional exclusive-window end day (YYYY-MM-DD, inclusive); defaults to yesterday in location.timezone."
|
|
1403
|
-
},
|
|
1404
|
-
days: {
|
|
1405
|
-
type: "integer",
|
|
1406
|
-
minimum: 1,
|
|
1407
|
-
maximum: 90,
|
|
1408
|
-
description: "Optional window size (1..90); defaults to location.syncDays."
|
|
1409
|
-
}
|
|
1410
|
-
},
|
|
1411
|
-
additionalProperties: false
|
|
1412
|
-
}
|
|
1413
|
-
},
|
|
1414
|
-
{
|
|
1415
|
-
name: "engram.location_backfill",
|
|
1416
|
-
description: "Sync an explicit historical day range (inclusive, capped at 90 days) for every enabled location provider, then re-tag overlapping memories with provider-owned location metadata (issue #2046; requires location.tagging.backfillEnabled). dryRun reports the memory changes without persisting anything \u2014 no day files, no memory patches. Never makes an unbounded scan and never calls the LLM.",
|
|
1417
|
-
inputSchema: {
|
|
1418
|
-
type: "object",
|
|
1419
|
-
properties: {
|
|
1420
|
-
from: { type: "string", description: "Range start day (YYYY-MM-DD)." },
|
|
1421
|
-
to: { type: "string", description: "Range end day (YYYY-MM-DD, inclusive)." },
|
|
1422
|
-
dryRun: { type: "boolean", description: "Report only; persist nothing." }
|
|
1423
|
-
},
|
|
1424
|
-
required: ["from", "to"],
|
|
1425
|
-
additionalProperties: false
|
|
1426
|
-
}
|
|
1427
|
-
},
|
|
1428
|
-
{
|
|
1429
|
-
name: "engram.location_day",
|
|
1430
|
-
description: "Return one stored location day (place segments per source). Coordinates appear only when location.retainCoordinates is enabled; an unstored day returns found:false.",
|
|
1431
|
-
inputSchema: {
|
|
1432
|
-
type: "object",
|
|
1433
|
-
properties: {
|
|
1434
|
-
date: { type: "string", description: "Day to read (YYYY-MM-DD)." }
|
|
1435
|
-
},
|
|
1436
|
-
required: ["date"],
|
|
1437
|
-
additionalProperties: false
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
];
|
|
1441
|
-
|
|
1442
|
-
// src/standup/mcp-tools.ts
|
|
1443
|
-
var STANDUP_MCP_TOOLS = [
|
|
1444
|
-
{
|
|
1445
|
-
name: "engram.standup",
|
|
1446
|
-
description: "Deterministic standup brief: yesterday highlights, today priorities, blockers, and an activity grid. Pass date as YYYY-MM-DD; default is today UTC.",
|
|
1447
|
-
inputSchema: {
|
|
1448
|
-
type: "object",
|
|
1449
|
-
properties: {
|
|
1450
|
-
date: { type: "string", description: "Standup day (YYYY-MM-DD). Defaults to today UTC." }
|
|
1451
|
-
},
|
|
1452
|
-
additionalProperties: false
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
];
|
|
1456
|
-
|
|
1457
|
-
// src/support-passport/mcp-tools.ts
|
|
1458
|
-
var CARD_CATEGORIES = [
|
|
1459
|
-
"communication",
|
|
1460
|
-
"environment",
|
|
1461
|
-
"transitions",
|
|
1462
|
-
"sensory",
|
|
1463
|
-
"regulation",
|
|
1464
|
-
"interests",
|
|
1465
|
-
"other"
|
|
1466
|
-
];
|
|
1467
|
-
var cardTextProperties = {
|
|
1468
|
-
title: { type: "string", minLength: 1, maxLength: 80 },
|
|
1469
|
-
statement: { type: "string", minLength: 1, maxLength: 500 },
|
|
1470
|
-
category: { type: "string", enum: CARD_CATEGORIES },
|
|
1471
|
-
reviewBy: { type: "string", format: "date-time" }
|
|
1472
|
-
};
|
|
1473
|
-
var cardRevisionProperties = {
|
|
1474
|
-
cardId: { type: "string", minLength: 1, maxLength: 128 },
|
|
1475
|
-
expectedRevision: { type: "string", pattern: "^[a-f0-9]{64}$" }
|
|
1476
|
-
};
|
|
1477
|
-
var cardMutationProperties = {
|
|
1478
|
-
...cardRevisionProperties,
|
|
1479
|
-
reasonCode: { type: "string", minLength: 1, maxLength: 64, pattern: "^[a-z0-9-]+$" }
|
|
1480
|
-
};
|
|
1481
|
-
var sourceMemoryIdProperty = {
|
|
1482
|
-
type: "string",
|
|
1483
|
-
minLength: 1,
|
|
1484
|
-
maxLength: SUPPORT_PASSPORT_SOURCE_MEMORY_ID_MAX_LENGTH
|
|
1485
|
-
};
|
|
1486
|
-
var SUPPORT_PASSPORT_MCP_MIGRATED_OPERATIONS = {
|
|
1487
|
-
"engram.support_passport_memory_preview": "support_passport_memory_preview",
|
|
1488
|
-
"engram.support_passport_cards_list": "support_passport_cards_list",
|
|
1489
|
-
"engram.support_passport_draft_create": "support_passport_draft_create",
|
|
1490
|
-
"engram.support_passport_drafts_generate": "support_passport_drafts_generate",
|
|
1491
|
-
"engram.support_passport_card_replace": "support_passport_card_replace",
|
|
1492
|
-
"engram.support_passport_card_approve": "support_passport_card_approve",
|
|
1493
|
-
"engram.support_passport_card_reject": "support_passport_card_reject",
|
|
1494
|
-
"engram.support_passport_card_withdraw": "support_passport_card_withdraw",
|
|
1495
|
-
"engram.support_passport_grant_create": "support_passport_grant_create",
|
|
1496
|
-
"engram.support_passport_grants_list": "support_passport_grants_list",
|
|
1497
|
-
"engram.support_passport_grant_revoke": "support_passport_grant_revoke"
|
|
1498
|
-
};
|
|
1499
|
-
var SUPPORT_PASSPORT_MCP_TOOLS = [
|
|
1500
|
-
{
|
|
1501
|
-
name: "engram.support_passport_memory_preview",
|
|
1502
|
-
description: "Preview one memory and get the exact revision required for model drafting consent.",
|
|
1503
|
-
inputSchema: {
|
|
1504
|
-
type: "object",
|
|
1505
|
-
properties: { memoryId: sourceMemoryIdProperty },
|
|
1506
|
-
required: ["memoryId"],
|
|
1507
|
-
additionalProperties: false
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
|
-
{
|
|
1511
|
-
name: "engram.support_passport_cards_list",
|
|
1512
|
-
description: "List your support cards.",
|
|
1513
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
1514
|
-
},
|
|
1515
|
-
{
|
|
1516
|
-
name: "engram.support_passport_draft_create",
|
|
1517
|
-
description: "Create one support card draft for your review.",
|
|
1518
|
-
inputSchema: {
|
|
1519
|
-
type: "object",
|
|
1520
|
-
properties: cardTextProperties,
|
|
1521
|
-
required: ["title", "statement", "category", "reviewBy"],
|
|
1522
|
-
additionalProperties: false
|
|
1523
|
-
}
|
|
1524
|
-
},
|
|
1525
|
-
{
|
|
1526
|
-
name: "engram.support_passport_drafts_generate",
|
|
1527
|
-
description: "Draft support cards from only the memories you select and consent to send to your configured model.",
|
|
1528
|
-
inputSchema: {
|
|
1529
|
-
type: "object",
|
|
1530
|
-
properties: {
|
|
1531
|
-
sourceMemoryIds: {
|
|
1532
|
-
type: "array",
|
|
1533
|
-
minItems: 1,
|
|
1534
|
-
maxItems: 20,
|
|
1535
|
-
uniqueItems: true,
|
|
1536
|
-
items: sourceMemoryIdProperty
|
|
1537
|
-
},
|
|
1538
|
-
sourceMemoryRevisions: {
|
|
1539
|
-
type: "array",
|
|
1540
|
-
minItems: 1,
|
|
1541
|
-
maxItems: 20,
|
|
1542
|
-
uniqueItems: true,
|
|
1543
|
-
items: {
|
|
1544
|
-
type: "object",
|
|
1545
|
-
properties: {
|
|
1546
|
-
memoryId: sourceMemoryIdProperty,
|
|
1547
|
-
revision: { type: "string", pattern: "^[a-f0-9]{64}$" }
|
|
1548
|
-
},
|
|
1549
|
-
required: ["memoryId", "revision"],
|
|
1550
|
-
additionalProperties: false
|
|
1551
|
-
}
|
|
1552
|
-
},
|
|
1553
|
-
consent: { const: true }
|
|
1554
|
-
},
|
|
1555
|
-
required: ["sourceMemoryIds", "sourceMemoryRevisions", "consent"],
|
|
1556
|
-
additionalProperties: false
|
|
1557
|
-
}
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
name: "engram.support_passport_card_replace",
|
|
1561
|
-
description: "Create a replacement draft for one support card.",
|
|
1562
|
-
inputSchema: {
|
|
1563
|
-
type: "object",
|
|
1564
|
-
properties: { ...cardTextProperties, ...cardRevisionProperties },
|
|
1565
|
-
required: ["cardId", "title", "statement", "category", "reviewBy", "expectedRevision"],
|
|
1566
|
-
additionalProperties: false
|
|
1567
|
-
}
|
|
1568
|
-
},
|
|
1569
|
-
...["approve", "reject", "withdraw"].map(
|
|
1570
|
-
(action) => ({
|
|
1571
|
-
name: `engram.support_passport_card_${action}`,
|
|
1572
|
-
description: `${action === "withdraw" ? "Withdraw" : action === "approve" ? "Approve" : "Reject"} one support card as its owner.`,
|
|
1573
|
-
inputSchema: {
|
|
1574
|
-
type: "object",
|
|
1575
|
-
properties: cardMutationProperties,
|
|
1576
|
-
required: ["cardId", "expectedRevision", "reasonCode"],
|
|
1577
|
-
additionalProperties: false
|
|
1578
|
-
}
|
|
1579
|
-
})
|
|
1580
|
-
),
|
|
1581
|
-
{
|
|
1582
|
-
name: "engram.support_passport_grant_create",
|
|
1583
|
-
description: "Create one timed share link for selected approved support cards.",
|
|
1584
|
-
inputSchema: {
|
|
1585
|
-
type: "object",
|
|
1586
|
-
properties: {
|
|
1587
|
-
cardIds: {
|
|
1588
|
-
type: "array",
|
|
1589
|
-
minItems: 1,
|
|
1590
|
-
maxItems: 8,
|
|
1591
|
-
uniqueItems: true,
|
|
1592
|
-
items: { type: "string", minLength: 1, maxLength: 128 }
|
|
1593
|
-
},
|
|
1594
|
-
cardRevisions: {
|
|
1595
|
-
type: "array",
|
|
1596
|
-
minItems: 1,
|
|
1597
|
-
maxItems: 8,
|
|
1598
|
-
uniqueItems: true,
|
|
1599
|
-
items: {
|
|
1600
|
-
type: "object",
|
|
1601
|
-
properties: {
|
|
1602
|
-
cardId: { type: "string", minLength: 1, maxLength: 128 },
|
|
1603
|
-
revision: { type: "string", pattern: "^[a-f0-9]{64}$" }
|
|
1604
|
-
},
|
|
1605
|
-
required: ["cardId", "revision"],
|
|
1606
|
-
additionalProperties: false
|
|
1607
|
-
}
|
|
1608
|
-
},
|
|
1609
|
-
expiresAt: { type: "string", format: "date-time" },
|
|
1610
|
-
durationMs: { type: "integer", minimum: 3e5, maximum: 6048e5 }
|
|
1611
|
-
},
|
|
1612
|
-
required: ["cardIds", "cardRevisions"],
|
|
1613
|
-
oneOf: [{ required: ["expiresAt"] }, { required: ["durationMs"] }],
|
|
1614
|
-
additionalProperties: false
|
|
1615
|
-
}
|
|
1616
|
-
},
|
|
1617
|
-
{
|
|
1618
|
-
name: "engram.support_passport_grants_list",
|
|
1619
|
-
description: "List your support passport share links without secrets.",
|
|
1620
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
1621
|
-
},
|
|
1622
|
-
{
|
|
1623
|
-
name: "engram.support_passport_grant_revoke",
|
|
1624
|
-
description: "Stop one support passport share link.",
|
|
1625
|
-
inputSchema: {
|
|
1626
|
-
type: "object",
|
|
1627
|
-
properties: {
|
|
1628
|
-
grantId: { type: "string", minLength: 1, maxLength: 128 },
|
|
1629
|
-
expectedVersion: { type: "integer", minimum: 1 }
|
|
1630
|
-
},
|
|
1631
|
-
required: ["grantId", "expectedVersion"],
|
|
1632
|
-
additionalProperties: false
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
];
|
|
1636
|
-
|
|
1637
|
-
// src/access-mcp.ts
|
|
1638
|
-
function throwMcpAbort(signal, message) {
|
|
1639
|
-
if (!signal?.aborted) return;
|
|
1640
|
-
if (isAbortError(signal.reason)) throw signal.reason;
|
|
1641
|
-
throw abortError(message);
|
|
1642
|
-
}
|
|
1643
|
-
var MCP_SUPPORTED_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", "2024-11-05"];
|
|
1644
|
-
var MCP_DEFAULT_PROTOCOL_VERSION = MCP_SUPPORTED_PROTOCOL_VERSIONS[0] ?? "2025-06-18";
|
|
1645
|
-
function isReadOnlyToolName(name) {
|
|
1646
|
-
const suffix = toolNameSuffix(name);
|
|
1647
|
-
return suffix !== null && MCP_READ_ONLY_TOOL_SUFFIXES[suffix] === true;
|
|
1648
|
-
}
|
|
1649
|
-
var MCP_MIGRATED_OPERATIONS = {
|
|
1650
|
-
"engram.memory_get": "memory_get",
|
|
1651
|
-
"engram.memory_search": "memory_search",
|
|
1652
|
-
"engram.external_wiki_search": "external_wiki_search",
|
|
1653
|
-
"engram.memory_store": "memory_store",
|
|
1654
|
-
"engram.coding_decision": "coding_decision",
|
|
1655
|
-
"engram.coding_architecture": "coding_architecture",
|
|
1656
|
-
// codegraph parity tools (issue #1554) — each maps to its boundary op.
|
|
1657
|
-
"engram.codegraph_index": "codegraph_index",
|
|
1658
|
-
"engram.codegraph_list_projects": "codegraph_list_projects",
|
|
1659
|
-
"engram.codegraph_delete_project": "codegraph_delete_project",
|
|
1660
|
-
"engram.codegraph_index_status": "codegraph_index_status",
|
|
1661
|
-
"engram.codegraph_search_graph": "codegraph_search_graph",
|
|
1662
|
-
"engram.codegraph_trace_path": "codegraph_trace_path",
|
|
1663
|
-
"engram.codegraph_detect_changes": "codegraph_detect_changes",
|
|
1664
|
-
"engram.codegraph_query_graph": "codegraph_query_graph",
|
|
1665
|
-
"engram.codegraph_get_schema": "codegraph_get_schema",
|
|
1666
|
-
"engram.codegraph_get_snippet": "codegraph_get_snippet",
|
|
1667
|
-
"engram.codegraph_get_architecture": "codegraph_get_architecture",
|
|
1668
|
-
"engram.codegraph_search_code": "codegraph_search_code",
|
|
1669
|
-
"engram.codegraph_manage_adr": "codegraph_manage_adr",
|
|
1670
|
-
"engram.codegraph_ingest_traces": "codegraph_ingest_traces",
|
|
1671
|
-
"engram.coding_delta": "coding_delta",
|
|
1672
|
-
// Correction Contract (issue #1580) — one plan/apply pipeline.
|
|
1673
|
-
"engram.memory_correct_plan": "memory_correct_plan",
|
|
1674
|
-
"engram.memory_correct_apply": "memory_correct_apply",
|
|
1675
|
-
// Fully migrated through the strict-schema boundary (#1668).
|
|
1676
|
-
"engram.recall": "recall",
|
|
1677
|
-
"engram.recall_explain": "recall_explain",
|
|
1678
|
-
"engram.set_coding_context": "set_coding_context",
|
|
1679
|
-
"engram.recall_tier_explain": "recall_tier_explain",
|
|
1680
|
-
"engram.recall_xray": "recall_xray",
|
|
1681
|
-
"engram.who_knows": "who_knows",
|
|
1682
|
-
"engram.promotion_candidates": "promotion_candidates",
|
|
1683
|
-
"engram.wearables_status": "wearables_status",
|
|
1684
|
-
"engram.wearables_sync": "wearables_sync",
|
|
1685
|
-
"engram.location_status": "location_status",
|
|
1686
|
-
"engram.location_check": "location_check",
|
|
1687
|
-
"engram.location_sync": "location_sync",
|
|
1688
|
-
"engram.location_backfill": "location_backfill",
|
|
1689
|
-
"engram.location_day": "location_day",
|
|
1690
|
-
"engram.transcript_day": "transcript_day",
|
|
1691
|
-
"engram.transcript_search": "transcript_search",
|
|
1692
|
-
"engram.transcript_memories": "transcript_memories",
|
|
1693
|
-
"engram.meetings_list": "meetings_list",
|
|
1694
|
-
"engram.meetings_get": "meetings_get",
|
|
1695
|
-
"engram.meetings_build": "meetings_build",
|
|
1696
|
-
"engram.standup": "standup",
|
|
1697
|
-
"engram.action_confidence": "action_confidence",
|
|
1698
|
-
"engram.chatgpt_memory_inspector": "chatgpt_memory_inspector",
|
|
1699
|
-
"engram.day_summary": "day_summary",
|
|
1700
|
-
"engram.capsule_export": "capsule_export",
|
|
1701
|
-
"engram.capsule_import": "capsule_import",
|
|
1702
|
-
"engram.capsule_list": "capsule_list",
|
|
1703
|
-
"engram.memory_governance_run": "memory_governance_run",
|
|
1704
|
-
"engram.entity_synthesis_run": "entity_synthesis_run",
|
|
1705
|
-
"engram.procedure_mining_run": "procedure_mining_run",
|
|
1706
|
-
"engram.pattern_reinforcement_run": "pattern_reinforcement_run",
|
|
1707
|
-
"engram.procedural_stats": "procedural_stats",
|
|
1708
|
-
"engram.procedure_library_maintenance": "procedure_library_maintenance",
|
|
1709
|
-
"engram.memory_timeline": "memory_timeline",
|
|
1710
|
-
"engram.suggestion_submit": "suggestion_submit",
|
|
1711
|
-
"engram.entity_get": "entity_get",
|
|
1712
|
-
"engram.review_queue_list": "review_queue_list",
|
|
1713
|
-
"engram.observe": "observe",
|
|
1714
|
-
"engram.lcm_search": "lcm_search",
|
|
1715
|
-
"engram.lcm_compaction_flush": "lcm_compaction_flush",
|
|
1716
|
-
"engram.extraction_force_flush": "extraction_force_flush",
|
|
1717
|
-
"engram.lcm_compaction_record": "lcm_compaction_record",
|
|
1718
|
-
"engram.continuity_audit_generate": "continuity_audit_generate",
|
|
1719
|
-
"engram.continuity_incident_open": "continuity_incident_open",
|
|
1720
|
-
"engram.continuity_incident_close": "continuity_incident_close",
|
|
1721
|
-
"engram.continuity_incident_list": "continuity_incident_list",
|
|
1722
|
-
"engram.continuity_loop_add_or_update": "continuity_loop_add_or_update",
|
|
1723
|
-
"engram.continuity_loop_review": "continuity_loop_review",
|
|
1724
|
-
"engram.identity_anchor_get": "identity_anchor_get",
|
|
1725
|
-
"engram.identity_anchor_update": "identity_anchor_update",
|
|
1726
|
-
"engram.memory_identity": "memory_identity",
|
|
1727
|
-
"engram.work_task": "work_task",
|
|
1728
|
-
"engram.work_project": "work_project",
|
|
1729
|
-
"engram.work_board": "work_board",
|
|
1730
|
-
"engram.shared_context_write_output": "shared_context_write_output",
|
|
1731
|
-
"engram.shared_feedback_record": "shared_feedback_record",
|
|
1732
|
-
"engram.shared_priorities_append": "shared_priorities_append",
|
|
1733
|
-
"engram.shared_context_cross_signals_run": "shared_context_cross_signals_run",
|
|
1734
|
-
"engram.shared_context_curate_daily": "shared_context_curate_daily",
|
|
1735
|
-
"engram.compounding_weekly_synthesize": "compounding_weekly_synthesize",
|
|
1736
|
-
"engram.compounding_promote_candidate": "compounding_promote_candidate",
|
|
1737
|
-
"engram.compression_guidelines_optimize": "compression_guidelines_optimize",
|
|
1738
|
-
"engram.compression_guidelines_activate": "compression_guidelines_activate",
|
|
1739
|
-
"engram.memory_profile": "memory_profile",
|
|
1740
|
-
"engram.memory_entities_list": "memory_entities_list",
|
|
1741
|
-
"engram.memory_questions": "memory_questions",
|
|
1742
|
-
"engram.memory_last_recall": "memory_last_recall",
|
|
1743
|
-
"engram.memory_intent_debug": "memory_intent_debug",
|
|
1744
|
-
"engram.memory_qmd_debug": "memory_qmd_debug",
|
|
1745
|
-
"engram.memory_graph_explain": "memory_graph_explain",
|
|
1746
|
-
"engram.graph_snapshot": "graph_snapshot",
|
|
1747
|
-
"engram.memory_feedback": "memory_feedback",
|
|
1748
|
-
"engram.memory_promote": "memory_promote",
|
|
1749
|
-
"engram.memory_outcome": "memory_outcome",
|
|
1750
|
-
"engram.memory_action_apply": "memory_action_apply",
|
|
1751
|
-
"engram.context_checkpoint": "context_checkpoint",
|
|
1752
|
-
"engram.briefing": "briefing",
|
|
1753
|
-
"engram.review_list": "review_list",
|
|
1754
|
-
"engram.review_resolve": "review_resolve",
|
|
1755
|
-
"engram.contradiction_scan_run": "contradiction_scan_run",
|
|
1756
|
-
"engram.memory_summarize_hourly": "memory_summarize_hourly",
|
|
1757
|
-
"engram.conversation_index_update": "conversation_index_update",
|
|
1758
|
-
"engram.profiling_report": "profiling_report",
|
|
1759
|
-
"engram.graph_edge_decay_run": "graph_edge_decay_run",
|
|
1760
|
-
"engram.live_connectors_run": "live_connectors_run",
|
|
1761
|
-
"engram.peer_list": "peer_list",
|
|
1762
|
-
"engram.peer_get": "peer_get",
|
|
1763
|
-
"engram.peer_set": "peer_set",
|
|
1764
|
-
"engram.peer_delete": "peer_delete",
|
|
1765
|
-
"engram.peer_profile_get": "peer_profile_get",
|
|
1766
|
-
"engram.peer_forget": "peer_forget",
|
|
1767
|
-
"engram.console_state": "console_state",
|
|
1768
|
-
"engram.dreams_status": "dreams_status",
|
|
1769
|
-
"engram.dreams_run": "dreams_run",
|
|
1770
|
-
...SUPPORT_PASSPORT_MCP_MIGRATED_OPERATIONS,
|
|
1771
|
-
...MCP_ADMIN_OPS_MIGRATED_OPERATIONS,
|
|
1772
|
-
"engram.deep_recall": "deep_recall",
|
|
1773
|
-
"engram.memory_expand": "memory_expand",
|
|
1774
|
-
"engram.memory_traverse": "memory_traverse",
|
|
1775
|
-
"engram.memory_ls": "memory_ls",
|
|
1776
|
-
"engram.memory_tree": "memory_tree",
|
|
1777
|
-
"engram.memory_find": "memory_find",
|
|
1778
|
-
"engram.memory_chat": "chat_message"
|
|
1779
|
-
};
|
|
1780
|
-
var STRICT_MCP_SCHEMA_KEYS = {
|
|
1781
|
-
daySummary: ["memories", "includeLocation", "sessionKey", "namespace", "timeZone", "cwd", "projectTag"],
|
|
1782
|
-
memoryStore: [
|
|
1783
|
-
"schemaVersion",
|
|
1784
|
-
"idempotencyKey",
|
|
1785
|
-
"dryRun",
|
|
1786
|
-
"sessionKey",
|
|
1787
|
-
"content",
|
|
1788
|
-
"category",
|
|
1789
|
-
"confidence",
|
|
1790
|
-
"namespace",
|
|
1791
|
-
"tags",
|
|
1792
|
-
"entityRef",
|
|
1793
|
-
"ttl",
|
|
1794
|
-
"sourceReason",
|
|
1795
|
-
"cwd",
|
|
1796
|
-
"projectTag"
|
|
1797
|
-
],
|
|
1798
|
-
suggestionSubmit: [
|
|
1799
|
-
"schemaVersion",
|
|
1800
|
-
"idempotencyKey",
|
|
1801
|
-
"dryRun",
|
|
1802
|
-
"sessionKey",
|
|
1803
|
-
"content",
|
|
1804
|
-
"category",
|
|
1805
|
-
"confidence",
|
|
1806
|
-
"namespace",
|
|
1807
|
-
"tags",
|
|
1808
|
-
"entityRef",
|
|
1809
|
-
"ttl",
|
|
1810
|
-
"sourceReason",
|
|
1811
|
-
"cwd",
|
|
1812
|
-
"projectTag"
|
|
1813
|
-
],
|
|
1814
|
-
capsuleExport: [
|
|
1815
|
-
"name",
|
|
1816
|
-
"namespace",
|
|
1817
|
-
"since",
|
|
1818
|
-
"includeKinds",
|
|
1819
|
-
"peerIds",
|
|
1820
|
-
"includeTranscripts",
|
|
1821
|
-
"encrypt",
|
|
1822
|
-
"cwd",
|
|
1823
|
-
"projectTag"
|
|
1824
|
-
],
|
|
1825
|
-
capsuleImport: ["archivePath", "namespace", "mode", "passphrase", "cwd", "projectTag"],
|
|
1826
|
-
capsuleList: ["namespace", "sessionKey", "cwd", "projectTag"]
|
|
1827
|
-
};
|
|
1828
|
-
var MCP_WIRE_SCHEMAS = {
|
|
1829
|
-
memory_store: "memoryStore",
|
|
1830
|
-
suggestion_submit: "suggestionSubmit",
|
|
1831
|
-
action_confidence: "actionConfidence",
|
|
1832
|
-
day_summary: "daySummary",
|
|
1833
|
-
capsule_export: "capsuleExport",
|
|
1834
|
-
capsule_import: "capsuleImport",
|
|
1835
|
-
capsule_list: "capsuleList",
|
|
1836
|
-
observe: "observe",
|
|
1837
|
-
recall: "recall",
|
|
1838
|
-
lcm_compaction_flush: "lcmCompactionFlush",
|
|
1839
|
-
extraction_force_flush: "extractionForceFlush",
|
|
1840
|
-
lcm_compaction_record: "lcmCompactionRecord"
|
|
1841
|
-
};
|
|
1842
|
-
var MCP_GIT_CONTEXT_SCHEMA_PROPS_SCOPED = {
|
|
1843
|
-
cwd: {
|
|
1844
|
-
type: "string",
|
|
1845
|
-
description: "Optional working directory. When no explicit namespace is given, resolves the project namespace this write is stored in (mirrors recall/observe)."
|
|
1846
|
-
},
|
|
1847
|
-
projectTag: {
|
|
1848
|
-
type: "string",
|
|
1849
|
-
description: "Optional project tag for non-git project scoping. When no explicit namespace is given, routes this write to the tagged project namespace."
|
|
1850
|
-
}
|
|
1851
|
-
};
|
|
1852
|
-
function parseMcpRequest(schemaName, args) {
|
|
1853
|
-
const allowedKeys = STRICT_MCP_SCHEMA_KEYS[schemaName];
|
|
1854
|
-
if (allowedKeys) {
|
|
1855
|
-
const allowed = new Set(allowedKeys);
|
|
1856
|
-
const unexpected = Object.keys(args).filter((key) => !allowed.has(key));
|
|
1857
|
-
if (unexpected.length > 0) {
|
|
1858
|
-
throw new EngramAccessInputError(
|
|
1859
|
-
`request validation failed: (root): Unrecognized key(s) in object: ${unexpected.join(", ")}`
|
|
1860
|
-
);
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
const validation = validateRequest(schemaName, args);
|
|
1864
|
-
if (validation.success) return validation.data;
|
|
1865
|
-
const details = validation.error.details.map((detail) => `${detail.field}: ${detail.message}`).join("; ");
|
|
1866
|
-
throw new EngramAccessInputError(
|
|
1867
|
-
details.length > 0 ? `${validation.error.error}: ${details}` : validation.error.error
|
|
1868
|
-
);
|
|
1869
|
-
}
|
|
1870
|
-
function getObjectProperties(value) {
|
|
1871
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
1872
|
-
}
|
|
1873
|
-
async function getMcpServerVersion() {
|
|
1874
|
-
const envVersion = readEnvVar("OPENCLAW_ENGRAM_VERSION")?.trim() || readEnvVar("npm_package_version")?.trim();
|
|
1875
|
-
if (envVersion) return envVersion;
|
|
1876
|
-
try {
|
|
1877
|
-
const pkgPath = new URL("../package.json", import.meta.url);
|
|
1878
|
-
const raw = await readFile2(pkgPath, "utf-8");
|
|
1879
|
-
const parsed = JSON.parse(raw);
|
|
1880
|
-
return parsed.version?.trim() || "unknown";
|
|
1881
|
-
} catch {
|
|
1882
|
-
return "unknown";
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
var EngramMcpServer = class {
|
|
1886
|
-
constructor(service, options = {}) {
|
|
1887
|
-
this.service = service;
|
|
1888
|
-
this.citationsEnabled = options.citationsEnabled === true;
|
|
1889
|
-
this.citationsAutoDetect = options.citationsAutoDetect !== false;
|
|
1890
|
-
this.emitLegacyTools = options.emitLegacyTools !== false;
|
|
1891
|
-
this.codingDecisionVisible = options.codingDecisionVisible === true;
|
|
1892
|
-
this.architectureCardVisible = options.architectureCardVisible === true;
|
|
1893
|
-
this.codegraphVisible = options.codegraphVisible === true;
|
|
1894
|
-
this.sessionDeltaVisible = options.sessionDeltaVisible === true;
|
|
1895
|
-
this.correctionVisible = options.correctionVisible !== false;
|
|
1896
|
-
this.chatVisible = options.chatVisible === true;
|
|
1897
|
-
this.authenticatedPrincipal = options.principal?.trim() || readEnvVar("OPENCLAW_ENGRAM_ACCESS_PRINCIPAL")?.trim() || void 0;
|
|
1898
|
-
this.resources = [
|
|
1899
|
-
{
|
|
1900
|
-
uri: REMNIC_CHATGPT_MEMORY_INSPECTOR_WIDGET_URI,
|
|
1901
|
-
name: "remnic-memory-inspector",
|
|
1902
|
-
title: "Remnic Memory Inspector",
|
|
1903
|
-
description: "Apps-compatible widget for inspecting retrieved Remnic memories, provenance, safety, and correction/scoping affordances.",
|
|
1904
|
-
mimeType: REMNIC_CHATGPT_MEMORY_INSPECTOR_MIME_TYPE,
|
|
1905
|
-
_meta: {
|
|
1906
|
-
ui: {
|
|
1907
|
-
csp: {
|
|
1908
|
-
connectDomains: [],
|
|
1909
|
-
resourceDomains: []
|
|
1910
|
-
},
|
|
1911
|
-
prefersBorder: true
|
|
1912
|
-
},
|
|
1913
|
-
"openai/widgetDescription": "Inspect retrieved Remnic memories, provenance, safety, and correction/scoping affordances."
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
];
|
|
1917
|
-
this.resourceTextByUri = /* @__PURE__ */ new Map([
|
|
1918
|
-
[REMNIC_CHATGPT_MEMORY_INSPECTOR_WIDGET_URI, REMNIC_CHATGPT_MEMORY_INSPECTOR_WIDGET_HTML]
|
|
1919
|
-
]);
|
|
1920
|
-
this.tools = [
|
|
1921
|
-
{
|
|
1922
|
-
name: "engram.recall",
|
|
1923
|
-
description: "Recall Engram context for a query.",
|
|
1924
|
-
inputSchema: {
|
|
1925
|
-
type: "object",
|
|
1926
|
-
properties: {
|
|
1927
|
-
query: { type: "string" },
|
|
1928
|
-
sessionKey: { type: "string" },
|
|
1929
|
-
namespace: { type: "string" },
|
|
1930
|
-
topK: { type: "number" },
|
|
1931
|
-
mode: { type: "string", enum: ["auto", "no_recall", "minimal", "full", "graph_mode"] },
|
|
1932
|
-
includeDebug: { type: "boolean" },
|
|
1933
|
-
// Disclosure depth (issue #677); default `chunk` when omitted.
|
|
1934
|
-
disclosure: { type: "string", enum: ["chunk", "section", "raw"] },
|
|
1935
|
-
cwd: { type: "string", description: "Working directory for auto git-context resolution." },
|
|
1936
|
-
projectTag: {
|
|
1937
|
-
type: "string",
|
|
1938
|
-
description: "Project tag for non-git project scoping (e.g. 'acme-webshop')."
|
|
1939
|
-
},
|
|
1940
|
-
asOf: {
|
|
1941
|
-
type: "string",
|
|
1942
|
-
description: "Historical recall pin (issue #680). ISO 8601 timestamp; when set, the recall returns the corpus as it existed at this instant."
|
|
1943
|
-
},
|
|
1944
|
-
tags: {
|
|
1945
|
-
type: "array",
|
|
1946
|
-
items: { type: "string" },
|
|
1947
|
-
description: "Filter recall results to memories whose frontmatter tags match (issue #689)."
|
|
1948
|
-
},
|
|
1949
|
-
tagMatch: {
|
|
1950
|
-
type: "string",
|
|
1951
|
-
enum: ["any", "all"],
|
|
1952
|
-
description: "Tag-filter match mode; 'any' (default) or 'all'."
|
|
1953
|
-
},
|
|
1954
|
-
stateView: {
|
|
1955
|
-
type: "boolean",
|
|
1956
|
-
description: "Opt in to state-aware recall views (issue #1952); ORs with the recallStateViews config flag."
|
|
1957
|
-
}
|
|
1958
|
-
},
|
|
1959
|
-
required: ["query"],
|
|
1960
|
-
additionalProperties: false
|
|
1961
|
-
}
|
|
1962
|
-
},
|
|
1963
|
-
{
|
|
1964
|
-
name: "engram.recall_explain",
|
|
1965
|
-
description: "Return the last recall snapshot for a session or the most recent one.",
|
|
1966
|
-
inputSchema: {
|
|
1967
|
-
type: "object",
|
|
1968
|
-
properties: {
|
|
1969
|
-
sessionKey: { type: "string" },
|
|
1970
|
-
namespace: { type: "string" }
|
|
1971
|
-
},
|
|
1972
|
-
additionalProperties: false
|
|
1973
|
-
}
|
|
1974
|
-
},
|
|
1975
|
-
{
|
|
1976
|
-
name: "engram.set_coding_context",
|
|
1977
|
-
description: "Attach a coding-agent context (project / branch) to a session so recall routes to a project- / branch-scoped namespace (issue #569). For MCP clients that do not ship cwd automatically (Cursor, generic agents, etc.). Also aliased as remnic.set_coding_context. Pass codingContext: null to clear. Alternatively, pass just a projectTag for non-git project scoping (e.g. OpenClaw channels).",
|
|
1978
|
-
inputSchema: {
|
|
1979
|
-
type: "object",
|
|
1980
|
-
properties: {
|
|
1981
|
-
sessionKey: {
|
|
1982
|
-
type: "string",
|
|
1983
|
-
description: "Session identifier the context should attach to."
|
|
1984
|
-
},
|
|
1985
|
-
codingContext: {
|
|
1986
|
-
anyOf: [
|
|
1987
|
-
{ type: "null" },
|
|
1988
|
-
{
|
|
1989
|
-
type: "object",
|
|
1990
|
-
properties: {
|
|
1991
|
-
projectId: { type: "string", description: "Stable project id (origin:<hex> or root:<hex>)." },
|
|
1992
|
-
branch: { type: ["string", "null"], description: "Current branch, or null in detached HEAD." },
|
|
1993
|
-
rootPath: { type: "string", description: "Absolute path to the repo root." },
|
|
1994
|
-
defaultBranch: {
|
|
1995
|
-
type: ["string", "null"],
|
|
1996
|
-
description: "Default branch (usually main/master), or null when unknown."
|
|
1997
|
-
}
|
|
1998
|
-
},
|
|
1999
|
-
required: ["projectId", "branch", "rootPath", "defaultBranch"],
|
|
2000
|
-
additionalProperties: false
|
|
2001
|
-
}
|
|
2002
|
-
],
|
|
2003
|
-
description: "The context to attach, or null to clear. Omit when using projectTag instead."
|
|
2004
|
-
},
|
|
2005
|
-
projectTag: {
|
|
2006
|
-
type: "string",
|
|
2007
|
-
description: "Arbitrary project tag for non-git project scoping (e.g. 'acme-webshop'). Creates a coding context with projectId 'tag:<projectTag>'. Use instead of codingContext when the session isn't tied to a specific git repo."
|
|
2008
|
-
}
|
|
2009
|
-
},
|
|
2010
|
-
required: ["sessionKey"],
|
|
2011
|
-
additionalProperties: false
|
|
2012
|
-
}
|
|
2013
|
-
},
|
|
2014
|
-
{
|
|
2015
|
-
name: "engram.recall_tier_explain",
|
|
2016
|
-
description: "Return a structured tier-explain payload for the last direct-answer-eligible recall (issue #518). Orthogonal to engram.recall_explain, which returns a graph-path explanation.",
|
|
2017
|
-
inputSchema: {
|
|
2018
|
-
type: "object",
|
|
2019
|
-
properties: {
|
|
2020
|
-
sessionKey: {
|
|
2021
|
-
type: "string",
|
|
2022
|
-
description: "Optional session key. Omit to read the most recent snapshot."
|
|
2023
|
-
},
|
|
2024
|
-
namespace: {
|
|
2025
|
-
type: "string",
|
|
2026
|
-
description: "Optional namespace to scope the returned snapshot."
|
|
2027
|
-
}
|
|
2028
|
-
},
|
|
2029
|
-
additionalProperties: false
|
|
2030
|
-
}
|
|
2031
|
-
},
|
|
2032
|
-
{
|
|
2033
|
-
// Registered as `engram.recall_xray`; `withToolAliases` below
|
|
2034
|
-
// emits the canonical `remnic.recall_xray` alias automatically
|
|
2035
|
-
// (dual-naming invariant for every new MCP tool).
|
|
2036
|
-
name: "engram.recall_xray",
|
|
2037
|
-
description: "Run a recall with X-ray capture enabled and return the unified per-result attribution snapshot (tier + audit + MMR + filters in one view). Issue #570.",
|
|
2038
|
-
inputSchema: {
|
|
2039
|
-
type: "object",
|
|
2040
|
-
properties: {
|
|
2041
|
-
query: {
|
|
2042
|
-
type: "string",
|
|
2043
|
-
description: "Query to recall against. Required; non-empty."
|
|
2044
|
-
},
|
|
2045
|
-
sessionKey: {
|
|
2046
|
-
type: "string",
|
|
2047
|
-
description: "Optional session key to scope the recall."
|
|
2048
|
-
},
|
|
2049
|
-
namespace: {
|
|
2050
|
-
type: "string",
|
|
2051
|
-
description: "Optional namespace. Enforced against the caller's principal; a mismatch yields snapshotFound:false."
|
|
2052
|
-
},
|
|
2053
|
-
budget: {
|
|
2054
|
-
type: "integer",
|
|
2055
|
-
minimum: 1,
|
|
2056
|
-
description: "Optional positive-integer override for the recall character budget."
|
|
2057
|
-
},
|
|
2058
|
-
disclosure: {
|
|
2059
|
-
type: "string",
|
|
2060
|
-
enum: ["chunk", "section", "raw"],
|
|
2061
|
-
description: "Optional disclosure depth for X-ray telemetry (issue #677). When set, populates the per-disclosure token-spend summary on each result."
|
|
2062
|
-
}
|
|
2063
|
-
},
|
|
2064
|
-
required: ["query"],
|
|
2065
|
-
additionalProperties: false
|
|
2066
|
-
}
|
|
2067
|
-
},
|
|
2068
|
-
...WEARABLES_MCP_TOOLS,
|
|
2069
|
-
...MEETINGS_MCP_TOOLS,
|
|
2070
|
-
...WHO_KNOWS_MCP_TOOLS,
|
|
2071
|
-
...PROMOTION_CANDIDATES_MCP_TOOLS,
|
|
2072
|
-
...LOCATION_MCP_TOOLS,
|
|
2073
|
-
...STANDUP_MCP_TOOLS,
|
|
2074
|
-
...DEEP_RECALL_MCP_TOOLS,
|
|
2075
|
-
...service.recallNavigationEnabled !== false ? RECALL_NAVIGATION_MCP_TOOLS : [],
|
|
2076
|
-
...MEMORY_BROWSE_MCP_TOOLS,
|
|
2077
|
-
...service.supportPassportEnabled ? SUPPORT_PASSPORT_MCP_TOOLS : [],
|
|
2078
|
-
{
|
|
2079
|
-
name: "engram.action_confidence",
|
|
2080
|
-
description: "Advisory ask/draft/act/refuse/escalate decision helper for interruption budgeting. Read-only; never mutates memory.",
|
|
2081
|
-
inputSchema: {
|
|
2082
|
-
type: "object",
|
|
2083
|
-
properties: {
|
|
2084
|
-
intendedAction: { type: "string" },
|
|
2085
|
-
confidence: { type: "number", minimum: 0, maximum: 1 },
|
|
2086
|
-
risk: {
|
|
2087
|
-
type: "string",
|
|
2088
|
-
enum: ["low", "medium", "high", "irreversible", "restricted"]
|
|
2089
|
-
},
|
|
2090
|
-
contextReadiness: {
|
|
2091
|
-
type: "string",
|
|
2092
|
-
enum: ["none", "partial", "sufficient"]
|
|
2093
|
-
},
|
|
2094
|
-
currentContextScopes: {
|
|
2095
|
-
type: "array",
|
|
2096
|
-
items: { type: "string" }
|
|
2097
|
-
},
|
|
2098
|
-
userRules: {
|
|
2099
|
-
type: "array",
|
|
2100
|
-
items: {
|
|
2101
|
-
type: "object",
|
|
2102
|
-
properties: {
|
|
2103
|
-
kind: {
|
|
2104
|
-
type: "string",
|
|
2105
|
-
enum: ["ask-before", "do-not-use-outside-this-context", "never", "requires-escalation"]
|
|
2106
|
-
},
|
|
2107
|
-
description: { type: "string" },
|
|
2108
|
-
matched: { type: "boolean" }
|
|
2109
|
-
},
|
|
2110
|
-
required: ["kind"],
|
|
2111
|
-
additionalProperties: false
|
|
2112
|
-
}
|
|
2113
|
-
},
|
|
2114
|
-
retrievedMemories: {
|
|
2115
|
-
type: "array",
|
|
2116
|
-
items: {
|
|
2117
|
-
type: "object",
|
|
2118
|
-
properties: {
|
|
2119
|
-
source: { type: "string" },
|
|
2120
|
-
created: { type: "string" },
|
|
2121
|
-
updated: { type: "string" },
|
|
2122
|
-
scope: { type: "string" },
|
|
2123
|
-
userContextScopes: {
|
|
2124
|
-
type: "array",
|
|
2125
|
-
items: { type: "string" }
|
|
2126
|
-
},
|
|
2127
|
-
retrievalReason: { type: "string" },
|
|
2128
|
-
confidence: { type: "number", minimum: 0, maximum: 1 },
|
|
2129
|
-
stale: { type: "boolean" },
|
|
2130
|
-
corrected: { type: "boolean" },
|
|
2131
|
-
correctionState: {
|
|
2132
|
-
type: "string",
|
|
2133
|
-
enum: ["none", "correction", "superseded", "disputed", "forgotten"]
|
|
2134
|
-
},
|
|
2135
|
-
safeToUse: { type: "boolean" },
|
|
2136
|
-
safety: {
|
|
2137
|
-
type: "string",
|
|
2138
|
-
enum: ["safe", "requires-review", "blocked"]
|
|
2139
|
-
},
|
|
2140
|
-
safetyReasons: {
|
|
2141
|
-
type: "array",
|
|
2142
|
-
items: { type: "string" }
|
|
2143
|
-
}
|
|
2144
|
-
},
|
|
2145
|
-
additionalProperties: false
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
},
|
|
2149
|
-
additionalProperties: false
|
|
2150
|
-
}
|
|
2151
|
-
},
|
|
2152
|
-
{
|
|
2153
|
-
name: REMNIC_CHATGPT_MEMORY_INSPECTOR_TOOL,
|
|
2154
|
-
title: "Show Remnic Memory Inspector",
|
|
2155
|
-
description: "Use this when the user wants a ChatGPT Apps-compatible UI for inspecting Remnic recall, provenance, safety, and correction/forget/scoping affordances. Read-only; correction and forget actions are proposed as follow-up prompts.",
|
|
2156
|
-
inputSchema: {
|
|
2157
|
-
type: "object",
|
|
2158
|
-
properties: {
|
|
2159
|
-
query: {
|
|
2160
|
-
type: "string",
|
|
2161
|
-
description: "Memory question to inspect."
|
|
2162
|
-
},
|
|
2163
|
-
sessionKey: {
|
|
2164
|
-
type: "string",
|
|
2165
|
-
description: "Optional Remnic session key for scoped recall."
|
|
2166
|
-
},
|
|
2167
|
-
namespace: {
|
|
2168
|
-
type: "string",
|
|
2169
|
-
description: "Optional Remnic namespace to inspect."
|
|
2170
|
-
},
|
|
2171
|
-
currentContextScopes: {
|
|
2172
|
-
type: "array",
|
|
2173
|
-
items: { type: "string" },
|
|
2174
|
-
description: "Optional current user-context scopes, such as repo, work, personal, client, or private."
|
|
2175
|
-
},
|
|
2176
|
-
allowUnverifiedPreview: {
|
|
2177
|
-
type: "boolean",
|
|
2178
|
-
description: "If true, the inspector may show recalled preview text when X-ray provenance is missing or unavailable. Explicitly blocked memories remain redacted."
|
|
2179
|
-
}
|
|
2180
|
-
},
|
|
2181
|
-
required: ["query"],
|
|
2182
|
-
additionalProperties: false
|
|
2183
|
-
},
|
|
2184
|
-
outputSchema: {
|
|
2185
|
-
type: "object",
|
|
2186
|
-
properties: {
|
|
2187
|
-
app: { type: "object" },
|
|
2188
|
-
query: { type: "string" },
|
|
2189
|
-
sessionKey: { type: "string" },
|
|
2190
|
-
namespace: { type: "string" },
|
|
2191
|
-
safeRecallPreview: { type: "string" },
|
|
2192
|
-
memoryCount: { type: "number" },
|
|
2193
|
-
memoryIds: { type: "array", items: { type: "string" } },
|
|
2194
|
-
memories: { type: "array", items: { type: "object" } },
|
|
2195
|
-
actionConfidence: { type: "object" },
|
|
2196
|
-
affordances: { type: "array", items: { type: "object" } },
|
|
2197
|
-
guidance: { type: "object" }
|
|
2198
|
-
},
|
|
2199
|
-
required: [
|
|
2200
|
-
"app",
|
|
2201
|
-
"query",
|
|
2202
|
-
"namespace",
|
|
2203
|
-
"safeRecallPreview",
|
|
2204
|
-
"memoryCount",
|
|
2205
|
-
"memoryIds",
|
|
2206
|
-
"memories",
|
|
2207
|
-
"actionConfidence",
|
|
2208
|
-
"affordances",
|
|
2209
|
-
"guidance"
|
|
2210
|
-
],
|
|
2211
|
-
additionalProperties: false
|
|
2212
|
-
},
|
|
2213
|
-
annotations: {
|
|
2214
|
-
readOnlyHint: true,
|
|
2215
|
-
destructiveHint: false,
|
|
2216
|
-
idempotentHint: true,
|
|
2217
|
-
openWorldHint: false
|
|
2218
|
-
},
|
|
2219
|
-
_meta: {
|
|
2220
|
-
ui: {
|
|
2221
|
-
resourceUri: REMNIC_CHATGPT_MEMORY_INSPECTOR_WIDGET_URI,
|
|
2222
|
-
visibility: ["model", "app"]
|
|
2223
|
-
},
|
|
2224
|
-
"openai/outputTemplate": REMNIC_CHATGPT_MEMORY_INSPECTOR_WIDGET_URI,
|
|
2225
|
-
"openai/toolInvocation/invoking": "Inspecting Remnic memory...",
|
|
2226
|
-
"openai/toolInvocation/invoked": "Remnic memory inspector ready."
|
|
2227
|
-
}
|
|
2228
|
-
},
|
|
2229
|
-
{
|
|
2230
|
-
name: "engram.day_summary",
|
|
2231
|
-
description: "Generate a structured end-of-day summary. When memories is omitted or empty, auto-gathers today's facts and hourly summaries from storage.",
|
|
2232
|
-
inputSchema: {
|
|
2233
|
-
type: "object",
|
|
2234
|
-
properties: {
|
|
2235
|
-
memories: { type: "string" },
|
|
2236
|
-
sessionKey: { type: "string" },
|
|
2237
|
-
namespace: { type: "string" },
|
|
2238
|
-
timeZone: { type: "string" },
|
|
2239
|
-
...MCP_GIT_CONTEXT_SCHEMA_PROPS_IGNORED
|
|
2240
|
-
},
|
|
2241
|
-
required: [],
|
|
2242
|
-
additionalProperties: false
|
|
2243
|
-
}
|
|
2244
|
-
},
|
|
2245
|
-
...MCP_ADMIN_OPS_TOOLS,
|
|
2246
|
-
{
|
|
2247
|
-
name: "engram.memory_get",
|
|
2248
|
-
description: "Fetch one Remnic memory by id.",
|
|
2249
|
-
inputSchema: {
|
|
2250
|
-
type: "object",
|
|
2251
|
-
properties: {
|
|
2252
|
-
memoryId: { type: "string" },
|
|
2253
|
-
namespace: { type: "string" },
|
|
2254
|
-
// Issue #1582 — when memoryId is a `[m:xxxx]` handle, sessionKey
|
|
2255
|
-
// scopes resolution to this session's recent recall history.
|
|
2256
|
-
// Advertising it here lets the transport inject its session key
|
|
2257
|
-
// (toolAcceptsArgument) so MCP callers can cite handles (codex review).
|
|
2258
|
-
sessionKey: { type: "string" }
|
|
2259
|
-
},
|
|
2260
|
-
required: ["memoryId"],
|
|
2261
|
-
additionalProperties: false
|
|
2262
|
-
}
|
|
2263
|
-
},
|
|
2264
|
-
{
|
|
2265
|
-
name: "engram.memory_timeline",
|
|
2266
|
-
description: "Fetch one Remnic memory timeline by id.",
|
|
2267
|
-
inputSchema: {
|
|
2268
|
-
type: "object",
|
|
2269
|
-
properties: {
|
|
2270
|
-
memoryId: { type: "string" },
|
|
2271
|
-
namespace: { type: "string" },
|
|
2272
|
-
limit: { type: "number" }
|
|
2273
|
-
},
|
|
2274
|
-
required: ["memoryId"],
|
|
2275
|
-
additionalProperties: false
|
|
2276
|
-
}
|
|
2277
|
-
},
|
|
2278
|
-
{
|
|
2279
|
-
name: "engram.memory_store",
|
|
2280
|
-
description: "Store an explicit Remnic memory through the access layer.",
|
|
2281
|
-
inputSchema: {
|
|
2282
|
-
type: "object",
|
|
2283
|
-
properties: {
|
|
2284
|
-
schemaVersion: { type: "number" },
|
|
2285
|
-
idempotencyKey: { type: "string" },
|
|
2286
|
-
dryRun: { type: "boolean" },
|
|
2287
|
-
sessionKey: { type: "string" },
|
|
2288
|
-
content: { type: "string" },
|
|
2289
|
-
category: { type: "string" },
|
|
2290
|
-
confidence: { type: "number" },
|
|
2291
|
-
namespace: { type: "string" },
|
|
2292
|
-
tags: { type: "array", items: { type: "string" } },
|
|
2293
|
-
entityRef: { type: "string" },
|
|
2294
|
-
ttl: { type: "string" },
|
|
2295
|
-
sourceReason: { type: "string" },
|
|
2296
|
-
...MCP_GIT_CONTEXT_SCHEMA_PROPS_SCOPED
|
|
2297
|
-
},
|
|
2298
|
-
required: ["content"],
|
|
2299
|
-
additionalProperties: false
|
|
2300
|
-
}
|
|
2301
|
-
},
|
|
2302
|
-
{
|
|
2303
|
-
name: "engram.suggestion_submit",
|
|
2304
|
-
description: "Queue a suggested Remnic memory for review.",
|
|
2305
|
-
inputSchema: {
|
|
2306
|
-
type: "object",
|
|
2307
|
-
properties: {
|
|
2308
|
-
schemaVersion: { type: "number" },
|
|
2309
|
-
idempotencyKey: { type: "string" },
|
|
2310
|
-
dryRun: { type: "boolean" },
|
|
2311
|
-
sessionKey: { type: "string" },
|
|
2312
|
-
content: { type: "string" },
|
|
2313
|
-
category: { type: "string" },
|
|
2314
|
-
confidence: { type: "number" },
|
|
2315
|
-
namespace: { type: "string" },
|
|
2316
|
-
tags: { type: "array", items: { type: "string" } },
|
|
2317
|
-
entityRef: { type: "string" },
|
|
2318
|
-
ttl: { type: "string" },
|
|
2319
|
-
sourceReason: { type: "string" },
|
|
2320
|
-
...MCP_GIT_CONTEXT_SCHEMA_PROPS_SCOPED
|
|
2321
|
-
},
|
|
2322
|
-
required: ["content"],
|
|
2323
|
-
additionalProperties: false
|
|
2324
|
-
}
|
|
2325
|
-
},
|
|
2326
|
-
{
|
|
2327
|
-
name: "engram.entity_get",
|
|
2328
|
-
description: "Fetch one Engram entity by name.",
|
|
2329
|
-
inputSchema: {
|
|
2330
|
-
type: "object",
|
|
2331
|
-
properties: {
|
|
2332
|
-
name: { type: "string" },
|
|
2333
|
-
namespace: { type: "string" }
|
|
2334
|
-
},
|
|
2335
|
-
required: ["name"],
|
|
2336
|
-
additionalProperties: false
|
|
2337
|
-
}
|
|
2338
|
-
},
|
|
2339
|
-
{
|
|
2340
|
-
name: "engram.review_queue_list",
|
|
2341
|
-
description: "Fetch the latest Engram review queue artifact bundle.",
|
|
2342
|
-
inputSchema: {
|
|
2343
|
-
type: "object",
|
|
2344
|
-
properties: {
|
|
2345
|
-
runId: { type: "string" },
|
|
2346
|
-
namespace: { type: "string" }
|
|
2347
|
-
},
|
|
2348
|
-
additionalProperties: false
|
|
2349
|
-
}
|
|
2350
|
-
},
|
|
2351
|
-
{
|
|
2352
|
-
name: "engram.observe",
|
|
2353
|
-
description: "Feed conversation messages into Engram's memory pipeline (LCM archive + extraction).",
|
|
2354
|
-
inputSchema: {
|
|
2355
|
-
type: "object",
|
|
2356
|
-
properties: {
|
|
2357
|
-
sessionKey: { type: "string", description: "Conversation session identifier" },
|
|
2358
|
-
messages: {
|
|
2359
|
-
type: "array",
|
|
2360
|
-
items: {
|
|
2361
|
-
type: "object",
|
|
2362
|
-
properties: {
|
|
2363
|
-
role: { type: "string", enum: ["user", "assistant"] },
|
|
2364
|
-
content: { type: "string" },
|
|
2365
|
-
sourceFormat: {
|
|
2366
|
-
type: "string",
|
|
2367
|
-
enum: ["openai", "anthropic", "openclaw", "pi", "lossless-claw", "remnic"]
|
|
2368
|
-
},
|
|
2369
|
-
rawContent: {
|
|
2370
|
-
description: "Optional native provider content blocks for structured message-part capture."
|
|
2371
|
-
},
|
|
2372
|
-
parts: {
|
|
2373
|
-
type: "array",
|
|
2374
|
-
description: "Optional normalized Remnic LCM message parts.",
|
|
2375
|
-
items: {
|
|
2376
|
-
type: "object",
|
|
2377
|
-
properties: {
|
|
2378
|
-
ordinal: { type: ["number", "null"], minimum: 0 },
|
|
2379
|
-
kind: {
|
|
2380
|
-
type: "string",
|
|
2381
|
-
enum: [
|
|
2382
|
-
"text",
|
|
2383
|
-
"tool_call",
|
|
2384
|
-
"tool_result",
|
|
2385
|
-
"patch",
|
|
2386
|
-
"file_read",
|
|
2387
|
-
"file_write",
|
|
2388
|
-
"step_start",
|
|
2389
|
-
"step_finish",
|
|
2390
|
-
"snapshot",
|
|
2391
|
-
"retry"
|
|
2392
|
-
]
|
|
2393
|
-
},
|
|
2394
|
-
payload: { type: "object", additionalProperties: true },
|
|
2395
|
-
toolName: { type: ["string", "null"] },
|
|
2396
|
-
tool_name: { type: ["string", "null"] },
|
|
2397
|
-
filePath: { type: ["string", "null"] },
|
|
2398
|
-
file_path: { type: ["string", "null"] },
|
|
2399
|
-
createdAt: { type: ["string", "null"] },
|
|
2400
|
-
created_at: { type: ["string", "null"] }
|
|
2401
|
-
},
|
|
2402
|
-
required: ["kind", "payload"],
|
|
2403
|
-
additionalProperties: false
|
|
2404
|
-
}
|
|
2405
|
-
}
|
|
2406
|
-
},
|
|
2407
|
-
required: ["role", "content"],
|
|
2408
|
-
additionalProperties: false
|
|
2409
|
-
},
|
|
2410
|
-
description: "Conversation messages to observe"
|
|
2411
|
-
},
|
|
2412
|
-
idempotencyKey: {
|
|
2413
|
-
type: "string",
|
|
2414
|
-
description: "Optional idempotency key (issue #1649). Deduplicates a retried observe POST server-side so the batch is ingested once even when the HTTP response is lost. Reusing the key with a different payload is rejected."
|
|
2415
|
-
},
|
|
2416
|
-
namespace: { type: "string" },
|
|
2417
|
-
skipExtraction: { type: "boolean" },
|
|
2418
|
-
cwd: { type: "string", description: "Working directory for auto git-context resolution." },
|
|
2419
|
-
projectTag: {
|
|
2420
|
-
type: "string",
|
|
2421
|
-
description: "Project tag for non-git project scoping (e.g. 'acme-webshop')."
|
|
2422
|
-
}
|
|
2423
|
-
},
|
|
2424
|
-
required: ["sessionKey", "messages"],
|
|
2425
|
-
additionalProperties: false
|
|
2426
|
-
}
|
|
2427
|
-
},
|
|
2428
|
-
{
|
|
2429
|
-
name: "engram.lcm_search",
|
|
2430
|
-
description: "Search the LCM conversation archive for matching content.",
|
|
2431
|
-
inputSchema: {
|
|
2432
|
-
type: "object",
|
|
2433
|
-
properties: {
|
|
2434
|
-
query: { type: "string", description: "Search query" },
|
|
2435
|
-
sessionKey: { type: "string", description: "Optional session filter" },
|
|
2436
|
-
sessionPrefix: { type: "string", description: "Optional session prefix filter" },
|
|
2437
|
-
namespace: { type: "string" },
|
|
2438
|
-
limit: { type: "number", description: "Max results to return" }
|
|
2439
|
-
},
|
|
2440
|
-
required: ["query"],
|
|
2441
|
-
additionalProperties: false
|
|
2442
|
-
}
|
|
2443
|
-
},
|
|
2444
|
-
{
|
|
2445
|
-
name: "engram.lcm_compaction_flush",
|
|
2446
|
-
description: "Flush pending LCM observe work and incremental summaries before a host compacts session context.",
|
|
2447
|
-
inputSchema: {
|
|
2448
|
-
type: "object",
|
|
2449
|
-
properties: {
|
|
2450
|
-
sessionKey: { type: "string", description: "Conversation session identifier" },
|
|
2451
|
-
namespace: { type: "string" },
|
|
2452
|
-
cwd: { type: "string", description: "Working directory for auto git-context resolution." },
|
|
2453
|
-
projectTag: { type: "string", description: "Project tag for non-git project scoping." }
|
|
2454
|
-
},
|
|
2455
|
-
required: ["sessionKey"],
|
|
2456
|
-
additionalProperties: false
|
|
2457
|
-
}
|
|
2458
|
-
},
|
|
2459
|
-
{
|
|
2460
|
-
name: "engram.extraction_force_flush",
|
|
2461
|
-
description: "Force-drain a session extraction buffer before a lifecycle boundary.",
|
|
2462
|
-
inputSchema: {
|
|
2463
|
-
type: "object",
|
|
2464
|
-
properties: {
|
|
2465
|
-
sessionKey: { type: "string", description: "Conversation session identifier" },
|
|
2466
|
-
namespace: { type: "string" },
|
|
2467
|
-
cwd: { type: "string", description: "Working directory for auto git-context resolution." },
|
|
2468
|
-
projectTag: { type: "string", description: "Project tag for non-git project scoping." },
|
|
2469
|
-
deadlineMs: { type: "number", minimum: 0 }
|
|
2470
|
-
},
|
|
2471
|
-
required: ["sessionKey"],
|
|
2472
|
-
additionalProperties: false
|
|
2473
|
-
}
|
|
2474
|
-
},
|
|
2475
|
-
{
|
|
2476
|
-
name: "engram.lcm_compaction_record",
|
|
2477
|
-
description: "Record a host compaction event with before/after token counts in the LCM archive.",
|
|
2478
|
-
inputSchema: {
|
|
2479
|
-
type: "object",
|
|
2480
|
-
properties: {
|
|
2481
|
-
sessionKey: { type: "string", description: "Conversation session identifier" },
|
|
2482
|
-
namespace: { type: "string" },
|
|
2483
|
-
tokensBefore: { type: "integer", minimum: 0 },
|
|
2484
|
-
tokensAfter: { type: "integer", minimum: 0 }
|
|
2485
|
-
},
|
|
2486
|
-
required: ["sessionKey", "tokensBefore", "tokensAfter"],
|
|
2487
|
-
additionalProperties: false
|
|
2488
|
-
}
|
|
2489
|
-
},
|
|
2490
|
-
// ── Continuity / Identity tools ─────────────────────────────────────
|
|
2491
|
-
{
|
|
2492
|
-
name: "engram.continuity_audit_generate",
|
|
2493
|
-
description: "Generate a deterministic identity continuity audit report (weekly/monthly).",
|
|
2494
|
-
inputSchema: {
|
|
2495
|
-
type: "object",
|
|
2496
|
-
properties: {
|
|
2497
|
-
period: { type: "string", enum: ["weekly", "monthly"] },
|
|
2498
|
-
key: {
|
|
2499
|
-
type: "string",
|
|
2500
|
-
description: "Period key (weekly: YYYY-Www, monthly: YYYY-MM). Defaults to current."
|
|
2501
|
-
}
|
|
2502
|
-
},
|
|
2503
|
-
additionalProperties: false
|
|
2504
|
-
}
|
|
2505
|
-
},
|
|
2506
|
-
{
|
|
2507
|
-
name: "engram.continuity_incident_open",
|
|
2508
|
-
description: "Create a new continuity incident record in append-only storage.",
|
|
2509
|
-
inputSchema: {
|
|
2510
|
-
type: "object",
|
|
2511
|
-
properties: {
|
|
2512
|
-
symptom: { type: "string", description: "Observed continuity failure symptom." },
|
|
2513
|
-
namespace: { type: "string" },
|
|
2514
|
-
triggerWindow: { type: "string", description: "Time window when incident occurred." },
|
|
2515
|
-
suspectedCause: { type: "string" }
|
|
2516
|
-
},
|
|
2517
|
-
required: ["symptom"],
|
|
2518
|
-
additionalProperties: false
|
|
2519
|
-
}
|
|
2520
|
-
},
|
|
2521
|
-
{
|
|
2522
|
-
name: "engram.continuity_incident_close",
|
|
2523
|
-
description: "Close an open continuity incident with verification details.",
|
|
2524
|
-
inputSchema: {
|
|
2525
|
-
type: "object",
|
|
2526
|
-
properties: {
|
|
2527
|
-
id: { type: "string", description: "Incident ID to close." },
|
|
2528
|
-
namespace: { type: "string" },
|
|
2529
|
-
fixApplied: { type: "string", description: "What fix was applied." },
|
|
2530
|
-
verificationResult: { type: "string", description: "How closure was verified." },
|
|
2531
|
-
preventiveRule: { type: "string", description: "Optional preventive follow-up rule." }
|
|
2532
|
-
},
|
|
2533
|
-
required: ["id", "fixApplied", "verificationResult"],
|
|
2534
|
-
additionalProperties: false
|
|
2535
|
-
}
|
|
2536
|
-
},
|
|
2537
|
-
{
|
|
2538
|
-
name: "engram.continuity_incident_list",
|
|
2539
|
-
description: "List continuity incidents, optionally filtered by state.",
|
|
2540
|
-
inputSchema: {
|
|
2541
|
-
type: "object",
|
|
2542
|
-
properties: {
|
|
2543
|
-
state: { type: "string", enum: ["open", "closed", "all"] },
|
|
2544
|
-
namespace: { type: "string" },
|
|
2545
|
-
limit: { type: "number", description: "Max incidents (default 25, max 200)." }
|
|
2546
|
-
},
|
|
2547
|
-
additionalProperties: false
|
|
2548
|
-
}
|
|
2549
|
-
},
|
|
2550
|
-
{
|
|
2551
|
-
name: "engram.continuity_loop_add_or_update",
|
|
2552
|
-
description: "Add or update a continuity improvement loop entry.",
|
|
2553
|
-
inputSchema: {
|
|
2554
|
-
type: "object",
|
|
2555
|
-
properties: {
|
|
2556
|
-
id: { type: "string", description: "Stable loop identifier." },
|
|
2557
|
-
cadence: { type: "string", enum: ["daily", "weekly", "monthly", "quarterly"] },
|
|
2558
|
-
purpose: { type: "string", description: "What this recurring loop improves." },
|
|
2559
|
-
status: { type: "string", enum: ["active", "paused", "retired"] },
|
|
2560
|
-
killCondition: { type: "string", description: "Clear condition for retiring this loop." },
|
|
2561
|
-
namespace: { type: "string" },
|
|
2562
|
-
lastReviewed: { type: "string", description: "ISO timestamp for last review." },
|
|
2563
|
-
notes: { type: "string" }
|
|
2564
|
-
},
|
|
2565
|
-
required: ["id", "cadence", "purpose", "status", "killCondition"],
|
|
2566
|
-
additionalProperties: false
|
|
2567
|
-
}
|
|
2568
|
-
},
|
|
2569
|
-
{
|
|
2570
|
-
name: "engram.continuity_loop_review",
|
|
2571
|
-
description: "Update review metadata for an existing continuity improvement loop.",
|
|
2572
|
-
inputSchema: {
|
|
2573
|
-
type: "object",
|
|
2574
|
-
properties: {
|
|
2575
|
-
id: { type: "string", description: "Loop ID to review." },
|
|
2576
|
-
namespace: { type: "string" },
|
|
2577
|
-
status: { type: "string", enum: ["active", "paused", "retired"] },
|
|
2578
|
-
notes: { type: "string" },
|
|
2579
|
-
reviewedAt: { type: "string", description: "ISO timestamp for review event." }
|
|
2580
|
-
},
|
|
2581
|
-
required: ["id"],
|
|
2582
|
-
additionalProperties: false
|
|
2583
|
-
}
|
|
2584
|
-
},
|
|
2585
|
-
{
|
|
2586
|
-
name: "engram.identity_anchor_get",
|
|
2587
|
-
description: "Read the identity continuity anchor document (recovery-safe identity context).",
|
|
2588
|
-
inputSchema: {
|
|
2589
|
-
type: "object",
|
|
2590
|
-
properties: {
|
|
2591
|
-
namespace: { type: "string" }
|
|
2592
|
-
},
|
|
2593
|
-
additionalProperties: false
|
|
2594
|
-
}
|
|
2595
|
-
},
|
|
2596
|
-
{
|
|
2597
|
-
name: "engram.identity_anchor_update",
|
|
2598
|
-
description: "Conservatively merge identity anchor sections without overwriting existing material.",
|
|
2599
|
-
inputSchema: {
|
|
2600
|
-
type: "object",
|
|
2601
|
-
properties: {
|
|
2602
|
-
namespace: { type: "string" },
|
|
2603
|
-
identityTraits: { type: "string", description: "Updates for 'Identity Traits' section." },
|
|
2604
|
-
communicationPreferences: {
|
|
2605
|
-
type: "string",
|
|
2606
|
-
description: "Updates for 'Communication Preferences' section."
|
|
2607
|
-
},
|
|
2608
|
-
operatingPrinciples: { type: "string", description: "Updates for 'Operating Principles' section." },
|
|
2609
|
-
continuityNotes: { type: "string", description: "Updates for 'Continuity Notes' section." }
|
|
2610
|
-
},
|
|
2611
|
-
additionalProperties: false
|
|
2612
|
-
}
|
|
2613
|
-
},
|
|
2614
|
-
{
|
|
2615
|
-
name: "engram.memory_identity",
|
|
2616
|
-
description: "Read the agent's identity reflections from the workspace IDENTITY.md file.",
|
|
2617
|
-
inputSchema: {
|
|
2618
|
-
type: "object",
|
|
2619
|
-
properties: {
|
|
2620
|
-
namespace: { type: "string" }
|
|
2621
|
-
},
|
|
2622
|
-
additionalProperties: false
|
|
2623
|
-
}
|
|
2624
|
-
},
|
|
2625
|
-
// ── Work Layer tools ─────────────────────────────────────────────────
|
|
2626
|
-
{
|
|
2627
|
-
name: "engram.work_task",
|
|
2628
|
-
description: "Manage work-layer tasks (create, get, list, update, transition, delete). Excluded from memory extraction.",
|
|
2629
|
-
inputSchema: {
|
|
2630
|
-
type: "object",
|
|
2631
|
-
properties: {
|
|
2632
|
-
action: { type: "string", enum: ["create", "get", "list", "update", "transition", "delete"] },
|
|
2633
|
-
id: { type: "string" },
|
|
2634
|
-
title: { type: "string" },
|
|
2635
|
-
description: { type: "string" },
|
|
2636
|
-
status: { type: "string", enum: ["todo", "in_progress", "blocked", "done", "cancelled"] },
|
|
2637
|
-
priority: { type: "string", enum: ["low", "medium", "high"] },
|
|
2638
|
-
owner: { type: "string" },
|
|
2639
|
-
assignee: { type: "string" },
|
|
2640
|
-
projectId: { type: "string" },
|
|
2641
|
-
tags: { type: "array", items: { type: "string" } },
|
|
2642
|
-
dueAt: { type: "string" }
|
|
2643
|
-
},
|
|
2644
|
-
required: ["action"],
|
|
2645
|
-
additionalProperties: false
|
|
2646
|
-
}
|
|
2647
|
-
},
|
|
2648
|
-
{
|
|
2649
|
-
name: "engram.work_project",
|
|
2650
|
-
description: "Manage work-layer projects (create, get, list, update, delete, link_task). Excluded from memory extraction.",
|
|
2651
|
-
inputSchema: {
|
|
2652
|
-
type: "object",
|
|
2653
|
-
properties: {
|
|
2654
|
-
action: { type: "string", enum: ["create", "get", "list", "update", "delete", "link_task"] },
|
|
2655
|
-
id: { type: "string" },
|
|
2656
|
-
name: { type: "string" },
|
|
2657
|
-
description: { type: "string" },
|
|
2658
|
-
status: { type: "string", enum: ["active", "on_hold", "completed", "archived"] },
|
|
2659
|
-
owner: { type: "string" },
|
|
2660
|
-
tags: { type: "array", items: { type: "string" } },
|
|
2661
|
-
taskId: { type: "string", description: "Task ID for link_task." },
|
|
2662
|
-
projectId: { type: "string", description: "Project ID for link_task." }
|
|
2663
|
-
},
|
|
2664
|
-
required: ["action"],
|
|
2665
|
-
additionalProperties: false
|
|
2666
|
-
}
|
|
2667
|
-
},
|
|
2668
|
-
{
|
|
2669
|
-
name: "engram.work_board",
|
|
2670
|
-
description: "Export/import work-layer board snapshots and markdown.",
|
|
2671
|
-
inputSchema: {
|
|
2672
|
-
type: "object",
|
|
2673
|
-
properties: {
|
|
2674
|
-
action: { type: "string", enum: ["export_markdown", "export_snapshot", "import_snapshot"] },
|
|
2675
|
-
projectId: { type: "string" },
|
|
2676
|
-
snapshotJson: { type: "string", description: "Snapshot JSON for import_snapshot." },
|
|
2677
|
-
linkToMemory: { type: "boolean", description: "If true, output can be retained as long-term memory." }
|
|
2678
|
-
},
|
|
2679
|
-
required: ["action"],
|
|
2680
|
-
additionalProperties: false
|
|
2681
|
-
}
|
|
2682
|
-
},
|
|
2683
|
-
// ── Shared Context tools (extracted; access-mcp.ts is at its ratchet
|
|
2684
|
-
// ceiling — issue #2920) ─────────────────────────────────────────
|
|
2685
|
-
...sharedContextMcpTools,
|
|
2686
|
-
{
|
|
2687
|
-
name: "engram.compounding_weekly_synthesize",
|
|
2688
|
-
description: "Generate weekly compounding outputs: reports, mistake registry, rubrics, and promotion candidates.",
|
|
2689
|
-
inputSchema: {
|
|
2690
|
-
type: "object",
|
|
2691
|
-
properties: {
|
|
2692
|
-
weekId: { type: "string", description: "ISO week ID (YYYY-Www). Defaults to current week." }
|
|
2693
|
-
},
|
|
2694
|
-
additionalProperties: false
|
|
2695
|
-
}
|
|
2696
|
-
},
|
|
2697
|
-
{
|
|
2698
|
-
name: "engram.compounding_promote_candidate",
|
|
2699
|
-
description: "Promote a compounding candidate from weekly report into durable rule/principle memory.",
|
|
2700
|
-
inputSchema: {
|
|
2701
|
-
type: "object",
|
|
2702
|
-
properties: {
|
|
2703
|
-
weekId: { type: "string" },
|
|
2704
|
-
candidateId: { type: "string" },
|
|
2705
|
-
dryRun: { type: "boolean", description: "Preview without writing." }
|
|
2706
|
-
},
|
|
2707
|
-
required: ["weekId", "candidateId"],
|
|
2708
|
-
additionalProperties: false
|
|
2709
|
-
}
|
|
2710
|
-
},
|
|
2711
|
-
// ── Compression Guidelines tools ────────────────────────────────────
|
|
2712
|
-
{
|
|
2713
|
-
name: "engram.compression_guidelines_optimize",
|
|
2714
|
-
description: "Run compression guideline optimizer, optionally persisting new guidelines.",
|
|
2715
|
-
inputSchema: {
|
|
2716
|
-
type: "object",
|
|
2717
|
-
properties: {
|
|
2718
|
-
dryRun: { type: "boolean" },
|
|
2719
|
-
eventLimit: { type: "number" }
|
|
2720
|
-
},
|
|
2721
|
-
additionalProperties: false
|
|
2722
|
-
}
|
|
2723
|
-
},
|
|
2724
|
-
{
|
|
2725
|
-
name: "engram.compression_guidelines_activate",
|
|
2726
|
-
description: "Promote staged compression guideline draft to active (after review).",
|
|
2727
|
-
inputSchema: {
|
|
2728
|
-
type: "object",
|
|
2729
|
-
properties: {
|
|
2730
|
-
expectedContentHash: { type: "string" },
|
|
2731
|
-
expectedGuidelineVersion: { type: "number" }
|
|
2732
|
-
},
|
|
2733
|
-
additionalProperties: false
|
|
2734
|
-
}
|
|
2735
|
-
},
|
|
2736
|
-
...EXTERNAL_WIKI_MCP_TOOLS,
|
|
2737
|
-
{
|
|
2738
|
-
name: "engram.memory_search",
|
|
2739
|
-
description: "Direct semantic search over memory files using the QMD index. Returns matching memories with relevance scores.",
|
|
2740
|
-
inputSchema: {
|
|
2741
|
-
type: "object",
|
|
2742
|
-
properties: {
|
|
2743
|
-
query: { type: "string" },
|
|
2744
|
-
namespace: { type: "string" },
|
|
2745
|
-
maxResults: { type: "number" },
|
|
2746
|
-
collection: {
|
|
2747
|
-
type: "string",
|
|
2748
|
-
description: "QMD collection. With namespaces enabled, omitted, base, and 'global' searches stay scoped to readable namespaces; namespace-derived collections require matching namespace access."
|
|
2749
|
-
},
|
|
2750
|
-
mode: { type: "string", enum: ["search", "hybrid", "bm25", "vector"], description: "Ranking mode; omitted uses the backend default. Not supported with 'collection' on a flat corpus." }
|
|
2751
|
-
},
|
|
2752
|
-
required: ["query"],
|
|
2753
|
-
additionalProperties: false
|
|
2754
|
-
}
|
|
2755
|
-
},
|
|
2756
|
-
{
|
|
2757
|
-
name: "engram.memory_profile",
|
|
2758
|
-
description: "Read the user's behavioral profile \u2014 a living document of their preferences, habits, and personality.",
|
|
2759
|
-
inputSchema: {
|
|
2760
|
-
type: "object",
|
|
2761
|
-
properties: { namespace: { type: "string" } },
|
|
2762
|
-
additionalProperties: false
|
|
2763
|
-
}
|
|
2764
|
-
},
|
|
2765
|
-
{
|
|
2766
|
-
name: "engram.memory_entities_list",
|
|
2767
|
-
description: "List all tracked entities (people, projects, tools, companies).",
|
|
2768
|
-
inputSchema: {
|
|
2769
|
-
type: "object",
|
|
2770
|
-
properties: { namespace: { type: "string" } },
|
|
2771
|
-
additionalProperties: false
|
|
2772
|
-
}
|
|
2773
|
-
},
|
|
2774
|
-
{
|
|
2775
|
-
name: "engram.memory_questions",
|
|
2776
|
-
description: "List open questions the system is curious about from past conversations.",
|
|
2777
|
-
inputSchema: {
|
|
2778
|
-
type: "object",
|
|
2779
|
-
properties: { namespace: { type: "string" } },
|
|
2780
|
-
additionalProperties: false
|
|
2781
|
-
}
|
|
2782
|
-
},
|
|
2783
|
-
{
|
|
2784
|
-
name: "engram.memory_last_recall",
|
|
2785
|
-
description: "Return the last recall snapshot for a session (debug introspection).",
|
|
2786
|
-
inputSchema: {
|
|
2787
|
-
type: "object",
|
|
2788
|
-
properties: { sessionKey: { type: "string" } },
|
|
2789
|
-
additionalProperties: false
|
|
2790
|
-
}
|
|
2791
|
-
},
|
|
2792
|
-
{
|
|
2793
|
-
name: "engram.memory_intent_debug",
|
|
2794
|
-
description: "Return the last intent classification debug snapshot.",
|
|
2795
|
-
inputSchema: {
|
|
2796
|
-
type: "object",
|
|
2797
|
-
properties: { namespace: { type: "string" } },
|
|
2798
|
-
additionalProperties: false
|
|
2799
|
-
}
|
|
2800
|
-
},
|
|
2801
|
-
{
|
|
2802
|
-
name: "engram.memory_qmd_debug",
|
|
2803
|
-
description: "Return QMD search index debug information from the last recall.",
|
|
2804
|
-
inputSchema: {
|
|
2805
|
-
type: "object",
|
|
2806
|
-
properties: { namespace: { type: "string" } },
|
|
2807
|
-
additionalProperties: false
|
|
2808
|
-
}
|
|
2809
|
-
},
|
|
2810
|
-
{
|
|
2811
|
-
name: "engram.memory_graph_explain",
|
|
2812
|
-
description: "Explain the last entity graph recall \u2014 which entities were activated and why.",
|
|
2813
|
-
inputSchema: {
|
|
2814
|
-
type: "object",
|
|
2815
|
-
properties: { namespace: { type: "string" } },
|
|
2816
|
-
additionalProperties: false
|
|
2817
|
-
}
|
|
2818
|
-
},
|
|
2819
|
-
{
|
|
2820
|
-
// Graph snapshot for the admin pane (issue #691 PR 2/5). Returns
|
|
2821
|
-
// a read-only `{ nodes, edges, generatedAt }` view of the
|
|
2822
|
-
// multi-graph adjacency, with the same filter knobs as the HTTP
|
|
2823
|
-
// surface so connectors / CLI clients can hit either endpoint
|
|
2824
|
-
// interchangeably.
|
|
2825
|
-
name: "engram.graph_snapshot",
|
|
2826
|
-
description: "Return a read-only graph snapshot (nodes + edges) for the admin pane. Filters: limit (default 500, max 5000), since (ISO timestamp), focusNodeId (restricts to neighborhood), categories (allow-list of memory categories).",
|
|
2827
|
-
inputSchema: {
|
|
2828
|
-
type: "object",
|
|
2829
|
-
properties: {
|
|
2830
|
-
namespace: { type: "string" },
|
|
2831
|
-
limit: { type: "number", description: "Maximum number of edges to return (default 500, max 5000)." },
|
|
2832
|
-
since: { type: "string", description: "Inclusive lower bound on edge timestamp (ISO-8601)." },
|
|
2833
|
-
focusNodeId: {
|
|
2834
|
-
type: "string",
|
|
2835
|
-
description: "When set, restrict the snapshot to the focus node and its neighbors."
|
|
2836
|
-
},
|
|
2837
|
-
categories: {
|
|
2838
|
-
type: "array",
|
|
2839
|
-
items: { type: "string" },
|
|
2840
|
-
description: "Optional category allow-list (e.g. ['fact', 'decision'])."
|
|
2841
|
-
}
|
|
2842
|
-
},
|
|
2843
|
-
additionalProperties: false
|
|
2844
|
-
}
|
|
2845
|
-
},
|
|
2846
|
-
{
|
|
2847
|
-
name: "engram.memory_feedback",
|
|
2848
|
-
description: "Record relevance feedback (thumbs up/down) for a specific memory.",
|
|
2849
|
-
inputSchema: {
|
|
2850
|
-
type: "object",
|
|
2851
|
-
properties: {
|
|
2852
|
-
memoryId: { type: "string" },
|
|
2853
|
-
vote: { type: "string", enum: ["up", "down"] },
|
|
2854
|
-
note: { type: "string" }
|
|
2855
|
-
},
|
|
2856
|
-
required: ["memoryId", "vote"],
|
|
2857
|
-
additionalProperties: false
|
|
2858
|
-
}
|
|
2859
|
-
},
|
|
2860
|
-
{
|
|
2861
|
-
name: "engram.memory_promote",
|
|
2862
|
-
description: "Promote a memory's lifecycle state (e.g. from draft to active).",
|
|
2863
|
-
inputSchema: {
|
|
2864
|
-
type: "object",
|
|
2865
|
-
properties: {
|
|
2866
|
-
memoryId: { type: "string" },
|
|
2867
|
-
namespace: { type: "string" },
|
|
2868
|
-
sessionKey: { type: "string" }
|
|
2869
|
-
},
|
|
2870
|
-
required: ["memoryId"],
|
|
2871
|
-
additionalProperties: false
|
|
2872
|
-
}
|
|
2873
|
-
},
|
|
2874
|
-
// Memory Worth outcome signal (issue #560 PR 3). Callers record whether
|
|
2875
|
-
// a session that used a given memory ultimately succeeded or failed;
|
|
2876
|
-
// the counter is persisted in the memory's frontmatter (mw_success /
|
|
2877
|
-
// mw_fail) and will feed the recall-time filter added in PR 4.
|
|
2878
|
-
{
|
|
2879
|
-
name: "engram.memory_outcome",
|
|
2880
|
-
description: "Record a Memory Worth outcome (success/failure) for a memory. Increments mw_success or mw_fail in the memory's frontmatter for use by the recall filter.",
|
|
2881
|
-
inputSchema: {
|
|
2882
|
-
type: "object",
|
|
2883
|
-
properties: {
|
|
2884
|
-
memoryId: { type: "string" },
|
|
2885
|
-
outcome: { type: "string", enum: ["success", "failure"] },
|
|
2886
|
-
namespace: { type: "string" },
|
|
2887
|
-
sessionKey: { type: "string" },
|
|
2888
|
-
timestamp: { type: "string", description: "Optional ISO-8601 timestamp of the observation." }
|
|
2889
|
-
},
|
|
2890
|
-
required: ["memoryId", "outcome"],
|
|
2891
|
-
additionalProperties: false
|
|
2892
|
-
}
|
|
2893
|
-
},
|
|
2894
|
-
{
|
|
2895
|
-
name: "engram.memory_action_apply",
|
|
2896
|
-
description: "Record a memory-action application event for policy-learning telemetry.",
|
|
2897
|
-
inputSchema: {
|
|
2898
|
-
type: "object",
|
|
2899
|
-
properties: {
|
|
2900
|
-
action: {
|
|
2901
|
-
type: "string",
|
|
2902
|
-
enum: [
|
|
2903
|
-
"store_episode",
|
|
2904
|
-
"store_note",
|
|
2905
|
-
"update_note",
|
|
2906
|
-
"create_artifact",
|
|
2907
|
-
"summarize_node",
|
|
2908
|
-
"discard",
|
|
2909
|
-
"link_graph"
|
|
2910
|
-
]
|
|
2911
|
-
},
|
|
2912
|
-
category: { type: "string" },
|
|
2913
|
-
content: { type: "string" },
|
|
2914
|
-
outcome: { type: "string", enum: ["applied", "skipped", "failed"] },
|
|
2915
|
-
reason: { type: "string" },
|
|
2916
|
-
memoryId: { type: "string" },
|
|
2917
|
-
sessionKey: { type: "string" },
|
|
2918
|
-
linkTargetId: { type: "string" },
|
|
2919
|
-
linkType: { type: "string" },
|
|
2920
|
-
linkStrength: { type: "number" },
|
|
2921
|
-
artifactType: { type: "string" },
|
|
2922
|
-
execute: { type: "boolean" },
|
|
2923
|
-
sourcePrompt: { type: "string" },
|
|
2924
|
-
namespace: { type: "string" },
|
|
2925
|
-
dryRun: { type: "boolean" }
|
|
2926
|
-
},
|
|
2927
|
-
required: ["action"],
|
|
2928
|
-
additionalProperties: false
|
|
2929
|
-
}
|
|
2930
|
-
},
|
|
2931
|
-
{
|
|
2932
|
-
name: "engram.context_checkpoint",
|
|
2933
|
-
description: "Save a structured context checkpoint for a session (preserves conversation state to disk).",
|
|
2934
|
-
inputSchema: {
|
|
2935
|
-
type: "object",
|
|
2936
|
-
properties: {
|
|
2937
|
-
sessionKey: { type: "string" },
|
|
2938
|
-
context: { type: "string", description: "Context content to checkpoint" },
|
|
2939
|
-
namespace: { type: "string" }
|
|
2940
|
-
},
|
|
2941
|
-
required: ["sessionKey", "context"],
|
|
2942
|
-
additionalProperties: false
|
|
2943
|
-
}
|
|
2944
|
-
},
|
|
2945
|
-
// ── Daily Context Briefing (#370) ───────────────────────────────────
|
|
2946
|
-
// Uses the legacy "engram.*" prefix like every other tool in this array;
|
|
2947
|
-
// withToolAliases (applied via .flatMap below) generates the canonical
|
|
2948
|
-
// "remnic.briefing" alias automatically.
|
|
2949
|
-
...service.briefingEnabled ? [
|
|
2950
|
-
{
|
|
2951
|
-
name: "engram.briefing",
|
|
2952
|
-
description: "Generate a daily context briefing by cross-referencing active entities, recent facts, open commitments, and optional calendar events.",
|
|
2953
|
-
inputSchema: {
|
|
2954
|
-
type: "object",
|
|
2955
|
-
properties: {
|
|
2956
|
-
since: { type: "string", description: "Lookback window (e.g. 'yesterday', '3d', '1w', '24h')." },
|
|
2957
|
-
focus: { type: "string", description: "Optional focus filter (e.g. 'person:Jane Doe', 'project:remnic-core', 'topic:retrieval')." },
|
|
2958
|
-
namespace: { type: "string" },
|
|
2959
|
-
includeLocation: { type: "boolean", description: "Opt-in: append matched location place names (location gates apply)." },
|
|
2960
|
-
format: { type: "string", enum: ["markdown", "json"] },
|
|
2961
|
-
maxFollowups: {
|
|
2962
|
-
type: "number",
|
|
2963
|
-
description: "Maximum LLM-suggested follow-ups (0 disables that section)."
|
|
2964
|
-
}
|
|
2965
|
-
},
|
|
2966
|
-
additionalProperties: false
|
|
2967
|
-
}
|
|
2968
|
-
}
|
|
2969
|
-
] : [],
|
|
2970
|
-
// ── Contradiction Review (issue #520) ────────────────────────────────
|
|
2971
|
-
{
|
|
2972
|
-
name: "engram.review_list",
|
|
2973
|
-
description: "List contradiction review items pending user resolution.",
|
|
2974
|
-
inputSchema: {
|
|
2975
|
-
type: "object",
|
|
2976
|
-
properties: {
|
|
2977
|
-
filter: {
|
|
2978
|
-
type: "string",
|
|
2979
|
-
enum: ["all", "unresolved", "contradicts", "independent", "duplicates", "needs-user"],
|
|
2980
|
-
description: "Filter by verdict type. Default: unresolved."
|
|
2981
|
-
},
|
|
2982
|
-
namespace: { type: "string" },
|
|
2983
|
-
limit: { type: "number", description: "Max items to return (default 50)." }
|
|
2984
|
-
},
|
|
2985
|
-
additionalProperties: false
|
|
2986
|
-
}
|
|
2987
|
-
},
|
|
2988
|
-
{
|
|
2989
|
-
name: "engram.review_resolve",
|
|
2990
|
-
description: "Resolve a contradiction pair with a chosen verb.",
|
|
2991
|
-
inputSchema: {
|
|
2992
|
-
type: "object",
|
|
2993
|
-
properties: {
|
|
2994
|
-
pairId: { type: "string", description: "The contradiction pair ID to resolve." },
|
|
2995
|
-
verb: {
|
|
2996
|
-
type: "string",
|
|
2997
|
-
enum: ["keep-a", "keep-b", "merge", "both-valid", "needs-more-context"],
|
|
2998
|
-
description: "Resolution action."
|
|
2999
|
-
},
|
|
3000
|
-
mergedMemoryId: { type: "string", description: "Existing merged memory ID to use when verb is merge." },
|
|
3001
|
-
mergedContent: { type: "string", description: "Content for a new merged memory when verb is merge." }
|
|
3002
|
-
},
|
|
3003
|
-
required: ["pairId", "verb"],
|
|
3004
|
-
additionalProperties: false
|
|
3005
|
-
}
|
|
3006
|
-
},
|
|
3007
|
-
{
|
|
3008
|
-
name: "engram.contradiction_scan_run",
|
|
3009
|
-
description: "Run an on-demand contradiction scan over the memory corpus.",
|
|
3010
|
-
inputSchema: {
|
|
3011
|
-
type: "object",
|
|
3012
|
-
properties: {
|
|
3013
|
-
namespace: { type: "string" }
|
|
3014
|
-
},
|
|
3015
|
-
additionalProperties: false
|
|
3016
|
-
}
|
|
3017
|
-
},
|
|
3018
|
-
{
|
|
3019
|
-
name: "engram.memory_summarize_hourly",
|
|
3020
|
-
description: "Generate hourly summaries for recent conversations.",
|
|
3021
|
-
inputSchema: {
|
|
3022
|
-
type: "object",
|
|
3023
|
-
properties: {},
|
|
3024
|
-
additionalProperties: false
|
|
3025
|
-
}
|
|
3026
|
-
},
|
|
3027
|
-
{
|
|
3028
|
-
name: "engram.conversation_index_update",
|
|
3029
|
-
description: "Chunk transcript history into conversation-index documents.",
|
|
3030
|
-
inputSchema: {
|
|
3031
|
-
type: "object",
|
|
3032
|
-
properties: {
|
|
3033
|
-
sessionKey: { type: "string" },
|
|
3034
|
-
hours: { type: "number", description: "How many hours of transcript history to include." },
|
|
3035
|
-
embed: { type: "boolean", description: "If true, run QMD embed after update for this invocation." }
|
|
3036
|
-
},
|
|
3037
|
-
additionalProperties: false
|
|
3038
|
-
}
|
|
3039
|
-
},
|
|
3040
|
-
{
|
|
3041
|
-
name: "engram.profiling_report",
|
|
3042
|
-
description: "Return timing and performance data for Remnic recall and extraction pipelines. Requires profilingEnabled: true.",
|
|
3043
|
-
inputSchema: {
|
|
3044
|
-
type: "object",
|
|
3045
|
-
properties: {
|
|
3046
|
-
format: {
|
|
3047
|
-
type: "string",
|
|
3048
|
-
enum: ["ascii", "json"],
|
|
3049
|
-
description: "Output format. Defaults to ascii."
|
|
3050
|
-
},
|
|
3051
|
-
limit: {
|
|
3052
|
-
type: "integer",
|
|
3053
|
-
minimum: 1,
|
|
3054
|
-
maximum: 20,
|
|
3055
|
-
description: "Number of recent traces to include. Defaults to 5."
|
|
3056
|
-
}
|
|
3057
|
-
},
|
|
3058
|
-
additionalProperties: false
|
|
3059
|
-
}
|
|
3060
|
-
},
|
|
3061
|
-
{
|
|
3062
|
-
name: "engram.graph_edge_decay_run",
|
|
3063
|
-
description: "Run the graph-edge-confidence decay maintenance pass (issue #681 PR 2/3). Respects graphEdgeDecayEnabled; writes a structured telemetry record to state/graph-edge-decay-status.json.",
|
|
3064
|
-
inputSchema: {
|
|
3065
|
-
type: "object",
|
|
3066
|
-
properties: {
|
|
3067
|
-
dryRun: { type: "boolean" }
|
|
3068
|
-
},
|
|
3069
|
-
additionalProperties: false
|
|
3070
|
-
}
|
|
3071
|
-
},
|
|
3072
|
-
{
|
|
3073
|
-
name: "engram.live_connectors_run",
|
|
3074
|
-
description: "Run due live connectors once. Used by the live-connector cron and available for operator-triggered sync checks.",
|
|
3075
|
-
inputSchema: {
|
|
3076
|
-
type: "object",
|
|
3077
|
-
properties: {
|
|
3078
|
-
force: {
|
|
3079
|
-
type: "boolean",
|
|
3080
|
-
description: "When true, run enabled connectors even if their poll interval has not elapsed."
|
|
3081
|
-
}
|
|
3082
|
-
},
|
|
3083
|
-
additionalProperties: false
|
|
3084
|
-
}
|
|
3085
|
-
},
|
|
3086
|
-
// ── Peer Registry tools (issue #679 PR 4/5) ─────────────────────────
|
|
3087
|
-
{
|
|
3088
|
-
name: "engram.peer_list",
|
|
3089
|
-
description: "List all registered peers in the peer registry (issue #679). Returns an array of peer identity records sorted alphabetically by id.",
|
|
3090
|
-
inputSchema: {
|
|
3091
|
-
type: "object",
|
|
3092
|
-
properties: {},
|
|
3093
|
-
additionalProperties: false
|
|
3094
|
-
}
|
|
3095
|
-
},
|
|
3096
|
-
{
|
|
3097
|
-
name: "engram.peer_get",
|
|
3098
|
-
description: "Get a single peer by id. Returns the peer's identity record or { found: false } when not found (issue #679).",
|
|
3099
|
-
inputSchema: {
|
|
3100
|
-
type: "object",
|
|
3101
|
-
properties: {
|
|
3102
|
-
id: { type: "string", description: "Peer id to look up." }
|
|
3103
|
-
},
|
|
3104
|
-
required: ["id"],
|
|
3105
|
-
additionalProperties: false
|
|
3106
|
-
}
|
|
3107
|
-
},
|
|
3108
|
-
{
|
|
3109
|
-
name: "engram.peer_set",
|
|
3110
|
-
description: "Create or update a peer identity record (issue #679). On first write, creates the peer with the given kind (default 'human'). On subsequent writes, updates displayName and/or notes; kind and createdAt are immutable.",
|
|
3111
|
-
inputSchema: {
|
|
3112
|
-
type: "object",
|
|
3113
|
-
properties: {
|
|
3114
|
-
id: { type: "string", description: "Peer id \u2014 must match PEER_ID_PATTERN." },
|
|
3115
|
-
kind: {
|
|
3116
|
-
type: "string",
|
|
3117
|
-
enum: ["self", "human", "agent", "integration"],
|
|
3118
|
-
description: "Kind of peer. Required on first write; ignored on updates."
|
|
3119
|
-
},
|
|
3120
|
-
displayName: { type: "string", description: "Human-readable display name." },
|
|
3121
|
-
notes: { type: "string", description: "Optional free-form markdown notes." }
|
|
3122
|
-
},
|
|
3123
|
-
required: ["id"],
|
|
3124
|
-
additionalProperties: false
|
|
3125
|
-
}
|
|
3126
|
-
},
|
|
3127
|
-
{
|
|
3128
|
-
name: "engram.peer_delete",
|
|
3129
|
-
description: "Delete a peer's identity record (issue #679). Idempotent \u2014 succeeds even if the peer does not exist. The peer directory is preserved so profile and interaction-log data are not destroyed.",
|
|
3130
|
-
inputSchema: {
|
|
3131
|
-
type: "object",
|
|
3132
|
-
properties: {
|
|
3133
|
-
id: { type: "string", description: "Peer id to delete." }
|
|
3134
|
-
},
|
|
3135
|
-
required: ["id"],
|
|
3136
|
-
additionalProperties: false
|
|
3137
|
-
}
|
|
3138
|
-
},
|
|
3139
|
-
{
|
|
3140
|
-
name: "engram.peer_profile_get",
|
|
3141
|
-
description: "Get the evolving cognitive profile for a peer (issue #679). Returns the profile written by the async reasoner (PR 2/5), or { found: false } if no profile has been generated yet.",
|
|
3142
|
-
inputSchema: {
|
|
3143
|
-
type: "object",
|
|
3144
|
-
properties: {
|
|
3145
|
-
id: { type: "string", description: "Peer id whose profile to retrieve." }
|
|
3146
|
-
},
|
|
3147
|
-
required: ["id"],
|
|
3148
|
-
additionalProperties: false
|
|
3149
|
-
}
|
|
3150
|
-
},
|
|
3151
|
-
{
|
|
3152
|
-
name: "engram.peer_forget",
|
|
3153
|
-
description: "DESTRUCTIVELY purge the entire peer directory (identity.md + profile.md + interactions.log.md and any companion files). Requires confirm: 'yes'. Idempotent \u2014 safe to call twice. Use engram.peer_delete when you only want to remove the identity record and preserve profile data.",
|
|
3154
|
-
inputSchema: {
|
|
3155
|
-
type: "object",
|
|
3156
|
-
properties: {
|
|
3157
|
-
id: { type: "string", description: "Peer id to purge." },
|
|
3158
|
-
confirm: {
|
|
3159
|
-
type: "string",
|
|
3160
|
-
enum: ["yes"],
|
|
3161
|
-
description: "Must be exactly 'yes' to proceed. Guard against accidental invocation."
|
|
3162
|
-
}
|
|
3163
|
-
},
|
|
3164
|
-
required: ["id", "confirm"],
|
|
3165
|
-
additionalProperties: false
|
|
3166
|
-
}
|
|
3167
|
-
},
|
|
3168
|
-
// ── Operator Console state (issue #688 PR 2/3) ─────────────────────────
|
|
3169
|
-
{
|
|
3170
|
-
name: "engram.console_state",
|
|
3171
|
-
description: "Return a point-in-time ConsoleStateSnapshot of the engine's runtime state \u2014 buffer, extraction queue, dedup decisions, maintenance ledger tail, QMD probe, and daemon info (issue #688). Read-only; never mutates state.",
|
|
3172
|
-
inputSchema: {
|
|
3173
|
-
type: "object",
|
|
3174
|
-
properties: {
|
|
3175
|
-
namespace: {
|
|
3176
|
-
type: "string",
|
|
3177
|
-
description: "Optional namespace to scope the snapshot."
|
|
3178
|
-
}
|
|
3179
|
-
},
|
|
3180
|
-
additionalProperties: false
|
|
3181
|
-
}
|
|
3182
|
-
},
|
|
3183
|
-
// ── Dreams telemetry (issue #678 PR 3+4) ─────────────────────────────
|
|
3184
|
-
{
|
|
3185
|
-
name: "engram.dreams_status",
|
|
3186
|
-
description: "Return per-phase Dreams pipeline telemetry for the last N hours (default 24). Reports run count, total duration, and items processed for each phase: lightSleep, rem, deepSleep.",
|
|
3187
|
-
inputSchema: {
|
|
3188
|
-
type: "object",
|
|
3189
|
-
properties: {
|
|
3190
|
-
windowHours: {
|
|
3191
|
-
type: "number",
|
|
3192
|
-
description: "How many hours to look back (default 24, minimum 1)."
|
|
3193
|
-
},
|
|
3194
|
-
namespace: {
|
|
3195
|
-
type: "string",
|
|
3196
|
-
description: "Optional namespace to read Dreams telemetry from."
|
|
3197
|
-
}
|
|
3198
|
-
},
|
|
3199
|
-
additionalProperties: false
|
|
3200
|
-
}
|
|
3201
|
-
},
|
|
3202
|
-
{
|
|
3203
|
-
name: "engram.dreams_run",
|
|
3204
|
-
description: "Manually invoke a single Dreams pipeline phase (lightSleep, rem, or deepSleep). Returns the same telemetry shape as a scheduled run. Pass dryRun: true to preview without committing writes.",
|
|
3205
|
-
inputSchema: {
|
|
3206
|
-
type: "object",
|
|
3207
|
-
properties: {
|
|
3208
|
-
phase: {
|
|
3209
|
-
type: "string",
|
|
3210
|
-
enum: ["lightSleep", "rem", "deepSleep"],
|
|
3211
|
-
description: "Which phase to run."
|
|
3212
|
-
},
|
|
3213
|
-
dryRun: {
|
|
3214
|
-
type: "boolean",
|
|
3215
|
-
description: "When true, report what would change without committing writes (default false)."
|
|
3216
|
-
},
|
|
3217
|
-
namespace: {
|
|
3218
|
-
type: "string",
|
|
3219
|
-
description: "Optional namespace to run the phase in."
|
|
3220
|
-
}
|
|
3221
|
-
},
|
|
3222
|
-
required: ["phase"],
|
|
3223
|
-
additionalProperties: false
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
|
-
].flatMap((tool) => withToolAliases(tool, this.emitLegacyTools));
|
|
3227
|
-
if (this.codingDecisionVisible) {
|
|
3228
|
-
const codingDecisionTools = withToolAliases(
|
|
3229
|
-
{
|
|
3230
|
-
name: "engram.coding_decision",
|
|
3231
|
-
description: "List, get, record, or supersede decision records in the session's coding namespace (issue #1548 Track A). Subcommands: list, get, record, supersede.",
|
|
3232
|
-
inputSchema: {
|
|
3233
|
-
type: "object",
|
|
3234
|
-
properties: {
|
|
3235
|
-
subcommand: {
|
|
3236
|
-
type: "string",
|
|
3237
|
-
enum: ["list", "get", "record", "supersede"],
|
|
3238
|
-
description: "Which decision-record operation to run."
|
|
3239
|
-
},
|
|
3240
|
-
sessionKey: {
|
|
3241
|
-
type: "string",
|
|
3242
|
-
description: "Session identifier whose coding context scopes the operation."
|
|
3243
|
-
},
|
|
3244
|
-
namespace: {
|
|
3245
|
-
type: "string",
|
|
3246
|
-
description: "Optional explicit namespace (overrides coding-context overlay)."
|
|
3247
|
-
},
|
|
3248
|
-
id: { type: "string", description: "Decision record id (required for get and supersede)." },
|
|
3249
|
-
title: { type: "string", description: "Decision title (required for record and supersede)." },
|
|
3250
|
-
status: {
|
|
3251
|
-
type: "string",
|
|
3252
|
-
enum: ["proposed", "accepted", "superseded", "rejected"],
|
|
3253
|
-
description: "Decision status (record only; defaults to proposed)."
|
|
3254
|
-
},
|
|
3255
|
-
context: { type: "string", description: "Context/background for the decision." },
|
|
3256
|
-
decision: { type: "string", description: "The decision itself (required for record and supersede)." },
|
|
3257
|
-
consequences: { type: "string", description: "Consequences of the decision." },
|
|
3258
|
-
entityRefs: {
|
|
3259
|
-
type: "array",
|
|
3260
|
-
items: { type: "string" },
|
|
3261
|
-
description: "Entity references the decision relates to."
|
|
3262
|
-
},
|
|
3263
|
-
supersedesId: {
|
|
3264
|
-
type: "string",
|
|
3265
|
-
description: "Id of the record this decision supersedes (supersede only)."
|
|
3266
|
-
}
|
|
3267
|
-
},
|
|
3268
|
-
required: ["subcommand"],
|
|
3269
|
-
additionalProperties: false
|
|
3270
|
-
}
|
|
3271
|
-
},
|
|
3272
|
-
this.emitLegacyTools
|
|
3273
|
-
);
|
|
3274
|
-
this.tools = [...this.tools, ...codingDecisionTools];
|
|
3275
|
-
}
|
|
3276
|
-
if (this.architectureCardVisible) {
|
|
3277
|
-
const architectureTools = withToolAliases(
|
|
3278
|
-
{
|
|
3279
|
-
name: "engram.coding_architecture",
|
|
3280
|
-
description: "Get or refresh the architecture card for the session's coding namespace (issue #1548 Track A PR 3). Subcommands: get, refresh.",
|
|
3281
|
-
inputSchema: {
|
|
3282
|
-
type: "object",
|
|
3283
|
-
properties: {
|
|
3284
|
-
subcommand: {
|
|
3285
|
-
type: "string",
|
|
3286
|
-
enum: ["get", "refresh"],
|
|
3287
|
-
description: "Which architecture-card operation to run."
|
|
3288
|
-
},
|
|
3289
|
-
sessionKey: {
|
|
3290
|
-
type: "string",
|
|
3291
|
-
description: "Session identifier whose coding context scopes the operation."
|
|
3292
|
-
},
|
|
3293
|
-
namespace: {
|
|
3294
|
-
type: "string",
|
|
3295
|
-
description: "Optional explicit namespace (overrides coding-context overlay)."
|
|
3296
|
-
}
|
|
3297
|
-
},
|
|
3298
|
-
required: ["subcommand"],
|
|
3299
|
-
additionalProperties: false
|
|
3300
|
-
}
|
|
3301
|
-
},
|
|
3302
|
-
this.emitLegacyTools
|
|
3303
|
-
);
|
|
3304
|
-
this.tools = [...this.tools, ...architectureTools];
|
|
3305
|
-
}
|
|
3306
|
-
if (this.codegraphVisible) {
|
|
3307
|
-
const codegraphToolDefs = [
|
|
3308
|
-
{ suffix: "index", description: "Index a repository into the code graph.", required: ["repoRoot"] },
|
|
3309
|
-
{ suffix: "list_projects", description: "List code graph projects for the principal." },
|
|
3310
|
-
{
|
|
3311
|
-
suffix: "delete_project",
|
|
3312
|
-
description: "Delete a code graph project (requires confirm: true).",
|
|
3313
|
-
required: ["confirm"]
|
|
3314
|
-
},
|
|
3315
|
-
{ suffix: "index_status", description: "Get the indexing status for a project." },
|
|
3316
|
-
{ suffix: "search_graph", description: "Search the code graph for symbols.", required: ["query"] },
|
|
3317
|
-
{
|
|
3318
|
-
suffix: "trace_path",
|
|
3319
|
-
description: "Trace call/dependency paths from a starting symbol.",
|
|
3320
|
-
required: ["start"]
|
|
3321
|
-
},
|
|
3322
|
-
{ suffix: "detect_changes", description: "Detect changed symbols since a git ref.", required: ["head"] },
|
|
3323
|
-
{
|
|
3324
|
-
suffix: "query_graph",
|
|
3325
|
-
description: "Run a structured query against the code graph.",
|
|
3326
|
-
required: ["structuredQuery"]
|
|
3327
|
-
},
|
|
3328
|
-
{ suffix: "get_schema", description: "Get the code graph schema statistics." },
|
|
3329
|
-
{ suffix: "get_snippet", description: "Get a source code snippet for a symbol.", required: ["qualifiedName"] },
|
|
3330
|
-
{ suffix: "get_architecture", description: "Get the composed architecture card + graph stats." },
|
|
3331
|
-
{
|
|
3332
|
-
suffix: "search_code",
|
|
3333
|
-
description: "Search the code graph for code (functions, classes, methods).",
|
|
3334
|
-
required: ["query"]
|
|
3335
|
-
},
|
|
3336
|
-
{
|
|
3337
|
-
suffix: "manage_adr",
|
|
3338
|
-
description: "Manage ADRs via Track A decision records (list, get, record, supersede).",
|
|
3339
|
-
required: ["subcommand"]
|
|
3340
|
-
},
|
|
3341
|
-
{
|
|
3342
|
-
suffix: "ingest_traces",
|
|
3343
|
-
description: "Ingest call-site traces to upgrade edge confidence.",
|
|
3344
|
-
required: ["traces"]
|
|
3345
|
-
}
|
|
3346
|
-
];
|
|
3347
|
-
for (const def of codegraphToolDefs) {
|
|
3348
|
-
const tools = withToolAliases(
|
|
3349
|
-
{
|
|
3350
|
-
name: `engram.codegraph_${def.suffix}`,
|
|
3351
|
-
description: def.description,
|
|
3352
|
-
inputSchema: {
|
|
3353
|
-
type: "object",
|
|
3354
|
-
properties: {
|
|
3355
|
-
sessionKey: {
|
|
3356
|
-
type: "string",
|
|
3357
|
-
description: "Session identifier whose coding context scopes the operation."
|
|
3358
|
-
},
|
|
3359
|
-
project: { type: "string", description: "Explicit project id (defaults to session coding context)." },
|
|
3360
|
-
principal: { type: "string", description: "Authenticated principal override." },
|
|
3361
|
-
query: { type: "string" },
|
|
3362
|
-
limit: { type: "number" },
|
|
3363
|
-
start: { type: "string" },
|
|
3364
|
-
direction: { type: "string", enum: ["inbound", "outbound", "both"] },
|
|
3365
|
-
depth: { type: "number" },
|
|
3366
|
-
qualifiedName: { type: "string" },
|
|
3367
|
-
path: { type: "string" },
|
|
3368
|
-
structuredQuery: { type: "object" },
|
|
3369
|
-
head: { type: "string" },
|
|
3370
|
-
repoRoot: { type: "string" },
|
|
3371
|
-
mode: { type: "string", enum: ["auto", "full", "incremental"] },
|
|
3372
|
-
confirm: { type: "boolean" },
|
|
3373
|
-
subcommand: { type: "string", enum: ["list", "get", "record", "supersede"] },
|
|
3374
|
-
id: { type: "string" },
|
|
3375
|
-
title: { type: "string" },
|
|
3376
|
-
status: { type: "string", enum: ["proposed", "accepted", "superseded", "rejected"] },
|
|
3377
|
-
context: { type: "string" },
|
|
3378
|
-
decision: { type: "string" },
|
|
3379
|
-
consequences: { type: "string" },
|
|
3380
|
-
entityRefs: { type: "array", items: { type: "string" } },
|
|
3381
|
-
supersedesId: { type: "string" },
|
|
3382
|
-
traces: { type: "array", items: { type: "object" } }
|
|
3383
|
-
},
|
|
3384
|
-
required: def.required ?? [],
|
|
3385
|
-
additionalProperties: false
|
|
3386
|
-
}
|
|
3387
|
-
},
|
|
3388
|
-
this.emitLegacyTools
|
|
3389
|
-
);
|
|
3390
|
-
this.tools = [...this.tools, ...tools];
|
|
3391
|
-
}
|
|
3392
|
-
}
|
|
3393
|
-
if (this.sessionDeltaVisible) {
|
|
3394
|
-
const deltaTools = withToolAliases(
|
|
3395
|
-
{
|
|
3396
|
-
name: "engram.coding_delta",
|
|
3397
|
-
description: "Get the session delta (commits + touched files since last seen) for the session's coding namespace (issue #1548 Track A PR 4). Subcommand: get.",
|
|
3398
|
-
inputSchema: {
|
|
3399
|
-
type: "object",
|
|
3400
|
-
properties: {
|
|
3401
|
-
subcommand: {
|
|
3402
|
-
type: "string",
|
|
3403
|
-
enum: ["get"],
|
|
3404
|
-
description: "Which delta operation to run."
|
|
3405
|
-
},
|
|
3406
|
-
sessionKey: {
|
|
3407
|
-
type: "string",
|
|
3408
|
-
description: "Session identifier whose coding context scopes the operation."
|
|
3409
|
-
},
|
|
3410
|
-
namespace: {
|
|
3411
|
-
type: "string",
|
|
3412
|
-
description: "Optional explicit namespace (overrides coding-context overlay)."
|
|
3413
|
-
}
|
|
3414
|
-
},
|
|
3415
|
-
required: ["subcommand"],
|
|
3416
|
-
additionalProperties: false
|
|
3417
|
-
}
|
|
3418
|
-
},
|
|
3419
|
-
this.emitLegacyTools
|
|
3420
|
-
);
|
|
3421
|
-
this.tools = [...this.tools, ...deltaTools];
|
|
3422
|
-
}
|
|
3423
|
-
if (this.correctionVisible) {
|
|
3424
|
-
const planTool = withToolAliases(
|
|
3425
|
-
{
|
|
3426
|
-
name: "engram.memory_correct_plan",
|
|
3427
|
-
description: "Plan a memory correction from a plain-language statement (issue #1580). Returns a CorrectionPlan with a diff preview; apply via memory_correct_apply.",
|
|
3428
|
-
inputSchema: {
|
|
3429
|
-
type: "object",
|
|
3430
|
-
properties: {
|
|
3431
|
-
text: {
|
|
3432
|
-
type: "string",
|
|
3433
|
-
description: 'The natural-language correction (e.g. "we migrated to MySQL in March").'
|
|
3434
|
-
},
|
|
3435
|
-
targetIds: {
|
|
3436
|
-
type: "array",
|
|
3437
|
-
items: { type: "string" },
|
|
3438
|
-
description: "Optional explicit target memory ids. When omitted, the planner searches."
|
|
3439
|
-
},
|
|
3440
|
-
sessionKey: { type: "string", description: "Session identifier for namespace resolution." },
|
|
3441
|
-
namespace: { type: "string", description: "Optional explicit namespace (validated by policy)." }
|
|
3442
|
-
},
|
|
3443
|
-
required: ["text"],
|
|
3444
|
-
additionalProperties: false
|
|
3445
|
-
}
|
|
3446
|
-
},
|
|
3447
|
-
this.emitLegacyTools
|
|
3448
|
-
);
|
|
3449
|
-
const applyTool = withToolAliases(
|
|
3450
|
-
{
|
|
3451
|
-
name: "engram.memory_correct_apply",
|
|
3452
|
-
description: "Apply a planned memory correction by planId (issue #1580). Requires confirm: true when correction.applyRequiresConfirm is on (default).",
|
|
3453
|
-
inputSchema: {
|
|
3454
|
-
type: "object",
|
|
3455
|
-
properties: {
|
|
3456
|
-
planId: { type: "string", description: "The plan id returned by memory_correct_plan." },
|
|
3457
|
-
confirm: { type: "boolean", description: "Must be true to apply (safety guard, rule 48)." },
|
|
3458
|
-
sessionKey: { type: "string", description: "Session identifier for namespace resolution." },
|
|
3459
|
-
namespace: { type: "string", description: "Optional explicit namespace (validated by policy)." }
|
|
3460
|
-
},
|
|
3461
|
-
required: ["planId"],
|
|
3462
|
-
additionalProperties: false
|
|
3463
|
-
}
|
|
3464
|
-
},
|
|
3465
|
-
this.emitLegacyTools
|
|
3466
|
-
);
|
|
3467
|
-
this.tools = [...this.tools, ...planTool, ...applyTool];
|
|
3468
|
-
}
|
|
3469
|
-
if (this.chatVisible) {
|
|
3470
|
-
const chatTools = withToolAliases(
|
|
3471
|
-
{
|
|
3472
|
-
name: "engram.memory_chat",
|
|
3473
|
-
description: "Conversational memory inspection and correction (issue #1583). Send a message to chat about what Remnic remembers, inspect memories, or request corrections. Returns {reply, chatSessionId, pendingPlan?}.",
|
|
3474
|
-
inputSchema: {
|
|
3475
|
-
type: "object",
|
|
3476
|
-
properties: {
|
|
3477
|
-
message: {
|
|
3478
|
-
type: "string",
|
|
3479
|
-
description: "The user's message \u2014 a question about memories, a correction request, or a confirmation (yes/apply) to proceed with a pending plan."
|
|
3480
|
-
},
|
|
3481
|
-
chatSessionId: {
|
|
3482
|
-
type: "string",
|
|
3483
|
-
description: "Optional existing chat session id to resume. Omit to start a new session."
|
|
3484
|
-
}
|
|
3485
|
-
},
|
|
3486
|
-
required: ["message"],
|
|
3487
|
-
additionalProperties: false
|
|
3488
|
-
}
|
|
3489
|
-
},
|
|
3490
|
-
this.emitLegacyTools
|
|
3491
|
-
);
|
|
3492
|
-
this.tools = [...this.tools, ...chatTools];
|
|
3493
|
-
}
|
|
3494
|
-
this.tools = this.tools.map(
|
|
3495
|
-
(tool) => isReadOnlyToolName(tool.name) && tool.annotations?.readOnlyHint !== true ? { ...tool, annotations: { ...tool.annotations ?? {}, readOnlyHint: true } } : tool
|
|
3496
|
-
);
|
|
3497
|
-
this.tools = applyToolOutputSchemas(this.tools, CANONICAL_MCP_PREFIX, LEGACY_MCP_PREFIX);
|
|
3498
|
-
}
|
|
3499
|
-
service;
|
|
3500
|
-
buffer = Buffer.alloc(0);
|
|
3501
|
-
flushTask = null;
|
|
3502
|
-
tools;
|
|
3503
|
-
resources;
|
|
3504
|
-
resourceTextByUri;
|
|
3505
|
-
authenticatedPrincipal;
|
|
3506
|
-
/**
|
|
3507
|
-
* MCP client info keyed by server-assigned session ID. On each `initialize`
|
|
3508
|
-
* handshake the server generates a UUID, stores the client's clientInfo
|
|
3509
|
-
* against it, and returns the ID as `Mcp-Session-Id` in the response
|
|
3510
|
-
* metadata. Subsequent requests from the same client include this header,
|
|
3511
|
-
* allowing per-session clientInfo lookup without cross-session leaks.
|
|
3512
|
-
*/
|
|
3513
|
-
clientInfoBySession = /* @__PURE__ */ new Map();
|
|
3514
|
-
/**
|
|
3515
|
-
* Session IDs generated during initialize, keyed by caller-supplied correlation
|
|
3516
|
-
* ID (unique per HTTP request) to avoid collisions when multiple clients send
|
|
3517
|
-
* initialize with the same JSON-RPC id concurrently.
|
|
3518
|
-
*/
|
|
3519
|
-
initSessionIds = /* @__PURE__ */ new Map();
|
|
3520
|
-
/**
|
|
3521
|
-
* Whether oai-mem-citation guidance is explicitly enabled via config.
|
|
3522
|
-
*/
|
|
3523
|
-
citationsEnabled;
|
|
3524
|
-
/** Whether to auto-enable citations for Codex adapter connections. */
|
|
3525
|
-
citationsAutoDetect;
|
|
3526
|
-
/**
|
|
3527
|
-
* Whether to advertise legacy `engram.*` tool aliases alongside the canonical
|
|
3528
|
-
* `remnic.*` names (issue #1427). Defaults to true for backward compatibility;
|
|
3529
|
-
* set false to halve the advertised `tools/list` surface.
|
|
3530
|
-
*/
|
|
3531
|
-
emitLegacyTools;
|
|
3532
|
-
/**
|
|
3533
|
-
* Whether the `coding_decision` tool should appear in `tools/list`. Gated on
|
|
3534
|
-
* `codingKnowledge.enabled && codingKnowledge.decisionRecords` (issue #1548
|
|
3535
|
-
* Track A PR 2, rule 39). When false the tools array is byte-identical to
|
|
3536
|
-
* pre-feature.
|
|
3537
|
-
*/
|
|
3538
|
-
codingDecisionVisible;
|
|
3539
|
-
/**
|
|
3540
|
-
* Whether the `coding_architecture` tool should appear in `tools/list`.
|
|
3541
|
-
* Gated on `codingKnowledge.enabled && codingKnowledge.architectureCard`
|
|
3542
|
-
* (issue #1548 Track A PR 3, rule 39).
|
|
3543
|
-
*/
|
|
3544
|
-
architectureCardVisible;
|
|
3545
|
-
/**
|
|
3546
|
-
* Whether the 14 codegraph parity tools should appear in `tools/list`
|
|
3547
|
-
* (issue #1554). Config-only -- runtime availability is checked at call
|
|
3548
|
-
* time. When false the tools array is byte-identical to pre-feature.
|
|
3549
|
-
*/
|
|
3550
|
-
codegraphVisible;
|
|
3551
|
-
sessionDeltaVisible;
|
|
3552
|
-
/**
|
|
3553
|
-
* Whether the two correction tools (memory_correct_plan / memory_correct_apply)
|
|
3554
|
-
* should appear in `tools/list` (issue #1580). Gated on `correction.enabled`
|
|
3555
|
-
* (default true — plan is read-only; safe on). When false the tools array is
|
|
3556
|
-
* byte-identical to pre-feature.
|
|
3557
|
-
*/
|
|
3558
|
-
correctionVisible;
|
|
3559
|
-
/**
|
|
3560
|
-
* Whether the `memory_chat` tool should appear in `tools/list` (issue
|
|
3561
|
-
* #1583). Gated on `chat.enabled`. When false the tools array is
|
|
3562
|
-
* byte-identical to pre-feature (rule 39).
|
|
3563
|
-
*/
|
|
3564
|
-
chatVisible;
|
|
3565
|
-
/** Get clientInfo for a specific MCP session. Returns undefined for non-MCP requests. */
|
|
3566
|
-
getClientInfo(sessionId) {
|
|
3567
|
-
if (sessionId) {
|
|
3568
|
-
return this.clientInfoBySession.get(sessionId);
|
|
3569
|
-
}
|
|
3570
|
-
return void 0;
|
|
3571
|
-
}
|
|
3572
|
-
/** Pop the session ID generated during an initialize handshake, keyed by correlation ID. */
|
|
3573
|
-
popInitSessionId(correlationId) {
|
|
3574
|
-
const sid = this.initSessionIds.get(correlationId);
|
|
3575
|
-
if (sid !== void 0) this.initSessionIds.delete(correlationId);
|
|
3576
|
-
return sid;
|
|
3577
|
-
}
|
|
3578
|
-
async handleRequest(request, options) {
|
|
3579
|
-
const id = request.id ?? null;
|
|
3580
|
-
const method = request.method ?? "";
|
|
3581
|
-
if (method === "notifications/initialized") return null;
|
|
3582
|
-
if (method === "ping") {
|
|
3583
|
-
return { jsonrpc: "2.0", id, result: {} };
|
|
3584
|
-
}
|
|
3585
|
-
if (method === "initialize") {
|
|
3586
|
-
const params = request.params ?? {};
|
|
3587
|
-
if (typeof params.protocolVersion !== "string" || params.protocolVersion.length === 0) {
|
|
3588
|
-
return {
|
|
3589
|
-
jsonrpc: "2.0",
|
|
3590
|
-
id,
|
|
3591
|
-
error: {
|
|
3592
|
-
code: -32602,
|
|
3593
|
-
message: `initialize requires params.protocolVersion (string); supported versions: ${MCP_SUPPORTED_PROTOCOL_VERSIONS.join(", ")}`
|
|
3594
|
-
}
|
|
3595
|
-
};
|
|
3596
|
-
}
|
|
3597
|
-
const rawClientInfo = params.clientInfo;
|
|
3598
|
-
const newSessionId = randomUUID2();
|
|
3599
|
-
if (rawClientInfo && typeof rawClientInfo.name === "string") {
|
|
3600
|
-
const info = { name: rawClientInfo.name, version: rawClientInfo.version };
|
|
3601
|
-
this.clientInfoBySession.set(newSessionId, info);
|
|
3602
|
-
if (this.clientInfoBySession.size > 1e3) {
|
|
3603
|
-
const firstKey = this.clientInfoBySession.keys().next().value;
|
|
3604
|
-
if (firstKey) this.clientInfoBySession.delete(firstKey);
|
|
3605
|
-
}
|
|
3606
|
-
}
|
|
3607
|
-
const version = await getMcpServerVersion();
|
|
3608
|
-
const corrId = options?.correlationId;
|
|
3609
|
-
if (corrId) this.initSessionIds.set(corrId, newSessionId);
|
|
3610
|
-
return {
|
|
3611
|
-
jsonrpc: "2.0",
|
|
3612
|
-
id,
|
|
3613
|
-
result: {
|
|
3614
|
-
protocolVersion: MCP_SUPPORTED_PROTOCOL_VERSIONS.includes(params.protocolVersion) ? params.protocolVersion : MCP_DEFAULT_PROTOCOL_VERSION,
|
|
3615
|
-
capabilities: {
|
|
3616
|
-
tools: {},
|
|
3617
|
-
resources: {}
|
|
3618
|
-
},
|
|
3619
|
-
serverInfo: {
|
|
3620
|
-
name: "remnic",
|
|
3621
|
-
version
|
|
3622
|
-
}
|
|
3623
|
-
}
|
|
3624
|
-
};
|
|
3625
|
-
}
|
|
3626
|
-
if (method === "tools/list") {
|
|
3627
|
-
const caps = tokenCapabilityStore.getStore();
|
|
3628
|
-
const tools = caps?.ops === void 0 ? this.tools : this.tools.filter((t) => capabilityAllowsOp(caps, MCP_MIGRATED_OPERATIONS[toLegacyToolName(t.name)] ?? ""));
|
|
3629
|
-
return { jsonrpc: "2.0", id, result: { tools } };
|
|
3630
|
-
}
|
|
3631
|
-
if (method === "resources/list") {
|
|
3632
|
-
return {
|
|
3633
|
-
jsonrpc: "2.0",
|
|
3634
|
-
id,
|
|
3635
|
-
result: {
|
|
3636
|
-
resources: this.resources
|
|
3637
|
-
}
|
|
3638
|
-
};
|
|
3639
|
-
}
|
|
3640
|
-
if (method === "resources/templates/list") {
|
|
3641
|
-
return {
|
|
3642
|
-
jsonrpc: "2.0",
|
|
3643
|
-
id,
|
|
3644
|
-
result: {
|
|
3645
|
-
resourceTemplates: []
|
|
3646
|
-
}
|
|
3647
|
-
};
|
|
3648
|
-
}
|
|
3649
|
-
if (method === "resources/read") {
|
|
3650
|
-
const params = request.params ?? {};
|
|
3651
|
-
const uri = typeof params.uri === "string" ? params.uri : "";
|
|
3652
|
-
const resource = this.resources.find((entry) => entry.uri === uri);
|
|
3653
|
-
if (!resource) {
|
|
3654
|
-
return {
|
|
3655
|
-
jsonrpc: "2.0",
|
|
3656
|
-
id,
|
|
3657
|
-
error: {
|
|
3658
|
-
code: -32602,
|
|
3659
|
-
message: `Unknown resource URI: ${uri}`
|
|
3660
|
-
}
|
|
3661
|
-
};
|
|
3662
|
-
}
|
|
3663
|
-
const text = this.resourceTextByUri.get(resource.uri);
|
|
3664
|
-
if (text === void 0) {
|
|
3665
|
-
return {
|
|
3666
|
-
jsonrpc: "2.0",
|
|
3667
|
-
id,
|
|
3668
|
-
error: {
|
|
3669
|
-
code: -32603,
|
|
3670
|
-
message: `Resource content unavailable: ${resource.uri}`
|
|
3671
|
-
}
|
|
3672
|
-
};
|
|
3673
|
-
}
|
|
3674
|
-
return {
|
|
3675
|
-
jsonrpc: "2.0",
|
|
3676
|
-
id,
|
|
3677
|
-
result: {
|
|
3678
|
-
contents: [
|
|
3679
|
-
{
|
|
3680
|
-
uri: resource.uri,
|
|
3681
|
-
mimeType: resource.mimeType,
|
|
3682
|
-
text,
|
|
3683
|
-
_meta: resource._meta
|
|
3684
|
-
}
|
|
3685
|
-
]
|
|
3686
|
-
}
|
|
3687
|
-
};
|
|
3688
|
-
}
|
|
3689
|
-
if (method === "tools/call") {
|
|
3690
|
-
const params = request.params ?? {};
|
|
3691
|
-
const name = typeof params.name === "string" ? params.name : "";
|
|
3692
|
-
try {
|
|
3693
|
-
let argumentsObject = {};
|
|
3694
|
-
if ("arguments" in params && params.arguments !== void 0) {
|
|
3695
|
-
if (params.arguments === null || typeof params.arguments !== "object" || Array.isArray(params.arguments)) {
|
|
3696
|
-
throw new EngramAccessInputError("tools/call arguments must be an object when provided");
|
|
3697
|
-
}
|
|
3698
|
-
argumentsObject = params.arguments;
|
|
3699
|
-
}
|
|
3700
|
-
if (!("namespace" in argumentsObject) && options?.namespaceOverride && this.toolAcceptsArgument(name, "namespace")) {
|
|
3701
|
-
argumentsObject = { ...argumentsObject, namespace: options.namespaceOverride };
|
|
3702
|
-
}
|
|
3703
|
-
const skipSessionKeyOverride = toLegacyToolName(name) === "engram.lcm_search" && typeof argumentsObject.sessionPrefix === "string" && argumentsObject.sessionPrefix.length > 0;
|
|
3704
|
-
if (!("sessionKey" in argumentsObject) && !skipSessionKeyOverride && options?.sessionKeyOverride && this.toolAcceptsArgument(name, "sessionKey")) {
|
|
3705
|
-
argumentsObject = { ...argumentsObject, sessionKey: options.sessionKeyOverride };
|
|
3706
|
-
}
|
|
3707
|
-
const effectivePrincipal = options?.principalOverride ?? this.authenticatedPrincipal;
|
|
3708
|
-
const mcpScope = {
|
|
3709
|
-
...options?.namespaceOverride ? { namespace: options.namespaceOverride } : {},
|
|
3710
|
-
...options?.sessionKeyOverride ? { sessionKey: options.sessionKeyOverride } : {}
|
|
3711
|
-
};
|
|
3712
|
-
throwMcpAbort(options?.abortSignal, "MCP request aborted before operation start");
|
|
3713
|
-
const result = await this.callTool(
|
|
3714
|
-
name,
|
|
3715
|
-
argumentsObject,
|
|
3716
|
-
effectivePrincipal,
|
|
3717
|
-
options?.sessionId,
|
|
3718
|
-
mcpScope,
|
|
3719
|
-
options?.enforceWriteQuota,
|
|
3720
|
-
options?.recordWriteCommit,
|
|
3721
|
-
options?.sourceConnector,
|
|
3722
|
-
options?.abortSignal
|
|
3723
|
-
);
|
|
3724
|
-
if (isReadOnlyToolName(name)) {
|
|
3725
|
-
throwMcpAbort(options?.abortSignal, "MCP request aborted before response");
|
|
3726
|
-
}
|
|
3727
|
-
const structuredContent = result;
|
|
3728
|
-
return {
|
|
3729
|
-
jsonrpc: "2.0",
|
|
3730
|
-
id,
|
|
3731
|
-
result: {
|
|
3732
|
-
content: [{ type: "text", text: JSON.stringify(result ?? null, null, 2) }],
|
|
3733
|
-
...structuredContent == null ? {} : { structuredContent },
|
|
3734
|
-
isError: false
|
|
3735
|
-
}
|
|
3736
|
-
};
|
|
3737
|
-
} catch (err) {
|
|
3738
|
-
if (isAbortError(err)) throw err;
|
|
3739
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
3740
|
-
return {
|
|
3741
|
-
jsonrpc: "2.0",
|
|
3742
|
-
id,
|
|
3743
|
-
result: {
|
|
3744
|
-
content: [{ type: "text", text: message }],
|
|
3745
|
-
isError: true
|
|
3746
|
-
}
|
|
3747
|
-
};
|
|
3748
|
-
}
|
|
3749
|
-
}
|
|
3750
|
-
return {
|
|
3751
|
-
jsonrpc: "2.0",
|
|
3752
|
-
id,
|
|
3753
|
-
error: {
|
|
3754
|
-
code: -32601,
|
|
3755
|
-
message: `Method not found: ${method}`
|
|
3756
|
-
}
|
|
3757
|
-
};
|
|
3758
|
-
}
|
|
3759
|
-
async runStdio(input, output) {
|
|
3760
|
-
input.on("data", (chunk) => {
|
|
3761
|
-
this.buffer = Buffer.concat([this.buffer, Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)]);
|
|
3762
|
-
this.scheduleFlush(output);
|
|
3763
|
-
});
|
|
3764
|
-
await new Promise((resolve, reject) => {
|
|
3765
|
-
input.on("end", resolve);
|
|
3766
|
-
input.on("error", reject);
|
|
3767
|
-
});
|
|
3768
|
-
while (this.flushTask) {
|
|
3769
|
-
await this.flushTask;
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
scheduleFlush(output) {
|
|
3773
|
-
if (this.flushTask) return;
|
|
3774
|
-
const task = this.flushBuffer(output).catch((err) => {
|
|
3775
|
-
this.writeMessage(output, {
|
|
3776
|
-
jsonrpc: "2.0",
|
|
3777
|
-
id: null,
|
|
3778
|
-
error: {
|
|
3779
|
-
code: -32700,
|
|
3780
|
-
message: err instanceof Error ? err.message : String(err)
|
|
3781
|
-
}
|
|
3782
|
-
});
|
|
3783
|
-
}).finally(() => {
|
|
3784
|
-
if (this.flushTask === task) {
|
|
3785
|
-
this.flushTask = null;
|
|
3786
|
-
}
|
|
3787
|
-
if (this.buffer.length > 0) {
|
|
3788
|
-
this.scheduleFlush(output);
|
|
3789
|
-
}
|
|
3790
|
-
});
|
|
3791
|
-
this.flushTask = task;
|
|
3792
|
-
}
|
|
3793
|
-
async flushBuffer(output) {
|
|
3794
|
-
while (true) {
|
|
3795
|
-
const headerEnd = this.buffer.indexOf("\r\n\r\n");
|
|
3796
|
-
if (headerEnd < 0) return;
|
|
3797
|
-
const headerText = this.buffer.slice(0, headerEnd).toString("utf-8");
|
|
3798
|
-
const headers = headerText.split("\r\n");
|
|
3799
|
-
const contentLengthHeader = headers.find((line) => line.toLowerCase().startsWith("content-length:"));
|
|
3800
|
-
if (!contentLengthHeader) {
|
|
3801
|
-
this.buffer = Buffer.alloc(0);
|
|
3802
|
-
return;
|
|
3803
|
-
}
|
|
3804
|
-
const contentLength = Number.parseInt(contentLengthHeader.split(":")[1]?.trim() ?? "0", 10);
|
|
3805
|
-
if (!Number.isFinite(contentLength) || contentLength < 0) {
|
|
3806
|
-
this.buffer = Buffer.alloc(0);
|
|
3807
|
-
return;
|
|
3808
|
-
}
|
|
3809
|
-
const messageStart = headerEnd + 4;
|
|
3810
|
-
const messageEnd = messageStart + contentLength;
|
|
3811
|
-
if (this.buffer.length < messageEnd) return;
|
|
3812
|
-
const body = this.buffer.slice(messageStart, messageEnd).toString("utf-8");
|
|
3813
|
-
this.buffer = this.buffer.slice(messageEnd);
|
|
3814
|
-
let parsed;
|
|
3815
|
-
try {
|
|
3816
|
-
parsed = JSON.parse(body);
|
|
3817
|
-
} catch {
|
|
3818
|
-
this.writeMessage(output, {
|
|
3819
|
-
jsonrpc: "2.0",
|
|
3820
|
-
id: null,
|
|
3821
|
-
error: {
|
|
3822
|
-
code: -32700,
|
|
3823
|
-
message: "Parse error"
|
|
3824
|
-
}
|
|
3825
|
-
});
|
|
3826
|
-
continue;
|
|
3827
|
-
}
|
|
3828
|
-
const response = await this.handleRequest(parsed);
|
|
3829
|
-
if (response) {
|
|
3830
|
-
this.writeMessage(output, response);
|
|
3831
|
-
}
|
|
3832
|
-
}
|
|
3833
|
-
}
|
|
3834
|
-
writeMessage(output, payload) {
|
|
3835
|
-
const body = JSON.stringify(payload);
|
|
3836
|
-
const message = `Content-Length: ${Buffer.byteLength(body, "utf-8")}\r
|
|
3837
|
-
\r
|
|
3838
|
-
${body}`;
|
|
3839
|
-
output.write(message);
|
|
3840
|
-
}
|
|
3841
|
-
toolAcceptsArgument(name, key) {
|
|
3842
|
-
const target = toCanonicalToolName(name);
|
|
3843
|
-
const tool = this.tools.find((entry) => toCanonicalToolName(entry.name) === target);
|
|
3844
|
-
const inputSchema = getObjectProperties(tool?.inputSchema);
|
|
3845
|
-
const properties = getObjectProperties(inputSchema?.properties);
|
|
3846
|
-
if (properties && Object.prototype.hasOwnProperty.call(properties, key)) {
|
|
3847
|
-
return true;
|
|
3848
|
-
}
|
|
3849
|
-
return inputSchema?.additionalProperties === true;
|
|
3850
|
-
}
|
|
3851
|
-
/**
|
|
3852
|
-
* Whether a tool accepts a `namespace` argument — i.e. it is a
|
|
3853
|
-
* namespace-scoped operation whose effective namespace MUST be gated by the
|
|
3854
|
-
* per-token allow-list. Exposed (public) so the HTTP MCP transport can run
|
|
3855
|
-
* the SAME effective-namespace enforcement the REST surface runs, without
|
|
3856
|
-
* duplicating the tool-schema introspection (issue #1850). Namespace-
|
|
3857
|
-
* agnostic tools (peer/wearables/etc.) return false and stay ungated,
|
|
3858
|
-
* matching the REST surface where those routes never call resolveNamespace.
|
|
3859
|
-
*/
|
|
3860
|
-
toolAcceptsNamespace(name) {
|
|
3861
|
-
return this.toolAcceptsArgument(name, "namespace");
|
|
3862
|
-
}
|
|
3863
|
-
/**
|
|
3864
|
-
* Determine whether oai-mem-citation guidance should be appended to recall.
|
|
3865
|
-
* Returns true when explicitly enabled via config OR when auto-detect is
|
|
3866
|
-
* active and the current MCP session belongs to a Codex adapter client.
|
|
3867
|
-
*
|
|
3868
|
-
* When no sessionId is provided (e.g., stdio transport where there are no
|
|
3869
|
-
* HTTP headers carrying mcp-session-id), fall back to checking if there is
|
|
3870
|
-
* exactly one known session whose clientInfo matches the Codex pattern.
|
|
3871
|
-
* This covers the common stdio case where a single client connection exists.
|
|
3872
|
-
*/
|
|
3873
|
-
shouldEmitCitations(mcpSessionId) {
|
|
3874
|
-
if (this.citationsEnabled) return true;
|
|
3875
|
-
if (!this.citationsAutoDetect) return false;
|
|
3876
|
-
if (mcpSessionId) {
|
|
3877
|
-
const info = this.clientInfoBySession.get(mcpSessionId);
|
|
3878
|
-
if (!info) return false;
|
|
3879
|
-
return this.isCodexClient(info);
|
|
3880
|
-
}
|
|
3881
|
-
if (this.clientInfoBySession.size === 1) {
|
|
3882
|
-
const [info] = [...this.clientInfoBySession.values()];
|
|
3883
|
-
if (info) return this.isCodexClient(info);
|
|
3884
|
-
}
|
|
3885
|
-
return false;
|
|
3886
|
-
}
|
|
3887
|
-
/** Check whether a clientInfo record identifies a Codex adapter client. */
|
|
3888
|
-
isCodexClient(info) {
|
|
3889
|
-
const lowerName = info.name.toLowerCase();
|
|
3890
|
-
return lowerName === "codex-mcp-client" || lowerName.includes("codex");
|
|
3891
|
-
}
|
|
3892
|
-
/**
|
|
3893
|
-
* Build citation metadata for each recall result that has a path.
|
|
3894
|
-
* Line range defaults to 1-1 when not determinable from the summary.
|
|
3895
|
-
*/
|
|
3896
|
-
buildRecallCitations(response) {
|
|
3897
|
-
return response.results.filter((r) => r.path && r.path.length > 0).map((r) => ({
|
|
3898
|
-
memoryId: r.id,
|
|
3899
|
-
path: r.path,
|
|
3900
|
-
lineStart: 1,
|
|
3901
|
-
lineEnd: 1,
|
|
3902
|
-
noteDefault: r.preview?.slice(0, 60) || r.id
|
|
3903
|
-
}));
|
|
3904
|
-
}
|
|
3905
|
-
async callTool(name, args, effectivePrincipal, mcpSessionId, scope, enforceWriteQuota, recordWriteCommit, sourceConnector, abortSignal) {
|
|
3906
|
-
const migrated = MCP_MIGRATED_OPERATIONS[toLegacyToolName(name)];
|
|
3907
|
-
if (!migrated) {
|
|
3908
|
-
throw new Error(`unknown tool: ${name}`);
|
|
3909
|
-
}
|
|
3910
|
-
const op = getOperation(migrated);
|
|
3911
|
-
if (!op) {
|
|
3912
|
-
throw new EngramAccessInputError(`access-boundary: operation not registered: ${migrated}`);
|
|
3913
|
-
}
|
|
3914
|
-
let envelope;
|
|
3915
|
-
const wireSchema = MCP_WIRE_SCHEMAS[migrated];
|
|
3916
|
-
if (wireSchema) {
|
|
3917
|
-
envelope = parseMcpRequest(wireSchema, args);
|
|
3918
|
-
} else if (migrated.startsWith("codegraph_")) {
|
|
3919
|
-
envelope = { ...args, tool: migrated.slice("codegraph_".length) };
|
|
3920
|
-
} else if (migrated === "chat_message") {
|
|
3921
|
-
assertOperationAllowed(tokenCapabilityStore.getStore(), migrated);
|
|
3922
|
-
const message = typeof args.message === "string" ? args.message : "";
|
|
3923
|
-
if (!message) throw new EngramAccessInputError("message is required");
|
|
3924
|
-
const chatSessionId = typeof args.chatSessionId === "string" ? args.chatSessionId : void 0;
|
|
3925
|
-
if (chatSessionId) {
|
|
3926
|
-
await enforceChatSessionNamespace(this.service, chatSessionId);
|
|
3927
|
-
} else {
|
|
3928
|
-
enforceNamespaceAllowList(
|
|
3929
|
-
tokenCapabilityStore.getStore(),
|
|
3930
|
-
scope?.namespace,
|
|
3931
|
-
this.service.configRef?.defaultNamespace
|
|
3932
|
-
);
|
|
3933
|
-
}
|
|
3934
|
-
const chatResult = await processChatMessage({
|
|
3935
|
-
service: this.service,
|
|
3936
|
-
config: this.service.configRef?.chat,
|
|
3937
|
-
memoryDir: this.service.memoryDir,
|
|
3938
|
-
message,
|
|
3939
|
-
...chatSessionId ? { chatSessionId } : {},
|
|
3940
|
-
...effectivePrincipal ? { principal: effectivePrincipal } : {},
|
|
3941
|
-
...scope?.namespace ? { namespace: scope.namespace } : {},
|
|
3942
|
-
...scope?.sessionKey ? { sessionKey: scope.sessionKey } : {}
|
|
3943
|
-
});
|
|
3944
|
-
if (chatResult && typeof chatResult === "object" && "error" in chatResult) {
|
|
3945
|
-
const { error: _stripped, ...wireResult } = chatResult;
|
|
3946
|
-
return wireResult;
|
|
3947
|
-
}
|
|
3948
|
-
return chatResult;
|
|
3949
|
-
} else {
|
|
3950
|
-
envelope = args;
|
|
3951
|
-
}
|
|
3952
|
-
if (migrated === "recall") {
|
|
3953
|
-
const result = await op.run(envelope, {
|
|
3954
|
-
service: this.service,
|
|
3955
|
-
authenticatedPrincipal: effectivePrincipal,
|
|
3956
|
-
...sourceConnector ? { sourceConnector } : {},
|
|
3957
|
-
...abortSignal ? { abortSignal } : {}
|
|
3958
|
-
});
|
|
3959
|
-
throwMcpAbort(abortSignal, "MCP recall aborted before postprocessing");
|
|
3960
|
-
const response = result.result;
|
|
3961
|
-
if (this.shouldEmitCitations(mcpSessionId)) {
|
|
3962
|
-
const citations = this.buildRecallCitations(response);
|
|
3963
|
-
const guidance = buildCitationGuidance(citations);
|
|
3964
|
-
if (guidance.length > 0) {
|
|
3965
|
-
return {
|
|
3966
|
-
...response,
|
|
3967
|
-
context: (response.context ?? "") + guidance,
|
|
3968
|
-
citations
|
|
3969
|
-
};
|
|
3970
|
-
}
|
|
3971
|
-
}
|
|
3972
|
-
return response;
|
|
3973
|
-
}
|
|
3974
|
-
const output = await op.run(envelope, {
|
|
3975
|
-
service: this.service,
|
|
3976
|
-
authenticatedPrincipal: effectivePrincipal,
|
|
3977
|
-
...enforceWriteQuota || recordWriteCommit ? { hooks: { ...enforceWriteQuota ? { enforceWriteQuota } : {}, ...recordWriteCommit ? { recordWriteCommit } : {} } } : {},
|
|
3978
|
-
...sourceConnector ? { sourceConnector } : {},
|
|
3979
|
-
...abortSignal ? { abortSignal } : {}
|
|
3980
|
-
});
|
|
3981
|
-
return output.result;
|
|
3982
|
-
}
|
|
3983
|
-
};
|
|
3984
|
-
|
|
3985
|
-
export {
|
|
3986
|
-
createChatSession,
|
|
3987
|
-
loadChatSession,
|
|
3988
|
-
enforceChatSessionNamespace,
|
|
3989
|
-
subscribeChatTranscript,
|
|
3990
|
-
cleanupExpiredChatSessions,
|
|
3991
|
-
sessionBelongsToPrincipal,
|
|
3992
|
-
processChatMessage,
|
|
3993
|
-
MCP_SUPPORTED_PROTOCOL_VERSIONS,
|
|
3994
|
-
MCP_MIGRATED_OPERATIONS,
|
|
3995
|
-
EngramMcpServer
|
|
3996
|
-
};
|
|
3997
|
-
//# sourceMappingURL=chunk-FROKVQQY.js.map
|