@knpkv/herdr-fleet 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.
- package/LICENSE +21 -0
- package/README.md +25 -0
- package/dist/config.d.ts +36 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +21 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +93 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +55 -0
- package/dist/errors.js.map +1 -0
- package/dist/hash.d.ts +21 -0
- package/dist/hash.d.ts.map +1 -0
- package/dist/hash.js +28 -0
- package/dist/hash.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/limits.d.ts +3 -0
- package/dist/limits.d.ts.map +1 -0
- package/dist/limits.js +3 -0
- package/dist/limits.js.map +1 -0
- package/dist/model.d.ts +372 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +240 -0
- package/dist/model.js.map +1 -0
- package/dist/response.d.ts +7 -0
- package/dist/response.d.ts.map +1 -0
- package/dist/response.js +39 -0
- package/dist/response.js.map +1 -0
- package/dist/service.d.ts +736 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +362 -0
- package/dist/service.js.map +1 -0
- package/dist/store.d.ts +575 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +209 -0
- package/dist/store.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
import { Crypto, Effect } from "effect";
|
|
2
|
+
import { FleetApprovalError, FleetJobNotFoundError, FleetOperationError, FleetStoreError, FleetTransitionConflictError, FleetValidationError } from "./errors.js";
|
|
3
|
+
import { type AgentDelegate, type AgentInventory, type AgentWorkerIdentity, type CoreJobPayload, type HostDetails, type JobHash, type LocalJobPayload } from "./model.js";
|
|
4
|
+
import type { JobStore } from "./store.js";
|
|
5
|
+
export type { AgentInventory, AgentSummary, HostDetails } from "./model.js";
|
|
6
|
+
export type WorkerStarted = (identity: AgentWorkerIdentity) => Effect.Effect<void, FleetOperationError>;
|
|
7
|
+
export type HostOperations = {
|
|
8
|
+
readonly listAgents: () => Effect.Effect<AgentInventory, FleetOperationError>;
|
|
9
|
+
readonly inspect: () => Effect.Effect<HostDetails, FleetOperationError>;
|
|
10
|
+
readonly run: (payload: CoreJobPayload, workerStarted: WorkerStarted, jobId: string) => Effect.Effect<string, FleetOperationError>;
|
|
11
|
+
readonly runLocal: (payload: LocalJobPayload) => Effect.Effect<string, FleetOperationError>;
|
|
12
|
+
readonly runCoordinatorChat: (payload: AgentDelegate, workerStarted: WorkerStarted, jobId: string) => Effect.Effect<string, FleetOperationError>;
|
|
13
|
+
};
|
|
14
|
+
export type Approval = {
|
|
15
|
+
readonly hash: JobHash;
|
|
16
|
+
readonly nonce: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const pendingApprovalPageMaxRecords = 8;
|
|
19
|
+
type Options = {
|
|
20
|
+
readonly host: string;
|
|
21
|
+
readonly store: JobStore;
|
|
22
|
+
readonly operations: HostOperations;
|
|
23
|
+
readonly approvalEnabled: boolean;
|
|
24
|
+
readonly now?: Effect.Effect<number>;
|
|
25
|
+
readonly id?: Effect.Effect<string>;
|
|
26
|
+
readonly nonce?: Effect.Effect<string>;
|
|
27
|
+
readonly approvalTtlMs?: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const makeFleetService: (options: Options) => Effect.Effect<{
|
|
30
|
+
submit: (request: {
|
|
31
|
+
readonly payload: {
|
|
32
|
+
readonly kind: "nix.check";
|
|
33
|
+
} | {
|
|
34
|
+
readonly kind: "nix.apply";
|
|
35
|
+
readonly ref: string;
|
|
36
|
+
} | {
|
|
37
|
+
readonly kind: "agent.delegate";
|
|
38
|
+
readonly repository: string;
|
|
39
|
+
readonly prompt: string;
|
|
40
|
+
readonly mode: "consult" | "review" | "work";
|
|
41
|
+
readonly channel?: "coordinator_chat";
|
|
42
|
+
} | {
|
|
43
|
+
readonly kind: "agent.message";
|
|
44
|
+
readonly session: string;
|
|
45
|
+
readonly message: string;
|
|
46
|
+
} | {
|
|
47
|
+
readonly kind: "browser.mcp.recover";
|
|
48
|
+
};
|
|
49
|
+
}, actor: string) => Effect.Effect<{
|
|
50
|
+
readonly id: string;
|
|
51
|
+
readonly createdAt: number;
|
|
52
|
+
readonly updatedAt: number;
|
|
53
|
+
readonly actor: string;
|
|
54
|
+
readonly hash: string;
|
|
55
|
+
readonly approvalNonce: string | null;
|
|
56
|
+
readonly approvalExpiresAt?: number | null;
|
|
57
|
+
readonly approvedBy: string | null;
|
|
58
|
+
readonly approvedAt?: number | null;
|
|
59
|
+
readonly rejectedBy?: string | null;
|
|
60
|
+
readonly rejectedAt?: number | null;
|
|
61
|
+
readonly expiredAt?: number | null;
|
|
62
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
63
|
+
readonly payload: {
|
|
64
|
+
readonly kind: "nix.check";
|
|
65
|
+
} | {
|
|
66
|
+
readonly kind: "nix.apply";
|
|
67
|
+
readonly ref: string;
|
|
68
|
+
} | {
|
|
69
|
+
readonly kind: "agent.delegate";
|
|
70
|
+
readonly repository: string;
|
|
71
|
+
readonly prompt: string;
|
|
72
|
+
readonly mode: "consult" | "review" | "work";
|
|
73
|
+
readonly channel?: "coordinator_chat";
|
|
74
|
+
} | {
|
|
75
|
+
readonly kind: "agent.message";
|
|
76
|
+
readonly session: string;
|
|
77
|
+
readonly message: string;
|
|
78
|
+
} | {
|
|
79
|
+
readonly kind: "browser.mcp.recover";
|
|
80
|
+
};
|
|
81
|
+
readonly result: string | null;
|
|
82
|
+
readonly error: string | null;
|
|
83
|
+
readonly worker?: {
|
|
84
|
+
readonly host: string;
|
|
85
|
+
readonly agentId: string;
|
|
86
|
+
readonly name: string;
|
|
87
|
+
readonly paneId: string;
|
|
88
|
+
readonly relationship?: {
|
|
89
|
+
readonly parentAgentId: string;
|
|
90
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
readonly connectTarget?: {
|
|
94
|
+
readonly host: string;
|
|
95
|
+
readonly agentId: string;
|
|
96
|
+
readonly url: string;
|
|
97
|
+
};
|
|
98
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
99
|
+
}, import("./errors.js").FleetJobConflictError | FleetOperationError | FleetStoreError | FleetValidationError, never>;
|
|
100
|
+
approve: (jobId: string, approval: Approval, actor: string) => Effect.Effect<{
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly createdAt: number;
|
|
103
|
+
readonly updatedAt: number;
|
|
104
|
+
readonly actor: string;
|
|
105
|
+
readonly hash: string;
|
|
106
|
+
readonly approvalNonce: string | null;
|
|
107
|
+
readonly approvalExpiresAt?: number | null;
|
|
108
|
+
readonly approvedBy: string | null;
|
|
109
|
+
readonly approvedAt?: number | null;
|
|
110
|
+
readonly rejectedBy?: string | null;
|
|
111
|
+
readonly rejectedAt?: number | null;
|
|
112
|
+
readonly expiredAt?: number | null;
|
|
113
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
114
|
+
readonly payload: {
|
|
115
|
+
readonly kind: "nix.check";
|
|
116
|
+
} | {
|
|
117
|
+
readonly kind: "nix.apply";
|
|
118
|
+
readonly ref: string;
|
|
119
|
+
} | {
|
|
120
|
+
readonly kind: "agent.delegate";
|
|
121
|
+
readonly repository: string;
|
|
122
|
+
readonly prompt: string;
|
|
123
|
+
readonly mode: "consult" | "review" | "work";
|
|
124
|
+
readonly channel?: "coordinator_chat";
|
|
125
|
+
} | {
|
|
126
|
+
readonly kind: "agent.message";
|
|
127
|
+
readonly session: string;
|
|
128
|
+
readonly message: string;
|
|
129
|
+
} | {
|
|
130
|
+
readonly kind: "browser.mcp.recover";
|
|
131
|
+
};
|
|
132
|
+
readonly result: string | null;
|
|
133
|
+
readonly error: string | null;
|
|
134
|
+
readonly worker?: {
|
|
135
|
+
readonly host: string;
|
|
136
|
+
readonly agentId: string;
|
|
137
|
+
readonly name: string;
|
|
138
|
+
readonly paneId: string;
|
|
139
|
+
readonly relationship?: {
|
|
140
|
+
readonly parentAgentId: string;
|
|
141
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly connectTarget?: {
|
|
145
|
+
readonly host: string;
|
|
146
|
+
readonly agentId: string;
|
|
147
|
+
readonly url: string;
|
|
148
|
+
};
|
|
149
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
150
|
+
}, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError | FleetValidationError, never>;
|
|
151
|
+
reject: (jobId: string, approval: Approval, actor: string) => Effect.Effect<{
|
|
152
|
+
readonly id: string;
|
|
153
|
+
readonly createdAt: number;
|
|
154
|
+
readonly updatedAt: number;
|
|
155
|
+
readonly actor: string;
|
|
156
|
+
readonly hash: string;
|
|
157
|
+
readonly approvalNonce: string | null;
|
|
158
|
+
readonly approvalExpiresAt?: number | null;
|
|
159
|
+
readonly approvedBy: string | null;
|
|
160
|
+
readonly approvedAt?: number | null;
|
|
161
|
+
readonly rejectedBy?: string | null;
|
|
162
|
+
readonly rejectedAt?: number | null;
|
|
163
|
+
readonly expiredAt?: number | null;
|
|
164
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
165
|
+
readonly payload: {
|
|
166
|
+
readonly kind: "nix.check";
|
|
167
|
+
} | {
|
|
168
|
+
readonly kind: "nix.apply";
|
|
169
|
+
readonly ref: string;
|
|
170
|
+
} | {
|
|
171
|
+
readonly kind: "agent.delegate";
|
|
172
|
+
readonly repository: string;
|
|
173
|
+
readonly prompt: string;
|
|
174
|
+
readonly mode: "consult" | "review" | "work";
|
|
175
|
+
readonly channel?: "coordinator_chat";
|
|
176
|
+
} | {
|
|
177
|
+
readonly kind: "agent.message";
|
|
178
|
+
readonly session: string;
|
|
179
|
+
readonly message: string;
|
|
180
|
+
} | {
|
|
181
|
+
readonly kind: "browser.mcp.recover";
|
|
182
|
+
};
|
|
183
|
+
readonly result: string | null;
|
|
184
|
+
readonly error: string | null;
|
|
185
|
+
readonly worker?: {
|
|
186
|
+
readonly host: string;
|
|
187
|
+
readonly agentId: string;
|
|
188
|
+
readonly name: string;
|
|
189
|
+
readonly paneId: string;
|
|
190
|
+
readonly relationship?: {
|
|
191
|
+
readonly parentAgentId: string;
|
|
192
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly connectTarget?: {
|
|
196
|
+
readonly host: string;
|
|
197
|
+
readonly agentId: string;
|
|
198
|
+
readonly url: string;
|
|
199
|
+
};
|
|
200
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
201
|
+
}, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError | FleetValidationError, never>;
|
|
202
|
+
run: (jobId: string) => Effect.Effect<{
|
|
203
|
+
readonly id: string;
|
|
204
|
+
readonly createdAt: number;
|
|
205
|
+
readonly updatedAt: number;
|
|
206
|
+
readonly actor: string;
|
|
207
|
+
readonly hash: string;
|
|
208
|
+
readonly approvalNonce: string | null;
|
|
209
|
+
readonly approvalExpiresAt?: number | null;
|
|
210
|
+
readonly approvedBy: string | null;
|
|
211
|
+
readonly approvedAt?: number | null;
|
|
212
|
+
readonly rejectedBy?: string | null;
|
|
213
|
+
readonly rejectedAt?: number | null;
|
|
214
|
+
readonly expiredAt?: number | null;
|
|
215
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
216
|
+
readonly payload: {
|
|
217
|
+
readonly kind: "nix.check";
|
|
218
|
+
} | {
|
|
219
|
+
readonly kind: "nix.apply";
|
|
220
|
+
readonly ref: string;
|
|
221
|
+
} | {
|
|
222
|
+
readonly kind: "agent.delegate";
|
|
223
|
+
readonly repository: string;
|
|
224
|
+
readonly prompt: string;
|
|
225
|
+
readonly mode: "consult" | "review" | "work";
|
|
226
|
+
readonly channel?: "coordinator_chat";
|
|
227
|
+
} | {
|
|
228
|
+
readonly kind: "agent.message";
|
|
229
|
+
readonly session: string;
|
|
230
|
+
readonly message: string;
|
|
231
|
+
} | {
|
|
232
|
+
readonly kind: "browser.mcp.recover";
|
|
233
|
+
};
|
|
234
|
+
readonly result: string | null;
|
|
235
|
+
readonly error: string | null;
|
|
236
|
+
readonly worker?: {
|
|
237
|
+
readonly host: string;
|
|
238
|
+
readonly agentId: string;
|
|
239
|
+
readonly name: string;
|
|
240
|
+
readonly paneId: string;
|
|
241
|
+
readonly relationship?: {
|
|
242
|
+
readonly parentAgentId: string;
|
|
243
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
readonly connectTarget?: {
|
|
247
|
+
readonly host: string;
|
|
248
|
+
readonly agentId: string;
|
|
249
|
+
readonly url: string;
|
|
250
|
+
};
|
|
251
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
252
|
+
}, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError, never>;
|
|
253
|
+
runCoordinatorChat: (jobId: string) => Effect.Effect<{
|
|
254
|
+
readonly id: string;
|
|
255
|
+
readonly createdAt: number;
|
|
256
|
+
readonly updatedAt: number;
|
|
257
|
+
readonly actor: string;
|
|
258
|
+
readonly hash: string;
|
|
259
|
+
readonly approvalNonce: string | null;
|
|
260
|
+
readonly approvalExpiresAt?: number | null;
|
|
261
|
+
readonly approvedBy: string | null;
|
|
262
|
+
readonly approvedAt?: number | null;
|
|
263
|
+
readonly rejectedBy?: string | null;
|
|
264
|
+
readonly rejectedAt?: number | null;
|
|
265
|
+
readonly expiredAt?: number | null;
|
|
266
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
267
|
+
readonly payload: {
|
|
268
|
+
readonly kind: "nix.check";
|
|
269
|
+
} | {
|
|
270
|
+
readonly kind: "nix.apply";
|
|
271
|
+
readonly ref: string;
|
|
272
|
+
} | {
|
|
273
|
+
readonly kind: "agent.delegate";
|
|
274
|
+
readonly repository: string;
|
|
275
|
+
readonly prompt: string;
|
|
276
|
+
readonly mode: "consult" | "review" | "work";
|
|
277
|
+
readonly channel?: "coordinator_chat";
|
|
278
|
+
} | {
|
|
279
|
+
readonly kind: "agent.message";
|
|
280
|
+
readonly session: string;
|
|
281
|
+
readonly message: string;
|
|
282
|
+
} | {
|
|
283
|
+
readonly kind: "browser.mcp.recover";
|
|
284
|
+
};
|
|
285
|
+
readonly result: string | null;
|
|
286
|
+
readonly error: string | null;
|
|
287
|
+
readonly worker?: {
|
|
288
|
+
readonly host: string;
|
|
289
|
+
readonly agentId: string;
|
|
290
|
+
readonly name: string;
|
|
291
|
+
readonly paneId: string;
|
|
292
|
+
readonly relationship?: {
|
|
293
|
+
readonly parentAgentId: string;
|
|
294
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
readonly connectTarget?: {
|
|
298
|
+
readonly host: string;
|
|
299
|
+
readonly agentId: string;
|
|
300
|
+
readonly url: string;
|
|
301
|
+
};
|
|
302
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
303
|
+
}, FleetApprovalError | FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError | FleetValidationError, never>;
|
|
304
|
+
get: (jobId: string) => Effect.Effect<{
|
|
305
|
+
readonly id: string;
|
|
306
|
+
readonly createdAt: number;
|
|
307
|
+
readonly updatedAt: number;
|
|
308
|
+
readonly actor: string;
|
|
309
|
+
readonly hash: string;
|
|
310
|
+
readonly approvalNonce: string | null;
|
|
311
|
+
readonly approvalExpiresAt?: number | null;
|
|
312
|
+
readonly approvedBy: string | null;
|
|
313
|
+
readonly approvedAt?: number | null;
|
|
314
|
+
readonly rejectedBy?: string | null;
|
|
315
|
+
readonly rejectedAt?: number | null;
|
|
316
|
+
readonly expiredAt?: number | null;
|
|
317
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
318
|
+
readonly payload: {
|
|
319
|
+
readonly kind: "nix.check";
|
|
320
|
+
} | {
|
|
321
|
+
readonly kind: "nix.apply";
|
|
322
|
+
readonly ref: string;
|
|
323
|
+
} | {
|
|
324
|
+
readonly kind: "agent.delegate";
|
|
325
|
+
readonly repository: string;
|
|
326
|
+
readonly prompt: string;
|
|
327
|
+
readonly mode: "consult" | "review" | "work";
|
|
328
|
+
readonly channel?: "coordinator_chat";
|
|
329
|
+
} | {
|
|
330
|
+
readonly kind: "agent.message";
|
|
331
|
+
readonly session: string;
|
|
332
|
+
readonly message: string;
|
|
333
|
+
} | {
|
|
334
|
+
readonly kind: "browser.mcp.recover";
|
|
335
|
+
};
|
|
336
|
+
readonly result: string | null;
|
|
337
|
+
readonly error: string | null;
|
|
338
|
+
readonly worker?: {
|
|
339
|
+
readonly host: string;
|
|
340
|
+
readonly agentId: string;
|
|
341
|
+
readonly name: string;
|
|
342
|
+
readonly paneId: string;
|
|
343
|
+
readonly relationship?: {
|
|
344
|
+
readonly parentAgentId: string;
|
|
345
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
readonly connectTarget?: {
|
|
349
|
+
readonly host: string;
|
|
350
|
+
readonly agentId: string;
|
|
351
|
+
readonly url: string;
|
|
352
|
+
};
|
|
353
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
354
|
+
}, FleetJobNotFoundError | FleetStoreError, never>;
|
|
355
|
+
history: (limit: number) => Effect.Effect<{
|
|
356
|
+
readonly id: string;
|
|
357
|
+
readonly createdAt: number;
|
|
358
|
+
readonly updatedAt: number;
|
|
359
|
+
readonly actor: string;
|
|
360
|
+
readonly hash: string;
|
|
361
|
+
readonly approvalNonce: string | null;
|
|
362
|
+
readonly approvalExpiresAt?: number | null;
|
|
363
|
+
readonly approvedBy: string | null;
|
|
364
|
+
readonly approvedAt?: number | null;
|
|
365
|
+
readonly rejectedBy?: string | null;
|
|
366
|
+
readonly rejectedAt?: number | null;
|
|
367
|
+
readonly expiredAt?: number | null;
|
|
368
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
369
|
+
readonly payload: {
|
|
370
|
+
readonly kind: "nix.check";
|
|
371
|
+
} | {
|
|
372
|
+
readonly kind: "nix.apply";
|
|
373
|
+
readonly ref: string;
|
|
374
|
+
} | {
|
|
375
|
+
readonly kind: "agent.delegate";
|
|
376
|
+
readonly repository: string;
|
|
377
|
+
readonly prompt: string;
|
|
378
|
+
readonly mode: "consult" | "review" | "work";
|
|
379
|
+
readonly channel?: "coordinator_chat";
|
|
380
|
+
} | {
|
|
381
|
+
readonly kind: "agent.message";
|
|
382
|
+
readonly session: string;
|
|
383
|
+
readonly message: string;
|
|
384
|
+
} | {
|
|
385
|
+
readonly kind: "browser.mcp.recover";
|
|
386
|
+
};
|
|
387
|
+
readonly result: string | null;
|
|
388
|
+
readonly error: string | null;
|
|
389
|
+
readonly worker?: {
|
|
390
|
+
readonly host: string;
|
|
391
|
+
readonly agentId: string;
|
|
392
|
+
readonly name: string;
|
|
393
|
+
readonly paneId: string;
|
|
394
|
+
readonly relationship?: {
|
|
395
|
+
readonly parentAgentId: string;
|
|
396
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
readonly connectTarget?: {
|
|
400
|
+
readonly host: string;
|
|
401
|
+
readonly agentId: string;
|
|
402
|
+
readonly url: string;
|
|
403
|
+
};
|
|
404
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
405
|
+
}[], FleetStoreError, never>;
|
|
406
|
+
historyAfter: (cursor: {
|
|
407
|
+
readonly createdAt: number;
|
|
408
|
+
readonly id: string;
|
|
409
|
+
} | null, limit: number) => Effect.Effect<{
|
|
410
|
+
readonly id: string;
|
|
411
|
+
readonly createdAt: number;
|
|
412
|
+
readonly updatedAt: number;
|
|
413
|
+
readonly actor: string;
|
|
414
|
+
readonly hash: string;
|
|
415
|
+
readonly approvalNonce: string | null;
|
|
416
|
+
readonly approvalExpiresAt?: number | null;
|
|
417
|
+
readonly approvedBy: string | null;
|
|
418
|
+
readonly approvedAt?: number | null;
|
|
419
|
+
readonly rejectedBy?: string | null;
|
|
420
|
+
readonly rejectedAt?: number | null;
|
|
421
|
+
readonly expiredAt?: number | null;
|
|
422
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
423
|
+
readonly payload: {
|
|
424
|
+
readonly kind: "nix.check";
|
|
425
|
+
} | {
|
|
426
|
+
readonly kind: "nix.apply";
|
|
427
|
+
readonly ref: string;
|
|
428
|
+
} | {
|
|
429
|
+
readonly kind: "agent.delegate";
|
|
430
|
+
readonly repository: string;
|
|
431
|
+
readonly prompt: string;
|
|
432
|
+
readonly mode: "consult" | "review" | "work";
|
|
433
|
+
readonly channel?: "coordinator_chat";
|
|
434
|
+
} | {
|
|
435
|
+
readonly kind: "agent.message";
|
|
436
|
+
readonly session: string;
|
|
437
|
+
readonly message: string;
|
|
438
|
+
} | {
|
|
439
|
+
readonly kind: "browser.mcp.recover";
|
|
440
|
+
};
|
|
441
|
+
readonly result: string | null;
|
|
442
|
+
readonly error: string | null;
|
|
443
|
+
readonly worker?: {
|
|
444
|
+
readonly host: string;
|
|
445
|
+
readonly agentId: string;
|
|
446
|
+
readonly name: string;
|
|
447
|
+
readonly paneId: string;
|
|
448
|
+
readonly relationship?: {
|
|
449
|
+
readonly parentAgentId: string;
|
|
450
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
readonly connectTarget?: {
|
|
454
|
+
readonly host: string;
|
|
455
|
+
readonly agentId: string;
|
|
456
|
+
readonly url: string;
|
|
457
|
+
};
|
|
458
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
459
|
+
}[], FleetStoreError, never>;
|
|
460
|
+
historyPage: (cursor: {
|
|
461
|
+
readonly createdAt: number;
|
|
462
|
+
readonly id: string;
|
|
463
|
+
} | null, limit: number) => Effect.Effect<{
|
|
464
|
+
records: {
|
|
465
|
+
readonly id: string;
|
|
466
|
+
readonly createdAt: number;
|
|
467
|
+
readonly updatedAt: number;
|
|
468
|
+
readonly actor: string;
|
|
469
|
+
readonly hash: string;
|
|
470
|
+
readonly approvalNonce: string | null;
|
|
471
|
+
readonly approvalExpiresAt?: number | null;
|
|
472
|
+
readonly approvedBy: string | null;
|
|
473
|
+
readonly approvedAt?: number | null;
|
|
474
|
+
readonly rejectedBy?: string | null;
|
|
475
|
+
readonly rejectedAt?: number | null;
|
|
476
|
+
readonly expiredAt?: number | null;
|
|
477
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
478
|
+
readonly payload: {
|
|
479
|
+
readonly kind: "nix.check";
|
|
480
|
+
} | {
|
|
481
|
+
readonly kind: "nix.apply";
|
|
482
|
+
readonly ref: string;
|
|
483
|
+
} | {
|
|
484
|
+
readonly kind: "agent.delegate";
|
|
485
|
+
readonly repository: string;
|
|
486
|
+
readonly prompt: string;
|
|
487
|
+
readonly mode: "consult" | "review" | "work";
|
|
488
|
+
readonly channel?: "coordinator_chat";
|
|
489
|
+
} | {
|
|
490
|
+
readonly kind: "agent.message";
|
|
491
|
+
readonly session: string;
|
|
492
|
+
readonly message: string;
|
|
493
|
+
} | {
|
|
494
|
+
readonly kind: "browser.mcp.recover";
|
|
495
|
+
};
|
|
496
|
+
readonly result: string | null;
|
|
497
|
+
readonly error: string | null;
|
|
498
|
+
readonly worker?: {
|
|
499
|
+
readonly host: string;
|
|
500
|
+
readonly agentId: string;
|
|
501
|
+
readonly name: string;
|
|
502
|
+
readonly paneId: string;
|
|
503
|
+
readonly relationship?: {
|
|
504
|
+
readonly parentAgentId: string;
|
|
505
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
readonly connectTarget?: {
|
|
509
|
+
readonly host: string;
|
|
510
|
+
readonly agentId: string;
|
|
511
|
+
readonly url: string;
|
|
512
|
+
};
|
|
513
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
514
|
+
}[];
|
|
515
|
+
nextCursor: {
|
|
516
|
+
readonly createdAt: number;
|
|
517
|
+
readonly id: string;
|
|
518
|
+
} | null;
|
|
519
|
+
}, FleetStoreError, never>;
|
|
520
|
+
pendingApprovalPage: (cursor: {
|
|
521
|
+
readonly createdAt: number;
|
|
522
|
+
readonly id: string;
|
|
523
|
+
} | null) => Effect.Effect<{
|
|
524
|
+
records: {
|
|
525
|
+
readonly id: string;
|
|
526
|
+
readonly createdAt: number;
|
|
527
|
+
readonly updatedAt: number;
|
|
528
|
+
readonly actor: string;
|
|
529
|
+
readonly hash: string;
|
|
530
|
+
readonly approvalNonce: string | null;
|
|
531
|
+
readonly approvalExpiresAt?: number | null;
|
|
532
|
+
readonly approvedBy: string | null;
|
|
533
|
+
readonly approvedAt?: number | null;
|
|
534
|
+
readonly rejectedBy?: string | null;
|
|
535
|
+
readonly rejectedAt?: number | null;
|
|
536
|
+
readonly expiredAt?: number | null;
|
|
537
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
538
|
+
readonly payload: {
|
|
539
|
+
readonly kind: "nix.check";
|
|
540
|
+
} | {
|
|
541
|
+
readonly kind: "nix.apply";
|
|
542
|
+
readonly ref: string;
|
|
543
|
+
} | {
|
|
544
|
+
readonly kind: "agent.delegate";
|
|
545
|
+
readonly repository: string;
|
|
546
|
+
readonly prompt: string;
|
|
547
|
+
readonly mode: "consult" | "review" | "work";
|
|
548
|
+
readonly channel?: "coordinator_chat";
|
|
549
|
+
} | {
|
|
550
|
+
readonly kind: "agent.message";
|
|
551
|
+
readonly session: string;
|
|
552
|
+
readonly message: string;
|
|
553
|
+
} | {
|
|
554
|
+
readonly kind: "browser.mcp.recover";
|
|
555
|
+
};
|
|
556
|
+
readonly result: string | null;
|
|
557
|
+
readonly error: string | null;
|
|
558
|
+
readonly worker?: {
|
|
559
|
+
readonly host: string;
|
|
560
|
+
readonly agentId: string;
|
|
561
|
+
readonly name: string;
|
|
562
|
+
readonly paneId: string;
|
|
563
|
+
readonly relationship?: {
|
|
564
|
+
readonly parentAgentId: string;
|
|
565
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
readonly connectTarget?: {
|
|
569
|
+
readonly host: string;
|
|
570
|
+
readonly agentId: string;
|
|
571
|
+
readonly url: string;
|
|
572
|
+
};
|
|
573
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
574
|
+
}[];
|
|
575
|
+
nextCursor: {
|
|
576
|
+
createdAt: number;
|
|
577
|
+
id: string;
|
|
578
|
+
} | null;
|
|
579
|
+
}, FleetJobNotFoundError | FleetStoreError, never>;
|
|
580
|
+
pendingApprovals: () => Effect.Effect<{
|
|
581
|
+
readonly id: string;
|
|
582
|
+
readonly createdAt: number;
|
|
583
|
+
readonly updatedAt: number;
|
|
584
|
+
readonly actor: string;
|
|
585
|
+
readonly hash: string;
|
|
586
|
+
readonly approvalNonce: string | null;
|
|
587
|
+
readonly approvalExpiresAt?: number | null;
|
|
588
|
+
readonly approvedBy: string | null;
|
|
589
|
+
readonly approvedAt?: number | null;
|
|
590
|
+
readonly rejectedBy?: string | null;
|
|
591
|
+
readonly rejectedAt?: number | null;
|
|
592
|
+
readonly expiredAt?: number | null;
|
|
593
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
594
|
+
readonly payload: {
|
|
595
|
+
readonly kind: "nix.check";
|
|
596
|
+
} | {
|
|
597
|
+
readonly kind: "nix.apply";
|
|
598
|
+
readonly ref: string;
|
|
599
|
+
} | {
|
|
600
|
+
readonly kind: "agent.delegate";
|
|
601
|
+
readonly repository: string;
|
|
602
|
+
readonly prompt: string;
|
|
603
|
+
readonly mode: "consult" | "review" | "work";
|
|
604
|
+
readonly channel?: "coordinator_chat";
|
|
605
|
+
} | {
|
|
606
|
+
readonly kind: "agent.message";
|
|
607
|
+
readonly session: string;
|
|
608
|
+
readonly message: string;
|
|
609
|
+
} | {
|
|
610
|
+
readonly kind: "browser.mcp.recover";
|
|
611
|
+
};
|
|
612
|
+
readonly result: string | null;
|
|
613
|
+
readonly error: string | null;
|
|
614
|
+
readonly worker?: {
|
|
615
|
+
readonly host: string;
|
|
616
|
+
readonly agentId: string;
|
|
617
|
+
readonly name: string;
|
|
618
|
+
readonly paneId: string;
|
|
619
|
+
readonly relationship?: {
|
|
620
|
+
readonly parentAgentId: string;
|
|
621
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
readonly connectTarget?: {
|
|
625
|
+
readonly host: string;
|
|
626
|
+
readonly agentId: string;
|
|
627
|
+
readonly url: string;
|
|
628
|
+
};
|
|
629
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
630
|
+
}[], FleetJobNotFoundError | FleetStoreError, never>;
|
|
631
|
+
agents: () => Effect.Effect<{
|
|
632
|
+
readonly agents: readonly {
|
|
633
|
+
readonly agentId: string | null;
|
|
634
|
+
readonly activityRevision: number;
|
|
635
|
+
readonly kind: string;
|
|
636
|
+
readonly name: string;
|
|
637
|
+
readonly paneId: string;
|
|
638
|
+
readonly parentAgentId: string | null;
|
|
639
|
+
readonly relation: "delegated" | "pair" | "review" | null;
|
|
640
|
+
readonly status: string;
|
|
641
|
+
readonly work: string;
|
|
642
|
+
}[];
|
|
643
|
+
readonly available: boolean;
|
|
644
|
+
readonly error: string | null;
|
|
645
|
+
}, FleetOperationError, never>;
|
|
646
|
+
workers: () => Effect.Effect<readonly {
|
|
647
|
+
readonly host: string;
|
|
648
|
+
readonly agentId: string;
|
|
649
|
+
readonly name: string;
|
|
650
|
+
readonly paneId: string;
|
|
651
|
+
readonly relationship?: {
|
|
652
|
+
readonly parentAgentId: string;
|
|
653
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
654
|
+
};
|
|
655
|
+
readonly jobId: string;
|
|
656
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
657
|
+
readonly terminalObservedAt: number | null;
|
|
658
|
+
}[], FleetStoreError, never>;
|
|
659
|
+
status: () => Effect.Effect<{
|
|
660
|
+
applyConfigured: boolean;
|
|
661
|
+
branch: string;
|
|
662
|
+
dirty: boolean;
|
|
663
|
+
repository: string;
|
|
664
|
+
revision: string;
|
|
665
|
+
host: string;
|
|
666
|
+
herdr: {
|
|
667
|
+
readonly agents: readonly {
|
|
668
|
+
readonly agentId: string | null;
|
|
669
|
+
readonly activityRevision: number;
|
|
670
|
+
readonly kind: string;
|
|
671
|
+
readonly name: string;
|
|
672
|
+
readonly paneId: string;
|
|
673
|
+
readonly parentAgentId: string | null;
|
|
674
|
+
readonly relation: "delegated" | "pair" | "review" | null;
|
|
675
|
+
readonly status: string;
|
|
676
|
+
readonly work: string;
|
|
677
|
+
}[];
|
|
678
|
+
readonly available: boolean;
|
|
679
|
+
readonly error: string | null;
|
|
680
|
+
};
|
|
681
|
+
}, FleetOperationError, never>;
|
|
682
|
+
recover: () => Effect.Effect<string[], FleetStoreError | FleetTransitionConflictError, never>;
|
|
683
|
+
abortSubmission: (jobId: string, detail: string) => Effect.Effect<{
|
|
684
|
+
readonly id: string;
|
|
685
|
+
readonly createdAt: number;
|
|
686
|
+
readonly updatedAt: number;
|
|
687
|
+
readonly actor: string;
|
|
688
|
+
readonly hash: string;
|
|
689
|
+
readonly approvalNonce: string | null;
|
|
690
|
+
readonly approvalExpiresAt?: number | null;
|
|
691
|
+
readonly approvedBy: string | null;
|
|
692
|
+
readonly approvedAt?: number | null;
|
|
693
|
+
readonly rejectedBy?: string | null;
|
|
694
|
+
readonly rejectedAt?: number | null;
|
|
695
|
+
readonly expiredAt?: number | null;
|
|
696
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
697
|
+
readonly payload: {
|
|
698
|
+
readonly kind: "nix.check";
|
|
699
|
+
} | {
|
|
700
|
+
readonly kind: "nix.apply";
|
|
701
|
+
readonly ref: string;
|
|
702
|
+
} | {
|
|
703
|
+
readonly kind: "agent.delegate";
|
|
704
|
+
readonly repository: string;
|
|
705
|
+
readonly prompt: string;
|
|
706
|
+
readonly mode: "consult" | "review" | "work";
|
|
707
|
+
readonly channel?: "coordinator_chat";
|
|
708
|
+
} | {
|
|
709
|
+
readonly kind: "agent.message";
|
|
710
|
+
readonly session: string;
|
|
711
|
+
readonly message: string;
|
|
712
|
+
} | {
|
|
713
|
+
readonly kind: "browser.mcp.recover";
|
|
714
|
+
};
|
|
715
|
+
readonly result: string | null;
|
|
716
|
+
readonly error: string | null;
|
|
717
|
+
readonly worker?: {
|
|
718
|
+
readonly host: string;
|
|
719
|
+
readonly agentId: string;
|
|
720
|
+
readonly name: string;
|
|
721
|
+
readonly paneId: string;
|
|
722
|
+
readonly relationship?: {
|
|
723
|
+
readonly parentAgentId: string;
|
|
724
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
725
|
+
};
|
|
726
|
+
};
|
|
727
|
+
readonly connectTarget?: {
|
|
728
|
+
readonly host: string;
|
|
729
|
+
readonly agentId: string;
|
|
730
|
+
readonly url: string;
|
|
731
|
+
};
|
|
732
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
733
|
+
}, FleetJobNotFoundError | FleetStoreError | FleetTransitionConflictError, never>;
|
|
734
|
+
}, never, Crypto.Crypto>;
|
|
735
|
+
export type FleetService = Effect.Success<ReturnType<typeof makeFleetService>>;
|
|
736
|
+
//# sourceMappingURL=service.d.ts.map
|