@wirecat/zoom-cli 0.70.0 → 0.72.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 (180) hide show
  1. package/dist/answer-entities.d.ts +2 -0
  2. package/dist/answer-entities.d.ts.map +1 -1
  3. package/dist/answers.d.ts +56 -0
  4. package/dist/answers.d.ts.map +1 -1
  5. package/dist/bin/zm.js +2 -2
  6. package/dist/bundle/{all-profiles-GE2TFJJP.js → all-profiles-XFIPF4GF.js} +12 -12
  7. package/dist/bundle/answer-policy-AT6CDEE5.js +110 -0
  8. package/dist/bundle/{anthropic-FA6NHENI.js → anthropic-SSUBR3BC.js} +29 -13
  9. package/dist/bundle/{app-server-IRADMSNX.js → app-server-7DJHHF2F.js} +68 -56
  10. package/dist/bundle/{bun-ZYZGGCX5.js → bun-6HBYWQIX.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-Y24TUIGS.js → bun-sqlite-4L3Q55NB.js} +10 -6
  12. package/dist/bundle/{chunk-JULBAECW.js → chunk-23J2ANZ7.js} +16 -6
  13. package/dist/bundle/{chunk-4DSIWYGO.js → chunk-24OFZNRC.js} +39296 -24139
  14. package/dist/bundle/{chunk-LXXCLQCW.js → chunk-2MIBRVSV.js} +2 -2
  15. package/dist/bundle/{chunk-CHGUNZ3L.js → chunk-37NF5CBJ.js} +4 -4
  16. package/dist/bundle/chunk-3KRTEX5M.js +53 -0
  17. package/dist/bundle/{chunk-VNU5L37V.js → chunk-4SY67IUA.js} +34 -42
  18. package/dist/bundle/{chunk-XWQNJKTP.js → chunk-4XQWF3U2.js} +6 -6
  19. package/dist/bundle/{chunk-OAQLVV6W.js → chunk-4YIGXTBP.js} +3 -3
  20. package/dist/bundle/{chunk-RB33VTUW.js → chunk-5AELTC52.js} +810 -210
  21. package/dist/bundle/chunk-5MGICK47.js +1243 -0
  22. package/dist/bundle/{chunk-RRRJCHUC.js → chunk-5X4IY5JH.js} +4504 -1622
  23. package/dist/bundle/{chunk-EOSVN2ER.js → chunk-63QXCE5Z.js} +242 -242
  24. package/dist/bundle/{chunk-OE7EIP5L.js → chunk-6DCLZLGX.js} +1 -1
  25. package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
  26. package/dist/bundle/{chunk-KM736RMJ.js → chunk-7IFO43Q5.js} +2 -2
  27. package/dist/bundle/{chunk-IWPXWGF7.js → chunk-7JYMGXLI.js} +44 -42
  28. package/dist/bundle/{chunk-LAG5O2FV.js → chunk-7OD3522V.js} +4162 -3769
  29. package/dist/bundle/{chunk-DCUWJITQ.js → chunk-7S4D5SM2.js} +60 -608
  30. package/dist/bundle/{chunk-3KC7C465.js → chunk-7SUWPMZG.js} +10 -15
  31. package/dist/bundle/{chunk-6IF5ZHDS.js → chunk-ADKMBXY4.js} +1 -1
  32. package/dist/bundle/{chunk-56OV5ASY.js → chunk-B3SILJBU.js} +18 -18
  33. package/dist/bundle/{chunk-CIZ25UPK.js → chunk-CANRIRNZ.js} +8241 -5553
  34. package/dist/bundle/{chunk-YUHM2OJM.js → chunk-CW46FWKW.js} +38 -123
  35. package/dist/bundle/{chunk-VSLDWT4E.js → chunk-D24OQAHM.js} +4 -4
  36. package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-D5EUMWD5.js} +3 -3
  37. package/dist/bundle/{chunk-CSEBB4OP.js → chunk-DEPXZJ2V.js} +21 -150
  38. package/dist/bundle/{chunk-YJSPBUGB.js → chunk-DOCVEKP2.js} +51 -67
  39. package/dist/bundle/{chunk-V2E7QFZ3.js → chunk-EFF2XBHP.js} +2 -2
  40. package/dist/bundle/{chunk-XRFHQGOD.js → chunk-EG25AY4L.js} +1 -1
  41. package/dist/bundle/{chunk-FEM2JQN2.js → chunk-ELJUBPY4.js} +1 -1
  42. package/dist/bundle/{chunk-2U6SER67.js → chunk-ERJYJ36F.js} +2 -2
  43. package/dist/bundle/chunk-FSCPQQS5.js +244 -0
  44. package/dist/bundle/{chunk-BVWF4B33.js → chunk-H53WFZBN.js} +16 -139
  45. package/dist/bundle/{chunk-VJ5ZU4UF.js → chunk-I7CUMZD6.js} +3 -3
  46. package/dist/bundle/{chunk-OA37BWE5.js → chunk-IACWKZWS.js} +1 -1
  47. package/dist/bundle/{chunk-BSS6HX4O.js → chunk-IFBIXU6C.js} +2 -2
  48. package/dist/bundle/{chunk-UVPL7YAY.js → chunk-IU4DUUB3.js} +7 -7
  49. package/dist/bundle/{chunk-W7ZEEC4K.js → chunk-IXO4SCKE.js} +1 -1
  50. package/dist/bundle/{chunk-J3SKXICS.js → chunk-JAEPK457.js} +359 -765
  51. package/dist/bundle/{chunk-ZV3INEKM.js → chunk-JFPUYQSP.js} +5 -5
  52. package/dist/bundle/{chunk-ZS55EERO.js → chunk-JG4MNYG2.js} +1 -1
  53. package/dist/bundle/{chunk-IINZIP73.js → chunk-JRCH4YZP.js} +17 -10
  54. package/dist/bundle/{chunk-2JEM2YNV.js → chunk-JZ4XNNL7.js} +1 -1
  55. package/dist/bundle/chunk-K6HR6HCO.js +32 -0
  56. package/dist/bundle/{chunk-SNIY3JDN.js → chunk-KFZL67JP.js} +328 -60
  57. package/dist/bundle/{chunk-CEJJBZAE.js → chunk-KPIQXFNB.js} +375 -10
  58. package/dist/bundle/{chunk-M7VUXXGS.js → chunk-KWURWGGB.js} +137 -7
  59. package/dist/bundle/{chunk-M6JIXMQZ.js → chunk-LA6QUVGQ.js} +3 -2
  60. package/dist/bundle/{chunk-AISJCF7A.js → chunk-LLUNHAZ7.js} +4 -4
  61. package/dist/bundle/{chunk-KWRCP55G.js → chunk-LTWJM3ED.js} +17 -17
  62. package/dist/bundle/{chunk-IS3ZTT2Z.js → chunk-M3DMXDX6.js} +6 -6
  63. package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
  64. package/dist/bundle/{chunk-L24UOUWG.js → chunk-MSQHSW4C.js} +2 -2
  65. package/dist/bundle/chunk-N4QNYWWG.js +71 -0
  66. package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
  67. package/dist/bundle/{chunk-DNR4B5YV.js → chunk-OHCLQJOV.js} +3 -3
  68. package/dist/bundle/{chunk-MVOMLJYQ.js → chunk-OP5PGE2N.js} +4 -4
  69. package/dist/bundle/{chunk-QL7EMFIC.js → chunk-OY6N2ABP.js} +29 -23
  70. package/dist/bundle/chunk-PJWSGXOB.js +185 -0
  71. package/dist/bundle/{chunk-YTN2JN6N.js → chunk-QA6KIL7Q.js} +12 -8
  72. package/dist/bundle/{chunk-6HJFIMT7.js → chunk-QQUY4MZY.js} +1 -1
  73. package/dist/bundle/{chunk-ZSKE7N2U.js → chunk-QW7YTRV2.js} +3 -3
  74. package/dist/bundle/chunk-RJTGENHZ.js +109 -0
  75. package/dist/bundle/{chunk-RIPAUCKJ.js → chunk-RLCVPECY.js} +74 -67
  76. package/dist/bundle/{chunk-M7E44TMT.js → chunk-RN5SU2RN.js} +6 -6
  77. package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
  78. package/dist/bundle/{chunk-7QC4M4HS.js → chunk-RZUJMAMK.js} +4 -4
  79. package/dist/bundle/{chunk-OORMSM6O.js → chunk-S7SXSHRC.js} +21 -21
  80. package/dist/bundle/{chunk-SVF3NDAO.js → chunk-SXZGCD6E.js} +3 -3
  81. package/dist/bundle/{chunk-DXCTW3MV.js → chunk-T27IMG6X.js} +3 -1
  82. package/dist/bundle/{chunk-PV6OHXHN.js → chunk-TF2WKPNW.js} +18 -18
  83. package/dist/bundle/{chunk-X4ZF4XXI.js → chunk-U32VL3MA.js} +1 -1
  84. package/dist/bundle/{chunk-RQG5VOGH.js → chunk-U3NJBGLA.js} +3 -3
  85. package/dist/bundle/{chunk-WOIHSQAL.js → chunk-UVZLK3M4.js} +33 -9
  86. package/dist/bundle/chunk-VIV64MQM.js +779 -0
  87. package/dist/bundle/{chunk-2QFPVUM3.js → chunk-W3YTVEWV.js} +69 -6
  88. package/dist/bundle/{chunk-AUNW7N4I.js → chunk-WLVG4RBZ.js} +1 -1
  89. package/dist/bundle/{chunk-JRO2FWO2.js → chunk-WOAYHCM2.js} +1 -1
  90. package/dist/bundle/{chunk-RO3ZR4VP.js → chunk-WXTYYWZI.js} +13 -13
  91. package/dist/bundle/{chunk-RWIILYKW.js → chunk-WZGKHTA4.js} +2 -2
  92. package/dist/bundle/{chunk-GB5X3GBE.js → chunk-X2MP634F.js} +14 -5
  93. package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-XPWZSW6Y.js} +61 -21
  94. package/dist/bundle/{chunk-D3PNCJD5.js → chunk-YVVJ6Y5C.js} +7 -7
  95. package/dist/bundle/chunk-ZHA56THL.js +2355 -0
  96. package/dist/bundle/{chunk-QO2KPU26.js → chunk-ZVFYGTGJ.js} +101 -44
  97. package/dist/bundle/{chunk-V5GRSOCZ.js → chunk-ZW5KHKMA.js} +5 -5
  98. package/dist/bundle/{cli-VRSQ7HAE.js → cli-IYYI7GAM.js} +215 -100
  99. package/dist/bundle/command-contract-TX7NSUBM.js +42 -0
  100. package/dist/bundle/command-server-entry-FXX4LJWF.js +171 -0
  101. package/dist/bundle/config-YKNM33J7.js +96 -0
  102. package/dist/bundle/{decode-523PUQMR.js → decode-SRGOOGBW.js} +6 -6
  103. package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-OUHRPFUL.js} +11 -11
  104. package/dist/bundle/{dist-6WWKPEVW.js → dist-UZLNLAIO.js} +97 -56
  105. package/dist/bundle/{echarts-S5UMX2D3.js → echarts-7CM2MCMW.js} +2 -2
  106. package/dist/bundle/{embed-ODPDVHUK.js → embed-VEE56BOB.js} +7 -7
  107. package/dist/bundle/{embedder-PAXRBSZE.js → embedder-SZFYR543.js} +10 -10
  108. package/dist/bundle/{failure-R2OIHCE5.js → failure-MZBNM7M5.js} +3 -3
  109. package/dist/bundle/first-run-KWC7RKF2.js +29 -0
  110. package/dist/bundle/first-screen-DWKMNSEI.js +40 -0
  111. package/dist/bundle/{folders-ZXTOFY4T.js → folders-UQXRSDJJ.js} +5 -5
  112. package/dist/bundle/{instructions-DUB7E6C5.js → instructions-R7OHVAWH.js} +1 -1
  113. package/dist/bundle/{main-A7JSYQI6.js → main-EFUN2O3K.js} +21 -20
  114. package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
  115. package/dist/bundle/{meetings-BDZQV3HR.js → meetings-5I2BDNTA.js} +9 -7
  116. package/dist/bundle/{node-E25KP53H.js → node-3N2JGZ7V.js} +2 -2
  117. package/dist/bundle/{node-sqlite-PHWDFZCP.js → node-sqlite-2UVEE2WM.js} +11 -7
  118. package/dist/bundle/{oauth-G2K46IYP.js → oauth-AYGD7UU3.js} +8 -8
  119. package/dist/bundle/{open-INWS5HIZ.js → open-3GUVDLGD.js} +6 -6
  120. package/dist/bundle/openai-NHCDLWWY.js +28 -0
  121. package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-72JFXVHQ.js} +6 -6
  122. package/dist/bundle/{process-UJ2JHMJN.js → process-YAHHUFR5.js} +1 -1
  123. package/dist/bundle/{program-LYTGFV6L.js → program-OSZROCTK.js} +113 -118
  124. package/dist/bundle/{prompt-VTUCRCE4.js → prompt-HMCW4XQJ.js} +6 -6
  125. package/dist/bundle/{recognize-3CEPOW2F.js → recognize-VF5CA7EM.js} +5 -5
  126. package/dist/bundle/{remote-DRQEXEZL.js → remote-5C6VTPR2.js} +10 -8
  127. package/dist/bundle/{rerank-UL4KNNVN.js → rerank-ER7NEDOI.js} +8 -8
  128. package/dist/bundle/run-log-JKTLKXSK.js +124 -0
  129. package/dist/bundle/{serve-P5UWUOWQ.js → serve-QJWXJOM7.js} +10 -10
  130. package/dist/bundle/{server-M6XK2Y3X.js → server-KCIK3Y2P.js} +50 -48
  131. package/dist/bundle/server-LLGFDLLJ.js +75 -0
  132. package/dist/bundle/{services-4HRYNY62.js → services-LQMYJQG3.js} +121 -52
  133. package/dist/bundle/{speech-BBPBMFAO.js → speech-74GJQNQH.js} +20 -17
  134. package/dist/bundle/{state-GDSUNUSY.js → state-4XDGCHDF.js} +7 -7
  135. package/dist/bundle/{store-LBQ6FZP2.js → store-5Y5HK2L2.js} +28 -19
  136. package/dist/bundle/{store-VWLABMLF.js → store-Y56AHJ2Y.js} +64 -31
  137. package/dist/bundle/store-connection-4WI32AYU.js +89 -0
  138. package/dist/bundle/store-maintenance-command-PCXO5AH4.js +65 -0
  139. package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-E5CR6HSR.js} +7 -7
  140. package/dist/bundle/{tokens-BE6CJMR5.js → tokens-E2QNVC4F.js} +7 -7
  141. package/dist/bundle/zm.js +34 -10
  142. package/dist/bundle/{zoom-app-YIEJLWCW.js → zoom-app-NVL7HEAX.js} +8 -8
  143. package/dist/contract-overrides.d.ts.map +1 -1
  144. package/dist/contract-overrides.js +0 -6
  145. package/dist/contract-overrides.js.map +1 -1
  146. package/dist/ingestion-search-commands.d.ts.map +1 -1
  147. package/dist/ingestion-search-commands.js +0 -10
  148. package/dist/ingestion-search-commands.js.map +1 -1
  149. package/dist/meeting-integration-commands.d.ts.map +1 -1
  150. package/dist/meeting-integration-commands.js +8 -6
  151. package/dist/meeting-integration-commands.js.map +1 -1
  152. package/dist/meeting-integration.d.ts +3 -1
  153. package/dist/meeting-integration.d.ts.map +1 -1
  154. package/dist/store-connection.d.ts.map +1 -1
  155. package/dist/store-connection.js +4 -3
  156. package/dist/store-connection.js.map +1 -1
  157. package/dist/unified-search.d.ts +4 -4
  158. package/dist/unified-search.d.ts.map +1 -1
  159. package/dist/unified-search.js +1 -24
  160. package/dist/unified-search.js.map +1 -1
  161. package/dist/version.d.ts +1 -1
  162. package/dist/version.js +1 -1
  163. package/package.json +4 -4
  164. package/skills/zoom-cli/SKILL.md +2 -2
  165. package/dist/bundle/answer-policy-GOXSDYDD.js +0 -104
  166. package/dist/bundle/chunk-5XWCBLUR.js +0 -27
  167. package/dist/bundle/chunk-AT2XKNFN.js +0 -342
  168. package/dist/bundle/chunk-GVT5363M.js +0 -35
  169. package/dist/bundle/chunk-VE2VNECR.js +0 -380
  170. package/dist/bundle/chunk-Y6C3N7YG.js +0 -12434
  171. package/dist/bundle/command-contract-RPRKHVU6.js +0 -41
  172. package/dist/bundle/config-QU6A6VIO.js +0 -90
  173. package/dist/bundle/first-run-NVTDR5VO.js +0 -28
  174. package/dist/bundle/first-screen-5RWZDWLK.js +0 -39
  175. package/dist/bundle/openai-T44ORVGQ.js +0 -25
  176. package/dist/bundle/run-log-UZAB5CWF.js +0 -118
  177. package/dist/bundle/server-F3NPVMS2.js +0 -72
  178. package/dist/bundle/store-connection-XEBFP56U.js +0 -83
  179. package/dist/bundle/store-maintenance-command-G43JN57J.js +0 -61
  180. /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-YVNHQFLC.js} +0 -0
@@ -1,380 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- isCliFailure,
5
- isStoreDamage
6
- } from "./chunk-RWIILYKW.js";
7
- import {
8
- refuseOwnerStoreInTests
9
- } from "./chunk-GVT5363M.js";
10
- import {
11
- array,
12
- boolean,
13
- integer,
14
- isoTime,
15
- isoTimestamp,
16
- minLength,
17
- minValue,
18
- nullable,
19
- number,
20
- optional,
21
- picklist,
22
- pipe,
23
- record,
24
- reference,
25
- strictObject,
26
- string,
27
- unknown
28
- } from "./chunk-WOIHSQAL.js";
29
- import {
30
- CliError
31
- } from "./chunk-FEM2JQN2.js";
32
- import {
33
- __name
34
- } from "./chunk-ZVVMGPBJ.js";
35
-
36
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/tasks/model.js
37
- var TASK_KINDS = ["question", "request", "mention", "promise"];
38
- var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
39
- var CLOSED_STATES = ["done", "dismissed"];
40
- var TASK_ORIGINS = ["rule", "agent", "owner"];
41
- var TASK_VERDICTS = ["useful", "not_useful"];
42
- var isClosedState = /* @__PURE__ */ __name((state) => CLOSED_STATES.includes(state), "isClosedState");
43
- function closeTask(task, state, by, at, reason) {
44
- if (isClosedState(task.state))
45
- throw new CliError("validation_error", `task ${task.id} is already ${task.state}`, { reason: "task.closed" });
46
- const { claimedBy: _by, claimedUntil: _until, ...unclaimed } = task;
47
- return { ...unclaimed, state, closedAt: at, closedBy: by, ...reason === void 0 ? {} : { reason } };
48
- }
49
- __name(closeTask, "closeTask");
50
-
51
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/tasks/priority.js
52
- var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
53
- var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
54
- var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
55
- var priorityLabel = /* @__PURE__ */ __name((score) => score === null ? null : PRIORITY_LABELS[Math.min(3, Math.max(0, Math.floor(score * 4)))], "priorityLabel");
56
- var priorityBand = /* @__PURE__ */ __name((label) => {
57
- const at = PRIORITY_LABELS.indexOf(label);
58
- return { from: at / 4, to: (at + 1) / 4 };
59
- }, "priorityBand");
60
- var legacyPriority = /* @__PURE__ */ __name((score) => score === null ? null : score < 0.125 ? 4 : 3 - PRIORITY_LABELS.indexOf(priorityLabel(score)), "legacyPriority");
61
- var checkedScore = /* @__PURE__ */ __name((score) => {
62
- if (!Number.isFinite(score) || score < 0 || score > 1)
63
- throw new CliError("validation_error", "a priority score is 0 to 1");
64
- return score;
65
- }, "checkedScore");
66
- var priorityOf = /* @__PURE__ */ __name((value) => {
67
- const word = value.trim().toLowerCase();
68
- if (word === "none")
69
- return null;
70
- if (PRIORITY_LABELS.includes(word))
71
- return MIDDLE[word];
72
- if (/^[0-4]$/.test(word))
73
- return LEGACY_PRIORITY_SCORES[Number(word)];
74
- if (/^(0?\.\d+|[01]\.\d*)$/.test(word) && Number(word) <= 1)
75
- return Number(word);
76
- 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`);
77
- }, "priorityOf");
78
- var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
79
-
80
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/tasks/service.js
81
- function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
82
- async function find(id2) {
83
- const task = await store.get(id2);
84
- if (!task)
85
- throw new CliError("not_found", `no task ${id2}`);
86
- return task;
87
- }
88
- __name(find, "find");
89
- return {
90
- /**
91
- * A rule never makes a second task from a source it has seen, whatever that task's state, so a
92
- * dismissed one stays dismissed — nor from a message attached or merged into a task. A person or an agent may
93
- * add a task of another kind to it. A task a rule opens goes through the host's duplicate check.
94
- */
95
- async add(input) {
96
- const rule = input.origin === "rule";
97
- const existing = await store.findBySource(input.account, input.source, rule ? { linked: true } : void 0);
98
- const same = rule ? existing[0] : existing.find((task2) => task2.kind === input.kind);
99
- if (same)
100
- return { task: same, created: false };
101
- const task = { ...input, id: newId(), state: "open", createdAt: now() };
102
- await store.insert(task);
103
- if (!rule || !store.reviewDuplicates)
104
- return { task, created: true };
105
- return { task, created: true, review: await store.reviewDuplicates(task.id) };
106
- },
107
- async close(id2, { as, by, reason }) {
108
- const task = closeTask(await find(id2), as, by, now(), reason);
109
- await store.update(task);
110
- return task;
111
- },
112
- list: /* @__PURE__ */ __name((filter = {}) => store.list(filter), "list"),
113
- async stats(filter = {}) {
114
- const byGroup = /* @__PURE__ */ new Map();
115
- for (const task of await store.list(filter))
116
- byGroup.set(task.group, [...byGroup.get(task.group) ?? [], task]);
117
- return [...byGroup].map(([group, tasks]) => {
118
- const open = tasks.filter((task) => !isClosedState(task.state));
119
- const closeMs = tasks.flatMap((task) => task.closedAt ? [task.closedAt.getTime() - task.createdAt.getTime()] : []);
120
- const oldestOpenAt = open.map((task) => task.createdAt).sort((a, b) => a.getTime() - b.getTime())[0];
121
- return {
122
- group,
123
- open: open.length,
124
- ...oldestOpenAt ? { oldestOpenAt } : {},
125
- ...closeMs.length > 0 ? { medianCloseMs: median(closeMs) } : {}
126
- };
127
- });
128
- }
129
- };
130
- }
131
- __name(createTaskService, "createTaskService");
132
- function median(values) {
133
- const sorted = [...values].sort((a, b) => a - b);
134
- const middle = Math.floor(sorted.length / 2);
135
- const upper = sorted[middle] ?? 0;
136
- return sorted.length % 2 === 1 ? upper : ((sorted[middle - 1] ?? 0) + upper) / 2;
137
- }
138
- __name(median, "median");
139
-
140
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/tasks/store.js
141
- function matches(task, filter) {
142
- 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);
143
- }
144
- __name(matches, "matches");
145
-
146
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
147
- var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
148
- var MEMORY_KINDS = ["summary", "digest", "preference"];
149
- var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
150
- var MEMORY_SCOPES = ["personal", "work"];
151
- var WORK_TASK_TYPES = ["bug", "feature", "chore"];
152
- var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
153
-
154
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/entities/fields.js
155
- var text = string();
156
- var id = pipe(string(), minLength(1));
157
- var time = isoTime;
158
- var zonedTime = pipe(string(), isoTimestamp("an ISO 8601 time with a zone"));
159
- var count = pipe(number(), integer(), minValue(0));
160
- var untrusted = optional(array(text));
161
- var providerMetadata = optional(record(string(), unknown()));
162
- var evidenceSource = strictObject({
163
- ref: nullable(reference),
164
- kind: text,
165
- title: nullable(text),
166
- sender: nullable(text),
167
- at: nullable(time),
168
- excerpt: nullable(text),
169
- tool: nullable(text),
170
- missing: boolean()
171
- });
172
- var author = strictObject({
173
- type: picklist(["person", "bot"]),
174
- id,
175
- name: nullable(text)
176
- });
177
-
178
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
179
- var organization = strictObject({
180
- id,
181
- ref: reference,
182
- kind: picklist(["company", "team", "family", "community"]),
183
- name: text,
184
- scope: picklist(["personal", "work"]),
185
- created_at: time
186
- });
187
- var project = strictObject({
188
- id,
189
- ref: reference,
190
- key: text,
191
- name: text,
192
- kind: picklist(["project", "inbox"]),
193
- type: picklist(["work", "client", "personal", "oss", "other"]),
194
- organization_id: nullable(id),
195
- scope: picklist(["personal", "work"]),
196
- created_at: time
197
- });
198
- var reminder = strictObject({
199
- id,
200
- task: text,
201
- due_at: time,
202
- timezone: text,
203
- state: picklist(["pending", "leased", "delivered", "cancelled"]),
204
- revision: number(),
205
- receipt: nullable(text)
206
- });
207
-
208
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/marks.js
209
- import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
210
- var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
211
- var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
212
- var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
213
- var readJson = /* @__PURE__ */ __name((path) => {
214
- try {
215
- return JSON.parse(readFileSync(path, "utf8"));
216
- } catch (error) {
217
- if (error.code === "ENOENT")
218
- return null;
219
- throw error;
220
- }
221
- }, "readJson");
222
- var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
223
- try {
224
- refuseOwnerStoreInTests(store);
225
- return false;
226
- } catch {
227
- return true;
228
- }
229
- }, "ownerStoreInTests");
230
- var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
231
- var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
232
- const failure = sqliteFailure(error);
233
- if (!isStoreDamage(failure) || ownerStoreInTests(store))
234
- return false;
235
- const inode = inodeOf(store);
236
- if (inode === void 0)
237
- return false;
238
- const mark = {
239
- at: new Date(now()).toISOString(),
240
- command,
241
- ...version ? { cli_version: version } : {},
242
- ...runId ? { run_id: runId } : {},
243
- error: failure.message.slice(0, 500),
244
- inode
245
- };
246
- try {
247
- writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
248
- `, { flag: "wx", mode: 384 });
249
- return true;
250
- } catch {
251
- return false;
252
- }
253
- }, "markStoreDamaged");
254
- var readDamageMark = /* @__PURE__ */ __name((store) => {
255
- const path = damageMarkPath(store);
256
- let mark;
257
- try {
258
- mark = readJson(path);
259
- } catch {
260
- return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
261
- }
262
- if (mark === null)
263
- return null;
264
- if (mark.inode !== inodeOf(store)) {
265
- clearDamageMark(store);
266
- return null;
267
- }
268
- return mark;
269
- }, "readDamageMark");
270
- var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
271
- var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
272
- const mark = readDamageMark(store);
273
- if (!mark)
274
- return;
275
- throw new CliError("configuration_error", `the store was found damaged at ${mark.at} by \`${mark.command}\` (${mark.error}), so nothing writes to it until it is recovered; \`${cli ?? "<cli>"} store recover\` says what is damaged and what to do`, { reason: "store.damaged" });
276
- }, "refuseDamagedStore");
277
- var readHealthMark = /* @__PURE__ */ __name((store) => {
278
- try {
279
- return readJson(healthMarkPath(store));
280
- } catch {
281
- return null;
282
- }
283
- }, "readHealthMark");
284
- var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
285
- const previous = readHealthMark(store);
286
- if (ownerStoreInTests(store))
287
- return { previous, cleared: null };
288
- const checkedAt = new Date(now()).toISOString();
289
- const mark = {
290
- checked_at: checkedAt,
291
- ok: health.ok,
292
- problems: health.problems ?? 0,
293
- schema,
294
- cli,
295
- ...version ? { cli_version: version } : {},
296
- last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
297
- };
298
- const cleared = health.ok ? readDamageMark(store) : null;
299
- try {
300
- writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
301
- `, { mode: 384 });
302
- } catch {
303
- }
304
- if (cleared)
305
- clearDamageMark(store);
306
- return { previous, cleared };
307
- }, "recordDeepCheck");
308
-
309
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
310
- var LINK_KINDS = [
311
- "links-to",
312
- "blocked-by",
313
- "follow-up-of",
314
- "about",
315
- "member-of",
316
- "labelled",
317
- "answered-by",
318
- "evidence",
319
- "created-from",
320
- "duplicate-of",
321
- "related-to",
322
- "reports-to",
323
- "customer-of",
324
- "partner-of",
325
- "assigned-to",
326
- "attached"
327
- ];
328
- var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
329
- var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
330
- var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
331
- var COUNTERPART_ROLE = "counterpart";
332
-
333
- export {
334
- LINK_KINDS,
335
- LINK_ORIGINS,
336
- LINK_SOURCES,
337
- linkKind,
338
- COUNTERPART_ROLE,
339
- TASK_KINDS,
340
- TASK_STATES,
341
- CLOSED_STATES,
342
- TASK_ORIGINS,
343
- TASK_VERDICTS,
344
- isClosedState,
345
- PRIORITY_LABELS,
346
- priorityLabel,
347
- priorityBand,
348
- legacyPriority,
349
- checkedScore,
350
- priorityOf,
351
- priorityOption,
352
- createTaskService,
353
- matches,
354
- FACT_STATUSES,
355
- MEMORY_KINDS,
356
- MEMORY_STATUSES,
357
- MEMORY_SCOPES,
358
- WORK_TASK_TYPES,
359
- TASK_TYPES,
360
- text,
361
- id,
362
- time,
363
- zonedTime,
364
- count,
365
- untrusted,
366
- providerMetadata,
367
- evidenceSource,
368
- author,
369
- organization,
370
- project,
371
- reminder,
372
- damageMarkPath,
373
- healthMarkPath,
374
- markStoreDamaged,
375
- readDamageMark,
376
- clearDamageMark,
377
- refuseDamagedStore,
378
- readHealthMark,
379
- recordDeepCheck
380
- };