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,30 @@
|
|
|
1
|
+
export const PLAN_HISTORY_MAX_ITEMS = 10;
|
|
2
|
+
const marker = {
|
|
3
|
+
pending: '[ ]',
|
|
4
|
+
in_progress: '[>]',
|
|
5
|
+
completed: '[x]',
|
|
6
|
+
};
|
|
7
|
+
export function planItemText(item) {
|
|
8
|
+
return `${marker[item.status]} ${item.item}`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A plan block consumes one title row and item rows. If the grant cannot show the
|
|
12
|
+
* complete list, its final row states exactly how many items are omitted.
|
|
13
|
+
*/
|
|
14
|
+
export function planRows(plan, maxRows, title = 'plan') {
|
|
15
|
+
if (plan.length === 0 || maxRows <= 0)
|
|
16
|
+
return [];
|
|
17
|
+
if (maxRows === 1)
|
|
18
|
+
return [`${title} · ${plan.length} items`];
|
|
19
|
+
const itemCapacity = maxRows - 1;
|
|
20
|
+
const needsNotice = plan.length > itemCapacity;
|
|
21
|
+
const shown = needsNotice ? Math.max(0, itemCapacity - 1) : plan.length;
|
|
22
|
+
const rows = [`${title} · ${plan.length} items`, ...plan.slice(0, shown).map(planItemText)];
|
|
23
|
+
if (needsNotice)
|
|
24
|
+
rows.push(`… ${plan.length - shown} more plan items`);
|
|
25
|
+
return rows;
|
|
26
|
+
}
|
|
27
|
+
export function finalPlanRows(plan) {
|
|
28
|
+
return planRows(plan, PLAN_HISTORY_MAX_ITEMS + 2, 'plan final');
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=plan-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-format.js","sourceRoot":"","sources":["../../../src/tui/plan-format.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,MAAM,MAAM,GAA+B;IACzC,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAAc;IACzC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CACtB,IAAyB,EACzB,OAAe,EACf,KAAK,GAAG,MAAM;IAEd,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACjD,IAAI,OAAO,KAAK,CAAC;QAAE,OAAO,CAAC,GAAG,KAAK,MAAM,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC;IAE9D,MAAM,YAAY,GAAG,OAAO,GAAG,CAAC,CAAC;IACjC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;IAC/C,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IACxE,MAAM,IAAI,GAAG,CAAC,GAAG,KAAK,MAAM,IAAI,CAAC,MAAM,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IAC5F,IAAI,WAAW;QAAE,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,KAAK,kBAAkB,CAAC,CAAC;IACvE,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAyB;IACrD,OAAO,QAAQ,CAAC,IAAI,EAAE,sBAAsB,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type PathQuery, type WorkspacePaths } from './path-completion.js';
|
|
2
|
+
import type { EditorValue } from './prompt-editor.js';
|
|
3
|
+
import type { CompletionKind } from './InputBox.js';
|
|
4
|
+
/** Command names matching a `/prefix`, or none when the input is not a bare command. */
|
|
5
|
+
export declare function computeCompletions(input: string, commandNames: readonly string[]): string[];
|
|
6
|
+
export interface PromptCompletionState {
|
|
7
|
+
readonly kind: CompletionKind;
|
|
8
|
+
readonly candidates: readonly string[];
|
|
9
|
+
readonly pathQuery: PathQuery | undefined;
|
|
10
|
+
/** Stable identity of the menu this query currently offers; absent when no rows exist. */
|
|
11
|
+
readonly identity: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Pure completion state for one immediate editor generation.
|
|
15
|
+
*
|
|
16
|
+
* Identity follows the query rather than the rendered frame. `App` can therefore
|
|
17
|
+
* suppress exactly the menu dismissed by Escape while an edit clears that dismissal
|
|
18
|
+
* synchronously, including when several stdin events arrive before React renders.
|
|
19
|
+
*/
|
|
20
|
+
export declare function promptCompletionState(editor: EditorValue, commandNames: readonly string[], workspacePaths: WorkspacePaths): PromptCompletionState;
|
|
21
|
+
/** The candidates still visible after an optional Escape dismissal. */
|
|
22
|
+
export declare function visiblePromptCompletions(completion: PromptCompletionState, dismissedIdentity: string | undefined): readonly string[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { matchWorkspacePaths, pathCompletionQuery, } from './path-completion.js';
|
|
2
|
+
/** Command names matching a `/prefix`, or none when the input is not a bare command. */
|
|
3
|
+
export function computeCompletions(input, commandNames) {
|
|
4
|
+
if (!input.startsWith('/'))
|
|
5
|
+
return [];
|
|
6
|
+
// Once there is a space the command is complete and arguments are being typed.
|
|
7
|
+
if (input.includes(' '))
|
|
8
|
+
return [];
|
|
9
|
+
const prefix = input.slice(1).toLowerCase();
|
|
10
|
+
return commandNames.filter((name) => name.toLowerCase().startsWith(prefix));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Pure completion state for one immediate editor generation.
|
|
14
|
+
*
|
|
15
|
+
* Identity follows the query rather than the rendered frame. `App` can therefore
|
|
16
|
+
* suppress exactly the menu dismissed by Escape while an edit clears that dismissal
|
|
17
|
+
* synchronously, including when several stdin events arrive before React renders.
|
|
18
|
+
*/
|
|
19
|
+
export function promptCompletionState(editor, commandNames, workspacePaths) {
|
|
20
|
+
const commands = computeCompletions(editor.text, commandNames);
|
|
21
|
+
if (commands.length > 0) {
|
|
22
|
+
return {
|
|
23
|
+
kind: 'command',
|
|
24
|
+
candidates: commands,
|
|
25
|
+
pathQuery: undefined,
|
|
26
|
+
identity: `command:${editor.cursor.offset}:${JSON.stringify(editor.text)}`,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const query = pathCompletionQuery(editor.text, editor.cursor.offset);
|
|
30
|
+
const paths = query === undefined ? [] : matchWorkspacePaths(workspacePaths.paths, query.text);
|
|
31
|
+
return {
|
|
32
|
+
kind: 'path',
|
|
33
|
+
candidates: paths,
|
|
34
|
+
pathQuery: query,
|
|
35
|
+
identity: paths.length === 0 || query === undefined
|
|
36
|
+
? undefined
|
|
37
|
+
: `path:${query.start}:${query.end}:${JSON.stringify(query.text)}`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** The candidates still visible after an optional Escape dismissal. */
|
|
41
|
+
export function visiblePromptCompletions(completion, dismissedIdentity) {
|
|
42
|
+
return completion.identity !== undefined && completion.identity === dismissedIdentity
|
|
43
|
+
? []
|
|
44
|
+
: completion.candidates;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=prompt-completion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-completion.js","sourceRoot":"","sources":["../../../src/tui/prompt-completion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAGpB,MAAM,sBAAsB,CAAC;AAI9B,wFAAwF;AACxF,MAAM,UAAU,kBAAkB,CAAC,KAAa,EAAE,YAA+B;IAC/E,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IACtC,+EAA+E;IAC/E,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5C,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9E,CAAC;AAUD;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAmB,EACnB,YAA+B,EAC/B,cAA8B;IAE9B,MAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC/D,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO;YACL,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,WAAW,MAAM,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;SAC3E,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,KAAK,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/F,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,KAAK;QAChB,QAAQ,EACN,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,SAAS;YACvC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;KACvE,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,wBAAwB,CACtC,UAAiC,EACjC,iBAAqC;IAErC,OAAO,UAAU,CAAC,QAAQ,KAAK,SAAS,IAAI,UAAU,CAAC,QAAQ,KAAK,iBAAiB;QACnF,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export type CursorAffinity = 'upstream' | 'downstream';
|
|
2
|
+
export interface EditorCursor {
|
|
3
|
+
/** UTF-16 source offset, always snapped to a grapheme boundary. */
|
|
4
|
+
offset: number;
|
|
5
|
+
/** Which visual side owns an offset shared by two soft-wrapped rows. */
|
|
6
|
+
affinity: CursorAffinity;
|
|
7
|
+
}
|
|
8
|
+
interface Boundary {
|
|
9
|
+
offset: number;
|
|
10
|
+
column: number;
|
|
11
|
+
}
|
|
12
|
+
export interface VisualRow {
|
|
13
|
+
text: string;
|
|
14
|
+
prefix: 'you> ' | '...> ' | ' ';
|
|
15
|
+
start: number;
|
|
16
|
+
end: number;
|
|
17
|
+
width: number;
|
|
18
|
+
boundaries: readonly Boundary[];
|
|
19
|
+
}
|
|
20
|
+
export interface EditorLayout {
|
|
21
|
+
rows: readonly VisualRow[];
|
|
22
|
+
cursor: {
|
|
23
|
+
row: number;
|
|
24
|
+
column: number;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface EditorValue {
|
|
28
|
+
text: string;
|
|
29
|
+
cursor: EditorCursor;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Builds the exact visual rows used by the prompt renderer.
|
|
33
|
+
*
|
|
34
|
+
* One cell is reserved at the terminal's right edge. A real terminal cursor
|
|
35
|
+
* cannot sit at `x === columns`, and writing there makes terminals disagree on
|
|
36
|
+
* whether wrapping happens immediately or on the next character.
|
|
37
|
+
*/
|
|
38
|
+
export declare function layoutEditor(text: string, columns: number, cursor: EditorCursor): EditorLayout;
|
|
39
|
+
export declare function insertAtCursor(value: EditorValue, inserted: string): EditorValue;
|
|
40
|
+
export declare function backspaceAtCursor(value: EditorValue): EditorValue;
|
|
41
|
+
export declare function deleteAtCursor(value: EditorValue): EditorValue;
|
|
42
|
+
export declare function moveHorizontal(text: string, cursor: EditorCursor, direction: -1 | 1, layout: EditorLayout): EditorCursor;
|
|
43
|
+
export declare function moveToRowEdge(layout: EditorLayout, edge: 'start' | 'end'): EditorCursor;
|
|
44
|
+
/**
|
|
45
|
+
* Kills from the cursor to a visual row edge (readline Ctrl+K / Ctrl+U).
|
|
46
|
+
*
|
|
47
|
+
* Row-scoped, like Home/End, so the chords agree with the movement keys the
|
|
48
|
+
* editor already has. At the edge itself this is a no-op: the newline (or the
|
|
49
|
+
* soft wrap) is a boundary, never part of the kill.
|
|
50
|
+
*/
|
|
51
|
+
export declare function killToRowEdge(value: EditorValue, layout: EditorLayout, edge: 'start' | 'end'): EditorValue;
|
|
52
|
+
/**
|
|
53
|
+
* Deletes the whitespace-delimited word before the cursor (readline Ctrl+W):
|
|
54
|
+
* trailing whitespace first, then every non-whitespace grapheme. Grapheme
|
|
55
|
+
* boundaries keep a joined emoji or combining sequence intact, exactly as
|
|
56
|
+
* backspace does.
|
|
57
|
+
*/
|
|
58
|
+
export declare function deleteWordBefore(value: EditorValue): EditorValue;
|
|
59
|
+
/**
|
|
60
|
+
* Deletes the whitespace-delimited word after the cursor (readline Alt+D):
|
|
61
|
+
* leading whitespace first, then every non-whitespace grapheme — the forward
|
|
62
|
+
* mirror of {@link deleteWordBefore}, with the same grapheme guarantees.
|
|
63
|
+
*/
|
|
64
|
+
export declare function deleteWordAfter(value: EditorValue): EditorValue;
|
|
65
|
+
/** Hard cap on composer undo snapshots; pushing past it drops the oldest. */
|
|
66
|
+
export declare const UNDO_CAP = 16;
|
|
67
|
+
/**
|
|
68
|
+
* The composer undo stack (SER-044): the exact `EditorValue`s destroyed by the
|
|
69
|
+
* kill/word-delete chords, newest last. Pure immutable data owned by the
|
|
70
|
+
* caller — the editor module never holds state — and deliberately separate
|
|
71
|
+
* from the history/rewind search snapshots, which keep their own restore.
|
|
72
|
+
*/
|
|
73
|
+
export type UndoStack = readonly EditorValue[];
|
|
74
|
+
/**
|
|
75
|
+
* Pushes the draft a destructive chord is about to destroy. Bounded: past
|
|
76
|
+
* {@link UNDO_CAP} entries the oldest snapshot is dropped, never the newest.
|
|
77
|
+
*/
|
|
78
|
+
export declare function pushUndo(stack: UndoStack, value: EditorValue): UndoStack;
|
|
79
|
+
/**
|
|
80
|
+
* Pops the newest snapshot (Ctrl+_), or `undefined` when the stack is empty —
|
|
81
|
+
* the caller treats that as a harmless no-op. Repeated pops walk further back.
|
|
82
|
+
*/
|
|
83
|
+
export declare function popUndo(stack: UndoStack): {
|
|
84
|
+
stack: UndoStack;
|
|
85
|
+
value: EditorValue;
|
|
86
|
+
} | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Moves the cursor one whitespace-delimited word (readline Alt+B / Alt+F and
|
|
89
|
+
* the Alt/Ctrl+Arrow chords). The boundaries are exactly the ones the word
|
|
90
|
+
* deletions use, so a jump and its delete always agree — and, like them, a
|
|
91
|
+
* grapheme is never split. Affinity follows {@link moveHorizontal}: leftward
|
|
92
|
+
* landings read as downstream, rightward as upstream.
|
|
93
|
+
*/
|
|
94
|
+
export declare function moveWordHorizontal(text: string, cursor: EditorCursor, direction: -1 | 1): EditorCursor;
|
|
95
|
+
export declare function moveVertical(layout: EditorLayout, direction: -1 | 1, preferredColumn?: number): {
|
|
96
|
+
cursor: EditorCursor;
|
|
97
|
+
preferredColumn: number;
|
|
98
|
+
};
|
|
99
|
+
export declare function snapCursor(text: string, cursor: EditorCursor): EditorCursor;
|
|
100
|
+
/** A dependency-free subset of the same Unicode terminal-width rules Ink uses. */
|
|
101
|
+
export declare function cellWidth(grapheme: string): number;
|
|
102
|
+
export {};
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' });
|
|
2
|
+
const rgiEmoji = new RegExp('^\\p{RGI_Emoji}$', 'v');
|
|
3
|
+
const leadingNonPrinting = new RegExp('^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]+', 'v');
|
|
4
|
+
const spacingMark = new RegExp('\\p{Spacing_Mark}', 'v');
|
|
5
|
+
const PROMPT_WIDTH = 5;
|
|
6
|
+
/**
|
|
7
|
+
* Builds the exact visual rows used by the prompt renderer.
|
|
8
|
+
*
|
|
9
|
+
* One cell is reserved at the terminal's right edge. A real terminal cursor
|
|
10
|
+
* cannot sit at `x === columns`, and writing there makes terminals disagree on
|
|
11
|
+
* whether wrapping happens immediately or on the next character.
|
|
12
|
+
*/
|
|
13
|
+
export function layoutEditor(text, columns, cursor) {
|
|
14
|
+
const contentWidth = Math.max(1, columns - PROMPT_WIDTH - 1);
|
|
15
|
+
const rows = [];
|
|
16
|
+
let logicalStart = 0;
|
|
17
|
+
let logicalIndex = 0;
|
|
18
|
+
for (;;) {
|
|
19
|
+
const newline = text.indexOf('\n', logicalStart);
|
|
20
|
+
const logicalEnd = newline === -1 ? text.length : newline;
|
|
21
|
+
const graphemes = segment(text.slice(logicalStart, logicalEnd), logicalStart);
|
|
22
|
+
appendLogicalRows(rows, graphemes, logicalStart, logicalEnd, logicalIndex, contentWidth);
|
|
23
|
+
logicalIndex += 1;
|
|
24
|
+
if (newline === -1)
|
|
25
|
+
break;
|
|
26
|
+
logicalStart = newline + 1;
|
|
27
|
+
}
|
|
28
|
+
const safeCursor = snapCursor(text, cursor);
|
|
29
|
+
const rowIndex = findCursorRow(rows, safeCursor);
|
|
30
|
+
const row = rows[rowIndex];
|
|
31
|
+
const boundary = nearestOffsetBoundary(row.boundaries, safeCursor.offset);
|
|
32
|
+
return {
|
|
33
|
+
rows,
|
|
34
|
+
cursor: { row: rowIndex, column: PROMPT_WIDTH + boundary.column },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function insertAtCursor(value, inserted) {
|
|
38
|
+
const cursor = snapCursor(value.text, value.cursor);
|
|
39
|
+
const text = value.text.slice(0, cursor.offset) + inserted + value.text.slice(cursor.offset);
|
|
40
|
+
const desiredOffset = cursor.offset + inserted.length;
|
|
41
|
+
const boundaries = sourceBoundaries(text);
|
|
42
|
+
const offset = boundaries.find((boundary) => boundary >= desiredOffset) ?? text.length;
|
|
43
|
+
return {
|
|
44
|
+
text,
|
|
45
|
+
// Insertion can merge with a combining-mark/ZWJ suffix. In that case there
|
|
46
|
+
// is no boundary at desiredOffset, so keep the cursor after the merged
|
|
47
|
+
// grapheme rather than leaving it inside one (or making it jump backward).
|
|
48
|
+
cursor: { offset, affinity: 'upstream' },
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export function backspaceAtCursor(value) {
|
|
52
|
+
const cursor = snapCursor(value.text, value.cursor);
|
|
53
|
+
if (cursor.offset === 0)
|
|
54
|
+
return { ...value, cursor };
|
|
55
|
+
const previous = previousBoundary(value.text, cursor.offset);
|
|
56
|
+
return {
|
|
57
|
+
text: value.text.slice(0, previous) + value.text.slice(cursor.offset),
|
|
58
|
+
cursor: { offset: previous, affinity: 'downstream' },
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export function deleteAtCursor(value) {
|
|
62
|
+
const cursor = snapCursor(value.text, value.cursor);
|
|
63
|
+
if (cursor.offset === value.text.length)
|
|
64
|
+
return { ...value, cursor };
|
|
65
|
+
const next = nextBoundary(value.text, cursor.offset);
|
|
66
|
+
return {
|
|
67
|
+
text: value.text.slice(0, cursor.offset) + value.text.slice(next),
|
|
68
|
+
cursor: { offset: cursor.offset, affinity: 'downstream' },
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export function moveHorizontal(text, cursor, direction, layout) {
|
|
72
|
+
const safe = snapCursor(text, cursor);
|
|
73
|
+
// A soft wrap gives one source offset two visual caret positions. Traverse that
|
|
74
|
+
// visual boundary before advancing to another grapheme.
|
|
75
|
+
const shared = layout.rows.some((row, index) => row.end === safe.offset && layout.rows[index + 1]?.start === safe.offset);
|
|
76
|
+
if (shared && direction < 0 && safe.affinity === 'downstream') {
|
|
77
|
+
return { offset: safe.offset, affinity: 'upstream' };
|
|
78
|
+
}
|
|
79
|
+
if (shared && direction > 0 && safe.affinity === 'upstream') {
|
|
80
|
+
return { offset: safe.offset, affinity: 'downstream' };
|
|
81
|
+
}
|
|
82
|
+
return direction < 0
|
|
83
|
+
? { offset: previousBoundary(text, safe.offset), affinity: 'downstream' }
|
|
84
|
+
: { offset: nextBoundary(text, safe.offset), affinity: 'upstream' };
|
|
85
|
+
}
|
|
86
|
+
export function moveToRowEdge(layout, edge) {
|
|
87
|
+
const row = layout.rows[layout.cursor.row];
|
|
88
|
+
return edge === 'start'
|
|
89
|
+
? { offset: row.start, affinity: 'downstream' }
|
|
90
|
+
: { offset: row.end, affinity: 'upstream' };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Kills from the cursor to a visual row edge (readline Ctrl+K / Ctrl+U).
|
|
94
|
+
*
|
|
95
|
+
* Row-scoped, like Home/End, so the chords agree with the movement keys the
|
|
96
|
+
* editor already has. At the edge itself this is a no-op: the newline (or the
|
|
97
|
+
* soft wrap) is a boundary, never part of the kill.
|
|
98
|
+
*/
|
|
99
|
+
export function killToRowEdge(value, layout, edge) {
|
|
100
|
+
const cursor = snapCursor(value.text, value.cursor);
|
|
101
|
+
const row = layout.rows[layout.cursor.row];
|
|
102
|
+
if (edge === 'start') {
|
|
103
|
+
if (cursor.offset <= row.start)
|
|
104
|
+
return { ...value, cursor };
|
|
105
|
+
return {
|
|
106
|
+
text: value.text.slice(0, row.start) + value.text.slice(cursor.offset),
|
|
107
|
+
cursor: { offset: row.start, affinity: 'downstream' },
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (cursor.offset >= row.end)
|
|
111
|
+
return { ...value, cursor };
|
|
112
|
+
return {
|
|
113
|
+
text: value.text.slice(0, cursor.offset) + value.text.slice(row.end),
|
|
114
|
+
cursor: { offset: cursor.offset, affinity: 'upstream' },
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Deletes the whitespace-delimited word before the cursor (readline Ctrl+W):
|
|
119
|
+
* trailing whitespace first, then every non-whitespace grapheme. Grapheme
|
|
120
|
+
* boundaries keep a joined emoji or combining sequence intact, exactly as
|
|
121
|
+
* backspace does.
|
|
122
|
+
*/
|
|
123
|
+
export function deleteWordBefore(value) {
|
|
124
|
+
const cursor = snapCursor(value.text, value.cursor);
|
|
125
|
+
if (cursor.offset === 0)
|
|
126
|
+
return { ...value, cursor };
|
|
127
|
+
const start = wordBoundaryBefore(value.text, cursor.offset);
|
|
128
|
+
return {
|
|
129
|
+
text: value.text.slice(0, start) + value.text.slice(cursor.offset),
|
|
130
|
+
cursor: { offset: start, affinity: 'downstream' },
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Deletes the whitespace-delimited word after the cursor (readline Alt+D):
|
|
135
|
+
* leading whitespace first, then every non-whitespace grapheme — the forward
|
|
136
|
+
* mirror of {@link deleteWordBefore}, with the same grapheme guarantees.
|
|
137
|
+
*/
|
|
138
|
+
export function deleteWordAfter(value) {
|
|
139
|
+
const cursor = snapCursor(value.text, value.cursor);
|
|
140
|
+
if (cursor.offset === value.text.length)
|
|
141
|
+
return { ...value, cursor };
|
|
142
|
+
const end = wordBoundaryAfter(value.text, cursor.offset);
|
|
143
|
+
return {
|
|
144
|
+
text: value.text.slice(0, cursor.offset) + value.text.slice(end),
|
|
145
|
+
cursor: { offset: cursor.offset, affinity: 'downstream' },
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/** Hard cap on composer undo snapshots; pushing past it drops the oldest. */
|
|
149
|
+
export const UNDO_CAP = 16;
|
|
150
|
+
/**
|
|
151
|
+
* Pushes the draft a destructive chord is about to destroy. Bounded: past
|
|
152
|
+
* {@link UNDO_CAP} entries the oldest snapshot is dropped, never the newest.
|
|
153
|
+
*/
|
|
154
|
+
export function pushUndo(stack, value) {
|
|
155
|
+
const next = [...stack, value];
|
|
156
|
+
return next.length > UNDO_CAP ? next.slice(next.length - UNDO_CAP) : next;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Pops the newest snapshot (Ctrl+_), or `undefined` when the stack is empty —
|
|
160
|
+
* the caller treats that as a harmless no-op. Repeated pops walk further back.
|
|
161
|
+
*/
|
|
162
|
+
export function popUndo(stack) {
|
|
163
|
+
const value = stack[stack.length - 1];
|
|
164
|
+
if (value === undefined)
|
|
165
|
+
return undefined;
|
|
166
|
+
return { stack: stack.slice(0, -1), value };
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Moves the cursor one whitespace-delimited word (readline Alt+B / Alt+F and
|
|
170
|
+
* the Alt/Ctrl+Arrow chords). The boundaries are exactly the ones the word
|
|
171
|
+
* deletions use, so a jump and its delete always agree — and, like them, a
|
|
172
|
+
* grapheme is never split. Affinity follows {@link moveHorizontal}: leftward
|
|
173
|
+
* landings read as downstream, rightward as upstream.
|
|
174
|
+
*/
|
|
175
|
+
export function moveWordHorizontal(text, cursor, direction) {
|
|
176
|
+
const safe = snapCursor(text, cursor);
|
|
177
|
+
return direction < 0
|
|
178
|
+
? { offset: wordBoundaryBefore(text, safe.offset), affinity: 'downstream' }
|
|
179
|
+
: { offset: wordBoundaryAfter(text, safe.offset), affinity: 'upstream' };
|
|
180
|
+
}
|
|
181
|
+
/** Start of the word before `offset`: skip whitespace back, then the word. */
|
|
182
|
+
function wordBoundaryBefore(text, offset) {
|
|
183
|
+
let start = offset;
|
|
184
|
+
while (start > 0) {
|
|
185
|
+
const previous = previousBoundary(text, start);
|
|
186
|
+
if (!/^\s+$/.test(text.slice(previous, start)))
|
|
187
|
+
break;
|
|
188
|
+
start = previous;
|
|
189
|
+
}
|
|
190
|
+
while (start > 0) {
|
|
191
|
+
const previous = previousBoundary(text, start);
|
|
192
|
+
if (/^\s+$/.test(text.slice(previous, start)))
|
|
193
|
+
break;
|
|
194
|
+
start = previous;
|
|
195
|
+
}
|
|
196
|
+
return start;
|
|
197
|
+
}
|
|
198
|
+
/** End of the word after `offset`: skip whitespace forward, then the word. */
|
|
199
|
+
function wordBoundaryAfter(text, offset) {
|
|
200
|
+
let end = offset;
|
|
201
|
+
while (end < text.length) {
|
|
202
|
+
const next = nextBoundary(text, end);
|
|
203
|
+
if (!/^\s+$/.test(text.slice(end, next)))
|
|
204
|
+
break;
|
|
205
|
+
end = next;
|
|
206
|
+
}
|
|
207
|
+
while (end < text.length) {
|
|
208
|
+
const next = nextBoundary(text, end);
|
|
209
|
+
if (/^\s+$/.test(text.slice(end, next)))
|
|
210
|
+
break;
|
|
211
|
+
end = next;
|
|
212
|
+
}
|
|
213
|
+
return end;
|
|
214
|
+
}
|
|
215
|
+
export function moveVertical(layout, direction, preferredColumn) {
|
|
216
|
+
const desired = preferredColumn ?? Math.max(0, layout.cursor.column - PROMPT_WIDTH);
|
|
217
|
+
const targetIndex = Math.max(0, Math.min(layout.rows.length - 1, layout.cursor.row + direction));
|
|
218
|
+
return {
|
|
219
|
+
cursor: cursorAtColumn(layout.rows[targetIndex], desired),
|
|
220
|
+
preferredColumn: desired,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
export function snapCursor(text, cursor) {
|
|
224
|
+
const offset = Math.max(0, Math.min(text.length, cursor.offset));
|
|
225
|
+
const boundaries = sourceBoundaries(text);
|
|
226
|
+
let snapped = 0;
|
|
227
|
+
for (const boundary of boundaries) {
|
|
228
|
+
if (boundary > offset)
|
|
229
|
+
break;
|
|
230
|
+
snapped = boundary;
|
|
231
|
+
}
|
|
232
|
+
return { offset: snapped, affinity: cursor.affinity };
|
|
233
|
+
}
|
|
234
|
+
function appendLogicalRows(output, graphemes, logicalStart, logicalEnd, logicalIndex, contentWidth) {
|
|
235
|
+
if (graphemes.length === 0) {
|
|
236
|
+
output.push(makeRow([], logicalStart, logicalEnd, logicalIndex === 0 ? 'you> ' : '...> '));
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
let row = [];
|
|
240
|
+
let width = 0;
|
|
241
|
+
let continuation = false;
|
|
242
|
+
for (const grapheme of graphemes) {
|
|
243
|
+
if (row.length > 0 && width + grapheme.width > contentWidth) {
|
|
244
|
+
output.push(makeRow(row, row[0].start, row[row.length - 1].end, continuation ? ' ' : logicalIndex === 0 ? 'you> ' : '...> '));
|
|
245
|
+
row = [];
|
|
246
|
+
width = 0;
|
|
247
|
+
continuation = true;
|
|
248
|
+
}
|
|
249
|
+
row.push(grapheme);
|
|
250
|
+
width += grapheme.width;
|
|
251
|
+
}
|
|
252
|
+
output.push(makeRow(row, row[0].start, logicalEnd, continuation ? ' ' : logicalIndex === 0 ? 'you> ' : '...> '));
|
|
253
|
+
}
|
|
254
|
+
function makeRow(graphemes, start, end, prefix) {
|
|
255
|
+
const boundaries = [{ offset: start, column: 0 }];
|
|
256
|
+
let column = 0;
|
|
257
|
+
for (const grapheme of graphemes) {
|
|
258
|
+
column += grapheme.width;
|
|
259
|
+
boundaries.push({ offset: grapheme.end, column });
|
|
260
|
+
}
|
|
261
|
+
return {
|
|
262
|
+
text: graphemes.map((grapheme) => grapheme.display).join(''),
|
|
263
|
+
prefix,
|
|
264
|
+
start,
|
|
265
|
+
end,
|
|
266
|
+
width: column,
|
|
267
|
+
boundaries,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function findCursorRow(rows, cursor) {
|
|
271
|
+
const exactStarts = rows
|
|
272
|
+
.map((row, index) => ({ row, index }))
|
|
273
|
+
.filter(({ row }) => row.start === cursor.offset);
|
|
274
|
+
const exactEnds = rows
|
|
275
|
+
.map((row, index) => ({ row, index }))
|
|
276
|
+
.filter(({ row }) => row.end === cursor.offset);
|
|
277
|
+
if (cursor.affinity === 'downstream' && exactStarts.length > 0)
|
|
278
|
+
return exactStarts[exactStarts.length - 1].index;
|
|
279
|
+
if (cursor.affinity === 'upstream' && exactEnds.length > 0)
|
|
280
|
+
return exactEnds[0].index;
|
|
281
|
+
const containing = rows.findIndex((row) => cursor.offset >= row.start && cursor.offset <= row.end);
|
|
282
|
+
return containing === -1 ? rows.length - 1 : containing;
|
|
283
|
+
}
|
|
284
|
+
function cursorAtColumn(row, requested) {
|
|
285
|
+
const column = Math.max(0, requested);
|
|
286
|
+
let best = row.boundaries[0];
|
|
287
|
+
for (const boundary of row.boundaries) {
|
|
288
|
+
if (Math.abs(boundary.column - column) < Math.abs(best.column - column))
|
|
289
|
+
best = boundary;
|
|
290
|
+
}
|
|
291
|
+
const affinity = best.offset === row.end ? 'upstream' : 'downstream';
|
|
292
|
+
return { offset: best.offset, affinity };
|
|
293
|
+
}
|
|
294
|
+
function nearestOffsetBoundary(boundaries, offset) {
|
|
295
|
+
let best = boundaries[0];
|
|
296
|
+
for (const boundary of boundaries) {
|
|
297
|
+
if (Math.abs(boundary.offset - offset) < Math.abs(best.offset - offset))
|
|
298
|
+
best = boundary;
|
|
299
|
+
}
|
|
300
|
+
return best;
|
|
301
|
+
}
|
|
302
|
+
function previousBoundary(text, offset) {
|
|
303
|
+
let previous = 0;
|
|
304
|
+
for (const boundary of sourceBoundaries(text)) {
|
|
305
|
+
if (boundary >= offset)
|
|
306
|
+
break;
|
|
307
|
+
previous = boundary;
|
|
308
|
+
}
|
|
309
|
+
return previous;
|
|
310
|
+
}
|
|
311
|
+
function nextBoundary(text, offset) {
|
|
312
|
+
for (const boundary of sourceBoundaries(text)) {
|
|
313
|
+
if (boundary > offset)
|
|
314
|
+
return boundary;
|
|
315
|
+
}
|
|
316
|
+
return text.length;
|
|
317
|
+
}
|
|
318
|
+
function sourceBoundaries(text) {
|
|
319
|
+
const boundaries = [0];
|
|
320
|
+
for (const part of segmenter.segment(text))
|
|
321
|
+
boundaries.push(part.index + part.segment.length);
|
|
322
|
+
return boundaries;
|
|
323
|
+
}
|
|
324
|
+
function segment(text, sourceStart) {
|
|
325
|
+
return [...segmenter.segment(text)].map((part) => {
|
|
326
|
+
// Ink/string-width intentionally gives a tab zero width. Render a visible
|
|
327
|
+
// fixed tab stop so source offsets and hit-testing still have a real cell.
|
|
328
|
+
const display = part.segment === '\t' ? ' ' : part.segment;
|
|
329
|
+
return {
|
|
330
|
+
text: part.segment,
|
|
331
|
+
display,
|
|
332
|
+
start: sourceStart + part.index,
|
|
333
|
+
end: sourceStart + part.index + part.segment.length,
|
|
334
|
+
width: part.segment === '\t' ? 4 : cellWidth(part.segment),
|
|
335
|
+
};
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
/** A dependency-free subset of the same Unicode terminal-width rules Ink uses. */
|
|
339
|
+
export function cellWidth(grapheme) {
|
|
340
|
+
if (grapheme === '\t' || /^(?:\p{Control}|\p{Mark}|\p{Default_Ignorable_Code_Point})+$/u.test(grapheme))
|
|
341
|
+
return 0;
|
|
342
|
+
if (isEmojiPresentation(grapheme) || /\p{Extended_Pictographic}.*\u200d.*\p{Extended_Pictographic}/u.test(grapheme) || /^[\d#*].*\u20e3$/u.test(grapheme))
|
|
343
|
+
return 2;
|
|
344
|
+
const visible = grapheme.replace(leadingNonPrinting, '');
|
|
345
|
+
const codePoint = visible.codePointAt(0);
|
|
346
|
+
if (codePoint === undefined)
|
|
347
|
+
return 0;
|
|
348
|
+
let width = isFullwidth(codePoint) ? 2 : 1;
|
|
349
|
+
let first = true;
|
|
350
|
+
for (const character of visible) {
|
|
351
|
+
if (first) {
|
|
352
|
+
first = false;
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
if (spacingMark.test(character) || (character >= '\uff00' && character <= '\uffef')) {
|
|
356
|
+
width += isFullwidth(character.codePointAt(0)) ? 2 : 1;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return width;
|
|
360
|
+
}
|
|
361
|
+
function isEmojiPresentation(grapheme) {
|
|
362
|
+
return rgiEmoji.test(grapheme);
|
|
363
|
+
}
|
|
364
|
+
function isFullwidth(codePoint) {
|
|
365
|
+
return (codePoint >= 0x1100 &&
|
|
366
|
+
(codePoint <= 0x115f ||
|
|
367
|
+
codePoint === 0x2329 ||
|
|
368
|
+
codePoint === 0x232a ||
|
|
369
|
+
(codePoint >= 0x2e80 && codePoint <= 0xa4cf && codePoint !== 0x303f) ||
|
|
370
|
+
(codePoint >= 0xac00 && codePoint <= 0xd7a3) ||
|
|
371
|
+
(codePoint >= 0xf900 && codePoint <= 0xfaff) ||
|
|
372
|
+
(codePoint >= 0xfe10 && codePoint <= 0xfe19) ||
|
|
373
|
+
(codePoint >= 0xfe30 && codePoint <= 0xfe6f) ||
|
|
374
|
+
(codePoint >= 0xff00 && codePoint <= 0xff60) ||
|
|
375
|
+
(codePoint >= 0xffe0 && codePoint <= 0xffe6) ||
|
|
376
|
+
(codePoint >= 0x1b000 && codePoint <= 0x1b2ff) ||
|
|
377
|
+
(codePoint >= 0x20000 && codePoint <= 0x3fffd)));
|
|
378
|
+
}
|
|
379
|
+
//# sourceMappingURL=prompt-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-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