@remnic/core 9.3.703 → 9.3.705
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-boundary.d.ts +8 -8
- package/dist/access-boundary.js +27 -27
- package/dist/access-cli.js +57 -56
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +7 -7
- package/dist/access-http.js +32 -31
- package/dist/access-mcp.d.ts +7 -7
- package/dist/access-mcp.js +31 -30
- package/dist/access-operations-batch.d.ts +2 -0
- package/dist/access-operations-batch.js +120 -0
- package/dist/access-operations.d.ts +8 -7
- package/dist/access-operations.js +30 -29
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-COCzhgEL.d.ts → access-service-C8hc8N2i.d.ts} +4 -4
- package/dist/access-service.d.ts +7 -7
- package/dist/access-service.js +26 -26
- package/dist/access-surface-catalog.d.ts +7 -7
- package/dist/access-surface-catalog.js +57 -54
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/action-confidence.d.ts +3 -3
- package/dist/active-memory-bridge.d.ts +3 -3
- package/dist/active-recall.d.ts +3 -3
- package/dist/{auto-sync-3AAP25FV.js → auto-sync-24NNS3GU.js} +3 -3
- package/dist/behavior-learner.d.ts +3 -3
- package/dist/behavior-signals.d.ts +3 -3
- package/dist/bootstrap.d.ts +6 -6
- package/dist/briefing.d.ts +3 -3
- package/dist/briefing.js +5 -5
- package/dist/buffer-surprise-report.d.ts +3 -3
- package/dist/buffer.d.ts +3 -3
- package/dist/bulk-import/index.d.ts +4 -4
- package/dist/calibration.d.ts +3 -3
- package/dist/capabilities.d.ts +3 -3
- package/dist/{capsule-crypto-YO5QJ6L3.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/{catalog-DxCzhjE6.d.ts → catalog-CAeU0e1C.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +3 -3
- package/dist/causal-behavior.js +5 -5
- package/dist/causal-chain.js +3 -3
- package/dist/causal-consolidation.d.ts +3 -3
- package/dist/causal-consolidation.js +9 -9
- package/dist/causal-retrieval.js +3 -3
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-BXLOS5AJ.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-EOOVJK2U.js → chunk-2SYPOX45.js} +10 -10
- package/dist/{chunk-64XXOQRW.js → chunk-47LPHBIP.js} +2 -2
- package/dist/{chunk-QGJAGC2J.js → chunk-5DTWZ66X.js} +2 -2
- package/dist/chunk-5DTWZ66X.js.map +1 -0
- package/dist/{chunk-6VVP6NK7.js → chunk-6GJ2WQRK.js} +2 -2
- package/dist/{chunk-4NFVPDIL.js → chunk-74MYJSKB.js} +5 -5
- package/dist/{chunk-X5J3JZR3.js → chunk-773DPI6T.js} +6 -6
- package/dist/{chunk-FVI5B7DE.js → chunk-7ARKLLCV.js} +6 -6
- package/dist/{chunk-ZCEI242W.js → chunk-7L54YZUI.js} +411 -401
- package/dist/chunk-7L54YZUI.js.map +1 -0
- package/dist/{chunk-AGNBY3VG.js → chunk-APJQ6UEA.js} +4 -4
- package/dist/{chunk-CI7RKSRE.js → chunk-AQEJKOKI.js} +2 -1
- package/dist/{chunk-DL6H3D7S.js → chunk-ARV3AUOM.js} +2 -2
- package/dist/{chunk-JTKFZMZ7.js → chunk-BKBSE3BU.js} +3 -3
- package/dist/{chunk-TGAHHCB6.js → chunk-BMKGG7GC.js} +2 -2
- package/dist/{chunk-GFIARMA7.js → chunk-C2EHWNP2.js} +13 -13
- package/dist/{chunk-VKJHM6PL.js → chunk-DGTDRIUO.js} +5 -5
- package/dist/chunk-GI3MTYDU.js +1303 -0
- package/dist/chunk-GI3MTYDU.js.map +1 -0
- package/dist/{chunk-5VXVXJH6.js → chunk-GT4VBKM4.js} +59 -5
- package/dist/chunk-GT4VBKM4.js.map +1 -0
- package/dist/{chunk-KC6TCAWV.js → chunk-HEHPVBWA.js} +6 -6
- package/dist/{chunk-MDJURR27.js → chunk-HW5EF6LV.js} +2 -2
- package/dist/{chunk-BMFZLLNI.js → chunk-ICP53SKG.js} +2 -2
- package/dist/{chunk-YOI3ELXF.js → chunk-IF362TF6.js} +2 -2
- package/dist/{chunk-ABCGDW3A.js → chunk-IFR23TC5.js} +4 -4
- package/dist/{chunk-OXEAMU42.js → chunk-JHAYR2JY.js} +33 -33
- package/dist/{chunk-CZJ6QSKG.js → chunk-JZCKDTAS.js} +4 -4
- package/dist/{chunk-CZJ6QSKG.js.map → chunk-JZCKDTAS.js.map} +1 -1
- package/dist/{chunk-VPAFWWCL.js → chunk-K22IJO4R.js} +2 -2
- package/dist/{chunk-JMA4RYRN.js → chunk-KFU2SKDD.js} +2 -2
- package/dist/{chunk-VDX2J7OX.js → chunk-KQAFEZQX.js} +2 -2
- package/dist/{chunk-AMNLZ6SF.js → chunk-KZMMAVR2.js} +2 -2
- package/dist/{chunk-EZR35XHX.js → chunk-LY4FJLPT.js} +2 -2
- package/dist/{chunk-NUIJEGVD.js → chunk-M5MWSG4S.js} +7 -7
- package/dist/{chunk-Z7XEIAV4.js → chunk-MNH2OODZ.js} +2 -2
- package/dist/{chunk-MXEWQKM7.js → chunk-NFGJBEPT.js} +6 -6
- package/dist/{chunk-Q4O3ET6F.js → chunk-NUWZFSKC.js} +2 -2
- package/dist/{chunk-6TAETM63.js → chunk-OM6ETLLH.js} +2 -2
- package/dist/{chunk-QQW2LIEA.js → chunk-OMSTU233.js} +7 -7
- package/dist/{chunk-XGMCUY5P.js → chunk-S3WYRPSA.js} +64 -64
- package/dist/{chunk-QIMFOCSH.js → chunk-S5APSA3U.js} +2 -2
- package/dist/{chunk-IX72AAMZ.js → chunk-SY6WG6DB.js} +2 -2
- package/dist/{chunk-MBUM2Y3L.js → chunk-ULVM34NP.js} +5 -5
- package/dist/{chunk-DQEMWVMT.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-7WWURLG6.js → chunk-XPOOY35N.js} +2 -2
- package/dist/{chunk-EYJD6KIO.js → chunk-Y4PMATX2.js} +6 -6
- package/dist/{chunk-KF74X62T.js → chunk-YGKUAX2B.js} +4 -4
- package/dist/{chunk-YN4ZT4CW.js → chunk-YI7RZO7Y.js} +1 -1
- package/dist/{cli-BM4xQPp4.d.ts → cli-ChE0XlJY.d.ts} +6 -6
- package/dist/cli.d.ts +9 -9
- package/dist/cli.js +55 -54
- package/dist/compounding/engine.d.ts +3 -3
- package/dist/compounding/engine.js +5 -5
- package/dist/compounding/preference-consolidator.d.ts +3 -3
- package/dist/compression-optimizer.d.ts +3 -3
- package/dist/config.d.ts +3 -3
- package/dist/connectors/codex-materialize-runner.d.ts +3 -3
- package/dist/connectors/codex-materialize-runner.js +5 -5
- package/dist/connectors/codex-materialize.d.ts +3 -3
- package/dist/connectors/index.d.ts +3 -3
- package/dist/connectors/index.js +5 -5
- package/dist/consolidation-provenance-check.d.ts +3 -3
- package/dist/consolidation-undo.d.ts +3 -3
- package/dist/contradiction/index.d.ts +3 -3
- package/dist/conversation-index/backend.d.ts +3 -3
- package/dist/conversation-index/chunker.d.ts +3 -3
- package/dist/conversation-index/faiss-adapter.d.ts +3 -3
- package/dist/conversation-index/indexer.d.ts +3 -3
- package/dist/conversation-index/search.d.ts +3 -3
- package/dist/day-summary.d.ts +3 -3
- package/dist/delinearize.d.ts +3 -3
- package/dist/direct-answer-wiring.d.ts +3 -3
- package/dist/direct-answer.d.ts +3 -3
- package/dist/embedding-fallback.d.ts +3 -3
- package/dist/enrichment/index.d.ts +3 -3
- package/dist/entity-retrieval.d.ts +3 -3
- package/dist/entity-retrieval.js +5 -5
- package/dist/entity-schema.d.ts +3 -3
- package/dist/explicit-capture.d.ts +6 -6
- package/dist/extraction-faithfulness.d.ts +3 -3
- package/dist/extraction-judge-telemetry.d.ts +3 -3
- package/dist/extraction-judge-training.d.ts +3 -3
- package/dist/extraction-judge.d.ts +3 -3
- package/dist/extraction.d.ts +3 -3
- package/dist/extraction.js +2 -2
- package/dist/fallback-llm.d.ts +3 -3
- package/dist/{graph-edge-decay-D7OESCBR.js → graph-edge-decay-JLOF3YW4.js} +3 -3
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.js +2 -2
- package/dist/identity-continuity.d.ts +3 -3
- package/dist/importance.d.ts +3 -3
- package/dist/importers/index.d.ts +2 -2
- package/dist/index.d.ts +14 -29
- package/dist/index.js +100 -99
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +3 -3
- package/dist/lcm/archive.d.ts +1 -1
- package/dist/lcm/archive.js +2 -2
- package/dist/lcm/engine.d.ts +3 -3
- package/dist/lcm/engine.js +5 -5
- package/dist/lcm/index.d.ts +3 -3
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/queue.d.ts +1 -1
- package/dist/lcm/recall.d.ts +1 -1
- package/dist/lcm/summarizer.d.ts +1 -1
- package/dist/lcm/summarizer.js +3 -3
- package/dist/lcm/tools.d.ts +3 -3
- package/dist/lifecycle.d.ts +3 -3
- package/dist/live-connectors-runner.d.ts +3 -3
- package/dist/local-llm.d.ts +3 -3
- package/dist/maintenance/memory-governance.d.ts +3 -3
- package/dist/maintenance/memory-governance.js +6 -6
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +5 -5
- package/dist/maintenance/rebuild-memory-projection.js +7 -7
- package/dist/mcp-memory-inspector-app.d.ts +7 -7
- package/dist/memory-action-policy.d.ts +3 -3
- package/dist/memory-cache.d.ts +3 -3
- package/dist/memory-lifecycle-ledger-utils.d.ts +3 -3
- package/dist/memory-projection-store.d.ts +3 -3
- package/dist/memory-provenance.d.ts +3 -3
- package/dist/memory-worth-outcomes.d.ts +3 -3
- package/dist/{index-DJ9QWMw-.d.ts → message-parts/index.d.ts} +2 -1
- package/dist/message-parts/index.js +24 -0
- package/dist/message-parts/index.js.map +1 -0
- package/dist/models-json.d.ts +3 -3
- package/dist/namespaces/migrate.d.ts +4 -4
- package/dist/namespaces/migrate.js +10 -10
- package/dist/namespaces/principal.d.ts +3 -3
- package/dist/namespaces/search.d.ts +3 -3
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +4 -4
- package/dist/namespaces/storage.js +5 -5
- package/dist/native-knowledge.d.ts +3 -3
- package/dist/objective-state-writers.d.ts +1 -1
- package/dist/objective-state-writers.js +2 -2
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +17 -17
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +7 -7
- package/dist/{orchestrator-C9CDWAm6.d.ts → orchestrator-m_PnhyHj.d.ts} +4 -4
- package/dist/orchestrator.d.ts +6 -6
- package/dist/orchestrator.js +44 -44
- package/dist/patterns-cli.d.ts +3 -3
- package/dist/{pipeline-BSTuml0d.d.ts → pipeline-DmqtvION.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +3 -3
- package/dist/provenance.d.ts +3 -3
- package/dist/qmd-recall-cache.d.ts +3 -3
- package/dist/qmd.d.ts +3 -3
- package/dist/recall-disclosure-escalation.d.ts +3 -3
- package/dist/recall-explain-renderer.d.ts +3 -3
- package/dist/recall-planner-llm.d.ts +3 -3
- package/dist/recall-state.d.ts +3 -3
- package/dist/recall-tag-filter.d.ts +3 -3
- package/dist/recall-xray-cli.d.ts +3 -3
- package/dist/recall-xray-renderer.d.ts +3 -3
- package/dist/recall-xray.d.ts +3 -3
- 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/resolve-auth-token.d.ts +3 -3
- package/dist/resume-bundles.js +1 -1
- package/dist/retrieval-agents.d.ts +3 -3
- package/dist/retrieval-tiers.d.ts +3 -3
- package/dist/routing/engine.d.ts +3 -3
- package/dist/routing/store.d.ts +3 -3
- package/dist/search/embed-helper.d.ts +3 -3
- package/dist/search/factory.d.ts +3 -3
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +3 -3
- package/dist/search/index.js +7 -7
- package/dist/search/lancedb-backend.d.ts +3 -3
- package/dist/search/meilisearch-backend.d.ts +3 -3
- package/dist/search/noop-backend.d.ts +3 -3
- package/dist/search/orama-backend.d.ts +3 -3
- package/dist/search/port.d.ts +3 -3
- package/dist/search/remote-backend.d.ts +3 -3
- package/dist/{semantic-consolidation-DgFXyALl.d.ts → semantic-consolidation-DVBbq6Wr.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +4 -4
- package/dist/semantic-consolidation.js +7 -7
- package/dist/semantic-rule-promotion.js +5 -5
- package/dist/semantic-rule-verifier.d.ts +3 -3
- package/dist/semantic-rule-verifier.js +6 -6
- package/dist/session-observer-bands.d.ts +3 -3
- package/dist/session-observer-state.d.ts +3 -3
- package/dist/shared-context/manager.d.ts +3 -3
- package/dist/signal.d.ts +3 -3
- package/dist/storage.d.ts +3 -3
- package/dist/storage.js +4 -4
- package/dist/summarizer.d.ts +3 -3
- package/dist/summary-snapshot.d.ts +3 -3
- package/dist/temporal-supersession.d.ts +3 -3
- package/dist/temporal-validity.d.ts +3 -3
- package/dist/threading.d.ts +3 -3
- package/dist/tier-migration.d.ts +3 -3
- package/dist/tier-routing.d.ts +3 -3
- package/dist/topics.d.ts +3 -3
- package/dist/transcript.d.ts +3 -3
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/import-sqlite.js +2 -2
- package/dist/{types-MWKPZnM0.d.ts → types-CJrvHJjx.d.ts} +2 -2
- package/dist/{types-ByK7T3L6.d.ts → types-gb_SNtjR.d.ts} +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/utility-runtime.d.ts +3 -3
- package/dist/utils/path.d.ts +17 -0
- package/dist/utils/path.js +9 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/verified-recall.js +6 -6
- package/package.json +27 -2
- package/src/access-boundary.ts +102 -1
- package/src/access-http.ts +54 -0
- package/src/access-operations-batch.ts +1468 -0
- package/src/access-operations.ts +4 -0
- package/src/access-surface-catalog.test.ts +17 -1
- package/src/access-surface-catalog.ts +57 -54
- package/src/cli/creation-ledger-commands.ts +346 -0
- package/src/cli/research-status-commands.ts +256 -0
- package/src/cli.ts +7 -516
- package/src/storage-contract/atomicity.test.ts +113 -0
- package/src/storage-contract/cache-coherence.test.ts +100 -0
- package/src/storage-contract/content-hash.test.ts +102 -0
- package/src/storage-contract/failure-semantics.test.ts +108 -0
- package/src/storage-contract/harness.ts +148 -0
- package/src/storage-contract/namespace-routing.test.ts +135 -0
- package/src/storage-contract/round-trip.test.ts +226 -0
- package/src/storage-contract/surface.test.ts +90 -0
- package/src/storage-contract/versioning.test.ts +139 -0
- package/dist/chunk-5VXVXJH6.js.map +0 -1
- package/dist/chunk-QGJAGC2J.js.map +0 -1
- package/dist/chunk-ZCEI242W.js.map +0 -1
- package/dist/path-X2K5XCHL.js +0 -9
- /package/dist/{capsule-crypto-YO5QJ6L3.js.map → access-operations-batch.js.map} +0 -0
- /package/dist/{auto-sync-3AAP25FV.js.map → auto-sync-24NNS3GU.js.map} +0 -0
- /package/dist/{path-X2K5XCHL.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-EOOVJK2U.js.map → chunk-2SYPOX45.js.map} +0 -0
- /package/dist/{chunk-64XXOQRW.js.map → chunk-47LPHBIP.js.map} +0 -0
- /package/dist/{chunk-6VVP6NK7.js.map → chunk-6GJ2WQRK.js.map} +0 -0
- /package/dist/{chunk-4NFVPDIL.js.map → chunk-74MYJSKB.js.map} +0 -0
- /package/dist/{chunk-X5J3JZR3.js.map → chunk-773DPI6T.js.map} +0 -0
- /package/dist/{chunk-FVI5B7DE.js.map → chunk-7ARKLLCV.js.map} +0 -0
- /package/dist/{chunk-AGNBY3VG.js.map → chunk-APJQ6UEA.js.map} +0 -0
- /package/dist/{chunk-CI7RKSRE.js.map → chunk-AQEJKOKI.js.map} +0 -0
- /package/dist/{chunk-DL6H3D7S.js.map → chunk-ARV3AUOM.js.map} +0 -0
- /package/dist/{chunk-JTKFZMZ7.js.map → chunk-BKBSE3BU.js.map} +0 -0
- /package/dist/{chunk-TGAHHCB6.js.map → chunk-BMKGG7GC.js.map} +0 -0
- /package/dist/{chunk-GFIARMA7.js.map → chunk-C2EHWNP2.js.map} +0 -0
- /package/dist/{chunk-VKJHM6PL.js.map → chunk-DGTDRIUO.js.map} +0 -0
- /package/dist/{chunk-KC6TCAWV.js.map → chunk-HEHPVBWA.js.map} +0 -0
- /package/dist/{chunk-MDJURR27.js.map → chunk-HW5EF6LV.js.map} +0 -0
- /package/dist/{chunk-BMFZLLNI.js.map → chunk-ICP53SKG.js.map} +0 -0
- /package/dist/{chunk-YOI3ELXF.js.map → chunk-IF362TF6.js.map} +0 -0
- /package/dist/{chunk-ABCGDW3A.js.map → chunk-IFR23TC5.js.map} +0 -0
- /package/dist/{chunk-OXEAMU42.js.map → chunk-JHAYR2JY.js.map} +0 -0
- /package/dist/{chunk-VPAFWWCL.js.map → chunk-K22IJO4R.js.map} +0 -0
- /package/dist/{chunk-JMA4RYRN.js.map → chunk-KFU2SKDD.js.map} +0 -0
- /package/dist/{chunk-VDX2J7OX.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-AMNLZ6SF.js.map → chunk-KZMMAVR2.js.map} +0 -0
- /package/dist/{chunk-EZR35XHX.js.map → chunk-LY4FJLPT.js.map} +0 -0
- /package/dist/{chunk-NUIJEGVD.js.map → chunk-M5MWSG4S.js.map} +0 -0
- /package/dist/{chunk-Z7XEIAV4.js.map → chunk-MNH2OODZ.js.map} +0 -0
- /package/dist/{chunk-MXEWQKM7.js.map → chunk-NFGJBEPT.js.map} +0 -0
- /package/dist/{chunk-Q4O3ET6F.js.map → chunk-NUWZFSKC.js.map} +0 -0
- /package/dist/{chunk-6TAETM63.js.map → chunk-OM6ETLLH.js.map} +0 -0
- /package/dist/{chunk-QQW2LIEA.js.map → chunk-OMSTU233.js.map} +0 -0
- /package/dist/{chunk-XGMCUY5P.js.map → chunk-S3WYRPSA.js.map} +0 -0
- /package/dist/{chunk-QIMFOCSH.js.map → chunk-S5APSA3U.js.map} +0 -0
- /package/dist/{chunk-IX72AAMZ.js.map → chunk-SY6WG6DB.js.map} +0 -0
- /package/dist/{chunk-MBUM2Y3L.js.map → chunk-ULVM34NP.js.map} +0 -0
- /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-7WWURLG6.js.map → chunk-XPOOY35N.js.map} +0 -0
- /package/dist/{chunk-EYJD6KIO.js.map → chunk-Y4PMATX2.js.map} +0 -0
- /package/dist/{chunk-KF74X62T.js.map → chunk-YGKUAX2B.js.map} +0 -0
- /package/dist/{chunk-YN4ZT4CW.js.map → chunk-YI7RZO7Y.js.map} +0 -0
- /package/dist/{graph-edge-decay-D7OESCBR.js.map → graph-edge-decay-JLOF3YW4.js.map} +0 -0
|
@@ -12,13 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-HDDRVXX4.js";
|
|
13
13
|
import {
|
|
14
14
|
importSqlite
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
exportJsonBundle
|
|
18
|
-
} from "./chunk-UP6MOYCB.js";
|
|
19
|
-
import {
|
|
20
|
-
exportSqlite
|
|
21
|
-
} from "./chunk-7VFZTJ7K.js";
|
|
15
|
+
} from "./chunk-APJQ6UEA.js";
|
|
22
16
|
import {
|
|
23
17
|
detectImportFormat
|
|
24
18
|
} from "./chunk-OZKVVUJB.js";
|
|
@@ -27,38 +21,44 @@ import {
|
|
|
27
21
|
} from "./chunk-2DL3OFLD.js";
|
|
28
22
|
import {
|
|
29
23
|
backupMemoryDir
|
|
30
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2NLLXCJG.js";
|
|
25
|
+
import {
|
|
26
|
+
exportJsonBundle
|
|
27
|
+
} from "./chunk-UP6MOYCB.js";
|
|
31
28
|
import {
|
|
32
29
|
exportMarkdownBundle
|
|
33
30
|
} from "./chunk-765K3SAT.js";
|
|
31
|
+
import {
|
|
32
|
+
exportSqlite
|
|
33
|
+
} from "./chunk-7VFZTJ7K.js";
|
|
34
|
+
import {
|
|
35
|
+
WebDavServer
|
|
36
|
+
} from "./chunk-PYIFUBRK.js";
|
|
34
37
|
import {
|
|
35
38
|
buildReplayNormalizerRegistry,
|
|
36
39
|
clampBatchSize,
|
|
37
40
|
runReplay
|
|
38
41
|
} from "./chunk-HOJZMQ4J.js";
|
|
42
|
+
import {
|
|
43
|
+
rebuildObservations
|
|
44
|
+
} from "./chunk-LZZNTPLR.js";
|
|
39
45
|
import {
|
|
40
46
|
TailscaleHelper
|
|
41
47
|
} from "./chunk-EEC4PCG5.js";
|
|
42
48
|
import {
|
|
43
|
-
|
|
44
|
-
} from "./chunk-
|
|
49
|
+
archiveObservations
|
|
50
|
+
} from "./chunk-WMWVO45V.js";
|
|
45
51
|
import {
|
|
46
52
|
migrateObservations
|
|
47
53
|
} from "./chunk-D6RIFG4O.js";
|
|
48
54
|
import {
|
|
49
55
|
rebuildMemoryLifecycleLedger
|
|
50
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-BMKGG7GC.js";
|
|
51
57
|
import {
|
|
52
58
|
rebuildMemoryProjection,
|
|
53
59
|
repairMemoryProjection,
|
|
54
60
|
verifyMemoryProjection
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import {
|
|
57
|
-
rebuildObservations
|
|
58
|
-
} from "./chunk-LZZNTPLR.js";
|
|
59
|
-
import {
|
|
60
|
-
archiveObservations
|
|
61
|
-
} from "./chunk-WMWVO45V.js";
|
|
61
|
+
} from "./chunk-2SYPOX45.js";
|
|
62
62
|
import {
|
|
63
63
|
getBulkImportSource,
|
|
64
64
|
listBulkImportSources,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
} from "./chunk-GQL52GQ5.js";
|
|
71
71
|
import {
|
|
72
72
|
promoteSemanticRuleFromMemory
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-SY6WG6DB.js";
|
|
74
74
|
import {
|
|
75
75
|
resolveAgentAccessAuthToken
|
|
76
76
|
} from "./chunk-TGQ2NTWH.js";
|
|
@@ -82,15 +82,6 @@ import {
|
|
|
82
82
|
import {
|
|
83
83
|
parseXrayCliOptions
|
|
84
84
|
} from "./chunk-SFOAQQDJ.js";
|
|
85
|
-
import {
|
|
86
|
-
collectPatternMemories,
|
|
87
|
-
explainPatternMemory,
|
|
88
|
-
parsePatternsExplainOptions,
|
|
89
|
-
parsePatternsListOptions,
|
|
90
|
-
parseStrictCliDate,
|
|
91
|
-
renderPatternExplain,
|
|
92
|
-
renderPatternsList
|
|
93
|
-
} from "./chunk-3T74IZB3.js";
|
|
94
85
|
import {
|
|
95
86
|
runBenchmarkRecall,
|
|
96
87
|
runOperatorConfigReview,
|
|
@@ -98,12 +89,21 @@ import {
|
|
|
98
89
|
runOperatorInventory,
|
|
99
90
|
runOperatorRepair,
|
|
100
91
|
runOperatorSetup
|
|
101
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-M5MWSG4S.js";
|
|
102
93
|
import {
|
|
103
94
|
listNamespaces,
|
|
104
95
|
runNamespaceMigration,
|
|
105
96
|
verifyNamespaces
|
|
106
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-BKBSE3BU.js";
|
|
98
|
+
import {
|
|
99
|
+
collectPatternMemories,
|
|
100
|
+
explainPatternMemory,
|
|
101
|
+
parsePatternsExplainOptions,
|
|
102
|
+
parsePatternsListOptions,
|
|
103
|
+
parseStrictCliDate,
|
|
104
|
+
renderPatternExplain,
|
|
105
|
+
renderPatternsList
|
|
106
|
+
} from "./chunk-3T74IZB3.js";
|
|
107
107
|
import {
|
|
108
108
|
GraphDashboardServer
|
|
109
109
|
} from "./chunk-YNDLCWXS.js";
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
} from "./chunk-WIWPSQYU.js";
|
|
117
117
|
import {
|
|
118
118
|
searchVerifiedEpisodes
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-NFGJBEPT.js";
|
|
120
120
|
import {
|
|
121
121
|
getUtilityLearningStatus,
|
|
122
122
|
learnUtilityPromotionWeights
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
} from "./chunk-QRDOSYOR.js";
|
|
131
131
|
import {
|
|
132
132
|
searchVerifiedSemanticRules
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-Y4PMATX2.js";
|
|
134
134
|
import {
|
|
135
135
|
getWorkProductLedgerStatus,
|
|
136
136
|
recordWorkProductLedgerEntry,
|
|
@@ -139,18 +139,18 @@ import {
|
|
|
139
139
|
import {
|
|
140
140
|
utcDayRange
|
|
141
141
|
} from "./chunk-GY3SKOS4.js";
|
|
142
|
-
import {
|
|
143
|
-
readRuntimePolicySnapshot,
|
|
144
|
-
sanitizeRuntimePolicyValues
|
|
145
|
-
} from "./chunk-33JBK2XP.js";
|
|
146
142
|
import {
|
|
147
143
|
formatNamespaceMaintenanceHealthText
|
|
148
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-LY4FJLPT.js";
|
|
149
145
|
import {
|
|
150
146
|
analyzeSessionIntegrity,
|
|
151
147
|
applySessionRepair,
|
|
152
148
|
planSessionRepair
|
|
153
149
|
} from "./chunk-KFY3SGN7.js";
|
|
150
|
+
import {
|
|
151
|
+
readRuntimePolicySnapshot,
|
|
152
|
+
sanitizeRuntimePolicyValues
|
|
153
|
+
} from "./chunk-33JBK2XP.js";
|
|
154
154
|
import {
|
|
155
155
|
GITHUB_CONNECTOR_ID,
|
|
156
156
|
GMAIL_CONNECTOR_ID,
|
|
@@ -183,15 +183,6 @@ import {
|
|
|
183
183
|
runEvalStoredBaselineCiGate,
|
|
184
184
|
validateEvalBenchmarkPack
|
|
185
185
|
} from "./chunk-3PY7VHV7.js";
|
|
186
|
-
import {
|
|
187
|
-
getCueAnchorStoreStatus
|
|
188
|
-
} from "./chunk-FZZ2QTJI.js";
|
|
189
|
-
import {
|
|
190
|
-
applyCommitmentLedgerLifecycle,
|
|
191
|
-
getCommitmentLedgerStatus,
|
|
192
|
-
recordCommitmentLedgerEntry,
|
|
193
|
-
transitionCommitmentLedgerEntryState
|
|
194
|
-
} from "./chunk-LMDRGRJ2.js";
|
|
195
186
|
import {
|
|
196
187
|
buildConnectorRowsFromDefinitions,
|
|
197
188
|
parseConnectorsListOptions,
|
|
@@ -201,6 +192,15 @@ import {
|
|
|
201
192
|
renderConnectorsRunResult,
|
|
202
193
|
runConnectorPollOnce
|
|
203
194
|
} from "./chunk-OKTXM5H4.js";
|
|
195
|
+
import {
|
|
196
|
+
getCueAnchorStoreStatus
|
|
197
|
+
} from "./chunk-FZZ2QTJI.js";
|
|
198
|
+
import {
|
|
199
|
+
applyCommitmentLedgerLifecycle,
|
|
200
|
+
getCommitmentLedgerStatus,
|
|
201
|
+
recordCommitmentLedgerEntry,
|
|
202
|
+
transitionCommitmentLedgerEntryState
|
|
203
|
+
} from "./chunk-LMDRGRJ2.js";
|
|
204
204
|
import {
|
|
205
205
|
resolveNamespaceChildRoot
|
|
206
206
|
} from "./chunk-3UXOZBHV.js";
|
|
@@ -215,16 +215,16 @@ import {
|
|
|
215
215
|
} from "./chunk-OADWQ5CR.js";
|
|
216
216
|
import {
|
|
217
217
|
EngramAccessHttpServer
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-GT4VBKM4.js";
|
|
219
219
|
import {
|
|
220
220
|
WearablesInputError
|
|
221
221
|
} from "./chunk-7WV3F5DQ.js";
|
|
222
222
|
import {
|
|
223
223
|
EngramMcpServer
|
|
224
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-HEHPVBWA.js";
|
|
225
225
|
import {
|
|
226
226
|
EngramAccessService
|
|
227
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-JHAYR2JY.js";
|
|
228
228
|
import {
|
|
229
229
|
WorkStorage
|
|
230
230
|
} from "./chunk-GDB4J2H3.js";
|
|
@@ -237,6 +237,12 @@ import {
|
|
|
237
237
|
renderRecallExplain,
|
|
238
238
|
renderXray
|
|
239
239
|
} from "./chunk-WN4GHSDH.js";
|
|
240
|
+
import {
|
|
241
|
+
listMemoryGovernanceRuns,
|
|
242
|
+
readMemoryGovernanceRunArtifact,
|
|
243
|
+
restoreMemoryGovernanceRun,
|
|
244
|
+
runMemoryGovernance
|
|
245
|
+
} from "./chunk-ULVM34NP.js";
|
|
240
246
|
import {
|
|
241
247
|
getTrustZoneStoreStatus,
|
|
242
248
|
promoteTrustZoneRecord,
|
|
@@ -246,17 +252,11 @@ import {
|
|
|
246
252
|
getObjectiveStateStoreStatus
|
|
247
253
|
} from "./chunk-6HMYUWXR.js";
|
|
248
254
|
import {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
restoreMemoryGovernanceRun,
|
|
252
|
-
runMemoryGovernance
|
|
253
|
-
} from "./chunk-MBUM2Y3L.js";
|
|
255
|
+
getCausalTrajectoryStoreStatus
|
|
256
|
+
} from "./chunk-YI7RZO7Y.js";
|
|
254
257
|
import {
|
|
255
258
|
analyzeGraphHealth
|
|
256
|
-
} from "./chunk-
|
|
257
|
-
import {
|
|
258
|
-
getCausalTrajectoryStoreStatus
|
|
259
|
-
} from "./chunk-YN4ZT4CW.js";
|
|
259
|
+
} from "./chunk-YGKUAX2B.js";
|
|
260
260
|
import {
|
|
261
261
|
assertPathInsideRoot
|
|
262
262
|
} from "./chunk-5GPPACXK.js";
|
|
@@ -709,6 +709,352 @@ function formatRule(rule) {
|
|
|
709
709
|
return parts.join(" ");
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
+
// src/cli/research-status-commands.ts
|
|
713
|
+
function registerResearchStatusCommands(cmd, orchestrator) {
|
|
714
|
+
cmd.command("objective-state-status").description("Show objective-state store status, snapshot counts, and latest stored snapshot").action(async () => {
|
|
715
|
+
const status = await runObjectiveStateStatusCliCommand({
|
|
716
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
717
|
+
objectiveStateStoreDir: orchestrator.config.objectiveStateStoreDir,
|
|
718
|
+
objectiveStateMemoryEnabled: orchestrator.config.objectiveStateMemoryEnabled,
|
|
719
|
+
objectiveStateSnapshotWritesEnabled: orchestrator.config.objectiveStateSnapshotWritesEnabled
|
|
720
|
+
});
|
|
721
|
+
console.log(JSON.stringify(status, null, 2));
|
|
722
|
+
console.log("OK");
|
|
723
|
+
});
|
|
724
|
+
cmd.command("causal-trajectory-status").description("Show causal-trajectory store status, record counts, and latest stored chain").action(async () => {
|
|
725
|
+
const status = await runCausalTrajectoryStatusCliCommand({
|
|
726
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
727
|
+
causalTrajectoryStoreDir: orchestrator.config.causalTrajectoryStoreDir,
|
|
728
|
+
causalTrajectoryMemoryEnabled: orchestrator.config.causalTrajectoryMemoryEnabled
|
|
729
|
+
});
|
|
730
|
+
console.log(JSON.stringify(status, null, 2));
|
|
731
|
+
console.log("OK");
|
|
732
|
+
});
|
|
733
|
+
cmd.command("trust-zone-status").description("Show trust-zone store status, zoned record counts, and latest stored record").action(async () => {
|
|
734
|
+
const status = await runTrustZoneStatusCliCommand({
|
|
735
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
736
|
+
trustZoneStoreDir: orchestrator.config.trustZoneStoreDir,
|
|
737
|
+
trustZonesEnabled: orchestrator.config.trustZonesEnabled,
|
|
738
|
+
quarantinePromotionEnabled: orchestrator.config.quarantinePromotionEnabled,
|
|
739
|
+
memoryPoisoningDefenseEnabled: orchestrator.config.memoryPoisoningDefenseEnabled
|
|
740
|
+
});
|
|
741
|
+
console.log(JSON.stringify(status, null, 2));
|
|
742
|
+
console.log("OK");
|
|
743
|
+
});
|
|
744
|
+
cmd.command("trust-zone-demo-seed").description("Explicitly seed an opt-in trust-zone demo dataset for buyer-facing walkthroughs").option("--scenario <scenario>", "Demo scenario id (default: enterprise-buyer-v1)").option("--recorded-at <isoTimestamp>", "Base ISO timestamp used to anchor demo records").option("--dry-run", "Preview the demo dataset without writing any trust-zone records").action(async (...args) => {
|
|
745
|
+
const options = args[0] ?? {};
|
|
746
|
+
const result = await runTrustZoneDemoSeedCliCommand({
|
|
747
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
748
|
+
trustZoneStoreDir: orchestrator.config.trustZoneStoreDir,
|
|
749
|
+
trustZonesEnabled: orchestrator.config.trustZonesEnabled,
|
|
750
|
+
scenario: typeof options.scenario === "string" ? options.scenario : void 0,
|
|
751
|
+
recordedAt: typeof options.recordedAt === "string" ? options.recordedAt : void 0,
|
|
752
|
+
dryRun: options.dryRun === true
|
|
753
|
+
});
|
|
754
|
+
console.log(JSON.stringify(result, null, 2));
|
|
755
|
+
console.log("OK");
|
|
756
|
+
});
|
|
757
|
+
cmd.command("abstraction-node-status").description("Show abstraction-node store status, abstraction counts, and latest stored node").action(async () => {
|
|
758
|
+
const status = await runAbstractionNodeStatusCliCommand({
|
|
759
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
760
|
+
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
761
|
+
harmonicRetrievalEnabled: orchestrator.config.harmonicRetrievalEnabled,
|
|
762
|
+
abstractionAnchorsEnabled: orchestrator.config.abstractionAnchorsEnabled
|
|
763
|
+
});
|
|
764
|
+
console.log(JSON.stringify(status, null, 2));
|
|
765
|
+
console.log("OK");
|
|
766
|
+
});
|
|
767
|
+
cmd.command("cue-anchor-status").description("Show cue-anchor index status, anchor counts, and the latest stored cue anchor").action(async () => {
|
|
768
|
+
const status = await runCueAnchorStatusCliCommand({
|
|
769
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
770
|
+
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
771
|
+
harmonicRetrievalEnabled: orchestrator.config.harmonicRetrievalEnabled,
|
|
772
|
+
abstractionAnchorsEnabled: orchestrator.config.abstractionAnchorsEnabled
|
|
773
|
+
});
|
|
774
|
+
console.log(JSON.stringify(status, null, 2));
|
|
775
|
+
console.log("OK");
|
|
776
|
+
});
|
|
777
|
+
cmd.command("harmonic-search").description("Preview harmonic retrieval blending over abstraction nodes and cue anchors").argument("<query>", "Prompt-like query to evaluate against harmonic retrieval storage").option("--max-results <count>", "Maximum number of blended results to return", "3").option("--session-key <sessionKey>", "Optional session key for same-session tie-breaking").action(async (...args) => {
|
|
778
|
+
const query = typeof args[0] === "string" ? args[0] : "";
|
|
779
|
+
const options = args[1] ?? {};
|
|
780
|
+
const maxResults = typeof options.maxResults === "string" ? Number.parseInt(options.maxResults, 10) : 3;
|
|
781
|
+
const results = await runHarmonicSearchCliCommand({
|
|
782
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
783
|
+
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
784
|
+
harmonicRetrievalEnabled: orchestrator.config.harmonicRetrievalEnabled,
|
|
785
|
+
abstractionAnchorsEnabled: orchestrator.config.abstractionAnchorsEnabled,
|
|
786
|
+
query,
|
|
787
|
+
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
788
|
+
sessionKey: typeof options.sessionKey === "string" ? options.sessionKey : void 0
|
|
789
|
+
});
|
|
790
|
+
console.log(JSON.stringify(results, null, 2));
|
|
791
|
+
console.log("OK");
|
|
792
|
+
});
|
|
793
|
+
cmd.command("utility-status").description("Show utility-learning telemetry status, event counts, and the latest utility event").action(async () => {
|
|
794
|
+
const status = await runUtilityTelemetryStatusCliCommand({
|
|
795
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
796
|
+
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
797
|
+
promotionByOutcomeEnabled: orchestrator.config.promotionByOutcomeEnabled
|
|
798
|
+
});
|
|
799
|
+
console.log(JSON.stringify(status, null, 2));
|
|
800
|
+
console.log("OK");
|
|
801
|
+
});
|
|
802
|
+
cmd.command("utility-record").description("Record a utility-learning telemetry event when utility learning is enabled").requiredOption("--event-id <eventId>", "Utility telemetry event id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the event").requiredOption("--session-key <sessionKey>", "Session key associated with the event").requiredOption("--source <source>", "Event source (cli|system|benchmark|tool_result)").requiredOption("--target <target>", "Telemetry target (promotion|ranking)").requiredOption("--decision <decision>", "Decision taken (promote|demote|hold|boost|suppress)").requiredOption("--outcome <outcome>", "Observed outcome (helpful|neutral|harmful)").requiredOption("--utility-score <utilityScore>", "Bounded utility score between -1 and 1").requiredOption("--summary <summary>", "Human-readable summary of the measured utility event").option("--memory-id <memoryId...>", "Memory ids linked to the utility event").option("--entity-ref <entityRef...>", "Entity refs linked to the utility event").option("--tag <tag...>", "Tags to attach to the utility event").action(async (...args) => {
|
|
803
|
+
const options = args[0] ?? {};
|
|
804
|
+
const utilityScore = typeof options.utilityScore === "string" ? Number.parseFloat(options.utilityScore) : Number.NaN;
|
|
805
|
+
const filePath = await runUtilityTelemetryRecordCliCommand({
|
|
806
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
807
|
+
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
808
|
+
event: {
|
|
809
|
+
schemaVersion: 1,
|
|
810
|
+
eventId: String(options.eventId ?? ""),
|
|
811
|
+
recordedAt: String(options.recordedAt ?? ""),
|
|
812
|
+
sessionKey: String(options.sessionKey ?? ""),
|
|
813
|
+
source: String(options.source ?? ""),
|
|
814
|
+
target: String(options.target ?? ""),
|
|
815
|
+
decision: String(options.decision ?? ""),
|
|
816
|
+
outcome: String(options.outcome ?? ""),
|
|
817
|
+
utilityScore,
|
|
818
|
+
summary: String(options.summary ?? ""),
|
|
819
|
+
memoryIds: Array.isArray(options.memoryId) ? options.memoryId.map(String) : void 0,
|
|
820
|
+
entityRefs: Array.isArray(options.entityRef) ? options.entityRef.map(String) : void 0,
|
|
821
|
+
tags: Array.isArray(options.tag) ? options.tag.map(String) : void 0
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
825
|
+
console.log("OK");
|
|
826
|
+
});
|
|
827
|
+
cmd.command("utility-learning-status").description("Show offline utility-learning snapshot status and learned weight counts").action(async () => {
|
|
828
|
+
const status = await runUtilityLearningStatusCliCommand({
|
|
829
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
830
|
+
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
831
|
+
promotionByOutcomeEnabled: orchestrator.config.promotionByOutcomeEnabled
|
|
832
|
+
});
|
|
833
|
+
console.log(JSON.stringify(status, null, 2));
|
|
834
|
+
console.log("OK");
|
|
835
|
+
});
|
|
836
|
+
cmd.command("utility-learn").description("Learn bounded offline promotion/ranking weights from recorded utility telemetry").option("--window-days <days>", "Telemetry lookback window in days", "14").option("--min-event-count <count>", "Minimum event count required per target/decision group", "3").option("--max-weight-magnitude <value>", "Maximum absolute learned weight magnitude", "0.35").action(async (...args) => {
|
|
837
|
+
const options = args[0] ?? {};
|
|
838
|
+
const learningWindowDays = typeof options.windowDays === "string" ? Number.parseInt(options.windowDays, 10) : 14;
|
|
839
|
+
const minEventCount = typeof options.minEventCount === "string" ? Number.parseInt(options.minEventCount, 10) : 3;
|
|
840
|
+
const maxWeightMagnitude = typeof options.maxWeightMagnitude === "string" ? Number.parseFloat(options.maxWeightMagnitude) : 0.35;
|
|
841
|
+
const result = await runUtilityLearningCliCommand({
|
|
842
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
843
|
+
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
844
|
+
learningWindowDays,
|
|
845
|
+
minEventCount,
|
|
846
|
+
maxWeightMagnitude
|
|
847
|
+
});
|
|
848
|
+
console.log(JSON.stringify(result, null, 2));
|
|
849
|
+
console.log("OK");
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
// src/cli/creation-ledger-commands.ts
|
|
854
|
+
function registerCreationLedgerCommands(cmd, orchestrator) {
|
|
855
|
+
cmd.command("resume-bundle-status").description("Show resume bundle status, bundle counts, and the latest recorded handoff bundle").action(async () => {
|
|
856
|
+
const status = await runResumeBundleStatusCliCommand({
|
|
857
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
858
|
+
resumeBundleDir: orchestrator.config.resumeBundleDir,
|
|
859
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
860
|
+
resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled
|
|
861
|
+
});
|
|
862
|
+
console.log(JSON.stringify(status, null, 2));
|
|
863
|
+
console.log("OK");
|
|
864
|
+
});
|
|
865
|
+
cmd.command("resume-bundle-record").description("Record an explicit resume bundle when creation-memory handoff bundles are enabled").requiredOption("--bundle-id <bundleId>", "Resume bundle id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the bundle").requiredOption("--session-key <sessionKey>", "Session key that owns the bundle").requiredOption("--source <source>", "Bundle source (tool_result|cli|system|manual)").requiredOption("--scope <scope>", "Primary scope or recovery domain for the bundle").requiredOption("--summary <summary>", "Human-readable summary of what this bundle preserves").option("--key-fact <keyFact...>", "Short facts that a resumed agent should retain").option("--next-action <nextAction...>", "Explicit next actions for the resumed agent").option("--risk-flag <riskFlag...>", "Open risks or cautions attached to the bundle").option(
|
|
866
|
+
"--objective-state-snapshot-ref <objectiveStateSnapshotRef...>",
|
|
867
|
+
"Objective-state snapshot refs attached to the bundle"
|
|
868
|
+
).option(
|
|
869
|
+
"--work-product-entry-ref <workProductEntryRef...>",
|
|
870
|
+
"Work-product ledger refs attached to the bundle"
|
|
871
|
+
).option(
|
|
872
|
+
"--commitment-entry-ref <commitmentEntryRef...>",
|
|
873
|
+
"Commitment ledger refs attached to the bundle"
|
|
874
|
+
).action(async (...args) => {
|
|
875
|
+
const options = args[0] ?? {};
|
|
876
|
+
const filePath = await runResumeBundleRecordCliCommand({
|
|
877
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
878
|
+
resumeBundleDir: orchestrator.config.resumeBundleDir,
|
|
879
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
880
|
+
resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled,
|
|
881
|
+
bundle: {
|
|
882
|
+
schemaVersion: 1,
|
|
883
|
+
bundleId: String(options.bundleId ?? ""),
|
|
884
|
+
recordedAt: String(options.recordedAt ?? ""),
|
|
885
|
+
sessionKey: String(options.sessionKey ?? ""),
|
|
886
|
+
source: String(options.source ?? ""),
|
|
887
|
+
scope: String(options.scope ?? ""),
|
|
888
|
+
summary: String(options.summary ?? ""),
|
|
889
|
+
keyFacts: Array.isArray(options.keyFact) ? options.keyFact.map(String) : void 0,
|
|
890
|
+
nextActions: Array.isArray(options.nextAction) ? options.nextAction.map(String) : void 0,
|
|
891
|
+
riskFlags: Array.isArray(options.riskFlag) ? options.riskFlag.map(String) : void 0,
|
|
892
|
+
objectiveStateSnapshotRefs: Array.isArray(options.objectiveStateSnapshotRef) ? options.objectiveStateSnapshotRef.map(String) : void 0,
|
|
893
|
+
workProductEntryRefs: Array.isArray(options.workProductEntryRef) ? options.workProductEntryRef.map(String) : void 0,
|
|
894
|
+
commitmentEntryRefs: Array.isArray(options.commitmentEntryRef) ? options.commitmentEntryRef.map(String) : void 0
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
898
|
+
console.log("OK");
|
|
899
|
+
});
|
|
900
|
+
cmd.command("resume-bundle-build").description("Build and persist a resume bundle from transcript recovery, objective state, work products, and open commitments").requiredOption("--bundle-id <bundleId>", "Resume bundle id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the bundle").requiredOption("--session-key <sessionKey>", "Session key that owns the bundle").requiredOption("--scope <scope>", "Primary scope or recovery domain for the bundle").action(async (...args) => {
|
|
901
|
+
const options = args[0] ?? {};
|
|
902
|
+
const built = await runResumeBundleBuildCliCommand({
|
|
903
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
904
|
+
resumeBundleDir: orchestrator.config.resumeBundleDir,
|
|
905
|
+
objectiveStateStoreDir: orchestrator.config.objectiveStateStoreDir,
|
|
906
|
+
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
907
|
+
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
908
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
909
|
+
resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled,
|
|
910
|
+
transcriptEnabled: orchestrator.config.transcriptEnabled,
|
|
911
|
+
objectiveStateMemoryEnabled: orchestrator.config.objectiveStateMemoryEnabled,
|
|
912
|
+
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
913
|
+
bundleId: String(options.bundleId ?? ""),
|
|
914
|
+
recordedAt: String(options.recordedAt ?? ""),
|
|
915
|
+
sessionKey: String(options.sessionKey ?? ""),
|
|
916
|
+
scope: String(options.scope ?? "")
|
|
917
|
+
});
|
|
918
|
+
console.log(JSON.stringify({
|
|
919
|
+
wrote: built !== null,
|
|
920
|
+
filePath: built?.filePath ?? null,
|
|
921
|
+
bundle: built?.bundle ?? null
|
|
922
|
+
}, null, 2));
|
|
923
|
+
console.log("OK");
|
|
924
|
+
});
|
|
925
|
+
cmd.command("commitment-status").description("Show commitment ledger status, entry counts, and the latest recorded commitment").action(async () => {
|
|
926
|
+
const status = await runCommitmentStatusCliCommand({
|
|
927
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
928
|
+
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
929
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
930
|
+
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
931
|
+
commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
|
|
932
|
+
commitmentStaleDays: orchestrator.config.commitmentStaleDays,
|
|
933
|
+
commitmentDecayDays: orchestrator.config.commitmentDecayDays
|
|
934
|
+
});
|
|
935
|
+
console.log(JSON.stringify(status, null, 2));
|
|
936
|
+
console.log("OK");
|
|
937
|
+
});
|
|
938
|
+
cmd.command("commitment-record").description("Record a commitment ledger entry when commitment memory is enabled").requiredOption("--entry-id <entryId>", "Commitment entry id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the entry").requiredOption("--session-key <sessionKey>", "Session key that owns the commitment").requiredOption("--source <source>", "Entry source (tool_result|cli|system|manual)").requiredOption("--kind <kind>", "Entry kind (promise|follow_up|deadline|deliverable)").requiredOption("--state <state>", "Entry state (open|fulfilled|cancelled|expired)").requiredOption("--scope <scope>", "Primary scope or identifier for the commitment").requiredOption("--summary <summary>", "Human-readable summary of the commitment").option("--due-at <dueAt>", "Optional due timestamp for the commitment").option("--tag <tag...>", "Tags to attach to the commitment entry").option("--entity-ref <entityRef...>", "Entity refs to attach to the commitment entry").option(
|
|
939
|
+
"--work-product-entry-ref <workProductEntryRef...>",
|
|
940
|
+
"Work-product ledger refs that this commitment depends on"
|
|
941
|
+
).option(
|
|
942
|
+
"--objective-state-snapshot-ref <objectiveStateSnapshotRef...>",
|
|
943
|
+
"Objective-state snapshot refs to link to this commitment"
|
|
944
|
+
).action(async (...args) => {
|
|
945
|
+
const options = args[0] ?? {};
|
|
946
|
+
const filePath = await runCommitmentRecordCliCommand({
|
|
947
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
948
|
+
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
949
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
950
|
+
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
951
|
+
entry: {
|
|
952
|
+
schemaVersion: 1,
|
|
953
|
+
entryId: String(options.entryId ?? ""),
|
|
954
|
+
recordedAt: String(options.recordedAt ?? ""),
|
|
955
|
+
sessionKey: String(options.sessionKey ?? ""),
|
|
956
|
+
source: String(options.source ?? ""),
|
|
957
|
+
kind: String(options.kind ?? ""),
|
|
958
|
+
state: String(options.state ?? ""),
|
|
959
|
+
scope: String(options.scope ?? ""),
|
|
960
|
+
summary: String(options.summary ?? ""),
|
|
961
|
+
dueAt: typeof options.dueAt === "string" ? options.dueAt : void 0,
|
|
962
|
+
tags: Array.isArray(options.tag) ? options.tag.map(String) : void 0,
|
|
963
|
+
entityRefs: Array.isArray(options.entityRef) ? options.entityRef.map(String) : void 0,
|
|
964
|
+
workProductEntryRefs: Array.isArray(options.workProductEntryRef) ? options.workProductEntryRef.map(String) : void 0,
|
|
965
|
+
objectiveStateSnapshotRefs: Array.isArray(options.objectiveStateSnapshotRef) ? options.objectiveStateSnapshotRef.map(String) : void 0
|
|
966
|
+
}
|
|
967
|
+
});
|
|
968
|
+
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
969
|
+
console.log("OK");
|
|
970
|
+
});
|
|
971
|
+
cmd.command("commitment-set-state").description("Transition an existing commitment ledger entry when commitment lifecycle is enabled").requiredOption("--entry-id <entryId>", "Commitment entry id").requiredOption("--state <state>", "Next state (open|fulfilled|cancelled|expired)").requiredOption("--changed-at <changedAt>", "ISO timestamp for the lifecycle transition").action(async (...args) => {
|
|
972
|
+
const options = args[0] ?? {};
|
|
973
|
+
const entry = await runCommitmentSetStateCliCommand({
|
|
974
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
975
|
+
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
976
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
977
|
+
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
978
|
+
commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
|
|
979
|
+
entryId: String(options.entryId ?? ""),
|
|
980
|
+
nextState: String(options.state ?? ""),
|
|
981
|
+
changedAt: String(options.changedAt ?? "")
|
|
982
|
+
});
|
|
983
|
+
console.log(JSON.stringify({ updated: entry !== null, entry }, null, 2));
|
|
984
|
+
console.log("OK");
|
|
985
|
+
});
|
|
986
|
+
cmd.command("commitment-lifecycle-run").description("Apply overdue-expiry and resolved-entry cleanup to the commitment ledger").option("--now <now>", "Override the lifecycle timestamp for testing or backfills").action(async (...args) => {
|
|
987
|
+
const options = args[0] ?? {};
|
|
988
|
+
const result = await runCommitmentLifecycleCliCommand({
|
|
989
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
990
|
+
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
991
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
992
|
+
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
993
|
+
commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
|
|
994
|
+
commitmentDecayDays: orchestrator.config.commitmentDecayDays,
|
|
995
|
+
now: typeof options.now === "string" ? options.now : void 0
|
|
996
|
+
});
|
|
997
|
+
console.log(JSON.stringify({ applied: result !== null, result }, null, 2));
|
|
998
|
+
console.log("OK");
|
|
999
|
+
});
|
|
1000
|
+
cmd.command("work-product-status").description("Show work-product ledger status, entry counts, and the latest recorded work product").action(async () => {
|
|
1001
|
+
const status = await runWorkProductStatusCliCommand({
|
|
1002
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
1003
|
+
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
1004
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled
|
|
1005
|
+
});
|
|
1006
|
+
console.log(JSON.stringify(status, null, 2));
|
|
1007
|
+
console.log("OK");
|
|
1008
|
+
});
|
|
1009
|
+
cmd.command("work-product-record").description("Record a work-product ledger entry when creation-memory is enabled").requiredOption("--entry-id <entryId>", "Ledger entry id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the entry").requiredOption("--session-key <sessionKey>", "Session key that created the work product").requiredOption("--source <source>", "Entry source (tool_result|cli|system|manual)").requiredOption("--kind <kind>", "Entry kind (artifact|file|record|report|workspace)").requiredOption(
|
|
1010
|
+
"--entry-action <entryAction>",
|
|
1011
|
+
"Entry action (created|updated|deleted|referenced|published)"
|
|
1012
|
+
).requiredOption("--scope <scope>", "Primary scope or identifier for the created work product").requiredOption("--summary <summary>", "Human-readable summary of the work product").option("--artifact-path <artifactPath>", "Optional path to the created artifact").option("--tag <tag...>", "Tags to attach to the work-product entry").option("--entity-ref <entityRef...>", "Entity refs to attach to the work-product entry").option(
|
|
1013
|
+
"--objective-state-snapshot-ref <objectiveStateSnapshotRef...>",
|
|
1014
|
+
"Objective-state snapshot refs to link to this work product"
|
|
1015
|
+
).action(async (...args) => {
|
|
1016
|
+
const options = args[0] ?? {};
|
|
1017
|
+
const filePath = await runWorkProductRecordCliCommand({
|
|
1018
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
1019
|
+
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
1020
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
1021
|
+
entry: {
|
|
1022
|
+
schemaVersion: 1,
|
|
1023
|
+
entryId: String(options.entryId ?? ""),
|
|
1024
|
+
recordedAt: String(options.recordedAt ?? ""),
|
|
1025
|
+
sessionKey: String(options.sessionKey ?? ""),
|
|
1026
|
+
source: String(options.source ?? ""),
|
|
1027
|
+
kind: String(options.kind ?? ""),
|
|
1028
|
+
action: String(options.entryAction ?? ""),
|
|
1029
|
+
scope: String(options.scope ?? ""),
|
|
1030
|
+
summary: String(options.summary ?? ""),
|
|
1031
|
+
artifactPath: typeof options.artifactPath === "string" ? options.artifactPath : void 0,
|
|
1032
|
+
tags: Array.isArray(options.tag) ? options.tag.map(String) : void 0,
|
|
1033
|
+
entityRefs: Array.isArray(options.entityRef) ? options.entityRef.map(String) : void 0,
|
|
1034
|
+
objectiveStateSnapshotRefs: Array.isArray(options.objectiveStateSnapshotRef) ? options.objectiveStateSnapshotRef.map(String) : void 0
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
1038
|
+
console.log("OK");
|
|
1039
|
+
});
|
|
1040
|
+
cmd.command("work-product-recall-search").description("Preview work-product recovery candidates when creation-memory recall is enabled").argument("<query>", "Prompt-like query to evaluate against the work-product ledger").option("--max-results <count>", "Maximum number of work-product results to return", "3").option("--session-key <sessionKey>", "Optional session key to boost same-session work products").action(async (...args) => {
|
|
1041
|
+
const query = typeof args[0] === "string" ? args[0] : "";
|
|
1042
|
+
const options = args[1] ?? {};
|
|
1043
|
+
const maxResults = typeof options.maxResults === "string" ? Number.parseInt(options.maxResults, 10) : 3;
|
|
1044
|
+
const results = await runWorkProductRecallSearchCliCommand({
|
|
1045
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
1046
|
+
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
1047
|
+
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
1048
|
+
workProductRecallEnabled: orchestrator.config.workProductRecallEnabled,
|
|
1049
|
+
query,
|
|
1050
|
+
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
1051
|
+
sessionKey: typeof options.sessionKey === "string" ? options.sessionKey : void 0
|
|
1052
|
+
});
|
|
1053
|
+
console.log(JSON.stringify(results, null, 2));
|
|
1054
|
+
console.log("OK");
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
|
|
712
1058
|
// src/training-export/converter.ts
|
|
713
1059
|
import { constants } from "fs";
|
|
714
1060
|
import { lstat, open, readdir, realpath } from "fs/promises";
|
|
@@ -3635,7 +3981,7 @@ function registerCli(api, orchestrator, registerOptions = {}) {
|
|
|
3635
3981
|
}
|
|
3636
3982
|
}
|
|
3637
3983
|
if (sourceArchive.endsWith(".enc")) {
|
|
3638
|
-
const { isEncryptedCapsuleFile } = await import("./capsule-crypto-
|
|
3984
|
+
const { isEncryptedCapsuleFile } = await import("./capsule-crypto-7FJQINUR.js");
|
|
3639
3985
|
const encDetected = await isEncryptedCapsuleFile(sourceArchive).catch(() => true);
|
|
3640
3986
|
if (encDetected) {
|
|
3641
3987
|
throw new Error(
|
|
@@ -3798,7 +4144,7 @@ function registerCli(api, orchestrator, registerOptions = {}) {
|
|
|
3798
4144
|
const { parseExportBundle } = await import("./transfer/types.js");
|
|
3799
4145
|
let decryptedBuf;
|
|
3800
4146
|
try {
|
|
3801
|
-
const { decryptCapsuleFileInMemory } = await import("./capsule-crypto-
|
|
4147
|
+
const { decryptCapsuleFileInMemory } = await import("./capsule-crypto-7FJQINUR.js");
|
|
3802
4148
|
decryptedBuf = await decryptCapsuleFileInMemory(archivePath, memoryDir);
|
|
3803
4149
|
} catch (decErr) {
|
|
3804
4150
|
const msg = decErr instanceof Error ? decErr.message : String(decErr);
|
|
@@ -4699,344 +5045,8 @@ ${doc.content}` : doc.content,
|
|
|
4699
5045
|
}
|
|
4700
5046
|
console.log("OK");
|
|
4701
5047
|
});
|
|
4702
|
-
cmd
|
|
4703
|
-
|
|
4704
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4705
|
-
objectiveStateStoreDir: orchestrator.config.objectiveStateStoreDir,
|
|
4706
|
-
objectiveStateMemoryEnabled: orchestrator.config.objectiveStateMemoryEnabled,
|
|
4707
|
-
objectiveStateSnapshotWritesEnabled: orchestrator.config.objectiveStateSnapshotWritesEnabled
|
|
4708
|
-
});
|
|
4709
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4710
|
-
console.log("OK");
|
|
4711
|
-
});
|
|
4712
|
-
cmd.command("causal-trajectory-status").description("Show causal-trajectory store status, record counts, and latest stored chain").action(async () => {
|
|
4713
|
-
const status = await runCausalTrajectoryStatusCliCommand({
|
|
4714
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4715
|
-
causalTrajectoryStoreDir: orchestrator.config.causalTrajectoryStoreDir,
|
|
4716
|
-
causalTrajectoryMemoryEnabled: orchestrator.config.causalTrajectoryMemoryEnabled
|
|
4717
|
-
});
|
|
4718
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4719
|
-
console.log("OK");
|
|
4720
|
-
});
|
|
4721
|
-
cmd.command("trust-zone-status").description("Show trust-zone store status, zoned record counts, and latest stored record").action(async () => {
|
|
4722
|
-
const status = await runTrustZoneStatusCliCommand({
|
|
4723
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4724
|
-
trustZoneStoreDir: orchestrator.config.trustZoneStoreDir,
|
|
4725
|
-
trustZonesEnabled: orchestrator.config.trustZonesEnabled,
|
|
4726
|
-
quarantinePromotionEnabled: orchestrator.config.quarantinePromotionEnabled,
|
|
4727
|
-
memoryPoisoningDefenseEnabled: orchestrator.config.memoryPoisoningDefenseEnabled
|
|
4728
|
-
});
|
|
4729
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4730
|
-
console.log("OK");
|
|
4731
|
-
});
|
|
4732
|
-
cmd.command("trust-zone-demo-seed").description("Explicitly seed an opt-in trust-zone demo dataset for buyer-facing walkthroughs").option("--scenario <scenario>", "Demo scenario id (default: enterprise-buyer-v1)").option("--recorded-at <isoTimestamp>", "Base ISO timestamp used to anchor demo records").option("--dry-run", "Preview the demo dataset without writing any trust-zone records").action(async (...args) => {
|
|
4733
|
-
const options = args[0] ?? {};
|
|
4734
|
-
const result = await runTrustZoneDemoSeedCliCommand({
|
|
4735
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4736
|
-
trustZoneStoreDir: orchestrator.config.trustZoneStoreDir,
|
|
4737
|
-
trustZonesEnabled: orchestrator.config.trustZonesEnabled,
|
|
4738
|
-
scenario: typeof options.scenario === "string" ? options.scenario : void 0,
|
|
4739
|
-
recordedAt: typeof options.recordedAt === "string" ? options.recordedAt : void 0,
|
|
4740
|
-
dryRun: options.dryRun === true
|
|
4741
|
-
});
|
|
4742
|
-
console.log(JSON.stringify(result, null, 2));
|
|
4743
|
-
console.log("OK");
|
|
4744
|
-
});
|
|
4745
|
-
cmd.command("abstraction-node-status").description("Show abstraction-node store status, abstraction counts, and latest stored node").action(async () => {
|
|
4746
|
-
const status = await runAbstractionNodeStatusCliCommand({
|
|
4747
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4748
|
-
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
4749
|
-
harmonicRetrievalEnabled: orchestrator.config.harmonicRetrievalEnabled,
|
|
4750
|
-
abstractionAnchorsEnabled: orchestrator.config.abstractionAnchorsEnabled
|
|
4751
|
-
});
|
|
4752
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4753
|
-
console.log("OK");
|
|
4754
|
-
});
|
|
4755
|
-
cmd.command("cue-anchor-status").description("Show cue-anchor index status, anchor counts, and the latest stored cue anchor").action(async () => {
|
|
4756
|
-
const status = await runCueAnchorStatusCliCommand({
|
|
4757
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4758
|
-
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
4759
|
-
harmonicRetrievalEnabled: orchestrator.config.harmonicRetrievalEnabled,
|
|
4760
|
-
abstractionAnchorsEnabled: orchestrator.config.abstractionAnchorsEnabled
|
|
4761
|
-
});
|
|
4762
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4763
|
-
console.log("OK");
|
|
4764
|
-
});
|
|
4765
|
-
cmd.command("harmonic-search").description("Preview harmonic retrieval blending over abstraction nodes and cue anchors").argument("<query>", "Prompt-like query to evaluate against harmonic retrieval storage").option("--max-results <count>", "Maximum number of blended results to return", "3").option("--session-key <sessionKey>", "Optional session key for same-session tie-breaking").action(async (...args) => {
|
|
4766
|
-
const query = typeof args[0] === "string" ? args[0] : "";
|
|
4767
|
-
const options = args[1] ?? {};
|
|
4768
|
-
const maxResults = typeof options.maxResults === "string" ? Number.parseInt(options.maxResults, 10) : 3;
|
|
4769
|
-
const results = await runHarmonicSearchCliCommand({
|
|
4770
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4771
|
-
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
4772
|
-
harmonicRetrievalEnabled: orchestrator.config.harmonicRetrievalEnabled,
|
|
4773
|
-
abstractionAnchorsEnabled: orchestrator.config.abstractionAnchorsEnabled,
|
|
4774
|
-
query,
|
|
4775
|
-
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
4776
|
-
sessionKey: typeof options.sessionKey === "string" ? options.sessionKey : void 0
|
|
4777
|
-
});
|
|
4778
|
-
console.log(JSON.stringify(results, null, 2));
|
|
4779
|
-
console.log("OK");
|
|
4780
|
-
});
|
|
4781
|
-
cmd.command("utility-status").description("Show utility-learning telemetry status, event counts, and the latest utility event").action(async () => {
|
|
4782
|
-
const status = await runUtilityTelemetryStatusCliCommand({
|
|
4783
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4784
|
-
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
4785
|
-
promotionByOutcomeEnabled: orchestrator.config.promotionByOutcomeEnabled
|
|
4786
|
-
});
|
|
4787
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4788
|
-
console.log("OK");
|
|
4789
|
-
});
|
|
4790
|
-
cmd.command("utility-record").description("Record a utility-learning telemetry event when utility learning is enabled").requiredOption("--event-id <eventId>", "Utility telemetry event id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the event").requiredOption("--session-key <sessionKey>", "Session key associated with the event").requiredOption("--source <source>", "Event source (cli|system|benchmark|tool_result)").requiredOption("--target <target>", "Telemetry target (promotion|ranking)").requiredOption("--decision <decision>", "Decision taken (promote|demote|hold|boost|suppress)").requiredOption("--outcome <outcome>", "Observed outcome (helpful|neutral|harmful)").requiredOption("--utility-score <utilityScore>", "Bounded utility score between -1 and 1").requiredOption("--summary <summary>", "Human-readable summary of the measured utility event").option("--memory-id <memoryId...>", "Memory ids linked to the utility event").option("--entity-ref <entityRef...>", "Entity refs linked to the utility event").option("--tag <tag...>", "Tags to attach to the utility event").action(async (...args) => {
|
|
4791
|
-
const options = args[0] ?? {};
|
|
4792
|
-
const utilityScore = typeof options.utilityScore === "string" ? Number.parseFloat(options.utilityScore) : Number.NaN;
|
|
4793
|
-
const filePath = await runUtilityTelemetryRecordCliCommand({
|
|
4794
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4795
|
-
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
4796
|
-
event: {
|
|
4797
|
-
schemaVersion: 1,
|
|
4798
|
-
eventId: String(options.eventId ?? ""),
|
|
4799
|
-
recordedAt: String(options.recordedAt ?? ""),
|
|
4800
|
-
sessionKey: String(options.sessionKey ?? ""),
|
|
4801
|
-
source: String(options.source ?? ""),
|
|
4802
|
-
target: String(options.target ?? ""),
|
|
4803
|
-
decision: String(options.decision ?? ""),
|
|
4804
|
-
outcome: String(options.outcome ?? ""),
|
|
4805
|
-
utilityScore,
|
|
4806
|
-
summary: String(options.summary ?? ""),
|
|
4807
|
-
memoryIds: Array.isArray(options.memoryId) ? options.memoryId.map(String) : void 0,
|
|
4808
|
-
entityRefs: Array.isArray(options.entityRef) ? options.entityRef.map(String) : void 0,
|
|
4809
|
-
tags: Array.isArray(options.tag) ? options.tag.map(String) : void 0
|
|
4810
|
-
}
|
|
4811
|
-
});
|
|
4812
|
-
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
4813
|
-
console.log("OK");
|
|
4814
|
-
});
|
|
4815
|
-
cmd.command("utility-learning-status").description("Show offline utility-learning snapshot status and learned weight counts").action(async () => {
|
|
4816
|
-
const status = await runUtilityLearningStatusCliCommand({
|
|
4817
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4818
|
-
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
4819
|
-
promotionByOutcomeEnabled: orchestrator.config.promotionByOutcomeEnabled
|
|
4820
|
-
});
|
|
4821
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4822
|
-
console.log("OK");
|
|
4823
|
-
});
|
|
4824
|
-
cmd.command("utility-learn").description("Learn bounded offline promotion/ranking weights from recorded utility telemetry").option("--window-days <days>", "Telemetry lookback window in days", "14").option("--min-event-count <count>", "Minimum event count required per target/decision group", "3").option("--max-weight-magnitude <value>", "Maximum absolute learned weight magnitude", "0.35").action(async (...args) => {
|
|
4825
|
-
const options = args[0] ?? {};
|
|
4826
|
-
const learningWindowDays = typeof options.windowDays === "string" ? Number.parseInt(options.windowDays, 10) : 14;
|
|
4827
|
-
const minEventCount = typeof options.minEventCount === "string" ? Number.parseInt(options.minEventCount, 10) : 3;
|
|
4828
|
-
const maxWeightMagnitude = typeof options.maxWeightMagnitude === "string" ? Number.parseFloat(options.maxWeightMagnitude) : 0.35;
|
|
4829
|
-
const result = await runUtilityLearningCliCommand({
|
|
4830
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4831
|
-
memoryUtilityLearningEnabled: orchestrator.config.memoryUtilityLearningEnabled,
|
|
4832
|
-
learningWindowDays,
|
|
4833
|
-
minEventCount,
|
|
4834
|
-
maxWeightMagnitude
|
|
4835
|
-
});
|
|
4836
|
-
console.log(JSON.stringify(result, null, 2));
|
|
4837
|
-
console.log("OK");
|
|
4838
|
-
});
|
|
4839
|
-
cmd.command("resume-bundle-status").description("Show resume bundle status, bundle counts, and the latest recorded handoff bundle").action(async () => {
|
|
4840
|
-
const status = await runResumeBundleStatusCliCommand({
|
|
4841
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4842
|
-
resumeBundleDir: orchestrator.config.resumeBundleDir,
|
|
4843
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
4844
|
-
resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled
|
|
4845
|
-
});
|
|
4846
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4847
|
-
console.log("OK");
|
|
4848
|
-
});
|
|
4849
|
-
cmd.command("resume-bundle-record").description("Record an explicit resume bundle when creation-memory handoff bundles are enabled").requiredOption("--bundle-id <bundleId>", "Resume bundle id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the bundle").requiredOption("--session-key <sessionKey>", "Session key that owns the bundle").requiredOption("--source <source>", "Bundle source (tool_result|cli|system|manual)").requiredOption("--scope <scope>", "Primary scope or recovery domain for the bundle").requiredOption("--summary <summary>", "Human-readable summary of what this bundle preserves").option("--key-fact <keyFact...>", "Short facts that a resumed agent should retain").option("--next-action <nextAction...>", "Explicit next actions for the resumed agent").option("--risk-flag <riskFlag...>", "Open risks or cautions attached to the bundle").option(
|
|
4850
|
-
"--objective-state-snapshot-ref <objectiveStateSnapshotRef...>",
|
|
4851
|
-
"Objective-state snapshot refs attached to the bundle"
|
|
4852
|
-
).option(
|
|
4853
|
-
"--work-product-entry-ref <workProductEntryRef...>",
|
|
4854
|
-
"Work-product ledger refs attached to the bundle"
|
|
4855
|
-
).option(
|
|
4856
|
-
"--commitment-entry-ref <commitmentEntryRef...>",
|
|
4857
|
-
"Commitment ledger refs attached to the bundle"
|
|
4858
|
-
).action(async (...args) => {
|
|
4859
|
-
const options = args[0] ?? {};
|
|
4860
|
-
const filePath = await runResumeBundleRecordCliCommand({
|
|
4861
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4862
|
-
resumeBundleDir: orchestrator.config.resumeBundleDir,
|
|
4863
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
4864
|
-
resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled,
|
|
4865
|
-
bundle: {
|
|
4866
|
-
schemaVersion: 1,
|
|
4867
|
-
bundleId: String(options.bundleId ?? ""),
|
|
4868
|
-
recordedAt: String(options.recordedAt ?? ""),
|
|
4869
|
-
sessionKey: String(options.sessionKey ?? ""),
|
|
4870
|
-
source: String(options.source ?? ""),
|
|
4871
|
-
scope: String(options.scope ?? ""),
|
|
4872
|
-
summary: String(options.summary ?? ""),
|
|
4873
|
-
keyFacts: Array.isArray(options.keyFact) ? options.keyFact.map(String) : void 0,
|
|
4874
|
-
nextActions: Array.isArray(options.nextAction) ? options.nextAction.map(String) : void 0,
|
|
4875
|
-
riskFlags: Array.isArray(options.riskFlag) ? options.riskFlag.map(String) : void 0,
|
|
4876
|
-
objectiveStateSnapshotRefs: Array.isArray(options.objectiveStateSnapshotRef) ? options.objectiveStateSnapshotRef.map(String) : void 0,
|
|
4877
|
-
workProductEntryRefs: Array.isArray(options.workProductEntryRef) ? options.workProductEntryRef.map(String) : void 0,
|
|
4878
|
-
commitmentEntryRefs: Array.isArray(options.commitmentEntryRef) ? options.commitmentEntryRef.map(String) : void 0
|
|
4879
|
-
}
|
|
4880
|
-
});
|
|
4881
|
-
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
4882
|
-
console.log("OK");
|
|
4883
|
-
});
|
|
4884
|
-
cmd.command("resume-bundle-build").description("Build and persist a resume bundle from transcript recovery, objective state, work products, and open commitments").requiredOption("--bundle-id <bundleId>", "Resume bundle id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the bundle").requiredOption("--session-key <sessionKey>", "Session key that owns the bundle").requiredOption("--scope <scope>", "Primary scope or recovery domain for the bundle").action(async (...args) => {
|
|
4885
|
-
const options = args[0] ?? {};
|
|
4886
|
-
const built = await runResumeBundleBuildCliCommand({
|
|
4887
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4888
|
-
resumeBundleDir: orchestrator.config.resumeBundleDir,
|
|
4889
|
-
objectiveStateStoreDir: orchestrator.config.objectiveStateStoreDir,
|
|
4890
|
-
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
4891
|
-
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
4892
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
4893
|
-
resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled,
|
|
4894
|
-
transcriptEnabled: orchestrator.config.transcriptEnabled,
|
|
4895
|
-
objectiveStateMemoryEnabled: orchestrator.config.objectiveStateMemoryEnabled,
|
|
4896
|
-
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
4897
|
-
bundleId: String(options.bundleId ?? ""),
|
|
4898
|
-
recordedAt: String(options.recordedAt ?? ""),
|
|
4899
|
-
sessionKey: String(options.sessionKey ?? ""),
|
|
4900
|
-
scope: String(options.scope ?? "")
|
|
4901
|
-
});
|
|
4902
|
-
console.log(JSON.stringify({
|
|
4903
|
-
wrote: built !== null,
|
|
4904
|
-
filePath: built?.filePath ?? null,
|
|
4905
|
-
bundle: built?.bundle ?? null
|
|
4906
|
-
}, null, 2));
|
|
4907
|
-
console.log("OK");
|
|
4908
|
-
});
|
|
4909
|
-
cmd.command("commitment-status").description("Show commitment ledger status, entry counts, and the latest recorded commitment").action(async () => {
|
|
4910
|
-
const status = await runCommitmentStatusCliCommand({
|
|
4911
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4912
|
-
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
4913
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
4914
|
-
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
4915
|
-
commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
|
|
4916
|
-
commitmentStaleDays: orchestrator.config.commitmentStaleDays,
|
|
4917
|
-
commitmentDecayDays: orchestrator.config.commitmentDecayDays
|
|
4918
|
-
});
|
|
4919
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4920
|
-
console.log("OK");
|
|
4921
|
-
});
|
|
4922
|
-
cmd.command("commitment-record").description("Record a commitment ledger entry when commitment memory is enabled").requiredOption("--entry-id <entryId>", "Commitment entry id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the entry").requiredOption("--session-key <sessionKey>", "Session key that owns the commitment").requiredOption("--source <source>", "Entry source (tool_result|cli|system|manual)").requiredOption("--kind <kind>", "Entry kind (promise|follow_up|deadline|deliverable)").requiredOption("--state <state>", "Entry state (open|fulfilled|cancelled|expired)").requiredOption("--scope <scope>", "Primary scope or identifier for the commitment").requiredOption("--summary <summary>", "Human-readable summary of the commitment").option("--due-at <dueAt>", "Optional due timestamp for the commitment").option("--tag <tag...>", "Tags to attach to the commitment entry").option("--entity-ref <entityRef...>", "Entity refs to attach to the commitment entry").option(
|
|
4923
|
-
"--work-product-entry-ref <workProductEntryRef...>",
|
|
4924
|
-
"Work-product ledger refs that this commitment depends on"
|
|
4925
|
-
).option(
|
|
4926
|
-
"--objective-state-snapshot-ref <objectiveStateSnapshotRef...>",
|
|
4927
|
-
"Objective-state snapshot refs to link to this commitment"
|
|
4928
|
-
).action(async (...args) => {
|
|
4929
|
-
const options = args[0] ?? {};
|
|
4930
|
-
const filePath = await runCommitmentRecordCliCommand({
|
|
4931
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4932
|
-
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
4933
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
4934
|
-
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
4935
|
-
entry: {
|
|
4936
|
-
schemaVersion: 1,
|
|
4937
|
-
entryId: String(options.entryId ?? ""),
|
|
4938
|
-
recordedAt: String(options.recordedAt ?? ""),
|
|
4939
|
-
sessionKey: String(options.sessionKey ?? ""),
|
|
4940
|
-
source: String(options.source ?? ""),
|
|
4941
|
-
kind: String(options.kind ?? ""),
|
|
4942
|
-
state: String(options.state ?? ""),
|
|
4943
|
-
scope: String(options.scope ?? ""),
|
|
4944
|
-
summary: String(options.summary ?? ""),
|
|
4945
|
-
dueAt: typeof options.dueAt === "string" ? options.dueAt : void 0,
|
|
4946
|
-
tags: Array.isArray(options.tag) ? options.tag.map(String) : void 0,
|
|
4947
|
-
entityRefs: Array.isArray(options.entityRef) ? options.entityRef.map(String) : void 0,
|
|
4948
|
-
workProductEntryRefs: Array.isArray(options.workProductEntryRef) ? options.workProductEntryRef.map(String) : void 0,
|
|
4949
|
-
objectiveStateSnapshotRefs: Array.isArray(options.objectiveStateSnapshotRef) ? options.objectiveStateSnapshotRef.map(String) : void 0
|
|
4950
|
-
}
|
|
4951
|
-
});
|
|
4952
|
-
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
4953
|
-
console.log("OK");
|
|
4954
|
-
});
|
|
4955
|
-
cmd.command("commitment-set-state").description("Transition an existing commitment ledger entry when commitment lifecycle is enabled").requiredOption("--entry-id <entryId>", "Commitment entry id").requiredOption("--state <state>", "Next state (open|fulfilled|cancelled|expired)").requiredOption("--changed-at <changedAt>", "ISO timestamp for the lifecycle transition").action(async (...args) => {
|
|
4956
|
-
const options = args[0] ?? {};
|
|
4957
|
-
const entry = await runCommitmentSetStateCliCommand({
|
|
4958
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4959
|
-
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
4960
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
4961
|
-
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
4962
|
-
commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
|
|
4963
|
-
entryId: String(options.entryId ?? ""),
|
|
4964
|
-
nextState: String(options.state ?? ""),
|
|
4965
|
-
changedAt: String(options.changedAt ?? "")
|
|
4966
|
-
});
|
|
4967
|
-
console.log(JSON.stringify({ updated: entry !== null, entry }, null, 2));
|
|
4968
|
-
console.log("OK");
|
|
4969
|
-
});
|
|
4970
|
-
cmd.command("commitment-lifecycle-run").description("Apply overdue-expiry and resolved-entry cleanup to the commitment ledger").option("--now <now>", "Override the lifecycle timestamp for testing or backfills").action(async (...args) => {
|
|
4971
|
-
const options = args[0] ?? {};
|
|
4972
|
-
const result = await runCommitmentLifecycleCliCommand({
|
|
4973
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4974
|
-
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
4975
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
4976
|
-
commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
|
|
4977
|
-
commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
|
|
4978
|
-
commitmentDecayDays: orchestrator.config.commitmentDecayDays,
|
|
4979
|
-
now: typeof options.now === "string" ? options.now : void 0
|
|
4980
|
-
});
|
|
4981
|
-
console.log(JSON.stringify({ applied: result !== null, result }, null, 2));
|
|
4982
|
-
console.log("OK");
|
|
4983
|
-
});
|
|
4984
|
-
cmd.command("work-product-status").description("Show work-product ledger status, entry counts, and the latest recorded work product").action(async () => {
|
|
4985
|
-
const status = await runWorkProductStatusCliCommand({
|
|
4986
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
4987
|
-
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
4988
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled
|
|
4989
|
-
});
|
|
4990
|
-
console.log(JSON.stringify(status, null, 2));
|
|
4991
|
-
console.log("OK");
|
|
4992
|
-
});
|
|
4993
|
-
cmd.command("work-product-record").description("Record a work-product ledger entry when creation-memory is enabled").requiredOption("--entry-id <entryId>", "Ledger entry id").requiredOption("--recorded-at <recordedAt>", "ISO timestamp for the entry").requiredOption("--session-key <sessionKey>", "Session key that created the work product").requiredOption("--source <source>", "Entry source (tool_result|cli|system|manual)").requiredOption("--kind <kind>", "Entry kind (artifact|file|record|report|workspace)").requiredOption(
|
|
4994
|
-
"--entry-action <entryAction>",
|
|
4995
|
-
"Entry action (created|updated|deleted|referenced|published)"
|
|
4996
|
-
).requiredOption("--scope <scope>", "Primary scope or identifier for the created work product").requiredOption("--summary <summary>", "Human-readable summary of the work product").option("--artifact-path <artifactPath>", "Optional path to the created artifact").option("--tag <tag...>", "Tags to attach to the work-product entry").option("--entity-ref <entityRef...>", "Entity refs to attach to the work-product entry").option(
|
|
4997
|
-
"--objective-state-snapshot-ref <objectiveStateSnapshotRef...>",
|
|
4998
|
-
"Objective-state snapshot refs to link to this work product"
|
|
4999
|
-
).action(async (...args) => {
|
|
5000
|
-
const options = args[0] ?? {};
|
|
5001
|
-
const filePath = await runWorkProductRecordCliCommand({
|
|
5002
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
5003
|
-
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
5004
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
5005
|
-
entry: {
|
|
5006
|
-
schemaVersion: 1,
|
|
5007
|
-
entryId: String(options.entryId ?? ""),
|
|
5008
|
-
recordedAt: String(options.recordedAt ?? ""),
|
|
5009
|
-
sessionKey: String(options.sessionKey ?? ""),
|
|
5010
|
-
source: String(options.source ?? ""),
|
|
5011
|
-
kind: String(options.kind ?? ""),
|
|
5012
|
-
action: String(options.entryAction ?? ""),
|
|
5013
|
-
scope: String(options.scope ?? ""),
|
|
5014
|
-
summary: String(options.summary ?? ""),
|
|
5015
|
-
artifactPath: typeof options.artifactPath === "string" ? options.artifactPath : void 0,
|
|
5016
|
-
tags: Array.isArray(options.tag) ? options.tag.map(String) : void 0,
|
|
5017
|
-
entityRefs: Array.isArray(options.entityRef) ? options.entityRef.map(String) : void 0,
|
|
5018
|
-
objectiveStateSnapshotRefs: Array.isArray(options.objectiveStateSnapshotRef) ? options.objectiveStateSnapshotRef.map(String) : void 0
|
|
5019
|
-
}
|
|
5020
|
-
});
|
|
5021
|
-
console.log(JSON.stringify({ wrote: filePath !== null, filePath }, null, 2));
|
|
5022
|
-
console.log("OK");
|
|
5023
|
-
});
|
|
5024
|
-
cmd.command("work-product-recall-search").description("Preview work-product recovery candidates when creation-memory recall is enabled").argument("<query>", "Prompt-like query to evaluate against the work-product ledger").option("--max-results <count>", "Maximum number of work-product results to return", "3").option("--session-key <sessionKey>", "Optional session key to boost same-session work products").action(async (...args) => {
|
|
5025
|
-
const query = typeof args[0] === "string" ? args[0] : "";
|
|
5026
|
-
const options = args[1] ?? {};
|
|
5027
|
-
const maxResults = typeof options.maxResults === "string" ? Number.parseInt(options.maxResults, 10) : 3;
|
|
5028
|
-
const results = await runWorkProductRecallSearchCliCommand({
|
|
5029
|
-
memoryDir: orchestrator.config.memoryDir,
|
|
5030
|
-
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
5031
|
-
creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
|
|
5032
|
-
workProductRecallEnabled: orchestrator.config.workProductRecallEnabled,
|
|
5033
|
-
query,
|
|
5034
|
-
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
5035
|
-
sessionKey: typeof options.sessionKey === "string" ? options.sessionKey : void 0
|
|
5036
|
-
});
|
|
5037
|
-
console.log(JSON.stringify(results, null, 2));
|
|
5038
|
-
console.log("OK");
|
|
5039
|
-
});
|
|
5048
|
+
registerResearchStatusCommands(cmd, orchestrator);
|
|
5049
|
+
registerCreationLedgerCommands(cmd, orchestrator);
|
|
5040
5050
|
cmd.command("trust-zone-promote").description("Dry-run or apply a trust-zone promotion with provenance enforcement").requiredOption("--record-id <recordId>", "Source trust-zone record id").requiredOption("--target-zone <targetZone>", "Promotion target zone (working|trusted)").requiredOption("--reason <reason>", "Human-readable promotion reason").option("--recorded-at <isoTimestamp>", "Promotion timestamp (defaults to now)").option("--summary <summary>", "Optional replacement summary for the promoted record").option("--dry-run", "Show the promotion plan without writing the promoted record").action(async (...args) => {
|
|
5041
5051
|
const options = args[0] ?? {};
|
|
5042
5052
|
const result = await runTrustZonePromoteCliCommand({
|
|
@@ -7146,7 +7156,7 @@ Legacy identity-anchor files are untouched. Verify the migration result`);
|
|
|
7146
7156
|
}
|
|
7147
7157
|
if (typeof options.trace === "string" && options.trace.length > 0) {
|
|
7148
7158
|
const { replayTrace, parseSpeedFlag } = await import("./trace-ZFVRH4GO.js");
|
|
7149
|
-
const { expandTildePath: expandTildePath2 } = await import("./path
|
|
7159
|
+
const { expandTildePath: expandTildePath2 } = await import("./utils/path.js");
|
|
7150
7160
|
const tracePath = expandTildePath2(options.trace);
|
|
7151
7161
|
let speed;
|
|
7152
7162
|
try {
|
|
@@ -7177,7 +7187,7 @@ Legacy identity-anchor files are untouched. Verify the migration result`);
|
|
|
7177
7187
|
let recorder = null;
|
|
7178
7188
|
if (typeof options.recordTrace === "string" && options.recordTrace.length > 0) {
|
|
7179
7189
|
const { openTraceRecorder } = await import("./trace-ZFVRH4GO.js");
|
|
7180
|
-
const { expandTildePath: expandTildePath2 } = await import("./path
|
|
7190
|
+
const { expandTildePath: expandTildePath2 } = await import("./utils/path.js");
|
|
7181
7191
|
recorder = await openTraceRecorder(
|
|
7182
7192
|
expandTildePath2(options.recordTrace)
|
|
7183
7193
|
);
|
|
@@ -7328,4 +7338,4 @@ export {
|
|
|
7328
7338
|
listMemoryMarkdownFilePaths,
|
|
7329
7339
|
registerCli
|
|
7330
7340
|
};
|
|
7331
|
-
//# sourceMappingURL=chunk-
|
|
7341
|
+
//# sourceMappingURL=chunk-7L54YZUI.js.map
|