@cat-factory/contracts 0.53.0 → 0.55.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/entities.d.ts +48 -0
- package/dist/entities.d.ts.map +1 -1
- package/dist/entities.js +10 -1
- package/dist/entities.js.map +1 -1
- 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/agent-runs.d.ts +16 -0
- package/dist/routes/agent-runs.d.ts.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/execution.d.ts +64 -0
- package/dist/routes/execution.d.ts.map +1 -1
- package/dist/routes/human-review.d.ts +8 -0
- package/dist/routes/human-review.d.ts.map +1 -1
- package/dist/routes/human-test.d.ts +40 -0
- package/dist/routes/human-test.d.ts.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/visual-confirm.d.ts +24 -0
- package/dist/routes/visual-confirm.d.ts.map +1 -1
- package/dist/routes/workspaces.d.ts +32 -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 +32 -0
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/snapshot.js +17 -0
- package/dist/snapshot.js.map +1 -1
- package/dist/testing.d.ts +30 -0
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +32 -0
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/runners.d.ts
CHANGED
|
@@ -339,13 +339,24 @@ export declare const runnerPoolManifestSchema: v.ObjectSchema<{
|
|
|
339
339
|
}, undefined>;
|
|
340
340
|
}, undefined>;
|
|
341
341
|
export type RunnerPoolManifest = v.InferOutput<typeof runnerPoolManifestSchema>;
|
|
342
|
+
/** Built-in runner backend kinds the contract knows by name. */
|
|
343
|
+
export declare const RESERVED_RUNNER_BACKEND_KINDS: readonly ['manifest', 'kubernetes'];
|
|
344
|
+
/**
|
|
345
|
+
* The `kind` slug of a CUSTOM (third-party, programmatically-registered) runner backend:
|
|
346
|
+
* any lower-kebab slug that isn't a reserved built-in. A custom runner backend rides the
|
|
347
|
+
* generic `runnerPoolManifestSchema` body — its scheduler endpoints/secret refs live there
|
|
348
|
+
* exactly like the manifest built-in — and the registered `RunnerBackendProvider` (resolved
|
|
349
|
+
* by `kind`) builds the real transport. The reserved-kind guard stops a wrong-shaped
|
|
350
|
+
* built-in payload from silently matching this generic member instead of failing.
|
|
351
|
+
*/
|
|
352
|
+
export declare const customRunnerBackendKindSchema: 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">]>;
|
|
342
353
|
/**
|
|
343
354
|
* An "agent runner backend" config, discriminated by `kind`. This is the universal
|
|
344
|
-
* abstraction over WHERE repo-operating coding jobs run:
|
|
345
|
-
* HTTP scheduler pool) and `kubernetes` (native per-run pods)
|
|
346
|
-
*
|
|
347
|
-
* —
|
|
348
|
-
* `kind`.
|
|
355
|
+
* abstraction over WHERE repo-operating coding jobs run: the built-ins `manifest` (the BYO
|
|
356
|
+
* HTTP scheduler pool) and `kubernetes` (native per-run pods), plus any CUSTOM kind a
|
|
357
|
+
* deployment registers programmatically via `registerRunnerBackend` (it rides the generic
|
|
358
|
+
* manifest member — NO new variant needed). Mirrors `environmentBackendConfigSchema`; the
|
|
359
|
+
* provider-registry seam keys on `kind`.
|
|
349
360
|
*/
|
|
350
361
|
export declare const runnerBackendConfigSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
|
|
351
362
|
readonly kind: v.LiteralSchema<"manifest", undefined>;
|
|
@@ -544,6 +555,155 @@ export declare const runnerBackendConfigSchema: v.VariantSchema<"kind", [v.Objec
|
|
|
544
555
|
/** Extra pod metadata annotations. */
|
|
545
556
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
546
557
|
}, undefined>;
|
|
558
|
+
}, undefined>, v.ObjectSchema<{
|
|
559
|
+
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">]>;
|
|
560
|
+
readonly manifest: v.ObjectSchema<{
|
|
561
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
562
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
563
|
+
/** Scheduler API root; dispatch/poll/release paths are appended to it. */
|
|
564
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
565
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
566
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
567
|
+
}, undefined>, v.ObjectSchema<{
|
|
568
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
569
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
570
|
+
readonly secretRef: v.ObjectSchema<{
|
|
571
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
572
|
+
}, undefined>;
|
|
573
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
574
|
+
}, undefined>, v.ObjectSchema<{
|
|
575
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
576
|
+
readonly secretRef: v.ObjectSchema<{
|
|
577
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
578
|
+
}, undefined>;
|
|
579
|
+
}, undefined>, v.ObjectSchema<{
|
|
580
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
581
|
+
readonly usernameSecretRef: 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
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
585
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
586
|
+
}, undefined>;
|
|
587
|
+
}, undefined>, v.ObjectSchema<{
|
|
588
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
589
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
590
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
591
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
592
|
+
}, undefined>;
|
|
593
|
+
readonly clientSecretSecretRef: 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 scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
597
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
598
|
+
}, undefined>, v.ObjectSchema<{
|
|
599
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
600
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
601
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
602
|
+
readonly secretRef: 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
|
+
}, undefined>, undefined>;
|
|
606
|
+
}, undefined>], undefined>;
|
|
607
|
+
/** Starts a job on the pool (analogous to the harness `POST /run`). */
|
|
608
|
+
readonly dispatch: v.ObjectSchema<{
|
|
609
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
610
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
611
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
612
|
+
readonly key: v.StringSchema<undefined>;
|
|
613
|
+
readonly value: v.StringSchema<undefined>;
|
|
614
|
+
}, undefined>, undefined>, undefined>;
|
|
615
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
616
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
617
|
+
readonly value: v.StringSchema<undefined>;
|
|
618
|
+
}, undefined>, undefined>, undefined>;
|
|
619
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
620
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
621
|
+
}, undefined>;
|
|
622
|
+
/** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
|
|
623
|
+
readonly poll: v.ObjectSchema<{
|
|
624
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
625
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
626
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
627
|
+
readonly key: v.StringSchema<undefined>;
|
|
628
|
+
readonly value: v.StringSchema<undefined>;
|
|
629
|
+
}, undefined>, undefined>, undefined>;
|
|
630
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
631
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
632
|
+
readonly value: v.StringSchema<undefined>;
|
|
633
|
+
}, undefined>, undefined>, undefined>;
|
|
634
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
635
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
636
|
+
}, undefined>;
|
|
637
|
+
/** Optional: frees the runner/job once the worker is done with it. */
|
|
638
|
+
readonly release: v.OptionalSchema<v.ObjectSchema<{
|
|
639
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
640
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
641
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
642
|
+
readonly key: v.StringSchema<undefined>;
|
|
643
|
+
readonly value: v.StringSchema<undefined>;
|
|
644
|
+
}, undefined>, undefined>, undefined>;
|
|
645
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
646
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
647
|
+
readonly value: v.StringSchema<undefined>;
|
|
648
|
+
}, undefined>, undefined>, undefined>;
|
|
649
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
650
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
651
|
+
}, undefined>, undefined>;
|
|
652
|
+
readonly response: v.ObjectSchema<{
|
|
653
|
+
/** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
|
|
654
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
655
|
+
/** Translate scheduler status strings → harness states. */
|
|
656
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
657
|
+
readonly from: v.StringSchema<undefined>;
|
|
658
|
+
readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
|
|
659
|
+
}, undefined>, undefined>, undefined>;
|
|
660
|
+
/** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
|
|
661
|
+
readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
662
|
+
readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
663
|
+
readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
664
|
+
/** Dot-paths to the finished work product. */
|
|
665
|
+
readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
666
|
+
readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
667
|
+
readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
668
|
+
/**
|
|
669
|
+
* Dot-path to the WHOLE structured result object the harness records (the
|
|
670
|
+
* harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
|
|
671
|
+
* defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
|
|
672
|
+
* executor-harness verbatim should set this so EVERY structured product — the
|
|
673
|
+
* blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
|
|
674
|
+
* default branch — is forwarded, not just the PR url/branch/summary scalars. Known
|
|
675
|
+
* fields are coerced by type; unknown ones are ignored. The individual scalar paths
|
|
676
|
+
* above still apply (and override) for schedulers that surface them out-of-envelope.
|
|
677
|
+
*/
|
|
678
|
+
readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
679
|
+
/**
|
|
680
|
+
* Dot-path to the array of forward-looking follow-up / question items the Coder streamed
|
|
681
|
+
* since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
|
|
682
|
+
* the cat-factory executor-harness verbatim should set this to `followUps` so the
|
|
683
|
+
* Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
|
|
684
|
+
* never streams — the engine still gates on whatever items did arrive). Each entry is
|
|
685
|
+
* coerced to `{ kind, title, detail?, suggestedAction? }`.
|
|
686
|
+
*/
|
|
687
|
+
readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
688
|
+
/** Dot-path to a job-level error message (a failed job, or a structured error). */
|
|
689
|
+
readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
690
|
+
/**
|
|
691
|
+
* Dot-path to the harness's STRUCTURED failure cause on a failed job (the harness
|
|
692
|
+
* `failureCause`: `inactivity-timeout` | `max-duration` | `agent` | `git` | `api` |
|
|
693
|
+
* `no-usable-output` | `no-changes`). A pool that proxies the cat-factory executor-harness
|
|
694
|
+
* verbatim should set this to `failureCause` so the engine classifies the failure WITHOUT
|
|
695
|
+
* regex-matching the error string — exactly like a Cloudflare container. Absent ⇒ the engine
|
|
696
|
+
* falls back to the (still-stable) error-string regex.
|
|
697
|
+
*/
|
|
698
|
+
readonly failureCausePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
699
|
+
/**
|
|
700
|
+
* Dot-path to the harness's extended, redacted failure `detail` (phase-timing breakdown,
|
|
701
|
+
* last-tool breadcrumb) on a failed job, distinct from the one-line error. Surfaced as the
|
|
702
|
+
* failure detail on the board. A verbatim-proxy pool should set this to `detail`.
|
|
703
|
+
*/
|
|
704
|
+
readonly detailPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
705
|
+
}, undefined>;
|
|
706
|
+
}, undefined>;
|
|
547
707
|
}, undefined>], undefined>;
|
|
548
708
|
export type RunnerBackendConfig = v.InferOutput<typeof runnerBackendConfigSchema>;
|
|
549
709
|
export type RunnerBackendKind = RunnerBackendConfig['kind'];
|
|
@@ -759,20 +919,8 @@ export declare const runnerPoolConnectionSchema: v.ObjectSchema<{
|
|
|
759
919
|
/** Extra pod metadata annotations. */
|
|
760
920
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
761
921
|
}, undefined>;
|
|
762
|
-
}, undefined
|
|
763
|
-
|
|
764
|
-
export type RunnerPoolConnection = v.InferOutput<typeof runnerPoolConnectionSchema>;
|
|
765
|
-
/**
|
|
766
|
-
* Register (or replace) a workspace's runner backend. `config` is the discriminated
|
|
767
|
-
* backend config (manifest pool or Kubernetes); the org supplies the actual
|
|
768
|
-
* per-tenant secret values here (write-only) — a manifest's scheduler-API
|
|
769
|
-
* credentials, or a Kubernetes ServiceAccount token (`apiToken`). Secrets are
|
|
770
|
-
* encrypted at rest and never returned. Every secret key the chosen backend
|
|
771
|
-
* references must have a matching entry in `secrets`.
|
|
772
|
-
*/
|
|
773
|
-
export declare const registerRunnerPoolSchema: v.ObjectSchema<{
|
|
774
|
-
readonly config: v.VariantSchema<"kind", [v.ObjectSchema<{
|
|
775
|
-
readonly kind: v.LiteralSchema<"manifest", undefined>;
|
|
922
|
+
}, undefined>, v.ObjectSchema<{
|
|
923
|
+
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">]>;
|
|
776
924
|
readonly manifest: v.ObjectSchema<{
|
|
777
925
|
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
778
926
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
@@ -920,69 +1068,19 @@ export declare const registerRunnerPoolSchema: v.ObjectSchema<{
|
|
|
920
1068
|
readonly detailPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
921
1069
|
}, undefined>;
|
|
922
1070
|
}, undefined>;
|
|
923
|
-
}, undefined>,
|
|
924
|
-
readonly kind: v.LiteralSchema<"kubernetes", undefined>;
|
|
925
|
-
readonly kubernetes: v.ObjectSchema<{
|
|
926
|
-
/** Human label for the connection (shown in the UI). */
|
|
927
|
-
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
928
|
-
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
929
|
-
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
930
|
-
/** Namespace the per-run pods are created in. */
|
|
931
|
-
readonly namespace: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "must be a valid Kubernetes namespace">]>;
|
|
932
|
-
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
933
|
-
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
934
|
-
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
935
|
-
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
936
|
-
/** The executor-harness image the pod runs (the `default` image variant). */
|
|
937
|
-
readonly image: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
938
|
-
/** The heavier UI-tester image (Playwright), used for `image:'ui'` dispatches. */
|
|
939
|
-
readonly imageUi: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
940
|
-
/** Container port the harness HTTP server listens on (default 8080). */
|
|
941
|
-
readonly harnessPort: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
942
|
-
/** Name of an `imagePullSecrets` entry for a private registry. */
|
|
943
|
-
readonly imagePullSecretName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
944
|
-
/** ServiceAccount the pod runs as (NOT the token used to call the apiserver). */
|
|
945
|
-
readonly serviceAccountName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
946
|
-
/** Default pod resource requests/limits applied to every run pod. */
|
|
947
|
-
readonly resources: v.OptionalSchema<v.ObjectSchema<{
|
|
948
|
-
readonly requests: v.OptionalSchema<v.ObjectSchema<{
|
|
949
|
-
readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
950
|
-
readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
951
|
-
}, undefined>, undefined>;
|
|
952
|
-
readonly limits: v.OptionalSchema<v.ObjectSchema<{
|
|
953
|
-
readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
954
|
-
readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
955
|
-
}, undefined>, undefined>;
|
|
956
|
-
}, undefined>, undefined>;
|
|
957
|
-
/** Per-instance-size limit overrides (t-shirt InstanceSize → cpu/memory). */
|
|
958
|
-
readonly resourcesBySize: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
959
|
-
readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
960
|
-
readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
961
|
-
}, undefined>, undefined>, undefined>;
|
|
962
|
-
/** Pod `nodeSelector`. */
|
|
963
|
-
readonly nodeSelector: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
964
|
-
/** Pod tolerations (passed through to the pod spec verbatim). */
|
|
965
|
-
readonly tolerations: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
|
|
966
|
-
/** Extra pod metadata labels. */
|
|
967
|
-
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
968
|
-
/** Extra pod metadata annotations. */
|
|
969
|
-
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
970
|
-
}, undefined>;
|
|
971
|
-
}, undefined>], undefined>;
|
|
972
|
-
readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
973
|
-
}, undefined>;
|
|
974
|
-
export type RegisterRunnerPoolInput = v.InferOutput<typeof registerRunnerPoolSchema>;
|
|
975
|
-
/** Rotate/replace the per-tenant secret bundle without re-sending the manifest. */
|
|
976
|
-
export declare const updateRunnerPoolSecretsSchema: v.ObjectSchema<{
|
|
977
|
-
readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
1071
|
+
}, undefined>], undefined>, undefined>;
|
|
978
1072
|
}, undefined>;
|
|
979
|
-
export type
|
|
1073
|
+
export type RunnerPoolConnection = v.InferOutput<typeof runnerPoolConnectionSchema>;
|
|
980
1074
|
/**
|
|
981
|
-
*
|
|
982
|
-
*
|
|
1075
|
+
* Register (or replace) a workspace's runner backend. `config` is the discriminated
|
|
1076
|
+
* backend config (manifest pool or Kubernetes); the org supplies the actual
|
|
1077
|
+
* per-tenant secret values here (write-only) — a manifest's scheduler-API
|
|
1078
|
+
* credentials, or a Kubernetes ServiceAccount token (`apiToken`). Secrets are
|
|
1079
|
+
* encrypted at rest and never returned. Every secret key the chosen backend
|
|
1080
|
+
* references must have a matching entry in `secrets`.
|
|
983
1081
|
*/
|
|
984
|
-
export declare const
|
|
985
|
-
readonly config: v.
|
|
1082
|
+
export declare const registerRunnerPoolSchema: v.ObjectSchema<{
|
|
1083
|
+
readonly config: v.VariantSchema<"kind", [v.ObjectSchema<{
|
|
986
1084
|
readonly kind: v.LiteralSchema<"manifest", undefined>;
|
|
987
1085
|
readonly manifest: v.ObjectSchema<{
|
|
988
1086
|
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
@@ -1179,6 +1277,515 @@ export declare const testRunnerPoolConnectionSchema: v.ObjectSchema<{
|
|
|
1179
1277
|
/** Extra pod metadata annotations. */
|
|
1180
1278
|
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1181
1279
|
}, undefined>;
|
|
1280
|
+
}, undefined>, v.ObjectSchema<{
|
|
1281
|
+
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">]>;
|
|
1282
|
+
readonly manifest: v.ObjectSchema<{
|
|
1283
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1284
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1285
|
+
/** Scheduler API root; dispatch/poll/release paths are appended to it. */
|
|
1286
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1287
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1288
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
1289
|
+
}, undefined>, v.ObjectSchema<{
|
|
1290
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
1291
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1292
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1293
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1294
|
+
}, undefined>;
|
|
1295
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1296
|
+
}, undefined>, v.ObjectSchema<{
|
|
1297
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
1298
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1299
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1300
|
+
}, undefined>;
|
|
1301
|
+
}, undefined>, v.ObjectSchema<{
|
|
1302
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
1303
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
1304
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1305
|
+
}, undefined>;
|
|
1306
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
1307
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1308
|
+
}, undefined>;
|
|
1309
|
+
}, undefined>, v.ObjectSchema<{
|
|
1310
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
1311
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1312
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
1313
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1314
|
+
}, undefined>;
|
|
1315
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
1316
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1317
|
+
}, undefined>;
|
|
1318
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1319
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1320
|
+
}, undefined>, v.ObjectSchema<{
|
|
1321
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
1322
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
1323
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1324
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1325
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1326
|
+
}, undefined>;
|
|
1327
|
+
}, undefined>, undefined>;
|
|
1328
|
+
}, undefined>], undefined>;
|
|
1329
|
+
/** Starts a job on the pool (analogous to the harness `POST /run`). */
|
|
1330
|
+
readonly dispatch: v.ObjectSchema<{
|
|
1331
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1332
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1333
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1334
|
+
readonly key: v.StringSchema<undefined>;
|
|
1335
|
+
readonly value: v.StringSchema<undefined>;
|
|
1336
|
+
}, undefined>, undefined>, undefined>;
|
|
1337
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1338
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1339
|
+
readonly value: v.StringSchema<undefined>;
|
|
1340
|
+
}, undefined>, undefined>, undefined>;
|
|
1341
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1342
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1343
|
+
}, undefined>;
|
|
1344
|
+
/** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
|
|
1345
|
+
readonly poll: v.ObjectSchema<{
|
|
1346
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1347
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1348
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1349
|
+
readonly key: v.StringSchema<undefined>;
|
|
1350
|
+
readonly value: v.StringSchema<undefined>;
|
|
1351
|
+
}, undefined>, undefined>, undefined>;
|
|
1352
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1353
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1354
|
+
readonly value: v.StringSchema<undefined>;
|
|
1355
|
+
}, undefined>, undefined>, undefined>;
|
|
1356
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1357
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1358
|
+
}, undefined>;
|
|
1359
|
+
/** Optional: frees the runner/job once the worker is done with it. */
|
|
1360
|
+
readonly release: v.OptionalSchema<v.ObjectSchema<{
|
|
1361
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1362
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1363
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1364
|
+
readonly key: v.StringSchema<undefined>;
|
|
1365
|
+
readonly value: v.StringSchema<undefined>;
|
|
1366
|
+
}, undefined>, undefined>, undefined>;
|
|
1367
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1368
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1369
|
+
readonly value: v.StringSchema<undefined>;
|
|
1370
|
+
}, undefined>, undefined>, undefined>;
|
|
1371
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1372
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1373
|
+
}, undefined>, undefined>;
|
|
1374
|
+
readonly response: v.ObjectSchema<{
|
|
1375
|
+
/** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
|
|
1376
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1377
|
+
/** Translate scheduler status strings → harness states. */
|
|
1378
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1379
|
+
readonly from: v.StringSchema<undefined>;
|
|
1380
|
+
readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
|
|
1381
|
+
}, undefined>, undefined>, undefined>;
|
|
1382
|
+
/** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
|
|
1383
|
+
readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1384
|
+
readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1385
|
+
readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1386
|
+
/** Dot-paths to the finished work product. */
|
|
1387
|
+
readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1388
|
+
readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1389
|
+
readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1390
|
+
/**
|
|
1391
|
+
* Dot-path to the WHOLE structured result object the harness records (the
|
|
1392
|
+
* harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
|
|
1393
|
+
* defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
|
|
1394
|
+
* executor-harness verbatim should set this so EVERY structured product — the
|
|
1395
|
+
* blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
|
|
1396
|
+
* default branch — is forwarded, not just the PR url/branch/summary scalars. Known
|
|
1397
|
+
* fields are coerced by type; unknown ones are ignored. The individual scalar paths
|
|
1398
|
+
* above still apply (and override) for schedulers that surface them out-of-envelope.
|
|
1399
|
+
*/
|
|
1400
|
+
readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Dot-path to the array of forward-looking follow-up / question items the Coder streamed
|
|
1403
|
+
* since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
|
|
1404
|
+
* the cat-factory executor-harness verbatim should set this to `followUps` so the
|
|
1405
|
+
* Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
|
|
1406
|
+
* never streams — the engine still gates on whatever items did arrive). Each entry is
|
|
1407
|
+
* coerced to `{ kind, title, detail?, suggestedAction? }`.
|
|
1408
|
+
*/
|
|
1409
|
+
readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1410
|
+
/** Dot-path to a job-level error message (a failed job, or a structured error). */
|
|
1411
|
+
readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1412
|
+
/**
|
|
1413
|
+
* Dot-path to the harness's STRUCTURED failure cause on a failed job (the harness
|
|
1414
|
+
* `failureCause`: `inactivity-timeout` | `max-duration` | `agent` | `git` | `api` |
|
|
1415
|
+
* `no-usable-output` | `no-changes`). A pool that proxies the cat-factory executor-harness
|
|
1416
|
+
* verbatim should set this to `failureCause` so the engine classifies the failure WITHOUT
|
|
1417
|
+
* regex-matching the error string — exactly like a Cloudflare container. Absent ⇒ the engine
|
|
1418
|
+
* falls back to the (still-stable) error-string regex.
|
|
1419
|
+
*/
|
|
1420
|
+
readonly failureCausePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Dot-path to the harness's extended, redacted failure `detail` (phase-timing breakdown,
|
|
1423
|
+
* last-tool breadcrumb) on a failed job, distinct from the one-line error. Surfaced as the
|
|
1424
|
+
* failure detail on the board. A verbatim-proxy pool should set this to `detail`.
|
|
1425
|
+
*/
|
|
1426
|
+
readonly detailPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1427
|
+
}, undefined>;
|
|
1428
|
+
}, undefined>;
|
|
1429
|
+
}, undefined>], undefined>;
|
|
1430
|
+
readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
1431
|
+
}, undefined>;
|
|
1432
|
+
export type RegisterRunnerPoolInput = v.InferOutput<typeof registerRunnerPoolSchema>;
|
|
1433
|
+
/** Rotate/replace the per-tenant secret bundle without re-sending the manifest. */
|
|
1434
|
+
export declare const updateRunnerPoolSecretsSchema: v.ObjectSchema<{
|
|
1435
|
+
readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
1436
|
+
}, undefined>;
|
|
1437
|
+
export type UpdateRunnerPoolSecretsInput = v.InferOutput<typeof updateRunnerPoolSecretsSchema>;
|
|
1438
|
+
/**
|
|
1439
|
+
* Test (probe) a runner-backend connection before saving: supply the candidate
|
|
1440
|
+
* discriminated `config` + its `secrets`. Nothing is persisted by a test.
|
|
1441
|
+
*/
|
|
1442
|
+
export declare const testRunnerPoolConnectionSchema: v.ObjectSchema<{
|
|
1443
|
+
readonly config: v.OptionalSchema<v.VariantSchema<"kind", [v.ObjectSchema<{
|
|
1444
|
+
readonly kind: v.LiteralSchema<"manifest", undefined>;
|
|
1445
|
+
readonly manifest: v.ObjectSchema<{
|
|
1446
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1447
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1448
|
+
/** Scheduler API root; dispatch/poll/release paths are appended to it. */
|
|
1449
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1450
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1451
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
1452
|
+
}, undefined>, v.ObjectSchema<{
|
|
1453
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
1454
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1455
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1456
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1457
|
+
}, undefined>;
|
|
1458
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1459
|
+
}, undefined>, v.ObjectSchema<{
|
|
1460
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
1461
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1462
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1463
|
+
}, undefined>;
|
|
1464
|
+
}, undefined>, v.ObjectSchema<{
|
|
1465
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
1466
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
1467
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1468
|
+
}, undefined>;
|
|
1469
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
1470
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1471
|
+
}, undefined>;
|
|
1472
|
+
}, undefined>, v.ObjectSchema<{
|
|
1473
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
1474
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1475
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
1476
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1477
|
+
}, undefined>;
|
|
1478
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
1479
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1480
|
+
}, undefined>;
|
|
1481
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1482
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1483
|
+
}, undefined>, v.ObjectSchema<{
|
|
1484
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
1485
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
1486
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1487
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1488
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1489
|
+
}, undefined>;
|
|
1490
|
+
}, undefined>, undefined>;
|
|
1491
|
+
}, undefined>], undefined>;
|
|
1492
|
+
/** Starts a job on the pool (analogous to the harness `POST /run`). */
|
|
1493
|
+
readonly dispatch: v.ObjectSchema<{
|
|
1494
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1495
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1496
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1497
|
+
readonly key: v.StringSchema<undefined>;
|
|
1498
|
+
readonly value: v.StringSchema<undefined>;
|
|
1499
|
+
}, undefined>, undefined>, undefined>;
|
|
1500
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1501
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1502
|
+
readonly value: v.StringSchema<undefined>;
|
|
1503
|
+
}, undefined>, undefined>, undefined>;
|
|
1504
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1505
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1506
|
+
}, undefined>;
|
|
1507
|
+
/** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
|
|
1508
|
+
readonly poll: v.ObjectSchema<{
|
|
1509
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1510
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1511
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1512
|
+
readonly key: v.StringSchema<undefined>;
|
|
1513
|
+
readonly value: v.StringSchema<undefined>;
|
|
1514
|
+
}, undefined>, undefined>, undefined>;
|
|
1515
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1516
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1517
|
+
readonly value: v.StringSchema<undefined>;
|
|
1518
|
+
}, undefined>, undefined>, undefined>;
|
|
1519
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1520
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1521
|
+
}, undefined>;
|
|
1522
|
+
/** Optional: frees the runner/job once the worker is done with it. */
|
|
1523
|
+
readonly release: v.OptionalSchema<v.ObjectSchema<{
|
|
1524
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1525
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1526
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1527
|
+
readonly key: v.StringSchema<undefined>;
|
|
1528
|
+
readonly value: v.StringSchema<undefined>;
|
|
1529
|
+
}, undefined>, undefined>, undefined>;
|
|
1530
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1531
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1532
|
+
readonly value: v.StringSchema<undefined>;
|
|
1533
|
+
}, undefined>, undefined>, undefined>;
|
|
1534
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1535
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1536
|
+
}, undefined>, undefined>;
|
|
1537
|
+
readonly response: v.ObjectSchema<{
|
|
1538
|
+
/** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
|
|
1539
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1540
|
+
/** Translate scheduler status strings → harness states. */
|
|
1541
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1542
|
+
readonly from: v.StringSchema<undefined>;
|
|
1543
|
+
readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
|
|
1544
|
+
}, undefined>, undefined>, undefined>;
|
|
1545
|
+
/** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
|
|
1546
|
+
readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1547
|
+
readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1548
|
+
readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1549
|
+
/** Dot-paths to the finished work product. */
|
|
1550
|
+
readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1551
|
+
readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1552
|
+
readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1553
|
+
/**
|
|
1554
|
+
* Dot-path to the WHOLE structured result object the harness records (the
|
|
1555
|
+
* harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
|
|
1556
|
+
* defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
|
|
1557
|
+
* executor-harness verbatim should set this so EVERY structured product — the
|
|
1558
|
+
* blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
|
|
1559
|
+
* default branch — is forwarded, not just the PR url/branch/summary scalars. Known
|
|
1560
|
+
* fields are coerced by type; unknown ones are ignored. The individual scalar paths
|
|
1561
|
+
* above still apply (and override) for schedulers that surface them out-of-envelope.
|
|
1562
|
+
*/
|
|
1563
|
+
readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1564
|
+
/**
|
|
1565
|
+
* Dot-path to the array of forward-looking follow-up / question items the Coder streamed
|
|
1566
|
+
* since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
|
|
1567
|
+
* the cat-factory executor-harness verbatim should set this to `followUps` so the
|
|
1568
|
+
* Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
|
|
1569
|
+
* never streams — the engine still gates on whatever items did arrive). Each entry is
|
|
1570
|
+
* coerced to `{ kind, title, detail?, suggestedAction? }`.
|
|
1571
|
+
*/
|
|
1572
|
+
readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1573
|
+
/** Dot-path to a job-level error message (a failed job, or a structured error). */
|
|
1574
|
+
readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1575
|
+
/**
|
|
1576
|
+
* Dot-path to the harness's STRUCTURED failure cause on a failed job (the harness
|
|
1577
|
+
* `failureCause`: `inactivity-timeout` | `max-duration` | `agent` | `git` | `api` |
|
|
1578
|
+
* `no-usable-output` | `no-changes`). A pool that proxies the cat-factory executor-harness
|
|
1579
|
+
* verbatim should set this to `failureCause` so the engine classifies the failure WITHOUT
|
|
1580
|
+
* regex-matching the error string — exactly like a Cloudflare container. Absent ⇒ the engine
|
|
1581
|
+
* falls back to the (still-stable) error-string regex.
|
|
1582
|
+
*/
|
|
1583
|
+
readonly failureCausePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1584
|
+
/**
|
|
1585
|
+
* Dot-path to the harness's extended, redacted failure `detail` (phase-timing breakdown,
|
|
1586
|
+
* last-tool breadcrumb) on a failed job, distinct from the one-line error. Surfaced as the
|
|
1587
|
+
* failure detail on the board. A verbatim-proxy pool should set this to `detail`.
|
|
1588
|
+
*/
|
|
1589
|
+
readonly detailPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1590
|
+
}, undefined>;
|
|
1591
|
+
}, undefined>;
|
|
1592
|
+
}, undefined>, v.ObjectSchema<{
|
|
1593
|
+
readonly kind: v.LiteralSchema<"kubernetes", undefined>;
|
|
1594
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
1595
|
+
/** Human label for the connection (shown in the UI). */
|
|
1596
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1597
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
1598
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1599
|
+
/** Namespace the per-run pods are created in. */
|
|
1600
|
+
readonly namespace: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "must be a valid Kubernetes namespace">]>;
|
|
1601
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
1602
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1603
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
1604
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1605
|
+
/** The executor-harness image the pod runs (the `default` image variant). */
|
|
1606
|
+
readonly image: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
1607
|
+
/** The heavier UI-tester image (Playwright), used for `image:'ui'` dispatches. */
|
|
1608
|
+
readonly imageUi: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1609
|
+
/** Container port the harness HTTP server listens on (default 8080). */
|
|
1610
|
+
readonly harnessPort: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
1611
|
+
/** Name of an `imagePullSecrets` entry for a private registry. */
|
|
1612
|
+
readonly imagePullSecretName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1613
|
+
/** ServiceAccount the pod runs as (NOT the token used to call the apiserver). */
|
|
1614
|
+
readonly serviceAccountName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1615
|
+
/** Default pod resource requests/limits applied to every run pod. */
|
|
1616
|
+
readonly resources: v.OptionalSchema<v.ObjectSchema<{
|
|
1617
|
+
readonly requests: v.OptionalSchema<v.ObjectSchema<{
|
|
1618
|
+
readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1619
|
+
readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1620
|
+
}, undefined>, undefined>;
|
|
1621
|
+
readonly limits: v.OptionalSchema<v.ObjectSchema<{
|
|
1622
|
+
readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1623
|
+
readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1624
|
+
}, undefined>, undefined>;
|
|
1625
|
+
}, undefined>, undefined>;
|
|
1626
|
+
/** Per-instance-size limit overrides (t-shirt InstanceSize → cpu/memory). */
|
|
1627
|
+
readonly resourcesBySize: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
1628
|
+
readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1629
|
+
readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1630
|
+
}, undefined>, undefined>, undefined>;
|
|
1631
|
+
/** Pod `nodeSelector`. */
|
|
1632
|
+
readonly nodeSelector: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1633
|
+
/** Pod tolerations (passed through to the pod spec verbatim). */
|
|
1634
|
+
readonly tolerations: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
|
|
1635
|
+
/** Extra pod metadata labels. */
|
|
1636
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1637
|
+
/** Extra pod metadata annotations. */
|
|
1638
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1639
|
+
}, undefined>;
|
|
1640
|
+
}, undefined>, v.ObjectSchema<{
|
|
1641
|
+
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">]>;
|
|
1642
|
+
readonly manifest: v.ObjectSchema<{
|
|
1643
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1644
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1645
|
+
/** Scheduler API root; dispatch/poll/release paths are appended to it. */
|
|
1646
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1647
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1648
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
1649
|
+
}, undefined>, v.ObjectSchema<{
|
|
1650
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
1651
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1652
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1653
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1654
|
+
}, undefined>;
|
|
1655
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1656
|
+
}, undefined>, v.ObjectSchema<{
|
|
1657
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
1658
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1659
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1660
|
+
}, undefined>;
|
|
1661
|
+
}, undefined>, v.ObjectSchema<{
|
|
1662
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
1663
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
1664
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1665
|
+
}, undefined>;
|
|
1666
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
1667
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1668
|
+
}, undefined>;
|
|
1669
|
+
}, undefined>, v.ObjectSchema<{
|
|
1670
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
1671
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1672
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
1673
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1674
|
+
}, undefined>;
|
|
1675
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
1676
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1677
|
+
}, undefined>;
|
|
1678
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1679
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1680
|
+
}, undefined>, v.ObjectSchema<{
|
|
1681
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
1682
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
1683
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1684
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1685
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1686
|
+
}, undefined>;
|
|
1687
|
+
}, undefined>, undefined>;
|
|
1688
|
+
}, undefined>], undefined>;
|
|
1689
|
+
/** Starts a job on the pool (analogous to the harness `POST /run`). */
|
|
1690
|
+
readonly dispatch: v.ObjectSchema<{
|
|
1691
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1692
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1693
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1694
|
+
readonly key: v.StringSchema<undefined>;
|
|
1695
|
+
readonly value: v.StringSchema<undefined>;
|
|
1696
|
+
}, undefined>, undefined>, undefined>;
|
|
1697
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1698
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1699
|
+
readonly value: v.StringSchema<undefined>;
|
|
1700
|
+
}, undefined>, undefined>, undefined>;
|
|
1701
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1702
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1703
|
+
}, undefined>;
|
|
1704
|
+
/** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
|
|
1705
|
+
readonly poll: v.ObjectSchema<{
|
|
1706
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1707
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1708
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1709
|
+
readonly key: v.StringSchema<undefined>;
|
|
1710
|
+
readonly value: v.StringSchema<undefined>;
|
|
1711
|
+
}, undefined>, undefined>, undefined>;
|
|
1712
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1713
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1714
|
+
readonly value: v.StringSchema<undefined>;
|
|
1715
|
+
}, undefined>, undefined>, undefined>;
|
|
1716
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1717
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1718
|
+
}, undefined>;
|
|
1719
|
+
/** Optional: frees the runner/job once the worker is done with it. */
|
|
1720
|
+
readonly release: v.OptionalSchema<v.ObjectSchema<{
|
|
1721
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1722
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1723
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1724
|
+
readonly key: v.StringSchema<undefined>;
|
|
1725
|
+
readonly value: v.StringSchema<undefined>;
|
|
1726
|
+
}, undefined>, undefined>, undefined>;
|
|
1727
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1728
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1729
|
+
readonly value: v.StringSchema<undefined>;
|
|
1730
|
+
}, undefined>, undefined>, undefined>;
|
|
1731
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1732
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1733
|
+
}, undefined>, undefined>;
|
|
1734
|
+
readonly response: v.ObjectSchema<{
|
|
1735
|
+
/** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
|
|
1736
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1737
|
+
/** Translate scheduler status strings → harness states. */
|
|
1738
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1739
|
+
readonly from: v.StringSchema<undefined>;
|
|
1740
|
+
readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
|
|
1741
|
+
}, undefined>, undefined>, undefined>;
|
|
1742
|
+
/** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
|
|
1743
|
+
readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1744
|
+
readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1745
|
+
readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1746
|
+
/** Dot-paths to the finished work product. */
|
|
1747
|
+
readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1748
|
+
readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1749
|
+
readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1750
|
+
/**
|
|
1751
|
+
* Dot-path to the WHOLE structured result object the harness records (the
|
|
1752
|
+
* harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
|
|
1753
|
+
* defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
|
|
1754
|
+
* executor-harness verbatim should set this so EVERY structured product — the
|
|
1755
|
+
* blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
|
|
1756
|
+
* default branch — is forwarded, not just the PR url/branch/summary scalars. Known
|
|
1757
|
+
* fields are coerced by type; unknown ones are ignored. The individual scalar paths
|
|
1758
|
+
* above still apply (and override) for schedulers that surface them out-of-envelope.
|
|
1759
|
+
*/
|
|
1760
|
+
readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1761
|
+
/**
|
|
1762
|
+
* Dot-path to the array of forward-looking follow-up / question items the Coder streamed
|
|
1763
|
+
* since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
|
|
1764
|
+
* the cat-factory executor-harness verbatim should set this to `followUps` so the
|
|
1765
|
+
* Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
|
|
1766
|
+
* never streams — the engine still gates on whatever items did arrive). Each entry is
|
|
1767
|
+
* coerced to `{ kind, title, detail?, suggestedAction? }`.
|
|
1768
|
+
*/
|
|
1769
|
+
readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1770
|
+
/** Dot-path to a job-level error message (a failed job, or a structured error). */
|
|
1771
|
+
readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1772
|
+
/**
|
|
1773
|
+
* Dot-path to the harness's STRUCTURED failure cause on a failed job (the harness
|
|
1774
|
+
* `failureCause`: `inactivity-timeout` | `max-duration` | `agent` | `git` | `api` |
|
|
1775
|
+
* `no-usable-output` | `no-changes`). A pool that proxies the cat-factory executor-harness
|
|
1776
|
+
* verbatim should set this to `failureCause` so the engine classifies the failure WITHOUT
|
|
1777
|
+
* regex-matching the error string — exactly like a Cloudflare container. Absent ⇒ the engine
|
|
1778
|
+
* falls back to the (still-stable) error-string regex.
|
|
1779
|
+
*/
|
|
1780
|
+
readonly failureCausePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1781
|
+
/**
|
|
1782
|
+
* Dot-path to the harness's extended, redacted failure `detail` (phase-timing breakdown,
|
|
1783
|
+
* last-tool breadcrumb) on a failed job, distinct from the one-line error. Surfaced as the
|
|
1784
|
+
* failure detail on the board. A verbatim-proxy pool should set this to `detail`.
|
|
1785
|
+
*/
|
|
1786
|
+
readonly detailPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1787
|
+
}, undefined>;
|
|
1788
|
+
}, undefined>;
|
|
1182
1789
|
}, undefined>], undefined>, undefined>;
|
|
1183
1790
|
readonly secrets: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1184
1791
|
}, undefined>;
|