slatebox-mcp 0.3.4 → 0.4.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.
@@ -150,17 +150,66 @@ declare namespace slatebox.agentTasks {
150
150
  }) & { mode: "save" | "preview" }>;
151
151
  }
152
152
 
153
+ declare namespace slatebox.ai.audit {
154
+ /** AI control changes. Lists changes to the agent configuration, newest first: AI control changes and ai.update (connections and feature choices at any level). Each row has who (account and the name of the person, or "a deleted account"; person or agent, token, and via ddp, http or exec), the action, what it changed, the reason, before and after (keys only as fingerprints), and whether it was refused. Filter by action (exact, or a prefix ending in a dot such as ai.control.), kind, id, userId, outcome and time; pass next as before for the next page. Administrators only. @scope ai:admin:read */
155
+ function list(input: {
156
+ /** (1 to 200) */
157
+ limit?: number;
158
+ before?: string;
159
+ since?: string;
160
+ action?: string;
161
+ kind?: string;
162
+ id?: string;
163
+ userId?: string;
164
+ outcome?: "ok" | "refused";
165
+ }): Promise<{
166
+ rows?: Array<Record<string, unknown>>;
167
+ next?: string | null;
168
+ [key: string]: unknown;
169
+ }>;
170
+ }
171
+
172
+ declare namespace slatebox.ai.bindings {
173
+ /** AI bindings. Lists every part of Slatebox that can be bound, with its choice (a model, use the default, or turned off) and what it resolves to now (provider, model and where that comes from). Administrators only. @scope ai:admin:read */
174
+ function list(input: Record<string, unknown>): Promise<{
175
+ generation?: number;
176
+ surfaces?: Array<Record<string, unknown>>;
177
+ skipped?: Array<Record<string, unknown>>;
178
+ [key: string]: unknown;
179
+ }>;
180
+ }
181
+
182
+ declare namespace slatebox.ai.bindings {
183
+ /** Set AI bindings. Sets which model each named part of Slatebox uses: use model (a model id from the Models list, <provider>:<model>), default (the default model), or off (that part answers "turned off by your administrator"). A model that cannot do what the part needs is refused. Only the rows that change are written, each with its own line in the change history; note is optional. Every server picks it up within seconds. Administrators only. @scope ai:admin @confirm @idempotent */
184
+ function set(input: {
185
+ /** (1–14 items) */
186
+ changes: Array<{
187
+ /** The part of Slatebox, for example shape or agent.slatebox; default is everything not set. */
188
+ surface: "default" | "chat" | "chat.route" | "generation" | "presentation" | "vision" | "images" | "shape" | "workshop" | "workshop.draft" | "canvas" | "agent.slatebox" | "library" | "connectors";
189
+ use: "default" | "model" | "off";
190
+ /** With use model: <provider>:<model>. (at most 260 characters) */
191
+ model?: string;
192
+ }>;
193
+ /** Optional, kept in the change history. (at most 500 characters) */
194
+ note?: string;
195
+ }): Promise<({
196
+ changed?: string[];
197
+ generation?: number | null;
198
+ [key: string]: unknown;
199
+ }) & { mode: "save" }>;
200
+ }
201
+
153
202
  declare namespace slatebox.ai {
154
- /** Test AI. Tests a saved connection (name) or one not yet saved (connection): whether Slatebox can reach it, whether it accepts the key, which models it lists where it lists them, whether the model answers and whether it calls tools (which conversation, drafts and presentations need). Saves nothing. A saved key is only sent to the address it was saved for. A token needs ai:admin as well for level team or server. On a self-hosted server a model on the host is at host.docker.internal, not localhost. @scope ai:settings @openWorld @idempotent */
203
+ /** Test AI. Tests your own or your team's saved connection (name) or one not yet saved (connection), on a self-hosted server: whether Slatebox can reach it, whether it accepts the key, which models it lists, whether the model answers and whether it calls tools (which conversation, drafts and presentations need). Saves nothing. A saved key is only sent to the address it was saved for. A token needs ai:admin as well for level team. The server's keys are tested with ai.keys.test. A model on the host is at host.docker.internal, not localhost. @scope ai:settings @openWorld @idempotent */
155
204
  function check(input: {
156
- /** me (yours), team (team admins) or server (administrators). */
157
- level?: "me" | "team" | "server";
205
+ /** me (yours) or team (team admins). */
206
+ level?: "me" | "team";
158
207
  name?: string;
159
208
  connection?: {
160
209
  /** Your name for it, for example desk-model. */
161
210
  name: string;
162
- /** openai-compatible covers any host or local server (Ollama, llama.cpp, vLLM, LM Studio and others). */
163
- type: "openai-compatible" | "openai" | "anthropic" | "deepinfra";
211
+ /** The provider: openai-compatible (any host or local server: Ollama, llama.cpp, vLLM, LM Studio and others), a named one (meta, openai, anthropic, deepinfra, together, groq, fireworks, openrouter, mistral, xai, gemini), or one an administrator added. */
212
+ type: string;
164
213
  /** For openai-compatible: the address up to /v1, for example http://host.docker.internal:11434/v1. (at most 500 characters) */
165
214
  baseUrl?: string;
166
215
  /** The model name the endpoint serves. (at most 200 characters) */
@@ -190,10 +239,66 @@ declare namespace slatebox.ai {
190
239
  }) & { mode: "save" }>;
191
240
  }
192
241
 
242
+ declare namespace slatebox.ai.control {
243
+ /** Effective AI binding. Shows which model each part of Slatebox (or one) answers with for a person (userId; none = someone not signed in): the provider and model, and where that comes from (its own choice, the part it follows, the default, the built-in default, or the person's own AI on a self-hosted server). usage true adds each part's calls, failed calls and spend over the last 24 hours. Administrators only. @scope ai:admin:read */
244
+ function effective(input: {
245
+ surface?: string;
246
+ userId?: string;
247
+ usage?: boolean;
248
+ }): Promise<{
249
+ generation?: number;
250
+ surfaces?: unknown[];
251
+ usage?: Record<string, unknown>;
252
+ [key: string]: unknown;
253
+ }>;
254
+ }
255
+
256
+ declare namespace slatebox.ai.control {
257
+ /** AI control. Returns the AI control snapshot: every part of Slatebox and what it follows, the providers (what each is, its address) and which have an active key (a fingerprint, never the key), the provider presets, the models with their prices, the bindings, the default model, agents, prompt heads, the global switch, and health. Administrators only. @scope ai:admin:read */
258
+ function get(input: Record<string, unknown>): Promise<{
259
+ generation?: number;
260
+ surfaces?: unknown[];
261
+ providers?: unknown[];
262
+ models?: unknown[];
263
+ health?: unknown[];
264
+ [key: string]: unknown;
265
+ }>;
266
+ }
267
+
268
+ declare namespace slatebox.ai.control {
269
+ /** AI control health. Lists AI control problems: documents skipped because they failed their checks (that part uses the default), keys the settings file still holds that could not be moved to the backend, and published prompts that fell back to their built-in text. warnings lists models with no price (charged at the dearest rate) and providers in use with no active key. An empty list means nothing is wrong. Administrators only. @scope ai:admin:read */
270
+ function health(input: Record<string, unknown>): Promise<{
271
+ generation?: number;
272
+ health?: unknown[];
273
+ warnings?: unknown[];
274
+ [key: string]: unknown;
275
+ }>;
276
+ }
277
+
278
+ declare namespace slatebox.ai.control {
279
+ /** Reset AI control. Returns AI configuration to its defaults. target binding removes one part's choice (surface), so it uses the default model again; bindings removes every part's choice and the default's, so the built-in default (Meta Muse Ember) answers everything; prompt returns one prompt (promptId) to its built-in text, prompts every prompt (their versions stay); all does every one. Providers, models and keys stay. AI turned off for everyone stays off. From a token, a reset that would switch back on a part an administrator turned off is refused. Needs a reason, which the audit trail keeps. Administrators only. @scope ai:admin @destructive @confirm @idempotent */
280
+ function reset(input: {
281
+ target: "binding" | "bindings" | "prompt" | "prompts" | "all";
282
+ /** For target binding: the part of Slatebox. */
283
+ surface?: "default" | "chat" | "chat.route" | "generation" | "presentation" | "vision" | "images" | "shape" | "workshop" | "workshop.draft" | "canvas" | "agent.slatebox" | "library" | "connectors";
284
+ /** For target prompt: the prompt. */
285
+ promptId?: "shape.system" | "shape.user" | "shape.retry" | "tool.propose_shapes" | "workshop.map.system" | "workshop.lane.system" | "workshop.chat.retry" | "tool.propose_map_edits" | "tool.propose_workshop_edits" | "workshop.draft.system" | "workshop.draft.map" | "workshop.draft.release" | "workshop.draft.rules" | "workshop.draft.retry" | "workshop.draft.repair" | "tool.draft_workshop" | "tool.draft_concept_map" | "tool.draft_release_plan" | "tool.revise_workshop_rules" | "exec.chat.system" | "exec.chat.fix" | "exec.chat.retry" | "agent.request.notes" | "presentation.segments" | "presentation.art" | "presentation.system" | "presentation.system.dynamic" | "presentation.system.slides" | "presentation.system.template" | "presentation.slate" | "presentation.user" | "presentation.brief" | "presentation.refine" | "tool.create-presentation" | "tool.create-presentation.image-query" | "tool.create-presentation.image-prompt" | "tool.create-presentation.image-why" | "library.refine.system" | "library.refine.request" | "library.refine.retry" | "tool.propose_library_refinement" | "connectors.plan.system" | "connectors.plan.writes" | "connectors.plan.next" | "connectors.plan.tool" | "connectors.layout.system" | "connectors.layout.budget" | "connectors.layout.tool" | "connectors.recipe.github" | "connectors.recipe.linear" | "connectors.recipe.huggingface" | "connectors.recipe.deepwiki" | "connectors.recipe.context7" | "connectors.recipe.wolfram" | "connectors.recipe.firecrawl" | "connectors.recipe.exa";
286
+ /** (1–500 characters) */
287
+ reason: string;
288
+ }): Promise<({
289
+ target?: string;
290
+ removed?: string[];
291
+ prompts?: string[];
292
+ [key: string]: unknown;
293
+ }) & { mode: "save" }>;
294
+ }
295
+
193
296
  declare namespace slatebox.ai {
194
297
  /** AI settings. The AI connections you, your team and this server have (never their keys), which one each feature uses (chat, generation, presentation, vision, images, shape, and the default), and which connection serves each feature for you now (effective), with what it cannot do. ownProviders false means this server uses only the AI its operator set up. @scope ai:settings */
195
298
  function get(input: Record<string, unknown>): Promise<{
196
299
  features: Array<Record<string, unknown>>;
300
+ /** Every feature and part a choice may name, with the one it follows while unset. */
301
+ surfaces?: Array<Record<string, unknown>>;
197
302
  useKeys?: string[];
198
303
  ownProviders: boolean;
199
304
  keysAvailable?: boolean;
@@ -206,8 +311,271 @@ declare namespace slatebox.ai {
206
311
  }>;
207
312
  }
208
313
 
314
+ declare namespace slatebox.ai.keys {
315
+ /** AI keys. Lists the server's provider keys (or one provider's): which key each is (a fingerprint), whether it is active, standby or revoked, who added it and when, and when it was last tested and last used. Never a key. Administrators only. @scope ai:admin:read */
316
+ function list(input: {
317
+ /** A model provider's id (for example meta or deepinfra), or a service beside the models (stability, google-cse, nounproject, deepgram). */
318
+ provider?: string;
319
+ }): Promise<{
320
+ keys?: Array<Record<string, unknown>>;
321
+ keysAvailable?: boolean;
322
+ fromSettings?: string[];
323
+ [key: string]: unknown;
324
+ }>;
325
+ }
326
+
327
+ declare namespace slatebox.ai.keys {
328
+ /** Test AI key. Tests a saved key (id) or one not yet saved (provider and apiKey): whether the provider is reached, takes the key, and its model answers and calls tools. A saved key keeps the outcome (last tested). Saves nothing else. The key goes only to the provider's own address. An unsaved key is a person's test. Administrators only. @scope ai:admin @openWorld @idempotent */
329
+ function test(input: {
330
+ /** A key's id, from ai.keys.list. */
331
+ id?: string;
332
+ /** A model provider's id (for example meta or deepinfra), or a service beside the models (stability, google-cse, nounproject, deepgram). */
333
+ provider?: string;
334
+ /** Stored encrypted with the server's key-encryption key and never shown again. For nounproject: key:secret. (1–400 characters) */
335
+ apiKey?: string;
336
+ /** For google-cse, the search engine ID (cx). For a key test, the model asked (the provider's first model by default). (at most 200 characters) */
337
+ model?: string;
338
+ }): Promise<({
339
+ ok?: boolean;
340
+ reachable?: boolean;
341
+ tools?: string;
342
+ message?: string;
343
+ latencyMs?: number;
344
+ /** A key as anyone may read it: id, provider, status (active, standby, revoked), keyFingerprint, label, source, createdAt/By, activatedAt, revokedAt/By, lastTest, lastUsedAt. Never the key. */
345
+ key?: Record<string, unknown>;
346
+ [key: string]: unknown;
347
+ }) & { mode: "save" }>;
348
+ }
349
+
350
+ declare namespace slatebox.ai.models {
351
+ /** Find AI models. Lists the models a provider reports (GET <address>/models, OpenAI-compatible providers), with its active key, to fill in the models. Writes nothing; the key goes only to the provider's own address, with no redirects. Administrators only. @scope ai:admin:read @openWorld */
352
+ function discover(input: {
353
+ provider: string;
354
+ }): Promise<{
355
+ provider?: string;
356
+ ok?: boolean;
357
+ models?: Array<Record<string, unknown>>;
358
+ message?: string;
359
+ [key: string]: unknown;
360
+ }>;
361
+ }
362
+
363
+ declare namespace slatebox.ai.models {
364
+ /** Save AI models. Adds or changes models: the provider that serves each, its id and name, what it can do (tools, vision, json, images, reasoning), its longest answer, and its prices in dollars per million input and output tokens (or per image). Metering charges these prices from the next call; a model with no price is charged at the dearest known rate and shown as unpriced. status disabled keeps a model out of the parts of Slatebox. Administrators only. @scope ai:admin @confirm @idempotent */
365
+ function save(input: {
366
+ /** (1–50 items) */
367
+ models: Array<{
368
+ /** The provider that serves it (ai.control.get lists them). */
369
+ provider: string;
370
+ /** The id the provider serves, for example muse-ember-1.0. (1–200 characters) */
371
+ model: string;
372
+ /** The name shown, for example Muse Ember. (at most 80 characters) */
373
+ label?: string | null;
374
+ /** What the model can do. A part of Slatebox refuses a model whose flags miss what it needs. */
375
+ capabilities?: {
376
+ tools?: boolean;
377
+ vision?: boolean;
378
+ json?: boolean;
379
+ images?: boolean;
380
+ reasoning?: boolean;
381
+ };
382
+ /** (at least 1) */
383
+ maxOutput?: number | null;
384
+ prices?: {
385
+ /** Dollars per million input tokens. (at least 0) */
386
+ inputPerM?: number | null;
387
+ /** Dollars per million output tokens. (at least 0) */
388
+ outputPerM?: number | null;
389
+ /** Dollars per generated image. (at least 0) */
390
+ imageEach?: number | null;
391
+ currency?: "USD";
392
+ } | null;
393
+ status?: "enabled" | "disabled";
394
+ }>;
395
+ /** Why, for the change history. (1–500 characters) */
396
+ reason?: string;
397
+ }): Promise<({
398
+ models?: Array<Record<string, unknown>>;
399
+ generation?: number | null;
400
+ [key: string]: unknown;
401
+ }) & { mode: "save" }>;
402
+ }
403
+
404
+ declare namespace slatebox.ai.models {
405
+ /** Test AI model. Sends one short request to a model with its provider's active key: whether it answers and calls tools. Writes nothing. Administrators only. @scope ai:admin @openWorld @idempotent */
406
+ function test(input: {
407
+ /** A model's id: <provider>:<model>, for example meta:muse-ember-1.0. (3–260 characters) */
408
+ id: string;
409
+ }): Promise<({
410
+ id?: string;
411
+ ok?: boolean;
412
+ tools?: string;
413
+ message?: string;
414
+ [key: string]: unknown;
415
+ }) & { mode: "save" }>;
416
+ }
417
+
418
+ declare namespace slatebox.ai.prompts {
419
+ /** AI prompt. Returns one prompt: the built-in text (version 0), the text served now and where it comes from, every saved version newest first with its author, note and eval results, the values it may use, and the samples a test run can send. Administrators only. @scope ai:admin:read */
420
+ function get(input: {
421
+ /** The prompt, for example shape.system. */
422
+ id: "shape.system" | "shape.user" | "shape.retry" | "tool.propose_shapes" | "workshop.map.system" | "workshop.lane.system" | "workshop.chat.retry" | "tool.propose_map_edits" | "tool.propose_workshop_edits" | "workshop.draft.system" | "workshop.draft.map" | "workshop.draft.release" | "workshop.draft.rules" | "workshop.draft.retry" | "workshop.draft.repair" | "tool.draft_workshop" | "tool.draft_concept_map" | "tool.draft_release_plan" | "tool.revise_workshop_rules" | "exec.chat.system" | "exec.chat.fix" | "exec.chat.retry" | "agent.request.notes" | "presentation.segments" | "presentation.art" | "presentation.system" | "presentation.system.dynamic" | "presentation.system.slides" | "presentation.system.template" | "presentation.slate" | "presentation.user" | "presentation.brief" | "presentation.refine" | "tool.create-presentation" | "tool.create-presentation.image-query" | "tool.create-presentation.image-prompt" | "tool.create-presentation.image-why" | "library.refine.system" | "library.refine.request" | "library.refine.retry" | "tool.propose_library_refinement" | "connectors.plan.system" | "connectors.plan.writes" | "connectors.plan.next" | "connectors.plan.tool" | "connectors.layout.system" | "connectors.layout.budget" | "connectors.layout.tool" | "connectors.recipe.github" | "connectors.recipe.linear" | "connectors.recipe.huggingface" | "connectors.recipe.deepwiki" | "connectors.recipe.context7" | "connectors.recipe.wolfram" | "connectors.recipe.firecrawl" | "connectors.recipe.exa";
423
+ }): Promise<{
424
+ id?: string;
425
+ code?: Record<string, unknown>;
426
+ live?: Record<string, unknown>;
427
+ versions?: Array<Record<string, unknown>>;
428
+ [key: string]: unknown;
429
+ }>;
430
+ }
431
+
432
+ declare namespace slatebox.ai.prompts {
433
+ /** AI prompts. Lists every prompt Slatebox sends its models, by part of Slatebox: the version served now and where it comes from (built in, published or pinned by a binding), the published and previous versions, and any draft or suggestion. Administrators only. @scope ai:admin:read */
434
+ function list(input: Record<string, unknown>): Promise<{
435
+ surfaces?: Array<Record<string, unknown>>;
436
+ [key: string]: unknown;
437
+ }>;
438
+ }
439
+
440
+ declare namespace slatebox.ai.prompts {
441
+ /** Render AI prompt. Renders a prompt version (or text sent with the call) into the request a built-in sample sends, and reports its lint findings. No model is called and nothing is saved. Administrators only. @scope ai:admin:read @idempotent */
442
+ function render(input: {
443
+ /** The prompt, for example shape.system. */
444
+ id: "shape.system" | "shape.user" | "shape.retry" | "tool.propose_shapes" | "workshop.map.system" | "workshop.lane.system" | "workshop.chat.retry" | "tool.propose_map_edits" | "tool.propose_workshop_edits" | "workshop.draft.system" | "workshop.draft.map" | "workshop.draft.release" | "workshop.draft.rules" | "workshop.draft.retry" | "workshop.draft.repair" | "tool.draft_workshop" | "tool.draft_concept_map" | "tool.draft_release_plan" | "tool.revise_workshop_rules" | "exec.chat.system" | "exec.chat.fix" | "exec.chat.retry" | "agent.request.notes" | "presentation.segments" | "presentation.art" | "presentation.system" | "presentation.system.dynamic" | "presentation.system.slides" | "presentation.system.template" | "presentation.slate" | "presentation.user" | "presentation.brief" | "presentation.refine" | "tool.create-presentation" | "tool.create-presentation.image-query" | "tool.create-presentation.image-prompt" | "tool.create-presentation.image-why" | "library.refine.system" | "library.refine.request" | "library.refine.retry" | "tool.propose_library_refinement" | "connectors.plan.system" | "connectors.plan.writes" | "connectors.plan.next" | "connectors.plan.tool" | "connectors.layout.system" | "connectors.layout.budget" | "connectors.layout.tool" | "connectors.recipe.github" | "connectors.recipe.linear" | "connectors.recipe.huggingface" | "connectors.recipe.deepwiki" | "connectors.recipe.context7" | "connectors.recipe.wolfram" | "connectors.recipe.firecrawl" | "connectors.recipe.exa";
445
+ /** A saved version; 0 is the built-in text. (at least 0) */
446
+ version?: number;
447
+ /** The text. Values go in as {{name}}; {{#flag}}…{{/flag}} keeps text only when the flag is set, {{^flag}}…{{/flag}} only when it is not. (1–32768 characters) */
448
+ body?: string;
449
+ /** Per value: data encloses it in a <data> block so it reads as data, not instructions. */
450
+ wrap?: Record<string, "none" | "data">;
451
+ /** A built-in sample (ai.prompts.get lists them). Default: the first. (at most 40 characters) */
452
+ sample?: string;
453
+ }): Promise<({
454
+ sample?: string | null;
455
+ rendered?: Record<string, unknown> | null;
456
+ lint?: Record<string, unknown>;
457
+ [key: string]: unknown;
458
+ }) & { mode: "save" }>;
459
+ }
460
+
461
+ declare namespace slatebox.ai.prompts {
462
+ /** Save AI prompt draft. Saves a new draft version of a prompt. Changes nothing live: a person publishes it after its checks pass. An agent's draft is marked as a suggestion. Returns the version and its lint findings. Administrators only. @scope ai:admin */
463
+ function saveDraft(input: {
464
+ /** The prompt, for example shape.system. */
465
+ id: "shape.system" | "shape.user" | "shape.retry" | "tool.propose_shapes" | "workshop.map.system" | "workshop.lane.system" | "workshop.chat.retry" | "tool.propose_map_edits" | "tool.propose_workshop_edits" | "workshop.draft.system" | "workshop.draft.map" | "workshop.draft.release" | "workshop.draft.rules" | "workshop.draft.retry" | "workshop.draft.repair" | "tool.draft_workshop" | "tool.draft_concept_map" | "tool.draft_release_plan" | "tool.revise_workshop_rules" | "exec.chat.system" | "exec.chat.fix" | "exec.chat.retry" | "agent.request.notes" | "presentation.segments" | "presentation.art" | "presentation.system" | "presentation.system.dynamic" | "presentation.system.slides" | "presentation.system.template" | "presentation.slate" | "presentation.user" | "presentation.brief" | "presentation.refine" | "tool.create-presentation" | "tool.create-presentation.image-query" | "tool.create-presentation.image-prompt" | "tool.create-presentation.image-why" | "library.refine.system" | "library.refine.request" | "library.refine.retry" | "tool.propose_library_refinement" | "connectors.plan.system" | "connectors.plan.writes" | "connectors.plan.next" | "connectors.plan.tool" | "connectors.layout.system" | "connectors.layout.budget" | "connectors.layout.tool" | "connectors.recipe.github" | "connectors.recipe.linear" | "connectors.recipe.huggingface" | "connectors.recipe.deepwiki" | "connectors.recipe.context7" | "connectors.recipe.wolfram" | "connectors.recipe.firecrawl" | "connectors.recipe.exa";
466
+ /** The text. Values go in as {{name}}; {{#flag}}…{{/flag}} keeps text only when the flag is set, {{^flag}}…{{/flag}} only when it is not. (1–32768 characters) */
467
+ body: string;
468
+ /** Per value: data encloses it in a <data> block so it reads as data, not instructions. */
469
+ wrap?: Record<string, "none" | "data">;
470
+ /** A short note kept with the version. (at most 200 characters) */
471
+ note?: string;
472
+ /** The version the text was edited from (0: the built-in text). A draft edited from a suggestion stays marked as one when it is published. (at least 0) */
473
+ basedOn?: number;
474
+ }): Promise<({
475
+ id?: string;
476
+ version?: number;
477
+ status?: string;
478
+ origin?: string;
479
+ lint?: Record<string, unknown>;
480
+ [key: string]: unknown;
481
+ }) & { mode: "save" }>;
482
+ }
483
+
484
+ declare namespace slatebox.ai.prompts {
485
+ /** Test AI prompt. Sends a prompt version (or text sent with the call) with a built-in sample through a part of Slatebox's binding (default: the prompt's own). Returns the request sent, the raw answer, whether that part could use it, the model, latency and cost. The answer is shown, never applied. Metered to the caller; 30 an hour per administrator. Administrators only. @scope ai:admin */
486
+ function test(input: {
487
+ /** The prompt, for example shape.system. */
488
+ id: "shape.system" | "shape.user" | "shape.retry" | "tool.propose_shapes" | "workshop.map.system" | "workshop.lane.system" | "workshop.chat.retry" | "tool.propose_map_edits" | "tool.propose_workshop_edits" | "workshop.draft.system" | "workshop.draft.map" | "workshop.draft.release" | "workshop.draft.rules" | "workshop.draft.retry" | "workshop.draft.repair" | "tool.draft_workshop" | "tool.draft_concept_map" | "tool.draft_release_plan" | "tool.revise_workshop_rules" | "exec.chat.system" | "exec.chat.fix" | "exec.chat.retry" | "agent.request.notes" | "presentation.segments" | "presentation.art" | "presentation.system" | "presentation.system.dynamic" | "presentation.system.slides" | "presentation.system.template" | "presentation.slate" | "presentation.user" | "presentation.brief" | "presentation.refine" | "tool.create-presentation" | "tool.create-presentation.image-query" | "tool.create-presentation.image-prompt" | "tool.create-presentation.image-why" | "library.refine.system" | "library.refine.request" | "library.refine.retry" | "tool.propose_library_refinement" | "connectors.plan.system" | "connectors.plan.writes" | "connectors.plan.next" | "connectors.plan.tool" | "connectors.layout.system" | "connectors.layout.budget" | "connectors.layout.tool" | "connectors.recipe.github" | "connectors.recipe.linear" | "connectors.recipe.huggingface" | "connectors.recipe.deepwiki" | "connectors.recipe.context7" | "connectors.recipe.wolfram" | "connectors.recipe.firecrawl" | "connectors.recipe.exa";
489
+ /** A saved version; 0 is the built-in text. (at least 0) */
490
+ version?: number;
491
+ /** The text. Values go in as {{name}}; {{#flag}}…{{/flag}} keeps text only when the flag is set, {{^flag}}…{{/flag}} only when it is not. (1–32768 characters) */
492
+ body?: string;
493
+ /** Per value: data encloses it in a <data> block so it reads as data, not instructions. */
494
+ wrap?: Record<string, "none" | "data">;
495
+ /** A built-in sample (ai.prompts.get lists them). Default: the first. (at most 40 characters) */
496
+ sample?: string;
497
+ /** Whose binding (model chain) to test against. */
498
+ surface?: "default" | "chat" | "chat.route" | "generation" | "presentation" | "vision" | "images" | "shape" | "workshop" | "workshop.draft" | "canvas" | "agent.slatebox" | "library" | "connectors";
499
+ }): Promise<({
500
+ rendered?: Record<string, unknown>;
501
+ answer?: Record<string, unknown>;
502
+ parses?: Record<string, unknown>;
503
+ latencyMs?: number;
504
+ model?: string | null;
505
+ costMicros?: number;
506
+ [key: string]: unknown;
507
+ }) & { mode: "save" }>;
508
+ }
509
+
510
+ declare namespace slatebox.ai.providers {
511
+ /** Add AI provider. Adds a model provider from a preset: meta (Meta Muse, https://api.meta.ai/v1), openai, anthropic, deepinfra, together, groq, fireworks, openrouter, mistral, xai, gemini, or other with its own OpenAI-compatible address. A named preset keeps its own address and key style. models: the preset's suggested model ids to add with their prices. Add its key with ai.keys.add. Only a person adds an Other provider (it chooses where keys go). Administrators only. @scope ai:admin @confirm */
512
+ function add(input: {
513
+ provider: {
514
+ /** What the provider is: meta (Muse), openai, anthropic, deepinfra, together, groq, fireworks, openrouter, mistral, xai, gemini, or other (any OpenAI-compatible address). */
515
+ preset: "meta" | "openai" | "anthropic" | "deepinfra" | "together" | "groq" | "fireworks" | "openrouter" | "mistral" | "xai" | "gemini" | "other";
516
+ /** Its id here; the preset's by default (meta, deepinfra, ...). */
517
+ id?: string;
518
+ /** The name shown; the preset's by default. (1–80 characters) */
519
+ label?: string;
520
+ /** For other only: the address up to /v1. Named presets keep their own address. (at most 500 characters) */
521
+ baseUrl?: string;
522
+ /** For other only: bearer (Authorization: Bearer), header { name } or none. */
523
+ auth?: {
524
+ style: "bearer" | "header" | "none";
525
+ /** (at most 64 characters) */
526
+ name?: string;
527
+ };
528
+ /** For other only: how it takes a forced tool call. */
529
+ toolChoice?: "auto" | "named" | "required";
530
+ /** For other only: headers sent with every request. Nothing secret. */
531
+ extraHeaders?: Record<string, string>;
532
+ };
533
+ /** Suggested model ids of the preset to add too. (at most 20 items) */
534
+ models?: string[];
535
+ /** Why, for the change history. (1–500 characters) */
536
+ reason?: string;
537
+ }): Promise<({
538
+ provider?: Record<string, unknown>;
539
+ models?: Array<Record<string, unknown>>;
540
+ generation?: number | null;
541
+ [key: string]: unknown;
542
+ }) & { mode: "save" }>;
543
+ }
544
+
545
+ declare namespace slatebox.ai.providers {
546
+ /** Change AI provider. Changes a provider's name, or an Other provider's address, key style, tool choice and extra headers (nothing secret). A new address or key style revokes the provider's keys, after revokeKeys true: a key is never sent to a new address. Only a person changes where keys go. Administrators only. @scope ai:admin @confirm @idempotent */
547
+ function save(input: {
548
+ provider: {
549
+ id: string;
550
+ /** (1–80 characters) */
551
+ label?: string;
552
+ /** Other providers only. A new address revokes the provider's keys (send revokeKeys true). (at most 500 characters) */
553
+ baseUrl?: string;
554
+ /** For other only: bearer (Authorization: Bearer), header { name } or none. */
555
+ auth?: {
556
+ style: "bearer" | "header" | "none";
557
+ /** (at most 64 characters) */
558
+ name?: string;
559
+ };
560
+ /** For other only: how it takes a forced tool call. */
561
+ toolChoice?: "auto" | "named" | "required";
562
+ /** For other only: headers sent with every request. Nothing secret. */
563
+ extraHeaders?: Record<string, string>;
564
+ };
565
+ /** Go ahead with a change that revokes the provider's keys. */
566
+ revokeKeys?: boolean;
567
+ /** Why, for the change history. (1–500 characters) */
568
+ reason?: string;
569
+ }): Promise<({
570
+ provider?: Record<string, unknown>;
571
+ revokedKeys?: string[];
572
+ generation?: number | null;
573
+ [key: string]: unknown;
574
+ }) & { mode: "save" }>;
575
+ }
576
+
209
577
  declare namespace slatebox.ai {
210
- /** Set AI. Adds or changes AI connections (a cloud provider with its key, or any OpenAI-compatible endpoint with its address, optional key and model), removes some, and chooses which connection each feature uses. level me changes yours, team your team's (team admins), server this server's (administrators; ownProviders on or off lets people use their own). Mix freely: a choice names me:<name>, team:<name>, server:<name> or builtin. Keys are stored encrypted and never returned, and a run's record keeps its code with the apiKey replaced. Returns the settings as ai.get does. A token needs ai:admin as well for level team or server. Own AI (levels me and team) is for self-hosted Slatebox: Slatebox Cloud refuses it, as AI there comes with Slatebox Pro credits and top-ups. @scope ai:settings @destructive @confirm @idempotent */
578
+ /** Set AI. Your own or your team's AI on a self-hosted server: adds or changes connections (a cloud provider with its key, or any OpenAI-compatible endpoint with its address, optional key and model), removes some, and chooses which connection each feature uses. level me changes yours, team your team's (team admins); level server only turns own AI on or off for everyone (ownProviders, administrators). A choice names me:<name>, team:<name>, or builtin for this server's model (set in Admin → AI control). Keys are stored encrypted and never returned. Returns the settings as ai.get does. A token needs ai:admin as well for level team or server. Own AI (levels me and team) is for self-hosted Slatebox: Slatebox Cloud refuses it, as AI there comes with Slatebox Pro credits and top-ups. @scope ai:settings @destructive @confirm @idempotent */
211
579
  function update(input: {
212
580
  /** me (yours), team (team admins) or server (administrators). */
213
581
  level: "me" | "team" | "server";
@@ -215,8 +583,8 @@ declare namespace slatebox.ai {
215
583
  connections?: Array<{
216
584
  /** Your name for it, for example desk-model. */
217
585
  name: string;
218
- /** openai-compatible covers any host or local server (Ollama, llama.cpp, vLLM, LM Studio and others). */
219
- type: "openai-compatible" | "openai" | "anthropic" | "deepinfra";
586
+ /** The provider: openai-compatible (any host or local server: Ollama, llama.cpp, vLLM, LM Studio and others), a named one (meta, openai, anthropic, deepinfra, together, groq, fireworks, openrouter, mistral, xai, gemini), or one an administrator added. */
587
+ type: string;
220
588
  /** For openai-compatible: the address up to /v1, for example http://host.docker.internal:11434/v1. (at most 500 characters) */
221
589
  baseUrl?: string;
222
590
  /** The model name the endpoint serves. (at most 200 characters) */
@@ -236,26 +604,44 @@ declare namespace slatebox.ai {
236
604
  }>;
237
605
  /** (at most 20 items) */
238
606
  remove?: string[];
239
- /** Which connection each feature uses. default serves every feature not named. */
607
+ /** Which connection each feature uses. An unset feature follows the one it belongs to (workshop follows chat), and default serves every feature not named. */
240
608
  use?: {
241
- /** me:<name>, team:<name> or server:<name> for a connection, builtin for the AI this server provides, null to clear. (at most 48 characters) */
609
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
242
610
  default?: string | null;
243
- /** me:<name>, team:<name> or server:<name> for a connection, builtin for the AI this server provides, null to clear. (at most 48 characters) */
611
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
244
612
  chat?: string | null;
245
- /** me:<name>, team:<name> or server:<name> for a connection, builtin for the AI this server provides, null to clear. (at most 48 characters) */
613
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
614
+ "chat.route"?: string | null;
615
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
246
616
  generation?: string | null;
247
- /** me:<name>, team:<name> or server:<name> for a connection, builtin for the AI this server provides, null to clear. (at most 48 characters) */
617
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
618
+ "generation.notes"?: string | null;
619
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
248
620
  presentation?: string | null;
249
- /** me:<name>, team:<name> or server:<name> for a connection, builtin for the AI this server provides, null to clear. (at most 48 characters) */
621
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
250
622
  vision?: string | null;
251
- /** me:<name>, team:<name> or server:<name> for a connection, builtin for the AI this server provides, null to clear. (at most 48 characters) */
623
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
252
624
  images?: string | null;
253
- /** me:<name>, team:<name> or server:<name> for a connection, builtin for the AI this server provides, null to clear. (at most 48 characters) */
625
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
254
626
  shape?: string | null;
627
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
628
+ workshop?: string | null;
629
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
630
+ "workshop.draft"?: string | null;
631
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
632
+ canvas?: string | null;
633
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
634
+ "agent.slatebox"?: string | null;
635
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
636
+ library?: string | null;
637
+ /** me:<name> or team:<name> for a connection, builtin for this server's model (Admin → AI control), null to clear. (at most 48 characters) */
638
+ connectors?: string | null;
255
639
  };
256
640
  ownProviders?: "on" | "off";
257
641
  }): Promise<({
258
642
  features: Array<Record<string, unknown>>;
643
+ /** Every feature and part a choice may name, with the one it follows while unset. */
644
+ surfaces?: Array<Record<string, unknown>>;
259
645
  useKeys?: string[];
260
646
  ownProviders: boolean;
261
647
  keysAvailable?: boolean;
@@ -402,10 +788,553 @@ declare namespace slatebox.instance {
402
788
  workshops?: Record<string, unknown>;
403
789
  actions?: Array<Record<string, unknown>>;
404
790
  account?: Record<string, unknown>;
791
+ /** With a token or sign-in: the shared library's categories, and whether you review its submissions. */
792
+ library?: Record<string, unknown>;
793
+ [key: string]: unknown;
794
+ }>;
795
+ }
796
+
797
+ declare namespace slatebox.library {
798
+ /** Branch off a component. Start building a smart component on a new private slate (a builder slate): a copy of a library component to change (itemId), or an empty one (itemId "new"). Grow it by chat and with the controls on the board, then library.saveDraft and library.submit. A branch keeps its parent's category. @scope slates:write */
799
+ function branch(input: {
800
+ /** The component to branch off, or "new" for an empty builder slate. (1–120 characters) */
801
+ itemId: string;
802
+ /** A version number (item.publishedVersion by default). (at least 1) */
803
+ version?: number;
804
+ }): Promise<({
805
+ shareId: string;
806
+ revision?: number;
807
+ [key: string]: unknown;
808
+ }) & { mode: "save" }>;
809
+ }
810
+
811
+ declare namespace slatebox.library {
812
+ /** Write in the thread. Write in a library item's review thread: its author and the reviewers read it. @scope slates:write */
813
+ function comment(input: {
814
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
815
+ itemId: string;
816
+ /** (1–2000 characters) */
817
+ message: string;
818
+ }): Promise<({
819
+ itemId: string;
820
+ eventId: string;
821
+ [key: string]: unknown;
822
+ }) & { mode: "save" }>;
823
+ }
824
+
825
+ declare namespace slatebox.library {
826
+ /** Discard a draft. Delete your own draft library item (never submitted, or withdrawn). Its builder slate stays. @scope slates:write @destructive */
827
+ function discard(input: {
828
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
829
+ itemId: string;
830
+ }): Promise<({
831
+ itemId: string;
832
+ discarded: boolean;
833
+ [key: string]: unknown;
834
+ }) & { mode: "save" }>;
835
+ }
836
+
837
+ declare namespace slatebox.library {
838
+ /** Library export. Every published library item with its published version's content, 50 per page, oldest first: what the public gallery is built from. @scope slates:read */
839
+ function export(input: {
840
+ /** The next value the previous page gave. (at most 12 characters) */
841
+ cursor?: string;
842
+ }): Promise<{
843
+ items: Array<Record<string, unknown>>;
844
+ next?: string;
845
+ [key: string]: unknown;
846
+ }>;
847
+ }
848
+
849
+ declare namespace slatebox.library {
850
+ /** Use a library item. Use a library item: a slate or presentation becomes a new private slate of yours (a presentation with its deck), and a smart component goes onto a new slate, or beside the boards of a slate you can edit (targetShareId; a slate holds up to 8 boards, past that 409 component_opens_new_slate; an agent gets 423 agents_paused while people there paused agents). The copy remembers where it came from. Preview first to see the board and where it goes (canvas); save makes it. topic names the board ("Retro: Q3 launch"). @scope slates:write @modes save|preview */
851
+ function fork(input: {
852
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
853
+ itemId: string;
854
+ /** A version number (item.publishedVersion by default). (at least 1) */
855
+ version?: number;
856
+ /** The new slate's name (the item's title by default). (1–200 characters) */
857
+ name?: string;
858
+ /** A smart component only: the slate to add it to (one you can edit). (1–80 characters) */
859
+ targetShareId?: string;
860
+ /** With targetShareId: the slate revision you read; a slate changed since is refused with 409 slate_changed. (at least 0) */
861
+ expectedRevision?: number;
862
+ /** A smart component only: what it is about, which names its board. (1–100 characters) */
863
+ topic?: string;
864
+ /** preview returns what would change and saves nothing. (default "save") */
865
+ mode?: "save" | "preview";
866
+ }): Promise<({
867
+ /** The slate it went to (null in a preview that would make a new slate). */
868
+ shareId: string | null;
869
+ revision?: number;
870
+ boardId?: string;
871
+ itemId: string;
872
+ version: number;
873
+ /** A component preview: { workshop, origin } as the canvas draws it. */
874
+ canvas?: Record<string, unknown>;
875
+ name?: string;
876
+ notes?: number;
877
+ [key: string]: unknown;
878
+ }) & { mode: "save" | "preview" }>;
879
+ }
880
+
881
+ declare namespace slatebox.library {
882
+ /** Library item. One library item by id or slug, with a version's content: a smart component's board (workshop, with its rules), or a slate's notes (and a presentation's deck). Anyone reads published items; an item's author and reviewers also read its drafts, every version and its review thread. @scope slates:read */
883
+ function get(input: {
884
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
885
+ itemId: string;
886
+ /** A version number (item.publishedVersion by default). (at least 1) */
887
+ version?: number;
888
+ }): Promise<{
889
+ item: {
890
+ id: string;
891
+ slug: string;
892
+ kind: "component" | "slate" | "presentation";
893
+ origin: "builtin" | "user";
894
+ title: string;
895
+ summary: string;
896
+ /** One of the five categories: plan, decide, meetings, track, map. */
897
+ category?: "plan" | "decide" | "meetings" | "track" | "map";
898
+ authorName: string;
899
+ publishedAt?: string;
900
+ counts: {
901
+ copies?: number;
902
+ adds?: number;
903
+ branches?: number;
904
+ [key: string]: unknown;
905
+ };
906
+ /** branchedFrom or forkedFrom: { itemId, version, title }. */
907
+ provenance?: Record<string, unknown>;
908
+ url: string;
909
+ preview?: {
910
+ kind?: "component" | "slate" | "presentation";
911
+ boardKind?: string;
912
+ notes?: number;
913
+ [key: string]: unknown;
914
+ };
915
+ description?: string;
916
+ synonyms?: string[];
917
+ license?: string;
918
+ categoryLocked?: boolean;
919
+ versionCount?: number;
920
+ publishedVersion?: number;
921
+ /** How many times it has been published, when more than once (absent: once). */
922
+ publishedCount?: number;
923
+ /** Its author and reviewers only. */
924
+ status?: "draft" | "submitted" | "in_review" | "changes_requested" | "published" | "rejected" | "unpublished";
925
+ /** The state of the version waiting for review (its author and reviewers only). */
926
+ reviewStatus?: string;
927
+ pendingVersion?: number;
928
+ /** An update to a published item: its proposed details, public once approved. */
929
+ pendingMeta?: Record<string, unknown>;
930
+ /** A published item's saved draft details, not yet submitted (its author only). */
931
+ draftMeta?: Record<string, unknown>;
932
+ sourceShareId?: string;
933
+ reviewShareId?: string;
934
+ lastMessage?: Record<string, unknown>;
935
+ [key: string]: unknown;
936
+ };
937
+ version: {
938
+ n: number;
939
+ meta: Record<string, unknown>;
940
+ /** { kind: component, workshop } | { kind: slate, slate } | { kind: presentation, slate, deck } */
941
+ content: Record<string, unknown>;
942
+ createdAt?: string;
943
+ [key: string]: unknown;
944
+ };
945
+ /** Its author and reviewers only: the review thread (every action and message), oldest first. */
946
+ thread?: Array<Record<string, unknown>>;
947
+ [key: string]: unknown;
948
+ }>;
949
+ }
950
+
951
+ declare namespace slatebox.library {
952
+ /** Library. Published items of the shared library: smart components (boards that keep their rules: the ones built into Slatebox and the ones people built), slates and presentations anyone can copy. Filter by kind, category (plan, decide, meetings, track, map), origin (builtin or user) or words (q); sort new or popular. 24 per page by default (at most 48); pass next as cursor for more. Open to anyone. @scope slates:read */
953
+ function list(input: {
954
+ kind?: "component" | "slate" | "presentation";
955
+ /** One of the five categories: plan, decide, meetings, track, map. */
956
+ category?: "plan" | "decide" | "meetings" | "track" | "map";
957
+ /** (1–100 characters) */
958
+ q?: string;
959
+ /** (default "new") */
960
+ sort?: "new" | "popular";
961
+ origin?: "builtin" | "user";
962
+ /** The next value the previous page gave. (at most 12 characters) */
963
+ cursor?: string;
964
+ /** (1 to 48) */
965
+ limit?: number;
966
+ }): Promise<{
967
+ items: Array<{
968
+ id: string;
969
+ slug: string;
970
+ kind: "component" | "slate" | "presentation";
971
+ origin: "builtin" | "user";
972
+ title: string;
973
+ summary: string;
974
+ /** One of the five categories: plan, decide, meetings, track, map. */
975
+ category?: "plan" | "decide" | "meetings" | "track" | "map";
976
+ authorName: string;
977
+ publishedAt?: string;
978
+ counts: {
979
+ copies?: number;
980
+ adds?: number;
981
+ branches?: number;
982
+ [key: string]: unknown;
983
+ };
984
+ /** branchedFrom or forkedFrom: { itemId, version, title }. */
985
+ provenance?: Record<string, unknown>;
986
+ url: string;
987
+ preview?: {
988
+ kind?: "component" | "slate" | "presentation";
989
+ boardKind?: string;
990
+ notes?: number;
991
+ [key: string]: unknown;
992
+ };
993
+ [key: string]: unknown;
994
+ }>;
995
+ next?: string;
996
+ total: number;
997
+ [key: string]: unknown;
998
+ }>;
999
+ }
1000
+
1001
+ declare namespace slatebox.library {
1002
+ /** My library. Your own library items, newest first: drafts, submissions waiting for review, items that need changes, published and not accepted ones, each with its status, the version waiting, the last message and the last 20 events of its thread. @scope slates:read */
1003
+ function mine(input: {
1004
+ status?: "draft" | "submitted" | "in_review" | "changes_requested" | "published" | "rejected" | "unpublished";
1005
+ }): Promise<{
1006
+ items: Array<Record<string, unknown>>;
1007
+ [key: string]: unknown;
1008
+ }>;
1009
+ }
1010
+
1011
+ declare namespace slatebox.library.review {
1012
+ /** Approve and publish. For administrators: publish an item in review as its review copy stands now (your refinements included), as the version its author sent. Anyone can then find, use and change it. The author is told. The person agrees first. @scope library:review @confirm */
1013
+ function approve(input: {
1014
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1015
+ itemId: string;
1016
+ /** (1–2000 characters) */
1017
+ message?: string;
1018
+ /** Review your own submission. Allowed only on a server with one administrator; the thread records it. */
1019
+ selfReview?: boolean;
1020
+ }): Promise<({
1021
+ itemId: string;
1022
+ status: string;
1023
+ publishedVersion: number;
1024
+ /** How many times it has been published, this time included (1 the first time). */
1025
+ publishedCount?: number;
1026
+ url?: string;
1027
+ [key: string]: unknown;
1028
+ }) & { mode: "save" }>;
1029
+ }
1030
+
1031
+ declare namespace slatebox.library.review {
1032
+ /** Open for review. For administrators: make (or refresh) your private review copy of a submission's waiting version, a slate you can change on the canvas, and mark it in review. Approving publishes that copy as it stands. Opening again for the same version answers the same copy. @scope library:review */
1033
+ function open(input: {
1034
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1035
+ itemId: string;
1036
+ /** Review your own submission. Allowed only on a server with one administrator; the thread records it. */
1037
+ selfReview?: boolean;
1038
+ }): Promise<({
1039
+ itemId: string;
1040
+ reviewShareId: string;
1041
+ status?: string;
1042
+ reviewStatus?: string | null;
1043
+ version?: number;
1044
+ [key: string]: unknown;
1045
+ }) & { mode: "save" }>;
1046
+ }
1047
+
1048
+ declare namespace slatebox.library.review {
1049
+ /** Review queue. For administrators: library items to review, oldest first: waiting (submitted and changes requested, the default), in_review, changes_requested, rejected, published or all. Each with its author, kind, the version waiting, whether it updates a published item, how long it has waited and the last message. source migration lists the slates moved from Community slates. @scope library:review */
1050
+ function queue(input: {
1051
+ /** (default "waiting") */
1052
+ status?: "waiting" | "submitted" | "in_review" | "changes_requested" | "rejected" | "published" | "all";
1053
+ kind?: "component" | "slate" | "presentation";
1054
+ source?: "migration";
1055
+ /** The next value the previous page gave. (at most 12 characters) */
1056
+ cursor?: string;
1057
+ }): Promise<{
1058
+ items: Array<Record<string, unknown>>;
1059
+ next?: string;
1060
+ total: number;
1061
+ [key: string]: unknown;
1062
+ }>;
1063
+ }
1064
+
1065
+ declare namespace slatebox.library.review {
1066
+ /** Refine by chat. For administrators: ask for a change to an item in review in plain words ("rename it to Weekly retro", "put it in Meetings", "Write a clearer one-line summary", "What should I check?"). Preview answers the proposal (metadata from and to, rule lines for a component's board, things to check) and its previewId; save with that previewId keeps exactly it, on the item and on the review copy. Simple renames, categories and summaries are read without AI. @scope library:review @modes save|preview */
1067
+ function refine(input: {
1068
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1069
+ itemId: string;
1070
+ /** (1–2000 characters) */
1071
+ message: string;
1072
+ /** Review your own submission. Allowed only on a server with one administrator; the thread records it. */
1073
+ selfReview?: boolean;
1074
+ /** Save: the previewId a preview answered. Keeps exactly that proposal (no second AI answer). (at most 64 characters) */
1075
+ previewId?: string;
1076
+ /** (at most 6 items) */
1077
+ history?: Array<{
1078
+ role: "user" | "assistant";
1079
+ /** (at most 2000 characters) */
1080
+ text: string;
1081
+ }>;
1082
+ /** preview returns what would change and saves nothing. (default "save") */
1083
+ mode?: "save" | "preview";
1084
+ }): Promise<({
1085
+ itemId: string;
1086
+ reply: string;
1087
+ proposal?: Record<string, unknown>;
1088
+ diff?: Record<string, unknown>;
1089
+ previewId?: string;
1090
+ kept?: boolean;
1091
+ revision?: number;
1092
+ [key: string]: unknown;
1093
+ }) & { mode: "save" | "preview" }>;
1094
+ }
1095
+
1096
+ declare namespace slatebox.library.review {
1097
+ /** Reject. For administrators: turn down a submission, with a message saying why. A published item's rejected update leaves the published version as it is. @scope library:review */
1098
+ function reject(input: {
1099
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1100
+ itemId: string;
1101
+ /** Why: the author reads it. (1–2000 characters) */
1102
+ message: string;
1103
+ }): Promise<({
1104
+ itemId: string;
1105
+ slug?: string;
1106
+ status: string;
1107
+ reviewStatus?: string | null;
1108
+ version?: number;
1109
+ [key: string]: unknown;
1110
+ }) & { mode: "save" }>;
1111
+ }
1112
+
1113
+ declare namespace slatebox.library.review {
1114
+ /** Request changes. For administrators: send an item in review back to its author for changes, with a message saying what to change. @scope library:review */
1115
+ function requestChanges(input: {
1116
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1117
+ itemId: string;
1118
+ /** Why: the author reads it. (1–2000 characters) */
1119
+ message: string;
1120
+ }): Promise<({
1121
+ itemId: string;
1122
+ slug?: string;
1123
+ status: string;
1124
+ reviewStatus?: string | null;
1125
+ version?: number;
1126
+ [key: string]: unknown;
1127
+ }) & { mode: "save" }>;
1128
+ }
1129
+
1130
+ declare namespace slatebox.library.review {
1131
+ /** Unpublish. For administrators: take a published item out of the library, with a message saying why. Copies people already made stay theirs. @scope library:review @destructive */
1132
+ function unpublish(input: {
1133
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1134
+ itemId: string;
1135
+ /** Why: the author reads it. (1–2000 characters) */
1136
+ message: string;
1137
+ }): Promise<({
1138
+ itemId: string;
1139
+ slug?: string;
1140
+ status: string;
1141
+ reviewStatus?: string | null;
1142
+ version?: number;
1143
+ [key: string]: unknown;
1144
+ }) & { mode: "save" }>;
1145
+ }
1146
+
1147
+ declare namespace slatebox.library.review {
1148
+ /** Edit details. For administrators: change a library item's title, summary, description, category or search words directly. A branch's category stays its parent's. @scope library:review */
1149
+ function update(input: {
1150
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1151
+ itemId: string;
1152
+ /** Plain text, up to 80 characters. (1–80 characters) */
1153
+ title?: string;
1154
+ /** One line, up to 160 characters. (1–160 characters) */
1155
+ summary?: string;
1156
+ /** Plain text, up to 2,000 characters. (at most 2000 characters) */
1157
+ description?: string;
1158
+ /** One of the five categories: plan, decide, meetings, track, map. */
1159
+ category?: "plan" | "decide" | "meetings" | "track" | "map";
1160
+ /** Smart components only: words people might search for. (at most 12 items) */
1161
+ synonyms?: string[];
1162
+ /** Review your own submission. Allowed only on a server with one administrator; the thread records it. */
1163
+ selfReview?: boolean;
1164
+ }): Promise<({
1165
+ item: {
1166
+ id: string;
1167
+ slug: string;
1168
+ kind: "component" | "slate" | "presentation";
1169
+ origin: "builtin" | "user";
1170
+ title: string;
1171
+ summary: string;
1172
+ /** One of the five categories: plan, decide, meetings, track, map. */
1173
+ category?: "plan" | "decide" | "meetings" | "track" | "map";
1174
+ authorName: string;
1175
+ publishedAt?: string;
1176
+ counts: {
1177
+ copies?: number;
1178
+ adds?: number;
1179
+ branches?: number;
1180
+ [key: string]: unknown;
1181
+ };
1182
+ /** branchedFrom or forkedFrom: { itemId, version, title }. */
1183
+ provenance?: Record<string, unknown>;
1184
+ url: string;
1185
+ preview?: {
1186
+ kind?: "component" | "slate" | "presentation";
1187
+ boardKind?: string;
1188
+ notes?: number;
1189
+ [key: string]: unknown;
1190
+ };
1191
+ description?: string;
1192
+ synonyms?: string[];
1193
+ license?: string;
1194
+ categoryLocked?: boolean;
1195
+ versionCount?: number;
1196
+ publishedVersion?: number;
1197
+ /** How many times it has been published, when more than once (absent: once). */
1198
+ publishedCount?: number;
1199
+ /** Its author and reviewers only. */
1200
+ status?: "draft" | "submitted" | "in_review" | "changes_requested" | "published" | "rejected" | "unpublished";
1201
+ /** The state of the version waiting for review (its author and reviewers only). */
1202
+ reviewStatus?: string;
1203
+ pendingVersion?: number;
1204
+ /** An update to a published item: its proposed details, public once approved. */
1205
+ pendingMeta?: Record<string, unknown>;
1206
+ /** A published item's saved draft details, not yet submitted (its author only). */
1207
+ draftMeta?: Record<string, unknown>;
1208
+ sourceShareId?: string;
1209
+ reviewShareId?: string;
1210
+ lastMessage?: Record<string, unknown>;
1211
+ [key: string]: unknown;
1212
+ };
1213
+ [key: string]: unknown;
1214
+ }) & { mode: "save" }>;
1215
+ }
1216
+
1217
+ declare namespace slatebox.library {
1218
+ /** Save a component. Save the board of your builder slate (library.branch) as your own smart component, private to you: you can add it to any slate at once. The first save makes the item; later saves update it (itemId, or the builder slate remembers it). A component needs a category before it is submitted; a branch keeps its parent's (another is refused with 409 category_locked). @scope slates:write */
1219
+ function saveDraft(input: {
1220
+ /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
1221
+ shareId: string;
1222
+ /** The board on the builder slate (main by default). */
1223
+ boardId?: string;
1224
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1225
+ itemId?: string;
1226
+ /** Plain text, up to 80 characters. (1–80 characters) */
1227
+ title: string;
1228
+ /** One line, up to 160 characters. (1–160 characters) */
1229
+ summary: string;
1230
+ /** Plain text, up to 2,000 characters. (at most 2000 characters) */
1231
+ description?: string;
1232
+ /** One of the five categories: plan, decide, meetings, track, map. */
1233
+ category?: "plan" | "decide" | "meetings" | "track" | "map";
1234
+ /** Smart components only: words people might search for. (at most 12 items) */
1235
+ synonyms?: string[];
1236
+ }): Promise<({
1237
+ itemId: string;
1238
+ slug?: string;
1239
+ status: string;
1240
+ reviewStatus?: string | null;
1241
+ version?: number;
1242
+ [key: string]: unknown;
1243
+ }) & { mode: "save" }>;
1244
+ }
1245
+
1246
+ declare namespace slatebox.library {
1247
+ /** Library counts. How many published items the shared library holds: smart components (built in and from the community, and the total), slates, presentations, and items per category. Open to anyone. @scope slates:read */
1248
+ function stats(input: Record<string, unknown>): Promise<{
1249
+ components: {
1250
+ builtin?: number;
1251
+ community?: number;
1252
+ total?: number;
1253
+ [key: string]: unknown;
1254
+ };
1255
+ slates: number;
1256
+ presentations: number;
1257
+ categories: Record<string, unknown>;
1258
+ updatedAt?: string;
405
1259
  [key: string]: unknown;
406
1260
  }>;
407
1261
  }
408
1262
 
1263
+ declare namespace slatebox.library {
1264
+ /** Submit to the library. Send something of yours for review, to be published in the shared library: a smart component you saved (itemId), or a slate you own or administer (shareId; kind presentation sends its deck too). Once approved anyone can find, use and change it, shared under CC BY 4.0. Sending a published item again proposes an update; the published version stays until the update is approved. Up to 10 a day. A guest must sign up first (403 sign_in_to_publish). The person agrees first. @scope slates:share @confirm */
1265
+ function submit(input: {
1266
+ kind: "component" | "slate" | "presentation";
1267
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1268
+ itemId?: string;
1269
+ /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
1270
+ shareId?: string;
1271
+ /** Plain text, up to 80 characters. (1–80 characters) */
1272
+ title?: string;
1273
+ /** One line, up to 160 characters. (1–160 characters) */
1274
+ summary?: string;
1275
+ /** Plain text, up to 2,000 characters. (at most 2000 characters) */
1276
+ description?: string;
1277
+ /** One of the five categories: plan, decide, meetings, track, map. */
1278
+ category?: "plan" | "decide" | "meetings" | "track" | "map";
1279
+ /** Smart components only: words people might search for. (at most 12 items) */
1280
+ synonyms?: string[];
1281
+ /** A note for the reviewer: the first message of the item's thread. (1–2000 characters) */
1282
+ note?: string;
1283
+ }): Promise<({
1284
+ itemId: string;
1285
+ slug?: string;
1286
+ status: string;
1287
+ reviewStatus?: string | null;
1288
+ version?: number;
1289
+ [key: string]: unknown;
1290
+ }) & { mode: "save" }>;
1291
+ }
1292
+
1293
+ declare namespace slatebox.library {
1294
+ /** Withdraw. Take back your submission before it is reviewed (it is a draft again), or take your published item out of the library (copies people made stay theirs). @scope slates:write */
1295
+ function withdraw(input: {
1296
+ /** The item: its id or its slug (library.list items[].id or .slug). (1–120 characters) */
1297
+ itemId: string;
1298
+ }): Promise<({
1299
+ itemId: string;
1300
+ slug?: string;
1301
+ status: string;
1302
+ reviewStatus?: string | null;
1303
+ version?: number;
1304
+ [key: string]: unknown;
1305
+ }) & { mode: "save" }>;
1306
+ }
1307
+
1308
+ declare namespace slatebox.media {
1309
+ /** Video info. Read a YouTube, Vimeo or Loom address: the video's host, id, canonical address, start time, title and author, and its poster picture stored in this app (so people's browsers reach the video host only when they press play). Pass the answer as media in an add_nodes operation (count 1), or call slates.addMedia to look up and add in one step. When the host shares no title or picture the video still comes back, with a notice. Any other address is refused with 400 not_a_video. At most 60 new videos per person per hour. @scope slates:write @openWorld @idempotent */
1310
+ function lookup(input: {
1311
+ /** The video's address: a YouTube, Vimeo or Loom link. (1–2000 characters) */
1312
+ url: string;
1313
+ }): Promise<({
1314
+ /** A video a media note plays: the address, the host, and the title and poster when the host shared them. */
1315
+ media: {
1316
+ provider: "youtube" | "vimeo" | "loom";
1317
+ id: string;
1318
+ /** The canonical watch address. */
1319
+ url: string;
1320
+ hash?: string;
1321
+ /** Where it starts, in seconds. */
1322
+ start?: number;
1323
+ title?: string;
1324
+ author?: string;
1325
+ /** The poster picture, in this app's image store. */
1326
+ poster?: string;
1327
+ posterWidth?: number;
1328
+ posterHeight?: number;
1329
+ [key: string]: unknown;
1330
+ };
1331
+ /** False when the host shared nothing about the video (private, removed, or not answering). */
1332
+ found: boolean;
1333
+ notice?: string;
1334
+ [key: string]: unknown;
1335
+ }) & { mode: "save" }>;
1336
+ }
1337
+
409
1338
  declare namespace slatebox.presence {
410
1339
  /** Show a plan. Show the people on a slate what this run will do: 1 to 8 short steps, as a checklist beside your named pointer. The first step is under way; presence.step ticks the steps. Saves move the pointer to what they change. At most 3 plans per run. A preview run shows nothing. @scope slates:write @modes save|preview */
411
1340
  function plan(input: {
@@ -614,6 +1543,12 @@ declare namespace slatebox.shapes {
614
1543
  textBox?: Record<string, unknown> | null;
615
1544
  visibility?: "private" | "team";
616
1545
  mine?: boolean;
1546
+ /** For an icon from The Noun Project: the credit to show with it. */
1547
+ credit?: {
1548
+ text?: string;
1549
+ url?: string | null;
1550
+ [key: string]: unknown;
1551
+ };
617
1552
  [key: string]: unknown;
618
1553
  }>;
619
1554
  cached?: boolean;
@@ -644,14 +1579,104 @@ declare namespace slatebox.shapes {
644
1579
  textBox?: Record<string, unknown> | null;
645
1580
  visibility?: "private" | "team";
646
1581
  mine?: boolean;
1582
+ /** For an icon from The Noun Project: the credit to show with it. */
1583
+ credit?: {
1584
+ text?: string;
1585
+ url?: string | null;
1586
+ [key: string]: unknown;
1587
+ };
647
1588
  [key: string]: unknown;
648
1589
  }>;
649
1590
  [key: string]: unknown;
650
1591
  }>;
651
1592
  }
652
1593
 
1594
+ declare namespace slatebox.shapes {
1595
+ /** Icons. Search The Noun Project's icons by words. Each result is one checked outline in a 0..100 box (icons that cannot be one outline are left out) with credit: the text and link The Noun Project asks to show with the icon. An applyOperations update_nodes or add_nodes plan takes {name, d, fillRule} as the shape. Not counted as AI use. Answers 503 icons_not_set_up on a server without a Noun Project key. @scope slates:read @openWorld */
1596
+ function searchIcons(input: {
1597
+ /** Words for the icon, such as songbird. (1–100 characters) */
1598
+ q: string;
1599
+ /** (1 to 24, default 12) */
1600
+ limit?: number;
1601
+ }): Promise<{
1602
+ icons: Array<{
1603
+ iconId?: string;
1604
+ name?: string;
1605
+ /** The outline: one SVG path in a 0..100 box. */
1606
+ d?: string;
1607
+ fillRule?: "nonzero" | "evenodd";
1608
+ /** Width / height. */
1609
+ aspect?: number;
1610
+ /** Where a label sits, in 0..1 of the box. */
1611
+ textBox?: Record<string, unknown> | null;
1612
+ credit?: {
1613
+ text?: string;
1614
+ url?: string;
1615
+ [key: string]: unknown;
1616
+ };
1617
+ license?: string | null;
1618
+ [key: string]: unknown;
1619
+ }>;
1620
+ hasMore?: boolean;
1621
+ credit?: {
1622
+ text?: string;
1623
+ url?: string;
1624
+ [key: string]: unknown;
1625
+ };
1626
+ [key: string]: unknown;
1627
+ }>;
1628
+ }
1629
+
653
1630
  declare namespace slatebox.slates {
654
- /** Edit a slate. mode "preview" shows the result without saving. Every edit names the revision it was made on: a canvas plan (notes and connections) sends expectedRevision, the revision slates.get returned; a workshop or map plan holds one operation with its own expectedRevision (workshop.revision), and saving it requires an Idempotency-Key. Without it the edit is refused with 400 invalid_request naming expectedRevision. On a workshop, workshop_edits makes 1 to 50 edits (add, move, rename, remove cards and lanes) by the rules people meet; a refusal answers 409 edit_refused with the sentence a person sees, and a move the rules refuse answers 409 move_refused. A saved workshop edit answers with a receiptId that undo_workshop_edit takes. A slate holds up to 8 boards: a workshop operation names its board (boardId, from slates.get boards[]); on a slate of several boards one that names none is refused with 400 board_required listing them. add_component adds a library component (components.list) beside the slate's notes and boards and answers with its boardId; it carries its own expectedRevision (the slate revision). @scope slates:write @modes save|preview @destructive */
1631
+ /** Add video. Add a video note to a slate from a YouTube, Vimeo or Loom address: the poster (stored in this app), a play button, and the title and host. It plays where it sits when someone presses play, never on its own, and plays inline in presentations. x and y place its top-left corner (320 by 180); without them it goes beside the slate's notes. One save, like slates.applyOperations; mode "preview" stores nothing. Added by an agent, the note is a live suggestion (202, outcome "suggested") for people on the slate to keep or discard, unless a person lets that agent edit directly. @scope slates:write @modes save|preview */
1632
+ function addMedia(input: {
1633
+ /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
1634
+ shareId: string;
1635
+ /** The video's address: a YouTube, Vimeo or Loom link. (1–2000 characters) */
1636
+ url: string;
1637
+ /** The note's left edge, in canvas units. Send with y. (-1000000 to 1000000) */
1638
+ x?: number;
1639
+ /** The note's top edge, in canvas units. Send with x. (-1000000 to 1000000) */
1640
+ y?: number;
1641
+ /** preview returns what would change and saves nothing. (default "save") */
1642
+ mode?: "save" | "preview";
1643
+ }): Promise<({
1644
+ ok: boolean;
1645
+ mode?: string;
1646
+ shareId: string;
1647
+ revision?: number;
1648
+ message: string;
1649
+ /** The video note's id. */
1650
+ nodeId?: string;
1651
+ /** suggested: added by an agent, the note is shown live on the slate for a person to keep or discard; nothing is saved yet. */
1652
+ outcome?: "saved" | "suggested";
1653
+ /** outcome suggested: the suggestion (actionId, items) as list_suggestions gives it. */
1654
+ suggestion?: Record<string, unknown>;
1655
+ /** A video a media note plays: the address, the host, and the title and poster when the host shared them. */
1656
+ media: {
1657
+ provider: "youtube" | "vimeo" | "loom";
1658
+ id: string;
1659
+ /** The canonical watch address. */
1660
+ url: string;
1661
+ hash?: string;
1662
+ /** Where it starts, in seconds. */
1663
+ start?: number;
1664
+ title?: string;
1665
+ author?: string;
1666
+ /** The poster picture, in this app's image store. */
1667
+ poster?: string;
1668
+ posterWidth?: number;
1669
+ posterHeight?: number;
1670
+ [key: string]: unknown;
1671
+ };
1672
+ notice?: string;
1673
+ report?: Record<string, unknown>;
1674
+ [key: string]: unknown;
1675
+ }) & { mode: "save" | "preview" }>;
1676
+ }
1677
+
1678
+ declare namespace slatebox.slates {
1679
+ /** Edit a slate. mode "preview" shows the result without saving. Every edit names the revision it was made on: a canvas plan (notes and connections) sends expectedRevision, the revision slates.get returned; a workshop or map plan holds one operation with its own expectedRevision (workshop.revision), and saving it requires an Idempotency-Key. Without it the edit is refused with 400 invalid_request naming expectedRevision. On a workshop, workshop_edits makes 1 to 50 edits (add, move, rename, remove cards and lanes) by the rules people meet; a refusal answers 409 edit_refused with the sentence a person sees, and a move the rules refuse answers 409 move_refused. A saved workshop edit answers with a receiptId that undo_workshop_edit takes. A slate holds up to 8 boards: a workshop operation names its board (boardId, from slates.get boards[]); on a slate of several boards one that names none is refused with 400 board_required listing them. add_component adds a library component (components.list) beside the slate's notes and boards and answers with its boardId; it carries its own expectedRevision (the slate revision). A canvas plan saved by an agent is shown live on the slate as suggestions (outcome "suggested", 202) for people there to keep or discard, unless a person lets that agent edit directly; its new notes' ids work in the next edit. @scope slates:write @modes save|preview @destructive */
655
1680
  function applyOperations(input: {
656
1681
  /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
657
1682
  shareId: string;
@@ -692,6 +1717,10 @@ declare namespace slatebox.slates {
692
1717
  };
693
1718
  /** A saved workshop edit: pass it to undo_workshop_edit. */
694
1719
  receiptId?: string;
1720
+ /** suggested: an agent's canvas edit is shown live on the slate as suggestions for people there to keep or discard; nothing was saved yet (revision is unchanged). Its new notes' ids work in your next edit. saved: the edit is saved. */
1721
+ outcome?: "saved" | "suggested";
1722
+ /** outcome suggested: the suggestion (actionId, items) as list_suggestions gives it. */
1723
+ suggestion?: Record<string, unknown>;
695
1724
  workshop?: Workshop;
696
1725
  [key: string]: unknown;
697
1726
  }) & { mode: "save" | "preview" }>;
@@ -721,18 +1750,12 @@ declare namespace slatebox.slates {
721
1750
  }
722
1751
 
723
1752
  declare namespace slatebox.slates {
724
- /** Copy slate. Make a private copy of a slate you may edit, a public slate or template, or a slate whose presentation is published publicly. Someone who may only view a private slate cannot copy it. A template becomes an ordinary slate based on it unless keepTemplate is set. A published presentation of the slate is copied with it as a private presentation of the copy. @scope slates:write */
1753
+ /** Copy slate. Make a private copy of a slate you may edit, a public slate, or a slate whose presentation is published publicly. Someone who may only view a private slate cannot copy it. The copy is an ordinary private slate. A published presentation of the slate is copied with it as a private presentation of the copy. To use something from the library, fork it (library.fork). @scope slates:write */
725
1754
  function copy(input: {
726
1755
  /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
727
1756
  shareId: string;
728
1757
  /** (1–200 characters) */
729
1758
  name?: string;
730
- /** (1–200 characters) */
731
- projectName?: string;
732
- /** (default false) */
733
- keepTemplate?: boolean;
734
- /** (default false) */
735
- fromTemplate?: boolean;
736
1759
  }): Promise<({
737
1760
  shareId: string;
738
1761
  /** (at least 1) */
@@ -810,11 +1833,11 @@ declare namespace slatebox.slates {
810
1833
  }
811
1834
 
812
1835
  declare namespace slatebox.slates {
813
- /** Read a slate. Read a slate you can open: every note with every key a write sets, its connectors, what you may do here (access), its address, comments, conversation starters and, on a workshop or map, the workshop with its own revision (the one workshop and map edits use) and what it takes in plain words (workshop.can). revision is the slate's save count: send it as expectedRevision with an edit, and the edit is refused only if a note it changes was changed since. Select notes with ids, within, groupId or q (the notes a write naming that text would change) and keys with fields; page with cursor. include=full adds the slate as the engine loads it. A public slate reads without a token. @scope slates:read */
1836
+ /** Read a slate. Read a slate you can open: every note with every key a write sets, its connectors, what you may do here (access), its address, comments, conversation starters and, on a workshop or map, the workshop with its own revision (the one workshop and map edits use) and what it takes in plain words (workshop.can). revision is the slate's save count: send it as expectedRevision with an edit, and the edit is refused only if a note it changes was changed since. Select notes with ids, within, groupId or q (the notes a write naming that text would change) and keys with fields; page with cursor. include=full adds the slate as the engine loads it; include=suggestions adds what agents suggested here (waiting for people to keep or discard, with their ids) and what became of each agent's recent edits. A public slate reads without a token. @scope slates:read */
814
1837
  function get(input: {
815
1838
  /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
816
1839
  shareId: string;
817
- include?: "full";
1840
+ include?: "full" | "suggestions";
818
1841
  /** Comma-separated note keys to return (id always comes): any key a write sets, and image and comments. */
819
1842
  fields?: string;
820
1843
  /** Comma-separated note IDs: only these notes. */
@@ -897,6 +1920,35 @@ declare namespace slatebox.slates {
897
1920
  }>;
898
1921
  }
899
1922
 
1923
+ declare namespace slatebox.slates {
1924
+ /** Redo. Makes again the edit this caller last took back with slates.undo, if the caller has saved no edit on this slate since (a new edit clears what can be redone). Each part goes back to how the edit left it, unless someone else changed it since: that part stays as they left it and is listed in left[]. Saved as an edit, and refused for an agent, as slates.undo is. 409 nothing_to_redo when there is nothing of the caller's to redo. @scope slates:write @destructive */
1925
+ function redo(input: {
1926
+ /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
1927
+ shareId: string;
1928
+ }): Promise<({
1929
+ ok: boolean;
1930
+ shareId: string;
1931
+ /** The slate revision after this save. (at least 0) */
1932
+ revision?: number;
1933
+ message?: string;
1934
+ /** slates.undo: the edit it took back (its run id). */
1935
+ undone?: string;
1936
+ /** slates.redo: the edit it made again (its run id). */
1937
+ redone?: string;
1938
+ /** The canvas plan that was saved to do it. */
1939
+ operations: Array<Record<string, unknown>>;
1940
+ /** Each note, connection or setting someone else changed since, left as they left it. */
1941
+ left: Array<{
1942
+ kind?: string;
1943
+ id?: string;
1944
+ key?: string;
1945
+ reason?: string;
1946
+ [key: string]: unknown;
1947
+ }>;
1948
+ [key: string]: unknown;
1949
+ }) & { mode: "save" }>;
1950
+ }
1951
+
900
1952
  declare namespace slatebox.slates {
901
1953
  /** Unshare. Withdraws exactly this invitation. Named team grants stay. Repeating the request confirms the same withdrawal; a newer invitation is never withdrawn by an old command. @scope slates:share @destructive @idempotent */
902
1954
  function revokeInvite(input: {
@@ -912,6 +1964,62 @@ declare namespace slatebox.slates {
912
1964
  }) & { mode: "save" }>;
913
1965
  }
914
1966
 
1967
+ declare namespace slatebox.slates {
1968
+ /** Undo. Takes back the newest canvas edit this caller saved on the slate with slates.applyOperations (notes, connections, slate settings) that is not undone yet: the same account and the same token, so it never takes back a person's or another agent's edit. Each note, connection and setting the edit changed goes back to how it was, unless someone else changed it since: that part stays as they left it and is listed in left[]. The undo is saved as an edit (the revision goes up, every open canvas shows it) and answers the run it undid (undone). Workshop and map edits are undone with undo_workshop_edit. An agent undoes by the rules its edits meet: 423 agents_paused while people paused agents, 409 needs_direct_edit unless a person lets it edit directly. 409 nothing_to_undo when no edit of the caller is left to undo; 409 slate_changed when the slate changed while it was being saved (call again). @scope slates:write @destructive */
1969
+ function undo(input: {
1970
+ /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
1971
+ shareId: string;
1972
+ }): Promise<({
1973
+ ok: boolean;
1974
+ shareId: string;
1975
+ /** The slate revision after this save. (at least 0) */
1976
+ revision?: number;
1977
+ message?: string;
1978
+ /** slates.undo: the edit it took back (its run id). */
1979
+ undone?: string;
1980
+ /** slates.redo: the edit it made again (its run id). */
1981
+ redone?: string;
1982
+ /** The canvas plan that was saved to do it. */
1983
+ operations: Array<Record<string, unknown>>;
1984
+ /** Each note, connection or setting someone else changed since, left as they left it. */
1985
+ left: Array<{
1986
+ kind?: string;
1987
+ id?: string;
1988
+ key?: string;
1989
+ reason?: string;
1990
+ [key: string]: unknown;
1991
+ }>;
1992
+ [key: string]: unknown;
1993
+ }) & { mode: "save" }>;
1994
+ }
1995
+
1996
+ declare namespace slatebox.suggestions {
1997
+ /** Keep/discard/undo. Decide what an agent's work on a slate becomes, as the canvas does. keep or discard: what it suggested, as Keep and Discard on each ghost: name the action (actionId, from your edit or slates.get include=suggestions), optionally some of its items (itemIds); Keep all on an agent's chip decides each of its actions. Keeping saves them as one change (a line brings the new notes at its ends); an item whose note is gone is refused and says why. Discarding saves nothing. undo: one action (actionId) that was kept or saved directly, as Undo in the agent's activity list: only that action, and only what nobody changed since (left[] says what stayed and why), so it never undoes another agent's work or a person's. Needs the edit right on the slate. Only people keep: an agent never keeps suggestions, and undoes only its own work. An invited agent's action card (a waiting note that stands for a change outside Slatebox, such as a new Linear issue) is approved by keeping that note on its own (itemIds) and declined by discarding it; Keep all never approves one, and held[] says why a card waits. @scope slates:write @destructive */
1998
+ function decide(input: {
1999
+ /** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
2000
+ shareId: string;
2001
+ decision: "keep" | "discard" | "undo";
2002
+ /** The action, as list_suggestions gives it (actions[].actionId). (1–64 characters) */
2003
+ actionId: string;
2004
+ /** Only these items of the action. (1–200 items) */
2005
+ itemIds?: string[];
2006
+ }): Promise<({
2007
+ ok: boolean;
2008
+ shareId: string;
2009
+ revision?: number;
2010
+ kept?: Array<Record<string, unknown>>;
2011
+ discarded?: Array<Record<string, unknown>>;
2012
+ refused?: Array<Record<string, unknown>>;
2013
+ /** undo: the items undone. */
2014
+ undone?: string[];
2015
+ /** undo: the items left as they are, each with its reason. */
2016
+ left?: Array<Record<string, unknown>>;
2017
+ /** keep: waiting items that stand for a change outside Slatebox (an action card) and were not approved, each with why (approve each card on its own; only its inviter approves unless they let others). discard: cards whose change is being made right now (they cannot be stopped) or was already made. */
2018
+ held?: Array<Record<string, unknown>>;
2019
+ [key: string]: unknown;
2020
+ }) & { mode: "save" }>;
2021
+ }
2022
+
915
2023
  declare namespace slatebox.team {
916
2024
  /** Export team. For a team admin: a one-time address (15 minutes) to download everything the team owns as one archive, in the open team export format: slates with their boards and smart components, recent versions and events, comments, presentations, files, people and roles, published-link settings, AI connections (never keys) and the names and scopes of API tokens (never secrets). A POST to downloadUrl downloads it; a passphrase (form or JSON field "passphrase", the Slatebox-Export-Passphrase-Base64 header as base64url of its UTF-8 bytes, or the Slatebox-Export-Passphrase header when it is plain ASCII; at least 12 characters, not starting or ending with a space) encrypts the archive. The archive is signed and checked; teamImports.start imports it on any Slatebox server. @scope team:export @confirm */
917
2025
  function export(input: Record<string, unknown>): Promise<({
@@ -1079,8 +2187,15 @@ interface AddComponentPlan {
1079
2187
  /** (1–1 items) */
1080
2188
  operations: Array<{
1081
2189
  kind: "add_component";
1082
- /** The library entry to add (components.list ids). */
1083
- component: "now-next-later" | "pros-cons" | "must-should-could" | "decision-path" | "retro" | "triage" | "team-board" | "launch-plan" | "customer-go-live" | "hiring-plan" | "sort-evidence" | "discovery-tree" | "break-down-problem" | "incident-review" | "impact-effort" | "reorg-sandbox" | "goals-owners" | "sales-pipeline" | "budget";
2190
+ /** The library entry to add (components.list ids). Or name a shared library item with library instead. */
2191
+ component?: "now-next-later" | "pros-cons" | "must-should-could" | "decision-path" | "retro" | "triage" | "team-board" | "launch-plan" | "customer-go-live" | "hiring-plan" | "sort-evidence" | "discovery-tree" | "break-down-problem" | "incident-review" | "impact-effort" | "reorg-sandbox" | "goals-owners" | "sales-pipeline" | "budget";
2192
+ /** A smart component from the shared library (in place of component). */
2193
+ library?: {
2194
+ /** A smart component from library.list (kind component), or one of your own. (1–120 characters) */
2195
+ itemId: string;
2196
+ /** (at least 1) */
2197
+ version?: number;
2198
+ };
1084
2199
  /** What it is about: names the board ("Retro: Q3 launch"). (1–100 characters) */
1085
2200
  topic?: string;
1086
2201
  /** The slate revision you read (slates.get). (at least 0) */
@@ -1142,6 +2257,23 @@ interface CanvasPlan {
1142
2257
  gap?: number;
1143
2258
  connect?: boolean;
1144
2259
  };
2260
+ /** add_nodes, count 1, no shape, preset or text: a media note, a video from YouTube, Vimeo or Loom drawn as its poster with a play button; it plays where it sits when someone presses play, never on its own. Hosts add videos through their own add-media action, which fetches the title and stores the poster. */
2261
+ media?: {
2262
+ /** The video's address. (at most 2000 characters) */
2263
+ url: string;
2264
+ /** (at most 300 characters) */
2265
+ title?: string;
2266
+ /** (at most 120 characters) */
2267
+ author?: string;
2268
+ /** Where to start, in seconds. (1 to 86400) */
2269
+ start?: number;
2270
+ /** The poster picture: an https address, or a path on this app (/...). (at most 2000 characters) */
2271
+ poster?: string;
2272
+ /** (1 to 10000) */
2273
+ posterWidth?: number;
2274
+ /** (1 to 10000) */
2275
+ posterHeight?: number;
2276
+ };
1145
2277
  /** add_nodes: note keys for the new notes. connect_nodes: connector keys for the new connectors. */
1146
2278
  style?: {
1147
2279
  /** (-360 to 360) */
@@ -1466,6 +2598,12 @@ interface SlateRead {
1466
2598
  } | null;
1467
2599
  /** Notes the selection matches, on every page. (at least 0) */
1468
2600
  nodeCount: number;
2601
+ /** include=suggestions: what agents suggested here (each waiting item is a ghost people keep or discard; your own canvas saves land here too) and each agent's recent actions, with the ids decide_suggestions takes. */
2602
+ suggestions?: {
2603
+ paused?: boolean;
2604
+ actions?: Array<Record<string, unknown>>;
2605
+ [key: string]: unknown;
2606
+ };
1469
2607
  nodes: Array<{
1470
2608
  id: string;
1471
2609
  /** The note's text. */
@@ -1888,7 +3026,7 @@ interface WorkshopEditsPlan {
1888
3026
  /** (1–64 characters) */
1889
3027
  id: string;
1890
3028
  };
1891
- /** True to move it anyway when a rule refuses it (lane boards and maps), once the person agreed to break that rule. The card shows who moved it anyway and when. */
3029
+ /** True to move it anyway when a rule refuses it, once the person agreed to break that rule (every board but release plans and startup experiences). The card shows who moved it anyway and when. */
1892
3030
  override?: boolean;
1893
3031
  } | {
1894
3032
  kind: "advance_card";
@@ -2146,8 +3284,10 @@ interface WorkshopEditsPlan {
2146
3284
  };
2147
3285
  /** Its days, 1 to 60. (1 to 60) */
2148
3286
  duration?: number;
2149
- /** Days it waits, 0 or more. (0 to 120) */
3287
+ /** Days it waits after what it waits on ends, 0 or more (below 0, with override: it starts before what it waits on ends). (-120 to 120) */
2150
3288
  lag?: number;
3289
+ /** True to set it anyway when a rule refuses it (a lock, a freeze, an overlap, the line, what it waits on), once the person agreed to break that rule. The task shows who moved it anyway and when. */
3290
+ override?: boolean;
2151
3291
  } | {
2152
3292
  kind: "link_tasks";
2153
3293
  /** The task that waits. */
@@ -2307,6 +3447,29 @@ interface WorkshopEditsPlan {
2307
3447
  kind: "remove_rule";
2308
3448
  /** The rule id. (1–64 characters) */
2309
3449
  rule: string;
3450
+ } | {
3451
+ kind: "set_appearance";
3452
+ /** Borders, headers and fills together. */
3453
+ emphasis?: "subtle" | "normal" | "strong";
3454
+ /** The columns’ outlines. */
3455
+ borders?: "subtle" | "normal" | "strong";
3456
+ /** Column headers: strong is bold with a deeper fill. */
3457
+ headers?: "subtle" | "normal" | "strong";
3458
+ /** Header text size. */
3459
+ headerSize?: "normal" | "large";
3460
+ /** The columns’ fills: soft is a softer background. */
3461
+ fill?: "soft" | "normal" | "strong";
3462
+ /** Grid lines between the columns (a 2 by 2’s quadrant lines). */
3463
+ lines?: boolean;
3464
+ /** Card size. */
3465
+ density?: "normal" | "compact";
3466
+ /** With color: the lane (on a 2 by 2, also a quadrant by name). */
3467
+ lane?: string | {
3468
+ /** (1–64 characters) */
3469
+ id: string;
3470
+ };
3471
+ /** With lane: its color, or none for its own. */
3472
+ color?: "red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "teal" | "brown" | "gray" | "none";
2310
3473
  } | {
2311
3474
  kind: "set_plan_start";
2312
3475
  /** The new first day, as 2026-11-30. (10–10 characters) */
@@ -2347,6 +3510,8 @@ interface WorkshopEditsPlan {
2347
3510
  /** (1–64 characters) */
2348
3511
  id: string;
2349
3512
  };
3513
+ /** True to nest it anyway when a rule refuses it (a role, a depth, a parent’s limit), once the person agreed to break that rule. The card shows who moved it anyway and when. */
3514
+ override?: boolean;
2350
3515
  } | {
2351
3516
  kind: "start_pile";
2352
3517
  /** The card. */