@remnic/core 9.69.25 → 9.69.27

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 (136) hide show
  1. package/dist/access-admin-ops-surface.d.ts +1 -1
  2. package/dist/access-admin-ops-surface.js +4 -4
  3. package/dist/access-authorization-probe.d.ts +1 -1
  4. package/dist/access-authorization-probe.js +5 -5
  5. package/dist/access-boundary.d.ts +1 -1
  6. package/dist/access-boundary.js +4 -4
  7. package/dist/access-cli.js +29 -29
  8. package/dist/access-extraction-force-flush.d.ts +1 -1
  9. package/dist/access-extraction-force-flush.js +4 -4
  10. package/dist/access-http-briefing.d.ts +1 -1
  11. package/dist/access-http-briefing.js +5 -5
  12. package/dist/access-http-lcm-compaction.d.ts +1 -1
  13. package/dist/access-http-lifecycle-flush.d.ts +1 -1
  14. package/dist/access-http-offline-stream.d.ts +1 -1
  15. package/dist/access-http-query.js +4 -4
  16. package/dist/access-http.d.ts +2 -2
  17. package/dist/access-http.js +16 -16
  18. package/dist/access-identity-continuity-surface.js +4 -4
  19. package/dist/access-lcm-surface.d.ts +1 -1
  20. package/dist/access-lcm-surface.js +4 -4
  21. package/dist/access-mcp.d.ts +1 -1
  22. package/dist/access-mcp.js +11 -11
  23. package/dist/access-namespace-preflight.js +4 -4
  24. package/dist/access-observe-write-surface.d.ts +1 -1
  25. package/dist/access-observe-write-surface.js +4 -4
  26. package/dist/access-operations-batch.js +5 -5
  27. package/dist/access-operations.d.ts +6 -6
  28. package/dist/access-operations.js +10 -10
  29. package/dist/access-recall-concurrency.d.ts +1 -1
  30. package/dist/access-recall-concurrency.js +4 -4
  31. package/dist/access-recall-response.d.ts +1 -1
  32. package/dist/access-recall-response.js +4 -4
  33. package/dist/access-recall-surface.d.ts +1 -1
  34. package/dist/access-recall-surface.js +4 -4
  35. package/dist/access-schema.d.ts +91 -91
  36. package/dist/access-service-helpers.d.ts +1 -1
  37. package/dist/access-service.d.ts +1 -1
  38. package/dist/access-service.js +4 -4
  39. package/dist/access-surface-catalog.d.ts +1 -1
  40. package/dist/access-surface-catalog.js +6 -6
  41. package/dist/active-recall.js +4 -4
  42. package/dist/buffer.js +4 -4
  43. package/dist/{chunk-OGUKSLYZ.js → chunk-2OO6TPQG.js} +2 -2
  44. package/dist/{chunk-66OJSCI6.js → chunk-3GGUMRS4.js} +2 -2
  45. package/dist/{chunk-PX4UMA5Z.js → chunk-3NYTZE5G.js} +2 -2
  46. package/dist/{chunk-FVOP3NT7.js → chunk-5IEV3YBY.js} +2 -2
  47. package/dist/{chunk-2ITE4C2Z.js → chunk-6LLLREDJ.js} +2 -2
  48. package/dist/{chunk-K7724CH2.js → chunk-6VF3R3XQ.js} +2 -2
  49. package/dist/{chunk-56Y6EKZN.js → chunk-CGJV2YIY.js} +2 -2
  50. package/dist/{chunk-KB2G2I6Q.js → chunk-DDB3S53L.js} +2 -2
  51. package/dist/{chunk-KTWG7CNY.js → chunk-EWCNCQOU.js} +2 -2
  52. package/dist/{chunk-L7Z57SID.js → chunk-FHYVNJBN.js} +2 -2
  53. package/dist/{chunk-33JKYLPX.js → chunk-GGRD3JEH.js} +2 -2
  54. package/dist/{chunk-37KUQPX4.js → chunk-GNMELJGM.js} +2 -2
  55. package/dist/{chunk-2IOHTUP3.js → chunk-GRCREL6Q.js} +3 -3
  56. package/dist/{chunk-H54VWRPS.js → chunk-JJ4XK25O.js} +2 -2
  57. package/dist/{chunk-SVXJLDDC.js → chunk-KH6PK4EQ.js} +5 -5
  58. package/dist/{chunk-NLYVH66G.js → chunk-MT47LH5L.js} +2 -2
  59. package/dist/{chunk-SMWTZLHE.js → chunk-MZLV2OJE.js} +9 -9
  60. package/dist/{chunk-ICKJ52PE.js → chunk-OU4K7IFP.js} +3 -3
  61. package/dist/{chunk-27QVNSQ3.js → chunk-QBH7M7Q4.js} +2 -2
  62. package/dist/{chunk-O6ZNNVSP.js → chunk-RX3SC4C5.js} +2 -2
  63. package/dist/{chunk-RJYJ7KR7.js → chunk-SO4IYSGT.js} +12 -12
  64. package/dist/{chunk-C553ZTLF.js → chunk-THQTFTQS.js} +8 -8
  65. package/dist/{chunk-X5K5TAQZ.js → chunk-V4ZBR7CW.js} +2 -2
  66. package/dist/{chunk-P6FHFTZ7.js → chunk-XPFC6D45.js} +12 -7
  67. package/dist/chunk-XPFC6D45.js.map +1 -0
  68. package/dist/{chunk-ZIW5JVRM.js → chunk-XTJC7CVX.js} +2 -2
  69. package/dist/{chunk-Z6COGHHN.js → chunk-Y2MZGBOY.js} +2 -2
  70. package/dist/{chunk-H4SEGIZY.js → chunk-ZO2AZIRT.js} +2 -2
  71. package/dist/{chunk-UNNPNBR2.js → chunk-ZUNNRGJX.js} +4 -4
  72. package/dist/{chunk-BLJWYCNO.js → chunk-ZY4DSWZ5.js} +2 -2
  73. package/dist/{cli-BqMNkQn5.d.ts → cli-DD0P-lu8.d.ts} +1 -1
  74. package/dist/cli.d.ts +2 -2
  75. package/dist/cli.js +22 -22
  76. package/dist/config.js +4 -4
  77. package/dist/deep-recall-http-glue.d.ts +1 -1
  78. package/dist/deep-recall-mcp-tools.d.ts +1 -1
  79. package/dist/external-wiki-access.d.ts +1 -1
  80. package/dist/external-wiki-access.js +5 -5
  81. package/dist/external-wiki-mcp-tools.d.ts +1 -1
  82. package/dist/extraction.js +5 -5
  83. package/dist/index.d.ts +683 -679
  84. package/dist/index.js +29 -29
  85. package/dist/location/index.js +5 -5
  86. package/dist/mcp-memory-inspector-app.d.ts +1 -1
  87. package/dist/memory-subject-cli.d.ts +1 -1
  88. package/dist/memory-subject.d.ts +1 -1
  89. package/dist/operator-toolkit.js +5 -5
  90. package/dist/orchestration/maintenance.js +6 -6
  91. package/dist/orchestrator.js +29 -29
  92. package/dist/{public-http-ByX2eTla.d.ts → public-http-C4i8Opxc.d.ts} +1 -1
  93. package/dist/resume-bundles.js +5 -5
  94. package/dist/schemas.d.ts +152 -152
  95. package/dist/shared-context/manager.d.ts +6 -6
  96. package/dist/source-agent-qualifier.js +4 -4
  97. package/dist/standup/build.js +2 -2
  98. package/dist/support-passport/index.d.ts +4 -4
  99. package/dist/support-passport/index.js +7 -7
  100. package/dist/transfer/types.d.ts +78 -78
  101. package/dist/who-knows-cli.d.ts +1 -1
  102. package/dist/who-knows.d.ts +1 -1
  103. package/package.json +2 -2
  104. package/src/activity/digest.test.ts +34 -0
  105. package/src/activity/digest.ts +34 -8
  106. package/src/activity/timeline/weekly.test.ts +29 -0
  107. package/dist/chunk-P6FHFTZ7.js.map +0 -1
  108. package/dist/{access-service-GrdVg_-Z.d.ts → access-service-DWdY9Mlk.d.ts} +58 -58
  109. /package/dist/{chunk-OGUKSLYZ.js.map → chunk-2OO6TPQG.js.map} +0 -0
  110. /package/dist/{chunk-66OJSCI6.js.map → chunk-3GGUMRS4.js.map} +0 -0
  111. /package/dist/{chunk-PX4UMA5Z.js.map → chunk-3NYTZE5G.js.map} +0 -0
  112. /package/dist/{chunk-FVOP3NT7.js.map → chunk-5IEV3YBY.js.map} +0 -0
  113. /package/dist/{chunk-2ITE4C2Z.js.map → chunk-6LLLREDJ.js.map} +0 -0
  114. /package/dist/{chunk-K7724CH2.js.map → chunk-6VF3R3XQ.js.map} +0 -0
  115. /package/dist/{chunk-56Y6EKZN.js.map → chunk-CGJV2YIY.js.map} +0 -0
  116. /package/dist/{chunk-KB2G2I6Q.js.map → chunk-DDB3S53L.js.map} +0 -0
  117. /package/dist/{chunk-KTWG7CNY.js.map → chunk-EWCNCQOU.js.map} +0 -0
  118. /package/dist/{chunk-L7Z57SID.js.map → chunk-FHYVNJBN.js.map} +0 -0
  119. /package/dist/{chunk-33JKYLPX.js.map → chunk-GGRD3JEH.js.map} +0 -0
  120. /package/dist/{chunk-37KUQPX4.js.map → chunk-GNMELJGM.js.map} +0 -0
  121. /package/dist/{chunk-2IOHTUP3.js.map → chunk-GRCREL6Q.js.map} +0 -0
  122. /package/dist/{chunk-H54VWRPS.js.map → chunk-JJ4XK25O.js.map} +0 -0
  123. /package/dist/{chunk-SVXJLDDC.js.map → chunk-KH6PK4EQ.js.map} +0 -0
  124. /package/dist/{chunk-NLYVH66G.js.map → chunk-MT47LH5L.js.map} +0 -0
  125. /package/dist/{chunk-SMWTZLHE.js.map → chunk-MZLV2OJE.js.map} +0 -0
  126. /package/dist/{chunk-ICKJ52PE.js.map → chunk-OU4K7IFP.js.map} +0 -0
  127. /package/dist/{chunk-27QVNSQ3.js.map → chunk-QBH7M7Q4.js.map} +0 -0
  128. /package/dist/{chunk-O6ZNNVSP.js.map → chunk-RX3SC4C5.js.map} +0 -0
  129. /package/dist/{chunk-RJYJ7KR7.js.map → chunk-SO4IYSGT.js.map} +0 -0
  130. /package/dist/{chunk-C553ZTLF.js.map → chunk-THQTFTQS.js.map} +0 -0
  131. /package/dist/{chunk-X5K5TAQZ.js.map → chunk-V4ZBR7CW.js.map} +0 -0
  132. /package/dist/{chunk-ZIW5JVRM.js.map → chunk-XTJC7CVX.js.map} +0 -0
  133. /package/dist/{chunk-Z6COGHHN.js.map → chunk-Y2MZGBOY.js.map} +0 -0
  134. /package/dist/{chunk-H4SEGIZY.js.map → chunk-ZO2AZIRT.js.map} +0 -0
  135. /package/dist/{chunk-UNNPNBR2.js.map → chunk-ZUNNRGJX.js.map} +0 -0
  136. /package/dist/{chunk-BLJWYCNO.js.map → chunk-ZY4DSWZ5.js.map} +0 -0
@@ -109,9 +109,24 @@ function zonedDayStartIso(date: string, timezone: string): string {
109
109
  }
110
110
  }
111
111
  if (best === null) {
112
- // Degenerate safety net: use the noon-derived offset for a deterministic start.
113
- const noon = timezoneOffsetIso(new Date(`${date}T12:00:00Z`), timezone);
114
- best = Date.parse(`${date}T00:00:00${noon}`);
112
+ // The ENTIRE civil date was skipped no local wall-clock time on it
113
+ // exists (Pacific/Apia 2011-12-30 is the canonical case: the date-line
114
+ // jump went 2011-12-29 23:59:59-10:00 → 2011-12-31 00:00:00+14:00).
115
+ // Extending the never-backdate convention above, resolve the day start
116
+ // to the transition instant: the earliest instant whose local calendar
117
+ // date reaches `date`. Local date is monotone non-decreasing in the UTC
118
+ // instant (a fall-back never crosses local midnight backwards), so
119
+ // binary-search a 48h bracket at minute granularity. The bracket is
120
+ // safe: `<date>T00:00Z − 24h` is always locally before `date`, and
121
+ // `<date>T00:00Z + 24h` is always locally on/after it.
122
+ let lo = Date.parse(`${date}T00:00:00Z`) - 24 * 3_600_000;
123
+ let hi = lo + 48 * 3_600_000;
124
+ while (hi - lo > 60_000) {
125
+ const mid = lo + Math.floor((hi - lo) / 2 / 60_000) * 60_000;
126
+ if (activityDateInTimezone(new Date(mid), timezone) >= date) hi = mid;
127
+ else lo = mid;
128
+ }
129
+ best = hi;
115
130
  }
116
131
  if (best === null || !Number.isFinite(best)) {
117
132
  throw new RangeError(`activity: could not resolve a local day start for "${date}" in "${timezone}".`);
@@ -129,16 +144,27 @@ function nextIsoDate(date: string): string {
129
144
  return shiftIsoDate(date, 1);
130
145
  }
131
146
 
132
- /** Half-open [start, end) UTC ISO bounds of a local day. */
147
+ /**
148
+ * Half-open [start, end) UTC ISO bounds of a local day. A civil date the
149
+ * zone skipped entirely owns no interval: the window is zero-width
150
+ * `[transition, transition)`.
151
+ */
133
152
  export function activityDayWindow(date: string, timezone: string): { startUtc: string; endUtc: string } {
134
153
  if (!isValidActivityDate(date)) {
135
154
  throw new RangeError(`Invalid activity date "${date}"; expected a real YYYY-MM-DD day.`);
136
155
  }
137
156
  assertValidTimezone(timezone);
138
- return {
139
- startUtc: new Date(zonedDayStartIso(date, timezone)).toISOString(),
140
- endUtc: new Date(zonedDayStartIso(nextIsoDate(date), timezone)).toISOString(),
141
- };
157
+ const startUtc = zonedDayStartIso(date, timezone);
158
+ const endUtc = zonedDayStartIso(nextIsoDate(date), timezone);
159
+ // Skipped-date semantics (Pacific/Apia 2011-12-30 class): the skipped
160
+ // date's start and the following date's start both resolve to the
161
+ // transition instant, so the window is naturally zero-width. Keep it
162
+ // that way: a date that never occurred contributes to no daily total
163
+ // (daysOverlappingWeek drops zero-width days) and a connector sync for
164
+ // it fetches nothing. Pushing the end forward to stay non-degenerate
165
+ // would alias the next real day's interval and double-attribute every
166
+ // card in it to two daily totals.
167
+ return { startUtc, endUtc };
142
168
  }
143
169
 
144
170
  /**
@@ -213,3 +213,32 @@ test("equal durations sort by categoryId ascending", () => {
213
213
  ["beta", "development", "alpha"],
214
214
  );
215
215
  });
216
+
217
+ test("a card is attributed to exactly one daily total across an entirely skipped civil date", () => {
218
+ // Pacific/Apia skipped local 2011-12-30 at the date-line jump. The
219
+ // skipped date owns a zero-width window, so it appears as no day entry,
220
+ // and the 31st's card lands on exactly one daily total — never also on
221
+ // the skipped date, which pre-fix shared the 31st's interval.
222
+ const summary = buildWeeklyActivitySummary(
223
+ [
224
+ // Dec 29 10:00-11:00 local (-10:00).
225
+ card({ id: "before-jump", startUtc: "2011-12-29T20:00:00.000Z", endUtc: "2011-12-29T21:00:00.000Z" }),
226
+ // Dec 31 02:00-03:00 local (+14:00).
227
+ card({ id: "after-jump", startUtc: "2011-12-30T12:00:00.000Z", endUtc: "2011-12-30T13:00:00.000Z" }),
228
+ ],
229
+ options({
230
+ timezone: "Pacific/Apia",
231
+ weekStartUtc: "2011-12-26T10:00:00.000Z",
232
+ weekEndUtc: "2012-01-02T10:00:00.000Z",
233
+ }),
234
+ );
235
+ assert.equal(summary.days.some((day) => day.date === "2011-12-30"), false);
236
+ const activeDays = summary.days.filter((day) => day.activeMs > 0);
237
+ assert.deepEqual(
238
+ activeDays.map((day) => [day.date, day.activeMs]),
239
+ [
240
+ ["2011-12-29", HOUR],
241
+ ["2011-12-31", HOUR],
242
+ ],
243
+ );
244
+ });
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/activity/digest.ts"],"sourcesContent":["/**\n * Deterministic screen-activity day-digest renderer (issue #1899).\n *\n * Renders a day's snapshots into markdown with YAML frontmatter, placed at\n * `<memoryDir>/activity/<date>.md` — outside the memory scan roots but inside\n * the QMD collection root (searchable, never auto-recalled). No LLM: the body\n * is a pure, byte-identical function of its inputs so an unchanged day skips\n * rewrite by contentHash. Day bucketing is DST-aware and half-open\n * [start, end) (AGENTS.md §23); sort keys are total with stable tiebreakers\n * (§12).\n */\n\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\n\nimport type { ActivityDayDigest, ActivityDayMeta, ActivitySnapshot } from \"./types.js\";\n\nexport const ACTIVITY_DIGEST_FORMAT_VERSION = 1;\nexport const ACTIVITY_DIR_NAME = \"activity\";\n\n/** Attribute at most this much dwell to a single snapshot (idle gaps capped). */\nconst MAX_DWELL_MS = 15 * 60_000;\n/** Notable-excerpt caps. */\nconst NOTABLE_MAX_WINDOWS = 10;\nconst NOTABLE_EXCERPT_CHARS = 280;\n\nconst DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/;\n\nexport function isValidActivityDate(date: string): boolean {\n if (typeof date !== \"string\" || !DATE_PATTERN.test(date)) return false;\n // Reject impossible calendar days (e.g. 2026-02-30, 2026-13-01): the UTC\n // round-trip must reproduce the same Y-M-D, else Date normalized an overflow.\n const parsed = new Date(`${date}T00:00:00Z`);\n return Number.isFinite(parsed.getTime()) && parsed.toISOString().slice(0, 10) === date;\n}\n\nexport function activityDigestPath(memoryDir: string, date: string): string {\n if (!isValidActivityDate(date)) {\n // Never interpolate an unvalidated date into a filesystem path (a `../`\n // would escape <memoryDir>/activity/). Reject loudly.\n throw new RangeError(`Invalid activity date \"${date}\"; expected YYYY-MM-DD.`);\n }\n return path.join(memoryDir, ACTIVITY_DIR_NAME, `${date}.md`);\n}\n\n// ── DST-aware local-day window ──────────────────────────────────────────────\n\nexport function timezoneOffsetIso(instant: Date, timezone: string): string {\n const parts = new Intl.DateTimeFormat(\"en-US\", {\n timeZone: timezone,\n timeZoneName: \"longOffset\",\n }).formatToParts(instant);\n const name = parts.find((part) => part.type === \"timeZoneName\")?.value ?? \"GMT\";\n const match = name.match(/GMT([+-]\\d{2}:\\d{2})?/);\n return match?.[1] ?? \"+00:00\";\n}\n\nexport function assertValidTimezone(timezone: string): void {\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: timezone });\n } catch {\n throw new RangeError(`Invalid IANA timezone \"${timezone}\".`);\n }\n}\n\nfunction zonedDayStartIso(date: string, timezone: string): string {\n // The first UTC instant whose local wall-clock is this date at 00:00. Probe\n // several instants across the day to collect every offset in play; keep an\n // offset only if constructing local midnight with it lands back on that same\n // offset (so it is genuinely local midnight, not a wall-clock that never\n // occurred), then take the EARLIEST such instant — the FIRST 00:00 across a\n // DST fall-back that repeats local midnight.\n // Probe the previous UTC day too: for zones east of UTC the requested date's\n // UTC instants all fall after local midnight, so the pre-transition offset\n // valid at the real local 00:00 is only observable on the prior UTC day.\n const prevDate = shiftIsoDate(date, -1);\n const probeOffsets = new Set(\n [\n `${prevDate}T12:00:00Z`,\n `${prevDate}T23:00:00Z`,\n `${date}T00:00:00Z`,\n `${date}T12:00:00Z`,\n `${date}T23:00:00Z`,\n ].map((iso) => timezoneOffsetIso(new Date(iso), timezone)),\n );\n let best: number | null = null;\n for (const offset of probeOffsets) {\n const candidate = Date.parse(`${date}T00:00:00${offset}`);\n if (!Number.isFinite(candidate)) continue;\n // Reject an offset whose local midnight does not actually occur (the wall\n // clock skipped by a spring-forward): the offset in effect at the candidate\n // instant must be the same offset we used to build it.\n if (timezoneOffsetIso(new Date(candidate), timezone) !== offset) continue;\n if (best === null || candidate < best) best = candidate;\n }\n if (best === null) {\n // Local midnight was skipped by a spring-forward at 00:00. Advance to the\n // first local wall-clock minute on this date that actually exists (never\n // backdating to a 00:00 that never occurred), scanning forward up to 3h.\n for (let minute = 1; minute <= 180 && best === null; minute++) {\n const hh = String(Math.floor(minute / 60)).padStart(2, \"0\");\n const mm = String(minute % 60).padStart(2, \"0\");\n for (const offset of probeOffsets) {\n const candidate = Date.parse(`${date}T${hh}:${mm}:00${offset}`);\n if (!Number.isFinite(candidate)) continue;\n if (timezoneOffsetIso(new Date(candidate), timezone) !== offset) continue;\n if (best === null || candidate < best) best = candidate;\n }\n }\n }\n if (best === null) {\n // Degenerate safety net: use the noon-derived offset for a deterministic start.\n const noon = timezoneOffsetIso(new Date(`${date}T12:00:00Z`), timezone);\n best = Date.parse(`${date}T00:00:00${noon}`);\n }\n if (best === null || !Number.isFinite(best)) {\n throw new RangeError(`activity: could not resolve a local day start for \"${date}\" in \"${timezone}\".`);\n }\n return new Date(best).toISOString();\n}\n\nfunction shiftIsoDate(date: string, days: number): string {\n const parsed = new Date(`${date}T00:00:00Z`);\n parsed.setUTCDate(parsed.getUTCDate() + days);\n return parsed.toISOString().slice(0, 10);\n}\n\nfunction nextIsoDate(date: string): string {\n return shiftIsoDate(date, 1);\n}\n\n/** Half-open [start, end) UTC ISO bounds of a local day. */\nexport function activityDayWindow(date: string, timezone: string): { startUtc: string; endUtc: string } {\n if (!isValidActivityDate(date)) {\n throw new RangeError(`Invalid activity date \"${date}\"; expected a real YYYY-MM-DD day.`);\n }\n assertValidTimezone(timezone);\n return {\n startUtc: new Date(zonedDayStartIso(date, timezone)).toISOString(),\n endUtc: new Date(zonedDayStartIso(nextIsoDate(date), timezone)).toISOString(),\n };\n}\n\n/**\n * The local calendar day (YYYY-MM-DD) an instant falls in for an IANA\n * timezone — the day key `activityDayWindow` buckets on. Callers that need\n * \"today\" for activity artifacts MUST use this rather than the host-local\n * date, which drifts a day near either timezone's midnight.\n */\nexport function activityDateInTimezone(instant: Date, timezone: string): string {\n try {\n const parts = new Intl.DateTimeFormat(\"en-CA\", {\n timeZone: timezone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n }).formatToParts(instant);\n const get = (type: string): string => parts.find((part) => part.type === type)?.value ?? \"\";\n return `${get(\"year\")}-${get(\"month\")}-${get(\"day\")}`;\n } catch {\n return instant.toISOString().slice(0, 10);\n }\n}\n\n// ── Rendering ───────────────────────────────────────────────────────────────\n\nfunction sortedByTime(snapshots: ActivitySnapshot[]): ActivitySnapshot[] {\n return [...snapshots].sort((a, b) => {\n // Compare by parsed instant, not raw string, so mixed valid ISO forms\n // (Z vs offset, varying precision) still order chronologically.\n const at = Date.parse(a.capturedAtUtc);\n const bt = Date.parse(b.capturedAtUtc);\n if (at !== bt && Number.isFinite(at) && Number.isFinite(bt)) return at < bt ? -1 : 1;\n const aid = a.id ?? 0;\n const bid = b.id ?? 0;\n if (aid < bid) return -1;\n if (aid > bid) return 1;\n // Unsaved snapshots (pre-store) both default to id 0; fall back to the\n // content hash (their dedup identity), then app/window, for a total order.\n if (a.contentHash !== b.contentHash) return a.contentHash < b.contentHash ? -1 : 1;\n if (a.app !== b.app) return a.app < b.app ? -1 : 1;\n if (a.windowTitle !== b.windowTitle) return a.windowTitle < b.windowTitle ? -1 : 1;\n return 0;\n });\n}\n\n/**\n * Per-snapshot dwell (gap to that machine's next snapshot, capped), scoped per\n * capture machine so an interleaved snapshot from another machine can't steal\n * or truncate a snapshot's dwell (multi-machine days).\n */\nfunction computeDwell(snapshots: ActivitySnapshot[]): Map<ActivitySnapshot, number> {\n const byMachine = new Map<string, ActivitySnapshot[]>();\n for (const snapshot of snapshots) {\n const list = byMachine.get(snapshot.machine);\n if (list === undefined) byMachine.set(snapshot.machine, [snapshot]);\n else list.push(snapshot);\n }\n const dwell = new Map<ActivitySnapshot, number>();\n for (const list of byMachine.values()) {\n const ordered = sortedByTime(list);\n for (let index = 0; index < ordered.length; index++) {\n const current = ordered[index];\n if (current === undefined) continue;\n const next = ordered[index + 1];\n let value = 0;\n if (next !== undefined) {\n const delta = Date.parse(next.capturedAtUtc) - Date.parse(current.capturedAtUtc);\n if (Number.isFinite(delta) && delta > 0) value = Math.min(delta, MAX_DWELL_MS);\n }\n dwell.set(current, value);\n }\n }\n return dwell;\n}\n\nfunction formatDurationMinutes(ms: number): string {\n return `${Math.round(ms / 60_000)}m`;\n}\n\nfunction clockHhMm(iso: string, timezone: string): string {\n const ms = Date.parse(iso);\n if (!Number.isFinite(ms)) return \"??:??\";\n const parts = new Intl.DateTimeFormat(\"en-GB\", {\n timeZone: timezone,\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false,\n }).formatToParts(new Date(ms));\n const hour = parts.find((p) => p.type === \"hour\")?.value ?? \"00\";\n const minute = parts.find((p) => p.type === \"minute\")?.value ?? \"00\";\n return `${hour}:${minute}`;\n}\n\nfunction collapseWhitespace(text: string): string {\n return text.replace(/\\s+/g, \" \").trim();\n}\n\nfunction perAppSection(ordered: ActivitySnapshot[], dwell: Map<ActivitySnapshot, number>): string {\n const totals = new Map<string, number>();\n for (const snapshot of ordered) {\n totals.set(snapshot.app, (totals.get(snapshot.app) ?? 0) + (dwell.get(snapshot) ?? 0));\n }\n const rows = [...totals.entries()].sort((a, b) => {\n if (b[1] !== a[1]) return b[1] - a[1];\n if (a[0] < b[0]) return -1;\n if (a[0] > b[0]) return 1;\n return 0;\n });\n const lines = [\"## Per-app time\", \"\"];\n if (rows.length === 0) {\n lines.push(\"_No activity recorded._\");\n } else {\n for (const [app, ms] of rows) {\n lines.push(`- ${app}: ${formatDurationMinutes(ms)}`);\n }\n }\n return lines.join(\"\\n\");\n}\n\ninterface TimelineSpan {\n startIso: string;\n machine: string;\n app: string;\n windowTitle: string;\n browserUrl?: string;\n}\n\nfunction timelineSpans(ordered: ActivitySnapshot[]): TimelineSpan[] {\n const spans: TimelineSpan[] = [];\n for (const snapshot of ordered) {\n const last = spans[spans.length - 1];\n if (\n last !== undefined &&\n last.machine === snapshot.machine &&\n last.app === snapshot.app &&\n last.windowTitle === snapshot.windowTitle &&\n last.browserUrl === snapshot.browserUrl\n ) {\n continue;\n }\n spans.push({\n startIso: snapshot.capturedAtUtc,\n machine: snapshot.machine,\n app: snapshot.app,\n windowTitle: snapshot.windowTitle,\n ...(snapshot.browserUrl !== undefined ? { browserUrl: snapshot.browserUrl } : {}),\n });\n }\n return spans;\n}\n\nfunction timelineSection(ordered: ActivitySnapshot[], timezone: string): string {\n const lines = [\"## Timeline\", \"\"];\n const spans = timelineSpans(ordered);\n if (spans.length === 0) {\n lines.push(\"_No activity recorded._\");\n return lines.join(\"\\n\");\n }\n for (const span of spans) {\n const clock = clockHhMm(span.startIso, timezone);\n const window = collapseWhitespace(span.windowTitle);\n const url = span.browserUrl !== undefined ? ` (${collapseWhitespace(span.browserUrl)})` : \"\";\n lines.push(`- [${clock}] ${span.app}${window.length > 0 ? ` — ${window}` : \"\"}${url}`);\n }\n return lines.join(\"\\n\");\n}\n\nfunction notableSection(ordered: ActivitySnapshot[], dwell: Map<ActivitySnapshot, number>): string {\n const withDwell = ordered.map((snapshot) => ({ snapshot, dwell: dwell.get(snapshot) ?? 0 }));\n const ranked = withDwell\n .filter((entry) => collapseWhitespace(entry.snapshot.text).length > 0)\n .sort((a, b) => {\n if (b.dwell !== a.dwell) return b.dwell - a.dwell;\n const at = Date.parse(a.snapshot.capturedAtUtc);\n const bt = Date.parse(b.snapshot.capturedAtUtc);\n if (at !== bt && Number.isFinite(at) && Number.isFinite(bt)) return at < bt ? -1 : 1;\n const idDelta = (a.snapshot.id ?? 0) - (b.snapshot.id ?? 0);\n if (idDelta !== 0) return idDelta;\n if (a.snapshot.contentHash !== b.snapshot.contentHash) {\n return a.snapshot.contentHash < b.snapshot.contentHash ? -1 : 1;\n }\n return 0;\n })\n .slice(0, NOTABLE_MAX_WINDOWS);\n const lines = [\"## Notable\", \"\"];\n if (ranked.length === 0) {\n lines.push(\"_No notable text captured._\");\n return lines.join(\"\\n\");\n }\n for (const { snapshot } of ranked) {\n const excerpt = collapseWhitespace(snapshot.text).slice(0, NOTABLE_EXCERPT_CHARS);\n lines.push(`- **${snapshot.app}** — ${excerpt}`);\n }\n return lines.join(\"\\n\");\n}\n\nexport function composeActivityDigestBody(\n date: string,\n timezone: string,\n snapshots: ActivitySnapshot[],\n): string {\n assertValidTimezone(timezone);\n const ordered = sortedByTime(snapshots);\n const dwell = computeDwell(ordered);\n return [\n `# Activity — ${date}`,\n \"\",\n perAppSection(ordered, dwell),\n \"\",\n timelineSection(ordered, timezone),\n \"\",\n notableSection(ordered, dwell),\n \"\",\n ].join(\"\\n\");\n}\n\nexport function hashActivityBody(body: string): string {\n return createHash(\"sha256\").update(body, \"utf8\").digest(\"hex\");\n}\n\nexport function composeActivityDigestMeta(\n date: string,\n machines: string[],\n snapshots: ActivitySnapshot[],\n body: string,\n): ActivityDayMeta {\n const uniqueMachines = [...new Set(machines)].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));\n return {\n kind: \"activity-digest\",\n date,\n machines: uniqueMachines,\n snapshotCount: snapshots.length,\n contentHash: hashActivityBody(body),\n formatVersion: ACTIVITY_DIGEST_FORMAT_VERSION,\n };\n}\n\nexport function serializeActivityDigest(meta: ActivityDayMeta, body: string): string {\n const frontmatter = [\n \"---\",\n `kind: ${meta.kind}`,\n `date: ${meta.date}`,\n `machines: ${JSON.stringify(meta.machines)}`,\n `snapshotCount: ${meta.snapshotCount}`,\n `contentHash: ${meta.contentHash}`,\n `formatVersion: ${meta.formatVersion}`,\n \"---\",\n \"\",\n ].join(\"\\n\");\n return `${frontmatter}${body}`;\n}\n\nexport function parseActivityDigest(raw: string): ActivityDayDigest | null {\n if (typeof raw !== \"string\" || !raw.startsWith(\"---\\n\")) return null;\n const end = raw.indexOf(\"\\n---\\n\", 4);\n if (end === -1) return null;\n const frontmatter = raw.slice(4, end);\n const body = raw.slice(end + 5).replace(/^\\n/, \"\");\n const fields = new Map<string, string>();\n for (const line of frontmatter.split(\"\\n\")) {\n const idx = line.indexOf(\":\");\n if (idx === -1) continue;\n fields.set(line.slice(0, idx).trim(), line.slice(idx + 1).trim());\n }\n const date = fields.get(\"date\");\n const contentHash = fields.get(\"contentHash\");\n if (date === undefined || !isValidActivityDate(date) || contentHash === undefined) return null;\n if (fields.get(\"kind\") !== \"activity-digest\") return null;\n const machines = parseMachinesList(fields.get(\"machines\") ?? \"[]\");\n const snapshotCount = parseNonNegativeInt(fields.get(\"snapshotCount\"));\n const formatVersion = parseNonNegativeInt(fields.get(\"formatVersion\"));\n if (snapshotCount === null || formatVersion === null) return null;\n return {\n meta: {\n kind: \"activity-digest\",\n date,\n machines,\n snapshotCount,\n contentHash,\n formatVersion,\n },\n body,\n };\n}\n\nfunction parseNonNegativeInt(value: string | undefined): number | null {\n if (value === undefined) return null;\n const trimmed = value.trim();\n if (!/^\\d+$/.test(trimmed)) return null;\n const parsed = Number(trimmed);\n return Number.isSafeInteger(parsed) ? parsed : null;\n}\n\nfunction parseMachinesList(raw: string): string[] {\n try {\n const parsed: unknown = JSON.parse(raw);\n if (Array.isArray(parsed)) {\n return parsed.filter((entry): entry is string => typeof entry === \"string\");\n }\n } catch {\n // Legacy unquoted inline form (`[a, b]`) — fall through to the split parse.\n }\n return raw\n .replace(/^\\[/, \"\")\n .replace(/\\]$/, \"\")\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n}\n"],"mappings":";AAYA,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AAIV,IAAM,iCAAiC;AACvC,IAAM,oBAAoB;AAGjC,IAAM,eAAe,KAAK;AAE1B,IAAM,sBAAsB;AAC5B,IAAM,wBAAwB;AAE9B,IAAM,eAAe;AAEd,SAAS,oBAAoB,MAAuB;AACzD,MAAI,OAAO,SAAS,YAAY,CAAC,aAAa,KAAK,IAAI,EAAG,QAAO;AAGjE,QAAM,SAAS,oBAAI,KAAK,GAAG,IAAI,YAAY;AAC3C,SAAO,OAAO,SAAS,OAAO,QAAQ,CAAC,KAAK,OAAO,YAAY,EAAE,MAAM,GAAG,EAAE,MAAM;AACpF;AAEO,SAAS,mBAAmB,WAAmB,MAAsB;AAC1E,MAAI,CAAC,oBAAoB,IAAI,GAAG;AAG9B,UAAM,IAAI,WAAW,0BAA0B,IAAI,yBAAyB;AAAA,EAC9E;AACA,SAAO,KAAK,KAAK,WAAW,mBAAmB,GAAG,IAAI,KAAK;AAC7D;AAIO,SAAS,kBAAkB,SAAe,UAA0B;AACzE,QAAM,QAAQ,IAAI,KAAK,eAAe,SAAS;AAAA,IAC7C,UAAU;AAAA,IACV,cAAc;AA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AAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,SAAS,oBAAoB,OAA0C;AACrE,MAAI,UAAU,OAAW,QAAO;AAChC,QAAM,UAAU,MAAM,KAAK;AAC3B,MAAI,CAAC,QAAQ,KAAK,OAAO,EAAG,QAAO;AACnC,QAAM,SAAS,OAAO,OAAO;AAC7B,SAAO,OAAO,cAAc,MAAM,IAAI,SAAS;AACjD;AAEA,SAAS,kBAAkB,KAAuB;AAChD,MAAI;AACF,UAAM,SAAkB,KAAK,MAAM,GAAG;AACtC,QAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,aAAO,OAAO,OAAO,CAAC,UAA2B,OAAO,UAAU,QAAQ;AAAA,IAC5E;AAAA,EACF,QAAQ;AAAA,EAER;AACA,SAAO,IACJ,QAAQ,OAAO,EAAE,EACjB,QAAQ,OAAO,EAAE,EACjB,MAAM,GAAG,EACT,IAAI,CAAC,UAAU,MAAM,KAAK,CAAC,EAC3B,OAAO,CAAC,UAAU,MAAM,SAAS,CAAC;AACvC;","names":[]}
@@ -1030,24 +1030,24 @@ declare const SupportPassportDraftCardSchema: z.ZodEffects<z.ZodObject<{
1030
1030
  category: z.ZodEnum<["communication", "environment", "transitions", "sensory", "regulation", "interests", "other"]>;
1031
1031
  sourceMemoryIds: z.ZodArray<z.ZodString, "many">;
1032
1032
  }, "strict", z.ZodTypeAny, {
1033
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1033
1034
  title: string;
1034
1035
  sourceMemoryIds: string[];
1035
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1036
1036
  statement: string;
1037
1037
  }, {
1038
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1038
1039
  title: string;
1039
1040
  sourceMemoryIds: string[];
1040
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1041
1041
  statement: string;
1042
1042
  }>, {
1043
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1043
1044
  title: string;
1044
1045
  sourceMemoryIds: string[];
1045
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1046
1046
  statement: string;
1047
1047
  }, {
1048
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1048
1049
  title: string;
1049
1050
  sourceMemoryIds: string[];
1050
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1051
1051
  statement: string;
1052
1052
  }>;
1053
1053
  declare const SupportPassportDraftOutputSchema: z.ZodObject<{
@@ -1057,38 +1057,38 @@ declare const SupportPassportDraftOutputSchema: z.ZodObject<{
1057
1057
  category: z.ZodEnum<["communication", "environment", "transitions", "sensory", "regulation", "interests", "other"]>;
1058
1058
  sourceMemoryIds: z.ZodArray<z.ZodString, "many">;
1059
1059
  }, "strict", z.ZodTypeAny, {
1060
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1060
1061
  title: string;
1061
1062
  sourceMemoryIds: string[];
1062
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1063
1063
  statement: string;
1064
1064
  }, {
1065
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1065
1066
  title: string;
1066
1067
  sourceMemoryIds: string[];
1067
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1068
1068
  statement: string;
1069
1069
  }>, {
1070
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1070
1071
  title: string;
1071
1072
  sourceMemoryIds: string[];
1072
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1073
1073
  statement: string;
1074
1074
  }, {
1075
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1075
1076
  title: string;
1076
1077
  sourceMemoryIds: string[];
1077
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1078
1078
  statement: string;
1079
1079
  }>, "many">;
1080
1080
  }, "strict", z.ZodTypeAny, {
1081
1081
  cards: {
1082
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1082
1083
  title: string;
1083
1084
  sourceMemoryIds: string[];
1084
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1085
1085
  statement: string;
1086
1086
  }[];
1087
1087
  }, {
1088
1088
  cards: {
1089
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1089
1090
  title: string;
1090
1091
  sourceMemoryIds: string[];
1091
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1092
1092
  statement: string;
1093
1093
  }[];
1094
1094
  }>;
@@ -1163,39 +1163,39 @@ declare const SupportPassportAnswerModelInputSchema: z.ZodObject<{
1163
1163
  category: z.ZodEnum<["communication", "environment", "transitions", "sensory", "regulation", "interests", "other"]>;
1164
1164
  updatedAt: z.ZodEffects<z.ZodString, string, string>;
1165
1165
  }, "strict", z.ZodTypeAny, {
1166
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1166
1167
  title: string;
1167
1168
  updatedAt: string;
1168
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1169
1169
  cardId: string;
1170
1170
  statement: string;
1171
1171
  }, {
1172
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1172
1173
  title: string;
1173
1174
  updatedAt: string;
1174
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1175
1175
  cardId: string;
1176
1176
  statement: string;
1177
1177
  }>, "many">;
1178
1178
  }, "strict", z.ZodTypeAny, {
1179
+ expiresAt: string;
1179
1180
  schemaVersion: 1;
1180
1181
  updatedAt: string;
1181
- expiresAt: string;
1182
1182
  grantId: string;
1183
1183
  cards: {
1184
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1184
1185
  title: string;
1185
1186
  updatedAt: string;
1186
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1187
1187
  cardId: string;
1188
1188
  statement: string;
1189
1189
  }[];
1190
1190
  }, {
1191
+ expiresAt: string;
1191
1192
  schemaVersion: 1;
1192
1193
  updatedAt: string;
1193
- expiresAt: string;
1194
1194
  grantId: string;
1195
1195
  cards: {
1196
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1196
1197
  title: string;
1197
1198
  updatedAt: string;
1198
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1199
1199
  cardId: string;
1200
1200
  statement: string;
1201
1201
  }[];
@@ -1204,14 +1204,14 @@ declare const SupportPassportAnswerModelInputSchema: z.ZodObject<{
1204
1204
  }, "strict", z.ZodTypeAny, {
1205
1205
  question: string;
1206
1206
  guide: {
1207
+ expiresAt: string;
1207
1208
  schemaVersion: 1;
1208
1209
  updatedAt: string;
1209
- expiresAt: string;
1210
1210
  grantId: string;
1211
1211
  cards: {
1212
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1212
1213
  title: string;
1213
1214
  updatedAt: string;
1214
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1215
1215
  cardId: string;
1216
1216
  statement: string;
1217
1217
  }[];
@@ -1219,14 +1219,14 @@ declare const SupportPassportAnswerModelInputSchema: z.ZodObject<{
1219
1219
  }, {
1220
1220
  question: string;
1221
1221
  guide: {
1222
+ expiresAt: string;
1222
1223
  schemaVersion: 1;
1223
1224
  updatedAt: string;
1224
- expiresAt: string;
1225
1225
  grantId: string;
1226
1226
  cards: {
1227
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1227
1228
  title: string;
1228
1229
  updatedAt: string;
1229
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1230
1230
  cardId: string;
1231
1231
  statement: string;
1232
1232
  }[];
@@ -1621,20 +1621,20 @@ declare const SupportPassportCardSchema: z.ZodObject<{
1621
1621
  reviewBy: z.ZodEffects<z.ZodString, string, string>;
1622
1622
  revision: z.ZodString;
1623
1623
  }, "strict", z.ZodTypeAny, {
1624
- title: string;
1624
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1625
1625
  status: "active" | "pending_review" | "rejected" | "superseded" | "archived";
1626
+ title: string;
1626
1627
  updatedAt: string;
1627
1628
  revision: string;
1628
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1629
1629
  cardId: string;
1630
1630
  statement: string;
1631
1631
  reviewBy: string;
1632
1632
  }, {
1633
- title: string;
1633
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1634
1634
  status: "active" | "pending_review" | "rejected" | "superseded" | "archived";
1635
+ title: string;
1635
1636
  updatedAt: string;
1636
1637
  revision: string;
1637
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1638
1638
  cardId: string;
1639
1639
  statement: string;
1640
1640
  reviewBy: string;
@@ -1649,38 +1649,38 @@ declare const SupportPassportCardListSchema: z.ZodEffects<z.ZodArray<z.ZodObject
1649
1649
  reviewBy: z.ZodEffects<z.ZodString, string, string>;
1650
1650
  revision: z.ZodString;
1651
1651
  }, "strict", z.ZodTypeAny, {
1652
- title: string;
1652
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1653
1653
  status: "active" | "pending_review" | "rejected" | "superseded" | "archived";
1654
+ title: string;
1654
1655
  updatedAt: string;
1655
1656
  revision: string;
1656
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1657
1657
  cardId: string;
1658
1658
  statement: string;
1659
1659
  reviewBy: string;
1660
1660
  }, {
1661
- title: string;
1661
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1662
1662
  status: "active" | "pending_review" | "rejected" | "superseded" | "archived";
1663
+ title: string;
1663
1664
  updatedAt: string;
1664
1665
  revision: string;
1665
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1666
1666
  cardId: string;
1667
1667
  statement: string;
1668
1668
  reviewBy: string;
1669
1669
  }>, "many">, {
1670
- title: string;
1670
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1671
1671
  status: "active" | "pending_review" | "rejected" | "superseded" | "archived";
1672
+ title: string;
1672
1673
  updatedAt: string;
1673
1674
  revision: string;
1674
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1675
1675
  cardId: string;
1676
1676
  statement: string;
1677
1677
  reviewBy: string;
1678
1678
  }[], {
1679
- title: string;
1679
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1680
1680
  status: "active" | "pending_review" | "rejected" | "superseded" | "archived";
1681
+ title: string;
1681
1682
  updatedAt: string;
1682
1683
  revision: string;
1683
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1684
1684
  cardId: string;
1685
1685
  statement: string;
1686
1686
  reviewBy: string;
@@ -1699,14 +1699,14 @@ declare const SupportPassportManualDraftInputSchema: z.ZodObject<{
1699
1699
  category: z.ZodEnum<["communication", "environment", "transitions", "sensory", "regulation", "interests", "other"]>;
1700
1700
  reviewBy: z.ZodEffects<z.ZodString, string, string>;
1701
1701
  }, "strict", z.ZodTypeAny, {
1702
- title: string;
1703
1702
  category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1703
+ title: string;
1704
1704
  statement: string;
1705
1705
  reviewBy: string;
1706
1706
  principal: string;
1707
1707
  }, {
1708
- title: string;
1709
1708
  category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1709
+ title: string;
1710
1710
  statement: string;
1711
1711
  reviewBy: string;
1712
1712
  principal: string;
@@ -1738,8 +1738,8 @@ declare const SupportPassportReplaceCardInputSchema: z.ZodObject<{
1738
1738
  category: z.ZodEnum<["communication", "environment", "transitions", "sensory", "regulation", "interests", "other"]>;
1739
1739
  reviewBy: z.ZodEffects<z.ZodString, string, string>;
1740
1740
  }, "strict", z.ZodTypeAny, {
1741
- title: string;
1742
1741
  category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1742
+ title: string;
1743
1743
  cardId: string;
1744
1744
  statement: string;
1745
1745
  reviewBy: string;
@@ -1747,8 +1747,8 @@ declare const SupportPassportReplaceCardInputSchema: z.ZodObject<{
1747
1747
  expectedRevision: string;
1748
1748
  reasonCode?: string | undefined;
1749
1749
  }, {
1750
- title: string;
1751
1750
  category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
1751
+ title: string;
1752
1752
  cardId: string;
1753
1753
  statement: string;
1754
1754
  reviewBy: string;
@@ -1807,10 +1807,10 @@ declare const SupportPassportGrantStateSchema: z.ZodEffects<z.ZodObject<{
1807
1807
  expiresAt: z.ZodEffects<z.ZodString, string, string>;
1808
1808
  revokedAt: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1809
1809
  }, "strict", z.ZodTypeAny, {
1810
- schemaVersion: 1;
1810
+ namespace: string;
1811
1811
  createdAt: string;
1812
1812
  expiresAt: string;
1813
- namespace: string;
1813
+ schemaVersion: 1;
1814
1814
  stateVersion: number;
1815
1815
  grantId: string;
1816
1816
  principalHash: string;
@@ -1822,10 +1822,10 @@ declare const SupportPassportGrantStateSchema: z.ZodEffects<z.ZodObject<{
1822
1822
  }[];
1823
1823
  revokedAt?: string | undefined;
1824
1824
  }, {
1825
- schemaVersion: 1;
1825
+ namespace: string;
1826
1826
  createdAt: string;
1827
1827
  expiresAt: string;
1828
- namespace: string;
1828
+ schemaVersion: 1;
1829
1829
  stateVersion: number;
1830
1830
  grantId: string;
1831
1831
  principalHash: string;
@@ -1837,10 +1837,10 @@ declare const SupportPassportGrantStateSchema: z.ZodEffects<z.ZodObject<{
1837
1837
  }[];
1838
1838
  revokedAt?: string | undefined;
1839
1839
  }>, {
1840
- schemaVersion: 1;
1840
+ namespace: string;
1841
1841
  createdAt: string;
1842
1842
  expiresAt: string;
1843
- namespace: string;
1843
+ schemaVersion: 1;
1844
1844
  stateVersion: number;
1845
1845
  grantId: string;
1846
1846
  principalHash: string;
@@ -1852,10 +1852,10 @@ declare const SupportPassportGrantStateSchema: z.ZodEffects<z.ZodObject<{
1852
1852
  }[];
1853
1853
  revokedAt?: string | undefined;
1854
1854
  }, {
1855
- schemaVersion: 1;
1855
+ namespace: string;
1856
1856
  createdAt: string;
1857
1857
  expiresAt: string;
1858
- namespace: string;
1858
+ schemaVersion: 1;
1859
1859
  stateVersion: number;
1860
1860
  grantId: string;
1861
1861
  principalHash: string;
@@ -2026,9 +2026,9 @@ declare const SupportPassportOwnerGrantSchema: z.ZodObject<{
2026
2026
  revokedAt: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2027
2027
  status: z.ZodEnum<["active", "expired", "revoked"]>;
2028
2028
  }, "strict", z.ZodTypeAny, {
2029
- status: "active" | "expired" | "revoked";
2030
2029
  createdAt: string;
2031
2030
  expiresAt: string;
2031
+ status: "active" | "expired" | "revoked";
2032
2032
  stateVersion: number;
2033
2033
  grantId: string;
2034
2034
  cards: {
@@ -2037,9 +2037,9 @@ declare const SupportPassportOwnerGrantSchema: z.ZodObject<{
2037
2037
  }[];
2038
2038
  revokedAt?: string | undefined;
2039
2039
  }, {
2040
- status: "active" | "expired" | "revoked";
2041
2040
  createdAt: string;
2042
2041
  expiresAt: string;
2042
+ status: "active" | "expired" | "revoked";
2043
2043
  stateVersion: number;
2044
2044
  grantId: string;
2045
2045
  cards: {
@@ -2067,9 +2067,9 @@ declare const SupportPassportCreatedGrantSchema: z.ZodObject<{
2067
2067
  revokedAt: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2068
2068
  status: z.ZodEnum<["active", "expired", "revoked"]>;
2069
2069
  }, "strict", z.ZodTypeAny, {
2070
- status: "active" | "expired" | "revoked";
2071
2070
  createdAt: string;
2072
2071
  expiresAt: string;
2072
+ status: "active" | "expired" | "revoked";
2073
2073
  stateVersion: number;
2074
2074
  grantId: string;
2075
2075
  cards: {
@@ -2078,9 +2078,9 @@ declare const SupportPassportCreatedGrantSchema: z.ZodObject<{
2078
2078
  }[];
2079
2079
  revokedAt?: string | undefined;
2080
2080
  }, {
2081
- status: "active" | "expired" | "revoked";
2082
2081
  createdAt: string;
2083
2082
  expiresAt: string;
2083
+ status: "active" | "expired" | "revoked";
2084
2084
  stateVersion: number;
2085
2085
  grantId: string;
2086
2086
  cards: {
@@ -2093,9 +2093,9 @@ declare const SupportPassportCreatedGrantSchema: z.ZodObject<{
2093
2093
  }, "strict", z.ZodTypeAny, {
2094
2094
  secret: string;
2095
2095
  grant: {
2096
- status: "active" | "expired" | "revoked";
2097
2096
  createdAt: string;
2098
2097
  expiresAt: string;
2098
+ status: "active" | "expired" | "revoked";
2099
2099
  stateVersion: number;
2100
2100
  grantId: string;
2101
2101
  cards: {
@@ -2107,9 +2107,9 @@ declare const SupportPassportCreatedGrantSchema: z.ZodObject<{
2107
2107
  }, {
2108
2108
  secret: string;
2109
2109
  grant: {
2110
- status: "active" | "expired" | "revoked";
2111
2110
  createdAt: string;
2112
2111
  expiresAt: string;
2112
+ status: "active" | "expired" | "revoked";
2113
2113
  stateVersion: number;
2114
2114
  grantId: string;
2115
2115
  cards: {
@@ -2126,15 +2126,15 @@ declare const SupportPassportPublicCardSchema: z.ZodObject<{
2126
2126
  category: z.ZodEnum<["communication", "environment", "transitions", "sensory", "regulation", "interests", "other"]>;
2127
2127
  updatedAt: z.ZodEffects<z.ZodString, string, string>;
2128
2128
  }, "strict", z.ZodTypeAny, {
2129
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2129
2130
  title: string;
2130
2131
  updatedAt: string;
2131
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2132
2132
  cardId: string;
2133
2133
  statement: string;
2134
2134
  }, {
2135
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2135
2136
  title: string;
2136
2137
  updatedAt: string;
2137
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2138
2138
  cardId: string;
2139
2139
  statement: string;
2140
2140
  }>;
@@ -2150,39 +2150,39 @@ declare const SupportPassportPublicGuideSchema: z.ZodObject<{
2150
2150
  category: z.ZodEnum<["communication", "environment", "transitions", "sensory", "regulation", "interests", "other"]>;
2151
2151
  updatedAt: z.ZodEffects<z.ZodString, string, string>;
2152
2152
  }, "strict", z.ZodTypeAny, {
2153
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2153
2154
  title: string;
2154
2155
  updatedAt: string;
2155
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2156
2156
  cardId: string;
2157
2157
  statement: string;
2158
2158
  }, {
2159
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2159
2160
  title: string;
2160
2161
  updatedAt: string;
2161
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2162
2162
  cardId: string;
2163
2163
  statement: string;
2164
2164
  }>, "many">;
2165
2165
  }, "strict", z.ZodTypeAny, {
2166
+ expiresAt: string;
2166
2167
  schemaVersion: 1;
2167
2168
  updatedAt: string;
2168
- expiresAt: string;
2169
2169
  grantId: string;
2170
2170
  cards: {
2171
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2171
2172
  title: string;
2172
2173
  updatedAt: string;
2173
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2174
2174
  cardId: string;
2175
2175
  statement: string;
2176
2176
  }[];
2177
2177
  }, {
2178
+ expiresAt: string;
2178
2179
  schemaVersion: 1;
2179
2180
  updatedAt: string;
2180
- expiresAt: string;
2181
2181
  grantId: string;
2182
2182
  cards: {
2183
+ category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2183
2184
  title: string;
2184
2185
  updatedAt: string;
2185
- category: "other" | "communication" | "environment" | "transitions" | "sensory" | "regulation" | "interests";
2186
2186
  cardId: string;
2187
2187
  statement: string;
2188
2188
  }[];