@mulmoclaude/core 1.0.0 → 1.2.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 (177) hide show
  1. package/assets/helps/collection-skills.md +28 -0
  2. package/assets/helps/custom-view.md +5 -0
  3. package/dist/artifacts/paths.cjs +68 -0
  4. package/dist/artifacts/paths.cjs.map +1 -0
  5. package/dist/artifacts/paths.d.ts +45 -0
  6. package/dist/artifacts/paths.js +62 -0
  7. package/dist/artifacts/paths.js.map +1 -0
  8. package/dist/atomic-C_7YpMiM.cjs +102 -0
  9. package/dist/atomic-C_7YpMiM.cjs.map +1 -0
  10. package/dist/atomic-DPpdrJzO.js +89 -0
  11. package/dist/atomic-DPpdrJzO.js.map +1 -0
  12. package/dist/collection/core/completion.d.ts +21 -0
  13. package/dist/collection/core/ids.d.ts +5 -0
  14. package/dist/collection/core/linkTargets.d.ts +14 -0
  15. package/dist/collection/core/ownProp.d.ts +9 -0
  16. package/dist/collection/core/recordKeys.d.ts +14 -0
  17. package/dist/collection/core/schemaRules.d.ts +167 -0
  18. package/dist/collection/core/schemaZ.d.ts +490 -10
  19. package/dist/collection/core/sortValueOf.d.ts +21 -0
  20. package/dist/collection/core/textSearch.d.ts +12 -0
  21. package/dist/collection/index.cjs +109 -29
  22. package/dist/collection/index.cjs.map +1 -1
  23. package/dist/collection/index.d.ts +4 -0
  24. package/dist/collection/index.js +98 -29
  25. package/dist/collection/index.js.map +1 -1
  26. package/dist/collection/registry/server/index.cjs +14 -42
  27. package/dist/collection/registry/server/index.cjs.map +1 -1
  28. package/dist/collection/registry/server/index.js +6 -34
  29. package/dist/collection/registry/server/index.js.map +1 -1
  30. package/dist/collection/server/discovery.d.ts +7 -0
  31. package/dist/collection/server/host.d.ts +3 -8
  32. package/dist/collection/server/index.cjs +10 -9
  33. package/dist/collection/server/index.d.ts +1 -0
  34. package/dist/collection/server/index.js +4 -4
  35. package/dist/collection/server/io.d.ts +0 -88
  36. package/dist/collection/server/skillAssets.d.ts +90 -0
  37. package/dist/collection-watchers/config.d.ts +2 -4
  38. package/dist/collection-watchers/index.cjs +5 -5
  39. package/dist/collection-watchers/index.cjs.map +1 -1
  40. package/dist/collection-watchers/index.js +5 -5
  41. package/dist/collection-watchers/index.js.map +1 -1
  42. package/dist/{discovery-BbsJwVEq.js → discovery-DYlEOa9a.js} +427 -393
  43. package/dist/discovery-DYlEOa9a.js.map +1 -0
  44. package/dist/{discovery-Bklck7Ck.cjs → discovery-UxkvBxV-.cjs} +445 -435
  45. package/dist/discovery-UxkvBxV-.cjs.map +1 -0
  46. package/dist/dist-Cwk0e12G.js +50 -0
  47. package/dist/dist-Cwk0e12G.js.map +1 -0
  48. package/dist/dist-pWpC-b04.cjs +61 -0
  49. package/dist/dist-pWpC-b04.cjs.map +1 -0
  50. package/dist/feeds/index.cjs +2 -2
  51. package/dist/feeds/index.js +2 -2
  52. package/dist/feeds/server/host.d.ts +5 -8
  53. package/dist/feeds/server/index.cjs +143 -61
  54. package/dist/feeds/server/index.cjs.map +1 -1
  55. package/dist/feeds/server/index.js +141 -59
  56. package/dist/feeds/server/index.js.map +1 -1
  57. package/dist/files/atomic.d.ts +34 -0
  58. package/dist/files/index.cjs +47 -0
  59. package/dist/files/index.cjs.map +1 -0
  60. package/dist/files/index.d.ts +3 -0
  61. package/dist/files/index.js +40 -0
  62. package/dist/files/index.js.map +1 -0
  63. package/dist/files/json.d.ts +4 -0
  64. package/dist/files/safe.d.ts +9 -0
  65. package/dist/google/auth.d.ts +1 -1
  66. package/dist/google/collectionDateTime.d.ts +5 -0
  67. package/dist/google/collectionSync.d.ts +2 -2
  68. package/dist/google/fsJson.d.ts +3 -2
  69. package/dist/google/host.d.ts +3 -6
  70. package/dist/google/index.cjs +64 -91
  71. package/dist/google/index.cjs.map +1 -1
  72. package/dist/google/index.d.ts +1 -0
  73. package/dist/google/index.js +57 -85
  74. package/dist/google/index.js.map +1 -1
  75. package/dist/host/hostSlot.d.ts +27 -0
  76. package/dist/{ids-DWmHjm17.cjs → ids-BJ7rdrDN.cjs} +17 -1
  77. package/dist/{ids-DWmHjm17.cjs.map → ids-BJ7rdrDN.cjs.map} +1 -1
  78. package/dist/{ids-D1M1T6KJ.js → ids-Bv6AOW9Z.js} +12 -2
  79. package/dist/{ids-D1M1T6KJ.js.map → ids-Bv6AOW9Z.js.map} +1 -1
  80. package/dist/{ingestTypes-DbuQNuK6.cjs → ingestTypes-CkbM-zrO.cjs} +2 -2
  81. package/dist/{ingestTypes-DbuQNuK6.cjs.map → ingestTypes-CkbM-zrO.cjs.map} +1 -1
  82. package/dist/{ingestTypes-Ci4eOgv-.js → ingestTypes-DuCiZqye.js} +2 -2
  83. package/dist/{ingestTypes-Ci4eOgv-.js.map → ingestTypes-DuCiZqye.js.map} +1 -1
  84. package/dist/notifier/engine.d.ts +2 -4
  85. package/dist/notifier/index.cjs +1 -1
  86. package/dist/notifier/index.js +1 -1
  87. package/dist/{notifier-ChpY0XrY.js → notifier-BdA5qzhe.js} +14 -16
  88. package/dist/notifier-BdA5qzhe.js.map +1 -0
  89. package/dist/{notifier-bS8IEeLA.cjs → notifier-tMsAXyXp.cjs} +14 -16
  90. package/dist/notifier-tMsAXyXp.cjs.map +1 -0
  91. package/dist/plugin-vue/fileWatch.d.ts +5 -0
  92. package/dist/plugin-vue/i18n.cjs +45 -0
  93. package/dist/plugin-vue/i18n.cjs.map +1 -0
  94. package/dist/plugin-vue/i18n.js +44 -0
  95. package/dist/plugin-vue/i18n.js.map +1 -0
  96. package/dist/plugin-vue/index.cjs +98 -0
  97. package/dist/plugin-vue/index.cjs.map +1 -0
  98. package/dist/plugin-vue/index.d.ts +5 -0
  99. package/dist/plugin-vue/index.js +91 -0
  100. package/dist/plugin-vue/index.js.map +1 -0
  101. package/dist/plugin-vue/markdownDoc.d.ts +10 -0
  102. package/dist/plugin-vue/pluginI18n.d.ts +22 -0
  103. package/dist/plugin-vue/useClipboardCopy.d.ts +6 -0
  104. package/dist/plugin-vue/useFileWatch.d.ts +8 -0
  105. package/dist/plugin-vue/useMarkdownDoc.d.ts +3 -0
  106. package/dist/{promptSafety-Bugq2kqL.js → promptSafety-BNelBKhh.js} +79 -7
  107. package/dist/promptSafety-BNelBKhh.js.map +1 -0
  108. package/dist/{promptSafety-DbE6eZmP.cjs → promptSafety-QAtADXUF.cjs} +108 -6
  109. package/dist/promptSafety-QAtADXUF.cjs.map +1 -0
  110. package/dist/remote-host/index.cjs.map +1 -1
  111. package/dist/remote-host/index.js.map +1 -1
  112. package/dist/remote-host/server/hostRunner.d.ts +2 -1
  113. package/dist/remote-host/server/index.cjs +6 -5
  114. package/dist/remote-host/server/index.cjs.map +1 -1
  115. package/dist/remote-host/server/index.js +3 -2
  116. package/dist/remote-host/server/index.js.map +1 -1
  117. package/dist/remote-view/index.cjs +1 -1
  118. package/dist/remote-view/index.cjs.map +1 -1
  119. package/dist/remote-view/index.d.ts +1 -1
  120. package/dist/remote-view/index.js +1 -1
  121. package/dist/remote-view/index.js.map +1 -1
  122. package/dist/scheduler/index.cjs +3 -3
  123. package/dist/scheduler/index.cjs.map +1 -1
  124. package/dist/scheduler/index.js +2 -2
  125. package/dist/scheduler/index.js.map +1 -1
  126. package/dist/scheduler/task-manager.d.ts +2 -5
  127. package/dist/{server-8EZggEg7.js → server-CnwgECW-.js} +209 -41
  128. package/dist/server-CnwgECW-.js.map +1 -0
  129. package/dist/{server-BOiz_HDi.cjs → server-DFo3zFYB.cjs} +250 -46
  130. package/dist/server-DFo3zFYB.cjs.map +1 -0
  131. package/dist/skill-bridge/index.cjs +1 -1
  132. package/dist/skill-bridge/index.js +1 -1
  133. package/dist/translation/client.cjs +16 -0
  134. package/dist/translation/client.cjs.map +1 -1
  135. package/dist/translation/client.d.ts +6 -0
  136. package/dist/translation/client.js +16 -1
  137. package/dist/translation/client.js.map +1 -1
  138. package/dist/utils/errors.d.ts +2 -1
  139. package/dist/utils/fetch.cjs +36 -0
  140. package/dist/utils/fetch.cjs.map +1 -0
  141. package/dist/{collection/registry/server → utils}/fetch.d.ts +5 -3
  142. package/dist/utils/fetch.js +34 -0
  143. package/dist/utils/fetch.js.map +1 -0
  144. package/dist/utils/index.cjs +11 -3
  145. package/dist/utils/index.cjs.map +1 -0
  146. package/dist/utils/index.js +9 -1
  147. package/dist/utils/index.js.map +1 -0
  148. package/dist/whisper/index.cjs +9 -9
  149. package/dist/whisper/index.cjs.map +1 -1
  150. package/dist/whisper/index.js +3 -3
  151. package/dist/wiki/index.cjs +3 -16
  152. package/dist/wiki/index.cjs.map +1 -1
  153. package/dist/wiki/index.js +1 -14
  154. package/dist/wiki/index.js.map +1 -1
  155. package/dist/wiki/render.d.ts +2 -4
  156. package/dist/wiki/server/frontmatter.d.ts +2 -6
  157. package/dist/wiki/server/index.cjs +4 -40
  158. package/dist/wiki/server/index.cjs.map +1 -1
  159. package/dist/wiki/server/index.js +2 -38
  160. package/dist/wiki/server/index.js.map +1 -1
  161. package/dist/workspace-setup/index.js +22 -6
  162. package/dist/workspace-setup/index.js.map +1 -1
  163. package/package.json +50 -8
  164. package/dist/collection/server/atomic.d.ts +0 -1
  165. package/dist/discovery-BbsJwVEq.js.map +0 -1
  166. package/dist/discovery-Bklck7Ck.cjs.map +0 -1
  167. package/dist/errors-7P5eMOSX.cjs +0 -30
  168. package/dist/errors-7P5eMOSX.cjs.map +0 -1
  169. package/dist/errors-eid6Mes3.js +0 -19
  170. package/dist/errors-eid6Mes3.js.map +0 -1
  171. package/dist/google/fetch.d.ts +0 -8
  172. package/dist/notifier-ChpY0XrY.js.map +0 -1
  173. package/dist/notifier-bS8IEeLA.cjs.map +0 -1
  174. package/dist/promptSafety-Bugq2kqL.js.map +0 -1
  175. package/dist/promptSafety-DbE6eZmP.cjs.map +0 -1
  176. package/dist/server-8EZggEg7.js.map +0 -1
  177. package/dist/server-BOiz_HDi.cjs.map +0 -1
@@ -0,0 +1,167 @@
1
+ import { CollectionSchemaInput } from './schemaZ';
2
+ type Schema = CollectionSchemaInput;
3
+ /** Exactly one storage declaration: native records need `dataPath`, an external
4
+ * data file needs `dataSource`, an alternative backend needs `storage`. Zero
5
+ * (nowhere to read) and several (ambiguous which wins) are equally
6
+ * meaningless — fail loudly at load instead of picking silently. */
7
+ export declare function declaresExactlyOneStore(schema: Schema): boolean;
8
+ /** A `dataSource` collection is read-only by definition, so schema-level write
9
+ * machinery can never fire: `singleton` pins CREATES, `ingest` REFILLS
10
+ * records, `spawn` WRITES successor records. Rejecting them at validation
11
+ * kills whole classes of writes before any runtime guard. */
12
+ export declare function dataSourceDeclaresNoWriteMachinery(schema: Schema): boolean;
13
+ /** Same rule for declarative host writes: a mutate action writes the record
14
+ * it's invoked on, which a read-only collection has no business doing. */
15
+ export declare function dataSourceDeclaresNoMutateAction(schema: Schema): boolean;
16
+ /** Action ids must be unique so the dispatch route resolves unambiguously. */
17
+ export declare function actionIdsAreUnique(schema: Schema): boolean;
18
+ /** Collection-level action ids must likewise be unique. */
19
+ export declare function collectionActionIdsAreUnique(schema: Schema): boolean;
20
+ /** A mutate action's `set` writes real STORED fields: a typo'd key would write
21
+ * a stray value forever, a computed/projected field is never persisted, and
22
+ * the primaryKey is the filename (renaming is not a mutation). */
23
+ export declare function mutateSetKeysNameStoredFields(schema: Schema): boolean;
24
+ /** Every `$params.<name>` reference in `set` must name a declared param — an
25
+ * undeclared one would silently no-op the assignment. */
26
+ export declare function mutateParamRefsAreDeclared(schema: Schema): boolean;
27
+ /** A collection-level action has no record to write. */
28
+ export declare function collectionActionsAreNotMutate(schema: Schema): boolean;
29
+ /** The singleton value becomes a record id (and thus a `<id>.json` filename),
30
+ * so it must satisfy the SAME record-id rule the write path enforces —
31
+ * otherwise the create form would lock the primary key to a value the POST
32
+ * route then rejects, making the collection impossible to initialize. */
33
+ export declare function singletonIsAValidRecordId(schema: Schema): boolean;
34
+ /** A `currencyField` pointer must name a real top-level field that holds a code
35
+ * string — a typo (`curreny`) would otherwise pass the per-field check, then
36
+ * silently fall back to the literal / USD at render and mislabel amounts. */
37
+ export declare function currencyFieldRefsNameCodeFields(schema: Schema): boolean;
38
+ /** The pair must be declared together — one without the other is meaningless:
39
+ * the host would either never fire (no done values to compare against) or
40
+ * never clear (no field to read).
41
+ *
42
+ * EXCEPTION: when `completionField` names a `flag` field, done ⇔ the flag's
43
+ * `where` matches, so `completionDoneValues` carries no information and MUST
44
+ * be omitted (declaring it would invite a contradictory second source of
45
+ * truth). */
46
+ export declare function completionPairIsCoherent(schema: Schema): boolean;
47
+ /** `completionField` must name a real top-level field — a typo would silently
48
+ * disable the notification mechanism otherwise. */
49
+ export declare function completionFieldIsDeclared(schema: Schema): boolean;
50
+ /** A flag named by `completionField` is evaluated against the RAW record — the
51
+ * reconciler (and spawn's fallback) read items straight off disk, BEFORE any
52
+ * `deriveAll` enrichment — so its `where` may only reference STORED fields. A
53
+ * condition over a computed sibling would see an absent key: `ne` matches
54
+ * vacuously, every other op reads false, and the bell would clear wrongly /
55
+ * never. General (non-completion) flags keep the full vocabulary — the UI
56
+ * evaluates them post-enrichment. */
57
+ export declare function completionFlagReadsOnlyStoredFields(schema: Schema): boolean;
58
+ /** `displayField`, like `completionField`, must name a real top-level field —
59
+ * a typo would silently fall back to the primaryKey forever. */
60
+ export declare function displayFieldIsDeclared(schema: Schema): boolean;
61
+ /** A field's `when.field` gates its visibility against a sibling's value, so it
62
+ * must name a real top-level field — a typo would silently keep the field
63
+ * hidden forever (the gate never matches). */
64
+ export declare function fieldVisibilityGatesNameDeclaredFields(schema: Schema): boolean;
65
+ /** A flag's `where` reads sibling fields (both `cond.field` and a same-record
66
+ * `valueFrom.field`), so each must name a real top-level field — a typo would
67
+ * silently pin the flag false forever (`ne`: true forever). */
68
+ export declare function flagConditionsNameDeclaredFields(schema: Schema): boolean;
69
+ /** An `embed`'s `idField` resolves the target record id from a sibling's value,
70
+ * so it must name a real top-level field — and one whose stored value is a
71
+ * plain id string. Only `ref` / `string` qualify: the editor writes the picked
72
+ * id into that field, so a non-persisted or composite type would either not
73
+ * round-trip on save or hold no usable id. */
74
+ export declare function embedIdFieldsNameIdBearingFields(schema: Schema): boolean;
75
+ /** The sync writes each mapped value into a declared field, and puts the Google
76
+ * event id in the primary field — so a map key that names no field (or names
77
+ * the primary) would silently drop data or fight the id. */
78
+ export declare function googleCalendarMapNamesStoredFields(schema: Schema): boolean;
79
+ /** A `toggle` field projects an `enum` field: its `field` must name a real
80
+ * top-level enum, and `onValue` / `offValue` must be members of that enum's
81
+ * `values` — otherwise toggling would write a value outside the closed set
82
+ * (and never appear "checked"). */
83
+ export declare function togglesProjectValidEnums(schema: Schema): boolean;
84
+ /** `triggerField` requires the completion pair: the time gate only suppresses
85
+ * the *completion* bell until the date, and the bell still clears via
86
+ * `completionDoneValues`. Without completion there is no bell to gate. */
87
+ export declare function triggerFieldRequiresCompletion(schema: Schema): boolean;
88
+ /** `triggerField` must name a real `date` field — the gate parses its value as
89
+ * `YYYY-MM-DD`; any other type can't be compared to the clock. */
90
+ export declare function triggerFieldIsADateField(schema: Schema): boolean;
91
+ /** `triggerLeadDays` only means something relative to a trigger date. */
92
+ export declare function triggerLeadDaysRequiresTriggerField(schema: Schema): boolean;
93
+ /** `spawn` advances `triggerField` to compute the successor's trigger date, so
94
+ * the schema must declare one. */
95
+ export declare function spawnRequiresTriggerField(schema: Schema): boolean;
96
+ /** `spawn.when.field` must name a real top-level field — a typo would silently
97
+ * never match. */
98
+ export declare function spawnWhenFieldIsDeclared(schema: Schema): boolean;
99
+ /** Every `spawn.carry` entry must name a real top-level field — a typo would
100
+ * silently never copy. */
101
+ export declare function spawnCarryEntriesAreDeclared(schema: Schema): boolean;
102
+ /** A successor must NOT be born already matching its own spawn predicate — it
103
+ * would re-spawn on its first reconcile, fanning out into an unbounded chain
104
+ * of records. The predicate field/values are `spawn.when` when given, else the
105
+ * completion-done pair. The successor's value for that field is `set[field]`
106
+ * if set, else the carried source value (which matched, by definition, when
107
+ * the spawn fired) if carried, else absent (safe). */
108
+ export declare function spawnSuccessorStartsInert(schema: Schema): boolean;
109
+ /** `spawnSuccessorStartsInert` cannot see through a flag's `where` (the
110
+ * predicate would need full record evaluation against `set`/`carry`). So a
111
+ * schema whose completion is flag-form may only spawn with an explicit
112
+ * `spawn.when` — which that check CAN evaluate. */
113
+ export declare function flagCompletionSpawnDeclaresWhen(schema: Schema): boolean;
114
+ /** §4.1 — `fromField` must name a real top-level `enum` field. The `map` keys
115
+ * are only meaningful against a closed value set, and the field renders as a
116
+ * form `<select>`; a non-enum target has no finite values to validate. */
117
+ export declare function fieldDrivenFromFieldIsEnum(schema: Schema): boolean;
118
+ /** §4.2 — `map` keys must EXACTLY cover the enum's `values` (no missing keys —
119
+ * a record could pick an unmapped frequency and silently stall; no extra keys
120
+ * — a stale map outliving an enum edit). */
121
+ export declare function fieldDrivenMapCoversValues(schema: Schema): boolean;
122
+ /** §4.5 — `fromField` must reach the successor (via `carry` or `set`);
123
+ * otherwise the successor loses its frequency and the NEXT spawn along the
124
+ * chain can't resolve an interval, silently halting the recurrence.
125
+ *
126
+ * `set` writes a FIXED value, so it must itself be a key of `map` (else the
127
+ * successor is born with an unresolvable driver and `resolveEvery` skips it —
128
+ * the exact silent-halt §4.5 exists to prevent). `carry` copies the source's
129
+ * own value, which — for a record that matched the spawn — is one of the
130
+ * enum's values, all of which `map` covers by §4.2; so a carried driver is
131
+ * always resolvable and needs no value check here. */
132
+ export declare function fieldDrivenFromFieldCarried(schema: Schema): boolean;
133
+ /** `calendarField` must name a real `date`/`datetime` field — the calendar view
134
+ * parses its value to place records on the month grid (a `datetime` anchor
135
+ * also carries the clock for the day view). */
136
+ export declare function calendarFieldIsDateLike(schema: Schema): boolean;
137
+ /** `calendarEndField` marks the end of a multi-day span, so it only means
138
+ * something alongside a start anchor. */
139
+ export declare function calendarEndFieldRequiresCalendarField(schema: Schema): boolean;
140
+ /** `calendarEndField` must also name a real `date`/`datetime` field — same parse. */
141
+ export declare function calendarEndFieldIsDateLike(schema: Schema): boolean;
142
+ /** `calendarTimeField` places records on the day view, so it only means
143
+ * something alongside a start anchor. */
144
+ export declare function calendarTimeFieldRequiresCalendarField(schema: Schema): boolean;
145
+ /** `calendarTimeField` must name a real top-level field (a free-form time
146
+ * string the day view parses). */
147
+ export declare function calendarTimeFieldIsDeclared(schema: Schema): boolean;
148
+ /** …and that field must be string-backed — the day view parses its value as a
149
+ * time string, so a number/enum/date column can't drive it. */
150
+ export declare function calendarTimeFieldIsStringBacked(schema: Schema): boolean;
151
+ /** `kanbanField` must name a real `enum` field — the board groups records into
152
+ * one column per declared enum value; any other type has no closed set of
153
+ * columns to group by. */
154
+ export declare function kanbanFieldIsAnEnum(schema: Schema): boolean;
155
+ /** `notifyWhen` narrows the completion bell, so it only means something with
156
+ * completion tracking. */
157
+ export declare function notifyWhenRequiresCompletion(schema: Schema): boolean;
158
+ /** `notifyWhen.field` must name a real top-level field. */
159
+ export declare function notifyWhenFieldIsDeclared(schema: Schema): boolean;
160
+ /** Every custom view `id` must be a valid slug — it doubles as the view-mode
161
+ * selector key (`custom:<id>`) and the capability-token clamp key, both of
162
+ * which expect a path-safe token. */
163
+ export declare function viewIdsAreSlugs(schema: Schema): boolean;
164
+ /** Custom view ids must be unique so the selector + token clamp resolve
165
+ * unambiguously. */
166
+ export declare function viewIdsAreUnique(schema: Schema): boolean;
167
+ export {};