@haaaiawd/second-nature 0.1.50 → 0.1.51
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/SKILL.md +22 -320
- package/{docs/claw-second-nature-inner-guide.md → agent-inner-guide.md} +43 -0
- package/openclaw.plugin.json +29 -0
- package/package.json +32 -61
- package/{dist/src → runtime}/cli/commands/index.js +325 -325
- package/{dist/src → runtime}/cli/ops/heartbeat-surface.d.ts +84 -84
- package/{dist/src → runtime}/cli/ops/heartbeat-surface.js +100 -100
- package/{dist/src → runtime}/cli/ops/ops-router.js +1482 -1482
- package/{dist/src → runtime}/cli/ops/workspace-heartbeat-runner.d.ts +85 -85
- package/{dist/src → runtime}/cli/ops/workspace-heartbeat-runner.js +242 -242
- package/{dist/src → runtime}/connectors/base/contract.d.ts +111 -111
- package/{dist/src → runtime}/connectors/base/failure-taxonomy.d.ts +13 -13
- package/{dist/src → runtime}/connectors/base/failure-taxonomy.js +186 -186
- package/{dist/src → runtime}/connectors/base/map-life-evidence.js +137 -137
- package/{dist/src → runtime}/connectors/base/policy-layer.js +202 -202
- package/{dist/src → runtime}/connectors/manifest/manifest-schema.d.ts +152 -152
- package/{dist/src → runtime}/connectors/manifest/manifest-schema.js +54 -54
- package/{dist/src → runtime}/connectors/services/connector-executor-adapter.d.ts +20 -20
- package/{dist/src → runtime}/connectors/services/connector-executor-adapter.js +645 -645
- package/{dist/src → runtime}/core/second-nature/heartbeat/goal-lifecycle-policy.d.ts +24 -24
- package/{dist/src → runtime}/core/second-nature/heartbeat/goal-lifecycle-policy.js +61 -61
- package/{dist/src → runtime}/core/second-nature/heartbeat/heartbeat-loop.d.ts +97 -97
- package/{dist/src → runtime}/core/second-nature/heartbeat/heartbeat-loop.js +397 -397
- package/{dist/src → runtime}/core/second-nature/orchestrator/platform-capability-router.js +149 -149
- package/HEARTBEAT.md +0 -44
- package/LICENSE +0 -176
- package/README.md +0 -136
- package/README.zh-CN.md +0 -120
- package/dist/data/observability.db +0 -0
- package/dist/data/state.db +0 -0
- package/dist/plugin/index.d.ts +0 -31
- package/dist/plugin/workspace-ops-bridge.d.ts +0 -15
- package/dist/scripts/build-plugin-package.d.ts +0 -12
- package/dist/scripts/build-plugin-package.js +0 -220
- package/dist/scripts/build-plugin-runtime.d.ts +0 -10
- package/dist/scripts/build-plugin-runtime.js +0 -198
- package/dist/scripts/packaging-feasibility-poc.d.ts +0 -1
- package/dist/scripts/packaging-feasibility-poc.js +0 -127
- package/dist/scripts/plugin-smoke-check.d.ts +0 -1
- package/dist/scripts/plugin-smoke-check.js +0 -124
- package/dist/src/cli/action-bridge.d.ts +0 -11
- package/dist/src/cli/index.d.ts +0 -65
- package/dist/tests/integration/cli/cli-ops-surface.test.d.ts +0 -1
- package/dist/tests/integration/cli/cli-ops-surface.test.js +0 -380
- package/dist/tests/integration/cli/heartbeat-surface-workspace.test.d.ts +0 -1
- package/dist/tests/integration/cli/heartbeat-surface-workspace.test.js +0 -61
- package/dist/tests/integration/cli/host-capability-probe.test.d.ts +0 -1
- package/dist/tests/integration/cli/host-capability-probe.test.js +0 -37
- package/dist/tests/integration/cli/host-smoke-heartbeat-tool.test.d.ts +0 -1
- package/dist/tests/integration/cli/host-smoke-heartbeat-tool.test.js +0 -34
- package/dist/tests/integration/cli/plugin-packaging-walkthrough.test.d.ts +0 -1
- package/dist/tests/integration/cli/plugin-packaging-walkthrough.test.js +0 -79
- package/dist/tests/integration/cli/plugin-runtime-registration.test.d.ts +0 -1
- package/dist/tests/integration/cli/plugin-runtime-registration.test.js +0 -285
- package/dist/tests/integration/cli/plugin-workspace-ops-bridge.test.d.ts +0 -1
- package/dist/tests/integration/cli/plugin-workspace-ops-bridge.test.js +0 -487
- package/dist/tests/integration/cli/t1-2-1-explain-read-models.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-1-explain-read-models.test.js +0 -58
- package/dist/tests/integration/cli/t1-2-1-narrative-command.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-1-narrative-command.test.js +0 -194
- package/dist/tests/integration/cli/t1-2-2-dream-recent.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-2-dream-recent.test.js +0 -100
- package/dist/tests/integration/cli/t1-2-3-status-observability-writeback.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-3-status-observability-writeback.test.js +0 -71
- package/dist/tests/integration/cli/t1-2-4-quiet-report-read-canonical.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-4-quiet-report-read-canonical.test.js +0 -206
- package/dist/tests/integration/cli/t1-2-5-cycle-recent.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-5-cycle-recent.test.js +0 -156
- package/dist/tests/integration/cli/t1-2-5-status-delivery-posture-audit-store.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-5-status-delivery-posture-audit-store.test.js +0 -95
- package/dist/tests/integration/cli/t1-2-6-policy-show-non-shell.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-6-policy-show-non-shell.test.js +0 -74
- package/dist/tests/integration/cli/t1-2-6-status-aggregate.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-6-status-aggregate.test.js +0 -223
- package/dist/tests/integration/cli/t1-2-7-audit-command-minimal-closure.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-7-audit-command-minimal-closure.test.js +0 -101
- package/dist/tests/integration/cli/t1-2-8-capability-probe-ops-surface.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-8-capability-probe-ops-surface.test.js +0 -74
- package/dist/tests/integration/cli/t1-2-9-decision-denied-not-degraded.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-2-9-decision-denied-not-degraded.test.js +0 -79
- package/dist/tests/integration/cli/t1-4-1-runtime-secret-bootstrap.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-4-1-runtime-secret-bootstrap.test.js +0 -139
- package/dist/tests/integration/cli/t1-4-2-activation-ux-contract.test.d.ts +0 -1
- package/dist/tests/integration/cli/t1-4-2-activation-ux-contract.test.js +0 -143
- package/dist/tests/integration/cli/t2-2-2-snapshot-life-evidence.test.d.ts +0 -1
- package/dist/tests/integration/cli/t2-2-2-snapshot-life-evidence.test.js +0 -116
- package/dist/tests/integration/cli/t3-3-2-near-real-smoke-cli-bridge.test.d.ts +0 -1
- package/dist/tests/integration/cli/t3-3-2-near-real-smoke-cli-bridge.test.js +0 -69
- package/dist/tests/integration/connectors/connector-base.test.d.ts +0 -1
- package/dist/tests/integration/connectors/connector-base.test.js +0 -211
- package/dist/tests/integration/connectors/connector-executor-adapter-honest-failure.test.d.ts +0 -1
- package/dist/tests/integration/connectors/connector-executor-adapter-honest-failure.test.js +0 -311
- package/dist/tests/integration/connectors/credential-optional-regression.test.d.ts +0 -1
- package/dist/tests/integration/connectors/credential-optional-regression.test.js +0 -117
- package/dist/tests/integration/connectors/declarative-http-runner.test.d.ts +0 -7
- package/dist/tests/integration/connectors/declarative-http-runner.test.js +0 -229
- package/dist/tests/integration/connectors/evomap-secret-port.test.d.ts +0 -1
- package/dist/tests/integration/connectors/evomap-secret-port.test.js +0 -83
- package/dist/tests/integration/connectors/life-evidence-chain.test.d.ts +0 -1
- package/dist/tests/integration/connectors/life-evidence-chain.test.js +0 -188
- package/dist/tests/integration/connectors/moltbook-client.test.d.ts +0 -1
- package/dist/tests/integration/connectors/moltbook-client.test.js +0 -274
- package/dist/tests/integration/connectors/moltbook-mock-runner.test.d.ts +0 -7
- package/dist/tests/integration/connectors/moltbook-mock-runner.test.js +0 -108
- package/dist/tests/integration/connectors/near-real-connector-smoke.test.d.ts +0 -1
- package/dist/tests/integration/connectors/near-real-connector-smoke.test.js +0 -38
- package/dist/tests/integration/connectors/platform-adapters.test.d.ts +0 -1
- package/dist/tests/integration/connectors/platform-adapters.test.js +0 -189
- package/dist/tests/integration/connectors/policy-layer.test.d.ts +0 -1
- package/dist/tests/integration/connectors/policy-layer.test.js +0 -249
- package/dist/tests/integration/connectors/scriptable-node-e2e.test.d.ts +0 -1
- package/dist/tests/integration/connectors/scriptable-node-e2e.test.js +0 -228
- package/dist/tests/integration/connectors/t3-3-1-real-connector-evidence.test.d.ts +0 -1
- package/dist/tests/integration/connectors/t3-3-1-real-connector-evidence.test.js +0 -171
- package/dist/tests/integration/control-plane/_helpers/decision-cycle-harness.d.ts +0 -40
- package/dist/tests/integration/control-plane/_helpers/decision-cycle-harness.js +0 -116
- package/dist/tests/integration/control-plane/decision-loop-validation.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/decision-loop-validation.test.js +0 -319
- package/dist/tests/integration/control-plane/delivery-failed-fallback.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/delivery-failed-fallback.test.js +0 -118
- package/dist/tests/integration/control-plane/dream-projection-heartbeat.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/dream-projection-heartbeat.test.js +0 -109
- package/dist/tests/integration/control-plane/effect-dispatcher.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/effect-dispatcher.test.js +0 -157
- package/dist/tests/integration/control-plane/guidance-request.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/guidance-request.test.js +0 -63
- package/dist/tests/integration/control-plane/heartbeat-executor.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/heartbeat-executor.test.js +0 -363
- package/dist/tests/integration/control-plane/heartbeat-loop.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/heartbeat-loop.test.js +0 -190
- package/dist/tests/integration/control-plane/heartbeat-quiet-orchestration.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/heartbeat-quiet-orchestration.test.js +0 -133
- package/dist/tests/integration/control-plane/heartbeat-spine-integration.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/heartbeat-spine-integration.test.js +0 -342
- package/dist/tests/integration/control-plane/heartbeat-spine.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/heartbeat-spine.test.js +0 -216
- package/dist/tests/integration/control-plane/int-s3-outreach-delivery-quiet-closure.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/int-s3-outreach-delivery-quiet-closure.test.js +0 -241
- package/dist/tests/integration/control-plane/outreach-resume.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/outreach-resume.test.js +0 -158
- package/dist/tests/integration/control-plane/outreach-style.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/outreach-style.test.js +0 -46
- package/dist/tests/integration/control-plane/quiet-reflection.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/quiet-reflection.test.js +0 -73
- package/dist/tests/integration/control-plane/rhythm-intent-guard.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/rhythm-intent-guard.test.js +0 -99
- package/dist/tests/integration/control-plane/run-heartbeat-cycle.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/run-heartbeat-cycle.test.js +0 -80
- package/dist/tests/integration/control-plane/t2-3-1-outreach-v6.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/t2-3-1-outreach-v6.test.js +0 -208
- package/dist/tests/integration/control-plane/t2-4-1-heartbeat-platform-intent.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/t2-4-1-heartbeat-platform-intent.test.js +0 -156
- package/dist/tests/integration/control-plane/t2-4-2-source-backed-outreach-loop.test.d.ts +0 -1
- package/dist/tests/integration/control-plane/t2-4-2-source-backed-outreach-loop.test.js +0 -188
- package/dist/tests/integration/control-plane/v7c-evidence-body-feedback.test.d.ts +0 -11
- package/dist/tests/integration/control-plane/v7c-evidence-body-feedback.test.js +0 -213
- package/dist/tests/integration/control-plane/v7c-heartbeat-unlock-e2e.test.d.ts +0 -9
- package/dist/tests/integration/control-plane/v7c-heartbeat-unlock-e2e.test.js +0 -134
- package/dist/tests/integration/dream/quiet-dream-trigger.test.d.ts +0 -1
- package/dist/tests/integration/dream/quiet-dream-trigger.test.js +0 -86
- package/dist/tests/integration/dream/t7-1-1-dream-pipeline.test.d.ts +0 -1
- package/dist/tests/integration/dream/t7-1-1-dream-pipeline.test.js +0 -378
- package/dist/tests/integration/dream/t7-1-2-dream-scheduler.test.d.ts +0 -1
- package/dist/tests/integration/dream/t7-1-2-dream-scheduler.test.js +0 -124
- package/dist/tests/integration/dream/v7c-rhythm-loop.test.d.ts +0 -10
- package/dist/tests/integration/dream/v7c-rhythm-loop.test.js +0 -185
- package/dist/tests/integration/guidance/assembler-and-fallback.test.d.ts +0 -1
- package/dist/tests/integration/guidance/assembler-and-fallback.test.js +0 -86
- package/dist/tests/integration/guidance/outreach-draft-contract.test.d.ts +0 -1
- package/dist/tests/integration/guidance/outreach-draft-contract.test.js +0 -106
- package/dist/tests/integration/guidance/persona-selection.test.d.ts +0 -1
- package/dist/tests/integration/guidance/persona-selection.test.js +0 -70
- package/dist/tests/integration/guidance/template-review.test.d.ts +0 -1
- package/dist/tests/integration/guidance/template-review.test.js +0 -26
- package/dist/tests/integration/guidance/user-reply-continuity.test.d.ts +0 -1
- package/dist/tests/integration/guidance/user-reply-continuity.test.js +0 -96
- package/dist/tests/integration/guidance/v7c-guidance-chain.test.d.ts +0 -1
- package/dist/tests/integration/guidance/v7c-guidance-chain.test.js +0 -190
- package/dist/tests/integration/guidance/v7c-guidance-semantics.test.d.ts +0 -1
- package/dist/tests/integration/guidance/v7c-guidance-semantics.test.js +0 -146
- package/dist/tests/integration/observability/digest-delivery.test.d.ts +0 -14
- package/dist/tests/integration/observability/digest-delivery.test.js +0 -160
- package/dist/tests/integration/observability/evidence-query-engine.test.d.ts +0 -1
- package/dist/tests/integration/observability/evidence-query-engine.test.js +0 -219
- package/dist/tests/integration/observability/explain-query-export.test.d.ts +0 -1
- package/dist/tests/integration/observability/explain-query-export.test.js +0 -92
- package/dist/tests/integration/observability/guidance-audit.test.d.ts +0 -1
- package/dist/tests/integration/observability/guidance-audit.test.js +0 -55
- package/dist/tests/integration/observability/heartbeat-decision-record.test.d.ts +0 -1
- package/dist/tests/integration/observability/heartbeat-decision-record.test.js +0 -223
- package/dist/tests/integration/observability/heartbeat-narrative-trace.test.d.ts +0 -1
- package/dist/tests/integration/observability/heartbeat-narrative-trace.test.js +0 -230
- package/dist/tests/integration/observability/lived-experience-audit-chain.test.d.ts +0 -1
- package/dist/tests/integration/observability/lived-experience-audit-chain.test.js +0 -43
- package/dist/tests/integration/observability/observability-gates.test.d.ts +0 -1
- package/dist/tests/integration/observability/observability-gates.test.js +0 -224
- package/dist/tests/integration/observability/observability-retention-cleanup.test.d.ts +0 -1
- package/dist/tests/integration/observability/observability-retention-cleanup.test.js +0 -94
- package/dist/tests/integration/observability/observability-services.test.d.ts +0 -1
- package/dist/tests/integration/observability/observability-services.test.js +0 -219
- package/dist/tests/integration/observability/projections.test.d.ts +0 -1
- package/dist/tests/integration/observability/projections.test.js +0 -36
- package/dist/tests/integration/observability/t5-1-1-dream-trace-audit.test.d.ts +0 -1
- package/dist/tests/integration/observability/t5-1-1-dream-trace-audit.test.js +0 -115
- package/dist/tests/integration/plugin/plugin-registration.test.d.ts +0 -16
- package/dist/tests/integration/plugin/plugin-registration.test.js +0 -151
- package/dist/tests/integration/runtime-ops/commands.test.d.ts +0 -16
- package/dist/tests/integration/runtime-ops/commands.test.js +0 -662
- package/dist/tests/integration/s3-exit/int-s3-body-heartbeat.test.d.ts +0 -15
- package/dist/tests/integration/s3-exit/int-s3-body-heartbeat.test.js +0 -462
- package/dist/tests/integration/s5-exit/int-s5-observability.test.d.ts +0 -17
- package/dist/tests/integration/s5-exit/int-s5-observability.test.js +0 -402
- package/dist/tests/integration/state/t4-2-1-owner-reply-relationship-loop.test.d.ts +0 -1
- package/dist/tests/integration/state/t4-2-1-owner-reply-relationship-loop.test.js +0 -132
- package/dist/tests/integration/state/v7c-identity-goal-hygiene.test.d.ts +0 -9
- package/dist/tests/integration/state/v7c-identity-goal-hygiene.test.js +0 -240
- package/dist/tests/integration/storage/packaged-runtime-smoke.test.d.ts +0 -1
- package/dist/tests/integration/storage/packaged-runtime-smoke.test.js +0 -17
- package/dist/tests/integration/storage/persona-candidate-loader.test.d.ts +0 -1
- package/dist/tests/integration/storage/persona-candidate-loader.test.js +0 -23
- package/dist/tests/integration/storage/quiet-artifact-writer.test.d.ts +0 -1
- package/dist/tests/integration/storage/quiet-artifact-writer.test.js +0 -66
- package/dist/tests/integration/storage/repair-and-backup.test.d.ts +0 -1
- package/dist/tests/integration/storage/repair-and-backup.test.js +0 -125
- package/dist/tests/integration/storage/schema-migration.test.d.ts +0 -11
- package/dist/tests/integration/storage/schema-migration.test.js +0 -183
- package/dist/tests/integration/storage/storage-mode-smoke.test.d.ts +0 -1
- package/dist/tests/integration/storage/storage-mode-smoke.test.js +0 -18
- package/dist/tests/integration/storage/t4-1-5-memory-store-lifecycle.test.d.ts +0 -1
- package/dist/tests/integration/storage/t4-1-5-memory-store-lifecycle.test.js +0 -118
- package/dist/tests/unit/body/affordance-assembler.test.d.ts +0 -14
- package/dist/tests/unit/body/affordance-assembler.test.js +0 -259
- package/dist/tests/unit/body/affordance-context-scope.test.d.ts +0 -12
- package/dist/tests/unit/body/affordance-context-scope.test.js +0 -73
- package/dist/tests/unit/body/behavior-promotion-loop.test.d.ts +0 -15
- package/dist/tests/unit/body/behavior-promotion-loop.test.js +0 -130
- package/dist/tests/unit/body/circuit-breaker-manager.test.d.ts +0 -13
- package/dist/tests/unit/body/circuit-breaker-manager.test.js +0 -160
- package/dist/tests/unit/body/experience-writer.test.d.ts +0 -11
- package/dist/tests/unit/body/experience-writer.test.js +0 -77
- package/dist/tests/unit/body/pain-signal-query.test.d.ts +0 -11
- package/dist/tests/unit/body/pain-signal-query.test.js +0 -104
- package/dist/tests/unit/cli/connector-init-manifest.test.d.ts +0 -9
- package/dist/tests/unit/cli/connector-init-manifest.test.js +0 -68
- package/dist/tests/unit/cli/delivery-target-probe.test.d.ts +0 -1
- package/dist/tests/unit/cli/delivery-target-probe.test.js +0 -108
- package/dist/tests/unit/cli/host-capability.test.d.ts +0 -1
- package/dist/tests/unit/cli/host-capability.test.js +0 -50
- package/dist/tests/unit/cli/operator-fallback-view.test.d.ts +0 -1
- package/dist/tests/unit/cli/operator-fallback-view.test.js +0 -60
- package/dist/tests/unit/cli/runtime-artifact-boundary.test.d.ts +0 -1
- package/dist/tests/unit/cli/runtime-artifact-boundary.test.js +0 -57
- package/dist/tests/unit/cli/t1-2-3-connector-status.test.d.ts +0 -1
- package/dist/tests/unit/cli/t1-2-3-connector-status.test.js +0 -214
- package/dist/tests/unit/cli/t1-2-4-goal-command.test.d.ts +0 -1
- package/dist/tests/unit/cli/t1-2-4-goal-command.test.js +0 -207
- package/dist/tests/unit/cli/t1-3-1-connector-init.test.d.ts +0 -1
- package/dist/tests/unit/cli/t1-3-1-connector-init.test.js +0 -212
- package/dist/tests/unit/connectors/connector-manifest-and-evidence-map.test.d.ts +0 -1
- package/dist/tests/unit/connectors/connector-manifest-and-evidence-map.test.js +0 -71
- package/dist/tests/unit/connectors/effect-commit-ledger-sqlite.test.d.ts +0 -10
- package/dist/tests/unit/connectors/effect-commit-ledger-sqlite.test.js +0 -101
- package/dist/tests/unit/connectors/evomap-runner.test.d.ts +0 -1
- package/dist/tests/unit/connectors/evomap-runner.test.js +0 -136
- package/dist/tests/unit/connectors/execution-policy.test.d.ts +0 -1
- package/dist/tests/unit/connectors/execution-policy.test.js +0 -71
- package/dist/tests/unit/connectors/instreet-registration.test.d.ts +0 -1
- package/dist/tests/unit/connectors/instreet-registration.test.js +0 -102
- package/dist/tests/unit/connectors/manifest-v7-schema.test.d.ts +0 -9
- package/dist/tests/unit/connectors/manifest-v7-schema.test.js +0 -165
- package/dist/tests/unit/connectors/scriptable-node-runner.test.d.ts +0 -1
- package/dist/tests/unit/connectors/scriptable-node-runner.test.js +0 -246
- package/dist/tests/unit/connectors/structured-unavailable-reason.test.d.ts +0 -11
- package/dist/tests/unit/connectors/structured-unavailable-reason.test.js +0 -76
- package/dist/tests/unit/connectors/t3-1-1-dynamic-registry.test.d.ts +0 -1
- package/dist/tests/unit/connectors/t3-1-1-dynamic-registry.test.js +0 -178
- package/dist/tests/unit/connectors/t3-1-2-capability-registry.test.d.ts +0 -1
- package/dist/tests/unit/connectors/t3-1-2-capability-registry.test.js +0 -105
- package/dist/tests/unit/connectors/t3-2-1-v5-parity.test.d.ts +0 -1
- package/dist/tests/unit/connectors/t3-2-1-v5-parity.test.js +0 -103
- package/dist/tests/unit/connectors/t3-3-1-evidence-mapper.test.d.ts +0 -1
- package/dist/tests/unit/connectors/t3-3-1-evidence-mapper.test.js +0 -198
- package/dist/tests/unit/connectors/t3-3-1-evidence-redaction.test.d.ts +0 -1
- package/dist/tests/unit/connectors/t3-3-1-evidence-redaction.test.js +0 -95
- package/dist/tests/unit/connectors/wet-probe-runner.test.d.ts +0 -11
- package/dist/tests/unit/connectors/wet-probe-runner.test.js +0 -84
- package/dist/tests/unit/control-plane/decision-trace-emitter.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/decision-trace-emitter.test.js +0 -51
- package/dist/tests/unit/control-plane/downstream-intent-orchestrator.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/downstream-intent-orchestrator.test.js +0 -57
- package/dist/tests/unit/control-plane/embodied-context-assembler.test.d.ts +0 -13
- package/dist/tests/unit/control-plane/embodied-context-assembler.test.js +0 -182
- package/dist/tests/unit/control-plane/goal-lifecycle-policy.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/goal-lifecycle-policy.test.js +0 -75
- package/dist/tests/unit/control-plane/hard-guard-evaluator.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/hard-guard-evaluator.test.js +0 -113
- package/dist/tests/unit/control-plane/idle-curiosity-policy.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/idle-curiosity-policy.test.js +0 -69
- package/dist/tests/unit/control-plane/intent-planner-source-ref-fallback.test.d.ts +0 -7
- package/dist/tests/unit/control-plane/intent-planner-source-ref-fallback.test.js +0 -124
- package/dist/tests/unit/control-plane/rhythm-policy-snapshot-window.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/rhythm-policy-snapshot-window.test.js +0 -64
- package/dist/tests/unit/control-plane/run-heartbeat-cycle-v7.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/run-heartbeat-cycle-v7.test.js +0 -165
- package/dist/tests/unit/control-plane/t2-1-4-goal-priority.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/t2-1-4-goal-priority.test.js +0 -185
- package/dist/tests/unit/control-plane/t2-1-5-narrative-update.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/t2-1-5-narrative-update.test.js +0 -313
- package/dist/tests/unit/control-plane/t2-4-1-credential-route.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/t2-4-1-credential-route.test.js +0 -75
- package/dist/tests/unit/control-plane/t2-4-1-platform-intent.test.d.ts +0 -1
- package/dist/tests/unit/control-plane/t2-4-1-platform-intent.test.js +0 -168
- package/dist/tests/unit/core/outreach-judgment.test.d.ts +0 -1
- package/dist/tests/unit/core/outreach-judgment.test.js +0 -109
- package/dist/tests/unit/core/resolve-allowed-intent.test.d.ts +0 -1
- package/dist/tests/unit/core/resolve-allowed-intent.test.js +0 -69
- package/dist/tests/unit/core/t2-2-3-connector-action-honest-result.test.d.ts +0 -1
- package/dist/tests/unit/core/t2-2-3-connector-action-honest-result.test.js +0 -130
- package/dist/tests/unit/core/t2-2-3-connector-dispatch-wired.test.d.ts +0 -1
- package/dist/tests/unit/core/t2-2-3-connector-dispatch-wired.test.js +0 -99
- package/dist/tests/unit/dream/dream-input-loader.test.d.ts +0 -15
- package/dist/tests/unit/dream/dream-input-loader.test.js +0 -424
- package/dist/tests/unit/dream/dream-scheduler.test.d.ts +0 -1
- package/dist/tests/unit/dream/dream-scheduler.test.js +0 -57
- package/dist/tests/unit/dream/t-dqs-c3-redacted-evidence.test.d.ts +0 -11
- package/dist/tests/unit/dream/t-dqs-c3-redacted-evidence.test.js +0 -298
- package/dist/tests/unit/dream/t7-1-3-insight-extraction.test.d.ts +0 -1
- package/dist/tests/unit/dream/t7-1-3-insight-extraction.test.js +0 -79
- package/dist/tests/unit/dream/t7-1-4-narrative-update.test.d.ts +0 -1
- package/dist/tests/unit/dream/t7-1-4-narrative-update.test.js +0 -93
- package/dist/tests/unit/dream/t7-1-5-relationship-update.test.d.ts +0 -1
- package/dist/tests/unit/dream/t7-1-5-relationship-update.test.js +0 -116
- package/dist/tests/unit/feedback/t4-2-1-owner-reply-inference.test.d.ts +0 -1
- package/dist/tests/unit/feedback/t4-2-1-owner-reply-inference.test.js +0 -58
- package/dist/tests/unit/guidance/capability-class.test.d.ts +0 -1
- package/dist/tests/unit/guidance/capability-class.test.js +0 -96
- package/dist/tests/unit/guidance/channel-feedback-ingestion.test.d.ts +0 -1
- package/dist/tests/unit/guidance/channel-feedback-ingestion.test.js +0 -163
- package/dist/tests/unit/guidance/evidence-guidance.test.d.ts +0 -1
- package/dist/tests/unit/guidance/evidence-guidance.test.js +0 -40
- package/dist/tests/unit/guidance/guidance-draft-service.test.d.ts +0 -1
- package/dist/tests/unit/guidance/guidance-draft-service.test.js +0 -140
- package/dist/tests/unit/guidance/impulse-assembler.test.d.ts +0 -1
- package/dist/tests/unit/guidance/impulse-assembler.test.js +0 -169
- package/dist/tests/unit/guidance/outreach-draft-schema.test.d.ts +0 -1
- package/dist/tests/unit/guidance/outreach-draft-schema.test.js +0 -56
- package/dist/tests/unit/guidance/outreach-strategy-selector.test.d.ts +0 -1
- package/dist/tests/unit/guidance/outreach-strategy-selector.test.js +0 -208
- package/dist/tests/unit/guidance/outreach-style-fixtures.test.d.ts +0 -1
- package/dist/tests/unit/guidance/outreach-style-fixtures.test.js +0 -81
- package/dist/tests/unit/guidance/t6-1-1-narrative-outreach.test.d.ts +0 -1
- package/dist/tests/unit/guidance/t6-1-1-narrative-outreach.test.js +0 -256
- package/dist/tests/unit/observability/audit-envelope.test.d.ts +0 -1
- package/dist/tests/unit/observability/audit-envelope.test.js +0 -169
- package/dist/tests/unit/observability/connector-inventory-ledger.test.d.ts +0 -1
- package/dist/tests/unit/observability/connector-inventory-ledger.test.js +0 -128
- package/dist/tests/unit/observability/family-registry.test.d.ts +0 -12
- package/dist/tests/unit/observability/family-registry.test.js +0 -105
- package/dist/tests/unit/observability/governance-plane-recorder.test.d.ts +0 -1
- package/dist/tests/unit/observability/governance-plane-recorder.test.js +0 -72
- package/dist/tests/unit/observability/heartbeat-digest-assembler.test.d.ts +0 -1
- package/dist/tests/unit/observability/heartbeat-digest-assembler.test.js +0 -227
- package/dist/tests/unit/observability/lived-experience-audit.test.d.ts +0 -1
- package/dist/tests/unit/observability/lived-experience-audit.test.js +0 -105
- package/dist/tests/unit/observability/narrative-timeline-query.test.d.ts +0 -18
- package/dist/tests/unit/observability/narrative-timeline-query.test.js +0 -239
- package/dist/tests/unit/observability/restore-audit-service.test.d.ts +0 -16
- package/dist/tests/unit/observability/restore-audit-service.test.js +0 -186
- package/dist/tests/unit/observability/runtime-decision-recorder.test.d.ts +0 -1
- package/dist/tests/unit/observability/runtime-decision-recorder.test.js +0 -66
- package/dist/tests/unit/observability/runtime-secret-anchor-view.test.d.ts +0 -18
- package/dist/tests/unit/observability/runtime-secret-anchor-view.test.js +0 -209
- package/dist/tests/unit/observability/self-health-snapshot.test.d.ts +0 -1
- package/dist/tests/unit/observability/self-health-snapshot.test.js +0 -223
- package/dist/tests/unit/observability/verify-audit-hash-chain.test.d.ts +0 -1
- package/dist/tests/unit/observability/verify-audit-hash-chain.test.js +0 -93
- package/dist/tests/unit/ops/manual-run-dispatcher.test.d.ts +0 -13
- package/dist/tests/unit/ops/manual-run-dispatcher.test.js +0 -219
- package/dist/tests/unit/quiet/claim-synthesizer.test.d.ts +0 -17
- package/dist/tests/unit/quiet/claim-synthesizer.test.js +0 -289
- package/dist/tests/unit/quiet/daily-diary-writer.test.d.ts +0 -12
- package/dist/tests/unit/quiet/daily-diary-writer.test.js +0 -108
- package/dist/tests/unit/shared/v7-entities.test.d.ts +0 -13
- package/dist/tests/unit/shared/v7-entities.test.js +0 -306
- package/dist/tests/unit/storage/delivery-attempt.test.d.ts +0 -1
- package/dist/tests/unit/storage/delivery-attempt.test.js +0 -72
- package/dist/tests/unit/storage/diary-dream-store.test.d.ts +0 -12
- package/dist/tests/unit/storage/diary-dream-store.test.js +0 -118
- package/dist/tests/unit/storage/embodied-context-state-port.test.d.ts +0 -4
- package/dist/tests/unit/storage/embodied-context-state-port.test.js +0 -77
- package/dist/tests/unit/storage/goal-lifecycle-store.test.d.ts +0 -4
- package/dist/tests/unit/storage/goal-lifecycle-store.test.js +0 -143
- package/dist/tests/unit/storage/history-digest-store.test.d.ts +0 -10
- package/dist/tests/unit/storage/history-digest-store.test.js +0 -126
- package/dist/tests/unit/storage/identity-profile-store.test.d.ts +0 -4
- package/dist/tests/unit/storage/identity-profile-store.test.js +0 -48
- package/dist/tests/unit/storage/life-evidence-snapshot.test.d.ts +0 -1
- package/dist/tests/unit/storage/life-evidence-snapshot.test.js +0 -60
- package/dist/tests/unit/storage/life-evidence.test.d.ts +0 -1
- package/dist/tests/unit/storage/life-evidence.test.js +0 -54
- package/dist/tests/unit/storage/migration-runner.test.d.ts +0 -12
- package/dist/tests/unit/storage/migration-runner.test.js +0 -197
- package/dist/tests/unit/storage/repair-gate.test.d.ts +0 -1
- package/dist/tests/unit/storage/repair-gate.test.js +0 -41
- package/dist/tests/unit/storage/restore-snapshot-store.test.d.ts +0 -11
- package/dist/tests/unit/storage/restore-snapshot-store.test.js +0 -161
- package/dist/tests/unit/storage/rhythm-policy-snapshot.test.d.ts +0 -1
- package/dist/tests/unit/storage/rhythm-policy-snapshot.test.js +0 -31
- package/dist/tests/unit/storage/runtime-secret-anchor-store.test.d.ts +0 -10
- package/dist/tests/unit/storage/runtime-secret-anchor-store.test.js +0 -81
- package/dist/tests/unit/storage/t1-4-1-credential-health-mapper.test.d.ts +0 -1
- package/dist/tests/unit/storage/t1-4-1-credential-health-mapper.test.js +0 -83
- package/dist/tests/unit/storage/t4-1-1-session-chronicle.test.d.ts +0 -1
- package/dist/tests/unit/storage/t4-1-1-session-chronicle.test.js +0 -112
- package/dist/tests/unit/storage/t4-1-2-narrative-state.test.d.ts +0 -1
- package/dist/tests/unit/storage/t4-1-2-narrative-state.test.js +0 -80
- package/dist/tests/unit/storage/t4-1-3-relationship-memory.test.d.ts +0 -1
- package/dist/tests/unit/storage/t4-1-3-relationship-memory.test.js +0 -65
- package/dist/tests/unit/storage/t4-1-4-agent-goal.test.d.ts +0 -1
- package/dist/tests/unit/storage/t4-1-4-agent-goal.test.js +0 -166
- package/dist/tests/unit/storage/tool-experience-store.test.d.ts +0 -4
- package/dist/tests/unit/storage/tool-experience-store.test.js +0 -92
- package/dist/tests/unit/storage/user-interest-snapshot.test.d.ts +0 -1
- package/dist/tests/unit/storage/user-interest-snapshot.test.js +0 -48
- package/dist/tests/unit/storage/write-queue.test.d.ts +0 -12
- package/dist/tests/unit/storage/write-queue.test.js +0 -177
- package/dist/tests/unit/storage/write-validation-gate.test.d.ts +0 -9
- package/dist/tests/unit/storage/write-validation-gate.test.js +0 -153
- /package/{dist/plugin/index.js → index.js} +0 -0
- /package/{dist/src → runtime}/cli/action-bridge.js +0 -0
- /package/{dist/src → runtime}/cli/commands/connector-behavior.d.ts +0 -0
- /package/{dist/src → runtime}/cli/commands/connector-behavior.js +0 -0
- /package/{dist/src → runtime}/cli/commands/connector-init.d.ts +0 -0
- /package/{dist/src → runtime}/cli/commands/connector-init.js +0 -0
- /package/{dist/src → runtime}/cli/commands/connector-status.d.ts +0 -0
- /package/{dist/src → runtime}/cli/commands/connector-status.js +0 -0
- /package/{dist/src → runtime}/cli/commands/credential.d.ts +0 -0
- /package/{dist/src → runtime}/cli/commands/credential.js +0 -0
- /package/{dist/src → runtime}/cli/commands/goal.d.ts +0 -0
- /package/{dist/src → runtime}/cli/commands/goal.js +0 -0
- /package/{dist/src → runtime}/cli/commands/index.d.ts +0 -0
- /package/{dist/src → runtime}/cli/commands/policy.d.ts +0 -0
- /package/{dist/src → runtime}/cli/commands/policy.js +0 -0
- /package/{dist/src → runtime}/cli/explain/explain-surface-subject.d.ts +0 -0
- /package/{dist/src → runtime}/cli/explain/explain-surface-subject.js +0 -0
- /package/{dist/src → runtime}/cli/explain/format-explanation.d.ts +0 -0
- /package/{dist/src → runtime}/cli/explain/format-explanation.js +0 -0
- /package/{dist/src → runtime}/cli/explain/resolve-subject.d.ts +0 -0
- /package/{dist/src → runtime}/cli/explain/resolve-subject.js +0 -0
- /package/{dist/src → runtime}/cli/host-capability/classify-delivery.d.ts +0 -0
- /package/{dist/src → runtime}/cli/host-capability/classify-delivery.js +0 -0
- /package/{dist/src → runtime}/cli/host-capability/probe-host-capability.d.ts +0 -0
- /package/{dist/src → runtime}/cli/host-capability/probe-host-capability.js +0 -0
- /package/{dist/src → runtime}/cli/host-capability/record-host-capability.d.ts +0 -0
- /package/{dist/src → runtime}/cli/host-capability/record-host-capability.js +0 -0
- /package/{dist/src → runtime}/cli/host-capability/types.d.ts +0 -0
- /package/{dist/src → runtime}/cli/host-capability/types.js +0 -0
- /package/{dist/src → runtime}/cli/host-smoke/run-host-smoke.d.ts +0 -0
- /package/{dist/src → runtime}/cli/host-smoke/run-host-smoke.js +0 -0
- /package/{dist/src → runtime}/cli/host-smoke/types.d.ts +0 -0
- /package/{dist/src → runtime}/cli/host-smoke/types.js +0 -0
- /package/{dist/src → runtime}/cli/index.js +0 -0
- /package/{dist/src → runtime}/cli/ops/manual-run-dispatcher.d.ts +0 -0
- /package/{dist/src → runtime}/cli/ops/manual-run-dispatcher.js +0 -0
- /package/{dist/src → runtime}/cli/ops/ops-router.d.ts +0 -0
- /package/{dist/src → runtime}/cli/ops/show-operator-fallback.d.ts +0 -0
- /package/{dist/src → runtime}/cli/ops/show-operator-fallback.js +0 -0
- /package/{dist/src → runtime}/cli/read-models/index.d.ts +0 -0
- /package/{dist/src → runtime}/cli/read-models/index.js +0 -0
- /package/{dist/src → runtime}/cli/read-models/operator-explain-map.d.ts +0 -0
- /package/{dist/src → runtime}/cli/read-models/operator-explain-map.js +0 -0
- /package/{dist/src → runtime}/cli/read-models/types.d.ts +0 -0
- /package/{dist/src → runtime}/cli/read-models/types.js +0 -0
- /package/{dist/src → runtime}/cli/runtime/runtime-artifact-boundary.d.ts +0 -0
- /package/{dist/src → runtime}/cli/runtime/runtime-artifact-boundary.js +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/agent-world/adapter.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/agent-world/adapter.js +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/agent-world/index.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/agent-world/index.js +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/agent-world/manifest.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/agent-world/manifest.js +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/evomap/adapter.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/evomap/adapter.js +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/evomap/index.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/evomap/index.js +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/evomap/manifest.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/agent-network/evomap/manifest.js +0 -0
- /package/{dist/src → runtime}/connectors/base/channel-health.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/channel-health.js +0 -0
- /package/{dist/src → runtime}/connectors/base/contract.js +0 -0
- /package/{dist/src → runtime}/connectors/base/effect-commit-ledger-sqlite.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/effect-commit-ledger-sqlite.js +0 -0
- /package/{dist/src → runtime}/connectors/base/execution-policy.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/execution-policy.js +0 -0
- /package/{dist/src → runtime}/connectors/base/index.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/index.js +0 -0
- /package/{dist/src → runtime}/connectors/base/manifest-v7.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/manifest-v7.js +0 -0
- /package/{dist/src → runtime}/connectors/base/manifest.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/manifest.js +0 -0
- /package/{dist/src → runtime}/connectors/base/map-life-evidence.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/policy-layer.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/route-planner.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/route-planner.js +0 -0
- /package/{dist/src → runtime}/connectors/base/structured-unavailable-reason.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/structured-unavailable-reason.js +0 -0
- /package/{dist/src → runtime}/connectors/base/wet-probe-runner.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/base/wet-probe-runner.js +0 -0
- /package/{dist/src → runtime}/connectors/index.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/index.js +0 -0
- /package/{dist/src → runtime}/connectors/manifest/manifest-parser.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/manifest/manifest-parser.js +0 -0
- /package/{dist/src → runtime}/connectors/near-real/near-real-connector-smoke.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/near-real/near-real-connector-smoke.js +0 -0
- /package/{dist/src → runtime}/connectors/registry/dynamic-connector-registry.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/registry/dynamic-connector-registry.js +0 -0
- /package/{dist/src → runtime}/connectors/registry/index.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/registry/index.js +0 -0
- /package/{dist/src → runtime}/connectors/registry/manifest-scanner.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/registry/manifest-scanner.js +0 -0
- /package/{dist/src → runtime}/connectors/registry/trust-policy.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/registry/trust-policy.js +0 -0
- /package/{dist/src → runtime}/connectors/services/credential-route-context.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/services/credential-route-context.js +0 -0
- /package/{dist/src → runtime}/connectors/social-community/instreet/adapter.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/social-community/instreet/adapter.js +0 -0
- /package/{dist/src → runtime}/connectors/social-community/instreet/index.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/social-community/instreet/index.js +0 -0
- /package/{dist/src → runtime}/connectors/social-community/instreet/manifest.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/social-community/instreet/manifest.js +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/adapter.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/adapter.js +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/api-client.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/api-client.js +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/index.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/index.js +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/manifest.d.ts +0 -0
- /package/{dist/src → runtime}/connectors/social-community/moltbook/manifest.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/behavior-promotion/behavior-promotion-loop.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/behavior-promotion/behavior-promotion-loop.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/circuit-breaker/circuit-breaker-manager.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/circuit-breaker/circuit-breaker-manager.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/probe-signal-adapter.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/probe-signal-adapter.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-affordance/affordance-assembler.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-affordance/affordance-assembler.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-affordance/affordance-context-scope.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-affordance/affordance-context-scope.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-experience/experience-writer.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-experience/experience-writer.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-experience/pain-signal-query.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/body/tool-experience/pain-signal-query.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/feedback/owner-reply-feedback.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/feedback/owner-reply-feedback.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/guidance/apply-guidance.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/guidance/apply-guidance.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/guidance/request-guidance.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/guidance/request-guidance.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/guidance/user-reply-continuity.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/guidance/user-reply-continuity.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/decision-trace-emitter.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/decision-trace-emitter.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/embodied-context-assembler.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/embodied-context-assembler.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/heartbeat-executor.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/heartbeat-executor.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/idle-curiosity-policy.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/idle-curiosity-policy.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/index.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/index.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/run-heartbeat-cycle-v7.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/run-heartbeat-cycle-v7.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/run-heartbeat-cycle.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/run-heartbeat-cycle.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/runtime-snapshot.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/runtime-snapshot.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/scope-router.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/scope-router.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/signal.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/signal.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/snapshot-builder.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/heartbeat/snapshot-builder.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/index.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/index.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/downstream-intent-orchestrator.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/downstream-intent-orchestrator.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/effect-dispatcher.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/effect-dispatcher.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/goal-priority.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/goal-priority.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/guard-layer.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/guard-layer.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/hard-guard-evaluator.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/hard-guard-evaluator.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/index.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/index.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/intent-planner.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/intent-planner.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/lease-manager.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/lease-manager.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/narrative-update.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/narrative-update.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/platform-capability-router.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/resume-from-checkpoint.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/orchestrator/resume-from-checkpoint.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/build-message.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/build-message.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/build-outreach-draft-request.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/build-outreach-draft-request.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/delivery-target.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/delivery-target.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/dispatch-user-outreach.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/dispatch-user-outreach.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/evaluate-outreach.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/evaluate-outreach.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/judge-input-from-snapshot.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/judge-input-from-snapshot.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/judge-outreach.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/outreach/judge-outreach.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/claim-synthesizer.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/claim-synthesizer.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/daily-diary-writer.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/daily-diary-writer.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/index.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/index.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/quiet-pipeline.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/quiet-pipeline.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/run-source-backed-quiet.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/quiet/run-source-backed-quiet.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/reflection/run-narrative-reflection.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/reflection/run-narrative-reflection.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/planner-rhythm-window.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/planner-rhythm-window.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/policy-bridge.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/policy-bridge.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/rhythm-policy.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/rhythm-policy.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/select-window.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/rhythm/select-window.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/runtime/lifecycle-service.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/runtime/lifecycle-service.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/runtime/service-entry.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/runtime/service-entry.js +0 -0
- /package/{dist/src → runtime}/core/second-nature/types.d.ts +0 -0
- /package/{dist/src → runtime}/core/second-nature/types.js +0 -0
- /package/{dist/src → runtime}/dream/dream-engine.d.ts +0 -0
- /package/{dist/src → runtime}/dream/dream-engine.js +0 -0
- /package/{dist/src → runtime}/dream/dream-input-loader.d.ts +0 -0
- /package/{dist/src → runtime}/dream/dream-input-loader.js +0 -0
- /package/{dist/src → runtime}/dream/dream-scheduler.d.ts +0 -0
- /package/{dist/src → runtime}/dream/dream-scheduler.js +0 -0
- /package/{dist/src → runtime}/dream/index.d.ts +0 -0
- /package/{dist/src → runtime}/dream/index.js +0 -0
- /package/{dist/src → runtime}/dream/insight-extractor.d.ts +0 -0
- /package/{dist/src → runtime}/dream/insight-extractor.js +0 -0
- /package/{dist/src → runtime}/dream/memory-consolidator.d.ts +0 -0
- /package/{dist/src → runtime}/dream/memory-consolidator.js +0 -0
- /package/{dist/src → runtime}/dream/narrative-update-proposal.d.ts +0 -0
- /package/{dist/src → runtime}/dream/narrative-update-proposal.js +0 -0
- /package/{dist/src → runtime}/dream/output-validator.d.ts +0 -0
- /package/{dist/src → runtime}/dream/output-validator.js +0 -0
- /package/{dist/src → runtime}/dream/redaction-gate.d.ts +0 -0
- /package/{dist/src → runtime}/dream/redaction-gate.js +0 -0
- /package/{dist/src → runtime}/dream/relationship-update-proposal.d.ts +0 -0
- /package/{dist/src → runtime}/dream/relationship-update-proposal.js +0 -0
- /package/{dist/src → runtime}/dream/sampler.d.ts +0 -0
- /package/{dist/src → runtime}/dream/sampler.js +0 -0
- /package/{dist/src → runtime}/dream/types.d.ts +0 -0
- /package/{dist/src → runtime}/dream/types.js +0 -0
- /package/{dist/src → runtime}/guidance/capability-class.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/capability-class.js +0 -0
- /package/{dist/src → runtime}/guidance/channel-feedback-ingestion-service.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/channel-feedback-ingestion-service.js +0 -0
- /package/{dist/src → runtime}/guidance/contracts.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/contracts.js +0 -0
- /package/{dist/src → runtime}/guidance/draft-narrative-outreach.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/draft-narrative-outreach.js +0 -0
- /package/{dist/src → runtime}/guidance/draft-outreach-message.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/draft-outreach-message.js +0 -0
- /package/{dist/src → runtime}/guidance/evidence-guidance.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/evidence-guidance.js +0 -0
- /package/{dist/src → runtime}/guidance/fallback.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/fallback.js +0 -0
- /package/{dist/src → runtime}/guidance/guidance-assembler.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/guidance-assembler.js +0 -0
- /package/{dist/src → runtime}/guidance/guidance-draft-service.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/guidance-draft-service.js +0 -0
- /package/{dist/src → runtime}/guidance/impulse-assembler.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/impulse-assembler.js +0 -0
- /package/{dist/src → runtime}/guidance/index.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/index.js +0 -0
- /package/{dist/src → runtime}/guidance/output-guard.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/output-guard.js +0 -0
- /package/{dist/src → runtime}/guidance/outreach-draft-schema.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/outreach-draft-schema.js +0 -0
- /package/{dist/src → runtime}/guidance/outreach-strategy-selector.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/outreach-strategy-selector.js +0 -0
- /package/{dist/src → runtime}/guidance/persona-selection.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/persona-selection.js +0 -0
- /package/{dist/src → runtime}/guidance/review-workflow.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/review-workflow.js +0 -0
- /package/{dist/src → runtime}/guidance/template-registry.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/template-registry.js +0 -0
- /package/{dist/src → runtime}/guidance/types.d.ts +0 -0
- /package/{dist/src → runtime}/guidance/types.js +0 -0
- /package/{dist/src → runtime}/observability/audit/append-only-audit-store.d.ts +0 -0
- /package/{dist/src → runtime}/observability/audit/append-only-audit-store.js +0 -0
- /package/{dist/src → runtime}/observability/audit/audit-envelope.d.ts +0 -0
- /package/{dist/src → runtime}/observability/audit/audit-envelope.js +0 -0
- /package/{dist/src → runtime}/observability/audit/audit-family-registry.json +0 -0
- /package/{dist/src → runtime}/observability/audit/family-registry.d.ts +0 -0
- /package/{dist/src → runtime}/observability/audit/family-registry.js +0 -0
- /package/{dist/src → runtime}/observability/audit/verify-audit-hash-chain.d.ts +0 -0
- /package/{dist/src → runtime}/observability/audit/verify-audit-hash-chain.js +0 -0
- /package/{dist/src → runtime}/observability/connector-inventory-ledger.d.ts +0 -0
- /package/{dist/src → runtime}/observability/connector-inventory-ledger.js +0 -0
- /package/{dist/src → runtime}/observability/db/index.d.ts +0 -0
- /package/{dist/src → runtime}/observability/db/index.js +0 -0
- /package/{dist/src → runtime}/observability/db/schema/connector-inventory.d.ts +0 -0
- /package/{dist/src → runtime}/observability/db/schema/connector-inventory.js +0 -0
- /package/{dist/src → runtime}/observability/db/schema/host-capability-reports.d.ts +0 -0
- /package/{dist/src → runtime}/observability/db/schema/host-capability-reports.js +0 -0
- /package/{dist/src → runtime}/observability/db/schema/index.d.ts +0 -0
- /package/{dist/src → runtime}/observability/db/schema/index.js +0 -0
- /package/{dist/src → runtime}/observability/index.d.ts +0 -0
- /package/{dist/src → runtime}/observability/index.js +0 -0
- /package/{dist/src → runtime}/observability/projections/guidance-audit.d.ts +0 -0
- /package/{dist/src → runtime}/observability/projections/guidance-audit.js +0 -0
- /package/{dist/src → runtime}/observability/projections/outreach-quality-audit.d.ts +0 -0
- /package/{dist/src → runtime}/observability/projections/outreach-quality-audit.js +0 -0
- /package/{dist/src → runtime}/observability/projections/reflection-audit.d.ts +0 -0
- /package/{dist/src → runtime}/observability/projections/reflection-audit.js +0 -0
- /package/{dist/src → runtime}/observability/query/compose-evidence.d.ts +0 -0
- /package/{dist/src → runtime}/observability/query/compose-evidence.js +0 -0
- /package/{dist/src → runtime}/observability/query/evidence-query-engine.d.ts +0 -0
- /package/{dist/src → runtime}/observability/query/evidence-query-engine.js +0 -0
- /package/{dist/src → runtime}/observability/query/explain-query.d.ts +0 -0
- /package/{dist/src → runtime}/observability/query/explain-query.js +0 -0
- /package/{dist/src → runtime}/observability/query/export-audit-bundle.d.ts +0 -0
- /package/{dist/src → runtime}/observability/query/export-audit-bundle.js +0 -0
- /package/{dist/src → runtime}/observability/redaction/manifest.d.ts +0 -0
- /package/{dist/src → runtime}/observability/redaction/manifest.js +0 -0
- /package/{dist/src → runtime}/observability/redaction/policy.d.ts +0 -0
- /package/{dist/src → runtime}/observability/redaction/policy.js +0 -0
- /package/{dist/src → runtime}/observability/services/decision-ledger.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/decision-ledger.js +0 -0
- /package/{dist/src → runtime}/observability/services/execution-telemetry.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/execution-telemetry.js +0 -0
- /package/{dist/src → runtime}/observability/services/governance-audit.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/governance-audit.js +0 -0
- /package/{dist/src → runtime}/observability/services/governance-plane-recorder.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/governance-plane-recorder.js +0 -0
- /package/{dist/src → runtime}/observability/services/heartbeat-digest-assembler.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/heartbeat-digest-assembler.js +0 -0
- /package/{dist/src → runtime}/observability/services/lived-experience-audit.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/lived-experience-audit.js +0 -0
- /package/{dist/src → runtime}/observability/services/narrative-timeline-query-service.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/narrative-timeline-query-service.js +0 -0
- /package/{dist/src → runtime}/observability/services/observability-retention.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/observability-retention.js +0 -0
- /package/{dist/src → runtime}/observability/services/redaction-store.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/redaction-store.js +0 -0
- /package/{dist/src → runtime}/observability/services/restore-audit-service.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/restore-audit-service.js +0 -0
- /package/{dist/src → runtime}/observability/services/runtime-decision-recorder.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/runtime-decision-recorder.js +0 -0
- /package/{dist/src → runtime}/observability/services/runtime-secret-anchor-view.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/runtime-secret-anchor-view.js +0 -0
- /package/{dist/src → runtime}/observability/services/self-health-snapshot.d.ts +0 -0
- /package/{dist/src → runtime}/observability/services/self-health-snapshot.js +0 -0
- /package/{dist/src → runtime}/shared/types/continuity.d.ts +0 -0
- /package/{dist/src → runtime}/shared/types/continuity.js +0 -0
- /package/{dist/src → runtime}/shared/types/credential.d.ts +0 -0
- /package/{dist/src → runtime}/shared/types/credential.js +0 -0
- /package/{dist/src → runtime}/shared/types/goal.d.ts +0 -0
- /package/{dist/src → runtime}/shared/types/goal.js +0 -0
- /package/{dist/src → runtime}/shared/types/index.d.ts +0 -0
- /package/{dist/src → runtime}/shared/types/index.js +0 -0
- /package/{dist/src → runtime}/shared/types/outreach.d.ts +0 -0
- /package/{dist/src → runtime}/shared/types/outreach.js +0 -0
- /package/{dist/src → runtime}/shared/types/source-ref.d.ts +0 -0
- /package/{dist/src → runtime}/shared/types/source-ref.js +0 -0
- /package/{dist/src → runtime}/shared/types/v7-entities.d.ts +0 -0
- /package/{dist/src → runtime}/shared/types/v7-entities.js +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/native-sqlite-probe.d.ts +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/native-sqlite-probe.js +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/repair-gate.d.ts +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/repair-gate.js +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/repair.d.ts +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/repair.js +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/storage-mode-smoke.d.ts +0 -0
- /package/{dist/src → runtime}/storage/bootstrap/storage-mode-smoke.js +0 -0
- /package/{dist/src → runtime}/storage/chronicle/session-chronicle-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/chronicle/session-chronicle-store.js +0 -0
- /package/{dist/src → runtime}/storage/db/index.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/index.js +0 -0
- /package/{dist/src → runtime}/storage/db/migration-runner.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/migration-runner.js +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/index.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/index.js +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-001-foundation.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-001-foundation.js +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-002-effect-commit-ledger.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-002-effect-commit-ledger.js +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-003-circuit-breaker.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-003-circuit-breaker.js +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-004-behavior-promotion.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/migrations/v7-004-behavior-promotion.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/agent-goal.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/agent-goal.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/assets.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/assets.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/credentials.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/credentials.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/delivery-attempts.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/delivery-attempts.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/index.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/index.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/intent-commits.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/intent-commits.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/life-evidence-index.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/life-evidence-index.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/memory-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/memory-store.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/narrative-state.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/narrative-state.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/operator-fallback-artifacts.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/operator-fallback-artifacts.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/policies.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/policies.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/proposals.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/proposals.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/provenance.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/provenance.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/relationship-memory.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/relationship-memory.js +0 -0
- /package/{dist/src → runtime}/storage/db/schema/session-chronicle.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/schema/session-chronicle.js +0 -0
- /package/{dist/src → runtime}/storage/db/transaction-utils.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/transaction-utils.js +0 -0
- /package/{dist/src → runtime}/storage/db/write-queue.d.ts +0 -0
- /package/{dist/src → runtime}/storage/db/write-queue.js +0 -0
- /package/{dist/src → runtime}/storage/delivery/query-delivery-attempts.d.ts +0 -0
- /package/{dist/src → runtime}/storage/delivery/query-delivery-attempts.js +0 -0
- /package/{dist/src → runtime}/storage/delivery/types.d.ts +0 -0
- /package/{dist/src → runtime}/storage/delivery/types.js +0 -0
- /package/{dist/src → runtime}/storage/delivery/write-delivery-attempt.d.ts +0 -0
- /package/{dist/src → runtime}/storage/delivery/write-delivery-attempt.js +0 -0
- /package/{dist/src → runtime}/storage/fallback/load-operator-fallback.d.ts +0 -0
- /package/{dist/src → runtime}/storage/fallback/load-operator-fallback.js +0 -0
- /package/{dist/src → runtime}/storage/fallback/operator-fallback-types.d.ts +0 -0
- /package/{dist/src → runtime}/storage/fallback/operator-fallback-types.js +0 -0
- /package/{dist/src → runtime}/storage/fallback/operator-fallback-view.d.ts +0 -0
- /package/{dist/src → runtime}/storage/fallback/operator-fallback-view.js +0 -0
- /package/{dist/src → runtime}/storage/fallback/write-operator-fallback.d.ts +0 -0
- /package/{dist/src → runtime}/storage/fallback/write-operator-fallback.js +0 -0
- /package/{dist/src → runtime}/storage/goal/agent-goal-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/goal/agent-goal-store.js +0 -0
- /package/{dist/src → runtime}/storage/index.d.ts +0 -0
- /package/{dist/src → runtime}/storage/index.js +0 -0
- /package/{dist/src → runtime}/storage/life-evidence/append-life-evidence.d.ts +0 -0
- /package/{dist/src → runtime}/storage/life-evidence/append-life-evidence.js +0 -0
- /package/{dist/src → runtime}/storage/life-evidence/types.d.ts +0 -0
- /package/{dist/src → runtime}/storage/life-evidence/types.js +0 -0
- /package/{dist/src → runtime}/storage/memory/workspace/paths.d.ts +0 -0
- /package/{dist/src → runtime}/storage/memory/workspace/paths.js +0 -0
- /package/{dist/src → runtime}/storage/memory/workspace/store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/memory/workspace/store.js +0 -0
- /package/{dist/src → runtime}/storage/memory/workspace/types.d.ts +0 -0
- /package/{dist/src → runtime}/storage/memory/workspace/types.js +0 -0
- /package/{dist/src → runtime}/storage/memory-store/memory-store-lifecycle.d.ts +0 -0
- /package/{dist/src → runtime}/storage/memory-store/memory-store-lifecycle.js +0 -0
- /package/{dist/src → runtime}/storage/narrative/narrative-state-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/narrative/narrative-state-store.js +0 -0
- /package/{dist/src → runtime}/storage/quiet/persist-quiet-artifact.d.ts +0 -0
- /package/{dist/src → runtime}/storage/quiet/persist-quiet-artifact.js +0 -0
- /package/{dist/src → runtime}/storage/quiet/quiet-artifact-types.d.ts +0 -0
- /package/{dist/src → runtime}/storage/quiet/quiet-artifact-types.js +0 -0
- /package/{dist/src → runtime}/storage/quiet/quiet-artifact-writer.d.ts +0 -0
- /package/{dist/src → runtime}/storage/quiet/quiet-artifact-writer.js +0 -0
- /package/{dist/src → runtime}/storage/relationship/relationship-memory-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/relationship/relationship-memory-store.js +0 -0
- /package/{dist/src → runtime}/storage/repositories/asset-repository.d.ts +0 -0
- /package/{dist/src → runtime}/storage/repositories/asset-repository.js +0 -0
- /package/{dist/src → runtime}/storage/repositories/credential-repository.d.ts +0 -0
- /package/{dist/src → runtime}/storage/repositories/credential-repository.js +0 -0
- /package/{dist/src → runtime}/storage/repositories/index.d.ts +0 -0
- /package/{dist/src → runtime}/storage/repositories/index.js +0 -0
- /package/{dist/src → runtime}/storage/repositories/intent-commit-repository.d.ts +0 -0
- /package/{dist/src → runtime}/storage/repositories/intent-commit-repository.js +0 -0
- /package/{dist/src → runtime}/storage/repositories/policy-repository.d.ts +0 -0
- /package/{dist/src → runtime}/storage/repositories/policy-repository.js +0 -0
- /package/{dist/src → runtime}/storage/repositories/proposal-repository.d.ts +0 -0
- /package/{dist/src → runtime}/storage/repositories/proposal-repository.js +0 -0
- /package/{dist/src → runtime}/storage/repositories/provenance-repository.d.ts +0 -0
- /package/{dist/src → runtime}/storage/repositories/provenance-repository.js +0 -0
- /package/{dist/src → runtime}/storage/rhythm/rhythm-policy-snapshot.d.ts +0 -0
- /package/{dist/src → runtime}/storage/rhythm/rhythm-policy-snapshot.js +0 -0
- /package/{dist/src → runtime}/storage/services/credential-vault.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/credential-vault.js +0 -0
- /package/{dist/src → runtime}/storage/services/daily-log-pipeline.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/daily-log-pipeline.js +0 -0
- /package/{dist/src → runtime}/storage/services/diary-dream-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/diary-dream-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/effect-commit-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/effect-commit-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/embodied-context-state-port.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/embodied-context-state-port.js +0 -0
- /package/{dist/src → runtime}/storage/services/goal-lifecycle-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/goal-lifecycle-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/governance-layer.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/governance-layer.js +0 -0
- /package/{dist/src → runtime}/storage/services/history-digest-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/history-digest-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/identity-profile-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/identity-profile-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/interaction-snapshot-projector.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/interaction-snapshot-projector.js +0 -0
- /package/{dist/src → runtime}/storage/services/persona-candidate-loader.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/persona-candidate-loader.js +0 -0
- /package/{dist/src → runtime}/storage/services/provenance-service.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/provenance-service.js +0 -0
- /package/{dist/src → runtime}/storage/services/quiet-input-loader.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/quiet-input-loader.js +0 -0
- /package/{dist/src → runtime}/storage/services/repair-and-backup.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/repair-and-backup.js +0 -0
- /package/{dist/src → runtime}/storage/services/restore-snapshot-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/restore-snapshot-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/runtime-secret-anchor-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/runtime-secret-anchor-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/tool-experience-store.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/tool-experience-store.js +0 -0
- /package/{dist/src → runtime}/storage/services/write-validation-gate.d.ts +0 -0
- /package/{dist/src → runtime}/storage/services/write-validation-gate.js +0 -0
- /package/{dist/src → runtime}/storage/snapshots/continuity-snapshot.d.ts +0 -0
- /package/{dist/src → runtime}/storage/snapshots/continuity-snapshot.js +0 -0
- /package/{dist/src → runtime}/storage/snapshots/life-evidence-snapshot.d.ts +0 -0
- /package/{dist/src → runtime}/storage/snapshots/life-evidence-snapshot.js +0 -0
- /package/{dist/src → runtime}/storage/snapshots/types.d.ts +0 -0
- /package/{dist/src → runtime}/storage/snapshots/types.js +0 -0
- /package/{dist/src → runtime}/storage/state-api.d.ts +0 -0
- /package/{dist/src → runtime}/storage/state-api.js +0 -0
- /package/{dist/src → runtime}/storage/user-interest/load-user-interest-snapshot.d.ts +0 -0
- /package/{dist/src → runtime}/storage/user-interest/load-user-interest-snapshot.js +0 -0
- /package/{dist/src → runtime}/storage/user-interest/types.d.ts +0 -0
- /package/{dist/src → runtime}/storage/user-interest/types.js +0 -0
- /package/{dist/plugin/workspace-ops-bridge.js → workspace-ops-bridge.js} +0 -0
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for HeartbeatDigestAssembler — T-OBS.C.3
|
|
3
|
-
*
|
|
4
|
-
* Covers:
|
|
5
|
-
* - connector attempts aggregated per platform+capability
|
|
6
|
-
* - success/failure/blocked/circuit-open counts correct
|
|
7
|
-
* - no events → isNothingSignificant=true
|
|
8
|
-
* - goal transitions from state-memory port
|
|
9
|
-
* - quiet/dream status from state-memory port
|
|
10
|
-
* - DR-032: state-memory unavailable → goalSummary + quietDreamSummary degraded
|
|
11
|
-
* - digest content does not contain raw payload/credential
|
|
12
|
-
* - delivery counts in healthSummary
|
|
13
|
-
*/
|
|
14
|
-
import assert from "node:assert/strict";
|
|
15
|
-
import { describe, it } from "node:test";
|
|
16
|
-
import { AppendOnlyAuditStore } from "../../../src/observability/audit/append-only-audit-store.js";
|
|
17
|
-
import { buildAuditEnvelope, } from "../../../src/observability/audit/audit-envelope.js";
|
|
18
|
-
import { generateHeartbeatDigest, } from "../../../src/observability/services/heartbeat-digest-assembler.js";
|
|
19
|
-
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
20
|
-
const TODAY = "2026-05-23";
|
|
21
|
-
const TODAY_TS = `${TODAY}T10:00:00.000Z`;
|
|
22
|
-
function makeStore() {
|
|
23
|
-
return new AppendOnlyAuditStore();
|
|
24
|
-
}
|
|
25
|
-
let _seq = 0;
|
|
26
|
-
function appendEvent(store, family, payload, createdAt = TODAY_TS) {
|
|
27
|
-
const previousHash = store.lastRecordHash(family);
|
|
28
|
-
const envelope = buildAuditEnvelope({
|
|
29
|
-
family,
|
|
30
|
-
plane: "telemetry",
|
|
31
|
-
traceId: `trace-${Math.random().toString(36).slice(2)}`,
|
|
32
|
-
sequence: ++_seq,
|
|
33
|
-
payload,
|
|
34
|
-
previousHash,
|
|
35
|
-
});
|
|
36
|
-
// Override createdAt for test control
|
|
37
|
-
envelope.createdAt = createdAt;
|
|
38
|
-
store.append(envelope);
|
|
39
|
-
}
|
|
40
|
-
function makeStateMemoryPort(goals, quietDream) {
|
|
41
|
-
return {
|
|
42
|
-
queryGoalTransitions: async () => ({
|
|
43
|
-
newGoals: goals?.newGoals ?? 0,
|
|
44
|
-
completedGoals: goals?.completedGoals ?? 0,
|
|
45
|
-
expiredGoals: goals?.expiredGoals ?? 0,
|
|
46
|
-
replacedGoals: goals?.replacedGoals ?? 0,
|
|
47
|
-
activeGoals: goals?.activeGoals ?? 1,
|
|
48
|
-
}),
|
|
49
|
-
queryQuietDreamStatus: async () => ({
|
|
50
|
-
quietRuns: quietDream?.quietRuns ?? 0,
|
|
51
|
-
quietSucceeded: quietDream?.quietSucceeded ?? 0,
|
|
52
|
-
dreamRuns: quietDream?.dreamRuns ?? 0,
|
|
53
|
-
dreamAccepted: quietDream?.dreamAccepted ?? 0,
|
|
54
|
-
dreamSkipped: quietDream?.dreamSkipped ?? 0,
|
|
55
|
-
dreamSkipReasons: quietDream?.dreamSkipReasons ?? [],
|
|
56
|
-
}),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function makeDeps(store, port) {
|
|
60
|
-
return { auditStore: store, stateMemoryPort: port };
|
|
61
|
-
}
|
|
62
|
-
// ─── connector summary ────────────────────────────────────────────────────────
|
|
63
|
-
describe("generateHeartbeatDigest — connector summary", () => {
|
|
64
|
-
it("aggregates success/failure/circuit-open/blocked per platform+capability", async () => {
|
|
65
|
-
const store = makeStore();
|
|
66
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "feed.read", outcome: "success" });
|
|
67
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "feed.read", outcome: "success" });
|
|
68
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "feed.read", outcome: "failure" });
|
|
69
|
-
appendEvent(store, "connector.attempt", { platformId: "instreet", capability: "post.write", outcome: "circuit_open" });
|
|
70
|
-
appendEvent(store, "connector.attempt", { platformId: "instreet", capability: "post.write", outcome: "blocked" });
|
|
71
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
72
|
-
const moltbook = digest.connectorSummary.find((c) => c.platformId === "moltbook" && c.capability === "feed.read");
|
|
73
|
-
assert.ok(moltbook, "moltbook feed.read not found");
|
|
74
|
-
assert.equal(moltbook.successCount, 2);
|
|
75
|
-
assert.equal(moltbook.failureCount, 1);
|
|
76
|
-
assert.equal(moltbook.circuitOpenCount, 0);
|
|
77
|
-
assert.equal(moltbook.blockedCount, 0);
|
|
78
|
-
const instreet = digest.connectorSummary.find((c) => c.platformId === "instreet" && c.capability === "post.write");
|
|
79
|
-
assert.ok(instreet, "instreet post.write not found");
|
|
80
|
-
assert.equal(instreet.circuitOpenCount, 1);
|
|
81
|
-
assert.equal(instreet.blockedCount, 1);
|
|
82
|
-
});
|
|
83
|
-
it("connector events from different dates are not counted", async () => {
|
|
84
|
-
const store = makeStore();
|
|
85
|
-
const yesterday = "2026-05-22T10:00:00.000Z";
|
|
86
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "feed.read", outcome: "success" }, yesterday);
|
|
87
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
88
|
-
assert.equal(digest.connectorSummary.length, 0);
|
|
89
|
-
});
|
|
90
|
-
it("multiple capabilities of same platform appear as separate entries", async () => {
|
|
91
|
-
const store = makeStore();
|
|
92
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "feed.read", outcome: "success" });
|
|
93
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "post.write", outcome: "failure" });
|
|
94
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
95
|
-
assert.equal(digest.connectorSummary.length, 2);
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
// ─── isNothingSignificant ─────────────────────────────────────────────────────
|
|
99
|
-
describe("generateHeartbeatDigest — isNothingSignificant", () => {
|
|
100
|
-
it("returns isNothingSignificant=true when no events", async () => {
|
|
101
|
-
const store = makeStore();
|
|
102
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
103
|
-
assert.equal(digest.isNothingSignificant, true);
|
|
104
|
-
});
|
|
105
|
-
it("returns isNothingSignificant=false when connector activity exists", async () => {
|
|
106
|
-
const store = makeStore();
|
|
107
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "feed.read", outcome: "success" });
|
|
108
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
109
|
-
assert.equal(digest.isNothingSignificant, false);
|
|
110
|
-
});
|
|
111
|
-
it("does not fabricate activity — nothing_significant is honest", async () => {
|
|
112
|
-
const store = makeStore();
|
|
113
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
114
|
-
// connectorSummary should be empty
|
|
115
|
-
assert.equal(digest.connectorSummary.length, 0);
|
|
116
|
-
// healthSummary delivery counts should be 0
|
|
117
|
-
assert.equal(digest.healthSummary.deliverySuccessCount, 0);
|
|
118
|
-
assert.equal(digest.healthSummary.deliveryFailureCount, 0);
|
|
119
|
-
assert.equal(digest.isNothingSignificant, true);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
// ─── goal transitions from port ───────────────────────────────────────────────
|
|
123
|
-
describe("generateHeartbeatDigest — goal transitions", () => {
|
|
124
|
-
it("reads goal transitions from state-memory port", async () => {
|
|
125
|
-
const store = makeStore();
|
|
126
|
-
const port = makeStateMemoryPort({ newGoals: 2, completedGoals: 1, activeGoals: 3 });
|
|
127
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store, port));
|
|
128
|
-
assert.equal(digest.goalSummary.newGoals, 2);
|
|
129
|
-
assert.equal(digest.goalSummary.completedGoals, 1);
|
|
130
|
-
assert.equal(digest.goalSummary.activeGoals, 3);
|
|
131
|
-
});
|
|
132
|
-
it("goal activity makes isNothingSignificant=false", async () => {
|
|
133
|
-
const store = makeStore();
|
|
134
|
-
const port = makeStateMemoryPort({ newGoals: 1 });
|
|
135
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store, port));
|
|
136
|
-
assert.equal(digest.isNothingSignificant, false);
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
// ─── DR-032: state-memory unavailable ─────────────────────────────────────────
|
|
140
|
-
describe("generateHeartbeatDigest — DR-032 state-memory degraded", () => {
|
|
141
|
-
it("goalSummary degraded when state-memory port throws", async () => {
|
|
142
|
-
const store = makeStore();
|
|
143
|
-
const failingPort = {
|
|
144
|
-
queryGoalTransitions: async () => { throw new Error("db_connection_failed"); },
|
|
145
|
-
queryQuietDreamStatus: async () => ({ quietRuns: 0, quietSucceeded: 0, dreamRuns: 0, dreamAccepted: 0, dreamSkipped: 0, dreamSkipReasons: [] }),
|
|
146
|
-
};
|
|
147
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store, failingPort));
|
|
148
|
-
assert.equal(digest.goalSummary.degraded, true);
|
|
149
|
-
assert.equal(digest.goalSummary.degradedReason, "state_memory_unavailable");
|
|
150
|
-
});
|
|
151
|
-
it("quietDreamSummary degraded when state-memory port throws", async () => {
|
|
152
|
-
const store = makeStore();
|
|
153
|
-
const failingPort = {
|
|
154
|
-
queryGoalTransitions: async () => ({ newGoals: 0, completedGoals: 0, expiredGoals: 0, replacedGoals: 0, activeGoals: 0 }),
|
|
155
|
-
queryQuietDreamStatus: async () => { throw new Error("db_unavailable"); },
|
|
156
|
-
};
|
|
157
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store, failingPort));
|
|
158
|
-
assert.equal(digest.quietDreamSummary.degraded, true);
|
|
159
|
-
assert.equal(digest.quietDreamSummary.degradedReason, "state_memory_unavailable");
|
|
160
|
-
});
|
|
161
|
-
it("connector summary unaffected by state-memory failure", async () => {
|
|
162
|
-
const store = makeStore();
|
|
163
|
-
appendEvent(store, "connector.attempt", { platformId: "moltbook", capability: "feed.read", outcome: "success" });
|
|
164
|
-
const failingPort = {
|
|
165
|
-
queryGoalTransitions: async () => { throw new Error("unavailable"); },
|
|
166
|
-
queryQuietDreamStatus: async () => { throw new Error("unavailable"); },
|
|
167
|
-
};
|
|
168
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store, failingPort));
|
|
169
|
-
assert.equal(digest.connectorSummary.length, 1);
|
|
170
|
-
assert.equal(digest.connectorSummary[0].successCount, 1);
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
// ─── healthSummary ────────────────────────────────────────────────────────────
|
|
174
|
-
describe("generateHeartbeatDigest — healthSummary", () => {
|
|
175
|
-
it("counts delivery success and failure from audit events", async () => {
|
|
176
|
-
const store = makeStore();
|
|
177
|
-
appendEvent(store, "delivery", { outcome: "sent" });
|
|
178
|
-
appendEvent(store, "delivery", { outcome: "sent" });
|
|
179
|
-
appendEvent(store, "delivery", { outcome: "failed" });
|
|
180
|
-
appendEvent(store, "delivery", { outcome: "not_sent" });
|
|
181
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
182
|
-
assert.equal(digest.healthSummary.deliverySuccessCount, 2);
|
|
183
|
-
assert.equal(digest.healthSummary.deliveryFailureCount, 2);
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
// ─── digest content safety ───────────────────────────────────────────────────
|
|
187
|
-
describe("generateHeartbeatDigest — content safety", () => {
|
|
188
|
-
it("digest does not expose raw payload fields", async () => {
|
|
189
|
-
const store = makeStore();
|
|
190
|
-
appendEvent(store, "connector.attempt", {
|
|
191
|
-
platformId: "moltbook",
|
|
192
|
-
capability: "feed.read",
|
|
193
|
-
outcome: "success",
|
|
194
|
-
rawPayload: "SENSITIVE_RAW_DATA", // should not appear in digest
|
|
195
|
-
credential: "secret-token", // should not appear in digest
|
|
196
|
-
});
|
|
197
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
198
|
-
const json = JSON.stringify(digest);
|
|
199
|
-
assert.ok(!json.includes("SENSITIVE_RAW_DATA"), "raw payload leaked into digest");
|
|
200
|
-
assert.ok(!json.includes("secret-token"), "credential leaked into digest");
|
|
201
|
-
});
|
|
202
|
-
it("digest does not contain outreach-style language", async () => {
|
|
203
|
-
const store = makeStore();
|
|
204
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
205
|
-
const json = JSON.stringify(digest);
|
|
206
|
-
// Dashboard-style: should not say "reaching out" or "let's connect"
|
|
207
|
-
assert.ok(!json.toLowerCase().includes("reaching out"));
|
|
208
|
-
assert.ok(!json.toLowerCase().includes("let's connect"));
|
|
209
|
-
assert.ok(!json.toLowerCase().includes("just checking"));
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
// ─── dream trace in audit ─────────────────────────────────────────────────────
|
|
213
|
-
describe("generateHeartbeatDigest — dream trace from audit", () => {
|
|
214
|
-
it("counts dream runs and accepted from dream.trace events", async () => {
|
|
215
|
-
const store = makeStore();
|
|
216
|
-
appendEvent(store, "dream.trace", { event: "dream_started" });
|
|
217
|
-
appendEvent(store, "dream.trace", { event: "dream_started" });
|
|
218
|
-
appendEvent(store, "dream.trace", { event: "dream_accepted" });
|
|
219
|
-
appendEvent(store, "dream.trace", { event: "dream_skipped", skipReason: "lock_held" });
|
|
220
|
-
// No state-memory port → use audit-based aggregation
|
|
221
|
-
const digest = await generateHeartbeatDigest(TODAY, makeDeps(store));
|
|
222
|
-
assert.equal(digest.quietDreamSummary.dreamRuns, 2);
|
|
223
|
-
assert.equal(digest.quietDreamSummary.dreamAccepted, 1);
|
|
224
|
-
assert.equal(digest.quietDreamSummary.dreamSkipped, 1);
|
|
225
|
-
assert.ok(digest.quietDreamSummary.dreamSkipReasons.includes("lock_held"));
|
|
226
|
-
});
|
|
227
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import test from "node:test";
|
|
2
|
-
import assert from "node:assert/strict";
|
|
3
|
-
import { createLivedExperienceAuditRecorder } from "../../../src/observability/services/lived-experience-audit.js";
|
|
4
|
-
const now = () => new Date().toISOString();
|
|
5
|
-
test("T5.2.1 target_none delivery audit -> explain warns no user-visible contact", () => {
|
|
6
|
-
const rec = createLivedExperienceAuditRecorder();
|
|
7
|
-
rec.recordDecisionTrace({
|
|
8
|
-
decisionId: "dec-1",
|
|
9
|
-
traceId: "tr-1",
|
|
10
|
-
runtimeScope: "rhythm",
|
|
11
|
-
outcome: "heartbeat_ok",
|
|
12
|
-
reasonCodes: ["observed_target_none"],
|
|
13
|
-
sourceRefs: [],
|
|
14
|
-
createdAt: now(),
|
|
15
|
-
});
|
|
16
|
-
rec.recordDeliveryAudit({
|
|
17
|
-
auditId: "da-1",
|
|
18
|
-
decisionId: "dec-1",
|
|
19
|
-
traceId: "tr-1",
|
|
20
|
-
status: "target_none",
|
|
21
|
-
reasonCodes: ["not_delivered_by_host_policy"],
|
|
22
|
-
createdAt: now(),
|
|
23
|
-
});
|
|
24
|
-
const ex = rec.explainLinkageForDecision("dec-1");
|
|
25
|
-
assert.ok(ex.warnings.includes("no_user_visible_contact_claim_prohibited"));
|
|
26
|
-
assert.equal(ex.deliveryStatus, "target_none");
|
|
27
|
-
});
|
|
28
|
-
test("T5.2.1 sent without messageId rejected at audit layer", () => {
|
|
29
|
-
const rec = createLivedExperienceAuditRecorder();
|
|
30
|
-
assert.throws(() => rec.recordDeliveryAudit({
|
|
31
|
-
auditId: "da-2",
|
|
32
|
-
decisionId: "dec-2",
|
|
33
|
-
traceId: "tr-2",
|
|
34
|
-
status: "sent",
|
|
35
|
-
reasonCodes: [],
|
|
36
|
-
createdAt: now(),
|
|
37
|
-
}), /delivery_audit_sent_requires/);
|
|
38
|
-
});
|
|
39
|
-
test("T5.2.1 sent with messageId ok", () => {
|
|
40
|
-
const rec = createLivedExperienceAuditRecorder();
|
|
41
|
-
rec.recordDeliveryAudit({
|
|
42
|
-
auditId: "da-3",
|
|
43
|
-
decisionId: "dec-3",
|
|
44
|
-
traceId: "tr-3",
|
|
45
|
-
status: "sent",
|
|
46
|
-
messageId: "mid",
|
|
47
|
-
reasonCodes: ["message_sent"],
|
|
48
|
-
createdAt: now(),
|
|
49
|
-
});
|
|
50
|
-
const ex = rec.explainLinkageForDecision("dec-3");
|
|
51
|
-
assert.equal(ex.deliveryStatus, "sent");
|
|
52
|
-
assert.equal(ex.warnings.length, 0);
|
|
53
|
-
});
|
|
54
|
-
test("T5.2.1 not_sent_fallback sets warning", () => {
|
|
55
|
-
const rec = createLivedExperienceAuditRecorder();
|
|
56
|
-
rec.recordDeliveryAudit({
|
|
57
|
-
auditId: "da-4",
|
|
58
|
-
decisionId: "dec-4",
|
|
59
|
-
traceId: "tr-4",
|
|
60
|
-
status: "not_sent_fallback",
|
|
61
|
-
fallbackRef: "fb",
|
|
62
|
-
reasonCodes: ["operator_fallback_not_sent"],
|
|
63
|
-
createdAt: now(),
|
|
64
|
-
});
|
|
65
|
-
const ex = rec.explainLinkageForDecision("dec-4");
|
|
66
|
-
assert.ok(ex.warnings.includes("no_user_visible_contact_claim_prohibited"));
|
|
67
|
-
});
|
|
68
|
-
test("T5.2.1 ack_dropped sets no_user_visible_contact warning", () => {
|
|
69
|
-
const rec = createLivedExperienceAuditRecorder();
|
|
70
|
-
rec.recordDecisionTrace({
|
|
71
|
-
decisionId: "dec-ad",
|
|
72
|
-
traceId: "tr-ad",
|
|
73
|
-
runtimeScope: "rhythm",
|
|
74
|
-
outcome: "heartbeat_ok",
|
|
75
|
-
reasonCodes: [],
|
|
76
|
-
sourceRefs: [],
|
|
77
|
-
createdAt: now(),
|
|
78
|
-
});
|
|
79
|
-
rec.recordDeliveryAudit({
|
|
80
|
-
auditId: "da-ad",
|
|
81
|
-
decisionId: "dec-ad",
|
|
82
|
-
traceId: "tr-ad",
|
|
83
|
-
status: "ack_dropped",
|
|
84
|
-
reasonCodes: ["host_ack_dropped"],
|
|
85
|
-
createdAt: now(),
|
|
86
|
-
});
|
|
87
|
-
const ex = rec.explainLinkageForDecision("dec-ad");
|
|
88
|
-
assert.ok(ex.warnings.includes("no_user_visible_contact_claim_prohibited"));
|
|
89
|
-
assert.equal(ex.deliveryStatus, "ack_dropped");
|
|
90
|
-
});
|
|
91
|
-
test("T5.2.1 sent with hostProofRef only is accepted", () => {
|
|
92
|
-
const rec = createLivedExperienceAuditRecorder();
|
|
93
|
-
rec.recordDeliveryAudit({
|
|
94
|
-
auditId: "da-hp",
|
|
95
|
-
decisionId: "dec-hp",
|
|
96
|
-
traceId: "tr-hp",
|
|
97
|
-
status: "sent",
|
|
98
|
-
hostProofRef: { id: "hp1", kind: "connector_result", uri: "https://example.com/proof" },
|
|
99
|
-
reasonCodes: ["message_sent"],
|
|
100
|
-
createdAt: now(),
|
|
101
|
-
});
|
|
102
|
-
const ex = rec.explainLinkageForDecision("dec-hp");
|
|
103
|
-
assert.equal(ex.deliveryStatus, "sent");
|
|
104
|
-
assert.equal(ex.warnings.length, 0);
|
|
105
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for NarrativeTimelineQueryService — T-OBS.C.5
|
|
3
|
-
*
|
|
4
|
-
* Verification plan §t-obs-c-5:
|
|
5
|
-
* 1. cursor pagination: 100 rows → returns limit + nextCursor
|
|
6
|
-
* 2. 90-day range exceeded → throws NarrativeQueryRangeError (query_range_exceeded)
|
|
7
|
-
* 3. narrativeDiff returns focus/progress/nextIntent/sourceRefs/reasonCode changes
|
|
8
|
-
* 4. nextCursor is undefined when all rows fit in one page
|
|
9
|
-
* 5. cursor decodes back to same timestamp (roundtrip)
|
|
10
|
-
* 6. limit clamped to MAX (30) even when caller requests more
|
|
11
|
-
* 7. diff: isNoChange = true when both snapshots are identical
|
|
12
|
-
* 8. diff: sourceRefs added/removed computed correctly
|
|
13
|
-
* 9. diff: throws NarrativeVersionNotFoundError when version missing
|
|
14
|
-
* 10. DR-032: state-memory unavailable → propagates the error (caller handles degradation)
|
|
15
|
-
* 11. default limit applied when opts.limit is undefined
|
|
16
|
-
* 12. cursor pagination: second page fetches entries after cursor boundary
|
|
17
|
-
*/
|
|
18
|
-
export {};
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for NarrativeTimelineQueryService — T-OBS.C.5
|
|
3
|
-
*
|
|
4
|
-
* Verification plan §t-obs-c-5:
|
|
5
|
-
* 1. cursor pagination: 100 rows → returns limit + nextCursor
|
|
6
|
-
* 2. 90-day range exceeded → throws NarrativeQueryRangeError (query_range_exceeded)
|
|
7
|
-
* 3. narrativeDiff returns focus/progress/nextIntent/sourceRefs/reasonCode changes
|
|
8
|
-
* 4. nextCursor is undefined when all rows fit in one page
|
|
9
|
-
* 5. cursor decodes back to same timestamp (roundtrip)
|
|
10
|
-
* 6. limit clamped to MAX (30) even when caller requests more
|
|
11
|
-
* 7. diff: isNoChange = true when both snapshots are identical
|
|
12
|
-
* 8. diff: sourceRefs added/removed computed correctly
|
|
13
|
-
* 9. diff: throws NarrativeVersionNotFoundError when version missing
|
|
14
|
-
* 10. DR-032: state-memory unavailable → propagates the error (caller handles degradation)
|
|
15
|
-
* 11. default limit applied when opts.limit is undefined
|
|
16
|
-
* 12. cursor pagination: second page fetches entries after cursor boundary
|
|
17
|
-
*/
|
|
18
|
-
import assert from "node:assert/strict";
|
|
19
|
-
import { describe, it } from "node:test";
|
|
20
|
-
import { queryNarrativeTimeline, queryNarrativeDiff, encodeCursor, decodeCursor, NarrativeQueryRangeError, NarrativeVersionNotFoundError, } from "../../../src/observability/services/narrative-timeline-query-service.js";
|
|
21
|
-
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
22
|
-
function makeRow(version, createdAt) {
|
|
23
|
-
return {
|
|
24
|
-
version,
|
|
25
|
-
createdAt,
|
|
26
|
-
triggerKind: "heartbeat.decision",
|
|
27
|
-
sourceRefs: ["ref-1"],
|
|
28
|
-
reasonCode: "test_reason",
|
|
29
|
-
summaryText: "summary",
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function makeRows(count, baseDate = "2026-01-01T00:00:00.000Z") {
|
|
33
|
-
return Array.from({ length: count }, (_, i) => {
|
|
34
|
-
const d = new Date(baseDate);
|
|
35
|
-
d.setMinutes(d.getMinutes() + i);
|
|
36
|
-
return makeRow(`v${i + 1}`, d.toISOString());
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function makeSnap(version, fields = {}) {
|
|
40
|
-
return {
|
|
41
|
-
version,
|
|
42
|
-
focus: "default_focus",
|
|
43
|
-
progress: "default_progress",
|
|
44
|
-
nextIntent: "default_next",
|
|
45
|
-
toneSignal: "neutral",
|
|
46
|
-
acceptedGoalId: "goal-1",
|
|
47
|
-
sourceRefs: ["ref-1", "ref-2"],
|
|
48
|
-
lastChangeReasonCode: "goal_accepted",
|
|
49
|
-
...fields,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function makeDeps(rows, snaps = {}) {
|
|
53
|
-
return {
|
|
54
|
-
stateMemoryPort: {
|
|
55
|
-
listNarrativeTimeline: async (_from, _to, opts) => {
|
|
56
|
-
let filtered = rows;
|
|
57
|
-
if (opts?.afterTimestamp) {
|
|
58
|
-
filtered = rows.filter((r) => r.createdAt > opts.afterTimestamp);
|
|
59
|
-
}
|
|
60
|
-
const limit = opts?.limit ?? rows.length;
|
|
61
|
-
return filtered.slice(0, limit);
|
|
62
|
-
},
|
|
63
|
-
getNarrativeSnapshot: async (version) => snaps[version] ?? null,
|
|
64
|
-
},
|
|
65
|
-
now: () => "2026-05-01T00:00:00.000Z",
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
const FROM = "2026-01-01T00:00:00.000Z";
|
|
69
|
-
const TO = "2026-01-30T00:00:00.000Z"; // 29 days
|
|
70
|
-
// ─── Tests ───────────────────────────────────────────────────────────────────
|
|
71
|
-
describe("queryNarrativeTimeline — cursor pagination", () => {
|
|
72
|
-
it("100 rows → returns limit=20 entries + nextCursor", async () => {
|
|
73
|
-
const rows = makeRows(100);
|
|
74
|
-
const deps = makeDeps(rows);
|
|
75
|
-
const page = await queryNarrativeTimeline(FROM, TO, { limit: 20 }, deps);
|
|
76
|
-
assert.equal(page.entries.length, 20);
|
|
77
|
-
assert.ok(page.nextCursor !== undefined, "should have nextCursor");
|
|
78
|
-
assert.equal(page.truncated, true);
|
|
79
|
-
});
|
|
80
|
-
it("fewer rows than limit → no nextCursor, truncated=false", async () => {
|
|
81
|
-
const rows = makeRows(5);
|
|
82
|
-
const deps = makeDeps(rows);
|
|
83
|
-
const page = await queryNarrativeTimeline(FROM, TO, { limit: 20 }, deps);
|
|
84
|
-
assert.equal(page.entries.length, 5);
|
|
85
|
-
assert.equal(page.nextCursor, undefined);
|
|
86
|
-
assert.equal(page.truncated, false);
|
|
87
|
-
});
|
|
88
|
-
it("default limit = 20 when opts.limit is undefined", async () => {
|
|
89
|
-
const rows = makeRows(25);
|
|
90
|
-
const deps = makeDeps(rows);
|
|
91
|
-
const page = await queryNarrativeTimeline(FROM, TO, {}, deps);
|
|
92
|
-
assert.equal(page.entries.length, 20);
|
|
93
|
-
assert.ok(page.nextCursor !== undefined);
|
|
94
|
-
});
|
|
95
|
-
it("limit clamped to 30 (MAX_VERSIONS_PER_PAGE) when requested > 30", async () => {
|
|
96
|
-
const rows = makeRows(50);
|
|
97
|
-
const deps = makeDeps(rows);
|
|
98
|
-
const page = await queryNarrativeTimeline(FROM, TO, { limit: 999 }, deps);
|
|
99
|
-
assert.equal(page.entries.length, 30);
|
|
100
|
-
assert.ok(page.nextCursor !== undefined);
|
|
101
|
-
});
|
|
102
|
-
it("second page fetches entries after cursor boundary", async () => {
|
|
103
|
-
const rows = makeRows(30);
|
|
104
|
-
const deps = makeDeps(rows);
|
|
105
|
-
const page1 = await queryNarrativeTimeline(FROM, TO, { limit: 10 }, deps);
|
|
106
|
-
assert.equal(page1.entries.length, 10);
|
|
107
|
-
assert.ok(page1.nextCursor);
|
|
108
|
-
const page2 = await queryNarrativeTimeline(FROM, TO, { limit: 10, cursor: page1.nextCursor }, deps);
|
|
109
|
-
// Pages must not overlap
|
|
110
|
-
const page1Versions = new Set(page1.entries.map((e) => e.version));
|
|
111
|
-
const page2Versions = new Set(page2.entries.map((e) => e.version));
|
|
112
|
-
for (const v of page2Versions) {
|
|
113
|
-
assert.ok(!page1Versions.has(v), `version ${v} should not appear in page 1`);
|
|
114
|
-
}
|
|
115
|
-
assert.equal(page2.entries.length, 10);
|
|
116
|
-
});
|
|
117
|
-
it("from/to are echoed back in the result", async () => {
|
|
118
|
-
const deps = makeDeps([]);
|
|
119
|
-
const page = await queryNarrativeTimeline(FROM, TO, {}, deps);
|
|
120
|
-
assert.equal(page.from, FROM);
|
|
121
|
-
assert.equal(page.to, TO);
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
describe("queryNarrativeTimeline — range validation", () => {
|
|
125
|
-
it("throws NarrativeQueryRangeError when range > 90 days", async () => {
|
|
126
|
-
const deps = makeDeps([]);
|
|
127
|
-
// Jan 1 → Apr 2 = 91 days (31 Jan + 28 Feb + 31 Mar + 1 Apr = 91)
|
|
128
|
-
const farTo = "2026-04-02T00:00:00.000Z";
|
|
129
|
-
await assert.rejects(() => queryNarrativeTimeline(FROM, farTo, {}, deps), (err) => {
|
|
130
|
-
assert.ok(err instanceof NarrativeQueryRangeError);
|
|
131
|
-
assert.equal(err.code, "query_range_exceeded");
|
|
132
|
-
return true;
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
it("exactly 90 days does NOT throw", async () => {
|
|
136
|
-
const deps = makeDeps([]);
|
|
137
|
-
// Jan 1 → Apr 1 = 31 + 28 + 31 = 90 days exactly
|
|
138
|
-
const from = "2026-01-01T00:00:00.000Z";
|
|
139
|
-
const to = "2026-04-01T00:00:00.000Z";
|
|
140
|
-
await assert.doesNotReject(() => queryNarrativeTimeline(from, to, {}, deps));
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
describe("queryNarrativeTimeline — cursor roundtrip", () => {
|
|
144
|
-
it("encodeCursor / decodeCursor are inverse operations", () => {
|
|
145
|
-
const ts = "2026-01-15T10:30:00.000Z";
|
|
146
|
-
const cursor = encodeCursor(ts);
|
|
147
|
-
const decoded = decodeCursor(cursor);
|
|
148
|
-
assert.equal(decoded.ts, ts);
|
|
149
|
-
});
|
|
150
|
-
it("decodeCursor throws on garbage input", () => {
|
|
151
|
-
assert.throws(() => decodeCursor("not-a-valid-cursor!!"), /invalid_cursor/);
|
|
152
|
-
});
|
|
153
|
-
});
|
|
154
|
-
describe("queryNarrativeDiff", () => {
|
|
155
|
-
it("returns changes for differing fields", async () => {
|
|
156
|
-
const from = makeSnap("v1", { focus: "old_focus", progress: "old_prog" });
|
|
157
|
-
const to = makeSnap("v2", {
|
|
158
|
-
focus: "new_focus",
|
|
159
|
-
progress: "new_prog",
|
|
160
|
-
acceptedGoalId: "goal-2",
|
|
161
|
-
lastChangeReasonCode: "goal_accepted",
|
|
162
|
-
});
|
|
163
|
-
const deps = makeDeps([], { v1: from, v2: to });
|
|
164
|
-
const diff = await queryNarrativeDiff("v1", "v2", deps);
|
|
165
|
-
assert.equal(diff.fromVersion, "v1");
|
|
166
|
-
assert.equal(diff.toVersion, "v2");
|
|
167
|
-
assert.equal(diff.reasonCode, "goal_accepted");
|
|
168
|
-
assert.equal(diff.isNoChange, false);
|
|
169
|
-
const changedFields = diff.changes.map((c) => c.field);
|
|
170
|
-
assert.ok(changedFields.includes("focus"), "should include focus");
|
|
171
|
-
assert.ok(changedFields.includes("progress"), "should include progress");
|
|
172
|
-
assert.ok(changedFields.includes("acceptedGoalId"), "should include acceptedGoalId");
|
|
173
|
-
const focusChange = diff.changes.find((c) => c.field === "focus");
|
|
174
|
-
assert.equal(focusChange.from, "old_focus");
|
|
175
|
-
assert.equal(focusChange.to, "new_focus");
|
|
176
|
-
});
|
|
177
|
-
it("isNoChange = true when snapshots are identical", async () => {
|
|
178
|
-
const snap = makeSnap("v1");
|
|
179
|
-
const deps = makeDeps([], { v1: snap, v2: snap });
|
|
180
|
-
const diff = await queryNarrativeDiff("v1", "v2", deps);
|
|
181
|
-
assert.equal(diff.isNoChange, true);
|
|
182
|
-
assert.equal(diff.changes.length, 0);
|
|
183
|
-
assert.equal(diff.sourceRefChanges.added.length, 0);
|
|
184
|
-
assert.equal(diff.sourceRefChanges.removed.length, 0);
|
|
185
|
-
});
|
|
186
|
-
it("computes sourceRefs added/removed", async () => {
|
|
187
|
-
const from = makeSnap("v1", { sourceRefs: ["ref-a", "ref-b"] });
|
|
188
|
-
const to = makeSnap("v2", {
|
|
189
|
-
sourceRefs: ["ref-b", "ref-c"],
|
|
190
|
-
focus: makeSnap("v1").focus, // keep other fields same
|
|
191
|
-
});
|
|
192
|
-
// Force identical scalar fields so only sourceRefs differ
|
|
193
|
-
const toSnap = makeSnap("v2", {
|
|
194
|
-
...from,
|
|
195
|
-
version: "v2",
|
|
196
|
-
sourceRefs: ["ref-b", "ref-c"],
|
|
197
|
-
});
|
|
198
|
-
const deps = makeDeps([], { v1: from, v2: toSnap });
|
|
199
|
-
const diff = await queryNarrativeDiff("v1", "v2", deps);
|
|
200
|
-
assert.deepEqual(diff.sourceRefChanges.added, ["ref-c"]);
|
|
201
|
-
assert.deepEqual(diff.sourceRefChanges.removed, ["ref-a"]);
|
|
202
|
-
});
|
|
203
|
-
it("throws NarrativeVersionNotFoundError for unknown fromVersion", async () => {
|
|
204
|
-
const snap = makeSnap("v2");
|
|
205
|
-
const deps = makeDeps([], { v2: snap });
|
|
206
|
-
await assert.rejects(() => queryNarrativeDiff("v1_missing", "v2", deps), (err) => {
|
|
207
|
-
assert.ok(err instanceof NarrativeVersionNotFoundError);
|
|
208
|
-
assert.equal(err.code, "narrative_version_not_found");
|
|
209
|
-
return true;
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
it("throws NarrativeVersionNotFoundError for unknown toVersion", async () => {
|
|
213
|
-
const snap = makeSnap("v1");
|
|
214
|
-
const deps = makeDeps([], { v1: snap });
|
|
215
|
-
await assert.rejects(() => queryNarrativeDiff("v1", "v99_missing", deps), NarrativeVersionNotFoundError);
|
|
216
|
-
});
|
|
217
|
-
it("uses injected now() for computedAt", async () => {
|
|
218
|
-
const snap = makeSnap("v1");
|
|
219
|
-
const deps = {
|
|
220
|
-
...makeDeps([], { v1: snap, v2: snap }),
|
|
221
|
-
now: () => "2026-05-01T12:00:00.000Z",
|
|
222
|
-
};
|
|
223
|
-
const diff = await queryNarrativeDiff("v1", "v2", deps);
|
|
224
|
-
assert.equal(diff.computedAt, "2026-05-01T12:00:00.000Z");
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
describe("DR-032 — state-memory unavailable", () => {
|
|
228
|
-
it("queryNarrativeTimeline propagates error from listNarrativeTimeline", async () => {
|
|
229
|
-
const deps = {
|
|
230
|
-
stateMemoryPort: {
|
|
231
|
-
listNarrativeTimeline: async () => {
|
|
232
|
-
throw new Error("state_memory_unavailable");
|
|
233
|
-
},
|
|
234
|
-
getNarrativeSnapshot: async () => null,
|
|
235
|
-
},
|
|
236
|
-
};
|
|
237
|
-
await assert.rejects(() => queryNarrativeTimeline(FROM, TO, {}, deps), /state_memory_unavailable/);
|
|
238
|
-
});
|
|
239
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for RestoreAuditService — T-OBS.C.6
|
|
3
|
-
*
|
|
4
|
-
* Verification plan §t-obs-c-6:
|
|
5
|
-
* 1. Successful restore → audit entry with fromVersion / toVersion / reason
|
|
6
|
-
* 2. Partial restore → isPartialRestore=true + completedEntities + failedEntities
|
|
7
|
-
* 3. Credential entity excluded → excludedFields listed; credential values absent from payload
|
|
8
|
-
* 4. Audit write failure → fire-and-forget: result.ok=true + warning; no throw
|
|
9
|
-
* 5. Hash chain: second audit entry links previousHash to first entry
|
|
10
|
-
* 6. Audit family is "restore.audit"
|
|
11
|
-
* 7. completedEntities / failedEntities arrays are faithfully recorded
|
|
12
|
-
* 8. Credential values never appear in audit store
|
|
13
|
-
* 9. Audit payload does NOT include actual field values (only metadata)
|
|
14
|
-
* 10. traceId is propagated into envelope
|
|
15
|
-
*/
|
|
16
|
-
export {};
|