@mulmoclaude/core 1.5.0 → 1.7.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/assets/helps/bug-report-faq.md +130 -0
- package/assets/helps/error-recovery.md +134 -1
- package/assets/helps/google-calendar-collection.md +57 -3
- package/assets/helps/google.md +3 -2
- package/assets/helps/index.md +2 -1
- package/dist/calendarGrid-CaS9er8i.cjs +576 -0
- package/dist/calendarGrid-CaS9er8i.cjs.map +1 -0
- package/dist/calendarGrid-CrGxeCOG.js +397 -0
- package/dist/calendarGrid-CrGxeCOG.js.map +1 -0
- package/dist/collection/index.cjs +44 -44
- package/dist/collection/index.cjs.map +1 -1
- package/dist/collection/index.js +2 -2
- package/dist/collection/registry/server/index.cjs +2 -2
- package/dist/collection/registry/server/index.js +2 -2
- package/dist/collection/server/index.cjs +4 -4
- package/dist/collection/server/index.js +3 -3
- package/dist/collection-watchers/index.cjs +5 -5
- package/dist/collection-watchers/index.cjs.map +1 -1
- package/dist/collection-watchers/index.js +4 -4
- package/dist/{discovery--kRUWed0.cjs → discovery-DYcR83qx.cjs} +64 -53
- package/dist/discovery-DYcR83qx.cjs.map +1 -0
- package/dist/{discovery-CKR4TOX3.js → discovery-_fjsluLx.js} +43 -32
- package/dist/discovery-_fjsluLx.js.map +1 -0
- package/dist/feeds/index.cjs +4 -4
- package/dist/feeds/index.js +2 -2
- package/dist/feeds/server/index.cjs +6 -6
- package/dist/feeds/server/index.js +4 -4
- package/dist/google/apiClient.d.ts +6 -0
- package/dist/google/calendar.d.ts +79 -8
- package/dist/google/calendarPushState.d.ts +17 -0
- package/dist/google/collectionPush.d.ts +64 -0
- package/dist/google/collectionSync.d.ts +10 -0
- package/dist/google/index.cjs +712 -36
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.d.ts +7 -3
- package/dist/google/index.js +683 -37
- package/dist/google/index.js.map +1 -1
- package/dist/google/pushDateTime.d.ts +10 -0
- package/dist/google/pushPlan.d.ts +73 -0
- package/dist/{ingestTypes-xX8VpQqh.cjs → ingestTypes-D1GQdG8e.cjs} +3 -3
- package/dist/{ingestTypes-xX8VpQqh.cjs.map → ingestTypes-D1GQdG8e.cjs.map} +1 -1
- package/dist/{ingestTypes-L59cIGgX.js → ingestTypes-XReG-li7.js} +2 -2
- package/dist/{ingestTypes-L59cIGgX.js.map → ingestTypes-XReG-li7.js.map} +1 -1
- package/dist/{promptSafety-CQ5Un4wi.js → promptSafety-C--op_6a.js} +3 -269
- package/dist/promptSafety-C--op_6a.js.map +1 -0
- package/dist/{promptSafety-DfZYNtjK.cjs → promptSafety-FD8cQn3e.cjs} +8 -358
- package/dist/promptSafety-FD8cQn3e.cjs.map +1 -0
- package/dist/remote-host/index.cjs +8 -0
- package/dist/remote-host/index.cjs.map +1 -1
- package/dist/remote-host/index.d.ts +21 -0
- package/dist/remote-host/index.js +8 -1
- package/dist/remote-host/index.js.map +1 -1
- package/dist/{server-D_6FLygK.js → server-BlIrtGKl.js} +4 -4
- package/dist/{server-D_6FLygK.js.map → server-BlIrtGKl.js.map} +1 -1
- package/dist/{server-gEOeV_Nv.cjs → server-l4TZ5Lbf.cjs} +21 -21
- package/dist/{server-gEOeV_Nv.cjs.map → server-l4TZ5Lbf.cjs.map} +1 -1
- package/dist/workspace-setup/faq-entries.d.ts +24 -0
- package/dist/workspace-setup/index.d.ts +1 -0
- package/dist/workspace-setup/index.js +50 -1
- package/dist/workspace-setup/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/discovery--kRUWed0.cjs.map +0 -1
- package/dist/discovery-CKR4TOX3.js.map +0 -1
- package/dist/ids-BnTh3Hl0.cjs +0 -226
- package/dist/ids-BnTh3Hl0.cjs.map +0 -1
- package/dist/ids-s4GfmE93.js +0 -131
- package/dist/ids-s4GfmE93.js.map +0 -1
- package/dist/promptSafety-CQ5Un4wi.js.map +0 -1
- package/dist/promptSafety-DfZYNtjK.cjs.map +0 -1
|
@@ -2,9 +2,9 @@ const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
|
|
|
2
2
|
const require_dist = require("./dist-pWpC-b04.cjs");
|
|
3
3
|
const require_atomic = require("./atomic-C_7YpMiM.cjs");
|
|
4
4
|
const require_relPath = require("./relPath-CgGi4-Nv.cjs");
|
|
5
|
-
const
|
|
6
|
-
const require_promptSafety = require("./promptSafety-
|
|
7
|
-
const require_discovery = require("./discovery
|
|
5
|
+
const require_calendarGrid = require("./calendarGrid-CaS9er8i.cjs");
|
|
6
|
+
const require_promptSafety = require("./promptSafety-FD8cQn3e.cjs");
|
|
7
|
+
const require_discovery = require("./discovery-DYcR83qx.cjs");
|
|
8
8
|
const require_feeds_paths = require("./feeds/paths.cjs");
|
|
9
9
|
const require_skill_bridge_index = require("./skill-bridge/index.cjs");
|
|
10
10
|
let node_path = require("node:path");
|
|
@@ -318,7 +318,7 @@ function toRefRecords(linked) {
|
|
|
318
318
|
function projectBacklinks(field, schema, enriched, linked) {
|
|
319
319
|
const source = linked[field.from];
|
|
320
320
|
if (!source) return [];
|
|
321
|
-
return require_promptSafety.backlinkRows(field,
|
|
321
|
+
return require_promptSafety.backlinkRows(field, require_calendarGrid.fieldText(enriched[schema.primaryKey]), Object.values(source.byId)).map((row) => require_promptSafety.projectBacklinkRow(row, field.display, source.schema.primaryKey));
|
|
322
322
|
}
|
|
323
323
|
/** Project the computed (never-stored) field kinds onto one derived
|
|
324
324
|
* record: `toggle` → boolean off its enum, `embed` → the target record
|
|
@@ -326,9 +326,9 @@ function projectBacklinks(field, schema, enriched, linked) {
|
|
|
326
326
|
* `backlinks` → the matching source rows (see `projectBacklinks`). */
|
|
327
327
|
function projectComputed(schema, enriched, linked) {
|
|
328
328
|
for (const [key, field] of Object.entries(schema.fields)) {
|
|
329
|
-
if (field.type === "toggle" && field.field) enriched[key] =
|
|
329
|
+
if (field.type === "toggle" && field.field) enriched[key] = require_calendarGrid.fieldText(enriched[field.field]) === field.onValue;
|
|
330
330
|
if (field.type === "embed" && field.to) {
|
|
331
|
-
const targetId =
|
|
331
|
+
const targetId = require_calendarGrid.embedTargetId(field, enriched);
|
|
332
332
|
const target = require_promptSafety.ownProp(linked, field.to);
|
|
333
333
|
enriched[key] = targetId && target && require_promptSafety.ownProp(target.byId, targetId) || null;
|
|
334
334
|
}
|
|
@@ -349,7 +349,7 @@ function projectRollups(schema, record, linked) {
|
|
|
349
349
|
if (field.type !== "rollup") continue;
|
|
350
350
|
if (out === record) out = { ...record };
|
|
351
351
|
const source = linked[field.from];
|
|
352
|
-
const selfId =
|
|
352
|
+
const selfId = require_calendarGrid.fieldText(record[schema.primaryKey]);
|
|
353
353
|
out[key] = source ? require_promptSafety.rollupValue(field, selfId, Object.values(source.byId)) : null;
|
|
354
354
|
}
|
|
355
355
|
return out;
|
|
@@ -396,8 +396,8 @@ function strictTypeProblem(key, spec, value) {
|
|
|
396
396
|
case "number":
|
|
397
397
|
case "money": return Number.isFinite(require_promptSafety.coerceNumeric(value)) ? null : `'${key}' = '${String(value)}' is not numeric (a '${spec.type}' field stores a plain number)`;
|
|
398
398
|
case "boolean": return value === true || value === false ? null : `'${key}' = '${String(value)}' is not a boolean (store true or false, unquoted)`;
|
|
399
|
-
case "date": return
|
|
400
|
-
case "datetime": return
|
|
399
|
+
case "date": return require_calendarGrid.parseIsoDate(value) !== null ? null : `'${key}' = '${String(value)}' is not a real YYYY-MM-DD date`;
|
|
400
|
+
case "datetime": return require_calendarGrid.parseIsoDateTime(value) !== null ? null : `'${key}' = '${String(value)}' is not a YYYY-MM-DDTHH:MM datetime (seconds optional, no timezone suffix — the shape the calendar parses)`;
|
|
401
401
|
default: return null;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
@@ -442,7 +442,7 @@ var compiled = /* @__PURE__ */ new WeakMap();
|
|
|
442
442
|
function compileRecordZ(schema, tier) {
|
|
443
443
|
const cached = compiled.get(schema)?.[tier];
|
|
444
444
|
if (cached) return cached;
|
|
445
|
-
const stored = Object.entries(schema.fields).filter(([, spec]) => !
|
|
445
|
+
const stored = Object.entries(schema.fields).filter(([, spec]) => !require_calendarGrid.COMPUTED_TYPES.has(spec.type));
|
|
446
446
|
const validator = zod.z.looseObject({}).superRefine((record, ctx) => {
|
|
447
447
|
for (const [key, spec] of stored) {
|
|
448
448
|
const problem = recordFieldProblem(key, spec, record[key], tier);
|
|
@@ -520,7 +520,7 @@ async function validateStoreRecords(collection, opts) {
|
|
|
520
520
|
const issues = [];
|
|
521
521
|
for (const item of items) {
|
|
522
522
|
if (issues.length >= MAX_ISSUES) break;
|
|
523
|
-
const itemId =
|
|
523
|
+
const itemId = require_calendarGrid.fieldText(item[collection.schema.primaryKey]);
|
|
524
524
|
const problem = validateRecordObject(item, itemId, collection.schema, "strict");
|
|
525
525
|
if (problem) issues.push({
|
|
526
526
|
file: itemId,
|
|
@@ -635,7 +635,7 @@ async function applyMutateAction(collection, action, itemId, params, opts = {})
|
|
|
635
635
|
};
|
|
636
636
|
const stored = Object.entries(existing).filter(([key]) => {
|
|
637
637
|
const spec = collection.schema.fields[key];
|
|
638
|
-
return !spec || !
|
|
638
|
+
return !spec || !require_calendarGrid.COMPUTED_TYPES.has(spec.type);
|
|
639
639
|
});
|
|
640
640
|
const merged = {
|
|
641
641
|
...Object.fromEntries(stored),
|
|
@@ -712,7 +712,7 @@ async function countRecordFiles(dataDir, workspaceRoot) {
|
|
|
712
712
|
* `countRecordFiles` (an unreadable file / missing engine must not
|
|
713
713
|
* break the whole ontology). */
|
|
714
714
|
async function countRecords(collection, workspaceRoot) {
|
|
715
|
-
if (
|
|
715
|
+
if (require_calendarGrid.storageKindFor(collection.schema) !== "file") try {
|
|
716
716
|
return (await require_discovery.storeFor(collection, { workspaceRoot }).page({ limit: 0 })).total;
|
|
717
717
|
} catch (err) {
|
|
718
718
|
if (require_discovery.isBackendUnavailable(err)) return null;
|
|
@@ -757,7 +757,7 @@ function buildRecordsById(items, primaryKey) {
|
|
|
757
757
|
* ties pick a different record — and thus a different icon — between
|
|
758
758
|
* reconciles. A stable id sort pins one answer. */
|
|
759
759
|
function sortByPrimaryKey(items, primaryKey) {
|
|
760
|
-
return [...items].sort((left, right) =>
|
|
760
|
+
return [...items].sort((left, right) => require_calendarGrid.fieldText(left[primaryKey]).localeCompare(require_calendarGrid.fieldText(right[primaryKey])));
|
|
761
761
|
}
|
|
762
762
|
/** Compute the effective launcher icon for `collection`: its static
|
|
763
763
|
* `schema.icon` when it declares no `dynamicIcon`, else the icon
|
|
@@ -893,7 +893,7 @@ function successorId(sourceId, next) {
|
|
|
893
893
|
function matchesWhen(when, schema, item) {
|
|
894
894
|
if (when) {
|
|
895
895
|
const raw = item[when.field];
|
|
896
|
-
const text =
|
|
896
|
+
const text = require_calendarGrid.fieldTextOrNull(raw);
|
|
897
897
|
return text !== null && when.in.includes(text);
|
|
898
898
|
}
|
|
899
899
|
return require_promptSafety.itemIsDone(schema, item);
|
|
@@ -905,10 +905,10 @@ function matchesWhen(when, schema, item) {
|
|
|
905
905
|
* Discovery rejects a map that doesn't cover the enum's values, so null
|
|
906
906
|
* here means a record that predates a map/enum edit. */
|
|
907
907
|
function resolveEvery(every, sourceItem) {
|
|
908
|
-
if (!
|
|
908
|
+
if (!require_calendarGrid.isFieldDrivenEvery(every)) return every;
|
|
909
909
|
const raw = sourceItem[every.fromField];
|
|
910
910
|
if (raw === void 0 || raw === null || raw === "") return null;
|
|
911
|
-
const key =
|
|
911
|
+
const key = require_calendarGrid.fieldTextOrNull(raw);
|
|
912
912
|
if (key === null || !Object.hasOwn(every.map, key)) return null;
|
|
913
913
|
return every.map[key] ?? null;
|
|
914
914
|
}
|
|
@@ -947,7 +947,7 @@ function logSpawnSkip(slug, triggerField, every, sourceItem, sourceId) {
|
|
|
947
947
|
});
|
|
948
948
|
return;
|
|
949
949
|
}
|
|
950
|
-
const fromField =
|
|
950
|
+
const fromField = require_calendarGrid.isFieldDrivenEvery(every) ? every.fromField : void 0;
|
|
951
951
|
require_discovery.log.warn("collections", "spawn skipped: no `every` mapping for frequency value", {
|
|
952
952
|
slug,
|
|
953
953
|
sourceId,
|
|
@@ -1546,7 +1546,7 @@ async function handleGetItems(collection, args, deps) {
|
|
|
1546
1546
|
function computedKeyProblem(record, schema) {
|
|
1547
1547
|
for (const key of Object.keys(record)) {
|
|
1548
1548
|
const spec = schema.fields[key];
|
|
1549
|
-
if (!spec || !
|
|
1549
|
+
if (!spec || !require_calendarGrid.COMPUTED_TYPES.has(spec.type)) continue;
|
|
1550
1550
|
if (spec.type === "toggle" && spec.field) return `'${key}' is a toggle projection — write the enum field '${spec.field}' instead`;
|
|
1551
1551
|
return `'${key}' is ${{
|
|
1552
1552
|
derived: "derived",
|
|
@@ -1586,7 +1586,7 @@ async function mergeWithExisting(collection, store, record, itemId) {
|
|
|
1586
1586
|
if (!existing) return `'${itemId}' not found — mode "merge" updates an existing record; use "upsert" or "create" to add it`;
|
|
1587
1587
|
const stored = Object.entries(existing).filter(([key]) => {
|
|
1588
1588
|
const spec = collection.schema.fields[key];
|
|
1589
|
-
return !spec || !
|
|
1589
|
+
return !spec || !require_calendarGrid.COMPUTED_TYPES.has(spec.type);
|
|
1590
1590
|
});
|
|
1591
1591
|
return {
|
|
1592
1592
|
...Object.fromEntries(stored),
|
|
@@ -2133,4 +2133,4 @@ Object.defineProperty(exports, "validateRecordObject", {
|
|
|
2133
2133
|
}
|
|
2134
2134
|
});
|
|
2135
2135
|
|
|
2136
|
-
//# sourceMappingURL=server-
|
|
2136
|
+
//# sourceMappingURL=server-l4TZ5Lbf.cjs.map
|