@wirecat/notion-cli 0.1.0 → 0.3.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 (212) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +14 -4
  3. package/contracts/wirecat.json +698 -1
  4. package/dist/bin/notion.js +2 -2
  5. package/dist/bundle/{all-profiles-OETMCOLN.js → all-profiles-4IONYZB6.js} +10 -10
  6. package/dist/bundle/{anthropic-5Y3O2TYM.js → anthropic-OXF74J4P.js} +6 -6
  7. package/dist/bundle/{app-server-IVWBIVHC.js → app-server-M2VF6ABM.js} +61 -52
  8. package/dist/bundle/{bun-EO636SAD.js → bun-DLA6QRLL.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-C2T7QJ2M.js → bun-sqlite-F4BYLW3F.js} +7 -7
  10. package/dist/bundle/{chunk-QBC23NHD.js → chunk-2MHMKNWD.js} +1 -1
  11. package/dist/bundle/{chunk-TSCIIXN3.js → chunk-4KUJTSHG.js} +2 -2
  12. package/dist/bundle/{chunk-24FAYAML.js → chunk-4TQVZXOV.js} +3 -3
  13. package/dist/bundle/{chunk-FF4DDBCB.js → chunk-5LBJNTEJ.js} +6 -6
  14. package/dist/bundle/chunk-5UA2TYMI.js +29 -0
  15. package/dist/bundle/{chunk-DIM5YWBU.js → chunk-5XP4KQ2F.js} +1 -1
  16. package/dist/bundle/{chunk-WM7663C2.js → chunk-6GN7KU7X.js} +9 -9
  17. package/dist/bundle/chunk-6JBLIQQN.js +16 -0
  18. package/dist/bundle/{chunk-CLG2ISQH.js → chunk-7NF3V5L2.js} +4 -4
  19. package/dist/bundle/{chunk-TR7R5DL4.js → chunk-7NGFGFE5.js} +12 -63
  20. package/dist/bundle/{chunk-YA4LSSDZ.js → chunk-7NVPM55S.js} +2913 -2371
  21. package/dist/bundle/{chunk-XC5CKHX2.js → chunk-7YZPBAQX.js} +1 -1
  22. package/dist/bundle/{chunk-RSIS7BR7.js → chunk-AYU5TFDU.js} +21 -21
  23. package/dist/bundle/{chunk-64D5VUZ4.js → chunk-BEPFGITI.js} +68 -64
  24. package/dist/bundle/{chunk-HRTIRRXR.js → chunk-CBGBFAYJ.js} +41 -6
  25. package/dist/bundle/{chunk-QC3KOJT4.js → chunk-CDGZZNGY.js} +6 -6
  26. package/dist/bundle/{chunk-JK44XO2S.js → chunk-CIVXTBJY.js} +56 -56
  27. package/dist/bundle/{chunk-OWJDC4CB.js → chunk-COH7OEER.js} +14 -13
  28. package/dist/bundle/{chunk-XL2HXHP3.js → chunk-D6RCRBDH.js} +2 -2
  29. package/dist/bundle/{chunk-47R43UVJ.js → chunk-EQPAZ33O.js} +19 -19
  30. package/dist/bundle/{chunk-AE2KQ37N.js → chunk-EY6S7FV3.js} +6 -6
  31. package/dist/bundle/chunk-FEMHUSGO.js +88 -0
  32. package/dist/bundle/{chunk-NLDYZBTC.js → chunk-FSJHASRQ.js} +1146 -2555
  33. package/dist/bundle/chunk-GBFEEHQC.js +385 -0
  34. package/dist/bundle/{chunk-IQWEJEB5.js → chunk-GCCPFKSU.js} +26264 -21086
  35. package/dist/bundle/{chunk-RDZ7SVBZ.js → chunk-GK4GLPG2.js} +3 -3
  36. package/dist/bundle/{chunk-B2XKEEFX.js → chunk-GSNE7OB4.js} +4 -4
  37. package/dist/bundle/{chunk-UWW24JQF.js → chunk-HTKSCSJU.js} +4 -4
  38. package/dist/bundle/{chunk-7FII4DCE.js → chunk-IJMFG7HB.js} +7 -7
  39. package/dist/bundle/{chunk-WVZFXI36.js → chunk-JIRRF6BM.js} +4 -4
  40. package/dist/bundle/{chunk-ST2UC7FS.js → chunk-JODE2XED.js} +31 -27
  41. package/dist/bundle/{chunk-CWVAYQXI.js → chunk-K5I64ZVI.js} +9 -9
  42. package/dist/bundle/chunk-KFVDL2QS.js +146 -0
  43. package/dist/bundle/{chunk-JKIN5TOU.js → chunk-KL3P5TQK.js} +4 -4
  44. package/dist/bundle/chunk-L62XTC7N.js +726 -0
  45. package/dist/bundle/chunk-L6H7PY4X.js +170 -0
  46. package/dist/bundle/{chunk-F6MLJ3V5.js → chunk-LIQMUDIZ.js} +2 -2
  47. package/dist/bundle/{chunk-HWRKURQH.js → chunk-M2EEIYBU.js} +2 -2
  48. package/dist/bundle/chunk-M6DGZ2O6.js +823 -0
  49. package/dist/bundle/chunk-MGUEZYFA.js +5546 -0
  50. package/dist/bundle/{chunk-UWIA2G6Q.js → chunk-MRA62W5K.js} +404 -537
  51. package/dist/bundle/{chunk-XYIT2XB3.js → chunk-MVA5HVKL.js} +20 -0
  52. package/dist/bundle/{chunk-GA3URWIF.js → chunk-NO2LIHWA.js} +1 -1
  53. package/dist/bundle/{chunk-ESZT4WW3.js → chunk-OCDJ4FFA.js} +4 -4
  54. package/dist/bundle/{chunk-B4B65XIO.js → chunk-OI5DWZJG.js} +3 -3
  55. package/dist/bundle/chunk-P3P6DA6K.js +259 -0
  56. package/dist/bundle/chunk-QX3TPFEX.js +1977 -0
  57. package/dist/bundle/{chunk-EU5WCOMQ.js → chunk-R6SDRSZK.js} +76 -35
  58. package/dist/bundle/{chunk-K5TWMQSY.js → chunk-RMJMID5D.js} +8 -8
  59. package/dist/bundle/{chunk-RLSFOR2D.js → chunk-SGBS5QCU.js} +4 -4
  60. package/dist/bundle/{chunk-3D3PFXBP.js → chunk-T5UNSFES.js} +10 -15
  61. package/dist/bundle/{chunk-RAZKIHGH.js → chunk-TFNRCCGR.js} +4 -4
  62. package/dist/bundle/{chunk-WK3OSDNV.js → chunk-TJCPTRYD.js} +7 -7
  63. package/dist/bundle/{chunk-BWICUW7W.js → chunk-TXONV3HW.js} +2 -2
  64. package/dist/bundle/{chunk-AQZO3ITW.js → chunk-TZ2QJ53V.js} +2 -2
  65. package/dist/bundle/{chunk-35K5T6WV.js → chunk-UKE3CGHK.js} +1 -1
  66. package/dist/bundle/{chunk-7N5QB6NL.js → chunk-UROEWCOG.js} +5 -3
  67. package/dist/bundle/chunk-WHJWURZB.js +335 -0
  68. package/dist/bundle/{chunk-R6ZM45NF.js → chunk-WU3XHGOB.js} +185 -57
  69. package/dist/bundle/{chunk-2YR3RYT4.js → chunk-WZEEEQGC.js} +3 -3
  70. package/dist/bundle/{chunk-B2WFKFYL.js → chunk-XCTOCVMW.js} +20 -116
  71. package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
  72. package/dist/bundle/{chunk-EGTBL3MJ.js → chunk-Y5LAJWR5.js} +1 -1
  73. package/dist/bundle/{chunk-66PL7P4C.js → chunk-YAPDU3SV.js} +1 -1
  74. package/dist/bundle/{chunk-WWMB4UHF.js → chunk-YFWLHTNO.js} +1 -1
  75. package/dist/bundle/{chunk-KHOVVPLC.js → chunk-YGCI3DHS.js} +1 -1
  76. package/dist/bundle/{chunk-4GC5DBHW.js → chunk-Z53LYX4M.js} +3 -3
  77. package/dist/bundle/{chunk-EPAZ7DJB.js → chunk-ZC6ZQQ55.js} +48 -45
  78. package/dist/bundle/command-contract-UBXS6NHI.js +38 -0
  79. package/dist/bundle/{command-server-entry-A66DJ3MH.js → command-server-entry-2SORMVRM.js} +27 -24
  80. package/dist/bundle/decode-5O7IEFPN.js +297 -0
  81. package/dist/bundle/{dispatch-FEKU5UXC.js → dispatch-YHQX6FEJ.js} +8 -8
  82. package/dist/bundle/{dist-YFKABFFF.js → dist-ILNOLGYN.js} +1 -1
  83. package/dist/bundle/{echarts-XD2JSWU4.js → echarts-ARLMVQC7.js} +2 -2
  84. package/dist/bundle/{embed-F3HYGAF7.js → embed-FUDUKQ3K.js} +7 -7
  85. package/dist/bundle/{embedder-GSEDDUH7.js → embedder-HDRV7GX3.js} +10 -10
  86. package/dist/bundle/{failure-HDJLR2YJ.js → failure-JHXICWIL.js} +3 -3
  87. package/dist/bundle/first-run-BGEFTXOE.js +29 -0
  88. package/dist/bundle/first-screen-F5F3VS6Y.js +38 -0
  89. package/dist/bundle/{instructions-NZGJ4FW5.js → instructions-MEFIKCDI.js} +1 -1
  90. package/dist/bundle/{mcp-VFIOZDVY.js → mcp-VMS6PBCU.js} +2 -2
  91. package/dist/bundle/mdast-util-from-markdown-R66F4HZA.js +1958 -0
  92. package/dist/bundle/mdast-util-gfm-LN2ELINH.js +2699 -0
  93. package/dist/bundle/meeting-combined-HNSS3FQY.js +24 -0
  94. package/dist/bundle/meeting-model-REZVYGQW.js +26 -0
  95. package/dist/bundle/meeting-semantic-R4CSLVRG.js +22 -0
  96. package/dist/bundle/micromark-extension-gfm-5X7YT43T.js +1838 -0
  97. package/dist/bundle/{node-RPKPDYQS.js → node-MAQALPLA.js} +2 -2
  98. package/dist/bundle/{node-sqlite-KH2UUYVO.js → node-sqlite-J7IJYNBO.js} +8 -8
  99. package/dist/bundle/notion.js +14 -14
  100. package/dist/bundle/{oauth-NKAI7TQD.js → oauth-AMV4YGJD.js} +8 -8
  101. package/dist/bundle/{open-WSAEAA2V.js → open-AB27MTGR.js} +6 -6
  102. package/dist/bundle/{openai-JPVDGHG5.js → openai-D77MU5XV.js} +31 -29
  103. package/dist/bundle/{process-5ZFVKOQX.js → process-SIOWTRJ6.js} +1 -1
  104. package/dist/bundle/{program-M3D56D6T.js → program-QC5MX4ZJ.js} +7533 -1997
  105. package/dist/bundle/{prompt-FROYQ5LV.js → prompt-W77YDHA6.js} +6 -6
  106. package/dist/bundle/{recognize-NYCHQMCX.js → recognize-3JAXQQ36.js} +5 -5
  107. package/dist/bundle/{remote-4OERF3Z4.js → remote-PSOJXCXO.js} +11 -11
  108. package/dist/bundle/{rerank-TEGXFUWY.js → rerank-EE44ZTGL.js} +8 -8
  109. package/dist/bundle/{schemas-MZNNOEYN.js → schemas-LBYUMBC6.js} +2 -2
  110. package/dist/bundle/{serve-HLYYBAXY.js → serve-XJMGAMFW.js} +10 -10
  111. package/dist/bundle/{server-D5OYNEUW.js → server-ASU6CP5R.js} +53 -44
  112. package/dist/bundle/server-WSPQ5EOA.js +72 -0
  113. package/dist/bundle/services-PT4PA4J6.js +588 -0
  114. package/dist/bundle/{sqlite-runtime-H2S5RR2F.js → sqlite-runtime-YHXRTVXE.js} +7 -7
  115. package/dist/bundle/{state-OPOXCDZL.js → state-T6ZKFWGD.js} +7 -7
  116. package/dist/bundle/{store-NHMXEJPD.js → store-3MUCZEI3.js} +20 -14
  117. package/dist/bundle/{store-Y3KRLCJ7.js → store-E5EE25FY.js} +30 -21
  118. package/dist/bundle/store-maintenance-command-ZZ55BBBG.js +63 -0
  119. package/dist/commands/api.d.ts.map +1 -1
  120. package/dist/commands/api.js +13 -4
  121. package/dist/commands/api.js.map +1 -1
  122. package/dist/commands/documents.d.ts +10 -1
  123. package/dist/commands/documents.d.ts.map +1 -1
  124. package/dist/commands/documents.js +175 -5
  125. package/dist/commands/documents.js.map +1 -1
  126. package/dist/commands/library.d.ts +10 -0
  127. package/dist/commands/library.d.ts.map +1 -0
  128. package/dist/commands/library.js +470 -0
  129. package/dist/commands/library.js.map +1 -0
  130. package/dist/commands/session.d.ts.map +1 -1
  131. package/dist/commands/session.js +4 -3
  132. package/dist/commands/session.js.map +1 -1
  133. package/dist/config.d.ts +19 -0
  134. package/dist/config.d.ts.map +1 -1
  135. package/dist/config.js +73 -5
  136. package/dist/config.js.map +1 -1
  137. package/dist/context.d.ts +8 -0
  138. package/dist/context.d.ts.map +1 -1
  139. package/dist/context.js +15 -3
  140. package/dist/context.js.map +1 -1
  141. package/dist/generated/types.d.ts +485 -375
  142. package/dist/generated/types.d.ts.map +1 -1
  143. package/dist/identity.d.ts.map +1 -1
  144. package/dist/identity.js +1 -0
  145. package/dist/identity.js.map +1 -1
  146. package/dist/knowledge.d.ts +27 -0
  147. package/dist/knowledge.d.ts.map +1 -0
  148. package/dist/knowledge.js +87 -0
  149. package/dist/knowledge.js.map +1 -0
  150. package/dist/library.d.ts +44 -0
  151. package/dist/library.d.ts.map +1 -0
  152. package/dist/library.js +149 -0
  153. package/dist/library.js.map +1 -0
  154. package/dist/notion/client.d.ts +4 -1
  155. package/dist/notion/client.d.ts.map +1 -1
  156. package/dist/notion/client.js +5 -2
  157. package/dist/notion/client.js.map +1 -1
  158. package/dist/notion/errors.d.ts +5 -0
  159. package/dist/notion/errors.d.ts.map +1 -1
  160. package/dist/notion/errors.js +33 -1
  161. package/dist/notion/errors.js.map +1 -1
  162. package/dist/notion/reads.d.ts +4 -0
  163. package/dist/notion/reads.d.ts.map +1 -1
  164. package/dist/notion/writes.d.ts +40 -0
  165. package/dist/notion/writes.d.ts.map +1 -0
  166. package/dist/notion/writes.js +112 -0
  167. package/dist/notion/writes.js.map +1 -0
  168. package/dist/program.js +2 -2
  169. package/dist/program.js.map +1 -1
  170. package/dist/sync/cursor.d.ts +93 -0
  171. package/dist/sync/cursor.d.ts.map +1 -1
  172. package/dist/sync/cursor.js +63 -2
  173. package/dist/sync/cursor.js.map +1 -1
  174. package/dist/sync/files.d.ts +87 -0
  175. package/dist/sync/files.d.ts.map +1 -0
  176. package/dist/sync/files.js +31 -0
  177. package/dist/sync/files.js.map +1 -0
  178. package/dist/sync/markdown.d.ts +4 -1
  179. package/dist/sync/markdown.d.ts.map +1 -1
  180. package/dist/sync/markdown.js +8 -6
  181. package/dist/sync/markdown.js.map +1 -1
  182. package/dist/sync/source.d.ts +6 -59
  183. package/dist/sync/source.d.ts.map +1 -1
  184. package/dist/sync/source.js +650 -271
  185. package/dist/sync/source.js.map +1 -1
  186. package/dist/version.d.ts +1 -1
  187. package/dist/version.js +1 -1
  188. package/package.json +3 -3
  189. package/skills/notion-cli/SKILL.md +18 -1
  190. package/dist/bundle/command-contract-6G5DC2FN.js +0 -35
  191. package/dist/bundle/decode-7XOFRAAT.js +0 -163
  192. package/dist/bundle/first-run-TXNTIUSP.js +0 -28
  193. package/dist/bundle/first-screen-JZPJND7J.js +0 -33
  194. package/dist/bundle/server-LWZGVMNW.js +0 -62
  195. package/dist/bundle/store-maintenance-command-D4W7WSLQ.js +0 -53
  196. package/dist/commands/comments.d.ts +0 -3
  197. package/dist/commands/comments.d.ts.map +0 -1
  198. package/dist/commands/comments.js +0 -114
  199. package/dist/commands/comments.js.map +0 -1
  200. package/dist/sample/comments.d.ts +0 -61
  201. package/dist/sample/comments.d.ts.map +0 -1
  202. package/dist/sample/comments.js +0 -39
  203. package/dist/sample/comments.js.map +0 -1
  204. package/dist/sample/records.d.ts +0 -16
  205. package/dist/sample/records.d.ts.map +0 -1
  206. package/dist/sample/records.js +0 -22
  207. package/dist/sample/records.js.map +0 -1
  208. package/dist/sample/transport.d.ts +0 -42
  209. package/dist/sample/transport.d.ts.map +0 -1
  210. package/dist/sample/transport.js +0 -153
  211. package/dist/sample/transport.js.map +0 -1
  212. /package/dist/bundle/{chunk-ZI3YTXSF.js → chunk-SHTHNBHG.js} +0 -0
@@ -1,8 +1,13 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
+ refuseLacking
5
+ } from "./chunk-L62XTC7N.js";
6
+ import {
7
+ DEFAULT_PACE,
4
8
  FloodMemory,
5
9
  OFFLINE,
10
+ Pacer,
6
11
  RecipientList,
7
12
  capability,
8
13
  ceilingRefusal,
@@ -10,16 +15,16 @@ import {
10
15
  floodPathFor,
11
16
  guardFor,
12
17
  holdEnd,
18
+ pacePathFor,
13
19
  profilesOnAccount,
14
20
  recipientsPathFor,
15
- refuseLacking,
16
21
  servicesFor,
17
22
  throughWrapper,
18
- withFileLockAsync
19
- } from "./chunk-IQWEJEB5.js";
23
+ waitForTurn
24
+ } from "./chunk-GCCPFKSU.js";
20
25
  import {
21
26
  servingProfiles
22
- } from "./chunk-B4B65XIO.js";
27
+ } from "./chunk-OI5DWZJG.js";
23
28
  import {
24
29
  AUTHORITY_KEY,
25
30
  CEILING_KEY,
@@ -43,10 +48,10 @@ import {
43
48
  rememberAccount,
44
49
  rootOf2 as rootOf,
45
50
  skipFlagFor
46
- } from "./chunk-UWIA2G6Q.js";
51
+ } from "./chunk-MRA62W5K.js";
47
52
  import {
48
53
  providerErrorKey
49
- } from "./chunk-7FII4DCE.js";
54
+ } from "./chunk-IJMFG7HB.js";
50
55
  import {
51
56
  chatReferenceOf,
52
57
  ensureAccount,
@@ -54,21 +59,18 @@ import {
54
59
  isId,
55
60
  openStore,
56
61
  pickPerson
57
- } from "./chunk-YA4LSSDZ.js";
62
+ } from "./chunk-7NVPM55S.js";
58
63
  import {
59
64
  isCliFailure
60
- } from "./chunk-7N5QB6NL.js";
61
- import {
62
- resolvePaths
63
- } from "./chunk-RSIS7BR7.js";
65
+ } from "./chunk-UROEWCOG.js";
64
66
  import {
65
67
  CliError
66
- } from "./chunk-F6MLJ3V5.js";
68
+ } from "./chunk-LIQMUDIZ.js";
67
69
  import {
68
70
  __name
69
71
  } from "./chunk-ZVVMGPBJ.js";
70
72
 
71
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
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
72
74
  import { openSync } from "node:fs";
73
75
  import { createInterface } from "node:readline";
74
76
  import { ReadStream } from "node:tty";
@@ -123,102 +125,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
123
125
  throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
124
126
  }, "terminalAsker");
125
127
 
126
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/sends/pace.js
127
- import { readFileSync, renameSync, writeFileSync } from "node:fs";
128
- import { join } from "node:path";
129
- var DEFAULT_PACE = { perMinute: 60, burst: 20 };
130
- var pacePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "pace", `${profile}.json`), "pacePathFor");
131
- var Pacer = class {
132
- static {
133
- __name(this, "Pacer");
134
- }
135
- path;
136
- rate;
137
- now;
138
- constructor(path, rate, now = Date.now) {
139
- this.path = path;
140
- this.rate = rate;
141
- this.now = now;
142
- }
143
- get interval() {
144
- return this.rate.perMinute > 0 ? 6e4 / this.rate.perMinute : 0;
145
- }
146
- /** When this call may go; reserved at once, so the next caller in any process lines up behind it. */
147
- async reserve() {
148
- if (this.interval === 0)
149
- return this.now();
150
- return withFileLockAsync(this.path, "the request pace", () => {
151
- const now = this.now();
152
- const tat = Math.max(this.read(now), now);
153
- this.write(tat + this.interval, now);
154
- return Math.max(now, tat - this.rate.burst * this.interval);
155
- });
156
- }
157
- /** The messenger asked every caller to wait: nothing goes before `now + waitMs`, in any process. */
158
- async holdFor(waitMs) {
159
- if (this.interval === 0)
160
- return;
161
- await withFileLockAsync(this.path, "the request pace", () => {
162
- const now = this.now();
163
- const hold = now + waitMs + this.rate.burst * this.interval;
164
- this.write(Math.max(this.read(now), hold), now);
165
- });
166
- }
167
- /** The owner's `flood clear`: every process may go again at once. */
168
- async reset() {
169
- await withFileLockAsync(this.path, "the request pace", () => this.write(0, this.now()));
170
- }
171
- read(now) {
172
- try {
173
- const file = JSON.parse(readFileSync(this.path, "utf8"));
174
- const tat = Number(file.tat);
175
- if (!Number.isFinite(tat))
176
- return 0;
177
- const at = Number(file.at);
178
- return Number.isFinite(at) && at > now ? now + Math.max(0, tat - at) : tat;
179
- } catch {
180
- return 0;
181
- }
182
- }
183
- write(tat, at) {
184
- const temporary = `${this.path}.${process.pid}.tmp`;
185
- writeFileSync(temporary, JSON.stringify({ tat, at }), { mode: 384 });
186
- renameSync(temporary, this.path);
187
- }
188
- };
189
- var ANNOUNCE_WAIT_MS = 5e3;
190
- var LONGEST_PACE_WAIT_MS = 5 * 6e4;
191
- var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
192
- const { name, operation, warn } = options;
193
- const now = options.now ?? Date.now;
194
- let at = now();
195
- try {
196
- at = await pacer.reserve();
197
- } catch (error) {
198
- warn?.(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
199
- event: "warning",
200
- code: "wait_not_remembered",
201
- operation
202
- });
203
- }
204
- const waitMs = at - now();
205
- if (waitMs <= 0)
206
- return;
207
- if (waitMs > (options.longestWaitMs ?? LONGEST_PACE_WAIT_MS))
208
- throw new CliError("rate_limited", `this profile's next request to ${name} has to wait ${Math.ceil(waitMs / 1e3)} s more \u2014 nothing was sent to ${name}`, { retry_after_ms: waitMs, retry_at: new Date(at).toISOString(), remembered: true });
209
- if (waitMs >= ANNOUNCE_WAIT_MS) {
210
- const seconds = Math.ceil(waitMs / 1e3);
211
- warn?.(`waiting ${seconds} s to keep this profile's pace with ${name}`, {
212
- event: "warning",
213
- code: "pace_wait",
214
- operation,
215
- counts: { seconds }
216
- });
217
- }
218
- await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
219
- }, "waitForTurn");
220
-
221
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
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
222
129
  var HOUSEKEEPING = /* @__PURE__ */ new Set([
223
130
  "help",
224
131
  "guide",
@@ -298,7 +205,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
298
205
  throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
299
206
  }, "refuseUnknownPermissionKeys");
300
207
 
301
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
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
302
209
  var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
303
210
  var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
304
211
  var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
@@ -395,7 +302,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
395
302
  });
396
303
  }, "flooded");
397
304
 
398
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
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
399
306
  var observed = /* @__PURE__ */ __name((messenger, events) => {
400
307
  const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
401
308
  const write = currentOperation();
@@ -494,7 +401,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
494
401
  counts[part] = (counts[part] ?? 0) + items.length;
495
402
  }, "byPart");
496
403
 
497
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
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
498
405
  var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
499
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" }) => {
500
407
  let warned = false;
@@ -1070,7 +977,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
1070
977
  }
1071
978
  }, "keep");
1072
979
 
1073
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
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
1074
981
  var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
1075
982
  let opened;
1076
983
  return {
@@ -1473,9 +1380,6 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
1473
1380
  export {
1474
1381
  answerOf,
1475
1382
  terminalAsker,
1476
- DEFAULT_PACE,
1477
- pacePathFor,
1478
- Pacer,
1479
1383
  commandPermissions,
1480
1384
  knownPermissionKeys,
1481
1385
  knownBeside,
@@ -0,0 +1,50 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
8
+ var emptyOptions = {};
9
+ function toString(value, options) {
10
+ const settings = options || emptyOptions;
11
+ const includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true;
12
+ const includeHtml = typeof settings.includeHtml === "boolean" ? settings.includeHtml : true;
13
+ return one(value, includeImageAlt, includeHtml);
14
+ }
15
+ __name(toString, "toString");
16
+ function one(value, includeImageAlt, includeHtml) {
17
+ if (node(value)) {
18
+ if ("value" in value) {
19
+ return value.type === "html" && !includeHtml ? "" : value.value;
20
+ }
21
+ if (includeImageAlt && "alt" in value && value.alt) {
22
+ return value.alt;
23
+ }
24
+ if ("children" in value) {
25
+ return all(value.children, includeImageAlt, includeHtml);
26
+ }
27
+ }
28
+ if (Array.isArray(value)) {
29
+ return all(value, includeImageAlt, includeHtml);
30
+ }
31
+ return "";
32
+ }
33
+ __name(one, "one");
34
+ function all(values, includeImageAlt, includeHtml) {
35
+ const result = [];
36
+ let index = -1;
37
+ while (++index < values.length) {
38
+ result[index] = one(values[index], includeImageAlt, includeHtml);
39
+ }
40
+ return result.join("");
41
+ }
42
+ __name(all, "all");
43
+ function node(value) {
44
+ return Boolean(value && typeof value === "object");
45
+ }
46
+ __name(node, "node");
47
+
48
+ export {
49
+ toString
50
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
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
8
8
  var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
9
9
  var kindsByConstructor = /* @__PURE__ */ new WeakMap();
10
10
  function collectKinds(ctor) {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
7
+ // 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/installer.js
8
8
  var installerOf = /* @__PURE__ */ __name((scriptPath) => {
9
9
  const path = scriptPath.replaceAll("\\", "/");
10
10
  if (path.includes("/_npx/"))
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/http/listen.js
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/http/listen.js
8
8
  import { createServer } from "node:http";
9
9
  import { Readable } from "node:stream";
10
10
  var MAX_BODY = 4 * 1024 * 1024;
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
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
8
8
  var fields = /* @__PURE__ */ new WeakMap();
9
9
  var readsStdin = /* @__PURE__ */ __name((command, field) => {
10
10
  fields.set(command, field);
@@ -4,15 +4,15 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-XL2HXHP3.js";
7
+ } from "./chunk-D6RCRBDH.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-F6MLJ3V5.js";
10
+ } from "./chunk-LIQMUDIZ.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
15
+ // 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/terminal/prompt.js
16
16
  import { createInterface } from "node:readline";
17
17
  import { Writable } from "node:stream";
18
18
  var EMPTY_TRIES = 3;
@@ -12,10 +12,10 @@ import {
12
12
  refuseWriteBeforeConnecting,
13
13
  registerPrompts,
14
14
  syncsFirst
15
- } from "./chunk-ST2UC7FS.js";
15
+ } from "./chunk-JODE2XED.js";
16
16
  import {
17
17
  stdinFieldOf
18
- } from "./chunk-KHOVVPLC.js";
18
+ } from "./chunk-YGCI3DHS.js";
19
19
  import {
20
20
  BinaryResource,
21
21
  Picture,
@@ -36,44 +36,46 @@ import {
36
36
  tool,
37
37
  toolKey,
38
38
  toolsFromCommands
39
- } from "./chunk-EU5WCOMQ.js";
39
+ } from "./chunk-R6SDRSZK.js";
40
40
  import {
41
41
  agentJson,
42
- skillResource
43
- } from "./chunk-R6ZM45NF.js";
44
- import {
45
- instructions
46
- } from "./chunk-DIM5YWBU.js";
42
+ skillResources
43
+ } from "./chunk-WU3XHGOB.js";
47
44
  import {
48
45
  StdioServerTransport,
49
46
  answeredWire,
50
47
  callerOf,
51
48
  callingAgent,
52
49
  serveStdio
53
- } from "./chunk-RDZ7SVBZ.js";
50
+ } from "./chunk-GK4GLPG2.js";
51
+ import {
52
+ connectedFor
53
+ } from "./chunk-XCTOCVMW.js";
54
+ import {
55
+ lackedNeed,
56
+ wholeList
57
+ } from "./chunk-L62XTC7N.js";
58
+ import {
59
+ instructions
60
+ } from "./chunk-5XP4KQ2F.js";
54
61
  import {
55
62
  McpServer,
56
63
  ResourceTemplate
57
64
  } from "./chunk-5D4AEUVA.js";
58
- import {
59
- mcpHttpMarker
60
- } from "./chunk-RLSFOR2D.js";
61
- import {
62
- connectedFor
63
- } from "./chunk-B2WFKFYL.js";
64
65
  import {
65
66
  capability,
66
67
  dateWindow,
67
68
  guardFor,
68
69
  imageSize,
69
- lackedNeed,
70
70
  servicesFor,
71
- storedDeps,
72
- wholeList
73
- } from "./chunk-IQWEJEB5.js";
71
+ storedDeps
72
+ } from "./chunk-GCCPFKSU.js";
73
+ import {
74
+ mcpHttpMarker
75
+ } from "./chunk-SGBS5QCU.js";
74
76
  import {
75
77
  findCommand
76
- } from "./chunk-JKIN5TOU.js";
78
+ } from "./chunk-KL3P5TQK.js";
77
79
  import {
78
80
  DEFAULT_OUTPUT_BYTES,
79
81
  changesAuthorityAt,
@@ -91,28 +93,30 @@ import {
91
93
  rootOf2 as rootOf,
92
94
  sealed,
93
95
  snakeKeys
94
- } from "./chunk-UWIA2G6Q.js";
96
+ } from "./chunk-MRA62W5K.js";
95
97
  import {
96
98
  withCaller
97
- } from "./chunk-7FII4DCE.js";
99
+ } from "./chunk-IJMFG7HB.js";
98
100
  import {
99
101
  openStore,
100
102
  pdfPreviewLimits
101
- } from "./chunk-YA4LSSDZ.js";
103
+ } from "./chunk-7NVPM55S.js";
102
104
  import {
103
- timezoneOf,
104
105
  typedCommand
105
- } from "./chunk-NLDYZBTC.js";
106
+ } from "./chunk-QX3TPFEX.js";
106
107
  import {
107
108
  isCliFailure
108
- } from "./chunk-7N5QB6NL.js";
109
+ } from "./chunk-UROEWCOG.js";
110
+ import {
111
+ timezoneOf
112
+ } from "./chunk-FSJHASRQ.js";
109
113
  import {
110
114
  warmEmbedders
111
- } from "./chunk-FF4DDBCB.js";
115
+ } from "./chunk-5LBJNTEJ.js";
112
116
  import {
113
117
  errorObjectOf,
114
118
  mcpErrorResult
115
- } from "./chunk-WM7663C2.js";
119
+ } from "./chunk-6GN7KU7X.js";
116
120
  import {
117
121
  description,
118
122
  integer,
@@ -127,19 +131,19 @@ import {
127
131
  regex,
128
132
  strictObject,
129
133
  string
130
- } from "./chunk-XYIT2XB3.js";
134
+ } from "./chunk-MVA5HVKL.js";
131
135
  import {
132
136
  CliError,
133
137
  visibleControls
134
- } from "./chunk-F6MLJ3V5.js";
138
+ } from "./chunk-LIQMUDIZ.js";
135
139
  import {
136
140
  __name
137
141
  } from "./chunk-ZVVMGPBJ.js";
138
142
 
139
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/server.js
143
+ // 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/server.js
140
144
  import { randomUUID } from "node:crypto";
141
145
 
142
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
146
+ // 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/agent-log.js
143
147
  var agentLog = /* @__PURE__ */ __name((open) => {
144
148
  let held;
145
149
  return {
@@ -158,7 +162,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
158
162
  };
159
163
  }, "agentLog");
160
164
 
161
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/resources.js
165
+ // 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/resources.js
162
166
  var LISTED = 100;
163
167
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
164
168
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -196,7 +200,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
196
200
  });
197
201
  }, "registerResources");
198
202
 
199
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/session.js
203
+ // 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/session.js
200
204
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
201
205
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
202
206
  var MessengerSession = class {
@@ -271,7 +275,7 @@ var MessengerSession = class {
271
275
  }
272
276
  };
273
277
 
274
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
278
+ // 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/tools/attachments.js
275
279
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
276
280
  const _command = messenger.app.command;
277
281
  return {
@@ -325,7 +329,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
325
329
  };
326
330
  }, "attachmentsTools");
327
331
 
328
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
332
+ // 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/tools/messages-photo.js
329
333
  var PHOTO_LIMIT = 512 * 1024;
330
334
  var IMAGE_TYPES = [
331
335
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -381,7 +385,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
381
385
  return new Uint8Array(Buffer.concat(chunks));
382
386
  }, "readUpTo");
383
387
 
384
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
388
+ // 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/tools/stats.js
385
389
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
386
390
  stats_charts: tool({
387
391
  title: "A chart from a chat's statistics",
@@ -418,14 +422,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
418
422
  })
419
423
  }), "statsTools");
420
424
 
421
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/tools.js
425
+ // 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/tools.js
422
426
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
423
427
  ...messagesPhotoTools(messenger),
424
428
  ...attachmentsTools(messenger),
425
429
  ...statsTools(messenger)
426
430
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
427
431
 
428
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_8be6aa3a41727a76ce87cf0d5a7bd659/node_modules/@wirecat/cli-core/dist/mcp/server.js
432
+ // 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/server.js
429
433
  var PER_RUN = /* @__PURE__ */ new Set([
430
434
  "streams",
431
435
  "stdin",
@@ -543,7 +547,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
543
547
  ...messenger.diagnose ? { [messenger.provider]: await messenger.diagnose(command, context) } : {}
544
548
  }), "local")
545
549
  });
546
- const skill = messenger.skill ? skillResource(app, messenger.skill) : void 0;
550
+ const skills = messenger.skill ? skillResources(app, messenger.skill) : [];
551
+ const skill = skills[0];
547
552
  const log = agentLog(() => openStore({ env: context.env, command: app.command, version: app.version }));
548
553
  const audit = /* @__PURE__ */ __name(async (call, caller) => {
549
554
  if (!recalledAccount(app, provider, settings.profile, context.env))
@@ -713,10 +718,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
713
718
  });
714
719
  }, "assertRead")
715
720
  });
716
- if (skill) {
717
- const { uri, name: resource, title, description: description2, mimeType, read } = skill;
718
- server.registerResource(resource, uri, { title, description: description2, mimeType }, read);
719
- }
721
+ for (const { uri, name: name2, title, description: description2, mimeType, read } of skills)
722
+ server.registerResource(name2, uri, { title, description: description2, mimeType }, read);
720
723
  return server;
721
724
  }, "build");
722
725
  return { session, embedders, build, log, offered: [...commands.map((one) => one.command), ...pictured] };
@@ -742,7 +745,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
742
745
  }, "serveOverStdio");
743
746
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
744
747
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
745
- const { serveOverHttp } = await import("./serve-HLYYBAXY.js");
748
+ const { serveOverHttp } = await import("./serve-XJMGAMFW.js");
746
749
  const appName = messenger.app.command;
747
750
  const appEnvPrefix = messenger.app.envPrefix;
748
751
  const listening = await serveOverHttp(build, {
@@ -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-KL3P5TQK.js";
10
+ import "./chunk-MRA62W5K.js";
11
+ import "./chunk-IJMFG7HB.js";
12
+ import "./chunk-4TQVZXOV.js";
13
+ import "./chunk-WHJWURZB.js";
14
+ import "./chunk-7YZPBAQX.js";
15
+ import "./chunk-HTKSCSJU.js";
16
+ import "./chunk-QX3TPFEX.js";
17
+ import "./chunk-UROEWCOG.js";
18
+ import "./chunk-5UA2TYMI.js";
19
+ import "./chunk-FSJHASRQ.js";
20
+ import "./chunk-WZEEEQGC.js";
21
+ import "./chunk-TJCPTRYD.js";
22
+ import "./chunk-JIRRF6BM.js";
23
+ import "./chunk-SHTHNBHG.js";
24
+ import "./chunk-CDGZZNGY.js";
25
+ import "./chunk-M2EEIYBU.js";
26
+ import "./chunk-AYU5TFDU.js";
27
+ import "./chunk-6GN7KU7X.js";
28
+ import "./chunk-MVA5HVKL.js";
29
+ import "./chunk-Y5E2WNWB.js";
30
+ import "./chunk-LIQMUDIZ.js";
31
+ import "./chunk-ZVVMGPBJ.js";
32
+ export {
33
+ SCHEMA_DIALECT,
34
+ commandContract,
35
+ commandPathOf,
36
+ findCommand,
37
+ outputOf
38
+ };