@wardby/cli 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/.env.example +8 -1
  2. package/README.md +3 -1
  3. package/deploy/local/docker-compose.quickstart-coding.yml +27 -0
  4. package/dist/claude-coding-worker/driver.d.ts +2 -0
  5. package/dist/claude-coding-worker/driver.js +19 -3
  6. package/dist/claude-coding-worker/sdk.js +1 -1
  7. package/dist/cli.js +41 -22
  8. package/dist/coding/continuation-wording.d.ts +10 -0
  9. package/dist/coding/continuation-wording.js +13 -0
  10. package/dist/coding/docker-preflight.d.ts +12 -0
  11. package/dist/coding/docker-preflight.js +40 -0
  12. package/dist/coding/local-git.d.ts +22 -0
  13. package/dist/coding/local-git.js +102 -0
  14. package/dist/coding/local-repo-status.d.ts +7 -0
  15. package/dist/coding/local-repo-status.js +56 -0
  16. package/dist/coding/local-repo.d.ts +17 -0
  17. package/dist/coding/local-repo.js +65 -0
  18. package/dist/coding/observability.d.ts +1 -1
  19. package/dist/coding/observability.js +1 -0
  20. package/dist/coding/profile.d.ts +6 -0
  21. package/dist/coding/profile.js +13 -4
  22. package/dist/coding/protocol.d.ts +32 -7
  23. package/dist/coding/protocol.js +66 -4
  24. package/dist/coding-worker/artifact.d.ts +1 -0
  25. package/dist/coding-worker/errors.js +2 -0
  26. package/dist/config/providers.d.ts +13 -0
  27. package/dist/config/providers.js +21 -9
  28. package/dist/core/attribution.d.ts +13 -0
  29. package/dist/core/attribution.js +30 -0
  30. package/dist/core/budget-groups.d.ts +3 -1
  31. package/dist/core/budget-groups.js +53 -5
  32. package/dist/core/ci-context.d.ts +8 -0
  33. package/dist/core/ci-context.js +59 -0
  34. package/dist/core/delegation-siblings.d.ts +22 -0
  35. package/dist/core/delegation-siblings.js +40 -0
  36. package/dist/core/dispatch.d.ts +28 -4
  37. package/dist/core/dispatch.js +57 -15
  38. package/dist/core/engine-native.d.ts +16 -0
  39. package/dist/core/engine-native.js +49 -2
  40. package/dist/core/host-events.d.ts +25 -2
  41. package/dist/core/host-events.js +361 -19
  42. package/dist/core/host-status.d.ts +8 -3
  43. package/dist/core/host-status.js +38 -7
  44. package/dist/core/issue-events.d.ts +2 -6
  45. package/dist/core/issue-events.js +13 -19
  46. package/dist/core/pull-request-state-sync.d.ts +17 -0
  47. package/dist/core/pull-request-state-sync.js +53 -0
  48. package/dist/core/reconciler.d.ts +10 -1
  49. package/dist/core/reconciler.js +15 -2
  50. package/dist/core/related-pull-requests.d.ts +95 -0
  51. package/dist/core/related-pull-requests.js +338 -0
  52. package/dist/core/repo-access.d.ts +5 -1
  53. package/dist/core/repo-access.js +17 -1
  54. package/dist/core/review-fix-ledger.d.ts +20 -0
  55. package/dist/core/review-fix-ledger.js +41 -0
  56. package/dist/core/review-fix.d.ts +60 -0
  57. package/dist/core/review-fix.js +155 -0
  58. package/dist/core/review-host-tools.d.ts +13 -2
  59. package/dist/core/review-host-tools.js +72 -11
  60. package/dist/core/runner.d.ts +2 -2
  61. package/dist/core/runner.js +379 -184
  62. package/dist/core/serial-gate.d.ts +11 -0
  63. package/dist/core/serial-gate.js +19 -0
  64. package/dist/core/timing.d.ts +7 -0
  65. package/dist/core/timing.js +7 -0
  66. package/dist/generated/prisma/browser.d.ts +23 -0
  67. package/dist/generated/prisma/client.d.ts +23 -0
  68. package/dist/generated/prisma/commonInputTypes.d.ts +22 -0
  69. package/dist/generated/prisma/internal/class.d.ts +33 -0
  70. package/dist/generated/prisma/internal/class.js +4 -4
  71. package/dist/generated/prisma/internal/prismaNamespace.d.ts +274 -1
  72. package/dist/generated/prisma/internal/prismaNamespace.js +47 -2
  73. package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +48 -0
  74. package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +47 -2
  75. package/dist/generated/prisma/models/Agent.d.ts +422 -1
  76. package/dist/generated/prisma/models/AgentRepository.d.ts +120 -2
  77. package/dist/generated/prisma/models/CodingAgentProfile.d.ts +42 -1
  78. package/dist/generated/prisma/models/CodingRun.d.ts +205 -1
  79. package/dist/generated/prisma/models/DeferredReview.d.ts +1336 -0
  80. package/dist/generated/prisma/models/DeferredReview.js +1 -0
  81. package/dist/generated/prisma/models/LocalPullRequest.d.ts +1384 -0
  82. package/dist/generated/prisma/models/LocalPullRequest.js +1 -0
  83. package/dist/generated/prisma/models/LocalReview.d.ts +1315 -0
  84. package/dist/generated/prisma/models/LocalReview.js +1 -0
  85. package/dist/generated/prisma/models/Run.d.ts +223 -0
  86. package/dist/generated/prisma/models/RunHostCheck.d.ts +148 -1
  87. package/dist/generated/prisma/models.d.ts +3 -0
  88. package/dist/help-index.json +486 -37
  89. package/dist/import/neutral-schema.d.ts +2 -2
  90. package/dist/mcp/auth/access.d.ts +3 -1
  91. package/dist/mcp/auth/host-account-cli.js +2 -2
  92. package/dist/mcp/auth/repo-authorization.d.ts +6 -7
  93. package/dist/mcp/auth/repo-authorization.js +21 -0
  94. package/dist/mcp/index.js +4 -1
  95. package/dist/mcp/tools/agents.js +46 -4
  96. package/dist/mcp/tools/host-accounts.js +2 -2
  97. package/dist/mcp/tools/repositories.js +71 -12
  98. package/dist/mcp/tools/runs.js +23 -0
  99. package/dist/mcp/tools/trigger.js +153 -24
  100. package/dist/providers/engine/types.d.ts +11 -0
  101. package/dist/providers/executor/composition.js +12 -7
  102. package/dist/providers/executor/container.d.ts +40 -3
  103. package/dist/providers/executor/container.js +140 -9
  104. package/dist/providers/executor/types.d.ts +1 -1
  105. package/dist/providers/jobs/fake-kubernetes-api.d.ts +3 -2
  106. package/dist/providers/jobs/fake-kubernetes-api.js +3 -0
  107. package/dist/providers/jobs/kubernetes-api.d.ts +3 -1
  108. package/dist/providers/jobs/kubernetes-client.d.ts +2 -1
  109. package/dist/providers/jobs/kubernetes-client.js +3 -0
  110. package/dist/providers/jobs/kubernetes-isolation.d.ts +7 -0
  111. package/dist/providers/jobs/kubernetes-isolation.js +8 -3
  112. package/dist/providers/jobs/kubernetes-preflight.d.ts +8 -0
  113. package/dist/providers/jobs/kubernetes-preflight.js +7 -0
  114. package/dist/providers/jobs/kubernetes-quota.d.ts +31 -0
  115. package/dist/providers/jobs/kubernetes-quota.js +110 -0
  116. package/dist/providers/jobs/kubernetes.d.ts +9 -0
  117. package/dist/providers/jobs/kubernetes.js +50 -0
  118. package/dist/providers/jobs/types.d.ts +7 -0
  119. package/dist/providers/review-host/ci.d.ts +7 -0
  120. package/dist/providers/review-host/ci.js +20 -0
  121. package/dist/providers/review-host/github-events.d.ts +7 -0
  122. package/dist/providers/review-host/github-events.js +31 -7
  123. package/dist/providers/review-host/github.d.ts +19 -2
  124. package/dist/providers/review-host/github.js +145 -2
  125. package/dist/providers/review-host/index.d.ts +8 -2
  126. package/dist/providers/review-host/index.js +14 -3
  127. package/dist/providers/review-host/local.d.ts +72 -0
  128. package/dist/providers/review-host/local.js +434 -0
  129. package/dist/providers/review-host/types.d.ts +65 -3
  130. package/dist/providers/review-host/types.js +5 -3
  131. package/dist/providers/vcs/git.d.ts +10 -20
  132. package/dist/providers/vcs/git.js +71 -127
  133. package/dist/providers/vcs/github-remote.d.ts +67 -0
  134. package/dist/providers/vcs/github-remote.js +201 -0
  135. package/dist/providers/vcs/github.d.ts +81 -0
  136. package/dist/providers/vcs/github.js +203 -6
  137. package/dist/providers/vcs/index.d.ts +16 -1
  138. package/dist/providers/vcs/index.js +43 -15
  139. package/dist/providers/vcs/local-remote.d.ts +44 -0
  140. package/dist/providers/vcs/local-remote.js +108 -0
  141. package/dist/providers/vcs/remote.d.ts +58 -0
  142. package/dist/providers/vcs/remote.js +1 -0
  143. package/dist/providers/vcs/routing.d.ts +33 -0
  144. package/dist/providers/vcs/routing.js +52 -0
  145. package/dist/providers/vcs/types.d.ts +12 -1
  146. package/dist/quickstart/coding-db.d.ts +11 -0
  147. package/dist/quickstart/coding-db.js +75 -0
  148. package/dist/quickstart/coding-doctor.d.ts +13 -0
  149. package/dist/quickstart/coding-doctor.js +88 -0
  150. package/dist/quickstart/coding-images.d.ts +15 -0
  151. package/dist/quickstart/coding-images.js +79 -0
  152. package/dist/quickstart/coding-seed.d.ts +63 -0
  153. package/dist/quickstart/coding-seed.js +85 -0
  154. package/dist/quickstart/coding.d.ts +66 -0
  155. package/dist/quickstart/coding.js +430 -0
  156. package/dist/quickstart/images.d.ts +19 -0
  157. package/dist/quickstart/images.js +63 -0
  158. package/dist/quickstart/index.js +61 -12
  159. package/dist/quickstart/starter-services.d.ts +45 -0
  160. package/dist/quickstart/starter-services.js +186 -0
  161. package/dist/quickstart-images.json +1 -0
  162. package/dist/serve.js +14 -1
  163. package/dist/viewer/api-schema.d.ts +176 -0
  164. package/dist/viewer/api-schema.js +27 -2
  165. package/dist/viewer/graph.d.ts +7 -2
  166. package/dist/viewer/graph.js +25 -11
  167. package/dist/viewer/http.d.ts +7 -1
  168. package/dist/viewer/http.js +8 -3
  169. package/dist/viewer/infra.d.ts +2 -0
  170. package/dist/viewer/infra.js +23 -0
  171. package/dist/viewer/run-detail.d.ts +2 -1
  172. package/dist/viewer/run-detail.js +2 -2
  173. package/docs/agent-recipes.md +127 -5
  174. package/docs/code-review-agents.md +293 -38
  175. package/docs/coding-agent-setup.md +141 -2
  176. package/docs/coding-packages.md +21 -0
  177. package/docs/coding-services.md +3 -0
  178. package/docs/coding-worker-isolation.md +56 -20
  179. package/docs/getting-started-gke.md +24 -0
  180. package/docs/getting-started.md +196 -10
  181. package/docs/jira-agents.md +26 -5
  182. package/docs/security-deployment.md +9 -0
  183. package/docs/viewer-api.md +21 -2
  184. package/help/admin-viewer.md +11 -1
  185. package/help/agent-recipes.md +30 -4
  186. package/help/builder-agent.md +4 -0
  187. package/help/code-review-agents.md +82 -2
  188. package/help/coding-packages.md +12 -1
  189. package/help/coding-services.md +4 -0
  190. package/help/cost-attribution.md +3 -1
  191. package/help/creating-agents.md +3 -0
  192. package/help/deploy-gke.md +2 -1
  193. package/help/errors/coding-provider-not-configured.md +60 -0
  194. package/help/errors/coding-turn-limit.md +25 -0
  195. package/help/errors/continuation-closed.md +75 -0
  196. package/help/errors/local-branch-conflict.md +37 -0
  197. package/help/errors/local-path-invalid.md +30 -0
  198. package/help/errors/local-ref-invalid.md +36 -0
  199. package/help/errors/local-ref-not-found.md +41 -0
  200. package/help/errors/local-repo-not-allowed.md +46 -0
  201. package/help/errors/local-repo-not-found.md +39 -0
  202. package/help/errors/model-unavailable.md +7 -6
  203. package/help/errors/vcs-github-not-configured.md +34 -0
  204. package/help/getting-started.md +28 -0
  205. package/help/github.md +22 -5
  206. package/help/jira.md +9 -2
  207. package/help/local-repositories.md +182 -0
  208. package/help/related-pull-requests.md +89 -0
  209. package/help/review-fix-rounds.md +69 -0
  210. package/help/troubleshooting/budgets.md +11 -0
  211. package/help/troubleshooting/coding-workers.md +22 -0
  212. package/help/troubleshooting/repository-access.md +5 -0
  213. package/package.json +3 -2
  214. package/prisma/migrations/20261004100000_delegations_and_coding_turns/migration.sql +12 -0
  215. package/prisma/migrations/20261005000000_review_fix_rounds/migration.sql +5 -0
  216. package/prisma/migrations/20261006000000_parallel_delegations/migration.sql +6 -0
  217. package/prisma/migrations/20261007000000_ci_rereview/migration.sql +4 -0
  218. package/prisma/migrations/20261008000000_review_after_ci/migration.sql +33 -0
  219. package/prisma/migrations/20261009000001_coding_run_local_branch/migration.sql +7 -0
  220. package/prisma/migrations/20261009000002_local_review/migration.sql +50 -0
  221. package/prisma/schema.prisma +98 -1
@@ -57,13 +57,16 @@ export declare const RunTriggerSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
57
57
  kind: z.ZodLiteral<"issue">;
58
58
  provider: z.ZodString;
59
59
  issueKey: z.ZodString;
60
+ url: z.ZodNullable<z.ZodString>;
60
61
  }, "strip", z.ZodTypeAny, {
61
62
  provider: string;
62
63
  kind: "issue";
64
+ url: string | null;
63
65
  issueKey: string;
64
66
  }, {
65
67
  provider: string;
66
68
  kind: "issue";
69
+ url: string | null;
67
70
  issueKey: string;
68
71
  }>, z.ZodObject<{
69
72
  kind: z.ZodLiteral<"host_event">;
@@ -118,16 +121,19 @@ export declare const OutcomeSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject
118
121
  kind: z.ZodLiteral<"issue_comment">;
119
122
  provider: z.ZodString;
120
123
  issueKey: z.ZodString;
124
+ url: z.ZodNullable<z.ZodString>;
121
125
  at: z.ZodNullable<z.ZodString>;
122
126
  }, "strip", z.ZodTypeAny, {
123
127
  at: string | null;
124
128
  provider: string;
125
129
  kind: "issue_comment";
130
+ url: string | null;
126
131
  issueKey: string;
127
132
  }, {
128
133
  at: string | null;
129
134
  provider: string;
130
135
  kind: "issue_comment";
136
+ url: string | null;
131
137
  issueKey: string;
132
138
  }>, z.ZodObject<{
133
139
  kind: z.ZodLiteral<"check">;
@@ -236,13 +242,16 @@ export declare const GraphRunSchema: z.ZodObject<{
236
242
  kind: z.ZodLiteral<"issue">;
237
243
  provider: z.ZodString;
238
244
  issueKey: z.ZodString;
245
+ url: z.ZodNullable<z.ZodString>;
239
246
  }, "strip", z.ZodTypeAny, {
240
247
  provider: string;
241
248
  kind: "issue";
249
+ url: string | null;
242
250
  issueKey: string;
243
251
  }, {
244
252
  provider: string;
245
253
  kind: "issue";
254
+ url: string | null;
246
255
  issueKey: string;
247
256
  }>, z.ZodObject<{
248
257
  kind: z.ZodLiteral<"host_event">;
@@ -305,16 +314,19 @@ export declare const GraphRunSchema: z.ZodObject<{
305
314
  kind: z.ZodLiteral<"issue_comment">;
306
315
  provider: z.ZodString;
307
316
  issueKey: z.ZodString;
317
+ url: z.ZodNullable<z.ZodString>;
308
318
  at: z.ZodNullable<z.ZodString>;
309
319
  }, "strip", z.ZodTypeAny, {
310
320
  at: string | null;
311
321
  provider: string;
312
322
  kind: "issue_comment";
323
+ url: string | null;
313
324
  issueKey: string;
314
325
  }, {
315
326
  at: string | null;
316
327
  provider: string;
317
328
  kind: "issue_comment";
329
+ url: string | null;
318
330
  issueKey: string;
319
331
  }>, z.ZodObject<{
320
332
  kind: z.ZodLiteral<"check">;
@@ -411,6 +423,7 @@ export declare const GraphRunSchema: z.ZodObject<{
411
423
  } | {
412
424
  provider: string;
413
425
  kind: "issue";
426
+ url: string | null;
414
427
  issueKey: string;
415
428
  } | {
416
429
  kind: "host_event";
@@ -441,6 +454,7 @@ export declare const GraphRunSchema: z.ZodObject<{
441
454
  at: string | null;
442
455
  provider: string;
443
456
  kind: "issue_comment";
457
+ url: string | null;
444
458
  issueKey: string;
445
459
  } | {
446
460
  number: number | null;
@@ -490,6 +504,7 @@ export declare const GraphRunSchema: z.ZodObject<{
490
504
  } | {
491
505
  provider: string;
492
506
  kind: "issue";
507
+ url: string | null;
493
508
  issueKey: string;
494
509
  } | {
495
510
  kind: "host_event";
@@ -520,6 +535,7 @@ export declare const GraphRunSchema: z.ZodObject<{
520
535
  at: string | null;
521
536
  provider: string;
522
537
  kind: "issue_comment";
538
+ url: string | null;
523
539
  issueKey: string;
524
540
  } | {
525
541
  number: number | null;
@@ -615,13 +631,16 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
615
631
  kind: z.ZodLiteral<"issue">;
616
632
  provider: z.ZodString;
617
633
  issueKey: z.ZodString;
634
+ url: z.ZodNullable<z.ZodString>;
618
635
  }, "strip", z.ZodTypeAny, {
619
636
  provider: string;
620
637
  kind: "issue";
638
+ url: string | null;
621
639
  issueKey: string;
622
640
  }, {
623
641
  provider: string;
624
642
  kind: "issue";
643
+ url: string | null;
625
644
  issueKey: string;
626
645
  }>, z.ZodObject<{
627
646
  kind: z.ZodLiteral<"host_event">;
@@ -684,16 +703,19 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
684
703
  kind: z.ZodLiteral<"issue_comment">;
685
704
  provider: z.ZodString;
686
705
  issueKey: z.ZodString;
706
+ url: z.ZodNullable<z.ZodString>;
687
707
  at: z.ZodNullable<z.ZodString>;
688
708
  }, "strip", z.ZodTypeAny, {
689
709
  at: string | null;
690
710
  provider: string;
691
711
  kind: "issue_comment";
712
+ url: string | null;
692
713
  issueKey: string;
693
714
  }, {
694
715
  at: string | null;
695
716
  provider: string;
696
717
  kind: "issue_comment";
718
+ url: string | null;
697
719
  issueKey: string;
698
720
  }>, z.ZodObject<{
699
721
  kind: z.ZodLiteral<"check">;
@@ -790,6 +812,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
790
812
  } | {
791
813
  provider: string;
792
814
  kind: "issue";
815
+ url: string | null;
793
816
  issueKey: string;
794
817
  } | {
795
818
  kind: "host_event";
@@ -820,6 +843,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
820
843
  at: string | null;
821
844
  provider: string;
822
845
  kind: "issue_comment";
846
+ url: string | null;
823
847
  issueKey: string;
824
848
  } | {
825
849
  number: number | null;
@@ -869,6 +893,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
869
893
  } | {
870
894
  provider: string;
871
895
  kind: "issue";
896
+ url: string | null;
872
897
  issueKey: string;
873
898
  } | {
874
899
  kind: "host_event";
@@ -899,6 +924,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
899
924
  at: string | null;
900
925
  provider: string;
901
926
  kind: "issue_comment";
927
+ url: string | null;
902
928
  issueKey: string;
903
929
  } | {
904
930
  number: number | null;
@@ -985,6 +1011,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
985
1011
  } | {
986
1012
  provider: string;
987
1013
  kind: "issue";
1014
+ url: string | null;
988
1015
  issueKey: string;
989
1016
  } | {
990
1017
  kind: "host_event";
@@ -1015,6 +1042,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
1015
1042
  at: string | null;
1016
1043
  provider: string;
1017
1044
  kind: "issue_comment";
1045
+ url: string | null;
1018
1046
  issueKey: string;
1019
1047
  } | {
1020
1048
  number: number | null;
@@ -1079,6 +1107,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
1079
1107
  } | {
1080
1108
  provider: string;
1081
1109
  kind: "issue";
1110
+ url: string | null;
1082
1111
  issueKey: string;
1083
1112
  } | {
1084
1113
  kind: "host_event";
@@ -1109,6 +1138,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
1109
1138
  at: string | null;
1110
1139
  provider: string;
1111
1140
  kind: "issue_comment";
1141
+ url: string | null;
1112
1142
  issueKey: string;
1113
1143
  } | {
1114
1144
  number: number | null;
@@ -1197,13 +1227,16 @@ export declare const RunDetailSchema: z.ZodObject<{
1197
1227
  kind: z.ZodLiteral<"issue">;
1198
1228
  provider: z.ZodString;
1199
1229
  issueKey: z.ZodString;
1230
+ url: z.ZodNullable<z.ZodString>;
1200
1231
  }, "strip", z.ZodTypeAny, {
1201
1232
  provider: string;
1202
1233
  kind: "issue";
1234
+ url: string | null;
1203
1235
  issueKey: string;
1204
1236
  }, {
1205
1237
  provider: string;
1206
1238
  kind: "issue";
1239
+ url: string | null;
1207
1240
  issueKey: string;
1208
1241
  }>, z.ZodObject<{
1209
1242
  kind: z.ZodLiteral<"host_event">;
@@ -1266,16 +1299,19 @@ export declare const RunDetailSchema: z.ZodObject<{
1266
1299
  kind: z.ZodLiteral<"issue_comment">;
1267
1300
  provider: z.ZodString;
1268
1301
  issueKey: z.ZodString;
1302
+ url: z.ZodNullable<z.ZodString>;
1269
1303
  at: z.ZodNullable<z.ZodString>;
1270
1304
  }, "strip", z.ZodTypeAny, {
1271
1305
  at: string | null;
1272
1306
  provider: string;
1273
1307
  kind: "issue_comment";
1308
+ url: string | null;
1274
1309
  issueKey: string;
1275
1310
  }, {
1276
1311
  at: string | null;
1277
1312
  provider: string;
1278
1313
  kind: "issue_comment";
1314
+ url: string | null;
1279
1315
  issueKey: string;
1280
1316
  }>, z.ZodObject<{
1281
1317
  kind: z.ZodLiteral<"check">;
@@ -1427,6 +1463,7 @@ export declare const RunDetailSchema: z.ZodObject<{
1427
1463
  } | {
1428
1464
  provider: string;
1429
1465
  kind: "issue";
1466
+ url: string | null;
1430
1467
  issueKey: string;
1431
1468
  } | {
1432
1469
  kind: "host_event";
@@ -1472,6 +1509,7 @@ export declare const RunDetailSchema: z.ZodObject<{
1472
1509
  at: string | null;
1473
1510
  provider: string;
1474
1511
  kind: "issue_comment";
1512
+ url: string | null;
1475
1513
  issueKey: string;
1476
1514
  } | {
1477
1515
  number: number | null;
@@ -1523,6 +1561,7 @@ export declare const RunDetailSchema: z.ZodObject<{
1523
1561
  } | {
1524
1562
  provider: string;
1525
1563
  kind: "issue";
1564
+ url: string | null;
1526
1565
  issueKey: string;
1527
1566
  } | {
1528
1567
  kind: "host_event";
@@ -1568,6 +1607,7 @@ export declare const RunDetailSchema: z.ZodObject<{
1568
1607
  at: string | null;
1569
1608
  provider: string;
1570
1609
  kind: "issue_comment";
1610
+ url: string | null;
1571
1611
  issueKey: string;
1572
1612
  } | {
1573
1613
  number: number | null;
@@ -1655,6 +1695,63 @@ export type GraphRun = z.infer<typeof GraphRunSchema>;
1655
1695
  export type GraphSnapshot = z.infer<typeof GraphSnapshotSchema>;
1656
1696
  export type RunDetail = z.infer<typeof RunDetailSchema>;
1657
1697
  export type ViewerEvent = z.infer<typeof ViewerEventSchema>;
1698
+ /** How this deployment runs coding jobs, for the desktop viewer's Infrastructure view (GET /admin/api/infra). */
1699
+ export declare const InfraInfoSchema: z.ZodObject<{
1700
+ launcher: z.ZodEnum<["local", "docker", "kubernetes"]>;
1701
+ kubernetes: z.ZodNullable<z.ZodObject<{
1702
+ namespace: z.ZodString;
1703
+ platform: z.ZodString;
1704
+ runtimeClass: z.ZodNullable<z.ZodString>;
1705
+ proxyService: z.ZodString;
1706
+ runLabel: z.ZodString;
1707
+ runLabelHashChars: z.ZodNumber;
1708
+ componentLabel: z.ZodRecord<z.ZodString, z.ZodString>;
1709
+ managedByLabel: z.ZodRecord<z.ZodString, z.ZodString>;
1710
+ }, "strip", z.ZodTypeAny, {
1711
+ namespace: string;
1712
+ platform: string;
1713
+ proxyService: string;
1714
+ runtimeClass: string | null;
1715
+ runLabel: string;
1716
+ runLabelHashChars: number;
1717
+ componentLabel: Record<string, string>;
1718
+ managedByLabel: Record<string, string>;
1719
+ }, {
1720
+ namespace: string;
1721
+ platform: string;
1722
+ proxyService: string;
1723
+ runtimeClass: string | null;
1724
+ runLabel: string;
1725
+ runLabelHashChars: number;
1726
+ componentLabel: Record<string, string>;
1727
+ managedByLabel: Record<string, string>;
1728
+ }>>;
1729
+ }, "strip", z.ZodTypeAny, {
1730
+ kubernetes: {
1731
+ namespace: string;
1732
+ platform: string;
1733
+ proxyService: string;
1734
+ runtimeClass: string | null;
1735
+ runLabel: string;
1736
+ runLabelHashChars: number;
1737
+ componentLabel: Record<string, string>;
1738
+ managedByLabel: Record<string, string>;
1739
+ } | null;
1740
+ launcher: "local" | "docker" | "kubernetes";
1741
+ }, {
1742
+ kubernetes: {
1743
+ namespace: string;
1744
+ platform: string;
1745
+ proxyService: string;
1746
+ runtimeClass: string | null;
1747
+ runLabel: string;
1748
+ runLabelHashChars: number;
1749
+ componentLabel: Record<string, string>;
1750
+ managedByLabel: Record<string, string>;
1751
+ } | null;
1752
+ launcher: "local" | "docker" | "kubernetes";
1753
+ }>;
1754
+ export type InfraInfo = z.infer<typeof InfraInfoSchema>;
1658
1755
  export declare const VIEWER_SCHEMAS: {
1659
1756
  readonly "graph-snapshot": z.ZodObject<{
1660
1757
  generatedAt: z.ZodString;
@@ -1721,13 +1818,16 @@ export declare const VIEWER_SCHEMAS: {
1721
1818
  kind: z.ZodLiteral<"issue">;
1722
1819
  provider: z.ZodString;
1723
1820
  issueKey: z.ZodString;
1821
+ url: z.ZodNullable<z.ZodString>;
1724
1822
  }, "strip", z.ZodTypeAny, {
1725
1823
  provider: string;
1726
1824
  kind: "issue";
1825
+ url: string | null;
1727
1826
  issueKey: string;
1728
1827
  }, {
1729
1828
  provider: string;
1730
1829
  kind: "issue";
1830
+ url: string | null;
1731
1831
  issueKey: string;
1732
1832
  }>, z.ZodObject<{
1733
1833
  kind: z.ZodLiteral<"host_event">;
@@ -1790,16 +1890,19 @@ export declare const VIEWER_SCHEMAS: {
1790
1890
  kind: z.ZodLiteral<"issue_comment">;
1791
1891
  provider: z.ZodString;
1792
1892
  issueKey: z.ZodString;
1893
+ url: z.ZodNullable<z.ZodString>;
1793
1894
  at: z.ZodNullable<z.ZodString>;
1794
1895
  }, "strip", z.ZodTypeAny, {
1795
1896
  at: string | null;
1796
1897
  provider: string;
1797
1898
  kind: "issue_comment";
1899
+ url: string | null;
1798
1900
  issueKey: string;
1799
1901
  }, {
1800
1902
  at: string | null;
1801
1903
  provider: string;
1802
1904
  kind: "issue_comment";
1905
+ url: string | null;
1803
1906
  issueKey: string;
1804
1907
  }>, z.ZodObject<{
1805
1908
  kind: z.ZodLiteral<"check">;
@@ -1896,6 +1999,7 @@ export declare const VIEWER_SCHEMAS: {
1896
1999
  } | {
1897
2000
  provider: string;
1898
2001
  kind: "issue";
2002
+ url: string | null;
1899
2003
  issueKey: string;
1900
2004
  } | {
1901
2005
  kind: "host_event";
@@ -1926,6 +2030,7 @@ export declare const VIEWER_SCHEMAS: {
1926
2030
  at: string | null;
1927
2031
  provider: string;
1928
2032
  kind: "issue_comment";
2033
+ url: string | null;
1929
2034
  issueKey: string;
1930
2035
  } | {
1931
2036
  number: number | null;
@@ -1975,6 +2080,7 @@ export declare const VIEWER_SCHEMAS: {
1975
2080
  } | {
1976
2081
  provider: string;
1977
2082
  kind: "issue";
2083
+ url: string | null;
1978
2084
  issueKey: string;
1979
2085
  } | {
1980
2086
  kind: "host_event";
@@ -2005,6 +2111,7 @@ export declare const VIEWER_SCHEMAS: {
2005
2111
  at: string | null;
2006
2112
  provider: string;
2007
2113
  kind: "issue_comment";
2114
+ url: string | null;
2008
2115
  issueKey: string;
2009
2116
  } | {
2010
2117
  number: number | null;
@@ -2091,6 +2198,7 @@ export declare const VIEWER_SCHEMAS: {
2091
2198
  } | {
2092
2199
  provider: string;
2093
2200
  kind: "issue";
2201
+ url: string | null;
2094
2202
  issueKey: string;
2095
2203
  } | {
2096
2204
  kind: "host_event";
@@ -2121,6 +2229,7 @@ export declare const VIEWER_SCHEMAS: {
2121
2229
  at: string | null;
2122
2230
  provider: string;
2123
2231
  kind: "issue_comment";
2232
+ url: string | null;
2124
2233
  issueKey: string;
2125
2234
  } | {
2126
2235
  number: number | null;
@@ -2185,6 +2294,7 @@ export declare const VIEWER_SCHEMAS: {
2185
2294
  } | {
2186
2295
  provider: string;
2187
2296
  kind: "issue";
2297
+ url: string | null;
2188
2298
  issueKey: string;
2189
2299
  } | {
2190
2300
  kind: "host_event";
@@ -2215,6 +2325,7 @@ export declare const VIEWER_SCHEMAS: {
2215
2325
  at: string | null;
2216
2326
  provider: string;
2217
2327
  kind: "issue_comment";
2328
+ url: string | null;
2218
2329
  issueKey: string;
2219
2330
  } | {
2220
2331
  number: number | null;
@@ -2303,13 +2414,16 @@ export declare const VIEWER_SCHEMAS: {
2303
2414
  kind: z.ZodLiteral<"issue">;
2304
2415
  provider: z.ZodString;
2305
2416
  issueKey: z.ZodString;
2417
+ url: z.ZodNullable<z.ZodString>;
2306
2418
  }, "strip", z.ZodTypeAny, {
2307
2419
  provider: string;
2308
2420
  kind: "issue";
2421
+ url: string | null;
2309
2422
  issueKey: string;
2310
2423
  }, {
2311
2424
  provider: string;
2312
2425
  kind: "issue";
2426
+ url: string | null;
2313
2427
  issueKey: string;
2314
2428
  }>, z.ZodObject<{
2315
2429
  kind: z.ZodLiteral<"host_event">;
@@ -2372,16 +2486,19 @@ export declare const VIEWER_SCHEMAS: {
2372
2486
  kind: z.ZodLiteral<"issue_comment">;
2373
2487
  provider: z.ZodString;
2374
2488
  issueKey: z.ZodString;
2489
+ url: z.ZodNullable<z.ZodString>;
2375
2490
  at: z.ZodNullable<z.ZodString>;
2376
2491
  }, "strip", z.ZodTypeAny, {
2377
2492
  at: string | null;
2378
2493
  provider: string;
2379
2494
  kind: "issue_comment";
2495
+ url: string | null;
2380
2496
  issueKey: string;
2381
2497
  }, {
2382
2498
  at: string | null;
2383
2499
  provider: string;
2384
2500
  kind: "issue_comment";
2501
+ url: string | null;
2385
2502
  issueKey: string;
2386
2503
  }>, z.ZodObject<{
2387
2504
  kind: z.ZodLiteral<"check">;
@@ -2533,6 +2650,7 @@ export declare const VIEWER_SCHEMAS: {
2533
2650
  } | {
2534
2651
  provider: string;
2535
2652
  kind: "issue";
2653
+ url: string | null;
2536
2654
  issueKey: string;
2537
2655
  } | {
2538
2656
  kind: "host_event";
@@ -2578,6 +2696,7 @@ export declare const VIEWER_SCHEMAS: {
2578
2696
  at: string | null;
2579
2697
  provider: string;
2580
2698
  kind: "issue_comment";
2699
+ url: string | null;
2581
2700
  issueKey: string;
2582
2701
  } | {
2583
2702
  number: number | null;
@@ -2629,6 +2748,7 @@ export declare const VIEWER_SCHEMAS: {
2629
2748
  } | {
2630
2749
  provider: string;
2631
2750
  kind: "issue";
2751
+ url: string | null;
2632
2752
  issueKey: string;
2633
2753
  } | {
2634
2754
  kind: "host_event";
@@ -2674,6 +2794,7 @@ export declare const VIEWER_SCHEMAS: {
2674
2794
  at: string | null;
2675
2795
  provider: string;
2676
2796
  kind: "issue_comment";
2797
+ url: string | null;
2677
2798
  issueKey: string;
2678
2799
  } | {
2679
2800
  number: number | null;
@@ -2754,4 +2875,59 @@ export declare const VIEWER_SCHEMAS: {
2754
2875
  kind: "outcome";
2755
2876
  source: "pull_request" | "host_status" | "issue_status" | "host_check";
2756
2877
  }>]>;
2878
+ readonly "infra-info": z.ZodObject<{
2879
+ launcher: z.ZodEnum<["local", "docker", "kubernetes"]>;
2880
+ kubernetes: z.ZodNullable<z.ZodObject<{
2881
+ namespace: z.ZodString;
2882
+ platform: z.ZodString;
2883
+ runtimeClass: z.ZodNullable<z.ZodString>;
2884
+ proxyService: z.ZodString;
2885
+ runLabel: z.ZodString;
2886
+ runLabelHashChars: z.ZodNumber;
2887
+ componentLabel: z.ZodRecord<z.ZodString, z.ZodString>;
2888
+ managedByLabel: z.ZodRecord<z.ZodString, z.ZodString>;
2889
+ }, "strip", z.ZodTypeAny, {
2890
+ namespace: string;
2891
+ platform: string;
2892
+ proxyService: string;
2893
+ runtimeClass: string | null;
2894
+ runLabel: string;
2895
+ runLabelHashChars: number;
2896
+ componentLabel: Record<string, string>;
2897
+ managedByLabel: Record<string, string>;
2898
+ }, {
2899
+ namespace: string;
2900
+ platform: string;
2901
+ proxyService: string;
2902
+ runtimeClass: string | null;
2903
+ runLabel: string;
2904
+ runLabelHashChars: number;
2905
+ componentLabel: Record<string, string>;
2906
+ managedByLabel: Record<string, string>;
2907
+ }>>;
2908
+ }, "strip", z.ZodTypeAny, {
2909
+ kubernetes: {
2910
+ namespace: string;
2911
+ platform: string;
2912
+ proxyService: string;
2913
+ runtimeClass: string | null;
2914
+ runLabel: string;
2915
+ runLabelHashChars: number;
2916
+ componentLabel: Record<string, string>;
2917
+ managedByLabel: Record<string, string>;
2918
+ } | null;
2919
+ launcher: "local" | "docker" | "kubernetes";
2920
+ }, {
2921
+ kubernetes: {
2922
+ namespace: string;
2923
+ platform: string;
2924
+ proxyService: string;
2925
+ runtimeClass: string | null;
2926
+ runLabel: string;
2927
+ runLabelHashChars: number;
2928
+ componentLabel: Record<string, string>;
2929
+ managedByLabel: Record<string, string>;
2930
+ } | null;
2931
+ launcher: "local" | "docker" | "kubernetes";
2932
+ }>;
2757
2933
  };
@@ -29,7 +29,8 @@ export const RunTriggerSchema = z.discriminatedUnion("kind", [
29
29
  number: z.number().int().nullable(),
30
30
  event: z.enum(["review", "mention"]),
31
31
  }),
32
- z.object({ kind: z.literal("issue"), provider: z.string(), issueKey: z.string() }),
32
+ /** `url`: the issue's page on the tracker, or null when the server has no site configured for it. */
33
+ z.object({ kind: z.literal("issue"), provider: z.string(), issueKey: z.string(), url: z.string().nullable() }),
33
34
  z.object({ kind: z.literal("host_event") }),
34
35
  ]);
35
36
  /** When the outcome happened (PR opened, comment last updated, check completed); null while a check is pending. */
@@ -51,7 +52,14 @@ export const OutcomeSchema = z.discriminatedUnion("kind", [
51
52
  number: z.number().int(),
52
53
  at: OutcomeAtSchema,
53
54
  }),
54
- z.object({ kind: z.literal("issue_comment"), provider: z.string(), issueKey: z.string(), at: OutcomeAtSchema }),
55
+ /** `url` opens the issue at wardby's comment, or null when the server has no site configured for it. */
56
+ z.object({
57
+ kind: z.literal("issue_comment"),
58
+ provider: z.string(),
59
+ issueKey: z.string(),
60
+ url: z.string().nullable(),
61
+ at: OutcomeAtSchema,
62
+ }),
55
63
  z.object({
56
64
  kind: z.literal("check"),
57
65
  provider: z.string(),
@@ -158,8 +166,25 @@ export const ViewerEventSchema = z.discriminatedUnion("kind", [
158
166
  source: z.enum(["pull_request", "host_status", "issue_status", "host_check"]),
159
167
  }),
160
168
  ]);
169
+ /** How this deployment runs coding jobs, for the desktop viewer's Infrastructure view (GET /admin/api/infra). */
170
+ export const InfraInfoSchema = z.object({
171
+ launcher: z.enum(["local", "docker", "kubernetes"]),
172
+ kubernetes: z
173
+ .object({
174
+ namespace: z.string(),
175
+ platform: z.string(),
176
+ runtimeClass: z.string().nullable(),
177
+ proxyService: z.string(),
178
+ runLabel: z.string(),
179
+ runLabelHashChars: z.number().int(),
180
+ componentLabel: z.record(z.string(), z.string()),
181
+ managedByLabel: z.record(z.string(), z.string()),
182
+ })
183
+ .nullable(),
184
+ });
161
185
  export const VIEWER_SCHEMAS = {
162
186
  "graph-snapshot": GraphSnapshotSchema,
163
187
  "run-detail": RunDetailSchema,
164
188
  "viewer-event": ViewerEventSchema,
189
+ "infra-info": InfraInfoSchema,
165
190
  };
@@ -28,13 +28,18 @@ type RunRow = Prisma.RunGetPayload<{
28
28
  include: typeof runInclude;
29
29
  }>;
30
30
  type PullRequestRow = Prisma.IssuePullRequestGetPayload<object>;
31
+ /** Site origin per issue-tracker provider (e.g. `{ jira: "https://your-site.atlassian.net" }`), for links. */
32
+ export type IssueSites = Readonly<Record<string, string>>;
33
+ /** The tracker's page for an issue (and, with a comment id, that comment); null without a known site. */
34
+ export declare function issueUrl(sites: IssueSites, provider: string, issueKey: string, commentId?: string | null): string | null;
31
35
  /** The one row -> GraphRun mapping (also used by run detail). `pullRequests` are the IssuePullRequest rows this run opened. */
32
- export declare function toGraphRun(row: RunRow, pullRequests: readonly PullRequestRow[]): GraphRun;
36
+ export declare function toGraphRun(row: RunRow, pullRequests: readonly PullRequestRow[], sites?: IssueSites): GraphRun;
33
37
  /** Loads the given runs as GraphRuns (shared with run detail); unknown ids are skipped. */
34
- export declare function loadGraphRuns(db: PrismaClient, runIds: readonly string[]): Promise<GraphRun[]>;
38
+ export declare function loadGraphRuns(db: PrismaClient, runIds: readonly string[], sites?: IssueSites): Promise<GraphRun[]>;
35
39
  export declare function loadGraph(db: PrismaClient, options: {
36
40
  since: Date;
37
41
  limit: number;
38
42
  now?: Date;
43
+ issueSites?: IssueSites;
39
44
  }): Promise<GraphSnapshot>;
40
45
  export {};