pulseed 0.6.0 → 0.6.1
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/README.md +18 -16
- package/dist/base/config/identity-loader.d.ts +12 -3
- package/dist/base/config/identity-loader.d.ts.map +1 -1
- package/dist/base/config/identity-loader.js +15 -7
- package/dist/base/config/identity-loader.js.map +1 -1
- package/dist/grounding/contracts.d.ts +13 -0
- package/dist/grounding/contracts.d.ts.map +1 -1
- package/dist/grounding/providers/knowledge-provider.d.ts.map +1 -1
- package/dist/grounding/providers/knowledge-provider.js +25 -3
- package/dist/grounding/providers/knowledge-provider.js.map +1 -1
- package/dist/grounding/providers/soil-provider.d.ts.map +1 -1
- package/dist/grounding/providers/soil-provider.js +28 -3
- package/dist/grounding/providers/soil-provider.js.map +1 -1
- package/dist/grounding/providers/static-policy-provider.d.ts +3 -1
- package/dist/grounding/providers/static-policy-provider.d.ts.map +1 -1
- package/dist/grounding/providers/static-policy-provider.js +4 -3
- package/dist/grounding/providers/static-policy-provider.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
- package/dist/interface/chat/chat-event-state.js +92 -9
- package/dist/interface/chat/chat-event-state.js.map +1 -1
- package/dist/interface/chat/chat-events.d.ts +15 -1
- package/dist/interface/chat/chat-events.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-event-bridge.d.ts +3 -0
- package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-event-bridge.js +54 -8
- package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -1
- package/dist/interface/chat/chat-runner-routes.d.ts +20 -0
- package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-routes.js +76 -0
- package/dist/interface/chat/chat-runner-routes.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +26 -2
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session.js +9 -3
- package/dist/interface/chat/cross-platform-session.js.map +1 -1
- package/dist/interface/chat/freeform-route-classifier.d.ts +21 -0
- package/dist/interface/chat/freeform-route-classifier.d.ts.map +1 -0
- package/dist/interface/chat/freeform-route-classifier.js +42 -0
- package/dist/interface/chat/freeform-route-classifier.js.map +1 -0
- package/dist/interface/chat/grounding.js +1 -1
- package/dist/interface/chat/grounding.js.map +1 -1
- package/dist/interface/chat/ingress-router.d.ts +9 -0
- package/dist/interface/chat/ingress-router.d.ts.map +1 -1
- package/dist/interface/chat/ingress-router.js +19 -0
- package/dist/interface/chat/ingress-router.js.map +1 -1
- package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
- package/dist/interface/cli/cli-command-registry.js +9 -1
- package/dist/interface/cli/cli-command-registry.js.map +1 -1
- package/dist/interface/cli/cli-runner.d.ts.map +1 -1
- package/dist/interface/cli/cli-runner.js +4 -1
- package/dist/interface/cli/cli-runner.js.map +1 -1
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +17 -1
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/goal-read.d.ts.map +1 -1
- package/dist/interface/cli/commands/goal-read.js +4 -0
- package/dist/interface/cli/commands/goal-read.js.map +1 -1
- package/dist/interface/cli/commands/memory.d.ts +3 -0
- package/dist/interface/cli/commands/memory.d.ts.map +1 -0
- package/dist/interface/cli/commands/memory.js +78 -0
- package/dist/interface/cli/commands/memory.js.map +1 -0
- package/dist/interface/cli/commands/plugin.d.ts.map +1 -1
- package/dist/interface/cli/commands/plugin.js +134 -12
- package/dist/interface/cli/commands/plugin.js.map +1 -1
- package/dist/interface/cli/commands/profile.d.ts +3 -0
- package/dist/interface/cli/commands/profile.d.ts.map +1 -0
- package/dist/interface/cli/commands/profile.js +459 -0
- package/dist/interface/cli/commands/profile.js.map +1 -0
- package/dist/interface/cli/commands/runtime.d.ts.map +1 -1
- package/dist/interface/cli/commands/runtime.js +101 -2
- package/dist/interface/cli/commands/runtime.js.map +1 -1
- package/dist/interface/cli/commands/setup-wizard.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup-wizard.js +30 -0
- package/dist/interface/cli/commands/setup-wizard.js.map +1 -1
- package/dist/interface/cli/utils.d.ts.map +1 -1
- package/dist/interface/cli/utils.js +4 -2
- package/dist/interface/cli/utils.js.map +1 -1
- package/dist/interface/tui/intent-recognizer.js +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js +3 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts +109 -0
- package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-timeline.js +261 -0
- package/dist/orchestrator/execution/agent-loop/agent-timeline.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +1 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/execution-policy.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/execution-policy.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/execution-policy.js +9 -3
- package/dist/orchestrator/execution/agent-loop/execution-policy.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/self-protection.d.ts +9 -0
- package/dist/orchestrator/execution/agent-loop/self-protection.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/self-protection.js +74 -0
- package/dist/orchestrator/execution/agent-loop/self-protection.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js +10 -1
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts +85 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.js +7 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.js +24 -2
- package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
- package/dist/platform/corrections/index.d.ts +2 -0
- package/dist/platform/corrections/index.d.ts.map +1 -0
- package/dist/platform/corrections/index.js +2 -0
- package/dist/platform/corrections/index.js.map +1 -0
- package/dist/platform/corrections/memory-correction-ledger.d.ts +656 -0
- package/dist/platform/corrections/memory-correction-ledger.d.ts.map +1 -0
- package/dist/platform/corrections/memory-correction-ledger.js +120 -0
- package/dist/platform/corrections/memory-correction-ledger.js.map +1 -0
- package/dist/platform/corrections/memory-governance.d.ts +118 -0
- package/dist/platform/corrections/memory-governance.d.ts.map +1 -0
- package/dist/platform/corrections/memory-governance.js +32 -0
- package/dist/platform/corrections/memory-governance.js.map +1 -0
- package/dist/platform/corrections/memory-quarantine.d.ts +57 -0
- package/dist/platform/corrections/memory-quarantine.d.ts.map +1 -0
- package/dist/platform/corrections/memory-quarantine.js +42 -0
- package/dist/platform/corrections/memory-quarantine.js.map +1 -0
- package/dist/platform/corrections/user-memory-operations.d.ts +31 -0
- package/dist/platform/corrections/user-memory-operations.d.ts.map +1 -0
- package/dist/platform/corrections/user-memory-operations.js +139 -0
- package/dist/platform/corrections/user-memory-operations.js.map +1 -0
- package/dist/platform/dream/dream-consolidator.d.ts +5 -0
- package/dist/platform/dream/dream-consolidator.d.ts.map +1 -1
- package/dist/platform/dream/dream-consolidator.js +235 -13
- package/dist/platform/dream/dream-consolidator.js.map +1 -1
- package/dist/platform/dream/dream-soil-mutation.d.ts.map +1 -1
- package/dist/platform/dream/dream-soil-mutation.js +10 -0
- package/dist/platform/dream/dream-soil-mutation.js.map +1 -1
- package/dist/platform/dream/dream-types.d.ts +412 -0
- package/dist/platform/dream/dream-types.d.ts.map +1 -1
- package/dist/platform/dream/dream-types.js +3 -0
- package/dist/platform/dream/dream-types.js.map +1 -1
- package/dist/platform/dream/playbook-memory.d.ts +14 -14
- package/dist/platform/knowledge/knowledge-manager-agent-memory.d.ts +48 -0
- package/dist/platform/knowledge/knowledge-manager-agent-memory.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager-agent-memory.js +154 -4
- package/dist/platform/knowledge/knowledge-manager-agent-memory.js.map +1 -1
- package/dist/platform/knowledge/knowledge-manager-lint.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager-lint.js +98 -4
- package/dist/platform/knowledge/knowledge-manager-lint.js.map +1 -1
- package/dist/platform/knowledge/knowledge-manager.d.ts +41 -2
- package/dist/platform/knowledge/knowledge-manager.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager.js +45 -5
- package/dist/platform/knowledge/knowledge-manager.js.map +1 -1
- package/dist/platform/knowledge/types/agent-memory.d.ts +1170 -42
- package/dist/platform/knowledge/types/agent-memory.d.ts.map +1 -1
- package/dist/platform/knowledge/types/agent-memory.js +13 -3
- package/dist/platform/knowledge/types/agent-memory.js.map +1 -1
- package/dist/platform/profile/proactive-feedback-proposals.d.ts +11 -0
- package/dist/platform/profile/proactive-feedback-proposals.d.ts.map +1 -0
- package/dist/platform/profile/proactive-feedback-proposals.js +106 -0
- package/dist/platform/profile/proactive-feedback-proposals.js.map +1 -0
- package/dist/platform/profile/profile-change-proposal.d.ts +464 -0
- package/dist/platform/profile/profile-change-proposal.d.ts.map +1 -0
- package/dist/platform/profile/profile-change-proposal.js +352 -0
- package/dist/platform/profile/profile-change-proposal.js.map +1 -0
- package/dist/platform/profile/relationship-profile.d.ts +351 -0
- package/dist/platform/profile/relationship-profile.d.ts.map +1 -0
- package/dist/platform/profile/relationship-profile.js +351 -0
- package/dist/platform/profile/relationship-profile.js.map +1 -0
- package/dist/platform/profile/retrieval-context.d.ts +12 -0
- package/dist/platform/profile/retrieval-context.d.ts.map +1 -0
- package/dist/platform/profile/retrieval-context.js +21 -0
- package/dist/platform/profile/retrieval-context.js.map +1 -0
- package/dist/platform/profile/user-md-profile-import.d.ts +73 -0
- package/dist/platform/profile/user-md-profile-import.d.ts.map +1 -0
- package/dist/platform/profile/user-md-profile-import.js +179 -0
- package/dist/platform/profile/user-md-profile-import.js.map +1 -0
- package/dist/platform/soil/content-projections.d.ts.map +1 -1
- package/dist/platform/soil/content-projections.js +17 -7
- package/dist/platform/soil/content-projections.js.map +1 -1
- package/dist/platform/soil/context-compiler.d.ts +16 -1
- package/dist/platform/soil/context-compiler.d.ts.map +1 -1
- package/dist/platform/soil/context-compiler.js +142 -4
- package/dist/platform/soil/context-compiler.js.map +1 -1
- package/dist/platform/soil/contracts.d.ts +720 -60
- package/dist/platform/soil/contracts.d.ts.map +1 -1
- package/dist/platform/soil/contracts.js +22 -0
- package/dist/platform/soil/contracts.js.map +1 -1
- package/dist/platform/soil/ddl.d.ts.map +1 -1
- package/dist/platform/soil/ddl.js +19 -0
- package/dist/platform/soil/ddl.js.map +1 -1
- package/dist/platform/soil/display/materialize.d.ts.map +1 -1
- package/dist/platform/soil/display/materialize.js.map +1 -1
- package/dist/platform/soil/importer.d.ts +6 -6
- package/dist/platform/soil/sqlite-repository-helpers.d.ts +4 -0
- package/dist/platform/soil/sqlite-repository-helpers.d.ts.map +1 -1
- package/dist/platform/soil/sqlite-repository-helpers.js.map +1 -1
- package/dist/platform/soil/sqlite-repository-search.d.ts.map +1 -1
- package/dist/platform/soil/sqlite-repository-search.js +48 -3
- package/dist/platform/soil/sqlite-repository-search.js.map +1 -1
- package/dist/platform/soil/sqlite-repository-storage.d.ts +3 -1
- package/dist/platform/soil/sqlite-repository-storage.d.ts.map +1 -1
- package/dist/platform/soil/sqlite-repository-storage.js +124 -3
- package/dist/platform/soil/sqlite-repository-storage.js.map +1 -1
- package/dist/platform/soil/sqlite-repository.d.ts +10 -1
- package/dist/platform/soil/sqlite-repository.d.ts.map +1 -1
- package/dist/platform/soil/sqlite-repository.js +46 -4
- package/dist/platform/soil/sqlite-repository.js.map +1 -1
- package/dist/platform/soil/types.d.ts +8 -8
- package/dist/platform/traits/curiosity-engine.d.ts +3 -1
- package/dist/platform/traits/curiosity-engine.d.ts.map +1 -1
- package/dist/platform/traits/curiosity-engine.js +3 -1
- package/dist/platform/traits/curiosity-engine.js.map +1 -1
- package/dist/platform/traits/curiosity-proposals.d.ts +6 -2
- package/dist/platform/traits/curiosity-proposals.d.ts.map +1 -1
- package/dist/platform/traits/curiosity-proposals.js +9 -3
- package/dist/platform/traits/curiosity-proposals.js.map +1 -1
- package/dist/reflection/evening-catchup.d.ts.map +1 -1
- package/dist/reflection/evening-catchup.js +4 -1
- package/dist/reflection/evening-catchup.js.map +1 -1
- package/dist/reflection/morning-planning.d.ts.map +1 -1
- package/dist/reflection/morning-planning.js +4 -1
- package/dist/reflection/morning-planning.js.map +1 -1
- package/dist/reflection/weekly-review.d.ts.map +1 -1
- package/dist/reflection/weekly-review.js +4 -1
- package/dist/reflection/weekly-review.js.map +1 -1
- package/dist/runtime/daemon/maintenance.d.ts.map +1 -1
- package/dist/runtime/daemon/maintenance.js +21 -2
- package/dist/runtime/daemon/maintenance.js.map +1 -1
- package/dist/runtime/daemon/runner-resident-curiosity.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-resident-curiosity.js +5 -1
- package/dist/runtime/daemon/runner-resident-curiosity.js.map +1 -1
- package/dist/runtime/daemon/runner-resident-shared.d.ts +1 -1
- package/dist/runtime/daemon/runner-resident-shared.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-resident-shared.js +16 -0
- package/dist/runtime/daemon/runner-resident-shared.js.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.js +2 -0
- package/dist/runtime/daemon/runtime-ownership.js.map +1 -1
- package/dist/runtime/dream-sidecar-review.d.ts +2 -1
- package/dist/runtime/dream-sidecar-review.d.ts.map +1 -1
- package/dist/runtime/dream-sidecar-review.js +49 -55
- package/dist/runtime/dream-sidecar-review.js.map +1 -1
- package/dist/runtime/gateway/telegram-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/telegram-gateway-adapter.js +4 -3
- package/dist/runtime/gateway/telegram-gateway-adapter.js.map +1 -1
- package/dist/runtime/plugin-loader.d.ts +1 -0
- package/dist/runtime/plugin-loader.d.ts.map +1 -1
- package/dist/runtime/plugin-loader.js +7 -2
- package/dist/runtime/plugin-loader.js.map +1 -1
- package/dist/runtime/store/dream-checkpoints.d.ts +3 -0
- package/dist/runtime/store/dream-checkpoints.d.ts.map +1 -1
- package/dist/runtime/store/dream-checkpoints.js +2 -0
- package/dist/runtime/store/dream-checkpoints.js.map +1 -1
- package/dist/runtime/store/evidence-ledger.d.ts +1315 -38
- package/dist/runtime/store/evidence-ledger.d.ts.map +1 -1
- package/dist/runtime/store/evidence-ledger.js +299 -34
- package/dist/runtime/store/evidence-ledger.js.map +1 -1
- package/dist/runtime/store/index.d.ts +2 -0
- package/dist/runtime/store/index.d.ts.map +1 -1
- package/dist/runtime/store/index.js +1 -0
- package/dist/runtime/store/index.js.map +1 -1
- package/dist/runtime/store/proactive-intervention-store.d.ts +360 -0
- package/dist/runtime/store/proactive-intervention-store.d.ts.map +1 -0
- package/dist/runtime/store/proactive-intervention-store.js +252 -0
- package/dist/runtime/store/proactive-intervention-store.js.map +1 -0
- package/dist/runtime/store/runtime-paths.d.ts +2 -0
- package/dist/runtime/store/runtime-paths.d.ts.map +1 -1
- package/dist/runtime/store/runtime-paths.js +4 -0
- package/dist/runtime/store/runtime-paths.js.map +1 -1
- package/dist/runtime/types/daemon.d.ts +8 -0
- package/dist/runtime/types/daemon.d.ts.map +1 -1
- package/dist/runtime/types/daemon.js +1 -0
- package/dist/runtime/types/daemon.js.map +1 -1
- package/dist/runtime/types/plugin.d.ts.map +1 -1
- package/dist/runtime/types/plugin.js +1 -1
- package/dist/runtime/types/plugin.js.map +1 -1
- package/dist/runtime/types/schedule.d.ts +10 -10
- package/dist/tools/builtin/exports.d.ts +1 -0
- package/dist/tools/builtin/exports.d.ts.map +1 -1
- package/dist/tools/builtin/exports.js +1 -0
- package/dist/tools/builtin/exports.js.map +1 -1
- package/dist/tools/builtin/factory.d.ts.map +1 -1
- package/dist/tools/builtin/factory.js +2 -1
- package/dist/tools/builtin/factory.js.map +1 -1
- package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.d.ts +4 -4
- package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.d.ts +76 -0
- package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.d.ts.map +1 -0
- package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.js +79 -0
- package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.js.map +1 -0
- package/dist/tools/execution/MemoryCorrectionTool/constants.d.ts +6 -0
- package/dist/tools/execution/MemoryCorrectionTool/constants.d.ts.map +1 -0
- package/dist/tools/execution/MemoryCorrectionTool/constants.js +6 -0
- package/dist/tools/execution/MemoryCorrectionTool/constants.js.map +1 -0
- package/dist/tools/execution/MemoryCorrectionTool/prompt.d.ts +2 -0
- package/dist/tools/execution/MemoryCorrectionTool/prompt.d.ts.map +1 -0
- package/dist/tools/execution/MemoryCorrectionTool/prompt.js +2 -0
- package/dist/tools/execution/MemoryCorrectionTool/prompt.js.map +1 -0
- package/dist/tools/execution/MemorySaveTool/MemorySaveTool.d.ts +306 -4
- package/dist/tools/execution/MemorySaveTool/MemorySaveTool.d.ts.map +1 -1
- package/dist/tools/execution/MemorySaveTool/MemorySaveTool.js +8 -0
- package/dist/tools/execution/MemorySaveTool/MemorySaveTool.js.map +1 -1
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts.map +1 -1
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js +37 -4
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js.map +1 -1
- package/dist/tools/fs/FileValidationTool/protected-path-policy.d.ts.map +1 -1
- package/dist/tools/fs/FileValidationTool/protected-path-policy.js +12 -0
- package/dist/tools/fs/FileValidationTool/protected-path-policy.js.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +16 -4
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js +12 -0
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js.map +1 -1
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts +7 -0
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts.map +1 -1
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js +20 -0
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.js +1 -1
- package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
- package/dist/tools/system/ShellTool/command-policy.d.ts +1 -1
- package/dist/tools/system/ShellTool/command-policy.d.ts.map +1 -1
- package/dist/tools/system/ShellTool/command-policy.js +25 -1
- package/dist/tools/system/ShellTool/command-policy.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const MemoryCorrectionTargetKindSchema = z.enum([
|
|
3
|
+
"agent_memory",
|
|
4
|
+
"soil_record",
|
|
5
|
+
"runtime_evidence",
|
|
6
|
+
"dream_checkpoint",
|
|
7
|
+
]);
|
|
8
|
+
export const MemoryCorrectionKindSchema = z.enum([
|
|
9
|
+
"corrected",
|
|
10
|
+
"superseded",
|
|
11
|
+
"retracted",
|
|
12
|
+
"forgotten",
|
|
13
|
+
"quarantined",
|
|
14
|
+
]);
|
|
15
|
+
export const MemoryCorrectionActorSchema = z.enum([
|
|
16
|
+
"user",
|
|
17
|
+
"dream_lint",
|
|
18
|
+
"runtime_verification",
|
|
19
|
+
"manual_tool",
|
|
20
|
+
]);
|
|
21
|
+
export const MemoryCorrectionAuditStatusSchema = z.enum([
|
|
22
|
+
"active",
|
|
23
|
+
"superseded",
|
|
24
|
+
"disputed",
|
|
25
|
+
"destructive_delete_requested",
|
|
26
|
+
]);
|
|
27
|
+
export const MemoryCorrectionTargetRefSchema = z.object({
|
|
28
|
+
kind: MemoryCorrectionTargetKindSchema,
|
|
29
|
+
id: z.string().min(1),
|
|
30
|
+
scope: z.object({
|
|
31
|
+
goal_id: z.string().min(1).optional(),
|
|
32
|
+
run_id: z.string().min(1).optional(),
|
|
33
|
+
task_id: z.string().min(1).optional(),
|
|
34
|
+
}).strict().optional(),
|
|
35
|
+
}).strict();
|
|
36
|
+
export const MemoryCorrectionProvenanceSchema = z.object({
|
|
37
|
+
source: MemoryCorrectionActorSchema,
|
|
38
|
+
source_ref: z.string().min(1).optional(),
|
|
39
|
+
evidence_ref: z.string().min(1).optional(),
|
|
40
|
+
confidence: z.number().min(0).max(1).nullable().default(null),
|
|
41
|
+
note: z.string().min(1).optional(),
|
|
42
|
+
}).strict();
|
|
43
|
+
export const MemoryCorrectionAuditSchema = z.object({
|
|
44
|
+
status: MemoryCorrectionAuditStatusSchema.default("active"),
|
|
45
|
+
retained_for_audit: z.boolean().default(true),
|
|
46
|
+
destructive_delete_approved_at: z.string().datetime().nullable().default(null),
|
|
47
|
+
}).strict();
|
|
48
|
+
export const MemoryCorrectionEntrySchema = z.object({
|
|
49
|
+
schema_version: z.literal("memory-correction-entry-v1").default("memory-correction-entry-v1"),
|
|
50
|
+
correction_id: z.string().min(1),
|
|
51
|
+
target_ref: MemoryCorrectionTargetRefSchema,
|
|
52
|
+
correction_kind: MemoryCorrectionKindSchema,
|
|
53
|
+
replacement_ref: MemoryCorrectionTargetRefSchema.nullable().default(null),
|
|
54
|
+
actor: MemoryCorrectionActorSchema,
|
|
55
|
+
reason: z.string().min(1),
|
|
56
|
+
created_at: z.string().datetime(),
|
|
57
|
+
provenance: MemoryCorrectionProvenanceSchema,
|
|
58
|
+
audit: MemoryCorrectionAuditSchema.default({}),
|
|
59
|
+
}).strict();
|
|
60
|
+
export const MemoryCorrectionLedgerFileSchema = z.object({
|
|
61
|
+
schema_version: z.literal("memory-correction-ledger-v1").default("memory-correction-ledger-v1"),
|
|
62
|
+
generated_at: z.string().datetime(),
|
|
63
|
+
entries: z.array(MemoryCorrectionEntrySchema).default([]),
|
|
64
|
+
}).strict();
|
|
65
|
+
export const MemoryCorrectionTargetStateSchema = z.object({
|
|
66
|
+
target_ref: MemoryCorrectionTargetRefSchema,
|
|
67
|
+
status: z.enum(["active", "corrected", "superseded", "retracted", "forgotten", "quarantined"]),
|
|
68
|
+
active: z.boolean(),
|
|
69
|
+
latest_correction_id: z.string().min(1).nullable().default(null),
|
|
70
|
+
replacement_ref: MemoryCorrectionTargetRefSchema.nullable().default(null),
|
|
71
|
+
retained_for_audit: z.boolean().default(true),
|
|
72
|
+
reason: z.string().min(1).nullable().default(null),
|
|
73
|
+
updated_at: z.string().datetime().nullable().default(null),
|
|
74
|
+
}).strict();
|
|
75
|
+
const inactiveCorrectionKinds = new Set([
|
|
76
|
+
"corrected",
|
|
77
|
+
"superseded",
|
|
78
|
+
"retracted",
|
|
79
|
+
"forgotten",
|
|
80
|
+
"quarantined",
|
|
81
|
+
]);
|
|
82
|
+
export function memoryCorrectionTargetKey(ref) {
|
|
83
|
+
return JSON.stringify([
|
|
84
|
+
ref.kind,
|
|
85
|
+
ref.id,
|
|
86
|
+
ref.scope?.goal_id ?? null,
|
|
87
|
+
ref.scope?.run_id ?? null,
|
|
88
|
+
ref.scope?.task_id ?? null,
|
|
89
|
+
]);
|
|
90
|
+
}
|
|
91
|
+
export function isMemoryCorrectionInactive(kind) {
|
|
92
|
+
return inactiveCorrectionKinds.has(kind);
|
|
93
|
+
}
|
|
94
|
+
export function summarizeMemoryCorrectionState(entries) {
|
|
95
|
+
const states = {};
|
|
96
|
+
for (const entry of [...entries].sort((left, right) => left.created_at.localeCompare(right.created_at))) {
|
|
97
|
+
if (entry.audit.status !== "active")
|
|
98
|
+
continue;
|
|
99
|
+
const key = memoryCorrectionTargetKey(entry.target_ref);
|
|
100
|
+
states[key] = MemoryCorrectionTargetStateSchema.parse({
|
|
101
|
+
target_ref: entry.target_ref,
|
|
102
|
+
status: entry.correction_kind,
|
|
103
|
+
active: !isMemoryCorrectionInactive(entry.correction_kind),
|
|
104
|
+
latest_correction_id: entry.correction_id,
|
|
105
|
+
replacement_ref: entry.replacement_ref,
|
|
106
|
+
retained_for_audit: entry.audit.retained_for_audit,
|
|
107
|
+
reason: entry.reason,
|
|
108
|
+
updated_at: entry.created_at,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return states;
|
|
112
|
+
}
|
|
113
|
+
export function correctionStateForTarget(states, ref) {
|
|
114
|
+
return states[memoryCorrectionTargetKey(ref)] ?? MemoryCorrectionTargetStateSchema.parse({
|
|
115
|
+
target_ref: ref,
|
|
116
|
+
status: "active",
|
|
117
|
+
active: true,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=memory-correction-ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-correction-ledger.js","sourceRoot":"","sources":["../../../src/platform/corrections/memory-correction-ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,IAAI,CAAC;IACrD,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,kBAAkB;CACnB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC;IAC/C,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;IACX,aAAa;CACd,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,CAAC;IAChD,MAAM;IACN,YAAY;IACZ,sBAAsB;IACtB,aAAa;CACd,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,IAAI,CAAC;IACtD,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,8BAA8B;CAC/B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,IAAI,EAAE,gCAAgC;IACtC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACrC,MAAM,EAAE,CAAC,CAAC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,UAAU,CAAC,CAAC,EAAE,CAAC;QACxG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ;YAAE,SAAS;QAC9C,MAAM,GAAG,GAAG,yBAAyB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACxD,MAAM,CAAC,GAAG,CAAC,GAAG,iCAAiC,CAAC,KAAK,CAAC;YACpD,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,MAAM,EAAE,KAAK,CAAC,eAAe;YAC7B,MAAM,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,eAAe,CAAC;YAC1D,oBAAoB,EAAE,KAAK,CAAC,aAAa;YACzC,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,kBAAkB;YAClD,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,MAAmD,EACnD,GAA8B;IAE9B,OAAO,MAAM,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,IAAI,iCAAiC,CAAC,KAAK,CAAC;QACvF,UAAU,EAAE,GAAG;QACf,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MemorySensitivitySchema: z.ZodEnum<["public", "local", "private", "secret"]>;
|
|
3
|
+
export type MemorySensitivity = z.infer<typeof MemorySensitivitySchema>;
|
|
4
|
+
export declare const MemoryConsentScopeSchema: z.ZodObject<{
|
|
5
|
+
scope_id: z.ZodDefault<z.ZodString>;
|
|
6
|
+
allowed_contexts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
source_actor: z.ZodDefault<z.ZodString>;
|
|
8
|
+
collection_context: z.ZodDefault<z.ZodString>;
|
|
9
|
+
granted_at: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
scope_id: string;
|
|
12
|
+
allowed_contexts: string[];
|
|
13
|
+
source_actor: string;
|
|
14
|
+
collection_context: string;
|
|
15
|
+
granted_at?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
scope_id?: string | undefined;
|
|
18
|
+
allowed_contexts?: string[] | undefined;
|
|
19
|
+
source_actor?: string | undefined;
|
|
20
|
+
collection_context?: string | undefined;
|
|
21
|
+
granted_at?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export type MemoryConsentScope = z.infer<typeof MemoryConsentScopeSchema>;
|
|
24
|
+
export declare const MemoryRetentionPolicySchema: z.ZodObject<{
|
|
25
|
+
policy_id: z.ZodDefault<z.ZodString>;
|
|
26
|
+
retain_until: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
review_after: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
delete_requires_approval: z.ZodDefault<z.ZodBoolean>;
|
|
29
|
+
}, "strict", z.ZodTypeAny, {
|
|
30
|
+
policy_id: string;
|
|
31
|
+
retain_until: string | null;
|
|
32
|
+
review_after: string | null;
|
|
33
|
+
delete_requires_approval: boolean;
|
|
34
|
+
}, {
|
|
35
|
+
policy_id?: string | undefined;
|
|
36
|
+
retain_until?: string | null | undefined;
|
|
37
|
+
review_after?: string | null | undefined;
|
|
38
|
+
delete_requires_approval?: boolean | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export type MemoryRetentionPolicy = z.infer<typeof MemoryRetentionPolicySchema>;
|
|
41
|
+
export declare const MemoryGovernanceSchema: z.ZodObject<{
|
|
42
|
+
sensitivity: z.ZodDefault<z.ZodEnum<["public", "local", "private", "secret"]>>;
|
|
43
|
+
consent: z.ZodDefault<z.ZodObject<{
|
|
44
|
+
scope_id: z.ZodDefault<z.ZodString>;
|
|
45
|
+
allowed_contexts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
46
|
+
source_actor: z.ZodDefault<z.ZodString>;
|
|
47
|
+
collection_context: z.ZodDefault<z.ZodString>;
|
|
48
|
+
granted_at: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, "strict", z.ZodTypeAny, {
|
|
50
|
+
scope_id: string;
|
|
51
|
+
allowed_contexts: string[];
|
|
52
|
+
source_actor: string;
|
|
53
|
+
collection_context: string;
|
|
54
|
+
granted_at?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
scope_id?: string | undefined;
|
|
57
|
+
allowed_contexts?: string[] | undefined;
|
|
58
|
+
source_actor?: string | undefined;
|
|
59
|
+
collection_context?: string | undefined;
|
|
60
|
+
granted_at?: string | undefined;
|
|
61
|
+
}>>;
|
|
62
|
+
retention: z.ZodDefault<z.ZodObject<{
|
|
63
|
+
policy_id: z.ZodDefault<z.ZodString>;
|
|
64
|
+
retain_until: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
review_after: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
66
|
+
delete_requires_approval: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
+
}, "strict", z.ZodTypeAny, {
|
|
68
|
+
policy_id: string;
|
|
69
|
+
retain_until: string | null;
|
|
70
|
+
review_after: string | null;
|
|
71
|
+
delete_requires_approval: boolean;
|
|
72
|
+
}, {
|
|
73
|
+
policy_id?: string | undefined;
|
|
74
|
+
retain_until?: string | null | undefined;
|
|
75
|
+
review_after?: string | null | undefined;
|
|
76
|
+
delete_requires_approval?: boolean | undefined;
|
|
77
|
+
}>>;
|
|
78
|
+
export_visibility: z.ZodDefault<z.ZodEnum<["listed", "redacted", "hidden"]>>;
|
|
79
|
+
owner_ref: z.ZodDefault<z.ZodString>;
|
|
80
|
+
}, "strict", z.ZodTypeAny, {
|
|
81
|
+
sensitivity: "local" | "public" | "private" | "secret";
|
|
82
|
+
consent: {
|
|
83
|
+
scope_id: string;
|
|
84
|
+
allowed_contexts: string[];
|
|
85
|
+
source_actor: string;
|
|
86
|
+
collection_context: string;
|
|
87
|
+
granted_at?: string | undefined;
|
|
88
|
+
};
|
|
89
|
+
retention: {
|
|
90
|
+
policy_id: string;
|
|
91
|
+
retain_until: string | null;
|
|
92
|
+
review_after: string | null;
|
|
93
|
+
delete_requires_approval: boolean;
|
|
94
|
+
};
|
|
95
|
+
export_visibility: "listed" | "redacted" | "hidden";
|
|
96
|
+
owner_ref: string;
|
|
97
|
+
}, {
|
|
98
|
+
sensitivity?: "local" | "public" | "private" | "secret" | undefined;
|
|
99
|
+
consent?: {
|
|
100
|
+
scope_id?: string | undefined;
|
|
101
|
+
allowed_contexts?: string[] | undefined;
|
|
102
|
+
source_actor?: string | undefined;
|
|
103
|
+
collection_context?: string | undefined;
|
|
104
|
+
granted_at?: string | undefined;
|
|
105
|
+
} | undefined;
|
|
106
|
+
retention?: {
|
|
107
|
+
policy_id?: string | undefined;
|
|
108
|
+
retain_until?: string | null | undefined;
|
|
109
|
+
review_after?: string | null | undefined;
|
|
110
|
+
delete_requires_approval?: boolean | undefined;
|
|
111
|
+
} | undefined;
|
|
112
|
+
export_visibility?: "listed" | "redacted" | "hidden" | undefined;
|
|
113
|
+
owner_ref?: string | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
export type MemoryGovernance = z.infer<typeof MemoryGovernanceSchema>;
|
|
116
|
+
export type MemoryGovernanceInput = z.input<typeof MemoryGovernanceSchema>;
|
|
117
|
+
export declare function isSensitivityAllowed(actual: MemorySensitivity, max: MemorySensitivity): boolean;
|
|
118
|
+
//# sourceMappingURL=memory-governance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-governance.d.ts","sourceRoot":"","sources":["../../../src/platform/corrections/memory-governance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB,qDAAmD,CAAC;AACxF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAM1B,CAAC;AACZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;EAK7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAS3E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAE/F"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const MemorySensitivitySchema = z.enum(["public", "local", "private", "secret"]);
|
|
3
|
+
export const MemoryConsentScopeSchema = z.object({
|
|
4
|
+
scope_id: z.string().min(1).default("local_planning"),
|
|
5
|
+
allowed_contexts: z.array(z.string().min(1)).default(["local_planning"]),
|
|
6
|
+
source_actor: z.string().min(1).default("user"),
|
|
7
|
+
collection_context: z.string().min(1).default("memory_save"),
|
|
8
|
+
granted_at: z.string().datetime().optional(),
|
|
9
|
+
}).strict();
|
|
10
|
+
export const MemoryRetentionPolicySchema = z.object({
|
|
11
|
+
policy_id: z.string().min(1).default("retain_until_retracted"),
|
|
12
|
+
retain_until: z.string().datetime().nullable().default(null),
|
|
13
|
+
review_after: z.string().datetime().nullable().default(null),
|
|
14
|
+
delete_requires_approval: z.boolean().default(true),
|
|
15
|
+
}).strict();
|
|
16
|
+
export const MemoryGovernanceSchema = z.object({
|
|
17
|
+
sensitivity: MemorySensitivitySchema.default("local"),
|
|
18
|
+
consent: MemoryConsentScopeSchema.default({}),
|
|
19
|
+
retention: MemoryRetentionPolicySchema.default({}),
|
|
20
|
+
export_visibility: z.enum(["listed", "redacted", "hidden"]).default("listed"),
|
|
21
|
+
owner_ref: z.string().min(1).default("user"),
|
|
22
|
+
}).strict();
|
|
23
|
+
const sensitivityRank = {
|
|
24
|
+
public: 0,
|
|
25
|
+
local: 1,
|
|
26
|
+
private: 2,
|
|
27
|
+
secret: 3,
|
|
28
|
+
};
|
|
29
|
+
export function isSensitivityAllowed(actual, max) {
|
|
30
|
+
return sensitivityRank[actual] <= sensitivityRank[max];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=memory-governance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-governance.js","sourceRoot":"","sources":["../../../src/platform/corrections/memory-governance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGxF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACrD,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACxE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CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC;AAIZ,MAAM,eAAe,GAAsC;IACzD,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,MAAyB,EAAE,GAAsB;IACpF,OAAO,eAAe,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MemoryVerificationStatusSchema: z.ZodEnum<["unknown", "unverified", "verified", "contradicted", "suspicious"]>;
|
|
3
|
+
export type MemoryVerificationStatus = z.infer<typeof MemoryVerificationStatusSchema>;
|
|
4
|
+
export declare const MemoryProvenanceSourceTypeSchema: z.ZodEnum<["user", "runtime", "tool", "web", "external", "imported", "unknown"]>;
|
|
5
|
+
export type MemoryProvenanceSourceType = z.infer<typeof MemoryProvenanceSourceTypeSchema>;
|
|
6
|
+
export declare const MemoryRiskSignalSchema: z.ZodEnum<["hallucinated", "low_provenance", "contradiction", "prompt_injection_like", "unverified_external"]>;
|
|
7
|
+
export type MemoryRiskSignal = z.infer<typeof MemoryRiskSignalSchema>;
|
|
8
|
+
export declare const MemoryProvenanceSchema: z.ZodObject<{
|
|
9
|
+
source_type: z.ZodDefault<z.ZodEnum<["user", "runtime", "tool", "web", "external", "imported", "unknown"]>>;
|
|
10
|
+
source_ref: z.ZodOptional<z.ZodString>;
|
|
11
|
+
raw_refs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
reliability: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
verification_status: z.ZodDefault<z.ZodEnum<["unknown", "unverified", "verified", "contradicted", "suspicious"]>>;
|
|
14
|
+
risk_signals: z.ZodDefault<z.ZodArray<z.ZodEnum<["hallucinated", "low_provenance", "contradiction", "prompt_injection_like", "unverified_external"]>, "many">>;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
source_type: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported";
|
|
17
|
+
raw_refs: string[];
|
|
18
|
+
verification_status: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious";
|
|
19
|
+
risk_signals: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[];
|
|
20
|
+
reliability?: number | undefined;
|
|
21
|
+
source_ref?: string | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
reliability?: number | undefined;
|
|
24
|
+
source_type?: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported" | undefined;
|
|
25
|
+
source_ref?: string | undefined;
|
|
26
|
+
raw_refs?: string[] | undefined;
|
|
27
|
+
verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
|
|
28
|
+
risk_signals?: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[] | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export type MemoryProvenance = z.infer<typeof MemoryProvenanceSchema>;
|
|
31
|
+
export declare const MemoryQuarantineStateSchema: z.ZodObject<{
|
|
32
|
+
status: z.ZodLiteral<"quarantined">;
|
|
33
|
+
active: z.ZodDefault<z.ZodLiteral<false>>;
|
|
34
|
+
reason: z.ZodString;
|
|
35
|
+
source: z.ZodDefault<z.ZodEnum<["memory_lint", "user", "runtime_verification", "system"]>>;
|
|
36
|
+
confidence: z.ZodNumber;
|
|
37
|
+
inspection_refs: z.ZodArray<z.ZodString, "many">;
|
|
38
|
+
created_at: z.ZodString;
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
|
+
status: "quarantined";
|
|
41
|
+
source: "system" | "user" | "runtime_verification" | "memory_lint";
|
|
42
|
+
active: false;
|
|
43
|
+
confidence: number;
|
|
44
|
+
created_at: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
inspection_refs: string[];
|
|
47
|
+
}, {
|
|
48
|
+
status: "quarantined";
|
|
49
|
+
confidence: number;
|
|
50
|
+
created_at: string;
|
|
51
|
+
reason: string;
|
|
52
|
+
inspection_refs: string[];
|
|
53
|
+
source?: "system" | "user" | "runtime_verification" | "memory_lint" | undefined;
|
|
54
|
+
active?: false | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
export type MemoryQuarantineState = z.infer<typeof MemoryQuarantineStateSchema>;
|
|
57
|
+
//# sourceMappingURL=memory-quarantine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-quarantine.d.ts","sourceRoot":"","sources":["../../../src/platform/corrections/memory-quarantine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,8BAA8B,gFAMzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,gCAAgC,kFAQ3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,sBAAsB,gHAMjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const MemoryVerificationStatusSchema = z.enum([
|
|
3
|
+
"unknown",
|
|
4
|
+
"unverified",
|
|
5
|
+
"verified",
|
|
6
|
+
"contradicted",
|
|
7
|
+
"suspicious",
|
|
8
|
+
]);
|
|
9
|
+
export const MemoryProvenanceSourceTypeSchema = z.enum([
|
|
10
|
+
"user",
|
|
11
|
+
"runtime",
|
|
12
|
+
"tool",
|
|
13
|
+
"web",
|
|
14
|
+
"external",
|
|
15
|
+
"imported",
|
|
16
|
+
"unknown",
|
|
17
|
+
]);
|
|
18
|
+
export const MemoryRiskSignalSchema = z.enum([
|
|
19
|
+
"hallucinated",
|
|
20
|
+
"low_provenance",
|
|
21
|
+
"contradiction",
|
|
22
|
+
"prompt_injection_like",
|
|
23
|
+
"unverified_external",
|
|
24
|
+
]);
|
|
25
|
+
export const MemoryProvenanceSchema = z.object({
|
|
26
|
+
source_type: MemoryProvenanceSourceTypeSchema.default("unknown"),
|
|
27
|
+
source_ref: z.string().min(1).optional(),
|
|
28
|
+
raw_refs: z.array(z.string().min(1)).default([]),
|
|
29
|
+
reliability: z.number().min(0).max(1).optional(),
|
|
30
|
+
verification_status: MemoryVerificationStatusSchema.default("unknown"),
|
|
31
|
+
risk_signals: z.array(MemoryRiskSignalSchema).default([]),
|
|
32
|
+
}).strict();
|
|
33
|
+
export const MemoryQuarantineStateSchema = z.object({
|
|
34
|
+
status: z.literal("quarantined"),
|
|
35
|
+
active: z.literal(false).default(false),
|
|
36
|
+
reason: z.string().min(1),
|
|
37
|
+
source: z.enum(["memory_lint", "user", "runtime_verification", "system"]).default("memory_lint"),
|
|
38
|
+
confidence: z.number().min(0).max(1),
|
|
39
|
+
inspection_refs: z.array(z.string().min(1)).min(1),
|
|
40
|
+
created_at: z.string().datetime(),
|
|
41
|
+
}).strict();
|
|
42
|
+
//# sourceMappingURL=memory-quarantine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mem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BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAChC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,MAAM,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAChG,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { StateManager } from "../../base/state/state-manager.js";
|
|
3
|
+
import { type MemoryCorrectionEntry, type MemoryCorrectionTargetRef } from "./memory-correction-ledger.js";
|
|
4
|
+
import { type AgentMemoryEntry } from "../knowledge/types/agent-memory.js";
|
|
5
|
+
export declare const UserMemoryOperationSchema: z.ZodEnum<["correct", "forget", "retract", "history"]>;
|
|
6
|
+
export type UserMemoryOperation = z.infer<typeof UserMemoryOperationSchema>;
|
|
7
|
+
export declare function parseMemoryCorrectionRef(value: string): MemoryCorrectionTargetRef;
|
|
8
|
+
export interface UserMemoryOperationInput {
|
|
9
|
+
operation: UserMemoryOperation;
|
|
10
|
+
targetRef: MemoryCorrectionTargetRef;
|
|
11
|
+
reason?: string;
|
|
12
|
+
replacementValue?: string;
|
|
13
|
+
replacementRef?: MemoryCorrectionTargetRef | null;
|
|
14
|
+
replacementKey?: string;
|
|
15
|
+
goalId?: string;
|
|
16
|
+
runId?: string;
|
|
17
|
+
taskId?: string;
|
|
18
|
+
now?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface UserMemoryOperationResult {
|
|
21
|
+
operation: UserMemoryOperation;
|
|
22
|
+
target_ref: MemoryCorrectionTargetRef;
|
|
23
|
+
correction: MemoryCorrectionEntry | null;
|
|
24
|
+
history: MemoryCorrectionEntry[];
|
|
25
|
+
replacement?: {
|
|
26
|
+
ref: MemoryCorrectionTargetRef;
|
|
27
|
+
entry?: AgentMemoryEntry;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export declare function runUserMemoryOperation(stateManager: StateManager, input: UserMemoryOperationInput): Promise<UserMemoryOperationResult>;
|
|
31
|
+
//# sourceMappingURL=user-memory-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-memory-operations.d.ts","sourceRoot":"","sources":["../../../src/platform/corrections/user-memory-operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAIL,KAAK,qBAAqB,EAE1B,KAAK,yBAAyB,EAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,oCAAoC,CAAC;AAS5C,eAAO,MAAM,yBAAyB,wDAAsD,CAAC;AAC7F,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,yBAAyB,CASjF;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,yBAAyB,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,UAAU,EAAE,yBAAyB,CAAC;IACtC,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE;QAAE,GAAG,EAAE,yBAAyB,CAAC;QAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;CAC5E;AA6CD,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,yBAAyB,CAAC,CA4DpC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { RuntimeEvidenceLedger } from "../../runtime/store/evidence-ledger.js";
|
|
5
|
+
import { MemoryCorrectionEntrySchema, MemoryCorrectionTargetKindSchema, memoryCorrectionTargetKey, } from "./memory-correction-ledger.js";
|
|
6
|
+
import { AgentMemoryStoreSchema, } from "../knowledge/types/agent-memory.js";
|
|
7
|
+
import { AGENT_MEMORY_PATH } from "../knowledge/knowledge-manager-internals.js";
|
|
8
|
+
import { applyAgentMemoryCorrection, listAgentMemoryCorrectionHistory, } from "../knowledge/knowledge-manager-agent-memory.js";
|
|
9
|
+
export const UserMemoryOperationSchema = z.enum(["correct", "forget", "retract", "history"]);
|
|
10
|
+
const RefPattern = /^(agent_memory|soil_record|runtime_evidence|dream_checkpoint):(.+)$/;
|
|
11
|
+
export function parseMemoryCorrectionRef(value) {
|
|
12
|
+
const match = RefPattern.exec(value);
|
|
13
|
+
if (!match) {
|
|
14
|
+
throw new Error("memory ref must use <kind>:<id>, where kind is agent_memory, soil_record, runtime_evidence, or dream_checkpoint");
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
kind: MemoryCorrectionTargetKindSchema.parse(match[1]),
|
|
18
|
+
id: match[2],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function correctionKindForOperation(operation) {
|
|
22
|
+
if (operation === "correct")
|
|
23
|
+
return "corrected";
|
|
24
|
+
if (operation === "forget")
|
|
25
|
+
return "forgotten";
|
|
26
|
+
return "retracted";
|
|
27
|
+
}
|
|
28
|
+
function scopeFor(input) {
|
|
29
|
+
return {
|
|
30
|
+
...(input.goalId ? { goal_id: input.goalId } : {}),
|
|
31
|
+
...(input.runId ? { run_id: input.runId } : {}),
|
|
32
|
+
...(input.taskId ? { task_id: input.taskId } : {}),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function correctionReason(input) {
|
|
36
|
+
return input.reason ?? `User requested ${input.operation} for ${input.targetRef.kind}:${input.targetRef.id}`;
|
|
37
|
+
}
|
|
38
|
+
function stateManagerAgentMemoryHost(stateManager) {
|
|
39
|
+
const llmClient = {};
|
|
40
|
+
return {
|
|
41
|
+
llmClient,
|
|
42
|
+
loadAgentMemoryStore: async () => {
|
|
43
|
+
const raw = await stateManager.readRaw(AGENT_MEMORY_PATH);
|
|
44
|
+
return AgentMemoryStoreSchema.parse(raw ?? { entries: [], corrections: [], last_consolidated_at: null });
|
|
45
|
+
},
|
|
46
|
+
saveAgentMemoryStore: async (store) => {
|
|
47
|
+
await stateManager.writeRaw(AGENT_MEMORY_PATH, store);
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function runtimeEvidenceLedgerForState(stateManager) {
|
|
52
|
+
return new RuntimeEvidenceLedger(path.join(stateManager.getBaseDir(), "runtime"));
|
|
53
|
+
}
|
|
54
|
+
function assertRuntimeScope(input) {
|
|
55
|
+
const scope = scopeFor(input);
|
|
56
|
+
if (!scope.goal_id && !scope.run_id) {
|
|
57
|
+
throw new Error("non-agent memory operations require --goal or --run so the audit entry can be scoped");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export async function runUserMemoryOperation(stateManager, input) {
|
|
61
|
+
if (input.operation === "history") {
|
|
62
|
+
return {
|
|
63
|
+
operation: input.operation,
|
|
64
|
+
target_ref: input.targetRef,
|
|
65
|
+
correction: null,
|
|
66
|
+
history: await readCorrectionHistory(stateManager, input),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
const correctionKind = correctionKindForOperation(input.operation);
|
|
70
|
+
if (input.targetRef.kind === "agent_memory") {
|
|
71
|
+
const result = await applyAgentMemoryCorrection(stateManagerAgentMemoryHost(stateManager), {
|
|
72
|
+
targetId: input.targetRef.id,
|
|
73
|
+
correctionKind: correctionKind,
|
|
74
|
+
reason: correctionReason(input),
|
|
75
|
+
replacementValue: input.replacementValue,
|
|
76
|
+
replacementKey: input.replacementKey,
|
|
77
|
+
actor: "user",
|
|
78
|
+
createdAt: input.now,
|
|
79
|
+
provenanceRef: "pulseed memory command",
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
operation: input.operation,
|
|
83
|
+
target_ref: input.targetRef,
|
|
84
|
+
correction: result.correction,
|
|
85
|
+
history: await listAgentMemoryCorrectionHistory(stateManagerAgentMemoryHost(stateManager), input.targetRef),
|
|
86
|
+
...(result.replacement
|
|
87
|
+
? { replacement: { ref: { kind: "agent_memory", id: result.replacement.id }, entry: result.replacement } }
|
|
88
|
+
: {}),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const now = input.now ?? new Date().toISOString();
|
|
92
|
+
assertRuntimeScope(input);
|
|
93
|
+
const scopedTarget = {
|
|
94
|
+
...input.targetRef,
|
|
95
|
+
...(Object.keys(scopeFor(input)).length > 0 ? { scope: scopeFor(input) } : {}),
|
|
96
|
+
};
|
|
97
|
+
const correction = MemoryCorrectionEntrySchema.parse({
|
|
98
|
+
correction_id: `user-memory-correction-${randomUUID()}`,
|
|
99
|
+
target_ref: scopedTarget,
|
|
100
|
+
correction_kind: correctionKind,
|
|
101
|
+
replacement_ref: input.replacementRef ?? null,
|
|
102
|
+
actor: "user",
|
|
103
|
+
reason: correctionReason(input),
|
|
104
|
+
created_at: now,
|
|
105
|
+
provenance: { source: "user", source_ref: "pulseed memory command", confidence: 1 },
|
|
106
|
+
});
|
|
107
|
+
const ledger = runtimeEvidenceLedgerForState(stateManager);
|
|
108
|
+
await ledger.appendCorrection({
|
|
109
|
+
...correction,
|
|
110
|
+
scope: scopeFor(input),
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
operation: input.operation,
|
|
114
|
+
target_ref: scopedTarget,
|
|
115
|
+
correction,
|
|
116
|
+
history: await readCorrectionHistory(stateManager, { ...input, targetRef: scopedTarget }),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
async function readCorrectionHistory(stateManager, input) {
|
|
120
|
+
if (input.targetRef.kind === "agent_memory") {
|
|
121
|
+
return listAgentMemoryCorrectionHistory(stateManagerAgentMemoryHost(stateManager), input.targetRef);
|
|
122
|
+
}
|
|
123
|
+
const ledger = runtimeEvidenceLedgerForState(stateManager);
|
|
124
|
+
const summaries = await Promise.all([
|
|
125
|
+
input.runId ? ledger.summarizeRun(input.runId).catch(() => null) : null,
|
|
126
|
+
input.goalId ? ledger.summarizeGoal(input.goalId).catch(() => null) : null,
|
|
127
|
+
]);
|
|
128
|
+
const deduped = new Map();
|
|
129
|
+
for (const correction of summaries.flatMap((summary) => summary?.corrections ?? [])) {
|
|
130
|
+
deduped.set(correction.correction_id, correction);
|
|
131
|
+
}
|
|
132
|
+
const expectedTarget = {
|
|
133
|
+
...input.targetRef,
|
|
134
|
+
...(Object.keys(scopeFor(input)).length > 0 ? { scope: scopeFor(input) } : {}),
|
|
135
|
+
};
|
|
136
|
+
const expectedKey = memoryCorrectionTargetKey(expectedTarget);
|
|
137
|
+
return [...deduped.values()].filter((correction) => memoryCorrectionTargetKey(correction.target_ref) === expectedKey);
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=user-memory-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-memory-operations.js","sourceRoot":"","sources":["../../../src/platform/corrections/user-memory-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,EAChC,yBAAyB,GAI1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,GAEjC,MAAM,gDAAgD,CAAC;AAGxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAG7F,MAAM,UAAU,GAAG,qEAAqE,CAAC;AAEzF,MAAM,UAAU,wBAAwB,CAAC,KAAa;IACpD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,iHAAiH,CAAC,CAAC;IACrI,CAAC;IACD,OAAO;QACL,IAAI,EAAE,gCAAgC,C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,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;KAC3E,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,IAAI,GAAG,EAAiC,CAAC;IACzD,KAAK,MAAM,UAAU,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,IAAI,EAAE,CAAC,EAAE,CAAC;QACpF,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,cAAc,GAAG;QACrB,GAAG,KAAK,CAAC,SAAS;QAClB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/E,CAAC;IACF,MAAM,WAAW,GAAG,yBAAyB,CAAC,cAAc,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CACjD,yBAAyB,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,WAAW,CACjE,CAAC;AACJ,CAAC"}
|
|
@@ -53,6 +53,11 @@ export declare class DreamConsolidator {
|
|
|
53
53
|
private artifactId;
|
|
54
54
|
private buildActivationArtifact;
|
|
55
55
|
private activationArtifactIf;
|
|
56
|
+
private collectMemoryResult;
|
|
57
|
+
private collectRuntimeEvidenceExtractionRefs;
|
|
58
|
+
private collectDreamReportPatternRefs;
|
|
59
|
+
private loadAgentMemoryStore;
|
|
60
|
+
private collectAgentMemoryResult;
|
|
56
61
|
private collectStallHistoryResult;
|
|
57
62
|
private collectVerificationArtifactsResult;
|
|
58
63
|
private collectDecisionHistoryResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dream-consolidator.d.ts","sourceRoot":"","sources":["../../../src/platform/dream/dream-consolidator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dream-consolidator.d.ts","sourceRoot":"","sources":["../../../src/platform/dream/dream-consolidator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAejE,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AA0E1B,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B,EAAE,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,+BAA+B;IAC9C,GAAG,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,CAAC,KAAK,EAAE;QACT,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;QACpB,uBAAuB,EAAE,MAAM,CAAC;KACjC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACvC;AAED,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MA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