makecoder-c-bin-win-x64 5.0.21 → 5.0.23

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 (80) hide show
  1. package/dist/win32-x64/README-0dd89854.md.zst +0 -0
  2. package/dist/win32-x64/README-5c323083.md.zst +0 -0
  3. package/dist/win32-x64/README-6c6581c4.md.zst +0 -0
  4. package/dist/win32-x64/README-855767df.md.zst +0 -0
  5. package/dist/win32-x64/README-b64d803b.md.zst +0 -0
  6. package/dist/win32-x64/{README-7qvwkvrv.md → README-np7rgj5p.md} +4 -3
  7. package/dist/win32-x64/{README-30faskmk.md → README-zxp6jh6w.md} +5 -4
  8. package/dist/win32-x64/SCHEMA-941f8839.md.zst +0 -0
  9. package/dist/win32-x64/SKILL-2caf8bec.md.zst +0 -0
  10. package/dist/win32-x64/SKILL-af503b63.md.zst +0 -0
  11. package/dist/win32-x64/SKILL-f1be9d20.md.zst +0 -0
  12. package/dist/win32-x64/build-eval-6e5c47ac.md.zst +0 -0
  13. package/dist/win32-x64/causes-1ad72f34.md.zst +0 -0
  14. package/dist/win32-x64/cc-cell-segmenter-shim.js +172 -0
  15. package/dist/win32-x64/cc-runtime.json +7 -9
  16. package/dist/win32-x64/cc.js +4 -20650
  17. package/dist/win32-x64/claude-code.d.ts-c417f0db.txt.zst +0 -0
  18. package/dist/win32-x64/cost-optimization-c264eeaf.md.zst +0 -0
  19. package/dist/win32-x64/error-codes-7b23548b.md.zst +0 -0
  20. package/dist/win32-x64/eval-hillclimb-550c7e7d.md.zst +0 -0
  21. package/dist/win32-x64/examples-688bfcda.md.zst +0 -0
  22. package/dist/win32-x64/kit-modules.js-2f2fb0e9.txt.zst +0 -0
  23. package/dist/win32-x64/managed-agents-api-reference-9ddcd923.md.zst +0 -0
  24. package/dist/win32-x64/managed-agents-events-6cfafc52.md.zst +0 -0
  25. package/dist/win32-x64/managed-agents-multiagent-2764d8d2.md.zst +0 -0
  26. package/dist/win32-x64/model-migration-10795ea2.md.zst +0 -0
  27. package/dist/win32-x64/models-31cc5a0b.md.zst +0 -0
  28. package/dist/win32-x64/platform-availability-f5b4883f.md.zst +0 -0
  29. package/dist/win32-x64/preserved-thinking-migration-c0ec355d.md.zst +0 -0
  30. package/dist/win32-x64/prompt-audit-ac006f8d.md.zst +0 -0
  31. package/dist/win32-x64/prompt-caching-a0dab962.md.zst +0 -0
  32. package/dist/win32-x64/reference-7675843e.md.zst +0 -0
  33. package/dist/win32-x64/sdk-upgrade-fbb98867.md.zst +0 -0
  34. package/dist/win32-x64/src/plugins/functionHooks/hooks-worker/hooks-worker.js +2 -2
  35. package/dist/win32-x64/streaming-d5e3e0d3.md.zst +0 -0
  36. package/dist/win32-x64/streaming-f9fd65d0.md.zst +0 -0
  37. package/dist/win32-x64/template.html-80565be8.txt.zst +0 -0
  38. package/dist/win32-x64/tool-use-cb3780ea.md.zst +0 -0
  39. package/dist/win32-x64/tool-use-concepts-e27a6e66.md.zst +0 -0
  40. package/dist/win32-x64/tool-use-e666014c.md.zst +0 -0
  41. package/package.json +2 -2
  42. package/dist/win32-x64/README-1adba0d5.md.zst +0 -0
  43. package/dist/win32-x64/README-1f2a0xpy.md +0 -189
  44. package/dist/win32-x64/README-4543fbfe.md.zst +0 -0
  45. package/dist/win32-x64/README-92b24d43.md.zst +0 -0
  46. package/dist/win32-x64/README-de1712b4.md.zst +0 -0
  47. package/dist/win32-x64/SCHEMA-80d41355.md.zst +0 -0
  48. package/dist/win32-x64/SKILL-236405d8.md.zst +0 -0
  49. package/dist/win32-x64/SKILL-4y8qrz28.md +0 -46
  50. package/dist/win32-x64/SKILL-8cc0kwr3.md +0 -39
  51. package/dist/win32-x64/SKILL-8cfe9276.md.zst +0 -0
  52. package/dist/win32-x64/SKILL-ddae9619.md.zst +0 -0
  53. package/dist/win32-x64/build-eval-61524bd7.md.zst +0 -0
  54. package/dist/win32-x64/causes-0ecc624a.md.zst +0 -0
  55. package/dist/win32-x64/claude-code.d.ts-8ef3f324.txt.zst +0 -0
  56. package/dist/win32-x64/cost-optimization-be31affb.md.zst +0 -0
  57. package/dist/win32-x64/error-codes-8c86764e.md.zst +0 -0
  58. package/dist/win32-x64/eval-hillclimb-a60c233b.md.zst +0 -0
  59. package/dist/win32-x64/examples-de855a6e.md.zst +0 -0
  60. package/dist/win32-x64/kit-modules.js-fb86f7cc.txt.zst +0 -0
  61. package/dist/win32-x64/managed-agents-api-reference-224d46c3.md.zst +0 -0
  62. package/dist/win32-x64/managed-agents-events-9d0c0001.md.zst +0 -0
  63. package/dist/win32-x64/managed-agents-multiagent-e4608060.md.zst +0 -0
  64. package/dist/win32-x64/model-migration-0afe82a9.md.zst +0 -0
  65. package/dist/win32-x64/models-7ff954b0.md.zst +0 -0
  66. package/dist/win32-x64/payload.template.html.asset +0 -0
  67. package/dist/win32-x64/platform-availability-689576e2.md.zst +0 -0
  68. package/dist/win32-x64/preserved-thinking-migration-8e8eab6d.md.zst +0 -0
  69. package/dist/win32-x64/prompt-audit-c2ef092d.md.zst +0 -0
  70. package/dist/win32-x64/prompt-caching-686b210d.md.zst +0 -0
  71. package/dist/win32-x64/reference-2ccb611f.md.zst +0 -0
  72. package/dist/win32-x64/sdk-upgrade-c0be7fcf.md.zst +0 -0
  73. package/dist/win32-x64/seed-canvas.mjs-a5d6a8af.txt.zst +0 -0
  74. package/dist/win32-x64/streaming-8f3e55cc.md.zst +0 -0
  75. package/dist/win32-x64/streaming-bfeb4a2b.md.zst +0 -0
  76. package/dist/win32-x64/template.html-0add8491.txt.zst +0 -0
  77. package/dist/win32-x64/template.html-cfc12d66.txt.zst +0 -0
  78. package/dist/win32-x64/tool-use-642f1e38.md.zst +0 -0
  79. package/dist/win32-x64/tool-use-8d92ddf6.md.zst +0 -0
  80. package/dist/win32-x64/tool-use-concepts-04417f2f.md.zst +0 -0
@@ -7,5 +7,5 @@
7
7
 
8
8
  // (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.
9
9
 
10
- // Version: 2.1.283
11
- import{ANt,LLr}from"B:/~BUN/root/chunk-n5swsemr.js";import{udn,Mw,ydn,ILr,OLr}from"B:/~BUN/root/chunk-0w5kpsps.js";import"B:/~BUN/root/chunk-gbtzpa3e.js";import{Tdt,De,qLr}from"B:/~BUN/root/chunk-5dk9zqaz.js";import"B:/~BUN/root/chunk-bvn0mpsk.js";import"B:/~BUN/root/chunk-ekrhn4q1.js";import"B:/~BUN/root/chunk-4rk7cwxz.js";import"B:/~BUN/root/chunk-dkxhwhft.js";import"B:/~BUN/root/chunk-kks4mj3w.js";import{l}from"B:/~BUN/root/chunk-bgthmgyc.js";import"B:/~BUN/root/chunk-17wqwt36.js";import"B:/~BUN/root/chunk-54p0h65d.js";import"B:/~BUN/root/chunk-ewvnv67m.js";import"B:/~BUN/root/chunk-728mwbhs.js";import"B:/~BUN/root/chunk-51n463p1.js";import"B:/~BUN/root/chunk-zs3ycjed.js";import"B:/~BUN/root/chunk-qe2zga5e.js";import"B:/~BUN/root/chunk-4p6z9qq1.js";import"B:/~BUN/root/chunk-0fnha6bz.js";import"B:/~BUN/root/chunk-y04k89s2.js";import"B:/~BUN/root/chunk-zv3zxqya.js";import"B:/~BUN/root/chunk-ah3egpyh.js";import"B:/~BUN/root/chunk-5w2ecytn.js";import"B:/~BUN/root/chunk-6j6ra85q.js";import"B:/~BUN/root/chunk-nkmmqnq7.js";import"B:/~BUN/root/chunk-zksmb712.js";import"B:/~BUN/root/chunk-zk6g628v.js";import"B:/~BUN/root/chunk-snmb1kqg.js";import"B:/~BUN/root/chunk-65064145.js";import"B:/~BUN/root/chunk-ht635kqk.js";import"B:/~BUN/root/chunk-rwwxddqq.js";import"B:/~BUN/root/chunk-y72v2pst.js";import"B:/~BUN/root/chunk-1f9marcm.js";import"B:/~BUN/root/chunk-tsjnk8ma.js";import"B:/~BUN/root/chunk-shgdrs47.js";import"B:/~BUN/root/chunk-2swveyqa.js";import"B:/~BUN/root/chunk-e7p62566.js";import"B:/~BUN/root/chunk-qqgpf856.js";import"B:/~BUN/root/chunk-zv4xh2j0.js";import"B:/~BUN/root/chunk-8hs4bwwk.js";import"B:/~BUN/root/chunk-339q6g5w.js";import"B:/~BUN/root/chunk-5px6g0cn.js";import"B:/~BUN/root/chunk-py7yqpgt.js";import"B:/~BUN/root/chunk-bpp59nyd.js";import"B:/~BUN/root/chunk-9fcn5kmc.js";import"B:/~BUN/root/chunk-290k5gh5.js";import"B:/~BUN/root/chunk-7zje4z8c.js";import"B:/~BUN/root/chunk-3rzkfay5.js";import"B:/~BUN/root/chunk-g2vddtj4.js";import"B:/~BUN/root/chunk-sd4cj2qx.js";import"B:/~BUN/root/chunk-nr0fnbpc.js";import"B:/~BUN/root/chunk-33tn3weg.js";import"B:/~BUN/root/chunk-f1dj0k6n.js";import"B:/~BUN/root/chunk-gf53qpk6.js";import"B:/~BUN/root/chunk-dv435n4g.js";import"B:/~BUN/root/chunk-jd3kqn1r.js";import"B:/~BUN/root/chunk-vpejnsp4.js";import"B:/~BUN/root/chunk-nf4z9ga7.js";import"B:/~BUN/root/chunk-bt3h0syz.js";import"B:/~BUN/root/chunk-vyq5y0zs.js";import"B:/~BUN/root/chunk-2ppgegpr.js";import"B:/~BUN/root/chunk-ceg1zct0.js";import"B:/~BUN/root/chunk-zafy1b6k.js";import"B:/~BUN/root/chunk-fszjvjk0.js";import"B:/~BUN/root/chunk-83yxmdy5.js";import"B:/~BUN/root/chunk-3hn9fzjy.js";import"B:/~BUN/root/chunk-ejjy06g8.js";import"B:/~BUN/root/chunk-2d028bdz.js";import"B:/~BUN/root/chunk-4h4gje25.js";import"B:/~BUN/root/chunk-cwzv7tgb.js";import"B:/~BUN/root/chunk-aw2zngte.js";import"B:/~BUN/root/chunk-3wnb3s8p.js";import"B:/~BUN/root/chunk-846280n0.js";import"B:/~BUN/root/chunk-dy0jx7je.js";import"B:/~BUN/root/chunk-fct6vke8.js";import"B:/~BUN/root/chunk-5kqdkjak.js";import"B:/~BUN/root/chunk-yehxgs7w.js";import"B:/~BUN/root/chunk-9xz983aj.js";import"B:/~BUN/root/chunk-58nsgxpm.js";import"B:/~BUN/root/chunk-1rjcv085.js";import"B:/~BUN/root/chunk-v4qhg3t2.js";import"B:/~BUN/root/chunk-6spmd6p4.js";import{lLr,_Vn,cLr,dLr,Vz}from"B:/~BUN/root/chunk-5emths66.js";import"B:/~BUN/root/chunk-08q5fcq1.js";import"B:/~BUN/root/chunk-p10aw0p6.js";import"B:/~BUN/root/chunk-gsxez0fk.js";import"B:/~BUN/root/chunk-73hzyafy.js";import"B:/~BUN/root/chunk-hecveget.js";import"B:/~BUN/root/chunk-erkcnv3k.js";import"B:/~BUN/root/chunk-sa6ew4xs.js";import"B:/~BUN/root/chunk-r833zsf7.js";import"B:/~BUN/root/chunk-w5bkq1td.js";import"B:/~BUN/root/chunk-t1t358ee.js";import"B:/~BUN/root/chunk-8j4yaj30.js";import"B:/~BUN/root/chunk-g1mh72ry.js";import"B:/~BUN/root/chunk-kbd7ddta.js";import"B:/~BUN/root/chunk-mjdkd2h9.js";import"B:/~BUN/root/chunk-81280fc2.js";import"B:/~BUN/root/chunk-0bx1tycm.js";import"B:/~BUN/root/chunk-tndjj29v.js";import"B:/~BUN/root/chunk-batgyebn.js";import{workerData as S}from"worker_threads";var N=(o)=>({post:(t)=>o.postMessage(t),ports:new Map,pendingNext:new Map,pendingSteps:new Map,streams:new Map,nextCounter:0,opCounter:0});function F(o,t){let r=o.opFailureOf(t);if(!r)return ILr(t);return OLr(r)}var L=(o,t)=>{process.on("unhandledRejection",(r)=>o.post({type:"unhandled",error:F(t,r)}))};var w=({pending:o,key:t,send:r,onAbort:m,signal:g,notPlainMessage:u})=>new Promise((y,k)=>{let h=()=>{};o.set(t,{resolve:(i)=>{h(),y(i)},reject:(i)=>{h(),k(i)}});try{r()}catch(i){o.delete(t),k(new De(u(i)));return}h=Mw(g,{abort:m})});var D=(o,t)=>(r,m,g)=>{let u=++o.nextCounter;return w({pending:o.pendingNext,key:`${t}:${u}`,send:()=>o.post({type:"next",id:t,nextId:u,argument:r,floors:g}),onAbort:()=>o.post({type:"next_abort",id:t,nextId:u,reason:Tdt(m)}),signal:m,notPlainMessage:(y)=>`next() argument is not plain data: ${l(y)}`})};function B(o,{environmentId:t,op:r,args:m,signal:g,dispatchId:u,registration:y,serving:k,rootEvent:h}){let i=o.ports.get(t);if(!i)return Promise.reject(new De(`${r}: the plugin's environment is unloaded`));let{port:v}=i,d=++o.opCounter;if(u!==void 0&&!ydn(r))i.owedOps.set(d,u);return w({pending:i.pendingOps,key:d,send:()=>v.postMessage({type:"op",opId:d,dispatchId:u,registration:y,serving:k,rootEvent:h,op:r,args:m}),onAbort:g?()=>v.postMessage({type:"op_abort",opId:d,reason:Tdt(g)}):()=>{},signal:g,notPlainMessage:(x)=>`${r}: arguments are not plain data: ${l(x)}`})}var U=(o,t)=>(r,m,g)=>{let u=++o.nextCounter,y=!1,k=!1,h=()=>w({pending:o.pendingSteps,key:`${t}:${u}`,send:()=>{o.post({type:"next_pull",id:t,nextId:u,...y?{}:{open:{argument:r,floors:g}}}),y=!0},onAbort:()=>o.post({type:"next_abort",id:t,nextId:u,reason:Tdt(m)}),signal:m,notPlainMessage:(i)=>`next() argument is not plain data: ${l(i)}`});return async function*(){try{while(!0){let i=await h().catch((v)=>{throw k=!0,v});if(i.done)return k=!0,i.value;yield i.value}}finally{if(y&&!k)o.post({type:"next_close",id:t,nextId:u})}}()};var q=(o,{environmentId:t,op:r,args:m,signal:g,dispatchId:u,registration:y,serving:k,rootEvent:h})=>async function*(){let i=()=>new De(`${r}: the plugin's environment is unloaded`),v=o.ports.get(t);if(!v)throw i();let{port:d,pendingOps:x,owedOps:n}=v,e=++o.opCounter,p={dispatchId:u,registration:y,serving:k,rootEvent:h,op:r,args:m},a=!1,s=!1;function c(){if(o.ports.get(t)!==v)return Promise.reject(i());if(u!==void 0)n.set(e,u);return w({pending:x,key:e,send:()=>{d.postMessage({type:"op_pull",opId:e,...a?{}:{open:p}}),a=!0},onAbort:g?()=>d.postMessage({type:"op_abort",opId:e,reason:Tdt(g)}):()=>{},signal:g,notPlainMessage:(f)=>`${r}: arguments are not plain data: ${l(f)}`})}try{while(!0){let f=await c().catch((b)=>{throw s=!0,b});if(f.done)return s=!0,f.value;yield f.value}}finally{if(a&&!s)d.postMessage({type:"op_close",opId:e})}}();function H(o,t){if(o)Atomics.store(o,_Vn,Math.max(Atomics.load(o,_Vn),t))}function R(o,t,r){let m=(t.get(r)??0)+1;if(t.set(r,m),o)Atomics.store(o,dLr,r),Atomics.store(o,cLr,m)}function W(o){for(let t of o.pendingOps.values())t.reject(new De("the plugin's environment was unloaded"));o.pendingOps.clear()}function M(o,t){if(!(typeof o==="object"&&o!==null&&(t in o)))return;let m=Object.getOwnPropertyDescriptor(o,t)?.value;return m instanceof SharedArrayBuffer?new Int32Array(m):void 0}function K(o){let t=N(o),{post:r,ports:m,pendingNext:g,pendingSteps:u,streams:y}=t,k=new Map,h=M(S,"stamp"),i=M(S,"marks"),v=new Map;ANt({log:(x,n)=>r({type:"log",text:x,level:n}),hookFailed:(x)=>r({type:"hook_failed",...x})});let d=lLr({hostOps:(x)=>B(t,x),hostStreamOps:(x)=>q(t,x),stamp:h});L(t,d),o.onmessage=(x)=>{let n=x.data;if(n.type==="ping"){r({type:"pong",n:n.n});return}switch(udn(h),n.type){case"load":{let{environmentId:e,port:p}=n,a=new Map,s=new Map;m.set(e,{port:p,pendingOps:a,owedOps:s}),p.onmessage=(c)=>{let f=c.data;if(udn(h),f.type==="flush"){p.postMessage({type:"flushed",flushId:f.flushId});return}let b=Vz(s,f.opId);if(b!==void 0)R(i,v,b);let E=Vz(a,f.opId);f.type==="op_result"?E?.resolve(f.value):E?.reject(new De(f.error))},d.load(e,n.args).then((c)=>{r({type:"loaded",environmentId:e,registered:LLr(c.registered)})},(c)=>{m.delete(e),p.close();let f=qLr(c);r({type:"load_error",environmentId:e,error:l(c),...f!==void 0&&{cause:f}})});return}case"unload":{d.unload(n.environmentId);let e=Vz(m,n.environmentId);if(e)e.port.close(),W(e);return}case"build":{let{environmentId:e}=n;try{d.build(e,n.table,n.suppressed),r({type:"built",environmentId:e})}catch(p){r({type:"built_error",environmentId:e,error:l(p)})}return}case"resolve":{let{resolveId:e,environmentId:p,requests:a}=n;Promise.resolve().then(()=>d.resolveTables(p,a)).then(()=>r({type:"resolved",resolveId:e}),(s)=>r({type:"resolve_error",resolveId:e,error:l(s)}));return}case"call":{let{callId:e,environmentId:p,call:a,callers:s}=n;Promise.resolve().then(()=>d.callInterface(p,a,{callId:e,callers:s})).then((c)=>{try{r({type:"call_result",callId:e,value:c})}catch(f){r({type:"call_error",callId:e,error:`$.${a.name}.${a.method} returned a value that is not plain data: ${l(f)}`})}},(c)=>r({type:"call_error",callId:e,error:l(c)}));return}case"dispatch":{let{id:e,event:p,payload:a,environments:s,leftOut:c,origin:f,raise:b,floors:E,cutAt:_}=n;H(i,e);let A=new AbortController;k.set(e,A),Promise.resolve().then(()=>d.dispatch({id:e,event:p,payload:a,environments:s,leftOut:c,origin:f,raise:b,floors:E,cutAt:_},D(t,e),A.signal)).then((P)=>{try{r({type:"result",id:e,...P})}catch(I){r({type:"error",id:e,error:`result not cloneable: ${l(I)}`})}},(P)=>r({type:"error",id:e,error:l(P)})).finally(()=>{k.delete(e),v.delete(e)});return}case"dispatch_stream":{let{id:e,type:p,...a}=n;H(i,e);let s=new AbortController;k.set(e,s);try{y.set(e,d.dispatchStream({id:e,...a},U(t,e),s.signal))}catch(c){k.delete(e),v.delete(e),r({type:"error",id:e,error:l(c)})}return}case"stream_pull":{let a=function(){y.delete(e),k.delete(e),v.delete(e)},{id:e}=n,p=y.get(e);if(p===void 0){r({type:"error",id:e,error:"no stream is open for this dispatch"});return}p.next().then((s)=>{if(s.done===!0)a();try{r({type:"stream_step",id:e,step:{done:s.done===!0,value:s.value}})}catch(c){a(),p.return(void 0).catch(()=>{return}),r({type:"error",id:e,error:`a chunk that is not plain data: ${l(c)}`})}},(s)=>{a(),r({type:"error",id:e,error:l(s)})});return}case"stream_close":{let e=y.get(n.id);y.delete(n.id),k.delete(n.id),e?.return(void 0).catch(()=>{return});return}case"next_step":{R(i,v,n.id),Vz(u,`${n.id}:${n.nextId}`)?.resolve(n.step);return}case"abort":k.get(n.id)?.abort(new De(n.reason));return;case"press":{let{pressId:e,environmentId:p,handle:a,e:s}=n;Promise.resolve().then(()=>d.press(p,a,s)).then(()=>r({type:"press_result",pressId:e}),(c)=>r({type:"press_error",pressId:e,error:l(c)}));return}case"press_release":d.releasePresses(n.environmentId,n.handles);return;case"next_result":case"next_error":{R(i,v,n.id);let e=`${n.id}:${n.nextId}`,p=Vz(g,e);if(n.type==="next_result")p?.resolve(n.result);else{let s=new De(n.error);p?.reject(s),Vz(u,e)?.reject(s)}return}}}}K(self);
10
+ // Version: 2.1.284
11
+ import{zHt,$$r}from"B:/~BUN/root/chunk-xs4hnpre.js";import{nfn,Kw,lfn,L$r,N$r}from"B:/~BUN/root/chunk-756jcfex.js";import"B:/~BUN/root/chunk-d8qjq2s0.js";import{Cpt,Me,Z$r}from"B:/~BUN/root/chunk-dz8vdqw8.js";import"B:/~BUN/root/chunk-ja9z9hc6.js";import"B:/~BUN/root/chunk-eef7brnt.js";import"B:/~BUN/root/chunk-06cqvqzz.js";import"B:/~BUN/root/chunk-2pz462ae.js";import"B:/~BUN/root/chunk-0jxt8d99.js";import{l}from"B:/~BUN/root/chunk-szem4cs6.js";import"B:/~BUN/root/chunk-j3rp3y9n.js";import"B:/~BUN/root/chunk-v3nv5tpx.js";import"B:/~BUN/root/chunk-mk9xswv8.js";import"B:/~BUN/root/chunk-jv1a10yb.js";import"B:/~BUN/root/chunk-7ae5hxdf.js";import"B:/~BUN/root/chunk-6yadb1fg.js";import"B:/~BUN/root/chunk-99zxssdk.js";import"B:/~BUN/root/chunk-6m8yt3aq.js";import"B:/~BUN/root/chunk-zskynmz3.js";import"B:/~BUN/root/chunk-g9a6td4x.js";import"B:/~BUN/root/chunk-skswyqxp.js";import"B:/~BUN/root/chunk-xyfaty76.js";import"B:/~BUN/root/chunk-ym6dv5va.js";import"B:/~BUN/root/chunk-2ae2md4m.js";import"B:/~BUN/root/chunk-2e62kkxt.js";import"B:/~BUN/root/chunk-vsav0xjk.js";import"B:/~BUN/root/chunk-1ypk07jj.js";import"B:/~BUN/root/chunk-tp5jxn4b.js";import"B:/~BUN/root/chunk-tycg4qxs.js";import"B:/~BUN/root/chunk-rgxje16a.js";import"B:/~BUN/root/chunk-y61aw8dd.js";import"B:/~BUN/root/chunk-7t02p9km.js";import"B:/~BUN/root/chunk-dcfqj9mk.js";import"B:/~BUN/root/chunk-n1fecbdn.js";import"B:/~BUN/root/chunk-r2cj13f1.js";import"B:/~BUN/root/chunk-cfyztc6y.js";import"B:/~BUN/root/chunk-xs34c8nv.js";import"B:/~BUN/root/chunk-mn2ycwad.js";import"B:/~BUN/root/chunk-v8qk54ym.js";import"B:/~BUN/root/chunk-k76e0mg0.js";import"B:/~BUN/root/chunk-0tsg0yc1.js";import"B:/~BUN/root/chunk-8yj6d8ym.js";import"B:/~BUN/root/chunk-7hcnckh6.js";import"B:/~BUN/root/chunk-99ada63c.js";import"B:/~BUN/root/chunk-sz0j9tcr.js";import"B:/~BUN/root/chunk-zev7m9ca.js";import"B:/~BUN/root/chunk-1qg33mjr.js";import"B:/~BUN/root/chunk-kzhypjf3.js";import"B:/~BUN/root/chunk-y8kdre39.js";import"B:/~BUN/root/chunk-yhcjeacy.js";import"B:/~BUN/root/chunk-jfve0nrc.js";import"B:/~BUN/root/chunk-mnvep32e.js";import"B:/~BUN/root/chunk-r3fwn85k.js";import"B:/~BUN/root/chunk-jx134wb4.js";import"B:/~BUN/root/chunk-x361y885.js";import"B:/~BUN/root/chunk-dhfbsptq.js";import"B:/~BUN/root/chunk-0cz26h11.js";import"B:/~BUN/root/chunk-ayfc7mn6.js";import"B:/~BUN/root/chunk-9ajrxfs0.js";import"B:/~BUN/root/chunk-bvhfxk0b.js";import"B:/~BUN/root/chunk-2frfadft.js";import"B:/~BUN/root/chunk-ey1zew30.js";import"B:/~BUN/root/chunk-xccfckrz.js";import"B:/~BUN/root/chunk-4m09pej0.js";import"B:/~BUN/root/chunk-3rw3ez25.js";import"B:/~BUN/root/chunk-cp5gfg7b.js";import"B:/~BUN/root/chunk-nptkf10a.js";import"B:/~BUN/root/chunk-1ejgr87f.js";import"B:/~BUN/root/chunk-0zf1128a.js";import"B:/~BUN/root/chunk-ma6rmvf2.js";import"B:/~BUN/root/chunk-jb1em51s.js";import"B:/~BUN/root/chunk-sd3mjy6t.js";import"B:/~BUN/root/chunk-v30nza3e.js";import"B:/~BUN/root/chunk-hjmzkr13.js";import"B:/~BUN/root/chunk-8w19ssr5.js";import"B:/~BUN/root/chunk-v2p48353.js";import"B:/~BUN/root/chunk-1cv543eb.js";import"B:/~BUN/root/chunk-dafpeb5q.js";import"B:/~BUN/root/chunk-x9ghte39.js";import"B:/~BUN/root/chunk-15jb3wpv.js";import"B:/~BUN/root/chunk-m39c654x.js";import"B:/~BUN/root/chunk-aj8vdg29.js";import"B:/~BUN/root/chunk-vnq2b6ke.js";import"B:/~BUN/root/chunk-gdh9prpz.js";import{p$r,Q4n,f$r,m$r,_2}from"B:/~BUN/root/chunk-ft7phb8j.js";import"B:/~BUN/root/chunk-ff6rbwcd.js";import"B:/~BUN/root/chunk-n51qxfq1.js";import"B:/~BUN/root/chunk-hj0nm71y.js";import"B:/~BUN/root/chunk-py76w64h.js";import"B:/~BUN/root/chunk-mt04ee9m.js";import"B:/~BUN/root/chunk-g17y3sdq.js";import"B:/~BUN/root/chunk-51bcmfwf.js";import"B:/~BUN/root/chunk-e6566eg3.js";import"B:/~BUN/root/chunk-nw1dp1nv.js";import"B:/~BUN/root/chunk-nqm4dm30.js";import"B:/~BUN/root/chunk-qddkx1yv.js";import"B:/~BUN/root/chunk-nekchy9f.js";import"B:/~BUN/root/chunk-4efjmmeg.js";import"B:/~BUN/root/chunk-36h6tdc4.js";import"B:/~BUN/root/chunk-5kwdxscn.js";import"B:/~BUN/root/chunk-6r4je9fe.js";import"B:/~BUN/root/chunk-1r52y9vj.js";import{workerData as S}from"worker_threads";var N=(o)=>({post:(t)=>o.postMessage(t),ports:new Map,pendingNext:new Map,pendingSteps:new Map,streams:new Map,nextCounter:0,opCounter:0});function F(o,t){let r=o.opFailureOf(t);if(!r)return L$r(t);return N$r(r)}var L=(o,t)=>{process.on("unhandledRejection",(r)=>o.post({type:"unhandled",error:F(t,r)}))};var w=({pending:o,key:t,send:r,onAbort:m,signal:g,notPlainMessage:u})=>new Promise((y,k)=>{let h=()=>{};o.set(t,{resolve:(i)=>{h(),y(i)},reject:(i)=>{h(),k(i)}});try{r()}catch(i){o.delete(t),k(new Me(u(i)));return}h=Kw(g,{abort:m})});var D=(o,t)=>(r,m,g)=>{let u=++o.nextCounter;return w({pending:o.pendingNext,key:`${t}:${u}`,send:()=>o.post({type:"next",id:t,nextId:u,argument:r,floors:g}),onAbort:()=>o.post({type:"next_abort",id:t,nextId:u,reason:Cpt(m)}),signal:m,notPlainMessage:(y)=>`next() argument is not plain data: ${l(y)}`})};function B(o,{environmentId:t,op:r,args:m,signal:g,dispatchId:u,registration:y,serving:k,rootEvent:h}){let i=o.ports.get(t);if(!i)return Promise.reject(new Me(`${r}: the plugin's environment is unloaded`));let{port:v}=i,d=++o.opCounter;if(u!==void 0&&!lfn(r))i.owedOps.set(d,u);return w({pending:i.pendingOps,key:d,send:()=>v.postMessage({type:"op",opId:d,dispatchId:u,registration:y,serving:k,rootEvent:h,op:r,args:m}),onAbort:g?()=>v.postMessage({type:"op_abort",opId:d,reason:Cpt(g)}):()=>{},signal:g,notPlainMessage:(x)=>`${r}: arguments are not plain data: ${l(x)}`})}var U=(o,t)=>(r,m,g)=>{let u=++o.nextCounter,y=!1,k=!1,h=()=>w({pending:o.pendingSteps,key:`${t}:${u}`,send:()=>{o.post({type:"next_pull",id:t,nextId:u,...y?{}:{open:{argument:r,floors:g}}}),y=!0},onAbort:()=>o.post({type:"next_abort",id:t,nextId:u,reason:Cpt(m)}),signal:m,notPlainMessage:(i)=>`next() argument is not plain data: ${l(i)}`});return async function*(){try{while(!0){let i=await h().catch((v)=>{throw k=!0,v});if(i.done)return k=!0,i.value;yield i.value}}finally{if(y&&!k)o.post({type:"next_close",id:t,nextId:u})}}()};var q=(o,{environmentId:t,op:r,args:m,signal:g,dispatchId:u,registration:y,serving:k,rootEvent:h})=>async function*(){let i=()=>new Me(`${r}: the plugin's environment is unloaded`),v=o.ports.get(t);if(!v)throw i();let{port:d,pendingOps:x,owedOps:n}=v,e=++o.opCounter,p={dispatchId:u,registration:y,serving:k,rootEvent:h,op:r,args:m},a=!1,s=!1;function c(){if(o.ports.get(t)!==v)return Promise.reject(i());if(u!==void 0)n.set(e,u);return w({pending:x,key:e,send:()=>{d.postMessage({type:"op_pull",opId:e,...a?{}:{open:p}}),a=!0},onAbort:g?()=>d.postMessage({type:"op_abort",opId:e,reason:Cpt(g)}):()=>{},signal:g,notPlainMessage:(f)=>`${r}: arguments are not plain data: ${l(f)}`})}try{while(!0){let f=await c().catch((b)=>{throw s=!0,b});if(f.done)return s=!0,f.value;yield f.value}}finally{if(a&&!s)d.postMessage({type:"op_close",opId:e})}}();function H(o,t){if(o)Atomics.store(o,Q4n,Math.max(Atomics.load(o,Q4n),t))}function R(o,t,r){let m=(t.get(r)??0)+1;if(t.set(r,m),o)Atomics.store(o,m$r,r),Atomics.store(o,f$r,m)}function W(o){for(let t of o.pendingOps.values())t.reject(new Me("the plugin's environment was unloaded"));o.pendingOps.clear()}function M(o,t){if(!(typeof o==="object"&&o!==null&&(t in o)))return;let m=Object.getOwnPropertyDescriptor(o,t)?.value;return m instanceof SharedArrayBuffer?new Int32Array(m):void 0}function K(o){let t=N(o),{post:r,ports:m,pendingNext:g,pendingSteps:u,streams:y}=t,k=new Map,h=M(S,"stamp"),i=M(S,"marks"),v=new Map;zHt({log:(x,n)=>r({type:"log",text:x,level:n}),hookFailed:(x)=>r({type:"hook_failed",...x})});let d=p$r({hostOps:(x)=>B(t,x),hostStreamOps:(x)=>q(t,x),stamp:h});L(t,d),o.onmessage=(x)=>{let n=x.data;if(n.type==="ping"){r({type:"pong",n:n.n});return}switch(nfn(h),n.type){case"load":{let{environmentId:e,port:p}=n,a=new Map,s=new Map;m.set(e,{port:p,pendingOps:a,owedOps:s}),p.onmessage=(c)=>{let f=c.data;if(nfn(h),f.type==="flush"){p.postMessage({type:"flushed",flushId:f.flushId});return}let b=_2(s,f.opId);if(b!==void 0)R(i,v,b);let E=_2(a,f.opId);f.type==="op_result"?E?.resolve(f.value):E?.reject(new Me(f.error))},d.load(e,n.args).then((c)=>{r({type:"loaded",environmentId:e,registered:$$r(c.registered)})},(c)=>{m.delete(e),p.close();let f=Z$r(c);r({type:"load_error",environmentId:e,error:l(c),...f!==void 0&&{cause:f}})});return}case"unload":{d.unload(n.environmentId);let e=_2(m,n.environmentId);if(e)e.port.close(),W(e);return}case"build":{let{environmentId:e}=n;try{d.build(e,n.table,n.suppressed),r({type:"built",environmentId:e})}catch(p){r({type:"built_error",environmentId:e,error:l(p)})}return}case"resolve":{let{resolveId:e,environmentId:p,requests:a}=n;Promise.resolve().then(()=>d.resolveTables(p,a)).then(()=>r({type:"resolved",resolveId:e}),(s)=>r({type:"resolve_error",resolveId:e,error:l(s)}));return}case"call":{let{callId:e,environmentId:p,call:a,callers:s}=n;Promise.resolve().then(()=>d.callInterface(p,a,{callId:e,callers:s})).then((c)=>{try{r({type:"call_result",callId:e,value:c})}catch(f){r({type:"call_error",callId:e,error:`$.${a.name}.${a.method} returned a value that is not plain data: ${l(f)}`})}},(c)=>r({type:"call_error",callId:e,error:l(c)}));return}case"dispatch":{let{id:e,event:p,payload:a,environments:s,leftOut:c,origin:f,raise:b,floors:E,cutAt:_}=n;H(i,e);let A=new AbortController;k.set(e,A),Promise.resolve().then(()=>d.dispatch({id:e,event:p,payload:a,environments:s,leftOut:c,origin:f,raise:b,floors:E,cutAt:_},D(t,e),A.signal)).then((P)=>{try{r({type:"result",id:e,...P})}catch(I){r({type:"error",id:e,error:`result not cloneable: ${l(I)}`})}},(P)=>r({type:"error",id:e,error:l(P)})).finally(()=>{k.delete(e),v.delete(e)});return}case"dispatch_stream":{let{id:e,type:p,...a}=n;H(i,e);let s=new AbortController;k.set(e,s);try{y.set(e,d.dispatchStream({id:e,...a},U(t,e),s.signal))}catch(c){k.delete(e),v.delete(e),r({type:"error",id:e,error:l(c)})}return}case"stream_pull":{let a=function(){y.delete(e),k.delete(e),v.delete(e)},{id:e}=n,p=y.get(e);if(p===void 0){r({type:"error",id:e,error:"no stream is open for this dispatch"});return}p.next().then((s)=>{if(s.done===!0)a();try{r({type:"stream_step",id:e,step:{done:s.done===!0,value:s.value}})}catch(c){a(),p.return(void 0).catch(()=>{return}),r({type:"error",id:e,error:`a chunk that is not plain data: ${l(c)}`})}},(s)=>{a(),r({type:"error",id:e,error:l(s)})});return}case"stream_close":{let e=y.get(n.id);y.delete(n.id),k.delete(n.id),e?.return(void 0).catch(()=>{return});return}case"next_step":{R(i,v,n.id),_2(u,`${n.id}:${n.nextId}`)?.resolve(n.step);return}case"abort":k.get(n.id)?.abort(new Me(n.reason));return;case"press":{let{pressId:e,environmentId:p,handle:a,e:s}=n;Promise.resolve().then(()=>d.press(p,a,s)).then(()=>r({type:"press_result",pressId:e}),(c)=>r({type:"press_error",pressId:e,error:l(c)}));return}case"press_release":d.releasePresses(n.environmentId,n.handles);return;case"next_result":case"next_error":{R(i,v,n.id);let e=`${n.id}:${n.nextId}`,p=_2(g,e);if(n.type==="next_result")p?.resolve(n.result);else{let s=new Me(n.error);p?.reject(s),_2(u,e)?.reject(s)}return}}}}K(self);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "makecoder-c-bin-win-x64",
3
- "version": "5.0.21",
4
- "description": "MakeCoder Claude patch resources for win32-x64",
3
+ "version": "5.0.23",
4
+ "description": "MakeCoder Claude public Bun resources for win32-x64",
5
5
  "os": [
6
6
  "win32"
7
7
  ],
@@ -1,189 +0,0 @@
1
- # Claude API - Go
2
-
3
- > **Note:** The Go SDK supports the Claude API and beta tool use with `BetaToolRunner`. Agent SDK is not yet available for Go.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- go get github.com/anthropics/anthropic-sdk-go
9
- ```
10
-
11
- ## Client Initialization
12
-
13
- ```go
14
- import (
15
- "github.com/anthropics/anthropic-sdk-go"
16
- "github.com/anthropics/anthropic-sdk-go/option"
17
- )
18
-
19
- // Default (uses ANTHROPIC_API_KEY env var)
20
- client := anthropic.NewClient()
21
-
22
- // Explicit API key
23
- client := anthropic.NewClient(
24
- option.WithAPIKey("your-api-key"),
25
- )
26
- ```
27
-
28
- ---
29
-
30
- ## Model IDs
31
-
32
- `anthropic.Model` is an alias for `string`, so pass the model as its plain id: `Model: "{{OPUS_ID}}"`. Default to {{OPUS_NAME}} unless the user specifies otherwise; if they ask for Fable or the most powerful model, use `"{{FABLE_ID}}"`; if they ask for a cheaper tier, use the current generation - `"{{SONNET_ID}}"` or `"{{HAIKU_ID}}"` (see `shared/models.md` for the full resolution table).
33
-
34
- The SDK also ships typed `anthropic.ModelClaude*` constants, but they lag model launches - a given SDK release may have constants only for previous-generation models. Do not pick a model because it has a typed constant; the string id works for every model on every SDK version. Check the SDK release notes before assuming a typed constant exists for a current model.
35
-
36
- ---
37
-
38
- ## Basic Message Request
39
-
40
- ```go
41
- response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
42
- Model: "{{OPUS_ID}}",
43
- MaxTokens: 16000,
44
- Messages: []anthropic.MessageParam{
45
- anthropic.NewUserMessage(anthropic.NewTextBlock("What is the capital of France?")),
46
- },
47
- })
48
- if err != nil {
49
- log.Fatal(err)
50
- }
51
- for _, block := range response.Content {
52
- switch variant := block.AsAny().(type) {
53
- case anthropic.TextBlock:
54
- fmt.Println(variant.Text)
55
- }
56
- }
57
- ```
58
-
59
- ---
60
-
61
- ## Thinking
62
-
63
- Enable Claude's internal reasoning by setting `Thinking` in `MessageNewParams`. The response will contain `ThinkingBlock` content before the final `TextBlock`.
64
-
65
- **Adaptive thinking is the recommended mode for Claude 4.6+ models.** Claude decides dynamically when and how much to think. Combine with the `effort` parameter for cost-quality control.
66
-
67
- Derived from `anthropic-sdk-go/message.go` (`ThinkingConfigParamUnion`, `ThinkingConfigAdaptiveParam`).
68
-
69
- ```go
70
- // There is no ThinkingConfigParamOfAdaptive helper - construct the union
71
- // struct-literal directly and take the address of the variant.
72
- // display opt-in: default is omitted (empty thinking text) on Fable 5/5.1, Mythos 5/5.1, {{OPUS_NAME}}, Opus 4.8/4.7, and {{SONNET_NAME}}
73
- adaptive := anthropic.ThinkingConfigAdaptiveParam{Display: anthropic.ThinkingConfigAdaptiveDisplaySummarized}
74
- params := anthropic.MessageNewParams{
75
- Model: "{{OPUS_ID}}",
76
- MaxTokens: 16000,
77
- Thinking: anthropic.ThinkingConfigParamUnion{OfAdaptive: &adaptive},
78
- Messages: []anthropic.MessageParam{
79
- anthropic.NewUserMessage(anthropic.NewTextBlock("How many r's in strawberry?")),
80
- },
81
- }
82
-
83
- resp, err := client.Messages.New(context.Background(), params)
84
- if err != nil {
85
- log.Fatal(err)
86
- }
87
-
88
- // ThinkingBlock(s) precede TextBlock in content
89
- for _, block := range resp.Content {
90
- switch b := block.AsAny().(type) {
91
- case anthropic.ThinkingBlock:
92
- fmt.Println("[thinking]", b.Thinking)
93
- case anthropic.TextBlock:
94
- fmt.Println(b.Text)
95
- }
96
- }
97
- ```
98
-
99
- > **Fable 5, {{OPUS_NAME}}, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking (above). `ThinkingConfigParamOfEnabled(budgetTokens)` is removed on Fable 5, {{OPUS_NAME}}, Opus 4.8, and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
100
- > **{{OPUS_NAME}}:** thinking is on by default - leaving `Thinking` unset runs adaptive (the adaptive union is equivalent), unlike Opus 4.8/4.7 where leaving it unset meant no thinking.
101
- > **Older models:** Use `anthropic.ThinkingConfigParamOfEnabled(N)` (budget must be < `MaxTokens`, min 1024).
102
-
103
- To disable: `anthropic.ThinkingConfigParamUnion{OfDisabled: &anthropic.ThinkingConfigDisabledParam{}}`. On {{OPUS_NAME}} that is accepted only at effort `high` or lower - pairing it with `xhigh`/`max` returns a 400.
104
-
105
- ---
106
-
107
- ## Prompt Caching
108
-
109
- `System` is `[]TextBlockParam`; set `CacheControl` on the last block to cache tools + system together. For placement patterns and the silent-invalidator audit checklist, see `shared/prompt-caching.md`.
110
-
111
- ```go
112
- System: []anthropic.TextBlockParam{{
113
- Text: longSystemPrompt,
114
- CacheControl: anthropic.NewCacheControlEphemeralParam(), // default 5m TTL
115
- }},
116
- ```
117
-
118
- For 1-hour TTL: `anthropic.CacheControlEphemeralParam{TTL: anthropic.CacheControlEphemeralTTLTTL1h}`. There's also a top-level `CacheControl` on `MessageNewParams` that auto-places on the last cacheable block.
119
-
120
- Verify hits via `resp.Usage.CacheCreationInputTokens` / `resp.Usage.CacheReadInputTokens`.
121
-
122
- ---
123
-
124
- ## Stop Details
125
-
126
- When `StopReason` is `anthropic.StopReasonRefusal`, the response includes structured `StopDetails`:
127
-
128
- ```go
129
- if resp.StopReason == anthropic.StopReasonRefusal {
130
- fmt.Println("Category:", resp.StopDetails.Category) // e.g. "cyber", "bio", "reasoning_extraction", "frontier_llm", or "" - see docs for the full set
131
- fmt.Println("Explanation:", resp.StopDetails.Explanation)
132
- }
133
- ```
134
-
135
- **Refusal fallbacks ({{FABLE_NAME}}) - opt in by default.** Fallbacks are opt-in: without them a refused request simply stops. In `{{FABLE_ID}}` code, include `Fallbacks: []anthropic.BetaFallbackParam{{Model: "{{PREV_OPUS_ID}}"}}` plus the `anthropic.AnthropicBetaServerSideFallback2026_06_01` beta on `client.Beta.Messages.New` by default - a policy decline is re-served by the fallback model inside the same call. Not available on Amazon Bedrock, Vertex AI, or Microsoft Foundry - register the client-side middleware there: `option.WithMiddleware(betafallback.BetaRefusalFallbackMiddleware(...))` from `lib/betafallback`, with per-conversation state via `betafallback.WithBetaFallbackState(&betafallback.BetaFallbackState{})`. Full semantics (billing, sticky routing, streaming) and a runnable example: `shared/model-migration.md` -> Migrating to {{FABLE_NAME}} -> `refusal` stop reason, and the Go SDK repo's `examples/` (WebFetch via `shared/live-sources.md`).
136
-
137
- ---
138
-
139
- ## PDF / Document Input
140
-
141
- `NewDocumentBlock` generic helper accepts any source type. `MediaType`/`Type` are auto-set.
142
-
143
- ```go
144
- b64 := base64.StdEncoding.EncodeToString(pdfBytes)
145
-
146
- msg := anthropic.NewUserMessage(
147
- anthropic.NewDocumentBlock(anthropic.Base64PDFSourceParam{Data: b64}),
148
- anthropic.NewTextBlock("Summarize this document"),
149
- )
150
- ```
151
-
152
- Other sources: `URLPDFSourceParam{URL: "https://..."}`, `PlainTextSourceParam{Data: "..."}`.
153
-
154
- ---
155
-
156
- ## Context Editing / Compaction (Beta)
157
-
158
- Use `Beta.Messages.New` with `ContextManagement` on `BetaMessageNewParams`. There is no `NewBetaAssistantMessage` - use `.ToParam()` for the round-trip.
159
-
160
- ```go
161
- params := anthropic.BetaMessageNewParams{
162
- Model: "{{OPUS_ID}}",
163
- MaxTokens: 16000,
164
- Betas: []anthropic.AnthropicBeta{"compact-2026-01-12"},
165
- ContextManagement: anthropic.BetaContextManagementConfigParam{
166
- Edits: []anthropic.BetaContextManagementConfigEditUnionParam{
167
- {OfCompact20260112: &anthropic.BetaCompact20260112EditParam{}},
168
- },
169
- },
170
- Messages: []anthropic.BetaMessageParam{ /* ... */ },
171
- }
172
-
173
- resp, err := client.Beta.Messages.New(ctx, params)
174
- if err != nil {
175
- log.Fatal(err)
176
- }
177
-
178
- // Round-trip: append response to history via .ToParam()
179
- params.Messages = append(params.Messages, resp.ToParam())
180
-
181
- // Read compaction blocks from the response
182
- for _, block := range resp.Content {
183
- if c, ok := block.AsAny().(anthropic.BetaCompactionBlock); ok {
184
- fmt.Println("compaction summary:", c.Content)
185
- }
186
- }
187
- ```
188
-
189
- Other edit types: `BetaClearToolUses20250919EditParam`, `BetaClearThinking20251015EditParam` - these need `Betas: []anthropic.AnthropicBeta{"context-management-2025-06-27"}`, not `compact-2026-01-12`.
@@ -1,46 +0,0 @@
1
- ---
2
- name: plugin-authoring
3
- description: "Make a mod: a live pane, band, status line, toast or hook inside Claude Code (terminal or desktop Code tab), written as a plugin of function hooks that hot-reloads in this session. Load before writing or debugging a hooks module."
4
- ---
5
-
6
- WHERE TO WRITE IT. Write each mod in its own child folder of `${CLAUDE_DEV_MODS_DIR}`: `${CLAUDE_DEV_MODS_DIR}/<mod-name>/`, three files written directly:
7
-
8
- - `.claude-plugin/plugin.json`: `{ "name": "<mod-name>", "version": "0.1.0", "description": "<one line>" }`
9
- - `hooks/hooks.json`: `{ "modules": ["./register.tsx"] }`, one path, relative to that file
10
- - `hooks/register.tsx` (or `.ts`): the hooks module, exporting `register(on, options)`
11
-
12
- A mod that keeps values in `$.state` has a fourth file, `types/index.d.ts`: its type contract, declaring each value in `interface PluginState` under the mod's name, named in `plugin.json` as `"types": "./types/index.d.ts"`. The module imports its value types from `'../types'`, and `claude plugin validate` holds every `$.state` key the module names to that contract.
13
-
14
- WHERE THE TYPES ARE. `${CLAUDE_SKILL_DIR}/types/claude-code.d.ts` is this build's declaration of the whole API, written by the engine as this skill loaded, so it matches the running engine exactly. The folder is this process's own: after a restart (a resume, an app relaunch) the next load of this skill writes and names a new one. It carries every event's input and result, every noun and method on `$` with its doc comment and an example, and every element's props for each surface. It is about 14,000 lines: grep it for the name at hand (`'tool.call'`, `open: (`, `Pane: {`, `export type ToolCallResult`) and read the declaration the match lands on. The header of that file carries a `tsconfig.json` that fits a hooks module; its include takes `.claude/types`, where `/plugin-types` writes this core file and, beside it, the enabled plugins' contracts, so an editor and `tsc` type the mod. `/plugin-types [dir]` writes them into another directory.
15
-
16
- WHAT HAPPENS WHEN THE TURN ENDS. Loading this skill through the Skill tool or its slash command starts the engine's watch on `${CLAUDE_DEV_MODS_DIR}`. The first file written there makes the engine ask the person, once, right then, while the turn goes on: "Enable mod hot-reloading for this session?", with `Not now` and `Enable for this session`. The question holds nothing up: the turn keeps writing, the person answers when they like, and a question still open when the turn ends simply stays up. That question is the switch, and the person alone answers it: no permission mode, rule or hook does. On `Enable for this session` the folder joins the session's plugin folders and the mod loads when the turn ends, whole (at once when the turn has already ended; a pane it opens appears then), and each later edit reloads it when the turn that made the edit ends. The answer reaches you as a notice at the start of your next turn, one of: enabled, with what the load came to; declined (the mods are written, and `claude --plugin-dir <folder>` loads them); still open (a new prompt from the person takes the question down, and the engine asks again when that turn ends); or off, with the reason (nobody could be asked, as under `claude -p`; an organization's policy; an untrusted workspace). A process that restarted (an app relaunch, a resume) loads an enabled folder again by itself; otherwise its watch starts the next time this skill loads, and a manifest already in the folder raises the question when that turn ends.
17
-
18
- A reload is a fresh load of the module: `register` runs again and `session.start` fires again. Values in `$.state` (the session's) and `$.store` (across sessions) are the host's and stay; the module's own variables start over.
19
-
20
- ## A mod in one paragraph
21
-
22
- A hooks module exports `register(on, options)`. `on(event, matcher?, hook)` adds a hook, and every hook is `($, e, next)`: `$` is the engine interface, each call spelled noun then method, as `$.ui.open(...)` is; `e` is the event's input, a plain frozen value; `next(e)` runs the plugins beneath and then the engine's own behaviour, resolving to the event's result. A hook that returns without `next` answers for itself; `next({ ...e, x })` rewrites what the rest sees. The module runs in an environment of its own, with no DOM and no Node: `$` reaches everything outside it. JSX compiles against the global `h`, and the elements come from the drawing surface's own table, `const { Box, Text, Button } = $.ui.resolve(e)`, where `e.surface` is `terminal`, `desktop`, `vscode` or `mobile`.
23
-
24
- ## From the ask to the shape
25
-
26
- Each example is one complete hooks module, an excerpt of a shipped mod cut to the smallest whole thing; with the two JSON files above, and its contract where it has one, it is a mod that loads, validates and type-checks on this build.
27
-
28
- | The person asks for | What it is | Shown in |
29
- | --- | --- | --- |
30
- | a pane, panel, sidebar, live view | `$.ui.open({ id, title })`, drawn by a `ui.render` hook on `{ component: 'Pane', requestId: id }`; opened by something the person did (a command they typed, a Button they pressed) it seats at any width; opened unasked (from `session.start`, a timer) it seats from 144 terminal columns and waits below that | `${CLAUDE_SKILL_DIR}/examples/pane.tsx`, its contract `${CLAUDE_SKILL_DIR}/examples/pane-state.d.ts` |
31
- | a band or row above the prompt | a `ui.render` hook on `{ component: 'AbovePrompt' }` returning a tree, or `next(e)` with nothing to show | `${CLAUDE_SKILL_DIR}/examples/band.tsx`, its contract `${CLAUDE_SKILL_DIR}/examples/band-state.d.ts` |
32
- | a status line entry | `$.ui.status(text)` from any hook; `undefined` clears it | `${CLAUDE_SKILL_DIR}/examples/tool-call.ts` |
33
- | a toast | `$.ui.toast(text)` from any hook | `${CLAUDE_SKILL_DIR}/examples/band.tsx` |
34
- | block, rewrite or react to a tool call | `on('tool.call', { tool }, hook)`: return `{ deny }`, call `next({ ...e, ... })`, or `await next(e)` and act on the result | `${CLAUDE_SKILL_DIR}/examples/tool-call.ts` |
35
- | change or react to a prompt | `on('prompt.submit', hook)`: `next({ ...e, text })` | `${CLAUDE_SKILL_DIR}/examples/band.tsx` |
36
- | a slash command | `$.command.register({ name, description })` in `session.start`, answered by a `command.run` hook returning `{ text }` | `${CLAUDE_SKILL_DIR}/examples/pane.tsx` |
37
- | values a drawing reads | `atom(ref, initial)`, `read($, atom)` while drawing, `update($, atom, fn)` from a handler or another event; the write redraws the readers; each value declared in the contract | `${CLAUDE_SKILL_DIR}/examples/pane-state.d.ts` |
38
- | work on a timer, a tool the model calls, a subagent type, model calls, files, processes | `$.clock`, `$.tool`, `$.agent`, `$.model`, `$.fs`, `$.process` | `${CLAUDE_SKILL_DIR}/reference.md` |
39
-
40
- ## Checking it and reading what the engine refused
41
-
42
- `claude plugin validate <mod folder>` reads the manifest and the module's source the way the engine will, and reports what the module hooks and calls and everything the engine would refuse, before any session loads it.
43
-
44
- The engine reports in three places. The notice above carries the outcome of the hot-reloading question and of the load. The transcript carries one dim line naming the plugin, the event and the reason when a hook fails (the hook is skipped and the chain continues) or a module does not load. The debug log (`claude --debug`) carries a line for every occurrence and every result the engine refused; a drawing that silently falls back to the engine's own has a line there beginning `ui.render (<Component>): a hook returned a tree that does not validate`, followed by the reason.
45
-
46
- `${CLAUDE_SKILL_DIR}/reference.md` is the long form, read on demand: the full event list and streaming events, `ui.render` in depth (viewport, focus, hotkeys, hover, `Raster`, `Image`, `Markdown`), `$.state` contracts, timers and background work, `$.model`, `$.fs`, `$.process`, tools and agent types, `--plugin-dir` and `CLAUDE_CODE_PLUGIN_DIRS`, `userConfig` options, and `claude plugin test`.
@@ -1,39 +0,0 @@
1
- ---
2
- name: artifact-dashboard
3
- description: Create a dashboard artifact - KPI tiles, a primary time-series chart, and a breakdown table. Use when the user asks for a dashboard, metrics view, KPI summary, monitoring page, analytics overview, or wants to visualize quantitative data at a glance. Only for CREATING a new artifact; edits to an existing artifact modify its HTML directly.
4
- ---
5
-
6
- Base styling and reusable components for an operational dashboard: KPI tile cards, a spec-driven line-chart renderer, and table styles, arranged in a sensible default layout (KPI row, primary chart, breakdown table). The template sets the visual foundation - it does not fix the structure or content of the final dashboard.
7
-
8
- ## How to use
9
-
10
- 1. Read `template.html` from this skill's base directory (listed above).
11
- 2. Copy it as your starting point. Replace each `<!-- SLOT: ... -->` marker with real content - the comment inside each slot describes what goes there. Remove the slot comments from the final output.
12
- 3. Then make the dashboard fit the data and the ask: add charts (the `dataviz` skill is the right companion for designing richer or additional visualizations), reorder or drop sections, extend the layout grid. The slots are where you start, not where you stop - customization is key for data visualization, and the card system, renderer, and table styles are components to build with, keeping the base styling so the result reads as one coherent design.
13
- 4. Self-check the result before publishing: no `SLOT` markers left, and no placeholder text or values left (see Notes).
14
- 5. Publish the filled HTML with the `Artifact` tool.
15
-
16
- **Creation only.** When editing an existing dashboard artifact, work with its current HTML directly - don't re-read or re-apply this template.
17
-
18
- ## Slots
19
-
20
- | Slot | What to fill in |
21
- | --- | --- |
22
- | `TITLE` | Plain-text page title, e.g. "Q2 Revenue Dashboard". |
23
- | `KPI_TILES` | 2-5 `.card.kpi` blocks - one headline number each, with optional up/down delta. Color deltas by meaning, not direction (see Notes). |
24
- | `PRIMARY_CHART_SPEC` | JSON spec inside `<script type="application/json" id="primary-chart-spec" data-chart-runtime>`. Supports `"type"`: line (default), bar, or donut - multi-series specs get a legend, and optional axis captions and y-domain knobs are documented next to the slot. The `data-chart-runtime` attribute is load-bearing (publish-time chart injection keys on it - keep it). Fill the spec for the standard cases; for other chart types or richer behavior, add your own chart alongside it. |
25
- | `BREAKDOWN_ROWS` | Table header `<th>` cells and one `<tr>` per row. Add `class="num"` to right-align numeric columns. |
26
- | `FOOTER_NOTE` | Data source and generation timestamp. |
27
-
28
- The template also has a few minor inline slots (subtitle, chart title, breakdown title) - each is labelled in place.
29
-
30
- ## Notes
31
-
32
- - The template is a **body fragment** - no `<!DOCTYPE>`/`<html>`/`<head>`/`<body>` wrapper. The Artifact tool adds its own skeleton at publish time.
33
- - The chart slot takes a JSON spec, not markup: you emit data + a few knobs; the template's `renderChart()` owns the pixels. Spec shape is documented inline next to the slot.
34
- - **Replace every placeholder number - and never invent one.** Each placeholder value - KPI numbers, table rows, and the chart spec's zeroed "REPLACE ME" series - must be replaced with real data, or its whole section removed. The same goes for dates and metadata: the footer's data source and generation date come from the conversation or are omitted, never made up. Published output must never contain placeholder or invented values.
35
- - **No time dimension?** Don't fabricate a trend - never invent a time axis for data that has none. Three good paths: use `"type": "bar"` or `"type": "donut"` in the chart spec when that shape fits (deterministic, preferred for standard shapes); hand-draw your own SVG or HTML chart when you want a shape the spec doesn't cover or full visual control (the `dataviz` skill helps design it - reuse the card chrome and palette); or drop the chart section and lead with the KPI tiles and breakdown table. Prefer `"line"` for anything that is a trend: it is the only spec type the page can still draw if the published page's chart runtime is unavailable - a hand-drawn SVG chart has no such dependency.
36
- - **Format numbers for scanning.** KPI values get a unit and 2-3 significant figures with thousands separators (think $1.2M, 98.7%, 412ms); percentages get at most one decimal. Keep the breakdown table to roughly the top ten rows and roll a long tail into an "Other" row.
37
- - **Color deltas by meaning, not direction.** The `up`/`down` classes pick the arrow and default to green-up/red-down. When a decrease is the improvement - latency, cost, error rate - add the `good` (or `bad`) class so the color says whether the news is good.
38
- - **Narrow ranges far from zero** (say, uptime hovering between 97% and 99%) flatten against the default zero-floored axis. Set `y.min`/`y.max` in the chart spec to zoom the domain, and mention the truncated axis in the chart title or footer so the zoom doesn't mislead.
39
- - **The default styling is a starting point, not a house style.** The palette ships with a built-in dark mode; a follow-up styling/theming pass is encouraged - tune `--accent` toward the subject (prefer another token from the shipped palette so the page stays on-system; change it in every scope that declares it - the light `:root` block and both dark scopes - or it snaps back in dark mode), adjust surfaces, or restyle entirely. When restyling or hand-drawing SVG charts, route colors through the CSS custom properties via `style` attributes (`var()` fails silently in bare SVG presentation attributes), and keep every custom color legible in both light and dark - hardcoded near-black strokes vanish on the dark background.