@wji.ai/cli 0.2.0 → 0.4.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 +28 -0
- package/dist/commands/canvas.js +169 -4
- package/dist/commands/crew.js +205 -0
- package/dist/core/archive.js +95 -0
- package/dist/core/crew.js +546 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
- package/skill/short-drama/SKILL.md +41 -24
- package/skill/short-drama/reference/canvas-recipes.md +47 -27
- package/skill/short-drama/reference/operations-cli.md +43 -0
- package/skill/short-drama/reference/operations-wji.md +82 -0
- package/skill/short-drama/reference/schema.md +1 -1
- package/skill/short-drama/reference/stage-art.md +2 -1
- package/skill/short-drama/reference/stage-storyboard.md +7 -4
- package/skill/short-drama/reference/workspace-layout.md +18 -6
- package/skill/short-drama/scripts/selftest.mjs +4 -0
- package/skill/short-drama/scripts/short-drama.mjs +30 -14
- package/skill/wji/SKILL.md +18 -0
- package/skill/wji/reference/commands.md +32 -3
|
@@ -162,11 +162,12 @@ updates live.
|
|
|
162
162
|
| `canvas unlink` | `DELETE /canvas-link`; the tab turns its button off at its next heartbeat (≤ 60s) |
|
|
163
163
|
| `canvas list [-w]` | canvases under each InfiniteCanvas app: `GET /workspace/list/:id/fs/:appId` → `workspace-v2/canvases` children |
|
|
164
164
|
| `canvas create <name> [-w] [--app]` | `POST /fsnode/create` a `workspace-v2/canvas` folder under that `canvases` folder with the web's initial content (`{data:{viewport, backgroundMode:'dots'}, metadata:{}}`) |
|
|
165
|
-
| `canvas nodes [-c] [-k kind]` | `GET /fsnode/list/:canvasId/children?limit=-1` + `POST /assets/check-status` |
|
|
165
|
+
| `canvas nodes [-c] [-k kind] [-n regex] [--tag tags…\|--untagged]` | `GET /fsnode/list/:canvasId/children?limit=-1` + `POST /assets/check-status`. `-n` matches the node name as a case-insensitive regex (`/re/flags` to set flags yourself). `--tag` takes a label (`C01`, case-insensitive), a color (`red`) or a color id (`rose`); several values match any. Filters combine (AND) |
|
|
166
|
+
| `canvas tags [-c] [-a]` | the canvas's color tags: color, label, node count (`-a` also unused, unlabelled colors) |
|
|
166
167
|
| `canvas get <nodeId> [-c]` | same load; one node with references (`@image1 ← id`) and frame slots |
|
|
167
168
|
| `canvas edges [-c] [--node]` | the `canvas/edge` children |
|
|
168
|
-
| `canvas add <kind> [-c] [-n] [-t\|--text-file] [--asset] [--dataset] [-p\|--prompt-file] [-m] [-r] [--resolution] [-d] [--set] [--from ids…] [--at x,y]` | `POST /fsnode/create` (`canvas/node/<kind>`), then one `canvas/edge` per `--from`. Kinds: text, title, comment, image, video, audio, dataset. `add dataset --dataset <fsnodeId>` writes `content {datasetId, datasetName, datasetType, datasetParentName, description}` from the dataset node (must be `workspace/dataset`); it takes no `--from` |
|
|
169
|
-
| `canvas set <nodeId> [-c] [-n] [-t] [--move x,y] [-p] [-m] [-r] [--resolution] [-d] [--set]` | read → merge → `PATCH /fsnode/list/:id` |
|
|
169
|
+
| `canvas add <kind> [-c] [-n] [-t\|--text-file] [--plain] [--size w,h] [--asset] [--dataset] [-p\|--prompt-file] [-m] [-r] [--resolution] [-d] [--set] [--from ids…] [--at x,y]` | `POST /fsnode/create` (`canvas/node/<kind>`), then one `canvas/edge` per `--from`. Kinds: text, title, comment, image, video, audio, dataset. `add dataset --dataset <fsnodeId>` writes `content {datasetId, datasetName, datasetType, datasetParentName, description}` from the dataset node (must be `workspace/dataset`); it takes no `--from`. Text kinds are Markdown on the web; `--plain` turns every single line break into a Markdown hard break (`" \n"`, fenced code untouched), and without it the CLI warns when a single break would be joined. `--size` writes `content.width/height` |
|
|
170
|
+
| `canvas set <nodeId> [-c] [-n] [-t\|--text-file] [--plain] [--move x,y] [--size w,h] [-p] [-m] [-r] [--resolution] [-d] [--set]` | read → merge → `PATCH /fsnode/list/:id` |
|
|
170
171
|
| `canvas connect <from> <to> [-c]` | `POST /fsnode/create` (`canvas/edge`); a first/last-frame video model gets `videoFrameSlot` start, then end |
|
|
171
172
|
| `canvas disconnect <from> <to> [-c]` | `DELETE /fsnode/list/:edgeId` |
|
|
172
173
|
| `canvas rm <nodeIds...> [-c] [-y]` | deletes the nodes' edges, then the nodes; refuses nodes still generating |
|
|
@@ -179,6 +180,12 @@ Storage format (what the web canvas writes):
|
|
|
179
180
|
`generate` with `content.generate {prompt, model, ratio, resolution,
|
|
180
181
|
duration, values, improvePromptEnabled, historyId?, pendingAssetId?}`. Width
|
|
181
182
|
and height are not stored.
|
|
183
|
+
- Color tag: the node stores only `content.colorTag {colorId}`, one of
|
|
184
|
+
`rose` (red), `orange`, `amber` (yellow), `lime` (green), `teal`, `sky`
|
|
185
|
+
(blue), `violet` (purple), `fuchsia` (pink). The label is per color per
|
|
186
|
+
canvas, on the canvas folder: `content.colorTagNames {rose: "C01", …}`, so
|
|
187
|
+
every red node on a canvas shares one label. A `name` left on an old node's
|
|
188
|
+
`colorTag` is ignored, as on the web.
|
|
182
189
|
- Edge: `mimetype canvas/edge`, name `连线`, `content {fromNodeId, toNodeId,
|
|
183
190
|
sourceHandle, targetHandle, videoFrameSlot?}`. References are incoming edges
|
|
184
191
|
sorted by `sort` then id, numbered per source kind.
|
|
@@ -339,6 +346,28 @@ Only `.md` files persist (the importer drops everything else); scripts belong to
|
|
|
339
346
|
| `skill update <id> [-n] [-d] [--visibility] [--dir] [-y]` | `PUT /ai/skill/:id` — metadata, or replace **all** files from `--dir` (confirms first) |
|
|
340
347
|
| `skill rm <id> [-y]` | `DELETE /ai/skill/:id` |
|
|
341
348
|
|
|
349
|
+
## crew
|
|
350
|
+
|
|
351
|
+
Crew packs are local or remote folders (`crew.json`, `agents/<seat>.md`, `skills/<name>/SKILL.md`, `AGENTS.md`) — no WJI API involved.
|
|
352
|
+
|
|
353
|
+
| Command | Behaviour |
|
|
354
|
+
| --- | --- |
|
|
355
|
+
| `crew install [name] --for <claude,codex,openclaw,grok\|all> [--from dir\|zip\|tar.gz\|url] [--ref] [--project dir] [--link] [--out zip] [--no-register] [--dry-run] [-y]` | fetches the pack (registry → GitHub tarball, cached under `~/.wji/crews/`), validates it, prints the plan, then per host: **claude** copies `skills/*` → `~/.claude/skills/` and `agents/*.md` → `~/.claude/agents/`; **codex** copies skills → `~/.agents/skills/` and writes `~/.codex/agents/<seat>.toml` (`developer_instructions` = persona body, `sandbox_mode` from capabilities, `[[skills.config]]` per skill); **openclaw** shares `~/.agents/skills/`, writes `~/.openclaw/workspaces/<crew>/<seat>/{AGENTS.md,SOUL.md,skills→}` + `openclaw.agents.json5` and runs `openclaw agents add` when the binary exists; **grok** writes `<crew>-export.zip` (`skills/`, `bots/*.json`, `bots/crew-manifest.json`, `channels/*.json`, sibling links rewritten to `sand-workflow:`). `--project` targets `<dir>/.claude`, `.agents`, `.codex`, `openclaw` instead of `$HOME` |
|
|
356
|
+
| `crew status [name]` | reads `~/.wji/crews/installed.json`; per path ✓ / ↗ symlink / ✗ missing |
|
|
357
|
+
| `crew uninstall <name> [--for targets] [-y]` | removes exactly the recorded paths; reminds you to clean `openclaw.json` by hand |
|
|
358
|
+
| `crew check <dir>` | validates `crew.json` ↔ `agents/*.md` (names, skills, tools vs capabilities), every `SKILL.md` (name == folder, description ≤ 1024) and that relative links resolve |
|
|
359
|
+
|
|
360
|
+
## crew
|
|
361
|
+
|
|
362
|
+
Crew packs are local/remote folders (`crew.json`, `agents/<seat>.md`, `skills/<name>/SKILL.md`, `AGENTS.md`) — no WJI API involved.
|
|
363
|
+
|
|
364
|
+
| Command | Behaviour |
|
|
365
|
+
| --- | --- |
|
|
366
|
+
| `crew install [name] --for <claude,codex,openclaw,grok\|all> [--from dir\|zip\|tar.gz\|url] [--ref] [--project dir] [--link] [--out zip] [--no-register] [--dry-run] [-y]` | fetches the pack (registry → GitHub tarball, cached under `~/.wji/crews/`), validates it, prints the plan, then per host: **claude** copies `skills/*` → `~/.claude/skills/` and `agents/*.md` → `~/.claude/agents/`; **codex** copies skills → `~/.agents/skills/` and writes `~/.codex/agents/<seat>.toml` (`developer_instructions` = persona body, `sandbox_mode` from capabilities, `[[skills.config]]` per skill); **openclaw** shares `~/.agents/skills/`, writes `~/.openclaw/workspaces/<crew>/<seat>/{AGENTS.md,SOUL.md,skills→}` + `openclaw.agents.json5` and runs `openclaw agents add` when the binary exists; **grok** writes `<crew>-export.zip` (`skills/`, `bots/*.json`, `bots/crew-manifest.json`, `channels/*.json`, sibling links rewritten to `sand-workflow:`). `--project` targets `<dir>/.claude`, `.agents`, `.codex`, `openclaw` instead of `$HOME` |
|
|
367
|
+
| `crew status [name]` | reads `~/.wji/crews/installed.json`; per path ✓ / ↗ symlink / ✗ missing |
|
|
368
|
+
| `crew uninstall <name> [--for targets] [-y]` | removes exactly the recorded paths; reminds you to clean `openclaw.json` by hand |
|
|
369
|
+
| `crew check <dir>` | validates `crew.json` ↔ `agents/*.md` (names, skills, tools vs capabilities), every `SKILL.md` (name == folder, description ≤ 1024) and that relative links resolve |
|
|
370
|
+
|
|
342
371
|
Import rules: the zip must contain `SKILL.md` at its root (or one folder deep — a
|
|
343
372
|
single common root folder is stripped). `SKILL.md` frontmatter `name:` is
|
|
344
373
|
required; `description:` is read too. Visibility is `private` (default) or
|