@mulmoclaude/core 1.13.0 → 1.14.1
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/assets/helps/error-recovery.md +12 -1
- package/dist/atomic-C_7YpMiM.cjs.map +1 -1
- package/dist/atomic-DPpdrJzO.js.map +1 -1
- package/dist/{calendarGrid-CrGxeCOG.js → calendarGrid-Csy2rpjp.js} +65 -36
- package/dist/{calendarGrid-CrGxeCOG.js.map → calendarGrid-Csy2rpjp.js.map} +1 -1
- package/dist/{calendarGrid-CaS9er8i.cjs → calendarGrid-p8K-7cuB.cjs} +65 -36
- package/dist/{calendarGrid-CaS9er8i.cjs.map → calendarGrid-p8K-7cuB.cjs.map} +1 -1
- package/dist/collection/core/actionVisible.d.ts +3 -3
- package/dist/collection/core/completion.d.ts +5 -5
- package/dist/collection/core/schemaZ.d.ts +4 -4
- package/dist/collection/index.cjs +7 -10
- package/dist/collection/index.cjs.map +1 -1
- package/dist/collection/index.js +7 -10
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/registry/registryIndex.d.ts +1 -1
- package/dist/collection/registry/server/index.cjs +15 -13
- package/dist/collection/registry/server/index.cjs.map +1 -1
- package/dist/collection/registry/server/index.js +15 -13
- package/dist/collection/registry/server/index.js.map +1 -1
- package/dist/collection/server/csvQuery.d.ts +7 -2
- package/dist/collection/server/csvStore.d.ts +2 -1
- package/dist/collection/server/discovery.d.ts +2 -2
- package/dist/collection/server/index.cjs +3 -3
- package/dist/collection/server/index.js +3 -3
- package/dist/collection/server/io.d.ts +3 -3
- package/dist/collection/server/manageTool.d.ts +3 -3
- package/dist/collection/server/store.d.ts +3 -3
- package/dist/collection/server/validate.d.ts +1 -1
- package/dist/collection-watchers/index.cjs +10 -25
- package/dist/collection-watchers/index.cjs.map +1 -1
- package/dist/collection-watchers/index.js +10 -25
- package/dist/collection-watchers/index.js.map +1 -1
- package/dist/{discovery-D-ZJ6a6z.js → discovery-BSedPW8A.js} +64 -36
- package/dist/discovery-BSedPW8A.js.map +1 -0
- package/dist/{discovery-DAoMnBYM.cjs → discovery-DSLgRQhN.cjs} +64 -36
- package/dist/discovery-DSLgRQhN.cjs.map +1 -0
- package/dist/{dist-21pMsI1a.cjs → dist-CsgSfWwR.cjs} +22 -1
- package/dist/{dist-21pMsI1a.cjs.map → dist-CsgSfWwR.cjs.map} +1 -1
- package/dist/{dist-DP1FTGnO.js → dist-D8zokgGo.js} +11 -2
- package/dist/{dist-DP1FTGnO.js.map → dist-D8zokgGo.js.map} +1 -1
- package/dist/feeds/index.cjs +2 -2
- package/dist/feeds/index.js +2 -2
- package/dist/feeds/server/host.d.ts +2 -2
- package/dist/feeds/server/index.cjs +35 -29
- package/dist/feeds/server/index.cjs.map +1 -1
- package/dist/feeds/server/index.js +35 -29
- package/dist/feeds/server/index.js.map +1 -1
- package/dist/feeds/server/refreshResult.d.ts +2 -2
- package/dist/files/index.cjs +3 -2
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +3 -2
- package/dist/files/index.js.map +1 -1
- package/dist/google/calendar.d.ts +47 -33
- package/dist/google/collectionPush.d.ts +13 -8
- package/dist/google/collectionSync.d.ts +2 -2
- package/dist/google/index.cjs +63 -38
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.d.ts +2 -2
- package/dist/google/index.js +61 -38
- package/dist/google/index.js.map +1 -1
- package/dist/{graph-DjE1Az1C.cjs → graph-BZJxiv1E.cjs} +10 -12
- package/dist/graph-BZJxiv1E.cjs.map +1 -0
- package/dist/{graph-BcwqiSpR.js → graph-Ce7xsDTt.js} +10 -12
- package/dist/graph-Ce7xsDTt.js.map +1 -0
- package/dist/{ingestTypes-D1GQdG8e.cjs → ingestTypes-CPR-h-OZ.cjs} +2 -2
- package/dist/{ingestTypes-D1GQdG8e.cjs.map → ingestTypes-CPR-h-OZ.cjs.map} +1 -1
- package/dist/{ingestTypes-XReG-li7.js → ingestTypes-F2IJhOLJ.js} +2 -2
- package/dist/{ingestTypes-XReG-li7.js.map → ingestTypes-F2IJhOLJ.js.map} +1 -1
- package/dist/notifier/index.cjs +1 -1
- package/dist/notifier/index.js +1 -1
- package/dist/notifier/types.d.ts +4 -4
- package/dist/{notifier-C3IhYxqh.cjs → notifier-CKFVVwDP.cjs} +36 -25
- package/dist/notifier-CKFVVwDP.cjs.map +1 -0
- package/dist/{notifier-CMFlw74b.js → notifier-CQD8NljP.js} +36 -25
- package/dist/notifier-CQD8NljP.js.map +1 -0
- package/dist/plugin-vue/index.cjs +4 -2
- package/dist/plugin-vue/index.cjs.map +1 -1
- package/dist/plugin-vue/index.js +4 -2
- package/dist/plugin-vue/index.js.map +1 -1
- package/dist/{project-B9NSyr6L.js → project-B0j_Vf_Q.js} +7 -2
- package/dist/project-B0j_Vf_Q.js.map +1 -0
- package/dist/{project-CCtT_fQr.cjs → project-C1ep9pvo.cjs} +7 -2
- package/dist/project-C1ep9pvo.cjs.map +1 -0
- package/dist/{promptSafety-FD8cQn3e.cjs → promptSafety-DUZ5BiW5.cjs} +106 -88
- package/dist/promptSafety-DUZ5BiW5.cjs.map +1 -0
- package/dist/{promptSafety-C--op_6a.js → promptSafety-DgHMF4Pz.js} +106 -88
- package/dist/promptSafety-DgHMF4Pz.js.map +1 -0
- package/dist/remote-host/index.cjs +2 -1
- package/dist/remote-host/index.d.ts +10 -0
- package/dist/remote-host/index.js +2 -2
- package/dist/remote-host/server/hostRunner.d.ts +7 -2
- package/dist/remote-host/server/index.cjs +14 -11
- package/dist/remote-host/server/index.cjs.map +1 -1
- package/dist/remote-host/server/index.js +13 -10
- package/dist/remote-host/server/index.js.map +1 -1
- package/dist/{remote-host-DkDVxNim.cjs → remote-host-CtQjagPt.cjs} +53 -1
- package/dist/remote-host-CtQjagPt.cjs.map +1 -0
- package/dist/remote-host-Dba4lF3Z.js +82 -0
- package/dist/remote-host-Dba4lF3Z.js.map +1 -0
- package/dist/remote-view/index.cjs +6 -4
- package/dist/remote-view/index.cjs.map +1 -1
- package/dist/remote-view/index.d.ts +1 -1
- package/dist/remote-view/index.js +6 -4
- package/dist/remote-view/index.js.map +1 -1
- package/dist/scheduler/adapter.d.ts +4 -4
- package/dist/scheduler/index.cjs +35 -3
- package/dist/scheduler/index.cjs.map +1 -1
- package/dist/scheduler/index.js +35 -3
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/task-manager.d.ts +2 -2
- package/dist/{server-B_b0bLSW.cjs → server-1c6gB372.cjs} +54 -31
- package/dist/server-1c6gB372.cjs.map +1 -0
- package/dist/{server-Ci_A3chZ.js → server-Dv_L7l0y.js} +54 -31
- package/dist/server-Dv_L7l0y.js.map +1 -0
- package/dist/skill-bridge/index.cjs +3 -4
- package/dist/skill-bridge/index.cjs.map +1 -1
- package/dist/skill-bridge/index.js +3 -4
- package/dist/skill-bridge/index.js.map +1 -1
- package/dist/types-BKVZrtyc.js.map +1 -1
- package/dist/types-CNqkLT4M.cjs.map +1 -1
- package/dist/utils/fetch.cjs.map +1 -1
- package/dist/utils/fetch.d.ts +1 -1
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/whisper/client.cjs.map +1 -1
- package/dist/whisper/client.d.ts +3 -3
- package/dist/whisper/client.js.map +1 -1
- package/dist/whisper/index.cjs +2 -6
- package/dist/whisper/index.cjs.map +1 -1
- package/dist/whisper/index.js +2 -6
- package/dist/whisper/index.js.map +1 -1
- package/dist/wiki/index.cjs +4 -4
- package/dist/wiki/index.cjs.map +1 -1
- package/dist/wiki/index.js +4 -4
- package/dist/wiki/index.js.map +1 -1
- package/dist/wiki/server/index.cjs +15 -12
- package/dist/wiki/server/index.cjs.map +1 -1
- package/dist/wiki/server/index.js +15 -12
- package/dist/wiki/server/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/discovery-D-ZJ6a6z.js.map +0 -1
- package/dist/discovery-DAoMnBYM.cjs.map +0 -1
- package/dist/graph-BcwqiSpR.js.map +0 -1
- package/dist/graph-DjE1Az1C.cjs.map +0 -1
- package/dist/notifier-C3IhYxqh.cjs.map +0 -1
- package/dist/notifier-CMFlw74b.js.map +0 -1
- package/dist/project-B9NSyr6L.js.map +0 -1
- package/dist/project-CCtT_fQr.cjs.map +0 -1
- package/dist/promptSafety-C--op_6a.js.map +0 -1
- package/dist/promptSafety-FD8cQn3e.cjs.map +0 -1
- package/dist/remote-host-D_BRFHcI.js +0 -36
- package/dist/remote-host-D_BRFHcI.js.map +0 -1
- package/dist/remote-host-DkDVxNim.cjs.map +0 -1
- package/dist/server-B_b0bLSW.cjs.map +0 -1
- package/dist/server-Ci_A3chZ.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-CsgSfWwR.cjs");
|
|
3
3
|
const require_atomic = require("./atomic-C_7YpMiM.cjs");
|
|
4
|
-
const require_calendarGrid = require("./calendarGrid-
|
|
5
|
-
const require_project = require("./project-
|
|
4
|
+
const require_calendarGrid = require("./calendarGrid-p8K-7cuB.cjs");
|
|
5
|
+
const require_project = require("./project-C1ep9pvo.cjs");
|
|
6
6
|
const require_templatePath = require("./templatePath-27vUZowm.cjs");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -145,7 +145,7 @@ function realpathClosestAncestor(absPath) {
|
|
|
145
145
|
while (cursor !== node_path.default.dirname(cursor)) try {
|
|
146
146
|
return (0, node_fs.realpathSync)(cursor);
|
|
147
147
|
} catch (err) {
|
|
148
|
-
if (err.code === "ENOENT") {
|
|
148
|
+
if (require_dist.isErrorWithCode(err) && err.code === "ENOENT") {
|
|
149
149
|
cursor = node_path.default.dirname(cursor);
|
|
150
150
|
continue;
|
|
151
151
|
}
|
|
@@ -249,8 +249,7 @@ async function isRegularFile(filePath) {
|
|
|
249
249
|
* null when it isn't a JSON object (array / scalar / null). */
|
|
250
250
|
function parseRecordJson(raw) {
|
|
251
251
|
const parsed = JSON.parse(raw);
|
|
252
|
-
|
|
253
|
-
return null;
|
|
252
|
+
return require_dist.isRecord(parsed) ? parsed : null;
|
|
254
253
|
}
|
|
255
254
|
async function tryReadRecord(filePath) {
|
|
256
255
|
if (!await isRegularFile(filePath)) return null;
|
|
@@ -275,7 +274,7 @@ async function listItems(dataDir, opts = {}) {
|
|
|
275
274
|
try {
|
|
276
275
|
entries = await (0, node_fs_promises.readdir)(dataDir);
|
|
277
276
|
} catch (err) {
|
|
278
|
-
if (err.code === "ENOENT") return [];
|
|
277
|
+
if (require_dist.isErrorWithCode(err) && err.code === "ENOENT") return [];
|
|
279
278
|
throw err;
|
|
280
279
|
}
|
|
281
280
|
const results = [];
|
|
@@ -305,7 +304,7 @@ async function readItem(dataDir, itemId, opts = {}) {
|
|
|
305
304
|
try {
|
|
306
305
|
return parseRecordJson(await (0, node_fs_promises.readFile)(filePath, "utf-8"));
|
|
307
306
|
} catch (err) {
|
|
308
|
-
if (err.code === "ENOENT") return null;
|
|
307
|
+
if (require_dist.isErrorWithCode(err) && err.code === "ENOENT") return null;
|
|
309
308
|
throw err;
|
|
310
309
|
}
|
|
311
310
|
}
|
|
@@ -375,7 +374,7 @@ async function writeItem(dataDir, itemId, item, opts = {}) {
|
|
|
375
374
|
try {
|
|
376
375
|
handle = await (0, node_fs_promises.open)(filePath, "wx");
|
|
377
376
|
} catch (err) {
|
|
378
|
-
if (err.code === "EEXIST") return {
|
|
377
|
+
if (require_dist.isErrorWithCode(err) && err.code === "EEXIST") return {
|
|
379
378
|
kind: "conflict",
|
|
380
379
|
itemId: safeId
|
|
381
380
|
};
|
|
@@ -421,7 +420,7 @@ async function deleteItem(dataDir, itemId, opts = {}) {
|
|
|
421
420
|
itemId: safeId
|
|
422
421
|
};
|
|
423
422
|
} catch (err) {
|
|
424
|
-
if (err.code === "ENOENT") return {
|
|
423
|
+
if (require_dist.isErrorWithCode(err) && err.code === "ENOENT") return {
|
|
425
424
|
kind: "not-found",
|
|
426
425
|
itemId: safeId
|
|
427
426
|
};
|
|
@@ -591,7 +590,7 @@ function whereFragment(cond) {
|
|
|
591
590
|
const column = quoteIdent(cond.field);
|
|
592
591
|
const asText = `CAST(${column} AS VARCHAR)`;
|
|
593
592
|
if (cond.op === "in") {
|
|
594
|
-
const values = cond
|
|
593
|
+
const values = arrayValue(cond);
|
|
595
594
|
return {
|
|
596
595
|
sql: `${values.every((value) => typeof value === "string") ? asText : column} IN (${values.map(() => "?").join(", ")})`,
|
|
597
596
|
params: values
|
|
@@ -599,7 +598,7 @@ function whereFragment(cond) {
|
|
|
599
598
|
}
|
|
600
599
|
if (cond.op === "contains") return {
|
|
601
600
|
sql: `contains(${asText}, ?)`,
|
|
602
|
-
params: [String(cond
|
|
601
|
+
params: [String(scalarValue(cond))]
|
|
603
602
|
};
|
|
604
603
|
const operator = {
|
|
605
604
|
eq: "=",
|
|
@@ -611,9 +610,24 @@ function whereFragment(cond) {
|
|
|
611
610
|
}[cond.op];
|
|
612
611
|
return {
|
|
613
612
|
sql: `${typeof cond.value === "string" && (cond.op === "eq" || cond.op === "ne") ? asText : column} ${operator} ?`,
|
|
614
|
-
params: [cond
|
|
613
|
+
params: [scalarValue(cond)]
|
|
615
614
|
};
|
|
616
615
|
}
|
|
616
|
+
/** Mirror of `scalarValue` for the one op that takes a set: a scalar under
|
|
617
|
+
* `in` also means the query skipped `CollectionQueryZ`. Left unchecked it
|
|
618
|
+
* failed as `values.every is not a function`, naming neither the field nor
|
|
619
|
+
* the op. */
|
|
620
|
+
function arrayValue(cond) {
|
|
621
|
+
if (!Array.isArray(cond.value)) throw new Error(`where condition on '${cond.field}' uses op 'in', which requires an array value, not a scalar`);
|
|
622
|
+
return cond.value;
|
|
623
|
+
}
|
|
624
|
+
/** `CollectionQueryZ` refines "`in` ⇔ array value", so an array reaching a
|
|
625
|
+
* scalar op means the query was compiled without being validated first —
|
|
626
|
+
* binding it would send an array to a single `?`. */
|
|
627
|
+
function scalarValue(cond) {
|
|
628
|
+
if (Array.isArray(cond.value)) throw new Error(`where condition on '${cond.field}' uses op '${cond.op}', which requires a scalar value, not an array`);
|
|
629
|
+
return cond.value;
|
|
630
|
+
}
|
|
617
631
|
/** Compile a validated query against `fromSql` (a table-function call
|
|
618
632
|
* whose FIRST placeholder is the source path — the executor binds it).
|
|
619
633
|
* Returns the SQL and the where-value parameters that follow the path.
|
|
@@ -671,9 +685,9 @@ function encodeCsvRecordId(rawKey) {
|
|
|
671
685
|
* `encodeCsvRecordId` for encoded ids; anything else is already the raw
|
|
672
686
|
* value. Pure + exported for unit tests. */
|
|
673
687
|
function decodeCsvRecordId(itemId) {
|
|
674
|
-
const
|
|
675
|
-
if (
|
|
676
|
-
return Buffer.from(
|
|
688
|
+
const hex = ENCODED_ID_PATTERN.exec(itemId)?.[1];
|
|
689
|
+
if (hex === void 0) return itemId;
|
|
690
|
+
return Buffer.from(hex, "hex").toString("utf-8");
|
|
677
691
|
}
|
|
678
692
|
/** Normalize one DuckDB JS value into a JSON-safe record value: BigInt →
|
|
679
693
|
* number (string beyond the safe range), DATE/TIMESTAMP → ISO string
|
|
@@ -835,7 +849,7 @@ async function safeCsvStat(absPath, workspaceRoot) {
|
|
|
835
849
|
try {
|
|
836
850
|
info = await (0, node_fs_promises.lstat)(absPath);
|
|
837
851
|
} catch (err) {
|
|
838
|
-
if (err.code === "ENOENT") return null;
|
|
852
|
+
if (require_dist.isErrorWithCode(err) && err.code === "ENOENT") return null;
|
|
839
853
|
throw err;
|
|
840
854
|
}
|
|
841
855
|
if (!info.isFile()) {
|
|
@@ -1049,7 +1063,7 @@ function projectItemFields(items, fields, primaryKey) {
|
|
|
1049
1063
|
* tests. `limit: 0` is a valid "count only" page. */
|
|
1050
1064
|
function pageFromFullRead(items, opts, primaryKey, truncated) {
|
|
1051
1065
|
const offset = Math.max(0, opts.offset ?? 0);
|
|
1052
|
-
const end = opts.limit === void 0 ?
|
|
1066
|
+
const end = opts.limit === void 0 ? items.length : offset + Math.max(0, opts.limit);
|
|
1053
1067
|
return {
|
|
1054
1068
|
items: projectItemFields(items.slice(offset, end), opts.fields, primaryKey),
|
|
1055
1069
|
total: items.length,
|
|
@@ -2174,7 +2188,7 @@ var SpawnZ = zod.z.object({
|
|
|
2174
2188
|
* items natively and ignore it — so no kind-specific requirement here. */
|
|
2175
2189
|
var DeclarativeIngestZ = zod.z.object({
|
|
2176
2190
|
kind: zod.z.enum(require_calendarGrid.INGEST_KINDS),
|
|
2177
|
-
url: zod.z.
|
|
2191
|
+
url: zod.z.url(),
|
|
2178
2192
|
schedule: zod.z.enum(require_calendarGrid.FEED_SCHEDULES),
|
|
2179
2193
|
atHour: zod.z.number().int().min(0).max(23).optional(),
|
|
2180
2194
|
itemsAt: zod.z.string().trim().min(1).optional(),
|
|
@@ -2429,23 +2443,38 @@ function ownPrototypeKey(value) {
|
|
|
2429
2443
|
for (const key of PROTOTYPE_KEYS) if (Object.hasOwn(value, key)) return key;
|
|
2430
2444
|
return null;
|
|
2431
2445
|
}
|
|
2446
|
+
/** Own enumerable entries of an object (arrays keyed by index), none for
|
|
2447
|
+
* anything else — the raw input is unvalidated, so `fields` may be junk. */
|
|
2448
|
+
function ownEntries(value) {
|
|
2449
|
+
if (require_dist.isUnknownArray(value)) return value.map((entry, index) => [String(index), entry]);
|
|
2450
|
+
return require_dist.isRecord(value) ? Object.entries(value) : [];
|
|
2451
|
+
}
|
|
2452
|
+
/** The name-defining sub-record a raw field spec (`of`) or action (`params`)
|
|
2453
|
+
* carries, or undefined when the holder isn't an object at all. */
|
|
2454
|
+
function nameDefiningSubRecord(holder, key) {
|
|
2455
|
+
return require_dist.isRecord(holder) ? holder[key] : void 0;
|
|
2456
|
+
}
|
|
2457
|
+
/** Dotted path of the first prototype-sensitive `params` name across both
|
|
2458
|
+
* action lists, or null. */
|
|
2459
|
+
function prototypeActionParamPath(input) {
|
|
2460
|
+
for (const [listName, list] of [["actions", input.actions], ["collectionActions", input.collectionActions]]) for (const action of require_dist.isUnknownArray(list) ? list : []) {
|
|
2461
|
+
const badParam = ownPrototypeKey(nameDefiningSubRecord(action, "params"));
|
|
2462
|
+
if (badParam !== null) return `${listName}.params.${badParam}`;
|
|
2463
|
+
}
|
|
2464
|
+
return null;
|
|
2465
|
+
}
|
|
2432
2466
|
/** Dotted path of the first prototype-sensitive field name in the raw
|
|
2433
2467
|
* schema input — top-level `fields`, each table field's `of`, and each
|
|
2434
2468
|
* action's `params` (the three records that DEFINE names) — or null. */
|
|
2435
2469
|
function prototypeFieldKeyPath(input) {
|
|
2436
|
-
if (input
|
|
2437
|
-
const
|
|
2438
|
-
const bad = ownPrototypeKey(schema.fields);
|
|
2470
|
+
if (!require_dist.isRecord(input)) return null;
|
|
2471
|
+
const bad = ownPrototypeKey(input.fields);
|
|
2439
2472
|
if (bad !== null) return `fields.${bad}`;
|
|
2440
|
-
for (const [key, spec] of
|
|
2441
|
-
const badSub = ownPrototypeKey(spec
|
|
2473
|
+
for (const [key, spec] of ownEntries(input.fields)) {
|
|
2474
|
+
const badSub = ownPrototypeKey(nameDefiningSubRecord(spec, "of"));
|
|
2442
2475
|
if (badSub !== null) return `fields.${key}.of.${badSub}`;
|
|
2443
2476
|
}
|
|
2444
|
-
|
|
2445
|
-
const badParam = ownPrototypeKey(action?.params);
|
|
2446
|
-
if (badParam !== null) return `${listName}.params.${badParam}`;
|
|
2447
|
-
}
|
|
2448
|
-
return null;
|
|
2477
|
+
return prototypeActionParamPath(input);
|
|
2449
2478
|
}
|
|
2450
2479
|
var CollectionSchemaZ = zod.z.preprocess((input, ctx) => {
|
|
2451
2480
|
const bad = prototypeFieldKeyPath(input);
|
|
@@ -2461,11 +2490,10 @@ var CollectionSchemaZ = zod.z.preprocess((input, ctx) => {
|
|
|
2461
2490
|
//#endregion
|
|
2462
2491
|
//#region src/collection/server/discovery.ts
|
|
2463
2492
|
function applyFeedSchemaDefaults(parsed, slug) {
|
|
2464
|
-
if (!
|
|
2465
|
-
const
|
|
2466
|
-
const icon = typeof obj.icon === "string" && obj.icon.trim().length > 0 ? obj.icon : "dynamic_feed";
|
|
2493
|
+
if (!require_dist.isRecord(parsed)) return parsed;
|
|
2494
|
+
const icon = typeof parsed.icon === "string" && parsed.icon.trim().length > 0 ? parsed.icon : "dynamic_feed";
|
|
2467
2495
|
return {
|
|
2468
|
-
...
|
|
2496
|
+
...parsed,
|
|
2469
2497
|
icon,
|
|
2470
2498
|
dataPath: `data/feeds/${slug}`
|
|
2471
2499
|
};
|
|
@@ -2568,7 +2596,7 @@ async function loadOneCollection(skillsRoot, slug, source, workspaceRoot) {
|
|
|
2568
2596
|
if (!(await (0, node_fs_promises.stat)(schemaPath)).isFile()) return null;
|
|
2569
2597
|
raw = await (0, node_fs_promises.readFile)(schemaPath, "utf-8");
|
|
2570
2598
|
} catch (err) {
|
|
2571
|
-
if (err.code !== "ENOENT") log.warn("collections", "failed to read schema.json, skipping", {
|
|
2599
|
+
if (!require_dist.isErrorWithCode(err) || err.code !== "ENOENT") log.warn("collections", "failed to read schema.json, skipping", {
|
|
2572
2600
|
slug: safeName,
|
|
2573
2601
|
path: schemaPath,
|
|
2574
2602
|
error: String(err)
|
|
@@ -2622,7 +2650,7 @@ async function collectFromDir(skillsRoot, source, workspaceRoot) {
|
|
|
2622
2650
|
try {
|
|
2623
2651
|
entries = await (0, node_fs_promises.readdir)(skillsRoot);
|
|
2624
2652
|
} catch (err) {
|
|
2625
|
-
if (err.code === "ENOENT") return [];
|
|
2653
|
+
if (require_dist.isErrorWithCode(err) && err.code === "ENOENT") return [];
|
|
2626
2654
|
log.warn("collections", "failed to list skills dir, returning empty", {
|
|
2627
2655
|
root: skillsRoot,
|
|
2628
2656
|
error: String(err)
|
|
@@ -3027,4 +3055,4 @@ Object.defineProperty(exports, "writeItem", {
|
|
|
3027
3055
|
}
|
|
3028
3056
|
});
|
|
3029
3057
|
|
|
3030
|
-
//# sourceMappingURL=discovery-
|
|
3058
|
+
//# sourceMappingURL=discovery-DSLgRQhN.cjs.map
|