@docyrus/animaguru 0.15.0 → 0.16.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 CHANGED
@@ -89,7 +89,7 @@ Use a team ID returned by `workspaces list`. The choice is saved per server in t
89
89
 
90
90
  ## Agent workflow
91
91
 
92
- Remote projects are neutral containers. `projects create` has no `--style` flag. Choose a style when generating a sprite; local film setup keeps its separate style interview.
92
+ Remote projects have no art style. `projects create` takes a name only. Choose the style for each sprite with `generate --style` or `files import --style` (hd-cartoon when left out); local film setup keeps its separate style interview.
93
93
 
94
94
  ```sh
95
95
  animaguru projects create --name "Forest cast"
@@ -102,7 +102,7 @@ animaguru files list PROJECT_ID
102
102
  animaguru files export PROJECT_ID --output forest-cast.zip
103
103
  ```
104
104
 
105
- `jobs wait` waits for the specified job only. A drawing may queue follow-up animation jobs; inspect `jobs list` and wait for those before exporting. Jobs continue on the server if the CLI exits. `files export` refuses to overwrite a file. `projects rename PROJECT_ID --name "New name"` and `projects delete PROJECT_ID --yes` manage the library. `models PROJECT_ID --image-model gpt-image-2.5 --video-model heygen/heygen-video-1` sets the defaults for future jobs. The previous `--model` option remains an alias for `--image-model`.
105
+ `jobs wait` waits for the specified job only. A drawing may queue follow-up animation jobs; inspect `jobs list` and wait for those before exporting. Jobs continue on the server if the CLI exits. `files export` refuses to overwrite a file. `projects rename PROJECT_ID --name "New name"` and `projects delete PROJECT_ID --yes` manage the library. `projects move PROJECT_ID --to OTHER_PROJECT_ID --characters SLUG,SLUG --assets ASSET_ID --avatars GROUP_ID` moves characters (with all their animations), saved assets and the project's own avatars to another project you can write to, without regenerating anything (CLI 0.16.0). `models PROJECT_ID --image-model gpt-image-2.5 --video-model heygen/heygen-video-1` sets the defaults for future jobs. The previous `--model` option remains an alias for `--image-model`.
106
106
 
107
107
  Generation and reference imports require `--yes`, which authorizes credit spending. Read estimates from `projects get` before submitting. Estimates are ranges; actual provider usage is recorded to your own balance. Paid generation needs configured production provider bindings and secrets.
108
108
 
@@ -313,7 +313,7 @@ Custom motions require 2–12 frame descriptions, a 20–600 character prompt, a
313
313
  Reference images:
314
314
 
315
315
  ```sh
316
- animaguru files import PROJECT_ID --file knight.png --name Knight --description "Keep the blue armor" --yes
316
+ animaguru files import PROJECT_ID --file knight.png --name Knight --style pixel --description "Keep the blue armor" --yes
317
317
  ```
318
318
 
319
319
  PNG, JPEG and WebP are accepted up to 10 MB. A configured service redraws the reference and charges credits; otherwise it imports the original artwork.
package/dist/animaguru.js CHANGED
@@ -19761,7 +19761,7 @@ var require_ignore2 = __commonJS({
19761
19761
  // cli/package.json
19762
19762
  var package_default = {
19763
19763
  name: "@docyrus/animaguru",
19764
- version: "0.15.0",
19764
+ version: "0.16.0",
19765
19765
  description: "Agent-friendly AnimaGuru CLI built with CrustJS",
19766
19766
  type: "module",
19767
19767
  bin: {
@@ -25306,7 +25306,7 @@ var toUnits = (credits) => Math.round(credits * UNITS_PER_CREDIT);
25306
25306
 
25307
25307
  // shared/sprites/types.ts
25308
25308
  var SPRITE_KINDS = ["character", "vehicle", "machine", "effect"];
25309
- var SPRITE_ACTIONS = ["idle", "walk", "run", "shoot", "jump", "hurt", "death", "slide", "punch", "kick"];
25309
+ var SPRITE_ACTIONS = ["idle", "walk", "run", "skid-stop", "shoot", "jump", "hurt", "death", "slide", "punch", "kick"];
25310
25310
  var SPRITE_KIND_ACTIONS = {
25311
25311
  character: SPRITE_ACTIONS,
25312
25312
  vehicle: ["idle", "move", "fire", "hurt", "destroyed"],
@@ -48961,6 +48961,24 @@ async function updateLibraryAsset(client, id2, flags) {
48961
48961
  return client.request(libraryPath(id2), { method: "PATCH", body: checked(libraryUpdateBody.safeParse(await words(flags))), timeout: 12e4 });
48962
48962
  }
48963
48963
 
48964
+ // shared/projects.ts
48965
+ var MOVE_WORK_MAX = 50;
48966
+ var moveList = (item) => external_exports.array(item).max(MOVE_WORK_MAX).default([]);
48967
+ var moveWorkBody = external_exports.object({
48968
+ to: external_exports.string().trim().regex(/^prj_[A-Za-z0-9]{8,40}$/, "Choose the project to move the work to."),
48969
+ characters: moveList(external_exports.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_.-]{0,79}$/, "Use a character id from the project.")),
48970
+ assets: moveList(external_exports.string().trim().uuid("Use an asset id from the project.")),
48971
+ avatars: moveList(heygenId)
48972
+ }).refine((body) => body.characters.length + body.assets.length + body.avatars.length > 0, { message: "Choose at least one character, asset or avatar to move." }).refine((body) => body.characters.length + body.assets.length + body.avatars.length <= MOVE_WORK_MAX, { message: `Move at most ${MOVE_WORK_MAX} items at a time.` });
48973
+
48974
+ // cli/src/projects.ts
48975
+ var commaList2 = (value) => value?.split(",").map((item) => item.trim()).filter(Boolean);
48976
+ async function moveWork(client, project, flags) {
48977
+ const parsed = moveWorkBody.safeParse({ to: flags.to, characters: commaList2(flags.characters), assets: commaList2(flags.assets), avatars: commaList2(flags.avatars) });
48978
+ if (!parsed.success) throw new Error(parsed.error.issues[0]?.message ?? "Choose what to move with --characters, --assets or --avatars.");
48979
+ return client.request(`/api/v1/sprites/${encodeURIComponent(project)}/move`, { method: "POST", body: parsed.data });
48980
+ }
48981
+
48964
48982
  // cli/src/commands.ts
48965
48983
  var assetModelIds = [...SPRITE_IMAGE_MODEL_IDS, ...SPRITE_VIDEO_MODEL_IDS, ...MUSIC_MODELS.map((m) => m.id), ...SPEECH_MODELS.map((m) => m.id), ...SFX_MODELS.map((m) => m.id)];
48966
48984
  var assetAuthorizationFlags = [
@@ -49179,7 +49197,12 @@ Confirm code: ${device.user_code}`);
49179
49197
  const client = new Client(flags.url, signal);
49180
49198
  const selected = await selectedWorkspace(client.origin);
49181
49199
  out(stdout, await client.request("/api/v1/sprites", { method: "POST", body: { owner: selected, name: flags.name, ...selectedModels(flags) } }));
49182
- }))).add(defineCommand("get", { description: "Read project, subjects, animations, estimates and job state" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).action(async ({ args, flags, stdout, signal }) => out(stdout, await new Client(flags.url, signal).request(projectPath(args.id)))))).add(defineCommand("rename", { description: "Rename a project" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags({ name: "name", type: "string", required: true }).action(async ({ args, flags, stdout, signal }) => out(stdout, await new Client(flags.url, signal).request(`/api/v1/projects/${encodeURIComponent(args.id)}`, { method: "PATCH", body: { name: flags.name } }))))).add(defineCommand("delete", { description: "Delete a project; requires --yes" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags({ name: "yes", type: "boolean", required: true }).action(async ({ args, flags, stdout, signal }) => {
49200
+ }))).add(defineCommand("get", { description: "Read project, subjects, animations, estimates and job state" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).action(async ({ args, flags, stdout, signal }) => out(stdout, await new Client(flags.url, signal).request(projectPath(args.id)))))).add(defineCommand("rename", { description: "Rename a project" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags({ name: "name", type: "string", required: true }).action(async ({ args, flags, stdout, signal }) => out(stdout, await new Client(flags.url, signal).request(`/api/v1/projects/${encodeURIComponent(args.id)}`, { method: "PATCH", body: { name: flags.name } }))))).add(defineCommand("move", { description: "Move characters (with their animations), saved assets and avatars to another project you can write to" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags(
49201
+ { name: "to", type: "string", required: true, description: "Project ID to move the work to" },
49202
+ { name: "characters", type: "string", description: "Comma-separated character slugs from projects get" },
49203
+ { name: "assets", type: "string", description: "Comma-separated asset IDs from assets list" },
49204
+ { name: "avatars", type: "string", description: "Comma-separated avatar group IDs from avatars list --ownership private" }
49205
+ ).action(async ({ args, flags, stdout, signal }) => out(stdout, await moveWork(new Client(flags.url, signal), args.id, flags))))).add(defineCommand("delete", { description: "Delete a project; requires --yes" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags({ name: "yes", type: "boolean", required: true }).action(async ({ args, flags, stdout, signal }) => {
49183
49206
  if (!flags.yes) throw new Error("Pass --yes to delete this project.");
49184
49207
  out(stdout, await new Client(flags.url, signal).request(`/api/v1/projects/${encodeURIComponent(args.id)}`, { method: "DELETE" }));
49185
49208
  })))).command("assets", (assets) => assets.add(defineCommand("list", { description: "List saved assets, their blob hashes, and configured generation models" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" } }).args(id).action(async ({ args, flags, stdout, signal }) => out(stdout, await new Client(flags.url, signal).request(`${projectPath(args.id)}/assets`))))).add(defineCommand("generate", { description: "Generate an image, video, music, speech or sound-effect asset; --yes authorizes credits" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" } }).args(id).flags(
@@ -49260,7 +49283,7 @@ Confirm code: ${device.user_code}`);
49260
49283
  if (!flags.yes) throw new Error("Pass --yes to authorize spending credits.");
49261
49284
  const body = spriteJobBody.parse({ kind: "character", name: flags.name, description: flags.description, ...flags.style ? { style: flags.style } : {}, subjectKind: flags.kind, actions: actions(flags.actions), ...selectedModels(flags) });
49262
49285
  out(stdout, await new Client(flags.url, signal).request(`${projectPath(args.id)}/jobs`, { method: "POST", body }));
49263
- }))).add(defineCommand("schema", { description: "Print the Crust command schema for agent discovery" }, (command) => command.action(async ({ stdout }) => out(stdout, await createCli().snapshot())))).command("files", (files) => files.add(defineCommand("import", { description: "Import a PNG, JPEG or WebP reference; --yes authorizes redraw costs when configured" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" } }).args(id).flags(...modelFlags).flags({ name: "file", type: "string", required: true }, { name: "name", type: "string", required: true }, { name: "description", type: "string" }, { name: "yes", type: "boolean", required: true }).action(async ({ args, flags, stdout, signal }) => {
49286
+ }))).add(defineCommand("schema", { description: "Print the Crust command schema for agent discovery" }, (command) => command.action(async ({ stdout }) => out(stdout, await createCli().snapshot())))).command("files", (files) => files.add(defineCommand("import", { description: "Import a PNG, JPEG or WebP reference and draw it in --style; --yes authorizes redraw costs when configured" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" } }).args(id).flags(...modelFlags).flags({ name: "file", type: "string", required: true }, { name: "name", type: "string", required: true }, { name: "description", type: "string" }, { name: "style", type: "string", choices: SPRITE_STYLES, description: "Artwork style to draw it in (default hd-cartoon)" }, { name: "yes", type: "boolean", required: true }).action(async ({ args, flags, stdout, signal }) => {
49264
49287
  if (!flags.yes) throw new Error("Pass --yes to authorize reference redraw costs.");
49265
49288
  const extension = flags.file.split(".").at(-1)?.toLowerCase();
49266
49289
  const type = extension === "png" ? "image/png" : extension === "jpg" || extension === "jpeg" ? "image/jpeg" : extension === "webp" ? "image/webp" : void 0;
@@ -49271,6 +49294,7 @@ Confirm code: ${device.user_code}`);
49271
49294
  form.set("image", new Blob([bytes], { type }), `reference.${extension}`);
49272
49295
  form.set("name", flags.name);
49273
49296
  if (flags.description) form.set("description", flags.description);
49297
+ if (flags.style) form.set("style", flags.style);
49274
49298
  for (const [key, value] of Object.entries(selectedModels(flags))) form.set(key, value);
49275
49299
  out(stdout, await new Client(flags.url, signal).request(`${projectPath(args.id)}/reference`, { method: "POST", body: form }));
49276
49300
  }))).add(defineCommand("list", { description: "List project file paths and content hashes" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).action(async ({ args, flags, stdout, signal }) => out(stdout, await new Client(flags.url, signal).request(`/api/v1/projects/${encodeURIComponent(args.id)}/files`))))).add(defineCommand("export", { description: "Download all project assets as a ZIP; refuses to overwrite" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags({ name: "output", type: "string", required: true }).action(async ({ args, flags, stdout, signal }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docyrus/animaguru",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Agent-friendly AnimaGuru CLI built with CrustJS",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,7 +39,7 @@ CLI/API balances, estimates, credit ranges and queued-job receipts use AnimaGuru
39
39
 
40
40
  ## Standalone images, video, music and speech
41
41
 
42
- CLI 0.4.0 adds `assets generate`, `assets submit`, `assets list`, and `assets download`. Use `assets list PROJECT_ID` to discover saved assets and configured provider models. Create neutral asset projects with `projects create --name NAME`. Projects have no art style; choose style when generating an individual sprite.
42
+ CLI 0.4.0 adds `assets generate`, `assets submit`, `assets list`, and `assets download`. Use `assets list PROJECT_ID` to discover saved assets and configured provider models. Create asset projects with `projects create --name NAME`. Projects have no art style; choose the style for each sprite with `generate --style` or `files import --style`.
43
43
 
44
44
  ```sh
45
45
  animaguru assets generate PROJECT_ID --type image --name "Forest" \
@@ -75,6 +75,8 @@ animaguru files export PROJECT_ID --output forest-cast.zip
75
75
 
76
76
  `jobs wait` tracks only the specified job. Drawing can queue follow-up animations: inspect `jobs list` and wait for the relevant jobs before exporting. A timeout or CLI exit does not cancel server work. Inspect existing jobs before retrying a paid submission to avoid duplicate charges. Report failed jobs and their errors instead of repeatedly submitting the same work.
77
77
 
78
+ `projects move PROJECT_ID --to OTHER_PROJECT_ID [--characters SLUG,SLUG] [--assets ASSET_ID] [--avatars GROUP_ID]` moves work between projects for free: characters with all their animations, saved assets and the project's own avatars. Use it to gather work into one project instead of regenerating it; it needs CLI 0.16.0.
79
+
78
80
  `files export` downloads a ZIP and refuses to overwrite an existing file. Choose a fresh output path. Inspect the exported manifest and actual assets before integrating them into the game or app; use their real dimensions, frame ordering, and animation metadata.
79
81
 
80
82
  ## Shared workspace commands
@@ -26,4 +26,4 @@ Custom motion:
26
26
 
27
27
  Custom motions require 2–12 frame descriptions, a 20–600 character prompt, and 4–24 fps. Explicit model flags override selections in the JSON file.
28
28
 
29
- Import reference artwork with `animaguru files import PROJECT_ID --file knight.png --name Knight --description "Keep the blue armor" --yes`. PNG, JPEG, and WebP are accepted up to 10 MB. When configured, the service redraws the reference and charges credits; otherwise it imports the original artwork.
29
+ Import reference artwork with `animaguru files import PROJECT_ID --file knight.png --name Knight --style pixel --description "Keep the blue armor" --yes`. PNG, JPEG, and WebP are accepted up to 10 MB. `--style` picks the art style to redraw it in (projects have none; without it the drawing is hd-cartoon, and it needs CLI 0.16.0). When configured, the service redraws the reference and charges credits; otherwise it imports the original artwork.