@wirecat/attio-cli 0.0.0-stage → 0.1.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 (242) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/LICENSE +204 -0
  3. package/README.md +248 -2
  4. package/contracts/wirecat.json +2321 -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-KLBL3FYD.js +37 -0
  10. package/dist/bundle/all-profiles-C2NMRQPE.js +320 -0
  11. package/dist/bundle/anthropic-KOU2ILDK.js +91 -0
  12. package/dist/bundle/app-server-TINV4NNY.js +249 -0
  13. package/dist/bundle/attio.js +183 -0
  14. package/dist/bundle/bun-GVNM6IWY.js +169 -0
  15. package/dist/bundle/bun-sqlite-IF6B3EQI.js +76 -0
  16. package/dist/bundle/chunk-2343HKEW.js +362 -0
  17. package/dist/bundle/chunk-2H2MWGBD.js +988 -0
  18. package/dist/bundle/chunk-2P7ENEQ7.js +288 -0
  19. package/dist/bundle/chunk-4EYKJLWI.js +771 -0
  20. package/dist/bundle/chunk-4HQDT5PF.js +338 -0
  21. package/dist/bundle/chunk-4QE4L7UL.js +142 -0
  22. package/dist/bundle/chunk-4XHWGJXT.js +6848 -0
  23. package/dist/bundle/chunk-5DCRHSBI.js +72 -0
  24. package/dist/bundle/chunk-5ETXE5KF.js +372 -0
  25. package/dist/bundle/chunk-5WAGTWCS.js +156 -0
  26. package/dist/bundle/chunk-6B5PSQQ7.js +319 -0
  27. package/dist/bundle/chunk-6BVPS2YY.js +230 -0
  28. package/dist/bundle/chunk-6L5EUGLP.js +188 -0
  29. package/dist/bundle/chunk-7NFEMS4A.js +1028 -0
  30. package/dist/bundle/chunk-A7YQTQ5U.js +733 -0
  31. package/dist/bundle/chunk-AEPOHR4Z.js +82 -0
  32. package/dist/bundle/chunk-ARRQVUJ2.js +334 -0
  33. package/dist/bundle/chunk-BHNFRL3H.js +95 -0
  34. package/dist/bundle/chunk-CBPL3GID.js +23 -0
  35. package/dist/bundle/chunk-D72URWJE.js +532 -0
  36. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  37. package/dist/bundle/chunk-DVN54VPI.js +16 -0
  38. package/dist/bundle/chunk-DW3V7GTY.js +388 -0
  39. package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
  40. package/dist/bundle/chunk-ETSOG6TZ.js +65288 -0
  41. package/dist/bundle/chunk-FJV3MO57.js +29 -0
  42. package/dist/bundle/chunk-HLLRNP2G.js +170 -0
  43. package/dist/bundle/chunk-HQJ2TABD.js +18 -0
  44. package/dist/bundle/chunk-ICUXAOEM.js +42063 -0
  45. package/dist/bundle/chunk-IGALQ74S.js +358 -0
  46. package/dist/bundle/chunk-IPHUAWFG.js +100 -0
  47. package/dist/bundle/chunk-IYMWUL6E.js +633 -0
  48. package/dist/bundle/chunk-JKCXDIGC.js +52 -0
  49. package/dist/bundle/chunk-JTOKDROB.js +95 -0
  50. package/dist/bundle/chunk-JZMGOVCZ.js +80 -0
  51. package/dist/bundle/chunk-KB3YJJPN.js +794 -0
  52. package/dist/bundle/chunk-KD4EUUER.js +37 -0
  53. package/dist/bundle/chunk-LB6D4QF2.js +2333 -0
  54. package/dist/bundle/chunk-LWUJZ2E3.js +108 -0
  55. package/dist/bundle/chunk-MCQOXTAL.js +53 -0
  56. package/dist/bundle/chunk-MMGCGPKM.js +3571 -0
  57. package/dist/bundle/chunk-MXDIXBIV.js +24 -0
  58. package/dist/bundle/chunk-MYVWV5L5.js +407 -0
  59. package/dist/bundle/chunk-MZNRIH3T.js +1233 -0
  60. package/dist/bundle/chunk-NEFILPPV.js +353 -0
  61. package/dist/bundle/chunk-O6CVJGGL.js +131 -0
  62. package/dist/bundle/chunk-OPXCRQTV.js +161 -0
  63. package/dist/bundle/chunk-PKNFA5TU.js +38 -0
  64. package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
  65. package/dist/bundle/chunk-PO6PLQYL.js +50 -0
  66. package/dist/bundle/chunk-PWUQC2GI.js +218 -0
  67. package/dist/bundle/chunk-QCEEPJNN.js +185 -0
  68. package/dist/bundle/chunk-QG4WCLGB.js +1332 -0
  69. package/dist/bundle/chunk-QNQ2OF24.js +9578 -0
  70. package/dist/bundle/chunk-RCKRXBJF.js +1392 -0
  71. package/dist/bundle/chunk-RK4GN2II.js +2000 -0
  72. package/dist/bundle/chunk-RRH7UK7L.js +106 -0
  73. package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
  74. package/dist/bundle/chunk-S7WJXELM.js +58 -0
  75. package/dist/bundle/chunk-SBRFKB77.js +1197 -0
  76. package/dist/bundle/chunk-SP6DPFZ4.js +4072 -0
  77. package/dist/bundle/chunk-SWJDLFDM.js +557 -0
  78. package/dist/bundle/chunk-TWCVCW5T.js +66 -0
  79. package/dist/bundle/chunk-V2R2BJJU.js +63 -0
  80. package/dist/bundle/chunk-V5K3M7FE.js +78 -0
  81. package/dist/bundle/chunk-V6ALLFEE.js +1068 -0
  82. package/dist/bundle/chunk-V6EVJXLO.js +259 -0
  83. package/dist/bundle/chunk-VJ4CPL6F.js +54 -0
  84. package/dist/bundle/chunk-VL25A6V2.js +41 -0
  85. package/dist/bundle/chunk-WBEZZGZE.js +12645 -0
  86. package/dist/bundle/chunk-WIYAMDPP.js +73 -0
  87. package/dist/bundle/chunk-WRJGITBX.js +76 -0
  88. package/dist/bundle/chunk-XHIVZPQ2.js +7 -0
  89. package/dist/bundle/chunk-XQUUANA2.js +24600 -0
  90. package/dist/bundle/chunk-XTQIXZVM.js +2788 -0
  91. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  92. package/dist/bundle/chunk-YKN4Y35P.js +206 -0
  93. package/dist/bundle/chunk-ZMJZQGCN.js +46 -0
  94. package/dist/bundle/chunk-ZPSH27BB.js +274 -0
  95. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  96. package/dist/bundle/command-contract-3FR7BK72.js +37 -0
  97. package/dist/bundle/command-server-entry-4XR4GDS7.js +166 -0
  98. package/dist/bundle/decode-24EITKP4.js +297 -0
  99. package/dist/bundle/definitions-HU62PG4L.js +43364 -0
  100. package/dist/bundle/dispatch-VE6CXCJW.js +411 -0
  101. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  102. package/dist/bundle/dist-ZSNEZYVF.js +7577 -0
  103. package/dist/bundle/echarts-LEVLEF7L.js +42501 -0
  104. package/dist/bundle/embed-G6FGY3VZ.js +38 -0
  105. package/dist/bundle/embedder-B6LNMXZZ.js +111 -0
  106. package/dist/bundle/failure-ASVFQXMF.js +25 -0
  107. package/dist/bundle/first-run-NVXVVALW.js +29 -0
  108. package/dist/bundle/first-screen-N3IPK5AT.js +37 -0
  109. package/dist/bundle/instructions-F3KPYMJK.js +11 -0
  110. package/dist/bundle/mcp-BUCB5ZPE.js +167 -0
  111. package/dist/bundle/meeting-combined-7FREWXMB.js +24 -0
  112. package/dist/bundle/meeting-model-GJPAIUQL.js +25 -0
  113. package/dist/bundle/meeting-semantic-YWY645AH.js +22 -0
  114. package/dist/bundle/node-KM3CUABH.js +2340 -0
  115. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  116. package/dist/bundle/node-WVUZSDLD.js +176 -0
  117. package/dist/bundle/node-sqlite-V4NNKABG.js +74 -0
  118. package/dist/bundle/oauth-7CENTQIN.js +20 -0
  119. package/dist/bundle/open-OLTONZBG.js +23 -0
  120. package/dist/bundle/openai-M6ES74YN.js +238 -0
  121. package/dist/bundle/process-VFIFK5KO.js +91 -0
  122. package/dist/bundle/program-N72VUDXM.js +33418 -0
  123. package/dist/bundle/prompt-TNWPBEBB.js +17 -0
  124. package/dist/bundle/recognize-PV2WOUWS.js +26 -0
  125. package/dist/bundle/remote-3F6JACS5.js +31 -0
  126. package/dist/bundle/rerank-33C67PIV.js +52 -0
  127. package/dist/bundle/schemas-RLDEALIJ.js +21410 -0
  128. package/dist/bundle/serve-3DEMACSQ.js +199 -0
  129. package/dist/bundle/server-AAK2HWQM.js +79 -0
  130. package/dist/bundle/server-LIBRGMUZ.js +212 -0
  131. package/dist/bundle/sqlite-runtime-SMAREHYG.js +20 -0
  132. package/dist/bundle/state-WPHAVJIU.js +36 -0
  133. package/dist/bundle/store-A7V4FEXE.js +177 -0
  134. package/dist/bundle/store-PMAPJNXT.js +291 -0
  135. package/dist/bundle/store-maintenance-command-QHRHAEYN.js +66 -0
  136. package/dist/bundle/surface-MN4RTNYW.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/comments.d.ts +3 -0
  142. package/dist/commands/comments.d.ts.map +1 -0
  143. package/dist/commands/comments.js +114 -0
  144. package/dist/commands/comments.js.map +1 -0
  145. package/dist/commands/crm.d.ts +4 -0
  146. package/dist/commands/crm.d.ts.map +1 -0
  147. package/dist/commands/crm.js +66 -0
  148. package/dist/commands/crm.js.map +1 -0
  149. package/dist/commands/session.d.ts +7 -0
  150. package/dist/commands/session.d.ts.map +1 -0
  151. package/dist/commands/session.js +22 -0
  152. package/dist/commands/session.js.map +1 -0
  153. package/dist/config.d.ts +14 -0
  154. package/dist/config.d.ts.map +1 -0
  155. package/dist/config.js +14 -0
  156. package/dist/config.js.map +1 -0
  157. package/dist/context.d.ts +37 -0
  158. package/dist/context.d.ts.map +1 -0
  159. package/dist/context.js +31 -0
  160. package/dist/context.js.map +1 -0
  161. package/dist/generated/definitions.d.ts +3 -0
  162. package/dist/generated/definitions.d.ts.map +1 -0
  163. package/dist/generated/definitions.js +43360 -0
  164. package/dist/generated/definitions.js.map +1 -0
  165. package/dist/generated/manifest.d.ts +6 -0
  166. package/dist/generated/manifest.d.ts.map +1 -0
  167. package/dist/generated/manifest.js +5158 -0
  168. package/dist/generated/manifest.js.map +1 -0
  169. package/dist/generated/schemas.d.ts +383 -0
  170. package/dist/generated/schemas.d.ts.map +1 -0
  171. package/dist/generated/schemas.js +21196 -0
  172. package/dist/generated/schemas.js.map +1 -0
  173. package/dist/generated/types.d.ts +10156 -0
  174. package/dist/generated/types.d.ts.map +1 -0
  175. package/dist/generated/types.js +5 -0
  176. package/dist/generated/types.js.map +1 -0
  177. package/dist/generated/wirecat-config.d.ts +15 -0
  178. package/dist/generated/wirecat-config.d.ts.map +1 -0
  179. package/dist/generated/wirecat-config.js +328 -0
  180. package/dist/generated/wirecat-config.js.map +1 -0
  181. package/dist/hooks.d.ts +3 -0
  182. package/dist/hooks.d.ts.map +1 -0
  183. package/dist/hooks.js +7 -0
  184. package/dist/hooks.js.map +1 -0
  185. package/dist/identity.d.ts +33 -0
  186. package/dist/identity.d.ts.map +1 -0
  187. package/dist/identity.js +31 -0
  188. package/dist/identity.js.map +1 -0
  189. package/dist/index.d.ts +3 -0
  190. package/dist/index.d.ts.map +1 -0
  191. package/dist/index.js +3 -0
  192. package/dist/index.js.map +1 -0
  193. package/dist/program.d.ts +6 -0
  194. package/dist/program.d.ts.map +1 -0
  195. package/dist/program.js +54 -0
  196. package/dist/program.js.map +1 -0
  197. package/dist/sample/comments.d.ts +61 -0
  198. package/dist/sample/comments.d.ts.map +1 -0
  199. package/dist/sample/comments.js +39 -0
  200. package/dist/sample/comments.js.map +1 -0
  201. package/dist/sample/records.d.ts +16 -0
  202. package/dist/sample/records.d.ts.map +1 -0
  203. package/dist/sample/records.js +22 -0
  204. package/dist/sample/records.js.map +1 -0
  205. package/dist/sample/transport.d.ts +42 -0
  206. package/dist/sample/transport.d.ts.map +1 -0
  207. package/dist/sample/transport.js +153 -0
  208. package/dist/sample/transport.js.map +1 -0
  209. package/dist/version.d.ts +2 -0
  210. package/dist/version.d.ts.map +1 -0
  211. package/dist/version.js +2 -0
  212. package/dist/version.js.map +1 -0
  213. package/dist/wcat.d.ts +3 -0
  214. package/dist/wcat.d.ts.map +1 -0
  215. package/dist/wcat.js +4 -0
  216. package/dist/wcat.js.map +1 -0
  217. package/package.json +87 -4
  218. package/skills/attio-cli/SKILL.md +58 -0
  219. package/skills/attio-cli/references/api/api-activities.md +62 -0
  220. package/skills/attio-cli/references/api/api-activity-records.md +96 -0
  221. package/skills/attio-cli/references/api/api-attributes.md +148 -0
  222. package/skills/attio-cli/references/api/api-call-recordings.md +53 -0
  223. package/skills/attio-cli/references/api/api-comments.md +36 -0
  224. package/skills/attio-cli/references/api/api-emails.md +23 -0
  225. package/skills/attio-cli/references/api/api-entries.md +127 -0
  226. package/skills/attio-cli/references/api/api-files.md +63 -0
  227. package/skills/attio-cli/references/api/api-lists.md +44 -0
  228. package/skills/attio-cli/references/api/api-meetings.md +82 -0
  229. package/skills/attio-cli/references/api/api-meta.md +8 -0
  230. package/skills/attio-cli/references/api/api-notes.md +64 -0
  231. package/skills/attio-cli/references/api/api-objects.md +55 -0
  232. package/skills/attio-cli/references/api/api-records.md +168 -0
  233. package/skills/attio-cli/references/api/api-sequences.md +15 -0
  234. package/skills/attio-cli/references/api/api-sql.md +15 -0
  235. package/skills/attio-cli/references/api/api-tasks.md +67 -0
  236. package/skills/attio-cli/references/api/api-threads.md +35 -0
  237. package/skills/attio-cli/references/api/api-transcripts.md +17 -0
  238. package/skills/attio-cli/references/api/api-views.md +133 -0
  239. package/skills/attio-cli/references/api/api-webhooks.md +62 -0
  240. package/skills/attio-cli/references/api/api-workspace-blocklist.md +39 -0
  241. package/skills/attio-cli/references/api/api-workspace-members.md +19 -0
  242. package/skills/attio-cli/references/api.md +35 -0
@@ -0,0 +1,5 @@
1
+ // GENERATED. DO NOT EDIT.
2
+ // Source: spec/attio/, checked against provenance.json
3
+ // Run: pnpm generate
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/generated/types.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,uDAAuD;AACvD,qBAAqB"}
@@ -0,0 +1,15 @@
1
+ export declare const VERIFY: {
2
+ operation: string;
3
+ id: string;
4
+ name?: string;
5
+ active?: string;
6
+ };
7
+ export declare const SOURCE: Readonly<Record<string, unknown>> & {
8
+ readonly provider: string;
9
+ readonly kinds: readonly string[];
10
+ };
11
+ export declare const HOOK_OPTIONS: {
12
+ hooks: import("@wirecat/cli-core/crm").CrmManifestHooks;
13
+ };
14
+ export declare const LIVE: readonly ("person" | "organization" | "user")[];
15
+ //# sourceMappingURL=wirecat-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirecat-config.d.ts","sourceRoot":"","sources":["../../src/generated/wirecat-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAInF,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;IACvD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CA8TlC,CAAA;AAID,eAAO,MAAM,YAAY;;CAAY,CAAA;AAErC,eAAO,MAAM,IAAI,EAAE,SAAS,CAAC,QAAQ,GAAG,cAAc,GAAG,MAAM,CAAC,EAAuC,CAAA"}
@@ -0,0 +1,328 @@
1
+ // Generated from wirecat.config.ts by scripts/from-config.ts; run pnpm generate
2
+ export const VERIFY = {
3
+ operation: "getV2Self",
4
+ id: "workspace_id",
5
+ name: "workspace_name",
6
+ };
7
+ export const SOURCE = {
8
+ provider: "attio",
9
+ kinds: ["organization", "person", "deal"],
10
+ entities: {
11
+ organization: {
12
+ list: {
13
+ operation: "postV2ObjectsByObjectRecordsQuery",
14
+ path: {
15
+ object: "companies",
16
+ },
17
+ body: {
18
+ limit: 500,
19
+ sorts: [
20
+ {
21
+ direction: "desc",
22
+ attribute: "created_at",
23
+ },
24
+ ],
25
+ },
26
+ },
27
+ get: {
28
+ operation: "getV2ObjectsByObjectRecordsByRecordId",
29
+ path: {
30
+ object: "companies",
31
+ record_id: "{id}",
32
+ },
33
+ items: "data",
34
+ },
35
+ custom: {
36
+ from: "values",
37
+ typed: {
38
+ by: "attribute_type",
39
+ current: "active_until",
40
+ },
41
+ },
42
+ search: {
43
+ operation: "postV2ObjectsByObjectRecordsQuery",
44
+ path: {
45
+ object: "companies",
46
+ },
47
+ body: {
48
+ limit: 100,
49
+ sorts: [
50
+ {
51
+ direction: "desc",
52
+ attribute: "created_at",
53
+ },
54
+ ],
55
+ filter: {
56
+ name: {
57
+ $contains: "{query}",
58
+ },
59
+ },
60
+ },
61
+ },
62
+ map: {
63
+ externalId: "id.record_id",
64
+ name: "values.name.0.value",
65
+ url: "values.domains.0.domain",
66
+ people: {
67
+ each: "values.team",
68
+ id: "target_record_id",
69
+ },
70
+ createdAt: "created_at",
71
+ },
72
+ },
73
+ person: {
74
+ list: {
75
+ operation: "postV2ObjectsByObjectRecordsQuery",
76
+ path: {
77
+ object: "people",
78
+ },
79
+ body: {
80
+ limit: 500,
81
+ sorts: [
82
+ {
83
+ direction: "desc",
84
+ attribute: "created_at",
85
+ },
86
+ ],
87
+ },
88
+ },
89
+ get: {
90
+ operation: "getV2ObjectsByObjectRecordsByRecordId",
91
+ path: {
92
+ object: "people",
93
+ record_id: "{id}",
94
+ },
95
+ items: "data",
96
+ },
97
+ custom: {
98
+ from: "values",
99
+ typed: {
100
+ by: "attribute_type",
101
+ current: "active_until",
102
+ },
103
+ },
104
+ search: {
105
+ operation: "postV2ObjectsByObjectRecordsQuery",
106
+ path: {
107
+ object: "people",
108
+ },
109
+ body: {
110
+ limit: 100,
111
+ sorts: [
112
+ {
113
+ direction: "desc",
114
+ attribute: "created_at",
115
+ },
116
+ ],
117
+ filter: {
118
+ $or: [
119
+ {
120
+ name: {
121
+ full_name: {
122
+ $contains: "{query}",
123
+ },
124
+ },
125
+ },
126
+ {
127
+ email_addresses: {
128
+ email_address: {
129
+ $contains: "{query}",
130
+ },
131
+ },
132
+ },
133
+ ],
134
+ },
135
+ },
136
+ },
137
+ map: {
138
+ externalId: "id.record_id",
139
+ name: "values.name.0.full_name",
140
+ firstName: "values.name.0.first_name",
141
+ lastName: "values.name.0.last_name",
142
+ emails: {
143
+ each: "values.email_addresses",
144
+ value: "email_address",
145
+ },
146
+ phones: {
147
+ each: "values.phone_numbers",
148
+ value: "phone_number",
149
+ },
150
+ position: "values.job_title.0.value",
151
+ organizations: {
152
+ each: "values.company",
153
+ id: "target_record_id",
154
+ },
155
+ createdAt: "created_at",
156
+ },
157
+ },
158
+ deal: {
159
+ list: {
160
+ operation: "postV2ObjectsByObjectRecordsQuery",
161
+ path: {
162
+ object: "deals",
163
+ },
164
+ body: {
165
+ limit: 500,
166
+ sorts: [
167
+ {
168
+ direction: "desc",
169
+ attribute: "created_at",
170
+ },
171
+ ],
172
+ },
173
+ },
174
+ get: {
175
+ operation: "getV2ObjectsByObjectRecordsByRecordId",
176
+ path: {
177
+ object: "deals",
178
+ record_id: "{id}",
179
+ },
180
+ items: "data",
181
+ },
182
+ custom: {
183
+ from: "values",
184
+ typed: {
185
+ by: "attribute_type",
186
+ current: "active_until",
187
+ },
188
+ },
189
+ map: {
190
+ externalId: "id.record_id",
191
+ title: "values.name.0.value",
192
+ pipeline: {
193
+ value: "deals",
194
+ },
195
+ stage: "values.stage.0.status.id.status_id",
196
+ organization: "values.associated_company.0.target_record_id",
197
+ people: {
198
+ each: "values.associated_people",
199
+ id: "target_record_id",
200
+ },
201
+ assignee: "values.owner.0.referenced_actor_id",
202
+ amount: "values.value.0.currency_value",
203
+ currency: "values.value.0.currency_code",
204
+ url: "web_url",
205
+ createdAt: "created_at",
206
+ },
207
+ },
208
+ },
209
+ pipelines: {
210
+ deal: {
211
+ call: {
212
+ operation: "getV2ByTargetByIdentifierAttributesByAttributeStatuses",
213
+ path: {
214
+ target: "objects",
215
+ identifier: "deals",
216
+ attribute: "stage",
217
+ },
218
+ query: {
219
+ show_archived: true,
220
+ },
221
+ items: "data",
222
+ },
223
+ map: {
224
+ externalId: {
225
+ value: "deals",
226
+ },
227
+ name: {
228
+ value: "Deals",
229
+ },
230
+ },
231
+ stages: {
232
+ each: ".",
233
+ map: {
234
+ externalId: "id.status_id",
235
+ name: "title",
236
+ },
237
+ outcome: {
238
+ path: "celebration_enabled",
239
+ won: ["true"],
240
+ },
241
+ },
242
+ },
243
+ },
244
+ fields: {
245
+ organization: {
246
+ call: {
247
+ operation: "getV2ByTargetByIdentifierAttributes",
248
+ path: {
249
+ target: "objects",
250
+ identifier: "companies",
251
+ },
252
+ },
253
+ map: {
254
+ code: "api_slug",
255
+ label: "title",
256
+ type: "type",
257
+ multiple: "is_multiselect",
258
+ },
259
+ keep: {
260
+ path: "is_system_attribute",
261
+ is: false,
262
+ },
263
+ },
264
+ person: {
265
+ call: {
266
+ operation: "getV2ByTargetByIdentifierAttributes",
267
+ path: {
268
+ target: "objects",
269
+ identifier: "people",
270
+ },
271
+ },
272
+ map: {
273
+ code: "api_slug",
274
+ label: "title",
275
+ type: "type",
276
+ multiple: "is_multiselect",
277
+ },
278
+ keep: {
279
+ path: "is_system_attribute",
280
+ is: false,
281
+ },
282
+ },
283
+ deal: {
284
+ call: {
285
+ operation: "getV2ByTargetByIdentifierAttributes",
286
+ path: {
287
+ target: "objects",
288
+ identifier: "deals",
289
+ },
290
+ },
291
+ map: {
292
+ code: "api_slug",
293
+ label: "title",
294
+ type: "type",
295
+ multiple: "is_multiselect",
296
+ },
297
+ keep: {
298
+ path: "is_system_attribute",
299
+ is: false,
300
+ },
301
+ },
302
+ },
303
+ users: {
304
+ call: {
305
+ operation: "getV2WorkspaceMembers",
306
+ items: "data",
307
+ },
308
+ map: {
309
+ externalId: "id.workspace_member_id",
310
+ name: {
311
+ join: ["first_name", "last_name"],
312
+ },
313
+ email: "email_address",
314
+ active: {
315
+ path: "access_level",
316
+ map: {
317
+ admin: true,
318
+ member: true,
319
+ suspended: false,
320
+ },
321
+ },
322
+ },
323
+ },
324
+ };
325
+ import { hooks } from "../hooks.js";
326
+ export const HOOK_OPTIONS = { hooks };
327
+ export const LIVE = ["person", "organization", "user"];
328
+ //# sourceMappingURL=wirecat-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirecat-config.js","sourceRoot":"","sources":["../../src/generated/wirecat-config.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,MAAM,CAAC,MAAM,MAAM,GAAsE;IACvF,SAAS,EAAE,WAAW;IACtB,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,gBAAgB;CACvB,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAGf;IACF,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC;IACzC,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,IAAI,EAAE;gBACJ,SAAS,EAAE,mCAAmC;gBAC9C,IAAI,EAAE;oBACJ,MAAM,EAAE,WAAW;iBACpB;gBACD,IAAI,EAAE;oBACJ,KAAK,EAAE,GAAG;oBACV,KAAK,EAAE;wBACL;4BACE,SAAS,EAAE,MAAM;4BACjB,SAAS,EAAE,YAAY;yBACxB;qBACF;iBACF;aACF;YACD,GAAG,EAAE;gBACH,SAAS,EAAE,uCAAuC;gBAClD,IAAI,EAAE;oBACJ,MAAM,EAAE,WAAW;oBACnB,SAAS,EAAE,MAAM;iBAClB;gBACD,KAAK,EAAE,MAAM;aACd;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE;oBACL,EAAE,EAAE,gBAAgB;oBACpB,OAAO,EAAE,cAAc;iBACxB;aACF;YACD,MAAM,EAAE;gBACN,SAAS,EAAE,mCAAmC;gBAC9C,IAAI,EAAE;oBACJ,MAAM,EAAE,WAAW;iBACpB;gBACD,IAA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AE,KAAK,EAAE,CAAA;AAErC,MAAM,CAAC,MAAM,IAAI,GAAoD,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { CrmManifestHooks } from "@wirecat/cli-core/crm";
2
+ export declare const hooks: CrmManifestHooks;
3
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,eAAO,MAAM,KAAK,EAAE,gBAKnB,CAAA"}
package/dist/hooks.js ADDED
@@ -0,0 +1,7 @@
1
+ export const hooks = {
2
+ // A won stage is the one Attio celebrates; a lost one has only its title to tell it, "Lost" in a new workspace.
3
+ pipelines: {
4
+ deal: { outcome: (stage, _, found) => (/^lost\b/i.test(String(stage.title)) ? "lost" : found) },
5
+ },
6
+ };
7
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAqB;IACrC,gHAAgH;IAChH,SAAS,EAAE;QACT,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;KAChG;CACF,CAAA"}
@@ -0,0 +1,33 @@
1
+ import type { AppIdentity } from "@wirecat/cli-core/cli";
2
+ export declare const PACKAGE = "@wirecat/attio-cli";
3
+ export declare const IDENTITY: AppIdentity;
4
+ export declare const DESKTOP: {
5
+ command: string;
6
+ appName: string;
7
+ envPrefix: string;
8
+ description: string;
9
+ version: string;
10
+ issues?: string;
11
+ locale?: string;
12
+ contentLanguages?: readonly string[];
13
+ messenger?: boolean;
14
+ sends?: true;
15
+ requestMs?: number;
16
+ errors?: import("@wirecat/cli-core/cli").AppErrors;
17
+ docs: string;
18
+ hosts: string[];
19
+ tagline: string;
20
+ syncs: string;
21
+ signIn: {
22
+ gives: string;
23
+ asks: string;
24
+ methods: {
25
+ id: string;
26
+ label: string;
27
+ words: string[];
28
+ stdin: true;
29
+ }[];
30
+ };
31
+ };
32
+ export declare const SKILL: import("url").URL;
33
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,eAAO,MAAM,OAAO,uBAAuB,CAAA;AAE3C,eAAO,MAAM,QAAQ,EAAE,WAStB,CAAA;AAGD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBQ,CAAA;AAE5B,eAAO,MAAM,KAAK,mBAA2D,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { VERSION } from "./version.js";
2
+ export const PACKAGE = "@wirecat/attio-cli";
3
+ export const IDENTITY = {
4
+ command: "attio",
5
+ appName: "attio-cli",
6
+ envPrefix: "WCATTIO",
7
+ description: "Attio CRM: deals, people and companies for you and your AI agent",
8
+ version: VERSION,
9
+ issues: "https://github.com/WireCatLabs/attio-cli/issues/new",
10
+ messenger: false,
11
+ contentLanguages: ["en"],
12
+ };
13
+ // What `wcat` and WireCat Desktop show before the tool is installed. The bin passes it to wcatStart before anything else loads; src/wcat.ts adds the permission keys.
14
+ export const DESKTOP = {
15
+ ...IDENTITY,
16
+ docs: "https://github.com/WireCatLabs/attio-cli#readme",
17
+ // app.attio.com is only Attio's OAuth sign-in page, which the API description names; requests go to api.attio.com.
18
+ hosts: ["api.attio.com", "app.attio.com"],
19
+ tagline: "Attio deals, people and companies for your agent",
20
+ syncs: "your deals, people and companies",
21
+ signIn: {
22
+ gives: "Lets your agent read your Attio deals, people and companies and call the Attio API.",
23
+ asks: "An access token: in Attio, Workspace settings → Developers → New access token, with read access to records, " +
24
+ "object configuration and user management. Only a workspace admin can make one.",
25
+ methods: [
26
+ { id: "token", label: "Attio access token", words: ["{profile}", "session", "start", "--json"], stdin: true },
27
+ ],
28
+ },
29
+ };
30
+ export const SKILL = new URL("../skills/attio-cli/SKILL.md", import.meta.url);
31
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB,CAAA;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAgB;IACnC,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,WAAW;IACpB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,kEAAkE;IAC/E,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,qDAAqD;IAC7D,SAAS,EAAE,KAAK;IAChB,gBAAgB,EAAE,CAAC,IAAI,CAAC;CACzB,CAAA;AAED,sKAAsK;AACtK,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,QAAQ;IACX,IAAI,EAAE,iDAAiD;IACvD,mHAAmH;IACnH,KAAK,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;IACzC,OAAO,EAAE,kDAAkD;IAC3D,KAAK,EAAE,kCAAkC;IACzC,MAAM,EAAE;QACN,KAAK,EAAE,qFAAqF;QAC5F,IAAI,EACF,8GAA8G;YAC9G,gFAAgF;QAClF,OAAO,EAAE;YACP,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;SAC9G;KACF;CACyB,CAAA;AAE5B,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,8BAA8B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { IDENTITY } from "./identity.js";
2
+ export { createProgram, definition, run } from "./program.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { IDENTITY } from "./identity.js";
2
+ export { createProgram, definition, run } from "./program.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { type ProgramDefinition, type ProgramOptions, type RunOptions } from "@wirecat/cli-core/cli";
2
+ import type { Command } from "commander";
3
+ export declare const definition: () => ProgramDefinition;
4
+ export declare const createProgram: (options?: ProgramOptions) => Command;
5
+ export declare const run: (argv: string[], options?: RunOptions) => Promise<number>;
6
+ //# sourceMappingURL=program.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,EAKhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA+BxC,eAAO,MAAM,UAAU,QAAO,iBAqB5B,CAAA;AAEF,eAAO,MAAM,aAAa,aAAc,cAAc,KAAG,OAAqD,CAAA;AAE9G,eAAO,MAAM,GAAG,SAAU,MAAM,EAAE,YAAY,UAAU,KAAG,OAAO,CAAC,MAAM,CAA2C,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { join } from "node:path";
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";
5
+ import { apiCommand } from "./commands/api.js";
6
+ import { crmCommands } from "./commands/crm.js";
7
+ import { sessionCommand } from "./commands/session.js";
8
+ import { API, configuration } from "./config.js";
9
+ import { IDENTITY, PACKAGE, SKILL } from "./identity.js";
10
+ const update = appUpdate({
11
+ packageName: PACKAGE,
12
+ command: IDENTITY.command,
13
+ version: IDENTITY.version,
14
+ entry: import.meta.url,
15
+ // These two run only for a terminal in pretty output (cli-base's mayNotify), which no test of run() is.
16
+ /* v8 ignore start */
17
+ statePath: (env) => join(resolvePaths({ appName: IDENTITY.appName, prefix: IDENTITY.envPrefix, env }).state, "update-check.json"),
18
+ // biome-ignore lint/plugin/no-own-settings: the update check runs before any command exists to give baseContext
19
+ enabled: (env) => configuration.resolveSettings({}, { env, needsProfile: false }).updateCheck,
20
+ /* v8 ignore stop */
21
+ offVariables: [`${IDENTITY.envPrefix}_NO_UPDATE_CHECK`],
22
+ });
23
+ const mcpCommand = () => appMcpCommand(IDENTITY, configuration, {
24
+ name: API.service,
25
+ untrusted: ["record names and attribute values", "workspace member names"],
26
+ permissionExample: "api.objects-records-delete=deny",
27
+ skill: SKILL,
28
+ signedIn: (profile, env, keyring) => new ProfileTokenStore({ app: IDENTITY, env, keyring }).signedIn(profile),
29
+ });
30
+ export const definition = () => ({
31
+ app: IDENTITY,
32
+ // The whole object: cli-core refuses a command by its key only when it gets the permission table too.
33
+ configuration,
34
+ commands: () => [
35
+ commandsCommand(IDENTITY),
36
+ sessionCommand(),
37
+ apiCommand(),
38
+ ...crmCommands(),
39
+ appDoctorCommand(IDENTITY, configuration, { packageName: PACKAGE }),
40
+ skillCommand(IDENTITY, SKILL),
41
+ mcpCommand(),
42
+ upgradeCommand(IDENTITY, PACKAGE, (command) => ({
43
+ ...outputFor(command),
44
+ installer: () => update.installer({}),
45
+ latest: () => update.latest({}),
46
+ install: (argv) => update.runUpdate(argv, {}),
47
+ })),
48
+ configCommand(IDENTITY, configuration),
49
+ runsCommand(IDENTITY),
50
+ ],
51
+ });
52
+ export const createProgram = (options) => createSharedProgram(definition(), options);
53
+ export const run = (argv, options) => runShared(argv, definition(), options);
54
+ //# sourceMappingURL=program.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,aAAa,EACb,aAAa,IAAI,mBAAmB,EACpC,SAAS,EACT,iBAAiB,EAIjB,GAAG,IAAI,SAAS,EAChB,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,OAAO,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IACtG,aAAa;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;QACd,eAAe,CAAC,QAAQ,CAAC;QACzB,cAAc,EAAE;QAChB,UAAU,EAAE;QACZ,GAAG,WAAW,EAAE;QAChB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;QACnE,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC;QAC7B,UAAU,EAAE;QACZ,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC9C,GAAG,SAAS,CAAC,OAAO,CAAC;YACrB,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;SAC9C,CAAC,CAAC;QACH,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC;QACtC,WAAW,CAAC,QAAQ,CAAC;KACtB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAwB,EAAW,EAAE,CAAC,mBAAmB,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,CAAA;AAE9G,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,IAAc,EAAE,OAAoB,EAAmB,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,CAAA"}
@@ -0,0 +1,61 @@
1
+ import * as v from "valibot";
2
+ import type { Transport } from "./transport.js";
3
+ declare const wireComment: v.ObjectSchema<{
4
+ readonly id: v.StringSchema<undefined>;
5
+ readonly body: v.StringSchema<undefined>;
6
+ readonly authorName: v.StringSchema<undefined>;
7
+ readonly createdAt: v.StringSchema<undefined>;
8
+ }, undefined>;
9
+ /**
10
+ * The answer's own shape, in snake_case (WC-OUT-12). `answerEntity` publishes it, so `--json=id,text` and the MCP
11
+ * schema both come from here (WC-CMD-19). No wire type leaves this file (WC-ARCH-3).
12
+ */
13
+ export declare const commentSchema: v.StrictObjectSchema<{
14
+ readonly id: v.StringSchema<undefined>;
15
+ readonly text: v.StringSchema<undefined>;
16
+ readonly author: v.StringSchema<undefined>;
17
+ readonly created_at: v.StringSchema<undefined>;
18
+ }, undefined>;
19
+ export type Comment = v.InferOutput<typeof commentSchema>;
20
+ export declare const commentOf: (wire: v.InferOutput<typeof wireComment>) => Comment;
21
+ /** Every call the sample makes: a method, a path template and only the fields the service documents. */
22
+ export declare const commentsService: (api: Transport) => {
23
+ me: () => Promise<{
24
+ id: string;
25
+ name: string;
26
+ }>;
27
+ list: ({ limit, offset, author }: {
28
+ limit: number;
29
+ offset: number;
30
+ author?: string | undefined;
31
+ }) => Promise<{
32
+ items: {
33
+ id: string;
34
+ text: string;
35
+ author: string;
36
+ created_at: string;
37
+ }[];
38
+ hasMore: boolean;
39
+ }>;
40
+ show: (id: string) => Promise<{
41
+ id: string;
42
+ text: string;
43
+ author: string;
44
+ created_at: string;
45
+ }>;
46
+ create: (text: string) => Promise<{
47
+ id: string;
48
+ text: string;
49
+ author: string;
50
+ created_at: string;
51
+ }>;
52
+ update: (id: string, text: string) => Promise<{
53
+ id: string;
54
+ text: string;
55
+ author: string;
56
+ created_at: string;
57
+ }>;
58
+ };
59
+ export type CommentsService = ReturnType<typeof commentsService>;
60
+ export {};
61
+ //# sourceMappingURL=comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../src/sample/comments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAI/C,QAAA,MAAM,WAAW;;;;;aAKf,CAAA;AAIF;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;aAKxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,aAAa,CAAC,CAAA;AAEzD,eAAO,MAAM,SAAS,SAAU,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,KAAG,OAKlE,CAAA;AAEF,wGAAwG;AACxG,eAAO,MAAM,eAAe,QAAS,SAAS;IAC5C,EAAE;;;;IACF,IAAI,8BAAoC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE;;;;;;;;;IAItG,IAAI,OAAa,MAAM;;;;;;IAEvB,MAAM,SAAe,MAAM;;;;;;IAE3B,MAAM,OAAa,MAAM,QAAQ,MAAM;;;;;;CAIvC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA"}
@@ -0,0 +1,39 @@
1
+ import * as v from "valibot";
2
+ // SAMPLE: replace these shapes with your service's. Each wire name comes from the service's docs or a captured answer,
3
+ // never from memory; the strict fake in src/testing/fake-comments.ts refuses any other.
4
+ const wireComment = v.object({
5
+ id: v.string(),
6
+ body: v.string(),
7
+ authorName: v.string(),
8
+ createdAt: v.string(),
9
+ });
10
+ const wirePage = v.object({ comments: v.array(wireComment), hasMore: v.boolean() });
11
+ const wireUser = v.object({ id: v.string(), name: v.string() });
12
+ /**
13
+ * The answer's own shape, in snake_case (WC-OUT-12). `answerEntity` publishes it, so `--json=id,text` and the MCP
14
+ * schema both come from here (WC-CMD-19). No wire type leaves this file (WC-ARCH-3).
15
+ */
16
+ export const commentSchema = v.strictObject({
17
+ id: v.string(),
18
+ text: v.string(),
19
+ author: v.string(),
20
+ created_at: v.string(),
21
+ });
22
+ export const commentOf = (wire) => ({
23
+ id: wire.id,
24
+ text: wire.body,
25
+ author: wire.authorName,
26
+ created_at: wire.createdAt,
27
+ });
28
+ /** Every call the sample makes: a method, a path template and only the fields the service documents. */
29
+ export const commentsService = (api) => ({
30
+ me: () => api.send({ method: "GET", path: "me" }, wireUser),
31
+ list: async ({ limit, offset, author }) => {
32
+ const page = await api.send({ method: "GET", path: "comments", query: { limit, offset, by: author } }, wirePage);
33
+ return { items: page.comments.map(commentOf), hasMore: page.hasMore };
34
+ },
35
+ show: async (id) => commentOf(await api.send({ method: "GET", path: "comments/{id}", ids: { id } }, wireComment)),
36
+ create: async (text) => commentOf(await api.send({ method: "POST", path: "comments", body: { body: text } }, wireComment)),
37
+ update: async (id, text) => commentOf(await api.send({ method: "PATCH", path: "comments/{id}", ids: { id }, body: { body: text } }, wireComment)),
38
+ });
39
+ //# sourceMappingURL=comments.js.map