@remnic/core 9.3.733 → 9.3.735
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 +13 -11
- package/dist/access-boundary.js +9 -9
- package/dist/access-cli.js +26 -24
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +13 -11
- package/dist/access-http.js +14 -14
- package/dist/access-mcp.d.ts +13 -11
- package/dist/access-mcp.js +13 -13
- package/dist/access-operations-batch.js +11 -11
- package/dist/access-operations.d.ts +13 -11
- package/dist/access-operations.js +12 -12
- package/dist/access-schema.d.ts +4 -4
- package/dist/{access-service-Byoe3HsT.d.ts → access-service-CVx7mmvK.d.ts} +4 -4
- package/dist/access-service.d.ts +13 -11
- package/dist/access-service.js +8 -8
- package/dist/access-surface-catalog.d.ts +13 -11
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-memory-bridge.js +3 -2
- package/dist/active-recall.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 +12 -10
- package/dist/briefing.d.ts +1 -1
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +196 -2
- package/dist/capabilities.js +21 -3
- package/dist/{catalog-DM1nk7cM.d.ts → catalog-BVhDEUhT.d.ts} +2 -2
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-CX77GNMB.js → chunk-2T2N7ISV.js} +6 -3
- package/dist/chunk-2T2N7ISV.js.map +1 -0
- package/dist/{chunk-HHNSLPX7.js → chunk-5BOQNB2K.js} +10 -9
- package/dist/chunk-5BOQNB2K.js.map +1 -0
- package/dist/{chunk-QZHF4BWN.js → chunk-AAIHDIMD.js} +6 -6
- package/dist/{chunk-H3MB3F62.js → chunk-AB2E5DCN.js} +4 -3
- package/dist/chunk-AB2E5DCN.js.map +1 -0
- package/dist/{chunk-KSJCXXOU.js → chunk-AE7NTZ75.js} +6 -3
- package/dist/chunk-AE7NTZ75.js.map +1 -0
- package/dist/{chunk-OTQE66IX.js → chunk-AESC5OQJ.js} +6 -3
- package/dist/chunk-AESC5OQJ.js.map +1 -0
- package/dist/{chunk-FFUCCKPN.js → chunk-BXPG5AVX.js} +10 -7
- package/dist/chunk-BXPG5AVX.js.map +1 -0
- package/dist/{chunk-P3VJCTVE.js → chunk-CHJIWG2H.js} +4 -3
- package/dist/chunk-CHJIWG2H.js.map +1 -0
- package/dist/{chunk-FYWUNVFZ.js → chunk-E4LYJ7PY.js} +6 -6
- package/dist/{chunk-NIZQH6AU.js → chunk-FF36YNKY.js} +8 -7
- package/dist/chunk-FF36YNKY.js.map +1 -0
- package/dist/{chunk-OUITHS6V.js → chunk-FLCYY5JX.js} +801 -711
- package/dist/chunk-FLCYY5JX.js.map +1 -0
- package/dist/{chunk-PLBIPT6I.js → chunk-FLPKEMSO.js} +7 -4
- package/dist/chunk-FLPKEMSO.js.map +1 -0
- package/dist/{chunk-6TUWSUUD.js → chunk-G54IDCD3.js} +59 -53
- package/dist/chunk-G54IDCD3.js.map +1 -0
- package/dist/{chunk-J6BH2OBA.js → chunk-GB2FZOWB.js} +8 -5
- package/dist/chunk-GB2FZOWB.js.map +1 -0
- package/dist/{chunk-CGPHMNL4.js → chunk-GYICIICQ.js} +10 -6
- package/dist/chunk-GYICIICQ.js.map +1 -0
- package/dist/{chunk-DKT3X5C3.js → chunk-HFXZIF3V.js} +7 -4
- package/dist/chunk-HFXZIF3V.js.map +1 -0
- package/dist/{chunk-646B5ERJ.js → chunk-HLPYL6LC.js} +71 -65
- package/dist/chunk-HLPYL6LC.js.map +1 -0
- package/dist/{chunk-ZVHRSR2R.js → chunk-IPI45Q4S.js} +6 -3
- package/dist/chunk-IPI45Q4S.js.map +1 -0
- package/dist/{chunk-24D66MMN.js → chunk-IX4L7E5G.js} +7 -4
- package/dist/chunk-IX4L7E5G.js.map +1 -0
- package/dist/{chunk-SYX73XD7.js → chunk-IXGXALRV.js} +10 -7
- package/dist/chunk-IXGXALRV.js.map +1 -0
- package/dist/{chunk-ESF7TRYJ.js → chunk-JWDE7OVJ.js} +79 -2
- package/dist/chunk-JWDE7OVJ.js.map +1 -0
- package/dist/{chunk-GGL34GCW.js → chunk-K3Y2SJTN.js} +7 -4
- package/dist/chunk-K3Y2SJTN.js.map +1 -0
- package/dist/{chunk-PMAQRUN4.js → chunk-NDKW67ER.js} +5 -2
- package/dist/chunk-NDKW67ER.js.map +1 -0
- package/dist/{chunk-ZQUAVZNG.js → chunk-NNJKEAP2.js} +7 -4
- package/dist/chunk-NNJKEAP2.js.map +1 -0
- package/dist/{chunk-UZYLX7M6.js → chunk-OYHYBHHI.js} +9 -6
- package/dist/chunk-OYHYBHHI.js.map +1 -0
- package/dist/{chunk-NOU77OHX.js → chunk-P6VLG7KE.js} +2 -2
- package/dist/{chunk-O4ZIBPIW.js → chunk-QNTLWH3T.js} +3 -3
- package/dist/{chunk-LUCARK4W.js → chunk-UO6MPN77.js} +37 -35
- package/dist/chunk-UO6MPN77.js.map +1 -0
- package/dist/{chunk-HJWQJUKQ.js → chunk-VOEVVIP3.js} +3 -3
- package/dist/{chunk-KQYGNGON.js → chunk-ZBZ4XULO.js} +6 -3
- package/dist/chunk-ZBZ4XULO.js.map +1 -0
- package/dist/{cli-Dt-tuiYH.d.ts → cli-Cx5Mxwk7.d.ts} +3 -3
- package/dist/cli.d.ts +14 -12
- package/dist/cli.js +20 -20
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +2 -1
- 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.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/consolidation-provenance-check.d.ts +1 -1
- package/dist/consolidation-undo.d.ts +1 -1
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/contradiction/index.js +2 -1
- package/dist/{contradiction-scan-HWGEOUDS.js → contradiction-scan-2B4AE4TI.js} +3 -2
- 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/day-summary.d.ts +1 -1
- package/dist/delinearize.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/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +1 -1
- package/dist/entity-retrieval.js +2 -1
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +12 -10
- package/dist/explicit-capture.js +2 -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.d.ts +1 -1
- package/dist/extraction.js +3 -3
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-OOR57AYR.js → first-start-migration-2RQYDIZ7.js} +10 -8
- package/dist/first-start-migration-2RQYDIZ7.js.map +1 -0
- 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-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.js +44 -44
- 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-llm.js +2 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/mcp-memory-inspector-app.d.ts +13 -11
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- 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-worth-outcomes.d.ts +1 -1
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +2 -2
- package/dist/namespaces/migrate.js +6 -6
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/principal.js +2 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +2 -2
- package/dist/namespaces/storage.js +2 -1
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +11 -11
- package/dist/orchestration/compression-guideline-coordinator.d.ts +1 -1
- package/dist/orchestration/compression-guideline-coordinator.js +2 -1
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +6 -5
- package/dist/{orchestrator-B4KjaOtY.d.ts → orchestrator-oF0cceBX.d.ts} +143 -18
- package/dist/orchestrator.d.ts +8 -6
- package/dist/orchestrator.js +21 -19
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.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-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-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/resolve-auth-token.d.ts +1 -1
- package/dist/retrieval-agents.d.ts +1 -1
- 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/schemas.d.ts +2 -2
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/embed-helper.js +2 -2
- 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-SLAa_prH.d.ts → semantic-DJR8_DMQ.d.ts} +1 -1
- package/dist/{semantic-consolidation-CstTvHPo.d.ts → semantic-consolidation-DKGbufYO.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-rule-verifier.d.ts +1 -1
- 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 +3 -3
- package/dist/signal.d.ts +1 -1
- package/dist/storage.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +3 -2
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.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 +1 -1
- package/dist/tier-routing.d.ts +1 -1
- package/dist/{tier-stats-3LYQ3VV5.js → tier-stats-KPDIISG7.js} +8 -4
- package/dist/tier-stats-KPDIISG7.js.map +1 -0
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/types.d.ts +30 -30
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-VkxElCHR.d.ts → types-C7UCxpuO.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-service.ts +61 -56
- package/src/active-memory-bridge.ts +2 -1
- package/src/admin/admin-surfaces.ts +2 -1
- package/src/capabilities.test.ts +375 -0
- package/src/capabilities.ts +403 -0
- package/src/cli/creation-ledger-commands.ts +2 -2
- package/src/cli/research-status-commands.ts +13 -13
- package/src/cli.ts +29 -25
- package/src/compounding/engine.ts +4 -3
- package/src/contradiction/contradiction-scan.ts +4 -3
- package/src/embedding-fallback.ts +5 -2
- package/src/entity-retrieval.ts +3 -2
- package/src/explicit-capture.ts +2 -1
- package/src/extraction.ts +6 -3
- package/src/local-llm.ts +4 -3
- package/src/maintenance/first-start-migration.ts +8 -5
- package/src/maintenance/namespace-maintenance-fanout.ts +2 -1
- package/src/maintenance/namespace-planner.ts +4 -3
- package/src/maintenance/tier-stats.ts +4 -3
- package/src/namespaces/catalog.ts +2 -1
- package/src/namespaces/migrate.ts +2 -1
- package/src/namespaces/principal.ts +6 -5
- package/src/namespaces/scope-profiles.ts +2 -1
- package/src/namespaces/search.ts +2 -1
- package/src/namespaces/storage.ts +4 -3
- package/src/operator-toolkit.ts +27 -26
- package/src/orchestration/compression-guideline-coordinator.ts +7 -6
- package/src/orchestration/lifecycle-policy-coordinator.ts +504 -0
- package/src/orchestration/maintenance.ts +8 -4
- package/src/orchestration/semantic-consolidation-coordinator.ts +454 -0
- package/src/orchestration/tier-migration-coordinator.ts +5 -4
- package/src/orchestrator.ts +106 -800
- package/src/scopes/scope-plan.ts +3 -2
- package/src/search/embed-helper.ts +5 -2
- package/src/search/factory.ts +9 -6
- package/src/summarizer.ts +3 -2
- package/dist/chunk-24D66MMN.js.map +0 -1
- package/dist/chunk-646B5ERJ.js.map +0 -1
- package/dist/chunk-6TUWSUUD.js.map +0 -1
- package/dist/chunk-CGPHMNL4.js.map +0 -1
- package/dist/chunk-CX77GNMB.js.map +0 -1
- package/dist/chunk-DKT3X5C3.js.map +0 -1
- package/dist/chunk-ESF7TRYJ.js.map +0 -1
- package/dist/chunk-FFUCCKPN.js.map +0 -1
- package/dist/chunk-GGL34GCW.js.map +0 -1
- package/dist/chunk-H3MB3F62.js.map +0 -1
- package/dist/chunk-HHNSLPX7.js.map +0 -1
- package/dist/chunk-J6BH2OBA.js.map +0 -1
- package/dist/chunk-KQYGNGON.js.map +0 -1
- package/dist/chunk-KSJCXXOU.js.map +0 -1
- package/dist/chunk-LUCARK4W.js.map +0 -1
- package/dist/chunk-NIZQH6AU.js.map +0 -1
- package/dist/chunk-OTQE66IX.js.map +0 -1
- package/dist/chunk-OUITHS6V.js.map +0 -1
- package/dist/chunk-P3VJCTVE.js.map +0 -1
- package/dist/chunk-PLBIPT6I.js.map +0 -1
- package/dist/chunk-PMAQRUN4.js.map +0 -1
- package/dist/chunk-SYX73XD7.js.map +0 -1
- package/dist/chunk-UZYLX7M6.js.map +0 -1
- package/dist/chunk-ZQUAVZNG.js.map +0 -1
- package/dist/chunk-ZVHRSR2R.js.map +0 -1
- package/dist/first-start-migration-OOR57AYR.js.map +0 -1
- package/dist/tier-stats-3LYQ3VV5.js.map +0 -1
- /package/dist/{chunk-QZHF4BWN.js.map → chunk-AAIHDIMD.js.map} +0 -0
- /package/dist/{chunk-FYWUNVFZ.js.map → chunk-E4LYJ7PY.js.map} +0 -0
- /package/dist/{chunk-NOU77OHX.js.map → chunk-P6VLG7KE.js.map} +0 -0
- /package/dist/{chunk-O4ZIBPIW.js.map → chunk-QNTLWH3T.js.map} +0 -0
- /package/dist/{chunk-HJWQJUKQ.js.map → chunk-VOEVVIP3.js.map} +0 -0
- /package/dist/{contradiction-scan-HWGEOUDS.js.map → contradiction-scan-2B4AE4TI.js.map} +0 -0
package/src/capabilities.ts
CHANGED
|
@@ -404,3 +404,406 @@ export function resolveCreationMemoryCapabilities(
|
|
|
404
404
|
commitmentLifecycle: config.commitmentLifecycleEnabled,
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
+
|
|
408
|
+
// ---------------------------------------------------------------------------
|
|
409
|
+
// Namespace capability set (issue #1523 batch 5).
|
|
410
|
+
//
|
|
411
|
+
// `namespacesEnabled` is the single most-scattered config flag in the codebase
|
|
412
|
+
// (101 read sites outside config.ts across 18 files — orchestrator, access-service,
|
|
413
|
+
// namespace modules, maintenance, CLI, admin). It gates whether the multi-namespace
|
|
414
|
+
// system is active at all: every namespace resolution, storage path, recall budget,
|
|
415
|
+
// and maintenance fanout checks it. Like the other projections above it gets its own
|
|
416
|
+
// resolver invoked ONCE per operation entry rather than re-derived at each site.
|
|
417
|
+
//
|
|
418
|
+
// The field is a non-optional boolean in PluginConfig, so no coercion is needed.
|
|
419
|
+
// ---------------------------------------------------------------------------
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Frozen projection of namespace feature gates (issue #1523 batch 5).
|
|
423
|
+
*
|
|
424
|
+
* Every field is `readonly boolean`. Composition lives ONLY in
|
|
425
|
+
* {@link resolveNamespaceCapabilities}.
|
|
426
|
+
*/
|
|
427
|
+
export interface NamespaceCapabilitySet {
|
|
428
|
+
/** `namespacesEnabled` — multi-namespace system master switch. */
|
|
429
|
+
readonly namespaces: boolean;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Config projection consumed by {@link resolveNamespaceCapabilities}.
|
|
434
|
+
*/
|
|
435
|
+
export type NamespaceConfigProjection = Pick<PluginConfig, "namespacesEnabled">;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Resolve the {@link NamespaceCapabilitySet} from parsed config.
|
|
439
|
+
*
|
|
440
|
+
* Call this ONCE at operation entry and thread the result down. The flag is a
|
|
441
|
+
* non-optional boolean so the projection is a pure pass-through.
|
|
442
|
+
*/
|
|
443
|
+
export function resolveNamespaceCapabilities(
|
|
444
|
+
config: NamespaceConfigProjection,
|
|
445
|
+
): NamespaceCapabilitySet {
|
|
446
|
+
return Object.freeze({
|
|
447
|
+
namespaces: config.namespacesEnabled,
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// ---------------------------------------------------------------------------
|
|
452
|
+
// QMD capability set (issue #1523 batch 6).
|
|
453
|
+
//
|
|
454
|
+
// The twelve QMD (query-managed database) flags are the largest remaining
|
|
455
|
+
// scattered cluster after batch 5. They gate every aspect of the tiered
|
|
456
|
+
// memory system: master switch, tier migration, cold tier, daemon, auto-embed,
|
|
457
|
+
// maintenance, query rerank, intent hints, explain, auto-upgrade, and parity
|
|
458
|
+
// graph. Read sites span orchestrator, operator-toolkit, access-service, and
|
|
459
|
+
// search/factory. All flags are non-optional booleans on PluginConfig (defaults
|
|
460
|
+
// resolved at the parse boundary), so the projection is pure pass-through.
|
|
461
|
+
// ---------------------------------------------------------------------------
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Frozen projection of QMD feature gates (issue #1523 batch 6).
|
|
465
|
+
*
|
|
466
|
+
* Every field is `readonly boolean`. Composition lives ONLY in
|
|
467
|
+
* {@link resolveQmdCapabilities}.
|
|
468
|
+
*/
|
|
469
|
+
export interface QmdCapabilitySet {
|
|
470
|
+
/** `qmdEnabled` — QMD tiered-memory master switch. */
|
|
471
|
+
readonly qmd: boolean;
|
|
472
|
+
/** `qmdTierMigrationEnabled` — automatic tier promotion/demotion. */
|
|
473
|
+
readonly qmdTierMigration: boolean;
|
|
474
|
+
/** `qmdTierAutoBackfillEnabled` — backfill stale tier entries. */
|
|
475
|
+
readonly qmdTierAutoBackfill: boolean;
|
|
476
|
+
/** `qmdAutoEmbedEnabled` — auto-embed documents on write. */
|
|
477
|
+
readonly qmdAutoEmbed: boolean;
|
|
478
|
+
/** `qmdMaintenanceEnabled` — QMD maintenance pass runner. */
|
|
479
|
+
readonly qmdMaintenance: boolean;
|
|
480
|
+
/** `qmdColdTierEnabled` — cold-tier storage. */
|
|
481
|
+
readonly qmdColdTier: boolean;
|
|
482
|
+
/** `qmdDaemonEnabled` — background QMD daemon. */
|
|
483
|
+
readonly qmdDaemon: boolean;
|
|
484
|
+
/** `qmdTierParityGraphEnabled` — tier parity graph. */
|
|
485
|
+
readonly qmdTierParityGraph: boolean;
|
|
486
|
+
/** `qmdQueryRerankEnabled` — QMD query reranking. */
|
|
487
|
+
readonly qmdQueryRerank: boolean;
|
|
488
|
+
/** `qmdIntentHintsEnabled` — QMD intent hint extraction. */
|
|
489
|
+
readonly qmdIntentHints: boolean;
|
|
490
|
+
/** `qmdExplainEnabled` — QMD explain output. */
|
|
491
|
+
readonly qmdExplain: boolean;
|
|
492
|
+
/** `qmdAutoUpgradeEnabled` — QMD auto-upgrade tiers. */
|
|
493
|
+
readonly qmdAutoUpgrade: boolean;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Config projection consumed by {@link resolveQmdCapabilities}.
|
|
498
|
+
*/
|
|
499
|
+
export type QmdConfigProjection = Pick<
|
|
500
|
+
PluginConfig,
|
|
501
|
+
| "qmdEnabled"
|
|
502
|
+
| "qmdTierMigrationEnabled"
|
|
503
|
+
| "qmdTierAutoBackfillEnabled"
|
|
504
|
+
| "qmdAutoEmbedEnabled"
|
|
505
|
+
| "qmdMaintenanceEnabled"
|
|
506
|
+
| "qmdColdTierEnabled"
|
|
507
|
+
| "qmdDaemonEnabled"
|
|
508
|
+
| "qmdTierParityGraphEnabled"
|
|
509
|
+
| "qmdQueryRerankEnabled"
|
|
510
|
+
| "qmdIntentHintsEnabled"
|
|
511
|
+
| "qmdExplainEnabled"
|
|
512
|
+
| "qmdAutoUpgradeEnabled"
|
|
513
|
+
>;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Resolve the {@link QmdCapabilitySet} from parsed config.
|
|
517
|
+
*
|
|
518
|
+
* Call this ONCE at operation entry and thread the result down. Eleven flags
|
|
519
|
+
* are non-optional booleans (pure pass-through); `qmdColdTierEnabled` is
|
|
520
|
+
* optional and coerced with `=== true` (matching the pre-migration call sites).
|
|
521
|
+
*/
|
|
522
|
+
export function resolveQmdCapabilities(config: QmdConfigProjection): QmdCapabilitySet {
|
|
523
|
+
return Object.freeze({
|
|
524
|
+
qmd: config.qmdEnabled,
|
|
525
|
+
qmdTierMigration: config.qmdTierMigrationEnabled,
|
|
526
|
+
qmdTierAutoBackfill: config.qmdTierAutoBackfillEnabled,
|
|
527
|
+
qmdAutoEmbed: config.qmdAutoEmbedEnabled,
|
|
528
|
+
qmdMaintenance: config.qmdMaintenanceEnabled,
|
|
529
|
+
qmdColdTier: config.qmdColdTierEnabled === true,
|
|
530
|
+
qmdDaemon: config.qmdDaemonEnabled,
|
|
531
|
+
qmdTierParityGraph: config.qmdTierParityGraphEnabled,
|
|
532
|
+
qmdQueryRerank: config.qmdQueryRerankEnabled,
|
|
533
|
+
qmdIntentHints: config.qmdIntentHintsEnabled,
|
|
534
|
+
qmdExplain: config.qmdExplainEnabled,
|
|
535
|
+
qmdAutoUpgrade: config.qmdAutoUpgradeEnabled,
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// ---------------------------------------------------------------------------
|
|
540
|
+
// Identity-continuity capability set (issue #1523 batch 6).
|
|
541
|
+
//
|
|
542
|
+
// `identityContinuityEnabled` gates the identity/continuity system (agent
|
|
543
|
+
// identity tracking, continuity incident logging). Its 13 read sites span
|
|
544
|
+
// orchestrator, access-service, and CLI. The flag is a non-optional boolean
|
|
545
|
+
// on PluginConfig, so the projection is a pure pass-through.
|
|
546
|
+
// ---------------------------------------------------------------------------
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Frozen projection of identity-continuity feature gates (issue #1523 batch 6).
|
|
550
|
+
*/
|
|
551
|
+
export interface IdentityContinuityCapabilitySet {
|
|
552
|
+
/** `identityContinuityEnabled` — identity-continuity master switch. */
|
|
553
|
+
readonly identityContinuity: boolean;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Config projection consumed by {@link resolveIdentityContinuityCapabilities}.
|
|
558
|
+
*/
|
|
559
|
+
export type IdentityContinuityConfigProjection = Pick<PluginConfig, "identityContinuityEnabled">;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Resolve the {@link IdentityContinuityCapabilitySet} from parsed config.
|
|
563
|
+
*/
|
|
564
|
+
export function resolveIdentityContinuityCapabilities(
|
|
565
|
+
config: IdentityContinuityConfigProjection,
|
|
566
|
+
): IdentityContinuityCapabilitySet {
|
|
567
|
+
return Object.freeze({
|
|
568
|
+
identityContinuity: config.identityContinuityEnabled,
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// ---------------------------------------------------------------------------
|
|
573
|
+
// Local-LLM capability set (issue #1523 batch 6).
|
|
574
|
+
//
|
|
575
|
+
// `localLlmEnabled` gates whether a local (on-device) LLM is used for
|
|
576
|
+
// summarization, embedding fallback, extraction, and search. Its 11 read
|
|
577
|
+
// sites span orchestrator, extraction, embedding-fallback, local-llm,
|
|
578
|
+
// search/embed-helper, and summarizer. The flag is a non-optional boolean.
|
|
579
|
+
// ---------------------------------------------------------------------------
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Frozen projection of local-LLM feature gates (issue #1523 batch 6).
|
|
583
|
+
*/
|
|
584
|
+
export interface LocalLlmCapabilitySet {
|
|
585
|
+
/** `localLlmEnabled` — local (on-device) LLM master switch. */
|
|
586
|
+
readonly localLlm: boolean;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Config projection consumed by {@link resolveLocalLlmCapabilities}.
|
|
591
|
+
*/
|
|
592
|
+
export type LocalLlmConfigProjection = Pick<PluginConfig, "localLlmEnabled">;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Resolve the {@link LocalLlmCapabilitySet} from parsed config.
|
|
596
|
+
*/
|
|
597
|
+
export function resolveLocalLlmCapabilities(
|
|
598
|
+
config: LocalLlmConfigProjection,
|
|
599
|
+
): LocalLlmCapabilitySet {
|
|
600
|
+
return Object.freeze({
|
|
601
|
+
localLlm: config.localLlmEnabled,
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// ---------------------------------------------------------------------------
|
|
606
|
+
// Security capability set (issue #1523 batch 7).
|
|
607
|
+
//
|
|
608
|
+
// The four security/trust-zone flags gate quarantine promotion, poisoning
|
|
609
|
+
// defense, and trust-zone recall. Read sites span orchestrator, access-service,
|
|
610
|
+
// CLI, and research-status commands. All flags are non-optional booleans on
|
|
611
|
+
// PluginConfig (defaults resolved at the parse boundary), so the projection is
|
|
612
|
+
// a pure pass-through.
|
|
613
|
+
// ---------------------------------------------------------------------------
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Frozen projection of security/trust-zone feature gates (issue #1523 batch 7).
|
|
617
|
+
*/
|
|
618
|
+
export interface SecurityCapabilitySet {
|
|
619
|
+
/** `trustZonesEnabled` — master switch for trust-zone enforcement. */
|
|
620
|
+
readonly trustZones: boolean;
|
|
621
|
+
/** `quarantinePromotionEnabled` — promote quarantined memories after review. */
|
|
622
|
+
readonly quarantinePromotion: boolean;
|
|
623
|
+
/** `memoryPoisoningDefenseEnabled` — detect and defend against memory poisoning. */
|
|
624
|
+
readonly memoryPoisoningDefense: boolean;
|
|
625
|
+
/** `trustZoneRecallEnabled` — restrict recall to trusted zones. */
|
|
626
|
+
readonly trustZoneRecall: boolean;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Config projection consumed by {@link resolveSecurityCapabilities}.
|
|
631
|
+
*/
|
|
632
|
+
export type SecurityConfigProjection = Pick<
|
|
633
|
+
PluginConfig,
|
|
634
|
+
"trustZonesEnabled" | "quarantinePromotionEnabled" | "memoryPoisoningDefenseEnabled" | "trustZoneRecallEnabled"
|
|
635
|
+
>;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Resolve the {@link SecurityCapabilitySet} from parsed config.
|
|
639
|
+
*/
|
|
640
|
+
export function resolveSecurityCapabilities(config: SecurityConfigProjection): SecurityCapabilitySet {
|
|
641
|
+
return Object.freeze({
|
|
642
|
+
trustZones: config.trustZonesEnabled,
|
|
643
|
+
quarantinePromotion: config.quarantinePromotionEnabled,
|
|
644
|
+
memoryPoisoningDefense: config.memoryPoisoningDefenseEnabled,
|
|
645
|
+
trustZoneRecall: config.trustZoneRecallEnabled,
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// ---------------------------------------------------------------------------
|
|
650
|
+
// Eval/benchmark capability set (issue #1523 batch 7).
|
|
651
|
+
//
|
|
652
|
+
// The five eval/benchmark flags gate the evaluation harness, shadow mode,
|
|
653
|
+
// baseline snapshot management, delta reporting, and red-team benchmarking.
|
|
654
|
+
// Read sites span orchestrator, CLI, and operator-toolkit. All flags are
|
|
655
|
+
// non-optional booleans on PluginConfig.
|
|
656
|
+
// ---------------------------------------------------------------------------
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Frozen projection of eval/benchmark feature gates (issue #1523 batch 7).
|
|
660
|
+
*/
|
|
661
|
+
export interface EvalCapabilitySet {
|
|
662
|
+
/** `evalHarnessEnabled` — master switch for the eval harness. */
|
|
663
|
+
readonly evalHarness: boolean;
|
|
664
|
+
/** `evalShadowModeEnabled` — run evaluations in shadow mode. */
|
|
665
|
+
readonly evalShadowMode: boolean;
|
|
666
|
+
/** `benchmarkBaselineSnapshotsEnabled` — manage baseline snapshots. */
|
|
667
|
+
readonly benchmarkBaselineSnapshots: boolean;
|
|
668
|
+
/** `benchmarkDeltaReporterEnabled` — report benchmark deltas. */
|
|
669
|
+
readonly benchmarkDeltaReporter: boolean;
|
|
670
|
+
/** `memoryRedTeamBenchEnabled` — red-team benchmarking of memory. */
|
|
671
|
+
readonly memoryRedTeamBench: boolean;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Config projection consumed by {@link resolveEvalCapabilities}.
|
|
676
|
+
*/
|
|
677
|
+
export type EvalConfigProjection = Pick<
|
|
678
|
+
PluginConfig,
|
|
679
|
+
"evalHarnessEnabled" | "evalShadowModeEnabled" | "benchmarkBaselineSnapshotsEnabled" | "benchmarkDeltaReporterEnabled" | "memoryRedTeamBenchEnabled"
|
|
680
|
+
>;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Resolve the {@link EvalCapabilitySet} from parsed config.
|
|
684
|
+
*/
|
|
685
|
+
export function resolveEvalCapabilities(config: EvalConfigProjection): EvalCapabilitySet {
|
|
686
|
+
return Object.freeze({
|
|
687
|
+
evalHarness: config.evalHarnessEnabled,
|
|
688
|
+
evalShadowMode: config.evalShadowModeEnabled,
|
|
689
|
+
benchmarkBaselineSnapshots: config.benchmarkBaselineSnapshotsEnabled,
|
|
690
|
+
benchmarkDeltaReporter: config.benchmarkDeltaReporterEnabled,
|
|
691
|
+
memoryRedTeamBench: config.memoryRedTeamBenchEnabled,
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// ---------------------------------------------------------------------------
|
|
696
|
+
// Utility-learning capability set (issue #1523 batch 7).
|
|
697
|
+
//
|
|
698
|
+
// The two utility-learning flags gate memory utility learning and
|
|
699
|
+
// promotion-by-outcome. Read sites span orchestrator, CLI research-status
|
|
700
|
+
// commands, and maintenance files. Both flags are non-optional booleans.
|
|
701
|
+
// ---------------------------------------------------------------------------
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Frozen projection of utility-learning feature gates (issue #1523 batch 7).
|
|
705
|
+
*/
|
|
706
|
+
export interface UtilityLearningCapabilitySet {
|
|
707
|
+
/** `memoryUtilityLearningEnabled` — learn memory utility weights from outcomes. */
|
|
708
|
+
readonly memoryUtilityLearning: boolean;
|
|
709
|
+
/** `promotionByOutcomeEnabled` — promote memories by outcome tracking. */
|
|
710
|
+
readonly promotionByOutcome: boolean;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Config projection consumed by {@link resolveUtilityLearningCapabilities}.
|
|
715
|
+
*/
|
|
716
|
+
export type UtilityLearningConfigProjection = Pick<
|
|
717
|
+
PluginConfig,
|
|
718
|
+
"memoryUtilityLearningEnabled" | "promotionByOutcomeEnabled"
|
|
719
|
+
>;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Resolve the {@link UtilityLearningCapabilitySet} from parsed config.
|
|
723
|
+
*/
|
|
724
|
+
export function resolveUtilityLearningCapabilities(config: UtilityLearningConfigProjection): UtilityLearningCapabilitySet {
|
|
725
|
+
return Object.freeze({
|
|
726
|
+
memoryUtilityLearning: config.memoryUtilityLearningEnabled,
|
|
727
|
+
promotionByOutcome: config.promotionByOutcomeEnabled,
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
// ---------------------------------------------------------------------------
|
|
732
|
+
// Objective-state capability set (issue #1523 batch 7).
|
|
733
|
+
//
|
|
734
|
+
// The three objective-state flags gate objective-state memory, snapshot
|
|
735
|
+
// writes, and recall. Read sites span orchestrator, access-service, CLI
|
|
736
|
+
// creation-ledger commands, and research-status commands. All flags are
|
|
737
|
+
// non-optional booleans.
|
|
738
|
+
// ---------------------------------------------------------------------------
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Frozen projection of objective-state feature gates (issue #1523 batch 7).
|
|
742
|
+
*/
|
|
743
|
+
export interface ObjectiveStateCapabilitySet {
|
|
744
|
+
/** `objectiveStateMemoryEnabled` — store objective-state memories. */
|
|
745
|
+
readonly objectiveStateMemory: boolean;
|
|
746
|
+
/** `objectiveStateSnapshotWritesEnabled` — write objective-state snapshots. */
|
|
747
|
+
readonly objectiveStateSnapshotWrites: boolean;
|
|
748
|
+
/** `objectiveStateRecallEnabled` — recall objective-state memories. */
|
|
749
|
+
readonly objectiveStateRecall: boolean;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Config projection consumed by {@link resolveObjectiveStateCapabilities}.
|
|
754
|
+
*/
|
|
755
|
+
export type ObjectiveStateConfigProjection = Pick<
|
|
756
|
+
PluginConfig,
|
|
757
|
+
"objectiveStateMemoryEnabled" | "objectiveStateSnapshotWritesEnabled" | "objectiveStateRecallEnabled"
|
|
758
|
+
>;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Resolve the {@link ObjectiveStateCapabilitySet} from parsed config.
|
|
762
|
+
*/
|
|
763
|
+
export function resolveObjectiveStateCapabilities(config: ObjectiveStateConfigProjection): ObjectiveStateCapabilitySet {
|
|
764
|
+
return Object.freeze({
|
|
765
|
+
objectiveStateMemory: config.objectiveStateMemoryEnabled,
|
|
766
|
+
objectiveStateSnapshotWrites: config.objectiveStateSnapshotWritesEnabled,
|
|
767
|
+
objectiveStateRecall: config.objectiveStateRecallEnabled,
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
// ---------------------------------------------------------------------------
|
|
772
|
+
// Compression capability set (issue #1523 batch 7).
|
|
773
|
+
//
|
|
774
|
+
// The three compression flags gate guideline learning, semantic refinement,
|
|
775
|
+
// and context-compression actions. Read sites span orchestrator,
|
|
776
|
+
// access-service, and the compression-guideline coordinator. All flags are
|
|
777
|
+
// non-optional booleans.
|
|
778
|
+
// ---------------------------------------------------------------------------
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Frozen projection of compression feature gates (issue #1523 batch 7).
|
|
782
|
+
*/
|
|
783
|
+
export interface CompressionCapabilitySet {
|
|
784
|
+
/** `compressionGuidelineLearningEnabled` — learn compression guidelines. */
|
|
785
|
+
readonly compressionGuidelineLearning: boolean;
|
|
786
|
+
/** `compressionGuidelineSemanticRefinementEnabled` — semantically refine guidelines. */
|
|
787
|
+
readonly compressionGuidelineSemanticRefinement: boolean;
|
|
788
|
+
/** `contextCompressionActionsEnabled` — apply context-compression actions. */
|
|
789
|
+
readonly contextCompressionActions: boolean;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Config projection consumed by {@link resolveCompressionCapabilities}.
|
|
794
|
+
*/
|
|
795
|
+
export type CompressionConfigProjection = Pick<
|
|
796
|
+
PluginConfig,
|
|
797
|
+
"compressionGuidelineLearningEnabled" | "compressionGuidelineSemanticRefinementEnabled" | "contextCompressionActionsEnabled"
|
|
798
|
+
>;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Resolve the {@link CompressionCapabilitySet} from parsed config.
|
|
802
|
+
*/
|
|
803
|
+
export function resolveCompressionCapabilities(config: CompressionConfigProjection): CompressionCapabilitySet {
|
|
804
|
+
return Object.freeze({
|
|
805
|
+
compressionGuidelineLearning: config.compressionGuidelineLearningEnabled,
|
|
806
|
+
compressionGuidelineSemanticRefinement: config.compressionGuidelineSemanticRefinementEnabled,
|
|
807
|
+
contextCompressionActions: config.contextCompressionActionsEnabled,
|
|
808
|
+
});
|
|
809
|
+
}
|
|
@@ -20,7 +20,7 @@ import type { CliCommand } from "../cli.js";
|
|
|
20
20
|
import type { CommitmentLedgerEntry } from "../commitment-ledger.js";
|
|
21
21
|
import type { WorkProductLedgerEntry } from "../work-product-ledger.js";
|
|
22
22
|
import type { ResumeBundle } from "../resume-bundles.js";
|
|
23
|
-
import { resolveCreationMemoryCapabilities } from "../capabilities.js";
|
|
23
|
+
import { resolveCreationMemoryCapabilities, resolveObjectiveStateCapabilities} from "../capabilities.js";
|
|
24
24
|
import {
|
|
25
25
|
runResumeBundleStatusCliCommand,
|
|
26
26
|
runResumeBundleRecordCliCommand,
|
|
@@ -131,7 +131,7 @@ cmd
|
|
|
131
131
|
creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
|
|
132
132
|
resumeBundlesEnabled: resolveCreationMemoryCapabilities(orchestrator.config).resumeBundles,
|
|
133
133
|
transcriptEnabled: orchestrator.config.transcriptEnabled,
|
|
134
|
-
objectiveStateMemoryEnabled: orchestrator.config.
|
|
134
|
+
objectiveStateMemoryEnabled: resolveObjectiveStateCapabilities(orchestrator.config).objectiveStateMemory,
|
|
135
135
|
commitmentLedgerEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLedger,
|
|
136
136
|
bundleId: String(options.bundleId ?? ""),
|
|
137
137
|
recordedAt: String(options.recordedAt ?? ""),
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import type { Orchestrator } from "../orchestrator.js";
|
|
21
|
-
import { resolveCapabilities } from "../capabilities.js";
|
|
21
|
+
import { resolveCapabilities, resolveSecurityCapabilities, resolveUtilityLearningCapabilities, resolveObjectiveStateCapabilities} from "../capabilities.js";
|
|
22
22
|
import type { CliCommand } from "../cli.js";
|
|
23
23
|
import type { UtilityTelemetryEvent } from "../utility-telemetry.js";
|
|
24
24
|
import {
|
|
@@ -53,8 +53,8 @@ cmd
|
|
|
53
53
|
const status = await runObjectiveStateStatusCliCommand({
|
|
54
54
|
memoryDir: orchestrator.config.memoryDir,
|
|
55
55
|
objectiveStateStoreDir: orchestrator.config.objectiveStateStoreDir,
|
|
56
|
-
objectiveStateMemoryEnabled: orchestrator.config.
|
|
57
|
-
objectiveStateSnapshotWritesEnabled: orchestrator.config.
|
|
56
|
+
objectiveStateMemoryEnabled: resolveObjectiveStateCapabilities(orchestrator.config).objectiveStateMemory,
|
|
57
|
+
objectiveStateSnapshotWritesEnabled: resolveObjectiveStateCapabilities(orchestrator.config).objectiveStateSnapshotWrites,
|
|
58
58
|
});
|
|
59
59
|
console.log(JSON.stringify(status, null, 2));
|
|
60
60
|
console.log("OK");
|
|
@@ -80,9 +80,9 @@ cmd
|
|
|
80
80
|
const status = await runTrustZoneStatusCliCommand({
|
|
81
81
|
memoryDir: orchestrator.config.memoryDir,
|
|
82
82
|
trustZoneStoreDir: orchestrator.config.trustZoneStoreDir,
|
|
83
|
-
trustZonesEnabled: orchestrator.config.
|
|
84
|
-
quarantinePromotionEnabled: orchestrator.config.
|
|
85
|
-
memoryPoisoningDefenseEnabled: orchestrator.config.
|
|
83
|
+
trustZonesEnabled: resolveSecurityCapabilities(orchestrator.config).trustZones,
|
|
84
|
+
quarantinePromotionEnabled: resolveSecurityCapabilities(orchestrator.config).quarantinePromotion,
|
|
85
|
+
memoryPoisoningDefenseEnabled: resolveSecurityCapabilities(orchestrator.config).memoryPoisoningDefense,
|
|
86
86
|
});
|
|
87
87
|
console.log(JSON.stringify(status, null, 2));
|
|
88
88
|
console.log("OK");
|
|
@@ -99,7 +99,7 @@ cmd
|
|
|
99
99
|
const result = await runTrustZoneDemoSeedCliCommand({
|
|
100
100
|
memoryDir: orchestrator.config.memoryDir,
|
|
101
101
|
trustZoneStoreDir: orchestrator.config.trustZoneStoreDir,
|
|
102
|
-
trustZonesEnabled: orchestrator.config.
|
|
102
|
+
trustZonesEnabled: resolveSecurityCapabilities(orchestrator.config).trustZones,
|
|
103
103
|
scenario: typeof options.scenario === "string" ? options.scenario : undefined,
|
|
104
104
|
recordedAt: typeof options.recordedAt === "string" ? options.recordedAt : undefined,
|
|
105
105
|
dryRun: options.dryRun === true,
|
|
@@ -167,8 +167,8 @@ cmd
|
|
|
167
167
|
.action(async () => {
|
|
168
168
|
const status = await runUtilityTelemetryStatusCliCommand({
|
|
169
169
|
memoryDir: orchestrator.config.memoryDir,
|
|
170
|
-
memoryUtilityLearningEnabled: orchestrator.config.
|
|
171
|
-
promotionByOutcomeEnabled: orchestrator.config.
|
|
170
|
+
memoryUtilityLearningEnabled: resolveUtilityLearningCapabilities(orchestrator.config).memoryUtilityLearning,
|
|
171
|
+
promotionByOutcomeEnabled: resolveUtilityLearningCapabilities(orchestrator.config).promotionByOutcome,
|
|
172
172
|
});
|
|
173
173
|
console.log(JSON.stringify(status, null, 2));
|
|
174
174
|
console.log("OK");
|
|
@@ -196,7 +196,7 @@ cmd
|
|
|
196
196
|
: Number.NaN;
|
|
197
197
|
const filePath = await runUtilityTelemetryRecordCliCommand({
|
|
198
198
|
memoryDir: orchestrator.config.memoryDir,
|
|
199
|
-
memoryUtilityLearningEnabled: orchestrator.config.
|
|
199
|
+
memoryUtilityLearningEnabled: resolveUtilityLearningCapabilities(orchestrator.config).memoryUtilityLearning,
|
|
200
200
|
event: {
|
|
201
201
|
schemaVersion: 1,
|
|
202
202
|
eventId: String(options.eventId ?? ""),
|
|
@@ -223,8 +223,8 @@ cmd
|
|
|
223
223
|
.action(async () => {
|
|
224
224
|
const status = await runUtilityLearningStatusCliCommand({
|
|
225
225
|
memoryDir: orchestrator.config.memoryDir,
|
|
226
|
-
memoryUtilityLearningEnabled: orchestrator.config.
|
|
227
|
-
promotionByOutcomeEnabled: orchestrator.config.
|
|
226
|
+
memoryUtilityLearningEnabled: resolveUtilityLearningCapabilities(orchestrator.config).memoryUtilityLearning,
|
|
227
|
+
promotionByOutcomeEnabled: resolveUtilityLearningCapabilities(orchestrator.config).promotionByOutcome,
|
|
228
228
|
});
|
|
229
229
|
console.log(JSON.stringify(status, null, 2));
|
|
230
230
|
console.log("OK");
|
|
@@ -249,7 +249,7 @@ cmd
|
|
|
249
249
|
: 0.35;
|
|
250
250
|
const result = await runUtilityLearningCliCommand({
|
|
251
251
|
memoryDir: orchestrator.config.memoryDir,
|
|
252
|
-
memoryUtilityLearningEnabled: orchestrator.config.
|
|
252
|
+
memoryUtilityLearningEnabled: resolveUtilityLearningCapabilities(orchestrator.config).memoryUtilityLearning,
|
|
253
253
|
learningWindowDays,
|
|
254
254
|
minEventCount,
|
|
255
255
|
maxWeightMagnitude,
|
package/src/cli.ts
CHANGED
|
@@ -4,7 +4,11 @@ import { access, lstat, readFile, readdir, realpath, unlink } from "node:fs/prom
|
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import type { Readable, Writable } from "node:stream";
|
|
6
6
|
import type { Orchestrator } from "./orchestrator.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
resolveNamespaceCapabilities,
|
|
9
|
+
resolveMemoryLifecycleCapabilities,
|
|
10
|
+
resolveIdentityContinuityCapabilities,
|
|
11
|
+
resolveSecurityCapabilities, resolveEvalCapabilities} from "./capabilities.js";
|
|
8
12
|
import { ThreadingManager } from "./threading.js";
|
|
9
13
|
import { utcDayRange } from "./transcript.js";
|
|
10
14
|
import { runWearablesCliCommand } from "./wearables/cli.js";
|
|
@@ -2361,7 +2365,7 @@ export function hasDestructivePurgeFailures(
|
|
|
2361
2365
|
|
|
2362
2366
|
function resolvePolicySignalNamespaces(orchestrator: PolicyTuningCliOrchestrator): string[] {
|
|
2363
2367
|
const names = new Set<string>([orchestrator.config.defaultNamespace]);
|
|
2364
|
-
if (orchestrator.config.
|
|
2368
|
+
if (resolveNamespaceCapabilities(orchestrator.config).namespaces) {
|
|
2365
2369
|
names.add(orchestrator.config.sharedNamespace);
|
|
2366
2370
|
for (const policy of orchestrator.config.namespacePolicies) {
|
|
2367
2371
|
if (policy?.name) names.add(policy.name);
|
|
@@ -2520,7 +2524,7 @@ function resolveAuditNamespaces(
|
|
|
2520
2524
|
}
|
|
2521
2525
|
|
|
2522
2526
|
const names = new Set<string>([orchestrator.config.defaultNamespace]);
|
|
2523
|
-
if (orchestrator.config.
|
|
2527
|
+
if (resolveNamespaceCapabilities(orchestrator.config).namespaces) {
|
|
2524
2528
|
names.add(orchestrator.config.sharedNamespace);
|
|
2525
2529
|
for (const policy of orchestrator.config.namespacePolicies) {
|
|
2526
2530
|
if (policy?.name) names.add(policy.name);
|
|
@@ -3319,7 +3323,7 @@ export async function resolveMemoryDirForNamespace(
|
|
|
3319
3323
|
const ns = (namespace ?? "").trim();
|
|
3320
3324
|
if (!ns) return orchestrator.config.memoryDir;
|
|
3321
3325
|
assertSafeNamespaceSegment(ns);
|
|
3322
|
-
if (!orchestrator.config.
|
|
3326
|
+
if (!resolveNamespaceCapabilities(orchestrator.config).namespaces) {
|
|
3323
3327
|
if (options?.rejectUnsupportedOverride && ns !== orchestrator.config.defaultNamespace) {
|
|
3324
3328
|
throw new Error(`namespaces are disabled; cannot target namespace: ${ns}`);
|
|
3325
3329
|
}
|
|
@@ -5380,10 +5384,10 @@ export function registerCli(
|
|
|
5380
5384
|
const status = await runBenchmarkStatusCliCommand({
|
|
5381
5385
|
memoryDir: orchestrator.config.memoryDir,
|
|
5382
5386
|
evalStoreDir: orchestrator.config.evalStoreDir,
|
|
5383
|
-
evalHarnessEnabled: orchestrator.config.
|
|
5384
|
-
evalShadowModeEnabled: orchestrator.config.
|
|
5385
|
-
benchmarkBaselineSnapshotsEnabled: orchestrator.config.
|
|
5386
|
-
memoryRedTeamBenchEnabled: orchestrator.config.
|
|
5387
|
+
evalHarnessEnabled: resolveEvalCapabilities(orchestrator.config).evalHarness,
|
|
5388
|
+
evalShadowModeEnabled: resolveEvalCapabilities(orchestrator.config).evalShadowMode,
|
|
5389
|
+
benchmarkBaselineSnapshotsEnabled: resolveEvalCapabilities(orchestrator.config).benchmarkBaselineSnapshots,
|
|
5390
|
+
memoryRedTeamBenchEnabled: resolveEvalCapabilities(orchestrator.config).memoryRedTeamBench,
|
|
5387
5391
|
});
|
|
5388
5392
|
console.log(JSON.stringify(status, null, 2));
|
|
5389
5393
|
console.log("OK");
|
|
@@ -5411,11 +5415,11 @@ export function registerCli(
|
|
|
5411
5415
|
config: {
|
|
5412
5416
|
memoryDir: orchestrator.config.memoryDir,
|
|
5413
5417
|
evalStoreDir: orchestrator.config.evalStoreDir,
|
|
5414
|
-
evalHarnessEnabled: orchestrator.config.
|
|
5415
|
-
evalShadowModeEnabled: orchestrator.config.
|
|
5416
|
-
benchmarkBaselineSnapshotsEnabled: orchestrator.config.
|
|
5417
|
-
benchmarkDeltaReporterEnabled: orchestrator.config.
|
|
5418
|
-
memoryRedTeamBenchEnabled: orchestrator.config.
|
|
5418
|
+
evalHarnessEnabled: resolveEvalCapabilities(orchestrator.config).evalHarness,
|
|
5419
|
+
evalShadowModeEnabled: resolveEvalCapabilities(orchestrator.config).evalShadowMode,
|
|
5420
|
+
benchmarkBaselineSnapshotsEnabled: resolveEvalCapabilities(orchestrator.config).benchmarkBaselineSnapshots,
|
|
5421
|
+
benchmarkDeltaReporterEnabled: resolveEvalCapabilities(orchestrator.config).benchmarkDeltaReporter,
|
|
5422
|
+
memoryRedTeamBenchEnabled: resolveEvalCapabilities(orchestrator.config).memoryRedTeamBench,
|
|
5419
5423
|
},
|
|
5420
5424
|
validatePath: typeof options.validate === "string" ? options.validate : undefined,
|
|
5421
5425
|
baseEvalStoreDir: typeof options.base === "string" ? options.base : undefined,
|
|
@@ -6124,7 +6128,7 @@ export function registerCli(
|
|
|
6124
6128
|
const inputPath = args[0];
|
|
6125
6129
|
const summary = await runBenchmarkValidateCliCommand({
|
|
6126
6130
|
path: typeof inputPath === "string" ? inputPath : "",
|
|
6127
|
-
memoryRedTeamBenchEnabled: orchestrator.config.
|
|
6131
|
+
memoryRedTeamBenchEnabled: resolveEvalCapabilities(orchestrator.config).memoryRedTeamBench,
|
|
6128
6132
|
});
|
|
6129
6133
|
console.log(JSON.stringify(summary, null, 2));
|
|
6130
6134
|
console.log("OK");
|
|
@@ -6142,7 +6146,7 @@ export function registerCli(
|
|
|
6142
6146
|
const summary = await runBenchmarkBaselineSnapshotCliCommand({
|
|
6143
6147
|
memoryDir: orchestrator.config.memoryDir,
|
|
6144
6148
|
evalStoreDir: orchestrator.config.evalStoreDir,
|
|
6145
|
-
benchmarkBaselineSnapshotsEnabled: orchestrator.config.
|
|
6149
|
+
benchmarkBaselineSnapshotsEnabled: resolveEvalCapabilities(orchestrator.config).benchmarkBaselineSnapshots,
|
|
6146
6150
|
snapshotId: typeof options.snapshotId === "string" ? options.snapshotId : "",
|
|
6147
6151
|
createdAt: typeof options.createdAt === "string" ? options.createdAt : undefined,
|
|
6148
6152
|
gitRef: typeof options.gitRef === "string" ? options.gitRef : undefined,
|
|
@@ -6165,7 +6169,7 @@ export function registerCli(
|
|
|
6165
6169
|
memoryDir: orchestrator.config.memoryDir,
|
|
6166
6170
|
evalStoreDir: orchestrator.config.evalStoreDir,
|
|
6167
6171
|
force: options.force === true,
|
|
6168
|
-
memoryRedTeamBenchEnabled: orchestrator.config.
|
|
6172
|
+
memoryRedTeamBenchEnabled: resolveEvalCapabilities(orchestrator.config).memoryRedTeamBench,
|
|
6169
6173
|
});
|
|
6170
6174
|
console.log(JSON.stringify(summary, null, 2));
|
|
6171
6175
|
console.log("OK");
|
|
@@ -6198,7 +6202,7 @@ export function registerCli(
|
|
|
6198
6202
|
const summary = await runBenchmarkBaselineReportCliCommand({
|
|
6199
6203
|
memoryDir: orchestrator.config.memoryDir,
|
|
6200
6204
|
evalStoreDir: orchestrator.config.evalStoreDir,
|
|
6201
|
-
benchmarkDeltaReporterEnabled: orchestrator.config.
|
|
6205
|
+
benchmarkDeltaReporterEnabled: resolveEvalCapabilities(orchestrator.config).benchmarkDeltaReporter,
|
|
6202
6206
|
snapshotId: typeof options.snapshotId === "string" ? options.snapshotId : "",
|
|
6203
6207
|
});
|
|
6204
6208
|
const { markdownReport, ...jsonSummary } = summary;
|
|
@@ -6228,9 +6232,9 @@ export function registerCli(
|
|
|
6228
6232
|
const result = await runTrustZonePromoteCliCommand({
|
|
6229
6233
|
memoryDir: orchestrator.config.memoryDir,
|
|
6230
6234
|
trustZoneStoreDir: orchestrator.config.trustZoneStoreDir,
|
|
6231
|
-
trustZonesEnabled: orchestrator.config.
|
|
6232
|
-
quarantinePromotionEnabled: orchestrator.config.
|
|
6233
|
-
memoryPoisoningDefenseEnabled: orchestrator.config.
|
|
6235
|
+
trustZonesEnabled: resolveSecurityCapabilities(orchestrator.config).trustZones,
|
|
6236
|
+
quarantinePromotionEnabled: resolveSecurityCapabilities(orchestrator.config).quarantinePromotion,
|
|
6237
|
+
memoryPoisoningDefenseEnabled: resolveSecurityCapabilities(orchestrator.config).memoryPoisoningDefense,
|
|
6234
6238
|
sourceRecordId: String(options.recordId ?? ""),
|
|
6235
6239
|
targetZone: String(options.targetZone ?? "") as TrustZoneName,
|
|
6236
6240
|
promotionReason: String(options.reason ?? ""),
|
|
@@ -7858,7 +7862,7 @@ export function registerCli(
|
|
|
7858
7862
|
.option("--state <state>", "Filter by state: open|closed|all", "open")
|
|
7859
7863
|
.option("--limit <number>", "Maximum incidents to list", "25")
|
|
7860
7864
|
.action(async (...args: unknown[]) => {
|
|
7861
|
-
if (!orchestrator.config.
|
|
7865
|
+
if (!resolveIdentityContinuityCapabilities(orchestrator.config).identityContinuity) {
|
|
7862
7866
|
console.log("Identity continuity is disabled.");
|
|
7863
7867
|
return;
|
|
7864
7868
|
}
|
|
@@ -7886,7 +7890,7 @@ export function registerCli(
|
|
|
7886
7890
|
.option("--trigger-window <window>", "Optional incident trigger window")
|
|
7887
7891
|
.option("--suspected-cause <text>", "Optional suspected cause")
|
|
7888
7892
|
.action(async (...args: unknown[]) => {
|
|
7889
|
-
if (!orchestrator.config.
|
|
7893
|
+
if (!resolveIdentityContinuityCapabilities(orchestrator.config).identityContinuity) {
|
|
7890
7894
|
console.log("Identity continuity is disabled.");
|
|
7891
7895
|
return;
|
|
7892
7896
|
}
|
|
@@ -7917,7 +7921,7 @@ export function registerCli(
|
|
|
7917
7921
|
.option("--verification-result <text>", "Required verification result")
|
|
7918
7922
|
.option("--preventive-rule <text>", "Optional preventive rule")
|
|
7919
7923
|
.action(async (...args: unknown[]) => {
|
|
7920
|
-
if (!orchestrator.config.
|
|
7924
|
+
if (!resolveIdentityContinuityCapabilities(orchestrator.config).identityContinuity) {
|
|
7921
7925
|
console.log("Identity continuity is disabled.");
|
|
7922
7926
|
return;
|
|
7923
7927
|
}
|
|
@@ -8507,7 +8511,7 @@ export function registerCli(
|
|
|
8507
8511
|
mergedContent: cmdOpts.mergedContent,
|
|
8508
8512
|
storageForNamespace: (namespace) => {
|
|
8509
8513
|
const requested = namespace?.trim();
|
|
8510
|
-
if (!orchestrator.config.
|
|
8514
|
+
if (!resolveNamespaceCapabilities(orchestrator.config).namespaces) {
|
|
8511
8515
|
if (requested && requested !== orchestrator.config.defaultNamespace) {
|
|
8512
8516
|
throw new Error(`unsupported namespace: ${requested}`);
|
|
8513
8517
|
}
|
|
@@ -8554,7 +8558,7 @@ export function registerCli(
|
|
|
8554
8558
|
storageForNamespace: async (namespace) => {
|
|
8555
8559
|
const resolvedNamespace =
|
|
8556
8560
|
namespace?.trim() ||
|
|
8557
|
-
(orchestrator.config.
|
|
8561
|
+
(resolveNamespaceCapabilities(orchestrator.config).namespaces ? orchestrator.config.defaultNamespace : undefined);
|
|
8558
8562
|
const storage = await orchestrator.getStorageForNamespace(resolvedNamespace);
|
|
8559
8563
|
return { storage, namespace: resolvedNamespace };
|
|
8560
8564
|
},
|