mixdog 0.9.19 → 0.9.20

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 (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -29
  3. package/package.json +3 -2
  4. package/scripts/build-runtime-windows.ps1 +242 -242
  5. package/scripts/build-tui.mjs +6 -0
  6. package/scripts/hook-bus-test.mjs +8 -0
  7. package/scripts/log-writer-guard-smoke.mjs +131 -0
  8. package/scripts/reactive-compact-persist-smoke.mjs +22 -6
  9. package/scripts/recall-bench-cases.json +0 -1
  10. package/scripts/recall-quality-cases.json +1 -2
  11. package/scripts/recall-usecase-cases.json +1 -1
  12. package/scripts/session-ingest-compaction-smoke.mjs +241 -0
  13. package/scripts/smoke-runtime-negative.ps1 +106 -106
  14. package/scripts/tool-efficiency-diag.mjs +1 -1
  15. package/scripts/tool-smoke.mjs +150 -45
  16. package/src/help.mjs +2 -5
  17. package/src/lib/mixdog-debug.cjs +13 -0
  18. package/src/mixdog-session-runtime.mjs +7 -3328
  19. package/src/rules/lead/02-channels.md +3 -3
  20. package/src/runtime/agent/orchestrator/context/collect.mjs +33 -9
  21. package/src/runtime/agent/orchestrator/session/agent-loop.mjs +663 -0
  22. package/src/runtime/agent/orchestrator/session/compact/engine.mjs +6 -0
  23. package/src/runtime/agent/orchestrator/session/eager-dispatch.mjs +153 -0
  24. package/src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs +49 -0
  25. package/src/runtime/agent/orchestrator/session/loop/stored-tool-args.mjs +9 -1
  26. package/src/runtime/agent/orchestrator/session/loop.mjs +8 -1860
  27. package/src/runtime/agent/orchestrator/session/manager/agent-runtime-singleton.mjs +29 -0
  28. package/src/runtime/agent/orchestrator/session/manager/ask-session.mjs +686 -0
  29. package/src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs +60 -12
  30. package/src/runtime/agent/orchestrator/session/manager/env-utils.mjs +8 -0
  31. package/src/runtime/agent/orchestrator/session/manager/idle-cleanup.mjs +159 -0
  32. package/src/runtime/agent/orchestrator/session/manager/message-sanitize.mjs +143 -0
  33. package/src/runtime/agent/orchestrator/session/manager/prefetch-bridge.mjs +268 -0
  34. package/src/runtime/agent/orchestrator/session/manager/provider-cache-key.mjs +22 -0
  35. package/src/runtime/agent/orchestrator/session/manager/runtime-loaders.mjs +26 -0
  36. package/src/runtime/agent/orchestrator/session/manager/session-close.mjs +124 -0
  37. package/src/runtime/agent/orchestrator/session/manager/session-crud.mjs +258 -0
  38. package/src/runtime/agent/orchestrator/session/manager/session-errors.mjs +20 -0
  39. package/src/runtime/agent/orchestrator/session/manager/session-id.mjs +9 -0
  40. package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +475 -0
  41. package/src/runtime/agent/orchestrator/session/manager/session-lock.mjs +23 -0
  42. package/src/runtime/agent/orchestrator/session/manager.mjs +88 -2285
  43. package/src/runtime/agent/orchestrator/session/pre-send-compact.mjs +440 -0
  44. package/src/runtime/agent/orchestrator/session/send-with-recovery.mjs +153 -0
  45. package/src/runtime/agent/orchestrator/session/store.mjs +4 -1
  46. package/src/runtime/agent/orchestrator/session/tool-batch.mjs +642 -0
  47. package/src/runtime/agent/orchestrator/tools/bash-session.mjs +23 -3
  48. package/src/runtime/agent/orchestrator/tools/builtin/shell-job-paths.mjs +108 -2
  49. package/src/runtime/agent/orchestrator/tools/builtin/shell-job-process.mjs +15 -3
  50. package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +7 -0
  51. package/src/runtime/agent/orchestrator/tools/builtin/shell-runtime.mjs +24 -2
  52. package/src/runtime/agent/orchestrator/tools/patch/orchestrator.mjs +2 -2
  53. package/src/runtime/agent/orchestrator/tools/patch/parsing.mjs +72 -8
  54. package/src/runtime/agent/orchestrator/tools/shell-policy-danger-target.mjs +5 -1
  55. package/src/runtime/channels/index.mjs +6 -2183
  56. package/src/runtime/channels/lib/inbound-handler.mjs +328 -0
  57. package/src/runtime/channels/lib/interaction-handlers.mjs +260 -0
  58. package/src/runtime/channels/lib/network-retry.mjs +23 -0
  59. package/src/runtime/channels/lib/owned-runtime.mjs +547 -0
  60. package/src/runtime/channels/lib/transcript-binding.mjs +336 -0
  61. package/src/runtime/channels/lib/voice-runtime-fetcher.mjs +39 -2
  62. package/src/runtime/channels/lib/worker-bootstrap.mjs +97 -0
  63. package/src/runtime/channels/lib/worker-ipc.mjs +201 -0
  64. package/src/runtime/channels/lib/worker-main.mjs +771 -0
  65. package/src/runtime/memory/index.mjs +73 -1725
  66. package/src/runtime/memory/lib/embedding-provider.mjs +4 -2
  67. package/src/runtime/memory/lib/embedding-worker.mjs +47 -6
  68. package/src/runtime/memory/lib/http-router.mjs +772 -0
  69. package/src/runtime/memory/lib/memory-action-handlers.mjs +901 -0
  70. package/src/runtime/memory/lib/memory-embed.mjs +28 -7
  71. package/src/runtime/memory/lib/memory-recall-store.mjs +4 -4
  72. package/src/runtime/memory/lib/query-handlers.mjs +2 -2
  73. package/src/runtime/memory/lib/session-ingest-runtime.mjs +401 -0
  74. package/src/session-runtime/boot-profile.mjs +36 -0
  75. package/src/session-runtime/channel-config-api.mjs +70 -0
  76. package/src/session-runtime/context-status.mjs +181 -0
  77. package/src/session-runtime/env.mjs +17 -0
  78. package/src/session-runtime/lifecycle-api.mjs +242 -0
  79. package/src/session-runtime/model-route-api.mjs +198 -0
  80. package/src/session-runtime/provider-auth-api.mjs +135 -0
  81. package/src/session-runtime/resource-api.mjs +282 -0
  82. package/src/session-runtime/runtime-core.mjs +2046 -0
  83. package/src/session-runtime/session-turn-api.mjs +274 -0
  84. package/src/session-runtime/tool-catalog.mjs +18 -264
  85. package/src/session-runtime/tool-defs.mjs +2 -2
  86. package/src/session-runtime/workflow-agents-api.mjs +238 -0
  87. package/src/standalone/agent-tool.mjs +2 -2
  88. package/src/standalone/channel-worker.mjs +4 -0
  89. package/src/standalone/memory-runtime-proxy.mjs +56 -6
  90. package/src/tui/App.jsx +39 -28
  91. package/src/tui/app/core-memory-picker.mjs +1 -1
  92. package/src/tui/app/use-mouse-input.mjs +6 -0
  93. package/src/tui/app/use-transcript-scroll.mjs +77 -3
  94. package/src/tui/dist/index.mjs +1990 -1527
  95. package/src/tui/engine/context-state.mjs +145 -0
  96. package/src/tui/engine/prompt-history.mjs +27 -0
  97. package/src/tui/engine/session-api-ext.mjs +478 -0
  98. package/src/tui/engine/session-api.mjs +545 -0
  99. package/src/tui/engine/session-flow.mjs +485 -0
  100. package/src/tui/engine/turn.mjs +1078 -0
  101. package/src/tui/engine.mjs +68 -2620
  102. package/src/tui/index.jsx +7 -0
  103. package/vendor/ink/build/ink.js +16 -1
  104. package/vendor/ink/build/output.js +30 -4
  105. package/vendor/ink/build/render.js +5 -0
  106. package/src/workflows/sequential/WORKFLOW.md +0 -51
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tribgames
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,29 +1,88 @@
1
1
  # mixdog
2
2
 
3
- Standalone coding-agent CLI/TUI for running a multi-provider AI workspace from
4
- one terminal.
5
-
6
- Mixdog combines an Ink-based terminal UI, model/provider routing, workflow
7
- agents, MCP/plugin/skill loading, memory, web search, channel integrations, and
8
- repo-focused tools for reading, editing, testing, and reviewing code.
9
-
10
- ## Highlights
11
-
12
- - **Multi-provider model picker** for Anthropic, OpenAI, Google/Gemini, xAI/Grok,
13
- DeepSeek, OpenCode Go, OAuth-backed providers, OpenAI-compatible APIs, Ollama,
14
- and LM Studio/local endpoints.
15
- - **Live model catalog** from provider `/models` endpoints, enriched with
16
- LiteLLM/models.dev metadata for context windows, output limits, pricing, tool
17
- support, reasoning, web search, and recency.
18
- - **Full-screen TUI** with slash commands, provider setup, model/workflow
19
- pickers, usage dashboards, statusline integration, resumable sessions, and
20
- detailed tool cards.
21
- - **Workflow delegation** through `/agent` and the `agent` tool, including
22
- worker, heavy-worker, reviewer, debugger, maintainer, and explorer roles.
23
- - **Repo-native tools** for `read`, `grep`, `glob`, `list`, `code_graph`,
24
- `apply_patch`, `shell`, `cwd`, `explore`, web search, and memory recall.
25
- - **Remote/event workflows** via optional Discord channel, webhook, schedule,
26
- and channel-management integrations.
3
+ [![npm](https://img.shields.io/npm/v/mixdog)](https://www.npmjs.com/package/mixdog)
4
+ ![node](https://img.shields.io/badge/node-%3E%3D22-brightgreen)
5
+ ![license](https://img.shields.io/badge/license-MIT-blue)
6
+
7
+ Standalone coding-agent CLI/TUI that runs an orchestrated, multi-provider
8
+ agent workflow from one terminal built for maximum performance at minimum
9
+ cost.
10
+
11
+ Mixdog combines an Ink-based terminal UI, per-role model routing across
12
+ providers, workflow agents, MCP/plugin/skill/hook support, lightweight
13
+ memory, web search, channel integrations, and repo-native tools for reading,
14
+ editing, testing, and reviewing code.
15
+
16
+ ## Terminal-Bench 2.1 89.9% (self-reported)
17
+
18
+ ![Terminal-Bench 2.1 leaderboard with mixdog](https://raw.githubusercontent.com/tribgames/mixdog/main/benchmarks/terminal-bench-2.1/tb21-leaderboard.svg)
19
+
20
+ Single-run score of **80/89 = 89.9%** (k=1) on
21
+ `terminal-bench/terminal-bench-2-1`, using a cost-reduced per-role routing
22
+ config:
23
+
24
+ | Role | Model | Effort |
25
+ |---------------------|-----------------|-------------|
26
+ | Lead (orchestrator) | Claude Fable 5 | high |
27
+ | Explorer | Claude Haiku 4.5| default |
28
+ | Worker | Claude Opus 4.8 | medium |
29
+ | Heavy worker | Claude Opus 4.8 | high |
30
+ | Reviewer | GPT-5.5 | high (fast) |
31
+
32
+ Against published model scores this places second overall — behind GPT-5.6
33
+ Sol Ultra (91.9%), ahead of GPT-5.6 Sol (88.8%) and Claude Mythos 5 (88%),
34
+ and well above the same primary model run standalone (Claude Fable 5,
35
+ 84.3%). Measured once (k=1) due to cost, so treat it as indicative — a
36
+ max-effort k=5 run is planned and is expected to land higher. Per-task
37
+ results, raw Harbor jobs, and the harness adapter live in
38
+ `benchmarks/terminal-bench-2.1/`.
39
+
40
+ Full transparency: 4 tasks refused by the primary model's safety layer were
41
+ re-run routed to Claude Opus 4.8 (effort xhigh) and passed; timeouts and
42
+ task resources were left unmodified. Raw Harbor `result.json`/`config.json`
43
+ for every constituent run are included.
44
+
45
+ ## Why mixdog
46
+
47
+ **Maximum performance at minimum cost**
48
+
49
+ - Orchestrated agent workflow that mixes providers and models per role, so
50
+ each step runs on the cheapest model that can do the job well.
51
+ - Cache-aware prompt layout and aggressive context savings across turns.
52
+ - Lean output policy plus fine-grained session management: compaction,
53
+ resumable sessions, and usage dashboards.
54
+ - A custom harness with tool-call routing tuned for the fewest, most
55
+ effective calls (`code_graph`, batched `read`/`grep`, windowed reads).
56
+
57
+ **Any provider**
58
+
59
+ - Anthropic, OpenAI, Google/Gemini, xAI/Grok, DeepSeek, OpenCode Go,
60
+ OAuth-backed providers, OpenAI-compatible APIs, Ollama, and LM Studio/local
61
+ endpoints.
62
+ - Live model catalog from provider `/models` endpoints, enriched with
63
+ LiteLLM/models.dev metadata for context windows, output limits, pricing,
64
+ tool support, reasoning, and recency.
65
+ - Customizable web search and repo exploration tools.
66
+
67
+ **Any environment**
68
+
69
+ - Full-screen TUI with slash commands, provider setup, model/workflow
70
+ pickers, statusline integration, and detailed tool cards — plus headless
71
+ role mode for scripting.
72
+ - Optional Discord/Telegram channels, webhook endpoints, cron schedules, and
73
+ voice-message transcription for remote/event-driven workflows.
74
+
75
+ **Memory**
76
+
77
+ - Lightweight memory restores prior work context across sessions.
78
+ - Important memories are automatically promoted — and demoted when stale.
79
+
80
+ **Agent-ecosystem compatible**
81
+
82
+ - Skills, MCP servers, hooks, and plugins load through standard-compatible
83
+ interfaces.
84
+ - Workflow delegation through the `agent` tool and `/agents`: worker,
85
+ heavy-worker, reviewer, debugger, maintainer, and explorer roles.
27
86
 
28
87
  ## Requirements
29
88
 
@@ -73,13 +132,14 @@ mixdog reviewer "review the current diff"
73
132
  Common slash commands:
74
133
 
75
134
  ```text
76
- /help show help
77
135
  /providers configure provider auth and local endpoints
78
- /model choose provider/model, effort, and fast mode
136
+ /model choose the main provider/model (/effort, /fast tune it)
79
137
  /workflow choose the active workflow
80
- /agents show available workflow agents
81
- /agent manage active agent tasks
82
- /mode switch tool surface: full | readonly
138
+ /agents show workflow agents and per-agent model overrides
139
+ /setting open the runtime settings hub
140
+ /mcp manage MCP servers and tools
141
+ /skills choose a skill for the next request
142
+ /channels manage Discord/Telegram, schedules, webhooks, voice
83
143
  /compact compact older conversation context
84
144
  /clear reset the conversation and screen
85
145
  /OutputStyle show or switch Lead output style
@@ -156,3 +216,7 @@ vendor/
156
216
 
157
217
  `docs/` is not included in the published package unless `package.json#files` is
158
218
  changed.
219
+
220
+ ## License
221
+
222
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixdog",
3
- "version": "0.9.19",
3
+ "version": "0.9.20",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Standalone mixdog coding-agent CLI/TUI workspace.",
@@ -35,7 +35,7 @@
35
35
  "prepack": "npm run build:tui",
36
36
  "start": "node src/cli.mjs",
37
37
  "smoke": "node scripts/smoke.mjs",
38
- "smoke:all": "npm run smoke && npm run smoke:boot && npm run smoke:tools && npm run smoke:output && npm run smoke:tui && npm run smoke:freevars",
38
+ "smoke:all": "npm run smoke && npm run smoke:boot && npm run smoke:tools && npm run smoke:output && npm run smoke:tui && npm run smoke:freevars && npm run smoke:logguard",
39
39
  "smoke:boot": "node scripts/boot-smoke.mjs",
40
40
  "smoke:compact": "node scripts/compact-smoke.mjs",
41
41
  "smoke:loop": "node scripts/smoke-loop.mjs",
@@ -45,6 +45,7 @@
45
45
  "smoke:output": "node scripts/output-style-smoke.mjs",
46
46
  "smoke:tui": "node scripts/tui-render-smoke.mjs",
47
47
  "smoke:freevars": "node scripts/freevar-smoke.mjs",
48
+ "smoke:logguard": "node scripts/log-writer-guard-smoke.mjs",
48
49
  "test:toolcall": "node --test scripts/toolcall-args-test.mjs",
49
50
  "test:providers": "node --test scripts/provider-toolcall-test.mjs",
50
51
  "test:atomiclock": "node --test scripts/atomic-lock-tryonce-test.mjs",