pulseed 0.5.3 → 0.6.0
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 +13 -9
- package/dist/adapters/datasources/artifact-metric-datasource.d.ts +18 -0
- package/dist/adapters/datasources/artifact-metric-datasource.d.ts.map +1 -0
- package/dist/adapters/datasources/artifact-metric-datasource.js +592 -0
- package/dist/adapters/datasources/artifact-metric-datasource.js.map +1 -0
- package/dist/adapters/types/mcp.d.ts +6 -6
- package/dist/base/state/state-manager-goal-state.d.ts +40 -0
- package/dist/base/state/state-manager-goal-state.d.ts.map +1 -0
- package/dist/base/state/state-manager-goal-state.js +235 -0
- package/dist/base/state/state-manager-goal-state.js.map +1 -0
- package/dist/base/state/state-manager.d.ts +0 -5
- package/dist/base/state/state-manager.d.ts.map +1 -1
- package/dist/base/state/state-manager.js +27 -273
- package/dist/base/state/state-manager.js.map +1 -1
- package/dist/base/types/goal-activation.d.ts +37 -0
- package/dist/base/types/goal-activation.d.ts.map +1 -0
- package/dist/base/types/goal-activation.js +13 -0
- package/dist/base/types/goal-activation.js.map +1 -0
- package/dist/index.d.ts +6 -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-history.d.ts +129 -0
- package/dist/interface/chat/chat-history.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.js +135 -0
- package/dist/interface/chat/chat-history.js.map +1 -1
- package/dist/interface/chat/chat-runner-command-helpers.d.ts +50 -0
- package/dist/interface/chat/chat-runner-command-helpers.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-command-helpers.js +189 -0
- package/dist/interface/chat/chat-runner-command-helpers.js.map +1 -0
- package/dist/interface/chat/chat-runner-commands.d.ts +82 -0
- package/dist/interface/chat/chat-runner-commands.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-commands.js +906 -0
- package/dist/interface/chat/chat-runner-commands.js.map +1 -0
- package/dist/interface/chat/chat-runner-event-bridge.d.ts +60 -0
- package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-event-bridge.js +377 -0
- package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -0
- package/dist/interface/chat/chat-runner-routes.d.ts +67 -0
- package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-routes.js +610 -0
- package/dist/interface/chat/chat-runner-routes.js.map +1 -0
- package/dist/interface/chat/chat-runner-runtime.d.ts +37 -0
- package/dist/interface/chat/chat-runner-runtime.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-runtime.js +236 -0
- package/dist/interface/chat/chat-runner-runtime.js.map +1 -0
- package/dist/interface/chat/chat-runner-state.d.ts +20 -0
- package/dist/interface/chat/chat-runner-state.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-state.js +157 -0
- package/dist/interface/chat/chat-runner-state.js.map +1 -0
- package/dist/interface/chat/chat-runner-support.d.ts +39 -0
- package/dist/interface/chat/chat-runner-support.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-support.js +170 -0
- package/dist/interface/chat/chat-runner-support.js.map +1 -0
- package/dist/interface/chat/chat-runner.d.ts +10 -153
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +330 -2643
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/chat-session-store.d.ts +32 -0
- package/dist/interface/chat/chat-session-store.d.ts.map +1 -1
- package/dist/interface/chat/chat-session-store.js +100 -10
- package/dist/interface/chat/chat-session-store.js.map +1 -1
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session.js +15 -6
- package/dist/interface/chat/cross-platform-session.js.map +1 -1
- package/dist/interface/chat/event-subscriber.d.ts.map +1 -1
- package/dist/interface/chat/event-subscriber.js +61 -0
- package/dist/interface/chat/event-subscriber.js.map +1 -1
- package/dist/interface/chat/failure-recovery.d.ts +43 -1
- package/dist/interface/chat/failure-recovery.d.ts.map +1 -1
- package/dist/interface/chat/failure-recovery.js +259 -89
- package/dist/interface/chat/failure-recovery.js.map +1 -1
- package/dist/interface/chat/ingress-router.d.ts +2 -26
- package/dist/interface/chat/ingress-router.d.ts.map +1 -1
- package/dist/interface/chat/ingress-router.js +14 -88
- package/dist/interface/chat/ingress-router.js.map +1 -1
- package/dist/interface/chat/tend-command.d.ts.map +1 -1
- package/dist/interface/chat/tend-command.js +3 -0
- package/dist/interface/chat/tend-command.js.map +1 -1
- package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
- package/dist/interface/cli/cli-command-registry.js +19 -3
- package/dist/interface/cli/cli-command-registry.js.map +1 -1
- package/dist/interface/cli/commands/daemon-shared.d.ts +33 -0
- package/dist/interface/cli/commands/daemon-shared.d.ts.map +1 -0
- package/dist/interface/cli/commands/daemon-shared.js +152 -0
- package/dist/interface/cli/commands/daemon-shared.js.map +1 -0
- package/dist/interface/cli/commands/daemon.d.ts +2 -2
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +62 -127
- 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 +10 -3
- package/dist/interface/cli/commands/goal-read.js.map +1 -1
- package/dist/interface/cli/commands/notify.d.ts.map +1 -1
- package/dist/interface/cli/commands/notify.js +7 -1
- package/dist/interface/cli/commands/notify.js.map +1 -1
- package/dist/interface/cli/commands/run.d.ts.map +1 -1
- package/dist/interface/cli/commands/run.js +29 -0
- package/dist/interface/cli/commands/run.js.map +1 -1
- package/dist/interface/cli/commands/runtime.d.ts +1 -1
- package/dist/interface/cli/commands/runtime.d.ts.map +1 -1
- package/dist/interface/cli/commands/runtime.js +407 -2
- package/dist/interface/cli/commands/runtime.js.map +1 -1
- package/dist/interface/cli/commands/schedule/history.d.ts.map +1 -1
- package/dist/interface/cli/commands/schedule/history.js +5 -1
- package/dist/interface/cli/commands/schedule/history.js.map +1 -1
- package/dist/interface/cli/commands/schedule.js +34 -4
- package/dist/interface/cli/commands/schedule.js.map +1 -1
- package/dist/interface/cli/data-source-bootstrap.d.ts.map +1 -1
- package/dist/interface/cli/data-source-bootstrap.js +25 -12
- package/dist/interface/cli/data-source-bootstrap.js.map +1 -1
- package/dist/interface/cli/setup.d.ts.map +1 -1
- package/dist/interface/cli/setup.js +14 -0
- package/dist/interface/cli/setup.js.map +1 -1
- package/dist/interface/cli/utils/loop-runner.d.ts.map +1 -1
- package/dist/interface/cli/utils/loop-runner.js +2 -1
- package/dist/interface/cli/utils/loop-runner.js.map +1 -1
- package/dist/interface/cli/utils.d.ts.map +1 -1
- package/dist/interface/cli/utils.js +8 -1
- package/dist/interface/cli/utils.js.map +1 -1
- package/dist/interface/tui/app.d.ts +4 -1
- package/dist/interface/tui/app.d.ts.map +1 -1
- package/dist/interface/tui/app.js +282 -11
- package/dist/interface/tui/app.js.map +1 -1
- package/dist/interface/tui/chat/suggestions.d.ts.map +1 -1
- package/dist/interface/tui/chat/suggestions.js +118 -4
- package/dist/interface/tui/chat/suggestions.js.map +1 -1
- package/dist/interface/tui/chat-surface.d.ts +2 -0
- package/dist/interface/tui/chat-surface.d.ts.map +1 -1
- package/dist/interface/tui/chat-surface.js +3 -0
- package/dist/interface/tui/chat-surface.js.map +1 -1
- package/dist/interface/tui/dashboard.d.ts +37 -1
- package/dist/interface/tui/dashboard.d.ts.map +1 -1
- package/dist/interface/tui/dashboard.js +264 -1
- package/dist/interface/tui/dashboard.js.map +1 -1
- package/dist/interface/tui/entry-approval.d.ts +8 -0
- package/dist/interface/tui/entry-approval.d.ts.map +1 -0
- package/dist/interface/tui/entry-approval.js +59 -0
- package/dist/interface/tui/entry-approval.js.map +1 -0
- package/dist/interface/tui/entry-daemon.d.ts +12 -0
- package/dist/interface/tui/entry-daemon.d.ts.map +1 -0
- package/dist/interface/tui/entry-daemon.js +74 -0
- package/dist/interface/tui/entry-daemon.js.map +1 -0
- package/dist/interface/tui/entry-deps.d.ts +24 -0
- package/dist/interface/tui/entry-deps.d.ts.map +1 -0
- package/dist/interface/tui/entry-deps.js +427 -0
- package/dist/interface/tui/entry-deps.js.map +1 -0
- package/dist/interface/tui/entry.d.ts +2 -4
- package/dist/interface/tui/entry.d.ts.map +1 -1
- package/dist/interface/tui/entry.js +11 -556
- package/dist/interface/tui/entry.js.map +1 -1
- package/dist/interface/tui/fullscreen-chat-render.d.ts +127 -0
- package/dist/interface/tui/fullscreen-chat-render.d.ts.map +1 -0
- package/dist/interface/tui/fullscreen-chat-render.js +667 -0
- package/dist/interface/tui/fullscreen-chat-render.js.map +1 -0
- package/dist/interface/tui/fullscreen-chat.d.ts +2 -111
- package/dist/interface/tui/fullscreen-chat.d.ts.map +1 -1
- package/dist/interface/tui/fullscreen-chat.js +4 -663
- package/dist/interface/tui/fullscreen-chat.js.map +1 -1
- package/dist/interface/tui/help-overlay.d.ts.map +1 -1
- package/dist/interface/tui/help-overlay.js +1 -1
- package/dist/interface/tui/help-overlay.js.map +1 -1
- package/dist/interface/tui/intent-recognizer.d.ts +8 -3
- package/dist/interface/tui/intent-recognizer.d.ts.map +1 -1
- package/dist/interface/tui/intent-recognizer.js +74 -68
- package/dist/interface/tui/intent-recognizer.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 +49 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.js +2 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js +31 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts +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 +36 -2
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +2 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.d.ts +19 -0
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.js +165 -14
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.js +10 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.js +4 -0
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts +8 -8
- package/dist/orchestrator/execution/reflection-generator.d.ts +1 -0
- package/dist/orchestrator/execution/reflection-generator.d.ts.map +1 -1
- package/dist/orchestrator/execution/reflection-generator.js +10 -1
- package/dist/orchestrator/execution/reflection-generator.js.map +1 -1
- package/dist/orchestrator/execution/task/task-context-enricher.d.ts +2 -0
- package/dist/orchestrator/execution/task/task-context-enricher.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-context-enricher.js +9 -4
- package/dist/orchestrator/execution/task/task-context-enricher.js.map +1 -1
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.d.ts +5 -0
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.js +6 -0
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.js.map +1 -0
- package/dist/orchestrator/execution/task/task-generation.d.ts +3 -1
- package/dist/orchestrator/execution/task/task-generation.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.js +25 -5
- package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts +77 -0
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js +188 -0
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js.map +1 -0
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts +17 -8
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +144 -187
- package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.d.ts +2 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.js +4 -2
- package/dist/orchestrator/execution/task/task-prompt-builder.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-internal.d.ts +2 -0
- package/dist/orchestrator/execution/task/task-verifier-internal.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-verifier-internal.js +2 -0
- package/dist/orchestrator/execution/task/task-verifier-internal.js.map +1 -0
- package/dist/orchestrator/execution/types/pipeline.d.ts +6 -6
- package/dist/orchestrator/goal/goal-negotiator.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-negotiator.js +23 -3
- package/dist/orchestrator/goal/goal-negotiator.js.map +1 -1
- package/dist/orchestrator/goal/types/goal.d.ts +282 -0
- package/dist/orchestrator/goal/types/goal.d.ts.map +1 -1
- package/dist/orchestrator/goal/types/goal.js +20 -0
- package/dist/orchestrator/goal/types/goal.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/contracts.d.ts +47 -3
- package/dist/orchestrator/loop/core-loop/contracts.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/contracts.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/decision-engine.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/decision-engine.js +4 -0
- package/dist/orchestrator/loop/core-loop/decision-engine.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts +48 -0
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js +377 -0
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js +1 -1
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.d.ts +7 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.js +43 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.d.ts +14 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.js +41 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts +4 -2
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js +507 -87
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.js +40 -5
- package/dist/orchestrator/loop/core-loop/phase-policy.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts +2 -0
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-runtime.js +43 -2
- package/dist/orchestrator/loop/core-loop/phase-runtime.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts +969 -2
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.js +198 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/public-research.d.ts +32 -0
- package/dist/orchestrator/loop/core-loop/public-research.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/public-research.js +112 -0
- package/dist/orchestrator/loop/core-loop/public-research.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.d.ts +9 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js +433 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.d.ts +11 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.js +176 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts +7 -15
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.js +17 -444
- package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +18 -5
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +287 -17
- package/dist/orchestrator/loop/core-loop.js.map +1 -1
- package/dist/orchestrator/loop/loop-report-helper.d.ts.map +1 -1
- package/dist/orchestrator/loop/loop-report-helper.js +4 -0
- package/dist/orchestrator/loop/loop-report-helper.js.map +1 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts +20 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts.map +1 -1
- package/dist/orchestrator/loop/loop-result-types.js.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts +1 -0
- package/dist/orchestrator/loop/post-loop-hooks.d.ts.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.js +34 -1
- package/dist/orchestrator/loop/post-loop-hooks.js.map +1 -1
- package/dist/orchestrator/loop/run-policy.d.ts +10 -0
- package/dist/orchestrator/loop/run-policy.d.ts.map +1 -0
- package/dist/orchestrator/loop/run-policy.js +30 -0
- package/dist/orchestrator/loop/run-policy.js.map +1 -0
- package/dist/orchestrator/strategy/divergent-exploration.d.ts +37 -0
- package/dist/orchestrator/strategy/divergent-exploration.d.ts.map +1 -0
- package/dist/orchestrator/strategy/divergent-exploration.js +324 -0
- package/dist/orchestrator/strategy/divergent-exploration.js.map +1 -0
- package/dist/orchestrator/strategy/portfolio-manager.d.ts +3 -2
- package/dist/orchestrator/strategy/portfolio-manager.d.ts.map +1 -1
- package/dist/orchestrator/strategy/portfolio-manager.js +16 -11
- package/dist/orchestrator/strategy/portfolio-manager.js.map +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.d.ts +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.d.ts.map +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.js +31 -9
- package/dist/orchestrator/strategy/portfolio-rebalance.js.map +1 -1
- package/dist/orchestrator/strategy/strategy-helpers.d.ts +108 -0
- package/dist/orchestrator/strategy/strategy-helpers.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-helpers.js +34 -2
- package/dist/orchestrator/strategy/strategy-helpers.js.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts +31 -2
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.js +93 -12
- package/dist/orchestrator/strategy/strategy-manager-base.js.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager.d.ts +1 -11
- package/dist/orchestrator/strategy/strategy-manager.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager.js +78 -19
- package/dist/orchestrator/strategy/strategy-manager.js.map +1 -1
- package/dist/orchestrator/strategy/types/cross-portfolio.d.ts +2 -2
- package/dist/orchestrator/strategy/types/strategy.d.ts +364 -0
- package/dist/orchestrator/strategy/types/strategy.d.ts.map +1 -1
- package/dist/orchestrator/strategy/types/strategy.js +43 -0
- package/dist/orchestrator/strategy/types/strategy.js.map +1 -1
- package/dist/platform/dream/dream-activation.d.ts +1 -1
- package/dist/platform/dream/dream-consolidator/fs-metrics.d.ts +18 -0
- package/dist/platform/dream/dream-consolidator/fs-metrics.d.ts.map +1 -0
- package/dist/platform/dream/dream-consolidator/fs-metrics.js +130 -0
- package/dist/platform/dream/dream-consolidator/fs-metrics.js.map +1 -0
- package/dist/platform/dream/dream-consolidator.d.ts +4 -14
- package/dist/platform/dream/dream-consolidator.d.ts.map +1 -1
- package/dist/platform/dream/dream-consolidator.js +46 -166
- package/dist/platform/dream/dream-consolidator.js.map +1 -1
- package/dist/platform/dream/dream-event-workflows.d.ts +6 -6
- package/dist/platform/dream/dream-soil-sync.d.ts +1 -0
- package/dist/platform/dream/dream-soil-sync.d.ts.map +1 -1
- package/dist/platform/dream/dream-soil-sync.js +8 -1
- package/dist/platform/dream/dream-soil-sync.js.map +1 -1
- package/dist/platform/dream/dream-types.d.ts +94 -89
- package/dist/platform/dream/dream-types.d.ts.map +1 -1
- package/dist/platform/dream/dream-types.js +1 -0
- package/dist/platform/dream/dream-types.js.map +1 -1
- package/dist/platform/dream/playbook-memory.d.ts +4 -4
- package/dist/platform/drive/metric-history.d.ts +61 -0
- package/dist/platform/drive/metric-history.d.ts.map +1 -0
- package/dist/platform/drive/metric-history.js +206 -0
- package/dist/platform/drive/metric-history.js.map +1 -0
- package/dist/platform/drive/progress-predictor.d.ts +7 -0
- package/dist/platform/drive/progress-predictor.d.ts.map +1 -1
- package/dist/platform/drive/progress-predictor.js +23 -0
- package/dist/platform/drive/progress-predictor.js.map +1 -1
- package/dist/platform/drive/stall-detector/analysis.d.ts +5 -0
- package/dist/platform/drive/stall-detector/analysis.d.ts.map +1 -0
- package/dist/platform/drive/stall-detector/analysis.js +55 -0
- package/dist/platform/drive/stall-detector/analysis.js.map +1 -0
- package/dist/platform/drive/stall-detector/repetitive.d.ts +3 -0
- package/dist/platform/drive/stall-detector/repetitive.d.ts.map +1 -0
- package/dist/platform/drive/stall-detector/repetitive.js +72 -0
- package/dist/platform/drive/stall-detector/repetitive.js.map +1 -0
- package/dist/platform/drive/stall-detector/thresholds.d.ts +10 -0
- package/dist/platform/drive/stall-detector/thresholds.d.ts.map +1 -0
- package/dist/platform/drive/stall-detector/thresholds.js +61 -0
- package/dist/platform/drive/stall-detector/thresholds.js.map +1 -0
- package/dist/platform/drive/stall-detector.d.ts +5 -21
- package/dist/platform/drive/stall-detector.d.ts.map +1 -1
- package/dist/platform/drive/stall-detector.js +47 -201
- package/dist/platform/drive/stall-detector.js.map +1 -1
- package/dist/platform/drive/types/satisficing.d.ts +2 -2
- package/dist/platform/drive/types/stall.d.ts +4 -0
- package/dist/platform/drive/types/stall.d.ts.map +1 -1
- package/dist/platform/drive/types/stall.js +1 -0
- package/dist/platform/drive/types/stall.js.map +1 -1
- package/dist/platform/knowledge/knowledge-manager-agent-memory.d.ts +55 -0
- package/dist/platform/knowledge/knowledge-manager-agent-memory.d.ts.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-agent-memory.js +232 -0
- package/dist/platform/knowledge/knowledge-manager-agent-memory.js.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-internals.d.ts +10 -0
- package/dist/platform/knowledge/knowledge-manager-internals.d.ts.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-internals.js +43 -0
- package/dist/platform/knowledge/knowledge-manager-internals.js.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-store.d.ts +13 -0
- package/dist/platform/knowledge/knowledge-manager-store.d.ts.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-store.js +67 -0
- package/dist/platform/knowledge/knowledge-manager-store.js.map +1 -0
- package/dist/platform/knowledge/knowledge-manager.d.ts +6 -2
- package/dist/platform/knowledge/knowledge-manager.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager.js +43 -344
- package/dist/platform/knowledge/knowledge-manager.js.map +1 -1
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.d.ts +4 -0
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.d.ts.map +1 -0
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.js +106 -0
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.js.map +1 -0
- package/dist/platform/knowledge/memory/memory-lifecycle.d.ts.map +1 -1
- package/dist/platform/knowledge/memory/memory-lifecycle.js +6 -112
- package/dist/platform/knowledge/memory/memory-lifecycle.js.map +1 -1
- package/dist/platform/knowledge/types/learning.d.ts +2 -2
- package/dist/platform/observation/capability-detector/prompts.d.ts +18 -0
- package/dist/platform/observation/capability-detector/prompts.d.ts.map +1 -0
- package/dist/platform/observation/capability-detector/prompts.js +80 -0
- package/dist/platform/observation/capability-detector/prompts.js.map +1 -0
- package/dist/platform/observation/capability-detector/recommendations.d.ts +5 -0
- package/dist/platform/observation/capability-detector/recommendations.d.ts.map +1 -0
- package/dist/platform/observation/capability-detector/recommendations.js +76 -0
- package/dist/platform/observation/capability-detector/recommendations.js.map +1 -0
- package/dist/platform/observation/capability-detector/types.d.ts +112 -0
- package/dist/platform/observation/capability-detector/types.d.ts.map +1 -0
- package/dist/platform/observation/capability-detector/types.js +75 -0
- package/dist/platform/observation/capability-detector/types.js.map +1 -0
- package/dist/platform/observation/capability-detector.d.ts +4 -9
- package/dist/platform/observation/capability-detector.d.ts.map +1 -1
- package/dist/platform/observation/capability-detector.js +12 -212
- package/dist/platform/observation/capability-detector.js.map +1 -1
- package/dist/platform/observation/context-provider/collector.d.ts +13 -0
- package/dist/platform/observation/context-provider/collector.d.ts.map +1 -0
- package/dist/platform/observation/context-provider/collector.js +259 -0
- package/dist/platform/observation/context-provider/collector.js.map +1 -0
- package/dist/platform/observation/context-provider/search-terms.d.ts +2 -0
- package/dist/platform/observation/context-provider/search-terms.d.ts.map +1 -0
- package/dist/platform/observation/context-provider/search-terms.js +24 -0
- package/dist/platform/observation/context-provider/search-terms.js.map +1 -0
- package/dist/platform/observation/context-provider/shared.d.ts +17 -0
- package/dist/platform/observation/context-provider/shared.d.ts.map +1 -0
- package/dist/platform/observation/context-provider/shared.js +87 -0
- package/dist/platform/observation/context-provider/shared.js.map +1 -0
- package/dist/platform/observation/context-provider.d.ts +3 -28
- package/dist/platform/observation/context-provider.d.ts.map +1 -1
- package/dist/platform/observation/context-provider.js +7 -395
- package/dist/platform/observation/context-provider.js.map +1 -1
- package/dist/platform/observation/data-source-adapter.d.ts +1 -0
- package/dist/platform/observation/data-source-adapter.d.ts.map +1 -1
- package/dist/platform/observation/data-source-adapter.js.map +1 -1
- package/dist/platform/observation/observation-datasource.d.ts.map +1 -1
- package/dist/platform/observation/observation-datasource.js +2 -0
- package/dist/platform/observation/observation-datasource.js.map +1 -1
- package/dist/platform/observation/types/data-source.d.ts +153 -9
- package/dist/platform/observation/types/data-source.d.ts.map +1 -1
- package/dist/platform/observation/types/data-source.js +13 -1
- package/dist/platform/observation/types/data-source.js.map +1 -1
- package/dist/platform/soil/compiled-memory-projections.d.ts +2 -0
- package/dist/platform/soil/compiled-memory-projections.d.ts.map +1 -1
- package/dist/platform/soil/compiled-memory-projections.js +59 -0
- package/dist/platform/soil/compiled-memory-projections.js.map +1 -1
- package/dist/platform/soil/contracts.d.ts +67 -67
- package/dist/platform/soil/importer.d.ts +6 -6
- package/dist/platform/soil/retriever.d.ts +25 -0
- package/dist/platform/soil/retriever.d.ts.map +1 -1
- package/dist/platform/soil/retriever.js +94 -5
- package/dist/platform/soil/retriever.js.map +1 -1
- package/dist/platform/soil/sqlite-repository-helpers.d.ts +80 -0
- package/dist/platform/soil/sqlite-repository-helpers.d.ts.map +1 -0
- package/dist/platform/soil/sqlite-repository-helpers.js +143 -0
- package/dist/platform/soil/sqlite-repository-helpers.js.map +1 -0
- package/dist/platform/soil/sqlite-repository-search.d.ts +8 -0
- package/dist/platform/soil/sqlite-repository-search.d.ts.map +1 -0
- package/dist/platform/soil/sqlite-repository-search.js +367 -0
- package/dist/platform/soil/sqlite-repository-search.js.map +1 -0
- package/dist/platform/soil/sqlite-repository-storage.d.ts +8 -0
- package/dist/platform/soil/sqlite-repository-storage.d.ts.map +1 -0
- package/dist/platform/soil/sqlite-repository-storage.js +278 -0
- package/dist/platform/soil/sqlite-repository-storage.js.map +1 -0
- package/dist/platform/soil/sqlite-repository.d.ts +1 -4
- package/dist/platform/soil/sqlite-repository.d.ts.map +1 -1
- package/dist/platform/soil/sqlite-repository.js +26 -820
- package/dist/platform/soil/sqlite-repository.js.map +1 -1
- package/dist/platform/soil/types.d.ts +8 -8
- package/dist/platform/time/deadline-finalization.d.ts +57 -0
- package/dist/platform/time/deadline-finalization.d.ts.map +1 -0
- package/dist/platform/time/deadline-finalization.js +136 -0
- package/dist/platform/time/deadline-finalization.js.map +1 -0
- package/dist/platform/time/execution-mode.d.ts +29 -0
- package/dist/platform/time/execution-mode.d.ts.map +1 -0
- package/dist/platform/time/execution-mode.js +84 -0
- package/dist/platform/time/execution-mode.js.map +1 -0
- package/dist/platform/traits/types/curiosity.d.ts +9 -9
- package/dist/platform/traits/types/guardrail.d.ts +6 -6
- package/dist/reporting/report-formatters.d.ts.map +1 -1
- package/dist/reporting/report-formatters.js +67 -2
- package/dist/reporting/report-formatters.js.map +1 -1
- package/dist/reporting/reporting-engine.d.ts.map +1 -1
- package/dist/reporting/reporting-engine.js +3 -1
- package/dist/reporting/reporting-engine.js.map +1 -1
- package/dist/reporting/reporting-types.d.ts +4 -0
- package/dist/reporting/reporting-types.d.ts.map +1 -1
- package/dist/reporting/types/report.d.ts +59 -0
- package/dist/reporting/types/report.d.ts.map +1 -1
- package/dist/reporting/types/report.js +9 -0
- package/dist/reporting/types/report.js.map +1 -1
- package/dist/runtime/command-dispatcher.d.ts +2 -0
- package/dist/runtime/command-dispatcher.d.ts.map +1 -1
- package/dist/runtime/command-dispatcher.js +16 -0
- package/dist/runtime/command-dispatcher.js.map +1 -1
- package/dist/runtime/confirmation-decision.d.ts +94 -0
- package/dist/runtime/confirmation-decision.d.ts.map +1 -0
- package/dist/runtime/confirmation-decision.js +109 -0
- package/dist/runtime/confirmation-decision.js.map +1 -0
- package/dist/runtime/control/daemon-runtime-control-executor.d.ts.map +1 -1
- package/dist/runtime/control/daemon-runtime-control-executor.js +31 -1
- package/dist/runtime/control/daemon-runtime-control-executor.js.map +1 -1
- package/dist/runtime/control/runtime-control-intent.d.ts +9 -1
- package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-intent.js +82 -16
- package/dist/runtime/control/runtime-control-intent.js.map +1 -1
- package/dist/runtime/control/runtime-control-service.d.ts +35 -1
- package/dist/runtime/control/runtime-control-service.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-service.js +285 -5
- package/dist/runtime/control/runtime-control-service.js.map +1 -1
- package/dist/runtime/daemon/client.d.ts +12 -0
- package/dist/runtime/daemon/client.d.ts.map +1 -1
- package/dist/runtime/daemon/client.js +9 -0
- package/dist/runtime/daemon/client.js.map +1 -1
- package/dist/runtime/daemon/index.d.ts +1 -1
- package/dist/runtime/daemon/index.d.ts.map +1 -1
- package/dist/runtime/daemon/index.js +1 -1
- package/dist/runtime/daemon/index.js.map +1 -1
- package/dist/runtime/daemon/maintenance.d.ts +2 -10
- package/dist/runtime/daemon/maintenance.d.ts.map +1 -1
- package/dist/runtime/daemon/maintenance.js +14 -45
- package/dist/runtime/daemon/maintenance.js.map +1 -1
- package/dist/runtime/daemon/runner-bootstrap.d.ts +25 -0
- package/dist/runtime/daemon/runner-bootstrap.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-bootstrap.js +77 -0
- package/dist/runtime/daemon/runner-bootstrap.js.map +1 -0
- package/dist/runtime/daemon/runner-commands.d.ts +13 -9
- package/dist/runtime/daemon/runner-commands.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-commands.js +272 -21
- package/dist/runtime/daemon/runner-commands.js.map +1 -1
- package/dist/runtime/daemon/runner-goal-cycle.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-goal-cycle.js +62 -6
- package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
- package/dist/runtime/daemon/runner-resident-curiosity.d.ts +12 -0
- package/dist/runtime/daemon/runner-resident-curiosity.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-curiosity.js +155 -0
- package/dist/runtime/daemon/runner-resident-curiosity.js.map +1 -0
- package/dist/runtime/daemon/runner-resident-dream.d.ts +20 -0
- package/dist/runtime/daemon/runner-resident-dream.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-dream.js +148 -0
- package/dist/runtime/daemon/runner-resident-dream.js.map +1 -0
- package/dist/runtime/daemon/runner-resident-proactive.d.ts +4 -0
- package/dist/runtime/daemon/runner-resident-proactive.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-proactive.js +113 -0
- package/dist/runtime/daemon/runner-resident-proactive.js.map +1 -0
- package/dist/runtime/daemon/runner-resident-shared.d.ts +40 -0
- package/dist/runtime/daemon/runner-resident-shared.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-shared.js +101 -0
- package/dist/runtime/daemon/runner-resident-shared.js.map +1 -0
- package/dist/runtime/daemon/runner-resident.d.ts +4 -68
- package/dist/runtime/daemon/runner-resident.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-resident.js +4 -506
- package/dist/runtime/daemon/runner-resident.js.map +1 -1
- package/dist/runtime/daemon/runner-runtime.d.ts +12 -0
- package/dist/runtime/daemon/runner-runtime.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-runtime.js +43 -0
- package/dist/runtime/daemon/runner-runtime.js.map +1 -0
- package/dist/runtime/daemon/runner-startup.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-startup.js +15 -6
- package/dist/runtime/daemon/runner-startup.js.map +1 -1
- package/dist/runtime/daemon/runner.d.ts +14 -23
- package/dist/runtime/daemon/runner.d.ts.map +1 -1
- package/dist/runtime/daemon/runner.js +40 -110
- package/dist/runtime/daemon/runner.js.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.d.ts +9 -0
- package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.js +248 -1
- package/dist/runtime/daemon/runtime-ownership.js.map +1 -1
- package/dist/runtime/daemon/wait-deadline-resolver.d.ts +5 -2
- package/dist/runtime/daemon/wait-deadline-resolver.d.ts.map +1 -1
- package/dist/runtime/daemon/wait-deadline-resolver.js +55 -35
- package/dist/runtime/daemon/wait-deadline-resolver.js.map +1 -1
- package/dist/runtime/dream-sidecar-review.d.ts +92 -0
- package/dist/runtime/dream-sidecar-review.d.ts.map +1 -0
- package/dist/runtime/dream-sidecar-review.js +495 -0
- package/dist/runtime/dream-sidecar-review.js.map +1 -0
- package/dist/runtime/event/dispatcher.d.ts +0 -2
- package/dist/runtime/event/dispatcher.d.ts.map +1 -1
- package/dist/runtime/event/dispatcher.js +0 -4
- package/dist/runtime/event/dispatcher.js.map +1 -1
- package/dist/runtime/event/server-command-handler.d.ts +2 -4
- package/dist/runtime/event/server-command-handler.d.ts.map +1 -1
- package/dist/runtime/event/server-command-handler.js +36 -6
- package/dist/runtime/event/server-command-handler.js.map +1 -1
- package/dist/runtime/event/server-snapshot-reader.d.ts +15 -1
- package/dist/runtime/event/server-snapshot-reader.d.ts.map +1 -1
- package/dist/runtime/event/server-snapshot-reader.js +66 -2
- package/dist/runtime/event/server-snapshot-reader.js.map +1 -1
- package/dist/runtime/event/server-types.d.ts +7 -0
- package/dist/runtime/event/server-types.d.ts.map +1 -1
- package/dist/runtime/event/server.d.ts +5 -0
- package/dist/runtime/event/server.d.ts.map +1 -1
- package/dist/runtime/event/server.js +43 -11
- package/dist/runtime/event/server.js.map +1 -1
- package/dist/runtime/evidence-answer.d.ts +41 -0
- package/dist/runtime/evidence-answer.d.ts.map +1 -0
- package/dist/runtime/evidence-answer.js +366 -0
- package/dist/runtime/evidence-answer.js.map +1 -0
- package/dist/runtime/executor/goal-worker.d.ts +6 -2
- package/dist/runtime/executor/goal-worker.d.ts.map +1 -1
- package/dist/runtime/executor/goal-worker.js +7 -2
- package/dist/runtime/executor/goal-worker.js.map +1 -1
- package/dist/runtime/executor/loop-supervisor.d.ts +7 -0
- package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.js +72 -17
- package/dist/runtime/executor/loop-supervisor.js.map +1 -1
- package/dist/runtime/guardrails/backpressure-controller.d.ts +32 -0
- package/dist/runtime/guardrails/backpressure-controller.d.ts.map +1 -0
- package/dist/runtime/guardrails/backpressure-controller.js +88 -0
- package/dist/runtime/guardrails/backpressure-controller.js.map +1 -0
- package/dist/runtime/guardrails/circuit-breaker.d.ts +32 -0
- package/dist/runtime/guardrails/circuit-breaker.d.ts.map +1 -0
- package/dist/runtime/guardrails/circuit-breaker.js +88 -0
- package/dist/runtime/guardrails/circuit-breaker.js.map +1 -0
- package/dist/runtime/guardrails/guardrail-store.d.ts +23 -0
- package/dist/runtime/guardrails/guardrail-store.d.ts.map +1 -0
- package/dist/runtime/guardrails/guardrail-store.js +95 -0
- package/dist/runtime/guardrails/guardrail-store.js.map +1 -0
- package/dist/runtime/guardrails/index.d.ts +4 -0
- package/dist/runtime/guardrails/index.d.ts.map +1 -0
- package/dist/runtime/guardrails/index.js +4 -0
- package/dist/runtime/guardrails/index.js.map +1 -0
- package/dist/runtime/interactive-automation/browser-session-store.d.ts +43 -0
- package/dist/runtime/interactive-automation/browser-session-store.d.ts.map +1 -0
- package/dist/runtime/interactive-automation/browser-session-store.js +104 -0
- package/dist/runtime/interactive-automation/browser-session-store.js.map +1 -0
- package/dist/runtime/interactive-automation/failure-classifier.d.ts +12 -0
- package/dist/runtime/interactive-automation/failure-classifier.d.ts.map +1 -0
- package/dist/runtime/interactive-automation/failure-classifier.js +50 -0
- package/dist/runtime/interactive-automation/failure-classifier.js.map +1 -0
- package/dist/runtime/interactive-automation/index.d.ts +2 -0
- package/dist/runtime/interactive-automation/index.d.ts.map +1 -1
- package/dist/runtime/interactive-automation/index.js +2 -0
- package/dist/runtime/interactive-automation/index.js.map +1 -1
- package/dist/runtime/interactive-automation/providers/manus-browser.d.ts.map +1 -1
- package/dist/runtime/interactive-automation/providers/manus-browser.js +17 -1
- package/dist/runtime/interactive-automation/providers/manus-browser.js.map +1 -1
- package/dist/runtime/interactive-automation/types.d.ts +4 -0
- package/dist/runtime/interactive-automation/types.d.ts.map +1 -1
- package/dist/runtime/interactive-automation/types.js.map +1 -1
- package/dist/runtime/notification-routing.d.ts +45 -2
- package/dist/runtime/notification-routing.d.ts.map +1 -1
- package/dist/runtime/notification-routing.js +196 -79
- package/dist/runtime/notification-routing.js.map +1 -1
- package/dist/runtime/run-spec/confirmation.d.ts +34 -0
- package/dist/runtime/run-spec/confirmation.d.ts.map +1 -0
- package/dist/runtime/run-spec/confirmation.js +176 -0
- package/dist/runtime/run-spec/confirmation.js.map +1 -0
- package/dist/runtime/run-spec/derive.d.ts +284 -0
- package/dist/runtime/run-spec/derive.d.ts.map +1 -0
- package/dist/runtime/run-spec/derive.js +379 -0
- package/dist/runtime/run-spec/derive.js.map +1 -0
- package/dist/runtime/run-spec/index.d.ts +5 -0
- package/dist/runtime/run-spec/index.d.ts.map +1 -0
- package/dist/runtime/run-spec/index.js +5 -0
- package/dist/runtime/run-spec/index.js.map +1 -0
- package/dist/runtime/run-spec/store.d.ts +11 -0
- package/dist/runtime/run-spec/store.d.ts.map +1 -0
- package/dist/runtime/run-spec/store.js +36 -0
- package/dist/runtime/run-spec/store.js.map +1 -0
- package/dist/runtime/run-spec/types.d.ts +495 -0
- package/dist/runtime/run-spec/types.d.ts.map +1 -0
- package/dist/runtime/run-spec/types.js +87 -0
- package/dist/runtime/run-spec/types.js.map +1 -0
- package/dist/runtime/schedule/engine-cron-reflection.d.ts +31 -0
- package/dist/runtime/schedule/engine-cron-reflection.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-cron-reflection.js +229 -0
- package/dist/runtime/schedule/engine-cron-reflection.js.map +1 -0
- package/dist/runtime/schedule/engine-execution.d.ts +48 -0
- package/dist/runtime/schedule/engine-execution.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-execution.js +424 -0
- package/dist/runtime/schedule/engine-execution.js.map +1 -0
- package/dist/runtime/schedule/engine-heartbeat.d.ts +5 -0
- package/dist/runtime/schedule/engine-heartbeat.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-heartbeat.js +104 -0
- package/dist/runtime/schedule/engine-heartbeat.js.map +1 -0
- package/dist/runtime/schedule/engine-layers.d.ts +4 -1
- package/dist/runtime/schedule/engine-layers.d.ts.map +1 -1
- package/dist/runtime/schedule/engine-layers.js +15 -229
- package/dist/runtime/schedule/engine-layers.js.map +1 -1
- package/dist/runtime/schedule/engine-mutations.d.ts +37 -0
- package/dist/runtime/schedule/engine-mutations.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-mutations.js +263 -0
- package/dist/runtime/schedule/engine-mutations.js.map +1 -0
- package/dist/runtime/schedule/engine.d.ts +13 -39
- package/dist/runtime/schedule/engine.d.ts.map +1 -1
- package/dist/runtime/schedule/engine.js +65 -810
- package/dist/runtime/schedule/engine.js.map +1 -1
- package/dist/runtime/schedule/history.d.ts +20 -4
- package/dist/runtime/schedule/history.d.ts.map +1 -1
- package/dist/runtime/schedule/history.js +8 -0
- package/dist/runtime/schedule/history.js.map +1 -1
- package/dist/runtime/schedule/index.d.ts +1 -0
- package/dist/runtime/schedule/index.d.ts.map +1 -1
- package/dist/runtime/schedule/index.js +1 -0
- package/dist/runtime/schedule/index.js.map +1 -1
- package/dist/runtime/schedule/legacy-cron-migration.d.ts +9 -0
- package/dist/runtime/schedule/legacy-cron-migration.d.ts.map +1 -0
- package/dist/runtime/schedule/legacy-cron-migration.js +89 -0
- package/dist/runtime/schedule/legacy-cron-migration.js.map +1 -0
- package/dist/runtime/schedule/wait-projection.d.ts +6 -0
- package/dist/runtime/schedule/wait-projection.d.ts.map +1 -0
- package/dist/runtime/schedule/wait-projection.js +102 -0
- package/dist/runtime/schedule/wait-projection.js.map +1 -0
- package/dist/runtime/session-registry/registry-helpers.d.ts +34 -0
- package/dist/runtime/session-registry/registry-helpers.d.ts.map +1 -0
- package/dist/runtime/session-registry/registry-helpers.js +241 -0
- package/dist/runtime/session-registry/registry-helpers.js.map +1 -0
- package/dist/runtime/session-registry/registry.d.ts.map +1 -1
- package/dist/runtime/session-registry/registry.js +16 -243
- package/dist/runtime/session-registry/registry.js.map +1 -1
- package/dist/runtime/session-registry/types.d.ts +138 -130
- package/dist/runtime/session-registry/types.d.ts.map +1 -1
- package/dist/runtime/session-registry/types.js +2 -0
- package/dist/runtime/session-registry/types.js.map +1 -1
- package/dist/runtime/store/artifact-retention.d.ts +44 -0
- package/dist/runtime/store/artifact-retention.d.ts.map +1 -0
- package/dist/runtime/store/artifact-retention.js +263 -0
- package/dist/runtime/store/artifact-retention.js.map +1 -0
- package/dist/runtime/store/background-run-store.d.ts +1 -0
- package/dist/runtime/store/background-run-store.d.ts.map +1 -1
- package/dist/runtime/store/background-run-store.js +1 -0
- package/dist/runtime/store/background-run-store.js.map +1 -1
- package/dist/runtime/store/budget-store.d.ts +442 -0
- package/dist/runtime/store/budget-store.d.ts.map +1 -0
- package/dist/runtime/store/budget-store.js +318 -0
- package/dist/runtime/store/budget-store.js.map +1 -0
- package/dist/runtime/store/dream-checkpoints.d.ts +9 -0
- package/dist/runtime/store/dream-checkpoints.d.ts.map +1 -0
- package/dist/runtime/store/dream-checkpoints.js +16 -0
- package/dist/runtime/store/dream-checkpoints.js.map +1 -0
- package/dist/runtime/store/evaluator-results.d.ts +97 -0
- package/dist/runtime/store/evaluator-results.d.ts.map +1 -0
- package/dist/runtime/store/evaluator-results.js +355 -0
- package/dist/runtime/store/evaluator-results.js.map +1 -0
- package/dist/runtime/store/evidence-ledger.d.ts +5298 -0
- package/dist/runtime/store/evidence-ledger.d.ts.map +1 -0
- package/dist/runtime/store/evidence-ledger.js +1452 -0
- package/dist/runtime/store/evidence-ledger.js.map +1 -0
- package/dist/runtime/store/experiment-queue-store.d.ts +1164 -0
- package/dist/runtime/store/experiment-queue-store.d.ts.map +1 -0
- package/dist/runtime/store/experiment-queue-store.js +341 -0
- package/dist/runtime/store/experiment-queue-store.js.map +1 -0
- package/dist/runtime/store/health-store.d.ts.map +1 -1
- package/dist/runtime/store/health-store.js +6 -0
- package/dist/runtime/store/health-store.js.map +1 -1
- package/dist/runtime/store/index.d.ts +25 -2
- package/dist/runtime/store/index.d.ts.map +1 -1
- package/dist/runtime/store/index.js +13 -1
- package/dist/runtime/store/index.js.map +1 -1
- package/dist/runtime/store/metric-history.d.ts +10 -0
- package/dist/runtime/store/metric-history.d.ts.map +1 -0
- package/dist/runtime/store/metric-history.js +56 -0
- package/dist/runtime/store/metric-history.js.map +1 -0
- package/dist/runtime/store/operator-handoff-store.d.ts +179 -0
- package/dist/runtime/store/operator-handoff-store.d.ts.map +1 -0
- package/dist/runtime/store/operator-handoff-store.js +120 -0
- package/dist/runtime/store/operator-handoff-store.js.map +1 -0
- package/dist/runtime/store/postmortem-report.d.ts +485 -0
- package/dist/runtime/store/postmortem-report.d.ts.map +1 -0
- package/dist/runtime/store/postmortem-report.js +561 -0
- package/dist/runtime/store/postmortem-report.js.map +1 -0
- package/dist/runtime/store/reproducibility-manifest.d.ts +565 -0
- package/dist/runtime/store/reproducibility-manifest.d.ts.map +1 -0
- package/dist/runtime/store/reproducibility-manifest.js +392 -0
- package/dist/runtime/store/reproducibility-manifest.js.map +1 -0
- package/dist/runtime/store/research-evidence.d.ts +8 -0
- package/dist/runtime/store/research-evidence.d.ts.map +1 -0
- package/dist/runtime/store/research-evidence.js +15 -0
- package/dist/runtime/store/research-evidence.js.map +1 -0
- package/dist/runtime/store/runtime-operation-schemas.d.ts +80 -34
- package/dist/runtime/store/runtime-operation-schemas.d.ts.map +1 -1
- package/dist/runtime/store/runtime-operation-schemas.js +16 -1
- package/dist/runtime/store/runtime-operation-schemas.js.map +1 -1
- package/dist/runtime/store/runtime-paths.d.ts +25 -0
- package/dist/runtime/store/runtime-paths.d.ts.map +1 -1
- package/dist/runtime/store/runtime-paths.js +73 -0
- package/dist/runtime/store/runtime-paths.js.map +1 -1
- package/dist/runtime/store/runtime-schemas.d.ts +1934 -15
- package/dist/runtime/store/runtime-schemas.d.ts.map +1 -1
- package/dist/runtime/store/runtime-schemas.js +201 -0
- package/dist/runtime/store/runtime-schemas.js.map +1 -1
- package/dist/runtime/store/safe-pause-store.d.ts +28 -0
- package/dist/runtime/store/safe-pause-store.d.ts.map +1 -0
- package/dist/runtime/store/safe-pause-store.js +103 -0
- package/dist/runtime/store/safe-pause-store.js.map +1 -0
- package/dist/runtime/types/daemon.d.ts +234 -14
- package/dist/runtime/types/daemon.d.ts.map +1 -1
- package/dist/runtime/types/daemon.js +29 -2
- package/dist/runtime/types/daemon.js.map +1 -1
- package/dist/runtime/types/envelope.d.ts +10 -10
- package/dist/runtime/types/hook.d.ts +9 -9
- package/dist/runtime/types/notification.d.ts +6 -6
- package/dist/runtime/types/plugin.d.ts +2 -2
- package/dist/runtime/types/schedule.d.ts +162 -54
- package/dist/runtime/types/schedule.d.ts.map +1 -1
- package/dist/runtime/types/schedule.js +15 -1
- package/dist/runtime/types/schedule.js.map +1 -1
- package/dist/runtime/types/trigger.d.ts +2 -2
- package/dist/tools/automation/InteractiveAutomationTools.d.ts +10 -0
- package/dist/tools/automation/InteractiveAutomationTools.d.ts.map +1 -1
- package/dist/tools/automation/InteractiveAutomationTools.js +139 -8
- package/dist/tools/automation/InteractiveAutomationTools.js.map +1 -1
- package/dist/tools/builtin/exports.d.ts +2 -1
- package/dist/tools/builtin/exports.d.ts.map +1 -1
- package/dist/tools/builtin/exports.js +2 -1
- package/dist/tools/builtin/exports.js.map +1 -1
- package/dist/tools/builtin/factory.d.ts +7 -0
- package/dist/tools/builtin/factory.d.ts.map +1 -1
- package/dist/tools/builtin/factory.js +26 -3
- package/dist/tools/builtin/factory.js.map +1 -1
- package/dist/tools/fs/FileValidationTool/protected-path-policy.d.ts +1 -0
- package/dist/tools/fs/FileValidationTool/protected-path-policy.d.ts.map +1 -1
- package/dist/tools/fs/FileValidationTool/protected-path-policy.js +17 -4
- package/dist/tools/fs/FileValidationTool/protected-path-policy.js.map +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.js +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.js.map +1 -1
- package/dist/tools/kaggle/KaggleExperimentTools.d.ts +792 -8
- package/dist/tools/kaggle/KaggleExperimentTools.d.ts.map +1 -1
- package/dist/tools/kaggle/KaggleExperimentTools.js +284 -19
- package/dist/tools/kaggle/KaggleExperimentTools.js.map +1 -1
- package/dist/tools/kaggle/KaggleSubmissionTools.d.ts +18 -12
- package/dist/tools/kaggle/KaggleSubmissionTools.d.ts.map +1 -1
- package/dist/tools/kaggle/KaggleSubmissionTools.js +23 -4
- package/dist/tools/kaggle/KaggleSubmissionTools.js.map +1 -1
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.d.ts +28 -9
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.d.ts.map +1 -1
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js +182 -4
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js.map +1 -1
- package/dist/tools/kaggle/index.d.ts +1 -1
- package/dist/tools/kaggle/index.d.ts.map +1 -1
- package/dist/tools/kaggle/index.js +1 -1
- package/dist/tools/kaggle/index.js.map +1 -1
- package/dist/tools/kaggle/metrics.d.ts +845 -4
- package/dist/tools/kaggle/metrics.d.ts.map +1 -1
- package/dist/tools/kaggle/metrics.js +410 -1
- package/dist/tools/kaggle/metrics.js.map +1 -1
- package/dist/tools/kaggle/paths.d.ts.map +1 -1
- package/dist/tools/kaggle/paths.js +6 -0
- package/dist/tools/kaggle/paths.js.map +1 -1
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.d.ts +6 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.d.ts.map +1 -1
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.js +9 -2
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.js.map +1 -1
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts +4 -4
- package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts +4 -4
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.d.ts.map +1 -1
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.js +23 -2
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.js.map +1 -1
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.d.ts.map +1 -1
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.js +24 -2
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.js.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +2 -2
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts.map +1 -1
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js +43 -9
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js.map +1 -1
- package/dist/tools/query/code-search-root.d.ts +8 -0
- package/dist/tools/query/code-search-root.d.ts.map +1 -0
- package/dist/tools/query/code-search-root.js +41 -0
- package/dist/tools/query/code-search-root.js.map +1 -0
- package/dist/tools/query/runtime-dream-review-tool.d.ts +34 -0
- package/dist/tools/query/runtime-dream-review-tool.d.ts.map +1 -0
- package/dist/tools/query/runtime-dream-review-tool.js +62 -0
- package/dist/tools/query/runtime-dream-review-tool.js.map +1 -0
- package/dist/tools/query/runtime-session-tools.d.ts +560 -0
- package/dist/tools/query/runtime-session-tools.d.ts.map +1 -0
- package/dist/tools/query/runtime-session-tools.js +1017 -0
- package/dist/tools/query/runtime-session-tools.js.map +1 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts +821 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts.map +1 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.js +905 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.js.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +62 -32
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts.map +1 -1
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +78 -44
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts.map +1 -1
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts +1 -0
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts.map +1 -1
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js +11 -0
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.js +2 -1
- package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts +4 -4
- package/dist/tools/types.d.ts +2 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/package.json +2 -1
- package/dist/base/types/cron.d.ts +0 -2
- package/dist/base/types/cron.d.ts.map +0 -1
- package/dist/base/types/cron.js +0 -3
- package/dist/base/types/cron.js.map +0 -1
- package/dist/runtime/cron-scheduler.d.ts +0 -13
- package/dist/runtime/cron-scheduler.d.ts.map +0 -1
- package/dist/runtime/cron-scheduler.js +0 -90
- package/dist/runtime/cron-scheduler.js.map +0 -1
- package/dist/runtime/types/cron.d.ts +0 -59
- package/dist/runtime/types/cron.d.ts.map +0 -1
- package/dist/runtime/types/cron.js +0 -13
- package/dist/runtime/types/cron.js.map +0 -1
|
@@ -0,0 +1,906 @@
|
|
|
1
|
+
import { ChatHistory } from "./chat-history.js";
|
|
2
|
+
import { ChatSessionCatalog } from "./chat-session-store.js";
|
|
3
|
+
import { resolveGitRoot } from "../../platform/observation/context-provider.js";
|
|
4
|
+
import { TendCommand } from "./tend-command.js";
|
|
5
|
+
import { EventSubscriber } from "./event-subscriber.js";
|
|
6
|
+
import { createRuntimeSessionRegistry } from "../../runtime/session-registry/index.js";
|
|
7
|
+
import { activeGoals, buildGoalUsageSummary, buildScheduleUsageSummary, deterministicChatSummary, findTask, formatConfig, formatGoalLine, formatHistory, formatTask, formatTaskLine, formatUsageCounter, hasUsage, loadGoals, normalizeUsageCounter, parseTaskArgs, readProviderConfigSummary, readTasksForGoalFromState, resolveGoalForTasks, usageFromLLMResponse, zeroUsageCounter, } from "./chat-runner-command-helpers.js";
|
|
8
|
+
import { checkGitChanges } from "./chat-runner-support.js";
|
|
9
|
+
import { formatFailureRecovery } from "./failure-recovery.js";
|
|
10
|
+
import { summarizeExecutionPolicy, withExecutionPolicyOverrides, } from "../../orchestrator/execution/agent-loop/execution-policy.js";
|
|
11
|
+
import { formatRoute, formatRuntimeSessionsList, formatRuntimeStatus } from "./chat-runner-runtime.js";
|
|
12
|
+
import { BrowserSessionStore } from "../../runtime/interactive-automation/index.js";
|
|
13
|
+
import { GuardrailStore } from "../../runtime/guardrails/index.js";
|
|
14
|
+
import { RuntimeOperatorHandoffStore } from "../../runtime/store/operator-handoff-store.js";
|
|
15
|
+
import * as path from "node:path";
|
|
16
|
+
export const COMMAND_HELP = `Available commands:
|
|
17
|
+
Session
|
|
18
|
+
/help Show this help message
|
|
19
|
+
/clear Clear conversation history
|
|
20
|
+
/sessions List prior chat sessions
|
|
21
|
+
/history [id|title] Show saved chat history
|
|
22
|
+
/title <title> Rename the current session
|
|
23
|
+
/resume [id|title] Resume native agentloop state for the current or selected session
|
|
24
|
+
/cleanup [--dry-run] Clean up stale chat sessions
|
|
25
|
+
/compact Summarize older chat turns and keep the latest turns
|
|
26
|
+
/context Show active working context and session assumptions
|
|
27
|
+
/exit Exit chat mode
|
|
28
|
+
|
|
29
|
+
Goals and tasks
|
|
30
|
+
/status [goal-id] Show active goal status, or one goal when an id is provided
|
|
31
|
+
/goals List goals
|
|
32
|
+
/tasks [goal-id] List tasks for a goal; uses the only active goal when unambiguous
|
|
33
|
+
/task <task-id> [goal-id]
|
|
34
|
+
Show one task; searches goals when no goal id is provided
|
|
35
|
+
/track Promote session to Tier 2 goal pursuit (not yet implemented)
|
|
36
|
+
/tend Generate a goal from chat history and start autonomous daemon execution
|
|
37
|
+
|
|
38
|
+
Configuration
|
|
39
|
+
/config Show provider configuration with secrets masked
|
|
40
|
+
/model Show the active provider/model/adapter
|
|
41
|
+
/permissions [args] Show or update session execution policy
|
|
42
|
+
/plugins List installed plugins when plugin metadata is available
|
|
43
|
+
/usage [scope] Show usage summary (session, goal <id>, daemon <goal-id>, schedule [7d|24h|2w])
|
|
44
|
+
|
|
45
|
+
Review and branching
|
|
46
|
+
/review Show current diff summary and verification context
|
|
47
|
+
/fork [title] Fork the current chat session into a new session
|
|
48
|
+
/undo Remove the latest chat turn from session history
|
|
49
|
+
|
|
50
|
+
Deferred
|
|
51
|
+
/retry is intentionally not supported yet.`;
|
|
52
|
+
export class ChatRunnerCommandHandler {
|
|
53
|
+
host;
|
|
54
|
+
constructor(host) {
|
|
55
|
+
this.host = host;
|
|
56
|
+
}
|
|
57
|
+
parseResumeCommand(input) {
|
|
58
|
+
const trimmed = input.trim();
|
|
59
|
+
const match = /^\/resume(?:\s+(.+))?$/i.exec(trimmed);
|
|
60
|
+
if (!match)
|
|
61
|
+
return null;
|
|
62
|
+
const selector = match[1]?.trim();
|
|
63
|
+
return selector ? { selector } : {};
|
|
64
|
+
}
|
|
65
|
+
async handleCommand(input, cwd) {
|
|
66
|
+
const trimmed = input.trim();
|
|
67
|
+
if (!trimmed.startsWith("/"))
|
|
68
|
+
return null;
|
|
69
|
+
const cmd = trimmed.toLowerCase().split(/\s+/)[0];
|
|
70
|
+
const start = Date.now();
|
|
71
|
+
if (cmd === "/help") {
|
|
72
|
+
return { success: true, output: COMMAND_HELP, elapsed_ms: Date.now() - start };
|
|
73
|
+
}
|
|
74
|
+
if (cmd === "/clear") {
|
|
75
|
+
await this.host.getHistory()?.clear();
|
|
76
|
+
return { success: true, output: "Conversation history cleared.", elapsed_ms: Date.now() - start };
|
|
77
|
+
}
|
|
78
|
+
if (cmd === "/sessions") {
|
|
79
|
+
const registry = createRuntimeSessionRegistry({ stateManager: this.host.deps.stateManager });
|
|
80
|
+
const snapshot = await registry.snapshot();
|
|
81
|
+
return { success: true, output: formatRuntimeSessionsList(snapshot), elapsed_ms: Date.now() - start };
|
|
82
|
+
}
|
|
83
|
+
if (cmd === "/history") {
|
|
84
|
+
const catalog = new ChatSessionCatalog(this.host.deps.stateManager);
|
|
85
|
+
const selector = trimmed.slice("/history".length).trim();
|
|
86
|
+
const history = this.host.getHistory();
|
|
87
|
+
const session = selector
|
|
88
|
+
? await catalog.loadSessionBySelector(selector)
|
|
89
|
+
: history
|
|
90
|
+
? await catalog.loadSession(history.getSessionId())
|
|
91
|
+
: null;
|
|
92
|
+
if (!session) {
|
|
93
|
+
return { success: false, output: "No chat session history found.", elapsed_ms: Date.now() - start };
|
|
94
|
+
}
|
|
95
|
+
return { success: true, output: this.formatHistory(session), elapsed_ms: Date.now() - start };
|
|
96
|
+
}
|
|
97
|
+
if (cmd === "/title") {
|
|
98
|
+
const title = trimmed.slice("/title".length).trim();
|
|
99
|
+
if (!title) {
|
|
100
|
+
return { success: false, output: "Usage: /title <title>", elapsed_ms: Date.now() - start };
|
|
101
|
+
}
|
|
102
|
+
const history = this.host.getHistory();
|
|
103
|
+
if (!history) {
|
|
104
|
+
return { success: false, output: "No active chat session to rename.", elapsed_ms: Date.now() - start };
|
|
105
|
+
}
|
|
106
|
+
const catalog = new ChatSessionCatalog(this.host.deps.stateManager);
|
|
107
|
+
history.setTitle(title);
|
|
108
|
+
await history.persist();
|
|
109
|
+
await catalog.renameSession(history.getSessionId(), title);
|
|
110
|
+
return { success: true, output: `Renamed chat session to "${title}".`, elapsed_ms: Date.now() - start };
|
|
111
|
+
}
|
|
112
|
+
if (cmd === "/cleanup") {
|
|
113
|
+
const catalog = new ChatSessionCatalog(this.host.deps.stateManager);
|
|
114
|
+
const dryRun = trimmed.includes("--dry-run");
|
|
115
|
+
const report = await catalog.cleanupSessions({
|
|
116
|
+
dryRun,
|
|
117
|
+
activeSessionId: this.host.getHistory()?.getSessionId(),
|
|
118
|
+
});
|
|
119
|
+
const verb = dryRun ? "would remove" : "removed";
|
|
120
|
+
return {
|
|
121
|
+
success: true,
|
|
122
|
+
output: `Chat session cleanup ${verb} ${report.removedSessionIds.length} session(s).`,
|
|
123
|
+
elapsed_ms: Date.now() - start,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (cmd === "/compact") {
|
|
127
|
+
return this.handleCompact(start);
|
|
128
|
+
}
|
|
129
|
+
if (cmd === "/status") {
|
|
130
|
+
return this.handleStatus(trimmed.slice("/status".length).trim(), start);
|
|
131
|
+
}
|
|
132
|
+
if (cmd === "/goals") {
|
|
133
|
+
return this.handleGoals(start);
|
|
134
|
+
}
|
|
135
|
+
if (cmd === "/tasks") {
|
|
136
|
+
return this.handleTasks(trimmed.slice("/tasks".length).trim(), start);
|
|
137
|
+
}
|
|
138
|
+
if (cmd === "/task") {
|
|
139
|
+
return this.handleTask(trimmed.slice("/task".length).trim(), start);
|
|
140
|
+
}
|
|
141
|
+
if (cmd === "/config") {
|
|
142
|
+
return this.handleConfig(start);
|
|
143
|
+
}
|
|
144
|
+
if (cmd === "/model") {
|
|
145
|
+
return this.handleModel(start);
|
|
146
|
+
}
|
|
147
|
+
if (cmd === "/permissions") {
|
|
148
|
+
return this.handlePermissions(trimmed.slice("/permissions".length).trim(), start);
|
|
149
|
+
}
|
|
150
|
+
if (cmd === "/plugins") {
|
|
151
|
+
return this.handlePlugins(start);
|
|
152
|
+
}
|
|
153
|
+
if (cmd === "/usage") {
|
|
154
|
+
return this.handleUsage(trimmed.slice("/usage".length).trim(), start);
|
|
155
|
+
}
|
|
156
|
+
if (cmd === "/context" || cmd === "/working-memory") {
|
|
157
|
+
return this.handleContext(start, cwd);
|
|
158
|
+
}
|
|
159
|
+
if (cmd === "/review") {
|
|
160
|
+
return this.handleReview(start);
|
|
161
|
+
}
|
|
162
|
+
if (cmd === "/fork") {
|
|
163
|
+
return this.handleFork(trimmed.slice("/fork".length).trim(), start);
|
|
164
|
+
}
|
|
165
|
+
if (cmd === "/undo") {
|
|
166
|
+
return this.handleUndo(start);
|
|
167
|
+
}
|
|
168
|
+
if (cmd === "/retry") {
|
|
169
|
+
return {
|
|
170
|
+
success: false,
|
|
171
|
+
output: [
|
|
172
|
+
"/retry is not supported yet.",
|
|
173
|
+
"",
|
|
174
|
+
formatFailureRecovery({
|
|
175
|
+
kind: "runtime_interruption",
|
|
176
|
+
label: "Retry unavailable",
|
|
177
|
+
summary: "PulSeed does not yet have a safe replay contract for the previous turn.",
|
|
178
|
+
nextActions: [
|
|
179
|
+
"Use /review to inspect any current diff before continuing.",
|
|
180
|
+
"Use /resume when PulSeed reports resumable agent-loop state.",
|
|
181
|
+
"Ask for the exact next step to rerun instead of replaying the full turn.",
|
|
182
|
+
],
|
|
183
|
+
}),
|
|
184
|
+
].join("\n"),
|
|
185
|
+
elapsed_ms: Date.now() - start,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
if (cmd === "/exit") {
|
|
189
|
+
return { success: true, output: "Exiting chat mode.", elapsed_ms: Date.now() - start };
|
|
190
|
+
}
|
|
191
|
+
if (cmd === "/track") {
|
|
192
|
+
return this.handleTrack(start);
|
|
193
|
+
}
|
|
194
|
+
if (cmd === "/tend") {
|
|
195
|
+
const args = trimmed.slice("/tend".length).trim();
|
|
196
|
+
return this.handleTend(args, start);
|
|
197
|
+
}
|
|
198
|
+
if (this.host.getPendingTend() !== null) {
|
|
199
|
+
return this.handleTendConfirmation(trimmed, start);
|
|
200
|
+
}
|
|
201
|
+
return {
|
|
202
|
+
success: false,
|
|
203
|
+
output: `Unknown command: ${input.trim()}. Type /help for available commands.`,
|
|
204
|
+
elapsed_ms: Date.now() - start,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
async handleTendConfirmation(input, start) {
|
|
208
|
+
const pending = this.host.getPendingTend();
|
|
209
|
+
this.host.setPendingTend(null);
|
|
210
|
+
const normalized = input.trim().toLowerCase();
|
|
211
|
+
const confirmed = normalized === "" || normalized === "y" || normalized === "yes";
|
|
212
|
+
if (!confirmed) {
|
|
213
|
+
return {
|
|
214
|
+
success: true,
|
|
215
|
+
output: "Tend cancelled. Continue chatting to refine your goal, then try /tend again.",
|
|
216
|
+
elapsed_ms: Date.now() - start,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
if (!this.host.deps.daemonClient) {
|
|
220
|
+
return {
|
|
221
|
+
success: false,
|
|
222
|
+
output: "Daemon client not available.",
|
|
223
|
+
elapsed_ms: Date.now() - start,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const { goalId, maxIterations } = pending;
|
|
227
|
+
let subscriber = null;
|
|
228
|
+
if (this.host.deps.daemonBaseUrl && !this.host.getActiveSubscribers().has(goalId)) {
|
|
229
|
+
subscriber = new EventSubscriber(this.host.deps.daemonBaseUrl, goalId, "normal");
|
|
230
|
+
this.host.getActiveSubscribers().set(goalId, subscriber);
|
|
231
|
+
subscriber.on("notification", (notification) => {
|
|
232
|
+
const n = notification;
|
|
233
|
+
this.host.deps.onNotification?.(n.message);
|
|
234
|
+
this.host.onNotification?.(n.message);
|
|
235
|
+
});
|
|
236
|
+
subscriber.on("chat_event", (event) => {
|
|
237
|
+
this.host.emitEvent(event);
|
|
238
|
+
});
|
|
239
|
+
try {
|
|
240
|
+
await subscriber.subscribeReady();
|
|
241
|
+
}
|
|
242
|
+
catch (err) {
|
|
243
|
+
subscriber.unsubscribe();
|
|
244
|
+
this.host.getActiveSubscribers().delete(goalId);
|
|
245
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
246
|
+
return {
|
|
247
|
+
success: false,
|
|
248
|
+
output: `Daemon event stream unavailable: ${msg}. Goal was not started.`,
|
|
249
|
+
elapsed_ms: Date.now() - start,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const tendDeps = this.buildTendDeps(this.host.deps.llmClient, this.host.deps.goalNegotiator, this.host.deps.daemonClient);
|
|
255
|
+
const result = await new TendCommand().startAcceptedGoal(goalId, maxIterations, tendDeps);
|
|
256
|
+
if (!result.success) {
|
|
257
|
+
if (subscriber) {
|
|
258
|
+
subscriber.unsubscribe();
|
|
259
|
+
this.host.getActiveSubscribers().delete(goalId);
|
|
260
|
+
}
|
|
261
|
+
return {
|
|
262
|
+
success: false,
|
|
263
|
+
output: result.message,
|
|
264
|
+
elapsed_ms: Date.now() - start,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
const shortId = goalId.length > 12 ? goalId.slice(0, 12) : goalId;
|
|
268
|
+
return {
|
|
269
|
+
success: true,
|
|
270
|
+
output: `[tend] ${shortId}: Started — daemon is now tending your goal${maxIterations !== undefined ? ` (max ${maxIterations} iterations)` : ""}.\nBackground run: ${result.backgroundRunId}\nRun 'pulseed status' to check progress.`,
|
|
271
|
+
elapsed_ms: Date.now() - start,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
catch (err) {
|
|
275
|
+
if (subscriber) {
|
|
276
|
+
subscriber.unsubscribe();
|
|
277
|
+
this.host.getActiveSubscribers().delete(goalId);
|
|
278
|
+
}
|
|
279
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
280
|
+
return {
|
|
281
|
+
success: false,
|
|
282
|
+
output: `Daemon unavailable: ${msg}. Start the daemon with 'pulseed daemon start' first.`,
|
|
283
|
+
elapsed_ms: Date.now() - start,
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
formatHistory(session) {
|
|
288
|
+
return formatHistory(session);
|
|
289
|
+
}
|
|
290
|
+
async loadGoals() {
|
|
291
|
+
return loadGoals(this.host.deps.stateManager);
|
|
292
|
+
}
|
|
293
|
+
activeGoals(goals) {
|
|
294
|
+
return activeGoals(goals);
|
|
295
|
+
}
|
|
296
|
+
formatGoalLine(goal) {
|
|
297
|
+
return formatGoalLine(goal);
|
|
298
|
+
}
|
|
299
|
+
async handleStatus(args, start) {
|
|
300
|
+
if (args) {
|
|
301
|
+
const goal = await this.host.deps.stateManager.loadGoal(args);
|
|
302
|
+
if (!goal) {
|
|
303
|
+
return { success: false, output: `Goal not found: ${args}`, elapsed_ms: Date.now() - start };
|
|
304
|
+
}
|
|
305
|
+
const lines = [
|
|
306
|
+
`Goal status: ${goal.title}`,
|
|
307
|
+
`ID: ${goal.id}`,
|
|
308
|
+
`Status: ${goal.status}`,
|
|
309
|
+
`Loop: ${goal.loop_status}`,
|
|
310
|
+
`Updated: ${goal.updated_at}`,
|
|
311
|
+
`Children: ${goal.children_ids.length}`,
|
|
312
|
+
`Dimensions:`,
|
|
313
|
+
...goal.dimensions.map((dimension) => `- ${dimension.name}: current=${String(dimension.current_value)}, threshold=${JSON.stringify(dimension.threshold)}, confidence=${dimension.confidence}`),
|
|
314
|
+
];
|
|
315
|
+
return { success: true, output: lines.join("\n"), elapsed_ms: Date.now() - start };
|
|
316
|
+
}
|
|
317
|
+
const registry = createRuntimeSessionRegistry({ stateManager: this.host.deps.stateManager });
|
|
318
|
+
const [goals, runtimeSnapshot] = await Promise.all([
|
|
319
|
+
this.loadGoals(),
|
|
320
|
+
registry.snapshot(),
|
|
321
|
+
]);
|
|
322
|
+
const active = this.activeGoals(goals);
|
|
323
|
+
const runtimeStatus = formatRuntimeStatus(runtimeSnapshot);
|
|
324
|
+
const daemonSnapshot = await this.loadDaemonSnapshot();
|
|
325
|
+
const guardrailStatus = await this.formatGuardrailStatus(daemonSnapshot);
|
|
326
|
+
const statusSuffix = guardrailStatus ? `\n\n${guardrailStatus}` : "";
|
|
327
|
+
if (active.length === 0) {
|
|
328
|
+
return { success: true, output: `No active goals found.\n\n${runtimeStatus}${statusSuffix}`, elapsed_ms: Date.now() - start };
|
|
329
|
+
}
|
|
330
|
+
return {
|
|
331
|
+
success: true,
|
|
332
|
+
output: `Active goals:\n${active.map((goal) => this.formatGoalLine(goal)).join("\n")}\n\n${runtimeStatus}${statusSuffix}`,
|
|
333
|
+
elapsed_ms: Date.now() - start,
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
async loadDaemonSnapshot() {
|
|
337
|
+
if (!this.host.deps.daemonClient)
|
|
338
|
+
return null;
|
|
339
|
+
try {
|
|
340
|
+
return await this.host.deps.daemonClient.getSnapshot();
|
|
341
|
+
}
|
|
342
|
+
catch {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
async formatGuardrailStatus(snapshot) {
|
|
347
|
+
const remoteAuthSessions = Array.isArray(snapshot?.auth_sessions) ? snapshot.auth_sessions : null;
|
|
348
|
+
const remoteGuardrails = snapshot?.guardrails && typeof snapshot.guardrails === "object"
|
|
349
|
+
? snapshot.guardrails
|
|
350
|
+
: null;
|
|
351
|
+
const remoteOperatorHandoffs = Array.isArray(snapshot?.operator_handoffs)
|
|
352
|
+
? snapshot.operator_handoffs
|
|
353
|
+
: null;
|
|
354
|
+
const pendingAuth = remoteAuthSessions ?? await this.loadPendingAuthSessionsFromRuntime();
|
|
355
|
+
const operatorHandoffs = remoteOperatorHandoffs ?? await this.loadOpenOperatorHandoffsFromRuntime();
|
|
356
|
+
const { openBreakers, backpressureActiveCount } = remoteGuardrails
|
|
357
|
+
? this.extractGuardrailSummaryFromSnapshot(remoteGuardrails)
|
|
358
|
+
: await this.loadGuardrailsFromRuntime();
|
|
359
|
+
const lines = [];
|
|
360
|
+
if (operatorHandoffs.length > 0) {
|
|
361
|
+
lines.push("Operator handoffs pending:");
|
|
362
|
+
for (const handoff of operatorHandoffs.slice(0, 5)) {
|
|
363
|
+
const record = handoff;
|
|
364
|
+
const triggers = Array.isArray(record["triggers"]) ? record["triggers"].join(",") : "unknown";
|
|
365
|
+
lines.push(`- ${String(record["title"] ?? record["handoff_id"] ?? "handoff")} [${triggers}] ${String(record["recommended_action"] ?? "")}`);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (pendingAuth.length > 0) {
|
|
369
|
+
if (lines.length > 0)
|
|
370
|
+
lines.push("");
|
|
371
|
+
lines.push("Auth handoffs pending:");
|
|
372
|
+
for (const session of pendingAuth.slice(0, 5)) {
|
|
373
|
+
const record = session;
|
|
374
|
+
lines.push(`- ${String(record["service_key"] ?? "unknown")} via ${String(record["provider_id"] ?? "unknown")} [${String(record["state"] ?? "unknown")}] session ${String(record["session_id"] ?? "unknown")}`);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
if (openBreakers.length > 0) {
|
|
378
|
+
if (lines.length > 0)
|
|
379
|
+
lines.push("");
|
|
380
|
+
lines.push("Guardrails:");
|
|
381
|
+
for (const breaker of openBreakers.slice(0, 5)) {
|
|
382
|
+
const record = breaker;
|
|
383
|
+
lines.push(`- breaker ${String(record["provider_id"] ?? "unknown")}/${String(record["service_key"] ?? "unknown")}: ${String(record["state"] ?? "unknown")} (failures ${String(record["failure_count"] ?? "0")})`);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
if (backpressureActiveCount > 0) {
|
|
387
|
+
if (lines.length > 0)
|
|
388
|
+
lines.push("");
|
|
389
|
+
lines.push(`Backpressure active: ${backpressureActiveCount} browser workflow(s) in flight`);
|
|
390
|
+
}
|
|
391
|
+
return lines.length > 0 ? lines.join("\n") : null;
|
|
392
|
+
}
|
|
393
|
+
async loadPendingAuthSessionsFromRuntime() {
|
|
394
|
+
const runtimeRoot = path.join(this.host.deps.stateManager.getBaseDir(), "runtime");
|
|
395
|
+
return new BrowserSessionStore(runtimeRoot).listPendingAuth();
|
|
396
|
+
}
|
|
397
|
+
async loadOpenOperatorHandoffsFromRuntime() {
|
|
398
|
+
const runtimeRoot = path.join(this.host.deps.stateManager.getBaseDir(), "runtime");
|
|
399
|
+
return new RuntimeOperatorHandoffStore(runtimeRoot).listOpen();
|
|
400
|
+
}
|
|
401
|
+
async loadGuardrailsFromRuntime() {
|
|
402
|
+
const runtimeRoot = path.join(this.host.deps.stateManager.getBaseDir(), "runtime");
|
|
403
|
+
const [breakers, backpressure] = await Promise.all([
|
|
404
|
+
new GuardrailStore(runtimeRoot).listBreakers(),
|
|
405
|
+
new GuardrailStore(runtimeRoot).loadBackpressureSnapshot(),
|
|
406
|
+
]);
|
|
407
|
+
return {
|
|
408
|
+
openBreakers: breakers.filter((breaker) => breaker.state === "open" || breaker.state === "paused" || breaker.state === "half_open"),
|
|
409
|
+
backpressureActiveCount: backpressure?.active.length ?? 0,
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
extractGuardrailSummaryFromSnapshot(guardrails) {
|
|
413
|
+
const openBreakers = Array.isArray(guardrails["open_breakers"])
|
|
414
|
+
? guardrails["open_breakers"].filter((entry) => Boolean(entry) && typeof entry === "object")
|
|
415
|
+
: [];
|
|
416
|
+
const backpressureActiveCount = Array.isArray(guardrails["backpressure_active"])
|
|
417
|
+
? guardrails["backpressure_active"].length
|
|
418
|
+
: 0;
|
|
419
|
+
return { openBreakers, backpressureActiveCount };
|
|
420
|
+
}
|
|
421
|
+
async handleGoals(start) {
|
|
422
|
+
const goals = await this.loadGoals();
|
|
423
|
+
if (goals.length === 0) {
|
|
424
|
+
return { success: true, output: "No goals found.", elapsed_ms: Date.now() - start };
|
|
425
|
+
}
|
|
426
|
+
return {
|
|
427
|
+
success: true,
|
|
428
|
+
output: `Goals:\n${goals.map((goal) => this.formatGoalLine(goal)).join("\n")}`,
|
|
429
|
+
elapsed_ms: Date.now() - start,
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
async readTasksForGoal(goalId) {
|
|
433
|
+
return readTasksForGoalFromState(this.host.deps.stateManager, goalId);
|
|
434
|
+
}
|
|
435
|
+
async resolveGoalForTasks(selector) {
|
|
436
|
+
return resolveGoalForTasks(this.host.deps.stateManager, selector);
|
|
437
|
+
}
|
|
438
|
+
formatTaskLine(task) {
|
|
439
|
+
return formatTaskLine(task);
|
|
440
|
+
}
|
|
441
|
+
async handleTasks(args, start) {
|
|
442
|
+
const resolved = await this.resolveGoalForTasks(args);
|
|
443
|
+
if (resolved.error || !resolved.goalId) {
|
|
444
|
+
return { success: false, output: resolved.error ?? "Usage: /tasks <goal-id>", elapsed_ms: Date.now() - start };
|
|
445
|
+
}
|
|
446
|
+
const tasks = await this.readTasksForGoal(resolved.goalId);
|
|
447
|
+
if (tasks.length === 0) {
|
|
448
|
+
return { success: true, output: `No tasks found for goal "${resolved.goalId}".`, elapsed_ms: Date.now() - start };
|
|
449
|
+
}
|
|
450
|
+
return {
|
|
451
|
+
success: true,
|
|
452
|
+
output: `Tasks for goal ${resolved.goalId}:\n${tasks.map((task) => this.formatTaskLine(task)).join("\n")}`,
|
|
453
|
+
elapsed_ms: Date.now() - start,
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
parseTaskArgs(args) {
|
|
457
|
+
return parseTaskArgs(args);
|
|
458
|
+
}
|
|
459
|
+
async findTask(taskId, goalId) {
|
|
460
|
+
return findTask(this.host.deps.stateManager, taskId, goalId);
|
|
461
|
+
}
|
|
462
|
+
formatTask(task) {
|
|
463
|
+
return formatTask(task);
|
|
464
|
+
}
|
|
465
|
+
async handleTask(args, start) {
|
|
466
|
+
const { taskId, goalId } = this.parseTaskArgs(args);
|
|
467
|
+
if (!taskId) {
|
|
468
|
+
return { success: false, output: "Usage: /task <task-id> [goal-id]", elapsed_ms: Date.now() - start };
|
|
469
|
+
}
|
|
470
|
+
const found = await this.findTask(taskId, goalId);
|
|
471
|
+
if (found.matches.length > 1) {
|
|
472
|
+
return {
|
|
473
|
+
success: false,
|
|
474
|
+
output: `Task selector "${taskId}" matched multiple goals. Use /task ${taskId} <goal-id>.\n${found.matches.map((match) => `- ${match.goalId}`).join("\n")}`,
|
|
475
|
+
elapsed_ms: Date.now() - start,
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
if (!found.task) {
|
|
479
|
+
const suffix = goalId ? ` for goal "${goalId}"` : "";
|
|
480
|
+
return { success: false, output: `Task not found: ${taskId}${suffix}`, elapsed_ms: Date.now() - start };
|
|
481
|
+
}
|
|
482
|
+
return { success: true, output: this.formatTask(found.task), elapsed_ms: Date.now() - start };
|
|
483
|
+
}
|
|
484
|
+
async readProviderConfigSummary() {
|
|
485
|
+
return readProviderConfigSummary(this.host.deps.stateManager);
|
|
486
|
+
}
|
|
487
|
+
formatConfig(config) {
|
|
488
|
+
return formatConfig(config);
|
|
489
|
+
}
|
|
490
|
+
async handleConfig(start) {
|
|
491
|
+
const config = await this.readProviderConfigSummary();
|
|
492
|
+
return { success: true, output: `Provider configuration:\n${this.formatConfig(config)}`, elapsed_ms: Date.now() - start };
|
|
493
|
+
}
|
|
494
|
+
async handleModel(start) {
|
|
495
|
+
const config = await this.readProviderConfigSummary();
|
|
496
|
+
return {
|
|
497
|
+
success: true,
|
|
498
|
+
output: `Model: ${config.model}\nProvider: ${config.provider}\nAdapter: ${config.adapter}`,
|
|
499
|
+
elapsed_ms: Date.now() - start,
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
async handlePlugins(start) {
|
|
503
|
+
if (!this.host.deps.pluginLoader) {
|
|
504
|
+
return { success: true, output: "Plugin information is not available in this chat session.", elapsed_ms: Date.now() - start };
|
|
505
|
+
}
|
|
506
|
+
try {
|
|
507
|
+
const plugins = await this.host.deps.pluginLoader.loadAll();
|
|
508
|
+
if (plugins.length === 0) {
|
|
509
|
+
return { success: true, output: "No plugins found.", elapsed_ms: Date.now() - start };
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
success: true,
|
|
513
|
+
output: `Plugins:\n${plugins.map((plugin) => `${plugin.name} - ${plugin.type ?? "unknown"} - ${plugin.enabled === false ? "disabled" : "enabled"}`).join("\n")}`,
|
|
514
|
+
elapsed_ms: Date.now() - start,
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
catch (err) {
|
|
518
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
519
|
+
return { success: true, output: `Plugin information is unavailable: ${message}`, elapsed_ms: Date.now() - start };
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
zeroUsageCounter() {
|
|
523
|
+
return zeroUsageCounter();
|
|
524
|
+
}
|
|
525
|
+
normalizeUsageCounter(usage) {
|
|
526
|
+
return normalizeUsageCounter(usage);
|
|
527
|
+
}
|
|
528
|
+
usageFromLLMResponse(response) {
|
|
529
|
+
return usageFromLLMResponse(response);
|
|
530
|
+
}
|
|
531
|
+
hasUsage(usage) {
|
|
532
|
+
return hasUsage(usage);
|
|
533
|
+
}
|
|
534
|
+
formatUsageCounter(prefix, usage) {
|
|
535
|
+
return formatUsageCounter(prefix, usage);
|
|
536
|
+
}
|
|
537
|
+
async handleUsage(args, start) {
|
|
538
|
+
const tokens = args.trim().split(/\s+/).filter(Boolean);
|
|
539
|
+
const scope = tokens[0]?.toLowerCase();
|
|
540
|
+
if (!scope || scope === "session") {
|
|
541
|
+
const history = this.host.getHistory();
|
|
542
|
+
if (!history) {
|
|
543
|
+
return { success: false, output: "No active chat session. Start a session and run work before /usage.", elapsed_ms: Date.now() - start };
|
|
544
|
+
}
|
|
545
|
+
const session = history.getSessionData();
|
|
546
|
+
const totals = this.normalizeUsageCounter(session.usage?.totals ?? this.zeroUsageCounter());
|
|
547
|
+
const lines = [
|
|
548
|
+
`Usage summary (session ${session.id})`,
|
|
549
|
+
...this.formatUsageCounter("Session", totals),
|
|
550
|
+
];
|
|
551
|
+
const phaseEntries = Object.entries(session.usage?.byPhase ?? {})
|
|
552
|
+
.map(([phase, usage]) => ({ phase, usage: this.normalizeUsageCounter(usage) }))
|
|
553
|
+
.filter((entry) => this.hasUsage(entry.usage))
|
|
554
|
+
.sort((left, right) => right.usage.totalTokens - left.usage.totalTokens);
|
|
555
|
+
if (phaseEntries.length > 0) {
|
|
556
|
+
lines.push("");
|
|
557
|
+
lines.push("By phase:");
|
|
558
|
+
for (const entry of phaseEntries) {
|
|
559
|
+
lines.push(`- ${entry.phase}: ${entry.usage.totalTokens} (in=${entry.usage.inputTokens}, out=${entry.usage.outputTokens})`);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return { success: true, output: lines.join("\n"), elapsed_ms: Date.now() - start };
|
|
563
|
+
}
|
|
564
|
+
if (scope === "goal" || scope === "daemon") {
|
|
565
|
+
const goalId = tokens[1] ?? this.host.deps.goalId;
|
|
566
|
+
if (!goalId) {
|
|
567
|
+
return { success: false, output: "Usage: /usage goal <goal-id>", elapsed_ms: Date.now() - start };
|
|
568
|
+
}
|
|
569
|
+
const lines = await buildGoalUsageSummary(this.host.deps.stateManager, goalId);
|
|
570
|
+
return { success: true, output: lines.join("\n"), elapsed_ms: Date.now() - start };
|
|
571
|
+
}
|
|
572
|
+
if (scope === "schedule") {
|
|
573
|
+
const period = tokens[1] ?? "7d";
|
|
574
|
+
try {
|
|
575
|
+
const lines = await buildScheduleUsageSummary(this.host.deps.stateManager, period);
|
|
576
|
+
return { success: true, output: lines.join("\n"), elapsed_ms: Date.now() - start };
|
|
577
|
+
}
|
|
578
|
+
catch (err) {
|
|
579
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
580
|
+
return { success: false, output: `Usage: /usage schedule [24h|7d|2w]\nError: ${message}`, elapsed_ms: Date.now() - start };
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return {
|
|
584
|
+
success: false,
|
|
585
|
+
output: "Usage: /usage [session|goal <goal-id>|daemon <goal-id>|schedule [24h|7d|2w]]",
|
|
586
|
+
elapsed_ms: Date.now() - start,
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
deterministicChatSummary(messages) {
|
|
590
|
+
return deterministicChatSummary(messages);
|
|
591
|
+
}
|
|
592
|
+
async summarizeChatForCompaction(messages, existingSummary) {
|
|
593
|
+
const content = [
|
|
594
|
+
existingSummary ? `Previous summary:\n${existingSummary}` : "",
|
|
595
|
+
`Messages to summarize:\n${messages.map((message) => `${message.role}: ${message.content}`).join("\n")}`,
|
|
596
|
+
].filter(Boolean).join("\n\n");
|
|
597
|
+
if (this.host.deps.llmClient) {
|
|
598
|
+
try {
|
|
599
|
+
const response = await this.host.deps.llmClient.sendMessage([
|
|
600
|
+
{ role: "user", content: `Summarize this chat history for later continuation. Preserve decisions, open tasks, constraints, and user preferences. Keep it concise.\n\n${content}` },
|
|
601
|
+
], { max_tokens: 700, model_tier: "light" });
|
|
602
|
+
if (response.content.trim())
|
|
603
|
+
return { summary: response.content.trim(), usedLlm: true };
|
|
604
|
+
}
|
|
605
|
+
catch {
|
|
606
|
+
// Fall back to deterministic summary below.
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
const fallback = [
|
|
610
|
+
existingSummary ? `Previous summary:\n${existingSummary}` : "",
|
|
611
|
+
"Extractive summary:",
|
|
612
|
+
this.deterministicChatSummary(messages),
|
|
613
|
+
].filter(Boolean).join("\n\n");
|
|
614
|
+
return { summary: fallback, usedLlm: false };
|
|
615
|
+
}
|
|
616
|
+
async handleCompact(start) {
|
|
617
|
+
const history = this.host.getHistory();
|
|
618
|
+
if (!history) {
|
|
619
|
+
return { success: false, output: "No active chat session to compact.", elapsed_ms: Date.now() - start };
|
|
620
|
+
}
|
|
621
|
+
const session = history.getSessionData();
|
|
622
|
+
if (session.messages.length <= 4) {
|
|
623
|
+
return { success: true, output: "Chat history is already compact. No messages were removed.", elapsed_ms: Date.now() - start };
|
|
624
|
+
}
|
|
625
|
+
const olderMessages = session.messages.slice(0, -4);
|
|
626
|
+
const { summary, usedLlm } = await this.summarizeChatForCompaction(olderMessages, session.compactionSummary);
|
|
627
|
+
const { before, after } = await history.compact(summary, 4);
|
|
628
|
+
const method = usedLlm ? "LLM summary" : "deterministic summary";
|
|
629
|
+
return {
|
|
630
|
+
success: true,
|
|
631
|
+
output: `Compacted chat history with ${method}. Persisted ${before} message(s) down to ${after}; the latest user/assistant turns were kept.`,
|
|
632
|
+
elapsed_ms: Date.now() - start,
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
async handleContext(start, cwdOverride) {
|
|
636
|
+
const cwd = this.host.getSessionCwd() ?? (cwdOverride ? resolveGitRoot(cwdOverride) : process.cwd());
|
|
637
|
+
const session = this.host.getHistory()?.getSessionData() ?? null;
|
|
638
|
+
const messages = session?.messages ?? [];
|
|
639
|
+
const policy = await this.host.getSessionExecutionPolicy();
|
|
640
|
+
const recentMessages = messages.slice(-6);
|
|
641
|
+
const userTurns = messages.filter((message) => message.role === "user").length;
|
|
642
|
+
const assistantTurns = messages.filter((message) => message.role === "assistant").length;
|
|
643
|
+
const compactionSummary = session?.compactionSummary?.trim() ?? "";
|
|
644
|
+
const agentLoopPath = this.host.getNativeAgentLoopStatePath() ?? session?.agentLoopStatePath ?? null;
|
|
645
|
+
const replyTarget = this.host.getRuntimeControlContext()?.replyTarget ?? this.host.deps.runtimeReplyTarget ?? null;
|
|
646
|
+
const routeCapabilities = {
|
|
647
|
+
hasAgentLoop: this.host.deps.chatAgentLoopRunner !== undefined,
|
|
648
|
+
hasToolLoop: this.host.deps.llmClient !== undefined,
|
|
649
|
+
hasRuntimeControlService: this.host.deps.runtimeControlService !== undefined,
|
|
650
|
+
};
|
|
651
|
+
const replyTargetParts = replyTarget
|
|
652
|
+
? [replyTarget.surface, replyTarget.platform, replyTarget.conversation_id].filter(Boolean)
|
|
653
|
+
: [];
|
|
654
|
+
const contextLines = [
|
|
655
|
+
"Working context",
|
|
656
|
+
"",
|
|
657
|
+
"Session",
|
|
658
|
+
`- session_id: ${this.host.getHistory()?.getSessionId() ?? "none"}`,
|
|
659
|
+
`- cwd: ${cwd}`,
|
|
660
|
+
`- messages: ${messages.length} (${userTurns} user, ${assistantTurns} assistant)`,
|
|
661
|
+
`- recent_turns_retained: ${recentMessages.length}`,
|
|
662
|
+
`- compaction_summary: ${compactionSummary ? "present" : "none"}`,
|
|
663
|
+
`- agentloop_state_path: ${agentLoopPath ?? "none"}`,
|
|
664
|
+
"",
|
|
665
|
+
"Turn context",
|
|
666
|
+
`- last_selected_route: ${formatRoute(this.host.getLastSelectedRoute())}`,
|
|
667
|
+
`- reply_target: ${replyTargetParts.length > 0 ? replyTargetParts.join(":") : "none"}`,
|
|
668
|
+
`- route_capabilities: agent_loop=${routeCapabilities.hasAgentLoop}, tool_loop=${routeCapabilities.hasToolLoop}, runtime_control=${routeCapabilities.hasRuntimeControlService}`,
|
|
669
|
+
"",
|
|
670
|
+
"Working assumptions",
|
|
671
|
+
"- this view exposes operational context, not hidden reasoning",
|
|
672
|
+
"- last_selected_route describes the most recent non-command turn in this ChatRunner",
|
|
673
|
+
"- future turns may select a different route based on the next input",
|
|
674
|
+
"",
|
|
675
|
+
"Active constraints",
|
|
676
|
+
...summarizeExecutionPolicy(policy).split("\n").map((line) => `- ${line}`),
|
|
677
|
+
"",
|
|
678
|
+
"Included context",
|
|
679
|
+
"- current session cwd and execution policy because they constrain tool and route behavior",
|
|
680
|
+
`- ${recentMessages.length} latest persisted message(s)`,
|
|
681
|
+
`- ${compactionSummary ? "compacted older chat summary because older turns were summarized" : "no compacted older chat summary because none is stored"}`,
|
|
682
|
+
`- ${agentLoopPath ? "native agent-loop resume path because this session can persist agent-loop state" : "no native agent-loop resume path because none is active"}`,
|
|
683
|
+
"",
|
|
684
|
+
"Not included",
|
|
685
|
+
"- hidden reasoning or private model chain-of-thought",
|
|
686
|
+
"- raw state files unless a command explicitly reads them",
|
|
687
|
+
"- older chat turns beyond the retained window unless compacted into the session summary",
|
|
688
|
+
];
|
|
689
|
+
return {
|
|
690
|
+
success: true,
|
|
691
|
+
output: contextLines.join("\n"),
|
|
692
|
+
elapsed_ms: Date.now() - start,
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
async handleTrack(start) {
|
|
696
|
+
if (!this.host.deps.escalationHandler) {
|
|
697
|
+
return {
|
|
698
|
+
success: false,
|
|
699
|
+
output: "Escalation not available — missing LLM configuration",
|
|
700
|
+
elapsed_ms: Date.now() - start,
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
if (!this.host.getHistory() || this.host.getHistory().getMessages().length === 0) {
|
|
704
|
+
return {
|
|
705
|
+
success: false,
|
|
706
|
+
output: "No conversation to escalate. Chat first, then /track.",
|
|
707
|
+
elapsed_ms: Date.now() - start,
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
try {
|
|
711
|
+
const result = await this.host.deps.escalationHandler.escalateToGoal(this.host.getHistory());
|
|
712
|
+
return {
|
|
713
|
+
success: true,
|
|
714
|
+
output: `Goal created: ${result.title} (ID: ${result.goalId})\nRun: pulseed run --goal ${result.goalId} --yes`,
|
|
715
|
+
elapsed_ms: Date.now() - start,
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
catch (err) {
|
|
719
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
720
|
+
return {
|
|
721
|
+
success: false,
|
|
722
|
+
output: `Escalation failed: ${message}`,
|
|
723
|
+
elapsed_ms: Date.now() - start,
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
async handlePermissions(args, start) {
|
|
728
|
+
const policy = await this.host.getSessionExecutionPolicy();
|
|
729
|
+
if (!args) {
|
|
730
|
+
return {
|
|
731
|
+
success: true,
|
|
732
|
+
output: summarizeExecutionPolicy(policy),
|
|
733
|
+
elapsed_ms: Date.now() - start,
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
const tokens = args.toLowerCase().split(/\s+/).filter(Boolean);
|
|
737
|
+
let nextPolicy = policy;
|
|
738
|
+
for (let index = 0; index < tokens.length; index++) {
|
|
739
|
+
const token = tokens[index];
|
|
740
|
+
if (token === "read-only" || token === "readonly" || token === "read_only") {
|
|
741
|
+
nextPolicy = withExecutionPolicyOverrides(nextPolicy, { sandboxMode: "read_only" });
|
|
742
|
+
continue;
|
|
743
|
+
}
|
|
744
|
+
if (token === "workspace-write" || token === "workspace_write") {
|
|
745
|
+
nextPolicy = withExecutionPolicyOverrides(nextPolicy, { sandboxMode: "workspace_write" });
|
|
746
|
+
continue;
|
|
747
|
+
}
|
|
748
|
+
if (token === "full-access" || token === "danger-full-access" || token === "danger_full_access") {
|
|
749
|
+
nextPolicy = withExecutionPolicyOverrides(nextPolicy, { sandboxMode: "danger_full_access" });
|
|
750
|
+
continue;
|
|
751
|
+
}
|
|
752
|
+
if (token === "network" && tokens[index + 1]) {
|
|
753
|
+
nextPolicy = withExecutionPolicyOverrides(nextPolicy, { networkAccess: tokens[index + 1] === "on" });
|
|
754
|
+
index += 1;
|
|
755
|
+
continue;
|
|
756
|
+
}
|
|
757
|
+
if (token === "approval" && tokens[index + 1]) {
|
|
758
|
+
const approvalPolicy = tokens[index + 1];
|
|
759
|
+
if (approvalPolicy === "never" || approvalPolicy === "on_request" || approvalPolicy === "untrusted") {
|
|
760
|
+
nextPolicy = withExecutionPolicyOverrides(nextPolicy, { approvalPolicy });
|
|
761
|
+
index += 1;
|
|
762
|
+
continue;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return {
|
|
766
|
+
success: false,
|
|
767
|
+
output: "Usage: /permissions [read-only|workspace-write|full-access] [network on|off] [approval on_request|never|untrusted]",
|
|
768
|
+
elapsed_ms: Date.now() - start,
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
const runner = this.host;
|
|
772
|
+
if (typeof runner.setSessionExecutionPolicy === "function") {
|
|
773
|
+
runner.setSessionExecutionPolicy(nextPolicy);
|
|
774
|
+
}
|
|
775
|
+
else {
|
|
776
|
+
runner.sessionExecutionPolicy = nextPolicy;
|
|
777
|
+
}
|
|
778
|
+
return {
|
|
779
|
+
success: true,
|
|
780
|
+
output: summarizeExecutionPolicy(nextPolicy),
|
|
781
|
+
elapsed_ms: Date.now() - start,
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
async handleReview(start) {
|
|
785
|
+
const cwd = this.host.getSessionCwd() ?? process.cwd();
|
|
786
|
+
const diffStat = await checkGitChanges(cwd);
|
|
787
|
+
const reviewPolicy = withExecutionPolicyOverrides(await this.host.getSessionExecutionPolicy(), {
|
|
788
|
+
sandboxMode: "read_only",
|
|
789
|
+
approvalPolicy: "never",
|
|
790
|
+
});
|
|
791
|
+
if (this.host.deps.reviewAgentLoopRunner) {
|
|
792
|
+
const review = await this.host.deps.reviewAgentLoopRunner.execute({
|
|
793
|
+
cwd,
|
|
794
|
+
diffStat,
|
|
795
|
+
executionPolicy: reviewPolicy,
|
|
796
|
+
});
|
|
797
|
+
return { success: review.success, output: review.output, elapsed_ms: Date.now() - start };
|
|
798
|
+
}
|
|
799
|
+
const output = [
|
|
800
|
+
"Review summary",
|
|
801
|
+
diffStat ? diffStat : "No uncommitted changes detected.",
|
|
802
|
+
"",
|
|
803
|
+
"Execution policy",
|
|
804
|
+
summarizeExecutionPolicy(reviewPolicy),
|
|
805
|
+
].join("\n");
|
|
806
|
+
return { success: true, output, elapsed_ms: Date.now() - start };
|
|
807
|
+
}
|
|
808
|
+
async handleFork(title, start) {
|
|
809
|
+
const cwd = this.host.getSessionCwd() ?? process.cwd();
|
|
810
|
+
const sessionId = crypto.randomUUID();
|
|
811
|
+
const baseSession = this.host.getHistory()?.getSessionData() ?? {
|
|
812
|
+
id: sessionId,
|
|
813
|
+
cwd,
|
|
814
|
+
createdAt: new Date().toISOString(),
|
|
815
|
+
updatedAt: new Date().toISOString(),
|
|
816
|
+
messages: [],
|
|
817
|
+
};
|
|
818
|
+
const now = new Date().toISOString();
|
|
819
|
+
const forkedSession = {
|
|
820
|
+
...baseSession,
|
|
821
|
+
id: sessionId,
|
|
822
|
+
createdAt: now,
|
|
823
|
+
updatedAt: now,
|
|
824
|
+
title: title || (baseSession.title ? `${baseSession.title} (fork)` : "Forked session"),
|
|
825
|
+
};
|
|
826
|
+
this.host.setHistory(ChatHistory.fromSession(this.host.deps.stateManager, forkedSession));
|
|
827
|
+
this.host.setSessionCwd(resolveGitRoot(cwd));
|
|
828
|
+
this.host.setSessionActive(true);
|
|
829
|
+
this.host.setNativeAgentLoopStatePath(`chat/agentloop/${sessionId}.state.json`);
|
|
830
|
+
this.host.getHistory().resetAgentLoopState(this.host.getNativeAgentLoopStatePath());
|
|
831
|
+
await this.host.getHistory().persist();
|
|
832
|
+
const runner = this.host;
|
|
833
|
+
runner.resetSessionExecutionPolicy?.();
|
|
834
|
+
return {
|
|
835
|
+
success: true,
|
|
836
|
+
output: `Forked chat session as ${sessionId}.`,
|
|
837
|
+
elapsed_ms: Date.now() - start,
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
async handleUndo(start) {
|
|
841
|
+
const history = this.host.getHistory();
|
|
842
|
+
if (!history) {
|
|
843
|
+
return { success: false, output: "No active chat session to undo.", elapsed_ms: Date.now() - start };
|
|
844
|
+
}
|
|
845
|
+
const removed = await history.removeLastTurn();
|
|
846
|
+
if (removed === 0) {
|
|
847
|
+
return { success: false, output: "No chat turn to undo.", elapsed_ms: Date.now() - start };
|
|
848
|
+
}
|
|
849
|
+
return {
|
|
850
|
+
success: true,
|
|
851
|
+
output: `Removed ${removed} message(s) from chat history. File changes were not reverted.`,
|
|
852
|
+
elapsed_ms: Date.now() - start,
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
async handleTend(args, start) {
|
|
856
|
+
if (!this.host.deps.llmClient) {
|
|
857
|
+
return {
|
|
858
|
+
success: false,
|
|
859
|
+
output: "Tend not available — missing LLM configuration",
|
|
860
|
+
elapsed_ms: Date.now() - start,
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
if (!this.host.deps.goalNegotiator) {
|
|
864
|
+
return {
|
|
865
|
+
success: false,
|
|
866
|
+
output: "Tend not available — missing goal negotiator",
|
|
867
|
+
elapsed_ms: Date.now() - start,
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
if (!this.host.deps.daemonClient) {
|
|
871
|
+
return {
|
|
872
|
+
success: false,
|
|
873
|
+
output: "Tend not available — daemon client not configured. Start the daemon with 'pulseed daemon start' first.",
|
|
874
|
+
elapsed_ms: Date.now() - start,
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
const tendCommand = new TendCommand();
|
|
878
|
+
const result = await tendCommand.execute(args, this.buildTendDeps(this.host.deps.llmClient, this.host.deps.goalNegotiator, this.host.deps.daemonClient));
|
|
879
|
+
if (result.needsConfirmation && result.goalId) {
|
|
880
|
+
this.host.setPendingTend({ goalId: result.goalId, maxIterations: result.maxIterations });
|
|
881
|
+
return {
|
|
882
|
+
success: true,
|
|
883
|
+
output: result.confirmation ?? result.message,
|
|
884
|
+
elapsed_ms: Date.now() - start,
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
return {
|
|
888
|
+
success: result.success,
|
|
889
|
+
output: result.message,
|
|
890
|
+
elapsed_ms: Date.now() - start,
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
buildTendDeps(llmClient, goalNegotiator, daemonClient) {
|
|
894
|
+
return {
|
|
895
|
+
llmClient,
|
|
896
|
+
goalNegotiator,
|
|
897
|
+
daemonClient,
|
|
898
|
+
stateManager: this.host.deps.stateManager,
|
|
899
|
+
chatHistory: this.host.getHistory()?.getMessages() ?? [],
|
|
900
|
+
sessionId: this.host.getHistory()?.getSessionId() ?? null,
|
|
901
|
+
workspace: this.host.getSessionCwd() ?? process.cwd(),
|
|
902
|
+
replyTarget: this.host.getRuntimeControlContext()?.replyTarget ?? this.host.deps.runtimeReplyTarget ?? null,
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
//# sourceMappingURL=chat-runner-commands.js.map
|