@mulmoclaude/core 2.0.1 → 2.1.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.
- package/dist/{atomic-C_7YpMiM.cjs → atomic-DhUk8uiM.cjs} +2 -2
- package/dist/{atomic-C_7YpMiM.cjs.map → atomic-DhUk8uiM.cjs.map} +1 -1
- package/dist/collection/registry/server/index.cjs +21 -26
- package/dist/collection/registry/server/index.cjs.map +1 -1
- package/dist/collection/registry/server/index.js +18 -23
- package/dist/collection/registry/server/index.js.map +1 -1
- package/dist/collection/server/index.cjs +2 -2
- package/dist/collection/server/index.js +2 -2
- package/dist/collection-watchers/index.cjs +3 -3
- package/dist/collection-watchers/index.cjs.map +1 -1
- package/dist/collection-watchers/index.js +3 -3
- package/dist/{discovery-DSLgRQhN.cjs → discovery-B_sHig7n.cjs} +5 -5
- package/dist/{discovery-DSLgRQhN.cjs.map → discovery-B_sHig7n.cjs.map} +1 -1
- package/dist/{discovery-BSedPW8A.js → discovery-BvnXyUel.js} +3 -3
- package/dist/{discovery-BSedPW8A.js.map → discovery-BvnXyUel.js.map} +1 -1
- package/dist/dist-CsgSfWwR.cjs.map +1 -1
- package/dist/dist-D8zokgGo.js.map +1 -1
- package/dist/feeds/paths.cjs +1 -1
- package/dist/feeds/server/index.cjs +5 -5
- package/dist/feeds/server/index.cjs.map +1 -1
- package/dist/feeds/server/index.js +4 -4
- package/dist/feeds/server/index.js.map +1 -1
- package/dist/file-change/index.cjs +1 -1
- package/dist/file-change/index.cjs.map +1 -1
- package/dist/files/index.cjs +3 -3
- package/dist/files/index.cjs.map +1 -1
- package/dist/global-config/index.cjs +69 -0
- package/dist/global-config/index.cjs.map +1 -0
- package/dist/global-config/index.d.ts +13 -0
- package/dist/global-config/index.js +63 -0
- package/dist/global-config/index.js.map +1 -0
- package/dist/global-config/paths.d.ts +2 -0
- package/dist/global-config/schema.d.ts +17 -0
- package/dist/google/index.cjs +11 -7
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.js +9 -5
- package/dist/google/index.js.map +1 -1
- package/dist/google/paths.d.ts +2 -0
- package/dist/notifier/index.cjs +1 -1
- package/dist/notifier/index.js +1 -1
- package/dist/{notifier-CKFVVwDP.cjs → notifier-DZJj0sOh.cjs} +2 -2
- package/dist/{notifier-CKFVVwDP.cjs.map → notifier-DZJj0sOh.cjs.map} +1 -1
- package/dist/{notifier-CQD8NljP.js → notifier-DhnwR82U.js} +2 -2
- package/dist/{notifier-CQD8NljP.js.map → notifier-DhnwR82U.js.map} +1 -1
- package/dist/paths-CkJxNZ7T.js +13 -0
- package/dist/paths-CkJxNZ7T.js.map +1 -0
- package/dist/paths-ClV946_f.cjs +25 -0
- package/dist/paths-ClV946_f.cjs.map +1 -0
- package/dist/plugin-vue/i18n.cjs.map +1 -1
- package/dist/plugin-vue/index.cjs +39 -10
- package/dist/plugin-vue/index.cjs.map +1 -1
- package/dist/plugin-vue/index.js +39 -10
- package/dist/plugin-vue/index.js.map +1 -1
- package/dist/{relPath-CgGi4-Nv.cjs → relPath-CTAjGdCL.cjs} +2 -2
- package/dist/{relPath-CgGi4-Nv.cjs.map → relPath-CTAjGdCL.cjs.map} +1 -1
- package/dist/remote-host/server/index.cjs +3 -2
- package/dist/remote-host/server/index.cjs.map +1 -1
- package/dist/remote-host/server/index.js +3 -2
- package/dist/remote-host/server/index.js.map +1 -1
- package/dist/remote-host-CtQjagPt.cjs.map +1 -1
- package/dist/{rolldown-runtime-D6vf50IK.cjs → rolldown-runtime-VH7oDXx4.cjs} +1 -1
- package/dist/scheduler/index.cjs +6 -4
- package/dist/scheduler/index.cjs.map +1 -1
- package/dist/scheduler/index.js +5 -3
- package/dist/scheduler/index.js.map +1 -1
- package/dist/{server-B78f_bnY.js → server-DJt6USBQ.js} +11 -7
- package/dist/{server-B78f_bnY.js.map → server-DJt6USBQ.js.map} +1 -1
- package/dist/{server-By4oSql2.cjs → server-DoyGZMPS.cjs} +14 -10
- package/dist/{server-By4oSql2.cjs.map → server-DoyGZMPS.cjs.map} +1 -1
- package/dist/skill-bridge/index.cjs +1 -1
- package/dist/skill-bridge/index.cjs.map +1 -1
- package/dist/utils/fetch.cjs +1 -1
- package/dist/utils/fetch.cjs.map +1 -1
- package/dist/utils/fetch.js +1 -1
- package/dist/utils/fetch.js.map +1 -1
- package/dist/whisper/client.cjs.map +1 -1
- package/dist/whisper/client.js.map +1 -1
- package/dist/whisper/index.cjs +1 -1
- package/dist/whisper/index.cjs.map +1 -1
- package/dist/wiki/index.cjs +2 -1
- package/dist/wiki/index.cjs.map +1 -1
- package/dist/wiki/index.js +2 -1
- package/dist/wiki/index.js.map +1 -1
- package/dist/wiki/paths.cjs +1 -1
- package/dist/wiki/server/index.cjs +5 -3
- package/dist/wiki/server/index.cjs.map +1 -1
- package/dist/wiki/server/index.js +4 -2
- package/dist/wiki/server/index.js.map +1 -1
- package/dist/workspace-setup/index.js.map +1 -1
- package/package.json +12 -6
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_paths = require("../paths-ClV946_f.cjs");
|
|
3
|
+
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
//#region src/global-config/schema.ts
|
|
5
|
+
/** A user-supplied regular expression source is compiled and then run against
|
|
6
|
+
* whole documents on every keystroke. Length is the cheap, honest guard: it
|
|
7
|
+
* bounds how baroque — and so how catastrophically backtracking — the pattern
|
|
8
|
+
* can be, without pretending to be a ReDoS analyser. The file is machine-local
|
|
9
|
+
* and hand-written, so the threat model is "the user's own typo", not attack. */
|
|
10
|
+
var MAX_BOOKMARK_PATTERN_LENGTH = 200;
|
|
11
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12
|
+
/** True when `source` compiles as a regular expression. `new RegExp` is the
|
|
13
|
+
* only real validator — there is no cheaper way to reject `"^([a-z"`. */
|
|
14
|
+
function compiles(source) {
|
|
15
|
+
try {
|
|
16
|
+
return RegExp(source) instanceof RegExp;
|
|
17
|
+
} catch {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* `documentBookmarks.pattern` — the regex whose matches the markdown source
|
|
23
|
+
* editor marks in its left-edge rail. Returns the raw SOURCE string (not a
|
|
24
|
+
* compiled RegExp): the value crosses a JSON dispatch hop to the browser, which
|
|
25
|
+
* compiles it there.
|
|
26
|
+
*
|
|
27
|
+
* Returns null — meaning "not configured, use your default" — for a missing
|
|
28
|
+
* file, a missing key, a non-string, an empty string, an over-long string, or
|
|
29
|
+
* one that does not compile.
|
|
30
|
+
*/
|
|
31
|
+
function readDocumentBookmarkPattern(config) {
|
|
32
|
+
if (!isRecord(config)) return null;
|
|
33
|
+
const { documentBookmarks } = config;
|
|
34
|
+
if (!isRecord(documentBookmarks)) return null;
|
|
35
|
+
const { pattern } = documentBookmarks;
|
|
36
|
+
if (typeof pattern !== "string") return null;
|
|
37
|
+
if (pattern.length === 0 || pattern.length > 200) return null;
|
|
38
|
+
return compiles(pattern) ? pattern : null;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/global-config/index.ts
|
|
42
|
+
/**
|
|
43
|
+
* Parse `~/.config/mulmo/config.json`. Returns `null` when the file is absent
|
|
44
|
+
* or unparseable — both are ordinary states (there is no UI that creates it),
|
|
45
|
+
* and every reader in `./schema` treats `null` as "nothing configured".
|
|
46
|
+
*
|
|
47
|
+
* Not cached: the file is read at most once per view open, and caching would
|
|
48
|
+
* mean a hand-edit needs an app restart to take effect.
|
|
49
|
+
*/
|
|
50
|
+
async function readMulmoGlobalConfig(home) {
|
|
51
|
+
try {
|
|
52
|
+
return JSON.parse(await (0, node_fs_promises.readFile)(require_paths.mulmoGlobalConfigPath(home), "utf-8"));
|
|
53
|
+
} catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** Convenience: the configured document-bookmark regex source, or null. */
|
|
58
|
+
async function loadDocumentBookmarkPattern(home) {
|
|
59
|
+
return readDocumentBookmarkPattern(await readMulmoGlobalConfig(home));
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
exports.MAX_BOOKMARK_PATTERN_LENGTH = MAX_BOOKMARK_PATTERN_LENGTH;
|
|
63
|
+
exports.loadDocumentBookmarkPattern = loadDocumentBookmarkPattern;
|
|
64
|
+
exports.mulmoConfigDir = require_paths.mulmoConfigDir;
|
|
65
|
+
exports.mulmoGlobalConfigPath = require_paths.mulmoGlobalConfigPath;
|
|
66
|
+
exports.readDocumentBookmarkPattern = readDocumentBookmarkPattern;
|
|
67
|
+
exports.readMulmoGlobalConfig = readMulmoGlobalConfig;
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/global-config/schema.ts","../../src/global-config/index.ts"],"sourcesContent":["// Pure readers over the parsed `~/.config/mulmo/config.json` document. No IO\n// here so the validation rules are unit-testable without a filesystem, and so a\n// host that already has the document in memory can reuse them.\n//\n// Every reader is TOLERANT by design: this file is hand-edited (there is no UI\n// for it yet), and a typo in one key must not take out the app or the other\n// keys. An unusable value reads as \"not configured\" and the caller applies its\n// own default.\n\n/** A user-supplied regular expression source is compiled and then run against\n * whole documents on every keystroke. Length is the cheap, honest guard: it\n * bounds how baroque — and so how catastrophically backtracking — the pattern\n * can be, without pretending to be a ReDoS analyser. The file is machine-local\n * and hand-written, so the threat model is \"the user's own typo\", not attack. */\nexport const MAX_BOOKMARK_PATTERN_LENGTH = 200;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n/** True when `source` compiles as a regular expression. `new RegExp` is the\n * only real validator — there is no cheaper way to reject `\"^([a-z\"`. */\nfunction compiles(source: string): boolean {\n try {\n return RegExp(source) instanceof RegExp;\n } catch {\n return false;\n }\n}\n\n/**\n * `documentBookmarks.pattern` — the regex whose matches the markdown source\n * editor marks in its left-edge rail. Returns the raw SOURCE string (not a\n * compiled RegExp): the value crosses a JSON dispatch hop to the browser, which\n * compiles it there.\n *\n * Returns null — meaning \"not configured, use your default\" — for a missing\n * file, a missing key, a non-string, an empty string, an over-long string, or\n * one that does not compile.\n */\nexport function readDocumentBookmarkPattern(config: unknown): string | null {\n if (!isRecord(config)) return null;\n const { documentBookmarks } = config;\n if (!isRecord(documentBookmarks)) return null;\n const { pattern } = documentBookmarks;\n if (typeof pattern !== \"string\") return null;\n if (pattern.length === 0 || pattern.length > MAX_BOOKMARK_PATTERN_LENGTH) return null;\n return compiles(pattern) ? pattern : null;\n}\n","// Entry point for `@mulmoclaude/core/global-config` — the host-neutral\n// per-user config file (`~/.config/mulmo/config.json`) shared by MulmoClaude\n// and MulmoTerminal. Server-only (node:fs); the values it yields are plain\n// JSON, so they cross a dispatch hop to a plugin View unchanged.\nimport { readFile } from \"node:fs/promises\";\nimport { mulmoGlobalConfigPath } from \"./paths.js\";\nimport { readDocumentBookmarkPattern } from \"./schema.js\";\n\nexport { mulmoConfigDir, mulmoGlobalConfigPath } from \"./paths.js\";\nexport { readDocumentBookmarkPattern, MAX_BOOKMARK_PATTERN_LENGTH } from \"./schema.js\";\n\n/**\n * Parse `~/.config/mulmo/config.json`. Returns `null` when the file is absent\n * or unparseable — both are ordinary states (there is no UI that creates it),\n * and every reader in `./schema` treats `null` as \"nothing configured\".\n *\n * Not cached: the file is read at most once per view open, and caching would\n * mean a hand-edit needs an app restart to take effect.\n */\nexport async function readMulmoGlobalConfig(home?: string): Promise<unknown> {\n try {\n return JSON.parse(await readFile(mulmoGlobalConfigPath(home), \"utf-8\"));\n } catch {\n return null;\n }\n}\n\n/** Convenience: the configured document-bookmark regex source, or null. */\nexport async function loadDocumentBookmarkPattern(home?: string): Promise<string | null> {\n return readDocumentBookmarkPattern(await readMulmoGlobalConfig(home));\n}\n"],"mappings":";;;;;;;;;AAcA,IAAa,8BAA8B;AAE3C,IAAM,YAAY,UAAqD,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;;;AAI1I,SAAS,SAAS,QAAyB;CACzC,IAAI;EACF,OAAO,OAAO,MAAM,aAAa;CACnC,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;;;;AAYA,SAAgB,4BAA4B,QAAgC;CAC1E,IAAI,CAAC,SAAS,MAAM,GAAG,OAAO;CAC9B,MAAM,EAAE,sBAAsB;CAC9B,IAAI,CAAC,SAAS,iBAAiB,GAAG,OAAO;CACzC,MAAM,EAAE,YAAY;CACpB,IAAI,OAAO,YAAY,UAAU,OAAO;CACxC,IAAI,QAAQ,WAAW,KAAK,QAAQ,SAAA,KAAsC,OAAO;CACjF,OAAO,SAAS,OAAO,IAAI,UAAU;AACvC;;;;;;;;;;;AC3BA,eAAsB,sBAAsB,MAAiC;CAC3E,IAAI;EACF,OAAO,KAAK,MAAM,OAAA,GAAM,iBAAA,SAAA,CAAS,cAAA,sBAAsB,IAAI,GAAG,OAAO,CAAC;CACxE,QAAQ;EACN,OAAO;CACT;AACF;;AAGA,eAAsB,4BAA4B,MAAuC;CACvF,OAAO,4BAA4B,MAAM,sBAAsB,IAAI,CAAC;AACtE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { mulmoConfigDir, mulmoGlobalConfigPath } from './paths.js';
|
|
2
|
+
export { readDocumentBookmarkPattern, MAX_BOOKMARK_PATTERN_LENGTH } from './schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parse `~/.config/mulmo/config.json`. Returns `null` when the file is absent
|
|
5
|
+
* or unparseable — both are ordinary states (there is no UI that creates it),
|
|
6
|
+
* and every reader in `./schema` treats `null` as "nothing configured".
|
|
7
|
+
*
|
|
8
|
+
* Not cached: the file is read at most once per view open, and caching would
|
|
9
|
+
* mean a hand-edit needs an app restart to take effect.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readMulmoGlobalConfig(home?: string): Promise<unknown>;
|
|
12
|
+
/** Convenience: the configured document-bookmark regex source, or null. */
|
|
13
|
+
export declare function loadDocumentBookmarkPattern(home?: string): Promise<string | null>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { n as mulmoGlobalConfigPath, t as mulmoConfigDir } from "../paths-CkJxNZ7T.js";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
//#region src/global-config/schema.ts
|
|
4
|
+
/** A user-supplied regular expression source is compiled and then run against
|
|
5
|
+
* whole documents on every keystroke. Length is the cheap, honest guard: it
|
|
6
|
+
* bounds how baroque — and so how catastrophically backtracking — the pattern
|
|
7
|
+
* can be, without pretending to be a ReDoS analyser. The file is machine-local
|
|
8
|
+
* and hand-written, so the threat model is "the user's own typo", not attack. */
|
|
9
|
+
var MAX_BOOKMARK_PATTERN_LENGTH = 200;
|
|
10
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11
|
+
/** True when `source` compiles as a regular expression. `new RegExp` is the
|
|
12
|
+
* only real validator — there is no cheaper way to reject `"^([a-z"`. */
|
|
13
|
+
function compiles(source) {
|
|
14
|
+
try {
|
|
15
|
+
return RegExp(source) instanceof RegExp;
|
|
16
|
+
} catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* `documentBookmarks.pattern` — the regex whose matches the markdown source
|
|
22
|
+
* editor marks in its left-edge rail. Returns the raw SOURCE string (not a
|
|
23
|
+
* compiled RegExp): the value crosses a JSON dispatch hop to the browser, which
|
|
24
|
+
* compiles it there.
|
|
25
|
+
*
|
|
26
|
+
* Returns null — meaning "not configured, use your default" — for a missing
|
|
27
|
+
* file, a missing key, a non-string, an empty string, an over-long string, or
|
|
28
|
+
* one that does not compile.
|
|
29
|
+
*/
|
|
30
|
+
function readDocumentBookmarkPattern(config) {
|
|
31
|
+
if (!isRecord(config)) return null;
|
|
32
|
+
const { documentBookmarks } = config;
|
|
33
|
+
if (!isRecord(documentBookmarks)) return null;
|
|
34
|
+
const { pattern } = documentBookmarks;
|
|
35
|
+
if (typeof pattern !== "string") return null;
|
|
36
|
+
if (pattern.length === 0 || pattern.length > 200) return null;
|
|
37
|
+
return compiles(pattern) ? pattern : null;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/global-config/index.ts
|
|
41
|
+
/**
|
|
42
|
+
* Parse `~/.config/mulmo/config.json`. Returns `null` when the file is absent
|
|
43
|
+
* or unparseable — both are ordinary states (there is no UI that creates it),
|
|
44
|
+
* and every reader in `./schema` treats `null` as "nothing configured".
|
|
45
|
+
*
|
|
46
|
+
* Not cached: the file is read at most once per view open, and caching would
|
|
47
|
+
* mean a hand-edit needs an app restart to take effect.
|
|
48
|
+
*/
|
|
49
|
+
async function readMulmoGlobalConfig(home) {
|
|
50
|
+
try {
|
|
51
|
+
return JSON.parse(await readFile(mulmoGlobalConfigPath(home), "utf-8"));
|
|
52
|
+
} catch {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Convenience: the configured document-bookmark regex source, or null. */
|
|
57
|
+
async function loadDocumentBookmarkPattern(home) {
|
|
58
|
+
return readDocumentBookmarkPattern(await readMulmoGlobalConfig(home));
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { MAX_BOOKMARK_PATTERN_LENGTH, loadDocumentBookmarkPattern, mulmoConfigDir, mulmoGlobalConfigPath, readDocumentBookmarkPattern, readMulmoGlobalConfig };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/global-config/schema.ts","../../src/global-config/index.ts"],"sourcesContent":["// Pure readers over the parsed `~/.config/mulmo/config.json` document. No IO\n// here so the validation rules are unit-testable without a filesystem, and so a\n// host that already has the document in memory can reuse them.\n//\n// Every reader is TOLERANT by design: this file is hand-edited (there is no UI\n// for it yet), and a typo in one key must not take out the app or the other\n// keys. An unusable value reads as \"not configured\" and the caller applies its\n// own default.\n\n/** A user-supplied regular expression source is compiled and then run against\n * whole documents on every keystroke. Length is the cheap, honest guard: it\n * bounds how baroque — and so how catastrophically backtracking — the pattern\n * can be, without pretending to be a ReDoS analyser. The file is machine-local\n * and hand-written, so the threat model is \"the user's own typo\", not attack. */\nexport const MAX_BOOKMARK_PATTERN_LENGTH = 200;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n/** True when `source` compiles as a regular expression. `new RegExp` is the\n * only real validator — there is no cheaper way to reject `\"^([a-z\"`. */\nfunction compiles(source: string): boolean {\n try {\n return RegExp(source) instanceof RegExp;\n } catch {\n return false;\n }\n}\n\n/**\n * `documentBookmarks.pattern` — the regex whose matches the markdown source\n * editor marks in its left-edge rail. Returns the raw SOURCE string (not a\n * compiled RegExp): the value crosses a JSON dispatch hop to the browser, which\n * compiles it there.\n *\n * Returns null — meaning \"not configured, use your default\" — for a missing\n * file, a missing key, a non-string, an empty string, an over-long string, or\n * one that does not compile.\n */\nexport function readDocumentBookmarkPattern(config: unknown): string | null {\n if (!isRecord(config)) return null;\n const { documentBookmarks } = config;\n if (!isRecord(documentBookmarks)) return null;\n const { pattern } = documentBookmarks;\n if (typeof pattern !== \"string\") return null;\n if (pattern.length === 0 || pattern.length > MAX_BOOKMARK_PATTERN_LENGTH) return null;\n return compiles(pattern) ? pattern : null;\n}\n","// Entry point for `@mulmoclaude/core/global-config` — the host-neutral\n// per-user config file (`~/.config/mulmo/config.json`) shared by MulmoClaude\n// and MulmoTerminal. Server-only (node:fs); the values it yields are plain\n// JSON, so they cross a dispatch hop to a plugin View unchanged.\nimport { readFile } from \"node:fs/promises\";\nimport { mulmoGlobalConfigPath } from \"./paths.js\";\nimport { readDocumentBookmarkPattern } from \"./schema.js\";\n\nexport { mulmoConfigDir, mulmoGlobalConfigPath } from \"./paths.js\";\nexport { readDocumentBookmarkPattern, MAX_BOOKMARK_PATTERN_LENGTH } from \"./schema.js\";\n\n/**\n * Parse `~/.config/mulmo/config.json`. Returns `null` when the file is absent\n * or unparseable — both are ordinary states (there is no UI that creates it),\n * and every reader in `./schema` treats `null` as \"nothing configured\".\n *\n * Not cached: the file is read at most once per view open, and caching would\n * mean a hand-edit needs an app restart to take effect.\n */\nexport async function readMulmoGlobalConfig(home?: string): Promise<unknown> {\n try {\n return JSON.parse(await readFile(mulmoGlobalConfigPath(home), \"utf-8\"));\n } catch {\n return null;\n }\n}\n\n/** Convenience: the configured document-bookmark regex source, or null. */\nexport async function loadDocumentBookmarkPattern(home?: string): Promise<string | null> {\n return readDocumentBookmarkPattern(await readMulmoGlobalConfig(home));\n}\n"],"mappings":";;;;;;;;AAcA,IAAa,8BAA8B;AAE3C,IAAM,YAAY,UAAqD,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;;;AAI1I,SAAS,SAAS,QAAyB;CACzC,IAAI;EACF,OAAO,OAAO,MAAM,aAAa;CACnC,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;;;;AAYA,SAAgB,4BAA4B,QAAgC;CAC1E,IAAI,CAAC,SAAS,MAAM,GAAG,OAAO;CAC9B,MAAM,EAAE,sBAAsB;CAC9B,IAAI,CAAC,SAAS,iBAAiB,GAAG,OAAO;CACzC,MAAM,EAAE,YAAY;CACpB,IAAI,OAAO,YAAY,UAAU,OAAO;CACxC,IAAI,QAAQ,WAAW,KAAK,QAAQ,SAAA,KAAsC,OAAO;CACjF,OAAO,SAAS,OAAO,IAAI,UAAU;AACvC;;;;;;;;;;;AC3BA,eAAsB,sBAAsB,MAAiC;CAC3E,IAAI;EACF,OAAO,KAAK,MAAM,MAAM,SAAS,sBAAsB,IAAI,GAAG,OAAO,CAAC;CACxE,QAAQ;EACN,OAAO;CACT;AACF;;AAGA,eAAsB,4BAA4B,MAAuC;CACvF,OAAO,4BAA4B,MAAM,sBAAsB,IAAI,CAAC;AACtE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** A user-supplied regular expression source is compiled and then run against
|
|
2
|
+
* whole documents on every keystroke. Length is the cheap, honest guard: it
|
|
3
|
+
* bounds how baroque — and so how catastrophically backtracking — the pattern
|
|
4
|
+
* can be, without pretending to be a ReDoS analyser. The file is machine-local
|
|
5
|
+
* and hand-written, so the threat model is "the user's own typo", not attack. */
|
|
6
|
+
export declare const MAX_BOOKMARK_PATTERN_LENGTH = 200;
|
|
7
|
+
/**
|
|
8
|
+
* `documentBookmarks.pattern` — the regex whose matches the markdown source
|
|
9
|
+
* editor marks in its left-edge rail. Returns the raw SOURCE string (not a
|
|
10
|
+
* compiled RegExp): the value crosses a JSON dispatch hop to the browser, which
|
|
11
|
+
* compiles it there.
|
|
12
|
+
*
|
|
13
|
+
* Returns null — meaning "not configured, use your default" — for a missing
|
|
14
|
+
* file, a missing key, a non-string, an empty string, an over-long string, or
|
|
15
|
+
* one that does not compile.
|
|
16
|
+
*/
|
|
17
|
+
export declare function readDocumentBookmarkPattern(config: unknown): string | null;
|
package/dist/google/index.cjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_rolldown_runtime = require("../rolldown-runtime-
|
|
2
|
+
const require_rolldown_runtime = require("../rolldown-runtime-VH7oDXx4.cjs");
|
|
3
3
|
const require_dist = require("../dist-CsgSfWwR.cjs");
|
|
4
4
|
const require_text = require("../text-CaAh9ZSO.cjs");
|
|
5
|
-
const require_atomic = require("../atomic-
|
|
5
|
+
const require_atomic = require("../atomic-DhUk8uiM.cjs");
|
|
6
6
|
const require_utils_fetch = require("../utils/fetch.cjs");
|
|
7
7
|
const require_calendarGrid = require("../calendarGrid-p8K-7cuB.cjs");
|
|
8
8
|
const require_project = require("../project-C1ep9pvo.cjs");
|
|
9
|
-
const require_discovery = require("../discovery-
|
|
9
|
+
const require_discovery = require("../discovery-B_sHig7n.cjs");
|
|
10
|
+
const require_paths = require("../paths-ClV946_f.cjs");
|
|
10
11
|
let node_fs = require("node:fs");
|
|
11
12
|
let node_path = require("node:path");
|
|
12
13
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -44,8 +45,10 @@ var isIsoDateTimeWithOffset = (value) => {
|
|
|
44
45
|
};
|
|
45
46
|
//#endregion
|
|
46
47
|
//#region src/google/paths.ts
|
|
48
|
+
/** Same directory as every other cross-app per-user file — see
|
|
49
|
+
* `../global-config/paths.ts`, which owns the spelling. */
|
|
47
50
|
function googleConfigDir(home) {
|
|
48
|
-
return
|
|
51
|
+
return require_paths.mulmoConfigDir(home);
|
|
49
52
|
}
|
|
50
53
|
/** Pre-0.20.1 token dir (mulmoclaude-branded); reads migrate away from it. */
|
|
51
54
|
function legacyGoogleTokenPath(home) {
|
|
@@ -1119,7 +1122,7 @@ async function clearCalendarLastSyncedAt(calendarId, workspaceRoot) {
|
|
|
1119
1122
|
/** Slack between a tick and the marker it writes. Without it a lone host reads
|
|
1120
1123
|
* its OWN marker as "not due yet" — elapsed lands a hair under the interval
|
|
1121
1124
|
* every time — and syncs every other hour. */
|
|
1122
|
-
var TICK_JITTER_TOLERANCE_MS =
|
|
1125
|
+
var TICK_JITTER_TOLERANCE_MS = 3e5;
|
|
1123
1126
|
/** How long a fresh marker suppresses a sync: one interval, less the slack.
|
|
1124
1127
|
* The slack is halved rather than subtracted flat for a very short configured
|
|
1125
1128
|
* interval, where a fixed five minutes would swallow the window whole. */
|
|
@@ -1256,7 +1259,8 @@ function rawGoogleTime(value) {
|
|
|
1256
1259
|
if (isCalendarDate(value)) return { date: value };
|
|
1257
1260
|
const zone = value.match(ZONE_SUFFIX_RE$1)?.[0];
|
|
1258
1261
|
if (zone === void 0) return null;
|
|
1259
|
-
|
|
1262
|
+
const civil = value.slice(0, value.length - zone.length).replace(FRACTIONAL_SECONDS_RE$1, "");
|
|
1263
|
+
return require_calendarGrid.parseIsoDateTime(civil) === null ? null : { dateTime: value };
|
|
1260
1264
|
}
|
|
1261
1265
|
/** Google's own all-day `end` is EXCLUSIVE — a single day on the 12th ends on
|
|
1262
1266
|
* the 13th. The pull stores that as `2026-05-13T00:00` and this takes the date
|
|
@@ -1875,7 +1879,7 @@ async function pushCalendarForCollection(slug, workspaceRoot, deps = liveDeps) {
|
|
|
1875
1879
|
//#endregion
|
|
1876
1880
|
//#region src/google/collectionSync.ts
|
|
1877
1881
|
var GOOGLE_CALENDAR_SYNC_TASK_ID = "system:google-calendar-sync";
|
|
1878
|
-
var DEFAULT_SYNC_INTERVAL_MS =
|
|
1882
|
+
var DEFAULT_SYNC_INTERVAL_MS = 36e5;
|
|
1879
1883
|
function classifyWrite(eventId, kind) {
|
|
1880
1884
|
if (kind === "ok") return { kind: "written" };
|
|
1881
1885
|
if (kind === "invalid-id") return {
|