@duckmind/dm-darwin-x64 0.48.5 → 0.49.6

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 (97) hide show
  1. package/dm +0 -0
  2. package/extensions/.dm-extensions.json +159 -220
  3. package/extensions/dm-9router-ext/package.json +0 -6
  4. package/extensions/dm-9router-ext/src/index.js +1 -1
  5. package/extensions/dm-ask-user/package.json +0 -4
  6. package/extensions/dm-caveman/extensions/caveman.js +29 -0
  7. package/extensions/dm-caveman/package.json +20 -0
  8. package/extensions/dm-cli-anything/index.js +5 -5
  9. package/extensions/dm-cli-anything/package.json +0 -7
  10. package/extensions/dm-cli-anything/skills/cli-anything/SKILL.md +1 -3
  11. package/extensions/dm-context/package.json +0 -1
  12. package/extensions/dm-cua/package.json +0 -7
  13. package/extensions/dm-fff/package.json +0 -6
  14. package/extensions/dm-goal/package.json +0 -8
  15. package/extensions/dm-grill-me/index.js +2 -2
  16. package/extensions/dm-grill-me/package.json +0 -7
  17. package/extensions/dm-image2/package.json +0 -8
  18. package/extensions/dm-subagents/.m/artifacts/shell/shell_output_1783845384621_9cf9262bf674.txt +1336 -0
  19. package/extensions/dm-subagents/.m/artifacts/shell/shell_output_1783846154938_6a41cefee0bf.txt +1336 -0
  20. package/extensions/dm-subagents/package.json +0 -11
  21. package/extensions/dm-subagents/src/extension/doctor.js +10 -10
  22. package/extensions/dm-subagents/src/extension/fanout-child.js +97 -97
  23. package/extensions/dm-subagents/src/extension/index.js +121 -121
  24. package/extensions/dm-subagents/src/extension/rpc.js +5 -5
  25. package/extensions/dm-subagents/src/extension/schemas.js +1 -1
  26. package/extensions/dm-subagents/src/extension/tool-description.js +2 -2
  27. package/extensions/dm-subagents/src/intercom/native-supervisor-channel.js +5 -5
  28. package/extensions/dm-subagents/src/runs/background/async-execution.js +19 -19
  29. package/extensions/dm-subagents/src/runs/background/async-job-tracker.js +9 -9
  30. package/extensions/dm-subagents/src/runs/background/async-resume.js +5 -5
  31. package/extensions/dm-subagents/src/runs/background/async-status.js +8 -8
  32. package/extensions/dm-subagents/src/runs/background/fleet-view.js +13 -13
  33. package/extensions/dm-subagents/src/runs/background/result-watcher.js +5 -5
  34. package/extensions/dm-subagents/src/runs/background/run-id-resolver.js +3 -3
  35. package/extensions/dm-subagents/src/runs/background/run-status.js +19 -19
  36. package/extensions/dm-subagents/src/runs/background/stale-run-reconciler.js +7 -7
  37. package/extensions/dm-subagents/src/runs/background/subagent-runner.js +35 -35
  38. package/extensions/dm-subagents/src/runs/background/wait.js +7 -7
  39. package/extensions/dm-subagents/src/runs/foreground/chain-execution.js +32 -32
  40. package/extensions/dm-subagents/src/runs/foreground/execution.js +26 -26
  41. package/extensions/dm-subagents/src/runs/foreground/subagent-executor.js +96 -96
  42. package/extensions/dm-subagents/src/runs/shared/dm-args.js +1 -1
  43. package/extensions/dm-subagents/src/runs/shared/nested-events.js +6 -6
  44. package/extensions/dm-subagents/src/runs/shared/subagent-prompt-runtime.js +13 -13
  45. package/extensions/dm-subagents/src/shared/fork-context.js +4 -4
  46. package/extensions/dm-tasks/package.json +0 -7
  47. package/extensions/dm-usage/package.json +0 -7
  48. package/extensions/greedysearch-dm/bin/cdp-greedy.mjs +1 -8
  49. package/extensions/greedysearch-dm/bin/gschrome.mjs +3 -3
  50. package/extensions/greedysearch-dm/bin/launch-visible.mjs +3 -3
  51. package/extensions/greedysearch-dm/bin/launch.mjs +4 -4
  52. package/extensions/greedysearch-dm/bin/search.mjs +103 -103
  53. package/extensions/greedysearch-dm/extractors/consensus.mjs +35 -35
  54. package/extensions/greedysearch-dm/extractors/gemini.mjs +38 -38
  55. package/extensions/greedysearch-dm/extractors/logically.mjs +35 -35
  56. package/extensions/greedysearch-dm/package.json +0 -10
  57. package/extensions/greedysearch-dm/src/search/chrome.mjs +23 -23
  58. package/extensions/greedysearch-dm/src/search/fetch-source.mjs +35 -35
  59. package/extensions/greedysearch-dm/src/search/research.mjs +61 -61
  60. package/extensions/greedysearch-dm/src/search/synthesis-runner.mjs +4 -4
  61. package/package.json +1 -1
  62. package/extensions/dm-9router-ext/README.md +0 -142
  63. package/extensions/dm-9router-ext/tsconfig.json +0 -17
  64. package/extensions/dm-ask-user/README.md +0 -226
  65. package/extensions/dm-cli-anything/LICENSE +0 -201
  66. package/extensions/dm-cli-anything/README.md +0 -33
  67. package/extensions/dm-cli-anything/vendor/UPSTREAM.md +0 -14
  68. package/extensions/dm-context/AGENTS.md +0 -41
  69. package/extensions/dm-context/README.md +0 -18
  70. package/extensions/dm-context/tsconfig.json +0 -16
  71. package/extensions/dm-cua/README.md +0 -24
  72. package/extensions/dm-fff/README.md +0 -36
  73. package/extensions/dm-fff/tsconfig.json +0 -13
  74. package/extensions/dm-goal/CHANGELOG.md +0 -12
  75. package/extensions/dm-goal/LICENSE +0 -21
  76. package/extensions/dm-goal/README.md +0 -29
  77. package/extensions/dm-goal/tsconfig.json +0 -15
  78. package/extensions/dm-grill-me/DESIGN.md +0 -301
  79. package/extensions/dm-grill-me/LICENSE +0 -21
  80. package/extensions/dm-grill-me/README.md +0 -82
  81. package/extensions/dm-grill-me/tsconfig.json +0 -17
  82. package/extensions/dm-image2/README.md +0 -33
  83. package/extensions/dm-subagents/CHANGELOG.md +0 -1211
  84. package/extensions/dm-subagents/README.md +0 -29
  85. package/extensions/dm-subagents/banner.png +0 -0
  86. package/extensions/dm-subagents/biome.json +0 -26
  87. package/extensions/dm-subagents/tsconfig.json +0 -18
  88. package/extensions/dm-tasks/LICENSE +0 -21
  89. package/extensions/dm-tasks/README.md +0 -30
  90. package/extensions/dm-tasks/biome.json +0 -26
  91. package/extensions/dm-tasks/tsconfig.json +0 -14
  92. package/extensions/dm-usage/LICENSE +0 -21
  93. package/extensions/dm-usage/README.md +0 -29
  94. package/extensions/dm-usage/insights-screenshot.png +0 -0
  95. package/extensions/dm-usage/screenshot.png +0 -0
  96. package/extensions/greedysearch-dm/LICENSE +0 -21
  97. package/extensions/greedysearch-dm/README.md +0 -222
@@ -3,10 +3,6 @@
3
3
  "version": "1.7.2",
4
4
  "description": "DM extension for asking users structured interactive questions",
5
5
  "type": "module",
6
- "files": [
7
- "index.ts",
8
- "README.md"
9
- ],
10
6
  "keywords": [
11
7
  "duckmind",
12
8
  "dm",
@@ -0,0 +1,29 @@
1
+ import{readFile as g,writeFile as r,mkdir as l}from"node:fs/promises";import{homedir as v}from"node:os";import{join as S}from"node:path";import{getSettingsListTheme as o}from"@duckmind/dm-coding-agent";import{Container as s,SettingsList as c,Text as G}from"@duckmind/dm-tui";var Y=["off","lite","full","ultra","wenyan-lite","wenyan","wenyan-ultra","micro"],m=new Set(["off","stop","quit"]),d=[{value:"lite",label:"lite",description:"Professional, no fluff"},{value:"full",label:"full",description:"Classic caveman"},{value:"ultra",label:"ultra",description:"Maximum compression"},{value:"wenyan-lite",label:"wenyan-lite",description:"Semi-classical Chinese"},{value:"wenyan",label:"wenyan",description:"Full 文言文"},{value:"wenyan-ultra",label:"wenyan-ultra",description:"Extreme 文言文"},{value:"micro",label:"micro",description:"Experimental prompt-minimized mode"},{value:"off",label:"off",description:"Disable caveman mode"},{value:"stop",label:"stop",description:"Disable caveman mode"},{value:"quit",label:"quit",description:"Disable caveman mode"},{value:"config",label:"config",description:"Open settings dialog"}],E=S(v(),".dm","agent","caveman.json"),O={defaultLevel:"full",showStatus:!0},_=Promise.resolve();async function n(){try{let $=await g(E,"utf8"),q=JSON.parse($);return{defaultLevel:Y.includes(q.defaultLevel)?q.defaultLevel:O.defaultLevel,showStatus:typeof q.showStatus==="boolean"?q.showStatus:O.showStatus}}catch{return{...O}}}async function a($){let q=JSON.stringify($,null,2)+`
2
+ `;return _=_.then(async()=>{await l(S(v(),".dm","agent"),{recursive:!0}),await r(E,q,"utf8")}),_}var M="\x1B[38;5;196m",N="\x1B[38;5;208m",p="\x1B[38;5;220m",L="\x1B[38;5;230m",F="\x1B[38;5;52m",j="\x1B[0m",k=[`${M}⠠${N}⠄${j}`,`${N}⠔${p}⠂${j}`,`${p}⠊${L}⠑${j}`,`${L}⠑${p}⠊${j}`,`${p}⠂${N}⠔${j}`,`${N}⠄${M}⠠${j}`,`${M}⠠${F}⠄${j}`,`${F}⠔${M}⠂${j}`],f={lite:{frames:k,label:"LITE",interval:300},full:{frames:k,label:"FULL",interval:200},ultra:{frames:k,label:"ULTRA",interval:100},"wenyan-lite":{frames:k,label:"文言",interval:300},wenyan:{frames:k,label:"文言文",interval:200},"wenyan-ultra":{frames:k,label:"文言文極",interval:100},micro:{frames:k,label:"MICRO",interval:120}},i=`IMPORTANT: You are in CAVEMAN MODE. Respond terse like smart caveman. All technical substance stay. Only fluff die.
3
+
4
+ Rules:
5
+ - Drop articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries, hedging
6
+ - Fragments OK. Short synonyms preferred. Technical terms exact
7
+ - Code blocks unchanged. Errors quoted exact
8
+ - Pattern: [thing] [action] [reason]. [next step].
9
+
10
+ Bad: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
11
+ Good: "Bug in auth middleware. Token expiry check use \`<\` not \`<=\`. Fix:"`,t=`# Token efficiency
12
+ Respond like smart caveman. Cut all filler, keep technical substance.
13
+ - Drop articles (a, an, the), filler (just, really, basically, actually).
14
+ - Drop pleasantries (sure, certainly, happy to).
15
+ - No hedging. Fragments fine. Short synonyms.
16
+ - Technical terms stay exact. Code blocks unchanged.
17
+ - Pattern: [thing] [action] [reason]. [next step].`,e={lite:'No filler/hedging. Keep articles + full sentences. Professional but tight.\nExample: "Your component re-renders because you create a new object reference each render. Wrap it in `useMemo`."',full:'Drop articles, fragments OK, short synonyms.\nExample: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."',ultra:'Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y).\nExample: "Inline obj prop → new ref → re-render. `useMemo`."',"wenyan-lite":`Semi-classical Chinese. Grammar intact, filler gone. Technical terms in English.
18
+ Example: "組件頻重繪,以每繪新生對象參照故。以 useMemo 包之。"`,wenyan:`Maximum classical terseness. 80-90% character reduction. Technical terms in English.
19
+ Example: "物出新參照,致重繪。useMemo Wrap之。"`,"wenyan-ultra":`Extreme classical compression. Technical terms in English.
20
+ Example: "新參照→重繪。useMemo Wrap。"`},bb=`Auto-clarity: drop caveman for security warnings, irreversible action confirmations, or when user is confused. Resume after.
21
+ Boundaries: write normal code. Only compress explanations. "stop caveman" or "normal mode" reverts.`;function qb($){let q="off",z={...O},X=null,V=0,P=!1,h=null,R=async()=>{if(!h)h=(async()=>{if(z=await n(),q==="off"&&z.defaultLevel!=="off")q=z.defaultLevel})();await h};function I(){if(X)clearInterval(X),X=null;V=0}function Q(Z){I();let J=Z.ui.theme;if(q==="off"||!z.showStatus){Z.ui.setStatus("caveman","");return}let b=f[q],B=(U)=>{Z.ui.setStatus("caveman",U+" "+J.fg("muted","caveman level: ")+J.fg("text",b.label))};if(!P){B(b.frames[0]);return}let w=()=>{B(b.frames[V%b.frames.length]),V++};w(),X=setInterval(w,b.interval)}$.on("session_start",async(Z,J)=>{await R();let b=null;for(let B of J.sessionManager.getEntries())if(B.type==="custom"&&B.customType==="caveman-level")b=B.data?.level??null;if(b!==null)q=b;else if(z.defaultLevel!=="off")q=z.defaultLevel,$.appendEntry("caveman-level",{level:q});Q(J)}),$.on("agent_start",async(Z,J)=>{P=!0,Q(J)}),$.on("agent_end",async(Z,J)=>{P=!1,Q(J)}),$.on("session_shutdown",async()=>{I(),P=!1}),$.registerCommand("caveman",{description:"Toggle caveman mode, set level, use stop/off/quit to disable, or 'config' to open settings",getArgumentCompletions:(Z)=>{let J=Z.trim().toLowerCase(),b=d.filter((B)=>B.value.startsWith(J));return b.length>0?b:null},handler:async(Z,J)=>{let b=Z?.trim().toLowerCase();if(b==="config"){await u(J);return}if(!b)q=q==="off"?"full":"off";else if(m.has(b))q="off";else if(Y.includes(b))q=b;else{J.ui.notify(`Unknown: "${b}". Use: ${Y.join(", ")}, stop, quit, or config`,"error");return}$.appendEntry("caveman-level",{level:q}),Q(J),J.ui.notify(q==="off"?"Caveman mode off.":`Caveman: ${f[q].label}`,"info")}});async function u(Z){await R(),await Z.ui.custom((J,b,B,w)=>{let U=[{id:"defaultLevel",label:"Default level for new sessions",currentValue:z.defaultLevel,values:[...Y]},{id:"showStatus",label:"Show animated status bar",currentValue:z.showStatus?"on":"off",values:["on","off"]}],W=new s;W.addChild(new G(b.fg("accent",b.bold(" Caveman Config")),0,0)),W.addChild(new G(b.fg("dim"," Saved to ~/.dm/agent/caveman.json"),0,0)),W.addChild(new G(b.fg("dim"," Default level applies to future sessions."),0,0)),W.addChild(new G("",0,0));let A=(K,D)=>{if(K==="defaultLevel"&&Y.includes(D))z.defaultLevel=D;else if(K==="showStatus")z.showStatus=D==="on";a(z),Q(Z)},y=new c(U,Math.min(U.length+2,10),o(),A,()=>w(void 0));W.addChild(y),W.addChild(new G(b.fg("dim"," ←→/hl/tab change • ↑↓/jk move • esc close"),0,0));let T=(K)=>{let D=y.selectedIndex,H=U[D];if(!H?.values?.length)return;let x=(H.values.indexOf(H.currentValue)+K+H.values.length)%H.values.length,C=H.values[x];H.currentValue=C,y.updateValue(H.id,C),A(H.id,C)};return{render:(K)=>W.render(K),invalidate:()=>W.invalidate(),handleInput:(K)=>{if(K==="j")K="\x1B[B";else if(K==="k")K="\x1B[A";else if(K==="h"){T(-1),J.requestRender();return}else if(K==="l"||K==="\x1B[C"||K==="\t"){T(1),J.requestRender();return}else if(K==="\x1B[D"){T(-1),J.requestRender();return}y.handleInput?.(K),J.requestRender()}}})}$.on("before_agent_start",async(Z)=>{if(await R(),q==="off")return;if(q==="micro")return{systemPrompt:`${Z.systemPrompt}
22
+
23
+ ${t}`};return{systemPrompt:`${Z.systemPrompt}
24
+
25
+ ${i}
26
+
27
+ ${e[q]}
28
+
29
+ ${bb}`}})}export{qb as default};
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "dm-caveman",
3
+ "version": "1.0.7",
4
+ "description": "DM extension for concise, token-efficient assistant responses",
5
+ "type": "module",
6
+ "keywords": [
7
+ "duckmind",
8
+ "dm",
9
+ "dm-extension",
10
+ "caveman",
11
+ "token-saving"
12
+ ],
13
+ "license": "MIT",
14
+ "author": "jonjonrankin",
15
+ "dm": {
16
+ "extensions": [
17
+ "./extensions/caveman.js"
18
+ ]
19
+ }
20
+ }
@@ -1,5 +1,5 @@
1
- import x from"node:fs";import g from"node:path";import{fileURLToPath as L}from"node:url";var w=g.dirname(L(import.meta.url)),S=g.join(w,"vendor"),c={url:"https://github.com/HKUDS/CLI-Anything",revision:"7862c920c9950a0883326ba4ca9dd9ffdbcb5596",registryUpdated:{harness:"2026-04-16",public:"2026-04-18"}},A={type:"object",additionalProperties:!1,properties:{action:{type:"string",enum:["list","search","info","categories","install_command","launch_command"]},query:{type:"string",description:"Search query for CLI name, display name, description, or category."},name:{type:"string",description:"Exact CLI name or display name for info/install_command/launch_command."},category:{type:"string",description:"Optional category filter."},source:{type:"string",enum:["all","harness","public"],description:"Registry source filter. harness=CLI-Anything harnesses, public=public third-party CLIs."},limit:{type:"number",minimum:1,maximum:100,description:"Maximum items returned for list/search."}}};function q(e){return JSON.parse(x.readFileSync(e,"utf8"))}function E(e){return String(e??"").replace(/[\u0000-\u001f\u007f]/g," ").trim()}function a(e){return E(e).toLowerCase()}function _(e){return`'${String(e).replace(/'/g,"'\\''")}'`}function f(e,n){let s=q(g.join(S,n)),t=Array.isArray(s.clis)?s.clis:[];return{source:e,meta:s.meta||{},entries:t.map((i)=>({...i,_source:e}))}}function y(){let e=f("harness","registry.json"),n=f("public","public_registry.json"),s=[...e.entries,...n.entries].sort((t,i)=>a(t.name||t.display_name).localeCompare(a(i.name||i.display_name)));return{upstream:c,metas:{harness:e.meta,public:n.meta},counts:{harness:e.entries.length,public:n.entries.length,total:s.length},entries:s}}function v(e,n="all"){return!n||n==="all"||e._source===n}function R(e,n){return!n||a(e.category)===a(n)}function m(e,n={}){let s=n.source||"all";return e.filter((t)=>v(t,s)&&R(t,n.category))}function b(e,n,s={}){let t=a(n),i=m(e,s);if(!t)return i;return i.filter((o)=>{return[o.name,o.display_name,o.description,o.category,o.entry_point,o.homepage,o.source_url,o.package_manager,o.npm_package].map(a).join(" ").includes(t)})}function $(e,n,s={}){let t=a(n);if(!t)return null;let i=m(e,s);return i.find((o)=>a(o.name)===t)||i.find((o)=>a(o.display_name)===t)||i.find((o)=>a(o.entry_point)===t)||null}function h(e){let n=Number(e.limit??20);if(!Number.isFinite(n))return 20;return Math.max(1,Math.min(100,Math.trunc(n)))}function d(e){return{name:e.name,display_name:e.display_name,source:e._source,category:e.category,version:e.version,description:e.description,requires:e.requires,entry_point:e.entry_point,homepage:e.homepage,source_url:e.source_url,package_manager:e.package_manager,npm_package:e.npm_package,npx_cmd:e.npx_cmd,skill_md:e.skill_md}}function H(e){let n=[`${e.display_name||e.name} (${e.name}, ${e._source})`,`Category: ${e.category||"unknown"}; version: ${e.version||"unknown"}`,`Description: ${e.description||"n/a"}`];if(e.requires)n.push(`Requires: ${e.requires}`);if(e.entry_point)n.push(`Entry point: ${e.entry_point}`);if(e.homepage)n.push(`Homepage: ${e.homepage}`);if(e.source_url)n.push(`Source: ${e.source_url}`);if(e.skill_md)n.push(`Skill/guide: ${e.skill_md}`);if(e.npx_cmd)n.push(`npx: ${e.npx_cmd}`);return n.join(`
2
- `)}function C(e,n,s){let t=e.length,i=e.slice(0,h(n)),o=[`source=${n.source||"all"}`];if(n.category)o.push(`category=${n.category}`);if(n.query)o.push(`query=${n.query}`);let r=[`CLI-Anything snapshot: ${s.counts.total} CLIs (${s.counts.harness} harness, ${s.counts.public} public) from ${c.revision.slice(0,12)}`,`Matches: ${t}; showing ${i.length}; filters: ${o.join(", ")}`,"Note: install/launch actions return command suggestions only; they do not execute side effects.",""];for(let l of i)r.push(`- ${l.name} [${l._source}/${l.category||"unknown"}] — ${l.description||l.display_name||""}`);if(i.length<t)r.push(`... ${t-i.length} more; raise limit or narrow query/category.`);return r.join(`
3
- `)}function N(e){let n=new Map;for(let t of e){let o=`${t.category||"unknown"} (${t._source})`;n.set(o,(n.get(o)||0)+1)}return["CLI-Anything categories:",...[...n.entries()].sort((t,i)=>t[0].localeCompare(i[0])).map(([t,i])=>`- ${t}: ${i}`)].join(`
4
- `)}function I(e){let s=[{label:"cli-hub",command:`CLI_HUB_NO_ANALYTICS=1 cli-hub install ${_(e.name)}`,note:"Requires `pip install cli-anything-hub`; disables CLI-Hub analytics for the install command."}];if(e.install_cmd)s.push({label:"direct",command:e.install_cmd,note:"Direct upstream registry install command. Review before running because it can install global packages or execute shell commands."});if(e.npx_cmd)s.push({label:"npx",command:e.npx_cmd,note:"Runs through npx without preinstalling globally; still may download code."});return s}function k(e){let n=[];if(e.entry_point)n.push({label:"entry_point",command:e.entry_point});if(e.name)n.push({label:"cli-hub",command:`CLI_HUB_NO_ANALYTICS=1 cli-hub launch ${_(e.name)}`});return n}function j(e,n){let s=n==="install_command"?I(e):k(e);return{content:[{type:"text",text:[`${n==="install_command"?"Install":"Launch"} suggestions for ${e.name}:`,"These are suggestions only; dm-cli-anything does not execute install/update/uninstall/launch commands.","Ask the user before running commands with package installs, global writes, or shell side effects.","",...s.map((i)=>`- ${i.label}: ${i.command}${i.note?` (${i.note})`:""}`)].join(`
5
- `)}],details:{status:"ok",action:n,entry:d(e),suggestions:s,side_effects_executed:!1,upstream:c},isError:!1}}function p(e,n){return{content:[{type:"text",text:e}],details:n,isError:!1}}function u(e,n={}){return{content:[{type:"text",text:`cli_anything_hub failed: ${e}`}],details:{status:"error",message:e,...n},isError:!0}}function U(e){e.registerTool({name:"cli_anything_hub",label:"CLI-Anything Hub",description:"Search and inspect the bundled HKUDS CLI-Anything/CLI-Hub registry snapshot. Install and launch actions return command suggestions only and never execute side effects.",promptSnippet:"Use cli_anything_hub to discover CLI-Anything harnesses and public CLIs by name, category, source, or query. Treat install_command and launch_command as suggestions only; ask before running global installs or shell commands.",promptGuidelines:["Use action=search for broad discovery, action=list with category/source filters for inventory, and action=info for a known CLI.","Do not execute install, update, uninstall, or launch commands from this tool without explicit user approval.","When suggesting CLI-Hub commands, prefer `CLI_HUB_NO_ANALYTICS=1` to avoid opt-out analytics side effects.","Mention that the registry is a bundled snapshot from HKUDS CLI-Anything and may need refresh for the newest upstream entries."],parameters:A,async execute(n,s={}){let t=s.action||(s.query?"search":"list");try{let i=y();if(t==="categories"){let r=m(i.entries,s);return p(N(r),{status:"ok",action:t,categories_counted:r.length,upstream:c})}if(t==="list"||t==="search"){let r=t==="search"?b(i.entries,s.query||"",s):m(i.entries,s);return p(C(r,s,i),{status:"ok",action:t,total_matches:r.length,shown:Math.min(r.length,h(s)),entries:r.slice(0,h(s)).map(d),upstream:c,counts:i.counts})}if(!s.name)return u(`${t} requires a name`,{action:t});let o=$(i.entries,s.name,s);if(!o)return u(`no CLI-Anything entry matched name=${s.name}`,{action:t,name:s.name,source:s.source||"all"});if(t==="info")return p(H(o),{status:"ok",action:t,entry:d(o),upstream:c});if(t==="install_command"||t==="launch_command")return j(o,t);return u(`unsupported action=${t}`,{action:t})}catch(i){return u(i instanceof Error?i.message:String(i),{action:t})}}})}var O={loadRegistries:y,searchEntries:b,findEntry:$,installSuggestions:I,launchSuggestions:k,renderList:C,UPSTREAM:c};export{U as default,O as __test};
1
+ import k from"node:fs";import g from"node:path";import{fileURLToPath as x}from"node:url";var L=g.dirname(x(import.meta.url)),w=g.join(L,"vendor"),S={type:"object",additionalProperties:!1,properties:{action:{type:"string",enum:["list","search","info","categories","install_command","launch_command"]},query:{type:"string",description:"Search query for CLI name, display name, description, or category."},name:{type:"string",description:"Exact CLI name or display name for info/install_command/launch_command."},category:{type:"string",description:"Optional category filter."},source:{type:"string",enum:["all","harness","public"],description:"Registry source filter. harness=CLI-Anything harnesses, public=public third-party CLIs."},limit:{type:"number",minimum:1,maximum:100,description:"Maximum items returned for list/search."}}};function q(e){return JSON.parse(k.readFileSync(e,"utf8"))}function A(e){return String(e??"").replace(/[\u0000-\u001f\u007f]/g," ").trim()}function a(e){return A(e).toLowerCase()}function f(e){return`'${String(e).replace(/'/g,"'\\''")}'`}function h(e,n){let o=q(g.join(w,n)),t=Array.isArray(o.clis)?o.clis:[];return{source:e,meta:o.meta||{},entries:t.map((s)=>({...s,_source:e}))}}function _(){let e=h("harness","registry.json"),n=h("public","public_registry.json"),o=[...e.entries,...n.entries].sort((t,s)=>a(t.name||t.display_name).localeCompare(a(s.name||s.display_name)));return{metas:{harness:e.meta,public:n.meta},counts:{harness:e.entries.length,public:n.entries.length,total:o.length},entries:o}}function E(e,n="all"){return!n||n==="all"||e._source===n}function N(e,n){return!n||a(e.category)===a(n)}function u(e,n={}){let o=n.source||"all";return e.filter((t)=>E(t,o)&&N(t,n.category))}function y(e,n,o={}){let t=a(n),s=u(e,o);if(!t)return s;return s.filter((i)=>{return[i.name,i.display_name,i.description,i.category,i.entry_point,i.homepage,i.source_url,i.package_manager,i.npm_package].map(a).join(" ").includes(t)})}function b(e,n,o={}){let t=a(n);if(!t)return null;let s=u(e,o);return s.find((i)=>a(i.name)===t)||s.find((i)=>a(i.display_name)===t)||s.find((i)=>a(i.entry_point)===t)||null}function d(e){let n=Number(e.limit??20);if(!Number.isFinite(n))return 20;return Math.max(1,Math.min(100,Math.trunc(n)))}function p(e){return{name:e.name,display_name:e.display_name,source:e._source,category:e.category,version:e.version,description:e.description,requires:e.requires,entry_point:e.entry_point,homepage:e.homepage,source_url:e.source_url,package_manager:e.package_manager,npm_package:e.npm_package,npx_cmd:e.npx_cmd,skill_md:e.skill_md}}function R(e){let n=[`${e.display_name||e.name} (${e.name}, ${e._source})`,`Category: ${e.category||"unknown"}; version: ${e.version||"unknown"}`,`Description: ${e.description||"n/a"}`];if(e.requires)n.push(`Requires: ${e.requires}`);if(e.entry_point)n.push(`Entry point: ${e.entry_point}`);if(e.homepage)n.push(`Homepage: ${e.homepage}`);if(e.source_url)n.push(`Source: ${e.source_url}`);if(e.skill_md)n.push(`Skill/guide: ${e.skill_md}`);if(e.npx_cmd)n.push(`npx: ${e.npx_cmd}`);return n.join(`
2
+ `)}function $(e,n,o){let t=e.length,s=e.slice(0,d(n)),i=[`source=${n.source||"all"}`];if(n.category)i.push(`category=${n.category}`);if(n.query)i.push(`query=${n.query}`);let r=[`Bundled DM CLI catalog: ${o.counts.total} CLIs (${o.counts.harness} harness, ${o.counts.public} public)`,`Matches: ${t}; showing ${s.length}; filters: ${i.join(", ")}`,"Note: install/launch actions return command suggestions only; they do not execute side effects.",""];for(let c of s)r.push(`- ${c.name} [${c._source}/${c.category||"unknown"}] — ${c.description||c.display_name||""}`);if(s.length<t)r.push(`... ${t-s.length} more; raise limit or narrow query/category.`);return r.join(`
3
+ `)}function v(e){let n=new Map;for(let t of e){let i=`${t.category||"unknown"} (${t._source})`;n.set(i,(n.get(i)||0)+1)}return["CLI-Anything categories:",...[...n.entries()].sort((t,s)=>t[0].localeCompare(s[0])).map(([t,s])=>`- ${t}: ${s}`)].join(`
4
+ `)}function C(e){let o=[{label:"cli-hub",command:`CLI_HUB_NO_ANALYTICS=1 cli-hub install ${f(e.name)}`,note:"Requires `pip install cli-anything-hub`; disables CLI-Hub analytics for the install command."}];if(e.install_cmd)o.push({label:"direct",command:e.install_cmd,note:"Direct upstream registry install command. Review before running because it can install global packages or execute shell commands."});if(e.npx_cmd)o.push({label:"npx",command:e.npx_cmd,note:"Runs through npx without preinstalling globally; still may download code."});return o}function I(e){let n=[];if(e.entry_point)n.push({label:"entry_point",command:e.entry_point});if(e.name)n.push({label:"cli-hub",command:`CLI_HUB_NO_ANALYTICS=1 cli-hub launch ${f(e.name)}`});return n}function M(e,n){let o=n==="install_command"?C(e):I(e);return{content:[{type:"text",text:[`${n==="install_command"?"Install":"Launch"} suggestions for ${e.name}:`,"These are suggestions only; dm-cli-anything does not execute install/update/uninstall/launch commands.","Ask the user before running commands with package installs, global writes, or shell side effects.","",...o.map((s)=>`- ${s.label}: ${s.command}${s.note?` (${s.note})`:""}`)].join(`
5
+ `)}],details:{status:"ok",action:n,entry:p(e),suggestions:o,side_effects_executed:!1},isError:!1}}function m(e,n){return{content:[{type:"text",text:e}],details:n,isError:!1}}function l(e,n={}){return{content:[{type:"text",text:`cli_anything_hub failed: ${e}`}],details:{status:"error",message:e,...n},isError:!0}}function j(e){e.registerTool({name:"cli_anything_hub",label:"CLI-Anything Hub",description:"Search and inspect the bundled DM CLI catalog. Install and launch actions return command suggestions only and never execute side effects.",promptSnippet:"Use cli_anything_hub to discover CLI-Anything harnesses and public CLIs by name, category, source, or query. Treat install_command and launch_command as suggestions only; ask before running global installs or shell commands.",promptGuidelines:["Use action=search for broad discovery, action=list with category/source filters for inventory, and action=info for a known CLI.","Do not execute install, update, uninstall, or launch commands from this tool without explicit user approval.","When suggesting CLI-Hub commands, prefer `CLI_HUB_NO_ANALYTICS=1` to avoid opt-out analytics side effects.","Mention that the catalog is a bundled snapshot and may need a DM update for newer entries."],parameters:S,async execute(n,o={}){let t=o.action||(o.query?"search":"list");try{let s=_();if(t==="categories"){let r=u(s.entries,o);return m(v(r),{status:"ok",action:t,categories_counted:r.length})}if(t==="list"||t==="search"){let r=t==="search"?y(s.entries,o.query||"",o):u(s.entries,o);return m($(r,o,s),{status:"ok",action:t,total_matches:r.length,shown:Math.min(r.length,d(o)),entries:r.slice(0,d(o)).map(p),counts:s.counts})}if(!o.name)return l(`${t} requires a name`,{action:t});let i=b(s.entries,o.name,o);if(!i)return l(`no CLI-Anything entry matched name=${o.name}`,{action:t,name:o.name,source:o.source||"all"});if(t==="info")return m(R(i),{status:"ok",action:t,entry:p(i)});if(t==="install_command"||t==="launch_command")return M(i,t);return l(`unsupported action=${t}`,{action:t})}catch(s){return l(s instanceof Error?s.message:String(s),{action:t})}}})}var O={loadRegistries:_,searchEntries:y,findEntry:b,installSuggestions:C,launchSuggestions:I,renderList:$};export{j as default,O as __test};
@@ -4,13 +4,6 @@
4
4
  "description": "DuckMind extension for safe discovery of HKUDS CLI-Anything/CLI-Hub harnesses.",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
- "files": [
8
- "index.js",
9
- "vendor/",
10
- "skills/",
11
- "README.md",
12
- "LICENSE"
13
- ],
14
7
  "keywords": [
15
8
  "duckmind",
16
9
  "dm",
@@ -14,9 +14,7 @@ Core workflow:
14
14
 
15
15
  Safety notes:
16
16
 
17
- - The bundled registry is a snapshot from
18
- `https://github.com/HKUDS/CLI-Anything` at
19
- `7862c920c9950a0883326ba4ca9dd9ffdbcb5596`.
17
+ - The catalog is a bundled DM snapshot. Update DM to receive newer entries.
20
18
  - CLI-Hub has optional analytics; prefer commands with
21
19
  `CLI_HUB_NO_ANALYTICS=1`.
22
20
  - Registry `install_cmd` values can install global packages or run shell
@@ -4,7 +4,6 @@
4
4
  "description": "Agentic Context Management for DM",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
7
  "keywords": [
9
8
  "duckmind",
10
9
  "dm",
@@ -3,13 +3,6 @@
3
3
  "version": "0.1.0",
4
4
  "description": "First-class browser CUA extension for DM using a dedicated Chrome/CDP-compatible profile",
5
5
  "type": "module",
6
- "files": [
7
- "index.js",
8
- "bin/",
9
- "src/",
10
- "skills/",
11
- "README.md"
12
- ],
13
6
  "keywords": [
14
7
  "duckmind",
15
8
  "dm",
@@ -13,12 +13,6 @@
13
13
  "fuzzy-search",
14
14
  "ai-agent"
15
15
  ],
16
- "files": [
17
- "src",
18
- "test",
19
- "README.md",
20
- "tsconfig.json"
21
- ],
22
16
  "dm": {
23
17
  "extensions": [
24
18
  "./src/index.js"
@@ -6,14 +6,6 @@
6
6
  "author": null,
7
7
  "license": "MIT",
8
8
  "main": "src/goal.js",
9
- "files": [
10
- "src",
11
- "test",
12
- "README.md",
13
- "CHANGELOG.md",
14
- "LICENSE",
15
- "tsconfig.json"
16
- ],
17
9
  "keywords": [
18
10
  "duckmind",
19
11
  "dm",
@@ -101,14 +101,14 @@ Begin by updating the checkpoint if needed, seed or maintain the coverage checkl
101
101
  - /grill output <one or more outputs> (preference only; approval still required)
102
102
  - /grill research off|ask|auto
103
103
 
104
- Grill Me uses one thorough default Socratic style. The assistant must use the hardcoded output-selection phase before ending the interview, producing outputs, or stopping without outputs.`,display:!0});return}if($==="stop"){j.active=!1,j.phase="interview",j.outputPhase=!1,j.outputSelection=void 0,j.approvedOutputPlan=void 0,j.currentQuestion=void 0,j.alternatives=[],j.lastChangeSummary="Stopped grill session",X(),z(Q),Q.ui.notify("Grill mode stopped.","info");return}if($==="status"){J.sendMessage({customType:"grill-me-status",content:jj(j),display:!0});return}if($==="checkpoint"){await q(Q,Z);return}if($==="intent"){let D=x(Z);if(!D){Q.ui.notify(`Usage: /grill intent ${p.join("|")}`,"warning");return}j.intent=D,j.lastChangeSummary=`Intent set to ${D}`,X(),z(Q),Q.ui.notify(`Grill intent: ${D}`,"info");return}if($==="output"){if(!Z){Q.ui.notify("Usage: /grill output <one or more outputs, e.g. design-doc,issues>","warning");return}j.outputPreference=Z,j.lastChangeSummary=`Output preference set to ${Z}`,X(),z(Q),Q.ui.notify(`Grill output preference: ${Z}. This is not approval; Grill Me will still ask/confirm before producing outputs.`,"info");return}if($==="research"){let D=u(Z);if(!D){Q.ui.notify(`Usage: /grill research ${l.join("|")}`,"warning");return}j.researchMode=D,j.lastChangeSummary=`Research mode set to ${D}`,X(),z(Q),Q.ui.notify(`Grill research mode: ${D}`,"info");return}let W=Xj(Y),R={},B=x(W.flags.intent),w=u(W.flags.research);if(B)R.intent=B;if(w)R.researchMode=w;if(typeof W.flags.output==="string")R.outputPreference=W.flags.output;let G=W.rest;if(!G){let D=h(Q);if(!Q.hasUI)G=D||"Current conversation";else{let L=await Q.ui.editor("What should I grill you about?",D||"");if(!L?.trim()){Q.ui.notify("Cancelled grill start.","info");return}G=L.trim()}}F(G,Q,R)}}),J.registerCommand("deep-interview",{description:"Start a DM Deep Interview session",handler:async(V,Q)=>{let Y=V.trim()||h(Q)||"Current conversation";F(Y,Q,{researchMode:"auto"},"DM Deep Interview")}}),J.registerTool({name:"grill_update_checkpoint",label:"Update Grill Checkpoint",description:"Replace the Grill Me shared-understanding checkpoint. Use before asking the next grill question whenever meaningful understanding changes.",promptSnippet:"Persist the evolving Grill Me shared-understanding Markdown checkpoint",promptGuidelines:["Use grill_update_checkpoint before asking the next question whenever an active Grill Me session reaches a meaningful new decision, clarification, assumption, risk, or open question."],parameters:H.Object({markdown:H.String({description:"The full replacement Markdown checkpoint."}),changeSummary:H.String({description:"Brief visible summary of what changed."})}),async execute(V,Q){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session. Start one with /grill <topic>."}],details:{checkpoint:j.checkpoint,changeSummary:"No active session",updatedAt:j.updatedAt}};return j.checkpoint=Q.markdown,j.lastChangeSummary=Q.changeSummary,X(),{content:[{type:"text",text:`Recorded checkpoint update: ${Q.changeSummary}`}],details:{checkpoint:j.checkpoint,changeSummary:Q.changeSummary,updatedAt:j.updatedAt}}},renderCall(V,Q){return new k(Q.fg("toolTitle",Q.bold("grill_update_checkpoint "))+Q.fg("muted",V.changeSummary??""),0,0)},renderResult(V,Q,Y){let $=V.details?.changeSummary,Z=$?`✓ ${$}`:V.content[0]?.type==="text"?V.content[0].text:"Checkpoint updated";return new k(Y.fg("success",Z),0,0)}}),J.registerTool({name:"grill_set_alternatives",label:"Set Grill Alternatives",description:"Set the visible Grill Me answer alternatives offered to the user via Tab autocomplete for the next question or readiness choice.",promptSnippet:"Present answer alternatives through the Grill Me Tab autocomplete UX",promptGuidelines:["Before asking each grill question, call grill_set_alternatives with 2-5 concise, concrete alternatives the user can accept or edit with Tab autocomplete.","Include one recommended alternative and make it clear in the label or description.","Use alternatives that are useful defaults, not exhaustive menus; the user can still type a custom answer."],parameters:H.Object({question:H.String({description:"The question these alternatives answer."}),alternatives:H.Array(H.Object({value:H.String({description:"The exact reply inserted into the user's editor when selected."}),label:H.String({description:"Short visible label for the alternative."}),description:H.Optional(H.String({description:"Brief explanation or recommendation note."}))}),{description:"2-5 suggested replies. Include a recommended/default option."})}),async execute(V,Q,Y,$,Z){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session. Start one with /grill <topic>."}],details:{alternatives:[]}};if(j.currentQuestion=Q.question,j.alternatives=T(Q.alternatives),j.lastChangeSummary=`Set ${j.alternatives.length} Tab alternatives`,X(),Z)z(Z);return{content:[{type:"text",text:`Tab alternatives updated: ${j.alternatives.map((W)=>W.label).join(", ")}`}],details:{question:j.currentQuestion,alternatives:j.alternatives}}},renderCall(V,Q){return new k(Q.fg("toolTitle",Q.bold("grill_set_alternatives "))+Q.fg("muted",V.question??""),0,0)},renderResult(V,Q,Y){let $=V.details?.alternatives??[],Z=$.length?`✓ Tab alternatives: ${$.map((W)=>W.label).join(" | ")}`:"No alternatives set";return new k(Y.fg($.length?"success":"warning",Z),0,0)}}),J.registerTool({name:"grill_enter_output_selection_phase",label:"Enter Grill Output Selection",description:`Enter the mandatory hardcoded output-selection phase at the end of the Grill Me interview before stopping or producing outputs. The phase must explicitly mention available output destinations: ${f()}.`,promptSnippet:"Start the mandatory Grill Me output-selection phase",promptGuidelines:["Use grill_enter_output_selection_phase after the final checkpoint update when the Grill Me interview is ready to end.","Do not stop a Grill Me interview, claim the work is complete, or enter output production until grill_enter_output_selection_phase has been called and the user has selected what happens next.",`In the output-selection chat response, explicitly list these output destination options before asking for a choice: ${f()}.`],parameters:H.Object({readinessRationale:H.String({description:"Why shared understanding is sufficient to leave interview mode."}),recommendedOutputs:H.String({description:`One or more recommended output destinations/formats from the explicit catalog (${f()}), or 'none' if no artifact is recommended.`}),recommendedStrategy:H.String({description:"Recommended output strategy, distinct from destination/format."}),question:H.String({description:"The explicit output-selection question to ask the user. It should name concrete output options rather than saying only 'outputs'."}),alternatives:H.Array(H.Object({value:H.String({description:"The exact reply inserted into the user's editor when selected."}),label:H.String({description:"Short visible label for the alternative."}),description:H.Optional(H.String({description:"Brief explanation or recommendation note."}))}),{description:"2-5 choices covering produce output(s), continue grilling, review checkpoint, or stop with no output as appropriate."})}),async execute(V,Q,Y,$,Z){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session. Start one with /grill <topic>."}],details:{phase:A(j)}};if(j.phase="output-selection",j.outputPhase=!1,j.outputSelection={readinessRationale:Q.readinessRationale,recommendedOutputs:Q.recommendedOutputs,recommendedStrategy:Q.recommendedStrategy,question:Q.question},j.approvedOutputPlan=void 0,j.currentQuestion=Q.question,j.alternatives=T(Q.alternatives),j.lastChangeSummary="Entered mandatory output-selection phase",X(),Z)z(Z);return{content:[{type:"text",text:`Output-selection phase is active. In the chat response, explicitly show these output destination options:
104
+ Grill Me uses one thorough default Socratic style. The assistant must use the hardcoded output-selection phase before ending the interview, producing outputs, or stopping without outputs.`,display:!0});return}if($==="stop"){j.active=!1,j.phase="interview",j.outputPhase=!1,j.outputSelection=void 0,j.approvedOutputPlan=void 0,j.currentQuestion=void 0,j.alternatives=[],j.lastChangeSummary="Stopped grill session",X(),z(Q),Q.ui.notify("Grill mode stopped.","info");return}if($==="status"){J.sendMessage({customType:"grill-me-status",content:jj(j),display:!0});return}if($==="checkpoint"){await q(Q,Z);return}if($==="intent"){let D=x(Z);if(!D){Q.ui.notify(`Usage: /grill intent ${p.join("|")}`,"warning");return}j.intent=D,j.lastChangeSummary=`Intent set to ${D}`,X(),z(Q),Q.ui.notify(`Grill intent: ${D}`,"info");return}if($==="output"){if(!Z){Q.ui.notify("Usage: /grill output <one or more outputs, e.g. design-doc,issues>","warning");return}j.outputPreference=Z,j.lastChangeSummary=`Output preference set to ${Z}`,X(),z(Q),Q.ui.notify(`Grill output preference: ${Z}. This is not approval; Grill Me will still ask/confirm before producing outputs.`,"info");return}if($==="research"){let D=u(Z);if(!D){Q.ui.notify(`Usage: /grill research ${l.join("|")}`,"warning");return}j.researchMode=D,j.lastChangeSummary=`Research mode set to ${D}`,X(),z(Q),Q.ui.notify(`Grill research mode: ${D}`,"info");return}let W=Xj(Y),R={},B=x(W.flags.intent),w=u(W.flags.research);if(B)R.intent=B;if(w)R.researchMode=w;if(typeof W.flags.output==="string")R.outputPreference=W.flags.output;let G=W.rest;if(!G){let D=h(Q);if(!Q.hasUI)G=D||"Current conversation";else{let L=await Q.ui.editor("What should I grill you about?",D||"");if(!L?.trim()){Q.ui.notify("Cancelled grill start.","info");return}G=L.trim()}}F(G,Q,R)}}),J.registerCommand("deep-interview",{description:"Start a DM Deep Interview session",handler:async(V,Q)=>{let Y=V.trim()||h(Q)||"Current conversation";F(Y,Q,{researchMode:"auto"},"DM Deep Interview")}}),J.registerTool({name:"grill_update_checkpoint",label:"Update Grill Checkpoint",description:"Replace the Grill Me shared-understanding checkpoint. Use before asking the next grill question whenever meaningful understanding changes.",promptSnippet:"Persist the evolving Grill Me shared-understanding Markdown checkpoint",promptGuidelines:["Use grill_update_checkpoint before asking the next question whenever an active Grill Me session reaches a meaningful new decision, clarification, assumption, risk, or open question.","Maintain a clarity ledger for intent, outcome, scope, constraints, evidence, success criteria, decisions, and risks; use it to choose the next high-leverage question.","Route missing repo/docs facts to read-only inspection when available, and ask the user for judgments, priorities, tradeoffs, risk tolerance, taste, and decision boundaries.","Before closing the interview, run a light pressure pass over assumptions, counterexamples, failure modes, and unresolved branches."],parameters:H.Object({markdown:H.String({description:"The full replacement Markdown checkpoint."}),changeSummary:H.String({description:"Brief visible summary of what changed."})}),async execute(V,Q){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session. Start one with /grill <topic>."}],details:{checkpoint:j.checkpoint,changeSummary:"No active session",updatedAt:j.updatedAt}};return j.checkpoint=Q.markdown,j.lastChangeSummary=Q.changeSummary,X(),{content:[{type:"text",text:`Recorded checkpoint update: ${Q.changeSummary}`}],details:{checkpoint:j.checkpoint,changeSummary:Q.changeSummary,updatedAt:j.updatedAt}}},renderCall(V,Q){return new k(Q.fg("toolTitle",Q.bold("grill_update_checkpoint "))+Q.fg("muted",V.changeSummary??""),0,0)},renderResult(V,Q,Y){let $=V.details?.changeSummary,Z=$?`✓ ${$}`:V.content[0]?.type==="text"?V.content[0].text:"Checkpoint updated";return new k(Y.fg("success",Z),0,0)}}),J.registerTool({name:"grill_set_alternatives",label:"Set Grill Alternatives",description:"Set the visible Grill Me answer alternatives offered to the user via Tab autocomplete for the next question or readiness choice.",promptSnippet:"Present answer alternatives through the Grill Me Tab autocomplete UX",promptGuidelines:["Before asking each grill question, call grill_set_alternatives with 2-5 concise, concrete alternatives the user can accept or edit with Tab autocomplete.","Include one recommended alternative and make it clear in the label or description.","Use alternatives that are useful defaults, not exhaustive menus; the user can still type a custom answer."],parameters:H.Object({question:H.String({description:"The question these alternatives answer."}),alternatives:H.Array(H.Object({value:H.String({description:"The exact reply inserted into the user's editor when selected."}),label:H.String({description:"Short visible label for the alternative."}),description:H.Optional(H.String({description:"Brief explanation or recommendation note."}))}),{description:"2-5 suggested replies. Include a recommended/default option."})}),async execute(V,Q,Y,$,Z){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session. Start one with /grill <topic>."}],details:{alternatives:[]}};if(j.currentQuestion=Q.question,j.alternatives=T(Q.alternatives),j.lastChangeSummary=`Set ${j.alternatives.length} Tab alternatives`,X(),Z)z(Z);return{content:[{type:"text",text:`Tab alternatives updated: ${j.alternatives.map((W)=>W.label).join(", ")}`}],details:{question:j.currentQuestion,alternatives:j.alternatives}}},renderCall(V,Q){return new k(Q.fg("toolTitle",Q.bold("grill_set_alternatives "))+Q.fg("muted",V.question??""),0,0)},renderResult(V,Q,Y){let $=V.details?.alternatives??[],Z=$.length?`✓ Tab alternatives: ${$.map((W)=>W.label).join(" | ")}`:"No alternatives set";return new k(Y.fg($.length?"success":"warning",Z),0,0)}}),J.registerTool({name:"grill_enter_output_selection_phase",label:"Enter Grill Output Selection",description:`Enter the mandatory hardcoded output-selection phase at the end of the Grill Me interview before stopping or producing outputs. The phase must explicitly mention available output destinations: ${f()}.`,promptSnippet:"Start the mandatory Grill Me output-selection phase",promptGuidelines:["Use grill_enter_output_selection_phase after the final checkpoint update when the Grill Me interview is ready to end.","Do not stop a Grill Me interview, claim the work is complete, or enter output production until grill_enter_output_selection_phase has been called and the user has selected what happens next.",`In the output-selection chat response, explicitly list these output destination options before asking for a choice: ${f()}.`],parameters:H.Object({readinessRationale:H.String({description:"Why shared understanding is sufficient to leave interview mode."}),recommendedOutputs:H.String({description:`One or more recommended output destinations/formats from the explicit catalog (${f()}), or 'none' if no artifact is recommended.`}),recommendedStrategy:H.String({description:"Recommended output strategy, distinct from destination/format."}),question:H.String({description:"The explicit output-selection question to ask the user. It should name concrete output options rather than saying only 'outputs'."}),alternatives:H.Array(H.Object({value:H.String({description:"The exact reply inserted into the user's editor when selected."}),label:H.String({description:"Short visible label for the alternative."}),description:H.Optional(H.String({description:"Brief explanation or recommendation note."}))}),{description:"2-5 choices covering produce output(s), continue grilling, review checkpoint, or stop with no output as appropriate."})}),async execute(V,Q,Y,$,Z){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session. Start one with /grill <topic>."}],details:{phase:A(j)}};if(j.phase="output-selection",j.outputPhase=!1,j.outputSelection={readinessRationale:Q.readinessRationale,recommendedOutputs:Q.recommendedOutputs,recommendedStrategy:Q.recommendedStrategy,question:Q.question},j.approvedOutputPlan=void 0,j.currentQuestion=Q.question,j.alternatives=T(Q.alternatives),j.lastChangeSummary="Entered mandatory output-selection phase",X(),Z)z(Z);return{content:[{type:"text",text:`Output-selection phase is active. In the chat response, explicitly show these output destination options:
105
105
  ${O()}
106
106
 
107
107
  Then ask the user to choose one or more, customize the set, continue grilling, review the checkpoint, or stop without output. Alternatives: ${j.alternatives.map((W)=>W.label).join(", ")}`}],details:{phase:A(j),outputSelection:j.outputSelection,outputDestinationOptions:g,alternatives:j.alternatives}}},renderCall(V,Q){return new k(Q.fg("toolTitle",Q.bold("grill_enter_output_selection_phase "))+Q.fg("muted",V.question??""),0,0)},renderResult(V,Q,Y){let $=V.details?.outputSelection,Z=$?`✓ Output selection: ${$.recommendedOutputs}`:V.content[0]?.type==="text"?V.content[0].text:"Output selection phase updated";return new k(Y.fg($?"success":"warning",Z),0,0)}}),J.registerTool({name:"grill_finish_output_selection_phase",label:"Finish Grill Output Selection",description:"Resolve the mandatory output-selection phase without entering output production, either by continuing the interview or stopping with no outputs.",promptSnippet:"Resolve Grill Me output selection without output production",promptGuidelines:["Use grill_finish_output_selection_phase when the user responds to the mandatory output-selection phase by choosing to continue grilling or stop without producing outputs.","If the user approves concrete output production, use grill_enter_output_phase instead."],parameters:H.Object({outcome:H.String({description:"Either 'continue-grilling' or 'stop-without-output'."}),summary:H.Optional(H.String({description:"Brief summary of the user's output-selection decision."}))}),async execute(V,Q,Y,$,Z){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session."}],details:{phase:A(j),active:j.active}};if(A(j)!=="output-selection")return{content:[{type:"text",text:"No active output-selection phase. Call grill_enter_output_selection_phase before resolving output selection."}],details:{phase:A(j),active:j.active}};let W=String(Q.outcome??"").trim().toLowerCase();if(W==="continue-grilling"||W==="continue"||W==="grill"){if(j.phase="interview",j.outputPhase=!1,j.outputSelection=void 0,j.currentQuestion=void 0,j.alternatives=[],j.lastChangeSummary=Q.summary?`Output selection resolved: ${Q.summary}`:"Output selection resolved: continue grilling",X(),Z)z(Z);return{content:[{type:"text",text:"Returned to Grill Me interview mode. Ask the next Socratic question with grill_set_alternatives."}],details:{phase:A(j),active:j.active,outcome:W}}}if(W==="stop-without-output"||W==="stop"||W==="no-output"||W==="none"){if(j.active=!1,j.phase="interview",j.outputPhase=!1,j.outputSelection=void 0,j.approvedOutputPlan=void 0,j.currentQuestion=void 0,j.alternatives=[],j.lastChangeSummary=Q.summary?`Stopped after output selection: ${Q.summary}`:"Stopped after output selection without outputs",X(),Z)z(Z);return{content:[{type:"text",text:j.lastChangeSummary}],details:{phase:A(j),active:j.active,outcome:W}}}return{content:[{type:"text",text:"Unsupported outcome. Use 'continue-grilling' or 'stop-without-output'. If outputs were approved, call grill_enter_output_phase instead."}],details:{phase:A(j),active:j.active,outcome:W}}}}),J.registerTool({name:"grill_enter_output_phase",label:"Enter Grill Output Phase",description:"Mark that the user approved output production after mandatory output selection, allowing the assistant to use tools required to create the approved artifacts.",promptSnippet:"Enter approved Grill Me output-production phase",promptGuidelines:["Use grill_enter_output_phase only after grill_enter_output_selection_phase has run and the user explicitly approves a concrete output plan or preview during an active Grill Me session.","During output phase, do not refuse approved mutating output work merely because it mutates state, such as creating GitHub issues. If a tool, CLI, platform, or DM permission/authentication gate blocks the mutation, stop and ask the user for the needed permission, confirmation, credentials, or plan change; do not bypass it or broaden scope.",b],parameters:H.Object({outputPlan:H.String({description:"The approved output plan, including one or more outputs/artifacts/files/issues and intended tool use."})}),async execute(V,Q,Y,$,Z){if(!j.active)return{content:[{type:"text",text:"No active Grill Me session."}],details:{phase:A(j),outputPhase:!1,outputPlan:Q.outputPlan}};if(A(j)!=="output-selection"&&!j.outputPhase)return{content:[{type:"text",text:"Output production requires the mandatory output-selection phase first. Call grill_enter_output_selection_phase, ask the user to choose/approve outputs, then call grill_enter_output_phase."}],details:{phase:A(j),outputPhase:!1,outputPlan:Q.outputPlan}};if(j.phase="output",j.outputPhase=!0,j.approvedOutputPlan=Q.outputPlan,j.lastChangeSummary="Entered approved output phase",X(),Z)z(Z);return{content:[{type:"text",text:`Output phase enabled for approved plan:
108
108
  ${Q.outputPlan}
109
109
 
110
110
  ${b}`}],details:{phase:A(j),outputPhase:!0,outputPlan:Q.outputPlan}}}}),J.registerTool({name:"grill_finish_output_phase",label:"Finish Grill Output Phase",description:"Return an active Grill Me session to read-only interview/planning enforcement after output production.",promptSnippet:"Return Grill Me to read-only interview mode after output production",parameters:H.Object({summary:H.Optional(H.String({description:"Brief summary of outputs created."}))}),async execute(V,Q,Y,$,Z){if(j.phase="interview",j.outputPhase=!1,j.outputSelection=void 0,j.approvedOutputPlan=void 0,j.lastChangeSummary=Q.summary?`Finished output phase: ${Q.summary}`:"Finished output phase",X(),Z)z(Z);return{content:[{type:"text",text:j.lastChangeSummary}],details:{phase:A(j),outputPhase:!1,summary:Q.summary}}}}),J.on("tool_call",async(V)=>{if(!j.active||j.outputPhase)return;if(V.toolName==="edit"||V.toolName==="write")return{block:!0,reason:"Grill Me is read-only until the mandatory output-selection phase runs and the user approves a concrete output plan. Call grill_enter_output_selection_phase first, then grill_enter_output_phase before writing artifacts."};if(V.toolName==="bash"){let Q=String(V.input?.command??"");if(!Yj(Q))return{block:!0,reason:`Grill Me read-only mode blocked a potentially mutating command. Run the mandatory output-selection phase with grill_enter_output_selection_phase, get output approval, then call grill_enter_output_phase first.
111
- Command: ${Q}`}}}),J.on("before_agent_start",async(V)=>{if(!j.active)return;let Q=["Use one thorough default style throughout the interview.","Be relentlessly curious but collaborative: challenge vague answers, surface contradictions, and test assumptions without changing persona.","Ask enough follow-up questions to resolve the decision tree. Prefer one more high-value question over premature readiness.","Maintain a coverage checklist and decision-branch ledger in the checkpoint; mark branches resolved, deferred, or still open as understanding evolves.","Maintain a clarity ledger for intent, outcome, scope, constraints, evidence, success criteria, decisions, and risks; use it to choose the next high-leverage question.","Route missing repo/docs facts to read-only inspection when available, and ask the user for judgments, priorities, tradeoffs, risk tolerance, taste, and decision boundaries.","Before closing the interview, run a light pressure pass over assumptions, counterexamples, failure modes, and unresolved branches.","Walk dependent branches one at a time. If an answer changes upstream assumptions, revisit affected downstream decisions before moving on.","Do not enter output selection until major objective, scope, constraints, dependencies, risks, validation, and output branches are resolved or explicitly deferred."].join(`
111
+ Command: ${Q}`}}}),J.on("before_agent_start",async(V)=>{if(!j.active)return;let Q=["Use one thorough default style throughout the interview.","Be relentlessly curious but collaborative: challenge vague answers, surface contradictions, and test assumptions without changing persona.","Ask enough follow-up questions to resolve the decision tree. Prefer one more high-value question over premature readiness.","Maintain a coverage checklist and decision-branch ledger in the checkpoint; mark branches resolved, deferred, or still open as understanding evolves.","Walk dependent branches one at a time. If an answer changes upstream assumptions, revisit affected downstream decisions before moving on.","Do not enter output selection until major objective, scope, constraints, dependencies, risks, validation, and output branches are resolved or explicitly deferred."].join(`
112
112
  - `),Y={off:"Do not proactively inspect files or research. Ask the user instead unless they explicitly provide context.",ask:"If a question could be answered by inspecting files/code/research, ask permission before doing so.",auto:"For coding/project contexts, if a question can be answered by inspecting available files/code, inspect instead of asking. Use read-only tools during interview mode."},$=A(j),Z=$==="output"?`Approved output phase: produce only the approved outputs. If a required mutation is blocked by permissions, auth, or repo setup, ask the user instead of bypassing or faking success. ${b} When done, call grill_finish_output_phase.`:$==="output-selection"?"You are in the mandatory output-selection phase. Do not ask new interview questions unless the user chooses to continue grilling. Ask the user to choose outputs/continue/review/stop from the active output-selection alternatives. If they approve concrete output production, call grill_enter_output_phase. If they choose to continue or stop without output, call grill_finish_output_selection_phase.":"You are in read-only interview mode. Do not implement, write files, create issues, install packages, run mutating commands, or stop the Grill Me work. When ready to end the interview, first update the checkpoint if needed, then call grill_enter_output_selection_phase to enter the mandatory hardcoded output-selection phase before output production or stopping.",W=j.outputSelection?`
113
113
 
114
114
  Active output selection:
@@ -15,13 +15,6 @@
15
15
  "planning",
16
16
  "socratic"
17
17
  ],
18
- "files": [
19
- "index.ts",
20
- "README.md",
21
- "DESIGN.md",
22
- "LICENSE",
23
- "tsconfig.json"
24
- ],
25
18
  "dm": {
26
19
  "extensions": [
27
20
  "./index.js"
@@ -3,14 +3,6 @@
3
3
  "version": "0.1.0",
4
4
  "description": "Dedicated imagen.py-based image generation extension for DM using active Ultradex/Codex accounts",
5
5
  "type": "module",
6
- "files": [
7
- "index.js",
8
- "src/",
9
- "vendor/",
10
- "skills/",
11
- "README.md",
12
- "test/"
13
- ],
14
6
  "keywords": [
15
7
  "duckmind",
16
8
  "dm",