@haaaiawd/second-nature 0.1.43 → 0.1.50
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/HEARTBEAT.md +44 -0
- package/LICENSE +176 -0
- package/README.md +136 -0
- package/README.zh-CN.md +120 -0
- package/SKILL.md +320 -22
- package/dist/data/observability.db +0 -0
- package/dist/data/state.db +0 -0
- package/dist/plugin/index.d.ts +31 -0
- package/dist/plugin/workspace-ops-bridge.d.ts +15 -0
- package/dist/scripts/build-plugin-package.d.ts +12 -0
- package/dist/scripts/build-plugin-package.js +220 -0
- package/dist/scripts/build-plugin-runtime.d.ts +10 -0
- package/dist/scripts/build-plugin-runtime.js +198 -0
- package/dist/scripts/packaging-feasibility-poc.js +127 -0
- package/dist/scripts/plugin-smoke-check.js +124 -0
- package/dist/src/cli/action-bridge.d.ts +11 -0
- package/dist/src/cli/index.d.ts +65 -0
- package/dist/src/cli/ops/heartbeat-surface.d.ts +84 -0
- package/dist/src/cli/ops/heartbeat-surface.js +100 -0
- package/dist/src/cli/ops/ops-router.js +1482 -0
- package/dist/src/cli/ops/workspace-heartbeat-runner.d.ts +85 -0
- package/dist/src/cli/ops/workspace-heartbeat-runner.js +242 -0
- package/dist/src/core/second-nature/heartbeat/goal-lifecycle-policy.d.ts +24 -0
- package/dist/src/core/second-nature/heartbeat/goal-lifecycle-policy.js +61 -0
- package/dist/src/core/second-nature/heartbeat/heartbeat-loop.d.ts +97 -0
- package/dist/src/core/second-nature/heartbeat/heartbeat-loop.js +397 -0
- package/dist/src/core/second-nature/orchestrator/platform-capability-router.js +149 -0
- package/dist/src/storage/snapshots/types.js +1 -0
- package/dist/src/storage/user-interest/types.js +1 -0
- package/dist/tests/integration/cli/cli-ops-surface.test.d.ts +1 -0
- package/dist/tests/integration/cli/cli-ops-surface.test.js +380 -0
- package/dist/tests/integration/cli/heartbeat-surface-workspace.test.d.ts +1 -0
- package/dist/tests/integration/cli/heartbeat-surface-workspace.test.js +61 -0
- package/dist/tests/integration/cli/host-capability-probe.test.d.ts +1 -0
- package/dist/tests/integration/cli/host-capability-probe.test.js +37 -0
- package/dist/tests/integration/cli/host-smoke-heartbeat-tool.test.d.ts +1 -0
- package/dist/tests/integration/cli/host-smoke-heartbeat-tool.test.js +34 -0
- package/dist/tests/integration/cli/plugin-packaging-walkthrough.test.d.ts +1 -0
- package/dist/tests/integration/cli/plugin-packaging-walkthrough.test.js +79 -0
- package/dist/tests/integration/cli/plugin-runtime-registration.test.d.ts +1 -0
- package/dist/tests/integration/cli/plugin-runtime-registration.test.js +285 -0
- package/dist/tests/integration/cli/plugin-workspace-ops-bridge.test.d.ts +1 -0
- package/dist/tests/integration/cli/plugin-workspace-ops-bridge.test.js +487 -0
- package/dist/tests/integration/cli/t1-2-1-explain-read-models.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-1-explain-read-models.test.js +58 -0
- package/dist/tests/integration/cli/t1-2-1-narrative-command.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-1-narrative-command.test.js +194 -0
- package/dist/tests/integration/cli/t1-2-2-dream-recent.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-2-dream-recent.test.js +100 -0
- package/dist/tests/integration/cli/t1-2-3-status-observability-writeback.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-3-status-observability-writeback.test.js +71 -0
- package/dist/tests/integration/cli/t1-2-4-quiet-report-read-canonical.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-4-quiet-report-read-canonical.test.js +206 -0
- package/dist/tests/integration/cli/t1-2-5-cycle-recent.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-5-cycle-recent.test.js +156 -0
- package/dist/tests/integration/cli/t1-2-5-status-delivery-posture-audit-store.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-5-status-delivery-posture-audit-store.test.js +95 -0
- package/dist/tests/integration/cli/t1-2-6-policy-show-non-shell.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-6-policy-show-non-shell.test.js +74 -0
- package/dist/tests/integration/cli/t1-2-6-status-aggregate.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-6-status-aggregate.test.js +223 -0
- package/dist/tests/integration/cli/t1-2-7-audit-command-minimal-closure.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-7-audit-command-minimal-closure.test.js +101 -0
- package/dist/tests/integration/cli/t1-2-8-capability-probe-ops-surface.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-8-capability-probe-ops-surface.test.js +74 -0
- package/dist/tests/integration/cli/t1-2-9-decision-denied-not-degraded.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-2-9-decision-denied-not-degraded.test.js +79 -0
- package/dist/tests/integration/cli/t1-4-1-runtime-secret-bootstrap.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-4-1-runtime-secret-bootstrap.test.js +139 -0
- package/dist/tests/integration/cli/t1-4-2-activation-ux-contract.test.d.ts +1 -0
- package/dist/tests/integration/cli/t1-4-2-activation-ux-contract.test.js +143 -0
- package/dist/tests/integration/cli/t2-2-2-snapshot-life-evidence.test.d.ts +1 -0
- package/dist/tests/integration/cli/t2-2-2-snapshot-life-evidence.test.js +116 -0
- package/dist/tests/integration/cli/t3-3-2-near-real-smoke-cli-bridge.test.d.ts +1 -0
- package/dist/tests/integration/cli/t3-3-2-near-real-smoke-cli-bridge.test.js +69 -0
- package/dist/tests/integration/connectors/connector-base.test.d.ts +1 -0
- package/dist/tests/integration/connectors/connector-base.test.js +211 -0
- package/dist/tests/integration/connectors/connector-executor-adapter-honest-failure.test.d.ts +1 -0
- package/dist/tests/integration/connectors/connector-executor-adapter-honest-failure.test.js +311 -0
- package/dist/tests/integration/connectors/credential-optional-regression.test.d.ts +1 -0
- package/dist/tests/integration/connectors/credential-optional-regression.test.js +117 -0
- package/dist/tests/integration/connectors/declarative-http-runner.test.d.ts +7 -0
- package/dist/tests/integration/connectors/declarative-http-runner.test.js +229 -0
- package/dist/tests/integration/connectors/evomap-secret-port.test.d.ts +1 -0
- package/dist/tests/integration/connectors/evomap-secret-port.test.js +83 -0
- package/dist/tests/integration/connectors/life-evidence-chain.test.d.ts +1 -0
- package/dist/tests/integration/connectors/life-evidence-chain.test.js +188 -0
- package/dist/tests/integration/connectors/moltbook-client.test.d.ts +1 -0
- package/dist/tests/integration/connectors/moltbook-client.test.js +274 -0
- package/dist/tests/integration/connectors/moltbook-mock-runner.test.d.ts +7 -0
- package/dist/tests/integration/connectors/moltbook-mock-runner.test.js +108 -0
- package/dist/tests/integration/connectors/near-real-connector-smoke.test.d.ts +1 -0
- package/dist/tests/integration/connectors/near-real-connector-smoke.test.js +38 -0
- package/dist/tests/integration/connectors/platform-adapters.test.d.ts +1 -0
- package/dist/tests/integration/connectors/platform-adapters.test.js +189 -0
- package/dist/tests/integration/connectors/policy-layer.test.d.ts +1 -0
- package/dist/tests/integration/connectors/policy-layer.test.js +249 -0
- package/dist/tests/integration/connectors/scriptable-node-e2e.test.d.ts +1 -0
- package/dist/tests/integration/connectors/scriptable-node-e2e.test.js +228 -0
- package/dist/tests/integration/connectors/t3-3-1-real-connector-evidence.test.d.ts +1 -0
- package/dist/tests/integration/connectors/t3-3-1-real-connector-evidence.test.js +171 -0
- package/dist/tests/integration/control-plane/_helpers/decision-cycle-harness.d.ts +40 -0
- package/dist/tests/integration/control-plane/_helpers/decision-cycle-harness.js +116 -0
- package/dist/tests/integration/control-plane/decision-loop-validation.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/decision-loop-validation.test.js +319 -0
- package/dist/tests/integration/control-plane/delivery-failed-fallback.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/delivery-failed-fallback.test.js +118 -0
- package/dist/tests/integration/control-plane/dream-projection-heartbeat.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/dream-projection-heartbeat.test.js +109 -0
- package/dist/tests/integration/control-plane/effect-dispatcher.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/effect-dispatcher.test.js +157 -0
- package/dist/tests/integration/control-plane/guidance-request.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/guidance-request.test.js +63 -0
- package/dist/tests/integration/control-plane/heartbeat-executor.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/heartbeat-executor.test.js +363 -0
- package/dist/tests/integration/control-plane/heartbeat-loop.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/heartbeat-loop.test.js +190 -0
- package/dist/tests/integration/control-plane/heartbeat-quiet-orchestration.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/heartbeat-quiet-orchestration.test.js +133 -0
- package/dist/tests/integration/control-plane/heartbeat-spine-integration.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/heartbeat-spine-integration.test.js +342 -0
- package/dist/tests/integration/control-plane/heartbeat-spine.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/heartbeat-spine.test.js +216 -0
- package/dist/tests/integration/control-plane/int-s3-outreach-delivery-quiet-closure.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/int-s3-outreach-delivery-quiet-closure.test.js +241 -0
- package/dist/tests/integration/control-plane/outreach-resume.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/outreach-resume.test.js +158 -0
- package/dist/tests/integration/control-plane/outreach-style.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/outreach-style.test.js +46 -0
- package/dist/tests/integration/control-plane/quiet-reflection.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/quiet-reflection.test.js +73 -0
- package/dist/tests/integration/control-plane/rhythm-intent-guard.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/rhythm-intent-guard.test.js +99 -0
- package/dist/tests/integration/control-plane/run-heartbeat-cycle.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/run-heartbeat-cycle.test.js +80 -0
- package/dist/tests/integration/control-plane/t2-3-1-outreach-v6.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/t2-3-1-outreach-v6.test.js +208 -0
- package/dist/tests/integration/control-plane/t2-4-1-heartbeat-platform-intent.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/t2-4-1-heartbeat-platform-intent.test.js +156 -0
- package/dist/tests/integration/control-plane/t2-4-2-source-backed-outreach-loop.test.d.ts +1 -0
- package/dist/tests/integration/control-plane/t2-4-2-source-backed-outreach-loop.test.js +188 -0
- package/dist/tests/integration/control-plane/v7c-evidence-body-feedback.test.d.ts +11 -0
- package/dist/tests/integration/control-plane/v7c-evidence-body-feedback.test.js +213 -0
- package/dist/tests/integration/control-plane/v7c-heartbeat-unlock-e2e.test.d.ts +9 -0
- package/dist/tests/integration/control-plane/v7c-heartbeat-unlock-e2e.test.js +134 -0
- package/dist/tests/integration/dream/quiet-dream-trigger.test.d.ts +1 -0
- package/dist/tests/integration/dream/quiet-dream-trigger.test.js +86 -0
- package/dist/tests/integration/dream/t7-1-1-dream-pipeline.test.d.ts +1 -0
- package/dist/tests/integration/dream/t7-1-1-dream-pipeline.test.js +378 -0
- package/dist/tests/integration/dream/t7-1-2-dream-scheduler.test.d.ts +1 -0
- package/dist/tests/integration/dream/t7-1-2-dream-scheduler.test.js +124 -0
- package/dist/tests/integration/dream/v7c-rhythm-loop.test.d.ts +10 -0
- package/dist/tests/integration/dream/v7c-rhythm-loop.test.js +185 -0
- package/dist/tests/integration/guidance/assembler-and-fallback.test.d.ts +1 -0
- package/dist/tests/integration/guidance/assembler-and-fallback.test.js +86 -0
- package/dist/tests/integration/guidance/outreach-draft-contract.test.d.ts +1 -0
- package/dist/tests/integration/guidance/outreach-draft-contract.test.js +106 -0
- package/dist/tests/integration/guidance/persona-selection.test.d.ts +1 -0
- package/dist/tests/integration/guidance/persona-selection.test.js +70 -0
- package/dist/tests/integration/guidance/template-review.test.d.ts +1 -0
- package/dist/tests/integration/guidance/template-review.test.js +26 -0
- package/dist/tests/integration/guidance/user-reply-continuity.test.d.ts +1 -0
- package/dist/tests/integration/guidance/user-reply-continuity.test.js +96 -0
- package/dist/tests/integration/guidance/v7c-guidance-chain.test.d.ts +1 -0
- package/dist/tests/integration/guidance/v7c-guidance-chain.test.js +190 -0
- package/dist/tests/integration/guidance/v7c-guidance-semantics.test.d.ts +1 -0
- package/dist/tests/integration/guidance/v7c-guidance-semantics.test.js +146 -0
- package/dist/tests/integration/observability/digest-delivery.test.d.ts +14 -0
- package/dist/tests/integration/observability/digest-delivery.test.js +160 -0
- package/dist/tests/integration/observability/evidence-query-engine.test.d.ts +1 -0
- package/dist/tests/integration/observability/evidence-query-engine.test.js +219 -0
- package/dist/tests/integration/observability/explain-query-export.test.d.ts +1 -0
- package/dist/tests/integration/observability/explain-query-export.test.js +92 -0
- package/dist/tests/integration/observability/guidance-audit.test.d.ts +1 -0
- package/dist/tests/integration/observability/guidance-audit.test.js +55 -0
- package/dist/tests/integration/observability/heartbeat-decision-record.test.d.ts +1 -0
- package/dist/tests/integration/observability/heartbeat-decision-record.test.js +223 -0
- package/dist/tests/integration/observability/heartbeat-narrative-trace.test.d.ts +1 -0
- package/dist/tests/integration/observability/heartbeat-narrative-trace.test.js +230 -0
- package/dist/tests/integration/observability/lived-experience-audit-chain.test.d.ts +1 -0
- package/dist/tests/integration/observability/lived-experience-audit-chain.test.js +43 -0
- package/dist/tests/integration/observability/observability-gates.test.d.ts +1 -0
- package/dist/tests/integration/observability/observability-gates.test.js +224 -0
- package/dist/tests/integration/observability/observability-retention-cleanup.test.d.ts +1 -0
- package/dist/tests/integration/observability/observability-retention-cleanup.test.js +94 -0
- package/dist/tests/integration/observability/observability-services.test.d.ts +1 -0
- package/dist/tests/integration/observability/observability-services.test.js +219 -0
- package/dist/tests/integration/observability/projections.test.d.ts +1 -0
- package/dist/tests/integration/observability/projections.test.js +36 -0
- package/dist/tests/integration/observability/t5-1-1-dream-trace-audit.test.d.ts +1 -0
- package/dist/tests/integration/observability/t5-1-1-dream-trace-audit.test.js +115 -0
- package/dist/tests/integration/plugin/plugin-registration.test.d.ts +16 -0
- package/dist/tests/integration/plugin/plugin-registration.test.js +151 -0
- package/dist/tests/integration/runtime-ops/commands.test.d.ts +16 -0
- package/dist/tests/integration/runtime-ops/commands.test.js +662 -0
- package/dist/tests/integration/s3-exit/int-s3-body-heartbeat.test.d.ts +15 -0
- package/dist/tests/integration/s3-exit/int-s3-body-heartbeat.test.js +462 -0
- package/dist/tests/integration/s5-exit/int-s5-observability.test.d.ts +17 -0
- package/dist/tests/integration/s5-exit/int-s5-observability.test.js +402 -0
- package/dist/tests/integration/state/t4-2-1-owner-reply-relationship-loop.test.d.ts +1 -0
- package/dist/tests/integration/state/t4-2-1-owner-reply-relationship-loop.test.js +132 -0
- package/dist/tests/integration/state/v7c-identity-goal-hygiene.test.d.ts +9 -0
- package/dist/tests/integration/state/v7c-identity-goal-hygiene.test.js +240 -0
- package/dist/tests/integration/storage/packaged-runtime-smoke.test.d.ts +1 -0
- package/dist/tests/integration/storage/packaged-runtime-smoke.test.js +17 -0
- package/dist/tests/integration/storage/persona-candidate-loader.test.d.ts +1 -0
- package/dist/tests/integration/storage/persona-candidate-loader.test.js +23 -0
- package/dist/tests/integration/storage/quiet-artifact-writer.test.d.ts +1 -0
- package/dist/tests/integration/storage/quiet-artifact-writer.test.js +66 -0
- package/dist/tests/integration/storage/repair-and-backup.test.d.ts +1 -0
- package/dist/tests/integration/storage/repair-and-backup.test.js +125 -0
- package/dist/tests/integration/storage/schema-migration.test.d.ts +11 -0
- package/dist/tests/integration/storage/schema-migration.test.js +183 -0
- package/dist/tests/integration/storage/storage-mode-smoke.test.d.ts +1 -0
- package/dist/tests/integration/storage/storage-mode-smoke.test.js +18 -0
- package/dist/tests/integration/storage/t4-1-5-memory-store-lifecycle.test.d.ts +1 -0
- package/dist/tests/integration/storage/t4-1-5-memory-store-lifecycle.test.js +118 -0
- package/dist/tests/unit/body/affordance-assembler.test.d.ts +14 -0
- package/dist/tests/unit/body/affordance-assembler.test.js +259 -0
- package/dist/tests/unit/body/affordance-context-scope.test.d.ts +12 -0
- package/dist/tests/unit/body/affordance-context-scope.test.js +73 -0
- package/dist/tests/unit/body/behavior-promotion-loop.test.d.ts +15 -0
- package/dist/tests/unit/body/behavior-promotion-loop.test.js +130 -0
- package/dist/tests/unit/body/circuit-breaker-manager.test.d.ts +13 -0
- package/dist/tests/unit/body/circuit-breaker-manager.test.js +160 -0
- package/dist/tests/unit/body/experience-writer.test.d.ts +11 -0
- package/dist/tests/unit/body/experience-writer.test.js +77 -0
- package/dist/tests/unit/body/pain-signal-query.test.d.ts +11 -0
- package/dist/tests/unit/body/pain-signal-query.test.js +104 -0
- package/dist/tests/unit/cli/connector-init-manifest.test.d.ts +9 -0
- package/dist/tests/unit/cli/connector-init-manifest.test.js +68 -0
- package/dist/tests/unit/cli/delivery-target-probe.test.d.ts +1 -0
- package/dist/tests/unit/cli/delivery-target-probe.test.js +108 -0
- package/dist/tests/unit/cli/host-capability.test.d.ts +1 -0
- package/dist/tests/unit/cli/host-capability.test.js +50 -0
- package/dist/tests/unit/cli/operator-fallback-view.test.d.ts +1 -0
- package/dist/tests/unit/cli/operator-fallback-view.test.js +60 -0
- package/dist/tests/unit/cli/runtime-artifact-boundary.test.d.ts +1 -0
- package/dist/tests/unit/cli/runtime-artifact-boundary.test.js +57 -0
- package/dist/tests/unit/cli/t1-2-3-connector-status.test.d.ts +1 -0
- package/dist/tests/unit/cli/t1-2-3-connector-status.test.js +214 -0
- package/dist/tests/unit/cli/t1-2-4-goal-command.test.d.ts +1 -0
- package/dist/tests/unit/cli/t1-2-4-goal-command.test.js +207 -0
- package/dist/tests/unit/cli/t1-3-1-connector-init.test.d.ts +1 -0
- package/dist/tests/unit/cli/t1-3-1-connector-init.test.js +212 -0
- package/dist/tests/unit/connectors/connector-manifest-and-evidence-map.test.d.ts +1 -0
- package/dist/tests/unit/connectors/connector-manifest-and-evidence-map.test.js +71 -0
- package/dist/tests/unit/connectors/effect-commit-ledger-sqlite.test.d.ts +10 -0
- package/dist/tests/unit/connectors/effect-commit-ledger-sqlite.test.js +101 -0
- package/dist/tests/unit/connectors/evomap-runner.test.d.ts +1 -0
- package/dist/tests/unit/connectors/evomap-runner.test.js +136 -0
- package/dist/tests/unit/connectors/execution-policy.test.d.ts +1 -0
- package/dist/tests/unit/connectors/execution-policy.test.js +71 -0
- package/dist/tests/unit/connectors/instreet-registration.test.d.ts +1 -0
- package/dist/tests/unit/connectors/instreet-registration.test.js +102 -0
- package/dist/tests/unit/connectors/manifest-v7-schema.test.d.ts +9 -0
- package/dist/tests/unit/connectors/manifest-v7-schema.test.js +165 -0
- package/dist/tests/unit/connectors/scriptable-node-runner.test.d.ts +1 -0
- package/dist/tests/unit/connectors/scriptable-node-runner.test.js +246 -0
- package/dist/tests/unit/connectors/structured-unavailable-reason.test.d.ts +11 -0
- package/dist/tests/unit/connectors/structured-unavailable-reason.test.js +76 -0
- package/dist/tests/unit/connectors/t3-1-1-dynamic-registry.test.d.ts +1 -0
- package/dist/tests/unit/connectors/t3-1-1-dynamic-registry.test.js +178 -0
- package/dist/tests/unit/connectors/t3-1-2-capability-registry.test.d.ts +1 -0
- package/dist/tests/unit/connectors/t3-1-2-capability-registry.test.js +105 -0
- package/dist/tests/unit/connectors/t3-2-1-v5-parity.test.d.ts +1 -0
- package/dist/tests/unit/connectors/t3-2-1-v5-parity.test.js +103 -0
- package/dist/tests/unit/connectors/t3-3-1-evidence-mapper.test.d.ts +1 -0
- package/dist/tests/unit/connectors/t3-3-1-evidence-mapper.test.js +198 -0
- package/dist/tests/unit/connectors/t3-3-1-evidence-redaction.test.d.ts +1 -0
- package/dist/tests/unit/connectors/t3-3-1-evidence-redaction.test.js +95 -0
- package/dist/tests/unit/connectors/wet-probe-runner.test.d.ts +11 -0
- package/dist/tests/unit/connectors/wet-probe-runner.test.js +84 -0
- package/dist/tests/unit/control-plane/decision-trace-emitter.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/decision-trace-emitter.test.js +51 -0
- package/dist/tests/unit/control-plane/downstream-intent-orchestrator.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/downstream-intent-orchestrator.test.js +57 -0
- package/dist/tests/unit/control-plane/embodied-context-assembler.test.d.ts +13 -0
- package/dist/tests/unit/control-plane/embodied-context-assembler.test.js +182 -0
- package/dist/tests/unit/control-plane/goal-lifecycle-policy.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/goal-lifecycle-policy.test.js +75 -0
- package/dist/tests/unit/control-plane/hard-guard-evaluator.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/hard-guard-evaluator.test.js +113 -0
- package/dist/tests/unit/control-plane/idle-curiosity-policy.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/idle-curiosity-policy.test.js +69 -0
- package/dist/tests/unit/control-plane/intent-planner-source-ref-fallback.test.d.ts +7 -0
- package/dist/tests/unit/control-plane/intent-planner-source-ref-fallback.test.js +124 -0
- package/dist/tests/unit/control-plane/rhythm-policy-snapshot-window.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/rhythm-policy-snapshot-window.test.js +64 -0
- package/dist/tests/unit/control-plane/run-heartbeat-cycle-v7.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/run-heartbeat-cycle-v7.test.js +165 -0
- package/dist/tests/unit/control-plane/t2-1-4-goal-priority.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/t2-1-4-goal-priority.test.js +185 -0
- package/dist/tests/unit/control-plane/t2-1-5-narrative-update.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/t2-1-5-narrative-update.test.js +313 -0
- package/dist/tests/unit/control-plane/t2-4-1-credential-route.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/t2-4-1-credential-route.test.js +75 -0
- package/dist/tests/unit/control-plane/t2-4-1-platform-intent.test.d.ts +1 -0
- package/dist/tests/unit/control-plane/t2-4-1-platform-intent.test.js +168 -0
- package/dist/tests/unit/core/outreach-judgment.test.d.ts +1 -0
- package/dist/tests/unit/core/outreach-judgment.test.js +109 -0
- package/dist/tests/unit/core/resolve-allowed-intent.test.d.ts +1 -0
- package/dist/tests/unit/core/resolve-allowed-intent.test.js +69 -0
- package/dist/tests/unit/core/t2-2-3-connector-action-honest-result.test.d.ts +1 -0
- package/dist/tests/unit/core/t2-2-3-connector-action-honest-result.test.js +130 -0
- package/dist/tests/unit/core/t2-2-3-connector-dispatch-wired.test.d.ts +1 -0
- package/dist/tests/unit/core/t2-2-3-connector-dispatch-wired.test.js +99 -0
- package/dist/tests/unit/dream/dream-input-loader.test.d.ts +15 -0
- package/dist/tests/unit/dream/dream-input-loader.test.js +424 -0
- package/dist/tests/unit/dream/dream-scheduler.test.d.ts +1 -0
- package/dist/tests/unit/dream/dream-scheduler.test.js +57 -0
- package/dist/tests/unit/dream/t-dqs-c3-redacted-evidence.test.d.ts +11 -0
- package/dist/tests/unit/dream/t-dqs-c3-redacted-evidence.test.js +298 -0
- package/dist/tests/unit/dream/t7-1-3-insight-extraction.test.d.ts +1 -0
- package/dist/tests/unit/dream/t7-1-3-insight-extraction.test.js +79 -0
- package/dist/tests/unit/dream/t7-1-4-narrative-update.test.d.ts +1 -0
- package/dist/tests/unit/dream/t7-1-4-narrative-update.test.js +93 -0
- package/dist/tests/unit/dream/t7-1-5-relationship-update.test.d.ts +1 -0
- package/dist/tests/unit/dream/t7-1-5-relationship-update.test.js +116 -0
- package/dist/tests/unit/feedback/t4-2-1-owner-reply-inference.test.d.ts +1 -0
- package/dist/tests/unit/feedback/t4-2-1-owner-reply-inference.test.js +58 -0
- package/dist/tests/unit/guidance/capability-class.test.d.ts +1 -0
- package/dist/tests/unit/guidance/capability-class.test.js +96 -0
- package/dist/tests/unit/guidance/channel-feedback-ingestion.test.d.ts +1 -0
- package/dist/tests/unit/guidance/channel-feedback-ingestion.test.js +163 -0
- package/dist/tests/unit/guidance/evidence-guidance.test.d.ts +1 -0
- package/dist/tests/unit/guidance/evidence-guidance.test.js +40 -0
- package/dist/tests/unit/guidance/guidance-draft-service.test.d.ts +1 -0
- package/dist/tests/unit/guidance/guidance-draft-service.test.js +140 -0
- package/dist/tests/unit/guidance/impulse-assembler.test.d.ts +1 -0
- package/dist/tests/unit/guidance/impulse-assembler.test.js +169 -0
- package/dist/tests/unit/guidance/outreach-draft-schema.test.d.ts +1 -0
- package/dist/tests/unit/guidance/outreach-draft-schema.test.js +56 -0
- package/dist/tests/unit/guidance/outreach-strategy-selector.test.d.ts +1 -0
- package/dist/tests/unit/guidance/outreach-strategy-selector.test.js +208 -0
- package/dist/tests/unit/guidance/outreach-style-fixtures.test.d.ts +1 -0
- package/dist/tests/unit/guidance/outreach-style-fixtures.test.js +81 -0
- package/dist/tests/unit/guidance/t6-1-1-narrative-outreach.test.d.ts +1 -0
- package/dist/tests/unit/guidance/t6-1-1-narrative-outreach.test.js +256 -0
- package/dist/tests/unit/observability/audit-envelope.test.d.ts +1 -0
- package/dist/tests/unit/observability/audit-envelope.test.js +169 -0
- package/dist/tests/unit/observability/connector-inventory-ledger.test.d.ts +1 -0
- package/dist/tests/unit/observability/connector-inventory-ledger.test.js +128 -0
- package/dist/tests/unit/observability/family-registry.test.d.ts +12 -0
- package/dist/tests/unit/observability/family-registry.test.js +105 -0
- package/dist/tests/unit/observability/governance-plane-recorder.test.d.ts +1 -0
- package/dist/tests/unit/observability/governance-plane-recorder.test.js +72 -0
- package/dist/tests/unit/observability/heartbeat-digest-assembler.test.d.ts +1 -0
- package/dist/tests/unit/observability/heartbeat-digest-assembler.test.js +227 -0
- package/dist/tests/unit/observability/lived-experience-audit.test.d.ts +1 -0
- package/dist/tests/unit/observability/lived-experience-audit.test.js +105 -0
- package/dist/tests/unit/observability/narrative-timeline-query.test.d.ts +18 -0
- package/dist/tests/unit/observability/narrative-timeline-query.test.js +239 -0
- package/dist/tests/unit/observability/restore-audit-service.test.d.ts +16 -0
- package/dist/tests/unit/observability/restore-audit-service.test.js +186 -0
- package/dist/tests/unit/observability/runtime-decision-recorder.test.d.ts +1 -0
- package/dist/tests/unit/observability/runtime-decision-recorder.test.js +66 -0
- package/dist/tests/unit/observability/runtime-secret-anchor-view.test.d.ts +18 -0
- package/dist/tests/unit/observability/runtime-secret-anchor-view.test.js +209 -0
- package/dist/tests/unit/observability/self-health-snapshot.test.d.ts +1 -0
- package/dist/tests/unit/observability/self-health-snapshot.test.js +223 -0
- package/dist/tests/unit/observability/verify-audit-hash-chain.test.d.ts +1 -0
- package/dist/tests/unit/observability/verify-audit-hash-chain.test.js +93 -0
- package/dist/tests/unit/ops/manual-run-dispatcher.test.d.ts +13 -0
- package/dist/tests/unit/ops/manual-run-dispatcher.test.js +219 -0
- package/dist/tests/unit/quiet/claim-synthesizer.test.d.ts +17 -0
- package/dist/tests/unit/quiet/claim-synthesizer.test.js +289 -0
- package/dist/tests/unit/quiet/daily-diary-writer.test.d.ts +12 -0
- package/dist/tests/unit/quiet/daily-diary-writer.test.js +108 -0
- package/dist/tests/unit/shared/v7-entities.test.d.ts +13 -0
- package/dist/tests/unit/shared/v7-entities.test.js +306 -0
- package/dist/tests/unit/storage/delivery-attempt.test.d.ts +1 -0
- package/dist/tests/unit/storage/delivery-attempt.test.js +72 -0
- package/dist/tests/unit/storage/diary-dream-store.test.d.ts +12 -0
- package/dist/tests/unit/storage/diary-dream-store.test.js +118 -0
- package/dist/tests/unit/storage/embodied-context-state-port.test.d.ts +4 -0
- package/dist/tests/unit/storage/embodied-context-state-port.test.js +77 -0
- package/dist/tests/unit/storage/goal-lifecycle-store.test.d.ts +4 -0
- package/dist/tests/unit/storage/goal-lifecycle-store.test.js +143 -0
- package/dist/tests/unit/storage/history-digest-store.test.d.ts +10 -0
- package/dist/tests/unit/storage/history-digest-store.test.js +126 -0
- package/dist/tests/unit/storage/identity-profile-store.test.d.ts +4 -0
- package/dist/tests/unit/storage/identity-profile-store.test.js +48 -0
- package/dist/tests/unit/storage/life-evidence-snapshot.test.d.ts +1 -0
- package/dist/tests/unit/storage/life-evidence-snapshot.test.js +60 -0
- package/dist/tests/unit/storage/life-evidence.test.d.ts +1 -0
- package/dist/tests/unit/storage/life-evidence.test.js +54 -0
- package/dist/tests/unit/storage/migration-runner.test.d.ts +12 -0
- package/dist/tests/unit/storage/migration-runner.test.js +197 -0
- package/dist/tests/unit/storage/repair-gate.test.d.ts +1 -0
- package/dist/tests/unit/storage/repair-gate.test.js +41 -0
- package/dist/tests/unit/storage/restore-snapshot-store.test.d.ts +11 -0
- package/dist/tests/unit/storage/restore-snapshot-store.test.js +161 -0
- package/dist/tests/unit/storage/rhythm-policy-snapshot.test.d.ts +1 -0
- package/dist/tests/unit/storage/rhythm-policy-snapshot.test.js +31 -0
- package/dist/tests/unit/storage/runtime-secret-anchor-store.test.d.ts +10 -0
- package/dist/tests/unit/storage/runtime-secret-anchor-store.test.js +81 -0
- package/dist/tests/unit/storage/t1-4-1-credential-health-mapper.test.d.ts +1 -0
- package/dist/tests/unit/storage/t1-4-1-credential-health-mapper.test.js +83 -0
- package/dist/tests/unit/storage/t4-1-1-session-chronicle.test.d.ts +1 -0
- package/dist/tests/unit/storage/t4-1-1-session-chronicle.test.js +112 -0
- package/dist/tests/unit/storage/t4-1-2-narrative-state.test.d.ts +1 -0
- package/dist/tests/unit/storage/t4-1-2-narrative-state.test.js +80 -0
- package/dist/tests/unit/storage/t4-1-3-relationship-memory.test.d.ts +1 -0
- package/dist/tests/unit/storage/t4-1-3-relationship-memory.test.js +65 -0
- package/dist/tests/unit/storage/t4-1-4-agent-goal.test.d.ts +1 -0
- package/dist/tests/unit/storage/t4-1-4-agent-goal.test.js +166 -0
- package/dist/tests/unit/storage/tool-experience-store.test.d.ts +4 -0
- package/dist/tests/unit/storage/tool-experience-store.test.js +92 -0
- package/dist/tests/unit/storage/user-interest-snapshot.test.d.ts +1 -0
- package/dist/tests/unit/storage/user-interest-snapshot.test.js +48 -0
- package/dist/tests/unit/storage/write-queue.test.d.ts +12 -0
- package/dist/tests/unit/storage/write-queue.test.js +177 -0
- package/dist/tests/unit/storage/write-validation-gate.test.d.ts +9 -0
- package/dist/tests/unit/storage/write-validation-gate.test.js +153 -0
- package/docs/claw-second-nature-inner-guide.md +144 -0
- package/package.json +84 -55
- package/agent-inner-guide.md +0 -187
- package/openclaw.plugin.json +0 -29
- package/runtime/cli/ops/heartbeat-surface.d.ts +0 -75
- package/runtime/cli/ops/heartbeat-surface.js +0 -97
- package/runtime/cli/ops/ops-router.js +0 -1454
- package/runtime/cli/ops/workspace-heartbeat-runner.d.ts +0 -76
- package/runtime/cli/ops/workspace-heartbeat-runner.js +0 -236
- package/runtime/core/second-nature/heartbeat/goal-lifecycle-policy.d.ts +0 -37
- package/runtime/core/second-nature/heartbeat/goal-lifecycle-policy.js +0 -61
- package/runtime/core/second-nature/heartbeat/heartbeat-loop.d.ts +0 -88
- package/runtime/core/second-nature/heartbeat/heartbeat-loop.js +0 -329
- package/runtime/core/second-nature/orchestrator/platform-capability-router.js +0 -131
- /package/{index.js → dist/plugin/index.js} +0 -0
- /package/{workspace-ops-bridge.js → dist/plugin/workspace-ops-bridge.js} +0 -0
- /package/{runtime/cli/read-models/types.js → dist/scripts/packaging-feasibility-poc.d.ts} +0 -0
- /package/{runtime/core/second-nature/types.js → dist/scripts/plugin-smoke-check.d.ts} +0 -0
- /package/{runtime → dist/src}/cli/action-bridge.js +0 -0
- /package/{runtime → dist/src}/cli/commands/connector-behavior.d.ts +0 -0
- /package/{runtime → dist/src}/cli/commands/connector-behavior.js +0 -0
- /package/{runtime → dist/src}/cli/commands/connector-init.d.ts +0 -0
- /package/{runtime → dist/src}/cli/commands/connector-init.js +0 -0
- /package/{runtime → dist/src}/cli/commands/connector-status.d.ts +0 -0
- /package/{runtime → dist/src}/cli/commands/connector-status.js +0 -0
- /package/{runtime → dist/src}/cli/commands/credential.d.ts +0 -0
- /package/{runtime → dist/src}/cli/commands/credential.js +0 -0
- /package/{runtime → dist/src}/cli/commands/goal.d.ts +0 -0
- /package/{runtime → dist/src}/cli/commands/goal.js +0 -0
- /package/{runtime → dist/src}/cli/commands/index.d.ts +0 -0
- /package/{runtime → dist/src}/cli/commands/index.js +0 -0
- /package/{runtime → dist/src}/cli/commands/policy.d.ts +0 -0
- /package/{runtime → dist/src}/cli/commands/policy.js +0 -0
- /package/{runtime → dist/src}/cli/explain/explain-surface-subject.d.ts +0 -0
- /package/{runtime → dist/src}/cli/explain/explain-surface-subject.js +0 -0
- /package/{runtime → dist/src}/cli/explain/format-explanation.d.ts +0 -0
- /package/{runtime → dist/src}/cli/explain/format-explanation.js +0 -0
- /package/{runtime → dist/src}/cli/explain/resolve-subject.d.ts +0 -0
- /package/{runtime → dist/src}/cli/explain/resolve-subject.js +0 -0
- /package/{runtime → dist/src}/cli/host-capability/classify-delivery.d.ts +0 -0
- /package/{runtime → dist/src}/cli/host-capability/classify-delivery.js +0 -0
- /package/{runtime → dist/src}/cli/host-capability/probe-host-capability.d.ts +0 -0
- /package/{runtime → dist/src}/cli/host-capability/probe-host-capability.js +0 -0
- /package/{runtime → dist/src}/cli/host-capability/record-host-capability.d.ts +0 -0
- /package/{runtime → dist/src}/cli/host-capability/record-host-capability.js +0 -0
- /package/{runtime → dist/src}/cli/host-capability/types.d.ts +0 -0
- /package/{runtime → dist/src}/cli/host-capability/types.js +0 -0
- /package/{runtime → dist/src}/cli/host-smoke/run-host-smoke.d.ts +0 -0
- /package/{runtime → dist/src}/cli/host-smoke/run-host-smoke.js +0 -0
- /package/{runtime → dist/src}/cli/host-smoke/types.d.ts +0 -0
- /package/{runtime → dist/src}/cli/host-smoke/types.js +0 -0
- /package/{runtime → dist/src}/cli/index.js +0 -0
- /package/{runtime → dist/src}/cli/ops/manual-run-dispatcher.d.ts +0 -0
- /package/{runtime → dist/src}/cli/ops/manual-run-dispatcher.js +0 -0
- /package/{runtime → dist/src}/cli/ops/ops-router.d.ts +0 -0
- /package/{runtime → dist/src}/cli/ops/show-operator-fallback.d.ts +0 -0
- /package/{runtime → dist/src}/cli/ops/show-operator-fallback.js +0 -0
- /package/{runtime → dist/src}/cli/read-models/index.d.ts +0 -0
- /package/{runtime → dist/src}/cli/read-models/index.js +0 -0
- /package/{runtime → dist/src}/cli/read-models/operator-explain-map.d.ts +0 -0
- /package/{runtime → dist/src}/cli/read-models/operator-explain-map.js +0 -0
- /package/{runtime → dist/src}/cli/read-models/types.d.ts +0 -0
- /package/{runtime/guidance → dist/src/cli/read-models}/types.js +0 -0
- /package/{runtime → dist/src}/cli/runtime/runtime-artifact-boundary.d.ts +0 -0
- /package/{runtime → dist/src}/cli/runtime/runtime-artifact-boundary.js +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/agent-world/adapter.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/agent-world/adapter.js +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/agent-world/index.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/agent-world/index.js +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/agent-world/manifest.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/agent-world/manifest.js +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/evomap/adapter.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/evomap/adapter.js +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/evomap/index.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/evomap/index.js +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/evomap/manifest.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/agent-network/evomap/manifest.js +0 -0
- /package/{runtime → dist/src}/connectors/base/channel-health.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/channel-health.js +0 -0
- /package/{runtime → dist/src}/connectors/base/contract.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/contract.js +0 -0
- /package/{runtime → dist/src}/connectors/base/effect-commit-ledger-sqlite.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/effect-commit-ledger-sqlite.js +0 -0
- /package/{runtime → dist/src}/connectors/base/execution-policy.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/execution-policy.js +0 -0
- /package/{runtime → dist/src}/connectors/base/failure-taxonomy.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/failure-taxonomy.js +0 -0
- /package/{runtime → dist/src}/connectors/base/index.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/index.js +0 -0
- /package/{runtime → dist/src}/connectors/base/manifest-v7.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/manifest-v7.js +0 -0
- /package/{runtime → dist/src}/connectors/base/manifest.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/manifest.js +0 -0
- /package/{runtime → dist/src}/connectors/base/map-life-evidence.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/map-life-evidence.js +0 -0
- /package/{runtime → dist/src}/connectors/base/policy-layer.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/policy-layer.js +0 -0
- /package/{runtime → dist/src}/connectors/base/route-planner.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/route-planner.js +0 -0
- /package/{runtime → dist/src}/connectors/base/structured-unavailable-reason.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/structured-unavailable-reason.js +0 -0
- /package/{runtime → dist/src}/connectors/base/wet-probe-runner.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/base/wet-probe-runner.js +0 -0
- /package/{runtime → dist/src}/connectors/index.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/index.js +0 -0
- /package/{runtime → dist/src}/connectors/manifest/manifest-parser.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/manifest/manifest-parser.js +0 -0
- /package/{runtime → dist/src}/connectors/manifest/manifest-schema.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/manifest/manifest-schema.js +0 -0
- /package/{runtime → dist/src}/connectors/near-real/near-real-connector-smoke.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/near-real/near-real-connector-smoke.js +0 -0
- /package/{runtime → dist/src}/connectors/registry/dynamic-connector-registry.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/registry/dynamic-connector-registry.js +0 -0
- /package/{runtime → dist/src}/connectors/registry/index.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/registry/index.js +0 -0
- /package/{runtime → dist/src}/connectors/registry/manifest-scanner.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/registry/manifest-scanner.js +0 -0
- /package/{runtime → dist/src}/connectors/registry/trust-policy.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/registry/trust-policy.js +0 -0
- /package/{runtime → dist/src}/connectors/services/connector-executor-adapter.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/services/connector-executor-adapter.js +0 -0
- /package/{runtime → dist/src}/connectors/services/credential-route-context.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/services/credential-route-context.js +0 -0
- /package/{runtime → dist/src}/connectors/social-community/instreet/adapter.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/social-community/instreet/adapter.js +0 -0
- /package/{runtime → dist/src}/connectors/social-community/instreet/index.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/social-community/instreet/index.js +0 -0
- /package/{runtime → dist/src}/connectors/social-community/instreet/manifest.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/social-community/instreet/manifest.js +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/adapter.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/adapter.js +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/api-client.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/api-client.js +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/index.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/index.js +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/manifest.d.ts +0 -0
- /package/{runtime → dist/src}/connectors/social-community/moltbook/manifest.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/behavior-promotion/behavior-promotion-loop.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/behavior-promotion/behavior-promotion-loop.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/circuit-breaker/circuit-breaker-manager.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/circuit-breaker/circuit-breaker-manager.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/probe-signal-adapter.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/probe-signal-adapter.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-affordance/affordance-assembler.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-affordance/affordance-assembler.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-affordance/affordance-context-scope.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-affordance/affordance-context-scope.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-experience/experience-writer.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-experience/experience-writer.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-experience/pain-signal-query.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/body/tool-experience/pain-signal-query.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/feedback/owner-reply-feedback.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/feedback/owner-reply-feedback.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/guidance/apply-guidance.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/guidance/apply-guidance.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/guidance/request-guidance.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/guidance/request-guidance.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/guidance/user-reply-continuity.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/guidance/user-reply-continuity.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/decision-trace-emitter.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/decision-trace-emitter.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/embodied-context-assembler.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/embodied-context-assembler.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/heartbeat-executor.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/heartbeat-executor.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/idle-curiosity-policy.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/idle-curiosity-policy.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/index.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/index.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/run-heartbeat-cycle-v7.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/run-heartbeat-cycle-v7.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/run-heartbeat-cycle.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/run-heartbeat-cycle.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/runtime-snapshot.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/runtime-snapshot.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/scope-router.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/scope-router.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/signal.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/signal.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/snapshot-builder.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/heartbeat/snapshot-builder.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/index.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/index.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/downstream-intent-orchestrator.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/downstream-intent-orchestrator.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/effect-dispatcher.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/effect-dispatcher.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/goal-priority.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/goal-priority.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/guard-layer.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/guard-layer.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/hard-guard-evaluator.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/hard-guard-evaluator.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/index.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/index.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/intent-planner.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/intent-planner.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/lease-manager.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/lease-manager.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/narrative-update.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/narrative-update.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/platform-capability-router.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/resume-from-checkpoint.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/orchestrator/resume-from-checkpoint.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/build-message.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/build-message.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/build-outreach-draft-request.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/build-outreach-draft-request.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/delivery-target.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/delivery-target.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/dispatch-user-outreach.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/dispatch-user-outreach.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/evaluate-outreach.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/evaluate-outreach.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/judge-input-from-snapshot.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/judge-input-from-snapshot.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/judge-outreach.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/outreach/judge-outreach.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/claim-synthesizer.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/claim-synthesizer.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/daily-diary-writer.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/daily-diary-writer.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/index.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/index.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/quiet-pipeline.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/quiet-pipeline.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/run-source-backed-quiet.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/quiet/run-source-backed-quiet.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/reflection/run-narrative-reflection.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/reflection/run-narrative-reflection.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/planner-rhythm-window.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/planner-rhythm-window.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/policy-bridge.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/policy-bridge.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/rhythm-policy.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/rhythm-policy.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/select-window.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/rhythm/select-window.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/runtime/lifecycle-service.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/runtime/lifecycle-service.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/runtime/service-entry.d.ts +0 -0
- /package/{runtime → dist/src}/core/second-nature/runtime/service-entry.js +0 -0
- /package/{runtime → dist/src}/core/second-nature/types.d.ts +0 -0
- /package/{runtime/storage/delivery → dist/src/core/second-nature}/types.js +0 -0
- /package/{runtime → dist/src}/dream/dream-engine.d.ts +0 -0
- /package/{runtime → dist/src}/dream/dream-engine.js +0 -0
- /package/{runtime → dist/src}/dream/dream-input-loader.d.ts +0 -0
- /package/{runtime → dist/src}/dream/dream-input-loader.js +0 -0
- /package/{runtime → dist/src}/dream/dream-scheduler.d.ts +0 -0
- /package/{runtime → dist/src}/dream/dream-scheduler.js +0 -0
- /package/{runtime → dist/src}/dream/index.d.ts +0 -0
- /package/{runtime → dist/src}/dream/index.js +0 -0
- /package/{runtime → dist/src}/dream/insight-extractor.d.ts +0 -0
- /package/{runtime → dist/src}/dream/insight-extractor.js +0 -0
- /package/{runtime → dist/src}/dream/memory-consolidator.d.ts +0 -0
- /package/{runtime → dist/src}/dream/memory-consolidator.js +0 -0
- /package/{runtime → dist/src}/dream/narrative-update-proposal.d.ts +0 -0
- /package/{runtime → dist/src}/dream/narrative-update-proposal.js +0 -0
- /package/{runtime → dist/src}/dream/output-validator.d.ts +0 -0
- /package/{runtime → dist/src}/dream/output-validator.js +0 -0
- /package/{runtime → dist/src}/dream/redaction-gate.d.ts +0 -0
- /package/{runtime → dist/src}/dream/redaction-gate.js +0 -0
- /package/{runtime → dist/src}/dream/relationship-update-proposal.d.ts +0 -0
- /package/{runtime → dist/src}/dream/relationship-update-proposal.js +0 -0
- /package/{runtime → dist/src}/dream/sampler.d.ts +0 -0
- /package/{runtime → dist/src}/dream/sampler.js +0 -0
- /package/{runtime → dist/src}/dream/types.d.ts +0 -0
- /package/{runtime → dist/src}/dream/types.js +0 -0
- /package/{runtime → dist/src}/guidance/capability-class.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/capability-class.js +0 -0
- /package/{runtime → dist/src}/guidance/channel-feedback-ingestion-service.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/channel-feedback-ingestion-service.js +0 -0
- /package/{runtime → dist/src}/guidance/contracts.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/contracts.js +0 -0
- /package/{runtime → dist/src}/guidance/draft-narrative-outreach.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/draft-narrative-outreach.js +0 -0
- /package/{runtime → dist/src}/guidance/draft-outreach-message.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/draft-outreach-message.js +0 -0
- /package/{runtime → dist/src}/guidance/evidence-guidance.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/evidence-guidance.js +0 -0
- /package/{runtime → dist/src}/guidance/fallback.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/fallback.js +0 -0
- /package/{runtime → dist/src}/guidance/guidance-assembler.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/guidance-assembler.js +0 -0
- /package/{runtime → dist/src}/guidance/guidance-draft-service.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/guidance-draft-service.js +0 -0
- /package/{runtime → dist/src}/guidance/impulse-assembler.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/impulse-assembler.js +0 -0
- /package/{runtime → dist/src}/guidance/index.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/index.js +0 -0
- /package/{runtime → dist/src}/guidance/output-guard.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/output-guard.js +0 -0
- /package/{runtime → dist/src}/guidance/outreach-draft-schema.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/outreach-draft-schema.js +0 -0
- /package/{runtime → dist/src}/guidance/outreach-strategy-selector.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/outreach-strategy-selector.js +0 -0
- /package/{runtime → dist/src}/guidance/persona-selection.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/persona-selection.js +0 -0
- /package/{runtime → dist/src}/guidance/review-workflow.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/review-workflow.js +0 -0
- /package/{runtime → dist/src}/guidance/template-registry.d.ts +0 -0
- /package/{runtime → dist/src}/guidance/template-registry.js +0 -0
- /package/{runtime → dist/src}/guidance/types.d.ts +0 -0
- /package/{runtime/storage/memory/workspace → dist/src/guidance}/types.js +0 -0
- /package/{runtime → dist/src}/observability/audit/append-only-audit-store.d.ts +0 -0
- /package/{runtime → dist/src}/observability/audit/append-only-audit-store.js +0 -0
- /package/{runtime → dist/src}/observability/audit/audit-envelope.d.ts +0 -0
- /package/{runtime → dist/src}/observability/audit/audit-envelope.js +0 -0
- /package/{runtime → dist/src}/observability/audit/audit-family-registry.json +0 -0
- /package/{runtime → dist/src}/observability/audit/family-registry.d.ts +0 -0
- /package/{runtime → dist/src}/observability/audit/family-registry.js +0 -0
- /package/{runtime → dist/src}/observability/audit/verify-audit-hash-chain.d.ts +0 -0
- /package/{runtime → dist/src}/observability/audit/verify-audit-hash-chain.js +0 -0
- /package/{runtime → dist/src}/observability/connector-inventory-ledger.d.ts +0 -0
- /package/{runtime → dist/src}/observability/connector-inventory-ledger.js +0 -0
- /package/{runtime → dist/src}/observability/db/index.d.ts +0 -0
- /package/{runtime → dist/src}/observability/db/index.js +0 -0
- /package/{runtime → dist/src}/observability/db/schema/connector-inventory.d.ts +0 -0
- /package/{runtime → dist/src}/observability/db/schema/connector-inventory.js +0 -0
- /package/{runtime → dist/src}/observability/db/schema/host-capability-reports.d.ts +0 -0
- /package/{runtime → dist/src}/observability/db/schema/host-capability-reports.js +0 -0
- /package/{runtime → dist/src}/observability/db/schema/index.d.ts +0 -0
- /package/{runtime → dist/src}/observability/db/schema/index.js +0 -0
- /package/{runtime → dist/src}/observability/index.d.ts +0 -0
- /package/{runtime → dist/src}/observability/index.js +0 -0
- /package/{runtime → dist/src}/observability/projections/guidance-audit.d.ts +0 -0
- /package/{runtime → dist/src}/observability/projections/guidance-audit.js +0 -0
- /package/{runtime → dist/src}/observability/projections/outreach-quality-audit.d.ts +0 -0
- /package/{runtime → dist/src}/observability/projections/outreach-quality-audit.js +0 -0
- /package/{runtime → dist/src}/observability/projections/reflection-audit.d.ts +0 -0
- /package/{runtime → dist/src}/observability/projections/reflection-audit.js +0 -0
- /package/{runtime → dist/src}/observability/query/compose-evidence.d.ts +0 -0
- /package/{runtime → dist/src}/observability/query/compose-evidence.js +0 -0
- /package/{runtime → dist/src}/observability/query/evidence-query-engine.d.ts +0 -0
- /package/{runtime → dist/src}/observability/query/evidence-query-engine.js +0 -0
- /package/{runtime → dist/src}/observability/query/explain-query.d.ts +0 -0
- /package/{runtime → dist/src}/observability/query/explain-query.js +0 -0
- /package/{runtime → dist/src}/observability/query/export-audit-bundle.d.ts +0 -0
- /package/{runtime → dist/src}/observability/query/export-audit-bundle.js +0 -0
- /package/{runtime → dist/src}/observability/redaction/manifest.d.ts +0 -0
- /package/{runtime → dist/src}/observability/redaction/manifest.js +0 -0
- /package/{runtime → dist/src}/observability/redaction/policy.d.ts +0 -0
- /package/{runtime → dist/src}/observability/redaction/policy.js +0 -0
- /package/{runtime → dist/src}/observability/services/decision-ledger.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/decision-ledger.js +0 -0
- /package/{runtime → dist/src}/observability/services/execution-telemetry.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/execution-telemetry.js +0 -0
- /package/{runtime → dist/src}/observability/services/governance-audit.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/governance-audit.js +0 -0
- /package/{runtime → dist/src}/observability/services/governance-plane-recorder.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/governance-plane-recorder.js +0 -0
- /package/{runtime → dist/src}/observability/services/heartbeat-digest-assembler.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/heartbeat-digest-assembler.js +0 -0
- /package/{runtime → dist/src}/observability/services/lived-experience-audit.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/lived-experience-audit.js +0 -0
- /package/{runtime → dist/src}/observability/services/narrative-timeline-query-service.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/narrative-timeline-query-service.js +0 -0
- /package/{runtime → dist/src}/observability/services/observability-retention.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/observability-retention.js +0 -0
- /package/{runtime → dist/src}/observability/services/redaction-store.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/redaction-store.js +0 -0
- /package/{runtime → dist/src}/observability/services/restore-audit-service.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/restore-audit-service.js +0 -0
- /package/{runtime → dist/src}/observability/services/runtime-decision-recorder.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/runtime-decision-recorder.js +0 -0
- /package/{runtime → dist/src}/observability/services/runtime-secret-anchor-view.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/runtime-secret-anchor-view.js +0 -0
- /package/{runtime → dist/src}/observability/services/self-health-snapshot.d.ts +0 -0
- /package/{runtime → dist/src}/observability/services/self-health-snapshot.js +0 -0
- /package/{runtime → dist/src}/shared/types/continuity.d.ts +0 -0
- /package/{runtime → dist/src}/shared/types/continuity.js +0 -0
- /package/{runtime → dist/src}/shared/types/credential.d.ts +0 -0
- /package/{runtime → dist/src}/shared/types/credential.js +0 -0
- /package/{runtime → dist/src}/shared/types/goal.d.ts +0 -0
- /package/{runtime → dist/src}/shared/types/goal.js +0 -0
- /package/{runtime → dist/src}/shared/types/index.d.ts +0 -0
- /package/{runtime → dist/src}/shared/types/index.js +0 -0
- /package/{runtime → dist/src}/shared/types/outreach.d.ts +0 -0
- /package/{runtime → dist/src}/shared/types/outreach.js +0 -0
- /package/{runtime → dist/src}/shared/types/source-ref.d.ts +0 -0
- /package/{runtime → dist/src}/shared/types/source-ref.js +0 -0
- /package/{runtime → dist/src}/shared/types/v7-entities.d.ts +0 -0
- /package/{runtime → dist/src}/shared/types/v7-entities.js +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/native-sqlite-probe.d.ts +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/native-sqlite-probe.js +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/repair-gate.d.ts +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/repair-gate.js +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/repair.d.ts +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/repair.js +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/storage-mode-smoke.d.ts +0 -0
- /package/{runtime → dist/src}/storage/bootstrap/storage-mode-smoke.js +0 -0
- /package/{runtime → dist/src}/storage/chronicle/session-chronicle-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/chronicle/session-chronicle-store.js +0 -0
- /package/{runtime → dist/src}/storage/db/index.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/index.js +0 -0
- /package/{runtime → dist/src}/storage/db/migration-runner.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/migration-runner.js +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/index.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/index.js +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-001-foundation.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-001-foundation.js +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-002-effect-commit-ledger.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-002-effect-commit-ledger.js +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-003-circuit-breaker.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-003-circuit-breaker.js +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-004-behavior-promotion.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/migrations/v7-004-behavior-promotion.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/agent-goal.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/agent-goal.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/assets.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/assets.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/credentials.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/credentials.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/delivery-attempts.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/delivery-attempts.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/index.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/index.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/intent-commits.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/intent-commits.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/life-evidence-index.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/life-evidence-index.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/memory-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/memory-store.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/narrative-state.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/narrative-state.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/operator-fallback-artifacts.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/operator-fallback-artifacts.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/policies.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/policies.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/proposals.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/proposals.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/provenance.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/provenance.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/relationship-memory.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/relationship-memory.js +0 -0
- /package/{runtime → dist/src}/storage/db/schema/session-chronicle.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/schema/session-chronicle.js +0 -0
- /package/{runtime → dist/src}/storage/db/transaction-utils.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/transaction-utils.js +0 -0
- /package/{runtime → dist/src}/storage/db/write-queue.d.ts +0 -0
- /package/{runtime → dist/src}/storage/db/write-queue.js +0 -0
- /package/{runtime → dist/src}/storage/delivery/query-delivery-attempts.d.ts +0 -0
- /package/{runtime → dist/src}/storage/delivery/query-delivery-attempts.js +0 -0
- /package/{runtime → dist/src}/storage/delivery/types.d.ts +0 -0
- /package/{runtime/storage/snapshots → dist/src/storage/delivery}/types.js +0 -0
- /package/{runtime → dist/src}/storage/delivery/write-delivery-attempt.d.ts +0 -0
- /package/{runtime → dist/src}/storage/delivery/write-delivery-attempt.js +0 -0
- /package/{runtime → dist/src}/storage/fallback/load-operator-fallback.d.ts +0 -0
- /package/{runtime → dist/src}/storage/fallback/load-operator-fallback.js +0 -0
- /package/{runtime → dist/src}/storage/fallback/operator-fallback-types.d.ts +0 -0
- /package/{runtime → dist/src}/storage/fallback/operator-fallback-types.js +0 -0
- /package/{runtime → dist/src}/storage/fallback/operator-fallback-view.d.ts +0 -0
- /package/{runtime → dist/src}/storage/fallback/operator-fallback-view.js +0 -0
- /package/{runtime → dist/src}/storage/fallback/write-operator-fallback.d.ts +0 -0
- /package/{runtime → dist/src}/storage/fallback/write-operator-fallback.js +0 -0
- /package/{runtime → dist/src}/storage/goal/agent-goal-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/goal/agent-goal-store.js +0 -0
- /package/{runtime → dist/src}/storage/index.d.ts +0 -0
- /package/{runtime → dist/src}/storage/index.js +0 -0
- /package/{runtime → dist/src}/storage/life-evidence/append-life-evidence.d.ts +0 -0
- /package/{runtime → dist/src}/storage/life-evidence/append-life-evidence.js +0 -0
- /package/{runtime → dist/src}/storage/life-evidence/types.d.ts +0 -0
- /package/{runtime → dist/src}/storage/life-evidence/types.js +0 -0
- /package/{runtime → dist/src}/storage/memory/workspace/paths.d.ts +0 -0
- /package/{runtime → dist/src}/storage/memory/workspace/paths.js +0 -0
- /package/{runtime → dist/src}/storage/memory/workspace/store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/memory/workspace/store.js +0 -0
- /package/{runtime → dist/src}/storage/memory/workspace/types.d.ts +0 -0
- /package/{runtime/storage/user-interest → dist/src/storage/memory/workspace}/types.js +0 -0
- /package/{runtime → dist/src}/storage/memory-store/memory-store-lifecycle.d.ts +0 -0
- /package/{runtime → dist/src}/storage/memory-store/memory-store-lifecycle.js +0 -0
- /package/{runtime → dist/src}/storage/narrative/narrative-state-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/narrative/narrative-state-store.js +0 -0
- /package/{runtime → dist/src}/storage/quiet/persist-quiet-artifact.d.ts +0 -0
- /package/{runtime → dist/src}/storage/quiet/persist-quiet-artifact.js +0 -0
- /package/{runtime → dist/src}/storage/quiet/quiet-artifact-types.d.ts +0 -0
- /package/{runtime → dist/src}/storage/quiet/quiet-artifact-types.js +0 -0
- /package/{runtime → dist/src}/storage/quiet/quiet-artifact-writer.d.ts +0 -0
- /package/{runtime → dist/src}/storage/quiet/quiet-artifact-writer.js +0 -0
- /package/{runtime → dist/src}/storage/relationship/relationship-memory-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/relationship/relationship-memory-store.js +0 -0
- /package/{runtime → dist/src}/storage/repositories/asset-repository.d.ts +0 -0
- /package/{runtime → dist/src}/storage/repositories/asset-repository.js +0 -0
- /package/{runtime → dist/src}/storage/repositories/credential-repository.d.ts +0 -0
- /package/{runtime → dist/src}/storage/repositories/credential-repository.js +0 -0
- /package/{runtime → dist/src}/storage/repositories/index.d.ts +0 -0
- /package/{runtime → dist/src}/storage/repositories/index.js +0 -0
- /package/{runtime → dist/src}/storage/repositories/intent-commit-repository.d.ts +0 -0
- /package/{runtime → dist/src}/storage/repositories/intent-commit-repository.js +0 -0
- /package/{runtime → dist/src}/storage/repositories/policy-repository.d.ts +0 -0
- /package/{runtime → dist/src}/storage/repositories/policy-repository.js +0 -0
- /package/{runtime → dist/src}/storage/repositories/proposal-repository.d.ts +0 -0
- /package/{runtime → dist/src}/storage/repositories/proposal-repository.js +0 -0
- /package/{runtime → dist/src}/storage/repositories/provenance-repository.d.ts +0 -0
- /package/{runtime → dist/src}/storage/repositories/provenance-repository.js +0 -0
- /package/{runtime → dist/src}/storage/rhythm/rhythm-policy-snapshot.d.ts +0 -0
- /package/{runtime → dist/src}/storage/rhythm/rhythm-policy-snapshot.js +0 -0
- /package/{runtime → dist/src}/storage/services/credential-vault.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/credential-vault.js +0 -0
- /package/{runtime → dist/src}/storage/services/daily-log-pipeline.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/daily-log-pipeline.js +0 -0
- /package/{runtime → dist/src}/storage/services/diary-dream-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/diary-dream-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/effect-commit-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/effect-commit-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/embodied-context-state-port.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/embodied-context-state-port.js +0 -0
- /package/{runtime → dist/src}/storage/services/goal-lifecycle-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/goal-lifecycle-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/governance-layer.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/governance-layer.js +0 -0
- /package/{runtime → dist/src}/storage/services/history-digest-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/history-digest-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/identity-profile-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/identity-profile-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/interaction-snapshot-projector.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/interaction-snapshot-projector.js +0 -0
- /package/{runtime → dist/src}/storage/services/persona-candidate-loader.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/persona-candidate-loader.js +0 -0
- /package/{runtime → dist/src}/storage/services/provenance-service.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/provenance-service.js +0 -0
- /package/{runtime → dist/src}/storage/services/quiet-input-loader.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/quiet-input-loader.js +0 -0
- /package/{runtime → dist/src}/storage/services/repair-and-backup.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/repair-and-backup.js +0 -0
- /package/{runtime → dist/src}/storage/services/restore-snapshot-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/restore-snapshot-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/runtime-secret-anchor-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/runtime-secret-anchor-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/tool-experience-store.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/tool-experience-store.js +0 -0
- /package/{runtime → dist/src}/storage/services/write-validation-gate.d.ts +0 -0
- /package/{runtime → dist/src}/storage/services/write-validation-gate.js +0 -0
- /package/{runtime → dist/src}/storage/snapshots/continuity-snapshot.d.ts +0 -0
- /package/{runtime → dist/src}/storage/snapshots/continuity-snapshot.js +0 -0
- /package/{runtime → dist/src}/storage/snapshots/life-evidence-snapshot.d.ts +0 -0
- /package/{runtime → dist/src}/storage/snapshots/life-evidence-snapshot.js +0 -0
- /package/{runtime → dist/src}/storage/snapshots/types.d.ts +0 -0
- /package/{runtime → dist/src}/storage/state-api.d.ts +0 -0
- /package/{runtime → dist/src}/storage/state-api.js +0 -0
- /package/{runtime → dist/src}/storage/user-interest/load-user-interest-snapshot.d.ts +0 -0
- /package/{runtime → dist/src}/storage/user-interest/load-user-interest-snapshot.js +0 -0
- /package/{runtime → dist/src}/storage/user-interest/types.d.ts +0 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* INT-S5 — S5 Observability 集成冒烟测试
|
|
3
|
+
*
|
|
4
|
+
* Exit criteria verification (05A_TASKS.md INT-S5):
|
|
5
|
+
*
|
|
6
|
+
* 1. Audit chain integrity verifiable — AppendOnlyAuditStore per-family hash chain
|
|
7
|
+
* links correctly; chain corruption is detected and marked degraded.
|
|
8
|
+
* 2. SelfHealthSnapshot covers dynamic dimensions and minimum dimension set is
|
|
9
|
+
* complete; any single probe timeout does not affect overall snapshot.
|
|
10
|
+
* 3. HeartbeatDigest per-platform counts correct; nothing_significant on empty day.
|
|
11
|
+
* 4. NarrativeTimeline cursor pagination normal; 90-day range enforced.
|
|
12
|
+
* 5. RestoreAudit writes on every attempt; partial_restore_error records entity lists.
|
|
13
|
+
* 6. RuntimeSecretAnchorView returns recoverySteps for all three reason codes.
|
|
14
|
+
*
|
|
15
|
+
* Evidence: reports/int-s5-observability-v7.md
|
|
16
|
+
*/
|
|
17
|
+
import { describe, it, beforeEach } from "node:test";
|
|
18
|
+
import assert from "node:assert";
|
|
19
|
+
// Audit chain (T-OBS.C.1)
|
|
20
|
+
import { AppendOnlyAuditStore } from "../../../src/observability/audit/append-only-audit-store.js";
|
|
21
|
+
import { buildAuditEnvelope } from "../../../src/observability/audit/audit-envelope.js";
|
|
22
|
+
// SelfHealthSnapshot (T-OBS.C.2)
|
|
23
|
+
import { getSelfHealthSnapshot, registerHealthProbe, unregisterHealthProbe, clearHealthProbeRegistry, ensureMinimumProbes, MINIMUM_REQUIRED_DIMENSIONS, } from "../../../src/observability/services/self-health-snapshot.js";
|
|
24
|
+
// HeartbeatDigest (T-OBS.C.3 + T-OBS.C.4)
|
|
25
|
+
import { generateHeartbeatDigest, } from "../../../src/observability/services/heartbeat-digest-assembler.js";
|
|
26
|
+
// NarrativeTimeline (T-OBS.C.5)
|
|
27
|
+
import { queryNarrativeTimeline, queryNarrativeDiff, NarrativeQueryRangeError, } from "../../../src/observability/services/narrative-timeline-query-service.js";
|
|
28
|
+
// RestoreAudit (T-OBS.C.6)
|
|
29
|
+
import { writeRestoreAudit, } from "../../../src/observability/services/restore-audit-service.js";
|
|
30
|
+
// RuntimeSecretAnchorView (T-OBS.C.7)
|
|
31
|
+
import { viewSecretAnchor, } from "../../../src/observability/services/runtime-secret-anchor-view.js";
|
|
32
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
33
|
+
function makeAuditEnvelope(family, seq, previousHash) {
|
|
34
|
+
const payload = { seq, msg: `event-${seq}` };
|
|
35
|
+
return buildAuditEnvelope({
|
|
36
|
+
family: family,
|
|
37
|
+
plane: "governance",
|
|
38
|
+
traceId: `trace-int-s5-${seq}`,
|
|
39
|
+
sequence: seq,
|
|
40
|
+
payload,
|
|
41
|
+
previousHash,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function makeDimHealth(status) {
|
|
45
|
+
return { status, checkedAt: new Date().toISOString() };
|
|
46
|
+
}
|
|
47
|
+
// ─── 1. Audit chain integrity (T-OBS.C.1) ────────────────────────────────────
|
|
48
|
+
describe("INT-S5 #1: audit chain integrity (T-OBS.C.1)", () => {
|
|
49
|
+
it("per-family hash chain links correctly across 5 events", () => {
|
|
50
|
+
const store = new AppendOnlyAuditStore();
|
|
51
|
+
let prevHash;
|
|
52
|
+
for (let i = 1; i <= 5; i++) {
|
|
53
|
+
const env = makeAuditEnvelope("restore.audit", i, prevHash);
|
|
54
|
+
store.append(env);
|
|
55
|
+
prevHash = env.integrity.recordHash;
|
|
56
|
+
}
|
|
57
|
+
assert.strictEqual(store.list().length, 5);
|
|
58
|
+
// lastRecordHash returns correct per-family hash
|
|
59
|
+
assert.strictEqual(store.lastRecordHash("restore.audit"), prevHash);
|
|
60
|
+
});
|
|
61
|
+
it("detects chain corruption: previousHash mismatch throws", () => {
|
|
62
|
+
const store = new AppendOnlyAuditStore();
|
|
63
|
+
const env1 = makeAuditEnvelope("health.probe", 1, undefined);
|
|
64
|
+
store.append(env1);
|
|
65
|
+
// Craft a broken second event with wrong previousHash
|
|
66
|
+
const brokenEnv = makeAuditEnvelope("health.probe", 2, "wrong-hash-0000");
|
|
67
|
+
assert.throws(() => store.append(brokenEnv), /audit_previous_hash_mismatch/);
|
|
68
|
+
});
|
|
69
|
+
it("seedFamilyHash enables backfill after process restart", () => {
|
|
70
|
+
const store = new AppendOnlyAuditStore();
|
|
71
|
+
const simulatedDbHash = "restart-backfill-hash-abc123";
|
|
72
|
+
store.seedFamilyHash("narrative.snapshot", simulatedDbHash);
|
|
73
|
+
// Next event must link to the seeded hash
|
|
74
|
+
const env = makeAuditEnvelope("narrative.snapshot", 1, simulatedDbHash);
|
|
75
|
+
assert.doesNotThrow(() => store.append(env));
|
|
76
|
+
});
|
|
77
|
+
it("two families maintain independent chains", () => {
|
|
78
|
+
const store = new AppendOnlyAuditStore();
|
|
79
|
+
const e1 = makeAuditEnvelope("restore.audit", 1, undefined);
|
|
80
|
+
const e2 = makeAuditEnvelope("health.probe", 1, undefined);
|
|
81
|
+
store.append(e1);
|
|
82
|
+
store.append(e2);
|
|
83
|
+
assert.strictEqual(store.lastRecordHash("restore.audit"), e1.integrity.recordHash);
|
|
84
|
+
assert.strictEqual(store.lastRecordHash("health.probe"), e2.integrity.recordHash);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
// ─── 2. SelfHealthSnapshot dimensions (T-OBS.C.2) ────────────────────────────
|
|
88
|
+
describe("INT-S5 #2: SelfHealthSnapshot minimum dimension set + probe isolation (T-OBS.C.2)", () => {
|
|
89
|
+
beforeEach(() => {
|
|
90
|
+
clearHealthProbeRegistry();
|
|
91
|
+
});
|
|
92
|
+
it("minimum required dimensions all present in snapshot", async () => {
|
|
93
|
+
ensureMinimumProbes();
|
|
94
|
+
const snap = await getSelfHealthSnapshot();
|
|
95
|
+
for (const dimId of MINIMUM_REQUIRED_DIMENSIONS) {
|
|
96
|
+
assert.ok(dimId in snap.dimensions, `Missing required dimension: ${dimId}`);
|
|
97
|
+
}
|
|
98
|
+
assert.ok(snap.generatedAt, "generatedAt must be set");
|
|
99
|
+
assert.ok(["healthy", "degraded", "unknown"].includes(snap.overall));
|
|
100
|
+
});
|
|
101
|
+
it("single probe timeout does not block overall snapshot", async () => {
|
|
102
|
+
ensureMinimumProbes();
|
|
103
|
+
// Register a slow probe that would time out
|
|
104
|
+
const slowProbe = {
|
|
105
|
+
dimensionId: "slow_test_dim",
|
|
106
|
+
probe: async () => {
|
|
107
|
+
await new Promise((r) => setTimeout(r, 3500)); // > 3000ms total cap
|
|
108
|
+
return makeDimHealth("healthy");
|
|
109
|
+
},
|
|
110
|
+
timeoutMs: 100,
|
|
111
|
+
};
|
|
112
|
+
registerHealthProbe(slowProbe);
|
|
113
|
+
const snap = await getSelfHealthSnapshot();
|
|
114
|
+
// slow_test_dim should be unknown/timeout; other dims should still be present
|
|
115
|
+
const slowDim = snap.dimensions["slow_test_dim"];
|
|
116
|
+
assert.ok(slowDim, "slow_test_dim should appear in snapshot");
|
|
117
|
+
assert.notStrictEqual(slowDim.status, "healthy", "timed-out probe should not be healthy");
|
|
118
|
+
// Minimum required dims still present
|
|
119
|
+
for (const dimId of MINIMUM_REQUIRED_DIMENSIONS) {
|
|
120
|
+
assert.ok(dimId in snap.dimensions, `Required dim ${dimId} missing after slow probe`);
|
|
121
|
+
}
|
|
122
|
+
unregisterHealthProbe("slow_test_dim");
|
|
123
|
+
});
|
|
124
|
+
it("dynamic probe registration works", async () => {
|
|
125
|
+
ensureMinimumProbes();
|
|
126
|
+
registerHealthProbe({ dimensionId: "custom_v7_dim", probe: async () => makeDimHealth("healthy"), timeoutMs: 500 });
|
|
127
|
+
const snap = await getSelfHealthSnapshot();
|
|
128
|
+
assert.ok("custom_v7_dim" in snap.dimensions);
|
|
129
|
+
assert.strictEqual(snap.dimensions["custom_v7_dim"].status, "healthy");
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
// ─── 3. HeartbeatDigest (T-OBS.C.3 + T-OBS.C.4) ─────────────────────────────
|
|
133
|
+
describe("INT-S5 #3: HeartbeatDigest per-platform counts + nothing_significant (T-OBS.C.3)", () => {
|
|
134
|
+
const DATE = "2026-05-23";
|
|
135
|
+
/**
|
|
136
|
+
* Build a deps object with an audit store seeded with connector.attempt events
|
|
137
|
+
* for the given platform/capability pairs.
|
|
138
|
+
*/
|
|
139
|
+
function makeDeps(attempts) {
|
|
140
|
+
const store = new AppendOnlyAuditStore();
|
|
141
|
+
let previousHash;
|
|
142
|
+
attempts.forEach((a, idx) => {
|
|
143
|
+
const env = buildAuditEnvelope({
|
|
144
|
+
family: "connector.attempt",
|
|
145
|
+
plane: "governance",
|
|
146
|
+
traceId: `trace-hb-${idx}`,
|
|
147
|
+
sequence: idx + 1,
|
|
148
|
+
createdAt: `${DATE}T00:00:00.000Z`,
|
|
149
|
+
payload: { platformId: a.platformId, capability: a.capability, outcome: a.outcome },
|
|
150
|
+
previousHash,
|
|
151
|
+
});
|
|
152
|
+
store.append(env);
|
|
153
|
+
previousHash = env.integrity.recordHash;
|
|
154
|
+
});
|
|
155
|
+
return { auditStore: store };
|
|
156
|
+
}
|
|
157
|
+
it("per-platform counts correct for connector attempts", async () => {
|
|
158
|
+
const deps = makeDeps([
|
|
159
|
+
{ platformId: "moltbook", capability: "feed.read", outcome: "success" },
|
|
160
|
+
{ platformId: "moltbook", capability: "feed.read", outcome: "success" },
|
|
161
|
+
{ platformId: "moltbook", capability: "feed.read", outcome: "failure" },
|
|
162
|
+
{ platformId: "moltbook", capability: "feed.read", outcome: "circuit_open" },
|
|
163
|
+
{ platformId: "instreet", capability: "post.publish", outcome: "blocked" },
|
|
164
|
+
]);
|
|
165
|
+
const digest = await generateHeartbeatDigest(DATE, deps);
|
|
166
|
+
assert.ok(Array.isArray(digest.connectorSummary), "connectorSummary must be array");
|
|
167
|
+
const mb = digest.connectorSummary.find((s) => s.platformId === "moltbook");
|
|
168
|
+
assert.ok(mb, "moltbook summary missing");
|
|
169
|
+
assert.strictEqual(mb.successCount, 2);
|
|
170
|
+
assert.strictEqual(mb.failureCount, 1);
|
|
171
|
+
assert.strictEqual(mb.circuitOpenCount, 1);
|
|
172
|
+
const is = digest.connectorSummary.find((s) => s.platformId === "instreet");
|
|
173
|
+
assert.ok(is, "instreet summary missing");
|
|
174
|
+
assert.strictEqual(is.blockedCount, 1);
|
|
175
|
+
});
|
|
176
|
+
it("nothing_significant on empty audit store", async () => {
|
|
177
|
+
const store = new AppendOnlyAuditStore();
|
|
178
|
+
const digest = await generateHeartbeatDigest(DATE, { auditStore: store });
|
|
179
|
+
assert.strictEqual(digest.isNothingSignificant, true, "Empty day must set isNothingSignificant = true");
|
|
180
|
+
assert.strictEqual(digest.connectorSummary.length, 0, "no connector summaries fabricated");
|
|
181
|
+
});
|
|
182
|
+
it("digest does not contain credential / raw payload fields", async () => {
|
|
183
|
+
const store = new AppendOnlyAuditStore();
|
|
184
|
+
const digest = await generateHeartbeatDigest(DATE, { auditStore: store });
|
|
185
|
+
const digestStr = JSON.stringify(digest);
|
|
186
|
+
const forbidden = ["password", "raw_payload", "private_message", "Bearer "];
|
|
187
|
+
for (const f of forbidden) {
|
|
188
|
+
assert.ok(!digestStr.includes(f), `Digest must not contain forbidden field: ${f}`);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
// ─── 4. NarrativeTimeline cursor pagination (T-OBS.C.5) ──────────────────────
|
|
193
|
+
describe("INT-S5 #4: NarrativeTimeline cursor pagination + 90-day range (T-OBS.C.5)", () => {
|
|
194
|
+
function makeRows(count) {
|
|
195
|
+
return Array.from({ length: count }, (_, i) => ({
|
|
196
|
+
version: `v${i + 1}`,
|
|
197
|
+
createdAt: new Date(Date.now() - (count - i) * 60000).toISOString(),
|
|
198
|
+
triggerKind: "heartbeat.decision",
|
|
199
|
+
sourceRefs: [`ref-${i}`],
|
|
200
|
+
reasonCode: "ok",
|
|
201
|
+
summaryText: `event ${i + 1}`,
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
function makeDeps(rows) {
|
|
205
|
+
return {
|
|
206
|
+
stateMemoryPort: {
|
|
207
|
+
listNarrativeTimeline: async (_from, _to, opts) => {
|
|
208
|
+
let filtered = rows;
|
|
209
|
+
if (opts?.afterTimestamp) {
|
|
210
|
+
filtered = rows.filter((r) => r.createdAt > opts.afterTimestamp);
|
|
211
|
+
}
|
|
212
|
+
return filtered.slice(0, opts?.limit ?? 20);
|
|
213
|
+
},
|
|
214
|
+
getNarrativeSnapshot: async (version) => {
|
|
215
|
+
const idx = rows.findIndex((r) => r.version === version);
|
|
216
|
+
if (idx === -1)
|
|
217
|
+
return null;
|
|
218
|
+
return {
|
|
219
|
+
version,
|
|
220
|
+
focus: `focus-${version}`,
|
|
221
|
+
progress: `progress-${version}`,
|
|
222
|
+
nextIntent: `intent-${version}`,
|
|
223
|
+
sourceRefs: [`ref-${idx}`],
|
|
224
|
+
lastChangeReasonCode: "ok",
|
|
225
|
+
};
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
it("cursor pagination returns correct pages", async () => {
|
|
231
|
+
const rows = makeRows(25);
|
|
232
|
+
const deps = makeDeps(rows);
|
|
233
|
+
const from = new Date(Date.now() - 10 * 24 * 60 * 60 * 1000).toISOString();
|
|
234
|
+
const to = new Date().toISOString();
|
|
235
|
+
const page1 = await queryNarrativeTimeline(from, to, { limit: 10 }, deps);
|
|
236
|
+
assert.strictEqual(page1.entries.length, 10);
|
|
237
|
+
assert.ok(page1.nextCursor, "page1 must have nextCursor");
|
|
238
|
+
const page2 = await queryNarrativeTimeline(from, to, { limit: 10, cursor: page1.nextCursor }, deps);
|
|
239
|
+
assert.ok(page2.entries.length > 0, "page2 must have entries");
|
|
240
|
+
// No overlap
|
|
241
|
+
const page1Versions = new Set(page1.entries.map((e) => e.version));
|
|
242
|
+
for (const entry of page2.entries) {
|
|
243
|
+
assert.ok(!page1Versions.has(entry.version), "Page overlap detected");
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
it("90-day range exceeded throws NarrativeQueryRangeError", async () => {
|
|
247
|
+
const rows = makeRows(5);
|
|
248
|
+
const deps = makeDeps(rows);
|
|
249
|
+
const from = new Date(Date.now() - 91 * 24 * 60 * 60 * 1000).toISOString();
|
|
250
|
+
const to = new Date().toISOString();
|
|
251
|
+
await assert.rejects(() => queryNarrativeTimeline(from, to, {}, deps), NarrativeQueryRangeError);
|
|
252
|
+
});
|
|
253
|
+
it("narrativeDiff returns field-level changes between two versions", async () => {
|
|
254
|
+
const rows = makeRows(5);
|
|
255
|
+
const deps = makeDeps(rows);
|
|
256
|
+
const diff = await queryNarrativeDiff("v1", "v3", deps);
|
|
257
|
+
assert.ok(diff, "diff result must be present");
|
|
258
|
+
assert.ok("changes" in diff, "diff must have changes array");
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
// ─── 5. RestoreAudit (T-OBS.C.6) ─────────────────────────────────────────────
|
|
262
|
+
describe("INT-S5 #5: RestoreAudit writes on every attempt + partial_restore_error (T-OBS.C.6)", () => {
|
|
263
|
+
function makeEvent(overrides = {}) {
|
|
264
|
+
return {
|
|
265
|
+
id: `evt-${Date.now()}`,
|
|
266
|
+
restoreTarget: "goal",
|
|
267
|
+
fromVersion: "v1",
|
|
268
|
+
toVersion: "v2",
|
|
269
|
+
triggeredBy: "operator",
|
|
270
|
+
reason: "manual_rollback",
|
|
271
|
+
completedEntities: ["goal", "narrative"],
|
|
272
|
+
failedEntities: [],
|
|
273
|
+
excludedFields: ["credential"],
|
|
274
|
+
restoredFieldCount: 8,
|
|
275
|
+
createdAt: new Date().toISOString(),
|
|
276
|
+
traceId: `trace-${Date.now()}`,
|
|
277
|
+
...overrides,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
it("successful restore writes audit with from/to/reason", async () => {
|
|
281
|
+
const store = new AppendOnlyAuditStore();
|
|
282
|
+
const result = await writeRestoreAudit(makeEvent(), store);
|
|
283
|
+
assert.strictEqual(result.ok, true);
|
|
284
|
+
assert.strictEqual(store.list().length, 1);
|
|
285
|
+
const env = store.list()[0];
|
|
286
|
+
assert.strictEqual(env.payload.fromVersion, "v1");
|
|
287
|
+
assert.strictEqual(env.payload.toVersion, "v2");
|
|
288
|
+
assert.strictEqual(env.payload.reason, "manual_rollback");
|
|
289
|
+
});
|
|
290
|
+
it("partial_restore_error records completed and failed entity lists", async () => {
|
|
291
|
+
const store = new AppendOnlyAuditStore();
|
|
292
|
+
const result = await writeRestoreAudit(makeEvent({
|
|
293
|
+
restoreTarget: "narrative",
|
|
294
|
+
fromVersion: "v5",
|
|
295
|
+
toVersion: "v4",
|
|
296
|
+
triggeredBy: "agent",
|
|
297
|
+
reason: "partial_restore_error",
|
|
298
|
+
completedEntities: ["goal"],
|
|
299
|
+
failedEntities: ["evidence", "relationship"],
|
|
300
|
+
excludedFields: ["encryption_key"],
|
|
301
|
+
restoredFieldCount: 3,
|
|
302
|
+
}), store);
|
|
303
|
+
assert.strictEqual(result.ok, true);
|
|
304
|
+
const env = store.list()[0];
|
|
305
|
+
assert.deepStrictEqual(env.payload.completedEntities, ["goal"]);
|
|
306
|
+
assert.deepStrictEqual(env.payload.failedEntities, ["evidence", "relationship"]);
|
|
307
|
+
// isPartialRestore is computed from failedEntities.length > 0
|
|
308
|
+
assert.strictEqual(env.payload.isPartialRestore, true);
|
|
309
|
+
});
|
|
310
|
+
it("credential field value never written to audit (only field name in excludedFields)", async () => {
|
|
311
|
+
const store = new AppendOnlyAuditStore();
|
|
312
|
+
await writeRestoreAudit(makeEvent({
|
|
313
|
+
reason: "credential_excluded_test",
|
|
314
|
+
excludedFields: ["credential", "session_token"],
|
|
315
|
+
}), store);
|
|
316
|
+
const rawAudit = JSON.stringify(store.list());
|
|
317
|
+
assert.ok(rawAudit.includes("credential"), "excludedFields must list 'credential'");
|
|
318
|
+
assert.ok(!rawAudit.includes("Bearer "), "credential values must not appear");
|
|
319
|
+
assert.ok(!rawAudit.includes("sk-"), "credential values must not appear");
|
|
320
|
+
});
|
|
321
|
+
it("audit write failure is fire-and-forget (returns ok:true + warning)", async () => {
|
|
322
|
+
// Simulate a store whose append() always throws (simulates DB write failure)
|
|
323
|
+
const throwingStore = new AppendOnlyAuditStore();
|
|
324
|
+
// Monkey-patch append to always throw after store is constructed
|
|
325
|
+
throwingStore["append"] = () => {
|
|
326
|
+
throw new Error("simulated_db_write_failure");
|
|
327
|
+
};
|
|
328
|
+
const result = await writeRestoreAudit(makeEvent({ reason: "fire_and_forget_test" }), throwingStore);
|
|
329
|
+
assert.strictEqual(result.ok, true);
|
|
330
|
+
assert.ok(result.warnings && result.warnings.length > 0, "warnings must be populated on audit failure");
|
|
331
|
+
assert.ok(result.warnings[0].includes("simulated_db_write_failure"), "warning message should include original error");
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
// ─── 6. RuntimeSecretAnchorView (T-OBS.C.7) ──────────────────────────────────
|
|
335
|
+
describe("INT-S5 #6: RuntimeSecretAnchorView three reason codes + recoverySteps (T-OBS.C.7)", () => {
|
|
336
|
+
function makeOpsPort(overrides = {}) {
|
|
337
|
+
return {
|
|
338
|
+
getEncryptionKeyPath: () => overrides.keyPath ?? "SECOND_NATURE_ENCRYPTION_KEY",
|
|
339
|
+
checkKeyPathExists: async (_kp) => overrides.keyExists ?? true,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function makeCredPort(sampleDecrypt) {
|
|
343
|
+
return {
|
|
344
|
+
verifySampleDecrypt: async () => {
|
|
345
|
+
if (sampleDecrypt === "ok")
|
|
346
|
+
return { status: "ok", checkedIds: ["cred-1"] };
|
|
347
|
+
if (sampleDecrypt === "wrong_key")
|
|
348
|
+
return { status: "wrong_key", checkedIds: ["cred-1"] };
|
|
349
|
+
return { status: "error", checkedIds: [] };
|
|
350
|
+
},
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
it("healthy anchor returns verified status", async () => {
|
|
354
|
+
const deps = {
|
|
355
|
+
runtimeOpsPort: makeOpsPort(),
|
|
356
|
+
credentialPort: makeCredPort("ok"),
|
|
357
|
+
};
|
|
358
|
+
const view = await viewSecretAnchor(deps);
|
|
359
|
+
assert.strictEqual(view.status, "verified");
|
|
360
|
+
assert.ok(!view.reasonCode, "verified status should have no reasonCode");
|
|
361
|
+
assert.ok(Array.isArray(view.recoverySteps));
|
|
362
|
+
});
|
|
363
|
+
it("wrong key returns credential_recovery_required + recoverySteps", async () => {
|
|
364
|
+
const deps = {
|
|
365
|
+
runtimeOpsPort: makeOpsPort(),
|
|
366
|
+
credentialPort: makeCredPort("wrong_key"),
|
|
367
|
+
};
|
|
368
|
+
const view = await viewSecretAnchor(deps);
|
|
369
|
+
assert.strictEqual(view.status, "wrong_key");
|
|
370
|
+
assert.strictEqual(view.reasonCode, "credential_recovery_required");
|
|
371
|
+
assert.ok(Array.isArray(view.recoverySteps) && view.recoverySteps.length > 0, "recoverySteps must be populated for credential_recovery_required");
|
|
372
|
+
});
|
|
373
|
+
it("decrypt error returns runtime_secret_unavailable + recoverySteps", async () => {
|
|
374
|
+
const deps = {
|
|
375
|
+
runtimeOpsPort: makeOpsPort(),
|
|
376
|
+
credentialPort: makeCredPort("error"),
|
|
377
|
+
};
|
|
378
|
+
const view = await viewSecretAnchor(deps);
|
|
379
|
+
assert.strictEqual(view.reasonCode, "runtime_secret_unavailable");
|
|
380
|
+
assert.ok(Array.isArray(view.recoverySteps) && view.recoverySteps.length > 0, "recoverySteps must be populated");
|
|
381
|
+
});
|
|
382
|
+
it("missing key path returns runtime_secret_anchor_missing", async () => {
|
|
383
|
+
const deps = {
|
|
384
|
+
runtimeOpsPort: makeOpsPort({ keyExists: false }),
|
|
385
|
+
credentialPort: makeCredPort("ok"),
|
|
386
|
+
};
|
|
387
|
+
const view = await viewSecretAnchor(deps);
|
|
388
|
+
assert.strictEqual(view.status, "missing");
|
|
389
|
+
assert.strictEqual(view.reasonCode, "runtime_secret_anchor_missing");
|
|
390
|
+
assert.ok(Array.isArray(view.recoverySteps) && view.recoverySteps.length > 0);
|
|
391
|
+
});
|
|
392
|
+
it("anchor view never contains encryption key plaintext", async () => {
|
|
393
|
+
const deps = {
|
|
394
|
+
runtimeOpsPort: makeOpsPort(),
|
|
395
|
+
credentialPort: makeCredPort("wrong_key"),
|
|
396
|
+
};
|
|
397
|
+
const view = await viewSecretAnchor(deps);
|
|
398
|
+
const viewStr = JSON.stringify(view);
|
|
399
|
+
assert.ok(!viewStr.includes("sk-"), "key plaintext must not appear");
|
|
400
|
+
assert.ok(!viewStr.includes("Bearer "), "credential value must not appear");
|
|
401
|
+
});
|
|
402
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* T4.2.1 — Owner reply → RelationshipMemory feedback loop integration.
|
|
3
|
+
*
|
|
4
|
+
* Acceptance:
|
|
5
|
+
* A. owner reply → SessionChronicle entry written with owner_reply kind.
|
|
6
|
+
* B. positive reply → RelationshipMemory tone updated to casual, noReplyCount reset.
|
|
7
|
+
* C. negative reply → RelationshipMemory tone updated to quiet (reserved).
|
|
8
|
+
* D. busy reply → timing observed as busy, topics extracted.
|
|
9
|
+
* E. no existing memory → creates default relationship with inferred traits.
|
|
10
|
+
* F. next outreach draft can load updated relationship and trace to sourceRef.
|
|
11
|
+
*/
|
|
12
|
+
import test from "node:test";
|
|
13
|
+
import assert from "node:assert/strict";
|
|
14
|
+
import { createStateDatabase } from "../../../src/storage/db/index.js";
|
|
15
|
+
import { processOwnerReply } from "../../../src/core/second-nature/feedback/owner-reply-feedback.js";
|
|
16
|
+
import { createSessionChronicleStore } from "../../../src/storage/chronicle/session-chronicle-store.js";
|
|
17
|
+
import { createRelationshipMemoryStore } from "../../../src/storage/relationship/relationship-memory-store.js";
|
|
18
|
+
async function seedRelationshipMemory(state) {
|
|
19
|
+
const store = createRelationshipMemoryStore(state);
|
|
20
|
+
await store.upsertRelationshipMemory({
|
|
21
|
+
relationshipId: "default",
|
|
22
|
+
revision: 1,
|
|
23
|
+
tonePreference: "casual",
|
|
24
|
+
averageReplyDelayMinutes: 30,
|
|
25
|
+
noReplyCount: 2,
|
|
26
|
+
topicAffinities: [
|
|
27
|
+
{ topic: "platform", affinity: 0.8 },
|
|
28
|
+
{ topic: "work", affinity: 0.6 },
|
|
29
|
+
],
|
|
30
|
+
lastInteractionAt: new Date(Date.now() - 86400000).toISOString(),
|
|
31
|
+
sourceRefs: [{ sourceId: "seed-1", kind: "decision_record", url: "https://example.test/seed" }],
|
|
32
|
+
updatedAt: new Date().toISOString(),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
test("T4.2.1-A: owner reply → chronicle entry written with owner_reply kind", async () => {
|
|
36
|
+
const state = createStateDatabase(":memory:");
|
|
37
|
+
await seedRelationshipMemory(state);
|
|
38
|
+
const result = await processOwnerReply({
|
|
39
|
+
replyText: "Thanks for the update, that's helpful!",
|
|
40
|
+
relatedDecisionId: "decision-001",
|
|
41
|
+
}, state);
|
|
42
|
+
assert.ok(result.chronicleEntryId.startsWith("owner_reply:"));
|
|
43
|
+
assert.equal(result.relationshipUpdated, true);
|
|
44
|
+
const chronicle = createSessionChronicleStore(state);
|
|
45
|
+
const entries = await chronicle.loadSessionChronicle({ eventKinds: ["owner_reply"], limit: 10 });
|
|
46
|
+
assert.equal(entries.length, 1);
|
|
47
|
+
assert.equal(entries[0].actor, "owner");
|
|
48
|
+
assert.equal(entries[0].relatedDecisionId, "decision-001");
|
|
49
|
+
assert.ok(entries[0].ownerReply);
|
|
50
|
+
});
|
|
51
|
+
test("T4.2.1-B: positive reply → tone casual, noReplyCount reset to 0", async () => {
|
|
52
|
+
const state = createStateDatabase(":memory:");
|
|
53
|
+
await seedRelationshipMemory(state);
|
|
54
|
+
const result = await processOwnerReply({
|
|
55
|
+
replyText: "Great work! I really appreciate the quick follow-up.",
|
|
56
|
+
relatedDecisionId: "decision-002",
|
|
57
|
+
}, state);
|
|
58
|
+
assert.equal(result.relationshipUpdated, true);
|
|
59
|
+
assert.equal(result.updatedMemory.tonePreference, "casual");
|
|
60
|
+
assert.equal(result.updatedMemory.noReplyCount, 0);
|
|
61
|
+
assert.ok(result.updatedMemory.lastInteractionAt);
|
|
62
|
+
assert.ok(result.updatedMemory.sourceRefs.some((r) => r.kind === "owner_reply_feedback"), "sourceRefs must contain owner_reply_feedback ref");
|
|
63
|
+
});
|
|
64
|
+
test("T4.2.1-C: negative reply → tone quiet (reserved), noReplyCount reset", async () => {
|
|
65
|
+
const state = createStateDatabase(":memory:");
|
|
66
|
+
await seedRelationshipMemory(state);
|
|
67
|
+
const result = await processOwnerReply({
|
|
68
|
+
replyText: "I'm frustrated that you keep bothering me with these updates.",
|
|
69
|
+
relatedDecisionId: "decision-003",
|
|
70
|
+
}, state);
|
|
71
|
+
assert.equal(result.relationshipUpdated, true);
|
|
72
|
+
assert.equal(result.updatedMemory.tonePreference, "quiet");
|
|
73
|
+
assert.equal(result.updatedMemory.noReplyCount, 0);
|
|
74
|
+
});
|
|
75
|
+
test("T4.2.1-D: busy reply → timing busy, topics extracted, affinities updated", async () => {
|
|
76
|
+
const state = createStateDatabase(":memory:");
|
|
77
|
+
await seedRelationshipMemory(state);
|
|
78
|
+
const result = await processOwnerReply({
|
|
79
|
+
replyText: "I'm busy with a deadline. Let's talk about the project later.",
|
|
80
|
+
relatedDecisionId: "decision-004",
|
|
81
|
+
}, state);
|
|
82
|
+
assert.equal(result.relationshipUpdated, true);
|
|
83
|
+
// Timing inference is stored in ownerReply signal, not directly on memory field
|
|
84
|
+
const chronicle = createSessionChronicleStore(state);
|
|
85
|
+
const entries = await chronicle.loadSessionChronicle({ eventKinds: ["owner_reply"], limit: 1 });
|
|
86
|
+
assert.equal(entries[0].ownerReply.topics.includes("work"), true);
|
|
87
|
+
// Affinities should be updated
|
|
88
|
+
// L-04: baseline affinity = 0.5 (default), mergeTopicAffinities adds +0.1 per mention → expected >= 0.6
|
|
89
|
+
const workAffinity = result.updatedMemory.topicAffinities.find((t) => t.topic === "work");
|
|
90
|
+
assert.ok(workAffinity);
|
|
91
|
+
const EXPECTED_MIN_AFFINITY = 0.6;
|
|
92
|
+
assert.ok(workAffinity.affinity >= EXPECTED_MIN_AFFINITY, `work affinity should be boosted after reply mentioning deadline/project (expected >= ${EXPECTED_MIN_AFFINITY})`);
|
|
93
|
+
});
|
|
94
|
+
test("T4.2.1-E: no existing memory → creates default relationship with inferred traits", async () => {
|
|
95
|
+
const state = createStateDatabase(":memory:");
|
|
96
|
+
// Do NOT seed relationship memory
|
|
97
|
+
const result = await processOwnerReply({
|
|
98
|
+
replyText: "Sounds good, thanks for keeping me in the loop!",
|
|
99
|
+
relatedDecisionId: "decision-005",
|
|
100
|
+
}, state);
|
|
101
|
+
assert.equal(result.relationshipUpdated, true);
|
|
102
|
+
assert.equal(result.updatedMemory.relationshipId, "default");
|
|
103
|
+
assert.equal(result.updatedMemory.tonePreference, "casual");
|
|
104
|
+
assert.equal(result.updatedMemory.noReplyCount, 0);
|
|
105
|
+
assert.equal(result.updatedMemory.revision, 1);
|
|
106
|
+
});
|
|
107
|
+
test("T4.2.1-F: memory update includes sourceRef traceable to chronicle entry", async () => {
|
|
108
|
+
const state = createStateDatabase(":memory:");
|
|
109
|
+
await seedRelationshipMemory(state);
|
|
110
|
+
const result = await processOwnerReply({
|
|
111
|
+
replyText: "Love the new feature! Great work on the architecture design.",
|
|
112
|
+
relatedDecisionId: "decision-006",
|
|
113
|
+
}, state);
|
|
114
|
+
const chronicleEntryId = result.chronicleEntryId;
|
|
115
|
+
const memory = result.updatedMemory;
|
|
116
|
+
// Source refs must include trace to chronicle entry
|
|
117
|
+
const feedbackRef = memory.sourceRefs.find((r) => r.sourceId === chronicleEntryId);
|
|
118
|
+
assert.ok(feedbackRef, "memory sourceRefs must contain trace to chronicle entry");
|
|
119
|
+
assert.equal(feedbackRef.kind, "owner_reply_feedback");
|
|
120
|
+
// Topics should include "tech" (architecture, design, feature)
|
|
121
|
+
const techAffinity = memory.topicAffinities.find((t) => t.topic === "tech");
|
|
122
|
+
assert.ok(techAffinity, "tech topic should be inferred from reply text");
|
|
123
|
+
});
|
|
124
|
+
test("T4.2.1-G: conflicting tone (positive + negative) → quiet wins", async () => {
|
|
125
|
+
const state = createStateDatabase(":memory:");
|
|
126
|
+
await seedRelationshipMemory(state);
|
|
127
|
+
const result = await processOwnerReply({
|
|
128
|
+
replyText: "I love this feature but I'm frustrated with the timing",
|
|
129
|
+
relatedDecisionId: "decision-007",
|
|
130
|
+
}, state);
|
|
131
|
+
assert.equal(result.updatedMemory.tonePreference, "quiet");
|
|
132
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* T-V7C.C.4 — Identity / Goal Hygiene Closure Integration Tests
|
|
3
|
+
*
|
|
4
|
+
* Coverage:
|
|
5
|
+
* 1. Goal dedupe: same kind+scope → only latest accepted remains active
|
|
6
|
+
* 2. IdentityProfile → Connector: connector request carries platform handle (readable, no credential)
|
|
7
|
+
* 3. RelationshipMemory → Guidance: feedback affects frequency/tone selection
|
|
8
|
+
*/
|
|
9
|
+
export {};
|