@draht/coding-agent 2026.7.30 → 2026.9.5-1
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/CHANGELOG.md +154 -0
- package/README.md +46 -2
- package/agents/debugger.md +12 -1
- package/agents/git-committer.md +1 -0
- package/agents/implementer.md +20 -0
- package/agents/investigator.md +75 -0
- package/agents/reviewer.md +7 -0
- package/agents/spec-reviewer.md +66 -0
- package/agents/verifier.md +4 -3
- package/bin/draht-tools.cjs +472 -41
- package/dist/agents/debugger.md +12 -1
- package/dist/agents/git-committer.md +1 -0
- package/dist/agents/implementer.md +20 -0
- package/dist/agents/investigator.md +75 -0
- package/dist/agents/reviewer.md +7 -0
- package/dist/agents/spec-reviewer.md +66 -0
- package/dist/agents/verifier.md +4 -3
- package/dist/cli/args.d.ts +10 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +69 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/attach-mode.d.ts +61 -0
- package/dist/cli/attach-mode.d.ts.map +1 -1
- package/dist/cli/attach-mode.js +243 -5
- package/dist/cli/attach-mode.js.map +1 -1
- package/dist/cli/credential-print.d.ts +1 -1
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +5 -4
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +31 -4
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +17 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +87 -30
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +35 -16
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +149 -64
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +5 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +72 -15
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/builtins/checkpoints.d.ts +20 -0
- package/dist/core/builtins/checkpoints.d.ts.map +1 -0
- package/dist/core/builtins/checkpoints.js +161 -0
- package/dist/core/builtins/checkpoints.js.map +1 -0
- package/dist/core/builtins/duet.d.ts +26 -0
- package/dist/core/builtins/duet.d.ts.map +1 -0
- package/dist/core/builtins/duet.js +660 -0
- package/dist/core/builtins/duet.js.map +1 -0
- package/dist/core/builtins/index.d.ts.map +1 -1
- package/dist/core/builtins/index.js +7 -1
- package/dist/core/builtins/index.js.map +1 -1
- package/dist/core/builtins/subagent.d.ts +24 -4
- package/dist/core/builtins/subagent.d.ts.map +1 -1
- package/dist/core/builtins/subagent.js +278 -35
- package/dist/core/builtins/subagent.js.map +1 -1
- package/dist/core/checkpoints/checkpoint-cli.d.ts +17 -0
- package/dist/core/checkpoints/checkpoint-cli.d.ts.map +1 -0
- package/dist/core/checkpoints/checkpoint-cli.js +78 -0
- package/dist/core/checkpoints/checkpoint-cli.js.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts +294 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.js +865 -0
- package/dist/core/checkpoints/checkpoint-manager.js.map +1 -0
- package/dist/core/checkpoints/rewind.d.ts +141 -0
- package/dist/core/checkpoints/rewind.d.ts.map +1 -0
- package/dist/core/checkpoints/rewind.js +246 -0
- package/dist/core/checkpoints/rewind.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +9 -4
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +5 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +25 -4
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +83 -20
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +13 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +37 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +189 -6
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +7 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +1 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-registry.d.ts +3 -2
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +8 -8
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +34 -7
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +7 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +30 -10
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
- package/dist/core/multi-agent/permission-gate.js +4 -3
- package/dist/core/multi-agent/permission-gate.js.map +1 -1
- package/dist/core/multi-agent/worktree.d.ts +2 -0
- package/dist/core/multi-agent/worktree.d.ts.map +1 -1
- package/dist/core/multi-agent/worktree.js +2 -2
- package/dist/core/multi-agent/worktree.js.map +1 -1
- package/dist/core/package-manager.d.ts +7 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +21 -44
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permission-relay/index.d.ts +19 -0
- package/dist/core/permission-relay/index.d.ts.map +1 -0
- package/dist/core/permission-relay/index.js +49 -0
- package/dist/core/permission-relay/index.js.map +1 -0
- package/dist/core/permission-relay/relay-ui-context.d.ts +39 -0
- package/dist/core/permission-relay/relay-ui-context.d.ts.map +1 -0
- package/dist/core/permission-relay/relay-ui-context.js +788 -0
- package/dist/core/permission-relay/relay-ui-context.js.map +1 -0
- package/dist/core/permission-relay/types.d.ts +222 -0
- package/dist/core/permission-relay/types.d.ts.map +1 -0
- package/dist/core/permission-relay/types.js +15 -0
- package/dist/core/permission-relay/types.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +14 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +35 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/project-trust.js +2 -2
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/resource-loader.d.ts +21 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +101 -24
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sandbox/bash-operations.d.ts +149 -0
- package/dist/core/sandbox/bash-operations.d.ts.map +1 -0
- package/dist/core/sandbox/bash-operations.js +163 -0
- package/dist/core/sandbox/bash-operations.js.map +1 -0
- package/dist/core/sandbox/env.d.ts +83 -0
- package/dist/core/sandbox/env.d.ts.map +1 -0
- package/dist/core/sandbox/env.js +123 -0
- package/dist/core/sandbox/env.js.map +1 -0
- package/dist/core/sandbox/executor.d.ts +104 -0
- package/dist/core/sandbox/executor.d.ts.map +1 -0
- package/dist/core/sandbox/executor.js +92 -0
- package/dist/core/sandbox/executor.js.map +1 -0
- package/dist/core/sandbox/index.d.ts +36 -0
- package/dist/core/sandbox/index.d.ts.map +1 -0
- package/dist/core/sandbox/index.js +36 -0
- package/dist/core/sandbox/index.js.map +1 -0
- package/dist/core/sandbox/linux.d.ts +121 -0
- package/dist/core/sandbox/linux.d.ts.map +1 -0
- package/dist/core/sandbox/linux.js +260 -0
- package/dist/core/sandbox/linux.js.map +1 -0
- package/dist/core/sandbox/policy.d.ts +142 -0
- package/dist/core/sandbox/policy.d.ts.map +1 -0
- package/dist/core/sandbox/policy.js +297 -0
- package/dist/core/sandbox/policy.js.map +1 -0
- package/dist/core/sandbox/real-path.d.ts +112 -0
- package/dist/core/sandbox/real-path.d.ts.map +1 -0
- package/dist/core/sandbox/real-path.js +158 -0
- package/dist/core/sandbox/real-path.js.map +1 -0
- package/dist/core/sandbox/seatbelt-profile.d.ts +95 -0
- package/dist/core/sandbox/seatbelt-profile.d.ts.map +1 -0
- package/dist/core/sandbox/seatbelt-profile.js +239 -0
- package/dist/core/sandbox/seatbelt-profile.js.map +1 -0
- package/dist/core/sandbox/seatbelt.d.ts +95 -0
- package/dist/core/sandbox/seatbelt.d.ts.map +1 -0
- package/dist/core/sandbox/seatbelt.js +154 -0
- package/dist/core/sandbox/seatbelt.js.map +1 -0
- package/dist/core/sandbox/self-test.d.ts +109 -0
- package/dist/core/sandbox/self-test.d.ts.map +1 -0
- package/dist/core/sandbox/self-test.js +369 -0
- package/dist/core/sandbox/self-test.js.map +1 -0
- package/dist/core/sandbox/spawn.d.ts +33 -0
- package/dist/core/sandbox/spawn.d.ts.map +1 -0
- package/dist/core/sandbox/spawn.js +87 -0
- package/dist/core/sandbox/spawn.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +60 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +53 -6
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +21 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +36 -16
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +3 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +19 -6
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/soak/soak-log.d.ts +298 -0
- package/dist/core/soak/soak-log.d.ts.map +1 -0
- package/dist/core/soak/soak-log.js +660 -0
- package/dist/core/soak/soak-log.js.map +1 -0
- package/dist/core/soak/soak-reader.d.ts +60 -0
- package/dist/core/soak/soak-reader.d.ts.map +1 -0
- package/dist/core/soak/soak-reader.js +106 -0
- package/dist/core/soak/soak-reader.js.map +1 -0
- package/dist/core/socket-server/discovery.d.ts +78 -1
- package/dist/core/socket-server/discovery.d.ts.map +1 -1
- package/dist/core/socket-server/discovery.js +356 -37
- package/dist/core/socket-server/discovery.js.map +1 -1
- package/dist/core/socket-server/index.d.ts +10 -4
- package/dist/core/socket-server/index.d.ts.map +1 -1
- package/dist/core/socket-server/index.js +6 -3
- package/dist/core/socket-server/index.js.map +1 -1
- package/dist/core/socket-server/permission-delivery.d.ts +125 -0
- package/dist/core/socket-server/permission-delivery.d.ts.map +1 -0
- package/dist/core/socket-server/permission-delivery.js +152 -0
- package/dist/core/socket-server/permission-delivery.js.map +1 -0
- package/dist/core/socket-server/permission-registry.d.ts +301 -0
- package/dist/core/socket-server/permission-registry.d.ts.map +1 -0
- package/dist/core/socket-server/permission-registry.js +410 -0
- package/dist/core/socket-server/permission-registry.js.map +1 -0
- package/dist/core/socket-server/permission-relay.d.ts +81 -0
- package/dist/core/socket-server/permission-relay.d.ts.map +1 -0
- package/dist/core/socket-server/permission-relay.js +528 -0
- package/dist/core/socket-server/permission-relay.js.map +1 -0
- package/dist/core/socket-server/safe-text.d.ts +83 -0
- package/dist/core/socket-server/safe-text.d.ts.map +1 -0
- package/dist/core/socket-server/safe-text.js +277 -0
- package/dist/core/socket-server/safe-text.js.map +1 -0
- package/dist/core/socket-server/session-integration.d.ts +65 -2
- package/dist/core/socket-server/session-integration.d.ts.map +1 -1
- package/dist/core/socket-server/session-integration.js +434 -32
- package/dist/core/socket-server/session-integration.js.map +1 -1
- package/dist/core/socket-server/socket-client.d.ts +21 -2
- package/dist/core/socket-server/socket-client.d.ts.map +1 -1
- package/dist/core/socket-server/socket-client.js +52 -1
- package/dist/core/socket-server/socket-client.js.map +1 -1
- package/dist/core/socket-server/socket-server.d.ts +152 -1
- package/dist/core/socket-server/socket-server.d.ts.map +1 -1
- package/dist/core/socket-server/socket-server.js +775 -26
- package/dist/core/socket-server/socket-server.js.map +1 -1
- package/dist/core/socket-server/types.d.ts +106 -2
- package/dist/core/socket-server/types.d.ts.map +1 -1
- package/dist/core/socket-server/types.js +13 -1
- package/dist/core/socket-server/types.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +8 -9
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +5 -2
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +17 -2
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +3 -0
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +11 -18
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/trust-manager.d.ts +6 -4
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +55 -21
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +5 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +5 -1
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/stub-provider/index.d.ts +9 -0
- package/dist/extensions/stub-provider/index.d.ts.map +1 -0
- package/dist/extensions/stub-provider/index.js +13 -0
- package/dist/extensions/stub-provider/index.js.map +1 -0
- package/dist/extensions/stub-provider/provider.d.ts +77 -0
- package/dist/extensions/stub-provider/provider.d.ts.map +1 -0
- package/dist/extensions/stub-provider/provider.js +193 -0
- package/dist/extensions/stub-provider/provider.js.map +1 -0
- package/dist/hooks/gsd/draht-quality-gate.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +242 -45
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +3 -2
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +49 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +202 -5
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +10 -2
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +10 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +10 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +20 -2
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +21 -5
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +97 -3
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +394 -24
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +165 -7
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +68 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/prompts/commands/atomic-commit.md +1 -12
- package/dist/prompts/commands/brainstorm.md +12 -15
- package/dist/prompts/commands/create-verification-skill.md +108 -0
- package/dist/prompts/commands/discuss-phase.md +3 -14
- package/dist/prompts/commands/execute-phase.md +3 -11
- package/dist/prompts/commands/fix.md +41 -18
- package/dist/prompts/commands/grill.md +66 -0
- package/dist/prompts/commands/init-project.md +5 -15
- package/dist/prompts/commands/map-codebase.md +1 -13
- package/dist/prompts/commands/new-project.md +5 -15
- package/dist/prompts/commands/next-milestone.md +1 -13
- package/dist/prompts/commands/orchestrate.md +1 -1
- package/dist/prompts/commands/pause-work.md +1 -13
- package/dist/prompts/commands/plan-phase.md +2 -11
- package/dist/prompts/commands/progress.md +0 -13
- package/dist/prompts/commands/quick.md +3 -11
- package/dist/prompts/commands/resolve-conflicts.md +71 -0
- package/dist/prompts/commands/resume-work.md +0 -13
- package/dist/prompts/commands/review.md +4 -13
- package/dist/prompts/commands/triage.md +159 -0
- package/dist/prompts/commands/verify-work.md +4 -14
- package/dist/prompts/commands/why.md +135 -0
- package/dist/skills/atomic-reasoning/SKILL.md +115 -0
- package/dist/skills/blast-radius/SKILL.md +55 -0
- package/dist/skills/epistemics/SKILL.md +99 -0
- package/dist/skills/hexagon-animation/SKILL.md +49 -0
- package/dist/skills/hexagon-animation/generate.mjs +81 -0
- package/dist/skills/hexagon-animation/template.html +361 -0
- package/dist/skills/typescript-discipline/SKILL.md +50 -0
- package/dist/skills/typescript-discipline/references/patterns.md +294 -0
- package/dist/skills/unslop/SKILL.md +101 -0
- package/dist/utils/canonical-path.d.ts +28 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +90 -0
- package/dist/utils/canonical-path.js.map +1 -0
- package/dist/utils/child-process.d.ts +12 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +25 -8
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +22 -2
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +2 -3
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/paths.d.ts +2 -7
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +13 -15
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +6 -4
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +3 -5
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/attachable-sessions.md +79 -0
- package/docs/compaction.md +21 -21
- package/docs/containerization.md +23 -23
- package/docs/custom-provider.md +16 -16
- package/docs/development.md +9 -9
- package/docs/docs.json +6 -2
- package/docs/duet.md +42 -0
- package/docs/extensions.md +58 -58
- package/docs/index.md +10 -10
- package/docs/json.md +7 -7
- package/docs/keybindings.md +6 -5
- package/docs/llama-cpp.md +6 -6
- package/docs/models.md +6 -6
- package/docs/packages.md +43 -43
- package/docs/prompt-templates.md +4 -4
- package/docs/providers.md +12 -12
- package/docs/quickstart.md +32 -32
- package/docs/rpc.md +83 -12
- package/docs/sdk.md +15 -15
- package/docs/security.md +18 -18
- package/docs/session-format.md +35 -13
- package/docs/sessions.md +17 -14
- package/docs/settings.md +25 -18
- package/docs/shell-aliases.md +2 -2
- package/docs/skills.md +12 -11
- package/docs/terminal-setup.md +12 -12
- package/docs/termux.md +6 -6
- package/docs/themes.md +11 -11
- package/docs/tmux.md +4 -4
- package/docs/tui.md +5 -5
- package/docs/usage.md +50 -50
- package/docs/windows.md +2 -2
- package/examples/extensions/overlay-qa-tests.ts +3 -3
- package/hooks/gsd/draht-quality-gate.js +3 -3
- package/package.json +11 -10
- package/prompts/commands/atomic-commit.md +1 -12
- package/prompts/commands/brainstorm.md +12 -15
- package/prompts/commands/create-verification-skill.md +108 -0
- package/prompts/commands/discuss-phase.md +3 -14
- package/prompts/commands/execute-phase.md +3 -11
- package/prompts/commands/fix.md +41 -18
- package/prompts/commands/grill.md +66 -0
- package/prompts/commands/init-project.md +5 -15
- package/prompts/commands/map-codebase.md +1 -13
- package/prompts/commands/new-project.md +5 -15
- package/prompts/commands/next-milestone.md +1 -13
- package/prompts/commands/orchestrate.md +1 -1
- package/prompts/commands/pause-work.md +1 -13
- package/prompts/commands/plan-phase.md +2 -11
- package/prompts/commands/progress.md +0 -13
- package/prompts/commands/quick.md +3 -11
- package/prompts/commands/resolve-conflicts.md +71 -0
- package/prompts/commands/resume-work.md +0 -13
- package/prompts/commands/review.md +4 -13
- package/prompts/commands/triage.md +159 -0
- package/prompts/commands/verify-work.md +4 -14
- package/prompts/commands/why.md +135 -0
- package/skills/atomic-reasoning/SKILL.md +115 -0
- package/skills/blast-radius/SKILL.md +55 -0
- package/skills/epistemics/SKILL.md +99 -0
- package/skills/hexagon-animation/SKILL.md +49 -0
- package/skills/hexagon-animation/generate.mjs +81 -0
- package/skills/hexagon-animation/template.html +361 -0
- package/skills/typescript-discipline/SKILL.md +50 -0
- package/skills/typescript-discipline/references/patterns.md +294 -0
- package/skills/unslop/SKILL.md +101 -0
- package/dist/prompts/agents/build.md +0 -86
- package/dist/prompts/agents/plan.md +0 -79
- package/dist/prompts/agents/verify.md +0 -69
- package/prompts/agents/build.md +0 -86
- package/prompts/agents/plan.md +0 -79
- package/prompts/agents/verify.md +0 -69
package/docs/settings.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# Settings
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
draht uses JSON settings files with project settings overriding global settings.
|
|
4
4
|
|
|
5
5
|
| Location | Scope |
|
|
6
6
|
|----------|-------|
|
|
7
|
-
| `~/.
|
|
8
|
-
| `.
|
|
7
|
+
| `~/.draht/agent/settings.json` | Global (all projects) |
|
|
8
|
+
| `.draht/settings.json` | Project (current directory) |
|
|
9
9
|
|
|
10
10
|
Edit directly or use `/settings` for common options.
|
|
11
11
|
|
|
12
12
|
## Project Trust
|
|
13
13
|
|
|
14
|
-
On interactive startup,
|
|
14
|
+
On interactive startup, draht asks before trusting a project folder that contains trust-gated project inputs and has no saved decision for the folder or a parent folder in `~/.draht/agent/trust.json`. Trusting a project allows draht to load `.draht/settings.json` and `.draht` resources, install missing project packages, and execute project extensions.
|
|
15
15
|
|
|
16
16
|
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore trust-gated project inputs, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
17
17
|
|
|
18
|
-
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.
|
|
18
|
+
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.draht/agent/settings.json`, or change it with `/settings`.
|
|
19
19
|
|
|
20
|
-
`
|
|
20
|
+
`draht config` and package commands use the same project trust flow. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
21
21
|
|
|
22
|
-
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.
|
|
22
|
+
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.draht/agent/trust.json` only; the current session is not reloaded, so restart draht for changes to take effect.
|
|
23
23
|
|
|
24
24
|
## All Settings
|
|
25
25
|
|
|
@@ -66,7 +66,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
66
66
|
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
67
67
|
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
68
68
|
|
|
69
|
-
For VS Code, include `--wait` so
|
|
69
|
+
For VS Code, include `--wait` so draht resumes after the editor exits:
|
|
70
70
|
|
|
71
71
|
```json
|
|
72
72
|
{
|
|
@@ -76,9 +76,9 @@ For VS Code, include `--wait` so pi resumes after the editor exits:
|
|
|
76
76
|
|
|
77
77
|
### Telemetry and update checks
|
|
78
78
|
|
|
79
|
-
`enableInstallTelemetry` only controls the anonymous install/update ping to `https://pi.dev/api/report-install`. Opting out of telemetry does not disable update checks;
|
|
79
|
+
`enableInstallTelemetry` only controls the anonymous install/update ping to `https://pi.dev/api/report-install`. Opting out of telemetry does not disable update checks; draht can still fetch `https://pi.dev/api/latest-version` to look for the latest version.
|
|
80
80
|
|
|
81
|
-
Set `
|
|
81
|
+
Set `DRAHT_SKIP_VERSION_CHECK=1` to disable the draht version update check. Use `--offline` or `DRAHT_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
|
|
82
82
|
|
|
83
83
|
### Warnings
|
|
84
84
|
|
|
@@ -119,6 +119,13 @@ Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--off
|
|
|
119
119
|
| `branchSummary.reserveTokens` | number | `16384` | Tokens reserved for branch summarization |
|
|
120
120
|
| `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
|
|
121
121
|
|
|
122
|
+
### Checkpoints
|
|
123
|
+
|
|
124
|
+
| Setting | Type | Default | Description |
|
|
125
|
+
|---------|------|---------|-------------|
|
|
126
|
+
| `checkpoints.retentionDays` | number | `30` | Delete checkpoint snapshots older than this on `draht checkpoint prune` |
|
|
127
|
+
| `checkpoints.maxPerSession` | number | unlimited | Keep at most this many newest snapshots per session |
|
|
128
|
+
|
|
122
129
|
### Retry
|
|
123
130
|
|
|
124
131
|
| Setting | Type | Default | Description |
|
|
@@ -132,7 +139,7 @@ Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--off
|
|
|
132
139
|
|
|
133
140
|
When a provider requests a retry delay longer than `retry.provider.maxRetryDelayMs`, the request fails immediately with an informative error instead of waiting silently. Set it to `0` to disable the limit.
|
|
134
141
|
|
|
135
|
-
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before
|
|
142
|
+
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before draht sees them, which may block the agent until the provider quota resets in some circumstances.
|
|
136
143
|
|
|
137
144
|
```json
|
|
138
145
|
{
|
|
@@ -183,7 +190,7 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explic
|
|
|
183
190
|
}
|
|
184
191
|
```
|
|
185
192
|
|
|
186
|
-
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.
|
|
193
|
+
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.draht/agent/npm/`; project-scoped npm packages install under `.draht/npm/`. Use argv-style entries exactly as the process should be launched. When `npmCommand` is configured, git package dependency installs use plain `install` to avoid npm-specific flags in wrappers or alternate package managers.
|
|
187
194
|
|
|
188
195
|
### Sessions
|
|
189
196
|
|
|
@@ -192,10 +199,10 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explic
|
|
|
192
199
|
| `sessionDir` | string | - | Directory where session files are stored. Accepts absolute or relative paths, plus `~`. |
|
|
193
200
|
|
|
194
201
|
```json
|
|
195
|
-
{ "sessionDir": ".
|
|
202
|
+
{ "sessionDir": ".draht/sessions" }
|
|
196
203
|
```
|
|
197
204
|
|
|
198
|
-
When multiple sources specify a session directory, precedence is `--session-dir`, `
|
|
205
|
+
When multiple sources specify a session directory, precedence is `--session-dir`, `DRAHT_CODING_AGENT_SESSION_DIR`, then `sessionDir` in settings.json.
|
|
199
206
|
|
|
200
207
|
### Model Cycling
|
|
201
208
|
|
|
@@ -219,7 +226,7 @@ When multiple sources specify a session directory, precedence is `--session-dir`
|
|
|
219
226
|
|
|
220
227
|
These settings define where to load extensions, skills, prompts, and themes from.
|
|
221
228
|
|
|
222
|
-
Paths in `~/.
|
|
229
|
+
Paths in `~/.draht/agent/settings.json` resolve relative to `~/.draht/agent`. Paths in `.draht/settings.json` resolve relative to `.draht`. Absolute paths and `~` are supported.
|
|
223
230
|
|
|
224
231
|
| Setting | Type | Default | Description |
|
|
225
232
|
|---------|------|---------|-------------|
|
|
@@ -285,16 +292,16 @@ See [packages.md](packages.md) for package management details.
|
|
|
285
292
|
|
|
286
293
|
## Project Overrides
|
|
287
294
|
|
|
288
|
-
Project settings (`.
|
|
295
|
+
Project settings (`.draht/settings.json`) override global settings. Nested objects are merged:
|
|
289
296
|
|
|
290
297
|
```json
|
|
291
|
-
// ~/.
|
|
298
|
+
// ~/.draht/agent/settings.json (global)
|
|
292
299
|
{
|
|
293
300
|
"theme": "dark",
|
|
294
301
|
"compaction": { "enabled": true, "reserveTokens": 16384 }
|
|
295
302
|
}
|
|
296
303
|
|
|
297
|
-
// .
|
|
304
|
+
// .draht/settings.json (project)
|
|
298
305
|
{
|
|
299
306
|
"compaction": { "reserveTokens": 8192 }
|
|
300
307
|
}
|
package/docs/shell-aliases.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Shell Aliases
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
draht runs bash in non-interactive mode (`bash -c`), which doesn't expand aliases by default.
|
|
4
4
|
|
|
5
|
-
To enable your shell aliases, add to `~/.
|
|
5
|
+
To enable your shell aliases, add to `~/.draht/agent/settings.json`:
|
|
6
6
|
|
|
7
7
|
```json
|
|
8
8
|
{
|
package/docs/skills.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
>
|
|
1
|
+
> draht can create skills. Ask it to build one for your use case.
|
|
2
2
|
|
|
3
3
|
# Skills
|
|
4
4
|
|
|
5
5
|
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
draht implements the [Agent Skills standard](https://agentskills.io/specification), warning about most violations but remaining lenient. draht allows skill names to differ from their parent directory even though the standard disallows it; that rule is suboptimal for shared skill directories used across multiple agent harnesses.
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
10
|
|
|
@@ -21,20 +21,21 @@ Pi implements the [Agent Skills standard](https://agentskills.io/specification),
|
|
|
21
21
|
|
|
22
22
|
> **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
draht loads skills from:
|
|
25
25
|
|
|
26
|
+
- Shipped: a `skills/` directory bundled with the package (builtin skills such as `hexagon-animation`). Disabled by `--no-skills`; a user or project skill with the same name overrides a shipped skill.
|
|
26
27
|
- Global:
|
|
27
|
-
- `~/.
|
|
28
|
+
- `~/.draht/agent/skills/`
|
|
28
29
|
- `~/.agents/skills/`
|
|
29
30
|
- Project (only after the project is trusted):
|
|
30
|
-
- `.
|
|
31
|
+
- `.draht/skills/`
|
|
31
32
|
- `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo)
|
|
32
33
|
- Packages: `skills/` directories or `pi.skills` entries in `package.json`
|
|
33
34
|
- Settings: `skills` array with files or directories
|
|
34
35
|
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
35
36
|
|
|
36
37
|
Discovery rules:
|
|
37
|
-
- In `~/.
|
|
38
|
+
- In `~/.draht/agent/skills/` and `.draht/skills/`, direct root `.md` files are discovered as individual skills
|
|
38
39
|
- In all skill locations, directories containing `SKILL.md` are discovered recursively
|
|
39
40
|
- In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored
|
|
40
41
|
|
|
@@ -53,7 +54,7 @@ To use skills from Claude Code or OpenAI Codex, add their directories to setting
|
|
|
53
54
|
}
|
|
54
55
|
```
|
|
55
56
|
|
|
56
|
-
For project-level Claude Code skills, add to `.
|
|
57
|
+
For project-level Claude Code skills, add to `.draht/settings.json`:
|
|
57
58
|
|
|
58
59
|
```json
|
|
59
60
|
{
|
|
@@ -63,7 +64,7 @@ For project-level Claude Code skills, add to `.pi/settings.json`:
|
|
|
63
64
|
|
|
64
65
|
## How Skills Work
|
|
65
66
|
|
|
66
|
-
1. At startup,
|
|
67
|
+
1. At startup, draht scans skill locations and extracts names and descriptions
|
|
67
68
|
2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
|
|
68
69
|
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
|
|
69
70
|
4. The agent follows the instructions, using relative paths to reference scripts and assets
|
|
@@ -140,7 +141,7 @@ Per the [Agent Skills specification](https://agentskills.io/specification#frontm
|
|
|
140
141
|
|
|
141
142
|
| Field | Required | Description |
|
|
142
143
|
|-------|----------|-------------|
|
|
143
|
-
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Unlike the standard,
|
|
144
|
+
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Unlike the standard, draht does not require this to match the parent directory because that standard requirement is suboptimal for shared skill directories. |
|
|
144
145
|
| `description` | Yes | Max 1024 chars. What the skill does and when to use it. |
|
|
145
146
|
| `license` | No | License name or reference to bundled file. |
|
|
146
147
|
| `compatibility` | No | Max 500 chars. Environment requirements. |
|
|
@@ -154,7 +155,7 @@ Per the [Agent Skills specification](https://agentskills.io/specification#frontm
|
|
|
154
155
|
- Lowercase letters, numbers, hyphens only
|
|
155
156
|
- No leading/trailing hyphens
|
|
156
157
|
- No consecutive hyphens
|
|
157
|
-
|
|
158
|
+
draht does not require the name to match the parent directory. The Agent Skills standard does, but that requirement is suboptimal for shared skill directories used by multiple tools.
|
|
158
159
|
|
|
159
160
|
Valid: `pdf-processing`, `data-analysis`, `code-review`
|
|
160
161
|
Invalid: `PDF-Processing`, `-pdf`, `pdf--processing`
|
|
@@ -175,7 +176,7 @@ description: Helps with PDFs.
|
|
|
175
176
|
|
|
176
177
|
## Validation
|
|
177
178
|
|
|
178
|
-
|
|
179
|
+
draht validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill:
|
|
179
180
|
|
|
180
181
|
- Name exceeds 64 characters or contains invalid characters
|
|
181
182
|
- Name starts/ends with hyphen or has consecutive hyphens
|
package/docs/terminal-setup.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Terminal Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
draht uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
4
|
|
|
5
5
|
## Kitty, iTerm2
|
|
6
6
|
|
|
@@ -8,9 +8,9 @@ Work out of the box.
|
|
|
8
8
|
|
|
9
9
|
## Apple Terminal
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
draht enables enhanced key reporting when available. If Terminal.app still sends plain Return for `Shift+Enter`, draht uses a local macOS modifier fallback to treat that Return as `Shift+Enter`.
|
|
12
12
|
|
|
13
|
-
This fallback only works when
|
|
13
|
+
This fallback only works when draht runs on the same Mac as Terminal.app. It cannot detect the local keyboard over remote SSH.
|
|
14
14
|
|
|
15
15
|
## Ghostty
|
|
16
16
|
|
|
@@ -26,11 +26,11 @@ Older Claude Code versions may have added this Ghostty mapping:
|
|
|
26
26
|
keybind = shift+enter=text:\n
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
That mapping sends a raw linefeed byte. Inside
|
|
29
|
+
That mapping sends a raw linefeed byte. Inside draht, that is indistinguishable from `Ctrl+J`, so tmux and draht no longer see a real `shift+enter` key event.
|
|
30
30
|
|
|
31
31
|
If Claude Code 2.x or newer is the only reason you added that mapping, you can remove it, unless you want to use Claude Code in tmux, where it still requires that Ghostty mapping.
|
|
32
32
|
|
|
33
|
-
If you want `Shift+Enter` to keep working in tmux via that remap, add `ctrl+j` to your
|
|
33
|
+
If you want `Shift+Enter` to keep working in tmux via that remap, add `ctrl+j` to your draht `newLine` keybinding in `~/.draht/agent/keybindings.json`:
|
|
34
34
|
|
|
35
35
|
```json
|
|
36
36
|
{
|
|
@@ -49,7 +49,7 @@ config.enable_kitty_keyboard = true
|
|
|
49
49
|
return config
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
On macOS, WezTerm binds `Option+Enter` to fullscreen by default. To use `Option+Enter` for
|
|
52
|
+
On macOS, WezTerm binds `Option+Enter` to fullscreen by default. To use `Option+Enter` for draht follow-up queueing, add this key override:
|
|
53
53
|
|
|
54
54
|
```lua
|
|
55
55
|
local wezterm = require 'wezterm'
|
|
@@ -66,11 +66,11 @@ return config
|
|
|
66
66
|
|
|
67
67
|
If you already have a `config.keys` table, add the entry to it.
|
|
68
68
|
|
|
69
|
-
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `
|
|
69
|
+
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `DRAHT_HARDWARE_CURSOR=1` before running draht or set `showHardwareCursor` to `true` in settings.
|
|
70
70
|
|
|
71
71
|
## Alacritty
|
|
72
72
|
|
|
73
|
-
Alacritty usually works out of the box for `Shift+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To use `Option+Enter` for
|
|
73
|
+
Alacritty usually works out of the box for `Shift+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To use `Option+Enter` for draht follow-up queueing, add to `~/.config/alacritty/alacritty.toml`:
|
|
74
74
|
|
|
75
75
|
```toml
|
|
76
76
|
[[keyboard.bindings]]
|
|
@@ -105,7 +105,7 @@ Add to `keybindings.json`:
|
|
|
105
105
|
|
|
106
106
|
## Windows Terminal
|
|
107
107
|
|
|
108
|
-
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward the modified Enter keys
|
|
108
|
+
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward the modified Enter keys draht uses:
|
|
109
109
|
|
|
110
110
|
```json
|
|
111
111
|
{
|
|
@@ -123,8 +123,8 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
|
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
- `Shift+Enter` inserts a new line.
|
|
126
|
-
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents
|
|
127
|
-
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to
|
|
126
|
+
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents draht from receiving `Alt+Enter` for follow-up queueing.
|
|
127
|
+
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to draht instead.
|
|
128
128
|
|
|
129
129
|
If you already have an `actions` array, add the objects to it. If the old fullscreen behavior persists, fully close and reopen Windows Terminal.
|
|
130
130
|
|
|
@@ -143,6 +143,6 @@ For the best experience, use a terminal that supports the Kitty keyboard protoco
|
|
|
143
143
|
|
|
144
144
|
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
145
145
|
|
|
146
|
-
If you want the hardware cursor visible, set `
|
|
146
|
+
If you want the hardware cursor visible, set `DRAHT_HARDWARE_CURSOR=1` before running draht (disabled by default for compatibility).
|
|
147
147
|
|
|
148
148
|
Consider using a dedicated terminal emulator for the best experience.
|
package/docs/termux.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Termux (Android) Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
draht runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
@@ -16,14 +16,14 @@ pkg update && pkg upgrade
|
|
|
16
16
|
# Install dependencies
|
|
17
17
|
pkg install nodejs termux-api git
|
|
18
18
|
|
|
19
|
-
# Install
|
|
19
|
+
# Install draht
|
|
20
20
|
npm install -g --ignore-scripts @draht/coding-agent
|
|
21
21
|
|
|
22
22
|
# Create config directory
|
|
23
|
-
mkdir -p ~/.
|
|
23
|
+
mkdir -p ~/.draht/agent
|
|
24
24
|
|
|
25
|
-
# Run
|
|
26
|
-
|
|
25
|
+
# Run draht
|
|
26
|
+
draht
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Clipboard Support
|
|
@@ -34,7 +34,7 @@ Image clipboard is not supported on Termux (the `ctrl+v` image paste feature wil
|
|
|
34
34
|
|
|
35
35
|
## Example AGENTS.md for Termux
|
|
36
36
|
|
|
37
|
-
Create `~/.
|
|
37
|
+
Create `~/.draht/agent/AGENTS.md` to help the agent understand the Termux environment:
|
|
38
38
|
|
|
39
39
|
````markdown
|
|
40
40
|
# Agent Environment: Termux on Android
|
package/docs/themes.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
>
|
|
1
|
+
> draht can create themes. Ask it to build one for your setup.
|
|
2
2
|
|
|
3
3
|
# Themes
|
|
4
4
|
|
|
@@ -16,11 +16,11 @@ Themes are JSON files that define colors for the TUI.
|
|
|
16
16
|
|
|
17
17
|
## Locations
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
draht loads themes from:
|
|
20
20
|
|
|
21
21
|
- Built-in: `dark`, `light`
|
|
22
|
-
- Global: `~/.
|
|
23
|
-
- Project: `.
|
|
22
|
+
- Global: `~/.draht/agent/themes/*.json`
|
|
23
|
+
- Project: `.draht/themes/*.json` (only after the project is trusted)
|
|
24
24
|
- Packages: `themes/` directories or `pi.themes` entries in `package.json`
|
|
25
25
|
- Settings: `themes` array with files or directories
|
|
26
26
|
- CLI: `--theme <path>` (repeatable)
|
|
@@ -37,22 +37,22 @@ Select a theme via `/settings` or in `settings.json`:
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
On first run,
|
|
40
|
+
On first run, draht detects your terminal background and defaults to `dark` or `light`.
|
|
41
41
|
|
|
42
42
|
## Creating a Custom Theme
|
|
43
43
|
|
|
44
44
|
1. Create a theme file:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
mkdir -p ~/.
|
|
48
|
-
vim ~/.
|
|
47
|
+
mkdir -p ~/.draht/agent/themes
|
|
48
|
+
vim ~/.draht/agent/themes/my-theme.json
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
2. Define the theme with all required colors (see [Color Tokens](#color-tokens)):
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
55
|
+
"$schema": "https://raw.githubusercontent.com/draht-dev/draht/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
56
56
|
"name": "my-theme",
|
|
57
57
|
"vars": {
|
|
58
58
|
"primary": "#00aaff",
|
|
@@ -117,13 +117,13 @@ vim ~/.pi/agent/themes/my-theme.json
|
|
|
117
117
|
|
|
118
118
|
3. Select the theme via `/settings`.
|
|
119
119
|
|
|
120
|
-
**Hot reload:** When you edit the currently active custom theme file,
|
|
120
|
+
**Hot reload:** When you edit the currently active custom theme file, draht reloads it automatically for immediate visual feedback.
|
|
121
121
|
|
|
122
122
|
## Theme Format
|
|
123
123
|
|
|
124
124
|
```json
|
|
125
125
|
{
|
|
126
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
126
|
+
"$schema": "https://raw.githubusercontent.com/draht-dev/draht/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
127
127
|
"name": "my-theme",
|
|
128
128
|
"vars": {
|
|
129
129
|
"blue": "#0066cc",
|
|
@@ -270,7 +270,7 @@ Four formats are supported:
|
|
|
270
270
|
|
|
271
271
|
### Terminal Compatibility
|
|
272
272
|
|
|
273
|
-
|
|
273
|
+
draht uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, draht falls back to the nearest approximation.
|
|
274
274
|
|
|
275
275
|
Check truecolor support:
|
|
276
276
|
|
package/docs/tmux.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tmux Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
draht works inside tmux, but tmux strips modifier information from certain keys by default. Without configuration, `Shift+Enter` and `Ctrl+Enter` are usually indistinguishable from plain `Enter`.
|
|
4
4
|
|
|
5
5
|
## Recommended Configuration
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ tmux kill-server
|
|
|
18
18
|
tmux
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
draht requests extended key reporting automatically when Kitty keyboard protocol is not available. With `extended-keys-format csi-u`, tmux forwards modified keys in CSI-u format, which is the most reliable configuration. The `extended-keys-format` option requires tmux 3.5 or later.
|
|
22
22
|
|
|
23
23
|
## Why `csi-u` Is Recommended
|
|
24
24
|
|
|
@@ -40,7 +40,7 @@ With `extended-keys-format csi-u`, the same keys are forwarded as:
|
|
|
40
40
|
- `Ctrl+D` → `\x1b[100;5u`
|
|
41
41
|
- `Ctrl+Enter` → `\x1b[13;5u`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
draht supports both formats, but `csi-u` is the recommended tmux setup.
|
|
44
44
|
|
|
45
45
|
## What This Fixes
|
|
46
46
|
|
|
@@ -60,4 +60,4 @@ This affects the default keybindings (`Enter` to submit, `Shift+Enter` for newli
|
|
|
60
60
|
- tmux 3.5 or later for `extended-keys-format csi-u` (run `tmux -V` to check)
|
|
61
61
|
- A terminal emulator that supports extended keys (Ghostty, Kitty, iTerm2, WezTerm, Windows Terminal)
|
|
62
62
|
|
|
63
|
-
With tmux 3.2 through 3.4, omit `extended-keys-format csi-u`;
|
|
63
|
+
With tmux 3.2 through 3.4, omit `extended-keys-format csi-u`; draht still supports tmux's default xterm `modifyOtherKeys` format.
|
package/docs/tui.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
>
|
|
1
|
+
> draht can create TUI components. Ask it to build one for your use case.
|
|
2
2
|
|
|
3
3
|
# TUI Components
|
|
4
4
|
|
|
5
5
|
Extensions and custom tools can render custom TUI components for interactive user interfaces. This page covers the component system and available building blocks.
|
|
6
6
|
|
|
7
|
-
**Source:** [`@draht/tui`](https://github.com/
|
|
7
|
+
**Source:** [`@draht/tui`](https://github.com/draht-dev/draht/tree/main/packages/tui)
|
|
8
8
|
|
|
9
9
|
## Component Interface
|
|
10
10
|
|
|
@@ -52,7 +52,7 @@ When a `Focusable` component has focus, TUI:
|
|
|
52
52
|
3. Positions the hardware terminal cursor at that location
|
|
53
53
|
4. Shows the hardware cursor only when `showHardwareCursor` is enabled
|
|
54
54
|
|
|
55
|
-
The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with `showHardwareCursor`, `setShowHardwareCursor(true)`, or `
|
|
55
|
+
The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with `showHardwareCursor`, `setShowHardwareCursor(true)`, or `DRAHT_HARDWARE_CURSOR=1`. The `Editor` and `Input` built-in components already implement this interface.
|
|
56
56
|
|
|
57
57
|
### Container Components with Embedded Inputs
|
|
58
58
|
|
|
@@ -761,7 +761,7 @@ ctx.ui.setStatus("my-ext", undefined);
|
|
|
761
761
|
|
|
762
762
|
### Pattern 4b: Working Indicator Customization
|
|
763
763
|
|
|
764
|
-
Customize the inline working indicator shown while
|
|
764
|
+
Customize the inline working indicator shown while draht is streaming a response.
|
|
765
765
|
|
|
766
766
|
```typescript
|
|
767
767
|
// Static indicator
|
|
@@ -781,7 +781,7 @@ ctx.ui.setWorkingIndicator({
|
|
|
781
781
|
// Hide the indicator entirely
|
|
782
782
|
ctx.ui.setWorkingIndicator({ frames: [] });
|
|
783
783
|
|
|
784
|
-
// Restore
|
|
784
|
+
// Restore draht's default spinner
|
|
785
785
|
ctx.ui.setWorkingIndicator();
|
|
786
786
|
```
|
|
787
787
|
|