zen-code 4.9.2 → 4.10.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 (133) hide show
  1. package/dist/app.js +94 -128
  2. package/dist/chunk-075hks9v.js +1 -0
  3. package/dist/chunk-0fj768k4.js +112 -0
  4. package/dist/chunk-19mf2aa7.js +1 -0
  5. package/dist/chunk-1mq2jmfy.js +2 -0
  6. package/dist/chunk-1v863afn.js +278 -0
  7. package/dist/chunk-1vn8d8b8.js +1 -0
  8. package/dist/{chunk-hfypkhky.js → chunk-1w19w1bm.js} +1 -1
  9. package/dist/chunk-3dnayvgx.js +224 -0
  10. package/dist/chunk-4hg13vwj.js +1 -0
  11. package/dist/chunk-4scrkcqv.js +1 -0
  12. package/dist/chunk-54cdhhqm.js +1 -0
  13. package/dist/chunk-5m4yb9av.js +91 -0
  14. package/dist/chunk-5yd4ntp6.js +8 -0
  15. package/dist/{chunk-dxec2q4t.js → chunk-6scjjkn3.js} +1 -1
  16. package/dist/{chunk-hmemx3cw.js → chunk-7jatn15w.js} +2 -2
  17. package/dist/{chunk-0pss3s5r.js → chunk-7w9y11hj.js} +1 -1
  18. package/dist/chunk-7yzv6385.js +1 -0
  19. package/dist/{chunk-ce53j63y.js → chunk-875hayaj.js} +3 -3
  20. package/dist/chunk-8bs8r50r.js +1 -0
  21. package/dist/{chunk-x552nspp.js → chunk-8waww0j9.js} +2 -2
  22. package/dist/chunk-8ysg0rga.js +1 -0
  23. package/dist/chunk-9czhw5k6.js +4 -0
  24. package/dist/chunk-9tgp14v7.js +16 -0
  25. package/dist/{chunk-yndex7hs.js → chunk-a239dn0b.js} +1 -1
  26. package/dist/chunk-arv4h3h1.js +2 -0
  27. package/dist/chunk-b2551zfb.js +2 -0
  28. package/dist/chunk-b9emn03n.js +1 -0
  29. package/dist/chunk-bm7578sn.js +1 -0
  30. package/dist/{chunk-62zh99t6.js → chunk-bytq4kd1.js} +3 -125
  31. package/dist/chunk-c2wfgbj6.js +1 -0
  32. package/dist/{chunk-0zk0m93z.js → chunk-cef4vbtb.js} +1 -1
  33. package/dist/{chunk-hsev32dg.js → chunk-cnzhxgn5.js} +2 -2
  34. package/dist/chunk-d2770b2z.js +1 -0
  35. package/dist/chunk-d72063sm.js +2 -0
  36. package/dist/{chunk-6nfpdtn6.js → chunk-d988tv30.js} +1 -1
  37. package/dist/{chunk-55nx49pj.js → chunk-dx9k6sdd.js} +3 -3
  38. package/dist/chunk-e6ggkg36.js +2 -0
  39. package/dist/{chunk-x90r4sje.js → chunk-fjqtrakn.js} +1 -1
  40. package/dist/chunk-gbfpab0j.js +1 -0
  41. package/dist/chunk-gkvx829z.js +1 -0
  42. package/dist/{chunk-94jawhw7.js → chunk-gwf8b14k.js} +1 -1
  43. package/dist/chunk-gz7fz9fg.js +1 -0
  44. package/dist/{chunk-48vkm1yn.js → chunk-h0q3dvnv.js} +2 -2
  45. package/dist/chunk-h0qb9jk1.js +1 -0
  46. package/dist/chunk-h9y136h8.js +1 -0
  47. package/dist/chunk-hrcxdj3c.js +54 -0
  48. package/dist/chunk-hz9yw7cs.js +166 -0
  49. package/dist/{chunk-98wjxsna.js → chunk-j4y5rjne.js} +1 -1
  50. package/dist/chunk-k12y05c3.js +3 -0
  51. package/dist/{chunk-fkrydbn4.js → chunk-k6fxqssr.js} +3 -3
  52. package/dist/{chunk-vfwbx331.js → chunk-kmxdq21k.js} +2 -2
  53. package/dist/chunk-mcb8rewr.js +213 -0
  54. package/dist/{chunk-9k64296h.js → chunk-mm9w91rj.js} +1 -1
  55. package/dist/chunk-mv0xzmq8.js +2 -0
  56. package/dist/{chunk-rztre6k0.js → chunk-n849zsd3.js} +1 -1
  57. package/dist/chunk-nm253hhf.js +81 -0
  58. package/dist/{chunk-gyhxdxb4.js → chunk-prg6489q.js} +1 -1
  59. package/dist/{chunk-pwrscdkf.js → chunk-pxdgy0vr.js} +1 -1
  60. package/dist/{chunk-frhhpxxy.js → chunk-qhzm2qw9.js} +2 -2
  61. package/dist/{chunk-8f2zh5h6.js → chunk-qmxtys9q.js} +2 -2
  62. package/dist/chunk-r0cfe5c1.js +294 -0
  63. package/dist/chunk-rtjytfhh.js +1 -0
  64. package/dist/chunk-s7ttf0pm.js +2 -0
  65. package/dist/{chunk-k38fjqj7.js → chunk-t01t72t2.js} +2 -2
  66. package/dist/{chunk-fw3nrwpf.js → chunk-t0f66x64.js} +1 -1
  67. package/dist/chunk-tn356gwf.js +93 -0
  68. package/dist/chunk-vd8kwzra.js +41 -0
  69. package/dist/chunk-vhn13anh.js +233 -0
  70. package/dist/chunk-vnewbtjy.js +1 -0
  71. package/dist/{chunk-hfegb4pr.js → chunk-wbm7rn9w.js} +2 -2
  72. package/dist/chunk-wd3gkd45.js +3 -0
  73. package/dist/chunk-whdf0vbb.js +1 -0
  74. package/dist/{chunk-r019959h.js → chunk-ws232ksq.js} +2 -2
  75. package/dist/{chunk-rt5mpgbg.js → chunk-yerf10k7.js} +2 -2
  76. package/dist/{chunk-pndhbee8.js → chunk-yzv3n8mw.js} +2 -2
  77. package/dist/chunk-z3e4c424.js +2 -0
  78. package/dist/{chunk-jb4yt88g.js → chunk-znw7fpep.js} +2 -2
  79. package/dist/chunk-zq2g4rfd.js +1 -0
  80. package/dist/cli.js +1 -1
  81. package/dist/nonInteractive.js +314 -4
  82. package/dist/zen-keyboard.js +1 -1
  83. package/package.json +37 -37
  84. package/dist/chunk-0sxrk9sx.js +0 -1
  85. package/dist/chunk-178yjjsx.js +0 -1
  86. package/dist/chunk-1p9xzvpt.js +0 -3
  87. package/dist/chunk-2eh0sv3s.js +0 -2
  88. package/dist/chunk-43xrz4wp.js +0 -2
  89. package/dist/chunk-48ce2wt0.js +0 -1
  90. package/dist/chunk-578m1dhj.js +0 -2
  91. package/dist/chunk-5dsevrtz.js +0 -91
  92. package/dist/chunk-66890qd3.js +0 -2
  93. package/dist/chunk-738m8242.js +0 -53
  94. package/dist/chunk-8ty2zfve.js +0 -3
  95. package/dist/chunk-9b7nj74j.js +0 -1
  96. package/dist/chunk-9x562s6p.js +0 -1
  97. package/dist/chunk-a90fm6gz.js +0 -278
  98. package/dist/chunk-ac5t2ywn.js +0 -100
  99. package/dist/chunk-ad2hbq42.js +0 -1
  100. package/dist/chunk-afhxxkmv.js +0 -16
  101. package/dist/chunk-b4vvgbav.js +0 -1
  102. package/dist/chunk-b9pcntkv.js +0 -253
  103. package/dist/chunk-c7y5efa0.js +0 -1
  104. package/dist/chunk-cbjnwrt7.js +0 -2
  105. package/dist/chunk-dcs1r9as.js +0 -2
  106. package/dist/chunk-dcwnpdtk.js +0 -9
  107. package/dist/chunk-e3tyc24s.js +0 -310
  108. package/dist/chunk-e8hp8d68.js +0 -81
  109. package/dist/chunk-h1enhch1.js +0 -2
  110. package/dist/chunk-hcnx1j2z.js +0 -1
  111. package/dist/chunk-hra0748z.js +0 -2
  112. package/dist/chunk-hyf24r36.js +0 -2
  113. package/dist/chunk-jjcmm167.js +0 -1
  114. package/dist/chunk-jrepjpft.js +0 -2
  115. package/dist/chunk-kym9tb01.js +0 -1
  116. package/dist/chunk-mt1g6g89.js +0 -1
  117. package/dist/chunk-p0vzbr7s.js +0 -585
  118. package/dist/chunk-r10bn684.js +0 -1
  119. package/dist/chunk-r3pe49q4.js +0 -8
  120. package/dist/chunk-r4tq44hr.js +0 -1
  121. package/dist/chunk-rjrnaka2.js +0 -1
  122. package/dist/chunk-s77qbhtz.js +0 -3
  123. package/dist/chunk-t7rwtc17.js +0 -1
  124. package/dist/chunk-v8g52kan.js +0 -1
  125. package/dist/chunk-vd6c87cm.js +0 -2
  126. package/dist/chunk-vh9zd1v3.js +0 -5
  127. package/dist/chunk-w2hbsa9j.js +0 -86
  128. package/dist/chunk-wabmqprd.js +0 -184
  129. package/dist/chunk-wpy5r9ma.js +0 -40
  130. package/dist/chunk-yqwxbcc7.js +0 -31
  131. package/dist/chunk-z8n7y37k.js +0 -1
  132. package/dist/chunk-zr7sx9hd.js +0 -1
  133. package/dist/chunk-zxqmghzf.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as A,b as W}from"./chunk-yerf10k7.js";import"./chunk-qmxtys9q.js";import{Fg as q,_g as R}from"./chunk-hz9yw7cs.js";import"./chunk-tn356gwf.js";import"./chunk-n849zsd3.js";import"./chunk-vd8kwzra.js";import"./chunk-arv4h3h1.js";import{Fl as V}from"./chunk-z3e4c424.js";var x=V(W(),1);function B(M){if(M===null||typeof M!=="object")return JSON.stringify(M);if(Array.isArray(M))return JSON.stringify(M.map((J)=>B(J)));let F={},G=Object.keys(M).sort();for(let J of G)F[J]=M[J];return JSON.stringify(F,(J,Q)=>{if(Q!==null&&typeof Q==="object"&&!Array.isArray(Q)){let X={},Y=Object.keys(Q).sort();for(let Z of Y)X[Z]=Q[Z];return X}return Q})}var P=[{index:"checkpoints",prefix:"checkpoint:",schema:{"$.thread_id":{type:"TAG",AS:"thread_id"},"$.checkpoint_ns":{type:"TAG",AS:"checkpoint_ns"},"$.checkpoint_id":{type:"TAG",AS:"checkpoint_id"},"$.parent_checkpoint_id":{type:"TAG",AS:"parent_checkpoint_id"},"$.checkpoint_ts":{type:"NUMERIC",AS:"checkpoint_ts"},"$.has_writes":{type:"TAG",AS:"has_writes"},"$.source":{type:"TAG",AS:"source"},"$.step":{type:"NUMERIC",AS:"step"}}},{index:"checkpoint_writes",prefix:"checkpoint_write:",schema:{"$.thread_id":{type:"TAG",AS:"thread_id"},"$.checkpoint_ns":{type:"TAG",AS:"checkpoint_ns"},"$.checkpoint_id":{type:"TAG",AS:"checkpoint_id"},"$.task_id":{type:"TAG",AS:"task_id"},"$.idx":{type:"NUMERIC",AS:"idx"},"$.channel":{type:"TAG",AS:"channel"},"$.type":{type:"TAG",AS:"type"}}}],N=class M extends R{client;ttlConfig;constructor(F,G){super();this.client=F,this.ttlConfig=G}static async fromUrl(F,G){let J=x.createClient({url:F});await J.connect();let Q=new M(J,G);return await Q.ensureIndexes(),Q}async get(F){return(await this.getTuple(F))?.checkpoint}async put(F,G,J,Q){await this.ensureIndexes();let X=F.configurable?.thread_id,Y=F.configurable?.checkpoint_ns??"",Z=F.configurable?.checkpoint_id;if(!X)throw Error("thread_id is required");let _=G.id||q(0),E=`checkpoint:${X}:${Y}:shallow`,H=null,$=null;try{if(H=await this.client.json.get(E),H&&typeof H==="object")$=H.checkpoint_id}catch(O){}if($&&$!==_)await this.cleanupOldCheckpoint(X,Y,$);let L={...G,channel_values:G.channel_values||{},channel_blobs:void 0},U={thread_id:X,checkpoint_ns:Y,checkpoint_id:_,parent_checkpoint_id:Z||null,checkpoint:L,metadata:this.sanitizeMetadata(J),checkpoint_ts:Date.now(),has_writes:"false"};if(this.addSearchableMetadataFields(U,J),await this.client.json.set(E,"$",U),this.ttlConfig?.defaultTTL)await this.applyTTL(E);return{configurable:{thread_id:X,checkpoint_ns:Y,checkpoint_id:_}}}async getTuple(F){let G=F.configurable?.thread_id,J=F.configurable?.checkpoint_ns??"",Q=F.configurable?.checkpoint_id;if(!G)return;let X=`checkpoint:${G}:${J}:shallow`,Y=await this.client.json.get(X);if(!Y)return;if(Q&&Y.checkpoint_id!==Q)return;if(this.ttlConfig?.refreshOnRead&&this.ttlConfig?.defaultTTL)await this.applyTTL(X);let Z=await this.serde.loadsTyped("json",JSON.stringify(Y.checkpoint)),_;if(Y.has_writes==="true")_=await this.loadPendingWrites(Y.thread_id,Y.checkpoint_ns,Y.checkpoint_id);return await this.createCheckpointTuple(Y,Z,_)}async*list(F,G){if(await this.ensureIndexes(),F?.configurable?.thread_id){let J=await this.getTuple(F);if(J)if(G?.filter){if(this.checkMetadataFilterMatch(J.metadata,G.filter))yield J}else yield J}else{let J=[];if(G?.filter){for(let[Y,Z]of Object.entries(G.filter))if(Z===void 0);else if(Z===null);else if(typeof Z==="string"){let _=A(Y),E=A(Z);J.push(`(@${_}:{${E}})`)}else if(typeof Z==="number"){let _=A(Y);J.push(`(@${_}:[${Z} ${Z}])`)}}if(J.length===0)J.push("*");let Q=J.join(" "),X=G?.limit??10;try{let Y=await this.client.ft.search("checkpoints",Q,{LIMIT:{from:0,size:X*2},SORTBY:{BY:"checkpoint_ts",DIRECTION:"DESC"}}),Z=new Set,_=0;for(let E of Y.documents){if(_>=X)break;let H=E.value,$=`${H.thread_id}:${H.checkpoint_ns}`;if(Z.has($))continue;if(Z.add($),G?.filter){if(!this.checkMetadataFilterMatch(H.metadata,G.filter))continue}let L=await this.serde.loadsTyped("json",JSON.stringify(H.checkpoint));yield await this.createCheckpointTuple(H,L),_++}}catch(Y){if(Y.message?.includes("no such index")){let Z=await this.client.keys("checkpoint:*:*:shallow");if(Z.length===0)return;Z.sort().reverse();let _=new Set,E=0,H=G?.limit??10;for(let $ of Z){if(E>=H)break;let L=await this.client.json.get($);if(!L)continue;let U=`${L.thread_id}:${L.checkpoint_ns}`;if(_.has(U))continue;if(_.add(U),G?.filter){if(!this.checkMetadataFilterMatch(L.metadata,G.filter))continue}let O=await this.serde.loadsTyped("json",JSON.stringify(L.checkpoint));yield await this.createCheckpointTuple(L,O),E++}return}throw Y}}}async putWrites(F,G,J){await this.ensureIndexes();let Q=F.configurable?.thread_id,X=F.configurable?.checkpoint_ns??"",Y=F.configurable?.checkpoint_id;if(!Q||!Y)throw Error("thread_id and checkpoint_id are required");let Z=`checkpoint_write:${Q}:${X}:${Y}:${J}:*`,_=await this.client.keys(Z);if(_.length>0)await this.client.del(_);let E=[];for(let $=0;$<G.length;$++){let[L,U]=G[$],O=`checkpoint_write:${Q}:${X}:${Y}:${J}:${$}`;E.push(O);let T={thread_id:Q,checkpoint_ns:X,checkpoint_id:Y,task_id:J,idx:$,channel:L,type:typeof U==="object"?"json":"string",value:U};await this.client.json.set(O,"$",T)}if(E.length>0){let $=`write_keys_zset:${Q}:${X}:${Y}`,L={};if(E.forEach((U,O)=>{L[U]=O}),await this.client.zAdd($,Object.entries(L).map(([U,O])=>({score:O,value:U}))),this.ttlConfig?.defaultTTL)await this.applyTTL(...E,$)}let H=`checkpoint:${Q}:${X}:shallow`;if(await this.client.exists(H)){let $=await this.client.json.get(H);if($)$.has_writes="true",await this.client.json.set(H,"$",$)}}async deleteThread(F){let G=`checkpoint:${F}:*:shallow`,J=await this.client.keys(G);if(J.length>0)await this.client.del(J);let Q=`checkpoint_write:${F}:*`,X=await this.client.keys(Q);if(X.length>0)await this.client.del(X);let Y=`write_keys_zset:${F}:*`,Z=await this.client.keys(Y);if(Z.length>0)await this.client.del(Z)}async end(){await this.client.quit()}addSearchableMetadataFields(F,G){if(!G)return;if("source"in G)F.source=G.source;if("step"in G)F.step=G.step;if("writes"in G)F.writes=typeof G.writes==="object"?JSON.stringify(G.writes):G.writes;if("score"in G)F.score=G.score}async createCheckpointTuple(F,G,J){let Q=await this.serde.loadsTyped("json",JSON.stringify(F.metadata));return{config:{configurable:{thread_id:F.thread_id,checkpoint_ns:F.checkpoint_ns,checkpoint_id:F.checkpoint_id}},checkpoint:G,metadata:Q,parentConfig:F.parent_checkpoint_id?{configurable:{thread_id:F.thread_id,checkpoint_ns:F.checkpoint_ns,checkpoint_id:F.parent_checkpoint_id}}:void 0,pendingWrites:J}}async applyTTL(...F){if(!this.ttlConfig?.defaultTTL)return;let G=Math.floor(this.ttlConfig.defaultTTL*60),J=await Promise.allSettled(F.map((Q)=>this.client.expire(Q,G)));for(let Q=0;Q<J.length;Q++)if(J[Q].status==="rejected")console.warn(`Failed to set TTL for key ${F[Q]}:`,J[Q].reason)}async loadPendingWrites(F,G,J){let Q=`write_keys_zset:${F}:${G}:${J}`,X=await this.client.zRange(Q,0,-1);if(X.length===0)return;let Y=[];for(let Z of X){let _=await this.client.json.get(Z);if(_){let E=await this.serde.loadsTyped("json",JSON.stringify(_.value));Y.push([_.task_id,_.channel,E])}}return Y}checkMetadataFilterMatch(F,G){for(let[J,Q]of Object.entries(G)){let X=F?.[J];if(Q===null){if(!(J in(F||{}))||X!==null)return!1}else if(typeof Q==="object"&&!Array.isArray(Q)){if(typeof X!=="object"||X===null)return!1;if(B(Q)!==B(X))return!1}else if(X!==Q)return!1}return!0}async cleanupOldCheckpoint(F,G,J){let Q=`checkpoint_write:${F}:${G}:${J}:*`,X=await this.client.keys(Q);if(X.length>0)await this.client.del(X);let Y=`write_keys_zset:${F}:${G}:${J}`;await this.client.del(Y);let Z=`checkpoint_blob:${F}:${G}:${J}:*`,_=await this.client.keys(Z);if(_.length>0)await this.client.del(_)}sanitizeMetadata(F){if(!F)return{};let G={};for(let[J,Q]of Object.entries(F)){let X=J.replace(/\x00/g,"");G[X]=typeof Q==="string"?Q.replace(/\x00/g,""):Q}return G}async ensureIndexes(){for(let F of P)try{await this.client.ft.create(F.index,F.schema,{ON:"JSON",PREFIX:F.prefix})}catch(G){if(!G.message?.includes("Index already exists"))console.error(`Failed to create index ${F.index}:`,G.message)}}};export{N as ShallowRedisSaver};
@@ -0,0 +1,2 @@
1
+ import{vf as B}from"./chunk-0fj768k4.js";import{xf as z}from"./chunk-1mq2jmfy.js";import{dg as q,eg as v}from"./chunk-3dnayvgx.js";async function O(x){let D=await q(x);return new v({agents:D,stateSchema:z,async createAgent(E,G,H){return await B(G.subagent_id,x,H,{},{parent_id:E})}})}
2
+ export{O as nf};
@@ -1,4 +1,4 @@
1
- import{qq as O,tq as n0}from"./chunk-dcs1r9as.js";var w=O((q9)=>{var Nq=Symbol.for("yaml.alias"),k$=Symbol.for("yaml.document"),k0=Symbol.for("yaml.map"),v$=Symbol.for("yaml.pair"),bq=Symbol.for("yaml.scalar"),v0=Symbol.for("yaml.seq"),x=Symbol.for("yaml.node.type"),sU=(q)=>!!q&&typeof q==="object"&&q[x]===Nq,iU=(q)=>!!q&&typeof q==="object"&&q[x]===k$,rU=(q)=>!!q&&typeof q==="object"&&q[x]===k0,nU=(q)=>!!q&&typeof q==="object"&&q[x]===v$,m$=(q)=>!!q&&typeof q==="object"&&q[x]===bq,oU=(q)=>!!q&&typeof q==="object"&&q[x]===v0;function p$(q){if(q&&typeof q==="object")switch(q[x]){case k0:case v0:return!0}return!1}function tU(q){if(q&&typeof q==="object")switch(q[x]){case Nq:case k0:case bq:case v0:return!0}return!1}var eU=(q)=>(m$(q)||p$(q))&&!!q.anchor;q9.ALIAS=Nq;q9.DOC=k$;q9.MAP=k0;q9.NODE_TYPE=x;q9.PAIR=v$;q9.SCALAR=bq;q9.SEQ=v0;q9.hasAnchor=eU;q9.isAlias=sU;q9.isCollection=p$;q9.isDocument=iU;q9.isMap=rU;q9.isNode=tU;q9.isPair=nU;q9.isScalar=m$;q9.isSeq=oU});var W0=O((R9)=>{var j=w(),C=Symbol("break visit"),d$=Symbol("skip children"),h=Symbol("remove node");function m0(q,$){let U=l$($);if(j.isDocument(q)){if(X0(null,q.contents,U,Object.freeze([q]))===h)q.contents=null}else X0(null,q,U,Object.freeze([]))}m0.BREAK=C;m0.SKIP=d$;m0.REMOVE=h;function X0(q,$,U,H){let X=a$(q,$,U,H);if(j.isNode(X)||j.isPair(X))return c$(q,H,X),X0(q,X,U,H);if(typeof X!=="symbol"){if(j.isCollection($)){H=Object.freeze(H.concat($));for(let Z=0;Z<$.items.length;++Z){let G=X0(Z,$.items[Z],U,H);if(typeof G==="number")Z=G-1;else if(G===C)return C;else if(G===h)$.items.splice(Z,1),Z-=1}}else if(j.isPair($)){H=Object.freeze(H.concat($));let Z=X0("key",$.key,U,H);if(Z===C)return C;else if(Z===h)$.key=null;let G=X0("value",$.value,U,H);if(G===C)return C;else if(G===h)$.value=null}}return X}async function p0(q,$){let U=l$($);if(j.isDocument(q)){if(await Z0(null,q.contents,U,Object.freeze([q]))===h)q.contents=null}else await Z0(null,q,U,Object.freeze([]))}p0.BREAK=C;p0.SKIP=d$;p0.REMOVE=h;async function Z0(q,$,U,H){let X=await a$(q,$,U,H);if(j.isNode(X)||j.isPair(X))return c$(q,H,X),Z0(q,X,U,H);if(typeof X!=="symbol"){if(j.isCollection($)){H=Object.freeze(H.concat($));for(let Z=0;Z<$.items.length;++Z){let G=await Z0(Z,$.items[Z],U,H);if(typeof G==="number")Z=G-1;else if(G===C)return C;else if(G===h)$.items.splice(Z,1),Z-=1}}else if(j.isPair($)){H=Object.freeze(H.concat($));let Z=await Z0("key",$.key,U,H);if(Z===C)return C;else if(Z===h)$.key=null;let G=await Z0("value",$.value,U,H);if(G===C)return C;else if(G===h)$.value=null}}return X}function l$(q){if(typeof q==="object"&&(q.Collection||q.Node||q.Value))return Object.assign({Alias:q.Node,Map:q.Node,Scalar:q.Node,Seq:q.Node},q.Value&&{Map:q.Value,Scalar:q.Value,Seq:q.Value},q.Collection&&{Map:q.Collection,Seq:q.Collection},q);return q}function a$(q,$,U,H){if(typeof U==="function")return U(q,$,H);if(j.isMap($))return U.Map?.(q,$,H);if(j.isSeq($))return U.Seq?.(q,$,H);if(j.isPair($))return U.Pair?.(q,$,H);if(j.isScalar($))return U.Scalar?.(q,$,H);if(j.isAlias($))return U.Alias?.(q,$,H);return}function c$(q,$,U){let H=$[$.length-1];if(j.isCollection(H))H.items[q]=U;else if(j.isPair(H))if(q==="key")H.key=U;else H.value=U;else if(j.isDocument(H))H.contents=U;else{let X=j.isAlias(H)?"alias":"scalar";throw Error(`Cannot replace node with ${X} parent`)}}R9.visit=m0;R9.visitAsync=p0});var Sq=O((A9)=>{var s$=w(),D9=W0(),P9={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},F9=(q)=>q.replace(/[!,[\]{}]/g,($)=>P9[$]);class E{constructor(q,$){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},E.defaultYaml,q),this.tags=Object.assign({},E.defaultTags,$)}clone(){let q=new E(this.yaml,this.tags);return q.docStart=this.docStart,q}atDocument(){let q=new E(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:E.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},E.defaultTags);break}return q}add(q,$){if(this.atNextDocument)this.yaml={explicit:E.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},E.defaultTags),this.atNextDocument=!1;let U=q.trim().split(/[ \t]+/),H=U.shift();switch(H){case"%TAG":{if(U.length!==2){if($(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[X,Z]=U;return this.tags[X]=Z,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return $(0,"%YAML directive should contain exactly one part"),!1;let[X]=U;if(X==="1.1"||X==="1.2")return this.yaml.version=X,!0;else{let Z=/^\d+\.\d+$/.test(X);return $(6,`Unsupported YAML version ${X}`,Z),!1}}default:return $(0,`Unknown directive ${H}`,!0),!1}}tagName(q,$){if(q==="!")return"!";if(q[0]!=="!")return $(`Not a valid tag: ${q}`),null;if(q[1]==="<"){let Z=q.slice(2,-1);if(Z==="!"||Z==="!!")return $(`Verbatim tags aren't resolved, so ${q} is invalid.`),null;if(q[q.length-1]!==">")$("Verbatim tags must end with a >");return Z}let[,U,H]=q.match(/^(.*!)([^!]*)$/s);if(!H)$(`The ${q} tag has no suffix`);let X=this.tags[U];if(X)try{return X+decodeURIComponent(H)}catch(Z){return $(String(Z)),null}if(U==="!")return q;return $(`Could not resolve tag: ${q}`),null}tagString(q){for(let[$,U]of Object.entries(this.tags))if(q.startsWith(U))return $+F9(q.substring(U.length));return q[0]==="!"?q:`!<${q}>`}toString(q){let $=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),H;if(q&&U.length>0&&s$.isNode(q.contents)){let X={};D9.visit(q.contents,(Z,G)=>{if(s$.isNode(G)&&G.tag)X[G.tag]=!0}),H=Object.keys(X)}else H=[];for(let[X,Z]of U){if(X==="!!"&&Z==="tag:yaml.org,2002:")continue;if(!q||H.some((G)=>G.startsWith(Z)))$.push(`%TAG ${X} ${Z}`)}return $.join(`
1
+ import{Hl as O,Kl as n0}from"./chunk-z3e4c424.js";var w=O((q9)=>{var Nq=Symbol.for("yaml.alias"),k$=Symbol.for("yaml.document"),k0=Symbol.for("yaml.map"),v$=Symbol.for("yaml.pair"),bq=Symbol.for("yaml.scalar"),v0=Symbol.for("yaml.seq"),x=Symbol.for("yaml.node.type"),sU=(q)=>!!q&&typeof q==="object"&&q[x]===Nq,iU=(q)=>!!q&&typeof q==="object"&&q[x]===k$,rU=(q)=>!!q&&typeof q==="object"&&q[x]===k0,nU=(q)=>!!q&&typeof q==="object"&&q[x]===v$,m$=(q)=>!!q&&typeof q==="object"&&q[x]===bq,oU=(q)=>!!q&&typeof q==="object"&&q[x]===v0;function p$(q){if(q&&typeof q==="object")switch(q[x]){case k0:case v0:return!0}return!1}function tU(q){if(q&&typeof q==="object")switch(q[x]){case Nq:case k0:case bq:case v0:return!0}return!1}var eU=(q)=>(m$(q)||p$(q))&&!!q.anchor;q9.ALIAS=Nq;q9.DOC=k$;q9.MAP=k0;q9.NODE_TYPE=x;q9.PAIR=v$;q9.SCALAR=bq;q9.SEQ=v0;q9.hasAnchor=eU;q9.isAlias=sU;q9.isCollection=p$;q9.isDocument=iU;q9.isMap=rU;q9.isNode=tU;q9.isPair=nU;q9.isScalar=m$;q9.isSeq=oU});var W0=O((R9)=>{var j=w(),C=Symbol("break visit"),d$=Symbol("skip children"),h=Symbol("remove node");function m0(q,$){let U=l$($);if(j.isDocument(q)){if(X0(null,q.contents,U,Object.freeze([q]))===h)q.contents=null}else X0(null,q,U,Object.freeze([]))}m0.BREAK=C;m0.SKIP=d$;m0.REMOVE=h;function X0(q,$,U,H){let X=a$(q,$,U,H);if(j.isNode(X)||j.isPair(X))return c$(q,H,X),X0(q,X,U,H);if(typeof X!=="symbol"){if(j.isCollection($)){H=Object.freeze(H.concat($));for(let Z=0;Z<$.items.length;++Z){let G=X0(Z,$.items[Z],U,H);if(typeof G==="number")Z=G-1;else if(G===C)return C;else if(G===h)$.items.splice(Z,1),Z-=1}}else if(j.isPair($)){H=Object.freeze(H.concat($));let Z=X0("key",$.key,U,H);if(Z===C)return C;else if(Z===h)$.key=null;let G=X0("value",$.value,U,H);if(G===C)return C;else if(G===h)$.value=null}}return X}async function p0(q,$){let U=l$($);if(j.isDocument(q)){if(await Z0(null,q.contents,U,Object.freeze([q]))===h)q.contents=null}else await Z0(null,q,U,Object.freeze([]))}p0.BREAK=C;p0.SKIP=d$;p0.REMOVE=h;async function Z0(q,$,U,H){let X=await a$(q,$,U,H);if(j.isNode(X)||j.isPair(X))return c$(q,H,X),Z0(q,X,U,H);if(typeof X!=="symbol"){if(j.isCollection($)){H=Object.freeze(H.concat($));for(let Z=0;Z<$.items.length;++Z){let G=await Z0(Z,$.items[Z],U,H);if(typeof G==="number")Z=G-1;else if(G===C)return C;else if(G===h)$.items.splice(Z,1),Z-=1}}else if(j.isPair($)){H=Object.freeze(H.concat($));let Z=await Z0("key",$.key,U,H);if(Z===C)return C;else if(Z===h)$.key=null;let G=await Z0("value",$.value,U,H);if(G===C)return C;else if(G===h)$.value=null}}return X}function l$(q){if(typeof q==="object"&&(q.Collection||q.Node||q.Value))return Object.assign({Alias:q.Node,Map:q.Node,Scalar:q.Node,Seq:q.Node},q.Value&&{Map:q.Value,Scalar:q.Value,Seq:q.Value},q.Collection&&{Map:q.Collection,Seq:q.Collection},q);return q}function a$(q,$,U,H){if(typeof U==="function")return U(q,$,H);if(j.isMap($))return U.Map?.(q,$,H);if(j.isSeq($))return U.Seq?.(q,$,H);if(j.isPair($))return U.Pair?.(q,$,H);if(j.isScalar($))return U.Scalar?.(q,$,H);if(j.isAlias($))return U.Alias?.(q,$,H);return}function c$(q,$,U){let H=$[$.length-1];if(j.isCollection(H))H.items[q]=U;else if(j.isPair(H))if(q==="key")H.key=U;else H.value=U;else if(j.isDocument(H))H.contents=U;else{let X=j.isAlias(H)?"alias":"scalar";throw Error(`Cannot replace node with ${X} parent`)}}R9.visit=m0;R9.visitAsync=p0});var Sq=O((A9)=>{var s$=w(),D9=W0(),P9={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},F9=(q)=>q.replace(/[!,[\]{}]/g,($)=>P9[$]);class E{constructor(q,$){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},E.defaultYaml,q),this.tags=Object.assign({},E.defaultTags,$)}clone(){let q=new E(this.yaml,this.tags);return q.docStart=this.docStart,q}atDocument(){let q=new E(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:E.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},E.defaultTags);break}return q}add(q,$){if(this.atNextDocument)this.yaml={explicit:E.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},E.defaultTags),this.atNextDocument=!1;let U=q.trim().split(/[ \t]+/),H=U.shift();switch(H){case"%TAG":{if(U.length!==2){if($(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[X,Z]=U;return this.tags[X]=Z,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return $(0,"%YAML directive should contain exactly one part"),!1;let[X]=U;if(X==="1.1"||X==="1.2")return this.yaml.version=X,!0;else{let Z=/^\d+\.\d+$/.test(X);return $(6,`Unsupported YAML version ${X}`,Z),!1}}default:return $(0,`Unknown directive ${H}`,!0),!1}}tagName(q,$){if(q==="!")return"!";if(q[0]!=="!")return $(`Not a valid tag: ${q}`),null;if(q[1]==="<"){let Z=q.slice(2,-1);if(Z==="!"||Z==="!!")return $(`Verbatim tags aren't resolved, so ${q} is invalid.`),null;if(q[q.length-1]!==">")$("Verbatim tags must end with a >");return Z}let[,U,H]=q.match(/^(.*!)([^!]*)$/s);if(!H)$(`The ${q} tag has no suffix`);let X=this.tags[U];if(X)try{return X+decodeURIComponent(H)}catch(Z){return $(String(Z)),null}if(U==="!")return q;return $(`Could not resolve tag: ${q}`),null}tagString(q){for(let[$,U]of Object.entries(this.tags))if(q.startsWith(U))return $+F9(q.substring(U.length));return q[0]==="!"?q:`!<${q}>`}toString(q){let $=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),H;if(q&&U.length>0&&s$.isNode(q.contents)){let X={};D9.visit(q.contents,(Z,G)=>{if(s$.isNode(G)&&G.tag)X[G.tag]=!0}),H=Object.keys(X)}else H=[];for(let[X,Z]of U){if(X==="!!"&&Z==="tag:yaml.org,2002:")continue;if(!q||H.some((G)=>G.startsWith(Z)))$.push(`%TAG ${X} ${Z}`)}return $.join(`
2
2
  `)}}E.defaultYaml={explicit:!1,version:"1.2"};E.defaultTags={"!!":"tag:yaml.org,2002:"};A9.Directives=E});var d0=O((b9)=>{var i$=w(),w9=W0();function K9(q){if(/[\x00-\x19\s,[\]{}]/.test(q)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify(q)}`;throw Error(U)}return!0}function r$(q){let $=new Set;return w9.visit(q,{Value(U,H){if(H.anchor)$.add(H.anchor)}}),$}function n$(q,$){for(let U=1;;++U){let H=`${q}${U}`;if(!$.has(H))return H}}function N9(q,$){let U=[],H=new Map,X=null;return{onAnchor:(Z)=>{U.push(Z),X??(X=r$(q));let G=n$($,X);return X.add(G),G},setAnchors:()=>{for(let Z of U){let G=H.get(Z);if(typeof G==="object"&&G.anchor&&(i$.isScalar(G.node)||i$.isCollection(G.node)))G.node.anchor=G.anchor;else{let z=Error("Failed to resolve repeated object (this should not happen)");throw z.source=Z,z}}},sourceObjects:H}}b9.anchorIsValid=K9;b9.anchorNames=r$;b9.createNodeAnchors=N9;b9.findNewAnchor=n$});var jq=O((g9)=>{function O0(q,$,U,H){if(H&&typeof H==="object")if(Array.isArray(H))for(let X=0,Z=H.length;X<Z;++X){let G=H[X],z=O0(q,H,String(X),G);if(z===void 0)delete H[X];else if(z!==G)H[X]=z}else if(H instanceof Map)for(let X of Array.from(H.keys())){let Z=H.get(X),G=O0(q,H,X,Z);if(G===void 0)H.delete(X);else if(G!==Z)H.set(X,G)}else if(H instanceof Set)for(let X of Array.from(H)){let Z=O0(q,H,X,X);if(Z===void 0)H.delete(X);else if(Z!==X)H.delete(X),H.add(Z)}else for(let[X,Z]of Object.entries(H)){let G=O0(q,H,X,Z);if(G===void 0)delete H[X];else if(G!==Z)H[X]=G}return q.call($,U,H)}g9.applyReviver=O0});var m=O((h9)=>{var y9=w();function o$(q,$,U){if(Array.isArray(q))return q.map((H,X)=>o$(H,String(X),U));if(q&&typeof q.toJSON==="function"){if(!U||!y9.hasAnchor(q))return q.toJSON($,U);let H={aliasCount:0,count:1,res:void 0};U.anchors.set(q,H),U.onCreate=(Z)=>{H.res=Z,delete U.onCreate};let X=q.toJSON($,U);if(U.onCreate)U.onCreate(X);return X}if(typeof q==="bigint"&&!U?.keep)return Number(q);return q}h9.toJS=o$});var l0=O((v9)=>{var x9=jq(),t$=w(),k9=m();class e${constructor(q){Object.defineProperty(this,t$.NODE_TYPE,{value:q})}clone(){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)q.range=this.range.slice();return q}toJS(q,{mapAsMap:$,maxAliasCount:U,onAnchor:H,reviver:X}={}){if(!t$.isDocument(q))throw TypeError("A document argument is required");let Z={anchors:new Map,doc:q,keep:!0,mapAsMap:$===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},G=k9.toJS(this,"",Z);if(typeof H==="function")for(let{count:z,res:J}of Z.anchors.values())H(J,z);return typeof X==="function"?x9.applyReviver(X,{"":G},"",G):G}}v9.NodeBase=e$});var R0=O((c9)=>{var p9=d0(),d9=W0(),G0=w(),l9=l0(),a9=m();class q2 extends l9.NodeBase{constructor(q){super(G0.ALIAS);this.source=q,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(q,$){let U;if($?.aliasResolveCache)U=$.aliasResolveCache;else if(U=[],d9.visit(q,{Node:(X,Z)=>{if(G0.isAlias(Z)||G0.hasAnchor(Z))U.push(Z)}}),$)$.aliasResolveCache=U;let H=void 0;for(let X of U){if(X===this)break;if(X.anchor===this.source)H=X}return H}toJSON(q,$){if(!$)return{source:this.source};let{anchors:U,doc:H,maxAliasCount:X}=$,Z=this.resolve(H,$);if(!Z){let z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(z)}let G=U.get(Z);if(!G)a9.toJS(Z,null,$),G=U.get(Z);if(G?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(X>=0){if(G.count+=1,G.aliasCount===0)G.aliasCount=a0(H,Z,U);if(G.count*G.aliasCount>X)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return G.res}toString(q,$,U){let H=`*${this.source}`;if(q){if(p9.anchorIsValid(this.source),q.options.verifyAliasOrder&&!q.anchors.has(this.source)){let X=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(X)}if(q.implicitKey)return`${H} `}return H}}function a0(q,$,U){if(G0.isAlias($)){let H=$.resolve(q),X=U&&H&&U.get(H);return X?X.count*X.aliasCount:0}else if(G0.isCollection($)){let H=0;for(let X of $.items){let Z=a0(q,X,U);if(Z>H)H=Z}return H}else if(G0.isPair($)){let H=a0(q,$.key,U),X=a0(q,$.value,U);return Math.max(H,X)}return 1}c9.Alias=q2});var N=O((t9)=>{var i9=w(),r9=l0(),n9=m(),o9=(q)=>!q||typeof q!=="function"&&typeof q!=="object";class n extends r9.NodeBase{constructor(q){super(i9.SCALAR);this.value=q}toJSON(q,$){return $?.keep?this.value:n9.toJS(this.value,q,$)}toString(){return String(this.value)}}n.BLOCK_FOLDED="BLOCK_FOLDED";n.BLOCK_LITERAL="BLOCK_LITERAL";n.PLAIN="PLAIN";n.QUOTE_DOUBLE="QUOTE_DOUBLE";n.QUOTE_SINGLE="QUOTE_SINGLE";t9.Scalar=n;t9.isScalarValue=o9});var _0=O((ZH)=>{var $H=R0(),o=w(),$2=N(),UH="tag:yaml.org,2002:";function HH(q,$,U){if($){let H=U.filter((Z)=>Z.tag===$),X=H.find((Z)=>!Z.format)??H[0];if(!X)throw Error(`Tag ${$} not found`);return X}return U.find((H)=>H.identify?.(q)&&!H.format)}function XH(q,$,U){if(o.isDocument(q))q=q.contents;if(o.isNode(q))return q;if(o.isPair(q)){let T=U.schema[o.MAP].createNode?.(U.schema,null,U);return T.items.push(q),T}if(q instanceof String||q instanceof Number||q instanceof Boolean||typeof BigInt<"u"&&q instanceof BigInt)q=q.valueOf();let{aliasDuplicateObjects:H,onAnchor:X,onTagObj:Z,schema:G,sourceObjects:z}=U,J=void 0;if(H&&q&&typeof q==="object")if(J=z.get(q),J)return J.anchor??(J.anchor=X(q)),new $H.Alias(J.anchor);else J={anchor:null,node:null},z.set(q,J);if($?.startsWith("!!"))$=UH+$.slice(2);let Q=HH(q,$,G.tags);if(!Q){if(q&&typeof q.toJSON==="function")q=q.toJSON();if(!q||typeof q!=="object"){let T=new $2.Scalar(q);if(J)J.node=T;return T}Q=q instanceof Map?G[o.MAP]:(Symbol.iterator in Object(q))?G[o.SEQ]:G[o.MAP]}if(Z)Z(Q),delete U.onTagObj;let V=Q?.createNode?Q.createNode(U.schema,q,U):typeof Q?.nodeClass?.from==="function"?Q.nodeClass.from(U.schema,q,U):new $2.Scalar(q);if($)V.tag=$;else if(!Q.default)V.tag=Q.tag;if(J)J.node=V;return V}ZH.createNode=XH});var c0=O((QH)=>{var zH=_0(),u=w(),JH=l0();function Cq(q,$,U){let H=U;for(let X=$.length-1;X>=0;--X){let Z=$[X];if(typeof Z==="number"&&Number.isInteger(Z)&&Z>=0){let G=[];G[Z]=H,H=G}else H=new Map([[Z,H]])}return zH.createNode(H,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:q,sourceObjects:new Map})}var U2=(q)=>q==null||typeof q==="object"&&!!q[Symbol.iterator]().next().done;class H2 extends JH.NodeBase{constructor(q,$){super(q);Object.defineProperty(this,"schema",{value:$,configurable:!0,enumerable:!1,writable:!0})}clone(q){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(q)$.schema=q;if($.items=$.items.map((U)=>u.isNode(U)||u.isPair(U)?U.clone(q):U),this.range)$.range=this.range.slice();return $}addIn(q,$){if(U2(q))this.add($);else{let[U,...H]=q,X=this.get(U,!0);if(u.isCollection(X))X.addIn(H,$);else if(X===void 0&&this.schema)this.set(U,Cq(this.schema,H,$));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${H}`)}}deleteIn(q){let[$,...U]=q;if(U.length===0)return this.delete($);let H=this.get($,!0);if(u.isCollection(H))return H.deleteIn(U);else throw Error(`Expected YAML collection at ${$}. Remaining path: ${U}`)}getIn(q,$){let[U,...H]=q,X=this.get(U,!0);if(H.length===0)return!$&&u.isScalar(X)?X.value:X;else return u.isCollection(X)?X.getIn(H,$):void 0}hasAllNullValues(q){return this.items.every(($)=>{if(!u.isPair($))return!1;let U=$.value;return U==null||q&&u.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn(q){let[$,...U]=q;if(U.length===0)return this.has($);let H=this.get($,!0);return u.isCollection(H)?H.hasIn(U):!1}setIn(q,$){let[U,...H]=q;if(H.length===0)this.set(U,$);else{let X=this.get(U,!0);if(u.isCollection(X))X.setIn(H,$);else if(X===void 0&&this.schema)this.set(U,Cq(this.schema,H,$));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${H}`)}}}QH.Collection=H2;QH.collectionFromPath=Cq;QH.isEmptyPath=U2});var L0=O((WH)=>{var VH=(q)=>q.replace(/^(?!$)(?: $)?/gm,"#");function Eq(q,$){if(/^\n+$/.test(q))return q.substring(1);return $?q.replace(/^(?! *$)/gm,$):q}var IH=(q,$,U)=>q.endsWith(`
3
3
  `)?Eq(U,$):U.includes(`
4
4
  `)?`
@@ -137,4 +137,4 @@ ${$.comment}`:$.comment}this.doc.range[2]=$.offset;break}default:this.errors.pus
137
137
  `,$)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,$.value){let U="end"in $.value?$.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else{if(this.atIndentedComment($.start,q.indent)){let H=q.items[q.items.length-2]?.value?.end;if(Array.isArray(H)){Array.prototype.push.apply(H,$.start),H.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return}if(this.indent>=q.indent){let U=!this.onKeyLine&&this.indent===q.indent,H=U&&($.sep||$.explicitKey)&&this.type!=="seq-item-ind",X=[];if(H&&$.sep&&!$.value){let Z=[];for(let G=0;G<$.sep.length;++G){let z=$.sep[G];switch(z.type){case"newline":Z.push(G);break;case"space":break;case"comment":if(z.indent>q.indent)Z.length=0;break;default:Z.length=0}}if(Z.length>=2)X=$.sep.splice(Z[1])}switch(this.type){case"anchor":case"tag":if(H||$.value)X.push(this.sourceToken),q.items.push({start:X}),this.onKeyLine=!0;else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"explicit-key-ind":if(!$.sep&&!$.explicitKey)$.start.push(this.sourceToken),$.explicitKey=!0;else if(H||$.value)X.push(this.sourceToken),q.items.push({start:X,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if($.explicitKey)if(!$.sep)if(i($.start,"newline"))Object.assign($,{key:null,sep:[this.sourceToken]});else{let Z=I0($.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,key:null,sep:[this.sourceToken]}]})}else if($.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if(i($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]});else if(kU($.key)&&!i($.sep,"newline")){let Z=I0($.start),G=$.key,z=$.sep;z.push(this.sourceToken),delete $.key,delete $.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,key:G,sep:z}]})}else if(X.length>0)$.sep=$.sep.concat(X,this.sourceToken);else $.sep.push(this.sourceToken);else if(!$.sep)Object.assign($,{key:null,sep:[this.sourceToken]});else if($.value||H)q.items.push({start:X,key:null,sep:[this.sourceToken]});else if(i($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else $.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Z=this.flowScalar(this.type);if(H||$.value)q.items.push({start:X,key:Z,sep:[]}),this.onKeyLine=!0;else if($.sep)this.stack.push(Z);else Object.assign($,{key:Z,sep:[]}),this.onKeyLine=!0;return}default:{let Z=this.startBlockValue(q);if(Z){if(Z.type==="block-seq"){if(!$.explicitKey&&$.sep&&!i($.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(U)q.items.push({start:X});this.stack.push(Z);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if($.value){let U="end"in $.value?$.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment($.start,q.indent)){let H=q.items[q.items.length-2]?.value?.end;if(Array.isArray(H)){Array.prototype.push.apply(H,$.start),H.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return;case"anchor":case"tag":if($.value||this.indent<=q.indent)break;$.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==q.indent)break;if($.value||i($.start,"seq-item-ind"))q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return}if(this.indent>q.indent){let U=this.startBlockValue(q);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection(q){let $=q.items[q.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if(q.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!$||$.sep)q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return;case"map-value-ind":if(!$||$.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else Object.assign($,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!$||$.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let H=this.flowScalar(this.type);if(!$||$.value)q.items.push({start:[],key:H,sep:[]});else if($.sep)this.stack.push(H);else Object.assign($,{key:H,sep:[]});return}case"flow-map-end":case"flow-seq-end":q.end.push(this.sourceToken);return}let U=this.startBlockValue(q);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===q.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let H=wq(U),X=I0(H);xU(q);let Z=q.end.splice(1,q.end.length);Z.push(this.sourceToken);let G={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:X,key:q,sep:Z}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=G}else yield*this.lineEnd(q)}}flowScalar(q){if(this.onNewLine){let $=this.source.indexOf(`
138
138
  `)+1;while($!==0)this.onNewLine(this.offset+$),$=this.source.indexOf(`
139
139
  `,$)+1}return{type:q,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(q){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let $=wq(q),U=I0($);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let $=wq(q),U=I0($);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(q,$){if(this.type!=="comment")return!1;if(this.indent<=$)return!1;return q.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd(q){if(this.type!=="doc-mode"){if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(q){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}l6.Parser=vU});var aU=O((e6)=>{var mU=w$(),c6=E0(),x0=g0(),s6=yq(),i6=w(),r6=y$(),pU=h$();function dU(q){let $=q.prettyErrors!==!1;return{lineCounter:q.lineCounter||$&&new r6.LineCounter||null,prettyErrors:$}}function n6(q,$={}){let{lineCounter:U,prettyErrors:H}=dU($),X=new pU.Parser(U?.addNewLine),Z=new mU.Composer($),G=Array.from(Z.compose(X.parse(q)));if(H&&U)for(let z of G)z.errors.forEach(x0.prettifyError(q,U)),z.warnings.forEach(x0.prettifyError(q,U));if(G.length>0)return G;return Object.assign([],{empty:!0},Z.streamInfo())}function lU(q,$={}){let{lineCounter:U,prettyErrors:H}=dU($),X=new pU.Parser(U?.addNewLine),Z=new mU.Composer($),G=null;for(let z of Z.compose(X.parse(q),!0,q.length))if(!G)G=z;else if(G.options.logLevel!=="silent"){G.errors.push(new x0.YAMLParseError(z.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(H&&U)G.errors.forEach(x0.prettifyError(q,U)),G.warnings.forEach(x0.prettifyError(q,U));return G}function o6(q,$,U){let H=void 0;if(typeof $==="function")H=$;else if(U===void 0&&$&&typeof $==="object")U=$;let X=lU(q,U);if(!X)return null;if(X.warnings.forEach((Z)=>s6.warn(X.options.logLevel,Z)),X.errors.length>0)if(X.options.logLevel!=="silent")throw X.errors[0];else X.errors=[];return X.toJS(Object.assign({reviver:H},U))}function t6(q,$,U){let H=null;if(typeof $==="function"||Array.isArray($))H=$;else if(U===void 0&&$)U=$;if(typeof U==="string")U=U.length;if(typeof U==="number"){let X=Math.round(U);U=X<1?void 0:X>8?{indent:8}:{indent:X}}if(q===void 0){let{keepUndefined:X}=U??$??{};if(!X)return}if(i6.isDocument(q)&&!H)return q.toString(U);return new c6.Document(q,H,U).toString(U)}e6.parse=o6;e6.parseAllDocuments=n6;e6.parseDocument=lU;e6.stringify=t6});var c8=O((O8)=>{var X8=w$(),Z8=E0(),G8=Q$(),u$=g0(),z8=R0(),r=w(),J8=l(),Q8=N(),T8=c(),B8=s(),Y8=Aq(),V8=f$(),I8=y$(),W8=h$(),Kq=aU(),cU=W0();O8.Composer=X8.Composer;O8.Document=Z8.Document;O8.Schema=G8.Schema;O8.YAMLError=u$.YAMLError;O8.YAMLParseError=u$.YAMLParseError;O8.YAMLWarning=u$.YAMLWarning;O8.Alias=z8.Alias;O8.isAlias=r.isAlias;O8.isCollection=r.isCollection;O8.isDocument=r.isDocument;O8.isMap=r.isMap;O8.isNode=r.isNode;O8.isPair=r.isPair;O8.isScalar=r.isScalar;O8.isSeq=r.isSeq;O8.Pair=J8.Pair;O8.Scalar=Q8.Scalar;O8.YAMLMap=T8.YAMLMap;O8.YAMLSeq=B8.YAMLSeq;O8.CST=Y8;O8.Lexer=V8.Lexer;O8.LineCounter=I8.LineCounter;O8.Parser=W8.Parser;O8.parse=Kq.parse;O8.parseAllDocuments=Kq.parseAllDocuments;O8.parseDocument=Kq.parseDocument;O8.stringify=Kq.stringify;O8.visit=cU.visit;O8.visitAsync=cU.visitAsync});
140
- export{c8 as oq};
140
+ export{c8 as Kk};
@@ -1 +1 @@
1
- import{hq as J}from"./chunk-94jawhw7.js";import"./chunk-dcs1r9as.js";function X(y){let w=y.stack;if(!w)return{};let q=w.match(/at\s+(?:.*?\s+)?\(?(.+?):(\d+):(\d+)\)?/);if(q)return{file:q[1],line:parseInt(q[2],10),column:parseInt(q[3],10)};return{}}function Y(y,w){let q=y.toLowerCase();if(q.includes("tool")||q.includes("read")||q.includes("write")||q.includes("glob")||q.includes("grep"))return"Tool";if(q.includes("terminal")||q.includes("bash")||q.includes("command")||q.includes("spawn"))return"Terminal";if(q.includes("agent")||q.includes("llm")||q.includes("model"))return"Agent";if(q.includes("config")||q.includes("network")||q.includes("fetch"))return"System";if(w?.stack){let B=w.stack.toLowerCase();if(B.includes("tool")||B.includes("filesystem"))return"Tool";if(B.includes("terminal")||B.includes("bash"))return"Terminal";if(B.includes("agent")||B.includes("graph"))return"Agent"}return"Unknown"}function D(y,w,q,B){let V=q||Y(w,B),H=B?X(B):{};J.addError({level:y,source:V,message:w,file:H.file,line:H.line,column:H.column,stack:B?.stack})}var{error:K,warn:P}=console;function Z(...y){K.apply(console,y);try{let w=y.map((B)=>{if(typeof B==="string")return B;if(B instanceof Error)return B.message;try{return JSON.stringify(B)}catch{return String(B)}}).join(" "),q=y.find((B)=>B instanceof Error);D("error",w,void 0,q)}catch{}}function _(...y){P.apply(console,y);try{let w=y.map((q)=>{if(typeof q==="string")return q;if(q instanceof Error)return q.message;try{return JSON.stringify(q)}catch{return String(q)}}).join(" ");D("warning",w,void 0)}catch{}}function Q(y){let w,q;if(y instanceof Error)w=y.message,q=y;else if(typeof y==="string")w=y;else try{w=JSON.stringify(y)}catch{w=String(y)}D("error",`[UnhandledRejection] ${w}`,"System",q)}function T(y){let w=y instanceof Error?y:Error(String(y));D("error",`[UncaughtException] ${w.message}`,"System",w)}var G=!1;function A(){if(G)return;console.error=Z,console.warn=_,process.on("unhandledRejection",Q),process.on("uncaughtException",T),G=!0}function F(){if(!G)return;console.error=K,console.warn=P,process.off("unhandledRejection",Q),process.off("uncaughtException",T),G=!1}function L(y,w){let q=typeof w==="string"?w:w.message,B=typeof w==="string"?void 0:w;D("error",`[${y}] ${q}`,"Tool",B)}function f(y,w){let q=typeof w==="string"?w:w.message,B=typeof w==="string"?void 0:w;D("error",`[Terminal] ${y}: ${q}`,"Terminal",B)}function v(y,w){let q=typeof w==="string"?w:w.message,B=typeof w==="string"?void 0:w;D("error",`[Agent:${y}] ${q}`,"Agent",B)}export{F as stopErrorInterceptor,L as logToolError,f as logTerminalError,v as logAgentError,A as initErrorInterceptor};
1
+ import{mf as J}from"./chunk-gwf8b14k.js";import"./chunk-z3e4c424.js";function X(y){let w=y.stack;if(!w)return{};let q=w.match(/at\s+(?:.*?\s+)?\(?(.+?):(\d+):(\d+)\)?/);if(q)return{file:q[1],line:parseInt(q[2],10),column:parseInt(q[3],10)};return{}}function Y(y,w){let q=y.toLowerCase();if(q.includes("tool")||q.includes("read")||q.includes("write")||q.includes("glob")||q.includes("grep"))return"Tool";if(q.includes("terminal")||q.includes("bash")||q.includes("command")||q.includes("spawn"))return"Terminal";if(q.includes("agent")||q.includes("llm")||q.includes("model"))return"Agent";if(q.includes("config")||q.includes("network")||q.includes("fetch"))return"System";if(w?.stack){let B=w.stack.toLowerCase();if(B.includes("tool")||B.includes("filesystem"))return"Tool";if(B.includes("terminal")||B.includes("bash"))return"Terminal";if(B.includes("agent")||B.includes("graph"))return"Agent"}return"Unknown"}function D(y,w,q,B){let V=q||Y(w,B),H=B?X(B):{};J.addError({level:y,source:V,message:w,file:H.file,line:H.line,column:H.column,stack:B?.stack})}var{error:K,warn:P}=console;function Z(...y){K.apply(console,y);try{let w=y.map((B)=>{if(typeof B==="string")return B;if(B instanceof Error)return B.message;try{return JSON.stringify(B)}catch{return String(B)}}).join(" "),q=y.find((B)=>B instanceof Error);D("error",w,void 0,q)}catch{}}function _(...y){P.apply(console,y);try{let w=y.map((q)=>{if(typeof q==="string")return q;if(q instanceof Error)return q.message;try{return JSON.stringify(q)}catch{return String(q)}}).join(" ");D("warning",w,void 0)}catch{}}function Q(y){let w,q;if(y instanceof Error)w=y.message,q=y;else if(typeof y==="string")w=y;else try{w=JSON.stringify(y)}catch{w=String(y)}D("error",`[UnhandledRejection] ${w}`,"System",q)}function T(y){let w=y instanceof Error?y:Error(String(y));D("error",`[UncaughtException] ${w.message}`,"System",w)}var G=!1;function A(){if(G)return;console.error=Z,console.warn=_,process.on("unhandledRejection",Q),process.on("uncaughtException",T),G=!0}function F(){if(!G)return;console.error=K,console.warn=P,process.off("unhandledRejection",Q),process.off("uncaughtException",T),G=!1}function L(y,w){let q=typeof w==="string"?w:w.message,B=typeof w==="string"?void 0:w;D("error",`[${y}] ${q}`,"Tool",B)}function f(y,w){let q=typeof w==="string"?w:w.message,B=typeof w==="string"?void 0:w;D("error",`[Terminal] ${y}: ${q}`,"Terminal",B)}function v(y,w){let q=typeof w==="string"?w:w.message,B=typeof w==="string"?void 0:w;D("error",`[Agent:${y}] ${q}`,"Agent",B)}export{F as stopErrorInterceptor,L as logToolError,f as logTerminalError,v as logAgentError,A as initErrorInterceptor};