@wirecat/notion-cli 0.3.0 → 0.5.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/CHANGELOG.md +48 -0
  2. package/README.md +3 -0
  3. package/contracts/wirecat.json +49 -0
  4. package/dist/bin/notion.js +2 -2
  5. package/dist/bundle/{all-profiles-4IONYZB6.js → all-profiles-V37KCXH3.js} +9 -9
  6. package/dist/bundle/{anthropic-OXF74J4P.js → anthropic-Q4S3BYXD.js} +5 -5
  7. package/dist/bundle/{app-server-M2VF6ABM.js → app-server-43SR3ACI.js} +54 -54
  8. package/dist/bundle/{bun-DLA6QRLL.js → bun-M3J2QTR3.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-F4BYLW3F.js → bun-sqlite-EJ3W2PSV.js} +6 -6
  10. package/dist/bundle/{chunk-7NGFGFE5.js → chunk-2FJNMADN.js} +7 -7
  11. package/dist/bundle/{chunk-RMJMID5D.js → chunk-3RL2MIUF.js} +8 -8
  12. package/dist/bundle/{chunk-GCCPFKSU.js → chunk-5P5TXU2K.js} +462 -392
  13. package/dist/bundle/{chunk-L62XTC7N.js → chunk-6EOZTUHT.js} +10 -10
  14. package/dist/bundle/{chunk-4TQVZXOV.js → chunk-AT5I34AN.js} +3 -3
  15. package/dist/bundle/{chunk-CBGBFAYJ.js → chunk-B3FSLAIU.js} +6 -4
  16. package/dist/bundle/{chunk-7NVPM55S.js → chunk-BBSFQ3PU.js} +1262 -1048
  17. package/dist/bundle/{chunk-JIRRF6BM.js → chunk-BNEE35WD.js} +4 -4
  18. package/dist/bundle/{chunk-HTKSCSJU.js → chunk-BWLBSQSU.js} +3 -3
  19. package/dist/bundle/{chunk-T5UNSFES.js → chunk-C32AKHTY.js} +8 -8
  20. package/dist/bundle/{chunk-GK4GLPG2.js → chunk-CDK5E45T.js} +3 -3
  21. package/dist/bundle/{chunk-NO2LIHWA.js → chunk-CWXOXIWS.js} +1 -1
  22. package/dist/bundle/{chunk-LIQMUDIZ.js → chunk-DB2XKHI4.js} +2 -2
  23. package/dist/bundle/{chunk-Z53LYX4M.js → chunk-DBEQI5YM.js} +3 -3
  24. package/dist/bundle/{chunk-2MHMKNWD.js → chunk-DFCHHR5M.js} +1 -1
  25. package/dist/bundle/{chunk-OI5DWZJG.js → chunk-DO7BLXO3.js} +3 -3
  26. package/dist/bundle/{chunk-5UA2TYMI.js → chunk-DSP36YHQ.js} +2 -2
  27. package/dist/bundle/{chunk-WZEEEQGC.js → chunk-E2AFUJDR.js} +3 -3
  28. package/dist/bundle/{chunk-YFWLHTNO.js → chunk-E5WLE7BM.js} +1 -1
  29. package/dist/bundle/{chunk-P3P6DA6K.js → chunk-ECC2UX7X.js} +6 -6
  30. package/dist/bundle/{chunk-GSNE7OB4.js → chunk-ECEZOLOD.js} +4 -4
  31. package/dist/bundle/{chunk-CIVXTBJY.js → chunk-FBZI4Z3Z.js} +41 -41
  32. package/dist/bundle/{chunk-5XP4KQ2F.js → chunk-FKA7DOCK.js} +1 -1
  33. package/dist/bundle/chunk-FPUGMDJV.js +7 -0
  34. package/dist/bundle/{chunk-OCDJ4FFA.js → chunk-G2MJYXZG.js} +3 -3
  35. package/dist/bundle/{chunk-5LBJNTEJ.js → chunk-GCZ6MAEN.js} +6 -6
  36. package/dist/bundle/{chunk-M2EEIYBU.js → chunk-GTY6N5KZ.js} +2 -2
  37. package/dist/bundle/{chunk-TJCPTRYD.js → chunk-H3E2PZ5Y.js} +7 -7
  38. package/dist/bundle/{chunk-FSJHASRQ.js → chunk-HHVFIXDO.js} +304 -265
  39. package/dist/bundle/{chunk-6JBLIQQN.js → chunk-HZRQLAHO.js} +1 -1
  40. package/dist/bundle/{chunk-WU3XHGOB.js → chunk-J3NKZ6MO.js} +17 -15
  41. package/dist/bundle/{chunk-QX3TPFEX.js → chunk-JCKWQGCD.js} +36 -36
  42. package/dist/bundle/{chunk-4KUJTSHG.js → chunk-KHWOLBHQ.js} +2 -2
  43. package/dist/bundle/{chunk-R6SDRSZK.js → chunk-KHZ2RGXI.js} +33 -32
  44. package/dist/bundle/{chunk-SGBS5QCU.js → chunk-LBYGJKXW.js} +4 -4
  45. package/dist/bundle/{chunk-EY6S7FV3.js → chunk-MNRMKWCN.js} +6 -6
  46. package/dist/bundle/{chunk-TFNRCCGR.js → chunk-N2XADGL4.js} +3 -3
  47. package/dist/bundle/{chunk-IJMFG7HB.js → chunk-NA6QLHBZ.js} +7 -7
  48. package/dist/bundle/{chunk-TXONV3HW.js → chunk-NE43YXKL.js} +2 -2
  49. package/dist/bundle/{chunk-TZ2QJ53V.js → chunk-NHHJHXMQ.js} +2 -2
  50. package/dist/bundle/{chunk-K5I64ZVI.js → chunk-NTG657MI.js} +8 -8
  51. package/dist/bundle/{chunk-YAPDU3SV.js → chunk-O3DYRCIT.js} +1 -1
  52. package/dist/bundle/{chunk-KL3P5TQK.js → chunk-O5YB7FQD.js} +4 -4
  53. package/dist/bundle/{chunk-WHJWURZB.js → chunk-ONZVPE24.js} +5 -5
  54. package/dist/bundle/{chunk-7NF3V5L2.js → chunk-P5BHKKBI.js} +4 -4
  55. package/dist/bundle/{chunk-GBFEEHQC.js → chunk-PAW6RRCW.js} +11 -26
  56. package/dist/bundle/{chunk-D6RCRBDH.js → chunk-PPHBRESD.js} +2 -2
  57. package/dist/bundle/{chunk-MRA62W5K.js → chunk-PWRRDDMZ.js} +182 -170
  58. package/dist/bundle/{chunk-COH7OEER.js → chunk-QIG55MZH.js} +12 -12
  59. package/dist/bundle/{chunk-L6H7PY4X.js → chunk-QWYMXFKM.js} +3 -3
  60. package/dist/bundle/{chunk-M6DGZ2O6.js → chunk-QYXWRKNA.js} +7 -7
  61. package/dist/bundle/{chunk-JODE2XED.js → chunk-RIGE67FR.js} +24 -24
  62. package/dist/bundle/{chunk-ZC6ZQQ55.js → chunk-RJMQGG3P.js} +30 -30
  63. package/dist/bundle/{chunk-BEPFGITI.js → chunk-TD2JZ25O.js} +59 -56
  64. package/dist/bundle/{chunk-EQPAZ33O.js → chunk-TDNURSU6.js} +17 -17
  65. package/dist/bundle/{chunk-6GN7KU7X.js → chunk-TOSCB4SO.js} +14 -8
  66. package/dist/bundle/{chunk-Y5LAJWR5.js → chunk-TP7GDWVF.js} +1 -1
  67. package/dist/bundle/{chunk-UROEWCOG.js → chunk-UZSBGECU.js} +3 -3
  68. package/dist/bundle/{chunk-7YZPBAQX.js → chunk-W53EJOFQ.js} +1 -1
  69. package/dist/bundle/{chunk-AYU5TFDU.js → chunk-W5JZMXGW.js} +29 -20
  70. package/dist/bundle/{chunk-UKE3CGHK.js → chunk-W7HM2VGO.js} +1 -1
  71. package/dist/bundle/{chunk-FEMHUSGO.js → chunk-WE4UFASG.js} +1 -1
  72. package/dist/bundle/{chunk-XCTOCVMW.js → chunk-WPP76PSX.js} +14 -14
  73. package/dist/bundle/{chunk-YGCI3DHS.js → chunk-X2M6NIQG.js} +1 -1
  74. package/dist/bundle/{chunk-CDGZZNGY.js → chunk-XUPN2EHR.js} +21 -7
  75. package/dist/bundle/command-contract-TVRFW2IX.js +38 -0
  76. package/dist/bundle/{command-server-entry-2SORMVRM.js → command-server-entry-LJ627ZUA.js} +26 -26
  77. package/dist/bundle/{decode-5O7IEFPN.js → decode-PX2LZ5Y2.js} +5 -5
  78. package/dist/bundle/{dispatch-YHQX6FEJ.js → dispatch-KOISQ5QJ.js} +8 -8
  79. package/dist/bundle/{echarts-ARLMVQC7.js → echarts-FVTUDXDU.js} +2 -2
  80. package/dist/bundle/{embed-FUDUKQ3K.js → embed-CCSDK43I.js} +6 -6
  81. package/dist/bundle/{embedder-HDRV7GX3.js → embedder-VHI4DHB7.js} +9 -9
  82. package/dist/bundle/{failure-JHXICWIL.js → failure-FZ6VYKEQ.js} +2 -2
  83. package/dist/bundle/{first-run-BGEFTXOE.js → first-run-7JKE5AHN.js} +12 -12
  84. package/dist/bundle/first-screen-ZROHOEYJ.js +38 -0
  85. package/dist/bundle/{instructions-MEFIKCDI.js → instructions-HET7BCYK.js} +1 -1
  86. package/dist/bundle/{mcp-VMS6PBCU.js → mcp-RGNRW77S.js} +2 -2
  87. package/dist/bundle/meeting-combined-SSTOJUIJ.js +24 -0
  88. package/dist/bundle/{meeting-model-REZVYGQW.js → meeting-model-K7TPS4S5.js} +12 -12
  89. package/dist/bundle/{meeting-semantic-R4CSLVRG.js → meeting-semantic-UD26T37N.js} +6 -6
  90. package/dist/bundle/{node-MAQALPLA.js → node-CXZIFHZC.js} +2 -2
  91. package/dist/bundle/{node-sqlite-J7IJYNBO.js → node-sqlite-ME7KMORI.js} +7 -7
  92. package/dist/bundle/notion.js +13 -13
  93. package/dist/bundle/{oauth-AMV4YGJD.js → oauth-XBTROXHB.js} +7 -7
  94. package/dist/bundle/{open-AB27MTGR.js → open-HA6D3SXR.js} +5 -5
  95. package/dist/bundle/{openai-D77MU5XV.js → openai-H5AJPZBX.js} +16 -16
  96. package/dist/bundle/{process-SIOWTRJ6.js → process-5RUXWGYS.js} +1 -1
  97. package/dist/bundle/{program-QC5MX4ZJ.js → program-F3NBTZ7J.js} +1961 -994
  98. package/dist/bundle/{prompt-W77YDHA6.js → prompt-6XSUOLHK.js} +5 -5
  99. package/dist/bundle/{recognize-3JAXQQ36.js → recognize-2Y7AUVGG.js} +4 -4
  100. package/dist/bundle/{remote-PSOJXCXO.js → remote-KCABPXQ3.js} +10 -10
  101. package/dist/bundle/{rerank-EE44ZTGL.js → rerank-BTN7LUVA.js} +7 -7
  102. package/dist/bundle/{schemas-LBYUMBC6.js → schemas-VVLTLMXS.js} +1 -1
  103. package/dist/bundle/{serve-XJMGAMFW.js → serve-CYEMVRFC.js} +9 -9
  104. package/dist/bundle/server-UC2FNNXX.js +72 -0
  105. package/dist/bundle/{server-ASU6CP5R.js → server-WFIICGMI.js} +46 -46
  106. package/dist/bundle/{services-PT4PA4J6.js → services-L4W6ZWDG.js} +41 -41
  107. package/dist/bundle/{sqlite-runtime-YHXRTVXE.js → sqlite-runtime-IKMYLRQC.js} +6 -6
  108. package/dist/bundle/{state-T6ZKFWGD.js → state-LMUP636P.js} +6 -6
  109. package/dist/bundle/{store-3MUCZEI3.js → store-A2QZFBOX.js} +19 -17
  110. package/dist/bundle/{store-E5EE25FY.js → store-W2JC2JP4.js} +19 -19
  111. package/dist/bundle/store-maintenance-command-LRGQJPSZ.js +63 -0
  112. package/dist/commands/comments.d.ts +4 -0
  113. package/dist/commands/comments.d.ts.map +1 -0
  114. package/dist/commands/comments.js +80 -0
  115. package/dist/commands/comments.js.map +1 -0
  116. package/dist/commands/documents.d.ts.map +1 -1
  117. package/dist/commands/documents.js +5 -102
  118. package/dist/commands/documents.js.map +1 -1
  119. package/dist/commands/files.d.ts +4 -0
  120. package/dist/commands/files.d.ts.map +1 -0
  121. package/dist/commands/files.js +57 -0
  122. package/dist/commands/files.js.map +1 -0
  123. package/dist/commands/library.d.ts.map +1 -1
  124. package/dist/commands/library.js +56 -12
  125. package/dist/commands/library.js.map +1 -1
  126. package/dist/commands/writing.d.ts +32 -0
  127. package/dist/commands/writing.d.ts.map +1 -0
  128. package/dist/commands/writing.js +126 -0
  129. package/dist/commands/writing.js.map +1 -0
  130. package/dist/config.d.ts.map +1 -1
  131. package/dist/config.js +3 -0
  132. package/dist/config.js.map +1 -1
  133. package/dist/generated/manifest.d.ts +4 -1
  134. package/dist/generated/manifest.d.ts.map +1 -1
  135. package/dist/generated/manifest.js +20 -0
  136. package/dist/generated/manifest.js.map +1 -1
  137. package/dist/knowledge.d.ts +1 -0
  138. package/dist/knowledge.d.ts.map +1 -1
  139. package/dist/knowledge.js +68 -2
  140. package/dist/knowledge.js.map +1 -1
  141. package/dist/library.d.ts +4 -1
  142. package/dist/library.d.ts.map +1 -1
  143. package/dist/library.js +11 -0
  144. package/dist/library.js.map +1 -1
  145. package/dist/notion/errors.d.ts.map +1 -1
  146. package/dist/notion/errors.js +2 -0
  147. package/dist/notion/errors.js.map +1 -1
  148. package/dist/notion/notion.d.ts +38 -0
  149. package/dist/notion/notion.d.ts.map +1 -1
  150. package/dist/notion/notion.js +43 -0
  151. package/dist/notion/notion.js.map +1 -1
  152. package/dist/notion/port.d.ts.map +1 -1
  153. package/dist/notion/port.js +1 -0
  154. package/dist/notion/port.js.map +1 -1
  155. package/dist/notion/reads.d.ts +13 -1
  156. package/dist/notion/reads.d.ts.map +1 -1
  157. package/dist/notion/reads.js +1 -1
  158. package/dist/notion/writes.d.ts +38 -0
  159. package/dist/notion/writes.d.ts.map +1 -1
  160. package/dist/notion/writes.js +73 -0
  161. package/dist/notion/writes.js.map +1 -1
  162. package/dist/program.d.ts.map +1 -1
  163. package/dist/program.js +21 -2
  164. package/dist/program.js.map +1 -1
  165. package/dist/sync/browse.d.ts +30 -0
  166. package/dist/sync/browse.d.ts.map +1 -0
  167. package/dist/sync/browse.js +67 -0
  168. package/dist/sync/browse.js.map +1 -0
  169. package/dist/sync/cursor.d.ts +17 -0
  170. package/dist/sync/cursor.d.ts.map +1 -1
  171. package/dist/sync/cursor.js +28 -0
  172. package/dist/sync/cursor.js.map +1 -1
  173. package/dist/sync/files.d.ts +8 -0
  174. package/dist/sync/files.d.ts.map +1 -1
  175. package/dist/sync/files.js +10 -0
  176. package/dist/sync/files.js.map +1 -1
  177. package/dist/sync/source.d.ts +4 -4
  178. package/dist/sync/source.d.ts.map +1 -1
  179. package/dist/sync/source.js +49 -60
  180. package/dist/sync/source.js.map +1 -1
  181. package/dist/sync/users.d.ts +9 -0
  182. package/dist/sync/users.d.ts.map +1 -0
  183. package/dist/sync/users.js +76 -0
  184. package/dist/sync/users.js.map +1 -0
  185. package/dist/version.d.ts +1 -1
  186. package/dist/version.js +1 -1
  187. package/package.json +3 -3
  188. package/dist/bundle/chunk-SHTHNBHG.js +0 -2
  189. package/dist/bundle/command-contract-UBXS6NHI.js +0 -38
  190. package/dist/bundle/first-screen-F5F3VS6Y.js +0 -38
  191. package/dist/bundle/meeting-combined-HNSS3FQY.js +0 -24
  192. package/dist/bundle/server-WSPQ5EOA.js +0 -72
  193. package/dist/bundle/store-maintenance-command-ZZ55BBBG.js +0 -63
@@ -28,12 +28,12 @@ import {
28
28
  errorCodes,
29
29
  isCliError,
30
30
  visibleControls
31
- } from "./chunk-LIQMUDIZ.js";
31
+ } from "./chunk-DB2XKHI4.js";
32
32
  import {
33
33
  __name
34
34
  } from "./chunk-ZVVMGPBJ.js";
35
35
 
36
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
36
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
37
37
  var EXIT_CODES = {
38
38
  validation_error: 2,
39
39
  configuration_error: 3,
@@ -54,7 +54,7 @@ var EXIT_CODES = {
54
54
  var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
55
55
  var GENERIC_FAILURE = 1;
56
56
 
57
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
57
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
58
58
  var EFFECT_LEVELS = ["none", "read", "write"];
59
59
  var effectsSchema = strictObject({
60
60
  remote: picklist(EFFECT_LEVELS),
@@ -691,7 +691,7 @@ function toStandardJsonSchema(schema) {
691
691
  }
692
692
  __name(toStandardJsonSchema, "toStandardJsonSchema");
693
693
 
694
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
694
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
695
695
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
696
696
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
697
697
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -733,7 +733,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
733
733
  return String(value);
734
734
  }), "fill");
735
735
 
736
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
736
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
737
737
  var MAX_NEXT_STEPS = 2;
738
738
  var COMPACT_FLAG = "--compact";
739
739
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
@@ -860,7 +860,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
860
860
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
861
861
  ].join("\n"), "jsonlOf");
862
862
 
863
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
863
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
864
864
  var CRASH_CODE = "internal_error";
865
865
  var CRASH_REASON = "command.crashed";
866
866
  var errorObjectSchema = strictObject({
@@ -904,6 +904,12 @@ var BASE_REASONS = defineReasons([
904
904
  },
905
905
  { reason: "batch.output-budget", code: "validation_error", message: "batch output budget exhausted", details: [] },
906
906
  { reason: "config.invalid", code: "configuration_error", message: "the configuration is not valid", details: [] },
907
+ {
908
+ reason: "keyring.unreachable",
909
+ code: "configuration_error",
910
+ message: "the OS keyring did not answer, and no file holds the sign-in",
911
+ details: []
912
+ },
907
913
  { reason: "auth.failed", code: "authentication_error", message: "the sign-in did not work", details: [] },
908
914
  { reason: "access.denied", code: "permission_error", message: "this account may not do that", details: [] },
909
915
  { reason: "item.not-found", code: "not_found", message: "nothing found by that name", details: [] },
@@ -953,7 +959,7 @@ var BASE_REASONS = defineReasons([
953
959
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
954
960
  ]);
955
961
 
956
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
962
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
957
963
  var SAME_COMMAND = "*";
958
964
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
959
965
  var stepSchema = union([
@@ -1032,7 +1038,7 @@ var STEPS = defineSteps([
1032
1038
  }
1033
1039
  ]);
1034
1040
 
1035
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
1041
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
1036
1042
  var recognise = /* @__PURE__ */ __name((failure) => {
1037
1043
  if (isCliError(failure))
1038
1044
  return failure;
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-5XR7K42U.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-5XR7K42U.js
8
8
  var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
9
9
  var kindsByConstructor = /* @__PURE__ */ new WeakMap();
10
10
  function collectKinds(ctor) {
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  errorCodes
6
- } from "./chunk-LIQMUDIZ.js";
6
+ } from "./chunk-DB2XKHI4.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/errors/failures.js
11
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/errors/failures.js
12
12
  var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
13
13
  var isCommanderFailure = /* @__PURE__ */ __name((value) => {
14
14
  const { code, exitCode } = value ?? {};
@@ -60,7 +60,7 @@ var damagedFile = /* @__PURE__ */ __name(async (files, work) => {
60
60
  }, "damagedFile");
61
61
  var isStoreDamage = /* @__PURE__ */ __name((error) => damageIn(error) !== void 0, "isStoreDamage");
62
62
 
63
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/runs/secrets.js
63
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/runs/secrets.js
64
64
  var SECRET_WORDS = /* @__PURE__ */ new Set([
65
65
  "authorization",
66
66
  "cookie",
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/background/processes.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/background/processes.js
8
8
  import { execFileSync } from "node:child_process";
9
9
  import { readdirSync, readFileSync, readlinkSync } from "node:fs";
10
10
  var alive = /* @__PURE__ */ __name((pid) => {
@@ -7,7 +7,7 @@ import {
7
7
  isoTime,
8
8
  parseRegistry,
9
9
  text
10
- } from "./chunk-6GN7KU7X.js";
10
+ } from "./chunk-TOSCB4SO.js";
11
11
  import {
12
12
  array,
13
13
  getDotPath,
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  CliError,
27
27
  visibleControls
28
- } from "./chunk-LIQMUDIZ.js";
28
+ } from "./chunk-DB2XKHI4.js";
29
29
  import {
30
30
  __commonJS,
31
31
  __name,
@@ -1898,7 +1898,7 @@ var require_cli_table3 = __commonJS({
1898
1898
  }
1899
1899
  });
1900
1900
 
1901
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
1901
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
1902
1902
  import { realpathSync } from "node:fs";
1903
1903
  import { homedir, userInfo } from "node:os";
1904
1904
  import { join, posix, win32 } from "node:path";
@@ -1972,7 +1972,7 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
1972
1972
  var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
1973
1973
  var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
1974
1974
 
1975
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
1975
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
1976
1976
  var DEFAULT_RETRY = {
1977
1977
  retries: 1,
1978
1978
  baseDelayMs: 250,
@@ -1984,7 +1984,7 @@ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
1984
1984
  return Math.round(random() * ceiling);
1985
1985
  }, "backoffMs");
1986
1986
 
1987
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
1987
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
1988
1988
  var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
1989
1989
  var validate = /* @__PURE__ */ __name((paths) => {
1990
1990
  if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
@@ -2049,7 +2049,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
2049
2049
  return project(value, fields);
2050
2050
  }, "projectFields");
2051
2051
 
2052
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2052
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2053
2053
  var BATCH_LIMITS = Object.freeze({
2054
2054
  requests: 32,
2055
2055
  input_bytes: 262144,
@@ -2176,7 +2176,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
2176
2176
  };
2177
2177
  }, "runBatch");
2178
2178
 
2179
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2179
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2180
2180
  import { randomBytes } from "node:crypto";
2181
2181
  import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
2182
2182
  import { dirname, join as join2 } from "node:path";
@@ -2220,16 +2220,16 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
2220
2220
  `, 384);
2221
2221
  }, "saveConfigFile");
2222
2222
 
2223
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
2223
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
2224
2224
  var BASE_CONSTANTS = new URL("../constants.json", new URL("constants.js", import.meta.resolve("@wirecat/cli-base")).href);
2225
2225
  var baseConstantsSchema = object({});
2226
2226
  var LayerSchema = record(string(), unknown());
2227
2227
 
2228
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2228
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2229
2229
  import { readFileSync as readFileSync2 } from "node:fs";
2230
2230
  import { join as join3, resolve } from "node:path";
2231
2231
 
2232
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
2232
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
2233
2233
  import { createRequire } from "node:module";
2234
2234
  var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
2235
2235
  var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
@@ -2255,7 +2255,7 @@ var systemKeyring = {
2255
2255
  delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
2256
2256
  };
2257
2257
 
2258
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2258
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2259
2259
  var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
2260
2260
  var warnedRuns = /* @__PURE__ */ new WeakSet();
2261
2261
  var Credentials = class {
@@ -2294,7 +2294,12 @@ var Credentials = class {
2294
2294
  return { secret: fromFile, source: "file" };
2295
2295
  if (this.#storage !== "file") {
2296
2296
  const temporary = this.#temporaryService;
2297
- const fromKeyring = this.#tryKeyring(() => temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account));
2297
+ let fromKeyring;
2298
+ try {
2299
+ fromKeyring = temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account);
2300
+ } catch (error) {
2301
+ throw this.#unreachable(account, error);
2302
+ }
2298
2303
  if (fromKeyring)
2299
2304
  return { secret: fromKeyring, source: "keyring" };
2300
2305
  }
@@ -2375,6 +2380,10 @@ var Credentials = class {
2375
2380
  writeSecurely(this.#path(), `${JSON.stringify(store, null, 2)}
2376
2381
  `, 384);
2377
2382
  }
2383
+ #unreachable(account, error) {
2384
+ const where = this.#storage === "keyring" ? "" : `, and ${this.#path()} holds no sign-in for ${account}`;
2385
+ return new CliError("configuration_error", `the OS keyring did not answer (${error instanceof Error ? error.message : String(error)})${where}. On Linux a restarted session bus is a known cause: log out and back in, or set DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus. On a machine with no keyring, sign in with file storage.`, { reason: "keyring.unreachable" });
2386
+ }
2378
2387
  #tryKeyring(operation) {
2379
2388
  if (this.#storage === "keyring")
2380
2389
  return operation();
@@ -2390,7 +2399,7 @@ var Credentials = class {
2390
2399
  }
2391
2400
  };
2392
2401
 
2393
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2402
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2394
2403
  var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
2395
2404
  var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
2396
2405
  if (signal?.aborted) {
@@ -2405,10 +2414,10 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
2405
2414
  }), "realSleep");
2406
2415
  var wallClock = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "wallClock");
2407
2416
 
2408
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2417
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2409
2418
  import { appendFileSync } from "node:fs";
2410
2419
 
2411
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
2420
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
2412
2421
  var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
2413
2422
  var logRecordSchema = strictObject({
2414
2423
  time: isoTime,
@@ -2486,7 +2495,7 @@ var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
2486
2495
  return traceId;
2487
2496
  }, "traceIdOf");
2488
2497
 
2489
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2498
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2490
2499
  var REDACTED_FIELDS = [
2491
2500
  "authorization",
2492
2501
  "Authorization",
@@ -2580,7 +2589,7 @@ var silent = {
2580
2589
  }, "error")
2581
2590
  };
2582
2591
 
2583
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2592
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2584
2593
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
2585
2594
  import { styleText } from "node:util";
2586
2595
  var renderPretty = /* @__PURE__ */ __name((value, options) => {
@@ -2654,7 +2663,7 @@ var BORDERLESS = {
2654
2663
  middle: ""
2655
2664
  };
2656
2665
 
2657
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2666
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2658
2667
  var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2659
2668
  if (signal?.aborted)
2660
2669
  return Promise.reject(signal.reason);
@@ -2682,7 +2691,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2682
2691
  });
2683
2692
  }, "waitForDrain");
2684
2693
 
2685
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2694
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2686
2695
  var processStreams = {
2687
2696
  drain: /* @__PURE__ */ __name(async (signal) => {
2688
2697
  await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
@@ -2711,7 +2720,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
2711
2720
  };
2712
2721
  }, "captureStreams");
2713
2722
 
2714
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2723
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2715
2724
  var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
2716
2725
  const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
2717
2726
  const say = /* @__PURE__ */ __name((symbol) => (message) => {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
8
8
  var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
9
9
  `The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
10
10
  "Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
 
4
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/ports/wirecat-tools.js
4
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/ports/wirecat-tools.js
5
5
  var WIRECAT_TOOLS = [
6
6
  {
7
7
  command: "tg",
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  refuseLacking
5
- } from "./chunk-L62XTC7N.js";
5
+ } from "./chunk-6EOZTUHT.js";
6
6
  import {
7
7
  DEFAULT_PACE,
8
8
  FloodMemory,
@@ -21,10 +21,10 @@ import {
21
21
  servicesFor,
22
22
  throughWrapper,
23
23
  waitForTurn
24
- } from "./chunk-GCCPFKSU.js";
24
+ } from "./chunk-5P5TXU2K.js";
25
25
  import {
26
26
  servingProfiles
27
- } from "./chunk-OI5DWZJG.js";
27
+ } from "./chunk-DO7BLXO3.js";
28
28
  import {
29
29
  AUTHORITY_KEY,
30
30
  CEILING_KEY,
@@ -48,10 +48,10 @@ import {
48
48
  rememberAccount,
49
49
  rootOf2 as rootOf,
50
50
  skipFlagFor
51
- } from "./chunk-MRA62W5K.js";
51
+ } from "./chunk-PWRRDDMZ.js";
52
52
  import {
53
53
  providerErrorKey
54
- } from "./chunk-IJMFG7HB.js";
54
+ } from "./chunk-NA6QLHBZ.js";
55
55
  import {
56
56
  chatReferenceOf,
57
57
  ensureAccount,
@@ -59,18 +59,18 @@ import {
59
59
  isId,
60
60
  openStore,
61
61
  pickPerson
62
- } from "./chunk-7NVPM55S.js";
62
+ } from "./chunk-BBSFQ3PU.js";
63
63
  import {
64
64
  isCliFailure
65
- } from "./chunk-UROEWCOG.js";
65
+ } from "./chunk-UZSBGECU.js";
66
66
  import {
67
67
  CliError
68
- } from "./chunk-LIQMUDIZ.js";
68
+ } from "./chunk-DB2XKHI4.js";
69
69
  import {
70
70
  __name
71
71
  } from "./chunk-ZVVMGPBJ.js";
72
72
 
73
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
74
74
  import { openSync } from "node:fs";
75
75
  import { createInterface } from "node:readline";
76
76
  import { ReadStream } from "node:tty";
@@ -125,7 +125,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
125
125
  throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
126
126
  }, "terminalAsker");
127
127
 
128
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
128
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
129
129
  var HOUSEKEEPING = /* @__PURE__ */ new Set([
130
130
  "help",
131
131
  "guide",
@@ -205,7 +205,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
205
205
  throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
206
206
  }, "refuseUnknownPermissionKeys");
207
207
 
208
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
208
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
209
209
  var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
210
210
  var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
211
211
  var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
@@ -302,7 +302,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
302
302
  });
303
303
  }, "flooded");
304
304
 
305
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
305
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
306
306
  var observed = /* @__PURE__ */ __name((messenger, events) => {
307
307
  const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
308
308
  const write = currentOperation();
@@ -401,7 +401,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
401
401
  counts[part] = (counts[part] ?? 0) + items.length;
402
402
  }, "byPart");
403
403
 
404
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
404
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
405
405
  var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
406
406
  var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
407
407
  let warned = false;
@@ -977,7 +977,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
977
977
  }
978
978
  }, "keep");
979
979
 
980
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
980
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
981
981
  var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
982
982
  let opened;
983
983
  return {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
8
8
  var fields = /* @__PURE__ */ new WeakMap();
9
9
  var readsStdin = /* @__PURE__ */ __name((command, field) => {
10
10
  fields.set(command, field);
@@ -5,16 +5,16 @@ import {
5
5
  backoffMs,
6
6
  realSleep,
7
7
  wallClock
8
- } from "./chunk-AYU5TFDU.js";
8
+ } from "./chunk-W5JZMXGW.js";
9
9
  import {
10
10
  CliError,
11
11
  isCliError
12
- } from "./chunk-LIQMUDIZ.js";
12
+ } from "./chunk-DB2XKHI4.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/body.js
17
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/body.js
18
18
  var interrupted = /* @__PURE__ */ __name((signal) => isCliError(signal.reason) ? signal.reason : new CliError(signal.reason instanceof Error && signal.reason.name === "TimeoutError" ? "timeout" : "cancelled", "HTTP response read was interrupted"), "interrupted");
19
19
  var checked = /* @__PURE__ */ __name((signal) => {
20
20
  if (signal?.aborted)
@@ -99,7 +99,7 @@ var readJsonResponse = /* @__PURE__ */ __name(async (response, options) => {
99
99
  }
100
100
  }, "readJsonResponse");
101
101
 
102
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
102
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
103
103
  var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
104
104
  var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
105
105
  var hostProblems = /* @__PURE__ */ __name((hosts) => [
@@ -111,7 +111,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
111
111
  return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
112
112
  }, "hostCovered");
113
113
 
114
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
114
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
115
115
  var HOST_FETCH_TIMEOUT_MS = 3e4;
116
116
  var REDIRECTS = 5;
117
117
  var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
@@ -146,6 +146,15 @@ var checked2 = /* @__PURE__ */ __name((url, hosts) => {
146
146
  throw undeclared(url);
147
147
  return url;
148
148
  }, "checked");
149
+ var NOT_SENT = /* @__PURE__ */ new Set(["EAI_AGAIN", "ENOTFOUND", "ECONNREFUSED"]);
150
+ var neverSent = /* @__PURE__ */ __name((error) => {
151
+ for (let at = error, depth = 0; at instanceof Error && depth < 4; at = at.cause, depth++) {
152
+ const code = at.code;
153
+ if (typeof code === "string" && NOT_SENT.has(code))
154
+ return true;
155
+ }
156
+ return false;
157
+ }, "neverSent");
149
158
  var hostFetch = /* @__PURE__ */ __name((options) => {
150
159
  const problems = hostProblems(options.hosts);
151
160
  if (problems.length > 0)
@@ -161,8 +170,10 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
161
170
  let method = (init.method ?? request?.method ?? "GET").toUpperCase();
162
171
  let body = init.body ?? request?.body ?? void 0;
163
172
  const headers = new Headers(init.headers ?? request?.headers);
173
+ let answered = false;
164
174
  try {
165
175
  let response = await send(input, { ...init, signal, ...follow ? { redirect: "manual" } : {} });
176
+ answered = true;
166
177
  for (let hop = 0; follow && REDIRECT_STATUSES.has(response.status); hop += 1) {
167
178
  const location = response.headers.get("location");
168
179
  if (!location)
@@ -194,12 +205,15 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
194
205
  throw isCliError(caller.reason) ? caller.reason : new CliError("cancelled", "request cancelled");
195
206
  if (timeout.signal.aborted)
196
207
  throw new CliError("timeout", `${url.hostname} did not answer within ${timeoutMs} ms`, { retryable: true });
197
- throw new CliError("network_error", `${url.hostname} could not be reached`, { retryable: true });
208
+ throw new CliError("network_error", `${url.hostname} could not be reached`, {
209
+ retryable: true,
210
+ ...!answered && neverSent(error) ? { sent: false } : {}
211
+ });
198
212
  }
199
213
  };
200
214
  }, "hostFetch");
201
215
 
202
- // node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
216
+ // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
203
217
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
204
218
  if (!header)
205
219
  return void 0;
@@ -0,0 +1,38 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ SCHEMA_DIALECT,
5
+ commandContract,
6
+ commandPathOf,
7
+ findCommand,
8
+ outputOf
9
+ } from "./chunk-O5YB7FQD.js";
10
+ import "./chunk-PWRRDDMZ.js";
11
+ import "./chunk-NA6QLHBZ.js";
12
+ import "./chunk-AT5I34AN.js";
13
+ import "./chunk-ONZVPE24.js";
14
+ import "./chunk-W53EJOFQ.js";
15
+ import "./chunk-BWLBSQSU.js";
16
+ import "./chunk-JCKWQGCD.js";
17
+ import "./chunk-UZSBGECU.js";
18
+ import "./chunk-DSP36YHQ.js";
19
+ import "./chunk-HHVFIXDO.js";
20
+ import "./chunk-E2AFUJDR.js";
21
+ import "./chunk-H3E2PZ5Y.js";
22
+ import "./chunk-BNEE35WD.js";
23
+ import "./chunk-FPUGMDJV.js";
24
+ import "./chunk-XUPN2EHR.js";
25
+ import "./chunk-GTY6N5KZ.js";
26
+ import "./chunk-W5JZMXGW.js";
27
+ import "./chunk-TOSCB4SO.js";
28
+ import "./chunk-MVA5HVKL.js";
29
+ import "./chunk-Y5E2WNWB.js";
30
+ import "./chunk-DB2XKHI4.js";
31
+ import "./chunk-ZVVMGPBJ.js";
32
+ export {
33
+ SCHEMA_DIALECT,
34
+ commandContract,
35
+ commandPathOf,
36
+ findCommand,
37
+ outputOf
38
+ };