@mulmoclaude/core 3.7.0 → 3.10.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.
Files changed (74) hide show
  1. package/dist/collection/core/itemId.d.ts +28 -0
  2. package/dist/collection/firestore.cjs +9 -1
  3. package/dist/collection/firestore.cjs.map +1 -1
  4. package/dist/collection/firestore.js +10 -2
  5. package/dist/collection/firestore.js.map +1 -1
  6. package/dist/collection/index.cjs +55 -66
  7. package/dist/collection/index.cjs.map +1 -1
  8. package/dist/collection/index.d.ts +1 -1
  9. package/dist/collection/index.js +3 -15
  10. package/dist/collection/index.js.map +1 -1
  11. package/dist/collection/registry/server/index.cjs +19 -19
  12. package/dist/collection/registry/server/index.cjs.map +1 -1
  13. package/dist/collection/registry/server/index.js +2 -2
  14. package/dist/collection/server/firestoreDocs.d.ts +18 -0
  15. package/dist/collection/server/host.d.ts +29 -0
  16. package/dist/collection/server/index.cjs +70 -62
  17. package/dist/collection/server/index.d.ts +2 -3
  18. package/dist/collection/server/index.js +4 -4
  19. package/dist/collection/server/io.d.ts +5 -3
  20. package/dist/collection/server/manageTool.d.ts +0 -4
  21. package/dist/collection/server/publishProject.d.ts +171 -2
  22. package/dist/collection-watchers/index.cjs +82 -38
  23. package/dist/collection-watchers/index.cjs.map +1 -1
  24. package/dist/collection-watchers/index.js +67 -23
  25. package/dist/collection-watchers/index.js.map +1 -1
  26. package/dist/{store-_61sO8K8.js → discovery-B9zdNkgW.js} +2525 -2354
  27. package/dist/discovery-B9zdNkgW.js.map +1 -0
  28. package/dist/{store-5_P_NsGa.cjs → discovery-BsXiDZBR.cjs} +2545 -2362
  29. package/dist/discovery-BsXiDZBR.cjs.map +1 -0
  30. package/dist/feeds/index.cjs +4 -4
  31. package/dist/feeds/index.js +2 -2
  32. package/dist/feeds/server/index.cjs +14 -14
  33. package/dist/feeds/server/index.cjs.map +1 -1
  34. package/dist/feeds/server/index.js +4 -4
  35. package/dist/firestore/listen.d.ts +4 -0
  36. package/dist/google/index.cjs +16 -16
  37. package/dist/google/index.cjs.map +1 -1
  38. package/dist/google/index.js +2 -2
  39. package/dist/{ingestTypes-CEi-Ot7F.js → ingestTypes-B312BwXg.js} +2 -2
  40. package/dist/{ingestTypes-CEi-Ot7F.js.map → ingestTypes-B312BwXg.js.map} +1 -1
  41. package/dist/{ingestTypes-iaiq33Ph.cjs → ingestTypes-B4XfrUoq.cjs} +3 -3
  42. package/dist/{ingestTypes-iaiq33Ph.cjs.map → ingestTypes-B4XfrUoq.cjs.map} +1 -1
  43. package/dist/{calendarGrid-CQ8MVSRb.js → itemId-DfTm08jm.js} +34 -2
  44. package/dist/itemId-DfTm08jm.js.map +1 -0
  45. package/dist/{calendarGrid-DGILaVxI.cjs → itemId-Dzrr3vs5.cjs} +45 -1
  46. package/dist/itemId-Dzrr3vs5.cjs.map +1 -0
  47. package/dist/listen-D5av7GzB.js +22 -0
  48. package/dist/listen-D5av7GzB.js.map +1 -0
  49. package/dist/listen-UZA68Upt.cjs +45 -0
  50. package/dist/listen-UZA68Upt.cjs.map +1 -0
  51. package/dist/{promptSafety-CpiME8pj.js → promptSafety-CSdyp7RF.js} +2 -2
  52. package/dist/{promptSafety-CpiME8pj.js.map → promptSafety-CSdyp7RF.js.map} +1 -1
  53. package/dist/{promptSafety-NNGViiCr.cjs → promptSafety-CWqYq-NS.cjs} +8 -8
  54. package/dist/{promptSafety-NNGViiCr.cjs.map → promptSafety-CWqYq-NS.cjs.map} +1 -1
  55. package/dist/remote-host/server/hostRunner.d.ts +2 -4
  56. package/dist/remote-host/server/index.cjs +4 -19
  57. package/dist/remote-host/server/index.cjs.map +1 -1
  58. package/dist/remote-host/server/index.js +1 -16
  59. package/dist/remote-host/server/index.js.map +1 -1
  60. package/dist/{server-B48Jyxcj.js → server-BNe8XMtu.js} +388 -568
  61. package/dist/server-BNe8XMtu.js.map +1 -0
  62. package/dist/{server-CWZyg8fn.cjs → server-CgkkWWBd.cjs} +590 -734
  63. package/dist/server-CgkkWWBd.cjs.map +1 -0
  64. package/dist/whisper/index.cjs +1 -1
  65. package/dist/whisper/index.js +1 -1
  66. package/package.json +1 -1
  67. package/dist/calendarGrid-CQ8MVSRb.js.map +0 -1
  68. package/dist/calendarGrid-DGILaVxI.cjs.map +0 -1
  69. package/dist/collection/core/shortHexId.d.ts +0 -8
  70. package/dist/collection/server/publish.d.ts +0 -56
  71. package/dist/server-B48Jyxcj.js.map +0 -1
  72. package/dist/server-CWZyg8fn.cjs.map +0 -1
  73. package/dist/store-5_P_NsGa.cjs.map +0 -1
  74. package/dist/store-_61sO8K8.js.map +0 -1
@@ -4,9 +4,9 @@ const require_dist = require("../dist-CsgSfWwR.cjs");
4
4
  const require_text = require("../text-CaAh9ZSO.cjs");
5
5
  const require_root = require("../root-rPH6FGDT.cjs");
6
6
  const require_utils_fetch = require("../utils/fetch.cjs");
7
- const require_calendarGrid = require("../calendarGrid-DGILaVxI.cjs");
7
+ const require_itemId = require("../itemId-Dzrr3vs5.cjs");
8
8
  const require_project = require("../project-C1ep9pvo.cjs");
9
- const require_store = require("../store-5_P_NsGa.cjs");
9
+ const require_discovery = require("../discovery-BsXiDZBR.cjs");
10
10
  const require_paths = require("../paths-ClV946_f.cjs");
11
11
  let node_fs = require("node:fs");
12
12
  let node_path = require("node:path");
@@ -19,11 +19,11 @@ let node_http = require("node:http");
19
19
  node_http = require_rolldown_runtime.__toESM(node_http, 1);
20
20
  let google_auth_library = require("google-auth-library");
21
21
  //#region src/google/host.ts
22
- var hostSlot = require_store.createHostSlot("@mulmoclaude/core/google: configureGoogleHost()");
22
+ var hostSlot = require_discovery.createHostSlot("@mulmoclaude/core/google: configureGoogleHost()");
23
23
  function configureGoogleHost(binding) {
24
24
  hostSlot.set(binding.log);
25
25
  }
26
- var log = require_store.createForwardingLogger(() => hostSlot.peek());
26
+ var log = require_discovery.createForwardingLogger(() => hostSlot.peek());
27
27
  //#endregion
28
28
  //#region src/google/datetime.ts
29
29
  var ISO_DATE_TIME_WITH_OFFSET_RE = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:Z|[+-](\d{2}):(\d{2}))$/;
@@ -1023,7 +1023,7 @@ var stateLockPath = (statePath) => `${statePath}.lock`;
1023
1023
  var SYNC_STATE_MODE = 384;
1024
1024
  /** `<workspace>/data/calendar/.sync-state.json` */
1025
1025
  function calendarSyncStatePath(workspaceRoot) {
1026
- return node_path.default.join(workspaceRoot ?? require_store.getWorkspaceRoot(), "data", "calendar", ".sync-state.json");
1026
+ return node_path.default.join(workspaceRoot ?? require_discovery.getWorkspaceRoot(), "data", "calendar", ".sync-state.json");
1027
1027
  }
1028
1028
  var calendarKey = canonicalCalendarId;
1029
1029
  /** The key for a consumer that reads a calendar without KEEPING what it reads.
@@ -1210,7 +1210,7 @@ async function markCalendarBackfilled(dataDir, calendarId, walkedAt) {
1210
1210
  var PUSH_STATE_MODE = 384;
1211
1211
  /** `<workspace>/data/calendar/.push-state.json` */
1212
1212
  function calendarPushStatePath(workspaceRoot) {
1213
- return node_path.default.join(workspaceRoot ?? require_store.getWorkspaceRoot(), "data", "calendar", ".push-state.json");
1213
+ return node_path.default.join(workspaceRoot ?? require_discovery.getWorkspaceRoot(), "data", "calendar", ".push-state.json");
1214
1214
  }
1215
1215
  var toShadowEvent = (event) => ({
1216
1216
  summary: event.summary,
@@ -1312,7 +1312,7 @@ var MAX_SECONDS = 59;
1312
1312
  * already share, so the push agrees with the rest of the app on what a valid
1313
1313
  * stored date IS — and rejects an impossible one here instead of turning it
1314
1314
  * into an opaque Google 400. */
1315
- var isCalendarDate = (value) => require_calendarGrid.parseIsoDate(value) !== null;
1315
+ var isCalendarDate = (value) => require_itemId.parseIsoDate(value) !== null;
1316
1316
  /** A value Google already accepts verbatim, as the event time to send, or null.
1317
1317
  *
1318
1318
  * Reached when the schema maps `start` onto a `string` field: `projectValue`
@@ -1324,7 +1324,7 @@ function rawGoogleTime(value) {
1324
1324
  const zone = value.match(ZONE_SUFFIX_RE$1)?.[0];
1325
1325
  if (zone === void 0) return null;
1326
1326
  const civil = value.slice(0, value.length - zone.length).replace(FRACTIONAL_SECONDS_RE$1, "");
1327
- return require_calendarGrid.parseIsoDateTime(civil) === null ? null : { dateTime: value };
1327
+ return require_itemId.parseIsoDateTime(civil) === null ? null : { dateTime: value };
1328
1328
  }
1329
1329
  /** Google's own all-day `end` is EXCLUSIVE — a single day on the 12th ends on
1330
1330
  * the 13th. The pull stores that as `2026-05-13T00:00` and this takes the date
@@ -1354,7 +1354,7 @@ function clockSegments(clockPart) {
1354
1354
  * Validity comes from the shared strict parser, so an out-of-range clock or an
1355
1355
  * impossible day is refused here rather than sent to Google. */
1356
1356
  function parseStoredDateTime(value) {
1357
- if (require_calendarGrid.parseIsoDateTime(value) === null) return null;
1357
+ if (require_itemId.parseIsoDateTime(value) === null) return null;
1358
1358
  const [datePart, clockPart, ...extra] = value.split(DATE_TIME_SEPARATOR);
1359
1359
  if (datePart === void 0 || clockPart === void 0 || extra.length > 0) return null;
1360
1360
  const clock = clockSegments(clockPart);
@@ -1614,7 +1614,7 @@ async function liveCalendarMeta(accessToken, calendarId) {
1614
1614
  };
1615
1615
  }
1616
1616
  async function findCalendarCollection(slug, workspaceRoot) {
1617
- return (await require_store.discoverCollections({ workspaceRoot })).find((collection) => collection.slug === slug && collection.schema.googleCalendar) ?? null;
1617
+ return (await require_discovery.discoverCollections({ workspaceRoot })).find((collection) => collection.slug === slug && collection.schema.googleCalendar) ?? null;
1618
1618
  }
1619
1619
  var liveDeps = {
1620
1620
  findCollection: findCalendarCollection,
@@ -1867,7 +1867,7 @@ function locallyEditedIds(records, shadow, map, primaryKey, fields) {
1867
1867
  async function unsentLocalEdits(collection, workspaceRoot) {
1868
1868
  const { schema } = collection;
1869
1869
  const shadow = await loadCalendarShadow(schema.googleCalendar?.calendarId, workspaceRoot);
1870
- return locallyEditedIds(await require_store.storeFor(collection, { workspaceRoot }).list(), shadow, pushableMap(schema.googleCalendar?.map ?? {}), schema.primaryKey, schema.fields);
1870
+ return locallyEditedIds(await require_discovery.storeFor(collection, { workspaceRoot }).list(), shadow, pushableMap(schema.googleCalendar?.map ?? {}), schema.primaryKey, schema.fields);
1871
1871
  }
1872
1872
  /** Push one collection WITHOUT taking the calendar lock.
1873
1873
  *
@@ -1886,7 +1886,7 @@ async function pushCollectionNow(collection, workspaceRoot, deps = liveDeps) {
1886
1886
  };
1887
1887
  const map = pushableMap(schema.googleCalendar?.map ?? {});
1888
1888
  const shadow = await loadCalendarShadow(calendarId, workspaceRoot);
1889
- const records = await require_store.storeFor(collection, { workspaceRoot }).list();
1889
+ const records = await require_discovery.storeFor(collection, { workspaceRoot }).list();
1890
1890
  const ctx = {
1891
1891
  accessToken,
1892
1892
  calendarId,
@@ -2005,7 +2005,7 @@ async function writeProjected(write, event, schema, existing) {
2005
2005
  async function applyEvent(collection, event, workspaceRoot, hasUnsentEdit) {
2006
2006
  const { schema } = collection;
2007
2007
  try {
2008
- const store = require_store.storeFor(collection, { workspaceRoot });
2008
+ const store = require_discovery.storeFor(collection, { workspaceRoot });
2009
2009
  if (!store.write || !store.delete) return {
2010
2010
  kind: "unwritable",
2011
2011
  message: `collection '${collection.slug}' is read-only`
@@ -2522,7 +2522,7 @@ function orphanedCalendarId(deleted, remaining) {
2522
2522
  async function releaseOrphanedCalendarToken(deleted, workspaceRoot) {
2523
2523
  try {
2524
2524
  if (!deleted.googleCalendar) return null;
2525
- const orphaned = orphanedCalendarId(deleted, (await require_store.discoverCollections({ workspaceRoot })).map((collection) => collection.schema));
2525
+ const orphaned = orphanedCalendarId(deleted, (await require_discovery.discoverCollections({ workspaceRoot })).map((collection) => collection.schema));
2526
2526
  if (orphaned === null) return null;
2527
2527
  await clearCalendarSyncToken(orphaned, workspaceRoot);
2528
2528
  await clearCalendarShadow(orphaned, workspaceRoot);
@@ -2536,7 +2536,7 @@ async function releaseOrphanedCalendarToken(deleted, workspaceRoot) {
2536
2536
  }
2537
2537
  /** Every declaring collection, grouped by the calendar it reads. */
2538
2538
  async function declaringGroups(workspaceRoot) {
2539
- return groupByCalendar((await require_store.discoverCollections({ workspaceRoot })).filter((collection) => collection.schema.googleCalendar));
2539
+ return groupByCalendar((await require_discovery.discoverCollections({ workspaceRoot })).filter((collection) => collection.schema.googleCalendar));
2540
2540
  }
2541
2541
  /** Whether a background sync of these groups may run at all.
2542
2542
  *
@@ -2666,7 +2666,7 @@ function googleCalendarSyncTaskDef(opts) {
2666
2666
  intervalMs: opts?.intervalMs ?? DEFAULT_SYNC_INTERVAL_MS
2667
2667
  },
2668
2668
  missedRunPolicy: _receptron_task_scheduler.MISSED_RUN_POLICIES.runOnce,
2669
- run: () => syncDueCalendarCollections(opts?.workspaceRoot ?? require_store.getWorkspaceRoot(), scheduledIntervalMs(def)).then(() => {})
2669
+ run: () => syncDueCalendarCollections(opts?.workspaceRoot ?? require_discovery.getWorkspaceRoot(), scheduledIntervalMs(def)).then(() => {})
2670
2670
  };
2671
2671
  return def;
2672
2672
  }