@agent-relay/factory 0.1.56 → 0.1.58

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 (141) hide show
  1. package/README.md +148 -2
  2. package/dist/cli/fleet.d.ts +13 -0
  3. package/dist/cli/fleet.d.ts.map +1 -1
  4. package/dist/cli/fleet.js +431 -103
  5. package/dist/cli/fleet.js.map +1 -1
  6. package/dist/config/schema.d.ts +1107 -348
  7. package/dist/config/schema.d.ts.map +1 -1
  8. package/dist/config/schema.js +67 -6
  9. package/dist/config/schema.js.map +1 -1
  10. package/dist/cost/index.d.ts +3 -0
  11. package/dist/cost/index.d.ts.map +1 -0
  12. package/dist/cost/index.js +3 -0
  13. package/dist/cost/index.js.map +1 -0
  14. package/dist/cost/ledger.d.ts +69 -0
  15. package/dist/cost/ledger.d.ts.map +1 -0
  16. package/dist/cost/ledger.js +162 -0
  17. package/dist/cost/ledger.js.map +1 -0
  18. package/dist/cost/pricing.d.ts +18 -0
  19. package/dist/cost/pricing.d.ts.map +1 -0
  20. package/dist/cost/pricing.js +54 -0
  21. package/dist/cost/pricing.js.map +1 -0
  22. package/dist/feature-guardian/conversation.d.ts +251 -0
  23. package/dist/feature-guardian/conversation.d.ts.map +1 -0
  24. package/dist/feature-guardian/conversation.js +1893 -0
  25. package/dist/feature-guardian/conversation.js.map +1 -0
  26. package/dist/feature-guardian/index.d.ts +2 -0
  27. package/dist/feature-guardian/index.d.ts.map +1 -0
  28. package/dist/feature-guardian/index.js +2 -0
  29. package/dist/feature-guardian/index.js.map +1 -0
  30. package/dist/fleet/internal-fleet-client.d.ts +3 -1
  31. package/dist/fleet/internal-fleet-client.d.ts.map +1 -1
  32. package/dist/fleet/internal-fleet-client.js +81 -0
  33. package/dist/fleet/internal-fleet-client.js.map +1 -1
  34. package/dist/fleet/relay-fleet-client.d.ts +3 -1
  35. package/dist/fleet/relay-fleet-client.d.ts.map +1 -1
  36. package/dist/fleet/relay-fleet-client.js +48 -0
  37. package/dist/fleet/relay-fleet-client.js.map +1 -1
  38. package/dist/github/index.d.ts +2 -0
  39. package/dist/github/index.d.ts.map +1 -1
  40. package/dist/github/index.js +1 -0
  41. package/dist/github/index.js.map +1 -1
  42. package/dist/github/routed-pr-babysitter.d.ts +48 -0
  43. package/dist/github/routed-pr-babysitter.d.ts.map +1 -0
  44. package/dist/github/routed-pr-babysitter.js +197 -0
  45. package/dist/github/routed-pr-babysitter.js.map +1 -0
  46. package/dist/hosted/index.d.ts +1 -1
  47. package/dist/hosted/index.d.ts.map +1 -1
  48. package/dist/hosted/index.js +1 -1
  49. package/dist/hosted/index.js.map +1 -1
  50. package/dist/hosted/orchestrator.d.ts +1 -0
  51. package/dist/hosted/orchestrator.d.ts.map +1 -1
  52. package/dist/hosted/orchestrator.js +190 -1
  53. package/dist/hosted/orchestrator.js.map +1 -1
  54. package/dist/hosted/types.d.ts +4 -0
  55. package/dist/hosted/types.d.ts.map +1 -1
  56. package/dist/index.d.ts +8 -4
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +5 -1
  59. package/dist/index.js.map +1 -1
  60. package/dist/intake/index.d.ts +4 -0
  61. package/dist/intake/index.d.ts.map +1 -0
  62. package/dist/intake/index.js +4 -0
  63. package/dist/intake/index.js.map +1 -0
  64. package/dist/intake/notion-relay-claim.d.ts +32 -0
  65. package/dist/intake/notion-relay-claim.d.ts.map +1 -0
  66. package/dist/intake/notion-relay-claim.js +173 -0
  67. package/dist/intake/notion-relay-claim.js.map +1 -0
  68. package/dist/intake/notion-relay-contract.d.ts +33 -0
  69. package/dist/intake/notion-relay-contract.d.ts.map +1 -0
  70. package/dist/intake/notion-relay-contract.js +163 -0
  71. package/dist/intake/notion-relay-contract.js.map +1 -0
  72. package/dist/intake/notion.d.ts +375 -0
  73. package/dist/intake/notion.d.ts.map +1 -0
  74. package/dist/intake/notion.js +773 -0
  75. package/dist/intake/notion.js.map +1 -0
  76. package/dist/mount/github-api-issue-read.d.ts +28 -0
  77. package/dist/mount/github-api-issue-read.d.ts.map +1 -0
  78. package/dist/mount/github-api-issue-read.js +163 -0
  79. package/dist/mount/github-api-issue-read.js.map +1 -0
  80. package/dist/mount/local-mount-preflight.d.ts +2 -0
  81. package/dist/mount/local-mount-preflight.d.ts.map +1 -1
  82. package/dist/mount/local-mount-preflight.js +59 -9
  83. package/dist/mount/local-mount-preflight.js.map +1 -1
  84. package/dist/mount/mount-auth-error.d.ts +41 -0
  85. package/dist/mount/mount-auth-error.d.ts.map +1 -0
  86. package/dist/mount/mount-auth-error.js +94 -0
  87. package/dist/mount/mount-auth-error.js.map +1 -0
  88. package/dist/mount/relayfile-binary.d.ts +5 -0
  89. package/dist/mount/relayfile-binary.d.ts.map +1 -1
  90. package/dist/mount/relayfile-binary.js +16 -2
  91. package/dist/mount/relayfile-binary.js.map +1 -1
  92. package/dist/mount/relayfile-cloud-mount-client.d.ts +18 -3
  93. package/dist/mount/relayfile-cloud-mount-client.d.ts.map +1 -1
  94. package/dist/mount/relayfile-cloud-mount-client.js +157 -13
  95. package/dist/mount/relayfile-cloud-mount-client.js.map +1 -1
  96. package/dist/mount/workspace-mirror.d.ts +13 -0
  97. package/dist/mount/workspace-mirror.d.ts.map +1 -0
  98. package/dist/mount/workspace-mirror.js +94 -0
  99. package/dist/mount/workspace-mirror.js.map +1 -0
  100. package/dist/observability/events.d.ts +715 -47
  101. package/dist/observability/events.d.ts.map +1 -1
  102. package/dist/observability/events.js +41 -0
  103. package/dist/observability/events.js.map +1 -1
  104. package/dist/orchestrator/factory.d.ts +51 -0
  105. package/dist/orchestrator/factory.d.ts.map +1 -1
  106. package/dist/orchestrator/factory.js +574 -50
  107. package/dist/orchestrator/factory.js.map +1 -1
  108. package/dist/ports/fleet.d.ts +11 -0
  109. package/dist/ports/fleet.d.ts.map +1 -1
  110. package/dist/ports/index.d.ts +2 -2
  111. package/dist/ports/index.d.ts.map +1 -1
  112. package/dist/ports/mount.d.ts +58 -1
  113. package/dist/ports/mount.d.ts.map +1 -1
  114. package/dist/ports/state.d.ts +42 -5
  115. package/dist/ports/state.d.ts.map +1 -1
  116. package/dist/state/file-state-store.d.ts +10 -1
  117. package/dist/state/file-state-store.d.ts.map +1 -1
  118. package/dist/state/file-state-store.js +91 -0
  119. package/dist/state/file-state-store.js.map +1 -1
  120. package/dist/state/in-memory-state-store.d.ts +10 -1
  121. package/dist/state/in-memory-state-store.d.ts.map +1 -1
  122. package/dist/state/in-memory-state-store.js +43 -0
  123. package/dist/state/in-memory-state-store.js.map +1 -1
  124. package/dist/telemetry.d.ts +9 -0
  125. package/dist/telemetry.d.ts.map +1 -0
  126. package/dist/telemetry.js +8 -0
  127. package/dist/telemetry.js.map +1 -0
  128. package/dist/testing/fakes.d.ts +8 -1
  129. package/dist/testing/fakes.d.ts.map +1 -1
  130. package/dist/testing/fakes.js +18 -0
  131. package/dist/testing/fakes.js.map +1 -1
  132. package/dist/triage/schema.d.ts +175 -42
  133. package/dist/triage/schema.d.ts.map +1 -1
  134. package/dist/triage/schema.js +19 -0
  135. package/dist/triage/schema.js.map +1 -1
  136. package/dist/types.d.ts +33 -0
  137. package/dist/types.d.ts.map +1 -1
  138. package/dist/writeback/github.d.ts.map +1 -1
  139. package/dist/writeback/github.js +39 -0
  140. package/dist/writeback/github.js.map +1 -1
  141. package/package.json +15 -2
@@ -1,8 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  export declare const FACTORY_STATE_ROLES: readonly ["readyForAgent", "agentImplementing", "inPlanning", "done", "humanReview"];
3
3
  export type FactoryStateRole = (typeof FACTORY_STATE_ROLES)[number];
4
- export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
4
+ export declare const resolveRoutedRepo: (configured: string, org: string | undefined) => string | undefined;
5
+ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
5
6
  workspaceId: z.ZodOptional<z.ZodString>;
7
+ localMountRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6
8
  subscription: z.ZodDefault<z.ZodObject<{
7
9
  teams: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
10
  projects: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -173,10 +175,22 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
173
175
  mergePolicy: z.ZodDefault<z.ZodEnum<["never", "on-green-with-review"]>>;
174
176
  babysitter: z.ZodDefault<z.ZodObject<{
175
177
  enabled: z.ZodDefault<z.ZodBoolean>;
178
+ mode: z.ZodDefault<z.ZodEnum<["factory-created", "routed-open-prs"]>>;
179
+ excludeLabels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
180
+ excludePullRequests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
181
+ notifyHumans: z.ZodDefault<z.ZodBoolean>;
176
182
  }, "strip", z.ZodTypeAny, {
177
183
  enabled: boolean;
184
+ mode: "factory-created" | "routed-open-prs";
185
+ excludeLabels: string[];
186
+ excludePullRequests: string[];
187
+ notifyHumans: boolean;
178
188
  }, {
179
189
  enabled?: boolean | undefined;
190
+ mode?: "factory-created" | "routed-open-prs" | undefined;
191
+ excludeLabels?: string[] | undefined;
192
+ excludePullRequests?: string[] | undefined;
193
+ notifyHumans?: boolean | undefined;
180
194
  }>>;
181
195
  reporting: z.ZodDefault<z.ZodObject<{
182
196
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -845,6 +859,10 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
845
859
  };
846
860
  babysitter: {
847
861
  enabled: boolean;
862
+ mode: "factory-created" | "routed-open-prs";
863
+ excludeLabels: string[];
864
+ excludePullRequests: string[];
865
+ notifyHumans: boolean;
848
866
  };
849
867
  batchSize: number;
850
868
  subscription: {
@@ -982,6 +1000,7 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
982
1000
  } | undefined;
983
1001
  };
984
1002
  workspaceId?: string | undefined;
1003
+ localMountRoot?: string | undefined;
985
1004
  slack?: {
986
1005
  channel: string;
987
1006
  style: "threaded-summarized";
@@ -1024,9 +1043,14 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
1024
1043
  } | undefined;
1025
1044
  babysitter?: {
1026
1045
  enabled?: boolean | undefined;
1046
+ mode?: "factory-created" | "routed-open-prs" | undefined;
1047
+ excludeLabels?: string[] | undefined;
1048
+ excludePullRequests?: string[] | undefined;
1049
+ notifyHumans?: boolean | undefined;
1027
1050
  } | undefined;
1028
1051
  batchSize?: number | undefined;
1029
1052
  workspaceId?: string | undefined;
1053
+ localMountRoot?: string | undefined;
1030
1054
  subscription?: {
1031
1055
  teams?: string[] | undefined;
1032
1056
  projects?: string[] | undefined;
@@ -1170,46 +1194,23 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
1170
1194
  } | undefined;
1171
1195
  } | undefined;
1172
1196
  }>, {
1173
- subscription: {
1174
- labels: string[];
1175
- teams: string[];
1176
- projects: string[];
1177
- assignees: string[];
1178
- };
1179
- preview: {
1180
- registryPath: string;
1181
- provider: "tailscale-serve";
1182
- access: "tailnet";
1183
- services: Record<string, {
1184
- port: number;
1185
- startCommand: string;
1186
- portSpan?: number | undefined;
1187
- httpsPort?: number | undefined;
1188
- }>;
1189
- tailscaleBinary: string;
1190
- httpsPortRange: [number, number];
1191
- } | undefined;
1192
- repos: {
1193
- default?: string | undefined;
1194
- byLabel: {
1195
- [x: string]: string;
1196
- };
1197
- byProject: Record<string, string>;
1198
- keywordRules: {
1199
- pattern: string;
1200
- repo: string;
1201
- }[];
1202
- overrides: Record<string, string>;
1203
- org?: string | undefined;
1204
- names?: string[] | undefined;
1205
- };
1206
1197
  triage: {
1207
1198
  maxImplementers: number;
1208
1199
  };
1209
1200
  babysitter: {
1210
1201
  enabled: boolean;
1202
+ mode: "factory-created" | "routed-open-prs";
1203
+ excludeLabels: string[];
1204
+ excludePullRequests: string[];
1205
+ notifyHumans: boolean;
1211
1206
  };
1212
1207
  batchSize: number;
1208
+ subscription: {
1209
+ teams: string[];
1210
+ projects: string[];
1211
+ labels: string[];
1212
+ assignees: string[];
1213
+ };
1213
1214
  liveSubscription: {
1214
1215
  transport: "subscribe-and-poll" | "subscribe" | "poll";
1215
1216
  pollIntervalMs: number;
@@ -1227,6 +1228,20 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
1227
1228
  registryPath: string;
1228
1229
  heartbeatStaleMs: number;
1229
1230
  };
1231
+ repos: {
1232
+ overrides: Record<string, string>;
1233
+ byLabel: Record<string, string>;
1234
+ byProject: Record<string, string>;
1235
+ keywordRules: {
1236
+ pattern: string;
1237
+ repo: string;
1238
+ }[];
1239
+ clonePaths: Record<string, string>;
1240
+ default?: string | undefined;
1241
+ org?: string | undefined;
1242
+ names?: string[] | undefined;
1243
+ cloneRoot?: string | undefined;
1244
+ };
1230
1245
  models: {
1231
1246
  babysitter: string;
1232
1247
  implementer?: string | undefined;
@@ -1325,6 +1340,7 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
1325
1340
  } | undefined;
1326
1341
  };
1327
1342
  workspaceId?: string | undefined;
1343
+ localMountRoot?: string | undefined;
1328
1344
  slack?: {
1329
1345
  channel: string;
1330
1346
  style: "threaded-summarized";
@@ -1334,6 +1350,19 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
1334
1350
  conversationCoalesceMs: number;
1335
1351
  } | undefined;
1336
1352
  issueSource?: "linear" | "github" | undefined;
1353
+ preview?: {
1354
+ registryPath: string;
1355
+ provider: "tailscale-serve";
1356
+ access: "tailnet";
1357
+ services: Record<string, {
1358
+ port: number;
1359
+ startCommand: string;
1360
+ portSpan?: number | undefined;
1361
+ httpsPort?: number | undefined;
1362
+ }>;
1363
+ tailscaleBinary: string;
1364
+ httpsPortRange: [number, number];
1365
+ } | undefined;
1337
1366
  }, {
1338
1367
  repos: {
1339
1368
  default?: string | undefined;
@@ -1354,9 +1383,14 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
1354
1383
  } | undefined;
1355
1384
  babysitter?: {
1356
1385
  enabled?: boolean | undefined;
1386
+ mode?: "factory-created" | "routed-open-prs" | undefined;
1387
+ excludeLabels?: string[] | undefined;
1388
+ excludePullRequests?: string[] | undefined;
1389
+ notifyHumans?: boolean | undefined;
1357
1390
  } | undefined;
1358
1391
  batchSize?: number | undefined;
1359
1392
  workspaceId?: string | undefined;
1393
+ localMountRoot?: string | undefined;
1360
1394
  subscription?: {
1361
1395
  teams?: string[] | undefined;
1362
1396
  projects?: string[] | undefined;
@@ -1499,147 +1533,13 @@ export declare const WorkspaceConfigSchema: z.ZodEffects<z.ZodObject<{
1499
1533
  } | undefined;
1500
1534
  } | undefined;
1501
1535
  } | undefined;
1502
- }>;
1503
- export declare const NodeConfigSchema: z.ZodEffects<z.ZodObject<{
1504
- workspaceId: z.ZodOptional<z.ZodString>;
1505
- capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1506
- cloneRoot: z.ZodOptional<z.ZodString>;
1507
- clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1508
- dryRun: z.ZodDefault<z.ZodBoolean>;
1509
- factoryLoopHeartbeatPath: z.ZodOptional<z.ZodString>;
1510
- factoryLoopRegistryPath: z.ZodOptional<z.ZodString>;
1511
- preview: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1512
- provider: z.ZodDefault<z.ZodLiteral<"tailscale-serve">>;
1513
- access: z.ZodDefault<z.ZodLiteral<"tailnet">>;
1514
- services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
1515
- /** Local HTTP port the repository's development server listens on. */
1516
- port: z.ZodNumber;
1517
- /** Consecutive node-local ports Factory may allocate for concurrent issues. */
1518
- portSpan: z.ZodOptional<z.ZodNumber>;
1519
- /** Optional stable tailnet HTTPS port; otherwise Factory allocates one. */
1520
- httpsPort: z.ZodOptional<z.ZodNumber>;
1521
- /** Foreground command Factory supervises for the issue-lifetime preview. */
1522
- startCommand: z.ZodString;
1523
- }, "strip", z.ZodTypeAny, {
1524
- port: number;
1525
- startCommand: string;
1526
- portSpan?: number | undefined;
1527
- httpsPort?: number | undefined;
1528
- }, {
1529
- port: number;
1530
- startCommand: string;
1531
- portSpan?: number | undefined;
1532
- httpsPort?: number | undefined;
1533
- }>, {
1534
- port: number;
1535
- startCommand: string;
1536
- portSpan?: number | undefined;
1537
- httpsPort?: number | undefined;
1538
- }, {
1539
- port: number;
1540
- startCommand: string;
1541
- portSpan?: number | undefined;
1542
- httpsPort?: number | undefined;
1543
- }>>>;
1544
- tailscaleBinary: z.ZodDefault<z.ZodString>;
1545
- registryPath: z.ZodDefault<z.ZodString>;
1546
- httpsPortRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
1547
- }, "strip", z.ZodTypeAny, {
1548
- registryPath: string;
1549
- provider: "tailscale-serve";
1550
- access: "tailnet";
1551
- services: Record<string, {
1552
- port: number;
1553
- startCommand: string;
1554
- portSpan?: number | undefined;
1555
- httpsPort?: number | undefined;
1556
- }>;
1557
- tailscaleBinary: string;
1558
- httpsPortRange: [number, number];
1559
- }, {
1560
- registryPath?: string | undefined;
1561
- provider?: "tailscale-serve" | undefined;
1562
- access?: "tailnet" | undefined;
1563
- services?: Record<string, {
1564
- port: number;
1565
- startCommand: string;
1566
- portSpan?: number | undefined;
1567
- httpsPort?: number | undefined;
1568
- }> | undefined;
1569
- tailscaleBinary?: string | undefined;
1570
- httpsPortRange?: [number, number] | undefined;
1571
- }>, {
1572
- registryPath: string;
1573
- provider: "tailscale-serve";
1574
- access: "tailnet";
1575
- services: Record<string, {
1576
- port: number;
1577
- startCommand: string;
1578
- portSpan?: number | undefined;
1579
- httpsPort?: number | undefined;
1580
- }>;
1581
- tailscaleBinary: string;
1582
- httpsPortRange: [number, number];
1583
- }, {
1584
- registryPath?: string | undefined;
1585
- provider?: "tailscale-serve" | undefined;
1586
- access?: "tailnet" | undefined;
1587
- services?: Record<string, {
1588
- port: number;
1589
- startCommand: string;
1590
- portSpan?: number | undefined;
1591
- httpsPort?: number | undefined;
1592
- }> | undefined;
1593
- tailscaleBinary?: string | undefined;
1594
- httpsPortRange?: [number, number] | undefined;
1595
- }>>;
1596
- }, "strip", z.ZodTypeAny, {
1597
- clonePaths: Record<string, string>;
1598
- capabilities: string[];
1599
- dryRun: boolean;
1600
- cloneRoot?: string | undefined;
1601
- workspaceId?: string | undefined;
1602
- preview?: {
1603
- registryPath: string;
1604
- provider: "tailscale-serve";
1605
- access: "tailnet";
1606
- services: Record<string, {
1607
- port: number;
1608
- startCommand: string;
1609
- portSpan?: number | undefined;
1610
- httpsPort?: number | undefined;
1611
- }>;
1612
- tailscaleBinary: string;
1613
- httpsPortRange: [number, number];
1614
- } | undefined;
1615
- factoryLoopHeartbeatPath?: string | undefined;
1616
- factoryLoopRegistryPath?: string | undefined;
1617
- }, {
1618
- cloneRoot?: string | undefined;
1619
- clonePaths?: Record<string, string> | undefined;
1620
- workspaceId?: string | undefined;
1621
- preview?: {
1622
- registryPath?: string | undefined;
1623
- provider?: "tailscale-serve" | undefined;
1624
- access?: "tailnet" | undefined;
1625
- services?: Record<string, {
1626
- port: number;
1627
- startCommand: string;
1628
- portSpan?: number | undefined;
1629
- httpsPort?: number | undefined;
1630
- }> | undefined;
1631
- tailscaleBinary?: string | undefined;
1632
- httpsPortRange?: [number, number] | undefined;
1633
- } | undefined;
1634
- capabilities?: string[] | undefined;
1635
- dryRun?: boolean | undefined;
1636
- factoryLoopHeartbeatPath?: string | undefined;
1637
- factoryLoopRegistryPath?: string | undefined;
1638
1536
  }>, {
1639
- cloneRoot: string | undefined;
1640
- clonePaths: Record<string, string>;
1641
- factoryLoopHeartbeatPath: string | undefined;
1642
- factoryLoopRegistryPath: string | undefined;
1537
+ subscription: {
1538
+ labels: string[];
1539
+ teams: string[];
1540
+ projects: string[];
1541
+ assignees: string[];
1542
+ };
1643
1543
  preview: {
1644
1544
  registryPath: string;
1645
1545
  provider: "tailscale-serve";
@@ -1653,51 +1553,526 @@ export declare const NodeConfigSchema: z.ZodEffects<z.ZodObject<{
1653
1553
  tailscaleBinary: string;
1654
1554
  httpsPortRange: [number, number];
1655
1555
  } | undefined;
1656
- capabilities: string[];
1657
- dryRun: boolean;
1658
- workspaceId?: string | undefined;
1659
- }, {
1660
- cloneRoot?: string | undefined;
1661
- clonePaths?: Record<string, string> | undefined;
1662
- workspaceId?: string | undefined;
1663
- preview?: {
1664
- registryPath?: string | undefined;
1665
- provider?: "tailscale-serve" | undefined;
1666
- access?: "tailnet" | undefined;
1667
- services?: Record<string, {
1668
- port: number;
1669
- startCommand: string;
1670
- portSpan?: number | undefined;
1671
- httpsPort?: number | undefined;
1672
- }> | undefined;
1673
- tailscaleBinary?: string | undefined;
1674
- httpsPortRange?: [number, number] | undefined;
1675
- } | undefined;
1676
- capabilities?: string[] | undefined;
1677
- dryRun?: boolean | undefined;
1678
- factoryLoopHeartbeatPath?: string | undefined;
1679
- factoryLoopRegistryPath?: string | undefined;
1680
- }>;
1681
- export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
1682
- subscription: z.ZodDefault<z.ZodObject<{
1683
- teams: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1684
- projects: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1685
- labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1686
- assignees: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1687
- }, "strip", z.ZodTypeAny, {
1688
- teams: string[];
1689
- projects: string[];
1690
- labels: string[];
1691
- assignees: string[];
1692
- }, {
1693
- teams?: string[] | undefined;
1694
- projects?: string[] | undefined;
1695
- labels?: string[] | undefined;
1696
- assignees?: string[] | undefined;
1697
- }>>;
1698
- liveSubscription: z.ZodDefault<z.ZodObject<{
1699
- transport: z.ZodDefault<z.ZodEnum<["subscribe-and-poll", "subscribe", "poll"]>>;
1700
- pollIntervalMs: z.ZodDefault<z.ZodNumber>;
1556
+ repos: {
1557
+ default?: string | undefined;
1558
+ byLabel: {
1559
+ [x: string]: string;
1560
+ };
1561
+ byProject: Record<string, string>;
1562
+ keywordRules: {
1563
+ pattern: string;
1564
+ repo: string;
1565
+ }[];
1566
+ overrides: Record<string, string>;
1567
+ org?: string | undefined;
1568
+ names?: string[] | undefined;
1569
+ };
1570
+ triage: {
1571
+ maxImplementers: number;
1572
+ };
1573
+ babysitter: {
1574
+ enabled: boolean;
1575
+ mode: "factory-created" | "routed-open-prs";
1576
+ excludeLabels: string[];
1577
+ excludePullRequests: string[];
1578
+ notifyHumans: boolean;
1579
+ };
1580
+ batchSize: number;
1581
+ liveSubscription: {
1582
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
1583
+ pollIntervalMs: number;
1584
+ eventLimit: number;
1585
+ replaySkewMarginMs: number;
1586
+ };
1587
+ dispatch: {
1588
+ errorCooldownMs: number;
1589
+ maxAttempts: number;
1590
+ };
1591
+ loop: {
1592
+ maxIterations: number;
1593
+ maxConsecutiveFailures: number;
1594
+ heartbeatPath: string;
1595
+ registryPath: string;
1596
+ heartbeatStaleMs: number;
1597
+ };
1598
+ models: {
1599
+ babysitter: string;
1600
+ implementer?: string | undefined;
1601
+ reviewer?: string | undefined;
1602
+ triage?: string | undefined;
1603
+ };
1604
+ agentCapabilities: {
1605
+ implementer: "spawn:codex" | "spawn:claude";
1606
+ reviewer: "spawn:codex" | "spawn:claude";
1607
+ babysitter: "spawn:codex" | "spawn:claude";
1608
+ };
1609
+ linear: {
1610
+ states: {
1611
+ readyForAgent?: string | undefined;
1612
+ agentImplementing?: string | undefined;
1613
+ inPlanning?: string | undefined;
1614
+ done?: string | undefined;
1615
+ humanReview?: string | undefined;
1616
+ };
1617
+ statesByTeam: Record<string, {
1618
+ readyForAgent?: string | undefined;
1619
+ agentImplementing?: string | undefined;
1620
+ inPlanning?: string | undefined;
1621
+ done?: string | undefined;
1622
+ humanReview?: string | undefined;
1623
+ }>;
1624
+ teamIds: Record<string, string>;
1625
+ };
1626
+ github: {
1627
+ identity: "app" | "user" | "auto";
1628
+ };
1629
+ mergePolicy: "never" | "on-green-with-review";
1630
+ reporting: {
1631
+ enabled: boolean;
1632
+ batchSize: number;
1633
+ requestTimeoutMs: number;
1634
+ instanceName?: string | undefined;
1635
+ outboxPath?: string | undefined;
1636
+ };
1637
+ verification: {
1638
+ enabled: boolean;
1639
+ descriptorPath: string;
1640
+ maxConcurrentEnvironments: number;
1641
+ maxRunTimeoutMs: number;
1642
+ maxEnvironmentTtlMs: number;
1643
+ maxTeardownTimeoutMs: number;
1644
+ };
1645
+ terminalState: "done" | "human-review";
1646
+ stateIds: {
1647
+ readyForAgent?: string | undefined;
1648
+ agentImplementing?: string | undefined;
1649
+ inPlanning?: string | undefined;
1650
+ done?: string | undefined;
1651
+ humanReview?: string | undefined;
1652
+ };
1653
+ safety: {
1654
+ requireTitlePrefix: string;
1655
+ requireLabel: string;
1656
+ requireTeamKey: string;
1657
+ };
1658
+ environments: {
1659
+ kubernetes?: {
1660
+ connections: {
1661
+ id: string;
1662
+ target: "byoc" | "managed";
1663
+ customers: string[];
1664
+ repositories: string[];
1665
+ credential: {
1666
+ kind: "kubeconfig" | "irsa";
1667
+ secretRef: string;
1668
+ };
1669
+ protectedNamespaces: string[];
1670
+ allowClusterScopedResources: boolean;
1671
+ allowedClusterScopedKinds: string[];
1672
+ nodeSelector: Record<string, string>;
1673
+ tolerations: {
1674
+ key?: string | undefined;
1675
+ operator?: "Exists" | "Equal" | undefined;
1676
+ value?: string | undefined;
1677
+ effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute" | undefined;
1678
+ tolerationSeconds?: number | undefined;
1679
+ }[];
1680
+ context?: string | undefined;
1681
+ fidelityCaveat?: string | undefined;
1682
+ }[];
1683
+ defaults: {
1684
+ ttlMs: number;
1685
+ readinessTimeoutMs: number;
1686
+ resourceQuota: Record<string, string>;
1687
+ limitRange: {
1688
+ default: Record<string, string>;
1689
+ max: Record<string, string>;
1690
+ defaultRequest: Record<string, string>;
1691
+ };
1692
+ };
1693
+ } | undefined;
1694
+ };
1695
+ workspaceId?: string | undefined;
1696
+ localMountRoot?: string | undefined;
1697
+ slack?: {
1698
+ channel: string;
1699
+ style: "threaded-summarized";
1700
+ botUserId: string;
1701
+ stakeholderUserIds: string[];
1702
+ staleAfterMs: number;
1703
+ conversationCoalesceMs: number;
1704
+ } | undefined;
1705
+ issueSource?: "linear" | "github" | undefined;
1706
+ }, {
1707
+ repos: {
1708
+ default?: string | undefined;
1709
+ org?: string | undefined;
1710
+ names?: string[] | undefined;
1711
+ overrides?: Record<string, string> | undefined;
1712
+ byLabel?: Record<string, string> | undefined;
1713
+ byProject?: Record<string, string> | undefined;
1714
+ keywordRules?: {
1715
+ pattern: string;
1716
+ repo: string;
1717
+ }[] | undefined;
1718
+ cloneRoot?: string | undefined;
1719
+ clonePaths?: Record<string, string> | undefined;
1720
+ };
1721
+ triage?: {
1722
+ maxImplementers?: number | undefined;
1723
+ } | undefined;
1724
+ babysitter?: {
1725
+ enabled?: boolean | undefined;
1726
+ mode?: "factory-created" | "routed-open-prs" | undefined;
1727
+ excludeLabels?: string[] | undefined;
1728
+ excludePullRequests?: string[] | undefined;
1729
+ notifyHumans?: boolean | undefined;
1730
+ } | undefined;
1731
+ batchSize?: number | undefined;
1732
+ workspaceId?: string | undefined;
1733
+ localMountRoot?: string | undefined;
1734
+ subscription?: {
1735
+ teams?: string[] | undefined;
1736
+ projects?: string[] | undefined;
1737
+ labels?: string[] | undefined;
1738
+ assignees?: string[] | undefined;
1739
+ } | undefined;
1740
+ liveSubscription?: {
1741
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
1742
+ pollIntervalMs?: number | undefined;
1743
+ eventLimit?: number | undefined;
1744
+ replaySkewMarginMs?: number | undefined;
1745
+ } | undefined;
1746
+ dispatch?: {
1747
+ errorCooldownMs?: number | undefined;
1748
+ maxAttempts?: number | undefined;
1749
+ } | undefined;
1750
+ loop?: {
1751
+ maxIterations?: number | undefined;
1752
+ maxConsecutiveFailures?: number | undefined;
1753
+ heartbeatPath?: string | undefined;
1754
+ registryPath?: string | undefined;
1755
+ heartbeatStaleMs?: number | undefined;
1756
+ } | undefined;
1757
+ models?: {
1758
+ implementer?: string | undefined;
1759
+ reviewer?: string | undefined;
1760
+ triage?: string | undefined;
1761
+ babysitter?: string | undefined;
1762
+ } | undefined;
1763
+ agentCapabilities?: {
1764
+ implementer?: "spawn:codex" | "spawn:claude" | undefined;
1765
+ reviewer?: "spawn:codex" | "spawn:claude" | undefined;
1766
+ babysitter?: "spawn:codex" | "spawn:claude" | undefined;
1767
+ } | undefined;
1768
+ slack?: {
1769
+ channel: string;
1770
+ style?: "threaded-summarized" | undefined;
1771
+ botUserId?: string | undefined;
1772
+ stakeholderUserIds?: string[] | undefined;
1773
+ staleAfterMs?: number | undefined;
1774
+ conversationCoalesceMs?: number | undefined;
1775
+ } | undefined;
1776
+ linear?: {
1777
+ states?: {
1778
+ readyForAgent?: string | undefined;
1779
+ agentImplementing?: string | undefined;
1780
+ inPlanning?: string | undefined;
1781
+ done?: string | undefined;
1782
+ humanReview?: string | undefined;
1783
+ } | undefined;
1784
+ statesByTeam?: Record<string, {
1785
+ readyForAgent?: string | undefined;
1786
+ agentImplementing?: string | undefined;
1787
+ inPlanning?: string | undefined;
1788
+ done?: string | undefined;
1789
+ humanReview?: string | undefined;
1790
+ } | undefined> | undefined;
1791
+ teamIds?: Record<string, string> | undefined;
1792
+ } | undefined;
1793
+ github?: {
1794
+ identity?: "app" | "user" | "auto" | undefined;
1795
+ } | undefined;
1796
+ issueSource?: "linear" | "github" | undefined;
1797
+ mergePolicy?: "never" | "on-green-with-review" | undefined;
1798
+ reporting?: {
1799
+ enabled?: boolean | undefined;
1800
+ instanceName?: string | undefined;
1801
+ outboxPath?: string | undefined;
1802
+ batchSize?: number | undefined;
1803
+ requestTimeoutMs?: number | undefined;
1804
+ } | undefined;
1805
+ preview?: {
1806
+ registryPath?: string | undefined;
1807
+ provider?: "tailscale-serve" | undefined;
1808
+ access?: "tailnet" | undefined;
1809
+ services?: Record<string, {
1810
+ port: number;
1811
+ startCommand: string;
1812
+ portSpan?: number | undefined;
1813
+ httpsPort?: number | undefined;
1814
+ }> | undefined;
1815
+ tailscaleBinary?: string | undefined;
1816
+ httpsPortRange?: [number, number] | undefined;
1817
+ } | undefined;
1818
+ verification?: {
1819
+ enabled?: boolean | undefined;
1820
+ descriptorPath?: string | undefined;
1821
+ maxConcurrentEnvironments?: number | undefined;
1822
+ maxRunTimeoutMs?: number | undefined;
1823
+ maxEnvironmentTtlMs?: number | undefined;
1824
+ maxTeardownTimeoutMs?: number | undefined;
1825
+ } | undefined;
1826
+ terminalState?: "done" | "human-review" | undefined;
1827
+ stateIds?: {
1828
+ readyForAgent?: string | undefined;
1829
+ agentImplementing?: string | undefined;
1830
+ inPlanning?: string | undefined;
1831
+ done?: string | undefined;
1832
+ humanReview?: string | undefined;
1833
+ } | undefined;
1834
+ safety?: {
1835
+ requireTitlePrefix?: string | undefined;
1836
+ requireLabel?: string | undefined;
1837
+ requireTeamKey?: string | undefined;
1838
+ } | undefined;
1839
+ environments?: {
1840
+ kubernetes?: {
1841
+ connections?: {
1842
+ id: string;
1843
+ credential: {
1844
+ kind: "kubeconfig" | "irsa";
1845
+ secretRef: string;
1846
+ };
1847
+ target?: "byoc" | "managed" | undefined;
1848
+ customers?: string[] | undefined;
1849
+ repositories?: string[] | undefined;
1850
+ context?: string | undefined;
1851
+ protectedNamespaces?: string[] | undefined;
1852
+ allowClusterScopedResources?: boolean | undefined;
1853
+ allowedClusterScopedKinds?: string[] | undefined;
1854
+ nodeSelector?: Record<string, string> | undefined;
1855
+ tolerations?: {
1856
+ key?: string | undefined;
1857
+ operator?: "Exists" | "Equal" | undefined;
1858
+ value?: string | undefined;
1859
+ effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute" | undefined;
1860
+ tolerationSeconds?: number | undefined;
1861
+ }[] | undefined;
1862
+ fidelityCaveat?: string | undefined;
1863
+ }[] | undefined;
1864
+ defaults?: {
1865
+ ttlMs?: number | undefined;
1866
+ readinessTimeoutMs?: number | undefined;
1867
+ resourceQuota?: Record<string, string> | undefined;
1868
+ limitRange?: {
1869
+ default?: Record<string, string> | undefined;
1870
+ max?: Record<string, string> | undefined;
1871
+ defaultRequest?: Record<string, string> | undefined;
1872
+ } | undefined;
1873
+ } | undefined;
1874
+ } | undefined;
1875
+ } | undefined;
1876
+ }>;
1877
+ export declare const NodeConfigSchema: z.ZodEffects<z.ZodObject<{
1878
+ workspaceId: z.ZodOptional<z.ZodString>;
1879
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1880
+ cloneRoot: z.ZodOptional<z.ZodString>;
1881
+ clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1882
+ dryRun: z.ZodDefault<z.ZodBoolean>;
1883
+ factoryLoopHeartbeatPath: z.ZodOptional<z.ZodString>;
1884
+ factoryLoopRegistryPath: z.ZodOptional<z.ZodString>;
1885
+ preview: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1886
+ provider: z.ZodDefault<z.ZodLiteral<"tailscale-serve">>;
1887
+ access: z.ZodDefault<z.ZodLiteral<"tailnet">>;
1888
+ services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
1889
+ /** Local HTTP port the repository's development server listens on. */
1890
+ port: z.ZodNumber;
1891
+ /** Consecutive node-local ports Factory may allocate for concurrent issues. */
1892
+ portSpan: z.ZodOptional<z.ZodNumber>;
1893
+ /** Optional stable tailnet HTTPS port; otherwise Factory allocates one. */
1894
+ httpsPort: z.ZodOptional<z.ZodNumber>;
1895
+ /** Foreground command Factory supervises for the issue-lifetime preview. */
1896
+ startCommand: z.ZodString;
1897
+ }, "strip", z.ZodTypeAny, {
1898
+ port: number;
1899
+ startCommand: string;
1900
+ portSpan?: number | undefined;
1901
+ httpsPort?: number | undefined;
1902
+ }, {
1903
+ port: number;
1904
+ startCommand: string;
1905
+ portSpan?: number | undefined;
1906
+ httpsPort?: number | undefined;
1907
+ }>, {
1908
+ port: number;
1909
+ startCommand: string;
1910
+ portSpan?: number | undefined;
1911
+ httpsPort?: number | undefined;
1912
+ }, {
1913
+ port: number;
1914
+ startCommand: string;
1915
+ portSpan?: number | undefined;
1916
+ httpsPort?: number | undefined;
1917
+ }>>>;
1918
+ tailscaleBinary: z.ZodDefault<z.ZodString>;
1919
+ registryPath: z.ZodDefault<z.ZodString>;
1920
+ httpsPortRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
1921
+ }, "strip", z.ZodTypeAny, {
1922
+ registryPath: string;
1923
+ provider: "tailscale-serve";
1924
+ access: "tailnet";
1925
+ services: Record<string, {
1926
+ port: number;
1927
+ startCommand: string;
1928
+ portSpan?: number | undefined;
1929
+ httpsPort?: number | undefined;
1930
+ }>;
1931
+ tailscaleBinary: string;
1932
+ httpsPortRange: [number, number];
1933
+ }, {
1934
+ registryPath?: string | undefined;
1935
+ provider?: "tailscale-serve" | undefined;
1936
+ access?: "tailnet" | undefined;
1937
+ services?: Record<string, {
1938
+ port: number;
1939
+ startCommand: string;
1940
+ portSpan?: number | undefined;
1941
+ httpsPort?: number | undefined;
1942
+ }> | undefined;
1943
+ tailscaleBinary?: string | undefined;
1944
+ httpsPortRange?: [number, number] | undefined;
1945
+ }>, {
1946
+ registryPath: string;
1947
+ provider: "tailscale-serve";
1948
+ access: "tailnet";
1949
+ services: Record<string, {
1950
+ port: number;
1951
+ startCommand: string;
1952
+ portSpan?: number | undefined;
1953
+ httpsPort?: number | undefined;
1954
+ }>;
1955
+ tailscaleBinary: string;
1956
+ httpsPortRange: [number, number];
1957
+ }, {
1958
+ registryPath?: string | undefined;
1959
+ provider?: "tailscale-serve" | undefined;
1960
+ access?: "tailnet" | undefined;
1961
+ services?: Record<string, {
1962
+ port: number;
1963
+ startCommand: string;
1964
+ portSpan?: number | undefined;
1965
+ httpsPort?: number | undefined;
1966
+ }> | undefined;
1967
+ tailscaleBinary?: string | undefined;
1968
+ httpsPortRange?: [number, number] | undefined;
1969
+ }>>;
1970
+ }, "strip", z.ZodTypeAny, {
1971
+ clonePaths: Record<string, string>;
1972
+ capabilities: string[];
1973
+ dryRun: boolean;
1974
+ cloneRoot?: string | undefined;
1975
+ workspaceId?: string | undefined;
1976
+ preview?: {
1977
+ registryPath: string;
1978
+ provider: "tailscale-serve";
1979
+ access: "tailnet";
1980
+ services: Record<string, {
1981
+ port: number;
1982
+ startCommand: string;
1983
+ portSpan?: number | undefined;
1984
+ httpsPort?: number | undefined;
1985
+ }>;
1986
+ tailscaleBinary: string;
1987
+ httpsPortRange: [number, number];
1988
+ } | undefined;
1989
+ factoryLoopHeartbeatPath?: string | undefined;
1990
+ factoryLoopRegistryPath?: string | undefined;
1991
+ }, {
1992
+ cloneRoot?: string | undefined;
1993
+ clonePaths?: Record<string, string> | undefined;
1994
+ workspaceId?: string | undefined;
1995
+ preview?: {
1996
+ registryPath?: string | undefined;
1997
+ provider?: "tailscale-serve" | undefined;
1998
+ access?: "tailnet" | undefined;
1999
+ services?: Record<string, {
2000
+ port: number;
2001
+ startCommand: string;
2002
+ portSpan?: number | undefined;
2003
+ httpsPort?: number | undefined;
2004
+ }> | undefined;
2005
+ tailscaleBinary?: string | undefined;
2006
+ httpsPortRange?: [number, number] | undefined;
2007
+ } | undefined;
2008
+ capabilities?: string[] | undefined;
2009
+ dryRun?: boolean | undefined;
2010
+ factoryLoopHeartbeatPath?: string | undefined;
2011
+ factoryLoopRegistryPath?: string | undefined;
2012
+ }>, {
2013
+ cloneRoot: string | undefined;
2014
+ clonePaths: Record<string, string>;
2015
+ factoryLoopHeartbeatPath: string | undefined;
2016
+ factoryLoopRegistryPath: string | undefined;
2017
+ preview: {
2018
+ registryPath: string;
2019
+ provider: "tailscale-serve";
2020
+ access: "tailnet";
2021
+ services: Record<string, {
2022
+ port: number;
2023
+ startCommand: string;
2024
+ portSpan?: number | undefined;
2025
+ httpsPort?: number | undefined;
2026
+ }>;
2027
+ tailscaleBinary: string;
2028
+ httpsPortRange: [number, number];
2029
+ } | undefined;
2030
+ capabilities: string[];
2031
+ dryRun: boolean;
2032
+ workspaceId?: string | undefined;
2033
+ }, {
2034
+ cloneRoot?: string | undefined;
2035
+ clonePaths?: Record<string, string> | undefined;
2036
+ workspaceId?: string | undefined;
2037
+ preview?: {
2038
+ registryPath?: string | undefined;
2039
+ provider?: "tailscale-serve" | undefined;
2040
+ access?: "tailnet" | undefined;
2041
+ services?: Record<string, {
2042
+ port: number;
2043
+ startCommand: string;
2044
+ portSpan?: number | undefined;
2045
+ httpsPort?: number | undefined;
2046
+ }> | undefined;
2047
+ tailscaleBinary?: string | undefined;
2048
+ httpsPortRange?: [number, number] | undefined;
2049
+ } | undefined;
2050
+ capabilities?: string[] | undefined;
2051
+ dryRun?: boolean | undefined;
2052
+ factoryLoopHeartbeatPath?: string | undefined;
2053
+ factoryLoopRegistryPath?: string | undefined;
2054
+ }>;
2055
+ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
2056
+ localMountRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2057
+ subscription: z.ZodDefault<z.ZodObject<{
2058
+ teams: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2059
+ projects: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2060
+ labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2061
+ assignees: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2062
+ }, "strip", z.ZodTypeAny, {
2063
+ teams: string[];
2064
+ projects: string[];
2065
+ labels: string[];
2066
+ assignees: string[];
2067
+ }, {
2068
+ teams?: string[] | undefined;
2069
+ projects?: string[] | undefined;
2070
+ labels?: string[] | undefined;
2071
+ assignees?: string[] | undefined;
2072
+ }>>;
2073
+ liveSubscription: z.ZodDefault<z.ZodObject<{
2074
+ transport: z.ZodDefault<z.ZodEnum<["subscribe-and-poll", "subscribe", "poll"]>>;
2075
+ pollIntervalMs: z.ZodDefault<z.ZodNumber>;
1701
2076
  eventLimit: z.ZodDefault<z.ZodNumber>;
1702
2077
  replaySkewMarginMs: z.ZodDefault<z.ZodNumber>;
1703
2078
  }, "strip", z.ZodTypeAny, {
@@ -1849,10 +2224,22 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
1849
2224
  mergePolicy: z.ZodDefault<z.ZodEnum<["never", "on-green-with-review"]>>;
1850
2225
  babysitter: z.ZodDefault<z.ZodObject<{
1851
2226
  enabled: z.ZodDefault<z.ZodBoolean>;
2227
+ mode: z.ZodDefault<z.ZodEnum<["factory-created", "routed-open-prs"]>>;
2228
+ excludeLabels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2229
+ excludePullRequests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2230
+ notifyHumans: z.ZodDefault<z.ZodBoolean>;
1852
2231
  }, "strip", z.ZodTypeAny, {
1853
2232
  enabled: boolean;
2233
+ mode: "factory-created" | "routed-open-prs";
2234
+ excludeLabels: string[];
2235
+ excludePullRequests: string[];
2236
+ notifyHumans: boolean;
1854
2237
  }, {
1855
2238
  enabled?: boolean | undefined;
2239
+ mode?: "factory-created" | "routed-open-prs" | undefined;
2240
+ excludeLabels?: string[] | undefined;
2241
+ excludePullRequests?: string[] | undefined;
2242
+ notifyHumans?: boolean | undefined;
1856
2243
  }>>;
1857
2244
  reporting: z.ZodDefault<z.ZodObject<{
1858
2245
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -2183,34 +2570,102 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2183
2570
  tolerationSeconds?: number | undefined;
2184
2571
  }[] | undefined;
2185
2572
  fidelityCaveat?: string | undefined;
2186
- }>, "many">>;
2187
- defaults: z.ZodDefault<z.ZodObject<{
2188
- ttlMs: z.ZodDefault<z.ZodNumber>;
2189
- readinessTimeoutMs: z.ZodDefault<z.ZodNumber>;
2190
- resourceQuota: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2191
- limitRange: z.ZodDefault<z.ZodObject<{
2192
- default: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2193
- defaultRequest: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2194
- max: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2195
- }, "strip", z.ZodTypeAny, {
2196
- default: Record<string, string>;
2197
- max: Record<string, string>;
2198
- defaultRequest: Record<string, string>;
2199
- }, {
2200
- default?: Record<string, string> | undefined;
2201
- max?: Record<string, string> | undefined;
2202
- defaultRequest?: Record<string, string> | undefined;
2203
- }>>;
2204
- }, "strict", z.ZodTypeAny, {
2205
- ttlMs: number;
2206
- readinessTimeoutMs: number;
2207
- resourceQuota: Record<string, string>;
2208
- limitRange: {
2209
- default: Record<string, string>;
2210
- max: Record<string, string>;
2211
- defaultRequest: Record<string, string>;
2212
- };
2213
- }, {
2573
+ }>, "many">>;
2574
+ defaults: z.ZodDefault<z.ZodObject<{
2575
+ ttlMs: z.ZodDefault<z.ZodNumber>;
2576
+ readinessTimeoutMs: z.ZodDefault<z.ZodNumber>;
2577
+ resourceQuota: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2578
+ limitRange: z.ZodDefault<z.ZodObject<{
2579
+ default: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2580
+ defaultRequest: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2581
+ max: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2582
+ }, "strip", z.ZodTypeAny, {
2583
+ default: Record<string, string>;
2584
+ max: Record<string, string>;
2585
+ defaultRequest: Record<string, string>;
2586
+ }, {
2587
+ default?: Record<string, string> | undefined;
2588
+ max?: Record<string, string> | undefined;
2589
+ defaultRequest?: Record<string, string> | undefined;
2590
+ }>>;
2591
+ }, "strict", z.ZodTypeAny, {
2592
+ ttlMs: number;
2593
+ readinessTimeoutMs: number;
2594
+ resourceQuota: Record<string, string>;
2595
+ limitRange: {
2596
+ default: Record<string, string>;
2597
+ max: Record<string, string>;
2598
+ defaultRequest: Record<string, string>;
2599
+ };
2600
+ }, {
2601
+ ttlMs?: number | undefined;
2602
+ readinessTimeoutMs?: number | undefined;
2603
+ resourceQuota?: Record<string, string> | undefined;
2604
+ limitRange?: {
2605
+ default?: Record<string, string> | undefined;
2606
+ max?: Record<string, string> | undefined;
2607
+ defaultRequest?: Record<string, string> | undefined;
2608
+ } | undefined;
2609
+ }>>;
2610
+ }, "strict", z.ZodTypeAny, {
2611
+ connections: {
2612
+ id: string;
2613
+ target: "byoc" | "managed";
2614
+ customers: string[];
2615
+ repositories: string[];
2616
+ credential: {
2617
+ kind: "kubeconfig" | "irsa";
2618
+ secretRef: string;
2619
+ };
2620
+ protectedNamespaces: string[];
2621
+ allowClusterScopedResources: boolean;
2622
+ allowedClusterScopedKinds: string[];
2623
+ nodeSelector: Record<string, string>;
2624
+ tolerations: {
2625
+ key?: string | undefined;
2626
+ operator?: "Exists" | "Equal" | undefined;
2627
+ value?: string | undefined;
2628
+ effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute" | undefined;
2629
+ tolerationSeconds?: number | undefined;
2630
+ }[];
2631
+ context?: string | undefined;
2632
+ fidelityCaveat?: string | undefined;
2633
+ }[];
2634
+ defaults: {
2635
+ ttlMs: number;
2636
+ readinessTimeoutMs: number;
2637
+ resourceQuota: Record<string, string>;
2638
+ limitRange: {
2639
+ default: Record<string, string>;
2640
+ max: Record<string, string>;
2641
+ defaultRequest: Record<string, string>;
2642
+ };
2643
+ };
2644
+ }, {
2645
+ connections?: {
2646
+ id: string;
2647
+ credential: {
2648
+ kind: "kubeconfig" | "irsa";
2649
+ secretRef: string;
2650
+ };
2651
+ target?: "byoc" | "managed" | undefined;
2652
+ customers?: string[] | undefined;
2653
+ repositories?: string[] | undefined;
2654
+ context?: string | undefined;
2655
+ protectedNamespaces?: string[] | undefined;
2656
+ allowClusterScopedResources?: boolean | undefined;
2657
+ allowedClusterScopedKinds?: string[] | undefined;
2658
+ nodeSelector?: Record<string, string> | undefined;
2659
+ tolerations?: {
2660
+ key?: string | undefined;
2661
+ operator?: "Exists" | "Equal" | undefined;
2662
+ value?: string | undefined;
2663
+ effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute" | undefined;
2664
+ tolerationSeconds?: number | undefined;
2665
+ }[] | undefined;
2666
+ fidelityCaveat?: string | undefined;
2667
+ }[] | undefined;
2668
+ defaults?: {
2214
2669
  ttlMs?: number | undefined;
2215
2670
  readinessTimeoutMs?: number | undefined;
2216
2671
  resourceQuota?: Record<string, string> | undefined;
@@ -2219,8 +2674,8 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2219
2674
  max?: Record<string, string> | undefined;
2220
2675
  defaultRequest?: Record<string, string> | undefined;
2221
2676
  } | undefined;
2222
- }>>;
2223
- }, "strict", z.ZodTypeAny, {
2677
+ } | undefined;
2678
+ }>, {
2224
2679
  connections: {
2225
2680
  id: string;
2226
2681
  target: "byoc" | "managed";
@@ -2288,7 +2743,9 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2288
2743
  defaultRequest?: Record<string, string> | undefined;
2289
2744
  } | undefined;
2290
2745
  } | undefined;
2291
- }>, {
2746
+ }>>>;
2747
+ }, "strict", z.ZodTypeAny, {
2748
+ kubernetes?: {
2292
2749
  connections: {
2293
2750
  id: string;
2294
2751
  target: "byoc" | "managed";
@@ -2322,7 +2779,9 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2322
2779
  defaultRequest: Record<string, string>;
2323
2780
  };
2324
2781
  };
2325
- }, {
2782
+ } | undefined;
2783
+ }, {
2784
+ kubernetes?: {
2326
2785
  connections?: {
2327
2786
  id: string;
2328
2787
  credential: {
@@ -2356,8 +2815,212 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2356
2815
  defaultRequest?: Record<string, string> | undefined;
2357
2816
  } | undefined;
2358
2817
  } | undefined;
2818
+ } | undefined;
2819
+ }>>;
2820
+ } & {
2821
+ workspaceId: z.ZodOptional<z.ZodString>;
2822
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2823
+ cloneRoot: z.ZodOptional<z.ZodString>;
2824
+ clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2825
+ dryRun: z.ZodDefault<z.ZodBoolean>;
2826
+ factoryLoopHeartbeatPath: z.ZodOptional<z.ZodString>;
2827
+ factoryLoopRegistryPath: z.ZodOptional<z.ZodString>;
2828
+ preview: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2829
+ provider: z.ZodDefault<z.ZodLiteral<"tailscale-serve">>;
2830
+ access: z.ZodDefault<z.ZodLiteral<"tailnet">>;
2831
+ services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
2832
+ /** Local HTTP port the repository's development server listens on. */
2833
+ port: z.ZodNumber;
2834
+ /** Consecutive node-local ports Factory may allocate for concurrent issues. */
2835
+ portSpan: z.ZodOptional<z.ZodNumber>;
2836
+ /** Optional stable tailnet HTTPS port; otherwise Factory allocates one. */
2837
+ httpsPort: z.ZodOptional<z.ZodNumber>;
2838
+ /** Foreground command Factory supervises for the issue-lifetime preview. */
2839
+ startCommand: z.ZodString;
2840
+ }, "strip", z.ZodTypeAny, {
2841
+ port: number;
2842
+ startCommand: string;
2843
+ portSpan?: number | undefined;
2844
+ httpsPort?: number | undefined;
2845
+ }, {
2846
+ port: number;
2847
+ startCommand: string;
2848
+ portSpan?: number | undefined;
2849
+ httpsPort?: number | undefined;
2850
+ }>, {
2851
+ port: number;
2852
+ startCommand: string;
2853
+ portSpan?: number | undefined;
2854
+ httpsPort?: number | undefined;
2855
+ }, {
2856
+ port: number;
2857
+ startCommand: string;
2858
+ portSpan?: number | undefined;
2859
+ httpsPort?: number | undefined;
2359
2860
  }>>>;
2360
- }, "strict", z.ZodTypeAny, {
2861
+ tailscaleBinary: z.ZodDefault<z.ZodString>;
2862
+ registryPath: z.ZodDefault<z.ZodString>;
2863
+ httpsPortRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
2864
+ }, "strip", z.ZodTypeAny, {
2865
+ registryPath: string;
2866
+ provider: "tailscale-serve";
2867
+ access: "tailnet";
2868
+ services: Record<string, {
2869
+ port: number;
2870
+ startCommand: string;
2871
+ portSpan?: number | undefined;
2872
+ httpsPort?: number | undefined;
2873
+ }>;
2874
+ tailscaleBinary: string;
2875
+ httpsPortRange: [number, number];
2876
+ }, {
2877
+ registryPath?: string | undefined;
2878
+ provider?: "tailscale-serve" | undefined;
2879
+ access?: "tailnet" | undefined;
2880
+ services?: Record<string, {
2881
+ port: number;
2882
+ startCommand: string;
2883
+ portSpan?: number | undefined;
2884
+ httpsPort?: number | undefined;
2885
+ }> | undefined;
2886
+ tailscaleBinary?: string | undefined;
2887
+ httpsPortRange?: [number, number] | undefined;
2888
+ }>, {
2889
+ registryPath: string;
2890
+ provider: "tailscale-serve";
2891
+ access: "tailnet";
2892
+ services: Record<string, {
2893
+ port: number;
2894
+ startCommand: string;
2895
+ portSpan?: number | undefined;
2896
+ httpsPort?: number | undefined;
2897
+ }>;
2898
+ tailscaleBinary: string;
2899
+ httpsPortRange: [number, number];
2900
+ }, {
2901
+ registryPath?: string | undefined;
2902
+ provider?: "tailscale-serve" | undefined;
2903
+ access?: "tailnet" | undefined;
2904
+ services?: Record<string, {
2905
+ port: number;
2906
+ startCommand: string;
2907
+ portSpan?: number | undefined;
2908
+ httpsPort?: number | undefined;
2909
+ }> | undefined;
2910
+ tailscaleBinary?: string | undefined;
2911
+ httpsPortRange?: [number, number] | undefined;
2912
+ }>>;
2913
+ }, "strip", z.ZodTypeAny, {
2914
+ clonePaths: Record<string, string>;
2915
+ triage: {
2916
+ maxImplementers: number;
2917
+ };
2918
+ babysitter: {
2919
+ enabled: boolean;
2920
+ mode: "factory-created" | "routed-open-prs";
2921
+ excludeLabels: string[];
2922
+ excludePullRequests: string[];
2923
+ notifyHumans: boolean;
2924
+ };
2925
+ batchSize: number;
2926
+ subscription: {
2927
+ teams: string[];
2928
+ projects: string[];
2929
+ labels: string[];
2930
+ assignees: string[];
2931
+ };
2932
+ liveSubscription: {
2933
+ transport: "subscribe-and-poll" | "subscribe" | "poll";
2934
+ pollIntervalMs: number;
2935
+ eventLimit: number;
2936
+ replaySkewMarginMs: number;
2937
+ };
2938
+ dispatch: {
2939
+ errorCooldownMs: number;
2940
+ maxAttempts: number;
2941
+ };
2942
+ loop: {
2943
+ maxIterations: number;
2944
+ maxConsecutiveFailures: number;
2945
+ heartbeatPath: string;
2946
+ registryPath: string;
2947
+ heartbeatStaleMs: number;
2948
+ };
2949
+ repos: {
2950
+ overrides: Record<string, string>;
2951
+ byLabel: Record<string, string>;
2952
+ byProject: Record<string, string>;
2953
+ keywordRules: {
2954
+ pattern: string;
2955
+ repo: string;
2956
+ }[];
2957
+ clonePaths: Record<string, string>;
2958
+ default?: string | undefined;
2959
+ org?: string | undefined;
2960
+ names?: string[] | undefined;
2961
+ cloneRoot?: string | undefined;
2962
+ };
2963
+ models: {
2964
+ babysitter: string;
2965
+ implementer?: string | undefined;
2966
+ reviewer?: string | undefined;
2967
+ triage?: string | undefined;
2968
+ };
2969
+ agentCapabilities: {
2970
+ implementer: "spawn:codex" | "spawn:claude";
2971
+ reviewer: "spawn:codex" | "spawn:claude";
2972
+ babysitter: "spawn:codex" | "spawn:claude";
2973
+ };
2974
+ linear: {
2975
+ states: {
2976
+ readyForAgent?: string | undefined;
2977
+ agentImplementing?: string | undefined;
2978
+ inPlanning?: string | undefined;
2979
+ done?: string | undefined;
2980
+ humanReview?: string | undefined;
2981
+ };
2982
+ statesByTeam: Record<string, {
2983
+ readyForAgent?: string | undefined;
2984
+ agentImplementing?: string | undefined;
2985
+ inPlanning?: string | undefined;
2986
+ done?: string | undefined;
2987
+ humanReview?: string | undefined;
2988
+ }>;
2989
+ teamIds: Record<string, string>;
2990
+ };
2991
+ github: {
2992
+ identity: "app" | "user" | "auto";
2993
+ };
2994
+ mergePolicy: "never" | "on-green-with-review";
2995
+ reporting: {
2996
+ enabled: boolean;
2997
+ batchSize: number;
2998
+ requestTimeoutMs: number;
2999
+ instanceName?: string | undefined;
3000
+ outboxPath?: string | undefined;
3001
+ };
3002
+ verification: {
3003
+ enabled: boolean;
3004
+ descriptorPath: string;
3005
+ maxConcurrentEnvironments: number;
3006
+ maxRunTimeoutMs: number;
3007
+ maxEnvironmentTtlMs: number;
3008
+ maxTeardownTimeoutMs: number;
3009
+ };
3010
+ terminalState: "done" | "human-review";
3011
+ stateIds: {
3012
+ readyForAgent?: string | undefined;
3013
+ agentImplementing?: string | undefined;
3014
+ inPlanning?: string | undefined;
3015
+ done?: string | undefined;
3016
+ humanReview?: string | undefined;
3017
+ };
3018
+ safety: {
3019
+ requireTitlePrefix: string;
3020
+ requireLabel: string;
3021
+ requireTeamKey: string;
3022
+ };
3023
+ environments: {
2361
3024
  kubernetes?: {
2362
3025
  connections: {
2363
3026
  id: string;
@@ -2393,7 +3056,172 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2393
3056
  };
2394
3057
  };
2395
3058
  } | undefined;
2396
- }, {
3059
+ };
3060
+ capabilities: string[];
3061
+ dryRun: boolean;
3062
+ cloneRoot?: string | undefined;
3063
+ workspaceId?: string | undefined;
3064
+ localMountRoot?: string | undefined;
3065
+ slack?: {
3066
+ channel: string;
3067
+ style: "threaded-summarized";
3068
+ botUserId: string;
3069
+ stakeholderUserIds: string[];
3070
+ staleAfterMs: number;
3071
+ conversationCoalesceMs: number;
3072
+ } | undefined;
3073
+ issueSource?: "linear" | "github" | undefined;
3074
+ preview?: {
3075
+ registryPath: string;
3076
+ provider: "tailscale-serve";
3077
+ access: "tailnet";
3078
+ services: Record<string, {
3079
+ port: number;
3080
+ startCommand: string;
3081
+ portSpan?: number | undefined;
3082
+ httpsPort?: number | undefined;
3083
+ }>;
3084
+ tailscaleBinary: string;
3085
+ httpsPortRange: [number, number];
3086
+ } | undefined;
3087
+ factoryLoopHeartbeatPath?: string | undefined;
3088
+ factoryLoopRegistryPath?: string | undefined;
3089
+ }, {
3090
+ repos: {
3091
+ default?: string | undefined;
3092
+ org?: string | undefined;
3093
+ names?: string[] | undefined;
3094
+ overrides?: Record<string, string> | undefined;
3095
+ byLabel?: Record<string, string> | undefined;
3096
+ byProject?: Record<string, string> | undefined;
3097
+ keywordRules?: {
3098
+ pattern: string;
3099
+ repo: string;
3100
+ }[] | undefined;
3101
+ cloneRoot?: string | undefined;
3102
+ clonePaths?: Record<string, string> | undefined;
3103
+ };
3104
+ cloneRoot?: string | undefined;
3105
+ clonePaths?: Record<string, string> | undefined;
3106
+ triage?: {
3107
+ maxImplementers?: number | undefined;
3108
+ } | undefined;
3109
+ babysitter?: {
3110
+ enabled?: boolean | undefined;
3111
+ mode?: "factory-created" | "routed-open-prs" | undefined;
3112
+ excludeLabels?: string[] | undefined;
3113
+ excludePullRequests?: string[] | undefined;
3114
+ notifyHumans?: boolean | undefined;
3115
+ } | undefined;
3116
+ batchSize?: number | undefined;
3117
+ workspaceId?: string | undefined;
3118
+ localMountRoot?: string | undefined;
3119
+ subscription?: {
3120
+ teams?: string[] | undefined;
3121
+ projects?: string[] | undefined;
3122
+ labels?: string[] | undefined;
3123
+ assignees?: string[] | undefined;
3124
+ } | undefined;
3125
+ liveSubscription?: {
3126
+ transport?: "subscribe-and-poll" | "subscribe" | "poll" | undefined;
3127
+ pollIntervalMs?: number | undefined;
3128
+ eventLimit?: number | undefined;
3129
+ replaySkewMarginMs?: number | undefined;
3130
+ } | undefined;
3131
+ dispatch?: {
3132
+ errorCooldownMs?: number | undefined;
3133
+ maxAttempts?: number | undefined;
3134
+ } | undefined;
3135
+ loop?: {
3136
+ maxIterations?: number | undefined;
3137
+ maxConsecutiveFailures?: number | undefined;
3138
+ heartbeatPath?: string | undefined;
3139
+ registryPath?: string | undefined;
3140
+ heartbeatStaleMs?: number | undefined;
3141
+ } | undefined;
3142
+ models?: {
3143
+ implementer?: string | undefined;
3144
+ reviewer?: string | undefined;
3145
+ triage?: string | undefined;
3146
+ babysitter?: string | undefined;
3147
+ } | undefined;
3148
+ agentCapabilities?: {
3149
+ implementer?: "spawn:codex" | "spawn:claude" | undefined;
3150
+ reviewer?: "spawn:codex" | "spawn:claude" | undefined;
3151
+ babysitter?: "spawn:codex" | "spawn:claude" | undefined;
3152
+ } | undefined;
3153
+ slack?: {
3154
+ channel: string;
3155
+ style?: "threaded-summarized" | undefined;
3156
+ botUserId?: string | undefined;
3157
+ stakeholderUserIds?: string[] | undefined;
3158
+ staleAfterMs?: number | undefined;
3159
+ conversationCoalesceMs?: number | undefined;
3160
+ } | undefined;
3161
+ linear?: {
3162
+ states?: {
3163
+ readyForAgent?: string | undefined;
3164
+ agentImplementing?: string | undefined;
3165
+ inPlanning?: string | undefined;
3166
+ done?: string | undefined;
3167
+ humanReview?: string | undefined;
3168
+ } | undefined;
3169
+ statesByTeam?: Record<string, {
3170
+ readyForAgent?: string | undefined;
3171
+ agentImplementing?: string | undefined;
3172
+ inPlanning?: string | undefined;
3173
+ done?: string | undefined;
3174
+ humanReview?: string | undefined;
3175
+ } | undefined> | undefined;
3176
+ teamIds?: Record<string, string> | undefined;
3177
+ } | undefined;
3178
+ github?: {
3179
+ identity?: "app" | "user" | "auto" | undefined;
3180
+ } | undefined;
3181
+ issueSource?: "linear" | "github" | undefined;
3182
+ mergePolicy?: "never" | "on-green-with-review" | undefined;
3183
+ reporting?: {
3184
+ enabled?: boolean | undefined;
3185
+ instanceName?: string | undefined;
3186
+ outboxPath?: string | undefined;
3187
+ batchSize?: number | undefined;
3188
+ requestTimeoutMs?: number | undefined;
3189
+ } | undefined;
3190
+ preview?: {
3191
+ registryPath?: string | undefined;
3192
+ provider?: "tailscale-serve" | undefined;
3193
+ access?: "tailnet" | undefined;
3194
+ services?: Record<string, {
3195
+ port: number;
3196
+ startCommand: string;
3197
+ portSpan?: number | undefined;
3198
+ httpsPort?: number | undefined;
3199
+ }> | undefined;
3200
+ tailscaleBinary?: string | undefined;
3201
+ httpsPortRange?: [number, number] | undefined;
3202
+ } | undefined;
3203
+ verification?: {
3204
+ enabled?: boolean | undefined;
3205
+ descriptorPath?: string | undefined;
3206
+ maxConcurrentEnvironments?: number | undefined;
3207
+ maxRunTimeoutMs?: number | undefined;
3208
+ maxEnvironmentTtlMs?: number | undefined;
3209
+ maxTeardownTimeoutMs?: number | undefined;
3210
+ } | undefined;
3211
+ terminalState?: "done" | "human-review" | undefined;
3212
+ stateIds?: {
3213
+ readyForAgent?: string | undefined;
3214
+ agentImplementing?: string | undefined;
3215
+ inPlanning?: string | undefined;
3216
+ done?: string | undefined;
3217
+ humanReview?: string | undefined;
3218
+ } | undefined;
3219
+ safety?: {
3220
+ requireTitlePrefix?: string | undefined;
3221
+ requireLabel?: string | undefined;
3222
+ requireTeamKey?: string | undefined;
3223
+ } | undefined;
3224
+ environments?: {
2397
3225
  kubernetes?: {
2398
3226
  connections?: {
2399
3227
  id: string;
@@ -2429,107 +3257,22 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2429
3257
  } | undefined;
2430
3258
  } | undefined;
2431
3259
  } | undefined;
2432
- }>>;
2433
- } & {
2434
- workspaceId: z.ZodOptional<z.ZodString>;
2435
- capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2436
- cloneRoot: z.ZodOptional<z.ZodString>;
2437
- clonePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2438
- dryRun: z.ZodDefault<z.ZodBoolean>;
2439
- factoryLoopHeartbeatPath: z.ZodOptional<z.ZodString>;
2440
- factoryLoopRegistryPath: z.ZodOptional<z.ZodString>;
2441
- preview: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2442
- provider: z.ZodDefault<z.ZodLiteral<"tailscale-serve">>;
2443
- access: z.ZodDefault<z.ZodLiteral<"tailnet">>;
2444
- services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
2445
- /** Local HTTP port the repository's development server listens on. */
2446
- port: z.ZodNumber;
2447
- /** Consecutive node-local ports Factory may allocate for concurrent issues. */
2448
- portSpan: z.ZodOptional<z.ZodNumber>;
2449
- /** Optional stable tailnet HTTPS port; otherwise Factory allocates one. */
2450
- httpsPort: z.ZodOptional<z.ZodNumber>;
2451
- /** Foreground command Factory supervises for the issue-lifetime preview. */
2452
- startCommand: z.ZodString;
2453
- }, "strip", z.ZodTypeAny, {
2454
- port: number;
2455
- startCommand: string;
2456
- portSpan?: number | undefined;
2457
- httpsPort?: number | undefined;
2458
- }, {
2459
- port: number;
2460
- startCommand: string;
2461
- portSpan?: number | undefined;
2462
- httpsPort?: number | undefined;
2463
- }>, {
2464
- port: number;
2465
- startCommand: string;
2466
- portSpan?: number | undefined;
2467
- httpsPort?: number | undefined;
2468
- }, {
2469
- port: number;
2470
- startCommand: string;
2471
- portSpan?: number | undefined;
2472
- httpsPort?: number | undefined;
2473
- }>>>;
2474
- tailscaleBinary: z.ZodDefault<z.ZodString>;
2475
- registryPath: z.ZodDefault<z.ZodString>;
2476
- httpsPortRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
2477
- }, "strip", z.ZodTypeAny, {
2478
- registryPath: string;
2479
- provider: "tailscale-serve";
2480
- access: "tailnet";
2481
- services: Record<string, {
2482
- port: number;
2483
- startCommand: string;
2484
- portSpan?: number | undefined;
2485
- httpsPort?: number | undefined;
2486
- }>;
2487
- tailscaleBinary: string;
2488
- httpsPortRange: [number, number];
2489
- }, {
2490
- registryPath?: string | undefined;
2491
- provider?: "tailscale-serve" | undefined;
2492
- access?: "tailnet" | undefined;
2493
- services?: Record<string, {
2494
- port: number;
2495
- startCommand: string;
2496
- portSpan?: number | undefined;
2497
- httpsPort?: number | undefined;
2498
- }> | undefined;
2499
- tailscaleBinary?: string | undefined;
2500
- httpsPortRange?: [number, number] | undefined;
2501
- }>, {
2502
- registryPath: string;
2503
- provider: "tailscale-serve";
2504
- access: "tailnet";
2505
- services: Record<string, {
2506
- port: number;
2507
- startCommand: string;
2508
- portSpan?: number | undefined;
2509
- httpsPort?: number | undefined;
2510
- }>;
2511
- tailscaleBinary: string;
2512
- httpsPortRange: [number, number];
2513
- }, {
2514
- registryPath?: string | undefined;
2515
- provider?: "tailscale-serve" | undefined;
2516
- access?: "tailnet" | undefined;
2517
- services?: Record<string, {
2518
- port: number;
2519
- startCommand: string;
2520
- portSpan?: number | undefined;
2521
- httpsPort?: number | undefined;
2522
- }> | undefined;
2523
- tailscaleBinary?: string | undefined;
2524
- httpsPortRange?: [number, number] | undefined;
2525
- }>>;
2526
- }, "strip", z.ZodTypeAny, {
3260
+ } | undefined;
3261
+ capabilities?: string[] | undefined;
3262
+ dryRun?: boolean | undefined;
3263
+ factoryLoopHeartbeatPath?: string | undefined;
3264
+ factoryLoopRegistryPath?: string | undefined;
3265
+ }>, {
2527
3266
  clonePaths: Record<string, string>;
2528
3267
  triage: {
2529
3268
  maxImplementers: number;
2530
3269
  };
2531
3270
  babysitter: {
2532
3271
  enabled: boolean;
3272
+ mode: "factory-created" | "routed-open-prs";
3273
+ excludeLabels: string[];
3274
+ excludePullRequests: string[];
3275
+ notifyHumans: boolean;
2533
3276
  };
2534
3277
  batchSize: number;
2535
3278
  subscription: {
@@ -2670,6 +3413,7 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2670
3413
  dryRun: boolean;
2671
3414
  cloneRoot?: string | undefined;
2672
3415
  workspaceId?: string | undefined;
3416
+ localMountRoot?: string | undefined;
2673
3417
  slack?: {
2674
3418
  channel: string;
2675
3419
  style: "threaded-summarized";
@@ -2716,9 +3460,14 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2716
3460
  } | undefined;
2717
3461
  babysitter?: {
2718
3462
  enabled?: boolean | undefined;
3463
+ mode?: "factory-created" | "routed-open-prs" | undefined;
3464
+ excludeLabels?: string[] | undefined;
3465
+ excludePullRequests?: string[] | undefined;
3466
+ notifyHumans?: boolean | undefined;
2719
3467
  } | undefined;
2720
3468
  batchSize?: number | undefined;
2721
3469
  workspaceId?: string | undefined;
3470
+ localMountRoot?: string | undefined;
2722
3471
  subscription?: {
2723
3472
  teams?: string[] | undefined;
2724
3473
  projects?: string[] | undefined;
@@ -2919,6 +3668,10 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
2919
3668
  };
2920
3669
  babysitter: {
2921
3670
  enabled: boolean;
3671
+ mode: "factory-created" | "routed-open-prs";
3672
+ excludeLabels: string[];
3673
+ excludePullRequests: string[];
3674
+ notifyHumans: boolean;
2922
3675
  };
2923
3676
  batchSize: number;
2924
3677
  liveSubscription: {
@@ -3031,6 +3784,7 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
3031
3784
  capabilities: string[];
3032
3785
  dryRun: boolean;
3033
3786
  workspaceId?: string | undefined;
3787
+ localMountRoot?: string | undefined;
3034
3788
  slack?: {
3035
3789
  channel: string;
3036
3790
  style: "threaded-summarized";
@@ -3062,9 +3816,14 @@ export declare const FactoryConfigSchema: z.ZodEffects<z.ZodObject<{
3062
3816
  } | undefined;
3063
3817
  babysitter?: {
3064
3818
  enabled?: boolean | undefined;
3819
+ mode?: "factory-created" | "routed-open-prs" | undefined;
3820
+ excludeLabels?: string[] | undefined;
3821
+ excludePullRequests?: string[] | undefined;
3822
+ notifyHumans?: boolean | undefined;
3065
3823
  } | undefined;
3066
3824
  batchSize?: number | undefined;
3067
3825
  workspaceId?: string | undefined;
3826
+ localMountRoot?: string | undefined;
3068
3827
  subscription?: {
3069
3828
  teams?: string[] | undefined;
3070
3829
  projects?: string[] | undefined;