@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-KH2D26LQ.js
DELETED
|
@@ -1,2440 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
applyGroundingWithConnector,
|
|
3
|
-
headerConnector,
|
|
4
|
-
renderExtractionConversation,
|
|
5
|
-
resolveSourceConnector
|
|
6
|
-
} from "./chunk-SPFNGHHP.js";
|
|
7
|
-
import {
|
|
8
|
-
normalizeReasoningTrace
|
|
9
|
-
} from "./chunk-54V4BZWP.js";
|
|
10
|
-
import {
|
|
11
|
-
shouldRunProactivePass
|
|
12
|
-
} from "./chunk-2CGLBUW3.js";
|
|
13
|
-
import {
|
|
14
|
-
extractionProviderJsonSchema
|
|
15
|
-
} from "./chunk-AAQA6ZUP.js";
|
|
16
|
-
import {
|
|
17
|
-
ConsolidationResultSchema,
|
|
18
|
-
DaySummaryResultSchema,
|
|
19
|
-
ExtractionResultSchema,
|
|
20
|
-
IdentityConsolidationResultSchema,
|
|
21
|
-
ProactiveExtractionResultSchema,
|
|
22
|
-
ProactiveQuestionsResultSchema,
|
|
23
|
-
buildProfileConsolidationResultSchema
|
|
24
|
-
} from "./chunk-JHU4EYDV.js";
|
|
25
|
-
import {
|
|
26
|
-
applyExtractionSpanMaterialization,
|
|
27
|
-
bindLocalExtractionPrompt,
|
|
28
|
-
buildSpanMaterializeTurns,
|
|
29
|
-
stripUntrustedFactSpans,
|
|
30
|
-
truncateLocalExtractionConversation
|
|
31
|
-
} from "./chunk-XVZA6VXC.js";
|
|
32
|
-
import {
|
|
33
|
-
containsExtractionPlaceholder,
|
|
34
|
-
extractionAttributes,
|
|
35
|
-
extractionCueAnchors,
|
|
36
|
-
extractionText,
|
|
37
|
-
isPlainRecord
|
|
38
|
-
} from "./chunk-FJMYMJLR.js";
|
|
39
|
-
import {
|
|
40
|
-
attachExtractionProvenance
|
|
41
|
-
} from "./chunk-SMBWBEE7.js";
|
|
42
|
-
import {
|
|
43
|
-
classifyExtractionThrownError,
|
|
44
|
-
classifyFallbackParseFailure,
|
|
45
|
-
formatExtractionParseFailureLog
|
|
46
|
-
} from "./chunk-PJRKLB4Z.js";
|
|
47
|
-
import {
|
|
48
|
-
delinearize
|
|
49
|
-
} from "./chunk-VEWZZM3H.js";
|
|
50
|
-
import {
|
|
51
|
-
buildExtensionsFooterForSummary,
|
|
52
|
-
formatDaySummaryMemories,
|
|
53
|
-
loadDaySummaryPrompt
|
|
54
|
-
} from "./chunk-LVXBC6YB.js";
|
|
55
|
-
import {
|
|
56
|
-
CONSOLIDATION_RESPONSE_SCHEMA,
|
|
57
|
-
CUE_ANCHOR_PROMPT_INSTRUCTION,
|
|
58
|
-
OUTPUT_LANGUAGE_POLICY,
|
|
59
|
-
PROFILE_CONSOLIDATION_RESPONSE_SCHEMA,
|
|
60
|
-
buildConsolidationSystemPrompt,
|
|
61
|
-
buildExtractionInstructions,
|
|
62
|
-
buildProfileConsolidationSystemPrompt,
|
|
63
|
-
eventTimePromptInstruction,
|
|
64
|
-
extractionResponseShape,
|
|
65
|
-
spanModePromptSection
|
|
66
|
-
} from "./chunk-BOADKFN4.js";
|
|
67
|
-
import {
|
|
68
|
-
looksLikeMechanicalTelemetryTranscript
|
|
69
|
-
} from "./chunk-4RA3C3EV.js";
|
|
70
|
-
import {
|
|
71
|
-
AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT,
|
|
72
|
-
clampAmbientCaptureConfidence
|
|
73
|
-
} from "./chunk-QW27DOHG.js";
|
|
74
|
-
import {
|
|
75
|
-
applyWorkExtractionBoundary
|
|
76
|
-
} from "./chunk-EI6V5UXY.js";
|
|
77
|
-
import {
|
|
78
|
-
ProfilingCollector
|
|
79
|
-
} from "./chunk-NLE6TSLG.js";
|
|
80
|
-
import {
|
|
81
|
-
ModelRegistry
|
|
82
|
-
} from "./chunk-WLZYGLJ4.js";
|
|
83
|
-
import {
|
|
84
|
-
LocalLlmClient
|
|
85
|
-
} from "./chunk-G2XZFGYN.js";
|
|
86
|
-
import {
|
|
87
|
-
normalizeProcedureSteps
|
|
88
|
-
} from "./chunk-QDW3E4RD.js";
|
|
89
|
-
import {
|
|
90
|
-
FallbackLlmClient,
|
|
91
|
-
gatewayTaskChainOptions
|
|
92
|
-
} from "./chunk-ZTHGFTMW.js";
|
|
93
|
-
import {
|
|
94
|
-
buildChatCompletionTokenLimit,
|
|
95
|
-
shouldAssumeOpenAiChatCompletions
|
|
96
|
-
} from "./chunk-L2EXJQJP.js";
|
|
97
|
-
import {
|
|
98
|
-
fallbackLlmRuntimeContextFromConfig
|
|
99
|
-
} from "./chunk-EP6BA7VV.js";
|
|
100
|
-
import {
|
|
101
|
-
extractJsonCandidates
|
|
102
|
-
} from "./chunk-RGMVMVMF.js";
|
|
103
|
-
import {
|
|
104
|
-
isMemoryCategory
|
|
105
|
-
} from "./chunk-GDYU6VF4.js";
|
|
106
|
-
import {
|
|
107
|
-
sanitizeMemoryContent
|
|
108
|
-
} from "./chunk-5GKPFL3S.js";
|
|
109
|
-
import {
|
|
110
|
-
resolveLocalLlmCapabilities,
|
|
111
|
-
resolveMemoryLifecycleCapabilities,
|
|
112
|
-
resolvePipelineProcessingCapabilities,
|
|
113
|
-
resolveRecallAuxiliaryCapabilities
|
|
114
|
-
} from "./chunk-JUOZ62Y7.js";
|
|
115
|
-
import {
|
|
116
|
-
isAbortError
|
|
117
|
-
} from "./chunk-BTTPKDIL.js";
|
|
118
|
-
import {
|
|
119
|
-
log
|
|
120
|
-
} from "./chunk-3WCASNQZ.js";
|
|
121
|
-
|
|
122
|
-
// src/extraction.ts
|
|
123
|
-
import OpenAI from "openai";
|
|
124
|
-
|
|
125
|
-
// src/orchestration/dependency-revalidation.ts
|
|
126
|
-
function isPlainRecord2(value) {
|
|
127
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
128
|
-
}
|
|
129
|
-
function buildPrompt(superseded, replacement, dependents) {
|
|
130
|
-
const dependentPrompt = dependents.map(
|
|
131
|
-
(memory, index) => `[${index + 1}] id: ${memory.id} | category: ${memory.category}
|
|
132
|
-
${memory.content}`
|
|
133
|
-
).join("\n\n");
|
|
134
|
-
const input = `SUPERSEDED MEMORY (id: ${superseded.id}):
|
|
135
|
-
${superseded.content}
|
|
136
|
-
|
|
137
|
-
REPLACEMENT (id: ${replacement?.id ?? "none"}):
|
|
138
|
-
${replacement?.content ?? "none \u2014 the memory was removed without replacement"}
|
|
139
|
-
|
|
140
|
-
DEPENDENTS TO REVALIDATE (return exactly one verdict per id):
|
|
141
|
-
${dependentPrompt}`;
|
|
142
|
-
const instructionText = `You revalidate dependent memory claims after a supporting memory changes.
|
|
143
|
-
For each requested memory, decide whether its claim still holds.
|
|
144
|
-
Return valid JSON only:
|
|
145
|
-
{"verdicts":[{"memoryId":"id","verdict":"still_valid|invalidated|uncertain","reason":"brief reason"}]}
|
|
146
|
-
Never invent memory IDs. Use "uncertain" when the evidence is insufficient.`;
|
|
147
|
-
return { input, instructionText };
|
|
148
|
-
}
|
|
149
|
-
function normalizeVerdicts(parsed, dependents) {
|
|
150
|
-
const raw = isPlainRecord2(parsed) && Array.isArray(parsed.verdicts) ? parsed.verdicts : [];
|
|
151
|
-
const requested = new Set(dependents.map((memory) => memory.id));
|
|
152
|
-
const seen = /* @__PURE__ */ new Set();
|
|
153
|
-
const normalized = [];
|
|
154
|
-
for (const candidate of raw) {
|
|
155
|
-
if (!isPlainRecord2(candidate)) continue;
|
|
156
|
-
const memoryId = typeof candidate.memoryId === "string" ? candidate.memoryId.trim() : "";
|
|
157
|
-
if (!requested.has(memoryId) || seen.has(memoryId)) continue;
|
|
158
|
-
seen.add(memoryId);
|
|
159
|
-
const verdict = candidate.verdict === "still_valid" || candidate.verdict === "invalidated" || candidate.verdict === "uncertain" ? candidate.verdict : "uncertain";
|
|
160
|
-
normalized.push({
|
|
161
|
-
memoryId,
|
|
162
|
-
verdict,
|
|
163
|
-
...typeof candidate.reason === "string" ? { reason: candidate.reason } : {}
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
return dependents.map((memory) => {
|
|
167
|
-
const verdict = normalized.find((candidate) => candidate.memoryId === memory.id);
|
|
168
|
-
return verdict ?? { memoryId: memory.id, verdict: "uncertain" };
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
async function revalidateDependentsViaLlm(deps, superseded, replacement, dependents, options = {}) {
|
|
172
|
-
const { input, instructionText } = buildPrompt(superseded, replacement, dependents);
|
|
173
|
-
const maxTokens = Math.max(1024, dependents.length * 256);
|
|
174
|
-
const response = await deps.fastChatCompletion(
|
|
175
|
-
[
|
|
176
|
-
{ role: "system", content: instructionText },
|
|
177
|
-
{ role: "user", content: input }
|
|
178
|
-
],
|
|
179
|
-
{
|
|
180
|
-
temperature: 0.2,
|
|
181
|
-
maxTokens,
|
|
182
|
-
operation: "dependency_revalidation",
|
|
183
|
-
priority: "background",
|
|
184
|
-
timeoutMs: options.timeoutMs,
|
|
185
|
-
signal: options.signal
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
const rawContent = response?.content ?? null;
|
|
189
|
-
if (!rawContent?.trim()) {
|
|
190
|
-
throw new Error("fast completion returned no dependency revalidation output");
|
|
191
|
-
}
|
|
192
|
-
return { verdicts: normalizeVerdicts(deps.parseJsonObject(rawContent), dependents) };
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// src/extraction.ts
|
|
196
|
-
var PROACTIVE_MIN_CONFIDENCE = 0.8;
|
|
197
|
-
function extractionEntityType(value) {
|
|
198
|
-
const type = extractionText(value);
|
|
199
|
-
if (type === "person" || type === "project" || type === "tool" || type === "company" || type === "place" || type === "other") {
|
|
200
|
-
return type;
|
|
201
|
-
}
|
|
202
|
-
return void 0;
|
|
203
|
-
}
|
|
204
|
-
function normalizeQuestion(question) {
|
|
205
|
-
const priority = Number.isFinite(question.priority) ? Math.max(0, Math.min(1, question.priority)) : 0.5;
|
|
206
|
-
return {
|
|
207
|
-
question: typeof question.question === "string" ? question.question.trim() : "",
|
|
208
|
-
context: typeof question.context === "string" ? question.context.trim() : "",
|
|
209
|
-
priority
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function normalizeExtractedSpanRef(value) {
|
|
213
|
-
if (!isPlainRecord(value)) return void 0;
|
|
214
|
-
const { sourceMessageIndex, charStart, charEnd, frame, sourceHash, sourceLength } = value;
|
|
215
|
-
if (typeof sourceMessageIndex !== "number" || typeof charStart !== "number" || typeof charEnd !== "number" || typeof frame !== "string") {
|
|
216
|
-
return void 0;
|
|
217
|
-
}
|
|
218
|
-
return {
|
|
219
|
-
sourceMessageIndex,
|
|
220
|
-
charStart,
|
|
221
|
-
charEnd,
|
|
222
|
-
frame,
|
|
223
|
-
...typeof sourceHash === "string" && typeof sourceLength === "number" ? { sourceHash, sourceLength } : {}
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
function normalizeFactKey(fact) {
|
|
227
|
-
return `${fact.category}:${fact.content.trim().toLowerCase()}`;
|
|
228
|
-
}
|
|
229
|
-
function normalizeEntityKey(entity) {
|
|
230
|
-
return `${entity.type}:${entity.name.trim().toLowerCase()}`;
|
|
231
|
-
}
|
|
232
|
-
function normalizeRelationshipKey(relationship) {
|
|
233
|
-
return `${relationship.source.trim().toLowerCase()}=>${relationship.target.trim().toLowerCase()}:${relationship.label.trim().toLowerCase()}`;
|
|
234
|
-
}
|
|
235
|
-
function normalizeProfileUpdateKey(update) {
|
|
236
|
-
return update.trim().toLowerCase();
|
|
237
|
-
}
|
|
238
|
-
function shouldEnableLocalExtractionThinking(config, conversationChars) {
|
|
239
|
-
return config.localLlmDisableThinking && config.localLlmThinkingThresholdChars > 0 && conversationChars < config.localLlmThinkingThresholdChars;
|
|
240
|
-
}
|
|
241
|
-
function throwIfExtractionAborted(signal) {
|
|
242
|
-
if (!signal?.aborted) return;
|
|
243
|
-
const reason = signal.reason;
|
|
244
|
-
throw reason instanceof Error ? reason : new Error("extraction aborted");
|
|
245
|
-
}
|
|
246
|
-
var ExtractionEngine = class {
|
|
247
|
-
constructor(config, profilerArg, localLlm, gatewayConfig, modelRegistry, fastChatCompletion) {
|
|
248
|
-
this.config = config;
|
|
249
|
-
this.fastChatCompletion = fastChatCompletion;
|
|
250
|
-
this.profiler = profilerArg ?? new ProfilingCollector({ enabled: false, storageDir: "/tmp/engram-profiler-disabled", maxTraces: 0 });
|
|
251
|
-
if (config.openaiApiKey) {
|
|
252
|
-
this.client = new OpenAI({
|
|
253
|
-
apiKey: config.openaiApiKey,
|
|
254
|
-
...config.openaiBaseUrl ? { baseURL: config.openaiBaseUrl } : {}
|
|
255
|
-
});
|
|
256
|
-
} else {
|
|
257
|
-
this.client = null;
|
|
258
|
-
log.warn("no OpenAI API key \u2014 direct OpenAI client disabled; local and gateway fallback paths remain available");
|
|
259
|
-
}
|
|
260
|
-
this.localLlm = localLlm ?? new LocalLlmClient(config, modelRegistry);
|
|
261
|
-
this.fallbackLlm = new FallbackLlmClient(
|
|
262
|
-
gatewayConfig,
|
|
263
|
-
fallbackLlmRuntimeContextFromConfig(config)
|
|
264
|
-
);
|
|
265
|
-
this.modelRegistry = modelRegistry ?? new ModelRegistry(config.memoryDir);
|
|
266
|
-
if (config.modelSource === "gateway") {
|
|
267
|
-
log.debug(
|
|
268
|
-
`extraction engine: gateway model source active; extraction uses the gateway chain as its primary path` + (config.taskModelChain ? " (taskModelChain)" : config.gatewayAgentId ? ` (agent: ${config.gatewayAgentId})` : " (defaults)")
|
|
269
|
-
);
|
|
270
|
-
} else if (config.taskModelChain) {
|
|
271
|
-
log.warn(
|
|
272
|
-
`taskModelChain is set but modelSource is "${config.modelSource}"; the chain is ignored. Set modelSource: "gateway" to use it for extraction/consolidation/summarization.`
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
config;
|
|
277
|
-
fastChatCompletion;
|
|
278
|
-
client;
|
|
279
|
-
localLlm;
|
|
280
|
-
fallbackLlm;
|
|
281
|
-
modelRegistry;
|
|
282
|
-
profiler;
|
|
283
|
-
get useGatewayModelSource() {
|
|
284
|
-
return this.config.modelSource === "gateway";
|
|
285
|
-
}
|
|
286
|
-
get shouldUseLocalLlm() {
|
|
287
|
-
return resolveLocalLlmCapabilities(this.config).localLlm && !this.useGatewayModelSource;
|
|
288
|
-
}
|
|
289
|
-
get shouldUseDirectClient() {
|
|
290
|
-
return !this.useGatewayModelSource && this.client !== null;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Span-mode materialization (issue #2333 Phase B): sibling module, called
|
|
294
|
-
* after parse and before sanitize/grounding so downstream sees one content
|
|
295
|
-
* form. Offsets index the exact prompt turn texts and die at materialization.
|
|
296
|
-
*/
|
|
297
|
-
applySpanMaterialization(result, spanTurns) {
|
|
298
|
-
return applyExtractionSpanMaterialization(
|
|
299
|
-
result,
|
|
300
|
-
spanTurns,
|
|
301
|
-
this.config.extraction?.spanMode ?? "off"
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Build FallbackLlmOptions with the configured gateway agent ID injected.
|
|
306
|
-
*/
|
|
307
|
-
withGatewayAgent(options) {
|
|
308
|
-
if (!this.useGatewayModelSource) return options;
|
|
309
|
-
return { ...options, ...gatewayTaskChainOptions(this.config) };
|
|
310
|
-
}
|
|
311
|
-
emit(event) {
|
|
312
|
-
try {
|
|
313
|
-
const cb = globalThis.__openclawEngramTrace;
|
|
314
|
-
if (typeof cb === "function") cb(event);
|
|
315
|
-
} catch {
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
directClientUsesOpenAiTokenSemantics() {
|
|
319
|
-
return shouldAssumeOpenAiChatCompletions(this.config.openaiBaseUrl);
|
|
320
|
-
}
|
|
321
|
-
sanitizeExtractionResult(result, messageTimestamp) {
|
|
322
|
-
const proceduralOn = this.config.procedural?.enabled === true;
|
|
323
|
-
const ts = messageTimestamp ?? /* @__PURE__ */ new Date();
|
|
324
|
-
const facts = result.facts.filter((fact) => proceduralOn || fact.category !== "procedure").map((fact) => {
|
|
325
|
-
const sanitized = sanitizeMemoryContent(fact.content);
|
|
326
|
-
if (!sanitized.clean) {
|
|
327
|
-
log.warn(`extraction fact sanitized; violations=${sanitized.violations.join(", ")}`);
|
|
328
|
-
}
|
|
329
|
-
let content = sanitized.text;
|
|
330
|
-
if (resolvePipelineProcessingCapabilities(this.config).delinearize) {
|
|
331
|
-
content = delinearize(content, result.entities, ts);
|
|
332
|
-
}
|
|
333
|
-
return {
|
|
334
|
-
...fact,
|
|
335
|
-
content,
|
|
336
|
-
cueAnchors: extractionCueAnchors(fact.cueAnchors)
|
|
337
|
-
};
|
|
338
|
-
});
|
|
339
|
-
return { ...result, facts, episodeTitle: extractionText(result.episodeTitle) };
|
|
340
|
-
}
|
|
341
|
-
hasExtractionOutputs(result) {
|
|
342
|
-
return result.facts.length > 0 || result.entities.length > 0 || result.questions.length > 0 || result.profileUpdates.length > 0 || (result.relationships?.length ?? 0) > 0;
|
|
343
|
-
}
|
|
344
|
-
looksLikeExtractionResultPayload(parsed) {
|
|
345
|
-
return !!parsed && typeof parsed === "object" && !Array.isArray(parsed) && ("facts" in parsed || "entities" in parsed || "profileUpdates" in parsed || "questions" in parsed || "relationships" in parsed || "identityReflection" in parsed);
|
|
346
|
-
}
|
|
347
|
-
normalizeExtractionResultPayload(parsed) {
|
|
348
|
-
const entities = Array.isArray(parsed?.entities) ? parsed.entities.map((candidate) => this.normalizeEntityUpdate(candidate)).filter((entity) => entity !== void 0 && entity.name.length > 0) : [];
|
|
349
|
-
const facts = Array.isArray(parsed?.facts) ? parsed.facts.map((candidate) => {
|
|
350
|
-
const f = isPlainRecord(candidate) ? candidate : {};
|
|
351
|
-
const category = typeof f.category === "string" ? f.category.trim() : "fact";
|
|
352
|
-
const reasoningTraceInput = isPlainRecord(f.reasoningTrace) ? f.reasoningTrace : isPlainRecord(f?.reasoning_trace) ? f.reasoning_trace : void 0;
|
|
353
|
-
if (!isMemoryCategory(category)) return void 0;
|
|
354
|
-
const procedureSteps = Array.isArray(f.procedureSteps) ? normalizeProcedureSteps(f.procedureSteps) : void 0;
|
|
355
|
-
const reasoningTrace = reasoningTraceInput ? normalizeReasoningTrace(reasoningTraceInput) ?? void 0 : void 0;
|
|
356
|
-
if (containsExtractionPlaceholder(procedureSteps) || containsExtractionPlaceholder(reasoningTrace)) {
|
|
357
|
-
return void 0;
|
|
358
|
-
}
|
|
359
|
-
return {
|
|
360
|
-
category,
|
|
361
|
-
content: extractionText(f.content) ?? extractionText(f.text) ?? "",
|
|
362
|
-
confidence: typeof f.confidence === "number" ? f.confidence : 0.7,
|
|
363
|
-
tags: Array.isArray(f.tags) ? f.tags.flatMap((tag) => {
|
|
364
|
-
const text = extractionText(tag);
|
|
365
|
-
return text === void 0 ? [] : [text];
|
|
366
|
-
}) : [],
|
|
367
|
-
entityRef: extractionText(f.entityRef),
|
|
368
|
-
cueAnchors: extractionCueAnchors(f.cueAnchors),
|
|
369
|
-
promptedByQuestion: extractionText(f.promptedByQuestion),
|
|
370
|
-
scope: f.scope === "global" || f.scope === "project" ? f.scope : void 0,
|
|
371
|
-
subject: f.subject === "user" || f.subject === "agent" ? f.subject : void 0,
|
|
372
|
-
structuredAttributes: extractionAttributes(f.structuredAttributes),
|
|
373
|
-
procedureSteps,
|
|
374
|
-
reasoningTrace,
|
|
375
|
-
quote: extractionText(f.quote),
|
|
376
|
-
span: normalizeExtractedSpanRef(f.span),
|
|
377
|
-
eventTime: extractionText(f.eventTime) ?? extractionText(f.event_time)
|
|
378
|
-
};
|
|
379
|
-
}).filter((fact) => fact !== void 0 && fact.content.length > 0) : [];
|
|
380
|
-
const questions = Array.isArray(parsed?.questions) ? parsed.questions.flatMap((candidate) => {
|
|
381
|
-
const record = isPlainRecord(candidate) ? candidate : void 0;
|
|
382
|
-
const question = extractionText(record?.question) ?? extractionText(record?.text) ?? extractionText(candidate);
|
|
383
|
-
if (question === void 0) return [];
|
|
384
|
-
return [{
|
|
385
|
-
question,
|
|
386
|
-
context: extractionText(record?.context) ?? "",
|
|
387
|
-
priority: typeof record?.priority === "number" ? record.priority : 0.5
|
|
388
|
-
}];
|
|
389
|
-
}) : [];
|
|
390
|
-
const profileUpdates = Array.isArray(parsed?.profileUpdates) ? parsed.profileUpdates.flatMap((candidate) => {
|
|
391
|
-
const update = extractionText(candidate);
|
|
392
|
-
return update === void 0 ? [] : [update];
|
|
393
|
-
}) : [];
|
|
394
|
-
const relationships = Array.isArray(parsed?.relationships) ? parsed.relationships.flatMap((candidate) => {
|
|
395
|
-
const relationship = isPlainRecord(candidate) ? candidate : void 0;
|
|
396
|
-
const source = extractionText(relationship?.source);
|
|
397
|
-
const target = extractionText(relationship?.target);
|
|
398
|
-
const label = extractionText(relationship?.label);
|
|
399
|
-
if (source === void 0 || target === void 0 || label === void 0) return [];
|
|
400
|
-
return [{
|
|
401
|
-
source,
|
|
402
|
-
target,
|
|
403
|
-
label,
|
|
404
|
-
promptedByQuestion: extractionText(relationship?.promptedByQuestion)
|
|
405
|
-
}];
|
|
406
|
-
}) : void 0;
|
|
407
|
-
return {
|
|
408
|
-
facts,
|
|
409
|
-
entities,
|
|
410
|
-
profileUpdates,
|
|
411
|
-
questions,
|
|
412
|
-
identityReflection: extractionText(parsed?.identityReflection),
|
|
413
|
-
episodeTitle: extractionText(parsed?.episodeTitle),
|
|
414
|
-
relationships
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
normalizeEntityUpdate(entity) {
|
|
418
|
-
const record = isPlainRecord(entity) ? entity : {};
|
|
419
|
-
const rawUpdates = isPlainRecord(record.updates) ? record.updates : void 0;
|
|
420
|
-
const normalizedTexts = (value) => Array.isArray(value) ? value.flatMap((candidate) => {
|
|
421
|
-
const text = extractionText(candidate);
|
|
422
|
-
return text === void 0 ? [] : [text];
|
|
423
|
-
}) : [];
|
|
424
|
-
const directFacts = normalizedTexts(record.facts);
|
|
425
|
-
const updateFacts = normalizedTexts(rawUpdates?.facts);
|
|
426
|
-
const scalarUpdateFacts = rawUpdates ? Object.entries(rawUpdates).sort(([left], [right]) => left.localeCompare(right)).flatMap(([key, value]) => {
|
|
427
|
-
if (["facts", "name", "promptedByQuestion", "structuredSections", "type"].includes(key)) {
|
|
428
|
-
return [];
|
|
429
|
-
}
|
|
430
|
-
const normalizedKey = extractionText(key);
|
|
431
|
-
if (normalizedKey === void 0) return [];
|
|
432
|
-
const normalizedValue = extractionText(value);
|
|
433
|
-
if (normalizedValue !== void 0) return [`${normalizedKey}: ${normalizedValue}`];
|
|
434
|
-
if (typeof value === "number" || typeof value === "boolean") {
|
|
435
|
-
return [`${normalizedKey}: ${String(value)}`];
|
|
436
|
-
}
|
|
437
|
-
return [];
|
|
438
|
-
}) : [];
|
|
439
|
-
const structuredSectionsSource = Array.isArray(record.structuredSections) ? record.structuredSections : Array.isArray(rawUpdates?.structuredSections) ? rawUpdates.structuredSections : [];
|
|
440
|
-
const structuredSections = structuredSectionsSource.flatMap((candidate) => {
|
|
441
|
-
const section = isPlainRecord(candidate) ? candidate : {};
|
|
442
|
-
const key = extractionText(section.key);
|
|
443
|
-
const title = extractionText(section.title);
|
|
444
|
-
const facts = normalizedTexts(section.facts);
|
|
445
|
-
if (key === void 0 || title === void 0 || facts.length === 0) return [];
|
|
446
|
-
return [{ key, title, facts }];
|
|
447
|
-
});
|
|
448
|
-
const rawType = record.type ?? rawUpdates?.type;
|
|
449
|
-
const type = rawType === void 0 ? "other" : extractionEntityType(rawType);
|
|
450
|
-
if (type === void 0) return void 0;
|
|
451
|
-
return {
|
|
452
|
-
name: extractionText(record.name) ?? extractionText(record.entityId) ?? extractionText(rawUpdates?.name) ?? "",
|
|
453
|
-
type,
|
|
454
|
-
facts: [...directFacts, ...updateFacts, ...scalarUpdateFacts],
|
|
455
|
-
structuredSections: structuredSections.length > 0 ? structuredSections : void 0,
|
|
456
|
-
promptedByQuestion: extractionText(record.promptedByQuestion) ?? extractionText(rawUpdates?.promptedByQuestion)
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
parseJsonObject(content) {
|
|
460
|
-
const trimmed = content?.trim();
|
|
461
|
-
if (!trimmed) return null;
|
|
462
|
-
for (const candidate of extractJsonCandidates(trimmed)) {
|
|
463
|
-
try {
|
|
464
|
-
return JSON.parse(candidate);
|
|
465
|
-
} catch {
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
|
-
normalizeContradictionVerificationResult(parsed) {
|
|
471
|
-
if (!parsed || typeof parsed.isContradiction !== "boolean") return null;
|
|
472
|
-
const rawWhich = parsed.whichIsNewer ?? parsed.winner;
|
|
473
|
-
const normalizedWhich = rawWhich === "first" || rawWhich === "existing" ? "first" : rawWhich === "second" || rawWhich === "new" ? "second" : "unclear";
|
|
474
|
-
return {
|
|
475
|
-
isContradiction: Boolean(parsed.isContradiction),
|
|
476
|
-
confidence: typeof parsed.confidence === "number" ? parsed.confidence : 0.5,
|
|
477
|
-
reasoning: typeof parsed.reasoning === "string" ? parsed.reasoning : typeof parsed.explanation === "string" ? parsed.explanation : "",
|
|
478
|
-
whichIsNewer: normalizedWhich
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
normalizeSuggestedLinksResult(parsed) {
|
|
482
|
-
if (!parsed || !Array.isArray(parsed.links)) {
|
|
483
|
-
return null;
|
|
484
|
-
}
|
|
485
|
-
const normalizedLinks = parsed.links.map((link) => {
|
|
486
|
-
const rawLinkType = link?.linkType ?? link?.type;
|
|
487
|
-
return {
|
|
488
|
-
targetId: typeof link?.targetId === "string" ? link.targetId : "",
|
|
489
|
-
linkType: rawLinkType === "follows" || rawLinkType === "references" || rawLinkType === "contradicts" || rawLinkType === "supports" || rawLinkType === "related" ? rawLinkType : "related",
|
|
490
|
-
strength: typeof link?.strength === "number" ? Math.max(0, Math.min(1, link.strength)) : 0.5,
|
|
491
|
-
reason: typeof link?.reason === "string" ? link.reason : void 0
|
|
492
|
-
};
|
|
493
|
-
}).filter((link) => link.targetId.length > 0);
|
|
494
|
-
return { links: normalizedLinks };
|
|
495
|
-
}
|
|
496
|
-
normalizeMemorySummaryResult(parsed) {
|
|
497
|
-
if (!parsed) return null;
|
|
498
|
-
const normalized = {
|
|
499
|
-
summaryText: typeof parsed.summaryText === "string" ? parsed.summaryText : typeof parsed.summary === "string" ? parsed.summary : "",
|
|
500
|
-
keyFacts: Array.isArray(parsed.keyFacts) ? parsed.keyFacts.filter((f) => typeof f === "string") : [],
|
|
501
|
-
keyEntities: Array.isArray(parsed.keyEntities) ? parsed.keyEntities.filter((e) => typeof e === "string") : Array.isArray(parsed.entities) ? parsed.entities.filter((e) => typeof e === "string") : []
|
|
502
|
-
};
|
|
503
|
-
return normalized.summaryText.length > 0 ? normalized : null;
|
|
504
|
-
}
|
|
505
|
-
normalizeDaySummaryResult(parsed) {
|
|
506
|
-
if (!parsed) return null;
|
|
507
|
-
const normalized = {
|
|
508
|
-
summary: typeof parsed.summary === "string" ? parsed.summary.trim() : "",
|
|
509
|
-
bullets: Array.isArray(parsed.bullets) ? parsed.bullets.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean) : [],
|
|
510
|
-
next_actions: Array.isArray(parsed.next_actions) ? parsed.next_actions.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean) : [],
|
|
511
|
-
risks_or_open_loops: Array.isArray(parsed.risks_or_open_loops) ? parsed.risks_or_open_loops.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean) : []
|
|
512
|
-
};
|
|
513
|
-
return normalized.summary.length > 0 ? normalized : null;
|
|
514
|
-
}
|
|
515
|
-
sanitizeConsolidationResult(result) {
|
|
516
|
-
const items = [];
|
|
517
|
-
for (const item of Array.isArray(result.items) ? result.items : []) {
|
|
518
|
-
const rawAction = typeof item?.action === "string" ? item.action.toUpperCase() : "SKIP";
|
|
519
|
-
const action = rawAction === "ADD" || rawAction === "MERGE" || rawAction === "UPDATE" || rawAction === "INVALIDATE" || rawAction === "SKIP" ? rawAction : "SKIP";
|
|
520
|
-
const existingId = typeof item?.existingId === "string" ? item.existingId.trim() : typeof item?.newMemoryId === "string" ? item.newMemoryId.trim() : typeof item?.memoryId === "string" ? item.memoryId.trim() : "";
|
|
521
|
-
if (!existingId) continue;
|
|
522
|
-
const mergeWith = typeof item?.mergeWith === "string" ? item.mergeWith : void 0;
|
|
523
|
-
const reason = typeof item?.reason === "string" ? item.reason : "";
|
|
524
|
-
const rawUpdatedContent = typeof item?.updatedContent === "string" ? item.updatedContent : void 0;
|
|
525
|
-
if (!rawUpdatedContent) {
|
|
526
|
-
items.push({ existingId, action, mergeWith, updatedContent: void 0, reason });
|
|
527
|
-
continue;
|
|
528
|
-
}
|
|
529
|
-
const sanitized = sanitizeMemoryContent(rawUpdatedContent);
|
|
530
|
-
if (!sanitized.clean) {
|
|
531
|
-
log.warn(`consolidation item sanitized (${existingId}); violations=${sanitized.violations.join(", ")}`);
|
|
532
|
-
}
|
|
533
|
-
items.push({
|
|
534
|
-
existingId,
|
|
535
|
-
action,
|
|
536
|
-
mergeWith,
|
|
537
|
-
updatedContent: sanitized.text,
|
|
538
|
-
reason
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
const profileUpdates = (Array.isArray(result.profileUpdates) ? result.profileUpdates : []).map(
|
|
542
|
-
(update) => typeof update === "string" ? update.trim() : typeof update?.content === "string" ? update.content.trim() : ""
|
|
543
|
-
).filter((update) => update.length > 0);
|
|
544
|
-
const entityUpdates = (Array.isArray(result.entityUpdates) ? result.entityUpdates : []).map((entity) => this.normalizeEntityUpdate(entity)).filter((entity) => entity !== void 0 && entity.name.length > 0);
|
|
545
|
-
return { items, profileUpdates, entityUpdates };
|
|
546
|
-
}
|
|
547
|
-
async applyProactiveQuestionPass(conversation, base, ctx, signal) {
|
|
548
|
-
if (!resolvePipelineProcessingCapabilities(this.config).proactiveExtraction) return base;
|
|
549
|
-
const maxAdditional = Math.max(0, Math.floor(this.config.maxProactiveQuestionsPerExtraction));
|
|
550
|
-
if (!shouldRunProactivePass(this.config, maxAdditional, this.shouldUseLocalLlm, this.localLlm)) return base;
|
|
551
|
-
try {
|
|
552
|
-
const proactive = await this.generateProactiveQuestions(conversation, base, maxAdditional, ctx.ambientCapture === true, signal);
|
|
553
|
-
if (proactive.length === 0) return base;
|
|
554
|
-
const ambient = ctx.ambientCapture === true;
|
|
555
|
-
const proactiveAdditions = await this.answerProactiveQuestions(
|
|
556
|
-
conversation,
|
|
557
|
-
base,
|
|
558
|
-
proactive,
|
|
559
|
-
maxAdditional,
|
|
560
|
-
ctx.sourceConnector,
|
|
561
|
-
ambient,
|
|
562
|
-
signal
|
|
563
|
-
);
|
|
564
|
-
const sanitizedAdditions = this.sanitizeExtractionResult({ ...proactiveAdditions, facts: stripUntrustedFactSpans(proactiveAdditions.facts) }, ctx.messageTimestamp);
|
|
565
|
-
const groundedAdditions = applyGroundingWithConnector(this.config, sanitizedAdditions, ctx);
|
|
566
|
-
if (!this.hasExtractionOutputs(groundedAdditions)) return base;
|
|
567
|
-
return this.mergeProactiveExtractionPass(base, groundedAdditions, maxAdditional);
|
|
568
|
-
} catch (err) {
|
|
569
|
-
if (signal?.aborted) throw err;
|
|
570
|
-
log.debug(`proactive extraction question pass failed (ignored): ${err}`);
|
|
571
|
-
return base;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
parseProactiveQuestionsFromText(content, existingQuestionKeys) {
|
|
575
|
-
for (const candidate of extractJsonCandidates(content)) {
|
|
576
|
-
try {
|
|
577
|
-
const parsed = JSON.parse(candidate);
|
|
578
|
-
if (!Array.isArray(parsed.questions)) continue;
|
|
579
|
-
return parsed.questions.map((q) => normalizeQuestion(q)).filter((q) => q.question.length > 0).filter((q) => !existingQuestionKeys.has(q.question.toLowerCase()));
|
|
580
|
-
} catch {
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
return [];
|
|
584
|
-
}
|
|
585
|
-
parseProactiveExtractionResultFromText(content) {
|
|
586
|
-
for (const candidate of extractJsonCandidates(content)) {
|
|
587
|
-
try {
|
|
588
|
-
const parsed = ProactiveExtractionResultSchema.parse(JSON.parse(candidate));
|
|
589
|
-
return this.normalizeExtractionResultPayload({
|
|
590
|
-
...parsed,
|
|
591
|
-
questions: []
|
|
592
|
-
});
|
|
593
|
-
} catch {
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
return null;
|
|
597
|
-
}
|
|
598
|
-
async generateProactiveQuestions(conversation, base, maxAdditional, ambientCapture, signal) {
|
|
599
|
-
const existingQuestionKeys = new Set(
|
|
600
|
-
(base.questions ?? []).map((q) => q.question.trim().toLowerCase()).filter((q) => q.length > 0)
|
|
601
|
-
);
|
|
602
|
-
const factsPreview = base.facts.slice(0, 8).map((f) => `- (${f.category}) ${f.content}`).join("\n");
|
|
603
|
-
const existingQuestionsPreview = (base.questions ?? []).slice(0, 8).map((q) => `- ${q.question}`).join("\n");
|
|
604
|
-
const prompt = [
|
|
605
|
-
"You are doing a proactive second-pass memory extraction.",
|
|
606
|
-
`Generate up to ${maxAdditional} additional high-value follow-up questions not already covered.${ambientCapture ? AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT : ""}`,
|
|
607
|
-
OUTPUT_LANGUAGE_POLICY,
|
|
608
|
-
"Return only valid JSON with this shape:",
|
|
609
|
-
'{"questions":[{"question":"...","context":"...","priority":0.0}]}',
|
|
610
|
-
"",
|
|
611
|
-
"Current extracted facts:",
|
|
612
|
-
factsPreview || "(none)",
|
|
613
|
-
"",
|
|
614
|
-
"Questions already extracted (do not repeat):",
|
|
615
|
-
existingQuestionsPreview || "(none)",
|
|
616
|
-
"",
|
|
617
|
-
"Conversation:",
|
|
618
|
-
conversation
|
|
619
|
-
].join("\n");
|
|
620
|
-
if (this.shouldUseLocalLlm) {
|
|
621
|
-
try {
|
|
622
|
-
const localResponse = await this.localLlm.chatCompletion(
|
|
623
|
-
[
|
|
624
|
-
{
|
|
625
|
-
role: "system",
|
|
626
|
-
content: "You are a proactive memory extraction assistant. Output valid JSON only."
|
|
627
|
-
},
|
|
628
|
-
{ role: "user", content: prompt }
|
|
629
|
-
],
|
|
630
|
-
{
|
|
631
|
-
temperature: 0.2,
|
|
632
|
-
maxTokens: this.config.proactiveExtractionMaxTokens,
|
|
633
|
-
timeoutMs: this.config.proactiveExtractionTimeoutMs,
|
|
634
|
-
operation: "proactive_extraction",
|
|
635
|
-
priority: "background",
|
|
636
|
-
signal
|
|
637
|
-
}
|
|
638
|
-
);
|
|
639
|
-
throwIfExtractionAborted(signal);
|
|
640
|
-
if (localResponse?.content) {
|
|
641
|
-
const localParsed = this.parseProactiveQuestionsFromText(
|
|
642
|
-
localResponse.content.trim(),
|
|
643
|
-
existingQuestionKeys
|
|
644
|
-
);
|
|
645
|
-
if (localParsed.length > 0) {
|
|
646
|
-
return localParsed.slice(0, maxAdditional);
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
if (!this.config.localLlmFallback) {
|
|
650
|
-
return [];
|
|
651
|
-
}
|
|
652
|
-
} catch (err) {
|
|
653
|
-
if (signal?.aborted || !this.config.localLlmFallback) {
|
|
654
|
-
throw err;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
const fallbackResult = await this.fallbackLlm.parseWithSchema(
|
|
659
|
-
[
|
|
660
|
-
{
|
|
661
|
-
role: "system",
|
|
662
|
-
content: "Generate additional proactive memory follow-up questions. Return valid JSON only."
|
|
663
|
-
},
|
|
664
|
-
{ role: "user", content: prompt }
|
|
665
|
-
],
|
|
666
|
-
ProactiveQuestionsResultSchema,
|
|
667
|
-
this.withGatewayAgent({
|
|
668
|
-
temperature: 0.2,
|
|
669
|
-
maxTokens: this.config.proactiveExtractionMaxTokens,
|
|
670
|
-
timeoutMs: this.config.proactiveExtractionTimeoutMs,
|
|
671
|
-
signal
|
|
672
|
-
})
|
|
673
|
-
);
|
|
674
|
-
if (!fallbackResult?.questions) return [];
|
|
675
|
-
return fallbackResult.questions.map((q) => normalizeQuestion(q)).filter((q) => q.question.length > 0).filter((q) => !existingQuestionKeys.has(q.question.toLowerCase())).slice(0, maxAdditional);
|
|
676
|
-
}
|
|
677
|
-
async answerProactiveQuestions(conversation, base, proactiveQuestions, maxAdditional, sourceConnector, ambientCapture, signal) {
|
|
678
|
-
const factsPreview = base.facts.slice(0, 8).map((f) => `- (${f.category}) ${f.content}`).join("\n");
|
|
679
|
-
const entitiesPreview = base.entities.slice(0, 8).map((entity) => `- (${entity.type}) ${entity.name}: ${entity.facts.join("; ") || "(no facts)"}`).join("\n");
|
|
680
|
-
const proactivePreview = proactiveQuestions.slice(0, maxAdditional).map((question, index) => `${index + 1}. ${question.question}${question.context ? `
|
|
681
|
-
context: ${question.context}` : ""}`).join("\n");
|
|
682
|
-
const prompt = [
|
|
683
|
-
"You are answering proactive memory follow-up questions using only the provided buffered conversation.",
|
|
684
|
-
`Return at most ${maxAdditional} additional high-confidence memory candidates that were omitted from the base extraction.`,
|
|
685
|
-
`Only include information directly supported by the conversation. Do not speculate. Do not repeat the base extraction.${ambientCapture ? AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT : ""}`,
|
|
686
|
-
OUTPUT_LANGUAGE_POLICY,
|
|
687
|
-
"Return only valid JSON with this shape:",
|
|
688
|
-
'{"facts":[{"category":"fact","content":"...","confidence":0.0,"tags":["..."],"entityRef":"optional","promptedByQuestion":"optional","quote":"optional verbatim span from a single turn"}],"profileUpdates":["..."],"entities":[{"name":"...","type":"person","facts":["..."],"structuredSections":[{"key":"beliefs","title":"Beliefs","facts":["..."]}],"promptedByQuestion":"optional"}],"relationships":[{"source":"...","target":"...","label":"...","promptedByQuestion":"optional"}]}',
|
|
689
|
-
this.config.provenance?.enabled ? '- Source quotes: For each fact, include a "quote" field with the EXACT verbatim words from the conversation that support the fact (a contiguous span from a single turn, not a paraphrase). Cap at ~300 chars.' : "",
|
|
690
|
-
// #1578: emit the same event-time guidance as the primary extraction
|
|
691
|
-
// paths so proactive-recovered facts also carry an optional eventTime
|
|
692
|
-
// (chatgpt-codex thread on extraction.ts:1607). Returns "" when the
|
|
693
|
-
// bi-temporal gate is off, keeping the prompt unchanged by default.
|
|
694
|
-
eventTimePromptInstruction(this.config),
|
|
695
|
-
headerConnector(sourceConnector) !== void 0 && resolveMemoryLifecycleCapabilities(this.config).extractionScopeClassification ? `Tool, command, or CLI-flag instructions tied to the ${sourceConnector} agent are "project" scope; when you recover one, begin the fact with a leading "In ${sourceConnector}, " clause naming that agent (e.g. "In ${sourceConnector}, use the search tool with a repository path.").` : "",
|
|
696
|
-
"",
|
|
697
|
-
"Base extracted facts (do not repeat):",
|
|
698
|
-
factsPreview || "(none)",
|
|
699
|
-
"",
|
|
700
|
-
"Base extracted entities (do not repeat):",
|
|
701
|
-
entitiesPreview || "(none)",
|
|
702
|
-
"",
|
|
703
|
-
"Answer these follow-up questions from the same conversation only:",
|
|
704
|
-
proactivePreview || "(none)",
|
|
705
|
-
"",
|
|
706
|
-
"Conversation:",
|
|
707
|
-
conversation
|
|
708
|
-
].join("\n");
|
|
709
|
-
if (this.shouldUseLocalLlm) {
|
|
710
|
-
try {
|
|
711
|
-
const localResponse = await this.localLlm.chatCompletion(
|
|
712
|
-
[
|
|
713
|
-
{
|
|
714
|
-
role: "system",
|
|
715
|
-
content: "You are a proactive memory extraction assistant. Output valid JSON only."
|
|
716
|
-
},
|
|
717
|
-
{ role: "user", content: prompt }
|
|
718
|
-
],
|
|
719
|
-
{
|
|
720
|
-
temperature: 0.2,
|
|
721
|
-
maxTokens: this.config.proactiveExtractionMaxTokens,
|
|
722
|
-
timeoutMs: this.config.proactiveExtractionTimeoutMs,
|
|
723
|
-
operation: "proactive_extraction",
|
|
724
|
-
priority: "background",
|
|
725
|
-
signal
|
|
726
|
-
}
|
|
727
|
-
);
|
|
728
|
-
throwIfExtractionAborted(signal);
|
|
729
|
-
if (localResponse?.content) {
|
|
730
|
-
const parsed = this.parseProactiveExtractionResultFromText(localResponse.content.trim());
|
|
731
|
-
if (parsed) {
|
|
732
|
-
return parsed;
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
if (!this.config.localLlmFallback) {
|
|
736
|
-
return { facts: [], profileUpdates: [], entities: [], questions: [] };
|
|
737
|
-
}
|
|
738
|
-
} catch (err) {
|
|
739
|
-
if (signal?.aborted || !this.config.localLlmFallback) {
|
|
740
|
-
throw err;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
const fallbackResult = await this.fallbackLlm.parseWithSchema(
|
|
745
|
-
[
|
|
746
|
-
{
|
|
747
|
-
role: "system",
|
|
748
|
-
content: "Answer proactive memory follow-up questions from the provided conversation only. Return valid JSON only."
|
|
749
|
-
},
|
|
750
|
-
{ role: "user", content: prompt }
|
|
751
|
-
],
|
|
752
|
-
ProactiveExtractionResultSchema,
|
|
753
|
-
this.withGatewayAgent({
|
|
754
|
-
temperature: 0.2,
|
|
755
|
-
maxTokens: this.config.proactiveExtractionMaxTokens,
|
|
756
|
-
timeoutMs: this.config.proactiveExtractionTimeoutMs,
|
|
757
|
-
signal
|
|
758
|
-
})
|
|
759
|
-
);
|
|
760
|
-
if (!fallbackResult) {
|
|
761
|
-
return { facts: [], profileUpdates: [], entities: [], questions: [] };
|
|
762
|
-
}
|
|
763
|
-
return this.normalizeExtractionResultPayload({
|
|
764
|
-
...fallbackResult,
|
|
765
|
-
questions: []
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
mergeProactiveExtractionPass(base, proactive, maxAdditional) {
|
|
769
|
-
const allowlist = this.config.proactiveExtractionCategoryAllowlist;
|
|
770
|
-
let remainingBudget = Math.max(0, Math.floor(maxAdditional));
|
|
771
|
-
const mergedFacts = [...base.facts];
|
|
772
|
-
const seenFacts = new Set(base.facts.map((fact) => normalizeFactKey(fact)));
|
|
773
|
-
for (const fact of proactive.facts) {
|
|
774
|
-
if (remainingBudget <= 0) break;
|
|
775
|
-
if (fact.confidence < PROACTIVE_MIN_CONFIDENCE) continue;
|
|
776
|
-
if (allowlist && !allowlist.includes(fact.category)) continue;
|
|
777
|
-
const key = normalizeFactKey(fact);
|
|
778
|
-
if (seenFacts.has(key)) continue;
|
|
779
|
-
seenFacts.add(key);
|
|
780
|
-
mergedFacts.push({ ...fact, source: "proactive" });
|
|
781
|
-
remainingBudget -= 1;
|
|
782
|
-
}
|
|
783
|
-
const mergedEntities = base.entities.map((entity) => ({
|
|
784
|
-
...entity,
|
|
785
|
-
facts: [...entity.facts],
|
|
786
|
-
structuredSections: entity.structuredSections ? entity.structuredSections.map((section) => ({
|
|
787
|
-
...section,
|
|
788
|
-
facts: [...section.facts]
|
|
789
|
-
})) : void 0
|
|
790
|
-
}));
|
|
791
|
-
const entityIndex = new Map(mergedEntities.map((entity, index) => [normalizeEntityKey(entity), index]));
|
|
792
|
-
for (const entity of proactive.entities) {
|
|
793
|
-
if (remainingBudget <= 0) break;
|
|
794
|
-
const key = normalizeEntityKey(entity);
|
|
795
|
-
const existingIndex = entityIndex.get(key);
|
|
796
|
-
if (typeof existingIndex === "number") {
|
|
797
|
-
const existing = mergedEntities[existingIndex];
|
|
798
|
-
const nextFacts = new Set(existing.facts.map((fact) => fact.trim()));
|
|
799
|
-
const nextSections = new Map(
|
|
800
|
-
(existing.structuredSections ?? []).map((section) => [section.key, {
|
|
801
|
-
...section,
|
|
802
|
-
facts: [...section.facts]
|
|
803
|
-
}])
|
|
804
|
-
);
|
|
805
|
-
let changed = false;
|
|
806
|
-
for (const fact of entity.facts) {
|
|
807
|
-
const trimmed = fact.trim();
|
|
808
|
-
if (!trimmed || nextFacts.has(trimmed)) continue;
|
|
809
|
-
nextFacts.add(trimmed);
|
|
810
|
-
changed = true;
|
|
811
|
-
}
|
|
812
|
-
for (const section of entity.structuredSections ?? []) {
|
|
813
|
-
const existingSection = nextSections.get(section.key);
|
|
814
|
-
if (!existingSection) {
|
|
815
|
-
nextSections.set(section.key, {
|
|
816
|
-
key: section.key,
|
|
817
|
-
title: section.title,
|
|
818
|
-
facts: [...section.facts]
|
|
819
|
-
});
|
|
820
|
-
changed = true;
|
|
821
|
-
continue;
|
|
822
|
-
}
|
|
823
|
-
const nextSectionFacts = new Set(existingSection.facts.map((fact) => fact.trim()));
|
|
824
|
-
for (const fact of section.facts) {
|
|
825
|
-
const trimmed = fact.trim();
|
|
826
|
-
if (!trimmed || nextSectionFacts.has(trimmed)) continue;
|
|
827
|
-
nextSectionFacts.add(trimmed);
|
|
828
|
-
changed = true;
|
|
829
|
-
}
|
|
830
|
-
existingSection.facts = Array.from(nextSectionFacts);
|
|
831
|
-
}
|
|
832
|
-
if (changed) {
|
|
833
|
-
mergedEntities[existingIndex] = {
|
|
834
|
-
...existing,
|
|
835
|
-
facts: Array.from(nextFacts),
|
|
836
|
-
structuredSections: Array.from(nextSections.values()),
|
|
837
|
-
source: "proactive",
|
|
838
|
-
promptedByQuestion: existing.promptedByQuestion ?? entity.promptedByQuestion
|
|
839
|
-
};
|
|
840
|
-
remainingBudget -= 1;
|
|
841
|
-
}
|
|
842
|
-
continue;
|
|
843
|
-
}
|
|
844
|
-
mergedEntities.push({
|
|
845
|
-
...entity,
|
|
846
|
-
source: "proactive",
|
|
847
|
-
structuredSections: entity.structuredSections ? entity.structuredSections.map((section) => ({
|
|
848
|
-
...section,
|
|
849
|
-
facts: [...section.facts]
|
|
850
|
-
})) : void 0
|
|
851
|
-
});
|
|
852
|
-
entityIndex.set(key, mergedEntities.length - 1);
|
|
853
|
-
remainingBudget -= 1;
|
|
854
|
-
}
|
|
855
|
-
const mergedProfileUpdates = [...base.profileUpdates];
|
|
856
|
-
const seenProfileUpdates = new Set(base.profileUpdates.map((update) => normalizeProfileUpdateKey(update)));
|
|
857
|
-
for (const update of proactive.profileUpdates) {
|
|
858
|
-
if (remainingBudget <= 0) break;
|
|
859
|
-
const key = normalizeProfileUpdateKey(update);
|
|
860
|
-
if (!key || seenProfileUpdates.has(key)) continue;
|
|
861
|
-
seenProfileUpdates.add(key);
|
|
862
|
-
mergedProfileUpdates.push(update.trim());
|
|
863
|
-
remainingBudget -= 1;
|
|
864
|
-
}
|
|
865
|
-
const mergedRelationships = [...base.relationships ?? []];
|
|
866
|
-
const seenRelationships = new Set(mergedRelationships.map((relationship) => normalizeRelationshipKey(relationship)));
|
|
867
|
-
for (const relationship of proactive.relationships ?? []) {
|
|
868
|
-
if (remainingBudget <= 0) break;
|
|
869
|
-
const key = normalizeRelationshipKey(relationship);
|
|
870
|
-
if (seenRelationships.has(key)) continue;
|
|
871
|
-
seenRelationships.add(key);
|
|
872
|
-
mergedRelationships.push({ ...relationship, extractionSource: "proactive" });
|
|
873
|
-
remainingBudget -= 1;
|
|
874
|
-
}
|
|
875
|
-
return {
|
|
876
|
-
...base,
|
|
877
|
-
facts: mergedFacts,
|
|
878
|
-
entities: mergedEntities,
|
|
879
|
-
profileUpdates: mergedProfileUpdates,
|
|
880
|
-
relationships: mergedRelationships
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
async parseWithGatewayFallback(traceId, operation, startedAtMs, schema, messages, options = {}) {
|
|
884
|
-
const detailed = await this.fallbackLlm.parseWithSchemaDetailed(messages, schema, this.withGatewayAgent(options));
|
|
885
|
-
if ("modelUsed" in detailed) {
|
|
886
|
-
const durationMs = Date.now() - startedAtMs;
|
|
887
|
-
this.emit({
|
|
888
|
-
kind: "llm_end",
|
|
889
|
-
traceId,
|
|
890
|
-
model: detailed.modelUsed,
|
|
891
|
-
operation,
|
|
892
|
-
durationMs,
|
|
893
|
-
output: JSON.stringify(detailed.result).slice(0, 2e3)
|
|
894
|
-
});
|
|
895
|
-
return detailed.result;
|
|
896
|
-
}
|
|
897
|
-
return null;
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* The one funnel every successful extraction path returns through — local
|
|
901
|
-
* LLM, direct client, and gateway fallback alike. The ambient clamp lives
|
|
902
|
-
* here so a new path cannot bypass it (issue #2294).
|
|
903
|
-
*/
|
|
904
|
-
finalizeExtractionResult(result, turns, sourceConnector, ambientCapture = false) {
|
|
905
|
-
const clamped = ambientCapture ? clampAmbientCaptureConfidence(result) : result;
|
|
906
|
-
const provenanced = attachExtractionProvenance(clamped, turns, this.config.provenance);
|
|
907
|
-
return sourceConnector === void 0 ? provenanced : { ...provenanced, sourceConnector };
|
|
908
|
-
}
|
|
909
|
-
async extract(turns, existingEntities, signal) {
|
|
910
|
-
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
911
|
-
const substantiveTurns = turns.filter((t) => t.content.trim().length > 0);
|
|
912
|
-
if (substantiveTurns.length === 0) {
|
|
913
|
-
log.debug("extraction skipped \u2014 no substantive turns in buffer");
|
|
914
|
-
return { facts: [], profileUpdates: [], entities: [], questions: [] };
|
|
915
|
-
}
|
|
916
|
-
const boundedTurns = substantiveTurns.map((turn) => ({
|
|
917
|
-
...turn,
|
|
918
|
-
content: turn.role === "assistant" ? applyWorkExtractionBoundary(turn.content) : turn.content
|
|
919
|
-
})).filter((turn) => turn.content.trim().length > 0);
|
|
920
|
-
const resolvedConnector = resolveSourceConnector(boundedTurns);
|
|
921
|
-
const ambientCapture = boundedTurns.some(
|
|
922
|
-
(turn) => turn.ambientCapture === true && turn.extractionContextOnly !== true
|
|
923
|
-
);
|
|
924
|
-
const sourceConnector = lifecycleCaps.extractionScopeClassification ? resolvedConnector : void 0;
|
|
925
|
-
const { conversation, renderedConversation } = renderExtractionConversation(boundedTurns, headerConnector(sourceConnector));
|
|
926
|
-
const spanTurns = buildSpanMaterializeTurns(boundedTurns.map((turn) => turn.content));
|
|
927
|
-
const groundingSource = boundedTurns.map((turn) => turn.content).join("\n\n");
|
|
928
|
-
const assertionSource = boundedTurns.filter((turn) => turn.extractionContextOnly !== true).map((turn) => turn.content).join("\n\n");
|
|
929
|
-
const roleAssertionSources = {
|
|
930
|
-
profile: boundedTurns.filter((turn) => turn.role === "user" && turn.extractionContextOnly !== true).map((turn) => turn.content).join("\n\n"),
|
|
931
|
-
identity: boundedTurns.filter((turn) => turn.role === "assistant" && turn.extractionContextOnly !== true).map((turn) => turn.content).join("\n\n")
|
|
932
|
-
};
|
|
933
|
-
if (renderedConversation.trim().length === 0) {
|
|
934
|
-
log.debug("extraction skipped \u2014 conversation only contained non-memory work-layer context");
|
|
935
|
-
return {
|
|
936
|
-
facts: [],
|
|
937
|
-
profileUpdates: [],
|
|
938
|
-
entities: [],
|
|
939
|
-
questions: [],
|
|
940
|
-
extractionSkippedReason: "conversation_only_non_memory"
|
|
941
|
-
};
|
|
942
|
-
}
|
|
943
|
-
if (lifecycleCaps.extractionTelemetryPrefilter && looksLikeMechanicalTelemetryTranscript(renderedConversation)) {
|
|
944
|
-
log.debug("extraction skipped \u2014 mechanical action/state telemetry without durable-memory cues");
|
|
945
|
-
return {
|
|
946
|
-
facts: [],
|
|
947
|
-
profileUpdates: [],
|
|
948
|
-
entities: [],
|
|
949
|
-
questions: [],
|
|
950
|
-
extractionSkippedReason: "mechanical_telemetry"
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
const lastTurnTs = boundedTurns.length > 0 ? new Date(boundedTurns[boundedTurns.length - 1].timestamp) : void 0;
|
|
954
|
-
const messageTimestamp = lastTurnTs && !isNaN(lastTurnTs.getTime()) ? lastTurnTs : void 0;
|
|
955
|
-
const groundingContext = {
|
|
956
|
-
groundingSource,
|
|
957
|
-
assertionSource,
|
|
958
|
-
roleAssertionSources,
|
|
959
|
-
messageTimestamp,
|
|
960
|
-
sourceConnector,
|
|
961
|
-
ambientCapture,
|
|
962
|
-
scopeClassificationEnabled: lifecycleCaps.extractionScopeClassification
|
|
963
|
-
};
|
|
964
|
-
const traceId = crypto.randomUUID();
|
|
965
|
-
const emittedDirectStart = !!(this.shouldUseDirectClient || this.shouldUseLocalLlm);
|
|
966
|
-
if (emittedDirectStart) {
|
|
967
|
-
this.emit({ kind: "llm_start", traceId, model: this.config.model, operation: "extraction", input: conversation });
|
|
968
|
-
}
|
|
969
|
-
let closedDirectTrace = false;
|
|
970
|
-
const startTime = Date.now();
|
|
971
|
-
const extractionTraceId = this.profiler.startTrace("extraction", void 0, {
|
|
972
|
-
model: this.config.model,
|
|
973
|
-
localLlm: resolveLocalLlmCapabilities(this.config).localLlm
|
|
974
|
-
});
|
|
975
|
-
this.profiler.startSpan("total", extractionTraceId);
|
|
976
|
-
let primaryExtractorAttempted = false;
|
|
977
|
-
try {
|
|
978
|
-
if (this.shouldUseLocalLlm) {
|
|
979
|
-
this.profiler.startSpan("local-llm", extractionTraceId);
|
|
980
|
-
primaryExtractorAttempted = true;
|
|
981
|
-
try {
|
|
982
|
-
const localResult = await this.extractWithLocalLlm(conversation, existingEntities, signal, ambientCapture);
|
|
983
|
-
throwIfExtractionAborted(signal);
|
|
984
|
-
if (localResult) {
|
|
985
|
-
const durationMs = Date.now() - startTime;
|
|
986
|
-
this.profiler.endSpan("local-llm", extractionTraceId);
|
|
987
|
-
this.emit({ kind: "llm_end", traceId, model: this.config.localLlmModel, operation: "extraction", durationMs });
|
|
988
|
-
log.debug(`extraction: used local LLM \u2014 ${localResult.facts.length} facts, ${localResult.entities.length} entities`);
|
|
989
|
-
const localSpanTurns = bindLocalExtractionPrompt(
|
|
990
|
-
conversation,
|
|
991
|
-
boundedTurns,
|
|
992
|
-
this.modelRegistry.calculateContextSizes(
|
|
993
|
-
this.config.localLlmModel,
|
|
994
|
-
this.config.localLlmMaxContext
|
|
995
|
-
).maxInputChars,
|
|
996
|
-
renderedConversation
|
|
997
|
-
).spanTurns;
|
|
998
|
-
const sanitized = this.sanitizeExtractionResult(this.applySpanMaterialization(localResult, localSpanTurns), messageTimestamp);
|
|
999
|
-
const grounded = applyGroundingWithConnector(this.config, sanitized, groundingContext);
|
|
1000
|
-
const finalResult = await this.applyProactiveQuestionPass(conversation, grounded, groundingContext, signal);
|
|
1001
|
-
return this.finalizeExtractionResult(finalResult, boundedTurns, resolvedConnector, ambientCapture);
|
|
1002
|
-
}
|
|
1003
|
-
if (!this.config.localLlmFallback) {
|
|
1004
|
-
log.warn("extraction: local LLM failed and fallback disabled");
|
|
1005
|
-
return {
|
|
1006
|
-
facts: [],
|
|
1007
|
-
profileUpdates: [],
|
|
1008
|
-
entities: [],
|
|
1009
|
-
questions: [],
|
|
1010
|
-
extractionFailure: "local_llm_unavailable",
|
|
1011
|
-
extractionFailureClass: "provider_retryable"
|
|
1012
|
-
};
|
|
1013
|
-
}
|
|
1014
|
-
log.info("extraction: local LLM unavailable, falling back to gateway default AI");
|
|
1015
|
-
} catch (err) {
|
|
1016
|
-
if (signal?.aborted) throw err;
|
|
1017
|
-
if (!this.config.localLlmFallback) {
|
|
1018
|
-
log.warn("extraction: local LLM error and fallback disabled:", err);
|
|
1019
|
-
return {
|
|
1020
|
-
facts: [],
|
|
1021
|
-
profileUpdates: [],
|
|
1022
|
-
entities: [],
|
|
1023
|
-
questions: [],
|
|
1024
|
-
extractionFailure: "local_llm_error",
|
|
1025
|
-
extractionFailureClass: "provider_retryable"
|
|
1026
|
-
};
|
|
1027
|
-
}
|
|
1028
|
-
log.info("extraction: local LLM error, falling back to gateway default AI:", err);
|
|
1029
|
-
} finally {
|
|
1030
|
-
try {
|
|
1031
|
-
this.profiler.endSpan("local-llm", extractionTraceId);
|
|
1032
|
-
} catch {
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
if (this.shouldUseDirectClient) {
|
|
1037
|
-
this.profiler.startSpan("direct-client", extractionTraceId);
|
|
1038
|
-
primaryExtractorAttempted = true;
|
|
1039
|
-
try {
|
|
1040
|
-
const directResult = await this.extractWithDirectClient(conversation, existingEntities, signal, ambientCapture);
|
|
1041
|
-
if (directResult) {
|
|
1042
|
-
const durationMs = Date.now() - startTime;
|
|
1043
|
-
this.profiler.endSpan("direct-client", extractionTraceId);
|
|
1044
|
-
this.emit({ kind: "llm_end", traceId, model: this.config.model, operation: "extraction", durationMs });
|
|
1045
|
-
log.debug(`extraction: used direct client (${this.config.model}) \u2014 ${directResult.facts.length} facts, ${directResult.entities.length} entities`);
|
|
1046
|
-
const sanitized = this.sanitizeExtractionResult(this.applySpanMaterialization(directResult, spanTurns), messageTimestamp);
|
|
1047
|
-
const grounded = applyGroundingWithConnector(this.config, sanitized, groundingContext);
|
|
1048
|
-
const finalResult = await this.applyProactiveQuestionPass(conversation, grounded, groundingContext, signal);
|
|
1049
|
-
return this.finalizeExtractionResult(finalResult, boundedTurns, resolvedConnector, ambientCapture);
|
|
1050
|
-
}
|
|
1051
|
-
try {
|
|
1052
|
-
this.emit({
|
|
1053
|
-
kind: "llm_error",
|
|
1054
|
-
traceId,
|
|
1055
|
-
model: this.config.model,
|
|
1056
|
-
operation: "extraction",
|
|
1057
|
-
durationMs: Date.now() - startTime,
|
|
1058
|
-
error: "direct client returned no result"
|
|
1059
|
-
});
|
|
1060
|
-
} catch {
|
|
1061
|
-
}
|
|
1062
|
-
closedDirectTrace = true;
|
|
1063
|
-
log.info("extraction: direct client returned no result, falling back to gateway AI");
|
|
1064
|
-
} catch (err) {
|
|
1065
|
-
if (signal?.aborted) throw err;
|
|
1066
|
-
try {
|
|
1067
|
-
this.emit({
|
|
1068
|
-
kind: "llm_error",
|
|
1069
|
-
traceId,
|
|
1070
|
-
model: this.config.model,
|
|
1071
|
-
operation: "extraction",
|
|
1072
|
-
durationMs: Date.now() - startTime,
|
|
1073
|
-
error: String(err)
|
|
1074
|
-
});
|
|
1075
|
-
} catch {
|
|
1076
|
-
}
|
|
1077
|
-
closedDirectTrace = true;
|
|
1078
|
-
log.info("extraction: direct client failed, falling back to gateway AI:", err);
|
|
1079
|
-
} finally {
|
|
1080
|
-
try {
|
|
1081
|
-
this.profiler.endSpan("direct-client", extractionTraceId);
|
|
1082
|
-
} catch {
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
if (emittedDirectStart && !closedDirectTrace) {
|
|
1087
|
-
try {
|
|
1088
|
-
this.emit({
|
|
1089
|
-
kind: "llm_error",
|
|
1090
|
-
traceId,
|
|
1091
|
-
model: this.config.model,
|
|
1092
|
-
operation: "extraction",
|
|
1093
|
-
durationMs: Date.now() - startTime,
|
|
1094
|
-
error: "local LLM failed, handing off to gateway fallback"
|
|
1095
|
-
});
|
|
1096
|
-
} catch {
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
const fallbackTraceId = crypto.randomUUID();
|
|
1100
|
-
const fallbackStartTime = Date.now();
|
|
1101
|
-
if (this.useGatewayModelSource) {
|
|
1102
|
-
log.debug(
|
|
1103
|
-
`extraction: using gateway model chain as primary path` + (this.config.taskModelChain ? " (taskModelChain)" : this.config.gatewayAgentId ? ` (agent: ${this.config.gatewayAgentId})` : " (defaults)")
|
|
1104
|
-
);
|
|
1105
|
-
} else {
|
|
1106
|
-
log.info("extraction: falling back to gateway default AI");
|
|
1107
|
-
}
|
|
1108
|
-
this.profiler.startSpan("gateway-fallback", extractionTraceId);
|
|
1109
|
-
try {
|
|
1110
|
-
const messages = [
|
|
1111
|
-
{
|
|
1112
|
-
role: "system",
|
|
1113
|
-
content: buildExtractionInstructions(this.config, existingEntities, ambientCapture) + `
|
|
1114
|
-
|
|
1115
|
-
Return only valid JSON matching this shape. Placeholder text describes field shape only and is never source evidence:
|
|
1116
|
-
${extractionResponseShape(this.config.extraction?.spanMode ?? "off")}`
|
|
1117
|
-
},
|
|
1118
|
-
{ role: "user", content: conversation }
|
|
1119
|
-
];
|
|
1120
|
-
this.emit({ kind: "llm_start", traceId: fallbackTraceId, model: "fallback", operation: "extraction", input: conversation });
|
|
1121
|
-
const detailed = await this.fallbackLlm.parseWithSchemaDetailed(
|
|
1122
|
-
messages,
|
|
1123
|
-
ExtractionResultSchema,
|
|
1124
|
-
this.withGatewayAgent({
|
|
1125
|
-
temperature: 0.3,
|
|
1126
|
-
maxTokens: this.config.extractionMaxOutputTokens,
|
|
1127
|
-
timeoutMs: this.config.taskLlmTimeoutMs ?? this.config.localLlmTimeoutMs,
|
|
1128
|
-
jsonSchema: {
|
|
1129
|
-
name: "extraction_result",
|
|
1130
|
-
schema: extractionProviderJsonSchema(this.config.extraction?.spanMode ?? "off"),
|
|
1131
|
-
strict: false
|
|
1132
|
-
},
|
|
1133
|
-
signal
|
|
1134
|
-
})
|
|
1135
|
-
);
|
|
1136
|
-
const fallbackDurationMs = Date.now() - fallbackStartTime;
|
|
1137
|
-
if ("modelUsed" in detailed && Array.isArray(detailed.result.facts)) {
|
|
1138
|
-
const result = detailed.result;
|
|
1139
|
-
this.emit({
|
|
1140
|
-
kind: "llm_end",
|
|
1141
|
-
traceId: fallbackTraceId,
|
|
1142
|
-
model: detailed.modelUsed,
|
|
1143
|
-
operation: "extraction",
|
|
1144
|
-
durationMs: fallbackDurationMs,
|
|
1145
|
-
output: JSON.stringify(result).slice(0, 2e3)
|
|
1146
|
-
});
|
|
1147
|
-
log.debug(
|
|
1148
|
-
`extracted ${result.facts.length} facts, ${result.entities.length} entities, ${(result.questions ?? []).length} questions via fallback (${detailed.modelUsed})`
|
|
1149
|
-
);
|
|
1150
|
-
const normalized = this.normalizeExtractionResultPayload(result);
|
|
1151
|
-
const sanitized = this.sanitizeExtractionResult(this.applySpanMaterialization(normalized, spanTurns), messageTimestamp);
|
|
1152
|
-
const grounded = applyGroundingWithConnector(this.config, sanitized, groundingContext);
|
|
1153
|
-
const finalResult = await this.applyProactiveQuestionPass(conversation, grounded, groundingContext, signal);
|
|
1154
|
-
return this.finalizeExtractionResult(finalResult, boundedTurns, resolvedConnector, ambientCapture);
|
|
1155
|
-
}
|
|
1156
|
-
const parseFailure = detailed.result === null ? detailed : { failureReason: "empty", attemptedModel: void 0, httpStatus: void 0, errorClass: "empty" };
|
|
1157
|
-
const failureLog = formatExtractionParseFailureLog({
|
|
1158
|
-
failureReason: parseFailure.failureReason,
|
|
1159
|
-
attemptedModel: parseFailure.attemptedModel,
|
|
1160
|
-
httpStatus: parseFailure.httpStatus,
|
|
1161
|
-
errorClass: parseFailure.errorClass,
|
|
1162
|
-
traceId: fallbackTraceId
|
|
1163
|
-
});
|
|
1164
|
-
this.emit({
|
|
1165
|
-
kind: "llm_error",
|
|
1166
|
-
traceId: fallbackTraceId,
|
|
1167
|
-
model: parseFailure.attemptedModel ?? "fallback",
|
|
1168
|
-
operation: "extraction",
|
|
1169
|
-
durationMs: fallbackDurationMs,
|
|
1170
|
-
error: failureLog
|
|
1171
|
-
});
|
|
1172
|
-
log.warn(failureLog);
|
|
1173
|
-
const fallbackParseFailureClass = detailed.result === null ? detailed.failureReason === "no_models" && primaryExtractorAttempted ? (
|
|
1174
|
-
// Gateway had no models, but a local/direct extractor already failed —
|
|
1175
|
-
// the root cause is the primary (transient), not gateway auth/config.
|
|
1176
|
-
"provider_retryable"
|
|
1177
|
-
) : classifyFallbackParseFailure(detailed.failureReason) : "parse_empty";
|
|
1178
|
-
return {
|
|
1179
|
-
facts: [],
|
|
1180
|
-
profileUpdates: [],
|
|
1181
|
-
entities: [],
|
|
1182
|
-
questions: [],
|
|
1183
|
-
extractionFailure: "fallback_no_parsed_output",
|
|
1184
|
-
extractionFailureClass: fallbackParseFailureClass
|
|
1185
|
-
};
|
|
1186
|
-
} catch (err) {
|
|
1187
|
-
if (signal?.aborted) throw err;
|
|
1188
|
-
this.emit({
|
|
1189
|
-
kind: "llm_error",
|
|
1190
|
-
traceId: fallbackTraceId,
|
|
1191
|
-
model: "fallback",
|
|
1192
|
-
operation: "extraction",
|
|
1193
|
-
durationMs: Date.now() - fallbackStartTime,
|
|
1194
|
-
error: String(err)
|
|
1195
|
-
});
|
|
1196
|
-
log.error("extraction fallback failed", err);
|
|
1197
|
-
return {
|
|
1198
|
-
facts: [],
|
|
1199
|
-
profileUpdates: [],
|
|
1200
|
-
entities: [],
|
|
1201
|
-
questions: [],
|
|
1202
|
-
extractionFailure: "fallback_failed",
|
|
1203
|
-
extractionFailureClass: classifyExtractionThrownError(err)
|
|
1204
|
-
};
|
|
1205
|
-
} finally {
|
|
1206
|
-
try {
|
|
1207
|
-
this.profiler.endSpan("gateway-fallback", extractionTraceId);
|
|
1208
|
-
} catch {
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
} finally {
|
|
1212
|
-
this.profiler.endSpan("total", extractionTraceId);
|
|
1213
|
-
this.profiler.endTrace(extractionTraceId);
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
/**
|
|
1217
|
-
* Extract memories using local LLM with JSON mode.
|
|
1218
|
-
* Uses a minimal prompt to fit within local model context limits (typically 4k-8k).
|
|
1219
|
-
*/
|
|
1220
|
-
async extractWithLocalLlm(conversation, existingEntities, signal, ambientCapture = false) {
|
|
1221
|
-
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
1222
|
-
log.debug(
|
|
1223
|
-
`extractWithLocalLlm: starting extraction, localLlmEnabled=${this.shouldUseLocalLlm}, model=${this.config.localLlmModel}`
|
|
1224
|
-
);
|
|
1225
|
-
const contextSizes = this.modelRegistry.calculateContextSizes(
|
|
1226
|
-
this.config.localLlmModel,
|
|
1227
|
-
this.config.localLlmMaxContext
|
|
1228
|
-
);
|
|
1229
|
-
log.debug(`Model context: ${contextSizes.description}`);
|
|
1230
|
-
const maxConversationChars = contextSizes.maxInputChars;
|
|
1231
|
-
const truncatedConversation = truncateLocalExtractionConversation(conversation, maxConversationChars);
|
|
1232
|
-
const localPrompt = `You are a memory extraction system. Extract durable, reusable memories from this conversation.
|
|
1233
|
-
|
|
1234
|
-
Use the most specific category:
|
|
1235
|
-
- fact: objective information
|
|
1236
|
-
- preference: a durable preference or style
|
|
1237
|
-
- correction: a correction of a prior mistake
|
|
1238
|
-
- entity: a durable person, project, tool, company, or place
|
|
1239
|
-
- decision: a choice with rationale
|
|
1240
|
-
- relationship: a durable link between two entities
|
|
1241
|
-
- principle: a reusable rule or operating belief
|
|
1242
|
-
${resolveRecallAuxiliaryCapabilities(this.config).causalRuleExtraction ? "- rule: an explicit causal rule or constraint\n" : ""}- commitment: a promise, obligation, or deadline
|
|
1243
|
-
- moment: a significant milestone
|
|
1244
|
-
- skill: a demonstrated capability
|
|
1245
|
-
- procedure: an explicit reusable workflow with ordered procedureSteps
|
|
1246
|
-
- reasoning_trace: Stored solution chains \u2014 an explicitly narrated solution path with reasoningTrace. Use {"category": "reasoning_trace", "reasoningTrace": {"steps": [...], "finalAnswer": "..."}} only when the conversation provides the chain.
|
|
1247
|
-
|
|
1248
|
-
Rules:
|
|
1249
|
-
- Extract only new information stated or clearly established in the conversation.
|
|
1250
|
-
- Do not treat instruction text, schema placeholders, or examples as conversation evidence.
|
|
1251
|
-
- Facts, entity facts, profile updates, questions, and relationships must be grounded in the conversation.
|
|
1252
|
-
- Lines labelled [context user] or [context assistant] are reference context only. They may resolve references or complete a question-and-answer pair in a normal turn, but never alone establish durable information.
|
|
1253
|
-
- Questions are optional. Return an empty array when the conversation does not support a useful unresolved question.
|
|
1254
|
-
- Set confidence from source evidence: Explicit (0.95-1.0), Implied (0.70-0.94), Inferred (0.40-0.69), or Speculative (0.00-0.39). Corrections get highest confidence.
|
|
1255
|
-
- Use normalized, hyphenated entity names and keep the entity list short. When the source language is not written in a Latin script, the source-script name IS the normalized form \u2014 never transliterate or translate it.
|
|
1256
|
-
- Keep facts standalone. Skip transient task state and operational noise such as routine scheduler, monitoring, or automation status.
|
|
1257
|
-
- Add structuredAttributes only for concrete values.
|
|
1258
|
-
- ${OUTPUT_LANGUAGE_POLICY}
|
|
1259
|
-
${CUE_ANCHOR_PROMPT_INSTRUCTION}
|
|
1260
|
-
- Include at most five durable relationships.${this.config.provenance?.enabled ? `
|
|
1261
|
-
- Each fact must include a quote copied verbatim from one contiguous conversation span.` : ""}${lifecycleCaps.extractionScopeClassification ? `
|
|
1262
|
-
- Set each fact scope to "global" for cross-project knowledge or "project" for codebase-specific knowledge. Tool, command, or CLI-flag instructions tied to one agent are "project" (the same tool name can mean different things across agents); when keeping one, begin the fact with a leading "In <agent>," clause naming that agent.` : ""}${this.config.subjectClassification?.enabled === true ? `
|
|
1263
|
-
- Set each fact subject to "user" when it models the person (preferences, relationships, biography, moments, commitments about their life) or "agent" when it is reusable operating knowledge (procedures, principles, tool-usage lessons, debugging strategies, environment facts with no personal content).` : ""}${ambientCapture ? AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT : ""}
|
|
1264
|
-
${eventTimePromptInstruction(this.config)}${spanModePromptSection(this.config.extraction?.spanMode ?? "off")}
|
|
1265
|
-
Return only valid JSON matching this shape. Placeholder text describes field shape only and is never source evidence:
|
|
1266
|
-
${extractionResponseShape(this.config.extraction?.spanMode ?? "off")}
|
|
1267
|
-
|
|
1268
|
-
Conversation:
|
|
1269
|
-
${truncatedConversation}`;
|
|
1270
|
-
log.debug(
|
|
1271
|
-
`extractWithLocalLlm: calling localLlm.chatCompletion with prompt length ${localPrompt.length}...`
|
|
1272
|
-
);
|
|
1273
|
-
const response = await this.localLlm.chatCompletion(
|
|
1274
|
-
[
|
|
1275
|
-
{ role: "system", content: "You are a memory extraction system. Output valid JSON only." },
|
|
1276
|
-
{ role: "user", content: localPrompt }
|
|
1277
|
-
],
|
|
1278
|
-
{
|
|
1279
|
-
temperature: 0.1,
|
|
1280
|
-
maxTokens: contextSizes.maxOutputTokens,
|
|
1281
|
-
operation: "extraction",
|
|
1282
|
-
disableThinking: shouldEnableLocalExtractionThinking(this.config, conversation.length) ? false : void 0,
|
|
1283
|
-
priority: "background",
|
|
1284
|
-
signal
|
|
1285
|
-
}
|
|
1286
|
-
);
|
|
1287
|
-
if (!response?.content) {
|
|
1288
|
-
log.debug("extractWithLocalLlm: chatCompletion returned null or empty content");
|
|
1289
|
-
return null;
|
|
1290
|
-
}
|
|
1291
|
-
const content = response.content.trim();
|
|
1292
|
-
log.debug(`extractWithLocalLlm: got response content, length=${content.length}`);
|
|
1293
|
-
for (const candidate of extractJsonCandidates(content)) {
|
|
1294
|
-
try {
|
|
1295
|
-
log.debug(`extractWithLocalLlm: attempting JSON parse, candidate length=${candidate.length}`);
|
|
1296
|
-
const parsed = JSON.parse(candidate);
|
|
1297
|
-
if (!this.looksLikeExtractionResultPayload(parsed)) {
|
|
1298
|
-
continue;
|
|
1299
|
-
}
|
|
1300
|
-
const result = this.normalizeExtractionResultPayload(parsed);
|
|
1301
|
-
log.debug(
|
|
1302
|
-
`extractWithLocalLlm: successfully parsed response, facts=${result.facts.length}, entities=${result.entities.length}, profileUpdates=${result.profileUpdates.length}, questions=${result.questions.length}`
|
|
1303
|
-
);
|
|
1304
|
-
return result;
|
|
1305
|
-
} catch {
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
log.debug("extractWithLocalLlm: JSON parse failed, attempting partial extraction...");
|
|
1309
|
-
const partial = this.extractPartialFacts(content);
|
|
1310
|
-
if (partial.facts.length > 0 || partial.entities.length > 0) {
|
|
1311
|
-
log.debug(
|
|
1312
|
-
`extractWithLocalLlm: extracted ${partial.facts.length} partial facts from truncated JSON`
|
|
1313
|
-
);
|
|
1314
|
-
return partial;
|
|
1315
|
-
}
|
|
1316
|
-
return null;
|
|
1317
|
-
}
|
|
1318
|
-
/**
|
|
1319
|
-
* Extract memories using direct OpenAI-compatible client (Chat Completions API).
|
|
1320
|
-
* Works with Scryr, OpenRouter, and other OpenAI-compatible endpoints.
|
|
1321
|
-
*/
|
|
1322
|
-
async extractWithDirectClient(conversation, existingEntities, signal, ambientCapture = false) {
|
|
1323
|
-
if (!this.client) return null;
|
|
1324
|
-
const tokenParams = buildChatCompletionTokenLimit(this.config.model, this.config.extractionMaxOutputTokens, {
|
|
1325
|
-
assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
|
|
1326
|
-
});
|
|
1327
|
-
log.debug(`extractWithDirectClient: calling model=${this.config.model} tokenParams=${JSON.stringify(tokenParams)}`);
|
|
1328
|
-
const response = await this.client.chat.completions.create(
|
|
1329
|
-
{
|
|
1330
|
-
model: this.config.model,
|
|
1331
|
-
messages: [
|
|
1332
|
-
{
|
|
1333
|
-
role: "system",
|
|
1334
|
-
content: buildExtractionInstructions(this.config, existingEntities, ambientCapture) + `
|
|
1335
|
-
|
|
1336
|
-
Return only valid JSON matching this shape. Placeholder text describes field shape only and is never source evidence:
|
|
1337
|
-
${extractionResponseShape(this.config.extraction?.spanMode ?? "off")}`
|
|
1338
|
-
},
|
|
1339
|
-
{ role: "user", content: conversation }
|
|
1340
|
-
],
|
|
1341
|
-
...tokenParams
|
|
1342
|
-
},
|
|
1343
|
-
signal ? { signal } : void 0
|
|
1344
|
-
);
|
|
1345
|
-
const content = response.choices?.[0]?.message?.content?.trim();
|
|
1346
|
-
if (!content) {
|
|
1347
|
-
log.info(`extractWithDirectClient: empty response \u2014 choices=${JSON.stringify(response.choices?.length ?? 0)} finishReason=${response.choices?.[0]?.finish_reason ?? "n/a"}`);
|
|
1348
|
-
return null;
|
|
1349
|
-
}
|
|
1350
|
-
log.info(
|
|
1351
|
-
`extractWithDirectClient: got response, length=${content.length}`
|
|
1352
|
-
);
|
|
1353
|
-
for (const candidate of extractJsonCandidates(content)) {
|
|
1354
|
-
try {
|
|
1355
|
-
const parsed = JSON.parse(candidate);
|
|
1356
|
-
return this.normalizeExtractionResultPayload(parsed);
|
|
1357
|
-
} catch {
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
log.info(`extractWithDirectClient: failed to parse JSON from response (first 200 chars: ${content.slice(0, 200)})`);
|
|
1361
|
-
return null;
|
|
1362
|
-
}
|
|
1363
|
-
/**
|
|
1364
|
-
* Extract partial facts from truncated JSON responses.
|
|
1365
|
-
* Local LLMs sometimes hit token limits mid-JSON. This tries to salvage valid facts.
|
|
1366
|
-
*/
|
|
1367
|
-
extractPartialFacts(jsonStr) {
|
|
1368
|
-
const facts = [];
|
|
1369
|
-
const entities = [];
|
|
1370
|
-
try {
|
|
1371
|
-
const factRegex = /\{\s*"category"\s*:\s*"([^"]+)"\s*,\s*"content"\s*:\s*"([^"]+)"\s*,\s*"confidence"\s*:\s*([0-9.]+)/g;
|
|
1372
|
-
let match;
|
|
1373
|
-
while ((match = factRegex.exec(jsonStr)) !== null) {
|
|
1374
|
-
const category = match[1]?.trim() ?? "";
|
|
1375
|
-
if (!isMemoryCategory(category)) continue;
|
|
1376
|
-
facts.push({
|
|
1377
|
-
category,
|
|
1378
|
-
content: match[2].replace(/\\n/g, "\n").replace(/\\"/g, '"'),
|
|
1379
|
-
confidence: parseFloat(match[3]),
|
|
1380
|
-
tags: []
|
|
1381
|
-
});
|
|
1382
|
-
}
|
|
1383
|
-
const entityRegex = /\{\s*"name"\s*:\s*"([^"]+)"\s*,\s*"type"\s*:\s*"([^"]+)"/g;
|
|
1384
|
-
while ((match = entityRegex.exec(jsonStr)) !== null) {
|
|
1385
|
-
const type = extractionEntityType(match[2]);
|
|
1386
|
-
if (type === void 0) continue;
|
|
1387
|
-
entities.push({
|
|
1388
|
-
name: match[1],
|
|
1389
|
-
type,
|
|
1390
|
-
facts: []
|
|
1391
|
-
});
|
|
1392
|
-
}
|
|
1393
|
-
} catch {
|
|
1394
|
-
}
|
|
1395
|
-
return this.normalizeExtractionResultPayload({ facts, entities, profileUpdates: [], questions: [] });
|
|
1396
|
-
}
|
|
1397
|
-
async consolidate(newMemories, existingMemories, currentProfile) {
|
|
1398
|
-
const newList = newMemories.map(
|
|
1399
|
-
(m) => `[${m.frontmatter.id}] (${m.frontmatter.category}) ${m.content}`
|
|
1400
|
-
).join("\n");
|
|
1401
|
-
const existingList = existingMemories.slice(-50).map(
|
|
1402
|
-
(m) => `[${m.frontmatter.id}] (${m.frontmatter.category}) ${m.content}`
|
|
1403
|
-
).join("\n");
|
|
1404
|
-
const cTraceId = crypto.randomUUID();
|
|
1405
|
-
this.emit({ kind: "llm_start", traceId: cTraceId, model: this.config.model, operation: "consolidation", input: newList });
|
|
1406
|
-
const cStartTime = Date.now();
|
|
1407
|
-
if (this.shouldUseLocalLlm) {
|
|
1408
|
-
try {
|
|
1409
|
-
const localResult = await this.consolidateWithLocalLlm(newList, existingList, currentProfile);
|
|
1410
|
-
if (localResult) {
|
|
1411
|
-
const durationMs = Date.now() - cStartTime;
|
|
1412
|
-
this.emit({ kind: "llm_end", traceId: cTraceId, model: this.config.localLlmModel, operation: "consolidation", durationMs });
|
|
1413
|
-
log.debug(`consolidation: used local LLM \u2014 ${localResult.items.length} decisions`);
|
|
1414
|
-
return this.sanitizeConsolidationResult(localResult);
|
|
1415
|
-
}
|
|
1416
|
-
if (!this.config.localLlmFallback) {
|
|
1417
|
-
log.warn("consolidation: local LLM failed and fallback disabled");
|
|
1418
|
-
return { items: [], profileUpdates: [], entityUpdates: [] };
|
|
1419
|
-
}
|
|
1420
|
-
log.info("consolidation: local LLM unavailable, falling back to gateway AI");
|
|
1421
|
-
} catch (err) {
|
|
1422
|
-
if (!this.config.localLlmFallback) {
|
|
1423
|
-
log.warn("consolidation: local LLM error and fallback disabled:", err);
|
|
1424
|
-
return { items: [], profileUpdates: [], entityUpdates: [] };
|
|
1425
|
-
}
|
|
1426
|
-
log.info("consolidation: local LLM error, falling back to gateway AI:", err);
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
const fallbackResult = await this.parseWithGatewayFallback(
|
|
1430
|
-
cTraceId,
|
|
1431
|
-
"consolidation",
|
|
1432
|
-
cStartTime,
|
|
1433
|
-
ConsolidationResultSchema,
|
|
1434
|
-
[
|
|
1435
|
-
{
|
|
1436
|
-
role: "system",
|
|
1437
|
-
content: buildConsolidationSystemPrompt(this.config)
|
|
1438
|
-
},
|
|
1439
|
-
{
|
|
1440
|
-
role: "user",
|
|
1441
|
-
content: `Current behavioral profile:
|
|
1442
|
-
${currentProfile || "(empty)"}
|
|
1443
|
-
|
|
1444
|
-
Existing memories:
|
|
1445
|
-
${existingList || "(none)"}
|
|
1446
|
-
|
|
1447
|
-
New memories to consolidate:
|
|
1448
|
-
${newList}
|
|
1449
|
-
|
|
1450
|
-
Consolidate the new memories against existing ones.`
|
|
1451
|
-
}
|
|
1452
|
-
],
|
|
1453
|
-
{ temperature: 0.3, maxTokens: 4096 }
|
|
1454
|
-
);
|
|
1455
|
-
if (fallbackResult) {
|
|
1456
|
-
log.debug(`consolidation: ${fallbackResult.items.length} decisions via fallback`);
|
|
1457
|
-
return this.sanitizeConsolidationResult({
|
|
1458
|
-
items: fallbackResult.items,
|
|
1459
|
-
profileUpdates: fallbackResult.profileUpdates,
|
|
1460
|
-
entityUpdates: fallbackResult.entityUpdates
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
if (!this.client) {
|
|
1464
|
-
log.warn("consolidation skipped \u2014 no OpenAI API key and local LLM failed/disabled");
|
|
1465
|
-
return { items: [], profileUpdates: [], entityUpdates: [] };
|
|
1466
|
-
}
|
|
1467
|
-
try {
|
|
1468
|
-
const instructionText = `${buildConsolidationSystemPrompt(this.config)}
|
|
1469
|
-
|
|
1470
|
-
Current behavioral profile:
|
|
1471
|
-
${currentProfile || "(empty)"}
|
|
1472
|
-
|
|
1473
|
-
Existing memories:
|
|
1474
|
-
${existingList || "(none)"}
|
|
1475
|
-
|
|
1476
|
-
New memories to consolidate:
|
|
1477
|
-
${newList}
|
|
1478
|
-
|
|
1479
|
-
Respond with valid JSON only, matching this schema:
|
|
1480
|
-
${CONSOLIDATION_RESPONSE_SCHEMA}`;
|
|
1481
|
-
const response = await this.client.chat.completions.create({
|
|
1482
|
-
model: this.config.model,
|
|
1483
|
-
messages: [
|
|
1484
|
-
{ role: "system", content: instructionText },
|
|
1485
|
-
{ role: "user", content: "Consolidate the new memories against existing ones." }
|
|
1486
|
-
],
|
|
1487
|
-
...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
|
|
1488
|
-
...buildChatCompletionTokenLimit(this.config.model, 4096, {
|
|
1489
|
-
assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
|
|
1490
|
-
})
|
|
1491
|
-
});
|
|
1492
|
-
const rawContent = response.choices?.[0]?.message?.content?.trim();
|
|
1493
|
-
const cDurationMs = Date.now() - cStartTime;
|
|
1494
|
-
const cUsage = response.usage;
|
|
1495
|
-
let parsed = null;
|
|
1496
|
-
if (rawContent) {
|
|
1497
|
-
for (const candidate of extractJsonCandidates(rawContent)) {
|
|
1498
|
-
try {
|
|
1499
|
-
parsed = JSON.parse(candidate);
|
|
1500
|
-
break;
|
|
1501
|
-
} catch {
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
this.emit({
|
|
1506
|
-
kind: "llm_end",
|
|
1507
|
-
traceId: cTraceId,
|
|
1508
|
-
model: this.config.model,
|
|
1509
|
-
operation: "consolidation",
|
|
1510
|
-
durationMs: cDurationMs,
|
|
1511
|
-
output: parsed ? JSON.stringify(parsed).slice(0, 2e3) : void 0,
|
|
1512
|
-
tokenUsage: cUsage ? { input: cUsage.prompt_tokens, output: cUsage.completion_tokens, total: cUsage.total_tokens } : void 0
|
|
1513
|
-
});
|
|
1514
|
-
if (parsed && Array.isArray(parsed.items)) {
|
|
1515
|
-
log.debug(
|
|
1516
|
-
`consolidation: ${parsed.items.length} decisions`
|
|
1517
|
-
);
|
|
1518
|
-
return this.sanitizeConsolidationResult({
|
|
1519
|
-
items: parsed.items,
|
|
1520
|
-
profileUpdates: Array.isArray(parsed.profileUpdates) ? parsed.profileUpdates : [],
|
|
1521
|
-
entityUpdates: Array.isArray(parsed.entityUpdates) ? parsed.entityUpdates : []
|
|
1522
|
-
});
|
|
1523
|
-
}
|
|
1524
|
-
log.warn("consolidation returned no parsed output");
|
|
1525
|
-
return { items: [], profileUpdates: [], entityUpdates: [] };
|
|
1526
|
-
} catch (err) {
|
|
1527
|
-
this.emit({
|
|
1528
|
-
kind: "llm_error",
|
|
1529
|
-
traceId: cTraceId,
|
|
1530
|
-
model: this.config.model,
|
|
1531
|
-
operation: "consolidation",
|
|
1532
|
-
durationMs: Date.now() - cStartTime,
|
|
1533
|
-
error: String(err)
|
|
1534
|
-
});
|
|
1535
|
-
log.error("consolidation failed", err);
|
|
1536
|
-
return { items: [], profileUpdates: [], entityUpdates: [] };
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
/**
|
|
1540
|
-
* Consolidate memories using local LLM.
|
|
1541
|
-
*/
|
|
1542
|
-
async consolidateWithLocalLlm(newList, existingList, currentProfile) {
|
|
1543
|
-
const contextSizes = this.modelRegistry.calculateContextSizes(
|
|
1544
|
-
this.config.localLlmModel,
|
|
1545
|
-
this.config.localLlmMaxContext
|
|
1546
|
-
);
|
|
1547
|
-
log.debug(`Consolidation model context: ${contextSizes.description}`);
|
|
1548
|
-
const prompt = `${buildConsolidationSystemPrompt(this.config)}
|
|
1549
|
-
|
|
1550
|
-
Current behavioral profile:
|
|
1551
|
-
${currentProfile || "(empty)"}
|
|
1552
|
-
|
|
1553
|
-
Existing memories:
|
|
1554
|
-
${existingList || "(none)"}
|
|
1555
|
-
|
|
1556
|
-
New memories to consolidate:
|
|
1557
|
-
${newList}
|
|
1558
|
-
|
|
1559
|
-
Respond with valid JSON matching this schema:
|
|
1560
|
-
${CONSOLIDATION_RESPONSE_SCHEMA}`;
|
|
1561
|
-
const response = await this.localLlm.chatCompletion(
|
|
1562
|
-
[
|
|
1563
|
-
{ role: "system", content: "You are a memory consolidation system. Output valid JSON only." },
|
|
1564
|
-
{ role: "user", content: prompt }
|
|
1565
|
-
],
|
|
1566
|
-
{
|
|
1567
|
-
temperature: 0.3,
|
|
1568
|
-
maxTokens: contextSizes.maxOutputTokens,
|
|
1569
|
-
operation: "consolidation",
|
|
1570
|
-
priority: "background"
|
|
1571
|
-
}
|
|
1572
|
-
);
|
|
1573
|
-
if (!response?.content) {
|
|
1574
|
-
return null;
|
|
1575
|
-
}
|
|
1576
|
-
try {
|
|
1577
|
-
const content = response.content.trim();
|
|
1578
|
-
for (const candidate of extractJsonCandidates(content)) {
|
|
1579
|
-
try {
|
|
1580
|
-
const parsed = JSON.parse(candidate);
|
|
1581
|
-
return {
|
|
1582
|
-
items: Array.isArray(parsed.items) ? parsed.items : [],
|
|
1583
|
-
profileUpdates: Array.isArray(parsed.profileUpdates) ? parsed.profileUpdates : [],
|
|
1584
|
-
entityUpdates: Array.isArray(parsed.entityUpdates) ? parsed.entityUpdates : []
|
|
1585
|
-
};
|
|
1586
|
-
} catch {
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
return null;
|
|
1590
|
-
} catch (err) {
|
|
1591
|
-
log.warn("local LLM consolidation: failed to parse JSON response:", err);
|
|
1592
|
-
return null;
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
/**
|
|
1596
|
-
* Consolidate a bloated profile.md into a compact version.
|
|
1597
|
-
* The LLM merges duplicates, removes stale info, and preserves section structure.
|
|
1598
|
-
* Returns the consolidated markdown or null on failure.
|
|
1599
|
-
*/
|
|
1600
|
-
async consolidateProfile(fullProfileContent, targetLines = 50) {
|
|
1601
|
-
const pTraceId = crypto.randomUUID();
|
|
1602
|
-
this.emit({ kind: "llm_start", traceId: pTraceId, model: this.config.model, operation: "profile_consolidation", input: fullProfileContent.slice(0, 2e3) });
|
|
1603
|
-
const pStartTime = Date.now();
|
|
1604
|
-
if (this.shouldUseLocalLlm) {
|
|
1605
|
-
try {
|
|
1606
|
-
const localResult = await this.consolidateProfileWithLocalLlm(fullProfileContent, targetLines);
|
|
1607
|
-
if (localResult) {
|
|
1608
|
-
const durationMs = Date.now() - pStartTime;
|
|
1609
|
-
this.emit({ kind: "llm_end", traceId: pTraceId, model: this.config.localLlmModel, operation: "profile_consolidation", durationMs });
|
|
1610
|
-
log.debug(`profile consolidation: used local LLM \u2014 removed ${localResult.removedCount} items`);
|
|
1611
|
-
return localResult;
|
|
1612
|
-
}
|
|
1613
|
-
if (!this.config.localLlmFallback) {
|
|
1614
|
-
log.warn("profile consolidation: local LLM failed and fallback disabled");
|
|
1615
|
-
return null;
|
|
1616
|
-
}
|
|
1617
|
-
log.info("profile consolidation: local LLM unavailable, falling back to gateway AI");
|
|
1618
|
-
} catch (err) {
|
|
1619
|
-
if (!this.config.localLlmFallback) {
|
|
1620
|
-
log.warn("profile consolidation: local LLM error and fallback disabled:", err);
|
|
1621
|
-
return null;
|
|
1622
|
-
}
|
|
1623
|
-
log.info("profile consolidation: local LLM error, falling back to gateway AI:", err);
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
const profileFallback = await this.parseWithGatewayFallback(
|
|
1627
|
-
pTraceId,
|
|
1628
|
-
"profile_consolidation",
|
|
1629
|
-
pStartTime,
|
|
1630
|
-
buildProfileConsolidationResultSchema(targetLines),
|
|
1631
|
-
[
|
|
1632
|
-
{
|
|
1633
|
-
role: "system",
|
|
1634
|
-
content: buildProfileConsolidationSystemPrompt(targetLines)
|
|
1635
|
-
},
|
|
1636
|
-
{ role: "user", content: fullProfileContent }
|
|
1637
|
-
],
|
|
1638
|
-
{ temperature: 0.3, maxTokens: 4096 }
|
|
1639
|
-
);
|
|
1640
|
-
if (profileFallback) {
|
|
1641
|
-
log.debug(
|
|
1642
|
-
`profile consolidation: removed ${profileFallback.removedCount} items \u2014 ${profileFallback.summary} (fallback)`
|
|
1643
|
-
);
|
|
1644
|
-
return profileFallback;
|
|
1645
|
-
}
|
|
1646
|
-
if (!this.client) {
|
|
1647
|
-
log.warn("profile consolidation skipped \u2014 no OpenAI API key and local LLM failed/disabled");
|
|
1648
|
-
return null;
|
|
1649
|
-
}
|
|
1650
|
-
try {
|
|
1651
|
-
const instructionText = `${buildProfileConsolidationSystemPrompt(targetLines)}
|
|
1652
|
-
|
|
1653
|
-
Respond with valid JSON matching this schema:
|
|
1654
|
-
${PROFILE_CONSOLIDATION_RESPONSE_SCHEMA}`;
|
|
1655
|
-
const response = await this.client.chat.completions.create({
|
|
1656
|
-
model: this.config.model,
|
|
1657
|
-
messages: [
|
|
1658
|
-
{ role: "system", content: instructionText },
|
|
1659
|
-
{ role: "user", content: fullProfileContent }
|
|
1660
|
-
],
|
|
1661
|
-
...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
|
|
1662
|
-
...buildChatCompletionTokenLimit(this.config.model, 4096, {
|
|
1663
|
-
assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
|
|
1664
|
-
})
|
|
1665
|
-
});
|
|
1666
|
-
const rawContent = response.choices?.[0]?.message?.content?.trim();
|
|
1667
|
-
const pDurationMs = Date.now() - pStartTime;
|
|
1668
|
-
const pUsage = response.usage;
|
|
1669
|
-
let parsed = null;
|
|
1670
|
-
if (rawContent) {
|
|
1671
|
-
for (const candidate of extractJsonCandidates(rawContent)) {
|
|
1672
|
-
try {
|
|
1673
|
-
parsed = JSON.parse(candidate);
|
|
1674
|
-
break;
|
|
1675
|
-
} catch {
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
this.emit({
|
|
1680
|
-
kind: "llm_end",
|
|
1681
|
-
traceId: pTraceId,
|
|
1682
|
-
model: this.config.model,
|
|
1683
|
-
operation: "profile_consolidation",
|
|
1684
|
-
durationMs: pDurationMs,
|
|
1685
|
-
output: parsed ? parsed.summary : void 0,
|
|
1686
|
-
tokenUsage: pUsage ? { input: pUsage.prompt_tokens, output: pUsage.completion_tokens, total: pUsage.total_tokens } : void 0
|
|
1687
|
-
});
|
|
1688
|
-
if (parsed && typeof parsed.consolidatedProfile === "string") {
|
|
1689
|
-
log.debug(
|
|
1690
|
-
`profile consolidation: removed ${parsed.removedCount ?? 0} items \u2014 ${parsed.summary ?? ""}`
|
|
1691
|
-
);
|
|
1692
|
-
return {
|
|
1693
|
-
consolidatedProfile: parsed.consolidatedProfile,
|
|
1694
|
-
removedCount: Number(parsed.removedCount || 0),
|
|
1695
|
-
summary: String(parsed.summary || "")
|
|
1696
|
-
};
|
|
1697
|
-
}
|
|
1698
|
-
log.warn("profile consolidation returned no parsed output");
|
|
1699
|
-
return null;
|
|
1700
|
-
} catch (err) {
|
|
1701
|
-
this.emit({
|
|
1702
|
-
kind: "llm_error",
|
|
1703
|
-
traceId: pTraceId,
|
|
1704
|
-
model: this.config.model,
|
|
1705
|
-
operation: "profile_consolidation",
|
|
1706
|
-
durationMs: Date.now() - pStartTime,
|
|
1707
|
-
error: String(err)
|
|
1708
|
-
});
|
|
1709
|
-
log.error("profile consolidation failed", err);
|
|
1710
|
-
return null;
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
/**
|
|
1714
|
-
* Consolidate profile using local LLM.
|
|
1715
|
-
*/
|
|
1716
|
-
async consolidateProfileWithLocalLlm(fullProfileContent, targetLines = 50) {
|
|
1717
|
-
const contextSizes = this.modelRegistry.calculateContextSizes(
|
|
1718
|
-
this.config.localLlmModel,
|
|
1719
|
-
this.config.localLlmMaxContext
|
|
1720
|
-
);
|
|
1721
|
-
log.debug(`Profile consolidation model context: ${contextSizes.description}`);
|
|
1722
|
-
const prompt = `${buildProfileConsolidationSystemPrompt(targetLines)}
|
|
1723
|
-
|
|
1724
|
-
Profile to consolidate:
|
|
1725
|
-
${fullProfileContent}
|
|
1726
|
-
|
|
1727
|
-
Respond with valid JSON matching this schema:
|
|
1728
|
-
${PROFILE_CONSOLIDATION_RESPONSE_SCHEMA}`;
|
|
1729
|
-
const response = await this.localLlm.chatCompletion(
|
|
1730
|
-
[
|
|
1731
|
-
{ role: "system", content: "You are a profile consolidation system. Output valid JSON only." },
|
|
1732
|
-
{ role: "user", content: prompt }
|
|
1733
|
-
],
|
|
1734
|
-
{
|
|
1735
|
-
temperature: 0.3,
|
|
1736
|
-
maxTokens: contextSizes.maxOutputTokens,
|
|
1737
|
-
operation: "profile_consolidation",
|
|
1738
|
-
priority: "background"
|
|
1739
|
-
}
|
|
1740
|
-
);
|
|
1741
|
-
if (!response?.content) {
|
|
1742
|
-
return null;
|
|
1743
|
-
}
|
|
1744
|
-
try {
|
|
1745
|
-
const content = response.content.trim();
|
|
1746
|
-
for (const candidate of extractJsonCandidates(content)) {
|
|
1747
|
-
try {
|
|
1748
|
-
const parsed = JSON.parse(candidate);
|
|
1749
|
-
return {
|
|
1750
|
-
consolidatedProfile: String(parsed.consolidatedProfile || ""),
|
|
1751
|
-
removedCount: Number(parsed.removedCount || 0),
|
|
1752
|
-
summary: String(parsed.summary || "")
|
|
1753
|
-
};
|
|
1754
|
-
} catch {
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
return null;
|
|
1758
|
-
} catch (err) {
|
|
1759
|
-
log.warn("local LLM profile consolidation: failed to parse JSON response:", err);
|
|
1760
|
-
return null;
|
|
1761
|
-
}
|
|
1762
|
-
}
|
|
1763
|
-
/**
|
|
1764
|
-
* Consolidate IDENTITY.md reflections into a concise "Learned Patterns" section.
|
|
1765
|
-
* Returns the new content for the IDENTITY.md file (everything below the static header).
|
|
1766
|
-
*/
|
|
1767
|
-
async consolidateIdentity(fullIdentityContent, staticHeaderEndMarker) {
|
|
1768
|
-
const iTraceId = crypto.randomUUID();
|
|
1769
|
-
this.emit({ kind: "llm_start", traceId: iTraceId, model: this.config.model, operation: "identity_consolidation", input: fullIdentityContent.slice(0, 2e3) });
|
|
1770
|
-
const iStartTime = Date.now();
|
|
1771
|
-
if (this.shouldUseLocalLlm) {
|
|
1772
|
-
try {
|
|
1773
|
-
const localResult = await this.consolidateIdentityWithLocalLlm(fullIdentityContent);
|
|
1774
|
-
if (localResult) {
|
|
1775
|
-
const durationMs = Date.now() - iStartTime;
|
|
1776
|
-
this.emit({ kind: "llm_end", traceId: iTraceId, model: this.config.localLlmModel, operation: "identity_consolidation", durationMs });
|
|
1777
|
-
log.debug(`identity consolidation: used local LLM \u2014 ${localResult.learnedPatterns.length} patterns`);
|
|
1778
|
-
return localResult;
|
|
1779
|
-
}
|
|
1780
|
-
if (!this.config.localLlmFallback) {
|
|
1781
|
-
log.warn("identity consolidation: local LLM failed and fallback disabled");
|
|
1782
|
-
return null;
|
|
1783
|
-
}
|
|
1784
|
-
log.info("identity consolidation: local LLM unavailable, falling back to gateway AI");
|
|
1785
|
-
} catch (err) {
|
|
1786
|
-
if (!this.config.localLlmFallback) {
|
|
1787
|
-
log.warn("identity consolidation: local LLM error and fallback disabled:", err);
|
|
1788
|
-
return null;
|
|
1789
|
-
}
|
|
1790
|
-
log.info("identity consolidation: local LLM error, falling back to gateway AI:", err);
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
const identityFallback = await this.parseWithGatewayFallback(
|
|
1794
|
-
iTraceId,
|
|
1795
|
-
"identity_consolidation",
|
|
1796
|
-
iStartTime,
|
|
1797
|
-
IdentityConsolidationResultSchema,
|
|
1798
|
-
[
|
|
1799
|
-
{
|
|
1800
|
-
role: "system",
|
|
1801
|
-
content: `You are an identity consolidation system. You are given the full contents of an IDENTITY.md file that contains many individual reflection entries. Your job is to:
|
|
1802
|
-
|
|
1803
|
-
1. Read all the reflection entries (sections starting with "## Reflection")
|
|
1804
|
-
2. Extract the most important, durable behavioral patterns and lessons learned
|
|
1805
|
-
3. Consolidate them into concise, standalone statements (aim for 10-25 key patterns)
|
|
1806
|
-
4. Remove redundancy \u2014 if multiple reflections say the same thing, merge into one clear statement
|
|
1807
|
-
5. Prioritize patterns that are actionable and recurring over one-off observations
|
|
1808
|
-
6. Write a brief summary paragraph
|
|
1809
|
-
|
|
1810
|
-
The goal is to reduce a bloated file to a compact, high-signal set of learned patterns while preserving all genuinely useful self-knowledge.`
|
|
1811
|
-
},
|
|
1812
|
-
{ role: "user", content: fullIdentityContent }
|
|
1813
|
-
],
|
|
1814
|
-
{ temperature: 0.3, maxTokens: 4096 }
|
|
1815
|
-
);
|
|
1816
|
-
if (identityFallback) {
|
|
1817
|
-
log.debug(
|
|
1818
|
-
`identity consolidation: ${identityFallback.learnedPatterns.length} patterns (fallback)`
|
|
1819
|
-
);
|
|
1820
|
-
return identityFallback;
|
|
1821
|
-
}
|
|
1822
|
-
if (!this.client) {
|
|
1823
|
-
log.warn("identity consolidation skipped \u2014 no OpenAI API key and local LLM failed/disabled");
|
|
1824
|
-
return null;
|
|
1825
|
-
}
|
|
1826
|
-
try {
|
|
1827
|
-
const instructionText = `You are an identity consolidation system. You are given the full contents of an IDENTITY.md file that contains many individual reflection entries. Your job is to:
|
|
1828
|
-
|
|
1829
|
-
1. Read all the reflection entries (sections starting with "## Reflection")
|
|
1830
|
-
2. Extract the most important, durable behavioral patterns and lessons learned
|
|
1831
|
-
3. Consolidate them into concise, standalone statements (aim for 10-25 key patterns)
|
|
1832
|
-
4. Remove redundancy \u2014 if multiple reflections say the same thing, merge into one clear statement
|
|
1833
|
-
5. Prioritize patterns that are actionable and recurring over one-off observations
|
|
1834
|
-
6. Write a brief summary paragraph
|
|
1835
|
-
|
|
1836
|
-
The goal is to reduce a bloated file to a compact, high-signal set of learned patterns while preserving all genuinely useful self-knowledge.
|
|
1837
|
-
|
|
1838
|
-
Respond with valid JSON matching this schema:
|
|
1839
|
-
{
|
|
1840
|
-
"learnedPatterns": ["pattern 1", "pattern 2", "pattern 3"],
|
|
1841
|
-
"summary": "brief summary of consolidation"
|
|
1842
|
-
}`;
|
|
1843
|
-
const response = await this.client.chat.completions.create({
|
|
1844
|
-
model: this.config.model,
|
|
1845
|
-
messages: [
|
|
1846
|
-
{ role: "system", content: instructionText },
|
|
1847
|
-
{ role: "user", content: fullIdentityContent }
|
|
1848
|
-
],
|
|
1849
|
-
...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
|
|
1850
|
-
...buildChatCompletionTokenLimit(this.config.model, 4096, {
|
|
1851
|
-
assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
|
|
1852
|
-
})
|
|
1853
|
-
});
|
|
1854
|
-
const rawContent = response.choices?.[0]?.message?.content?.trim();
|
|
1855
|
-
const iDurationMs = Date.now() - iStartTime;
|
|
1856
|
-
const iUsage = response.usage;
|
|
1857
|
-
let parsed = null;
|
|
1858
|
-
if (rawContent) {
|
|
1859
|
-
for (const candidate of extractJsonCandidates(rawContent)) {
|
|
1860
|
-
try {
|
|
1861
|
-
parsed = JSON.parse(candidate);
|
|
1862
|
-
break;
|
|
1863
|
-
} catch {
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
this.emit({
|
|
1868
|
-
kind: "llm_end",
|
|
1869
|
-
traceId: iTraceId,
|
|
1870
|
-
model: this.config.model,
|
|
1871
|
-
operation: "identity_consolidation",
|
|
1872
|
-
durationMs: iDurationMs,
|
|
1873
|
-
output: parsed ? parsed.summary : void 0,
|
|
1874
|
-
tokenUsage: iUsage ? { input: iUsage.prompt_tokens, output: iUsage.completion_tokens, total: iUsage.total_tokens } : void 0
|
|
1875
|
-
});
|
|
1876
|
-
if (parsed && Array.isArray(parsed.learnedPatterns)) {
|
|
1877
|
-
const learnedPatterns = parsed.learnedPatterns.filter((pattern) => typeof pattern === "string").map((pattern) => pattern.trim()).filter((pattern) => pattern.length > 0);
|
|
1878
|
-
log.debug(
|
|
1879
|
-
`identity consolidation: ${learnedPatterns.length} patterns`
|
|
1880
|
-
);
|
|
1881
|
-
return {
|
|
1882
|
-
learnedPatterns,
|
|
1883
|
-
summary: String(parsed.summary || "")
|
|
1884
|
-
};
|
|
1885
|
-
}
|
|
1886
|
-
log.warn("identity consolidation returned no parsed output");
|
|
1887
|
-
return null;
|
|
1888
|
-
} catch (err) {
|
|
1889
|
-
this.emit({
|
|
1890
|
-
kind: "llm_error",
|
|
1891
|
-
traceId: iTraceId,
|
|
1892
|
-
model: this.config.model,
|
|
1893
|
-
operation: "identity_consolidation",
|
|
1894
|
-
durationMs: Date.now() - iStartTime,
|
|
1895
|
-
error: String(err)
|
|
1896
|
-
});
|
|
1897
|
-
log.error("identity consolidation failed", err);
|
|
1898
|
-
return null;
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
/**
|
|
1902
|
-
* Consolidate identity using local LLM.
|
|
1903
|
-
*/
|
|
1904
|
-
async consolidateIdentityWithLocalLlm(fullIdentityContent) {
|
|
1905
|
-
const contextSizes = this.modelRegistry.calculateContextSizes(
|
|
1906
|
-
this.config.localLlmModel,
|
|
1907
|
-
this.config.localLlmMaxContext
|
|
1908
|
-
);
|
|
1909
|
-
log.debug(`Identity consolidation model context: ${contextSizes.description}`);
|
|
1910
|
-
const prompt = `You are an identity consolidation system. You are given the full contents of an IDENTITY.md file that contains many individual reflection entries. Your job is to:
|
|
1911
|
-
|
|
1912
|
-
1. Read all the reflection entries (sections starting with "## Reflection")
|
|
1913
|
-
2. Extract the most important, durable behavioral patterns and lessons learned
|
|
1914
|
-
3. Consolidate them into concise, standalone statements (aim for 10-25 key patterns)
|
|
1915
|
-
4. Remove redundancy \u2014 if multiple reflections say the same thing, merge into one clear statement
|
|
1916
|
-
5. Prioritize patterns that are actionable and recurring over one-off observations
|
|
1917
|
-
6. Write a brief summary paragraph
|
|
1918
|
-
|
|
1919
|
-
The goal is to reduce a bloated file to a compact, high-signal set of learned patterns while preserving all genuinely useful self-knowledge.
|
|
1920
|
-
|
|
1921
|
-
IDENTITY.md content:
|
|
1922
|
-
${fullIdentityContent}
|
|
1923
|
-
|
|
1924
|
-
Respond with valid JSON matching this schema:
|
|
1925
|
-
{
|
|
1926
|
-
"learnedPatterns": ["pattern 1", "pattern 2", "pattern 3"],
|
|
1927
|
-
"summary": "brief summary of consolidation"
|
|
1928
|
-
}`;
|
|
1929
|
-
const response = await this.localLlm.chatCompletion(
|
|
1930
|
-
[
|
|
1931
|
-
{ role: "system", content: "You are an identity consolidation system. Output valid JSON only." },
|
|
1932
|
-
{ role: "user", content: prompt }
|
|
1933
|
-
],
|
|
1934
|
-
{
|
|
1935
|
-
temperature: 0.3,
|
|
1936
|
-
maxTokens: contextSizes.maxOutputTokens,
|
|
1937
|
-
operation: "identity_consolidation",
|
|
1938
|
-
priority: "background"
|
|
1939
|
-
}
|
|
1940
|
-
);
|
|
1941
|
-
if (!response?.content) {
|
|
1942
|
-
return null;
|
|
1943
|
-
}
|
|
1944
|
-
try {
|
|
1945
|
-
const content = response.content.trim();
|
|
1946
|
-
for (const candidate of extractJsonCandidates(content)) {
|
|
1947
|
-
try {
|
|
1948
|
-
const parsed = JSON.parse(candidate);
|
|
1949
|
-
return {
|
|
1950
|
-
learnedPatterns: Array.isArray(parsed.learnedPatterns) ? parsed.learnedPatterns : [],
|
|
1951
|
-
summary: String(parsed.summary || "")
|
|
1952
|
-
};
|
|
1953
|
-
} catch {
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
return null;
|
|
1957
|
-
} catch (err) {
|
|
1958
|
-
log.warn("local LLM identity consolidation: failed to parse JSON response:", err);
|
|
1959
|
-
return null;
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Verify if two memories contradict each other using LLM.
|
|
1964
|
-
* Called when QMD finds semantically similar memories (Phase 2B).
|
|
1965
|
-
*/
|
|
1966
|
-
async verifyContradiction(newMemory, existingMemory) {
|
|
1967
|
-
const input = `Memory 1 (existing, created ${existingMemory.created}):
|
|
1968
|
-
Category: ${existingMemory.category}
|
|
1969
|
-
Content: ${existingMemory.content}
|
|
1970
|
-
|
|
1971
|
-
Memory 2 (new):
|
|
1972
|
-
Category: ${newMemory.category}
|
|
1973
|
-
Content: ${newMemory.content}`;
|
|
1974
|
-
try {
|
|
1975
|
-
const instructionText = `You are a contradiction detection system. Analyze whether two memories contradict each other.
|
|
1976
|
-
|
|
1977
|
-
IMPORTANT: Not all similar memories are contradictions!
|
|
1978
|
-
- "User likes TypeScript" and "User likes Python" are NOT contradictions (preferences can coexist)
|
|
1979
|
-
- "User prefers dark mode" and "User prefers light mode" ARE contradictions (mutually exclusive)
|
|
1980
|
-
- "User's email is a@b.com" and "User's email is c@d.com" ARE contradictions (only one email)
|
|
1981
|
-
- "User works at Acme" and "User used to work at Acme" might be a contradiction (temporal change)
|
|
1982
|
-
|
|
1983
|
-
Only mark as contradiction if the two statements CANNOT both be true at the same time.
|
|
1984
|
-
|
|
1985
|
-
If they ARE contradictory, determine which represents the more recent/current state based on:
|
|
1986
|
-
- Explicit time references ("now", "currently", "used to", "no longer")
|
|
1987
|
-
- The fact that newer corrections often start with "actually" or "correction"
|
|
1988
|
-
- Context clues about change over time
|
|
1989
|
-
|
|
1990
|
-
Respond with valid JSON matching this schema:
|
|
1991
|
-
{
|
|
1992
|
-
"isContradiction": true,
|
|
1993
|
-
"confidence": 0.95,
|
|
1994
|
-
"reasoning": "why they contradict or don't",
|
|
1995
|
-
"whichIsNewer": "first"
|
|
1996
|
-
}`;
|
|
1997
|
-
if (this.shouldUseLocalLlm) {
|
|
1998
|
-
try {
|
|
1999
|
-
const localResponse = await this.localLlm.chatCompletion(
|
|
2000
|
-
[
|
|
2001
|
-
{ role: "system", content: instructionText },
|
|
2002
|
-
{ role: "user", content: input }
|
|
2003
|
-
],
|
|
2004
|
-
{
|
|
2005
|
-
temperature: 0.3,
|
|
2006
|
-
maxTokens: 2048,
|
|
2007
|
-
operation: "contradiction_verification",
|
|
2008
|
-
priority: "background"
|
|
2009
|
-
}
|
|
2010
|
-
);
|
|
2011
|
-
const normalized2 = this.normalizeContradictionVerificationResult(
|
|
2012
|
-
this.parseJsonObject(localResponse?.content)
|
|
2013
|
-
);
|
|
2014
|
-
if (normalized2) {
|
|
2015
|
-
log.debug(
|
|
2016
|
-
`contradiction check via local LLM: ${normalized2.isContradiction ? "YES" : "NO"} (confidence: ${normalized2.confidence})`
|
|
2017
|
-
);
|
|
2018
|
-
return normalized2;
|
|
2019
|
-
}
|
|
2020
|
-
if (!this.config.localLlmFallback) {
|
|
2021
|
-
log.warn("contradiction verification skipped \u2014 local LLM returned invalid JSON and cloud fallback is disabled");
|
|
2022
|
-
return null;
|
|
2023
|
-
}
|
|
2024
|
-
} catch (err) {
|
|
2025
|
-
if (!this.config.localLlmFallback) {
|
|
2026
|
-
log.warn(`contradiction verification skipped \u2014 local LLM failed and cloud fallback is disabled: ${err}`);
|
|
2027
|
-
return null;
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
}
|
|
2031
|
-
if (!this.shouldUseDirectClient) {
|
|
2032
|
-
const fallbackResponse = await this.fallbackLlm.chatCompletion(
|
|
2033
|
-
[
|
|
2034
|
-
{ role: "system", content: instructionText },
|
|
2035
|
-
{ role: "user", content: input }
|
|
2036
|
-
],
|
|
2037
|
-
this.withGatewayAgent({ temperature: 0.3, maxTokens: 2048 })
|
|
2038
|
-
);
|
|
2039
|
-
const normalized2 = this.normalizeContradictionVerificationResult(
|
|
2040
|
-
this.parseJsonObject(fallbackResponse?.content)
|
|
2041
|
-
);
|
|
2042
|
-
if (normalized2) {
|
|
2043
|
-
log.debug(
|
|
2044
|
-
`contradiction check via fallback: ${normalized2.isContradiction ? "YES" : "NO"} (confidence: ${normalized2.confidence})`
|
|
2045
|
-
);
|
|
2046
|
-
return normalized2;
|
|
2047
|
-
}
|
|
2048
|
-
log.warn("contradiction verification skipped \u2014 no OpenAI API key and fallback unavailable");
|
|
2049
|
-
return null;
|
|
2050
|
-
}
|
|
2051
|
-
const response = await this.client.chat.completions.create({
|
|
2052
|
-
model: this.config.model,
|
|
2053
|
-
messages: [
|
|
2054
|
-
{ role: "system", content: instructionText },
|
|
2055
|
-
{ role: "user", content: input }
|
|
2056
|
-
],
|
|
2057
|
-
...buildChatCompletionTokenLimit(this.config.model, 2048, {
|
|
2058
|
-
assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
|
|
2059
|
-
})
|
|
2060
|
-
});
|
|
2061
|
-
const normalized = this.normalizeContradictionVerificationResult(
|
|
2062
|
-
this.parseJsonObject(response.choices?.[0]?.message?.content)
|
|
2063
|
-
);
|
|
2064
|
-
if (normalized) {
|
|
2065
|
-
log.debug(
|
|
2066
|
-
`contradiction check: ${normalized.isContradiction ? "YES" : "NO"} (confidence: ${normalized.confidence})`
|
|
2067
|
-
);
|
|
2068
|
-
return normalized;
|
|
2069
|
-
}
|
|
2070
|
-
return null;
|
|
2071
|
-
} catch (err) {
|
|
2072
|
-
log.error("contradiction verification failed", err);
|
|
2073
|
-
return null;
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
async revalidateDependents(superseded, replacement, dependents, signal) {
|
|
2077
|
-
const complete = async (messages, options) => {
|
|
2078
|
-
try {
|
|
2079
|
-
const fast = await this.fastChatCompletion?.(messages, options);
|
|
2080
|
-
if (fast) return fast;
|
|
2081
|
-
} catch (error) {
|
|
2082
|
-
if (isAbortError(error) || options.signal?.aborted) throw error;
|
|
2083
|
-
log.warn(`dependency revalidation fast route failed: ${error}`);
|
|
2084
|
-
}
|
|
2085
|
-
if (this.shouldUseLocalLlm) {
|
|
2086
|
-
try {
|
|
2087
|
-
const local = await this.localLlm.chatCompletion(messages, options);
|
|
2088
|
-
if (local || !this.config.localLlmFallback) return local;
|
|
2089
|
-
} catch (error) {
|
|
2090
|
-
if (!this.config.localLlmFallback) throw error;
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
if (!this.shouldUseDirectClient) {
|
|
2094
|
-
return this.fallbackLlm.chatCompletion(messages, this.withGatewayAgent(options));
|
|
2095
|
-
}
|
|
2096
|
-
const client = this.client;
|
|
2097
|
-
if (!client) return null;
|
|
2098
|
-
if (!shouldAssumeOpenAiChatCompletions(client.baseURL ?? this.config.openaiBaseUrl)) {
|
|
2099
|
-
const response2 = await client.chat.completions.create(
|
|
2100
|
-
{
|
|
2101
|
-
model: this.config.model,
|
|
2102
|
-
messages,
|
|
2103
|
-
max_tokens: options.maxTokens
|
|
2104
|
-
},
|
|
2105
|
-
{ signal: options.signal }
|
|
2106
|
-
);
|
|
2107
|
-
const content = response2.choices[0]?.message?.content;
|
|
2108
|
-
return typeof content === "string" ? { content } : null;
|
|
2109
|
-
}
|
|
2110
|
-
const response = await client.responses.create({
|
|
2111
|
-
model: this.config.model,
|
|
2112
|
-
instructions: messages.find((message) => message.role === "system")?.content,
|
|
2113
|
-
input: messages.filter((message) => message.role !== "system").map((message) => message.content).join("\n\n"),
|
|
2114
|
-
max_output_tokens: options.maxTokens
|
|
2115
|
-
}, { signal: options.signal });
|
|
2116
|
-
return typeof response.output_text === "string" ? { content: response.output_text } : null;
|
|
2117
|
-
};
|
|
2118
|
-
return revalidateDependentsViaLlm(
|
|
2119
|
-
{ fastChatCompletion: complete, parseJsonObject: this.parseJsonObject },
|
|
2120
|
-
superseded,
|
|
2121
|
-
replacement,
|
|
2122
|
-
dependents,
|
|
2123
|
-
{ signal, timeoutMs: this.config.dependencyPropagation.timeoutMs }
|
|
2124
|
-
);
|
|
2125
|
-
}
|
|
2126
|
-
async suggestLinks(newMemory, candidateMemories) {
|
|
2127
|
-
if (candidateMemories.length === 0) {
|
|
2128
|
-
return { links: [] };
|
|
2129
|
-
}
|
|
2130
|
-
const candidateList = candidateMemories.map((m, i) => `[${i + 1}] ID: ${m.id}
|
|
2131
|
-
Category: ${m.category}
|
|
2132
|
-
Content: ${m.content}`).join("\n\n");
|
|
2133
|
-
const input = `New memory:
|
|
2134
|
-
Category: ${newMemory.category}
|
|
2135
|
-
Content: ${newMemory.content}
|
|
2136
|
-
|
|
2137
|
-
Candidate memories to link to:
|
|
2138
|
-
${candidateList}`;
|
|
2139
|
-
try {
|
|
2140
|
-
const instructionText = `You are a memory linking system. Analyze the new memory and suggest relationships to existing memories.
|
|
2141
|
-
|
|
2142
|
-
Link types:
|
|
2143
|
-
- follows: This memory is a continuation or next step (e.g., decision follows discussion)
|
|
2144
|
-
- references: This memory mentions or refers to the other (e.g., fact references entity)
|
|
2145
|
-
- contradicts: This memory conflicts with the other (use sparingly, only for true contradictions)
|
|
2146
|
-
- supports: This memory provides evidence or reinforcement (e.g., example supports principle)
|
|
2147
|
-
- related: General topical relationship
|
|
2148
|
-
|
|
2149
|
-
Rules:
|
|
2150
|
-
- Only suggest links with strength > 0.5
|
|
2151
|
-
- Quality over quantity \u2014 0-3 links is typical
|
|
2152
|
-
- Prefer specific link types over generic "related"
|
|
2153
|
-
- Consider entity references, topics, and causal relationships
|
|
2154
|
-
|
|
2155
|
-
Respond with valid JSON matching this schema:
|
|
2156
|
-
{
|
|
2157
|
-
"links": [{"targetId": "memory-id", "linkType": "follows|references|contradicts|supports|related", "strength": 0.8, "reason": "why"}]
|
|
2158
|
-
}`;
|
|
2159
|
-
if (this.shouldUseLocalLlm) {
|
|
2160
|
-
try {
|
|
2161
|
-
const localResponse = await this.localLlm.chatCompletion(
|
|
2162
|
-
[
|
|
2163
|
-
{ role: "system", content: instructionText },
|
|
2164
|
-
{ role: "user", content: input }
|
|
2165
|
-
],
|
|
2166
|
-
{
|
|
2167
|
-
temperature: 0.3,
|
|
2168
|
-
maxTokens: 2048,
|
|
2169
|
-
operation: "link_suggestion",
|
|
2170
|
-
priority: "background"
|
|
2171
|
-
}
|
|
2172
|
-
);
|
|
2173
|
-
const normalized2 = this.normalizeSuggestedLinksResult(this.parseJsonObject(localResponse?.content));
|
|
2174
|
-
if (normalized2) {
|
|
2175
|
-
log.debug(`suggested ${normalized2.links.length} links via local LLM`);
|
|
2176
|
-
return normalized2;
|
|
2177
|
-
}
|
|
2178
|
-
if (!this.config.localLlmFallback) {
|
|
2179
|
-
log.warn("link suggestion skipped \u2014 local LLM returned invalid JSON and cloud fallback is disabled");
|
|
2180
|
-
return null;
|
|
2181
|
-
}
|
|
2182
|
-
} catch (err) {
|
|
2183
|
-
if (!this.config.localLlmFallback) {
|
|
2184
|
-
log.warn(`link suggestion skipped \u2014 local LLM failed and cloud fallback is disabled: ${err}`);
|
|
2185
|
-
return null;
|
|
2186
|
-
}
|
|
2187
|
-
}
|
|
2188
|
-
}
|
|
2189
|
-
if (!this.shouldUseDirectClient) {
|
|
2190
|
-
const fallbackResponse = await this.fallbackLlm.chatCompletion(
|
|
2191
|
-
[
|
|
2192
|
-
{ role: "system", content: instructionText },
|
|
2193
|
-
{ role: "user", content: input }
|
|
2194
|
-
],
|
|
2195
|
-
this.withGatewayAgent({ temperature: 0.3, maxTokens: 2048 })
|
|
2196
|
-
);
|
|
2197
|
-
const normalized2 = this.normalizeSuggestedLinksResult(this.parseJsonObject(fallbackResponse?.content));
|
|
2198
|
-
if (normalized2) {
|
|
2199
|
-
log.debug(`suggested ${normalized2.links.length} links via fallback`);
|
|
2200
|
-
return normalized2;
|
|
2201
|
-
}
|
|
2202
|
-
log.warn("link suggestion skipped \u2014 no OpenAI API key and fallback unavailable");
|
|
2203
|
-
return null;
|
|
2204
|
-
}
|
|
2205
|
-
const response = await this.client.chat.completions.create({
|
|
2206
|
-
model: this.config.model,
|
|
2207
|
-
messages: [
|
|
2208
|
-
{ role: "system", content: instructionText },
|
|
2209
|
-
{ role: "user", content: input }
|
|
2210
|
-
],
|
|
2211
|
-
...buildChatCompletionTokenLimit(this.config.model, 2048, {
|
|
2212
|
-
assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
|
|
2213
|
-
})
|
|
2214
|
-
});
|
|
2215
|
-
const normalized = this.normalizeSuggestedLinksResult(
|
|
2216
|
-
this.parseJsonObject(response.choices?.[0]?.message?.content)
|
|
2217
|
-
);
|
|
2218
|
-
if (normalized) {
|
|
2219
|
-
log.debug(`suggested ${normalized.links.length} links`);
|
|
2220
|
-
return normalized;
|
|
2221
|
-
}
|
|
2222
|
-
return null;
|
|
2223
|
-
} catch (err) {
|
|
2224
|
-
log.error("link suggestion failed", err);
|
|
2225
|
-
return null;
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
async generateDaySummary(memories) {
|
|
2229
|
-
if (!resolveRecallAuxiliaryCapabilities(this.config).daySummary) {
|
|
2230
|
-
log.warn("day summary skipped \u2014 disabled by config");
|
|
2231
|
-
return null;
|
|
2232
|
-
}
|
|
2233
|
-
const memoryContext = formatDaySummaryMemories(memories);
|
|
2234
|
-
if (memoryContext.length === 0) return null;
|
|
2235
|
-
const instructionText = await loadDaySummaryPrompt();
|
|
2236
|
-
let extensionsFooter = "";
|
|
2237
|
-
try {
|
|
2238
|
-
extensionsFooter = await buildExtensionsFooterForSummary(this.config);
|
|
2239
|
-
} catch {
|
|
2240
|
-
}
|
|
2241
|
-
const userPrompt = `Generate an end-of-day summary from this Remnic memory context:
|
|
2242
|
-
|
|
2243
|
-
${memoryContext}${extensionsFooter.length > 0 ? `
|
|
2244
|
-
|
|
2245
|
-
${extensionsFooter}` : ""}`;
|
|
2246
|
-
const traceId = crypto.randomUUID();
|
|
2247
|
-
const startedAt = Date.now();
|
|
2248
|
-
this.emit({ kind: "llm_start", traceId, model: this.config.model, operation: "day_summary", input: memoryContext.slice(0, 4e3) });
|
|
2249
|
-
if (this.shouldUseLocalLlm) {
|
|
2250
|
-
try {
|
|
2251
|
-
const localResponse = await this.localLlm.chatCompletion(
|
|
2252
|
-
[
|
|
2253
|
-
{ role: "system", content: `${instructionText}
|
|
2254
|
-
|
|
2255
|
-
Return valid JSON only.` },
|
|
2256
|
-
{ role: "user", content: userPrompt }
|
|
2257
|
-
],
|
|
2258
|
-
{
|
|
2259
|
-
temperature: 0.2,
|
|
2260
|
-
maxTokens: 2048,
|
|
2261
|
-
operation: "day_summary",
|
|
2262
|
-
priority: "background"
|
|
2263
|
-
}
|
|
2264
|
-
);
|
|
2265
|
-
const normalized = this.normalizeDaySummaryResult(this.parseJsonObject(localResponse?.content));
|
|
2266
|
-
if (normalized) {
|
|
2267
|
-
this.emit({ kind: "llm_end", traceId, model: this.config.localLlmModel, operation: "day_summary", durationMs: Date.now() - startedAt, output: JSON.stringify(normalized).slice(0, 2e3) });
|
|
2268
|
-
log.debug(`generated day summary via local LLM (${normalized.bullets.length} bullets)`);
|
|
2269
|
-
return normalized;
|
|
2270
|
-
}
|
|
2271
|
-
if (!this.config.localLlmFallback) {
|
|
2272
|
-
this.emit({ kind: "llm_error", traceId, model: this.config.localLlmModel, operation: "day_summary", durationMs: Date.now() - startedAt, error: "local LLM returned invalid JSON and fallback disabled" });
|
|
2273
|
-
log.warn("day summary skipped \u2014 local LLM returned invalid JSON and fallback disabled");
|
|
2274
|
-
return null;
|
|
2275
|
-
}
|
|
2276
|
-
} catch (err) {
|
|
2277
|
-
if (!this.config.localLlmFallback) {
|
|
2278
|
-
this.emit({ kind: "llm_error", traceId, model: this.config.localLlmModel, operation: "day_summary", durationMs: Date.now() - startedAt, error: String(err) });
|
|
2279
|
-
log.warn(`day summary skipped \u2014 local LLM failed and fallback disabled: ${err}`);
|
|
2280
|
-
return null;
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
}
|
|
2284
|
-
const fallbackResult = await this.parseWithGatewayFallback(
|
|
2285
|
-
traceId,
|
|
2286
|
-
"day_summary",
|
|
2287
|
-
startedAt,
|
|
2288
|
-
DaySummaryResultSchema,
|
|
2289
|
-
[
|
|
2290
|
-
{ role: "system", content: `${instructionText}
|
|
2291
|
-
|
|
2292
|
-
Return valid JSON only.` },
|
|
2293
|
-
{ role: "user", content: userPrompt }
|
|
2294
|
-
],
|
|
2295
|
-
{ temperature: 0.2, maxTokens: 2048 }
|
|
2296
|
-
);
|
|
2297
|
-
if (fallbackResult) {
|
|
2298
|
-
const normalized = this.normalizeDaySummaryResult(fallbackResult);
|
|
2299
|
-
if (normalized) {
|
|
2300
|
-
log.debug(`generated day summary via fallback (${normalized.bullets.length} bullets)`);
|
|
2301
|
-
return normalized;
|
|
2302
|
-
}
|
|
2303
|
-
}
|
|
2304
|
-
if (this.shouldUseDirectClient) {
|
|
2305
|
-
try {
|
|
2306
|
-
const response = await this.client.responses.create({
|
|
2307
|
-
model: this.config.model,
|
|
2308
|
-
instructions: `${instructionText}
|
|
2309
|
-
|
|
2310
|
-
Return valid JSON only.`,
|
|
2311
|
-
input: userPrompt,
|
|
2312
|
-
max_output_tokens: 2048
|
|
2313
|
-
});
|
|
2314
|
-
const rawText = typeof response.output_text === "string" ? response.output_text : JSON.stringify(response.output_text ?? "");
|
|
2315
|
-
const normalized = this.normalizeDaySummaryResult(this.parseJsonObject(rawText));
|
|
2316
|
-
if (normalized) {
|
|
2317
|
-
this.emit({ kind: "llm_end", traceId, model: this.config.model, operation: "day_summary", durationMs: Date.now() - startedAt, output: JSON.stringify(normalized).slice(0, 2e3) });
|
|
2318
|
-
log.debug(`generated day summary via Responses API (${normalized.bullets.length} bullets)`);
|
|
2319
|
-
return normalized;
|
|
2320
|
-
}
|
|
2321
|
-
this.emit({ kind: "llm_error", traceId, model: this.config.model, operation: "day_summary", durationMs: Date.now() - startedAt, error: "Responses API returned unparseable output" });
|
|
2322
|
-
} catch (err) {
|
|
2323
|
-
this.emit({ kind: "llm_error", traceId, model: this.config.model, operation: "day_summary", durationMs: Date.now() - startedAt, error: `Responses API failed: ${err}` });
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
this.emit({ kind: "llm_error", traceId, model: this.config.model, operation: "day_summary", durationMs: Date.now() - startedAt, error: "all generation paths exhausted (local LLM + gateway + Responses API)" });
|
|
2327
|
-
log.warn("day summary skipped \u2014 all generation paths exhausted");
|
|
2328
|
-
return null;
|
|
2329
|
-
}
|
|
2330
|
-
/**
|
|
2331
|
-
* Summarize a batch of old memories into a compact summary (Phase 4A).
|
|
2332
|
-
*/
|
|
2333
|
-
async summarizeMemories(memories) {
|
|
2334
|
-
if (memories.length === 0) return null;
|
|
2335
|
-
const memoryList = memories.map((m) => `[${m.id}] (${m.category}, ${m.created.slice(0, 10)})
|
|
2336
|
-
${m.content}`).join("\n\n");
|
|
2337
|
-
try {
|
|
2338
|
-
const instructionText = `You are a memory summarization system. You are given a batch of old memories that need to be compressed into a summary.
|
|
2339
|
-
|
|
2340
|
-
Your task:
|
|
2341
|
-
1. Write a concise summary paragraph (2-4 sentences) capturing the essence of these memories
|
|
2342
|
-
2. Extract the 5-10 most important facts that should be preserved
|
|
2343
|
-
3. List the key entities mentioned
|
|
2344
|
-
|
|
2345
|
-
Guidelines:
|
|
2346
|
-
- Preserve specific, actionable information
|
|
2347
|
-
- Merge redundant details into single statements
|
|
2348
|
-
- Focus on durable insights, not transient details
|
|
2349
|
-
- Maintain any preferences, decisions, or corrections as key facts
|
|
2350
|
-
|
|
2351
|
-
Respond with valid JSON matching this schema:
|
|
2352
|
-
{
|
|
2353
|
-
"summaryText": "concise summary paragraph",
|
|
2354
|
-
"keyFacts": ["fact 1", "fact 2"],
|
|
2355
|
-
"keyEntities": ["entity-1", "entity-2"]
|
|
2356
|
-
}`;
|
|
2357
|
-
if (this.shouldUseLocalLlm) {
|
|
2358
|
-
try {
|
|
2359
|
-
const localResponse = await this.localLlm.chatCompletion(
|
|
2360
|
-
[
|
|
2361
|
-
{ role: "system", content: instructionText },
|
|
2362
|
-
{ role: "user", content: `Summarize these ${memories.length} memories:
|
|
2363
|
-
|
|
2364
|
-
${memoryList}` }
|
|
2365
|
-
],
|
|
2366
|
-
{
|
|
2367
|
-
temperature: 0.3,
|
|
2368
|
-
maxTokens: 4096,
|
|
2369
|
-
operation: "memory_summarization",
|
|
2370
|
-
priority: "background"
|
|
2371
|
-
}
|
|
2372
|
-
);
|
|
2373
|
-
const normalized2 = this.normalizeMemorySummaryResult(this.parseJsonObject(localResponse?.content));
|
|
2374
|
-
if (normalized2) {
|
|
2375
|
-
log.debug(
|
|
2376
|
-
`summarized ${memories.length} memories into ${normalized2.keyFacts.length} key facts via local LLM`
|
|
2377
|
-
);
|
|
2378
|
-
return normalized2;
|
|
2379
|
-
}
|
|
2380
|
-
if (!this.config.localLlmFallback) {
|
|
2381
|
-
log.warn("summarization skipped \u2014 local LLM returned invalid JSON and cloud fallback is disabled");
|
|
2382
|
-
return null;
|
|
2383
|
-
}
|
|
2384
|
-
} catch (err) {
|
|
2385
|
-
if (!this.config.localLlmFallback) {
|
|
2386
|
-
log.warn(`summarization skipped \u2014 local LLM failed and cloud fallback is disabled: ${err}`);
|
|
2387
|
-
return null;
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
}
|
|
2391
|
-
if (!this.shouldUseDirectClient) {
|
|
2392
|
-
const fallbackResponse = await this.fallbackLlm.chatCompletion(
|
|
2393
|
-
[
|
|
2394
|
-
{ role: "system", content: instructionText },
|
|
2395
|
-
{ role: "user", content: `Summarize these ${memories.length} memories:
|
|
2396
|
-
|
|
2397
|
-
${memoryList}` }
|
|
2398
|
-
],
|
|
2399
|
-
this.withGatewayAgent({ temperature: 0.3, maxTokens: 4096 })
|
|
2400
|
-
);
|
|
2401
|
-
const normalized2 = this.normalizeMemorySummaryResult(this.parseJsonObject(fallbackResponse?.content));
|
|
2402
|
-
if (normalized2) {
|
|
2403
|
-
log.debug(`summarized ${memories.length} memories into ${normalized2.keyFacts.length} key facts via fallback`);
|
|
2404
|
-
return normalized2;
|
|
2405
|
-
}
|
|
2406
|
-
log.warn("summarization skipped \u2014 no OpenAI API key and fallback unavailable");
|
|
2407
|
-
return null;
|
|
2408
|
-
}
|
|
2409
|
-
const response = await this.client.chat.completions.create({
|
|
2410
|
-
model: this.config.model,
|
|
2411
|
-
messages: [
|
|
2412
|
-
{ role: "system", content: instructionText },
|
|
2413
|
-
{ role: "user", content: `Summarize these ${memories.length} memories:
|
|
2414
|
-
|
|
2415
|
-
${memoryList}` }
|
|
2416
|
-
],
|
|
2417
|
-
...buildChatCompletionTokenLimit(this.config.model, 4096, {
|
|
2418
|
-
assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
|
|
2419
|
-
})
|
|
2420
|
-
});
|
|
2421
|
-
const normalized = this.normalizeMemorySummaryResult(
|
|
2422
|
-
this.parseJsonObject(response.choices?.[0]?.message?.content)
|
|
2423
|
-
);
|
|
2424
|
-
if (normalized) {
|
|
2425
|
-
log.debug(`summarized ${memories.length} memories into ${normalized.keyFacts.length} key facts`);
|
|
2426
|
-
return normalized;
|
|
2427
|
-
}
|
|
2428
|
-
return null;
|
|
2429
|
-
} catch (err) {
|
|
2430
|
-
log.error("memory summarization failed", err);
|
|
2431
|
-
return null;
|
|
2432
|
-
}
|
|
2433
|
-
}
|
|
2434
|
-
};
|
|
2435
|
-
|
|
2436
|
-
export {
|
|
2437
|
-
shouldEnableLocalExtractionThinking,
|
|
2438
|
-
ExtractionEngine
|
|
2439
|
-
};
|
|
2440
|
-
//# sourceMappingURL=chunk-KH2D26LQ.js.map
|