@draht/coding-agent 2026.7.7-1 → 2026.7.11

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.
Files changed (131) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +2 -2
  3. package/agents/advisor.md +44 -0
  4. package/bin/draht-tools.cjs +1808 -988
  5. package/dist/agents/advisor.md +44 -0
  6. package/dist/cli/args.d.ts.map +1 -1
  7. package/dist/cli/args.js +1 -1
  8. package/dist/cli/args.js.map +1 -1
  9. package/dist/core/agent-session.d.ts +16 -3
  10. package/dist/core/agent-session.d.ts.map +1 -1
  11. package/dist/core/agent-session.js +76 -18
  12. package/dist/core/agent-session.js.map +1 -1
  13. package/dist/core/cache-stats.d.ts +49 -0
  14. package/dist/core/cache-stats.d.ts.map +1 -0
  15. package/dist/core/cache-stats.js +101 -0
  16. package/dist/core/cache-stats.js.map +1 -0
  17. package/dist/core/compaction/compaction.d.ts +1 -2
  18. package/dist/core/compaction/compaction.d.ts.map +1 -1
  19. package/dist/core/compaction/compaction.js +51 -73
  20. package/dist/core/compaction/compaction.js.map +1 -1
  21. package/dist/core/extensions/index.d.ts +1 -1
  22. package/dist/core/extensions/index.d.ts.map +1 -1
  23. package/dist/core/extensions/index.js.map +1 -1
  24. package/dist/core/extensions/loader.d.ts.map +1 -1
  25. package/dist/core/extensions/loader.js +23 -4
  26. package/dist/core/extensions/loader.js.map +1 -1
  27. package/dist/core/extensions/runner.d.ts.map +1 -1
  28. package/dist/core/extensions/runner.js +1 -24
  29. package/dist/core/extensions/runner.js.map +1 -1
  30. package/dist/core/extensions/types.d.ts +9 -9
  31. package/dist/core/extensions/types.d.ts.map +1 -1
  32. package/dist/core/extensions/types.js.map +1 -1
  33. package/dist/core/index.d.ts +1 -1
  34. package/dist/core/index.d.ts.map +1 -1
  35. package/dist/core/index.js.map +1 -1
  36. package/dist/core/model-registry.d.ts +4 -6
  37. package/dist/core/model-registry.d.ts.map +1 -1
  38. package/dist/core/model-registry.js +34 -8
  39. package/dist/core/model-registry.js.map +1 -1
  40. package/dist/core/resource-loader.d.ts.map +1 -1
  41. package/dist/core/resource-loader.js +2 -5
  42. package/dist/core/resource-loader.js.map +1 -1
  43. package/dist/core/settings-manager.d.ts +7 -3
  44. package/dist/core/settings-manager.d.ts.map +1 -1
  45. package/dist/core/settings-manager.js +10 -1
  46. package/dist/core/settings-manager.js.map +1 -1
  47. package/dist/core/slash-commands.d.ts +1 -0
  48. package/dist/core/slash-commands.d.ts.map +1 -1
  49. package/dist/core/slash-commands.js +3 -3
  50. package/dist/core/slash-commands.js.map +1 -1
  51. package/dist/gsd/hook-utils.d.ts.map +1 -1
  52. package/dist/gsd/hook-utils.js +3 -1
  53. package/dist/gsd/hook-utils.js.map +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/main.d.ts.map +1 -1
  58. package/dist/main.js +1 -0
  59. package/dist/main.js.map +1 -1
  60. package/dist/modes/interactive/components/footer.d.ts +4 -0
  61. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  62. package/dist/modes/interactive/components/footer.js +1 -1
  63. package/dist/modes/interactive/components/footer.js.map +1 -1
  64. package/dist/modes/interactive/components/oauth-selector.d.ts +3 -1
  65. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  66. package/dist/modes/interactive/components/oauth-selector.js +17 -6
  67. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  68. package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
  69. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  70. package/dist/modes/interactive/components/settings-selector.js +10 -0
  71. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  72. package/dist/modes/interactive/interactive-mode.d.ts +10 -0
  73. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  74. package/dist/modes/interactive/interactive-mode.js +247 -47
  75. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  76. package/dist/modes/interactive/theme/theme-schema.json +3 -4
  77. package/dist/modes/interactive/theme/theme.d.ts +2 -1
  78. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  79. package/dist/modes/interactive/theme/theme.js +8 -4
  80. package/dist/modes/interactive/theme/theme.js.map +1 -1
  81. package/dist/modes/print-mode.d.ts.map +1 -1
  82. package/dist/modes/print-mode.js +1 -1
  83. package/dist/modes/print-mode.js.map +1 -1
  84. package/dist/modes/rpc/rpc-client.d.ts +6 -6
  85. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  86. package/dist/modes/rpc/rpc-client.js +3 -3
  87. package/dist/modes/rpc/rpc-client.js.map +1 -1
  88. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  89. package/dist/modes/rpc/rpc-mode.js +4 -1
  90. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  91. package/dist/prompts/commands/execute-phase.md +2 -2
  92. package/dist/prompts/commands/fix.md +1 -1
  93. package/dist/prompts/commands/map-codebase.md +8 -8
  94. package/dist/prompts/commands/next-milestone.md +1 -0
  95. package/dist/prompts/commands/orchestrate-loop.md +99 -0
  96. package/dist/prompts/commands/orchestrate.md +25 -2
  97. package/dist/prompts/commands/pause-work.md +2 -1
  98. package/dist/prompts/commands/plan-phase.md +1 -0
  99. package/dist/prompts/commands/quick.md +2 -2
  100. package/dist/utils/clipboard-image.d.ts.map +1 -1
  101. package/dist/utils/clipboard-image.js +1 -1
  102. package/dist/utils/clipboard-image.js.map +1 -1
  103. package/docs/custom-provider.md +4 -3
  104. package/docs/extensions.md +15 -10
  105. package/docs/models.md +49 -8
  106. package/docs/rpc.md +15 -5
  107. package/docs/sdk.md +1 -1
  108. package/docs/settings.md +3 -2
  109. package/docs/themes.md +5 -3
  110. package/docs/tui.md +1 -1
  111. package/docs/usage.md +2 -2
  112. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  113. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  114. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  115. package/examples/extensions/preset.ts +2 -2
  116. package/examples/extensions/reload-runtime.ts +2 -2
  117. package/examples/extensions/sandbox/package-lock.json +2 -2
  118. package/examples/extensions/sandbox/package.json +1 -1
  119. package/examples/extensions/with-deps/package-lock.json +2 -2
  120. package/examples/extensions/with-deps/package.json +1 -1
  121. package/examples/sdk/README.md +1 -1
  122. package/package.json +5 -5
  123. package/prompts/commands/execute-phase.md +2 -2
  124. package/prompts/commands/fix.md +1 -1
  125. package/prompts/commands/map-codebase.md +8 -8
  126. package/prompts/commands/next-milestone.md +1 -0
  127. package/prompts/commands/orchestrate-loop.md +99 -0
  128. package/prompts/commands/orchestrate.md +25 -2
  129. package/prompts/commands/pause-work.md +2 -1
  130. package/prompts/commands/plan-phase.md +1 -0
  131. package/prompts/commands/quick.md +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [2026.7.11] - 2026-07-11
4
+
5
+ ### Added
6
+
7
+ - incorporate upstream coding-agent changes
8
+ - add advisor agent, loop mode, and model-tiering guidance
9
+ - overhaul map-graph clustering, MAP.html viewer, map-serve
10
+ - lessons accumulation and standing-spec digest per session
11
+ - enforce quality gates in the harness, not prose
12
+
13
+ ### Changed
14
+
15
+ - fix assertions left out of sync with current source behavior
16
+ - update stale PI_* and .pi references to DRAHT_* and .draht
17
+
18
+ ### Fixed
19
+
20
+ - spawn CLI integration tests through the tsx import hook
21
+ - resolve typebox subpath imports and guard stale extension API calls
22
+ - map-codebase always maps the whole repo
23
+
3
24
  ## [2026.7.7-1] - 2026-07-07
4
25
 
5
26
  ### Added
package/README.md CHANGED
@@ -151,7 +151,7 @@ Type `/` in the editor to trigger commands. [Extensions](#extensions) can regist
151
151
  | `/copy` | Copy last assistant message to clipboard |
152
152
  | `/export [file]` | Export session to HTML file |
153
153
  | `/share` | Upload as private GitHub gist with shareable HTML link |
154
- | `/reload` | Reload keybindings, extensions, skills, prompts, and context files (themes hot-reload automatically) |
154
+ | `/reload` | Reload keybindings, extensions, skills, prompts, themes, and context files |
155
155
  | `/hotkeys` | Show all keyboard shortcuts |
156
156
  | `/changelog` | Display version history |
157
157
  | `/quit` | Quit draht |
@@ -468,7 +468,7 @@ cat README.md | draht -p "Summarize this text"
468
468
  | `--provider <name>` | Provider (anthropic, openai, google, etc.) |
469
469
  | `--model <pattern>` | Model pattern or ID (supports `provider/id` and optional `:<thinking>`) |
470
470
  | `--api-key <key>` | API key (overrides env vars) |
471
- | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
471
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |
472
472
  | `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
473
473
  | `--list-models [search]` | List available models |
474
474
 
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: advisor
3
+ description: Strategic advisor — consulted rarely (~1–3 times per task) for high-leverage guidance: after orientation before committing to an approach, when stuck (recurring errors, non-converging attempts), or before declaring a hard task done. Reads the context provided and returns a focused plan or course correction, never an implementation. Pin this agent to your strongest model via the per-agent model config. Distinct from `architect`, which produces complete implementation plans; the advisor steers with minimal tokens.
4
+ tools: read,bash,grep,find,ls
5
+ ---
6
+
7
+ You are the Advisor agent — a stronger model consulted by an executor for strategic guidance. You steer; you never implement.
8
+
9
+ ## What You Receive
10
+
11
+ The caller forwards the situation: the task, what has been tried, the tool outputs and errors observed so far, and the specific decision they face. If any of that is missing, ask for it rather than advising blind.
12
+
13
+ ## Process
14
+
15
+ 1. **Read the evidence first** — the excerpts, files, and errors provided. Use read/grep/bash (inspection only) to verify load-bearing assumptions before advising; advice built on a wrong premise is worse than none.
16
+ 2. **Find the highest-leverage decision** — not everything worth saying, the ONE thing that changes the outcome: the approach to take, the risk to front-load, the assumption to test, the reason the current approach is not converging.
17
+ 3. **Advise, terse** — guidance under ~200 words, ranked by leverage. A focused starting point, not a comprehensive plan. No code dumps; name files, interfaces, and checks instead.
18
+
19
+ ## Output Format
20
+
21
+ ### Guidance
22
+ The advice, ranked by leverage.
23
+
24
+ ### Rationale
25
+ 1–3 lines: why this direction over the caller's current one.
26
+
27
+ ### First Check
28
+ The single command or observation that would confirm — or kill — the recommended direction fastest.
29
+
30
+ ## Final Status
31
+
32
+ End your output with exactly one of these lines:
33
+
34
+ - `STATUS: DONE` — guidance given, grounded in the evidence provided.
35
+ - `STATUS: DONE_WITH_CONCERNS` — guidance given, but a load-bearing assumption could not be verified; it is named inline.
36
+ - `STATUS: NEEDS_CONTEXT` — the situation given is too thin to advise on. List exactly what is missing.
37
+ - `STATUS: BLOCKED` — the request asks for implementation, not advice. Point the caller to `implementer` or `architect`.
38
+
39
+ ## Rules
40
+
41
+ - Never edit files or change state — inspection only
42
+ - Do not restate the caller's context back at them — they already have it
43
+ - If the caller's evidence contradicts your instinct, say which constraint breaks the tie instead of ignoring the conflict
44
+ - If the right move is "gather X before deciding", say that — a named unknown beats a confident guess