@fabrika/builder 0.9.0-dev.13 → 0.9.0-dev.15

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 (101) hide show
  1. package/BUILD-CONTRACT.md +9 -3
  2. package/README.md +39 -9
  3. package/cli/src/bin.ts +14 -1
  4. package/cli/src/build-review.ts +66 -0
  5. package/cli/src/build-status.ts +41 -3
  6. package/cli/src/catalog.ts +34 -2
  7. package/cli/src/commands/advance.ts +48 -6
  8. package/cli/src/commands/build.ts +152 -15
  9. package/cli/src/commands/design.ts +34 -0
  10. package/cli/src/commands/flows.ts +32 -0
  11. package/cli/src/commands/induce.ts +2 -2
  12. package/cli/src/commands/init.ts +7 -1
  13. package/cli/src/commands/next.ts +9 -2
  14. package/cli/src/context.ts +2 -1
  15. package/cli/src/contrast.ts +301 -0
  16. package/cli/src/daemon-client.ts +29 -3
  17. package/cli/src/design-review.ts +261 -0
  18. package/cli/src/flows.ts +162 -0
  19. package/cli/src/frontmatter.ts +32 -0
  20. package/cli/src/index.ts +10 -1
  21. package/cli/src/induce.ts +61 -3
  22. package/cli/src/issues.ts +15 -29
  23. package/cli/src/layout.ts +5 -2
  24. package/cli/src/packet.ts +36 -3
  25. package/cli/src/phase-state.ts +19 -1
  26. package/cli/src/verify.ts +50 -0
  27. package/daemon/src/admission.ts +1 -0
  28. package/daemon/src/handlers.ts +32 -6
  29. package/daemon/src/phases.ts +7 -109
  30. package/daemon/src/platform-source.ts +8 -0
  31. package/decisions/README.md +2 -2
  32. package/decisions/patterns/cf-contract-app.md +57 -0
  33. package/decisions/technologies/bun.md +2 -1
  34. package/decisions/technologies/cf-fabrika-contract.md +45 -0
  35. package/decisions/technologies/cloudflare.md +3 -1
  36. package/decisions/technologies/oblaka.md +1 -1
  37. package/decisions/technologies/opice.md +1 -1
  38. package/decisions/technologies/react.md +1 -1
  39. package/decisions/technologies/tailwind.md +5 -5
  40. package/decisions/technologies/zerops-fabrika-auth.md +1 -1
  41. package/decisions/technologies/zerops-platform.md +1 -1
  42. package/package.json +11 -8
  43. package/shared/approvals.ts +65 -0
  44. package/shared/derive.ts +189 -0
  45. package/shared/gate.ts +20 -0
  46. package/shared/index.ts +6 -1
  47. package/shared/phases.ts +22 -20
  48. package/skill/SKILL.md +25 -16
  49. package/skill/agents/build-orchestrator.md +28 -8
  50. package/skill/agents/flows-author.md +27 -13
  51. package/skill/agents/implementer.md +3 -1
  52. package/skill/agents/opice-skeleton-author.md +8 -7
  53. package/skill/gates/brief.jsx +26 -5
  54. package/skill/gates/review-grid.jsx +3 -8
  55. package/skill/gates/tech.jsx +3 -3
  56. package/stacks/README.md +8 -2
  57. package/stacks/cf-app.md +60 -0
  58. package/stacks/cf-fat.md +1 -0
  59. package/stacks/cf-internal-app.md +2 -2
  60. package/stacks/cf-lightweight.md +3 -2
  61. package/stacks/contember-app.md +1 -0
  62. package/stacks/content-site.md +1 -0
  63. package/stacks/zerops-app.md +1 -0
  64. package/types/cli/src/bin.d.ts +1 -1
  65. package/types/cli/src/build-review.d.ts +13 -0
  66. package/types/cli/src/build-status.d.ts +16 -1
  67. package/types/cli/src/catalog.d.ts +9 -0
  68. package/types/cli/src/commands/design.d.ts +1 -0
  69. package/types/cli/src/commands/flows.d.ts +1 -0
  70. package/types/cli/src/contrast.d.ts +59 -0
  71. package/types/cli/src/daemon-client.d.ts +13 -2
  72. package/types/cli/src/design-review.d.ts +54 -0
  73. package/types/cli/src/flows.d.ts +28 -0
  74. package/types/cli/src/frontmatter.d.ts +8 -0
  75. package/types/cli/src/index.d.ts +1 -1
  76. package/types/cli/src/induce.d.ts +3 -0
  77. package/types/cli/src/issues.d.ts +4 -0
  78. package/types/cli/src/packet.d.ts +9 -1
  79. package/types/cli/src/phase-state.d.ts +1 -1
  80. package/types/cli/src/verify.d.ts +18 -0
  81. package/types/daemon/src/phases.d.ts +4 -16
  82. package/types/daemon/src/platform-remote.d.ts +6 -2
  83. package/types/shared/approvals.d.ts +32 -0
  84. package/types/shared/derive.d.ts +41 -0
  85. package/types/shared/gate.d.ts +11 -0
  86. package/types/shared/index.d.ts +108 -68
  87. package/types/shared/phases.d.ts +7 -1
  88. package/ui/dist/assets/annotations-runtime.js +1 -1
  89. package/ui/dist/assets/client.css +1 -1
  90. package/ui/dist/assets/client.hm9vx5ay.js +120 -0
  91. package/ui/dist/assets/components.js +57 -57
  92. package/ui/dist/assets/preact-compat.js +1 -1
  93. package/ui/dist/assets/runtime.js +1 -1
  94. package/ui/dist/index.html +1 -1
  95. package/cli/src/derive.ts +0 -105
  96. package/skill/gates/build.jsx +0 -20
  97. package/skill/gates/design.jsx +0 -22
  98. package/skill/gates/flows.jsx +0 -14
  99. package/skill/gates/vision.jsx +0 -27
  100. package/types/cli/src/derive.d.ts +0 -17
  101. package/ui/dist/assets/client.cemdw2n8.js +0 -214
@@ -69,38 +69,50 @@ export interface BuilderErrorResponse {
69
69
  };
70
70
  }
71
71
  export declare const phaseStateSchema: z.ZodObject<{
72
- current: z.ZodEnum<["intake", "vision", "flows", "tech", "design", "skeletons", "issues", "build"]>;
72
+ current: z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>;
73
73
  index: z.ZodUnion<[z.ZodNumber, z.ZodNaN]>;
74
- completed: z.ZodArray<z.ZodEnum<["intake", "vision", "flows", "tech", "design", "skeletons", "issues", "build"]>, "many">;
74
+ completed: z.ZodArray<z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>, "many">;
75
75
  reads: z.ZodArray<z.ZodString, "many">;
76
76
  produces: z.ZodArray<z.ZodString, "many">;
77
77
  gate: z.ZodBoolean;
78
78
  satisfied: z.ZodBoolean;
79
+ verdicts: z.ZodCatch<z.ZodRecord<z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>, z.ZodEnum<["approve", "changes", "none"]>>>;
80
+ unverified: z.ZodCatch<z.ZodArray<z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>, "many">>;
81
+ stale: z.ZodCatch<z.ZodArray<z.ZodString, "many">>;
79
82
  }, "strip", z.ZodTypeAny, {
80
83
  reads: string[];
81
84
  produces: string[];
82
85
  gate: boolean;
83
86
  index: number;
84
- completed: ("intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build")[];
85
- current: "intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build";
87
+ completed: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
88
+ current: "intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build";
89
+ unverified: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
86
90
  satisfied: boolean;
91
+ verdicts: Partial<Record<"intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build", "approve" | "changes" | "none">>;
92
+ stale: string[];
87
93
  }, {
88
94
  reads: string[];
89
95
  produces: string[];
90
96
  gate: boolean;
91
97
  index: number;
92
- completed: ("intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build")[];
93
- current: "intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build";
98
+ completed: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
99
+ current: "intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build";
94
100
  satisfied: boolean;
101
+ unverified?: unknown;
102
+ verdicts?: unknown;
103
+ stale?: unknown;
95
104
  }>;
96
105
  export declare const uiPhaseStateSchema: z.ZodEffects<z.ZodObject<{
97
- current: z.ZodEnum<["intake", "vision", "flows", "tech", "design", "skeletons", "issues", "build"]>;
106
+ current: z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>;
98
107
  index: z.ZodUnion<[z.ZodNumber, z.ZodNaN]>;
99
- completed: z.ZodArray<z.ZodEnum<["intake", "vision", "flows", "tech", "design", "skeletons", "issues", "build"]>, "many">;
108
+ completed: z.ZodArray<z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>, "many">;
100
109
  reads: z.ZodArray<z.ZodString, "many">;
101
110
  produces: z.ZodArray<z.ZodString, "many">;
102
111
  gate: z.ZodBoolean;
103
112
  satisfied: z.ZodBoolean;
113
+ verdicts: z.ZodCatch<z.ZodRecord<z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>, z.ZodEnum<["approve", "changes", "none"]>>>;
114
+ unverified: z.ZodCatch<z.ZodArray<z.ZodEnum<["intake", "vision", "flows", "tech", "skeletons", "issues", "build"]>, "many">>;
115
+ stale: z.ZodCatch<z.ZodArray<z.ZodString, "many">>;
104
116
  } & {
105
117
  gateName: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
106
118
  }, "strip", z.ZodTypeAny, {
@@ -108,18 +120,24 @@ export declare const uiPhaseStateSchema: z.ZodEffects<z.ZodObject<{
108
120
  produces: string[];
109
121
  gate: boolean;
110
122
  index: number;
111
- completed: ("intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build")[];
112
- current: "intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build";
123
+ completed: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
124
+ current: "intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build";
125
+ unverified: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
113
126
  satisfied: boolean;
127
+ verdicts: Partial<Record<"intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build", "approve" | "changes" | "none">>;
128
+ stale: string[];
114
129
  gateName?: string | null | undefined;
115
130
  }, {
116
131
  reads: string[];
117
132
  produces: string[];
118
133
  gate: boolean;
119
134
  index: number;
120
- completed: ("intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build")[];
121
- current: "intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build";
135
+ completed: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
136
+ current: "intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build";
122
137
  satisfied: boolean;
138
+ unverified?: unknown;
139
+ verdicts?: unknown;
140
+ stale?: unknown;
123
141
  gateName?: unknown;
124
142
  }>, {
125
143
  gateName?: string | null | undefined;
@@ -127,17 +145,23 @@ export declare const uiPhaseStateSchema: z.ZodEffects<z.ZodObject<{
127
145
  produces: string[];
128
146
  gate: boolean;
129
147
  index: number;
130
- completed: ("intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build")[];
131
- current: "intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build";
148
+ completed: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
149
+ current: "intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build";
150
+ unverified: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
132
151
  satisfied: boolean;
152
+ verdicts: Partial<Record<"intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build", "approve" | "changes" | "none">>;
153
+ stale: string[];
133
154
  }, {
134
155
  reads: string[];
135
156
  produces: string[];
136
157
  gate: boolean;
137
158
  index: number;
138
- completed: ("intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build")[];
139
- current: "intake" | "vision" | "flows" | "tech" | "design" | "skeletons" | "issues" | "build";
159
+ completed: ("intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build")[];
160
+ current: "intake" | "vision" | "flows" | "tech" | "skeletons" | "issues" | "build";
140
161
  satisfied: boolean;
162
+ unverified?: unknown;
163
+ verdicts?: unknown;
164
+ stale?: unknown;
141
165
  gateName?: unknown;
142
166
  }>;
143
167
  export declare const healthInfoSchema: z.ZodEffects<z.ZodObject<{
@@ -212,21 +236,21 @@ export declare const builderPlatformErrorSchema: z.ZodObject<{
212
236
  code: z.ZodLiteral<"builder_platform">;
213
237
  message: z.ZodString;
214
238
  }, "strip", z.ZodTypeAny, {
215
- message: string;
216
239
  code: "builder_platform";
217
- }, {
218
240
  message: string;
241
+ }, {
219
242
  code: "builder_platform";
243
+ message: string;
220
244
  }>;
221
245
  }, "strip", z.ZodTypeAny, {
222
246
  error: {
223
- message: string;
224
247
  code: "builder_platform";
248
+ message: string;
225
249
  };
226
250
  }, {
227
251
  error: {
228
- message: string;
229
252
  code: "builder_platform";
253
+ message: string;
230
254
  };
231
255
  }>;
232
256
  export declare const planResultSchema: z.ZodEffects<z.ZodObject<{
@@ -241,21 +265,21 @@ export declare const planResultSchema: z.ZodEffects<z.ZodObject<{
241
265
  }, "strip", z.ZodTypeAny, {
242
266
  ok: boolean;
243
267
  gate?: string | undefined;
268
+ revision?: number | undefined;
244
269
  error?: string | undefined;
270
+ errors?: Record<string, string> | undefined;
245
271
  browserUrl?: string | undefined;
246
- revision?: number | undefined;
247
272
  isNew?: boolean | undefined;
248
273
  canvasFiles?: string[] | undefined;
249
- errors?: Record<string, string> | undefined;
250
274
  }, {
251
275
  ok: boolean;
252
276
  gate?: unknown;
277
+ revision?: unknown;
253
278
  error?: unknown;
279
+ errors?: unknown;
254
280
  browserUrl?: unknown;
255
- revision?: unknown;
256
281
  isNew?: unknown;
257
282
  canvasFiles?: unknown;
258
- errors?: unknown;
259
283
  }>, {
260
284
  errors?: Record<string, string> | undefined;
261
285
  error?: string | undefined;
@@ -268,12 +292,12 @@ export declare const planResultSchema: z.ZodEffects<z.ZodObject<{
268
292
  }, {
269
293
  ok: boolean;
270
294
  gate?: unknown;
295
+ revision?: unknown;
271
296
  error?: unknown;
297
+ errors?: unknown;
272
298
  browserUrl?: unknown;
273
- revision?: unknown;
274
299
  isNew?: unknown;
275
300
  canvasFiles?: unknown;
276
- errors?: unknown;
277
301
  }>;
278
302
  export declare const buildEventSchema: z.ZodEffects<z.ZodObject<{
279
303
  status: z.ZodEnum<["queued", "running", "passed", "failed", "blocked", "info"]>;
@@ -335,15 +359,31 @@ export declare const feedbackTextSchema: z.ZodObject<{
335
359
  }, {
336
360
  feedback?: unknown;
337
361
  }>;
362
+ export declare const consumedGateSchema: z.ZodObject<{
363
+ found: z.ZodLiteral<true>;
364
+ revision: z.ZodNumber;
365
+ verdict: z.ZodCatch<z.ZodEnum<["approve", "changes", "none"]>>;
366
+ }, "strip", z.ZodTypeAny, {
367
+ revision: number;
368
+ verdict: "approve" | "changes" | "none";
369
+ found: true;
370
+ }, {
371
+ revision: number;
372
+ found: true;
373
+ verdict?: unknown;
374
+ }>;
338
375
  export declare const consumedFeedbackSchema: z.ZodObject<{
339
376
  feedback: z.ZodCatch<z.ZodString>;
340
377
  } & {
341
378
  found: z.ZodLiteral<true>;
379
+ verdict: z.ZodCatch<z.ZodEnum<["approve", "changes", "none"]>>;
342
380
  }, "strip", z.ZodTypeAny, {
381
+ verdict: "approve" | "changes" | "none";
343
382
  feedback: string;
344
383
  found: true;
345
384
  }, {
346
385
  found: true;
386
+ verdict?: unknown;
347
387
  feedback?: unknown;
348
388
  }>;
349
389
  export declare const submitFeedbackSchema: z.ZodObject<{
@@ -1398,6 +1438,7 @@ export declare const builderProjectConnectionSchema: z.ZodObject<{
1398
1438
  }>;
1399
1439
  createdAt: z.ZodNumber;
1400
1440
  }, "strict", z.ZodTypeAny, {
1441
+ version: 1;
1401
1442
  app: {
1402
1443
  githubInstallationId: number | null;
1403
1444
  createdAt: number;
@@ -1417,10 +1458,10 @@ export declare const builderProjectConnectionSchema: z.ZodObject<{
1417
1458
  triggerRef: string | null;
1418
1459
  };
1419
1460
  attemptId: string;
1420
- version: 1;
1421
1461
  createdAt: number;
1422
1462
  provider: string;
1423
1463
  }, {
1464
+ version: 1;
1424
1465
  app: {
1425
1466
  id: string;
1426
1467
  createdAt: number;
@@ -1440,12 +1481,12 @@ export declare const builderProjectConnectionSchema: z.ZodObject<{
1440
1481
  triggerRef: string | null;
1441
1482
  };
1442
1483
  attemptId: string;
1443
- version: 1;
1444
1484
  createdAt: number;
1445
1485
  provider: string;
1446
1486
  }>;
1447
1487
  }, "strict", z.ZodTypeAny, {
1448
1488
  receipt: {
1489
+ version: 1;
1449
1490
  app: {
1450
1491
  githubInstallationId: number | null;
1451
1492
  createdAt: number;
@@ -1465,7 +1506,6 @@ export declare const builderProjectConnectionSchema: z.ZodObject<{
1465
1506
  triggerRef: string | null;
1466
1507
  };
1467
1508
  attemptId: string;
1468
- version: 1;
1469
1509
  createdAt: number;
1470
1510
  provider: string;
1471
1511
  };
@@ -1473,6 +1513,7 @@ export declare const builderProjectConnectionSchema: z.ZodObject<{
1473
1513
  iamIssuer: string;
1474
1514
  }, {
1475
1515
  receipt: {
1516
+ version: 1;
1476
1517
  app: {
1477
1518
  id: string;
1478
1519
  createdAt: number;
@@ -1492,7 +1533,6 @@ export declare const builderProjectConnectionSchema: z.ZodObject<{
1492
1533
  triggerRef: string | null;
1493
1534
  };
1494
1535
  attemptId: string;
1495
- version: 1;
1496
1536
  createdAt: number;
1497
1537
  provider: string;
1498
1538
  };
@@ -1582,6 +1622,7 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1582
1622
  }>;
1583
1623
  createdAt: z.ZodNumber;
1584
1624
  }, "strict", z.ZodTypeAny, {
1625
+ version: 1;
1585
1626
  app: {
1586
1627
  githubInstallationId: number | null;
1587
1628
  createdAt: number;
@@ -1601,10 +1642,10 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1601
1642
  triggerRef: string | null;
1602
1643
  };
1603
1644
  attemptId: string;
1604
- version: 1;
1605
1645
  createdAt: number;
1606
1646
  provider: string;
1607
1647
  }, {
1648
+ version: 1;
1608
1649
  app: {
1609
1650
  id: string;
1610
1651
  createdAt: number;
@@ -1624,12 +1665,12 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1624
1665
  triggerRef: string | null;
1625
1666
  };
1626
1667
  attemptId: string;
1627
- version: 1;
1628
1668
  createdAt: number;
1629
1669
  provider: string;
1630
1670
  }>;
1631
1671
  }, "strict", z.ZodTypeAny, {
1632
1672
  receipt: {
1673
+ version: 1;
1633
1674
  app: {
1634
1675
  githubInstallationId: number | null;
1635
1676
  createdAt: number;
@@ -1649,7 +1690,6 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1649
1690
  triggerRef: string | null;
1650
1691
  };
1651
1692
  attemptId: string;
1652
- version: 1;
1653
1693
  createdAt: number;
1654
1694
  provider: string;
1655
1695
  };
@@ -1657,6 +1697,7 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1657
1697
  iamIssuer: string;
1658
1698
  }, {
1659
1699
  receipt: {
1700
+ version: 1;
1660
1701
  app: {
1661
1702
  id: string;
1662
1703
  createdAt: number;
@@ -1676,7 +1717,6 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1676
1717
  triggerRef: string | null;
1677
1718
  };
1678
1719
  attemptId: string;
1679
- version: 1;
1680
1720
  createdAt: number;
1681
1721
  provider: string;
1682
1722
  };
@@ -1690,6 +1730,7 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1690
1730
  sessionId: string;
1691
1731
  connection?: {
1692
1732
  receipt: {
1733
+ version: 1;
1693
1734
  app: {
1694
1735
  githubInstallationId: number | null;
1695
1736
  createdAt: number;
@@ -1709,7 +1750,6 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1709
1750
  triggerRef: string | null;
1710
1751
  };
1711
1752
  attemptId: string;
1712
- version: 1;
1713
1753
  createdAt: number;
1714
1754
  provider: string;
1715
1755
  };
@@ -1723,6 +1763,7 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1723
1763
  sessionId: string;
1724
1764
  connection?: {
1725
1765
  receipt: {
1766
+ version: 1;
1726
1767
  app: {
1727
1768
  id: string;
1728
1769
  createdAt: number;
@@ -1742,7 +1783,6 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1742
1783
  triggerRef: string | null;
1743
1784
  };
1744
1785
  attemptId: string;
1745
- version: 1;
1746
1786
  createdAt: number;
1747
1787
  provider: string;
1748
1788
  };
@@ -1756,6 +1796,7 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1756
1796
  sessionId: string;
1757
1797
  connection?: {
1758
1798
  receipt: {
1799
+ version: 1;
1759
1800
  app: {
1760
1801
  githubInstallationId: number | null;
1761
1802
  createdAt: number;
@@ -1775,7 +1816,6 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1775
1816
  triggerRef: string | null;
1776
1817
  };
1777
1818
  attemptId: string;
1778
- version: 1;
1779
1819
  createdAt: number;
1780
1820
  provider: string;
1781
1821
  };
@@ -1789,6 +1829,7 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1789
1829
  sessionId: string;
1790
1830
  connection?: {
1791
1831
  receipt: {
1832
+ version: 1;
1792
1833
  app: {
1793
1834
  id: string;
1794
1835
  createdAt: number;
@@ -1808,7 +1849,6 @@ export declare const builderProjectConfigSchema: z.ZodEffects<z.ZodObject<{
1808
1849
  triggerRef: string | null;
1809
1850
  };
1810
1851
  attemptId: string;
1811
- version: 1;
1812
1852
  createdAt: number;
1813
1853
  provider: string;
1814
1854
  };
@@ -1822,12 +1862,12 @@ export declare const builderPairingStateSchema: z.ZodDiscriminatedUnion<"status"
1822
1862
  authorizationUrl: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
1823
1863
  expiresAt: z.ZodNumber;
1824
1864
  }, "strict", z.ZodTypeAny, {
1825
- expiresAt: number;
1826
1865
  status: "pending";
1866
+ expiresAt: number;
1827
1867
  authorizationUrl: string;
1828
1868
  }, {
1829
- expiresAt: number;
1830
1869
  status: "pending";
1870
+ expiresAt: number;
1831
1871
  authorizationUrl: string;
1832
1872
  }>, z.ZodObject<{
1833
1873
  status: z.ZodLiteral<"approved">;
@@ -1839,11 +1879,11 @@ export declare const builderPairingStateSchema: z.ZodDiscriminatedUnion<"status"
1839
1879
  status: z.ZodLiteral<"failed">;
1840
1880
  message: z.ZodEffects<z.ZodString, string, string>;
1841
1881
  }, "strict", z.ZodTypeAny, {
1842
- message: string;
1843
1882
  status: "failed";
1844
- }, {
1845
1883
  message: string;
1884
+ }, {
1846
1885
  status: "failed";
1886
+ message: string;
1847
1887
  }>, z.ZodObject<{
1848
1888
  status: z.ZodLiteral<"expired">;
1849
1889
  }, "strict", z.ZodTypeAny, {
@@ -1860,11 +1900,11 @@ export declare const builderPairingStateSchema: z.ZodDiscriminatedUnion<"status"
1860
1900
  status: z.ZodLiteral<"recovery_required">;
1861
1901
  message: z.ZodEffects<z.ZodString, string, string>;
1862
1902
  }, "strict", z.ZodTypeAny, {
1863
- message: string;
1864
1903
  status: "recovery_required";
1865
- }, {
1866
1904
  message: string;
1905
+ }, {
1867
1906
  status: "recovery_required";
1907
+ message: string;
1868
1908
  }>, z.ZodObject<{
1869
1909
  status: z.ZodLiteral<"connected">;
1870
1910
  }, "strict", z.ZodTypeAny, {
@@ -1880,16 +1920,16 @@ export declare const builderDeploymentStateSchema: z.ZodObject<{
1880
1920
  appUrl: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1881
1921
  consoleUrl: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1882
1922
  }, "strict", z.ZodTypeAny, {
1923
+ status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
1883
1924
  message: string | null;
1884
1925
  appUrl: string | null;
1885
- status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
1886
1926
  runId: string | null;
1887
1927
  commitSha: string | null;
1888
1928
  consoleUrl: string | null;
1889
1929
  }, {
1930
+ status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
1890
1931
  message: string | null;
1891
1932
  appUrl: string | null;
1892
- status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
1893
1933
  runId: string | null;
1894
1934
  commitSha: string | null;
1895
1935
  consoleUrl: string | null;
@@ -1976,6 +2016,7 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
1976
2016
  }>;
1977
2017
  createdAt: z.ZodNumber;
1978
2018
  }, "strict", z.ZodTypeAny, {
2019
+ version: 1;
1979
2020
  app: {
1980
2021
  githubInstallationId: number | null;
1981
2022
  createdAt: number;
@@ -1995,10 +2036,10 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
1995
2036
  triggerRef: string | null;
1996
2037
  };
1997
2038
  attemptId: string;
1998
- version: 1;
1999
2039
  createdAt: number;
2000
2040
  provider: string;
2001
2041
  }, {
2042
+ version: 1;
2002
2043
  app: {
2003
2044
  id: string;
2004
2045
  createdAt: number;
@@ -2018,12 +2059,12 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2018
2059
  triggerRef: string | null;
2019
2060
  };
2020
2061
  attemptId: string;
2021
- version: 1;
2022
2062
  createdAt: number;
2023
2063
  provider: string;
2024
2064
  }>;
2025
2065
  }, "strict", z.ZodTypeAny, {
2026
2066
  receipt: {
2067
+ version: 1;
2027
2068
  app: {
2028
2069
  githubInstallationId: number | null;
2029
2070
  createdAt: number;
@@ -2043,7 +2084,6 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2043
2084
  triggerRef: string | null;
2044
2085
  };
2045
2086
  attemptId: string;
2046
- version: 1;
2047
2087
  createdAt: number;
2048
2088
  provider: string;
2049
2089
  };
@@ -2051,6 +2091,7 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2051
2091
  iamIssuer: string;
2052
2092
  }, {
2053
2093
  receipt: {
2094
+ version: 1;
2054
2095
  app: {
2055
2096
  id: string;
2056
2097
  createdAt: number;
@@ -2070,7 +2111,6 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2070
2111
  triggerRef: string | null;
2071
2112
  };
2072
2113
  attemptId: string;
2073
- version: 1;
2074
2114
  createdAt: number;
2075
2115
  provider: string;
2076
2116
  };
@@ -2092,12 +2132,12 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2092
2132
  authorizationUrl: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
2093
2133
  expiresAt: z.ZodNumber;
2094
2134
  }, "strict", z.ZodTypeAny, {
2095
- expiresAt: number;
2096
2135
  status: "pending";
2136
+ expiresAt: number;
2097
2137
  authorizationUrl: string;
2098
2138
  }, {
2099
- expiresAt: number;
2100
2139
  status: "pending";
2140
+ expiresAt: number;
2101
2141
  authorizationUrl: string;
2102
2142
  }>, z.ZodObject<{
2103
2143
  status: z.ZodLiteral<"approved">;
@@ -2109,11 +2149,11 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2109
2149
  status: z.ZodLiteral<"failed">;
2110
2150
  message: z.ZodEffects<z.ZodString, string, string>;
2111
2151
  }, "strict", z.ZodTypeAny, {
2112
- message: string;
2113
2152
  status: "failed";
2114
- }, {
2115
2153
  message: string;
2154
+ }, {
2116
2155
  status: "failed";
2156
+ message: string;
2117
2157
  }>, z.ZodObject<{
2118
2158
  status: z.ZodLiteral<"expired">;
2119
2159
  }, "strict", z.ZodTypeAny, {
@@ -2130,11 +2170,11 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2130
2170
  status: z.ZodLiteral<"recovery_required">;
2131
2171
  message: z.ZodEffects<z.ZodString, string, string>;
2132
2172
  }, "strict", z.ZodTypeAny, {
2133
- message: string;
2134
2173
  status: "recovery_required";
2135
- }, {
2136
2174
  message: string;
2175
+ }, {
2137
2176
  status: "recovery_required";
2177
+ message: string;
2138
2178
  }>, z.ZodObject<{
2139
2179
  status: z.ZodLiteral<"connected">;
2140
2180
  }, "strict", z.ZodTypeAny, {
@@ -2151,16 +2191,16 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2151
2191
  appUrl: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
2152
2192
  consoleUrl: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
2153
2193
  }, "strict", z.ZodTypeAny, {
2194
+ status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2154
2195
  message: string | null;
2155
2196
  appUrl: string | null;
2156
- status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2157
2197
  runId: string | null;
2158
2198
  commitSha: string | null;
2159
2199
  consoleUrl: string | null;
2160
2200
  }, {
2201
+ status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2161
2202
  message: string | null;
2162
2203
  appUrl: string | null;
2163
- status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2164
2204
  runId: string | null;
2165
2205
  commitSha: string | null;
2166
2206
  consoleUrl: string | null;
@@ -2172,6 +2212,7 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2172
2212
  };
2173
2213
  connection: {
2174
2214
  receipt: {
2215
+ version: 1;
2175
2216
  app: {
2176
2217
  githubInstallationId: number | null;
2177
2218
  createdAt: number;
@@ -2191,7 +2232,6 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2191
2232
  triggerRef: string | null;
2192
2233
  };
2193
2234
  attemptId: string;
2194
- version: 1;
2195
2235
  createdAt: number;
2196
2236
  provider: string;
2197
2237
  };
@@ -2202,28 +2242,28 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2202
2242
  sessionId: string;
2203
2243
  previewUrl: string | null;
2204
2244
  pairing: {
2205
- expiresAt: number;
2206
2245
  status: "pending";
2246
+ expiresAt: number;
2207
2247
  authorizationUrl: string;
2208
2248
  } | {
2209
2249
  status: "approved";
2210
2250
  } | {
2211
- message: string;
2212
2251
  status: "failed";
2252
+ message: string;
2213
2253
  } | {
2214
2254
  status: "expired";
2215
2255
  } | {
2216
2256
  status: "cancelled";
2217
2257
  } | {
2218
- message: string;
2219
2258
  status: "recovery_required";
2259
+ message: string;
2220
2260
  } | {
2221
2261
  status: "connected";
2222
2262
  } | null;
2223
2263
  deployment: {
2264
+ status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2224
2265
  message: string | null;
2225
2266
  appUrl: string | null;
2226
- status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2227
2267
  runId: string | null;
2228
2268
  commitSha: string | null;
2229
2269
  consoleUrl: string | null;
@@ -2235,6 +2275,7 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2235
2275
  };
2236
2276
  connection: {
2237
2277
  receipt: {
2278
+ version: 1;
2238
2279
  app: {
2239
2280
  id: string;
2240
2281
  createdAt: number;
@@ -2254,7 +2295,6 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2254
2295
  triggerRef: string | null;
2255
2296
  };
2256
2297
  attemptId: string;
2257
- version: 1;
2258
2298
  createdAt: number;
2259
2299
  provider: string;
2260
2300
  };
@@ -2265,28 +2305,28 @@ export declare const builderPlatformStatusSchema: z.ZodObject<{
2265
2305
  sessionId: string;
2266
2306
  previewUrl: string | null;
2267
2307
  pairing: {
2268
- expiresAt: number;
2269
2308
  status: "pending";
2309
+ expiresAt: number;
2270
2310
  authorizationUrl: string;
2271
2311
  } | {
2272
2312
  status: "approved";
2273
2313
  } | {
2274
- message: string;
2275
2314
  status: "failed";
2315
+ message: string;
2276
2316
  } | {
2277
2317
  status: "expired";
2278
2318
  } | {
2279
2319
  status: "cancelled";
2280
2320
  } | {
2281
- message: string;
2282
2321
  status: "recovery_required";
2322
+ message: string;
2283
2323
  } | {
2284
2324
  status: "connected";
2285
2325
  } | null;
2286
2326
  deployment: {
2327
+ status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2287
2328
  message: string | null;
2288
2329
  appUrl: string | null;
2289
- status: "cancelled" | "pending" | "succeeded" | "failed" | "running" | "awaiting_approval" | "preparing";
2290
2330
  runId: string | null;
2291
2331
  commitSha: string | null;
2292
2332
  consoleUrl: string | null;
@@ -1,4 +1,4 @@
1
- export declare const PHASE_IDS: readonly ["intake", "vision", "flows", "tech", "design", "skeletons", "issues", "build"];
1
+ export declare const PHASE_IDS: readonly ["intake", "vision", "flows", "tech", "skeletons", "issues", "build"];
2
2
  export type PhaseId = (typeof PHASE_IDS)[number];
3
3
  export interface Phase {
4
4
  id: PhaseId;
@@ -13,8 +13,14 @@ export interface Phase {
13
13
  goal: string;
14
14
  /** A gated phase completes only after its canvas gate (named by the phase id) is reviewed. */
15
15
  gate: boolean;
16
+ /** An ungated phase whose output a later phase's gate reviews. */
17
+ reviewedAt?: PhaseId;
16
18
  catalog?: boolean;
19
+ /** A template under skill/gates/, or with `gateViewCommand` a repository path that command writes. */
17
20
  gateView?: string;
21
+ gateViewCommand?: string;
22
+ /** A later phase rewrites the outputs by design, so an approval covers only the inputs. */
23
+ producesEditedLater?: boolean;
18
24
  /** Installed agent skills that apply to the phase. */
19
25
  skills?: string[];
20
26
  }
@@ -1 +1 @@
1
- import{createContext as t,useContext as o}from"react";var i=t(null),r=t(""),e=t({sessionId:"",isShared:!1,fsAvailable:!1,uploadUrl:null});function s(){let n=o(i);if(!n)throw Error("useAnnotations requires an AnnotationProvider");return n}function l(){return o(e)}export{s as useAnnotations,l as useAnnotationHost,r as SessionContext,e as AnnotationHostContext,i as AnnotationCtx};
1
+ import{createContext as t,useContext as o}from"react";var i=t(null),r=t(""),e=t({sessionId:"",isShared:!1,fsAvailable:!1,uploadUrl:null});function s(){let n=o(i);if(!n)throw Error("useAnnotations requires an AnnotationProvider");return n}function l(){return o(e)}export{i as AnnotationCtx,e as AnnotationHostContext,r as SessionContext,l as useAnnotationHost,s as useAnnotations};