plugsuits 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +3 -0
- package/dist/agent-reasoning-default.test.d.ts +2 -0
- package/dist/agent-reasoning-default.test.d.ts.map +1 -0
- package/dist/agent-reasoning-default.test.js +38 -0
- package/dist/agent-reasoning-default.test.js.map +1 -0
- package/dist/agent.d.ts +61 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +308 -0
- package/dist/agent.js.map +1 -0
- package/dist/agent.test.d.ts +2 -0
- package/dist/agent.test.d.ts.map +1 -0
- package/dist/agent.test.js +38 -0
- package/dist/agent.test.js.map +1 -0
- package/dist/cli-args.d.ts +15 -0
- package/dist/cli-args.d.ts.map +1 -0
- package/dist/cli-args.js +63 -0
- package/dist/cli-args.js.map +1 -0
- package/dist/cli-args.test.d.ts +2 -0
- package/dist/cli-args.test.d.ts.map +1 -0
- package/dist/cli-args.test.js +105 -0
- package/dist/cli-args.test.js.map +1 -0
- package/dist/commands/aliases-and-tool-fallback.test.d.ts +2 -0
- package/dist/commands/aliases-and-tool-fallback.test.d.ts.map +1 -0
- package/dist/commands/aliases-and-tool-fallback.test.js +132 -0
- package/dist/commands/aliases-and-tool-fallback.test.js.map +1 -0
- package/dist/commands/clear.d.ts +3 -0
- package/dist/commands/clear.d.ts.map +1 -0
- package/dist/commands/clear.js +12 -0
- package/dist/commands/clear.js.map +1 -0
- package/dist/commands/factories/create-toggle-command.d.ts +13 -0
- package/dist/commands/factories/create-toggle-command.d.ts.map +1 -0
- package/dist/commands/factories/create-toggle-command.js +38 -0
- package/dist/commands/factories/create-toggle-command.js.map +1 -0
- package/dist/commands/help.d.ts +3 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +23 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/index.d.ts +18 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +82 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/model.d.ts +15 -0
- package/dist/commands/model.d.ts.map +1 -0
- package/dist/commands/model.js +100 -0
- package/dist/commands/model.js.map +1 -0
- package/dist/commands/reasoning-mode.d.ts +3 -0
- package/dist/commands/reasoning-mode.d.ts.map +1 -0
- package/dist/commands/reasoning-mode.js +47 -0
- package/dist/commands/reasoning-mode.js.map +1 -0
- package/dist/commands/render.d.ts +19 -0
- package/dist/commands/render.d.ts.map +1 -0
- package/dist/commands/render.js +140 -0
- package/dist/commands/render.js.map +1 -0
- package/dist/commands/render.test.d.ts +2 -0
- package/dist/commands/render.test.d.ts.map +1 -0
- package/dist/commands/render.test.js +36 -0
- package/dist/commands/render.test.js.map +1 -0
- package/dist/commands/tool-fallback.d.ts +3 -0
- package/dist/commands/tool-fallback.d.ts.map +1 -0
- package/dist/commands/tool-fallback.js +38 -0
- package/dist/commands/tool-fallback.js.map +1 -0
- package/dist/commands/translate.d.ts +3 -0
- package/dist/commands/translate.d.ts.map +1 -0
- package/dist/commands/translate.js +12 -0
- package/dist/commands/translate.js.map +1 -0
- package/dist/commands/translate.test.d.ts +2 -0
- package/dist/commands/translate.test.d.ts.map +1 -0
- package/dist/commands/translate.test.js +49 -0
- package/dist/commands/translate.test.js.map +1 -0
- package/dist/commands/types.d.ts +17 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +2 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/context/environment-context.d.ts +2 -0
- package/dist/context/environment-context.d.ts.map +1 -0
- package/dist/context/environment-context.js +11 -0
- package/dist/context/environment-context.js.map +1 -0
- package/dist/context/paths.d.ts +3 -0
- package/dist/context/paths.d.ts.map +1 -0
- package/dist/context/paths.js +3 -0
- package/dist/context/paths.js.map +1 -0
- package/dist/context/session.d.ts +4 -0
- package/dist/context/session.d.ts.map +1 -0
- package/dist/context/session.js +16 -0
- package/dist/context/session.js.map +1 -0
- package/dist/context/skill-command-prefix.d.ts +4 -0
- package/dist/context/skill-command-prefix.d.ts.map +1 -0
- package/dist/context/skill-command-prefix.js +15 -0
- package/dist/context/skill-command-prefix.js.map +1 -0
- package/dist/context/skills-integration.test.d.ts +2 -0
- package/dist/context/skills-integration.test.d.ts.map +1 -0
- package/dist/context/skills-integration.test.js +87 -0
- package/dist/context/skills-integration.test.js.map +1 -0
- package/dist/context/skills.d.ts +18 -0
- package/dist/context/skills.d.ts.map +1 -0
- package/dist/context/skills.js +431 -0
- package/dist/context/skills.js.map +1 -0
- package/dist/context/skills.test.d.ts +2 -0
- package/dist/context/skills.test.d.ts.map +1 -0
- package/dist/context/skills.test.js +20 -0
- package/dist/context/skills.test.js.map +1 -0
- package/dist/context/system-prompt.d.ts +2 -0
- package/dist/context/system-prompt.d.ts.map +1 -0
- package/dist/context/system-prompt.js +100 -0
- package/dist/context/system-prompt.js.map +1 -0
- package/dist/context/translation-integration.test.d.ts +2 -0
- package/dist/context/translation-integration.test.d.ts.map +1 -0
- package/dist/context/translation-integration.test.js +138 -0
- package/dist/context/translation-integration.test.js.map +1 -0
- package/dist/context/translation.d.ts +21 -0
- package/dist/context/translation.d.ts.map +1 -0
- package/dist/context/translation.js +82 -0
- package/dist/context/translation.js.map +1 -0
- package/dist/context/translation.test.d.ts +2 -0
- package/dist/context/translation.test.d.ts.map +1 -0
- package/dist/context/translation.test.js +129 -0
- package/dist/context/translation.test.js.map +1 -0
- package/dist/entrypoints/cli-input-rendering.test.d.ts +2 -0
- package/dist/entrypoints/cli-input-rendering.test.d.ts.map +1 -0
- package/dist/entrypoints/cli-input-rendering.test.js +192 -0
- package/dist/entrypoints/cli-input-rendering.test.js.map +1 -0
- package/dist/entrypoints/cli.d.ts +3 -0
- package/dist/entrypoints/cli.d.ts.map +1 -0
- package/dist/entrypoints/cli.js +1268 -0
- package/dist/entrypoints/cli.js.map +1 -0
- package/dist/entrypoints/headless-agent-config.d.ts +21 -0
- package/dist/entrypoints/headless-agent-config.d.ts.map +1 -0
- package/dist/entrypoints/headless-agent-config.js +15 -0
- package/dist/entrypoints/headless-agent-config.js.map +1 -0
- package/dist/entrypoints/headless-agent-config.test.d.ts +2 -0
- package/dist/entrypoints/headless-agent-config.test.d.ts.map +1 -0
- package/dist/entrypoints/headless-agent-config.test.js +63 -0
- package/dist/entrypoints/headless-agent-config.test.js.map +1 -0
- package/dist/entrypoints/headless.d.ts +3 -0
- package/dist/entrypoints/headless.d.ts.map +1 -0
- package/dist/entrypoints/headless.js +396 -0
- package/dist/entrypoints/headless.js.map +1 -0
- package/dist/env.d.ts +8 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +14 -0
- package/dist/env.js.map +1 -0
- package/dist/friendli-models.d.ts +21 -0
- package/dist/friendli-models.d.ts.map +1 -0
- package/dist/friendli-models.js +57 -0
- package/dist/friendli-models.js.map +1 -0
- package/dist/friendli-reasoning.d.ts +10 -0
- package/dist/friendli-reasoning.d.ts.map +1 -0
- package/dist/friendli-reasoning.js +181 -0
- package/dist/friendli-reasoning.js.map +1 -0
- package/dist/friendli-reasoning.test.d.ts +2 -0
- package/dist/friendli-reasoning.test.d.ts.map +1 -0
- package/dist/friendli-reasoning.test.js +77 -0
- package/dist/friendli-reasoning.test.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/colors.d.ts +22 -0
- package/dist/interaction/colors.d.ts.map +1 -0
- package/dist/interaction/colors.js +24 -0
- package/dist/interaction/colors.js.map +1 -0
- package/dist/interaction/pi-tui-stream-renderer.d.ts +19 -0
- package/dist/interaction/pi-tui-stream-renderer.d.ts.map +1 -0
- package/dist/interaction/pi-tui-stream-renderer.js +1509 -0
- package/dist/interaction/pi-tui-stream-renderer.js.map +1 -0
- package/dist/interaction/pi-tui-stream-renderer.test.d.ts +2 -0
- package/dist/interaction/pi-tui-stream-renderer.test.d.ts.map +1 -0
- package/dist/interaction/pi-tui-stream-renderer.test.js +1314 -0
- package/dist/interaction/pi-tui-stream-renderer.test.js.map +1 -0
- package/dist/interaction/spinner.d.ts +13 -0
- package/dist/interaction/spinner.d.ts.map +1 -0
- package/dist/interaction/spinner.js +51 -0
- package/dist/interaction/spinner.js.map +1 -0
- package/dist/middleware/index.d.ts +7 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +15 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/todo-continuation.d.ts +11 -0
- package/dist/middleware/todo-continuation.d.ts.map +1 -0
- package/dist/middleware/todo-continuation.js +103 -0
- package/dist/middleware/todo-continuation.js.map +1 -0
- package/dist/middleware/trim-leading-newlines.d.ts +3 -0
- package/dist/middleware/trim-leading-newlines.d.ts.map +1 -0
- package/dist/middleware/trim-leading-newlines.js +49 -0
- package/dist/middleware/trim-leading-newlines.js.map +1 -0
- package/dist/reasoning-mode.d.ts +5 -0
- package/dist/reasoning-mode.d.ts.map +1 -0
- package/dist/reasoning-mode.js +30 -0
- package/dist/reasoning-mode.js.map +1 -0
- package/dist/reasoning-mode.test.d.ts +2 -0
- package/dist/reasoning-mode.test.d.ts.map +1 -0
- package/dist/reasoning-mode.test.js +22 -0
- package/dist/reasoning-mode.test.js.map +1 -0
- package/dist/tool-fallback-mode.d.ts +6 -0
- package/dist/tool-fallback-mode.d.ts.map +1 -0
- package/dist/tool-fallback-mode.js +25 -0
- package/dist/tool-fallback-mode.js.map +1 -0
- package/dist/tools/execute/shell-execute.d.ts +17 -0
- package/dist/tools/execute/shell-execute.d.ts.map +1 -0
- package/dist/tools/execute/shell-execute.js +55 -0
- package/dist/tools/execute/shell-execute.js.map +1 -0
- package/dist/tools/execute/shell-execute.test.d.ts +2 -0
- package/dist/tools/execute/shell-execute.test.d.ts.map +1 -0
- package/dist/tools/execute/shell-execute.test.js +86 -0
- package/dist/tools/execute/shell-execute.test.js.map +1 -0
- package/dist/tools/execute/shell-interact.d.ts +10 -0
- package/dist/tools/execute/shell-interact.d.ts.map +1 -0
- package/dist/tools/execute/shell-interact.js +122 -0
- package/dist/tools/execute/shell-interact.js.map +1 -0
- package/dist/tools/execute/shell-interact.test.d.ts +2 -0
- package/dist/tools/execute/shell-interact.test.d.ts.map +1 -0
- package/dist/tools/execute/shell-interact.test.js +175 -0
- package/dist/tools/execute/shell-interact.test.js.map +1 -0
- package/dist/tools/explore/glob.d.ts +15 -0
- package/dist/tools/explore/glob.d.ts.map +1 -0
- package/dist/tools/explore/glob.js +107 -0
- package/dist/tools/explore/glob.js.map +1 -0
- package/dist/tools/explore/glob.test.d.ts +2 -0
- package/dist/tools/explore/glob.test.d.ts.map +1 -0
- package/dist/tools/explore/glob.test.js +183 -0
- package/dist/tools/explore/glob.test.js.map +1 -0
- package/dist/tools/explore/grep.d.ts +27 -0
- package/dist/tools/explore/grep.d.ts.map +1 -0
- package/dist/tools/explore/grep.js +203 -0
- package/dist/tools/explore/grep.js.map +1 -0
- package/dist/tools/explore/grep.test.d.ts +2 -0
- package/dist/tools/explore/grep.test.d.ts.map +1 -0
- package/dist/tools/explore/grep.test.js +132 -0
- package/dist/tools/explore/grep.test.js.map +1 -0
- package/dist/tools/explore/read-file.d.ts +23 -0
- package/dist/tools/explore/read-file.d.ts.map +1 -0
- package/dist/tools/explore/read-file.js +84 -0
- package/dist/tools/explore/read-file.js.map +1 -0
- package/dist/tools/explore/read-file.test.d.ts +2 -0
- package/dist/tools/explore/read-file.test.d.ts.map +1 -0
- package/dist/tools/explore/read-file.test.js +278 -0
- package/dist/tools/explore/read-file.test.js.map +1 -0
- package/dist/tools/index.d.ts +71 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +26 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/modify/delete-file.d.ts +19 -0
- package/dist/tools/modify/delete-file.d.ts.map +1 -0
- package/dist/tools/modify/delete-file.js +71 -0
- package/dist/tools/modify/delete-file.js.map +1 -0
- package/dist/tools/modify/delete-file.test.d.ts +2 -0
- package/dist/tools/modify/delete-file.test.d.ts.map +1 -0
- package/dist/tools/modify/delete-file.test.js +136 -0
- package/dist/tools/modify/delete-file.test.js.map +1 -0
- package/dist/tools/modify/edit-file-diagnostics.d.ts +17 -0
- package/dist/tools/modify/edit-file-diagnostics.d.ts.map +1 -0
- package/dist/tools/modify/edit-file-diagnostics.js +157 -0
- package/dist/tools/modify/edit-file-diagnostics.js.map +1 -0
- package/dist/tools/modify/edit-file-repair.d.ts +13 -0
- package/dist/tools/modify/edit-file-repair.d.ts.map +1 -0
- package/dist/tools/modify/edit-file-repair.js +135 -0
- package/dist/tools/modify/edit-file-repair.js.map +1 -0
- package/dist/tools/modify/edit-file-stress.test.d.ts +2 -0
- package/dist/tools/modify/edit-file-stress.test.d.ts.map +1 -0
- package/dist/tools/modify/edit-file-stress.test.js +163 -0
- package/dist/tools/modify/edit-file-stress.test.js.map +1 -0
- package/dist/tools/modify/edit-file-validation.d.ts +9 -0
- package/dist/tools/modify/edit-file-validation.d.ts.map +1 -0
- package/dist/tools/modify/edit-file-validation.js +86 -0
- package/dist/tools/modify/edit-file-validation.js.map +1 -0
- package/dist/tools/modify/edit-file-whitespace.test.d.ts +2 -0
- package/dist/tools/modify/edit-file-whitespace.test.d.ts.map +1 -0
- package/dist/tools/modify/edit-file-whitespace.test.js +90 -0
- package/dist/tools/modify/edit-file-whitespace.test.js.map +1 -0
- package/dist/tools/modify/edit-file.d.ts +33 -0
- package/dist/tools/modify/edit-file.d.ts.map +1 -0
- package/dist/tools/modify/edit-file.js +177 -0
- package/dist/tools/modify/edit-file.js.map +1 -0
- package/dist/tools/modify/edit-file.test.d.ts +2 -0
- package/dist/tools/modify/edit-file.test.d.ts.map +1 -0
- package/dist/tools/modify/edit-file.test.js +948 -0
- package/dist/tools/modify/edit-file.test.js.map +1 -0
- package/dist/tools/modify/write-file.d.ts +17 -0
- package/dist/tools/modify/write-file.d.ts.map +1 -0
- package/dist/tools/modify/write-file.js +39 -0
- package/dist/tools/modify/write-file.js.map +1 -0
- package/dist/tools/modify/write-file.test.d.ts +2 -0
- package/dist/tools/modify/write-file.test.d.ts.map +1 -0
- package/dist/tools/modify/write-file.test.js +168 -0
- package/dist/tools/modify/write-file.test.js.map +1 -0
- package/dist/tools/planning/load-skill.d.ts +13 -0
- package/dist/tools/planning/load-skill.d.ts.map +1 -0
- package/dist/tools/planning/load-skill.js +101 -0
- package/dist/tools/planning/load-skill.js.map +1 -0
- package/dist/tools/planning/load-skill.test.d.ts +2 -0
- package/dist/tools/planning/load-skill.test.d.ts.map +1 -0
- package/dist/tools/planning/load-skill.test.js +37 -0
- package/dist/tools/planning/load-skill.test.js.map +1 -0
- package/dist/tools/planning/todo-write.d.ts +49 -0
- package/dist/tools/planning/todo-write.d.ts.map +1 -0
- package/dist/tools/planning/todo-write.js +118 -0
- package/dist/tools/planning/todo-write.js.map +1 -0
- package/dist/tools/planning/todo-write.test.d.ts +2 -0
- package/dist/tools/planning/todo-write.test.d.ts.map +1 -0
- package/dist/tools/planning/todo-write.test.js +82 -0
- package/dist/tools/planning/todo-write.test.js.map +1 -0
- package/dist/tools/utils/execute/format-utils.d.ts +4 -0
- package/dist/tools/utils/execute/format-utils.d.ts.map +1 -0
- package/dist/tools/utils/execute/format-utils.js +31 -0
- package/dist/tools/utils/execute/format-utils.js.map +1 -0
- package/dist/tools/utils/execute/format-utils.test.d.ts +2 -0
- package/dist/tools/utils/execute/format-utils.test.d.ts.map +1 -0
- package/dist/tools/utils/execute/format-utils.test.js +40 -0
- package/dist/tools/utils/execute/format-utils.test.js.map +1 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.d.ts +12 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.d.ts.map +1 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.js +269 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.js.map +1 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.test.d.ts +2 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.test.d.ts.map +1 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.test.js +233 -0
- package/dist/tools/utils/execute/noninteractive-wrapper.test.js.map +1 -0
- package/dist/tools/utils/execute/output-handler.d.ts +14 -0
- package/dist/tools/utils/execute/output-handler.d.ts.map +1 -0
- package/dist/tools/utils/execute/output-handler.js +71 -0
- package/dist/tools/utils/execute/output-handler.js.map +1 -0
- package/dist/tools/utils/execute/output-handler.test.d.ts +2 -0
- package/dist/tools/utils/execute/output-handler.test.d.ts.map +1 -0
- package/dist/tools/utils/execute/output-handler.test.js +58 -0
- package/dist/tools/utils/execute/output-handler.test.js.map +1 -0
- package/dist/tools/utils/execute/process-manager.d.ts +17 -0
- package/dist/tools/utils/execute/process-manager.d.ts.map +1 -0
- package/dist/tools/utils/execute/process-manager.js +229 -0
- package/dist/tools/utils/execute/process-manager.js.map +1 -0
- package/dist/tools/utils/execute/process-manager.test.d.ts +2 -0
- package/dist/tools/utils/execute/process-manager.test.d.ts.map +1 -0
- package/dist/tools/utils/execute/process-manager.test.js +139 -0
- package/dist/tools/utils/execute/process-manager.test.js.map +1 -0
- package/dist/tools/utils/execute/shell-detection.d.ts +3 -0
- package/dist/tools/utils/execute/shell-detection.d.ts.map +1 -0
- package/dist/tools/utils/execute/shell-detection.js +56 -0
- package/dist/tools/utils/execute/shell-detection.js.map +1 -0
- package/dist/tools/utils/execute/shell-detection.test.d.ts +2 -0
- package/dist/tools/utils/execute/shell-detection.test.d.ts.map +1 -0
- package/dist/tools/utils/execute/shell-detection.test.js +86 -0
- package/dist/tools/utils/execute/shell-detection.test.js.map +1 -0
- package/dist/tools/utils/hashline/autocorrect-replacement-lines.d.ts +5 -0
- package/dist/tools/utils/hashline/autocorrect-replacement-lines.d.ts.map +1 -0
- package/dist/tools/utils/hashline/autocorrect-replacement-lines.js +113 -0
- package/dist/tools/utils/hashline/autocorrect-replacement-lines.js.map +1 -0
- package/dist/tools/utils/hashline/constants.d.ts +5 -0
- package/dist/tools/utils/hashline/constants.d.ts.map +1 -0
- package/dist/tools/utils/hashline/constants.js +11 -0
- package/dist/tools/utils/hashline/constants.js.map +1 -0
- package/dist/tools/utils/hashline/diff-utils.d.ts +7 -0
- package/dist/tools/utils/hashline/diff-utils.d.ts.map +1 -0
- package/dist/tools/utils/hashline/diff-utils.js +50 -0
- package/dist/tools/utils/hashline/diff-utils.js.map +1 -0
- package/dist/tools/utils/hashline/diff-utils.test.d.ts +2 -0
- package/dist/tools/utils/hashline/diff-utils.test.d.ts.map +1 -0
- package/dist/tools/utils/hashline/diff-utils.test.js +46 -0
- package/dist/tools/utils/hashline/diff-utils.test.js.map +1 -0
- package/dist/tools/utils/hashline/edit-deduplication.d.ts +6 -0
- package/dist/tools/utils/hashline/edit-deduplication.d.ts.map +1 -0
- package/dist/tools/utils/hashline/edit-deduplication.js +32 -0
- package/dist/tools/utils/hashline/edit-deduplication.js.map +1 -0
- package/dist/tools/utils/hashline/edit-operation-primitives.d.ts +11 -0
- package/dist/tools/utils/hashline/edit-operation-primitives.d.ts.map +1 -0
- package/dist/tools/utils/hashline/edit-operation-primitives.js +93 -0
- package/dist/tools/utils/hashline/edit-operation-primitives.js.map +1 -0
- package/dist/tools/utils/hashline/edit-operations.d.ts +9 -0
- package/dist/tools/utils/hashline/edit-operations.d.ts.map +1 -0
- package/dist/tools/utils/hashline/edit-operations.js +101 -0
- package/dist/tools/utils/hashline/edit-operations.js.map +1 -0
- package/dist/tools/utils/hashline/edit-operations.test.d.ts +2 -0
- package/dist/tools/utils/hashline/edit-operations.test.d.ts.map +1 -0
- package/dist/tools/utils/hashline/edit-operations.test.js +135 -0
- package/dist/tools/utils/hashline/edit-operations.test.js.map +1 -0
- package/dist/tools/utils/hashline/edit-ordering.d.ts +5 -0
- package/dist/tools/utils/hashline/edit-ordering.d.ts.map +1 -0
- package/dist/tools/utils/hashline/edit-ordering.js +54 -0
- package/dist/tools/utils/hashline/edit-ordering.js.map +1 -0
- package/dist/tools/utils/hashline/edit-text-normalization.d.ts +9 -0
- package/dist/tools/utils/hashline/edit-text-normalization.d.ts.map +1 -0
- package/dist/tools/utils/hashline/edit-text-normalization.js +135 -0
- package/dist/tools/utils/hashline/edit-text-normalization.js.map +1 -0
- package/dist/tools/utils/hashline/file-text-canonicalization.d.ts +8 -0
- package/dist/tools/utils/hashline/file-text-canonicalization.d.ts.map +1 -0
- package/dist/tools/utils/hashline/file-text-canonicalization.js +42 -0
- package/dist/tools/utils/hashline/file-text-canonicalization.js.map +1 -0
- package/dist/tools/utils/hashline/hash-computation.d.ts +14 -0
- package/dist/tools/utils/hashline/hash-computation.d.ts.map +1 -0
- package/dist/tools/utils/hashline/hash-computation.js +158 -0
- package/dist/tools/utils/hashline/hash-computation.js.map +1 -0
- package/dist/tools/utils/hashline/hash-computation.test.d.ts +2 -0
- package/dist/tools/utils/hashline/hash-computation.test.d.ts.map +1 -0
- package/dist/tools/utils/hashline/hash-computation.test.js +63 -0
- package/dist/tools/utils/hashline/hash-computation.test.js.map +1 -0
- package/dist/tools/utils/hashline/hashline-chunk-formatter.d.ts +11 -0
- package/dist/tools/utils/hashline/hashline-chunk-formatter.d.ts.map +1 -0
- package/dist/tools/utils/hashline/hashline-chunk-formatter.js +41 -0
- package/dist/tools/utils/hashline/hashline-chunk-formatter.js.map +1 -0
- package/dist/tools/utils/hashline/hashline-edit-diff.d.ts +2 -0
- package/dist/tools/utils/hashline/hashline-edit-diff.d.ts.map +1 -0
- package/dist/tools/utils/hashline/hashline-edit-diff.js +27 -0
- package/dist/tools/utils/hashline/hashline-edit-diff.js.map +1 -0
- package/dist/tools/utils/hashline/index.d.ts +14 -0
- package/dist/tools/utils/hashline/index.d.ts.map +1 -0
- package/dist/tools/utils/hashline/index.js +11 -0
- package/dist/tools/utils/hashline/index.js.map +1 -0
- package/dist/tools/utils/hashline/merge-expansion.d.ts +4 -0
- package/dist/tools/utils/hashline/merge-expansion.d.ts.map +1 -0
- package/dist/tools/utils/hashline/merge-expansion.js +105 -0
- package/dist/tools/utils/hashline/merge-expansion.js.map +1 -0
- package/dist/tools/utils/hashline/normalize-edits.d.ts +11 -0
- package/dist/tools/utils/hashline/normalize-edits.d.ts.map +1 -0
- package/dist/tools/utils/hashline/normalize-edits.js +81 -0
- package/dist/tools/utils/hashline/normalize-edits.js.map +1 -0
- package/dist/tools/utils/hashline/types.d.ts +18 -0
- package/dist/tools/utils/hashline/types.d.ts.map +1 -0
- package/dist/tools/utils/hashline/types.js +2 -0
- package/dist/tools/utils/hashline/types.js.map +1 -0
- package/dist/tools/utils/hashline/validation.d.ts +19 -0
- package/dist/tools/utils/hashline/validation.d.ts.map +1 -0
- package/dist/tools/utils/hashline/validation.js +161 -0
- package/dist/tools/utils/hashline/validation.js.map +1 -0
- package/dist/tools/utils/hashline/validation.test.d.ts +2 -0
- package/dist/tools/utils/hashline/validation.test.d.ts.map +1 -0
- package/dist/tools/utils/hashline/validation.test.js +86 -0
- package/dist/tools/utils/hashline/validation.test.js.map +1 -0
- package/dist/tools/utils/safety-utils.d.ts +66 -0
- package/dist/tools/utils/safety-utils.d.ts.map +1 -0
- package/dist/tools/utils/safety-utils.js +681 -0
- package/dist/tools/utils/safety-utils.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +16 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +257 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/package.json +49 -0
- package/src/AGENTS.md +52 -0
- package/src/agent-reasoning-default.test.ts +48 -0
- package/src/agent.test.ts +49 -0
- package/src/agent.ts +455 -0
- package/src/cli-args.test.ts +152 -0
- package/src/cli-args.ts +90 -0
- package/src/commands/aliases-and-tool-fallback.test.ts +172 -0
- package/src/commands/clear.ts +14 -0
- package/src/commands/factories/create-toggle-command.ts +68 -0
- package/src/commands/help.ts +30 -0
- package/src/commands/index.ts +125 -0
- package/src/commands/model.ts +146 -0
- package/src/commands/reasoning-mode.ts +55 -0
- package/src/commands/render.test.ts +47 -0
- package/src/commands/render.ts +205 -0
- package/src/commands/tool-fallback.ts +47 -0
- package/src/commands/translate.test.ts +62 -0
- package/src/commands/translate.ts +14 -0
- package/src/commands/types.ts +18 -0
- package/src/context/environment-context.ts +11 -0
- package/src/context/paths.ts +2 -0
- package/src/context/session.ts +18 -0
- package/src/context/skill-command-prefix.ts +18 -0
- package/src/context/skills-integration.test.ts +113 -0
- package/src/context/skills.test.ts +25 -0
- package/src/context/skills.ts +566 -0
- package/src/context/system-prompt.ts +100 -0
- package/src/context/translation-integration.test.ts +194 -0
- package/src/context/translation.test.ts +186 -0
- package/src/context/translation.ts +122 -0
- package/src/entrypoints/AGENTS.md +33 -0
- package/src/entrypoints/cli-input-rendering.test.ts +236 -0
- package/src/entrypoints/cli.ts +1845 -0
- package/src/entrypoints/headless-agent-config.test.ts +82 -0
- package/src/entrypoints/headless-agent-config.ts +42 -0
- package/src/entrypoints/headless.ts +622 -0
- package/src/env.ts +14 -0
- package/src/friendli-models.ts +81 -0
- package/src/friendli-reasoning.test.ts +147 -0
- package/src/friendli-reasoning.ts +280 -0
- package/src/index.ts +3 -0
- package/src/interaction/colors.ts +24 -0
- package/src/interaction/pi-tui-stream-renderer.test.ts +1471 -0
- package/src/interaction/pi-tui-stream-renderer.ts +2150 -0
- package/src/interaction/spinner.ts +61 -0
- package/src/middleware/index.ts +32 -0
- package/src/middleware/todo-continuation.ts +128 -0
- package/src/middleware/trim-leading-newlines.ts +66 -0
- package/src/reasoning-mode.test.ts +24 -0
- package/src/reasoning-mode.ts +40 -0
- package/src/skills/example/SKILL.md +44 -0
- package/src/skills/example/references/api.md +37 -0
- package/src/skills/example/scripts/setup.sh +13 -0
- package/src/skills/git-workflow.md +405 -0
- package/src/tool-fallback-mode.ts +34 -0
- package/src/tools/AGENTS.md +44 -0
- package/src/tools/execute/shell-execute.test.ts +114 -0
- package/src/tools/execute/shell-execute.ts +74 -0
- package/src/tools/execute/shell-execute.txt +27 -0
- package/src/tools/execute/shell-interact.test.ts +236 -0
- package/src/tools/execute/shell-interact.ts +151 -0
- package/src/tools/execute/shell-interact.txt +15 -0
- package/src/tools/explore/glob-files.txt +8 -0
- package/src/tools/explore/glob.test.ts +217 -0
- package/src/tools/explore/glob.ts +137 -0
- package/src/tools/explore/grep-files.txt +12 -0
- package/src/tools/explore/grep.test.ts +183 -0
- package/src/tools/explore/grep.ts +266 -0
- package/src/tools/explore/read-file.test.ts +355 -0
- package/src/tools/explore/read-file.ts +102 -0
- package/src/tools/explore/read-file.txt +24 -0
- package/src/tools/index.ts +29 -0
- package/src/tools/modify/AGENTS.md +38 -0
- package/src/tools/modify/delete-file.test.ts +200 -0
- package/src/tools/modify/delete-file.ts +95 -0
- package/src/tools/modify/delete-file.txt +9 -0
- package/src/tools/modify/edit-file-diagnostics.ts +210 -0
- package/src/tools/modify/edit-file-repair.ts +183 -0
- package/src/tools/modify/edit-file-stress.test.ts +200 -0
- package/src/tools/modify/edit-file-validation.ts +134 -0
- package/src/tools/modify/edit-file-whitespace.test.ts +117 -0
- package/src/tools/modify/edit-file.test.ts +1231 -0
- package/src/tools/modify/edit-file.ts +252 -0
- package/src/tools/modify/edit-file.txt +73 -0
- package/src/tools/modify/write-file.test.ts +240 -0
- package/src/tools/modify/write-file.ts +56 -0
- package/src/tools/modify/write-file.txt +9 -0
- package/src/tools/planning/load-skill.test.ts +48 -0
- package/src/tools/planning/load-skill.ts +136 -0
- package/src/tools/planning/load-skill.txt +6 -0
- package/src/tools/planning/todo-write.test.ts +91 -0
- package/src/tools/planning/todo-write.ts +141 -0
- package/src/tools/planning/todo-write.txt +7 -0
- package/src/tools/utils/execute/format-utils.test.ts +53 -0
- package/src/tools/utils/execute/format-utils.ts +37 -0
- package/src/tools/utils/execute/noninteractive-wrapper.test.ts +306 -0
- package/src/tools/utils/execute/noninteractive-wrapper.ts +314 -0
- package/src/tools/utils/execute/output-handler.test.ts +72 -0
- package/src/tools/utils/execute/output-handler.ts +101 -0
- package/src/tools/utils/execute/process-manager.test.ts +175 -0
- package/src/tools/utils/execute/process-manager.ts +310 -0
- package/src/tools/utils/execute/shell-detection.test.ts +112 -0
- package/src/tools/utils/execute/shell-detection.ts +72 -0
- package/src/tools/utils/hashline/autocorrect-replacement-lines.ts +159 -0
- package/src/tools/utils/hashline/constants.ts +13 -0
- package/src/tools/utils/hashline/diff-utils.test.ts +61 -0
- package/src/tools/utils/hashline/diff-utils.ts +64 -0
- package/src/tools/utils/hashline/edit-deduplication.ts +40 -0
- package/src/tools/utils/hashline/edit-operation-primitives.ts +149 -0
- package/src/tools/utils/hashline/edit-operations.test.ts +154 -0
- package/src/tools/utils/hashline/edit-operations.ts +132 -0
- package/src/tools/utils/hashline/edit-ordering.ts +60 -0
- package/src/tools/utils/hashline/edit-text-normalization.ts +180 -0
- package/src/tools/utils/hashline/file-text-canonicalization.ts +58 -0
- package/src/tools/utils/hashline/hash-computation.test.ts +82 -0
- package/src/tools/utils/hashline/hash-computation.ts +199 -0
- package/src/tools/utils/hashline/hashline-chunk-formatter.ts +61 -0
- package/src/tools/utils/hashline/hashline-edit-diff.ts +35 -0
- package/src/tools/utils/hashline/index.ts +55 -0
- package/src/tools/utils/hashline/merge-expansion.ts +120 -0
- package/src/tools/utils/hashline/normalize-edits.ts +127 -0
- package/src/tools/utils/hashline/types.ts +20 -0
- package/src/tools/utils/hashline/validation.test.ts +109 -0
- package/src/tools/utils/hashline/validation.ts +212 -0
- package/src/tools/utils/safety-utils.ts +938 -0
- package/src/utils/tools-manager.ts +353 -0
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Git Workflow
|
|
3
|
+
description: Complete git workflow including branch management, commits, and GitHub PR creation using gh CLI. Use when user requests to create PR, push changes, commit code, or perform git operations with GitHub.
|
|
4
|
+
triggers:
|
|
5
|
+
- create pr
|
|
6
|
+
- make pull request
|
|
7
|
+
- commit and push
|
|
8
|
+
- gh pr create
|
|
9
|
+
- push changes
|
|
10
|
+
- create pull request
|
|
11
|
+
- 올려줘
|
|
12
|
+
- PR 만들어줘
|
|
13
|
+
- 커밋해줘
|
|
14
|
+
- 푸시해줘
|
|
15
|
+
version: 1.0.0
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Git Workflow Skill
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
This skill provides comprehensive guidance for git operations, branch management, commit creation, and **GitHub Pull Request creation using GitHub CLI**.
|
|
23
|
+
|
|
24
|
+
## Core Responsibilities
|
|
25
|
+
|
|
26
|
+
1. **Branch Management** - Create, switch, and manage feature branches
|
|
27
|
+
2. **Commit Operations** - Stage changes and create meaningful commits
|
|
28
|
+
3. **Push Operations** - Push branches to remote repository
|
|
29
|
+
4. **Pull Request Creation** - Create PRs using GitHub CLI (`gh pr create`)
|
|
30
|
+
5. **Workflow Completion** - Ensure full cycle from changes to PR
|
|
31
|
+
|
|
32
|
+
## Available Tools
|
|
33
|
+
|
|
34
|
+
- `shell_execute` - Execute git and gh CLI commands
|
|
35
|
+
- `read_file` - Read git config, commit messages, PR templates
|
|
36
|
+
- `grep_files` - Search for patterns in git history
|
|
37
|
+
- `glob_files` - Find git-related files
|
|
38
|
+
|
|
39
|
+
## Git Command Reference
|
|
40
|
+
|
|
41
|
+
### Safe Commands (Always OK)
|
|
42
|
+
```bash
|
|
43
|
+
git status # Check working tree status
|
|
44
|
+
git branch # List branches
|
|
45
|
+
git log # View commit history
|
|
46
|
+
git diff # Show changes
|
|
47
|
+
git show # Show commit details
|
|
48
|
+
gh pr list # List pull requests
|
|
49
|
+
gh pr view # View PR details
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Careful Commands (Require Verification)
|
|
53
|
+
```bash
|
|
54
|
+
git checkout -b <branch> # Create new branch
|
|
55
|
+
git add . # Stage all changes
|
|
56
|
+
git commit -m "message" # Create commit
|
|
57
|
+
git push -u origin <branch> # Push new branch
|
|
58
|
+
gh pr create # Create pull request
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Dangerous Commands (Require Explicit User Confirmation)
|
|
62
|
+
```bash
|
|
63
|
+
git push --force # Force push (NEVER on main/master)
|
|
64
|
+
git reset --hard # Discard changes permanently
|
|
65
|
+
git rebase # Rewrite history
|
|
66
|
+
git push --delete # Delete remote branch
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Workflow Patterns
|
|
70
|
+
|
|
71
|
+
### Standard Feature Workflow
|
|
72
|
+
|
|
73
|
+
When user requests "create PR" or "make a pull request":
|
|
74
|
+
|
|
75
|
+
**Step 1: Check Current State**
|
|
76
|
+
```bash
|
|
77
|
+
git status
|
|
78
|
+
git branch
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Step 2: Create Feature Branch (if needed)**
|
|
82
|
+
```bash
|
|
83
|
+
# Branch naming conventions:
|
|
84
|
+
# - feature/description
|
|
85
|
+
# - fix/issue-description
|
|
86
|
+
# - refactor/component-name
|
|
87
|
+
# - docs/topic
|
|
88
|
+
|
|
89
|
+
git checkout -b feature/descriptive-name
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Step 3: Stage Changes**
|
|
93
|
+
```bash
|
|
94
|
+
git add .
|
|
95
|
+
# Or selectively:
|
|
96
|
+
git add src/specific/file.ts
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Step 4: Create Descriptive Commit**
|
|
100
|
+
```bash
|
|
101
|
+
# Commit message format:
|
|
102
|
+
# <type>: <short description>
|
|
103
|
+
#
|
|
104
|
+
# <detailed explanation if needed>
|
|
105
|
+
#
|
|
106
|
+
# Types: feat, fix, refactor, docs, test, chore
|
|
107
|
+
|
|
108
|
+
git commit -m "feat: add user authentication system
|
|
109
|
+
|
|
110
|
+
- Implement JWT token generation
|
|
111
|
+
- Add login/logout endpoints
|
|
112
|
+
- Create auth middleware"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Step 5: Push to Remote**
|
|
116
|
+
```bash
|
|
117
|
+
git push -u origin feature/descriptive-name
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Step 6: Create Pull Request**
|
|
121
|
+
```bash
|
|
122
|
+
# Basic PR creation:
|
|
123
|
+
gh pr create --base main --head feature/descriptive-name \
|
|
124
|
+
--title "Add user authentication system" \
|
|
125
|
+
--body "## Summary
|
|
126
|
+
- Implements JWT-based authentication
|
|
127
|
+
- Adds login/logout endpoints
|
|
128
|
+
- Includes auth middleware
|
|
129
|
+
|
|
130
|
+
## Testing
|
|
131
|
+
- All tests passing
|
|
132
|
+
- Manual testing completed"
|
|
133
|
+
|
|
134
|
+
# Interactive PR creation (if user wants to review):
|
|
135
|
+
gh pr create --web
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Quick Commit and PR Workflow
|
|
139
|
+
|
|
140
|
+
For simple changes where user says "commit and create PR":
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# All in one flow:
|
|
144
|
+
git add .
|
|
145
|
+
git commit -m "fix: resolve authentication bug"
|
|
146
|
+
git push -u origin fix/auth-bug
|
|
147
|
+
gh pr create --base main --title "Fix authentication bug" --body "Resolves issue with token expiration"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### PR Creation Options
|
|
151
|
+
|
|
152
|
+
**Option 1: Direct Creation (Recommended)**
|
|
153
|
+
```bash
|
|
154
|
+
gh pr create \
|
|
155
|
+
--base main \
|
|
156
|
+
--head feature/branch-name \
|
|
157
|
+
--title "Clear, descriptive title" \
|
|
158
|
+
--body "## Summary
|
|
159
|
+
What changed and why
|
|
160
|
+
|
|
161
|
+
## Changes
|
|
162
|
+
- Bullet point list
|
|
163
|
+
- Of key changes
|
|
164
|
+
|
|
165
|
+
## Testing
|
|
166
|
+
How it was tested"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Option 2: Interactive Web UI**
|
|
170
|
+
```bash
|
|
171
|
+
gh pr create --web
|
|
172
|
+
# Opens browser for user to fill in details
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Option 3: Using PR Template**
|
|
176
|
+
```bash
|
|
177
|
+
# If .github/pull_request_template.md exists:
|
|
178
|
+
gh pr create --base main --fill
|
|
179
|
+
# Automatically uses template
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Checking PR Status
|
|
183
|
+
|
|
184
|
+
After creating PR:
|
|
185
|
+
```bash
|
|
186
|
+
# Get PR URL and status:
|
|
187
|
+
gh pr view
|
|
188
|
+
|
|
189
|
+
# Check CI status:
|
|
190
|
+
gh pr checks
|
|
191
|
+
|
|
192
|
+
# List all PRs:
|
|
193
|
+
gh pr list
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Branch Naming Conventions
|
|
197
|
+
|
|
198
|
+
Follow these patterns:
|
|
199
|
+
- `feature/user-auth` - New features
|
|
200
|
+
- `fix/login-bug` - Bug fixes
|
|
201
|
+
- `refactor/api-client` - Code refactoring
|
|
202
|
+
- `docs/readme-update` - Documentation
|
|
203
|
+
- `test/auth-coverage` - Test additions
|
|
204
|
+
- `chore/deps-update` - Maintenance tasks
|
|
205
|
+
|
|
206
|
+
## Commit Message Guidelines
|
|
207
|
+
|
|
208
|
+
### Format
|
|
209
|
+
```
|
|
210
|
+
<type>: <subject>
|
|
211
|
+
|
|
212
|
+
<body>
|
|
213
|
+
|
|
214
|
+
<footer>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Types
|
|
218
|
+
- `feat` - New feature
|
|
219
|
+
- `fix` - Bug fix
|
|
220
|
+
- `refactor` - Code restructuring
|
|
221
|
+
- `docs` - Documentation changes
|
|
222
|
+
- `test` - Test additions/changes
|
|
223
|
+
- `chore` - Maintenance tasks
|
|
224
|
+
- `perf` - Performance improvements
|
|
225
|
+
- `style` - Code style changes (formatting)
|
|
226
|
+
|
|
227
|
+
### Examples
|
|
228
|
+
|
|
229
|
+
**Good:**
|
|
230
|
+
```
|
|
231
|
+
feat: add GitHub OAuth integration
|
|
232
|
+
|
|
233
|
+
- Implement OAuth flow
|
|
234
|
+
- Add callback handler
|
|
235
|
+
- Store tokens securely
|
|
236
|
+
|
|
237
|
+
Closes #123
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Bad:**
|
|
241
|
+
```
|
|
242
|
+
update stuff
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## PR Description Template
|
|
246
|
+
|
|
247
|
+
When creating PR, use this structure:
|
|
248
|
+
|
|
249
|
+
```markdown
|
|
250
|
+
## Summary
|
|
251
|
+
Brief overview of what changed and why
|
|
252
|
+
|
|
253
|
+
## Changes
|
|
254
|
+
- Key change 1
|
|
255
|
+
- Key change 2
|
|
256
|
+
- Key change 3
|
|
257
|
+
|
|
258
|
+
## Testing
|
|
259
|
+
- [ ] Unit tests added/updated
|
|
260
|
+
- [ ] Manual testing completed
|
|
261
|
+
- [ ] All tests passing
|
|
262
|
+
|
|
263
|
+
## Related Issues
|
|
264
|
+
Closes #123
|
|
265
|
+
Relates to #456
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Safety Guardrails
|
|
269
|
+
|
|
270
|
+
### NEVER Do These Without Explicit User Confirmation:
|
|
271
|
+
1. `git push --force` on main/master branch
|
|
272
|
+
2. `git reset --hard` (loses uncommitted changes)
|
|
273
|
+
3. Delete remote branches that others might use
|
|
274
|
+
4. Rebase commits that have been pushed
|
|
275
|
+
5. Amend commits that have been pushed
|
|
276
|
+
|
|
277
|
+
### ALWAYS Do These:
|
|
278
|
+
1. Check `git status` before committing
|
|
279
|
+
2. Review `git diff` before staging
|
|
280
|
+
3. Use descriptive commit messages
|
|
281
|
+
4. Push to feature branch, not main
|
|
282
|
+
5. Create PR instead of pushing directly to main
|
|
283
|
+
|
|
284
|
+
## Error Handling
|
|
285
|
+
|
|
286
|
+
### Common Issues and Solutions
|
|
287
|
+
|
|
288
|
+
**Issue: "gh: command not found"**
|
|
289
|
+
```bash
|
|
290
|
+
# Solution: Install GitHub CLI
|
|
291
|
+
# macOS:
|
|
292
|
+
brew install gh
|
|
293
|
+
|
|
294
|
+
# Linux:
|
|
295
|
+
# See: https://github.com/cli/cli/blob/trunk/docs/install_linux.md
|
|
296
|
+
|
|
297
|
+
# Then authenticate:
|
|
298
|
+
gh auth login
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Issue: "failed to push some refs"**
|
|
302
|
+
```bash
|
|
303
|
+
# Solution: Pull latest changes first
|
|
304
|
+
git pull origin main
|
|
305
|
+
# Resolve conflicts if any
|
|
306
|
+
git push
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Issue: "not a git repository"**
|
|
310
|
+
```bash
|
|
311
|
+
# Solution: Initialize git repo
|
|
312
|
+
git init
|
|
313
|
+
git remote add origin <repo-url>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Issue: "gh: Not authenticated"**
|
|
317
|
+
```bash
|
|
318
|
+
# Solution: Login to GitHub
|
|
319
|
+
gh auth login
|
|
320
|
+
# Follow interactive prompts
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Complete Example Workflow
|
|
324
|
+
|
|
325
|
+
User says: "이 변경사항들을 PR로 올려줘"
|
|
326
|
+
|
|
327
|
+
**AI Response:**
|
|
328
|
+
```bash
|
|
329
|
+
# Step 1: Check current state
|
|
330
|
+
git status
|
|
331
|
+
|
|
332
|
+
# Step 2: Create feature branch (if on main)
|
|
333
|
+
git checkout -b feature/implement-todo-system
|
|
334
|
+
|
|
335
|
+
# Step 3: Stage all changes
|
|
336
|
+
git add .
|
|
337
|
+
|
|
338
|
+
# Step 4: Create commit
|
|
339
|
+
git commit -m "feat: implement todo system with auto-resume
|
|
340
|
+
|
|
341
|
+
- Add todo_write and todo_read tools
|
|
342
|
+
- Implement auto-continuation middleware
|
|
343
|
+
- Update system prompts for autonomous execution
|
|
344
|
+
- Add session-based todo isolation"
|
|
345
|
+
|
|
346
|
+
# Step 5: Push branch
|
|
347
|
+
git push -u origin feature/implement-todo-system
|
|
348
|
+
|
|
349
|
+
# Step 6: Create PR
|
|
350
|
+
gh pr create \
|
|
351
|
+
--base main \
|
|
352
|
+
--title "Implement todo system with auto-resume functionality" \
|
|
353
|
+
--body "## Summary
|
|
354
|
+
Adds a comprehensive todo system that enables AI to track and automatically continue incomplete tasks.
|
|
355
|
+
|
|
356
|
+
## Changes
|
|
357
|
+
- Created todo_write and todo_read tools
|
|
358
|
+
- Built auto-continuation middleware
|
|
359
|
+
- Updated system prompts for autonomous execution
|
|
360
|
+
- Implemented session-based todo isolation
|
|
361
|
+
|
|
362
|
+
## Testing
|
|
363
|
+
- All unit tests passing (7/7)
|
|
364
|
+
- TypeScript compilation clean
|
|
365
|
+
- Linting passing
|
|
366
|
+
- Manual testing completed in CLI mode"
|
|
367
|
+
|
|
368
|
+
# Step 7: Report success
|
|
369
|
+
echo "✅ Pull request created successfully!"
|
|
370
|
+
gh pr view --web
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## Integration with Other Skills
|
|
374
|
+
|
|
375
|
+
This skill works with:
|
|
376
|
+
- **Shell Execution** - All git/gh commands use `shell_execute`
|
|
377
|
+
- **File Reading** - Read commit templates, PR templates
|
|
378
|
+
- **Todo System** - Mark "create PR" tasks as complete after success
|
|
379
|
+
|
|
380
|
+
## Key Principles
|
|
381
|
+
|
|
382
|
+
1. **Complete the Cycle** - Don't stop at commit; create the PR
|
|
383
|
+
2. **Descriptive Messages** - Commits and PRs should explain WHY, not just WHAT
|
|
384
|
+
3. **Safety First** - Never force push to main, always use feature branches
|
|
385
|
+
4. **User Visibility** - Report each step and final PR URL
|
|
386
|
+
5. **Autonomous Execution** - Don't ask user to run commands; execute them
|
|
387
|
+
|
|
388
|
+
## When to Use This Skill
|
|
389
|
+
|
|
390
|
+
Trigger phrases:
|
|
391
|
+
- "create a PR"
|
|
392
|
+
- "make a pull request"
|
|
393
|
+
- "commit and push"
|
|
394
|
+
- "올려줘" / "PR 만들어줘"
|
|
395
|
+
- "push these changes"
|
|
396
|
+
- "create PR from these changes"
|
|
397
|
+
|
|
398
|
+
## Expected Outcomes
|
|
399
|
+
|
|
400
|
+
After using this skill:
|
|
401
|
+
- ✅ Changes committed with descriptive message
|
|
402
|
+
- ✅ Branch pushed to remote
|
|
403
|
+
- ✅ Pull request created on GitHub
|
|
404
|
+
- ✅ PR URL provided to user
|
|
405
|
+
- ✅ User can review PR in browser
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const TOOL_FALLBACK_MODES = [
|
|
2
|
+
"disable",
|
|
3
|
+
"morphxml",
|
|
4
|
+
"hermes",
|
|
5
|
+
"qwen3coder",
|
|
6
|
+
] as const;
|
|
7
|
+
|
|
8
|
+
export type ToolFallbackMode = (typeof TOOL_FALLBACK_MODES)[number];
|
|
9
|
+
|
|
10
|
+
export const DEFAULT_TOOL_FALLBACK_MODE: ToolFallbackMode = "disable";
|
|
11
|
+
export const LEGACY_ENABLED_TOOL_FALLBACK_MODE: ToolFallbackMode = "morphxml";
|
|
12
|
+
|
|
13
|
+
const isToolFallbackMode = (value: string): value is ToolFallbackMode => {
|
|
14
|
+
return TOOL_FALLBACK_MODES.includes(value as ToolFallbackMode);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const parseToolFallbackMode = (
|
|
18
|
+
rawValue: string
|
|
19
|
+
): ToolFallbackMode | null => {
|
|
20
|
+
const value = rawValue.toLowerCase();
|
|
21
|
+
if (isToolFallbackMode(value)) {
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (value === "on" || value === "enable" || value === "true") {
|
|
26
|
+
return LEGACY_ENABLED_TOOL_FALLBACK_MODE;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (value === "off" || value === "false") {
|
|
30
|
+
return DEFAULT_TOOL_FALLBACK_MODE;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return null;
|
|
34
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# TOOLS SUBSYSTEM KNOWLEDGE BASE
|
|
2
|
+
|
|
3
|
+
**Generated:** 2026-02-23 14:40 KST
|
|
4
|
+
**Scope:** `src/tools/**`
|
|
5
|
+
|
|
6
|
+
## OVERVIEW
|
|
7
|
+
`src/tools/` implements all callable tools and maps stable public tool keys to concrete executors.
|
|
8
|
+
|
|
9
|
+
## STRUCTURE
|
|
10
|
+
```text
|
|
11
|
+
src/tools/
|
|
12
|
+
|- index.ts # Public tool registry keys
|
|
13
|
+
|- execute/ # Shell execution and process management
|
|
14
|
+
|- explore/ # Read, glob, grep, and safety checks
|
|
15
|
+
|- modify/ # Deterministic file mutation operations
|
|
16
|
+
| `- AGENTS.md # High-risk mutation constraints
|
|
17
|
+
`- planning/ # Skill loading and todo state updates
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## WHERE TO LOOK
|
|
21
|
+
| Task | Location | Notes |
|
|
22
|
+
|------|----------|-------|
|
|
23
|
+
| Add or rename a tool key | `src/tools/index.ts` | Keep key names stable for model/tool contracts |
|
|
24
|
+
| Shell execution semantics | `src/tools/execute/shell-execute.ts` | Timeout, background handling, non-interactive wrapping |
|
|
25
|
+
| File read/search behavior | `src/tools/explore/read-file.ts` | Enforces limits and safe read semantics |
|
|
26
|
+
| Deterministic file editing | `src/tools/modify/edit-file.ts` | Hashline-native edits |
|
|
27
|
+
| Todo persistence semantics | `src/tools/planning/todo-write.ts` | Status accounting and validation |
|
|
28
|
+
| Skill content resolution | `src/tools/planning/load-skill.ts` | Local/project/bundled skill lookup behavior |
|
|
29
|
+
|
|
30
|
+
## CONVENTIONS
|
|
31
|
+
- `index.ts` is the single source of truth for exported tool key names (`shell_execute`, `read_file`, `edit_file`, etc.).
|
|
32
|
+
- Keep per-tool description files (`<tool-name>.txt`) synchronized with implementation and prompt wiring.
|
|
33
|
+
- Prefer dedicated `explore/modify` tools for file operations; shell is for build/test/git/system operations.
|
|
34
|
+
- `modify/edit-file.ts` is hashline-first: preserve `expected_file_hash` checks and deterministic anchors.
|
|
35
|
+
- New tool behavior must ship with colocated tests under the same subdirectory.
|
|
36
|
+
|
|
37
|
+
## ANTI-PATTERNS
|
|
38
|
+
- Introducing file reads/writes through shell commands when dedicated tools already exist.
|
|
39
|
+
- Changing tool key strings in `index.ts` without coordinated updates to callers and tests.
|
|
40
|
+
- Bypassing stale-safety checks in edit flows (`expected_file_hash`, anchored operations).
|
|
41
|
+
- Expanding planning behavior without updating validation and summary outputs in tests.
|
|
42
|
+
|
|
43
|
+
## NOTES
|
|
44
|
+
- `src/tools/modify/AGENTS.md` is the source of truth for hashline/legacy-edit constraints.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { afterAll, beforeAll, describe, expect, it } from "bun:test";
|
|
2
|
+
import { existsSync, mkdtempSync, rmSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { executeCommand } from "./shell-execute";
|
|
6
|
+
|
|
7
|
+
describe("executeCommand", () => {
|
|
8
|
+
let tempDir: string;
|
|
9
|
+
|
|
10
|
+
beforeAll(() => {
|
|
11
|
+
tempDir = mkdtempSync(join(tmpdir(), "shell-test-"));
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
afterAll(() => {
|
|
15
|
+
if (existsSync(tempDir)) {
|
|
16
|
+
rmSync(tempDir, { recursive: true });
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe("basic execution", () => {
|
|
21
|
+
it("executes simple echo command", async () => {
|
|
22
|
+
const result = await executeCommand('echo "hello world"');
|
|
23
|
+
|
|
24
|
+
expect(result.output).toContain("hello world");
|
|
25
|
+
expect(result.exitCode).toBe(0);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("captures multiline output", async () => {
|
|
29
|
+
const result = await executeCommand("printf 'line1\\nline2\\nline3'");
|
|
30
|
+
|
|
31
|
+
expect(result.output).toContain("line1");
|
|
32
|
+
expect(result.output).toContain("line2");
|
|
33
|
+
expect(result.output).toContain("line3");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("combines stdout and stderr", async () => {
|
|
37
|
+
const result = await executeCommand('echo "stdout" && echo "stderr" >&2');
|
|
38
|
+
|
|
39
|
+
expect(result.output).toContain("stdout");
|
|
40
|
+
expect(result.output).toContain("stderr");
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("handles empty output", async () => {
|
|
44
|
+
const result = await executeCommand("true");
|
|
45
|
+
|
|
46
|
+
expect(result.output).toBe("");
|
|
47
|
+
expect(result.exitCode).toBe(0);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("executes command in specified workdir", async () => {
|
|
51
|
+
const result = await executeCommand("pwd", { workdir: tempDir });
|
|
52
|
+
|
|
53
|
+
expect(result.output).toContain("shell-test-");
|
|
54
|
+
expect(result.exitCode).toBe(0);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
describe("exit code propagation", () => {
|
|
59
|
+
it("returns non-zero exit code for failed command", async () => {
|
|
60
|
+
const result = await executeCommand("exit 42");
|
|
61
|
+
|
|
62
|
+
expect(result.exitCode).toBe(42);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("returns zero for successful command", async () => {
|
|
66
|
+
const result = await executeCommand("echo ok");
|
|
67
|
+
|
|
68
|
+
expect(result.exitCode).toBe(0);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("returns exit code from last command in chain", async () => {
|
|
72
|
+
const result = await executeCommand("true && exit 5");
|
|
73
|
+
|
|
74
|
+
expect(result.exitCode).toBe(5);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
describe("timeout formatting", () => {
|
|
79
|
+
it("includes [TIMEOUT] prefix when command exceeds timeout", async () => {
|
|
80
|
+
const result = await executeCommand("sleep 10", { timeoutMs: 200 });
|
|
81
|
+
|
|
82
|
+
expect(result.output).toContain("[TIMEOUT]");
|
|
83
|
+
expect(result.exitCode).toBe(124);
|
|
84
|
+
}, 5000);
|
|
85
|
+
|
|
86
|
+
it("includes timeout duration in timeout message", async () => {
|
|
87
|
+
const result = await executeCommand("sleep 10", { timeoutMs: 300 });
|
|
88
|
+
|
|
89
|
+
expect(result.output).toContain("300ms");
|
|
90
|
+
}, 5000);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
describe("background process detection", () => {
|
|
94
|
+
it("wraps output with background message for commands ending with &", async () => {
|
|
95
|
+
const result = await executeCommand("sleep 0.1 &");
|
|
96
|
+
|
|
97
|
+
expect(result.exitCode).toBe(0);
|
|
98
|
+
expect(result.output).toContain("[Background process started]");
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("does not treat && as background operator", async () => {
|
|
102
|
+
const result = await executeCommand('echo "first" && echo "second"');
|
|
103
|
+
|
|
104
|
+
expect(result.output).toContain("first");
|
|
105
|
+
expect(result.output).not.toContain("[Background process started]");
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it("does not treat mid-command & as background", async () => {
|
|
109
|
+
const result = await executeCommand("sleep 0.1 & wait");
|
|
110
|
+
|
|
111
|
+
expect(result.output).not.toContain("[Background process started]");
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { tool } from "ai";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import {
|
|
4
|
+
formatBackgroundMessage,
|
|
5
|
+
formatTimeoutMessage,
|
|
6
|
+
} from "../utils/execute/format-utils";
|
|
7
|
+
import { executeCommand as pmExecuteCommand } from "../utils/execute/process-manager";
|
|
8
|
+
import SHELL_EXECUTE_DESCRIPTION from "./shell-execute.txt";
|
|
9
|
+
|
|
10
|
+
const DEFAULT_TIMEOUT_MS = 120_000;
|
|
11
|
+
|
|
12
|
+
function isBackgroundCommand(command: string): boolean {
|
|
13
|
+
const trimmed = command.trimEnd();
|
|
14
|
+
return trimmed.endsWith("&") && !trimmed.endsWith("&&");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ToolOutput {
|
|
18
|
+
exit_code: number;
|
|
19
|
+
output: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function executeCommand(
|
|
23
|
+
command: string,
|
|
24
|
+
options: { workdir?: string; timeoutMs?: number } = {}
|
|
25
|
+
): Promise<{ exitCode: number; output: string }> {
|
|
26
|
+
const { workdir, timeoutMs = DEFAULT_TIMEOUT_MS } = options;
|
|
27
|
+
const result = await pmExecuteCommand(command, { workdir, timeoutMs });
|
|
28
|
+
|
|
29
|
+
if (result.timedOut) {
|
|
30
|
+
return {
|
|
31
|
+
exitCode: result.exitCode,
|
|
32
|
+
output: formatTimeoutMessage(timeoutMs, result.output),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (isBackgroundCommand(command)) {
|
|
37
|
+
return {
|
|
38
|
+
exitCode: result.exitCode,
|
|
39
|
+
output: formatBackgroundMessage(result.output),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
exitCode: result.exitCode,
|
|
45
|
+
output: result.output,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const shellExecuteTool = tool({
|
|
50
|
+
description: SHELL_EXECUTE_DESCRIPTION,
|
|
51
|
+
|
|
52
|
+
inputSchema: z.object({
|
|
53
|
+
command: z.string().describe("Shell command to execute"),
|
|
54
|
+
workdir: z
|
|
55
|
+
.string()
|
|
56
|
+
.optional()
|
|
57
|
+
.describe("Working directory (absolute path)"),
|
|
58
|
+
timeout_ms: z
|
|
59
|
+
.number()
|
|
60
|
+
.optional()
|
|
61
|
+
.describe("Timeout in milliseconds (default: 120000)"),
|
|
62
|
+
}),
|
|
63
|
+
|
|
64
|
+
execute: async ({ command, workdir, timeout_ms }): Promise<ToolOutput> => {
|
|
65
|
+
const result = await executeCommand(command, {
|
|
66
|
+
workdir,
|
|
67
|
+
timeoutMs: timeout_ms ?? DEFAULT_TIMEOUT_MS,
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
exit_code: result.exitCode,
|
|
71
|
+
output: result.output,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
### shell_execute
|
|
2
|
+
**Purpose**: Run shell commands with configurable timeout (default: 120s)
|
|
3
|
+
|
|
4
|
+
**When to use**:
|
|
5
|
+
- Package management: `npm install`, `pip install`, `cargo build`
|
|
6
|
+
- Version control: `git status`, `git commit`, `git push`
|
|
7
|
+
- Build systems: `make`, `npm run build`, `docker build`
|
|
8
|
+
- Running tests: `npm test`, `pytest`, `cargo test`
|
|
9
|
+
- OS-level only: `chmod`, `ln -s`, `chown`
|
|
10
|
+
|
|
11
|
+
**Timeout guidance**:
|
|
12
|
+
- Quick commands: default 120s
|
|
13
|
+
- Build/test/install: use larger timeout (`300000`-`600000` ms)
|
|
14
|
+
|
|
15
|
+
**Non-interactive behavior**:
|
|
16
|
+
- Wrapper applies non-interactive flags/env when possible (`CI=true`, `DEBIAN_FRONTEND=noninteractive`, `GIT_TERMINAL_PROMPT=0`)
|
|
17
|
+
|
|
18
|
+
**Background commands**:
|
|
19
|
+
- Commands ending with `&` run in background
|
|
20
|
+
- Always verify startup with follow-up checks (`sleep`, health check, logs)
|
|
21
|
+
|
|
22
|
+
**Notes**:
|
|
23
|
+
- Large outputs are truncated automatically
|
|
24
|
+
- Background commands (`&`) should be verified with follow-up checks
|
|
25
|
+
|
|
26
|
+
**Do not use shell for file ops**:
|
|
27
|
+
- Use dedicated tools for read/write/edit/delete/search/glob
|