@wirecat/attio-cli 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +204 -0
  3. package/README.md +249 -2
  4. package/contracts/wirecat.json +2339 -0
  5. package/dist/bin/attio.d.ts +3 -0
  6. package/dist/bin/attio.d.ts.map +1 -0
  7. package/dist/bin/attio.js +40 -0
  8. package/dist/bin/attio.js.map +1 -0
  9. package/dist/bundle/agent-DYTWDBTT.js +37 -0
  10. package/dist/bundle/all-profiles-LZDKPHN2.js +320 -0
  11. package/dist/bundle/anthropic-BF72H77D.js +91 -0
  12. package/dist/bundle/app-server-H57FZJX5.js +249 -0
  13. package/dist/bundle/attio.js +183 -0
  14. package/dist/bundle/bun-WO77T4LG.js +169 -0
  15. package/dist/bundle/bun-sqlite-2BP7JDVO.js +76 -0
  16. package/dist/bundle/chunk-2E6JGBM5.js +1392 -0
  17. package/dist/bundle/chunk-34FJ26K2.js +54 -0
  18. package/dist/bundle/chunk-3I2FGNWO.js +23 -0
  19. package/dist/bundle/chunk-3NVOKVRY.js +42148 -0
  20. package/dist/bundle/chunk-3YFDZSM3.js +37 -0
  21. package/dist/bundle/chunk-4SMGM2Q6.js +274 -0
  22. package/dist/bundle/chunk-4STBJZR4.js +3571 -0
  23. package/dist/bundle/chunk-5K3FGXZH.js +46 -0
  24. package/dist/bundle/chunk-6ALPRBNV.js +100 -0
  25. package/dist/bundle/chunk-6NDJDDSQ.js +2000 -0
  26. package/dist/bundle/chunk-6SK3YB2B.js +218 -0
  27. package/dist/bundle/chunk-76RRELCU.js +65310 -0
  28. package/dist/bundle/chunk-7MXCUMHG.js +18 -0
  29. package/dist/bundle/chunk-7ZUOI3HY.js +73 -0
  30. package/dist/bundle/chunk-AMUONYQR.js +106 -0
  31. package/dist/bundle/chunk-ASCUOOLO.js +53 -0
  32. package/dist/bundle/chunk-BUGROVF3.js +72 -0
  33. package/dist/bundle/chunk-CHZ26CW5.js +9578 -0
  34. package/dist/bundle/chunk-CMO5ND3Y.js +794 -0
  35. package/dist/bundle/chunk-D72URWJE.js +532 -0
  36. package/dist/bundle/chunk-DF2IIO32.js +12645 -0
  37. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  38. package/dist/bundle/chunk-DQ6P3R4B.js +170 -0
  39. package/dist/bundle/chunk-DSRXCLPO.js +7 -0
  40. package/dist/bundle/chunk-EEPE3SOW.js +338 -0
  41. package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
  42. package/dist/bundle/chunk-EQGXEKSV.js +1197 -0
  43. package/dist/bundle/chunk-EQXT7KO4.js +388 -0
  44. package/dist/bundle/chunk-ERW2WOJT.js +24 -0
  45. package/dist/bundle/chunk-ESH2QGCA.js +372 -0
  46. package/dist/bundle/chunk-G3JTLVVL.js +771 -0
  47. package/dist/bundle/chunk-G6FQMVKW.js +52 -0
  48. package/dist/bundle/chunk-GBZ6JUXU.js +108 -0
  49. package/dist/bundle/chunk-GLHFJPYS.js +156 -0
  50. package/dist/bundle/chunk-GW4G5KLS.js +2333 -0
  51. package/dist/bundle/chunk-H7QDPW3D.js +78 -0
  52. package/dist/bundle/chunk-HG7FT3H3.js +319 -0
  53. package/dist/bundle/chunk-I3WS6V5H.js +188 -0
  54. package/dist/bundle/chunk-IDU4ESRZ.js +95 -0
  55. package/dist/bundle/chunk-IXCIQ7FZ.js +161 -0
  56. package/dist/bundle/chunk-J5P5VSRG.js +1233 -0
  57. package/dist/bundle/chunk-JA26HG7T.js +353 -0
  58. package/dist/bundle/chunk-JSTBW7F4.js +259 -0
  59. package/dist/bundle/chunk-KHDXRFJZ.js +185 -0
  60. package/dist/bundle/chunk-L5WS6CYZ.js +288 -0
  61. package/dist/bundle/chunk-LWJ4ZGUM.js +407 -0
  62. package/dist/bundle/chunk-MC2RQ2OB.js +38 -0
  63. package/dist/bundle/chunk-MNQACPXG.js +1332 -0
  64. package/dist/bundle/chunk-MOSH2KPD.js +358 -0
  65. package/dist/bundle/chunk-MRREDVPY.js +733 -0
  66. package/dist/bundle/chunk-MT2ZUZRA.js +1028 -0
  67. package/dist/bundle/chunk-O4A33Y54.js +29 -0
  68. package/dist/bundle/chunk-OBXDRUO4.js +63 -0
  69. package/dist/bundle/chunk-OFR3YYT6.js +6848 -0
  70. package/dist/bundle/chunk-P4U6AGWD.js +41 -0
  71. package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
  72. package/dist/bundle/chunk-PMP37KLR.js +142 -0
  73. package/dist/bundle/chunk-Q3JCUUOR.js +80 -0
  74. package/dist/bundle/chunk-Q7BSTQ3T.js +633 -0
  75. package/dist/bundle/chunk-QLHDUYGE.js +16 -0
  76. package/dist/bundle/chunk-RU5J7DWY.js +988 -0
  77. package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
  78. package/dist/bundle/chunk-S7K2XFQB.js +95 -0
  79. package/dist/bundle/chunk-SQHDE3TC.js +230 -0
  80. package/dist/bundle/chunk-TF7ZGCOK.js +76 -0
  81. package/dist/bundle/chunk-V6BTAILB.js +4072 -0
  82. package/dist/bundle/chunk-VDMIJ3JW.js +50 -0
  83. package/dist/bundle/chunk-VW5F6FK3.js +206 -0
  84. package/dist/bundle/chunk-W6F2CQZ6.js +1068 -0
  85. package/dist/bundle/chunk-WARIIYSW.js +58 -0
  86. package/dist/bundle/chunk-WK7GLHHL.js +334 -0
  87. package/dist/bundle/chunk-X5S5KUSU.js +2788 -0
  88. package/dist/bundle/chunk-X6R74TWX.js +131 -0
  89. package/dist/bundle/chunk-XQUUANA2.js +24600 -0
  90. package/dist/bundle/chunk-XXLQNHKF.js +82 -0
  91. package/dist/bundle/chunk-XXOTX4M3.js +362 -0
  92. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  93. package/dist/bundle/chunk-ZDBTYBFR.js +66 -0
  94. package/dist/bundle/chunk-ZGADZ4CH.js +557 -0
  95. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  96. package/dist/bundle/command-contract-7M6EPH3D.js +37 -0
  97. package/dist/bundle/command-server-entry-MNVPYQZ3.js +166 -0
  98. package/dist/bundle/decode-MQNKNXLK.js +297 -0
  99. package/dist/bundle/definitions-FODOIPM2.js +43379 -0
  100. package/dist/bundle/dispatch-TAQ7635E.js +411 -0
  101. package/dist/bundle/dist-EM7KLEG4.js +7577 -0
  102. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  103. package/dist/bundle/echarts-6ZSUNO4L.js +42501 -0
  104. package/dist/bundle/embed-PHCCJJ5Z.js +38 -0
  105. package/dist/bundle/embedder-WLZZQTKZ.js +111 -0
  106. package/dist/bundle/failure-MR2XVHFP.js +25 -0
  107. package/dist/bundle/first-run-64LREHSV.js +29 -0
  108. package/dist/bundle/first-screen-YSCAZIYJ.js +37 -0
  109. package/dist/bundle/instructions-22GCKNR5.js +11 -0
  110. package/dist/bundle/mcp-CNV7F2XZ.js +167 -0
  111. package/dist/bundle/meeting-combined-YX3T5WJD.js +24 -0
  112. package/dist/bundle/meeting-model-JWDTCGLZ.js +25 -0
  113. package/dist/bundle/meeting-semantic-375GYPZQ.js +22 -0
  114. package/dist/bundle/node-ITDTNRRZ.js +176 -0
  115. package/dist/bundle/node-KM3CUABH.js +2340 -0
  116. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  117. package/dist/bundle/node-sqlite-IRAGRMEZ.js +74 -0
  118. package/dist/bundle/oauth-CACOQJEL.js +20 -0
  119. package/dist/bundle/open-HU4KHKDR.js +23 -0
  120. package/dist/bundle/openai-JQUPAVKX.js +238 -0
  121. package/dist/bundle/process-QS5OHEUK.js +91 -0
  122. package/dist/bundle/program-QLCUCR76.js +33428 -0
  123. package/dist/bundle/prompt-VA5MKXJU.js +17 -0
  124. package/dist/bundle/recognize-JGA5IVKC.js +26 -0
  125. package/dist/bundle/remote-NPY2KZQ4.js +31 -0
  126. package/dist/bundle/rerank-4H2QR4XU.js +52 -0
  127. package/dist/bundle/schemas-THAI3G5S.js +21410 -0
  128. package/dist/bundle/serve-UH46SZQG.js +199 -0
  129. package/dist/bundle/server-6H7JS6SU.js +212 -0
  130. package/dist/bundle/server-SR52KBL3.js +79 -0
  131. package/dist/bundle/sqlite-runtime-EJWEUTBR.js +20 -0
  132. package/dist/bundle/state-34B6AUQZ.js +36 -0
  133. package/dist/bundle/store-3R4ILTCJ.js +177 -0
  134. package/dist/bundle/store-XSE35P3U.js +291 -0
  135. package/dist/bundle/store-maintenance-command-ABJARLI4.js +66 -0
  136. package/dist/bundle/surface-NOTIEJB5.js +65 -0
  137. package/dist/commands/api.d.ts +12 -0
  138. package/dist/commands/api.d.ts.map +1 -0
  139. package/dist/commands/api.js +27 -0
  140. package/dist/commands/api.js.map +1 -0
  141. package/dist/commands/crm.d.ts +4 -0
  142. package/dist/commands/crm.d.ts.map +1 -0
  143. package/dist/commands/crm.js +66 -0
  144. package/dist/commands/crm.js.map +1 -0
  145. package/dist/commands/session.d.ts +7 -0
  146. package/dist/commands/session.d.ts.map +1 -0
  147. package/dist/commands/session.js +22 -0
  148. package/dist/commands/session.js.map +1 -0
  149. package/dist/config.d.ts +14 -0
  150. package/dist/config.d.ts.map +1 -0
  151. package/dist/config.js +14 -0
  152. package/dist/config.js.map +1 -0
  153. package/dist/context.d.ts +37 -0
  154. package/dist/context.d.ts.map +1 -0
  155. package/dist/context.js +31 -0
  156. package/dist/context.js.map +1 -0
  157. package/dist/generated/definitions.d.ts +3 -0
  158. package/dist/generated/definitions.d.ts.map +1 -0
  159. package/dist/generated/definitions.js +43375 -0
  160. package/dist/generated/definitions.js.map +1 -0
  161. package/dist/generated/manifest.d.ts +6 -0
  162. package/dist/generated/manifest.d.ts.map +1 -0
  163. package/dist/generated/manifest.js +5158 -0
  164. package/dist/generated/manifest.js.map +1 -0
  165. package/dist/generated/schemas.d.ts +383 -0
  166. package/dist/generated/schemas.d.ts.map +1 -0
  167. package/dist/generated/schemas.js +21196 -0
  168. package/dist/generated/schemas.js.map +1 -0
  169. package/dist/generated/types.d.ts +10166 -0
  170. package/dist/generated/types.d.ts.map +1 -0
  171. package/dist/generated/types.js +5 -0
  172. package/dist/generated/types.js.map +1 -0
  173. package/dist/generated/wirecat-config.d.ts +15 -0
  174. package/dist/generated/wirecat-config.d.ts.map +1 -0
  175. package/dist/generated/wirecat-config.js +333 -0
  176. package/dist/generated/wirecat-config.js.map +1 -0
  177. package/dist/hooks.d.ts +3 -0
  178. package/dist/hooks.d.ts.map +1 -0
  179. package/dist/hooks.js +7 -0
  180. package/dist/hooks.js.map +1 -0
  181. package/dist/identity.d.ts +33 -0
  182. package/dist/identity.d.ts.map +1 -0
  183. package/dist/identity.js +31 -0
  184. package/dist/identity.js.map +1 -0
  185. package/dist/index.d.ts +3 -0
  186. package/dist/index.d.ts.map +1 -0
  187. package/dist/index.js +3 -0
  188. package/dist/index.js.map +1 -0
  189. package/dist/program.d.ts +6 -0
  190. package/dist/program.d.ts.map +1 -0
  191. package/dist/program.js +54 -0
  192. package/dist/program.js.map +1 -0
  193. package/dist/version.d.ts +2 -0
  194. package/dist/version.d.ts.map +1 -0
  195. package/dist/version.js +2 -0
  196. package/dist/version.js.map +1 -0
  197. package/dist/wcat.d.ts +3 -0
  198. package/dist/wcat.d.ts.map +1 -0
  199. package/dist/wcat.js +4 -0
  200. package/dist/wcat.js.map +1 -0
  201. package/package.json +87 -4
  202. package/skills/attio-cli/SKILL.md +58 -0
  203. package/skills/attio-cli/references/api/api-activities.md +62 -0
  204. package/skills/attio-cli/references/api/api-activity-records.md +96 -0
  205. package/skills/attio-cli/references/api/api-attributes.md +148 -0
  206. package/skills/attio-cli/references/api/api-call-recordings.md +53 -0
  207. package/skills/attio-cli/references/api/api-comments.md +36 -0
  208. package/skills/attio-cli/references/api/api-emails.md +23 -0
  209. package/skills/attio-cli/references/api/api-entries.md +127 -0
  210. package/skills/attio-cli/references/api/api-files.md +63 -0
  211. package/skills/attio-cli/references/api/api-lists.md +44 -0
  212. package/skills/attio-cli/references/api/api-meetings.md +82 -0
  213. package/skills/attio-cli/references/api/api-meta.md +8 -0
  214. package/skills/attio-cli/references/api/api-notes.md +64 -0
  215. package/skills/attio-cli/references/api/api-objects.md +55 -0
  216. package/skills/attio-cli/references/api/api-records.md +168 -0
  217. package/skills/attio-cli/references/api/api-sequences.md +15 -0
  218. package/skills/attio-cli/references/api/api-sql.md +15 -0
  219. package/skills/attio-cli/references/api/api-tasks.md +67 -0
  220. package/skills/attio-cli/references/api/api-threads.md +35 -0
  221. package/skills/attio-cli/references/api/api-transcripts.md +17 -0
  222. package/skills/attio-cli/references/api/api-views.md +133 -0
  223. package/skills/attio-cli/references/api/api-webhooks.md +62 -0
  224. package/skills/attio-cli/references/api/api-workspace-blocklist.md +39 -0
  225. package/skills/attio-cli/references/api/api-workspace-members.md +19 -0
  226. package/skills/attio-cli/references/api.md +35 -0
@@ -0,0 +1,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;CAmUlC,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,333 @@
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
+ linked: true,
43
+ search: {
44
+ operation: "postV2ObjectsByObjectRecordsQuery",
45
+ path: {
46
+ object: "companies",
47
+ },
48
+ body: {
49
+ limit: 100,
50
+ sorts: [
51
+ {
52
+ direction: "desc",
53
+ attribute: "created_at",
54
+ },
55
+ ],
56
+ filter: {
57
+ name: {
58
+ $contains: "{query}",
59
+ },
60
+ },
61
+ },
62
+ },
63
+ map: {
64
+ externalId: "id.record_id",
65
+ name: "values.name.0.value",
66
+ url: "values.domains.0.domain",
67
+ people: {
68
+ each: "values.team",
69
+ id: "target_record_id",
70
+ },
71
+ createdAt: "created_at",
72
+ },
73
+ },
74
+ person: {
75
+ list: {
76
+ operation: "postV2ObjectsByObjectRecordsQuery",
77
+ path: {
78
+ object: "people",
79
+ },
80
+ body: {
81
+ limit: 500,
82
+ sorts: [
83
+ {
84
+ direction: "desc",
85
+ attribute: "created_at",
86
+ },
87
+ ],
88
+ },
89
+ },
90
+ get: {
91
+ operation: "getV2ObjectsByObjectRecordsByRecordId",
92
+ path: {
93
+ object: "people",
94
+ record_id: "{id}",
95
+ },
96
+ items: "data",
97
+ },
98
+ custom: {
99
+ from: "values",
100
+ typed: {
101
+ by: "attribute_type",
102
+ current: "active_until",
103
+ },
104
+ },
105
+ linked: true,
106
+ search: {
107
+ operation: "postV2ObjectsByObjectRecordsQuery",
108
+ path: {
109
+ object: "people",
110
+ },
111
+ body: {
112
+ limit: 100,
113
+ sorts: [
114
+ {
115
+ direction: "desc",
116
+ attribute: "created_at",
117
+ },
118
+ ],
119
+ filter: {
120
+ $or: [
121
+ {
122
+ name: {
123
+ full_name: {
124
+ $contains: "{query}",
125
+ },
126
+ },
127
+ },
128
+ {
129
+ email_addresses: {
130
+ email_address: {
131
+ $contains: "{query}",
132
+ },
133
+ },
134
+ },
135
+ ],
136
+ },
137
+ },
138
+ },
139
+ map: {
140
+ externalId: "id.record_id",
141
+ name: "values.name.0.full_name",
142
+ firstName: "values.name.0.first_name",
143
+ lastName: "values.name.0.last_name",
144
+ emails: {
145
+ each: "values.email_addresses",
146
+ value: "email_address",
147
+ },
148
+ phones: {
149
+ each: "values.phone_numbers",
150
+ value: "phone_number",
151
+ },
152
+ position: "values.job_title.0.value",
153
+ organizations: {
154
+ each: "values.company",
155
+ id: "target_record_id",
156
+ },
157
+ createdAt: "created_at",
158
+ },
159
+ },
160
+ deal: {
161
+ list: {
162
+ operation: "postV2ObjectsByObjectRecordsQuery",
163
+ path: {
164
+ object: "deals",
165
+ },
166
+ body: {
167
+ limit: 500,
168
+ sorts: [
169
+ {
170
+ direction: "desc",
171
+ attribute: "created_at",
172
+ },
173
+ ],
174
+ },
175
+ },
176
+ get: {
177
+ operation: "getV2ObjectsByObjectRecordsByRecordId",
178
+ path: {
179
+ object: "deals",
180
+ record_id: "{id}",
181
+ },
182
+ items: "data",
183
+ },
184
+ custom: {
185
+ from: "values",
186
+ typed: {
187
+ by: "attribute_type",
188
+ current: "active_until",
189
+ },
190
+ },
191
+ optional: {
192
+ message: "the Deals object is off in this Attio workspace; an admin turns it on in its settings",
193
+ },
194
+ map: {
195
+ externalId: "id.record_id",
196
+ title: "values.name.0.value",
197
+ pipeline: {
198
+ value: "deals",
199
+ },
200
+ stage: "values.stage.0.status.id.status_id",
201
+ organization: "values.associated_company.0.target_record_id",
202
+ people: {
203
+ each: "values.associated_people",
204
+ id: "target_record_id",
205
+ },
206
+ assignee: "values.owner.0.referenced_actor_id",
207
+ amount: "values.value.0.currency_value",
208
+ currency: "values.value.0.currency_code",
209
+ url: "web_url",
210
+ createdAt: "created_at",
211
+ },
212
+ },
213
+ },
214
+ pipelines: {
215
+ deal: {
216
+ call: {
217
+ operation: "getV2ByTargetByIdentifierAttributesByAttributeStatuses",
218
+ path: {
219
+ target: "objects",
220
+ identifier: "deals",
221
+ attribute: "stage",
222
+ },
223
+ query: {
224
+ show_archived: true,
225
+ },
226
+ items: "data",
227
+ },
228
+ map: {
229
+ externalId: {
230
+ value: "deals",
231
+ },
232
+ name: {
233
+ value: "Deals",
234
+ },
235
+ },
236
+ stages: {
237
+ each: ".",
238
+ map: {
239
+ externalId: "id.status_id",
240
+ name: "title",
241
+ },
242
+ outcome: {
243
+ path: "celebration_enabled",
244
+ won: ["true"],
245
+ },
246
+ },
247
+ },
248
+ },
249
+ fields: {
250
+ organization: {
251
+ call: {
252
+ operation: "getV2ByTargetByIdentifierAttributes",
253
+ path: {
254
+ target: "objects",
255
+ identifier: "companies",
256
+ },
257
+ },
258
+ map: {
259
+ code: "api_slug",
260
+ label: "title",
261
+ type: "type",
262
+ multiple: "is_multiselect",
263
+ },
264
+ keep: {
265
+ path: "is_system_attribute",
266
+ is: false,
267
+ },
268
+ },
269
+ person: {
270
+ call: {
271
+ operation: "getV2ByTargetByIdentifierAttributes",
272
+ path: {
273
+ target: "objects",
274
+ identifier: "people",
275
+ },
276
+ },
277
+ map: {
278
+ code: "api_slug",
279
+ label: "title",
280
+ type: "type",
281
+ multiple: "is_multiselect",
282
+ },
283
+ keep: {
284
+ path: "is_system_attribute",
285
+ is: false,
286
+ },
287
+ },
288
+ deal: {
289
+ call: {
290
+ operation: "getV2ByTargetByIdentifierAttributes",
291
+ path: {
292
+ target: "objects",
293
+ identifier: "deals",
294
+ },
295
+ },
296
+ map: {
297
+ code: "api_slug",
298
+ label: "title",
299
+ type: "type",
300
+ multiple: "is_multiselect",
301
+ },
302
+ keep: {
303
+ path: "is_system_attribute",
304
+ is: false,
305
+ },
306
+ },
307
+ },
308
+ users: {
309
+ call: {
310
+ operation: "getV2WorkspaceMembers",
311
+ items: "data",
312
+ },
313
+ map: {
314
+ externalId: "id.workspace_member_id",
315
+ name: {
316
+ join: ["first_name", "last_name"],
317
+ },
318
+ email: "email_address",
319
+ active: {
320
+ path: "access_level",
321
+ map: {
322
+ admin: true,
323
+ member: true,
324
+ suspended: false,
325
+ },
326
+ },
327
+ },
328
+ },
329
+ };
330
+ import { hooks } from "../hooks.js";
331
+ export const HOOK_OPTIONS = { hooks };
332
+ export const LIVE = ["person", "organization", "user"];
333
+ //# 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,M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EAAE,OAAO;gBACd,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,gBAAgB;aAC3B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,qBAAqB;gBAC3B,EAAE,EAAE,KAAK;aACV;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,SAAS,EAAE,qCAAqC;gBAChD,IAAI,EAAE;oBACJ,MAAM,EAAE,SAAS;oBACjB,UAAU,EAAE,OAAO;iBACpB;aACF;YACD,GAAG,EAAE;gBACH,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,gBAAgB;aAC3B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,qBAAqB;gBAC3B,EAAE,EAAE,KAAK;aACV;SACF;KACF;IACD,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,SAAS,EAAE,uBAAuB;YAClC,KAAK,EAAE,MAAM;SACd;QACD,GAAG,EAAE;YACH,UAAU,EAAE,wBAAwB;YACpC,IAAI,EAAE;gBACJ,IAAI,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;aAClC;YACD,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE;gBACN,IAAI,EAAE,cAAc;gBACpB,GAAG,EAAE;oBACH,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,IAAI;oBACZ,SAAS,EAAE,KAAK;iBACjB;aACF;SACF;KACF;CACF,CAAA;AAED,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,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 and their clients",
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,8BAA8B;IACrC,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,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAExD,MAAM,MAAM,GAAG,SAAS,CAAC;IACvB,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,QAAQ,CAAC,OAAO;IACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;IACzB,KAAK,EAAE,OAAO,IAAI,CAAC,GAAG;IACtB,wGAAwG;IACxG,qBAAqB;I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,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,2 @@
1
+ export declare const VERSION = "0.2.0";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
@@ -0,0 +1,2 @@
1
+ export const VERSION = "0.2.0";
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
package/dist/wcat.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { ManifestIdentity } from "@wirecat/cli-base/wcat/manifest";
2
+ export declare const WCAT: ManifestIdentity;
3
+ //# sourceMappingURL=wcat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wcat.d.ts","sourceRoot":"","sources":["../src/wcat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAIvE,eAAO,MAAM,IAAI,EAAE,gBAAkE,CAAA"}
package/dist/wcat.js ADDED
@@ -0,0 +1,4 @@
1
+ import { permissions } from "./config.js";
2
+ import { DESKTOP } from "./identity.js";
3
+ export const WCAT = { ...DESKTOP, permissionOf: permissions.keyOf };
4
+ //# sourceMappingURL=wcat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wcat.js","sourceRoot":"","sources":["../src/wcat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,CAAC,MAAM,IAAI,GAAqB,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,KAAK,EAAE,CAAA"}