@cat-factory/contracts 0.54.0 → 0.56.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.
- package/dist/environments.d.ts +582 -49
- package/dist/environments.d.ts.map +1 -1
- package/dist/environments.js +28 -13
- package/dist/environments.js.map +1 -1
- package/dist/primitives.d.ts +10 -0
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +12 -0
- package/dist/primitives.js.map +1 -1
- package/dist/routes/auth.d.ts +14 -0
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/auth.js +7 -0
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/environments.d.ts +677 -119
- package/dist/routes/environments.d.ts.map +1 -1
- package/dist/routes/environments.js +4 -0
- package/dist/routes/environments.js.map +1 -1
- package/dist/routes/runners.d.ts +580 -32
- package/dist/routes/runners.d.ts.map +1 -1
- package/dist/routes/runners.js +3 -0
- package/dist/routes/runners.js.map +1 -1
- package/dist/routes/workspaces.d.ts +16 -0
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/runners.d.ts +686 -79
- package/dist/runners.d.ts.map +1 -1
- package/dist/runners.js +18 -5
- package/dist/runners.js.map +1 -1
- package/dist/snapshot.d.ts +24 -0
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/snapshot.js +17 -0
- package/dist/snapshot.js.map +1 -1
- package/package.json +1 -1
package/dist/environments.d.ts
CHANGED
|
@@ -241,15 +241,15 @@ export declare const environmentManifestSchema: v.ObjectSchema<{
|
|
|
241
241
|
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
242
242
|
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
243
243
|
/**
|
|
244
|
-
* Opaque, provider-specific configuration for a
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* `baseUrl`/`tokenUrl`);
|
|
252
|
-
* exported `UrlSafetyPolicy`).
|
|
244
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
245
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
246
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
247
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
248
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
249
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
250
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
251
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
252
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
253
253
|
*/
|
|
254
254
|
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
255
255
|
}, undefined>;
|
|
@@ -354,13 +354,26 @@ export declare const kubernetesEnvironmentConfigSchema: v.ObjectSchema<{
|
|
|
354
354
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
355
355
|
}, undefined>;
|
|
356
356
|
export type KubernetesEnvironmentConfig = v.InferOutput<typeof kubernetesEnvironmentConfigSchema>;
|
|
357
|
+
/** Built-in environment backend kinds the contract knows by name. */
|
|
358
|
+
export declare const RESERVED_ENVIRONMENT_BACKEND_KINDS: readonly ['manifest', 'kubernetes'];
|
|
359
|
+
/**
|
|
360
|
+
* The `kind` slug of a CUSTOM (third-party, programmatically-registered) environment
|
|
361
|
+
* backend: any lower-kebab slug that isn't a reserved built-in. A custom backend stores
|
|
362
|
+
* everything in the generic manifest — bespoke settings ride `providerConfig`, credentials
|
|
363
|
+
* the secret bundle — so its connect config is a manifest under this slug, and the
|
|
364
|
+
* registered `EnvironmentBackendProvider` (resolved by `kind`) owns the semantic
|
|
365
|
+
* validation. The reserved-kind guard is load-bearing: it stops a wrong-shaped built-in
|
|
366
|
+
* payload (e.g. `{ kind: 'kubernetes', manifest }`) from silently matching this generic
|
|
367
|
+
* member instead of failing.
|
|
368
|
+
*/
|
|
369
|
+
export declare const customEnvironmentBackendKindSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">, v.CheckAction<string, "reserved backend kind">]>;
|
|
357
370
|
/**
|
|
358
371
|
* An ephemeral-environment backend config, discriminated by `kind`. The universal
|
|
359
|
-
* abstraction over HOW a workspace's preview environments are provisioned:
|
|
372
|
+
* abstraction over HOW a workspace's preview environments are provisioned: the built-ins
|
|
360
373
|
* `manifest` (the generic BYO HTTP management API) and `kubernetes` (native per-PR
|
|
361
|
-
* namespaces)
|
|
362
|
-
*
|
|
363
|
-
* `runnerBackendConfigSchema`; the provider-registry seam keys on `kind`.
|
|
374
|
+
* namespaces), plus any CUSTOM kind a deployment registers programmatically via
|
|
375
|
+
* `registerEnvironmentBackend` (it rides the generic manifest member — NO new variant
|
|
376
|
+
* needed). Mirrors `runnerBackendConfigSchema`; the provider-registry seam keys on `kind`.
|
|
364
377
|
*/
|
|
365
378
|
export declare const environmentBackendConfigSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
|
|
366
379
|
readonly kind: v.LiteralSchema<"manifest", undefined>;
|
|
@@ -480,15 +493,15 @@ export declare const environmentBackendConfigSchema: v.VariantSchema<"kind", [v.
|
|
|
480
493
|
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
481
494
|
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
482
495
|
/**
|
|
483
|
-
* Opaque, provider-specific configuration for a
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
* `baseUrl`/`tokenUrl`);
|
|
491
|
-
* exported `UrlSafetyPolicy`).
|
|
496
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
497
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
498
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
499
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
500
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
501
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
502
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
503
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
504
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
492
505
|
*/
|
|
493
506
|
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
494
507
|
}, undefined>;
|
|
@@ -553,6 +566,136 @@ export declare const environmentBackendConfigSchema: v.VariantSchema<"kind", [v.
|
|
|
553
566
|
/** Extra annotations stamped on the namespace. */
|
|
554
567
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
555
568
|
}, undefined>;
|
|
569
|
+
}, undefined>, v.ObjectSchema<{
|
|
570
|
+
readonly kind: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">, v.CheckAction<string, "reserved backend kind">]>;
|
|
571
|
+
readonly manifest: v.ObjectSchema<{
|
|
572
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
573
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
574
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
575
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
576
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
577
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
578
|
+
}, undefined>, v.ObjectSchema<{
|
|
579
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
580
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
581
|
+
readonly secretRef: v.ObjectSchema<{
|
|
582
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
583
|
+
}, undefined>;
|
|
584
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
585
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
586
|
+
}, undefined>, v.ObjectSchema<{
|
|
587
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
588
|
+
readonly secretRef: v.ObjectSchema<{
|
|
589
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
590
|
+
}, undefined>;
|
|
591
|
+
}, undefined>, v.ObjectSchema<{
|
|
592
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
593
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
594
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
595
|
+
}, undefined>;
|
|
596
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
597
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
598
|
+
}, undefined>;
|
|
599
|
+
}, undefined>, v.ObjectSchema<{
|
|
600
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
601
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
602
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
603
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
604
|
+
}, undefined>;
|
|
605
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
606
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
607
|
+
}, undefined>;
|
|
608
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
609
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
610
|
+
}, undefined>, v.ObjectSchema<{
|
|
611
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
612
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
613
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
614
|
+
readonly secretRef: v.ObjectSchema<{
|
|
615
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
616
|
+
}, undefined>;
|
|
617
|
+
}, undefined>, undefined>;
|
|
618
|
+
}, undefined>], undefined>;
|
|
619
|
+
readonly provision: v.ObjectSchema<{
|
|
620
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
621
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
622
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
623
|
+
readonly key: v.StringSchema<undefined>;
|
|
624
|
+
readonly value: v.StringSchema<undefined>;
|
|
625
|
+
}, undefined>, undefined>, undefined>;
|
|
626
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
627
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
628
|
+
readonly value: v.StringSchema<undefined>;
|
|
629
|
+
}, undefined>, undefined>, undefined>;
|
|
630
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
631
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
632
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
633
|
+
}, undefined>;
|
|
634
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
635
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
636
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
637
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
638
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
639
|
+
readonly key: v.StringSchema<undefined>;
|
|
640
|
+
readonly value: v.StringSchema<undefined>;
|
|
641
|
+
}, undefined>, undefined>, undefined>;
|
|
642
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
643
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
644
|
+
readonly value: v.StringSchema<undefined>;
|
|
645
|
+
}, undefined>, undefined>, undefined>;
|
|
646
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
647
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
648
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
649
|
+
}, undefined>, undefined>;
|
|
650
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
651
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
652
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
653
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
654
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
655
|
+
readonly key: v.StringSchema<undefined>;
|
|
656
|
+
readonly value: v.StringSchema<undefined>;
|
|
657
|
+
}, undefined>, undefined>, undefined>;
|
|
658
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
659
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
660
|
+
readonly value: v.StringSchema<undefined>;
|
|
661
|
+
}, undefined>, undefined>, undefined>;
|
|
662
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
663
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
664
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
665
|
+
}, undefined>, undefined>;
|
|
666
|
+
readonly response: v.ObjectSchema<{
|
|
667
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
668
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
669
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
670
|
+
readonly from: v.StringSchema<undefined>;
|
|
671
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
672
|
+
}, undefined>, undefined>, undefined>;
|
|
673
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
674
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
675
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
676
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
677
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
678
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
679
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
680
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
681
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
682
|
+
}, undefined>, undefined>;
|
|
683
|
+
}, undefined>;
|
|
684
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
685
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
686
|
+
/**
|
|
687
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
688
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
689
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
690
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
691
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
692
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
693
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
694
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
695
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
696
|
+
*/
|
|
697
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
698
|
+
}, undefined>;
|
|
556
699
|
}, undefined>], undefined>;
|
|
557
700
|
export type EnvironmentBackendConfig = v.InferOutput<typeof environmentBackendConfigSchema>;
|
|
558
701
|
export type EnvironmentBackendKind = EnvironmentBackendConfig['kind'];
|
|
@@ -723,15 +866,15 @@ export declare const environmentConnectionSchema: v.ObjectSchema<{
|
|
|
723
866
|
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
724
867
|
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
725
868
|
/**
|
|
726
|
-
* Opaque, provider-specific configuration for a
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* `baseUrl`/`tokenUrl`);
|
|
734
|
-
* exported `UrlSafetyPolicy`).
|
|
869
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
870
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
871
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
872
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
873
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
874
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
875
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
876
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
877
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
735
878
|
*/
|
|
736
879
|
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
737
880
|
}, undefined>;
|
|
@@ -796,6 +939,136 @@ export declare const environmentConnectionSchema: v.ObjectSchema<{
|
|
|
796
939
|
/** Extra annotations stamped on the namespace. */
|
|
797
940
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
798
941
|
}, undefined>;
|
|
942
|
+
}, undefined>, v.ObjectSchema<{
|
|
943
|
+
readonly kind: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">, v.CheckAction<string, "reserved backend kind">]>;
|
|
944
|
+
readonly manifest: v.ObjectSchema<{
|
|
945
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
946
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
947
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
948
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
949
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
950
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
951
|
+
}, undefined>, v.ObjectSchema<{
|
|
952
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
953
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
954
|
+
readonly secretRef: v.ObjectSchema<{
|
|
955
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
956
|
+
}, undefined>;
|
|
957
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
958
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
959
|
+
}, undefined>, v.ObjectSchema<{
|
|
960
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
961
|
+
readonly secretRef: v.ObjectSchema<{
|
|
962
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
963
|
+
}, undefined>;
|
|
964
|
+
}, undefined>, v.ObjectSchema<{
|
|
965
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
966
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
967
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
968
|
+
}, undefined>;
|
|
969
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
970
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
971
|
+
}, undefined>;
|
|
972
|
+
}, undefined>, v.ObjectSchema<{
|
|
973
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
974
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
975
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
976
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
977
|
+
}, undefined>;
|
|
978
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
979
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
980
|
+
}, undefined>;
|
|
981
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
982
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
983
|
+
}, undefined>, v.ObjectSchema<{
|
|
984
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
985
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
986
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
987
|
+
readonly secretRef: v.ObjectSchema<{
|
|
988
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
989
|
+
}, undefined>;
|
|
990
|
+
}, undefined>, undefined>;
|
|
991
|
+
}, undefined>], undefined>;
|
|
992
|
+
readonly provision: v.ObjectSchema<{
|
|
993
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
994
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
995
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
996
|
+
readonly key: v.StringSchema<undefined>;
|
|
997
|
+
readonly value: v.StringSchema<undefined>;
|
|
998
|
+
}, undefined>, undefined>, undefined>;
|
|
999
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1000
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1001
|
+
readonly value: v.StringSchema<undefined>;
|
|
1002
|
+
}, undefined>, undefined>, undefined>;
|
|
1003
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1004
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1005
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1006
|
+
}, undefined>;
|
|
1007
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
1008
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
1009
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1010
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1011
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1012
|
+
readonly key: v.StringSchema<undefined>;
|
|
1013
|
+
readonly value: v.StringSchema<undefined>;
|
|
1014
|
+
}, undefined>, undefined>, undefined>;
|
|
1015
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1016
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1017
|
+
readonly value: v.StringSchema<undefined>;
|
|
1018
|
+
}, undefined>, undefined>, undefined>;
|
|
1019
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1020
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1021
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1022
|
+
}, undefined>, undefined>;
|
|
1023
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
1024
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
1025
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1026
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1027
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1028
|
+
readonly key: v.StringSchema<undefined>;
|
|
1029
|
+
readonly value: v.StringSchema<undefined>;
|
|
1030
|
+
}, undefined>, undefined>, undefined>;
|
|
1031
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1032
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1033
|
+
readonly value: v.StringSchema<undefined>;
|
|
1034
|
+
}, undefined>, undefined>, undefined>;
|
|
1035
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1036
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1037
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1038
|
+
}, undefined>, undefined>;
|
|
1039
|
+
readonly response: v.ObjectSchema<{
|
|
1040
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1041
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1042
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1043
|
+
readonly from: v.StringSchema<undefined>;
|
|
1044
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
1045
|
+
}, undefined>, undefined>, undefined>;
|
|
1046
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1047
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1048
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
1049
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
1050
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1051
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1052
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1053
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1054
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1055
|
+
}, undefined>, undefined>;
|
|
1056
|
+
}, undefined>;
|
|
1057
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
1058
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
1059
|
+
/**
|
|
1060
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
1061
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
1062
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
1063
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
1064
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
1065
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
1066
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
1067
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
1068
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
1069
|
+
*/
|
|
1070
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
1071
|
+
}, undefined>;
|
|
799
1072
|
}, undefined>], undefined>, undefined>;
|
|
800
1073
|
}, undefined>;
|
|
801
1074
|
export type EnvironmentConnection = v.InferOutput<typeof environmentConnectionSchema>;
|
|
@@ -926,15 +1199,15 @@ export declare const registerEnvironmentProviderSchema: v.ObjectSchema<{
|
|
|
926
1199
|
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
927
1200
|
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
928
1201
|
/**
|
|
929
|
-
* Opaque, provider-specific configuration for a
|
|
930
|
-
*
|
|
931
|
-
*
|
|
932
|
-
*
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
*
|
|
936
|
-
* `baseUrl`/`tokenUrl`);
|
|
937
|
-
* exported `UrlSafetyPolicy`).
|
|
1202
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
1203
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
1204
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
1205
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
1206
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
1207
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
1208
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
1209
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
1210
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
938
1211
|
*/
|
|
939
1212
|
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
940
1213
|
}, undefined>;
|
|
@@ -999,6 +1272,136 @@ export declare const registerEnvironmentProviderSchema: v.ObjectSchema<{
|
|
|
999
1272
|
/** Extra annotations stamped on the namespace. */
|
|
1000
1273
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1001
1274
|
}, undefined>;
|
|
1275
|
+
}, undefined>, v.ObjectSchema<{
|
|
1276
|
+
readonly kind: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">, v.CheckAction<string, "reserved backend kind">]>;
|
|
1277
|
+
readonly manifest: v.ObjectSchema<{
|
|
1278
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1279
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1280
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
1281
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1282
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1283
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
1284
|
+
}, undefined>, v.ObjectSchema<{
|
|
1285
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
1286
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1287
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1288
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1289
|
+
}, undefined>;
|
|
1290
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
1291
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1292
|
+
}, undefined>, v.ObjectSchema<{
|
|
1293
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
1294
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1295
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1296
|
+
}, undefined>;
|
|
1297
|
+
}, undefined>, v.ObjectSchema<{
|
|
1298
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
1299
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
1300
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1301
|
+
}, undefined>;
|
|
1302
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
1303
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1304
|
+
}, undefined>;
|
|
1305
|
+
}, undefined>, v.ObjectSchema<{
|
|
1306
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
1307
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1308
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
1309
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1310
|
+
}, undefined>;
|
|
1311
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
1312
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1313
|
+
}, undefined>;
|
|
1314
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1315
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1316
|
+
}, undefined>, v.ObjectSchema<{
|
|
1317
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
1318
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
1319
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1320
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1321
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1322
|
+
}, undefined>;
|
|
1323
|
+
}, undefined>, undefined>;
|
|
1324
|
+
}, undefined>], undefined>;
|
|
1325
|
+
readonly provision: v.ObjectSchema<{
|
|
1326
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1327
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1328
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1329
|
+
readonly key: v.StringSchema<undefined>;
|
|
1330
|
+
readonly value: v.StringSchema<undefined>;
|
|
1331
|
+
}, undefined>, undefined>, undefined>;
|
|
1332
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1333
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1334
|
+
readonly value: v.StringSchema<undefined>;
|
|
1335
|
+
}, undefined>, undefined>, undefined>;
|
|
1336
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1337
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1338
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1339
|
+
}, undefined>;
|
|
1340
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
1341
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
1342
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1343
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1344
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1345
|
+
readonly key: v.StringSchema<undefined>;
|
|
1346
|
+
readonly value: v.StringSchema<undefined>;
|
|
1347
|
+
}, undefined>, undefined>, undefined>;
|
|
1348
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1349
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1350
|
+
readonly value: v.StringSchema<undefined>;
|
|
1351
|
+
}, undefined>, undefined>, undefined>;
|
|
1352
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1353
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1354
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1355
|
+
}, undefined>, undefined>;
|
|
1356
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
1357
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
1358
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1359
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1360
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1361
|
+
readonly key: v.StringSchema<undefined>;
|
|
1362
|
+
readonly value: v.StringSchema<undefined>;
|
|
1363
|
+
}, undefined>, undefined>, undefined>;
|
|
1364
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1365
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1366
|
+
readonly value: v.StringSchema<undefined>;
|
|
1367
|
+
}, undefined>, undefined>, undefined>;
|
|
1368
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1369
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1370
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1371
|
+
}, undefined>, undefined>;
|
|
1372
|
+
readonly response: v.ObjectSchema<{
|
|
1373
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1374
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1375
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1376
|
+
readonly from: v.StringSchema<undefined>;
|
|
1377
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
1378
|
+
}, undefined>, undefined>, undefined>;
|
|
1379
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1380
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1381
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
1382
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
1383
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1384
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1385
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1386
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1387
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1388
|
+
}, undefined>, undefined>;
|
|
1389
|
+
}, undefined>;
|
|
1390
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
1391
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
1392
|
+
/**
|
|
1393
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
1394
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
1395
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
1396
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
1397
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
1398
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
1399
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
1400
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
1401
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
1402
|
+
*/
|
|
1403
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
1404
|
+
}, undefined>;
|
|
1002
1405
|
}, undefined>], undefined>;
|
|
1003
1406
|
readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
1004
1407
|
}, undefined>;
|
|
@@ -1131,15 +1534,15 @@ export declare const testEnvironmentConnectionSchema: v.ObjectSchema<{
|
|
|
1131
1534
|
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
1132
1535
|
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
1133
1536
|
/**
|
|
1134
|
-
* Opaque, provider-specific configuration for a
|
|
1135
|
-
*
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
1138
|
-
*
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1141
|
-
* `baseUrl`/`tokenUrl`);
|
|
1142
|
-
* exported `UrlSafetyPolicy`).
|
|
1537
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
1538
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
1539
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
1540
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
1541
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
1542
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
1543
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
1544
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
1545
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
1143
1546
|
*/
|
|
1144
1547
|
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
1145
1548
|
}, undefined>;
|
|
@@ -1204,6 +1607,136 @@ export declare const testEnvironmentConnectionSchema: v.ObjectSchema<{
|
|
|
1204
1607
|
/** Extra annotations stamped on the namespace. */
|
|
1205
1608
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1206
1609
|
}, undefined>;
|
|
1610
|
+
}, undefined>, v.ObjectSchema<{
|
|
1611
|
+
readonly kind: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">, v.CheckAction<string, "reserved backend kind">]>;
|
|
1612
|
+
readonly manifest: v.ObjectSchema<{
|
|
1613
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1614
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1615
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
1616
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1617
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1618
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
1619
|
+
}, undefined>, v.ObjectSchema<{
|
|
1620
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
1621
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1622
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1623
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1624
|
+
}, undefined>;
|
|
1625
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
1626
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1627
|
+
}, undefined>, v.ObjectSchema<{
|
|
1628
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
1629
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1630
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1631
|
+
}, undefined>;
|
|
1632
|
+
}, undefined>, v.ObjectSchema<{
|
|
1633
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
1634
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
1635
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1636
|
+
}, undefined>;
|
|
1637
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
1638
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1639
|
+
}, undefined>;
|
|
1640
|
+
}, undefined>, v.ObjectSchema<{
|
|
1641
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
1642
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1643
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
1644
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1645
|
+
}, undefined>;
|
|
1646
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
1647
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1648
|
+
}, undefined>;
|
|
1649
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1650
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1651
|
+
}, undefined>, v.ObjectSchema<{
|
|
1652
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
1653
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
1654
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1655
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1656
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1657
|
+
}, undefined>;
|
|
1658
|
+
}, undefined>, undefined>;
|
|
1659
|
+
}, undefined>], undefined>;
|
|
1660
|
+
readonly provision: v.ObjectSchema<{
|
|
1661
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1662
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1663
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1664
|
+
readonly key: v.StringSchema<undefined>;
|
|
1665
|
+
readonly value: v.StringSchema<undefined>;
|
|
1666
|
+
}, undefined>, undefined>, undefined>;
|
|
1667
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1668
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1669
|
+
readonly value: v.StringSchema<undefined>;
|
|
1670
|
+
}, undefined>, undefined>, undefined>;
|
|
1671
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1672
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1673
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1674
|
+
}, undefined>;
|
|
1675
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
1676
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
1677
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1678
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1679
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1680
|
+
readonly key: v.StringSchema<undefined>;
|
|
1681
|
+
readonly value: v.StringSchema<undefined>;
|
|
1682
|
+
}, undefined>, undefined>, undefined>;
|
|
1683
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1684
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1685
|
+
readonly value: v.StringSchema<undefined>;
|
|
1686
|
+
}, undefined>, undefined>, undefined>;
|
|
1687
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1688
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1689
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1690
|
+
}, undefined>, undefined>;
|
|
1691
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
1692
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
1693
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1694
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1695
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1696
|
+
readonly key: v.StringSchema<undefined>;
|
|
1697
|
+
readonly value: v.StringSchema<undefined>;
|
|
1698
|
+
}, undefined>, undefined>, undefined>;
|
|
1699
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1700
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1701
|
+
readonly value: v.StringSchema<undefined>;
|
|
1702
|
+
}, undefined>, undefined>, undefined>;
|
|
1703
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1704
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1705
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1706
|
+
}, undefined>, undefined>;
|
|
1707
|
+
readonly response: v.ObjectSchema<{
|
|
1708
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1709
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1710
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1711
|
+
readonly from: v.StringSchema<undefined>;
|
|
1712
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
1713
|
+
}, undefined>, undefined>, undefined>;
|
|
1714
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1715
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1716
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
1717
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
1718
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1719
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1720
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1721
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1722
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1723
|
+
}, undefined>, undefined>;
|
|
1724
|
+
}, undefined>;
|
|
1725
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
1726
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
1727
|
+
/**
|
|
1728
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
1729
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
1730
|
+
* entirely; a custom backend — registered programmatically via `registerEnvironmentBackend`
|
|
1731
|
+
* (see `backend/docs/native-environment-adapter.md`) — reads + validates it off the per-call
|
|
1732
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
1733
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
1734
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
1735
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
1736
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
1737
|
+
*/
|
|
1738
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
1739
|
+
}, undefined>;
|
|
1207
1740
|
}, undefined>], undefined>, undefined>;
|
|
1208
1741
|
readonly secrets: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1209
1742
|
}, undefined>;
|