@mulmoclaude/core 3.10.0 → 3.11.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.
@@ -122,6 +122,34 @@ var PublicZ = z.object({
122
122
  read: z.array(NameZ).optional(),
123
123
  submit: z.record(NameZ, SubmitZ).optional()
124
124
  }).strict();
125
+ /** The URL name an app is handed out under: `https://<host>/{slug}`.
126
+ *
127
+ * A SEPARATE name from the `aid`, and that separation is the point (design
128
+ * D2b). `apps/{aid}` is a shelf every user of the deployment shares and the
129
+ * rules' `allow create` asks only that you name yourself owner — so a
130
+ * memorable aid is first-come-first-served, cannot be checked for
131
+ * availability, and frees up again when an app is deleted. The aid is
132
+ * therefore a UUID, and the thing people can fight over is moved to the name
133
+ * that costs nothing to change.
134
+ *
135
+ * Declared here rather than kept beside `app.json` because a RESERVATION has
136
+ * to travel with the repository: `appSlugs/{slug}` is unreadable until the app
137
+ * is published (`allow read: if resource.data.published == true`), so nothing
138
+ * can recover which slug an app holds by asking Firestore. A second file to
139
+ * keep in step with the declaration is the alternative, and it is the kind of
140
+ * pair that goes out of step silently.
141
+ *
142
+ * The shape is stricter than `NameZ` on purpose: it is BOTH a URL path
143
+ * segment people read aloud and a Firestore document id. Lowercase
144
+ * alphanumerics separated by single hyphens covers both without a case rule
145
+ * that would make two slugs collide in one place and not the other.
146
+ *
147
+ * Which slug an app ended up with is the HOST's business — a wanted slug can
148
+ * be taken, and the host writes the one it reserved back here. Nothing in this
149
+ * package reads the key; it is declared so that writing it back does not make
150
+ * the file unparseable. */
151
+ var SLUG_SHAPE = "must be lowercase letters, digits and single hyphens, and must not start or end with one (e.g. sakura-hair)";
152
+ var SlugZ = z.string().trim().max(64).regex(/^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$/, SLUG_SHAPE).refine((slug) => !slug.includes("--"), SLUG_SHAPE);
125
153
  /** The whole authored declaration.
126
154
  *
127
155
  * `owner` is accepted but is NOT the published value — publish stamps the
@@ -133,6 +161,8 @@ var PublicZ = z.object({
133
161
  var AuthoredAppZ = z.object({
134
162
  aid: NameZ,
135
163
  name: z.string().trim().min(1).optional(),
164
+ /** The wanted (or reserved) URL name — see {@link SlugZ}. */
165
+ slug: SlugZ.optional(),
136
166
  /** Per-worktree app id (design D6, implementation order 7). Accepted so a
137
167
  * repository already carrying it parses; nothing reads it yet. */
138
168
  aidEnv: z.string().trim().min(1).optional(),
@@ -2740,4 +2770,4 @@ function makeManageCollectionTool(deps = {}) {
2740
2770
  //#endregion
2741
2771
  export { parseAuthoredApp as $, runQueryOverRows as A, APP_SLUGS_COLLECTION as B, STORE_UNREADABLE as C, recordFieldProblem as D, compileRecordZ as E, readCustomViewI18n as F, appStagingPath as G, appConfigPath as H, readSkillTemplate as I, projectPublish as J, projectApp as K, bindsSubmitterIdentity as L, buildCollectionActionSeedPrompt as M, promptPathsFor as N, runCollectionQuery as O, readCustomViewHtml as P, AuthoredAppZ as Q, publishProblems as R, MAX_RECORD_ISSUES as S, validateRecordObject as T, appSchemasPath as U, PUBLIC_CONFIG_DOC as V, appSlugDoc as W, stagedRuleConfig as X, promoteSchema as Y, APP_ROLES as Z, computeCollectionIcon as _, deleteCollection as a, applyMutateAction as b, computeSuccessor as c, isTriggerDue as d, maybeSpawnSuccessor as f, ONE_SECOND_MS as g, successorId as h, deleteCustomView as i, buildActionSeedPrompt as j, enrichItems as k, daysInMonth as l, resolveEvery as m, MAX_UNSELECTIVE_ITEMS as n, deleteCollectionRefusalMessage as o, parseCivil as p, projectDeploy as q, makeManageCollectionTool as r, advanceTriggerDate as s, MAX_SCHEMA_ISSUES as t, formatCivil as u, buildWorkspaceOntology as v, validateCollectionRecords as w, firstMutateParamProblem as x, schemaRelations as y, APPS_COLLECTION as z };
2742
2772
 
2743
- //# sourceMappingURL=server-BNe8XMtu.js.map
2773
+ //# sourceMappingURL=server-zcM1ViCE.js.map