@wirecat/attio-cli 0.8.0 → 0.10.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 (207) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/contracts/wirecat.json +1 -0
  3. package/dist/bin/attio.js +11 -11
  4. package/dist/bundle/attio.js +5 -166
  5. package/dist/bundle/{chunk-UXJZISVL.js → chunk-OGWKDPR5.js} +2 -1
  6. package/dist/bundle/chunk-TQAECZFO.js +13 -0
  7. package/dist/bundle/{definitions-FODOIPM2.js → definitions-J73IBAHT.js} +1 -1
  8. package/dist/bundle/program-NSBWZ25F.js +6201 -0
  9. package/dist/bundle/{schemas-YGSTNU6F.js → schemas-G3HFAS45.js} +576 -29
  10. package/dist/commands/api.js +1 -2
  11. package/dist/commands/crm.js +1 -4
  12. package/dist/commands/schedule.js +1 -1
  13. package/dist/commands/session.js +1 -2
  14. package/dist/config.js +1 -2
  15. package/dist/context.js +1 -1
  16. package/dist/identity.js +1 -0
  17. package/dist/program.js +1 -2
  18. package/dist/version.js +1 -1
  19. package/package.json +4 -4
  20. package/dist/activities.d.ts +0 -4
  21. package/dist/activities.d.ts.map +0 -1
  22. package/dist/activities.js.map +0 -1
  23. package/dist/bin/attio.d.ts +0 -3
  24. package/dist/bin/attio.d.ts.map +0 -1
  25. package/dist/bin/attio.js.map +0 -1
  26. package/dist/bundle/agent-GUXXSLT5.js +0 -38
  27. package/dist/bundle/all-profiles-63N3EQ46.js +0 -320
  28. package/dist/bundle/anthropic-B4W7MZQE.js +0 -91
  29. package/dist/bundle/app-server-EXNGTHWO.js +0 -250
  30. package/dist/bundle/bun-OPDGMZZQ.js +0 -169
  31. package/dist/bundle/bun-sqlite-NBAY7FR2.js +0 -76
  32. package/dist/bundle/chunk-2JHVQMVC.js +0 -16
  33. package/dist/bundle/chunk-2QDUP74I.js +0 -794
  34. package/dist/bundle/chunk-2XBDILVW.js +0 -53
  35. package/dist/bundle/chunk-3HC5F3P7.js +0 -24
  36. package/dist/bundle/chunk-3MSHGNVE.js +0 -1243
  37. package/dist/bundle/chunk-3YM4B2GT.js +0 -63
  38. package/dist/bundle/chunk-4N7PP76S.js +0 -6848
  39. package/dist/bundle/chunk-4RBMCXZT.js +0 -1337
  40. package/dist/bundle/chunk-4RSWOPKL.js +0 -323
  41. package/dist/bundle/chunk-5JKTVAXX.js +0 -2788
  42. package/dist/bundle/chunk-5N2V6XO7.js +0 -119
  43. package/dist/bundle/chunk-5WD22IXQ.js +0 -66
  44. package/dist/bundle/chunk-6K4Z6CAM.js +0 -43997
  45. package/dist/bundle/chunk-6TD3DCWC.js +0 -106
  46. package/dist/bundle/chunk-7Z53MLQP.js +0 -388
  47. package/dist/bundle/chunk-AATTOFNY.js +0 -2045
  48. package/dist/bundle/chunk-APARYILG.js +0 -743
  49. package/dist/bundle/chunk-D72URWJE.js +0 -532
  50. package/dist/bundle/chunk-DFDN6AUB.js +0 -21
  51. package/dist/bundle/chunk-DM7KWVDZ.js +0 -3752
  52. package/dist/bundle/chunk-DNCLQPOM.js +0 -7
  53. package/dist/bundle/chunk-DPD4FMHN.js +0 -388
  54. package/dist/bundle/chunk-DPV53EZC.js +0 -206
  55. package/dist/bundle/chunk-DURNR4RO.js +0 -353
  56. package/dist/bundle/chunk-EH6ZEJGT.js +0 -932
  57. package/dist/bundle/chunk-EVUMQKV7.js +0 -76
  58. package/dist/bundle/chunk-EY36BTKZ.js +0 -108
  59. package/dist/bundle/chunk-FH6OEGGN.js +0 -557
  60. package/dist/bundle/chunk-FOP6G45D.js +0 -358
  61. package/dist/bundle/chunk-GGMAIIVE.js +0 -38
  62. package/dist/bundle/chunk-GTEX4IUO.js +0 -334
  63. package/dist/bundle/chunk-HZ3C4WXD.js +0 -142
  64. package/dist/bundle/chunk-IA7LLLEI.js +0 -100
  65. package/dist/bundle/chunk-J6GVVISK.js +0 -185
  66. package/dist/bundle/chunk-JG6LCSEX.js +0 -407
  67. package/dist/bundle/chunk-JIGEJZ4I.js +0 -68943
  68. package/dist/bundle/chunk-KVTNYRDO.js +0 -1007
  69. package/dist/bundle/chunk-L45WN3AR.js +0 -80
  70. package/dist/bundle/chunk-L72WUJAS.js +0 -54
  71. package/dist/bundle/chunk-LKH3UKLO.js +0 -230
  72. package/dist/bundle/chunk-LM3W7YOM.js +0 -274
  73. package/dist/bundle/chunk-M4AC55ZB.js +0 -12733
  74. package/dist/bundle/chunk-MCLQTCGH.js +0 -1202
  75. package/dist/bundle/chunk-NB7EOAUZ.js +0 -123
  76. package/dist/bundle/chunk-NISH4UXM.js +0 -58
  77. package/dist/bundle/chunk-OYEVYOCL.js +0 -259
  78. package/dist/bundle/chunk-P7G5HFY3.js +0 -288
  79. package/dist/bundle/chunk-PAEKXVJW.js +0 -188
  80. package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
  81. package/dist/bundle/chunk-PLPBEWD4.js +0 -170
  82. package/dist/bundle/chunk-PMQ7GP6X.js +0 -95
  83. package/dist/bundle/chunk-Q7ICVP25.js +0 -18
  84. package/dist/bundle/chunk-QPPOIWPY.js +0 -1246
  85. package/dist/bundle/chunk-QSJKSPWF.js +0 -131
  86. package/dist/bundle/chunk-RDVTHFPP.js +0 -338
  87. package/dist/bundle/chunk-RQORQN2V.js +0 -4072
  88. package/dist/bundle/chunk-RRTMPSQR.js +0 -29
  89. package/dist/bundle/chunk-S4UUN6LD.js +0 -1410
  90. package/dist/bundle/chunk-S6JG4YUH.js +0 -72
  91. package/dist/bundle/chunk-SCI7QEHF.js +0 -362
  92. package/dist/bundle/chunk-SSA6JBPA.js +0 -778
  93. package/dist/bundle/chunk-T4J7XFXT.js +0 -9667
  94. package/dist/bundle/chunk-TTF5DP4V.js +0 -1197
  95. package/dist/bundle/chunk-TXDR6YSF.js +0 -23
  96. package/dist/bundle/chunk-TY7NDMFY.js +0 -46
  97. package/dist/bundle/chunk-UDSL3MUU.js +0 -2333
  98. package/dist/bundle/chunk-UKHF37ZU.js +0 -1068
  99. package/dist/bundle/chunk-V57E7PJQ.js +0 -161
  100. package/dist/bundle/chunk-V7IF2K3P.js +0 -52
  101. package/dist/bundle/chunk-VB7FZOYX.js +0 -633
  102. package/dist/bundle/chunk-VZ5PPYDG.js +0 -77
  103. package/dist/bundle/chunk-WOPVBRPV.js +0 -29
  104. package/dist/bundle/chunk-WXQGA6XK.js +0 -50
  105. package/dist/bundle/chunk-XQGN2D44.js +0 -86
  106. package/dist/bundle/chunk-XQUUANA2.js +0 -24600
  107. package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
  108. package/dist/bundle/chunk-YNGU36GW.js +0 -218
  109. package/dist/bundle/chunk-YWDFYQOU.js +0 -82
  110. package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
  111. package/dist/bundle/chunk-ZZD2YPOX.js +0 -156
  112. package/dist/bundle/command-contract-KCCW4LNI.js +0 -37
  113. package/dist/bundle/command-server-entry-3NPPABQQ.js +0 -166
  114. package/dist/bundle/decode-26M7XE2B.js +0 -297
  115. package/dist/bundle/dispatch-2FTOHA5D.js +0 -411
  116. package/dist/bundle/dist-EM7KLEG4.js +0 -7577
  117. package/dist/bundle/dist-PAKDDIBT.js +0 -191
  118. package/dist/bundle/echarts-O3TNDAXJ.js +0 -42501
  119. package/dist/bundle/embed-XJLEAWXE.js +0 -38
  120. package/dist/bundle/embedder-OEL6PXEH.js +0 -111
  121. package/dist/bundle/failure-OHIXWTR6.js +0 -25
  122. package/dist/bundle/first-run-CIXGBXY6.js +0 -29
  123. package/dist/bundle/first-screen-5FK4D45F.js +0 -38
  124. package/dist/bundle/instructions-AMH5RWVJ.js +0 -11
  125. package/dist/bundle/mcp-5HFPWC3W.js +0 -167
  126. package/dist/bundle/meeting-combined-DMVGQNJ7.js +0 -24
  127. package/dist/bundle/meeting-model-2THAT7OH.js +0 -25
  128. package/dist/bundle/meeting-semantic-Q6XYFYUD.js +0 -22
  129. package/dist/bundle/node-EGMCBAO7.js +0 -176
  130. package/dist/bundle/node-KM3CUABH.js +0 -2340
  131. package/dist/bundle/node-TLZSIHIJ.js +0 -21
  132. package/dist/bundle/node-sqlite-2SWWGW6H.js +0 -74
  133. package/dist/bundle/oauth-V5LGTXF2.js +0 -20
  134. package/dist/bundle/open-25EKOTZA.js +0 -23
  135. package/dist/bundle/openai-VX3OLIHM.js +0 -238
  136. package/dist/bundle/process-SGHEN6MQ.js +0 -91
  137. package/dist/bundle/program-Z5NUNXME.js +0 -34214
  138. package/dist/bundle/prompt-2VSPX5S7.js +0 -17
  139. package/dist/bundle/recognize-NA5XUFKK.js +0 -26
  140. package/dist/bundle/remote-BOME6XOE.js +0 -31
  141. package/dist/bundle/rerank-NG3XMFCV.js +0 -52
  142. package/dist/bundle/serve-MR67OBED.js +0 -199
  143. package/dist/bundle/server-4BWAGJQO.js +0 -80
  144. package/dist/bundle/server-OP2HJNXD.js +0 -213
  145. package/dist/bundle/sqlite-runtime-V5U6F5EB.js +0 -20
  146. package/dist/bundle/state-L4MWAATO.js +0 -36
  147. package/dist/bundle/store-2ALTEH55.js +0 -181
  148. package/dist/bundle/store-CXZFRG5D.js +0 -297
  149. package/dist/bundle/store-maintenance-command-LC55DRQA.js +0 -67
  150. package/dist/bundle/surface-3GRJ7473.js +0 -66
  151. package/dist/commands/api.d.ts +0 -12
  152. package/dist/commands/api.d.ts.map +0 -1
  153. package/dist/commands/api.js.map +0 -1
  154. package/dist/commands/crm.d.ts +0 -7
  155. package/dist/commands/crm.d.ts.map +0 -1
  156. package/dist/commands/crm.js.map +0 -1
  157. package/dist/commands/schedule.d.ts +0 -3
  158. package/dist/commands/schedule.d.ts.map +0 -1
  159. package/dist/commands/schedule.js.map +0 -1
  160. package/dist/commands/session.d.ts +0 -8
  161. package/dist/commands/session.d.ts.map +0 -1
  162. package/dist/commands/session.js.map +0 -1
  163. package/dist/config.d.ts +0 -13
  164. package/dist/config.d.ts.map +0 -1
  165. package/dist/config.js.map +0 -1
  166. package/dist/context.d.ts +0 -37
  167. package/dist/context.d.ts.map +0 -1
  168. package/dist/context.js.map +0 -1
  169. package/dist/generated/definitions.d.ts +0 -3
  170. package/dist/generated/definitions.d.ts.map +0 -1
  171. package/dist/generated/definitions.js.map +0 -1
  172. package/dist/generated/manifest.d.ts +0 -6
  173. package/dist/generated/manifest.d.ts.map +0 -1
  174. package/dist/generated/manifest.js.map +0 -1
  175. package/dist/generated/schemas.d.ts +0 -383
  176. package/dist/generated/schemas.d.ts.map +0 -1
  177. package/dist/generated/schemas.js.map +0 -1
  178. package/dist/generated/types.d.ts +0 -10166
  179. package/dist/generated/types.d.ts.map +0 -1
  180. package/dist/generated/types.js.map +0 -1
  181. package/dist/generated/wirecat-config.d.ts +0 -15
  182. package/dist/generated/wirecat-config.d.ts.map +0 -1
  183. package/dist/generated/wirecat-config.js.map +0 -1
  184. package/dist/hooks.d.ts +0 -33
  185. package/dist/hooks.d.ts.map +0 -1
  186. package/dist/hooks.js.map +0 -1
  187. package/dist/identity.d.ts +0 -33
  188. package/dist/identity.d.ts.map +0 -1
  189. package/dist/identity.js.map +0 -1
  190. package/dist/index.d.ts +0 -3
  191. package/dist/index.d.ts.map +0 -1
  192. package/dist/index.js.map +0 -1
  193. package/dist/links.d.ts +0 -10
  194. package/dist/links.d.ts.map +0 -1
  195. package/dist/links.js.map +0 -1
  196. package/dist/meetings.d.ts +0 -57
  197. package/dist/meetings.d.ts.map +0 -1
  198. package/dist/meetings.js.map +0 -1
  199. package/dist/program.d.ts +0 -6
  200. package/dist/program.d.ts.map +0 -1
  201. package/dist/program.js.map +0 -1
  202. package/dist/version.d.ts +0 -2
  203. package/dist/version.d.ts.map +0 -1
  204. package/dist/version.js.map +0 -1
  205. package/dist/wcat.d.ts +0 -3
  206. package/dist/wcat.d.ts.map +0 -1
  207. package/dist/wcat.js.map +0 -1
@@ -1,250 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- PER_RUN,
5
- envelope
6
- } from "./chunk-2QDUP74I.js";
7
- import {
8
- mcpUrlOf
9
- } from "./chunk-4RBMCXZT.js";
10
- import {
11
- skillResources
12
- } from "./chunk-DPD4FMHN.js";
13
- import {
14
- StdioServerTransport,
15
- answeredWire,
16
- serveStdio
17
- } from "./chunk-VB7FZOYX.js";
18
- import "./chunk-Q7ICVP25.js";
19
- import "./chunk-3MSHGNVE.js";
20
- import "./chunk-DURNR4RO.js";
21
- import {
22
- runCommandForAgent,
23
- toolsFromCommands
24
- } from "./chunk-DM7KWVDZ.js";
25
- import "./chunk-WXQGA6XK.js";
26
- import "./chunk-RDVTHFPP.js";
27
- import {
28
- appInstructions
29
- } from "./chunk-2XBDILVW.js";
30
- import {
31
- answered,
32
- failed,
33
- registerCommands
34
- } from "./chunk-FH6OEGGN.js";
35
- import {
36
- agentJson
37
- } from "./chunk-MCLQTCGH.js";
38
- import "./chunk-6K4Z6CAM.js";
39
- import "./chunk-JG6LCSEX.js";
40
- import "./chunk-5N2V6XO7.js";
41
- import "./chunk-NB7EOAUZ.js";
42
- import "./chunk-HZ3C4WXD.js";
43
- import "./chunk-TY7NDMFY.js";
44
- import "./chunk-EY36BTKZ.js";
45
- import "./chunk-APARYILG.js";
46
- import "./chunk-WOPVBRPV.js";
47
- import {
48
- McpServer
49
- } from "./chunk-PL5P7UKW.js";
50
- import "./chunk-EVUMQKV7.js";
51
- import "./chunk-OYEVYOCL.js";
52
- import "./chunk-FOP6G45D.js";
53
- import "./chunk-PLPBEWD4.js";
54
- import {
55
- mcpHttpMarker
56
- } from "./chunk-V57E7PJQ.js";
57
- import "./chunk-XQGN2D44.js";
58
- import "./chunk-QSJKSPWF.js";
59
- import {
60
- DEFAULT_OUTPUT_BYTES,
61
- changesAuthorityAt,
62
- describeProgram,
63
- environmentOf,
64
- fetchesOnlyAt,
65
- judgedTargets,
66
- readOnlyLockOf,
67
- readsOverMcpAt,
68
- rootOf2 as rootOf
69
- } from "./chunk-M4AC55ZB.js";
70
- import "./chunk-SCI7QEHF.js";
71
- import "./chunk-V7IF2K3P.js";
72
- import "./chunk-GTEX4IUO.js";
73
- import "./chunk-3YM4B2GT.js";
74
- import "./chunk-YWDFYQOU.js";
75
- import "./chunk-UKHF37ZU.js";
76
- import "./chunk-5WD22IXQ.js";
77
- import "./chunk-JIGEJZ4I.js";
78
- import "./chunk-UDSL3MUU.js";
79
- import "./chunk-L45WN3AR.js";
80
- import "./chunk-SSA6JBPA.js";
81
- import "./chunk-2JHVQMVC.js";
82
- import "./chunk-AATTOFNY.js";
83
- import "./chunk-ZZD2YPOX.js";
84
- import "./chunk-RRTMPSQR.js";
85
- import "./chunk-RQORQN2V.js";
86
- import "./chunk-DNCLQPOM.js";
87
- import "./chunk-J6GVVISK.js";
88
- import "./chunk-7Z53MLQP.js";
89
- import "./chunk-TTF5DP4V.js";
90
- import "./chunk-KVTNYRDO.js";
91
- import "./chunk-LM3W7YOM.js";
92
- import "./chunk-TXDR6YSF.js";
93
- import "./chunk-D72URWJE.js";
94
- import "./chunk-L72WUJAS.js";
95
- import "./chunk-PMQ7GP6X.js";
96
- import "./chunk-GGMAIIVE.js";
97
- import "./chunk-5JKTVAXX.js";
98
- import {
99
- mcpErrorResult
100
- } from "./chunk-QPPOIWPY.js";
101
- import "./chunk-S4UUN6LD.js";
102
- import "./chunk-Y5E2WNWB.js";
103
- import {
104
- CliError
105
- } from "./chunk-S6JG4YUH.js";
106
- import "./chunk-4N7PP76S.js";
107
- import {
108
- __name
109
- } from "./chunk-ZVVMGPBJ.js";
110
-
111
- // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
112
- var EXCLUDED = [["mcp"]];
113
- var aliasesOf = /* @__PURE__ */ __name((root, path) => {
114
- let at = root;
115
- for (const name of path)
116
- at = at?.commands.find((child) => child.name() === name);
117
- const aliases = at?.aliases() ?? [];
118
- return aliases.length > 0 ? { aliases } : {};
119
- }, "aliasesOf");
120
- var createAppServer = /* @__PURE__ */ __name((command, context, options) => {
121
- const { app } = options;
122
- const root = rootOf(command);
123
- const environment = environmentOf(command);
124
- if (!environment.runCommand)
125
- throw new Error("the MCP server runs inside run(), which hands it the program");
126
- const program = { run: environment.runCommand, commands: describeProgram(root) };
127
- const flags = command.optsWithGlobals();
128
- const overrides = flags.permission ?? [];
129
- const { settings } = context;
130
- const levels = /* @__PURE__ */ __name(() => options.resolveSettings(flags, { env: context.env }).permissions, "levels");
131
- const readOnly = /* @__PURE__ */ __name(() => readOnlyLockOf(app, context.env) !== void 0, "readOnly");
132
- const authority = changesAuthorityAt(root);
133
- const fetches = fetchesOnlyAt(root);
134
- const targets = judgedTargets(root);
135
- const passed = Object.fromEntries(Object.entries(environment).filter(([key]) => !PER_RUN.has(key)));
136
- const tools = toolsFromCommands(program.commands, {
137
- includeUnavailable: true,
138
- exclude: EXCLUDED,
139
- levels: settings.permissions,
140
- currentLevels: levels,
141
- readOnly: readOnly(),
142
- authority,
143
- fetchOnly: readsOverMcpAt(root),
144
- fetches,
145
- permissions: options.permissions
146
- });
147
- const availability = /* @__PURE__ */ __name((one) => () => {
148
- const permitted = one.availability?.() ?? { available: true };
149
- if (!permitted.available)
150
- return permitted;
151
- return options.availability?.(one.path, settings.profile) ?? permitted;
152
- }, "availability");
153
- const commands = Object.fromEntries(tools.map((one) => [
154
- one.command,
155
- {
156
- title: one.title,
157
- description: one.description,
158
- ...one.keywords ? { keywords: one.keywords } : {},
159
- ...aliasesOf(root, one.path),
160
- writes: one.writes,
161
- availability: availability(one),
162
- input: one.input,
163
- run: /* @__PURE__ */ __name(async (input, ctx) => {
164
- const own = options.availability?.(one.path, settings.profile);
165
- if (own && !own.available)
166
- return failed(new CliError("permission_error", `${one.command}: ${own.reason ?? "unavailable for this profile"}`, {
167
- ...own.permission ? { permission: own.permission } : {}
168
- }), app.errors);
169
- const traceparent = ctx?.mcpReq?._meta?.traceparent;
170
- const env = typeof traceparent === "string" ? { ...context.env, TRACEPARENT: traceparent } : context.env;
171
- const answer = await runCommandForAgent(program, one.path, input, {
172
- profile: settings.profile,
173
- readOnly: readOnly(),
174
- env,
175
- levels,
176
- overrides,
177
- authority,
178
- fetches,
179
- permissions: options.permissions,
180
- environment: passed
181
- });
182
- if ("error" in answer)
183
- return mcpErrorResult(JSON.parse(agentJson(answer.error)));
184
- try {
185
- return answered(envelope(one.command, answer.result), DEFAULT_OUTPUT_BYTES, targets);
186
- } catch (error) {
187
- return failed(error, app.errors);
188
- }
189
- }, "run")
190
- }
191
- ]));
192
- const skills = options.skill ? skillResources(app, options.skill) : [];
193
- const skill = skills[0];
194
- const build = /* @__PURE__ */ __name(() => {
195
- const server = new McpServer({ name: app.command, version: app.version }, {
196
- instructions: appInstructions({
197
- command: app.command,
198
- name: options.name,
199
- profile: settings.profile,
200
- untrusted: options.untrusted,
201
- ...skill ? { skill: skill.instruction } : {}
202
- })
203
- });
204
- registerCommands(server, app.command, commands, app.errors, void 0, app.messenger);
205
- for (const { uri, name, title, description, mimeType, read } of skills)
206
- server.registerResource(name, uri, { title, description, mimeType }, read);
207
- return server;
208
- }, "build");
209
- return { build, offered: Object.keys(commands) };
210
- }, "createAppServer");
211
- var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options) => {
212
- const { build } = createAppServer(command, context, options);
213
- const { stdin, stdout, signal } = environmentOf(command);
214
- const own = stdin && stdout && stdin !== process.stdin;
215
- const wire = answeredWire(own ? stdin : process.stdin, own ? stdout : process.stdout);
216
- const handle = serveStdio(build, {
217
- transport: new StdioServerTransport(wire.input, wire.output),
218
- onerror: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onerror")
219
- });
220
- await wire.finished(own ? signal : void 0);
221
- wire.release();
222
- await handle.close();
223
- }, "serveAppOverStdio");
224
- var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
225
- const { app } = options;
226
- const { build } = createAppServer(command, context, options);
227
- const { serveOverHttp } = await import("./serve-MR67OBED.js");
228
- const listening = await serveOverHttp(build, {
229
- ...http,
230
- appName: app.command,
231
- reaches: `your ${options.name}`,
232
- onCode: /* @__PURE__ */ __name((code, expires) => context.renderer.note(context.env[mcpHttpMarker(app.envPrefix)] === void 0 ? `login code for a new browser app: ${code} (until ${expires.toTimeString().slice(0, 5)}; a new one after each login)` : `a new login code for a browser app: \`${app.command} ${context.settings.profile} mcp server status\``), "onCode"),
233
- onError: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onError")
234
- }).catch((error) => {
235
- if (error.code === "EADDRINUSE")
236
- throw new CliError("configuration_error", `port ${http.port} is in use \u2014 pass another with --port`);
237
- throw error;
238
- });
239
- context.renderer.note(`serving on ${listening.url.href} \u2014 point your tunnel at it; connectors use ${mcpUrlOf(http.publicUrl).href}`);
240
- await new Promise((resolve) => {
241
- process.once("SIGINT", resolve);
242
- process.once("SIGTERM", resolve);
243
- });
244
- await listening.close();
245
- }, "serveAppOverHttp");
246
- export {
247
- createAppServer,
248
- serveAppOverHttp,
249
- serveAppOverStdio
250
- };
@@ -1,169 +0,0 @@
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-4N7PP76S.js";
22
- import {
23
- __name
24
- } from "./chunk-ZVVMGPBJ.js";
25
-
26
- // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
27
- import { Database } from "bun:sqlite";
28
- var bunSQLiteCodecs = 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 SQLiteBunSession = class extends SQLiteAsyncSession {
53
- static {
54
- __name(this, "SQLiteBunSession");
55
- }
56
- client;
57
- relations;
58
- options;
59
- static [entityKind] = "SQLiteBunSession";
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
- exec(query) {
69
- this.client.exec(query);
70
- }
71
- prepareQuery(query, mode, _prepare, executeMethod, mapper, queryMetadata) {
72
- let stmt;
73
- try {
74
- stmt = this.client.query(query.sql);
75
- } catch (e) {
76
- throw new DrizzleQueryError(query.sql, this.options.paramsInErrors ? query.params : void 0, e);
77
- }
78
- return new SQLiteAsyncPreparedQuery("sync", executeMethod, {
79
- all: /* @__PURE__ */ __name((params) => {
80
- if (mode === "arrays") return stmt.values(...params);
81
- return stmt.all(...params);
82
- }, "all"),
83
- get: /* @__PURE__ */ __name((params) => {
84
- if (mode === "arrays") return stmt.values(...params)[0];
85
- return stmt.get(...params);
86
- }, "get"),
87
- run: /* @__PURE__ */ __name((params) => {
88
- return stmt.run(...params);
89
- }, "run")
90
- }, query, mapper, mode, this.logger, void 0, queryMetadata, void 0, this.options.paramsInErrors);
91
- }
92
- transaction(transaction, config = {}) {
93
- const tx = new SQLiteBunTransaction("sync", this.dialect, this, this.relations);
94
- let result;
95
- const nativeTx = this.client.transaction(() => {
96
- result = transaction(tx);
97
- });
98
- if (config.behavior === "concurrent") throw new Error("Concurrent transactions are not supported by driver");
99
- nativeTx[config.behavior ?? "deferred"]();
100
- return result;
101
- }
102
- };
103
- var SQLiteBunTransaction = class SQLiteBunTransaction2 extends SQLiteAsyncTransaction {
104
- static {
105
- __name(this, "SQLiteBunTransaction2");
106
- }
107
- static [entityKind] = "SQLiteBunTransaction";
108
- transaction(transaction) {
109
- const savepointName = `sp${this.nestedIndex}`;
110
- const tx = new SQLiteBunTransaction2("sync", this.dialect, this.session, this._.relations, this.nestedIndex + 1);
111
- this.session.run(sql.raw(`savepoint ${savepointName}`));
112
- try {
113
- const result = transaction(tx);
114
- this.session.run(sql.raw(`release savepoint ${savepointName}`));
115
- return result;
116
- } catch (err) {
117
- try {
118
- this.session.run(sql.raw(`rollback to savepoint ${savepointName}`));
119
- } catch {
120
- }
121
- throw err;
122
- }
123
- }
124
- };
125
- var SQLiteBunDatabase = class extends SQLiteAsyncDatabase {
126
- static {
127
- __name(this, "SQLiteBunDatabase");
128
- }
129
- static [entityKind] = "SQLiteBunDatabase";
130
- };
131
- function construct(client, config = {}) {
132
- const dialect = new SQLiteDialect({
133
- codecs: config.codecs ?? bunSQLiteCodecs,
134
- useJitMappers: jitCompatCheck(config.jit)
135
- });
136
- let logger;
137
- if (config.logger === true) logger = new DefaultLogger();
138
- else if (config.logger !== false) logger = config.logger;
139
- const relations = config.relations ?? {};
140
- const db = new SQLiteBunDatabase("sync", dialect, new SQLiteBunSession(client, dialect, relations, {
141
- logger,
142
- paramsInErrors: config.paramsInErrors
143
- }), relations);
144
- db.$client = client;
145
- return db;
146
- }
147
- __name(construct, "construct");
148
- function drizzle(...params) {
149
- if (params[0] === void 0 || typeof params[0] === "string") return construct(params[0] === void 0 ? new Database() : new Database(params[0]), params[1]);
150
- const { connection, client, ...DrizzleSQLiteConfig } = params[0];
151
- if (client) return construct(client, DrizzleSQLiteConfig);
152
- if (typeof connection === "object") {
153
- const { source, ...opts } = connection;
154
- const options = Object.values(opts).filter((v) => v !== void 0).length ? opts : void 0;
155
- return construct(new Database(source, options), DrizzleSQLiteConfig);
156
- }
157
- return construct(new Database(connection), DrizzleSQLiteConfig);
158
- }
159
- __name(drizzle, "drizzle");
160
- (function(_drizzle) {
161
- function mock(config) {
162
- return construct({}, config);
163
- }
164
- __name(mock, "mock");
165
- _drizzle.mock = mock;
166
- })(drizzle || (drizzle = {}));
167
- export {
168
- drizzle
169
- };
@@ -1,76 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- loadVectorExtension,
5
- vectorExtension
6
- } from "./chunk-NISH4UXM.js";
7
- import {
8
- refuseOwnerStoreInTests
9
- } from "./chunk-L72WUJAS.js";
10
- import "./chunk-5JKTVAXX.js";
11
- import "./chunk-QPPOIWPY.js";
12
- import "./chunk-S4UUN6LD.js";
13
- import {
14
- importFrom
15
- } from "./chunk-Y5E2WNWB.js";
16
- import "./chunk-S6JG4YUH.js";
17
- import {
18
- __name
19
- } from "./chunk-ZVVMGPBJ.js";
20
-
21
- // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
22
- var customised = false;
23
- var ownLibrary = /* @__PURE__ */ __name(async () => {
24
- try {
25
- const { libraryFor } = await importFrom(new URL("store/drivers/bun-sqlite.js", import.meta.resolve("@wirecat/cli-core")).href, "@wirecat/cli-core-sqlite");
26
- return libraryFor();
27
- } catch {
28
- return void 0;
29
- }
30
- }, "ownLibrary");
31
- var bunDatabase = /* @__PURE__ */ __name(async () => {
32
- const specifier = "bun:sqlite";
33
- const { Database } = await importFrom(new URL("store/drivers/bun-sqlite.js", import.meta.resolve("@wirecat/cli-core")).href, specifier);
34
- if (process.platform === "darwin" && !customised) {
35
- customised = true;
36
- const library = await ownLibrary();
37
- if (library)
38
- Database.setCustomSQLite(library);
39
- }
40
- return Database;
41
- }, "bunDatabase");
42
- var openWithBunSqlite = /* @__PURE__ */ __name(async (path) => cacheOverBunSqlite(await bunClient(path)), "openWithBunSqlite");
43
- var bunClient = /* @__PURE__ */ __name(async (path, options) => {
44
- refuseOwnerStoreInTests(path);
45
- const Database = await bunDatabase();
46
- const extension = await vectorExtension();
47
- const client = options ? new Database(path, options) : new Database(path);
48
- try {
49
- loadVectorExtension(client, extension);
50
- return client;
51
- } catch (error) {
52
- client.close();
53
- throw error;
54
- }
55
- }, "bunClient");
56
- var cacheOverBunSqlite = /* @__PURE__ */ __name((database) => {
57
- return {
58
- exec: /* @__PURE__ */ __name((sql) => database.exec(sql), "exec"),
59
- prepare: /* @__PURE__ */ __name((sql) => {
60
- const statement = database.query(sql);
61
- return {
62
- run: /* @__PURE__ */ __name((...parameters) => ({ changes: Number(statement.run(...parameters).changes) }), "run"),
63
- // Bun answers null for no row; the seam promises undefined, and `!== undefined` checks rely on it.
64
- get: /* @__PURE__ */ __name((...parameters) => statement.get(...parameters) ?? void 0, "get"),
65
- all: /* @__PURE__ */ __name((...parameters) => statement.all(...parameters), "all")
66
- };
67
- }, "prepare"),
68
- close: /* @__PURE__ */ __name(() => database.close(), "close")
69
- };
70
- }, "cacheOverBunSqlite");
71
- export {
72
- bunClient,
73
- bunDatabase,
74
- cacheOverBunSqlite,
75
- openWithBunSqlite
76
- };
@@ -1,16 +0,0 @@
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/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/normalize.js
8
- var NORMALIZER_VERSION = 1;
9
- var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
10
- var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
11
-
12
- export {
13
- NORMALIZER_VERSION,
14
- fold,
15
- normalize
16
- };