@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
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { Effect, FileSystem, Path } from "effect";
|
|
2
|
+
import { FleetJobConflictError, FleetStoreError, FleetTransitionConflictError } from "./errors.js";
|
|
3
|
+
export declare class JobStore {
|
|
4
|
+
#private;
|
|
5
|
+
readonly path: string;
|
|
6
|
+
private constructor();
|
|
7
|
+
static readonly open: (path: string) => Effect.Effect<JobStore, FleetStoreError, FileSystem.FileSystem | Path.Path>;
|
|
8
|
+
readonly put: (this: JobStore, record: {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly createdAt: number;
|
|
11
|
+
readonly updatedAt: number;
|
|
12
|
+
readonly actor: string;
|
|
13
|
+
readonly hash: string;
|
|
14
|
+
readonly approvalNonce: string | null;
|
|
15
|
+
readonly approvalExpiresAt?: number | null;
|
|
16
|
+
readonly approvedBy: string | null;
|
|
17
|
+
readonly approvedAt?: number | null;
|
|
18
|
+
readonly rejectedBy?: string | null;
|
|
19
|
+
readonly rejectedAt?: number | null;
|
|
20
|
+
readonly expiredAt?: number | null;
|
|
21
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
22
|
+
readonly payload: {
|
|
23
|
+
readonly kind: "nix.check";
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: "nix.apply";
|
|
26
|
+
readonly ref: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly kind: "agent.delegate";
|
|
29
|
+
readonly repository: string;
|
|
30
|
+
readonly prompt: string;
|
|
31
|
+
readonly mode: "consult" | "review" | "work";
|
|
32
|
+
readonly channel?: "coordinator_chat";
|
|
33
|
+
} | {
|
|
34
|
+
readonly kind: "agent.message";
|
|
35
|
+
readonly session: string;
|
|
36
|
+
readonly message: string;
|
|
37
|
+
} | {
|
|
38
|
+
readonly kind: "browser.mcp.recover";
|
|
39
|
+
};
|
|
40
|
+
readonly result: string | null;
|
|
41
|
+
readonly error: string | null;
|
|
42
|
+
readonly worker?: {
|
|
43
|
+
readonly host: string;
|
|
44
|
+
readonly agentId: string;
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly paneId: string;
|
|
47
|
+
readonly relationship?: {
|
|
48
|
+
readonly parentAgentId: string;
|
|
49
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
readonly connectTarget?: {
|
|
53
|
+
readonly host: string;
|
|
54
|
+
readonly agentId: string;
|
|
55
|
+
readonly url: string;
|
|
56
|
+
};
|
|
57
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
58
|
+
}) => Effect.Effect<{
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly createdAt: number;
|
|
61
|
+
readonly updatedAt: number;
|
|
62
|
+
readonly actor: string;
|
|
63
|
+
readonly hash: string;
|
|
64
|
+
readonly approvalNonce: string | null;
|
|
65
|
+
readonly approvalExpiresAt?: number | null;
|
|
66
|
+
readonly approvedBy: string | null;
|
|
67
|
+
readonly approvedAt?: number | null;
|
|
68
|
+
readonly rejectedBy?: string | null;
|
|
69
|
+
readonly rejectedAt?: number | null;
|
|
70
|
+
readonly expiredAt?: number | null;
|
|
71
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
72
|
+
readonly payload: {
|
|
73
|
+
readonly kind: "nix.check";
|
|
74
|
+
} | {
|
|
75
|
+
readonly kind: "nix.apply";
|
|
76
|
+
readonly ref: string;
|
|
77
|
+
} | {
|
|
78
|
+
readonly kind: "agent.delegate";
|
|
79
|
+
readonly repository: string;
|
|
80
|
+
readonly prompt: string;
|
|
81
|
+
readonly mode: "consult" | "review" | "work";
|
|
82
|
+
readonly channel?: "coordinator_chat";
|
|
83
|
+
} | {
|
|
84
|
+
readonly kind: "agent.message";
|
|
85
|
+
readonly session: string;
|
|
86
|
+
readonly message: string;
|
|
87
|
+
} | {
|
|
88
|
+
readonly kind: "browser.mcp.recover";
|
|
89
|
+
};
|
|
90
|
+
readonly result: string | null;
|
|
91
|
+
readonly error: string | null;
|
|
92
|
+
readonly worker?: {
|
|
93
|
+
readonly host: string;
|
|
94
|
+
readonly agentId: string;
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly paneId: string;
|
|
97
|
+
readonly relationship?: {
|
|
98
|
+
readonly parentAgentId: string;
|
|
99
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly connectTarget?: {
|
|
103
|
+
readonly host: string;
|
|
104
|
+
readonly agentId: string;
|
|
105
|
+
readonly url: string;
|
|
106
|
+
};
|
|
107
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
108
|
+
}, FleetJobConflictError | FleetStoreError, never>;
|
|
109
|
+
readonly transition: (this: JobStore, current: {
|
|
110
|
+
readonly id: string;
|
|
111
|
+
readonly createdAt: number;
|
|
112
|
+
readonly updatedAt: number;
|
|
113
|
+
readonly actor: string;
|
|
114
|
+
readonly hash: string;
|
|
115
|
+
readonly approvalNonce: string | null;
|
|
116
|
+
readonly approvalExpiresAt?: number | null;
|
|
117
|
+
readonly approvedBy: string | null;
|
|
118
|
+
readonly approvedAt?: number | null;
|
|
119
|
+
readonly rejectedBy?: string | null;
|
|
120
|
+
readonly rejectedAt?: number | null;
|
|
121
|
+
readonly expiredAt?: number | null;
|
|
122
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
123
|
+
readonly payload: {
|
|
124
|
+
readonly kind: "nix.check";
|
|
125
|
+
} | {
|
|
126
|
+
readonly kind: "nix.apply";
|
|
127
|
+
readonly ref: string;
|
|
128
|
+
} | {
|
|
129
|
+
readonly kind: "agent.delegate";
|
|
130
|
+
readonly repository: string;
|
|
131
|
+
readonly prompt: string;
|
|
132
|
+
readonly mode: "consult" | "review" | "work";
|
|
133
|
+
readonly channel?: "coordinator_chat";
|
|
134
|
+
} | {
|
|
135
|
+
readonly kind: "agent.message";
|
|
136
|
+
readonly session: string;
|
|
137
|
+
readonly message: string;
|
|
138
|
+
} | {
|
|
139
|
+
readonly kind: "browser.mcp.recover";
|
|
140
|
+
};
|
|
141
|
+
readonly result: string | null;
|
|
142
|
+
readonly error: string | null;
|
|
143
|
+
readonly worker?: {
|
|
144
|
+
readonly host: string;
|
|
145
|
+
readonly agentId: string;
|
|
146
|
+
readonly name: string;
|
|
147
|
+
readonly paneId: string;
|
|
148
|
+
readonly relationship?: {
|
|
149
|
+
readonly parentAgentId: string;
|
|
150
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
readonly connectTarget?: {
|
|
154
|
+
readonly host: string;
|
|
155
|
+
readonly agentId: string;
|
|
156
|
+
readonly url: string;
|
|
157
|
+
};
|
|
158
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
159
|
+
}, next: {
|
|
160
|
+
readonly id: string;
|
|
161
|
+
readonly createdAt: number;
|
|
162
|
+
readonly updatedAt: number;
|
|
163
|
+
readonly actor: string;
|
|
164
|
+
readonly hash: string;
|
|
165
|
+
readonly approvalNonce: string | null;
|
|
166
|
+
readonly approvalExpiresAt?: number | null;
|
|
167
|
+
readonly approvedBy: string | null;
|
|
168
|
+
readonly approvedAt?: number | null;
|
|
169
|
+
readonly rejectedBy?: string | null;
|
|
170
|
+
readonly rejectedAt?: number | null;
|
|
171
|
+
readonly expiredAt?: number | null;
|
|
172
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
173
|
+
readonly payload: {
|
|
174
|
+
readonly kind: "nix.check";
|
|
175
|
+
} | {
|
|
176
|
+
readonly kind: "nix.apply";
|
|
177
|
+
readonly ref: string;
|
|
178
|
+
} | {
|
|
179
|
+
readonly kind: "agent.delegate";
|
|
180
|
+
readonly repository: string;
|
|
181
|
+
readonly prompt: string;
|
|
182
|
+
readonly mode: "consult" | "review" | "work";
|
|
183
|
+
readonly channel?: "coordinator_chat";
|
|
184
|
+
} | {
|
|
185
|
+
readonly kind: "agent.message";
|
|
186
|
+
readonly session: string;
|
|
187
|
+
readonly message: string;
|
|
188
|
+
} | {
|
|
189
|
+
readonly kind: "browser.mcp.recover";
|
|
190
|
+
};
|
|
191
|
+
readonly result: string | null;
|
|
192
|
+
readonly error: string | null;
|
|
193
|
+
readonly worker?: {
|
|
194
|
+
readonly host: string;
|
|
195
|
+
readonly agentId: string;
|
|
196
|
+
readonly name: string;
|
|
197
|
+
readonly paneId: string;
|
|
198
|
+
readonly relationship?: {
|
|
199
|
+
readonly parentAgentId: string;
|
|
200
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
readonly connectTarget?: {
|
|
204
|
+
readonly host: string;
|
|
205
|
+
readonly agentId: string;
|
|
206
|
+
readonly url: string;
|
|
207
|
+
};
|
|
208
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
209
|
+
}) => Effect.Effect<{
|
|
210
|
+
readonly id: string;
|
|
211
|
+
readonly createdAt: number;
|
|
212
|
+
readonly updatedAt: number;
|
|
213
|
+
readonly actor: string;
|
|
214
|
+
readonly hash: string;
|
|
215
|
+
readonly approvalNonce: string | null;
|
|
216
|
+
readonly approvalExpiresAt?: number | null;
|
|
217
|
+
readonly approvedBy: string | null;
|
|
218
|
+
readonly approvedAt?: number | null;
|
|
219
|
+
readonly rejectedBy?: string | null;
|
|
220
|
+
readonly rejectedAt?: number | null;
|
|
221
|
+
readonly expiredAt?: number | null;
|
|
222
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
223
|
+
readonly payload: {
|
|
224
|
+
readonly kind: "nix.check";
|
|
225
|
+
} | {
|
|
226
|
+
readonly kind: "nix.apply";
|
|
227
|
+
readonly ref: string;
|
|
228
|
+
} | {
|
|
229
|
+
readonly kind: "agent.delegate";
|
|
230
|
+
readonly repository: string;
|
|
231
|
+
readonly prompt: string;
|
|
232
|
+
readonly mode: "consult" | "review" | "work";
|
|
233
|
+
readonly channel?: "coordinator_chat";
|
|
234
|
+
} | {
|
|
235
|
+
readonly kind: "agent.message";
|
|
236
|
+
readonly session: string;
|
|
237
|
+
readonly message: string;
|
|
238
|
+
} | {
|
|
239
|
+
readonly kind: "browser.mcp.recover";
|
|
240
|
+
};
|
|
241
|
+
readonly result: string | null;
|
|
242
|
+
readonly error: string | null;
|
|
243
|
+
readonly worker?: {
|
|
244
|
+
readonly host: string;
|
|
245
|
+
readonly agentId: string;
|
|
246
|
+
readonly name: string;
|
|
247
|
+
readonly paneId: string;
|
|
248
|
+
readonly relationship?: {
|
|
249
|
+
readonly parentAgentId: string;
|
|
250
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
readonly connectTarget?: {
|
|
254
|
+
readonly host: string;
|
|
255
|
+
readonly agentId: string;
|
|
256
|
+
readonly url: string;
|
|
257
|
+
};
|
|
258
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
259
|
+
}, FleetStoreError | FleetTransitionConflictError, never>;
|
|
260
|
+
readonly get: (this: JobStore, id: string) => Effect.Effect<{
|
|
261
|
+
readonly id: string;
|
|
262
|
+
readonly createdAt: number;
|
|
263
|
+
readonly updatedAt: number;
|
|
264
|
+
readonly actor: string;
|
|
265
|
+
readonly hash: string;
|
|
266
|
+
readonly approvalNonce: string | null;
|
|
267
|
+
readonly approvalExpiresAt?: number | null;
|
|
268
|
+
readonly approvedBy: string | null;
|
|
269
|
+
readonly approvedAt?: number | null;
|
|
270
|
+
readonly rejectedBy?: string | null;
|
|
271
|
+
readonly rejectedAt?: number | null;
|
|
272
|
+
readonly expiredAt?: number | null;
|
|
273
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
274
|
+
readonly payload: {
|
|
275
|
+
readonly kind: "nix.check";
|
|
276
|
+
} | {
|
|
277
|
+
readonly kind: "nix.apply";
|
|
278
|
+
readonly ref: string;
|
|
279
|
+
} | {
|
|
280
|
+
readonly kind: "agent.delegate";
|
|
281
|
+
readonly repository: string;
|
|
282
|
+
readonly prompt: string;
|
|
283
|
+
readonly mode: "consult" | "review" | "work";
|
|
284
|
+
readonly channel?: "coordinator_chat";
|
|
285
|
+
} | {
|
|
286
|
+
readonly kind: "agent.message";
|
|
287
|
+
readonly session: string;
|
|
288
|
+
readonly message: string;
|
|
289
|
+
} | {
|
|
290
|
+
readonly kind: "browser.mcp.recover";
|
|
291
|
+
};
|
|
292
|
+
readonly result: string | null;
|
|
293
|
+
readonly error: string | null;
|
|
294
|
+
readonly worker?: {
|
|
295
|
+
readonly host: string;
|
|
296
|
+
readonly agentId: string;
|
|
297
|
+
readonly name: string;
|
|
298
|
+
readonly paneId: string;
|
|
299
|
+
readonly relationship?: {
|
|
300
|
+
readonly parentAgentId: string;
|
|
301
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
readonly connectTarget?: {
|
|
305
|
+
readonly host: string;
|
|
306
|
+
readonly agentId: string;
|
|
307
|
+
readonly url: string;
|
|
308
|
+
};
|
|
309
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
310
|
+
} | undefined, FleetStoreError, never>;
|
|
311
|
+
readonly list: (this: JobStore, limit: number) => Effect.Effect<{
|
|
312
|
+
readonly id: string;
|
|
313
|
+
readonly createdAt: number;
|
|
314
|
+
readonly updatedAt: number;
|
|
315
|
+
readonly actor: string;
|
|
316
|
+
readonly hash: string;
|
|
317
|
+
readonly approvalNonce: string | null;
|
|
318
|
+
readonly approvalExpiresAt?: number | null;
|
|
319
|
+
readonly approvedBy: string | null;
|
|
320
|
+
readonly approvedAt?: number | null;
|
|
321
|
+
readonly rejectedBy?: string | null;
|
|
322
|
+
readonly rejectedAt?: number | null;
|
|
323
|
+
readonly expiredAt?: number | null;
|
|
324
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
325
|
+
readonly payload: {
|
|
326
|
+
readonly kind: "nix.check";
|
|
327
|
+
} | {
|
|
328
|
+
readonly kind: "nix.apply";
|
|
329
|
+
readonly ref: string;
|
|
330
|
+
} | {
|
|
331
|
+
readonly kind: "agent.delegate";
|
|
332
|
+
readonly repository: string;
|
|
333
|
+
readonly prompt: string;
|
|
334
|
+
readonly mode: "consult" | "review" | "work";
|
|
335
|
+
readonly channel?: "coordinator_chat";
|
|
336
|
+
} | {
|
|
337
|
+
readonly kind: "agent.message";
|
|
338
|
+
readonly session: string;
|
|
339
|
+
readonly message: string;
|
|
340
|
+
} | {
|
|
341
|
+
readonly kind: "browser.mcp.recover";
|
|
342
|
+
};
|
|
343
|
+
readonly result: string | null;
|
|
344
|
+
readonly error: string | null;
|
|
345
|
+
readonly worker?: {
|
|
346
|
+
readonly host: string;
|
|
347
|
+
readonly agentId: string;
|
|
348
|
+
readonly name: string;
|
|
349
|
+
readonly paneId: string;
|
|
350
|
+
readonly relationship?: {
|
|
351
|
+
readonly parentAgentId: string;
|
|
352
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
readonly connectTarget?: {
|
|
356
|
+
readonly host: string;
|
|
357
|
+
readonly agentId: string;
|
|
358
|
+
readonly url: string;
|
|
359
|
+
};
|
|
360
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
361
|
+
}[], FleetStoreError, never>;
|
|
362
|
+
readonly listPending: (this: JobStore, cursor: {
|
|
363
|
+
readonly createdAt: number;
|
|
364
|
+
readonly id: string;
|
|
365
|
+
} | null, limit: number) => Effect.Effect<{
|
|
366
|
+
readonly id: string;
|
|
367
|
+
readonly createdAt: number;
|
|
368
|
+
readonly updatedAt: number;
|
|
369
|
+
readonly actor: string;
|
|
370
|
+
readonly hash: string;
|
|
371
|
+
readonly approvalNonce: string | null;
|
|
372
|
+
readonly approvalExpiresAt?: number | null;
|
|
373
|
+
readonly approvedBy: string | null;
|
|
374
|
+
readonly approvedAt?: number | null;
|
|
375
|
+
readonly rejectedBy?: string | null;
|
|
376
|
+
readonly rejectedAt?: number | null;
|
|
377
|
+
readonly expiredAt?: number | null;
|
|
378
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
379
|
+
readonly payload: {
|
|
380
|
+
readonly kind: "nix.check";
|
|
381
|
+
} | {
|
|
382
|
+
readonly kind: "nix.apply";
|
|
383
|
+
readonly ref: string;
|
|
384
|
+
} | {
|
|
385
|
+
readonly kind: "agent.delegate";
|
|
386
|
+
readonly repository: string;
|
|
387
|
+
readonly prompt: string;
|
|
388
|
+
readonly mode: "consult" | "review" | "work";
|
|
389
|
+
readonly channel?: "coordinator_chat";
|
|
390
|
+
} | {
|
|
391
|
+
readonly kind: "agent.message";
|
|
392
|
+
readonly session: string;
|
|
393
|
+
readonly message: string;
|
|
394
|
+
} | {
|
|
395
|
+
readonly kind: "browser.mcp.recover";
|
|
396
|
+
};
|
|
397
|
+
readonly result: string | null;
|
|
398
|
+
readonly error: string | null;
|
|
399
|
+
readonly worker?: {
|
|
400
|
+
readonly host: string;
|
|
401
|
+
readonly agentId: string;
|
|
402
|
+
readonly name: string;
|
|
403
|
+
readonly paneId: string;
|
|
404
|
+
readonly relationship?: {
|
|
405
|
+
readonly parentAgentId: string;
|
|
406
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
readonly connectTarget?: {
|
|
410
|
+
readonly host: string;
|
|
411
|
+
readonly agentId: string;
|
|
412
|
+
readonly url: string;
|
|
413
|
+
};
|
|
414
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
415
|
+
}[], FleetStoreError, never>;
|
|
416
|
+
readonly listHistory: (this: JobStore, cursor: {
|
|
417
|
+
readonly createdAt: number;
|
|
418
|
+
readonly id: string;
|
|
419
|
+
} | null, limit: number) => Effect.Effect<{
|
|
420
|
+
readonly id: string;
|
|
421
|
+
readonly createdAt: number;
|
|
422
|
+
readonly updatedAt: number;
|
|
423
|
+
readonly actor: string;
|
|
424
|
+
readonly hash: string;
|
|
425
|
+
readonly approvalNonce: string | null;
|
|
426
|
+
readonly approvalExpiresAt?: number | null;
|
|
427
|
+
readonly approvedBy: string | null;
|
|
428
|
+
readonly approvedAt?: number | null;
|
|
429
|
+
readonly rejectedBy?: string | null;
|
|
430
|
+
readonly rejectedAt?: number | null;
|
|
431
|
+
readonly expiredAt?: number | null;
|
|
432
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
433
|
+
readonly payload: {
|
|
434
|
+
readonly kind: "nix.check";
|
|
435
|
+
} | {
|
|
436
|
+
readonly kind: "nix.apply";
|
|
437
|
+
readonly ref: string;
|
|
438
|
+
} | {
|
|
439
|
+
readonly kind: "agent.delegate";
|
|
440
|
+
readonly repository: string;
|
|
441
|
+
readonly prompt: string;
|
|
442
|
+
readonly mode: "consult" | "review" | "work";
|
|
443
|
+
readonly channel?: "coordinator_chat";
|
|
444
|
+
} | {
|
|
445
|
+
readonly kind: "agent.message";
|
|
446
|
+
readonly session: string;
|
|
447
|
+
readonly message: string;
|
|
448
|
+
} | {
|
|
449
|
+
readonly kind: "browser.mcp.recover";
|
|
450
|
+
};
|
|
451
|
+
readonly result: string | null;
|
|
452
|
+
readonly error: string | null;
|
|
453
|
+
readonly worker?: {
|
|
454
|
+
readonly host: string;
|
|
455
|
+
readonly agentId: string;
|
|
456
|
+
readonly name: string;
|
|
457
|
+
readonly paneId: string;
|
|
458
|
+
readonly relationship?: {
|
|
459
|
+
readonly parentAgentId: string;
|
|
460
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
readonly connectTarget?: {
|
|
464
|
+
readonly host: string;
|
|
465
|
+
readonly agentId: string;
|
|
466
|
+
readonly url: string;
|
|
467
|
+
};
|
|
468
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
469
|
+
}[], FleetStoreError, never>;
|
|
470
|
+
readonly listRecoverable: (this: JobStore) => Effect.Effect<{
|
|
471
|
+
readonly id: string;
|
|
472
|
+
readonly createdAt: number;
|
|
473
|
+
readonly updatedAt: number;
|
|
474
|
+
readonly actor: string;
|
|
475
|
+
readonly hash: string;
|
|
476
|
+
readonly approvalNonce: string | null;
|
|
477
|
+
readonly approvalExpiresAt?: number | null;
|
|
478
|
+
readonly approvedBy: string | null;
|
|
479
|
+
readonly approvedAt?: number | null;
|
|
480
|
+
readonly rejectedBy?: string | null;
|
|
481
|
+
readonly rejectedAt?: number | null;
|
|
482
|
+
readonly expiredAt?: number | null;
|
|
483
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
484
|
+
readonly payload: {
|
|
485
|
+
readonly kind: "nix.check";
|
|
486
|
+
} | {
|
|
487
|
+
readonly kind: "nix.apply";
|
|
488
|
+
readonly ref: string;
|
|
489
|
+
} | {
|
|
490
|
+
readonly kind: "agent.delegate";
|
|
491
|
+
readonly repository: string;
|
|
492
|
+
readonly prompt: string;
|
|
493
|
+
readonly mode: "consult" | "review" | "work";
|
|
494
|
+
readonly channel?: "coordinator_chat";
|
|
495
|
+
} | {
|
|
496
|
+
readonly kind: "agent.message";
|
|
497
|
+
readonly session: string;
|
|
498
|
+
readonly message: string;
|
|
499
|
+
} | {
|
|
500
|
+
readonly kind: "browser.mcp.recover";
|
|
501
|
+
};
|
|
502
|
+
readonly result: string | null;
|
|
503
|
+
readonly error: string | null;
|
|
504
|
+
readonly worker?: {
|
|
505
|
+
readonly host: string;
|
|
506
|
+
readonly agentId: string;
|
|
507
|
+
readonly name: string;
|
|
508
|
+
readonly paneId: string;
|
|
509
|
+
readonly relationship?: {
|
|
510
|
+
readonly parentAgentId: string;
|
|
511
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
readonly connectTarget?: {
|
|
515
|
+
readonly host: string;
|
|
516
|
+
readonly agentId: string;
|
|
517
|
+
readonly url: string;
|
|
518
|
+
};
|
|
519
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
520
|
+
}[], FleetStoreError, never>;
|
|
521
|
+
readonly listWorkers: (this: JobStore, limit: number) => Effect.Effect<{
|
|
522
|
+
readonly id: string;
|
|
523
|
+
readonly createdAt: number;
|
|
524
|
+
readonly updatedAt: number;
|
|
525
|
+
readonly actor: string;
|
|
526
|
+
readonly hash: string;
|
|
527
|
+
readonly approvalNonce: string | null;
|
|
528
|
+
readonly approvalExpiresAt?: number | null;
|
|
529
|
+
readonly approvedBy: string | null;
|
|
530
|
+
readonly approvedAt?: number | null;
|
|
531
|
+
readonly rejectedBy?: string | null;
|
|
532
|
+
readonly rejectedAt?: number | null;
|
|
533
|
+
readonly expiredAt?: number | null;
|
|
534
|
+
readonly status: "expired" | "failed" | "interrupted" | "pending_approval" | "queued" | "rejected" | "running" | "succeeded";
|
|
535
|
+
readonly payload: {
|
|
536
|
+
readonly kind: "nix.check";
|
|
537
|
+
} | {
|
|
538
|
+
readonly kind: "nix.apply";
|
|
539
|
+
readonly ref: string;
|
|
540
|
+
} | {
|
|
541
|
+
readonly kind: "agent.delegate";
|
|
542
|
+
readonly repository: string;
|
|
543
|
+
readonly prompt: string;
|
|
544
|
+
readonly mode: "consult" | "review" | "work";
|
|
545
|
+
readonly channel?: "coordinator_chat";
|
|
546
|
+
} | {
|
|
547
|
+
readonly kind: "agent.message";
|
|
548
|
+
readonly session: string;
|
|
549
|
+
readonly message: string;
|
|
550
|
+
} | {
|
|
551
|
+
readonly kind: "browser.mcp.recover";
|
|
552
|
+
};
|
|
553
|
+
readonly result: string | null;
|
|
554
|
+
readonly error: string | null;
|
|
555
|
+
readonly worker?: {
|
|
556
|
+
readonly host: string;
|
|
557
|
+
readonly agentId: string;
|
|
558
|
+
readonly name: string;
|
|
559
|
+
readonly paneId: string;
|
|
560
|
+
readonly relationship?: {
|
|
561
|
+
readonly parentAgentId: string;
|
|
562
|
+
readonly relation: "delegated" | "pair" | "review";
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
readonly connectTarget?: {
|
|
566
|
+
readonly host: string;
|
|
567
|
+
readonly agentId: string;
|
|
568
|
+
readonly url: string;
|
|
569
|
+
};
|
|
570
|
+
readonly workerTerminalObservedAt?: number | null;
|
|
571
|
+
}[], FleetStoreError, never>;
|
|
572
|
+
private secureFiles;
|
|
573
|
+
close(): void;
|
|
574
|
+
}
|
|
575
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAU,MAAM,QAAQ,CAAA;AAEzD,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAwBlG,qBAAa,QAAQ;;IAGnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,OAAO,eAuBN;IAED,MAAM,CAAC,QAAQ,CAAC,IAAI,gGAgBlB;IAEF,QAAQ,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAiBV;IAEF,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA6BjB;IAEF,QAAQ,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAcV;IAEF,QAAQ,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAaX;IAEF,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA2ClB;IAEF,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA6BlB;IAEF,QAAQ,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAsBtB;IAEF,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA2BlB;IAEF,OAAO,CAAC,WAAW;IAoBnB,KAAK,IAAI,IAAI,CAEZ;CACF"}
|