@substrat-run/contracts 0.216.0 → 0.218.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 (93) hide show
  1. package/dist/broker-relay.d.ts +67 -0
  2. package/dist/broker-relay.d.ts.map +1 -1
  3. package/dist/broker-relay.js +30 -0
  4. package/dist/broker-relay.js.map +1 -1
  5. package/dist/connect-intent.d.ts +75 -0
  6. package/dist/connect-intent.d.ts.map +1 -0
  7. package/dist/connect-intent.js +89 -0
  8. package/dist/connect-intent.js.map +1 -0
  9. package/dist/control-plane.d.ts +11 -1
  10. package/dist/control-plane.d.ts.map +1 -1
  11. package/dist/control-plane.js +8 -1
  12. package/dist/control-plane.js.map +1 -1
  13. package/dist/deploy.d.ts +199 -0
  14. package/dist/deploy.d.ts.map +1 -1
  15. package/dist/deploy.js +212 -0
  16. package/dist/deploy.js.map +1 -1
  17. package/dist/dev-node.d.ts +13 -0
  18. package/dist/dev-node.d.ts.map +1 -0
  19. package/dist/dev-node.js +13 -0
  20. package/dist/dev-node.js.map +1 -0
  21. package/dist/dev-recording.d.ts +109 -0
  22. package/dist/dev-recording.d.ts.map +1 -0
  23. package/dist/dev-recording.js +128 -0
  24. package/dist/dev-recording.js.map +1 -0
  25. package/dist/email-intent.d.ts +14 -0
  26. package/dist/email-intent.d.ts.map +1 -1
  27. package/dist/email-intent.js +28 -0
  28. package/dist/email-intent.js.map +1 -1
  29. package/dist/environments.d.ts +98 -0
  30. package/dist/environments.d.ts.map +1 -0
  31. package/dist/environments.js +80 -0
  32. package/dist/environments.js.map +1 -0
  33. package/dist/index.d.ts +9 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +9 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/manifest.d.ts +59 -0
  38. package/dist/manifest.d.ts.map +1 -1
  39. package/dist/manifest.js +43 -1
  40. package/dist/manifest.js.map +1 -1
  41. package/dist/mcp-image.d.ts +38 -0
  42. package/dist/mcp-image.d.ts.map +1 -0
  43. package/dist/mcp-image.js +31 -0
  44. package/dist/mcp-image.js.map +1 -0
  45. package/dist/operations.d.ts +43 -2
  46. package/dist/operations.d.ts.map +1 -1
  47. package/dist/operations.js +56 -1
  48. package/dist/operations.js.map +1 -1
  49. package/dist/outbox-mail.d.ts +35 -0
  50. package/dist/outbox-mail.d.ts.map +1 -0
  51. package/dist/outbox-mail.js +89 -0
  52. package/dist/outbox-mail.js.map +1 -0
  53. package/dist/platform-request.d.ts +17 -0
  54. package/dist/platform-request.d.ts.map +1 -1
  55. package/dist/platform-request.js +20 -0
  56. package/dist/platform-request.js.map +1 -1
  57. package/dist/registry-diff.d.ts +8 -0
  58. package/dist/registry-diff.d.ts.map +1 -1
  59. package/dist/registry-diff.js +24 -4
  60. package/dist/registry-diff.js.map +1 -1
  61. package/dist/registry.d.ts +46 -0
  62. package/dist/registry.d.ts.map +1 -1
  63. package/dist/registry.js +35 -0
  64. package/dist/registry.js.map +1 -1
  65. package/dist/scope-store-envelope.d.ts +57 -4
  66. package/dist/scope-store-envelope.d.ts.map +1 -1
  67. package/dist/scope-store-envelope.js +82 -15
  68. package/dist/scope-store-envelope.js.map +1 -1
  69. package/dist/scope-store-proof.d.ts +84 -0
  70. package/dist/scope-store-proof.d.ts.map +1 -0
  71. package/dist/scope-store-proof.js +103 -0
  72. package/dist/scope-store-proof.js.map +1 -0
  73. package/dist/scope-store-transport.d.ts +1 -0
  74. package/dist/scope-store-transport.d.ts.map +1 -1
  75. package/dist/scope-store-transport.js +8 -0
  76. package/dist/scope-store-transport.js.map +1 -1
  77. package/dist/scope-types.d.ts +159 -0
  78. package/dist/scope-types.d.ts.map +1 -0
  79. package/dist/scope-types.js +285 -0
  80. package/dist/scope-types.js.map +1 -0
  81. package/dist/tenancy.d.ts +1 -0
  82. package/dist/tenancy.d.ts.map +1 -1
  83. package/dist/tenancy.js +6 -0
  84. package/dist/tenancy.js.map +1 -1
  85. package/dist/vertical-connector.d.ts +84 -2
  86. package/dist/vertical-connector.d.ts.map +1 -1
  87. package/dist/vertical-connector.js +59 -2
  88. package/dist/vertical-connector.js.map +1 -1
  89. package/dist/vertical-events.d.ts +42 -0
  90. package/dist/vertical-events.d.ts.map +1 -1
  91. package/dist/vertical-events.js +8 -0
  92. package/dist/vertical-events.js.map +1 -1
  93. package/package.json +2 -2
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Scope types (#2993, K-64): a vertical declares the kinds of scope it has, each with its own
3
+ * modules, roles and stores, and which kinds may be children of which.
4
+ *
5
+ * A vertical that declares none has exactly one type, {@link HOME_SCOPE_TYPE}, holding every module,
6
+ * role and store it declares. That is what every vertical runs today, and {@link scopeTypesOf}
7
+ * resolves it, so a reader handles one shape whether or not the vertical declared types.
8
+ *
9
+ * The declaration lives on the vertical's declared permission surface (`definePermissions`), beside
10
+ * the modules and roles it partitions, so it is read by the same readers: `lint:permissions`,
11
+ * `substrat push` and the hosts. A type names modules, roles and stores the vertical already
12
+ * declares, by id. It adds no module, key or role of its own.
13
+ *
14
+ * This file is the declaration, its rules, and (#2993 part 4) the checkpoints made per type: the
15
+ * permission diff by type, the types a migration runs on, and the promote rule that keeps a type
16
+ * some scope holds. Which type a scope has and the modules a host runs on it are the kernel's
17
+ * (`scope-types.ts` there); the `provision-child` intent that writes a parent link is
18
+ * `platform-request.ts` (#2995). Store proofs (#2996) are not here.
19
+ */
20
+ /**
21
+ * The type every vertical has (D-75's home scope): what an install provisions, and the one type of
22
+ * a vertical that declares none. It has no parent, so no type may name it as a child.
23
+ */
24
+ export declare const HOME_SCOPE_TYPE = "home";
25
+ /** A type's name: a lowercase slug, short enough to sit in a directory column and a log line. */
26
+ export declare const SCOPE_TYPE_NAME: RegExp;
27
+ /**
28
+ * How a request may reach a scope of a type.
29
+ * - `direct`: routed to the scope itself, as every scope is reached today.
30
+ * - `parent`: through its parent's door (#2995): host code of the parent's app calls into the child,
31
+ * between two transactions, as the person it acts for. A scope with a parent whose type does not
32
+ * accept `direct` refuses every direct request.
33
+ */
34
+ export type ScopeTypeAccess = 'direct' | 'parent';
35
+ /** One scope type, as a vertical writes it. */
36
+ export interface ScopeTypeDeclaration {
37
+ /** The type's name, {@link SCOPE_TYPE_NAME}. One of them is {@link HOME_SCOPE_TYPE}. */
38
+ readonly name: string;
39
+ /** The ids of the modules a scope of this type runs: their tables, operations and keys. */
40
+ readonly modules: readonly string[];
41
+ /** The keys of the vertical's roles that exist on a scope of this type. Default: none. */
42
+ readonly roles?: readonly string[];
43
+ /** The scope-store bindings (`runtimeNeeds.scopeStores`) a scope of this type has. Default: none. */
44
+ readonly stores?: readonly string[];
45
+ /** The types a scope of this type may hold as children. Default: none. */
46
+ readonly children?: readonly string[];
47
+ /**
48
+ * How a request may reach it. Default: `['direct']` for the home type, `['parent']` for any other.
49
+ * The home type has no parent, so it cannot declare `parent`.
50
+ */
51
+ readonly accepts?: readonly ScopeTypeAccess[];
52
+ }
53
+ /** A type as every reader sees it: defaults applied, lists sorted, nothing optional. */
54
+ export interface ScopeType {
55
+ readonly name: string;
56
+ readonly modules: readonly string[];
57
+ readonly roles: readonly string[];
58
+ /**
59
+ * The scope-store bindings it has, or `null` for the implicit home type of a vertical that
60
+ * declares no types: that type has whatever stores `runtimeNeeds` declares, as every scope does
61
+ * today, and this surface does not see `runtimeNeeds`.
62
+ */
63
+ readonly stores: readonly string[] | null;
64
+ readonly children: readonly string[];
65
+ readonly accepts: readonly ScopeTypeAccess[];
66
+ /** True for the one type a vertical that declares none is given. */
67
+ readonly implicit: boolean;
68
+ }
69
+ /** What the resolver reads: the vertical's modules and roles, and its types if it declares any. */
70
+ export interface ScopeTypeSurface {
71
+ readonly modules: readonly {
72
+ manifest: {
73
+ id: string;
74
+ permissions?: readonly {
75
+ key: string;
76
+ }[];
77
+ };
78
+ }[];
79
+ readonly roles: readonly {
80
+ key: string;
81
+ permissions: readonly string[];
82
+ }[];
83
+ readonly scopeTypes?: readonly ScopeTypeDeclaration[];
84
+ }
85
+ /**
86
+ * The vertical's scope types, resolved: its own declaration with defaults applied, or the one
87
+ * implicit home type when it declares none. Throws on a declaration {@link scopeTypeOffences} finds
88
+ * fault with, so no reader acts on a surface that does not hold together.
89
+ */
90
+ export declare function scopeTypesOf(surface: ScopeTypeSurface): ScopeType[];
91
+ /** The resolved type of that name, or `undefined` when the vertical has none of that name. */
92
+ export declare function scopeTypeNamed(types: readonly ScopeType[], name: string): ScopeType | undefined;
93
+ /**
94
+ * Everything wrong with a vertical's declared scope types, one sentence each; `[]` when it holds
95
+ * together or declares none. The rules:
96
+ *
97
+ * - A declared list is not empty, and it has a {@link HOME_SCOPE_TYPE}: an install provisions one.
98
+ * - Names follow {@link SCOPE_TYPE_NAME} and are unique.
99
+ * - A type's modules, roles and children name what the vertical declares, each once.
100
+ * - Every module and every role is in at least one type. One in none never runs, or is never
101
+ * seated, while every reader of the surface still counts it.
102
+ * - A role holds only keys the modules of each type it is in declare. A key no module of the scope
103
+ * declares is a grant to nothing there.
104
+ * - No type names the home type as a child, and the home type does not accept `parent`: it has no
105
+ * parent. Every other type is a child of some type, or nothing could ever provision it.
106
+ * - A child type declares no children (#2995): children are one level deep.
107
+ * - A type is reached somehow: `accepts` is not empty, and names `direct` or `parent` only.
108
+ */
109
+ export declare function scopeTypeOffences(surface: ScopeTypeSurface): string[];
110
+ /** The offences as the one error a load or a lint prints. */
111
+ export declare function scopeTypeMessage(offences: readonly string[]): string;
112
+ /** A type as the registry carries it (#2993 part 4): every list present and sorted. */
113
+ export interface RegistryScopeTypeLike {
114
+ readonly name: string;
115
+ readonly modules: readonly string[];
116
+ readonly roles: readonly string[];
117
+ readonly stores: readonly string[];
118
+ readonly children: readonly string[];
119
+ readonly accepts: readonly string[];
120
+ }
121
+ /**
122
+ * One scope type that changed between two versions (#2993 part 4): the permission diff, made per
123
+ * type. Each list is what the type gained or lost. A version with no declared types has none to
124
+ * diff, so going from none to some lists every type as new, and the reverse every type as gone.
125
+ */
126
+ export interface ScopeTypeChange {
127
+ name: string;
128
+ isNew: boolean;
129
+ isGone: boolean;
130
+ addedModules: string[];
131
+ removedModules: string[];
132
+ addedRoles: string[];
133
+ removedRoles: string[];
134
+ addedStores: string[];
135
+ removedStores: string[];
136
+ addedChildren: string[];
137
+ removedChildren: string[];
138
+ addedAccepts: string[];
139
+ removedAccepts: string[];
140
+ }
141
+ /** Every declared type that moved going from `from` to `to`, by name. Both absent: `[]`. */
142
+ export declare function scopeTypeChanges(from: readonly RegistryScopeTypeLike[] | undefined, to: readonly RegistryScopeTypeLike[] | undefined): ScopeTypeChange[];
143
+ /** A type change as one sentence, for every reader of the diff to show as written. */
144
+ export declare function scopeTypeNote(c: ScopeTypeChange): string;
145
+ /**
146
+ * The declared types whose scopes run `moduleId` (#2993 part 4): the migration diff, made per type.
147
+ * `undefined` when the version declares no types, where every scope runs every module.
148
+ */
149
+ export declare function scopeTypesRunning(types: readonly Pick<RegistryScopeTypeLike, 'name' | 'modules'>[] | undefined, moduleId: string): string[] | undefined;
150
+ /**
151
+ * The promote check, made per type (#2993 part 4): of the types the vertical's scopes hold
152
+ * (`held`, from the directory), those `to` does not declare. A scope's type is fixed for its life,
153
+ * so a version that drops one would leave its scopes running nothing they were provisioned with.
154
+ * A version with no declared types has the one `home` type.
155
+ */
156
+ export declare function scopeTypesDropped(held: readonly string[], to: readonly Pick<RegistryScopeTypeLike, 'name'>[] | undefined): string[];
157
+ /** The refusal for a non-empty {@link scopeTypesDropped}. No acknowledgement passes it. */
158
+ export declare function scopeTypesDroppedRefusal(vertical: string, dropped: readonly string[]): string;
159
+ //# sourceMappingURL=scope-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-types.d.ts","sourceRoot":"","sources":["../src/scope-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,iGAAiG;AACjG,eAAO,MAAM,eAAe,QAA2B,CAAC;AAKxD;;;;;;GAMG;AACH,MAA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C;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAOD,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,qBAAqB,EAAE,GAAG,SAAS,EAClD,EAAE,EAAE,SAAS,qBAAqB,EAAE,GAAG,SAAS,GAC/C,eAAe,EAAE,CA0BnB;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAgBxD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,EAC7E,QAAQ,EAAE,MAAM,GACf,MAAM,EAAE,GAAG,SAAS,CAGtB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,SAAS,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS,GAC7D,MAAM,EAAE,CAGV;AAED,2FAA2F;AAC3F,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAO7F"}
@@ -0,0 +1,285 @@
1
+ /**
2
+ * Scope types (#2993, K-64): a vertical declares the kinds of scope it has, each with its own
3
+ * modules, roles and stores, and which kinds may be children of which.
4
+ *
5
+ * A vertical that declares none has exactly one type, {@link HOME_SCOPE_TYPE}, holding every module,
6
+ * role and store it declares. That is what every vertical runs today, and {@link scopeTypesOf}
7
+ * resolves it, so a reader handles one shape whether or not the vertical declared types.
8
+ *
9
+ * The declaration lives on the vertical's declared permission surface (`definePermissions`), beside
10
+ * the modules and roles it partitions, so it is read by the same readers: `lint:permissions`,
11
+ * `substrat push` and the hosts. A type names modules, roles and stores the vertical already
12
+ * declares, by id. It adds no module, key or role of its own.
13
+ *
14
+ * This file is the declaration, its rules, and (#2993 part 4) the checkpoints made per type: the
15
+ * permission diff by type, the types a migration runs on, and the promote rule that keeps a type
16
+ * some scope holds. Which type a scope has and the modules a host runs on it are the kernel's
17
+ * (`scope-types.ts` there); the `provision-child` intent that writes a parent link is
18
+ * `platform-request.ts` (#2995). Store proofs (#2996) are not here.
19
+ */
20
+ /**
21
+ * The type every vertical has (D-75's home scope): what an install provisions, and the one type of
22
+ * a vertical that declares none. It has no parent, so no type may name it as a child.
23
+ */
24
+ export const HOME_SCOPE_TYPE = 'home';
25
+ /** A type's name: a lowercase slug, short enough to sit in a directory column and a log line. */
26
+ export const SCOPE_TYPE_NAME = /^[a-z][a-z0-9-]{0,31}$/;
27
+ /** A scope-store binding, as `runtimeNeeds.scopeStores[].binding` spells it. */
28
+ const STORE_BINDING = /^[A-Z][A-Z0-9_]*$/;
29
+ const sorted = (values) => [...values].sort();
30
+ /**
31
+ * The vertical's scope types, resolved: its own declaration with defaults applied, or the one
32
+ * implicit home type when it declares none. Throws on a declaration {@link scopeTypeOffences} finds
33
+ * fault with, so no reader acts on a surface that does not hold together.
34
+ */
35
+ export function scopeTypesOf(surface) {
36
+ const declared = surface.scopeTypes;
37
+ if (declared === undefined) {
38
+ return [
39
+ {
40
+ name: HOME_SCOPE_TYPE,
41
+ modules: sorted(surface.modules.map((m) => m.manifest.id)),
42
+ roles: sorted(surface.roles.map((r) => r.key)),
43
+ stores: null,
44
+ children: [],
45
+ accepts: ['direct'],
46
+ implicit: true,
47
+ },
48
+ ];
49
+ }
50
+ const offences = scopeTypeOffences(surface);
51
+ if (offences.length)
52
+ throw new Error(scopeTypeMessage(offences));
53
+ return declared
54
+ .map((t) => ({
55
+ name: t.name,
56
+ modules: sorted(t.modules),
57
+ roles: sorted(t.roles ?? []),
58
+ stores: sorted(t.stores ?? []),
59
+ children: sorted(t.children ?? []),
60
+ accepts: sorted(t.accepts ?? (t.name === HOME_SCOPE_TYPE ? ['direct'] : ['parent'])),
61
+ implicit: false,
62
+ }))
63
+ .sort((a, b) => (a.name === HOME_SCOPE_TYPE ? -1 : b.name === HOME_SCOPE_TYPE ? 1 : a.name.localeCompare(b.name)));
64
+ }
65
+ /** The resolved type of that name, or `undefined` when the vertical has none of that name. */
66
+ export function scopeTypeNamed(types, name) {
67
+ return types.find((t) => t.name === name);
68
+ }
69
+ /**
70
+ * Everything wrong with a vertical's declared scope types, one sentence each; `[]` when it holds
71
+ * together or declares none. The rules:
72
+ *
73
+ * - A declared list is not empty, and it has a {@link HOME_SCOPE_TYPE}: an install provisions one.
74
+ * - Names follow {@link SCOPE_TYPE_NAME} and are unique.
75
+ * - A type's modules, roles and children name what the vertical declares, each once.
76
+ * - Every module and every role is in at least one type. One in none never runs, or is never
77
+ * seated, while every reader of the surface still counts it.
78
+ * - A role holds only keys the modules of each type it is in declare. A key no module of the scope
79
+ * declares is a grant to nothing there.
80
+ * - No type names the home type as a child, and the home type does not accept `parent`: it has no
81
+ * parent. Every other type is a child of some type, or nothing could ever provision it.
82
+ * - A child type declares no children (#2995): children are one level deep.
83
+ * - A type is reached somehow: `accepts` is not empty, and names `direct` or `parent` only.
84
+ */
85
+ export function scopeTypeOffences(surface) {
86
+ const declared = surface.scopeTypes;
87
+ if (declared === undefined)
88
+ return [];
89
+ const out = [];
90
+ if (declared.length === 0) {
91
+ out.push(`scopeTypes is empty. Leave it out for one '${HOME_SCOPE_TYPE}' type holding everything, or declare '${HOME_SCOPE_TYPE}' and the rest`);
92
+ return out;
93
+ }
94
+ const moduleKeys = new Map();
95
+ for (const m of surface.modules) {
96
+ moduleKeys.set(m.manifest.id, new Set((m.manifest.permissions ?? []).map((p) => p.key)));
97
+ }
98
+ const roles = new Map(surface.roles.map((r) => [r.key, r]));
99
+ const names = new Set();
100
+ for (const t of declared) {
101
+ if (!SCOPE_TYPE_NAME.test(t.name)) {
102
+ out.push(`scope type '${t.name}': a name is a lowercase slug of at most 32 characters (${SCOPE_TYPE_NAME.source})`);
103
+ }
104
+ if (names.has(t.name))
105
+ out.push(`scope type '${t.name}' is declared twice`);
106
+ names.add(t.name);
107
+ }
108
+ if (!names.has(HOME_SCOPE_TYPE)) {
109
+ out.push(`no scope type is named '${HOME_SCOPE_TYPE}': it is the type an install provisions, and every vertical has one`);
110
+ }
111
+ const inSomeType = { modules: new Set(), roles: new Set() };
112
+ const heldAsChild = new Set();
113
+ for (const t of declared) {
114
+ const where = `scope type '${t.name}'`;
115
+ const twice = (list, what) => {
116
+ const seen = new Set();
117
+ for (const v of list) {
118
+ if (seen.has(v))
119
+ out.push(`${where} lists ${what} '${v}' twice`);
120
+ seen.add(v);
121
+ }
122
+ };
123
+ twice(t.modules, 'module');
124
+ twice(t.roles ?? [], 'role');
125
+ twice(t.stores ?? [], 'store');
126
+ twice(t.children ?? [], 'child type');
127
+ if (t.modules.length === 0)
128
+ out.push(`${where} runs no module. A type is its modules, so declare at least one`);
129
+ const keys = new Set();
130
+ for (const id of t.modules) {
131
+ const own = moduleKeys.get(id);
132
+ if (!own) {
133
+ out.push(`${where} names module '${id}', which this vertical does not declare in modules`);
134
+ continue;
135
+ }
136
+ inSomeType.modules.add(id);
137
+ for (const k of own)
138
+ keys.add(k);
139
+ }
140
+ for (const key of t.roles ?? []) {
141
+ const role = roles.get(key);
142
+ if (!role) {
143
+ out.push(`${where} names role '${key}', which this vertical does not declare in roles`);
144
+ continue;
145
+ }
146
+ inSomeType.roles.add(key);
147
+ const foreign = role.permissions.filter((p) => !keys.has(p)).sort();
148
+ if (foreign.length) {
149
+ out.push(`${where} holds role '${key}', whose key${foreign.length > 1 ? 's' : ''} ${foreign.map((k) => `'${k}'`).join(', ')} ` +
150
+ `no module of this type declares. A role on a scope holds only keys that scope's modules declare`);
151
+ }
152
+ }
153
+ for (const store of t.stores ?? []) {
154
+ if (!STORE_BINDING.test(store)) {
155
+ out.push(`${where} names store '${store}': a store is named by its binding (${STORE_BINDING.source}), as runtimeNeeds.scopeStores declares it`);
156
+ }
157
+ }
158
+ for (const child of t.children ?? []) {
159
+ if (child === HOME_SCOPE_TYPE) {
160
+ out.push(`${where} names '${HOME_SCOPE_TYPE}' as a child. The home type has no parent`);
161
+ }
162
+ else if (!declared.some((d) => d.name === child)) {
163
+ out.push(`${where} names child type '${child}', which is not declared`);
164
+ }
165
+ else {
166
+ heldAsChild.add(child);
167
+ }
168
+ }
169
+ const accepts = t.accepts ?? (t.name === HOME_SCOPE_TYPE ? ['direct'] : ['parent']);
170
+ if (accepts.length === 0)
171
+ out.push(`${where} accepts nothing, so no request could reach it`);
172
+ for (const a of accepts) {
173
+ if (a !== 'direct' && a !== 'parent')
174
+ out.push(`${where} accepts '${String(a)}': a type accepts 'direct', 'parent' or both`);
175
+ }
176
+ if (t.name === HOME_SCOPE_TYPE && accepts.includes('parent')) {
177
+ out.push(`scope type '${HOME_SCOPE_TYPE}' accepts 'parent', but the home type has no parent`);
178
+ }
179
+ }
180
+ for (const t of declared) {
181
+ // #2995: one level. A child's own children would be a parent link two deep, which no host
182
+ // provisions, so a declaration that needs one is refused here rather than at the first intent.
183
+ if (heldAsChild.has(t.name) && (t.children ?? []).length > 0) {
184
+ out.push(`scope type '${t.name}' is a child type and declares children of its own. Children are one level deep: ` +
185
+ `name them as children of the type that holds '${t.name}'`);
186
+ }
187
+ if (t.name !== HOME_SCOPE_TYPE && names.has(t.name) && !heldAsChild.has(t.name)) {
188
+ out.push(`scope type '${t.name}' is no type's child, so nothing could provision it. Name it in a parent type's children`);
189
+ }
190
+ }
191
+ for (const m of surface.modules) {
192
+ if (!inSomeType.modules.has(m.manifest.id)) {
193
+ out.push(`module '${m.manifest.id}' is in no scope type, so no scope would run it. Name it in a type's modules, or drop it from modules`);
194
+ }
195
+ }
196
+ for (const r of surface.roles) {
197
+ if (!inSomeType.roles.has(r.key)) {
198
+ out.push(`role '${r.key}' is in no scope type, so no scope would hold it. Name it in a type's roles, or drop it from roles`);
199
+ }
200
+ }
201
+ return out;
202
+ }
203
+ /** The offences as the one error a load or a lint prints. */
204
+ export function scopeTypeMessage(offences) {
205
+ return `definePermissions: the declared scope types do not hold together (#2993):\n${offences.map((o) => ` - ${o}`).join('\n')}`;
206
+ }
207
+ const missingFrom = (from, to) => {
208
+ const had = new Set(from ?? []);
209
+ return (to ?? []).filter((v) => !had.has(v));
210
+ };
211
+ /** Every declared type that moved going from `from` to `to`, by name. Both absent: `[]`. */
212
+ export function scopeTypeChanges(from, to) {
213
+ const before = new Map((from ?? []).map((t) => [t.name, t]));
214
+ const after = new Map((to ?? []).map((t) => [t.name, t]));
215
+ const out = [];
216
+ for (const name of [...new Set([...before.keys(), ...after.keys()])].sort()) {
217
+ const b = before.get(name);
218
+ const a = after.get(name);
219
+ const change = {
220
+ name,
221
+ isNew: !b && !!a,
222
+ isGone: !!b && !a,
223
+ addedModules: missingFrom(b?.modules, a?.modules),
224
+ removedModules: missingFrom(a?.modules, b?.modules),
225
+ addedRoles: missingFrom(b?.roles, a?.roles),
226
+ removedRoles: missingFrom(a?.roles, b?.roles),
227
+ addedStores: missingFrom(b?.stores, a?.stores),
228
+ removedStores: missingFrom(a?.stores, b?.stores),
229
+ addedChildren: missingFrom(b?.children, a?.children),
230
+ removedChildren: missingFrom(a?.children, b?.children),
231
+ addedAccepts: missingFrom(b?.accepts, a?.accepts),
232
+ removedAccepts: missingFrom(a?.accepts, b?.accepts),
233
+ };
234
+ const moved = Object.entries(change).some(([k, v]) => k !== 'name' && (Array.isArray(v) ? v.length > 0 : v === true));
235
+ if (moved)
236
+ out.push(change);
237
+ }
238
+ return out;
239
+ }
240
+ /** A type change as one sentence, for every reader of the diff to show as written. */
241
+ export function scopeTypeNote(c) {
242
+ const list = (vs) => vs.join(', ');
243
+ if (c.isGone)
244
+ return `scope type '${c.name}' is no longer declared`;
245
+ const parts = [
246
+ ...(c.addedModules.length ? [`runs ${list(c.addedModules)}`] : []),
247
+ ...(c.removedModules.length ? [`no longer runs ${list(c.removedModules)}`] : []),
248
+ ...(c.addedRoles.length ? [`holds role${c.addedRoles.length > 1 ? 's' : ''} ${list(c.addedRoles)}`] : []),
249
+ ...(c.removedRoles.length ? [`no longer holds ${list(c.removedRoles)}`] : []),
250
+ ...(c.addedStores.length ? [`has store${c.addedStores.length > 1 ? 's' : ''} ${list(c.addedStores)}`] : []),
251
+ ...(c.removedStores.length ? [`no longer has ${list(c.removedStores)}`] : []),
252
+ ...(c.addedChildren.length ? [`may hold ${list(c.addedChildren)} as children`] : []),
253
+ ...(c.removedChildren.length ? [`may no longer hold ${list(c.removedChildren)}`] : []),
254
+ ...(c.addedAccepts.length ? [`is reached ${list(c.addedAccepts)}`] : []),
255
+ ...(c.removedAccepts.length ? [`is no longer reached ${list(c.removedAccepts)}`] : []),
256
+ ];
257
+ return `${c.isNew ? 'new scope type' : 'scope type'} '${c.name}': ${parts.join('; ')}`;
258
+ }
259
+ /**
260
+ * The declared types whose scopes run `moduleId` (#2993 part 4): the migration diff, made per type.
261
+ * `undefined` when the version declares no types, where every scope runs every module.
262
+ */
263
+ export function scopeTypesRunning(types, moduleId) {
264
+ if (types === undefined)
265
+ return undefined;
266
+ return types.filter((t) => t.modules.includes(moduleId)).map((t) => t.name);
267
+ }
268
+ /**
269
+ * The promote check, made per type (#2993 part 4): of the types the vertical's scopes hold
270
+ * (`held`, from the directory), those `to` does not declare. A scope's type is fixed for its life,
271
+ * so a version that drops one would leave its scopes running nothing they were provisioned with.
272
+ * A version with no declared types has the one `home` type.
273
+ */
274
+ export function scopeTypesDropped(held, to) {
275
+ const declared = new Set(to === undefined ? [HOME_SCOPE_TYPE] : to.map((t) => t.name));
276
+ return [...new Set(held)].filter((t) => !declared.has(t)).sort();
277
+ }
278
+ /** The refusal for a non-empty {@link scopeTypesDropped}. No acknowledgement passes it. */
279
+ export function scopeTypesDroppedRefusal(vertical, dropped) {
280
+ const names = dropped.map((t) => `'${t}'`).join(', ');
281
+ return (`this version of '${vertical}' does not declare scope type${dropped.length > 1 ? 's' : ''} ${names}, which ` +
282
+ `scopes of it hold. A scope's type is fixed when it is provisioned, so they would run none of their modules. ` +
283
+ 'Keep the type declared while any scope holds it');
284
+ }
285
+ //# sourceMappingURL=scope-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-types.js","sourceRoot":"","sources":["../src/scope-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAEtC,iGAAiG;AACjG,MAAM,CAAC,MAAM,eAAe,GAAG,wBAAwB,CAAC;AAExD,gFAAgF;AAChF,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAsD1C,MAAM,MAAM,GAAG,CAAC,MAAyB,EAAY,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAE3E;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,OAAyB;IACpD,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IACpC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO;YACL;gBACE,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBAC1D,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBAC9C,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,EAAE;gBACZ,OAAO,EAAE,CAAC,QAAQ,CAAC;gBACnB,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;IACJ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C,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,OAAO,CACL,oBAAoB,QAAQ,gCAAgC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,UAAU;QAC5G,8GAA8G;QAC9G,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
package/dist/tenancy.d.ts CHANGED
@@ -342,6 +342,7 @@ export declare const scope: z.ZodObject<{
342
342
  reaped: "reaped";
343
343
  suspended: "suspended";
344
344
  }>>>;
345
+ scopeType: z.ZodOptional<z.ZodString>;
345
346
  createdAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
346
347
  }, z.core.$strip>;
347
348
  export type Scope = z.infer<typeof scope>;
@@ -1 +1 @@
1
- {"version":3,"file":"tenancy.d.ts","sourceRoot":"","sources":["../src/tenancy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,YAAY;;;;;EAevB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,MAAM;;;;;;;;;;;;;iBAiBjB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAM5C,eAAO,MAAM,iBAAiB;;;;;iBAU1B,CAAC;AACL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG;;;;;;iBAMd,CAAC;AACH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;AAGtC,eAAO,MAAM,cAAc;;;;;iBAAiE,CAAC;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EAAiC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAUxD,eAAO,MAAM,yBAAyB;;EAAqB,CAAC;AAC5D,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC5E,eAAO,MAAM,gBAAgB;;;;;kBAAoC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;iBAS7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkHhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC"}
package/dist/tenancy.js CHANGED
@@ -335,6 +335,12 @@ export const scope = z.object({
335
335
  * host that predates it still produces a valid scope.
336
336
  */
337
337
  archivedFromStatus: scopeStatus.nullish(),
338
+ /**
339
+ * #2993: the declared scope type this scope was provisioned as (`scopeTypes` on the vertical's
340
+ * permission surface), fixed for its life. Absent for a `home` scope, which every scope of a
341
+ * vertical that declares no types is, so such a scope's record reads exactly as it did.
342
+ */
343
+ scopeType: z.string().min(1).optional(),
338
344
  createdAt: instant,
339
345
  });
340
346
  //# sourceMappingURL=tenancy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tenancy.js","sourceRoot":"","sources":["../src/tenancy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC;IACjC,QAAQ;IACR,WAAW;IACX,sFAAsF;IACtF,oFAAoF;IACpF,qFAAqF;IACrF,sFAAsF;IACtF,UAAU;IACV,uFAAuF;IACvF,mFAAmF;IACnF,qFAAqF;IACrF,mFAAmF;IACnF,uFAAuF;IACvF,4EAA4E;IAC5E,QAAQ;CACT,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,EAAE,EAAE,QAAQ;IACZ,IAAI;IACJ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,MAAM,EAAE,YAAY;IACpB,SAAS,EAAE,OAAO;IAClB,qFAAqF;IACrF,gFAAgF;IAChF,8EAA8E;IAC9E,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC9B,oFAAoF;IACpF,sFAAsF;IACtF,qFAAqF;IACrF,kFAAkF;IAClF,gFAAgF;IAChF,qFAAqF;IACrF,mBAAmB,EAAE,QAAQ,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAGH,sFAAsF;AACtF,sFAAsF;AACtF,qFAAqF;AACrF,4BAA4B;AAC5B,MAAM,CAAC,MA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