@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
package/dist/identity.js CHANGED
@@ -20,6 +20,7 @@ export const DESKTOP = {
20
20
  hosts: ["api.attio.com", "app.attio.com"],
21
21
  tagline: "Attio deals, people and companies for your agent",
22
22
  syncs: "your deals and their clients",
23
+ mcpPort: 8759,
23
24
  signIn: {
24
25
  gives: "Lets your agent read your Attio deals, people and companies and call the Attio API.",
25
26
  asks: "An access token: in Attio, Workspace settings → Developers → New access token, with read access to records, " +
package/dist/program.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { join } from "node:path";
2
2
  import { resolvePaths } from "@wirecat/cli-base";
3
- import { appDoctorCommand, appMcpCommand, commandsCommand, configCommand, createProgram as createSharedProgram, outputFor, ProfileTokenStore, run as runShared, runsCommand, skillCommand, upgradeCommand, } from "@wirecat/cli-core/cli";
4
- import { appUpdate } from "@wirecat/cli-core/update";
3
+ import { appDoctorCommand, appMcpCommand, appUpdate, commandsCommand, configCommand, createProgram as createSharedProgram, outputFor, ProfileTokenStore, run as runShared, runsCommand, skillCommand, upgradeCommand, } from "@wirecat/cli-core";
5
4
  import { apiCommand } from "./commands/api.js";
6
5
  import { crmCommands } from "./commands/crm.js";
7
6
  import { scheduleCommand } from "./commands/schedule.js";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.8.0";
1
+ export const VERSION = "0.10.0";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/attio-cli",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Attio CRM: deals, people and companies for you and your AI agent",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",
@@ -61,8 +61,8 @@
61
61
  "source:check": "node --experimental-strip-types scripts/source-check.ts"
62
62
  },
63
63
  "dependencies": {
64
- "@wirecat/cli-base": "1.0.0",
65
- "@wirecat/cli-core": "1.0.0",
64
+ "@wirecat/cli-base": "2.1.0",
65
+ "@wirecat/cli-core": "3.0.0",
66
66
  "commander": "15.0.0",
67
67
  "valibot": "1.5.0"
68
68
  },
@@ -73,7 +73,7 @@
73
73
  "@cspell/dict-ru_ru": "2.3.4",
74
74
  "@types/node": "22.20.5",
75
75
  "@vitest/coverage-v8": "5.0.5",
76
- "@wirecat/cli-testing": "0.7.3",
76
+ "@wirecat/cli-testing": "0.7.4",
77
77
  "cspell": "10.4.0",
78
78
  "esbuild": "0.28.2",
79
79
  "lefthook": "2.2.2",
@@ -1,4 +0,0 @@
1
- import type { CrmManifestActivities } from "@wirecat/cli-core/crm";
2
- /** Notes and tasks, written as `src/hooks.ts` reads them back, so a sync keeps each under the same id. */
3
- export declare const ACTIVITIES: CrmManifestActivities;
4
- //# sourceMappingURL=activities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"activities.d.ts","sourceRoot":"","sources":["../src/activities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAyClE,0GAA0G;AAC1G,eAAO,MAAM,UAAU,EAAE,qBAoDxB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"activities.js","sourceRoot":"","sources":["../src/activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,OAAO,EAAa,YAAY,EAAa,YAAY,EAAE,MAAM,YAAY,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAA4B,CAAA;AACtH,MAAM,SAAS,GAAG,IAAI,CAAA;AAEtB,MAAM,KAAK,GAAG,CAAC,IAAc,EAAE,IAAI,GAA2B,EAAE,EAAE,EAAE,CAAC,CAAC;IACpE,IAAI;IACJ,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,EAAE;IACV,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CA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1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=attio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attio.d.ts","sourceRoot":"","sources":["../../src/bin/attio.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"attio.js","sourceRoot":"","sources":["../../src/bin/attio.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,kBAAkB,EAAE,CAAA;AACpB,oGAAoG;AACpG,MAAM,YAAY,GAAG,YAAY,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC,CAAA;AACvG,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAA;AACrC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;IAC5B,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC;KAAM,CAAC;IACN,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAA;IAC7C,OAAO,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AACrD,CAAC;AACD,YAAY,EAAE,CAAA"}
@@ -1,38 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- runCommandForAgent,
5
- toolsFromCommands
6
- } from "./chunk-DM7KWVDZ.js";
7
- import "./chunk-WXQGA6XK.js";
8
- import "./chunk-RDVTHFPP.js";
9
- import "./chunk-EY36BTKZ.js";
10
- import "./chunk-APARYILG.js";
11
- import "./chunk-WOPVBRPV.js";
12
- import "./chunk-PL5P7UKW.js";
13
- import "./chunk-M4AC55ZB.js";
14
- import "./chunk-SCI7QEHF.js";
15
- import "./chunk-V7IF2K3P.js";
16
- import "./chunk-GTEX4IUO.js";
17
- import "./chunk-3YM4B2GT.js";
18
- import "./chunk-5WD22IXQ.js";
19
- import "./chunk-L45WN3AR.js";
20
- import "./chunk-AATTOFNY.js";
21
- import "./chunk-ZZD2YPOX.js";
22
- import "./chunk-RRTMPSQR.js";
23
- import "./chunk-RQORQN2V.js";
24
- import "./chunk-DNCLQPOM.js";
25
- import "./chunk-7Z53MLQP.js";
26
- import "./chunk-TTF5DP4V.js";
27
- import "./chunk-LM3W7YOM.js";
28
- import "./chunk-L72WUJAS.js";
29
- import "./chunk-5JKTVAXX.js";
30
- import "./chunk-QPPOIWPY.js";
31
- import "./chunk-S4UUN6LD.js";
32
- import "./chunk-Y5E2WNWB.js";
33
- import "./chunk-S6JG4YUH.js";
34
- import "./chunk-ZVVMGPBJ.js";
35
- export {
36
- runCommandForAgent,
37
- toolsFromCommands
38
- };
@@ -1,320 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- StdioServerTransport,
5
- answeredWire,
6
- serveStdio
7
- } from "./chunk-VB7FZOYX.js";
8
- import {
9
- CALLER_META_KEY,
10
- PROXY_CLIENT_NAME,
11
- callerOf
12
- } from "./chunk-EY36BTKZ.js";
13
- import {
14
- InMemoryTransport,
15
- McpServer
16
- } from "./chunk-PL5P7UKW.js";
17
- import "./chunk-SCI7QEHF.js";
18
- import "./chunk-ZZD2YPOX.js";
19
- import "./chunk-DNCLQPOM.js";
20
- import "./chunk-5JKTVAXX.js";
21
- import {
22
- errorObjectOf,
23
- mcpErrorResult
24
- } from "./chunk-QPPOIWPY.js";
25
- import "./chunk-S4UUN6LD.js";
26
- import "./chunk-Y5E2WNWB.js";
27
- import {
28
- CliError
29
- } from "./chunk-S6JG4YUH.js";
30
- import {
31
- __name
32
- } from "./chunk-ZVVMGPBJ.js";
33
-
34
- // 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/all-profiles.js
35
- import { spawn } from "node:child_process";
36
- import { randomUUID } from "node:crypto";
37
- var PROTOCOL = "2025-06-18";
38
- var START_MS = 3e4;
39
- var CHILD_IDLE_MS = 10 * 60 * 1e3;
40
- var startChild = /* @__PURE__ */ __name((spec, note, onExit) => {
41
- const child = spawn(spec.command, spec.args, { env: spec.env, stdio: "pipe" });
42
- const pending = /* @__PURE__ */ new Map();
43
- let next = 1;
44
- let buffer = "";
45
- let gone;
46
- const fail = /* @__PURE__ */ __name((error) => {
47
- gone ??= error;
48
- for (const waiter of pending.values())
49
- waiter.reject(error);
50
- pending.clear();
51
- }, "fail");
52
- child.on("error", () => fail(new Error("the profile's MCP server could not be started")));
53
- child.on("exit", () => {
54
- fail(new Error("the profile's MCP server stopped"));
55
- onExit();
56
- });
57
- child.stdin.on("error", () => fail(new Error("the profile's MCP server closed its input")));
58
- child.stderr.setEncoding("utf8");
59
- let errors = "";
60
- child.stderr.on("data", (chunk) => {
61
- const lines = (errors + chunk).split("\n");
62
- errors = lines.pop() ?? "";
63
- for (const line of lines)
64
- if (line.trim())
65
- note(line);
66
- });
67
- child.stdout.setEncoding("utf8");
68
- child.stdout.on("data", (chunk) => {
69
- buffer += chunk;
70
- for (let at = buffer.indexOf("\n"); at !== -1; at = buffer.indexOf("\n")) {
71
- const line = buffer.slice(0, at);
72
- buffer = buffer.slice(at + 1);
73
- let message;
74
- try {
75
- message = JSON.parse(line);
76
- } catch {
77
- continue;
78
- }
79
- if (message.method !== void 0 && message.id !== void 0) {
80
- send({ id: message.id, error: { code: -32601, message: "not offered through the all-profiles server" } });
81
- continue;
82
- }
83
- if (typeof message.id !== "number")
84
- continue;
85
- const waiter = pending.get(message.id);
86
- if (!waiter)
87
- continue;
88
- pending.delete(message.id);
89
- if (message.error)
90
- waiter.reject(new Error(message.error.message ?? "the profile's MCP server refused"));
91
- else
92
- waiter.resolve(message.result ?? {});
93
- }
94
- });
95
- const send = /* @__PURE__ */ __name((message) => child.stdin.write(`${JSON.stringify({ jsonrpc: "2.0", ...message })}
96
- `), "send");
97
- const request = /* @__PURE__ */ __name((method, params) => new Promise((resolve, reject) => {
98
- if (gone)
99
- return reject(gone);
100
- const id = next++;
101
- pending.set(id, { resolve, reject });
102
- send({ id, method, params });
103
- }), "request");
104
- const close = /* @__PURE__ */ __name(() => new Promise((resolve) => {
105
- if (child.exitCode !== null || child.signalCode !== null)
106
- return resolve();
107
- child.once("exit", () => resolve());
108
- child.stdin.end();
109
- }), "close");
110
- const timer = setTimeout(() => fail(new Error("the profile's MCP server did not answer in time")), START_MS);
111
- return request("initialize", {
112
- protocolVersion: PROTOCOL,
113
- capabilities: {},
114
- clientInfo: { name: PROXY_CLIENT_NAME, version: "1" }
115
- }).then(() => {
116
- send({ method: "notifications/initialized" });
117
- return { request, close };
118
- }).catch(async (error) => {
119
- await close();
120
- throw error;
121
- }).finally(() => clearTimeout(timer));
122
- }, "startChild");
123
- var pool = /* @__PURE__ */ __name((options) => {
124
- const idleMs = options.idleMs ?? CHILD_IDLE_MS;
125
- const note = options.note ?? (() => {
126
- });
127
- const running = /* @__PURE__ */ new Map();
128
- const forget = /* @__PURE__ */ __name((profile, child) => {
129
- const one = running.get(profile);
130
- if (one?.child !== child)
131
- return;
132
- clearTimeout(one.timer);
133
- running.delete(profile);
134
- }, "forget");
135
- const use = /* @__PURE__ */ __name(async (profile, work) => {
136
- let one = running.get(profile);
137
- if (!one) {
138
- const child = startChild(options.child(profile), (line) => note(`${profile}: ${line}`), () => forget(profile, child));
139
- child.catch(() => forget(profile, child));
140
- one = { child };
141
- running.set(profile, one);
142
- }
143
- clearTimeout(one.timer);
144
- const entry = one;
145
- try {
146
- return await work(await entry.child);
147
- } finally {
148
- if (running.get(profile) === entry) {
149
- entry.timer = setTimeout(() => {
150
- forget(profile, entry.child);
151
- void entry.child.then((child) => child.close()).catch(() => void 0);
152
- }, idleMs);
153
- entry.timer.unref();
154
- }
155
- }
156
- }, "use");
157
- const close = /* @__PURE__ */ __name(async () => {
158
- const all = [...running.values()];
159
- running.clear();
160
- for (const one of all)
161
- clearTimeout(one.timer);
162
- await Promise.all(all.map((one) => one.child.then((child) => child.close()).catch(() => void 0)));
163
- }, "close");
164
- return { use, close };
165
- }, "pool");
166
- var withProfile = /* @__PURE__ */ __name((tool, profiles, name, signedIn = () => true) => {
167
- const schema = tool.inputSchema;
168
- const out = profiles.filter((profile) => !signedIn(profile));
169
- const states = out.length === 0 ? "" : ` Signed in: ${profiles.filter(signedIn).join(", ") || "none"} \xB7 Not signed in: ${out.join(", ")}.`;
170
- return {
171
- ...tool,
172
- inputSchema: {
173
- ...tool.inputSchema,
174
- properties: {
175
- profile: profiles.length === 0 ? (
176
- // An empty enum matches nothing, and a directory that checks the schema refuses the tool.
177
- {
178
- type: "string",
179
- description: `Which ${name} account, by its profile. None is set up on this computer yet.`
180
- }
181
- ) : {
182
- type: "string",
183
- enum: [...profiles],
184
- oneOf: profiles.map((one) => ({ const: one, title: signedIn(one) ? one : `${one} \u2014 not signed in` })),
185
- description: `Which ${name} account, by its profile. If the owner did not name one, ask which \u2014 never guess.${states}`
186
- },
187
- ...schema.properties
188
- },
189
- required: ["profile", ...(schema.required ?? []).filter((field) => field !== "profile")]
190
- }
191
- };
192
- }, "withProfile");
193
- var refusal = /* @__PURE__ */ __name((code, text, details) => mcpErrorResult(errorObjectOf(new CliError(code, text, details), { effects: { remote: "none", local: "none" } })), "refusal");
194
- var allProfilesServer = /* @__PURE__ */ __name((options) => {
195
- const children = pool(options);
196
- let listed;
197
- const tools = /* @__PURE__ */ __name((profiles) => {
198
- listed ??= children.use(profiles.find(signedIn) ?? profiles[0], (child) => child.request("tools/list", {})).then((answer) => answer.tools ?? []);
199
- listed.catch(() => {
200
- listed = void 0;
201
- });
202
- return listed;
203
- }, "tools");
204
- const signedIn = /* @__PURE__ */ __name((profile) => options.signedIn?.(profile) ?? true, "signedIn");
205
- const build = /* @__PURE__ */ __name(() => {
206
- const profiles = [...options.profiles()].sort();
207
- const server = new McpServer({ name: options.command, version: options.version }, {
208
- capabilities: { tools: {} },
209
- // Read per session, as the profiles are: clients cut the instructions short, so this line comes first.
210
- instructions: profiles.length === 0 && options.setup ? `${options.setup.charAt(0).toUpperCase()}${options.setup.slice(1)}.
211
- ${options.instructions}` : options.instructions
212
- });
213
- server.server.setRequestHandler("tools/list", async () => ({
214
- tools: (profiles.length === 0 ? await options.catalogue?.() ?? [] : await tools(profiles)).map((one) => withProfile(one, profiles, options.name, signedIn))
215
- }));
216
- const callers = {
217
- env: options.env ?? process.env,
218
- client: /* @__PURE__ */ __name(() => server.server.getClientVersion(), "client"),
219
- connectionId: randomUUID()
220
- };
221
- server.server.setRequestHandler("tools/call", async (request, ctx) => {
222
- const { name, arguments: given = {}, _meta } = request.params;
223
- const { profile, ...rest } = given;
224
- if (profiles.length === 0)
225
- return refusal("configuration_error", options.setup ?? `no ${options.command} profile on this computer yet.`);
226
- if (typeof profile !== "string" || !profiles.includes(profile))
227
- return refusal("validation_error", `${name} needs "profile", one of: ${profiles.join(", ")}. If the owner did not say which account, ask.`);
228
- if (!signedIn(profile))
229
- return refusal("authentication_error", options.signIn?.(profile) ?? `profile ${profile} is not signed in.`);
230
- try {
231
- return await children.use(profile, (child) => (
232
- // Children are shared by every session, so each call names its own caller.
233
- child.request("tools/call", {
234
- name,
235
- arguments: rest,
236
- _meta: { ..._meta, [CALLER_META_KEY]: callerOf(ctx, name, callers) }
237
- })
238
- ));
239
- } catch (error) {
240
- return refusal("outcome_unknown", `profile ${profile}: ${error instanceof Error ? error.message : String(error)}`);
241
- }
242
- });
243
- return server;
244
- }, "build");
245
- return { build, close: /* @__PURE__ */ __name(() => children.close(), "close") };
246
- }, "allProfilesServer");
247
- var listedTools = /* @__PURE__ */ __name(async (server) => {
248
- const [own, other] = InMemoryTransport.createLinkedPair();
249
- const answers = /* @__PURE__ */ new Map();
250
- other.onmessage = (message) => {
251
- const { id, result, error } = message;
252
- if (typeof id === "number")
253
- answers.get(id)?.(result, error);
254
- };
255
- const ask = /* @__PURE__ */ __name((id, method, params) => new Promise((resolve, reject) => {
256
- answers.set(id, (result, error) => error || !result ? reject(new Error(error?.message ?? `${method} had no answer`)) : resolve(result));
257
- void other.send({ jsonrpc: "2.0", id, method, params });
258
- }), "ask");
259
- await server.connect(own);
260
- try {
261
- await ask(1, "initialize", {
262
- protocolVersion: PROTOCOL,
263
- capabilities: {},
264
- clientInfo: { name: PROXY_CLIENT_NAME, version: "1" }
265
- });
266
- await other.send({ jsonrpc: "2.0", method: "notifications/initialized" });
267
- const answer = await ask(2, "tools/list", {});
268
- if (!Array.isArray(answer.tools))
269
- throw new Error("the catalogue server listed no tools");
270
- return answer.tools;
271
- } finally {
272
- await server.close();
273
- }
274
- }, "listedTools");
275
- var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {}) => {
276
- const { build, close } = allProfilesServer(options);
277
- const own = io.stdin !== void 0 && io.stdin !== process.stdin;
278
- const wire = answeredWire(io.stdin ?? process.stdin, io.stdout ?? process.stdout);
279
- const handle = serveStdio(build, {
280
- transport: new StdioServerTransport(wire.input, wire.output),
281
- onerror: /* @__PURE__ */ __name((error) => options.note?.(`mcp: ${error.message}`), "onerror")
282
- });
283
- await wire.finished(own ? io.signal : void 0);
284
- try {
285
- wire.release();
286
- await handle.close();
287
- } finally {
288
- await close();
289
- }
290
- }, "serveAllProfilesOverStdio");
291
- var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
292
- const { build, close } = allProfilesServer(options);
293
- const { serveOverHttp } = await import("./serve-MR67OBED.js");
294
- const listening = await serveOverHttp(build, {
295
- ...http,
296
- appName: options.command,
297
- onError: /* @__PURE__ */ __name((error) => options.note?.(`mcp: ${error.message}`), "onError")
298
- }).catch(async (error) => {
299
- await close();
300
- throw error;
301
- });
302
- return {
303
- url: listening.url,
304
- close: /* @__PURE__ */ __name(async () => {
305
- try {
306
- await listening.close();
307
- } finally {
308
- await close();
309
- }
310
- }, "close")
311
- };
312
- }, "serveAllProfilesOverHttp");
313
- export {
314
- CHILD_IDLE_MS,
315
- allProfilesServer,
316
- listedTools,
317
- serveAllProfilesOverHttp,
318
- serveAllProfilesOverStdio,
319
- withProfile
320
- };
@@ -1,91 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- EmptyAnswer,
5
- checkedOptions,
6
- messagesFor,
7
- systemFor
8
- } from "./chunk-EVUMQKV7.js";
9
- import {
10
- Anthropic
11
- } from "./chunk-XQUUANA2.js";
12
- import "./chunk-5JKTVAXX.js";
13
- import "./chunk-QPPOIWPY.js";
14
- import {
15
- array,
16
- literal,
17
- optional,
18
- picklist,
19
- record,
20
- strictObject,
21
- string,
22
- unknown
23
- } from "./chunk-S4UUN6LD.js";
24
- import "./chunk-Y5E2WNWB.js";
25
- import "./chunk-S6JG4YUH.js";
26
- import {
27
- __name
28
- } from "./chunk-ZVVMGPBJ.js";
29
-
30
- // 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/models/anthropic.js
31
- var options = strictObject({
32
- stop_sequences: optional(array(string())),
33
- thinking: optional(strictObject({ type: picklist(["disabled", "adaptive"]) })),
34
- output_config: optional(strictObject({
35
- effort: optional(picklist(["low", "medium", "high"])),
36
- format: optional(strictObject({ type: literal("json_schema"), schema: record(string(), unknown()) }))
37
- }))
38
- });
39
- var anthropic = {
40
- images: true,
41
- baseUrl: "https://api.anthropic.com",
42
- validate: /* @__PURE__ */ __name((given) => checkedOptions("anthropic", options, given), "validate"),
43
- complete: /* @__PURE__ */ __name(async (target, request, checked, apiKey, fetcher) => {
44
- const client = new Anthropic({
45
- apiKey: apiKey ?? "",
46
- authToken: null,
47
- fetch: /* @__PURE__ */ __name((input, init) => fetcher(input, { ...init, redirect: "error" }), "fetch"),
48
- baseURL: target.baseUrl,
49
- maxRetries: 0,
50
- logLevel: "off",
51
- timeout: 12e4
52
- });
53
- const response = await client.messages.stream({
54
- ...checked,
55
- model: target.model,
56
- system: systemFor(request),
57
- messages: [
58
- ...messagesFor(request),
59
- ...request.images === void 0 ? [] : [
60
- {
61
- role: "user",
62
- content: [
63
- { type: "text", text: request.prompt },
64
- ...request.images.map((image) => ({
65
- type: "image",
66
- source: { type: "base64", media_type: image.mimeType, data: image.data }
67
- }))
68
- ]
69
- }
70
- ]
71
- ],
72
- max_tokens: request.maxTokens
73
- }).finalMessage();
74
- if (response.stop_reason !== "end_turn")
75
- throw new Error("incomplete response");
76
- const text = response.content.filter((block) => block.type === "text").map((block) => block.text).join("");
77
- if (text.trim() === "")
78
- throw new EmptyAnswer();
79
- return {
80
- text,
81
- usage: {
82
- input: response.usage.input_tokens + (response.usage.cache_creation_input_tokens ?? 0) + (response.usage.cache_read_input_tokens ?? 0),
83
- output: response.usage.output_tokens
84
- },
85
- tokens: response.usage.input_tokens + response.usage.output_tokens + (response.usage.cache_creation_input_tokens ?? 0) + (response.usage.cache_read_input_tokens ?? 0)
86
- };
87
- }, "complete")
88
- };
89
- export {
90
- anthropic
91
- };