@wirecat/cli-memo 0.131.30 → 0.131.32

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 (133) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{all-profiles-4XCG2A54.js → all-profiles-PFCNICOF.js} +5 -5
  3. package/dist/bundle/{anthropic-MAVIW4DJ.js → anthropic-QLGMYWVZ.js} +3 -3
  4. package/dist/bundle/{app-server-LGSYLIB3.js → app-server-QD67I7V2.js} +35 -35
  5. package/dist/bundle/auto-PZKJQ3FL.js +86 -0
  6. package/dist/bundle/{bun-XWUEHWDW.js → bun-JRTUGKIJ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-OSAC45TI.js → bun-sqlite-HCZP2CNO.js} +2 -2
  8. package/dist/bundle/{chunk-3V5JXPGK.js → chunk-2N74ZVI6.js} +1 -1
  9. package/dist/bundle/{chunk-Q3XFJOAY.js → chunk-2XBDA3XF.js} +1 -1
  10. package/dist/bundle/{chunk-SIY75R4D.js → chunk-3G44GDIZ.js} +5 -5
  11. package/dist/bundle/{chunk-TIU2N2SP.js → chunk-42I4XE3O.js} +20 -20
  12. package/dist/bundle/{chunk-RCPP2Q5O.js → chunk-4D6BG353.js} +6 -6
  13. package/dist/bundle/{chunk-IIXZMACE.js → chunk-54DA525P.js} +9 -9
  14. package/dist/bundle/{chunk-2NEXX3EI.js → chunk-5BVGJBZX.js} +1 -1
  15. package/dist/bundle/{chunk-5CKE7LAP.js → chunk-5JTW3LNF.js} +1 -1
  16. package/dist/bundle/{chunk-XDQIJSJE.js → chunk-5OYZNBE7.js} +1 -1
  17. package/dist/bundle/{chunk-RUWY43XR.js → chunk-63JF4E76.js} +480 -256
  18. package/dist/bundle/{chunk-UGV57SZH.js → chunk-7AMJFTJM.js} +1 -1
  19. package/dist/bundle/{chunk-MLDBSKW6.js → chunk-7JWW4YEK.js} +8 -8
  20. package/dist/bundle/{chunk-UVO7UNYH.js → chunk-7MKROF5R.js} +1 -1
  21. package/dist/bundle/{chunk-YJSCSLAT.js → chunk-A56GDMFH.js} +3 -3
  22. package/dist/bundle/{chunk-CYUP7HQG.js → chunk-ARVXP2UJ.js} +258 -258
  23. package/dist/bundle/{chunk-TIQUMRSO.js → chunk-AZGQ7ABE.js} +150 -150
  24. package/dist/bundle/{chunk-DYNSZDXG.js → chunk-CGI5EIIA.js} +20 -20
  25. package/dist/bundle/{chunk-UXGQXP5U.js → chunk-CUT72KGN.js} +3 -3
  26. package/dist/bundle/{chunk-XV7YW65Y.js → chunk-CV5EXF7J.js} +4 -4
  27. package/dist/bundle/{chunk-76MMXZ3W.js → chunk-CWHGN6HC.js} +4 -4
  28. package/dist/bundle/{chunk-EJZKYJKO.js → chunk-FE2SLKUO.js} +2 -2
  29. package/dist/bundle/{chunk-HWJHWNBW.js → chunk-FGJKBQCP.js} +3 -3
  30. package/dist/bundle/{chunk-KJE2KFYH.js → chunk-GKZ65EOY.js} +54 -54
  31. package/dist/bundle/{chunk-PJM4QQBT.js → chunk-GNY5YLNY.js} +2 -2
  32. package/dist/bundle/{chunk-GW2KCP4G.js → chunk-H24AL555.js} +27 -27
  33. package/dist/bundle/{program-4UU6HJQM.js → chunk-HGXTDMKN.js} +1498 -10061
  34. package/dist/bundle/{chunk-6ZVN4S36.js → chunk-HLJ6IUVF.js} +2 -2
  35. package/dist/bundle/{chunk-VDGKBAS2.js → chunk-JTSYAO5V.js} +274 -274
  36. package/dist/bundle/{chunk-MHHLYRRD.js → chunk-K3CJHSLS.js} +1 -1
  37. package/dist/bundle/{chunk-QQBRNKHQ.js → chunk-K3TUIQZ4.js} +43 -43
  38. package/dist/bundle/{chunk-5R3OXHIN.js → chunk-K6ZWFP2X.js} +1 -1
  39. package/dist/bundle/{chunk-7VJZKUN3.js → chunk-L34KLQIU.js} +9 -9
  40. package/dist/bundle/{chunk-N4AWIP4D.js → chunk-MG2JNBUV.js} +5 -5
  41. package/dist/bundle/{chunk-CNAOMV43.js → chunk-NDJUEFV2.js} +1 -1
  42. package/dist/bundle/{chunk-6SE6ZDBF.js → chunk-NG26I3JV.js} +1 -1
  43. package/dist/bundle/{chunk-M3REIIOH.js → chunk-PG4KORTB.js} +1 -1
  44. package/dist/bundle/{chunk-H52RNBPU.js → chunk-Q2ZIIXA2.js} +2 -2
  45. package/dist/bundle/{chunk-JHLGFPMK.js → chunk-Q3ZB4JGL.js} +2 -2
  46. package/dist/bundle/{chunk-GN3U74DV.js → chunk-QUQOKNAX.js} +12 -12
  47. package/dist/bundle/{chunk-GSCFCNGO.js → chunk-QWA3MTHH.js} +7 -7
  48. package/dist/bundle/{chunk-S34FLB7K.js → chunk-REUXOW2O.js} +2 -2
  49. package/dist/bundle/{chunk-EEKOBGQ7.js → chunk-RO4YPDGF.js} +1 -1
  50. package/dist/bundle/{chunk-DIQAOLWH.js → chunk-RRDXT63A.js} +1 -1
  51. package/dist/bundle/{chunk-U5PEYBQT.js → chunk-RTFU72GD.js} +4 -4
  52. package/dist/bundle/{chunk-WUV5O5HN.js → chunk-S3FQQRUM.js} +4 -4
  53. package/dist/bundle/{chunk-DIT5NA73.js → chunk-TFEXCHMC.js} +5 -5
  54. package/dist/bundle/{chunk-UBYCWQSV.js → chunk-URPBRYVA.js} +4 -4
  55. package/dist/bundle/{chunk-B6S42B6J.js → chunk-USMKR34T.js} +11 -11
  56. package/dist/bundle/{chunk-D6BK3H4D.js → chunk-UXA37BVT.js} +4 -4
  57. package/dist/bundle/{chunk-SQHIXN2N.js → chunk-W4GV42D5.js} +2 -2
  58. package/dist/bundle/{chunk-USLIHXWA.js → chunk-WGX6AEUP.js} +3 -3
  59. package/dist/bundle/{chunk-K6Z6B2CW.js → chunk-WP3J2FNH.js} +10 -10
  60. package/dist/bundle/{chunk-U6NL7SAX.js → chunk-X3GQJTTF.js} +5 -5
  61. package/dist/bundle/{chunk-3DXTHN5C.js → chunk-X6HXGL5E.js} +7 -7
  62. package/dist/bundle/{chunk-NUEIRBKY.js → chunk-XUMYVRBZ.js} +1 -1
  63. package/dist/bundle/{chunk-Z7J7SVZJ.js → chunk-XWIRWBB5.js} +1 -1
  64. package/dist/bundle/{chunk-YUEAM6ZP.js → chunk-ZHDOELM7.js} +7 -7
  65. package/dist/bundle/{command-contract-ZLDRM6DG.js → command-contract-DFXPO5Q7.js} +11 -11
  66. package/dist/bundle/{decode-Y2DWOSOW.js → decode-7NGILAKQ.js} +2 -2
  67. package/dist/bundle/{echarts-2ZHQHZ4R.js → echarts-JERQI2HW.js} +2 -2
  68. package/dist/bundle/{embed-JEER47U6.js → embed-3AO7KZXC.js} +3 -3
  69. package/dist/bundle/{embedder-BJQEGCE5.js → embedder-WRQ7TDDB.js} +6 -6
  70. package/dist/bundle/{entry-YKH7GAX7.js → entry-IBRPU7NO.js} +4 -4
  71. package/dist/bundle/failure-46JTICYP.js +66 -0
  72. package/dist/bundle/{first-run-ESH5B55J.js → first-run-IJOREEQM.js} +5 -5
  73. package/dist/bundle/{first-screen-RTATNK4S.js → first-screen-KYNY6ELY.js} +12 -12
  74. package/dist/bundle/{instructions-NJYYRMYK.js → instructions-BET2PLGV.js} +1 -1
  75. package/dist/bundle/{mcp-ZRKYZLNM.js → mcp-NUBFFPGF.js} +35 -35
  76. package/dist/bundle/memo.js +6 -6
  77. package/dist/bundle/{node-DBNZMTJO.js → node-NCSG7QX5.js} +2 -2
  78. package/dist/bundle/{node-sqlite-CCNVCZSG.js → node-sqlite-QL4M5RIK.js} +3 -3
  79. package/dist/bundle/{oauth-UV7KBQFP.js → oauth-BGMMED35.js} +4 -4
  80. package/dist/bundle/{open-VTOLLLS4.js → open-YN3KJMMQ.js} +2 -2
  81. package/dist/bundle/{openai-RTJNHBCG.js → openai-CTZUSKUS.js} +7 -7
  82. package/dist/bundle/{process-TAFRBB53.js → process-DW237TK4.js} +1 -1
  83. package/dist/bundle/program-RAUHPTRG.js +9173 -0
  84. package/dist/bundle/{prompt-ESMCTEJI.js → prompt-EZCCUYCS.js} +2 -2
  85. package/dist/bundle/{recognize-V53GEY6R.js → recognize-XP3LHQD6.js} +1 -1
  86. package/dist/bundle/{remote-KGKRAGA6.js → remote-RLR5ZKKT.js} +4 -4
  87. package/dist/bundle/{rerank-DTD24I7Y.js → rerank-P7LE52AC.js} +4 -4
  88. package/dist/bundle/{serve-2DVSIKM7.js → serve-UA7RQDNK.js} +6 -6
  89. package/dist/bundle/server-N6L3LGQO.js +48 -0
  90. package/dist/bundle/{server-UBMV5OI7.js → server-XM4LNODP.js} +50 -50
  91. package/dist/bundle/server-XU362INX.js +61 -0
  92. package/dist/bundle/{state-ONT6T6PY.js → state-72Y55LBR.js} +3 -3
  93. package/dist/bundle/{store-TOYBDMML.js → store-PED4JCBB.js} +9 -9
  94. package/dist/bundle/store-maintenance-command-B364Q2O4.js +48 -0
  95. package/dist/bundle/update-IWJYYYRI.js +69 -0
  96. package/dist/config.d.ts +11 -0
  97. package/dist/config.d.ts.map +1 -1
  98. package/dist/config.js +19 -0
  99. package/dist/config.js.map +1 -1
  100. package/dist/examples.js +1 -1
  101. package/dist/examples.js.map +1 -1
  102. package/dist/findings/command.d.ts.map +1 -1
  103. package/dist/findings/command.js +4 -4
  104. package/dist/findings/command.js.map +1 -1
  105. package/dist/findings-input.d.ts +7 -0
  106. package/dist/findings-input.d.ts.map +1 -0
  107. package/dist/findings-input.js +13 -0
  108. package/dist/findings-input.js.map +1 -0
  109. package/dist/knowledge/project-actions-command.d.ts.map +1 -1
  110. package/dist/knowledge/project-actions-command.js +4 -4
  111. package/dist/knowledge/project-actions-command.js.map +1 -1
  112. package/dist/mail/findings-command.d.ts +1 -1
  113. package/dist/mail/findings-command.d.ts.map +1 -1
  114. package/dist/mail/findings-command.js +5 -6
  115. package/dist/mail/findings-command.js.map +1 -1
  116. package/dist/mail/review-command.d.ts.map +1 -1
  117. package/dist/mail/review-command.js +2 -0
  118. package/dist/mail/review-command.js.map +1 -1
  119. package/dist/schedule/command.d.ts.map +1 -1
  120. package/dist/schedule/command.js +4 -3
  121. package/dist/schedule/command.js.map +1 -1
  122. package/dist/version.d.ts +1 -1
  123. package/dist/version.js +1 -1
  124. package/package.json +2 -2
  125. package/skills/mail-triage/SKILL.md +15 -10
  126. package/dist/bundle/auto-72Y6UJWK.js +0 -86
  127. package/dist/bundle/chunk-GACW4GZZ.js +0 -452
  128. package/dist/bundle/failure-JE2JCLGO.js +0 -66
  129. package/dist/bundle/server-ODWZJIRX.js +0 -48
  130. package/dist/bundle/server-V5YRZZID.js +0 -61
  131. package/dist/bundle/store-maintenance-command-HIMIMWFU.js +0 -48
  132. package/dist/bundle/update-AO5UWEBY.js +0 -69
  133. /package/dist/bundle/{chunk-G6I5A2N3.js → chunk-QPPNLE7G.js} +0 -0
@@ -1,452 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- require_dist
5
- } from "./chunk-QP3KNC5D.js";
6
- import {
7
- SCHEDULE_SETTINGS,
8
- scheduleLimitsOf
9
- } from "./chunk-RUWY43XR.js";
10
- import {
11
- knownPermissionKeys
12
- } from "./chunk-TIU2N2SP.js";
13
- import {
14
- KEEP_RUNS_FOR_DAYS,
15
- KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
16
- RUNS_SIZE_LIMIT_MB,
17
- checkConfigText,
18
- issueMessage,
19
- readConfigFile,
20
- readConfigText,
21
- settingPathOf,
22
- withSettingDefaults,
23
- withoutSetting
24
- } from "./chunk-TIQUMRSO.js";
25
- import {
26
- DEFAULT_DECISION_POLICY
27
- } from "./chunk-VDGKBAS2.js";
28
- import {
29
- configFilePath,
30
- resolvePaths,
31
- saveConfigFile
32
- } from "./chunk-TZ7WDQPD.js";
33
- import {
34
- array,
35
- boolean,
36
- integer,
37
- literal,
38
- minLength,
39
- minValue,
40
- number,
41
- optional,
42
- picklist,
43
- pipe,
44
- record,
45
- regex,
46
- strictObject,
47
- string,
48
- union,
49
- unknown
50
- } from "./chunk-G2BB5WY5.js";
51
- import {
52
- CliError
53
- } from "./chunk-EB2IULWB.js";
54
- import {
55
- __name,
56
- __toESM
57
- } from "./chunk-ZVVMGPBJ.js";
58
-
59
- // dist/config-issues.js
60
- var pathOf = /* @__PURE__ */ __name((command) => {
61
- const words = [];
62
- for (let at = command; at.parent; at = at.parent)
63
- words.unshift(at.name());
64
- return words;
65
- }, "pathOf");
66
- var permissionKeyOf = /* @__PURE__ */ __name((command) => pathOf(command).join(".") || null, "permissionKeyOf");
67
- var memoPermissionKeys = /* @__PURE__ */ __name((program) => knownPermissionKeys(program, permissionKeyOf, ["mcp.authority"]), "memoPermissionKeys");
68
-
69
- // dist/notes/files.js
70
- import { closeSync, openSync, readdirSync, readSync } from "node:fs";
71
- import { join, relative, sep } from "node:path";
72
- var NOTE_EXTENSIONS = [
73
- ".md",
74
- ".markdown",
75
- ".txt",
76
- ".csv",
77
- ".tsv",
78
- ".pdf",
79
- ".docx",
80
- ".xlsx",
81
- ".odt",
82
- ".ods",
83
- ".pptx",
84
- ".epub",
85
- ".doc",
86
- ".xls"
87
- ];
88
- var MEMO_ID = /^---\r?\n(?:[^\n]*\n)*?memo-id:[ \t]*["']?([^"'\s]+)/;
89
- var HEAD = 1024;
90
- var readMemoId = /* @__PURE__ */ __name((path) => {
91
- const buffer = Buffer.alloc(HEAD);
92
- const descriptor = openSync(path, "r");
93
- try {
94
- const head = buffer.subarray(0, readSync(descriptor, buffer, 0, HEAD, 0)).toString("utf8");
95
- const end = head.indexOf("\n---", 3);
96
- return MEMO_ID.exec(end < 0 ? head : head.slice(0, end + 1))?.[1] ?? null;
97
- } finally {
98
- closeSync(descriptor);
99
- }
100
- }, "readMemoId");
101
- var TEXT_NOTE = /\.(md|markdown)$/i;
102
- var isExported = /* @__PURE__ */ __name((path) => TEXT_NOTE.test(path) && readMemoId(path) !== null, "isExported");
103
- var pattern = /* @__PURE__ */ __name((rule) => {
104
- const glob = rule.replace(/\\/g, "/").replace(/^\/+|\/+$/g, "");
105
- const body = glob.split(/(\*\*\/?|\*|\?)/).map((part) => part === "**/" || part === "**" ? ".*" : part === "*" ? "[^/]*" : part === "?" ? "[^/]" : part.replace(/[.+^${}()|[\]\\]/g, "\\$&")).join("");
106
- return new RegExp(`^${body}(/.*)?$`, "i");
107
- }, "pattern");
108
- var matcher = /* @__PURE__ */ __name((rules) => {
109
- const patterns = rules.map(pattern);
110
- return (inside) => patterns.some((rule) => rule.test(inside));
111
- }, "matcher");
112
- var noteFiles = /* @__PURE__ */ __name((folder, ignore = [], extensions = NOTE_EXTENSIONS, { skipExported = true } = {}) => {
113
- const matches = matcher(ignore);
114
- const ignored = /* @__PURE__ */ __name((path) => matches(relative(folder, path).split(sep).join("/")), "ignored");
115
- const walk = /* @__PURE__ */ __name((dir) => readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
116
- if (entry.name.startsWith("."))
117
- return [];
118
- const path = join(dir, entry.name);
119
- if (ignored(path))
120
- return [];
121
- if (entry.isDirectory())
122
- return walk(path);
123
- if (!entry.isFile() || !extensions.some((ext) => entry.name.toLowerCase().endsWith(ext)))
124
- return [];
125
- return skipExported && isExported(path) ? [] : [path];
126
- }), "walk");
127
- return walk(folder);
128
- }, "noteFiles");
129
-
130
- // dist/notes/dialects/common.js
131
- var import_yaml = __toESM(require_dist(), 1);
132
- import { posix } from "node:path";
133
- var FRONT_MATTER = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/;
134
- var REFERENCE = /^(msg|note|document|person|organization|project|task|chat|contact):\S+$/;
135
- var BARE_REFERENCE = /(?<![\w/:])((?:msg|note|document|person|organization|project|task|chat|contact):[^\s<>()[\]"'`]+)/g;
136
- var MAX_LINKS = 200;
137
- var isReference = /* @__PURE__ */ __name((target) => REFERENCE.test(target), "isReference");
138
- var splitFrontMatter = /* @__PURE__ */ __name((text) => {
139
- const match = FRONT_MATTER.exec(text);
140
- if (!match)
141
- return { frontMatter: {}, body: text };
142
- let data;
143
- try {
144
- data = (0, import_yaml.parse)(match[1] ?? "");
145
- } catch {
146
- data = null;
147
- }
148
- const frontMatter = data !== null && typeof data === "object" && !Array.isArray(data) ? data : {};
149
- return { frontMatter, body: text.slice(match[0].length) };
150
- }, "splitFrontMatter");
151
- var strings = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.split(/[,\s]+/).map((item) => item.trim()).filter(Boolean) : Array.isArray(value) ? value.filter((item) => typeof item === "string").map((item) => item.trim()) : [], "strings");
152
- var frontMatterAliases = /* @__PURE__ */ __name((frontMatter) => {
153
- const value = frontMatter.aliases ?? frontMatter.alias;
154
- return typeof value === "string" ? [value.trim()] : strings(value);
155
- }, "frontMatterAliases");
156
- var frontMatterTags = /* @__PURE__ */ __name((frontMatter) => strings(frontMatter.tags ?? frontMatter.tag).map((tag) => tag.replace(/^#/, "")), "frontMatterTags");
157
- var withoutCode = /* @__PURE__ */ __name((body) => body.replace(/^(```|~~~)[^\n]*\n[\s\S]*?^\1[^\n]*$/gm, "").replace(/`[^`\n]*`/g, ""), "withoutCode");
158
- var titleOf = /* @__PURE__ */ __name((frontMatter, body, path) => {
159
- if (typeof frontMatter.title === "string" && frontMatter.title.trim())
160
- return frontMatter.title.trim();
161
- const heading = /^#\s+(.+?)\s*#*\s*$/m.exec(withoutCode(body))?.[1];
162
- return heading ?? posix.basename(path.replace(/\\/g, "/")).replace(/\.[^./]+$/, "");
163
- }, "titleOf");
164
- var dropNoteExtension = /* @__PURE__ */ __name((target) => target.replace(/\.(md|markdown)$/i, ""), "dropNoteExtension");
165
- var bareReferences = /* @__PURE__ */ __name((body) => [...body.matchAll(BARE_REFERENCE)].map((match) => ({
166
- target: (match[1] ?? "").replace(/[.,;:!?]+$/, ""),
167
- anchor: null,
168
- label: null
169
- })), "bareReferences");
170
- var dedupe = /* @__PURE__ */ __name((links) => {
171
- const seen = /* @__PURE__ */ new Set();
172
- return links.filter((link) => {
173
- const key = `${link.target}\0${link.anchor ?? ""}\0${link.label ?? ""}`;
174
- if (seen.has(key))
175
- return false;
176
- seen.add(key);
177
- return true;
178
- }).slice(0, MAX_LINKS);
179
- }, "dedupe");
180
- var parsedNote = /* @__PURE__ */ __name((frontMatter, body, path, links, inlineTags2 = []) => ({
181
- title: titleOf(frontMatter, body, path),
182
- aliases: frontMatterAliases(frontMatter),
183
- tags: [.../* @__PURE__ */ new Set([...frontMatterTags(frontMatter), ...inlineTags2])],
184
- links: dedupe(links),
185
- frontMatter
186
- }), "parsedNote");
187
- var renderNote = /* @__PURE__ */ __name((note, link) => {
188
- const frontMatter = {
189
- ...note.frontMatter,
190
- ...note.aliases.length ? { aliases: note.aliases } : {},
191
- ...note.tags.length ? { tags: note.tags } : {}
192
- };
193
- const head = Object.keys(frontMatter).length ? `---
194
- ${(0, import_yaml.stringify)(frontMatter).trimEnd()}
195
- ---
196
- ` : "";
197
- const links = note.links.length ? `
198
-
199
- ${note.links.map((item) => `- ${link(item)}`).join("\n")}` : "";
200
- return `${head}# ${note.title}
201
-
202
- ${note.text.trimEnd()}${links}
203
- `;
204
- }, "renderNote");
205
-
206
- // dist/notes/dialects/markdown.js
207
- var LINK = /(?<!!)\[([^\]\n]*)\]\(\s*(<[^>\n]+>|[^)\s]+)(?:\s+"[^"\n]*")?\s*\)/g;
208
- var SCHEME = /^[a-z][a-z0-9+.-]*:/i;
209
- var decode = /* @__PURE__ */ __name((value) => {
210
- try {
211
- return decodeURIComponent(value);
212
- } catch {
213
- return value;
214
- }
215
- }, "decode");
216
- var linkOf = /* @__PURE__ */ __name((label, destination) => {
217
- const angled = destination.startsWith("<") && destination.endsWith(">");
218
- const raw = angled ? destination.slice(1, -1) : destination;
219
- if (isReference(raw))
220
- return { target: raw, anchor: null, label: label.trim() || null };
221
- if (SCHEME.test(raw))
222
- return null;
223
- const hash = raw.indexOf("#");
224
- const path = hash < 0 ? raw : raw.slice(0, hash);
225
- const fragment = hash < 0 ? null : raw.slice(hash + 1);
226
- return {
227
- target: dropNoteExtension(angled ? path : decode(path)).trim(),
228
- anchor: fragment === null ? null : `#${angled ? fragment : decode(fragment)}`,
229
- label: label.trim() || null
230
- };
231
- }, "linkOf");
232
- var markdownLinks = /* @__PURE__ */ __name((body) => [...withoutCode(body).matchAll(LINK)].map((match) => linkOf(match[1] ?? "", match[2] ?? "")).filter((link) => link !== null), "markdownLinks");
233
- var stripMarkdownLinks = /* @__PURE__ */ __name((body) => body.replace(LINK, " "), "stripMarkdownLinks");
234
- var hasOwnExtension = /* @__PURE__ */ __name((target) => NOTE_EXTENSIONS.some((extension) => target.toLowerCase().endsWith(extension)), "hasOwnExtension");
235
- var markdownLink = /* @__PURE__ */ __name((link) => {
236
- if (isReference(link.target))
237
- return `[${link.label ?? link.target}](${link.target})`;
238
- const file = hasOwnExtension(link.target) ? link.target : `${link.target}.md`;
239
- const label = link.label ?? link.target.split("/").pop() ?? link.target;
240
- return `[${label}](<${file}${link.anchor ?? ""}>)`;
241
- }, "markdownLink");
242
- var markdown = {
243
- name: "markdown",
244
- parse(text, path) {
245
- const { frontMatter, body } = splitFrontMatter(text);
246
- const links = markdownLinks(body);
247
- return parsedNote(frontMatter, body, path, [...links, ...bareReferences(withoutCode(stripMarkdownLinks(body)))]);
248
- },
249
- render: /* @__PURE__ */ __name((note) => renderNote(note, markdownLink), "render")
250
- };
251
-
252
- // dist/notes/dialects/obsidian.js
253
- var WIKI = /!?\[\[([^\]|\n]+)(?:\|([^\]\n]*))?\]\]/g;
254
- var TAG = /(?<![\p{L}\p{N}_#&/])#([\p{L}_][\p{L}\p{N}_/-]*)/gu;
255
- var wikiLinks = /* @__PURE__ */ __name((body) => [...withoutCode(body).matchAll(WIKI)].map((match) => {
256
- const raw = (match[1] ?? "").trim();
257
- const label = match[2]?.trim() || null;
258
- if (isReference(raw))
259
- return { target: raw, anchor: null, label };
260
- const split = raw.search(/[#^]/);
261
- return {
262
- target: dropNoteExtension(split < 0 ? raw : raw.slice(0, split)).trim(),
263
- anchor: split < 0 ? null : raw.slice(split),
264
- label
265
- };
266
- }), "wikiLinks");
267
- var inlineTags = /* @__PURE__ */ __name((body) => [
268
- ...new Set([...stripMarkdownLinks(withoutCode(body).replace(WIKI, " ")).matchAll(TAG)].map((match) => match[1] ?? ""))
269
- ], "inlineTags");
270
- var wikiLink = /* @__PURE__ */ __name((link) => isReference(link.target) ? markdownLink(link) : `[[${link.target}${link.anchor ?? ""}${link.label ? `|${link.label}` : ""}]]`, "wikiLink");
271
- var obsidian = {
272
- name: "obsidian",
273
- parse(text, path) {
274
- const { frontMatter, body } = splitFrontMatter(text);
275
- const rest = stripMarkdownLinks(withoutCode(body).replace(WIKI, " "));
276
- return parsedNote(frontMatter, body, path, [...wikiLinks(body), ...markdownLinks(body), ...bareReferences(rest)], inlineTags(body));
277
- },
278
- render: /* @__PURE__ */ __name((note) => renderNote(note, wikiLink), "render")
279
- };
280
-
281
- // dist/notes/dialects/types.js
282
- var DIALECTS = ["obsidian", "markdown"];
283
-
284
- // dist/notes/dialects/index.js
285
- var BY_NAME = { obsidian, markdown };
286
- var dialectOf = /* @__PURE__ */ __name((name = "obsidian") => BY_NAME[name], "dialectOf");
287
-
288
- // dist/config.js
289
- var ConfigSchema = strictObject({
290
- permissions: optional(record(string(), picklist(["deny", "readonly", "ask", "allow"]))),
291
- notes: optional(strictObject({
292
- /** A bare path is the form before folder ids; `memo folders add` turns it into an entry. */
293
- folders: array(union([
294
- string(),
295
- strictObject({
296
- id: pipe(string(), minLength(1)),
297
- path: pipe(string(), minLength(1)),
298
- format: optional(picklist(DIALECTS))
299
- })
300
- ])),
301
- ignore: optional(array(string())),
302
- /** `false` keeps notes out of search by meaning: `memo sync` does not embed them. */
303
- embed: optional(boolean()),
304
- /** Where `memo notes export` and `--export` write internal notes when no folder is given. */
305
- export: optional(strictObject({ dir: pipe(string(), minLength(1)), format: optional(picklist(DIALECTS)) }))
306
- })),
307
- auto: optional(strictObject({
308
- enabled: optional(boolean()),
309
- every: optional(string()),
310
- /** MEMO_CONFIG_DIR, MESSAGING_STORE… as they were at `memo jobs start`, passed to every timer run. */
311
- places: optional(record(string(), string()))
312
- })),
313
- /** `false` keeps only failed runs in `memo runs list`. `--record` and `--no-record` win. */
314
- record: optional(boolean()),
315
- keep_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
316
- keep_successful_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
317
- runs_size_limit_mb: optional(pipe(number(), integer(), minValue(1))),
318
- /** `false` leaves what was typed out of a run's command line, `"failed"` out of a successful one; secrets always. */
319
- record_input: optional(union([boolean(), literal("failed")])),
320
- /** `false` stops the once-a-day check for a newer memo. */
321
- update_check: optional(boolean()),
322
- /** `false` stops an agent deciding proposals for you: `projects actions confirm` and `reject` then need you. */
323
- agent_decisions: optional(boolean()),
324
- /** An agent gated on new mail starts once the oldest waiting email waited this long (`30m`), or this many wait. */
325
- schedule_mail_wait: optional(pipe(string(), regex(/^\d+[mhd]$/, "has to be a duration such as 30m or 2h"))),
326
- schedule_mail_batch: optional(pipe(number(), integer(), minValue(1))),
327
- /** US dollars a day of an agent schedule's runs may cost; 0 turns the cap off. */
328
- schedule_max_cost_per_day: optional(pipe(number(), minValue(0))),
329
- /** The model a new agent schedule runs on unless `--model` names one; empty for the harness's own default. */
330
- schedule_model_claude: optional(string()),
331
- schedule_model_codex: optional(string()),
332
- /** `false` lets a new claude agent schedule load your MCP servers, skills, settings and CLAUDE.md. */
333
- schedule_lean_start: optional(boolean()),
334
- /** Retired: memo no longer imports mail, the `mail` CLI does. Still loads so an old config works; doctor names it. */
335
- mail: optional(unknown())
336
- });
337
- var MEMO_SETTINGS = [
338
- {
339
- key: "agent_decisions",
340
- default: DEFAULT_DECISION_POLICY.agentDecisions,
341
- description: "true lets an agent confirm or reject proposals for you; false keeps every decision yours"
342
- },
343
- { key: "update_check", default: true, description: "check once a day for a newer memo" },
344
- { key: "record", default: true, description: "keep every run in memo runs list; false keeps failed runs only" },
345
- {
346
- key: "record_input",
347
- default: true,
348
- description: `keep what was typed in a run's command line: true, false, or "failed" for failed runs only`
349
- },
350
- { key: "keep_runs_for_days", default: KEEP_RUNS_FOR_DAYS, description: "days a run is kept" },
351
- {
352
- key: "keep_successful_runs_for_days",
353
- default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
354
- description: "days a successful run is kept"
355
- },
356
- { key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
357
- { key: "notes.embed", default: true, description: "false keeps notes out of search by meaning" },
358
- ...SCHEDULE_SETTINGS
359
- ];
360
- var configPath = /* @__PURE__ */ __name((env = process.env) => configFilePath(resolvePaths({ appName: "cli-memo", prefix: "MEMO", env }).config), "configPath");
361
- var loadConfig = /* @__PURE__ */ __name((env = process.env) => {
362
- const path = configPath(env);
363
- const read = readConfigText(path);
364
- if ("issue" in read)
365
- throw new CliError("configuration_error", issueMessage([read.issue], "memo doctor"));
366
- if (read.text === void 0)
367
- return {};
368
- const { issues, config } = checkConfigText(read.text, { file: path, tool: "memo", schema: ConfigSchema });
369
- if (issues.length > 0 || config === void 0)
370
- throw new CliError("configuration_error", issueMessage(issues, "memo doctor"));
371
- return config;
372
- }, "loadConfig");
373
- var decisionPolicy = /* @__PURE__ */ __name((env) => {
374
- let agentDecisions = false;
375
- try {
376
- agentDecisions = loadConfig(env).agent_decisions === true;
377
- } catch {
378
- }
379
- return { ...DEFAULT_DECISION_POLICY, agentDecisions };
380
- }, "decisionPolicy");
381
- var scheduleLimits = /* @__PURE__ */ __name((env) => {
382
- try {
383
- return scheduleLimitsOf(loadConfig(env));
384
- } catch {
385
- return {};
386
- }
387
- }, "scheduleLimits");
388
- var inspectConfig = /* @__PURE__ */ __name((env, program) => {
389
- const path = configPath(env);
390
- const read = readConfigText(path);
391
- if ("issue" in read)
392
- return { path, found: true, issues: [read.issue], config: {} };
393
- if (read.text === void 0)
394
- return { path, found: false, issues: [], config: {} };
395
- const { issues, config } = checkConfigText(read.text, {
396
- file: path,
397
- tool: "memo",
398
- schema: ConfigSchema,
399
- knownPermissions: memoPermissionKeys(program)
400
- });
401
- return { path, found: true, issues, config: config ?? {} };
402
- }, "inspectConfig");
403
- var unsetConfigKey = /* @__PURE__ */ __name((key, env = process.env) => {
404
- if (settingPathOf(key).some((part) => part === ""))
405
- throw new CliError("validation_error", `${key} is not a setting path`);
406
- const path = configPath(env);
407
- const read = readConfigFile(path);
408
- if ("issue" in read)
409
- throw new CliError("configuration_error", issueMessage([read.issue], "memo doctor"));
410
- const { config, removed } = withoutSetting(read.raw, key);
411
- if (removed)
412
- saveConfigFile(path, config);
413
- return removed;
414
- }, "unsetConfigKey");
415
- var updateConfig = /* @__PURE__ */ __name((change, env = process.env) => {
416
- const next = change(loadConfig(env));
417
- saveConfigFile(configPath(env), withSettingDefaults(next, MEMO_SETTINGS).config);
418
- return next;
419
- }, "updateConfig");
420
- var rawConfig = /* @__PURE__ */ __name((env = process.env) => {
421
- const read = readConfigFile(configPath(env));
422
- if ("issue" in read)
423
- throw new CliError("configuration_error", issueMessage([read.issue], "memo doctor"));
424
- return read.raw;
425
- }, "rawConfig");
426
- var migrateConfig = /* @__PURE__ */ __name((env = process.env) => {
427
- const { config, added } = withSettingDefaults(rawConfig(env), MEMO_SETTINGS);
428
- if (added.length > 0)
429
- saveConfigFile(configPath(env), config);
430
- return added;
431
- }, "migrateConfig");
432
-
433
- export {
434
- memoPermissionKeys,
435
- NOTE_EXTENSIONS,
436
- readMemoId,
437
- matcher,
438
- noteFiles,
439
- isReference,
440
- DIALECTS,
441
- dialectOf,
442
- MEMO_SETTINGS,
443
- configPath,
444
- loadConfig,
445
- decisionPolicy,
446
- scheduleLimits,
447
- inspectConfig,
448
- unsetConfigKey,
449
- updateConfig,
450
- rawConfig,
451
- migrateConfig
452
- };
@@ -1,66 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- errorObject,
5
- mcpFailure,
6
- recognisable,
7
- reportFailure,
8
- throwParseFailures
9
- } from "./chunk-UXGQXP5U.js";
10
- import "./chunk-RUWY43XR.js";
11
- import "./chunk-2NEXX3EI.js";
12
- import "./chunk-5CKE7LAP.js";
13
- import "./chunk-DYNSZDXG.js";
14
- import "./chunk-NUEIRBKY.js";
15
- import "./chunk-IIXZMACE.js";
16
- import "./chunk-QQBRNKHQ.js";
17
- import "./chunk-TIU2N2SP.js";
18
- import "./chunk-CYUP7HQG.js";
19
- import "./chunk-GN3U74DV.js";
20
- import "./chunk-RCPP2Q5O.js";
21
- import "./chunk-HTQTIKWP.js";
22
- import "./chunk-6ZVN4S36.js";
23
- import "./chunk-TIQUMRSO.js";
24
- import "./chunk-3DXTHN5C.js";
25
- import "./chunk-K6Z6B2CW.js";
26
- import "./chunk-I7PL5WX2.js";
27
- import "./chunk-YPF6OS37.js";
28
- import "./chunk-YJSCSLAT.js";
29
- import "./chunk-7VJZKUN3.js";
30
- import "./chunk-CNAOMV43.js";
31
- import "./chunk-76MMXZ3W.js";
32
- import "./chunk-S34FLB7K.js";
33
- import "./chunk-EEKOBGQ7.js";
34
- import "./chunk-VDGKBAS2.js";
35
- import "./chunk-KJE2KFYH.js";
36
- import "./chunk-Q3XFJOAY.js";
37
- import "./chunk-YUEAM6ZP.js";
38
- import "./chunk-UBYCWQSV.js";
39
- import "./chunk-H52RNBPU.js";
40
- import "./chunk-MHHLYRRD.js";
41
- import "./chunk-3V5JXPGK.js";
42
- import "./chunk-UGV57SZH.js";
43
- import "./chunk-JHLGFPMK.js";
44
- import "./chunk-DIT5NA73.js";
45
- import "./chunk-HWJHWNBW.js";
46
- import "./chunk-DIQAOLWH.js";
47
- import "./chunk-BPGYTJNB.js";
48
- import "./chunk-XDQIJSJE.js";
49
- import "./chunk-KV4267S4.js";
50
- import "./chunk-LU3WKZBA.js";
51
- import "./chunk-D72URWJE.js";
52
- import "./chunk-SIY75R4D.js";
53
- import "./chunk-6SE6ZDBF.js";
54
- import "./chunk-TZ7WDQPD.js";
55
- import "./chunk-G2BB5WY5.js";
56
- import "./chunk-Y5E2WNWB.js";
57
- import "./chunk-EB2IULWB.js";
58
- import "./chunk-5R3OXHIN.js";
59
- import "./chunk-ZVVMGPBJ.js";
60
- export {
61
- errorObject,
62
- mcpFailure,
63
- recognisable,
64
- reportFailure,
65
- throwParseFailures
66
- };
@@ -1,48 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- createBotServer,
5
- serveBotOverStdio
6
- } from "./chunk-MLDBSKW6.js";
7
- import "./chunk-2NEXX3EI.js";
8
- import "./chunk-B6S42B6J.js";
9
- import "./chunk-IIXZMACE.js";
10
- import "./chunk-EJZKYJKO.js";
11
- import "./chunk-MM5NVP7F.js";
12
- import "./chunk-3X4JM3ZR.js";
13
- import "./chunk-H3ZN4YLB.js";
14
- import "./chunk-CYUP7HQG.js";
15
- import "./chunk-GN3U74DV.js";
16
- import "./chunk-TIQUMRSO.js";
17
- import "./chunk-3DXTHN5C.js";
18
- import "./chunk-I7PL5WX2.js";
19
- import "./chunk-YPF6OS37.js";
20
- import "./chunk-YJSCSLAT.js";
21
- import "./chunk-CNAOMV43.js";
22
- import "./chunk-EEKOBGQ7.js";
23
- import "./chunk-VDGKBAS2.js";
24
- import "./chunk-KJE2KFYH.js";
25
- import "./chunk-Q3XFJOAY.js";
26
- import "./chunk-YUEAM6ZP.js";
27
- import "./chunk-UBYCWQSV.js";
28
- import "./chunk-MHHLYRRD.js";
29
- import "./chunk-UGV57SZH.js";
30
- import "./chunk-JHLGFPMK.js";
31
- import "./chunk-DIT5NA73.js";
32
- import "./chunk-HWJHWNBW.js";
33
- import "./chunk-DIQAOLWH.js";
34
- import "./chunk-KV4267S4.js";
35
- import "./chunk-LU3WKZBA.js";
36
- import "./chunk-D72URWJE.js";
37
- import "./chunk-SIY75R4D.js";
38
- import "./chunk-6SE6ZDBF.js";
39
- import "./chunk-TZ7WDQPD.js";
40
- import "./chunk-G2BB5WY5.js";
41
- import "./chunk-Y5E2WNWB.js";
42
- import "./chunk-EB2IULWB.js";
43
- import "./chunk-5R3OXHIN.js";
44
- import "./chunk-ZVVMGPBJ.js";
45
- export {
46
- createBotServer,
47
- serveBotOverStdio
48
- };
@@ -1,61 +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-GW2KCP4G.js";
10
- import "./chunk-B6S42B6J.js";
11
- import "./chunk-DYNSZDXG.js";
12
- import "./chunk-NUEIRBKY.js";
13
- import "./chunk-IIXZMACE.js";
14
- import "./chunk-Z7J7SVZJ.js";
15
- import "./chunk-UVO7UNYH.js";
16
- import "./chunk-EJZKYJKO.js";
17
- import "./chunk-MM5NVP7F.js";
18
- import "./chunk-3X4JM3ZR.js";
19
- import "./chunk-H3ZN4YLB.js";
20
- import "./chunk-TIU2N2SP.js";
21
- import "./chunk-CYUP7HQG.js";
22
- import "./chunk-GN3U74DV.js";
23
- import "./chunk-6ZVN4S36.js";
24
- import "./chunk-TIQUMRSO.js";
25
- import "./chunk-3DXTHN5C.js";
26
- import "./chunk-I7PL5WX2.js";
27
- import "./chunk-YPF6OS37.js";
28
- import "./chunk-YJSCSLAT.js";
29
- import "./chunk-CNAOMV43.js";
30
- import "./chunk-76MMXZ3W.js";
31
- import "./chunk-S34FLB7K.js";
32
- import "./chunk-EEKOBGQ7.js";
33
- import "./chunk-VDGKBAS2.js";
34
- import "./chunk-KJE2KFYH.js";
35
- import "./chunk-Q3XFJOAY.js";
36
- import "./chunk-YUEAM6ZP.js";
37
- import "./chunk-UBYCWQSV.js";
38
- import "./chunk-MHHLYRRD.js";
39
- import "./chunk-UGV57SZH.js";
40
- import "./chunk-JHLGFPMK.js";
41
- import "./chunk-DIT5NA73.js";
42
- import "./chunk-HWJHWNBW.js";
43
- import "./chunk-DIQAOLWH.js";
44
- import "./chunk-KV4267S4.js";
45
- import "./chunk-LU3WKZBA.js";
46
- import "./chunk-D72URWJE.js";
47
- import "./chunk-SIY75R4D.js";
48
- import "./chunk-6SE6ZDBF.js";
49
- import "./chunk-TZ7WDQPD.js";
50
- import "./chunk-G2BB5WY5.js";
51
- import "./chunk-Y5E2WNWB.js";
52
- import "./chunk-EB2IULWB.js";
53
- import "./chunk-5R3OXHIN.js";
54
- import "./chunk-ZVVMGPBJ.js";
55
- export {
56
- PER_RUN,
57
- createServer,
58
- envelope,
59
- serveOverHttpUntilStopped,
60
- serveOverStdio
61
- };
@@ -1,48 +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-QQBRNKHQ.js";
8
- import "./chunk-TIU2N2SP.js";
9
- import "./chunk-CYUP7HQG.js";
10
- import "./chunk-GN3U74DV.js";
11
- import "./chunk-HTQTIKWP.js";
12
- import "./chunk-TIQUMRSO.js";
13
- import "./chunk-3DXTHN5C.js";
14
- import "./chunk-I7PL5WX2.js";
15
- import "./chunk-YPF6OS37.js";
16
- import "./chunk-YJSCSLAT.js";
17
- import "./chunk-CNAOMV43.js";
18
- import "./chunk-S34FLB7K.js";
19
- import "./chunk-EEKOBGQ7.js";
20
- import "./chunk-VDGKBAS2.js";
21
- import "./chunk-KJE2KFYH.js";
22
- import "./chunk-Q3XFJOAY.js";
23
- import "./chunk-YUEAM6ZP.js";
24
- import "./chunk-UBYCWQSV.js";
25
- import "./chunk-H52RNBPU.js";
26
- import "./chunk-MHHLYRRD.js";
27
- import "./chunk-3V5JXPGK.js";
28
- import "./chunk-UGV57SZH.js";
29
- import "./chunk-JHLGFPMK.js";
30
- import "./chunk-DIT5NA73.js";
31
- import "./chunk-HWJHWNBW.js";
32
- import "./chunk-DIQAOLWH.js";
33
- import "./chunk-KV4267S4.js";
34
- import "./chunk-LU3WKZBA.js";
35
- import "./chunk-D72URWJE.js";
36
- import "./chunk-SIY75R4D.js";
37
- import "./chunk-6SE6ZDBF.js";
38
- import "./chunk-TZ7WDQPD.js";
39
- import "./chunk-G2BB5WY5.js";
40
- import "./chunk-Y5E2WNWB.js";
41
- import "./chunk-EB2IULWB.js";
42
- import "./chunk-5R3OXHIN.js";
43
- import "./chunk-ZVVMGPBJ.js";
44
- export {
45
- buildStems,
46
- storeMaintenanceCommands,
47
- storeSummary
48
- };