@fabrika/provider-contract 0.9.0-dev.2 → 0.9.0-dev.21

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.
@@ -0,0 +1,46 @@
1
+ import type { ProviderDeploymentNamespace, ProviderNamespacePlan } from './control';
2
+ /** The runtime a contract application's generated entry is written for (`@fabrika/app/build`'s `EntryRuntime`). */
3
+ export type AppEntryRuntime = 'bun' | 'cloudflare';
4
+ /** What a namespace command asks of Control. The `fabrika` command holds the Control origin, the credential and the transport. */
5
+ export interface NamespaceControl {
6
+ create(namespace: ProviderDeploymentNamespace): Promise<unknown>;
7
+ adopt(namespace: ProviderDeploymentNamespace): Promise<unknown>;
8
+ reconcile(namespaceId: string): Promise<unknown>;
9
+ }
10
+ /** A plan, or the namespace Control answered with; the `fabrika` command validates and prints either. */
11
+ export type NamespaceCommandResult = {
12
+ readonly plan: ProviderNamespacePlan;
13
+ } | {
14
+ readonly namespace: unknown;
15
+ };
16
+ export interface NamespaceCommandContext {
17
+ readonly source: Readonly<Record<string, string | undefined>>;
18
+ /** Reads the Control origin and credential, and throws when either is missing: call it after every other input is checked. */
19
+ control(): NamespaceControl;
20
+ }
21
+ export interface NamespaceCli {
22
+ readonly usage: string;
23
+ /** `argv` is the command's own arguments, without the router's `--provider` and `--json`. */
24
+ run(subcommand: string, argv: readonly string[], context: NamespaceCommandContext): Promise<NamespaceCommandResult>;
25
+ }
26
+ export interface AppCli {
27
+ readonly provider: string;
28
+ readonly entryRuntime: AppEntryRuntime;
29
+ /** `fabrika app build`, after the command wrote a contract application's entry; `contract` says whether it did. */
30
+ build?(argv: readonly string[], context: {
31
+ readonly contract: boolean;
32
+ }): Promise<void>;
33
+ deploy?(argv: readonly string[]): Promise<void>;
34
+ /** The text `fabrika app register` hands Control: the application's manifest for one environment. */
35
+ registrationManifest?(options: {
36
+ readonly config: string;
37
+ readonly env: string;
38
+ }): Promise<string>;
39
+ readonly namespaces?: NamespaceCli;
40
+ }
41
+ export interface AppCliModule {
42
+ readonly appCli: AppCli;
43
+ }
44
+ export declare const isAppCli: (value: unknown) => value is AppCli;
45
+ /** `specifier` names the module in the error, so an operator knows which package to upgrade. */
46
+ export declare const appCliFromModule: (value: unknown, expectedProvider: string, specifier: string) => AppCli;
@@ -0,0 +1,22 @@
1
+ import { type ControlProvider, type ProviderDeployInput } from './control';
2
+ /** What the suite hands a fake cloud: `accepted` is called once the cloud has taken the deploy's operation. */
3
+ export interface ConformanceCloudHooks {
4
+ accepted(): void;
5
+ }
6
+ /** One provider over one fresh fake cloud. */
7
+ export interface ConformanceCloud {
8
+ readonly provider: ControlProvider;
9
+ /** A deploy the fake cloud accepts and lets succeed. Each case sets `dryRun`, `signal` and `events` itself. */
10
+ readonly input: Omit<ProviderDeployInput, 'dryRun' | 'signal' | 'events'>;
11
+ /** The credentials the provider holds itself (a cloud token, a signed URL); no event may carry one. */
12
+ readonly credentials: readonly string[];
13
+ /** Every request that changed the cloud: a write, a created resource, started work. A preview the cloud runs is none. */
14
+ mutations(): readonly string[];
15
+ /** Every request to stop or remove the deploy's work: a cancelled build or job, a deleted version. */
16
+ stops(): readonly string[];
17
+ }
18
+ export interface ControlProviderConformanceHarness {
19
+ /** Called once per case, and once per event in the lease-loss sweep. */
20
+ create(hooks: ConformanceCloudHooks): ConformanceCloud;
21
+ }
22
+ export declare function describeControlProviderConformance(name: string, harness: ControlProviderConformanceHarness): void;
@@ -1,4 +1,5 @@
1
- import type { AppSchema, ContractArtifact } from '@fabrika/auth-core';
1
+ import type { ApplicationObjects, AppSchema, ContractArtifact, ManagedEnvironment } from '@fabrika/auth-core';
2
+ import type { InstallationBrand } from '@fabrika/proxy-core/brand';
2
3
  import type { JsonValue, ProviderEnvelope } from './json';
3
4
  /** Events whose persistence and presentation belong to the control plane. */
4
5
  export interface ProviderRunEvents {
@@ -13,8 +14,11 @@ export interface ProviderRunEvents {
13
14
  */
14
15
  boundary(): Promise<void>;
15
16
  }
16
- /** Complete platform-owned runtime state. A null value removes the key from persistent targets. */
17
- export type ProviderManagedEnvironment = Readonly<Record<string, string | null>>;
17
+ /**
18
+ * Complete platform-owned runtime state, parsed by Control (`parseManagedEnvironment`). A provider writes each entry as
19
+ * a secret when it is a `credential`, removes one whose value is null, and removes the stale ones `staleManagedVariables` names.
20
+ */
21
+ export type ProviderManagedEnvironment = ManagedEnvironment;
18
22
  /** Provider-neutral coordinates for obtaining one app revision. */
19
23
  export interface ProviderSource {
20
24
  readonly repoUrl: string;
@@ -35,8 +39,7 @@ export interface ProviderDeploymentNamespace {
35
39
  readonly exclusiveAppId?: string;
36
40
  readonly target: ProviderEnvelope;
37
41
  }
38
- /** A framework release as npm publishes it; the only form one may take before it reaches a generated build command. */
39
- export declare const FRAMEWORK_RELEASE_PATTERN: RegExp;
42
+ export { FRAMEWORK_RELEASE_PATTERN } from '@fabrika/auth-core';
40
43
  /**
41
44
  * The access Control approved for one application environment (ADR-0050): the contract the proxy enforces and the
42
45
  * IAM vocabulary compiled from it. A provider publishes a contract application's endpoint table and reconciles its
@@ -57,6 +60,12 @@ export interface ProviderApprovedAccess {
57
60
  * the framework minor it pins (ADR-0062). Its build checks with that release.
58
61
  */
59
62
  readonly checker: string;
63
+ /**
64
+ * The `@fabrika/app` release the application's `bun.lock` pins (`FRAMEWORK_RELEASE_PATTERN`), which a release gate
65
+ * reads: `checker` is this platform's patch of that minor, newer than a prerelease pin. Absent in an access Control
66
+ * approved before it recorded the pin.
67
+ */
68
+ readonly framework?: string;
60
69
  }
61
70
  /**
62
71
  * `dev`: the environment follows a workspace through a platform-owned launcher, which its provider starts instead of the
@@ -78,12 +87,18 @@ export interface ProviderEnvironment {
78
87
  * application's proxy manifest entry as `crossOrigins`.
79
88
  */
80
89
  readonly crossOrigins?: readonly string[];
90
+ /**
91
+ * The origin of the environment's active Operations ingest DSN, never the DSN: a contract application's proxy admits
92
+ * it in `connect-src`. Control sets it on a deploy; absent while the environment has no active ingest.
93
+ */
94
+ readonly operationsOrigin?: string;
81
95
  readonly namespace?: ProviderDeploymentNamespace;
82
96
  readonly target: ProviderEnvelope;
83
97
  readonly artifact: ProviderEnvelope;
84
98
  /**
85
99
  * The environment's approved contract, from Control's `approvedSnapshot`. Absent when nothing is approved: then a
86
100
  * provider publishes no endpoint table and reconciles no IAM schema, whatever the artifact claims (ADR-0050).
101
+ * Control refuses a non-dry deploy without it.
87
102
  */
88
103
  readonly access?: ProviderApprovedAccess;
89
104
  }
@@ -104,6 +119,12 @@ export interface ProviderSourceResolutionInput {
104
119
  readonly sourceBinding?: ProviderSourceBinding;
105
120
  readonly signal: AbortSignal;
106
121
  }
122
+ /** The build descriptor of a deploy's commit: its repository path and its text. */
123
+ export interface ProviderSourceDescriptorInput {
124
+ readonly environment: ProviderEnvironment;
125
+ readonly path: string;
126
+ readonly contents: string;
127
+ }
107
128
  /** The exact source revision a provider resolved before starting deploy work. */
108
129
  export interface ProviderSourceResolution {
109
130
  readonly commitSha: string;
@@ -130,13 +151,33 @@ export interface ProviderDeployInput {
130
151
  /** Platform-owned runtime configuration, separate from operator-managed application vars. */
131
152
  readonly managedEnvironment: ProviderManagedEnvironment;
132
153
  /**
133
- * Every origin IAM may hand this app a session at (ADR-0022). App-wide, not per-environment:
134
- * IAM's registry is keyed by app id, so the set is assembled from every environment of the app.
135
- * Absent when the app has no public origin at all, which leaves IAM's registry untouched.
154
+ * The object that serves the environment's ordinary traffic and the objects its ops channel reaches, as Control records
155
+ * them (ADR-0070 §9). A provider whose application runs in no object ignores it; absent, the provider's defaults.
136
156
  */
137
- readonly returnOrigins?: readonly string[];
157
+ readonly applicationObjects?: ApplicationObjects;
158
+ /**
159
+ * Present when the deploy brings migration files with a `dataLoss` statement of any kind, which may change stored data, and that the version running does not hold
160
+ * (ADR-0050): the provider backs up the application's database, and waits until the backup is stored, before any
161
+ * version that can run them starts. A backup that fails or does not finish fails the run with nothing deployed.
162
+ * Control hands it only to a provider without `dataOperations`, whose migration phase backs up itself (ADR-0070 §8),
163
+ * and never to a dry run or a dev bootstrap.
164
+ */
165
+ readonly backupBeforeMigrations?: {
166
+ readonly migrations: readonly string[];
167
+ };
138
168
  readonly dryRun: boolean;
139
169
  readonly sourceBinding?: ProviderSourceBinding;
170
+ /**
171
+ * Present on a dev bootstrap: the provider deploys into this workspace's sandbox, which `devSandboxes.ensure` created
172
+ * before the run, and serves it at `origin`. Absent on every other deploy.
173
+ */
174
+ readonly devSandbox?: {
175
+ readonly workspaceId: string;
176
+ readonly sandboxId: string;
177
+ readonly origin: string;
178
+ /** See `ProviderDevSandboxInput.sandboxKey`. */
179
+ readonly sandboxKey: string;
180
+ };
140
181
  /** Optional short-lived, run-scoped Operations artifact destination. */
141
182
  readonly artifactUpload?: {
142
183
  readonly url: string;
@@ -150,7 +191,10 @@ export interface ProviderDeployInput {
150
191
  readonly signal: AbortSignal;
151
192
  readonly events: ProviderRunEvents;
152
193
  }
153
- /** A terminal provider operation result. */
194
+ /**
195
+ * A terminal provider operation result. `succeeded` means the version is live: Control then writes the environment's
196
+ * approved IAM schema itself (ADR-0011), so a provider never calls IAM for an application.
197
+ */
154
198
  export interface ProviderTerminalOutcome {
155
199
  readonly state: 'succeeded' | 'failed';
156
200
  readonly exitCode?: number;
@@ -190,13 +234,9 @@ export interface ProviderRunReference {
190
234
  }
191
235
  export interface ProviderCancelInput extends ProviderRunReference {
192
236
  readonly signal: AbortSignal;
193
- /** See `ProviderDeployInput.returnOrigins`; a cancel that settles an activated deploy projects the same set. */
194
- readonly returnOrigins?: readonly string[];
195
237
  }
196
238
  export interface ProviderReconcileInput extends ProviderRunReference {
197
239
  readonly signal: AbortSignal;
198
- /** See `ProviderDeployInput.returnOrigins`; a provider that settles a deploy here projects the same set. */
199
- readonly returnOrigins?: readonly string[];
200
240
  /** Append a line to the run's log. */
201
241
  log?(line: string): Promise<void>;
202
242
  }
@@ -279,12 +319,48 @@ export interface ProviderNamespaceMember {
279
319
  readonly operationsOrigin?: string;
280
320
  /** See `ProviderEnvironment.access`: the proxy table of a contract application comes only from here. */
281
321
  readonly access?: ProviderApprovedAccess;
322
+ /**
323
+ * Present for a dev member, which is routed ONLY through these entries (none while it has no sandbox), never through
324
+ * its own `domain` and `access`.
325
+ */
326
+ readonly devSandboxes?: readonly ProviderNamespaceDevSandbox[];
327
+ }
328
+ /** One workspace sandbox of a `dev` member, which the namespace proxy routes as its own entry. */
329
+ export interface ProviderNamespaceDevSandbox {
330
+ readonly workspaceId: string;
331
+ /** The public host the proxy answers the workspace on (`<workspaceId>.<domain>`). */
332
+ readonly host: string;
333
+ /** See `ProviderDevSandbox.upstreamHost`. */
334
+ readonly upstreamHost: string;
335
+ /** See `ProviderNamespaceMember.proxySecret`: sealed per workspace. */
336
+ readonly proxySecret?: string;
337
+ /** The access of the workspace's own published bootstrap run. */
338
+ readonly access: ProviderApprovedAccess;
339
+ }
340
+ /** What decides the hosts a namespace entry point routes one member on: `ProviderNamespaceMember` without its secrets. */
341
+ export interface ProviderNamespaceMemberRouting {
342
+ readonly appId: string;
343
+ readonly env: string;
344
+ readonly domain?: string;
345
+ readonly artifact: ProviderEnvelope;
346
+ readonly access?: ProviderApprovedAccess;
347
+ readonly devSandboxes?: readonly Pick<ProviderNamespaceDevSandbox, 'workspaceId' | 'host'>[];
282
348
  }
283
349
  /** One idempotent namespace lifecycle invocation. */
284
350
  export interface ProviderNamespaceMutationInput {
285
351
  readonly namespace: ProviderDeploymentNamespace;
286
352
  /** Every app environment assigned to the namespace, read under its lease. */
287
353
  readonly members: readonly ProviderNamespaceMember[];
354
+ /**
355
+ * The installation's client logo for the pages the namespace's proxy answers with (ADR-0066), read from IAM for this
356
+ * mutation; absent or null shows the fabrika mark. A provider passes it only to a proxy that can parse it.
357
+ */
358
+ readonly brand?: InstallationBrand | null;
359
+ /**
360
+ * Present when a member is a `dev` environment: the namespace's sandbox host is provisioned with it as its API key, and
361
+ * see `ProviderDevSandboxInput.sandboxKey`. Absent, the provider provisions no sandbox host.
362
+ */
363
+ readonly sandboxKey?: string;
288
364
  readonly signal: AbortSignal;
289
365
  readonly events: ProviderNamespaceEvents;
290
366
  }
@@ -308,6 +384,16 @@ export declare const PROVIDER_NAMESPACE_IMMUTABLE = "namespaceImmutable";
308
384
  * and is not confirmed. Any other failure means nothing changed. Applying the same plan again must converge.
309
385
  */
310
386
  export declare const PROVIDER_NAMESPACE_UPDATE_UNCONFIRMED = "namespaceUpdateUnconfirmed";
387
+ /**
388
+ * The `code` of a `ProviderNamespaceError` a `devSandboxes` call throws when the namespace's sandbox host has no room
389
+ * to create or wake one more sandbox. Nothing changed; it succeeds once another sandbox is parked or removed.
390
+ */
391
+ export declare const PROVIDER_DEV_CAPACITY = "devCapacity";
392
+ /**
393
+ * The `code` of a `ProviderNamespaceError` a `devSandboxes` call throws when the namespace has no sandbox host yet.
394
+ * Nothing changed; it succeeds once a namespace mutation handed the sandbox host key has created the host.
395
+ */
396
+ export declare const PROVIDER_DEV_HOST_PENDING = "devHostPending";
311
397
  /** One provider-described change, safe to audit: names and values only, never a credential. */
312
398
  export interface ProviderNamespaceChange {
313
399
  readonly field: string;
@@ -400,6 +486,17 @@ export interface ProviderNamespaceOperator {
400
486
  plan(input: ProviderNamespacePlanInput): ProviderNamespacePlan;
401
487
  present(namespace: ProviderDeploymentNamespace): ProviderNamespacePresentation;
402
488
  }
489
+ /** The app-owned claims of one namespace whose resources Control is asked to confirm gone. */
490
+ export interface ProviderClaimedResourcesInput {
491
+ readonly namespace: ProviderDeploymentNamespace;
492
+ readonly resourceKeys: readonly string[];
493
+ readonly signal: AbortSignal;
494
+ }
495
+ /** What the provider observed for one claimed resource. */
496
+ export interface ProviderClaimedResource {
497
+ readonly resourceKey: string;
498
+ readonly exists: boolean;
499
+ }
403
500
  /** Optional placement lifecycle owned by providers that use deployment namespaces. */
404
501
  export interface ProviderNamespaceCapabilities {
405
502
  normalize(namespace: ProviderDeploymentNamespace): ProviderDeploymentNamespace;
@@ -416,22 +513,80 @@ export interface ProviderNamespaceCapabilities {
416
513
  reconcile(input: ProviderNamespaceMutationInput): Promise<ProviderDeploymentNamespace>;
417
514
  /** Absent means the namespace has no entry point that follows its members. */
418
515
  republish?(input: ProviderNamespaceRepublishInput): Promise<ProviderNamespaceRepublishResult>;
516
+ /**
517
+ * The hosts the namespace's entry point routes this member on, lower-cased, by the rule its compiler applies; none for
518
+ * a member it does not route. Throws for a member it cannot route. Absent means no member is routed by host.
519
+ */
520
+ memberHosts?(member: ProviderNamespaceMemberRouting): readonly string[];
521
+ /**
522
+ * Read-only: whether each claimed resource still exists, one answer per key. Throws when it cannot tell, so Control
523
+ * releases a claim only over a resource the provider confirmed gone. Absent means no claim can be released.
524
+ */
525
+ claimedResources?(input: ProviderClaimedResourcesInput): Promise<readonly ProviderClaimedResource[]>;
419
526
  /** Absent means the provider changes no namespace in place. */
420
527
  readonly updates?: ProviderNamespaceUpdates;
421
528
  readonly operator?: ProviderNamespaceOperator;
422
529
  }
423
- /** One call on the service of a `dev` environment, between its bootstrap runs. */
424
- export interface ProviderDevEnvironmentInput {
530
+ export interface ProviderAuthoring {
531
+ /** The file NAMES (no `/`) that configure the provider's deploy; a workspace changes none of them, at any depth. */
532
+ readonly protectedFiles: readonly string[];
533
+ }
534
+ /** The provider's handle on one workspace sandbox, which Control persists; stable for the workspace's life. */
535
+ export interface ProviderDevSandboxRef {
536
+ readonly sandboxId: string;
537
+ }
538
+ /** One running workspace sandbox of a `dev` environment. */
539
+ export interface ProviderDevSandbox {
540
+ readonly sandboxId: string;
541
+ /** The base image the sandbox was created from. */
542
+ readonly baseDigest: string;
543
+ /** The Host the namespace proxy sends to reach the sandbox's application port (e.g. `3000-<id>.<box domain>`). */
544
+ readonly upstreamHost: string;
545
+ }
546
+ /** Create a workspace's sandbox, or return the one it already has. */
547
+ export interface ProviderDevSandboxEnsureInput {
425
548
  readonly environment: ProviderEnvironment;
549
+ readonly workspaceId: string;
550
+ /** See `ProviderDevSandboxInput.sandboxKey`. */
551
+ readonly sandboxKey: string;
552
+ readonly signal: AbortSignal;
553
+ }
554
+ /** One lifecycle call on an existing workspace sandbox. */
555
+ export interface ProviderDevSandboxInput {
556
+ readonly environment: ProviderEnvironment;
557
+ readonly sandbox: ProviderDevSandboxRef;
558
+ /** The bearer of the namespace's sandbox host API, composed by Control from its vault for this call; never persisted or logged. */
559
+ readonly sandboxKey: string;
560
+ readonly signal: AbortSignal;
561
+ }
562
+ /** Remove a workspace's sandbox; with no recorded `sandbox`, the one an unrecorded `ensure` may have created. */
563
+ export interface ProviderDevSandboxRemoveInput {
564
+ readonly environment: ProviderEnvironment;
565
+ readonly workspaceId: string;
566
+ readonly sandbox: ProviderDevSandboxRef | null;
567
+ /** See `ProviderDevSandboxInput.sandboxKey`. */
568
+ readonly sandboxKey: string;
426
569
  readonly signal: AbortSignal;
427
570
  }
428
571
  /**
429
- * The service of a `dev` environment outside a run (ADR-0049): Control stops it after an idle period and starts it on
430
- * the next commit. Files the launcher wrote survive both.
572
+ * The per-workspace sandboxes of a `dev` environment outside a run. Every call is idempotent: `ensure` creates at most
573
+ * one sandbox per `workspaceId` and returns it running, `park` and `wake` converge on their state, and `remove` treats a
574
+ * sandbox already gone as removed. A full sandbox host throws `PROVIDER_DEV_CAPACITY`, a namespace without one yet
575
+ * `PROVIDER_DEV_HOST_PENDING`; `remove` there is a no-op, since no sandbox can exist.
431
576
  */
432
- export interface ProviderDevEnvironments {
433
- stop(input: ProviderDevEnvironmentInput): Promise<void>;
434
- start(input: ProviderDevEnvironmentInput): Promise<void>;
577
+ export interface ProviderDevSandboxes {
578
+ /**
579
+ * Mutation-free check that the environment's placement can serve a workspace sandbox. Control calls it before it
580
+ * records one, because a recorded sandbox reaches every later republish of the namespace. A refusal is a
581
+ * `ProviderNamespaceError` that is not retryable, whose one-line message the author may read; any other throw is a failure.
582
+ */
583
+ admit(input: {
584
+ readonly environment: ProviderEnvironment;
585
+ }): void;
586
+ ensure(input: ProviderDevSandboxEnsureInput): Promise<ProviderDevSandbox>;
587
+ park(input: ProviderDevSandboxInput): Promise<void>;
588
+ wake(input: ProviderDevSandboxInput): Promise<void>;
589
+ remove(input: ProviderDevSandboxRemoveInput): Promise<void>;
435
590
  }
436
591
  /**
437
592
  * The control-plane capability bundle selected statically by one composition root.
@@ -444,6 +599,13 @@ export interface ControlProvider {
444
599
  /** Absent means core stores the registration as submitted. */
445
600
  normalizeRegistration?(input: ProviderRegistrationInput): ProviderRegistration;
446
601
  resolveSource?(input: ProviderSourceResolutionInput): Promise<ProviderSourceResolution>;
602
+ /**
603
+ * The environment's artifact with the build descriptor a deploy's commit carries, validated as a registration is; it
604
+ * throws a refusal that names the refused key. Control calls it from a deploy run whose commit holds a descriptor the
605
+ * registered artifact does not, deploys with the result, and stores it once the run's publication passed (ADR-0043).
606
+ * Null when the provider does not re-register this artifact from a commit; absent means it re-registers none.
607
+ */
608
+ withSourceDescriptor?(input: ProviderSourceDescriptorInput): Promise<ProviderEnvelope | null>;
447
609
  /**
448
610
  * Mutation-free check of a candidate's compatibility with its placement. Control calls it before publishing the
449
611
  * snapshot, under the namespace lease, on every publication attempt. The candidate is not yet approved access.
@@ -457,8 +619,29 @@ export interface ControlProvider {
457
619
  reconcile?(input: ProviderReconcileInput): Promise<ProviderReconcileOutcome>;
458
620
  readonly secrets?: ProviderManagedSecrets;
459
621
  readonly namespaces?: ProviderNamespaceCapabilities;
622
+ /** MCP authoring (ADR-0049): an environment of this provider can be an authoring target. Absent means none can. */
623
+ readonly authoring?: ProviderAuthoring;
624
+ /**
625
+ * Every application environment gets `FABRIKA_PROXY_SECRET`, with or without a namespace proxy: the provider's own
626
+ * hop to the application carries it (Cloudflare's Worker to its Durable Object, ADR-0065). Absent means only a
627
+ * namespace proxy's environments get one.
628
+ */
629
+ readonly applicationHopSecret?: true;
460
630
  /** Absent means the provider runs no `dev` environment, and Control refuses one. */
461
- readonly devEnvironments?: ProviderDevEnvironments;
631
+ readonly devSandboxes?: ProviderDevSandboxes;
632
+ /**
633
+ * Whether an environment at this approved access is served the ops channel through which Control reaches its object
634
+ * (ADR-0069), so its deploy gets `FABRIKA_OPS_KEY_DIGESTS`. The release gate is the provider's, so core keeps no
635
+ * release logic. Absent means no environment of this provider is.
636
+ */
637
+ opsChannel?(access: ProviderApprovedAccess): boolean;
638
+ /**
639
+ * Whether the object at this approved access, served the ops channel, also holds the maintenance barrier (`state`,
640
+ * `migrate`) and serves Control's data operations: the daily backups, a deploy's migration phase and the side restore
641
+ * (ADR-0069 §3, ADR-0070). A release can serve the channel without them. Absent means no environment of this
642
+ * provider is.
643
+ */
644
+ dataOperations?(access: ProviderApprovedAccess): boolean;
462
645
  /** Absent means the provider deploys public sources only. */
463
646
  readonly source?: ProviderSourceCapabilities;
464
647
  /**
@@ -479,4 +662,9 @@ export interface ControlProvider {
479
662
  * access snapshot there (ADR-0050). Absent means the repository root.
480
663
  */
481
664
  applicationRoot?(source: ProviderSource): string | null;
665
+ /**
666
+ * The database an application of this provider runs its migrations on, which Control classifies them for: SQLite in
667
+ * the application's Durable Object on Cloudflare (ADR-0065). Absent means Postgres.
668
+ */
669
+ readonly applicationDialect?: 'postgres' | 'sqlite';
482
670
  }
@@ -1,5 +1,6 @@
1
1
  export * from './authoring';
2
2
  export * from './control';
3
3
  export * from './json';
4
+ export * from './plain-credentials';
4
5
  export * from './schema';
5
6
  export * from './steps';
@@ -0,0 +1,16 @@
1
+ /** Why a name and value look like a credential. `because` completes "… looks like a credential: <because>". */
2
+ export interface PlainCredentialFinding {
3
+ readonly basis: 'name' | 'value';
4
+ readonly because: string;
5
+ }
6
+ /**
7
+ * Whether a plain `name = value` looks like a credential, and why; null when it does not.
8
+ *
9
+ * The name matches on a credential word (`TOKEN`, `SECRET`, `PASSWORD`, `PASS`, `BASIC_AUTH`, a `KEY` or `KEYS` that is
10
+ * not an id, a public key or a cache key), unless its last word makes it describe one (`TOKEN_URL`,
11
+ * `PASSWORD_MIN_LENGTH`). A name match needs a literal that could be a credential: an empty value, one made only of
12
+ * references or a boolean is not, nor a short number or duration under a name that says it is a quantity. The value matches on its own: a private key, an
13
+ * Authorization header, a URL with a password, an issuer's token prefix, or a long random string unless the name says
14
+ * the value is public (a publishable or site key, an id).
15
+ */
16
+ export declare function plainCredentialFinding(name: string, value: string): PlainCredentialFinding | null;