@dungle-scrubs/tallow 0.8.23 → 0.8.25
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/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/workspace-transition-interactive.d.ts +1 -0
- package/dist/workspace-transition-interactive.d.ts.map +1 -1
- package/dist/workspace-transition-interactive.js +3 -0
- package/dist/workspace-transition-interactive.js.map +1 -1
- package/extensions/_shared/__tests__/shell-policy.test.ts +16 -13
- package/extensions/_shared/shell-policy.ts +8 -3
- package/extensions/hooks/__tests__/stale-cwd.test.ts +108 -0
- package/extensions/hooks/index.ts +52 -2
- package/extensions/plan-mode-tool/__tests__/index.test.ts +0 -1
- package/extensions/plan-mode-tool/__tests__/utils.test.ts +0 -57
- package/extensions/plan-mode-tool/extension.json +1 -10
- package/extensions/plan-mode-tool/index.ts +11 -284
- package/extensions/plan-mode-tool/utils.ts +0 -29
- package/extensions/skill-commands/__tests__/shared-skills-dirs.test.ts +113 -0
- package/extensions/skill-commands/index.ts +62 -5
- package/node_modules/.bun/mime-types@3.0.2/node_modules/mime-db/HISTORY.md +541 -0
- package/node_modules/.bun/mime-types@3.0.2/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/.bun/mime-types@3.0.2/node_modules/mime-db/README.md +109 -0
- package/node_modules/.bun/mime-types@3.0.2/node_modules/mime-db/db.json +9342 -0
- package/node_modules/.bun/mime-types@3.0.2/node_modules/mime-db/index.js +12 -0
- package/node_modules/.bun/mime-types@3.0.2/node_modules/mime-db/package.json +56 -0
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/keys.d.ts.map +1 -1
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/keys.js +59 -7
- package/node_modules/@mariozechner/pi-tui/dist/keys.js.map +1 -0
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/tui.d.ts +13 -0
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/tui.d.ts.map +1 -1
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/tui.js +22 -2
- package/node_modules/@mariozechner/pi-tui/dist/tui.js.map +1 -0
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/package.json +1 -1
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/tui-diff-regression.test.ts +52 -0
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/keys.ts +71 -7
- package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/tui.ts +23 -2
- package/package.json +11 -9
- package/packages/tallow-tui/node_modules/@types/mime-types/LICENSE +21 -0
- package/packages/tallow-tui/node_modules/@types/mime-types/README.md +28 -0
- package/packages/tallow-tui/node_modules/@types/mime-types/index.d.ts +9 -0
- package/packages/tallow-tui/node_modules/@types/mime-types/package.json +25 -0
- package/packages/tallow-tui/node_modules/chalk/license +9 -0
- package/packages/tallow-tui/node_modules/chalk/package.json +83 -0
- package/packages/tallow-tui/node_modules/chalk/readme.md +297 -0
- package/packages/tallow-tui/node_modules/chalk/source/index.d.ts +325 -0
- package/packages/tallow-tui/node_modules/chalk/source/index.js +225 -0
- package/packages/tallow-tui/node_modules/chalk/source/utilities.js +33 -0
- package/packages/tallow-tui/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/packages/tallow-tui/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/packages/tallow-tui/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/packages/tallow-tui/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/packages/tallow-tui/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/packages/tallow-tui/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/index.d.ts +60 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/index.js +30 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/license +9 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/lookup.js +403 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/package.json +70 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/readme.md +65 -0
- package/packages/tallow-tui/node_modules/marked/LICENSE.md +44 -0
- package/packages/tallow-tui/node_modules/marked/README.md +106 -0
- package/packages/tallow-tui/node_modules/marked/bin/main.js +282 -0
- package/packages/tallow-tui/node_modules/marked/bin/marked.js +15 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.cjs +2211 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.cjs.map +7 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.d.cts +728 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.d.ts +728 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js +2189 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js.map +7 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js +2213 -0
- package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js.map +7 -0
- package/packages/tallow-tui/node_modules/marked/man/marked.1 +111 -0
- package/packages/tallow-tui/node_modules/marked/man/marked.1.md +92 -0
- package/packages/tallow-tui/node_modules/marked/marked.min.js +69 -0
- package/packages/tallow-tui/node_modules/marked/package.json +111 -0
- package/packages/tallow-tui/node_modules/mime-types/HISTORY.md +428 -0
- package/packages/tallow-tui/node_modules/mime-types/LICENSE +23 -0
- package/packages/tallow-tui/node_modules/mime-types/README.md +126 -0
- package/packages/tallow-tui/node_modules/mime-types/index.js +211 -0
- package/packages/tallow-tui/node_modules/mime-types/mimeScore.js +57 -0
- package/packages/tallow-tui/node_modules/mime-types/package.json +49 -0
- package/extensions/__integration__/plan-rejection-feedback.test.ts +0 -272
- package/extensions/plan-mode-tool/__tests__/agent-end-execution.test.ts +0 -373
- package/packages/tallow-tui/dist/keys.js.map +0 -1
- package/packages/tallow-tui/dist/tui.js.map +0 -1
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/README.md +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/autocomplete.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/autocomplete.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/autocomplete.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/autocomplete.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/border-styles.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/border-styles.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/border-styles.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/border-styles.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/bordered-box.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/bordered-box.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/bordered-box.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/bordered-box.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/box.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/box.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/box.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/box.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/cancellable-loader.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/cancellable-loader.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/cancellable-loader.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/cancellable-loader.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/editor.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/editor.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/editor.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/editor.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/image.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/image.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/image.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/image.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/input.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/input.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/input.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/input.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/loader.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/loader.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/loader.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/loader.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/markdown.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/markdown.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/markdown.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/markdown.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/select-list.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/select-list.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/select-list.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/select-list.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/settings-list.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/settings-list.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/settings-list.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/settings-list.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/spacer.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/spacer.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/spacer.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/spacer.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/text.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/text.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/text.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/text.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/truncated-text.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/truncated-text.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/truncated-text.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/components/truncated-text.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/editor-component.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/editor-component.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/editor-component.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/editor-component.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/fuzzy.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/fuzzy.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/fuzzy.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/fuzzy.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/index.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/index.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/index.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/index.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/keybindings.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/keybindings.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/keybindings.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/keybindings.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/keys.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/kill-ring.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/kill-ring.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/kill-ring.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/kill-ring.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/stdin-buffer.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/stdin-buffer.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/stdin-buffer.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/stdin-buffer.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal-image.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal-image.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal-image.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal-image.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/terminal.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/test-utils/capability-env.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/test-utils/capability-env.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/test-utils/capability-env.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/test-utils/capability-env.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/undo-stack.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/undo-stack.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/undo-stack.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/undo-stack.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/utils.d.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/utils.d.ts.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/utils.js +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/dist/utils.js.map +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/__snapshots__/render.test.ts.snap +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/editor-border.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/editor-change-listener.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/editor-ghost-text.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/fuzzy.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/image-component.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/keys.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/render.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/stdin-buffer.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/terminal-image.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/tui-render-scheduling.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/__tests__/utils.test.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/autocomplete.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/border-styles.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/bordered-box.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/box.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/cancellable-loader.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/editor.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/image.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/input.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/loader.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/markdown.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/select-list.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/settings-list.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/spacer.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/text.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/components/truncated-text.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/editor-component.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/fuzzy.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/index.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/keybindings.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/kill-ring.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/stdin-buffer.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/terminal-image.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/terminal.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/test-utils/capability-env.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/undo-stack.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/src/utils.ts +0 -0
- /package/{packages/tallow-tui → node_modules/@mariozechner/pi-tui}/tsconfig.build.json +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* mime-types
|
|
3
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
4
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Module dependencies.
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
var db = require('mime-db')
|
|
16
|
+
var extname = require('path').extname
|
|
17
|
+
var mimeScore = require('./mimeScore')
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Module variables.
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
|
|
25
|
+
var TEXT_TYPE_REGEXP = /^text\//i
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Module exports.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
exports.charset = charset
|
|
33
|
+
exports.charsets = { lookup: charset }
|
|
34
|
+
exports.contentType = contentType
|
|
35
|
+
exports.extension = extension
|
|
36
|
+
exports.extensions = Object.create(null)
|
|
37
|
+
exports.lookup = lookup
|
|
38
|
+
exports.types = Object.create(null)
|
|
39
|
+
exports._extensionConflicts = []
|
|
40
|
+
|
|
41
|
+
// Populate the extensions/types maps
|
|
42
|
+
populateMaps(exports.extensions, exports.types)
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Get the default charset for a MIME type.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} type
|
|
48
|
+
* @return {false|string}
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
function charset (type) {
|
|
52
|
+
if (!type || typeof type !== 'string') {
|
|
53
|
+
return false
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// TODO: use media-typer
|
|
57
|
+
var match = EXTRACT_TYPE_REGEXP.exec(type)
|
|
58
|
+
var mime = match && db[match[1].toLowerCase()]
|
|
59
|
+
|
|
60
|
+
if (mime && mime.charset) {
|
|
61
|
+
return mime.charset
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// default text/* to utf-8
|
|
65
|
+
if (match && TEXT_TYPE_REGEXP.test(match[1])) {
|
|
66
|
+
return 'UTF-8'
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return false
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Create a full Content-Type header given a MIME type or extension.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} str
|
|
76
|
+
* @return {false|string}
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
function contentType (str) {
|
|
80
|
+
// TODO: should this even be in this module?
|
|
81
|
+
if (!str || typeof str !== 'string') {
|
|
82
|
+
return false
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str
|
|
86
|
+
|
|
87
|
+
if (!mime) {
|
|
88
|
+
return false
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// TODO: use content-type or other module
|
|
92
|
+
if (mime.indexOf('charset') === -1) {
|
|
93
|
+
var charset = exports.charset(mime)
|
|
94
|
+
if (charset) mime += '; charset=' + charset.toLowerCase()
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return mime
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Get the default extension for a MIME type.
|
|
102
|
+
*
|
|
103
|
+
* @param {string} type
|
|
104
|
+
* @return {false|string}
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
function extension (type) {
|
|
108
|
+
if (!type || typeof type !== 'string') {
|
|
109
|
+
return false
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// TODO: use media-typer
|
|
113
|
+
var match = EXTRACT_TYPE_REGEXP.exec(type)
|
|
114
|
+
|
|
115
|
+
// get extensions
|
|
116
|
+
var exts = match && exports.extensions[match[1].toLowerCase()]
|
|
117
|
+
|
|
118
|
+
if (!exts || !exts.length) {
|
|
119
|
+
return false
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return exts[0]
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Lookup the MIME type for a file path/extension.
|
|
127
|
+
*
|
|
128
|
+
* @param {string} path
|
|
129
|
+
* @return {false|string}
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
function lookup (path) {
|
|
133
|
+
if (!path || typeof path !== 'string') {
|
|
134
|
+
return false
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// get the extension ("ext" or ".ext" or full path)
|
|
138
|
+
var extension = extname('x.' + path)
|
|
139
|
+
.toLowerCase()
|
|
140
|
+
.slice(1)
|
|
141
|
+
|
|
142
|
+
if (!extension) {
|
|
143
|
+
return false
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return exports.types[extension] || false
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Populate the extensions and types maps.
|
|
151
|
+
* @private
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
function populateMaps (extensions, types) {
|
|
155
|
+
Object.keys(db).forEach(function forEachMimeType (type) {
|
|
156
|
+
var mime = db[type]
|
|
157
|
+
var exts = mime.extensions
|
|
158
|
+
|
|
159
|
+
if (!exts || !exts.length) {
|
|
160
|
+
return
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// mime -> extensions
|
|
164
|
+
extensions[type] = exts
|
|
165
|
+
|
|
166
|
+
// extension -> mime
|
|
167
|
+
for (var i = 0; i < exts.length; i++) {
|
|
168
|
+
var extension = exts[i]
|
|
169
|
+
types[extension] = _preferredType(extension, types[extension], type)
|
|
170
|
+
|
|
171
|
+
// DELETE (eventually): Capture extension->type maps that change as a
|
|
172
|
+
// result of switching to mime-score. This is just to help make reviewing
|
|
173
|
+
// PR #119 easier, and can be removed once that PR is approved.
|
|
174
|
+
const legacyType = _preferredTypeLegacy(
|
|
175
|
+
extension,
|
|
176
|
+
types[extension],
|
|
177
|
+
type
|
|
178
|
+
)
|
|
179
|
+
if (legacyType !== types[extension]) {
|
|
180
|
+
exports._extensionConflicts.push([extension, legacyType, types[extension]])
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Resolve type conflict using mime-score
|
|
187
|
+
function _preferredType (ext, type0, type1) {
|
|
188
|
+
var score0 = type0 ? mimeScore(type0, db[type0].source) : 0
|
|
189
|
+
var score1 = type1 ? mimeScore(type1, db[type1].source) : 0
|
|
190
|
+
|
|
191
|
+
return score0 > score1 ? type0 : type1
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Resolve type conflict using pre-mime-score logic
|
|
195
|
+
function _preferredTypeLegacy (ext, type0, type1) {
|
|
196
|
+
var SOURCE_RANK = ['nginx', 'apache', undefined, 'iana']
|
|
197
|
+
|
|
198
|
+
var score0 = type0 ? SOURCE_RANK.indexOf(db[type0].source) : 0
|
|
199
|
+
var score1 = type1 ? SOURCE_RANK.indexOf(db[type1].source) : 0
|
|
200
|
+
|
|
201
|
+
if (
|
|
202
|
+
exports.types[extension] !== 'application/octet-stream' &&
|
|
203
|
+
(score0 > score1 ||
|
|
204
|
+
(score0 === score1 &&
|
|
205
|
+
exports.types[extension]?.slice(0, 12) === 'application/'))
|
|
206
|
+
) {
|
|
207
|
+
return type0
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return score0 > score1 ? type0 : type1
|
|
211
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// 'mime-score' back-ported to CommonJS
|
|
2
|
+
|
|
3
|
+
// Score RFC facets (see https://tools.ietf.org/html/rfc6838#section-3)
|
|
4
|
+
var FACET_SCORES = {
|
|
5
|
+
'prs.': 100,
|
|
6
|
+
'x-': 200,
|
|
7
|
+
'x.': 300,
|
|
8
|
+
'vnd.': 400,
|
|
9
|
+
default: 900
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Score mime source (Logic originally from `jshttp/mime-types` module)
|
|
13
|
+
var SOURCE_SCORES = {
|
|
14
|
+
nginx: 10,
|
|
15
|
+
apache: 20,
|
|
16
|
+
iana: 40,
|
|
17
|
+
default: 30 // definitions added by `jshttp/mime-db` project?
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var TYPE_SCORES = {
|
|
21
|
+
// prefer application/xml over text/xml
|
|
22
|
+
// prefer application/rtf over text/rtf
|
|
23
|
+
application: 1,
|
|
24
|
+
|
|
25
|
+
// prefer font/woff over application/font-woff
|
|
26
|
+
font: 2,
|
|
27
|
+
|
|
28
|
+
// prefer video/mp4 over audio/mp4 over application/mp4
|
|
29
|
+
// See https://www.rfc-editor.org/rfc/rfc4337.html#section-2
|
|
30
|
+
audio: 2,
|
|
31
|
+
video: 3,
|
|
32
|
+
|
|
33
|
+
default: 0
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get each component of the score for a mime type. The sum of these is the
|
|
38
|
+
* total score. The higher the score, the more "official" the type.
|
|
39
|
+
*/
|
|
40
|
+
module.exports = function mimeScore (mimeType, source = 'default') {
|
|
41
|
+
if (mimeType === 'application/octet-stream') {
|
|
42
|
+
return 0
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const [type, subtype] = mimeType.split('/')
|
|
46
|
+
|
|
47
|
+
const facet = subtype.replace(/(\.|x-).*/, '$1')
|
|
48
|
+
|
|
49
|
+
const facetScore = FACET_SCORES[facet] || FACET_SCORES.default
|
|
50
|
+
const sourceScore = SOURCE_SCORES[source] || SOURCE_SCORES.default
|
|
51
|
+
const typeScore = TYPE_SCORES[type] || TYPE_SCORES.default
|
|
52
|
+
|
|
53
|
+
// All else being equal prefer shorter types
|
|
54
|
+
const lengthScore = 1 - mimeType.length / 100
|
|
55
|
+
|
|
56
|
+
return facetScore + sourceScore + typeScore + lengthScore
|
|
57
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mime-types",
|
|
3
|
+
"description": "The ultimate javascript content-type utility.",
|
|
4
|
+
"version": "3.0.2",
|
|
5
|
+
"contributors": [
|
|
6
|
+
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
|
+
"Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)",
|
|
8
|
+
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"mime",
|
|
13
|
+
"types"
|
|
14
|
+
],
|
|
15
|
+
"repository": "jshttp/mime-types",
|
|
16
|
+
"funding": {
|
|
17
|
+
"type": "opencollective",
|
|
18
|
+
"url": "https://opencollective.com/express"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"mime-db": "^1.54.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"eslint": "8.33.0",
|
|
25
|
+
"eslint-config-standard": "14.1.1",
|
|
26
|
+
"eslint-plugin-import": "2.32.0",
|
|
27
|
+
"eslint-plugin-markdown": "3.0.1",
|
|
28
|
+
"eslint-plugin-node": "11.1.0",
|
|
29
|
+
"eslint-plugin-promise": "6.6.0",
|
|
30
|
+
"eslint-plugin-standard": "4.1.0",
|
|
31
|
+
"mocha": "10.8.2",
|
|
32
|
+
"nyc": "15.1.0"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"HISTORY.md",
|
|
36
|
+
"LICENSE",
|
|
37
|
+
"index.js",
|
|
38
|
+
"mimeScore.js"
|
|
39
|
+
],
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"lint": "eslint .",
|
|
45
|
+
"test": "mocha --reporter spec test/test.js",
|
|
46
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
47
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "bun:test";
|
|
2
|
-
import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
3
|
-
import { ExtensionHarness } from "../../test-utils/extension-harness.js";
|
|
4
|
-
import planModeExtension from "../plan-mode-tool/index.js";
|
|
5
|
-
|
|
6
|
-
const PLAN_TEXT = [
|
|
7
|
-
"Plan:",
|
|
8
|
-
"1. Inspect tool failure paths in plan execution",
|
|
9
|
-
"2. Verify fallback behavior for blocked operations",
|
|
10
|
-
"3. Finalize recovery guidance for remaining step",
|
|
11
|
-
].join("\n");
|
|
12
|
-
|
|
13
|
-
interface ContextOptions {
|
|
14
|
-
readonly confirmResponse?: boolean;
|
|
15
|
-
readonly editorResponse?: string;
|
|
16
|
-
readonly hasUI: boolean;
|
|
17
|
-
readonly selectResponse?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Create a minimal extension context with configurable UI responses.
|
|
22
|
-
*
|
|
23
|
-
* @param options - Context and UI response options
|
|
24
|
-
* @returns Extension context for direct event firing
|
|
25
|
-
*/
|
|
26
|
-
function createContext(options: ContextOptions): ExtensionContext {
|
|
27
|
-
const theme = {
|
|
28
|
-
bg(_token: string, value: string) {
|
|
29
|
-
return value;
|
|
30
|
-
},
|
|
31
|
-
fg(_token: string, value: string) {
|
|
32
|
-
return value;
|
|
33
|
-
},
|
|
34
|
-
strikethrough(value: string) {
|
|
35
|
-
return value;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
abort: () => {},
|
|
41
|
-
compact: () => {},
|
|
42
|
-
cwd: process.cwd(),
|
|
43
|
-
getContextUsage: () => undefined,
|
|
44
|
-
getSystemPrompt: () => "",
|
|
45
|
-
hasPendingMessages: () => false,
|
|
46
|
-
hasUI: options.hasUI,
|
|
47
|
-
isIdle: () => true,
|
|
48
|
-
model: undefined,
|
|
49
|
-
modelRegistry: {
|
|
50
|
-
getApiKeyForProvider: async () => undefined,
|
|
51
|
-
} as never,
|
|
52
|
-
sessionManager: {
|
|
53
|
-
appendEntry: () => {},
|
|
54
|
-
getEntries: () => [],
|
|
55
|
-
} as never,
|
|
56
|
-
shutdown: () => {},
|
|
57
|
-
ui: {
|
|
58
|
-
async confirm() {
|
|
59
|
-
return options.confirmResponse ?? false;
|
|
60
|
-
},
|
|
61
|
-
async custom() {
|
|
62
|
-
return undefined as never;
|
|
63
|
-
},
|
|
64
|
-
async editor() {
|
|
65
|
-
return options.editorResponse;
|
|
66
|
-
},
|
|
67
|
-
async input() {
|
|
68
|
-
return undefined;
|
|
69
|
-
},
|
|
70
|
-
notify() {},
|
|
71
|
-
pasteToEditor() {},
|
|
72
|
-
async select() {
|
|
73
|
-
return options.selectResponse;
|
|
74
|
-
},
|
|
75
|
-
setEditorComponent() {},
|
|
76
|
-
setEditorText() {},
|
|
77
|
-
setFooter() {},
|
|
78
|
-
setHeader() {},
|
|
79
|
-
setStatus() {},
|
|
80
|
-
setTitle() {},
|
|
81
|
-
setToolsExpanded() {},
|
|
82
|
-
setWidget() {},
|
|
83
|
-
setWorkingMessage() {},
|
|
84
|
-
get theme() {
|
|
85
|
-
return theme as ExtensionContext["ui"]["theme"];
|
|
86
|
-
},
|
|
87
|
-
getAllThemes() {
|
|
88
|
-
return [];
|
|
89
|
-
},
|
|
90
|
-
getEditorText() {
|
|
91
|
-
return "";
|
|
92
|
-
},
|
|
93
|
-
getTheme() {
|
|
94
|
-
return undefined;
|
|
95
|
-
},
|
|
96
|
-
getToolsExpanded() {
|
|
97
|
-
return false;
|
|
98
|
-
},
|
|
99
|
-
setTheme() {
|
|
100
|
-
return { error: "Test stub", success: false };
|
|
101
|
-
},
|
|
102
|
-
} as ExtensionContext["ui"],
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Build an assistant message payload with a single text block.
|
|
108
|
-
*
|
|
109
|
-
* @param text - Assistant text content
|
|
110
|
-
* @returns Assistant message payload
|
|
111
|
-
*/
|
|
112
|
-
function assistantMessage(text: string): {
|
|
113
|
-
readonly content: readonly [{ readonly text: string; readonly type: "text" }];
|
|
114
|
-
readonly role: "assistant";
|
|
115
|
-
} {
|
|
116
|
-
return {
|
|
117
|
-
content: [{ text, type: "text" }],
|
|
118
|
-
role: "assistant",
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Initialize plan execution mode with a 3-step plan and tracking enabled.
|
|
124
|
-
*
|
|
125
|
-
* @param harness - Extension harness with plan-mode extension loaded
|
|
126
|
-
* @returns Promise that resolves once execution mode is active
|
|
127
|
-
*/
|
|
128
|
-
async function initializeExecutionMode(harness: ExtensionHarness): Promise<void> {
|
|
129
|
-
harness.setFlag("plan", true);
|
|
130
|
-
await harness.fireEvent(
|
|
131
|
-
"session_start",
|
|
132
|
-
{ type: "session_start" },
|
|
133
|
-
createContext({ hasUI: true })
|
|
134
|
-
);
|
|
135
|
-
await harness.fireEvent(
|
|
136
|
-
"agent_end",
|
|
137
|
-
{ messages: [assistantMessage(PLAN_TEXT)] },
|
|
138
|
-
createContext({
|
|
139
|
-
hasUI: true,
|
|
140
|
-
selectResponse: "Execute the plan (track progress)",
|
|
141
|
-
})
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Fire a failed tool_result event using the documented test payload shape.
|
|
147
|
-
*
|
|
148
|
-
* @param harness - Extension harness instance
|
|
149
|
-
* @param ctx - Extension context for the event
|
|
150
|
-
* @returns Promise that resolves after handlers run
|
|
151
|
-
*/
|
|
152
|
-
async function fireFailedToolResult(
|
|
153
|
-
harness: ExtensionHarness,
|
|
154
|
-
ctx: ExtensionContext
|
|
155
|
-
): Promise<void> {
|
|
156
|
-
await harness.fireEvent(
|
|
157
|
-
"tool_result",
|
|
158
|
-
{
|
|
159
|
-
content: [{ text: "blocked", type: "text" }],
|
|
160
|
-
input: { command: "echo blocked" },
|
|
161
|
-
isError: true,
|
|
162
|
-
toolCallId: "tool-call-1",
|
|
163
|
-
toolName: "bash",
|
|
164
|
-
},
|
|
165
|
-
ctx
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Fire a turn_end event that marks a plan step as complete.
|
|
171
|
-
*
|
|
172
|
-
* @param harness - Extension harness instance
|
|
173
|
-
* @param step - Step number to mark done
|
|
174
|
-
* @returns Promise that resolves after handlers run
|
|
175
|
-
*/
|
|
176
|
-
async function fireDoneStep(harness: ExtensionHarness, step: number): Promise<void> {
|
|
177
|
-
await harness.fireEvent(
|
|
178
|
-
"turn_end",
|
|
179
|
-
{ message: assistantMessage(`[DONE:${step}]`) },
|
|
180
|
-
createContext({ hasUI: true })
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
describe("Plan rejection feedback", () => {
|
|
185
|
-
it("ignores tool_result during execution when hasUI is false", async () => {
|
|
186
|
-
const harness = ExtensionHarness.create();
|
|
187
|
-
await harness.loadExtension(planModeExtension);
|
|
188
|
-
await initializeExecutionMode(harness);
|
|
189
|
-
|
|
190
|
-
await fireFailedToolResult(harness, createContext({ hasUI: false }));
|
|
191
|
-
|
|
192
|
-
expect(harness.sentUserMessages).toHaveLength(0);
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
it("sends steer guidance with Step 1 prefix when user confirms and provides guidance", async () => {
|
|
196
|
-
const harness = ExtensionHarness.create();
|
|
197
|
-
await harness.loadExtension(planModeExtension);
|
|
198
|
-
await initializeExecutionMode(harness);
|
|
199
|
-
|
|
200
|
-
await fireFailedToolResult(
|
|
201
|
-
harness,
|
|
202
|
-
createContext({
|
|
203
|
-
confirmResponse: true,
|
|
204
|
-
editorResponse: "Use a narrower inspection command and continue.",
|
|
205
|
-
hasUI: true,
|
|
206
|
-
})
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
expect(harness.sentUserMessages).toHaveLength(1);
|
|
210
|
-
const [message] = harness.sentUserMessages;
|
|
211
|
-
if (!message || typeof message.content !== "string") {
|
|
212
|
-
throw new Error("Expected one string user message");
|
|
213
|
-
}
|
|
214
|
-
expect(message.content.startsWith("[PLAN GUIDANCE — Step 1:")).toBe(true);
|
|
215
|
-
expect(message.options?.deliverAs).toBe("steer");
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
it("does not send guidance when user declines confirmation", async () => {
|
|
219
|
-
const harness = ExtensionHarness.create();
|
|
220
|
-
await harness.loadExtension(planModeExtension);
|
|
221
|
-
await initializeExecutionMode(harness);
|
|
222
|
-
|
|
223
|
-
await fireFailedToolResult(
|
|
224
|
-
harness,
|
|
225
|
-
createContext({
|
|
226
|
-
confirmResponse: false,
|
|
227
|
-
hasUI: true,
|
|
228
|
-
})
|
|
229
|
-
);
|
|
230
|
-
|
|
231
|
-
expect(harness.sentUserMessages).toHaveLength(0);
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
it("advances tracked step guidance to Step 3 and stops after all steps complete", async () => {
|
|
235
|
-
const harness = ExtensionHarness.create();
|
|
236
|
-
await harness.loadExtension(planModeExtension);
|
|
237
|
-
await initializeExecutionMode(harness);
|
|
238
|
-
|
|
239
|
-
await fireDoneStep(harness, 1);
|
|
240
|
-
await fireDoneStep(harness, 2);
|
|
241
|
-
|
|
242
|
-
await fireFailedToolResult(
|
|
243
|
-
harness,
|
|
244
|
-
createContext({
|
|
245
|
-
confirmResponse: true,
|
|
246
|
-
editorResponse: "Focus on the final verification sequence.",
|
|
247
|
-
hasUI: true,
|
|
248
|
-
})
|
|
249
|
-
);
|
|
250
|
-
|
|
251
|
-
expect(harness.sentUserMessages).toHaveLength(1);
|
|
252
|
-
const [stepThreeGuidance] = harness.sentUserMessages;
|
|
253
|
-
if (!stepThreeGuidance || typeof stepThreeGuidance.content !== "string") {
|
|
254
|
-
throw new Error("Expected one string user message");
|
|
255
|
-
}
|
|
256
|
-
expect(stepThreeGuidance.content.startsWith("[PLAN GUIDANCE — Step 3:")).toBe(true);
|
|
257
|
-
expect(stepThreeGuidance.options?.deliverAs).toBe("steer");
|
|
258
|
-
|
|
259
|
-
await fireDoneStep(harness, 3);
|
|
260
|
-
|
|
261
|
-
await fireFailedToolResult(
|
|
262
|
-
harness,
|
|
263
|
-
createContext({
|
|
264
|
-
confirmResponse: true,
|
|
265
|
-
editorResponse: "This should not be sent after completion.",
|
|
266
|
-
hasUI: true,
|
|
267
|
-
})
|
|
268
|
-
);
|
|
269
|
-
|
|
270
|
-
expect(harness.sentUserMessages).toHaveLength(1);
|
|
271
|
-
});
|
|
272
|
-
});
|