@tobos/cli 0.4.36 → 0.4.37

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.
@@ -114,7 +114,7 @@ export declare const JoinCode: Component<JoinCodeProps>;
114
114
  var define_TOBOS_SKILL_default;
115
115
  var init_define_TOBOS_SKILL = __esm({
116
116
  "<define:TOBOS_SKILL>"() {
117
- 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 standard. 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" };
117
+ 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 standard. 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. A show starts there alone: no link you can get presents the deck.\n" };
118
118
  }
119
119
  });
120
120
 
@@ -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-WILUGUHH.js";
8
+ } from "./chunk-2PBD4KMV.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-3Z7NLUDO.js";
10
+ } from "./chunk-YCD53RKY.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-WILUGUHH.js";
22
+ } from "./chunk-2PBD4KMV.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.36" : "dev";
257
+ var VERSION = true ? "0.4.37" : "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-UED5RQNZ.js");
1058
+ const { checkTypes } = await import("./types-JBT6C3VD.js");
1059
1059
  problems.push(...await checkTypes(copy.root, (m) => out.note(m)));
1060
1060
  }
1061
1061
  const { errors, warnings } = problemSummary(problems);
@@ -1117,8 +1117,8 @@ async function pushIfChanged(out, id, message) {
1117
1117
  const { pushed, uploaded } = await pushCopy(out, found, message);
1118
1118
  return { pushed, uploaded };
1119
1119
  }
1120
- async function viewUrl(id, view, hours) {
1121
- return api(`/api/decks/${id}/view`, { body: { view, hours } });
1120
+ async function renderView(id) {
1121
+ return api(`/api/decks/${id}/view`, { body: { view: "render" } });
1122
1122
  }
1123
1123
  async function deckId(args) {
1124
1124
  if (typeof args.values.deck === "string") return parseId(args.values.deck);
@@ -1129,7 +1129,7 @@ async function open(out, args) {
1129
1129
  if (!position && typeof args.values.deck !== "string" && !findCopy()?.base) return openApp(out);
1130
1130
  const id = await deckId(args);
1131
1131
  const { pushed } = await pushIfChanged(out, id);
1132
- const url = args.values.presenter ? (await viewUrl(id, "presenter", 12)).url : `${settings().server}/${id}`;
1132
+ const url = `${settings().server}/${id}`;
1133
1133
  const full = position ? `${url}#${position}` : url;
1134
1134
  const opened = !args.values.print && await openUrl(full);
1135
1135
  out.result({ url: full, opened, pushed }, () => full);
@@ -1140,13 +1140,13 @@ async function openApp(out) {
1140
1140
  out.result({ url, opened }, () => url);
1141
1141
  }
1142
1142
  async function render(out, args) {
1143
- const { renderBeats } = await import("./render-3LDAHHR3.js");
1143
+ const { renderBeats } = await import("./render-4QOUW3WM.js");
1144
1144
  const copy = findCopy();
1145
1145
  const deck = copy?.base ? { id: copy.base.deck, root: copy.root } : void 0;
1146
1146
  const id = typeof args.values.deck === "string" ? parseId(args.values.deck) : deck?.id;
1147
1147
  if (!id) throw new CliError("Run this inside a deck you pulled, or pass --deck <id>.");
1148
1148
  const { pushed, uploaded } = await pushIfChanged(out, id, args.values.message);
1149
- const view = await viewUrl(id, "render");
1149
+ const view = await renderView(id);
1150
1150
  const { url } = view;
1151
1151
  const rev = view.rev ?? void 0;
1152
1152
  const targets2 = [];
@@ -1235,9 +1235,8 @@ from anywhere)
1235
1235
  tobos render scene/beat | scene | --all PNGs of beats, for you to look at
1236
1236
  [--film] [--frames 6] [--out dir] --film: frames through the animation
1237
1237
  [--scale 2] [-m "what changed"] --scale: pixels per stage pixel; -m: for the push
1238
- tobos open [scene/beat] [--presenter] the deck's page in a browser (--presenter: a
1239
- [--print] presenter's link, which opens once); --print: print
1240
- the URL only, open nothing
1238
+ tobos open [scene/beat] [--print] the deck's page in a browser, where the person
1239
+ presents it; --print: print the URL only, open nothing
1241
1240
  tobos open outside a deck: the person's decks, in Tobos
1242
1241
 
1243
1242
  The skill (what your harness reads to know Tobos without this help)
@@ -1277,7 +1276,6 @@ var TABLE = {
1277
1276
  open: {
1278
1277
  run: open,
1279
1278
  options: {
1280
- presenter: { type: "boolean" },
1281
1279
  deck: { type: "string" },
1282
1280
  print: { type: "boolean" }
1283
1281
  }
@@ -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-WILUGUHH.js";
9
+ } from "./chunk-2PBD4KMV.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-3Z7NLUDO.js";
6
+ } from "./chunk-YCD53RKY.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-WILUGUHH.js";
17
+ } from "./chunk-2PBD4KMV.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.36",
3
+ "version": "0.4.37",
4
4
  "description": "The command line of Tobos: https://tobos.ai",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-ALv2",