@tobos/cli 0.4.38 → 0.4.40
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
|
|
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 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's design. The person's own house styles are decks in `tobos ls`: start from one with `--from <id>`, which copies its master, 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 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 starts decks from its design, and can view sees the slides.\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
|
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeText,
|
|
8
8
|
parseMediaJson,
|
|
9
9
|
unpackTar
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4P37TV7O.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-
|
|
22
|
+
} from "./chunk-O4ZPEU3X.js";
|
|
23
23
|
|
|
24
24
|
// src/main.ts
|
|
25
25
|
init_define_TOBOS_PRESENT_TYPES();
|
|
@@ -85,12 +85,12 @@ var CHANGESET_SCHEMA = {
|
|
|
85
85
|
};
|
|
86
86
|
var VERBS = {
|
|
87
87
|
list: {
|
|
88
|
-
does: "The decks
|
|
88
|
+
does: "The decks the person works on, by id: their own, and those shared with them that they may present or change. Each with its title, your level on it and whose it is, whether it is archived (read-only), when it last changed, its address in Tobos, and, for the person\u2019s own, its folder. With a path, what that folder holds: its folders, then its decks.",
|
|
89
89
|
input: { properties: { path: { type: "string", description: FOLDER_PATH } }, required: [] },
|
|
90
90
|
cli: [
|
|
91
91
|
{
|
|
92
92
|
usage: "tobos ls [/path]",
|
|
93
|
-
does: "your decks
|
|
93
|
+
does: "your decks, by id, with your level on each, whose it is and its folder; with a path, what that folder holds"
|
|
94
94
|
}
|
|
95
95
|
]
|
|
96
96
|
},
|
|
@@ -139,31 +139,33 @@ var VERBS = {
|
|
|
139
139
|
chat: "Each file\u2019s text in full, a patch of part of it, a file on the web for media/, or null to delete it. All or nothing, so put everything a step needs into one call."
|
|
140
140
|
},
|
|
141
141
|
new: {
|
|
142
|
-
does: "Makes a deck in the person\u2019s account from
|
|
142
|
+
does: "Makes a deck in the person\u2019s account, with its first version, `rev`: one title scene, and the design of the deck it starts from, its master, the master\u2019s media and the packages it imports. Tobos standard unless another deck is named, such as the person\u2019s own house style (ask which when they have several). To use another deck\u2019s scenes too, read them and write them like any file.",
|
|
143
143
|
input: {
|
|
144
144
|
properties: {
|
|
145
145
|
title: { type: "string", description: "The title of the talk." },
|
|
146
|
-
from: {
|
|
147
|
-
|
|
146
|
+
from: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "The id of the deck whose design to start from, one you may edit or present."
|
|
149
|
+
}
|
|
148
150
|
},
|
|
149
151
|
required: ["title"]
|
|
150
152
|
},
|
|
151
|
-
chat: "Gives the deck\u2019s id, its first version, `rev`, its files, and its address in Tobos; `list` gives
|
|
153
|
+
chat: "Gives the deck\u2019s id, its first version, `rev`, its files, and its address in Tobos; `list` gives the ids of the decks to start from.",
|
|
152
154
|
cli: [
|
|
153
155
|
{
|
|
154
|
-
usage: 'tobos new "Title" [--from <id>] [--
|
|
155
|
-
does: "a deck
|
|
156
|
+
usage: 'tobos new "Title" [--from <id>] [--dir dir]',
|
|
157
|
+
does: "a deck with the design of another (Tobos standard unless --from); pulled into ./<id> or dir (--no-pull: only made)"
|
|
156
158
|
}
|
|
157
159
|
]
|
|
158
160
|
},
|
|
159
161
|
move: {
|
|
160
|
-
does: "Moves the person\u2019s decks
|
|
162
|
+
does: "Moves the person\u2019s decks, a deck by its id or title, and folders, by path, with all that is in them, into a folder, made with the folders on its path if there are none. A folder a move empties goes. Refused, with nothing moved, if one isn\u2019t there, if a title is two decks\u2019 (name that one by its id), if the folder has one of a moved folder\u2019s name, or if a folder would go into itself.",
|
|
161
163
|
input: {
|
|
162
164
|
properties: {
|
|
163
165
|
decks: {
|
|
164
166
|
type: "array",
|
|
165
167
|
items: { type: "string" },
|
|
166
|
-
description: "Decks
|
|
168
|
+
description: "Decks to move, each by its id or title."
|
|
167
169
|
},
|
|
168
170
|
folders: {
|
|
169
171
|
type: "array",
|
|
@@ -254,7 +256,7 @@ function settings() {
|
|
|
254
256
|
}
|
|
255
257
|
|
|
256
258
|
// src/api.ts
|
|
257
|
-
var VERSION = true ? "0.4.
|
|
259
|
+
var VERSION = true ? "0.4.40" : "dev";
|
|
258
260
|
function newer(a, b) {
|
|
259
261
|
const parse = (v) => /^\d+\.\d+\.\d+/.test(v) ? v.split(".").map((n) => parseInt(n)) : null;
|
|
260
262
|
const x = parse(a);
|
|
@@ -922,7 +924,6 @@ async function whoami(out) {
|
|
|
922
924
|
function aboutDeck(d) {
|
|
923
925
|
const can = { editor: "you edit", presenter: "you present", viewer: "you view" };
|
|
924
926
|
const notes = [
|
|
925
|
-
d.kind === "template" && "template",
|
|
926
927
|
d.role && d.role !== "owner" && `${d.owner ?? "someone else"}\u2019s, ${can[d.role]}`,
|
|
927
928
|
d.archived && "archived: read-only"
|
|
928
929
|
].filter(Boolean);
|
|
@@ -1010,11 +1011,7 @@ async function create(out, args) {
|
|
|
1010
1011
|
if (!args.values["no-pull"] && typeof args.values.dir === "string" && existsSync3(resolve2(args.values.dir)))
|
|
1011
1012
|
throw new CliError(`${resolve2(args.values.dir)} already exists.`);
|
|
1012
1013
|
const info = await api("/api/decks", {
|
|
1013
|
-
body: {
|
|
1014
|
-
title,
|
|
1015
|
-
from: args.values.from,
|
|
1016
|
-
template: Boolean(args.values.template)
|
|
1017
|
-
}
|
|
1014
|
+
body: { title, from: args.values.from }
|
|
1018
1015
|
});
|
|
1019
1016
|
let dir2;
|
|
1020
1017
|
if (!args.values["no-pull"]) {
|
|
@@ -1055,7 +1052,7 @@ async function check(out, args) {
|
|
|
1055
1052
|
);
|
|
1056
1053
|
const problems = [...written.problems];
|
|
1057
1054
|
if (args.values.types) {
|
|
1058
|
-
const { checkTypes } = await import("./types-
|
|
1055
|
+
const { checkTypes } = await import("./types-WWKHESFV.js");
|
|
1059
1056
|
problems.push(...await checkTypes(copy.root, (m) => out.note(m)));
|
|
1060
1057
|
}
|
|
1061
1058
|
const { errors, warnings } = problemSummary(problems);
|
|
@@ -1140,7 +1137,7 @@ async function openApp(out) {
|
|
|
1140
1137
|
out.result({ url, opened }, () => url);
|
|
1141
1138
|
}
|
|
1142
1139
|
async function render(out, args) {
|
|
1143
|
-
const { renderBeats } = await import("./render-
|
|
1140
|
+
const { renderBeats } = await import("./render-WQNGBPNK.js");
|
|
1144
1141
|
const copy = findCopy();
|
|
1145
1142
|
const deck = copy?.base ? { id: copy.base.deck, root: copy.root } : void 0;
|
|
1146
1143
|
const id = typeof args.values.deck === "string" ? parseId(args.values.deck) : deck?.id;
|
|
@@ -1265,8 +1262,7 @@ var TABLE = {
|
|
|
1265
1262
|
options: {
|
|
1266
1263
|
dir: { type: "string" },
|
|
1267
1264
|
"no-pull": { type: "boolean" },
|
|
1268
|
-
from: { type: "string" }
|
|
1269
|
-
template: { type: "boolean" }
|
|
1265
|
+
from: { type: "string" }
|
|
1270
1266
|
}
|
|
1271
1267
|
},
|
|
1272
1268
|
mv: { run: mv },
|
|
@@ -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-
|
|
6
|
+
} from "./chunk-4P37TV7O.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-
|
|
17
|
+
} from "./chunk-O4ZPEU3X.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({
|