@onesi/genesis 0.2.6 → 0.2.8
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/README.md +1 -1
- package/dist/auto.d.ts +13 -0
- package/dist/auto.js +3 -0
- package/dist/boxes.d.ts +47 -0
- package/dist/boxes.js +18 -0
- package/dist/client.js +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/context.js +1 -1
- package/dist/fleets.d.ts +308 -0
- package/dist/fleets.js +200 -0
- package/dist/foundry-upload.d.ts +12 -0
- package/dist/foundry-upload.js +29 -0
- package/dist/generated/operations.d.ts +1 -1
- package/dist/generated/operations.js +1604 -15
- package/dist/generated/schema.d.ts +2921 -227
- package/dist/genesis.d.ts +377 -0
- package/dist/genesis.openapi.json +10940 -7833
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/minds-engine.d.ts +3 -3
- package/dist/minds-engine.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/auto.d.ts
CHANGED
|
@@ -13,6 +13,19 @@ export declare function autoModule(client: GenesisClient): {
|
|
|
13
13
|
kind: "api_key" | "m2m_token" | "bridge_session";
|
|
14
14
|
scopes: string[];
|
|
15
15
|
}>;
|
|
16
|
+
/** Send one MCP JSON-RPC message to Auto's own MCP endpoint (`initialize`, `tools/list`, `tools/call`, ...).
|
|
17
|
+
* Each tool checks its own scope; a notification (no `id`) resolves with an empty body. */
|
|
18
|
+
mcp: (message: In<"auto_callMcp">["body"]) => Promise<{
|
|
19
|
+
jsonrpc: "2.0";
|
|
20
|
+
id?: string | number | null;
|
|
21
|
+
result?: {
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
error?: {
|
|
25
|
+
code: number;
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
16
29
|
orgs: {
|
|
17
30
|
list: (includeArchived?: boolean) => Promise<{
|
|
18
31
|
data: import("./index.js").components["schemas"]["Auto.Org"][];
|
package/dist/auto.js
CHANGED
|
@@ -8,6 +8,9 @@ import { idempotencyHeaders, ifMatchHeaders } from './idempotency.js';
|
|
|
8
8
|
export function autoModule(client) {
|
|
9
9
|
return {
|
|
10
10
|
whoami: () => client.request('auto_whoami'),
|
|
11
|
+
/** Send one MCP JSON-RPC message to Auto's own MCP endpoint (`initialize`, `tools/list`, `tools/call`, ...).
|
|
12
|
+
* Each tool checks its own scope; a notification (no `id`) resolves with an empty body. */
|
|
13
|
+
mcp: (message) => client.request('auto_callMcp', { body: message }),
|
|
11
14
|
orgs: {
|
|
12
15
|
list: (includeArchived) => client.request('auto_listOrgs', includeArchived === undefined ? {} : { include_archived: includeArchived }),
|
|
13
16
|
get: (org) => client.request('auto_getOrg', { org }),
|
package/dist/boxes.d.ts
CHANGED
|
@@ -44,6 +44,53 @@ export declare function boxesModule(client: GenesisClient): {
|
|
|
44
44
|
meta?: import("./index.js").components["schemas"]["Boxes.MailListMeta"];
|
|
45
45
|
}>;
|
|
46
46
|
};
|
|
47
|
+
/** Agent mailboxes in the key's project: One ("one") by default, and OpenAgentID agents (a_<ULID>). */
|
|
48
|
+
agents: {
|
|
49
|
+
list: () => Promise<{
|
|
50
|
+
success: boolean;
|
|
51
|
+
data: import("./index.js").components["schemas"]["Boxes.MailAgentMailbox"][];
|
|
52
|
+
}>;
|
|
53
|
+
create: (body: In<"boxes_mail_agents_create">["body"]) => Promise<{
|
|
54
|
+
success: boolean;
|
|
55
|
+
data: import("./index.js").components["schemas"]["Boxes.MailAgentMailbox"];
|
|
56
|
+
}>;
|
|
57
|
+
get: (agentId: In<"boxes_mail_agents_get">["agentId"]) => Promise<{
|
|
58
|
+
success: boolean;
|
|
59
|
+
data: import("./index.js").components["schemas"]["Boxes.MailAgentMailbox"];
|
|
60
|
+
}>;
|
|
61
|
+
delete: (agentId: In<"boxes_mail_agents_delete">["agentId"]) => Promise<{
|
|
62
|
+
success: boolean;
|
|
63
|
+
data: import("./index.js").components["schemas"]["Boxes.MailAgentMailbox"];
|
|
64
|
+
}>;
|
|
65
|
+
inbox: {
|
|
66
|
+
list: (agentId: In<"boxes_mail_agents_inbox_list">["agentId"], q?: Omit<In<"boxes_mail_agents_inbox_list">, "body" | "agentId">) => Promise<{
|
|
67
|
+
success: boolean;
|
|
68
|
+
data: import("./index.js").components["schemas"]["Boxes.MailMessage"][];
|
|
69
|
+
meta?: import("./index.js").components["schemas"]["Boxes.MailListMeta"];
|
|
70
|
+
}>;
|
|
71
|
+
};
|
|
72
|
+
send: (agentId: In<"boxes_mail_agents_send">["agentId"], body: In<"boxes_mail_agents_send">["body"], idempotencyKey?: string) => Promise<{
|
|
73
|
+
success: boolean;
|
|
74
|
+
data: import("./index.js").components["schemas"]["Boxes.MailMessage"];
|
|
75
|
+
}>;
|
|
76
|
+
threads: {
|
|
77
|
+
list: (agentId: In<"boxes_mail_agents_threads_list">["agentId"], q?: Omit<In<"boxes_mail_agents_threads_list">, "body" | "agentId">) => Promise<{
|
|
78
|
+
success: boolean;
|
|
79
|
+
data: import("./index.js").components["schemas"]["Boxes.MailThread"][];
|
|
80
|
+
meta?: import("./index.js").components["schemas"]["Boxes.MailListMeta"];
|
|
81
|
+
}>;
|
|
82
|
+
get: (agentId: In<"boxes_mail_agents_threads_get">["agentId"], id: In<"boxes_mail_agents_threads_get">["id"]) => Promise<{
|
|
83
|
+
success: boolean;
|
|
84
|
+
data: import("./index.js").components["schemas"]["Boxes.MailThreadDetail"];
|
|
85
|
+
}>;
|
|
86
|
+
};
|
|
87
|
+
messages: {
|
|
88
|
+
get: (agentId: In<"boxes_mail_agents_messages_get">["agentId"], id: In<"boxes_mail_agents_messages_get">["id"]) => Promise<{
|
|
89
|
+
success: boolean;
|
|
90
|
+
data: import("./index.js").components["schemas"]["Boxes.MailMessageWithLabels"];
|
|
91
|
+
}>;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
47
94
|
mailboxes: {
|
|
48
95
|
list: () => Promise<{
|
|
49
96
|
success: boolean;
|
package/dist/boxes.js
CHANGED
|
@@ -21,6 +21,24 @@ export function boxesModule(client) {
|
|
|
21
21
|
inbox: {
|
|
22
22
|
list: (q = {}) => client.request('boxes_mail_inbox_list', { ...q }),
|
|
23
23
|
},
|
|
24
|
+
/** Agent mailboxes in the key's project: One ("one") by default, and OpenAgentID agents (a_<ULID>). */
|
|
25
|
+
agents: {
|
|
26
|
+
list: () => client.request('boxes_mail_agents_list'),
|
|
27
|
+
create: (body) => client.request('boxes_mail_agents_create', { body }),
|
|
28
|
+
get: (agentId) => client.request('boxes_mail_agents_get', { "agentId": agentId }),
|
|
29
|
+
delete: (agentId) => client.request('boxes_mail_agents_delete', { "agentId": agentId }),
|
|
30
|
+
inbox: {
|
|
31
|
+
list: (agentId, q = {}) => client.request('boxes_mail_agents_inbox_list', { "agentId": agentId, ...q }),
|
|
32
|
+
},
|
|
33
|
+
send: (agentId, body, idempotencyKey) => client.request('boxes_mail_agents_send', { "agentId": agentId, body }, { headers: idempotencyHeaders('boxes_mail_agents_send', idempotencyKey) }),
|
|
34
|
+
threads: {
|
|
35
|
+
list: (agentId, q = {}) => client.request('boxes_mail_agents_threads_list', { "agentId": agentId, ...q }),
|
|
36
|
+
get: (agentId, id) => client.request('boxes_mail_agents_threads_get', { "agentId": agentId, "id": id }),
|
|
37
|
+
},
|
|
38
|
+
messages: {
|
|
39
|
+
get: (agentId, id) => client.request('boxes_mail_agents_messages_get', { "agentId": agentId, "id": id }),
|
|
40
|
+
},
|
|
41
|
+
},
|
|
24
42
|
mailboxes: {
|
|
25
43
|
list: () => client.request('boxes_mail_mailboxes_list'),
|
|
26
44
|
delegations: {
|
package/dist/client.js
CHANGED
|
@@ -266,7 +266,7 @@ export class GenesisClient {
|
|
|
266
266
|
const url = this.url(operationId, input);
|
|
267
267
|
const headers = {
|
|
268
268
|
accept: 'application/json',
|
|
269
|
-
'user-agent': this.opts.userAgent ?? '@onesi/genesis/0.2.
|
|
269
|
+
'user-agent': this.opts.userAgent ?? '@onesi/genesis/0.2.8',
|
|
270
270
|
...this.opts.headers, ...init.headers,
|
|
271
271
|
};
|
|
272
272
|
if (op.service === 'blinds' && !['GET', 'HEAD', 'OPTIONS'].includes(op.method))
|
package/dist/context.d.ts
CHANGED
package/dist/context.js
CHANGED
|
@@ -78,7 +78,7 @@ export async function selectGenesisContext(selection, options) {
|
|
|
78
78
|
const requested = { ...selection };
|
|
79
79
|
const keys = Object.keys(requested), full = 'projectId' in requested;
|
|
80
80
|
if (!id(requested.organizationId, 'o') || keys.some(k => !(full ? ['organizationId', 'projectId', 'platformId', 'workspaceId', 'fleetId', 'environmentId'] : ['organizationId']).includes(k))
|
|
81
|
-
|| (full && (!id(requested.projectId, 'pr') || !id(requested.workspaceId, 'w') || requested.platformId !== 'pf_console' || requested.fleetId !== null || requested.environmentId !== 'sandbox')))
|
|
81
|
+
|| (full && (!id(requested.projectId, 'pr') || !id(requested.workspaceId, 'w') || requested.platformId !== 'pf_console' || requested.fleetId !== null || (requested.environmentId !== 'sandbox' && requested.environmentId !== 'live'))))
|
|
82
82
|
return fail(400);
|
|
83
83
|
const controller = new AbortController(), cancel = () => controller.abort();
|
|
84
84
|
options.signal?.addEventListener('abort', cancel, { once: true });
|
package/dist/fleets.d.ts
CHANGED
|
@@ -10,6 +10,11 @@ export interface FleetsInstanceOptions {
|
|
|
10
10
|
idempotencyKey?: string;
|
|
11
11
|
signal?: AbortSignal;
|
|
12
12
|
}
|
|
13
|
+
type SeatHireInput = NonNullable<OperationInput<'fleets_hireSeat'>['body']>;
|
|
14
|
+
type SeatUpdateInput = NonNullable<OperationInput<'fleets_updateSeat'>['body']>;
|
|
15
|
+
type SeatTaskInput = NonNullable<OperationInput<'fleets_submitSeatTask'>['body']>;
|
|
16
|
+
type PoolCreateInput = NonNullable<OperationInput<'fleets_createPool'>['body']>;
|
|
17
|
+
type PoolTopUpInput = NonNullable<OperationInput<'fleets_topUpPool'>['body']>;
|
|
13
18
|
/** Managed Henry instances and tasks scoped to the credential's verified org. */
|
|
14
19
|
export declare function fleetsModule(client: GenesisClient): {
|
|
15
20
|
agents: {
|
|
@@ -155,6 +160,309 @@ export declare function fleetsModule(client: GenesisClient): {
|
|
|
155
160
|
updated_at?: number;
|
|
156
161
|
}>;
|
|
157
162
|
};
|
|
163
|
+
/** Agent seats: a persistent Henry agent with a credit purse and a computer entitlement. Plan prices are display data. */
|
|
164
|
+
seats: {
|
|
165
|
+
plans: () => Promise<{
|
|
166
|
+
plans: import("./index.js").components["schemas"]["Fleets.SeatPlan"][];
|
|
167
|
+
credit?: {
|
|
168
|
+
unit?: string;
|
|
169
|
+
value_usd?: number;
|
|
170
|
+
meaning?: string;
|
|
171
|
+
};
|
|
172
|
+
}>;
|
|
173
|
+
list: () => Promise<{
|
|
174
|
+
seats: import("./index.js").components["schemas"]["Fleets.Seat"][];
|
|
175
|
+
}>;
|
|
176
|
+
/** Hire a seat. idempotency_key is required; reuse it on retry. fund: false opens an empty purse for top-up. */
|
|
177
|
+
hire: (body: SeatHireInput) => Promise<{
|
|
178
|
+
id: string;
|
|
179
|
+
object: "fleets.seat";
|
|
180
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
181
|
+
name?: string;
|
|
182
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
183
|
+
pause_reason?: string;
|
|
184
|
+
agent_id?: string | null;
|
|
185
|
+
pool_id?: string | null;
|
|
186
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
187
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
188
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
189
|
+
created_at?: string;
|
|
190
|
+
updated_at?: string;
|
|
191
|
+
}>;
|
|
192
|
+
get: (seat_id: string) => Promise<{
|
|
193
|
+
id: string;
|
|
194
|
+
object: "fleets.seat";
|
|
195
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
196
|
+
name?: string;
|
|
197
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
198
|
+
pause_reason?: string;
|
|
199
|
+
agent_id?: string | null;
|
|
200
|
+
pool_id?: string | null;
|
|
201
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
202
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
203
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
204
|
+
created_at?: string;
|
|
205
|
+
updated_at?: string;
|
|
206
|
+
}>;
|
|
207
|
+
update: (seat_id: string, body: SeatUpdateInput) => Promise<{
|
|
208
|
+
id: string;
|
|
209
|
+
object: "fleets.seat";
|
|
210
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
211
|
+
name?: string;
|
|
212
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
213
|
+
pause_reason?: string;
|
|
214
|
+
agent_id?: string | null;
|
|
215
|
+
pool_id?: string | null;
|
|
216
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
217
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
218
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
219
|
+
created_at?: string;
|
|
220
|
+
updated_at?: string;
|
|
221
|
+
}>;
|
|
222
|
+
/** Add credits; overdraft is repaid first. Computer minutes come from the plan (upgrade, or use a pool). A pooled seat answers 409 pooled_seat: top up the pool. */
|
|
223
|
+
topUp: (seat_id: string, credits: number, idempotency_key: string) => Promise<{
|
|
224
|
+
id: string;
|
|
225
|
+
object: "fleets.seat";
|
|
226
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
227
|
+
name?: string;
|
|
228
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
229
|
+
pause_reason?: string;
|
|
230
|
+
agent_id?: string | null;
|
|
231
|
+
pool_id?: string | null;
|
|
232
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
233
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
234
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
235
|
+
created_at?: string;
|
|
236
|
+
updated_at?: string;
|
|
237
|
+
}>;
|
|
238
|
+
/** Move to a larger plan; there is no downgrade. */
|
|
239
|
+
upgrade: (seat_id: string, type: "helper" | "operator" | "always_on") => Promise<{
|
|
240
|
+
id: string;
|
|
241
|
+
object: "fleets.seat";
|
|
242
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
243
|
+
name?: string;
|
|
244
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
245
|
+
pause_reason?: string;
|
|
246
|
+
agent_id?: string | null;
|
|
247
|
+
pool_id?: string | null;
|
|
248
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
249
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
250
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
251
|
+
created_at?: string;
|
|
252
|
+
updated_at?: string;
|
|
253
|
+
}>;
|
|
254
|
+
hold: (seat_id: string) => Promise<{
|
|
255
|
+
id: string;
|
|
256
|
+
object: "fleets.seat";
|
|
257
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
258
|
+
name?: string;
|
|
259
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
260
|
+
pause_reason?: string;
|
|
261
|
+
agent_id?: string | null;
|
|
262
|
+
pool_id?: string | null;
|
|
263
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
264
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
265
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
266
|
+
created_at?: string;
|
|
267
|
+
updated_at?: string;
|
|
268
|
+
} & {
|
|
269
|
+
cancelled_tasks: string[];
|
|
270
|
+
agent_state?: string;
|
|
271
|
+
}>;
|
|
272
|
+
resume: (seat_id: string) => Promise<{
|
|
273
|
+
id: string;
|
|
274
|
+
object: "fleets.seat";
|
|
275
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
276
|
+
name?: string;
|
|
277
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
278
|
+
pause_reason?: string;
|
|
279
|
+
agent_id?: string | null;
|
|
280
|
+
pool_id?: string | null;
|
|
281
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
282
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
283
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
284
|
+
created_at?: string;
|
|
285
|
+
updated_at?: string;
|
|
286
|
+
}>;
|
|
287
|
+
kill: (seat_id: string) => Promise<{
|
|
288
|
+
id: string;
|
|
289
|
+
object: "fleets.seat";
|
|
290
|
+
type: import("./index.js").components["schemas"]["Fleets.SeatType"];
|
|
291
|
+
name?: string;
|
|
292
|
+
state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
|
|
293
|
+
pause_reason?: string;
|
|
294
|
+
agent_id?: string | null;
|
|
295
|
+
pool_id?: string | null;
|
|
296
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
297
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
298
|
+
release?: import("./index.js").components["schemas"]["Fleets.SeatRelease"];
|
|
299
|
+
created_at?: string;
|
|
300
|
+
updated_at?: string;
|
|
301
|
+
} & {
|
|
302
|
+
cancelled_tasks: string[];
|
|
303
|
+
agent_state?: string;
|
|
304
|
+
}>;
|
|
305
|
+
/** Settle the purse and delete the agent (terminal); answers returned_credits, returned_computer_minutes, unpaid_overdraft_credits, spent_credits. */
|
|
306
|
+
release: (seat_id: string) => Promise<{
|
|
307
|
+
id: string;
|
|
308
|
+
object: "fleets.seat.release";
|
|
309
|
+
seat_id?: string;
|
|
310
|
+
state: "released";
|
|
311
|
+
returned_credits: number;
|
|
312
|
+
returned_computer_minutes: number;
|
|
313
|
+
unpaid_overdraft_credits?: number;
|
|
314
|
+
spent_credits?: number;
|
|
315
|
+
pool_id?: string | null;
|
|
316
|
+
agent_deleted?: boolean;
|
|
317
|
+
released_at?: string;
|
|
318
|
+
}>;
|
|
319
|
+
ledger: (seat_id: string) => Promise<{
|
|
320
|
+
id?: string;
|
|
321
|
+
entries: import("./index.js").components["schemas"]["Fleets.SeatLedgerEntry"][];
|
|
322
|
+
}>;
|
|
323
|
+
tasks: {
|
|
324
|
+
list: (seat_id: string) => Promise<{
|
|
325
|
+
tasks: import("./index.js").components["schemas"]["Fleets.SeatTask"][];
|
|
326
|
+
}>;
|
|
327
|
+
/** 402 purse_empty when parked, 403 computer_not_entitled for a helper's computer task, 409 when held, killed or released. */
|
|
328
|
+
submit: (seat_id: string, body: SeatTaskInput) => Promise<{
|
|
329
|
+
task_id: string;
|
|
330
|
+
object?: "fleets.seat.task";
|
|
331
|
+
seat_id: string;
|
|
332
|
+
kind: "research" | "computer";
|
|
333
|
+
state: "pending" | "running" | "awaiting_approval" | "completed" | "failed" | "cancelled" | "timed_out";
|
|
334
|
+
output?: string | null;
|
|
335
|
+
error?: string | null;
|
|
336
|
+
approvals?: import("./index.js").components["schemas"]["Fleets.SeatApproval"][];
|
|
337
|
+
credits?: {
|
|
338
|
+
reserved?: number;
|
|
339
|
+
charged?: number | null;
|
|
340
|
+
borrowed?: number;
|
|
341
|
+
};
|
|
342
|
+
computer_minutes?: number;
|
|
343
|
+
computer_minutes_allowed?: number;
|
|
344
|
+
settled?: boolean;
|
|
345
|
+
receipt_url?: string;
|
|
346
|
+
submitted_at?: string;
|
|
347
|
+
completed_at?: string | null;
|
|
348
|
+
}>;
|
|
349
|
+
get: (seat_id: string, task_id: string) => Promise<{
|
|
350
|
+
task_id: string;
|
|
351
|
+
object?: "fleets.seat.task";
|
|
352
|
+
seat_id: string;
|
|
353
|
+
kind: "research" | "computer";
|
|
354
|
+
state: "pending" | "running" | "awaiting_approval" | "completed" | "failed" | "cancelled" | "timed_out";
|
|
355
|
+
output?: string | null;
|
|
356
|
+
error?: string | null;
|
|
357
|
+
approvals?: import("./index.js").components["schemas"]["Fleets.SeatApproval"][];
|
|
358
|
+
credits?: {
|
|
359
|
+
reserved?: number;
|
|
360
|
+
charged?: number | null;
|
|
361
|
+
borrowed?: number;
|
|
362
|
+
};
|
|
363
|
+
computer_minutes?: number;
|
|
364
|
+
computer_minutes_allowed?: number;
|
|
365
|
+
settled?: boolean;
|
|
366
|
+
receipt_url?: string;
|
|
367
|
+
submitted_at?: string;
|
|
368
|
+
completed_at?: string | null;
|
|
369
|
+
}>;
|
|
370
|
+
decide: (seat_id: string, task_id: string, approval_id: string, decision: "approve" | "deny") => Promise<{
|
|
371
|
+
task_id: string;
|
|
372
|
+
object?: "fleets.seat.task";
|
|
373
|
+
seat_id: string;
|
|
374
|
+
kind: "research" | "computer";
|
|
375
|
+
state: "pending" | "running" | "awaiting_approval" | "completed" | "failed" | "cancelled" | "timed_out";
|
|
376
|
+
output?: string | null;
|
|
377
|
+
error?: string | null;
|
|
378
|
+
approvals?: import("./index.js").components["schemas"]["Fleets.SeatApproval"][];
|
|
379
|
+
credits?: {
|
|
380
|
+
reserved?: number;
|
|
381
|
+
charged?: number | null;
|
|
382
|
+
borrowed?: number;
|
|
383
|
+
};
|
|
384
|
+
computer_minutes?: number;
|
|
385
|
+
computer_minutes_allowed?: number;
|
|
386
|
+
settled?: boolean;
|
|
387
|
+
receipt_url?: string;
|
|
388
|
+
submitted_at?: string;
|
|
389
|
+
completed_at?: string | null;
|
|
390
|
+
}>;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
/** Seat pools: a shared purse and computer minutes that seats hired with pool_id draw on. */
|
|
394
|
+
pools: {
|
|
395
|
+
list: () => Promise<{
|
|
396
|
+
pools: import("./index.js").components["schemas"]["Fleets.Pool"][];
|
|
397
|
+
}>;
|
|
398
|
+
create: (body: PoolCreateInput) => Promise<{
|
|
399
|
+
id: string;
|
|
400
|
+
object: "fleets.pool";
|
|
401
|
+
name?: string;
|
|
402
|
+
state?: string;
|
|
403
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
404
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
405
|
+
seats?: string[];
|
|
406
|
+
release?: import("./index.js").components["schemas"]["Fleets.PoolRelease"];
|
|
407
|
+
created_at?: string;
|
|
408
|
+
updated_at?: string;
|
|
409
|
+
}>;
|
|
410
|
+
get: (pool_id: string) => Promise<{
|
|
411
|
+
id: string;
|
|
412
|
+
object: "fleets.pool";
|
|
413
|
+
name?: string;
|
|
414
|
+
state?: string;
|
|
415
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
416
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
417
|
+
seats?: string[];
|
|
418
|
+
release?: import("./index.js").components["schemas"]["Fleets.PoolRelease"];
|
|
419
|
+
created_at?: string;
|
|
420
|
+
updated_at?: string;
|
|
421
|
+
}>;
|
|
422
|
+
topUp: (pool_id: string, body: PoolTopUpInput) => Promise<{
|
|
423
|
+
id: string;
|
|
424
|
+
object: "fleets.pool";
|
|
425
|
+
name?: string;
|
|
426
|
+
state?: string;
|
|
427
|
+
purse: import("./index.js").components["schemas"]["Fleets.Purse"];
|
|
428
|
+
computer: import("./index.js").components["schemas"]["Fleets.Computer"];
|
|
429
|
+
seats?: string[];
|
|
430
|
+
release?: import("./index.js").components["schemas"]["Fleets.PoolRelease"];
|
|
431
|
+
created_at?: string;
|
|
432
|
+
updated_at?: string;
|
|
433
|
+
}>;
|
|
434
|
+
ledger: (pool_id: string) => Promise<{
|
|
435
|
+
id?: string;
|
|
436
|
+
entries: import("./index.js").components["schemas"]["Fleets.SeatLedgerEntry"][];
|
|
437
|
+
}>;
|
|
438
|
+
/** Settle the pool (terminal); answers returned_credits and returned_computer_minutes. 409 pool_has_seats while seats remain. */
|
|
439
|
+
release: (pool_id: string) => Promise<{
|
|
440
|
+
id: string;
|
|
441
|
+
object: "fleets.pool.release";
|
|
442
|
+
pool_id?: string;
|
|
443
|
+
state: "released";
|
|
444
|
+
returned_credits: number;
|
|
445
|
+
returned_computer_minutes: number;
|
|
446
|
+
unpaid_overdraft_credits?: number;
|
|
447
|
+
spent_credits?: number;
|
|
448
|
+
released_at?: string;
|
|
449
|
+
}>;
|
|
450
|
+
};
|
|
451
|
+
/** The organization key seat computer tasks use for Panes and Shells; KMS-encrypted, never returned. */
|
|
452
|
+
computerConnection: {
|
|
453
|
+
get: () => Promise<{
|
|
454
|
+
connected: boolean;
|
|
455
|
+
updated_at?: number;
|
|
456
|
+
}>;
|
|
457
|
+
set: (api_key: string) => Promise<{
|
|
458
|
+
connected: boolean;
|
|
459
|
+
updated_at?: number;
|
|
460
|
+
}>;
|
|
461
|
+
delete: () => Promise<{
|
|
462
|
+
connected: boolean;
|
|
463
|
+
updated_at?: number;
|
|
464
|
+
}>;
|
|
465
|
+
};
|
|
158
466
|
usage: {
|
|
159
467
|
/** Task lifecycle and execution-time usage events, paged by task like tasks.list. */
|
|
160
468
|
events: (query?: OperationInput<"fleets_listUsageEvents">) => Promise<{
|