mandala-computer-mcp 0.1.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 (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +544 -0
  3. package/dist/api.d.ts +186 -0
  4. package/dist/api.d.ts.map +1 -0
  5. package/dist/api.js +932 -0
  6. package/dist/api.js.map +1 -0
  7. package/dist/cli.d.ts +55 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +292 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/errors.d.ts +560 -0
  12. package/dist/errors.d.ts.map +1 -0
  13. package/dist/errors.js +873 -0
  14. package/dist/errors.js.map +1 -0
  15. package/dist/events.d.ts +406 -0
  16. package/dist/events.d.ts.map +1 -0
  17. package/dist/events.js +1679 -0
  18. package/dist/events.js.map +1 -0
  19. package/dist/format.d.ts +125 -0
  20. package/dist/format.d.ts.map +1 -0
  21. package/dist/format.js +180 -0
  22. package/dist/format.js.map +1 -0
  23. package/dist/http.d.ts +46 -0
  24. package/dist/http.d.ts.map +1 -0
  25. package/dist/http.js +792 -0
  26. package/dist/http.js.map +1 -0
  27. package/dist/index.d.ts +13 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +12 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/paths.d.ts +394 -0
  32. package/dist/paths.d.ts.map +1 -0
  33. package/dist/paths.js +677 -0
  34. package/dist/paths.js.map +1 -0
  35. package/dist/server.d.ts +18 -0
  36. package/dist/server.d.ts.map +1 -0
  37. package/dist/server.js +97 -0
  38. package/dist/server.js.map +1 -0
  39. package/dist/session.d.ts +78 -0
  40. package/dist/session.d.ts.map +1 -0
  41. package/dist/session.js +166 -0
  42. package/dist/session.js.map +1 -0
  43. package/dist/stdio.d.ts +11 -0
  44. package/dist/stdio.d.ts.map +1 -0
  45. package/dist/stdio.js +43 -0
  46. package/dist/stdio.js.map +1 -0
  47. package/dist/tools/agent.d.ts +16 -0
  48. package/dist/tools/agent.d.ts.map +1 -0
  49. package/dist/tools/agent.js +147 -0
  50. package/dist/tools/agent.js.map +1 -0
  51. package/dist/tools/computers.d.ts +3 -0
  52. package/dist/tools/computers.d.ts.map +1 -0
  53. package/dist/tools/computers.js +1037 -0
  54. package/dist/tools/computers.js.map +1 -0
  55. package/dist/tools/events.d.ts +3 -0
  56. package/dist/tools/events.d.ts.map +1 -0
  57. package/dist/tools/events.js +1077 -0
  58. package/dist/tools/events.js.map +1 -0
  59. package/dist/tools/guest.d.ts +3 -0
  60. package/dist/tools/guest.d.ts.map +1 -0
  61. package/dist/tools/guest.js +761 -0
  62. package/dist/tools/guest.js.map +1 -0
  63. package/dist/tools/input.d.ts +3 -0
  64. package/dist/tools/input.d.ts.map +1 -0
  65. package/dist/tools/input.js +240 -0
  66. package/dist/tools/input.js.map +1 -0
  67. package/dist/tools/snapshots.d.ts +3 -0
  68. package/dist/tools/snapshots.d.ts.map +1 -0
  69. package/dist/tools/snapshots.js +333 -0
  70. package/dist/tools/snapshots.js.map +1 -0
  71. package/dist/tools/templates.d.ts +3 -0
  72. package/dist/tools/templates.d.ts.map +1 -0
  73. package/dist/tools/templates.js +492 -0
  74. package/dist/tools/templates.js.map +1 -0
  75. package/dist/tools/types.d.ts +18 -0
  76. package/dist/tools/types.d.ts.map +1 -0
  77. package/dist/tools/types.js +2 -0
  78. package/dist/tools/types.js.map +1 -0
  79. package/dist/tools/webhooks.d.ts +3 -0
  80. package/dist/tools/webhooks.d.ts.map +1 -0
  81. package/dist/tools/webhooks.js +260 -0
  82. package/dist/tools/webhooks.js.map +1 -0
  83. package/package.json +59 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtE,O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AY,EACZ,OAAe,EACf,KAAY,IAAI,EAChB,EAAE;IACF,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5E,CAAC,CAAC;AACF,MAAM,UAAU,GAAG,CAAC,GAAa,EAAE,CAAS,EAAE,KAAY,IAAI,EAAE,EAAE,CAChE,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACpC,MAAM,YAAY,GAAG,CAAC,GAAa,EAAE,CAAS,EAAE,KAAY,IAAI,EAAE,EAAE,CAClE,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACpC,MAAM,QAAQ,GAAG,CAAC,GAAa,EAAE,CAAS,EAAE,KAAY,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACnG,MAAM,WAAW,GAAG,CAAC,GAAa,EAAE,CAAS,EAAE,KAAY,IAAI,EAAE,EAAE,CACjE,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The library face of this package, for embedding the server rather than
3
+ * spawning it — a host application that already knows who the user is can build
4
+ * a server on their key without going through the CLI.
5
+ */
6
+ export { Api, DEFAULT_BASE_URL, MODEL_KEY_HEADER } from './api.js';
7
+ export { APIError, AuthenticationError, CancelledError, ConflictError, ConnectivityError, ConnectivityInterruptedError, GatewayTimeoutError, isTransient, MandalaError, MoveRequiredError, NotFoundError, OriginResponseError, OriginTLSError, OriginUnreachableError, PermissionDeniedError, PlanLimitError, RangeNotSatisfiableError, RateLimitError, UnavailableError, } from './errors.js';
8
+ export { type HttpConfig, runHttp } from './http.js';
9
+ export { createServer, SERVER_NAME, SERVER_VERSION, type ServerConfig } from './server.js';
10
+ export { Session, type SessionConfig } from './session.js';
11
+ export { runStdio } from './stdio.js';
12
+ export type { ToolOptions } from './tools/types.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The library face of this package, for embedding the server rather than
3
+ * spawning it — a host application that already knows who the user is can build
4
+ * a server on their key without going through the CLI.
5
+ */
6
+ export { Api, DEFAULT_BASE_URL, MODEL_KEY_HEADER } from './api.js';
7
+ export { APIError, AuthenticationError, CancelledError, ConflictError, ConnectivityError, ConnectivityInterruptedError, GatewayTimeoutError, isTransient, MandalaError, MoveRequiredError, NotFoundError, OriginResponseError, OriginTLSError, OriginUnreachableError, PermissionDeniedError, PlanLimitError, RangeNotSatisfiableError, RateLimitError, UnavailableError, } from './errors.js';
8
+ export { runHttp } from './http.js';
9
+ export { createServer, SERVER_NAME, SERVER_VERSION } from './server.js';
10
+ export { Session } from './session.js';
11
+ export { runStdio } from './stdio.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAmB,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAqB,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAsB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,394 @@
1
+ /**
2
+ * Every path this server can reach, and every body it can send.
3
+ *
4
+ * Built in one place for the reason mandala-computer-python builds them in one
5
+ * place: the surface test pins what this server calls against the platform's
6
+ * `V1_ROUTES` allowlist, and a URL assembled at a call site is a URL that test
7
+ * cannot see. Anything absent from the allowlist is a 404 in a user's hands
8
+ * rather than a failure here.
9
+ */
10
+ export declare const TEMPLATES = "templates";
11
+ /** The JSON Schema for a `mandala/v1` document (platform OPL-3568). */
12
+ export declare const TEMPLATE_SCHEMA = "templates/schema";
13
+ /** Check a document without publishing it. Side-effect free, and claims no ref. */
14
+ export declare const TEMPLATE_VALIDATE = "templates/validate";
15
+ /**
16
+ * Every build this account has started (platform OPL-3791).
17
+ *
18
+ * A collection, like {@link MOVES} and for the same reason: a build is a job
19
+ * rather than a property of a computer, and it outlives the request that
20
+ * started it.
21
+ */
22
+ export declare const BUILDS = "builds";
23
+ export declare const SIZES = "sizes";
24
+ export declare const COMPUTERS = "computers";
25
+ export declare const SNAPSHOTS = "snapshots";
26
+ /**
27
+ * Every move on the account, live and recently finished (OPL-3766).
28
+ *
29
+ * A collection and not `computers/:id/move`, which is the platform's own
30
+ * decision and worth knowing here: a per-computer read could not tell a computer
31
+ * with no move from an id that does not exist, so there is no such route. The
32
+ * poll filters this by `computer_id`.
33
+ */
34
+ export declare const MOVES = "moves";
35
+ /** What the account has used, over a window. Account-scoped, like {@link MOVES}. */
36
+ export declare const USAGE = "usage";
37
+ /**
38
+ * How long automatic snapshots are kept — the plan's retention window.
39
+ *
40
+ * Account-scoped like {@link USAGE} and {@link MOVES}, and answered by the
41
+ * control plane rather than by a hypervisor, so it cannot come back short the
42
+ * way a fleet listing can. Read-only: the plan owns retention, and there is no
43
+ * write on any surface.
44
+ */
45
+ export declare const RETENTION = "retention";
46
+ /**
47
+ * The account's webhook subscriptions (platform OPL-4300; OPL-4306 here).
48
+ *
49
+ * Account-scoped like {@link USAGE}: a subscription receives events from many
50
+ * computers, so it belongs to the account and not to any of them. Answered by
51
+ * the control plane from its own tables, never by a hypervisor.
52
+ */
53
+ export declare const WEBHOOKS = "webhooks";
54
+ /** The window to ask about, or undefined for the account's billing period. */
55
+ export declare function usageQuery(from?: string, to?: string): Record<string, string> | undefined;
56
+ export declare const computer: (id: string) => string;
57
+ /**
58
+ * start | stop | suspend | restart | clone | screenshot | input | exec |
59
+ * windows | files | snapshots | schedule | agent
60
+ */
61
+ export declare const computerAction: (id: string, action: string) => string;
62
+ /** A background command's guest pid (OPL-3584). */
63
+ export declare const execHandle: (id: string, pid: number) => string;
64
+ /** One window on the desktop (OPL-3583). The id is `0x2600003`-shaped. */
65
+ export declare const window_: (id: string, windowId: string) => string;
66
+ /**
67
+ * One published template, by the two halves of its ref (platform OPL-3789).
68
+ *
69
+ * Two segments and not one, because that is the shape of the route: the
70
+ * platform reduces `templates/<a>/<b>` to `templates/:namespace/:name`, so a
71
+ * ref handed over whole — `acc-1/devbox@1.0.0` — would be percent-encoded into
72
+ * one segment and reach a route that does not exist. The version is a QUERY
73
+ * parameter on this path, not part of it; see {@link templateVersionQuery}.
74
+ */
75
+ export declare const templateRef: (namespace: string, name: string) => string;
76
+ /**
77
+ * The `version` query parameter, refused when it is not a version.
78
+ *
79
+ * Absence and emptiness have to be different things here, and a model is the
80
+ * caller most likely to conflate them. The platform answers 400 for a version
81
+ * that is empty or malformed rather than defaulting, and that refusal exists
82
+ * because of a real defect: `?version=` read as "no version was named" and
83
+ * retired an entire template, irreversibly.
84
+ *
85
+ * This server cannot send that. `undefined` omits the parameter — which on a
86
+ * retire means EVERY version — and anything else has to be a version. A model
87
+ * that passes an empty string is told what a version looks like, before
88
+ * anything is deleted.
89
+ */
90
+ export declare function templateVersionQuery(version?: string): Record<string, string>;
91
+ /**
92
+ * The document a publish, a validate or a build sends.
93
+ *
94
+ * Raw bytes, not a JSON envelope: the platform reads JSON or YAML off the body
95
+ * itself, so a wrapper would be a document the validator never sees — and one
96
+ * that parses, so the failure would be a complaint about the wrapper's fields.
97
+ */
98
+ export declare function templateDocument(document: string): Uint8Array;
99
+ export declare const build: (id: string) => string;
100
+ /** progress | events */
101
+ export declare const buildAction: (id: string, action: string) => string;
102
+ /**
103
+ * `no_reuse`, sent only when it is asked for.
104
+ *
105
+ * Omitted rather than sent as `false`, and the reason is the documented schema
106
+ * rather than a claim about the parser: lib/apidoc gives this parameter
107
+ * `enum: ['true']`, so `true` is the only value the reference admits.
108
+ *
109
+ * This said the platform reads the key's PRESENCE, which is false —
110
+ * server/buildjob.go reads `Get("no_reuse") == "true"`. The request was right
111
+ * either way; the stated reason was not (/code-review, OPL-3835).
112
+ */
113
+ export declare const buildQuery: (noReuse?: boolean) => Record<string, string>;
114
+ export declare const snapshot: (id: string) => string;
115
+ /** restore | clone */
116
+ export declare const snapshotAction: (id: string, action: string) => string;
117
+ type Json = Record<string, unknown>;
118
+ /** Drop the keys a caller did not set, rather than sending them as null.
119
+ *
120
+ * Omission is meaningful on create: the platform applies the template's
121
+ * defaults only where a key is absent, so an explicit null overrides a good
122
+ * default with nothing.
123
+ */
124
+ export declare function omitUndefined(body: Json): Json;
125
+ export declare function createBody(args: {
126
+ name?: string;
127
+ size?: string;
128
+ template?: string;
129
+ cpu?: number;
130
+ ram_mb?: number;
131
+ disk_gb?: number;
132
+ resolution?: string;
133
+ start?: boolean;
134
+ }): Json;
135
+ /**
136
+ * The shell command that puts a URL on the guest's screen.
137
+ *
138
+ * The browser is named rather than asked for, and the reasoning is the platform
139
+ * SDK's: Firefox by name, not `xdg-open` or one of the other portable wrappers.
140
+ * Naming it keeps the choice in one place — this function is the only thing that
141
+ * decides which browser the guest opens, so a change of image, or of which
142
+ * browser we want, is a change here rather than in every prompt that ever asked
143
+ * for a browser.
144
+ */
145
+ export declare function openUrlCommand(url: string): string;
146
+ /** POSIX single-quoting: the only characters that survive are the ones inside. */
147
+ export declare function shellQuote(s: string): string;
148
+ export declare function execBody(args: {
149
+ command: string;
150
+ timeout_s?: number;
151
+ desktop?: boolean;
152
+ background?: boolean;
153
+ cwd?: string;
154
+ env?: Record<string, string>;
155
+ }): Json;
156
+ /**
157
+ * The environment for one command, refused here rather than at the platform.
158
+ *
159
+ * An empty object is dropped rather than sent, for the reason `desktop` is
160
+ * dropped: `execEnvList` returns nil for `len(env) == 0`, so an empty object and
161
+ * an absent one are already the same request, and the one that says so in fewer
162
+ * fields is the one worth sending.
163
+ *
164
+ * The three rules below are checked in this process because the platform checks
165
+ * them AFTER it has resumed the computer. `POST computers/:id/exec` runs its
166
+ * `use` — which wakes a suspended guest and bills the resume — before `Exec`
167
+ * ever looks at the environment, so a malformed name costs a machine coming up
168
+ * to be told no. They are also the rules that will not drift: they are what an
169
+ * entry IS in the list the guest agent takes, `NAME=value` strings separated by
170
+ * NULs, rather than policy. The ceilings on how many entries and how long one
171
+ * may be (64 and 4096 bytes, execbg.go) are policy, are the platform's to
172
+ * change, and are deliberately not repeated here.
173
+ *
174
+ * The `=` case is the one a model actually gets wrong. `{'FOO=bar': ''}` is the
175
+ * assignment written into the name, which is the same mistake as writing the
176
+ * assignment into the command line — so the refusal says the shape rather than
177
+ * just the rule.
178
+ */
179
+ export declare function execEnv(env?: Record<string, string>): Json | undefined;
180
+ export declare const MODIFIER_JOIN = "+";
181
+ export declare function pointerBody(action: string, x: number, y: number): Json;
182
+ /**
183
+ * A click, optionally at a point and optionally with keys held down.
184
+ *
185
+ * No coordinate means "where the pointer already is", which is a real and
186
+ * different request from clicking (0, 0) — the corner of the screen. So the
187
+ * keys are omitted rather than sent as zeros; the platform carries that
188
+ * distinction all the way down to `inputWire` in server/input.go.
189
+ */
190
+ export declare function clickBody(action: string, x: number | undefined, y: number | undefined, modifiers?: string[]): Json;
191
+ /**
192
+ * A press, a move and a release — one gesture, not two clicks.
193
+ *
194
+ * Half an origin is refused here rather than dropped. A drag naming only
195
+ * `from_x` reads as a caller who meant to give a starting point, and silently
196
+ * ignoring the half they gave produces a drag that succeeds while selecting a
197
+ * different region: the worst shape a mistake can take, because nothing reports
198
+ * it.
199
+ */
200
+ export declare function dragBody(toX: number, toY: number, fromX?: number, fromY?: number): Json;
201
+ export declare function buttonBody(action: string, x?: number, y?: number): Json;
202
+ export declare const SCROLL_DIRECTIONS: readonly ["up", "down", "left", "right"];
203
+ export type ScrollDirection = (typeof SCROLL_DIRECTIONS)[number];
204
+ /**
205
+ * A wheel scroll, optionally at a point and optionally with keys held.
206
+ *
207
+ * `coordinate` and not the flat pair, and that is not a style choice. The
208
+ * platform reads a flat `x:0, y:0` on a scroll as "no position" — it has to,
209
+ * because that is what every defaulted scroll sent before the keys became
210
+ * optional — so a caller who genuinely means the top-left corner cannot say so
211
+ * that way. `coordinate` has no such history.
212
+ */
213
+ export declare function scrollBody(args: {
214
+ direction: ScrollDirection;
215
+ amount: number;
216
+ x?: number;
217
+ y?: number;
218
+ modifiers?: string[];
219
+ }): Json;
220
+ /**
221
+ * Text typed at the keyboard, checked the way the clipboard's is.
222
+ *
223
+ * The same silent corruption {@link clipboardBody} refuses and `write_file`
224
+ * refuses, on the third path that carries a caller's own characters into the
225
+ * guest: `JSON.stringify` escapes a lone surrogate and Go's `encoding/json`
226
+ * decodes it to U+FFFD.
227
+ *
228
+ * What happens NEXT is this route's own, and it is worth stating precisely
229
+ * rather than borrowing the clipboard's sentence. The platform's `type` handler
230
+ * walks runes and looks each one up in `charKeys` — a printable-ASCII map — and
231
+ * `continue`s past anything it does not find (server/input.go). So the
232
+ * replacement character is not typed onto the desktop; it is DROPPED, and the
233
+ * tool goes on to report `Typed N character(s).` counting the character that
234
+ * never arrived. Either way the screen does not hold what the caller asked for
235
+ * and the answer says it does, which is the thing worth refusing. NOT extended
236
+ * to a NUL for the same reason: the platform skips an unmappable rune rather
237
+ * than truncating the string at it, so a NUL is no more special there than any
238
+ * other unmappable character, and singling it out would be a rule about one
239
+ * codepoint dressed as a rule about corruption (/code-review, OPL-4244).
240
+ */
241
+ export declare function typeBody(text: string): Json;
242
+ export declare function keyBody(keys: string[], holdSeconds?: number): Json;
243
+ /**
244
+ * A pause inside the guest.
245
+ *
246
+ * Capped at 30 seconds by the platform, and asking for longer is refused rather
247
+ * than truncated — a wait here is a held HTTP request crossing a reverse proxy,
248
+ * and 100 seconds would not return, it would fail. The cap is checked here too
249
+ * so a model learns the limit from the tool's own error instead of spending a
250
+ * round trip on it.
251
+ */
252
+ export declare function waitBody(seconds: number): Json;
253
+ export declare const cursorBody: () => Json;
254
+ export declare const WINDOW_ACTIONS: readonly ["focus", "raise", "minimize", "maximize", "unmaximize", "close", "move", "resize"];
255
+ export type WindowAction = (typeof WINDOW_ACTIONS)[number];
256
+ /**
257
+ * The body for a window action, with the arguments that action needs.
258
+ *
259
+ * Checked here for the reason `wholePoint` is: the window manager places the
260
+ * frame where it likes and applications snap to their own grid, so a move that
261
+ * arrived with half a coordinate does not come back looking wrong — it comes
262
+ * back looking like the window manager's usual approximation. A `resize` with
263
+ * neither dimension is the same shape of failure, one the platform would have
264
+ * to guess its way out of.
265
+ */
266
+ export declare function windowBody(args: {
267
+ action: WindowAction;
268
+ x?: number;
269
+ y?: number;
270
+ width?: number;
271
+ height?: number;
272
+ }): Json;
273
+ /**
274
+ * The most text `PUT /computers/{id}/clipboard` carries INTO a guest, in bytes.
275
+ *
276
+ * Mirrored so a request that can only fail is not made. NOT machine-checked —
277
+ * `scripts/check-surface.mjs` reads the platform's `web/lib`, and this number
278
+ * lives in its `server/clipboard.go` as `clipboardWriteMax`. It is not
279
+ * arbitrary: the platform puts the text inside one argument of one command,
280
+ * Linux caps a single argv string at 128 KiB, and two layers of base64 stand
281
+ * between the text and that ceiling, so each byte costs about 1.8 of it. Past
282
+ * the cap `execve` fails with E2BIG rather than truncating.
283
+ *
284
+ * The READ cap is 128 KiB, a different bound on a different channel, and is
285
+ * deliberately not mirrored: nothing here can meet it, since that text comes
286
+ * from the guest.
287
+ */
288
+ export declare const MAX_CLIPBOARD_BYTES: number;
289
+ /**
290
+ * Whether a string carries half a character.
291
+ *
292
+ * Its own predicate because there is more than one way into this failure and
293
+ * they do not share a refusal sentence. The clipboard's says "on the desktop";
294
+ * `write_file` puts the same broken byte into a file on a disk. What they DO
295
+ * share is the check, and that is the part worth having in one place — a second
296
+ * hand-rolled surrogate walk is a second chance to get the pairing backwards.
297
+ *
298
+ * Walked in UTF-16 code units, because that is what the flaw is made of: a high
299
+ * surrogate is legal where a low one follows it and is half a character
300
+ * anywhere else. `for...of` would not do — it yields the lone surrogate as a
301
+ * string and hides which half it was.
302
+ */
303
+ export declare function hasUnpairedSurrogate(text: string): boolean;
304
+ /**
305
+ * The body for a clipboard write, checked before it costs a round trip.
306
+ *
307
+ * Two of these refusals are the platform's own, mirrored so a call that can only
308
+ * fail is not spent. The NUL is the one worth explaining: the platform confirms
309
+ * a write by reading the selection back through a command substitution, and a
310
+ * shell truncates that at the first NUL — so the write would land, the read-back
311
+ * would disagree, and the answer would be a 409 inviting a retry at something
312
+ * that had already worked.
313
+ *
314
+ * The UNPAIRED SURROGATE is not the platform's, and that is exactly why it is
315
+ * here. Nothing refuses it anywhere on the path: `JSON.stringify` escapes the
316
+ * lone code unit, Go's `encoding/json` decodes it to U+FFFD, and the desktop
317
+ * ends up holding a replacement character where a caller's text was. A write
318
+ * that succeeds with different text than was asked for is worse than one that
319
+ * fails, and this is the last place that can tell the difference — `TextEncoder`
320
+ * below has already made the substitution, which is why the scan runs before it.
321
+ * The other two clients refuse it too (mandala-computer-typescript's
322
+ * `clipboardBody`, and mandala-computer-python, where `str.encode` raises).
323
+ *
324
+ * The cap is counted in UTF-8 BYTES rather than characters. An emoji is four of
325
+ * them, so a `text.length` check would pass four times the legal payload to an
326
+ * execve that answers E2BIG.
327
+ */
328
+ export declare function clipboardBody(text: string): Json;
329
+ /**
330
+ * The body for a capture: what to include, and what to call it.
331
+ *
332
+ * An args object rather than the bare boolean it was, matching `createBody` and
333
+ * `execBody` next to it — `memory` was never going to be the only thing this
334
+ * route took, and a second positional boolean is the kind of call site nobody
335
+ * reads correctly.
336
+ *
337
+ * A name that is only whitespace is dropped rather than sent, and that is the
338
+ * one case worth spelling out. The daemon defaults an EMPTY name to
339
+ * "<computer> <timestamp>" and stores anything else exactly as it arrives (see
340
+ * `newSnapMeta` in the platform's server/snapshot.go), so " " is the single
341
+ * input that produces a snapshot nobody can pick out of a list — a blank row
342
+ * where the generated name it displaced would have said something.
343
+ */
344
+ export declare function snapshotBody(args: {
345
+ memory: boolean;
346
+ name?: string;
347
+ }): Json;
348
+ export declare function scheduleBody(args: {
349
+ enabled: boolean;
350
+ hour: number;
351
+ minute?: number;
352
+ tz?: string;
353
+ }): Json;
354
+ export declare function agentBody(args: {
355
+ prompt: string;
356
+ max_steps?: number;
357
+ system?: string;
358
+ stream: boolean;
359
+ }): Json;
360
+ /** One webhook subscription. The id is `whk-`-shaped. */
361
+ export declare const webhook: (id: string) => string;
362
+ /** rotate | test | deliveries */
363
+ export declare const webhookAction: (id: string, action: string) => string;
364
+ /** The platform's own caps (`DESCRIPTION_MAX`, `COMPUTERS_MAX` in its lib/webhooks). */
365
+ export declare const WEBHOOK_DESCRIPTION_MAX = 200;
366
+ export declare const WEBHOOK_COMPUTERS_MAX = 64;
367
+ /**
368
+ * The body for a webhook create or update — the fields, checked before they
369
+ * cost a round trip.
370
+ *
371
+ * Three of the platform's refusals are mirrored here, because each is a call
372
+ * that can only fail: a url that is not `https:` or carries a username or
373
+ * password, a description over the cap, and a `computers` filter over its cap.
374
+ * The one that is NOT mirrored is the address check — that the hostname resolves
375
+ * to a public address — because it is a DNS answer the platform gets at create
376
+ * time, and a guess made here would be wrong in both directions.
377
+ *
378
+ * `events` and `computers` are de-duplicated rather than refused for repeats,
379
+ * the way the platform stores them. The event vocabulary is not checked at all:
380
+ * the platform refuses an unknown type with a 400 that lists the current ones,
381
+ * and a list held here would refuse a type it had started accepting.
382
+ *
383
+ * Undefined fields are dropped. On an update that is what "leave it as it is"
384
+ * means, and on a create it is what lets the platform apply its defaults.
385
+ */
386
+ export declare function webhookBody(args: {
387
+ url?: string;
388
+ description?: string;
389
+ events?: string[];
390
+ computers?: string[];
391
+ enabled?: boolean;
392
+ }): Json;
393
+ export {};
394
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,uEAAu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