strands-darwin 0.0.3
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 +140 -0
- package/README.zh-CN.md +140 -0
- package/dist/patches/@strands-agents+sdk+1.16.0.patch +1443 -0
- package/dist/src/agent/background-delegation.d.ts +67 -0
- package/dist/src/agent/background-delegation.js +159 -0
- package/dist/src/agent/background-delegation.js.map +1 -0
- package/dist/src/agent/call-stats.d.ts +118 -0
- package/dist/src/agent/call-stats.js +128 -0
- package/dist/src/agent/call-stats.js.map +1 -0
- package/dist/src/agent/compact.d.ts +108 -0
- package/dist/src/agent/compact.js +192 -0
- package/dist/src/agent/compact.js.map +1 -0
- package/dist/src/agent/context-anchor.d.ts +64 -0
- package/dist/src/agent/context-anchor.js +43 -0
- package/dist/src/agent/context-anchor.js.map +1 -0
- package/dist/src/agent/cost.d.ts +56 -0
- package/dist/src/agent/cost.js +44 -0
- package/dist/src/agent/cost.js.map +1 -0
- package/dist/src/agent/diagnostics.d.ts +212 -0
- package/dist/src/agent/diagnostics.js +374 -0
- package/dist/src/agent/diagnostics.js.map +1 -0
- package/dist/src/agent/instructions.d.ts +54 -0
- package/dist/src/agent/instructions.js +118 -0
- package/dist/src/agent/instructions.js.map +1 -0
- package/dist/src/agent/max-tokens-recovery.d.ts +17 -0
- package/dist/src/agent/max-tokens-recovery.js +65 -0
- package/dist/src/agent/max-tokens-recovery.js.map +1 -0
- package/dist/src/agent/model-call-budget.d.ts +8 -0
- package/dist/src/agent/model-call-budget.js +24 -0
- package/dist/src/agent/model-call-budget.js.map +1 -0
- package/dist/src/agent/model-retry.d.ts +134 -0
- package/dist/src/agent/model-retry.js +256 -0
- package/dist/src/agent/model-retry.js.map +1 -0
- package/dist/src/agent/permission-rules.d.ts +47 -0
- package/dist/src/agent/permission-rules.js +260 -0
- package/dist/src/agent/permission-rules.js.map +1 -0
- package/dist/src/agent/permission.d.ts +361 -0
- package/dist/src/agent/permission.js +797 -0
- package/dist/src/agent/permission.js.map +1 -0
- package/dist/src/agent/prompt-cache.d.ts +66 -0
- package/dist/src/agent/prompt-cache.js +194 -0
- package/dist/src/agent/prompt-cache.js.map +1 -0
- package/dist/src/agent/refusal.d.ts +20 -0
- package/dist/src/agent/refusal.js +23 -0
- package/dist/src/agent/refusal.js.map +1 -0
- package/dist/src/agent/retry-guard.d.ts +26 -0
- package/dist/src/agent/retry-guard.js +193 -0
- package/dist/src/agent/retry-guard.js.map +1 -0
- package/dist/src/agent/rewind.d.ts +29 -0
- package/dist/src/agent/rewind.js +118 -0
- package/dist/src/agent/rewind.js.map +1 -0
- package/dist/src/agent/runtime.d.ts +814 -0
- package/dist/src/agent/runtime.js +1596 -0
- package/dist/src/agent/runtime.js.map +1 -0
- package/dist/src/agent/safety-classifier.d.ts +11 -0
- package/dist/src/agent/safety-classifier.js +0 -0
- package/dist/src/agent/safety-classifier.js.map +1 -0
- package/dist/src/agent/sdk-logging.d.ts +49 -0
- package/dist/src/agent/sdk-logging.js +110 -0
- package/dist/src/agent/sdk-logging.js.map +1 -0
- package/dist/src/agent/session.d.ts +102 -0
- package/dist/src/agent/session.js +244 -0
- package/dist/src/agent/session.js.map +1 -0
- package/dist/src/agent/stream-resumption.d.ts +16 -0
- package/dist/src/agent/stream-resumption.js +33 -0
- package/dist/src/agent/stream-resumption.js.map +1 -0
- package/dist/src/agent/system-prompt.d.ts +50 -0
- package/dist/src/agent/system-prompt.js +161 -0
- package/dist/src/agent/system-prompt.js.map +1 -0
- package/dist/src/agent/thinking.d.ts +99 -0
- package/dist/src/agent/thinking.js +145 -0
- package/dist/src/agent/thinking.js.map +1 -0
- package/dist/src/agent/usage.d.ts +132 -0
- package/dist/src/agent/usage.js +233 -0
- package/dist/src/agent/usage.js.map +1 -0
- package/dist/src/agent/working-context.d.ts +51 -0
- package/dist/src/agent/working-context.js +160 -0
- package/dist/src/agent/working-context.js.map +1 -0
- package/dist/src/agents/child-recipe.d.ts +33 -0
- package/dist/src/agents/child-recipe.js +98 -0
- package/dist/src/agents/child-recipe.js.map +1 -0
- package/dist/src/agents/concurrency-limit.d.ts +25 -0
- package/dist/src/agents/concurrency-limit.js +43 -0
- package/dist/src/agents/concurrency-limit.js.map +1 -0
- package/dist/src/agents/dispatch-registry.d.ts +180 -0
- package/dist/src/agents/dispatch-registry.js +289 -0
- package/dist/src/agents/dispatch-registry.js.map +1 -0
- package/dist/src/agents/failed-child-text.d.ts +44 -0
- package/dist/src/agents/failed-child-text.js +69 -0
- package/dist/src/agents/failed-child-text.js.map +1 -0
- package/dist/src/agents/loader.d.ts +26 -0
- package/dist/src/agents/loader.js +134 -0
- package/dist/src/agents/loader.js.map +1 -0
- package/dist/src/agents/report-projection.d.ts +31 -0
- package/dist/src/agents/report-projection.js +125 -0
- package/dist/src/agents/report-projection.js.map +1 -0
- package/dist/src/agents/subagent-tool.d.ts +61 -0
- package/dist/src/agents/subagent-tool.js +180 -0
- package/dist/src/agents/subagent-tool.js.map +1 -0
- package/dist/src/agents/workflow-tool.d.ts +85 -0
- package/dist/src/agents/workflow-tool.js +530 -0
- package/dist/src/agents/workflow-tool.js.map +1 -0
- package/dist/src/cli-args.d.ts +39 -0
- package/dist/src/cli-args.js +198 -0
- package/dist/src/cli-args.js.map +1 -0
- package/dist/src/cli-doctor.d.ts +26 -0
- package/dist/src/cli-doctor.js +398 -0
- package/dist/src/cli-doctor.js.map +1 -0
- package/dist/src/cli-main.d.ts +1 -0
- package/dist/src/cli-main.js +279 -0
- package/dist/src/cli-main.js.map +1 -0
- package/dist/src/cli-sessions.d.ts +17 -0
- package/dist/src/cli-sessions.js +136 -0
- package/dist/src/cli-sessions.js.map +1 -0
- package/dist/src/cli-trajectory.d.ts +37 -0
- package/dist/src/cli-trajectory.js +303 -0
- package/dist/src/cli-trajectory.js.map +1 -0
- package/dist/src/cli-usage.d.ts +18 -0
- package/dist/src/cli-usage.js +53 -0
- package/dist/src/cli-usage.js.map +1 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +29 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/commands/custom-commands.d.ts +43 -0
- package/dist/src/commands/custom-commands.js +155 -0
- package/dist/src/commands/custom-commands.js.map +1 -0
- package/dist/src/commands/workflow-command.d.ts +26 -0
- package/dist/src/commands/workflow-command.js +56 -0
- package/dist/src/commands/workflow-command.js.map +1 -0
- package/dist/src/config.d.ts +463 -0
- package/dist/src/config.js +1457 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/context-overflow-error.d.ts +7 -0
- package/dist/src/context-overflow-error.js +26 -0
- package/dist/src/context-overflow-error.js.map +1 -0
- package/dist/src/dev-repl.d.ts +1 -0
- package/dist/src/dev-repl.js +365 -0
- package/dist/src/dev-repl.js.map +1 -0
- package/dist/src/headless-protocol.d.ts +147 -0
- package/dist/src/headless-protocol.js +359 -0
- package/dist/src/headless-protocol.js.map +1 -0
- package/dist/src/headless-runner.d.ts +30 -0
- package/dist/src/headless-runner.js +405 -0
- package/dist/src/headless-runner.js.map +1 -0
- package/dist/src/headless-stdin.d.ts +28 -0
- package/dist/src/headless-stdin.js +78 -0
- package/dist/src/headless-stdin.js.map +1 -0
- package/dist/src/headless.d.ts +106 -0
- package/dist/src/headless.js +229 -0
- package/dist/src/headless.js.map +1 -0
- package/dist/src/hooks/codex-hook-runner.d.ts +92 -0
- package/dist/src/hooks/codex-hook-runner.js +446 -0
- package/dist/src/hooks/codex-hook-runner.js.map +1 -0
- package/dist/src/hooks/codex-hooks.d.ts +23 -0
- package/dist/src/hooks/codex-hooks.js +152 -0
- package/dist/src/hooks/codex-hooks.js.map +1 -0
- package/dist/src/hooks/hook-process.d.ts +23 -0
- package/dist/src/hooks/hook-process.js +241 -0
- package/dist/src/hooks/hook-process.js.map +1 -0
- package/dist/src/hooks/lifecycle-hooks.d.ts +37 -0
- package/dist/src/hooks/lifecycle-hooks.js +153 -0
- package/dist/src/hooks/lifecycle-hooks.js.map +1 -0
- package/dist/src/hooks/tool-hooks.d.ts +63 -0
- package/dist/src/hooks/tool-hooks.js +350 -0
- package/dist/src/hooks/tool-hooks.js.map +1 -0
- package/dist/src/mcp/codegraph-preflight.d.ts +29 -0
- package/dist/src/mcp/codegraph-preflight.js +232 -0
- package/dist/src/mcp/codegraph-preflight.js.map +1 -0
- package/dist/src/mcp/registry.d.ts +133 -0
- package/dist/src/mcp/registry.js +209 -0
- package/dist/src/mcp/registry.js.map +1 -0
- package/dist/src/mcp/web-search-empty-results.d.ts +14 -0
- package/dist/src/mcp/web-search-empty-results.js +94 -0
- package/dist/src/mcp/web-search-empty-results.js.map +1 -0
- package/dist/src/memory/command.d.ts +11 -0
- package/dist/src/memory/command.js +253 -0
- package/dist/src/memory/command.js.map +1 -0
- package/dist/src/memory/controller.d.ts +51 -0
- package/dist/src/memory/controller.js +316 -0
- package/dist/src/memory/controller.js.map +1 -0
- package/dist/src/memory/prompt.d.ts +4 -0
- package/dist/src/memory/prompt.js +22 -0
- package/dist/src/memory/prompt.js.map +1 -0
- package/dist/src/memory/scheduler.d.ts +33 -0
- package/dist/src/memory/scheduler.js +134 -0
- package/dist/src/memory/scheduler.js.map +1 -0
- package/dist/src/memory/state.d.ts +112 -0
- package/dist/src/memory/state.js +355 -0
- package/dist/src/memory/state.js.map +1 -0
- package/dist/src/memory/store.d.ts +19 -0
- package/dist/src/memory/store.js +130 -0
- package/dist/src/memory/store.js.map +1 -0
- package/dist/src/memory/tools.d.ts +29 -0
- package/dist/src/memory/tools.js +22 -0
- package/dist/src/memory/tools.js.map +1 -0
- package/dist/src/memory/validation.d.ts +33 -0
- package/dist/src/memory/validation.js +159 -0
- package/dist/src/memory/validation.js.map +1 -0
- package/dist/src/npm-package/generate-patch.d.ts +23 -0
- package/dist/src/npm-package/generate-patch.js +88 -0
- package/dist/src/npm-package/generate-patch.js.map +1 -0
- package/dist/src/npm-package/patch-package-format.d.ts +43 -0
- package/dist/src/npm-package/patch-package-format.js +66 -0
- package/dist/src/npm-package/patch-package-format.js.map +1 -0
- package/dist/src/paths.d.ts +39 -0
- package/dist/src/paths.js +105 -0
- package/dist/src/paths.js.map +1 -0
- package/dist/src/pricing/cost.d.ts +182 -0
- package/dist/src/pricing/cost.js +215 -0
- package/dist/src/pricing/cost.js.map +1 -0
- package/dist/src/pricing/model-prices.d.ts +112 -0
- package/dist/src/pricing/model-prices.js +320 -0
- package/dist/src/pricing/model-prices.js.map +1 -0
- package/dist/src/sdk-patch-preflight.d.ts +23 -0
- package/dist/src/sdk-patch-preflight.js +71 -0
- package/dist/src/sdk-patch-preflight.js.map +1 -0
- package/dist/src/skills/builtin/commit-message/SKILL.md +45 -0
- package/dist/src/skills/builtin/commit-message/references/types.md +8 -0
- package/dist/src/skills/builtin/developer/SKILL.md +107 -0
- package/dist/src/skills/builtin/self-evolution-research/SKILL.md +150 -0
- package/dist/src/skills/builtin/self-evolution-research/scripts/roll-research-path.mjs +208 -0
- package/dist/src/skills/builtin/self-reflection/SKILL.md +172 -0
- package/dist/src/skills/builtin/self-reflection/references/reflection-template.md +90 -0
- package/dist/src/skills/builtin/self-reflection/scripts/locate-trajectory.mjs +175 -0
- package/dist/src/skills/loader.d.ts +26 -0
- package/dist/src/skills/loader.js +186 -0
- package/dist/src/skills/loader.js.map +1 -0
- package/dist/src/skills/plugin.d.ts +34 -0
- package/dist/src/skills/plugin.js +137 -0
- package/dist/src/skills/plugin.js.map +1 -0
- package/dist/src/skills/prompt.d.ts +8 -0
- package/dist/src/skills/prompt.js +214 -0
- package/dist/src/skills/prompt.js.map +1 -0
- package/dist/src/skills/resource-safety.d.ts +15 -0
- package/dist/src/skills/resource-safety.js +149 -0
- package/dist/src/skills/resource-safety.js.map +1 -0
- package/dist/src/tools/background-bash.d.ts +95 -0
- package/dist/src/tools/background-bash.js +639 -0
- package/dist/src/tools/background-bash.js.map +1 -0
- package/dist/src/tools/background-tail.d.ts +28 -0
- package/dist/src/tools/background-tail.js +75 -0
- package/dist/src/tools/background-tail.js.map +1 -0
- package/dist/src/tools/background-wait-contract.d.ts +4 -0
- package/dist/src/tools/background-wait-contract.js +7 -0
- package/dist/src/tools/background-wait-contract.js.map +1 -0
- package/dist/src/tools/file-editor-serial.d.ts +24 -0
- package/dist/src/tools/file-editor-serial.js +99 -0
- package/dist/src/tools/file-editor-serial.js.map +1 -0
- package/dist/src/tools/image-viewer.d.ts +43 -0
- package/dist/src/tools/image-viewer.js +256 -0
- package/dist/src/tools/image-viewer.js.map +1 -0
- package/dist/src/tools/update-plan.d.ts +30 -0
- package/dist/src/tools/update-plan.js +65 -0
- package/dist/src/tools/update-plan.js.map +1 -0
- package/dist/src/tools/web-fetch.d.ts +70 -0
- package/dist/src/tools/web-fetch.js +667 -0
- package/dist/src/tools/web-fetch.js.map +1 -0
- package/dist/src/trajectory/export.d.ts +31 -0
- package/dist/src/trajectory/export.js +116 -0
- package/dist/src/trajectory/export.js.map +1 -0
- package/dist/src/trajectory/fork.d.ts +19 -0
- package/dist/src/trajectory/fork.js +110 -0
- package/dist/src/trajectory/fork.js.map +1 -0
- package/dist/src/trajectory/memory-tool.d.ts +20 -0
- package/dist/src/trajectory/memory-tool.js +98 -0
- package/dist/src/trajectory/memory-tool.js.map +1 -0
- package/dist/src/trajectory/prompt-history.d.ts +62 -0
- package/dist/src/trajectory/prompt-history.js +256 -0
- package/dist/src/trajectory/prompt-history.js.map +1 -0
- package/dist/src/trajectory/reader.d.ts +21 -0
- package/dist/src/trajectory/reader.js +62 -0
- package/dist/src/trajectory/reader.js.map +1 -0
- package/dist/src/trajectory/record.d.ts +417 -0
- package/dist/src/trajectory/record.js +394 -0
- package/dist/src/trajectory/record.js.map +1 -0
- package/dist/src/trajectory/replay.d.ts +74 -0
- package/dist/src/trajectory/replay.js +285 -0
- package/dist/src/trajectory/replay.js.map +1 -0
- package/dist/src/trajectory/resume-recap.d.ts +43 -0
- package/dist/src/trajectory/resume-recap.js +68 -0
- package/dist/src/trajectory/resume-recap.js.map +1 -0
- package/dist/src/trajectory/search.d.ts +40 -0
- package/dist/src/trajectory/search.js +127 -0
- package/dist/src/trajectory/search.js.map +1 -0
- package/dist/src/trajectory/spend.d.ts +157 -0
- package/dist/src/trajectory/spend.js +264 -0
- package/dist/src/trajectory/spend.js.map +1 -0
- package/dist/src/trajectory/stream.d.ts +30 -0
- package/dist/src/trajectory/stream.js +30 -0
- package/dist/src/trajectory/stream.js.map +1 -0
- package/dist/src/trajectory/writer.d.ts +310 -0
- package/dist/src/trajectory/writer.js +636 -0
- package/dist/src/trajectory/writer.js.map +1 -0
- package/dist/src/tui/App.d.ts +109 -0
- package/dist/src/tui/App.js +2660 -0
- package/dist/src/tui/App.js.map +1 -0
- package/dist/src/tui/InputBox.d.ts +90 -0
- package/dist/src/tui/InputBox.js +129 -0
- package/dist/src/tui/InputBox.js.map +1 -0
- package/dist/src/tui/MarkdownText.d.ts +16 -0
- package/dist/src/tui/MarkdownText.js +117 -0
- package/dist/src/tui/MarkdownText.js.map +1 -0
- package/dist/src/tui/MessageList.d.ts +27 -0
- package/dist/src/tui/MessageList.js +61 -0
- package/dist/src/tui/MessageList.js.map +1 -0
- package/dist/src/tui/PermissionPrompt.d.ts +18 -0
- package/dist/src/tui/PermissionPrompt.js +114 -0
- package/dist/src/tui/PermissionPrompt.js.map +1 -0
- package/dist/src/tui/PlanChecklist.d.ts +7 -0
- package/dist/src/tui/PlanChecklist.js +12 -0
- package/dist/src/tui/PlanChecklist.js.map +1 -0
- package/dist/src/tui/QueuedMessages.d.ts +8 -0
- package/dist/src/tui/QueuedMessages.js +24 -0
- package/dist/src/tui/QueuedMessages.js.map +1 -0
- package/dist/src/tui/StartupScreen.d.ts +25 -0
- package/dist/src/tui/StartupScreen.js +51 -0
- package/dist/src/tui/StartupScreen.js.map +1 -0
- package/dist/src/tui/ToolCallPanel.d.ts +33 -0
- package/dist/src/tui/ToolCallPanel.js +112 -0
- package/dist/src/tui/ToolCallPanel.js.map +1 -0
- package/dist/src/tui/WelcomeHeader.d.ts +30 -0
- package/dist/src/tui/WelcomeHeader.js +69 -0
- package/dist/src/tui/WelcomeHeader.js.map +1 -0
- package/dist/src/tui/background-tool-presentation.d.ts +22 -0
- package/dist/src/tui/background-tool-presentation.js +209 -0
- package/dist/src/tui/background-tool-presentation.js.map +1 -0
- package/dist/src/tui/busy-suffix.d.ts +37 -0
- package/dist/src/tui/busy-suffix.js +39 -0
- package/dist/src/tui/busy-suffix.js.map +1 -0
- package/dist/src/tui/clipboard-image.d.ts +18 -0
- package/dist/src/tui/clipboard-image.js +109 -0
- package/dist/src/tui/clipboard-image.js.map +1 -0
- package/dist/src/tui/context-format.d.ts +43 -0
- package/dist/src/tui/context-format.js +71 -0
- package/dist/src/tui/context-format.js.map +1 -0
- package/dist/src/tui/copy-command.d.ts +68 -0
- package/dist/src/tui/copy-command.js +182 -0
- package/dist/src/tui/copy-command.js.map +1 -0
- package/dist/src/tui/edit-diff.d.ts +135 -0
- package/dist/src/tui/edit-diff.js +356 -0
- package/dist/src/tui/edit-diff.js.map +1 -0
- package/dist/src/tui/frame-budget.d.ts +351 -0
- package/dist/src/tui/frame-budget.js +446 -0
- package/dist/src/tui/frame-budget.js.map +1 -0
- package/dist/src/tui/help-format.d.ts +17 -0
- package/dist/src/tui/help-format.js +38 -0
- package/dist/src/tui/help-format.js.map +1 -0
- package/dist/src/tui/live-text.d.ts +51 -0
- package/dist/src/tui/live-text.js +154 -0
- package/dist/src/tui/live-text.js.map +1 -0
- package/dist/src/tui/markdown.d.ts +62 -0
- package/dist/src/tui/markdown.js +244 -0
- package/dist/src/tui/markdown.js.map +1 -0
- package/dist/src/tui/mcp-format.d.ts +28 -0
- package/dist/src/tui/mcp-format.js +67 -0
- package/dist/src/tui/mcp-format.js.map +1 -0
- package/dist/src/tui/path-completion.d.ts +119 -0
- package/dist/src/tui/path-completion.js +305 -0
- package/dist/src/tui/path-completion.js.map +1 -0
- package/dist/src/tui/permission-queue.d.ts +61 -0
- package/dist/src/tui/permission-queue.js +129 -0
- package/dist/src/tui/permission-queue.js.map +1 -0
- package/dist/src/tui/plan-format.d.ts +9 -0
- package/dist/src/tui/plan-format.js +30 -0
- package/dist/src/tui/plan-format.js.map +1 -0
- package/dist/src/tui/prompt-completion.d.ts +22 -0
- package/dist/src/tui/prompt-completion.js +46 -0
- package/dist/src/tui/prompt-completion.js.map +1 -0
- package/dist/src/tui/prompt-editor.d.ts +102 -0
- package/dist/src/tui/prompt-editor.js +379 -0
- package/dist/src/tui/prompt-editor.js.map +1 -0
- package/dist/src/tui/prompt-history-search.d.ts +53 -0
- package/dist/src/tui/prompt-history-search.js +123 -0
- package/dist/src/tui/prompt-history-search.js.map +1 -0
- package/dist/src/tui/prompt-queue.d.ts +58 -0
- package/dist/src/tui/prompt-queue.js +74 -0
- package/dist/src/tui/prompt-queue.js.map +1 -0
- package/dist/src/tui/prompt-recall.d.ts +74 -0
- package/dist/src/tui/prompt-recall.js +90 -0
- package/dist/src/tui/prompt-recall.js.map +1 -0
- package/dist/src/tui/react-environment.d.ts +11 -0
- package/dist/src/tui/react-environment.js +24 -0
- package/dist/src/tui/react-environment.js.map +1 -0
- package/dist/src/tui/rewind-search.d.ts +34 -0
- package/dist/src/tui/rewind-search.js +68 -0
- package/dist/src/tui/rewind-search.js.map +1 -0
- package/dist/src/tui/shell-command.d.ts +114 -0
- package/dist/src/tui/shell-command.js +310 -0
- package/dist/src/tui/shell-command.js.map +1 -0
- package/dist/src/tui/spend-advisory.d.ts +52 -0
- package/dist/src/tui/spend-advisory.js +64 -0
- package/dist/src/tui/spend-advisory.js.map +1 -0
- package/dist/src/tui/status-format.d.ts +120 -0
- package/dist/src/tui/status-format.js +192 -0
- package/dist/src/tui/status-format.js.map +1 -0
- package/dist/src/tui/subagent-format.d.ts +49 -0
- package/dist/src/tui/subagent-format.js +146 -0
- package/dist/src/tui/subagent-format.js.map +1 -0
- package/dist/src/tui/task-format.d.ts +29 -0
- package/dist/src/tui/task-format.js +87 -0
- package/dist/src/tui/task-format.js.map +1 -0
- package/dist/src/tui/terminal-bell.d.ts +20 -0
- package/dist/src/tui/terminal-bell.js +33 -0
- package/dist/src/tui/terminal-bell.js.map +1 -0
- package/dist/src/tui/tool-detail-presentation.d.ts +60 -0
- package/dist/src/tui/tool-detail-presentation.js +206 -0
- package/dist/src/tui/tool-detail-presentation.js.map +1 -0
- package/dist/src/tui/turn-state.d.ts +195 -0
- package/dist/src/tui/turn-state.js +548 -0
- package/dist/src/tui/turn-state.js.map +1 -0
- package/dist/src/tui/visual-language.d.ts +45 -0
- package/dist/src/tui/visual-language.js +57 -0
- package/dist/src/tui/visual-language.js.map +1 -0
- package/dist/src/version.d.ts +7 -0
- package/dist/src/version.js +38 -0
- package/dist/src/version.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the redrawn part of the frame is divided between everything that wants rows.
|
|
3
|
+
*
|
|
4
|
+
* Round 1 bounded the streaming answer against a *measured* chrome height: the
|
|
5
|
+
* header and the box below it were measured with `useBoxMetrics`, and whatever was
|
|
6
|
+
* left over went to the answer. That works only while the chrome itself is
|
|
7
|
+
* bounded, and it is not — measured with `spike/probe-live-frame-overflow.tsx`
|
|
8
|
+
* (numbers defended in `spike/verify-frame-budget.ts`): a 13-row
|
|
9
|
+
* draft in a 24-row terminal already takes Ink's `clearTerminal` branch (2
|
|
10
|
+
* whole-screen clears, scrollback included, per added row), and one in-flight tool
|
|
11
|
+
* call with details expanded draws 41 rows from caps that count logical lines and
|
|
12
|
+
* code points rather than terminal rows.
|
|
13
|
+
*
|
|
14
|
+
* So the budget is inverted here. Instead of measuring what the furniture took and
|
|
15
|
+
* giving the answer the rest, every participant states what it *wants* and what it
|
|
16
|
+
* cannot usefully go below, and this module hands out the rows. Nothing here
|
|
17
|
+
* depends on a measurement of the boxes being bounded, so the budget cannot
|
|
18
|
+
* oscillate; the one thing still measured is the header, whose height depends on
|
|
19
|
+
* nothing below it.
|
|
20
|
+
*
|
|
21
|
+
* The order is fixed and follows what the user cannot act without: the prompt
|
|
22
|
+
* region (the draft they are typing, or the question they must answer) is served
|
|
23
|
+
* first, the tool panel next, the still-arriving answer last — it is the one
|
|
24
|
+
* participant whose content is already guaranteed to reach `<Static>` history in
|
|
25
|
+
* full. The counter-rule is the share ceiling below, so "served first" cannot mean
|
|
26
|
+
* "takes everything".
|
|
27
|
+
*/
|
|
28
|
+
import { type DiffEmphasis } from './edit-diff.js';
|
|
29
|
+
/**
|
|
30
|
+
* The row Ink needs to not treat the frame as fullscreen.
|
|
31
|
+
*
|
|
32
|
+
* `renderInteractiveFrame` calls a frame `isFullscreen` at `outputHeight >= rows`
|
|
33
|
+
* and clears the whole screen when the next one shrinks below that
|
|
34
|
+
* (`isLeavingFullscreen`), so "fits" has to mean strictly shorter than the
|
|
35
|
+
* viewport.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SPARE_FRAME_ROW = 1;
|
|
38
|
+
/** What one participant of the live frame is asking for. */
|
|
39
|
+
export interface FrameClaim {
|
|
40
|
+
/** Rows it would use if the terminal were unlimited. */
|
|
41
|
+
readonly wanted: number;
|
|
42
|
+
/** Rows below which it stops being useful; never granted more than are left. */
|
|
43
|
+
readonly floor: number;
|
|
44
|
+
/**
|
|
45
|
+
* Exempt from the share ceiling below.
|
|
46
|
+
*
|
|
47
|
+
* For the permission box, which is modal: the loop is blocked until it is
|
|
48
|
+
* answered, so the running call it is asking about and the answer that arrived
|
|
49
|
+
* before it are not what the row is needed for. Measured cost of getting this
|
|
50
|
+
* wrong: the box was granted half the frame while a tool call was active, cut its
|
|
51
|
+
* last detail row, and the row it cut was the `… truncated N code points` marker
|
|
52
|
+
* — the line that says the value shown is not the whole value, in the one box
|
|
53
|
+
* where that matters.
|
|
54
|
+
*/
|
|
55
|
+
readonly modal?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface FrameClaims {
|
|
58
|
+
/** Viewport height. */
|
|
59
|
+
readonly rows: number;
|
|
60
|
+
/** Measured header height, including its bottom margin. */
|
|
61
|
+
readonly headerRows: number;
|
|
62
|
+
/** The `thinking…` row, when it is drawn. */
|
|
63
|
+
readonly thinkingRows: number;
|
|
64
|
+
/** Permission box, or the draft with its completion menu and hint. */
|
|
65
|
+
readonly prompt: FrameClaim;
|
|
66
|
+
/** Running tool calls. */
|
|
67
|
+
readonly tools: FrameClaim;
|
|
68
|
+
/** Parent progress checklist, shown only after a successful update this turn. */
|
|
69
|
+
readonly plan?: FrameClaim;
|
|
70
|
+
/**
|
|
71
|
+
* Queued mid-turn submissions, listed above the input box (SER-027). Optional
|
|
72
|
+
* because most frames have none; absent means `{ wanted: 0, floor: 0 }`.
|
|
73
|
+
*/
|
|
74
|
+
readonly queued?: FrameClaim;
|
|
75
|
+
/** The still-arriving answer, label and margin included. */
|
|
76
|
+
readonly live: FrameClaim;
|
|
77
|
+
}
|
|
78
|
+
export interface FrameGrants {
|
|
79
|
+
readonly prompt: number;
|
|
80
|
+
readonly tools: number;
|
|
81
|
+
readonly plan: number;
|
|
82
|
+
readonly queued: number;
|
|
83
|
+
readonly live: number;
|
|
84
|
+
/**
|
|
85
|
+
* True when someone was granted less than its floor — the terminal is smaller
|
|
86
|
+
* than the furniture. Nothing in the UI may spend a row saying so (the header
|
|
87
|
+
* contract), but a check can assert it and a participant can degrade on it.
|
|
88
|
+
*/
|
|
89
|
+
readonly degraded: boolean;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Divides the rows below the header between prompt, tool panel, parent plan,
|
|
93
|
+
* queued listing and live answer.
|
|
94
|
+
*
|
|
95
|
+
* A grant never exceeds what is left, so darwin never *chooses* to overflow: with
|
|
96
|
+
* a viewport smaller than the furniture the frame still fits and the participants
|
|
97
|
+
* render their degraded form. The only overflow this cannot prevent is a header
|
|
98
|
+
* taller than the terminal, which this module does not own.
|
|
99
|
+
*
|
|
100
|
+
* The parent plan ranks after the tool panel, then the queued listing (SER-027),
|
|
101
|
+
* then the answer. Plan and queue both state omitted content; the user can act on
|
|
102
|
+
* queued work (`Up` takes it back), while the answer already lives in `<Static>`
|
|
103
|
+
* in full and still yields last of all.
|
|
104
|
+
*/
|
|
105
|
+
export declare function frameBudget(claims: FrameClaims): FrameGrants;
|
|
106
|
+
/** Indent every expanded tool-input row carries; not available to the text. */
|
|
107
|
+
export declare const TOOL_INPUT_INDENT = " ";
|
|
108
|
+
/** Indent every permission detail row carries; not available to the text. */
|
|
109
|
+
export declare const PERMISSION_DETAIL_INDENT = " ";
|
|
110
|
+
/**
|
|
111
|
+
* One counted terminal row of bounded content, with the diff tone its logical
|
|
112
|
+
* line carried. Tone rides the row the budget counts — never a second pass over
|
|
113
|
+
* the text — so a wrapped continuation of a `+ `/`- ` line keeps its colour and
|
|
114
|
+
* the coloured rows are exactly the rows the height came from. The optional
|
|
115
|
+
* intraline emphasis span rides the same row for the same reason: it is UTF-16
|
|
116
|
+
* offsets *into `text`*, styling only, so the counted string never changes.
|
|
117
|
+
*/
|
|
118
|
+
export interface BoundedContentRow {
|
|
119
|
+
readonly text: string;
|
|
120
|
+
readonly tone?: 'add' | 'remove';
|
|
121
|
+
/** Changed span within `text` to render bold; never alters the text itself. */
|
|
122
|
+
readonly emphasis?: DiffEmphasis;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The expanded input of one running call, as terminal rows.
|
|
126
|
+
*
|
|
127
|
+
* `expandedToolInput` bounds what is *read* — 100 logical lines, 8000 code points —
|
|
128
|
+
* and that is not a height: measured at 80 columns, one 300-line file write came
|
|
129
|
+
* back as 4 logical lines and **41 terminal rows**. This is the function that turns
|
|
130
|
+
* the one unit into the other, and both the panel and the budget call it, so they
|
|
131
|
+
* cannot disagree about how tall the panel is.
|
|
132
|
+
*/
|
|
133
|
+
export declare function toolInputRows(input: unknown, columns: number, toolName?: string): readonly BoundedContentRow[];
|
|
134
|
+
/**
|
|
135
|
+
* Whether one running call's detail rows are drawn. Ctrl+B's session-wide toggle
|
|
136
|
+
* for real tools; always on for the `!` pseudo-tool, whose live output tail is
|
|
137
|
+
* the point of running it. One predicate, used by both the claims computation in
|
|
138
|
+
* `App.tsx` and the panel in `ToolCallPanel.tsx`, so what is counted and what is
|
|
139
|
+
* drawn cannot be two different answers.
|
|
140
|
+
*/
|
|
141
|
+
export declare function toolDetailsVisible(toolName: string, toolDetailsExpanded: boolean): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* One permission detail block's value, as terminal rows. `diff` marks a block
|
|
144
|
+
* whose value is diff text, and is what scopes the tone: a bash command whose
|
|
145
|
+
* line starts with `- ` stays plain.
|
|
146
|
+
*/
|
|
147
|
+
export declare function permissionDetailRows(value: string, columns: number, diff?: boolean): readonly BoundedContentRow[];
|
|
148
|
+
/** Rows the prompt region would draw with nothing bounding it. */
|
|
149
|
+
export declare function promptBoxWanted(input: {
|
|
150
|
+
readonly draftRows: number;
|
|
151
|
+
readonly completions: number;
|
|
152
|
+
readonly moreCompletions: boolean;
|
|
153
|
+
readonly hasHint: boolean;
|
|
154
|
+
/** One bounded pending clipboard-image fact row. */
|
|
155
|
+
readonly hasAttachment?: boolean;
|
|
156
|
+
/** The prompt-recall indicator row; absent when no recall walk is open. */
|
|
157
|
+
readonly hasRecall?: boolean;
|
|
158
|
+
/** Search title plus these bounded match rows (and, when needed, one omission row). */
|
|
159
|
+
readonly searchMatches?: number;
|
|
160
|
+
readonly moreSearchMatches?: boolean;
|
|
161
|
+
}): number;
|
|
162
|
+
/**
|
|
163
|
+
* Rows the prompt-recall indicator draws when it is granted one.
|
|
164
|
+
*
|
|
165
|
+
* One, and it lives here rather than beside the walk it describes because this module
|
|
166
|
+
* owns every row count in the region: a second definition is how a box comes to draw
|
|
167
|
+
* one more row than the budget handed it.
|
|
168
|
+
*/
|
|
169
|
+
export declare const RECALL_INDICATOR_ROWS = 1;
|
|
170
|
+
/** Rows the tool panel would draw with nothing bounding it. */
|
|
171
|
+
export declare function toolPanelWanted(tools: readonly ToolRowsClaim[]): number;
|
|
172
|
+
/** Rows the permission box would draw with nothing bounding it. */
|
|
173
|
+
export declare function permissionBoxWanted(blockRows: readonly number[], fixedRows?: number): number;
|
|
174
|
+
/**
|
|
175
|
+
* Width available to text inside the permission box: its border and `paddingX`.
|
|
176
|
+
*
|
|
177
|
+
* Not cosmetic arithmetic — wrapping the details to the terminal's width instead of
|
|
178
|
+
* the box's made a 900-character value 25 rows tall by the budget's count and 27 by
|
|
179
|
+
* Ink's, which is a cleared screen at 40 columns.
|
|
180
|
+
*/
|
|
181
|
+
export declare const PERMISSION_BOX_CHROME_COLUMNS = 4;
|
|
182
|
+
/** The rows of the draft a bounded prompt region can show, and what it hides. */
|
|
183
|
+
export interface DraftWindow {
|
|
184
|
+
/** First layout row drawn. */
|
|
185
|
+
readonly start: number;
|
|
186
|
+
/** One past the last layout row drawn. */
|
|
187
|
+
readonly end: number;
|
|
188
|
+
readonly hiddenAbove: number;
|
|
189
|
+
readonly hiddenBelow: number;
|
|
190
|
+
/** Draw the line about the hidden rows; false when there was no row to spare. */
|
|
191
|
+
readonly notice: boolean;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* The window of draft rows to draw: the newest rows that fit, moved to keep the
|
|
195
|
+
* cursor inside.
|
|
196
|
+
*
|
|
197
|
+
* A draft is not an answer — the row being edited must be visible whatever the
|
|
198
|
+
* scroll position implies, because rows Ink dropped are rows the cursor cannot be
|
|
199
|
+
* seen on. Exactly one row is reserved for the notice whenever anything is hidden,
|
|
200
|
+
* above and below together, so the height is decided in one step instead of
|
|
201
|
+
* depending on a window it has not chosen yet. With a single row to spend, the row
|
|
202
|
+
* the cursor is on wins over the line that would say rows are missing.
|
|
203
|
+
*/
|
|
204
|
+
export declare function draftWindow(totalRows: number, cursorRow: number, maxRows: number): DraftWindow;
|
|
205
|
+
/** One line about the draft rows that are not on screen. */
|
|
206
|
+
export declare function hiddenDraftNotice(hiddenAbove: number, hiddenBelow: number): string;
|
|
207
|
+
/** How a bounded prompt region spends its rows. */
|
|
208
|
+
export interface PromptBoxPlan {
|
|
209
|
+
/** Rows granted to the draft window, notice included. */
|
|
210
|
+
readonly draftRows: number;
|
|
211
|
+
/** Completion entries to draw; `0` leaves the menu out entirely. */
|
|
212
|
+
readonly completionItems: number;
|
|
213
|
+
/** Draw the `… n more` line under the entries. */
|
|
214
|
+
readonly completionMore: boolean;
|
|
215
|
+
/** Draw the search title row. */
|
|
216
|
+
readonly search: boolean;
|
|
217
|
+
/** Prompt-history search match rows to draw under its title row. */
|
|
218
|
+
readonly searchItems: number;
|
|
219
|
+
/** Draw the search omission row after visible matches. */
|
|
220
|
+
readonly searchMore: boolean;
|
|
221
|
+
/** Draw the pending clipboard-image fact row. */
|
|
222
|
+
readonly attachment: boolean;
|
|
223
|
+
/** Draw the prompt-recall indicator row. */
|
|
224
|
+
readonly recall: boolean;
|
|
225
|
+
/** Draw the status hint. */
|
|
226
|
+
readonly hint: boolean;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Splits the prompt region's grant between draft, completion menu, recall indicator
|
|
230
|
+
* and hint.
|
|
231
|
+
*
|
|
232
|
+
* The draft keeps a floor first (its cursor row, plus the notice row it needs as
|
|
233
|
+
* soon as it is windowed), then the menu — a list of commands nobody can see is a
|
|
234
|
+
* list nobody uses — then the recall indicator, then the hint, which is the only
|
|
235
|
+
* purely informational row here and so the first to go. Whatever is left goes back to
|
|
236
|
+
* the draft, which is why an idle terminal shows a long draft in full.
|
|
237
|
+
*
|
|
238
|
+
* Recall outranks the hint and yields to the menu on purpose: it is the one row that
|
|
239
|
+
* says *why the draft just changed under the user's hands*, so it is worth more than a
|
|
240
|
+
* standing reminder of which commands exist — and worth less than the list the other
|
|
241
|
+
* arrow key is currently driving.
|
|
242
|
+
*/
|
|
243
|
+
export declare function planPromptBox(input: {
|
|
244
|
+
readonly maxRows: number;
|
|
245
|
+
readonly draftRows: number;
|
|
246
|
+
readonly completions: number;
|
|
247
|
+
readonly moreCompletions: boolean;
|
|
248
|
+
readonly hasHint: boolean;
|
|
249
|
+
readonly hasAttachment?: boolean;
|
|
250
|
+
/** A recall walk is open, so the indicator wants its one row. */
|
|
251
|
+
readonly hasRecall?: boolean;
|
|
252
|
+
/** Search title plus a bounded result list; absent when search is closed. */
|
|
253
|
+
readonly searchMatches?: number;
|
|
254
|
+
readonly moreSearchMatches?: boolean;
|
|
255
|
+
}): PromptBoxPlan;
|
|
256
|
+
/** One running tool call's row claim. */
|
|
257
|
+
export interface ToolRowsClaim {
|
|
258
|
+
/** Rows of expanded input this call would draw. */
|
|
259
|
+
readonly detailRows: number;
|
|
260
|
+
}
|
|
261
|
+
/** What a bounded tool panel draws. */
|
|
262
|
+
export interface ToolPanelPlan {
|
|
263
|
+
/** Per shown call: rows of input drawn, and rows of input it had to leave out. */
|
|
264
|
+
readonly entries: readonly {
|
|
265
|
+
readonly detailRows: number;
|
|
266
|
+
readonly hiddenDetailRows: number;
|
|
267
|
+
}[];
|
|
268
|
+
/** Calls with no row at all; drawn as one collapsed line. */
|
|
269
|
+
readonly hiddenTools: number;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Fits the running calls into `maxRows`.
|
|
273
|
+
*
|
|
274
|
+
* Summaries come before detail: a call the user cannot see is a call they do not
|
|
275
|
+
* know is running, while expanded input is a display preference they toggled and
|
|
276
|
+
* can toggle back. When even the summaries do not fit, the last row becomes the
|
|
277
|
+
* collapsed count — one row that says how many calls it is standing in for.
|
|
278
|
+
*
|
|
279
|
+
* An entry costs `1 + detailRows + (hiddenDetailRows > 0 ? 1 : 0)` rows: the
|
|
280
|
+
* summary, the input rows, and the row spent saying what was left out. That notice
|
|
281
|
+
* row is why a call whose detail is cut to nothing reports nothing — with no free
|
|
282
|
+
* row there is nowhere to say it, and the panel would otherwise overflow to
|
|
283
|
+
* apologise. The `tool details: expanded` notice in history still records the mode.
|
|
284
|
+
*/
|
|
285
|
+
export declare function planToolPanel(tools: readonly ToolRowsClaim[], maxRows: number): ToolPanelPlan;
|
|
286
|
+
/** One line about tool input rows that did not fit. */
|
|
287
|
+
export declare function hiddenDetailNotice(hiddenRows: number): string;
|
|
288
|
+
/** One line standing in for the calls the panel had no room for. */
|
|
289
|
+
export declare function hiddenToolsNotice(hiddenTools: number): string;
|
|
290
|
+
/** What a bounded queued-messages listing draws (SER-027). */
|
|
291
|
+
export interface QueueListPlan {
|
|
292
|
+
/** Entries drawn, oldest (next to send) first; each is one row. */
|
|
293
|
+
readonly shown: number;
|
|
294
|
+
/** Entries standing behind the `… n more queued` row. */
|
|
295
|
+
readonly hiddenEntries: number;
|
|
296
|
+
}
|
|
297
|
+
/** Rows the queued listing would draw with nothing bounding it: one per entry. */
|
|
298
|
+
export declare function queueListWanted(entries: number): number;
|
|
299
|
+
/**
|
|
300
|
+
* Fits the queued listing into `maxRows`.
|
|
301
|
+
*
|
|
302
|
+
* The head of the queue is what drains next, so when rows run out the oldest
|
|
303
|
+
* entries stay and one row states the rest — the same truncation vocabulary as
|
|
304
|
+
* the tool panel. A single granted row for several entries goes entirely to the
|
|
305
|
+
* notice: one entry shown while others hide silently would misstate the queue.
|
|
306
|
+
*/
|
|
307
|
+
export declare function planQueueList(entries: number, maxRows: number): QueueListPlan;
|
|
308
|
+
/** One line standing in for the queued entries the listing had no room for. */
|
|
309
|
+
export declare function hiddenQueuedNotice(hiddenEntries: number): string;
|
|
310
|
+
/**
|
|
311
|
+
* Rows the box costs before any detail: the border, the heading, the summary, and
|
|
312
|
+
* the decision row with the blank row above it.
|
|
313
|
+
*/
|
|
314
|
+
export declare const PERMISSION_BOX_FIXED_ROWS = 6;
|
|
315
|
+
/** What a bounded permission box draws. */
|
|
316
|
+
export interface PermissionBoxPlan {
|
|
317
|
+
/** Rows of each detail block, in order; a block granted 0 rows is hidden. */
|
|
318
|
+
readonly blocks: readonly {
|
|
319
|
+
readonly rows: number;
|
|
320
|
+
readonly hiddenRows: number;
|
|
321
|
+
}[];
|
|
322
|
+
/** Blocks with no rows at all. */
|
|
323
|
+
readonly hiddenBlocks: number;
|
|
324
|
+
/** Draw the box without its border and detail blocks: the question only. */
|
|
325
|
+
readonly compact: boolean;
|
|
326
|
+
/** Draw the summary row. False only when a single row is left for the question. */
|
|
327
|
+
readonly summary: boolean;
|
|
328
|
+
/** Draw the line about what was left out. */
|
|
329
|
+
readonly notice: boolean;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Fits the permission box into `maxRows`.
|
|
333
|
+
*
|
|
334
|
+
* The heading, the summary and the decision row are never what yields: a prompt
|
|
335
|
+
* whose question scrolled off the frame is a prompt that cannot be answered, and
|
|
336
|
+
* this is the one box in the TUI where a silently shortened view would be a
|
|
337
|
+
* security problem rather than a cosmetic one. So detail is cut from the bottom,
|
|
338
|
+
* every cut is counted, and the row that states the cut is reserved before any
|
|
339
|
+
* detail is handed out.
|
|
340
|
+
*
|
|
341
|
+
* `fixedRows` is passed in rather than assumed: on a narrow terminal the heading
|
|
342
|
+
* and the decision row wrap, and a box that budgeted one row for each of them
|
|
343
|
+
* would overflow by exactly the rows it did not count.
|
|
344
|
+
*
|
|
345
|
+
* Below the fixed cost the box drops its border and its details rather than its
|
|
346
|
+
* question, and keeps stating what it hid for as long as it has a row for it. The
|
|
347
|
+
* last thing standing, at one row, is `allow?` itself.
|
|
348
|
+
*/
|
|
349
|
+
export declare function planPermissionBox(blockRows: readonly number[], maxRows: number, fixedRows?: number): PermissionBoxPlan;
|
|
350
|
+
/** One line about detail rows the box could not show. */
|
|
351
|
+
export declare function hiddenPermissionNotice(hiddenRows: number, hiddenBlocks: number): string;
|