mandala-computer-mcp 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +232 -29
  2. package/dist/api.d.ts +6 -0
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +13 -3
  5. package/dist/api.js.map +1 -1
  6. package/dist/cli.d.ts +12 -0
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +76 -1
  9. package/dist/cli.js.map +1 -1
  10. package/dist/credentials.d.ts +55 -0
  11. package/dist/credentials.d.ts.map +1 -1
  12. package/dist/credentials.js +104 -2
  13. package/dist/credentials.js.map +1 -1
  14. package/dist/errors.d.ts +57 -16
  15. package/dist/errors.d.ts.map +1 -1
  16. package/dist/errors.js +112 -42
  17. package/dist/errors.js.map +1 -1
  18. package/dist/format.d.ts +17 -2
  19. package/dist/format.d.ts.map +1 -1
  20. package/dist/format.js +27 -4
  21. package/dist/format.js.map +1 -1
  22. package/dist/http.d.ts +58 -0
  23. package/dist/http.d.ts.map +1 -1
  24. package/dist/http.js +713 -57
  25. package/dist/http.js.map +1 -1
  26. package/dist/paths.d.ts +18 -11
  27. package/dist/paths.d.ts.map +1 -1
  28. package/dist/paths.js +31 -14
  29. package/dist/paths.js.map +1 -1
  30. package/dist/secret-store.d.ts +2 -1
  31. package/dist/secret-store.d.ts.map +1 -1
  32. package/dist/secret-store.js +6 -1
  33. package/dist/secret-store.js.map +1 -1
  34. package/dist/server.d.ts +2 -1
  35. package/dist/server.d.ts.map +1 -1
  36. package/dist/server.js +2 -1
  37. package/dist/server.js.map +1 -1
  38. package/dist/session.d.ts +24 -0
  39. package/dist/session.d.ts.map +1 -1
  40. package/dist/session.js +6 -0
  41. package/dist/session.js.map +1 -1
  42. package/dist/stdio.d.ts.map +1 -1
  43. package/dist/stdio.js +9 -1
  44. package/dist/stdio.js.map +1 -1
  45. package/dist/tool-filters.d.ts +1 -1
  46. package/dist/tool-filters.d.ts.map +1 -1
  47. package/dist/tool-filters.js +3 -0
  48. package/dist/tool-filters.js.map +1 -1
  49. package/dist/tools/account.d.ts.map +1 -1
  50. package/dist/tools/account.js +80 -6
  51. package/dist/tools/account.js.map +1 -1
  52. package/dist/tools/agent.js +12 -23
  53. package/dist/tools/agent.js.map +1 -1
  54. package/dist/tools/chat.d.ts.map +1 -1
  55. package/dist/tools/chat.js +56 -7
  56. package/dist/tools/chat.js.map +1 -1
  57. package/dist/tools/computers.d.ts.map +1 -1
  58. package/dist/tools/computers.js +93 -8
  59. package/dist/tools/computers.js.map +1 -1
  60. package/dist/tools/guest.d.ts.map +1 -1
  61. package/dist/tools/guest.js +28 -3
  62. package/dist/tools/guest.js.map +1 -1
  63. package/dist/tools/input.d.ts.map +1 -1
  64. package/dist/tools/input.js +98 -48
  65. package/dist/tools/input.js.map +1 -1
  66. package/dist/tools/operations.d.ts +7 -2
  67. package/dist/tools/operations.d.ts.map +1 -1
  68. package/dist/tools/operations.js +29 -6
  69. package/dist/tools/operations.js.map +1 -1
  70. package/dist/tools/secrets.d.ts.map +1 -1
  71. package/dist/tools/secrets.js +80 -25
  72. package/dist/tools/secrets.js.map +1 -1
  73. package/dist/tools/snapshots.d.ts.map +1 -1
  74. package/dist/tools/snapshots.js +21 -8
  75. package/dist/tools/snapshots.js.map +1 -1
  76. package/dist/tools/templates.js +2 -2
  77. package/dist/tools/templates.js.map +1 -1
  78. package/dist/tools/webhooks.js +1 -1
  79. package/dist/tools/webhooks.js.map +1 -1
  80. package/dist/version.d.ts +8 -0
  81. package/dist/version.d.ts.map +1 -0
  82. package/dist/version.js +8 -0
  83. package/dist/version.js.map +1 -0
  84. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { IDEMPOTENCY_KEY_PATTERN } from '../api.js';
3
3
  import { CancelledError, idempotencyAdvice, isTransientForPoll, keyedOutcomeUnknown, platformAnsweredFailure, resendAfterSpentKey, resendUnseenByRead, } from '../errors.js';
4
- import { failed, guarded, operationIdOf, refused, said } from '../format.js';
4
+ import { failed, guarded, operationIdOf, refused, said, unavailableAdvice } from '../format.js';
5
5
  import * as P from '../paths.js';
6
6
  import { heartbeat, POLL_MS, pollDelay, sleep } from '../poll.js';
7
7
  import { label, metadata, metadataCall } from './directory.js';
@@ -39,7 +39,7 @@ const keyArg = z
39
39
  .string()
40
40
  .regex(IDEMPOTENCY_KEY_PATTERN, 'idempotency_key must be 1 to 255 characters, each printable ASCII other than a space')
41
41
  .optional();
42
- const KEY_FIRST = "Optional. Omit it on a first attempt: a fresh key is sent for you, and an answer that is lost names it. Pass the key such an answer named to send the SAME call again without it being done twice — the platform answers with the first call's result, or says it is still running. After a 5xx the platform answered, or idempotency_outcome_unknown, the key is spent (resending with it answers idempotency_outcome_unknown)";
42
+ const KEY_FIRST = "Optional. Omit it on a first attempt: a fresh key is sent for you, and an answer that is lost names it. Pass the key such an answer named to send the SAME call again without it being done twice — the platform answers with the first call's result, or says it is still running. After a 5xx that names no operation_id, send the same call again with the same key: nothing may have been done, and the platform either carries it out (the key was released) or answers idempotency_outcome_unknown. After idempotency_outcome_unknown, or a 5xx that names an operation_id, the key is spent (resending with it answers idempotency_outcome_unknown)";
43
43
  const KEY_LAST = ' Keys last 24 hours; the same key with different arguments is refused.';
44
44
  /**
45
45
  * The key on a step a read of the computer shows: start, stop, suspend,
@@ -58,7 +58,9 @@ export const restartIdempotencyKeyArg = keyArg.describe(`${KEY_FIRST}. A restart
58
58
  * clone, clone_snapshot, restore_snapshot. A resend after a spent key waits for
59
59
  * the operation to be final. See {@link resendAfterSpentKey}.
60
60
  */
61
- export const buildIdempotencyKeyArg = keyArg.describe(`${KEY_FIRST} and the call may still be under way: read its operation first (get_operation with the operation_id the error named, or list_operations with the key), wait while it is pending or running and do not resend meanwhile, and send the call with a new key (or none) only once the operation is final as failed or not found AND get_computer shows the step did not happen.${KEY_LAST}`);
61
+ export const buildIdempotencyKeyArg = keyArg.describe(`${KEY_FIRST}, and the call may still be under way: read its operation first (get_operation with the operation_id the error named, or list_operations with the key), wait while it is pending or running and do not resend meanwhile, and send the call with a new key (or none) only once the operation is final as failed or not found AND get_computer shows the step did not happen.${KEY_LAST}`);
62
+ /** The status line's advice beside the unsent-refusal resend paragraph. */
63
+ const UNSENT_REFUSAL_ADVICE = 'the platform could not carry this out right now; see below for how to resend it';
62
64
  /**
63
65
  * The answer to a lifecycle tool call that failed, with what its key means.
64
66
  *
@@ -68,8 +70,13 @@ export const buildIdempotencyKeyArg = keyArg.describe(`${KEY_FIRST} and the call
68
70
  *
69
71
  * - The answer never arrived, the keyed call is still running, or a proxy in
70
72
  * front of the platform answered: the same tool, with the same key.
71
- * - The platform itself answered a `5xx`: it has settled that key as lost
72
- * (OPL-5304), so the same key can only be answered
73
+ * - The platform itself answered a `5xx` naming no `operation_id`: a refusal
74
+ * given before the call was sent anywhere names none, and releases the key
75
+ * (platform OPL-5310), so the same key is the resend. It is also safe when
76
+ * the key was not released after all: that is answered
77
+ * `idempotency_outcome_unknown`, whose own advice is the read below.
78
+ * - The platform itself answered a `5xx` naming an `operation_id`: it has
79
+ * settled that key as lost (OPL-5304), so the same key can only be answered
73
80
  * `idempotency_outcome_unknown`. The next step is a read, then a resend
74
81
  * with a new key or none if the step did not happen. Which read depends on
75
82
  * the tool (see {@link resendAfterSpentKey}): a create, clone or restore
@@ -81,7 +88,17 @@ export const buildIdempotencyKeyArg = keyArg.describe(`${KEY_FIRST} and the call
81
88
  */
82
89
  export function keyedFailure(err, tool, what, key) {
83
90
  const advice = idempotencyAdvice(err, tool);
84
- const result = failed(err, advice === undefined);
91
+ const unsentRefusal = !keyedOutcomeUnknown(err) &&
92
+ platformAnsweredFailure(err) &&
93
+ !operationIdOf(err.body);
94
+ // The unsent-refusal paragraph below says how to resend, so the status line
95
+ // must not also carry a 503's read-the-state-first sentence: two routes in
96
+ // one answer, and the read-first one names no key, which is the resend that
97
+ // could do it twice (OPL-5437). Only that sentence is replaced; any other
98
+ // 5xx keeps the platform's own word.
99
+ const result = unsentRefusal && unavailableAdvice(err) !== undefined
100
+ ? failed(err, advice === undefined, UNSENT_REFUSAL_ADVICE)
101
+ : failed(err, advice === undefined);
85
102
  const [first, ...rest] = result.content;
86
103
  if (first?.type !== 'text')
87
104
  return result;
@@ -91,6 +108,12 @@ export function keyedFailure(err, tool, what, key) {
91
108
  if (keyedOutcomeUnknown(err)) {
92
109
  text += `\n\nTo retry without risking a second ${what}, call ${tool} again with idempotency_key "${key}".`;
93
110
  }
111
+ else if (unsentRefusal) {
112
+ text +=
113
+ `\n\nThe platform answered this itself and named no operation, so nothing may have been done: an answer like this is usually a refusal given before the call was sent anywhere, which releases idempotency_key "${key}". ` +
114
+ `Call ${tool} again with the SAME idempotency_key "${key}" (after a short wait on a busy or unavailable answer): if the key was released the platform carries the call out, and if not it answers idempotency_outcome_unknown and says what to read before anything else. ` +
115
+ `Do not switch to a new key or none for this resend — that is the one that could make a second ${what}.`;
116
+ }
94
117
  else if (platformAnsweredFailure(err)) {
95
118
  const op = operationIdOf(err.body);
96
119
  text +=
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/tools/operations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,K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H,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/tools/secrets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAIL,KAAK,MAAM,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sDAAsD;AACtD,eAAO,MAAM,SAAS,oCAAoC,CAAC;AAE3D,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAiBlC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;KA0DrD;AA0FD,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAiDxC,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIxF;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAclF;AAsED,eAAO,MAAM,eAAe,EAAE,SAqR7B,CAAC"}
1
+ {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/tools/secrets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,OAAO,EAIL,KAAK,MAAM,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sDAAsD;AACtD,eAAO,MAAM,SAAS,oCAAoC,CAAC;AAE3D,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAiBlC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;KA0DrD;AAwFD,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAwExC,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIxF;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAclF;AA2ED,eAAO,MAAM,eAAe,EAAE,SAqT7B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { APIError, ConflictError, MandalaError, NotFoundError, statusAdvice } from '../errors.js';
2
+ import { APIError, ConflictError, MandalaError, NotFoundError, reasonAdvice, statusAdvice, } from '../errors.js';
3
3
  import { guarded, refused, said, unavailableAdvice } from '../format.js';
4
4
  import * as P from '../paths.js';
5
5
  import { DOCUMENTED_REASONS, isRequestId, overlaps, } from '../secret-store.js';
@@ -154,13 +154,11 @@ const TIMING = 'The new bindings reach the guest at its NEXT START OR RESTART: a
154
154
  /**
155
155
  * What reaches a running computer without a restart: a replaced VALUE.
156
156
  *
157
- * Worded to hold whichever way the platform answers a plain exec. Today a plain
158
- * exec runs as root and is never given bound secrets; platform work under way
159
- * (OPL-5028) gives it the bound environment too. `desktop: true` sees them
160
- * either way, so that is the instruction, and the plain-exec case is stated as
161
- * something not to rely on rather than as a fact that is about to change.
157
+ * Every exec, plain (as root) or with `desktop: true`, runs with the bound
158
+ * environment variables as they are at that moment on an image that supports
159
+ * it (platform OPL-5028, shipped).
162
160
  */
163
- const LIVE_VALUES = "Every start and restart delivers each secret's latest value. Separately, when a secret's value is replaced on a running computer: a secret bound as a FILE has that file rewritten in place within seconds; one bound as an ENVIRONMENT VARIABLE, on an image that supports it, reaches new shells and exec commands run with desktop: true within seconds, while programs already running — the desktop session among them — keep the value they started with until a restart (older images wait for the restart). A command that needs a bound secret should run with desktop: true; do not rely on a plain exec seeing it. A file newly bound or renamed waits for the restart either way.";
161
+ const LIVE_VALUES = "Every start and restart delivers each secret's latest value. Separately, when a secret's value is replaced on a running computer: a secret bound as a FILE has that file rewritten in place within seconds; one bound as an ENVIRONMENT VARIABLE, on an image that supports it, reaches new shells within seconds, and every exec — plain or with desktop: true — runs with the bound variables as they are at that moment, so the next exec sees the new value; programs already running — the desktop session among them — keep the value they started with until a restart (older images wait for the restart). A file newly bound or renamed waits for the restart either way.";
164
162
  /** A secret in a line: what a model recognises it by, and the revision a change needs. Never a value. */
165
163
  const secretLine = (s) => `${s.name} ${s.id} revision ${s.revision_id} ${s.workspace_id === null ? 'account-wide' : `workspace ${s.workspace_id}`} ${s.last_used_at === null ? 'never delivered' : `last delivered ${s.last_used_at}`}`;
166
164
  const STORE_LEGEND = 'name id revision scope last delivery; values are never shown';
@@ -190,9 +188,29 @@ const workspaceArg = z
190
188
  .refine(isId, 'workspace_id must not be empty or have spaces around it')
191
189
  .optional()
192
190
  .describe('The workspace the secret belongs to. Leave it out for an account-wide secret. A secret in a workspace is found only with its workspace_id.');
191
+ /**
192
+ * What a left-out workspace_id means, said in the tool's schema: the local
193
+ * server started from a saved profile falls back to that profile's default
194
+ * workspace from `mandala workspaces use`. Every other session (an explicit
195
+ * or environment key, and every hosted one) keeps the words it always had.
196
+ */
197
+ function scopeDefault(session) {
198
+ const d = session.defaultWorkspace;
199
+ if (d === undefined)
200
+ return '';
201
+ const here = session.defaultWorkspaceUnreadable
202
+ ? 'unknown, because ~/.mandala/defaults.json cannot be read: list_secrets and get_secret use account-wide, and create_secret, set_secret, replace_secret and delete_secret refuse a call without workspace_id'
203
+ : d
204
+ ? `workspace ${d.name} (${d.id})`
205
+ : 'account-wide';
206
+ return ` Default when left out: the saved profile's workspace from \`mandala workspaces use\`, else account-wide — here ${here}.`;
207
+ }
193
208
  /** A secret's name as a tool argument, checked for what the platform would refuse. */
194
209
  const nameArg = z
195
210
  .string()
211
+ // Trimmed BEFORE the length check, as the platform trims it: a padded name
212
+ // that is 60 characters once trimmed is one the platform takes (OPL-5522).
213
+ .trim()
196
214
  .min(1, 'name must not be empty')
197
215
  .refine((v) => [...v].length <= SECRET_NAME_MAX_CHARS, {
198
216
  message: `name must be at most ${SECRET_NAME_MAX_CHARS} characters`,
@@ -253,6 +271,11 @@ function storeAdvice(err, change) {
253
271
  case 404:
254
272
  return 'no such secret in this scope. A secret in a workspace is found only with its workspace_id; list_secrets says which exist';
255
273
  case 409:
274
+ // The platform's word, where it says which of the two conflicts this was;
275
+ // this server's own sentence for it, never the platform's.
276
+ if (err.reason === 'name_taken' || err.reason === 'stale_revision') {
277
+ return `${reasonAdvice(err.reason)}. Nothing changed`;
278
+ }
256
279
  return change
257
280
  ? 'refused as a conflict and nothing changed: for a create, the name is taken in that scope; for a replace or delete, the revision_id is no longer the current one — get_secret for the current one, and send it again only if you still mean to'
258
281
  : 'refused as a conflict';
@@ -302,6 +325,21 @@ async function storeGuarded(what, change, value, fn) {
302
325
  return value === undefined ? result : withoutValue(result, value);
303
326
  }
304
327
  export const registerSecrets = (server, session) => {
328
+ // A left-out workspace_id: the saved profile's default, where there is one.
329
+ const scoped = (workspace_id) => workspace_id ?? session.defaultWorkspace?.id ?? undefined;
330
+ // A tool that writes, called without workspace_id while defaults.json cannot
331
+ // be read: the profile's default is unknown, and account-wide is the widest
332
+ // scope, where any computer on the account may be bound to what is stored.
333
+ // Refused before any request; the reading tools go on account-wide.
334
+ const unknownDefault = (workspace_id) => workspace_id === undefined && session.defaultWorkspaceUnreadable !== undefined
335
+ ? refused(`Nothing was sent: ~/.mandala/defaults.json cannot be read (${session.defaultWorkspaceUnreadable}), so the saved profile's default workspace is unknown and this would otherwise act account-wide. Pass workspace_id explicitly, or fix or delete the file and restart this server.`)
336
+ : undefined;
337
+ const byDefault = (workspace_id) => workspace_id === undefined && session.defaultWorkspace
338
+ ? " (the saved profile's default from mandala workspaces use)"
339
+ : '';
340
+ const scopeArg = (text) => workspaceArg.describe((text ??
341
+ 'The workspace the secret belongs to. Leave it out for an account-wide secret. A secret in a workspace is found only with its workspace_id.') +
342
+ scopeDefault(session));
305
343
  server.registerTool('get_computer_secrets', {
306
344
  title: "Read a computer's secret bindings",
307
345
  description: `Which of the account's secrets a computer is bound to: for each, the secret id, the revision last delivered, and where the guest finds it — an environment variable name, or a file under ${FILES_DIR}. Values are NEVER shown — no value crosses this route. Also answers \`version\`, the number to send to set_computer_secrets so it changes only this list (0 for a computer never bound). Any role may read it. The list is what the computer receives at its next start or restart, which a running computer may not have yet. ${LIVE_VALUES}`,
@@ -368,16 +406,19 @@ export const registerSecrets = (server, session) => {
368
406
  // because cleaning up what a task created is part of the task.
369
407
  server.registerTool('list_secrets', {
370
408
  title: "List the account's secrets",
371
- description: "The secrets stored on this account, in one scope: the account-wide ones by default, or one workspace's with workspace_id. For each: its name, its id (what set_computer_secrets binds), its current revision_id (what replace_secret and delete_secret need), its scope and when it was last delivered to a computer. Values are NEVER shown — no route returns one. Also says whether binding secrets to computers is switched on here, and the store's limits. Owners and members may read; a viewer is refused. An API key confined to a workspace lists that workspace's secrets, and naming another scope is refused.",
409
+ description: "The secrets stored on this account, in one scope: the account-wide ones by default, or one workspace's with workspace_id. For each: its name, its id (what set_computer_secrets binds), its current revision_id (what replace_secret and delete_secret need), its scope and when it was last delivered to a computer. Values are NEVER shown — no route returns one. Also says whether binding secrets to computers is switched on here, and the store's limits. Owners and members may read; a viewer is refused. An API key confined to a workspace lists that workspace's secrets, and naming another scope is refused." +
410
+ scopeDefault(session),
372
411
  inputSchema: {
373
- workspace_id: workspaceArg.describe('The workspace to list. Leave it out for the account-wide secrets.'),
412
+ workspace_id: scopeArg('The workspace to list. Leave it out for the account-wide secrets.'),
374
413
  },
375
414
  annotations: { readOnlyHint: true },
376
415
  }, ({ workspace_id }, extra) => storeGuarded('Listing the secrets', false, undefined, async () => {
416
+ const workspace = scoped(workspace_id);
377
417
  const list = await session.api
378
418
  .with(extra.signal)
379
- .secrets.list({ workspaceId: workspace_id });
380
- const scope = workspace_id === undefined ? 'account-wide' : `in workspace ${workspace_id}`;
419
+ .secrets.list({ workspaceId: workspace });
420
+ const scope = (workspace === undefined ? 'account-wide' : `in workspace ${workspace}`) +
421
+ byDefault(workspace_id);
381
422
  const delivery = list.delivery
382
423
  ? 'Binding secrets to computers is on.'
383
424
  : 'Binding secrets to computers is OFF on this platform: secrets can be stored, but set_computer_secrets and a create carrying secrets are refused.';
@@ -392,27 +433,30 @@ export const registerSecrets = (server, session) => {
392
433
  server.registerTool('get_secret', {
393
434
  title: 'Read one secret',
394
435
  description: "One secret's name, scope, current revision_id and when it was last delivered — never its value. Read it for the current revision_id after replace_secret or delete_secret is refused because the revision moved. A secret in a workspace is found only with its workspace_id; otherwise it is not found.",
395
- inputSchema: { secret_id: secretIdArg, workspace_id: workspaceArg },
436
+ inputSchema: { secret_id: secretIdArg, workspace_id: scopeArg() },
396
437
  annotations: { readOnlyHint: true },
397
438
  }, ({ secret_id, workspace_id }, extra) => storeGuarded(`Reading ${secret_id}`, false, undefined, async () => {
398
439
  const secret = await session.api
399
440
  .with(extra.signal)
400
- .secrets.get(secret_id, { workspaceId: workspace_id });
441
+ .secrets.get(secret_id, { workspaceId: scoped(workspace_id) });
401
442
  return said(`${secretLine(secret)} (values are never shown)`, secret);
402
443
  }));
403
444
  server.registerTool('create_secret', {
404
445
  title: 'Store a new secret',
405
- description: `Store a value under a name on this account, encrypted, for binding to computers with set_computer_secrets (or the secrets field of a create). The value is sent once and NEVER shown again: this answer, every other tool and every route give back only the name, id and revision. Do not put the value anywhere else — not in a command line, a file or a message — when a binding can deliver it. Owners only. A name is unique within its scope (up to ${SECRET_NAME_MAX_CHARS} characters, no control characters); a taken name is refused with 409. The account holds at most 100 secrets at once and may create at most 1000 over its lifetime — list_secrets reports both. Without workspace_id the secret is account-wide and any computer on the account may be bound to it. NOT safe to repeat blind: if the answer is lost, list_secrets before creating again, since the secret may exist.`,
446
+ description: `Store a value under a name on this account, encrypted, for binding to computers with set_computer_secrets (or the secrets field of a create). The value is sent once and NEVER shown again: this answer, every other tool and every route give back only the name, id and revision. Do not put the value anywhere else — not in a command line, a file or a message — when a binding can deliver it. Owners only. A name is unique within its scope (up to ${SECRET_NAME_MAX_CHARS} characters, no control characters); a taken name is refused with 409. The account holds at most 100 secrets at once and may create at most 1000 over its lifetime — list_secrets reports both. Without workspace_id the secret is account-wide and any computer on the account may be bound to it. NOT safe to repeat blind: if the answer is lost, list_secrets before creating again, since the secret may exist.${scopeDefault(session)}`,
406
447
  inputSchema: {
407
448
  name: nameArg,
408
449
  value: valueArg('The value'),
409
- workspace_id: workspaceArg.describe('The workspace it belongs to. Leave it out for an account-wide secret.'),
450
+ workspace_id: scopeArg('The workspace it belongs to. Leave it out for an account-wide secret.'),
410
451
  },
411
452
  annotations: { destructiveHint: false, idempotentHint: false },
412
453
  }, ({ name, value, workspace_id }, extra) => storeGuarded('Storing the secret', true, value, async () => {
454
+ const unknown = unknownDefault(workspace_id);
455
+ if (unknown)
456
+ return unknown;
413
457
  const secret = await session.api
414
458
  .with(extra.signal)
415
- .secrets.create({ name, value, workspaceId: workspace_id });
459
+ .secrets.create({ name, value, workspaceId: scoped(workspace_id) });
416
460
  return said(`Stored ${secret.name} as ${secret.id}, revision ${secret.revision_id}, ${secret.workspace_id === null ? 'account-wide' : `in workspace ${secret.workspace_id}`}. The value is not shown and cannot be read back. Bind it to a computer with set_computer_secrets.`, secret);
417
461
  }));
418
462
  server.registerTool('set_secret', {
@@ -421,21 +465,25 @@ export const registerSecrets = (server, session) => {
421
465
  inputSchema: {
422
466
  name: nameArg,
423
467
  value: valueArg('The value'),
424
- workspace_id: workspaceArg.describe('The scope to look in, and to create in. Leave it out for the account-wide secrets.'),
468
+ workspace_id: scopeArg('The scope to look in, and to create in. Leave it out for the account-wide secrets.'),
425
469
  },
426
470
  annotations: { destructiveHint: true, idempotentHint: false },
427
471
  }, ({ name, value, workspace_id }, extra) => storeGuarded(`Setting ${name.trim()}`, true, value, async () => {
472
+ const unknown = unknownDefault(workspace_id);
473
+ if (unknown)
474
+ return unknown;
428
475
  const store = session.api.with(extra.signal).secrets;
476
+ const workspace = scoped(workspace_id);
429
477
  for (let attempt = 0;; attempt++) {
430
- const found = namedSecret((await store.list({ workspaceId: workspace_id })).secrets, name);
478
+ const found = namedSecret((await store.list({ workspaceId: workspace })).secrets, name);
431
479
  try {
432
480
  const secret = found
433
481
  ? await store.replace(found.id, {
434
482
  value,
435
483
  revisionId: found.revision_id,
436
- workspaceId: workspace_id,
484
+ workspaceId: workspace,
437
485
  })
438
- : await store.create({ name: name.trim(), value, workspaceId: workspace_id });
486
+ : await store.create({ name: name.trim(), value, workspaceId: workspace });
439
487
  const scope = secret.workspace_id === null ? 'account-wide' : `in workspace ${secret.workspace_id}`;
440
488
  return said(found
441
489
  ? `Replaced the value of ${secret.name} (${secret.id}), ${scope}; it is now at revision ${secret.revision_id}. The value is not shown. Computers bound to it get it at their next start or restart, and a running one is sent it now on a best-effort basis.`
@@ -455,14 +503,17 @@ export const registerSecrets = (server, session) => {
455
503
  secret_id: secretIdArg,
456
504
  value: valueArg('The new value'),
457
505
  revision_id: revisionArg('A stale one is refused and nothing changes.'),
458
- workspace_id: workspaceArg,
506
+ workspace_id: scopeArg(),
459
507
  },
460
508
  annotations: { destructiveHint: true, idempotentHint: false },
461
509
  }, ({ secret_id, value, revision_id, workspace_id }, extra) => storeGuarded(`Replacing the value of ${secret_id}`, true, value, async () => {
510
+ const unknown = unknownDefault(workspace_id);
511
+ if (unknown)
512
+ return unknown;
462
513
  const secret = await session.api.with(extra.signal).secrets.replace(secret_id, {
463
514
  value,
464
515
  revisionId: revision_id,
465
- workspaceId: workspace_id,
516
+ workspaceId: scoped(workspace_id),
466
517
  });
467
518
  return said(`Replaced the value of ${secret.name} (${secret.id}); it is now at revision ${secret.revision_id}. The value is not shown. Computers bound to it get it at their next start or restart, and a running one is sent it now on a best-effort basis.`, secret);
468
519
  }));
@@ -472,22 +523,26 @@ export const registerSecrets = (server, session) => {
472
523
  inputSchema: {
473
524
  secret_id: secretIdArg,
474
525
  revision_id: revisionArg('Required; a stale one is refused and nothing is deleted.'),
475
- workspace_id: workspaceArg,
526
+ workspace_id: scopeArg(),
476
527
  confirm: z
477
528
  .literal(true)
478
529
  .describe('Must be true. A computer still bound to this secret cannot start again until that binding is removed.'),
479
530
  },
480
531
  annotations: { destructiveHint: true, idempotentHint: true },
481
532
  }, ({ secret_id, revision_id, workspace_id }, extra) => storeGuarded(`Deleting ${secret_id}`, true, undefined, async () => {
533
+ const unknown = unknownDefault(workspace_id);
534
+ if (unknown)
535
+ return unknown;
536
+ const workspace = scoped(workspace_id);
482
537
  try {
483
538
  await session.api
484
539
  .with(extra.signal)
485
- .secrets.delete(secret_id, { revisionId: revision_id, workspaceId: workspace_id });
540
+ .secrets.delete(secret_id, { revisionId: revision_id, workspaceId: workspace });
486
541
  }
487
542
  catch (err) {
488
543
  if (!(err instanceof NotFoundError))
489
544
  throw err;
490
- return refused(`Nothing was deleted: no secret ${secret_id} was found${workspace_id === undefined ? ' among the account-wide secrets' : ` in workspace ${workspace_id}`}. Either it was already deleted, or it is in a scope this did not name — list_secrets says which.`);
545
+ return refused(`Nothing was deleted: no secret ${secret_id} was found${workspace === undefined ? ' among the account-wide secrets' : ` in workspace ${workspace}${byDefault(workspace_id)}`}. Either it was already deleted, or it is in a scope this did not name — list_secrets says which.`);
491
546
  }
492
547
  return said(`Deleted ${secret_id}. Any computer still bound to it cannot start again until set_computer_secrets removes that binding.`);
493
548
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/tools/secrets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,QAAQ,GAGT,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,SAAS,GAAG,iCAAiC,CAAC;AAE3D,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,UAAU,GAAG,+BAA+B,CAAC;AACnD,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,MAAM,QAAQ,GACZ,mFAAmF,CAAC;AACtF,MAAM,SAAS,GACb,mFAAmF,CAAC;AAEtF,0EAA0E;AAC1E,MAAM,IAAI,GAAG,CAAC,CAAU,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAE9F,M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tools/snapshots.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA4M5C,eAAO,MAAM,iBAAiB,EAAE,SAq2B/B,CAAC"}
1
+ {"version":3,"file":"snapshots.d.ts","sourceRoot":"","sources":["../../src/tools/snapshots.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAoN5C,eAAO,MAAM,iBAAiB,EAAE,SA42B/B,CAAC"}
@@ -5,6 +5,12 @@ import { describe, guarded, incompleteWarning, json, operationClause, refused, s
5
5
  import * as P from '../paths.js';
6
6
  import { heartbeat, POLL_MS, pollDelay, sleep } from '../poll.js';
7
7
  import { buildIdempotencyKeyArg, keyedFailure } from './operations.js';
8
+ /**
9
+ * What a clone built from a disk does next: the platform leaves it building
10
+ * and then STOPPED, never booted (OPL-5437).
11
+ */
12
+ const DISK_BUILD_NEXT = 'ends its build STOPPED: once the build finishes (wait_for_operation on its operation), read get_computer and start it with start_computer.';
13
+ const DISK_BUILD = `A clone built from a disk comes back building and ${DISK_BUILD_NEXT}`;
8
14
  const idArg = {
9
15
  computer_id: z
10
16
  .string()
@@ -293,7 +299,7 @@ export const registerSnapshots = (server, session, opts) => {
293
299
  memory: z
294
300
  .boolean()
295
301
  .default(false)
296
- .describe('Include the running session. A memory snapshot is a saved machine, so it only loads back into the shape it came off: resize the computer afterwards and the restore is refused, because the vCPU count and the memory size are part of the state rather than decoration around it. Clone it with memory: false instead in that case, which restores the disk and boots fresh.'),
302
+ .describe('Include the running session. A memory snapshot is a saved machine, so it only loads back into the shape it came off: resize the computer afterwards and the restore is refused, because the vCPU count and the memory size are part of the state rather than decoration around it. Clone it with memory: false instead in that case, which builds a new computer from the disk alone; it ends its build stopped, to be started with start_computer.'),
297
303
  wait: z
298
304
  .boolean()
299
305
  .default(true)
@@ -611,14 +617,14 @@ export const registerSnapshots = (server, session, opts) => {
611
617
  return;
612
618
  server.registerTool('clone_snapshot', {
613
619
  title: 'Fork a snapshot into a new computer',
614
- description: 'Build a new computer from a snapshot, leaving the original untouched. This is the fork half of snapshot-and-fork, and the only thing that works on an orphaned snapshot. A MEMORY snapshot is resumed: the copy comes up running the captured session, and is given its own MAC, address, hostname, machine ID, SSH host keys and desktop password before its network comes up, so it runs beside its source; if that fails it is left stopped, and starting it cold-boots its disk. Pass memory: false to build it from the disk alone instead, as a fresh boot. A memory snapshot of a computer that held SECRETS is resumed only with inherit_secrets: true, and then the copy HOLDS THE SAME CREDENTIALS as the computer it came from; without it the clone is built from the disk and this tool says so.',
620
+ description: 'Build a new computer from a snapshot, leaving the original untouched. This is the fork half of snapshot-and-fork, and the only thing that works on an orphaned snapshot. A MEMORY snapshot is resumed: the copy comes up running the captured session, and is given its own MAC, address, hostname, machine ID, SSH host keys and desktop password before its network comes up, so it runs beside its source; if that fails it is left stopped, and starting it cold-boots its disk. Pass memory: false to build it from the disk alone instead. A clone built from a DISK — a disk snapshot, memory: false, or a memory snapshot the platform did not resume — comes back building and ends its build STOPPED: start it with start_computer once the build finishes (wait_for_operation on its operation). A memory snapshot of a computer that held SECRETS is resumed only with inherit_secrets: true, and then the copy HOLDS THE SAME CREDENTIALS as the computer it came from; without it the clone is built from the disk and this tool says so.',
615
621
  inputSchema: {
616
622
  snapshot_id: z.string(),
617
623
  name: z.string().optional().describe('A name for the new computer.'),
618
624
  memory: z
619
625
  .boolean()
620
626
  .optional()
621
- .describe('Memory snapshots only. false builds the new computer from the disk alone and boots it fresh; omitted or true resumes the captured session.'),
627
+ .describe('Memory snapshots only. false builds the new computer from the disk alone, and it ends its build stopped, to be started with start_computer; omitted or true resumes the captured session.'),
622
628
  inherit_secrets: z
623
629
  .boolean()
624
630
  .optional()
@@ -660,14 +666,14 @@ export const registerSnapshots = (server, session, opts) => {
660
666
  session.bind(c.id, c.resolution);
661
667
  // The platform built it from the disk when the session could not come
662
668
  // across (platform OPL-4964). Said first and in words, because a model
663
- // that asked for a live fork and got a fresh boot would otherwise go on
669
+ // that asked for a live fork and got a disk build would otherwise go on
664
670
  // as if the session — its open windows, its running programs — were
665
- // there.
671
+ // there. A disk build ends STOPPED, not booted (OPL-5437).
666
672
  //
667
673
  // Read off the ANSWER as well as the computer: the platform sends the
668
674
  // two fields beside the computer's own, flat, and unwrapComputer keeps
669
675
  // only start_error from an envelope — so a future envelope carrying
670
- // them would otherwise report a live fork for a fresh boot.
676
+ // them would otherwise report a live fork for a disk build.
671
677
  const outer = (answer && typeof answer === 'object' ? answer : {});
672
678
  const raw = { ...c, ...outer };
673
679
  if (raw.memory_dropped === true) {
@@ -682,9 +688,16 @@ export const registerSnapshots = (server, session, opts) => {
682
688
  ? // An open set: a word this version does not know is shown as sent.
683
689
  `the platform did not resume it (reason given: "${raw.memory_dropped_reason.trim().slice(0, 200)}")`
684
690
  : 'the platform did not resume it';
685
- return said(`Built ${describe(c)} from ${snapshot_id}'s DISK, booting fresh — its saved session was NOT resumed, because ${why}. No secrets are bound to it${select && c.id ? '. It is selected' : ''}.`, withoutCredentials(c));
691
+ return said(`Built ${describe(c)} from ${snapshot_id}'s DISK — its saved session was NOT resumed, because ${why}. ${DISK_BUILD} No secrets are bound to it${select && c.id ? '. It is selected' : ''}.`, withoutCredentials(c));
686
692
  }
687
- return said(`${memory === false ? 'Built' : 'Forked'} ${snapshot_id} into ${describe(c)}${memory === false ? ' from its disk' : ''}${select && c.id ? ', and selected it' : ''}${operationClause(c)}.`, withoutCredentials(c));
693
+ // 'Built' either way: nothing in the answer says a memory fork resumed
694
+ // (it comes back building like any other clone), and a plain disk
695
+ // snapshot's clone, which this tool cannot tell from a memory one
696
+ // without another read, ends its build stopped (OPL-5437).
697
+ return said(`Built ${snapshot_id} into ${describe(c)}${memory === false ? ' from its disk' : ''}${select && c.id ? ', and selected it' : ''}${operationClause(c)}. ` +
698
+ (memory === false
699
+ ? DISK_BUILD
700
+ : `If ${snapshot_id} is a memory snapshot the copy resumes its captured session when the build finishes; if it is a disk snapshot, the copy ${DISK_BUILD_NEXT}`), withoutCredentials(c));
688
701
  }));
689
702
  server.registerTool('delete_snapshot', {
690
703
  title: 'Delete a snapshot',