@wirecat/drive-cli 0.63.0 → 0.65.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 (193) hide show
  1. package/README.md +2 -1
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bundle/{all-profiles-GZJS3UKC.js → all-profiles-PD7GJHFA.js} +14 -13
  4. package/dist/bundle/{anthropic-RGV3WXX5.js → anthropic-PJKFON5H.js} +25 -14
  5. package/dist/bundle/{app-server-AA2PJ7PV.js → app-server-6ELQA6FJ.js} +59 -56
  6. package/dist/bundle/{bun-OXZYIA3R.js → bun-P54TGES2.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-D45NSDM3.js → bun-sqlite-TND5ZRJH.js} +12 -8
  8. package/dist/bundle/chunk-2AFI4KGI.js +185 -0
  9. package/dist/bundle/{chunk-Q5DJTRKV.js → chunk-3HXNDF6Q.js} +2 -2
  10. package/dist/bundle/{chunk-DJHLVUL6.js → chunk-3ONWN3IA.js} +278 -49
  11. package/dist/bundle/{chunk-WYGWWHZP.js → chunk-42G2XNPN.js} +2 -2
  12. package/dist/bundle/chunk-4AOINPN2.js +66 -0
  13. package/dist/bundle/{chunk-J4DIHPZ6.js → chunk-4EDWLR22.js} +1 -1
  14. package/dist/bundle/{chunk-ABYGSJZ4.js → chunk-4Y5YBFMS.js} +7 -7
  15. package/dist/bundle/{chunk-YGU6ULU5.js → chunk-54V4H6PM.js} +16 -16
  16. package/dist/bundle/{chunk-2TFXK3R4.js → chunk-5XSBCMAF.js} +4 -4
  17. package/dist/bundle/{chunk-2HF2MRXI.js → chunk-6DCLZLGX.js} +1 -1
  18. package/dist/bundle/{chunk-OD4U7GUY.js → chunk-7AQGVX5O.js} +20 -20
  19. package/dist/bundle/{chunk-YIP7ELON.js → chunk-7TAP7Y2E.js} +727 -518
  20. package/dist/bundle/{chunk-TF23BZW5.js → chunk-A27UVLPK.js} +3 -3
  21. package/dist/bundle/{chunk-LZEOQW7S.js → chunk-A4QNADEX.js} +58 -52
  22. package/dist/bundle/{chunk-FXBHOCJK.js → chunk-ADLS6FVG.js} +1 -1
  23. package/dist/bundle/{chunk-LMAVCYLQ.js → chunk-B2LPCHQN.js} +4 -4
  24. package/dist/bundle/{chunk-5PPL7JDM.js → chunk-CGQRZRTH.js} +2 -2
  25. package/dist/bundle/{chunk-VAUMOZU5.js → chunk-CWLL63JD.js} +107 -48
  26. package/dist/bundle/{chunk-V3NVXIQR.js → chunk-D6Z43SOG.js} +1563 -266
  27. package/dist/bundle/{chunk-OXY6SSZG.js → chunk-D7WB54P7.js} +127 -28
  28. package/dist/bundle/{chunk-VJEOGKAN.js → chunk-DA63E2UM.js} +13 -9
  29. package/dist/bundle/{chunk-EOOGWUTP.js → chunk-ECEP4SO3.js} +20 -20
  30. package/dist/bundle/{chunk-NEFSGCVA.js → chunk-EHU6EYGO.js} +38 -28
  31. package/dist/bundle/{chunk-4OSSOWDM.js → chunk-ELJUBPY4.js} +1 -1
  32. package/dist/bundle/{chunk-FRIJUILO.js → chunk-EM7NL5ES.js} +3 -3
  33. package/dist/bundle/{chunk-3BZRKLJ6.js → chunk-EU5MD24W.js} +13 -13
  34. package/dist/bundle/{chunk-MOTRI3SY.js → chunk-EZ2OLYEK.js} +24 -2
  35. package/dist/bundle/{chunk-6MQSQ4LX.js → chunk-F56DRBGY.js} +370 -717
  36. package/dist/bundle/{chunk-ZOJU7ZFI.js → chunk-FA6JNXCC.js} +8 -8
  37. package/dist/bundle/{chunk-ND6LLYGF.js → chunk-FBHSWQU7.js} +1531 -136
  38. package/dist/bundle/{chunk-Z42YYLTS.js → chunk-GW3LBY3T.js} +74 -72
  39. package/dist/bundle/{chunk-Y6GNA7HE.js → chunk-HP3NT6JJ.js} +23 -5
  40. package/dist/bundle/{chunk-DJ3SDJZY.js → chunk-I272E6UR.js} +9 -8
  41. package/dist/bundle/{chunk-L37LMMRJ.js → chunk-IBO23OID.js} +2 -2
  42. package/dist/bundle/{chunk-CE2TJBLP.js → chunk-II4S2DBJ.js} +3 -3
  43. package/dist/bundle/{chunk-ZM5J6ZMB.js → chunk-IKHOIXJR.js} +2 -2
  44. package/dist/bundle/{chunk-PO5RQQIG.js → chunk-IMHW7VIV.js} +5 -5
  45. package/dist/bundle/{chunk-3HK5WMI5.js → chunk-JMJIH6JH.js} +6 -6
  46. package/dist/bundle/{chunk-FUITWY7O.js → chunk-JPPPLKAO.js} +26 -1
  47. package/dist/bundle/{chunk-4S4JMW6I.js → chunk-LMKPP2JP.js} +1 -1
  48. package/dist/bundle/{chunk-HZZCEQTH.js → chunk-M7ELUGU6.js} +4 -4
  49. package/dist/bundle/{chunk-ZMOUUOT2.js → chunk-MCPOZNWG.js} +1 -1
  50. package/dist/bundle/{chunk-XNVFKMVR.js → chunk-NI5PD5KM.js} +39485 -35729
  51. package/dist/bundle/{chunk-2TDUGC5D.js → chunk-NQ5XMSLA.js} +4927 -1978
  52. package/dist/bundle/chunk-NQRTKYJB.js +257 -0
  53. package/dist/bundle/{chunk-44SBK6KB.js → chunk-O6K2E7OA.js} +4201 -2565
  54. package/dist/bundle/{chunk-534OBX5Y.js → chunk-O7ZDCOZE.js} +1 -1
  55. package/dist/bundle/{chunk-7EMQ26BA.js → chunk-OFJXHEFT.js} +13 -13
  56. package/dist/bundle/chunk-OWMZUWCM.js +109 -0
  57. package/dist/bundle/chunk-PHOL2DZM.js +138 -0
  58. package/dist/bundle/{chunk-UQLWMGSD.js → chunk-PLP5527C.js} +5 -5
  59. package/dist/bundle/{chunk-3QINVLZI.js → chunk-RNHGQ35R.js} +1 -1
  60. package/dist/bundle/{chunk-27YUUGXQ.js → chunk-RX5CJ55S.js} +1 -1
  61. package/dist/bundle/{chunk-XIUDS3OK.js → chunk-SE352DBY.js} +1 -1
  62. package/dist/bundle/chunk-SEQWBZYH.js +18 -0
  63. package/dist/bundle/{chunk-33MGFUED.js → chunk-SIWXYB4E.js} +3789 -3538
  64. package/dist/bundle/{chunk-4CIZWCXV.js → chunk-SNLSEYJO.js} +1 -1
  65. package/dist/bundle/{chunk-XDC3TWTL.js → chunk-SS4LKLD7.js} +52 -605
  66. package/dist/bundle/{chunk-BKYMKVHT.js → chunk-TMHF4BCL.js} +2 -2
  67. package/dist/bundle/{chunk-FEZF3TII.js → chunk-TOVWMURV.js} +74 -6
  68. package/dist/bundle/{chunk-QCKZ3GAA.js → chunk-TTP4NOP3.js} +4 -4
  69. package/dist/bundle/chunk-UTNRBOEN.js +53 -0
  70. package/dist/bundle/{chunk-2NIC72HH.js → chunk-VDZY3L7U.js} +3 -1
  71. package/dist/bundle/chunk-VHQYWFWV.js +13 -0
  72. package/dist/bundle/{chunk-VKPCONDQ.js → chunk-VLXWAH5E.js} +4 -4
  73. package/dist/bundle/{chunk-6KQJSFYF.js → chunk-VMAMRFFC.js} +23 -23
  74. package/dist/bundle/{chunk-6EY46GAN.js → chunk-W2XY6C5S.js} +2 -2
  75. package/dist/bundle/{chunk-J24ZFCWM.js → chunk-WRAUO5EJ.js} +22 -24
  76. package/dist/bundle/{chunk-S4RXABDR.js → chunk-WRMJN6UQ.js} +3 -3
  77. package/dist/bundle/{chunk-UPOSDTPT.js → chunk-WVJHZIDH.js} +3 -3
  78. package/dist/bundle/{chunk-E4SDKMBJ.js → chunk-X7YGGWXI.js} +1 -59
  79. package/dist/bundle/{chunk-O2XOX4HB.js → chunk-XPWZSW6Y.js} +50 -34
  80. package/dist/bundle/{chunk-PDCCYHCH.js → chunk-XYE7XZPB.js} +5 -5
  81. package/dist/bundle/{chunk-RKELRWH7.js → chunk-Y5PKRITX.js} +5 -5
  82. package/dist/bundle/{chunk-XR6ESRU6.js → chunk-Z2ADO6UA.js} +2 -2
  83. package/dist/bundle/{chunk-YUWPNG7B.js → chunk-ZD4MB7NH.js} +1 -1
  84. package/dist/bundle/{chunk-TWUH22Z5.js → chunk-ZILALBYQ.js} +4 -4
  85. package/dist/bundle/{chunk-SXM6MHRR.js → chunk-ZR2EJPMQ.js} +44 -15
  86. package/dist/bundle/command-contract-25E4PYMD.js +40 -0
  87. package/dist/bundle/command-server-entry-36JXYIJB.js +170 -0
  88. package/dist/bundle/{decode-G5YEIPNC.js → decode-T5ZW57WZ.js} +8 -8
  89. package/dist/bundle/{dispatch-GEFIXA6X.js → dispatch-RMA2XFYA.js} +11 -11
  90. package/dist/bundle/drive.js +11 -11
  91. package/dist/bundle/{echarts-W2CWHNXR.js → echarts-KQ44LPSF.js} +2 -2
  92. package/dist/bundle/{embed-OBFFPVF4.js → embed-Q7XST53J.js} +9 -9
  93. package/dist/bundle/{embedder-NGCBQHIG.js → embedder-RWZSBVW2.js} +12 -12
  94. package/dist/bundle/entry-HPLW4QL2.js +25 -0
  95. package/dist/bundle/{failure-GV77W3CD.js → failure-7NP4QPIN.js} +4 -4
  96. package/dist/bundle/first-run-RL3RKYZW.js +30 -0
  97. package/dist/bundle/first-screen-NX3TM2VJ.js +38 -0
  98. package/dist/bundle/google-DPD5N6AQ.js +42 -0
  99. package/dist/bundle/{google-api-Z3NSTBBR.js → google-api-P5DRHD7L.js} +61 -56
  100. package/dist/bundle/grants-TX4MHLI4.js +109 -0
  101. package/dist/bundle/{identity-OM6GFZ7T.js → identity-VDV6CHRW.js} +6 -6
  102. package/dist/bundle/{instructions-YQBQSYSS.js → instructions-Q45FVY6H.js} +1 -1
  103. package/dist/bundle/{login-7RYSDVN3.js → login-XKN3NI6X.js} +67 -62
  104. package/dist/bundle/{mcp-GWDA3HOA.js → mcp-7KQUJNFN.js} +2 -2
  105. package/dist/bundle/{node-IVU33RL7.js → node-MSW565D3.js} +2 -2
  106. package/dist/bundle/{node-KM3CUABH.js → node-P4E63KXA.js} +9 -9
  107. package/dist/bundle/{node-sqlite-SIH5BEW2.js → node-sqlite-S74XVVHL.js} +13 -9
  108. package/dist/bundle/oauth-6R7AWAES.js +22 -0
  109. package/dist/bundle/{open-IAO2SNII.js → open-P7UQG7XJ.js} +8 -8
  110. package/dist/bundle/{openai-SGOUBHXP.js → openai-DDHJ57KZ.js} +19 -40
  111. package/dist/bundle/{process-BPBMV3AT.js → process-NMUB5SHK.js} +1 -1
  112. package/dist/bundle/{program-MYKKJ4F6.js → program-PJNWP6JW.js} +517 -330
  113. package/dist/bundle/prompt-VOSMK4C2.js +19 -0
  114. package/dist/bundle/{reasons-57J2D77K.js → reasons-KDAXOC5S.js} +5 -5
  115. package/dist/bundle/{recognize-A5C5RPB3.js → recognize-GZIY63HS.js} +7 -7
  116. package/dist/bundle/{remote-VWYFLRGO.js → remote-V3YGN7LN.js} +10 -10
  117. package/dist/bundle/{rerank-4NGQWREA.js → rerank-XRU6AVN7.js} +10 -10
  118. package/dist/bundle/{serve-Y6LQTFH5.js → serve-NDOAFA57.js} +12 -12
  119. package/dist/bundle/{server-6AUHIIUA.js → server-BKGWJYMC.js} +46 -44
  120. package/dist/bundle/server-QD2MUJJZ.js +72 -0
  121. package/dist/bundle/{services-2W4J7EMW.js → services-TYDMFQCA.js} +129 -39
  122. package/dist/bundle/{sqlite-runtime-P6BBDX2H.js → sqlite-runtime-UAFJKSJR.js} +9 -9
  123. package/dist/bundle/{start-AFFA3LKM.js → start-2ZLDP2OE.js} +30 -8
  124. package/dist/bundle/{state-PXKKXR3R.js → state-6SP27J2K.js} +9 -9
  125. package/dist/bundle/{store-CN6JEUC4.js → store-4UUY545Q.js} +42 -18
  126. package/dist/bundle/{store-IVV2BAGZ.js → store-EJN27MXI.js} +69 -28
  127. package/dist/bundle/store-maintenance-command-LETURZDC.js +60 -0
  128. package/dist/bundle/tokens-MTFJPTYT.js +107 -0
  129. package/dist/commands/account.d.ts +4 -0
  130. package/dist/commands/account.d.ts.map +1 -0
  131. package/dist/commands/account.js +33 -0
  132. package/dist/commands/account.js.map +1 -0
  133. package/dist/commands/config.d.ts.map +1 -1
  134. package/dist/commands/config.js +6 -5
  135. package/dist/commands/config.js.map +1 -1
  136. package/dist/commands/context.d.ts +4 -2
  137. package/dist/commands/context.d.ts.map +1 -1
  138. package/dist/commands/context.js.map +1 -1
  139. package/dist/commands/documents.d.ts +2 -0
  140. package/dist/commands/documents.d.ts.map +1 -1
  141. package/dist/commands/documents.js +39 -3
  142. package/dist/commands/documents.js.map +1 -1
  143. package/dist/config.d.ts +13 -0
  144. package/dist/config.d.ts.map +1 -1
  145. package/dist/config.js +32 -2
  146. package/dist/config.js.map +1 -1
  147. package/dist/documents-add.d.ts +49 -0
  148. package/dist/documents-add.d.ts.map +1 -0
  149. package/dist/documents-add.js +122 -0
  150. package/dist/documents-add.js.map +1 -0
  151. package/dist/errors.d.ts +1 -0
  152. package/dist/errors.d.ts.map +1 -1
  153. package/dist/errors.js +9 -1
  154. package/dist/errors.js.map +1 -1
  155. package/dist/knowledge.d.ts +1 -1
  156. package/dist/knowledge.d.ts.map +1 -1
  157. package/dist/knowledge.js +15 -17
  158. package/dist/knowledge.js.map +1 -1
  159. package/dist/model.d.ts +3 -0
  160. package/dist/model.d.ts.map +1 -1
  161. package/dist/model.js.map +1 -1
  162. package/dist/profile-lock.d.ts +1 -0
  163. package/dist/profile-lock.d.ts.map +1 -1
  164. package/dist/profile-lock.js +1 -0
  165. package/dist/profile-lock.js.map +1 -1
  166. package/dist/program.d.ts.map +1 -1
  167. package/dist/program.js +24 -15
  168. package/dist/program.js.map +1 -1
  169. package/dist/reasons.d.ts.map +1 -1
  170. package/dist/reasons.js +25 -0
  171. package/dist/reasons.js.map +1 -1
  172. package/dist/store.d.ts.map +1 -1
  173. package/dist/store.js +20 -0
  174. package/dist/store.js.map +1 -1
  175. package/dist/version.d.ts +1 -1
  176. package/dist/version.js +1 -1
  177. package/package.json +4 -4
  178. package/dist/bundle/chunk-AEX37ETW.js +0 -35
  179. package/dist/bundle/chunk-OTROVC4E.js +0 -62
  180. package/dist/bundle/chunk-Z5KC7XBR.js +0 -33
  181. package/dist/bundle/command-contract-BRW3AP44.js +0 -38
  182. package/dist/bundle/entry-ET6HGM7A.js +0 -22
  183. package/dist/bundle/first-run-JG52UZVO.js +0 -30
  184. package/dist/bundle/first-screen-CIL3GFAA.js +0 -36
  185. package/dist/bundle/google-CIWUVJ5C.js +0 -36
  186. package/dist/bundle/grants-3S4RL3WB.js +0 -104
  187. package/dist/bundle/oauth-PT4JEHLL.js +0 -22
  188. package/dist/bundle/prompt-3ZM64DCB.js +0 -17
  189. package/dist/bundle/server-PFHI35HA.js +0 -69
  190. package/dist/bundle/store-maintenance-command-MSY2QNEH.js +0 -59
  191. package/dist/bundle/tokens-P4LPNUFW.js +0 -102
  192. package/dist/bundle/{chunk-ZQ3GWKDQ.js → chunk-YVNHQFLC.js} +0 -0
  193. package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-CE73EWJ2.js} +3 -3
package/README.md CHANGED
@@ -70,7 +70,8 @@ your own Desktop client and leave it in Testing, Google usually ends its sign-in
70
70
 
71
71
  Use `drive work …` for another account. Each Google account has one local profile. `drive session list`
72
72
  lists configured profiles. `session end` removes local sign-in while retaining cached data and
73
- configuration so re-login preserves document identities.
73
+ configuration so re-login preserves document identities. `account remove --keep-data` or `--delete-data` goes
74
+ further: it revokes the sign-in at Google and forgets the profile, and `--delete-data` also deletes its snapshots.
74
75
 
75
76
  ## Search and export
76
77
 
package/dist/bin/drive.js CHANGED
@@ -9,7 +9,7 @@ if (
9
9
  (words[0] === "--version" || words[0] === "-V") &&
10
10
  !Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
11
11
  ) {
12
- process.stdout.write("0.63.0\n")
12
+ process.stdout.write("0.65.0\n")
13
13
  } else {
14
14
  // Before the bundle compiles: the bundle's own call comes after its chunks.
15
15
  module.enableCompileCache()
@@ -28,7 +28,7 @@ if (
28
28
  : next(specifier, context),
29
29
  })
30
30
  }
31
- const chunks = ["../bundle/all-profiles-GZJS3UKC.js","../bundle/anthropic-RGV3WXX5.js","../bundle/app-server-AA2PJ7PV.js","../bundle/bun-OXZYIA3R.js","../bundle/bun-sqlite-D45NSDM3.js","../bundle/command-contract-BRW3AP44.js","../bundle/decode-G5YEIPNC.js","../bundle/dispatch-GEFIXA6X.js","../bundle/dist-MWTMOYWT.js","../bundle/dist-PY3MVR3G.js","../bundle/echarts-W2CWHNXR.js","../bundle/embed-OBFFPVF4.js","../bundle/embedder-NGCBQHIG.js","../bundle/entry-ET6HGM7A.js","../bundle/failure-GV77W3CD.js","../bundle/first-run-JG52UZVO.js","../bundle/first-screen-CIL3GFAA.js","../bundle/google-CIWUVJ5C.js","../bundle/google-api-Z3NSTBBR.js","../bundle/grants-3S4RL3WB.js","../bundle/identity-OM6GFZ7T.js","../bundle/instructions-YQBQSYSS.js","../bundle/login-7RYSDVN3.js","../bundle/mcp-GWDA3HOA.js","../bundle/mdast-util-from-markdown-FXEPSNER.js","../bundle/mdast-util-gfm-SZM5GBDF.js","../bundle/micromark-extension-gfm-GRL24TU6.js","../bundle/node-IVU33RL7.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-SIH5BEW2.js","../bundle/oauth-PT4JEHLL.js","../bundle/open-IAO2SNII.js","../bundle/openai-SGOUBHXP.js","../bundle/process-BPBMV3AT.js","../bundle/program-MYKKJ4F6.js","../bundle/prompt-3ZM64DCB.js","../bundle/reasons-57J2D77K.js","../bundle/recognize-A5C5RPB3.js","../bundle/remote-VWYFLRGO.js","../bundle/rerank-4NGQWREA.js","../bundle/serve-Y6LQTFH5.js","../bundle/server-6AUHIIUA.js","../bundle/server-PFHI35HA.js","../bundle/services-2W4J7EMW.js","../bundle/sqlite-runtime-P6BBDX2H.js","../bundle/start-AFFA3LKM.js","../bundle/state-PXKKXR3R.js","../bundle/store-CN6JEUC4.js","../bundle/store-IVV2BAGZ.js","../bundle/store-maintenance-command-MSY2QNEH.js","../bundle/terminal-DHJ4D3BC.js","../bundle/tokens-P4LPNUFW.js"]
31
+ const chunks = ["../bundle/all-profiles-PD7GJHFA.js","../bundle/anthropic-PJKFON5H.js","../bundle/app-server-6ELQA6FJ.js","../bundle/bun-P54TGES2.js","../bundle/bun-sqlite-TND5ZRJH.js","../bundle/command-contract-25E4PYMD.js","../bundle/command-server-entry-36JXYIJB.js","../bundle/decode-T5ZW57WZ.js","../bundle/dispatch-RMA2XFYA.js","../bundle/dist-MWTMOYWT.js","../bundle/dist-PY3MVR3G.js","../bundle/echarts-KQ44LPSF.js","../bundle/embed-Q7XST53J.js","../bundle/embedder-RWZSBVW2.js","../bundle/entry-HPLW4QL2.js","../bundle/failure-7NP4QPIN.js","../bundle/first-run-RL3RKYZW.js","../bundle/first-screen-NX3TM2VJ.js","../bundle/google-DPD5N6AQ.js","../bundle/google-api-P5DRHD7L.js","../bundle/grants-TX4MHLI4.js","../bundle/identity-VDV6CHRW.js","../bundle/instructions-Q45FVY6H.js","../bundle/login-XKN3NI6X.js","../bundle/mcp-7KQUJNFN.js","../bundle/mdast-util-from-markdown-CE73EWJ2.js","../bundle/mdast-util-gfm-SZM5GBDF.js","../bundle/micromark-extension-gfm-GRL24TU6.js","../bundle/node-MSW565D3.js","../bundle/node-P4E63KXA.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-S74XVVHL.js","../bundle/oauth-6R7AWAES.js","../bundle/open-P7UQG7XJ.js","../bundle/openai-DDHJ57KZ.js","../bundle/process-NMUB5SHK.js","../bundle/program-PJNWP6JW.js","../bundle/prompt-VOSMK4C2.js","../bundle/reasons-KDAXOC5S.js","../bundle/recognize-GZIY63HS.js","../bundle/remote-V3YGN7LN.js","../bundle/rerank-XRU6AVN7.js","../bundle/serve-NDOAFA57.js","../bundle/server-BKGWJYMC.js","../bundle/server-QD2MUJJZ.js","../bundle/services-TYDMFQCA.js","../bundle/sqlite-runtime-UAFJKSJR.js","../bundle/start-2ZLDP2OE.js","../bundle/state-6SP27J2K.js","../bundle/store-4UUY545Q.js","../bundle/store-EJN27MXI.js","../bundle/store-maintenance-command-LETURZDC.js","../bundle/terminal-DHJ4D3BC.js","../bundle/tokens-MTFJPTYT.js"]
32
32
  if (((words) => words
33
33
  .filter((word) => !word.startsWith("-"))
34
34
  .slice(0, 2)
@@ -2,32 +2,33 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answeredWire
5
- } from "./chunk-J4DIHPZ6.js";
5
+ } from "./chunk-4EDWLR22.js";
6
6
  import {
7
7
  CALLER_META_KEY,
8
8
  PROXY_CLIENT_NAME,
9
9
  StdioServerTransport,
10
10
  callerOf,
11
11
  serveStdio
12
- } from "./chunk-WYGWWHZP.js";
12
+ } from "./chunk-42G2XNPN.js";
13
13
  import {
14
14
  McpServer
15
15
  } from "./chunk-5D4AEUVA.js";
16
- import "./chunk-VJEOGKAN.js";
17
- import "./chunk-E4SDKMBJ.js";
18
- import "./chunk-ZQ3GWKDQ.js";
19
- import "./chunk-OD4U7GUY.js";
20
- import "./chunk-UQLWMGSD.js";
16
+ import "./chunk-DA63E2UM.js";
17
+ import "./chunk-X7YGGWXI.js";
18
+ import "./chunk-4AOINPN2.js";
19
+ import "./chunk-YVNHQFLC.js";
20
+ import "./chunk-7AQGVX5O.js";
21
+ import "./chunk-PLP5527C.js";
21
22
  import "./chunk-Y5E2WNWB.js";
22
- import "./chunk-2HF2MRXI.js";
23
- import "./chunk-6EY46GAN.js";
24
- import "./chunk-FEZF3TII.js";
25
- import "./chunk-4OSSOWDM.js";
23
+ import "./chunk-6DCLZLGX.js";
24
+ import "./chunk-W2XY6C5S.js";
25
+ import "./chunk-TOVWMURV.js";
26
+ import "./chunk-ELJUBPY4.js";
26
27
  import {
27
28
  __name
28
29
  } from "./chunk-ZVVMGPBJ.js";
29
30
 
30
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
31
+ // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
31
32
  import { spawn } from "node:child_process";
32
33
  import { randomUUID } from "node:crypto";
33
34
  var PROTOCOL = "2025-06-18";
@@ -261,7 +262,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
261
262
  }, "serveAllProfilesOverStdio");
262
263
  var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
263
264
  const { build, close } = allProfilesServer(options);
264
- const { serveOverHttp } = await import("./serve-Y6LQTFH5.js");
265
+ const { serveOverHttp } = await import("./serve-NDOAFA57.js");
265
266
  const listening = await serveOverHttp(build, {
266
267
  ...http,
267
268
  appName: options.command,
@@ -1,34 +1,41 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- checkedOptions
5
- } from "./chunk-Z5KC7XBR.js";
6
- import {
4
+ checkedOptions,
7
5
  messagesFor,
8
6
  systemFor
9
- } from "./chunk-MOTRI3SY.js";
7
+ } from "./chunk-EZ2OLYEK.js";
10
8
  import {
11
9
  Anthropic
12
- } from "./chunk-FXBHOCJK.js";
13
- import "./chunk-OD4U7GUY.js";
14
- import "./chunk-UQLWMGSD.js";
10
+ } from "./chunk-ADLS6FVG.js";
11
+ import "./chunk-7AQGVX5O.js";
12
+ import "./chunk-PLP5527C.js";
15
13
  import "./chunk-Y5E2WNWB.js";
16
- import "./chunk-2HF2MRXI.js";
17
- import "./chunk-6EY46GAN.js";
14
+ import "./chunk-6DCLZLGX.js";
15
+ import "./chunk-W2XY6C5S.js";
18
16
  import {
19
17
  array,
18
+ literal,
20
19
  optional,
20
+ picklist,
21
+ record,
21
22
  strictObject,
22
- string
23
- } from "./chunk-FEZF3TII.js";
24
- import "./chunk-4OSSOWDM.js";
23
+ string,
24
+ unknown
25
+ } from "./chunk-TOVWMURV.js";
26
+ import "./chunk-ELJUBPY4.js";
25
27
  import {
26
28
  __name
27
29
  } from "./chunk-ZVVMGPBJ.js";
28
30
 
29
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/models/anthropic.js
31
+ // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/models/anthropic.js
30
32
  var options = strictObject({
31
- stop_sequences: optional(array(string()))
33
+ stop_sequences: optional(array(string())),
34
+ thinking: optional(strictObject({ type: picklist(["disabled", "adaptive"]) })),
35
+ output_config: optional(strictObject({
36
+ effort: optional(picklist(["low", "medium", "high"])),
37
+ format: optional(strictObject({ type: literal("json_schema"), schema: record(string(), unknown()) }))
38
+ }))
32
39
  });
33
40
  var anthropic = {
34
41
  images: true,
@@ -66,6 +73,10 @@ var anthropic = {
66
73
  throw new Error("incomplete response");
67
74
  return {
68
75
  text: response.content.filter((block) => block.type === "text").map((block) => block.text).join(""),
76
+ usage: {
77
+ input: response.usage.input_tokens + (response.usage.cache_creation_input_tokens ?? 0) + (response.usage.cache_read_input_tokens ?? 0),
78
+ output: response.usage.output_tokens
79
+ },
69
80
  tokens: response.usage.input_tokens + response.usage.output_tokens + (response.usage.cache_creation_input_tokens ?? 0) + (response.usage.cache_read_input_tokens ?? 0)
70
81
  };
71
82
  }, "complete")
@@ -3,34 +3,52 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PER_RUN,
5
5
  envelope
6
- } from "./chunk-LZEOQW7S.js";
6
+ } from "./chunk-A4QNADEX.js";
7
7
  import {
8
8
  mcpUrlOf
9
- } from "./chunk-Z42YYLTS.js";
9
+ } from "./chunk-GW3LBY3T.js";
10
10
  import {
11
11
  answered,
12
12
  failed,
13
13
  registerCommands,
14
14
  runCommandForAgent,
15
15
  toolsFromCommands
16
- } from "./chunk-DJHLVUL6.js";
16
+ } from "./chunk-3ONWN3IA.js";
17
17
  import {
18
18
  agentJson,
19
19
  skillResource
20
- } from "./chunk-OXY6SSZG.js";
20
+ } from "./chunk-D7WB54P7.js";
21
+ import {
22
+ appInstructions
23
+ } from "./chunk-RNHGQ35R.js";
21
24
  import {
22
25
  answeredWire
23
- } from "./chunk-J4DIHPZ6.js";
26
+ } from "./chunk-4EDWLR22.js";
24
27
  import {
25
28
  StdioServerTransport,
26
29
  serveStdio
27
- } from "./chunk-WYGWWHZP.js";
30
+ } from "./chunk-42G2XNPN.js";
28
31
  import {
29
32
  McpServer
30
33
  } from "./chunk-5D4AEUVA.js";
31
- import "./chunk-XDC3TWTL.js";
32
- import "./chunk-J24ZFCWM.js";
33
- import "./chunk-RKELRWH7.js";
34
+ import "./chunk-SS4LKLD7.js";
35
+ import "./chunk-WRAUO5EJ.js";
36
+ import "./chunk-O6K2E7OA.js";
37
+ import "./chunk-FBHSWQU7.js";
38
+ import "./chunk-EU5MD24W.js";
39
+ import "./chunk-TTP4NOP3.js";
40
+ import "./chunk-MCPOZNWG.js";
41
+ import {
42
+ mcpHttpMarker
43
+ } from "./chunk-5XSBCMAF.js";
44
+ import "./chunk-EM7NL5ES.js";
45
+ import "./chunk-EZ2OLYEK.js";
46
+ import "./chunk-II4S2DBJ.js";
47
+ import "./chunk-CWLL63JD.js";
48
+ import "./chunk-IMHW7VIV.js";
49
+ import "./chunk-5DPV7X27.js";
50
+ import "./chunk-SEQWBZYH.js";
51
+ import "./chunk-Y5PKRITX.js";
34
52
  import {
35
53
  DEFAULT_OUTPUT_BYTES,
36
54
  changesAuthorityAt,
@@ -39,64 +57,49 @@ import {
39
57
  judgedTargets,
40
58
  readsOverMcpAt,
41
59
  rootOf2 as rootOf
42
- } from "./chunk-33MGFUED.js";
43
- import "./chunk-VJEOGKAN.js";
44
- import "./chunk-VKPCONDQ.js";
60
+ } from "./chunk-SIWXYB4E.js";
61
+ import "./chunk-DA63E2UM.js";
62
+ import "./chunk-F56DRBGY.js";
63
+ import "./chunk-OWMZUWCM.js";
64
+ import "./chunk-VLXWAH5E.js";
45
65
  import {
46
66
  readOnlyLockOf
47
- } from "./chunk-ZM5J6ZMB.js";
48
- import {
49
- mcpHttpMarker
50
- } from "./chunk-2TFXK3R4.js";
51
- import "./chunk-FRIJUILO.js";
52
- import "./chunk-534OBX5Y.js";
53
- import {
54
- appInstructions
55
- } from "./chunk-3QINVLZI.js";
56
- import "./chunk-44SBK6KB.js";
57
- import "./chunk-ND6LLYGF.js";
58
- import "./chunk-3BZRKLJ6.js";
59
- import "./chunk-6MQSQ4LX.js";
60
- import "./chunk-QCKZ3GAA.js";
61
- import "./chunk-ZMOUUOT2.js";
62
- import "./chunk-MOTRI3SY.js";
63
- import "./chunk-CE2TJBLP.js";
64
- import "./chunk-VAUMOZU5.js";
65
- import "./chunk-TF23BZW5.js";
66
- import "./chunk-PO5RQQIG.js";
67
- import "./chunk-5DPV7X27.js";
68
- import "./chunk-LMAVCYLQ.js";
69
- import "./chunk-XNVFKMVR.js";
70
- import "./chunk-UPOSDTPT.js";
71
- import "./chunk-V3NVXIQR.js";
72
- import "./chunk-EOOGWUTP.js";
73
- import "./chunk-E4SDKMBJ.js";
74
- import "./chunk-ZOJU7ZFI.js";
75
- import "./chunk-ABYGSJZ4.js";
76
- import "./chunk-AEX37ETW.js";
77
- import "./chunk-3HK5WMI5.js";
78
- import "./chunk-4S4JMW6I.js";
79
- import "./chunk-XR6ESRU6.js";
67
+ } from "./chunk-IKHOIXJR.js";
68
+ import "./chunk-O7ZDCOZE.js";
69
+ import "./chunk-A27UVLPK.js";
70
+ import "./chunk-B2LPCHQN.js";
71
+ import "./chunk-Z2ADO6UA.js";
72
+ import "./chunk-NI5PD5KM.js";
73
+ import "./chunk-WVJHZIDH.js";
74
+ import "./chunk-FA6JNXCC.js";
75
+ import "./chunk-JMJIH6JH.js";
76
+ import "./chunk-D6Z43SOG.js";
77
+ import "./chunk-ECEP4SO3.js";
78
+ import "./chunk-X7YGGWXI.js";
79
+ import "./chunk-4AOINPN2.js";
80
+ import "./chunk-4Y5YBFMS.js";
81
+ import "./chunk-LMKPP2JP.js";
80
82
  import "./chunk-D72URWJE.js";
81
- import "./chunk-27YUUGXQ.js";
82
- import "./chunk-ZQ3GWKDQ.js";
83
- import "./chunk-2NIC72HH.js";
84
- import "./chunk-OD4U7GUY.js";
83
+ import "./chunk-RX5CJ55S.js";
84
+ import "./chunk-YVNHQFLC.js";
85
+ import "./chunk-VDZY3L7U.js";
86
+ import "./chunk-UTNRBOEN.js";
87
+ import "./chunk-7AQGVX5O.js";
85
88
  import {
86
89
  mcpErrorResult
87
- } from "./chunk-UQLWMGSD.js";
90
+ } from "./chunk-PLP5527C.js";
88
91
  import "./chunk-Y5E2WNWB.js";
89
- import "./chunk-2HF2MRXI.js";
90
- import "./chunk-6EY46GAN.js";
91
- import "./chunk-FEZF3TII.js";
92
+ import "./chunk-6DCLZLGX.js";
93
+ import "./chunk-W2XY6C5S.js";
94
+ import "./chunk-TOVWMURV.js";
92
95
  import {
93
96
  CliError
94
- } from "./chunk-4OSSOWDM.js";
97
+ } from "./chunk-ELJUBPY4.js";
95
98
  import {
96
99
  __name
97
100
  } from "./chunk-ZVVMGPBJ.js";
98
101
 
99
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
102
+ // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
100
103
  var EXCLUDED = [["mcp"]];
101
104
  var createAppServer = /* @__PURE__ */ __name((command, context, options) => {
102
105
  const { app } = options;
@@ -214,7 +217,7 @@ var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options)
214
217
  var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
215
218
  const { app } = options;
216
219
  const { build } = createAppServer(command, context, options);
217
- const { serveOverHttp } = await import("./serve-Y6LQTFH5.js");
220
+ const { serveOverHttp } = await import("./serve-NDOAFA57.js");
218
221
  const listening = await serveOverHttp(build, {
219
222
  ...http,
220
223
  appName: app.command,
@@ -18,12 +18,12 @@ import {
18
18
  jitCompatCheck,
19
19
  refineSqliteCodecs,
20
20
  sql
21
- } from "./chunk-4S4JMW6I.js";
21
+ } from "./chunk-LMKPP2JP.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
27
27
  import { Database } from "bun:sqlite";
28
28
  var bunSQLiteCodecs = refineSqliteCodecs({
29
29
  "integer:boolean": { normalize: booleanFromInteger },
@@ -3,21 +3,24 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  loadVectorExtension,
5
5
  vectorExtension
6
- } from "./chunk-L37LMMRJ.js";
7
- import "./chunk-OD4U7GUY.js";
8
- import "./chunk-UQLWMGSD.js";
6
+ } from "./chunk-IBO23OID.js";
7
+ import {
8
+ refuseOwnerStoreInTests
9
+ } from "./chunk-UTNRBOEN.js";
10
+ import "./chunk-7AQGVX5O.js";
11
+ import "./chunk-PLP5527C.js";
9
12
  import {
10
13
  importFrom
11
14
  } from "./chunk-Y5E2WNWB.js";
12
- import "./chunk-2HF2MRXI.js";
13
- import "./chunk-6EY46GAN.js";
14
- import "./chunk-FEZF3TII.js";
15
- import "./chunk-4OSSOWDM.js";
15
+ import "./chunk-6DCLZLGX.js";
16
+ import "./chunk-W2XY6C5S.js";
17
+ import "./chunk-TOVWMURV.js";
18
+ import "./chunk-ELJUBPY4.js";
16
19
  import {
17
20
  __name
18
21
  } from "./chunk-ZVVMGPBJ.js";
19
22
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
21
24
  var customised = false;
22
25
  var ownLibrary = /* @__PURE__ */ __name(async () => {
23
26
  try {
@@ -40,6 +43,7 @@ var bunDatabase = /* @__PURE__ */ __name(async () => {
40
43
  }, "bunDatabase");
41
44
  var openWithBunSqlite = /* @__PURE__ */ __name(async (path) => cacheOverBunSqlite(await bunClient(path)), "openWithBunSqlite");
42
45
  var bunClient = /* @__PURE__ */ __name(async (path, options) => {
46
+ refuseOwnerStoreInTests(path);
43
47
  const Database = await bunDatabase();
44
48
  const extension = await vectorExtension();
45
49
  const client = options ? new Database(path, options) : new Database(path);
@@ -0,0 +1,185 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ stdinFieldOf
5
+ } from "./chunk-SEQWBZYH.js";
6
+ import {
7
+ isCommandServer
8
+ } from "./chunk-VHQYWFWV.js";
9
+ import {
10
+ commandPathOf
11
+ } from "./chunk-Y5PKRITX.js";
12
+ import {
13
+ commandServerRequest,
14
+ metaOf
15
+ } from "./chunk-SIWXYB4E.js";
16
+ import {
17
+ errorObjectOf,
18
+ renderError
19
+ } from "./chunk-PLP5527C.js";
20
+ import {
21
+ CliError
22
+ } from "./chunk-ELJUBPY4.js";
23
+ import {
24
+ __name
25
+ } from "./chunk-ZVVMGPBJ.js";
26
+
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/cli/command-server.js
28
+ import { createInterface } from "node:readline";
29
+ var COMMAND_SERVER_PROTOCOL = 1;
30
+ var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
31
+ var COMMAND_SERVER_CONCURRENT = 8;
32
+ var runsAlone = /* @__PURE__ */ __name((command) => commandPathOf(command)[0] === "store", "runsAlone");
33
+ var enterCommandServer = /* @__PURE__ */ __name(async (command, cli) => {
34
+ const request = commandServerRequest();
35
+ if (!request)
36
+ return;
37
+ refuseInCommandServer(command, cli);
38
+ if (runsAlone(command))
39
+ await request.alone();
40
+ }, "enterCommandServer");
41
+ var refuseInCommandServer = /* @__PURE__ */ __name((command, cli) => {
42
+ if (!commandServerRequest())
43
+ return;
44
+ const typed = [cli, ...commandPathOf(command)].join(" ");
45
+ const { lifetime } = metaOf(command);
46
+ if (lifetime)
47
+ throw new CliError("validation_error", `\`${typed}\` ${lifetime === "persistent" ? "runs until it is stopped" : "waits on a person"}; the command server runs only commands that return \u2014 start it as a process of its own`);
48
+ if (stdinFieldOf(command))
49
+ throw new CliError("validation_error", `\`${typed}\` reads its input on stdin, which the command server does not pass on \u2014 start it as a process of its own`);
50
+ }, "refuseInCommandServer");
51
+ var refusal = /* @__PURE__ */ __name((cli, message) => `${renderError(errorObjectOf(new CliError("validation_error", message)), { cli, interactive: false })}
52
+ `, "refusal");
53
+ var requestOf = /* @__PURE__ */ __name((line, cli) => {
54
+ let parsed;
55
+ try {
56
+ parsed = JSON.parse(line);
57
+ } catch {
58
+ return { id: null, error: "a request is one JSON object per line" };
59
+ }
60
+ const { id, argv } = parsed ?? {};
61
+ const known = typeof id === "number" && Number.isFinite(id) ? id : null;
62
+ if (known === null)
63
+ return { id: null, error: 'a request needs a numeric "id"' };
64
+ if (!Array.isArray(argv) || !argv.every((word) => typeof word === "string"))
65
+ return { id: known, error: '"argv" is a list of strings' };
66
+ if (isCommandServer(argv))
67
+ return { id: known, error: `\`${cli} commands --serve\` cannot run inside itself` };
68
+ return { id: known, argv };
69
+ }, "requestOf");
70
+ var serveCommands = /* @__PURE__ */ __name(async ({ input, write, run, cli, version, idleMs = COMMAND_SERVER_IDLE_MS, concurrent = COMMAND_SERVER_CONCURRENT, signal }) => {
71
+ const send = /* @__PURE__ */ __name((value) => write(`${JSON.stringify(value)}
72
+ `), "send");
73
+ await send({ ready: true, protocol: COMMAND_SERVER_PROTOCOL, version, concurrent });
74
+ const lines = createInterface({ input, crlfDelay: Number.POSITIVE_INFINITY });
75
+ return new Promise((resolve) => {
76
+ const waiting = [];
77
+ let active = 0;
78
+ let running = 0;
79
+ let gated = false;
80
+ let drained;
81
+ let turns = Promise.resolve();
82
+ let timer;
83
+ let ending = false;
84
+ let done = false;
85
+ const finish = /* @__PURE__ */ __name(() => {
86
+ if (done)
87
+ return;
88
+ done = true;
89
+ clearTimeout(timer);
90
+ lines.close();
91
+ resolve(0);
92
+ }, "finish");
93
+ const settle = /* @__PURE__ */ __name(() => {
94
+ if (running === 0 && drained) {
95
+ const go = drained;
96
+ drained = void 0;
97
+ go();
98
+ }
99
+ pump();
100
+ if (active > 0 || waiting.length > 0 || done)
101
+ return;
102
+ if (ending)
103
+ finish();
104
+ else {
105
+ clearTimeout(timer);
106
+ timer = setTimeout(finish, idleMs);
107
+ }
108
+ }, "settle");
109
+ const start = /* @__PURE__ */ __name((line) => {
110
+ active += 1;
111
+ running += 1;
112
+ let holdsPlace = true;
113
+ let ended = false;
114
+ let turn;
115
+ let release;
116
+ const alone = /* @__PURE__ */ __name(() => {
117
+ if (turn)
118
+ return turn;
119
+ holdsPlace = false;
120
+ running -= 1;
121
+ turn = turns.then(() => new Promise((go) => {
122
+ if (ended)
123
+ return go();
124
+ gated = true;
125
+ drained = /* @__PURE__ */ __name(() => {
126
+ if (ended)
127
+ gated = false;
128
+ else {
129
+ holdsPlace = true;
130
+ running += 1;
131
+ }
132
+ go();
133
+ }, "drained");
134
+ settle();
135
+ }));
136
+ turns = turn.then(() => ended && !holdsPlace ? void 0 : new Promise((free) => release = free));
137
+ return turn;
138
+ }, "alone");
139
+ const answer = /* @__PURE__ */ __name(async () => {
140
+ const request = requestOf(line, cli);
141
+ if ("error" in request)
142
+ return send({ id: request.id, code: 2, stdout: "", stderr: refusal(cli, request.error) });
143
+ const answered = await run(request.argv, alone);
144
+ return send({ id: request.id, ...answered });
145
+ }, "answer");
146
+ answer().catch(finish).finally(() => {
147
+ ended = true;
148
+ active -= 1;
149
+ if (holdsPlace)
150
+ running -= 1;
151
+ if (release) {
152
+ gated = false;
153
+ release();
154
+ }
155
+ settle();
156
+ });
157
+ }, "start");
158
+ const pump = /* @__PURE__ */ __name(() => {
159
+ while (!done && !gated && running < concurrent && waiting.length > 0)
160
+ start(waiting.shift());
161
+ }, "pump");
162
+ lines.on("line", (line) => {
163
+ if (done || ending || line.trim() === "")
164
+ return;
165
+ clearTimeout(timer);
166
+ waiting.push(line);
167
+ pump();
168
+ });
169
+ const end = /* @__PURE__ */ __name(() => {
170
+ ending = true;
171
+ settle();
172
+ }, "end");
173
+ lines.on("close", end);
174
+ if (signal?.aborted)
175
+ end();
176
+ signal?.addEventListener("abort", end, { once: true });
177
+ settle();
178
+ });
179
+ }, "serveCommands");
180
+
181
+ export {
182
+ COMMAND_SERVER_CONCURRENT,
183
+ enterCommandServer,
184
+ serveCommands
185
+ };
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-2TFXK3R4.js";
11
+ } from "./chunk-5XSBCMAF.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";