@mulmoclaude/core 1.6.0 → 1.7.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.
Files changed (63) hide show
  1. package/assets/helps/error-recovery.md +46 -0
  2. package/assets/helps/google-calendar-collection.md +57 -3
  3. package/assets/helps/google.md +3 -2
  4. package/dist/calendarGrid-CaS9er8i.cjs +576 -0
  5. package/dist/calendarGrid-CaS9er8i.cjs.map +1 -0
  6. package/dist/calendarGrid-CrGxeCOG.js +397 -0
  7. package/dist/calendarGrid-CrGxeCOG.js.map +1 -0
  8. package/dist/collection/index.cjs +44 -44
  9. package/dist/collection/index.cjs.map +1 -1
  10. package/dist/collection/index.js +2 -2
  11. package/dist/collection/registry/server/index.cjs +2 -2
  12. package/dist/collection/registry/server/index.js +2 -2
  13. package/dist/collection/server/index.cjs +4 -4
  14. package/dist/collection/server/index.js +3 -3
  15. package/dist/collection-watchers/index.cjs +5 -5
  16. package/dist/collection-watchers/index.cjs.map +1 -1
  17. package/dist/collection-watchers/index.js +4 -4
  18. package/dist/{discovery--kRUWed0.cjs → discovery-DYcR83qx.cjs} +64 -53
  19. package/dist/discovery-DYcR83qx.cjs.map +1 -0
  20. package/dist/{discovery-CKR4TOX3.js → discovery-_fjsluLx.js} +43 -32
  21. package/dist/discovery-_fjsluLx.js.map +1 -0
  22. package/dist/feeds/index.cjs +4 -4
  23. package/dist/feeds/index.js +2 -2
  24. package/dist/feeds/server/index.cjs +6 -6
  25. package/dist/feeds/server/index.js +4 -4
  26. package/dist/google/apiClient.d.ts +6 -0
  27. package/dist/google/calendar.d.ts +79 -8
  28. package/dist/google/calendarPushState.d.ts +17 -0
  29. package/dist/google/collectionPush.d.ts +64 -0
  30. package/dist/google/collectionSync.d.ts +10 -0
  31. package/dist/google/index.cjs +712 -36
  32. package/dist/google/index.cjs.map +1 -1
  33. package/dist/google/index.d.ts +7 -3
  34. package/dist/google/index.js +683 -37
  35. package/dist/google/index.js.map +1 -1
  36. package/dist/google/pushDateTime.d.ts +10 -0
  37. package/dist/google/pushPlan.d.ts +73 -0
  38. package/dist/{ingestTypes-xX8VpQqh.cjs → ingestTypes-D1GQdG8e.cjs} +3 -3
  39. package/dist/{ingestTypes-xX8VpQqh.cjs.map → ingestTypes-D1GQdG8e.cjs.map} +1 -1
  40. package/dist/{ingestTypes-L59cIGgX.js → ingestTypes-XReG-li7.js} +2 -2
  41. package/dist/{ingestTypes-L59cIGgX.js.map → ingestTypes-XReG-li7.js.map} +1 -1
  42. package/dist/{promptSafety-CQ5Un4wi.js → promptSafety-C--op_6a.js} +3 -269
  43. package/dist/promptSafety-C--op_6a.js.map +1 -0
  44. package/dist/{promptSafety-DfZYNtjK.cjs → promptSafety-FD8cQn3e.cjs} +8 -358
  45. package/dist/promptSafety-FD8cQn3e.cjs.map +1 -0
  46. package/dist/remote-host/index.cjs +8 -0
  47. package/dist/remote-host/index.cjs.map +1 -1
  48. package/dist/remote-host/index.d.ts +21 -0
  49. package/dist/remote-host/index.js +8 -1
  50. package/dist/remote-host/index.js.map +1 -1
  51. package/dist/{server-D_6FLygK.js → server-BlIrtGKl.js} +4 -4
  52. package/dist/{server-D_6FLygK.js.map → server-BlIrtGKl.js.map} +1 -1
  53. package/dist/{server-gEOeV_Nv.cjs → server-l4TZ5Lbf.cjs} +21 -21
  54. package/dist/{server-gEOeV_Nv.cjs.map → server-l4TZ5Lbf.cjs.map} +1 -1
  55. package/package.json +1 -1
  56. package/dist/discovery--kRUWed0.cjs.map +0 -1
  57. package/dist/discovery-CKR4TOX3.js.map +0 -1
  58. package/dist/ids-BnTh3Hl0.cjs +0 -226
  59. package/dist/ids-BnTh3Hl0.cjs.map +0 -1
  60. package/dist/ids-s4GfmE93.js +0 -131
  61. package/dist/ids-s4GfmE93.js.map +0 -1
  62. package/dist/promptSafety-CQ5Un4wi.js.map +0 -1
  63. 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 require_ids = require("./ids-BnTh3Hl0.cjs");
6
- const require_promptSafety = require("./promptSafety-DfZYNtjK.cjs");
7
- const require_discovery = require("./discovery--kRUWed0.cjs");
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, require_ids.fieldText(enriched[schema.primaryKey]), Object.values(source.byId)).map((row) => require_promptSafety.projectBacklinkRow(row, field.display, source.schema.primaryKey));
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] = require_ids.fieldText(enriched[field.field]) === field.onValue;
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 = require_ids.embedTargetId(field, enriched);
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 = require_ids.fieldText(record[schema.primaryKey]);
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 require_promptSafety.parseIsoDate(value) !== null ? null : `'${key}' = '${String(value)}' is not a real YYYY-MM-DD date`;
400
- case "datetime": return require_promptSafety.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)`;
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]) => !require_ids.COMPUTED_TYPES.has(spec.type));
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 = require_ids.fieldText(item[collection.schema.primaryKey]);
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 || !require_ids.COMPUTED_TYPES.has(spec.type);
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 (require_ids.storageKindFor(collection.schema) !== "file") try {
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) => require_ids.fieldText(left[primaryKey]).localeCompare(require_ids.fieldText(right[primaryKey])));
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 = require_ids.fieldTextOrNull(raw);
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 (!require_ids.isFieldDrivenEvery(every)) return every;
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 = require_ids.fieldTextOrNull(raw);
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 = require_ids.isFieldDrivenEvery(every) ? every.fromField : void 0;
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 || !require_ids.COMPUTED_TYPES.has(spec.type)) continue;
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 || !require_ids.COMPUTED_TYPES.has(spec.type);
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-gEOeV_Nv.cjs.map
2136
+ //# sourceMappingURL=server-l4TZ5Lbf.cjs.map