@tobos/cli 0.4.26 → 0.4.27
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/dist/{chunk-AAEIX4XE.js → chunk-C64PAF2N.js} +1 -1
- package/dist/{chunk-Q4BZVT4D.js → chunk-TCQ2QETE.js} +1 -1
- package/dist/{chunk-CIDXWFWY.js → chunk-YCMXQODD.js} +1 -1
- package/dist/cli.js +8 -76
- package/dist/{render-A67ZX3V6.js → render-PTXWZNVT.js} +2 -2
- package/dist/{src-X7IVBYPX.js → src-637KP3RE.js} +2 -2
- package/dist/{types-SVU2BZB5.js → types-AVF2FBWC.js} +3 -3
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
init_define_TOBOS_PRESENT_TYPES,
|
|
9
9
|
init_define_TOBOS_SKILL,
|
|
10
10
|
init_define_TOBOS_TOOLCHAIN
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TCQ2QETE.js";
|
|
12
12
|
|
|
13
13
|
// ../node_modules/.pnpm/aria-query@5.3.1/node_modules/aria-query/lib/util/iteratorProxy.js
|
|
14
14
|
var require_iteratorProxy = __commonJS({
|
|
@@ -116,7 +116,7 @@ export declare const JoinCode: Component<JoinCodeProps>;
|
|
|
116
116
|
var define_TOBOS_SKILL_default;
|
|
117
117
|
var init_define_TOBOS_SKILL = __esm({
|
|
118
118
|
"<define:TOBOS_SKILL>"() {
|
|
119
|
-
define_TOBOS_SKILL_default = { "SKILL.md": "---\nname: tobos-present\ndescription: Build presentations as code with Tobos Present. Use when the user wants a talk, lecture, pitch or slide deck made, changed, rendered, presented or exported as a PDF, or mentions Tobos or `tobos`.\n---\n\n<!-- Installed by the `tobos` CLI and overwritten when it updates, so changes made here don't last. -->\n\n# Tobos Present\n\nTobos hosts presentations written as code: a deck is a git repository, one Svelte 5 file per scene, advancing one beat per click. You build it with the `tobos` command; Tobos checks every push, hosts the deck and puts it on stage. `tobos --help` lists every command, and each takes `--json`.\n\n## Get to the deck\n\n- `tobos decks` lists the decks and templates the person can work on, by id. `tobos clone <id>` gets one; `tobos new \"Title\"` starts one and clones it.\n- A new deck starts from Tobos simple. The person's own templates, their house styles, are in `tobos decks`: start from one with `--from <id>`, and ask which when there are several.\n- Then read the deck's `AGENTS.md`: it points to the loop, the format and the deck's slide master.\n- The person's decks are in folders, which `tobos --help` lists the commands for.\n\nExit code 3 means no one is logged in. Ask the person for their e-mail address and run `tobos login <email>`. Then ask, in one line, for the 6-digit code it mailed them (it may be in spam, and using it accepts https://tobos.ai/terms), and run `tobos login --code <code>`. In CI or a sandbox with no one to ask, `TOBOS_TOKEN` and `TOBOS_SERVER` stand in for the login.\n\n## Follow the person\n\nThey decide what to make and how much of it you build: one scene at a time, or the whole deck at once. Build what they ask, at the size they ask, from what they have told you about the talk. When they ask how Tobos works or where to start, give them the tour, https://tobos.ai/tour, and nothing of your own: no explanation, no deck to try.\n\n## Folders\n\n- Look at the person's folders before you make or move a deck, and file it under a folder name they have already, as they wrote it, rather than a new one that means the same.\n- File every deck you make: once it is made, move it into the folder it belongs in.\n- Before you move more than a handful of decks, show the person the tree you propose, and make it once they say yes.\n- A reorganisation is taken back by moving the decks back where they were: note where they were before you move them.\n- A folder stays when a move empties it, until the person removes it: removing is theirs, as deleting a deck is.\n\n## What stays the person's\n\n- **Exit code 5** is a plan's limit or an archived deck. Show the person the message as it is, which says what they can do, and wait for their answer. The deck stays in Tobos: a deck built elsewhere to upload later, media shrunk or hosted elsewhere to fit, or someone else's account would decide for them what is theirs to decide.\n- **Archiving, opening again and deleting** a deck, and deleting a session's answers, are done by the person on the deck's page, also in a browser `tobos open` logged in.\n- **
|
|
119
|
+
define_TOBOS_SKILL_default = { "SKILL.md": "---\nname: tobos-present\ndescription: Build presentations as code with Tobos Present. Use when the user wants a talk, lecture, pitch or slide deck made, changed, rendered, presented or exported as a PDF, or mentions Tobos or `tobos`.\n---\n\n<!-- Installed by the `tobos` CLI and overwritten when it updates, so changes made here don't last. -->\n\n# Tobos Present\n\nTobos hosts presentations written as code: a deck is a git repository, one Svelte 5 file per scene, advancing one beat per click. You build it with the `tobos` command; Tobos checks every push, hosts the deck and puts it on stage. `tobos --help` lists every command, and each takes `--json`.\n\n## Get to the deck\n\n- `tobos decks` lists the decks and templates the person can work on, by id. `tobos clone <id>` gets one; `tobos new \"Title\"` starts one and clones it.\n- A new deck starts from Tobos simple. The person's own templates, their house styles, are in `tobos decks`: start from one with `--from <id>`, and ask which when there are several.\n- Then read the deck's `AGENTS.md`: it points to the loop, the format and the deck's slide master.\n- The person's decks are in folders, which `tobos --help` lists the commands for.\n\nExit code 3 means no one is logged in. Ask the person for their e-mail address and run `tobos login <email>`. Then ask, in one line, for the 6-digit code it mailed them (it may be in spam, and using it accepts https://tobos.ai/terms), and run `tobos login --code <code>`. In CI or a sandbox with no one to ask, `TOBOS_TOKEN` and `TOBOS_SERVER` stand in for the login.\n\n## Follow the person\n\nThey decide what to make and how much of it you build: one scene at a time, or the whole deck at once. Build what they ask, at the size they ask, from what they have told you about the talk. When they ask how Tobos works or where to start, give them the tour, https://tobos.ai/tour, and nothing of your own: no explanation, no deck to try.\n\n## Folders\n\n- Look at the person's folders before you make or move a deck, and file it under a folder name they have already, as they wrote it, rather than a new one that means the same.\n- File every deck you make: once it is made, move it into the folder it belongs in.\n- Before you move more than a handful of decks, show the person the tree you propose, and make it once they say yes.\n- A reorganisation is taken back by moving the decks back where they were: note where they were before you move them.\n- A folder stays when a move empties it, until the person removes it: removing is theirs, as deleting a deck is.\n\n## What stays the person's\n\n- **Exit code 5** is a plan's limit or an archived deck. Show the person the message as it is, which says what they can do, and wait for their answer. The deck stays in Tobos: a deck built elsewhere to upload later, media shrunk or hosted elsewhere to fit, or someone else's account would decide for them what is theirs to decide.\n- **Archiving, opening again and deleting** a deck, and deleting a session's answers, are done by the person on the deck's page, also in a browser `tobos open` logged in.\n- **Who is on a deck, and its link,** are the person's, on the deck's page: they put people on it, change what each may do, take them off, and turn the link on or off there. You neither see nor change any of it: `tobos decks` tells you only what you may do on each deck and whose it is. Can edit builds it with their own agent, can present presents it with its notes and polls, and can view sees the slides; on a template, can edit and can use.\n- **The URL `tobos open` prints** opens once, for whoever opens it first: give it to the person unopened, and run the command again for another window or computer.\n\n## The story\n\nA deck's story is the talk as the speaker tells it, in paragraphs. What follows a mention of a scene, `[Title](scene:<id>)` or one of its beats, `[Title](scene:<id>/<beat>)`, up to the next mention, is that scene's: the presenter sees it as speaker notes. The server holds the story, not git: the person types in it on the deck's page, and you change it with `tobos story`.\n\n- Read it again right before each change: the person may be typing.\n- Change what the person asked, and keep the rest of their words as they are.\n- An edit is anchored on exact text that occurs once in its paragraph. Exit code 4 means the paragraph changed meanwhile: anchor on it as the reply gives it, and try again.\n- Set `TOBOS_AGENT` to your name (`claude`, `codex`), so the page shows what you wrote.\n" };
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
|
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
formatMediaJson,
|
|
6
6
|
formatProblems,
|
|
7
7
|
mediaTypeOf
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-C64PAF2N.js";
|
|
9
9
|
import {
|
|
10
10
|
ASK_THE_PERSON,
|
|
11
11
|
CliError,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
createOutput,
|
|
14
14
|
offerUpdate,
|
|
15
15
|
update
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YCMXQODD.js";
|
|
17
17
|
import {
|
|
18
18
|
define_TOBOS_SKILL_default,
|
|
19
19
|
init_define_TOBOS_PRESENT_TYPES,
|
|
20
20
|
init_define_TOBOS_SKILL,
|
|
21
21
|
init_define_TOBOS_TOOLCHAIN
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TCQ2QETE.js";
|
|
23
23
|
|
|
24
24
|
// src/main.ts
|
|
25
25
|
init_define_TOBOS_PRESENT_TYPES();
|
|
@@ -89,7 +89,7 @@ function settings() {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// src/api.ts
|
|
92
|
-
var VERSION = true ? "0.4.
|
|
92
|
+
var VERSION = true ? "0.4.27" : "dev";
|
|
93
93
|
function newer(a, b) {
|
|
94
94
|
const parse = (v) => /^\d+\.\d+\.\d+/.test(v) ? v.split(".").map((n) => parseInt(n)) : null;
|
|
95
95
|
const x = parse(a);
|
|
@@ -760,7 +760,7 @@ async function pushedFiles(root) {
|
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
async function runCheck(dir2) {
|
|
763
|
-
const { buildDeck } = await import("./src-
|
|
763
|
+
const { buildDeck } = await import("./src-637KP3RE.js");
|
|
764
764
|
const started = performance.now();
|
|
765
765
|
const files = await pushedFiles(dir2.root);
|
|
766
766
|
const result = await buildDeck(directoryTree(dir2.root, files));
|
|
@@ -821,7 +821,7 @@ async function check(out, args) {
|
|
|
821
821
|
await syncMediaJson(deck.root);
|
|
822
822
|
const result = await runCheck(deck);
|
|
823
823
|
if (args.values.types) {
|
|
824
|
-
const { checkTypes } = await import("./types-
|
|
824
|
+
const { checkTypes } = await import("./types-AVF2FBWC.js");
|
|
825
825
|
const sent = result.files && new Set(result.files);
|
|
826
826
|
result.problems.push(
|
|
827
827
|
...(await checkTypes(deck.root, (m) => out.note(m))).filter((p) => sent?.has(p.file) ?? true)
|
|
@@ -848,7 +848,7 @@ async function pushWorkingCopy(out, deck, message) {
|
|
|
848
848
|
const result = await runCheck(deck);
|
|
849
849
|
const { errors, warnings } = problemSummary(result.problems);
|
|
850
850
|
if (errors > 0) return { ok: false, errors, warnings, problems: result.problems };
|
|
851
|
-
const { mediaInUse } = await import("./src-
|
|
851
|
+
const { mediaInUse } = await import("./src-637KP3RE.js");
|
|
852
852
|
const shown = result.manifest ? mediaInUse(result.manifest) : media;
|
|
853
853
|
for (const [name, entry] of Object.entries(shown)) {
|
|
854
854
|
const note = sizeNote(name, entry.size);
|
|
@@ -1014,58 +1014,6 @@ async function story(out, args) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
throw new CliError(`No \`tobos story ${action}\`: edit, add or delete.`);
|
|
1016
1016
|
}
|
|
1017
|
-
var waiting = (p) => p.joined ? "" : ` (invited, not logged in yet${p.lapsesAt ? `; lapses ${new Date(p.lapsesAt).toLocaleDateString("en-GB", { day: "numeric", month: "short" })}` : ""})`;
|
|
1018
|
-
var CAN = {
|
|
1019
|
-
edit: "editor",
|
|
1020
|
-
present: "presenter",
|
|
1021
|
-
view: "viewer",
|
|
1022
|
-
use: "viewer"
|
|
1023
|
-
};
|
|
1024
|
-
var CAN_WORDS = {
|
|
1025
|
-
owner: "owner",
|
|
1026
|
-
editor: "can edit",
|
|
1027
|
-
presenter: "can present",
|
|
1028
|
-
viewer: "can view"
|
|
1029
|
-
};
|
|
1030
|
-
var canWords = (role, kind = "deck") => kind === "template" && role === "viewer" ? "can use" : CAN_WORDS[role];
|
|
1031
|
-
async function people(out, args) {
|
|
1032
|
-
const id = await deckId(args);
|
|
1033
|
-
const { people: people2, kind } = await api(`/api/decks/${id}/people`);
|
|
1034
|
-
out.result(
|
|
1035
|
-
{ ...kind ? { kind } : {}, people: people2 },
|
|
1036
|
-
() => people2.map(
|
|
1037
|
-
(p) => `${p.email.padEnd(32)} ${canWords(p.role, kind)}${p.paused ? ", paused: views until the plan allows more editors" : ""}${waiting(p)}`
|
|
1038
|
-
).join("\n")
|
|
1039
|
-
);
|
|
1040
|
-
}
|
|
1041
|
-
async function invite(out, args) {
|
|
1042
|
-
const email = args.positionals[0];
|
|
1043
|
-
const level = CAN[String(args.values.can)];
|
|
1044
|
-
if (!email || !level)
|
|
1045
|
-
throw new CliError(
|
|
1046
|
-
"Invite whom, to do what? `tobos invite <email> --can edit`, `--can present` or `--can view`; to a template, `--can edit` or `--can use`."
|
|
1047
|
-
);
|
|
1048
|
-
const id = await deckId(args);
|
|
1049
|
-
const done = await api(`/api/decks/${id}/people`, { body: { email, level } });
|
|
1050
|
-
const now = `${done.email} ${canWords(done.level, done.kind)} now`;
|
|
1051
|
-
out.result(
|
|
1052
|
-
done,
|
|
1053
|
-
() => done.mailed ? `${now}; they got a mail with the way in.` : done.mailFailed ? `${now}, but the invite mail couldn't be sent: send them ${done.link}` : done.link ? `${now}. They had an invite to it in the last day, so no second mail: send them ${done.link}` : `${now}.`
|
|
1054
|
-
);
|
|
1055
|
-
}
|
|
1056
|
-
async function uninvite(out, args) {
|
|
1057
|
-
const email = args.positionals[0];
|
|
1058
|
-
if (!email) throw new CliError("Take whom off? `tobos uninvite <email>`.");
|
|
1059
|
-
const id = await deckId(args);
|
|
1060
|
-
const done = await api(`/api/decks/${id}/people`, {
|
|
1061
|
-
method: "DELETE",
|
|
1062
|
-
body: { email }
|
|
1063
|
-
});
|
|
1064
|
-
out.result(
|
|
1065
|
-
done,
|
|
1066
|
-
() => `${done.removed} is off the ${done.kind ?? "deck"}; their access has ended.`
|
|
1067
|
-
);
|
|
1068
|
-
}
|
|
1069
1017
|
async function exportTarget(args, file2) {
|
|
1070
1018
|
if (args.values.out) return resolve2(args.values.out);
|
|
1071
1019
|
const deck = await findDeck().catch(() => void 0);
|
|
@@ -1100,7 +1048,7 @@ async function exportDeck(out, args) {
|
|
|
1100
1048
|
);
|
|
1101
1049
|
}
|
|
1102
1050
|
async function render(out, args) {
|
|
1103
|
-
const { renderBeats } = await import("./render-
|
|
1051
|
+
const { renderBeats } = await import("./render-PTXWZNVT.js");
|
|
1104
1052
|
const deck = await findDeck().catch(() => void 0);
|
|
1105
1053
|
const id = typeof args.values.deck === "string" ? parseId(args.values.deck) : deck?.id;
|
|
1106
1054
|
if (!id) throw new CliError("Run this inside a cloned deck, or pass --deck <id>.");
|
|
@@ -1233,16 +1181,6 @@ a beat: [Title](scene:<id>/<beat>))
|
|
|
1233
1181
|
TOBOS_AGENT=<name> says which agent you are: the
|
|
1234
1182
|
deck's page marks what you wrote
|
|
1235
1183
|
|
|
1236
|
-
People on a deck or template (from its working copy, or --deck <id>)
|
|
1237
|
-
tobos people who is on it, what each may do, and when a
|
|
1238
|
-
waiting invite lapses
|
|
1239
|
-
tobos invite <email> --can edit|present|view
|
|
1240
|
-
its owner puts them on it, mailed the way in;
|
|
1241
|
-
someone on it already gets the new level. On a
|
|
1242
|
-
template, --can edit|use
|
|
1243
|
-
tobos uninvite <email> take them off, and their access ends at once;
|
|
1244
|
-
with your own address, leave it
|
|
1245
|
-
|
|
1246
1184
|
The skill (what your harness reads to know Tobos without this help)
|
|
1247
1185
|
tobos skill install put it where Claude Code, Codex, OpenCode and others
|
|
1248
1186
|
read skills; later CLIs keep it up to date
|
|
@@ -1298,12 +1236,6 @@ var TABLE = {
|
|
|
1298
1236
|
deck: { type: "string" }
|
|
1299
1237
|
}
|
|
1300
1238
|
},
|
|
1301
|
-
people: { run: people, options: { deck: { type: "string" } } },
|
|
1302
|
-
invite: {
|
|
1303
|
-
run: invite,
|
|
1304
|
-
options: { can: { type: "string" }, deck: { type: "string" } }
|
|
1305
|
-
},
|
|
1306
|
-
uninvite: { run: uninvite, options: { deck: { type: "string" } } },
|
|
1307
1239
|
skill: { run: skill },
|
|
1308
1240
|
story: {
|
|
1309
1241
|
run: story,
|
|
@@ -3,12 +3,12 @@ import { createRequire as __tobosRequire } from 'node:module';
|
|
|
3
3
|
const require = __tobosRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
CliError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YCMXQODD.js";
|
|
7
7
|
import {
|
|
8
8
|
init_define_TOBOS_PRESENT_TYPES,
|
|
9
9
|
init_define_TOBOS_SKILL,
|
|
10
10
|
init_define_TOBOS_TOOLCHAIN
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TCQ2QETE.js";
|
|
12
12
|
|
|
13
13
|
// src/render.ts
|
|
14
14
|
init_define_TOBOS_PRESENT_TYPES();
|
|
@@ -3,17 +3,17 @@ import { createRequire as __tobosRequire } from 'node:module';
|
|
|
3
3
|
const require = __tobosRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
parseDeckJson
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C64PAF2N.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YCMXQODD.js";
|
|
10
10
|
import {
|
|
11
11
|
define_TOBOS_PRESENT_TYPES_default,
|
|
12
12
|
define_TOBOS_TOOLCHAIN_default,
|
|
13
13
|
init_define_TOBOS_PRESENT_TYPES,
|
|
14
14
|
init_define_TOBOS_SKILL,
|
|
15
15
|
init_define_TOBOS_TOOLCHAIN
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TCQ2QETE.js";
|
|
17
17
|
|
|
18
18
|
// src/types.ts
|
|
19
19
|
init_define_TOBOS_PRESENT_TYPES();
|