@orion-agents/orion-code 0.1.1 → 0.1.2
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 +93 -68
- package/README.zh-CN.md +181 -216
- package/dist/cli.js +13 -17
- package/dist/cli.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +213 -114
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/target-command.d.ts.map +1 -1
- package/dist/commands/target-command.js +42 -8
- package/dist/commands/target-command.js.map +1 -1
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +2 -2
- package/dist/core/agent.js.map +1 -1
- package/dist/framework/external-assertion.d.ts +65 -0
- package/dist/framework/external-assertion.d.ts.map +1 -0
- package/dist/framework/external-assertion.js +571 -0
- package/dist/framework/external-assertion.js.map +1 -0
- package/dist/framework/index.d.ts +6 -4
- package/dist/framework/index.d.ts.map +1 -1
- package/dist/framework/index.js +4 -1
- package/dist/framework/index.js.map +1 -1
- package/dist/framework/query.d.ts +15 -1
- package/dist/framework/query.d.ts.map +1 -1
- package/dist/framework/query.js +42 -23
- package/dist/framework/query.js.map +1 -1
- package/dist/framework/tool-scheduler.d.ts +2 -0
- package/dist/framework/tool-scheduler.d.ts.map +1 -1
- package/dist/framework/tool-scheduler.js +23 -9
- package/dist/framework/tool-scheduler.js.map +1 -1
- package/dist/framework/tool-serializer.d.ts.map +1 -1
- package/dist/framework/tool-serializer.js +20 -4
- package/dist/framework/tool-serializer.js.map +1 -1
- package/dist/framework/tool.d.ts +11 -5
- package/dist/framework/tool.d.ts.map +1 -1
- package/dist/framework/tool.js.map +1 -1
- package/dist/harness/safety.d.ts.map +1 -1
- package/dist/harness/safety.js +19 -3
- package/dist/harness/safety.js.map +1 -1
- package/dist/init.d.ts +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +115 -34
- package/dist/init.js.map +1 -1
- package/dist/memory/storage.d.ts.map +1 -1
- package/dist/memory/storage.js +1 -0
- package/dist/memory/storage.js.map +1 -1
- package/dist/memory/store.d.ts.map +1 -1
- package/dist/memory/store.js +11 -5
- package/dist/memory/store.js.map +1 -1
- package/dist/print-ui/launch.d.ts +4 -0
- package/dist/print-ui/launch.d.ts.map +1 -1
- package/dist/print-ui/launch.js +102 -9
- package/dist/print-ui/launch.js.map +1 -1
- package/dist/product/identity.d.ts +2 -2
- package/dist/product/identity.d.ts.map +1 -1
- package/dist/product/identity.js +2 -2
- package/dist/product/identity.js.map +1 -1
- package/dist/product/index.d.ts +2 -1
- package/dist/product/index.d.ts.map +1 -1
- package/dist/product/index.js +5 -1
- package/dist/product/index.js.map +1 -1
- package/dist/product/version.d.ts +12 -0
- package/dist/product/version.d.ts.map +1 -0
- package/dist/product/version.js +31 -0
- package/dist/product/version.js.map +1 -0
- package/dist/runtime/agent-runtime-controller.d.ts +34 -0
- package/dist/runtime/agent-runtime-controller.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-controller.js +953 -148
- package/dist/runtime/agent-runtime-controller.js.map +1 -1
- package/dist/runtime/agent-runtime-protocol.d.ts +7 -2
- package/dist/runtime/agent-runtime-protocol.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-protocol.js +6 -0
- package/dist/runtime/agent-runtime-protocol.js.map +1 -1
- package/dist/runtime/chat-controller.d.ts +6 -0
- package/dist/runtime/chat-controller.d.ts.map +1 -1
- package/dist/runtime/chat-controller.js +200 -19
- package/dist/runtime/chat-controller.js.map +1 -1
- package/dist/runtime/goals/accounting.d.ts +28 -0
- package/dist/runtime/goals/accounting.d.ts.map +1 -1
- package/dist/runtime/goals/accounting.js +69 -0
- package/dist/runtime/goals/accounting.js.map +1 -1
- package/dist/runtime/goals/completion-audit.d.ts +13 -8
- package/dist/runtime/goals/completion-audit.d.ts.map +1 -1
- package/dist/runtime/goals/completion-audit.js +598 -16
- package/dist/runtime/goals/completion-audit.js.map +1 -1
- package/dist/runtime/goals/coordinator.d.ts +44 -5
- package/dist/runtime/goals/coordinator.d.ts.map +1 -1
- package/dist/runtime/goals/coordinator.js +1124 -58
- package/dist/runtime/goals/coordinator.js.map +1 -1
- package/dist/runtime/goals/evidence.d.ts +37 -0
- package/dist/runtime/goals/evidence.d.ts.map +1 -0
- package/dist/runtime/goals/evidence.js +300 -0
- package/dist/runtime/goals/evidence.js.map +1 -0
- package/dist/runtime/goals/presentation.d.ts +4 -0
- package/dist/runtime/goals/presentation.d.ts.map +1 -0
- package/dist/runtime/goals/presentation.js +50 -0
- package/dist/runtime/goals/presentation.js.map +1 -0
- package/dist/runtime/goals/prompt.d.ts.map +1 -1
- package/dist/runtime/goals/prompt.js +38 -8
- package/dist/runtime/goals/prompt.js.map +1 -1
- package/dist/runtime/goals/tools.d.ts +18 -1
- package/dist/runtime/goals/tools.d.ts.map +1 -1
- package/dist/runtime/goals/tools.js +308 -28
- package/dist/runtime/goals/tools.js.map +1 -1
- package/dist/runtime/goals/types.d.ts +241 -7
- package/dist/runtime/goals/types.d.ts.map +1 -1
- package/dist/runtime/goals/types.js +8 -2
- package/dist/runtime/goals/types.js.map +1 -1
- package/dist/runtime/subagents/child-executor-guard.d.ts +12 -4
- package/dist/runtime/subagents/child-executor-guard.d.ts.map +1 -1
- package/dist/runtime/subagents/child-executor-guard.js +397 -61
- package/dist/runtime/subagents/child-executor-guard.js.map +1 -1
- package/dist/runtime/subagents/presets.d.ts +4 -5
- package/dist/runtime/subagents/presets.d.ts.map +1 -1
- package/dist/runtime/subagents/presets.js +18 -33
- package/dist/runtime/subagents/presets.js.map +1 -1
- package/dist/runtime/subagents/production.d.ts +3 -1
- package/dist/runtime/subagents/production.d.ts.map +1 -1
- package/dist/runtime/subagents/production.js +37 -7
- package/dist/runtime/subagents/production.js.map +1 -1
- package/dist/runtime/subagents/runner.d.ts.map +1 -1
- package/dist/runtime/subagents/runner.js +24 -3
- package/dist/runtime/subagents/runner.js.map +1 -1
- package/dist/runtime/subagents/runtime-integration.d.ts +3 -0
- package/dist/runtime/subagents/runtime-integration.d.ts.map +1 -1
- package/dist/runtime/subagents/runtime-integration.js +18 -7
- package/dist/runtime/subagents/runtime-integration.js.map +1 -1
- package/dist/runtime/subagents/supervisor.d.ts +4 -4
- package/dist/runtime/subagents/supervisor.d.ts.map +1 -1
- package/dist/runtime/subagents/supervisor.js +39 -19
- package/dist/runtime/subagents/supervisor.js.map +1 -1
- package/dist/runtime/subagents/types.d.ts +7 -0
- package/dist/runtime/subagents/types.d.ts.map +1 -1
- package/dist/runtime/subagents/types.js +12 -1
- package/dist/runtime/subagents/types.js.map +1 -1
- package/dist/runtime/ui-events.d.ts +6 -0
- package/dist/runtime/ui-events.d.ts.map +1 -1
- package/dist/runtime/ui-events.js +5 -5
- package/dist/runtime/ui-events.js.map +1 -1
- package/dist/services/config.d.ts +1 -1
- package/dist/services/config.d.ts.map +1 -1
- package/dist/services/config.js +53 -48
- package/dist/services/config.js.map +1 -1
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +163 -17
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/goal-storage.d.ts +9 -4
- package/dist/services/goal-storage.d.ts.map +1 -1
- package/dist/services/goal-storage.js +1113 -75
- package/dist/services/goal-storage.js.map +1 -1
- package/dist/services/llm.d.ts +19 -0
- package/dist/services/llm.d.ts.map +1 -1
- package/dist/services/llm.js +153 -20
- package/dist/services/llm.js.map +1 -1
- package/dist/services/model-registry.d.ts +1 -1
- package/dist/services/model-registry.d.ts.map +1 -1
- package/dist/services/model-registry.js +69 -19
- package/dist/services/model-registry.js.map +1 -1
- package/dist/services/provider-resilience/coordinator.d.ts +2 -1
- package/dist/services/provider-resilience/coordinator.d.ts.map +1 -1
- package/dist/services/provider-resilience/coordinator.js +7 -6
- package/dist/services/provider-resilience/coordinator.js.map +1 -1
- package/dist/services/provider-resilience/error-classifier.d.ts.map +1 -1
- package/dist/services/provider-resilience/error-classifier.js +67 -17
- package/dist/services/provider-resilience/error-classifier.js.map +1 -1
- package/dist/services/provider-resilience/types.d.ts +1 -1
- package/dist/services/provider-resilience/types.d.ts.map +1 -1
- package/dist/services/provider-resilience/types.js.map +1 -1
- package/dist/services/redaction.d.ts.map +1 -1
- package/dist/services/redaction.js +9 -1
- package/dist/services/redaction.js.map +1 -1
- package/dist/services/session-storage.d.ts +12 -1
- package/dist/services/session-storage.d.ts.map +1 -1
- package/dist/services/session-storage.js +23 -7
- package/dist/services/session-storage.js.map +1 -1
- package/dist/services/storage-maintenance.d.ts +73 -3
- package/dist/services/storage-maintenance.d.ts.map +1 -1
- package/dist/services/storage-maintenance.js +771 -104
- package/dist/services/storage-maintenance.js.map +1 -1
- package/dist/services/task-manager.d.ts.map +1 -1
- package/dist/services/task-manager.js +2 -2
- package/dist/services/task-manager.js.map +1 -1
- package/dist/services/web-search-adapters.d.ts.map +1 -1
- package/dist/services/web-search-adapters.js +89 -49
- package/dist/services/web-search-adapters.js.map +1 -1
- package/dist/services/web-search-mcp.d.ts.map +1 -1
- package/dist/services/web-search-mcp.js +34 -37
- package/dist/services/web-search-mcp.js.map +1 -1
- package/dist/services/workspace-state.d.ts +4 -0
- package/dist/services/workspace-state.d.ts.map +1 -1
- package/dist/services/workspace-state.js +30 -9
- package/dist/services/workspace-state.js.map +1 -1
- package/dist/terminal-ui/launch.d.ts +2 -0
- package/dist/terminal-ui/launch.d.ts.map +1 -1
- package/dist/terminal-ui/launch.js +21 -7
- package/dist/terminal-ui/launch.js.map +1 -1
- package/dist/tools/git.d.ts.map +1 -1
- package/dist/tools/git.js +275 -27
- package/dist/tools/git.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +23 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/mcp.d.ts.map +1 -1
- package/dist/tools/mcp.js +20 -12
- package/dist/tools/mcp.js.map +1 -1
- package/dist/tools/web.d.ts.map +1 -1
- package/dist/tools/web.js +38 -14
- package/dist/tools/web.js.map +1 -1
- package/dist/tui-ui/layout.d.ts.map +1 -1
- package/dist/tui-ui/layout.js +36 -23
- package/dist/tui-ui/layout.js.map +1 -1
- package/dist/tui-ui/pickers.d.ts.map +1 -1
- package/dist/tui-ui/pickers.js +4 -3
- package/dist/tui-ui/pickers.js.map +1 -1
- package/dist/tui-ui/runner.d.ts +1 -0
- package/dist/tui-ui/runner.d.ts.map +1 -1
- package/dist/tui-ui/runner.js +14 -0
- package/dist/tui-ui/runner.js.map +1 -1
- package/dist/tui-ui/state.d.ts +6 -0
- package/dist/tui-ui/state.d.ts.map +1 -1
- package/dist/tui-ui/state.js +60 -30
- package/dist/tui-ui/state.js.map +1 -1
- package/package.json +13 -9
- package/dist/core/state.d.ts +0 -94
- package/dist/core/state.d.ts.map +0 -1
- package/dist/core/state.js +0 -178
- package/dist/core/state.js.map +0 -1
- package/dist/ink/bidi.d.ts +0 -16
- package/dist/ink/bidi.d.ts.map +0 -1
- package/dist/ink/bidi.js +0 -124
- package/dist/ink/bidi.js.map +0 -1
- package/dist/ink/clearTerminal.d.ts +0 -14
- package/dist/ink/clearTerminal.d.ts.map +0 -1
- package/dist/ink/clearTerminal.js +0 -63
- package/dist/ink/clearTerminal.js.map +0 -1
- package/dist/ink/colorize.d.ts +0 -17
- package/dist/ink/colorize.d.ts.map +0 -1
- package/dist/ink/colorize.js +0 -208
- package/dist/ink/colorize.js.map +0 -1
- package/dist/ink/components/App.d.ts +0 -73
- package/dist/ink/components/App.d.ts.map +0 -1
- package/dist/ink/components/App.js +0 -646
- package/dist/ink/components/App.js.map +0 -1
- package/dist/ink/components/AppContext.d.ts +0 -12
- package/dist/ink/components/AppContext.d.ts.map +0 -1
- package/dist/ink/components/AppContext.js +0 -14
- package/dist/ink/components/AppContext.js.map +0 -1
- package/dist/ink/components/Box.d.ts +0 -44
- package/dist/ink/components/Box.d.ts.map +0 -1
- package/dist/ink/components/Box.js +0 -191
- package/dist/ink/components/Box.js.map +0 -1
- package/dist/ink/components/ClockContext.d.ts +0 -9
- package/dist/ink/components/ClockContext.d.ts.map +0 -1
- package/dist/ink/components/ClockContext.js +0 -146
- package/dist/ink/components/ClockContext.js.map +0 -1
- package/dist/ink/components/CursorDeclarationContext.d.ts +0 -23
- package/dist/ink/components/CursorDeclarationContext.d.ts.map +0 -1
- package/dist/ink/components/CursorDeclarationContext.js +0 -6
- package/dist/ink/components/CursorDeclarationContext.js.map +0 -1
- package/dist/ink/components/ErrorOverview.d.ts +0 -6
- package/dist/ink/components/ErrorOverview.d.ts.map +0 -1
- package/dist/ink/components/ErrorOverview.js +0 -27
- package/dist/ink/components/ErrorOverview.js.map +0 -1
- package/dist/ink/components/Newline.d.ts +0 -13
- package/dist/ink/components/Newline.d.ts.map +0 -1
- package/dist/ink/components/Newline.js +0 -36
- package/dist/ink/components/Newline.js.map +0 -1
- package/dist/ink/components/NoSelect.d.ts +0 -20
- package/dist/ink/components/NoSelect.d.ts.map +0 -1
- package/dist/ink/components/NoSelect.js +0 -63
- package/dist/ink/components/NoSelect.js.map +0 -1
- package/dist/ink/components/RawAnsi.d.ts +0 -17
- package/dist/ink/components/RawAnsi.d.ts.map +0 -1
- package/dist/ink/components/RawAnsi.js +0 -52
- package/dist/ink/components/RawAnsi.js.map +0 -1
- package/dist/ink/components/Spacer.d.ts +0 -6
- package/dist/ink/components/Spacer.d.ts.map +0 -1
- package/dist/ink/components/Spacer.js +0 -26
- package/dist/ink/components/Spacer.js.map +0 -1
- package/dist/ink/components/StdinContext.d.ts +0 -28
- package/dist/ink/components/StdinContext.d.ts.map +0 -1
- package/dist/ink/components/StdinContext.js +0 -19
- package/dist/ink/components/StdinContext.js.map +0 -1
- package/dist/ink/components/TerminalFocusContext.d.ts +0 -10
- package/dist/ink/components/TerminalFocusContext.d.ts.map +0 -1
- package/dist/ink/components/TerminalFocusContext.js +0 -81
- package/dist/ink/components/TerminalFocusContext.js.map +0 -1
- package/dist/ink/components/TerminalSizeContext.d.ts +0 -6
- package/dist/ink/components/TerminalSizeContext.d.ts.map +0 -1
- package/dist/ink/components/TerminalSizeContext.js +0 -6
- package/dist/ink/components/TerminalSizeContext.js.map +0 -1
- package/dist/ink/components/Text.d.ts +0 -56
- package/dist/ink/components/Text.d.ts.map +0 -1
- package/dist/ink/components/Text.js +0 -201
- package/dist/ink/components/Text.js.map +0 -1
- package/dist/ink/constants.d.ts +0 -2
- package/dist/ink/constants.d.ts.map +0 -1
- package/dist/ink/constants.js +0 -6
- package/dist/ink/constants.js.map +0 -1
- package/dist/ink/devtools.d.ts +0 -3
- package/dist/ink/devtools.d.ts.map +0 -1
- package/dist/ink/devtools.js +0 -5
- package/dist/ink/devtools.js.map +0 -1
- package/dist/ink/dom.d.ts +0 -77
- package/dist/ink/dom.d.ts.map +0 -1
- package/dist/ink/dom.js +0 -322
- package/dist/ink/dom.js.map +0 -1
- package/dist/ink/events/click-event.d.ts +0 -32
- package/dist/ink/events/click-event.d.ts.map +0 -1
- package/dist/ink/events/click-event.js +0 -30
- package/dist/ink/events/click-event.js.map +0 -1
- package/dist/ink/events/dispatcher.d.ts +0 -41
- package/dist/ink/events/dispatcher.d.ts.map +0 -1
- package/dist/ink/events/dispatcher.js +0 -181
- package/dist/ink/events/dispatcher.js.map +0 -1
- package/dist/ink/events/emitter.d.ts +0 -6
- package/dist/ink/events/emitter.d.ts.map +0 -1
- package/dist/ink/events/emitter.js +0 -36
- package/dist/ink/events/emitter.js.map +0 -1
- package/dist/ink/events/event-handlers.d.ts +0 -47
- package/dist/ink/events/event-handlers.d.ts.map +0 -1
- package/dist/ink/events/event-handlers.js +0 -34
- package/dist/ink/events/event-handlers.js.map +0 -1
- package/dist/ink/events/event.d.ts +0 -6
- package/dist/ink/events/event.d.ts.map +0 -1
- package/dist/ink/events/event.js +0 -16
- package/dist/ink/events/event.js.map +0 -1
- package/dist/ink/events/focus-event.d.ts +0 -14
- package/dist/ink/events/focus-event.d.ts.map +0 -1
- package/dist/ink/events/focus-event.js +0 -20
- package/dist/ink/events/focus-event.js.map +0 -1
- package/dist/ink/events/input-event.d.ts +0 -31
- package/dist/ink/events/input-event.d.ts.map +0 -1
- package/dist/ink/events/input-event.js +0 -163
- package/dist/ink/events/input-event.js.map +0 -1
- package/dist/ink/events/keyboard-event.d.ts +0 -20
- package/dist/ink/events/keyboard-event.d.ts.map +0 -1
- package/dist/ink/events/keyboard-event.js +0 -44
- package/dist/ink/events/keyboard-event.js.map +0 -1
- package/dist/ink/events/terminal-event.d.ts +0 -55
- package/dist/ink/events/terminal-event.d.ts.map +0 -1
- package/dist/ink/events/terminal-event.js +0 -79
- package/dist/ink/events/terminal-event.js.map +0 -1
- package/dist/ink/events/terminal-focus-event.d.ts +0 -14
- package/dist/ink/events/terminal-focus-event.d.ts.map +0 -1
- package/dist/ink/events/terminal-focus-event.js +0 -19
- package/dist/ink/events/terminal-focus-event.js.map +0 -1
- package/dist/ink/focus.d.ts +0 -44
- package/dist/ink/focus.d.ts.map +0 -1
- package/dist/ink/focus.js +0 -164
- package/dist/ink/focus.js.map +0 -1
- package/dist/ink/frame.d.ts +0 -95
- package/dist/ink/frame.d.ts.map +0 -1
- package/dist/ink/frame.js +0 -35
- package/dist/ink/frame.js.map +0 -1
- package/dist/ink/get-max-width.d.ts +0 -18
- package/dist/ink/get-max-width.d.ts.map +0 -1
- package/dist/ink/get-max-width.js +0 -26
- package/dist/ink/get-max-width.js.map +0 -1
- package/dist/ink/hit-test.d.ts +0 -34
- package/dist/ink/hit-test.d.ts.map +0 -1
- package/dist/ink/hit-test.js +0 -119
- package/dist/ink/hit-test.js.map +0 -1
- package/dist/ink/hooks/use-animation-frame.d.ts +0 -27
- package/dist/ink/hooks/use-animation-frame.d.ts.map +0 -1
- package/dist/ink/hooks/use-animation-frame.js +0 -52
- package/dist/ink/hooks/use-animation-frame.js.map +0 -1
- package/dist/ink/hooks/use-app.d.ts +0 -6
- package/dist/ink/hooks/use-app.d.ts.map +0 -1
- package/dist/ink/hooks/use-app.js +0 -13
- package/dist/ink/hooks/use-app.js.map +0 -1
- package/dist/ink/hooks/use-declared-cursor.d.ts +0 -27
- package/dist/ink/hooks/use-declared-cursor.d.ts.map +0 -1
- package/dist/ink/hooks/use-declared-cursor.js +0 -67
- package/dist/ink/hooks/use-declared-cursor.js.map +0 -1
- package/dist/ink/hooks/use-input.d.ts +0 -38
- package/dist/ink/hooks/use-input.d.ts.map +0 -1
- package/dist/ink/hooks/use-input.js +0 -86
- package/dist/ink/hooks/use-input.js.map +0 -1
- package/dist/ink/hooks/use-interval.d.ts +0 -19
- package/dist/ink/hooks/use-interval.d.ts.map +0 -1
- package/dist/ink/hooks/use-interval.js +0 -59
- package/dist/ink/hooks/use-interval.js.map +0 -1
- package/dist/ink/hooks/use-search-highlight.d.ts +0 -31
- package/dist/ink/hooks/use-search-highlight.d.ts.map +0 -1
- package/dist/ink/hooks/use-search-highlight.js +0 -39
- package/dist/ink/hooks/use-search-highlight.js.map +0 -1
- package/dist/ink/hooks/use-selection.d.ts +0 -40
- package/dist/ink/hooks/use-selection.d.ts.map +0 -1
- package/dist/ink/hooks/use-selection.js +0 -68
- package/dist/ink/hooks/use-selection.js.map +0 -1
- package/dist/ink/hooks/use-stdin.d.ts +0 -6
- package/dist/ink/hooks/use-stdin.d.ts.map +0 -1
- package/dist/ink/hooks/use-stdin.js +0 -13
- package/dist/ink/hooks/use-stdin.js.map +0 -1
- package/dist/ink/hooks/use-tab-status.d.ts +0 -14
- package/dist/ink/hooks/use-tab-status.d.ts.map +0 -1
- package/dist/ink/hooks/use-tab-status.js +0 -61
- package/dist/ink/hooks/use-tab-status.js.map +0 -1
- package/dist/ink/hooks/use-terminal-focus.d.ts +0 -11
- package/dist/ink/hooks/use-terminal-focus.d.ts.map +0 -1
- package/dist/ink/hooks/use-terminal-focus.js +0 -22
- package/dist/ink/hooks/use-terminal-focus.js.map +0 -1
- package/dist/ink/hooks/use-terminal-title.d.ts +0 -13
- package/dist/ink/hooks/use-terminal-title.d.ts.map +0 -1
- package/dist/ink/hooks/use-terminal-title.js +0 -36
- package/dist/ink/hooks/use-terminal-title.js.map +0 -1
- package/dist/ink/hooks/use-terminal-viewport.d.ts +0 -30
- package/dist/ink/hooks/use-terminal-viewport.d.ts.map +0 -1
- package/dist/ink/hooks/use-terminal-viewport.js +0 -81
- package/dist/ink/hooks/use-terminal-viewport.js.map +0 -1
- package/dist/ink/ink.d.ts +0 -371
- package/dist/ink/ink.d.ts.map +0 -1
- package/dist/ink/ink.js +0 -1686
- package/dist/ink/ink.js.map +0 -1
- package/dist/ink/instances.d.ts +0 -4
- package/dist/ink/instances.d.ts.map +0 -1
- package/dist/ink/instances.js +0 -10
- package/dist/ink/instances.js.map +0 -1
- package/dist/ink/line-width-cache.d.ts +0 -2
- package/dist/ink/line-width-cache.d.ts.map +0 -1
- package/dist/ink/line-width-cache.js +0 -23
- package/dist/ink/line-width-cache.js.map +0 -1
- package/dist/ink/log-update.d.ts +0 -18
- package/dist/ink/log-update.d.ts.map +0 -1
- package/dist/ink/log-update.js +0 -637
- package/dist/ink/log-update.js.map +0 -1
- package/dist/ink/measure-element.d.ts +0 -17
- package/dist/ink/measure-element.d.ts.map +0 -1
- package/dist/ink/measure-element.js +0 -11
- package/dist/ink/measure-element.js.map +0 -1
- package/dist/ink/measure-text.d.ts +0 -7
- package/dist/ink/measure-text.d.ts.map +0 -1
- package/dist/ink/measure-text.js +0 -38
- package/dist/ink/measure-text.js.map +0 -1
- package/dist/ink/node-cache.d.ts +0 -21
- package/dist/ink/node-cache.d.ts.map +0 -1
- package/dist/ink/node-cache.js +0 -36
- package/dist/ink/node-cache.js.map +0 -1
- package/dist/ink/optimizer.d.ts +0 -16
- package/dist/ink/optimizer.d.ts.map +0 -1
- package/dist/ink/optimizer.js +0 -85
- package/dist/ink/optimizer.js.map +0 -1
- package/dist/ink/output.d.ts +0 -120
- package/dist/ink/output.d.ts.map +0 -1
- package/dist/ink/output.js +0 -559
- package/dist/ink/output.js.map +0 -1
- package/dist/ink/parse-keypress.d.ts +0 -112
- package/dist/ink/parse-keypress.d.ts.map +0 -1
- package/dist/ink/parse-keypress.js +0 -719
- package/dist/ink/parse-keypress.js.map +0 -1
- package/dist/ink/parse-keypress.test.d.ts +0 -2
- package/dist/ink/parse-keypress.test.d.ts.map +0 -1
- package/dist/ink/parse-keypress.test.js +0 -37
- package/dist/ink/parse-keypress.test.js.map +0 -1
- package/dist/ink/reconciler.d.ts +0 -12
- package/dist/ink/reconciler.d.ts.map +0 -1
- package/dist/ink/reconciler.js +0 -456
- package/dist/ink/reconciler.js.map +0 -1
- package/dist/ink/render-border.d.ts +0 -25
- package/dist/ink/render-border.d.ts.map +0 -1
- package/dist/ink/render-border.js +0 -141
- package/dist/ink/render-border.js.map +0 -1
- package/dist/ink/render-node-to-output.d.ts +0 -46
- package/dist/ink/render-node-to-output.d.ts.map +0 -1
- package/dist/ink/render-node-to-output.js +0 -1257
- package/dist/ink/render-node-to-output.js.map +0 -1
- package/dist/ink/render-to-screen.d.ts +0 -47
- package/dist/ink/render-to-screen.d.ts.map +0 -1
- package/dist/ink/render-to-screen.js +0 -213
- package/dist/ink/render-to-screen.js.map +0 -1
- package/dist/ink/renderer.d.ts +0 -15
- package/dist/ink/renderer.d.ts.map +0 -1
- package/dist/ink/renderer.js +0 -169
- package/dist/ink/renderer.js.map +0 -1
- package/dist/ink/root.d.ts +0 -75
- package/dist/ink/root.d.ts.map +0 -1
- package/dist/ink/root.js +0 -89
- package/dist/ink/root.js.map +0 -1
- package/dist/ink/screen.d.ts +0 -270
- package/dist/ink/screen.d.ts.map +0 -1
- package/dist/ink/screen.js +0 -1194
- package/dist/ink/screen.js.map +0 -1
- package/dist/ink/searchHighlight.d.ts +0 -21
- package/dist/ink/searchHighlight.d.ts.map +0 -1
- package/dist/ink/searchHighlight.js +0 -82
- package/dist/ink/searchHighlight.js.map +0 -1
- package/dist/ink/selection.d.ts +0 -230
- package/dist/ink/selection.d.ts.map +0 -1
- package/dist/ink/selection.js +0 -814
- package/dist/ink/selection.js.map +0 -1
- package/dist/ink/squash-text-nodes.d.ts +0 -23
- package/dist/ink/squash-text-nodes.d.ts.map +0 -1
- package/dist/ink/squash-text-nodes.js +0 -60
- package/dist/ink/squash-text-nodes.js.map +0 -1
- package/dist/ink/stringWidth.d.ts +0 -2
- package/dist/ink/stringWidth.d.ts.map +0 -1
- package/dist/ink/stringWidth.js +0 -207
- package/dist/ink/stringWidth.js.map +0 -1
- package/dist/ink/styles.d.ts +0 -307
- package/dist/ink/styles.d.ts.map +0 -1
- package/dist/ink/styles.js +0 -302
- package/dist/ink/styles.js.map +0 -1
- package/dist/ink/supports-hyperlinks.d.ts +0 -14
- package/dist/ink/supports-hyperlinks.d.ts.map +0 -1
- package/dist/ink/supports-hyperlinks.js +0 -48
- package/dist/ink/supports-hyperlinks.js.map +0 -1
- package/dist/ink/tabstops.d.ts +0 -2
- package/dist/ink/tabstops.d.ts.map +0 -1
- package/dist/ink/tabstops.js +0 -43
- package/dist/ink/tabstops.js.map +0 -1
- package/dist/ink/terminal-focus-state.d.ts +0 -7
- package/dist/ink/terminal-focus-state.d.ts.map +0 -1
- package/dist/ink/terminal-focus-state.js +0 -43
- package/dist/ink/terminal-focus-state.js.map +0 -1
- package/dist/ink/terminal-querier.d.ts +0 -130
- package/dist/ink/terminal-querier.d.ts.map +0 -1
- package/dist/ink/terminal-querier.js +0 -184
- package/dist/ink/terminal-querier.js.map +0 -1
- package/dist/ink/terminal.d.ts +0 -56
- package/dist/ink/terminal.d.ts.map +0 -1
- package/dist/ink/terminal.js +0 -249
- package/dist/ink/terminal.js.map +0 -1
- package/dist/ink/termio/csi.d.ts +0 -166
- package/dist/ink/termio/csi.d.ts.map +0 -1
- package/dist/ink/termio/csi.js +0 -285
- package/dist/ink/termio/csi.js.map +0 -1
- package/dist/ink/termio/dec.d.ts +0 -38
- package/dist/ink/termio/dec.d.ts.map +0 -1
- package/dist/ink/termio/dec.js +0 -59
- package/dist/ink/termio/dec.js.map +0 -1
- package/dist/ink/termio.d.ts +0 -25
- package/dist/ink/termio.d.ts.map +0 -1
- package/dist/ink/termio.js +0 -32
- package/dist/ink/termio.js.map +0 -1
- package/dist/ink/useTerminalNotification.d.ts +0 -27
- package/dist/ink/useTerminalNotification.d.ts.map +0 -1
- package/dist/ink/useTerminalNotification.js +0 -62
- package/dist/ink/useTerminalNotification.js.map +0 -1
- package/dist/ink/warn.d.ts +0 -2
- package/dist/ink/warn.d.ts.map +0 -1
- package/dist/ink/warn.js +0 -14
- package/dist/ink/warn.js.map +0 -1
- package/dist/ink/widest-line.d.ts +0 -2
- package/dist/ink/widest-line.d.ts.map +0 -1
- package/dist/ink/widest-line.js +0 -18
- package/dist/ink/widest-line.js.map +0 -1
- package/dist/ink/wrap-text.d.ts +0 -3
- package/dist/ink/wrap-text.d.ts.map +0 -1
- package/dist/ink/wrap-text.js +0 -61
- package/dist/ink/wrap-text.js.map +0 -1
- package/dist/ink/wrapAnsi.d.ts +0 -8
- package/dist/ink/wrapAnsi.d.ts.map +0 -1
- package/dist/ink/wrapAnsi.js +0 -13
- package/dist/ink/wrapAnsi.js.map +0 -1
- package/dist/ink-ui/components/TerminalCursor.d.ts +0 -15
- package/dist/ink-ui/components/TerminalCursor.d.ts.map +0 -1
- package/dist/ink-ui/components/TerminalCursor.js +0 -49
- package/dist/ink-ui/components/TerminalCursor.js.map +0 -1
- package/dist/ink-ui/runtime/stdout.d.ts +0 -11
- package/dist/ink-ui/runtime/stdout.d.ts.map +0 -1
- package/dist/ink-ui/runtime/stdout.js +0 -82
- package/dist/ink-ui/runtime/stdout.js.map +0 -1
- package/dist/runtime/goal-coordinator.d.ts +0 -66
- package/dist/runtime/goal-coordinator.d.ts.map +0 -1
- package/dist/runtime/goal-coordinator.js +0 -200
- package/dist/runtime/goal-coordinator.js.map +0 -1
- package/dist/screens/REPL.d.ts +0 -21
- package/dist/screens/REPL.d.ts.map +0 -1
- package/dist/screens/REPL.js +0 -139
- package/dist/screens/REPL.js.map +0 -1
- package/dist/services/goal-sidecar.d.ts +0 -96
- package/dist/services/goal-sidecar.d.ts.map +0 -1
- package/dist/services/goal-sidecar.js +0 -145
- package/dist/services/goal-sidecar.js.map +0 -1
- package/dist/tools/goal.d.ts +0 -17
- package/dist/tools/goal.d.ts.map +0 -1
- package/dist/tools/goal.js +0 -191
- package/dist/tools/goal.js.map +0 -1
- package/dist/ui/ink/components/App.d.ts +0 -6
- package/dist/ui/ink/components/App.d.ts.map +0 -1
- package/dist/ui/ink/components/App.js +0 -38
- package/dist/ui/ink/components/App.js.map +0 -1
- package/dist/ui/ink/components/CommandPanel.d.ts +0 -13
- package/dist/ui/ink/components/CommandPanel.d.ts.map +0 -1
- package/dist/ui/ink/components/CommandPanel.js +0 -41
- package/dist/ui/ink/components/CommandPanel.js.map +0 -1
- package/dist/ui/ink/components/InputLine.d.ts +0 -8
- package/dist/ui/ink/components/InputLine.d.ts.map +0 -1
- package/dist/ui/ink/components/InputLine.js +0 -15
- package/dist/ui/ink/components/InputLine.js.map +0 -1
- package/dist/ui/ink/components/StatusBar.d.ts +0 -9
- package/dist/ui/ink/components/StatusBar.d.ts.map +0 -1
- package/dist/ui/ink/components/StatusBar.js +0 -18
- package/dist/ui/ink/components/StatusBar.js.map +0 -1
- package/dist/ui/ink/components/index.d.ts +0 -5
- package/dist/ui/ink/components/index.d.ts.map +0 -1
- package/dist/ui/ink/components/index.js +0 -5
- package/dist/ui/ink/components/index.js.map +0 -1
- package/dist/utils/chalk.d.ts +0 -9
- package/dist/utils/chalk.d.ts.map +0 -1
- package/dist/utils/chalk.js +0 -16
- package/dist/utils/chalk.js.map +0 -1
package/dist/commands/index.js
CHANGED
|
@@ -168,9 +168,9 @@ function formatLoopStatsLines(stats, detail = false) {
|
|
|
168
168
|
];
|
|
169
169
|
lines.push(`Verify ${verificationParts.join(' ')}`);
|
|
170
170
|
}
|
|
171
|
-
if (typeof stats.loopBudgetMaxLlmRequests === 'number'
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
if (typeof stats.loopBudgetMaxLlmRequests === 'number' ||
|
|
172
|
+
typeof stats.loopBudgetMaxToolCalls === 'number' ||
|
|
173
|
+
typeof stats.loopBudgetMaxModelVisibleBytes === 'number') {
|
|
174
174
|
const caps = [
|
|
175
175
|
typeof stats.loopBudgetMaxLlmRequests === 'number'
|
|
176
176
|
? `${stats.llmRequests}/${stats.loopBudgetMaxLlmRequests} LLM`
|
|
@@ -386,7 +386,9 @@ function formatTraceEventLine(event) {
|
|
|
386
386
|
event.providerLastRetryErrorType
|
|
387
387
|
? `last=${event.providerLastRetryErrorType}${event.providerLastRetryStatus ? `/${event.providerLastRetryStatus}` : ''}`
|
|
388
388
|
: '',
|
|
389
|
-
event.providerRetryErrorTypes?.length
|
|
389
|
+
event.providerRetryErrorTypes?.length
|
|
390
|
+
? `types=${event.providerRetryErrorTypes.join(',')}`
|
|
391
|
+
: '',
|
|
390
392
|
event.providerFinalModel ? `final=${event.providerFinalModel}` : '',
|
|
391
393
|
].filter(Boolean);
|
|
392
394
|
return `${prefix} ${parts.join(' ')}`;
|
|
@@ -394,7 +396,7 @@ function formatTraceEventLine(event) {
|
|
|
394
396
|
case 'provider_fallback': {
|
|
395
397
|
const path = event.providerFallbackFromModel && event.providerFallbackToModel
|
|
396
398
|
? `${event.providerFallbackFromModel}->${event.providerFallbackToModel}`
|
|
397
|
-
: event.providerFinalModel ?? 'active';
|
|
399
|
+
: (event.providerFinalModel ?? 'active');
|
|
398
400
|
const parts = [
|
|
399
401
|
`count=${event.providerFallbackCount ?? 0}`,
|
|
400
402
|
`path=${path}`,
|
|
@@ -464,13 +466,13 @@ function formatTraceEventLine(event) {
|
|
|
464
466
|
`llm=${typeof event.llmRequests === 'number' ? event.llmRequests : 'unknown'}`,
|
|
465
467
|
`tools=${typeof event.toolCalls === 'number' ? event.toolCalls : 'unknown'}`,
|
|
466
468
|
];
|
|
467
|
-
if (event.loopBudgetSource
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
if (event.loopBudgetSource ||
|
|
470
|
+
typeof event.loopBudgetMaxLlmRequests === 'number' ||
|
|
471
|
+
typeof event.loopBudgetMaxToolCalls === 'number' ||
|
|
472
|
+
typeof event.loopBudgetMaxModelVisibleBytes === 'number') {
|
|
471
473
|
const source = event.loopBudgetSource === 'config' && event.loopBudgetBaseProfile
|
|
472
474
|
? `config/${event.loopBudgetBaseProfile}`
|
|
473
|
-
: event.loopBudgetSource ?? 'unknown';
|
|
475
|
+
: (event.loopBudgetSource ?? 'unknown');
|
|
474
476
|
const caps = [
|
|
475
477
|
typeof event.loopBudgetMaxLlmRequests === 'number'
|
|
476
478
|
? `${typeof event.llmRequests === 'number' ? event.llmRequests : '?'}/${event.loopBudgetMaxLlmRequests}llm`
|
|
@@ -503,7 +505,9 @@ function formatTraceEventLine(event) {
|
|
|
503
505
|
case 'workspace_snapshot': {
|
|
504
506
|
const state = event.workspaceGitAvailable === false
|
|
505
507
|
? WARN('not-git')
|
|
506
|
-
: event.workspaceDirty
|
|
508
|
+
: event.workspaceDirty
|
|
509
|
+
? WARN('dirty')
|
|
510
|
+
: SUCCESS('clean');
|
|
507
511
|
const files = event.workspaceFiles?.length
|
|
508
512
|
? ` files=${event.workspaceFiles.slice(0, 6).join(', ')}${event.workspaceFiles.length > 6 ? ', ...' : ''}`
|
|
509
513
|
: '';
|
|
@@ -522,11 +526,21 @@ function formatTraceEventLine(event) {
|
|
|
522
526
|
`resolved=${resolved.length}`,
|
|
523
527
|
];
|
|
524
528
|
const details = [
|
|
525
|
-
added.length
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
529
|
+
added.length
|
|
530
|
+
? `new: ${added.slice(0, 6).join(', ')}${added.length > 6 ? ', ...' : ''}`
|
|
531
|
+
: '',
|
|
532
|
+
changed.length
|
|
533
|
+
? `changed: ${changed.slice(0, 6).join(', ')}${changed.length > 6 ? ', ...' : ''}`
|
|
534
|
+
: '',
|
|
535
|
+
modifiedPreExisting.length
|
|
536
|
+
? `pre-existing modified: ${modifiedPreExisting.slice(0, 6).join(', ')}${modifiedPreExisting.length > 6 ? ', ...' : ''}`
|
|
537
|
+
: '',
|
|
538
|
+
resolved.length
|
|
539
|
+
? `resolved: ${resolved.slice(0, 6).join(', ')}${resolved.length > 6 ? ', ...' : ''}`
|
|
540
|
+
: '',
|
|
541
|
+
]
|
|
542
|
+
.filter(Boolean)
|
|
543
|
+
.join(' | ');
|
|
530
544
|
return `${prefix} ${parts.join(' ')}${details ? ` ${DIM(details)}` : ''}${event.note ? ` ${DIM(event.note)}` : ''}`;
|
|
531
545
|
}
|
|
532
546
|
case 'verification_profile': {
|
|
@@ -617,7 +631,10 @@ function latestToolTrace(events) {
|
|
|
617
631
|
const call = event.type === 'tool_call'
|
|
618
632
|
? event
|
|
619
633
|
: callId
|
|
620
|
-
? events
|
|
634
|
+
? events
|
|
635
|
+
.slice(0, index)
|
|
636
|
+
.reverse()
|
|
637
|
+
.find(candidate => candidate.type === 'tool_call' && candidate.callId === callId)
|
|
621
638
|
: undefined;
|
|
622
639
|
return { call, result };
|
|
623
640
|
}
|
|
@@ -776,9 +793,7 @@ function handleLastTool(ctx, args = '') {
|
|
|
776
793
|
for (const pair of pairs.slice(-30)) {
|
|
777
794
|
const source = pair.result ?? pair.call;
|
|
778
795
|
const name = source?.name ?? 'tool';
|
|
779
|
-
const status = pair.result
|
|
780
|
-
? (pair.result.success === false ? '✗' : '✓')
|
|
781
|
-
: '…';
|
|
796
|
+
const status = pair.result ? (pair.result.success === false ? '✗' : '✓') : '…';
|
|
782
797
|
const duration = typeof pair.result?.duration === 'number'
|
|
783
798
|
? ` (${formatDurationMs(pair.result.duration)})`
|
|
784
799
|
: '';
|
|
@@ -796,7 +811,11 @@ function handleLastTool(ctx, args = '') {
|
|
|
796
811
|
const name = source?.name ?? 'tool';
|
|
797
812
|
const inputLabel = lastToolInputLabel(name);
|
|
798
813
|
const callId = source?.callId ?? call?.callId;
|
|
799
|
-
const status = result
|
|
814
|
+
const status = result
|
|
815
|
+
? result.success === false
|
|
816
|
+
? ERROR('error')
|
|
817
|
+
: SUCCESS('ok')
|
|
818
|
+
: WARN('running');
|
|
800
819
|
// Resolve sequence number from the trace events
|
|
801
820
|
let seqLabel = '';
|
|
802
821
|
if (options.ref && /^#?\d+$/.test(options.ref)) {
|
|
@@ -958,7 +977,10 @@ function handleCheckpoint(ctx, args = '') {
|
|
|
958
977
|
}
|
|
959
978
|
for (const checkpoint of checkpoints.slice(0, 20)) {
|
|
960
979
|
console.log(`${ACCENT(checkpoint.turnId)} ${DIM(formatDateTime(checkpoint.createdAt))}`);
|
|
961
|
-
const files = checkpoint.files
|
|
980
|
+
const files = checkpoint.files
|
|
981
|
+
.map(file => file.path)
|
|
982
|
+
.slice(0, 8)
|
|
983
|
+
.join(', ');
|
|
962
984
|
console.log(` ${DIM(`${checkpoint.files.length} file(s)${files ? `: ${files}` : ''}`)}`);
|
|
963
985
|
}
|
|
964
986
|
console.log();
|
|
@@ -977,9 +999,7 @@ function handleCheckpoint(ctx, args = '') {
|
|
|
977
999
|
}
|
|
978
1000
|
const { checkpoint, ambiguous } = findCheckpointByRef(ctx, ref);
|
|
979
1001
|
if (!checkpoint) {
|
|
980
|
-
console.log(ERROR(ambiguous
|
|
981
|
-
? `Checkpoint prefix is ambiguous: ${ref}`
|
|
982
|
-
: `Checkpoint not found: ${ref}`));
|
|
1002
|
+
console.log(ERROR(ambiguous ? `Checkpoint prefix is ambiguous: ${ref}` : `Checkpoint not found: ${ref}`));
|
|
983
1003
|
console.log(DIM('Run /checkpoint to list available checkpoint ids.'));
|
|
984
1004
|
return { success: false };
|
|
985
1005
|
}
|
|
@@ -1417,7 +1437,10 @@ function normalizePermissionMode(raw) {
|
|
|
1417
1437
|
const value = raw.trim().toLowerCase();
|
|
1418
1438
|
if (!value)
|
|
1419
1439
|
return null;
|
|
1420
|
-
if (value === 'accept' ||
|
|
1440
|
+
if (value === 'accept' ||
|
|
1441
|
+
value === 'acceptedits' ||
|
|
1442
|
+
value === 'accept-edits' ||
|
|
1443
|
+
value === 'edit') {
|
|
1421
1444
|
return 'acceptEdits';
|
|
1422
1445
|
}
|
|
1423
1446
|
if (value === 'default' || value === 'ask')
|
|
@@ -1445,9 +1468,7 @@ function handleMode(ctx, args) {
|
|
|
1445
1468
|
console.log();
|
|
1446
1469
|
return { success: true };
|
|
1447
1470
|
}
|
|
1448
|
-
const next = trimmed === 'next'
|
|
1449
|
-
? (0, types_1.getNextPermissionMode)(current)
|
|
1450
|
-
: normalizePermissionMode(trimmed);
|
|
1471
|
+
const next = trimmed === 'next' ? (0, types_1.getNextPermissionMode)(current) : normalizePermissionMode(trimmed);
|
|
1451
1472
|
if (!next || !types_1.PERMISSION_MODES.includes(next)) {
|
|
1452
1473
|
return {
|
|
1453
1474
|
success: false,
|
|
@@ -1481,10 +1502,14 @@ function handleTask(ctx, args) {
|
|
|
1481
1502
|
if (tasks.length > 0) {
|
|
1482
1503
|
console.log();
|
|
1483
1504
|
for (const t of tasks) {
|
|
1484
|
-
const statusIcon = t.status === 'completed'
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1505
|
+
const statusIcon = t.status === 'completed'
|
|
1506
|
+
? SUCCESS('✓')
|
|
1507
|
+
: t.status === 'failed'
|
|
1508
|
+
? ERROR('✗')
|
|
1509
|
+
: t.status === 'running'
|
|
1510
|
+
? WARN('◌')
|
|
1511
|
+
: t.status === 'cancelled'
|
|
1512
|
+
? DIM('⊘')
|
|
1488
1513
|
: DIM('○');
|
|
1489
1514
|
console.log(` ${statusIcon} ${ACCENT(t.name)} ${DIM(`(${t.id.slice(0, 8)})`)}`);
|
|
1490
1515
|
console.log(` ${DIM(`[${t.priority}]`)} ${t.description.slice(0, 60)}`);
|
|
@@ -1583,7 +1608,9 @@ async function handleChat(ctx, input) {
|
|
|
1583
1608
|
console.log();
|
|
1584
1609
|
return { success: false };
|
|
1585
1610
|
}
|
|
1586
|
-
const activeSession = ctx.getSession?.() ??
|
|
1611
|
+
const activeSession = ctx.getSession?.() ??
|
|
1612
|
+
ctx.ensureSession?.() ??
|
|
1613
|
+
(ctx.sessionId ? (0, session_storage_1.loadSessionMeta)(ctx.sessionId) : null);
|
|
1587
1614
|
const sessionId = activeSession?.id ?? ctx.sessionId;
|
|
1588
1615
|
const runtimeTools = (0, tools_1.getRuntimeTools)();
|
|
1589
1616
|
const skillResolution = (0, skills_1.resolveSkillsForTurn)({
|
|
@@ -1693,7 +1720,10 @@ async function handleChat(ctx, input) {
|
|
|
1693
1720
|
},
|
|
1694
1721
|
};
|
|
1695
1722
|
try {
|
|
1696
|
-
const messages = [
|
|
1723
|
+
const messages = [
|
|
1724
|
+
{ role: 'system', content: systemPrompt },
|
|
1725
|
+
...snapshot.conversationHistory,
|
|
1726
|
+
];
|
|
1697
1727
|
for await (const event of (0, framework_1.query)({
|
|
1698
1728
|
messages,
|
|
1699
1729
|
tools: skillResolution.tools,
|
|
@@ -1839,7 +1869,9 @@ async function handleChat(ctx, input) {
|
|
|
1839
1869
|
const stats = [
|
|
1840
1870
|
finalUsage ? `tokens: ${finalUsage.promptTokens}+${finalUsage.completionTokens}` : '',
|
|
1841
1871
|
finalModel ? finalModel : '',
|
|
1842
|
-
]
|
|
1872
|
+
]
|
|
1873
|
+
.filter(Boolean)
|
|
1874
|
+
.join(' ');
|
|
1843
1875
|
if (stats) {
|
|
1844
1876
|
writeLine(DIM(stats));
|
|
1845
1877
|
}
|
|
@@ -1982,13 +2014,13 @@ function handleSkill(ctx, args) {
|
|
|
1982
2014
|
const registry = (0, skills_1.getSkillsRegistry)();
|
|
1983
2015
|
registry.initialize();
|
|
1984
2016
|
if (!trimmed) {
|
|
1985
|
-
const names = registry
|
|
2017
|
+
const names = registry
|
|
2018
|
+
.getAllSkills()
|
|
2019
|
+
.map(skill => skill.name)
|
|
2020
|
+
.sort();
|
|
1986
2021
|
return {
|
|
1987
2022
|
success: false,
|
|
1988
|
-
error: [
|
|
1989
|
-
'Usage: /skill <name> <task>',
|
|
1990
|
-
`Loaded skills: ${names.join(', ') || 'none'}`,
|
|
1991
|
-
].join('\n'),
|
|
2023
|
+
error: ['Usage: /skill <name> <task>', `Loaded skills: ${names.join(', ') || 'none'}`].join('\n'),
|
|
1992
2024
|
};
|
|
1993
2025
|
}
|
|
1994
2026
|
const parsed = (0, skills_1.parseSkillCommandInput)(`/skill ${trimmed}`);
|
|
@@ -2001,11 +2033,13 @@ function handleSkill(ctx, args) {
|
|
|
2001
2033
|
error: `Invalid skill reference: ${parsed.skillPath}`,
|
|
2002
2034
|
};
|
|
2003
2035
|
}
|
|
2004
|
-
const skill = referencedSkill ||
|
|
2005
|
-
|
|
2006
|
-
|
|
2036
|
+
const skill = referencedSkill ||
|
|
2037
|
+
registry
|
|
2038
|
+
.getAllSkills()
|
|
2039
|
+
.find(candidate => (0, skills_1.skillActivationNames)(candidate).some(name => (0, skills_1.normalizeRequestedSkillName)(name) === requestedName));
|
|
2007
2040
|
if (!skill) {
|
|
2008
|
-
const suggestions = registry
|
|
2041
|
+
const suggestions = registry
|
|
2042
|
+
.getAllSkills()
|
|
2009
2043
|
.map(candidate => candidate.name)
|
|
2010
2044
|
.filter(name => name.includes(requestedName) || requestedName.includes(name))
|
|
2011
2045
|
.slice(0, 5);
|
|
@@ -2035,7 +2069,9 @@ function handleSkill(ctx, args) {
|
|
|
2035
2069
|
skillFile ? `SKILL.md ${skillFile}` : '',
|
|
2036
2070
|
resourceRoot ? `Root ${resourceRoot}` : '',
|
|
2037
2071
|
`Use: /skill ${usageSelector} <task>`,
|
|
2038
|
-
]
|
|
2072
|
+
]
|
|
2073
|
+
.filter(Boolean)
|
|
2074
|
+
.join('\n'),
|
|
2039
2075
|
};
|
|
2040
2076
|
}
|
|
2041
2077
|
return {
|
|
@@ -2080,54 +2116,103 @@ function handleDoctor(ctx) {
|
|
|
2080
2116
|
return { success: !(0, doctor_1.hasDoctorFailures)(report) };
|
|
2081
2117
|
}
|
|
2082
2118
|
function handleStorage(_ctx, args) {
|
|
2119
|
+
const usage = '/storage [doctor|status|repair [--dry-run|--yes] [--plan=<token>]|cleanup [--dry-run|--yes] [--plan=<token>]]';
|
|
2083
2120
|
const trimmed = args.trim();
|
|
2084
|
-
const
|
|
2085
|
-
const
|
|
2121
|
+
const tokens = trimmed ? trimmed.split(/\s+/u) : [];
|
|
2122
|
+
const action = tokens[0] ?? 'doctor';
|
|
2123
|
+
const flags = tokens.slice(1);
|
|
2124
|
+
const acceptsMutationFlags = action === 'cleanup' || action === 'repair';
|
|
2125
|
+
const planFlags = flags.filter(flag => flag.startsWith('--plan='));
|
|
2126
|
+
const invalidTokens = flags.filter(flag => !acceptsMutationFlags ||
|
|
2127
|
+
(flag !== '--dry-run' && flag !== '--yes' && !flag.startsWith('--plan=')) ||
|
|
2128
|
+
(flag.startsWith('--plan=') && flag.length === '--plan='.length));
|
|
2129
|
+
if (planFlags.length > 1)
|
|
2130
|
+
invalidTokens.push(...planFlags.slice(1));
|
|
2131
|
+
if (invalidTokens.length > 0) {
|
|
2132
|
+
return {
|
|
2133
|
+
success: false,
|
|
2134
|
+
error: `Unknown /storage option: ${invalidTokens.join(', ')}. Usage: ${usage}`,
|
|
2135
|
+
};
|
|
2136
|
+
}
|
|
2137
|
+
const confirmed = flags.includes('--yes');
|
|
2138
|
+
const explicitDryRun = flags.includes('--dry-run');
|
|
2139
|
+
const planToken = planFlags[0]?.slice('--plan='.length);
|
|
2140
|
+
const decodedPlan = planToken ? (0, storage_maintenance_1.deserializeStorageMaintenancePlan)(planToken) : undefined;
|
|
2141
|
+
if (planToken && !decodedPlan) {
|
|
2142
|
+
return { success: false, error: `Invalid or corrupted storage plan token. Usage: ${usage}` };
|
|
2143
|
+
}
|
|
2086
2144
|
if (action === 'cleanup') {
|
|
2087
|
-
|
|
2088
|
-
|
|
2145
|
+
if (decodedPlan && decodedPlan.kind !== 'cleanup') {
|
|
2146
|
+
return { success: false, error: 'The supplied storage plan is not a cleanup plan.' };
|
|
2147
|
+
}
|
|
2148
|
+
const dryRun = explicitDryRun || !confirmed;
|
|
2149
|
+
if (!dryRun && !decodedPlan) {
|
|
2150
|
+
return {
|
|
2151
|
+
success: false,
|
|
2152
|
+
error: 'Cleanup requires the exact preview plan. Run /storage cleanup first.',
|
|
2153
|
+
};
|
|
2154
|
+
}
|
|
2155
|
+
const consumedPlan = !dryRun && planToken ? (0, storage_maintenance_1.consumeStorageMaintenancePlan)(planToken) : undefined;
|
|
2156
|
+
if (!dryRun && (!consumedPlan || consumedPlan.kind !== 'cleanup')) {
|
|
2157
|
+
return {
|
|
2158
|
+
success: false,
|
|
2159
|
+
error: 'The storage cleanup plan expired, was already used, or is not valid in this process.',
|
|
2160
|
+
};
|
|
2161
|
+
}
|
|
2162
|
+
const plan = dryRun
|
|
2163
|
+
? decodedPlan?.kind === 'cleanup'
|
|
2164
|
+
? decodedPlan.plan
|
|
2165
|
+
: (0, storage_maintenance_1.collectStorageCleanupPlan)()
|
|
2166
|
+
: consumedPlan
|
|
2167
|
+
.plan;
|
|
2168
|
+
const result = (0, storage_maintenance_1.cleanupStorage)({ dryRun }, plan);
|
|
2089
2169
|
console.log();
|
|
2090
2170
|
console.log((0, storage_maintenance_1.formatStorageCleanupResult)(result));
|
|
2091
|
-
if (
|
|
2092
|
-
|
|
2171
|
+
if (dryRun) {
|
|
2172
|
+
const portablePlan = planToken ?? (0, storage_maintenance_1.serializeStorageMaintenancePlan)({ kind: 'cleanup', plan });
|
|
2173
|
+
console.log(DIM(`Preview only. Run /storage cleanup --plan=${portablePlan} --yes to apply this plan.`));
|
|
2093
2174
|
}
|
|
2094
2175
|
console.log();
|
|
2095
2176
|
return { success: true };
|
|
2096
2177
|
}
|
|
2097
2178
|
if (action === 'repair') {
|
|
2098
|
-
if (
|
|
2099
|
-
|
|
2100
|
-
|
|
2179
|
+
if (decodedPlan && decodedPlan.kind !== 'repair') {
|
|
2180
|
+
return { success: false, error: 'The supplied storage plan is not a repair plan.' };
|
|
2181
|
+
}
|
|
2182
|
+
const plan = decodedPlan?.kind === 'repair' ? decodedPlan.plan : (0, storage_maintenance_1.collectProjectMetadataRepairPlan)();
|
|
2183
|
+
if (explicitDryRun || !confirmed) {
|
|
2101
2184
|
console.log();
|
|
2102
2185
|
console.log(HEADER('Orion Code Storage Repair Preview'));
|
|
2103
2186
|
console.log(DIM('─'.repeat(40)));
|
|
2104
|
-
console.log(` Repairable metadata entries ${ACCENT(String(
|
|
2105
|
-
for (const
|
|
2106
|
-
console.log(` ${DIM('•')} ${DIM(
|
|
2187
|
+
console.log(` Repairable metadata entries ${ACCENT(String(plan.actions.length))}`);
|
|
2188
|
+
for (const action of plan.actions.slice(0, 12)) {
|
|
2189
|
+
console.log(` ${DIM('•')} ${DIM(action.metadataPath)}`);
|
|
2107
2190
|
}
|
|
2108
|
-
|
|
2191
|
+
const portablePlan = planToken ?? (0, storage_maintenance_1.serializeStorageMaintenancePlan)({ kind: 'repair', plan });
|
|
2192
|
+
console.log(DIM(` Preview only. Writable repair is disabled; /storage repair --plan=${portablePlan} --yes will fail closed.`));
|
|
2109
2193
|
console.log();
|
|
2110
2194
|
return { success: true };
|
|
2111
2195
|
}
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
console.log(` Skipped ${DIM(String(result.skipped.length))}`);
|
|
2118
|
-
for (const project of result.repaired.slice(0, 12)) {
|
|
2119
|
-
console.log(` ${SUCCESS('✓')} ${DIM(project)}`);
|
|
2196
|
+
if (!decodedPlan) {
|
|
2197
|
+
return {
|
|
2198
|
+
success: false,
|
|
2199
|
+
error: 'Repair requires the exact preview plan. Run /storage repair first.',
|
|
2200
|
+
};
|
|
2120
2201
|
}
|
|
2121
|
-
|
|
2122
|
-
|
|
2202
|
+
const consumedPlan = planToken ? (0, storage_maintenance_1.consumeStorageMaintenancePlan)(planToken) : undefined;
|
|
2203
|
+
if (!consumedPlan || consumedPlan.kind !== 'repair') {
|
|
2204
|
+
return {
|
|
2205
|
+
success: false,
|
|
2206
|
+
error: 'The storage repair plan expired, was already used, or is not valid in this process.',
|
|
2207
|
+
};
|
|
2123
2208
|
}
|
|
2124
|
-
|
|
2125
|
-
return { success:
|
|
2209
|
+
const result = (0, storage_maintenance_1.repairProjectMetadata)(consumedPlan.plan);
|
|
2210
|
+
return { success: false, error: result.blockedReason };
|
|
2126
2211
|
}
|
|
2127
2212
|
if (action !== 'doctor' && action !== 'status') {
|
|
2128
2213
|
return {
|
|
2129
2214
|
success: false,
|
|
2130
|
-
error:
|
|
2215
|
+
error: `Usage: ${usage}`,
|
|
2131
2216
|
};
|
|
2132
2217
|
}
|
|
2133
2218
|
const report = (0, storage_maintenance_1.collectStorageReport)();
|
|
@@ -2155,9 +2240,7 @@ function handleCommitPlan(ctx, args) {
|
|
|
2155
2240
|
return { success: plan.diff.isGitRepo };
|
|
2156
2241
|
}
|
|
2157
2242
|
function handleTools(ctx) {
|
|
2158
|
-
const tools = ctx.store.getSnapshot().tools.length > 0
|
|
2159
|
-
? ctx.store.getSnapshot().tools
|
|
2160
|
-
: (0, tools_1.getRuntimeTools)();
|
|
2243
|
+
const tools = ctx.store.getSnapshot().tools.length > 0 ? ctx.store.getSnapshot().tools : (0, tools_1.getRuntimeTools)();
|
|
2161
2244
|
const staticTools = tools.filter(tool => !tool.name.startsWith('mcp__'));
|
|
2162
2245
|
const mcpTools = tools.filter(tool => tool.name.startsWith('mcp__'));
|
|
2163
2246
|
console.log();
|
|
@@ -2190,8 +2273,10 @@ function handleTodos(ctx) {
|
|
|
2190
2273
|
return { success: true };
|
|
2191
2274
|
}
|
|
2192
2275
|
for (const todo of todos) {
|
|
2193
|
-
const marker = todo.status === 'completed'
|
|
2194
|
-
|
|
2276
|
+
const marker = todo.status === 'completed'
|
|
2277
|
+
? SUCCESS('✓')
|
|
2278
|
+
: todo.status === 'in_progress'
|
|
2279
|
+
? WARN('›')
|
|
2195
2280
|
: DIM('○');
|
|
2196
2281
|
console.log(` ${marker} ${todo.content}`);
|
|
2197
2282
|
if (todo.activeForm && todo.activeForm !== todo.content) {
|
|
@@ -2250,13 +2335,14 @@ async function handleCompact(ctx, args) {
|
|
|
2250
2335
|
console.log(DIM((0, agent_status_1.compactStatus)()));
|
|
2251
2336
|
try {
|
|
2252
2337
|
const modelId = ctx.llm?.getModel() ?? ctx.store.getSnapshot().currentModel;
|
|
2253
|
-
const coordinator = ctx.compactCoordinator ??
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2338
|
+
const coordinator = ctx.compactCoordinator ??
|
|
2339
|
+
new coordinator_1.CompactCoordinator({
|
|
2340
|
+
modelId,
|
|
2341
|
+
llm: ctx.llm,
|
|
2342
|
+
outputReserveTokens: ctx.llm?.getMaxTokens?.(),
|
|
2343
|
+
getContextCapsule: () => ctx.store.getSnapshot().harnessState?.capsule,
|
|
2344
|
+
getHarnessState: () => ctx.store.getSnapshot().harnessState,
|
|
2345
|
+
});
|
|
2260
2346
|
coordinator.configure({
|
|
2261
2347
|
modelId,
|
|
2262
2348
|
llm: ctx.llm,
|
|
@@ -2470,9 +2556,7 @@ function handleSessions(ctx, args = '') {
|
|
|
2470
2556
|
const query = scope.query?.trim();
|
|
2471
2557
|
// If there's a search query, use the session index
|
|
2472
2558
|
if (query && !query.startsWith('--')) {
|
|
2473
|
-
const allSessions = scope.allProjects
|
|
2474
|
-
? (0, session_storage_1.listSessions)()
|
|
2475
|
-
: (0, session_storage_1.listProjectSessions)(scope.projectPath);
|
|
2559
|
+
const allSessions = scope.allProjects ? (0, session_storage_1.listSessions)() : (0, session_storage_1.listProjectSessions)(scope.projectPath);
|
|
2476
2560
|
const matchedIds = (0, session_index_1.searchSessions)(query, allSessions.map(session => ({
|
|
2477
2561
|
id: session.id,
|
|
2478
2562
|
projectPath: session.projectPath,
|
|
@@ -2489,12 +2573,18 @@ function handleSessions(ctx, args = '') {
|
|
|
2489
2573
|
}
|
|
2490
2574
|
// Rebuild session list in matched order
|
|
2491
2575
|
const sessionMap = new Map(allSessions.map(s => [s.id, s]));
|
|
2492
|
-
const matchedSessions = matchedIds
|
|
2576
|
+
const matchedSessions = matchedIds
|
|
2577
|
+
.map(id => sessionMap.get(id))
|
|
2578
|
+
.filter(Boolean);
|
|
2493
2579
|
console.log();
|
|
2494
2580
|
console.log(HEADER(`Sessions (search: "${query}") — ${matchedSessions.length} matches`));
|
|
2495
2581
|
console.log(DIM('─'.repeat(40)));
|
|
2496
2582
|
console.log();
|
|
2497
|
-
printSessionRows(matchedSessions, {
|
|
2583
|
+
printSessionRows(matchedSessions, {
|
|
2584
|
+
indexed: true,
|
|
2585
|
+
showProject: scope.allProjects,
|
|
2586
|
+
showIndexSummary: true,
|
|
2587
|
+
});
|
|
2498
2588
|
console.log();
|
|
2499
2589
|
console.log(DIM(`Searched ${allSessions.length} sessions, found ${matchedSessions.length} matches`));
|
|
2500
2590
|
console.log(DIM('Use /resume <number|session-id|name> to restore a session'));
|
|
@@ -2525,8 +2615,7 @@ function handleResume(ctx, args) {
|
|
|
2525
2615
|
const ui = commandUICapabilities(ctx);
|
|
2526
2616
|
const scope = parseSessionScopeArgs(args, ctx.cwd);
|
|
2527
2617
|
const sessionRef = scope.query;
|
|
2528
|
-
const scopedSessions = (scope.allProjects ? (0, session_storage_1.listSessions)() : (0, session_storage_1.listProjectSessions)(scope.projectPath))
|
|
2529
|
-
.filter(session => (session.messageCount ?? 0) > 0);
|
|
2618
|
+
const scopedSessions = (scope.allProjects ? (0, session_storage_1.listSessions)() : (0, session_storage_1.listProjectSessions)(scope.projectPath)).filter(session => (session.messageCount ?? 0) > 0);
|
|
2530
2619
|
if (!sessionRef) {
|
|
2531
2620
|
const lastSession = scopedSessions[0];
|
|
2532
2621
|
if (!lastSession) {
|
|
@@ -2564,14 +2653,18 @@ function handleResume(ctx, args) {
|
|
|
2564
2653
|
return restoreSession(ctx, scopedSessions[pickerIndex], false);
|
|
2565
2654
|
}
|
|
2566
2655
|
// Resume specific session
|
|
2567
|
-
const result = (0, session_storage_1.lookupSessionRef)(sessionRef, scope.projectPath, {
|
|
2656
|
+
const result = (0, session_storage_1.lookupSessionRef)(sessionRef, scope.projectPath, {
|
|
2657
|
+
allProjects: scope.allProjects,
|
|
2658
|
+
});
|
|
2568
2659
|
if (result.status === 'ambiguous') {
|
|
2569
2660
|
printSessionConflict(sessionRef, result.matches);
|
|
2570
2661
|
return { success: false };
|
|
2571
2662
|
}
|
|
2572
2663
|
if (result.status === 'not_found') {
|
|
2573
2664
|
console.log(ERROR(`Session not found: ${sessionRef}`));
|
|
2574
|
-
console.log(DIM(scope.allProjects
|
|
2665
|
+
console.log(DIM(scope.allProjects
|
|
2666
|
+
? 'Use /sessions --all to list sessions'
|
|
2667
|
+
: 'Use /sessions to list project sessions, or /resume <id> --all'));
|
|
2575
2668
|
console.log();
|
|
2576
2669
|
return { success: false };
|
|
2577
2670
|
}
|
|
@@ -2596,7 +2689,9 @@ function restoreSession(ctx, session, isLast) {
|
|
|
2596
2689
|
if (history.length > 0) {
|
|
2597
2690
|
const eventSummary = checkpoint?.summary.text ?? generateRestoredSessionEventSummary(history);
|
|
2598
2691
|
ctx.store.setState({ conversationHistory: history });
|
|
2599
|
-
ctx.store.setState({
|
|
2692
|
+
ctx.store.setState({
|
|
2693
|
+
harnessState: (0, session_storage_1.loadSessionHarnessState)(resumed.id) ?? resumed.harnessState,
|
|
2694
|
+
});
|
|
2600
2695
|
(0, framework_1.resetToolState)();
|
|
2601
2696
|
ctx.sessionRestored?.({
|
|
2602
2697
|
sessionId: resumed.id,
|
|
@@ -2674,7 +2769,9 @@ function handleSessionRename(ctx, args) {
|
|
|
2674
2769
|
console.log();
|
|
2675
2770
|
return { success: false };
|
|
2676
2771
|
}
|
|
2677
|
-
const scopedSessions = scope.allProjects
|
|
2772
|
+
const scopedSessions = scope.allProjects
|
|
2773
|
+
? (0, session_storage_1.listSessions)()
|
|
2774
|
+
: (0, session_storage_1.listProjectSessions)(scope.projectPath);
|
|
2678
2775
|
const pickerIndex = parsePickerIndex(ref, scopedSessions.length);
|
|
2679
2776
|
let session = pickerIndex !== null ? scopedSessions[pickerIndex] : null;
|
|
2680
2777
|
if (!session) {
|
|
@@ -2685,7 +2782,9 @@ function handleSessionRename(ctx, args) {
|
|
|
2685
2782
|
}
|
|
2686
2783
|
if (result.status === 'not_found') {
|
|
2687
2784
|
console.log(ERROR(`Session not found: ${ref}`));
|
|
2688
|
-
console.log(DIM(scope.allProjects
|
|
2785
|
+
console.log(DIM(scope.allProjects
|
|
2786
|
+
? 'Use /sessions --all to list sessions'
|
|
2787
|
+
: 'Use /sessions to list project sessions'));
|
|
2689
2788
|
console.log();
|
|
2690
2789
|
return { success: false };
|
|
2691
2790
|
}
|
|
@@ -2844,7 +2943,7 @@ const COMMANDS = [
|
|
|
2844
2943
|
name: 'target',
|
|
2845
2944
|
aliases: ['goal'],
|
|
2846
2945
|
description: 'Create, view, pause, resume, or clear a persistent goal target',
|
|
2847
|
-
argumentHint: '[objective | pause | resume | clear --yes | status | edit <text> | budget <tokens>]',
|
|
2946
|
+
argumentHint: '[objective | pause | resume | clear --yes | status | edit <text> | replace <text> | confirm <criterion-id> | budget <tokens>]',
|
|
2848
2947
|
category: 'workflow',
|
|
2849
2948
|
priority: 3,
|
|
2850
2949
|
type: 'builtin',
|
|
@@ -2921,7 +3020,7 @@ const COMMANDS = [
|
|
|
2921
3020
|
type: 'builtin',
|
|
2922
3021
|
execution: 'builtin',
|
|
2923
3022
|
risk: 'read-only',
|
|
2924
|
-
execute:
|
|
3023
|
+
execute: ctx => handleTodos(ctx),
|
|
2925
3024
|
},
|
|
2926
3025
|
// Sessions and context lifecycle
|
|
2927
3026
|
{
|
|
@@ -3014,7 +3113,7 @@ const COMMANDS = [
|
|
|
3014
3113
|
type: 'builtin',
|
|
3015
3114
|
execution: 'builtin',
|
|
3016
3115
|
risk: 'read-only',
|
|
3017
|
-
execute:
|
|
3116
|
+
execute: ctx => handleSkills(ctx),
|
|
3018
3117
|
},
|
|
3019
3118
|
{
|
|
3020
3119
|
name: 'skill',
|
|
@@ -3049,7 +3148,7 @@ const COMMANDS = [
|
|
|
3049
3148
|
type: 'builtin',
|
|
3050
3149
|
execution: 'builtin',
|
|
3051
3150
|
risk: 'read-only',
|
|
3052
|
-
execute:
|
|
3151
|
+
execute: ctx => handleTools(ctx),
|
|
3053
3152
|
},
|
|
3054
3153
|
{
|
|
3055
3154
|
name: 'edit-preview',
|
|
@@ -3059,7 +3158,7 @@ const COMMANDS = [
|
|
|
3059
3158
|
type: 'builtin',
|
|
3060
3159
|
execution: 'builtin',
|
|
3061
3160
|
risk: 'read-only',
|
|
3062
|
-
execute:
|
|
3161
|
+
execute: ctx => handleEditPreview(ctx),
|
|
3063
3162
|
},
|
|
3064
3163
|
{
|
|
3065
3164
|
name: 'mcp',
|
|
@@ -3069,7 +3168,7 @@ const COMMANDS = [
|
|
|
3069
3168
|
type: 'builtin',
|
|
3070
3169
|
execution: 'builtin',
|
|
3071
3170
|
risk: 'read-only',
|
|
3072
|
-
execute:
|
|
3171
|
+
execute: ctx => handleMcp(ctx),
|
|
3073
3172
|
},
|
|
3074
3173
|
{
|
|
3075
3174
|
name: 'safety',
|
|
@@ -3079,7 +3178,7 @@ const COMMANDS = [
|
|
|
3079
3178
|
type: 'builtin',
|
|
3080
3179
|
execution: 'builtin',
|
|
3081
3180
|
risk: 'read-only',
|
|
3082
|
-
execute:
|
|
3181
|
+
execute: ctx => showSafety(ctx),
|
|
3083
3182
|
},
|
|
3084
3183
|
// Model and runtime configuration
|
|
3085
3184
|
{
|
|
@@ -3113,7 +3212,7 @@ const COMMANDS = [
|
|
|
3113
3212
|
type: 'builtin',
|
|
3114
3213
|
execution: 'builtin',
|
|
3115
3214
|
risk: 'read-only',
|
|
3116
|
-
execute:
|
|
3215
|
+
execute: ctx => showConfig(ctx),
|
|
3117
3216
|
},
|
|
3118
3217
|
// System commands
|
|
3119
3218
|
{
|
|
@@ -3136,7 +3235,7 @@ const COMMANDS = [
|
|
|
3136
3235
|
type: 'builtin',
|
|
3137
3236
|
execution: 'builtin',
|
|
3138
3237
|
risk: 'read-only',
|
|
3139
|
-
execute:
|
|
3238
|
+
execute: ctx => showStatus(ctx),
|
|
3140
3239
|
},
|
|
3141
3240
|
{
|
|
3142
3241
|
name: 'clear',
|
|
@@ -3184,7 +3283,7 @@ const COMMANDS = [
|
|
|
3184
3283
|
type: 'builtin',
|
|
3185
3284
|
execution: 'builtin',
|
|
3186
3285
|
risk: 'state-write',
|
|
3187
|
-
execute:
|
|
3286
|
+
execute: ctx => handleExit(ctx),
|
|
3188
3287
|
},
|
|
3189
3288
|
// Diagnostics
|
|
3190
3289
|
{
|
|
@@ -3196,12 +3295,12 @@ const COMMANDS = [
|
|
|
3196
3295
|
type: 'builtin',
|
|
3197
3296
|
execution: 'builtin',
|
|
3198
3297
|
risk: 'read-only',
|
|
3199
|
-
execute:
|
|
3298
|
+
execute: ctx => handleDoctor(ctx),
|
|
3200
3299
|
},
|
|
3201
3300
|
{
|
|
3202
3301
|
name: 'storage',
|
|
3203
3302
|
description: 'Inspect, repair, or clean Orion Code storage layout',
|
|
3204
|
-
argumentHint: '[doctor|repair [--yes]|cleanup [--dry-run|--yes]]',
|
|
3303
|
+
argumentHint: '[doctor|repair [--dry-run|--yes] [--plan=<token>]|cleanup [--dry-run|--yes] [--plan=<token>]]',
|
|
3205
3304
|
category: 'diagnostics',
|
|
3206
3305
|
priority: 8,
|
|
3207
3306
|
type: 'builtin',
|
|
@@ -3218,7 +3317,7 @@ const COMMANDS = [
|
|
|
3218
3317
|
type: 'builtin',
|
|
3219
3318
|
execution: 'builtin',
|
|
3220
3319
|
risk: 'read-only',
|
|
3221
|
-
execute:
|
|
3320
|
+
execute: ctx => handleUsage(ctx),
|
|
3222
3321
|
},
|
|
3223
3322
|
{
|
|
3224
3323
|
name: 'loop-stats',
|
|
@@ -3229,7 +3328,7 @@ const COMMANDS = [
|
|
|
3229
3328
|
type: 'builtin',
|
|
3230
3329
|
execution: 'builtin',
|
|
3231
3330
|
risk: 'read-only',
|
|
3232
|
-
execute:
|
|
3331
|
+
execute: ctx => handleLoopStats(ctx),
|
|
3233
3332
|
},
|
|
3234
3333
|
{
|
|
3235
3334
|
name: 'trace',
|
|
@@ -3286,7 +3385,7 @@ const COMMANDS = [
|
|
|
3286
3385
|
execution: 'builtin',
|
|
3287
3386
|
risk: 'read-only',
|
|
3288
3387
|
deprecated: { since: 'v0.1.1', replacement: '/usage', removeIn: 'v0.3.0' },
|
|
3289
|
-
execute:
|
|
3388
|
+
execute: ctx => handleCost(ctx),
|
|
3290
3389
|
},
|
|
3291
3390
|
{
|
|
3292
3391
|
name: 'agents',
|
|
@@ -3297,7 +3396,7 @@ const COMMANDS = [
|
|
|
3297
3396
|
execution: 'builtin',
|
|
3298
3397
|
risk: 'read-only',
|
|
3299
3398
|
isHidden: true,
|
|
3300
|
-
execute:
|
|
3399
|
+
execute: ctx => showAgents(ctx),
|
|
3301
3400
|
},
|
|
3302
3401
|
{
|
|
3303
3402
|
name: 'migrate',
|
|
@@ -3355,8 +3454,8 @@ function getCommands() {
|
|
|
3355
3454
|
return sortCommands(COMMANDS);
|
|
3356
3455
|
}
|
|
3357
3456
|
function getVisibleCommands(renderer) {
|
|
3358
|
-
return sortCommands(COMMANDS.filter(command => !command.isHidden
|
|
3359
|
-
|
|
3457
|
+
return sortCommands(COMMANDS.filter(command => !command.isHidden &&
|
|
3458
|
+
(!renderer || !command.rendererScope || command.rendererScope.includes(renderer))));
|
|
3360
3459
|
}
|
|
3361
3460
|
function findCommand(name) {
|
|
3362
3461
|
return COMMANDS.find(c => c.name === name || c.aliases?.includes(name));
|