@substrat-run/contracts 0.135.0 → 0.137.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 (68) hide show
  1. package/dist/control-plane.d.ts +42 -0
  2. package/dist/control-plane.d.ts.map +1 -1
  3. package/dist/control-plane.js +39 -0
  4. package/dist/control-plane.js.map +1 -1
  5. package/dist/deploy.d.ts +34 -0
  6. package/dist/deploy.d.ts.map +1 -1
  7. package/dist/deploy.js +79 -2
  8. package/dist/deploy.js.map +1 -1
  9. package/dist/errors.d.ts +18 -1
  10. package/dist/errors.d.ts.map +1 -1
  11. package/dist/errors.js +26 -2
  12. package/dist/errors.js.map +1 -1
  13. package/dist/ids.d.ts +2 -0
  14. package/dist/ids.d.ts.map +1 -1
  15. package/dist/ids.js +2 -0
  16. package/dist/ids.js.map +1 -1
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +2 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/invocation-record.d.ts +27 -11
  22. package/dist/invocation-record.d.ts.map +1 -1
  23. package/dist/invocation-record.js +27 -11
  24. package/dist/invocation-record.js.map +1 -1
  25. package/dist/lifecycle.d.ts +9 -1
  26. package/dist/lifecycle.d.ts.map +1 -1
  27. package/dist/lifecycle.js +9 -1
  28. package/dist/lifecycle.js.map +1 -1
  29. package/dist/manifest.d.ts +51 -5
  30. package/dist/manifest.d.ts.map +1 -1
  31. package/dist/manifest.js +42 -5
  32. package/dist/manifest.js.map +1 -1
  33. package/dist/operations.d.ts.map +1 -1
  34. package/dist/operations.js +15 -2
  35. package/dist/operations.js.map +1 -1
  36. package/dist/pagination.d.ts +0 -0
  37. package/dist/pagination.d.ts.map +1 -1
  38. package/dist/pagination.js +0 -0
  39. package/dist/pagination.js.map +1 -1
  40. package/dist/permission.d.ts +2 -0
  41. package/dist/permission.d.ts.map +1 -1
  42. package/dist/permission.js +7 -0
  43. package/dist/permission.js.map +1 -1
  44. package/dist/refusal.d.ts +49 -6
  45. package/dist/refusal.d.ts.map +1 -1
  46. package/dist/refusal.js +82 -13
  47. package/dist/refusal.js.map +1 -1
  48. package/dist/registry.d.ts +1 -1
  49. package/dist/registry.d.ts.map +1 -1
  50. package/dist/registry.js +11 -0
  51. package/dist/registry.js.map +1 -1
  52. package/dist/routing.d.ts +8 -0
  53. package/dist/routing.d.ts.map +1 -1
  54. package/dist/routing.js +22 -0
  55. package/dist/routing.js.map +1 -1
  56. package/dist/script-names.d.ts +33 -0
  57. package/dist/script-names.d.ts.map +1 -0
  58. package/dist/script-names.js +59 -0
  59. package/dist/script-names.js.map +1 -0
  60. package/dist/tenancy.d.ts +109 -0
  61. package/dist/tenancy.d.ts.map +1 -1
  62. package/dist/tenancy.js +52 -0
  63. package/dist/tenancy.js.map +1 -1
  64. package/dist/wire-headers.d.ts +75 -0
  65. package/dist/wire-headers.d.ts.map +1 -0
  66. package/dist/wire-headers.js +69 -0
  67. package/dist/wire-headers.js.map +1 -0
  68. package/package.json +5 -1
package/dist/refusal.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
3
  * The read side of the refusal log (#1745) — a scope-local record of every lifecycle move
4
- * `assertTransition` refused and the operation failed with, written on the failure path as
5
- * a write of its own AFTER the rollback it is evidence of.
4
+ * `assertTransition` refused, and every manifest-declared guard (K-38) that refused the
5
+ * operation it stands before, where the operation failed with it. Written on the failure
6
+ * path as a write of its own AFTER the rollback it is evidence of.
6
7
  *
7
8
  * The denial log's sibling, and read the same way (`permissionDenial` / `denialFilter`):
8
9
  * a denial is the permission model disagreeing with an actor, a refusal is the lifecycle
@@ -14,6 +15,8 @@ import { z } from 'zod';
14
15
  * retrying an illegal move mints a row per attempt), and the window is a storage bound,
15
16
  * not a retention promise — rows drain rather than expire.
16
17
  */
18
+ /** What a refusal row stores for a reason outside the `problemReason` grammar. */
19
+ export declare const UNRECOGNIZED_REFUSAL_REASON = "unrecognized";
17
20
  /** How many refusal rows an unbounded read returns — a screenful, newest-first. */
18
21
  export declare const DEFAULT_REFUSAL_LIMIT = 50;
19
22
  /** The hard ceiling on one page of refusal rows. */
@@ -21,14 +24,15 @@ export declare const REFUSAL_LIMIT_MAX = 200;
21
24
  /**
22
25
  * One recorded refusal.
23
26
  *
24
- * `kind` is `'transition'` for every row today; a K-38 guard refusal is the next kind,
25
- * recorded in the same table. It is read as text rather than a closed enum so a reader
26
- * built now does not reject the row a later kernel writes.
27
+ * `kind` is `'transition'` for a move the lifecycle refused and `'guard'` for an operation a
28
+ * manifest-declared guard refused (K-38). It is read as text rather than a closed enum so a
29
+ * reader built now does not reject a kind a later kernel writes.
27
30
  */
28
31
  export declare const refusalRecord: z.ZodObject<{
29
32
  id: z.ZodString;
30
33
  kind: z.ZodString;
31
34
  reason: z.ZodNullable<z.ZodString>;
35
+ guard: z.ZodNullable<z.ZodString>;
32
36
  actor: z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">, z.ZodObject<{
33
37
  system: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
34
38
  }, z.core.$strip>, z.ZodObject<{
@@ -51,7 +55,7 @@ export declare const refusalRecord: z.ZodObject<{
51
55
  scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
52
56
  entityType: z.ZodNullable<z.ZodString>;
53
57
  entityId: z.ZodNullable<z.ZodString>;
54
- fromState: z.ZodString;
58
+ fromState: z.ZodNullable<z.ZodString>;
55
59
  attemptedState: z.ZodNullable<z.ZodString>;
56
60
  operation: z.ZodString;
57
61
  invokedOperation: z.ZodNullable<z.ZodString>;
@@ -74,6 +78,7 @@ export type RefusalRecord = z.infer<typeof refusalRecord>;
74
78
  * the object form for any other kind. The stored encoding is the reader's problem.
75
79
  */
76
80
  export declare const refusalFilter: z.ZodObject<{
81
+ kind: z.ZodOptional<z.ZodString>;
77
82
  entityType: z.ZodOptional<z.ZodString>;
78
83
  entityId: z.ZodOptional<z.ZodString>;
79
84
  actor: z.ZodOptional<z.ZodString>;
@@ -84,4 +89,42 @@ export declare const refusalFilter: z.ZodObject<{
84
89
  limit: z.ZodOptional<z.ZodNumber>;
85
90
  }, z.core.$strip>;
86
91
  export type RefusalFilter = z.infer<typeof refusalFilter>;
92
+ /**
93
+ * Name the record a refusal is about, on the error that carries it (#1745).
94
+ *
95
+ * For a guard predicate (K-38): the kernel records a guard's refusal, but only the predicate
96
+ * knows which record it judged — its config says where the id is, and the kernel does not
97
+ * read a predicate's config. A predicate that names it lets the process map count the
98
+ * refusal against that record; one that does not is still recorded, with the record unknown.
99
+ *
100
+ * Carried under a registered symbol for the reason `RefusedTransition` is: the record's id
101
+ * is the scope's to keep, never part of the problem document the caller is handed. Returns
102
+ * the error, so a throw site reads `throw nameRefusedRecord(conflict(…), ref)`.
103
+ */
104
+ export declare function nameRefusedRecord<E>(err: E, ref: {
105
+ entityType: string;
106
+ entityId: string;
107
+ }): E;
108
+ /** The record `nameRefusedRecord` put on an error, or null. */
109
+ export declare function refusedRecordOf(err: unknown): {
110
+ entityType: string;
111
+ entityId: string;
112
+ } | null;
113
+ /** What a refusal row stores as its entity type when the one it was handed is not one. */
114
+ export declare const UNDECLARED_ENTITY_TYPE = "undeclared";
115
+ /** The longest entity type a refusal row keeps. */
116
+ export declare const REFUSAL_ENTITY_TYPE_MAX = 64;
117
+ /**
118
+ * The entity type a refusal row keeps (#1745): the one it was handed when that is spelled as
119
+ * an entity type — the tuple namespace grammar (`OBJECT_NAMESPACE`, which `ctx.link` and every
120
+ * entity-narrowed grant are held to), not a kernel namespace, at most
121
+ * `REFUSAL_ENTITY_TYPE_MAX` — and `UNDECLARED_ENTITY_TYPE` otherwise. Null stays null: the
122
+ * record was not named.
123
+ *
124
+ * Needed because the type reaches a row from code that is handed request data — a guard
125
+ * predicate naming its record with `nameRefusedRecord` — and the ref takes any string. The
126
+ * grammar refuses an address, a sentence, anything with a space; it cannot tell a bare word
127
+ * from a type, which no runtime registry of a scope's entity types exists to do.
128
+ */
129
+ export declare function refusalEntityType(entityType: string | null): string | null;
87
130
  //# sourceMappingURL=refusal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"refusal.d.ts","sourceRoot":"","sources":["../src/refusal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;;;;;;;;GAcG;AAEH,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,oDAAoD;AACpD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwCxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;iBAWxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"refusal.d.ts","sourceRoot":"","sources":["../src/refusal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;;;;;;;;GAeG;AAEH,kFAAkF;AAClF,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,oDAAoD;AACpD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoDxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;iBAaxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC,CAK7F;AAID,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI7F;AAED,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,mDAAmD;AACnD,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAO1E"}
package/dist/refusal.js CHANGED
@@ -3,10 +3,12 @@ import { actor } from './events.js';
3
3
  import { impersonationStamp } from './impersonation.js';
4
4
  import { scopeId, tenantId } from './ids.js';
5
5
  import { lifecycleActorKind } from './lifecycle-flow.js';
6
+ import { OBJECT_NAMESPACE, isKernelNamespace } from './object-ref.js';
6
7
  /**
7
8
  * The read side of the refusal log (#1745) — a scope-local record of every lifecycle move
8
- * `assertTransition` refused and the operation failed with, written on the failure path as
9
- * a write of its own AFTER the rollback it is evidence of.
9
+ * `assertTransition` refused, and every manifest-declared guard (K-38) that refused the
10
+ * operation it stands before, where the operation failed with it. Written on the failure
11
+ * path as a write of its own AFTER the rollback it is evidence of.
10
12
  *
11
13
  * The denial log's sibling, and read the same way (`permissionDenial` / `denialFilter`):
12
14
  * a denial is the permission model disagreeing with an actor, a refusal is the lifecycle
@@ -18,6 +20,8 @@ import { lifecycleActorKind } from './lifecycle-flow.js';
18
20
  * retrying an illegal move mints a row per attempt), and the window is a storage bound,
19
21
  * not a retention promise — rows drain rather than expire.
20
22
  */
23
+ /** What a refusal row stores for a reason outside the `problemReason` grammar. */
24
+ export const UNRECOGNIZED_REFUSAL_REASON = 'unrecognized';
21
25
  /** How many refusal rows an unbounded read returns — a screenful, newest-first. */
22
26
  export const DEFAULT_REFUSAL_LIMIT = 50;
23
27
  /** The hard ceiling on one page of refusal rows. */
@@ -25,34 +29,46 @@ export const REFUSAL_LIMIT_MAX = 200;
25
29
  /**
26
30
  * One recorded refusal.
27
31
  *
28
- * `kind` is `'transition'` for every row today; a K-38 guard refusal is the next kind,
29
- * recorded in the same table. It is read as text rather than a closed enum so a reader
30
- * built now does not reject the row a later kernel writes.
32
+ * `kind` is `'transition'` for a move the lifecycle refused and `'guard'` for an operation a
33
+ * manifest-declared guard refused (K-38). It is read as text rather than a closed enum so a
34
+ * reader built now does not reject a kind a later kernel writes.
31
35
  */
32
36
  export const refusalRecord = z.object({
33
37
  /** ULID — chronological, so it is also the sort key. */
34
38
  id: z.string().min(1),
35
39
  kind: z.string().min(1),
36
40
  /**
37
- * The problem code the operation failed with — `invalid_transition` for a transition
38
- * refusal, which is the `reason` on the 409 the caller received. Null for a kind this
39
- * reader does not know the code of.
41
+ * The problem code the operation failed with — the `reason` on the 409 the caller received:
42
+ * `invalid_transition` for a transition refusal, the predicate's own (`protocol_required`)
43
+ * for a guard. Null when the refusal carried none and the kind implies none, and
44
+ * `UNRECOGNIZED_REFUSAL_REASON` when it carried one outside the `problemReason` grammar —
45
+ * kept as a code, never as whatever text the thrower put there.
40
46
  */
41
47
  reason: z.string().nullable(),
48
+ /** The guard's named predicate (`protocol/all-signed`) on a `'guard'` row; null otherwise. */
49
+ guard: z.string().nullable(),
42
50
  /** WHO attempted the move: a principal, a `{ system }` module, a `{ connection }`, … */
43
51
  actor,
44
52
  /** The actor's kind, read off its stored shape — what the process map counts by. */
45
53
  actorKind: lifecycleActorKind,
46
54
  tenantId,
47
55
  scopeId: scopeId.nullable(),
48
- /** The record the move was refused on. Null when the caller of `assertTransition` did not name it. */
56
+ /**
57
+ * The record the refusal was about. Null when the refusing code did not name it — the
58
+ * caller of `assertTransition`, or a guard predicate that did not `nameRefusedRecord`.
59
+ * The type is `UNDECLARED_ENTITY_TYPE` when what it was handed is not spelled as one
60
+ * (`refusalEntityType`).
61
+ */
49
62
  entityType: z.string().nullable(),
50
63
  entityId: z.string().nullable(),
51
- /** The state the record was in. */
52
- fromState: z.string(),
53
- /** Where the operation leads where it IS legal; null when that is not one state. */
64
+ /**
65
+ * The state the record was in. Null on a `'guard'` row: a guard stands before an operation,
66
+ * and the kernel that ran it does not know the state of the record behind it.
67
+ */
68
+ fromState: z.string().nullable(),
69
+ /** Where the operation leads where it IS legal; null when that is not one state, and on a guard. */
54
70
  attemptedState: z.string().nullable(),
55
- /** The lifecycle's operation — what the edge is keyed by. */
71
+ /** The lifecycle's operation — what the edge is keyed by — or the operation the guard stands before. */
56
72
  operation: z.string(),
57
73
  /** The `invoke()` string the call ran as. The same as `operation` for every caller today. */
58
74
  invokedOperation: z.string().nullable(),
@@ -79,6 +95,8 @@ export const refusalRecord = z.object({
79
95
  * the object form for any other kind. The stored encoding is the reader's problem.
80
96
  */
81
97
  export const refusalFilter = z.object({
98
+ /** `'transition'` or `'guard'`; every kind when absent. */
99
+ kind: z.string().min(1).optional(),
82
100
  entityType: z.string().min(1).optional(),
83
101
  entityId: z.string().min(1).optional(),
84
102
  actor: z.string().min(1).optional(),
@@ -90,4 +108,55 @@ export const refusalFilter = z.object({
90
108
  until: z.string().min(1).optional(),
91
109
  limit: z.number().int().min(1).max(REFUSAL_LIMIT_MAX).optional(),
92
110
  });
111
+ /**
112
+ * Name the record a refusal is about, on the error that carries it (#1745).
113
+ *
114
+ * For a guard predicate (K-38): the kernel records a guard's refusal, but only the predicate
115
+ * knows which record it judged — its config says where the id is, and the kernel does not
116
+ * read a predicate's config. A predicate that names it lets the process map count the
117
+ * refusal against that record; one that does not is still recorded, with the record unknown.
118
+ *
119
+ * Carried under a registered symbol for the reason `RefusedTransition` is: the record's id
120
+ * is the scope's to keep, never part of the problem document the caller is handed. Returns
121
+ * the error, so a throw site reads `throw nameRefusedRecord(conflict(…), ref)`.
122
+ */
123
+ export function nameRefusedRecord(err, ref) {
124
+ if (err !== null && typeof err === 'object') {
125
+ err[REFUSED_RECORD] = { entityType: ref.entityType, entityId: ref.entityId };
126
+ }
127
+ return err;
128
+ }
129
+ const REFUSED_RECORD = Symbol.for('substrat.refused-record');
130
+ /** The record `nameRefusedRecord` put on an error, or null. */
131
+ export function refusedRecordOf(err) {
132
+ if (err === null || typeof err !== 'object')
133
+ return null;
134
+ const r = err[REFUSED_RECORD];
135
+ return r !== null && typeof r === 'object' ? r : null;
136
+ }
137
+ /** What a refusal row stores as its entity type when the one it was handed is not one. */
138
+ export const UNDECLARED_ENTITY_TYPE = 'undeclared';
139
+ /** The longest entity type a refusal row keeps. */
140
+ export const REFUSAL_ENTITY_TYPE_MAX = 64;
141
+ /**
142
+ * The entity type a refusal row keeps (#1745): the one it was handed when that is spelled as
143
+ * an entity type — the tuple namespace grammar (`OBJECT_NAMESPACE`, which `ctx.link` and every
144
+ * entity-narrowed grant are held to), not a kernel namespace, at most
145
+ * `REFUSAL_ENTITY_TYPE_MAX` — and `UNDECLARED_ENTITY_TYPE` otherwise. Null stays null: the
146
+ * record was not named.
147
+ *
148
+ * Needed because the type reaches a row from code that is handed request data — a guard
149
+ * predicate naming its record with `nameRefusedRecord` — and the ref takes any string. The
150
+ * grammar refuses an address, a sentence, anything with a space; it cannot tell a bare word
151
+ * from a type, which no runtime registry of a scope's entity types exists to do.
152
+ */
153
+ export function refusalEntityType(entityType) {
154
+ if (entityType === null)
155
+ return null;
156
+ return entityType.length <= REFUSAL_ENTITY_TYPE_MAX &&
157
+ OBJECT_NAMESPACE.test(entityType) &&
158
+ !isKernelNamespace(entityType)
159
+ ? entityType
160
+ : UNDECLARED_ENTITY_TYPE;
161
+ }
93
162
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AK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACzD,MAAM,CAAC,GAAI,GAA+B,CAAC,cAAc,CAAC,CAAC;IAC3D,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAE,CAA8C,CAAC,CAAC,CAAC,IAAI,CAAC;AACtG,CAAC;AAED,0FAA0F;AAC1F,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACnD,mDAAmD;AACnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAyB;IACzD,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,UAAU,CAAC,MAAM,IAAI,uBAAuB;QACjD,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC;QACjC,CAAC,iBAAiB,CAAC,UAAU,CAAC;QAC9B,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,sBAAsB,CAAC;AAC7B,CAAC"}
@@ -71,7 +71,6 @@ export declare const verticalServingState: z.ZodObject<{
71
71
  }, z.core.$strip>;
72
72
  export type VerticalServingState = z.infer<typeof verticalServingState>;
73
73
  export declare const registerVerticalInput: z.ZodObject<{
74
- slug: z.ZodString;
75
74
  name: z.ZodString;
76
75
  source: z.ZodEnum<{
77
76
  builtin: "builtin";
@@ -99,6 +98,7 @@ export declare const registerVerticalInput: z.ZodObject<{
99
98
  listed: z.ZodDefault<z.ZodBoolean>;
100
99
  provisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
101
100
  sendsEmail: z.ZodOptional<z.ZodBoolean>;
101
+ slug: z.ZodString;
102
102
  ownerTenant: z.ZodDefault<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "TenantId", "out">>>;
103
103
  }, z.core.$strip>;
104
104
  export type RegisterVerticalInput = z.input<typeof registerVerticalInput>;
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AAC;AAEtD,eAAO,MAAM,eAAe;;;;;;;;iBAe1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAS9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;;;iBAUnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;kBAAgE,CAAC;AACjG,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
package/dist/registry.js CHANGED
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { instant, permissionKey, tenantId, verticalSlug } from './ids.js';
3
3
  import { envVarSpec, capability } from './manifest.js';
4
4
  import { declaredSurface } from './routing.js';
5
+ import { platformScriptCollision, platformScriptRefusal } from './script-names.js';
5
6
  /**
6
7
  * The vertical + version registry (#31 step 1; D-33's milestone one).
7
8
  *
@@ -151,6 +152,16 @@ export const verticalServingState = z.object({
151
152
  export const registerVerticalInput = vertical
152
153
  .pick({ slug: true, name: true, source: true, envSpec: true, entitlements: true, ownerGrants: true, provides: true, requires: true, provisions: true, sendsEmail: true, surfaces: true, listed: true })
153
154
  .extend({
155
+ /**
156
+ * #1923: a slug that would deploy under one of the platform's own script names is refused
157
+ * here, at the claim, because its logs would be indistinguishable from that worker's.
158
+ * Refused on the INPUT only: a stored record is read back with the plain `vertical` schema.
159
+ */
160
+ slug: verticalSlug.superRefine((slug, ctx) => {
161
+ const collision = platformScriptCollision(slug);
162
+ if (collision)
163
+ ctx.addIssue({ code: 'custom', message: platformScriptRefusal(slug, collision) });
164
+ }),
154
165
  // Optional on input — a staff/platform push omits it (⇒ platform-owned).
155
166
  ownerTenant: tenantId.nullable().default(null),
156
167
  });
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;;;;GAUG;AAEH,yFAAyF;AACzF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAGhE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,YAAY,EAAE,iFAAiF;IACrG,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,MAAM,EAAE,cAAc;IACtB;;;;;OAKG;IACH,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;IAChC;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;IACvC;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IAC9C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;IACxC,QAAQ,EAAE,CAAC,CAAC,KAA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pC,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
package/dist/routing.d.ts CHANGED
@@ -165,6 +165,12 @@ export declare const bindHostnameInput: z.ZodObject<{
165
165
  canonical: z.ZodBoolean;
166
166
  }, z.core.$strip>;
167
167
  export type BindHostnameInput = z.infer<typeof bindHostnameInput>;
168
+ /**
169
+ * How many of a scope's own hostnames a route read carries (#2005). A scope has one per surface
170
+ * plus its custom domains, so this is far above any real one; past it, the hostnames beyond the
171
+ * cap (in name order) count as another scope's — a refused write, never an allowed one.
172
+ */
173
+ export declare const ROUTE_SCOPE_HOSTNAMES_MAX = 50;
168
174
  /**
169
175
  * What the router needs to dispatch. Deliberately smaller than the full binding: a
170
176
  * per-request hot path should read what it uses and nothing else.
@@ -180,6 +186,8 @@ export declare const routeTarget: z.ZodObject<{
180
186
  }>>;
181
187
  outboundHosts: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
182
188
  calls: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
189
+ primary: z.ZodDefault<z.ZodBoolean>;
190
+ hostnames: z.ZodDefault<z.ZodArray<z.ZodString>>;
183
191
  }, z.core.$strip>;
184
192
  export type RouteTarget = z.infer<typeof routeTarget>;
185
193
  //# sourceMappingURL=routing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,aAA4B,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,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C;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc;;GAA4B,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc;;;;;EAAuD,CAAC;AACnF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS;;;;;;;;iBAQpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,aAA2C,CAAC;AAEjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;iBAO5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;iBAgDtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
package/dist/routing.js CHANGED
@@ -156,6 +156,12 @@ export const bindHostnameInput = hostnameBinding.pick({
156
156
  region: true,
157
157
  canonical: true,
158
158
  });
159
+ /**
160
+ * How many of a scope's own hostnames a route read carries (#2005). A scope has one per surface
161
+ * plus its custom domains, so this is far above any real one; past it, the hostnames beyond the
162
+ * cap (in name order) count as another scope's — a refused write, never an allowed one.
163
+ */
164
+ export const ROUTE_SCOPE_HOSTNAMES_MAX = 50;
159
165
  /**
160
166
  * What the router needs to dispatch. Deliberately smaller than the full binding: a
161
167
  * per-request hot path should read what it uses and nothing else.
@@ -192,5 +198,21 @@ export const routeTarget = z.object({
192
198
  * this field still parses.
193
199
  */
194
200
  calls: z.array(verticalSlug).nullable().default(null),
201
+ /**
202
+ * Whether the scope is the real install (`isPrimaryScope`, #2005) — false for a fork, a
203
+ * snapshot or a preview of either kind. The router hands it to the egress worker, which
204
+ * refuses a non-primary scope's third-party subrequests: those scopes cause no outbound
205
+ * effects. Defaulted to `true` ONLY so a resolver that predates this field still parses —
206
+ * it fails open for that skew window, exactly as a pre-#303 `outboundHosts: null` does,
207
+ * and every resolver in this repo sets it.
208
+ */
209
+ primary: z.boolean().default(true),
210
+ /**
211
+ * Every active hostname of the resolved scope (#2005), bounded by the directory read — the
212
+ * addresses a non-primary scope may still WRITE to, its sibling surfaces included; to any
213
+ * other platform host it may only read. Defaulted to `[]` for a resolver that predates it,
214
+ * which is the conservative answer: only the hostname the request came in on counts as its own.
215
+ */
216
+ hostnames: z.array(z.string()).default([]),
195
217
  });
196
218
  //# sourceMappingURL=routing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"routing.js","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEpE;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH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;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,QAAQ;IACR,OAAO;IACP,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;IACrC;;;;;;OAMG;IACH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,cAAc;IACtB;;;;;;;OAOG;IACH,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3D;;;;;;;OAOG;IACH,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACrD;;;;;;;OAOG;IACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC;;;;;OAKG;IACH,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3C,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The Cloudflare script names the PLATFORM's own workers deploy under, and the rule that a
3
+ * vertical's scripts never take one (#1923).
4
+ *
5
+ * Workers Logs are account-wide and name a line's writer only by script (`$metadata.service`),
6
+ * and a dispatch-namespace script logs into the same store as a top-level worker. So a vertical
7
+ * whose script were named `substrat-router` would write lines a reader cannot tell from the
8
+ * router's. The field-coverage tally trusts the router's lines as provenance, so the names have
9
+ * to be the platform's alone: a slug that would deploy under one is refused when it is
10
+ * registered and again when it is deployed, from this one list.
11
+ *
12
+ * `test/script-names.test.ts` holds the list to every `apps/*` wrangler config and the shared
13
+ * issuer's, so a new platform worker cannot ship without its name being reserved here.
14
+ */
15
+ /** The router's scripts: the provenance a field-coverage report is joined to. */
16
+ export declare const ROUTER_SCRIPT_NAMES: readonly string[];
17
+ /** Every platform worker's script name, test environments included. */
18
+ export declare const PLATFORM_SCRIPT_NAMES: ReadonlySet<string>;
19
+ /**
20
+ * A vertical slug as a script-name stem: lowercased, anything outside `[a-z0-9_-]` (the `/` of
21
+ * `<tenant>/<name>`) flattened to `-`, and no leading or trailing `-`. The stable serving script
22
+ * is exactly this; a per-version script is this plus `-<ulid>`.
23
+ */
24
+ export declare function verticalScriptStem(slug: string): string;
25
+ /**
26
+ * The platform script name a vertical with this slug would deploy under, or `null`. Checks the
27
+ * stable script and its jurisdictional variants. A per-version script ends in a 26-character
28
+ * ULID, which no platform name does.
29
+ */
30
+ export declare function platformScriptCollision(slug: string): string | null;
31
+ /** The refusal a registration or a deploy gives for {@link platformScriptCollision}. */
32
+ export declare function platformScriptRefusal(slug: string, collision: string): string;
33
+ //# sourceMappingURL=script-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-names.d.ts","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAgD,CAAC;AAElG,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAapD,CAAC;AAKH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnE;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The Cloudflare script names the PLATFORM's own workers deploy under, and the rule that a
3
+ * vertical's scripts never take one (#1923).
4
+ *
5
+ * Workers Logs are account-wide and name a line's writer only by script (`$metadata.service`),
6
+ * and a dispatch-namespace script logs into the same store as a top-level worker. So a vertical
7
+ * whose script were named `substrat-router` would write lines a reader cannot tell from the
8
+ * router's. The field-coverage tally trusts the router's lines as provenance, so the names have
9
+ * to be the platform's alone: a slug that would deploy under one is refused when it is
10
+ * registered and again when it is deployed, from this one list.
11
+ *
12
+ * `test/script-names.test.ts` holds the list to every `apps/*` wrangler config and the shared
13
+ * issuer's, so a new platform worker cannot ship without its name being reserved here.
14
+ */
15
+ /** The router's scripts: the provenance a field-coverage report is joined to. */
16
+ export const ROUTER_SCRIPT_NAMES = ['substrat-router', 'substrat-router-test'];
17
+ /** Every platform worker's script name, test environments included. */
18
+ export const PLATFORM_SCRIPT_NAMES = new Set([
19
+ ...ROUTER_SCRIPT_NAMES,
20
+ 'substrat-auth-server',
21
+ 'substrat-builder',
22
+ 'substrat-control-plane',
23
+ 'substrat-control-plane-test',
24
+ 'substrat-dashboard',
25
+ 'substrat-dashboard-test',
26
+ 'substrat-docs',
27
+ 'substrat-social-relay',
28
+ 'substrat-social-relay-test',
29
+ 'substrat-vertical-egress',
30
+ 'substrat-vertical-egress-test',
31
+ ]);
32
+ /** The jurisdictional serving scripts a vertical's stem may grow (K-30): `<stem>-eu`, `<stem>-us`. */
33
+ const JURISDICTION_SUFFIXES = ['eu', 'us'];
34
+ /**
35
+ * A vertical slug as a script-name stem: lowercased, anything outside `[a-z0-9_-]` (the `/` of
36
+ * `<tenant>/<name>`) flattened to `-`, and no leading or trailing `-`. The stable serving script
37
+ * is exactly this; a per-version script is this plus `-<ulid>`.
38
+ */
39
+ export function verticalScriptStem(slug) {
40
+ return slug.toLowerCase().replace(/[^a-z0-9_-]+/g, '-').replace(/^-+|-+$/g, '');
41
+ }
42
+ /**
43
+ * The platform script name a vertical with this slug would deploy under, or `null`. Checks the
44
+ * stable script and its jurisdictional variants. A per-version script ends in a 26-character
45
+ * ULID, which no platform name does.
46
+ */
47
+ export function platformScriptCollision(slug) {
48
+ const stem = verticalScriptStem(slug);
49
+ for (const name of [stem, ...JURISDICTION_SUFFIXES.map((j) => `${stem}-${j}`)]) {
50
+ if (PLATFORM_SCRIPT_NAMES.has(name))
51
+ return name;
52
+ }
53
+ return null;
54
+ }
55
+ /** The refusal a registration or a deploy gives for {@link platformScriptCollision}. */
56
+ export function platformScriptRefusal(slug, collision) {
57
+ return `vertical slug '${slug}' would deploy under '${collision}', a script name the platform's own workers use`;
58
+ }
59
+ //# sourceMappingURL=script-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-names.js","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAsB,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;AAElG,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC;IAChE,GAAG,mBAAmB;IACtB,sBAAsB;IACtB,kBAAkB;IAClB,wBAAwB;IACxB,6BAA6B;IAC7B,oBAAoB;IACpB,yBAAyB;IACzB,eAAe;IACf,uBAAuB;IACvB,4BAA4B;IAC5B,0BAA0B;IAC1B,+BAA+B;CAChC,CAAC,CAAC;AAEH,sGAAsG;AACtG,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AAEpD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAClF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,MAAM,IAAI,GAAG,kBAAkB,CAAC,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