@cat-factory/contracts 0.47.0 → 0.48.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/runners.d.ts CHANGED
@@ -120,6 +120,61 @@ export declare const runnerPoolResponseMappingSchema: v.ObjectSchema<{
120
120
  readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
121
121
  }, undefined>;
122
122
  export type RunnerPoolResponseMapping = v.InferOutput<typeof runnerPoolResponseMappingSchema>;
123
+ /** CPU/memory pair for a pod resource request or limit (k8s quantity strings). */
124
+ export declare const kubernetesResourceQuantitiesSchema: v.ObjectSchema<{
125
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
126
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
127
+ }, undefined>;
128
+ export type KubernetesResourceQuantities = v.InferOutput<typeof kubernetesResourceQuantitiesSchema>;
129
+ /** The secret-bundle key the Kubernetes backend reads the ServiceAccount token from. */
130
+ export declare const KUBERNETES_RUNNER_TOKEN_SECRET_KEY = "apiToken";
131
+ export declare const kubernetesRunnerConfigSchema: v.ObjectSchema<{
132
+ /** Human label for the connection (shown in the UI). */
133
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
134
+ /** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
135
+ readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
136
+ /** Namespace the per-run pods are created in. */
137
+ readonly namespace: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "must be a valid Kubernetes namespace">]>;
138
+ /** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
139
+ readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
140
+ /** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
141
+ readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
142
+ /** The executor-harness image the pod runs (the `default` image variant). */
143
+ readonly image: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
144
+ /** The heavier UI-tester image (Playwright), used for `image:'ui'` dispatches. */
145
+ readonly imageUi: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
146
+ /** Container port the harness HTTP server listens on (default 8080). */
147
+ 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>;
148
+ /** Name of an `imagePullSecrets` entry for a private registry. */
149
+ readonly imagePullSecretName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
150
+ /** ServiceAccount the pod runs as (NOT the token used to call the apiserver). */
151
+ readonly serviceAccountName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
152
+ /** Default pod resource requests/limits applied to every run pod. */
153
+ readonly resources: v.OptionalSchema<v.ObjectSchema<{
154
+ readonly requests: v.OptionalSchema<v.ObjectSchema<{
155
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
156
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
157
+ }, undefined>, undefined>;
158
+ readonly limits: v.OptionalSchema<v.ObjectSchema<{
159
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
160
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
161
+ }, undefined>, undefined>;
162
+ }, undefined>, undefined>;
163
+ /** Per-instance-size limit overrides (t-shirt InstanceSize → cpu/memory). */
164
+ readonly resourcesBySize: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
165
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
166
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
167
+ }, undefined>, undefined>, undefined>;
168
+ /** Pod `nodeSelector`. */
169
+ readonly nodeSelector: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
170
+ /** Pod tolerations (passed through to the pod spec verbatim). */
171
+ readonly tolerations: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
172
+ /** Extra pod metadata labels. */
173
+ readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
174
+ /** Extra pod metadata annotations. */
175
+ readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
176
+ }, undefined>;
177
+ export type KubernetesRunnerConfig = v.InferOutput<typeof kubernetesRunnerConfigSchema>;
123
178
  /** The full declarative description of an org's runner-pool scheduler API. */
124
179
  export declare const runnerPoolManifestSchema: v.ObjectSchema<{
125
180
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
@@ -254,25 +309,16 @@ export declare const runnerPoolManifestSchema: v.ObjectSchema<{
254
309
  }, undefined>;
255
310
  }, undefined>;
256
311
  export type RunnerPoolManifest = v.InferOutput<typeof runnerPoolManifestSchema>;
257
- /** A workspace's pool binding, as exposed to clients (never secret values). */
258
- export declare const runnerPoolConnectionSchema: v.ObjectSchema<{
259
- readonly providerId: v.StringSchema<undefined>;
260
- readonly label: v.StringSchema<undefined>;
261
- readonly baseUrl: v.StringSchema<undefined>;
262
- readonly connectedAt: v.NumberSchema<undefined>;
263
- /** Which secret keys are set (names only), so the UI can show completeness. */
264
- readonly secretKeys: v.ArraySchema<v.StringSchema<undefined>, undefined>;
265
- }, undefined>;
266
- export type RunnerPoolConnection = v.InferOutput<typeof runnerPoolConnectionSchema>;
267
312
  /**
268
- * Register (or replace) a workspace's runner pool. The org supplies the actual
269
- * per-tenant scheduler-API secret values here (write-only); they are encrypted
270
- * and stored in D1 and never returned. Every `secretRef.key` in the manifest
271
- * must have a matching entry in `secrets`. A native pool adapter is configured
272
- * through the same manifest path (per-workspace settings on the manifest's
273
- * `providerConfig` bag), mirroring the environment provider.
313
+ * An "agent runner backend" config, discriminated by `kind`. This is the universal
314
+ * abstraction over WHERE repo-operating coding jobs run: today `manifest` (the BYO
315
+ * HTTP scheduler pool) and `kubernetes` (native per-run pods); future kinds
316
+ * (`nomad`, `eks`, …) add a member here + a provider in `@cat-factory/integrations`
317
+ * no new table/service/controller/UI window. The provider-registry seam keys on
318
+ * `kind`.
274
319
  */
275
- export declare const registerRunnerPoolSchema: v.ObjectSchema<{
320
+ export declare const runnerBackendConfigSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
321
+ readonly kind: v.LiteralSchema<"manifest", undefined>;
276
322
  readonly manifest: v.ObjectSchema<{
277
323
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
278
324
  readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
@@ -405,6 +451,449 @@ export declare const registerRunnerPoolSchema: v.ObjectSchema<{
405
451
  readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
406
452
  }, undefined>;
407
453
  }, undefined>;
454
+ }, undefined>, v.ObjectSchema<{
455
+ readonly kind: v.LiteralSchema<"kubernetes", undefined>;
456
+ readonly kubernetes: v.ObjectSchema<{
457
+ /** Human label for the connection (shown in the UI). */
458
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
459
+ /** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
460
+ readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
461
+ /** Namespace the per-run pods are created in. */
462
+ readonly namespace: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "must be a valid Kubernetes namespace">]>;
463
+ /** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
464
+ readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
465
+ /** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
466
+ readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
467
+ /** The executor-harness image the pod runs (the `default` image variant). */
468
+ readonly image: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
469
+ /** The heavier UI-tester image (Playwright), used for `image:'ui'` dispatches. */
470
+ readonly imageUi: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
471
+ /** Container port the harness HTTP server listens on (default 8080). */
472
+ 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>;
473
+ /** Name of an `imagePullSecrets` entry for a private registry. */
474
+ readonly imagePullSecretName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
475
+ /** ServiceAccount the pod runs as (NOT the token used to call the apiserver). */
476
+ readonly serviceAccountName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
477
+ /** Default pod resource requests/limits applied to every run pod. */
478
+ readonly resources: v.OptionalSchema<v.ObjectSchema<{
479
+ readonly requests: v.OptionalSchema<v.ObjectSchema<{
480
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
481
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
482
+ }, undefined>, undefined>;
483
+ readonly limits: v.OptionalSchema<v.ObjectSchema<{
484
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
485
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
486
+ }, undefined>, undefined>;
487
+ }, undefined>, undefined>;
488
+ /** Per-instance-size limit overrides (t-shirt InstanceSize → cpu/memory). */
489
+ readonly resourcesBySize: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
490
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
491
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
492
+ }, undefined>, undefined>, undefined>;
493
+ /** Pod `nodeSelector`. */
494
+ readonly nodeSelector: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
495
+ /** Pod tolerations (passed through to the pod spec verbatim). */
496
+ readonly tolerations: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
497
+ /** Extra pod metadata labels. */
498
+ readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
499
+ /** Extra pod metadata annotations. */
500
+ readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
501
+ }, undefined>;
502
+ }, undefined>], undefined>;
503
+ export type RunnerBackendConfig = v.InferOutput<typeof runnerBackendConfigSchema>;
504
+ export type RunnerBackendKind = RunnerBackendConfig['kind'];
505
+ /** A workspace's runner-backend binding, as exposed to clients (never secret values). */
506
+ export declare const runnerPoolConnectionSchema: v.ObjectSchema<{
507
+ /** Which backend kind is configured (`manifest` | `kubernetes` | …). */
508
+ readonly kind: v.StringSchema<undefined>;
509
+ readonly providerId: v.StringSchema<undefined>;
510
+ readonly label: v.StringSchema<undefined>;
511
+ readonly baseUrl: v.StringSchema<undefined>;
512
+ readonly connectedAt: v.NumberSchema<undefined>;
513
+ /** Which secret keys are set (names only), so the UI can show completeness. */
514
+ readonly secretKeys: v.ArraySchema<v.StringSchema<undefined>, undefined>;
515
+ /**
516
+ * The stored discriminated backend config, sans secrets (those live in the
517
+ * write-only secret bundle), so the connect form can prefill its non-secret fields
518
+ * on edit instead of forcing a full re-entry. Omitted only for a legacy/unparsable row.
519
+ */
520
+ readonly config: v.OptionalSchema<v.VariantSchema<"kind", [v.ObjectSchema<{
521
+ readonly kind: v.LiteralSchema<"manifest", undefined>;
522
+ readonly manifest: v.ObjectSchema<{
523
+ readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
524
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
525
+ /** Scheduler API root; dispatch/poll/release paths are appended to it. */
526
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
527
+ readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
528
+ readonly type: v.LiteralSchema<"none", undefined>;
529
+ }, undefined>, v.ObjectSchema<{
530
+ readonly type: v.LiteralSchema<"api_key", undefined>;
531
+ readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
532
+ readonly secretRef: v.ObjectSchema<{
533
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
534
+ }, undefined>;
535
+ readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
536
+ }, undefined>, v.ObjectSchema<{
537
+ readonly type: v.LiteralSchema<"bearer", undefined>;
538
+ readonly secretRef: v.ObjectSchema<{
539
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
540
+ }, undefined>;
541
+ }, undefined>, v.ObjectSchema<{
542
+ readonly type: v.LiteralSchema<"basic", undefined>;
543
+ readonly usernameSecretRef: v.ObjectSchema<{
544
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
545
+ }, undefined>;
546
+ readonly passwordSecretRef: v.ObjectSchema<{
547
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
548
+ }, undefined>;
549
+ }, undefined>, v.ObjectSchema<{
550
+ readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
551
+ readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
552
+ readonly clientIdSecretRef: v.ObjectSchema<{
553
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
554
+ }, undefined>;
555
+ readonly clientSecretSecretRef: v.ObjectSchema<{
556
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
557
+ }, undefined>;
558
+ readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
559
+ readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
560
+ }, undefined>, v.ObjectSchema<{
561
+ readonly type: v.LiteralSchema<"custom_headers", undefined>;
562
+ readonly headers: v.ArraySchema<v.ObjectSchema<{
563
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
564
+ readonly secretRef: v.ObjectSchema<{
565
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
566
+ }, undefined>;
567
+ }, undefined>, undefined>;
568
+ }, undefined>], undefined>;
569
+ /** Starts a job on the pool (analogous to the harness `POST /run`). */
570
+ readonly dispatch: v.ObjectSchema<{
571
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
572
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
573
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
574
+ readonly key: v.StringSchema<undefined>;
575
+ readonly value: v.StringSchema<undefined>;
576
+ }, undefined>, undefined>, undefined>;
577
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
578
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
579
+ readonly value: v.StringSchema<undefined>;
580
+ }, undefined>, undefined>, undefined>;
581
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
582
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
583
+ }, undefined>;
584
+ /** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
585
+ readonly poll: v.ObjectSchema<{
586
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
587
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
588
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
589
+ readonly key: v.StringSchema<undefined>;
590
+ readonly value: v.StringSchema<undefined>;
591
+ }, undefined>, undefined>, undefined>;
592
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
593
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
594
+ readonly value: v.StringSchema<undefined>;
595
+ }, undefined>, undefined>, undefined>;
596
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
597
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
598
+ }, undefined>;
599
+ /** Optional: frees the runner/job once the worker is done with it. */
600
+ readonly release: v.OptionalSchema<v.ObjectSchema<{
601
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
602
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
603
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
604
+ readonly key: v.StringSchema<undefined>;
605
+ readonly value: v.StringSchema<undefined>;
606
+ }, undefined>, undefined>, undefined>;
607
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
608
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
609
+ readonly value: v.StringSchema<undefined>;
610
+ }, undefined>, undefined>, undefined>;
611
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
612
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
613
+ }, undefined>, undefined>;
614
+ readonly response: v.ObjectSchema<{
615
+ /** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
616
+ readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
617
+ /** Translate scheduler status strings → harness states. */
618
+ readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
619
+ readonly from: v.StringSchema<undefined>;
620
+ readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
621
+ }, undefined>, undefined>, undefined>;
622
+ /** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
623
+ readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
624
+ readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
625
+ readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
626
+ /** Dot-paths to the finished work product. */
627
+ readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
628
+ readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
629
+ readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
630
+ /**
631
+ * Dot-path to the WHOLE structured result object the harness records (the
632
+ * harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
633
+ * defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
634
+ * executor-harness verbatim should set this so EVERY structured product — the
635
+ * blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
636
+ * default branch — is forwarded, not just the PR url/branch/summary scalars. Known
637
+ * fields are coerced by type; unknown ones are ignored. The individual scalar paths
638
+ * above still apply (and override) for schedulers that surface them out-of-envelope.
639
+ */
640
+ readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
641
+ /**
642
+ * Dot-path to the array of forward-looking follow-up / question items the Coder streamed
643
+ * since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
644
+ * the cat-factory executor-harness verbatim should set this to `followUps` so the
645
+ * Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
646
+ * never streams — the engine still gates on whatever items did arrive). Each entry is
647
+ * coerced to `{ kind, title, detail?, suggestedAction? }`.
648
+ */
649
+ readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
650
+ /** Dot-path to a job-level error message (a failed job, or a structured error). */
651
+ readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
652
+ }, undefined>;
653
+ }, undefined>;
654
+ }, undefined>, v.ObjectSchema<{
655
+ readonly kind: v.LiteralSchema<"kubernetes", undefined>;
656
+ readonly kubernetes: v.ObjectSchema<{
657
+ /** Human label for the connection (shown in the UI). */
658
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
659
+ /** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
660
+ readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
661
+ /** Namespace the per-run pods are created in. */
662
+ readonly namespace: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "must be a valid Kubernetes namespace">]>;
663
+ /** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
664
+ readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
665
+ /** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
666
+ readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
667
+ /** The executor-harness image the pod runs (the `default` image variant). */
668
+ readonly image: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
669
+ /** The heavier UI-tester image (Playwright), used for `image:'ui'` dispatches. */
670
+ readonly imageUi: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
671
+ /** Container port the harness HTTP server listens on (default 8080). */
672
+ 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>;
673
+ /** Name of an `imagePullSecrets` entry for a private registry. */
674
+ readonly imagePullSecretName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
675
+ /** ServiceAccount the pod runs as (NOT the token used to call the apiserver). */
676
+ readonly serviceAccountName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
677
+ /** Default pod resource requests/limits applied to every run pod. */
678
+ readonly resources: v.OptionalSchema<v.ObjectSchema<{
679
+ readonly requests: v.OptionalSchema<v.ObjectSchema<{
680
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
681
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
682
+ }, undefined>, undefined>;
683
+ readonly limits: v.OptionalSchema<v.ObjectSchema<{
684
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
685
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
686
+ }, undefined>, undefined>;
687
+ }, undefined>, undefined>;
688
+ /** Per-instance-size limit overrides (t-shirt InstanceSize → cpu/memory). */
689
+ readonly resourcesBySize: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
690
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
691
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
692
+ }, undefined>, undefined>, undefined>;
693
+ /** Pod `nodeSelector`. */
694
+ readonly nodeSelector: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
695
+ /** Pod tolerations (passed through to the pod spec verbatim). */
696
+ readonly tolerations: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
697
+ /** Extra pod metadata labels. */
698
+ readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
699
+ /** Extra pod metadata annotations. */
700
+ readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
701
+ }, undefined>;
702
+ }, undefined>], undefined>, undefined>;
703
+ }, undefined>;
704
+ export type RunnerPoolConnection = v.InferOutput<typeof runnerPoolConnectionSchema>;
705
+ /**
706
+ * Register (or replace) a workspace's runner backend. `config` is the discriminated
707
+ * backend config (manifest pool or Kubernetes); the org supplies the actual
708
+ * per-tenant secret values here (write-only) — a manifest's scheduler-API
709
+ * credentials, or a Kubernetes ServiceAccount token (`apiToken`). Secrets are
710
+ * encrypted at rest and never returned. Every secret key the chosen backend
711
+ * references must have a matching entry in `secrets`.
712
+ */
713
+ export declare const registerRunnerPoolSchema: v.ObjectSchema<{
714
+ readonly config: v.VariantSchema<"kind", [v.ObjectSchema<{
715
+ readonly kind: v.LiteralSchema<"manifest", undefined>;
716
+ readonly manifest: v.ObjectSchema<{
717
+ readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
718
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
719
+ /** Scheduler API root; dispatch/poll/release paths are appended to it. */
720
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
721
+ readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
722
+ readonly type: v.LiteralSchema<"none", undefined>;
723
+ }, undefined>, v.ObjectSchema<{
724
+ readonly type: v.LiteralSchema<"api_key", undefined>;
725
+ readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
726
+ readonly secretRef: v.ObjectSchema<{
727
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
728
+ }, undefined>;
729
+ readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
730
+ }, undefined>, v.ObjectSchema<{
731
+ readonly type: v.LiteralSchema<"bearer", undefined>;
732
+ readonly secretRef: v.ObjectSchema<{
733
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
734
+ }, undefined>;
735
+ }, undefined>, v.ObjectSchema<{
736
+ readonly type: v.LiteralSchema<"basic", undefined>;
737
+ readonly usernameSecretRef: v.ObjectSchema<{
738
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
739
+ }, undefined>;
740
+ readonly passwordSecretRef: v.ObjectSchema<{
741
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
742
+ }, undefined>;
743
+ }, undefined>, v.ObjectSchema<{
744
+ readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
745
+ readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
746
+ readonly clientIdSecretRef: v.ObjectSchema<{
747
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
748
+ }, undefined>;
749
+ readonly clientSecretSecretRef: v.ObjectSchema<{
750
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
751
+ }, undefined>;
752
+ readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
753
+ readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
754
+ }, undefined>, v.ObjectSchema<{
755
+ readonly type: v.LiteralSchema<"custom_headers", undefined>;
756
+ readonly headers: v.ArraySchema<v.ObjectSchema<{
757
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
758
+ readonly secretRef: v.ObjectSchema<{
759
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
760
+ }, undefined>;
761
+ }, undefined>, undefined>;
762
+ }, undefined>], undefined>;
763
+ /** Starts a job on the pool (analogous to the harness `POST /run`). */
764
+ readonly dispatch: v.ObjectSchema<{
765
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
766
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
767
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
768
+ readonly key: v.StringSchema<undefined>;
769
+ readonly value: v.StringSchema<undefined>;
770
+ }, undefined>, undefined>, undefined>;
771
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
772
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
773
+ readonly value: v.StringSchema<undefined>;
774
+ }, undefined>, undefined>, undefined>;
775
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
776
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
777
+ }, undefined>;
778
+ /** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
779
+ readonly poll: v.ObjectSchema<{
780
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
781
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
782
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
783
+ readonly key: v.StringSchema<undefined>;
784
+ readonly value: v.StringSchema<undefined>;
785
+ }, undefined>, undefined>, undefined>;
786
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
787
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
788
+ readonly value: v.StringSchema<undefined>;
789
+ }, undefined>, undefined>, undefined>;
790
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
791
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
792
+ }, undefined>;
793
+ /** Optional: frees the runner/job once the worker is done with it. */
794
+ readonly release: v.OptionalSchema<v.ObjectSchema<{
795
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
796
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
797
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
798
+ readonly key: v.StringSchema<undefined>;
799
+ readonly value: v.StringSchema<undefined>;
800
+ }, undefined>, undefined>, undefined>;
801
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
802
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
803
+ readonly value: v.StringSchema<undefined>;
804
+ }, undefined>, undefined>, undefined>;
805
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
806
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
807
+ }, undefined>, undefined>;
808
+ readonly response: v.ObjectSchema<{
809
+ /** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
810
+ readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
811
+ /** Translate scheduler status strings → harness states. */
812
+ readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
813
+ readonly from: v.StringSchema<undefined>;
814
+ readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
815
+ }, undefined>, undefined>, undefined>;
816
+ /** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
817
+ readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
818
+ readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
819
+ readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
820
+ /** Dot-paths to the finished work product. */
821
+ readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
822
+ readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
823
+ readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
824
+ /**
825
+ * Dot-path to the WHOLE structured result object the harness records (the
826
+ * harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
827
+ * defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
828
+ * executor-harness verbatim should set this so EVERY structured product — the
829
+ * blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
830
+ * default branch — is forwarded, not just the PR url/branch/summary scalars. Known
831
+ * fields are coerced by type; unknown ones are ignored. The individual scalar paths
832
+ * above still apply (and override) for schedulers that surface them out-of-envelope.
833
+ */
834
+ readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
835
+ /**
836
+ * Dot-path to the array of forward-looking follow-up / question items the Coder streamed
837
+ * since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
838
+ * the cat-factory executor-harness verbatim should set this to `followUps` so the
839
+ * Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
840
+ * never streams — the engine still gates on whatever items did arrive). Each entry is
841
+ * coerced to `{ kind, title, detail?, suggestedAction? }`.
842
+ */
843
+ readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
844
+ /** Dot-path to a job-level error message (a failed job, or a structured error). */
845
+ readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
846
+ }, undefined>;
847
+ }, undefined>;
848
+ }, undefined>, v.ObjectSchema<{
849
+ readonly kind: v.LiteralSchema<"kubernetes", undefined>;
850
+ readonly kubernetes: v.ObjectSchema<{
851
+ /** Human label for the connection (shown in the UI). */
852
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
853
+ /** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
854
+ readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
855
+ /** Namespace the per-run pods are created in. */
856
+ readonly namespace: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "must be a valid Kubernetes namespace">]>;
857
+ /** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
858
+ readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
859
+ /** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
860
+ readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
861
+ /** The executor-harness image the pod runs (the `default` image variant). */
862
+ readonly image: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
863
+ /** The heavier UI-tester image (Playwright), used for `image:'ui'` dispatches. */
864
+ readonly imageUi: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
865
+ /** Container port the harness HTTP server listens on (default 8080). */
866
+ 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>;
867
+ /** Name of an `imagePullSecrets` entry for a private registry. */
868
+ readonly imagePullSecretName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
869
+ /** ServiceAccount the pod runs as (NOT the token used to call the apiserver). */
870
+ readonly serviceAccountName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
871
+ /** Default pod resource requests/limits applied to every run pod. */
872
+ readonly resources: v.OptionalSchema<v.ObjectSchema<{
873
+ readonly requests: v.OptionalSchema<v.ObjectSchema<{
874
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
875
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
876
+ }, undefined>, undefined>;
877
+ readonly limits: v.OptionalSchema<v.ObjectSchema<{
878
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
879
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
880
+ }, undefined>, undefined>;
881
+ }, undefined>, undefined>;
882
+ /** Per-instance-size limit overrides (t-shirt InstanceSize → cpu/memory). */
883
+ readonly resourcesBySize: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
884
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
885
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
886
+ }, undefined>, undefined>, undefined>;
887
+ /** Pod `nodeSelector`. */
888
+ readonly nodeSelector: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
889
+ /** Pod tolerations (passed through to the pod spec verbatim). */
890
+ readonly tolerations: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
891
+ /** Extra pod metadata labels. */
892
+ readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
893
+ /** Extra pod metadata annotations. */
894
+ readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
895
+ }, undefined>;
896
+ }, undefined>], undefined>;
408
897
  readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
409
898
  }, undefined>;
410
899
  export type RegisterRunnerPoolInput = v.InferOutput<typeof registerRunnerPoolSchema>;
@@ -414,144 +903,193 @@ export declare const updateRunnerPoolSecretsSchema: v.ObjectSchema<{
414
903
  }, undefined>;
415
904
  export type UpdateRunnerPoolSecretsInput = v.InferOutput<typeof updateRunnerPoolSecretsSchema>;
416
905
  /**
417
- * Test (probe) a pool connection before saving. A manifest-driven pool supplies
418
- * the candidate `manifest` + `secrets`; a native pool provider supplies its
419
- * `config` + `secrets`. Nothing is persisted by a test.
906
+ * Test (probe) a runner-backend connection before saving: supply the candidate
907
+ * discriminated `config` + its `secrets`. Nothing is persisted by a test.
420
908
  */
421
909
  export declare const testRunnerPoolConnectionSchema: v.ObjectSchema<{
422
- readonly manifest: v.OptionalSchema<v.ObjectSchema<{
423
- readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
424
- readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
425
- /** Scheduler API root; dispatch/poll/release paths are appended to it. */
426
- readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
427
- readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
428
- readonly type: v.LiteralSchema<"none", undefined>;
429
- }, undefined>, v.ObjectSchema<{
430
- readonly type: v.LiteralSchema<"api_key", undefined>;
431
- readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
432
- readonly secretRef: v.ObjectSchema<{
433
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
434
- }, undefined>;
435
- readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
436
- }, undefined>, v.ObjectSchema<{
437
- readonly type: v.LiteralSchema<"bearer", undefined>;
438
- readonly secretRef: v.ObjectSchema<{
439
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
440
- }, undefined>;
441
- }, undefined>, v.ObjectSchema<{
442
- readonly type: v.LiteralSchema<"basic", undefined>;
443
- readonly usernameSecretRef: v.ObjectSchema<{
444
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
445
- }, undefined>;
446
- readonly passwordSecretRef: v.ObjectSchema<{
447
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
448
- }, undefined>;
449
- }, undefined>, v.ObjectSchema<{
450
- readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
451
- readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
452
- readonly clientIdSecretRef: v.ObjectSchema<{
453
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
454
- }, undefined>;
455
- readonly clientSecretSecretRef: v.ObjectSchema<{
456
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
457
- }, undefined>;
458
- readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
459
- readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
460
- }, undefined>, v.ObjectSchema<{
461
- readonly type: v.LiteralSchema<"custom_headers", undefined>;
462
- readonly headers: v.ArraySchema<v.ObjectSchema<{
463
- readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
910
+ readonly config: v.OptionalSchema<v.VariantSchema<"kind", [v.ObjectSchema<{
911
+ readonly kind: v.LiteralSchema<"manifest", undefined>;
912
+ readonly manifest: v.ObjectSchema<{
913
+ readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
914
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
915
+ /** Scheduler API root; dispatch/poll/release paths are appended to it. */
916
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
917
+ readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
918
+ readonly type: v.LiteralSchema<"none", undefined>;
919
+ }, undefined>, v.ObjectSchema<{
920
+ readonly type: v.LiteralSchema<"api_key", undefined>;
921
+ readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
464
922
  readonly secretRef: v.ObjectSchema<{
465
923
  readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
466
924
  }, undefined>;
925
+ readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
926
+ }, undefined>, v.ObjectSchema<{
927
+ readonly type: v.LiteralSchema<"bearer", undefined>;
928
+ readonly secretRef: v.ObjectSchema<{
929
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
930
+ }, undefined>;
931
+ }, undefined>, v.ObjectSchema<{
932
+ readonly type: v.LiteralSchema<"basic", undefined>;
933
+ readonly usernameSecretRef: v.ObjectSchema<{
934
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
935
+ }, undefined>;
936
+ readonly passwordSecretRef: v.ObjectSchema<{
937
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
938
+ }, undefined>;
939
+ }, undefined>, v.ObjectSchema<{
940
+ readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
941
+ readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
942
+ readonly clientIdSecretRef: v.ObjectSchema<{
943
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
944
+ }, undefined>;
945
+ readonly clientSecretSecretRef: v.ObjectSchema<{
946
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
947
+ }, undefined>;
948
+ readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
949
+ readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
950
+ }, undefined>, v.ObjectSchema<{
951
+ readonly type: v.LiteralSchema<"custom_headers", undefined>;
952
+ readonly headers: v.ArraySchema<v.ObjectSchema<{
953
+ readonly name: 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
+ }, undefined>, undefined>;
958
+ }, undefined>], undefined>;
959
+ /** Starts a job on the pool (analogous to the harness `POST /run`). */
960
+ readonly dispatch: v.ObjectSchema<{
961
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
962
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
963
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
964
+ readonly key: v.StringSchema<undefined>;
965
+ readonly value: v.StringSchema<undefined>;
966
+ }, undefined>, undefined>, undefined>;
967
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
968
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
969
+ readonly value: v.StringSchema<undefined>;
970
+ }, undefined>, undefined>, undefined>;
971
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
972
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
973
+ }, undefined>;
974
+ /** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
975
+ readonly poll: v.ObjectSchema<{
976
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
977
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
978
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
979
+ readonly key: v.StringSchema<undefined>;
980
+ readonly value: v.StringSchema<undefined>;
981
+ }, undefined>, undefined>, undefined>;
982
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
983
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
984
+ readonly value: v.StringSchema<undefined>;
985
+ }, undefined>, undefined>, undefined>;
986
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
987
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
988
+ }, undefined>;
989
+ /** Optional: frees the runner/job once the worker is done with it. */
990
+ readonly release: v.OptionalSchema<v.ObjectSchema<{
991
+ readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
992
+ readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
993
+ readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
994
+ readonly key: v.StringSchema<undefined>;
995
+ readonly value: v.StringSchema<undefined>;
996
+ }, undefined>, undefined>, undefined>;
997
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
998
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
999
+ readonly value: v.StringSchema<undefined>;
1000
+ }, undefined>, undefined>, undefined>;
1001
+ readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1002
+ readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
467
1003
  }, undefined>, undefined>;
468
- }, undefined>], undefined>;
469
- /** Starts a job on the pool (analogous to the harness `POST /run`). */
470
- readonly dispatch: v.ObjectSchema<{
471
- readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
472
- readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
473
- readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
474
- readonly key: v.StringSchema<undefined>;
475
- readonly value: v.StringSchema<undefined>;
476
- }, undefined>, undefined>, undefined>;
477
- readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
478
- readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
479
- readonly value: v.StringSchema<undefined>;
480
- }, undefined>, undefined>, undefined>;
481
- readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
482
- readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
483
- }, undefined>;
484
- /** Reads a job's status (analogous to the harness `GET /jobs/{id}`). */
485
- readonly poll: v.ObjectSchema<{
486
- readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
487
- readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
488
- readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
489
- readonly key: v.StringSchema<undefined>;
490
- readonly value: v.StringSchema<undefined>;
491
- }, undefined>, undefined>, undefined>;
492
- readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
493
- readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
494
- readonly value: v.StringSchema<undefined>;
495
- }, undefined>, undefined>, undefined>;
496
- readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
497
- readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
1004
+ readonly response: v.ObjectSchema<{
1005
+ /** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
1006
+ readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1007
+ /** Translate scheduler status strings harness states. */
1008
+ readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1009
+ readonly from: v.StringSchema<undefined>;
1010
+ readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
1011
+ }, undefined>, undefined>, undefined>;
1012
+ /** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
1013
+ readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1014
+ readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1015
+ readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1016
+ /** Dot-paths to the finished work product. */
1017
+ readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1018
+ readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1019
+ readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1020
+ /**
1021
+ * Dot-path to the WHOLE structured result object the harness records (the
1022
+ * harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
1023
+ * defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
1024
+ * executor-harness verbatim should set this so EVERY structured product — the
1025
+ * blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
1026
+ * default branch — is forwarded, not just the PR url/branch/summary scalars. Known
1027
+ * fields are coerced by type; unknown ones are ignored. The individual scalar paths
1028
+ * above still apply (and override) for schedulers that surface them out-of-envelope.
1029
+ */
1030
+ readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1031
+ /**
1032
+ * Dot-path to the array of forward-looking follow-up / question items the Coder streamed
1033
+ * since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
1034
+ * the cat-factory executor-harness verbatim should set this to `followUps` so the
1035
+ * Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
1036
+ * never streams — the engine still gates on whatever items did arrive). Each entry is
1037
+ * coerced to `{ kind, title, detail?, suggestedAction? }`.
1038
+ */
1039
+ readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1040
+ /** Dot-path to a job-level error message (a failed job, or a structured error). */
1041
+ readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1042
+ }, undefined>;
498
1043
  }, undefined>;
499
- /** Optional: frees the runner/job once the worker is done with it. */
500
- readonly release: v.OptionalSchema<v.ObjectSchema<{
501
- readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
502
- readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
503
- readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
504
- readonly key: v.StringSchema<undefined>;
505
- readonly value: v.StringSchema<undefined>;
506
- }, undefined>, undefined>, undefined>;
507
- readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
508
- readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
509
- readonly value: v.StringSchema<undefined>;
510
- }, undefined>, undefined>, undefined>;
511
- readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
512
- readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
513
- }, undefined>, undefined>;
514
- readonly response: v.ObjectSchema<{
515
- /** Dot-path to the scheduler's status string (e.g. `state`, `data.phase`). */
516
- readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
517
- /** Translate scheduler status strings harness states. */
518
- readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
519
- readonly from: v.StringSchema<undefined>;
520
- readonly to: v.PicklistSchema<["running", "done", "failed"], undefined>;
1044
+ }, undefined>, v.ObjectSchema<{
1045
+ readonly kind: v.LiteralSchema<"kubernetes", undefined>;
1046
+ readonly kubernetes: v.ObjectSchema<{
1047
+ /** Human label for the connection (shown in the UI). */
1048
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
1049
+ /** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
1050
+ readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
1051
+ /** Namespace the per-run pods are created in. */
1052
+ readonly namespace: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "must be a valid Kubernetes namespace">]>;
1053
+ /** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
1054
+ readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1055
+ /** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
1056
+ readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1057
+ /** The executor-harness image the pod runs (the `default` image variant). */
1058
+ readonly image: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
1059
+ /** The heavier UI-tester image (Playwright), used for `image:'ui'` dispatches. */
1060
+ readonly imageUi: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1061
+ /** Container port the harness HTTP server listens on (default 8080). */
1062
+ 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>;
1063
+ /** Name of an `imagePullSecrets` entry for a private registry. */
1064
+ readonly imagePullSecretName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1065
+ /** ServiceAccount the pod runs as (NOT the token used to call the apiserver). */
1066
+ readonly serviceAccountName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1067
+ /** Default pod resource requests/limits applied to every run pod. */
1068
+ readonly resources: v.OptionalSchema<v.ObjectSchema<{
1069
+ readonly requests: v.OptionalSchema<v.ObjectSchema<{
1070
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1071
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1072
+ }, undefined>, undefined>;
1073
+ readonly limits: v.OptionalSchema<v.ObjectSchema<{
1074
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1075
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1076
+ }, undefined>, undefined>;
1077
+ }, undefined>, undefined>;
1078
+ /** Per-instance-size limit overrides (t-shirt InstanceSize → cpu/memory). */
1079
+ readonly resourcesBySize: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
1080
+ readonly cpu: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1081
+ readonly memory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
521
1082
  }, undefined>, undefined>, undefined>;
522
- /** Dot-paths to live subtask counts, surfaced as "N/M done" progress. */
523
- readonly progressCompletedPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
524
- readonly progressInProgressPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
525
- readonly progressTotalPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
526
- /** Dot-paths to the finished work product. */
527
- readonly prUrlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
528
- readonly branchPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
529
- readonly summaryPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
530
- /**
531
- * Dot-path to the WHOLE structured result object the harness records (the
532
- * harness `result`: `{ prUrl, branch, summary, service, spec, assessment, report,
533
- * defaultBranch, pushed, resolved, usage }`). A pool that proxies the cat-factory
534
- * executor-harness verbatim should set this so EVERY structured product — the
535
- * blueprint tree, the spec doc, the merge assessment, the test report, the bootstrap
536
- * default branch — is forwarded, not just the PR url/branch/summary scalars. Known
537
- * fields are coerced by type; unknown ones are ignored. The individual scalar paths
538
- * above still apply (and override) for schedulers that surface them out-of-envelope.
539
- */
540
- readonly resultPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
541
- /**
542
- * Dot-path to the array of forward-looking follow-up / question items the Coder streamed
543
- * since the last poll (the harness `followUps` drain-on-read channel). A pool that proxies
544
- * the cat-factory executor-harness verbatim should set this to `followUps` so the
545
- * Follow-up companion lights up live on a pool-backed coder run too (otherwise it simply
546
- * never streams — the engine still gates on whatever items did arrive). Each entry is
547
- * coerced to `{ kind, title, detail?, suggestedAction? }`.
548
- */
549
- readonly followUpsPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
550
- /** Dot-path to a job-level error message (a failed job, or a structured error). */
551
- readonly errorPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1083
+ /** Pod `nodeSelector`. */
1084
+ readonly nodeSelector: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
1085
+ /** Pod tolerations (passed through to the pod spec verbatim). */
1086
+ readonly tolerations: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
1087
+ /** Extra pod metadata labels. */
1088
+ readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
1089
+ /** Extra pod metadata annotations. */
1090
+ readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
552
1091
  }, undefined>;
553
- }, undefined>, undefined>;
554
- readonly config: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
1092
+ }, undefined>], undefined>, undefined>;
555
1093
  readonly secrets: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
556
1094
  }, undefined>;
557
1095
  export type TestRunnerPoolConnectionInput = v.InferOutput<typeof testRunnerPoolConnectionSchema>;