@wirecat/hubspot-cli 0.5.0 → 0.6.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 (178) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +73 -52
  3. package/contracts/wirecat.json +39 -13
  4. package/dist/bin/hubspot.js +2 -2
  5. package/dist/bundle/agent-XB35QVOK.js +40 -0
  6. package/dist/bundle/{all-profiles-PGFXLOKN.js → all-profiles-HFVXPMF6.js} +11 -11
  7. package/dist/bundle/{anthropic-LPOJ3TYF.js → anthropic-VE6WR6IN.js} +5 -5
  8. package/dist/bundle/{app-server-EYWGCSRY.js → app-server-GZ4DCQK7.js} +68 -68
  9. package/dist/bundle/{bun-ZJOOKIIW.js → bun-2DHMKD34.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-Y6KKH2OW.js → bun-sqlite-T5XTYL7L.js} +6 -6
  11. package/dist/bundle/{chunk-WQZENAPE.js → chunk-24HPBWKZ.js} +63 -4
  12. package/dist/bundle/{chunk-STTHRJBX.js → chunk-2I2KBCS6.js} +5 -5
  13. package/dist/bundle/{chunk-AIQT2GGK.js → chunk-2K5BAY32.js} +19 -19
  14. package/dist/bundle/{chunk-WEM4FZPM.js → chunk-2VUIJ5XB.js} +2 -2
  15. package/dist/bundle/{chunk-KRTXJMCD.js → chunk-3HS7JTPI.js} +27 -177
  16. package/dist/bundle/{chunk-BCW7DAVV.js → chunk-3TLNO3VM.js} +2 -2
  17. package/dist/bundle/{chunk-AVBKXCEY.js → chunk-3W5R3XAH.js} +8 -8
  18. package/dist/bundle/{chunk-QDNYJOWJ.js → chunk-3WG4MTQI.js} +1 -1
  19. package/dist/bundle/{chunk-HPRGUUHY.js → chunk-3YTTWJKL.js} +1 -1
  20. package/dist/bundle/{chunk-ZKPM53YG.js → chunk-4UEYVM46.js} +4 -4
  21. package/dist/bundle/{chunk-NKIKMG33.js → chunk-5ILCAAY4.js} +35 -35
  22. package/dist/bundle/{chunk-34HDRZIL.js → chunk-5IPB5WLB.js} +12 -12
  23. package/dist/bundle/{chunk-QPTHEZZ5.js → chunk-5NIIXJV3.js} +2 -2
  24. package/dist/bundle/{chunk-MPNMEWHA.js → chunk-5O5WYSSO.js} +1900 -650
  25. package/dist/bundle/{chunk-MPQ4SPZG.js → chunk-5VTKBGPW.js} +74 -31
  26. package/dist/bundle/{chunk-QIHJKE4K.js → chunk-5WDNG4QE.js} +7 -7
  27. package/dist/bundle/{chunk-OFOA6VJ2.js → chunk-67YPTVGP.js} +3 -3
  28. package/dist/bundle/{chunk-DEUCWBBH.js → chunk-6DABKZYH.js} +70 -11
  29. package/dist/bundle/{chunk-VIJV474N.js → chunk-745FMNI5.js} +1 -1
  30. package/dist/bundle/{chunk-KXWRVLSU.js → chunk-AKSWXRIU.js} +1 -1
  31. package/dist/bundle/{chunk-PMGAU6AP.js → chunk-AP3CWDRK.js} +2 -2
  32. package/dist/bundle/{chunk-5UPNDUAA.js → chunk-BM5F2ZNI.js} +2 -2
  33. package/dist/bundle/{chunk-EPBHJMF6.js → chunk-BU5CEMUH.js} +13 -13
  34. package/dist/bundle/{chunk-6PWRJGX4.js → chunk-CTN4DW2F.js} +4 -4
  35. package/dist/bundle/{chunk-CWCJEAHZ.js → chunk-CU76ZACK.js} +3 -3
  36. package/dist/bundle/{chunk-4RZ4DUQT.js → chunk-DIKUPU3T.js} +3 -3
  37. package/dist/bundle/{chunk-POTS24SH.js → chunk-E27NRLJZ.js} +18 -18
  38. package/dist/bundle/{chunk-BH5FEFZB.js → chunk-EB53G4HO.js} +2 -2
  39. package/dist/bundle/{chunk-DJUUQG6Y.js → chunk-EJZIEBAR.js} +8 -8
  40. package/dist/bundle/{chunk-BW7NPFVC.js → chunk-G6LDK6DJ.js} +7 -7
  41. package/dist/bundle/{chunk-V5VMAHDQ.js → chunk-GEJI27GN.js} +6 -6
  42. package/dist/bundle/{chunk-YQBGPBYN.js → chunk-GHXTNKX2.js} +2 -2
  43. package/dist/bundle/{chunk-5HGS65I3.js → chunk-GR4HZBWO.js} +2 -2
  44. package/dist/bundle/{chunk-I334AT2H.js → chunk-GWXTVO43.js} +7 -7
  45. package/dist/bundle/{chunk-Z7FC6VVM.js → chunk-H4W2OO35.js} +1 -1
  46. package/dist/bundle/{chunk-KAW5VEER.js → chunk-H5HBZCEJ.js} +8 -8
  47. package/dist/bundle/{chunk-VCYUYFIV.js → chunk-HX2BE7DO.js} +1 -1
  48. package/dist/bundle/{chunk-3CHJYWA2.js → chunk-HYDXA624.js} +6 -6
  49. package/dist/bundle/{chunk-DDMBPYHP.js → chunk-HZIGGAC7.js} +2 -2
  50. package/dist/bundle/{chunk-RJBKDZGV.js → chunk-I75ON7VM.js} +8 -8
  51. package/dist/bundle/{chunk-ODRF47VS.js → chunk-ID4GJFE7.js} +8 -8
  52. package/dist/bundle/{chunk-LWS5AO3H.js → chunk-J2SCELII.js} +16 -16
  53. package/dist/bundle/{chunk-R7ZOCDNG.js → chunk-J4FXBF44.js} +1 -1
  54. package/dist/bundle/{chunk-QCHW7R7L.js → chunk-J76CMNWQ.js} +1 -1
  55. package/dist/bundle/{chunk-AHZQMSXW.js → chunk-JDCFHZNU.js} +8 -8
  56. package/dist/bundle/{chunk-K3WCBNH4.js → chunk-JFLKTYH5.js} +6 -6
  57. package/dist/bundle/{chunk-5WADRBQG.js → chunk-K4Y2ZWOO.js} +3 -3
  58. package/dist/bundle/{chunk-PPQRWFJZ.js → chunk-KDW7B7AR.js} +5 -5
  59. package/dist/bundle/{chunk-YZ5MULJM.js → chunk-KKMOKSS5.js} +3 -3
  60. package/dist/bundle/{chunk-MFWECOO3.js → chunk-LHY5XGIR.js} +59 -59
  61. package/dist/bundle/{chunk-MW4ROXQ6.js → chunk-LTU4BQ4S.js} +3 -3
  62. package/dist/bundle/{chunk-A5UTNGI4.js → chunk-M3LRSN6J.js} +13 -13
  63. package/dist/bundle/{chunk-RZS7N3OZ.js → chunk-MJ24YFXZ.js} +7 -7
  64. package/dist/bundle/{chunk-HBFSGL5E.js → chunk-MSQGZHKM.js} +32 -28
  65. package/dist/bundle/{chunk-OCISQFMW.js → chunk-NQOQG7L3.js} +1 -1
  66. package/dist/bundle/{chunk-QLFD3MOL.js → chunk-PDVMYIBP.js} +1492 -733
  67. package/dist/bundle/{chunk-NEDV6RCQ.js → chunk-PR7ZDMGF.js} +3 -3
  68. package/dist/bundle/{chunk-L6WSFVTD.js → chunk-PZ3QJDTD.js} +5 -5
  69. package/dist/bundle/{chunk-LXLXF2OE.js → chunk-Q6AC7WLD.js} +3 -3
  70. package/dist/bundle/{chunk-WXEN6AXQ.js → chunk-QH47G73D.js} +3 -3
  71. package/dist/bundle/{chunk-23CLSKY7.js → chunk-QK5HQUHB.js} +3 -3
  72. package/dist/bundle/{chunk-KC4ILAKO.js → chunk-R26OEZOL.js} +1 -1
  73. package/dist/bundle/{chunk-NLPGUYCG.js → chunk-RLK2EGQD.js} +21 -15
  74. package/dist/bundle/{chunk-SBNZYRVZ.js → chunk-RLNPTES2.js} +4 -4
  75. package/dist/bundle/{chunk-K5S7MKBB.js → chunk-T4MZJMEJ.js} +17 -17
  76. package/dist/bundle/{chunk-MGMLSPIY.js → chunk-TAPQZYXY.js} +1 -1
  77. package/dist/bundle/{chunk-HPSESLOZ.js → chunk-TCSVW7BA.js} +1 -1
  78. package/dist/bundle/{chunk-7Q64D56R.js → chunk-THGAVPRA.js} +11 -11
  79. package/dist/bundle/{chunk-BVK4GUUI.js → chunk-TRLV5NWZ.js} +1706 -1820
  80. package/dist/bundle/{chunk-WDR77HPO.js → chunk-TT75CEYZ.js} +8 -1
  81. package/dist/bundle/{chunk-L4SVHQ7H.js → chunk-TXO4CJW3.js} +7 -7
  82. package/dist/bundle/{chunk-MKBQFD37.js → chunk-UCGZRZJA.js} +1 -1
  83. package/dist/bundle/{chunk-5ENY4POG.js → chunk-UVGJL753.js} +61 -61
  84. package/dist/bundle/{chunk-GZJP3KQQ.js → chunk-UZ2CL435.js} +1 -1
  85. package/dist/bundle/{chunk-YJLJZMEA.js → chunk-V7N2K5OT.js} +33 -30
  86. package/dist/bundle/{chunk-MENMD5Y5.js → chunk-VR2CJFVL.js} +8 -8
  87. package/dist/bundle/{chunk-EGR3YUWD.js → chunk-WASBOYI2.js} +4 -4
  88. package/dist/bundle/{chunk-NEP67GLY.js → chunk-WE4JSHIG.js} +6 -6
  89. package/dist/bundle/{chunk-ABPZOI3C.js → chunk-X2QRCFGJ.js} +4 -4
  90. package/dist/bundle/{chunk-ZLWQPUPB.js → chunk-XRFYVVFU.js} +2 -2
  91. package/dist/bundle/{chunk-6S422S22.js → chunk-YDG5FIQB.js} +7 -9
  92. package/dist/bundle/{chunk-ZMHD76RE.js → chunk-YIH2A2PQ.js} +2 -2
  93. package/dist/bundle/{chunk-7RIE3DAW.js → chunk-ZERQSELP.js} +189 -158
  94. package/dist/bundle/{chunk-BGUGTMTS.js → chunk-ZKTYTOF4.js} +8 -8
  95. package/dist/bundle/command-contract-5FXCYQUS.js +40 -0
  96. package/dist/bundle/{command-server-entry-B7S5AUE6.js → command-server-entry-H6IAJNOF.js} +28 -28
  97. package/dist/bundle/{decode-7L33C5UJ.js → decode-TR2EC46M.js} +5 -5
  98. package/dist/bundle/{dispatch-BIGHHSXV.js → dispatch-B2EP6DDT.js} +8 -8
  99. package/dist/bundle/{echarts-CWR3QH55.js → echarts-7OP7I5B2.js} +2 -2
  100. package/dist/bundle/{embed-GXQ3HOQ6.js → embed-FLGS4LN7.js} +6 -6
  101. package/dist/bundle/{embedder-47OYXGLS.js → embedder-JIXQXCP3.js} +9 -9
  102. package/dist/bundle/{failure-VMZOU5GZ.js → failure-AOACEURF.js} +2 -2
  103. package/dist/bundle/{first-run-YVQQOUQG.js → first-run-XJ2NWIK2.js} +12 -12
  104. package/dist/bundle/first-screen-U73G5CMM.js +40 -0
  105. package/dist/bundle/hubspot.js +27 -27
  106. package/dist/bundle/{instructions-QFS2MPK3.js → instructions-PYCYV6QE.js} +1 -1
  107. package/dist/bundle/{mcp-Z2KZNCXB.js → mcp-ZNULRPZ4.js} +2 -2
  108. package/dist/bundle/meeting-combined-IHTM5H5B.js +25 -0
  109. package/dist/bundle/{meeting-model-GLF2HVJG.js → meeting-model-2PA5WJY5.js} +11 -11
  110. package/dist/bundle/{meeting-semantic-RG56F4YX.js → meeting-semantic-5IH63QFV.js} +6 -6
  111. package/dist/bundle/{node-3TSWTXGI.js → node-6GTNIVBM.js} +2 -2
  112. package/dist/bundle/{node-sqlite-UPQCG7DJ.js → node-sqlite-FBCEHPNT.js} +7 -7
  113. package/dist/bundle/{oauth-MCVEENW3.js → oauth-BFP4SCL5.js} +7 -7
  114. package/dist/bundle/{open-JMUTKUYJ.js → open-MLU4MHGO.js} +5 -5
  115. package/dist/bundle/{openai-HT7YDOK7.js → openai-R7WJI6SO.js} +15 -15
  116. package/dist/bundle/{process-7RC6DAGM.js → process-NMNQLJHZ.js} +1 -1
  117. package/dist/bundle/{program-3DLBMOEJ.js → program-Z735HPFG.js} +474 -320
  118. package/dist/bundle/{prompt-7EROPXPF.js → prompt-A6RM55Q4.js} +5 -5
  119. package/dist/bundle/{recognize-B232GXD2.js → recognize-ORRDV45M.js} +4 -4
  120. package/dist/bundle/{remote-HGV64VRC.js → remote-UF3WSC4X.js} +9 -9
  121. package/dist/bundle/{rerank-5S6TDXHD.js → rerank-ZSJORUGH.js} +7 -7
  122. package/dist/bundle/{schemas-SB42IXEX.js → schemas-EXBNVPMI.js} +1 -1
  123. package/dist/bundle/{serve-D2WFCV6Z.js → serve-4KBJ6SIA.js} +9 -9
  124. package/dist/bundle/{server-4AXPTJPV.js → server-IFK4S6LJ.js} +60 -60
  125. package/dist/bundle/server-MNUAZWTN.js +86 -0
  126. package/dist/bundle/source-PBCQAG4C.js +426 -0
  127. package/dist/bundle/{sqlite-runtime-DAFMZNLI.js → sqlite-runtime-XPDUWOPG.js} +6 -6
  128. package/dist/bundle/{state-7OEBDXVV.js → state-4M26H7NL.js} +6 -6
  129. package/dist/bundle/{store-2ZWSWF76.js → store-3W4ZOOIB.js} +28 -24
  130. package/dist/bundle/store-CDY2PW6J.js +34 -0
  131. package/dist/bundle/{store-KC6US326.js → store-ICTY3RIF.js} +22 -22
  132. package/dist/bundle/store-maintenance-command-Y7TC3I43.js +73 -0
  133. package/dist/bundle/surface-4LNDJZD2.js +72 -0
  134. package/dist/bundle/writer-WGHWQTC2.js +86 -0
  135. package/dist/commands/account.d.ts +3 -2
  136. package/dist/commands/account.d.ts.map +1 -1
  137. package/dist/commands/account.js +31 -78
  138. package/dist/commands/account.js.map +1 -1
  139. package/dist/commands/crm-shared.d.ts.map +1 -1
  140. package/dist/commands/crm-shared.js +2 -0
  141. package/dist/commands/crm-shared.js.map +1 -1
  142. package/dist/commands/session.d.ts +0 -3
  143. package/dist/commands/session.d.ts.map +1 -1
  144. package/dist/commands/session.js +4 -31
  145. package/dist/commands/session.js.map +1 -1
  146. package/dist/config.d.ts.map +1 -1
  147. package/dist/config.js +16 -10
  148. package/dist/config.js.map +1 -1
  149. package/dist/crm/activities.d.ts +6 -1
  150. package/dist/crm/activities.d.ts.map +1 -1
  151. package/dist/crm/activities.js +36 -0
  152. package/dist/crm/activities.js.map +1 -1
  153. package/dist/crm/writer.d.ts +1 -1
  154. package/dist/crm/writer.d.ts.map +1 -1
  155. package/dist/crm/writer.js +69 -1
  156. package/dist/crm/writer.js.map +1 -1
  157. package/dist/program.d.ts.map +1 -1
  158. package/dist/program.js +0 -2
  159. package/dist/program.js.map +1 -1
  160. package/dist/reasons.d.ts.map +1 -1
  161. package/dist/reasons.js +0 -2
  162. package/dist/reasons.js.map +1 -1
  163. package/dist/version.d.ts +1 -1
  164. package/dist/version.js +1 -1
  165. package/package.json +3 -3
  166. package/skills/hubspot-cli/SKILL.md +10 -5
  167. package/skills/hubspot-cli/references/api/api-basic.md +2 -2
  168. package/skills/hubspot-cli/references/api/api-batch.md +2 -2
  169. package/dist/bundle/agent-RBQMA24N.js +0 -40
  170. package/dist/bundle/command-contract-O2UKYHLD.js +0 -40
  171. package/dist/bundle/first-screen-TU3KE2B5.js +0 -40
  172. package/dist/bundle/meeting-combined-WBEOLQMP.js +0 -25
  173. package/dist/bundle/server-FFHVNABP.js +0 -86
  174. package/dist/bundle/source-DF63EC2B.js +0 -945
  175. package/dist/bundle/store-Q3ZKD4FJ.js +0 -34
  176. package/dist/bundle/store-maintenance-command-24A4GBRP.js +0 -73
  177. package/dist/bundle/surface-SPTM57EP.js +0 -72
  178. package/dist/bundle/writer-EQQ55HOS.js +0 -86
@@ -15,209 +15,67 @@ import {
15
15
  profilesOnAccount,
16
16
  recipientsPathFor,
17
17
  refuseLacking,
18
+ refuseUnknownPermissionKeys,
18
19
  servicesFor,
20
+ terminalAsker,
19
21
  waitForTurn
20
- } from "./chunk-MPNMEWHA.js";
22
+ } from "./chunk-5O5WYSSO.js";
21
23
  import {
22
24
  capability,
23
25
  throughWrapper
24
- } from "./chunk-EPBHJMF6.js";
26
+ } from "./chunk-BU5CEMUH.js";
25
27
  import {
26
28
  servingProfiles
27
- } from "./chunk-WXEN6AXQ.js";
29
+ } from "./chunk-QH47G73D.js";
28
30
  import {
29
31
  asFirstWord,
30
32
  baseContext,
31
33
  codeOf,
32
34
  currentOperation,
33
35
  environmentOf,
34
- issueMessage,
35
36
  limitBatch,
36
- permissionIssues,
37
- publicIssue,
38
37
  recalledAccount,
39
38
  rememberAccount,
40
39
  rootOf2 as rootOf
41
- } from "./chunk-7RIE3DAW.js";
40
+ } from "./chunk-ZERQSELP.js";
42
41
  import {
43
42
  providerErrorKey
44
- } from "./chunk-RJBKDZGV.js";
43
+ } from "./chunk-I75ON7VM.js";
45
44
  import {
46
45
  openStore
47
- } from "./chunk-QLFD3MOL.js";
46
+ } from "./chunk-PDVMYIBP.js";
48
47
  import {
49
48
  isCliFailure
50
- } from "./chunk-DDMBPYHP.js";
49
+ } from "./chunk-HZIGGAC7.js";
51
50
  import {
52
- AUTHORITY_KEY,
53
51
  CEILING_KEY,
54
- DEFAULT_PERMISSIONS,
55
- KEYED_UNDER_HOUSEKEEPING,
56
- WRITE_KEYS,
57
52
  fetchesUnder,
58
- keyForCommand,
59
53
  levelFor,
60
- readKeysForCommand,
61
- skipFlagFor
62
- } from "./chunk-BW7NPFVC.js";
54
+ readKeysForCommand
55
+ } from "./chunk-G6LDK6DJ.js";
63
56
  import {
64
57
  chatReferenceOf,
65
58
  ensureAccount,
66
59
  foldName,
67
60
  isId,
68
61
  pickPerson
69
- } from "./chunk-POTS24SH.js";
62
+ } from "./chunk-E27NRLJZ.js";
70
63
  import {
71
64
  CliError
72
- } from "./chunk-PMGAU6AP.js";
65
+ } from "./chunk-AP3CWDRK.js";
73
66
  import {
74
67
  __name
75
68
  } from "./chunk-ZVVMGPBJ.js";
76
69
 
77
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
78
- import { openSync } from "node:fs";
79
- import { createInterface } from "node:readline";
80
- import { ReadStream } from "node:tty";
81
- var fromTerminal = /* @__PURE__ */ __name(async (question) => {
82
- if (!process.stdin.isTTY || !process.stderr.isTTY)
83
- return null;
84
- let input;
85
- try {
86
- input = new ReadStream(openSync("/dev/tty", "r"));
87
- } catch {
88
- return null;
89
- }
90
- const reader = createInterface({ input, output: process.stderr, terminal: true });
91
- try {
92
- return await new Promise((resolve, reject) => {
93
- const cancel = /* @__PURE__ */ __name(() => reject(new CliError("cancelled", "cancelled \u2014 nothing was done")), "cancel");
94
- reader.once("SIGINT", cancel);
95
- reader.once("close", cancel);
96
- reader.question(question, resolve);
97
- });
98
- } finally {
99
- reader.close();
100
- input.destroy();
101
- }
102
- }, "fromTerminal");
103
- var what = /* @__PURE__ */ __name((key, { chatId, count, personIds, forEveryone }) => [
104
- key,
105
- forEveryone ? "for everyone" : void 0,
106
- count !== void 0 ? `${count} ${count === 1 ? "item" : "items"}` : void 0,
107
- personIds?.length ? `${personIds.length} ${personIds.length === 1 ? "person" : "people"}` : void 0,
108
- chatId !== null ? `in chat ${chatId}` : void 0
109
- ].filter(Boolean).join(", "), "what");
110
- var answerOf = /* @__PURE__ */ __name(async (command, question) => {
111
- const given = command.optsWithGlobals();
112
- if (given.json === true || given.jsonl === true)
113
- return null;
114
- return (environmentOf(command).answer ?? fromTerminal)(question);
115
- }, "answerOf");
116
- var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) => {
117
- if (environmentOf(command).agent)
118
- return;
119
- const flag = skipFlagFor(key);
120
- const given = command.optsWithGlobals();
121
- if (flag === "--yes" ? given.yes === true : given.allowDangerous === true)
122
- return;
123
- const machine = given.json === true || given.jsonl === true;
124
- const answer = machine ? null : await (environmentOf(command).answer ?? fromTerminal)(`${what(key, request)} \u2014 go ahead? [y/N] `);
125
- if (answer === null) {
126
- throw new CliError("confirmation_required", `${key} asks before it acts (its permission level is ask), and nobody is at a terminal to answer \u2014 add ${flag} to go ahead`, { permission: key });
127
- }
128
- if (!/^\s*y(es)?\s*$/i.test(answer))
129
- throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
130
- }, "terminalAsker");
131
-
132
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
133
- var HOUSEKEEPING = /* @__PURE__ */ new Set([
134
- "help",
135
- "guide",
136
- "config",
137
- "session",
138
- "doctor",
139
- "commands",
140
- "complete",
141
- "upgrade",
142
- "skill",
143
- "mcp",
144
- "runs"
145
- ]);
146
- var commandPathKey = /* @__PURE__ */ __name((path) => path[0] === void 0 || HOUSEKEEPING.has(path[0]) && !KEYED_UNDER_HOUSEKEEPING.has(path.join(".")) ? null : path.join("."), "commandPathKey");
147
- var commandPermissions = /* @__PURE__ */ __name(({ keyOf = commandPathKey, extra = [], defaults = {}, alsoChecks } = {}) => ({
148
- keyOf,
149
- extra: [AUTHORITY_KEY, ...extra],
150
- defaults: { ...DEFAULT_PERMISSIONS, ...defaults },
151
- ...alsoChecks ? { alsoChecks } : {}
152
- }), "commandPermissions");
153
- var pathOf = /* @__PURE__ */ __name((command) => {
154
- const words = [];
155
- for (let at = command; at?.parent; at = at.parent)
156
- words.unshift(at.name());
157
- return words;
158
- }, "pathOf");
159
- var rootOf2 = /* @__PURE__ */ __name((command) => {
160
- let at = command;
161
- while (at.parent)
162
- at = at.parent;
163
- return at;
164
- }, "rootOf");
165
- var everyCommand = /* @__PURE__ */ __name((command) => [command, ...command.commands.flatMap(everyCommand)], "everyCommand");
166
- var knownPermissionKeys = /* @__PURE__ */ __name((command, keyOf = (one) => keyForCommand(pathOf(one)), extra = []) => {
167
- const known = /* @__PURE__ */ new Set();
168
- const add = /* @__PURE__ */ __name((key) => {
169
- for (let parts = key.split("."); parts.length > 0; parts = parts.slice(0, -1))
170
- known.add(parts.join("."));
171
- }, "add");
172
- if (typeof keyOf !== "function") {
173
- for (const one of everyCommand(rootOf2(command))) {
174
- const key = keyOf.keyOf(pathOf(one));
175
- if (key)
176
- add(key);
177
- }
178
- for (const key of [...keyOf.extra, ...extra])
179
- add(key);
180
- return known;
181
- }
182
- for (const one of everyCommand(rootOf2(command))) {
183
- const own = keyOf(one);
184
- const key = own === void 0 ? keyForCommand(pathOf(one)) : own;
185
- if (key)
186
- add(key);
187
- }
188
- for (const key of [...WRITE_KEYS, ...extra])
189
- add(key);
190
- return known;
191
- }, "knownPermissionKeys");
192
- var knownBeside = /* @__PURE__ */ __name((key, known) => {
193
- const parent = key.split(".").slice(0, -1).join(".");
194
- const depth = parent === "" ? 1 : parent.split(".").length + 1;
195
- return [...known].filter((one) => one.split(".").length === depth && (parent === "" || one.startsWith(`${parent}.`))).sort();
196
- }, "knownBeside");
197
- var unknownPermissionKeys = /* @__PURE__ */ __name((levels, known) => Object.keys(levels).filter((key) => key !== CEILING_KEY && !known.has(key)), "unknownPermissionKeys");
198
- var unknownPermissionIssues = /* @__PURE__ */ __name((command, settings, tool, keyOf) => {
199
- const saved = settings.savedPermissions ?? Object.keys(settings.permissions).filter((key) => key !== CEILING_KEY && settings.permissionSources[key] !== "flag").map((key) => ({ key, at: ["profiles", settings.profile, "permissions", key] }));
200
- return permissionIssues(saved, knownPermissionKeys(command, keyOf), { file: settings.configPath, tool }).map(publicIssue);
201
- }, "unknownPermissionIssues");
202
- var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, tool, keyOf) => {
203
- const issues = unknownPermissionIssues(command, settings, tool, keyOf);
204
- if (issues.length > 0)
205
- throw new CliError("configuration_error", issueMessage(issues), { permission: issues[0]?.key });
206
- const flagged = Object.keys(settings.permissions).filter((key2) => settings.permissionSources[key2] === "flag");
207
- const [key] = unknownPermissionKeys(Object.fromEntries(flagged.map((one) => [one, true])), knownPermissionKeys(command, keyOf));
208
- if (key !== void 0)
209
- throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
210
- }, "refuseUnknownPermissionKeys");
211
-
212
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
70
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
213
71
  var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
214
72
  var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
215
73
  var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
216
74
  var chatOf = /* @__PURE__ */ __name((args) => typeof args[0] === "string" && /^-?\d+$/.test(args[0]) ? args[0] : void 0, "chatOf");
217
75
  var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer }) => {
218
- const kept = /* @__PURE__ */ __name(async (operation, what2) => {
76
+ const kept = /* @__PURE__ */ __name(async (operation, what) => {
219
77
  try {
220
- await what2();
78
+ await what();
221
79
  } catch (error) {
222
80
  warn(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
223
81
  event: "warning",
@@ -306,7 +164,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
306
164
  });
307
165
  }, "flooded");
308
166
 
309
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
167
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
310
168
  var observed = /* @__PURE__ */ __name((messenger, events) => {
311
169
  const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
312
170
  const write = currentOperation();
@@ -405,7 +263,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
405
263
  counts[part] = (counts[part] ?? 0) + items.length;
406
264
  }, "byPart");
407
265
 
408
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
266
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
409
267
  var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
410
268
  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" }) => {
411
269
  let warned = false;
@@ -981,7 +839,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
981
839
  }
982
840
  }, "keep");
983
841
 
984
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
842
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
985
843
  var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
986
844
  let opened;
987
845
  return {
@@ -1075,7 +933,7 @@ var settled = /* @__PURE__ */ __name(async (pending, ms) => {
1075
933
  clearTimeout(timer);
1076
934
  }
1077
935
  }, "settled");
1078
- var listened = /* @__PURE__ */ __name(({ run, operation, what: what2 }, events, warn, waitMs) => {
936
+ var listened = /* @__PURE__ */ __name(({ run, operation, what }, events, warn, waitMs) => {
1079
937
  const abort = new AbortController();
1080
938
  let closing = false;
1081
939
  const ended = Promise.resolve().then(() => run(abort.signal)).catch((error) => {
@@ -1083,11 +941,11 @@ var listened = /* @__PURE__ */ __name(({ run, operation, what: what2 }, events,
1083
941
  return;
1084
942
  const warning = { event: "warning", code: "listen_failed", operation };
1085
943
  events(warning);
1086
- warn(`${what2} arriving during this command are not saved: ${error instanceof Error ? error.message : String(error)}`, warning);
944
+ warn(`${what} arriving during this command are not saved: ${error instanceof Error ? error.message : String(error)}`, warning);
1087
945
  });
1088
946
  return {
1089
947
  operation,
1090
- what: what2,
948
+ what,
1091
949
  closing: /* @__PURE__ */ __name(() => {
1092
950
  closing = true;
1093
951
  }, "closing"),
@@ -1178,10 +1036,10 @@ var connected = /* @__PURE__ */ __name((connection, { app, provider, name, delet
1178
1036
  events(warning);
1179
1037
  warn(text, warning);
1180
1038
  }, "warned");
1181
- passives.forEach(({ operation, what: what2 }, at) => {
1039
+ passives.forEach(({ operation, what }, at) => {
1182
1040
  if (ended[at])
1183
1041
  return;
1184
- warned({ event: "warning", code: "store_not_written", operation }, `not saved to the local store: the messenger was still handing on ${what2} at exit`);
1042
+ warned({ event: "warning", code: "store_not_written", operation }, `not saved to the local store: the messenger was still handing on ${what} at exit`);
1185
1043
  });
1186
1044
  await settled(/* @__PURE__ */ new Set([...pending, ...announcing]), closeWaitMs);
1187
1045
  closing.abort();
@@ -1240,14 +1098,14 @@ var warnUnserved = /* @__PURE__ */ __name(async (messenger, profile, { env, rend
1240
1098
  const newest = (await store.chats.chatStats(account)).map((one) => one.newestAt).reduce((latest, at) => at !== null && (latest === null || at > latest) ? at : latest, null);
1241
1099
  renderer.warn(`no \`${messenger.app.command} ${profile} serve\` keeps profile "${profile}" up to date \u2014 ` + (newest === null ? "the local store holds no messages yet" : `the newest stored message is from ${newest}`));
1242
1100
  }, "warnUnserved");
1243
- var pathOf2 = /* @__PURE__ */ __name((command) => {
1101
+ var pathOf = /* @__PURE__ */ __name((command) => {
1244
1102
  const words = [];
1245
1103
  for (let at = command; at?.parent; at = at.parent)
1246
1104
  words.unshift(at.name());
1247
1105
  return words;
1248
1106
  }, "pathOf");
1249
1107
  var refuseDenied = /* @__PURE__ */ __name((command, settings) => {
1250
- for (const key of readKeysForCommand(pathOf2(command))) {
1108
+ for (const key of readKeysForCommand(pathOf(command))) {
1251
1109
  const { level, key: named } = levelFor(settings.permissions, key);
1252
1110
  if (level !== "deny")
1253
1111
  continue;
@@ -1270,7 +1128,7 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
1270
1128
  const base = baseContext(command, (flags, options) => messenger.resolveSettings(flags, { ...options, ...resolving }));
1271
1129
  const { profile } = base.settings;
1272
1130
  refuseDenied(command, base.settings);
1273
- refuseLacking(messenger, pathOf2(command));
1131
+ refuseLacking(messenger, pathOf(command));
1274
1132
  refuseUnknownPermissionKeys(command, base.settings, app.command, messenger.permissionKey);
1275
1133
  const warn = /* @__PURE__ */ __name((text, warning) => base.renderer.warn(text, warning), "warn");
1276
1134
  const accountFor = /* @__PURE__ */ __name(() => {
@@ -1382,14 +1240,6 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
1382
1240
  }, "messengerContext");
1383
1241
 
1384
1242
  export {
1385
- answerOf,
1386
- terminalAsker,
1387
- commandPathKey,
1388
- commandPermissions,
1389
- knownPermissionKeys,
1390
- knownBeside,
1391
- unknownPermissionIssues,
1392
- refuseUnknownPermissionKeys,
1393
1243
  fill,
1394
1244
  connectedFor,
1395
1245
  refuseLocalWrite,
@@ -7,12 +7,12 @@ import {
7
7
  import {
8
8
  singleLine,
9
9
  visibleControls
10
- } from "./chunk-PMGAU6AP.js";
10
+ } from "./chunk-AP3CWDRK.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/render/messages.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/render/messages.js
16
16
  import { styleText } from "node:util";
17
17
  var TIME_WIDTH = 8;
18
18
  var INDENT = " ".repeat(TIME_WIDTH + 2);
@@ -2,33 +2,33 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  stdinFieldOf
5
- } from "./chunk-MGMLSPIY.js";
5
+ } from "./chunk-TAPQZYXY.js";
6
6
  import {
7
7
  commandPathOf
8
- } from "./chunk-STTHRJBX.js";
8
+ } from "./chunk-2I2KBCS6.js";
9
9
  import {
10
10
  commandServerRequest,
11
11
  metaOf
12
- } from "./chunk-7RIE3DAW.js";
12
+ } from "./chunk-ZERQSELP.js";
13
13
  import {
14
14
  errorObjectOf,
15
15
  renderError
16
- } from "./chunk-KAW5VEER.js";
16
+ } from "./chunk-H5HBZCEJ.js";
17
17
  import {
18
18
  CliError
19
- } from "./chunk-PMGAU6AP.js";
19
+ } from "./chunk-AP3CWDRK.js";
20
20
  import {
21
21
  __name
22
22
  } from "./chunk-ZVVMGPBJ.js";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/command-server.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/cli/command-server.js
25
25
  import { createInterface } from "node:readline";
26
26
 
27
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
28
28
  var COMMAND_SERVER_ARGV = ["commands", "--serve"];
29
29
  var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
30
30
 
31
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/cli/command-server.js
31
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/cli/command-server.js
32
32
  var COMMAND_SERVER_PROTOCOL = 1;
33
33
  var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
34
34
  var COMMAND_SERVER_CONCURRENT = 8;
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
8
8
  import { existsSync } from "node:fs";
9
9
  import { win32 } from "node:path";
10
10
  var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/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.",
@@ -5,15 +5,15 @@ import {
5
5
  } from "./chunk-Y5E2WNWB.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-PMGAU6AP.js";
8
+ } from "./chunk-AP3CWDRK.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/speech/recognize.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/speech/recognize.js
14
14
  import { createRequire } from "node:module";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
17
17
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
18
18
  var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
19
19
  const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
70
70
  throw invalid();
71
71
  }, "checkOggDuration");
72
72
 
73
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/speech/recognize.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/speech/recognize.js
74
74
  var SAMPLE_RATE = 16e3;
75
75
  var LEAD = SAMPLE_RATE / 2;
76
76
  var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
@@ -12,31 +12,31 @@ import {
12
12
  refuseWriteBeforeConnecting,
13
13
  registerPrompts,
14
14
  syncsFirst
15
- } from "./chunk-HBFSGL5E.js";
15
+ } from "./chunk-MSQGZHKM.js";
16
16
  import {
17
17
  skillResources
18
- } from "./chunk-NEP67GLY.js";
18
+ } from "./chunk-WE4JSHIG.js";
19
19
  import {
20
20
  StdioServerTransport,
21
21
  answeredWire,
22
22
  serveStdio
23
- } from "./chunk-OCISQFMW.js";
23
+ } from "./chunk-NQOQG7L3.js";
24
24
  import {
25
25
  stdinFieldOf
26
- } from "./chunk-MGMLSPIY.js";
26
+ } from "./chunk-TAPQZYXY.js";
27
27
  import {
28
28
  connectedFor
29
- } from "./chunk-KRTXJMCD.js";
29
+ } from "./chunk-3HS7JTPI.js";
30
30
  import {
31
31
  wholeList
32
- } from "./chunk-MENMD5Y5.js";
32
+ } from "./chunk-VR2CJFVL.js";
33
33
  import {
34
34
  runCommandForAgent,
35
35
  toolsFromCommands
36
- } from "./chunk-MPQ4SPZG.js";
36
+ } from "./chunk-5VTKBGPW.js";
37
37
  import {
38
38
  instructions
39
- } from "./chunk-MKBQFD37.js";
39
+ } from "./chunk-UCGZRZJA.js";
40
40
  import {
41
41
  BinaryResource,
42
42
  Picture,
@@ -55,35 +55,35 @@ import {
55
55
  tierOf,
56
56
  tool,
57
57
  toolKey
58
- } from "./chunk-LWS5AO3H.js";
58
+ } from "./chunk-J2SCELII.js";
59
59
  import {
60
60
  agentJson
61
- } from "./chunk-ODRF47VS.js";
61
+ } from "./chunk-ID4GJFE7.js";
62
62
  import {
63
63
  guardFor,
64
64
  imageSize,
65
65
  lackedNeed,
66
66
  servicesFor,
67
67
  storedDeps
68
- } from "./chunk-MPNMEWHA.js";
68
+ } from "./chunk-5O5WYSSO.js";
69
69
  import {
70
70
  callerOf,
71
71
  callingAgent
72
- } from "./chunk-QPTHEZZ5.js";
72
+ } from "./chunk-5NIIXJV3.js";
73
73
  import {
74
74
  capability,
75
75
  dateWindow
76
- } from "./chunk-EPBHJMF6.js";
76
+ } from "./chunk-BU5CEMUH.js";
77
77
  import {
78
78
  McpServer,
79
79
  ResourceTemplate
80
80
  } from "./chunk-PL5P7UKW.js";
81
81
  import {
82
82
  mcpHttpMarker
83
- } from "./chunk-SBNZYRVZ.js";
83
+ } from "./chunk-RLNPTES2.js";
84
84
  import {
85
85
  findCommand
86
- } from "./chunk-STTHRJBX.js";
86
+ } from "./chunk-2I2KBCS6.js";
87
87
  import {
88
88
  DEFAULT_OUTPUT_BYTES,
89
89
  changesAuthorityAt,
@@ -98,35 +98,35 @@ import {
98
98
  rootOf2 as rootOf,
99
99
  sealed,
100
100
  snakeKeys
101
- } from "./chunk-7RIE3DAW.js";
101
+ } from "./chunk-ZERQSELP.js";
102
102
  import {
103
103
  withCaller
104
- } from "./chunk-RJBKDZGV.js";
104
+ } from "./chunk-I75ON7VM.js";
105
105
  import {
106
106
  openStore,
107
107
  pdfPreviewLimits
108
- } from "./chunk-QLFD3MOL.js";
108
+ } from "./chunk-PDVMYIBP.js";
109
109
  import {
110
110
  typedCommand
111
- } from "./chunk-YJLJZMEA.js";
111
+ } from "./chunk-V7N2K5OT.js";
112
112
  import {
113
113
  isCliFailure
114
- } from "./chunk-DDMBPYHP.js";
114
+ } from "./chunk-HZIGGAC7.js";
115
115
  import {
116
116
  warmEmbedders
117
- } from "./chunk-K3WCBNH4.js";
117
+ } from "./chunk-JFLKTYH5.js";
118
118
  import {
119
119
  fetchesAt,
120
120
  levelFor,
121
121
  readKeysForCommand
122
- } from "./chunk-BW7NPFVC.js";
122
+ } from "./chunk-G6LDK6DJ.js";
123
123
  import {
124
124
  timezoneOf
125
- } from "./chunk-5ENY4POG.js";
125
+ } from "./chunk-UVGJL753.js";
126
126
  import {
127
127
  errorObjectOf,
128
128
  mcpErrorResult
129
- } from "./chunk-KAW5VEER.js";
129
+ } from "./chunk-H5HBZCEJ.js";
130
130
  import {
131
131
  description,
132
132
  integer,
@@ -145,15 +145,15 @@ import {
145
145
  import {
146
146
  CliError,
147
147
  visibleControls
148
- } from "./chunk-PMGAU6AP.js";
148
+ } from "./chunk-AP3CWDRK.js";
149
149
  import {
150
150
  __name
151
151
  } from "./chunk-ZVVMGPBJ.js";
152
152
 
153
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/server.js
153
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/server.js
154
154
  import { randomUUID } from "node:crypto";
155
155
 
156
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
156
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
157
157
  var agentLog = /* @__PURE__ */ __name((open) => {
158
158
  let held;
159
159
  return {
@@ -172,7 +172,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
172
172
  };
173
173
  }, "agentLog");
174
174
 
175
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/resources.js
175
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/resources.js
176
176
  var LISTED = 100;
177
177
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
178
178
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -210,7 +210,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
210
210
  });
211
211
  }, "registerResources");
212
212
 
213
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/session.js
213
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/session.js
214
214
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
215
215
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
216
216
  var MessengerSession = class {
@@ -285,7 +285,7 @@ var MessengerSession = class {
285
285
  }
286
286
  };
287
287
 
288
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
288
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
289
289
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
290
290
  const _command = messenger.app.command;
291
291
  return {
@@ -339,7 +339,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
339
339
  };
340
340
  }, "attachmentsTools");
341
341
 
342
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
342
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
343
343
  var PHOTO_LIMIT = 512 * 1024;
344
344
  var IMAGE_TYPES = [
345
345
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -395,7 +395,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
395
395
  return new Uint8Array(Buffer.concat(chunks));
396
396
  }, "readUpTo");
397
397
 
398
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
398
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
399
399
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
400
400
  stats_charts: tool({
401
401
  title: "A chart from a chat's statistics",
@@ -432,14 +432,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
432
432
  })
433
433
  }), "statsTools");
434
434
 
435
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/tools.js
435
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/tools.js
436
436
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
437
437
  ...messagesPhotoTools(messenger),
438
438
  ...attachmentsTools(messenger),
439
439
  ...statsTools(messenger)
440
440
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
441
441
 
442
- // node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mcp/server.js
442
+ // node_modules/.pnpm/@wirecat+cli-core@0.734.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_2c8b9986a0059051c16d1a97d78c2d87/node_modules/@wirecat/cli-core/dist/mcp/server.js
443
443
  var PER_RUN = /* @__PURE__ */ new Set([
444
444
  "streams",
445
445
  "stdin",
@@ -755,7 +755,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
755
755
  }, "serveOverStdio");
756
756
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
757
757
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
758
- const { serveOverHttp } = await import("./serve-D2WFCV6Z.js");
758
+ const { serveOverHttp } = await import("./serve-4KBJ6SIA.js");
759
759
  const appName = messenger.app.command;
760
760
  const appEnvPrefix = messenger.app.envPrefix;
761
761
  const listening = await serveOverHttp(build, {