@maincode-ai/matilda-code 0.21.13-nightly.20261027.e00306cd3 → 0.21.13-preview.0

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 (89) hide show
  1. package/chunks/agent-4WVOGPYV.js +3 -0
  2. package/chunks/agent-headless-KZCTMP7N.js +3 -0
  3. package/chunks/{askUserQuestion-L3WDL2T4.js → askUserQuestion-6WS5ZWRA.js} +1 -1
  4. package/chunks/{ca-UBWUTZVZ.js → ca-GTBBJB6L.js} +1 -1
  5. package/chunks/{chunk-WTU6GSZH.js → chunk-3KKFNVI6.js} +1 -1
  6. package/chunks/chunk-4OWMT5UV.js +120 -0
  7. package/chunks/{chunk-62GTGPTP.js → chunk-5WRYWBB4.js} +1 -1
  8. package/chunks/{chunk-4CVGYUEL.js → chunk-AH4W5RL2.js} +1 -1
  9. package/chunks/{chunk-LOB42ODE.js → chunk-DP2GG4BM.js} +1 -1
  10. package/chunks/{chunk-I3CV4LOD.js → chunk-E2WUZZFL.js} +1 -1
  11. package/chunks/{chunk-6365AZBW.js → chunk-EVIJ4V55.js} +1 -1
  12. package/chunks/{chunk-GKEUZTOB.js → chunk-G4XYQR6C.js} +1 -1
  13. package/chunks/{chunk-ZQKABJBB.js → chunk-IR3O4MBT.js} +1 -1
  14. package/chunks/{chunk-YTB3OFTT.js → chunk-JD4JPY2P.js} +1 -1
  15. package/chunks/{chunk-V4D3LER3.js → chunk-LQYPJU36.js} +544 -544
  16. package/chunks/{chunk-ONANBLIE.js → chunk-OFP2ROZ7.js} +1 -1
  17. package/chunks/{chunk-JU7QTSKS.js → chunk-OIJ6FGWD.js} +1 -1
  18. package/chunks/{chunk-J3AMKDX6.js → chunk-QBGN32YW.js} +1 -1
  19. package/chunks/{chunk-XBTBZHRC.js → chunk-QFGR7ORH.js} +1 -1
  20. package/chunks/{chunk-DB5LMKXU.js → chunk-R5KAUFJR.js} +1 -1
  21. package/chunks/{chunk-GILXFDEG.js → chunk-RBGGCVWD.js} +1 -1
  22. package/chunks/{chunk-OBE5S4GG.js → chunk-VENUGZ5L.js} +1 -1
  23. package/chunks/{chunk-O7VPFJ3R.js → chunk-VTBFOUDI.js} +1 -1
  24. package/chunks/{chunk-6PFK4XTH.js → chunk-VW6Q43PZ.js} +2 -2
  25. package/chunks/{chunk-HPO2YWG4.js → chunk-WLB26FDD.js} +1 -1
  26. package/chunks/{chunk-VUJRLLGL.js → chunk-WYUJ36HZ.js} +1 -1
  27. package/chunks/{chunk-NK2QMGCC.js → chunk-XYAIE36G.js} +2 -2
  28. package/chunks/{computer-use-N6KGNST6.js → computer-use-YXOX3Q5O.js} +1 -1
  29. package/chunks/{cron-create-4XBY5RVI.js → cron-create-OCYM4HNG.js} +1 -1
  30. package/chunks/{cron-delete-BH4VP3LX.js → cron-delete-LAWZU6LE.js} +1 -1
  31. package/chunks/{cron-list-XXRFKNGM.js → cron-list-BCIXV7CX.js} +1 -1
  32. package/chunks/{de-LEEHWWJ2.js → de-CEHU2QRR.js} +1 -1
  33. package/chunks/{edit-6ULTLTJQ.js → edit-YZ6XRSXL.js} +1 -1
  34. package/chunks/{en-LNOIHFSQ.js → en-Y755FYW7.js} +1 -1
  35. package/chunks/{enter-worktree-V2VANZYJ.js → enter-worktree-GZPML7CR.js} +1 -1
  36. package/chunks/{enterPlanMode-75H54S3Z.js → enterPlanMode-CVXXBWOO.js} +1 -1
  37. package/chunks/{exit-worktree-KPB32K6P.js → exit-worktree-JXDNEOAW.js} +1 -1
  38. package/chunks/{exitPlanMode-K7JRP22Y.js → exitPlanMode-TFVL2QJO.js} +1 -1
  39. package/chunks/{fr-4TA2AIU6.js → fr-PCCFNMP6.js} +1 -1
  40. package/chunks/{glob-ACAIHWST.js → glob-5L6T2OAD.js} +1 -1
  41. package/chunks/{goal-tools-VPFXBI6M.js → goal-tools-DBHXH5DG.js} +1 -1
  42. package/chunks/{grep-R4K75RXS.js → grep-J7T4EXPY.js} +1 -1
  43. package/chunks/{ja-VXDMQKRW.js → ja-C4IJKHYL.js} +1 -1
  44. package/chunks/{keychain-token-storage-7VYNARRB.js → keychain-token-storage-RQFXZUKF.js} +1 -1
  45. package/chunks/{ls-4ZEICYPK.js → ls-LVWC7JN2.js} +1 -1
  46. package/chunks/{lsp-4US2RIIV.js → lsp-5VYXJ3SM.js} +1 -1
  47. package/chunks/{mcp-client-ZKQFYCFN.js → mcp-client-EZSMZWGS.js} +1 -1
  48. package/chunks/{monitor-KSNFIY54.js → monitor-HJCMPNDI.js} +1 -1
  49. package/chunks/{notebook-edit-655ZNV6Q.js → notebook-edit-62T7J5RF.js} +1 -1
  50. package/chunks/{openaiContentGenerator-BG3OM453.js → openaiContentGenerator-SPSIXCCZ.js} +8 -8
  51. package/chunks/{pt-WEIMCOKI.js → pt-GM4GVS7E.js} +1 -1
  52. package/chunks/read-file-PMRIGC6D.js +3 -0
  53. package/chunks/ripGrep-MFGKGCKA.js +3 -0
  54. package/chunks/{ru-WFLK34ZL.js → ru-FGESI6LX.js} +1 -1
  55. package/chunks/{scheduler-AVYCIBEK.js → scheduler-3O76VPWP.js} +1 -1
  56. package/chunks/{send-message-ND2SRKX5.js → send-message-YR63X46X.js} +1 -1
  57. package/chunks/shell-44X3D7YA.js +3 -0
  58. package/chunks/{skill-AB2X2DTC.js → skill-UQMCUAST.js} +1 -1
  59. package/chunks/{symbol-search-VICSUEZH.js → symbol-search-UTRGJAO2.js} +1 -1
  60. package/chunks/{syntheticOutput-Z7DQKMRI.js → syntheticOutput-653VCVMY.js} +1 -1
  61. package/chunks/{task-create-BQ73FRTH.js → task-create-TAKTFQSW.js} +1 -1
  62. package/chunks/{task-detach-JCHSLUOR.js → task-detach-H3FZKL54.js} +1 -1
  63. package/chunks/{task-list-6ESRFO5F.js → task-list-ICQNSQZS.js} +1 -1
  64. package/chunks/{task-stop-74H2CPAJ.js → task-stop-4I3A3RGM.js} +1 -1
  65. package/chunks/{task-update-R3BN6KPQ.js → task-update-COPYWCFV.js} +1 -1
  66. package/chunks/{team-create-UTKRPUPZ.js → team-create-RVBZSB6O.js} +1 -1
  67. package/chunks/{team-delete-PCCGTLGL.js → team-delete-CCIBYEVZ.js} +1 -1
  68. package/chunks/todoWrite-RKNGMZ5N.js +3 -0
  69. package/chunks/{tool-search-FJ5MAPQ6.js → tool-search-EJ4DEPVO.js} +1 -1
  70. package/chunks/{web-fetch-DEUGZQZS.js → web-fetch-WCGA252Q.js} +1 -1
  71. package/chunks/{web-search-PUUIEFJO.js → web-search-RHTJAF72.js} +1 -1
  72. package/chunks/{workflow-CBADL3IM.js → workflow-F5KP553F.js} +2 -2
  73. package/chunks/{write-file-QGCL2AJL.js → write-file-3GA55J4D.js} +1 -1
  74. package/cli.js +427 -427
  75. package/locales/ca.js +0 -1
  76. package/locales/de.js +0 -1
  77. package/locales/en.js +0 -1
  78. package/locales/fr.js +0 -1
  79. package/locales/ja.js +0 -1
  80. package/locales/pt.js +0 -1
  81. package/locales/ru.js +0 -1
  82. package/package.json +2 -2
  83. package/chunks/agent-H5JE3RJQ.js +0 -3
  84. package/chunks/agent-headless-H2JZZ7UV.js +0 -3
  85. package/chunks/chunk-GSRXW64P.js +0 -120
  86. package/chunks/read-file-4VSUKSRB.js +0 -3
  87. package/chunks/ripGrep-PNALN2GG.js +0 -3
  88. package/chunks/shell-GUHQNOMZ.js +0 -3
  89. package/chunks/todoWrite-BZI75DFV.js +0 -3
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as c}from"./chunk-V6UPUMP3.js";import{m as u}from"./chunk-DB5LMKXU.js";import{b as m}from"./chunk-GZPNIYVZ.js";m();import{AsyncLocalStorage as h}from"node:async_hooks";var a=new h,r=new WeakMap,p={turns:"max_turn_requests",session_turns:"max_turn_requests",loop_detected:"max_turn_requests",continuations:"max_turn_requests",session_tokens:"max_tokens"},k=class{jobs=new Map;joinsJobs;wake;closed=!1;revision=0;task;lastResponse;stop;ended;finished;constructor(e={}){this.joinsJobs=e.joinsJobs??!0}begin(e,t,s=e){this.task||(this.task={startUuid:e,rootUuid:s,recorder:t},this.ended&&this.finish(this.ended).catch(()=>{}))}get taskStartUuid(){return this.task?.startUuid}get taskRef(){return this.task?{startUuid:this.task.startUuid,rootUuid:this.task.rootUuid}:void 0}noteResponse(e){this.lastResponse=e}noteStop(e){this.stop=e}finish(e){let t=this.task;return t?(this.finished??=this.recordOutcome(t,e),this.finished):(this.ended??=e,Promise.resolve(void 0))}async recordOutcome(e,t){let s=this.stop&&(t.outcome==="completed"||t.outcome==="error")?p[this.stop]:t.outcome,i=s==="completed"&&this.lastResponse?.finalAnswer?this.lastResponse:void 0,n=t.limitKind??(s==="max_tokens"||s==="max_turn_requests"?this.stop:void 0);return await e.recorder.recordTaskOutcome({taskStartUuid:e.startUuid,outcome:s,...n?{limitKind:n}:{},...s==="completed"?{finalAnswerUuid:i?i.recordId??i.id:null}:{}}),{outcome:s,...i&&{finalAnswerId:i.id}}}static get current(){return a.getStore()}run(e){return a.run(this,e)}static detached(e){return a.run(void 0,e)}static register(e,t,s){let i=a.getStore();e.originTask??=s?.originTask??i?.taskRef;let n=s?.status==="running"?r.get(s):void 0,o=n??(i?.joinsJobs?i:void 0);if(o){if(n&&s&&n.consume(s),e.completion==="detached"||!n&&e.status!=="running"){o.changed();return}if(r.set(e,o),o.closed){t();return}o.jobs.set(e,t),o.changed()}}static changed(e){e&&r.get(e)?.changed()}static abandoned(e){return r.get(e)?.closed===!0}static detach(e){let t=r.get(e);return!t||t.closed||!t.owns(e)||e.status!=="running"?!1:(e.completion="detached",t.consume(e),t.changed(),!0)}owns(e){return this.jobs.has(e)}consume(e){r.delete(e),this.jobs.delete(e)}get pending(){return this.jobs.size>0}get position(){return this.revision}get paused(){return[...this.jobs.keys()].some(e=>e.status==="paused")}get running(){return[...this.jobs.keys()].filter(e=>e.status==="running")}changed(){this.revision++,this.wake?.()}async wait(e,t,s){this.closed||t.aborted||e!==this.revision||await new Promise(i=>{let n,o=()=>{clearTimeout(n),t.removeEventListener("abort",o),this.wake=void 0,i()};this.wake=o,t.addEventListener("abort",o,{once:!0}),s!==void 0&&(n=setTimeout(o,s))})}close(){this.closed=!0;for(let[e,t]of this.jobs)e.status==="running"&&t();this.changed()}};function g(d,e){let t=s=>{let i=s.description.replace(/[\p{Cc}\s]+/gu," ").trim(),n=Math.max(1,Math.round((e-s.startTime)/6e4));return`background ${s.kind} "${i.length>80?`${i.slice(0,77)}...`:i}" (running ${n} min)`};return{displayText:`Still waiting on ${d.map(t).join(", ")}.`,modelText:d.map(s=>["<task-notification>",`<task-id>${c(s.id)}</task-id>`,`<kind>${s.kind}</kind>`,"<status>running</status>",`<summary>${c(`The ${t(s)} is still running, and this request cannot finish until it does. If the request needs its result, keep waiting. If it should keep running after the request, such as a server or watcher, call ${u.TASK_DETACH}. If it is no longer needed, call ${u.TASK_STOP}.`)}</summary>`,"</task-notification>"].join(`
3
+ import{a as c}from"./chunk-V6UPUMP3.js";import{m as u}from"./chunk-R5KAUFJR.js";import{b as m}from"./chunk-GZPNIYVZ.js";m();import{AsyncLocalStorage as h}from"node:async_hooks";var a=new h,r=new WeakMap,p={turns:"max_turn_requests",session_turns:"max_turn_requests",loop_detected:"max_turn_requests",continuations:"max_turn_requests",session_tokens:"max_tokens"},k=class{jobs=new Map;joinsJobs;wake;closed=!1;revision=0;task;lastResponse;stop;ended;finished;constructor(e={}){this.joinsJobs=e.joinsJobs??!0}begin(e,t,s=e){this.task||(this.task={startUuid:e,rootUuid:s,recorder:t},this.ended&&this.finish(this.ended).catch(()=>{}))}get taskStartUuid(){return this.task?.startUuid}get taskRef(){return this.task?{startUuid:this.task.startUuid,rootUuid:this.task.rootUuid}:void 0}noteResponse(e){this.lastResponse=e}noteStop(e){this.stop=e}finish(e){let t=this.task;return t?(this.finished??=this.recordOutcome(t,e),this.finished):(this.ended??=e,Promise.resolve(void 0))}async recordOutcome(e,t){let s=this.stop&&(t.outcome==="completed"||t.outcome==="error")?p[this.stop]:t.outcome,i=s==="completed"&&this.lastResponse?.finalAnswer?this.lastResponse:void 0,n=t.limitKind??(s==="max_tokens"||s==="max_turn_requests"?this.stop:void 0);return await e.recorder.recordTaskOutcome({taskStartUuid:e.startUuid,outcome:s,...n?{limitKind:n}:{},...s==="completed"?{finalAnswerUuid:i?i.recordId??i.id:null}:{}}),{outcome:s,...i&&{finalAnswerId:i.id}}}static get current(){return a.getStore()}run(e){return a.run(this,e)}static detached(e){return a.run(void 0,e)}static register(e,t,s){let i=a.getStore();e.originTask??=s?.originTask??i?.taskRef;let n=s?.status==="running"?r.get(s):void 0,o=n??(i?.joinsJobs?i:void 0);if(o){if(n&&s&&n.consume(s),e.completion==="detached"||!n&&e.status!=="running"){o.changed();return}if(r.set(e,o),o.closed){t();return}o.jobs.set(e,t),o.changed()}}static changed(e){e&&r.get(e)?.changed()}static abandoned(e){return r.get(e)?.closed===!0}static detach(e){let t=r.get(e);return!t||t.closed||!t.owns(e)||e.status!=="running"?!1:(e.completion="detached",t.consume(e),t.changed(),!0)}owns(e){return this.jobs.has(e)}consume(e){r.delete(e),this.jobs.delete(e)}get pending(){return this.jobs.size>0}get position(){return this.revision}get paused(){return[...this.jobs.keys()].some(e=>e.status==="paused")}get running(){return[...this.jobs.keys()].filter(e=>e.status==="running")}changed(){this.revision++,this.wake?.()}async wait(e,t,s){this.closed||t.aborted||e!==this.revision||await new Promise(i=>{let n,o=()=>{clearTimeout(n),t.removeEventListener("abort",o),this.wake=void 0,i()};this.wake=o,t.addEventListener("abort",o,{once:!0}),s!==void 0&&(n=setTimeout(o,s))})}close(){this.closed=!0;for(let[e,t]of this.jobs)e.status==="running"&&t();this.changed()}};function g(d,e){let t=s=>{let i=s.description.replace(/[\p{Cc}\s]+/gu," ").trim(),n=Math.max(1,Math.round((e-s.startTime)/6e4));return`background ${s.kind} "${i.length>80?`${i.slice(0,77)}...`:i}" (running ${n} min)`};return{displayText:`Still waiting on ${d.map(t).join(", ")}.`,modelText:d.map(s=>["<task-notification>",`<task-id>${c(s.id)}</task-id>`,`<kind>${s.kind}</kind>`,"<status>running</status>",`<summary>${c(`The ${t(s)} is still running, and this request cannot finish until it does. If the request needs its result, keep waiting. If it should keep running after the request, such as a server or watcher, call ${u.TASK_DETACH}. If it is no longer needed, call ${u.TASK_STOP}.`)}</summary>`,"</task-notification>"].join(`
4
4
  `)).join(`
5
5
  `)}}export{k as a,g as b};
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{g as f,h,i as T,j as w,k as x,l as s}from"./chunk-QXSBPCBA.js";import{b as g}from"./chunk-62GTGPTP.js";import{I as c,b as p}from"./chunk-NK2QMGCC.js";import{b as o}from"./chunk-GZPNIYVZ.js";o();import*as n from"node:fs/promises";import*as i from"node:path";o();function y(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}function M(){return i.join(c.getGlobalMatildaDir(),h)}function d(e){return i.join(M(),e)}function l(e){return i.join(d(e),w)}function I(e){return i.join(d(e),x)}function E(e){return i.join(c.getGlobalMatildaDir(),T,e)}function m(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function j(e,t){return`${m(e)}@${m(t)}`}function R(e,t){let r=m(e);if(!r)throw new Error(`Teammate name "${e}" sanitizes to an empty string. Choose a name with at least one alphanumeric character.`);if(r===f)throw new Error(`"${f}" is reserved for the team leader. Choose a different teammate name.`);let a=new Set(t.map(u=>u.name));if(a.has(r)){let u=[...a].join(", ")||"<none>";throw new Error(`A teammate named "${r}" already exists in this team (existing: ${u}). Choose a different name.`)}return r}function C(e){let t=new Set(e.map(r=>r.color).filter(r=>r!==void 0));for(let r of s)if(!t.has(r))return r;return s[e.length%s.length]}function O(e,t){let r=m(t);return e.find(a=>a.name===r)}function $(e){let t=e.trimStart();if(/^shutdown_approved\b/i.test(t))return"shutdown_approved";if(/^shutdown_rejected\b/i.test(t))return"shutdown_rejected"}async function P(e){let t=l(e);try{let r=await n.readFile(t,"utf-8");return JSON.parse(r)}catch(r){if(p(r)&&r.code==="ENOENT")return;throw r}}async function k(e,t){let r=l(e);await n.mkdir(i.dirname(r),{recursive:!0}),await g(r,t)}async function z(e,t){let r=l(e);await n.mkdir(i.dirname(r),{recursive:!0}),await n.writeFile(r,JSON.stringify(t,null,2)+`
3
+ import{g as f,h,i as T,j as w,k as x,l as s}from"./chunk-QXSBPCBA.js";import{b as g}from"./chunk-5WRYWBB4.js";import{I as c,b as p}from"./chunk-XYAIE36G.js";import{b as o}from"./chunk-GZPNIYVZ.js";o();import*as n from"node:fs/promises";import*as i from"node:path";o();function y(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}function M(){return i.join(c.getGlobalMatildaDir(),h)}function d(e){return i.join(M(),e)}function l(e){return i.join(d(e),w)}function I(e){return i.join(d(e),x)}function E(e){return i.join(c.getGlobalMatildaDir(),T,e)}function m(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function j(e,t){return`${m(e)}@${m(t)}`}function R(e,t){let r=m(e);if(!r)throw new Error(`Teammate name "${e}" sanitizes to an empty string. Choose a name with at least one alphanumeric character.`);if(r===f)throw new Error(`"${f}" is reserved for the team leader. Choose a different teammate name.`);let a=new Set(t.map(u=>u.name));if(a.has(r)){let u=[...a].join(", ")||"<none>";throw new Error(`A teammate named "${r}" already exists in this team (existing: ${u}). Choose a different name.`)}return r}function C(e){let t=new Set(e.map(r=>r.color).filter(r=>r!==void 0));for(let r of s)if(!t.has(r))return r;return s[e.length%s.length]}function O(e,t){let r=m(t);return e.find(a=>a.name===r)}function $(e){let t=e.trimStart();if(/^shutdown_approved\b/i.test(t))return"shutdown_approved";if(/^shutdown_rejected\b/i.test(t))return"shutdown_rejected"}async function P(e){let t=l(e);try{let r=await n.readFile(t,"utf-8");return JSON.parse(r)}catch(r){if(p(r)&&r.code==="ENOENT")return;throw r}}async function k(e,t){let r=l(e);await n.mkdir(i.dirname(r),{recursive:!0}),await g(r,t)}async function z(e,t){let r=l(e);await n.mkdir(i.dirname(r),{recursive:!0}),await n.writeFile(r,JSON.stringify(t,null,2)+`
4
4
  `,{encoding:"utf-8",flag:"wx"})}async function L(e){let t;try{t=await P(e)}catch{return!1}return t?typeof t.leadPid!="number"||t.leadPid<=0||t.leadPid!==process.pid&&y(t.leadPid)?!1:(await b(e),!0):(await b(e),!0)}async function b(e){let t=d(e),r=E(e);await Promise.allSettled([n.rm(t,{recursive:!0,force:!0}),n.rm(r,{recursive:!0,force:!0})])}export{y as a,d as b,I as c,E as d,m as e,j as f,R as g,C as h,O as i,$ as j,k,z as l,L as m,b as n};
5
5
  /**
6
6
  * @license
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{n as A}from"./chunk-LOB42ODE.js";import{a as C}from"./chunk-62GTGPTP.js";import{f as O,g as S,m as W,n as P}from"./chunk-DB5LMKXU.js";import{I as T,S as I}from"./chunk-NK2QMGCC.js";import{b as E}from"./chunk-GZPNIYVZ.js";E();import*as h from"fs/promises";import*as f from"fs";import*as u from"path";var R=I("TODO_WRITE"),z={name:"todo_write",description:"Creates and manages a structured task list for your current coding session. This helps track progress, organize complex tasks, and demonstrate thoroughness.",parametersJsonSchema:{type:"object",properties:{todos:{type:"array",items:{type:"object",properties:{content:{type:"string",minLength:1},status:{type:"string",enum:["pending","in_progress","completed"]},id:{type:"string"}},required:["content","status","id"],additionalProperties:!1},description:"The updated todo list"}},required:["todos"],$schema:"http://json-schema.org/draft-07/schema#"}},j=`
3
+ import{n as A}from"./chunk-DP2GG4BM.js";import{a as C}from"./chunk-5WRYWBB4.js";import{f as O,g as S,m as W,n as P}from"./chunk-R5KAUFJR.js";import{I as T,S as I}from"./chunk-XYAIE36G.js";import{b as E}from"./chunk-GZPNIYVZ.js";E();import*as h from"fs/promises";import*as f from"fs";import*as u from"path";var R=I("TODO_WRITE"),z={name:"todo_write",description:"Creates and manages a structured task list for your current coding session. This helps track progress, organize complex tasks, and demonstrate thoroughness.",parametersJsonSchema:{type:"object",properties:{todos:{type:"array",items:{type:"object",properties:{content:{type:"string",minLength:1},status:{type:"string",enum:["pending","in_progress","completed"]},id:{type:"string"}},required:["content","status","id"],additionalProperties:!1},description:"The updated todo list"}},required:["todos"],$schema:"http://json-schema.org/draft-07/schema#"}},j=`
4
4
  Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
5
5
  It also helps the user understand the progress of the task and overall progress of their requests.
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{S as d}from"./chunk-NK2QMGCC.js";import{b as n}from"./chunk-GZPNIYVZ.js";n();import*as w from"node:crypto";n();var l=class{serviceName;constructor(e){this.serviceName=e}validateCredentials(e){if(!e.serverName)throw new Error("Server name is required");if(!e.token)throw new Error("Token is required");if(!e.token.accessToken)throw new Error("Access token is required");if(!e.token.tokenType)throw new Error("Token type is required")}isTokenExpired(e){if(!e.token.expiresAt)return!1;let t=5*60*1e3;return Date.now()>e.token.expiresAt-t}sanitizeServerName(e){return e.replace(/[^a-zA-Z0-9-_.]/g,"_")}};var o=d("MCP_KEYCHAIN"),c="__keychain_test__",s="__secret__",y=class extends l{keychainAvailable=null;keytarModule=null;keytarLoadAttempted=!1;async getKeytar(){if(this.keytarLoadAttempted)return this.keytarModule;this.keytarLoadAttempted=!0;try{let t=await import("keytar");this.keytarModule=t.default||t}catch(e){o.error(`Failed to load keytar module: ${e}`)}return this.keytarModule}async getCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");try{let r=this.sanitizeServerName(e),a=await t.getPassword(this.serviceName,r);if(!a)return null;let i=JSON.parse(a);return this.isTokenExpired(i)?null:i}catch(r){throw r instanceof SyntaxError?new Error(`Failed to parse stored credentials for ${e}`):r}}async setCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");this.validateCredentials(e);let r=this.sanitizeServerName(e.serverName),a={...e,updatedAt:Date.now()},i=JSON.stringify(a);await t.setPassword(this.serviceName,r,i)}async deleteCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");let r=this.sanitizeServerName(e);if(!await t.deletePassword(this.serviceName,r))throw new Error(`No credentials found for ${e}`)}async listServers(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>!r.account.startsWith(c)).filter(r=>!r.account.startsWith(s)).map(r=>r.account)}catch(t){return o.error(`Failed to list servers from keychain: ${t}`),[]}}async getAllCredentials(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");let t=new Map;try{let r=(await e.findCredentials(this.serviceName)).filter(a=>!a.account.startsWith(c)).filter(a=>!a.account.startsWith(s));for(let a of r)try{let i=JSON.parse(a.password);this.isTokenExpired(i)||t.set(a.account,i)}catch(i){o.error(`Failed to parse credentials for ${a.account}: ${i}`)}}catch(r){o.error(`Failed to get all credentials from keychain: ${r}`)}return t}async clearAll(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=this.keytarModule?await this.keytarModule.findCredentials(this.serviceName).then(r=>r.map(a=>a.account)).catch(r=>{throw new Error(`Failed to list servers for clearing: ${r.message}`)}):[],t=[];for(let r of e)try{await this.deleteCredentials(r)}catch(a){t.push(a)}if(t.length>0)throw new Error(`Failed to clear some credentials: ${t.map(r=>r.message).join(", ")}`)}async checkKeychainAvailability(){if(this.keychainAvailable!==null)return this.keychainAvailable;try{let e=await this.getKeytar();if(!e)return this.keychainAvailable=!1,!1;let t=`${c}${w.randomBytes(8).toString("hex")}`,r="test";await e.setPassword(this.serviceName,t,r);let a=await e.getPassword(this.serviceName,t),h=await e.deletePassword(this.serviceName,t)&&a===r;return this.keychainAvailable=h,h}catch{return this.keychainAvailable=!1,!1}}async isAvailable(){return this.checkKeychainAvailability()}async setSecret(e,t){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let r=await this.getKeytar();if(!r)throw new Error("Keytar module not available");await r.setPassword(this.serviceName,`${s}${e}`,t)}async getSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");return t.getPassword(this.serviceName,`${s}${e}`)}async deleteSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");if(!await t.deletePassword(this.serviceName,`${s}${e}`))throw new Error(`No secret found for key: ${e}`)}async listSecrets(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>r.account.startsWith(s)).map(r=>r.account.substring(s.length))}catch(t){return o.error(`Failed to list secrets from keychain: ${t}`),[]}}};export{l as a,y as b};
3
+ import{S as d}from"./chunk-XYAIE36G.js";import{b as n}from"./chunk-GZPNIYVZ.js";n();import*as w from"node:crypto";n();var l=class{serviceName;constructor(e){this.serviceName=e}validateCredentials(e){if(!e.serverName)throw new Error("Server name is required");if(!e.token)throw new Error("Token is required");if(!e.token.accessToken)throw new Error("Access token is required");if(!e.token.tokenType)throw new Error("Token type is required")}isTokenExpired(e){if(!e.token.expiresAt)return!1;let t=5*60*1e3;return Date.now()>e.token.expiresAt-t}sanitizeServerName(e){return e.replace(/[^a-zA-Z0-9-_.]/g,"_")}};var o=d("MCP_KEYCHAIN"),c="__keychain_test__",s="__secret__",y=class extends l{keychainAvailable=null;keytarModule=null;keytarLoadAttempted=!1;async getKeytar(){if(this.keytarLoadAttempted)return this.keytarModule;this.keytarLoadAttempted=!0;try{let t=await import("keytar");this.keytarModule=t.default||t}catch(e){o.error(`Failed to load keytar module: ${e}`)}return this.keytarModule}async getCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");try{let r=this.sanitizeServerName(e),a=await t.getPassword(this.serviceName,r);if(!a)return null;let i=JSON.parse(a);return this.isTokenExpired(i)?null:i}catch(r){throw r instanceof SyntaxError?new Error(`Failed to parse stored credentials for ${e}`):r}}async setCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");this.validateCredentials(e);let r=this.sanitizeServerName(e.serverName),a={...e,updatedAt:Date.now()},i=JSON.stringify(a);await t.setPassword(this.serviceName,r,i)}async deleteCredentials(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");let r=this.sanitizeServerName(e);if(!await t.deletePassword(this.serviceName,r))throw new Error(`No credentials found for ${e}`)}async listServers(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>!r.account.startsWith(c)).filter(r=>!r.account.startsWith(s)).map(r=>r.account)}catch(t){return o.error(`Failed to list servers from keychain: ${t}`),[]}}async getAllCredentials(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");let t=new Map;try{let r=(await e.findCredentials(this.serviceName)).filter(a=>!a.account.startsWith(c)).filter(a=>!a.account.startsWith(s));for(let a of r)try{let i=JSON.parse(a.password);this.isTokenExpired(i)||t.set(a.account,i)}catch(i){o.error(`Failed to parse credentials for ${a.account}: ${i}`)}}catch(r){o.error(`Failed to get all credentials from keychain: ${r}`)}return t}async clearAll(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=this.keytarModule?await this.keytarModule.findCredentials(this.serviceName).then(r=>r.map(a=>a.account)).catch(r=>{throw new Error(`Failed to list servers for clearing: ${r.message}`)}):[],t=[];for(let r of e)try{await this.deleteCredentials(r)}catch(a){t.push(a)}if(t.length>0)throw new Error(`Failed to clear some credentials: ${t.map(r=>r.message).join(", ")}`)}async checkKeychainAvailability(){if(this.keychainAvailable!==null)return this.keychainAvailable;try{let e=await this.getKeytar();if(!e)return this.keychainAvailable=!1,!1;let t=`${c}${w.randomBytes(8).toString("hex")}`,r="test";await e.setPassword(this.serviceName,t,r);let a=await e.getPassword(this.serviceName,t),h=await e.deletePassword(this.serviceName,t)&&a===r;return this.keychainAvailable=h,h}catch{return this.keychainAvailable=!1,!1}}async isAvailable(){return this.checkKeychainAvailability()}async setSecret(e,t){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let r=await this.getKeytar();if(!r)throw new Error("Keytar module not available");await r.setPassword(this.serviceName,`${s}${e}`,t)}async getSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");return t.getPassword(this.serviceName,`${s}${e}`)}async deleteSecret(e){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let t=await this.getKeytar();if(!t)throw new Error("Keytar module not available");if(!await t.deletePassword(this.serviceName,`${s}${e}`))throw new Error(`No secret found for key: ${e}`)}async listSecrets(){if(!await this.checkKeychainAvailability())throw new Error("Keychain is not available");let e=await this.getKeytar();if(!e)throw new Error("Keytar module not available");try{return(await e.findCredentials(this.serviceName)).filter(r=>r.account.startsWith(s)).map(r=>r.account.substring(s.length))}catch(t){return o.error(`Failed to list secrets from keychain: ${t}`),[]}}};export{l as a,y as b};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2025 Google LLC
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{S as iu}from"./chunk-NK2QMGCC.js";import{b as f}from"./chunk-GZPNIYVZ.js";import{d as g,f as so}from"./chunk-OWGSC52X.js";var qr=g(L=>{"use strict";f();Object.defineProperty(L,"__esModule",{value:!0});L.regexpCode=L.getEsmExportName=L.getProperty=L.safeStringify=L.stringify=L.strConcat=L.addCodeArg=L.str=L._=L.nil=L._Code=L.Name=L.IDENTIFIER=L._CodeOrName=void 0;var Ir=class{};L._CodeOrName=Ir;L.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Nt=class extends Ir{constructor(e){if(super(),!L.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};L.Name=Nt;var ke=class extends Ir{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Nt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};L._Code=ke;L.nil=new ke("");function cu(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ao(r,e[n]),r.push(t[++n]);return new ke(r)}L._=cu;var oo=new ke("+");function uu(t,...e){let r=[Cr(t[0])],n=0;for(;n<e.length;)r.push(oo),ao(r,e[n]),r.push(oo,Cr(t[++n]));return Bm(r),new ke(r)}L.str=uu;function ao(t,e){e instanceof ke?t.push(...e._items):e instanceof Nt?t.push(e):t.push(Qm(e))}L.addCodeArg=ao;function Bm(t){let e=1;for(;e<t.length-1;){if(t[e]===oo){let r=Xm(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Xm(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Nt||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Nt))return`"${t}${e.slice(1)}`}function Ym(t,e){return e.emptyStr()?t:t.emptyStr()?e:uu`${t}${e}`}L.strConcat=Ym;function Qm(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Cr(Array.isArray(t)?t.join(","):t)}function Zm(t){return new ke(Cr(t))}L.stringify=Zm;function Cr(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}L.safeStringify=Cr;function eh(t){return typeof t=="string"&&L.IDENTIFIER.test(t)?new ke(`.${t}`):cu`[${t}]`}L.getProperty=eh;function th(t){if(typeof t=="string"&&L.IDENTIFIER.test(t))return new ke(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}L.getEsmExportName=th;function rh(t){return new ke(t.toString())}L.regexpCode=rh});var uo=g(ge=>{"use strict";f();Object.defineProperty(ge,"__esModule",{value:!0});ge.ValueScope=ge.ValueScopeName=ge.Scope=ge.varKinds=ge.UsedValueState=void 0;var _e=qr(),io=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},xn;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(xn||(ge.UsedValueState=xn={}));ge.varKinds={const:new _e.Name("const"),let:new _e.Name("let"),var:new _e.Name("var")};var zn=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof _e.Name?e:this.name(e)}name(e){return new _e.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};ge.Scope=zn;var Ln=class extends _e.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,_e._)`.${new _e.Name(r)}[${n}]`}};ge.ValueScopeName=Ln;var nh=(0,_e._)`\n`,co=class extends zn{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?nh:_e.nil}}get(){return this._scope}name(e){return new Ln(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:o}=s,a=(n=r.key)!==null&&n!==void 0?n:r.ref,i=this._values[o];if(i){let u=i.get(a);if(u)return u}else i=this._values[o]=new Map;i.set(a,s);let c=this._scope[o]||(this._scope[o]=[]),d=c.length;return c[d]=r.ref,s.setValue(r,{property:o,itemIndex:d}),s}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,_e._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},r,n)}_reduceValues(e,r,n={},s){let o=_e.nil;for(let a in e){let i=e[a];if(!i)continue;let c=n[a]=n[a]||new Map;i.forEach(d=>{if(c.has(d))return;c.set(d,xn.Started);let u=r(d);if(u){let l=this.opts.es5?ge.varKinds.var:ge.varKinds.const;o=(0,_e._)`${o}${l} ${d} = ${u};${this.opts._n}`}else if(u=s?.(d))o=(0,_e._)`${o}${u}${this.opts._n}`;else throw new io(d);c.set(d,xn.Completed)})}return o}};ge.ValueScope=co});var R=g(A=>{"use strict";f();Object.defineProperty(A,"__esModule",{value:!0});A.or=A.and=A.not=A.CodeGen=A.operators=A.varKinds=A.ValueScopeName=A.ValueScope=A.Scope=A.Name=A.regexpCode=A.stringify=A.getProperty=A.nil=A.strConcat=A.str=A._=void 0;var M=qr(),Ve=uo(),dt=qr();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return dt._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return dt.str}});Object.defineProperty(A,"strConcat",{enumerable:!0,get:function(){return dt.strConcat}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return dt.nil}});Object.defineProperty(A,"getProperty",{enumerable:!0,get:function(){return dt.getProperty}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return dt.stringify}});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:function(){return dt.regexpCode}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return dt.Name}});var Gn=uo();Object.defineProperty(A,"Scope",{enumerable:!0,get:function(){return Gn.Scope}});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:function(){return Gn.ValueScope}});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:function(){return Gn.ValueScopeName}});Object.defineProperty(A,"varKinds",{enumerable:!0,get:function(){return Gn.varKinds}});A.operators={GT:new M._Code(">"),GTE:new M._Code(">="),LT:new M._Code("<"),LTE:new M._Code("<="),EQ:new M._Code("==="),NEQ:new M._Code("!=="),NOT:new M._Code("!"),OR:new M._Code("||"),AND:new M._Code("&&"),ADD:new M._Code("+")};var rt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},lo=class extends rt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ve.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Qt(this.rhs,e,r)),this}get names(){return this.rhs instanceof M._CodeOrName?this.rhs.names:{}}},Un=class extends rt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof M.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Qt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof M.Name?{}:{...this.lhs.names};return Kn(e,this.rhs)}},fo=class extends Un{constructor(e,r,n,s){super(e,n,s),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},po=class extends rt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},mo=class extends rt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ho=class extends rt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},yo=class extends rt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Qt(this.code,e,r),this}get names(){return this.code instanceof M._CodeOrName?this.code.names:{}}},Dr=class extends rt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,s=n.length;for(;s--;){let o=n[s];o.optimizeNames(e,r)||(sh(e,o.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>It(e,r.names),{})}},nt=class extends Dr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},_o=class extends Dr{},Yt=class extends nt{};Yt.kind="else";var jt=class t extends nt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Yt(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(lu(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Qt(this.condition,e,r),this}get names(){let e=super.names;return Kn(e,this.condition),this.else&&It(e,this.else.names),e}};jt.kind="if";var At=class extends nt{};At.kind="for";var go=class extends At{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Qt(this.iteration,e,r),this}get names(){return It(super.names,this.iteration.names)}},$o=class extends At{constructor(e,r,n,s){super(),this.varKind=e,this.name=r,this.from=n,this.to=s}render(e){let r=e.es5?Ve.varKinds.var:this.varKind,{name:n,from:s,to:o}=this;return`for(${r} ${n}=${s}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=Kn(super.names,this.from);return Kn(e,this.to)}},Fn=class extends At{constructor(e,r,n,s){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Qt(this.iterable,e,r),this}get names(){return It(super.names,this.iterable.names)}},Mr=class extends nt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Mr.kind="func";var Vr=class extends Dr{render(e){return"return "+super.render(e)}};Vr.kind="return";var vo=class extends nt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,s;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(s=this.finally)===null||s===void 0||s.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&It(e,this.catch.names),this.finally&&It(e,this.finally.names),e}},xr=class extends nt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};xr.kind="catch";var zr=class extends nt{render(e){return"finally"+super.render(e)}};zr.kind="finally";var wo=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
3
+ import{S as iu}from"./chunk-XYAIE36G.js";import{b as f}from"./chunk-GZPNIYVZ.js";import{d as g,f as so}from"./chunk-OWGSC52X.js";var qr=g(L=>{"use strict";f();Object.defineProperty(L,"__esModule",{value:!0});L.regexpCode=L.getEsmExportName=L.getProperty=L.safeStringify=L.stringify=L.strConcat=L.addCodeArg=L.str=L._=L.nil=L._Code=L.Name=L.IDENTIFIER=L._CodeOrName=void 0;var Ir=class{};L._CodeOrName=Ir;L.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Nt=class extends Ir{constructor(e){if(super(),!L.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};L.Name=Nt;var ke=class extends Ir{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Nt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};L._Code=ke;L.nil=new ke("");function cu(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ao(r,e[n]),r.push(t[++n]);return new ke(r)}L._=cu;var oo=new ke("+");function uu(t,...e){let r=[Cr(t[0])],n=0;for(;n<e.length;)r.push(oo),ao(r,e[n]),r.push(oo,Cr(t[++n]));return Bm(r),new ke(r)}L.str=uu;function ao(t,e){e instanceof ke?t.push(...e._items):e instanceof Nt?t.push(e):t.push(Qm(e))}L.addCodeArg=ao;function Bm(t){let e=1;for(;e<t.length-1;){if(t[e]===oo){let r=Xm(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Xm(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Nt||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Nt))return`"${t}${e.slice(1)}`}function Ym(t,e){return e.emptyStr()?t:t.emptyStr()?e:uu`${t}${e}`}L.strConcat=Ym;function Qm(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Cr(Array.isArray(t)?t.join(","):t)}function Zm(t){return new ke(Cr(t))}L.stringify=Zm;function Cr(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}L.safeStringify=Cr;function eh(t){return typeof t=="string"&&L.IDENTIFIER.test(t)?new ke(`.${t}`):cu`[${t}]`}L.getProperty=eh;function th(t){if(typeof t=="string"&&L.IDENTIFIER.test(t))return new ke(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}L.getEsmExportName=th;function rh(t){return new ke(t.toString())}L.regexpCode=rh});var uo=g(ge=>{"use strict";f();Object.defineProperty(ge,"__esModule",{value:!0});ge.ValueScope=ge.ValueScopeName=ge.Scope=ge.varKinds=ge.UsedValueState=void 0;var _e=qr(),io=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},xn;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(xn||(ge.UsedValueState=xn={}));ge.varKinds={const:new _e.Name("const"),let:new _e.Name("let"),var:new _e.Name("var")};var zn=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof _e.Name?e:this.name(e)}name(e){return new _e.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};ge.Scope=zn;var Ln=class extends _e.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,_e._)`.${new _e.Name(r)}[${n}]`}};ge.ValueScopeName=Ln;var nh=(0,_e._)`\n`,co=class extends zn{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?nh:_e.nil}}get(){return this._scope}name(e){return new Ln(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:o}=s,a=(n=r.key)!==null&&n!==void 0?n:r.ref,i=this._values[o];if(i){let u=i.get(a);if(u)return u}else i=this._values[o]=new Map;i.set(a,s);let c=this._scope[o]||(this._scope[o]=[]),d=c.length;return c[d]=r.ref,s.setValue(r,{property:o,itemIndex:d}),s}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,_e._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},r,n)}_reduceValues(e,r,n={},s){let o=_e.nil;for(let a in e){let i=e[a];if(!i)continue;let c=n[a]=n[a]||new Map;i.forEach(d=>{if(c.has(d))return;c.set(d,xn.Started);let u=r(d);if(u){let l=this.opts.es5?ge.varKinds.var:ge.varKinds.const;o=(0,_e._)`${o}${l} ${d} = ${u};${this.opts._n}`}else if(u=s?.(d))o=(0,_e._)`${o}${u}${this.opts._n}`;else throw new io(d);c.set(d,xn.Completed)})}return o}};ge.ValueScope=co});var R=g(A=>{"use strict";f();Object.defineProperty(A,"__esModule",{value:!0});A.or=A.and=A.not=A.CodeGen=A.operators=A.varKinds=A.ValueScopeName=A.ValueScope=A.Scope=A.Name=A.regexpCode=A.stringify=A.getProperty=A.nil=A.strConcat=A.str=A._=void 0;var M=qr(),Ve=uo(),dt=qr();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return dt._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return dt.str}});Object.defineProperty(A,"strConcat",{enumerable:!0,get:function(){return dt.strConcat}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return dt.nil}});Object.defineProperty(A,"getProperty",{enumerable:!0,get:function(){return dt.getProperty}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return dt.stringify}});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:function(){return dt.regexpCode}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return dt.Name}});var Gn=uo();Object.defineProperty(A,"Scope",{enumerable:!0,get:function(){return Gn.Scope}});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:function(){return Gn.ValueScope}});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:function(){return Gn.ValueScopeName}});Object.defineProperty(A,"varKinds",{enumerable:!0,get:function(){return Gn.varKinds}});A.operators={GT:new M._Code(">"),GTE:new M._Code(">="),LT:new M._Code("<"),LTE:new M._Code("<="),EQ:new M._Code("==="),NEQ:new M._Code("!=="),NOT:new M._Code("!"),OR:new M._Code("||"),AND:new M._Code("&&"),ADD:new M._Code("+")};var rt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},lo=class extends rt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ve.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Qt(this.rhs,e,r)),this}get names(){return this.rhs instanceof M._CodeOrName?this.rhs.names:{}}},Un=class extends rt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof M.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Qt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof M.Name?{}:{...this.lhs.names};return Kn(e,this.rhs)}},fo=class extends Un{constructor(e,r,n,s){super(e,n,s),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},po=class extends rt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},mo=class extends rt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ho=class extends rt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},yo=class extends rt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Qt(this.code,e,r),this}get names(){return this.code instanceof M._CodeOrName?this.code.names:{}}},Dr=class extends rt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,s=n.length;for(;s--;){let o=n[s];o.optimizeNames(e,r)||(sh(e,o.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>It(e,r.names),{})}},nt=class extends Dr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},_o=class extends Dr{},Yt=class extends nt{};Yt.kind="else";var jt=class t extends nt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Yt(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(lu(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Qt(this.condition,e,r),this}get names(){let e=super.names;return Kn(e,this.condition),this.else&&It(e,this.else.names),e}};jt.kind="if";var At=class extends nt{};At.kind="for";var go=class extends At{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Qt(this.iteration,e,r),this}get names(){return It(super.names,this.iteration.names)}},$o=class extends At{constructor(e,r,n,s){super(),this.varKind=e,this.name=r,this.from=n,this.to=s}render(e){let r=e.es5?Ve.varKinds.var:this.varKind,{name:n,from:s,to:o}=this;return`for(${r} ${n}=${s}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=Kn(super.names,this.from);return Kn(e,this.to)}},Fn=class extends At{constructor(e,r,n,s){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Qt(this.iterable,e,r),this}get names(){return It(super.names,this.iterable.names)}},Mr=class extends nt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Mr.kind="func";var Vr=class extends Dr{render(e){return"return "+super.render(e)}};Vr.kind="return";var vo=class extends nt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,s;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(s=this.finally)===null||s===void 0||s.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&It(e,this.catch.names),this.finally&&It(e,this.finally.names),e}},xr=class extends nt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};xr.kind="catch";var zr=class extends nt{render(e){return"finally"+super.render(e)}};zr.kind="finally";var wo=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
4
4
  `:""},this._extScope=e,this._scope=new Ve.Scope({parent:e}),this._nodes=[new _o]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,s){let o=this._scope.toName(r);return n!==void 0&&s&&(this._constants[o.str]=n),this._leafNode(new lo(e,o,n)),o}const(e,r,n){return this._def(Ve.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ve.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ve.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Un(e,r,n))}add(e,r){return this._leafNode(new fo(e,A.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==M.nil&&this._leafNode(new yo(e)),this}object(...e){let r=["{"];for(let[n,s]of e)r.length>1&&r.push(","),r.push(n),(n!==s||this.opts.es5)&&(r.push(":"),(0,M.addCodeArg)(r,s));return r.push("}"),new M._Code(r)}if(e,r,n){if(this._blockNode(new jt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new jt(e))}else(){return this._elseNode(new Yt)}endIf(){return this._endBlockNode(jt,Yt)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new go(e),r)}forRange(e,r,n,s,o=this.opts.es5?Ve.varKinds.var:Ve.varKinds.let){let a=this._scope.toName(e);return this._for(new $o(o,a,r,n),()=>s(a))}forOf(e,r,n,s=Ve.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof M.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,M._)`${a}.length`,i=>{this.var(o,(0,M._)`${a}[${i}]`),n(o)})}return this._for(new Fn("of",s,o,r),()=>n(o))}forIn(e,r,n,s=this.opts.es5?Ve.varKinds.var:Ve.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,M._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new Fn("in",s,o,r),()=>n(o))}endFor(){return this._endBlockNode(At)}label(e){return this._leafNode(new po(e))}break(e){return this._leafNode(new mo(e))}return(e){let r=new Vr;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Vr)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new vo;if(this._blockNode(s),this.code(e),r){let o=this.name("e");this._currNode=s.catch=new xr(o),r(o)}return n&&(this._currNode=s.finally=new zr,this.code(n)),this._endBlockNode(xr,zr)}throw(e){return this._leafNode(new ho(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=M.nil,n,s){return this._blockNode(new Mr(e,r,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(Mr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof jt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};A.CodeGen=wo;function It(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Kn(t,e){return e instanceof M._CodeOrName?It(t,e.names):t}function Qt(t,e,r){if(t instanceof M.Name)return n(t);if(!s(t))return t;return new M._Code(t._items.reduce((o,a)=>(a instanceof M.Name&&(a=n(a)),a instanceof M._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function s(o){return o instanceof M._Code&&o._items.some(a=>a instanceof M.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function sh(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function lu(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,M._)`!${bo(t)}`}A.not=lu;var oh=du(A.operators.AND);function ah(...t){return t.reduce(oh)}A.and=ah;var ih=du(A.operators.OR);function ch(...t){return t.reduce(ih)}A.or=ch;function du(t){return(e,r)=>e===M.nil?r:r===M.nil?e:(0,M._)`${bo(e)} ${t} ${bo(r)}`}function bo(t){return t instanceof M.Name?t:(0,M._)`(${t})`}});var D=g(C=>{"use strict";f();Object.defineProperty(C,"__esModule",{value:!0});C.checkStrictMode=C.getErrorPath=C.Type=C.useFunc=C.setEvaluated=C.evaluatedPropsToName=C.mergeEvaluated=C.eachItem=C.unescapeJsonPointer=C.escapeJsonPointer=C.escapeFragment=C.unescapeFragment=C.schemaRefOrVal=C.schemaHasRulesButRef=C.schemaHasRules=C.checkUnknownRules=C.alwaysValidSchema=C.toHash=void 0;var H=R(),uh=qr();function lh(t){let e={};for(let r of t)e[r]=!0;return e}C.toHash=lh;function dh(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(mu(t,e),!hu(e,t.self.RULES.all))}C.alwaysValidSchema=dh;function mu(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let o in e)s[o]||gu(t,`unknown keyword: "${o}"`)}C.checkUnknownRules=mu;function hu(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}C.schemaHasRules=hu;function fh(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}C.schemaHasRulesButRef=fh;function ph({topSchemaRef:t,schemaPath:e},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,H._)`${r}`}return(0,H._)`${t}${e}${(0,H.getProperty)(n)}`}C.schemaRefOrVal=ph;function mh(t){return yu(decodeURIComponent(t))}C.unescapeFragment=mh;function hh(t){return encodeURIComponent(So(t))}C.escapeFragment=hh;function So(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}C.escapeJsonPointer=So;function yu(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}C.unescapeJsonPointer=yu;function yh(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}C.eachItem=yh;function fu({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(s,o,a,i)=>{let c=a===void 0?o:a instanceof H.Name?(o instanceof H.Name?t(s,o,a):e(s,o,a),a):o instanceof H.Name?(e(s,a,o),o):r(o,a);return i===H.Name&&!(c instanceof H.Name)?n(s,c):c}}C.mergeEvaluated={props:fu({mergeNames:(t,e,r)=>t.if((0,H._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,H._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,H._)`${r} || {}`).code((0,H._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,H._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,H._)`${r} || {}`),Po(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:_u}),items:fu({mergeNames:(t,e,r)=>t.if((0,H._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,H._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,H._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,H._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function _u(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,H._)`{}`);return e!==void 0&&Po(t,r,e),r}C.evaluatedPropsToName=_u;function Po(t,e,r){Object.keys(r).forEach(n=>t.assign((0,H._)`${e}${(0,H.getProperty)(n)}`,!0))}C.setEvaluated=Po;var pu={};function _h(t,e){return t.scopeValue("func",{ref:e,code:pu[e.code]||(pu[e.code]=new uh._Code(e.code))})}C.useFunc=_h;var Eo;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Eo||(C.Type=Eo={}));function gh(t,e,r){if(t instanceof H.Name){let n=e===Eo.Num;return r?n?(0,H._)`"[" + ${t} + "]"`:(0,H._)`"['" + ${t} + "']"`:n?(0,H._)`"/" + ${t}`:(0,H._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,H.getProperty)(t).toString():"/"+So(t)}C.getErrorPath=gh;function gu(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}C.checkStrictMode=gu});var Re=g(To=>{"use strict";f();Object.defineProperty(To,"__esModule",{value:!0});var ie=R(),$h={data:new ie.Name("data"),valCxt:new ie.Name("valCxt"),instancePath:new ie.Name("instancePath"),parentData:new ie.Name("parentData"),parentDataProperty:new ie.Name("parentDataProperty"),rootData:new ie.Name("rootData"),dynamicAnchors:new ie.Name("dynamicAnchors"),vErrors:new ie.Name("vErrors"),errors:new ie.Name("errors"),this:new ie.Name("this"),self:new ie.Name("self"),scope:new ie.Name("scope"),json:new ie.Name("json"),jsonPos:new ie.Name("jsonPos"),jsonLen:new ie.Name("jsonLen"),jsonPart:new ie.Name("jsonPart")};To.default=$h});var Lr=g(ce=>{"use strict";f();Object.defineProperty(ce,"__esModule",{value:!0});ce.extendErrors=ce.resetErrorsCount=ce.reportExtraError=ce.reportError=ce.keyword$DataError=ce.keywordError=void 0;var x=R(),Hn=D(),pe=Re();ce.keywordError={message:({keyword:t})=>(0,x.str)`must pass "${t}" keyword validation`};ce.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,x.str)`"${t}" keyword must be ${e} ($data)`:(0,x.str)`"${t}" keyword is invalid ($data)`};function vh(t,e=ce.keywordError,r,n){let{it:s}=t,{gen:o,compositeRule:a,allErrors:i}=s,c=wu(t,e,r);n??(a||i)?$u(o,c):vu(s,(0,x._)`[${c}]`)}ce.reportError=vh;function wh(t,e=ce.keywordError,r){let{it:n}=t,{gen:s,compositeRule:o,allErrors:a}=n,i=wu(t,e,r);$u(s,i),o||a||vu(n,pe.default.vErrors)}ce.reportExtraError=wh;function bh(t,e){t.assign(pe.default.errors,e),t.if((0,x._)`${pe.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,x._)`${pe.default.vErrors}.length`,e),()=>t.assign(pe.default.vErrors,null)))}ce.resetErrorsCount=bh;function Eh({gen:t,keyword:e,schemaValue:r,data:n,errsCount:s,it:o}){if(s===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",s,pe.default.errors,i=>{t.const(a,(0,x._)`${pe.default.vErrors}[${i}]`),t.if((0,x._)`${a}.instancePath === undefined`,()=>t.assign((0,x._)`${a}.instancePath`,(0,x.strConcat)(pe.default.instancePath,o.errorPath))),t.assign((0,x._)`${a}.schemaPath`,(0,x.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,x._)`${a}.schema`,r),t.assign((0,x._)`${a}.data`,n))})}ce.extendErrors=Eh;function $u(t,e){let r=t.const("err",e);t.if((0,x._)`${pe.default.vErrors} === null`,()=>t.assign(pe.default.vErrors,(0,x._)`[${r}]`),(0,x._)`${pe.default.vErrors}.push(${r})`),t.code((0,x._)`${pe.default.errors}++`)}function vu(t,e){let{gen:r,validateName:n,schemaEnv:s}=t;s.$async?r.throw((0,x._)`new ${t.ValidationError}(${e})`):(r.assign((0,x._)`${n}.errors`,e),r.return(!1))}var Ct={keyword:new x.Name("keyword"),schemaPath:new x.Name("schemaPath"),params:new x.Name("params"),propertyName:new x.Name("propertyName"),message:new x.Name("message"),schema:new x.Name("schema"),parentSchema:new x.Name("parentSchema")};function wu(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,x._)`{}`:Sh(t,e,r)}function Sh(t,e,r={}){let{gen:n,it:s}=t,o=[Ph(s,r),Th(t,r)];return kh(t,e,o),n.object(...o)}function Ph({errorPath:t},{instancePath:e}){let r=e?(0,x.str)`${t}${(0,Hn.getErrorPath)(e,Hn.Type.Str)}`:t;return[pe.default.instancePath,(0,x.strConcat)(pe.default.instancePath,r)]}function Th({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let s=n?e:(0,x.str)`${e}/${t}`;return r&&(s=(0,x.str)`${s}${(0,Hn.getErrorPath)(r,Hn.Type.Str)}`),[Ct.schemaPath,s]}function kh(t,{params:e,message:r},n){let{keyword:s,data:o,schemaValue:a,it:i}=t,{opts:c,propertyName:d,topSchemaRef:u,schemaPath:l}=i;n.push([Ct.keyword,s],[Ct.params,typeof e=="function"?e(t):e||(0,x._)`{}`]),c.messages&&n.push([Ct.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Ct.schema,a],[Ct.parentSchema,(0,x._)`${u}${l}`],[pe.default.data,o]),d&&n.push([Ct.propertyName,d])}});var Eu=g(Zt=>{"use strict";f();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.boolOrEmptySchema=Zt.topBoolOrEmptySchema=void 0;var Rh=Lr(),Oh=R(),Nh=Re(),jh={message:"boolean schema is false"};function Ah(t){let{gen:e,schema:r,validateName:n}=t;r===!1?bu(t,!1):typeof r=="object"&&r.$async===!0?e.return(Nh.default.data):(e.assign((0,Oh._)`${n}.errors`,null),e.return(!0))}Zt.topBoolOrEmptySchema=Ah;function Ih(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),bu(t)):r.var(e,!0)}Zt.boolOrEmptySchema=Ih;function bu(t,e){let{gen:r,data:n}=t,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Rh.reportError)(s,jh,void 0,e)}});var ko=g(er=>{"use strict";f();Object.defineProperty(er,"__esModule",{value:!0});er.getRules=er.isJSONType=void 0;var Ch=["string","number","integer","boolean","null","object","array"],qh=new Set(Ch);function Dh(t){return typeof t=="string"&&qh.has(t)}er.isJSONType=Dh;function Mh(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}er.getRules=Mh});var Ro=g(ft=>{"use strict";f();Object.defineProperty(ft,"__esModule",{value:!0});ft.shouldUseRule=ft.shouldUseGroup=ft.schemaHasRulesForType=void 0;function Vh({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Su(t,n)}ft.schemaHasRulesForType=Vh;function Su(t,e){return e.rules.some(r=>Pu(t,r))}ft.shouldUseGroup=Su;function Pu(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}ft.shouldUseRule=Pu});var Ur=g(ue=>{"use strict";f();Object.defineProperty(ue,"__esModule",{value:!0});ue.reportTypeError=ue.checkDataTypes=ue.checkDataType=ue.coerceAndCheckDataType=ue.getJSONTypes=ue.getSchemaTypes=ue.DataType=void 0;var xh=ko(),zh=Ro(),Lh=Lr(),O=R(),Tu=D(),tr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(tr||(ue.DataType=tr={}));function Uh(t){let e=ku(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}ue.getSchemaTypes=Uh;function ku(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(xh.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}ue.getJSONTypes=ku;function Fh(t,e){let{gen:r,data:n,opts:s}=t,o=Kh(e,s.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,zh.schemaHasRulesForType)(t,e[0]));if(a){let i=No(e,n,s.strictNumbers,tr.Wrong);r.if(i,()=>{o.length?Gh(t,e,o):jo(t)})}return a}ue.coerceAndCheckDataType=Fh;var Ru=new Set(["string","number","integer","boolean","null"]);function Kh(t,e){return e?t.filter(r=>Ru.has(r)||e==="array"&&r==="array"):[]}function Gh(t,e,r){let{gen:n,data:s,opts:o}=t,a=n.let("dataType",(0,O._)`typeof ${s}`),i=n.let("coerced",(0,O._)`undefined`);o.coerceTypes==="array"&&n.if((0,O._)`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,O._)`${s}[0]`).assign(a,(0,O._)`typeof ${s}`).if(No(e,s,o.strictNumbers),()=>n.assign(i,s))),n.if((0,O._)`${i} !== undefined`);for(let d of r)(Ru.has(d)||d==="array"&&o.coerceTypes==="array")&&c(d);n.else(),jo(t),n.endIf(),n.if((0,O._)`${i} !== undefined`,()=>{n.assign(s,i),Hh(t,i)});function c(d){switch(d){case"string":n.elseIf((0,O._)`${a} == "number" || ${a} == "boolean"`).assign(i,(0,O._)`"" + ${s}`).elseIf((0,O._)`${s} === null`).assign(i,(0,O._)`""`);return;case"number":n.elseIf((0,O._)`${a} == "boolean" || ${s} === null
5
5
  || (${a} == "string" && ${s} && ${s} == +${s})`).assign(i,(0,O._)`+${s}`);return;case"integer":n.elseIf((0,O._)`${a} === "boolean" || ${s} === null
6
6
  || (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(i,(0,O._)`+${s}`);return;case"boolean":n.elseIf((0,O._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(i,!1).elseIf((0,O._)`${s} === "true" || ${s} === 1`).assign(i,!0);return;case"null":n.elseIf((0,O._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(i,null);return;case"array":n.elseIf((0,O._)`${a} === "string" || ${a} === "number"
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{l as i}from"./chunk-I3CV4LOD.js";import{b as o}from"./chunk-GZPNIYVZ.js";o();import l from"node:path";function d(t,n){if(t.getApprovalMode()!=="bogan")return null;let r=l.resolve(n),s=t.getProjectRoot?.()??t.getTargetDir();if(i(r,s))return null;let e=t.getWorkspaceContext?.();if(!e||(typeof e.isPathWithinWorkspaceFresh=="function"?e.isPathWithinWorkspaceFresh(r):e.isPathWithinWorkspace(r)))return null;let a=e.getDirectories?.()??[t.getTargetDir()],p=t.getChannel?.()==="desktop"?"Approve the folder from Matilda Desktop, then retry the write.":"Use --include-directories to add extra roots, or a non-BOGAN approval mode for intentional external writes.";return`Refusing out-of-workspace write in BOGAN mode: ${r}. Workspace root(s): ${a.join(", ")}. This blocks path typos (e.g. writing under $HOME when the project is elsewhere). `+p}export{d as a};
3
+ import{l as i}from"./chunk-E2WUZZFL.js";import{b as o}from"./chunk-GZPNIYVZ.js";o();import l from"node:path";function d(t,n){if(t.getApprovalMode()!=="bogan")return null;let r=l.resolve(n),s=t.getProjectRoot?.()??t.getTargetDir();if(i(r,s))return null;let e=t.getWorkspaceContext?.();if(!e||(typeof e.isPathWithinWorkspaceFresh=="function"?e.isPathWithinWorkspaceFresh(r):e.isPathWithinWorkspace(r)))return null;let a=e.getDirectories?.()??[t.getTargetDir()],p=t.getChannel?.()==="desktop"?"Approve the folder from Matilda Desktop, then retry the write.":"Use --include-directories to add extra roots, or a non-BOGAN approval mode for intentional external writes.";return`Refusing out-of-workspace write in BOGAN mode: ${r}. Workspace root(s): ${a.join(", ")}. This blocks path typos (e.g. writing under $HOME when the project is elsewhere). `+p}export{d as a};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2025 Matilda Team
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{c as p}from"./chunk-JU7QTSKS.js";import{b as h}from"./chunk-7ZODGQO6.js";import{a as M}from"./chunk-GT6MSEK4.js";import{b as d}from"./chunk-62GTGPTP.js";import{S as b,b as f}from"./chunk-NK2QMGCC.js";import{b as u}from"./chunk-GZPNIYVZ.js";import{f as E}from"./chunk-OWGSC52X.js";u();var x=null;function D(){x=null}function _(e,r,t){return x?(x.enqueueApproval({teammateName:e,teammateColor:r,details:t}),!0):!1}function P(e,r,t,o){return{...e,title:`[${r}] ${e.title}`,onConfirm:async(i,s)=>{await t(i,s)}}}u();var C=E(h(),1);import*as a from"node:fs/promises";import*as c from"node:path";var w=b("AGENTS_TEAM_MAILBOX"),N={retries:{retries:10,minTimeout:5,maxTimeout:100,factor:2,randomize:!0},stale:5e3,onCompromised:e=>{w.debug("mailbox lock compromised:",e?.message??e)}},g=new Map;function O(e){let r=g.get(e);return r||(r=new M,g.set(e,r)),r}function I(e){let r=p(e),t=0;for(let o of g.keys())c.dirname(o)===r&&(g.delete(o),t++);return t}async function T(e,r){return O(e).runExclusive(async()=>{let t=await C.default.lock(e,N);try{return await r()}finally{await t()}})}function y(e,r){return c.join(p(e),`${r}.json`)}async function B(e,r){let t=y(e,r);try{let o=await a.readFile(t,"utf-8");return JSON.parse(o)}catch(o){if(f(o)&&o.code==="ENOENT")return[];throw o}}var L=5*60*1e3;async function A(e,r,t){let o=y(e,r);await v(o),await T(o,async()=>{let i=await k(o),s=Date.now()-L,l=i.filter(m=>{if(!m.read)return!0;let n=Date.parse(m.timestamp);return Number.isNaN(n)||n>=s});l.push(t),await d(o,l)})}async function W(e,r,t){let o=y(e,r);return await v(o),T(o,async()=>{let i=await k(o),s=n=>!n.read&&(t===void 0||n.type===t),l=i.filter(s);if(l.length===0)return[];let m=i.map(n=>s(n)?{...n,read:!0}:n);return await d(o,m),l})}async function X(e){let r=p(e);await a.rm(r,{recursive:!0,force:!0}),I(e)}async function z(e,r,t){await A(e,r,{from:t.from,text:t.text,timestamp:new Date().toISOString(),read:!1,type:t.type,color:t.color,summary:t.summary})}async function v(e){await a.mkdir(c.dirname(e),{recursive:!0});try{await a.writeFile(e,`[]
3
+ import{c as p}from"./chunk-OIJ6FGWD.js";import{b as h}from"./chunk-7ZODGQO6.js";import{a as M}from"./chunk-GT6MSEK4.js";import{b as d}from"./chunk-5WRYWBB4.js";import{S as b,b as f}from"./chunk-XYAIE36G.js";import{b as u}from"./chunk-GZPNIYVZ.js";import{f as E}from"./chunk-OWGSC52X.js";u();var x=null;function D(){x=null}function _(e,r,t){return x?(x.enqueueApproval({teammateName:e,teammateColor:r,details:t}),!0):!1}function P(e,r,t,o){return{...e,title:`[${r}] ${e.title}`,onConfirm:async(i,s)=>{await t(i,s)}}}u();var C=E(h(),1);import*as a from"node:fs/promises";import*as c from"node:path";var w=b("AGENTS_TEAM_MAILBOX"),N={retries:{retries:10,minTimeout:5,maxTimeout:100,factor:2,randomize:!0},stale:5e3,onCompromised:e=>{w.debug("mailbox lock compromised:",e?.message??e)}},g=new Map;function O(e){let r=g.get(e);return r||(r=new M,g.set(e,r)),r}function I(e){let r=p(e),t=0;for(let o of g.keys())c.dirname(o)===r&&(g.delete(o),t++);return t}async function T(e,r){return O(e).runExclusive(async()=>{let t=await C.default.lock(e,N);try{return await r()}finally{await t()}})}function y(e,r){return c.join(p(e),`${r}.json`)}async function B(e,r){let t=y(e,r);try{let o=await a.readFile(t,"utf-8");return JSON.parse(o)}catch(o){if(f(o)&&o.code==="ENOENT")return[];throw o}}var L=5*60*1e3;async function A(e,r,t){let o=y(e,r);await v(o),await T(o,async()=>{let i=await k(o),s=Date.now()-L,l=i.filter(m=>{if(!m.read)return!0;let n=Date.parse(m.timestamp);return Number.isNaN(n)||n>=s});l.push(t),await d(o,l)})}async function W(e,r,t){let o=y(e,r);return await v(o),T(o,async()=>{let i=await k(o),s=n=>!n.read&&(t===void 0||n.type===t),l=i.filter(s);if(l.length===0)return[];let m=i.map(n=>s(n)?{...n,read:!0}:n);return await d(o,m),l})}async function X(e){let r=p(e);await a.rm(r,{recursive:!0,force:!0}),I(e)}async function z(e,r,t){await A(e,r,{from:t.from,text:t.text,timestamp:new Date().toISOString(),read:!1,type:t.type,color:t.color,summary:t.summary})}async function v(e){await a.mkdir(c.dirname(e),{recursive:!0});try{await a.writeFile(e,`[]
4
4
  `,{flag:"wx"})}catch(r){if(!f(r)||r.code!=="EEXIST")throw r}}async function k(e){try{let r=await a.readFile(e,"utf-8");return JSON.parse(r)}catch(r){if(f(r)&&r.code==="ENOENT")return[];let t=r instanceof Error?r.message:String(r);w.warn(`Quarantining corrupt inbox at ${e}: ${t}`);try{await a.rename(e,`${e}.corrupt-${Date.now()}`)}catch(o){let i=o instanceof Error?o.message:String(o);throw w.warn(`Failed to quarantine ${e}: ${i}`),r instanceof Error?r:new Error(`Failed to read inbox at ${e}: ${t}`)}return[]}}export{D as a,_ as b,P as c,I as d,y as e,B as f,A as g,W as h,X as i,z as j};
5
5
  /**
6
6
  * @license
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{f as o,g as a,m as u,n}from"./chunk-DB5LMKXU.js";import{b as s}from"./chunk-GZPNIYVZ.js";s();var i=`Submit your final answer as structured JSON that conforms to the provided schema.
3
+ import{f as o,g as a,m as u,n}from"./chunk-R5KAUFJR.js";import{b as s}from"./chunk-GZPNIYVZ.js";s();var i=`Submit your final answer as structured JSON that conforms to the provided schema.
4
4
 
5
5
  CRITICAL: In structured-output mode, this is the ONLY way to deliver the final result. Call this tool to deliver the final result; the first call with valid arguments ends the session. Do not emit the final answer as plain text \u2014 it will be discarded. Use other tools (Read, Grep, etc.) to gather the information you need before calling this tool.
6
6