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
@@ -0,0 +1,30 @@
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
+ import { shouldSuppressFullyFailedToolItem } from '../src/tui/transcript-tool-failures.mjs';
6
+ function renderRows(item,COLUMNS){
7
+ const node=React.createElement(Box,{flexDirection:'column',flexShrink:0,width:COLUMNS},
8
+ 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}));
9
+ const out=renderToString(node,{columns:COLUMNS});
10
+ return out===''?0:out.split('\n').length;
11
+ }
12
+ const now=Date.now();
13
+ const names=['read','grep','glob','shell','code_graph','explore','search','web_fetch','agent','Skill','view_image','recall','list','fetch','load_tool'];
14
+ const results=['ok','No matches','line1\nline2','line1\nline2\nline3','done · 3 items','Failed', 'Read 40 lines'];
15
+ const cases=[];
16
+ let id=0;
17
+ for(const name of names) for(const result of results) for(const completed of [0,1]) for(const isError of [false,true]){
18
+ cases.push({name,args:{path:'a/b/c.js',pattern:'foo',command:'ls -la',mode:'search',symbols:'X',action:'response',status: completed?'completed':'',name:'setup'},result: completed?result:null,count:1,completedCount:completed,isError,expanded:false,startedAt:now-2000,completedAt:completed?now:0,headerFinalized:completed===1,deferredDisplayReady:true,rawResult:null,__id:id++});
19
+ }
20
+ const COLS=[60,80,100,120];
21
+ let bad=0,total=0;
22
+ for(const COLUMNS of COLS) for(const it of cases){
23
+ const full={kind:'tool',...it};
24
+ if(shouldSuppressFullyFailedToolItem(full)) continue; // real app renders nothing
25
+ total++;
26
+ const est=estimateTranscriptItemRowsCached(full,COLUMNS,false);
27
+ let ren; try{ren=renderRows(it,COLUMNS);}catch(e){ren='ERR:'+e.message;}
28
+ if(est!==ren){bad++; if(bad<=60) console.log(`DIFF est=${est} ren=${ren} ${it.name}|res=${JSON.stringify(it.result)}|c=${it.completedCount}|e=${it.isError}|col=${COLUMNS}`);}
29
+ }
30
+ console.log('total',total,'mismatches',bad);