@mulmoclaude/core 2.0.2 → 3.0.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/collection/registry/server/client.d.ts +4 -4
- package/dist/collection/registry/server/collectionFiles.d.ts +3 -2
- package/dist/collection/registry/server/importCollection.d.ts +3 -2
- package/dist/collection/registry/server/index.cjs +27 -26
- package/dist/collection/registry/server/index.cjs.map +1 -1
- package/dist/collection/registry/server/index.d.ts +3 -2
- package/dist/collection/registry/server/index.js +27 -26
- package/dist/collection/registry/server/index.js.map +1 -1
- package/dist/collection/registry/server/registriesConfig.d.ts +11 -4
- package/dist/collection/server/host.d.ts +42 -5
- package/dist/collection/server/index.cjs +5 -3
- package/dist/collection/server/index.d.ts +1 -1
- package/dist/collection/server/index.js +3 -3
- package/dist/collection/server/paths.d.ts +0 -3
- package/dist/collection-watchers/index.cjs +79 -12
- package/dist/collection-watchers/index.cjs.map +1 -1
- package/dist/collection-watchers/index.d.ts +1 -1
- package/dist/collection-watchers/index.js +79 -13
- package/dist/collection-watchers/index.js.map +1 -1
- package/dist/collection-watchers/watcher.d.ts +23 -4
- package/dist/{discovery-BvnXyUel.js → discovery-4Z-ZWFam.js} +50 -21
- package/dist/discovery-4Z-ZWFam.js.map +1 -0
- package/dist/{discovery-B_sHig7n.cjs → discovery-CtiZMlsX.cjs} +67 -26
- package/dist/discovery-CtiZMlsX.cjs.map +1 -0
- package/dist/feeds/server/index.cjs +2 -2
- package/dist/feeds/server/index.js +2 -2
- 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 +5 -2
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.js +5 -2
- package/dist/google/index.js.map +1 -1
- package/dist/google/paths.d.ts +2 -0
- 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/{server-DJt6USBQ.js → server-CedIocRS.js} +2 -2
- package/dist/{server-DJt6USBQ.js.map → server-CedIocRS.js.map} +1 -1
- package/dist/{server-DoyGZMPS.cjs → server-DOZFzx5l.cjs} +2 -2
- package/dist/{server-DoyGZMPS.cjs.map → server-DOZFzx5l.cjs.map} +1 -1
- package/package.json +7 -1
- package/dist/discovery-B_sHig7n.cjs.map +0 -1
- package/dist/discovery-BvnXyUel.js.map +0 -1
|
@@ -3,8 +3,8 @@ const require_rolldown_runtime = require("../../rolldown-runtime-VH7oDXx4.cjs");
|
|
|
3
3
|
const require_dist = require("../../dist-CsgSfWwR.cjs");
|
|
4
4
|
const require_calendarGrid = require("../../calendarGrid-p8K-7cuB.cjs");
|
|
5
5
|
const require_project = require("../../project-C1ep9pvo.cjs");
|
|
6
|
-
const require_discovery = require("../../discovery-
|
|
7
|
-
const require_server = require("../../server-
|
|
6
|
+
const require_discovery = require("../../discovery-CtiZMlsX.cjs");
|
|
7
|
+
const require_server = require("../../server-DOZFzx5l.cjs");
|
|
8
8
|
const require_feeds_paths = require("../paths.cjs");
|
|
9
9
|
const require_ingestTypes = require("../../ingestTypes-CPR-h-OZ.cjs");
|
|
10
10
|
const require_notifier = require("../../notifier-DZJj0sOh.cjs");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as isErrorWithCode, l as isUnknownArray, s as isRecord$1 } from "../../dist-D8zokgGo.js";
|
|
2
2
|
import { C as FEED_SCHEDULES, w as INGEST_KINDS } from "../../calendarGrid-Csy2rpjp.js";
|
|
3
3
|
import { t as mergeIntoExisting } from "../../project-B0j_Vf_Q.js";
|
|
4
|
-
import {
|
|
5
|
-
import { A as buildCollectionActionSeedPrompt, P as readSkillTemplate, j as promptPathsFor } from "../../server-
|
|
4
|
+
import { B as resolveDataDir, N as listItems, U as safeSlugName, d as storeFor, n as discoverCollections, nt as createForwardingLogger, rt as createHostSlot } from "../../discovery-4Z-ZWFam.js";
|
|
5
|
+
import { A as buildCollectionActionSeedPrompt, P as readSkillTemplate, j as promptPathsFor } from "../../server-CedIocRS.js";
|
|
6
6
|
import { FEEDS_DIR, feedDir, feedStatePath, feedsRoot, ingestStateDir, ingestStatePath } from "../paths.js";
|
|
7
7
|
import { n as DEFAULT_FEED_MAX_ITEMS, r as isFeedSchedule, t as AGENT_INGEST_KIND } from "../../ingestTypes-F2IJhOLJ.js";
|
|
8
8
|
import { d as publish, n as clear } from "../../notifier-DhnwR82U.js";
|
|
@@ -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
|
@@ -6,7 +6,8 @@ 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-CtiZMlsX.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) {
|