slatebox-mcp 0.3.2 → 0.3.4
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 +6 -6
- package/generated/client.json +203 -54
- package/generated/exec-tool.json +152 -25
- package/generated/guest-client.js +1 -1
- package/generated/slatebox.d.ts +61 -16
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// The exec guest prelude (one line, so the caller's code starts on line 2) and its trailer.
|
|
3
3
|
// Source run = PRELUDE + "\n" + code + TRAILER, as an async function body named run.js.
|
|
4
4
|
// It needs a global __slatebox.call(name, input) resolving to {ok:true,value} or {ok:false,error}.
|
|
5
|
-
export const PRELUDE = "const __sbx=(()=>{const C=__slatebox;class SlateboxError extends Error{constructor(e){super(String(e&&e.message||\"Slatebox refused the call.\"));this.name=\"SlateboxError\";this.code=String(e&&e.code||\"error\");this.status=Number(e&&e.status)||0;if(e&&e.details!==undefined)this.details=e.details;if(e&&e.retryAfter!==undefined)this.retryAfter=e.retryAfter;}}const plain=v=>v!==null&&typeof v===\"object\"&&!Array.isArray(v)&&(Object.getPrototypeOf(v)===Object.prototype||Object.getPrototypeOf(v)===null);const method=name=>async function(input,...rest){if(rest.length)throw new SlateboxError({code:\"invalid_request\",status:400,message:name+\" takes one object argument.\"});if(input===undefined)input={};if(!plain(input))throw new SlateboxError({code:\"invalid_request\",status:400,message:name+\" takes one plain object as its argument.\"});const r=await C.call(name,input);if(r&&r.ok)return r.value;throw new SlateboxError(r&&r.error);};const tree={};for(const n of [\"account.get\",\"agentTasks.create\",\"agentTasks.list\",\"agentTasks.update\",\"ai.check\",\"ai.get\",\"ai.update\",\"comments.add\",\"comments.list\",\"comments.remove\",\"comments.resolve\",\"components.get\",\"components.list\",\"instance.describe\",\"presence.plan\",\"presence.step\",\"presentations.get\",\"presentations.setStyle\",\"shapes.apply\",\"shapes.generate\",\"shapes.list\",\"slates.applyOperations\",\"slates.checkMove\",\"slates.copy\",\"slates.create\",\"slates.delete\",\"slates.exportMermaid\",\"slates.get\",\"slates.importMermaid\",\"slates.issueInvite\",\"slates.list\",\"slates.revokeInvite\",\"team.export\",\"teamImports.confirm\",\"teamImports.discard\",\"teamImports.get\",\"teamImports.invite\",\"teamImports.list\",\"teamImports.start\"]){const p=n.split(\".\");let t=tree;for(let i=0;i<p.length-1;i++)t=t[p[i]]||(t[p[i]]={});t[p[p.length-1]]=method(n);}const freeze=o=>{for(const k of Object.keys(o))if(typeof o[k]===\"object\")freeze(o[k]);return Object.freeze(o);};const logs=[];let size=0,cut=false;const fmt=a=>{if(typeof a===\"string\")return a;try{const j=JSON.stringify(a);return j===undefined?String(a):j;}catch{return String(a);}};const log=(...a)=>{if(cut)return;const line=a.map(fmt).join(\" \");size+=line.length+1;if(size>16384){cut=true;logs.push(\"[logs cut at 16 KiB]\");return;}logs.push(line);};const base=(()=>{const m=/run\\.js:(\\d+):/.exec(String(new Error().stack||\"\"));return m?Number(m[1]):1;})();const loc=e=>{const re=/run\\.js:(\\d+):(\\d+)/g;const s=String(e&&e.stack||\"\");let m;while((m=re.exec(s))){if(Number(m[1])>base)return{line:Number(m[1])-base,column:Number(m[2])};}return{};};const run=async f=>{try{const v=await f();if(v===undefined)return{ok:true,json:null,logs};let j;try{j=JSON.stringify(v);}catch(e){return{ok:false,error:{code:\"result_not_json\",message:\"Return a JSON value. \"+String(e&&e.message||\"\")},logs};}if(j===undefined)return{ok:false,error:{code:\"result_not_json\",message:\"Return a JSON value, not a function or a symbol.\"},logs};return{ok:true,json:j,logs};}catch(e){if(e&&e.name===\"InternalError\")throw e;const out={code:e instanceof SlateboxError?e.code:\"script_error\",message:String(e&&e.message||e),...loc(e)};if(e instanceof SlateboxError){out.status=e.status;if(e.details!==undefined)out.details=e.details;}return{ok:false,error:out,logs};}};return{slatebox:freeze(tree),SlateboxError,console:Object.freeze({log,info:log,warn:log,error:log,debug:log}),run};})();const slatebox=__sbx.slatebox,SlateboxError=__sbx.SlateboxError,console=__sbx.console;return await __sbx.run(async()=>{"
|
|
5
|
+
export const PRELUDE = "const __sbx=(()=>{const C=__slatebox;class SlateboxError extends Error{constructor(e){super(String(e&&e.message||\"Slatebox refused the call.\"));this.name=\"SlateboxError\";this.code=String(e&&e.code||\"error\");this.status=Number(e&&e.status)||0;if(e&&e.details!==undefined)this.details=e.details;if(e&&e.retryAfter!==undefined)this.retryAfter=e.retryAfter;}}const plain=v=>v!==null&&typeof v===\"object\"&&!Array.isArray(v)&&(Object.getPrototypeOf(v)===Object.prototype||Object.getPrototypeOf(v)===null);const method=name=>async function(input,...rest){if(rest.length)throw new SlateboxError({code:\"invalid_request\",status:400,message:name+\" takes one object argument.\"});if(input===undefined)input={};if(!plain(input))throw new SlateboxError({code:\"invalid_request\",status:400,message:name+\" takes one plain object as its argument.\"});const r=await C.call(name,input);if(r&&r.ok)return r.value;throw new SlateboxError(r&&r.error);};const tree={};for(const n of [\"account.get\",\"agentTasks.create\",\"agentTasks.list\",\"agentTasks.update\",\"ai.check\",\"ai.get\",\"ai.update\",\"comments.add\",\"comments.list\",\"comments.remove\",\"comments.resolve\",\"components.get\",\"components.list\",\"instance.describe\",\"presence.plan\",\"presence.step\",\"presentations.create\",\"presentations.get\",\"presentations.setStyle\",\"shapes.apply\",\"shapes.generate\",\"shapes.list\",\"slates.applyOperations\",\"slates.checkMove\",\"slates.copy\",\"slates.create\",\"slates.delete\",\"slates.exportMermaid\",\"slates.get\",\"slates.importMermaid\",\"slates.issueInvite\",\"slates.list\",\"slates.revokeInvite\",\"team.export\",\"teamImports.confirm\",\"teamImports.discard\",\"teamImports.get\",\"teamImports.invite\",\"teamImports.list\",\"teamImports.start\"]){const p=n.split(\".\");let t=tree;for(let i=0;i<p.length-1;i++)t=t[p[i]]||(t[p[i]]={});t[p[p.length-1]]=method(n);}const freeze=o=>{for(const k of Object.keys(o))if(typeof o[k]===\"object\")freeze(o[k]);return Object.freeze(o);};const logs=[];let size=0,cut=false;const fmt=a=>{if(typeof a===\"string\")return a;try{const j=JSON.stringify(a);return j===undefined?String(a):j;}catch{return String(a);}};const log=(...a)=>{if(cut)return;const line=a.map(fmt).join(\" \");size+=line.length+1;if(size>16384){cut=true;logs.push(\"[logs cut at 16 KiB]\");return;}logs.push(line);};const base=(()=>{const m=/run\\.js:(\\d+):/.exec(String(new Error().stack||\"\"));return m?Number(m[1]):1;})();const loc=e=>{const re=/run\\.js:(\\d+):(\\d+)/g;const s=String(e&&e.stack||\"\");let m;while((m=re.exec(s))){if(Number(m[1])>base)return{line:Number(m[1])-base,column:Number(m[2])};}return{};};const run=async f=>{try{const v=await f();if(v===undefined)return{ok:true,json:null,logs};let j;try{j=JSON.stringify(v);}catch(e){return{ok:false,error:{code:\"result_not_json\",message:\"Return a JSON value. \"+String(e&&e.message||\"\")},logs};}if(j===undefined)return{ok:false,error:{code:\"result_not_json\",message:\"Return a JSON value, not a function or a symbol.\"},logs};return{ok:true,json:j,logs};}catch(e){if(e&&e.name===\"InternalError\")throw e;const out={code:e instanceof SlateboxError?e.code:\"script_error\",message:String(e&&e.message||e),...loc(e)};if(e instanceof SlateboxError){out.status=e.status;if(e.details!==undefined)out.details=e.details;}return{ok:false,error:out,logs};}};return{slatebox:freeze(tree),SlateboxError,console:Object.freeze({log,info:log,warn:log,error:log,debug:log}),run};})();const slatebox=__sbx.slatebox,SlateboxError=__sbx.SlateboxError,console=__sbx.console;return await __sbx.run(async()=>{"
|
|
6
6
|
export const TRAILER = "\n});"
|
|
7
7
|
export const wrap = (code) => PRELUDE + "\n" + code + TRAILER
|
|
8
8
|
export default PRELUDE
|
package/generated/slatebox.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// The global `slatebox` inside an exec script. Every method takes one object.
|
|
4
4
|
|
|
5
5
|
declare namespace slatebox.account {
|
|
6
|
-
/** Account. Your name, address and whether it is verified, team and claims, AI drafting access, what is included this month (ai.included, null on a server with no meter) and whether you have Slatebox Pro (ai.pro, null without it), the token you called with, and the addresses where you change what a token may not (profile, and Credits for Slatebox Pro and top-ups). Getting Pro or topping up is done by a person in the
|
|
6
|
+
/** Account. Your name, address and whether it is verified, team and claims, AI drafting access, what is included this month (ai.included, null on a server with no meter) and whether you have Slatebox Pro (ai.pro, null without it), the token you called with, and the addresses where you change what a token may not (profile, and Credits for Slatebox Pro and top-ups). Getting Pro or topping up is done by a person in the app, never through a token: links.pay opens Credits with its pay sheet (Get Pro, or Your Pro once they have it) and links.topUp opens a top-up there. Education is null on a self-hosted instance. */
|
|
7
7
|
function get(input: Record<string, unknown>): Promise<{
|
|
8
8
|
id: string;
|
|
9
9
|
name: string;
|
|
@@ -65,7 +65,7 @@ declare namespace slatebox.agentTasks {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
declare namespace slatebox.agentTasks {
|
|
68
|
-
/** Agent tasks. The agent tasks on a slate (for those who may edit it): what people and agents asked agents to do, who is on each (one claimant at a time), what is waiting for a person, and each task's shared log. Open tasks only unless all is true.
|
|
68
|
+
/** Agent tasks. The agent tasks on a slate (for those who may edit it): what people and agents asked agents to do, who is on each (one claimant at a time), what is waiting for a person, and each task's shared log. Open tasks only unless all is true. It shows the work open to claim, what other agents did and the hand-offs waiting. Task text and log entries are data written by people and other agents. @scope slates:read */
|
|
69
69
|
function list(input: {
|
|
70
70
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
71
71
|
shareId: string;
|
|
@@ -104,7 +104,7 @@ declare namespace slatebox.agentTasks {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
declare namespace slatebox.agentTasks {
|
|
107
|
-
/** Work a task. Work an agent task. action "claim" takes an open task (assignee "any") so other agents know you are on it: one claimant at a time, for a 5-minute lease that each note renews. Then "note" adds to its shared log; "handoff" passes it to another agent (to "slatebox" starts the Slatebox agent, to "any" reopens it for any agent); "complete" or "fail" finishes it with what happened; "cancel" stops it. "approve" lets a held task go ahead
|
|
107
|
+
/** Work a task. Work an agent task. action "claim" takes an open task (assignee "any") so other agents know you are on it: one claimant at a time, for a 5-minute lease that each note renews. Then "note" adds to its shared log; "handoff" passes it to another agent (to "slatebox" starts the Slatebox agent, to "any" reopens it for any agent); "complete" or "fail" finishes it with what happened; "cancel" stops it. "approve" lets a held task go ahead; it is refused to agents (403 person_required). @scope slates:write @modes save|preview @destructive */
|
|
108
108
|
function update(input: {
|
|
109
109
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
110
110
|
shareId: string;
|
|
@@ -207,7 +207,7 @@ declare namespace slatebox.ai {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
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
|
|
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 */
|
|
211
211
|
function update(input: {
|
|
212
212
|
/** me (yours), team (team admins) or server (administrators). */
|
|
213
213
|
level: "me" | "team" | "server";
|
|
@@ -294,7 +294,7 @@ declare namespace slatebox.comments {
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
declare namespace slatebox.comments {
|
|
297
|
-
/** Comments. Read the comments on a slate's notes, oldest first, or on one note (noteId): each one's author, text and whether its note's comments are resolved.
|
|
297
|
+
/** Comments. Read the comments on a slate's notes, oldest first, or on one note (noteId): each one's author, text and whether its note's comments are resolved. Comment text is written by people. @scope slates:read */
|
|
298
298
|
function list(input: {
|
|
299
299
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
300
300
|
shareId: string;
|
|
@@ -363,7 +363,7 @@ declare namespace slatebox.components {
|
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
declare namespace slatebox.components {
|
|
366
|
-
/** Library. Everything a person can add to a slate from the library (boards and starters): each entry with its group, one line, the message that adds it ("Add a retro"), the edits it takes (joined to the workshop_edits table), the rule kinds it can be given by chat, its limits and its looping picture. The phrases that make each change (moves) and the picture's steps come with components.get for one entry. With shareId, whether each fits that slate: a slate holds up to 8 boards, side by side.
|
|
366
|
+
/** Library. Everything a person can add to a slate from the library (boards and starters): each entry with its group, one line, the message that adds it ("Add a retro"), the edits it takes (joined to the workshop_edits table), the rule kinds it can be given by chat, its limits and its looping picture. The phrases that make each change (moves) and the picture's steps come with components.get for one entry. With shareId, whether each fits that slate: a slate holds up to 8 boards, side by side. slates.applyOperations adds one (plan operation add_component, with the slate revision), the same door as the chat's Add; it goes beside the boards already there. @scope slates:read */
|
|
367
367
|
function list(input: {
|
|
368
368
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
369
369
|
shareId?: string;
|
|
@@ -407,7 +407,7 @@ declare namespace slatebox.instance {
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
declare namespace slatebox.presence {
|
|
410
|
-
/** 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;
|
|
410
|
+
/** 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
411
|
function plan(input: {
|
|
412
412
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
413
413
|
shareId: string;
|
|
@@ -461,6 +461,47 @@ declare namespace slatebox.presence {
|
|
|
461
461
|
}) & { mode: "save" | "preview" }>;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
|
+
declare namespace slatebox.presentations {
|
|
465
|
+
/** 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 colours) 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 */
|
|
466
|
+
function create(input: {
|
|
467
|
+
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
468
|
+
shareId: string;
|
|
469
|
+
/** The style to play it in. Left out, the AI chooses. */
|
|
470
|
+
style?: "voyage" | "stage" | "editorial" | "neon" | "sketch" | "blueprint" | "journey" | "calm";
|
|
471
|
+
/** Your own colours, with a style: the first three lead, the background stays the style's. (3–6 items) */
|
|
472
|
+
palette?: string[];
|
|
473
|
+
/** What the presentation should focus on or bring out, in plain words. (1–4000 characters) */
|
|
474
|
+
brief?: string;
|
|
475
|
+
/** preview returns what would change and saves nothing. (default "save") */
|
|
476
|
+
mode?: "save" | "preview";
|
|
477
|
+
}): Promise<({
|
|
478
|
+
/** The new presentation (null in a preview, which saves nothing). */
|
|
479
|
+
presentationId: string | null;
|
|
480
|
+
version?: number | null;
|
|
481
|
+
name?: string;
|
|
482
|
+
published?: boolean;
|
|
483
|
+
/** The style it plays in. */
|
|
484
|
+
style: "voyage" | "stage" | "editorial" | "neon" | "sketch" | "blueprint" | "journey" | "calm" | null;
|
|
485
|
+
/** Every style it can play in. */
|
|
486
|
+
styles?: string[];
|
|
487
|
+
steps: Array<{
|
|
488
|
+
step: number;
|
|
489
|
+
layout: "title" | "overview" | "dive" | "hero" | "treeBuild" | "trace" | "sweep" | "group" | "bigNumber" | "quote" | "split" | "compare" | "cover" | "finale";
|
|
490
|
+
kicker?: string;
|
|
491
|
+
caption: string;
|
|
492
|
+
/** How many of the slate's notes the step shows. */
|
|
493
|
+
notes?: number;
|
|
494
|
+
[key: string]: unknown;
|
|
495
|
+
}>;
|
|
496
|
+
/** Opens the slate and plays this presentation (null in a preview). */
|
|
497
|
+
link: string | null;
|
|
498
|
+
/** True when Slatebox grouped the notes itself because the AI could not plan the slate; reason says why. */
|
|
499
|
+
automatic: boolean;
|
|
500
|
+
reason?: string;
|
|
501
|
+
[key: string]: unknown;
|
|
502
|
+
}) & { mode: "save" | "preview" }>;
|
|
503
|
+
}
|
|
504
|
+
|
|
464
505
|
declare namespace slatebox.presentations {
|
|
465
506
|
/** Deck. Read your latest presentation of a slate: its style, and each step's layout (title, overview, dive, hero, treeBuild, trace, sweep, group, bigNumber, quote, split, compare, cover, finale), kicker and caption. The deck plays on the live canvas with Prezi-style camera moves. @scope slates:read */
|
|
466
507
|
function get(input: {
|
|
@@ -548,7 +589,7 @@ declare namespace slatebox.shapes {
|
|
|
548
589
|
}
|
|
549
590
|
|
|
550
591
|
declare namespace slatebox.shapes {
|
|
551
|
-
/** Draw shapes. Draw 1 to 4 outlines for notes from a description ("a rocket", "a speech bubble with the tail on the left"), using the AI feature shape (counted like other AI use). Each candidate is one checked SVG path
|
|
592
|
+
/** Draw shapes. Draw 1 to 4 outlines for notes from a description ("a rocket", "a speech bubble with the tail on the left"), using the AI feature shape (counted like other AI use). Each candidate is one checked SVG path: shapes.apply takes its candidateId (good for 30 days), and an applyOperations update_nodes or add_nodes plan takes {name, d, fillRule} as the shape. The same description again returns the same candidates at no cost unless fresh is true. At most 20 drawings per person per hour. @scope slates:write @modes save|preview @openWorld */
|
|
552
593
|
function generate(input: {
|
|
553
594
|
/** The shape, in plain words. (1–200 characters) */
|
|
554
595
|
describe: string;
|
|
@@ -581,7 +622,7 @@ declare namespace slatebox.shapes {
|
|
|
581
622
|
}
|
|
582
623
|
|
|
583
624
|
declare namespace slatebox.shapes {
|
|
584
|
-
/** List shapes. The shapes in your library and your team's (newest used first): id, name, proportions, visibility, and the outline when 24 or fewer come back.
|
|
625
|
+
/** List shapes. The shapes in your library and your team's (newest used first): id, name, proportions, visibility, and the outline when 24 or fewer come back. shapes.apply takes one as shape "lib:<id>". @scope slates:read */
|
|
585
626
|
function list(input: {
|
|
586
627
|
/** Words in the shape name. (at most 60 characters) */
|
|
587
628
|
q?: string;
|
|
@@ -610,7 +651,7 @@ declare namespace slatebox.shapes {
|
|
|
610
651
|
}
|
|
611
652
|
|
|
612
653
|
declare namespace slatebox.slates {
|
|
613
|
-
/** Edit a slate.
|
|
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 */
|
|
614
655
|
function applyOperations(input: {
|
|
615
656
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
616
657
|
shareId: string;
|
|
@@ -657,7 +698,7 @@ declare namespace slatebox.slates {
|
|
|
657
698
|
}
|
|
658
699
|
|
|
659
700
|
declare namespace slatebox.slates {
|
|
660
|
-
/** Check move. Whether a card may move to a lane on one of the slate's boards (boardId; required on a slate of several boards, 400 board_required lists them), without moving it: the same verdict a drag gets. On a nested board (piles, a tree)
|
|
701
|
+
/** Check move. Whether a card may move to a lane on one of the slate's boards (boardId; required on a slate of several boards, 400 board_required lists them), without moving it: the same verdict a drag gets. On a nested board (piles, a tree) the move names the card it goes under instead (under), or the area it goes to (lane). Answers {ok: true, warnings} or {refused: {sentence, ruleId, nearest, set, overridable}}: the one rule that refuses it (ruleId null for the board's own kind rule), who set it, the nearest lane (or card) it may go to, and whether the person may agree to move it anyway (overridable: move_workshop_card with override true, held for them to confirm; false only for a hard limit). rev is the rulebook's revision. Cards and lanes are named by id or by name. @scope slates:read */
|
|
661
702
|
function checkMove(input: {
|
|
662
703
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
663
704
|
shareId: string;
|
|
@@ -725,7 +766,7 @@ declare namespace slatebox.slates {
|
|
|
725
766
|
}
|
|
726
767
|
|
|
727
768
|
declare namespace slatebox.slates {
|
|
728
|
-
/** Delete slate. Delete one of your own slates, with its sharing, comments and messages. Only the slate's owner can
|
|
769
|
+
/** Delete slate. Delete one of your own slates, with its sharing, comments and messages. Only the slate's owner can. This cannot be undone. @scope slates:delete @destructive */
|
|
729
770
|
function delete(input: {
|
|
730
771
|
/** The slate ID from its address: /canvas/<shareId>. (1–80 characters) */
|
|
731
772
|
shareId: string;
|
|
@@ -794,7 +835,7 @@ declare namespace slatebox.slates {
|
|
|
794
835
|
}
|
|
795
836
|
|
|
796
837
|
declare namespace slatebox.slates {
|
|
797
|
-
/** Draw Mermaid. Draw a Mermaid flowchart, mind map or Gantt chart as real notes and lines, laid out in the diagram's direction (subgraphs and Gantt sections become frames). With shareId the diagram is added beside what that slate holds (
|
|
838
|
+
/** Draw Mermaid. Draw a Mermaid flowchart, mind map or Gantt chart as real notes and lines, laid out in the diagram's direction (subgraphs and Gantt sections become frames). With shareId the diagram is added beside what that slate holds (it needs edit access; everyone on the slate sees it drawn); without, it becomes a new private slate of yours named name (or the diagram's title). Mermaid in a Markdown ```mermaid block is read too. Another kind of diagram is refused with 422 mermaid_unsupported; a mistake with 400 mermaid_invalid naming its line; a diagram past a slate's limits (1,000 notes counting frames, 5,000 lines, frames 50 deep, or a subgraph too big for one frame) with 422 mermaid_too_large. mode "preview" shows what would be drawn without saving. @scope slates:write @modes save|preview */
|
|
798
839
|
function importMermaid(input: {
|
|
799
840
|
/** Mermaid source (flowchart/graph, mindmap or gantt), or Markdown holding a ```mermaid block. (1–100000 characters) */
|
|
800
841
|
mermaid: string;
|
|
@@ -872,7 +913,7 @@ declare namespace slatebox.slates {
|
|
|
872
913
|
}
|
|
873
914
|
|
|
874
915
|
declare namespace slatebox.team {
|
|
875
|
-
/** 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). POST to downloadUrl
|
|
916
|
+
/** 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 */
|
|
876
917
|
function export(input: Record<string, unknown>): Promise<({
|
|
877
918
|
downloadUrl: string;
|
|
878
919
|
method: "POST";
|
|
@@ -890,7 +931,7 @@ declare namespace slatebox.team {
|
|
|
890
931
|
}
|
|
891
932
|
|
|
892
933
|
declare namespace slatebox.teamImports {
|
|
893
|
-
/** Confirm import. For an administrator of this server: makes a pending import's team live. Its slates and presentations get back the visibility they had (public, unlisted or private). With invite true, each person whose address the source had verified, and no account here uses in any letter case, gets an email to claim their placeholder; the answer lists addresses that already have an account (they must agree to move) and addresses the source had not verified (invite each
|
|
934
|
+
/** Confirm import. For an administrator of this server: makes a pending import's team live. Its slates and presentations get back the visibility they had (public, unlisted or private). With invite true, each person whose address the source had verified, and no account here uses in any letter case, gets an email to claim their placeholder; the answer lists addresses that already have an account (they must agree to move) and addresses the source had not verified (teamImports.invite invites each once its address is checked). Board rules stay switched off until a team admin reviews them. @scope team:import @confirm */
|
|
894
935
|
function confirm(input: {
|
|
895
936
|
importId: string;
|
|
896
937
|
/** (default false) */
|
|
@@ -1010,7 +1051,7 @@ declare namespace slatebox.teamImports {
|
|
|
1010
1051
|
}
|
|
1011
1052
|
|
|
1012
1053
|
declare namespace slatebox.teamImports {
|
|
1013
|
-
/** Start import. For an administrator of this server: a one-time address (1 hour) to upload a team export to.
|
|
1054
|
+
/** Start import. For an administrator of this server: a one-time address (1 hour) to upload a team export to. uploadUrl takes the archive as a POST of application/octet-stream, with its passphrase when it is encrypted: in the Slatebox-Export-Passphrase-Base64 header as base64url of its UTF-8 bytes (any passphrase), or in the Slatebox-Export-Passphrase header when it is plain ASCII. The upload becomes a new hidden team, with new ids for everything, people as placeholders who cannot sign in, slates private, board rules switched off, no keys and no tokens; the answer is the report. teamImports.confirm or teamImports.discard confirms or discards it; a pending import is discarded after 14 days. @scope team:import */
|
|
1014
1055
|
function start(input: Record<string, unknown>): Promise<({
|
|
1015
1056
|
uploadUrl: string;
|
|
1016
1057
|
method: "POST";
|
|
@@ -1847,6 +1888,8 @@ interface WorkshopEditsPlan {
|
|
|
1847
1888
|
/** (1–64 characters) */
|
|
1848
1889
|
id: string;
|
|
1849
1890
|
};
|
|
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. */
|
|
1892
|
+
override?: boolean;
|
|
1850
1893
|
} | {
|
|
1851
1894
|
kind: "advance_card";
|
|
1852
1895
|
/** The token. */
|
|
@@ -2437,6 +2480,8 @@ interface WorkshopMovePlan {
|
|
|
2437
2480
|
laneId: string;
|
|
2438
2481
|
/** (at least 0) */
|
|
2439
2482
|
expectedRevision: number;
|
|
2483
|
+
/** True to move it anyway when the board's rules refuse it (a 409 move_refused with overridable true), once the person agreed to break that rule. Held for the person to confirm (confirmation_required, rule breaks_board_rule); the card shows who moved it anyway and when. */
|
|
2484
|
+
override?: boolean;
|
|
2440
2485
|
/** The board (slates.get boards[].id; main is the first). Required when the slate holds several boards. */
|
|
2441
2486
|
boardId?: string;
|
|
2442
2487
|
}>;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slatebox-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"mcpName": "com.slatebox/slatebox",
|
|
5
|
-
"description": "Slatebox
|
|
5
|
+
"description": "Slatebox is an open source visual intelligence platform where you can invite any AI via MCP to collaborate with you and your team.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"mcp",
|
|
8
8
|
"mcp-server",
|