@wirecat/mail-cli 0.23.0 → 0.24.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 (121) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-CI32WFEV.js → all-profiles-VS7P6DJY.js} +11 -11
  4. package/dist/bundle/{anthropic-ICSOMJIN.js → anthropic-C5JXKGBS.js} +16 -7
  5. package/dist/bundle/{app-server-3F4ZB7DH.js → app-server-HU3LVU42.js} +51 -50
  6. package/dist/bundle/{bun-7AHNFZMZ.js → bun-QLFX47WZ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-UIWRS4HI.js → bun-sqlite-W4PGAKVY.js} +5 -5
  8. package/dist/bundle/{chunk-ETIUB2DF.js → chunk-3FD3IATT.js} +6 -6
  9. package/dist/bundle/{chunk-6FSLEARF.js → chunk-3KSK5BBB.js} +2 -2
  10. package/dist/bundle/{chunk-I3YNNSGB.js → chunk-4QNHAM3J.js} +2 -2
  11. package/dist/bundle/{chunk-7SWWVDEZ.js → chunk-4W4EVVL4.js} +61 -21
  12. package/dist/bundle/{chunk-JDKC7EXM.js → chunk-5NLHDK7P.js} +50 -46
  13. package/dist/bundle/{chunk-AHRHP2H2.js → chunk-5X3GU5LI.js} +6 -6
  14. package/dist/bundle/{chunk-KNRONMVG.js → chunk-64ZG5ERD.js} +2 -2
  15. package/dist/bundle/{chunk-RIAZTS6C.js → chunk-6PWCQKMD.js} +12 -12
  16. package/dist/bundle/{chunk-4PNIZUEC.js → chunk-6VV7J2TN.js} +36 -57
  17. package/dist/bundle/{chunk-5AS5N7V5.js → chunk-A6J4MPTI.js} +3 -1
  18. package/dist/bundle/{chunk-ZYHBMDNU.js → chunk-AUTX2MLF.js} +11 -9
  19. package/dist/bundle/{chunk-5Y2WRUYP.js → chunk-B72343TK.js} +2 -2
  20. package/dist/bundle/{chunk-7SIWMF77.js → chunk-BFQQV22T.js} +1 -1
  21. package/dist/bundle/chunk-C3NYJW6B.js +1542 -0
  22. package/dist/bundle/{chunk-7ZDH2XEY.js → chunk-C5BMCLCQ.js} +4 -4
  23. package/dist/bundle/{chunk-JO4BJYVE.js → chunk-DW3F6DUW.js} +1 -1
  24. package/dist/bundle/chunk-EKGRNFYQ.js +18 -0
  25. package/dist/bundle/{chunk-4YTX5YAU.js → chunk-FKWUUCX2.js} +1361 -1539
  26. package/dist/bundle/{chunk-LLYVBO3R.js → chunk-FNLUKODV.js} +19 -19
  27. package/dist/bundle/{chunk-HGV7DSSA.js → chunk-H5FJTHVA.js} +2 -2
  28. package/dist/bundle/{chunk-3QVGB2CI.js → chunk-HBZAJINU.js} +4 -4
  29. package/dist/bundle/{chunk-BT7UUI6E.js → chunk-IRUN4XOV.js} +2 -2
  30. package/dist/bundle/{chunk-4TKQIXND.js → chunk-JMLIKXFO.js} +2 -2
  31. package/dist/bundle/{chunk-XV3M3NAN.js → chunk-JOQGJUFT.js} +1 -1
  32. package/dist/bundle/{chunk-NEDYKKJJ.js → chunk-JWMLMAHP.js} +4 -4
  33. package/dist/bundle/{chunk-5QQOUYNA.js → chunk-KGOVFEWZ.js} +3 -3
  34. package/dist/bundle/{chunk-NKDYHAHP.js → chunk-KV4VTKF3.js} +3 -3
  35. package/dist/bundle/chunk-LVGX7VTD.js +138 -0
  36. package/dist/bundle/{chunk-3DQYO7FB.js → chunk-MCPOZNWG.js} +1 -1
  37. package/dist/bundle/{chunk-SCH3NC5X.js → chunk-MTO6YVMN.js} +3 -3
  38. package/dist/bundle/{chunk-R4RAWEMV.js → chunk-NCRSE647.js} +286 -48
  39. package/dist/bundle/{chunk-UTLJQG6Q.js → chunk-NSIN5IM4.js} +8 -8
  40. package/dist/bundle/{chunk-IMIY7HQB.js → chunk-NWKKPDZV.js} +2 -2
  41. package/dist/bundle/chunk-O373QEAJ.js +1243 -0
  42. package/dist/bundle/{chunk-OMW37FXK.js → chunk-OQW6GHUA.js} +1 -1
  43. package/dist/bundle/{chunk-D6WTKSRA.js → chunk-PRQ2U7HF.js} +2 -2
  44. package/dist/bundle/{chunk-HRIYU2HJ.js → chunk-PT6MF2VU.js} +469 -120
  45. package/dist/bundle/{chunk-B6GITVDX.js → chunk-Q4OKEN3B.js} +7 -7
  46. package/dist/bundle/{chunk-ELGEHZK2.js → chunk-Q6K2XUGU.js} +1 -1
  47. package/dist/bundle/{chunk-CNYQ3TTZ.js → chunk-QI3PXUOJ.js} +43 -595
  48. package/dist/bundle/{chunk-SGMENSI6.js → chunk-QVMOEB3I.js} +391 -16
  49. package/dist/bundle/{chunk-S2U5BXWS.js → chunk-RLQZFZLK.js} +80 -5
  50. package/dist/bundle/{chunk-SETCGPFG.js → chunk-RN7OI5KL.js} +9 -8
  51. package/dist/bundle/{chunk-5J4WNTTM.js → chunk-RNZKQMFY.js} +14 -14
  52. package/dist/bundle/{chunk-WQRX4RQS.js → chunk-RUASZW3M.js} +5 -5
  53. package/dist/bundle/{chunk-UHC5I3JV.js → chunk-RX5CJ55S.js} +1 -1
  54. package/dist/bundle/{chunk-FHCOGR7S.js → chunk-SWKQ6IAR.js} +3 -3
  55. package/dist/bundle/{chunk-KJQZXCNK.js → chunk-TI7ZIPA2.js} +4 -4
  56. package/dist/bundle/{chunk-7DFWXIY5.js → chunk-TLEBSMC7.js} +1997 -768
  57. package/dist/bundle/{chunk-5Z7LZAVP.js → chunk-U6MMQNNK.js} +6 -6
  58. package/dist/bundle/{chunk-HN6PB7F5.js → chunk-VNKWSCN7.js} +99 -42
  59. package/dist/bundle/{chunk-DALBYUPC.js → chunk-VUBZFMGP.js} +2 -2
  60. package/dist/bundle/{chunk-XP5FBDIG.js → chunk-VVL4MKYH.js} +1 -1
  61. package/dist/bundle/{chunk-TEL2OMS5.js → chunk-WOX7FZJP.js} +686 -220
  62. package/dist/bundle/{chunk-2BAO4T4Z.js → chunk-X47BL4M5.js} +13 -13
  63. package/dist/bundle/{chunk-GOMJNH56.js → chunk-X7J3TTDO.js} +8 -8
  64. package/dist/bundle/{chunk-FVKZ55I2.js → chunk-XBEO472U.js} +29976 -16640
  65. package/dist/bundle/{chunk-UA4BOLIY.js → chunk-YA45XV6G.js} +4 -4
  66. package/dist/bundle/{chunk-FIZWQTUC.js → chunk-YBQ5AYLZ.js} +3 -3
  67. package/dist/bundle/{chunk-AFPETMXZ.js → chunk-YI544LHI.js} +13 -136
  68. package/dist/bundle/chunk-ZO4MQWIK.js +188 -0
  69. package/dist/bundle/{chunk-7OVVX4F4.js → chunk-ZR2BDNGG.js} +1 -1
  70. package/dist/bundle/command-contract-ERYYPAD2.js +35 -0
  71. package/dist/bundle/command-server-entry-5E3PPDE5.js +164 -0
  72. package/dist/bundle/{decode-BJXABRAN.js → decode-AVWV7SVZ.js} +5 -5
  73. package/dist/bundle/{dispatch-G4CYFWQ2.js → dispatch-BXPHSNK5.js} +10 -10
  74. package/dist/bundle/{dist-LLEA6R4V.js → dist-PIOOKBWT.js} +78 -44
  75. package/dist/bundle/{echarts-YPTKBOZV.js → echarts-7K6YQV52.js} +2 -2
  76. package/dist/bundle/{embed-DMROTI5M.js → embed-4NT76GJK.js} +6 -6
  77. package/dist/bundle/{embedder-DWMHXCHJ.js → embedder-ITQFF7EN.js} +9 -9
  78. package/dist/bundle/{failure-FFPK2WYB.js → failure-3Q65JOPD.js} +2 -2
  79. package/dist/bundle/{first-run-FQOEF2IO.js → first-run-PM74YU4X.js} +11 -11
  80. package/dist/bundle/first-screen-WBVGVSMY.js +33 -0
  81. package/dist/bundle/{instructions-OGKMROLD.js → instructions-JDSITYHV.js} +1 -1
  82. package/dist/bundle/mail.js +37 -13
  83. package/dist/bundle/{mcp-CFVG2OUS.js → mcp-7KQUJNFN.js} +2 -2
  84. package/dist/bundle/{node-HIKYE546.js → node-D6YIJOJI.js} +2 -2
  85. package/dist/bundle/{node-sqlite-3GJAG7VO.js → node-sqlite-PJOHHB4X.js} +6 -6
  86. package/dist/bundle/{oauth-H3DB6IHI.js → oauth-BOWJ3IBT.js} +7 -7
  87. package/dist/bundle/{open-DJ2PRG74.js → open-FIAKKZMW.js} +5 -5
  88. package/dist/bundle/{openai-MDBRYB55.js → openai-QL54VVLC.js} +16 -37
  89. package/dist/bundle/{process-4LBD72JH.js → process-AYHK7WRC.js} +1 -1
  90. package/dist/bundle/{program-F6WK6RX4.js → program-6FKWOTBK.js} +3206 -1603
  91. package/dist/bundle/{prompt-UNPUG6SO.js → prompt-XJZCBELC.js} +5 -5
  92. package/dist/bundle/{recognize-DMIO4PDB.js → recognize-OQKWAHBY.js} +4 -4
  93. package/dist/bundle/{remote-24HJA72D.js → remote-NLVUZ5WK.js} +7 -7
  94. package/dist/bundle/{rerank-PTNCHHIU.js → rerank-NRPZDTJ7.js} +7 -7
  95. package/dist/bundle/{serve-T6JHM2YD.js → serve-O4YUI7F6.js} +9 -9
  96. package/dist/bundle/server-6OT5ZEWL.js +66 -0
  97. package/dist/bundle/{server-BWEYRUR3.js → server-WAL3M4OO.js} +40 -40
  98. package/dist/bundle/{sqlite-runtime-ZJ4EH5ZM.js → sqlite-runtime-5YHGI4D4.js} +6 -6
  99. package/dist/bundle/{state-KSN4OFYW.js → state-WYYOJ7KK.js} +6 -6
  100. package/dist/bundle/{store-OIEZJEA7.js → store-6BJO3F2J.js} +22 -16
  101. package/dist/bundle/{store-GVBW2ZFK.js → store-X72GOJHD.js} +50 -22
  102. package/dist/bundle/store-maintenance-command-ASS7RBYC.js +54 -0
  103. package/dist/commands/rules.d.ts.map +1 -1
  104. package/dist/commands/rules.js +29 -7
  105. package/dist/commands/rules.js.map +1 -1
  106. package/dist/commands/sync.d.ts +0 -1
  107. package/dist/commands/sync.d.ts.map +1 -1
  108. package/dist/commands/sync.js +8 -2
  109. package/dist/commands/sync.js.map +1 -1
  110. package/dist/config.d.ts +4 -0
  111. package/dist/config.d.ts.map +1 -1
  112. package/dist/version.d.ts +1 -1
  113. package/dist/version.js +1 -1
  114. package/package.json +4 -4
  115. package/dist/bundle/chunk-5AQ4S4TZ.js +0 -12172
  116. package/dist/bundle/chunk-B4MWHI2V.js +0 -380
  117. package/dist/bundle/command-contract-UIRWJVEY.js +0 -35
  118. package/dist/bundle/first-screen-B6LF5464.js +0 -33
  119. package/dist/bundle/server-VUQNR5ZD.js +0 -65
  120. package/dist/bundle/store-maintenance-command-KJ54HLUQ.js +0 -54
  121. /package/dist/bundle/{chunk-QZLK2ISN.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-6FSLEARF.js";
7
- import {
8
- refuseOwnerStoreInTests
9
- } from "./chunk-5Y2WRUYP.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-GOMJNH56.js";
29
- import {
30
- CliError
31
- } from "./chunk-DALBYUPC.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.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/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.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/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.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/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.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/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.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/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.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/store/marks.js
155
- import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
156
- var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
157
- var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
158
- var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
159
- var readJson = /* @__PURE__ */ __name((path) => {
160
- try {
161
- return JSON.parse(readFileSync(path, "utf8"));
162
- } catch (error) {
163
- if (error.code === "ENOENT")
164
- return null;
165
- throw error;
166
- }
167
- }, "readJson");
168
- var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
169
- try {
170
- refuseOwnerStoreInTests(store);
171
- return false;
172
- } catch {
173
- return true;
174
- }
175
- }, "ownerStoreInTests");
176
- var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
177
- var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
178
- const failure = sqliteFailure(error);
179
- if (!isStoreDamage(failure) || ownerStoreInTests(store))
180
- return false;
181
- const inode = inodeOf(store);
182
- if (inode === void 0)
183
- return false;
184
- const mark = {
185
- at: new Date(now()).toISOString(),
186
- command,
187
- ...version ? { cli_version: version } : {},
188
- ...runId ? { run_id: runId } : {},
189
- error: failure.message.slice(0, 500),
190
- inode
191
- };
192
- try {
193
- writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
194
- `, { flag: "wx", mode: 384 });
195
- return true;
196
- } catch {
197
- return false;
198
- }
199
- }, "markStoreDamaged");
200
- var readDamageMark = /* @__PURE__ */ __name((store) => {
201
- const path = damageMarkPath(store);
202
- let mark;
203
- try {
204
- mark = readJson(path);
205
- } catch {
206
- return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
207
- }
208
- if (mark === null)
209
- return null;
210
- if (mark.inode !== inodeOf(store)) {
211
- clearDamageMark(store);
212
- return null;
213
- }
214
- return mark;
215
- }, "readDamageMark");
216
- var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
217
- var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
218
- const mark = readDamageMark(store);
219
- if (!mark)
220
- return;
221
- 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" });
222
- }, "refuseDamagedStore");
223
- var readHealthMark = /* @__PURE__ */ __name((store) => {
224
- try {
225
- return readJson(healthMarkPath(store));
226
- } catch {
227
- return null;
228
- }
229
- }, "readHealthMark");
230
- var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
231
- const previous = readHealthMark(store);
232
- if (ownerStoreInTests(store))
233
- return { previous, cleared: null };
234
- const checkedAt = new Date(now()).toISOString();
235
- const mark = {
236
- checked_at: checkedAt,
237
- ok: health.ok,
238
- problems: health.problems ?? 0,
239
- schema,
240
- cli,
241
- ...version ? { cli_version: version } : {},
242
- last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
243
- };
244
- const cleared = health.ok ? readDamageMark(store) : null;
245
- try {
246
- writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
247
- `, { mode: 384 });
248
- } catch {
249
- }
250
- if (cleared)
251
- clearDamageMark(store);
252
- return { previous, cleared };
253
- }, "recordDeepCheck");
254
-
255
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/entities/fields.js
256
- var text = string();
257
- var id = pipe(string(), minLength(1));
258
- var time = isoTime;
259
- var zonedTime = pipe(string(), isoTimestamp("an ISO 8601 time with a zone"));
260
- var count = pipe(number(), integer(), minValue(0));
261
- var untrusted = optional(array(text));
262
- var providerMetadata = optional(record(string(), unknown()));
263
- var evidenceSource = strictObject({
264
- ref: nullable(reference),
265
- kind: text,
266
- title: nullable(text),
267
- sender: nullable(text),
268
- at: nullable(time),
269
- excerpt: nullable(text),
270
- tool: nullable(text),
271
- missing: boolean()
272
- });
273
- var author = strictObject({
274
- type: picklist(["person", "bot"]),
275
- id,
276
- name: nullable(text)
277
- });
278
-
279
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
280
- var organization = strictObject({
281
- id,
282
- ref: reference,
283
- kind: picklist(["company", "team", "family", "community"]),
284
- name: text,
285
- scope: picklist(["personal", "work"]),
286
- created_at: time
287
- });
288
- var project = strictObject({
289
- id,
290
- ref: reference,
291
- key: text,
292
- name: text,
293
- kind: picklist(["project", "inbox"]),
294
- type: picklist(["work", "client", "personal", "oss", "other"]),
295
- organization_id: nullable(id),
296
- scope: picklist(["personal", "work"]),
297
- created_at: time
298
- });
299
- var reminder = strictObject({
300
- id,
301
- task: text,
302
- due_at: time,
303
- timezone: text,
304
- state: picklist(["pending", "leased", "delivered", "cancelled"]),
305
- revision: number(),
306
- receipt: nullable(text)
307
- });
308
-
309
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/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
- text,
335
- id,
336
- time,
337
- zonedTime,
338
- count,
339
- untrusted,
340
- providerMetadata,
341
- evidenceSource,
342
- author,
343
- TASK_KINDS,
344
- TASK_STATES,
345
- CLOSED_STATES,
346
- TASK_ORIGINS,
347
- TASK_VERDICTS,
348
- isClosedState,
349
- PRIORITY_LABELS,
350
- priorityLabel,
351
- priorityBand,
352
- legacyPriority,
353
- checkedScore,
354
- priorityOf,
355
- priorityOption,
356
- createTaskService,
357
- matches,
358
- FACT_STATUSES,
359
- MEMORY_KINDS,
360
- MEMORY_STATUSES,
361
- MEMORY_SCOPES,
362
- WORK_TASK_TYPES,
363
- TASK_TYPES,
364
- damageMarkPath,
365
- healthMarkPath,
366
- markStoreDamaged,
367
- readDamageMark,
368
- clearDamageMark,
369
- refuseDamagedStore,
370
- readHealthMark,
371
- recordDeepCheck,
372
- organization,
373
- project,
374
- reminder,
375
- LINK_KINDS,
376
- LINK_ORIGINS,
377
- LINK_SOURCES,
378
- linkKind,
379
- COUNTERPART_ROLE
380
- };
@@ -1,35 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- SCHEMA_DIALECT,
5
- commandContract,
6
- commandPathOf,
7
- findCommand,
8
- outputOf
9
- } from "./chunk-WQRX4RQS.js";
10
- import "./chunk-4YTX5YAU.js";
11
- import "./chunk-B6GITVDX.js";
12
- import "./chunk-ZYHBMDNU.js";
13
- import "./chunk-JO4BJYVE.js";
14
- import "./chunk-FHCOGR7S.js";
15
- import "./chunk-SCH3NC5X.js";
16
- import "./chunk-B4MWHI2V.js";
17
- import "./chunk-TEL2OMS5.js";
18
- import "./chunk-6FSLEARF.js";
19
- import "./chunk-ELGEHZK2.js";
20
- import "./chunk-ETIUB2DF.js";
21
- import "./chunk-KJQZXCNK.js";
22
- import "./chunk-5Y2WRUYP.js";
23
- import "./chunk-QZLK2ISN.js";
24
- import "./chunk-LLYVBO3R.js";
25
- import "./chunk-GOMJNH56.js";
26
- import "./chunk-Y5E2WNWB.js";
27
- import "./chunk-DALBYUPC.js";
28
- import "./chunk-ZVVMGPBJ.js";
29
- export {
30
- SCHEMA_DIALECT,
31
- commandContract,
32
- commandPathOf,
33
- findCommand,
34
- outputOf
35
- };
@@ -1,33 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- WIRECAT_TOOLS,
5
- firstScreen,
6
- installHelp
7
- } from "./chunk-SETCGPFG.js";
8
- import "./chunk-WQRX4RQS.js";
9
- import "./chunk-HTQTIKWP.js";
10
- import "./chunk-4YTX5YAU.js";
11
- import "./chunk-B6GITVDX.js";
12
- import "./chunk-ZYHBMDNU.js";
13
- import "./chunk-JO4BJYVE.js";
14
- import "./chunk-FHCOGR7S.js";
15
- import "./chunk-SCH3NC5X.js";
16
- import "./chunk-B4MWHI2V.js";
17
- import "./chunk-TEL2OMS5.js";
18
- import "./chunk-6FSLEARF.js";
19
- import "./chunk-ELGEHZK2.js";
20
- import "./chunk-ETIUB2DF.js";
21
- import "./chunk-KJQZXCNK.js";
22
- import "./chunk-5Y2WRUYP.js";
23
- import "./chunk-QZLK2ISN.js";
24
- import "./chunk-LLYVBO3R.js";
25
- import "./chunk-GOMJNH56.js";
26
- import "./chunk-Y5E2WNWB.js";
27
- import "./chunk-DALBYUPC.js";
28
- import "./chunk-ZVVMGPBJ.js";
29
- export {
30
- WIRECAT_TOOLS,
31
- firstScreen,
32
- installHelp
33
- };
@@ -1,65 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- PER_RUN,
5
- createServer,
6
- envelope,
7
- serveOverHttpUntilStopped,
8
- serveOverStdio
9
- } from "./chunk-JDKC7EXM.js";
10
- import "./chunk-R4RAWEMV.js";
11
- import "./chunk-4PNIZUEC.js";
12
- import "./chunk-5J4WNTTM.js";
13
- import "./chunk-S2U5BXWS.js";
14
- import "./chunk-OMW37FXK.js";
15
- import "./chunk-7SIWMF77.js";
16
- import "./chunk-HGV7DSSA.js";
17
- import "./chunk-5D4AEUVA.js";
18
- import "./chunk-UA4BOLIY.js";
19
- import "./chunk-CNYQ3TTZ.js";
20
- import "./chunk-7DFWXIY5.js";
21
- import "./chunk-2BAO4T4Z.js";
22
- import "./chunk-AFPETMXZ.js";
23
- import "./chunk-NEDYKKJJ.js";
24
- import "./chunk-FIZWQTUC.js";
25
- import "./chunk-IMIY7HQB.js";
26
- import "./chunk-WQRX4RQS.js";
27
- import "./chunk-4YTX5YAU.js";
28
- import "./chunk-B6GITVDX.js";
29
- import "./chunk-ZYHBMDNU.js";
30
- import "./chunk-JO4BJYVE.js";
31
- import "./chunk-3QVGB2CI.js";
32
- import "./chunk-3DQYO7FB.js";
33
- import "./chunk-FHCOGR7S.js";
34
- import "./chunk-HN6PB7F5.js";
35
- import "./chunk-SCH3NC5X.js";
36
- import "./chunk-FVKZ55I2.js";
37
- import "./chunk-5AQ4S4TZ.js";
38
- import "./chunk-B4MWHI2V.js";
39
- import "./chunk-TEL2OMS5.js";
40
- import "./chunk-6FSLEARF.js";
41
- import "./chunk-ELGEHZK2.js";
42
- import "./chunk-UTLJQG6Q.js";
43
- import "./chunk-ETIUB2DF.js";
44
- import "./chunk-NKDYHAHP.js";
45
- import "./chunk-AHRHP2H2.js";
46
- import "./chunk-KJQZXCNK.js";
47
- import "./chunk-5Y2WRUYP.js";
48
- import "./chunk-UHC5I3JV.js";
49
- import "./chunk-QZLK2ISN.js";
50
- import "./chunk-D72URWJE.js";
51
- import "./chunk-5Z7LZAVP.js";
52
- import "./chunk-5AS5N7V5.js";
53
- import "./chunk-LLYVBO3R.js";
54
- import "./chunk-GOMJNH56.js";
55
- import "./chunk-Y5E2WNWB.js";
56
- import "./chunk-DALBYUPC.js";
57
- import "./chunk-XV3M3NAN.js";
58
- import "./chunk-ZVVMGPBJ.js";
59
- export {
60
- PER_RUN,
61
- createServer,
62
- envelope,
63
- serveOverHttpUntilStopped,
64
- serveOverStdio
65
- };
@@ -1,54 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- buildStems,
5
- storeMaintenanceCommands,
6
- storeSummary
7
- } from "./chunk-HRIYU2HJ.js";
8
- import "./chunk-I3YNNSGB.js";
9
- import "./chunk-CNYQ3TTZ.js";
10
- import "./chunk-7DFWXIY5.js";
11
- import "./chunk-2BAO4T4Z.js";
12
- import "./chunk-AFPETMXZ.js";
13
- import "./chunk-NEDYKKJJ.js";
14
- import "./chunk-FIZWQTUC.js";
15
- import "./chunk-5QQOUYNA.js";
16
- import "./chunk-IMIY7HQB.js";
17
- import "./chunk-HTQTIKWP.js";
18
- import "./chunk-4YTX5YAU.js";
19
- import "./chunk-B6GITVDX.js";
20
- import "./chunk-ZYHBMDNU.js";
21
- import "./chunk-JO4BJYVE.js";
22
- import "./chunk-3QVGB2CI.js";
23
- import "./chunk-3DQYO7FB.js";
24
- import "./chunk-FHCOGR7S.js";
25
- import "./chunk-HN6PB7F5.js";
26
- import "./chunk-SCH3NC5X.js";
27
- import "./chunk-FVKZ55I2.js";
28
- import "./chunk-5AQ4S4TZ.js";
29
- import "./chunk-B4MWHI2V.js";
30
- import "./chunk-TEL2OMS5.js";
31
- import "./chunk-6FSLEARF.js";
32
- import "./chunk-ELGEHZK2.js";
33
- import "./chunk-UTLJQG6Q.js";
34
- import "./chunk-ETIUB2DF.js";
35
- import "./chunk-NKDYHAHP.js";
36
- import "./chunk-AHRHP2H2.js";
37
- import "./chunk-KJQZXCNK.js";
38
- import "./chunk-5Y2WRUYP.js";
39
- import "./chunk-UHC5I3JV.js";
40
- import "./chunk-QZLK2ISN.js";
41
- import "./chunk-D72URWJE.js";
42
- import "./chunk-5Z7LZAVP.js";
43
- import "./chunk-5AS5N7V5.js";
44
- import "./chunk-LLYVBO3R.js";
45
- import "./chunk-GOMJNH56.js";
46
- import "./chunk-Y5E2WNWB.js";
47
- import "./chunk-DALBYUPC.js";
48
- import "./chunk-XV3M3NAN.js";
49
- import "./chunk-ZVVMGPBJ.js";
50
- export {
51
- buildStems,
52
- storeMaintenanceCommands,
53
- storeSummary
54
- };