@haaaiawd/second-nature 0.1.42 → 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/connectors/base/contract.d.ts +111 -0
- package/dist/src/connectors/base/failure-taxonomy.d.ts +13 -0
- package/dist/src/connectors/base/failure-taxonomy.js +186 -0
- package/dist/src/connectors/base/map-life-evidence.js +137 -0
- package/dist/src/connectors/base/policy-layer.js +202 -0
- package/dist/src/connectors/manifest/manifest-schema.d.ts +152 -0
- package/dist/src/connectors/manifest/manifest-schema.js +54 -0
- package/dist/src/connectors/services/connector-executor-adapter.d.ts +20 -0
- package/dist/src/connectors/services/connector-executor-adapter.js +645 -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 -1428
- package/runtime/cli/ops/workspace-heartbeat-runner.d.ts +0 -76
- package/runtime/cli/ops/workspace-heartbeat-runner.js +0 -236
- package/runtime/connectors/base/contract.d.ts +0 -110
- package/runtime/connectors/base/failure-taxonomy.d.ts +0 -13
- package/runtime/connectors/base/failure-taxonomy.js +0 -158
- package/runtime/connectors/base/map-life-evidence.js +0 -84
- package/runtime/connectors/base/policy-layer.js +0 -198
- package/runtime/connectors/manifest/manifest-schema.d.ts +0 -149
- package/runtime/connectors/manifest/manifest-schema.js +0 -53
- package/runtime/connectors/services/connector-executor-adapter.d.ts +0 -17
- package/runtime/connectors/services/connector-executor-adapter.js +0 -424
- 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.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/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/policy-layer.d.ts +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/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/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,198 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Plugin runtime artifact build script
|
|
4
|
+
*
|
|
5
|
+
* This script copies the compiled runtime code from dist/src/ into plugin/runtime/
|
|
6
|
+
* to create a self-contained plugin package that does not depend on the source repository.
|
|
7
|
+
*
|
|
8
|
+
* Usage: node scripts/build-plugin-runtime.js
|
|
9
|
+
*/
|
|
10
|
+
import fs from "node:fs";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = path.dirname(__filename);
|
|
15
|
+
const rootDir = path.resolve(__dirname, "..", "..");
|
|
16
|
+
const distDir = path.resolve(rootDir, "dist");
|
|
17
|
+
const pluginRuntimeDir = path.resolve(rootDir, "plugin", "runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Directories and files that must be included in the plugin runtime artifact.
|
|
20
|
+
* This is the minimum runtime dependency graph as defined in ADR-006.
|
|
21
|
+
*/
|
|
22
|
+
const RUNTIME_ARTIFACTS = [
|
|
23
|
+
// CLI runtime
|
|
24
|
+
{ src: "src/cli/index.js", dest: "cli/index.js" },
|
|
25
|
+
{ src: "src/cli/index.d.ts", dest: "cli/index.d.ts" },
|
|
26
|
+
{ src: "src/cli/action-bridge.js", dest: "cli/action-bridge.js" },
|
|
27
|
+
{ src: "src/cli/action-bridge.d.ts", dest: "cli/action-bridge.d.ts" },
|
|
28
|
+
{ src: "src/cli/commands/", dest: "cli/commands/" },
|
|
29
|
+
{ src: "src/cli/read-models/", dest: "cli/read-models/" },
|
|
30
|
+
{ src: "src/cli/explain/", dest: "cli/explain/" },
|
|
31
|
+
// State system runtime
|
|
32
|
+
{ src: "src/storage/", dest: "storage/" },
|
|
33
|
+
// Observability system runtime
|
|
34
|
+
{ src: "src/observability/", dest: "observability/" },
|
|
35
|
+
// Core second-nature (for heartbeat service entry)
|
|
36
|
+
{ src: "src/core/second-nature/", dest: "core/second-nature/" },
|
|
37
|
+
// Guidance system
|
|
38
|
+
{ src: "src/guidance/", dest: "guidance/" },
|
|
39
|
+
// Connector system
|
|
40
|
+
{ src: "src/connectors/", dest: "connectors/" },
|
|
41
|
+
// Dream scheduler (required by ops-router.ts → createQuietDreamSchedulePort)
|
|
42
|
+
{ src: "src/dream/", dest: "dream/" },
|
|
43
|
+
// Shared types
|
|
44
|
+
{ src: "src/shared/", dest: "shared/" },
|
|
45
|
+
// Type declarations
|
|
46
|
+
{ src: "src/openclaw-plugin-sdk.d.ts", dest: "openclaw-plugin-sdk.d.ts" },
|
|
47
|
+
];
|
|
48
|
+
/**
|
|
49
|
+
* Copy a file or directory recursively
|
|
50
|
+
*/
|
|
51
|
+
function copyRecursive(srcPath, destPath) {
|
|
52
|
+
const stat = fs.statSync(srcPath);
|
|
53
|
+
if (stat.isDirectory()) {
|
|
54
|
+
if (!fs.existsSync(destPath)) {
|
|
55
|
+
fs.mkdirSync(destPath, { recursive: true });
|
|
56
|
+
}
|
|
57
|
+
const entries = fs.readdirSync(srcPath);
|
|
58
|
+
for (const entry of entries) {
|
|
59
|
+
const srcEntry = path.join(srcPath, entry);
|
|
60
|
+
const destEntry = path.join(destPath, entry);
|
|
61
|
+
copyRecursive(srcEntry, destEntry);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const destDir = path.dirname(destPath);
|
|
66
|
+
if (!fs.existsSync(destDir)) {
|
|
67
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
68
|
+
}
|
|
69
|
+
fs.copyFileSync(srcPath, destPath);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Clean the plugin runtime directory
|
|
74
|
+
*/
|
|
75
|
+
function cleanRuntimeDir() {
|
|
76
|
+
if (fs.existsSync(pluginRuntimeDir)) {
|
|
77
|
+
fs.rmSync(pluginRuntimeDir, { recursive: true, force: true });
|
|
78
|
+
}
|
|
79
|
+
fs.mkdirSync(pluginRuntimeDir, { recursive: true });
|
|
80
|
+
console.log("✅ Cleaned plugin runtime directory");
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Copy runtime artifacts from dist/ to plugin/runtime/
|
|
84
|
+
*/
|
|
85
|
+
function copyArtifacts() {
|
|
86
|
+
let copied = 0;
|
|
87
|
+
let skipped = 0;
|
|
88
|
+
for (const artifact of RUNTIME_ARTIFACTS) {
|
|
89
|
+
const srcPath = path.resolve(distDir, artifact.src);
|
|
90
|
+
const destPath = path.resolve(pluginRuntimeDir, artifact.dest);
|
|
91
|
+
if (!fs.existsSync(srcPath)) {
|
|
92
|
+
console.log(`⚠️ Skipped (not found): ${artifact.src}`);
|
|
93
|
+
skipped++;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
copyRecursive(srcPath, destPath);
|
|
97
|
+
console.log(`✅ Copied: ${artifact.src} -> ${artifact.dest}`);
|
|
98
|
+
copied++;
|
|
99
|
+
}
|
|
100
|
+
return { copied, skipped };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Verify the runtime artifact structure
|
|
104
|
+
*/
|
|
105
|
+
function verifyArtifacts() {
|
|
106
|
+
const requiredFiles = [
|
|
107
|
+
"cli/index.js",
|
|
108
|
+
"cli/commands/index.js",
|
|
109
|
+
"storage/index.js",
|
|
110
|
+
"storage/db/index.js",
|
|
111
|
+
"observability/index.js",
|
|
112
|
+
"observability/db/index.js",
|
|
113
|
+
"core/second-nature/index.js",
|
|
114
|
+
"guidance/index.js",
|
|
115
|
+
"connectors/index.js",
|
|
116
|
+
];
|
|
117
|
+
let allPresent = true;
|
|
118
|
+
for (const file of requiredFiles) {
|
|
119
|
+
const filePath = path.resolve(pluginRuntimeDir, file);
|
|
120
|
+
if (!fs.existsSync(filePath)) {
|
|
121
|
+
console.log(`❌ Missing required file: ${file}`);
|
|
122
|
+
allPresent = false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return allPresent;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Check for any remaining ../src/ references in the runtime artifact
|
|
129
|
+
*/
|
|
130
|
+
function checkForExternalReferences() {
|
|
131
|
+
const found = [];
|
|
132
|
+
function checkFile(filePath) {
|
|
133
|
+
if (!fs.existsSync(filePath))
|
|
134
|
+
return;
|
|
135
|
+
const stat = fs.statSync(filePath);
|
|
136
|
+
if (stat.isDirectory()) {
|
|
137
|
+
const entries = fs.readdirSync(filePath);
|
|
138
|
+
for (const entry of entries) {
|
|
139
|
+
checkFile(path.join(filePath, entry));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else if (filePath.endsWith(".js") || filePath.endsWith(".ts")) {
|
|
143
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
144
|
+
if (content.includes("../src/") || content.includes("..\\src\\")) {
|
|
145
|
+
found.push(path.relative(pluginRuntimeDir, filePath));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
checkFile(pluginRuntimeDir);
|
|
150
|
+
return { found: found.length > 0, files: found };
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Main build function
|
|
154
|
+
*/
|
|
155
|
+
function main() {
|
|
156
|
+
console.log("🔨 Building plugin runtime artifact...\n");
|
|
157
|
+
// Step 1: Verify dist/ exists
|
|
158
|
+
if (!fs.existsSync(distDir)) {
|
|
159
|
+
console.error("❌ dist/ directory not found. Run 'pnpm build' first.");
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
162
|
+
console.log("✅ Found dist/ directory");
|
|
163
|
+
// Step 2: Clean plugin runtime directory
|
|
164
|
+
cleanRuntimeDir();
|
|
165
|
+
// Step 3: Copy artifacts
|
|
166
|
+
console.log("\n📦 Copying runtime artifacts...");
|
|
167
|
+
const { copied, skipped } = copyArtifacts();
|
|
168
|
+
console.log(`\n📊 Copied: ${copied}, Skipped: ${skipped}`);
|
|
169
|
+
// Step 4: Verify artifacts
|
|
170
|
+
console.log("\n🔍 Verifying artifact structure...");
|
|
171
|
+
const verified = verifyArtifacts();
|
|
172
|
+
if (verified) {
|
|
173
|
+
console.log("✅ All required files present");
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
console.log("❌ Some required files are missing");
|
|
177
|
+
process.exit(1);
|
|
178
|
+
}
|
|
179
|
+
// Step 5: Check for external references
|
|
180
|
+
console.log("\n🔍 Checking for external src/ references...");
|
|
181
|
+
const { found, files } = checkForExternalReferences();
|
|
182
|
+
if (found) {
|
|
183
|
+
console.log("⚠️ Found external src/ references in:");
|
|
184
|
+
files.forEach((f) => console.log(` - ${f}`));
|
|
185
|
+
console.log("\n These will be resolved in T1.2.1 (wrapper rewire)");
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
console.log("✅ No external src/ references found");
|
|
189
|
+
}
|
|
190
|
+
// Step 6: Summary
|
|
191
|
+
console.log("\n📋 Build Summary:");
|
|
192
|
+
console.log(` Runtime artifact directory: ${pluginRuntimeDir}`);
|
|
193
|
+
console.log(` Files copied: ${copied}`);
|
|
194
|
+
console.log(` Files skipped: ${skipped}`);
|
|
195
|
+
console.log(` External references: ${found ? "⚠️ (will be fixed in T1.2.1)" : "✅"}`);
|
|
196
|
+
console.log("\n✅ Plugin runtime artifact build complete");
|
|
197
|
+
}
|
|
198
|
+
main();
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
/**
|
|
8
|
+
* Resolve project root regardless of whether script runs from source or dist/.
|
|
9
|
+
* When compiled, __dirname is dist/scripts/, so we need to go up two levels.
|
|
10
|
+
* When running from source via --experimental-strip-types, __dirname is scripts/.
|
|
11
|
+
*/
|
|
12
|
+
function resolveRootDir() {
|
|
13
|
+
if (__dirname.includes(path.sep + 'dist' + path.sep + 'scripts')) {
|
|
14
|
+
return path.resolve(__dirname, '..', '..');
|
|
15
|
+
}
|
|
16
|
+
if (__dirname.endsWith('scripts')) {
|
|
17
|
+
return path.resolve(__dirname, '..');
|
|
18
|
+
}
|
|
19
|
+
return path.resolve(__dirname, '..');
|
|
20
|
+
}
|
|
21
|
+
const rootDir = resolveRootDir();
|
|
22
|
+
const require = createRequire(import.meta.url);
|
|
23
|
+
console.log('=== Packaging Feasibility POC Report ===');
|
|
24
|
+
console.log('Project root:', rootDir, '\n');
|
|
25
|
+
// 1. Test jiti loading of compiled JS
|
|
26
|
+
console.log('--- Test 1: jiti loading of compiled JS ---');
|
|
27
|
+
try {
|
|
28
|
+
const { createJiti } = require('jiti');
|
|
29
|
+
const jiti = createJiti(import.meta.url);
|
|
30
|
+
const cliPath = path.resolve(rootDir, 'dist/src/cli/index.js');
|
|
31
|
+
console.log('Attempting to load:', cliPath);
|
|
32
|
+
console.log('File exists:', fs.existsSync(cliPath));
|
|
33
|
+
const mod = jiti(cliPath);
|
|
34
|
+
console.log('Module loaded successfully:', !!mod);
|
|
35
|
+
console.log('Has createCommandRouter:', !!mod.createCommandRouter);
|
|
36
|
+
console.log('Has createCliRuntimeDeps:', !!mod.createCliRuntimeDeps);
|
|
37
|
+
console.log('✅ jiti loading: PASS\n');
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
const err = e;
|
|
41
|
+
console.log('❌ jiti loading: FAIL');
|
|
42
|
+
console.log('Error:', err.message, '\n');
|
|
43
|
+
}
|
|
44
|
+
// 2. Test better-sqlite3 native module
|
|
45
|
+
console.log('--- Test 2: better-sqlite3 native module ---');
|
|
46
|
+
try {
|
|
47
|
+
const Database = require('better-sqlite3');
|
|
48
|
+
const db = new Database(':memory:');
|
|
49
|
+
db.exec('CREATE TABLE test (id INTEGER PRIMARY KEY, name TEXT)');
|
|
50
|
+
db.exec("INSERT INTO test (name) VALUES ('test')");
|
|
51
|
+
const row = db.prepare('SELECT * FROM test').get();
|
|
52
|
+
console.log('SQLite test row:', row);
|
|
53
|
+
db.close();
|
|
54
|
+
console.log('✅ better-sqlite3: PASS\n');
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
const err = e;
|
|
58
|
+
console.log('❌ better-sqlite3: FAIL');
|
|
59
|
+
console.log('Error:', err.message, '\n');
|
|
60
|
+
}
|
|
61
|
+
// 3. Test npm install --ignore-scripts impact
|
|
62
|
+
console.log('--- Test 3: npm install --ignore-scripts impact ---');
|
|
63
|
+
console.log('better-sqlite3 requires native compilation during npm install');
|
|
64
|
+
console.log('With --ignore-scripts, better-sqlite3 prebuilds may not be available');
|
|
65
|
+
const sqlitePkg = require('better-sqlite3/package.json');
|
|
66
|
+
console.log('Current better-sqlite3 version:', sqlitePkg.version);
|
|
67
|
+
const prebuildsPath = path.resolve(rootDir, 'node_modules/better-sqlite3/prebuilds');
|
|
68
|
+
console.log('Check if prebuilds are bundled:', fs.existsSync(prebuildsPath));
|
|
69
|
+
console.log('⚠️ better-sqlite3 with --ignore-scripts: RISK (needs prebuild or compilation)\n');
|
|
70
|
+
// 4. Test artifact closure boundary
|
|
71
|
+
console.log('--- Test 4: Artifact closure boundary ---');
|
|
72
|
+
const pluginPkgPath = path.resolve(rootDir, 'plugin/package.json');
|
|
73
|
+
const pluginPkg = JSON.parse(fs.readFileSync(pluginPkgPath, 'utf-8'));
|
|
74
|
+
console.log('Current plugin files field:', JSON.stringify(pluginPkg.files));
|
|
75
|
+
console.log('Current plugin main:', pluginPkg.main);
|
|
76
|
+
console.log('Plugin has dependencies field:', !!pluginPkg.dependencies);
|
|
77
|
+
const runtimeDir = path.resolve(rootDir, 'plugin/runtime');
|
|
78
|
+
const hasRuntimeDir = fs.existsSync(runtimeDir);
|
|
79
|
+
console.log('plugin/runtime/ exists:', hasRuntimeDir);
|
|
80
|
+
if (hasRuntimeDir) {
|
|
81
|
+
const entries = fs.readdirSync(runtimeDir);
|
|
82
|
+
console.log('Runtime artifact contents:', entries.join(', '));
|
|
83
|
+
console.log('✅ Artifact boundary: PASS — runtime code included in package\n');
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
console.log('❌ Artifact boundary: FAIL — no runtime code in package\n');
|
|
87
|
+
}
|
|
88
|
+
// 5. Test compiled code import chain
|
|
89
|
+
console.log('--- Test 5: Compiled code import chain ---');
|
|
90
|
+
try {
|
|
91
|
+
const cliPath = path.resolve(rootDir, 'dist/src/cli/index.js');
|
|
92
|
+
const cliModule = await import(pathToFileURL(cliPath).href);
|
|
93
|
+
console.log('Direct import successful:', !!cliModule);
|
|
94
|
+
console.log('Exports:', Object.keys(cliModule));
|
|
95
|
+
console.log('✅ Compiled import chain: PASS\n');
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
const err = e;
|
|
99
|
+
console.log('❌ Compiled import chain: FAIL');
|
|
100
|
+
console.log('Error:', err.message, '\n');
|
|
101
|
+
}
|
|
102
|
+
// 6. Test plugin wrapper path resolution
|
|
103
|
+
console.log('--- Test 6: Plugin wrapper path resolution ---');
|
|
104
|
+
const pluginIndexPath = path.resolve(rootDir, 'plugin/index.ts');
|
|
105
|
+
const pluginIndex = fs.readFileSync(pluginIndexPath, 'utf-8');
|
|
106
|
+
const hasExternalRef = pluginIndex.includes('../src/');
|
|
107
|
+
const hasRuntimeRef = pluginIndex.includes('./runtime/');
|
|
108
|
+
console.log('Wrapper references ../src/:', hasExternalRef);
|
|
109
|
+
console.log('Wrapper references ./runtime/:', hasRuntimeRef);
|
|
110
|
+
if (!hasExternalRef && hasRuntimeRef) {
|
|
111
|
+
console.log('✅ Plugin wrapper: PASS — uses package-local paths\n');
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
console.log('❌ Plugin wrapper: FAIL — still references external src/\n');
|
|
115
|
+
}
|
|
116
|
+
// Summary
|
|
117
|
+
console.log('=== Summary ===');
|
|
118
|
+
console.log('1. jiti loading: tested');
|
|
119
|
+
console.log('2. better-sqlite3: tested');
|
|
120
|
+
console.log('3. npm install --ignore-scripts: RISK identified');
|
|
121
|
+
console.log('4. Artifact closure:', hasRuntimeDir ? '✅ PASS' : '❌ FAIL');
|
|
122
|
+
console.log('5. Compiled import chain: tested');
|
|
123
|
+
console.log('6. Plugin wrapper paths:', !hasExternalRef && hasRuntimeRef ? '✅ PASS' : '❌ FAIL');
|
|
124
|
+
console.log('\nConclusion: 可继续沿用 (Can continue using current stack)');
|
|
125
|
+
function pathToFileURL(filePath) {
|
|
126
|
+
return new URL('file://' + filePath.replace(/\\/g, '/'));
|
|
127
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
function resolveRoot() {
|
|
4
|
+
return process.cwd();
|
|
5
|
+
}
|
|
6
|
+
function ensureFile(filePath) {
|
|
7
|
+
return fs.existsSync(filePath) && fs.statSync(filePath).isFile();
|
|
8
|
+
}
|
|
9
|
+
function localPathResult(root) {
|
|
10
|
+
const pluginDir = path.join(root, "plugin");
|
|
11
|
+
const pluginPkgPath = path.join(pluginDir, "package.json");
|
|
12
|
+
const manifestPath = path.join(pluginDir, "openclaw.plugin.json");
|
|
13
|
+
const entryPath = path.join(pluginDir, "index.js");
|
|
14
|
+
const pluginPkg = ensureFile(pluginPkgPath)
|
|
15
|
+
? JSON.parse(fs.readFileSync(pluginPkgPath, "utf-8"))
|
|
16
|
+
: undefined;
|
|
17
|
+
const manifest = ensureFile(manifestPath)
|
|
18
|
+
? JSON.parse(fs.readFileSync(manifestPath, "utf-8"))
|
|
19
|
+
: undefined;
|
|
20
|
+
const activation = manifest?.activation;
|
|
21
|
+
const checks = {
|
|
22
|
+
pluginDirExists: fs.existsSync(pluginDir),
|
|
23
|
+
pluginPackageExists: ensureFile(pluginPkgPath),
|
|
24
|
+
manifestExists: ensureFile(manifestPath),
|
|
25
|
+
entryExists: ensureFile(entryPath),
|
|
26
|
+
packageMainIsIndexJs: pluginPkg?.main === "./index.js",
|
|
27
|
+
// OpenClaw 2026.5.x discovers the runtime entry via openclaw.runtimeExtensions
|
|
28
|
+
// in package.json; the legacy manifest.entry field is no longer required.
|
|
29
|
+
packageRuntimeExtensionsHasIndexJs: Array.isArray(pluginPkg?.openclaw?.runtimeExtensions) &&
|
|
30
|
+
pluginPkg.openclaw.runtimeExtensions.includes("./index.js"),
|
|
31
|
+
// contracts: { tools, commands, services } enumerates the agent-facing
|
|
32
|
+
// surface this plugin contributes. The host does not use it for shape
|
|
33
|
+
// classification — it just exposes the tools/commands/services to agents
|
|
34
|
+
// once the plugin is loaded.
|
|
35
|
+
manifestHasContracts: manifest?.contracts !== undefined &&
|
|
36
|
+
manifest?.contracts !== null &&
|
|
37
|
+
typeof manifest.contracts === "object",
|
|
38
|
+
// CRITICAL — without activation.onStartup the gateway daemon's
|
|
39
|
+
// loadGatewayStartupPluginPlan will silently skip this plugin (it has no
|
|
40
|
+
// channel/provider/context-engine slot to ride). onCapabilities mirrors
|
|
41
|
+
// the discovery allow-list ("provider" | "channel" | "tool" | "hook") and
|
|
42
|
+
// is our second startup ticket.
|
|
43
|
+
manifestActivationOnStartupTrue: activation?.onStartup === true,
|
|
44
|
+
manifestActivationDeclaresToolCapability: Array.isArray(activation?.onCapabilities) &&
|
|
45
|
+
activation.onCapabilities.includes("tool"),
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
mode: "local-path",
|
|
49
|
+
ok: Object.values(checks).every(Boolean),
|
|
50
|
+
installSpec: `file:${pluginDir}`,
|
|
51
|
+
gatewayRestartRequired: true,
|
|
52
|
+
manifestPath,
|
|
53
|
+
entryPath,
|
|
54
|
+
checks,
|
|
55
|
+
notes: [
|
|
56
|
+
`openclaw plugins install file:${pluginDir}`,
|
|
57
|
+
"openclaw plugins enable second-nature",
|
|
58
|
+
"openclaw gateway restart",
|
|
59
|
+
"openclaw plugins status second-nature",
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function clawhubResult() {
|
|
64
|
+
return {
|
|
65
|
+
mode: "clawhub",
|
|
66
|
+
ok: true,
|
|
67
|
+
installSpec: "clawhub:@second-nature/openclaw-plugin",
|
|
68
|
+
fallbackOrder: ["clawhub", "npm"],
|
|
69
|
+
gatewayRestartRequired: true,
|
|
70
|
+
checks: {
|
|
71
|
+
installSpecReady: true,
|
|
72
|
+
fallbackOrderDefined: true,
|
|
73
|
+
},
|
|
74
|
+
notes: [
|
|
75
|
+
"openclaw plugins install clawhub:@second-nature/openclaw-plugin",
|
|
76
|
+
"if clawhub unresolved: retry with npm:@second-nature/openclaw-plugin",
|
|
77
|
+
"openclaw gateway restart",
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function npmResult() {
|
|
82
|
+
return {
|
|
83
|
+
mode: "npm",
|
|
84
|
+
ok: true,
|
|
85
|
+
installSpec: "npm:@second-nature/openclaw-plugin",
|
|
86
|
+
fallbackOrder: ["npm", "file"],
|
|
87
|
+
gatewayRestartRequired: true,
|
|
88
|
+
checks: {
|
|
89
|
+
installSpecReady: true,
|
|
90
|
+
fallbackOrderDefined: true,
|
|
91
|
+
},
|
|
92
|
+
notes: [
|
|
93
|
+
"openclaw plugins install npm:@second-nature/openclaw-plugin",
|
|
94
|
+
"if npm unavailable: fallback to file:./plugin",
|
|
95
|
+
"openclaw gateway restart",
|
|
96
|
+
],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function parseMode(rawMode) {
|
|
100
|
+
if (rawMode === "clawhub")
|
|
101
|
+
return "clawhub";
|
|
102
|
+
if (rawMode === "npm")
|
|
103
|
+
return "npm";
|
|
104
|
+
return "local-path";
|
|
105
|
+
}
|
|
106
|
+
function run() {
|
|
107
|
+
const mode = parseMode(process.argv[2]);
|
|
108
|
+
const root = resolveRoot();
|
|
109
|
+
let result;
|
|
110
|
+
if (mode === "clawhub") {
|
|
111
|
+
result = clawhubResult();
|
|
112
|
+
}
|
|
113
|
+
else if (mode === "npm") {
|
|
114
|
+
result = npmResult();
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
result = localPathResult(root);
|
|
118
|
+
}
|
|
119
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
120
|
+
if (!result.ok) {
|
|
121
|
+
process.exitCode = 1;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
run();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StateAPI } from "../storage/state-api.js";
|
|
2
|
+
export interface PolicyWriteInput {
|
|
3
|
+
platformId: string;
|
|
4
|
+
socialDailyLimit: number;
|
|
5
|
+
quietEnabled: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ActionBridge {
|
|
8
|
+
savePolicy(input: PolicyWriteInput): Promise<void>;
|
|
9
|
+
verifyCredential(platformId: string, answer: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createActionBridge(stateApi: StateAPI): ActionBridge;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type ObservabilityDatabase } from "../observability/db/index.js";
|
|
2
|
+
import { type StateDatabase, type StateAPI } from "../storage/index.js";
|
|
3
|
+
import { type ActionBridge } from "./action-bridge.js";
|
|
4
|
+
import { type CliCommandDefinition } from "./commands/index.js";
|
|
5
|
+
import { type CliReadModels } from "./read-models/index.js";
|
|
6
|
+
import type { AppendOnlyAuditStore } from "../observability/audit/append-only-audit-store.js";
|
|
7
|
+
import { type RestoreSnapshotStore } from "../storage/services/restore-snapshot-store.js";
|
|
8
|
+
import { type RuntimeDecisionRecorder } from "../observability/services/runtime-decision-recorder.js";
|
|
9
|
+
import { type ConnectorExecutor } from "../connectors/services/connector-executor-adapter.js";
|
|
10
|
+
import { CapabilityContractRegistry } from "../connectors/base/manifest.js";
|
|
11
|
+
import { type AffordanceAssembler } from "../core/second-nature/body/tool-affordance/affordance-assembler.js";
|
|
12
|
+
import type { NarrativeTimelineDeps } from "../observability/services/narrative-timeline-query-service.js";
|
|
13
|
+
import type { SecretAnchorDeps } from "../observability/services/runtime-secret-anchor-view.js";
|
|
14
|
+
import { type DynamicConnectorRegistry as DynamicConnectorRegistryType } from "../connectors/registry/index.js";
|
|
15
|
+
export interface CommandRouter {
|
|
16
|
+
commands: CliCommandDefinition[];
|
|
17
|
+
resolve(name: string): CliCommandDefinition | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface CommandRouterDeps {
|
|
20
|
+
commands: CliCommandDefinition[];
|
|
21
|
+
}
|
|
22
|
+
export interface CliRuntimeDeps {
|
|
23
|
+
stateDb: StateDatabase;
|
|
24
|
+
observabilityDb: ObservabilityDatabase;
|
|
25
|
+
stateApi: StateAPI;
|
|
26
|
+
readModels: CliReadModels;
|
|
27
|
+
actionBridge: ActionBridge;
|
|
28
|
+
/** T1.2.3 — write back full-runtime heartbeat cycles into observability so `loadStatus` exits unknown. */
|
|
29
|
+
runtimeRecorder: RuntimeDecisionRecorder;
|
|
30
|
+
/** Connector-system executor used by full-runtime heartbeat connector_action intents. */
|
|
31
|
+
connectorExecutor: ConnectorExecutor;
|
|
32
|
+
/** Capability registry used by heartbeat planner to avoid platform/capability mismatches. */
|
|
33
|
+
capabilityRegistry: CapabilityContractRegistry;
|
|
34
|
+
/** T1.2.3 — DynamicConnectorRegistry for connector:status / connector:test commands. */
|
|
35
|
+
registry: DynamicConnectorRegistryType;
|
|
36
|
+
/** T-ROS.C.1 — body-tool affordance map port. */
|
|
37
|
+
affordanceAssembler: AffordanceAssembler;
|
|
38
|
+
/** T-ROS.C.1 — narrative timeline query deps. */
|
|
39
|
+
narrativeTimelineDeps: NarrativeTimelineDeps;
|
|
40
|
+
/** T-ROS.C.1 — runtime secret anchor health deps. */
|
|
41
|
+
secretAnchorDeps: SecretAnchorDeps;
|
|
42
|
+
/** T-ROS.C.1 — bounded restore port used by runtime restore command. */
|
|
43
|
+
restoreSnapshotStore: RestoreSnapshotStore;
|
|
44
|
+
}
|
|
45
|
+
export interface CreateCommandRouterOptions {
|
|
46
|
+
deps?: Partial<CliRuntimeDeps>;
|
|
47
|
+
}
|
|
48
|
+
export interface CreateCliRuntimeDepsOptions extends Partial<CliRuntimeDeps> {
|
|
49
|
+
/** T1.2.7 — pass an explicit audit store so `loadAuditSummary()` reflects test-injected events. */
|
|
50
|
+
livedExperienceAuditStore?: AppendOnlyAuditStore;
|
|
51
|
+
workspaceRoot?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare function createCliRuntimeDeps(overrides?: CreateCliRuntimeDepsOptions): CliRuntimeDeps;
|
|
54
|
+
export declare function createCommandRouter(options?: CreateCommandRouterOptions): CommandRouter;
|
|
55
|
+
export declare function closeCliRuntimeDeps(deps: Pick<CliRuntimeDeps, "stateDb" | "observabilityDb">): void;
|
|
56
|
+
export { createOpsRouter, type OpsRouter, type OpsRouterDeps, } from "./ops/ops-router.js";
|
|
57
|
+
export { heartbeatCheck, type HeartbeatSurfaceResult, type HeartbeatSurfaceStatus, type HeartbeatCheckInput, } from "./ops/heartbeat-surface.js";
|
|
58
|
+
export * from "./host-capability/types.js";
|
|
59
|
+
export { classifyDeliveryCapability, type ClassifyDeliveryCapabilityInput, } from "./host-capability/classify-delivery.js";
|
|
60
|
+
export { probeHostCapability } from "./host-capability/probe-host-capability.js";
|
|
61
|
+
export { recordHostCapability } from "./host-capability/record-host-capability.js";
|
|
62
|
+
export { runHostSmoke } from "./host-smoke/run-host-smoke.js";
|
|
63
|
+
export type { HostSmokePlan, HostSmokeReport, HostSmokeCase, HostSmokeCaseResult, } from "./host-smoke/types.js";
|
|
64
|
+
export { explainSurfaceSubject } from "./explain/explain-surface-subject.js";
|
|
65
|
+
export { showOperatorFallback, OperatorFallbackNotFoundError, } from "./ops/show-operator-fallback.js";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable HeartbeatSurfaceResult for second_nature_ops / CLI (T1.1.3, cli-system / ADR-005).
|
|
3
|
+
*
|
|
4
|
+
* S1 scope: carrier / probe / runtime-unavailable / fake control-plane passthrough only.
|
|
5
|
+
* Workspace full runtime: delegates to `runHeartbeatCycle` when read models are wired (US-001 / CH-09-02).
|
|
6
|
+
*/
|
|
7
|
+
import type { SurfaceMode } from "../runtime/runtime-artifact-boundary.js";
|
|
8
|
+
import type { HeartbeatSignal } from "../../core/second-nature/heartbeat/signal.js";
|
|
9
|
+
import type { CliReadModels } from "../read-models/index.js";
|
|
10
|
+
import type { RuntimeDecisionRecorder } from "../../observability/services/runtime-decision-recorder.js";
|
|
11
|
+
import type { StateDatabase } from "../../storage/db/index.js";
|
|
12
|
+
import type { ConnectorExecutor } from "../../core/second-nature/orchestrator/effect-dispatcher.js";
|
|
13
|
+
import type { CapabilityContractRegistry } from "../../connectors/base/manifest.js";
|
|
14
|
+
import type { AffordanceMap } from "../../shared/types/v7-entities.js";
|
|
15
|
+
import type { ExperienceWriter } from "../../core/second-nature/body/tool-experience/experience-writer.js";
|
|
16
|
+
import type { QuietDreamSchedulePort } from "../../core/second-nature/quiet/run-source-backed-quiet.js";
|
|
17
|
+
import type { HeartbeatDigestAssemblerDeps } from "../../observability/services/heartbeat-digest-assembler.js";
|
|
18
|
+
import type { GoalLifecyclePolicy } from "../../core/second-nature/heartbeat/goal-lifecycle-policy.js";
|
|
19
|
+
import type { IdleCuriosityPolicy } from "../../core/second-nature/heartbeat/idle-curiosity-policy.js";
|
|
20
|
+
import type { CircuitBreakerManager } from "../../core/second-nature/body/circuit-breaker/circuit-breaker-manager.js";
|
|
21
|
+
export type HeartbeatSurfaceStatus = "heartbeat_ok" | "intent_selected" | "denied" | "deferred" | "runtime_carrier_only" | "delivery_unavailable";
|
|
22
|
+
export interface HeartbeatSurfaceResult {
|
|
23
|
+
ok: boolean;
|
|
24
|
+
status: HeartbeatSurfaceStatus;
|
|
25
|
+
surfaceMode: SurfaceMode;
|
|
26
|
+
decisionId?: string;
|
|
27
|
+
deliveryAttemptId?: string;
|
|
28
|
+
capabilityReportRef?: string;
|
|
29
|
+
fallbackRef?: string;
|
|
30
|
+
reasons: string[];
|
|
31
|
+
/** When false, callers must not treat the round as lived-experience loop completion */
|
|
32
|
+
livedExperienceLoopClaimed: boolean;
|
|
33
|
+
/** True when structured fields mirror a fake adapter for schema parity only */
|
|
34
|
+
schemaParityOnly?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface HeartbeatCheckInput {
|
|
37
|
+
probeOnly?: boolean;
|
|
38
|
+
runtimeAvailable: boolean;
|
|
39
|
+
fakeControlPlanePassthrough?: Record<string, unknown>;
|
|
40
|
+
/** When set, full-runtime heartbeat_check runs the control-plane decision loop (US-001). */
|
|
41
|
+
readModels?: CliReadModels;
|
|
42
|
+
/** When set, full-runtime cycles are persisted so `loadStatus` exits unknown (T1.2.3). */
|
|
43
|
+
runtimeRecorder?: RuntimeDecisionRecorder;
|
|
44
|
+
/**
|
|
45
|
+
* T2.2.2: when set together with `workspaceRoot`, life evidence from the state DB is loaded
|
|
46
|
+
* and merged into SnapshotInputs so planner/guard paths see real source-ref truth.
|
|
47
|
+
*/
|
|
48
|
+
state?: StateDatabase;
|
|
49
|
+
workspaceRoot?: string;
|
|
50
|
+
timestamp?: string;
|
|
51
|
+
sessionContext?: string;
|
|
52
|
+
scopeHint?: HeartbeatSignal["scopeHint"];
|
|
53
|
+
/**
|
|
54
|
+
* When present, guard-allowed connector_action intents are dispatched through the
|
|
55
|
+
* connector-system instead of returning connector_dispatch_unwired.
|
|
56
|
+
*/
|
|
57
|
+
connectorExecutor?: ConnectorExecutor;
|
|
58
|
+
/** Capability registry used by planner to avoid platform/capability protocol mismatches. */
|
|
59
|
+
connectorRegistry?: CapabilityContractRegistry;
|
|
60
|
+
/** v7 T-V7C.C.2: affordance map for breaker-aware guard evaluation. */
|
|
61
|
+
affordanceMap?: AffordanceMap;
|
|
62
|
+
/** v7 T-V7C.C.2: experience writer for heartbeat connector attempts. */
|
|
63
|
+
experienceWriter?: ExperienceWriter;
|
|
64
|
+
/**
|
|
65
|
+
* v7 T-V7C.C.6: when present, a successful Quiet write auto-triggers Dream scheduling.
|
|
66
|
+
* Fixes the production-data gap where dream_output_index does not grow after Quiet.
|
|
67
|
+
*/
|
|
68
|
+
dreamSchedulePort?: QuietDreamSchedulePort;
|
|
69
|
+
/**
|
|
70
|
+
* v7 T-V7C.C.6: when present, generates a HeartbeatDigest after each cycle.
|
|
71
|
+
* Fixes the production-data gap where heartbeat_digest does not grow.
|
|
72
|
+
*/
|
|
73
|
+
digestOpts?: {
|
|
74
|
+
assemblerDeps: HeartbeatDigestAssemblerDeps;
|
|
75
|
+
digestWindowHour?: number;
|
|
76
|
+
};
|
|
77
|
+
/** v7 T-CP.C.3: goal lifecycle policy for evaluating goal transitions. */
|
|
78
|
+
goalLifecyclePolicy?: GoalLifecyclePolicy;
|
|
79
|
+
/** v7 T-CP.C.3: idle curiosity policy for read-only sensing when no active goals. */
|
|
80
|
+
idleCuriosityPolicy?: IdleCuriosityPolicy;
|
|
81
|
+
/** v7 T-BTS.C.5: circuit breaker manager for connector execution health. */
|
|
82
|
+
circuitBreakerManager?: CircuitBreakerManager;
|
|
83
|
+
}
|
|
84
|
+
export declare function heartbeatCheck(input: HeartbeatCheckInput): Promise<HeartbeatSurfaceResult>;
|