@remnic/core 9.63.4 → 9.63.5
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/access-admin-ops-surface.d.ts +11 -11
- package/dist/access-admin-ops-surface.js +23 -23
- package/dist/access-authorization-probe.d.ts +11 -11
- package/dist/access-authorization-probe.js +24 -24
- package/dist/access-boundary.d.ts +11 -11
- package/dist/access-boundary.js +23 -23
- package/dist/access-cli.js +55 -55
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +11 -11
- package/dist/access-extraction-force-flush.js +23 -23
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +11 -11
- package/dist/access-http-lifecycle-flush.d.ts +11 -11
- package/dist/access-http-offline-stream.d.ts +11 -11
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +25 -25
- package/dist/access-http.d.ts +12 -12
- package/dist/access-http.js +34 -34
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +23 -23
- package/dist/access-lcm-surface.d.ts +11 -11
- package/dist/access-lcm-surface.js +23 -23
- package/dist/access-mcp.d.ts +11 -11
- package/dist/access-mcp.js +28 -28
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-yO4LMGFH.d.ts → access-namespace-preflight-DB0zXFek.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +23 -23
- package/dist/access-observe-write-surface.d.ts +11 -11
- package/dist/access-observe-write-surface.js +23 -23
- package/dist/access-offline-manifest.d.ts +9 -9
- package/dist/access-offline-manifest.js +3 -3
- package/dist/access-operations-batch.js +24 -24
- package/dist/access-operations.d.ts +11 -11
- package/dist/access-operations.js +27 -27
- package/dist/access-recall-concurrency.d.ts +11 -11
- package/dist/access-recall-concurrency.js +23 -23
- package/dist/access-recall-response.d.ts +11 -11
- package/dist/access-recall-response.js +23 -23
- package/dist/access-recall-surface.d.ts +11 -11
- package/dist/access-recall-surface.js +23 -23
- package/dist/{access-service-D-bi3r01.d.ts → access-service-cKQrte9Z.d.ts} +7 -7
- package/dist/access-service-helpers.d.ts +11 -11
- package/dist/access-service.d.ts +11 -11
- package/dist/access-service.js +23 -23
- package/dist/access-surface-catalog.d.ts +11 -11
- package/dist/access-surface-catalog.js +25 -25
- package/dist/access-wearables-meetings-surface.d.ts +3 -3
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -9
- package/dist/briefing-window.d.ts +2 -2
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +11 -11
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +4 -4
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-merge-HCJJMLPS.js → capsule-merge-SGIVB3WA.js} +5 -5
- package/dist/{catalog-BYIHQw1l.d.ts → catalog-CCzmf8IH.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +12 -12
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-XFCQIQQU.js → chunk-2UM6WHME.js} +3 -3
- package/dist/{chunk-CKWOMJDY.js → chunk-3Z5TGRFA.js} +8 -8
- package/dist/{chunk-JJX5XEIG.js → chunk-77QZW2D6.js} +4 -4
- package/dist/{chunk-X4MGNVOO.js → chunk-7AF243WZ.js} +1 -1
- package/dist/{chunk-2ASAS3CQ.js → chunk-7KQB4EBS.js} +2 -2
- package/dist/{chunk-3LJ2L3T3.js → chunk-7LF2OHIJ.js} +2 -2
- package/dist/{chunk-VAMQU4W7.js → chunk-AYVCKGA6.js} +2 -2
- package/dist/{chunk-GTRGH4ZT.js → chunk-BB2LH5JM.js} +2 -2
- package/dist/{chunk-XMMESCPD.js → chunk-C64XATK7.js} +17 -27
- package/dist/chunk-C64XATK7.js.map +1 -0
- package/dist/{chunk-DQV3LUQL.js → chunk-CUDSA46O.js} +2 -2
- package/dist/{chunk-PADG72LJ.js → chunk-DXDAQZ2K.js} +2 -2
- package/dist/{chunk-EJCN5ATI.js → chunk-DYZR3Z6D.js} +3 -3
- package/dist/{chunk-VN7IIQGS.js → chunk-E4KMY4KR.js} +2 -2
- package/dist/{chunk-ZQKXRKMR.js → chunk-EFKZT6AY.js} +2 -2
- package/dist/{chunk-DNRTKO2U.js → chunk-EJY3HJMT.js} +2 -2
- package/dist/{chunk-4EDAHS6D.js → chunk-ERPBRXVZ.js} +2 -2
- package/dist/{chunk-ZUZD2DRV.js → chunk-F6JYBVL6.js} +27 -57
- package/dist/{chunk-ZUZD2DRV.js.map → chunk-F6JYBVL6.js.map} +1 -1
- package/dist/{chunk-JWPG65LH.js → chunk-FHKXVTM5.js} +38 -39
- package/dist/chunk-FHKXVTM5.js.map +1 -0
- package/dist/{chunk-RPKJHYVE.js → chunk-FPEZ74F7.js} +2 -2
- package/dist/{chunk-Z334TJRB.js → chunk-GF7RQWXC.js} +2 -2
- package/dist/{chunk-6D7PZKCJ.js → chunk-GG4DN63W.js} +2 -2
- package/dist/{chunk-OR7KEGLR.js → chunk-GTD4Q62X.js} +2 -6
- package/dist/{chunk-QOMUE4FS.js → chunk-I5FLIB2J.js} +2 -2
- package/dist/{chunk-2JL7WPXL.js → chunk-IVXVLDNT.js} +12 -12
- package/dist/{chunk-NRFU5MVH.js → chunk-JOEJG4SD.js} +47 -1
- package/dist/chunk-JOEJG4SD.js.map +1 -0
- package/dist/{chunk-EJLTNPRY.js → chunk-KHCUVYCY.js} +3 -3
- package/dist/{chunk-QSIQVC32.js → chunk-KYTRF64R.js} +2 -2
- package/dist/{chunk-LNFYISZ6.js → chunk-LX4TNSAE.js} +4 -4
- package/dist/{chunk-H6ZXNH5I.js → chunk-MUJ4QFUQ.js} +3 -3
- package/dist/{chunk-JSH2TV34.js → chunk-NA56NSKL.js} +2 -2
- package/dist/{chunk-DFEYRCG2.js → chunk-NKB43PGI.js} +2 -2
- package/dist/{chunk-DLQQU4EG.js → chunk-NS5ETDYD.js} +2 -2
- package/dist/{chunk-VG6DC2GO.js → chunk-OETHJBAL.js} +53 -45
- package/dist/{chunk-VG6DC2GO.js.map → chunk-OETHJBAL.js.map} +1 -1
- package/dist/{chunk-BXOZALJ6.js → chunk-PB4WVYGC.js} +2 -2
- package/dist/{chunk-Q35XGIEM.js → chunk-PBRCYYO7.js} +2 -2
- package/dist/{chunk-QYN5PXDZ.js → chunk-PMVPCZJZ.js} +4 -4
- package/dist/{chunk-3USQWITL.js → chunk-QI5RDDEL.js} +3 -3
- package/dist/{chunk-I6OQCT3Y.js → chunk-QRWMS6SI.js} +2 -2
- package/dist/{chunk-ITYAXU4S.js → chunk-R6UMNP5C.js} +3 -3
- package/dist/{chunk-5W62VEFH.js → chunk-RWMSMTQP.js} +2 -2
- package/dist/{chunk-FKJVEW6O.js → chunk-SYVGVK4S.js} +2 -2
- package/dist/{chunk-GNKY5JEP.js → chunk-TSTI6A3A.js} +8 -8
- package/dist/{chunk-ISFUFLFM.js → chunk-UCLMKNHA.js} +2 -2
- package/dist/{chunk-ZMSZVISA.js → chunk-UFKPQBXH.js} +3 -3
- package/dist/{chunk-B2OOJCUX.js → chunk-UGHCZS6K.js} +2 -2
- package/dist/{chunk-RSLRGRBJ.js → chunk-V3KIRICY.js} +3 -3
- package/dist/{chunk-MRJ43KSG.js → chunk-VPHSMJ2E.js} +2 -2
- package/dist/{chunk-E2GYBTSP.js → chunk-VYEPACWY.js} +2 -2
- package/dist/{chunk-A4HXWNST.js → chunk-X7LEDA74.js} +2 -2
- package/dist/{chunk-KMAP7SNQ.js → chunk-XCB6QDL6.js} +2 -2
- package/dist/{chunk-WDUG2CH3.js → chunk-YEQCMA5L.js} +2 -2
- package/dist/{chunk-LZCSOUJ7.js → chunk-YFCEBB5P.js} +2 -2
- package/dist/{chunk-IKXUG6KC.js → chunk-YXMHUBN2.js} +2 -2
- package/dist/{chunk-GFNS3BHV.js → chunk-ZUPKNWRZ.js} +3 -3
- package/dist/{chunk-GSTIBXBW.js → chunk-ZVPVTPGI.js} +2 -2
- package/dist/{cli-DEoABKXH.d.ts → cli-BFBDYV0D.d.ts} +5 -5
- package/dist/cli.d.ts +13 -13
- package/dist/cli.js +45 -45
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +11 -11
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +11 -11
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +11 -11
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-provenance-check.js +5 -5
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/consolidation-undo.js +4 -4
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +13 -13
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +13 -13
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-BxhvAppj.d.ts → dependency-propagation-delivery-DiY5T63p.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-origin-fields.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +11 -11
- package/dist/entity-schema.d.ts +1 -1
- package/dist/episodic-context.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/explicit-capture.js +5 -5
- package/dist/external-wiki-access.d.ts +11 -11
- package/dist/external-wiki-access.js +24 -24
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +11 -11
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-prompt.d.ts +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction.d.ts +1 -1
- package/dist/extraction.js +14 -14
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/index.js +55 -55
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +11 -11
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +12 -12
- package/dist/{maintenance-N5ur13Al.d.ts → maintenance-CaqA4z7V.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +11 -11
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-cache.js +1 -1
- package/dist/memory-corpus-version.js +2 -2
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +12 -12
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +11 -11
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +14 -14
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +20 -20
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +17 -17
- package/dist/{orchestrator-ByLrpav4.d.ts → orchestrator-CSc9GfQv.d.ts} +8 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +55 -55
- package/dist/page-versioning.js +4 -4
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-BdF3ferY.d.ts → pipeline-X606GdRJ.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{public-http-DusietP2.d.ts → public-http-8PcrDIYi.d.ts} +1 -1
- package/dist/{qmd-CBSxevyb.d.ts → qmd-DCKeR-GX.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/qmd.js +2 -2
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray.d.ts +1 -1
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/manifest.js +2 -2
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/{scope-profiles-CeMv7pP0.d.ts → scope-profiles-_Y_RHCeE.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +3 -3
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-B-85brYj.d.ts → semantic-consolidation-DT2VSrU0.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +12 -12
- package/dist/semantic-rule-promotion.js +11 -11
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +11 -11
- package/dist/{service-CoO0HA2E.d.ts → service-BMo-gwDE.d.ts} +3 -3
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +13 -13
- package/dist/{storage-BVAVitkO.d.ts → storage-CGzJGUUu.d.ts} +49 -24
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +10 -10
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +14 -14
- package/dist/support-passport/index.js +26 -26
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/capsule-import.js +5 -5
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-DWHOxlZP.d.ts → types-CBEAYU76.d.ts} +112 -128
- package/dist/types.d.ts +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +11 -11
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/chat/chat-cli.test.ts +53 -0
- package/src/chat/chat-cli.ts +22 -58
- package/src/dedup/index.test.ts +65 -1
- package/src/dedup/index.ts +24 -2
- package/src/meetings/build.test.ts +20 -4
- package/src/meetings/build.ts +2 -2
- package/src/meetings/day-source.test.ts +3 -1
- package/src/meetings/day-source.ts +1 -12
- package/src/meetings/fuse.test.ts +64 -15
- package/src/meetings/fuse.ts +18 -12
- package/src/meetings/types.ts +4 -19
- package/src/memory-cache-derived.test.ts +90 -0
- package/src/memory-cache.ts +40 -42
- package/src/storage/content-hash-index.ts +54 -0
- package/src/storage-contract/content-hash.test.ts +59 -1
- package/src/storage-fact-hash-index-defer.test.ts +9 -9
- package/src/storage.ts +39 -40
- package/dist/chunk-JWPG65LH.js.map +0 -1
- package/dist/chunk-NRFU5MVH.js.map +0 -1
- package/dist/chunk-XMMESCPD.js.map +0 -1
- /package/dist/{capsule-merge-HCJJMLPS.js.map → capsule-merge-SGIVB3WA.js.map} +0 -0
- /package/dist/{chunk-XFCQIQQU.js.map → chunk-2UM6WHME.js.map} +0 -0
- /package/dist/{chunk-CKWOMJDY.js.map → chunk-3Z5TGRFA.js.map} +0 -0
- /package/dist/{chunk-JJX5XEIG.js.map → chunk-77QZW2D6.js.map} +0 -0
- /package/dist/{chunk-X4MGNVOO.js.map → chunk-7AF243WZ.js.map} +0 -0
- /package/dist/{chunk-2ASAS3CQ.js.map → chunk-7KQB4EBS.js.map} +0 -0
- /package/dist/{chunk-3LJ2L3T3.js.map → chunk-7LF2OHIJ.js.map} +0 -0
- /package/dist/{chunk-VAMQU4W7.js.map → chunk-AYVCKGA6.js.map} +0 -0
- /package/dist/{chunk-GTRGH4ZT.js.map → chunk-BB2LH5JM.js.map} +0 -0
- /package/dist/{chunk-DQV3LUQL.js.map → chunk-CUDSA46O.js.map} +0 -0
- /package/dist/{chunk-PADG72LJ.js.map → chunk-DXDAQZ2K.js.map} +0 -0
- /package/dist/{chunk-EJCN5ATI.js.map → chunk-DYZR3Z6D.js.map} +0 -0
- /package/dist/{chunk-VN7IIQGS.js.map → chunk-E4KMY4KR.js.map} +0 -0
- /package/dist/{chunk-ZQKXRKMR.js.map → chunk-EFKZT6AY.js.map} +0 -0
- /package/dist/{chunk-DNRTKO2U.js.map → chunk-EJY3HJMT.js.map} +0 -0
- /package/dist/{chunk-4EDAHS6D.js.map → chunk-ERPBRXVZ.js.map} +0 -0
- /package/dist/{chunk-RPKJHYVE.js.map → chunk-FPEZ74F7.js.map} +0 -0
- /package/dist/{chunk-Z334TJRB.js.map → chunk-GF7RQWXC.js.map} +0 -0
- /package/dist/{chunk-6D7PZKCJ.js.map → chunk-GG4DN63W.js.map} +0 -0
- /package/dist/{chunk-OR7KEGLR.js.map → chunk-GTD4Q62X.js.map} +0 -0
- /package/dist/{chunk-QOMUE4FS.js.map → chunk-I5FLIB2J.js.map} +0 -0
- /package/dist/{chunk-2JL7WPXL.js.map → chunk-IVXVLDNT.js.map} +0 -0
- /package/dist/{chunk-EJLTNPRY.js.map → chunk-KHCUVYCY.js.map} +0 -0
- /package/dist/{chunk-QSIQVC32.js.map → chunk-KYTRF64R.js.map} +0 -0
- /package/dist/{chunk-LNFYISZ6.js.map → chunk-LX4TNSAE.js.map} +0 -0
- /package/dist/{chunk-H6ZXNH5I.js.map → chunk-MUJ4QFUQ.js.map} +0 -0
- /package/dist/{chunk-JSH2TV34.js.map → chunk-NA56NSKL.js.map} +0 -0
- /package/dist/{chunk-DFEYRCG2.js.map → chunk-NKB43PGI.js.map} +0 -0
- /package/dist/{chunk-DLQQU4EG.js.map → chunk-NS5ETDYD.js.map} +0 -0
- /package/dist/{chunk-BXOZALJ6.js.map → chunk-PB4WVYGC.js.map} +0 -0
- /package/dist/{chunk-Q35XGIEM.js.map → chunk-PBRCYYO7.js.map} +0 -0
- /package/dist/{chunk-QYN5PXDZ.js.map → chunk-PMVPCZJZ.js.map} +0 -0
- /package/dist/{chunk-3USQWITL.js.map → chunk-QI5RDDEL.js.map} +0 -0
- /package/dist/{chunk-I6OQCT3Y.js.map → chunk-QRWMS6SI.js.map} +0 -0
- /package/dist/{chunk-ITYAXU4S.js.map → chunk-R6UMNP5C.js.map} +0 -0
- /package/dist/{chunk-5W62VEFH.js.map → chunk-RWMSMTQP.js.map} +0 -0
- /package/dist/{chunk-FKJVEW6O.js.map → chunk-SYVGVK4S.js.map} +0 -0
- /package/dist/{chunk-GNKY5JEP.js.map → chunk-TSTI6A3A.js.map} +0 -0
- /package/dist/{chunk-ISFUFLFM.js.map → chunk-UCLMKNHA.js.map} +0 -0
- /package/dist/{chunk-ZMSZVISA.js.map → chunk-UFKPQBXH.js.map} +0 -0
- /package/dist/{chunk-B2OOJCUX.js.map → chunk-UGHCZS6K.js.map} +0 -0
- /package/dist/{chunk-RSLRGRBJ.js.map → chunk-V3KIRICY.js.map} +0 -0
- /package/dist/{chunk-MRJ43KSG.js.map → chunk-VPHSMJ2E.js.map} +0 -0
- /package/dist/{chunk-E2GYBTSP.js.map → chunk-VYEPACWY.js.map} +0 -0
- /package/dist/{chunk-A4HXWNST.js.map → chunk-X7LEDA74.js.map} +0 -0
- /package/dist/{chunk-KMAP7SNQ.js.map → chunk-XCB6QDL6.js.map} +0 -0
- /package/dist/{chunk-WDUG2CH3.js.map → chunk-YEQCMA5L.js.map} +0 -0
- /package/dist/{chunk-LZCSOUJ7.js.map → chunk-YFCEBB5P.js.map} +0 -0
- /package/dist/{chunk-IKXUG6KC.js.map → chunk-YXMHUBN2.js.map} +0 -0
- /package/dist/{chunk-GFNS3BHV.js.map → chunk-ZUPKNWRZ.js.map} +0 -0
- /package/dist/{chunk-GSTIBXBW.js.map → chunk-ZVPVTPGI.js.map} +0 -0
|
@@ -88,6 +88,114 @@ declare function isImportRole(value: unknown): value is ImportSourceRole;
|
|
|
88
88
|
declare function parseIsoTimestamp(value: string): number | null;
|
|
89
89
|
declare function validateImportTurn(turn: ImportTurn, index?: number): ImportTurnValidationIssue[];
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Screen-activity subsystem — shared types (issue #1899).
|
|
93
|
+
*
|
|
94
|
+
* A third ingestion modality alongside wearables (conversations) and live
|
|
95
|
+
* connectors (documents). Screen text has no speakers and is high-volume, so it
|
|
96
|
+
* gets its own store and day-digest rather than being forced into the wearable
|
|
97
|
+
* conversation shape. Capture daemons live in the à-la-carte `@remnic/capture-screen`
|
|
98
|
+
* package; this core subsystem is host-agnostic and consumes snapshots over a
|
|
99
|
+
* loopback HTTP client.
|
|
100
|
+
*
|
|
101
|
+
* All timestamps are UTC ISO-8601; day bucketing is half-open [start, end).
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
type ActivityExtractionMode = "off" | "smart";
|
|
105
|
+
/** One captured on-screen text snapshot (a single window at a single instant). */
|
|
106
|
+
interface ActivitySnapshot {
|
|
107
|
+
/** Store row id (assigned on insert; absent before persistence). */
|
|
108
|
+
id?: number;
|
|
109
|
+
/** Capture-machine label (disambiguates multi-machine stores). */
|
|
110
|
+
machine: string;
|
|
111
|
+
/** UTC ISO-8601 capture instant. */
|
|
112
|
+
capturedAtUtc: string;
|
|
113
|
+
/** Frontmost application name. */
|
|
114
|
+
app: string;
|
|
115
|
+
/** Frontmost window title. */
|
|
116
|
+
windowTitle: string;
|
|
117
|
+
/** Browser tab URL, when the frontmost window is a known browser. */
|
|
118
|
+
browserUrl?: string;
|
|
119
|
+
/** Extracted visible text (accessibility tree or OCR). */
|
|
120
|
+
text: string;
|
|
121
|
+
/** Where the text came from. */
|
|
122
|
+
textSource: "ax" | "ocr";
|
|
123
|
+
/** SHA-256 of the normalized snapshot content (idempotency key). */
|
|
124
|
+
contentHash: string;
|
|
125
|
+
/** 64-bit SimHash (hex) for near-duplicate detection, when computed. */
|
|
126
|
+
simhash?: string;
|
|
127
|
+
}
|
|
128
|
+
/** Frontmatter persisted on a rendered day digest. */
|
|
129
|
+
interface ActivityDayMeta {
|
|
130
|
+
kind: "activity-digest";
|
|
131
|
+
/** Local day, YYYY-MM-DD. */
|
|
132
|
+
date: string;
|
|
133
|
+
/** Machines that contributed snapshots, sorted. */
|
|
134
|
+
machines: string[];
|
|
135
|
+
snapshotCount: number;
|
|
136
|
+
/** SHA-256 of the rendered body (rebuild-idempotency). */
|
|
137
|
+
contentHash: string;
|
|
138
|
+
formatVersion: number;
|
|
139
|
+
}
|
|
140
|
+
/** A parsed day digest (frontmatter + rendered body). */
|
|
141
|
+
interface ActivityDayDigest {
|
|
142
|
+
meta: ActivityDayMeta;
|
|
143
|
+
body: string;
|
|
144
|
+
}
|
|
145
|
+
/** Result of a capture-daemon auth/health probe. */
|
|
146
|
+
interface ActivitySourceCheck {
|
|
147
|
+
ok: boolean;
|
|
148
|
+
detail?: string;
|
|
149
|
+
}
|
|
150
|
+
/** One page of snapshots pulled from a capture daemon. */
|
|
151
|
+
interface ActivitySnapshotPage {
|
|
152
|
+
snapshots: ActivitySnapshot[];
|
|
153
|
+
nextCursor: string | null;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Client contract for a screen-capture daemon (one per capture machine).
|
|
157
|
+
* Implemented by a later slice (the HTTP source client); defined here so the
|
|
158
|
+
* store and pipeline can be built and tested against a fixture double first.
|
|
159
|
+
*/
|
|
160
|
+
interface ActivitySourceClient {
|
|
161
|
+
/** Stable capture-machine label. */
|
|
162
|
+
machineLabel: string;
|
|
163
|
+
/** Probe connectivity/auth without mutating anything. */
|
|
164
|
+
verify(signal?: AbortSignal): Promise<ActivitySourceCheck>;
|
|
165
|
+
/** Fetch one page of snapshots for a single local day. */
|
|
166
|
+
fetchSnapshots(opts: {
|
|
167
|
+
date: string;
|
|
168
|
+
timezone: string;
|
|
169
|
+
cursor?: string | null;
|
|
170
|
+
signal?: AbortSignal;
|
|
171
|
+
}): Promise<ActivitySnapshotPage>;
|
|
172
|
+
}
|
|
173
|
+
/** One trusted capture daemon that feeds this memory directory. */
|
|
174
|
+
interface ActivitySourceConfig {
|
|
175
|
+
machineLabel: string;
|
|
176
|
+
baseUrl: string;
|
|
177
|
+
token?: string;
|
|
178
|
+
}
|
|
179
|
+
/** Opt-in activity synchronization + trust-gated extraction settings. */
|
|
180
|
+
interface ActivityConfig {
|
|
181
|
+
enabled: boolean;
|
|
182
|
+
timezone: string;
|
|
183
|
+
syncDays: number;
|
|
184
|
+
/** Periodic auto-sync cadence in minutes (default 15). */
|
|
185
|
+
autoSyncIntervalMinutes: number;
|
|
186
|
+
sources: ActivitySourceConfig[];
|
|
187
|
+
/** `off` keeps activity searchable only; `smart` trust-gates durable first-person claims. */
|
|
188
|
+
extractionMode: ActivityExtractionMode;
|
|
189
|
+
/** Baseline confidence in activity as a source of the user's own actions. */
|
|
190
|
+
sourceTrust: number;
|
|
191
|
+
autoApproveTrust: number;
|
|
192
|
+
reviewTrust: number;
|
|
193
|
+
minConfidence: number;
|
|
194
|
+
minImportance: ImportanceLevel;
|
|
195
|
+
/** `0` means no count cap. */
|
|
196
|
+
maxMemoriesPerDay: number;
|
|
197
|
+
}
|
|
198
|
+
|
|
91
199
|
/**
|
|
92
200
|
* Wearable cross-source fusion — shared types (issue #1810).
|
|
93
201
|
*
|
|
@@ -378,23 +486,6 @@ interface MeetingsDetectionConfig {
|
|
|
378
486
|
/** Merge candidates within this gap of each other (minutes). */
|
|
379
487
|
mergeGapMinutes: number;
|
|
380
488
|
}
|
|
381
|
-
/**
|
|
382
|
-
* One screen-activity snapshot fed into meeting fusion (assembled from the
|
|
383
|
-
* activity store by a later wiring slice; injected directly in tests). Text is
|
|
384
|
-
* already post-redaction — meeting fusion never sees raw capture.
|
|
385
|
-
*/
|
|
386
|
-
interface MeetingActivitySnapshot {
|
|
387
|
-
/** ISO 8601 UTC instant the snapshot was captured. */
|
|
388
|
-
tsUtc: string;
|
|
389
|
-
/** Foreground application label (e.g. "Preview", "Chrome", "Zoom"). */
|
|
390
|
-
app: string;
|
|
391
|
-
/** Window title, when known. */
|
|
392
|
-
title?: string;
|
|
393
|
-
/** Browser URL, when known. */
|
|
394
|
-
url?: string;
|
|
395
|
-
/** Extracted on-screen text excerpt, when known. */
|
|
396
|
-
text?: string;
|
|
397
|
-
}
|
|
398
489
|
/** One entry in a meeting's screen-context timeline (an other-app dwell). */
|
|
399
490
|
interface MeetingScreenContextEvent {
|
|
400
491
|
/** ISO 8601 UTC instant the dwell began (clamped to the meeting window). */
|
|
@@ -437,8 +528,9 @@ interface MeetingBuildInput {
|
|
|
437
528
|
* is fine (they are clipped in `fuseMeeting`).
|
|
438
529
|
*/
|
|
439
530
|
conversations: FusionConversationInput[];
|
|
440
|
-
/** Day screen-activity snapshots (filtered to the window in `fuseMeeting`).
|
|
441
|
-
|
|
531
|
+
/** Day screen-activity snapshots (filtered to the window in `fuseMeeting`).
|
|
532
|
+
* Already post-redaction — meeting fusion never sees raw capture. */
|
|
533
|
+
activity?: ActivitySnapshot[];
|
|
442
534
|
}
|
|
443
535
|
/** The fused, screen-aware view of a meeting produced by `fuseMeeting`. */
|
|
444
536
|
interface FusedMeeting {
|
|
@@ -477,114 +569,6 @@ interface MeetingRecord extends FusedMeeting {
|
|
|
477
569
|
formatVersion: number;
|
|
478
570
|
}
|
|
479
571
|
|
|
480
|
-
/**
|
|
481
|
-
* Screen-activity subsystem — shared types (issue #1899).
|
|
482
|
-
*
|
|
483
|
-
* A third ingestion modality alongside wearables (conversations) and live
|
|
484
|
-
* connectors (documents). Screen text has no speakers and is high-volume, so it
|
|
485
|
-
* gets its own store and day-digest rather than being forced into the wearable
|
|
486
|
-
* conversation shape. Capture daemons live in the à-la-carte `@remnic/capture-screen`
|
|
487
|
-
* package; this core subsystem is host-agnostic and consumes snapshots over a
|
|
488
|
-
* loopback HTTP client.
|
|
489
|
-
*
|
|
490
|
-
* All timestamps are UTC ISO-8601; day bucketing is half-open [start, end).
|
|
491
|
-
*/
|
|
492
|
-
|
|
493
|
-
type ActivityExtractionMode = "off" | "smart";
|
|
494
|
-
/** One captured on-screen text snapshot (a single window at a single instant). */
|
|
495
|
-
interface ActivitySnapshot {
|
|
496
|
-
/** Store row id (assigned on insert; absent before persistence). */
|
|
497
|
-
id?: number;
|
|
498
|
-
/** Capture-machine label (disambiguates multi-machine stores). */
|
|
499
|
-
machine: string;
|
|
500
|
-
/** UTC ISO-8601 capture instant. */
|
|
501
|
-
capturedAtUtc: string;
|
|
502
|
-
/** Frontmost application name. */
|
|
503
|
-
app: string;
|
|
504
|
-
/** Frontmost window title. */
|
|
505
|
-
windowTitle: string;
|
|
506
|
-
/** Browser tab URL, when the frontmost window is a known browser. */
|
|
507
|
-
browserUrl?: string;
|
|
508
|
-
/** Extracted visible text (accessibility tree or OCR). */
|
|
509
|
-
text: string;
|
|
510
|
-
/** Where the text came from. */
|
|
511
|
-
textSource: "ax" | "ocr";
|
|
512
|
-
/** SHA-256 of the normalized snapshot content (idempotency key). */
|
|
513
|
-
contentHash: string;
|
|
514
|
-
/** 64-bit SimHash (hex) for near-duplicate detection, when computed. */
|
|
515
|
-
simhash?: string;
|
|
516
|
-
}
|
|
517
|
-
/** Frontmatter persisted on a rendered day digest. */
|
|
518
|
-
interface ActivityDayMeta {
|
|
519
|
-
kind: "activity-digest";
|
|
520
|
-
/** Local day, YYYY-MM-DD. */
|
|
521
|
-
date: string;
|
|
522
|
-
/** Machines that contributed snapshots, sorted. */
|
|
523
|
-
machines: string[];
|
|
524
|
-
snapshotCount: number;
|
|
525
|
-
/** SHA-256 of the rendered body (rebuild-idempotency). */
|
|
526
|
-
contentHash: string;
|
|
527
|
-
formatVersion: number;
|
|
528
|
-
}
|
|
529
|
-
/** A parsed day digest (frontmatter + rendered body). */
|
|
530
|
-
interface ActivityDayDigest {
|
|
531
|
-
meta: ActivityDayMeta;
|
|
532
|
-
body: string;
|
|
533
|
-
}
|
|
534
|
-
/** Result of a capture-daemon auth/health probe. */
|
|
535
|
-
interface ActivitySourceCheck {
|
|
536
|
-
ok: boolean;
|
|
537
|
-
detail?: string;
|
|
538
|
-
}
|
|
539
|
-
/** One page of snapshots pulled from a capture daemon. */
|
|
540
|
-
interface ActivitySnapshotPage {
|
|
541
|
-
snapshots: ActivitySnapshot[];
|
|
542
|
-
nextCursor: string | null;
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Client contract for a screen-capture daemon (one per capture machine).
|
|
546
|
-
* Implemented by a later slice (the HTTP source client); defined here so the
|
|
547
|
-
* store and pipeline can be built and tested against a fixture double first.
|
|
548
|
-
*/
|
|
549
|
-
interface ActivitySourceClient {
|
|
550
|
-
/** Stable capture-machine label. */
|
|
551
|
-
machineLabel: string;
|
|
552
|
-
/** Probe connectivity/auth without mutating anything. */
|
|
553
|
-
verify(signal?: AbortSignal): Promise<ActivitySourceCheck>;
|
|
554
|
-
/** Fetch one page of snapshots for a single local day. */
|
|
555
|
-
fetchSnapshots(opts: {
|
|
556
|
-
date: string;
|
|
557
|
-
timezone: string;
|
|
558
|
-
cursor?: string | null;
|
|
559
|
-
signal?: AbortSignal;
|
|
560
|
-
}): Promise<ActivitySnapshotPage>;
|
|
561
|
-
}
|
|
562
|
-
/** One trusted capture daemon that feeds this memory directory. */
|
|
563
|
-
interface ActivitySourceConfig {
|
|
564
|
-
machineLabel: string;
|
|
565
|
-
baseUrl: string;
|
|
566
|
-
token?: string;
|
|
567
|
-
}
|
|
568
|
-
/** Opt-in activity synchronization + trust-gated extraction settings. */
|
|
569
|
-
interface ActivityConfig {
|
|
570
|
-
enabled: boolean;
|
|
571
|
-
timezone: string;
|
|
572
|
-
syncDays: number;
|
|
573
|
-
/** Periodic auto-sync cadence in minutes (default 15). */
|
|
574
|
-
autoSyncIntervalMinutes: number;
|
|
575
|
-
sources: ActivitySourceConfig[];
|
|
576
|
-
/** `off` keeps activity searchable only; `smart` trust-gates durable first-person claims. */
|
|
577
|
-
extractionMode: ActivityExtractionMode;
|
|
578
|
-
/** Baseline confidence in activity as a source of the user's own actions. */
|
|
579
|
-
sourceTrust: number;
|
|
580
|
-
autoApproveTrust: number;
|
|
581
|
-
reviewTrust: number;
|
|
582
|
-
minConfidence: number;
|
|
583
|
-
minImportance: ImportanceLevel;
|
|
584
|
-
/** `0` means no count cap. */
|
|
585
|
-
maxMemoriesPerDay: number;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
572
|
/**
|
|
589
573
|
* Wearable transcript subsystem — shared types (issue: wearable connectors).
|
|
590
574
|
*
|
|
@@ -4755,4 +4739,4 @@ interface HourlySummary {
|
|
|
4755
4739
|
generatedAt: string;
|
|
4756
4740
|
}
|
|
4757
4741
|
|
|
4758
|
-
export { type ConvergeConflictPolicy as $, type AgentPersonaModelConfig as A, type BriefingSections as B, type CodingContext as C, type DreamsPhase as D, type EntityFile as E, type FaithfulnessFrontmatter as F, type GatewayConfig as G, type HourlySummary as H, type IdentityInjectionMode as I, type MemoryLifecycleEvent as J, type ProvenanceSource as K, type LiveConnectorsConfig as L, type MemoryFile as M, type TrustWeights as N, type ConversationThread as O, type PluginConfig as P, type QmdSearchResult as Q, type RecallPlanMode as R, type SessionObserverBandConfig as S, type TranscriptEntry as T, type LifecycleState as U, type VerificationState as V, type PolicyClass as W, type ReplicaPeersConfig as X, type ReplicaPeerConfig as Y, type ExtractionFailureClass as Z, type ImportanceLevel as _, type DreamsRunResult as a, type
|
|
4742
|
+
export { type ConvergeConflictPolicy as $, type AgentPersonaModelConfig as A, type BriefingSections as B, type CodingContext as C, type DreamsPhase as D, type EntityFile as E, type FaithfulnessFrontmatter as F, type GatewayConfig as G, type HourlySummary as H, type IdentityInjectionMode as I, type MemoryLifecycleEvent as J, type ProvenanceSource as K, type LiveConnectorsConfig as L, type MemoryFile as M, type TrustWeights as N, type ConversationThread as O, type PluginConfig as P, type QmdSearchResult as Q, type RecallPlanMode as R, type SessionObserverBandConfig as S, type TranscriptEntry as T, type LifecycleState as U, type VerificationState as V, type PolicyClass as W, type ReplicaPeersConfig as X, type ReplicaPeerConfig as Y, type ExtractionFailureClass as Z, type ImportanceLevel as _, type DreamsRunResult as a, type FusedWearableConversation as a$, type ActiveRecallChatType as a0, type ActiveRecallQueryMode as a1, type ActiveRecallPromptStyle as a2, type ActiveRecallThinking as a3, type ActiveRecallModelFallbackPolicy as a4, type ExtractionResult as a5, type BehaviorSignalEvent as a6, type BufferSurpriseEvent as a7, type ImportTurn as a8, type BulkImportOptions as a9, summarizeExtractionLiveness as aA, type RetrievalTier as aB, type SignalScanResult as aC, type TopicScore as aD, type ConsolidationResult as aE, type DaySummaryResult as aF, type QmdSearchExplain as aG, type ActivitySnapshot as aH, type ActivityConfig as aI, type ActivitySourceConfig as aJ, type ActivitySourceClient as aK, type MeetingBuildInput as aL, type MeetingsConfig as aM, type FusedMeeting as aN, type MeetingRecord as aO, type MeetingsDetectionInput as aP, type FusionConversationInput as aQ, type DetectedMeeting as aR, type WearableConversation as aS, type WearableSourceSettings as aT, type WearableNativeMemory as aU, type WearableMemoryMode as aV, type WearableSourceConnector as aW, type WearablesConfig as aX, type WearableSyncSummary as aY, type WearableSourceStatus as aZ, type WearableDayTranscript as a_, type BulkImportSource as aa, type BulkImportResult as ab, type CompressionGuidelineOptimizerEventCounts as ac, type CompressionGuidelineOptimizerActionSummary as ad, type CompressionGuidelineOptimizerRuleUpdate as ae, type MemoryActionType as af, type MemoryActionEvent as ag, type CompressionGuidelineOptimizerState as ah, type ConvergeConfig as ai, type EntityMention as aj, type DependencyPropagationConfig as ak, type EntityStructuredSection as al, type EntitySchemaDefinition as am, type EntitySchemaSectionDefinition as an, type ExtractedFact as ao, type ProvenanceConfig as ap, type ImportanceScore as aq, type MemoryIntent as ar, type MemoryActionEligibilityContext as as, type MemoryActionPolicyResult as at, type MemoryLifecycleEventType as au, type MemoryLifecycleStateSummary as av, type ModelProviderConfig as aw, type NativeKnowledgeConfig as ax, type ExtractionBufferSource as ay, type MetaState as az, type RecallTierExplain as b, isRecallDisclosure as b$, type WearableCorrectionRule as b0, type FusedDayMeta as b1, type FusedDayFile as b2, type MeetingDetectionSource as b3, type EntityTimelineEntry as b4, type MemoryLink as b5, type BufferState as b6, type FileHygieneConfig as b7, type EntityRelationship as b8, type EntityActivityEntry as b9, type BriefingConfig as bA, type BriefingOpenCommitment as bB, type BriefingWindow as bC, type BulkImportError as bD, type BulkImportSourceAdapter as bE, type CodexCompatConfig as bF, DEFAULT_RECALL_DISCLOSURE as bG, type DisagreementKind as bH, type FusedContribution as bI, type FusedConversationProvenance as bJ, type FusedSegmentProvenance as bK, type FusionSegmentInput as bL, type ImportSourceRole as bM, type ImportTurnValidationIssue as bN, type MeetingScreenContextEvent as bO, type MeetingSummaryMode as bP, type MemoryActionEligibilitySource as bQ, type MemoryObservation as bR, type MemoryScope as bS, RECALL_DISCLOSURE_LEVELS as bT, type SegmentPickReason as bU, type WearableAuthCheck as bV, type WearableFetchOptions as bW, type WearableFetchPage as bX, type WearableNativeMemoryPage as bY, type WearableTranscriptSegment as bZ, isImportRole as b_, type AccessTrackingEntry as ba, type MemorySummary as bb, type DreamsStatusResult as bc, type RecallSectionConfig as bd, type BootstrapOptions as be, type BootstrapResult as bf, type ConsolidationObservation as bg, type CodingModeConfig as bh, type FusedSpeaker as bi, type FusedSegment as bj, type FusedDisagreement as bk, type FusionOptions as bl, type FusionDayResult as bm, type CodingKnowledgeConfig as bn, type WearableCleanupSettings as bo, type WearableFusionConfig as bp, type OffTheRecordMarkerSettings as bq, type WearableDayTranscriptMeta as br, type ActivityDayMeta as bs, type ActivityDayDigest as bt, type ActivitySourceCheck as bu, type ActivitySnapshotPage as bv, type MeetingsDetectionConfig as bw, type MeetingAudioWindow as bx, type MeetingAppSpan as by, type ActivityExtractionMode as bz, type BriefingFollowup as c, type GitHubLiveConnectorConfig as c$, parseIsoTimestamp as c0, validateImportTurn as c1, type SupportPassportConfig as c2, type ExtractionLivenessConfig as c3, ExtractionLivenessWarnThrottle as c4, type ExtractionRootStats as c5, type ExtractionWatermarkOrStorage as c6, type ExtractionWatermarkRead as c7, coerceExtractionWatermark as c8, computeExtractionLivenessStatus as c9, type BufferEntryState as cA, type ChatConfig as cB, type CodexCliReasoningEffort as cC, type CodexCompactionFlushMode as cD, type CodexConnectorConfig as cE, type CodingGraphLspConfig as cF, type CompressionGuidelineActivationState as cG, type CompressionGuidelineOptimizerSourceWindow as cH, type ConfidenceTier as cI, type ConsolidationAction as cJ, type ConsolidationItem as cK, type CronConversationRecallMode as cL, type CronRecallMode as cM, type DreamingConfig as cN, type DreamingNarrativePromptStyle as cO, type DreamsDeepSleepConfig as cP, type DreamsLightSleepConfig as cQ, type DreamsPhaseStatus as cR, type DreamsPhasesConfig as cS, type DreamsRemConfig as cT, type EngramTraceEvent as cU, type ExtractedProcedureStep as cV, type ExtractedQuestion as cW, type ExtractedReasoningTrace as cX, type ExtractedReasoningTraceStep as cY, type ExtractedRelationship as cZ, type ExtractionPassSource as c_, evaluateExtractionLiveness as ca, formatAgeMs as cb, gatherExtractionLivenessStatus as cc, parseExtractionLivenessConfig as cd, renderExtractionLivenessStats as ce, resolveExtractionLivenessConfig as cf, parseReplicaPeersConfig as cg, resolveReplicaPeersConfig as ch, type AmbientCaptureProvenance as ci, type BufferTurnOwner as cj, ProbeTimeoutError as ck, bufferTurnArrayIsSuffixOfSnapshot as cl, bufferTurnArraysEqual as cm, bufferTurnsEqual as cn, copyBufferTurn as co, describeError as cp, liveTurnsFromExtractionSnapshot as cq, matchingQueuedExtractionPrefixLength as cr, probeWithTimeout as cs, type AgentAccessHttpConfig as ct, type AgentDefaultsConfig as cu, type AgentPersona as cv, type BehaviorLoopAdjustment as cw, type BehaviorSignalDirection as cx, type BehaviorSignalType as cy, type BriefingCalendarSourceError as cz, type BriefingFocus as d, type GmailLiveConnectorConfig as d0, type GoogleDriveLiveConnectorConfig as d1, type HeartbeatConfig as d2, type HeartbeatDetectionMode as d3, type LlmTraceCallback as d4, type LlmTraceEvent as d5, type MemoryActionOutcome as d6, type MemoryActionPolicyDecision as d7, type MemoryActionStatus as d8, type MemoryLinkType as d9, type SlotMismatchMode as dA, type TriggerMode as dB, confidenceTier as dC, type MemoryOsPresetName as da, type ModelApi as db, type ModelDefinitionConfig as dc, type ModelProviderAuthMode as dd, type NamespacePolicy as de, type NativeKnowledgeFolderRuleConfig as df, type NativeKnowledgeObsidianVaultConfig as dg, type NativeKnowledgeOpenClawWorkspaceConfig as dh, type NotionLiveConnectorConfig as di, type PrincipalFromSessionKeyMode as dj, type PrincipalRule as dk, type ProceduralConfig as dl, type QuestionEntry as dm, type ReasoningEffort as dn, type RecallPipelineConfig as dp, type RecallTraceEvent as dq, type RelevanceFeedback as dr, SPECULATIVE_TTL_DAYS as ds, type ScopeProfileAutoPromoteConfig as dt, type ScopeProfileTeamProjectConfig as du, type ScopeTeamConfig as dv, type ScoredEntity as dw, type SemanticChunkingConfigShape as dx, type SignalLevel as dy, type SlotBehaviorConfig as dz, type CalendarSource as e, type CalendarEvent as f, type BriefingActiveThread as g, type BriefingResult as h, type BriefingRecentEntity as i, type BufferTurn as j, type ExtractionBufferSnapshot as k, type MemoryFrontmatter as l, type Checkpoint as m, type RecallDisclosure as n, type SourceConnectorProvenance as o, type ScopeProfileConfig as p, type ScopeProfileLayerId as q, type ScopeProfilePromotionTarget as r, type BehaviorLoopPolicyState as s, type ExtractionLivenessStatus as t, type SecretRef as u, type AgentAccessAuthToken as v, type MemoryCategory as w, type CaptureMode as x, type MemoryStatus as y, type MemoryProjectionCurrentState as z };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ba as AccessTrackingEntry, a0 as ActiveRecallChatType, a4 as ActiveRecallModelFallbackPolicy, a2 as ActiveRecallPromptStyle, a1 as ActiveRecallQueryMode, a3 as ActiveRecallThinking, v as AgentAccessAuthToken, ct as AgentAccessHttpConfig, cu as AgentDefaultsConfig, cv as AgentPersona, A as AgentPersonaModelConfig, cw as BehaviorLoopAdjustment, s as BehaviorLoopPolicyState, cx as BehaviorSignalDirection, a6 as BehaviorSignalEvent, cy as BehaviorSignalType, be as BootstrapOptions, bf as BootstrapResult, g as BriefingActiveThread, cz as BriefingCalendarSourceError, bA as BriefingConfig, d as BriefingFocus, c as BriefingFollowup, bB as BriefingOpenCommitment, i as BriefingRecentEntity, h as BriefingResult, B as BriefingSections, bC as BriefingWindow, cA as BufferEntryState, b6 as BufferState, a7 as BufferSurpriseEvent, j as BufferTurn, f as CalendarEvent, e as CalendarSource, x as CaptureMode, cB as ChatConfig, m as Checkpoint, cC as CodexCliReasoningEffort, cD as CodexCompactionFlushMode, bF as CodexCompatConfig, cE as CodexConnectorConfig, C as CodingContext, cF as CodingGraphLspConfig, bn as CodingKnowledgeConfig, bh as CodingModeConfig, cG as CompressionGuidelineActivationState, ad as CompressionGuidelineOptimizerActionSummary, ac as CompressionGuidelineOptimizerEventCounts, ae as CompressionGuidelineOptimizerRuleUpdate, cH as CompressionGuidelineOptimizerSourceWindow, ah as CompressionGuidelineOptimizerState, cI as ConfidenceTier, cJ as ConsolidationAction, cK as ConsolidationItem, bg as ConsolidationObservation, aE as ConsolidationResult, ai as ConvergeConfig, $ as ConvergeConflictPolicy, O as ConversationThread, cL as CronConversationRecallMode, cM as CronRecallMode, bG as DEFAULT_RECALL_DISCLOSURE, aF as DaySummaryResult, ak as DependencyPropagationConfig, cN as DreamingConfig, cO as DreamingNarrativePromptStyle, cP as DreamsDeepSleepConfig, cQ as DreamsLightSleepConfig, D as DreamsPhase, cR as DreamsPhaseStatus, cS as DreamsPhasesConfig, cT as DreamsRemConfig, a as DreamsRunResult, bc as DreamsStatusResult, cU as EngramTraceEvent, b9 as EntityActivityEntry, E as EntityFile, aj as EntityMention, b8 as EntityRelationship, am as EntitySchemaDefinition, an as EntitySchemaSectionDefinition, al as EntityStructuredSection, b4 as EntityTimelineEntry, ao as ExtractedFact, cV as ExtractedProcedureStep, cW as ExtractedQuestion, cX as ExtractedReasoningTrace, cY as ExtractedReasoningTraceStep, cZ as ExtractedRelationship, Z as ExtractionFailureClass, c_ as ExtractionPassSource, a5 as ExtractionResult, F as FaithfulnessFrontmatter, b7 as FileHygieneConfig, G as GatewayConfig, c$ as GitHubLiveConnectorConfig, d0 as GmailLiveConnectorConfig, d1 as GoogleDriveLiveConnectorConfig, d2 as HeartbeatConfig, d3 as HeartbeatDetectionMode, H as HourlySummary, I as IdentityInjectionMode, _ as ImportanceLevel, aq as ImportanceScore, U as LifecycleState, L as LiveConnectorsConfig, d4 as LlmTraceCallback, d5 as LlmTraceEvent, as as MemoryActionEligibilityContext, bQ as MemoryActionEligibilitySource, ag as MemoryActionEvent, d6 as MemoryActionOutcome, d7 as MemoryActionPolicyDecision, at as MemoryActionPolicyResult, d8 as MemoryActionStatus, af as MemoryActionType, w as MemoryCategory, M as MemoryFile, l as MemoryFrontmatter, ar as MemoryIntent, J as MemoryLifecycleEvent, au as MemoryLifecycleEventType, av as MemoryLifecycleStateSummary, b5 as MemoryLink, d9 as MemoryLinkType, bR as MemoryObservation, da as MemoryOsPresetName, z as MemoryProjectionCurrentState, bS as MemoryScope, y as MemoryStatus, bb as MemorySummary, az as MetaState, db as ModelApi, dc as ModelDefinitionConfig, dd as ModelProviderAuthMode, aw as ModelProviderConfig, de as NamespacePolicy, ax as NativeKnowledgeConfig, df as NativeKnowledgeFolderRuleConfig, dg as NativeKnowledgeObsidianVaultConfig, dh as NativeKnowledgeOpenClawWorkspaceConfig, di as NotionLiveConnectorConfig, P as PluginConfig, W as PolicyClass, dj as PrincipalFromSessionKeyMode, dk as PrincipalRule, dl as ProceduralConfig, ap as ProvenanceConfig, K as ProvenanceSource, aG as QmdSearchExplain, Q as QmdSearchResult, dm as QuestionEntry, bT as RECALL_DISCLOSURE_LEVELS, dn as ReasoningEffort, n as RecallDisclosure, dp as RecallPipelineConfig, R as RecallPlanMode, bd as RecallSectionConfig, b as RecallTierExplain, dq as RecallTraceEvent, dr as RelevanceFeedback, aB as RetrievalTier, ds as SPECULATIVE_TTL_DAYS, dt as ScopeProfileAutoPromoteConfig, p as ScopeProfileConfig, q as ScopeProfileLayerId, r as ScopeProfilePromotionTarget, du as ScopeProfileTeamProjectConfig, dv as ScopeTeamConfig, dw as ScoredEntity, u as SecretRef, dx as SemanticChunkingConfigShape, S as SessionObserverBandConfig, dy as SignalLevel, aC as SignalScanResult, dz as SlotBehaviorConfig, dA as SlotMismatchMode, o as SourceConnectorProvenance, c2 as SupportPassportConfig, aD as TopicScore, T as TranscriptEntry, dB as TriggerMode, N as TrustWeights, V as VerificationState, dC as confidenceTier, b$ as isRecallDisclosure } from './types-CBEAYU76.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
3
|
import './bounded-jsonl-state.js';
|
|
4
4
|
import './external-wiki-config.js';
|
package/dist/verified-recall.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compareVerifiedEpisodeResults,
|
|
3
3
|
searchVerifiedEpisodes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2UM6WHME.js";
|
|
5
5
|
import "./chunk-B7RWBZXW.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-FHKXVTM5.js";
|
|
7
7
|
import "./chunk-46WM6JX2.js";
|
|
8
8
|
import "./chunk-UHVXE24Y.js";
|
|
9
9
|
import "./chunk-SXIMQLGV.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-GF7RQWXC.js";
|
|
11
|
+
import "./chunk-GG4DN63W.js";
|
|
12
12
|
import "./chunk-OQIRBGUU.js";
|
|
13
13
|
import "./chunk-VANZKHTN.js";
|
|
14
14
|
import "./chunk-CYEPCZN5.js";
|
|
@@ -30,24 +30,24 @@ import "./chunk-DM2T26WE.js";
|
|
|
30
30
|
import "./chunk-LDXUBPMO.js";
|
|
31
31
|
import "./chunk-UG6VXIOK.js";
|
|
32
32
|
import "./chunk-AAD2ZS6P.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-MUJ4QFUQ.js";
|
|
34
34
|
import "./chunk-LCU5R6TQ.js";
|
|
35
35
|
import "./chunk-BT7NVCML.js";
|
|
36
36
|
import "./chunk-YXZG5TVN.js";
|
|
37
37
|
import "./chunk-3ONXXHQO.js";
|
|
38
38
|
import "./chunk-5GINB5LC.js";
|
|
39
39
|
import "./chunk-G7D6GZ5J.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-UFKPQBXH.js";
|
|
41
|
+
import "./chunk-XCB6QDL6.js";
|
|
42
42
|
import "./chunk-RBOJCG4T.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-ZVPVTPGI.js";
|
|
44
44
|
import "./chunk-5WITETWU.js";
|
|
45
45
|
import "./chunk-6CIAGZ6X.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-VYEPACWY.js";
|
|
47
47
|
import "./chunk-URS5GSM7.js";
|
|
48
48
|
import "./chunk-ZLQ37WJX.js";
|
|
49
49
|
import "./chunk-IUM3VSHI.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-C64XATK7.js";
|
|
51
51
|
import "./chunk-42JKGUFJ.js";
|
|
52
52
|
import "./chunk-UW5NPZJ2.js";
|
|
53
53
|
import "./chunk-QIEUU4UK.js";
|
|
@@ -72,7 +72,7 @@ import "./chunk-DVYRD4HY.js";
|
|
|
72
72
|
import "./chunk-ZA53AZND.js";
|
|
73
73
|
import "./chunk-GCASGYIO.js";
|
|
74
74
|
import "./chunk-7RJUVTVF.js";
|
|
75
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-JOEJG4SD.js";
|
|
76
76
|
import "./chunk-2LWQSV6A.js";
|
|
77
77
|
import "./chunk-RL6NEVXT.js";
|
|
78
78
|
import "./chunk-5FVVY2EB.js";
|
package/dist/write-envelope.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.63.
|
|
3
|
+
"version": "9.63.5",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3156,7 +3156,7 @@
|
|
|
3156
3156
|
"core"
|
|
3157
3157
|
],
|
|
3158
3158
|
"peerDependencies": {
|
|
3159
|
-
"@remnic/coding-graph": "^9.63.
|
|
3159
|
+
"@remnic/coding-graph": "^9.63.5"
|
|
3160
3160
|
},
|
|
3161
3161
|
"peerDependenciesMeta": {
|
|
3162
3162
|
"@remnic/coding-graph": {
|
|
@@ -15,6 +15,12 @@ import { withTempDir as managedWithTempDir } from "../testing/tmp-dir.js";
|
|
|
15
15
|
import type { EngramAccessService } from "../access-service.js";
|
|
16
16
|
import { parseConfig } from "../config.js";
|
|
17
17
|
import { runChatCli } from "./chat-cli.js";
|
|
18
|
+
import { processChatMessage } from "./chat-factory.js";
|
|
19
|
+
import {
|
|
20
|
+
createChatSession,
|
|
21
|
+
loadChatSession,
|
|
22
|
+
markPendingPlan,
|
|
23
|
+
} from "./chat-session.js";
|
|
18
24
|
import { DEFAULT_CHAT_CONFIG } from "./chat-config.js";
|
|
19
25
|
|
|
20
26
|
/** Capture stdout.write for the duration of `fn`. */
|
|
@@ -137,3 +143,50 @@ test("CLI: resumes an existing session by id", async () => {
|
|
|
137
143
|
assert.ok(second.includes("[session:"), "resumed run should also print a session id");
|
|
138
144
|
});
|
|
139
145
|
});
|
|
146
|
+
|
|
147
|
+
test("CLI --once: pending plan is visible on reload the same way as HTTP (issue #2479)", async () => {
|
|
148
|
+
await withTempDir(async (memoryDir) => {
|
|
149
|
+
const service = makeService({
|
|
150
|
+
memoryDir,
|
|
151
|
+
configRef: parseConfig({ memoryDir, chat: { ...DEFAULT_CHAT_CONFIG, enabled: true } }),
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// CLI side: first turn mints the session.
|
|
155
|
+
const first = await captureStdout(() =>
|
|
156
|
+
runChatCli({ service, config: service.configRef!.chat, memoryDir, once: true, input: "hello" }),
|
|
157
|
+
);
|
|
158
|
+
const sessionId = /\[session: ([^\]]+)\]/.exec(first)![1]!;
|
|
159
|
+
// Pending plan minted by an earlier correction-preview turn.
|
|
160
|
+
await markPendingPlan(memoryDir, sessionId, "plan-cli-2479");
|
|
161
|
+
await captureStdout(() =>
|
|
162
|
+
runChatCli({ service, config: service.configRef!.chat, memoryDir, once: true, input: "anything else?", sessionId }),
|
|
163
|
+
);
|
|
164
|
+
const viaCli = await loadChatSession(memoryDir, sessionId);
|
|
165
|
+
// HTTP side: identical scenario through the shared processor.
|
|
166
|
+
const httpSession = await createChatSession(memoryDir, {});
|
|
167
|
+
await processChatMessage({
|
|
168
|
+
service,
|
|
169
|
+
config: service.configRef!.chat,
|
|
170
|
+
memoryDir,
|
|
171
|
+
message: "hello",
|
|
172
|
+
chatSessionId: httpSession.id,
|
|
173
|
+
});
|
|
174
|
+
await markPendingPlan(memoryDir, httpSession.id, "plan-http-2479");
|
|
175
|
+
await processChatMessage({
|
|
176
|
+
service,
|
|
177
|
+
config: service.configRef!.chat,
|
|
178
|
+
memoryDir,
|
|
179
|
+
message: "anything else?",
|
|
180
|
+
chatSessionId: httpSession.id,
|
|
181
|
+
});
|
|
182
|
+
const viaHttp = await loadChatSession(memoryDir, httpSession.id);
|
|
183
|
+
|
|
184
|
+
assert.equal(viaCli?.pendingPlanId, "plan-cli-2479", "CLI turn must leave the pending plan visible on reload");
|
|
185
|
+
assert.equal(viaHttp?.pendingPlanId, "plan-http-2479", "HTTP turn must leave the pending plan visible on reload");
|
|
186
|
+
// Transcript shape parity: both surfaces append the same role sequence.
|
|
187
|
+
assert.deepEqual(
|
|
188
|
+
viaCli!.transcript.map((e) => e.role),
|
|
189
|
+
viaHttp!.transcript.map((e) => e.role),
|
|
190
|
+
);
|
|
191
|
+
});
|
|
192
|
+
});
|
package/src/chat/chat-cli.ts
CHANGED
|
@@ -6,28 +6,25 @@
|
|
|
6
6
|
* and `--once` / non-TTY mode for scripting/tests
|
|
7
7
|
* (`echo "question" | remnic chat --once`).
|
|
8
8
|
*
|
|
9
|
+
* Every turn routes through the shared `processChatMessage` factory
|
|
10
|
+
* (issue #2479) so session lifecycle, transcript persistence, and
|
|
11
|
+
* pending-plan/promotion markers behave identically to the HTTP/MCP
|
|
12
|
+
* surfaces.
|
|
13
|
+
*
|
|
9
14
|
* This module is imported by cli.ts with a single thin registration line —
|
|
10
15
|
* the god-file ratchet (#1520) tracks cli.ts LOC.
|
|
11
16
|
*/
|
|
12
17
|
|
|
13
|
-
import readline from "node:readline";
|
|
14
18
|
import { createInterface } from "node:readline";
|
|
15
|
-
import { randomUUID } from "node:crypto";
|
|
16
19
|
|
|
17
20
|
import type { EngramAccessService } from "../access-service.js";
|
|
18
|
-
import type {
|
|
19
|
-
import
|
|
20
|
-
import type { ChatTurnResult } from "./chat-types.js";
|
|
21
|
-
import { ChatEngine } from "./chat-engine.js";
|
|
22
|
-
import { createProductionChatLlmAdapter } from "./chat-llm.js";
|
|
23
|
-
import { createChatExecutor } from "./chat-executor.js";
|
|
21
|
+
import type { ChatConfig, ChatTurnResult } from "./chat-types.js";
|
|
22
|
+
import { processChatMessage } from "./chat-factory.js";
|
|
24
23
|
import {
|
|
25
24
|
createChatSession,
|
|
26
25
|
loadChatSession,
|
|
27
|
-
appendTranscriptEntry,
|
|
28
26
|
sessionBelongsToPrincipal,
|
|
29
27
|
} from "./chat-session.js";
|
|
30
|
-
import { isConfirmationMessage } from "./chat-engine.js";
|
|
31
28
|
|
|
32
29
|
/**
|
|
33
30
|
* Read all of stdin to a UTF-8 string (non-TTY / scripting mode).
|
|
@@ -78,16 +75,10 @@ export async function runChatCli(opts: ChatCliOptions): Promise<void> {
|
|
|
78
75
|
return;
|
|
79
76
|
}
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
): Promise<{ content: string } | null>;
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
// Load or create session FIRST so the executor inherits the session's
|
|
89
|
-
// stored namespace/sessionKey scope — a resumed session created via MCP
|
|
90
|
-
// must not lose its scope binding (codex review, Thread 19).
|
|
78
|
+
// Resolve the session up front so the banner and --once output print a
|
|
79
|
+
// stable session id. Each turn then routes through processChatMessage,
|
|
80
|
+
// which reloads the session from disk — persisted state markers
|
|
81
|
+
// (pending plan/promotion) stay authoritative across turns.
|
|
91
82
|
let session;
|
|
92
83
|
if (opts.sessionId) {
|
|
93
84
|
session = await loadChatSession(opts.memoryDir, opts.sessionId);
|
|
@@ -107,21 +98,15 @@ export async function runChatCli(opts: ChatCliOptions): Promise<void> {
|
|
|
107
98
|
});
|
|
108
99
|
}
|
|
109
100
|
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
executor,
|
|
120
|
-
maxToolCallsPerTurn: config.maxToolCallsPerTurn,
|
|
121
|
-
...(config.model ? { model: config.model } : {}),
|
|
122
|
-
correctionAvailable: false,
|
|
123
|
-
scopeInspectAvailable: false,
|
|
124
|
-
});
|
|
101
|
+
const processTurn = (message: string): Promise<ChatTurnResult> =>
|
|
102
|
+
processChatMessage({
|
|
103
|
+
service: opts.service,
|
|
104
|
+
config,
|
|
105
|
+
memoryDir: opts.memoryDir,
|
|
106
|
+
message,
|
|
107
|
+
chatSessionId: session.id,
|
|
108
|
+
principal: opts.principal,
|
|
109
|
+
});
|
|
125
110
|
|
|
126
111
|
// ── Non-TTY / --once mode ───────────────────────────────────────────
|
|
127
112
|
if (opts.once) {
|
|
@@ -131,17 +116,7 @@ export async function runChatCli(opts: ChatCliOptions): Promise<void> {
|
|
|
131
116
|
process.stdout.write("[error] No input provided.\n");
|
|
132
117
|
return;
|
|
133
118
|
}
|
|
134
|
-
const
|
|
135
|
-
role: "user",
|
|
136
|
-
content: message,
|
|
137
|
-
});
|
|
138
|
-
session.transcript.push(userEntry);
|
|
139
|
-
const result = await engine.processMessage(message, session);
|
|
140
|
-
const assistantEntry = await appendTranscriptEntry(opts.memoryDir, session.id, {
|
|
141
|
-
role: "assistant",
|
|
142
|
-
content: result.reply,
|
|
143
|
-
});
|
|
144
|
-
session.transcript.push(assistantEntry);
|
|
119
|
+
const result = await processTurn(message);
|
|
145
120
|
process.stdout.write(result.reply + "\n");
|
|
146
121
|
process.stdout.write(`[session: ${session.id}]\n`);
|
|
147
122
|
return;
|
|
@@ -173,18 +148,7 @@ export async function runChatCli(opts: ChatCliOptions): Promise<void> {
|
|
|
173
148
|
// Serialize turns: a second line waits for the first to finish so
|
|
174
149
|
// transcript updates and engine state don't race on the same session.
|
|
175
150
|
inFlight = inFlight.then(async () => {
|
|
176
|
-
const
|
|
177
|
-
role: "user",
|
|
178
|
-
content: message,
|
|
179
|
-
});
|
|
180
|
-
session!.transcript.push(userEntry);
|
|
181
|
-
|
|
182
|
-
const result = await engine.processMessage(message, session!);
|
|
183
|
-
const assistantEntry = await appendTranscriptEntry(opts.memoryDir, session!.id, {
|
|
184
|
-
role: "assistant",
|
|
185
|
-
content: result.reply,
|
|
186
|
-
});
|
|
187
|
-
session!.transcript.push(assistantEntry);
|
|
151
|
+
const result = await processTurn(message);
|
|
188
152
|
|
|
189
153
|
console.log(`\nassistant> ${result.reply}\n`);
|
|
190
154
|
if (result.pendingPlan) {
|