slatebox-mcp 0.3.5 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -9
- package/generated/client.json +574 -681
- package/generated/exec-tool.json +90 -73
- package/generated/guest-client.js +1 -1
- package/generated/slatebox.d.ts +189 -196
- package/package.json +9 -5
- package/src/cli.js +18 -60
- package/src/client/index.js +6 -1
- package/src/{slatebox.js → commands.js} +57 -41
- package/src/mcp.js +96 -0
- package/src/server.js +1 -1
package/generated/slatebox.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ declare namespace slatebox.agentTasks {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
declare namespace slatebox.ai.audit {
|
|
154
|
-
/** AI control changes. Lists changes to the
|
|
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
155
|
function list(input: {
|
|
156
156
|
/** (1 to 200) */
|
|
157
157
|
limit?: number;
|
|
@@ -170,88 +170,45 @@ declare namespace slatebox.ai.audit {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
declare namespace slatebox.ai.bindings {
|
|
173
|
-
/** AI bindings. Lists every part of Slatebox that can be bound
|
|
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
174
|
function list(input: Record<string, unknown>): Promise<{
|
|
175
175
|
generation?: number;
|
|
176
176
|
surfaces?: Array<Record<string, unknown>>;
|
|
177
|
+
skipped?: Array<Record<string, unknown>>;
|
|
177
178
|
[key: string]: unknown;
|
|
178
179
|
}>;
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
declare namespace slatebox.ai.bindings {
|
|
182
|
-
/**
|
|
183
|
-
function
|
|
184
|
-
|
|
185
|
-
|
|
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. */
|
|
186
188
|
surface: "default" | "chat" | "chat.route" | "generation" | "presentation" | "vision" | "images" | "shape" | "workshop" | "workshop.draft" | "canvas" | "agent.slatebox" | "library" | "connectors";
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
enabled?: boolean;
|
|
193
|
-
/** What people see while it is off. (at most 300 characters) */
|
|
194
|
-
disabledMessage?: string | null;
|
|
195
|
-
/** The primary model, then fallbacks. Each entry names a model from the model list (model) or a connection with its own model (connection: server:<name>, or builtin for the built-in AI). Empty: follow what it follows. (at most 5 items) */
|
|
196
|
-
chain?: Array<{
|
|
197
|
-
/** (at most 260 characters) */
|
|
198
|
-
model?: string;
|
|
199
|
-
/** (at most 60 characters) */
|
|
200
|
-
connection?: string;
|
|
201
|
-
/** A fallback is tried when the previous model failed this way: infra (5xx, 429, timeout), shape (answers it could not use), context (too long), any. */
|
|
202
|
-
on?: Array<"infra" | "shape" | "context" | "any">;
|
|
203
|
-
}>;
|
|
204
|
-
/** When the chain keeps failing on a server: fallback uses the settings file and built-in AI for 10 minutes; report keeps the chain and says so. Unset: fallback only for a chain of two or more that lists the built-in AI. */
|
|
205
|
-
onTrip?: "fallback" | "report" | null;
|
|
206
|
-
/** timeoutMs, maxTokens (only lowers the call site's), infraRetries, shapeRetries, temperature. null or absent: the built-in value. */
|
|
207
|
-
params?: {
|
|
208
|
-
/** (1000 to 600000) */
|
|
209
|
-
timeoutMs?: number | null;
|
|
210
|
-
/** (1 to 1000000) */
|
|
211
|
-
maxTokens?: number | null;
|
|
212
|
-
/** (0 to 10) */
|
|
213
|
-
infraRetries?: number | null;
|
|
214
|
-
/** (1 to 10) */
|
|
215
|
-
shapeRetries?: number | null;
|
|
216
|
-
/** (0 to 2) */
|
|
217
|
-
temperature?: number | null;
|
|
218
|
-
};
|
|
219
|
-
/** slot: prompt id, or id@version to pin one. */
|
|
220
|
-
prompts?: Record<string, string>;
|
|
221
|
-
/** allow: the only tools sent and accepted back; mode forced, auto or none (none only where the part needs no tools). */
|
|
222
|
-
tools?: {
|
|
223
|
-
mode?: "forced" | "auto" | "none" | null;
|
|
224
|
-
/** (at most 30 items) */
|
|
225
|
-
allow?: string[] | null;
|
|
226
|
-
};
|
|
227
|
-
/** Micro-dollars per request; can only lower the built-in values. */
|
|
228
|
-
limits?: {
|
|
229
|
-
/** (at least 1) */
|
|
230
|
-
estimate?: number | null;
|
|
231
|
-
/** (at least 1) */
|
|
232
|
-
ceiling?: number | null;
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
/** A short note kept with the version. (at most 200 characters) */
|
|
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) */
|
|
236
194
|
note?: string;
|
|
237
195
|
}): Promise<({
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
status?: string;
|
|
196
|
+
changed?: string[];
|
|
197
|
+
generation?: number | null;
|
|
241
198
|
[key: string]: unknown;
|
|
242
199
|
}) & { mode: "save" }>;
|
|
243
200
|
}
|
|
244
201
|
|
|
245
202
|
declare namespace slatebox.ai {
|
|
246
|
-
/** Test AI. Tests
|
|
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 */
|
|
247
204
|
function check(input: {
|
|
248
|
-
/** me (yours)
|
|
249
|
-
level?: "me" | "team"
|
|
205
|
+
/** me (yours) or team (team admins). */
|
|
206
|
+
level?: "me" | "team";
|
|
250
207
|
name?: string;
|
|
251
208
|
connection?: {
|
|
252
209
|
/** Your name for it, for example desk-model. */
|
|
253
210
|
name: string;
|
|
254
|
-
/** The provider: openai-compatible (any host or local server: Ollama, llama.cpp, vLLM, LM Studio and others), openai, anthropic, deepinfra, or one an administrator added
|
|
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. */
|
|
255
212
|
type: string;
|
|
256
213
|
/** For openai-compatible: the address up to /v1, for example http://host.docker.internal:11434/v1. (at most 500 characters) */
|
|
257
214
|
baseUrl?: string;
|
|
@@ -282,68 +239,11 @@ declare namespace slatebox.ai {
|
|
|
282
239
|
}) & { mode: "save" }>;
|
|
283
240
|
}
|
|
284
241
|
|
|
285
|
-
declare namespace slatebox.ai.connections {
|
|
286
|
-
/** AI connections. Lists the server's AI connections: the settings file's (read-only) and the ones saved in the app, including the services beside the models (Stability, Google picture search, Noun Project, Deepgram). For each: its provider, address, model, where its key lives (sealed, an environment variable, the settings file or none), which key it is (a fingerprint, never the key), its last test and whether it is turned off. Administrators only. @scope ai:admin:read */
|
|
287
|
-
function list(input: Record<string, unknown>): Promise<{
|
|
288
|
-
connections?: Array<Record<string, unknown>>;
|
|
289
|
-
keysAvailable?: boolean;
|
|
290
|
-
[key: string]: unknown;
|
|
291
|
-
}>;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
declare namespace slatebox.ai.connections {
|
|
295
|
-
/** Save AI connections. Adds or changes server connections: a provider, address, model and key. A key is sealed with the server's key and never returned; keyRef env reads it from an environment variable named SLATEBOX_AI_KEY_… for each request; rotate {graceHours} keeps the old key working for 1 or 24 hours. status disabled keeps a connection but sends nothing to it. Also connects the services beside the models (stability, google-cse with its search engine ID as model, nounproject as key:secret, deepgram). Only a person sends a key, names an environment variable or changes an address or provider; an agent may save a keyless connection to a provider with a fixed address. Administrators only. @scope ai:admin @destructive @confirm @idempotent */
|
|
296
|
-
function save(input: {
|
|
297
|
-
/** (1–20 items) */
|
|
298
|
-
connections: Array<{
|
|
299
|
-
/** The connection's name, for example gemini-main. */
|
|
300
|
-
name: string;
|
|
301
|
-
/** The provider: openai-compatible, openai, anthropic, deepinfra, one an administrator added, or a service beside the models (stability, google-cse, nounproject, deepgram). */
|
|
302
|
-
type: string;
|
|
303
|
-
/** For a provider without a fixed address: the address up to /v1. (at most 500 characters) */
|
|
304
|
-
baseUrl?: string;
|
|
305
|
-
/** The model it serves. For google-cse, the search engine ID (cx). (at most 200 characters) */
|
|
306
|
-
model?: string;
|
|
307
|
-
/** Stored encrypted with the server's key and never shown again. Leave it out to keep the saved key. For nounproject: key:secret. (at most 400 characters) */
|
|
308
|
-
apiKey?: string;
|
|
309
|
-
/** env: read the key from an environment variable named SLATEBOX_AI_KEY_… (or one the settings file allows) for each request; none: no key. Sending apiKey seals the key instead. */
|
|
310
|
-
keyRef?: {
|
|
311
|
-
kind: "env" | "none";
|
|
312
|
-
name?: string;
|
|
313
|
-
};
|
|
314
|
-
/** With a new apiKey: the old key keeps working for this many hours, in case the provider has not taken the new one yet. */
|
|
315
|
-
rotate?: {
|
|
316
|
-
graceHours: 0 | 1 | 24;
|
|
317
|
-
};
|
|
318
|
-
/** What the model can do, where you know it. Unset means try it; making images needs images: true. */
|
|
319
|
-
capabilities?: {
|
|
320
|
-
tools?: boolean;
|
|
321
|
-
vision?: boolean;
|
|
322
|
-
json?: boolean;
|
|
323
|
-
images?: boolean;
|
|
324
|
-
reasoning?: boolean;
|
|
325
|
-
};
|
|
326
|
-
/** (256 to 200000) */
|
|
327
|
-
maxTokens?: number;
|
|
328
|
-
toolChoice?: "auto" | "named" | "required";
|
|
329
|
-
/** disabled: kept, but nothing is sent to it. */
|
|
330
|
-
status?: "active" | "disabled";
|
|
331
|
-
}>;
|
|
332
|
-
/** Why, for the change history. (1–500 characters) */
|
|
333
|
-
reason?: string;
|
|
334
|
-
}): Promise<({
|
|
335
|
-
connections?: string[];
|
|
336
|
-
fingerprints?: Record<string, unknown>;
|
|
337
|
-
[key: string]: unknown;
|
|
338
|
-
}) & { mode: "save" }>;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
242
|
declare namespace slatebox.ai.control {
|
|
342
|
-
/** Effective AI binding. Shows
|
|
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 */
|
|
343
244
|
function effective(input: {
|
|
344
245
|
surface?: string;
|
|
345
246
|
userId?: string;
|
|
346
|
-
plan?: string;
|
|
347
247
|
usage?: boolean;
|
|
348
248
|
}): Promise<{
|
|
349
249
|
generation?: number;
|
|
@@ -354,21 +254,21 @@ declare namespace slatebox.ai.control {
|
|
|
354
254
|
}
|
|
355
255
|
|
|
356
256
|
declare namespace slatebox.ai.control {
|
|
357
|
-
/** AI control. Returns the AI control snapshot: every
|
|
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 */
|
|
358
258
|
function get(input: Record<string, unknown>): Promise<{
|
|
359
259
|
generation?: number;
|
|
360
|
-
dbLayer?: string;
|
|
361
260
|
surfaces?: unknown[];
|
|
261
|
+
providers?: unknown[];
|
|
262
|
+
models?: unknown[];
|
|
362
263
|
health?: unknown[];
|
|
363
264
|
[key: string]: unknown;
|
|
364
265
|
}>;
|
|
365
266
|
}
|
|
366
267
|
|
|
367
268
|
declare namespace slatebox.ai.control {
|
|
368
|
-
/** AI control health. Lists AI control problems: documents skipped because they failed their checks (that
|
|
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 */
|
|
369
270
|
function health(input: Record<string, unknown>): Promise<{
|
|
370
271
|
generation?: number;
|
|
371
|
-
dbLayer?: string;
|
|
372
272
|
health?: unknown[];
|
|
373
273
|
warnings?: unknown[];
|
|
374
274
|
[key: string]: unknown;
|
|
@@ -376,24 +276,19 @@ declare namespace slatebox.ai.control {
|
|
|
376
276
|
}
|
|
377
277
|
|
|
378
278
|
declare namespace slatebox.ai.control {
|
|
379
|
-
/** Reset AI control. Returns AI configuration to
|
|
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 */
|
|
380
280
|
function reset(input: {
|
|
381
|
-
target: "
|
|
281
|
+
target: "binding" | "bindings" | "prompt" | "prompts" | "all";
|
|
382
282
|
/** For target binding: the part of Slatebox. */
|
|
383
283
|
surface?: "default" | "chat" | "chat.route" | "generation" | "presentation" | "vision" | "images" | "shape" | "workshop" | "workshop.draft" | "canvas" | "agent.slatebox" | "library" | "connectors";
|
|
384
284
|
/** For target prompt: the prompt. */
|
|
385
|
-
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.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";
|
|
386
|
-
/** For target use: only these feature choices. (1–15 items) */
|
|
387
|
-
keys?: Array<"default" | "chat" | "chat.route" | "generation" | "generation.notes" | "presentation" | "vision" | "images" | "shape" | "workshop" | "workshop.draft" | "canvas" | "agent.slatebox" | "library" | "connectors">;
|
|
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";
|
|
388
286
|
/** (1–500 characters) */
|
|
389
287
|
reason: string;
|
|
390
288
|
}): Promise<({
|
|
391
289
|
target?: string;
|
|
392
|
-
cleared?: string[];
|
|
393
290
|
removed?: string[];
|
|
394
291
|
prompts?: string[];
|
|
395
|
-
unpinned?: string[];
|
|
396
|
-
dbLayer?: string;
|
|
397
292
|
[key: string]: unknown;
|
|
398
293
|
}) & { mode: "save" }>;
|
|
399
294
|
}
|
|
@@ -416,12 +311,48 @@ declare namespace slatebox.ai {
|
|
|
416
311
|
}>;
|
|
417
312
|
}
|
|
418
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
|
+
|
|
419
350
|
declare namespace slatebox.ai.models {
|
|
420
|
-
/** Find AI models. Lists the models a
|
|
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 */
|
|
421
352
|
function discover(input: {
|
|
422
|
-
|
|
353
|
+
provider: string;
|
|
423
354
|
}): Promise<{
|
|
424
|
-
|
|
355
|
+
provider?: string;
|
|
425
356
|
ok?: boolean;
|
|
426
357
|
models?: Array<Record<string, unknown>>;
|
|
427
358
|
message?: string;
|
|
@@ -430,17 +361,17 @@ declare namespace slatebox.ai.models {
|
|
|
430
361
|
}
|
|
431
362
|
|
|
432
363
|
declare namespace slatebox.ai.models {
|
|
433
|
-
/** Save AI models. Adds or changes models: the
|
|
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 */
|
|
434
365
|
function save(input: {
|
|
435
366
|
/** (1–50 items) */
|
|
436
367
|
models: Array<{
|
|
437
|
-
/**
|
|
438
|
-
|
|
439
|
-
/** (1–200 characters) */
|
|
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) */
|
|
440
371
|
model: string;
|
|
441
|
-
/** (at most 80 characters) */
|
|
372
|
+
/** The name shown, for example Muse Ember. (at most 80 characters) */
|
|
442
373
|
label?: string | null;
|
|
443
|
-
/** What the model can do. A
|
|
374
|
+
/** What the model can do. A part of Slatebox refuses a model whose flags miss what it needs. */
|
|
444
375
|
capabilities?: {
|
|
445
376
|
tools?: boolean;
|
|
446
377
|
vision?: boolean;
|
|
@@ -449,8 +380,6 @@ declare namespace slatebox.ai.models {
|
|
|
449
380
|
reasoning?: boolean;
|
|
450
381
|
};
|
|
451
382
|
/** (at least 1) */
|
|
452
|
-
maxContext?: number | null;
|
|
453
|
-
/** (at least 1) */
|
|
454
383
|
maxOutput?: number | null;
|
|
455
384
|
prices?: {
|
|
456
385
|
/** Dollars per million input tokens. (at least 0) */
|
|
@@ -472,11 +401,25 @@ declare namespace slatebox.ai.models {
|
|
|
472
401
|
}) & { mode: "save" }>;
|
|
473
402
|
}
|
|
474
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
|
+
|
|
475
418
|
declare namespace slatebox.ai.prompts {
|
|
476
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 */
|
|
477
420
|
function get(input: {
|
|
478
421
|
/** The prompt, for example shape.system. */
|
|
479
|
-
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.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";
|
|
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";
|
|
480
423
|
}): Promise<{
|
|
481
424
|
id?: string;
|
|
482
425
|
code?: Record<string, unknown>;
|
|
@@ -498,7 +441,7 @@ declare namespace slatebox.ai.prompts {
|
|
|
498
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 */
|
|
499
442
|
function render(input: {
|
|
500
443
|
/** The prompt, for example shape.system. */
|
|
501
|
-
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.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";
|
|
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";
|
|
502
445
|
/** A saved version; 0 is the built-in text. (at least 0) */
|
|
503
446
|
version?: number;
|
|
504
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) */
|
|
@@ -519,7 +462,7 @@ declare namespace slatebox.ai.prompts {
|
|
|
519
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 */
|
|
520
463
|
function saveDraft(input: {
|
|
521
464
|
/** The prompt, for example shape.system. */
|
|
522
|
-
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.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";
|
|
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";
|
|
523
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) */
|
|
524
467
|
body: string;
|
|
525
468
|
/** Per value: data encloses it in a <data> block so it reads as data, not instructions. */
|
|
@@ -542,7 +485,7 @@ declare namespace slatebox.ai.prompts {
|
|
|
542
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 */
|
|
543
486
|
function test(input: {
|
|
544
487
|
/** The prompt, for example shape.system. */
|
|
545
|
-
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.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";
|
|
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";
|
|
546
489
|
/** A saved version; 0 is the built-in text. (at least 0) */
|
|
547
490
|
version?: number;
|
|
548
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) */
|
|
@@ -565,52 +508,74 @@ declare namespace slatebox.ai.prompts {
|
|
|
565
508
|
}
|
|
566
509
|
|
|
567
510
|
declare namespace slatebox.ai.providers {
|
|
568
|
-
/**
|
|
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 */
|
|
569
547
|
function save(input: {
|
|
570
548
|
provider: {
|
|
571
|
-
/** The provider's id, for example gemini. Built-in ids cannot be used. */
|
|
572
549
|
id: string;
|
|
573
550
|
/** (1–80 characters) */
|
|
574
|
-
label
|
|
575
|
-
/**
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
baseUrl?: string | null;
|
|
579
|
-
/** Connections of this provider keep its address (default true when an address is given). */
|
|
580
|
-
baseUrlLocked?: boolean;
|
|
581
|
-
/** How the key is sent: bearer (Authorization: Bearer), header { name }, query { name } or none. */
|
|
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. */
|
|
582
555
|
auth?: {
|
|
583
|
-
style: "bearer" | "header" | "
|
|
556
|
+
style: "bearer" | "header" | "none";
|
|
584
557
|
/** (at most 64 characters) */
|
|
585
558
|
name?: string;
|
|
586
559
|
};
|
|
587
|
-
/**
|
|
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. */
|
|
588
563
|
extraHeaders?: Record<string, string>;
|
|
589
|
-
keyRequired?: boolean;
|
|
590
|
-
modelOptional?: boolean;
|
|
591
|
-
/** What its models can usually do; a connection or model may say otherwise. */
|
|
592
|
-
defaultCapabilities?: {
|
|
593
|
-
tools?: boolean;
|
|
594
|
-
vision?: boolean;
|
|
595
|
-
json?: boolean;
|
|
596
|
-
images?: boolean;
|
|
597
|
-
reasoning?: boolean;
|
|
598
|
-
};
|
|
599
564
|
};
|
|
600
|
-
/** Go ahead with
|
|
601
|
-
|
|
565
|
+
/** Go ahead with a change that revokes the provider's keys. */
|
|
566
|
+
revokeKeys?: boolean;
|
|
602
567
|
/** Why, for the change history. (1–500 characters) */
|
|
603
568
|
reason?: string;
|
|
604
569
|
}): Promise<({
|
|
605
570
|
provider?: Record<string, unknown>;
|
|
606
|
-
|
|
571
|
+
revokedKeys?: string[];
|
|
607
572
|
generation?: number | null;
|
|
608
573
|
[key: string]: unknown;
|
|
609
574
|
}) & { mode: "save" }>;
|
|
610
575
|
}
|
|
611
576
|
|
|
612
577
|
declare namespace slatebox.ai {
|
|
613
|
-
/** Set AI.
|
|
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 */
|
|
614
579
|
function update(input: {
|
|
615
580
|
/** me (yours), team (team admins) or server (administrators). */
|
|
616
581
|
level: "me" | "team" | "server";
|
|
@@ -618,7 +583,7 @@ declare namespace slatebox.ai {
|
|
|
618
583
|
connections?: Array<{
|
|
619
584
|
/** Your name for it, for example desk-model. */
|
|
620
585
|
name: string;
|
|
621
|
-
/** The provider: openai-compatible (any host or local server: Ollama, llama.cpp, vLLM, LM Studio and others), openai, anthropic, deepinfra, or one an administrator added
|
|
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. */
|
|
622
587
|
type: string;
|
|
623
588
|
/** For openai-compatible: the address up to /v1, for example http://host.docker.internal:11434/v1. (at most 500 characters) */
|
|
624
589
|
baseUrl?: string;
|
|
@@ -641,35 +606,35 @@ declare namespace slatebox.ai {
|
|
|
641
606
|
remove?: string[];
|
|
642
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. */
|
|
643
608
|
use?: {
|
|
644
|
-
/** me:<name
|
|
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) */
|
|
645
610
|
default?: string | null;
|
|
646
|
-
/** me:<name
|
|
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) */
|
|
647
612
|
chat?: string | null;
|
|
648
|
-
/** me:<name
|
|
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) */
|
|
649
614
|
"chat.route"?: string | null;
|
|
650
|
-
/** me:<name
|
|
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) */
|
|
651
616
|
generation?: string | null;
|
|
652
|
-
/** me:<name
|
|
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) */
|
|
653
618
|
"generation.notes"?: string | null;
|
|
654
|
-
/** me:<name
|
|
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) */
|
|
655
620
|
presentation?: string | null;
|
|
656
|
-
/** me:<name
|
|
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) */
|
|
657
622
|
vision?: string | null;
|
|
658
|
-
/** me:<name
|
|
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) */
|
|
659
624
|
images?: string | null;
|
|
660
|
-
/** me:<name
|
|
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) */
|
|
661
626
|
shape?: string | null;
|
|
662
|
-
/** me:<name
|
|
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) */
|
|
663
628
|
workshop?: string | null;
|
|
664
|
-
/** me:<name
|
|
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) */
|
|
665
630
|
"workshop.draft"?: string | null;
|
|
666
|
-
/** me:<name
|
|
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) */
|
|
667
632
|
canvas?: string | null;
|
|
668
|
-
/** me:<name
|
|
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) */
|
|
669
634
|
"agent.slatebox"?: string | null;
|
|
670
|
-
/** me:<name
|
|
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) */
|
|
671
636
|
library?: string | null;
|
|
672
|
-
/** me:<name
|
|
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) */
|
|
673
638
|
connectors?: string | null;
|
|
674
639
|
};
|
|
675
640
|
ownProviders?: "on" | "off";
|
|
@@ -1426,13 +1391,13 @@ declare namespace slatebox.presence {
|
|
|
1426
1391
|
}
|
|
1427
1392
|
|
|
1428
1393
|
declare namespace slatebox.presentations {
|
|
1429
|
-
/** Present. Create a presentation of a slate with the planner the Present button uses: the AI (feature presentation, counted like other AI use) groups the notes into steps and chooses each step's layout, kicker and caption, played on the live canvas with camera moves. Optional: a style (voyage, stage, editorial, neon, sketch, blueprint, journey, calm), a palette (3 to 6
|
|
1394
|
+
/** Present. Create a presentation of a slate with the planner the Present button uses: the AI (feature presentation, counted like other AI use) groups the notes into steps and chooses each step's layout, kicker and caption, played on the live canvas with camera moves. Optional: a style (voyage, stage, editorial, neon, sketch, blueprint, journey, calm), a palette (3 to 6 colors) and a brief (what to focus on). Needs edit access to the slate. Each call plans a new version; mode "preview" plans and returns the steps and saves nothing. Returns the presentation id, its steps and a link that opens the slate and plays it. @scope slates:write @modes save|preview @openWorld */
|
|
1430
1395
|
function create(input: {
|
|
1431
1396
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
1432
1397
|
shareId: string;
|
|
1433
1398
|
/** The style to play it in. Left out, the AI chooses. */
|
|
1434
1399
|
style?: "voyage" | "stage" | "editorial" | "neon" | "sketch" | "blueprint" | "journey" | "calm";
|
|
1435
|
-
/** Your own
|
|
1400
|
+
/** Your own colors, with a style: the first three lead, the background stays the style's. (3–6 items) */
|
|
1436
1401
|
palette?: string[];
|
|
1437
1402
|
/** What the presentation should focus on or bring out, in plain words. (1–4000 characters) */
|
|
1438
1403
|
brief?: string;
|
|
@@ -1494,12 +1459,12 @@ declare namespace slatebox.presentations {
|
|
|
1494
1459
|
}
|
|
1495
1460
|
|
|
1496
1461
|
declare namespace slatebox.presentations {
|
|
1497
|
-
/** Restyle. Play your latest presentation of a slate in another style (voyage, stage, editorial, neon, sketch, blueprint, journey, calm), optionally with your own palette (3 to 6
|
|
1462
|
+
/** Restyle. Play your latest presentation of a slate in another style (voyage, stage, editorial, neon, sketch, blueprint, journey, calm), optionally with your own palette (3 to 6 colors). The same steps in the same order: no AI is asked and nothing is counted. @scope slates:write @idempotent */
|
|
1498
1463
|
function setStyle(input: {
|
|
1499
1464
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
1500
1465
|
shareId: string;
|
|
1501
1466
|
style: "voyage" | "stage" | "editorial" | "neon" | "sketch" | "blueprint" | "journey" | "calm";
|
|
1502
|
-
/** Your own
|
|
1467
|
+
/** Your own colors: the first three lead, the background stays the style's. (3–6 items) */
|
|
1503
1468
|
palette?: string[];
|
|
1504
1469
|
}): Promise<({
|
|
1505
1470
|
presentationId: string;
|
|
@@ -1842,7 +1807,7 @@ declare namespace slatebox.slates {
|
|
|
1842
1807
|
shareId: string;
|
|
1843
1808
|
/** auto: a mind map that is one tree as mindmap, anything else as flowchart. (default "auto") */
|
|
1844
1809
|
format?: "auto" | "flowchart" | "mindmap" | "gantt";
|
|
1845
|
-
/** Also write each note's
|
|
1810
|
+
/** Also write each note's colors (style lines). (default false) */
|
|
1846
1811
|
styles?: boolean;
|
|
1847
1812
|
/** A Gantt chart's first day, YYYY-MM-DD (default today). */
|
|
1848
1813
|
start?: string;
|
|
@@ -2029,7 +1994,7 @@ declare namespace slatebox.slates {
|
|
|
2029
1994
|
}
|
|
2030
1995
|
|
|
2031
1996
|
declare namespace slatebox.suggestions {
|
|
2032
|
-
/** 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. @scope slates:write @destructive */
|
|
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 */
|
|
2033
1998
|
function decide(input: {
|
|
2034
1999
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
2035
2000
|
shareId: string;
|
|
@@ -2049,6 +2014,8 @@ declare namespace slatebox.suggestions {
|
|
|
2049
2014
|
undone?: string[];
|
|
2050
2015
|
/** undo: the items left as they are, each with its reason. */
|
|
2051
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>>;
|
|
2052
2019
|
[key: string]: unknown;
|
|
2053
2020
|
}) & { mode: "save" }>;
|
|
2054
2021
|
}
|
|
@@ -2086,6 +2053,12 @@ declare namespace slatebox.teamImports {
|
|
|
2086
2053
|
needsConsent?: string[];
|
|
2087
2054
|
mailDisabled?: number;
|
|
2088
2055
|
unverified?: string[];
|
|
2056
|
+
asked?: string[];
|
|
2057
|
+
joined?: string[];
|
|
2058
|
+
[key: string]: unknown;
|
|
2059
|
+
};
|
|
2060
|
+
library?: {
|
|
2061
|
+
submitted?: number;
|
|
2089
2062
|
[key: string]: unknown;
|
|
2090
2063
|
};
|
|
2091
2064
|
[key: string]: unknown;
|
|
@@ -2124,8 +2097,18 @@ declare namespace slatebox.teamImports {
|
|
|
2124
2097
|
needsConsent?: string[];
|
|
2125
2098
|
mailDisabled?: number;
|
|
2126
2099
|
unverified?: string[];
|
|
2100
|
+
asked?: string[];
|
|
2101
|
+
joined?: string[];
|
|
2127
2102
|
[key: string]: unknown;
|
|
2128
2103
|
};
|
|
2104
|
+
library?: {
|
|
2105
|
+
submitted?: number;
|
|
2106
|
+
[key: string]: unknown;
|
|
2107
|
+
};
|
|
2108
|
+
/** A move: the team's own owner moved it here (teamMove.*). */
|
|
2109
|
+
kind?: "move";
|
|
2110
|
+
/** Who moved it here (their address), for administrators. */
|
|
2111
|
+
movedBy?: string;
|
|
2129
2112
|
/** What the import made: the team, the source (instance, team, when, and whether a key this server knows signed it), counts per section with each skip and its reason, the people (placeholders until invited), the slates with their content hashes, the files, rewritten links, board rules switched off, AI connections (without keys) and the tokens to make again. */
|
|
2130
2113
|
report?: {
|
|
2131
2114
|
team?: Record<string, unknown>;
|
|
@@ -2158,7 +2141,7 @@ declare namespace slatebox.teamImports {
|
|
|
2158
2141
|
}): Promise<({
|
|
2159
2142
|
importId: string;
|
|
2160
2143
|
email: string;
|
|
2161
|
-
outcome: "sent" | "needs_consent" | "mail_disabled" | "already_invited";
|
|
2144
|
+
outcome: "sent" | "asked" | "needs_consent" | "mail_disabled" | "already_invited";
|
|
2162
2145
|
[key: string]: unknown;
|
|
2163
2146
|
}) & { mode: "save" }>;
|
|
2164
2147
|
}
|
|
@@ -2183,8 +2166,18 @@ declare namespace slatebox.teamImports {
|
|
|
2183
2166
|
needsConsent?: string[];
|
|
2184
2167
|
mailDisabled?: number;
|
|
2185
2168
|
unverified?: string[];
|
|
2169
|
+
asked?: string[];
|
|
2170
|
+
joined?: string[];
|
|
2171
|
+
[key: string]: unknown;
|
|
2172
|
+
};
|
|
2173
|
+
library?: {
|
|
2174
|
+
submitted?: number;
|
|
2186
2175
|
[key: string]: unknown;
|
|
2187
2176
|
};
|
|
2177
|
+
/** A move: the team's own owner moved it here (teamMove.*). */
|
|
2178
|
+
kind?: "move";
|
|
2179
|
+
/** Who moved it here (their address), for administrators. */
|
|
2180
|
+
movedBy?: string;
|
|
2188
2181
|
[key: string]: unknown;
|
|
2189
2182
|
}>;
|
|
2190
2183
|
[key: string]: unknown;
|