@wirecat/amo-cli 0.4.0 → 0.6.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 (173) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/contracts/wirecat.json +2 -1
  3. package/dist/amo/allow-list.d.ts +1 -1
  4. package/dist/amo/allow-list.d.ts.map +1 -1
  5. package/dist/amo/oauth.d.ts.map +1 -1
  6. package/dist/amo/oauth.js +3 -4
  7. package/dist/amo/oauth.js.map +1 -1
  8. package/dist/amo/operation.d.ts +1 -1
  9. package/dist/amo/operation.d.ts.map +1 -1
  10. package/dist/amo/transport.d.ts.map +1 -1
  11. package/dist/amo/transport.js +3 -6
  12. package/dist/amo/transport.js.map +1 -1
  13. package/dist/bin/amo.js +2 -2
  14. package/dist/bundle/agent-VVACEKSX.js +42 -0
  15. package/dist/bundle/{all-profiles-PRNXEZRH.js → all-profiles-QNUKL4NA.js} +11 -11
  16. package/dist/bundle/amo.js +28 -28
  17. package/dist/bundle/{anthropic-FDI24DU2.js → anthropic-PQN6MNP7.js} +5 -5
  18. package/dist/bundle/{app-server-WAKJVDLN.js → app-server-Q2QEA7GP.js} +71 -69
  19. package/dist/bundle/areas-27FRPBF3.js +71 -0
  20. package/dist/bundle/{bun-YPXUXMBI.js → bun-F4M4KCNA.js} +2 -2
  21. package/dist/bundle/{bun-sqlite-UBQ5M47X.js → bun-sqlite-P5IDBDVR.js} +6 -6
  22. package/dist/bundle/{chunk-G3LAYJJJ.js → chunk-22KAQPX7.js} +4 -4
  23. package/dist/bundle/{chunk-XEYT2EQT.js → chunk-2JGNMZ55.js} +6 -6
  24. package/dist/bundle/{chunk-PL7TNKAY.js → chunk-2VDHC7QO.js} +2 -2
  25. package/dist/bundle/{chunk-BCIZAUDV.js → chunk-34ZOMVUK.js} +9 -9
  26. package/dist/bundle/{chunk-SHOSFYI7.js → chunk-3J3EDSXF.js} +20 -84
  27. package/dist/bundle/{chunk-ELAKOEIO.js → chunk-3TYER5IK.js} +14 -6
  28. package/dist/bundle/{chunk-NFWD4QX3.js → chunk-5NGLCDYQ.js} +2 -2
  29. package/dist/bundle/{chunk-NKYWQTS2.js → chunk-5SQTHOBI.js} +270 -252
  30. package/dist/bundle/{chunk-Z2B3VNRI.js → chunk-6GE36KUE.js} +11 -11
  31. package/dist/bundle/{chunk-GQKEMBM6.js → chunk-6GZKY3HV.js} +121 -36
  32. package/dist/bundle/{chunk-M54YKD3I.js → chunk-6OV2TRGF.js} +7 -7
  33. package/dist/bundle/{chunk-MW7HUD6R.js → chunk-7CPIZFOE.js} +9 -9
  34. package/dist/bundle/{chunk-TIR3AB35.js → chunk-A5K2NU3K.js} +913 -795
  35. package/dist/bundle/{chunk-5HZMXHRH.js → chunk-AEC4H5WZ.js} +6 -6
  36. package/dist/bundle/{chunk-WAFB3IWJ.js → chunk-APBEDWOE.js} +5 -5
  37. package/dist/bundle/{chunk-V5SETIQK.js → chunk-AQ5RIOUE.js} +1 -1
  38. package/dist/bundle/{chunk-RQPB2BSH.js → chunk-B7L5MSRP.js} +2 -2
  39. package/dist/bundle/{chunk-HZZ56JO7.js → chunk-C7JPYWYQ.js} +1 -1
  40. package/dist/bundle/{chunk-KRD375P7.js → chunk-DIZEHPS6.js} +39 -30
  41. package/dist/bundle/{chunk-TCSVW7BA.js → chunk-DNCLQPOM.js} +1 -1
  42. package/dist/bundle/{chunk-WASBOYI2.js → chunk-DPV53EZC.js} +4 -4
  43. package/dist/bundle/{chunk-HDZNSOV5.js → chunk-DUPCDJ3W.js} +14 -10
  44. package/dist/bundle/{chunk-YHVHDRED.js → chunk-DWT24UVR.js} +6 -6
  45. package/dist/bundle/chunk-DXWJORSY.js +1703 -0
  46. package/dist/bundle/{chunk-E3EWS6DF.js → chunk-DY3PLWIH.js} +6 -6
  47. package/dist/bundle/{chunk-A4W7J6VN.js → chunk-DYWHAJRK.js} +37 -190
  48. package/dist/bundle/{chunk-LAR2DLTI.js → chunk-EXRM3ML4.js} +4 -4
  49. package/dist/bundle/{chunk-ZJC2XJQC.js → chunk-FFER7KJI.js} +13 -13
  50. package/dist/bundle/{chunk-V2QWX6B3.js → chunk-FIP2DG7W.js} +3 -3
  51. package/dist/bundle/{chunk-5II6TAJE.js → chunk-FTH6WGYO.js} +1 -1
  52. package/dist/bundle/{chunk-2AIG2SSJ.js → chunk-FWRLGIF6.js} +1668 -169
  53. package/dist/bundle/{chunk-DWD3KDJA.js → chunk-FYOPPKAN.js} +1 -1
  54. package/dist/bundle/{chunk-ABMPZL2P.js → chunk-G3N2RHGF.js} +19 -15
  55. package/dist/bundle/{chunk-GBQ76X6T.js → chunk-G46PNDWL.js} +2 -2
  56. package/dist/bundle/{chunk-VG26HDKH.js → chunk-G6NY7LFB.js} +4 -4
  57. package/dist/bundle/{chunk-5SJEJYQZ.js → chunk-GOCMJBEE.js} +3 -3
  58. package/dist/bundle/{chunk-3K6T2G52.js → chunk-GRGCZSES.js} +6 -6
  59. package/dist/bundle/{chunk-4PQECIU2.js → chunk-GVSKLZRD.js} +2 -2
  60. package/dist/bundle/{chunk-UEN5NWNW.js → chunk-GZ7WBU5Y.js} +1 -1
  61. package/dist/bundle/{chunk-KQZTX4LM.js → chunk-HN2LCLGT.js} +19 -19
  62. package/dist/bundle/{chunk-SFZVMKB6.js → chunk-HO4JGD4Q.js} +1 -1
  63. package/dist/bundle/{chunk-SZX7EPPY.js → chunk-HOF7GQWW.js} +4 -4
  64. package/dist/bundle/chunk-HUAHLO6N.js +29 -0
  65. package/dist/bundle/chunk-IDCZ4LWS.js +150 -0
  66. package/dist/bundle/{chunk-23AQD7JU.js → chunk-IN3VL7UU.js} +18 -17
  67. package/dist/bundle/{chunk-QGFURWEP.js → chunk-ISQ23VKV.js} +8 -1
  68. package/dist/bundle/{chunk-PLU2IQXC.js → chunk-JVBCQHCS.js} +3 -3
  69. package/dist/bundle/{chunk-VEFAYLKX.js → chunk-K5W7YEHB.js} +187 -114
  70. package/dist/bundle/{chunk-PIOR6PIO.js → chunk-KAFSS35C.js} +2 -2
  71. package/dist/bundle/{chunk-VG2ERHFJ.js → chunk-KLRCTMES.js} +3 -3
  72. package/dist/bundle/{chunk-KORZEYZN.js → chunk-KYRYD4CR.js} +1 -1
  73. package/dist/bundle/{chunk-FEUNZG7U.js → chunk-LBZSURLL.js} +38 -38
  74. package/dist/bundle/{chunk-EAX5RO7S.js → chunk-LC7ZD2RW.js} +1 -1
  75. package/dist/bundle/{chunk-O3WE5IGP.js → chunk-LH6FJYMO.js} +6 -6
  76. package/dist/bundle/{chunk-DWA5TZMP.js → chunk-LJKINNWC.js} +8 -8
  77. package/dist/bundle/{chunk-U46RNOEQ.js → chunk-M36XP74N.js} +3 -3
  78. package/dist/bundle/chunk-MNPGZCKE.js +361 -0
  79. package/dist/bundle/{chunk-WR2FPZTE.js → chunk-MRPMORLH.js} +8 -8
  80. package/dist/bundle/{chunk-CEBX63XY.js → chunk-NNREILWP.js} +8 -8
  81. package/dist/bundle/chunk-NSOY4FMN.js +159 -0
  82. package/dist/bundle/{chunk-SNBYFQHT.js → chunk-OEEWVKJX.js} +1 -1
  83. package/dist/bundle/{chunk-YREKMP24.js → chunk-OGJFDKDL.js} +4 -4
  84. package/dist/bundle/chunk-PATZAYFZ.js +453 -0
  85. package/dist/bundle/chunk-PCR6GFNP.js +1171 -0
  86. package/dist/bundle/{chunk-3PCVQCCV.js → chunk-Q4MH2O5E.js} +2 -2
  87. package/dist/bundle/{chunk-7OVTUADG.js → chunk-QFOP3KUP.js} +8 -8
  88. package/dist/bundle/{chunk-YFRTEJ6V.js → chunk-QQRJEWKB.js} +7 -7
  89. package/dist/bundle/{chunk-GJBOZAUD.js → chunk-RNWUCAJJ.js} +3 -3
  90. package/dist/bundle/{chunk-AP3CWDRK.js → chunk-S6JG4YUH.js} +2 -2
  91. package/dist/bundle/{chunk-KBAOJISR.js → chunk-SDVUGWD7.js} +7 -7
  92. package/dist/bundle/{chunk-WEWJA42Q.js → chunk-SEFE6PGL.js} +12 -12
  93. package/dist/bundle/{chunk-6PILR4AX.js → chunk-SWCJM3YD.js} +2 -2
  94. package/dist/bundle/{chunk-TEGQVVCZ.js → chunk-SYRDEMQE.js} +16709 -13048
  95. package/dist/bundle/{chunk-NXNUCGGO.js → chunk-SYYQZDHJ.js} +6 -6
  96. package/dist/bundle/{chunk-SMM7GS4Q.js → chunk-T3W4V4A6.js} +1 -1
  97. package/dist/bundle/{chunk-EBNCUQLV.js → chunk-TCT5D2X2.js} +1 -1
  98. package/dist/bundle/{chunk-ASU63X5C.js → chunk-TES7MB6I.js} +2 -2
  99. package/dist/bundle/{chunk-745FMNI5.js → chunk-TXDR6YSF.js} +1 -1
  100. package/dist/bundle/{chunk-3WG4MTQI.js → chunk-TY7NDMFY.js} +1 -1
  101. package/dist/bundle/{chunk-AN6IJYH3.js → chunk-U6XPWCWM.js} +5 -5
  102. package/dist/bundle/{chunk-LZ4IWN43.js → chunk-UFKC7TIX.js} +1617 -1990
  103. package/dist/bundle/{chunk-IPNIF5JE.js → chunk-UNWF3TH5.js} +4 -4
  104. package/dist/bundle/{chunk-6QMSKJB4.js → chunk-W3BOR6AT.js} +8 -8
  105. package/dist/bundle/{chunk-SCMB4LI6.js → chunk-WIHN3ELW.js} +19 -19
  106. package/dist/bundle/{chunk-UCM7C773.js → chunk-X76RS6JO.js} +178 -61
  107. package/dist/bundle/{chunk-GMHRPX5M.js → chunk-YF3S26TS.js} +61 -61
  108. package/dist/bundle/{chunk-ZKRWNL4T.js → chunk-ZCQ4H7CA.js} +2 -2
  109. package/dist/bundle/{chunk-CYHIM5SL.js → chunk-ZOZV32IR.js} +3 -3
  110. package/dist/bundle/{chunk-OYMHPQF7.js → chunk-ZTKHXDEU.js} +4 -4
  111. package/dist/bundle/{cli-QDPKC2HJ.js → cli-EAD3WZLR.js} +119 -105
  112. package/dist/bundle/command-contract-SMEJ2ICG.js +40 -0
  113. package/dist/bundle/{command-server-entry-TX7WNN7G.js → command-server-entry-YTZP6I4T.js} +29 -28
  114. package/dist/bundle/{decode-BLPC7OYE.js → decode-57BE5OBT.js} +5 -5
  115. package/dist/bundle/{dispatch-5JUT55CS.js → dispatch-56FECRCU.js} +8 -8
  116. package/dist/bundle/{echarts-54D3FOCL.js → echarts-QMAA7HH5.js} +2 -2
  117. package/dist/bundle/{embed-O7KMDYM7.js → embed-NFGFYUO4.js} +6 -6
  118. package/dist/bundle/{embedder-4PE67CLX.js → embedder-SRBOJMXX.js} +9 -9
  119. package/dist/bundle/{failure-NNQYTB3Z.js → failure-WDSX6H3B.js} +2 -2
  120. package/dist/bundle/{first-run-EAU5SHBI.js → first-run-HWRUL2GR.js} +12 -12
  121. package/dist/bundle/first-screen-ATN4D3FQ.js +41 -0
  122. package/dist/bundle/{instructions-ONXP5DZQ.js → instructions-4H7UREH2.js} +1 -1
  123. package/dist/bundle/{mcp-ZNULRPZ4.js → mcp-5HFPWC3W.js} +2 -2
  124. package/dist/bundle/meeting-combined-BGDEHCWY.js +26 -0
  125. package/dist/bundle/{meeting-model-FWIZRKVN.js → meeting-model-WWGVRXPL.js} +11 -11
  126. package/dist/bundle/{meeting-semantic-M4YVJ57W.js → meeting-semantic-ZQ47BL2Z.js} +6 -6
  127. package/dist/bundle/{node-UTQCYQF5.js → node-P3PUHKYH.js} +2 -2
  128. package/dist/bundle/{node-sqlite-APJG6MGL.js → node-sqlite-JOTSNH3P.js} +7 -7
  129. package/dist/bundle/{oauth-TY7RMIBL.js → oauth-XPSAL6VO.js} +7 -7
  130. package/dist/bundle/{open-WDVEQL75.js → open-PO52FVA5.js} +5 -5
  131. package/dist/bundle/{openai-H5UJHSEZ.js → openai-WITYLMY5.js} +15 -15
  132. package/dist/bundle/{process-MGMXXPMY.js → process-AFIXYXWL.js} +1 -1
  133. package/dist/bundle/{program-IF36C6VR.js → program-JODTZNBZ.js} +331 -196
  134. package/dist/bundle/{prompt-4RLIWLMF.js → prompt-XORLAXHY.js} +5 -5
  135. package/dist/bundle/{recognize-UIRTMWM4.js → recognize-JKMZHDYS.js} +4 -4
  136. package/dist/bundle/{remote-L3MNWZQK.js → remote-3IMEJTEH.js} +9 -9
  137. package/dist/bundle/{rerank-F4KZQTY6.js → rerank-3F2E6NNN.js} +7 -7
  138. package/dist/bundle/{serve-37AUYTWS.js → serve-6BWU3NMB.js} +9 -9
  139. package/dist/bundle/{server-UBG676ZJ.js → server-GPSB5WFG.js} +63 -61
  140. package/dist/bundle/server-HMCC64ZU.js +88 -0
  141. package/dist/bundle/source-E72OS27D.js +47 -0
  142. package/dist/bundle/{sqlite-runtime-CI3RW7VA.js → sqlite-runtime-YHYQDUXE.js} +6 -6
  143. package/dist/bundle/{state-JOHLSLUO.js → state-R7W4U6T4.js} +6 -6
  144. package/dist/bundle/{store-OSOUXBYL.js → store-HTVRL7FB.js} +56 -43
  145. package/dist/bundle/store-IWW6U6QN.js +34 -0
  146. package/dist/bundle/{store-2MBG4IUS.js → store-TBZ3ZS6H.js} +25 -23
  147. package/dist/bundle/store-maintenance-command-CJM2VLMW.js +75 -0
  148. package/dist/bundle/surface-5GBWNYBE.js +74 -0
  149. package/dist/bundle/writer-TW2Q55VJ.js +49 -0
  150. package/dist/commands/crm-shared.js +1 -1
  151. package/dist/commands/crm-shared.js.map +1 -1
  152. package/dist/commands/session.d.ts.map +1 -1
  153. package/dist/commands/session.js +1 -6
  154. package/dist/commands/session.js.map +1 -1
  155. package/dist/version.d.ts +1 -1
  156. package/dist/version.js +1 -1
  157. package/package.json +4 -4
  158. package/skills/amo-cli/SKILL.md +6 -0
  159. package/dist/bundle/agent-43BMVBX2.js +0 -40
  160. package/dist/bundle/chunk-2UJ7ZZZC.js +0 -79
  161. package/dist/bundle/chunk-FQRP6JWX.js +0 -29
  162. package/dist/bundle/chunk-IBEHYGG6.js +0 -721
  163. package/dist/bundle/chunk-M33XHJTM.js +0 -1266
  164. package/dist/bundle/chunk-S6DTLAOB.js +0 -761
  165. package/dist/bundle/command-contract-KWNCP3MQ.js +0 -39
  166. package/dist/bundle/first-screen-APSNGZYZ.js +0 -39
  167. package/dist/bundle/meeting-combined-W2XIYXFU.js +0 -24
  168. package/dist/bundle/server-CRF4QSZR.js +0 -86
  169. package/dist/bundle/source-Z7GH7T4B.js +0 -44
  170. package/dist/bundle/store-SNW6U32Y.js +0 -34
  171. package/dist/bundle/store-maintenance-command-W7V54SLT.js +0 -73
  172. package/dist/bundle/surface-ESJS2FUI.js +0 -72
  173. package/dist/bundle/writer-BJDQMKUV.js +0 -46
@@ -0,0 +1,150 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-S6JG4YUH.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/tasks/model.js
11
+ var TASK_KINDS = ["question", "request", "mention", "promise"];
12
+ var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
13
+ var CLOSED_STATES = ["done", "dismissed"];
14
+ var TASK_ORIGINS = ["rule", "agent", "owner"];
15
+ var TASK_VERDICTS = ["useful", "not_useful"];
16
+ var isClosedState = /* @__PURE__ */ __name((state) => CLOSED_STATES.includes(state), "isClosedState");
17
+ function closeTask(task, state, by, at, reason) {
18
+ if (isClosedState(task.state))
19
+ throw new CliError("validation_error", `task ${task.id} is already ${task.state}`, { reason: "task.closed" });
20
+ const { claimedBy: _by, claimedUntil: _until, ...unclaimed } = task;
21
+ return { ...unclaimed, state, closedAt: at, closedBy: by, ...reason === void 0 ? {} : { reason } };
22
+ }
23
+ __name(closeTask, "closeTask");
24
+
25
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/tasks/priority.js
26
+ var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
27
+ var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
28
+ var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
29
+ var priorityLabel = /* @__PURE__ */ __name((score) => score === null ? null : PRIORITY_LABELS[Math.min(3, Math.max(0, Math.floor(score * 4)))], "priorityLabel");
30
+ var priorityBand = /* @__PURE__ */ __name((label) => {
31
+ const at = PRIORITY_LABELS.indexOf(label);
32
+ return { from: at / 4, to: (at + 1) / 4 };
33
+ }, "priorityBand");
34
+ var legacyPriority = /* @__PURE__ */ __name((score) => score === null ? null : score < 0.125 ? 4 : 3 - PRIORITY_LABELS.indexOf(priorityLabel(score)), "legacyPriority");
35
+ var checkedScore = /* @__PURE__ */ __name((score) => {
36
+ if (!Number.isFinite(score) || score < 0 || score > 1)
37
+ throw new CliError("validation_error", "a priority score is 0 to 1");
38
+ return score;
39
+ }, "checkedScore");
40
+ var priorityOf = /* @__PURE__ */ __name((value) => {
41
+ const word = value.trim().toLowerCase();
42
+ if (word === "none")
43
+ return null;
44
+ if (PRIORITY_LABELS.includes(word))
45
+ return MIDDLE[word];
46
+ if (/^[0-4]$/.test(word))
47
+ return LEGACY_PRIORITY_SCORES[Number(word)];
48
+ if (/^(0?\.\d+|[01]\.\d*)$/.test(word) && Number(word) <= 1)
49
+ return Number(word);
50
+ throw new CliError("validation_error", `a priority is ${PRIORITY_LABELS.join(", ")}, none, or a score from 0.0 to 1.0 with its decimal point; 0 (urgent) \u2026 4 (low) still work as critical, high, medium, low, low`);
51
+ }, "priorityOf");
52
+ var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
53
+
54
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/tasks/service.js
55
+ function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
56
+ async function find(id) {
57
+ const task = await store.get(id);
58
+ if (!task)
59
+ throw new CliError("not_found", `no task ${id}`);
60
+ return task;
61
+ }
62
+ __name(find, "find");
63
+ return {
64
+ /**
65
+ * A rule never makes a second task from a source it has seen, whatever that task's state, so a
66
+ * dismissed one stays dismissed — nor from a message attached or merged into a task. A person or an agent may
67
+ * add a task of another kind to it. A task a rule opens goes through the host's duplicate check.
68
+ */
69
+ async add(input) {
70
+ const rule = input.origin === "rule";
71
+ const existing = await store.findBySource(input.account, input.source, rule ? { linked: true } : void 0);
72
+ const same = rule ? existing[0] : existing.find((task2) => task2.kind === input.kind);
73
+ if (same)
74
+ return { task: same, created: false };
75
+ const task = { ...input, id: newId(), state: "open", createdAt: now() };
76
+ await store.insert(task);
77
+ if (!rule || !store.reviewDuplicates)
78
+ return { task, created: true };
79
+ return { task, created: true, review: await store.reviewDuplicates(task.id) };
80
+ },
81
+ async close(id, { as, by, reason }) {
82
+ const task = closeTask(await find(id), as, by, now(), reason);
83
+ await store.update(task);
84
+ return task;
85
+ },
86
+ list: /* @__PURE__ */ __name((filter = {}) => store.list(filter), "list"),
87
+ async stats(filter = {}) {
88
+ const byGroup = /* @__PURE__ */ new Map();
89
+ for (const task of await store.list(filter))
90
+ byGroup.set(task.group, [...byGroup.get(task.group) ?? [], task]);
91
+ return [...byGroup].map(([group, tasks]) => {
92
+ const open = tasks.filter((task) => !isClosedState(task.state));
93
+ const closeMs = tasks.flatMap((task) => task.closedAt ? [task.closedAt.getTime() - task.createdAt.getTime()] : []);
94
+ const oldestOpenAt = open.map((task) => task.createdAt).sort((a, b) => a.getTime() - b.getTime())[0];
95
+ return {
96
+ group,
97
+ open: open.length,
98
+ ...oldestOpenAt ? { oldestOpenAt } : {},
99
+ ...closeMs.length > 0 ? { medianCloseMs: median(closeMs) } : {}
100
+ };
101
+ });
102
+ }
103
+ };
104
+ }
105
+ __name(createTaskService, "createTaskService");
106
+ function median(values) {
107
+ const sorted = [...values].sort((a, b) => a - b);
108
+ const middle = Math.floor(sorted.length / 2);
109
+ const upper = sorted[middle] ?? 0;
110
+ return sorted.length % 2 === 1 ? upper : ((sorted[middle - 1] ?? 0) + upper) / 2;
111
+ }
112
+ __name(median, "median");
113
+
114
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/tasks/store.js
115
+ function matches(task, filter) {
116
+ return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
117
+ }
118
+ __name(matches, "matches");
119
+
120
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
121
+ var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
122
+ var MEMORY_KINDS = ["summary", "digest", "preference"];
123
+ var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
124
+ var MEMORY_SCOPES = ["personal", "work"];
125
+ var WORK_TASK_TYPES = ["bug", "feature", "chore"];
126
+ var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
127
+
128
+ export {
129
+ TASK_KINDS,
130
+ TASK_STATES,
131
+ CLOSED_STATES,
132
+ TASK_ORIGINS,
133
+ TASK_VERDICTS,
134
+ isClosedState,
135
+ PRIORITY_LABELS,
136
+ priorityLabel,
137
+ priorityBand,
138
+ legacyPriority,
139
+ checkedScore,
140
+ priorityOf,
141
+ priorityOption,
142
+ createTaskService,
143
+ matches,
144
+ FACT_STATUSES,
145
+ MEMORY_KINDS,
146
+ MEMORY_STATUSES,
147
+ MEMORY_SCOPES,
148
+ WORK_TASK_TYPES,
149
+ TASK_TYPES
150
+ };
@@ -5,16 +5,16 @@ import {
5
5
  UNTRUSTED_NEUTRAL,
6
6
  agentArguments,
7
7
  agentJson
8
- } from "./chunk-DWA5TZMP.js";
8
+ } from "./chunk-LJKINNWC.js";
9
9
  import {
10
10
  onlineDeps,
11
11
  refuseLacking,
12
12
  servicesFor,
13
13
  storeModeDeps
14
- } from "./chunk-TIR3AB35.js";
14
+ } from "./chunk-A5K2NU3K.js";
15
15
  import {
16
16
  callerOf
17
- } from "./chunk-3PCVQCCV.js";
17
+ } from "./chunk-Q4MH2O5E.js";
18
18
  import {
19
19
  DEFAULT_OUTPUT_BYTES,
20
20
  ENTITIES,
@@ -27,35 +27,36 @@ import {
27
27
  refuseStoreChange,
28
28
  sealed,
29
29
  startRecording
30
- } from "./chunk-NKYWQTS2.js";
30
+ } from "./chunk-5SQTHOBI.js";
31
31
  import {
32
32
  currentCaller,
33
33
  keepsSuccess,
34
34
  runContextOf,
35
35
  withCaller
36
- } from "./chunk-M54YKD3I.js";
36
+ } from "./chunk-6OV2TRGF.js";
37
37
  import {
38
38
  inRun,
39
39
  newRunId
40
- } from "./chunk-M33XHJTM.js";
40
+ } from "./chunk-PCR6GFNP.js";
41
41
  import {
42
+ storeBusy,
42
43
  storeDamaged
43
- } from "./chunk-ELAKOEIO.js";
44
+ } from "./chunk-3TYER5IK.js";
44
45
  import {
45
46
  failureContext
46
- } from "./chunk-UCM7C773.js";
47
+ } from "./chunk-X76RS6JO.js";
47
48
  import {
48
49
  fetchesAt,
49
50
  keyForCommand,
50
51
  levelFor,
51
52
  readKeysForCommand
52
- } from "./chunk-KBAOJISR.js";
53
+ } from "./chunk-SDVUGWD7.js";
53
54
  import {
54
55
  MAX_BUFFERED_INPUT
55
- } from "./chunk-ASU63X5C.js";
56
+ } from "./chunk-TES7MB6I.js";
56
57
  import {
57
58
  traceIdOf
58
- } from "./chunk-SCMB4LI6.js";
59
+ } from "./chunk-WIHN3ELW.js";
59
60
  import {
60
61
  array,
61
62
  boolean,
@@ -82,19 +83,19 @@ import {
82
83
  toJsonSchema,
83
84
  toStandardJsonSchema,
84
85
  unknown
85
- } from "./chunk-7OVTUADG.js";
86
+ } from "./chunk-QFOP3KUP.js";
86
87
  import {
87
88
  CliError,
88
89
  errorCodes
89
- } from "./chunk-AP3CWDRK.js";
90
+ } from "./chunk-S6JG4YUH.js";
90
91
  import {
91
92
  __name
92
93
  } from "./chunk-ZVVMGPBJ.js";
93
94
 
94
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/mcp/surface.js
95
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/mcp/surface.js
95
96
  import { randomUUID } from "node:crypto";
96
97
 
97
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/mcp/tool.js
98
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/mcp/tool.js
98
99
  var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
99
100
  var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
100
101
  var message = pipe(
@@ -350,10 +351,10 @@ var answered = /* @__PURE__ */ __name((answer, maxBytes = DEFAULT_OUTPUT_BYTES,
350
351
  var failed = /* @__PURE__ */ __name((error, errors, effects) => {
351
352
  const judged = judgedEffects(effects);
352
353
  const context = { ...failureContext(errors), ...judged ? { effects: judged } : {} };
353
- return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(storeDamaged(error), context))));
354
+ return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(storeBusy(storeDamaged(error)), context))));
354
355
  }, "failed");
355
356
 
356
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/mcp/surface.js
357
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/mcp/surface.js
357
358
  var MATCHES = 8;
358
359
  var ANSWER = answerSchema();
359
360
  var agentAnswer = /* @__PURE__ */ __name((prefix, writes) => {
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
 
4
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/ports/wirecat-tools.js
4
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/ports/wirecat-tools.js
5
5
  var WIRECAT_TOOLS = [
6
6
  {
7
7
  command: "tg",
@@ -74,6 +74,13 @@ var WIRECAT_TOOLS = [
74
74
  package: "@wirecat/amo-cli",
75
75
  does: "amoCRM and Kommo: deals, contacts and companies, searchable with your other WireCat data"
76
76
  },
77
+ {
78
+ command: "attio",
79
+ appName: "attio-cli",
80
+ envPrefix: "WCATTIO",
81
+ package: "@wirecat/attio-cli",
82
+ does: "Attio CRM: deals, people and companies, searchable with your other WireCat data"
83
+ },
77
84
  {
78
85
  command: "pbx",
79
86
  appName: "asterisk-cli",
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  timezoneOf,
5
5
  zonedMoment
6
- } from "./chunk-GMHRPX5M.js";
6
+ } from "./chunk-YF3S26TS.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-AP3CWDRK.js";
9
+ } from "./chunk-S6JG4YUH.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/domain/moment.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/moment.js
15
15
  var calendarMoment = /* @__PURE__ */ __name((wanted, flag, { zone, end = false } = {}) => {
16
16
  try {
17
17
  return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });