@vosjs/cli 0.39.0 → 0.40.0
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 +4 -3
- package/dist/{chunk-RECQEBXN.js → chunk-7TDL3N24.js} +28 -4
- package/dist/{chunk-RECQEBXN.js.map → chunk-7TDL3N24.js.map} +1 -1
- package/dist/cli.js +15 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{run-BTBEJLWL.js → run-SDPKU6AV.js} +2 -2
- package/package.json +7 -7
- /package/dist/{run-BTBEJLWL.js.map → run-SDPKU6AV.js.map} +0 -0
package/README.md
CHANGED
|
@@ -217,8 +217,9 @@ Everything that runs on your machine is open source; [vos.so](https://vos.so) is
|
|
|
217
217
|
vos login [--key <k>] [--label <name>] [--no-browser] # browser sign-in: a code and a vos.so/cli/auth URL, a human approves, the key stores itself
|
|
218
218
|
vos fetch <vosId|url> [--out <slug>] [--media] # a program writes config.json + vos.json; a take writes doc.json (+ the recording with --media)
|
|
219
219
|
vos check bright-loop/config.json # full local validation
|
|
220
|
-
vos push bright-loop/config.json # create a PRIVATE vos (
|
|
221
|
-
vos push bright-loop/config.json --vos <id> # add a version
|
|
220
|
+
vos push bright-loop/config.json # untracked: create a PRIVATE vos. Tracked (vos.json): add a version to it
|
|
221
|
+
vos push bright-loop/config.json --vos <id> # add a version to a vos this directory does not track
|
|
222
|
+
vos push bright-loop/config.json --remix-of <id> # create a SEPARATE vos from this config, with that lineage
|
|
222
223
|
vos push bright-loop/config.json --claimable # no credential: a 72 h claim link instead (programs only)
|
|
223
224
|
vos push take --yes --label "first pass" --note "…" # host a take: private vos + version history (the recording uploads once)
|
|
224
225
|
vos pull bright-loop [--since <versionId>] [--check] # what changed on vos.so since your base; syncs config.json (backup kept), or doc.json for a take
|
|
@@ -229,7 +230,7 @@ vos asset push <file…> [--folder <slug>] | rename <id> <name.ext>
|
|
|
229
230
|
vos recipe push <FILE.md> --folder <slug> | --asset <id> # the one recipe write: create, or replace in place
|
|
230
231
|
```
|
|
231
232
|
|
|
232
|
-
`push` is polymorphic by a deterministic sniff, never a flag: a take directory (a `doc.json` carrying `source`) pushes recording and document through the take pipeline; a `config.json` (or a directory holding one) pushes the program, and a `doc.json` beside it that carries `program` (a program document: overlays, objects, audio, speed, tween edits, its own length; `program.config` omitted on disk) rides along, lint-gated. `fetch` and `pull` write a program document back the same way. `pull` takes `--since <versionId>` (walk the changelog from that base instead of the tracked one) and `--check` (print what changed and stop: nothing on disk moves) on both paths. Program pushes take `--vos`, `--title`, `--slug`, `--desc`, `--tags`, `--folder`, `--remix-of`, `--base`, `--label`, `--note`, `--override <id>` (repeatable) and `--claimable`; take pushes take `--title`, `--label`, `--note`, `--folder`, `--override` and `--yes`.
|
|
233
|
+
`push` is polymorphic by a deterministic sniff, never a flag: a take directory (a `doc.json` carrying `source`) pushes recording and document through the take pipeline; a `config.json` (or a directory holding one) pushes the program, and a `doc.json` beside it that carries `program` (a program document: overlays, objects, audio, speed, tween edits, its own length; `program.config` omitted on disk) rides along, lint-gated. `fetch` and `pull` write a program document back the same way. `pull` takes `--since <versionId>` (walk the changelog from that base instead of the tracked one) and `--check` (print what changed and stop: nothing on disk moves) on both paths. A program push LANDS where `vos.json` says: a directory that tracks a vos iterates it, so the fetch, edit, check, push, pull loop needs no flags, and making something separate from the same config is the explicit `--remix-of` door. Program pushes take `--vos`, `--title`, `--slug`, `--desc`, `--tags`, `--folder`, `--remix-of`, `--base`, `--label`, `--note`, `--override <id>` (repeatable) and `--claimable`; take pushes take `--title`, `--label`, `--note`, `--folder`, `--override` and `--yes`.
|
|
233
234
|
|
|
234
235
|
Both paths share the same base tracking and the same two 409 shapes. `stale_base` replays the platform's typed changelog: run `vos pull`, re-apply, push again. `protected_conflict` lists nodes a human edited in the studio: keep their values, or re-push with `--override <id>` only when the user asked for that exact change. The first push of a take asks before uploading (`--yes` for headless); agents never upload unprompted. The take's duration rides the upload, and the platform refuses a take over the hosted recording cap. Every push should carry `--label` (what changed, one line) and `--note` (why: the user's ask); the version history reads as a conversation, and an unlabelled push is a turn the human cannot read.
|
|
235
236
|
|
|
@@ -7971,6 +7971,21 @@ function takePushRefusal(ask) {
|
|
|
7971
7971
|
return `this take tracks vos ${ask.trackedVosId} (its vos.json), not ${ask.vos}. Drop --vos to push there, or remove vos.json to adopt ${ask.vos} instead`;
|
|
7972
7972
|
return null;
|
|
7973
7973
|
}
|
|
7974
|
+
function programPushTarget(ask) {
|
|
7975
|
+
if (ask.vos) return { kind: "version", vosId: ask.vos, tracked: false };
|
|
7976
|
+
if (ask.remixOf) return { kind: "create", remixOfId: ask.remixOf };
|
|
7977
|
+
const tracked = ask.trackedVosId;
|
|
7978
|
+
if (!tracked) return { kind: "create" };
|
|
7979
|
+
const extra = ask.createOnly ?? [];
|
|
7980
|
+
if (extra.length) {
|
|
7981
|
+
const list = extra.map((f) => `--${f}`).join(", ");
|
|
7982
|
+
return {
|
|
7983
|
+
kind: "refuse",
|
|
7984
|
+
why: `this directory tracks vos ${tracked} (vos.json), so a bare push adds a VERSION to it, and ${list} ${extra.length > 1 ? "apply" : "applies"} only when creating. To make a separate vos from this config: vos push <config.json> --remix-of ${tracked} ${list}. To change the tracked vos's title or slug, edit it on vos.so`
|
|
7985
|
+
};
|
|
7986
|
+
}
|
|
7987
|
+
return { kind: "version", vosId: tracked, tracked: true };
|
|
7988
|
+
}
|
|
7974
7989
|
async function pushTake(dir, flags, r) {
|
|
7975
7990
|
const take = await loadTake(dir);
|
|
7976
7991
|
if (!take.doc) {
|
|
@@ -8659,7 +8674,7 @@ async function cmdPushProgram(argv) {
|
|
|
8659
8674
|
const config = pre.config;
|
|
8660
8675
|
const state = readSyncState(dir);
|
|
8661
8676
|
const vosFlag = strFlag(flags, "vos");
|
|
8662
|
-
const
|
|
8677
|
+
const explicitVosId = vosFlag ? parseVosId(vosFlag) : null;
|
|
8663
8678
|
const programDoc = await readProgramDoc(dir, config);
|
|
8664
8679
|
if (programDoc) {
|
|
8665
8680
|
const lint = lintDoc(programDoc);
|
|
@@ -8670,7 +8685,7 @@ async function cmdPushProgram(argv) {
|
|
|
8670
8685
|
for (const w of lint.warnings) r.log(`warning doc.json: ${w}`);
|
|
8671
8686
|
}
|
|
8672
8687
|
if (flags.claimable === true) {
|
|
8673
|
-
if (
|
|
8688
|
+
if (explicitVosId) {
|
|
8674
8689
|
throw new UsageError(
|
|
8675
8690
|
"--claimable creates a NEW claimable vos and cannot iterate (--vos). After the human claims it, iterate with their key: vos push --vos <id>"
|
|
8676
8691
|
);
|
|
@@ -8704,6 +8719,15 @@ with their key: vos push ${source} --vos ${String(created2.id ?? "<id>")}`
|
|
|
8704
8719
|
const desc = strFlag(flags, "desc");
|
|
8705
8720
|
const tagsFlag = strFlag(flags, "tags");
|
|
8706
8721
|
const folderRef = strFlag(flags, "folder");
|
|
8722
|
+
const remixOfFlag = strFlag(flags, "remix-of");
|
|
8723
|
+
const pushTarget = programPushTarget({
|
|
8724
|
+
vos: explicitVosId,
|
|
8725
|
+
remixOf: remixOfFlag,
|
|
8726
|
+
trackedVosId: state?.vosId ?? null,
|
|
8727
|
+
createOnly: ["title", "slug"].filter((f) => strFlag(flags, f))
|
|
8728
|
+
});
|
|
8729
|
+
if (pushTarget.kind === "refuse") throw new UsageError(pushTarget.why);
|
|
8730
|
+
const vosId = pushTarget.kind === "version" ? pushTarget.vosId : null;
|
|
8707
8731
|
if (vosId && (desc || tagsFlag || folderRef)) {
|
|
8708
8732
|
throw new UsageError(
|
|
8709
8733
|
"--desc/--tags/--folder apply when CREATING a vos. On an existing one: vos folder move <id> --to <folder> for filing; edit title/description/tags on vos.so"
|
|
@@ -8772,7 +8796,7 @@ with their key: vos push ${source} --vos ${String(created2.id ?? "<id>")}`
|
|
|
8772
8796
|
);
|
|
8773
8797
|
return EXIT_OK;
|
|
8774
8798
|
}
|
|
8775
|
-
const remixOfId =
|
|
8799
|
+
const remixOfId = pushTarget.kind === "create" ? pushTarget.remixOfId : void 0;
|
|
8776
8800
|
const fallbackTitle = state?.title ? `${state.title} remix` : basename4(source).replace(/\.json$/i, "") || "vos remix";
|
|
8777
8801
|
const title = (strFlag(flags, "title") ?? fallbackTitle).slice(0, 100);
|
|
8778
8802
|
const folderId = folderRef ? resolveFolder(await listFolders(origin, key), folderRef).id : void 0;
|
|
@@ -11740,4 +11764,4 @@ export {
|
|
|
11740
11764
|
takeBrowserArgs,
|
|
11741
11765
|
run
|
|
11742
11766
|
};
|
|
11743
|
-
//# sourceMappingURL=chunk-
|
|
11767
|
+
//# sourceMappingURL=chunk-7TDL3N24.js.map
|