mixdog 0.9.34 → 0.9.35

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 (69) hide show
  1. package/README.md +6 -0
  2. package/package.json +4 -2
  3. package/scripts/_devtools-stub.mjs +1 -0
  4. package/scripts/_jitter-fuzz.jsx +42 -0
  5. package/scripts/_jitter-fuzz.mjs +44410 -0
  6. package/scripts/_jitter-fuzz2.jsx +30 -0
  7. package/scripts/_jitter-fuzz2.mjs +44400 -0
  8. package/scripts/_jitter-probe.jsx +35 -0
  9. package/scripts/_jitter-probe.mjs +44397 -0
  10. package/scripts/_jp2.jsx +16 -0
  11. package/scripts/_jp2.mjs +45614 -0
  12. package/scripts/agent-live-arg-guard-smoke.mjs +20 -0
  13. package/scripts/agent-live-path-suffix-smoke.mjs +34 -0
  14. package/scripts/agent-live-toolcall-args-smoke.mjs +45 -0
  15. package/scripts/apply-patch-edit-smoke.mjs +71 -0
  16. package/scripts/async-notify-settlement-test.mjs +99 -0
  17. package/scripts/forwarder-rebind-tail-test.mjs +67 -0
  18. package/scripts/live-worker-smoke.mjs +1 -1
  19. package/scripts/pending-completion-drop-test.mjs +46 -27
  20. package/scripts/provider-toolcall-test.mjs +1 -0
  21. package/scripts/recall-bench-cases.json +1 -0
  22. package/scripts/session-bench.mjs +44 -0
  23. package/scripts/shell-hardening-test.mjs +209 -0
  24. package/scripts/ship-mode-test.mjs +98 -0
  25. package/scripts/steering-drain-buckets-test.mjs +59 -0
  26. package/scripts/tool-smoke.mjs +46 -10
  27. package/scripts/worker-notify-rejection-test.mjs +51 -0
  28. package/src/lib/mixdog-debug.cjs +69 -0
  29. package/src/rules/agent/00-common.md +4 -5
  30. package/src/rules/agent/00-core.md +13 -20
  31. package/src/rules/agent/20-skip-protocol.md +3 -8
  32. package/src/rules/agent/30-explorer.md +31 -54
  33. package/src/rules/lead/01-general.md +3 -6
  34. package/src/rules/lead/lead-brief.md +10 -16
  35. package/src/rules/lead/lead-tool.md +3 -5
  36. package/src/rules/shared/01-tool.md +7 -9
  37. package/src/runtime/agent/orchestrator/agent-trace-io.mjs +13 -2
  38. package/src/runtime/agent/orchestrator/providers/gemini.mjs +19 -23
  39. package/src/runtime/agent/orchestrator/providers/model-catalog.mjs +21 -5
  40. package/src/runtime/agent/orchestrator/session/manager/ask-session.mjs +15 -0
  41. package/src/runtime/agent/orchestrator/session/manager/context-meta.mjs +13 -13
  42. package/src/runtime/agent/orchestrator/session/manager/pending-messages.mjs +21 -7
  43. package/src/runtime/agent/orchestrator/tools/bash-policy-scan.mjs +1 -5
  44. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool.mjs +71 -1
  45. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +17 -9
  46. package/src/runtime/agent/orchestrator/tools/builtin/shell-analysis.mjs +127 -4
  47. package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +105 -28
  48. package/src/runtime/agent/orchestrator/tools/code-graph-tool-defs.mjs +2 -2
  49. package/src/runtime/agent/orchestrator/tools/patch-tool-defs.mjs +1 -1
  50. package/src/runtime/agent/orchestrator/tools/shell-exec-policy.mjs +7 -3
  51. package/src/runtime/memory/lib/memory-embed.mjs +1 -1
  52. package/src/runtime/memory/lib/query-handlers.mjs +25 -10
  53. package/src/runtime/memory/tool-defs.mjs +3 -3
  54. package/src/runtime/shared/background-tasks.mjs +21 -1
  55. package/src/runtime/shared/tool-execution-contract.mjs +29 -16
  56. package/src/session-runtime/model-route-api.mjs +3 -3
  57. package/src/session-runtime/provider-auth-api.mjs +13 -0
  58. package/src/session-runtime/runtime-core.mjs +40 -6
  59. package/src/session-runtime/tool-catalog.mjs +3 -2
  60. package/src/session-runtime/workflow-agents-api.mjs +2 -2
  61. package/src/standalone/agent-tool/notify.mjs +14 -1
  62. package/src/tui/dist/index.mjs +63 -25
  63. package/src/tui/engine/session-flow.mjs +26 -13
  64. package/src/tui/engine/turn.mjs +7 -8
  65. package/src/tui/engine.mjs +4 -2
  66. package/src/vendor/statusline/bin/statusline-route.mjs +60 -4
  67. package/src/vendor/statusline/src/gateway/route-meta.mjs +37 -8
  68. package/src/workflows/default/WORKFLOW.md +26 -32
  69. package/src/workflows/solo/WORKFLOW.md +12 -13
package/README.md CHANGED
@@ -179,6 +179,12 @@ Useful environment toggles:
179
179
  - `MIXDOG_DISABLE_MODEL_PREFETCH=1` — disable background provider model prefetch.
180
180
  - `MIXDOG_PROVIDER_MODEL_WARMUP_DELAY_MS=<ms>` — tune model-catalog warmup delay.
181
181
  - `MIXDOG_MODEL_STALE_MONTHS=<months>` — tune catalog staleness filtering.
182
+ - `MIXDOG_MODE=ship|dev` — explicit shipping/dev mode. Shipping disables
183
+ best-effort diagnostic trace/log file IO (agent-trace.jsonl,
184
+ tool-failures.jsonl) by default; dev/debug opts back in. Default is `dev`
185
+ from a git checkout and `ship` for a published install.
186
+ - `MIXDOG_DIAGNOSTICS=1` — force diagnostic trace/log file IO on even under
187
+ shipping mode.
182
188
 
183
189
  ## Project layout
184
190
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixdog",
3
- "version": "0.9.34",
3
+ "version": "0.9.35",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Standalone mixdog coding-agent CLI/TUI workspace.",
@@ -36,7 +36,7 @@
36
36
  "prepack": "npm run build:tui",
37
37
  "prepublishOnly": "node -e \"if(!process.env.CI){console.error('local npm publish is disabled — run the Release workflow: gh workflow run release -f bump=patch');process.exit(1)}\"",
38
38
  "start": "node src/cli.mjs",
39
- "smoke": "node scripts/smoke.mjs",
39
+ "smoke": "node scripts/smoke.mjs && node --test scripts/ship-mode-test.mjs",
40
40
  "smoke:all": "npm run smoke && npm run smoke:boot && npm run smoke:tools && npm run smoke:patch && npm run smoke:output && npm run smoke:tui && npm run smoke:freevars && npm run smoke:logguard",
41
41
  "smoke:boot": "node scripts/boot-smoke.mjs",
42
42
  "smoke:compact": "node scripts/compact-smoke.mjs",
@@ -50,6 +50,8 @@
50
50
  "smoke:freevars": "node scripts/freevar-smoke.mjs",
51
51
  "smoke:logguard": "node scripts/log-writer-guard-smoke.mjs",
52
52
  "test:toolcall": "node --test scripts/toolcall-args-test.mjs",
53
+ "test:shipmode": "node --test scripts/ship-mode-test.mjs",
54
+ "test:shellhardening": "node --test scripts/shell-hardening-test.mjs",
53
55
  "test:placeholder": "node --test scripts/compacted-placeholder-scrub-test.mjs",
54
56
  "test:providers": "node --test scripts/provider-toolcall-test.mjs",
55
57
  "test:atomiclock": "node --test scripts/atomic-lock-tryonce-test.mjs",
@@ -0,0 +1 @@
1
+ export default {connectToDevTools(){}};
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { Box, renderToString } from 'ink';
3
+ import { ToolExecution } from '../src/tui/components/ToolExecution.jsx';
4
+ import { estimateTranscriptItemRowsCached } from '../src/tui/app/transcript-window.mjs';
5
+ function renderRows(item,COLUMNS){
6
+ const node=React.createElement(Box,{flexDirection:'column',flexShrink:0,width:COLUMNS},
7
+ React.createElement(ToolExecution,{name:item.name,args:item.args,result:item.result,rawResult:item.rawResult,isError:item.isError,errorCount:item.errorCount,expanded:!!item.expanded,columns:COLUMNS,attached:false,count:item.count,completedCount:item.completedCount,startedAt:item.startedAt,completedAt:item.completedAt,aggregate:item.aggregate,categories:item.categories,doneCategories:item.doneCategories,headerFinalized:item.headerFinalized,deferredDisplayReady:item.deferredDisplayReady}));
8
+ const out=renderToString(node,{columns:COLUMNS});
9
+ return out===''?0:out.split('\n').length;
10
+ }
11
+ const now=Date.now();
12
+ const longLine='x'.repeat(200);
13
+ const items=[];
14
+ const names=['read','grep','glob','shell','code_graph','explore','search','web_fetch','agent','Skill','view_image','recall','remember','task','list'];
15
+ const results=[null,'','ok','No matches','line1\nline2','line1\nline2\nline3',longLine, longLine+'\n'+longLine, '[status: cancelled]\nbody', 'Error: boom'];
16
+ let id=0;
17
+ for(const name of names){
18
+ for(const result of results){
19
+ for(const completed of [0,1]){
20
+ for(const isError of [false,true]){
21
+ for(const expanded of [false,true]){
22
+ items.push({name,args:{path:'a/b/c.js',pattern:'foo',command:'ls -la',mode:'search',symbols:'X',action:'spawn',status: completed?'completed':'',name:'setup'},result,count:1,completedCount:completed,isError,expanded,startedAt:now-2000,completedAt:completed?now:0,headerFinalized:completed===1,deferredDisplayReady:true,rawResult: expanded?(result||'raw body\nl2'):null,__id:id++});
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ const COLS=[40,60,80,100,120];
29
+ let bad=0,total=0;
30
+ const seen=new Set();
31
+ for(const COLUMNS of COLS){
32
+ for(const it of items){
33
+ total++;
34
+ const est=estimateTranscriptItemRowsCached({kind:'tool',...it},COLUMNS,false);
35
+ let ren; try{ren=renderRows(it,COLUMNS);}catch(e){ren='ERR:'+e.message;}
36
+ if(est!==ren){bad++;
37
+ const key=`${it.name}|res=${JSON.stringify(it.result)}|c=${it.completedCount}|e=${it.isError}|x=${it.expanded}|col=${COLUMNS}`;
38
+ if(bad<=40) console.log(`DIFF est=${est} ren=${ren} ${key}`);
39
+ }
40
+ }
41
+ }
42
+ console.log('total',total,'mismatches',bad);