mandala-computer-mcp 0.6.0 → 0.8.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/README.md +268 -27
- package/dist/api.d.ts +26 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +23 -0
- package/dist/api.js.map +1 -1
- package/dist/cli.d.ts +7 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +57 -1
- package/dist/cli.js.map +1 -1
- package/dist/errors.d.ts +114 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +253 -3
- package/dist/errors.js.map +1 -1
- package/dist/format.d.ts +73 -2
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +81 -3
- package/dist/format.js.map +1 -1
- package/dist/http.d.ts +32 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +440 -57
- package/dist/http.js.map +1 -1
- package/dist/paths.d.ts +75 -7
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +88 -12
- package/dist/paths.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -1
- package/dist/server.js.map +1 -1
- package/dist/tool-filters.d.ts +4 -4
- package/dist/tool-filters.d.ts.map +1 -1
- package/dist/tool-filters.js +13 -1
- package/dist/tool-filters.js.map +1 -1
- package/dist/tools/account.d.ts +14 -0
- package/dist/tools/account.d.ts.map +1 -1
- package/dist/tools/account.js +118 -0
- package/dist/tools/account.js.map +1 -1
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/agent.js +19 -25
- package/dist/tools/agent.js.map +1 -1
- package/dist/tools/chat.d.ts.map +1 -1
- package/dist/tools/chat.js +46 -4
- package/dist/tools/chat.js.map +1 -1
- package/dist/tools/computers.d.ts.map +1 -1
- package/dist/tools/computers.js +297 -51
- package/dist/tools/computers.js.map +1 -1
- package/dist/tools/guest.d.ts.map +1 -1
- package/dist/tools/guest.js +27 -4
- package/dist/tools/guest.js.map +1 -1
- package/dist/tools/input.d.ts +9 -0
- package/dist/tools/input.d.ts.map +1 -1
- package/dist/tools/input.js +247 -16
- package/dist/tools/input.js.map +1 -1
- package/dist/tools/operations.d.ts +49 -0
- package/dist/tools/operations.d.ts.map +1 -0
- package/dist/tools/operations.js +255 -0
- package/dist/tools/operations.js.map +1 -0
- package/dist/tools/secrets.d.ts +10 -1
- package/dist/tools/secrets.d.ts.map +1 -1
- package/dist/tools/secrets.js +63 -18
- package/dist/tools/secrets.js.map +1 -1
- package/dist/tools/snapshots.d.ts.map +1 -1
- package/dist/tools/snapshots.js +54 -18
- package/dist/tools/snapshots.js.map +1 -1
- package/dist/tools/ssh.d.ts.map +1 -1
- package/dist/tools/ssh.js +19 -2
- package/dist/tools/ssh.js.map +1 -1
- package/dist/tools/templates.js +2 -2
- package/dist/tools/templates.js.map +1 -1
- package/dist/tools/webhooks.js +1 -1
- package/dist/tools/webhooks.js.map +1 -1
- package/package.json +1 -1
package/dist/errors.js
CHANGED
|
@@ -26,9 +26,10 @@ export class APIError extends MandalaError {
|
|
|
26
26
|
/**
|
|
27
27
|
* The platform's own word for what KIND of refusal this is, where it sent
|
|
28
28
|
* one: `contention`, `starting`, `unavailable` or `unsupported` (OPL-3898),
|
|
29
|
-
*
|
|
30
|
-
* computer
|
|
31
|
-
*
|
|
29
|
+
* `revoked` (OPL-4801) — the one word about the caller rather than the
|
|
30
|
+
* computer — `exists` (OPL-4994), or `running` (OPL-5050). `undefined` for
|
|
31
|
+
* most errors, and always will be — the platform is explicit that an absent
|
|
32
|
+
* value means unclassified rather than "none of these".
|
|
32
33
|
*
|
|
33
34
|
* Read on the base class rather than on the one 409 it was filed for, because
|
|
34
35
|
* the platform keys it on the ERROR and not on the route: the same sentinel is
|
|
@@ -91,11 +92,21 @@ const REASON_CLEARS = new Set(['contention', 'starting']);
|
|
|
91
92
|
* {@link isTransient} calls worth sending again. {@link FileExistsError} is the
|
|
92
93
|
* class it arrives as.
|
|
93
94
|
*/
|
|
95
|
+
/**
|
|
96
|
+
* `running` is a computer that IS running, asked for something only a stopped one
|
|
97
|
+
* can have: a resize, today (platform OPL-5050). The mirror of `unavailable`, and
|
|
98
|
+
* kept apart from it for that reason: nothing clears either by waiting and both
|
|
99
|
+
* are fixed by an action on the computer, but the action is the opposite one.
|
|
100
|
+
* Stopping the computer is the fix. Without it here this would be an ordinary
|
|
101
|
+
* {@link ConflictError}, which {@link isTransient} calls worth sending again, and
|
|
102
|
+
* a caller looping on that would resend the same resize until it gave up.
|
|
103
|
+
*/
|
|
94
104
|
const REASON_PERMANENT = new Set([
|
|
95
105
|
'unavailable',
|
|
96
106
|
'unsupported',
|
|
97
107
|
'revoked',
|
|
98
108
|
'exists',
|
|
109
|
+
'running',
|
|
99
110
|
]);
|
|
100
111
|
/**
|
|
101
112
|
* How a refusal the platform classified behaves, or `undefined` for a word this
|
|
@@ -173,6 +184,11 @@ export function reasonAdvice(reason) {
|
|
|
173
184
|
// write whose earlier attempt lost its answer may have written the file
|
|
174
185
|
// itself, and the retry meets that file here.
|
|
175
186
|
return 'something is already at that path and this attempt wrote nothing. This does not clear by waiting. If an earlier attempt\u2019s outcome was unknown, the file may be yours: read it and compare before choosing another path or overwriting (without overwrite: false, a write replaces it)';
|
|
187
|
+
case 'running':
|
|
188
|
+
// The mirror of `unavailable`, with the opposite fix. The last clause is
|
|
189
|
+
// there because stop_computer is a thing a model can do on its own
|
|
190
|
+
// initiative, and a stop the user did not ask for ends whatever was open.
|
|
191
|
+
return 'the computer is running and this needs it stopped (a resize, today). This does not clear by waiting: stop_computer first, then send it again \u2014 and say so rather than stopping a computer the user did not ask you to stop';
|
|
176
192
|
case 'revoked':
|
|
177
193
|
// Reached only on a status statusAdvice has no sentence for, because the
|
|
178
194
|
// formatter asks that one first and the platform sends this word on 401 and
|
|
@@ -184,6 +200,195 @@ export function reasonAdvice(reason) {
|
|
|
184
200
|
return undefined;
|
|
185
201
|
}
|
|
186
202
|
}
|
|
203
|
+
/** The platform's `code` on a keyed call's own refusals (OPL-5127), or `undefined`. */
|
|
204
|
+
export function idempotencyCode(err) {
|
|
205
|
+
const code = record(err.body) ? err.body.code : undefined;
|
|
206
|
+
return code === 'idempotency_in_progress' ||
|
|
207
|
+
code === 'idempotency_outcome_unknown' ||
|
|
208
|
+
code === 'idempotency_key_reused'
|
|
209
|
+
? code
|
|
210
|
+
: undefined;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* What to tell a model about the refusals a call's `idempotency_key` produces
|
|
214
|
+
* (platform OPL-5127), or `undefined` for any other error. Ahead of the
|
|
215
|
+
* `reason` advice, which for `idempotency_in_progress` says only "worth sending
|
|
216
|
+
* again" and not with WHAT. `tool` is the lifecycle tool that was called, which
|
|
217
|
+
* decides the route after `idempotency_outcome_unknown` (see
|
|
218
|
+
* {@link resendAfterSpentKey}); without it the cautious route is given.
|
|
219
|
+
*/
|
|
220
|
+
export function idempotencyAdvice(err, tool) {
|
|
221
|
+
if (!(err instanceof APIError))
|
|
222
|
+
return undefined;
|
|
223
|
+
const operation = record(err.body) && typeof err.body.operation_id === 'string'
|
|
224
|
+
? err.body.operation_id
|
|
225
|
+
: undefined;
|
|
226
|
+
switch (idempotencyCode(err)) {
|
|
227
|
+
case 'idempotency_in_progress':
|
|
228
|
+
return `the same call with this idempotency_key is still running; wait and call again with the same idempotency_key for its answer${operation ? `, or read get_operation ${operation}` : ''}`;
|
|
229
|
+
case 'idempotency_outcome_unknown':
|
|
230
|
+
return `the platform did not hear how the call with this idempotency_key ended; do not send it again with this key, since the same key answers the same thing. ${resendAfterSpentKey(tool, operation, undefined, tool ? `call ${tool} again` : undefined)}`;
|
|
231
|
+
case 'idempotency_key_reused':
|
|
232
|
+
return 'this idempotency_key was already used with a different request, so nothing was done; send this request with a new key, or none';
|
|
233
|
+
default:
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* The lifecycle tools whose resend after a spent key waits for the operation
|
|
239
|
+
* to be final: the ones that make a new computer or overwrite a disk. A second
|
|
240
|
+
* one is costly (a second computer, a second overwrite), and a read of the
|
|
241
|
+
* computer made straight away cannot see one that is still landing.
|
|
242
|
+
*
|
|
243
|
+
* Every other keyed tool but restart (start, stop, suspend, delete, move and
|
|
244
|
+
* update_computer) changes a computer a read shows, and doing it twice does no
|
|
245
|
+
* harm the read cannot catch, while the operation of a call whose key is spent
|
|
246
|
+
* stays `pending` for an hour however quickly the host gave up (platform
|
|
247
|
+
* OPL-5304). Holding those to the same gate would mean an hour before the start
|
|
248
|
+
* the user asked for could be sent again.
|
|
249
|
+
*
|
|
250
|
+
* restart_computer is neither: see {@link UNSEEN_BY_READ}.
|
|
251
|
+
*/
|
|
252
|
+
const WAITS_FOR_FINAL = new Set([
|
|
253
|
+
'create_computer',
|
|
254
|
+
'clone_computer',
|
|
255
|
+
'clone_snapshot',
|
|
256
|
+
'restore_snapshot',
|
|
257
|
+
]);
|
|
258
|
+
/**
|
|
259
|
+
* The keyed tools whose step a read of the computer cannot see: a restart is a
|
|
260
|
+
* guest reset, and the computer reads `running` before and after one, with no
|
|
261
|
+
* boot or reset time among its fields. "Read the computer, and resend if the
|
|
262
|
+
* step did not take effect" can then only ever read as "did not take effect",
|
|
263
|
+
* and a resend resets the guest a second time, losing whatever ran since the
|
|
264
|
+
* first. Nor does waiting for the operation settle it: a spent key's operation
|
|
265
|
+
* ends `failed` (`lost`) an hour later whether or not the host reset the guest.
|
|
266
|
+
* So the route is the operation's `succeeded` or `running` where it says one,
|
|
267
|
+
* and otherwise the user's say before a second restart
|
|
268
|
+
* ({@link resendAfterUnseenStep}).
|
|
269
|
+
*/
|
|
270
|
+
const UNSEEN_BY_READ = new Set(['restart_computer']);
|
|
271
|
+
/** Whether a spent key's resend for `tool` is the user's call, since no read shows the step. */
|
|
272
|
+
export function resendUnseenByRead(tool) {
|
|
273
|
+
return tool !== undefined && UNSEEN_BY_READ.has(tool);
|
|
274
|
+
}
|
|
275
|
+
/** Whether a spent key's resend for `tool` waits for its operation; `true` when the tool is not known. */
|
|
276
|
+
export function resendWaitsForFinal(tool) {
|
|
277
|
+
return tool === undefined || WAITS_FOR_FINAL.has(tool);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* The route to a new-key resend after a keyed call whose outcome is unknown and
|
|
281
|
+
* whose key is spent, chosen by the tool that was called: the wait for a final
|
|
282
|
+
* operation ({@link resendOnlyOnceFinal}) where a duplicate is costly and
|
|
283
|
+
* unseen, the operation and then the user ({@link resendAfterUnseenStep}) for a
|
|
284
|
+
* restart, which no read of the computer shows, and a read of the computer
|
|
285
|
+
* ({@link resendAfterRead}) everywhere else.
|
|
286
|
+
*/
|
|
287
|
+
export function resendAfterSpentKey(tool, operation, key, resend = 'send the call again') {
|
|
288
|
+
if (resendUnseenByRead(tool))
|
|
289
|
+
return resendAfterUnseenStep(operation, key, resend);
|
|
290
|
+
return resendWaitsForFinal(tool)
|
|
291
|
+
? resendOnlyOnceFinal(operation, key, resend)
|
|
292
|
+
: resendAfterRead(operation, resend);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* The route for a spent key on a restart (see {@link UNSEEN_BY_READ}). It never
|
|
296
|
+
* conditions a resend on get_computer, which reads `running` either way: the
|
|
297
|
+
* operation says the restart happened (`succeeded`) or is under way
|
|
298
|
+
* (`running`), and anything else leaves it possibly done, so a second restart
|
|
299
|
+
* is the user's call.
|
|
300
|
+
*/
|
|
301
|
+
export function resendAfterUnseenStep(operation, key, resend = 'send the call again') {
|
|
302
|
+
const find = operation
|
|
303
|
+
? `get_operation ${operation}`
|
|
304
|
+
: `the operation it recorded, found by list_operations with idempotency_key ${key ? `"${key}"` : 'set to this key'}`;
|
|
305
|
+
return (`A restart cannot be seen in get_computer — it reads running before and after one — so do not read the computer to decide. Read ${find} instead. ` +
|
|
306
|
+
`If it succeeded, the restart happened; if it is running, it is under way, so wait_for_operation${operation ? ` ${operation}` : ''} rather than resending. ` +
|
|
307
|
+
`Otherwise (pending, failed, lost, or no operation found), treat the restart as possibly done: the guest may already have been reset. Ask the user before you ${resend} with a new idempotency_key, or none, since a second restart resets the guest again and loses whatever ran since the first`);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* The route for a spent key on a step a read of the computer shows: start,
|
|
311
|
+
* stop, suspend, delete, move, update_computer (not restart; see
|
|
312
|
+
* {@link UNSEEN_BY_READ}). Read, and resend with
|
|
313
|
+
* a new key or none if the step did not take effect. A named operation is read
|
|
314
|
+
* too, because `succeeded` and `running` do answer the question; `pending` does
|
|
315
|
+
* not, since a spent key's operation stays pending for an hour whatever
|
|
316
|
+
* happened, so it is named as no reason to wait.
|
|
317
|
+
*/
|
|
318
|
+
export function resendAfterRead(operation, resend = 'send the call again') {
|
|
319
|
+
return (`Read get_computer${operation ? ` and get_operation ${operation}` : ''} first. ` +
|
|
320
|
+
(operation
|
|
321
|
+
? `If the operation succeeded, the step happened; if it is running, the step is under way, so wait_for_operation ${operation} rather than resending. Pending says only that the platform has not settled it yet, which can take an hour, and is no reason to wait. `
|
|
322
|
+
: '') +
|
|
323
|
+
`If get_computer shows the step did not take effect, ${resend} with a new idempotency_key, or none — there is no need to wait for the operation to be final first`);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* The route to a new-key resend for the tools that make a new computer or
|
|
327
|
+
* overwrite a disk (see {@link WAITS_FOR_FINAL}) after a keyed call whose
|
|
328
|
+
* outcome is unknown and whose key is spent: a `5xx` the platform answered that
|
|
329
|
+
* names an `operation_id`, or `idempotency_outcome_unknown` (platform OPL-5304).
|
|
330
|
+
* A platform `5xx` naming none is not this route: its key is resent as it is
|
|
331
|
+
* (see `keyedFailure` in tools/operations.ts).
|
|
332
|
+
*
|
|
333
|
+
* The condition has to be one a read can decide. The platform keeps such a
|
|
334
|
+
* call's operation `pending` for up to an hour, because its host may still be
|
|
335
|
+
* carrying the call out, so a read of the computer made straight away can show
|
|
336
|
+
* no effect for a create, clone or restore that then lands; a resend with a new
|
|
337
|
+
* key at that moment is not deduplicated and does the step twice. So the first
|
|
338
|
+
* read is the operation, and a resend waits until it is final. `key`, when
|
|
339
|
+
* known, names how to find an operation the error did not name; `resend` is
|
|
340
|
+
* the verb phrase for the resend, e.g. `call start_computer again`.
|
|
341
|
+
*/
|
|
342
|
+
export function resendOnlyOnceFinal(operation, key, resend = 'send the call again') {
|
|
343
|
+
const find = operation
|
|
344
|
+
? `get_operation ${operation} (wait_for_operation ${operation} waits on it)`
|
|
345
|
+
: `the operation it recorded, found by list_operations with idempotency_key ${key ? `"${key}"` : 'set to this key'}`;
|
|
346
|
+
return (`Read ${find} first. While it is pending or running the call may still be carried out, so wait for it to be final — wait_for_operation, again if that wait runs out — and do NOT resend it meanwhile, with any key. ` +
|
|
347
|
+
`If it succeeded, the step happened. Only once it is final as failed (error.code lost, for one) or no longer found, AND get_computer (list_computers after a create or a clone) shows the step did not take effect, ${resend} with a new idempotency_key, or none. ` +
|
|
348
|
+
'If no operation is found at all, a slow create or clone may still land: read the computer again after a few minutes before resending');
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Whether a lifecycle call that failed with this may still have happened, and
|
|
352
|
+
* its key is still the safe way to send it again: a request that may have been
|
|
353
|
+
* received before the connection died, the platform saying the keyed call is
|
|
354
|
+
* still running, or a `5xx` that the platform itself never answered (see
|
|
355
|
+
* {@link platformAnsweredFailure}).
|
|
356
|
+
*
|
|
357
|
+
* NOT a `5xx` the platform answered, which `keyedFailure` in
|
|
358
|
+
* tools/operations.ts splits by whether it names an `operation_id`. One that
|
|
359
|
+
* does is a call the platform settled as lost (OPL-5304): the same key can only
|
|
360
|
+
* be answered `409 idempotency_outcome_unknown` for the rest of its 24 hours,
|
|
361
|
+
* so that caller is told to read first. One that names none is usually a
|
|
362
|
+
* refusal given before the call was sent anywhere, which releases the key and
|
|
363
|
+
* deletes its operation (platform OPL-5310, OPL-5365), so that caller is told to
|
|
364
|
+
* resend with the same key — which is also safe if it was not released.
|
|
365
|
+
*/
|
|
366
|
+
export function keyedOutcomeUnknown(err) {
|
|
367
|
+
return (err instanceof ConnectivityInterruptedError ||
|
|
368
|
+
(err instanceof APIError &&
|
|
369
|
+
(idempotencyCode(err) === 'idempotency_in_progress' ||
|
|
370
|
+
(err.status >= 500 && !platformAnsweredFailure(err)))));
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Whether a `5xx` came from the platform itself rather than from a hop in
|
|
374
|
+
* front of it. Says nothing about whether the key was spent: that turns on
|
|
375
|
+
* whether the body names an `operation_id` (see {@link keyedOutcomeUnknown}).
|
|
376
|
+
*
|
|
377
|
+
* The platform answers every error with a JSON object. A proxy that gave up
|
|
378
|
+
* (a Cloudflare or nginx `502`/`504`, or an edge-only `520`-`526`) answers
|
|
379
|
+
* with an HTML page or nothing, which the code that settles the key did not
|
|
380
|
+
* write, so the same key sent again answers the call's own outcome or says it
|
|
381
|
+
* is still running. The `520`-`526` range is an edge's own vocabulary whatever
|
|
382
|
+
* its body says. Should one of these turn out to have been settled as lost
|
|
383
|
+
* after all, the resend is answered `idempotency_outcome_unknown`, whose own
|
|
384
|
+
* advice says what to do next; nothing is done twice either way.
|
|
385
|
+
*/
|
|
386
|
+
export function platformAnsweredFailure(err) {
|
|
387
|
+
return (err instanceof APIError &&
|
|
388
|
+
err.status >= 500 &&
|
|
389
|
+
!(err.status >= 520 && err.status <= 526) &&
|
|
390
|
+
record(err.body));
|
|
391
|
+
}
|
|
187
392
|
/**
|
|
188
393
|
* What to tell a model about a refusal that is about the CALLER, not the computer.
|
|
189
394
|
*
|
|
@@ -230,6 +435,42 @@ export function statusAdvice(status, reason) {
|
|
|
230
435
|
return undefined;
|
|
231
436
|
}
|
|
232
437
|
}
|
|
438
|
+
/**
|
|
439
|
+
* What a failed agent run's status means, for run_agent and run_agent_chat.
|
|
440
|
+
*
|
|
441
|
+
* Not {@link statusAdvice}, because on these two routes the same numbers mean
|
|
442
|
+
* something else. The platform re-checks the caller's own authority before each
|
|
443
|
+
* model call, and that refusal is a 401 or 403 carrying `reason: 'revoked'`.
|
|
444
|
+
* Every other failure status on a run is the model provider's own, relayed as
|
|
445
|
+
* the provider sent it for the configured model key: 402 is its
|
|
446
|
+
* `billing_error`, 504 its `timeout_error`, 529 its `overloaded_error`, and a
|
|
447
|
+
* 403 without `revoked` can be its `permission_error`. None of those is the
|
|
448
|
+
* Mandala plan, and telling a model it was left it reporting a plan limit to a
|
|
449
|
+
* user whose fix was on their model-provider account.
|
|
450
|
+
*
|
|
451
|
+
* `undefined` for a status with nothing to add, so the caller keeps its own
|
|
452
|
+
* wording. A 401 without `revoked` is left to {@link authenticationAdvice},
|
|
453
|
+
* which already says it cannot tell the account key from the model key.
|
|
454
|
+
*/
|
|
455
|
+
export function agentRunAdvice(status, reason, tool) {
|
|
456
|
+
const noReplay = `Do not call ${tool} again with the same task: completed steps were already billed, so read what they did first`;
|
|
457
|
+
if (status === 403 && reason === 'revoked') {
|
|
458
|
+
return `this Mandala account no longer permits the run — a role that changed or an account suspended, not anything wrong with the computer. Nothing you can send changes that, and a new credential does not either: say what was refused and stop. ${noReplay}`;
|
|
459
|
+
}
|
|
460
|
+
if (status === 403) {
|
|
461
|
+
return `the model provider may have refused the configured model key (its permission_error: the key cannot use this model or this feature). The Mandala plan is not the cause and neither is the computer; check the model-provider account and the model name. ${noReplay}`;
|
|
462
|
+
}
|
|
463
|
+
const provider = status === 402
|
|
464
|
+
? 'billing_error: the configured model key has no credit or billing set up'
|
|
465
|
+
: status === 504
|
|
466
|
+
? 'timeout_error'
|
|
467
|
+
: status === 529
|
|
468
|
+
? 'overloaded_error: the model API is overloaded'
|
|
469
|
+
: undefined;
|
|
470
|
+
if (!provider)
|
|
471
|
+
return undefined;
|
|
472
|
+
return `this is the model provider's own status for the configured model key (its ${provider}), not the Mandala plan and not the computer — check the model-provider account${status === 402 ? '' : ' and its status page, and try later'}. ${noReplay}`;
|
|
473
|
+
}
|
|
233
474
|
/**
|
|
234
475
|
* The platform's one-word classification off a refusal body, or `undefined`.
|
|
235
476
|
*
|
|
@@ -1033,6 +1274,15 @@ export function errorForStatus(status, message, body, retryAfterMs, metadata) {
|
|
|
1033
1274
|
export function isTransient(err) {
|
|
1034
1275
|
if (err instanceof APIError && [401, 402, 403, 404, 405].includes(err.status))
|
|
1035
1276
|
return false;
|
|
1277
|
+
// A keyed call the platform never heard end (platform OPL-5127). A 409 with no
|
|
1278
|
+
// `reason`, so the ConflictError branch below would call it worth sending
|
|
1279
|
+
// again — and the same key answers the same thing forever: the computer is
|
|
1280
|
+
// what says whether it happened. Its sibling `idempotency_in_progress` carries
|
|
1281
|
+
// `reason: "contention"` and IS worth sending again: that is the wait for the
|
|
1282
|
+
// first call's answer.
|
|
1283
|
+
if (err instanceof APIError && idempotencyCode(err) === 'idempotency_outcome_unknown') {
|
|
1284
|
+
return false;
|
|
1285
|
+
}
|
|
1036
1286
|
// Preparation requires the original template and a token, and may have failed.
|
|
1037
1287
|
// A generic retry of the unchanged create is not the continuation protocol.
|
|
1038
1288
|
if (err instanceof APIError &&
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC5B,IAAI,GAAG,cAAc,CAAC;CAChC;AAgBD,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAsB,EAAE,CACtD,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,MAAM,MAAM,GAAG,CAAC,KAAc,EAAoC,EAAE,CAClE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvE,MAAM,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7C,IAAI,CAAC,CAAC,GAAG,YAAY,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,YAAY,iBAAiB,CAAC;QAAE,OAAO,KAAK,CAAC;IACpF,IACE,GAAG,YAAY,iBAAiB;QAChC,GAAG,YAAY,eAAe;QAC9B,GAAG,YAAY,uBAAuB;QAEtC,OAAO,KAAK,CAAC;IACf,IAAI,GAAG,YAAY,cAAc;QAAE,OAAO,KAAK,CAAC;IAChD,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;QAC5B,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,KAAK,CAAC;QACrC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;QAChF,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/format.d.ts
CHANGED
|
@@ -69,8 +69,14 @@ export declare function apiErrorMessage(error: APIError): string;
|
|
|
69
69
|
* already have happened, so the current state is read first.
|
|
70
70
|
*/
|
|
71
71
|
export declare function unavailableAdvice(err: APIError): string | undefined;
|
|
72
|
-
/**
|
|
73
|
-
|
|
72
|
+
/**
|
|
73
|
+
* A model-visible refusal. A projected run failure must withhold reason-based replay advice.
|
|
74
|
+
*
|
|
75
|
+
* `override`, when given, replaces the status and reason advice below: an agent
|
|
76
|
+
* run's 402 and 403 mean the model provider, not the plan or the role that
|
|
77
|
+
* {@link statusAdvice} names for every other tool (see `agentRunAdvice`).
|
|
78
|
+
*/
|
|
79
|
+
export declare function failed(err: unknown, includeReasonAdvice?: boolean, override?: string): CallToolResult;
|
|
74
80
|
/** Run a tool body, turning anything it throws into a result the model can read. */
|
|
75
81
|
export declare function guarded(fn: () => Promise<CallToolResult>): Promise<CallToolResult>;
|
|
76
82
|
export type Computer = {
|
|
@@ -113,6 +119,12 @@ export type Computer = {
|
|
|
113
119
|
deleted_at?: string;
|
|
114
120
|
lost_at?: string;
|
|
115
121
|
start_error?: string;
|
|
122
|
+
/**
|
|
123
|
+
* The lifecycle operation this answer started (platform OPL-5055), on a
|
|
124
|
+
* create, a clone or a resize only — never on a read. `wait_for_operation`
|
|
125
|
+
* follows it to its end.
|
|
126
|
+
*/
|
|
127
|
+
operation_id?: string;
|
|
116
128
|
/**
|
|
117
129
|
* Guest RAM the platform is holding for this computer against the account's
|
|
118
130
|
* running pool (platform OPL-4630).
|
|
@@ -144,8 +156,45 @@ export type Computer = {
|
|
|
144
156
|
secrets_pending?: boolean | null;
|
|
145
157
|
/** Why the last delivering start was stopped, in one fixed sentence. Never a value. */
|
|
146
158
|
secrets_error?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Whether values are on their way into the desktop right now: true from a
|
|
161
|
+
* delivering start until they are applied, so a computer reads `running`
|
|
162
|
+
* with this still true for a few seconds. Absent where nothing is bound, or
|
|
163
|
+
* from a platform that predates it.
|
|
164
|
+
*/
|
|
165
|
+
secrets_delivering?: boolean;
|
|
147
166
|
secrets_generation?: number;
|
|
148
167
|
secrets_applied?: unknown;
|
|
168
|
+
/**
|
|
169
|
+
* The proxy this computer's browsers are sent through (platform OPL-5056):
|
|
170
|
+
* the server URL, the hosts they reach directly, and the id of the secret
|
|
171
|
+
* holding its `user:password` when it asks for one. Absent when none is set.
|
|
172
|
+
*/
|
|
173
|
+
browser_proxy?: {
|
|
174
|
+
server?: string;
|
|
175
|
+
bypass?: string[];
|
|
176
|
+
credentials_secret_id?: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* `true` while a running computer's guest does not have its browser proxy
|
|
180
|
+
* yet, or still holds the files of one just removed. Absent otherwise, and
|
|
181
|
+
* never present on a computer that is not running.
|
|
182
|
+
*/
|
|
183
|
+
browser_proxy_pending?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* The proxy ALL of this computer's outbound TCP is sent through: the server
|
|
186
|
+
* URL, and the id of the secret holding its `user:password` when it asks for
|
|
187
|
+
* one. Absent when none is set.
|
|
188
|
+
*/
|
|
189
|
+
egress_proxy?: {
|
|
190
|
+
server?: string;
|
|
191
|
+
credentials_secret_id?: string;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* `true` while a running computer's egress proxy names credentials its host
|
|
195
|
+
* does not hold yet; every connection is closed meanwhile. Absent otherwise.
|
|
196
|
+
*/
|
|
197
|
+
egress_proxy_pending?: boolean;
|
|
149
198
|
vnc?: Record<string, unknown>;
|
|
150
199
|
};
|
|
151
200
|
/**
|
|
@@ -164,6 +213,16 @@ export type Computer = {
|
|
|
164
213
|
* the same distinction the same way (OPL-4628, OPL-4629).
|
|
165
214
|
*/
|
|
166
215
|
export declare function nothingAdmitted(c: Computer): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Whether a running computer's secrets are still on their way into its desktop.
|
|
218
|
+
*
|
|
219
|
+
* `secrets_delivering` answers it where the platform reports the field. Where
|
|
220
|
+
* it does not (a platform that predates it), the receipt does: it names the
|
|
221
|
+
* delivering start it is for, so a receipt behind `secrets_generation` is a
|
|
222
|
+
* delivery still under way — the fallback both SDKs' waits use. Nothing bound
|
|
223
|
+
* is nothing coming.
|
|
224
|
+
*/
|
|
225
|
+
export declare function secretsOnTheirWay(c: Computer): boolean;
|
|
167
226
|
/**
|
|
168
227
|
* A create or a clone can answer `{computer, start_error}` rather than a bare
|
|
169
228
|
* computer: the guest was made and then would not boot, so the machine exists
|
|
@@ -171,6 +230,18 @@ export declare function nothingAdmitted(c: Computer): boolean;
|
|
|
171
230
|
* flattens it, so every reader of a computer sees the same shape and the
|
|
172
231
|
* failure travels beside the fields rather than wrapping them.
|
|
173
232
|
*/
|
|
233
|
+
/**
|
|
234
|
+
* The `operation_id` a lifecycle answer carried, or `undefined` for none
|
|
235
|
+
* (platform OPL-5055). Absent is ordinary: the platform leaves it out, with the
|
|
236
|
+
* call still done, when it could not record the operation. Anything that is not
|
|
237
|
+
* a non-empty string reads as absent for the same reason.
|
|
238
|
+
*/
|
|
239
|
+
export declare function operationIdOf(body: unknown): string | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* The operation an answer carried, as the clause a tool's sentence ends with:
|
|
242
|
+
* `` (operation op_…)`` or nothing.
|
|
243
|
+
*/
|
|
244
|
+
export declare const operationClause: (body: unknown) => string;
|
|
174
245
|
export declare function unwrapComputer(body: unknown): Computer;
|
|
175
246
|
/**
|
|
176
247
|
* A computer without its desktop credentials.
|
package/dist/format.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EACL,QAAQ,EAOT,MAAM,aAAa,CAAC;AAErB,2BAA2B;AAC3B,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,KAAG,cAA4D,CAAC;AAE9F,6FAA6F;AAC7F,eAAO,MAAM,IAAI,GAAI,GAAG,OAAO,KAAG,cAAkD,CAAC;AAErF,yDAAyD;AACzD,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,EAAE,IAAI,OAAO,KAAG,cAC0B,CAAC;AAE5E;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,IAAI,OAAO,KAAG,cAGlD,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,QAAkB,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAKjD,CAAC;AAEH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,E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AM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvF;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,YAAY,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,QAAQ,GAAG,OAAO,CAMpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,GAAG,OAAO,CActD;AAED;;;;;;GAMG;AACH;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAI/D;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,OAAO,KAAG,MAG/C,CAAC;AAEF,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAoBtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAGxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAUjF;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAiD5C"}
|
package/dist/format.js
CHANGED
|
@@ -143,8 +143,14 @@ export function unavailableAdvice(err) {
|
|
|
143
143
|
? 'something this depends on could not answer right now, and THIS CHANGE MAY OR MAY NOT HAVE HAPPENED: a failure after the request was sent is answered the same way. Read the current state before sending it again — repeating a create, a command, a clone or a snapshot blind can do it twice'
|
|
144
144
|
: 'something this depends on could not answer right now; the same request can be sent again shortly';
|
|
145
145
|
}
|
|
146
|
-
/**
|
|
147
|
-
|
|
146
|
+
/**
|
|
147
|
+
* A model-visible refusal. A projected run failure must withhold reason-based replay advice.
|
|
148
|
+
*
|
|
149
|
+
* `override`, when given, replaces the status and reason advice below: an agent
|
|
150
|
+
* run's 402 and 403 mean the model provider, not the plan or the role that
|
|
151
|
+
* {@link statusAdvice} names for every other tool (see `agentRunAdvice`).
|
|
152
|
+
*/
|
|
153
|
+
export function failed(err, includeReasonAdvice = true, override) {
|
|
148
154
|
const message = err instanceof APIError
|
|
149
155
|
? apiErrorMessage(err)
|
|
150
156
|
: err instanceof MandalaError || err instanceof Error
|
|
@@ -178,7 +184,8 @@ export function failed(err, includeReasonAdvice = true) {
|
|
|
178
184
|
// saying "worth sending again" would invite the blind replay of a create or a
|
|
179
185
|
// command that the platform's own docs warn against (OPL-5026).
|
|
180
186
|
const advice = err instanceof APIError
|
|
181
|
-
? (
|
|
187
|
+
? (override ??
|
|
188
|
+
unavailableAdvice(err) ??
|
|
182
189
|
statusAdvice(err.status, err.reason) ??
|
|
183
190
|
(includeReasonAdvice &&
|
|
184
191
|
![404, 405].includes(err.status) &&
|
|
@@ -292,6 +299,31 @@ export function nothingAdmitted(c) {
|
|
|
292
299
|
Number.isFinite(c.running_ram_mb) &&
|
|
293
300
|
c.running_ram_mb === 0);
|
|
294
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Whether a running computer's secrets are still on their way into its desktop.
|
|
304
|
+
*
|
|
305
|
+
* `secrets_delivering` answers it where the platform reports the field. Where
|
|
306
|
+
* it does not (a platform that predates it), the receipt does: it names the
|
|
307
|
+
* delivering start it is for, so a receipt behind `secrets_generation` is a
|
|
308
|
+
* delivery still under way — the fallback both SDKs' waits use. Nothing bound
|
|
309
|
+
* is nothing coming.
|
|
310
|
+
*/
|
|
311
|
+
export function secretsOnTheirWay(c) {
|
|
312
|
+
if (typeof c.secrets_delivering === 'boolean')
|
|
313
|
+
return c.secrets_delivering;
|
|
314
|
+
if (!Array.isArray(c.secrets) || c.secrets.length === 0)
|
|
315
|
+
return false;
|
|
316
|
+
const generation = c.secrets_generation;
|
|
317
|
+
if (typeof generation !== 'number' || !Number.isFinite(generation) || generation <= 0)
|
|
318
|
+
return false;
|
|
319
|
+
const receipt = c.secrets_applied;
|
|
320
|
+
const applied = receipt !== null &&
|
|
321
|
+
typeof receipt === 'object' &&
|
|
322
|
+
typeof receipt.generation === 'number'
|
|
323
|
+
? receipt.generation
|
|
324
|
+
: -1;
|
|
325
|
+
return applied < generation;
|
|
326
|
+
}
|
|
295
327
|
/**
|
|
296
328
|
* A create or a clone can answer `{computer, start_error}` rather than a bare
|
|
297
329
|
* computer: the guest was made and then would not boot, so the machine exists
|
|
@@ -299,6 +331,26 @@ export function nothingAdmitted(c) {
|
|
|
299
331
|
* flattens it, so every reader of a computer sees the same shape and the
|
|
300
332
|
* failure travels beside the fields rather than wrapping them.
|
|
301
333
|
*/
|
|
334
|
+
/**
|
|
335
|
+
* The `operation_id` a lifecycle answer carried, or `undefined` for none
|
|
336
|
+
* (platform OPL-5055). Absent is ordinary: the platform leaves it out, with the
|
|
337
|
+
* call still done, when it could not record the operation. Anything that is not
|
|
338
|
+
* a non-empty string reads as absent for the same reason.
|
|
339
|
+
*/
|
|
340
|
+
export function operationIdOf(body) {
|
|
341
|
+
if (!body || typeof body !== 'object')
|
|
342
|
+
return undefined;
|
|
343
|
+
const v = body.operation_id;
|
|
344
|
+
return typeof v === 'string' && v ? v : undefined;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* The operation an answer carried, as the clause a tool's sentence ends with:
|
|
348
|
+
* `` (operation op_…)`` or nothing.
|
|
349
|
+
*/
|
|
350
|
+
export const operationClause = (body) => {
|
|
351
|
+
const id = operationIdOf(body);
|
|
352
|
+
return id ? ` (operation ${id})` : '';
|
|
353
|
+
};
|
|
302
354
|
export function unwrapComputer(body) {
|
|
303
355
|
if (!body || typeof body !== 'object')
|
|
304
356
|
return {};
|
|
@@ -310,9 +362,13 @@ export function unwrapComputer(body) {
|
|
|
310
362
|
// the computer and replace it with nothing — discarding the reason a
|
|
311
363
|
// billable machine did not boot, in the function that exists to surface it.
|
|
312
364
|
const nested = inner;
|
|
365
|
+
// `operation_id` the same way (platform OPL-5055): on a create that would
|
|
366
|
+
// not boot it is on the envelope, beside `start_error`.
|
|
367
|
+
const operation = operationIdOf(v) ?? nested.operation_id;
|
|
313
368
|
return {
|
|
314
369
|
...nested,
|
|
315
370
|
start_error: v.start_error ?? nested.start_error,
|
|
371
|
+
...(operation === undefined ? {} : { operation_id: operation }),
|
|
316
372
|
};
|
|
317
373
|
}
|
|
318
374
|
return v;
|
|
@@ -371,12 +427,34 @@ export function describe(c) {
|
|
|
371
427
|
// Secrets, only where there is something to say: `false` and absent say
|
|
372
428
|
// nothing, and `null` is the platform saying it could not check — not that
|
|
373
429
|
// nothing is pending.
|
|
430
|
+
if (c.secrets_delivering === true)
|
|
431
|
+
bits.push('its secrets are still on their way in');
|
|
374
432
|
if (c.secrets_pending === true)
|
|
375
433
|
bits.push('a change to its secrets is pending until it restarts');
|
|
376
434
|
else if (c.secrets_pending === null)
|
|
377
435
|
bits.push('whether its secrets are current is unknown until it restarts');
|
|
378
436
|
if (typeof c.secrets_error === 'string' && c.secrets_error.trim())
|
|
379
437
|
bits.push(`secrets not delivered: ${c.secrets_error.trim()}`);
|
|
438
|
+
// The proxy by its server, and its credentials secret when it has one: the
|
|
439
|
+
// bypass list rides in the structured result, and a line naming sixty hosts
|
|
440
|
+
// says nothing a model can act on. The id is said because a change that
|
|
441
|
+
// leaves it out removes the credentials.
|
|
442
|
+
const proxy = c.browser_proxy?.server;
|
|
443
|
+
const creds = c.browser_proxy?.credentials_secret_id;
|
|
444
|
+
if (typeof proxy === 'string' && proxy)
|
|
445
|
+
bits.push(typeof creds === 'string' && creds
|
|
446
|
+
? `browsers via ${proxy} (with credentials ${creds})`
|
|
447
|
+
: `browsers via ${proxy}`);
|
|
448
|
+
if (c.browser_proxy_pending === true)
|
|
449
|
+
bits.push('its browser proxy is still being applied');
|
|
450
|
+
const egress = c.egress_proxy?.server;
|
|
451
|
+
const egressCreds = c.egress_proxy?.credentials_secret_id;
|
|
452
|
+
if (typeof egress === 'string' && egress)
|
|
453
|
+
bits.push(typeof egressCreds === 'string' && egressCreds
|
|
454
|
+
? `all outbound traffic via ${egress} (with credentials ${egressCreds})`
|
|
455
|
+
: `all outbound traffic via ${egress}`);
|
|
456
|
+
if (c.egress_proxy_pending === true)
|
|
457
|
+
bits.push('its egress proxy is waiting for credentials; connections are closed until they arrive');
|
|
380
458
|
return bits.join(' · ');
|
|
381
459
|
}
|
|
382
460
|
//# sourceMappingURL=format.js.map
|