@draht/coding-agent 2026.7.30 → 2026.10.4-2
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 +606 -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/bun/cli.d.ts +1 -1
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +6 -3
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/sandbox-env-setup.d.ts +2 -0
- package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
- package/dist/bun/sandbox-env-setup.js +4 -0
- package/dist/bun/sandbox-env-setup.js.map +1 -0
- package/dist/bundle/chunks/anthropic-messages-GAKYXF65.js +6 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-ZIXMK6JO.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +79 -0
- package/dist/bundle/chunks/chunk-2E5VODES.js +2 -0
- package/dist/bundle/chunks/chunk-2FBJKY7F.js +2 -0
- package/dist/bundle/chunks/chunk-2N4I6WXC.js +2 -0
- package/dist/bundle/chunks/chunk-5VZWYVZB.js +82 -0
- package/dist/bundle/chunks/chunk-63BK6WK2.js +2 -0
- package/dist/bundle/chunks/chunk-6MSE6LZ3.js +6 -0
- package/dist/bundle/chunks/chunk-6ZJKIMU7.js +2 -0
- package/dist/bundle/chunks/chunk-736QBNUZ.js +12 -0
- package/dist/bundle/chunks/chunk-BXSHCX3G.js +11 -0
- package/dist/bundle/chunks/chunk-CEJJ5XF2.js +170 -0
- package/dist/bundle/chunks/chunk-COF5JT7R.js +4 -0
- package/dist/bundle/chunks/chunk-D6TMD5Q2.js +44 -0
- package/dist/bundle/chunks/chunk-DPE4ALPU.js +146 -0
- package/dist/bundle/chunks/chunk-EBVYI75P.js +2 -0
- package/dist/bundle/chunks/chunk-GVXA72ZA.js +2 -0
- package/dist/bundle/chunks/chunk-H6FT43VC.js +137 -0
- package/dist/bundle/chunks/chunk-HJ72RANT.js +2 -0
- package/dist/bundle/chunks/chunk-HTJ3L72O.js +2 -0
- package/dist/bundle/chunks/chunk-HZ2UHMBT.js +2 -0
- package/dist/bundle/chunks/chunk-I5OKY6RH.js +11 -0
- package/dist/bundle/chunks/chunk-IWTUBX6V.js +4 -0
- package/dist/bundle/chunks/chunk-KPO5375S.js +2 -0
- package/dist/bundle/chunks/chunk-KVH4HR57.js +31 -0
- package/dist/bundle/chunks/chunk-LDAOC5RB.js +18 -0
- package/dist/bundle/chunks/chunk-ON6XU6AG.js +2 -0
- package/dist/bundle/chunks/chunk-QMN7OD6G.js +2 -0
- package/dist/bundle/chunks/chunk-RZKPFWMH.js +42 -0
- package/dist/bundle/chunks/chunk-SDRCE6OP.js +2 -0
- package/dist/bundle/chunks/chunk-SVNWI7EV.js +8 -0
- package/dist/bundle/chunks/chunk-TIA2T6EO.js +3 -0
- package/dist/bundle/chunks/chunk-VOFPZOUQ.js +1472 -0
- package/dist/bundle/chunks/chunk-XBUEMKIY.js +2 -0
- package/dist/bundle/chunks/chunk-XOGEYN4Q.js +2 -0
- package/dist/bundle/chunks/chunk-ZZD35WKM.js +2 -0
- package/dist/bundle/chunks/cli-SR5QBZH4.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MJKOAE5S.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +315 -0
- package/dist/bundle/chunks/execute-VCYDHEYA.js +328 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-antigravity.js +75 -0
- package/dist/bundle/chunks/google-gemini-cli.js +75 -0
- package/dist/bundle/chunks/google-generative-ai-RPUPQ6PM.js +2 -0
- package/dist/bundle/chunks/google-vertex-EZES5QVQ.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/jiti-loader-RKXLMQV2.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-XOG5PI3Y.js +9 -0
- package/dist/bundle/chunks/llama-cpp-classify-EJ5XMSQL.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-AOYGU43Y.js +5 -0
- package/dist/bundle/chunks/multipart-parser-AZP5BX2W.js +3 -0
- package/dist/bundle/chunks/node-C2JGH2OB.js +2 -0
- package/dist/bundle/chunks/node-LQ52KV6B.js +16 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-M2Y77JEQ.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-A4OKYOYV.js +7 -0
- package/dist/bundle/chunks/openai-responses-6IXV53T3.js +3 -0
- package/dist/bundle/chunks/opencode-go.js +2 -0
- package/dist/bundle/chunks/openrouter-images-LYV4NKFM.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-messages-KKMEUT3Z.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/runtime-6YJPGSP7.js +2 -0
- package/dist/bundle/chunks/settings-manager-D2EG7WDO.js +2 -0
- package/dist/bundle/chunks/src-TIBHS42X.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-YBEEY5XU.js +2 -0
- package/dist/bundle/chunks/virtual-modules-CBOAFAFT.js +2 -0
- package/dist/bundle/chunks/xai.js +75 -0
- package/dist/bundle/cli-runtime.js +3 -0
- package/dist/bundle/cli.js +5 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/cli/args.d.ts +14 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +140 -22
- 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/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +103 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +3 -2
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/credential-print.d.ts +6 -4
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +47 -34
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/file-processor.d.ts +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +2 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/list-models.d.ts +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +2 -2
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +12 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +2 -2
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +42 -33
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js +3 -12
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +29 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +73 -10
- 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 +98 -32
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +15 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +266 -49
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1503 -597
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +25 -9
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +245 -45
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bug-report-upload.d.ts +11 -0
- package/dist/core/bug-report-upload.d.ts.map +1 -0
- package/dist/core/bug-report-upload.js +20 -0
- package/dist/core/bug-report-upload.js.map +1 -0
- package/dist/core/bug-report.d.ts +176 -0
- package/dist/core/bug-report.d.ts.map +1 -0
- package/dist/core/bug-report.js +292 -0
- package/dist/core/bug-report.js.map +1 -0
- 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/cache-stats.d.ts.map +1 -1
- package/dist/core/cache-stats.js +12 -1
- package/dist/core/cache-stats.js.map +1 -1
- package/dist/core/cache-warmer.d.ts +103 -0
- package/dist/core/cache-warmer.d.ts.map +1 -0
- package/dist/core/cache-warmer.js +356 -0
- package/dist/core/cache-warmer.js.map +1 -0
- 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 +298 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.js +901 -0
- package/dist/core/checkpoints/checkpoint-manager.js.map +1 -0
- package/dist/core/checkpoints/rewind.d.ts +143 -0
- package/dist/core/checkpoints/rewind.d.ts.map +1 -0
- package/dist/core/checkpoints/rewind.js +247 -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 +11 -6
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +14 -6
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +221 -122
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +2 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +25 -18
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/crash-log.d.ts +27 -0
- package/dist/core/crash-log.d.ts.map +1 -0
- package/dist/core/crash-log.js +140 -0
- package/dist/core/crash-log.js.map +1 -0
- package/dist/core/defaults.d.ts +1 -0
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js +9 -0
- package/dist/core/defaults.js.map +1 -1
- package/dist/core/experimental.js +1 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/template.css +10 -0
- package/dist/core/export-html/template.js +72 -18
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/jiti-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-loader.js +5 -0
- package/dist/core/extensions/jiti-loader.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +298 -96
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +59 -9
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +410 -103
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +701 -85
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +3 -0
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts +3 -0
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/virtual-modules.js +37 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +2 -2
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +3 -22
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -1
- package/dist/core/footer-data-provider.js +19 -18
- package/dist/core/footer-data-provider.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 +2 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/keybindings.d.ts +88 -13
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +34 -7
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +119 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +191 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +1 -0
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +202 -20
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +53 -18
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +21 -3
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +47 -10
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +7 -5
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +62 -23
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +80 -15
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +466 -120
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/models-store.d.ts +12 -7
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +87 -18
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/multi-agent/fsm.js +8 -3
- package/dist/core/multi-agent/fsm.js.map +1 -1
- package/dist/core/multi-agent/mailbox.js +1 -3
- package/dist/core/multi-agent/mailbox.js.map +1 -1
- package/dist/core/multi-agent/permission-gate.d.ts +5 -2
- package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
- package/dist/core/multi-agent/permission-gate.js +601 -37
- package/dist/core/multi-agent/permission-gate.js.map +1 -1
- package/dist/core/multi-agent/task-board.js +2 -4
- package/dist/core/multi-agent/task-board.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 +3 -5
- package/dist/core/multi-agent/worktree.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +102 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -0
- package/dist/core/nested-tool-calls.js +178 -0
- package/dist/core/nested-tool-calls.js.map +1 -0
- package/dist/core/package-manager.d.ts +16 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +162 -69
- 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 +36 -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/prompt-templates.d.ts +6 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +63 -37
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.js +5 -5
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-composer.d.ts +44 -20
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +151 -51
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/radius.d.ts +13 -0
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/radius.js +19 -0
- package/dist/core/radius.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +10 -3
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +105 -81
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +28 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +319 -65
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +5 -5
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +13 -9
- package/dist/core/runtime-credentials.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 +93 -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 +7 -5
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +103 -53
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.js +1 -0
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-export.d.ts +8 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +33 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts +134 -15
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +366 -149
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +105 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +274 -40
- 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 +70 -39
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -1
- 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 +666 -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 +786 -26
- package/dist/core/socket-server/socket-server.js.map +1 -1
- package/dist/core/socket-server/types.d.ts +108 -3
- 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/source-info.d.ts +8 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +16 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts +49 -6
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +126 -90
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +32 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +83 -141
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +2 -5
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts +5 -12
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +36 -173
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +7 -0
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +22 -76
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +10 -62
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +4 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +4 -0
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +9 -50
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +11 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +54 -12
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts +8 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +16 -123
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +6 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +26 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts +12 -0
- package/dist/core/tools/renderers/bash.d.ts.map +1 -0
- package/dist/core/tools/renderers/bash.js +117 -0
- package/dist/core/tools/renderers/bash.js.map +1 -0
- package/dist/core/tools/renderers/edit.d.ts +23 -0
- package/dist/core/tools/renderers/edit.d.ts.map +1 -0
- package/dist/core/tools/renderers/edit.js +167 -0
- package/dist/core/tools/renderers/edit.js.map +1 -0
- package/dist/core/tools/renderers/find.d.ts +10 -0
- package/dist/core/tools/renderers/find.d.ts.map +1 -0
- package/dist/core/tools/renderers/find.js +64 -0
- package/dist/core/tools/renderers/find.js.map +1 -0
- package/dist/core/tools/renderers/grep.d.ts +10 -0
- package/dist/core/tools/renderers/grep.d.ts.map +1 -0
- package/dist/core/tools/renderers/grep.js +69 -0
- package/dist/core/tools/renderers/grep.js.map +1 -0
- package/dist/core/tools/renderers/index.d.ts +28 -0
- package/dist/core/tools/renderers/index.d.ts.map +1 -0
- package/dist/core/tools/renderers/index.js +47 -0
- package/dist/core/tools/renderers/index.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts +10 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -0
- package/dist/core/tools/renderers/ls.js +58 -0
- package/dist/core/tools/renderers/ls.js.map +1 -0
- package/dist/core/tools/renderers/read.d.ts +11 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -0
- package/dist/core/tools/renderers/read.js +130 -0
- package/dist/core/tools/renderers/read.js.map +1 -0
- package/dist/core/tools/renderers/write.d.ts +10 -0
- package/dist/core/tools/renderers/write.d.ts.map +1 -0
- package/dist/core/tools/renderers/write.js +153 -0
- package/dist/core/tools/renderers/write.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +5 -3
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +3 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +14 -0
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +29 -0
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts +4 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +12 -147
- package/dist/core/tools/write.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 +59 -22
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts +3 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +28 -1
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/core/virtual-models.d.ts +117 -0
- package/dist/core/virtual-models.d.ts.map +1 -0
- package/dist/core/virtual-models.js +124 -0
- package/dist/core/virtual-models.js.map +1 -0
- package/dist/experimental/micro/api.d.ts +81 -0
- package/dist/experimental/micro/api.d.ts.map +1 -0
- package/dist/experimental/micro/api.js +2 -0
- package/dist/experimental/micro/api.js.map +1 -0
- package/dist/experimental/micro/main.d.ts +3 -0
- package/dist/experimental/micro/main.d.ts.map +1 -0
- package/dist/experimental/micro/main.js +21 -0
- package/dist/experimental/micro/main.js.map +1 -0
- package/dist/experimental/micro/models.d.ts +11 -0
- package/dist/experimental/micro/models.d.ts.map +1 -0
- package/dist/experimental/micro/models.js +95 -0
- package/dist/experimental/micro/models.js.map +1 -0
- package/dist/experimental/micro/runtime.d.ts +12 -0
- package/dist/experimental/micro/runtime.d.ts.map +1 -0
- package/dist/experimental/micro/runtime.js +465 -0
- package/dist/experimental/micro/runtime.js.map +1 -0
- package/dist/experimental/micro/sessions.d.ts +10 -0
- package/dist/experimental/micro/sessions.d.ts.map +1 -0
- package/dist/experimental/micro/sessions.js +41 -0
- package/dist/experimental/micro/sessions.js.map +1 -0
- package/dist/experimental/micro/tools.d.ts +10 -0
- package/dist/experimental/micro/tools.d.ts.map +1 -0
- package/dist/experimental/micro/tools.js +96 -0
- package/dist/experimental/micro/tools.js.map +1 -0
- package/dist/experimental/micro/tui.d.ts +3 -0
- package/dist/experimental/micro/tui.d.ts.map +1 -0
- package/dist/experimental/micro/tui.js +510 -0
- package/dist/experimental/micro/tui.js.map +1 -0
- package/dist/experimental/mini/main.d.ts +7 -0
- package/dist/experimental/mini/main.d.ts.map +1 -0
- package/dist/experimental/mini/main.js +21 -0
- package/dist/experimental/mini/main.js.map +1 -0
- package/dist/experimental/mini/server/entry.d.ts +3 -0
- package/dist/experimental/mini/server/entry.d.ts.map +1 -0
- package/dist/experimental/mini/server/entry.js +11 -0
- package/dist/experimental/mini/server/entry.js.map +1 -0
- package/dist/experimental/mini/server/run.d.ts +13 -0
- package/dist/experimental/mini/server/run.d.ts.map +1 -0
- package/dist/experimental/mini/server/run.js +150 -0
- package/dist/experimental/mini/server/run.js.map +1 -0
- package/dist/experimental/mini/shared/protocol.d.ts +127 -0
- package/dist/experimental/mini/shared/protocol.d.ts.map +1 -0
- package/dist/experimental/mini/shared/protocol.js +13 -0
- package/dist/experimental/mini/shared/protocol.js.map +1 -0
- package/dist/experimental/mini/shared/rpc.d.ts +49 -0
- package/dist/experimental/mini/shared/rpc.d.ts.map +1 -0
- package/dist/experimental/mini/shared/rpc.js +171 -0
- package/dist/experimental/mini/shared/rpc.js.map +1 -0
- package/dist/experimental/mini/shared/transport.d.ts +35 -0
- package/dist/experimental/mini/shared/transport.d.ts.map +1 -0
- package/dist/experimental/mini/shared/transport.js +94 -0
- package/dist/experimental/mini/shared/transport.js.map +1 -0
- package/dist/experimental/mini/tui/run.d.ts +9 -0
- package/dist/experimental/mini/tui/run.d.ts.map +1 -0
- package/dist/experimental/mini/tui/run.js +62 -0
- package/dist/experimental/mini/tui/run.js.map +1 -0
- package/dist/experimental/mini/tui/session.d.ts +26 -0
- package/dist/experimental/mini/tui/session.d.ts.map +1 -0
- package/dist/experimental/mini/tui/session.js +94 -0
- package/dist/experimental/mini/tui/session.js.map +1 -0
- package/dist/experimental/mini/tui/view.d.ts +10 -0
- package/dist/experimental/mini/tui/view.d.ts.map +1 -0
- package/dist/experimental/mini/tui/view.js +461 -0
- package/dist/experimental/mini/tui/view.js.map +1 -0
- package/dist/experimental/mini/worker/entry.d.ts +3 -0
- package/dist/experimental/mini/worker/entry.d.ts.map +1 -0
- package/dist/experimental/mini/worker/entry.js +10 -0
- package/dist/experimental/mini/worker/entry.js.map +1 -0
- package/dist/experimental/mini/worker/lane-service.d.ts +44 -0
- package/dist/experimental/mini/worker/lane-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/lane-service.js +97 -0
- package/dist/experimental/mini/worker/lane-service.js.map +1 -0
- package/dist/experimental/mini/worker/models-service.d.ts +19 -0
- package/dist/experimental/mini/worker/models-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/models-service.js +136 -0
- package/dist/experimental/mini/worker/models-service.js.map +1 -0
- package/dist/experimental/mini/worker/run.d.ts +14 -0
- package/dist/experimental/mini/worker/run.d.ts.map +1 -0
- package/dist/experimental/mini/worker/run.js +88 -0
- package/dist/experimental/mini/worker/run.js.map +1 -0
- package/dist/extensions/codemode/execute.d.ts +16 -0
- package/dist/extensions/codemode/execute.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.js +429 -0
- package/dist/extensions/codemode/execute.js.map +1 -0
- package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
- package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.lazy.js +3 -0
- package/dist/extensions/codemode/execute.lazy.js.map +1 -0
- package/dist/extensions/codemode/index.d.ts +21 -0
- package/dist/extensions/codemode/index.d.ts.map +1 -0
- package/dist/extensions/codemode/index.js +31 -0
- package/dist/extensions/codemode/index.js.map +1 -0
- package/dist/extensions/codemode/renderer.d.ts +12 -0
- package/dist/extensions/codemode/renderer.d.ts.map +1 -0
- package/dist/extensions/codemode/renderer.js +137 -0
- package/dist/extensions/codemode/renderer.js.map +1 -0
- package/dist/extensions/codemode/tool.d.ts +123 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -0
- package/dist/extensions/codemode/tool.js +315 -0
- package/dist/extensions/codemode/tool.js.map +1 -0
- package/dist/extensions/codemode/worker.d.ts +7 -0
- package/dist/extensions/codemode/worker.d.ts.map +1 -0
- package/dist/extensions/codemode/worker.js +7 -0
- package/dist/extensions/codemode/worker.js.map +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +13 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +8 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +13 -0
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/huggingface.js +2 -0
- package/dist/extensions/llama/huggingface.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +13 -2
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +4 -2
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +121 -15
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/llama/ui.js +28 -12
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +21 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.js +500 -0
- package/dist/extensions/mcp/cli.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
- package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +3 -0
- package/dist/extensions/mcp/cli.lazy.js.map +1 -0
- package/dist/extensions/mcp/config.d.ts +72 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +158 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +76 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1055 -0
- package/dist/extensions/mcp/index.js.map +1 -0
- package/dist/extensions/mcp/log.d.ts +16 -0
- package/dist/extensions/mcp/log.d.ts.map +1 -0
- package/dist/extensions/mcp/log.js +66 -0
- package/dist/extensions/mcp/log.js.map +1 -0
- package/dist/extensions/mcp/oauth.d.ts +96 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +333 -0
- package/dist/extensions/mcp/oauth.js.map +1 -0
- package/dist/extensions/mcp/resources.d.ts +43 -0
- package/dist/extensions/mcp/resources.d.ts.map +1 -0
- package/dist/extensions/mcp/resources.js +262 -0
- package/dist/extensions/mcp/resources.js.map +1 -0
- package/dist/extensions/mcp/runtime.d.ts +98 -0
- package/dist/extensions/mcp/runtime.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.js +394 -0
- package/dist/extensions/mcp/runtime.js.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.js +3 -0
- package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
- package/dist/extensions/mcp/tools.d.ts +84 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +251 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/mcp/ui.d.ts +60 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -0
- package/dist/extensions/mcp/ui.js +174 -0
- package/dist/extensions/mcp/ui.js.map +1 -0
- 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 +194 -0
- package/dist/extensions/stub-provider/provider.js.map +1 -0
- package/dist/extensions/tool-search/index.d.ts +12 -0
- package/dist/extensions/tool-search/index.d.ts.map +1 -0
- package/dist/extensions/tool-search/index.js +15 -0
- package/dist/extensions/tool-search/index.js.map +1 -0
- package/dist/extensions/tool-search/tool.d.ts +73 -0
- package/dist/extensions/tool-search/tool.d.ts.map +1 -0
- package/dist/extensions/tool-search/tool.js +189 -0
- package/dist/extensions/tool-search/tool.js.map +1 -0
- package/dist/hooks/gsd/draht-quality-gate.js +3 -3
- package/dist/index.d.ts +20 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +4 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +365 -96
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +1 -1
- package/dist/migrations.js +7 -6
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -0
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/bug-report.d.ts +19 -0
- package/dist/modes/interactive/bug-report.d.ts.map +1 -0
- package/dist/modes/interactive/bug-report.js +211 -0
- package/dist/modes/interactive/bug-report.js.map +1 -0
- package/dist/modes/interactive/chat-viewport.d.ts +20 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
- package/dist/modes/interactive/chat-viewport.js +28 -0
- package/dist/modes/interactive/chat-viewport.js.map +1 -0
- package/dist/modes/interactive/components/armin.js +10 -6
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +6 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +38 -15
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +9 -4
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +3 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +15 -6
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +15 -6
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +38 -10
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +5 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +54 -2
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +4 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +7 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +8 -6
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +1 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +4 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +14 -3
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +2 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +14 -2
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +50 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +218 -6
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +4 -4
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +12 -4
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +7 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +51 -6
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -3
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +75 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +10 -4
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +101 -40
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +11 -3
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +4 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +60 -32
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +5 -5
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +138 -80
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +25 -4
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +240 -67
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +1 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +14 -5
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +3 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +12 -3
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +2 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +17 -0
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/themed-text.js +29 -0
- package/dist/modes/interactive/components/themed-text.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +76 -18
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +21 -4
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +88 -53
- 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 +65 -23
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +8 -2
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +6 -3
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +12 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +39 -6
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +166 -8
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1690 -599
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/session-share.d.ts +23 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +130 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +54 -63
- package/dist/modes/interactive/theme/light.json +52 -60
- package/dist/modes/interactive/theme/system-theme.d.ts +54 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/system-theme.js +535 -0
- package/dist/modes/interactive/theme/system-theme.js.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +59 -7
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +164 -51
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +85 -0
- package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-json.js +132 -0
- package/dist/modes/interactive/theme/theme-json.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +24 -3
- package/dist/modes/interactive/theme/theme.d.ts +80 -42
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +274 -417
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tui-renderer.d.ts +22 -0
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/tui-renderer.js +67 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -0
- package/dist/modes/json-event.d.ts +34 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +29 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +12 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +17 -9
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +27 -15
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +179 -19
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +90 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +217 -63
- package/dist/package-manager-cli.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 +3 -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 +6 -13
- package/dist/prompts/commands/triage.md +159 -0
- package/dist/prompts/commands/verify-work.md +5 -14
- package/dist/prompts/commands/why.md +139 -0
- package/dist/rpc-entry.js +1 -0
- package/dist/rpc-entry.js.map +1 -1
- package/dist/skills/atomic-reasoning/SKILL.md +115 -0
- package/dist/skills/blast-radius/SKILL.md +56 -0
- package/dist/skills/epistemics/SKILL.md +99 -0
- package/dist/skills/explainers/SKILL.md +65 -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 +119 -0
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +48 -0
- package/dist/utils/abort.js.map +1 -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/changelog.js +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts +13 -2
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +26 -9
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts +7 -0
- package/dist/utils/clipboard-command.d.ts.map +1 -0
- package/dist/utils/clipboard-command.js +45 -0
- package/dist/utils/clipboard-command.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +60 -91
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts +3 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +123 -108
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/draht-user-agent.d.ts +2 -0
- package/dist/utils/draht-user-agent.d.ts.map +1 -0
- package/dist/utils/draht-user-agent.js +5 -0
- package/dist/utils/draht-user-agent.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +2 -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/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +2 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/management-http.d.ts +25 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +54 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/mime.js +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/paths.d.ts +6 -10
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +23 -14
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts +2 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts +4 -3
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +26 -39
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +62 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tool-result-images.d.ts +21 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +48 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +11 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +56 -41
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +4 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +30 -9
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/wsl.d.ts +3 -0
- package/dist/utils/wsl.d.ts.map +1 -0
- package/dist/utils/wsl.js +15 -0
- package/dist/utils/wsl.js.map +1 -0
- package/dist/utils/zip.d.ts +7 -0
- package/dist/utils/zip.d.ts.map +1 -0
- package/dist/utils/zip.js +60 -0
- package/dist/utils/zip.js.map +1 -0
- package/docs/attachable-sessions.md +79 -0
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +374 -0
- package/docs/compaction.md +107 -45
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +100 -66
- package/docs/custom-provider.md +109 -707
- package/docs/docs.json +155 -95
- package/docs/duet.md +42 -0
- package/docs/environment-variables.md +30 -17
- package/docs/extensions.md +169 -2811
- package/docs/how-pi-works.md +53 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/index.md +25 -69
- package/docs/json.md +198 -57
- package/docs/keybindings.md +89 -92
- package/docs/llama-cpp.md +23 -8
- package/docs/mcp.md +231 -0
- package/docs/message-types.md +261 -0
- package/docs/models.md +94 -478
- package/docs/packages.md +68 -164
- package/docs/prompt-templates.md +31 -68
- package/docs/providers.md +118 -215
- package/docs/quickstart.md +56 -109
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +186 -1494
- package/docs/sdk.md +79 -1127
- package/docs/security.md +77 -33
- package/docs/session-format.md +98 -222
- package/docs/sessions.md +36 -113
- package/docs/settings.md +125 -251
- package/docs/shell-aliases.md +85 -5
- package/docs/skills.md +52 -188
- package/docs/slash-commands.md +61 -0
- package/docs/terminal-setup.md +132 -61
- package/docs/termux.md +74 -84
- package/docs/themes.md +91 -252
- package/docs/tmux.md +31 -39
- package/docs/tui.md +74 -891
- package/docs/usage.md +54 -255
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +57 -7
- package/examples/extensions/antigravity-image-gen.ts +9 -9
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +16 -40
- package/examples/extensions/custom-compaction.ts +1 -16
- package/examples/extensions/custom-provider-anthropic/index.ts +20 -13
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +4 -3
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
- package/examples/extensions/debug-provider.ts +90 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
- package/examples/extensions/dynamic-resources/dynamic.json +3 -1
- package/examples/extensions/git-checkpoint.ts +2 -2
- package/examples/extensions/handoff.ts +2 -11
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/minimal-mode.ts +24 -96
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/overlay-qa-tests.ts +3 -3
- package/examples/extensions/prompt-customizer.ts +19 -67
- package/examples/extensions/qna.ts +3 -7
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +27 -4
- package/examples/extensions/summarize.ts +7 -18
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +38 -9
- package/examples/sdk/02-custom-model.ts +1 -2
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
- package/examples/sdk/12-full-control.ts +1 -1
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/hooks/gsd/draht-quality-gate.js +3 -3
- package/package.json +28 -32
- 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 +3 -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 +6 -13
- package/prompts/commands/triage.md +159 -0
- package/prompts/commands/verify-work.md +5 -14
- package/prompts/commands/why.md +139 -0
- package/skills/atomic-reasoning/SKILL.md +115 -0
- package/skills/blast-radius/SKILL.md +56 -0
- package/skills/epistemics/SKILL.md +99 -0
- package/skills/explainers/SKILL.md +65 -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 +119 -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/dist/utils/clipboard-native.d.ts +0 -11
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js +0 -20
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/pi-user-agent.d.ts +0 -2
- package/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/utils/pi-user-agent.js +0 -5
- package/dist/utils/pi-user-agent.js.map +0 -1
- package/docs/development.md +0 -71
- package/docs/tree.md +0 -231
- package/examples/extensions/kimi-deferred-tools.ts +0 -61
- package/prompts/agents/build.md +0 -86
- package/prompts/agents/plan.md +0 -79
- package/prompts/agents/verify.md +0 -69
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explainers
|
|
3
|
+
description: Pick the output form that lets a human understand agent work fastest, and build it from evidence — Mermaid diagrams for relational content, a self-contained HTML explainer for findings worth exploring, the STE register in unslop for procedures, and narrated video reels as a non-core option. Use when a report, review, plan, investigation, or handoff describes structure (dependencies, call paths, data flow, state machines, sequences, timelines, wave order), when the user asks to "draw", "diagram", "visualize", "show me", "explain as HTML", "make an explainer", or "Schaubild", or when prose alone would make the reader rebuild a graph in their head.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Explainers
|
|
7
|
+
|
|
8
|
+
The more work agents do, the more of the human's time goes to oversight: reading what was done and deciding whether to trust it. Prose is often the slowest form for that. This skill chooses a faster form and keeps it honest.
|
|
9
|
+
|
|
10
|
+
Pick the cheapest form that carries the structure:
|
|
11
|
+
|
|
12
|
+
1. **Prose** — the default. For procedures, use the controlled register in `unslop`.
|
|
13
|
+
2. **Diagram** — when the content is a graph: things connected to things.
|
|
14
|
+
3. **HTML explainer** — when the reader will want to filter, expand, or compare, or when the deliverable leaves the terminal (a client, a non-developer).
|
|
15
|
+
4. **Video reel** — non-core. See the last section.
|
|
16
|
+
|
|
17
|
+
## Evidence Rule
|
|
18
|
+
|
|
19
|
+
A picture of a claim is still a claim, and it is harder to audit than a sentence. So:
|
|
20
|
+
|
|
21
|
+
- Every node, edge, label, and number in a diagram or HTML explainer traces to a source cited in the same deliverable: `draht-tools graph-*` output, a `file:line`, command output, or a commit SHA.
|
|
22
|
+
- An edge you inferred is drawn dashed (`-.->`) and labelled `inferred`. It follows the same `epistemics` tier as the sentence that would have stated it.
|
|
23
|
+
- Never draw architecture from memory or from what the code "probably" does. Query first: `draht-tools graph-impact`, `graph-path`, `graph-callers`, `graph-callees`, `git log --graph`. Then draw what came back.
|
|
24
|
+
- A visual never says more than the report around it. When the two disagree, the report wins and the visual is wrong.
|
|
25
|
+
|
|
26
|
+
## Diagrams
|
|
27
|
+
|
|
28
|
+
Use a fenced `mermaid` block. Draht's TUI renders flowchart, state, class, ER, and sequence diagrams inline as box art; any other type falls back to source. Other hosts show the source, so keep the source readable on its own.
|
|
29
|
+
|
|
30
|
+
| Content shape | Mermaid form |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Dependencies, blast radius, import paths | `flowchart LR` |
|
|
33
|
+
| Request flow, call sequence, protocol exchange | `sequenceDiagram` |
|
|
34
|
+
| Lifecycle, status transitions | `stateDiagram-v2` |
|
|
35
|
+
| Plan waves and task dependencies | `flowchart TD` with one `subgraph` per wave |
|
|
36
|
+
| Commit or branch history | `flowchart LR`, one node per commit (short SHA and subject) |
|
|
37
|
+
| Domain model, aggregates | `classDiagram` or `erDiagram` |
|
|
38
|
+
|
|
39
|
+
Rules:
|
|
40
|
+
|
|
41
|
+
- One sentence before the diagram says what to look at ("The red path is the one this change removes.").
|
|
42
|
+
- At most about 15 nodes. Split a bigger picture into two diagrams with one question each.
|
|
43
|
+
- Short node ids, labels in double quotes: `A["packages/ai/src/stream.ts"]`. Quote any label that contains parentheses, brackets, or a colon. Never use `end` as a node id.
|
|
44
|
+
- Add a one-line legend under the diagram when it uses colours, dashed edges, or classes.
|
|
45
|
+
- Skip the diagram when there are fewer than three nodes, the content is a plain list, or a table already says it.
|
|
46
|
+
|
|
47
|
+
## HTML Explainers
|
|
48
|
+
|
|
49
|
+
Build one when the user asks, or when the finding has more than one dimension the reader will want to explore: a filterable findings list, a dependency graph to click through, a before-and-after comparison, a timeline.
|
|
50
|
+
|
|
51
|
+
- **Data first.** Put the deliverable's data in a `<script type="application/json" id="data">` block and render the page from it. A reviewer can audit the data block, and the page cannot claim more than the data holds.
|
|
52
|
+
- **Escape the data.** Write every `<` in the JSON block as `\u003c`, so a quoted `</script>` in the data cannot end the block. Insert strings from the data with `textContent`, never `innerHTML`: findings often quote code from the repository under review.
|
|
53
|
+
- **One self-contained file.** Inline all CSS and JavaScript. Make no network requests, so the file works offline and leaks nothing when a client opens it. Draw diagrams as inline SVG you generate from the data. If a Mermaid diagram is essential, show its source in a `<pre>` and load Mermaid from a CDN only after the user approves the network request, pinned to an exact version with an `integrity` (SRI) hash.
|
|
54
|
+
- **The report stays the source of truth.** The HTML is a view of it. Write the Markdown report first, then the HTML.
|
|
55
|
+
- **Location.** Write it to the system temp directory as `draht-explainer-<YYYY-MM-DD>-<slug>.html` and print the path. It is a throwaway artifact. Never write it under `.planning/`: `draht-tools commit-docs` stages that whole directory. Move it into the repository only when the user asks.
|
|
56
|
+
- **Prose inside the page** follows `unslop`. For a client, write in the client's language and remove internal paths, hostnames, and secrets.
|
|
57
|
+
- **Verify before you hand it over** (`verification-gate`): the file exists, the JSON block parses, and `grep -nE 'src="https?:|href="https?:'` shows no external asset except links to cited sources and an approved, SRI-pinned Mermaid script. If a browser is available, open it once and look at it.
|
|
58
|
+
|
|
59
|
+
## Prose Register
|
|
60
|
+
|
|
61
|
+
Procedures, runbooks, fix steps, and "next steps" in handoffs use the controlled register (STE-lite) in `unslop`. Short sentences and one instruction per sentence also make text easier to read aloud, which matters for the `speak` command.
|
|
62
|
+
|
|
63
|
+
## Video Reels (Non-Core)
|
|
64
|
+
|
|
65
|
+
The draht monorepo has an example package, `packages/reels` (`@draht/reels`), that turns git history into narrated vertical explainer videos (Remotion for visuals, ElevenLabs for narration) and a scrollable feed web app per repository. It runs in CI, not inside a command. Mention it only when the user asks for a video or audio explainer of repository changes. No draht command invokes it.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hexagon-animation
|
|
3
|
+
description: Generates a randomized 3D hexagon animation as a single self-contained HTML file - an isometric field of hexagonal prisms pulsing with seeded noise-driven waves, random palette, camera drift, and lighting. Use when the user asks for a hexagon animation, 3D hex grid, hex wave loop, generative background, or a similar abstract animation demo.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hexagon Animation
|
|
7
|
+
|
|
8
|
+
Generates a self-contained HTML file (no dependencies, no network) that renders an
|
|
9
|
+
isometric field of 3D hexagonal prisms. Heights are driven by seeded 3D value noise
|
|
10
|
+
plus a traveling wave; palette, camera rotation, lighting, and motion parameters are
|
|
11
|
+
randomized per page load unless pinned.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
node generate.mjs # writes ./hexagon-animation.html, fully random
|
|
17
|
+
node generate.mjs --open # also opens it in the default browser
|
|
18
|
+
node generate.mjs --out demo.html # custom output path
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Pin parameters for reproducible output:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node generate.mjs --seed 12345 --palette 3 --radius 10 --speed 1.5
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Option | Meaning |
|
|
28
|
+
|--------|---------|
|
|
29
|
+
| `--out <file>` | Output path (default `./hexagon-animation.html`) |
|
|
30
|
+
| `--seed <n>` | Pin the random seed; omit for a new look on every page load |
|
|
31
|
+
| `--palette <n>` | Palette index 0-7 (abyss, magma, acid, synth, royal, ember, mono, teal) |
|
|
32
|
+
| `--radius <n>` | Hex grid radius 3-16 (cell count grows quadratically) |
|
|
33
|
+
| `--speed <n>` | Motion speed multiplier |
|
|
34
|
+
| `--open` | Open the result in the default browser |
|
|
35
|
+
|
|
36
|
+
## In the browser
|
|
37
|
+
|
|
38
|
+
- `r` or click: new random seed
|
|
39
|
+
- `p`: cycle palette
|
|
40
|
+
- `space`: pause
|
|
41
|
+
- URL params `?seed=&palette=&radius=&speed=` override everything and are kept in
|
|
42
|
+
sync with the current state, so the URL is always shareable.
|
|
43
|
+
|
|
44
|
+
## Customizing
|
|
45
|
+
|
|
46
|
+
For variations beyond the flags (different palettes, bloom, taller prisms, more
|
|
47
|
+
octaves), copy `template.html` to the user's project and edit it directly - all
|
|
48
|
+
rendering lives in one inline script with the tunables grouped in `buildWorld()`
|
|
49
|
+
and the `PALETTES` array. Do not edit the template inside the skill directory.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Generates a self-contained, randomized 3D hexagon animation HTML file from template.html.
|
|
3
|
+
// No dependencies. See SKILL.md for usage.
|
|
4
|
+
|
|
5
|
+
import { spawn } from "node:child_process";
|
|
6
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { dirname, join, resolve } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
|
|
12
|
+
function usage(code) {
|
|
13
|
+
console.log(`Usage: node generate.mjs [options]
|
|
14
|
+
|
|
15
|
+
Options:
|
|
16
|
+
--out <file> Output HTML file (default: ./hexagon-animation.html)
|
|
17
|
+
--seed <n> Pin the random seed (default: random on every page load)
|
|
18
|
+
--palette <n> Pin the palette index 0-7 (default: derived from seed)
|
|
19
|
+
--radius <n> Hex grid radius, 3-16 (default: derived from seed)
|
|
20
|
+
--speed <n> Animation speed multiplier, e.g. 0.5 or 2 (default: derived from seed)
|
|
21
|
+
--open Open the generated file in the default browser
|
|
22
|
+
--help Show this help`);
|
|
23
|
+
process.exit(code);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const opts = { out: "hexagon-animation.html", open: false, config: {} };
|
|
27
|
+
const numericKeys = new Set(["seed", "palette", "radius", "speed"]);
|
|
28
|
+
|
|
29
|
+
for (let i = 0; i < args.length; i++) {
|
|
30
|
+
const arg = args[i];
|
|
31
|
+
if (arg === "--help" || arg === "-h") usage(0);
|
|
32
|
+
else if (arg === "--open") opts.open = true;
|
|
33
|
+
else if (arg === "--out") opts.out = args[++i];
|
|
34
|
+
else if (arg.startsWith("--") && numericKeys.has(arg.slice(2))) {
|
|
35
|
+
const key = arg.slice(2);
|
|
36
|
+
const value = Number(args[++i]);
|
|
37
|
+
if (!Number.isFinite(value)) {
|
|
38
|
+
console.error(`Invalid value for --${key}`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
opts.config[key] = value;
|
|
42
|
+
} else {
|
|
43
|
+
console.error(`Unknown option: ${arg}`);
|
|
44
|
+
usage(1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!opts.out) {
|
|
49
|
+
console.error("Missing value for --out");
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const templatePath = join(dirname(fileURLToPath(import.meta.url)), "template.html");
|
|
54
|
+
const template = readFileSync(templatePath, "utf-8");
|
|
55
|
+
|
|
56
|
+
const baked = Object.keys(opts.config).length > 0 ? JSON.stringify(opts.config) : "null";
|
|
57
|
+
const marker = /\/\*__CONFIG__\*\/[\s\S]*?\/\*__END_CONFIG__\*\//;
|
|
58
|
+
if (!marker.test(template)) {
|
|
59
|
+
console.error("template.html is missing the __CONFIG__ marker");
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
const html = template.replace(marker, `/*__CONFIG__*/ ${baked} /*__END_CONFIG__*/`);
|
|
63
|
+
|
|
64
|
+
const outPath = resolve(process.cwd(), opts.out);
|
|
65
|
+
writeFileSync(outPath, html);
|
|
66
|
+
console.log(`Wrote ${outPath}`);
|
|
67
|
+
if (Object.keys(opts.config).length > 0) {
|
|
68
|
+
console.log(`Pinned config: ${baked}`);
|
|
69
|
+
} else {
|
|
70
|
+
console.log("Fully random: every page load picks a new seed, palette, and motion parameters.");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (opts.open) {
|
|
74
|
+
const [cmd, cmdArgs] =
|
|
75
|
+
process.platform === "darwin"
|
|
76
|
+
? ["open", [outPath]]
|
|
77
|
+
: process.platform === "win32"
|
|
78
|
+
? ["cmd", ["/c", "start", "", outPath]]
|
|
79
|
+
: ["xdg-open", [outPath]];
|
|
80
|
+
spawn(cmd, cmdArgs, { detached: true, stdio: "ignore" }).unref();
|
|
81
|
+
}
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>hexagon flow</title>
|
|
7
|
+
<style>
|
|
8
|
+
html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }
|
|
9
|
+
canvas { display: block; width: 100vw; height: 100vh; }
|
|
10
|
+
#hud {
|
|
11
|
+
position: fixed; left: 12px; bottom: 10px;
|
|
12
|
+
font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
13
|
+
color: rgba(255, 255, 255, 0.35); user-select: none; pointer-events: none;
|
|
14
|
+
letter-spacing: 0.04em;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<canvas id="c"></canvas>
|
|
20
|
+
<div id="hud"></div>
|
|
21
|
+
<script>
|
|
22
|
+
"use strict";
|
|
23
|
+
|
|
24
|
+
// Config baked in by generate.mjs. Any field may be omitted; URL params win over
|
|
25
|
+
// baked values, and everything left unset is randomized per page load.
|
|
26
|
+
// Fields: { seed, palette, radius, speed }
|
|
27
|
+
const BAKED_CONFIG = /*__CONFIG__*/ null /*__END_CONFIG__*/;
|
|
28
|
+
|
|
29
|
+
// ── seeded rng ──────────────────────────────────────────────────────────────
|
|
30
|
+
function mulberry32(a) {
|
|
31
|
+
return function () {
|
|
32
|
+
a |= 0;
|
|
33
|
+
a = (a + 0x6d2b79f5) | 0;
|
|
34
|
+
let t = Math.imul(a ^ (a >>> 15), 1 | a);
|
|
35
|
+
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
|
|
36
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ── palettes ────────────────────────────────────────────────────────────────
|
|
41
|
+
const PALETTES = [
|
|
42
|
+
{ name: "abyss", bg0: "#04060c", bg1: "#0a1226", low: "#122c4d", high: "#6ee7ff", glow: "#aef4ff" },
|
|
43
|
+
{ name: "magma", bg0: "#0a0404", bg1: "#1c0909", low: "#43110e", high: "#ffab4a", glow: "#ffd9a0" },
|
|
44
|
+
{ name: "acid", bg0: "#040805", bg1: "#0a1a0f", low: "#12381f", high: "#a8ff6b", glow: "#dcffb8" },
|
|
45
|
+
{ name: "synth", bg0: "#0a0512", bg1: "#180b2e", low: "#3a1560", high: "#ff6ec7", glow: "#ffb3e2" },
|
|
46
|
+
{ name: "royal", bg0: "#04050f", bg1: "#0b0f2b", low: "#1a2470", high: "#93a6ff", glow: "#ccd6ff" },
|
|
47
|
+
{ name: "ember", bg0: "#080505", bg1: "#170d08", low: "#3c1a08", high: "#ff5c3d", glow: "#ffb59e" },
|
|
48
|
+
{ name: "mono", bg0: "#050505", bg1: "#101010", low: "#232323", high: "#f2f2f2", glow: "#ffffff" },
|
|
49
|
+
{ name: "teal", bg0: "#030808", bg1: "#082020", low: "#0d4242", high: "#4affd0", glow: "#c2ffee" },
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
function hexToRgb(h) {
|
|
53
|
+
const n = parseInt(h.slice(1), 16);
|
|
54
|
+
return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
|
|
55
|
+
}
|
|
56
|
+
function lerpRgb(a, b, t) {
|
|
57
|
+
return [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t];
|
|
58
|
+
}
|
|
59
|
+
function shade(c, f) {
|
|
60
|
+
return [c[0] * f, c[1] * f, c[2] * f];
|
|
61
|
+
}
|
|
62
|
+
function css(c, alpha) {
|
|
63
|
+
return "rgba(" + (c[0] | 0) + "," + (c[1] | 0) + "," + (c[2] | 0) + "," + (alpha === undefined ? 1 : alpha) + ")";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ── parameters (baked config < url params, everything else from seed) ───────
|
|
67
|
+
const params = new URLSearchParams(location.search);
|
|
68
|
+
function pick(key) {
|
|
69
|
+
const raw = params.get(key);
|
|
70
|
+
if (raw !== null && raw !== "" && Number.isFinite(Number(raw))) return Number(raw);
|
|
71
|
+
if (BAKED_CONFIG && Number.isFinite(BAKED_CONFIG[key])) return BAKED_CONFIG[key];
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let seed = pick("seed");
|
|
76
|
+
if (seed === undefined) seed = (Math.random() * 0xffffffff) >>> 0;
|
|
77
|
+
seed = seed >>> 0;
|
|
78
|
+
|
|
79
|
+
let world = null;
|
|
80
|
+
|
|
81
|
+
function buildWorld() {
|
|
82
|
+
const rng = mulberry32(seed);
|
|
83
|
+
|
|
84
|
+
const paletteIndex =
|
|
85
|
+
pick("palette") !== undefined
|
|
86
|
+
? ((pick("palette") | 0) % PALETTES.length + PALETTES.length) % PALETTES.length
|
|
87
|
+
: (rng() * PALETTES.length) | 0;
|
|
88
|
+
|
|
89
|
+
const radius = Math.max(3, Math.min(16, pick("radius") !== undefined ? pick("radius") | 0 : 6 + ((rng() * 5) | 0)));
|
|
90
|
+
const speedScale = pick("speed") !== undefined ? pick("speed") : 0.75 + rng() * 0.7;
|
|
91
|
+
|
|
92
|
+
// hex grid, flat-top axial coordinates
|
|
93
|
+
const cells = [];
|
|
94
|
+
for (let q = -radius; q <= radius; q++) {
|
|
95
|
+
for (let r = -radius; r <= radius; r++) {
|
|
96
|
+
if (Math.abs(q + r) > radius) continue;
|
|
97
|
+
const x = 1.5 * q;
|
|
98
|
+
const y = Math.sqrt(3) * (r + q / 2);
|
|
99
|
+
cells.push({ q, r, x, y });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const w = {
|
|
104
|
+
rng,
|
|
105
|
+
radius,
|
|
106
|
+
cells,
|
|
107
|
+
palette: PALETTES[paletteIndex],
|
|
108
|
+
paletteIndex,
|
|
109
|
+
// camera
|
|
110
|
+
theta0: rng() * Math.PI * 2,
|
|
111
|
+
rotSpeed: (rng() * 2 - 1) * 0.045 * speedScale,
|
|
112
|
+
// geometry
|
|
113
|
+
gap: 0.86 + rng() * 0.1,
|
|
114
|
+
zFactor: 0.9,
|
|
115
|
+
baseH: 0.55 + rng() * 0.4,
|
|
116
|
+
amp: 1.4 + rng() * 1.9,
|
|
117
|
+
// noise field
|
|
118
|
+
noiseFreq: 0.3 + rng() * 0.35,
|
|
119
|
+
noiseSpeed: (0.28 + rng() * 0.45) * speedScale,
|
|
120
|
+
noiseMix: 0.55 + rng() * 0.3,
|
|
121
|
+
// traveling wave
|
|
122
|
+
waveAngle: rng() * Math.PI * 2,
|
|
123
|
+
waveK: 0.35 + rng() * 0.6,
|
|
124
|
+
waveSpeed: (0.7 + rng() * 1.1) * speedScale,
|
|
125
|
+
// light
|
|
126
|
+
lightAngle: rng() * Math.PI * 2,
|
|
127
|
+
};
|
|
128
|
+
w.waveMix = 1 - w.noiseMix;
|
|
129
|
+
w.lo = hexToRgb(w.palette.low);
|
|
130
|
+
w.hi = hexToRgb(w.palette.high);
|
|
131
|
+
w.glow = hexToRgb(w.palette.glow);
|
|
132
|
+
w.light = [Math.cos(w.lightAngle) * 0.8, Math.sin(w.lightAngle) * 0.8, 0.6];
|
|
133
|
+
const ll = Math.hypot(w.light[0], w.light[1], w.light[2]);
|
|
134
|
+
w.light = w.light.map((v) => v / ll);
|
|
135
|
+
// max center distance from origin, used to fit the grid on screen at any rotation
|
|
136
|
+
w.extent = radius * Math.sqrt(3) + 2;
|
|
137
|
+
return w;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// ── value noise (3d, seeded) ────────────────────────────────────────────────
|
|
141
|
+
function hash3(ix, iy, iz) {
|
|
142
|
+
let h = (ix * 374761393 + iy * 668265263 + iz * 1440662683 + (seed | 0) * 974711) | 0;
|
|
143
|
+
h = Math.imul(h ^ (h >>> 13), 1274126177);
|
|
144
|
+
h ^= h >>> 16;
|
|
145
|
+
return (h >>> 0) / 4294967295;
|
|
146
|
+
}
|
|
147
|
+
function smooth(t) {
|
|
148
|
+
return t * t * (3 - 2 * t);
|
|
149
|
+
}
|
|
150
|
+
function noise3(x, y, z) {
|
|
151
|
+
const ix = Math.floor(x), iy = Math.floor(y), iz = Math.floor(z);
|
|
152
|
+
const fx = smooth(x - ix), fy = smooth(y - iy), fz = smooth(z - iz);
|
|
153
|
+
let v = 0;
|
|
154
|
+
for (let dz = 0; dz <= 1; dz++) {
|
|
155
|
+
for (let dy = 0; dy <= 1; dy++) {
|
|
156
|
+
for (let dx = 0; dx <= 1; dx++) {
|
|
157
|
+
const wgt =
|
|
158
|
+
(dx ? fx : 1 - fx) * (dy ? fy : 1 - fy) * (dz ? fz : 1 - fz);
|
|
159
|
+
v += wgt * hash3(ix + dx, iy + dy, iz + dz);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return v;
|
|
164
|
+
}
|
|
165
|
+
function fbm3(x, y, z) {
|
|
166
|
+
let v = 0, a = 0.55, f = 1, sum = 0;
|
|
167
|
+
for (let i = 0; i < 3; i++) {
|
|
168
|
+
v += a * noise3(x * f, y * f, z * f);
|
|
169
|
+
sum += a;
|
|
170
|
+
a *= 0.5;
|
|
171
|
+
f *= 2.03;
|
|
172
|
+
}
|
|
173
|
+
return v / sum;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// ── rendering ───────────────────────────────────────────────────────────────
|
|
177
|
+
const canvas = document.getElementById("c");
|
|
178
|
+
const ctx = canvas.getContext("2d");
|
|
179
|
+
const hud = document.getElementById("hud");
|
|
180
|
+
|
|
181
|
+
let W = 0, H = 0, DPR = 1;
|
|
182
|
+
function resize() {
|
|
183
|
+
DPR = Math.min(2, window.devicePixelRatio || 1);
|
|
184
|
+
W = window.innerWidth;
|
|
185
|
+
H = window.innerHeight;
|
|
186
|
+
canvas.width = Math.round(W * DPR);
|
|
187
|
+
canvas.height = Math.round(H * DPR);
|
|
188
|
+
}
|
|
189
|
+
window.addEventListener("resize", resize);
|
|
190
|
+
resize();
|
|
191
|
+
|
|
192
|
+
const ISO_X = Math.cos(Math.PI / 6); // 0.866
|
|
193
|
+
const ISO_Y = 0.5;
|
|
194
|
+
|
|
195
|
+
function heightAt(w, x, y, t) {
|
|
196
|
+
const n = fbm3(x * w.noiseFreq, y * w.noiseFreq, t * w.noiseSpeed);
|
|
197
|
+
const wave =
|
|
198
|
+
0.5 + 0.5 * Math.sin((x * Math.cos(w.waveAngle) + y * Math.sin(w.waveAngle)) * w.waveK - t * w.waveSpeed);
|
|
199
|
+
return w.baseH + w.amp * (n * w.noiseMix + wave * w.waveMix);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
let t = 0;
|
|
203
|
+
let last = performance.now();
|
|
204
|
+
let paused = false;
|
|
205
|
+
|
|
206
|
+
function frame(now) {
|
|
207
|
+
const dt = Math.min(0.05, (now - last) / 1000);
|
|
208
|
+
last = now;
|
|
209
|
+
if (!paused) t += dt;
|
|
210
|
+
|
|
211
|
+
const w = world;
|
|
212
|
+
const theta = w.theta0 + w.rotSpeed * t;
|
|
213
|
+
const cosT = Math.cos(theta), sinT = Math.sin(theta);
|
|
214
|
+
|
|
215
|
+
// fit grid to screen for any rotation angle
|
|
216
|
+
const maxH = w.baseH + w.amp;
|
|
217
|
+
const S = Math.min(
|
|
218
|
+
(W * 0.92) / (2 * Math.SQRT2 * ISO_X * w.extent),
|
|
219
|
+
(H * 0.88) / (Math.SQRT2 * w.extent + maxH * w.zFactor),
|
|
220
|
+
);
|
|
221
|
+
const zS = S * w.zFactor;
|
|
222
|
+
const cx = W / 2;
|
|
223
|
+
const cy = H * 0.55;
|
|
224
|
+
|
|
225
|
+
ctx.setTransform(DPR, 0, 0, DPR, 0, 0);
|
|
226
|
+
|
|
227
|
+
// background
|
|
228
|
+
const bg = ctx.createRadialGradient(cx, cy * 0.8, 0, cx, cy * 0.8, Math.max(W, H) * 0.75);
|
|
229
|
+
bg.addColorStop(0, w.palette.bg1);
|
|
230
|
+
bg.addColorStop(1, w.palette.bg0);
|
|
231
|
+
ctx.fillStyle = bg;
|
|
232
|
+
ctx.fillRect(0, 0, W, H);
|
|
233
|
+
|
|
234
|
+
// shared rotated corner directions (flat-top hexagon) + screen offsets
|
|
235
|
+
const corners = [];
|
|
236
|
+
for (let i = 0; i < 6; i++) {
|
|
237
|
+
const a = (Math.PI / 3) * i;
|
|
238
|
+
const dx = Math.cos(a) * w.gap, dy = Math.sin(a) * w.gap;
|
|
239
|
+
const rx = dx * cosT - dy * sinT;
|
|
240
|
+
const ry = dx * sinT + dy * cosT;
|
|
241
|
+
corners.push({
|
|
242
|
+
sx: (rx - ry) * ISO_X * S,
|
|
243
|
+
sy: (rx + ry) * ISO_Y * S,
|
|
244
|
+
normalAngle: a + Math.PI / 6, // outward normal of edge i -> i+1, before rotation
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// polygon centroid is 0,0; outward screen normal of edge i is away from origin
|
|
249
|
+
const edges = [];
|
|
250
|
+
for (let i = 0; i < 6; i++) {
|
|
251
|
+
const a = corners[i], b = corners[(i + 1) % 6];
|
|
252
|
+
const ex = b.sx - a.sx, ey = b.sy - a.sy;
|
|
253
|
+
let nx = ey, ny = -ex;
|
|
254
|
+
const mx = (a.sx + b.sx) / 2, my = (a.sy + b.sy) / 2;
|
|
255
|
+
if (nx * mx + ny * my < 0) { nx = -nx; ny = -ny; }
|
|
256
|
+
const na = a.normalAngle + theta;
|
|
257
|
+
const n3 = [Math.cos(na), Math.sin(na), 0];
|
|
258
|
+
const lambert = Math.max(0, n3[0] * w.light[0] + n3[1] * w.light[1]);
|
|
259
|
+
edges.push({ i, visible: ny > 0, shade: 0.22 + 0.5 * lambert });
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// project and depth sort
|
|
263
|
+
const drawList = [];
|
|
264
|
+
for (const cell of w.cells) {
|
|
265
|
+
const rx = cell.x * cosT - cell.y * sinT;
|
|
266
|
+
const ry = cell.x * sinT + cell.y * cosT;
|
|
267
|
+
const h = heightAt(w, cell.x, cell.y, t);
|
|
268
|
+
drawList.push({
|
|
269
|
+
sx: cx + (rx - ry) * ISO_X * S,
|
|
270
|
+
sy: cy + (rx + ry) * ISO_Y * S,
|
|
271
|
+
depth: rx + ry,
|
|
272
|
+
h,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
drawList.sort((a, b) => a.depth - b.depth);
|
|
276
|
+
|
|
277
|
+
const hRange = w.amp;
|
|
278
|
+
for (const d of drawList) {
|
|
279
|
+
const topY = d.sy - d.h * zS;
|
|
280
|
+
const hNorm = Math.max(0, Math.min(1, (d.h - w.baseH) / hRange));
|
|
281
|
+
const topColor = lerpRgb(w.lo, w.hi, hNorm);
|
|
282
|
+
|
|
283
|
+
// side faces (screen extrusion is straight down, so only "downward" edges show)
|
|
284
|
+
for (const e of edges) {
|
|
285
|
+
if (!e.visible) continue;
|
|
286
|
+
const a = corners[e.i], b = corners[(e.i + 1) % 6];
|
|
287
|
+
ctx.beginPath();
|
|
288
|
+
ctx.moveTo(d.sx + a.sx, topY + a.sy);
|
|
289
|
+
ctx.lineTo(d.sx + b.sx, topY + b.sy);
|
|
290
|
+
ctx.lineTo(d.sx + b.sx, d.sy + b.sy);
|
|
291
|
+
ctx.lineTo(d.sx + a.sx, d.sy + a.sy);
|
|
292
|
+
ctx.closePath();
|
|
293
|
+
ctx.fillStyle = css(shade(topColor, e.shade));
|
|
294
|
+
ctx.fill();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// top face
|
|
298
|
+
ctx.beginPath();
|
|
299
|
+
ctx.moveTo(d.sx + corners[0].sx, topY + corners[0].sy);
|
|
300
|
+
for (let i = 1; i < 6; i++) ctx.lineTo(d.sx + corners[i].sx, topY + corners[i].sy);
|
|
301
|
+
ctx.closePath();
|
|
302
|
+
ctx.fillStyle = css(shade(topColor, 0.9 + 0.35 * hNorm));
|
|
303
|
+
ctx.fill();
|
|
304
|
+
|
|
305
|
+
// glow rim on the tallest cells
|
|
306
|
+
if (hNorm > 0.62) {
|
|
307
|
+
ctx.strokeStyle = css(w.glow, (hNorm - 0.62) * 1.6);
|
|
308
|
+
ctx.lineWidth = 1;
|
|
309
|
+
ctx.lineJoin = "round";
|
|
310
|
+
ctx.stroke();
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
requestAnimationFrame(frame);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// ── controls ────────────────────────────────────────────────────────────────
|
|
318
|
+
function updateHud() {
|
|
319
|
+
hud.textContent =
|
|
320
|
+
"seed " + seed + " \u00b7 " + world.palette.name + " \u00b7 [r]eseed [p]alette [space] pause";
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function setUrl() {
|
|
324
|
+
const u = new URLSearchParams(location.search);
|
|
325
|
+
u.set("seed", String(seed));
|
|
326
|
+
u.set("palette", String(world.paletteIndex));
|
|
327
|
+
history.replaceState(null, "", "?" + u.toString());
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function reseed() {
|
|
331
|
+
seed = (Math.random() * 0xffffffff) >>> 0;
|
|
332
|
+
params.delete("palette");
|
|
333
|
+
if (BAKED_CONFIG) delete BAKED_CONFIG.palette;
|
|
334
|
+
params.delete("seed");
|
|
335
|
+
if (BAKED_CONFIG) delete BAKED_CONFIG.seed;
|
|
336
|
+
world = buildWorld();
|
|
337
|
+
setUrl();
|
|
338
|
+
updateHud();
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
window.addEventListener("keydown", (ev) => {
|
|
342
|
+
if (ev.key === "r" || ev.key === "R") reseed();
|
|
343
|
+
else if (ev.key === "p" || ev.key === "P") {
|
|
344
|
+
params.set("palette", String((world.paletteIndex + 1) % PALETTES.length));
|
|
345
|
+
world = buildWorld();
|
|
346
|
+
setUrl();
|
|
347
|
+
updateHud();
|
|
348
|
+
} else if (ev.key === " ") {
|
|
349
|
+
paused = !paused;
|
|
350
|
+
ev.preventDefault();
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
canvas.addEventListener("pointerdown", reseed);
|
|
354
|
+
|
|
355
|
+
world = buildWorld();
|
|
356
|
+
setUrl();
|
|
357
|
+
updateHud();
|
|
358
|
+
requestAnimationFrame(frame);
|
|
359
|
+
</script>
|
|
360
|
+
</body>
|
|
361
|
+
</html>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typescript-discipline
|
|
3
|
+
description: TypeScript type-system discipline — make illegal states unrepresentable with discriminated unions, build types constructively instead of guarding loose ones, brand semantic primitives, parse external data once at the boundary and trust types inside, keep functions total and strengthen a type only where partiality appears, make the compiler enforce exhaustiveness. Use when reading or editing any .ts or .tsx file, designing a type or function signature, reviewing a TypeScript diff, or deciding whether an `any`, an `as` cast, or a non-null `!` is acceptable.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TypeScript Discipline
|
|
7
|
+
|
|
8
|
+
The type checker is a proof assistant. Used well, it eliminates impossible states, mismatched primitives, and unhandled variants at compile time; every case the types let you ignore is a runtime failure the compiler could have stopped. Prefer defining errors out of existence over proliferating handlers — unrepresentable states, total functions, and boundary parsing are the tools for that.
|
|
9
|
+
|
|
10
|
+
Two layers: the principles below hold in any statically-typed language; the rule table and `./references/patterns.md` ground them in TypeScript syntax.
|
|
11
|
+
|
|
12
|
+
## Principles
|
|
13
|
+
|
|
14
|
+
- **Make illegal states unrepresentable.** Model variants as a discriminated union, not as a bag of optional fields where contradictory combinations compile. The canonical anti-pattern: `{ completed: boolean; completedAt?: Date }` admits `completed: true` with `completedAt: undefined`, which means nothing. Derive the boolean from a single source (`completedAt !== null`) or model the variants explicitly: `{ kind: 'open' } | { kind: 'done'; at: Date }`. If a bug ever forces the question "wait, can this combination actually happen?", the type is too loose.
|
|
15
|
+
- **Types are constructions, not restrictions.** Build the type up from the values you want instead of carving them out of a looser type with runtime checks. A non-empty list is a head plus a rest, not a list with a length check. A valid time range is a start plus a duration, not two timestamps you must keep ordered. No representation is privileged — pick the shape that cannot build the illegal value, then expose the interface callers need on top of it.
|
|
16
|
+
- **Brand semantic primitives.** A `UserId` and an `OrderId` are both strings underneath but must not be interchangeable. Brand them, validate once at creation, trust the type downstream.
|
|
17
|
+
- **External data is untyped until parsed.** RPC payloads, JSON, CLI args, config files, environment variables, database rows: each gets a parse function at the boundary that turns unstructured input into the typed domain model. Validation lives at that boundary, once — inside the system there is typed data, no re-validation deep in call chains, and business logic in pure functions the boundary shell calls.
|
|
18
|
+
- **Don't lie to the compiler.** Casts and assertions that bypass the checker are runtime crashes waiting to happen. If the compiler can't prove a fact, prove it — validate, narrow, refine the model — or accept that the cast is a hazard you are choosing to carry. The cast buried today is the postmortem written next week.
|
|
19
|
+
- **Exhaustive matching is the compiler's job.** A match over a sum type must fail compilation when a new variant is added without a case, so the compiler tells the next author every place that needs updating.
|
|
20
|
+
- **Derive types from authoritative schemas.** When a protocol buffer, OpenAPI spec, GraphQL schema, or database migration already defines a shape, derive from it instead of hand-rolling a parallel type. Manual duplication drifts.
|
|
21
|
+
- **Strengthen a type only where partiality appears.** A runtime assertion, a null check, or a "should never happen" throw marks the spot where a type is too weak — push that check up into the type, then stop. The type system's job is to track the cases each use site must handle, not to describe the data as precisely as possible. `sum` of an empty list is 0, so it takes the plain list; `head` of an empty list has no answer, so it demands the non-empty one. Extra precision beyond totality costs reuse and ceremony and buys no safety.
|
|
22
|
+
|
|
23
|
+
## Rules (TypeScript syntax)
|
|
24
|
+
|
|
25
|
+
| Rule | Summary |
|
|
26
|
+
|------|---------|
|
|
27
|
+
| Discriminated unions | Model variants with a `kind` literal discriminant so impossible states can't be represented. No optional-field bags. |
|
|
28
|
+
| Branded types | Brand primitives with `& { readonly __brand: "X" }` so they can't be mixed up. Validate once at creation. |
|
|
29
|
+
| Constructive modeling | Build the shape so the illegal value can't be constructed: `[T, ...T[]]` for non-empty, `[T, T][]` for even length, `start` plus `duration` for a range. Not a runtime guard, not a wish for refinement types. |
|
|
30
|
+
| Simplest total type | Keep `T[]` while every operation on it stays total. Strengthen to a non-empty type only where the loose type forces a `!`, a cast, or a "should never happen" throw. |
|
|
31
|
+
| `unknown` over `any` | External data is `unknown`. `any` disables type checking everywhere it touches. |
|
|
32
|
+
| No `as` casts | Every `as` is a potential runtime crash. Cast only after validation has earned it. |
|
|
33
|
+
| Narrowing hierarchy | Discriminant switch > `in` operator > `typeof`/`instanceof` > user-defined type guard > `as`. |
|
|
34
|
+
| Type guards | Must verify the claim. A lying guard is worse than `as` — the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |
|
|
35
|
+
| Exhaustiveness | Assign to a `never`-typed local in default arms so the compiler errors when a new variant is added. |
|
|
36
|
+
| `satisfies` over `as` | Validates the value without widening literal types. |
|
|
37
|
+
| Boundary validation | Parse where data crosses in — into a named domain type, once. `Record<string, unknown>` (however spelled) stops at that parse. Inside: trust the types, no redundant re-validation, logic in pure functions the boundary shell calls. |
|
|
38
|
+
| Schema-derived types | Reach for `Pick`/`Omit`/`Parameters`/`ReturnType`/`Awaited`/`typeof` before declaring a new interface. |
|
|
39
|
+
| Object args | Pass objects, not positional arguments, so call sites are self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |
|
|
40
|
+
|
|
41
|
+
Worked don't/do examples for every rule: `./references/patterns.md`.
|
|
42
|
+
|
|
43
|
+
## Self-Checks
|
|
44
|
+
|
|
45
|
+
- "Can I write a comment explaining when this combination of fields is valid?" If yes, the type is too loose — split it into a discriminated union.
|
|
46
|
+
- "Do two function arguments share a primitive type but mean different things?" Brand them.
|
|
47
|
+
- "Where did this `any`, this `as`, this `!` come from?" Trace it to the boundary and validate there instead.
|
|
48
|
+
- "If a new variant is added next month, will the compiler point at every place that needs a case?" If not, the match isn't exhaustive.
|
|
49
|
+
- "Is this type duplicating a shape another file or schema owns?" Derive instead.
|
|
50
|
+
- "Am I strengthening this type to keep an operation total, or just to be more precise?" If nothing would otherwise throw, keep the plain type.
|