@sema-agent/settings-schema 6.4.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/README.md +53 -2
  3. package/bin/settings-schema.mjs +22 -0
  4. package/conformance/VERSION +1 -1
  5. package/conformance/cases/c50-s784-lane-host-legal/expected.json +102 -0
  6. package/conformance/cases/c50-s784-lane-host-legal/input.json +29 -0
  7. package/conformance/cases/c50-s784-lane-host-legal/meta.json +5 -0
  8. package/conformance/cases/c51-s784-lane-e2b-legal/expected.json +104 -0
  9. package/conformance/cases/c51-s784-lane-e2b-legal/input.json +32 -0
  10. package/conformance/cases/c51-s784-lane-e2b-legal/meta.json +5 -0
  11. package/conformance/cases/c52-s784-lane-k8s-legal/expected.json +106 -0
  12. package/conformance/cases/c52-s784-lane-k8s-legal/input.json +34 -0
  13. package/conformance/cases/c52-s784-lane-k8s-legal/meta.json +5 -0
  14. package/conformance/cases/c53-s784-lane-ssh-legal/expected.json +106 -0
  15. package/conformance/cases/c53-s784-lane-ssh-legal/input.json +34 -0
  16. package/conformance/cases/c53-s784-lane-ssh-legal/meta.json +5 -0
  17. package/conformance/cases/c54-s784-lane-adb-legal/expected.json +102 -0
  18. package/conformance/cases/c54-s784-lane-adb-legal/input.json +29 -0
  19. package/conformance/cases/c54-s784-lane-adb-legal/meta.json +5 -0
  20. package/conformance/cases/c55-s784-lane-local-docker-legal/expected.json +103 -0
  21. package/conformance/cases/c55-s784-lane-local-docker-legal/input.json +30 -0
  22. package/conformance/cases/c55-s784-lane-local-docker-legal/meta.json +5 -0
  23. package/conformance/cases/c56-s784-lane-device-legal/expected.json +109 -0
  24. package/conformance/cases/c56-s784-lane-device-legal/input.json +36 -0
  25. package/conformance/cases/c56-s784-lane-device-legal/meta.json +5 -0
  26. package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +83 -0
  27. package/conformance/cases/c57-s784-g1-enabled-no-lane/input.json +23 -0
  28. package/conformance/cases/c57-s784-g1-enabled-no-lane/meta.json +5 -0
  29. package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +83 -0
  30. package/conformance/cases/c58-s784-g2-multitenant-host/input.json +34 -0
  31. package/conformance/cases/c58-s784-g2-multitenant-host/meta.json +5 -0
  32. package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +83 -0
  33. package/conformance/cases/c59-s784-g3-k8s-missing-image/input.json +26 -0
  34. package/conformance/cases/c59-s784-g3-k8s-missing-image/meta.json +5 -0
  35. package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +83 -0
  36. package/conformance/cases/c60-s784-g3-e2b-missing-key/input.json +26 -0
  37. package/conformance/cases/c60-s784-g3-e2b-missing-key/meta.json +5 -0
  38. package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +83 -0
  39. package/conformance/cases/c61-s784-g3-other-lane-key/input.json +30 -0
  40. package/conformance/cases/c61-s784-g3-other-lane-key/meta.json +5 -0
  41. package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +83 -0
  42. package/conformance/cases/c62-s784-g7a-session-tidb/input.json +27 -0
  43. package/conformance/cases/c62-s784-g7a-session-tidb/meta.json +5 -0
  44. package/conformance/cases/c63-s784-host-two-replicas/expected.json +83 -0
  45. package/conformance/cases/c63-s784-host-two-replicas/input.json +27 -0
  46. package/conformance/cases/c63-s784-host-two-replicas/meta.json +5 -0
  47. package/conformance/cases/c64-s784-multitenant-local-store/expected.json +83 -0
  48. package/conformance/cases/c64-s784-multitenant-local-store/input.json +30 -0
  49. package/conformance/cases/c64-s784-multitenant-local-store/meta.json +5 -0
  50. package/conformance/cases/c65-s784-pg-without-db/expected.json +83 -0
  51. package/conformance/cases/c65-s784-pg-without-db/input.json +27 -0
  52. package/conformance/cases/c65-s784-pg-without-db/meta.json +5 -0
  53. package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +83 -0
  54. package/conformance/cases/c66-s784-memory-backend-mismatch/input.json +36 -0
  55. package/conformance/cases/c66-s784-memory-backend-mismatch/meta.json +5 -0
  56. package/conformance/cases/c67-s784-retired-field-loud/expected.json +83 -0
  57. package/conformance/cases/c67-s784-retired-field-loud/input.json +22 -0
  58. package/conformance/cases/c67-s784-retired-field-loud/meta.json +5 -0
  59. package/conformance/cases/c68-s784-device-local-store/expected.json +83 -0
  60. package/conformance/cases/c68-s784-device-local-store/input.json +26 -0
  61. package/conformance/cases/c68-s784-device-local-store/meta.json +5 -0
  62. package/conformance/cases/cli04-env-value-with-newline/expected.json +13 -2
  63. package/conformance/cases/cli04-env-value-with-newline/input.json +8 -1
  64. package/conformance/cases/cli04-env-value-with-newline/meta.json +1 -1
  65. package/conformance/migrate-workers/m01-g5-k8s-env-lifted/expected.json +49 -0
  66. package/conformance/migrate-workers/m01-g5-k8s-env-lifted/input.json +26 -0
  67. package/conformance/migrate-workers/m01-g5-k8s-env-lifted/meta.json +4 -0
  68. package/conformance/migrate-workers/m02-g5-idempotent/expected.json +38 -0
  69. package/conformance/migrate-workers/m02-g5-idempotent/input.json +33 -0
  70. package/conformance/migrate-workers/m02-g5-idempotent/meta.json +5 -0
  71. package/conformance/migrate-workers/m03-g5-refused-no-lane/expected.json +71 -0
  72. package/conformance/migrate-workers/m03-g5-refused-no-lane/input.json +42 -0
  73. package/conformance/migrate-workers/m03-g5-refused-no-lane/meta.json +4 -0
  74. package/conformance/migrate-workers/m04-g7b-session-tidb-lifted/expected.json +52 -0
  75. package/conformance/migrate-workers/m04-g7b-session-tidb-lifted/input.json +30 -0
  76. package/conformance/migrate-workers/m04-g7b-session-tidb-lifted/meta.json +4 -0
  77. package/dist/cli.d.ts +8 -0
  78. package/dist/cli.js +110 -0
  79. package/dist/execution-lane-index.d.ts +38 -0
  80. package/dist/execution-lane-index.js +46 -0
  81. package/dist/execution-lanes.d.ts +64 -0
  82. package/dist/execution-lanes.js +152 -0
  83. package/dist/file-edit.js +26 -21
  84. package/dist/hooks.d.ts +4 -4
  85. package/dist/index.d.ts +2 -0
  86. package/dist/index.js +2 -0
  87. package/dist/migrate-workers.d.ts +63 -0
  88. package/dist/migrate-workers.js +327 -0
  89. package/dist/remote-exec.d.ts +23 -64
  90. package/dist/remote-exec.js +20 -71
  91. package/dist/secret-refs.d.ts +7 -1
  92. package/dist/secret-refs.js +9 -3
  93. package/dist/types.d.ts +1356 -455
  94. package/dist/types.js +267 -63
  95. package/package.json +9 -1
package/dist/types.d.ts CHANGED
@@ -56,7 +56,7 @@ export declare function extraBodyUnsafe(v: unknown): boolean;
56
56
  /** A k8s resource quantity ("250m", "1", "0.5", "512Mi", "1Gi", "128M") — catches garbage at config-submit
57
57
  * rather than surfacing as a reconcile ApplyError at the apiserver (consistent with ENV_NAME/DURATION guards). */
58
58
  export declare const K8S_QUANTITY: z.ZodString;
59
- /** A TCP port: 1–65535. ONE shared schema so every port field (workers.coords.tidbPort, ssh.port, …) bounds
59
+ /** A TCP port: 1–65535. ONE shared schema so every port field (workers.runtime.store.db.port, ssh.port, …) bounds
60
60
  * the SAME way — a port of 65536/0/-1 is config corruption, reject it at validation, not at connect time. R16. */
61
61
  export declare const TCP_PORT: z.ZodNumber;
62
62
  /** Per-1M-token price ($/Mtok). Maps to the service's MODEL_COST_INPUT/OUTPUT/CACHE_READ/CACHE_WRITE
@@ -4748,8 +4748,9 @@ export declare const ExecutionPolicy: z.ZodEffects<z.ZodObject<{
4748
4748
  * shell locks sandbox-enabled by policy; user settings can't turn it off — CC 同款语义). */
4749
4749
  required: z.ZodDefault<z.ZodBoolean>;
4750
4750
  /** Which execution lanes are allowed. OPEN value domain — z.string(), NEVER an enum: adding a lane
4751
- * must not be a BREAKING schema change (promised to the service). Known lanes
4752
- * today: `host` / `e2b` / `k8s` / `ssh` / `adb` / `local-docker`. Unknown strings are consumer-defined. */
4751
+ * must not be a BREAKING schema change (promised to the service). The closed set of lanes a worker can
4752
+ * declare is `EXECUTION_LANE_WORDS` (`execution-lanes.ts`, 7.0.0) — read it there, not from a copy in this
4753
+ * comment. Unknown strings are consumer-defined. */
4753
4754
  allowedLanes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4754
4755
  /** Org 默认会话镜像目标(0.10.1,附B 两层)。ABSENT = INERT(center 未管镜像,壳解析序里本腿为空)。
4755
4756
  * 读损档随域(DOMAIN_READ_FALLBACK.execution="throw" 已覆盖:损坏绝不静默退默认放权)。 */
@@ -5602,26 +5603,15 @@ export declare const WorkerLifecycle: z.ZodObject<{
5602
5603
  dependsOn?: string[] | undefined;
5603
5604
  }>;
5604
5605
  export type WorkerLifecycle = z.infer<typeof WorkerLifecycle>;
5605
- /**
5606
- * Env keys the structured WorkerSpec fields already produce (worker-env.ts) — the general `env`/`secretEnv`
5607
- * passthrough may NOT set these (use the dedicated field). Blocks the council's two escape-hatch risks:
5608
- * redirecting model/traffic or disabling auth (PORT, MODEL_x, SESSION_BACKEND, REQUIRE_PRINCIPAL, gateway), and
5609
- * shadowing a projected secret with a literal (MODEL_API_KEY, SERVICE_AUTH_TOKEN, …). LOG_LEVEL is intentionally
5610
- * NOT reserved (benign, overridable for debugging). Keep in sync with workerToServiceEnv.
5611
- *
5612
- * ⚠️ SCOPE (0.1.30, after the R22→0.1.29 detour): this ONLY blocks keys that have a DEDICATED structured field
5613
- * or secretRef — so an operator is steered to that field instead of duplicating/shadowing it via env. It does
5614
- * NOT block the per-worker EXECUTION-SUBSTRATE config an operator legitimately sets via worker.env, which the
5615
- * live fleet relies on: `REMOTE_EXEC` (direct=k8s, canary=e2b set it HERE), `K8S_*` (SANDBOX_IMAGE/NAMESPACE/
5616
- * RUNTIME_CLASS/…), `E2B_*`, `MINIO_*`, `SSH_*`, `ADB_*`. worker.env is the OPERATOR's per-worker deployment env
5617
- * (publisher-gated, projected by the orchestrator to the worker pod) — NOT untrusted-task-controlled, so there
5618
- * is no "sandbox escape" to block here. R22 wrongly added those substrate keys treating worker.env as
5619
- * task-controlled; it would have REJECTED the live direct/canary workers on deploy. Reverted in 0.1.30. (Literal
5620
- * SECRET values pasted into env are still caught separately by containsSecretToken; substrate CREDS belong in
5621
- * secretEnv as env-NAME refs.)
5622
- */
5606
+ /** 结构化 WorkerSpec 字段已经产出的 env 名 —— 通用 `env` / `secretEnv` 逃生口**不许**设它们(用专属字段)。由
5607
+ * `RESERVED_ENV_FIELD`(名 → 唯一写位)的键派生;增删理由见那张表的头注。 */
5623
5608
  export declare const RESERVED_WORKER_ENV: Set<string>;
5624
- export declare const WorkerSpec: z.ZodObject<{
5609
+ /** 一台 worker 的名字(唯一 → 容器名 / compose project / 缺省路由键)—— **唯一**的名字判据。中心在租约 / 用量 /
5610
+ * discovery `?worker=` 等面上校验外部传来的 worker 名时读它(不抄窄正则)。7.0.0 起单独导出:`WorkerSpec` 不再是普通
5611
+ * 对象 schema(预处理 + 跨字段判据),`WorkerSpec.shape.name` 不复存在。 */
5612
+ export declare const WORKER_NAME: z.ZodString;
5613
+ /** 一台 worker 的声明。写闸 = `WorkerSpec.safeParse`(7.0.0 删除项读到即拒 + 两个结构块 + 跨字段判据)。 */
5614
+ export declare const WorkerSpec: z.ZodEffects<z.ZodEffects<z.ZodObject<{
5625
5615
  /** 唯一 → 容器名 / compose project. */
5626
5616
  name: z.ZodString;
5627
5617
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -5678,39 +5668,39 @@ export declare const WorkerSpec: z.ZodObject<{
5678
5668
  cpu: z.ZodOptional<z.ZodString>;
5679
5669
  memory: z.ZodOptional<z.ZodString>;
5680
5670
  }, "strip", z.ZodTypeAny, {
5681
- cpu?: string | undefined;
5682
5671
  memory?: string | undefined;
5683
- }, {
5684
5672
  cpu?: string | undefined;
5673
+ }, {
5685
5674
  memory?: string | undefined;
5675
+ cpu?: string | undefined;
5686
5676
  }>>;
5687
5677
  limits: z.ZodOptional<z.ZodObject<{
5688
5678
  cpu: z.ZodOptional<z.ZodString>;
5689
5679
  memory: z.ZodOptional<z.ZodString>;
5690
5680
  }, "strip", z.ZodTypeAny, {
5691
- cpu?: string | undefined;
5692
5681
  memory?: string | undefined;
5693
- }, {
5694
5682
  cpu?: string | undefined;
5683
+ }, {
5695
5684
  memory?: string | undefined;
5685
+ cpu?: string | undefined;
5696
5686
  }>>;
5697
5687
  }, "strip", z.ZodTypeAny, {
5698
5688
  requests?: {
5699
- cpu?: string | undefined;
5700
5689
  memory?: string | undefined;
5690
+ cpu?: string | undefined;
5701
5691
  } | undefined;
5702
5692
  limits?: {
5703
- cpu?: string | undefined;
5704
5693
  memory?: string | undefined;
5694
+ cpu?: string | undefined;
5705
5695
  } | undefined;
5706
5696
  }, {
5707
5697
  requests?: {
5708
- cpu?: string | undefined;
5709
5698
  memory?: string | undefined;
5699
+ cpu?: string | undefined;
5710
5700
  } | undefined;
5711
5701
  limits?: {
5712
- cpu?: string | undefined;
5713
5702
  memory?: string | undefined;
5703
+ cpu?: string | undefined;
5714
5704
  } | undefined;
5715
5705
  }>>;
5716
5706
  /** Scheduling-framework knobs (CONTROL-PLANE-SCHEDULING-DESIGN, 产品拍板 D1/D3 2026-07-04). Optional and
@@ -5759,11 +5749,88 @@ export declare const WorkerSpec: z.ZodObject<{
5759
5749
  } | undefined;
5760
5750
  drainGraceMs?: number | undefined;
5761
5751
  }>>;
5762
- /** 运行时 (非 secret). 映射到 service SESSION_BACKEND/REQUIRE_PRINCIPAL/RATE_LIMIT_RPM/… */
5752
+ /** 运行时 (非 secret). 映射到 service REQUIRE_PRINCIPAL / RATE_LIMIT_RPM / … 与两个结构块(7.0.0)。 */
5763
5753
  runtime: z.ZodObject<{
5764
- sessionBackend: z.ZodDefault<z.ZodEnum<["tidb", "memory", "auto"]>>;
5765
- memoryBackend: z.ZodDefault<z.ZodEnum<["off", "memory", "tidb"]>>;
5766
- db: z.ZodOptional<z.ZodString>;
5754
+ /** 7.0.0 执行车道块(见 `ExecutionBlock`)。enabled 的 worker 必填(WorkerSpec 层判);停用的可缺。 */
5755
+ execution: z.ZodOptional<z.ZodEffects<z.ZodObject<{
5756
+ lane: z.ZodEnum<["host", "e2b", "k8s", "ssh", "adb", "local-docker", "device"]>;
5757
+ coords: z.ZodDefault<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>>;
5758
+ secretRefs: z.ZodDefault<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>>;
5759
+ }, "strip", z.ZodTypeAny, {
5760
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
5761
+ secretRefs: Record<string, string>;
5762
+ coords: Record<string, string>;
5763
+ }, {
5764
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
5765
+ secretRefs?: Record<string, string> | undefined;
5766
+ coords?: Record<string, string> | undefined;
5767
+ }>, {
5768
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
5769
+ secretRefs: Record<string, string>;
5770
+ coords: Record<string, string>;
5771
+ }, {
5772
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
5773
+ secretRefs?: Record<string, string> | undefined;
5774
+ coords?: Record<string, string> | undefined;
5775
+ }>>;
5776
+ /** 7.0.0 存储块(见 `StoreBlock`)。enabled 的 worker 必填(WorkerSpec 层判);停用的可缺。 */
5777
+ store: z.ZodOptional<z.ZodObject<{
5778
+ backend: z.ZodEnum<["mysql", "pg", "local", "memory"]>;
5779
+ session: z.ZodDefault<z.ZodEnum<["memory", "mysql", "auto"]>>;
5780
+ memory: z.ZodDefault<z.ZodObject<{
5781
+ engine: z.ZodDefault<z.ZodEnum<["on", "off"]>>;
5782
+ backend: z.ZodDefault<z.ZodEnum<["file", "pg", "tidb"]>>;
5783
+ }, "strip", z.ZodTypeAny, {
5784
+ backend: "pg" | "file" | "tidb";
5785
+ engine: "on" | "off";
5786
+ }, {
5787
+ backend?: "pg" | "file" | "tidb" | undefined;
5788
+ engine?: "on" | "off" | undefined;
5789
+ }>>;
5790
+ /** SQL 服务器坐标(中立,一份;名族由 `backend` 决定)。 */
5791
+ db: z.ZodOptional<z.ZodObject<{
5792
+ host: z.ZodEffects<z.ZodString, string, string>;
5793
+ port: z.ZodNumber;
5794
+ user: z.ZodEffects<z.ZodString, string, string>;
5795
+ database: z.ZodEffects<z.ZodString, string, string>;
5796
+ }, "strip", z.ZodTypeAny, {
5797
+ host: string;
5798
+ port: number;
5799
+ user: string;
5800
+ database: string;
5801
+ }, {
5802
+ host: string;
5803
+ port: number;
5804
+ user: string;
5805
+ database: string;
5806
+ }>>;
5807
+ }, "strip", z.ZodTypeAny, {
5808
+ memory: {
5809
+ backend: "pg" | "file" | "tidb";
5810
+ engine: "on" | "off";
5811
+ };
5812
+ session: "mysql" | "memory" | "auto";
5813
+ backend: "mysql" | "pg" | "local" | "memory";
5814
+ db?: {
5815
+ host: string;
5816
+ port: number;
5817
+ user: string;
5818
+ database: string;
5819
+ } | undefined;
5820
+ }, {
5821
+ backend: "mysql" | "pg" | "local" | "memory";
5822
+ memory?: {
5823
+ backend?: "pg" | "file" | "tidb" | undefined;
5824
+ engine?: "on" | "off" | undefined;
5825
+ } | undefined;
5826
+ session?: "mysql" | "memory" | "auto" | undefined;
5827
+ db?: {
5828
+ host: string;
5829
+ port: number;
5830
+ user: string;
5831
+ database: string;
5832
+ } | undefined;
5833
+ }>>;
5767
5834
  scenario: z.ZodOptional<z.ZodString>;
5768
5835
  requirePrincipal: z.ZodDefault<z.ZodBoolean>;
5769
5836
  rateLimitRpm: z.ZodDefault<z.ZodNumber>;
@@ -5774,38 +5841,61 @@ export declare const WorkerSpec: z.ZodObject<{
5774
5841
  * default → absent never materialises → no spec-hash churn. Hash-included (read at boot → cap change recreates). */
5775
5842
  maxPrincipalCostUsd: z.ZodOptional<z.ZodNumber>;
5776
5843
  }, "strip", z.ZodTypeAny, {
5777
- sessionBackend: "memory" | "tidb" | "auto";
5778
- memoryBackend: "memory" | "tidb" | "off";
5779
5844
  requirePrincipal: boolean;
5780
5845
  rateLimitRpm: number;
5781
- db?: string | undefined;
5846
+ execution?: {
5847
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
5848
+ secretRefs: Record<string, string>;
5849
+ coords: Record<string, string>;
5850
+ } | undefined;
5851
+ store?: {
5852
+ memory: {
5853
+ backend: "pg" | "file" | "tidb";
5854
+ engine: "on" | "off";
5855
+ };
5856
+ session: "mysql" | "memory" | "auto";
5857
+ backend: "mysql" | "pg" | "local" | "memory";
5858
+ db?: {
5859
+ host: string;
5860
+ port: number;
5861
+ user: string;
5862
+ database: string;
5863
+ } | undefined;
5864
+ } | undefined;
5782
5865
  scenario?: string | undefined;
5783
5866
  maxPrincipalCostUsd?: number | undefined;
5784
5867
  }, {
5785
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
5786
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
5787
- db?: string | undefined;
5868
+ execution?: {
5869
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
5870
+ secretRefs?: Record<string, string> | undefined;
5871
+ coords?: Record<string, string> | undefined;
5872
+ } | undefined;
5873
+ store?: {
5874
+ backend: "mysql" | "pg" | "local" | "memory";
5875
+ memory?: {
5876
+ backend?: "pg" | "file" | "tidb" | undefined;
5877
+ engine?: "on" | "off" | undefined;
5878
+ } | undefined;
5879
+ session?: "mysql" | "memory" | "auto" | undefined;
5880
+ db?: {
5881
+ host: string;
5882
+ port: number;
5883
+ user: string;
5884
+ database: string;
5885
+ } | undefined;
5886
+ } | undefined;
5788
5887
  scenario?: string | undefined;
5789
5888
  requirePrincipal?: boolean | undefined;
5790
5889
  rateLimitRpm?: number | undefined;
5791
5890
  maxPrincipalCostUsd?: number | undefined;
5792
5891
  }>;
5793
- /** 物理坐标 (非 secret). 映射到 GIT_API_BASEURL / TIDB_HOST 等. */
5892
+ /** 物理坐标 (非 secret). 映射到 GIT_API_BASEURL。7.0.0 起 SQL 坐标在 `runtime.store.db`(`tidb*` 三键删除)。 */
5794
5893
  coords: z.ZodDefault<z.ZodObject<{
5795
5894
  gitApiBaseUrl: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>, z.ZodLiteral<"">]>;
5796
- tidbHost: z.ZodOptional<z.ZodString>;
5797
- tidbPort: z.ZodOptional<z.ZodNumber>;
5798
- tidbUser: z.ZodOptional<z.ZodString>;
5799
5895
  }, "strip", z.ZodTypeAny, {
5800
5896
  gitApiBaseUrl?: string | undefined;
5801
- tidbHost?: string | undefined;
5802
- tidbPort?: number | undefined;
5803
- tidbUser?: string | undefined;
5804
5897
  }, {
5805
5898
  gitApiBaseUrl?: string | undefined;
5806
- tidbHost?: string | undefined;
5807
- tidbPort?: number | undefined;
5808
- tidbUser?: string | undefined;
5809
5899
  }>>;
5810
5900
  secretRefs: z.ZodObject<{
5811
5901
  /** NAME of the host env var holding the model API key → service MODEL_API_KEY (或 anthropic 时 ANTHROPIC_API_KEY). */
@@ -5814,18 +5904,19 @@ export declare const WorkerSpec: z.ZodObject<{
5814
5904
  serviceAuthTokenEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5815
5905
  /** → GIT_API_TOKEN (只读,读被评审 repo). */
5816
5906
  gitTokenEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5817
- /** → TIDB_PASSWORD. */
5818
- tidbPasswordEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5907
+ /** 7.0.0:SQL 店的口令 → `MYSQL_PASSWORD` / `PG_PASSWORD`(渲染器按 `runtime.store.backend` 选名族)。
5908
+ * 在场 ⇔ `runtime.store.backend` ∈ {mysql, pg}(WorkerSpec 层判,与 `runtime.store.db` 同一条规则)。取代 6.x 的 `tidbPasswordEnv`。 */
5909
+ dbPasswordEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5819
5910
  }, "strip", z.ZodTypeAny, {
5820
5911
  apiKeyEnv: string;
5821
5912
  serviceAuthTokenEnv?: string | undefined;
5822
5913
  gitTokenEnv?: string | undefined;
5823
- tidbPasswordEnv?: string | undefined;
5914
+ dbPasswordEnv?: string | undefined;
5824
5915
  }, {
5825
5916
  apiKeyEnv: string;
5826
5917
  serviceAuthTokenEnv?: string | undefined;
5827
5918
  gitTokenEnv?: string | undefined;
5828
- tidbPasswordEnv?: string | undefined;
5919
+ dbPasswordEnv?: string | undefined;
5829
5920
  }>;
5830
5921
  /**
5831
5922
  * 通用 env 透传(逃生口)——给**没有专属结构化字段**的 service env 用,让任意 worker 声明自己的 app 专属变量
@@ -5906,32 +5997,130 @@ export declare const WorkerSpec: z.ZodObject<{
5906
5997
  signature: z.ZodOptional<z.ZodString>;
5907
5998
  notes: z.ZodOptional<z.ZodString>;
5908
5999
  }, "strip", z.ZodTypeAny, {
6000
+ host: string;
6001
+ secretRefs: {
6002
+ apiKeyEnv: string;
6003
+ serviceAuthTokenEnv?: string | undefined;
6004
+ gitTokenEnv?: string | undefined;
6005
+ dbPasswordEnv?: string | undefined;
6006
+ };
6007
+ coords: {
6008
+ gitApiBaseUrl?: string | undefined;
6009
+ };
5909
6010
  name: string;
5910
6011
  enabled: boolean;
5911
- host: string;
5912
6012
  image: string;
5913
6013
  runtime: {
5914
- sessionBackend: "memory" | "tidb" | "auto";
5915
- memoryBackend: "memory" | "tidb" | "off";
5916
6014
  requirePrincipal: boolean;
5917
6015
  rateLimitRpm: number;
5918
- db?: string | undefined;
6016
+ execution?: {
6017
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6018
+ secretRefs: Record<string, string>;
6019
+ coords: Record<string, string>;
6020
+ } | undefined;
6021
+ store?: {
6022
+ memory: {
6023
+ backend: "pg" | "file" | "tidb";
6024
+ engine: "on" | "off";
6025
+ };
6026
+ session: "mysql" | "memory" | "auto";
6027
+ backend: "mysql" | "pg" | "local" | "memory";
6028
+ db?: {
6029
+ host: string;
6030
+ port: number;
6031
+ user: string;
6032
+ database: string;
6033
+ } | undefined;
6034
+ } | undefined;
5919
6035
  scenario?: string | undefined;
5920
6036
  maxPrincipalCostUsd?: number | undefined;
5921
6037
  };
5922
- coords: {
5923
- gitApiBaseUrl?: string | undefined;
5924
- tidbHost?: string | undefined;
5925
- tidbPort?: number | undefined;
5926
- tidbUser?: string | undefined;
5927
- };
6038
+ notes?: string | undefined;
6039
+ routePrefix?: string | undefined;
6040
+ replicas?: number | undefined;
6041
+ autoscaling?: {
6042
+ minReplicas: number;
6043
+ maxReplicas: number;
6044
+ targetCpuPercent?: number | undefined;
6045
+ } | undefined;
6046
+ resources?: {
6047
+ requests?: {
6048
+ memory?: string | undefined;
6049
+ cpu?: string | undefined;
6050
+ } | undefined;
6051
+ limits?: {
6052
+ memory?: string | undefined;
6053
+ cpu?: string | undefined;
6054
+ } | undefined;
6055
+ } | undefined;
6056
+ fleet?: {
6057
+ dispatch?: {
6058
+ strategy: "round-robin" | "least-inflight" | "consistent-hash";
6059
+ sessionAffinity: boolean;
6060
+ maxInflight?: number | undefined;
6061
+ perActorMaxInflight?: number | undefined;
6062
+ maxCostUsd?: number | undefined;
6063
+ } | undefined;
6064
+ drainGraceMs?: number | undefined;
6065
+ } | undefined;
6066
+ env?: Record<string, string> | undefined;
6067
+ secretEnv?: Record<string, string> | undefined;
6068
+ recreateNonce?: string | undefined;
6069
+ lifecycle?: {
6070
+ kind: "persistent" | "ephemeral";
6071
+ ttl?: string | undefined;
6072
+ idleTimeout?: string | undefined;
6073
+ owner?: string | undefined;
6074
+ purpose?: string | undefined;
6075
+ dependsOn?: string[] | undefined;
6076
+ } | undefined;
6077
+ placement?: {
6078
+ auto: boolean;
6079
+ requires: string[];
6080
+ spread?: string | undefined;
6081
+ } | undefined;
6082
+ roster?: string | undefined;
6083
+ signature?: string | undefined;
6084
+ }, {
5928
6085
  secretRefs: {
5929
6086
  apiKeyEnv: string;
5930
6087
  serviceAuthTokenEnv?: string | undefined;
5931
6088
  gitTokenEnv?: string | undefined;
5932
- tidbPasswordEnv?: string | undefined;
6089
+ dbPasswordEnv?: string | undefined;
5933
6090
  };
6091
+ name: string;
6092
+ runtime: {
6093
+ execution?: {
6094
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6095
+ secretRefs?: Record<string, string> | undefined;
6096
+ coords?: Record<string, string> | undefined;
6097
+ } | undefined;
6098
+ store?: {
6099
+ backend: "mysql" | "pg" | "local" | "memory";
6100
+ memory?: {
6101
+ backend?: "pg" | "file" | "tidb" | undefined;
6102
+ engine?: "on" | "off" | undefined;
6103
+ } | undefined;
6104
+ session?: "mysql" | "memory" | "auto" | undefined;
6105
+ db?: {
6106
+ host: string;
6107
+ port: number;
6108
+ user: string;
6109
+ database: string;
6110
+ } | undefined;
6111
+ } | undefined;
6112
+ scenario?: string | undefined;
6113
+ requirePrincipal?: boolean | undefined;
6114
+ rateLimitRpm?: number | undefined;
6115
+ maxPrincipalCostUsd?: number | undefined;
6116
+ };
6117
+ host?: string | undefined;
6118
+ coords?: {
6119
+ gitApiBaseUrl?: string | undefined;
6120
+ } | undefined;
6121
+ enabled?: boolean | undefined;
5934
6122
  notes?: string | undefined;
6123
+ image?: string | undefined;
5935
6124
  routePrefix?: string | undefined;
5936
6125
  replicas?: number | undefined;
5937
6126
  autoscaling?: {
@@ -5941,12 +6130,97 @@ export declare const WorkerSpec: z.ZodObject<{
5941
6130
  } | undefined;
5942
6131
  resources?: {
5943
6132
  requests?: {
5944
- cpu?: string | undefined;
5945
6133
  memory?: string | undefined;
6134
+ cpu?: string | undefined;
5946
6135
  } | undefined;
5947
6136
  limits?: {
6137
+ memory?: string | undefined;
6138
+ cpu?: string | undefined;
6139
+ } | undefined;
6140
+ } | undefined;
6141
+ fleet?: {
6142
+ dispatch?: {
6143
+ strategy?: "round-robin" | "least-inflight" | "consistent-hash" | undefined;
6144
+ sessionAffinity?: boolean | undefined;
6145
+ maxInflight?: number | undefined;
6146
+ perActorMaxInflight?: number | undefined;
6147
+ maxCostUsd?: number | undefined;
6148
+ } | undefined;
6149
+ drainGraceMs?: number | undefined;
6150
+ } | undefined;
6151
+ env?: Record<string, string> | undefined;
6152
+ secretEnv?: Record<string, string> | undefined;
6153
+ recreateNonce?: string | undefined;
6154
+ lifecycle?: {
6155
+ kind?: "persistent" | "ephemeral" | undefined;
6156
+ ttl?: string | undefined;
6157
+ idleTimeout?: string | undefined;
6158
+ owner?: string | undefined;
6159
+ purpose?: string | undefined;
6160
+ dependsOn?: string[] | undefined;
6161
+ } | undefined;
6162
+ placement?: {
6163
+ auto?: boolean | undefined;
6164
+ requires?: string[] | undefined;
6165
+ spread?: string | undefined;
6166
+ } | undefined;
6167
+ roster?: string | undefined;
6168
+ signature?: string | undefined;
6169
+ }>, {
6170
+ host: string;
6171
+ secretRefs: {
6172
+ apiKeyEnv: string;
6173
+ serviceAuthTokenEnv?: string | undefined;
6174
+ gitTokenEnv?: string | undefined;
6175
+ dbPasswordEnv?: string | undefined;
6176
+ };
6177
+ coords: {
6178
+ gitApiBaseUrl?: string | undefined;
6179
+ };
6180
+ name: string;
6181
+ enabled: boolean;
6182
+ image: string;
6183
+ runtime: {
6184
+ requirePrincipal: boolean;
6185
+ rateLimitRpm: number;
6186
+ execution?: {
6187
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6188
+ secretRefs: Record<string, string>;
6189
+ coords: Record<string, string>;
6190
+ } | undefined;
6191
+ store?: {
6192
+ memory: {
6193
+ backend: "pg" | "file" | "tidb";
6194
+ engine: "on" | "off";
6195
+ };
6196
+ session: "mysql" | "memory" | "auto";
6197
+ backend: "mysql" | "pg" | "local" | "memory";
6198
+ db?: {
6199
+ host: string;
6200
+ port: number;
6201
+ user: string;
6202
+ database: string;
6203
+ } | undefined;
6204
+ } | undefined;
6205
+ scenario?: string | undefined;
6206
+ maxPrincipalCostUsd?: number | undefined;
6207
+ };
6208
+ notes?: string | undefined;
6209
+ routePrefix?: string | undefined;
6210
+ replicas?: number | undefined;
6211
+ autoscaling?: {
6212
+ minReplicas: number;
6213
+ maxReplicas: number;
6214
+ targetCpuPercent?: number | undefined;
6215
+ } | undefined;
6216
+ resources?: {
6217
+ requests?: {
6218
+ memory?: string | undefined;
5948
6219
  cpu?: string | undefined;
6220
+ } | undefined;
6221
+ limits?: {
5949
6222
  memory?: string | undefined;
6223
+ cpu?: string | undefined;
5950
6224
  } | undefined;
5951
6225
  } | undefined;
5952
6226
  fleet?: {
@@ -5978,25 +6252,44 @@ export declare const WorkerSpec: z.ZodObject<{
5978
6252
  roster?: string | undefined;
5979
6253
  signature?: string | undefined;
5980
6254
  }, {
6255
+ secretRefs: {
6256
+ apiKeyEnv: string;
6257
+ serviceAuthTokenEnv?: string | undefined;
6258
+ gitTokenEnv?: string | undefined;
6259
+ dbPasswordEnv?: string | undefined;
6260
+ };
5981
6261
  name: string;
5982
6262
  runtime: {
5983
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
5984
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
5985
- db?: string | undefined;
6263
+ execution?: {
6264
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6265
+ secretRefs?: Record<string, string> | undefined;
6266
+ coords?: Record<string, string> | undefined;
6267
+ } | undefined;
6268
+ store?: {
6269
+ backend: "mysql" | "pg" | "local" | "memory";
6270
+ memory?: {
6271
+ backend?: "pg" | "file" | "tidb" | undefined;
6272
+ engine?: "on" | "off" | undefined;
6273
+ } | undefined;
6274
+ session?: "mysql" | "memory" | "auto" | undefined;
6275
+ db?: {
6276
+ host: string;
6277
+ port: number;
6278
+ user: string;
6279
+ database: string;
6280
+ } | undefined;
6281
+ } | undefined;
5986
6282
  scenario?: string | undefined;
5987
6283
  requirePrincipal?: boolean | undefined;
5988
6284
  rateLimitRpm?: number | undefined;
5989
6285
  maxPrincipalCostUsd?: number | undefined;
5990
6286
  };
5991
- secretRefs: {
5992
- apiKeyEnv: string;
5993
- serviceAuthTokenEnv?: string | undefined;
5994
- gitTokenEnv?: string | undefined;
5995
- tidbPasswordEnv?: string | undefined;
5996
- };
6287
+ host?: string | undefined;
6288
+ coords?: {
6289
+ gitApiBaseUrl?: string | undefined;
6290
+ } | undefined;
5997
6291
  enabled?: boolean | undefined;
5998
6292
  notes?: string | undefined;
5999
- host?: string | undefined;
6000
6293
  image?: string | undefined;
6001
6294
  routePrefix?: string | undefined;
6002
6295
  replicas?: number | undefined;
@@ -6007,12 +6300,12 @@ export declare const WorkerSpec: z.ZodObject<{
6007
6300
  } | undefined;
6008
6301
  resources?: {
6009
6302
  requests?: {
6010
- cpu?: string | undefined;
6011
6303
  memory?: string | undefined;
6304
+ cpu?: string | undefined;
6012
6305
  } | undefined;
6013
6306
  limits?: {
6014
- cpu?: string | undefined;
6015
6307
  memory?: string | undefined;
6308
+ cpu?: string | undefined;
6016
6309
  } | undefined;
6017
6310
  } | undefined;
6018
6311
  fleet?: {
@@ -6025,12 +6318,6 @@ export declare const WorkerSpec: z.ZodObject<{
6025
6318
  } | undefined;
6026
6319
  drainGraceMs?: number | undefined;
6027
6320
  } | undefined;
6028
- coords?: {
6029
- gitApiBaseUrl?: string | undefined;
6030
- tidbHost?: string | undefined;
6031
- tidbPort?: number | undefined;
6032
- tidbUser?: string | undefined;
6033
- } | undefined;
6034
6321
  env?: Record<string, string> | undefined;
6035
6322
  secretEnv?: Record<string, string> | undefined;
6036
6323
  recreateNonce?: string | undefined;
@@ -6049,7 +6336,92 @@ export declare const WorkerSpec: z.ZodObject<{
6049
6336
  } | undefined;
6050
6337
  roster?: string | undefined;
6051
6338
  signature?: string | undefined;
6052
- }>;
6339
+ }>, {
6340
+ host: string;
6341
+ secretRefs: {
6342
+ apiKeyEnv: string;
6343
+ serviceAuthTokenEnv?: string | undefined;
6344
+ gitTokenEnv?: string | undefined;
6345
+ dbPasswordEnv?: string | undefined;
6346
+ };
6347
+ coords: {
6348
+ gitApiBaseUrl?: string | undefined;
6349
+ };
6350
+ name: string;
6351
+ enabled: boolean;
6352
+ image: string;
6353
+ runtime: {
6354
+ requirePrincipal: boolean;
6355
+ rateLimitRpm: number;
6356
+ execution?: {
6357
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6358
+ secretRefs: Record<string, string>;
6359
+ coords: Record<string, string>;
6360
+ } | undefined;
6361
+ store?: {
6362
+ memory: {
6363
+ backend: "pg" | "file" | "tidb";
6364
+ engine: "on" | "off";
6365
+ };
6366
+ session: "mysql" | "memory" | "auto";
6367
+ backend: "mysql" | "pg" | "local" | "memory";
6368
+ db?: {
6369
+ host: string;
6370
+ port: number;
6371
+ user: string;
6372
+ database: string;
6373
+ } | undefined;
6374
+ } | undefined;
6375
+ scenario?: string | undefined;
6376
+ maxPrincipalCostUsd?: number | undefined;
6377
+ };
6378
+ notes?: string | undefined;
6379
+ routePrefix?: string | undefined;
6380
+ replicas?: number | undefined;
6381
+ autoscaling?: {
6382
+ minReplicas: number;
6383
+ maxReplicas: number;
6384
+ targetCpuPercent?: number | undefined;
6385
+ } | undefined;
6386
+ resources?: {
6387
+ requests?: {
6388
+ memory?: string | undefined;
6389
+ cpu?: string | undefined;
6390
+ } | undefined;
6391
+ limits?: {
6392
+ memory?: string | undefined;
6393
+ cpu?: string | undefined;
6394
+ } | undefined;
6395
+ } | undefined;
6396
+ fleet?: {
6397
+ dispatch?: {
6398
+ strategy: "round-robin" | "least-inflight" | "consistent-hash";
6399
+ sessionAffinity: boolean;
6400
+ maxInflight?: number | undefined;
6401
+ perActorMaxInflight?: number | undefined;
6402
+ maxCostUsd?: number | undefined;
6403
+ } | undefined;
6404
+ drainGraceMs?: number | undefined;
6405
+ } | undefined;
6406
+ env?: Record<string, string> | undefined;
6407
+ secretEnv?: Record<string, string> | undefined;
6408
+ recreateNonce?: string | undefined;
6409
+ lifecycle?: {
6410
+ kind: "persistent" | "ephemeral";
6411
+ ttl?: string | undefined;
6412
+ idleTimeout?: string | undefined;
6413
+ owner?: string | undefined;
6414
+ purpose?: string | undefined;
6415
+ dependsOn?: string[] | undefined;
6416
+ } | undefined;
6417
+ placement?: {
6418
+ auto: boolean;
6419
+ requires: string[];
6420
+ spread?: string | undefined;
6421
+ } | undefined;
6422
+ roster?: string | undefined;
6423
+ signature?: string | undefined;
6424
+ }, unknown>;
6053
6425
  export type WorkerSpec = z.infer<typeof WorkerSpec>;
6054
6426
  /** Effective route key for a worker = explicit routePrefix, else its name. */
6055
6427
  export declare function workerRouteKey(w: {
@@ -6094,7 +6466,7 @@ export declare const WORKER_RESOURCE_PRESETS: {
6094
6466
  };
6095
6467
  export type WorkerResourcePreset = keyof typeof WORKER_RESOURCE_PRESETS;
6096
6468
  export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6097
- workers: z.ZodDefault<z.ZodArray<z.ZodObject<{
6469
+ workers: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
6098
6470
  /** 唯一 → 容器名 / compose project. */
6099
6471
  name: z.ZodString;
6100
6472
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -6151,39 +6523,39 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6151
6523
  cpu: z.ZodOptional<z.ZodString>;
6152
6524
  memory: z.ZodOptional<z.ZodString>;
6153
6525
  }, "strip", z.ZodTypeAny, {
6154
- cpu?: string | undefined;
6155
6526
  memory?: string | undefined;
6156
- }, {
6157
6527
  cpu?: string | undefined;
6528
+ }, {
6158
6529
  memory?: string | undefined;
6530
+ cpu?: string | undefined;
6159
6531
  }>>;
6160
6532
  limits: z.ZodOptional<z.ZodObject<{
6161
6533
  cpu: z.ZodOptional<z.ZodString>;
6162
6534
  memory: z.ZodOptional<z.ZodString>;
6163
6535
  }, "strip", z.ZodTypeAny, {
6164
- cpu?: string | undefined;
6165
6536
  memory?: string | undefined;
6166
- }, {
6167
6537
  cpu?: string | undefined;
6538
+ }, {
6168
6539
  memory?: string | undefined;
6540
+ cpu?: string | undefined;
6169
6541
  }>>;
6170
6542
  }, "strip", z.ZodTypeAny, {
6171
6543
  requests?: {
6172
- cpu?: string | undefined;
6173
6544
  memory?: string | undefined;
6545
+ cpu?: string | undefined;
6174
6546
  } | undefined;
6175
6547
  limits?: {
6176
- cpu?: string | undefined;
6177
6548
  memory?: string | undefined;
6549
+ cpu?: string | undefined;
6178
6550
  } | undefined;
6179
6551
  }, {
6180
6552
  requests?: {
6181
- cpu?: string | undefined;
6182
6553
  memory?: string | undefined;
6554
+ cpu?: string | undefined;
6183
6555
  } | undefined;
6184
6556
  limits?: {
6185
- cpu?: string | undefined;
6186
6557
  memory?: string | undefined;
6558
+ cpu?: string | undefined;
6187
6559
  } | undefined;
6188
6560
  }>>;
6189
6561
  /** Scheduling-framework knobs (CONTROL-PLANE-SCHEDULING-DESIGN, 产品拍板 D1/D3 2026-07-04). Optional and
@@ -6232,11 +6604,88 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6232
6604
  } | undefined;
6233
6605
  drainGraceMs?: number | undefined;
6234
6606
  }>>;
6235
- /** 运行时 (非 secret). 映射到 service SESSION_BACKEND/REQUIRE_PRINCIPAL/RATE_LIMIT_RPM/… */
6607
+ /** 运行时 (非 secret). 映射到 service REQUIRE_PRINCIPAL / RATE_LIMIT_RPM / … 与两个结构块(7.0.0)。 */
6236
6608
  runtime: z.ZodObject<{
6237
- sessionBackend: z.ZodDefault<z.ZodEnum<["tidb", "memory", "auto"]>>;
6238
- memoryBackend: z.ZodDefault<z.ZodEnum<["off", "memory", "tidb"]>>;
6239
- db: z.ZodOptional<z.ZodString>;
6609
+ /** 7.0.0 执行车道块(见 `ExecutionBlock`)。enabled 的 worker 必填(WorkerSpec 层判);停用的可缺。 */
6610
+ execution: z.ZodOptional<z.ZodEffects<z.ZodObject<{
6611
+ lane: z.ZodEnum<["host", "e2b", "k8s", "ssh", "adb", "local-docker", "device"]>;
6612
+ coords: z.ZodDefault<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>>;
6613
+ secretRefs: z.ZodDefault<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>>;
6614
+ }, "strip", z.ZodTypeAny, {
6615
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6616
+ secretRefs: Record<string, string>;
6617
+ coords: Record<string, string>;
6618
+ }, {
6619
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6620
+ secretRefs?: Record<string, string> | undefined;
6621
+ coords?: Record<string, string> | undefined;
6622
+ }>, {
6623
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6624
+ secretRefs: Record<string, string>;
6625
+ coords: Record<string, string>;
6626
+ }, {
6627
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6628
+ secretRefs?: Record<string, string> | undefined;
6629
+ coords?: Record<string, string> | undefined;
6630
+ }>>;
6631
+ /** 7.0.0 存储块(见 `StoreBlock`)。enabled 的 worker 必填(WorkerSpec 层判);停用的可缺。 */
6632
+ store: z.ZodOptional<z.ZodObject<{
6633
+ backend: z.ZodEnum<["mysql", "pg", "local", "memory"]>;
6634
+ session: z.ZodDefault<z.ZodEnum<["memory", "mysql", "auto"]>>;
6635
+ memory: z.ZodDefault<z.ZodObject<{
6636
+ engine: z.ZodDefault<z.ZodEnum<["on", "off"]>>;
6637
+ backend: z.ZodDefault<z.ZodEnum<["file", "pg", "tidb"]>>;
6638
+ }, "strip", z.ZodTypeAny, {
6639
+ backend: "pg" | "file" | "tidb";
6640
+ engine: "on" | "off";
6641
+ }, {
6642
+ backend?: "pg" | "file" | "tidb" | undefined;
6643
+ engine?: "on" | "off" | undefined;
6644
+ }>>;
6645
+ /** SQL 服务器坐标(中立,一份;名族由 `backend` 决定)。 */
6646
+ db: z.ZodOptional<z.ZodObject<{
6647
+ host: z.ZodEffects<z.ZodString, string, string>;
6648
+ port: z.ZodNumber;
6649
+ user: z.ZodEffects<z.ZodString, string, string>;
6650
+ database: z.ZodEffects<z.ZodString, string, string>;
6651
+ }, "strip", z.ZodTypeAny, {
6652
+ host: string;
6653
+ port: number;
6654
+ user: string;
6655
+ database: string;
6656
+ }, {
6657
+ host: string;
6658
+ port: number;
6659
+ user: string;
6660
+ database: string;
6661
+ }>>;
6662
+ }, "strip", z.ZodTypeAny, {
6663
+ memory: {
6664
+ backend: "pg" | "file" | "tidb";
6665
+ engine: "on" | "off";
6666
+ };
6667
+ session: "mysql" | "memory" | "auto";
6668
+ backend: "mysql" | "pg" | "local" | "memory";
6669
+ db?: {
6670
+ host: string;
6671
+ port: number;
6672
+ user: string;
6673
+ database: string;
6674
+ } | undefined;
6675
+ }, {
6676
+ backend: "mysql" | "pg" | "local" | "memory";
6677
+ memory?: {
6678
+ backend?: "pg" | "file" | "tidb" | undefined;
6679
+ engine?: "on" | "off" | undefined;
6680
+ } | undefined;
6681
+ session?: "mysql" | "memory" | "auto" | undefined;
6682
+ db?: {
6683
+ host: string;
6684
+ port: number;
6685
+ user: string;
6686
+ database: string;
6687
+ } | undefined;
6688
+ }>>;
6240
6689
  scenario: z.ZodOptional<z.ZodString>;
6241
6690
  requirePrincipal: z.ZodDefault<z.ZodBoolean>;
6242
6691
  rateLimitRpm: z.ZodDefault<z.ZodNumber>;
@@ -6247,38 +6696,61 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6247
6696
  * default → absent never materialises → no spec-hash churn. Hash-included (read at boot → cap change recreates). */
6248
6697
  maxPrincipalCostUsd: z.ZodOptional<z.ZodNumber>;
6249
6698
  }, "strip", z.ZodTypeAny, {
6250
- sessionBackend: "memory" | "tidb" | "auto";
6251
- memoryBackend: "memory" | "tidb" | "off";
6252
6699
  requirePrincipal: boolean;
6253
6700
  rateLimitRpm: number;
6254
- db?: string | undefined;
6701
+ execution?: {
6702
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6703
+ secretRefs: Record<string, string>;
6704
+ coords: Record<string, string>;
6705
+ } | undefined;
6706
+ store?: {
6707
+ memory: {
6708
+ backend: "pg" | "file" | "tidb";
6709
+ engine: "on" | "off";
6710
+ };
6711
+ session: "mysql" | "memory" | "auto";
6712
+ backend: "mysql" | "pg" | "local" | "memory";
6713
+ db?: {
6714
+ host: string;
6715
+ port: number;
6716
+ user: string;
6717
+ database: string;
6718
+ } | undefined;
6719
+ } | undefined;
6255
6720
  scenario?: string | undefined;
6256
6721
  maxPrincipalCostUsd?: number | undefined;
6257
6722
  }, {
6258
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
6259
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
6260
- db?: string | undefined;
6723
+ execution?: {
6724
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6725
+ secretRefs?: Record<string, string> | undefined;
6726
+ coords?: Record<string, string> | undefined;
6727
+ } | undefined;
6728
+ store?: {
6729
+ backend: "mysql" | "pg" | "local" | "memory";
6730
+ memory?: {
6731
+ backend?: "pg" | "file" | "tidb" | undefined;
6732
+ engine?: "on" | "off" | undefined;
6733
+ } | undefined;
6734
+ session?: "mysql" | "memory" | "auto" | undefined;
6735
+ db?: {
6736
+ host: string;
6737
+ port: number;
6738
+ user: string;
6739
+ database: string;
6740
+ } | undefined;
6741
+ } | undefined;
6261
6742
  scenario?: string | undefined;
6262
6743
  requirePrincipal?: boolean | undefined;
6263
6744
  rateLimitRpm?: number | undefined;
6264
6745
  maxPrincipalCostUsd?: number | undefined;
6265
6746
  }>;
6266
- /** 物理坐标 (非 secret). 映射到 GIT_API_BASEURL / TIDB_HOST 等. */
6747
+ /** 物理坐标 (非 secret). 映射到 GIT_API_BASEURL。7.0.0 起 SQL 坐标在 `runtime.store.db`(`tidb*` 三键删除)。 */
6267
6748
  coords: z.ZodDefault<z.ZodObject<{
6268
6749
  gitApiBaseUrl: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>, z.ZodLiteral<"">]>;
6269
- tidbHost: z.ZodOptional<z.ZodString>;
6270
- tidbPort: z.ZodOptional<z.ZodNumber>;
6271
- tidbUser: z.ZodOptional<z.ZodString>;
6272
6750
  }, "strip", z.ZodTypeAny, {
6273
6751
  gitApiBaseUrl?: string | undefined;
6274
- tidbHost?: string | undefined;
6275
- tidbPort?: number | undefined;
6276
- tidbUser?: string | undefined;
6277
6752
  }, {
6278
6753
  gitApiBaseUrl?: string | undefined;
6279
- tidbHost?: string | undefined;
6280
- tidbPort?: number | undefined;
6281
- tidbUser?: string | undefined;
6282
6754
  }>>;
6283
6755
  secretRefs: z.ZodObject<{
6284
6756
  /** NAME of the host env var holding the model API key → service MODEL_API_KEY (或 anthropic 时 ANTHROPIC_API_KEY). */
@@ -6287,18 +6759,19 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6287
6759
  serviceAuthTokenEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6288
6760
  /** → GIT_API_TOKEN (只读,读被评审 repo). */
6289
6761
  gitTokenEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6290
- /** → TIDB_PASSWORD. */
6291
- tidbPasswordEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6762
+ /** 7.0.0:SQL 店的口令 → `MYSQL_PASSWORD` / `PG_PASSWORD`(渲染器按 `runtime.store.backend` 选名族)。
6763
+ * 在场 ⇔ `runtime.store.backend` ∈ {mysql, pg}(WorkerSpec 层判,与 `runtime.store.db` 同一条规则)。取代 6.x 的 `tidbPasswordEnv`。 */
6764
+ dbPasswordEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6292
6765
  }, "strip", z.ZodTypeAny, {
6293
6766
  apiKeyEnv: string;
6294
6767
  serviceAuthTokenEnv?: string | undefined;
6295
6768
  gitTokenEnv?: string | undefined;
6296
- tidbPasswordEnv?: string | undefined;
6769
+ dbPasswordEnv?: string | undefined;
6297
6770
  }, {
6298
6771
  apiKeyEnv: string;
6299
6772
  serviceAuthTokenEnv?: string | undefined;
6300
6773
  gitTokenEnv?: string | undefined;
6301
- tidbPasswordEnv?: string | undefined;
6774
+ dbPasswordEnv?: string | undefined;
6302
6775
  }>;
6303
6776
  /**
6304
6777
  * 通用 env 透传(逃生口)——给**没有专属结构化字段**的 service env 用,让任意 worker 声明自己的 app 专属变量
@@ -6379,31 +6852,214 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6379
6852
  signature: z.ZodOptional<z.ZodString>;
6380
6853
  notes: z.ZodOptional<z.ZodString>;
6381
6854
  }, "strip", z.ZodTypeAny, {
6855
+ host: string;
6856
+ secretRefs: {
6857
+ apiKeyEnv: string;
6858
+ serviceAuthTokenEnv?: string | undefined;
6859
+ gitTokenEnv?: string | undefined;
6860
+ dbPasswordEnv?: string | undefined;
6861
+ };
6862
+ coords: {
6863
+ gitApiBaseUrl?: string | undefined;
6864
+ };
6865
+ name: string;
6866
+ enabled: boolean;
6867
+ image: string;
6868
+ runtime: {
6869
+ requirePrincipal: boolean;
6870
+ rateLimitRpm: number;
6871
+ execution?: {
6872
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6873
+ secretRefs: Record<string, string>;
6874
+ coords: Record<string, string>;
6875
+ } | undefined;
6876
+ store?: {
6877
+ memory: {
6878
+ backend: "pg" | "file" | "tidb";
6879
+ engine: "on" | "off";
6880
+ };
6881
+ session: "mysql" | "memory" | "auto";
6882
+ backend: "mysql" | "pg" | "local" | "memory";
6883
+ db?: {
6884
+ host: string;
6885
+ port: number;
6886
+ user: string;
6887
+ database: string;
6888
+ } | undefined;
6889
+ } | undefined;
6890
+ scenario?: string | undefined;
6891
+ maxPrincipalCostUsd?: number | undefined;
6892
+ };
6893
+ notes?: string | undefined;
6894
+ routePrefix?: string | undefined;
6895
+ replicas?: number | undefined;
6896
+ autoscaling?: {
6897
+ minReplicas: number;
6898
+ maxReplicas: number;
6899
+ targetCpuPercent?: number | undefined;
6900
+ } | undefined;
6901
+ resources?: {
6902
+ requests?: {
6903
+ memory?: string | undefined;
6904
+ cpu?: string | undefined;
6905
+ } | undefined;
6906
+ limits?: {
6907
+ memory?: string | undefined;
6908
+ cpu?: string | undefined;
6909
+ } | undefined;
6910
+ } | undefined;
6911
+ fleet?: {
6912
+ dispatch?: {
6913
+ strategy: "round-robin" | "least-inflight" | "consistent-hash";
6914
+ sessionAffinity: boolean;
6915
+ maxInflight?: number | undefined;
6916
+ perActorMaxInflight?: number | undefined;
6917
+ maxCostUsd?: number | undefined;
6918
+ } | undefined;
6919
+ drainGraceMs?: number | undefined;
6920
+ } | undefined;
6921
+ env?: Record<string, string> | undefined;
6922
+ secretEnv?: Record<string, string> | undefined;
6923
+ recreateNonce?: string | undefined;
6924
+ lifecycle?: {
6925
+ kind: "persistent" | "ephemeral";
6926
+ ttl?: string | undefined;
6927
+ idleTimeout?: string | undefined;
6928
+ owner?: string | undefined;
6929
+ purpose?: string | undefined;
6930
+ dependsOn?: string[] | undefined;
6931
+ } | undefined;
6932
+ placement?: {
6933
+ auto: boolean;
6934
+ requires: string[];
6935
+ spread?: string | undefined;
6936
+ } | undefined;
6937
+ roster?: string | undefined;
6938
+ signature?: string | undefined;
6939
+ }, {
6940
+ secretRefs: {
6941
+ apiKeyEnv: string;
6942
+ serviceAuthTokenEnv?: string | undefined;
6943
+ gitTokenEnv?: string | undefined;
6944
+ dbPasswordEnv?: string | undefined;
6945
+ };
6946
+ name: string;
6947
+ runtime: {
6948
+ execution?: {
6949
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
6950
+ secretRefs?: Record<string, string> | undefined;
6951
+ coords?: Record<string, string> | undefined;
6952
+ } | undefined;
6953
+ store?: {
6954
+ backend: "mysql" | "pg" | "local" | "memory";
6955
+ memory?: {
6956
+ backend?: "pg" | "file" | "tidb" | undefined;
6957
+ engine?: "on" | "off" | undefined;
6958
+ } | undefined;
6959
+ session?: "mysql" | "memory" | "auto" | undefined;
6960
+ db?: {
6961
+ host: string;
6962
+ port: number;
6963
+ user: string;
6964
+ database: string;
6965
+ } | undefined;
6966
+ } | undefined;
6967
+ scenario?: string | undefined;
6968
+ requirePrincipal?: boolean | undefined;
6969
+ rateLimitRpm?: number | undefined;
6970
+ maxPrincipalCostUsd?: number | undefined;
6971
+ };
6972
+ host?: string | undefined;
6973
+ coords?: {
6974
+ gitApiBaseUrl?: string | undefined;
6975
+ } | undefined;
6976
+ enabled?: boolean | undefined;
6977
+ notes?: string | undefined;
6978
+ image?: string | undefined;
6979
+ routePrefix?: string | undefined;
6980
+ replicas?: number | undefined;
6981
+ autoscaling?: {
6982
+ minReplicas: number;
6983
+ maxReplicas: number;
6984
+ targetCpuPercent?: number | undefined;
6985
+ } | undefined;
6986
+ resources?: {
6987
+ requests?: {
6988
+ memory?: string | undefined;
6989
+ cpu?: string | undefined;
6990
+ } | undefined;
6991
+ limits?: {
6992
+ memory?: string | undefined;
6993
+ cpu?: string | undefined;
6994
+ } | undefined;
6995
+ } | undefined;
6996
+ fleet?: {
6997
+ dispatch?: {
6998
+ strategy?: "round-robin" | "least-inflight" | "consistent-hash" | undefined;
6999
+ sessionAffinity?: boolean | undefined;
7000
+ maxInflight?: number | undefined;
7001
+ perActorMaxInflight?: number | undefined;
7002
+ maxCostUsd?: number | undefined;
7003
+ } | undefined;
7004
+ drainGraceMs?: number | undefined;
7005
+ } | undefined;
7006
+ env?: Record<string, string> | undefined;
7007
+ secretEnv?: Record<string, string> | undefined;
7008
+ recreateNonce?: string | undefined;
7009
+ lifecycle?: {
7010
+ kind?: "persistent" | "ephemeral" | undefined;
7011
+ ttl?: string | undefined;
7012
+ idleTimeout?: string | undefined;
7013
+ owner?: string | undefined;
7014
+ purpose?: string | undefined;
7015
+ dependsOn?: string[] | undefined;
7016
+ } | undefined;
7017
+ placement?: {
7018
+ auto?: boolean | undefined;
7019
+ requires?: string[] | undefined;
7020
+ spread?: string | undefined;
7021
+ } | undefined;
7022
+ roster?: string | undefined;
7023
+ signature?: string | undefined;
7024
+ }>, {
7025
+ host: string;
7026
+ secretRefs: {
7027
+ apiKeyEnv: string;
7028
+ serviceAuthTokenEnv?: string | undefined;
7029
+ gitTokenEnv?: string | undefined;
7030
+ dbPasswordEnv?: string | undefined;
7031
+ };
7032
+ coords: {
7033
+ gitApiBaseUrl?: string | undefined;
7034
+ };
6382
7035
  name: string;
6383
7036
  enabled: boolean;
6384
- host: string;
6385
7037
  image: string;
6386
7038
  runtime: {
6387
- sessionBackend: "memory" | "tidb" | "auto";
6388
- memoryBackend: "memory" | "tidb" | "off";
6389
7039
  requirePrincipal: boolean;
6390
7040
  rateLimitRpm: number;
6391
- db?: string | undefined;
7041
+ execution?: {
7042
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
7043
+ secretRefs: Record<string, string>;
7044
+ coords: Record<string, string>;
7045
+ } | undefined;
7046
+ store?: {
7047
+ memory: {
7048
+ backend: "pg" | "file" | "tidb";
7049
+ engine: "on" | "off";
7050
+ };
7051
+ session: "mysql" | "memory" | "auto";
7052
+ backend: "mysql" | "pg" | "local" | "memory";
7053
+ db?: {
7054
+ host: string;
7055
+ port: number;
7056
+ user: string;
7057
+ database: string;
7058
+ } | undefined;
7059
+ } | undefined;
6392
7060
  scenario?: string | undefined;
6393
7061
  maxPrincipalCostUsd?: number | undefined;
6394
7062
  };
6395
- coords: {
6396
- gitApiBaseUrl?: string | undefined;
6397
- tidbHost?: string | undefined;
6398
- tidbPort?: number | undefined;
6399
- tidbUser?: string | undefined;
6400
- };
6401
- secretRefs: {
6402
- apiKeyEnv: string;
6403
- serviceAuthTokenEnv?: string | undefined;
6404
- gitTokenEnv?: string | undefined;
6405
- tidbPasswordEnv?: string | undefined;
6406
- };
6407
7063
  notes?: string | undefined;
6408
7064
  routePrefix?: string | undefined;
6409
7065
  replicas?: number | undefined;
@@ -6414,12 +7070,12 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6414
7070
  } | undefined;
6415
7071
  resources?: {
6416
7072
  requests?: {
6417
- cpu?: string | undefined;
6418
7073
  memory?: string | undefined;
7074
+ cpu?: string | undefined;
6419
7075
  } | undefined;
6420
7076
  limits?: {
6421
- cpu?: string | undefined;
6422
7077
  memory?: string | undefined;
7078
+ cpu?: string | undefined;
6423
7079
  } | undefined;
6424
7080
  } | undefined;
6425
7081
  fleet?: {
@@ -6451,25 +7107,44 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6451
7107
  roster?: string | undefined;
6452
7108
  signature?: string | undefined;
6453
7109
  }, {
7110
+ secretRefs: {
7111
+ apiKeyEnv: string;
7112
+ serviceAuthTokenEnv?: string | undefined;
7113
+ gitTokenEnv?: string | undefined;
7114
+ dbPasswordEnv?: string | undefined;
7115
+ };
6454
7116
  name: string;
6455
7117
  runtime: {
6456
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
6457
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
6458
- db?: string | undefined;
7118
+ execution?: {
7119
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
7120
+ secretRefs?: Record<string, string> | undefined;
7121
+ coords?: Record<string, string> | undefined;
7122
+ } | undefined;
7123
+ store?: {
7124
+ backend: "mysql" | "pg" | "local" | "memory";
7125
+ memory?: {
7126
+ backend?: "pg" | "file" | "tidb" | undefined;
7127
+ engine?: "on" | "off" | undefined;
7128
+ } | undefined;
7129
+ session?: "mysql" | "memory" | "auto" | undefined;
7130
+ db?: {
7131
+ host: string;
7132
+ port: number;
7133
+ user: string;
7134
+ database: string;
7135
+ } | undefined;
7136
+ } | undefined;
6459
7137
  scenario?: string | undefined;
6460
7138
  requirePrincipal?: boolean | undefined;
6461
7139
  rateLimitRpm?: number | undefined;
6462
7140
  maxPrincipalCostUsd?: number | undefined;
6463
7141
  };
6464
- secretRefs: {
6465
- apiKeyEnv: string;
6466
- serviceAuthTokenEnv?: string | undefined;
6467
- gitTokenEnv?: string | undefined;
6468
- tidbPasswordEnv?: string | undefined;
6469
- };
7142
+ host?: string | undefined;
7143
+ coords?: {
7144
+ gitApiBaseUrl?: string | undefined;
7145
+ } | undefined;
6470
7146
  enabled?: boolean | undefined;
6471
7147
  notes?: string | undefined;
6472
- host?: string | undefined;
6473
7148
  image?: string | undefined;
6474
7149
  routePrefix?: string | undefined;
6475
7150
  replicas?: number | undefined;
@@ -6480,12 +7155,12 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6480
7155
  } | undefined;
6481
7156
  resources?: {
6482
7157
  requests?: {
6483
- cpu?: string | undefined;
6484
7158
  memory?: string | undefined;
7159
+ cpu?: string | undefined;
6485
7160
  } | undefined;
6486
7161
  limits?: {
6487
- cpu?: string | undefined;
6488
7162
  memory?: string | undefined;
7163
+ cpu?: string | undefined;
6489
7164
  } | undefined;
6490
7165
  } | undefined;
6491
7166
  fleet?: {
@@ -6498,12 +7173,6 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6498
7173
  } | undefined;
6499
7174
  drainGraceMs?: number | undefined;
6500
7175
  } | undefined;
6501
- coords?: {
6502
- gitApiBaseUrl?: string | undefined;
6503
- tidbHost?: string | undefined;
6504
- tidbPort?: number | undefined;
6505
- tidbUser?: string | undefined;
6506
- } | undefined;
6507
7176
  env?: Record<string, string> | undefined;
6508
7177
  secretEnv?: Record<string, string> | undefined;
6509
7178
  recreateNonce?: string | undefined;
@@ -6522,34 +7191,45 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6522
7191
  } | undefined;
6523
7192
  roster?: string | undefined;
6524
7193
  signature?: string | undefined;
6525
- }>, "many">>;
6526
- }, "strip", z.ZodTypeAny, {
6527
- workers: {
7194
+ }>, {
7195
+ host: string;
7196
+ secretRefs: {
7197
+ apiKeyEnv: string;
7198
+ serviceAuthTokenEnv?: string | undefined;
7199
+ gitTokenEnv?: string | undefined;
7200
+ dbPasswordEnv?: string | undefined;
7201
+ };
7202
+ coords: {
7203
+ gitApiBaseUrl?: string | undefined;
7204
+ };
6528
7205
  name: string;
6529
7206
  enabled: boolean;
6530
- host: string;
6531
7207
  image: string;
6532
7208
  runtime: {
6533
- sessionBackend: "memory" | "tidb" | "auto";
6534
- memoryBackend: "memory" | "tidb" | "off";
6535
7209
  requirePrincipal: boolean;
6536
7210
  rateLimitRpm: number;
6537
- db?: string | undefined;
7211
+ execution?: {
7212
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
7213
+ secretRefs: Record<string, string>;
7214
+ coords: Record<string, string>;
7215
+ } | undefined;
7216
+ store?: {
7217
+ memory: {
7218
+ backend: "pg" | "file" | "tidb";
7219
+ engine: "on" | "off";
7220
+ };
7221
+ session: "mysql" | "memory" | "auto";
7222
+ backend: "mysql" | "pg" | "local" | "memory";
7223
+ db?: {
7224
+ host: string;
7225
+ port: number;
7226
+ user: string;
7227
+ database: string;
7228
+ } | undefined;
7229
+ } | undefined;
6538
7230
  scenario?: string | undefined;
6539
7231
  maxPrincipalCostUsd?: number | undefined;
6540
7232
  };
6541
- coords: {
6542
- gitApiBaseUrl?: string | undefined;
6543
- tidbHost?: string | undefined;
6544
- tidbPort?: number | undefined;
6545
- tidbUser?: string | undefined;
6546
- };
6547
- secretRefs: {
6548
- apiKeyEnv: string;
6549
- serviceAuthTokenEnv?: string | undefined;
6550
- gitTokenEnv?: string | undefined;
6551
- tidbPasswordEnv?: string | undefined;
6552
- };
6553
7233
  notes?: string | undefined;
6554
7234
  routePrefix?: string | undefined;
6555
7235
  replicas?: number | undefined;
@@ -6560,12 +7240,12 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6560
7240
  } | undefined;
6561
7241
  resources?: {
6562
7242
  requests?: {
6563
- cpu?: string | undefined;
6564
7243
  memory?: string | undefined;
7244
+ cpu?: string | undefined;
6565
7245
  } | undefined;
6566
7246
  limits?: {
6567
- cpu?: string | undefined;
6568
7247
  memory?: string | undefined;
7248
+ cpu?: string | undefined;
6569
7249
  } | undefined;
6570
7250
  } | undefined;
6571
7251
  fleet?: {
@@ -6596,108 +7276,47 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6596
7276
  } | undefined;
6597
7277
  roster?: string | undefined;
6598
7278
  signature?: string | undefined;
6599
- }[];
6600
- }, {
6601
- workers?: {
6602
- name: string;
6603
- runtime: {
6604
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
6605
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
6606
- db?: string | undefined;
6607
- scenario?: string | undefined;
6608
- requirePrincipal?: boolean | undefined;
6609
- rateLimitRpm?: number | undefined;
6610
- maxPrincipalCostUsd?: number | undefined;
6611
- };
7279
+ }, unknown>, "many">>;
7280
+ }, "strip", z.ZodTypeAny, {
7281
+ workers: {
7282
+ host: string;
6612
7283
  secretRefs: {
6613
7284
  apiKeyEnv: string;
6614
7285
  serviceAuthTokenEnv?: string | undefined;
6615
7286
  gitTokenEnv?: string | undefined;
6616
- tidbPasswordEnv?: string | undefined;
7287
+ dbPasswordEnv?: string | undefined;
6617
7288
  };
6618
- enabled?: boolean | undefined;
6619
- notes?: string | undefined;
6620
- host?: string | undefined;
6621
- image?: string | undefined;
6622
- routePrefix?: string | undefined;
6623
- replicas?: number | undefined;
6624
- autoscaling?: {
6625
- minReplicas: number;
6626
- maxReplicas: number;
6627
- targetCpuPercent?: number | undefined;
6628
- } | undefined;
6629
- resources?: {
6630
- requests?: {
6631
- cpu?: string | undefined;
6632
- memory?: string | undefined;
6633
- } | undefined;
6634
- limits?: {
6635
- cpu?: string | undefined;
6636
- memory?: string | undefined;
6637
- } | undefined;
6638
- } | undefined;
6639
- fleet?: {
6640
- dispatch?: {
6641
- strategy?: "round-robin" | "least-inflight" | "consistent-hash" | undefined;
6642
- sessionAffinity?: boolean | undefined;
6643
- maxInflight?: number | undefined;
6644
- perActorMaxInflight?: number | undefined;
6645
- maxCostUsd?: number | undefined;
6646
- } | undefined;
6647
- drainGraceMs?: number | undefined;
6648
- } | undefined;
6649
- coords?: {
7289
+ coords: {
6650
7290
  gitApiBaseUrl?: string | undefined;
6651
- tidbHost?: string | undefined;
6652
- tidbPort?: number | undefined;
6653
- tidbUser?: string | undefined;
6654
- } | undefined;
6655
- env?: Record<string, string> | undefined;
6656
- secretEnv?: Record<string, string> | undefined;
6657
- recreateNonce?: string | undefined;
6658
- lifecycle?: {
6659
- kind?: "persistent" | "ephemeral" | undefined;
6660
- ttl?: string | undefined;
6661
- idleTimeout?: string | undefined;
6662
- owner?: string | undefined;
6663
- purpose?: string | undefined;
6664
- dependsOn?: string[] | undefined;
6665
- } | undefined;
6666
- placement?: {
6667
- auto?: boolean | undefined;
6668
- requires?: string[] | undefined;
6669
- spread?: string | undefined;
6670
- } | undefined;
6671
- roster?: string | undefined;
6672
- signature?: string | undefined;
6673
- }[] | undefined;
6674
- }>, {
6675
- workers: {
7291
+ };
6676
7292
  name: string;
6677
7293
  enabled: boolean;
6678
- host: string;
6679
7294
  image: string;
6680
7295
  runtime: {
6681
- sessionBackend: "memory" | "tidb" | "auto";
6682
- memoryBackend: "memory" | "tidb" | "off";
6683
7296
  requirePrincipal: boolean;
6684
7297
  rateLimitRpm: number;
6685
- db?: string | undefined;
7298
+ execution?: {
7299
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
7300
+ secretRefs: Record<string, string>;
7301
+ coords: Record<string, string>;
7302
+ } | undefined;
7303
+ store?: {
7304
+ memory: {
7305
+ backend: "pg" | "file" | "tidb";
7306
+ engine: "on" | "off";
7307
+ };
7308
+ session: "mysql" | "memory" | "auto";
7309
+ backend: "mysql" | "pg" | "local" | "memory";
7310
+ db?: {
7311
+ host: string;
7312
+ port: number;
7313
+ user: string;
7314
+ database: string;
7315
+ } | undefined;
7316
+ } | undefined;
6686
7317
  scenario?: string | undefined;
6687
7318
  maxPrincipalCostUsd?: number | undefined;
6688
7319
  };
6689
- coords: {
6690
- gitApiBaseUrl?: string | undefined;
6691
- tidbHost?: string | undefined;
6692
- tidbPort?: number | undefined;
6693
- tidbUser?: string | undefined;
6694
- };
6695
- secretRefs: {
6696
- apiKeyEnv: string;
6697
- serviceAuthTokenEnv?: string | undefined;
6698
- gitTokenEnv?: string | undefined;
6699
- tidbPasswordEnv?: string | undefined;
6700
- };
6701
7320
  notes?: string | undefined;
6702
7321
  routePrefix?: string | undefined;
6703
7322
  replicas?: number | undefined;
@@ -6708,12 +7327,12 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6708
7327
  } | undefined;
6709
7328
  resources?: {
6710
7329
  requests?: {
6711
- cpu?: string | undefined;
6712
7330
  memory?: string | undefined;
7331
+ cpu?: string | undefined;
6713
7332
  } | undefined;
6714
7333
  limits?: {
6715
- cpu?: string | undefined;
6716
7334
  memory?: string | undefined;
7335
+ cpu?: string | undefined;
6717
7336
  } | undefined;
6718
7337
  } | undefined;
6719
7338
  fleet?: {
@@ -6746,27 +7365,48 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6746
7365
  signature?: string | undefined;
6747
7366
  }[];
6748
7367
  }, {
6749
- workers?: {
6750
- name: string;
6751
- runtime: {
6752
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
6753
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
6754
- db?: string | undefined;
6755
- scenario?: string | undefined;
6756
- requirePrincipal?: boolean | undefined;
6757
- rateLimitRpm?: number | undefined;
6758
- maxPrincipalCostUsd?: number | undefined;
6759
- };
7368
+ workers?: unknown[] | undefined;
7369
+ }>, {
7370
+ workers: {
7371
+ host: string;
6760
7372
  secretRefs: {
6761
7373
  apiKeyEnv: string;
6762
7374
  serviceAuthTokenEnv?: string | undefined;
6763
7375
  gitTokenEnv?: string | undefined;
6764
- tidbPasswordEnv?: string | undefined;
7376
+ dbPasswordEnv?: string | undefined;
7377
+ };
7378
+ coords: {
7379
+ gitApiBaseUrl?: string | undefined;
7380
+ };
7381
+ name: string;
7382
+ enabled: boolean;
7383
+ image: string;
7384
+ runtime: {
7385
+ requirePrincipal: boolean;
7386
+ rateLimitRpm: number;
7387
+ execution?: {
7388
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
7389
+ secretRefs: Record<string, string>;
7390
+ coords: Record<string, string>;
7391
+ } | undefined;
7392
+ store?: {
7393
+ memory: {
7394
+ backend: "pg" | "file" | "tidb";
7395
+ engine: "on" | "off";
7396
+ };
7397
+ session: "mysql" | "memory" | "auto";
7398
+ backend: "mysql" | "pg" | "local" | "memory";
7399
+ db?: {
7400
+ host: string;
7401
+ port: number;
7402
+ user: string;
7403
+ database: string;
7404
+ } | undefined;
7405
+ } | undefined;
7406
+ scenario?: string | undefined;
7407
+ maxPrincipalCostUsd?: number | undefined;
6765
7408
  };
6766
- enabled?: boolean | undefined;
6767
7409
  notes?: string | undefined;
6768
- host?: string | undefined;
6769
- image?: string | undefined;
6770
7410
  routePrefix?: string | undefined;
6771
7411
  replicas?: number | undefined;
6772
7412
  autoscaling?: {
@@ -6776,35 +7416,29 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6776
7416
  } | undefined;
6777
7417
  resources?: {
6778
7418
  requests?: {
6779
- cpu?: string | undefined;
6780
7419
  memory?: string | undefined;
7420
+ cpu?: string | undefined;
6781
7421
  } | undefined;
6782
7422
  limits?: {
6783
- cpu?: string | undefined;
6784
7423
  memory?: string | undefined;
7424
+ cpu?: string | undefined;
6785
7425
  } | undefined;
6786
7426
  } | undefined;
6787
7427
  fleet?: {
6788
7428
  dispatch?: {
6789
- strategy?: "round-robin" | "least-inflight" | "consistent-hash" | undefined;
6790
- sessionAffinity?: boolean | undefined;
7429
+ strategy: "round-robin" | "least-inflight" | "consistent-hash";
7430
+ sessionAffinity: boolean;
6791
7431
  maxInflight?: number | undefined;
6792
7432
  perActorMaxInflight?: number | undefined;
6793
7433
  maxCostUsd?: number | undefined;
6794
7434
  } | undefined;
6795
7435
  drainGraceMs?: number | undefined;
6796
7436
  } | undefined;
6797
- coords?: {
6798
- gitApiBaseUrl?: string | undefined;
6799
- tidbHost?: string | undefined;
6800
- tidbPort?: number | undefined;
6801
- tidbUser?: string | undefined;
6802
- } | undefined;
6803
7437
  env?: Record<string, string> | undefined;
6804
7438
  secretEnv?: Record<string, string> | undefined;
6805
7439
  recreateNonce?: string | undefined;
6806
7440
  lifecycle?: {
6807
- kind?: "persistent" | "ephemeral" | undefined;
7441
+ kind: "persistent" | "ephemeral";
6808
7442
  ttl?: string | undefined;
6809
7443
  idleTimeout?: string | undefined;
6810
7444
  owner?: string | undefined;
@@ -6812,13 +7446,15 @@ export declare const WorkersConfig: z.ZodEffects<z.ZodObject<{
6812
7446
  dependsOn?: string[] | undefined;
6813
7447
  } | undefined;
6814
7448
  placement?: {
6815
- auto?: boolean | undefined;
6816
- requires?: string[] | undefined;
7449
+ auto: boolean;
7450
+ requires: string[];
6817
7451
  spread?: string | undefined;
6818
7452
  } | undefined;
6819
7453
  roster?: string | undefined;
6820
7454
  signature?: string | undefined;
6821
- }[] | undefined;
7455
+ }[];
7456
+ }, {
7457
+ workers?: unknown[] | undefined;
6822
7458
  }>;
6823
7459
  export type WorkersConfig = z.infer<typeof WorkersConfig>;
6824
7460
  export declare const WorkerCondition: z.ZodObject<{
@@ -6871,8 +7507,8 @@ export declare const WorkerStatus: z.ZodObject<{
6871
7507
  message: z.ZodOptional<z.ZodString>;
6872
7508
  updatedAt: z.ZodString;
6873
7509
  }, "strip", z.ZodTypeAny, {
6874
- name: string;
6875
7510
  host: string;
7511
+ name: string;
6876
7512
  phase: "Unknown" | "Pending" | "Running" | "Failed";
6877
7513
  updatedAt: string;
6878
7514
  conditions: {
@@ -6886,8 +7522,8 @@ export declare const WorkerStatus: z.ZodObject<{
6886
7522
  message?: string | undefined;
6887
7523
  observedSpecHash?: string | undefined;
6888
7524
  }, {
6889
- name: string;
6890
7525
  host: string;
7526
+ name: string;
6891
7527
  phase: "Unknown" | "Pending" | "Running" | "Failed";
6892
7528
  updatedAt: string;
6893
7529
  observedVersion: number;
@@ -7126,7 +7762,7 @@ export declare const HostStatus: z.ZodObject<{
7126
7762
  ts: z.ZodString;
7127
7763
  }, "strip", z.ZodTypeAny, {
7128
7764
  host: string;
7129
- backend: "docker" | "k8s";
7765
+ backend: "k8s" | "docker";
7130
7766
  probes: {
7131
7767
  cpuCores: number;
7132
7768
  memBytes: number;
@@ -7142,7 +7778,7 @@ export declare const HostStatus: z.ZodObject<{
7142
7778
  ts: string;
7143
7779
  }, {
7144
7780
  host: string;
7145
- backend: "docker" | "k8s";
7781
+ backend: "k8s" | "docker";
7146
7782
  probes: {
7147
7783
  cpuCores: number;
7148
7784
  memBytes: number;
@@ -11114,7 +11750,7 @@ export declare const DOMAIN_SCHEMAS: {
11114
11750
  }[] | undefined;
11115
11751
  }>;
11116
11752
  readonly workers: z.ZodEffects<z.ZodObject<{
11117
- workers: z.ZodDefault<z.ZodArray<z.ZodObject<{
11753
+ workers: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
11118
11754
  /** 唯一 → 容器名 / compose project. */
11119
11755
  name: z.ZodString;
11120
11756
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -11171,39 +11807,39 @@ export declare const DOMAIN_SCHEMAS: {
11171
11807
  cpu: z.ZodOptional<z.ZodString>;
11172
11808
  memory: z.ZodOptional<z.ZodString>;
11173
11809
  }, "strip", z.ZodTypeAny, {
11174
- cpu?: string | undefined;
11175
11810
  memory?: string | undefined;
11176
- }, {
11177
11811
  cpu?: string | undefined;
11812
+ }, {
11178
11813
  memory?: string | undefined;
11814
+ cpu?: string | undefined;
11179
11815
  }>>;
11180
11816
  limits: z.ZodOptional<z.ZodObject<{
11181
11817
  cpu: z.ZodOptional<z.ZodString>;
11182
11818
  memory: z.ZodOptional<z.ZodString>;
11183
11819
  }, "strip", z.ZodTypeAny, {
11184
- cpu?: string | undefined;
11185
11820
  memory?: string | undefined;
11186
- }, {
11187
11821
  cpu?: string | undefined;
11822
+ }, {
11188
11823
  memory?: string | undefined;
11824
+ cpu?: string | undefined;
11189
11825
  }>>;
11190
11826
  }, "strip", z.ZodTypeAny, {
11191
11827
  requests?: {
11192
- cpu?: string | undefined;
11193
11828
  memory?: string | undefined;
11829
+ cpu?: string | undefined;
11194
11830
  } | undefined;
11195
11831
  limits?: {
11196
- cpu?: string | undefined;
11197
11832
  memory?: string | undefined;
11833
+ cpu?: string | undefined;
11198
11834
  } | undefined;
11199
11835
  }, {
11200
11836
  requests?: {
11201
- cpu?: string | undefined;
11202
11837
  memory?: string | undefined;
11838
+ cpu?: string | undefined;
11203
11839
  } | undefined;
11204
11840
  limits?: {
11205
- cpu?: string | undefined;
11206
11841
  memory?: string | undefined;
11842
+ cpu?: string | undefined;
11207
11843
  } | undefined;
11208
11844
  }>>;
11209
11845
  /** Scheduling-framework knobs (CONTROL-PLANE-SCHEDULING-DESIGN, 产品拍板 D1/D3 2026-07-04). Optional and
@@ -11252,11 +11888,88 @@ export declare const DOMAIN_SCHEMAS: {
11252
11888
  } | undefined;
11253
11889
  drainGraceMs?: number | undefined;
11254
11890
  }>>;
11255
- /** 运行时 (非 secret). 映射到 service SESSION_BACKEND/REQUIRE_PRINCIPAL/RATE_LIMIT_RPM/… */
11891
+ /** 运行时 (非 secret). 映射到 service REQUIRE_PRINCIPAL / RATE_LIMIT_RPM / … 与两个结构块(7.0.0)。 */
11256
11892
  runtime: z.ZodObject<{
11257
- sessionBackend: z.ZodDefault<z.ZodEnum<["tidb", "memory", "auto"]>>;
11258
- memoryBackend: z.ZodDefault<z.ZodEnum<["off", "memory", "tidb"]>>;
11259
- db: z.ZodOptional<z.ZodString>;
11893
+ /** 7.0.0 执行车道块(见 `ExecutionBlock`)。enabled 的 worker 必填(WorkerSpec 层判);停用的可缺。 */
11894
+ execution: z.ZodOptional<z.ZodEffects<z.ZodObject<{
11895
+ lane: z.ZodEnum<["host", "e2b", "k8s", "ssh", "adb", "local-docker", "device"]>;
11896
+ coords: z.ZodDefault<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>>;
11897
+ secretRefs: z.ZodDefault<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>>;
11898
+ }, "strip", z.ZodTypeAny, {
11899
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
11900
+ secretRefs: Record<string, string>;
11901
+ coords: Record<string, string>;
11902
+ }, {
11903
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
11904
+ secretRefs?: Record<string, string> | undefined;
11905
+ coords?: Record<string, string> | undefined;
11906
+ }>, {
11907
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
11908
+ secretRefs: Record<string, string>;
11909
+ coords: Record<string, string>;
11910
+ }, {
11911
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
11912
+ secretRefs?: Record<string, string> | undefined;
11913
+ coords?: Record<string, string> | undefined;
11914
+ }>>;
11915
+ /** 7.0.0 存储块(见 `StoreBlock`)。enabled 的 worker 必填(WorkerSpec 层判);停用的可缺。 */
11916
+ store: z.ZodOptional<z.ZodObject<{
11917
+ backend: z.ZodEnum<["mysql", "pg", "local", "memory"]>;
11918
+ session: z.ZodDefault<z.ZodEnum<["memory", "mysql", "auto"]>>;
11919
+ memory: z.ZodDefault<z.ZodObject<{
11920
+ engine: z.ZodDefault<z.ZodEnum<["on", "off"]>>;
11921
+ backend: z.ZodDefault<z.ZodEnum<["file", "pg", "tidb"]>>;
11922
+ }, "strip", z.ZodTypeAny, {
11923
+ backend: "pg" | "file" | "tidb";
11924
+ engine: "on" | "off";
11925
+ }, {
11926
+ backend?: "pg" | "file" | "tidb" | undefined;
11927
+ engine?: "on" | "off" | undefined;
11928
+ }>>;
11929
+ /** SQL 服务器坐标(中立,一份;名族由 `backend` 决定)。 */
11930
+ db: z.ZodOptional<z.ZodObject<{
11931
+ host: z.ZodEffects<z.ZodString, string, string>;
11932
+ port: z.ZodNumber;
11933
+ user: z.ZodEffects<z.ZodString, string, string>;
11934
+ database: z.ZodEffects<z.ZodString, string, string>;
11935
+ }, "strip", z.ZodTypeAny, {
11936
+ host: string;
11937
+ port: number;
11938
+ user: string;
11939
+ database: string;
11940
+ }, {
11941
+ host: string;
11942
+ port: number;
11943
+ user: string;
11944
+ database: string;
11945
+ }>>;
11946
+ }, "strip", z.ZodTypeAny, {
11947
+ memory: {
11948
+ backend: "pg" | "file" | "tidb";
11949
+ engine: "on" | "off";
11950
+ };
11951
+ session: "mysql" | "memory" | "auto";
11952
+ backend: "mysql" | "pg" | "local" | "memory";
11953
+ db?: {
11954
+ host: string;
11955
+ port: number;
11956
+ user: string;
11957
+ database: string;
11958
+ } | undefined;
11959
+ }, {
11960
+ backend: "mysql" | "pg" | "local" | "memory";
11961
+ memory?: {
11962
+ backend?: "pg" | "file" | "tidb" | undefined;
11963
+ engine?: "on" | "off" | undefined;
11964
+ } | undefined;
11965
+ session?: "mysql" | "memory" | "auto" | undefined;
11966
+ db?: {
11967
+ host: string;
11968
+ port: number;
11969
+ user: string;
11970
+ database: string;
11971
+ } | undefined;
11972
+ }>>;
11260
11973
  scenario: z.ZodOptional<z.ZodString>;
11261
11974
  requirePrincipal: z.ZodDefault<z.ZodBoolean>;
11262
11975
  rateLimitRpm: z.ZodDefault<z.ZodNumber>;
@@ -11267,38 +11980,61 @@ export declare const DOMAIN_SCHEMAS: {
11267
11980
  * default → absent never materialises → no spec-hash churn. Hash-included (read at boot → cap change recreates). */
11268
11981
  maxPrincipalCostUsd: z.ZodOptional<z.ZodNumber>;
11269
11982
  }, "strip", z.ZodTypeAny, {
11270
- sessionBackend: "memory" | "tidb" | "auto";
11271
- memoryBackend: "memory" | "tidb" | "off";
11272
11983
  requirePrincipal: boolean;
11273
11984
  rateLimitRpm: number;
11274
- db?: string | undefined;
11985
+ execution?: {
11986
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
11987
+ secretRefs: Record<string, string>;
11988
+ coords: Record<string, string>;
11989
+ } | undefined;
11990
+ store?: {
11991
+ memory: {
11992
+ backend: "pg" | "file" | "tidb";
11993
+ engine: "on" | "off";
11994
+ };
11995
+ session: "mysql" | "memory" | "auto";
11996
+ backend: "mysql" | "pg" | "local" | "memory";
11997
+ db?: {
11998
+ host: string;
11999
+ port: number;
12000
+ user: string;
12001
+ database: string;
12002
+ } | undefined;
12003
+ } | undefined;
11275
12004
  scenario?: string | undefined;
11276
12005
  maxPrincipalCostUsd?: number | undefined;
11277
12006
  }, {
11278
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
11279
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
11280
- db?: string | undefined;
12007
+ execution?: {
12008
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12009
+ secretRefs?: Record<string, string> | undefined;
12010
+ coords?: Record<string, string> | undefined;
12011
+ } | undefined;
12012
+ store?: {
12013
+ backend: "mysql" | "pg" | "local" | "memory";
12014
+ memory?: {
12015
+ backend?: "pg" | "file" | "tidb" | undefined;
12016
+ engine?: "on" | "off" | undefined;
12017
+ } | undefined;
12018
+ session?: "mysql" | "memory" | "auto" | undefined;
12019
+ db?: {
12020
+ host: string;
12021
+ port: number;
12022
+ user: string;
12023
+ database: string;
12024
+ } | undefined;
12025
+ } | undefined;
11281
12026
  scenario?: string | undefined;
11282
12027
  requirePrincipal?: boolean | undefined;
11283
12028
  rateLimitRpm?: number | undefined;
11284
12029
  maxPrincipalCostUsd?: number | undefined;
11285
12030
  }>;
11286
- /** 物理坐标 (非 secret). 映射到 GIT_API_BASEURL / TIDB_HOST 等. */
12031
+ /** 物理坐标 (非 secret). 映射到 GIT_API_BASEURL。7.0.0 起 SQL 坐标在 `runtime.store.db`(`tidb*` 三键删除)。 */
11287
12032
  coords: z.ZodDefault<z.ZodObject<{
11288
12033
  gitApiBaseUrl: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>, z.ZodLiteral<"">]>;
11289
- tidbHost: z.ZodOptional<z.ZodString>;
11290
- tidbPort: z.ZodOptional<z.ZodNumber>;
11291
- tidbUser: z.ZodOptional<z.ZodString>;
11292
12034
  }, "strip", z.ZodTypeAny, {
11293
12035
  gitApiBaseUrl?: string | undefined;
11294
- tidbHost?: string | undefined;
11295
- tidbPort?: number | undefined;
11296
- tidbUser?: string | undefined;
11297
12036
  }, {
11298
12037
  gitApiBaseUrl?: string | undefined;
11299
- tidbHost?: string | undefined;
11300
- tidbPort?: number | undefined;
11301
- tidbUser?: string | undefined;
11302
12038
  }>>;
11303
12039
  secretRefs: z.ZodObject<{
11304
12040
  /** NAME of the host env var holding the model API key → service MODEL_API_KEY (或 anthropic 时 ANTHROPIC_API_KEY). */
@@ -11307,18 +12043,19 @@ export declare const DOMAIN_SCHEMAS: {
11307
12043
  serviceAuthTokenEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
11308
12044
  /** → GIT_API_TOKEN (只读,读被评审 repo). */
11309
12045
  gitTokenEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
11310
- /** → TIDB_PASSWORD. */
11311
- tidbPasswordEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
12046
+ /** 7.0.0:SQL 店的口令 → `MYSQL_PASSWORD` / `PG_PASSWORD`(渲染器按 `runtime.store.backend` 选名族)。
12047
+ * 在场 ⇔ `runtime.store.backend` ∈ {mysql, pg}(WorkerSpec 层判,与 `runtime.store.db` 同一条规则)。取代 6.x 的 `tidbPasswordEnv`。 */
12048
+ dbPasswordEnv: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
11312
12049
  }, "strip", z.ZodTypeAny, {
11313
12050
  apiKeyEnv: string;
11314
12051
  serviceAuthTokenEnv?: string | undefined;
11315
12052
  gitTokenEnv?: string | undefined;
11316
- tidbPasswordEnv?: string | undefined;
12053
+ dbPasswordEnv?: string | undefined;
11317
12054
  }, {
11318
12055
  apiKeyEnv: string;
11319
12056
  serviceAuthTokenEnv?: string | undefined;
11320
12057
  gitTokenEnv?: string | undefined;
11321
- tidbPasswordEnv?: string | undefined;
12058
+ dbPasswordEnv?: string | undefined;
11322
12059
  }>;
11323
12060
  /**
11324
12061
  * 通用 env 透传(逃生口)——给**没有专属结构化字段**的 service env 用,让任意 worker 声明自己的 app 专属变量
@@ -11399,31 +12136,44 @@ export declare const DOMAIN_SCHEMAS: {
11399
12136
  signature: z.ZodOptional<z.ZodString>;
11400
12137
  notes: z.ZodOptional<z.ZodString>;
11401
12138
  }, "strip", z.ZodTypeAny, {
12139
+ host: string;
12140
+ secretRefs: {
12141
+ apiKeyEnv: string;
12142
+ serviceAuthTokenEnv?: string | undefined;
12143
+ gitTokenEnv?: string | undefined;
12144
+ dbPasswordEnv?: string | undefined;
12145
+ };
12146
+ coords: {
12147
+ gitApiBaseUrl?: string | undefined;
12148
+ };
11402
12149
  name: string;
11403
12150
  enabled: boolean;
11404
- host: string;
11405
12151
  image: string;
11406
12152
  runtime: {
11407
- sessionBackend: "memory" | "tidb" | "auto";
11408
- memoryBackend: "memory" | "tidb" | "off";
11409
12153
  requirePrincipal: boolean;
11410
12154
  rateLimitRpm: number;
11411
- db?: string | undefined;
12155
+ execution?: {
12156
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12157
+ secretRefs: Record<string, string>;
12158
+ coords: Record<string, string>;
12159
+ } | undefined;
12160
+ store?: {
12161
+ memory: {
12162
+ backend: "pg" | "file" | "tidb";
12163
+ engine: "on" | "off";
12164
+ };
12165
+ session: "mysql" | "memory" | "auto";
12166
+ backend: "mysql" | "pg" | "local" | "memory";
12167
+ db?: {
12168
+ host: string;
12169
+ port: number;
12170
+ user: string;
12171
+ database: string;
12172
+ } | undefined;
12173
+ } | undefined;
11412
12174
  scenario?: string | undefined;
11413
12175
  maxPrincipalCostUsd?: number | undefined;
11414
12176
  };
11415
- coords: {
11416
- gitApiBaseUrl?: string | undefined;
11417
- tidbHost?: string | undefined;
11418
- tidbPort?: number | undefined;
11419
- tidbUser?: string | undefined;
11420
- };
11421
- secretRefs: {
11422
- apiKeyEnv: string;
11423
- serviceAuthTokenEnv?: string | undefined;
11424
- gitTokenEnv?: string | undefined;
11425
- tidbPasswordEnv?: string | undefined;
11426
- };
11427
12177
  notes?: string | undefined;
11428
12178
  routePrefix?: string | undefined;
11429
12179
  replicas?: number | undefined;
@@ -11434,12 +12184,12 @@ export declare const DOMAIN_SCHEMAS: {
11434
12184
  } | undefined;
11435
12185
  resources?: {
11436
12186
  requests?: {
11437
- cpu?: string | undefined;
11438
12187
  memory?: string | undefined;
12188
+ cpu?: string | undefined;
11439
12189
  } | undefined;
11440
12190
  limits?: {
11441
- cpu?: string | undefined;
11442
12191
  memory?: string | undefined;
12192
+ cpu?: string | undefined;
11443
12193
  } | undefined;
11444
12194
  } | undefined;
11445
12195
  fleet?: {
@@ -11471,25 +12221,44 @@ export declare const DOMAIN_SCHEMAS: {
11471
12221
  roster?: string | undefined;
11472
12222
  signature?: string | undefined;
11473
12223
  }, {
12224
+ secretRefs: {
12225
+ apiKeyEnv: string;
12226
+ serviceAuthTokenEnv?: string | undefined;
12227
+ gitTokenEnv?: string | undefined;
12228
+ dbPasswordEnv?: string | undefined;
12229
+ };
11474
12230
  name: string;
11475
12231
  runtime: {
11476
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
11477
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
11478
- db?: string | undefined;
12232
+ execution?: {
12233
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12234
+ secretRefs?: Record<string, string> | undefined;
12235
+ coords?: Record<string, string> | undefined;
12236
+ } | undefined;
12237
+ store?: {
12238
+ backend: "mysql" | "pg" | "local" | "memory";
12239
+ memory?: {
12240
+ backend?: "pg" | "file" | "tidb" | undefined;
12241
+ engine?: "on" | "off" | undefined;
12242
+ } | undefined;
12243
+ session?: "mysql" | "memory" | "auto" | undefined;
12244
+ db?: {
12245
+ host: string;
12246
+ port: number;
12247
+ user: string;
12248
+ database: string;
12249
+ } | undefined;
12250
+ } | undefined;
11479
12251
  scenario?: string | undefined;
11480
12252
  requirePrincipal?: boolean | undefined;
11481
12253
  rateLimitRpm?: number | undefined;
11482
12254
  maxPrincipalCostUsd?: number | undefined;
11483
12255
  };
11484
- secretRefs: {
11485
- apiKeyEnv: string;
11486
- serviceAuthTokenEnv?: string | undefined;
11487
- gitTokenEnv?: string | undefined;
11488
- tidbPasswordEnv?: string | undefined;
11489
- };
12256
+ host?: string | undefined;
12257
+ coords?: {
12258
+ gitApiBaseUrl?: string | undefined;
12259
+ } | undefined;
11490
12260
  enabled?: boolean | undefined;
11491
12261
  notes?: string | undefined;
11492
- host?: string | undefined;
11493
12262
  image?: string | undefined;
11494
12263
  routePrefix?: string | undefined;
11495
12264
  replicas?: number | undefined;
@@ -11500,12 +12269,12 @@ export declare const DOMAIN_SCHEMAS: {
11500
12269
  } | undefined;
11501
12270
  resources?: {
11502
12271
  requests?: {
11503
- cpu?: string | undefined;
11504
12272
  memory?: string | undefined;
12273
+ cpu?: string | undefined;
11505
12274
  } | undefined;
11506
12275
  limits?: {
11507
- cpu?: string | undefined;
11508
12276
  memory?: string | undefined;
12277
+ cpu?: string | undefined;
11509
12278
  } | undefined;
11510
12279
  } | undefined;
11511
12280
  fleet?: {
@@ -11518,12 +12287,6 @@ export declare const DOMAIN_SCHEMAS: {
11518
12287
  } | undefined;
11519
12288
  drainGraceMs?: number | undefined;
11520
12289
  } | undefined;
11521
- coords?: {
11522
- gitApiBaseUrl?: string | undefined;
11523
- tidbHost?: string | undefined;
11524
- tidbPort?: number | undefined;
11525
- tidbUser?: string | undefined;
11526
- } | undefined;
11527
12290
  env?: Record<string, string> | undefined;
11528
12291
  secretEnv?: Record<string, string> | undefined;
11529
12292
  recreateNonce?: string | undefined;
@@ -11542,34 +12305,45 @@ export declare const DOMAIN_SCHEMAS: {
11542
12305
  } | undefined;
11543
12306
  roster?: string | undefined;
11544
12307
  signature?: string | undefined;
11545
- }>, "many">>;
11546
- }, "strip", z.ZodTypeAny, {
11547
- workers: {
12308
+ }>, {
12309
+ host: string;
12310
+ secretRefs: {
12311
+ apiKeyEnv: string;
12312
+ serviceAuthTokenEnv?: string | undefined;
12313
+ gitTokenEnv?: string | undefined;
12314
+ dbPasswordEnv?: string | undefined;
12315
+ };
12316
+ coords: {
12317
+ gitApiBaseUrl?: string | undefined;
12318
+ };
11548
12319
  name: string;
11549
12320
  enabled: boolean;
11550
- host: string;
11551
12321
  image: string;
11552
12322
  runtime: {
11553
- sessionBackend: "memory" | "tidb" | "auto";
11554
- memoryBackend: "memory" | "tidb" | "off";
11555
12323
  requirePrincipal: boolean;
11556
12324
  rateLimitRpm: number;
11557
- db?: string | undefined;
12325
+ execution?: {
12326
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12327
+ secretRefs: Record<string, string>;
12328
+ coords: Record<string, string>;
12329
+ } | undefined;
12330
+ store?: {
12331
+ memory: {
12332
+ backend: "pg" | "file" | "tidb";
12333
+ engine: "on" | "off";
12334
+ };
12335
+ session: "mysql" | "memory" | "auto";
12336
+ backend: "mysql" | "pg" | "local" | "memory";
12337
+ db?: {
12338
+ host: string;
12339
+ port: number;
12340
+ user: string;
12341
+ database: string;
12342
+ } | undefined;
12343
+ } | undefined;
11558
12344
  scenario?: string | undefined;
11559
12345
  maxPrincipalCostUsd?: number | undefined;
11560
12346
  };
11561
- coords: {
11562
- gitApiBaseUrl?: string | undefined;
11563
- tidbHost?: string | undefined;
11564
- tidbPort?: number | undefined;
11565
- tidbUser?: string | undefined;
11566
- };
11567
- secretRefs: {
11568
- apiKeyEnv: string;
11569
- serviceAuthTokenEnv?: string | undefined;
11570
- gitTokenEnv?: string | undefined;
11571
- tidbPasswordEnv?: string | undefined;
11572
- };
11573
12347
  notes?: string | undefined;
11574
12348
  routePrefix?: string | undefined;
11575
12349
  replicas?: number | undefined;
@@ -11580,12 +12354,12 @@ export declare const DOMAIN_SCHEMAS: {
11580
12354
  } | undefined;
11581
12355
  resources?: {
11582
12356
  requests?: {
11583
- cpu?: string | undefined;
11584
12357
  memory?: string | undefined;
12358
+ cpu?: string | undefined;
11585
12359
  } | undefined;
11586
12360
  limits?: {
11587
- cpu?: string | undefined;
11588
12361
  memory?: string | undefined;
12362
+ cpu?: string | undefined;
11589
12363
  } | undefined;
11590
12364
  } | undefined;
11591
12365
  fleet?: {
@@ -11616,28 +12390,45 @@ export declare const DOMAIN_SCHEMAS: {
11616
12390
  } | undefined;
11617
12391
  roster?: string | undefined;
11618
12392
  signature?: string | undefined;
11619
- }[];
11620
- }, {
11621
- workers?: {
12393
+ }, {
12394
+ secretRefs: {
12395
+ apiKeyEnv: string;
12396
+ serviceAuthTokenEnv?: string | undefined;
12397
+ gitTokenEnv?: string | undefined;
12398
+ dbPasswordEnv?: string | undefined;
12399
+ };
11622
12400
  name: string;
11623
12401
  runtime: {
11624
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
11625
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
11626
- db?: string | undefined;
12402
+ execution?: {
12403
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12404
+ secretRefs?: Record<string, string> | undefined;
12405
+ coords?: Record<string, string> | undefined;
12406
+ } | undefined;
12407
+ store?: {
12408
+ backend: "mysql" | "pg" | "local" | "memory";
12409
+ memory?: {
12410
+ backend?: "pg" | "file" | "tidb" | undefined;
12411
+ engine?: "on" | "off" | undefined;
12412
+ } | undefined;
12413
+ session?: "mysql" | "memory" | "auto" | undefined;
12414
+ db?: {
12415
+ host: string;
12416
+ port: number;
12417
+ user: string;
12418
+ database: string;
12419
+ } | undefined;
12420
+ } | undefined;
11627
12421
  scenario?: string | undefined;
11628
12422
  requirePrincipal?: boolean | undefined;
11629
12423
  rateLimitRpm?: number | undefined;
11630
12424
  maxPrincipalCostUsd?: number | undefined;
11631
12425
  };
11632
- secretRefs: {
11633
- apiKeyEnv: string;
11634
- serviceAuthTokenEnv?: string | undefined;
11635
- gitTokenEnv?: string | undefined;
11636
- tidbPasswordEnv?: string | undefined;
11637
- };
12426
+ host?: string | undefined;
12427
+ coords?: {
12428
+ gitApiBaseUrl?: string | undefined;
12429
+ } | undefined;
11638
12430
  enabled?: boolean | undefined;
11639
12431
  notes?: string | undefined;
11640
- host?: string | undefined;
11641
12432
  image?: string | undefined;
11642
12433
  routePrefix?: string | undefined;
11643
12434
  replicas?: number | undefined;
@@ -11648,12 +12439,12 @@ export declare const DOMAIN_SCHEMAS: {
11648
12439
  } | undefined;
11649
12440
  resources?: {
11650
12441
  requests?: {
11651
- cpu?: string | undefined;
11652
12442
  memory?: string | undefined;
12443
+ cpu?: string | undefined;
11653
12444
  } | undefined;
11654
12445
  limits?: {
11655
- cpu?: string | undefined;
11656
12446
  memory?: string | undefined;
12447
+ cpu?: string | undefined;
11657
12448
  } | undefined;
11658
12449
  } | undefined;
11659
12450
  fleet?: {
@@ -11666,12 +12457,6 @@ export declare const DOMAIN_SCHEMAS: {
11666
12457
  } | undefined;
11667
12458
  drainGraceMs?: number | undefined;
11668
12459
  } | undefined;
11669
- coords?: {
11670
- gitApiBaseUrl?: string | undefined;
11671
- tidbHost?: string | undefined;
11672
- tidbPort?: number | undefined;
11673
- tidbUser?: string | undefined;
11674
- } | undefined;
11675
12460
  env?: Record<string, string> | undefined;
11676
12461
  secretEnv?: Record<string, string> | undefined;
11677
12462
  recreateNonce?: string | undefined;
@@ -11690,33 +12475,131 @@ export declare const DOMAIN_SCHEMAS: {
11690
12475
  } | undefined;
11691
12476
  roster?: string | undefined;
11692
12477
  signature?: string | undefined;
11693
- }[] | undefined;
11694
- }>, {
11695
- workers: {
12478
+ }>, {
12479
+ host: string;
12480
+ secretRefs: {
12481
+ apiKeyEnv: string;
12482
+ serviceAuthTokenEnv?: string | undefined;
12483
+ gitTokenEnv?: string | undefined;
12484
+ dbPasswordEnv?: string | undefined;
12485
+ };
12486
+ coords: {
12487
+ gitApiBaseUrl?: string | undefined;
12488
+ };
11696
12489
  name: string;
11697
12490
  enabled: boolean;
11698
- host: string;
11699
12491
  image: string;
11700
12492
  runtime: {
11701
- sessionBackend: "memory" | "tidb" | "auto";
11702
- memoryBackend: "memory" | "tidb" | "off";
11703
12493
  requirePrincipal: boolean;
11704
12494
  rateLimitRpm: number;
11705
- db?: string | undefined;
12495
+ execution?: {
12496
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12497
+ secretRefs: Record<string, string>;
12498
+ coords: Record<string, string>;
12499
+ } | undefined;
12500
+ store?: {
12501
+ memory: {
12502
+ backend: "pg" | "file" | "tidb";
12503
+ engine: "on" | "off";
12504
+ };
12505
+ session: "mysql" | "memory" | "auto";
12506
+ backend: "mysql" | "pg" | "local" | "memory";
12507
+ db?: {
12508
+ host: string;
12509
+ port: number;
12510
+ user: string;
12511
+ database: string;
12512
+ } | undefined;
12513
+ } | undefined;
11706
12514
  scenario?: string | undefined;
11707
12515
  maxPrincipalCostUsd?: number | undefined;
11708
12516
  };
11709
- coords: {
11710
- gitApiBaseUrl?: string | undefined;
11711
- tidbHost?: string | undefined;
11712
- tidbPort?: number | undefined;
11713
- tidbUser?: string | undefined;
11714
- };
12517
+ notes?: string | undefined;
12518
+ routePrefix?: string | undefined;
12519
+ replicas?: number | undefined;
12520
+ autoscaling?: {
12521
+ minReplicas: number;
12522
+ maxReplicas: number;
12523
+ targetCpuPercent?: number | undefined;
12524
+ } | undefined;
12525
+ resources?: {
12526
+ requests?: {
12527
+ memory?: string | undefined;
12528
+ cpu?: string | undefined;
12529
+ } | undefined;
12530
+ limits?: {
12531
+ memory?: string | undefined;
12532
+ cpu?: string | undefined;
12533
+ } | undefined;
12534
+ } | undefined;
12535
+ fleet?: {
12536
+ dispatch?: {
12537
+ strategy: "round-robin" | "least-inflight" | "consistent-hash";
12538
+ sessionAffinity: boolean;
12539
+ maxInflight?: number | undefined;
12540
+ perActorMaxInflight?: number | undefined;
12541
+ maxCostUsd?: number | undefined;
12542
+ } | undefined;
12543
+ drainGraceMs?: number | undefined;
12544
+ } | undefined;
12545
+ env?: Record<string, string> | undefined;
12546
+ secretEnv?: Record<string, string> | undefined;
12547
+ recreateNonce?: string | undefined;
12548
+ lifecycle?: {
12549
+ kind: "persistent" | "ephemeral";
12550
+ ttl?: string | undefined;
12551
+ idleTimeout?: string | undefined;
12552
+ owner?: string | undefined;
12553
+ purpose?: string | undefined;
12554
+ dependsOn?: string[] | undefined;
12555
+ } | undefined;
12556
+ placement?: {
12557
+ auto: boolean;
12558
+ requires: string[];
12559
+ spread?: string | undefined;
12560
+ } | undefined;
12561
+ roster?: string | undefined;
12562
+ signature?: string | undefined;
12563
+ }, unknown>, "many">>;
12564
+ }, "strip", z.ZodTypeAny, {
12565
+ workers: {
12566
+ host: string;
11715
12567
  secretRefs: {
11716
12568
  apiKeyEnv: string;
11717
12569
  serviceAuthTokenEnv?: string | undefined;
11718
12570
  gitTokenEnv?: string | undefined;
11719
- tidbPasswordEnv?: string | undefined;
12571
+ dbPasswordEnv?: string | undefined;
12572
+ };
12573
+ coords: {
12574
+ gitApiBaseUrl?: string | undefined;
12575
+ };
12576
+ name: string;
12577
+ enabled: boolean;
12578
+ image: string;
12579
+ runtime: {
12580
+ requirePrincipal: boolean;
12581
+ rateLimitRpm: number;
12582
+ execution?: {
12583
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12584
+ secretRefs: Record<string, string>;
12585
+ coords: Record<string, string>;
12586
+ } | undefined;
12587
+ store?: {
12588
+ memory: {
12589
+ backend: "pg" | "file" | "tidb";
12590
+ engine: "on" | "off";
12591
+ };
12592
+ session: "mysql" | "memory" | "auto";
12593
+ backend: "mysql" | "pg" | "local" | "memory";
12594
+ db?: {
12595
+ host: string;
12596
+ port: number;
12597
+ user: string;
12598
+ database: string;
12599
+ } | undefined;
12600
+ } | undefined;
12601
+ scenario?: string | undefined;
12602
+ maxPrincipalCostUsd?: number | undefined;
11720
12603
  };
11721
12604
  notes?: string | undefined;
11722
12605
  routePrefix?: string | undefined;
@@ -11728,12 +12611,12 @@ export declare const DOMAIN_SCHEMAS: {
11728
12611
  } | undefined;
11729
12612
  resources?: {
11730
12613
  requests?: {
11731
- cpu?: string | undefined;
11732
12614
  memory?: string | undefined;
12615
+ cpu?: string | undefined;
11733
12616
  } | undefined;
11734
12617
  limits?: {
11735
- cpu?: string | undefined;
11736
12618
  memory?: string | undefined;
12619
+ cpu?: string | undefined;
11737
12620
  } | undefined;
11738
12621
  } | undefined;
11739
12622
  fleet?: {
@@ -11766,27 +12649,48 @@ export declare const DOMAIN_SCHEMAS: {
11766
12649
  signature?: string | undefined;
11767
12650
  }[];
11768
12651
  }, {
11769
- workers?: {
11770
- name: string;
11771
- runtime: {
11772
- sessionBackend?: "memory" | "tidb" | "auto" | undefined;
11773
- memoryBackend?: "memory" | "tidb" | "off" | undefined;
11774
- db?: string | undefined;
11775
- scenario?: string | undefined;
11776
- requirePrincipal?: boolean | undefined;
11777
- rateLimitRpm?: number | undefined;
11778
- maxPrincipalCostUsd?: number | undefined;
11779
- };
12652
+ workers?: unknown[] | undefined;
12653
+ }>, {
12654
+ workers: {
12655
+ host: string;
11780
12656
  secretRefs: {
11781
12657
  apiKeyEnv: string;
11782
12658
  serviceAuthTokenEnv?: string | undefined;
11783
12659
  gitTokenEnv?: string | undefined;
11784
- tidbPasswordEnv?: string | undefined;
12660
+ dbPasswordEnv?: string | undefined;
12661
+ };
12662
+ coords: {
12663
+ gitApiBaseUrl?: string | undefined;
12664
+ };
12665
+ name: string;
12666
+ enabled: boolean;
12667
+ image: string;
12668
+ runtime: {
12669
+ requirePrincipal: boolean;
12670
+ rateLimitRpm: number;
12671
+ execution?: {
12672
+ lane: "host" | "e2b" | "k8s" | "ssh" | "adb" | "local-docker" | "device";
12673
+ secretRefs: Record<string, string>;
12674
+ coords: Record<string, string>;
12675
+ } | undefined;
12676
+ store?: {
12677
+ memory: {
12678
+ backend: "pg" | "file" | "tidb";
12679
+ engine: "on" | "off";
12680
+ };
12681
+ session: "mysql" | "memory" | "auto";
12682
+ backend: "mysql" | "pg" | "local" | "memory";
12683
+ db?: {
12684
+ host: string;
12685
+ port: number;
12686
+ user: string;
12687
+ database: string;
12688
+ } | undefined;
12689
+ } | undefined;
12690
+ scenario?: string | undefined;
12691
+ maxPrincipalCostUsd?: number | undefined;
11785
12692
  };
11786
- enabled?: boolean | undefined;
11787
12693
  notes?: string | undefined;
11788
- host?: string | undefined;
11789
- image?: string | undefined;
11790
12694
  routePrefix?: string | undefined;
11791
12695
  replicas?: number | undefined;
11792
12696
  autoscaling?: {
@@ -11796,35 +12700,29 @@ export declare const DOMAIN_SCHEMAS: {
11796
12700
  } | undefined;
11797
12701
  resources?: {
11798
12702
  requests?: {
11799
- cpu?: string | undefined;
11800
12703
  memory?: string | undefined;
12704
+ cpu?: string | undefined;
11801
12705
  } | undefined;
11802
12706
  limits?: {
11803
- cpu?: string | undefined;
11804
12707
  memory?: string | undefined;
12708
+ cpu?: string | undefined;
11805
12709
  } | undefined;
11806
12710
  } | undefined;
11807
12711
  fleet?: {
11808
12712
  dispatch?: {
11809
- strategy?: "round-robin" | "least-inflight" | "consistent-hash" | undefined;
11810
- sessionAffinity?: boolean | undefined;
12713
+ strategy: "round-robin" | "least-inflight" | "consistent-hash";
12714
+ sessionAffinity: boolean;
11811
12715
  maxInflight?: number | undefined;
11812
12716
  perActorMaxInflight?: number | undefined;
11813
12717
  maxCostUsd?: number | undefined;
11814
12718
  } | undefined;
11815
12719
  drainGraceMs?: number | undefined;
11816
12720
  } | undefined;
11817
- coords?: {
11818
- gitApiBaseUrl?: string | undefined;
11819
- tidbHost?: string | undefined;
11820
- tidbPort?: number | undefined;
11821
- tidbUser?: string | undefined;
11822
- } | undefined;
11823
12721
  env?: Record<string, string> | undefined;
11824
12722
  secretEnv?: Record<string, string> | undefined;
11825
12723
  recreateNonce?: string | undefined;
11826
12724
  lifecycle?: {
11827
- kind?: "persistent" | "ephemeral" | undefined;
12725
+ kind: "persistent" | "ephemeral";
11828
12726
  ttl?: string | undefined;
11829
12727
  idleTimeout?: string | undefined;
11830
12728
  owner?: string | undefined;
@@ -11832,13 +12730,15 @@ export declare const DOMAIN_SCHEMAS: {
11832
12730
  dependsOn?: string[] | undefined;
11833
12731
  } | undefined;
11834
12732
  placement?: {
11835
- auto?: boolean | undefined;
11836
- requires?: string[] | undefined;
12733
+ auto: boolean;
12734
+ requires: string[];
11837
12735
  spread?: string | undefined;
11838
12736
  } | undefined;
11839
12737
  roster?: string | undefined;
11840
12738
  signature?: string | undefined;
11841
- }[] | undefined;
12739
+ }[];
12740
+ }, {
12741
+ workers?: unknown[] | undefined;
11842
12742
  }>;
11843
12743
  readonly hosts: z.ZodEffects<z.ZodObject<{
11844
12744
  hosts: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -13200,8 +14100,9 @@ export declare const DOMAIN_SCHEMAS: {
13200
14100
  * shell locks sandbox-enabled by policy; user settings can't turn it off — CC 同款语义). */
13201
14101
  required: z.ZodDefault<z.ZodBoolean>;
13202
14102
  /** Which execution lanes are allowed. OPEN value domain — z.string(), NEVER an enum: adding a lane
13203
- * must not be a BREAKING schema change (promised to the service). Known lanes
13204
- * today: `host` / `e2b` / `k8s` / `ssh` / `adb` / `local-docker`. Unknown strings are consumer-defined. */
14103
+ * must not be a BREAKING schema change (promised to the service). The closed set of lanes a worker can
14104
+ * declare is `EXECUTION_LANE_WORDS` (`execution-lanes.ts`, 7.0.0) — read it there, not from a copy in this
14105
+ * comment. Unknown strings are consumer-defined. */
13205
14106
  allowedLanes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
13206
14107
  /** Org 默认会话镜像目标(0.10.1,附B 两层)。ABSENT = INERT(center 未管镜像,壳解析序里本腿为空)。
13207
14108
  * 读损档随域(DOMAIN_READ_FALLBACK.execution="throw" 已覆盖:损坏绝不静默退默认放权)。 */