@wji.ai/cli 0.8.3 → 0.9.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wji.ai/cli",
3
- "version": "0.8.3",
3
+ "version": "0.9.1",
4
4
  "description": "Command line interface for the WJI AI platform",
5
5
  "license": "UNLICENSED",
6
6
  "author": "WJI AI",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: backreel
3
- description: Run a creator's works on Backreel (the film / short-drama showcase and crowdfunding site that shares accounts with WJI) with the `wji` CLI — create and publish a post (作品), prepare and upload cover / portrait / LookBook images at the right size and ratio, add cast and crew credits, upload and maintain episode videos (分集 via BytePlus VOD), set who can watch each episode, run a crowdfunding campaign with donation tiers and offline supporters, read donation records, and answer enquiries (查詢 / 合作邀請 / 投資 / 授權) — reply, accept or decline, grant partner access. Use whenever a task mentions Backreel, a Backreel post / work / reel, its episodes, trailer, cover or poster sizes, crowdfunding / 眾籌 / 捐款, supporters, or enquiries / 查詢 on a creator's work.
3
+ description: Run a creator's works on Backreel (the film / short-drama showcase and crowdfunding site that shares accounts with WJI) with the `wji` CLI — create and publish a post (作品), prepare and upload cover / portrait / LookBook images at the right size and ratio, add cast and crew credits, upload and maintain episode videos (分集 via BytePlus VOD), set who can watch each episode, run a crowdfunding campaign with donation tiers and offline supporters, read donation records, answer enquiries (查詢 / 合作邀請 / 投資 / 授權) — reply, accept or decline, grant partner access — write blog posts (文章 / 作品動態) on a profile or under a project, and work the Job Plaza (接單廣場) — post a job, place a sealed bid, award it, then run the contract: payment plan, project credits, milestones, top-ups, change requests and disputes. Use whenever a task mentions Backreel, a Backreel post / work / reel, its episodes, trailer, cover or poster sizes, crowdfunding / 眾籌 / 捐款, supporters, enquiries / 查詢 on a creator's work, a Backreel blog post, project update or behind-the-scenes note, or a Backreel job, bid, quote, contract / 合約, milestone or dispute.
4
4
  ---
5
5
 
6
6
  # Backreel
@@ -97,6 +97,10 @@ wji br episode set <postId> 3 E03_v2.mp4 # replace the video
97
97
  wji br episode move <postId> 4 2
98
98
  wji br episode rm <postId> 6 -y
99
99
  wji br episode play <postId> 1 # short-lived URL to watch it yourself
100
+ wji br episode play <postId> 1 --qualities # renditions VOD made (1080p / 720p / …)
101
+ wji br episode subs add <postId> 1 E01.zh-Hant.srt # language guessed from the name
102
+ wji br episode subs add <postId> 1 E01_en.vtt --lang en --default
103
+ wji br episode subs <postId> 1 # list tracks; the first is the default
100
104
  ```
101
105
 
102
106
  Episodes exist on **showcase** posts only (≤30). A local file goes straight
@@ -105,7 +109,7 @@ nothing on the page can be copied and shared. Transcoding takes a few minutes;
105
109
  an episode stays `processing` until then and viewers get "still
106
110
  transcoding". Numbers on the command line are 1-based positions. Read
107
111
  [reference/episodes.md](reference/episodes.md) for the trailer, the legacy
108
- asset path, tier strategy and failure handling.
112
+ asset path, tier strategy, subtitles and failure handling.
109
113
 
110
114
  ## 4. Crowdfunding and donations
111
115
 
@@ -148,6 +152,70 @@ accept, decline or grant on your own judgement. Read
148
152
  [reference/enquiries.md](reference/enquiries.md) for triage and reply
149
153
  patterns.
150
154
 
155
+ ## 6. Blog posts (文章 / 作品動態)
156
+
157
+ Anyone can write a post on their profile, or under one of **their own**
158
+ projects as a project update. Posts are drafts until published, and
159
+ published posts go live straight away (admins can hide them afterwards).
160
+
161
+ ```bash
162
+ wji br blog create --title "殺青了!拍攝第 21 天" --body @update.md \
163
+ --post <postId> --tags "幕後, 殺青" --cover ./still.jpg # draft
164
+ wji br blog get <blogId> # body prints back as Markdown
165
+ wji br blog update <blogId> --body @update.md --excerpt "一句話摘要"
166
+ wji br blog publish <blogId> # | unpublish — back to drafts
167
+ wji br blog list --mine # yours, drafts and hidden included
168
+ wji br blog list --post <postId> # a project's updates
169
+ wji br blog list --official # Backreel press releases
170
+ wji br blog delete <blogId> -y
171
+ ```
172
+
173
+ `--body` is Markdown by default (`## heading`, `- list`, `**bold**`,
174
+ `[link](https://…)`, `![image](https://…)`; blank line between paragraphs) —
175
+ pass `--html` to send HTML. Only full `http(s)` links survive; site paths
176
+ like `(/blog)` are removed. `--post none` moves a post back to the profile;
177
+ `--cover none` clears the cover. If `publish` reports the post is hidden, an
178
+ admin hid it — tell the user the reason; republishing does not unhide it.
179
+ Publishing is outward-facing: show the user the title and body first.
180
+
181
+ Official press releases are written with the private `wji-admin backreel
182
+ blog` commands, not here.
183
+
184
+ ## 7. Job Plaza and contracts (接單廣場 / 合約)
185
+
186
+ Someone posts a job, creators bid (sealed), the poster awards one bid and a
187
+ contract is drafted. The contract has 2–3 payments, at least 25% in WJI
188
+ credits; the poster funds the credits into a project workspace, the creator
189
+ delivers payment by payment.
190
+
191
+ ```bash
192
+ wji br job list -k teaser # open jobs; --mine for yours
193
+ wji br job create "30s teaser" --category advertising --brief @brief.md \
194
+ --deliverables "1 × 30s" --budget 8000-12000 --currency HKD --credits 30000 --deadline 2026-12-01
195
+ wji br job bid <jobId> --price 9000 --currency HKD --credits 30000 --days 14 --pitch @pitch.md
196
+ wji br job bids <jobId> ; wji br job award <bidId> -y # poster
197
+ wji br contract plan <id> --credits 30000 --payment "Draft|2026-12-08|4000" --payment "Final|2026-12-20|5000"
198
+ wji br contract accept <id> ; wji br contract fund <id> -y
199
+ wji br contract submit <id> 1 --note "First cut" --link https://…
200
+ wji br contract approve <id> 1 # | revise <id> 1 --note "…"
201
+ wji br contract get <id> # what to do next
202
+ ```
203
+
204
+ Contract commands take the contract id or the job id. Top-ups, change
205
+ requests, cancelling and disputes are in
206
+ [reference/jobs.md](reference/jobs.md) — read it before any contract step.
207
+ Act as an organization with `--org <orgId>` (`wji br org` lists yours).
208
+
209
+ ## Profile, organizations and history
210
+
211
+ ```bash
212
+ wji br org # organizations you belong to, with your role
213
+ wji br org get <orgId> # an org's public page
214
+ wji br about --text @about.md --region HK # your profile; --org <orgId> for an org you manage
215
+ wji br history # what you've viewed; rm <id> | clear -y
216
+ wji br create "Harbour" --org <orgId> # publish as an org (only the author can change it later)
217
+ ```
218
+
151
219
  ## Credits
152
220
 
153
221
  ```bash
@@ -160,8 +228,10 @@ wji br credit rm <postId> 3 -y
160
228
 
161
229
  ## Rules of thumb
162
230
 
163
- - **Ask before anything outward-facing**: publishing, unpublishing, deleting,
164
- replying to or deciding an enquiry, granting access, turning donations on.
231
+ - **Ask before anything outward-facing**: publishing (posts and blog posts), unpublishing, deleting,
232
+ replying to or deciding an enquiry, granting access, turning donations on, posting a job,
233
+ bidding, awarding, sending / accepting a plan, funding, approving a payment, top-ups,
234
+ change requests, cancelling and disputes (most of these move WJI credits).
165
235
  Draft edits are safe to make and show.
166
236
  - Generating images (e.g. the AI poster) spends WJI credits — confirm first.
167
237
  - Episode uploads go to the live VOD space even from a test post; don't
@@ -78,6 +78,44 @@ wji br episode rm <postId> 7 8 -y
78
78
  Removing an episode does not delete the video from VOD; re-adding it later
79
79
  with `--vid` works.
80
80
 
81
+ ## Subtitles
82
+
83
+ Each episode takes up to 8 subtitle tracks, one per language, from `.srt` or
84
+ `.vtt` files (≤1 MB). The server cleans them into plain WebVTT — italics,
85
+ colours and `{\an8}` positioning are dropped. The **first** track is the
86
+ default; viewers who never chose one get the track matching the site's
87
+ language, else the default.
88
+
89
+ ```bash
90
+ wji br episode subs add <postId> 2 E02.zh-Hant.srt # zh-Hant guessed from the name
91
+ wji br episode subs add <postId> 2 E02.srt --lang en --label "English (CC)"
92
+ wji br episode subs add <postId> 2 E02_en_v2.srt --lang en --replace
93
+ wji br episode subs default <postId> 2 en
94
+ wji br episode subs label <postId> 2 en # back to the language name
95
+ wji br episode subs rm <postId> 2 ja ko
96
+ wji br episode subs <postId> 2
97
+ ```
98
+
99
+ Languages are BCP 47 tags: `zh-Hant`, `zh-Hans`, `yue`, `en`, `ja`, `ko`,
100
+ `th`, `vi`, `id`, `ms`, `es`, `pt`, `fr`, `de` (others are accepted, but the
101
+ player shows the raw code). A file the server can't read fails at upload,
102
+ before the episode changes. `add` warns when the last line runs past the
103
+ episode's length — usually the wrong episode's file.
104
+
105
+ Subtitles follow the episode's tier: a locked episode never serves its text.
106
+ Replacing the video (`episode set <post> <n> new.mp4`) keeps the tracks; remove
107
+ them if the new cut changed the timing.
108
+
109
+ ## Quality
110
+
111
+ VOD transcodes each upload into the renditions its template defines. The
112
+ player offers Auto plus each one; with a single rendition the menu hides.
113
+
114
+ ```bash
115
+ wji br episode play <postId> 1 --qualities # what VOD made
116
+ wji br episode play <postId> 1 -q 720p # URL of one rendition
117
+ ```
118
+
81
119
  ## Who can watch: tiers
82
120
 
83
121
  `public` anyone · `member` signed in · `supporter` has donated to this post ·
@@ -0,0 +1,154 @@
1
+ # Job Plaza and job contracts
2
+
3
+ The Job Plaza (接單廣場) is where someone who needs a film, ad or short drama
4
+ **posts a job**, creators **place sealed bids**, and the poster **awards one**.
5
+ Award drafts a **contract**; the contract carries the work through a payment
6
+ plan, project credits held in a WJI workspace, milestones and, if needed, a
7
+ dispute.
8
+
9
+ Everything is `wji br job …` and `wji br contract …`. Add `--json` for ids.
10
+
11
+ ## Who can do what
12
+
13
+ | Step | Who | Command |
14
+ | --- | --- | --- |
15
+ | post / edit / close / reopen / cancel a job | the poster (or a member of the posting org) | `br job create`, `set`, `close`, `reopen`, `cancel` |
16
+ | see bids on a job | the poster only — bids are sealed | `br job bids <jobId>` |
17
+ | bid, change, withdraw | any creator (verified only, if the job says so) | `br job bid`, `bid-set`, `withdraw` |
18
+ | award | the poster | `br job award <bidId>` |
19
+ | plan | either side; sending counts as your acceptance | `br contract plan` |
20
+ | accept the other side's plan | the side that didn't send it | `br contract accept` |
21
+ | fund | poster | `br contract fund` |
22
+ | submit a payment | creator | `br contract submit` |
23
+ | approve / revise | poster | `br contract approve`, `revise` |
24
+ | mark cash paid / received | poster / creator | `br contract paid`, `received` |
25
+ | top up project credits | creator | `br contract topup` |
26
+ | change request | creator proposes, poster accepts or declines | `br contract change …` |
27
+ | dispute | either side | `br contract dispute`, `statement` |
28
+
29
+ `wji br org` lists the organizations you can act for; pass `--org <orgId>` to
30
+ `job create`, `job bid`, `br create` or `blog create` to act as one.
31
+
32
+ ## Posting a job
33
+
34
+ ```bash
35
+ wji br job create "30s product teaser" --category advertising \
36
+ --brief @brief.md --deliverables "1 × 30s, 16:9 and 9:16" \
37
+ --budget 8000-12000 --currency HKD --credits 30000 \
38
+ --duration 30 --resolution 1080p --upscale --model seedance-2.5 \
39
+ --deadline 2026-12-01 --delivery 2026-12-20 --verified-only
40
+ wji br job list --mine # yours, every status
41
+ wji br job get <jobId>
42
+ wji br job close <jobId> # stop bids early | reopen | cancel
43
+ ```
44
+
45
+ - Amounts are typed in `--currency` and stored in USD; everyone sees them in
46
+ their own display currency.
47
+ - `--duration` takes `90`, `3m`, `1h30m` or `2:30`. `--resolution` is
48
+ 480p / 720p / 1080p / 2k / 4k; `--upscale` says upscaling to it is fine.
49
+ - The bid deadline is at most 90 days out. Posting is public right away —
50
+ confirm the text with the user first.
51
+
52
+ ## Bidding
53
+
54
+ ```bash
55
+ wji br job list -k teaser --category advertising --sort budget
56
+ wji br job quota # bids left this month, per identity
57
+ wji br job bid <jobId> --price 9000 --currency HKD --credits 30000 \
58
+ --days 14 --pitch @pitch.md --work <postId> --work <postId>
59
+ wji br job bids # your bids and their status
60
+ wji br job bid-set <bidId> --price 8500 ; wji br job withdraw <bidId>
61
+ ```
62
+
63
+ Each identity (you, each org) has a monthly bid quota (VIP unlimited). Bids
64
+ are sealed: only the poster sees them. A bid can show up to 3 of the
65
+ bidder's published Backreel works.
66
+
67
+ ## Award → contract
68
+
69
+ ```bash
70
+ wji br job bids <jobId> # poster: compare
71
+ wji br job award <bidId> -y # declines the others, drafts the contract
72
+ ```
73
+
74
+ `award` prints the contract id. Every `br contract` command takes the
75
+ contract id **or the job id**.
76
+
77
+ ## The payment plan
78
+
79
+ 2 or 3 payments, each with a title, due date and cash amount. At least 25% of
80
+ the contract total must be WJI credits (credits ÷ credits-per-USD, frozen at
81
+ 250 per US$ when the plan locks).
82
+
83
+ ```bash
84
+ wji br contract plan <id> --currency HKD --credits 30000 \
85
+ --payment "Draft|2026-12-08|4000|First cut at 720p" \
86
+ --payment "Final|2026-12-20|5000|Final 1080p with sound"
87
+ wji br contract get <id> # totals, payments, what to do next
88
+ wji br contract accept <id> # the other side locks it
89
+ ```
90
+
91
+ - `--payment "Title|YYYY-MM-DD|cash[|credits[|deliverable]]"`. Without
92
+ `--payment`, `plan` keeps the current payments and only changes what you
93
+ pass (e.g. `--credits`).
94
+ - Credits are released **all at once** by default (`--release upfront`); with
95
+ `--release milestones` each payment carries its own credits (4th field).
96
+ - Sending a plan counts as your acceptance; the other side accepts or sends
97
+ back an edited one.
98
+
99
+ ## Funding and production
100
+
101
+ ```bash
102
+ wji br contract fund <id> -y # poster: takes the credits from the poster's WJI balance
103
+ wji br contract submit <id> 1 --note "First cut" --link https://…
104
+ wji br contract revise <id> 1 --note "Tighter opening" # 2 revisions included per payment
105
+ wji br contract approve <id> 1 # starts the next payment; the last one completes the contract
106
+ wji br contract paid <id> 1 ; wji br contract received <id> 1 # cash is paid off-platform
107
+ ```
108
+
109
+ - Funding creates a WJI workspace owned by the poster with the creator as
110
+ editor. Generations there spend only the project credits; nobody can spend
111
+ them elsewhere. `contract get` shows credits left and the workspace id.
112
+ - A submitted payment auto-approves after 7 days if the poster does nothing.
113
+ - On completion the poster's unused credits go to the creator; on cancel
114
+ they go back to the poster. Creator top-ups that weren't used always go
115
+ back to the creator.
116
+
117
+ ## When the budget runs out
118
+
119
+ - 5% overdraft is automatic; both sides are told at 80% and when it's used up.
120
+ - The creator can add their own credits: `wji br contract topup <id> 5000`.
121
+ - If the poster changed the scope or asked for a third revision, the creator
122
+ asks for more:
123
+
124
+ ```bash
125
+ wji br contract change request <id> --credits 10000 --cash 100 --reason scope --note "Two extra scenes"
126
+ wji br contract change accept <id> --note "OK" # poster; takes the credits from their balance
127
+ wji br contract change decline <id> --note "…" # | withdraw (creator)
128
+ ```
129
+
130
+ Extra cash also needs ≥25% in credits; the CLI checks before sending.
131
+
132
+ ## Cancelling, silence and disputes
133
+
134
+ ```bash
135
+ wji br contract cancel <id> --reason "…" # planning/funding: immediate; production: the other side confirms
136
+ wji br contract cancel <id> --decline # | --withdraw
137
+ wji br contract dispute <id> --reason @what-happened.md -y
138
+ wji br contract statement <id> --text @my-side.md --link https://…
139
+ wji br contract dispute <id> --withdraw # only the side that raised it
140
+ ```
141
+
142
+ - A dispute stops generation in the project workspace and pauses due dates
143
+ until a WJI admin decides: continue, or cancel and split the poster's unused
144
+ credits. The admin side is `wji-admin backreel contracts`.
145
+ - If the creator does nothing for 14 days after a due date, `contract get`
146
+ says so to the poster and `cancel` goes through immediately.
147
+
148
+ ## Rules
149
+
150
+ - Ask before every outward or money step: posting a job, bidding, awarding,
151
+ sending or accepting a plan, funding, approving, top-ups, change requests,
152
+ cancelling and disputes.
153
+ - Server errors are Chinese (e.g. `至少 25% 的合約總值須以 WJI 積分支付`); relay
154
+ them and say what to change.
@@ -21,7 +21,7 @@ NPC is addressed by id, `@handle` or name.
21
21
  permission; it starts private), then upload the headshot and at least one
22
22
  scene image on the web — live stages need both:
23
23
  ```bash
24
- wji npc handle nagi.npc # is the handle free?
24
+ wji npc handle nagi.npc # is the handle free? (system / brand names like admin, official, npccity are reserved)
25
25
  wji npc create "NAGI" --role "Radio Host" --genre "Lo-fi" --handle nagi.npc
26
26
  ```
27
27
  The handle is fixed from here on; the name is stored in capitals.
@@ -487,11 +487,15 @@ wji npc doc apply @mika @mika.md --dry-run # see the diff, then without --dr
487
487
  - `npc create` needs NPC City spawn permission on the account (a 403 says so);
488
488
  only an admin can grant it. Admin actions — spawn permission, featured / hero
489
489
  slider, moderation — are not in `wji`.
490
+ - Handles are 2–32 of a-z 0-9 . _ -; NPC City reserves system and brand names (admin, official,
491
+ npccity, wji, backreel, …) anywhere in the handle — `wji npc handle <h>` says why one is refused.
492
+ An NPC created without `--image` has no avatar (NPC City shows its initials).
490
493
  - `npc transfer send <npc> --to <email>` offers the NPC to someone; they
491
494
  `npc transfer accept <id>` within 7 days. You lose it on acceptance.
492
495
 
493
496
  **Backreel posts** are your film / project pages. `create` always makes a
494
- draft; publishing needs a cover, media or an episode.
497
+ draft; publishing needs a cover, media or an episode. Jobs, bids and contracts
498
+ (`wji br job …`, `wji br contract …`) are covered by the `backreel` skill.
495
499
 
496
500
  ```bash
497
501
  wji backreel list # yours, drafts included; --all for published posts