@knpkv/herdr-approvals 0.2.0

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 (133) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -0
  3. package/dist/activity-history.d.ts +36 -0
  4. package/dist/activity-history.d.ts.map +1 -0
  5. package/dist/activity-history.js +233 -0
  6. package/dist/activity-history.js.map +1 -0
  7. package/dist/approval-app-view.d.ts +26 -0
  8. package/dist/approval-app-view.d.ts.map +1 -0
  9. package/dist/approval-app-view.js +79 -0
  10. package/dist/approval-app-view.js.map +1 -0
  11. package/dist/approval-client.d.ts +2 -0
  12. package/dist/approval-client.d.ts.map +1 -0
  13. package/dist/approval-client.js +520 -0
  14. package/dist/approval-client.js.map +1 -0
  15. package/dist/approval-sw.js +28 -0
  16. package/dist/approval-sw.js.map +7 -0
  17. package/dist/approval-url.d.ts +37 -0
  18. package/dist/approval-url.d.ts.map +1 -0
  19. package/dist/approval-url.js +37 -0
  20. package/dist/approval-url.js.map +1 -0
  21. package/dist/approval.js +188 -0
  22. package/dist/approval.js.map +7 -0
  23. package/dist/auth.d.ts +10 -0
  24. package/dist/auth.d.ts.map +1 -0
  25. package/dist/auth.js +14 -0
  26. package/dist/auth.js.map +1 -0
  27. package/dist/bin.d.ts +3 -0
  28. package/dist/bin.d.ts.map +1 -0
  29. package/dist/bin.js +47 -0
  30. package/dist/bin.js.map +1 -0
  31. package/dist/connect-entry.d.ts +2 -0
  32. package/dist/connect-entry.d.ts.map +1 -0
  33. package/dist/connect-entry.js +2 -0
  34. package/dist/connect-entry.js.map +1 -0
  35. package/dist/connect.js +188 -0
  36. package/dist/connect.js.map +7 -0
  37. package/dist/dashboard-model.d.ts +719 -0
  38. package/dist/dashboard-model.d.ts.map +1 -0
  39. package/dist/dashboard-model.js +83 -0
  40. package/dist/dashboard-model.js.map +1 -0
  41. package/dist/dashboard-view.d.ts +42 -0
  42. package/dist/dashboard-view.d.ts.map +1 -0
  43. package/dist/dashboard-view.js +194 -0
  44. package/dist/dashboard-view.js.map +1 -0
  45. package/dist/errors.d.ts +33 -0
  46. package/dist/errors.d.ts.map +1 -0
  47. package/dist/errors.js +12 -0
  48. package/dist/errors.js.map +1 -0
  49. package/dist/fleetctl-submission.d.ts +68 -0
  50. package/dist/fleetctl-submission.d.ts.map +1 -0
  51. package/dist/fleetctl-submission.js +31 -0
  52. package/dist/fleetctl-submission.js.map +1 -0
  53. package/dist/fleetctl.d.ts +22 -0
  54. package/dist/fleetctl.d.ts.map +1 -0
  55. package/dist/fleetctl.js +264 -0
  56. package/dist/fleetctl.js.map +1 -0
  57. package/dist/geist-latin-wght-normal.woff2 +0 -0
  58. package/dist/geist-mono-latin-wght-normal.woff2 +0 -0
  59. package/dist/http.d.ts +1512 -0
  60. package/dist/http.d.ts.map +1 -0
  61. package/dist/http.js +1653 -0
  62. package/dist/http.js.map +1 -0
  63. package/dist/index.css +2 -0
  64. package/dist/index.css.map +7 -0
  65. package/dist/index.d.ts +12 -0
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/index.js +12 -0
  68. package/dist/index.js.map +1 -0
  69. package/dist/internal/config-path.d.ts +3 -0
  70. package/dist/internal/config-path.d.ts.map +1 -0
  71. package/dist/internal/config-path.js +3 -0
  72. package/dist/internal/config-path.js.map +1 -0
  73. package/dist/internal/dashboard-pending-state.d.ts +49 -0
  74. package/dist/internal/dashboard-pending-state.d.ts.map +1 -0
  75. package/dist/internal/dashboard-pending-state.js +98 -0
  76. package/dist/internal/dashboard-pending-state.js.map +1 -0
  77. package/dist/internal/fleet-follow.d.ts +54 -0
  78. package/dist/internal/fleet-follow.d.ts.map +1 -0
  79. package/dist/internal/fleet-follow.js +10 -0
  80. package/dist/internal/fleet-follow.js.map +1 -0
  81. package/dist/internal/fleet-request.d.ts +4 -0
  82. package/dist/internal/fleet-request.d.ts.map +1 -0
  83. package/dist/internal/fleet-request.js +11 -0
  84. package/dist/internal/fleet-request.js.map +1 -0
  85. package/dist/internal/html.d.ts +3 -0
  86. package/dist/internal/html.d.ts.map +1 -0
  87. package/dist/internal/html.js +8 -0
  88. package/dist/internal/html.js.map +1 -0
  89. package/dist/internal/websocket.d.ts +4 -0
  90. package/dist/internal/websocket.d.ts.map +1 -0
  91. package/dist/internal/websocket.js +12 -0
  92. package/dist/internal/websocket.js.map +1 -0
  93. package/dist/model.d.ts +40 -0
  94. package/dist/model.d.ts.map +1 -0
  95. package/dist/model.js +53 -0
  96. package/dist/model.js.map +1 -0
  97. package/dist/operations.d.ts +72 -0
  98. package/dist/operations.d.ts.map +1 -0
  99. package/dist/operations.js +284 -0
  100. package/dist/operations.js.map +1 -0
  101. package/dist/push-policy.d.ts +3 -0
  102. package/dist/push-policy.d.ts.map +1 -0
  103. package/dist/push-policy.js +3 -0
  104. package/dist/push-policy.js.map +1 -0
  105. package/dist/push-sender.d.ts +18 -0
  106. package/dist/push-sender.d.ts.map +1 -0
  107. package/dist/push-sender.js +33 -0
  108. package/dist/push-sender.js.map +1 -0
  109. package/dist/push-subscription.d.ts +17 -0
  110. package/dist/push-subscription.d.ts.map +1 -0
  111. package/dist/push-subscription.js +62 -0
  112. package/dist/push-subscription.js.map +1 -0
  113. package/dist/push-worker.d.ts +20 -0
  114. package/dist/push-worker.d.ts.map +1 -0
  115. package/dist/push-worker.js +32 -0
  116. package/dist/push-worker.js.map +1 -0
  117. package/dist/pwa.d.ts +39 -0
  118. package/dist/pwa.d.ts.map +1 -0
  119. package/dist/pwa.js +51 -0
  120. package/dist/pwa.js.map +1 -0
  121. package/dist/shell-view.d.ts +20 -0
  122. package/dist/shell-view.d.ts.map +1 -0
  123. package/dist/shell-view.js +86 -0
  124. package/dist/shell-view.js.map +1 -0
  125. package/dist/store.d.ts +46 -0
  126. package/dist/store.d.ts.map +1 -0
  127. package/dist/store.js +291 -0
  128. package/dist/store.js.map +1 -0
  129. package/dist/work-checkpoint.d.ts +107 -0
  130. package/dist/work-checkpoint.d.ts.map +1 -0
  131. package/dist/work-checkpoint.js +37 -0
  132. package/dist/work-checkpoint.js.map +1 -0
  133. package/package.json +90 -0
package/dist/http.d.ts ADDED
@@ -0,0 +1,1512 @@
1
+ import type { TerminalConnector } from "@knpkv/herdr-connect";
2
+ import type { FleetApprovalError, FleetJobConflictError, FleetService, FleetStoreError, FleetTransitionConflictError, HostConfiguration } from "@knpkv/herdr-fleet";
3
+ import { FleetJobNotFoundError, FleetOperationError, FleetValidationError } from "@knpkv/herdr-fleet";
4
+ import { Tailscale } from "@knpkv/herdr-tailscale";
5
+ import type { WorkCheckpointConflictError, WorkProjectionError, WorkService, WorkStoreError } from "@knpkv/herdr-work";
6
+ import { WorkGoalCheckpoint } from "@knpkv/herdr-work/model";
7
+ import { Effect } from "effect";
8
+ import * as HttpClient from "effect/unstable/http/HttpClient";
9
+ import { type DashboardSnapshot } from "./dashboard-model.js";
10
+ import { DashboardResponseBudgetError } from "./errors.js";
11
+ import { makePushSender } from "./push-sender.js";
12
+ export type UiAssets = {
13
+ readonly script: string;
14
+ readonly connectScript: string;
15
+ readonly worker: string;
16
+ readonly stylesheet: string;
17
+ readonly fonts: ReadonlyMap<string, Uint8Array>;
18
+ };
19
+ type Runner = {
20
+ readonly close: () => Promise<void>;
21
+ readonly enqueue: (jobId: string) => Promise<boolean>;
22
+ };
23
+ type PushSender = ReturnType<typeof makePushSender>;
24
+ export type HttpServerOptions = {
25
+ readonly now?: () => number;
26
+ readonly pushSender?: PushSender;
27
+ readonly terminalConnector?: TerminalConnector;
28
+ };
29
+ export declare const listenerAuthority: (address: string, port: number) => string;
30
+ export declare const recordWorkCheckpointRequest: <AuthorizationError, AuthorizationRequirements, DecodeError, DecodeRequirements>(authorization: Effect.Effect<"local", AuthorizationError, AuthorizationRequirements>, decode: Effect.Effect<WorkGoalCheckpoint, DecodeError, DecodeRequirements>, work: WorkService) => Effect.Effect<WorkGoalCheckpoint, AuthorizationError | DecodeError | WorkCheckpointConflictError | WorkProjectionError | WorkStoreError, AuthorizationRequirements | DecodeRequirements>;
31
+ export declare const dashboardSnapshotBytes: (snapshot: DashboardSnapshot) => number;
32
+ export declare const budgetDashboardSnapshot: (snapshot: {
33
+ readonly host: string;
34
+ readonly observedAt: number;
35
+ readonly approvalsEnabled: boolean;
36
+ readonly approvalApp: {
37
+ readonly canonical: boolean;
38
+ readonly canonicalUrl: string;
39
+ readonly chatEnabled: boolean;
40
+ readonly pushEnabled: boolean;
41
+ };
42
+ readonly chat: {
43
+ readonly entries: readonly {
44
+ readonly createdAt: number;
45
+ readonly id: string;
46
+ readonly message: string;
47
+ readonly mode: "ask" | "work";
48
+ readonly reply: string | null;
49
+ readonly state: "completed" | "failed" | "interrupted" | "pending" | "running";
50
+ readonly updatedAt: number;
51
+ readonly worker?: {
52
+ readonly host: string;
53
+ readonly agentId: string;
54
+ readonly name: string;
55
+ readonly paneId: string;
56
+ readonly relationship?: {
57
+ readonly parentAgentId: string;
58
+ readonly relation: "delegated" | "pair" | "review";
59
+ };
60
+ };
61
+ readonly connectTarget?: {
62
+ readonly host: string;
63
+ readonly agentId: string;
64
+ readonly url: string;
65
+ };
66
+ }[];
67
+ } | null;
68
+ readonly work: {
69
+ readonly observedAt: number;
70
+ readonly now: {
71
+ readonly window: "day" | "month" | "now" | "week";
72
+ readonly observedAt: number;
73
+ readonly asOf: number;
74
+ readonly goals: readonly {
75
+ readonly id: string;
76
+ readonly title: string;
77
+ readonly summary: string;
78
+ readonly detail: string;
79
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
80
+ readonly owner: {
81
+ readonly id: string;
82
+ readonly name: string;
83
+ };
84
+ readonly repository: {
85
+ readonly repository: string;
86
+ readonly branch: string;
87
+ };
88
+ readonly spend: {
89
+ readonly currency: string;
90
+ readonly minorUnits: number;
91
+ } | null;
92
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
93
+ readonly blocker: {
94
+ readonly summary: string;
95
+ readonly since: number;
96
+ } | null;
97
+ readonly connectTarget: {
98
+ readonly host: string;
99
+ readonly agentId: string;
100
+ readonly url: string;
101
+ } | null;
102
+ readonly createdAt: number;
103
+ readonly updatedAt: number;
104
+ }[];
105
+ };
106
+ readonly day: {
107
+ readonly window: "day" | "month" | "now" | "week";
108
+ readonly observedAt: number;
109
+ readonly asOf: number;
110
+ readonly goals: readonly {
111
+ readonly id: string;
112
+ readonly title: string;
113
+ readonly summary: string;
114
+ readonly detail: string;
115
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
116
+ readonly owner: {
117
+ readonly id: string;
118
+ readonly name: string;
119
+ };
120
+ readonly repository: {
121
+ readonly repository: string;
122
+ readonly branch: string;
123
+ };
124
+ readonly spend: {
125
+ readonly currency: string;
126
+ readonly minorUnits: number;
127
+ } | null;
128
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
129
+ readonly blocker: {
130
+ readonly summary: string;
131
+ readonly since: number;
132
+ } | null;
133
+ readonly connectTarget: {
134
+ readonly host: string;
135
+ readonly agentId: string;
136
+ readonly url: string;
137
+ } | null;
138
+ readonly createdAt: number;
139
+ readonly updatedAt: number;
140
+ }[];
141
+ };
142
+ readonly week: {
143
+ readonly window: "day" | "month" | "now" | "week";
144
+ readonly observedAt: number;
145
+ readonly asOf: number;
146
+ readonly goals: readonly {
147
+ readonly id: string;
148
+ readonly title: string;
149
+ readonly summary: string;
150
+ readonly detail: string;
151
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
152
+ readonly owner: {
153
+ readonly id: string;
154
+ readonly name: string;
155
+ };
156
+ readonly repository: {
157
+ readonly repository: string;
158
+ readonly branch: string;
159
+ };
160
+ readonly spend: {
161
+ readonly currency: string;
162
+ readonly minorUnits: number;
163
+ } | null;
164
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
165
+ readonly blocker: {
166
+ readonly summary: string;
167
+ readonly since: number;
168
+ } | null;
169
+ readonly connectTarget: {
170
+ readonly host: string;
171
+ readonly agentId: string;
172
+ readonly url: string;
173
+ } | null;
174
+ readonly createdAt: number;
175
+ readonly updatedAt: number;
176
+ }[];
177
+ };
178
+ readonly month: {
179
+ readonly window: "day" | "month" | "now" | "week";
180
+ readonly observedAt: number;
181
+ readonly asOf: number;
182
+ readonly goals: readonly {
183
+ readonly id: string;
184
+ readonly title: string;
185
+ readonly summary: string;
186
+ readonly detail: string;
187
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
188
+ readonly owner: {
189
+ readonly id: string;
190
+ readonly name: string;
191
+ };
192
+ readonly repository: {
193
+ readonly repository: string;
194
+ readonly branch: string;
195
+ };
196
+ readonly spend: {
197
+ readonly currency: string;
198
+ readonly minorUnits: number;
199
+ } | null;
200
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
201
+ readonly blocker: {
202
+ readonly summary: string;
203
+ readonly since: number;
204
+ } | null;
205
+ readonly connectTarget: {
206
+ readonly host: string;
207
+ readonly agentId: string;
208
+ readonly url: string;
209
+ } | null;
210
+ readonly createdAt: number;
211
+ readonly updatedAt: number;
212
+ }[];
213
+ };
214
+ } | null;
215
+ readonly status: {
216
+ readonly applyConfigured: boolean;
217
+ readonly branch: string;
218
+ readonly dirty: boolean;
219
+ readonly repository: string;
220
+ readonly revision: string;
221
+ readonly herdr: {
222
+ readonly agents: readonly {
223
+ readonly agentId: string | null;
224
+ readonly activityRevision: number;
225
+ readonly kind: string;
226
+ readonly name: string;
227
+ readonly paneId: string;
228
+ readonly parentAgentId: string | null;
229
+ readonly relation: "delegated" | "pair" | "review" | null;
230
+ readonly status: string;
231
+ readonly work: string;
232
+ }[];
233
+ readonly available: boolean;
234
+ readonly error: string | null;
235
+ };
236
+ readonly host: string;
237
+ };
238
+ readonly records: readonly {
239
+ readonly id: string;
240
+ readonly createdAt: number;
241
+ readonly updatedAt: number;
242
+ readonly actor: string;
243
+ readonly hash: string;
244
+ readonly approvalNonce: string | null;
245
+ readonly approvalExpiresAt?: number | null;
246
+ readonly approvedBy: string | null;
247
+ readonly approvedAt?: number | null;
248
+ readonly rejectedBy?: string | null;
249
+ readonly rejectedAt?: number | null;
250
+ readonly expiredAt?: number | null;
251
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
252
+ readonly payload: {
253
+ readonly kind: "nix.check";
254
+ } | {
255
+ readonly kind: "nix.apply";
256
+ readonly ref: string;
257
+ } | {
258
+ readonly kind: "agent.delegate";
259
+ readonly repository: string;
260
+ readonly prompt: string;
261
+ readonly mode: "consult" | "review" | "work";
262
+ readonly channel?: "coordinator_chat";
263
+ } | {
264
+ readonly kind: "agent.message";
265
+ readonly session: string;
266
+ readonly message: string;
267
+ } | {
268
+ readonly kind: "browser.mcp.recover";
269
+ };
270
+ readonly result: string | null;
271
+ readonly error: string | null;
272
+ readonly worker?: {
273
+ readonly host: string;
274
+ readonly agentId: string;
275
+ readonly name: string;
276
+ readonly paneId: string;
277
+ readonly relationship?: {
278
+ readonly parentAgentId: string;
279
+ readonly relation: "delegated" | "pair" | "review";
280
+ };
281
+ };
282
+ readonly connectTarget?: {
283
+ readonly host: string;
284
+ readonly agentId: string;
285
+ readonly url: string;
286
+ };
287
+ readonly workerTerminalObservedAt?: number | null;
288
+ }[];
289
+ readonly historyNextCursor: {
290
+ readonly createdAt: number;
291
+ readonly id: string;
292
+ } | null;
293
+ readonly directory: {
294
+ readonly currentUrl: string;
295
+ readonly links: readonly {
296
+ readonly host: string;
297
+ readonly online: boolean;
298
+ readonly url: string | null;
299
+ }[];
300
+ readonly error: string | null;
301
+ } | null;
302
+ readonly pendingApprovals: {
303
+ readonly local: readonly {
304
+ readonly id: string;
305
+ readonly createdAt: number;
306
+ readonly updatedAt: number;
307
+ readonly actor: string;
308
+ readonly hash: string;
309
+ readonly approvalNonce: string | null;
310
+ readonly approvalExpiresAt?: number | null;
311
+ readonly approvedBy: string | null;
312
+ readonly approvedAt?: number | null;
313
+ readonly rejectedBy?: string | null;
314
+ readonly rejectedAt?: number | null;
315
+ readonly expiredAt?: number | null;
316
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
317
+ readonly payload: {
318
+ readonly kind: "nix.check";
319
+ } | {
320
+ readonly kind: "nix.apply";
321
+ readonly ref: string;
322
+ } | {
323
+ readonly kind: "agent.delegate";
324
+ readonly repository: string;
325
+ readonly prompt: string;
326
+ readonly mode: "consult" | "review" | "work";
327
+ readonly channel?: "coordinator_chat";
328
+ } | {
329
+ readonly kind: "agent.message";
330
+ readonly session: string;
331
+ readonly message: string;
332
+ } | {
333
+ readonly kind: "browser.mcp.recover";
334
+ };
335
+ readonly result: string | null;
336
+ readonly error: string | null;
337
+ readonly worker?: {
338
+ readonly host: string;
339
+ readonly agentId: string;
340
+ readonly name: string;
341
+ readonly paneId: string;
342
+ readonly relationship?: {
343
+ readonly parentAgentId: string;
344
+ readonly relation: "delegated" | "pair" | "review";
345
+ };
346
+ };
347
+ readonly connectTarget?: {
348
+ readonly host: string;
349
+ readonly agentId: string;
350
+ readonly url: string;
351
+ };
352
+ readonly workerTerminalObservedAt?: number | null;
353
+ }[];
354
+ readonly remote: readonly {
355
+ readonly host: string;
356
+ readonly approvalUrl: string;
357
+ readonly approval: {
358
+ readonly id: string;
359
+ readonly createdAt: number;
360
+ readonly actor: string;
361
+ readonly approvalExpiresAt: number | null;
362
+ readonly status: "pending_approval";
363
+ readonly payload: {
364
+ readonly kind: "nix.check";
365
+ } | {
366
+ readonly kind: "nix.apply";
367
+ readonly ref: string;
368
+ } | {
369
+ readonly kind: "agent.delegate";
370
+ readonly repository: string;
371
+ readonly prompt: string;
372
+ readonly mode: "consult" | "review" | "work";
373
+ readonly channel?: "coordinator_chat";
374
+ } | {
375
+ readonly kind: "agent.message";
376
+ readonly session: string;
377
+ readonly message: string;
378
+ } | {
379
+ readonly kind: "browser.mcp.recover";
380
+ };
381
+ };
382
+ }[];
383
+ readonly failures: readonly {
384
+ readonly host: string;
385
+ readonly reason: "invalid_response" | "offline" | "request_failed" | "timeout" | "unavailable";
386
+ }[];
387
+ readonly nextCursors: readonly {
388
+ readonly host: string;
389
+ readonly cursor: {
390
+ readonly createdAt: number;
391
+ readonly id: string;
392
+ };
393
+ }[];
394
+ };
395
+ }) => Effect.Effect<{
396
+ readonly host: string;
397
+ readonly observedAt: number;
398
+ readonly approvalsEnabled: boolean;
399
+ readonly approvalApp: {
400
+ readonly canonical: boolean;
401
+ readonly canonicalUrl: string;
402
+ readonly chatEnabled: boolean;
403
+ readonly pushEnabled: boolean;
404
+ };
405
+ readonly chat: {
406
+ readonly entries: readonly {
407
+ readonly createdAt: number;
408
+ readonly id: string;
409
+ readonly message: string;
410
+ readonly mode: "ask" | "work";
411
+ readonly reply: string | null;
412
+ readonly state: "completed" | "failed" | "interrupted" | "pending" | "running";
413
+ readonly updatedAt: number;
414
+ readonly worker?: {
415
+ readonly host: string;
416
+ readonly agentId: string;
417
+ readonly name: string;
418
+ readonly paneId: string;
419
+ readonly relationship?: {
420
+ readonly parentAgentId: string;
421
+ readonly relation: "delegated" | "pair" | "review";
422
+ };
423
+ };
424
+ readonly connectTarget?: {
425
+ readonly host: string;
426
+ readonly agentId: string;
427
+ readonly url: string;
428
+ };
429
+ }[];
430
+ } | null;
431
+ readonly work: {
432
+ readonly observedAt: number;
433
+ readonly now: {
434
+ readonly window: "day" | "month" | "now" | "week";
435
+ readonly observedAt: number;
436
+ readonly asOf: number;
437
+ readonly goals: readonly {
438
+ readonly id: string;
439
+ readonly title: string;
440
+ readonly summary: string;
441
+ readonly detail: string;
442
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
443
+ readonly owner: {
444
+ readonly id: string;
445
+ readonly name: string;
446
+ };
447
+ readonly repository: {
448
+ readonly repository: string;
449
+ readonly branch: string;
450
+ };
451
+ readonly spend: {
452
+ readonly currency: string;
453
+ readonly minorUnits: number;
454
+ } | null;
455
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
456
+ readonly blocker: {
457
+ readonly summary: string;
458
+ readonly since: number;
459
+ } | null;
460
+ readonly connectTarget: {
461
+ readonly host: string;
462
+ readonly agentId: string;
463
+ readonly url: string;
464
+ } | null;
465
+ readonly createdAt: number;
466
+ readonly updatedAt: number;
467
+ }[];
468
+ };
469
+ readonly day: {
470
+ readonly window: "day" | "month" | "now" | "week";
471
+ readonly observedAt: number;
472
+ readonly asOf: number;
473
+ readonly goals: readonly {
474
+ readonly id: string;
475
+ readonly title: string;
476
+ readonly summary: string;
477
+ readonly detail: string;
478
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
479
+ readonly owner: {
480
+ readonly id: string;
481
+ readonly name: string;
482
+ };
483
+ readonly repository: {
484
+ readonly repository: string;
485
+ readonly branch: string;
486
+ };
487
+ readonly spend: {
488
+ readonly currency: string;
489
+ readonly minorUnits: number;
490
+ } | null;
491
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
492
+ readonly blocker: {
493
+ readonly summary: string;
494
+ readonly since: number;
495
+ } | null;
496
+ readonly connectTarget: {
497
+ readonly host: string;
498
+ readonly agentId: string;
499
+ readonly url: string;
500
+ } | null;
501
+ readonly createdAt: number;
502
+ readonly updatedAt: number;
503
+ }[];
504
+ };
505
+ readonly week: {
506
+ readonly window: "day" | "month" | "now" | "week";
507
+ readonly observedAt: number;
508
+ readonly asOf: number;
509
+ readonly goals: readonly {
510
+ readonly id: string;
511
+ readonly title: string;
512
+ readonly summary: string;
513
+ readonly detail: string;
514
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
515
+ readonly owner: {
516
+ readonly id: string;
517
+ readonly name: string;
518
+ };
519
+ readonly repository: {
520
+ readonly repository: string;
521
+ readonly branch: string;
522
+ };
523
+ readonly spend: {
524
+ readonly currency: string;
525
+ readonly minorUnits: number;
526
+ } | null;
527
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
528
+ readonly blocker: {
529
+ readonly summary: string;
530
+ readonly since: number;
531
+ } | null;
532
+ readonly connectTarget: {
533
+ readonly host: string;
534
+ readonly agentId: string;
535
+ readonly url: string;
536
+ } | null;
537
+ readonly createdAt: number;
538
+ readonly updatedAt: number;
539
+ }[];
540
+ };
541
+ readonly month: {
542
+ readonly window: "day" | "month" | "now" | "week";
543
+ readonly observedAt: number;
544
+ readonly asOf: number;
545
+ readonly goals: readonly {
546
+ readonly id: string;
547
+ readonly title: string;
548
+ readonly summary: string;
549
+ readonly detail: string;
550
+ readonly state: "blocked" | "completed" | "deployed" | "planned" | "review" | "working";
551
+ readonly owner: {
552
+ readonly id: string;
553
+ readonly name: string;
554
+ };
555
+ readonly repository: {
556
+ readonly repository: string;
557
+ readonly branch: string;
558
+ };
559
+ readonly spend: {
560
+ readonly currency: string;
561
+ readonly minorUnits: number;
562
+ } | null;
563
+ readonly delivery: "deployed" | "local" | "merged" | "pull_request" | "review";
564
+ readonly blocker: {
565
+ readonly summary: string;
566
+ readonly since: number;
567
+ } | null;
568
+ readonly connectTarget: {
569
+ readonly host: string;
570
+ readonly agentId: string;
571
+ readonly url: string;
572
+ } | null;
573
+ readonly createdAt: number;
574
+ readonly updatedAt: number;
575
+ }[];
576
+ };
577
+ } | null;
578
+ readonly status: {
579
+ readonly applyConfigured: boolean;
580
+ readonly branch: string;
581
+ readonly dirty: boolean;
582
+ readonly repository: string;
583
+ readonly revision: string;
584
+ readonly herdr: {
585
+ readonly agents: readonly {
586
+ readonly agentId: string | null;
587
+ readonly activityRevision: number;
588
+ readonly kind: string;
589
+ readonly name: string;
590
+ readonly paneId: string;
591
+ readonly parentAgentId: string | null;
592
+ readonly relation: "delegated" | "pair" | "review" | null;
593
+ readonly status: string;
594
+ readonly work: string;
595
+ }[];
596
+ readonly available: boolean;
597
+ readonly error: string | null;
598
+ };
599
+ readonly host: string;
600
+ };
601
+ readonly records: readonly {
602
+ readonly id: string;
603
+ readonly createdAt: number;
604
+ readonly updatedAt: number;
605
+ readonly actor: string;
606
+ readonly hash: string;
607
+ readonly approvalNonce: string | null;
608
+ readonly approvalExpiresAt?: number | null;
609
+ readonly approvedBy: string | null;
610
+ readonly approvedAt?: number | null;
611
+ readonly rejectedBy?: string | null;
612
+ readonly rejectedAt?: number | null;
613
+ readonly expiredAt?: number | null;
614
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
615
+ readonly payload: {
616
+ readonly kind: "nix.check";
617
+ } | {
618
+ readonly kind: "nix.apply";
619
+ readonly ref: string;
620
+ } | {
621
+ readonly kind: "agent.delegate";
622
+ readonly repository: string;
623
+ readonly prompt: string;
624
+ readonly mode: "consult" | "review" | "work";
625
+ readonly channel?: "coordinator_chat";
626
+ } | {
627
+ readonly kind: "agent.message";
628
+ readonly session: string;
629
+ readonly message: string;
630
+ } | {
631
+ readonly kind: "browser.mcp.recover";
632
+ };
633
+ readonly result: string | null;
634
+ readonly error: string | null;
635
+ readonly worker?: {
636
+ readonly host: string;
637
+ readonly agentId: string;
638
+ readonly name: string;
639
+ readonly paneId: string;
640
+ readonly relationship?: {
641
+ readonly parentAgentId: string;
642
+ readonly relation: "delegated" | "pair" | "review";
643
+ };
644
+ };
645
+ readonly connectTarget?: {
646
+ readonly host: string;
647
+ readonly agentId: string;
648
+ readonly url: string;
649
+ };
650
+ readonly workerTerminalObservedAt?: number | null;
651
+ }[];
652
+ readonly historyNextCursor: {
653
+ readonly createdAt: number;
654
+ readonly id: string;
655
+ } | null;
656
+ readonly directory: {
657
+ readonly currentUrl: string;
658
+ readonly links: readonly {
659
+ readonly host: string;
660
+ readonly online: boolean;
661
+ readonly url: string | null;
662
+ }[];
663
+ readonly error: string | null;
664
+ } | null;
665
+ readonly pendingApprovals: {
666
+ readonly local: readonly {
667
+ readonly id: string;
668
+ readonly createdAt: number;
669
+ readonly updatedAt: number;
670
+ readonly actor: string;
671
+ readonly hash: string;
672
+ readonly approvalNonce: string | null;
673
+ readonly approvalExpiresAt?: number | null;
674
+ readonly approvedBy: string | null;
675
+ readonly approvedAt?: number | null;
676
+ readonly rejectedBy?: string | null;
677
+ readonly rejectedAt?: number | null;
678
+ readonly expiredAt?: number | null;
679
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
680
+ readonly payload: {
681
+ readonly kind: "nix.check";
682
+ } | {
683
+ readonly kind: "nix.apply";
684
+ readonly ref: string;
685
+ } | {
686
+ readonly kind: "agent.delegate";
687
+ readonly repository: string;
688
+ readonly prompt: string;
689
+ readonly mode: "consult" | "review" | "work";
690
+ readonly channel?: "coordinator_chat";
691
+ } | {
692
+ readonly kind: "agent.message";
693
+ readonly session: string;
694
+ readonly message: string;
695
+ } | {
696
+ readonly kind: "browser.mcp.recover";
697
+ };
698
+ readonly result: string | null;
699
+ readonly error: string | null;
700
+ readonly worker?: {
701
+ readonly host: string;
702
+ readonly agentId: string;
703
+ readonly name: string;
704
+ readonly paneId: string;
705
+ readonly relationship?: {
706
+ readonly parentAgentId: string;
707
+ readonly relation: "delegated" | "pair" | "review";
708
+ };
709
+ };
710
+ readonly connectTarget?: {
711
+ readonly host: string;
712
+ readonly agentId: string;
713
+ readonly url: string;
714
+ };
715
+ readonly workerTerminalObservedAt?: number | null;
716
+ }[];
717
+ readonly remote: readonly {
718
+ readonly host: string;
719
+ readonly approvalUrl: string;
720
+ readonly approval: {
721
+ readonly id: string;
722
+ readonly createdAt: number;
723
+ readonly actor: string;
724
+ readonly approvalExpiresAt: number | null;
725
+ readonly status: "pending_approval";
726
+ readonly payload: {
727
+ readonly kind: "nix.check";
728
+ } | {
729
+ readonly kind: "nix.apply";
730
+ readonly ref: string;
731
+ } | {
732
+ readonly kind: "agent.delegate";
733
+ readonly repository: string;
734
+ readonly prompt: string;
735
+ readonly mode: "consult" | "review" | "work";
736
+ readonly channel?: "coordinator_chat";
737
+ } | {
738
+ readonly kind: "agent.message";
739
+ readonly session: string;
740
+ readonly message: string;
741
+ } | {
742
+ readonly kind: "browser.mcp.recover";
743
+ };
744
+ };
745
+ }[];
746
+ readonly failures: readonly {
747
+ readonly host: string;
748
+ readonly reason: "invalid_response" | "offline" | "request_failed" | "timeout" | "unavailable";
749
+ }[];
750
+ readonly nextCursors: readonly {
751
+ readonly host: string;
752
+ readonly cursor: {
753
+ readonly createdAt: number;
754
+ readonly id: string;
755
+ };
756
+ }[];
757
+ };
758
+ }, DashboardResponseBudgetError, never>;
759
+ export declare const notificationCandidates: (config: {
760
+ readonly host: string;
761
+ readonly repository: string;
762
+ readonly stateDirectory: string;
763
+ readonly crossHost: boolean;
764
+ readonly port: number;
765
+ readonly localPort: number;
766
+ readonly approvalPort: number;
767
+ readonly allowedUsers: readonly string[];
768
+ readonly approvalNodes: readonly string[];
769
+ readonly machines: readonly {
770
+ readonly host: string;
771
+ readonly nodeId: string;
772
+ }[];
773
+ readonly applyMachines: readonly string[];
774
+ readonly checkCommand: readonly string[];
775
+ readonly applyCommand: readonly string[] | null;
776
+ readonly browserMcpRecoverCommand: readonly string[] | null;
777
+ readonly coordinatorCommand: readonly string[];
778
+ readonly herdrCommand: string;
779
+ readonly tailscaleCommand: string;
780
+ readonly approvalTls: {
781
+ readonly certificatePath: string;
782
+ readonly privateKeyPath: string;
783
+ } | null;
784
+ readonly approvalHub: {
785
+ readonly host: string;
786
+ readonly nodeId: string;
787
+ readonly url: string;
788
+ };
789
+ readonly pushAllowedOrigins: readonly string[];
790
+ readonly pushSubject: string;
791
+ }, service: {
792
+ submit: (request: {
793
+ readonly payload: {
794
+ readonly kind: "nix.check";
795
+ } | {
796
+ readonly kind: "nix.apply";
797
+ readonly ref: string;
798
+ } | {
799
+ readonly kind: "agent.delegate";
800
+ readonly repository: string;
801
+ readonly prompt: string;
802
+ readonly mode: "consult" | "review" | "work";
803
+ readonly channel?: "coordinator_chat";
804
+ } | {
805
+ readonly kind: "agent.message";
806
+ readonly session: string;
807
+ readonly message: string;
808
+ } | {
809
+ readonly kind: "browser.mcp.recover";
810
+ };
811
+ }, actor: string) => Effect.Effect<{
812
+ readonly id: string;
813
+ readonly createdAt: number;
814
+ readonly updatedAt: number;
815
+ readonly actor: string;
816
+ readonly hash: string;
817
+ readonly approvalNonce: string | null;
818
+ readonly approvalExpiresAt?: number | null;
819
+ readonly approvedBy: string | null;
820
+ readonly approvedAt?: number | null;
821
+ readonly rejectedBy?: string | null;
822
+ readonly rejectedAt?: number | null;
823
+ readonly expiredAt?: number | null;
824
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
825
+ readonly payload: {
826
+ readonly kind: "nix.check";
827
+ } | {
828
+ readonly kind: "nix.apply";
829
+ readonly ref: string;
830
+ } | {
831
+ readonly kind: "agent.delegate";
832
+ readonly repository: string;
833
+ readonly prompt: string;
834
+ readonly mode: "consult" | "review" | "work";
835
+ readonly channel?: "coordinator_chat";
836
+ } | {
837
+ readonly kind: "agent.message";
838
+ readonly session: string;
839
+ readonly message: string;
840
+ } | {
841
+ readonly kind: "browser.mcp.recover";
842
+ };
843
+ readonly result: string | null;
844
+ readonly error: string | null;
845
+ readonly worker?: {
846
+ readonly host: string;
847
+ readonly agentId: string;
848
+ readonly name: string;
849
+ readonly paneId: string;
850
+ readonly relationship?: {
851
+ readonly parentAgentId: string;
852
+ readonly relation: "delegated" | "pair" | "review";
853
+ };
854
+ };
855
+ readonly connectTarget?: {
856
+ readonly host: string;
857
+ readonly agentId: string;
858
+ readonly url: string;
859
+ };
860
+ readonly workerTerminalObservedAt?: number | null;
861
+ }, FleetJobConflictError | FleetOperationError | FleetStoreError | FleetValidationError, never>;
862
+ approve: (jobId: string, approval: import("@knpkv/herdr-fleet").Approval, actor: string) => Effect.Effect<{
863
+ readonly id: string;
864
+ readonly createdAt: number;
865
+ readonly updatedAt: number;
866
+ readonly actor: string;
867
+ readonly hash: string;
868
+ readonly approvalNonce: string | null;
869
+ readonly approvalExpiresAt?: number | null;
870
+ readonly approvedBy: string | null;
871
+ readonly approvedAt?: number | null;
872
+ readonly rejectedBy?: string | null;
873
+ readonly rejectedAt?: number | null;
874
+ readonly expiredAt?: number | null;
875
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
876
+ readonly payload: {
877
+ readonly kind: "nix.check";
878
+ } | {
879
+ readonly kind: "nix.apply";
880
+ readonly ref: string;
881
+ } | {
882
+ readonly kind: "agent.delegate";
883
+ readonly repository: string;
884
+ readonly prompt: string;
885
+ readonly mode: "consult" | "review" | "work";
886
+ readonly channel?: "coordinator_chat";
887
+ } | {
888
+ readonly kind: "agent.message";
889
+ readonly session: string;
890
+ readonly message: string;
891
+ } | {
892
+ readonly kind: "browser.mcp.recover";
893
+ };
894
+ readonly result: string | null;
895
+ readonly error: string | null;
896
+ readonly worker?: {
897
+ readonly host: string;
898
+ readonly agentId: string;
899
+ readonly name: string;
900
+ readonly paneId: string;
901
+ readonly relationship?: {
902
+ readonly parentAgentId: string;
903
+ readonly relation: "delegated" | "pair" | "review";
904
+ };
905
+ };
906
+ readonly connectTarget?: {
907
+ readonly host: string;
908
+ readonly agentId: string;
909
+ readonly url: string;
910
+ };
911
+ readonly workerTerminalObservedAt?: number | null;
912
+ }, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError | FleetValidationError, never>;
913
+ reject: (jobId: string, approval: import("@knpkv/herdr-fleet").Approval, actor: string) => Effect.Effect<{
914
+ readonly id: string;
915
+ readonly createdAt: number;
916
+ readonly updatedAt: number;
917
+ readonly actor: string;
918
+ readonly hash: string;
919
+ readonly approvalNonce: string | null;
920
+ readonly approvalExpiresAt?: number | null;
921
+ readonly approvedBy: string | null;
922
+ readonly approvedAt?: number | null;
923
+ readonly rejectedBy?: string | null;
924
+ readonly rejectedAt?: number | null;
925
+ readonly expiredAt?: number | null;
926
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
927
+ readonly payload: {
928
+ readonly kind: "nix.check";
929
+ } | {
930
+ readonly kind: "nix.apply";
931
+ readonly ref: string;
932
+ } | {
933
+ readonly kind: "agent.delegate";
934
+ readonly repository: string;
935
+ readonly prompt: string;
936
+ readonly mode: "consult" | "review" | "work";
937
+ readonly channel?: "coordinator_chat";
938
+ } | {
939
+ readonly kind: "agent.message";
940
+ readonly session: string;
941
+ readonly message: string;
942
+ } | {
943
+ readonly kind: "browser.mcp.recover";
944
+ };
945
+ readonly result: string | null;
946
+ readonly error: string | null;
947
+ readonly worker?: {
948
+ readonly host: string;
949
+ readonly agentId: string;
950
+ readonly name: string;
951
+ readonly paneId: string;
952
+ readonly relationship?: {
953
+ readonly parentAgentId: string;
954
+ readonly relation: "delegated" | "pair" | "review";
955
+ };
956
+ };
957
+ readonly connectTarget?: {
958
+ readonly host: string;
959
+ readonly agentId: string;
960
+ readonly url: string;
961
+ };
962
+ readonly workerTerminalObservedAt?: number | null;
963
+ }, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError | FleetValidationError, never>;
964
+ run: (jobId: string) => Effect.Effect<{
965
+ readonly id: string;
966
+ readonly createdAt: number;
967
+ readonly updatedAt: number;
968
+ readonly actor: string;
969
+ readonly hash: string;
970
+ readonly approvalNonce: string | null;
971
+ readonly approvalExpiresAt?: number | null;
972
+ readonly approvedBy: string | null;
973
+ readonly approvedAt?: number | null;
974
+ readonly rejectedBy?: string | null;
975
+ readonly rejectedAt?: number | null;
976
+ readonly expiredAt?: number | null;
977
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
978
+ readonly payload: {
979
+ readonly kind: "nix.check";
980
+ } | {
981
+ readonly kind: "nix.apply";
982
+ readonly ref: string;
983
+ } | {
984
+ readonly kind: "agent.delegate";
985
+ readonly repository: string;
986
+ readonly prompt: string;
987
+ readonly mode: "consult" | "review" | "work";
988
+ readonly channel?: "coordinator_chat";
989
+ } | {
990
+ readonly kind: "agent.message";
991
+ readonly session: string;
992
+ readonly message: string;
993
+ } | {
994
+ readonly kind: "browser.mcp.recover";
995
+ };
996
+ readonly result: string | null;
997
+ readonly error: string | null;
998
+ readonly worker?: {
999
+ readonly host: string;
1000
+ readonly agentId: string;
1001
+ readonly name: string;
1002
+ readonly paneId: string;
1003
+ readonly relationship?: {
1004
+ readonly parentAgentId: string;
1005
+ readonly relation: "delegated" | "pair" | "review";
1006
+ };
1007
+ };
1008
+ readonly connectTarget?: {
1009
+ readonly host: string;
1010
+ readonly agentId: string;
1011
+ readonly url: string;
1012
+ };
1013
+ readonly workerTerminalObservedAt?: number | null;
1014
+ }, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError, never>;
1015
+ runCoordinatorChat: (jobId: string) => Effect.Effect<{
1016
+ readonly id: string;
1017
+ readonly createdAt: number;
1018
+ readonly updatedAt: number;
1019
+ readonly actor: string;
1020
+ readonly hash: string;
1021
+ readonly approvalNonce: string | null;
1022
+ readonly approvalExpiresAt?: number | null;
1023
+ readonly approvedBy: string | null;
1024
+ readonly approvedAt?: number | null;
1025
+ readonly rejectedBy?: string | null;
1026
+ readonly rejectedAt?: number | null;
1027
+ readonly expiredAt?: number | null;
1028
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1029
+ readonly payload: {
1030
+ readonly kind: "nix.check";
1031
+ } | {
1032
+ readonly kind: "nix.apply";
1033
+ readonly ref: string;
1034
+ } | {
1035
+ readonly kind: "agent.delegate";
1036
+ readonly repository: string;
1037
+ readonly prompt: string;
1038
+ readonly mode: "consult" | "review" | "work";
1039
+ readonly channel?: "coordinator_chat";
1040
+ } | {
1041
+ readonly kind: "agent.message";
1042
+ readonly session: string;
1043
+ readonly message: string;
1044
+ } | {
1045
+ readonly kind: "browser.mcp.recover";
1046
+ };
1047
+ readonly result: string | null;
1048
+ readonly error: string | null;
1049
+ readonly worker?: {
1050
+ readonly host: string;
1051
+ readonly agentId: string;
1052
+ readonly name: string;
1053
+ readonly paneId: string;
1054
+ readonly relationship?: {
1055
+ readonly parentAgentId: string;
1056
+ readonly relation: "delegated" | "pair" | "review";
1057
+ };
1058
+ };
1059
+ readonly connectTarget?: {
1060
+ readonly host: string;
1061
+ readonly agentId: string;
1062
+ readonly url: string;
1063
+ };
1064
+ readonly workerTerminalObservedAt?: number | null;
1065
+ }, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError | FleetValidationError, never>;
1066
+ get: (jobId: string) => Effect.Effect<{
1067
+ readonly id: string;
1068
+ readonly createdAt: number;
1069
+ readonly updatedAt: number;
1070
+ readonly actor: string;
1071
+ readonly hash: string;
1072
+ readonly approvalNonce: string | null;
1073
+ readonly approvalExpiresAt?: number | null;
1074
+ readonly approvedBy: string | null;
1075
+ readonly approvedAt?: number | null;
1076
+ readonly rejectedBy?: string | null;
1077
+ readonly rejectedAt?: number | null;
1078
+ readonly expiredAt?: number | null;
1079
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1080
+ readonly payload: {
1081
+ readonly kind: "nix.check";
1082
+ } | {
1083
+ readonly kind: "nix.apply";
1084
+ readonly ref: string;
1085
+ } | {
1086
+ readonly kind: "agent.delegate";
1087
+ readonly repository: string;
1088
+ readonly prompt: string;
1089
+ readonly mode: "consult" | "review" | "work";
1090
+ readonly channel?: "coordinator_chat";
1091
+ } | {
1092
+ readonly kind: "agent.message";
1093
+ readonly session: string;
1094
+ readonly message: string;
1095
+ } | {
1096
+ readonly kind: "browser.mcp.recover";
1097
+ };
1098
+ readonly result: string | null;
1099
+ readonly error: string | null;
1100
+ readonly worker?: {
1101
+ readonly host: string;
1102
+ readonly agentId: string;
1103
+ readonly name: string;
1104
+ readonly paneId: string;
1105
+ readonly relationship?: {
1106
+ readonly parentAgentId: string;
1107
+ readonly relation: "delegated" | "pair" | "review";
1108
+ };
1109
+ };
1110
+ readonly connectTarget?: {
1111
+ readonly host: string;
1112
+ readonly agentId: string;
1113
+ readonly url: string;
1114
+ };
1115
+ readonly workerTerminalObservedAt?: number | null;
1116
+ }, FleetJobNotFoundError | FleetStoreError, never>;
1117
+ history: (limit: number) => Effect.Effect<{
1118
+ readonly id: string;
1119
+ readonly createdAt: number;
1120
+ readonly updatedAt: number;
1121
+ readonly actor: string;
1122
+ readonly hash: string;
1123
+ readonly approvalNonce: string | null;
1124
+ readonly approvalExpiresAt?: number | null;
1125
+ readonly approvedBy: string | null;
1126
+ readonly approvedAt?: number | null;
1127
+ readonly rejectedBy?: string | null;
1128
+ readonly rejectedAt?: number | null;
1129
+ readonly expiredAt?: number | null;
1130
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1131
+ readonly payload: {
1132
+ readonly kind: "nix.check";
1133
+ } | {
1134
+ readonly kind: "nix.apply";
1135
+ readonly ref: string;
1136
+ } | {
1137
+ readonly kind: "agent.delegate";
1138
+ readonly repository: string;
1139
+ readonly prompt: string;
1140
+ readonly mode: "consult" | "review" | "work";
1141
+ readonly channel?: "coordinator_chat";
1142
+ } | {
1143
+ readonly kind: "agent.message";
1144
+ readonly session: string;
1145
+ readonly message: string;
1146
+ } | {
1147
+ readonly kind: "browser.mcp.recover";
1148
+ };
1149
+ readonly result: string | null;
1150
+ readonly error: string | null;
1151
+ readonly worker?: {
1152
+ readonly host: string;
1153
+ readonly agentId: string;
1154
+ readonly name: string;
1155
+ readonly paneId: string;
1156
+ readonly relationship?: {
1157
+ readonly parentAgentId: string;
1158
+ readonly relation: "delegated" | "pair" | "review";
1159
+ };
1160
+ };
1161
+ readonly connectTarget?: {
1162
+ readonly host: string;
1163
+ readonly agentId: string;
1164
+ readonly url: string;
1165
+ };
1166
+ readonly workerTerminalObservedAt?: number | null;
1167
+ }[], FleetStoreError, never>;
1168
+ historyAfter: (cursor: {
1169
+ readonly createdAt: number;
1170
+ readonly id: string;
1171
+ } | null, limit: number) => Effect.Effect<{
1172
+ readonly id: string;
1173
+ readonly createdAt: number;
1174
+ readonly updatedAt: number;
1175
+ readonly actor: string;
1176
+ readonly hash: string;
1177
+ readonly approvalNonce: string | null;
1178
+ readonly approvalExpiresAt?: number | null;
1179
+ readonly approvedBy: string | null;
1180
+ readonly approvedAt?: number | null;
1181
+ readonly rejectedBy?: string | null;
1182
+ readonly rejectedAt?: number | null;
1183
+ readonly expiredAt?: number | null;
1184
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1185
+ readonly payload: {
1186
+ readonly kind: "nix.check";
1187
+ } | {
1188
+ readonly kind: "nix.apply";
1189
+ readonly ref: string;
1190
+ } | {
1191
+ readonly kind: "agent.delegate";
1192
+ readonly repository: string;
1193
+ readonly prompt: string;
1194
+ readonly mode: "consult" | "review" | "work";
1195
+ readonly channel?: "coordinator_chat";
1196
+ } | {
1197
+ readonly kind: "agent.message";
1198
+ readonly session: string;
1199
+ readonly message: string;
1200
+ } | {
1201
+ readonly kind: "browser.mcp.recover";
1202
+ };
1203
+ readonly result: string | null;
1204
+ readonly error: string | null;
1205
+ readonly worker?: {
1206
+ readonly host: string;
1207
+ readonly agentId: string;
1208
+ readonly name: string;
1209
+ readonly paneId: string;
1210
+ readonly relationship?: {
1211
+ readonly parentAgentId: string;
1212
+ readonly relation: "delegated" | "pair" | "review";
1213
+ };
1214
+ };
1215
+ readonly connectTarget?: {
1216
+ readonly host: string;
1217
+ readonly agentId: string;
1218
+ readonly url: string;
1219
+ };
1220
+ readonly workerTerminalObservedAt?: number | null;
1221
+ }[], FleetStoreError, never>;
1222
+ historyPage: (cursor: {
1223
+ readonly createdAt: number;
1224
+ readonly id: string;
1225
+ } | null, limit: number) => Effect.Effect<{
1226
+ records: {
1227
+ readonly id: string;
1228
+ readonly createdAt: number;
1229
+ readonly updatedAt: number;
1230
+ readonly actor: string;
1231
+ readonly hash: string;
1232
+ readonly approvalNonce: string | null;
1233
+ readonly approvalExpiresAt?: number | null;
1234
+ readonly approvedBy: string | null;
1235
+ readonly approvedAt?: number | null;
1236
+ readonly rejectedBy?: string | null;
1237
+ readonly rejectedAt?: number | null;
1238
+ readonly expiredAt?: number | null;
1239
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1240
+ readonly payload: {
1241
+ readonly kind: "nix.check";
1242
+ } | {
1243
+ readonly kind: "nix.apply";
1244
+ readonly ref: string;
1245
+ } | {
1246
+ readonly kind: "agent.delegate";
1247
+ readonly repository: string;
1248
+ readonly prompt: string;
1249
+ readonly mode: "consult" | "review" | "work";
1250
+ readonly channel?: "coordinator_chat";
1251
+ } | {
1252
+ readonly kind: "agent.message";
1253
+ readonly session: string;
1254
+ readonly message: string;
1255
+ } | {
1256
+ readonly kind: "browser.mcp.recover";
1257
+ };
1258
+ readonly result: string | null;
1259
+ readonly error: string | null;
1260
+ readonly worker?: {
1261
+ readonly host: string;
1262
+ readonly agentId: string;
1263
+ readonly name: string;
1264
+ readonly paneId: string;
1265
+ readonly relationship?: {
1266
+ readonly parentAgentId: string;
1267
+ readonly relation: "delegated" | "pair" | "review";
1268
+ };
1269
+ };
1270
+ readonly connectTarget?: {
1271
+ readonly host: string;
1272
+ readonly agentId: string;
1273
+ readonly url: string;
1274
+ };
1275
+ readonly workerTerminalObservedAt?: number | null;
1276
+ }[];
1277
+ nextCursor: {
1278
+ readonly createdAt: number;
1279
+ readonly id: string;
1280
+ } | null;
1281
+ }, FleetStoreError, never>;
1282
+ pendingApprovalPage: (cursor: {
1283
+ readonly createdAt: number;
1284
+ readonly id: string;
1285
+ } | null) => Effect.Effect<{
1286
+ records: {
1287
+ readonly id: string;
1288
+ readonly createdAt: number;
1289
+ readonly updatedAt: number;
1290
+ readonly actor: string;
1291
+ readonly hash: string;
1292
+ readonly approvalNonce: string | null;
1293
+ readonly approvalExpiresAt?: number | null;
1294
+ readonly approvedBy: string | null;
1295
+ readonly approvedAt?: number | null;
1296
+ readonly rejectedBy?: string | null;
1297
+ readonly rejectedAt?: number | null;
1298
+ readonly expiredAt?: number | null;
1299
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1300
+ readonly payload: {
1301
+ readonly kind: "nix.check";
1302
+ } | {
1303
+ readonly kind: "nix.apply";
1304
+ readonly ref: string;
1305
+ } | {
1306
+ readonly kind: "agent.delegate";
1307
+ readonly repository: string;
1308
+ readonly prompt: string;
1309
+ readonly mode: "consult" | "review" | "work";
1310
+ readonly channel?: "coordinator_chat";
1311
+ } | {
1312
+ readonly kind: "agent.message";
1313
+ readonly session: string;
1314
+ readonly message: string;
1315
+ } | {
1316
+ readonly kind: "browser.mcp.recover";
1317
+ };
1318
+ readonly result: string | null;
1319
+ readonly error: string | null;
1320
+ readonly worker?: {
1321
+ readonly host: string;
1322
+ readonly agentId: string;
1323
+ readonly name: string;
1324
+ readonly paneId: string;
1325
+ readonly relationship?: {
1326
+ readonly parentAgentId: string;
1327
+ readonly relation: "delegated" | "pair" | "review";
1328
+ };
1329
+ };
1330
+ readonly connectTarget?: {
1331
+ readonly host: string;
1332
+ readonly agentId: string;
1333
+ readonly url: string;
1334
+ };
1335
+ readonly workerTerminalObservedAt?: number | null;
1336
+ }[];
1337
+ nextCursor: {
1338
+ createdAt: number;
1339
+ id: string;
1340
+ } | null;
1341
+ }, FleetJobNotFoundError | FleetStoreError, never>;
1342
+ pendingApprovals: () => Effect.Effect<{
1343
+ readonly id: string;
1344
+ readonly createdAt: number;
1345
+ readonly updatedAt: number;
1346
+ readonly actor: string;
1347
+ readonly hash: string;
1348
+ readonly approvalNonce: string | null;
1349
+ readonly approvalExpiresAt?: number | null;
1350
+ readonly approvedBy: string | null;
1351
+ readonly approvedAt?: number | null;
1352
+ readonly rejectedBy?: string | null;
1353
+ readonly rejectedAt?: number | null;
1354
+ readonly expiredAt?: number | null;
1355
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1356
+ readonly payload: {
1357
+ readonly kind: "nix.check";
1358
+ } | {
1359
+ readonly kind: "nix.apply";
1360
+ readonly ref: string;
1361
+ } | {
1362
+ readonly kind: "agent.delegate";
1363
+ readonly repository: string;
1364
+ readonly prompt: string;
1365
+ readonly mode: "consult" | "review" | "work";
1366
+ readonly channel?: "coordinator_chat";
1367
+ } | {
1368
+ readonly kind: "agent.message";
1369
+ readonly session: string;
1370
+ readonly message: string;
1371
+ } | {
1372
+ readonly kind: "browser.mcp.recover";
1373
+ };
1374
+ readonly result: string | null;
1375
+ readonly error: string | null;
1376
+ readonly worker?: {
1377
+ readonly host: string;
1378
+ readonly agentId: string;
1379
+ readonly name: string;
1380
+ readonly paneId: string;
1381
+ readonly relationship?: {
1382
+ readonly parentAgentId: string;
1383
+ readonly relation: "delegated" | "pair" | "review";
1384
+ };
1385
+ };
1386
+ readonly connectTarget?: {
1387
+ readonly host: string;
1388
+ readonly agentId: string;
1389
+ readonly url: string;
1390
+ };
1391
+ readonly workerTerminalObservedAt?: number | null;
1392
+ }[], FleetJobNotFoundError | FleetStoreError, never>;
1393
+ agents: () => Effect.Effect<{
1394
+ readonly agents: readonly {
1395
+ readonly agentId: string | null;
1396
+ readonly activityRevision: number;
1397
+ readonly kind: string;
1398
+ readonly name: string;
1399
+ readonly paneId: string;
1400
+ readonly parentAgentId: string | null;
1401
+ readonly relation: "delegated" | "pair" | "review" | null;
1402
+ readonly status: string;
1403
+ readonly work: string;
1404
+ }[];
1405
+ readonly available: boolean;
1406
+ readonly error: string | null;
1407
+ }, FleetOperationError, never>;
1408
+ workers: () => Effect.Effect<readonly {
1409
+ readonly host: string;
1410
+ readonly agentId: string;
1411
+ readonly name: string;
1412
+ readonly paneId: string;
1413
+ readonly relationship?: {
1414
+ readonly parentAgentId: string;
1415
+ readonly relation: "delegated" | "pair" | "review";
1416
+ };
1417
+ readonly jobId: string;
1418
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1419
+ readonly terminalObservedAt: number | null;
1420
+ }[], FleetStoreError, never>;
1421
+ status: () => Effect.Effect<{
1422
+ applyConfigured: boolean;
1423
+ branch: string;
1424
+ dirty: boolean;
1425
+ repository: string;
1426
+ revision: string;
1427
+ host: string;
1428
+ herdr: {
1429
+ readonly agents: readonly {
1430
+ readonly agentId: string | null;
1431
+ readonly activityRevision: number;
1432
+ readonly kind: string;
1433
+ readonly name: string;
1434
+ readonly paneId: string;
1435
+ readonly parentAgentId: string | null;
1436
+ readonly relation: "delegated" | "pair" | "review" | null;
1437
+ readonly status: string;
1438
+ readonly work: string;
1439
+ }[];
1440
+ readonly available: boolean;
1441
+ readonly error: string | null;
1442
+ };
1443
+ }, FleetOperationError, never>;
1444
+ recover: () => Effect.Effect<string[], FleetStoreError | FleetTransitionConflictError, never>;
1445
+ abortSubmission: (jobId: string, detail: string) => Effect.Effect<{
1446
+ readonly id: string;
1447
+ readonly createdAt: number;
1448
+ readonly updatedAt: number;
1449
+ readonly actor: string;
1450
+ readonly hash: string;
1451
+ readonly approvalNonce: string | null;
1452
+ readonly approvalExpiresAt?: number | null;
1453
+ readonly approvedBy: string | null;
1454
+ readonly approvedAt?: number | null;
1455
+ readonly rejectedBy?: string | null;
1456
+ readonly rejectedAt?: number | null;
1457
+ readonly expiredAt?: number | null;
1458
+ readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
1459
+ readonly payload: {
1460
+ readonly kind: "nix.check";
1461
+ } | {
1462
+ readonly kind: "nix.apply";
1463
+ readonly ref: string;
1464
+ } | {
1465
+ readonly kind: "agent.delegate";
1466
+ readonly repository: string;
1467
+ readonly prompt: string;
1468
+ readonly mode: "consult" | "review" | "work";
1469
+ readonly channel?: "coordinator_chat";
1470
+ } | {
1471
+ readonly kind: "agent.message";
1472
+ readonly session: string;
1473
+ readonly message: string;
1474
+ } | {
1475
+ readonly kind: "browser.mcp.recover";
1476
+ };
1477
+ readonly result: string | null;
1478
+ readonly error: string | null;
1479
+ readonly worker?: {
1480
+ readonly host: string;
1481
+ readonly agentId: string;
1482
+ readonly name: string;
1483
+ readonly paneId: string;
1484
+ readonly relationship?: {
1485
+ readonly parentAgentId: string;
1486
+ readonly relation: "delegated" | "pair" | "review";
1487
+ };
1488
+ };
1489
+ readonly connectTarget?: {
1490
+ readonly host: string;
1491
+ readonly agentId: string;
1492
+ readonly url: string;
1493
+ };
1494
+ readonly workerTerminalObservedAt?: number | null;
1495
+ }, FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError, never>;
1496
+ }) => Effect.Effect<{
1497
+ candidates: {
1498
+ readonly host: string;
1499
+ readonly jobId: string;
1500
+ }[];
1501
+ pendingCount: number | null;
1502
+ }, FleetJobNotFoundError | FleetStoreError, HttpClient.HttpClient | Tailscale>;
1503
+ export declare const makeRunner: (runJob: (jobId: string) => Effect.Effect<unknown, unknown>) => Effect.Effect<Runner, never, never>;
1504
+ export declare const startHttpServer: (config: HostConfiguration, service: FleetService, uiAssets: UiAssets, options?: HttpServerOptions) => Promise<{
1505
+ readonly close: () => Promise<void>;
1506
+ readonly url: string;
1507
+ readonly tailnetUrl: string | null;
1508
+ readonly approvalUrl: string | null;
1509
+ readonly serveUrl: string | null;
1510
+ }>;
1511
+ export {};
1512
+ //# sourceMappingURL=http.d.ts.map