@wirecat/cli-memo 0.131.22 → 0.131.24

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 (134) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{all-profiles-EZLU6CY7.js → all-profiles-ZCJTYGOL.js} +7 -7
  3. package/dist/bundle/{anthropic-XC34PJH5.js → anthropic-7WVLAKTX.js} +5 -5
  4. package/dist/bundle/{app-server-PRQVGA5X.js → app-server-6G3SXEHO.js} +38 -38
  5. package/dist/bundle/auto-JWPM5654.js +86 -0
  6. package/dist/bundle/{bun-CKGKUKW5.js → bun-JVBDJKBB.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-S6KUSMTC.js → bun-sqlite-P4I7NVMQ.js} +4 -4
  8. package/dist/bundle/{chunk-7F6FGMCC.js → chunk-2IRCJT4O.js} +7 -7
  9. package/dist/bundle/{chunk-SO2YVKBK.js → chunk-3KNXQZMO.js} +28 -28
  10. package/dist/bundle/{chunk-WEOFWTWZ.js → chunk-3MER7NE6.js} +3 -3
  11. package/dist/bundle/{chunk-DNGHE2Q4.js → chunk-3U7OUQV2.js} +1 -1
  12. package/dist/bundle/{chunk-AIIQ7YU4.js → chunk-5YCNCXL5.js} +1 -1
  13. package/dist/bundle/{chunk-2NJUPIAO.js → chunk-AIGMYGEL.js} +1 -1
  14. package/dist/bundle/{chunk-7W3RCCRR.js → chunk-AIVUS6WA.js} +10 -10
  15. package/dist/bundle/{chunk-KUNA6MQZ.js → chunk-ALGIPJ6L.js} +1 -1
  16. package/dist/bundle/{chunk-IFWBFYXN.js → chunk-AWGV4VOA.js} +11 -11
  17. package/dist/bundle/{chunk-QMMUPDRK.js → chunk-BTQSFPIM.js} +4 -4
  18. package/dist/bundle/{chunk-SMDWUPXE.js → chunk-CM2H7NRC.js} +3 -3
  19. package/dist/bundle/{chunk-CBYZW5CC.js → chunk-CPJEQK4V.js} +45 -45
  20. package/dist/bundle/{chunk-ILC7NFS2.js → chunk-DIMX5AEE.js} +4 -4
  21. package/dist/bundle/{program-ZIRYOO2T.js → chunk-DMQ3342A.js} +881 -11256
  22. package/dist/bundle/{chunk-VQM3H422.js → chunk-EACY2ULS.js} +428 -204
  23. package/dist/bundle/{chunk-IRDGD3QQ.js → chunk-EB7LKK4K.js} +1 -1
  24. package/dist/bundle/{chunk-XA6YO24S.js → chunk-EGG3PGCM.js} +1 -1
  25. package/dist/bundle/{chunk-J35OGOCI.js → chunk-EKTZEF3Q.js} +2 -2
  26. package/dist/bundle/{chunk-SXGAIQ5X.js → chunk-ELKYINWL.js} +12 -12
  27. package/dist/bundle/{chunk-VECICKTE.js → chunk-F2ED6KG6.js} +2 -2
  28. package/dist/bundle/{chunk-RG6ITTLQ.js → chunk-FXHN2UZW.js} +19 -14
  29. package/dist/bundle/{chunk-YAUDFROV.js → chunk-GQOXFZBX.js} +673 -371
  30. package/dist/bundle/{chunk-PF3ALSAV.js → chunk-GRXVN2X7.js} +1 -1
  31. package/dist/bundle/{chunk-6JOT5KWM.js → chunk-GSEDSGJF.js} +358 -266
  32. package/dist/bundle/{chunk-XPRYBLTS.js → chunk-IC2TL7RW.js} +2 -2
  33. package/dist/bundle/{chunk-MHDLZCEO.js → chunk-IJC6MFLP.js} +8 -8
  34. package/dist/bundle/{chunk-CCOYC6HL.js → chunk-INTF3YPV.js} +2 -2
  35. package/dist/bundle/{chunk-WUCQ56RP.js → chunk-ITQBXFMC.js} +2 -2
  36. package/dist/bundle/{chunk-ZKWE5MCA.js → chunk-J6D34BFP.js} +803 -351
  37. package/dist/bundle/{chunk-3V4WIGWC.js → chunk-JCCL7RGH.js} +2 -2
  38. package/dist/bundle/{chunk-VDBFSLHP.js → chunk-JDDVGGUV.js} +5 -5
  39. package/dist/bundle/{chunk-EG2OMKWH.js → chunk-JY4LVWGZ.js} +12 -0
  40. package/dist/bundle/{chunk-RNXYDBQO.js → chunk-KQSHIQSV.js} +134 -59
  41. package/dist/bundle/{chunk-KXERKAID.js → chunk-LNXFM4FD.js} +13 -13
  42. package/dist/bundle/{chunk-RHJC4PHV.js → chunk-LWIMGWKB.js} +3 -3
  43. package/dist/bundle/{chunk-ZD3STMY7.js → chunk-M43DAAZ7.js} +1 -1
  44. package/dist/bundle/{chunk-5UOOH7VG.js → chunk-MLMSQK76.js} +1 -1
  45. package/dist/bundle/{chunk-LGNS4JVK.js → chunk-MPVW7BQZ.js} +5 -5
  46. package/dist/bundle/{chunk-HXRIV2TV.js → chunk-MROFZXAB.js} +63 -30
  47. package/dist/bundle/{chunk-UCINAEIA.js → chunk-N5H6I7WQ.js} +5 -5
  48. package/dist/bundle/{chunk-OJRLTJRS.js → chunk-NAH473ZR.js} +1 -1
  49. package/dist/bundle/{chunk-DZSWKA3K.js → chunk-ND3GBFEY.js} +1 -1
  50. package/dist/bundle/{chunk-7MLWSUEK.js → chunk-OQK2IKPB.js} +1 -1
  51. package/dist/bundle/{chunk-3B645KUY.js → chunk-Q6MFBH6Q.js} +9 -9
  52. package/dist/bundle/{chunk-BB2MGFOZ.js → chunk-R2LJDDZP.js} +3 -3
  53. package/dist/bundle/{chunk-NELE7AIX.js → chunk-R3LNQ3I4.js} +1 -1
  54. package/dist/bundle/{chunk-LR5EY5JY.js → chunk-RTESJ5O2.js} +3 -3
  55. package/dist/bundle/{chunk-5RBLNI6C.js → chunk-SKTGBVYC.js} +4 -4
  56. package/dist/bundle/{chunk-CDZZ2DZO.js → chunk-T4LW6UYQ.js} +1 -1
  57. package/dist/bundle/{chunk-RC7TIYUZ.js → chunk-UA2C4BCH.js} +8 -8
  58. package/dist/bundle/{chunk-2TBIVKBH.js → chunk-UPXUE27A.js} +5 -5
  59. package/dist/bundle/{chunk-OUF6RCRZ.js → chunk-UVR6U55E.js} +5 -5
  60. package/dist/bundle/{chunk-VXHN3SWW.js → chunk-UXCDBNAY.js} +2 -2
  61. package/dist/bundle/{chunk-MCPDL5YU.js → chunk-UY2VH3QK.js} +1 -1
  62. package/dist/bundle/{chunk-CP5N3KH3.js → chunk-VLPMB3UU.js} +4 -4
  63. package/dist/bundle/{chunk-UG2V7BQY.js → chunk-VVEFQEWP.js} +21 -21
  64. package/dist/bundle/{chunk-THGFFQCK.js → chunk-XF3LZ32F.js} +2 -2
  65. package/dist/bundle/{chunk-GV2FSWFS.js → chunk-XSI5NYGB.js} +7 -7
  66. package/dist/bundle/{chunk-4SGCOUQ6.js → chunk-ZDOVR4PA.js} +6 -6
  67. package/dist/bundle/{chunk-OFYKXQMS.js → chunk-ZLZE5P6M.js} +7 -7
  68. package/dist/bundle/{chunk-E5FQ7U7L.js → chunk-ZOYGY2PN.js} +2 -2
  69. package/dist/bundle/{command-contract-TMVGYSQQ.js → command-contract-543RRFNU.js} +13 -13
  70. package/dist/bundle/{decode-6XSZIZAA.js → decode-YHX3DQG2.js} +4 -4
  71. package/dist/bundle/{dispatch-VUMQPYMA.js → dispatch-MELZFYOS.js} +1 -1
  72. package/dist/bundle/{echarts-NGS4QG4E.js → echarts-FBVAP7BR.js} +2 -2
  73. package/dist/bundle/{embed-YNH5M6UL.js → embed-CQJ42S5C.js} +5 -5
  74. package/dist/bundle/{embedder-LLNK4JF4.js → embedder-EDXLEJ27.js} +8 -8
  75. package/dist/bundle/{entry-L42C5CHF.js → entry-HZEA7QFK.js} +6 -6
  76. package/dist/bundle/failure-62G7QSPX.js +66 -0
  77. package/dist/bundle/{failure-Z2FXWIBY.js → failure-RBNZBCZJ.js} +1 -1
  78. package/dist/bundle/{first-run-TT6KMHKA.js → first-run-JZQN7R6M.js} +8 -8
  79. package/dist/bundle/first-screen-56V3UOQE.js +30 -0
  80. package/dist/bundle/{instructions-4EJ4BBWD.js → instructions-NYVYNWVU.js} +1 -1
  81. package/dist/bundle/mcp-Y6IPYDS2.js +90 -0
  82. package/dist/bundle/memo.js +9 -9
  83. package/dist/bundle/{node-QQXKQWNC.js → node-2QE6UPGS.js} +2 -2
  84. package/dist/bundle/{node-sqlite-GJI2GMLW.js → node-sqlite-SDHZJNY7.js} +5 -5
  85. package/dist/bundle/{oauth-Q5VGUPUR.js → oauth-FFUJREKS.js} +6 -6
  86. package/dist/bundle/{open-NSXIYF3N.js → open-NT2GYX6N.js} +4 -4
  87. package/dist/bundle/{openai-LHH7MSGQ.js → openai-IQA2XR6Z.js} +9 -9
  88. package/dist/bundle/{process-PI6XUJWP.js → process-HIEJXYW6.js} +1 -1
  89. package/dist/bundle/program-DEMRKCZY.js +10972 -0
  90. package/dist/bundle/{prompt-VFXA7IKL.js → prompt-IOZAME2R.js} +4 -4
  91. package/dist/bundle/{recognize-UWAARXOH.js → recognize-2XOAZJ5N.js} +3 -3
  92. package/dist/bundle/{remote-KGEVCB2Q.js → remote-2LE7OTDA.js} +6 -6
  93. package/dist/bundle/{rerank-SCBTCBPO.js → rerank-UKOVVZM6.js} +6 -6
  94. package/dist/bundle/{serve-WPVKVR24.js → serve-S2UHPEBP.js} +8 -8
  95. package/dist/bundle/server-3YNOEPWU.js +61 -0
  96. package/dist/bundle/{server-VO5SXU5A.js → server-BG4WWQHY.js} +53 -53
  97. package/dist/bundle/server-EZWQ5KP4.js +48 -0
  98. package/dist/bundle/{setup-X6OJ3K4F.js → setup-2X7ADKFH.js} +42 -42
  99. package/dist/bundle/{state-KGHS4C6J.js → state-F5KT3CBD.js} +5 -5
  100. package/dist/bundle/{store-VCVOIQES.js → store-WBUUS7FO.js} +11 -11
  101. package/dist/bundle/store-maintenance-command-KLST56XF.js +48 -0
  102. package/dist/bundle/update-WH4CGJGP.js +69 -0
  103. package/dist/config-command.d.ts.map +1 -1
  104. package/dist/config-command.js +23 -2
  105. package/dist/config-command.js.map +1 -1
  106. package/dist/config.d.ts +11 -2
  107. package/dist/config.d.ts.map +1 -1
  108. package/dist/config.js +50 -3
  109. package/dist/config.js.map +1 -1
  110. package/dist/examples.d.ts.map +1 -1
  111. package/dist/examples.js +2 -0
  112. package/dist/examples.js.map +1 -1
  113. package/dist/mail/review-command.d.ts.map +1 -1
  114. package/dist/mail/review-command.js +6 -0
  115. package/dist/mail/review-command.js.map +1 -1
  116. package/dist/review/kinds.js +2 -2
  117. package/dist/review/kinds.js.map +1 -1
  118. package/dist/tasks/command.js +2 -2
  119. package/dist/tasks/command.js.map +1 -1
  120. package/dist/tasks/tasks.d.ts +1 -1
  121. package/dist/tasks/tasks.d.ts.map +1 -1
  122. package/dist/version.d.ts +1 -1
  123. package/dist/version.js +1 -1
  124. package/package.json +3 -3
  125. package/dist/bundle/auto-S3AYMAGB.js +0 -86
  126. package/dist/bundle/chunk-XW4KGSAA.js +0 -412
  127. package/dist/bundle/failure-TQJGSWRU.js +0 -66
  128. package/dist/bundle/first-screen-56KZKY77.js +0 -30
  129. package/dist/bundle/mcp-PNC3TI7O.js +0 -90
  130. package/dist/bundle/server-F2PSE6LG.js +0 -48
  131. package/dist/bundle/server-K5JYA3ZT.js +0 -61
  132. package/dist/bundle/store-maintenance-command-R4CP6AZN.js +0 -48
  133. package/dist/bundle/update-M6AIJ2SZ.js +0 -69
  134. /package/dist/bundle/{chunk-YYQN5ES2.js → chunk-CWOKGEL3.js} +0 -0
@@ -1,412 +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
- knownPermissionKeys
8
- } from "./chunk-UG2V7BQY.js";
9
- import {
10
- checkConfigText,
11
- issueMessage,
12
- readConfigFile,
13
- readConfigText,
14
- settingPathOf,
15
- withoutSetting
16
- } from "./chunk-VQM3H422.js";
17
- import {
18
- DEFAULT_DECISION_POLICY
19
- } from "./chunk-YAUDFROV.js";
20
- import {
21
- configFilePath,
22
- resolvePaths,
23
- saveConfigFile
24
- } from "./chunk-CDZZ2DZO.js";
25
- import {
26
- array,
27
- boolean,
28
- integer,
29
- literal,
30
- minLength,
31
- minValue,
32
- number,
33
- optional,
34
- picklist,
35
- pipe,
36
- record,
37
- strictObject,
38
- string,
39
- union
40
- } from "./chunk-EG2OMKWH.js";
41
- import {
42
- CliError
43
- } from "./chunk-CCHHEMPM.js";
44
- import {
45
- __name,
46
- __toESM
47
- } from "./chunk-ZVVMGPBJ.js";
48
-
49
- // dist/config-issues.js
50
- var pathOf = /* @__PURE__ */ __name((command) => {
51
- const words = [];
52
- for (let at = command; at.parent; at = at.parent)
53
- words.unshift(at.name());
54
- return words;
55
- }, "pathOf");
56
- var permissionKeyOf = /* @__PURE__ */ __name((command) => pathOf(command).join(".") || null, "permissionKeyOf");
57
- var memoPermissionKeys = /* @__PURE__ */ __name((program) => knownPermissionKeys(program, permissionKeyOf, ["mcp.authority"]), "memoPermissionKeys");
58
-
59
- // dist/notes/files.js
60
- import { closeSync, openSync, readdirSync, readSync } from "node:fs";
61
- import { join, relative, sep } from "node:path";
62
- var NOTE_EXTENSIONS = [
63
- ".md",
64
- ".markdown",
65
- ".txt",
66
- ".csv",
67
- ".tsv",
68
- ".pdf",
69
- ".docx",
70
- ".xlsx",
71
- ".odt",
72
- ".ods",
73
- ".pptx",
74
- ".epub",
75
- ".doc",
76
- ".xls"
77
- ];
78
- var MEMO_ID = /^---\r?\n(?:[^\n]*\n)*?memo-id:[ \t]*["']?([^"'\s]+)/;
79
- var HEAD = 1024;
80
- var readMemoId = /* @__PURE__ */ __name((path) => {
81
- const buffer = Buffer.alloc(HEAD);
82
- const descriptor = openSync(path, "r");
83
- try {
84
- const head = buffer.subarray(0, readSync(descriptor, buffer, 0, HEAD, 0)).toString("utf8");
85
- const end = head.indexOf("\n---", 3);
86
- return MEMO_ID.exec(end < 0 ? head : head.slice(0, end + 1))?.[1] ?? null;
87
- } finally {
88
- closeSync(descriptor);
89
- }
90
- }, "readMemoId");
91
- var TEXT_NOTE = /\.(md|markdown)$/i;
92
- var isExported = /* @__PURE__ */ __name((path) => TEXT_NOTE.test(path) && readMemoId(path) !== null, "isExported");
93
- var pattern = /* @__PURE__ */ __name((rule) => {
94
- const glob = rule.replace(/\\/g, "/").replace(/^\/+|\/+$/g, "");
95
- const body = glob.split(/(\*\*\/?|\*|\?)/).map((part) => part === "**/" || part === "**" ? ".*" : part === "*" ? "[^/]*" : part === "?" ? "[^/]" : part.replace(/[.+^${}()|[\]\\]/g, "\\$&")).join("");
96
- return new RegExp(`^${body}(/.*)?$`, "i");
97
- }, "pattern");
98
- var matcher = /* @__PURE__ */ __name((rules) => {
99
- const patterns = rules.map(pattern);
100
- return (inside) => patterns.some((rule) => rule.test(inside));
101
- }, "matcher");
102
- var noteFiles = /* @__PURE__ */ __name((folder, ignore = [], extensions = NOTE_EXTENSIONS, { skipExported = true } = {}) => {
103
- const matches = matcher(ignore);
104
- const ignored = /* @__PURE__ */ __name((path) => matches(relative(folder, path).split(sep).join("/")), "ignored");
105
- const walk = /* @__PURE__ */ __name((dir) => readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
106
- if (entry.name.startsWith("."))
107
- return [];
108
- const path = join(dir, entry.name);
109
- if (ignored(path))
110
- return [];
111
- if (entry.isDirectory())
112
- return walk(path);
113
- if (!entry.isFile() || !extensions.some((ext) => entry.name.toLowerCase().endsWith(ext)))
114
- return [];
115
- return skipExported && isExported(path) ? [] : [path];
116
- }), "walk");
117
- return walk(folder);
118
- }, "noteFiles");
119
-
120
- // dist/notes/dialects/common.js
121
- var import_yaml = __toESM(require_dist(), 1);
122
- import { posix } from "node:path";
123
- var FRONT_MATTER = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/;
124
- var REFERENCE = /^(msg|note|document|person|organization|project|task|chat|contact):\S+$/;
125
- var BARE_REFERENCE = /(?<![\w/:])((?:msg|note|document|person|organization|project|task|chat|contact):[^\s<>()[\]"'`]+)/g;
126
- var MAX_LINKS = 200;
127
- var isReference = /* @__PURE__ */ __name((target) => REFERENCE.test(target), "isReference");
128
- var splitFrontMatter = /* @__PURE__ */ __name((text) => {
129
- const match = FRONT_MATTER.exec(text);
130
- if (!match)
131
- return { frontMatter: {}, body: text };
132
- let data;
133
- try {
134
- data = (0, import_yaml.parse)(match[1] ?? "");
135
- } catch {
136
- data = null;
137
- }
138
- const frontMatter = data !== null && typeof data === "object" && !Array.isArray(data) ? data : {};
139
- return { frontMatter, body: text.slice(match[0].length) };
140
- }, "splitFrontMatter");
141
- 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");
142
- var frontMatterAliases = /* @__PURE__ */ __name((frontMatter) => {
143
- const value = frontMatter.aliases ?? frontMatter.alias;
144
- return typeof value === "string" ? [value.trim()] : strings(value);
145
- }, "frontMatterAliases");
146
- var frontMatterTags = /* @__PURE__ */ __name((frontMatter) => strings(frontMatter.tags ?? frontMatter.tag).map((tag) => tag.replace(/^#/, "")), "frontMatterTags");
147
- var withoutCode = /* @__PURE__ */ __name((body) => body.replace(/^(```|~~~)[^\n]*\n[\s\S]*?^\1[^\n]*$/gm, "").replace(/`[^`\n]*`/g, ""), "withoutCode");
148
- var titleOf = /* @__PURE__ */ __name((frontMatter, body, path) => {
149
- if (typeof frontMatter.title === "string" && frontMatter.title.trim())
150
- return frontMatter.title.trim();
151
- const heading = /^#\s+(.+?)\s*#*\s*$/m.exec(withoutCode(body))?.[1];
152
- return heading ?? posix.basename(path.replace(/\\/g, "/")).replace(/\.[^./]+$/, "");
153
- }, "titleOf");
154
- var dropNoteExtension = /* @__PURE__ */ __name((target) => target.replace(/\.(md|markdown)$/i, ""), "dropNoteExtension");
155
- var bareReferences = /* @__PURE__ */ __name((body) => [...body.matchAll(BARE_REFERENCE)].map((match) => ({
156
- target: (match[1] ?? "").replace(/[.,;:!?]+$/, ""),
157
- anchor: null,
158
- label: null
159
- })), "bareReferences");
160
- var dedupe = /* @__PURE__ */ __name((links) => {
161
- const seen = /* @__PURE__ */ new Set();
162
- return links.filter((link) => {
163
- const key = `${link.target}\0${link.anchor ?? ""}\0${link.label ?? ""}`;
164
- if (seen.has(key))
165
- return false;
166
- seen.add(key);
167
- return true;
168
- }).slice(0, MAX_LINKS);
169
- }, "dedupe");
170
- var parsedNote = /* @__PURE__ */ __name((frontMatter, body, path, links, inlineTags2 = []) => ({
171
- title: titleOf(frontMatter, body, path),
172
- aliases: frontMatterAliases(frontMatter),
173
- tags: [.../* @__PURE__ */ new Set([...frontMatterTags(frontMatter), ...inlineTags2])],
174
- links: dedupe(links),
175
- frontMatter
176
- }), "parsedNote");
177
- var renderNote = /* @__PURE__ */ __name((note, link) => {
178
- const frontMatter = {
179
- ...note.frontMatter,
180
- ...note.aliases.length ? { aliases: note.aliases } : {},
181
- ...note.tags.length ? { tags: note.tags } : {}
182
- };
183
- const head = Object.keys(frontMatter).length ? `---
184
- ${(0, import_yaml.stringify)(frontMatter).trimEnd()}
185
- ---
186
- ` : "";
187
- const links = note.links.length ? `
188
-
189
- ${note.links.map((item) => `- ${link(item)}`).join("\n")}` : "";
190
- return `${head}# ${note.title}
191
-
192
- ${note.text.trimEnd()}${links}
193
- `;
194
- }, "renderNote");
195
-
196
- // dist/notes/dialects/markdown.js
197
- var LINK = /(?<!!)\[([^\]\n]*)\]\(\s*(<[^>\n]+>|[^)\s]+)(?:\s+"[^"\n]*")?\s*\)/g;
198
- var SCHEME = /^[a-z][a-z0-9+.-]*:/i;
199
- var decode = /* @__PURE__ */ __name((value) => {
200
- try {
201
- return decodeURIComponent(value);
202
- } catch {
203
- return value;
204
- }
205
- }, "decode");
206
- var linkOf = /* @__PURE__ */ __name((label, destination) => {
207
- const angled = destination.startsWith("<") && destination.endsWith(">");
208
- const raw = angled ? destination.slice(1, -1) : destination;
209
- if (isReference(raw))
210
- return { target: raw, anchor: null, label: label.trim() || null };
211
- if (SCHEME.test(raw))
212
- return null;
213
- const hash = raw.indexOf("#");
214
- const path = hash < 0 ? raw : raw.slice(0, hash);
215
- const fragment = hash < 0 ? null : raw.slice(hash + 1);
216
- return {
217
- target: dropNoteExtension(angled ? path : decode(path)).trim(),
218
- anchor: fragment === null ? null : `#${angled ? fragment : decode(fragment)}`,
219
- label: label.trim() || null
220
- };
221
- }, "linkOf");
222
- var markdownLinks = /* @__PURE__ */ __name((body) => [...withoutCode(body).matchAll(LINK)].map((match) => linkOf(match[1] ?? "", match[2] ?? "")).filter((link) => link !== null), "markdownLinks");
223
- var stripMarkdownLinks = /* @__PURE__ */ __name((body) => body.replace(LINK, " "), "stripMarkdownLinks");
224
- var hasOwnExtension = /* @__PURE__ */ __name((target) => NOTE_EXTENSIONS.some((extension) => target.toLowerCase().endsWith(extension)), "hasOwnExtension");
225
- var markdownLink = /* @__PURE__ */ __name((link) => {
226
- if (isReference(link.target))
227
- return `[${link.label ?? link.target}](${link.target})`;
228
- const file = hasOwnExtension(link.target) ? link.target : `${link.target}.md`;
229
- const label = link.label ?? link.target.split("/").pop() ?? link.target;
230
- return `[${label}](<${file}${link.anchor ?? ""}>)`;
231
- }, "markdownLink");
232
- var markdown = {
233
- name: "markdown",
234
- parse(text, path) {
235
- const { frontMatter, body } = splitFrontMatter(text);
236
- const links = markdownLinks(body);
237
- return parsedNote(frontMatter, body, path, [...links, ...bareReferences(withoutCode(stripMarkdownLinks(body)))]);
238
- },
239
- render: /* @__PURE__ */ __name((note) => renderNote(note, markdownLink), "render")
240
- };
241
-
242
- // dist/notes/dialects/obsidian.js
243
- var WIKI = /!?\[\[([^\]|\n]+)(?:\|([^\]\n]*))?\]\]/g;
244
- var TAG = /(?<![\p{L}\p{N}_#&/])#([\p{L}_][\p{L}\p{N}_/-]*)/gu;
245
- var wikiLinks = /* @__PURE__ */ __name((body) => [...withoutCode(body).matchAll(WIKI)].map((match) => {
246
- const raw = (match[1] ?? "").trim();
247
- const label = match[2]?.trim() || null;
248
- if (isReference(raw))
249
- return { target: raw, anchor: null, label };
250
- const split = raw.search(/[#^]/);
251
- return {
252
- target: dropNoteExtension(split < 0 ? raw : raw.slice(0, split)).trim(),
253
- anchor: split < 0 ? null : raw.slice(split),
254
- label
255
- };
256
- }), "wikiLinks");
257
- var inlineTags = /* @__PURE__ */ __name((body) => [
258
- ...new Set([...stripMarkdownLinks(withoutCode(body).replace(WIKI, " ")).matchAll(TAG)].map((match) => match[1] ?? ""))
259
- ], "inlineTags");
260
- var wikiLink = /* @__PURE__ */ __name((link) => isReference(link.target) ? markdownLink(link) : `[[${link.target}${link.anchor ?? ""}${link.label ? `|${link.label}` : ""}]]`, "wikiLink");
261
- var obsidian = {
262
- name: "obsidian",
263
- parse(text, path) {
264
- const { frontMatter, body } = splitFrontMatter(text);
265
- const rest = stripMarkdownLinks(withoutCode(body).replace(WIKI, " "));
266
- return parsedNote(frontMatter, body, path, [...wikiLinks(body), ...markdownLinks(body), ...bareReferences(rest)], inlineTags(body));
267
- },
268
- render: /* @__PURE__ */ __name((note) => renderNote(note, wikiLink), "render")
269
- };
270
-
271
- // dist/notes/dialects/types.js
272
- var DIALECTS = ["obsidian", "markdown"];
273
-
274
- // dist/notes/dialects/index.js
275
- var BY_NAME = { obsidian, markdown };
276
- var dialectOf = /* @__PURE__ */ __name((name = "obsidian") => BY_NAME[name], "dialectOf");
277
-
278
- // dist/config.js
279
- var ConfigSchema = strictObject({
280
- permissions: optional(record(string(), picklist(["deny", "readonly", "ask", "allow"]))),
281
- notes: optional(strictObject({
282
- /** A bare path is the form before folder ids; `memo folders add` turns it into an entry. */
283
- folders: array(union([
284
- string(),
285
- strictObject({
286
- id: pipe(string(), minLength(1)),
287
- path: pipe(string(), minLength(1)),
288
- format: optional(picklist(DIALECTS))
289
- })
290
- ])),
291
- ignore: optional(array(string())),
292
- /** `false` keeps notes out of search by meaning: `memo sync` does not embed them. */
293
- embed: optional(boolean()),
294
- /** Where `memo notes export` and `--export` write internal notes when no folder is given. */
295
- export: optional(strictObject({ dir: pipe(string(), minLength(1)), format: optional(picklist(DIALECTS)) }))
296
- })),
297
- auto: optional(strictObject({
298
- enabled: optional(boolean()),
299
- every: optional(string()),
300
- /** MEMO_CONFIG_DIR, MESSAGING_STORE… as they were at `memo jobs start`, passed to every timer run. */
301
- places: optional(record(string(), string()))
302
- })),
303
- /** `false` keeps only failed runs in `memo runs list`. `--record` and `--no-record` win. */
304
- record: optional(boolean()),
305
- keep_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
306
- keep_successful_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
307
- runs_size_limit_mb: optional(pipe(number(), integer(), minValue(1))),
308
- /** `false` leaves what was typed out of a run's command line, `"failed"` out of a successful one; secrets always. */
309
- record_input: optional(union([boolean(), literal("failed")])),
310
- /** `false` stops the once-a-day check for a newer memo. */
311
- update_check: optional(boolean()),
312
- /** `false` stops an agent deciding proposals for you: `projects actions confirm` and `reject` then need you. */
313
- agent_decisions: optional(boolean()),
314
- mail: optional(strictObject({
315
- accounts: array(strictObject({
316
- name: string(),
317
- address: string(),
318
- /** `mbox` reads a Google Takeout file at `path`; give it the Gmail account's address, so both are one set. */
319
- mode: optional(picklist(["gmail", "imap", "mbox"])),
320
- path: optional(pipe(string(), minLength(1))),
321
- folders: optional(array(string())),
322
- embed: optional(boolean()),
323
- /** `false` hands the account's import to the `mail` CLI: memo's sync skips it; memo still reads its rules and inspect keeps working. */
324
- import: optional(boolean()),
325
- /** The owner's keep, envelope and skip decisions per sender, domain or list; rules here move into the store on the next sync; the `mail` CLI writes them now. */
326
- rules: optional(array(strictObject({
327
- match: strictObject({
328
- from: optional(string()),
329
- domain: optional(string()),
330
- list_id: optional(string())
331
- }),
332
- action: picklist(["skip", "envelope", "keep"]),
333
- reason: optional(string()),
334
- decided_at: string()
335
- })))
336
- })),
337
- /** The most characters of an email body kept; 1,000,000 by default. */
338
- max_body_chars: optional(pipe(number(), integer(), minValue(1))),
339
- /** The most characters of one attachment's extracted text kept; 200,000 by default. */
340
- max_attachment_chars: optional(pipe(number(), integer(), minValue(1)))
341
- }))
342
- });
343
- var configPath = /* @__PURE__ */ __name((env = process.env) => configFilePath(resolvePaths({ appName: "cli-memo", prefix: "MEMO", env }).config), "configPath");
344
- var loadConfig = /* @__PURE__ */ __name((env = process.env) => {
345
- const path = configPath(env);
346
- const read = readConfigText(path);
347
- if ("issue" in read)
348
- throw new CliError("configuration_error", issueMessage([read.issue], "memo doctor"));
349
- if (read.text === void 0)
350
- return {};
351
- const { issues, config } = checkConfigText(read.text, { file: path, tool: "memo", schema: ConfigSchema });
352
- if (issues.length > 0 || config === void 0)
353
- throw new CliError("configuration_error", issueMessage(issues, "memo doctor"));
354
- return config;
355
- }, "loadConfig");
356
- var decisionPolicy = /* @__PURE__ */ __name((env) => {
357
- let agentDecisions = false;
358
- try {
359
- agentDecisions = loadConfig(env).agent_decisions === true;
360
- } catch {
361
- }
362
- return { ...DEFAULT_DECISION_POLICY, agentDecisions };
363
- }, "decisionPolicy");
364
- var inspectConfig = /* @__PURE__ */ __name((env, program) => {
365
- const path = configPath(env);
366
- const read = readConfigText(path);
367
- if ("issue" in read)
368
- return { path, found: true, issues: [read.issue], config: {} };
369
- if (read.text === void 0)
370
- return { path, found: false, issues: [], config: {} };
371
- const { issues, config } = checkConfigText(read.text, {
372
- file: path,
373
- tool: "memo",
374
- schema: ConfigSchema,
375
- knownPermissions: memoPermissionKeys(program)
376
- });
377
- return { path, found: true, issues, config: config ?? {} };
378
- }, "inspectConfig");
379
- var unsetConfigKey = /* @__PURE__ */ __name((key, env = process.env) => {
380
- if (settingPathOf(key).some((part) => part === ""))
381
- throw new CliError("validation_error", `${key} is not a setting path`);
382
- const path = configPath(env);
383
- const read = readConfigFile(path);
384
- if ("issue" in read)
385
- throw new CliError("configuration_error", issueMessage([read.issue], "memo doctor"));
386
- const { config, removed } = withoutSetting(read.raw, key);
387
- if (removed)
388
- saveConfigFile(path, config);
389
- return removed;
390
- }, "unsetConfigKey");
391
- var updateConfig = /* @__PURE__ */ __name((change, env = process.env) => {
392
- const next = change(loadConfig(env));
393
- saveConfigFile(configPath(env), next);
394
- return next;
395
- }, "updateConfig");
396
-
397
- export {
398
- memoPermissionKeys,
399
- NOTE_EXTENSIONS,
400
- readMemoId,
401
- matcher,
402
- noteFiles,
403
- isReference,
404
- DIALECTS,
405
- dialectOf,
406
- configPath,
407
- loadConfig,
408
- decisionPolicy,
409
- inspectConfig,
410
- unsetConfigKey,
411
- updateConfig
412
- };
@@ -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-ILC7NFS2.js";
10
- import "./chunk-6JOT5KWM.js";
11
- import "./chunk-ZD3STMY7.js";
12
- import "./chunk-DNGHE2Q4.js";
13
- import "./chunk-HXRIV2TV.js";
14
- import "./chunk-XA6YO24S.js";
15
- import "./chunk-RG6ITTLQ.js";
16
- import "./chunk-CBYZW5CC.js";
17
- import "./chunk-UG2V7BQY.js";
18
- import "./chunk-ZKWE5MCA.js";
19
- import "./chunk-SXGAIQ5X.js";
20
- import "./chunk-GV2FSWFS.js";
21
- import "./chunk-HTQTIKWP.js";
22
- import "./chunk-WEOFWTWZ.js";
23
- import "./chunk-VQM3H422.js";
24
- import "./chunk-RC7TIYUZ.js";
25
- import "./chunk-IFWBFYXN.js";
26
- import "./chunk-3V4WIGWC.js";
27
- import "./chunk-PQLBPYJR.js";
28
- import "./chunk-SMDWUPXE.js";
29
- import "./chunk-7W3RCCRR.js";
30
- import "./chunk-NELE7AIX.js";
31
- import "./chunk-CP5N3KH3.js";
32
- import "./chunk-RHJC4PHV.js";
33
- import "./chunk-AIIQ7YU4.js";
34
- import "./chunk-YAUDFROV.js";
35
- import "./chunk-RNXYDBQO.js";
36
- import "./chunk-PF3ALSAV.js";
37
- import "./chunk-7F6FGMCC.js";
38
- import "./chunk-2TBIVKBH.js";
39
- import "./chunk-THGFFQCK.js";
40
- import "./chunk-DZSWKA3K.js";
41
- import "./chunk-E5FQ7U7L.js";
42
- import "./chunk-KUNA6MQZ.js";
43
- import "./chunk-WUCQ56RP.js";
44
- import "./chunk-LGNS4JVK.js";
45
- import "./chunk-LR5EY5JY.js";
46
- import "./chunk-VXHN3SWW.js";
47
- import "./chunk-BPGYTJNB.js";
48
- import "./chunk-J35OGOCI.js";
49
- import "./chunk-ILHTNOIV.js";
50
- import "./chunk-NUN6OGOV.js";
51
- import "./chunk-D72URWJE.js";
52
- import "./chunk-OUF6RCRZ.js";
53
- import "./chunk-2NJUPIAO.js";
54
- import "./chunk-CDZZ2DZO.js";
55
- import "./chunk-EG2OMKWH.js";
56
- import "./chunk-Y5E2WNWB.js";
57
- import "./chunk-CCHHEMPM.js";
58
- import "./chunk-7MLWSUEK.js";
59
- import "./chunk-ZVVMGPBJ.js";
60
- export {
61
- errorObject,
62
- mcpFailure,
63
- recognisable,
64
- reportFailure,
65
- throwParseFailures
66
- };
@@ -1,30 +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-GV2FSWFS.js";
8
- import "./chunk-HTQTIKWP.js";
9
- import "./chunk-WEOFWTWZ.js";
10
- import "./chunk-VQM3H422.js";
11
- import "./chunk-RC7TIYUZ.js";
12
- import "./chunk-SMDWUPXE.js";
13
- import "./chunk-NELE7AIX.js";
14
- import "./chunk-AIIQ7YU4.js";
15
- import "./chunk-RNXYDBQO.js";
16
- import "./chunk-PF3ALSAV.js";
17
- import "./chunk-2TBIVKBH.js";
18
- import "./chunk-LR5EY5JY.js";
19
- import "./chunk-VXHN3SWW.js";
20
- import "./chunk-NUN6OGOV.js";
21
- import "./chunk-CDZZ2DZO.js";
22
- import "./chunk-EG2OMKWH.js";
23
- import "./chunk-Y5E2WNWB.js";
24
- import "./chunk-CCHHEMPM.js";
25
- import "./chunk-ZVVMGPBJ.js";
26
- export {
27
- WIRECAT_TOOLS,
28
- firstScreen,
29
- installHelp
30
- };
@@ -1,90 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import "./chunk-YYQN5ES2.js";
4
- import {
5
- createBotServer
6
- } from "./chunk-3B645KUY.js";
7
- import "./chunk-ZD3STMY7.js";
8
- import {
9
- MCP_PATH,
10
- serveOverHttp
11
- } from "./chunk-QMMUPDRK.js";
12
- import "./chunk-DNGHE2Q4.js";
13
- import {
14
- revokeAll
15
- } from "./chunk-XPRYBLTS.js";
16
- import {
17
- registerCommands,
18
- runCommandForAgent,
19
- toolsFromCommands
20
- } from "./chunk-KXERKAID.js";
21
- import {
22
- mcpUrlOf,
23
- portOf,
24
- publicUrlOf
25
- } from "./chunk-XA6YO24S.js";
26
- import "./chunk-RG6ITTLQ.js";
27
- import {
28
- allProfilesServer,
29
- serveAllProfilesOverHttp,
30
- serveAllProfilesOverStdio
31
- } from "./chunk-5RBLNI6C.js";
32
- import "./chunk-IRDGD3QQ.js";
33
- import {
34
- callingAgent
35
- } from "./chunk-CCOYC6HL.js";
36
- import "./chunk-MM5NVP7F.js";
37
- import "./chunk-3X4JM3ZR.js";
38
- import "./chunk-H3ZN4YLB.js";
39
- import "./chunk-ZKWE5MCA.js";
40
- import "./chunk-SXGAIQ5X.js";
41
- import "./chunk-VQM3H422.js";
42
- import "./chunk-RC7TIYUZ.js";
43
- import "./chunk-3V4WIGWC.js";
44
- import "./chunk-PQLBPYJR.js";
45
- import "./chunk-SMDWUPXE.js";
46
- import "./chunk-NELE7AIX.js";
47
- import {
48
- httpLockFile
49
- } from "./chunk-CP5N3KH3.js";
50
- import "./chunk-RHJC4PHV.js";
51
- import "./chunk-AIIQ7YU4.js";
52
- import "./chunk-YAUDFROV.js";
53
- import "./chunk-RNXYDBQO.js";
54
- import "./chunk-PF3ALSAV.js";
55
- import "./chunk-7F6FGMCC.js";
56
- import "./chunk-2TBIVKBH.js";
57
- import "./chunk-DZSWKA3K.js";
58
- import "./chunk-KUNA6MQZ.js";
59
- import "./chunk-WUCQ56RP.js";
60
- import "./chunk-LGNS4JVK.js";
61
- import "./chunk-LR5EY5JY.js";
62
- import "./chunk-VXHN3SWW.js";
63
- import "./chunk-ILHTNOIV.js";
64
- import "./chunk-NUN6OGOV.js";
65
- import "./chunk-D72URWJE.js";
66
- import "./chunk-OUF6RCRZ.js";
67
- import "./chunk-2NJUPIAO.js";
68
- import "./chunk-CDZZ2DZO.js";
69
- import "./chunk-EG2OMKWH.js";
70
- import "./chunk-Y5E2WNWB.js";
71
- import "./chunk-CCHHEMPM.js";
72
- import "./chunk-7MLWSUEK.js";
73
- import "./chunk-ZVVMGPBJ.js";
74
- export {
75
- MCP_PATH,
76
- allProfilesServer,
77
- callingAgent,
78
- createBotServer,
79
- httpLockFile,
80
- mcpUrlOf,
81
- portOf,
82
- publicUrlOf,
83
- registerCommands,
84
- revokeAll,
85
- runCommandForAgent,
86
- serveAllProfilesOverHttp,
87
- serveAllProfilesOverStdio,
88
- serveOverHttp,
89
- toolsFromCommands
90
- };
@@ -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-3B645KUY.js";
7
- import "./chunk-ZD3STMY7.js";
8
- import "./chunk-KXERKAID.js";
9
- import "./chunk-RG6ITTLQ.js";
10
- import "./chunk-CCOYC6HL.js";
11
- import "./chunk-MM5NVP7F.js";
12
- import "./chunk-3X4JM3ZR.js";
13
- import "./chunk-H3ZN4YLB.js";
14
- import "./chunk-ZKWE5MCA.js";
15
- import "./chunk-SXGAIQ5X.js";
16
- import "./chunk-VQM3H422.js";
17
- import "./chunk-RC7TIYUZ.js";
18
- import "./chunk-3V4WIGWC.js";
19
- import "./chunk-PQLBPYJR.js";
20
- import "./chunk-SMDWUPXE.js";
21
- import "./chunk-NELE7AIX.js";
22
- import "./chunk-AIIQ7YU4.js";
23
- import "./chunk-YAUDFROV.js";
24
- import "./chunk-RNXYDBQO.js";
25
- import "./chunk-PF3ALSAV.js";
26
- import "./chunk-7F6FGMCC.js";
27
- import "./chunk-2TBIVKBH.js";
28
- import "./chunk-DZSWKA3K.js";
29
- import "./chunk-KUNA6MQZ.js";
30
- import "./chunk-WUCQ56RP.js";
31
- import "./chunk-LGNS4JVK.js";
32
- import "./chunk-LR5EY5JY.js";
33
- import "./chunk-VXHN3SWW.js";
34
- import "./chunk-ILHTNOIV.js";
35
- import "./chunk-NUN6OGOV.js";
36
- import "./chunk-D72URWJE.js";
37
- import "./chunk-OUF6RCRZ.js";
38
- import "./chunk-2NJUPIAO.js";
39
- import "./chunk-CDZZ2DZO.js";
40
- import "./chunk-EG2OMKWH.js";
41
- import "./chunk-Y5E2WNWB.js";
42
- import "./chunk-CCHHEMPM.js";
43
- import "./chunk-7MLWSUEK.js";
44
- import "./chunk-ZVVMGPBJ.js";
45
- export {
46
- createBotServer,
47
- serveBotOverStdio
48
- };