@tobos/cli 0.4.32 → 0.4.33

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.
@@ -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 folder of files, one Svelte 5 file per scene, advancing one beat per click. You build it with the `tobos` command, which needs no git; Tobos checks every push, keeps every version, 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 ls` lists the decks and templates the person can work on, by id. `tobos pull <id>` gets one; `tobos new \"Title\"` starts one and pulls it.\n- A new deck starts from Tobos simple. The person's own templates, their house styles, are in `tobos ls`: 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 this machine isn't connected to the person's account. Run `tobos login`: it prints an address, which the person opens on any device, logs in at (a first login signs them up, and accepts https://tobos.ai/terms) and approves this machine. Give it to them in one line, then, once they did, run `tobos login` again. 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 goes when it empties, by a move or a deck's deletion: there is no removing one. A folder with only archived decks in it isn't empty.\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, in their own browser.\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 ls` 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** is the deck's page, where the person watches it, presents it and shares it; `--presenter` gives a presenter's link instead, which opens once, for whoever opens it first.\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" };
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 folder of files, one Svelte 5 file per scene, advancing one beat per click. You build it with the `tobos` command, which needs no git; Tobos checks every push, keeps every version, 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 ls` lists the decks and templates the person can work on, by id. `tobos pull <id>` gets one; `tobos new \"Title\"` starts one and pulls it.\n- A new deck starts from Tobos simple. The person's own templates, their house styles, are in `tobos ls`: 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 this machine isn't connected to the person's account. Run `tobos login`: it prints an address, which the person opens on any device, logs in at (a first login signs them up, and accepts https://tobos.ai/terms) and approves this machine. Give it to them in one line, then, once they did, run `tobos login` again. 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 goes when it empties, by a move or a deck's deletion: there is no removing one. A folder with only archived decks in it isn't empty.\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, in their own browser.\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 ls` 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- **Each scene's notes,** what the speaker says, are the person's: they write them under the stage on the deck's page, and the presenter sees them. You neither read nor write them, and a scene needs none from you.\n- **The URL `tobos open` prints** is the deck's page, where the person watches it, presents it and shares it; `--presenter` gives a presenter's link instead, which opens once, for whoever opens it first.\n" };
120
120
  }
121
121
  });
122
122
 
@@ -5,7 +5,7 @@ import {
5
5
  init_define_TOBOS_PRESENT_TYPES,
6
6
  init_define_TOBOS_SKILL,
7
7
  init_define_TOBOS_TOOLCHAIN
8
- } from "./chunk-XG2KKGXE.js";
8
+ } from "./chunk-5LA45GOP.js";
9
9
 
10
10
  // ../deck/src/deck-json.ts
11
11
  init_define_TOBOS_PRESENT_TYPES();
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  mergeText,
8
8
  parseMediaJson,
9
9
  unpackTar
10
- } from "./chunk-T2JISWY5.js";
10
+ } from "./chunk-LBUZHZFX.js";
11
11
  import {
12
12
  ASK_THE_PERSON,
13
13
  CliError,
@@ -19,7 +19,7 @@ import {
19
19
  init_define_TOBOS_TOOLCHAIN,
20
20
  offerUpdate,
21
21
  update
22
- } from "./chunk-XG2KKGXE.js";
22
+ } from "./chunk-5LA45GOP.js";
23
23
 
24
24
  // src/main.ts
25
25
  init_define_TOBOS_PRESENT_TYPES();
@@ -254,7 +254,7 @@ function settings() {
254
254
  }
255
255
 
256
256
  // src/api.ts
257
- var VERSION = true ? "0.4.32" : "dev";
257
+ var VERSION = true ? "0.4.33" : "dev";
258
258
  function newer(a, b) {
259
259
  const parse = (v) => /^\d+\.\d+\.\d+/.test(v) ? v.split(".").map((n) => parseInt(n)) : null;
260
260
  const x = parse(a);
@@ -1055,7 +1055,7 @@ async function check(out, args) {
1055
1055
  );
1056
1056
  const problems = [...written.problems];
1057
1057
  if (args.values.types) {
1058
- const { checkTypes } = await import("./types-XT3SUHKX.js");
1058
+ const { checkTypes } = await import("./types-EPPCS5WP.js");
1059
1059
  problems.push(...await checkTypes(copy.root, (m) => out.note(m)));
1060
1060
  }
1061
1061
  const { errors, warnings } = problemSummary(problems);
@@ -1139,68 +1139,8 @@ async function openApp(out) {
1139
1139
  const opened = await openUrl(url);
1140
1140
  out.result({ url, opened }, () => url);
1141
1141
  }
1142
- async function storyTx(id, ops) {
1143
- try {
1144
- return await api(`/api/decks/${id}/story/tx`, {
1145
- body: { ops, agent: process.env.TOBOS_AGENT || void 0 }
1146
- });
1147
- } catch (error) {
1148
- if (error instanceof CliError && (error.extra.status === 409 || error.extra.status === 422)) {
1149
- const now = error.extra.paragraph;
1150
- throw new CliError(
1151
- now ? `${error.message}
1152
- It is now:
1153
- \xB6 ${now.id} ${now.text}` : error.message,
1154
- error.extra.status === 409 ? EXIT.conflict : EXIT.error,
1155
- error.extra
1156
- );
1157
- }
1158
- throw error;
1159
- }
1160
- }
1161
- async function story(out, args) {
1162
- const [action, ...rest] = args.positionals;
1163
- const id = await deckId(args);
1164
- if (!action) {
1165
- const story2 = await api(`/api/decks/${id}/story`);
1166
- out.result(
1167
- { ...story2 },
1168
- () => story2.paragraphs.length ? story2.paragraphs.map((p) => `\xB6 ${p.id.padEnd(4)} ${p.text}`).join("\n\n") : 'No story yet. `tobos story add "\u2026"` writes its first paragraph.'
1169
- );
1170
- return;
1171
- }
1172
- if (action === "edit") {
1173
- const [paragraph, find, replace] = rest;
1174
- if (!paragraph || find === void 0 || replace === void 0)
1175
- throw new CliError(
1176
- '`tobos story edit <\xB6 id> "the exact text" "what replaces it"` (`tobos story` shows the ids).'
1177
- );
1178
- const result = await storyTx(id, [{ op: "set", id: paragraph, find, replace }]);
1179
- out.result({ ...result, paragraph }, () => `Changed ${paragraph}.`);
1180
- return;
1181
- }
1182
- if (action === "add") {
1183
- const text = rest.join(" ").trim();
1184
- if (!text) throw new CliError('`tobos story add [--after <\xB6 id>] "the paragraph"`.');
1185
- const after = args.values.after ?? "end";
1186
- const result = await storyTx(id, [
1187
- { op: "insert", after: after === "start" ? null : after, text, key: "new:1" }
1188
- ]);
1189
- const paragraph = result.ids["new:1"] ?? null;
1190
- out.result({ ...result, paragraph }, () => `Added ${paragraph}.`);
1191
- return;
1192
- }
1193
- if (action === "delete") {
1194
- const paragraph = rest[0];
1195
- if (!paragraph) throw new CliError("`tobos story delete <\xB6 id>`.");
1196
- const result = await storyTx(id, [{ op: "delete", id: paragraph }]);
1197
- out.result({ ...result, paragraph }, () => `Deleted ${paragraph}.`);
1198
- return;
1199
- }
1200
- throw new CliError(`No \`tobos story ${action}\`: edit, add or delete.`);
1201
- }
1202
1142
  async function render(out, args) {
1203
- const { renderBeats } = await import("./render-RISSGSJN.js");
1143
+ const { renderBeats } = await import("./render-W67XG7W4.js");
1204
1144
  const copy = findCopy();
1205
1145
  const deck = copy?.base ? { id: copy.base.deck, root: copy.root } : void 0;
1206
1146
  const id = typeof args.values.deck === "string" ? parseId(args.values.deck) : deck?.id;
@@ -1300,24 +1240,14 @@ from anywhere)
1300
1240
  the URL only, open nothing
1301
1241
  tobos open outside a deck: the person's decks, in Tobos
1302
1242
 
1303
- The story (what the speaker says, held by the server; a scene mentioned: [Title](scene:<id>),
1304
- a beat: [Title](scene:<id>/<beat>))
1305
- tobos story the text, by \xB6 id
1306
- tobos story edit <\xB6> "old" "new" change it, anchored on the exact text
1307
- tobos story add [--after <\xB6>] "\u2026" a new paragraph (at the end, or after \xB6)
1308
- tobos story delete <\xB6> a paragraph goes
1309
- TOBOS_AGENT=<name> says which agent you are: the
1310
- deck's page marks what you wrote
1311
-
1312
1243
  The skill (what your harness reads to know Tobos without this help)
1313
1244
  tobos skill install put it where Claude Code, Codex, OpenCode and others
1314
1245
  read skills; later CLIs keep it up to date
1315
1246
 
1316
1247
  Every command takes --json and then prints one JSON object.
1317
1248
  Exit codes: 0 ok, 1 error, 2 the deck has problems, 3 not logged in (or not yet approved),
1318
- 4 a conflict: someone changed the same lines (pull, resolve, push again; for the story, the reply
1319
- has the paragraph as it is now), 5 a plan's limit or an archived deck: the person decides what to
1320
- do, so show them the message and wait.
1249
+ 4 a conflict: someone changed the same lines (pull, resolve, push again), 5 a plan's limit or an
1250
+ archived deck: the person decides what to do, so show them the message and wait.
1321
1251
  `;
1322
1252
  var COMMON = {
1323
1253
  json: { type: "boolean" },
@@ -1353,10 +1283,6 @@ var TABLE = {
1353
1283
  }
1354
1284
  },
1355
1285
  skill: { run: skill },
1356
- story: {
1357
- run: story,
1358
- options: { deck: { type: "string" }, after: { type: "string" } }
1359
- },
1360
1286
  render: {
1361
1287
  run: render,
1362
1288
  options: {
@@ -6,7 +6,7 @@ import {
6
6
  init_define_TOBOS_PRESENT_TYPES,
7
7
  init_define_TOBOS_SKILL,
8
8
  init_define_TOBOS_TOOLCHAIN
9
- } from "./chunk-XG2KKGXE.js";
9
+ } from "./chunk-5LA45GOP.js";
10
10
 
11
11
  // src/render.ts
12
12
  init_define_TOBOS_PRESENT_TYPES();
@@ -3,7 +3,7 @@ import { createRequire as __tobosRequire } from 'node:module';
3
3
  const require = __tobosRequire(import.meta.url);
4
4
  import {
5
5
  parseDeckJson
6
- } from "./chunk-T2JISWY5.js";
6
+ } from "./chunk-LBUZHZFX.js";
7
7
  import {
8
8
  CliError,
9
9
  __commonJS,
@@ -14,7 +14,7 @@ import {
14
14
  init_define_TOBOS_PRESENT_TYPES,
15
15
  init_define_TOBOS_SKILL,
16
16
  init_define_TOBOS_TOOLCHAIN
17
- } from "./chunk-XG2KKGXE.js";
17
+ } from "./chunk-5LA45GOP.js";
18
18
 
19
19
  // ../node_modules/.pnpm/aria-query@5.3.1/node_modules/aria-query/lib/util/iteratorProxy.js
20
20
  var require_iteratorProxy = __commonJS({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tobos/cli",
3
- "version": "0.4.32",
3
+ "version": "0.4.33",
4
4
  "description": "The command line of Tobos: https://tobos.ai",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-ALv2",