@substrat-run/contracts 0.217.0 → 0.219.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 (102) hide show
  1. package/dist/broker-dead-letters.d.ts +5 -1
  2. package/dist/broker-dead-letters.d.ts.map +1 -1
  3. package/dist/broker-dead-letters.js +20 -5
  4. package/dist/broker-dead-letters.js.map +1 -1
  5. package/dist/connections.d.ts +40 -0
  6. package/dist/connections.d.ts.map +1 -1
  7. package/dist/connections.js +33 -0
  8. package/dist/connections.js.map +1 -1
  9. package/dist/control-plane.d.ts +84 -1
  10. package/dist/control-plane.d.ts.map +1 -1
  11. package/dist/control-plane.js +75 -2
  12. package/dist/control-plane.js.map +1 -1
  13. package/dist/credential-binding.d.ts +63 -0
  14. package/dist/credential-binding.d.ts.map +1 -0
  15. package/dist/credential-binding.js +94 -0
  16. package/dist/credential-binding.js.map +1 -0
  17. package/dist/deploy.d.ts +205 -20
  18. package/dist/deploy.d.ts.map +1 -1
  19. package/dist/deploy.js +195 -27
  20. package/dist/deploy.js.map +1 -1
  21. package/dist/dev-node.d.ts +13 -0
  22. package/dist/dev-node.d.ts.map +1 -0
  23. package/dist/dev-node.js +13 -0
  24. package/dist/dev-node.js.map +1 -0
  25. package/dist/email-intent.d.ts +67 -2
  26. package/dist/email-intent.d.ts.map +1 -1
  27. package/dist/email-intent.js +12 -7
  28. package/dist/email-intent.js.map +1 -1
  29. package/dist/environments.d.ts +126 -3
  30. package/dist/environments.d.ts.map +1 -1
  31. package/dist/environments.js +85 -3
  32. package/dist/environments.js.map +1 -1
  33. package/dist/errors.d.ts +12 -0
  34. package/dist/errors.d.ts.map +1 -1
  35. package/dist/errors.js +15 -1
  36. package/dist/errors.js.map +1 -1
  37. package/dist/index.d.ts +6 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +6 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/kernel-events.d.ts.map +1 -1
  42. package/dist/kernel-events.js +7 -0
  43. package/dist/kernel-events.js.map +1 -1
  44. package/dist/manifest.d.ts +17 -0
  45. package/dist/manifest.d.ts.map +1 -1
  46. package/dist/manifest.js +21 -0
  47. package/dist/manifest.js.map +1 -1
  48. package/dist/operations.d.ts +16 -0
  49. package/dist/operations.d.ts.map +1 -1
  50. package/dist/operations.js +53 -12
  51. package/dist/operations.js.map +1 -1
  52. package/dist/outbound-host.d.ts +21 -0
  53. package/dist/outbound-host.d.ts.map +1 -0
  54. package/dist/outbound-host.js +28 -0
  55. package/dist/outbound-host.js.map +1 -0
  56. package/dist/outbox-mail.d.ts +35 -0
  57. package/dist/outbox-mail.d.ts.map +1 -0
  58. package/dist/outbox-mail.js +89 -0
  59. package/dist/outbox-mail.js.map +1 -0
  60. package/dist/people.d.ts +79 -0
  61. package/dist/people.d.ts.map +1 -1
  62. package/dist/people.js +90 -0
  63. package/dist/people.js.map +1 -1
  64. package/dist/platform-request.d.ts +18 -0
  65. package/dist/platform-request.d.ts.map +1 -1
  66. package/dist/platform-request.js +27 -0
  67. package/dist/platform-request.js.map +1 -1
  68. package/dist/registry-diff.d.ts +8 -0
  69. package/dist/registry-diff.d.ts.map +1 -1
  70. package/dist/registry-diff.js +24 -4
  71. package/dist/registry-diff.js.map +1 -1
  72. package/dist/registry.d.ts +24 -0
  73. package/dist/registry.d.ts.map +1 -1
  74. package/dist/relay-intents.d.ts +193 -0
  75. package/dist/relay-intents.d.ts.map +1 -0
  76. package/dist/relay-intents.js +125 -0
  77. package/dist/relay-intents.js.map +1 -0
  78. package/dist/scope-store-proof.d.ts +84 -0
  79. package/dist/scope-store-proof.d.ts.map +1 -0
  80. package/dist/scope-store-proof.js +103 -0
  81. package/dist/scope-store-proof.js.map +1 -0
  82. package/dist/scope-store-transport.d.ts +1 -0
  83. package/dist/scope-store-transport.d.ts.map +1 -1
  84. package/dist/scope-store-transport.js +8 -0
  85. package/dist/scope-store-transport.js.map +1 -1
  86. package/dist/scope-types.d.ts +56 -5
  87. package/dist/scope-types.d.ts.map +1 -1
  88. package/dist/scope-types.js +90 -3
  89. package/dist/scope-types.js.map +1 -1
  90. package/dist/tenancy.d.ts +1 -0
  91. package/dist/tenancy.d.ts.map +1 -1
  92. package/dist/tenancy.js +6 -0
  93. package/dist/tenancy.js.map +1 -1
  94. package/dist/trace.d.ts +211 -0
  95. package/dist/trace.d.ts.map +1 -0
  96. package/dist/trace.js +128 -0
  97. package/dist/trace.js.map +1 -0
  98. package/dist/vertical-connector.d.ts +42 -1
  99. package/dist/vertical-connector.d.ts.map +1 -1
  100. package/dist/vertical-connector.js +8 -1
  101. package/dist/vertical-connector.js.map +1 -1
  102. package/package.json +1 -1
package/dist/deploy.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { moduleId, permissionKey, scopeId, tenantId, verticalSlug } from './ids.js';
3
+ import { peopleDeclaration } from './people.js';
3
4
  import { envVarSpec, capability, lifecycleHold, declaredEntityType, freshnessSpec, manifestDelegation, permissionDeclaration, scheduleSpec, PLATFORM_BINDING_PREFIX } from './manifest.js';
4
5
  import { eventType } from './events.js';
5
6
  import { roleDefinition } from './permission.js';
@@ -13,11 +14,14 @@ import { SCOPE_STORE_CANARY, STORE_DRIVER_ID } from './script-names.js';
13
14
  import { bindingShapeBreaks, bindingShapeRefusal } from './registry-diff.js';
14
15
  import { connectionLandingBind, connectionLandingOptions } from './connection-landing.js';
15
16
  import { connectionProvider } from './connections.js';
17
+ import { outboundHost } from './outbound-host.js';
18
+ import { credentialBindingProblems } from './credential-binding.js';
16
19
  import { verticalConnectorDeclarations, verticalConnectorProvider } from './vertical-connector.js';
17
20
  import { issuerScopes } from './machine-client.js';
18
21
  import { MAX_DELEGATED_PERMISSIONS, delegationChannels } from './delegations.js';
19
22
  import { delegationOffenceLine, delegationOffences } from './delegation-surface.js';
20
- import { scopeTypeMessage, scopeTypeOffences } from './scope-types.js';
23
+ import { SCOPE_TYPE_NAME, scopeTypeMessage, scopeTypeOffences, scopeTypesDropped, scopeTypesDroppedRefusal, scopeTypesOf } from './scope-types.js';
24
+ import { storeOperationKeyMessage, storeOperationKeyOffences } from './scope-store-proof.js';
21
25
  import { ownerGrantSets, reservedKeyLine, reservedKeyOffences, reservedKeysOf, } from './reserved-keys.js';
22
26
  // The deploy manifest is the JSON part a `substrat push` sends alongside the
23
27
  // module files (self-serve-deploy.md). It lives here — not in the transport
@@ -761,6 +765,8 @@ export const PLATFORM_STORE_CODE = {
761
765
  undeclaredBinding: 'substrat.undeclared_binding',
762
766
  reservedOperation: 'substrat.reserved_operation',
763
767
  tooLarge: 'substrat.too_large',
768
+ // #2996 (K-64): a call that carries no proof an operation minted. Refused before anything is signed.
769
+ proofRequired: 'substrat.proof_required',
764
770
  };
765
771
  /** Whether `code` is reserved to the platform. See {@link PLATFORM_STORE_CODE}. */
766
772
  export function isPlatformStoreCode(code) {
@@ -1065,32 +1071,7 @@ export function assertDeclaredScopeStores(input) {
1065
1071
  if (input.vertical !== undefined)
1066
1072
  assertScopeStoresServeVertical(input.vertical, input.scopeStores ?? [], input.drivers);
1067
1073
  }
1068
- /**
1069
- * One declared outbound destination (#303, D-46): a lowercase hostname the vertical's
1070
- * worker may `fetch()` directly, or a `*.`-prefixed wildcard matching any subdomain depth
1071
- * (`*.googleapis.com` matches `oauth2.googleapis.com` and `a.b.googleapis.com`, never the
1072
- * apex `googleapis.com` — declare the apex separately if it is called). Hostname only:
1073
- * no scheme, no port, no path, no embedded wildcards. IDNs are declared in punycode,
1074
- * because that is the hostname the runtime sees.
1075
- */
1076
- export const outboundHost = z
1077
- .string()
1078
- .max(253)
1079
- .regex(/^(\*\.)?([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z]([a-z0-9-]*[a-z0-9])?$/, 'a lowercase hostname (api.example.com) or a *.-prefixed wildcard (*.example.com)');
1080
- /**
1081
- * Does a destination hostname match the vertical's declared outbound surface? One
1082
- * implementation for every seam that answers the question — the egress worker enforcing
1083
- * (apps/vertical-egress), the CLI predicting, a console rendering — so "allowed" cannot
1084
- * mean different things at different layers. Exact entries match exactly; `*.` entries
1085
- * match any subdomain depth but never the apex. Case-insensitive on the hostname side
1086
- * (DNS is), strict on the declared side (the schema only admits lowercase).
1087
- */
1088
- export function matchesOutboundHost(hostname, declared) {
1089
- const h = hostname.toLowerCase();
1090
- // `*.example.com` → suffix `.example.com`: the retained dot is the label boundary, so
1091
- // the apex and any `evil-example.com` lookalike never match.
1092
- return declared.some((d) => (d.startsWith('*.') ? h.endsWith(d.slice(1)) : h === d));
1093
- }
1074
+ export { outboundHost, matchesOutboundHost } from './outbound-host.js';
1094
1075
  /**
1095
1076
  * The variable `substrat dev` hands a vertical's dev process its declared outbound surface in
1096
1077
  * (#3379): package.json `substrat.outbound` as JSON, the list a push sends, `[]` when undeclared.
@@ -1275,6 +1256,22 @@ export function callsOfManifestJson(manifestJson) {
1275
1256
  return null;
1276
1257
  }
1277
1258
  }
1259
+ /**
1260
+ * Where a STORED manifest says the vertical takes its people from (K-63), or null: no manifest,
1261
+ * unparseable, no declaration, or one that does not parse. What the control plane reads to find a
1262
+ * master's dependents when the master erases a person.
1263
+ */
1264
+ export function peopleOfManifestJson(manifestJson) {
1265
+ if (!manifestJson)
1266
+ return null;
1267
+ try {
1268
+ const parsed = peopleDeclaration.safeParse(JSON.parse(manifestJson).people);
1269
+ return parsed.success ? parsed.data : null;
1270
+ }
1271
+ catch {
1272
+ return null;
1273
+ }
1274
+ }
1278
1275
  /**
1279
1276
  * The §4 sandbox allowlist: the binding types a hosted vertical may declare, because each
1280
1277
  * is one of its OWN resources and carries no reach into platform infrastructure. This is a
@@ -1630,6 +1627,25 @@ export const permissionRegistryDelegation = z.object({
1630
1627
  channels: delegationChannels.optional(),
1631
1628
  declaredBy: z.array(moduleId).min(1),
1632
1629
  });
1630
+ /** One scope store's keys in the registry (#2996): its binding, and each operation with its key, sorted. */
1631
+ export const permissionRegistryStore = z.object({
1632
+ binding: z.string().regex(/^[A-Z][A-Z0-9_]*$/),
1633
+ operations: z.array(z.object({ operation: storeOperationName, permission: permissionKey })),
1634
+ });
1635
+ /**
1636
+ * #2993 part 4: one declared scope type as the registry carries it, resolved by `scopeTypesOf`:
1637
+ * defaults applied and every list sorted, so the permission digest does not move with the order an
1638
+ * author wrote them in. The modules, roles and stores are named by id, binding and key, as the
1639
+ * declaration names them.
1640
+ */
1641
+ export const permissionRegistryScopeType = z.object({
1642
+ name: z.string().regex(SCOPE_TYPE_NAME),
1643
+ modules: z.array(z.string().min(1)).min(1),
1644
+ roles: z.array(z.string().min(1)),
1645
+ stores: z.array(z.string().regex(/^[A-Z][A-Z0-9_]*$/)),
1646
+ children: z.array(z.string().regex(SCOPE_TYPE_NAME)),
1647
+ accepts: z.array(z.enum(['direct', 'parent'])).min(1),
1648
+ });
1633
1649
  export const permissionRegistry = z.object({
1634
1650
  permissions: z.array(permissionRegistryEntry),
1635
1651
  roles: z.array(roleDefinition),
@@ -1650,6 +1666,15 @@ export const permissionRegistry = z.object({
1650
1666
  // vertical that delegates nothing keeps its digest. Absent therefore does NOT say "delegates to
1651
1667
  // nobody": whether a version's CLI knew the field is read off its `modules` (`delegationsOf`).
1652
1668
  delegations: z.array(permissionRegistryDelegation).optional(),
1669
+ // #2996 (K-64): the key each scope-store operation is called under. Optional and omitted when
1670
+ // none, likewise, so a vertical with no scope store keeps its digest; present, widening what a
1671
+ // store operation needs, or moving it to another key, cannot be promoted unacknowledged.
1672
+ stores: z.array(permissionRegistryStore).optional(),
1673
+ // #2993 part 4: the scope types the vertical declares, each with its modules, roles, stores and
1674
+ // children. Optional and omitted when it declares none, for the digest reason above: such a
1675
+ // vertical has the one implicit `home` type, and its digest does not move. Present, a type's
1676
+ // change moves the digest, so it cannot be promoted unacknowledged.
1677
+ scopeTypes: z.array(permissionRegistryScopeType).optional(),
1653
1678
  });
1654
1679
  /**
1655
1680
  * The registry as a PUSH carries it (#1869): an `entityGrants` shape naming a kernel namespace
@@ -1749,6 +1774,10 @@ export function pushedOwnerGrantProblems(manifest) {
1749
1774
  * declarations must agree with `registry.connectors`, the copy the permission digest covers, so a
1750
1775
  * grant cannot widen without the digest moving. A function beside {@link pushedOwnerGrantProblems},
1751
1776
  * not a refinement, for the same reason as that one.
1777
+ *
1778
+ * D-81: every secret field names the hosts its value may be sent to (`sentTo`), each one inside the
1779
+ * version's declared `outbound` ({@link credentialBindingProblems}). Judged here rather than in the
1780
+ * schema, so a version stored before the binding existed still parses.
1752
1781
  */
1753
1782
  export function pushedConnectorProblems(manifest) {
1754
1783
  const connectors = manifest.connectors ?? [];
@@ -1780,6 +1809,8 @@ export function pushedConnectorProblems(manifest) {
1780
1809
  problems.push(`connector ${c.provider} → ${key}: a standing grant the registry does not declare`);
1781
1810
  }
1782
1811
  }
1812
+ for (const c of connectors)
1813
+ problems.push(...credentialBindingProblems(c.provider, c.fields ?? [], manifest.outbound ?? []));
1783
1814
  return [
1784
1815
  ...problems,
1785
1816
  ...registryReservedKeyProblems({ permissions, roles: [], entityGrants: [] }, undefined, connectors.map((c) => ({ where: `connector ${c.provider}`, permissions: c.grants }))),
@@ -1925,6 +1956,10 @@ export function definePermissions(input) {
1925
1956
  const typeOffences = scopeTypeOffences(input);
1926
1957
  if (typeOffences.length)
1927
1958
  throw new Error(scopeTypeMessage(typeOffences));
1959
+ // #2996: every store operation's key is one a module declares.
1960
+ const storeOffences = storeOperationKeyOffences(input);
1961
+ if (storeOffences.length)
1962
+ throw new Error(`definePermissions: ${storeOperationKeyMessage(storeOffences)}`);
1928
1963
  return input;
1929
1964
  }
1930
1965
  /**
@@ -2049,6 +2084,18 @@ export function buildPermissionRegistry(input) {
2049
2084
  if (delegationProblems.length > 0)
2050
2085
  throw new Error(`buildPermissionRegistry: ${delegationProblems.join('; ')}`);
2051
2086
  const delegations = delegationRowsOf(input.modules);
2087
+ // #2996: every store key is one a module declares, as `definePermissions` holds at load.
2088
+ const storeProblems = storeOperationKeyOffences(input);
2089
+ if (storeProblems.length > 0)
2090
+ throw new Error(`buildPermissionRegistry: ${storeOperationKeyMessage(storeProblems)}`);
2091
+ const stores = [...(input.stores ?? [])]
2092
+ .sort((a, b) => cmp(a.binding, b.binding))
2093
+ .map((s) => ({
2094
+ binding: s.binding,
2095
+ operations: Object.entries(s.operations)
2096
+ .sort(([a], [b]) => cmp(a, b))
2097
+ .map(([operation, permission]) => ({ operation, permission: permissionKey.parse(permission) })),
2098
+ }));
2052
2099
  return {
2053
2100
  permissions,
2054
2101
  roles,
@@ -2058,8 +2105,122 @@ export function buildPermissionRegistry(input) {
2058
2105
  ...(connections.length ? { connections } : {}),
2059
2106
  // Omitted when none, so a vertical that delegates nothing keeps the digest it had.
2060
2107
  ...(delegations.length ? { delegations } : {}),
2108
+ // #2996: omitted when none, so a vertical with no scope store keeps the digest it had.
2109
+ ...(stores.length ? { stores } : {}),
2110
+ // #2993 part 4: omitted when the vertical declares no types, likewise.
2111
+ ...(input.scopeTypes !== undefined ? { scopeTypes: registryScopeTypesOf(input) } : {}),
2061
2112
  };
2062
2113
  }
2114
+ /**
2115
+ * #2993 part 4: a declared set of scope types as registry rows, resolved and sorted. Throws, as
2116
+ * `definePermissions` does, on a declaration that does not hold together.
2117
+ */
2118
+ function registryScopeTypesOf(input) {
2119
+ return scopeTypesOf(input).map((t) => ({
2120
+ name: t.name,
2121
+ modules: [...t.modules],
2122
+ roles: [...t.roles],
2123
+ stores: [...(t.stores ?? [])],
2124
+ children: [...t.children],
2125
+ accepts: [...t.accepts],
2126
+ }));
2127
+ }
2128
+ /**
2129
+ * #2993 part 4: a push's declared scope types against the rest of what it carries, one sentence
2130
+ * each; `[]` when it declares none. Called by `substrat push` before it uploads and by the control
2131
+ * plane's push routes beside {@link pushedPermissionRegistry}, as {@link pushedOwnerGrantProblems} is.
2132
+ *
2133
+ * - The types hold together by the rules `definePermissions` applies at load
2134
+ * ({@link scopeTypeOffences}), read against the modules the push carries and the registry's roles.
2135
+ * - The stores are checked per type against the scope stores the version declares
2136
+ * (`runtimeNeeds.scopeStores`): a type names only a declared store, and every declared store is
2137
+ * in some type, or no scope would have it. And the key each of a store's operations is called
2138
+ * under (#2996, `registry.stores`) is one the modules of every type holding it declare.
2139
+ */
2140
+ export function pushedScopeTypeProblems(manifest) {
2141
+ const types = manifest.registry?.scopeTypes;
2142
+ if (types === undefined)
2143
+ return [];
2144
+ const problems = [];
2145
+ if (manifest.modules !== undefined) {
2146
+ problems.push(...scopeTypeOffences({
2147
+ modules: manifest.modules.map((m) => ({ manifest: { id: m.id, permissions: m.permissions } })),
2148
+ roles: manifest.registry?.roles ?? [],
2149
+ scopeTypes: types,
2150
+ }));
2151
+ }
2152
+ else {
2153
+ problems.push('the registry declares scope types, but the manifest carries no modules to check them against');
2154
+ }
2155
+ const declared = new Set((manifest.scopeStores ?? []).map((s) => s.binding));
2156
+ const typed = new Set();
2157
+ for (const t of types) {
2158
+ for (const store of t.stores) {
2159
+ typed.add(store);
2160
+ if (!declared.has(store)) {
2161
+ problems.push(`scope type '${t.name}' names store '${store}', which runtimeNeeds.scopeStores does not declare`);
2162
+ }
2163
+ }
2164
+ }
2165
+ // #2996: a store's operations are called under keys (`registry.stores`), checked in the scope
2166
+ // that holds the store. So on each type, every such key is one its own modules declare: a key of
2167
+ // another type's module is a check no grant on that scope can satisfy.
2168
+ const keysOfModule = new Map((manifest.modules ?? []).map((m) => [m.id, m.permissions.map((p) => p.key)]));
2169
+ for (const t of types) {
2170
+ const keys = new Set(t.modules.flatMap((id) => keysOfModule.get(id) ?? []));
2171
+ for (const store of t.stores) {
2172
+ for (const op of manifest.registry?.stores?.find((r) => r.binding === store)?.operations ?? []) {
2173
+ if (!keys.has(op.permission)) {
2174
+ problems.push(`scope type '${t.name}' has store '${store}', whose operation '${op.operation}' is called under ${op.permission}, ` +
2175
+ 'which no module of this type declares');
2176
+ }
2177
+ }
2178
+ }
2179
+ }
2180
+ for (const store of [...declared].sort()) {
2181
+ if (!typed.has(store)) {
2182
+ problems.push(`scope store '${store}' is in no scope type, so no scope would have it. Name it in a type's stores, or drop it from runtimeNeeds.scopeStores`);
2183
+ }
2184
+ }
2185
+ return problems;
2186
+ }
2187
+ /**
2188
+ * #2993 part 4: the promote check, made per type. Refuses (`precondition_failed`) running
2189
+ * `incomingManifest` where scopes hold a type it does not declare (`held`, the directory's answer):
2190
+ * a scope's type is fixed for its life. No acknowledgement passes it, as none passes a stranded
2191
+ * binding. A manifest that declares no types has the one `home` type, so a vertical none of whose
2192
+ * scopes is typed (`held` empty) is never refused.
2193
+ */
2194
+ export function assertScopeTypesKept(vertical, held, incomingManifest) {
2195
+ if (held.length === 0)
2196
+ return;
2197
+ const dropped = scopeTypesDropped(held, scopeTypesOfManifestJson(incomingManifest));
2198
+ if (dropped.length > 0)
2199
+ throw substratError('precondition_failed', scopeTypesDroppedRefusal(vertical, dropped));
2200
+ }
2201
+ /**
2202
+ * #2993 part 4: the scope types a STORED manifest declares, as a host acts on them (a name, the
2203
+ * modules it runs, its roles, its child types and how it is reached, #2995), or `undefined` when it declares none, has no registry, or does
2204
+ * not parse. A module-less coordinator judges a provision of a vertical's scope against these.
2205
+ */
2206
+ export function scopeTypesOfManifestJson(manifestJson) {
2207
+ if (!manifestJson)
2208
+ return undefined;
2209
+ let raw;
2210
+ try {
2211
+ raw = JSON.parse(manifestJson);
2212
+ }
2213
+ catch {
2214
+ return undefined;
2215
+ }
2216
+ const rows = raw?.registry?.scopeTypes;
2217
+ if (rows === undefined)
2218
+ return undefined;
2219
+ const parsed = z.array(permissionRegistryScopeType).safeParse(rows);
2220
+ if (!parsed.success)
2221
+ return undefined;
2222
+ return parsed.data.map((t) => ({ name: t.name, modules: t.modules, roles: t.roles, children: t.children, accepts: t.accepts }));
2223
+ }
2063
2224
  /** What a delegation that names no channel admits (`channelsOf` in `delegations.ts`). */
2064
2225
  const DEFAULT_DELEGATION_CHANNELS = ['mcp'];
2065
2226
  /**
@@ -2510,6 +2671,13 @@ export const deployManifest = z.object({
2510
2671
  * permissions live and where the permission diff reviews them. `[]` = this vertical calls
2511
2672
  * no sibling. ABSENT = a version pushed before #1706: unenforced until the next push. */
2512
2673
  calls: z.array(verticalSlug).max(32).optional(),
2674
+ /** Where this vertical's people come from, when it takes them from another app of the tenant
2675
+ * (K-63) — package.json `substrat.people`: the master it asks, which `calls` must name, and
2676
+ * how long it keeps an answer, never above `PEOPLE_TTL_SECONDS` (300). A push declaring more
2677
+ * is refused here, in the CLI before upload and at the control plane alike. A push that
2678
+ * declares none OMITS the field, as `connectors` does. ABSENT = not a dependent, or a
2679
+ * pre-K-63 CLI. */
2680
+ people: peopleDeclaration.optional(),
2513
2681
  /** The vertical's DECLARED connectors (docs/architecture/vertical-connectors.md §5.1): the
2514
2682
  * static half of its `defineConnectors` entry — the credential form, the connection's standing
2515
2683
  * grants, the routed event types and which hooks it supplies. The platform resolves a