@repo-os/repoos 0.5.91 → 0.5.92

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 (167) hide show
  1. package/dist/.build-info.json +2 -2
  2. package/dist/.build-stamp.json +1 -1
  3. package/dist/cli/help.d.ts +17 -0
  4. package/dist/cli/help.js +7 -6
  5. package/dist/cli/index.js +1 -1
  6. package/dist/cli/repoos-api.d.ts +8 -0
  7. package/dist/cli/repoos-api.js +35 -1
  8. package/dist/commands/control-api.d.ts +6 -0
  9. package/dist/commands/control-api.js +60 -15
  10. package/dist/commands/secrets.d.ts +4 -0
  11. package/dist/commands/secrets.js +5 -1
  12. package/dist/commands/secrets.test.js +14 -1
  13. package/dist/commands/tasks.d.ts +1 -1
  14. package/dist/commands/tasks.js +16 -2
  15. package/dist/commands/ui-contrast-audit.js +6 -0
  16. package/dist/commands/ui-harness.d.ts +34 -20
  17. package/dist/commands/ui-smoke.js +74 -0
  18. package/dist/core/agent-failure.d.ts +1 -1
  19. package/dist/core/agent-failure.js +7 -0
  20. package/dist/core/agent-failure.test.js +8 -0
  21. package/dist/core/page-browser-gate.js +13 -0
  22. package/dist/core/shot-fixtures.d.ts +1 -1
  23. package/dist/core/shot-fixtures.js +32 -0
  24. package/dist/server/routes/project-environments.d.ts +8 -0
  25. package/dist/server/routes/project-environments.js +14 -4
  26. package/dist/server/routes/release.js +1 -1
  27. package/dist/ui/assets/ActivityIndicator-BAcodpB3.js +1 -0
  28. package/dist/ui/assets/AgentModelControl-CognFDUk.js +1 -0
  29. package/dist/ui/assets/AgentModelModal-BlXrbZAA.js +1 -0
  30. package/dist/ui/assets/AgentsView-BwT7Hdqh.js +2 -0
  31. package/dist/ui/assets/{AgentsView-DPOKSgl6.css → AgentsView-CYcW2W1V.css} +1 -1
  32. package/dist/ui/assets/{ChatAgentModelChip-Dz79EXOW.js → ChatAgentModelChip-BCufGZWt.js} +1 -1
  33. package/dist/ui/assets/ChecksView-DIwpiyDp.js +0 -0
  34. package/dist/ui/assets/ChecksView-vv2VpmBZ.css +1 -0
  35. package/dist/ui/assets/ClientBoardView-D54CD3J9.js +1 -0
  36. package/dist/ui/assets/ContextView-B5Rdzl6v.css +1 -0
  37. package/dist/ui/assets/ContextView-DvgVUnCg.js +4 -0
  38. package/dist/ui/assets/DashboardView-DKroQ0_G.css +1 -0
  39. package/dist/ui/assets/DashboardView-uoMgJiI1.js +1 -0
  40. package/dist/ui/assets/DeploymentsView-Cp012Ol5.css +1 -0
  41. package/dist/ui/assets/DeploymentsView-DH33u2bU.js +1 -0
  42. package/dist/ui/assets/DevView-JzzuZjjo.css +1 -0
  43. package/dist/ui/assets/{DevView-mvyrjNa6.js → DevView-OFRBmXcb.js} +2 -2
  44. package/dist/ui/assets/{DiffView-CWFtumqM.js → DiffView-BpbK7E7E.js} +2 -2
  45. package/dist/ui/assets/FailedTestsList-BsgIcmYa.js +1 -0
  46. package/dist/ui/assets/InputsView-D5f4iP7B.js +1 -0
  47. package/dist/ui/assets/InputsView-DLoRduaf.css +1 -0
  48. package/dist/ui/assets/LoginView-DLs9wmx3.css +1 -0
  49. package/dist/ui/assets/LoginView-JNHBZ7sq.js +1 -0
  50. package/dist/ui/assets/PageSkeleton-a7KWsqZj.js +1 -0
  51. package/dist/ui/assets/ReleasesView-J8eHMasy.js +7 -0
  52. package/dist/ui/assets/ReleasesView-nToqxCes.css +1 -0
  53. package/dist/ui/assets/SecretsView-CGKf6YA2.js +1 -0
  54. package/dist/ui/assets/SettingsView-BBwhYFoe.js +4 -0
  55. package/dist/ui/assets/StoriesView-BgXfFRty.js +1 -0
  56. package/dist/ui/assets/{VoiceDictate-Co5CatqL.js → VoiceDictate-BOTIaIEm.js} +2 -2
  57. package/dist/ui/assets/WorkView-Dbu4Su4I.js +2 -0
  58. package/dist/ui/assets/{WorkView-CxI45mka.css → WorkView-LH9v_m1-.css} +1 -1
  59. package/dist/ui/assets/_plugin-vue_export-helper-B-7jKWYS.js +37 -0
  60. package/dist/ui/assets/{abnfDiagram-VCTEODGH-Dlg7FtI9.js → abnfDiagram-VCTEODGH-D-bHWvQx.js} +1 -1
  61. package/dist/ui/assets/agent-failure-l30iR_QH.js +1 -0
  62. package/dist/ui/assets/{architectureDiagram-5GKGNRK7-NF5jHbOB.js → architectureDiagram-5GKGNRK7-BnfM38Ea.js} +1 -1
  63. package/dist/ui/assets/{blockDiagram-I7D4REHJ-C-SV0UUl.js → blockDiagram-I7D4REHJ-CBBg7-_L.js} +1 -1
  64. package/dist/ui/assets/{c4Diagram-7LVT6UL2-C-7-RInk.js → c4Diagram-7LVT6UL2-Cc6b1vTh.js} +1 -1
  65. package/dist/ui/assets/channel-D1uPGa4V.js +1 -0
  66. package/dist/ui/assets/check-setup-xqpRoigF.js +2 -0
  67. package/dist/ui/assets/{chunk-2E4U76K2-DJsZmctN.js → chunk-2E4U76K2-BFbCIRhe.js} +1 -1
  68. package/dist/ui/assets/{chunk-4HAMMTFA-BVXiAQ-f.js → chunk-4HAMMTFA-DYNnUlVz.js} +1 -1
  69. package/dist/ui/assets/{chunk-75Z2AOVW-5bJ7d9Q0.js → chunk-75Z2AOVW-CnZbf3kI.js} +1 -1
  70. package/dist/ui/assets/{chunk-CLGD4ZFX-TyTatfl6.js → chunk-CLGD4ZFX-CA9Q1E94.js} +1 -1
  71. package/dist/ui/assets/{chunk-DU6HZSFF-63f2WDFo.js → chunk-DU6HZSFF-DwYzl-gQ.js} +1 -1
  72. package/dist/ui/assets/{chunk-F27PBJKO-i83MKOg7.js → chunk-F27PBJKO-D00oD-xv.js} +1 -1
  73. package/dist/ui/assets/{chunk-GMAD6QVW-DxGUWdy9.js → chunk-GMAD6QVW-soTPNJXR.js} +1 -1
  74. package/dist/ui/assets/{chunk-GVQU2GXP-D2prPE68.js → chunk-GVQU2GXP-DYy84SXq.js} +1 -1
  75. package/dist/ui/assets/{chunk-IMKFNOWR-4e5pye7F.js → chunk-IMKFNOWR-DvSCdPPU.js} +1 -1
  76. package/dist/ui/assets/{chunk-L3NEJ4N5-C3CQnitz.js → chunk-L3NEJ4N5-B4s-ZnhH.js} +1 -1
  77. package/dist/ui/assets/{chunk-OSK3NFVY-gvVJAz9z.js → chunk-OSK3NFVY-noUbjjt7.js} +1 -1
  78. package/dist/ui/assets/{chunk-P2QGCYS3-CUwGXGBr.js → chunk-P2QGCYS3-CUzBN63t.js} +1 -1
  79. package/dist/ui/assets/{chunk-POPQ4Y6H-BDcwgs6v.js → chunk-POPQ4Y6H-BPLsk7Ce.js} +1 -1
  80. package/dist/ui/assets/{chunk-PWAF6VOD-CMeVZfww.js → chunk-PWAF6VOD-10VLiUcg.js} +1 -1
  81. package/dist/ui/assets/{chunk-SHT3W25Y-ggVxuqJX.js → chunk-SHT3W25Y-C9ZCyTpu.js} +1 -1
  82. package/dist/ui/assets/{chunk-SVP7TREG-Be8zyoAB.js → chunk-SVP7TREG-CTtqSSVE.js} +1 -1
  83. package/dist/ui/assets/{chunk-TICWLB2K-2r1gBZEc.js → chunk-TICWLB2K-yrt48cWI.js} +1 -1
  84. package/dist/ui/assets/{chunk-TLUHSLCS-C4YfmYEw.js → chunk-TLUHSLCS-vTh-Ks6x.js} +2 -2
  85. package/dist/ui/assets/classDiagram-ZZMXUADV-Cfa_N-25.js +1 -0
  86. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-Cfa_N-25.js +1 -0
  87. package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-BKKL7__h.js → cynefinDiagram-5FMLGOSQ-DbTuWYsn.js} +1 -1
  88. package/dist/ui/assets/{dagre-GXQ25YYZ-C4wnJpCk.js → dagre-GXQ25YYZ-JZ8rKSGL.js} +1 -1
  89. package/dist/ui/assets/{diagram-S7CK7UJ4-DjeciKZW.js → diagram-S7CK7UJ4-DozuYZ5v.js} +1 -1
  90. package/dist/ui/assets/{diagram-UQ7AKVKN-C-r3LQny.js → diagram-UQ7AKVKN-EjReFZD_.js} +1 -1
  91. package/dist/ui/assets/{diagram-VSXAHHWV-DkwP_c0a.js → diagram-VSXAHHWV-CoI6xXJR.js} +1 -1
  92. package/dist/ui/assets/{diagram-VX7I27RA-4oQ2QBmP.js → diagram-VX7I27RA-BAQLLea1.js} +1 -1
  93. package/dist/ui/assets/{diagram-Z3DM3KII-DAayG03d.js → diagram-Z3DM3KII-sImX--30.js} +1 -1
  94. package/dist/ui/assets/docs-HP47hTTR.js +1 -0
  95. package/dist/ui/assets/{ebnfDiagram-PWID7BFC-nfLytJeL.js → ebnfDiagram-PWID7BFC-4-EZK45g.js} +1 -1
  96. package/dist/ui/assets/{erDiagram-RLTQ6QDP-N3OQ9XZ7.js → erDiagram-RLTQ6QDP-D_XlxqhG.js} +1 -1
  97. package/dist/ui/assets/flowDiagram-HODETNUW-C1zPkt8s.js +1 -0
  98. package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-CW24p715.js → ganttDiagram-EL5Y4UJY-DsH9xlB9.js} +1 -1
  99. package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-baG-rogD.js → gitGraphDiagram-WWUBYQGX-4VcQIUQs.js} +1 -1
  100. package/dist/ui/assets/index-CO7taHt2.css +1 -0
  101. package/dist/ui/assets/index-WTREy1tJ.js +109 -0
  102. package/dist/ui/assets/{infoDiagram-27XIBGKW-B20l-Dj7.js → infoDiagram-27XIBGKW-CLp07U4U.js} +1 -1
  103. package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-Dw-7L00u.js → ishikawaDiagram-5VMMS53U-DHyybN4S.js} +1 -1
  104. package/dist/ui/assets/{journeyDiagram-3NMN7TZE-B1RwpIaW.js → journeyDiagram-3NMN7TZE-DEeuFca9.js} +1 -1
  105. package/dist/ui/assets/{kanban-definition-UXKFOSKX-BY2WGcKX.js → kanban-definition-UXKFOSKX-CHN8drwJ.js} +1 -1
  106. package/dist/ui/assets/{line-KVY0Anrq.js → line-Gl6rXSAb.js} +1 -1
  107. package/dist/ui/assets/{mermaid-parser.core-ClbENqyX.js → mermaid-parser.core-D_Tb6YLS.js} +1 -1
  108. package/dist/ui/assets/{mermaid.core-p1BDpOrr.js → mermaid.core-DT6J3m0d.js} +3 -3
  109. package/dist/ui/assets/{mindmap-definition-YA3MSWOX-B9yhlR8y.js → mindmap-definition-YA3MSWOX-B3ObuJ3D.js} +1 -1
  110. package/dist/ui/assets/{pegDiagram-XKGWAZYB-PwJsptvn.js → pegDiagram-XKGWAZYB-DKKqNhAl.js} +1 -1
  111. package/dist/ui/assets/{pieDiagram-E7YTZNPT-DqTZShF-.js → pieDiagram-E7YTZNPT-BFuF3WtM.js} +1 -1
  112. package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-Co9qtSqC.js → quadrantDiagram-AXDQQJYC-SxPbTouY.js} +1 -1
  113. package/dist/ui/assets/{railroadDiagram-O6MQD6OU-DUJA_Hys.js → railroadDiagram-O6MQD6OU-CDbTh97N.js} +1 -1
  114. package/dist/ui/assets/repo-BlQoHXqa.js +44 -0
  115. package/dist/ui/assets/{requirementDiagram-BXWQKSXE-DMsIRj5s.js → requirementDiagram-BXWQKSXE-Bs-GFKEa.js} +1 -1
  116. package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-BCZOaADr.js → sankeyDiagram-P5KCCOFB-D7T8G0Ax.js} +1 -1
  117. package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-Bss-g9PB.js → sequenceDiagram-WJ2MYXX4-BN37N1BT.js} +1 -1
  118. package/dist/ui/assets/{stateDiagram-D77RDMKH-DCvB4mL0.js → stateDiagram-D77RDMKH-DPK9RHNv.js} +1 -1
  119. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-iJyBxeuE.js +1 -0
  120. package/dist/ui/assets/{swimlanes-42K2YHIH-BmHi9eSK.js → swimlanes-42K2YHIH-B8HRPbJd.js} +1 -1
  121. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-76Ue_ERp.js +8 -0
  122. package/dist/ui/assets/{timeline-definition-24CTP7MA-WKZ5iOK3.js → timeline-definition-24CTP7MA-Bn1BpGMq.js} +1 -1
  123. package/dist/ui/assets/{vennDiagram-4TSXK5OY-CAfMTZJ7.js → vennDiagram-4TSXK5OY-B5dw0TnP.js} +1 -1
  124. package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-MS0iUHWc.js → wardleyDiagram-VM6X3IG4-hNcz_h6K.js} +1 -1
  125. package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-DjF-NKel.js → xychartDiagram-S5SC5T6Z-DD8p4wxv.js} +1 -1
  126. package/dist/ui/index.html +13 -13
  127. package/dist/ui/sw.js +2 -2
  128. package/package.json +1 -1
  129. package/dist/ui/assets/ActivityIndicator-DwoyYKVa.js +0 -1
  130. package/dist/ui/assets/AgentModelControl-sj-78Q_B.js +0 -1
  131. package/dist/ui/assets/AgentModelModal-C1XQIgm2.js +0 -1
  132. package/dist/ui/assets/AgentsView-C0WrNcYy.js +0 -2
  133. package/dist/ui/assets/ChecksView-Dd8LO8m6.js +0 -0
  134. package/dist/ui/assets/ChecksView-WmIVoIXD.css +0 -1
  135. package/dist/ui/assets/ClientBoardView-BwWiNdXQ.js +0 -1
  136. package/dist/ui/assets/ContextView-Bpu4NK3a.css +0 -1
  137. package/dist/ui/assets/ContextView-DguOJyZg.js +0 -4
  138. package/dist/ui/assets/DashboardView-CKnIpPNR.css +0 -1
  139. package/dist/ui/assets/DashboardView-CnMju9ig.js +0 -1
  140. package/dist/ui/assets/DeploymentsView-0BPop4uE.js +0 -1
  141. package/dist/ui/assets/DeploymentsView-CAxXPEHO.css +0 -1
  142. package/dist/ui/assets/DevView-BwdViVxh.css +0 -1
  143. package/dist/ui/assets/FailedTestsList-D91YLFHD.js +0 -1
  144. package/dist/ui/assets/InputsView-B-a_6_Rh.css +0 -1
  145. package/dist/ui/assets/InputsView-imnbetme.js +0 -1
  146. package/dist/ui/assets/LoginView-C1U9OfRd.js +0 -1
  147. package/dist/ui/assets/LoginView-DgYid8_T.css +0 -1
  148. package/dist/ui/assets/PageSkeleton-D_RFaQwe.js +0 -1
  149. package/dist/ui/assets/ReleasesView-CAIlRSH_.css +0 -1
  150. package/dist/ui/assets/ReleasesView-WCCYxoVF.js +0 -7
  151. package/dist/ui/assets/SecretsView-DaZYjEvs.js +0 -1
  152. package/dist/ui/assets/SettingsView-zg4S1PEN.js +0 -4
  153. package/dist/ui/assets/StoriesView-rS16_IN0.js +0 -1
  154. package/dist/ui/assets/WorkView-CkRaRaCF.js +0 -2
  155. package/dist/ui/assets/_plugin-vue_export-helper-BDNMzG2s.js +0 -1
  156. package/dist/ui/assets/agent-failure-D1nIatMj.js +0 -1
  157. package/dist/ui/assets/channel-B8HmveJ0.js +0 -1
  158. package/dist/ui/assets/check-setup-B7eqbnaj.js +0 -2
  159. package/dist/ui/assets/classDiagram-ZZMXUADV-B4D9FX0u.js +0 -1
  160. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-B4D9FX0u.js +0 -1
  161. package/dist/ui/assets/docs-D3sAWu_L.js +0 -1
  162. package/dist/ui/assets/flowDiagram-HODETNUW-DUZmqKHp.js +0 -1
  163. package/dist/ui/assets/index-DEyAKllM.css +0 -1
  164. package/dist/ui/assets/index-syo8our2.js +0 -109
  165. package/dist/ui/assets/repo-CwNYzbdc.js +0 -79
  166. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-CjW5nw4h.js +0 -1
  167. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DrAX_t__.js +0 -8
@@ -1,5 +1,5 @@
1
1
  {
2
- "hash": "d3ba2d5054feb1350741e04c8e998c12d08a32d6943b852c5d73cbf6b82d1313",
3
- "version": "0.5.91",
2
+ "hash": "0ae0ae47465c51bf52736886f2458e82a95a07d7a77558904e086a7db73f47a1",
3
+ "version": "0.5.92",
4
4
  "devUi": false
5
5
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "generatedAt": "2026-11-18T19:36:57.253Z"
2
+ "generatedAt": "2026-11-19T19:32:20.777Z"
3
3
  }
@@ -1,5 +1,21 @@
1
+ interface CommandEntry {
2
+ /** Command as typed, e.g. "doctor". */
3
+ name: string;
4
+ /** Full usage (without the leading `repoos`) — per-command help. */
5
+ usage: string;
6
+ /** One-line purpose, shown in the table. */
7
+ desc: string;
8
+ /** Flag summary for the dim line under the description, if any. */
9
+ flags?: string;
10
+ }
11
+ interface CommandGroup {
12
+ name: string;
13
+ commands: CommandEntry[];
14
+ }
1
15
  /** Commands whose own argument parser already handles `--help`. */
2
16
  export declare const SELF_HELP_COMMANDS: Set<string>;
17
+ /** The command table itself, exported for the docs-coverage QA test. */
18
+ export declare const GROUPS: readonly CommandGroup[];
3
19
  /** Resolve an alias to its canonical command name (identity when not an alias). */
4
20
  export declare function canonicalCommand(name: string): string;
5
21
  /** Full usage for a command (or alias), without the leading `repoos`, or null. */
@@ -15,3 +31,4 @@ export declare function printHelp(width?: number): void;
15
31
  * command (so the caller can fall through to its normal dispatch).
16
32
  */
17
33
  export declare function printCommandHelp(name: string, width?: number): boolean;
34
+ export {};
package/dist/cli/help.js CHANGED
@@ -20,7 +20,8 @@ export const SELF_HELP_COMMANDS = new Set([
20
20
  "override",
21
21
  "bundle",
22
22
  ]);
23
- const GROUPS = [
23
+ /** The command table itself, exported for the docs-coverage QA test. */
24
+ export const GROUPS = [
24
25
  {
25
26
  name: "Setup",
26
27
  commands: [
@@ -328,9 +329,9 @@ const GROUPS = [
328
329
  },
329
330
  {
330
331
  name: "check",
331
- usage: "check [--profile <name>] [--changed <ref>] [--print-plan] [--local-tests]",
332
+ usage: "check [--profile <name>] [--changed <ref>] [--print-plan] [--fix] [--step <name>] [--local-tests]",
332
333
  desc: "Definition-of-done gate: runs the plan declared in repoos.toml",
333
- flags: "--profile <name> · --changed <ref> · --print-plan · --local-tests",
334
+ flags: "--profile <name> · --changed <ref> · --print-plan · --fix · --step <name> · --local-tests",
334
335
  },
335
336
  {
336
337
  name: "checks timings",
@@ -346,13 +347,13 @@ const GROUPS = [
346
347
  },
347
348
  {
348
349
  name: "doctor",
349
- usage: "doctor [--json] [--verbose] [--probe <cli>] [--binary <path>]",
350
+ usage: "doctor [--json] [--verbose] [--probe <cli> [--model <id>]] [--binary <path>]",
350
351
  desc: "Readiness preflight: config, layout, tools, server and secrets",
351
- flags: "--json · --verbose · --probe <cli> · --binary <path>",
352
+ flags: "--json · --verbose · --probe <cli> · --model <id> · --binary <path>",
352
353
  },
353
354
  {
354
355
  name: "secrets",
355
- usage: "secrets <list|add|replace|delete> <environment> [KEY] | bind <consumer> <environment> [KEY ...]",
356
+ usage: "secrets <list|add|replace|delete> <environment> [KEY] | bind <consumer> <environment> [KEY ...] | bindings",
356
357
  desc: "Manage project environment values and explicit per-consumer key grants",
357
358
  },
358
359
  {
package/dist/cli/index.js CHANGED
@@ -193,7 +193,7 @@ function main() {
193
193
  void cmdRm(rest);
194
194
  break;
195
195
  case "update":
196
- cmdUpdate(rest);
196
+ void cmdUpdate(rest);
197
197
  break;
198
198
  case "split":
199
199
  void cmdSplit(rest).then(() => { });
@@ -21,6 +21,14 @@ export interface ApiJson {
21
21
  error?: string;
22
22
  [key: string]: unknown;
23
23
  }
24
+ /** The JSON body used when the server answers with something that is not JSON. */
25
+ export declare function nonJsonResponse(path: string, text: string): ApiJson;
26
+ /**
27
+ * True when the response body came from the SPA catch-all (a 200 HTML page for
28
+ * an unknown /api/ route) rather than a real API answer. Every consumer that
29
+ * classifies success must treat this as a failure — the HTTP status alone lies.
30
+ */
31
+ export declare function isHtmlResponse(body: unknown): boolean;
24
32
  export declare function resolveControlPlaneBase(opts?: RepoOsApiOptions): {
25
33
  root: string;
26
34
  baseUrl: string;
@@ -28,6 +28,35 @@ function readApiError(body, status) {
28
28
  }
29
29
  return `HTTP ${status}`;
30
30
  }
31
+ /** The JSON body used when the server answers with something that is not JSON. */
32
+ export function nonJsonResponse(path, text) {
33
+ // A web page (not JSON) means the request missed every /api/ route and fell
34
+ // through to the single-page app, which answers 200 with its own HTML — the
35
+ // common case is a typo'd path. Handing the page back as an "error" string
36
+ // would dump the whole app shell into the terminal; say what happened instead.
37
+ // The 512-char prefix is a heuristic: the SPA shell's doctype sits in the
38
+ // first bytes, so nothing beyond it can change the verdict — a non-HTML
39
+ // body that merely fails JSON.parse still surfaces as raw text.
40
+ const head = text.trimStart().slice(0, 512).toLowerCase();
41
+ if (head.startsWith("<!doctype html") || head.startsWith("<html")) {
42
+ return {
43
+ error: `The server returned a web page instead of JSON, so ${path} is not a RepoOS API route. ` +
44
+ "Check the path for typos — API routes start with /api/ (repoos api GET /api/stats/board is a good test).",
45
+ htmlResponse: true,
46
+ };
47
+ }
48
+ return { error: text };
49
+ }
50
+ /**
51
+ * True when the response body came from the SPA catch-all (a 200 HTML page for
52
+ * an unknown /api/ route) rather than a real API answer. Every consumer that
53
+ * classifies success must treat this as a failure — the HTTP status alone lies.
54
+ */
55
+ export function isHtmlResponse(body) {
56
+ return (body !== null &&
57
+ typeof body === "object" &&
58
+ body.htmlResponse === true);
59
+ }
31
60
  export function resolveControlPlaneBase(opts = {}) {
32
61
  const { root } = opts.root ? { root: opts.root } : boardRoot();
33
62
  const config = loadConfig(root);
@@ -152,7 +181,7 @@ export class RepoOsApi {
152
181
  parsed = JSON.parse(text);
153
182
  }
154
183
  catch {
155
- parsed = { error: text };
184
+ parsed = nonJsonResponse(path, text);
156
185
  }
157
186
  }
158
187
  return { status: res.status, body: parsed };
@@ -163,6 +192,11 @@ export class RepoOsApi {
163
192
  if (!allowed.includes(status)) {
164
193
  throw new RepoOsApiError(readApiError(data, status), status, data);
165
194
  }
195
+ // A 200 that is really the SPA catch-all is not success — fail like any
196
+ // other non-JSON answer instead of returning a web page as the payload.
197
+ if (isHtmlResponse(data)) {
198
+ throw new RepoOsApiError(String(data.error), status, data);
199
+ }
166
200
  return data;
167
201
  }
168
202
  }
@@ -159,6 +159,12 @@ export declare function pollSummaryState(getState: () => Promise<TaskSummaryStat
159
159
  * Never touches the task status.
160
160
  */
161
161
  export declare function cmdSummary(args: string[]): Promise<number>;
162
+ /**
163
+ * Plain-English rewrite of the server's generic "No valid fields to update"
164
+ * reply: `repoos config set <key> <value>` with a key that is not a RepoOS
165
+ * setting. Names the key and where valid keys are listed.
166
+ */
167
+ export declare function unknownConfigKeyMessage(key: string): string;
162
168
  /** Shared server-down check for tests. */
163
169
  export declare function controlApiServerDownMessage(port: number): Promise<string>;
164
170
  export {};
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { c } from "../cli/colors.js";
5
5
  import { readFileSync } from "node:fs";
6
- import { pollUntil, RepoOsApi, RepoOsApiError, resolveControlPlaneBase, } from "../cli/repoos-api.js";
6
+ import { pollUntil, RepoOsApi, RepoOsApiError, isHtmlResponse, resolveControlPlaneBase, } from "../cli/repoos-api.js";
7
7
  import { effectiveEngineerFromApi } from "../cli/effective-from-api.js";
8
8
  import { HANDOFF_DEADLINE_MS } from "../server/handoff.js";
9
9
  import { fmtDuration } from "./driver.js";
@@ -472,11 +472,9 @@ export async function cmdReview(args) {
472
472
  try {
473
473
  const api = new RepoOsApi({ port: opts.port });
474
474
  await ensureServer(api);
475
- const res = await api.request("POST", `/api/tasks/${id}/review/keep`, {});
476
- if (res.status < 200 || res.status >= 300)
477
- throw new RepoOsApiError(String(res.body.error ?? "keep review verdict refused"), res.status, res.body);
475
+ const res = await api.requestOk("POST", `/api/tasks/${id}/review/keep`, {});
478
476
  if (opts.json)
479
- printJson(res.body);
477
+ printJson(res);
480
478
  else
481
479
  console.log(c.green(" ✓ ") + c.dim(`kept review verdict for #${id}`));
482
480
  return 0;
@@ -496,11 +494,9 @@ export async function cmdReview(args) {
496
494
  try {
497
495
  const api = new RepoOsApi({ port: opts.port });
498
496
  await ensureServer(api);
499
- const res = await api.request("POST", `/api/tasks/${id}/review/followup`, {});
500
- if (res.status < 200 || res.status >= 300)
501
- throw new RepoOsApiError(String(res.body.error ?? "follow-up creation failed"), res.status, res.body);
497
+ const res = await api.requestOk("POST", `/api/tasks/${id}/review/followup`, {});
502
498
  if (opts.json)
503
- printJson(res.body);
499
+ printJson(res);
504
500
  else
505
501
  console.log(c.green(" ✓ ") + c.dim(`created follow-up for #${id}`));
506
502
  return 0;
@@ -658,6 +654,11 @@ export async function cmdIntegration(args) {
658
654
  return 1;
659
655
  }
660
656
  const result = await api.request(action === "retry" || action === "refresh-install" ? "POST" : "GET", path, action === "retry" || action === "refresh-install" ? {} : undefined);
657
+ // A 200 whose body is the SPA catch-all HTML is not success — say so.
658
+ if (isHtmlResponse(result.body)) {
659
+ printErr(String(result.body.error ?? `HTTP ${result.status}`));
660
+ return 1;
661
+ }
661
662
  if (opts.json)
662
663
  printJson({ status: result.status, ...result.body });
663
664
  else if (result.status >= 200 && result.status < 300)
@@ -690,6 +691,11 @@ export async function cmdAttention(args) {
690
691
  printErr("Usage: repoos attention list|dismiss <task-id> [--json] [--port N]");
691
692
  return 1;
692
693
  }
694
+ // A 200 whose body is the SPA catch-all HTML is not success — say so.
695
+ if (isHtmlResponse(result.body)) {
696
+ printErr(String(result.body.error ?? `HTTP ${result.status}`));
697
+ return 1;
698
+ }
693
699
  if (opts.json)
694
700
  printJson({ status: result.status, ...result.body });
695
701
  else if (result.status >= 200 && result.status < 300)
@@ -819,6 +825,10 @@ export async function cmdDone(args) {
819
825
  await ensureServer(api);
820
826
  if (cancel) {
821
827
  const result = await api.request("POST", `/api/tasks/${id}/done/cancel`, {});
828
+ if (isHtmlResponse(result.body)) {
829
+ printErr(String(result.body.error ?? `HTTP ${result.status}`));
830
+ return 1;
831
+ }
822
832
  const message = result.body.error ??
823
833
  (result.status === 409
824
834
  ? "close-out is still shutting down; check again shortly"
@@ -959,6 +969,12 @@ export async function cmdApi(args) {
959
969
  const api = new RepoOsApi({ port });
960
970
  await ensureServer(api);
961
971
  const result = await api.request(method, path, body);
972
+ // An HTML body is the SPA catch-all answering a wrong /api/ path with 200 —
973
+ // report it as the failure it is, not as a successful JSON payload.
974
+ if (result.body.htmlResponse) {
975
+ printErr(String(result.body.error ?? "Non-JSON response"));
976
+ return 1;
977
+ }
962
978
  printJson({ status: result.status, ...result.body });
963
979
  return result.status >= 200 && result.status < 300 ? 0 : 1;
964
980
  }
@@ -1251,12 +1267,23 @@ export async function cmdConfig(args) {
1251
1267
  return 1;
1252
1268
  }
1253
1269
  const patch = { [key]: parseSetValue(valueRaw) };
1254
- const data = await api.requestOk("PATCH", "/api/config", patch);
1255
- if (opts.json)
1256
- printJson(data);
1257
- else
1258
- console.log(c.green(" ✓ ") + c.dim(`set ${key}`));
1259
- return 0;
1270
+ try {
1271
+ const data = await api.requestOk("PATCH", "/api/config", patch);
1272
+ if (opts.json)
1273
+ printJson(data);
1274
+ else
1275
+ console.log(c.green(" ✓ ") + c.dim(`set ${key}`));
1276
+ return 0;
1277
+ }
1278
+ catch (e) {
1279
+ // The server rejects a patch with no recognized fields — from this
1280
+ // command that always means the key name is not a RepoOS setting.
1281
+ if (e instanceof RepoOsApiError && e.message === "No valid fields to update") {
1282
+ printErr(unknownConfigKeyMessage(key));
1283
+ return 1;
1284
+ }
1285
+ throw e;
1286
+ }
1260
1287
  }
1261
1288
  catch (e) {
1262
1289
  printErr(e.message);
@@ -1852,6 +1879,15 @@ export function printSystemSummary(system) {
1852
1879
  ? c.yellow("warning")
1853
1880
  : c.green("normal");
1854
1881
  console.log(c.dim(` pressure: ${label} swap ${fmtRatio(p.swapUsedRatio)} · compressor ${fmtRatio(p.compressorRatio)} · available ${fmtRatio(p.availableMemRatio)} · load ${p.loadPerCpu?.toFixed(1) ?? "—"}×/cpu (${p.source ?? "memory"})`));
1882
+ if (p.level === "warning") {
1883
+ console.log(c.dim(" advisory only — warning signals do not hold new work"));
1884
+ }
1885
+ else if (p.level === "critical") {
1886
+ console.log(c.dim(" holding new work until blocking pressure signals ease"));
1887
+ }
1888
+ else {
1889
+ console.log(c.dim(" no pressure signal is holding new work"));
1890
+ }
1855
1891
  if (p.reason)
1856
1892
  console.log(` ${c.yellow(p.reason)}`);
1857
1893
  }
@@ -2085,6 +2121,15 @@ export async function cmdSummary(args) {
2085
2121
  return 1;
2086
2122
  }
2087
2123
  }
2124
+ /**
2125
+ * Plain-English rewrite of the server's generic "No valid fields to update"
2126
+ * reply: `repoos config set <key> <value>` with a key that is not a RepoOS
2127
+ * setting. Names the key and where valid keys are listed.
2128
+ */
2129
+ export function unknownConfigKeyMessage(key) {
2130
+ return (`Unknown setting "${key}" — RepoOS has no config field with that name. ` +
2131
+ "Open Settings in the web UI to see the valid keys, or check an existing one with `repoos config get <key>`.");
2132
+ }
2088
2133
  /** Shared server-down check for tests. */
2089
2134
  export async function controlApiServerDownMessage(port) {
2090
2135
  const { baseUrl } = resolveControlPlaneBase({ port });
@@ -1,3 +1,7 @@
1
+ /** Printed on a bad invocation and asserted (against the banner) by secrets.test.ts. */
2
+ export declare const SECRETS_USAGE = "Usage: repoos secrets <list|add|replace|delete> <environment> [KEY] | bind <consumer> <environment> [KEY ...] | bindings (values come from stdin or a hidden prompt)";
3
+ /** Every action `cmdSecrets` dispatches on — the source of truth the usage strings must cover. */
4
+ export declare const SECRET_ACTIONS: readonly ["list", "add", "replace", "delete", "bind", "bindings"];
1
5
  export declare function assertSecretMutationAllowed(action: "add" | "replace" | "delete", row: {
2
6
  status: string;
3
7
  inherited?: boolean;
@@ -1,5 +1,9 @@
1
1
  import { RepoOsApi } from "../cli/repoos-api.js";
2
2
  import { normalizeProjectEnvironmentConsumer } from "../core/project-environments.js";
3
+ /** Printed on a bad invocation and asserted (against the banner) by secrets.test.ts. */
4
+ export const SECRETS_USAGE = "Usage: repoos secrets <list|add|replace|delete> <environment> [KEY] | bind <consumer> <environment> [KEY ...] | bindings (values come from stdin or a hidden prompt)";
5
+ /** Every action `cmdSecrets` dispatches on — the source of truth the usage strings must cover. */
6
+ export const SECRET_ACTIONS = ["list", "add", "replace", "delete", "bind", "bindings"];
3
7
  export function assertSecretMutationAllowed(action, row) {
4
8
  if ((action === "replace" || action === "delete") && row?.inherited)
5
9
  throw new Error("Key is inherited from an earlier source and cannot be changed");
@@ -83,7 +87,7 @@ export async function cmdSecrets(args) {
83
87
  }
84
88
  }
85
89
  if (!action || !environment || !["list", "add", "replace", "delete"].includes(action)) {
86
- console.error("Usage: repoos secrets <list|add|replace|delete> <environment> [KEY] (values come from stdin or a hidden prompt)");
90
+ console.error(SECRETS_USAGE);
87
91
  return 2;
88
92
  }
89
93
  const api = new RepoOsApi();
@@ -1,7 +1,20 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { assertSecretMutationAllowed } from "./secrets.js";
2
+ import { commandUsage } from "../cli/help.js";
3
+ import { assertSecretMutationAllowed, SECRET_ACTIONS, SECRETS_USAGE } from "./secrets.js";
3
4
  describe("repoos secrets inherited keys", () => {
4
5
  it.each(["replace", "delete"])("refuses %s of inherited-only keys before reading a value", (action) => {
5
6
  expect(() => assertSecretMutationAllowed(action, { status: "set", inherited: true })).toThrow("Key is inherited from an earlier source and cannot be changed");
6
7
  });
7
8
  });
9
+ // The usage strings have drifted from the real CLI before (#1227 review pass 2:
10
+ // both omitted `bind`/`bindings` while the actions were implemented). Pin every
11
+ // usage surface to the full implemented action set so the next subcommand
12
+ // cannot land without appearing in them.
13
+ describe("repoos secrets usage strings cover every implemented action", () => {
14
+ it.each(SECRET_ACTIONS)("the self-help banner mentions %s", (action) => {
15
+ expect(commandUsage("secrets") ?? "").toContain(action);
16
+ });
17
+ it.each(SECRET_ACTIONS)("the bad-invocation usage line mentions %s", (action) => {
18
+ expect(SECRETS_USAGE).toContain(action);
19
+ });
20
+ });
@@ -98,7 +98,7 @@ export declare const UPDATE_FLAGS: Record<string, keyof TaskPatch>;
98
98
  * Desired UX / Acceptance criteria / Notes for AI) is refused unless `--force`
99
99
  * is passed.
100
100
  */
101
- export declare function cmdUpdate(args: string[]): void;
101
+ export declare function cmdUpdate(args: string[]): Promise<void>;
102
102
  /**
103
103
  * Accepted flags for `repoos new`, derived from the shared help map so the
104
104
  * parse surface and `--help` can never disagree (#0699).
@@ -620,7 +620,7 @@ function shotsSectionContent(raw, preview, shot, task, root) {
620
620
  * Desired UX / Acceptance criteria / Notes for AI) is refused unless `--force`
621
621
  * is passed.
622
622
  */
623
- export function cmdUpdate(args) {
623
+ export async function cmdUpdate(args) {
624
624
  const [id, ...rest] = args;
625
625
  const usage = UPDATE_USAGE;
626
626
  if (!id) {
@@ -863,8 +863,22 @@ export function cmdUpdate(args) {
863
863
  }
864
864
  }
865
865
  try {
866
- const updated = patchTaskFile(repoos.config, task.absPath, patch);
866
+ let updated = patchTaskFile(repoos.config, task.absPath, patch);
867
+ // Keep direct CLI edits in lockstep with PATCH /api/tasks/:id: changing a
868
+ // task body, section, or assignee can raise or clear the spec-owned
869
+ // needs_input flag. Without this pass the UI and CLI leave different task
870
+ // states for the same edit.
871
+ if (patch.body !== undefined || patch.section !== undefined || patch.assignedTo !== undefined) {
872
+ const flagged = await flagTaskSpecFlagsIfNeededAsync(repoos.config, updated);
873
+ if (flagged)
874
+ updated = flagged;
875
+ }
867
876
  console.log(" " + c.green("updated ") + c.dim("#" + updated.id) + " " + updated.title);
877
+ if (updated.needsInput) {
878
+ console.log(" " +
879
+ c.yellow("needs input ") +
880
+ c.dim(updated.needsInputDetail || updated.needsInputReason || "waiting for a person"));
881
+ }
868
882
  const guideWarning = humanTaskGuideWarning(updated.assignee, updated.body);
869
883
  if (guideWarning)
870
884
  console.log(" " + c.yellow("warning: ") + c.dim(guideWarning));
@@ -886,6 +886,12 @@ function makeScreens(url) {
886
886
  },
887
887
  { name: "agents", prepare: (p) => gotoApp(p, url, "/agents") },
888
888
  { name: "settings", prepare: (p) => gotoApp(p, url, "/settings") },
889
+ { name: "checks", prepare: (p) => gotoApp(p, url, "/checks") },
890
+ // Keep the release and deployment surfaces in rendered contrast coverage;
891
+ // both pages gained substantial status and action UI beyond the original
892
+ // main-page set.
893
+ { name: "releases", prepare: (p) => gotoApp(p, url, "/releases") },
894
+ { name: "deployments", prepare: (p) => gotoApp(p, url, "/deployments") },
889
895
  // The Dev page (#0802): the declared target's command, real URL and chosen
890
896
  // port are text that must meet the floor in every theme scope.
891
897
  { name: "dev", prepare: (p) => gotoApp(p, url, "/dev") },
@@ -16,20 +16,43 @@ export interface SmokeResponse {
16
16
  status(): number;
17
17
  url(): string;
18
18
  }
19
+ /**
20
+ * What an intercepted request can do before fulfilling (#1226): `abort`
21
+ * simulates a dead network, `fetch` + `fulfill({ response })` passes the real
22
+ * response through after a delay (slow-network). Structural only — the real
23
+ * Playwright `Route` satisfies both.
24
+ */
25
+ export interface SmokeRoute {
26
+ /** The intercepted request (URL, method, post data) — used to branch handlers. */
27
+ request(): {
28
+ url(): string;
29
+ method(): string;
30
+ };
31
+ fetch(): Promise<{
32
+ status(): number;
33
+ body(): Promise<Buffer | string>;
34
+ json(): Promise<unknown>;
35
+ }>;
36
+ abort(): Promise<void>;
37
+ fulfill(options: {
38
+ status: number;
39
+ contentType: string;
40
+ body: string;
41
+ } | {
42
+ response: {
43
+ status(): number;
44
+ body(): Promise<Buffer | string>;
45
+ json(): Promise<unknown>;
46
+ };
47
+ }): Promise<void>;
48
+ }
19
49
  export interface SmokePage {
20
50
  on(event: "console", handler: (msg: SmokeConsoleMessage) => void): void;
21
51
  on(event: "pageerror", handler: (err: Error) => void): void;
22
52
  on(event: "response", handler: (res: SmokeResponse) => void): void;
23
- route(url: string, handler: (route: {
24
- fetch(): Promise<{
25
- json(): Promise<unknown>;
26
- }>;
27
- fulfill(options: {
28
- status: number;
29
- contentType: string;
30
- body: string;
31
- }): Promise<void>;
32
- }) => Promise<void>): Promise<void>;
53
+ /** Remove a previously-registered interception (offline → recovery). */
54
+ unroute(url: string, handler?: unknown): Promise<void>;
55
+ route(url: string, handler: (route: SmokeRoute) => Promise<void>): Promise<void>;
33
56
  close(): Promise<void>;
34
57
  goto(url: string, options: {
35
58
  waitUntil: string;
@@ -67,16 +90,7 @@ export interface SmokePage {
67
90
  type(text: string): Promise<void>;
68
91
  press(key: string): Promise<void>;
69
92
  };
70
- route(url: string, handler: (route: {
71
- fetch(): Promise<{
72
- json(): Promise<unknown>;
73
- }>;
74
- fulfill(options: {
75
- status: number;
76
- contentType: string;
77
- body: string;
78
- }): Promise<void>;
79
- }) => Promise<void>): Promise<void>;
93
+ route(url: string, handler: (route: SmokeRoute) => Promise<void>): Promise<void>;
80
94
  close(): Promise<void>;
81
95
  }
82
96
  export interface SmokeBrowser {
@@ -184,6 +184,74 @@ async function runUISmokeTest() {
184
184
  throw new Error(`${label} overflow at ${width}px viewport: body scrollWidth ${dims.scrollWidth} > innerWidth ${dims.innerWidth}`);
185
185
  }
186
186
  };
187
+ // Responsive layout matrix for the high-traffic screens (#1213). Each
188
+ // route uses the same deterministic preview fixtures as captured shots.
189
+ const assertResponsiveLayout = async (label, route, fixture, width) => {
190
+ await page.setViewportSize({ width, height: width < 600 ? 812 : 900 });
191
+ const separator = route.includes("?") ? "&" : "?";
192
+ await page.goto(`${server.url}${route}${separator}shotState=${encodeURIComponent(fixture)}`, {
193
+ waitUntil: "load",
194
+ timeout: 20_000,
195
+ });
196
+ await page.waitForFunction(() => Boolean(document.querySelector("#app")?.textContent?.trim()), { timeout: 8_000 });
197
+ const result = await page.evaluate(() => {
198
+ const width = window.innerWidth;
199
+ const overflow = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth);
200
+ const visible = (el) => {
201
+ const rect = el.getBoundingClientRect();
202
+ const style = getComputedStyle(el);
203
+ return (style.display !== "none" &&
204
+ style.visibility !== "hidden" &&
205
+ rect.width > 0 &&
206
+ rect.height > 0);
207
+ };
208
+ const clippedButtons = [];
209
+ for (const el of Array.from(document.querySelectorAll("button.btn.primary, button[data-primary-action]"))) {
210
+ if (!visible(el))
211
+ continue;
212
+ const rect = el.getBoundingClientRect();
213
+ if (rect.left < 0 || rect.right > width)
214
+ clippedButtons.push(el.innerText.trim().slice(0, 48));
215
+ for (let parent = el.parentElement; parent && parent !== document.body; parent = parent.parentElement) {
216
+ const style = getComputedStyle(parent);
217
+ if (!/(hidden|clip|auto|scroll)/.test(`${style.overflowX} ${style.overflowY}`))
218
+ continue;
219
+ const bounds = parent.getBoundingClientRect();
220
+ if (rect.left < bounds.left - 1 || rect.right > bounds.right + 1) {
221
+ clippedButtons.push(el.innerText.trim().slice(0, 48));
222
+ break;
223
+ }
224
+ }
225
+ }
226
+ const fixed = Array.from(document.querySelectorAll("body *"))
227
+ .filter((el) => visible(el) && getComputedStyle(el).position === "fixed")
228
+ .map((el) => ({ el, rect: el.getBoundingClientRect() }))
229
+ .filter(({ rect }) => rect.width > width * 0.55 && rect.height >= 20 && rect.height < 180);
230
+ const overlaps = [];
231
+ for (let i = 0; i < fixed.length; i++)
232
+ for (let j = i + 1; j < fixed.length; j++) {
233
+ const a = fixed[i].rect, b = fixed[j].rect;
234
+ if (a.left < b.right && a.right > b.left && a.top < b.bottom && a.bottom > b.top) {
235
+ overlaps.push(`${fixed[i].el.className || fixed[i].el.tagName}/${fixed[j].el.className || fixed[j].el.tagName}`);
236
+ }
237
+ }
238
+ return { overflow, width, clippedButtons, overlaps };
239
+ });
240
+ if (result.overflow > result.width)
241
+ throw new Error(`${label} has horizontal page scroll at ${width}px (${result.overflow}px)`);
242
+ if (result.clippedButtons.length)
243
+ throw new Error(`${label} primary button clipped at ${width}px: ${result.clippedButtons.join(", ")}`);
244
+ if (result.overlaps.length)
245
+ throw new Error(`${label} fixed bars overlap at ${width}px: ${result.overlaps.join(", ")}`);
246
+ };
247
+ const responsivePages = [
248
+ ["Work", "/work", "pages:scroll"],
249
+ ["Agents", "/agents", "agents:scheduledSeeded"],
250
+ ["Settings", "/settings", "settings:motionOff"],
251
+ ["Checks", "/checks", "checks:progress"],
252
+ ["Releases", "/releases", "release:cutReady"],
253
+ ["Task drawer", "/work?task=9999", "drawer:reviewWithBranch"],
254
+ ];
187
255
  await assertNoHorizontalOverflow("dashboard", server.url);
188
256
  await assertNoHorizontalOverflow("docs", `${server.url}/repo`);
189
257
  // #1133 — the Agents page replaced its header log with inline per-card
@@ -633,6 +701,12 @@ async function runUISmokeTest() {
633
701
  if (pageErrors.length > 0) {
634
702
  throw new Error("Page errors (" + pageErrors.length + "): " + pageErrors.join("; "));
635
703
  }
704
+ // Run after the interaction flows so fixture routes cannot affect them.
705
+ for (const [label, route, fixture] of responsivePages) {
706
+ for (const width of [375, 768, 1280]) {
707
+ await assertResponsiveLayout(label, route, fixture, width);
708
+ }
709
+ }
636
710
  }
637
711
  catch (err) {
638
712
  primaryError = { error: err };
@@ -1,4 +1,4 @@
1
- export type AgentFailureReasonId = "auth" | "model-unavailable" | "out-of-credit" | "usage-limit" | "network";
1
+ export type AgentFailureReasonId = "missing-cli" | "auth" | "model-unavailable" | "out-of-credit" | "usage-limit" | "network";
2
2
  export interface AgentFailureReason {
3
3
  id: AgentFailureReasonId;
4
4
  summary: string;
@@ -1,6 +1,7 @@
1
1
  /** Plain language summaries for common CLI failures. Raw CLI output remains in the transcript. */
2
2
  import { stripAnsi } from "./close-out-failure.js";
3
3
  const AUTH = /(?:not logged in|not authenticated|unauthenticated|authentication (?:failed|expired)|token expired|sign(?:ed)? out|please log in|oauth.*expired)/i;
4
+ const MISSING_CLI = /(?:\bENOENT\b|could not launch .+|command not found|no such file or directory)/i;
4
5
  const MODEL = /(?:cannot use this model|model.{0,40}(?:unavailable|not available|not found|unsupported)|unknown model)/i;
5
6
  const CREDIT = /(?:you need positive balance|insufficient (?:credit|balance)|payment required|\b402\b)/i;
6
7
  const LIMIT = /(?:usage limit|rate limit|quota exceeded|out of usage|too many requests|individual quota reached|resource_exhausted|\b429\b)/i;
@@ -76,6 +77,12 @@ export function classifyAgentFailure(detail, cli = "") {
76
77
  const text = stripAnsi(detail).trim();
77
78
  if (!text)
78
79
  return null;
80
+ if (MISSING_CLI.test(text))
81
+ return {
82
+ id: "missing-cli",
83
+ summary: `${cliName(cli)} CLI is not installed or could not be found.`,
84
+ fix: `Install ${cliName(cli)} and make sure its CLI is on this computer's PATH.`,
85
+ };
79
86
  if (/github copilot/i.test(cli) && /Reasoning effort .+ is not supported for model/i.test(text)) {
80
87
  return {
81
88
  id: "model-unavailable",
@@ -17,6 +17,7 @@ describe("classifyAgentFailure", () => {
17
17
  expect(classifyAgentFailure("Not logged in", cli)?.id).toBe("auth");
18
18
  });
19
19
  it.each([
20
+ ["opencode", "Could not launch opencode: spawn opencode ENOENT", "missing-cli"],
20
21
  ["cursor", "Cannot use this model: composer-2.5", "model-unavailable"],
21
22
  ["Claude Code", "OAuth token expired; please log in again", "auth"],
22
23
  ["GitHub Copilot", "Auto preference balance is unavailable", "model-unavailable"],
@@ -25,6 +26,13 @@ describe("classifyAgentFailure", () => {
25
26
  ])("classifies %s failure", (cli, text, id) => {
26
27
  expect(classifyAgentFailure(text, cli)?.id).toBe(id);
27
28
  });
29
+ it("gives an install and PATH fix for a missing CLI", () => {
30
+ expect(classifyAgentFailure("Could not launch opencode: spawn opencode ENOENT", "opencode")).toEqual({
31
+ id: "missing-cli",
32
+ summary: "OpenCode CLI is not installed or could not be found.",
33
+ fix: "Install OpenCode and make sure its CLI is on this computer's PATH.",
34
+ });
35
+ });
28
36
  it.each([
29
37
  [
30
38
  "opencode",