@cat-factory/contracts 0.209.0 → 0.210.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 (43) hide show
  1. package/dist/accountSettings.d.ts +68 -0
  2. package/dist/accountSettings.d.ts.map +1 -1
  3. package/dist/accountSettings.js +41 -0
  4. package/dist/accountSettings.js.map +1 -1
  5. package/dist/errors.d.ts.map +1 -1
  6. package/dist/errors.js +6 -5
  7. package/dist/errors.js.map +1 -1
  8. package/dist/foundational-services.d.ts +131 -45
  9. package/dist/foundational-services.d.ts.map +1 -1
  10. package/dist/foundational-services.js +133 -22
  11. package/dist/foundational-services.js.map +1 -1
  12. package/dist/github.d.ts +79 -0
  13. package/dist/github.d.ts.map +1 -1
  14. package/dist/github.js +54 -0
  15. package/dist/github.js.map +1 -1
  16. package/dist/provider-config.d.ts +3 -3
  17. package/dist/provider-config.d.ts.map +1 -1
  18. package/dist/provider-config.js +12 -0
  19. package/dist/provider-config.js.map +1 -1
  20. package/dist/routes/accounts.d.ts +3 -0
  21. package/dist/routes/accounts.d.ts.map +1 -1
  22. package/dist/routes/environments.d.ts +2 -2
  23. package/dist/routes/foundational-services.d.ts +14 -17
  24. package/dist/routes/foundational-services.d.ts.map +1 -1
  25. package/dist/routes/foundational-services.js +13 -10
  26. package/dist/routes/foundational-services.js.map +1 -1
  27. package/dist/routes/github.d.ts +49 -0
  28. package/dist/routes/github.d.ts.map +1 -1
  29. package/dist/routes/github.js +9 -1
  30. package/dist/routes/github.js.map +1 -1
  31. package/dist/routes/runners.d.ts +1 -1
  32. package/dist/routes/user-secret.d.ts +1 -1
  33. package/dist/routes/workspace-settings.d.ts +3 -0
  34. package/dist/routes/workspace-settings.d.ts.map +1 -1
  35. package/dist/routes/workspaces.d.ts +2 -0
  36. package/dist/routes/workspaces.d.ts.map +1 -1
  37. package/dist/snapshot.d.ts +1 -0
  38. package/dist/snapshot.d.ts.map +1 -1
  39. package/dist/workspace-settings.d.ts +20 -0
  40. package/dist/workspace-settings.d.ts.map +1 -1
  41. package/dist/workspace-settings.js +20 -0
  42. package/dist/workspace-settings.js.map +1 -1
  43. package/package.json +1 -1
@@ -76,12 +76,42 @@ export declare const accountSettingsConfigSchema: v.ObjectSchema<{
76
76
  readonly trustedProviders: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
77
77
  readonly region: v.OptionalSchema<v.PicklistSchema<["usa", "europe", "china", "other"], undefined>, undefined>;
78
78
  }, undefined>, undefined>;
79
+ /**
80
+ * Account-wide FLOOR under the per-workspace `allowInitiatorPat`. `false` forbids every
81
+ * workspace in the account from letting a run authenticate as its initiator's own personal
82
+ * access token; a workspace may then only stay off, never opt back in.
83
+ *
84
+ * ABSENT (the default, and what every existing account has) means the account expresses no
85
+ * opinion and each workspace decides for itself. That default is deliberate and not merely
86
+ * conservative: a personal token is the RIGHT credential for someone adopting cat-factory
87
+ * alone inside an org that has not adopted it, where there is no GitHub App installation to
88
+ * inherit and no account admin to ask. This setting exists for the opposite case — an
89
+ * operator who scoped an App installation for the whole account and needs that scoping to be
90
+ * the real bound rather than a suggestion a workspace admin can undo.
91
+ *
92
+ * The workspace switch is not redundant beneath it: the two answer different questions
93
+ * ("may anyone here?" vs "do we, on this board?"), and only the account tier is out of reach
94
+ * of a workspace admin. Effective = account permits AND workspace permits. See
95
+ * `backend/docs/security-model.md`.
96
+ */
97
+ readonly allowInitiatorPat: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
79
98
  }, undefined>;
80
99
  export type AccountSettingsConfig = v.InferOutput<typeof accountSettingsConfigSchema>;
81
100
  /** Built-in config used when an account has no row yet. */
82
101
  export declare const DEFAULT_ACCOUNT_SETTINGS_CONFIG: AccountSettingsConfig;
83
102
  /** Parse + fully-default a (possibly partial/legacy) stored config blob. */
84
103
  export declare function parseAccountSettingsConfig(raw: unknown): AccountSettingsConfig;
104
+ /**
105
+ * The stored `account_settings.config` TEXT column → a usable config, tolerating an absent row,
106
+ * an empty string and a malformed blob alike (all three mean "no opinion recorded").
107
+ *
108
+ * Shared rather than reimplemented per caller because the callers now sit on either side of a
109
+ * security boundary — `AccountSettingsService` (which also opens the secrets) and the two
110
+ * facades' `getConfigByAccount` (which deliberately never does) — and a config that parsed
111
+ * differently on the run path than in the settings panel would make an account's credential
112
+ * floor mean one thing to an operator reading it and another to the engine enforcing it.
113
+ */
114
+ export declare function parseStoredAccountSettingsConfig(raw: string | null | undefined): AccountSettingsConfig;
85
115
  /** Slack app OAuth credentials (the deployment's registered Slack app). */
86
116
  export declare const slackOAuthSecretSchema: v.ObjectSchema<{
87
117
  readonly clientId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
@@ -170,6 +200,25 @@ export declare const updateAccountSettingsSchema: v.ObjectSchema<{
170
200
  readonly trustedProviders: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
171
201
  readonly region: v.OptionalSchema<v.PicklistSchema<["usa", "europe", "china", "other"], undefined>, undefined>;
172
202
  }, undefined>, undefined>;
203
+ /**
204
+ * Account-wide FLOOR under the per-workspace `allowInitiatorPat`. `false` forbids every
205
+ * workspace in the account from letting a run authenticate as its initiator's own personal
206
+ * access token; a workspace may then only stay off, never opt back in.
207
+ *
208
+ * ABSENT (the default, and what every existing account has) means the account expresses no
209
+ * opinion and each workspace decides for itself. That default is deliberate and not merely
210
+ * conservative: a personal token is the RIGHT credential for someone adopting cat-factory
211
+ * alone inside an org that has not adopted it, where there is no GitHub App installation to
212
+ * inherit and no account admin to ask. This setting exists for the opposite case — an
213
+ * operator who scoped an App installation for the whole account and needs that scoping to be
214
+ * the real bound rather than a suggestion a workspace admin can undo.
215
+ *
216
+ * The workspace switch is not redundant beneath it: the two answer different questions
217
+ * ("may anyone here?" vs "do we, on this board?"), and only the account tier is out of reach
218
+ * of a workspace admin. Effective = account permits AND workspace permits. See
219
+ * `backend/docs/security-model.md`.
220
+ */
221
+ readonly allowInitiatorPat: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
173
222
  }, undefined>, undefined>;
174
223
  readonly secrets: v.OptionalSchema<v.ObjectSchema<{
175
224
  readonly slackOAuth: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
@@ -263,6 +312,25 @@ export declare const accountSettingsViewSchema: v.ObjectSchema<{
263
312
  readonly trustedProviders: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
264
313
  readonly region: v.OptionalSchema<v.PicklistSchema<["usa", "europe", "china", "other"], undefined>, undefined>;
265
314
  }, undefined>, undefined>;
315
+ /**
316
+ * Account-wide FLOOR under the per-workspace `allowInitiatorPat`. `false` forbids every
317
+ * workspace in the account from letting a run authenticate as its initiator's own personal
318
+ * access token; a workspace may then only stay off, never opt back in.
319
+ *
320
+ * ABSENT (the default, and what every existing account has) means the account expresses no
321
+ * opinion and each workspace decides for itself. That default is deliberate and not merely
322
+ * conservative: a personal token is the RIGHT credential for someone adopting cat-factory
323
+ * alone inside an org that has not adopted it, where there is no GitHub App installation to
324
+ * inherit and no account admin to ask. This setting exists for the opposite case — an
325
+ * operator who scoped an App installation for the whole account and needs that scoping to be
326
+ * the real bound rather than a suggestion a workspace admin can undo.
327
+ *
328
+ * The workspace switch is not redundant beneath it: the two answer different questions
329
+ * ("may anyone here?" vs "do we, on this board?"), and only the account tier is out of reach
330
+ * of a workspace admin. Effective = account permits AND workspace permits. See
331
+ * `backend/docs/security-model.md`.
332
+ */
333
+ readonly allowInitiatorPat: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
266
334
  }, undefined>;
267
335
  readonly summary: v.ObjectSchema<{
268
336
  readon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CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F,wGAAwG;AACxG,eAAO,MAAM,yBAAyB;;;;;;;;;;gBAnMpC,8CAA8C;;gBAE9C,gFAAgF;;gBAEhF,yEAAyE;;;;QA0BzE;;;;WAIG;;;;;;;QAEH;;;;;;;;;;;;;;;;;WAiBG;;;;;;;;YA8GH,0FAA0F;;YAE1F,0EAA0E;;YAE1E,qFAAqF;;YAErF,kFAAkF;;;;;;;;aA8BlF,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,mFAAmF;AACnF,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,sBAAsB,EAC/B,MAAM,CAAC,EAAE,qBAAqB,GAC7B,sBAAsB,CAkBxB"}
@@ -51,6 +51,25 @@ export const accountSettingsConfigSchema = v.object({
51
51
  * (Cloudflare / remote Node / mothership — never plain local mode).
52
52
  */
53
53
  modelPolicy: v.optional(modelFamilyPolicySchema),
54
+ /**
55
+ * Account-wide FLOOR under the per-workspace `allowInitiatorPat`. `false` forbids every
56
+ * workspace in the account from letting a run authenticate as its initiator's own personal
57
+ * access token; a workspace may then only stay off, never opt back in.
58
+ *
59
+ * ABSENT (the default, and what every existing account has) means the account expresses no
60
+ * opinion and each workspace decides for itself. That default is deliberate and not merely
61
+ * conservative: a personal token is the RIGHT credential for someone adopting cat-factory
62
+ * alone inside an org that has not adopted it, where there is no GitHub App installation to
63
+ * inherit and no account admin to ask. This setting exists for the opposite case — an
64
+ * operator who scoped an App installation for the whole account and needs that scoping to be
65
+ * the real bound rather than a suggestion a workspace admin can undo.
66
+ *
67
+ * The workspace switch is not redundant beneath it: the two answer different questions
68
+ * ("may anyone here?" vs "do we, on this board?"), and only the account tier is out of reach
69
+ * of a workspace admin. Effective = account permits AND workspace permits. See
70
+ * `backend/docs/security-model.md`.
71
+ */
72
+ allowInitiatorPat: v.optional(v.boolean()),
54
73
  });
55
74
  /** Built-in config used when an account has no row yet. */
56
75
  export const DEFAULT_ACCOUNT_SETTINGS_CONFIG = v.parse(accountSettingsConfigSchema, {});
@@ -58,6 +77,28 @@ export const DEFAULT_ACCOUNT_SETTINGS_CONFIG = v.parse(accountSettingsConfigSche
58
77
  export function parseAccountSettingsConfig(raw) {
59
78
  return v.parse(accountSettingsConfigSchema, raw);
60
79
  }
80
+ /**
81
+ * The stored `account_settings.config` TEXT column → a usable config, tolerating an absent row,
82
+ * an empty string and a malformed blob alike (all three mean "no opinion recorded").
83
+ *
84
+ * Shared rather than reimplemented per caller because the callers now sit on either side of a
85
+ * security boundary — `AccountSettingsService` (which also opens the secrets) and the two
86
+ * facades' `getConfigByAccount` (which deliberately never does) — and a config that parsed
87
+ * differently on the run path than in the settings panel would make an account's credential
88
+ * floor mean one thing to an operator reading it and another to the engine enforcing it.
89
+ */
90
+ export function parseStoredAccountSettingsConfig(raw) {
91
+ if (!raw)
92
+ return DEFAULT_ACCOUNT_SETTINGS_CONFIG;
93
+ try {
94
+ return parseAccountSettingsConfig(JSON.parse(raw));
95
+ }
96
+ catch {
97
+ // A blob we cannot read is not a policy: fall back to the built-in defaults, exactly as an
98
+ // absent row does. (Never a REFUSAL — an unparseable row must not silently forbid a feature.)
99
+ return DEFAULT_ACCOUNT_SETTINGS_CONFIG;
100
+ }
101
+ }
61
102
  // ---- Write-only secrets ----------------------------------------------------
62
103
  /** Slack app OAuth credentials (the deployment's registered Slack app). */
63
104
  export const slackOAuthSecretSchema = v.object({
@@ -1 +1 @@
1
- {"version":3,"file":"accountSettings.js","sourceRoot":"","sources":["../src/accountSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,8EAA8E;AAC9E,mFAAmF;AACnF,wFAAwF;AACxF,oFAAoF;AACpF,sFAAsF;AACtF,yFAAyF;AACzF,uFAAuF;AACvF,8EAA8E;AAE9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,CAC5B,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,YAAI,qBAAqB,EAAE,yBAAyB,CAAU,CAAA;AAEhG,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA"}
package/dist/errors.js CHANGED
@@ -140,11 +140,12 @@ export const CONFLICT_REASONS = [
140
140
  // (A step MISSING its selection entirely is a structural pipeline fault, refused as a 422 at
141
141
  // save and start by `assertValidBinaryOutputSteps` — the skill-step precedent.)
142
142
  'binary_output_service_invalid',
143
- // A board asked to SUPPRESS a foundational service that it already owns a row for at its own
144
- // tier. Suppression writes a workspace tombstone so an INHERITED account service loses the
145
- // merge; against the board's own registration it would be an obscure spelling of "delete",
146
- // and the two are not interchangeable a delete drops the board's authored description and
147
- // contracts, a suppression drops nothing. The SPA steers to the delete action instead.
143
+ // A tier asked to SUPPRESS a foundational service that it already owns a row for at its own
144
+ // tier. Suppression writes a tombstone so the INHERITED service of that id (an account
145
+ // service for a board, a deployment `builtin` for either) loses the merge; against the
146
+ // tier's own registration it would be an obscure spelling of "delete", and the two are not
147
+ // interchangeable a delete drops the authored description and contracts, a suppression
148
+ // drops nothing. The SPA steers to the delete action instead.
148
149
  'foundational_service_not_inherited',
149
150
  ];
150
151
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAE1F;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,WAAW;IACX,YAAY;IACZ,UAAU;IACV,qBAAqB;IACrB,WAAW;IACX,aAAa;IACb,cAAc;IACd,cAAc;CACN,CAAA;AAIV;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,kBAAkB,EA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FAAwF;IACxF,0FAA0F;IAC1F,6FAA6F;IAC7F,gFAAgF;IAChF,+BAA+B;IAC/B,4FAA4F;IAC5F,uFAAuF;IACvF,uFAAuF;IACvF,2FAA2F;IAC3F,yFAAyF;IACzF,8DAA8D;IAC9D,oCAAoC;CAC5B,CAAA;AAIV;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,qBAAqB,EAAE,yBAAyB,CAAU,CAAA"}
@@ -2,17 +2,77 @@ import * as v from 'valibot';
2
2
  /** Which scope owns a foundational service / source: an account, or a workspace. */
3
3
  export declare const foundationalServiceOwnerKindSchema: v.PicklistSchema<["account", "workspace"], undefined>;
4
4
  export type FoundationalServiceOwnerKind = v.InferOutput<typeof foundationalServiceOwnerKindSchema>;
5
- /** The tier a resolved catalog entry originated from, lowest-precedence first. */
6
- export declare const foundationalServiceTierSchema: v.PicklistSchema<["account", "workspace"], undefined>;
5
+ /**
6
+ * The tier a resolved catalog entry originated from, lowest-precedence first.
7
+ *
8
+ * `builtin` is the DEPLOYMENT's own tier: services a deployment registers in code on the
9
+ * app-owned `FoundationalServiceRegistry`, exactly as it registers pipelines or task types.
10
+ * It carries no rows, so it is present from a workspace's first request and cannot drift from
11
+ * the definitions; an account or workspace row of the same id still wins over it, and a
12
+ * tombstone at either tier suppresses it.
13
+ */
14
+ export declare const foundationalServiceTierSchema: v.PicklistSchema<["builtin", "account", "workspace"], undefined>;
7
15
  export type FoundationalServiceTier = v.InferOutput<typeof foundationalServiceTierSchema>;
8
16
  /**
9
- * The API-contract document formats the catalog accepts. Each is stored verbatim as text;
10
- * only OpenAPI is additionally PARSED (into an operation index the lazy read renders as a
11
- * compact summary) because the other two are TypeScript modules, which cannot be evaluated
12
- * in a Worker isolate and are handed to the agent as source.
17
+ * The API-contract document formats the catalog accepts. Each is stored verbatim as text and
18
+ * additionally INDEXED into operation names where the format allows it see
19
+ * {@link operationsAreIndexable}, which is the one place that judgement lives.
13
20
  */
14
21
  export declare const apiContractFormatSchema: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
15
22
  export type ApiContractFormat = v.InferOutput<typeof apiContractFormatSchema>;
23
+ /**
24
+ * Whether an operation index can be derived from a document of this format at all.
25
+ *
26
+ * This is what keeps "this interface declares no operations" apart from "this platform does not
27
+ * read this format": both render as an empty `operations` list, they need opposite reactions
28
+ * from whoever reads the catalog, and collapsing them tells an Architect that a fully-specified
29
+ * service offers nothing. Every surface that renders an operation list branches on it — the
30
+ * agent-facing catalog and the SPA's manifest row alike — so the two cannot disagree.
31
+ *
32
+ * `lokalise-api-contract` is false because its route builders' shapes are not pinned down here
33
+ * and a partial guess at them would be reported as fact. Adding an extractor for it means
34
+ * flipping this and nothing else.
35
+ */
36
+ export declare function operationsAreIndexable(format: ApiContractFormat): boolean;
37
+ /**
38
+ * The capability tag a foundational service must carry to be selectable as a binary-output
39
+ * step's STORAGE target (enforced at run admission — see `docs/initiatives/
40
+ * binary-output-foundational-storage.md`).
41
+ *
42
+ * It lives here, on the wire, rather than in the kernel alone because the people who need to
43
+ * spell it right are OUTSIDE the backend: a deployment registering its estate, and the SPA
44
+ * rendering the picker. A client that cannot import the vocabulary re-declares it, and the
45
+ * failure of a re-declaration is silent — `asset_storage` registers cleanly and surfaces much
46
+ * later as a refused run.
47
+ */
48
+ export declare const ASSET_STORAGE_CAPABILITY = "asset-storage";
49
+ /**
50
+ * The CONVENTIONAL tag for a service that can scope a generation — an inventory answering
51
+ * "what entities exist, which lack an asset, how is each described". Deliberately NOT enforced
52
+ * (any service with a readable contract can inform scope), but still reserved: a picker orders
53
+ * by it, so a typo silently loses the ordering rather than failing.
54
+ */
55
+ export declare const GENERATION_CONTEXT_CAPABILITY = "generation-context";
56
+ /**
57
+ * Capability tags the PLATFORM assigns meaning to. Everything else is free-form org taxonomy
58
+ * and stays that way — this list is not a closed vocabulary, it is the set of spellings a
59
+ * registrant must not miss by a character.
60
+ */
61
+ export declare const RESERVED_CAPABILITY_TAGS: readonly string[];
62
+ /**
63
+ * The reserved tag `tag` was plainly TRYING to be, when it is not that tag exactly — else null.
64
+ *
65
+ * Capability tags are free-form strings, which is right (an org's taxonomy is its own) and is
66
+ * also why `asset_storage` / `Asset-Storage` / `assetstorage` register without complaint and
67
+ * fail a run hours later as `not_storage_capable`. Comparing on a form with separators and case
68
+ * removed catches exactly the near-misses and nothing else: a genuinely different tag does not
69
+ * collide with a reserved one under it.
70
+ *
71
+ * The caller REFUSES on a hit rather than silently canonicalising, because a registrant who
72
+ * meant a tag of their own under a colliding spelling must learn that the platform reads it as
73
+ * reserved, and a quiet rewrite of someone's taxonomy is its own surprise.
74
+ */
75
+ export declare function reservedCapabilityNearMiss(tag: string): string | null;
16
76
  /**
17
77
  * A contract as the CATALOG lists it — identity, format and SIZE, never the body. This is
18
78
  * what the Architect's catalog carries: enough to decide whether a service is relevant and
@@ -28,14 +88,19 @@ export declare const apiContractSummarySchema: v.ObjectSchema<{
28
88
  /** Repo provenance (`path`), or null when uploaded directly. */
29
89
  readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
30
90
  /**
31
- * The operations an OpenAPI document declares (`GET /files/{id}` …), capped. Empty for the
32
- * TypeScript formats, which are not parsed. Cheap enough to ride the catalog and it is what
33
- * makes the catalog actionable — an architect can name the endpoint it intends to call.
91
+ * The operations this document declares (`GET /files/{id}` …), capped. Cheap enough to ride
92
+ * the catalog and it is what makes the catalog actionable an architect can name the
93
+ * endpoint it intends to call.
94
+ *
95
+ * EMPTY means one of two different things and {@link operationsAreIndexable} is what tells
96
+ * them apart: this format is not read at all, or it is and this document declares nothing.
34
97
  */
35
98
  readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
36
99
  /**
37
- * How many operations were dropped from {@link operations} by the cap. Non-zero says the
38
- * list is a PREFIX, so a reader never concludes the tail does not exist.
100
+ * How many operations the document declares that {@link operations} does NOT list dropped
101
+ * by the cap, or (for a contract MODULE) declared in a shape the static extractor could not
102
+ * read. Non-zero says the list is incomplete, so a reader never concludes the rest does not
103
+ * exist.
39
104
  */
40
105
  readonly omittedOperations: v.NumberSchema<undefined>;
41
106
  }, undefined>;
@@ -50,14 +115,19 @@ export declare const apiContractDocumentSchema: v.ObjectSchema<{
50
115
  /** Repo provenance (`path`), or null when uploaded directly. */
51
116
  readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
52
117
  /**
53
- * The operations an OpenAPI document declares (`GET /files/{id}` …), capped. Empty for the
54
- * TypeScript formats, which are not parsed. Cheap enough to ride the catalog and it is what
55
- * makes the catalog actionable — an architect can name the endpoint it intends to call.
118
+ * The operations this document declares (`GET /files/{id}` …), capped. Cheap enough to ride
119
+ * the catalog and it is what makes the catalog actionable an architect can name the
120
+ * endpoint it intends to call.
121
+ *
122
+ * EMPTY means one of two different things and {@link operationsAreIndexable} is what tells
123
+ * them apart: this format is not read at all, or it is and this document declares nothing.
56
124
  */
57
125
  readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
58
126
  /**
59
- * How many operations were dropped from {@link operations} by the cap. Non-zero says the
60
- * list is a PREFIX, so a reader never concludes the tail does not exist.
127
+ * How many operations the document declares that {@link operations} does NOT list dropped
128
+ * by the cap, or (for a contract MODULE) declared in a shape the static extractor could not
129
+ * read. Non-zero says the list is incomplete, so a reader never concludes the rest does not
130
+ * exist.
61
131
  */
62
132
  readonly omittedOperations: v.NumberSchema<undefined>;
63
133
  /** The document verbatim (OpenAPI JSON/YAML, or the contract module's TypeScript source). */
@@ -86,14 +156,19 @@ export declare const foundationalServiceSchema: v.ObjectSchema<{
86
156
  /** Repo provenance (`path`), or null when uploaded directly. */
87
157
  readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
88
158
  /**
89
- * The operations an OpenAPI document declares (`GET /files/{id}` …), capped. Empty for the
90
- * TypeScript formats, which are not parsed. Cheap enough to ride the catalog and it is what
91
- * makes the catalog actionable — an architect can name the endpoint it intends to call.
159
+ * The operations this document declares (`GET /files/{id}` …), capped. Cheap enough to ride
160
+ * the catalog and it is what makes the catalog actionable an architect can name the
161
+ * endpoint it intends to call.
162
+ *
163
+ * EMPTY means one of two different things and {@link operationsAreIndexable} is what tells
164
+ * them apart: this format is not read at all, or it is and this document declares nothing.
92
165
  */
93
166
  readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
94
167
  /**
95
- * How many operations were dropped from {@link operations} by the cap. Non-zero says the
96
- * list is a PREFIX, so a reader never concludes the tail does not exist.
168
+ * How many operations the document declares that {@link operations} does NOT list dropped
169
+ * by the cap, or (for a contract MODULE) declared in a shape the static extractor could not
170
+ * read. Non-zero says the list is incomplete, so a reader never concludes the rest does not
171
+ * exist.
97
172
  */
98
173
  readonly omittedOperations: v.NumberSchema<undefined>;
99
174
  }, undefined>, undefined>;
@@ -106,19 +181,21 @@ export declare const foundationalServiceSchema: v.ObjectSchema<{
106
181
  readonly updatedAt: v.NumberSchema<undefined>;
107
182
  }, undefined>;
108
183
  export type FoundationalService = v.InferOutput<typeof foundationalServiceSchema>;
109
- /** A resolved (account ⊕ workspace merged) catalog entry, carrying its winning tier. */
184
+ /**
185
+ * A resolved (builtin ⊕ account ⊕ workspace merged) catalog entry, carrying its winning tier.
186
+ *
187
+ * Deliberately NARROWER than {@link foundationalServiceSchema}: the merged read carries only
188
+ * what every tier can honestly fill. A `builtin` entry is registered in code, so it has no
189
+ * owning scope, no repo provenance and no row timestamps — and the alternative to dropping
190
+ * those fields is filling them with placeholders that read as facts. They remain on the
191
+ * per-tier management read, which is where a stored row's provenance belongs.
192
+ */
110
193
  export declare const resolvedFoundationalServiceSchema: v.ObjectSchema<{
111
- /** Stable slug the Architect names in its design (e.g. `file-storage`). */
112
194
  readonly id: v.StringSchema<undefined>;
113
- readonly ownerKind: v.PicklistSchema<["account", "workspace"], undefined>;
114
195
  readonly name: v.StringSchema<undefined>;
115
- /** One line; the catalog's relevance signal. */
116
196
  readonly summary: v.StringSchema<undefined>;
117
- /** The general description — what it does, when to use it, what it does NOT cover. */
118
197
  readonly description: v.StringSchema<undefined>;
119
- /** Free-form capability tags (`file-storage`, `notifications`, `audit`). */
120
198
  readonly capabilities: v.ArraySchema<v.StringSchema<undefined>, undefined>;
121
- /** Contract manifest — never bodies (see {@link apiContractSummarySchema}). */
122
199
  readonly contracts: v.ArraySchema<v.ObjectSchema<{
123
200
  readonly contractId: v.StringSchema<undefined>;
124
201
  readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
@@ -128,38 +205,37 @@ export declare const resolvedFoundationalServiceSchema: v.ObjectSchema<{
128
205
  /** Repo provenance (`path`), or null when uploaded directly. */
129
206
  readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
130
207
  /**
131
- * The operations an OpenAPI document declares (`GET /files/{id}` …), capped. Empty for the
132
- * TypeScript formats, which are not parsed. Cheap enough to ride the catalog and it is what
133
- * makes the catalog actionable — an architect can name the endpoint it intends to call.
208
+ * The operations this document declares (`GET /files/{id}` …), capped. Cheap enough to ride
209
+ * the catalog and it is what makes the catalog actionable an architect can name the
210
+ * endpoint it intends to call.
211
+ *
212
+ * EMPTY means one of two different things and {@link operationsAreIndexable} is what tells
213
+ * them apart: this format is not read at all, or it is and this document declares nothing.
134
214
  */
135
215
  readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
136
216
  /**
137
- * How many operations were dropped from {@link operations} by the cap. Non-zero says the
138
- * list is a PREFIX, so a reader never concludes the tail does not exist.
217
+ * How many operations the document declares that {@link operations} does NOT list dropped
218
+ * by the cap, or (for a contract MODULE) declared in a shape the static extractor could not
219
+ * read. Non-zero says the list is incomplete, so a reader never concludes the rest does not
220
+ * exist.
139
221
  */
140
222
  readonly omittedOperations: v.NumberSchema<undefined>;
141
223
  }, undefined>, undefined>;
142
- /** Provenance when repo-sourced: the source that produced this row. */
143
- readonly sourceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
144
- readonly sourcePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
145
- /** Head commit the service's directory was pinned to at the last sync. */
146
- readonly pinnedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
147
- readonly createdAt: v.NumberSchema<undefined>;
148
- readonly updatedAt: v.NumberSchema<undefined>;
149
- readonly tier: v.PicklistSchema<["account", "workspace"], undefined>;
224
+ readonly tier: v.PicklistSchema<["builtin", "account", "workspace"], undefined>;
150
225
  }, undefined>;
151
226
  export type ResolvedFoundationalService = v.InferOutput<typeof resolvedFoundationalServiceSchema>;
152
227
  /**
153
- * One SUPPRESSION a board is asserting: an id its workspace tier tombstones, so the account
154
- * service of that id loses the merge.
228
+ * One SUPPRESSION a tier is asserting: an id it tombstones, so the service it inherits under
229
+ * that id a `builtin` the deployment registered, or (for a board) an account service — loses
230
+ * the merge.
155
231
  *
156
232
  * A suppressed id is by construction absent from the merged catalog, which is what makes this a
157
233
  * separate read rather than a flag on it — without it the management surface could offer no way
158
234
  * back, and suppression would be a one-way door.
159
235
  *
160
236
  * `inherited` is the honest half: `false` says the tombstone currently shadows NOTHING (the
161
- * account withdrew the service, or the board deleted its own registration), so a reader does not
162
- * conclude a capability is being withheld when there is none to withhold. The name is the
237
+ * tier below withdrew the service, or this tier deleted its own registration), so a reader does
238
+ * not conclude a capability is being withheld when there is none to withhold. The name is the
163
239
  * inherited service's when there is one and the tombstone's own otherwise, which is empty for a
164
240
  * suppression written against an id this tier never registered.
165
241
  */
@@ -195,6 +271,16 @@ export declare const createFoundationalServiceSchema: v.ObjectSchema<{
195
271
  }, undefined>, undefined>, undefined>;
196
272
  }, undefined>;
197
273
  export type CreateFoundationalServiceInput = v.InferOutput<typeof createFoundationalServiceSchema>;
274
+ /**
275
+ * The ways `definition` fails {@link createFoundationalServiceSchema}, as readable lines — empty
276
+ * when it would be accepted.
277
+ *
278
+ * Exists so a caller that cannot depend on valibot (the backend's kernel and orchestration
279
+ * layers) can still hold a deployment's CODE-registered service to the very schema the REST
280
+ * write boundary applies. Re-stating those rules in a second place is how a code-registered
281
+ * definition ends up accepted where an uploaded one is refused.
282
+ */
283
+ export declare function foundationalServiceDefinitionIssues(definition: unknown): string[];
198
284
  /**
199
285
  * Patch a registered service. `contracts`, when present, REPLACES the whole uploaded set —
200
286
  * a contract document has no meaningful partial edit, and a merge would leave a removed
@@ -1 +1 @@
1
- {"version":3,"file":"foundational-services.d.ts","sourceRoot":"","sources":["../src/foundational-services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAqB5B,oFAAoF;AACpF,eAAO,MAAM,kCAAkC,uDAA0B,CAAA;AACzE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEnG,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,uDAAuC,CAAA;AACjF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,oFAOlC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;IAInC,4EAA4E;;IAE5E,gEAAgE;;IAEhE;;;;OAIG;;IAEH;;;OAGG;;aAEH,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB;;;;IAnBpC,4EAA4E;;IAE5E,gEAAgE;;IAEhE;;;;OAIG;;IAEH;;;OAGG;;IAQH,6FAA6F;;aAE7F,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB;IACpC,2EAA2E;;;;IAI3E,gDAAgD;;IAEhD,sFAAsF;;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