@wirecat/attio-cli 0.0.0-stage → 0.2.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 (226) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +204 -0
  3. package/README.md +249 -2
  4. package/contracts/wirecat.json +2339 -0
  5. package/dist/bin/attio.d.ts +3 -0
  6. package/dist/bin/attio.d.ts.map +1 -0
  7. package/dist/bin/attio.js +40 -0
  8. package/dist/bin/attio.js.map +1 -0
  9. package/dist/bundle/agent-DYTWDBTT.js +37 -0
  10. package/dist/bundle/all-profiles-LZDKPHN2.js +320 -0
  11. package/dist/bundle/anthropic-BF72H77D.js +91 -0
  12. package/dist/bundle/app-server-H57FZJX5.js +249 -0
  13. package/dist/bundle/attio.js +183 -0
  14. package/dist/bundle/bun-WO77T4LG.js +169 -0
  15. package/dist/bundle/bun-sqlite-2BP7JDVO.js +76 -0
  16. package/dist/bundle/chunk-2E6JGBM5.js +1392 -0
  17. package/dist/bundle/chunk-34FJ26K2.js +54 -0
  18. package/dist/bundle/chunk-3I2FGNWO.js +23 -0
  19. package/dist/bundle/chunk-3NVOKVRY.js +42148 -0
  20. package/dist/bundle/chunk-3YFDZSM3.js +37 -0
  21. package/dist/bundle/chunk-4SMGM2Q6.js +274 -0
  22. package/dist/bundle/chunk-4STBJZR4.js +3571 -0
  23. package/dist/bundle/chunk-5K3FGXZH.js +46 -0
  24. package/dist/bundle/chunk-6ALPRBNV.js +100 -0
  25. package/dist/bundle/chunk-6NDJDDSQ.js +2000 -0
  26. package/dist/bundle/chunk-6SK3YB2B.js +218 -0
  27. package/dist/bundle/chunk-76RRELCU.js +65310 -0
  28. package/dist/bundle/chunk-7MXCUMHG.js +18 -0
  29. package/dist/bundle/chunk-7ZUOI3HY.js +73 -0
  30. package/dist/bundle/chunk-AMUONYQR.js +106 -0
  31. package/dist/bundle/chunk-ASCUOOLO.js +53 -0
  32. package/dist/bundle/chunk-BUGROVF3.js +72 -0
  33. package/dist/bundle/chunk-CHZ26CW5.js +9578 -0
  34. package/dist/bundle/chunk-CMO5ND3Y.js +794 -0
  35. package/dist/bundle/chunk-D72URWJE.js +532 -0
  36. package/dist/bundle/chunk-DF2IIO32.js +12645 -0
  37. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  38. package/dist/bundle/chunk-DQ6P3R4B.js +170 -0
  39. package/dist/bundle/chunk-DSRXCLPO.js +7 -0
  40. package/dist/bundle/chunk-EEPE3SOW.js +338 -0
  41. package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
  42. package/dist/bundle/chunk-EQGXEKSV.js +1197 -0
  43. package/dist/bundle/chunk-EQXT7KO4.js +388 -0
  44. package/dist/bundle/chunk-ERW2WOJT.js +24 -0
  45. package/dist/bundle/chunk-ESH2QGCA.js +372 -0
  46. package/dist/bundle/chunk-G3JTLVVL.js +771 -0
  47. package/dist/bundle/chunk-G6FQMVKW.js +52 -0
  48. package/dist/bundle/chunk-GBZ6JUXU.js +108 -0
  49. package/dist/bundle/chunk-GLHFJPYS.js +156 -0
  50. package/dist/bundle/chunk-GW4G5KLS.js +2333 -0
  51. package/dist/bundle/chunk-H7QDPW3D.js +78 -0
  52. package/dist/bundle/chunk-HG7FT3H3.js +319 -0
  53. package/dist/bundle/chunk-I3WS6V5H.js +188 -0
  54. package/dist/bundle/chunk-IDU4ESRZ.js +95 -0
  55. package/dist/bundle/chunk-IXCIQ7FZ.js +161 -0
  56. package/dist/bundle/chunk-J5P5VSRG.js +1233 -0
  57. package/dist/bundle/chunk-JA26HG7T.js +353 -0
  58. package/dist/bundle/chunk-JSTBW7F4.js +259 -0
  59. package/dist/bundle/chunk-KHDXRFJZ.js +185 -0
  60. package/dist/bundle/chunk-L5WS6CYZ.js +288 -0
  61. package/dist/bundle/chunk-LWJ4ZGUM.js +407 -0
  62. package/dist/bundle/chunk-MC2RQ2OB.js +38 -0
  63. package/dist/bundle/chunk-MNQACPXG.js +1332 -0
  64. package/dist/bundle/chunk-MOSH2KPD.js +358 -0
  65. package/dist/bundle/chunk-MRREDVPY.js +733 -0
  66. package/dist/bundle/chunk-MT2ZUZRA.js +1028 -0
  67. package/dist/bundle/chunk-O4A33Y54.js +29 -0
  68. package/dist/bundle/chunk-OBXDRUO4.js +63 -0
  69. package/dist/bundle/chunk-OFR3YYT6.js +6848 -0
  70. package/dist/bundle/chunk-P4U6AGWD.js +41 -0
  71. package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
  72. package/dist/bundle/chunk-PMP37KLR.js +142 -0
  73. package/dist/bundle/chunk-Q3JCUUOR.js +80 -0
  74. package/dist/bundle/chunk-Q7BSTQ3T.js +633 -0
  75. package/dist/bundle/chunk-QLHDUYGE.js +16 -0
  76. package/dist/bundle/chunk-RU5J7DWY.js +988 -0
  77. package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
  78. package/dist/bundle/chunk-S7K2XFQB.js +95 -0
  79. package/dist/bundle/chunk-SQHDE3TC.js +230 -0
  80. package/dist/bundle/chunk-TF7ZGCOK.js +76 -0
  81. package/dist/bundle/chunk-V6BTAILB.js +4072 -0
  82. package/dist/bundle/chunk-VDMIJ3JW.js +50 -0
  83. package/dist/bundle/chunk-VW5F6FK3.js +206 -0
  84. package/dist/bundle/chunk-W6F2CQZ6.js +1068 -0
  85. package/dist/bundle/chunk-WARIIYSW.js +58 -0
  86. package/dist/bundle/chunk-WK7GLHHL.js +334 -0
  87. package/dist/bundle/chunk-X5S5KUSU.js +2788 -0
  88. package/dist/bundle/chunk-X6R74TWX.js +131 -0
  89. package/dist/bundle/chunk-XQUUANA2.js +24600 -0
  90. package/dist/bundle/chunk-XXLQNHKF.js +82 -0
  91. package/dist/bundle/chunk-XXOTX4M3.js +362 -0
  92. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  93. package/dist/bundle/chunk-ZDBTYBFR.js +66 -0
  94. package/dist/bundle/chunk-ZGADZ4CH.js +557 -0
  95. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  96. package/dist/bundle/command-contract-7M6EPH3D.js +37 -0
  97. package/dist/bundle/command-server-entry-MNVPYQZ3.js +166 -0
  98. package/dist/bundle/decode-MQNKNXLK.js +297 -0
  99. package/dist/bundle/definitions-FODOIPM2.js +43379 -0
  100. package/dist/bundle/dispatch-TAQ7635E.js +411 -0
  101. package/dist/bundle/dist-EM7KLEG4.js +7577 -0
  102. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  103. package/dist/bundle/echarts-6ZSUNO4L.js +42501 -0
  104. package/dist/bundle/embed-PHCCJJ5Z.js +38 -0
  105. package/dist/bundle/embedder-WLZZQTKZ.js +111 -0
  106. package/dist/bundle/failure-MR2XVHFP.js +25 -0
  107. package/dist/bundle/first-run-64LREHSV.js +29 -0
  108. package/dist/bundle/first-screen-YSCAZIYJ.js +37 -0
  109. package/dist/bundle/instructions-22GCKNR5.js +11 -0
  110. package/dist/bundle/mcp-CNV7F2XZ.js +167 -0
  111. package/dist/bundle/meeting-combined-YX3T5WJD.js +24 -0
  112. package/dist/bundle/meeting-model-JWDTCGLZ.js +25 -0
  113. package/dist/bundle/meeting-semantic-375GYPZQ.js +22 -0
  114. package/dist/bundle/node-ITDTNRRZ.js +176 -0
  115. package/dist/bundle/node-KM3CUABH.js +2340 -0
  116. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  117. package/dist/bundle/node-sqlite-IRAGRMEZ.js +74 -0
  118. package/dist/bundle/oauth-CACOQJEL.js +20 -0
  119. package/dist/bundle/open-HU4KHKDR.js +23 -0
  120. package/dist/bundle/openai-JQUPAVKX.js +238 -0
  121. package/dist/bundle/process-QS5OHEUK.js +91 -0
  122. package/dist/bundle/program-QLCUCR76.js +33428 -0
  123. package/dist/bundle/prompt-VA5MKXJU.js +17 -0
  124. package/dist/bundle/recognize-JGA5IVKC.js +26 -0
  125. package/dist/bundle/remote-NPY2KZQ4.js +31 -0
  126. package/dist/bundle/rerank-4H2QR4XU.js +52 -0
  127. package/dist/bundle/schemas-THAI3G5S.js +21410 -0
  128. package/dist/bundle/serve-UH46SZQG.js +199 -0
  129. package/dist/bundle/server-6H7JS6SU.js +212 -0
  130. package/dist/bundle/server-SR52KBL3.js +79 -0
  131. package/dist/bundle/sqlite-runtime-EJWEUTBR.js +20 -0
  132. package/dist/bundle/state-34B6AUQZ.js +36 -0
  133. package/dist/bundle/store-3R4ILTCJ.js +177 -0
  134. package/dist/bundle/store-XSE35P3U.js +291 -0
  135. package/dist/bundle/store-maintenance-command-ABJARLI4.js +66 -0
  136. package/dist/bundle/surface-NOTIEJB5.js +65 -0
  137. package/dist/commands/api.d.ts +12 -0
  138. package/dist/commands/api.d.ts.map +1 -0
  139. package/dist/commands/api.js +27 -0
  140. package/dist/commands/api.js.map +1 -0
  141. package/dist/commands/crm.d.ts +4 -0
  142. package/dist/commands/crm.d.ts.map +1 -0
  143. package/dist/commands/crm.js +66 -0
  144. package/dist/commands/crm.js.map +1 -0
  145. package/dist/commands/session.d.ts +7 -0
  146. package/dist/commands/session.d.ts.map +1 -0
  147. package/dist/commands/session.js +22 -0
  148. package/dist/commands/session.js.map +1 -0
  149. package/dist/config.d.ts +14 -0
  150. package/dist/config.d.ts.map +1 -0
  151. package/dist/config.js +14 -0
  152. package/dist/config.js.map +1 -0
  153. package/dist/context.d.ts +37 -0
  154. package/dist/context.d.ts.map +1 -0
  155. package/dist/context.js +31 -0
  156. package/dist/context.js.map +1 -0
  157. package/dist/generated/definitions.d.ts +3 -0
  158. package/dist/generated/definitions.d.ts.map +1 -0
  159. package/dist/generated/definitions.js +43375 -0
  160. package/dist/generated/definitions.js.map +1 -0
  161. package/dist/generated/manifest.d.ts +6 -0
  162. package/dist/generated/manifest.d.ts.map +1 -0
  163. package/dist/generated/manifest.js +5158 -0
  164. package/dist/generated/manifest.js.map +1 -0
  165. package/dist/generated/schemas.d.ts +383 -0
  166. package/dist/generated/schemas.d.ts.map +1 -0
  167. package/dist/generated/schemas.js +21196 -0
  168. package/dist/generated/schemas.js.map +1 -0
  169. package/dist/generated/types.d.ts +10166 -0
  170. package/dist/generated/types.d.ts.map +1 -0
  171. package/dist/generated/types.js +5 -0
  172. package/dist/generated/types.js.map +1 -0
  173. package/dist/generated/wirecat-config.d.ts +15 -0
  174. package/dist/generated/wirecat-config.d.ts.map +1 -0
  175. package/dist/generated/wirecat-config.js +333 -0
  176. package/dist/generated/wirecat-config.js.map +1 -0
  177. package/dist/hooks.d.ts +3 -0
  178. package/dist/hooks.d.ts.map +1 -0
  179. package/dist/hooks.js +7 -0
  180. package/dist/hooks.js.map +1 -0
  181. package/dist/identity.d.ts +33 -0
  182. package/dist/identity.d.ts.map +1 -0
  183. package/dist/identity.js +31 -0
  184. package/dist/identity.js.map +1 -0
  185. package/dist/index.d.ts +3 -0
  186. package/dist/index.d.ts.map +1 -0
  187. package/dist/index.js +3 -0
  188. package/dist/index.js.map +1 -0
  189. package/dist/program.d.ts +6 -0
  190. package/dist/program.d.ts.map +1 -0
  191. package/dist/program.js +54 -0
  192. package/dist/program.js.map +1 -0
  193. package/dist/version.d.ts +2 -0
  194. package/dist/version.d.ts.map +1 -0
  195. package/dist/version.js +2 -0
  196. package/dist/version.js.map +1 -0
  197. package/dist/wcat.d.ts +3 -0
  198. package/dist/wcat.d.ts.map +1 -0
  199. package/dist/wcat.js +4 -0
  200. package/dist/wcat.js.map +1 -0
  201. package/package.json +87 -4
  202. package/skills/attio-cli/SKILL.md +58 -0
  203. package/skills/attio-cli/references/api/api-activities.md +62 -0
  204. package/skills/attio-cli/references/api/api-activity-records.md +96 -0
  205. package/skills/attio-cli/references/api/api-attributes.md +148 -0
  206. package/skills/attio-cli/references/api/api-call-recordings.md +53 -0
  207. package/skills/attio-cli/references/api/api-comments.md +36 -0
  208. package/skills/attio-cli/references/api/api-emails.md +23 -0
  209. package/skills/attio-cli/references/api/api-entries.md +127 -0
  210. package/skills/attio-cli/references/api/api-files.md +63 -0
  211. package/skills/attio-cli/references/api/api-lists.md +44 -0
  212. package/skills/attio-cli/references/api/api-meetings.md +82 -0
  213. package/skills/attio-cli/references/api/api-meta.md +8 -0
  214. package/skills/attio-cli/references/api/api-notes.md +64 -0
  215. package/skills/attio-cli/references/api/api-objects.md +55 -0
  216. package/skills/attio-cli/references/api/api-records.md +168 -0
  217. package/skills/attio-cli/references/api/api-sequences.md +15 -0
  218. package/skills/attio-cli/references/api/api-sql.md +15 -0
  219. package/skills/attio-cli/references/api/api-tasks.md +67 -0
  220. package/skills/attio-cli/references/api/api-threads.md +35 -0
  221. package/skills/attio-cli/references/api/api-transcripts.md +17 -0
  222. package/skills/attio-cli/references/api/api-views.md +133 -0
  223. package/skills/attio-cli/references/api/api-webhooks.md +62 -0
  224. package/skills/attio-cli/references/api/api-workspace-blocklist.md +39 -0
  225. package/skills/attio-cli/references/api/api-workspace-members.md +19 -0
  226. package/skills/attio-cli/references/api.md +35 -0
@@ -0,0 +1,38 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ WARM_IDLE_MS,
5
+ defaultThreads,
6
+ isTextModelInstalled,
7
+ loadModel,
8
+ meanOf,
9
+ openEmbedder,
10
+ placedText,
11
+ runEmbedders,
12
+ textModelsDirectory,
13
+ truncated,
14
+ unit,
15
+ warmEmbedders
16
+ } from "./chunk-MT2ZUZRA.js";
17
+ import "./chunk-4SMGM2Q6.js";
18
+ import "./chunk-34FJ26K2.js";
19
+ import "./chunk-X5S5KUSU.js";
20
+ import "./chunk-J5P5VSRG.js";
21
+ import "./chunk-S4UUN6LD.js";
22
+ import "./chunk-Y5E2WNWB.js";
23
+ import "./chunk-BUGROVF3.js";
24
+ import "./chunk-ZVVMGPBJ.js";
25
+ export {
26
+ WARM_IDLE_MS,
27
+ defaultThreads,
28
+ isTextModelInstalled,
29
+ loadModel,
30
+ meanOf,
31
+ openEmbedder,
32
+ placedText,
33
+ runEmbedders,
34
+ textModelsDirectory,
35
+ truncated,
36
+ unit,
37
+ warmEmbedders
38
+ };
@@ -0,0 +1,111 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ openSession,
5
+ truncated,
6
+ unit
7
+ } from "./chunk-MT2ZUZRA.js";
8
+ import "./chunk-4SMGM2Q6.js";
9
+ import "./chunk-34FJ26K2.js";
10
+ import "./chunk-X5S5KUSU.js";
11
+ import "./chunk-J5P5VSRG.js";
12
+ import "./chunk-S4UUN6LD.js";
13
+ import {
14
+ importFrom
15
+ } from "./chunk-Y5E2WNWB.js";
16
+ import {
17
+ CliError
18
+ } from "./chunk-BUGROVF3.js";
19
+ import {
20
+ __name
21
+ } from "./chunk-ZVVMGPBJ.js";
22
+
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
24
+ import { readFileSync } from "node:fs";
25
+ import { join } from "node:path";
26
+
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
28
+ var SIZE = 224;
29
+ var MEAN = [0.48145466, 0.4578275, 0.40821073];
30
+ var STD = [0.26862954, 0.26130258, 0.27577711];
31
+ var importCanvas = /* @__PURE__ */ __name(async () => {
32
+ try {
33
+ return await importFrom(new URL("images/picture/preprocess.js", import.meta.resolve("@wirecat/cli-core")).href, "@napi-rs/canvas");
34
+ } catch {
35
+ throw new CliError("validation_error", "searching pictures needs the optional package @napi-rs/canvas to read an image \u2014 install it next to this tool");
36
+ }
37
+ }, "importCanvas");
38
+ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
39
+ const { createCanvas, loadImage } = await load();
40
+ let image;
41
+ try {
42
+ image = await loadImage(bytes);
43
+ } catch {
44
+ throw new CliError("invalid_response", "the file is not an image this tool can read");
45
+ }
46
+ const scale = SIZE / Math.min(image.width, image.height);
47
+ const width = Math.max(SIZE, Math.round(image.width * scale));
48
+ const height = Math.max(SIZE, Math.round(image.height * scale));
49
+ const surface = createCanvas(SIZE, SIZE);
50
+ const context = surface.getContext("2d");
51
+ context.fillStyle = "#ffffff";
52
+ context.fillRect(0, 0, SIZE, SIZE);
53
+ context.imageSmoothingQuality = "high";
54
+ context.drawImage(image, 0, 0, image.width, image.height, Math.round((SIZE - width) / 2), Math.round((SIZE - height) / 2), width, height);
55
+ const { data } = context.getImageData(0, 0, SIZE, SIZE);
56
+ const plane = SIZE * SIZE;
57
+ const pixels = new Float32Array(3 * plane);
58
+ for (let at = 0; at < plane; at++) {
59
+ for (let channel = 0; channel < 3; channel++) {
60
+ pixels[channel * plane + at] = (data[at * 4 + channel] / 255 - MEAN[channel]) / STD[channel];
61
+ }
62
+ }
63
+ return pixels;
64
+ }, "preprocess");
65
+
66
+ // node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
67
+ var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
68
+ const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
69
+ const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
70
+ const tokenizer = new Tokenizer(JSON.parse(readFileSync(path("tokenizer.json"), "utf8")), JSON.parse(readFileSync(path("tokenizer_config.json"), "utf8")));
71
+ const sessions = [];
72
+ const lazy = /* @__PURE__ */ __name((name) => {
73
+ let opened;
74
+ return () => {
75
+ opened ??= openSession(readFileSync(path(name)), threads).then((created) => {
76
+ sessions.push(created.session);
77
+ return created;
78
+ });
79
+ return opened;
80
+ };
81
+ }, "lazy");
82
+ const vision = lazy(model.vision);
83
+ const text = lazy(model.text);
84
+ return {
85
+ model,
86
+ embedImage: /* @__PURE__ */ __name(async (bytes) => {
87
+ const pixels = await preprocess(bytes, canvas);
88
+ const { ort, session } = await vision();
89
+ const output = await session.run({ pixel_values: new ort.Tensor("float32", pixels, [1, 3, SIZE, SIZE]) });
90
+ return unit(Float32Array.from(output.image_embeds?.data));
91
+ }, "embedImage"),
92
+ embedQuery: /* @__PURE__ */ __name(async (query) => {
93
+ const ids = truncated(tokenizer.encode(query.toLowerCase()).ids, model.maxTokens);
94
+ const shape = [1, ids.length];
95
+ const { ort, session } = await text();
96
+ const feeds = {
97
+ input_ids: new ort.Tensor("int64", BigInt64Array.from(ids, BigInt), shape)
98
+ };
99
+ if (session.inputNames.includes("attention_mask"))
100
+ feeds.attention_mask = new ort.Tensor("int64", new BigInt64Array(ids.length).fill(1n), shape);
101
+ const output = await session.run(feeds);
102
+ return unit(Float32Array.from(output.text_embeds?.data));
103
+ }, "embedQuery"),
104
+ close: /* @__PURE__ */ __name(async () => {
105
+ await Promise.all(sessions.map((session) => session.release()));
106
+ }, "close")
107
+ };
108
+ }, "openPictureEmbedder");
109
+ export {
110
+ openPictureEmbedder
111
+ };
@@ -0,0 +1,25 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ catchCrashes,
5
+ errorObjectOf,
6
+ errorRecordOf,
7
+ exitCodeOfAnswer,
8
+ exitCodeOfError,
9
+ mcpErrorResult,
10
+ renderError,
11
+ retryOf
12
+ } from "./chunk-J5P5VSRG.js";
13
+ import "./chunk-S4UUN6LD.js";
14
+ import "./chunk-BUGROVF3.js";
15
+ import "./chunk-ZVVMGPBJ.js";
16
+ export {
17
+ catchCrashes,
18
+ errorObjectOf,
19
+ errorRecordOf,
20
+ exitCodeOfAnswer,
21
+ exitCodeOfError,
22
+ mcpErrorResult,
23
+ renderError,
24
+ retryOf
25
+ };
@@ -0,0 +1,29 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ askSetupQuestions,
5
+ asksAtStart,
6
+ setupAtStart,
7
+ systemLanguage
8
+ } from "./chunk-6SK3YB2B.js";
9
+ import "./chunk-PMP37KLR.js";
10
+ import "./chunk-5K3FGXZH.js";
11
+ import "./chunk-G6FQMVKW.js";
12
+ import "./chunk-GW4G5KLS.js";
13
+ import "./chunk-QLHDUYGE.js";
14
+ import "./chunk-EQGXEKSV.js";
15
+ import "./chunk-3I2FGNWO.js";
16
+ import "./chunk-D72URWJE.js";
17
+ import "./chunk-34FJ26K2.js";
18
+ import "./chunk-X5S5KUSU.js";
19
+ import "./chunk-J5P5VSRG.js";
20
+ import "./chunk-S4UUN6LD.js";
21
+ import "./chunk-Y5E2WNWB.js";
22
+ import "./chunk-BUGROVF3.js";
23
+ import "./chunk-ZVVMGPBJ.js";
24
+ export {
25
+ askSetupQuestions,
26
+ asksAtStart,
27
+ setupAtStart,
28
+ systemLanguage
29
+ };
@@ -0,0 +1,37 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ firstScreen,
5
+ installHelp
6
+ } from "./chunk-HG7FT3H3.js";
7
+ import "./chunk-EH6ZEJGT.js";
8
+ import {
9
+ WIRECAT_TOOLS
10
+ } from "./chunk-IDU4ESRZ.js";
11
+ import "./chunk-X6R74TWX.js";
12
+ import "./chunk-DF2IIO32.js";
13
+ import "./chunk-XXOTX4M3.js";
14
+ import "./chunk-G6FQMVKW.js";
15
+ import "./chunk-WK7GLHHL.js";
16
+ import "./chunk-OBXDRUO4.js";
17
+ import "./chunk-ZDBTYBFR.js";
18
+ import "./chunk-6NDJDDSQ.js";
19
+ import "./chunk-GLHFJPYS.js";
20
+ import "./chunk-O4A33Y54.js";
21
+ import "./chunk-V6BTAILB.js";
22
+ import "./chunk-DSRXCLPO.js";
23
+ import "./chunk-ESH2QGCA.js";
24
+ import "./chunk-EQGXEKSV.js";
25
+ import "./chunk-4SMGM2Q6.js";
26
+ import "./chunk-34FJ26K2.js";
27
+ import "./chunk-X5S5KUSU.js";
28
+ import "./chunk-J5P5VSRG.js";
29
+ import "./chunk-S4UUN6LD.js";
30
+ import "./chunk-Y5E2WNWB.js";
31
+ import "./chunk-BUGROVF3.js";
32
+ import "./chunk-ZVVMGPBJ.js";
33
+ export {
34
+ WIRECAT_TOOLS,
35
+ firstScreen,
36
+ installHelp
37
+ };
@@ -0,0 +1,11 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ appInstructions,
5
+ instructions
6
+ } from "./chunk-ASCUOOLO.js";
7
+ import "./chunk-ZVVMGPBJ.js";
8
+ export {
9
+ appInstructions,
10
+ instructions
11
+ };
@@ -0,0 +1,167 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ executableEnvironment,
5
+ executableOnPath
6
+ } from "./chunk-5K3FGXZH.js";
7
+ import {
8
+ require_cross_spawn
9
+ } from "./chunk-D72URWJE.js";
10
+ import {
11
+ __name,
12
+ __toESM
13
+ } from "./chunk-ZVVMGPBJ.js";
14
+
15
+ // node_modules/.pnpm/@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/mcp/index.js
16
+ var import_cross_spawn = __toESM(require_cross_spawn(), 1);
17
+ var realRun = /* @__PURE__ */ __name((file, args) => {
18
+ const result = import_cross_spawn.default.sync(executableOnPath(file, process.env), args, {
19
+ encoding: "utf8",
20
+ timeout: 1e4,
21
+ maxBuffer: 256e3,
22
+ env: executableEnvironment(process.env)
23
+ });
24
+ return { status: result.status, error: result.error, stdout: result.stdout ?? "", stderr: result.stderr ?? "" };
25
+ }, "realRun");
26
+ var executable = /* @__PURE__ */ __name((client) => client === "codex" ? "codex" : "claude", "executable");
27
+ var presentIn = /* @__PURE__ */ __name((client, name, run) => {
28
+ const state = lookUp(client, name, run);
29
+ if (state === "unavailable")
30
+ throw new Error(`${executable(client)} is not installed or could not be started`);
31
+ return state === "registered";
32
+ }, "presentIn");
33
+ var setupArguments = /* @__PURE__ */ __name((client, name, entry) => {
34
+ const variables = Object.entries(entry.env ?? {}).flatMap(([key, value]) => ["--env", `${key}=${value}`]);
35
+ if (client === "codex")
36
+ return ["mcp", "add", name, ...variables, "--", entry.command, ...entry.args];
37
+ return ["mcp", "add", "--scope", "user", name, ...variables, "--", entry.command, ...entry.args];
38
+ }, "setupArguments");
39
+ var checkName = /* @__PURE__ */ __name((name) => {
40
+ if (!/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(name))
41
+ throw new Error("the MCP name must be letters, digits, _ or -");
42
+ }, "checkName");
43
+ var lookUp = /* @__PURE__ */ __name((client, name, run) => {
44
+ const file = executable(client);
45
+ const existing = run(file, ["mcp", "get", name, ...client === "codex" ? ["--json"] : []]);
46
+ if (existing.error)
47
+ return "unavailable";
48
+ if (existing.status === 0)
49
+ return "registered";
50
+ if (!/No MCP server named/i.test(existing.stdout + existing.stderr)) {
51
+ throw new Error(`${file} could not check its MCP configuration`);
52
+ }
53
+ return "missing";
54
+ }, "lookUp");
55
+ var stdioEntryStatus = /* @__PURE__ */ __name((client, name, { run = realRun } = {}) => {
56
+ checkName(name);
57
+ return { client, name, state: lookUp(client, name, run) };
58
+ }, "stdioEntryStatus");
59
+ var removeArguments = /* @__PURE__ */ __name((client, name) => (
60
+ // Claude Code without a scope removes from whichever scope holds the name, which may be a project's own entry.
61
+ client === "codex" ? ["mcp", "remove", name] : ["mcp", "remove", "--scope", "user", name]
62
+ ), "removeArguments");
63
+ var removeStdioEntry = /* @__PURE__ */ __name((client, name, { run = realRun } = {}) => {
64
+ checkName(name);
65
+ if (!presentIn(client, name, run))
66
+ return { client, name, removed: false };
67
+ const file = executable(client);
68
+ const removed = run(file, removeArguments(client, name));
69
+ if (removed.status !== 0 || removed.error)
70
+ throw new Error(`${file} could not remove ${name}`);
71
+ return { client, name, removed: true };
72
+ }, "removeStdioEntry");
73
+ var installStdioEntry = /* @__PURE__ */ __name((client, name, entry, { run = realRun } = {}) => {
74
+ checkName(name);
75
+ if (!entry.command || entry.args.some((arg) => arg.includes("\0")))
76
+ throw new Error("invalid MCP command");
77
+ const file = executable(client);
78
+ if (presentIn(client, name, run))
79
+ throw new Error(`${name} is already configured in ${file}; remove it there first`);
80
+ const args = setupArguments(client, name, entry);
81
+ const added = run(file, args);
82
+ if (added.status !== 0 || added.error)
83
+ throw new Error(`${file} could not add ${name}`);
84
+ return { client, name, command: [entry.command, ...entry.args] };
85
+ }, "installStdioEntry");
86
+ var probeStdio = /* @__PURE__ */ __name(async (entry, { timeoutMs = 1e4, start = /* @__PURE__ */ __name((file, args, env) => (0, import_cross_spawn.default)(executableOnPath(file, env), args, {
87
+ env: executableEnvironment(env),
88
+ stdio: "pipe"
89
+ }), "start") } = {}) => {
90
+ const child = start(entry.command, entry.args, { ...process.env, ...entry.env });
91
+ let buffer = "";
92
+ let timer;
93
+ const pending = /* @__PURE__ */ new Map();
94
+ const request = /* @__PURE__ */ __name((id, method, params) => new Promise((resolve, reject) => {
95
+ pending.set(id, { resolve, reject });
96
+ child.stdin.write(`${JSON.stringify({ jsonrpc: "2.0", id, method, params })}
97
+ `);
98
+ }), "request");
99
+ const fail = /* @__PURE__ */ __name((error) => {
100
+ for (const waiter of pending.values())
101
+ waiter.reject(error);
102
+ pending.clear();
103
+ }, "fail");
104
+ child.on("error", () => fail(new Error("the MCP server could not be started")));
105
+ child.on("exit", () => fail(new Error("the MCP server exited before answering")));
106
+ child.stdin.on("error", () => fail(new Error("the MCP server closed its input")));
107
+ child.stdout.setEncoding("utf8");
108
+ child.stdout.on("data", (chunk) => {
109
+ buffer += chunk;
110
+ if (buffer.length > 1e6)
111
+ return fail(new Error("the MCP server sent too much output"));
112
+ for (let newline = buffer.indexOf("\n"); newline !== -1; newline = buffer.indexOf("\n")) {
113
+ const line = buffer.slice(0, newline);
114
+ buffer = buffer.slice(newline + 1);
115
+ try {
116
+ const value = JSON.parse(line);
117
+ if (typeof value.id !== "number")
118
+ continue;
119
+ const waiter = pending.get(value.id);
120
+ if (!waiter)
121
+ continue;
122
+ pending.delete(value.id);
123
+ if (value.error)
124
+ waiter.reject(new Error("the MCP server rejected the handshake"));
125
+ else
126
+ waiter.resolve(value.result ?? {});
127
+ } catch {
128
+ fail(new Error("the MCP server sent invalid JSON"));
129
+ }
130
+ }
131
+ });
132
+ try {
133
+ timer = setTimeout(() => fail(new Error("the MCP server did not answer in time")), timeoutMs);
134
+ await request(1, "initialize", {
135
+ protocolVersion: "2025-11-25",
136
+ capabilities: {},
137
+ clientInfo: { name: "cli-base-mcp-doctor", version: "1" }
138
+ });
139
+ child.stdin.write(`${JSON.stringify({ jsonrpc: "2.0", method: "notifications/initialized" })}
140
+ `);
141
+ const result = await request(2, "tools/list", {});
142
+ const tools = result.tools;
143
+ if (!Array.isArray(tools))
144
+ throw new Error("the MCP server returned no tool list");
145
+ const named = tools.filter((item) => item !== null && typeof item === "object" && "name" in item && typeof item.name === "string");
146
+ if (named.length !== tools.length)
147
+ throw new Error("the MCP server returned an invalid tool list");
148
+ return {
149
+ tools: named.map((item) => item.name),
150
+ potentialWrites: named.filter((item) => item.annotations?.readOnlyHint !== true).map((item) => item.name)
151
+ };
152
+ } finally {
153
+ if (timer)
154
+ clearTimeout(timer);
155
+ pending.clear();
156
+ child.stdin.end();
157
+ child.kill();
158
+ }
159
+ }, "probeStdio");
160
+ export {
161
+ installStdioEntry,
162
+ probeStdio,
163
+ removeArguments,
164
+ removeStdioEntry,
165
+ setupArguments,
166
+ stdioEntryStatus
167
+ };
@@ -0,0 +1,24 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ searchMeetingsCombined
5
+ } from "./chunk-MOSH2KPD.js";
6
+ import "./chunk-DQ6P3R4B.js";
7
+ import "./chunk-WK7GLHHL.js";
8
+ import "./chunk-G3JTLVVL.js";
9
+ import "./chunk-QLHDUYGE.js";
10
+ import "./chunk-O4A33Y54.js";
11
+ import "./chunk-V6BTAILB.js";
12
+ import "./chunk-DSRXCLPO.js";
13
+ import "./chunk-EQGXEKSV.js";
14
+ import "./chunk-4SMGM2Q6.js";
15
+ import "./chunk-34FJ26K2.js";
16
+ import "./chunk-X5S5KUSU.js";
17
+ import "./chunk-J5P5VSRG.js";
18
+ import "./chunk-S4UUN6LD.js";
19
+ import "./chunk-Y5E2WNWB.js";
20
+ import "./chunk-BUGROVF3.js";
21
+ import "./chunk-ZVVMGPBJ.js";
22
+ export {
23
+ searchMeetingsCombined
24
+ };
@@ -0,0 +1,25 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ createMeetingRemoteModel,
5
+ meetingEmbeddingModel,
6
+ openMeetingEmbedder
7
+ } from "./chunk-JSTBW7F4.js";
8
+ import "./chunk-WK7GLHHL.js";
9
+ import "./chunk-KHDXRFJZ.js";
10
+ import "./chunk-ESH2QGCA.js";
11
+ import "./chunk-EQGXEKSV.js";
12
+ import "./chunk-MT2ZUZRA.js";
13
+ import "./chunk-4SMGM2Q6.js";
14
+ import "./chunk-34FJ26K2.js";
15
+ import "./chunk-X5S5KUSU.js";
16
+ import "./chunk-J5P5VSRG.js";
17
+ import "./chunk-S4UUN6LD.js";
18
+ import "./chunk-Y5E2WNWB.js";
19
+ import "./chunk-BUGROVF3.js";
20
+ import "./chunk-ZVVMGPBJ.js";
21
+ export {
22
+ createMeetingRemoteModel,
23
+ meetingEmbeddingModel,
24
+ openMeetingEmbedder
25
+ };
@@ -0,0 +1,22 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ applyMeetingEmbedding,
5
+ proposeMeetingEmbedding,
6
+ readMeetingSemantic,
7
+ validateVector
8
+ } from "./chunk-DQ6P3R4B.js";
9
+ import "./chunk-V6BTAILB.js";
10
+ import "./chunk-DSRXCLPO.js";
11
+ import "./chunk-X5S5KUSU.js";
12
+ import "./chunk-J5P5VSRG.js";
13
+ import "./chunk-S4UUN6LD.js";
14
+ import "./chunk-Y5E2WNWB.js";
15
+ import "./chunk-BUGROVF3.js";
16
+ import "./chunk-ZVVMGPBJ.js";
17
+ export {
18
+ applyMeetingEmbedding,
19
+ proposeMeetingEmbedding,
20
+ readMeetingSemantic,
21
+ validateVector
22
+ };
@@ -0,0 +1,176 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ DefaultLogger,
5
+ DrizzleQueryError,
6
+ NoopLogger,
7
+ SQLiteAsyncDatabase,
8
+ SQLiteAsyncPreparedQuery,
9
+ SQLiteAsyncSession,
10
+ SQLiteAsyncTransaction,
11
+ SQLiteDialect,
12
+ booleanFromInteger,
13
+ bufferFromBytes,
14
+ castToText,
15
+ dateFromStoredMilliseconds,
16
+ dateFromStoredSeconds,
17
+ entityKind,
18
+ jitCompatCheck,
19
+ refineSqliteCodecs,
20
+ sql
21
+ } from "./chunk-OFR3YYT6.js";
22
+ import {
23
+ __name
24
+ } from "./chunk-ZVVMGPBJ.js";
25
+
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/node.js
27
+ import { DatabaseSync } from "node:sqlite";
28
+ var nodeSQLiteCodecs = refineSqliteCodecs({
29
+ "integer:boolean": { normalize: booleanFromInteger },
30
+ "integer:timestamp": { normalize: dateFromStoredSeconds },
31
+ "integer:timestamp_ms": { normalize: dateFromStoredMilliseconds },
32
+ "text:json": { normalize: JSON.parse },
33
+ blob: { normalize: bufferFromBytes },
34
+ "blob:json": {
35
+ cast: castToText,
36
+ normalize: JSON.parse
37
+ },
38
+ "blob:bigint": {
39
+ cast: castToText,
40
+ normalize: BigInt
41
+ },
42
+ numeric: {
43
+ cast: castToText,
44
+ normalize: String
45
+ },
46
+ "numeric:number": { normalize: Number },
47
+ "numeric:bigint": {
48
+ cast: castToText,
49
+ normalize: BigInt
50
+ }
51
+ });
52
+ var NodeSQLiteSession = class extends SQLiteAsyncSession {
53
+ static {
54
+ __name(this, "NodeSQLiteSession");
55
+ }
56
+ client;
57
+ relations;
58
+ options;
59
+ static [entityKind] = "SQLJsSession";
60
+ logger;
61
+ constructor(client, dialect, relations, options = {}) {
62
+ super(dialect, "sync");
63
+ this.client = client;
64
+ this.relations = relations;
65
+ this.options = options;
66
+ this.logger = options.logger ?? new NoopLogger();
67
+ }
68
+ prepareQuery(query, mode, _prepare, executeMethod, mapper, queryMetadata) {
69
+ let stmt;
70
+ try {
71
+ stmt = this.client.prepare(query.sql);
72
+ } catch (e) {
73
+ throw new DrizzleQueryError(query.sql, this.options.paramsInErrors ? query.params : void 0, e);
74
+ }
75
+ return new SQLiteAsyncPreparedQuery("sync", executeMethod, {
76
+ all: /* @__PURE__ */ __name((params) => {
77
+ stmt.setReturnArrays(mode === "arrays");
78
+ const res = stmt.all(...params);
79
+ if (mode === "objects") return res.map((row) => ({ ...row }));
80
+ return res;
81
+ }, "all"),
82
+ get: /* @__PURE__ */ __name((params) => {
83
+ stmt.setReturnArrays(mode === "arrays");
84
+ const res = stmt.get(...params);
85
+ if (res && mode === "objects") return { ...res };
86
+ return res;
87
+ }, "get"),
88
+ run: /* @__PURE__ */ __name((params) => {
89
+ stmt.setReturnArrays(false);
90
+ return stmt.run(...params);
91
+ }, "run")
92
+ }, query, mapper, mode, this.logger, void 0, queryMetadata, void 0, this.options.paramsInErrors);
93
+ }
94
+ transaction(transaction, config = {}) {
95
+ if (config?.behavior === "concurrent") throw new Error("Concurrent transactions are not supported by driver");
96
+ const tx = new NodeSQLiteTransaction("sync", this.dialect, this, this.relations);
97
+ this.run(sql.raw(`begin${config.behavior ? ` ${config.behavior}` : ""}`));
98
+ try {
99
+ const result = transaction(tx);
100
+ this.run(sql`commit`);
101
+ return result;
102
+ } catch (err) {
103
+ try {
104
+ this.run(sql`rollback`);
105
+ } catch {
106
+ }
107
+ throw err;
108
+ }
109
+ }
110
+ };
111
+ var NodeSQLiteTransaction = class NodeSQLiteTransaction2 extends SQLiteAsyncTransaction {
112
+ static {
113
+ __name(this, "NodeSQLiteTransaction2");
114
+ }
115
+ static [entityKind] = "SQLJsTransaction";
116
+ transaction(transaction) {
117
+ const savepointName = `sp${this.nestedIndex + 1}`;
118
+ const tx = new NodeSQLiteTransaction2("sync", this.dialect, this.session, this._.relations, this.nestedIndex + 1);
119
+ tx.run(sql.raw(`savepoint ${savepointName}`));
120
+ try {
121
+ const result = transaction(tx);
122
+ tx.run(sql.raw(`release savepoint ${savepointName}`));
123
+ return result;
124
+ } catch (err) {
125
+ try {
126
+ tx.run(sql.raw(`rollback to savepoint ${savepointName}`));
127
+ } catch {
128
+ }
129
+ throw err;
130
+ }
131
+ }
132
+ };
133
+ var NodeSQLiteDatabase = class extends SQLiteAsyncDatabase {
134
+ static {
135
+ __name(this, "NodeSQLiteDatabase");
136
+ }
137
+ static [entityKind] = "NodeSQLiteDatabase";
138
+ };
139
+ function construct(client, config = {}) {
140
+ const dialect = new SQLiteDialect({
141
+ codecs: config.codecs ?? nodeSQLiteCodecs,
142
+ useJitMappers: jitCompatCheck(config.jit)
143
+ });
144
+ let logger;
145
+ if (config.logger === true) logger = new DefaultLogger();
146
+ else if (config.logger !== false) logger = config.logger;
147
+ const relations = config.relations ?? {};
148
+ const db = new NodeSQLiteDatabase("sync", dialect, new NodeSQLiteSession(client, dialect, relations, {
149
+ logger,
150
+ paramsInErrors: config.paramsInErrors
151
+ }), relations);
152
+ db.$client = client;
153
+ return db;
154
+ }
155
+ __name(construct, "construct");
156
+ function drizzle(...params) {
157
+ if (params[0] === void 0 || typeof params[0] === "string") return construct(params[0] === void 0 ? new DatabaseSync(":memory:") : new DatabaseSync(params[0]), params[1]);
158
+ const { connection, client, ...config } = params[0];
159
+ if (client) return construct(client, config);
160
+ if (typeof connection === "object") {
161
+ const { path, ...options } = connection;
162
+ return construct(new DatabaseSync(path ?? ":memory:", options), config);
163
+ }
164
+ return construct(new DatabaseSync(connection ?? ":memory:"), config);
165
+ }
166
+ __name(drizzle, "drizzle");
167
+ (function(_drizzle) {
168
+ function mock(config) {
169
+ return construct({}, config);
170
+ }
171
+ __name(mock, "mock");
172
+ _drizzle.mock = mock;
173
+ })(drizzle || (drizzle = {}));
174
+ export {
175
+ drizzle
176
+ };