@wirecat/zoom-cli 0.70.0 → 0.71.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 (144) hide show
  1. package/dist/answer-entities.d.ts +2 -0
  2. package/dist/answer-entities.d.ts.map +1 -1
  3. package/dist/bin/zm.js +2 -2
  4. package/dist/bundle/{all-profiles-GE2TFJJP.js → all-profiles-O4YNVPZX.js} +7 -7
  5. package/dist/bundle/{answer-policy-GOXSDYDD.js → answer-policy-PPSPMCLH.js} +52 -52
  6. package/dist/bundle/{anthropic-FA6NHENI.js → anthropic-7GGRX3RX.js} +13 -4
  7. package/dist/bundle/{app-server-IRADMSNX.js → app-server-CPMKM3HI.js} +46 -46
  8. package/dist/bundle/{bun-ZYZGGCX5.js → bun-POHZKEPV.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-Y24TUIGS.js → bun-sqlite-PGYMBPEL.js} +2 -2
  10. package/dist/bundle/{chunk-DCUWJITQ.js → chunk-2FV5JUQU.js} +38 -592
  11. package/dist/bundle/{chunk-DNR4B5YV.js → chunk-2KESWII5.js} +2 -2
  12. package/dist/bundle/{chunk-KWRCP55G.js → chunk-2RUAMDVV.js} +10 -10
  13. package/dist/bundle/{chunk-IS3ZTT2Z.js → chunk-2U27KIKU.js} +2 -2
  14. package/dist/bundle/chunk-4LAQDZXU.js +1635 -0
  15. package/dist/bundle/{chunk-6IF5ZHDS.js → chunk-4QPQ7MDA.js} +1 -1
  16. package/dist/bundle/{chunk-MVOMLJYQ.js → chunk-4QUFFB2U.js} +3 -3
  17. package/dist/bundle/{chunk-AUNW7N4I.js → chunk-54YDWBYG.js} +1 -1
  18. package/dist/bundle/{chunk-AISJCF7A.js → chunk-5J4AMBMM.js} +4 -4
  19. package/dist/bundle/{chunk-UVPL7YAY.js → chunk-5K7OGPGA.js} +4 -4
  20. package/dist/bundle/{chunk-RO3ZR4VP.js → chunk-5LJTU4LY.js} +12 -12
  21. package/dist/bundle/{chunk-YTN2JN6N.js → chunk-633QXP57.js} +9 -7
  22. package/dist/bundle/{chunk-DXCTW3MV.js → chunk-64ZHF6PJ.js} +1 -1
  23. package/dist/bundle/{chunk-JRO2FWO2.js → chunk-77TCCHMP.js} +1 -1
  24. package/dist/bundle/{chunk-CIZ25UPK.js → chunk-7ROXXRGG.js} +2282 -1087
  25. package/dist/bundle/{chunk-OA37BWE5.js → chunk-ALIT5QFT.js} +1 -1
  26. package/dist/bundle/{chunk-V2E7QFZ3.js → chunk-BBTQIVFP.js} +1 -1
  27. package/dist/bundle/{chunk-M7E44TMT.js → chunk-BGTEVIW4.js} +5 -5
  28. package/dist/bundle/{chunk-2QFPVUM3.js → chunk-CFQF6IGY.js} +2 -2
  29. package/dist/bundle/{chunk-XWQNJKTP.js → chunk-CKPCVEXU.js} +5 -5
  30. package/dist/bundle/{chunk-L24UOUWG.js → chunk-CRFOGYDG.js} +1 -1
  31. package/dist/bundle/{chunk-OAQLVV6W.js → chunk-CT4WVR4N.js} +2 -2
  32. package/dist/bundle/{chunk-SNIY3JDN.js → chunk-DHWBSXG3.js} +20 -20
  33. package/dist/bundle/{chunk-CHGUNZ3L.js → chunk-DIQLXAAZ.js} +3 -3
  34. package/dist/bundle/{chunk-RRRJCHUC.js → chunk-DK6ICIGL.js} +3141 -982
  35. package/dist/bundle/{chunk-YUHM2OJM.js → chunk-DRBQDCDU.js} +9 -9
  36. package/dist/bundle/{chunk-LAG5O2FV.js → chunk-DSVZEXYJ.js} +1093 -895
  37. package/dist/bundle/{chunk-4DSIWYGO.js → chunk-FSHCAWZS.js} +29110 -16686
  38. package/dist/bundle/{chunk-SVF3NDAO.js → chunk-GGS6D4W4.js} +2 -2
  39. package/dist/bundle/{chunk-V5GRSOCZ.js → chunk-GL3MYFMX.js} +3 -3
  40. package/dist/bundle/{chunk-VSLDWT4E.js → chunk-GXF5HFFP.js} +3 -3
  41. package/dist/bundle/{chunk-ZV3INEKM.js → chunk-HB6XJQ3Y.js} +4 -4
  42. package/dist/bundle/{chunk-GB5X3GBE.js → chunk-I4DFFR7F.js} +2 -2
  43. package/dist/bundle/{chunk-ZS55EERO.js → chunk-IAV5BG3I.js} +1 -1
  44. package/dist/bundle/{chunk-VNU5L37V.js → chunk-IED3NS7G.js} +27 -35
  45. package/dist/bundle/{chunk-W7ZEEC4K.js → chunk-INVTDIF6.js} +1 -1
  46. package/dist/bundle/{chunk-GVT5363M.js → chunk-KMV7GZB6.js} +1 -1
  47. package/dist/bundle/{chunk-LXXCLQCW.js → chunk-LE7MDAQG.js} +2 -2
  48. package/dist/bundle/{chunk-2JEM2YNV.js → chunk-M76MXMLY.js} +1 -1
  49. package/dist/bundle/{chunk-RWIILYKW.js → chunk-MEED7YFG.js} +1 -1
  50. package/dist/bundle/{chunk-56OV5ASY.js → chunk-MRI6QMZ3.js} +9 -9
  51. package/dist/bundle/{chunk-BSS6HX4O.js → chunk-MW4EGDDV.js} +2 -2
  52. package/dist/bundle/{chunk-6HJFIMT7.js → chunk-N2FNMION.js} +1 -1
  53. package/dist/bundle/{chunk-J3SKXICS.js → chunk-OHWMIUCT.js} +139 -544
  54. package/dist/bundle/{chunk-M7VUXXGS.js → chunk-OWEBWDHV.js} +58 -3
  55. package/dist/bundle/{chunk-BVWF4B33.js → chunk-P3XC6EDU.js} +15 -19
  56. package/dist/bundle/{chunk-JULBAECW.js → chunk-Q2SUFGSH.js} +16 -6
  57. package/dist/bundle/{chunk-QL7EMFIC.js → chunk-Q3XLZIY3.js} +16 -16
  58. package/dist/bundle/{chunk-M6JIXMQZ.js → chunk-Q5PI72CR.js} +1 -1
  59. package/dist/bundle/{chunk-X4ZF4XXI.js → chunk-QTHIU7CO.js} +1 -1
  60. package/dist/bundle/{chunk-CSEBB4OP.js → chunk-QVSLSWAL.js} +7 -7
  61. package/dist/bundle/{chunk-VJ5ZU4UF.js → chunk-RN4EHCC5.js} +2 -2
  62. package/dist/bundle/{chunk-D3PNCJD5.js → chunk-SELXER2Q.js} +3 -3
  63. package/dist/bundle/{chunk-YJSPBUGB.js → chunk-TM4JSVGQ.js} +38 -49
  64. package/dist/bundle/{chunk-5XWCBLUR.js → chunk-UG447QY2.js} +1 -1
  65. package/dist/bundle/{chunk-RIPAUCKJ.js → chunk-ULDXZ6LH.js} +64 -57
  66. package/dist/bundle/chunk-USQ23X5V.js +1227 -0
  67. package/dist/bundle/{chunk-PV6OHXHN.js → chunk-VJXHIUFP.js} +14 -14
  68. package/dist/bundle/{chunk-3KC7C465.js → chunk-VRH7VRTK.js} +7 -7
  69. package/dist/bundle/{chunk-ZSKE7N2U.js → chunk-X277FBTF.js} +2 -2
  70. package/dist/bundle/{chunk-KM736RMJ.js → chunk-X3ZDN3U7.js} +1 -1
  71. package/dist/bundle/{chunk-CEJJBZAE.js → chunk-X4GWR6GO.js} +8 -8
  72. package/dist/bundle/chunk-XI3VIQKW.js +756 -0
  73. package/dist/bundle/{chunk-IWPXWGF7.js → chunk-YD2RYVMK.js} +33 -33
  74. package/dist/bundle/{chunk-RB33VTUW.js → chunk-YPO2U2YB.js} +473 -118
  75. package/dist/bundle/{chunk-IINZIP73.js → chunk-ZBFL5JPT.js} +7 -6
  76. package/dist/bundle/{chunk-QO2KPU26.js → chunk-ZVI6TFQR.js} +100 -43
  77. package/dist/bundle/{cli-VRSQ7HAE.js → cli-KHMEUXNG.js} +117 -64
  78. package/dist/bundle/command-contract-4K6XXZYE.js +41 -0
  79. package/dist/bundle/config-EEDB632I.js +90 -0
  80. package/dist/bundle/{decode-523PUQMR.js → decode-7RP4HSVE.js} +2 -2
  81. package/dist/bundle/{dist-6WWKPEVW.js → dist-BFT2SUBV.js} +60 -40
  82. package/dist/bundle/{echarts-S5UMX2D3.js → echarts-T2BSQ2YV.js} +2 -2
  83. package/dist/bundle/{embed-ODPDVHUK.js → embed-BAS6YPDT.js} +3 -3
  84. package/dist/bundle/{embedder-PAXRBSZE.js → embedder-5XD5FCAO.js} +6 -6
  85. package/dist/bundle/{first-run-NVTDR5VO.js → first-run-23WWZ2PW.js} +5 -5
  86. package/dist/bundle/first-screen-6HFUYVFR.js +39 -0
  87. package/dist/bundle/{instructions-DUB7E6C5.js → instructions-XZPROPKY.js} +1 -1
  88. package/dist/bundle/{main-A7JSYQI6.js → main-TZXKGL3L.js} +12 -12
  89. package/dist/bundle/{meetings-BDZQV3HR.js → meetings-JB2ISPND.js} +3 -1
  90. package/dist/bundle/{node-E25KP53H.js → node-A3B3MJWX.js} +2 -2
  91. package/dist/bundle/{node-sqlite-PHWDFZCP.js → node-sqlite-QVWDLGDX.js} +3 -3
  92. package/dist/bundle/{oauth-G2K46IYP.js → oauth-YA6IYV4O.js} +4 -4
  93. package/dist/bundle/{open-INWS5HIZ.js → open-SY7TXJBS.js} +2 -2
  94. package/dist/bundle/{openai-T44ORVGQ.js → openai-2AU24NRN.js} +8 -8
  95. package/dist/bundle/{process-UJ2JHMJN.js → process-6HNBTJIY.js} +1 -1
  96. package/dist/bundle/{program-LYTGFV6L.js → program-77BUCJ4H.js} +78 -89
  97. package/dist/bundle/{prompt-VTUCRCE4.js → prompt-YDG73YDS.js} +2 -2
  98. package/dist/bundle/{recognize-3CEPOW2F.js → recognize-ECXDGTB7.js} +1 -1
  99. package/dist/bundle/{remote-DRQEXEZL.js → remote-K4JHGBVJ.js} +4 -4
  100. package/dist/bundle/{rerank-UL4KNNVN.js → rerank-IU2YYD4T.js} +4 -4
  101. package/dist/bundle/{run-log-UZAB5CWF.js → run-log-LFEXNZ74.js} +50 -50
  102. package/dist/bundle/{serve-P5UWUOWQ.js → serve-3XWIF3HI.js} +6 -6
  103. package/dist/bundle/{server-M6XK2Y3X.js → server-56VYOHWP.js} +38 -38
  104. package/dist/bundle/server-YSTMUZ22.js +72 -0
  105. package/dist/bundle/{services-4HRYNY62.js → services-X7IPEGQ5.js} +85 -33
  106. package/dist/bundle/{speech-BBPBMFAO.js → speech-E2OBQWYA.js} +10 -10
  107. package/dist/bundle/{state-GDSUNUSY.js → state-4GMJYK4H.js} +3 -3
  108. package/dist/bundle/{store-VWLABMLF.js → store-KPI7GB5Y.js} +37 -19
  109. package/dist/bundle/{store-LBQ6FZP2.js → store-LA4TV4DM.js} +19 -13
  110. package/dist/bundle/store-connection-AZTIF6IH.js +83 -0
  111. package/dist/bundle/store-maintenance-command-LR572PS4.js +61 -0
  112. package/dist/bundle/zm.js +2 -2
  113. package/dist/bundle/{zoom-app-YIEJLWCW.js → zoom-app-QEJBTIJ4.js} +2 -2
  114. package/dist/contract-overrides.d.ts.map +1 -1
  115. package/dist/contract-overrides.js +0 -6
  116. package/dist/contract-overrides.js.map +1 -1
  117. package/dist/ingestion-search-commands.d.ts.map +1 -1
  118. package/dist/ingestion-search-commands.js +0 -10
  119. package/dist/ingestion-search-commands.js.map +1 -1
  120. package/dist/meeting-integration-commands.d.ts.map +1 -1
  121. package/dist/meeting-integration-commands.js +8 -6
  122. package/dist/meeting-integration-commands.js.map +1 -1
  123. package/dist/meeting-integration.d.ts +3 -1
  124. package/dist/meeting-integration.d.ts.map +1 -1
  125. package/dist/store-connection.d.ts.map +1 -1
  126. package/dist/store-connection.js +4 -3
  127. package/dist/store-connection.js.map +1 -1
  128. package/dist/unified-search.d.ts +4 -4
  129. package/dist/unified-search.d.ts.map +1 -1
  130. package/dist/unified-search.js +1 -24
  131. package/dist/unified-search.js.map +1 -1
  132. package/dist/version.d.ts +1 -1
  133. package/dist/version.js +1 -1
  134. package/package.json +3 -3
  135. package/skills/zoom-cli/SKILL.md +2 -2
  136. package/dist/bundle/chunk-AT2XKNFN.js +0 -342
  137. package/dist/bundle/chunk-VE2VNECR.js +0 -380
  138. package/dist/bundle/chunk-Y6C3N7YG.js +0 -12434
  139. package/dist/bundle/command-contract-RPRKHVU6.js +0 -41
  140. package/dist/bundle/config-QU6A6VIO.js +0 -90
  141. package/dist/bundle/first-screen-5RWZDWLK.js +0 -39
  142. package/dist/bundle/server-F3NPVMS2.js +0 -72
  143. package/dist/bundle/store-connection-XEBFP56U.js +0 -83
  144. package/dist/bundle/store-maintenance-command-G43JN57J.js +0 -61
@@ -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
- };