@lingjingai/scriptctl 0.13.0 → 0.15.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/dist/cli.js +26 -49
- package/dist/cli.js.map +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/domain/script-core.d.ts +15 -0
- package/dist/domain/script-core.js +207 -63
- package/dist/domain/script-core.js.map +1 -1
- package/dist/help-text.js +31 -315
- package/dist/help-text.js.map +1 -1
- package/dist/infra/providers.d.ts +0 -36
- package/dist/infra/providers.js +6 -211
- package/dist/infra/providers.js.map +1 -1
- package/dist/usecases/direct.js +3 -4
- package/dist/usecases/direct.js.map +1 -1
- package/dist/usecases/doctor.js +2 -5
- package/dist/usecases/doctor.js.map +1 -1
- package/dist/usecases/script.d.ts +5 -0
- package/dist/usecases/script.js +172 -5
- package/dist/usecases/script.js.map +1 -1
- package/package.json +2 -3
- package/dist/domain/asset-registry.d.ts +0 -141
- package/dist/domain/asset-registry.js +0 -318
- package/dist/domain/asset-registry.js.map +0 -1
- package/dist/domain/collision-detector.d.ts +0 -83
- package/dist/domain/collision-detector.js +0 -248
- package/dist/domain/collision-detector.js.map +0 -1
- package/dist/infra/default-writing-prompt.d.ts +0 -31
- package/dist/infra/default-writing-prompt.js +0 -50
- package/dist/infra/default-writing-prompt.js.map +0 -1
- package/dist/infra/default-writing-prompt.md +0 -115
- package/dist/infra/gemini-writer.d.ts +0 -107
- package/dist/infra/gemini-writer.js +0 -207
- package/dist/infra/gemini-writer.js.map +0 -1
- package/dist/usecases/episode.d.ts +0 -48
- package/dist/usecases/episode.js +0 -1242
- package/dist/usecases/episode.js.map +0 -1
package/dist/help-text.js
CHANGED
|
@@ -6,8 +6,8 @@ const HELP_ENTRIES = [
|
|
|
6
6
|
Usage
|
|
7
7
|
- scriptctl <verb> <address> [flags] # 编辑(多态 verb 按 address 格式分发)
|
|
8
8
|
- scriptctl <plural-noun> [flags] # 查询
|
|
9
|
-
- scriptctl direct <command> [flags] # 直转 workflow
|
|
10
|
-
- scriptctl
|
|
9
|
+
- scriptctl direct <command> [flags] # 直转 workflow(已有素材)
|
|
10
|
+
- scriptctl parse [dir] [flags] # 手写 md → script 组装
|
|
11
11
|
|
|
12
12
|
Workflow groups
|
|
13
13
|
- direct init Build the initial direct-conversion script (resumable; selective re-run).
|
|
@@ -15,13 +15,7 @@ Workflow groups
|
|
|
15
15
|
- direct validate Validate the current initial script.
|
|
16
16
|
- direct review Proofread the draft: curation/issues, or --episode N for source↔extract.
|
|
17
17
|
- direct export Store the final script through Gateway after validation.
|
|
18
|
-
-
|
|
19
|
-
- write draft <n> Draft + lint + assemble-validate + auto-commit a single episode.
|
|
20
|
-
- write batch Draft a range of episodes in one go.
|
|
21
|
-
- write workspace List per-episode draft state in the from-scratch workspace.
|
|
22
|
-
- write merge Local assembly: committed episodes → script.json + receipt.
|
|
23
|
-
- write push Upload the merge artifact to gateway.
|
|
24
|
-
- write spec Print the spec-md grammar.
|
|
18
|
+
- parse [dir] Assemble an agent-authored md workspace into a script (deterministic; --publish to store).
|
|
25
19
|
|
|
26
20
|
Query (plural-noun)
|
|
27
21
|
- summary title + counts of episodes / scenes / actions / assets / speakers
|
|
@@ -29,9 +23,16 @@ Query (plural-noun)
|
|
|
29
23
|
- scenes per-scene line with asset names; filters: --in / --has-actor / --has-location / --has-prop
|
|
30
24
|
- actions per-action line; filters: --in / --grep / --type / --actor / --speaker / --has / --context
|
|
31
25
|
- actors / locations / props / assets / speakers asset queries (kind-scoped or unified)
|
|
32
|
-
- issues current validation issues
|
|
26
|
+
- issues current validation issues (completeness gaps are warnings, not errors)
|
|
33
27
|
- refs <addr> reverse lookup: state / asset / speaker → reference sites
|
|
34
|
-
- validate Validate the current final script
|
|
28
|
+
- validate Validate the current final script (structural integrity; unfinished is OK)
|
|
29
|
+
|
|
30
|
+
Create + add entities (build bottom-up from an empty script)
|
|
31
|
+
- create [--title X] [--force] new blank schema-v2 script (--script-path / --draft / --project-group-no)
|
|
32
|
+
- add-actor <name> [--id X] [--role 主角|配角] [--description X] [--alias X ...]
|
|
33
|
+
- add-location <name> [--id X] [--description X]
|
|
34
|
+
- add-prop <name> [--id X] [--description X]
|
|
35
|
+
- add-episode [--id ep_NNN] [--title X] append an empty episode; then insert scenes/actions
|
|
35
36
|
|
|
36
37
|
Edit content
|
|
37
38
|
- replace <at> --from X [--to X] [--all] literal substring replace in action.content
|
|
@@ -303,315 +304,30 @@ Exit codes
|
|
|
303
304
|
`,
|
|
304
305
|
],
|
|
305
306
|
[
|
|
306
|
-
["
|
|
307
|
-
`
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
scriptctl episode init → scaffold + env preflight (once per project)
|
|
311
|
-
scriptctl episode draft <n> → provider → parse → lint → assemble-validate → commit
|
|
312
|
-
scriptctl episode merge → assemble committed episodes locally; write artifact + receipt
|
|
313
|
-
scriptctl episode push → upload merge artifact to gateway (after sha re-check)
|
|
314
|
-
|
|
315
|
-
Each draft is self-contained: any quality / consistency issue surfaces at the
|
|
316
|
-
moment of introduction. merge / push are deliberately split — merge is pure local
|
|
317
|
-
(no network), push is upload-only (no assembly). push refuses if the merge artifact
|
|
318
|
-
or any input drifted, forcing a fresh merge before any inconsistent snapshot can ship.
|
|
307
|
+
["parse"],
|
|
308
|
+
`Assemble an agent-authored markdown workspace into a structured script —
|
|
309
|
+
deterministic, no LLM. You write the md (per-episode body + 人物/场景/道具/发声源
|
|
310
|
+
docs); parse turns it into a schema-v2 script.
|
|
319
311
|
|
|
320
312
|
Usage
|
|
321
|
-
- scriptctl
|
|
322
|
-
|
|
323
|
-
Commands
|
|
324
|
-
- init Scaffold episodes/ + meta.json template; print gateway env preflight.
|
|
325
|
-
- draft <n> Single-command pipeline for one episode: extract title from outline H1
|
|
326
|
-
→ call provider → parse → collision check → lint → cross-episode
|
|
327
|
-
assembled validation → auto-commit on full pass. Any blocker stops
|
|
328
|
-
here at the source rather than accumulating into a publish-time bomb.
|
|
329
|
-
- batch Loop draft over an inclusive episode range.
|
|
330
|
-
- workspace List drafted / committed / blocked-collision / blocked-lint per episode
|
|
331
|
-
in the \`episode\` from-scratch draft area. NOT a query against the
|
|
332
|
-
final script — use \`scriptctl summary\` / \`scriptctl episodes\` for that.
|
|
333
|
-
- merge Local-only assembly: committed episodes + meta.json → script.json + receipt
|
|
334
|
-
under workspace/episodes/.merged/. No gateway calls. Re-run after any
|
|
335
|
-
episode edit.
|
|
336
|
-
- push Upload the merge artifact to gateway. Pure uploader; refuses if the
|
|
337
|
-
merge receipt's recorded hashes don't match current files on disk.
|
|
338
|
-
- spec Print the spec-md grammar scriptctl's parser accepts. Use this before
|
|
339
|
-
writing a spec md by hand (for \`episode draft --from-md\` / \`--resume\`).
|
|
340
|
-
|
|
341
|
-
Workspace layout (scriptctl episode owns everything under workspace/episodes/)
|
|
342
|
-
- workspace/episodes/meta.json project meta (agent writes; scaffold via "episode init")
|
|
343
|
-
- workspace/episodes/ep<NN>.outline.md agent-written per-episode outline
|
|
344
|
-
- workspace/episodes/ep<NN>.md draft spec markdown (scriptctl writes)
|
|
345
|
-
- workspace/episodes/ep<NN>.json parsed fragment
|
|
346
|
-
- workspace/episodes/ep<NN>.lint.json lint report
|
|
347
|
-
- workspace/episodes/ep<NN>.collision.json present only when hard collisions exist
|
|
348
|
-
- workspace/episodes/ep<NN>.history/ prior versions archived on --regen
|
|
349
|
-
- workspace/episodes/asset-registry.json cross-episode asset registry
|
|
350
|
-
- workspace/episodes/.done-<NN> commit marker (auto-commit at draft end)
|
|
351
|
-
- workspace/episodes/.merged/script.json assembled script (merge output, push input)
|
|
352
|
-
- workspace/episodes/.merged/merge-receipt.json hashes of script + meta + each ep<n>.json
|
|
353
|
-
- workspace/episodes/.merged/push-receipt.json revision / request_id / pushedAt (push output)
|
|
354
|
-
|
|
355
|
-
The .merged/ directory is scriptctl-owned. Do not hand-edit its files — push validates
|
|
356
|
-
sha consistency and will block any tampered or stale snapshot. To "republish", re-run
|
|
357
|
-
merge (after any source edit) then push.
|
|
358
|
-
`,
|
|
359
|
-
],
|
|
360
|
-
[
|
|
361
|
-
["write", "init"],
|
|
362
|
-
`Scaffold the episode workspace. Creates <workspace>/episodes/ and writes a
|
|
363
|
-
meta.json template with TODO placeholders for title / worldview / style.
|
|
364
|
-
|
|
365
|
-
Usage
|
|
366
|
-
- scriptctl episode init [options]
|
|
313
|
+
- scriptctl parse [dir] [options]
|
|
314
|
+
- scriptctl parse --spec print the md grammar parse accepts
|
|
367
315
|
|
|
368
316
|
Options
|
|
369
|
-
-
|
|
370
|
-
- --
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
],
|
|
379
|
-
[
|
|
380
|
-
["write", "draft"],
|
|
381
|
-
`Draft + lint + assemble-validate + auto-commit episode <n> in one command.
|
|
382
|
-
|
|
383
|
-
The full pipeline for one episode:
|
|
384
|
-
1. Extract episode title from outline H1 (e.g. "# 第 N 集:副标题").
|
|
385
|
-
Hard fail if missing — title must come from outline, not be patched later.
|
|
386
|
-
2. Call provider (Gemini by default) → spec markdown.
|
|
387
|
-
3. parseMarkdownBatch (fragment mode) — schema-strict parse.
|
|
388
|
-
4. Collision detection against asset-registry.json. Hard collision → block.
|
|
389
|
-
5. lint (40-char dialogue cap, anti-novelization, 5-module structure).
|
|
390
|
-
6. Cross-episode assembled validation against ALL drafted episodes +
|
|
391
|
-
episodes/meta.json. Catches schema drift / asset reference issues at the
|
|
392
|
-
source, not at publish time.
|
|
393
|
-
7. On full pass: registry transitions uncommitted → committed for this
|
|
394
|
-
episode's assets; .done-<NN> marker written.
|
|
395
|
-
|
|
396
|
-
Usage
|
|
397
|
-
- scriptctl episode draft <n> [options]
|
|
398
|
-
|
|
399
|
-
Required
|
|
400
|
-
- <n> Positive episode number.
|
|
401
|
-
|
|
402
|
-
Options
|
|
403
|
-
- --workspace-path Workspace directory (scriptctl's own output dir).
|
|
404
|
-
Default: workspace
|
|
405
|
-
- --prompt-template Path to the writing-prompt template (e.g. the skill's
|
|
406
|
-
assets/gemini-writing-prompt.md). When omitted, scriptctl's
|
|
407
|
-
bundled default is used. The template may contain the
|
|
408
|
-
placeholder \`<!-- MARKDOWN_BATCH_PROMPT_SPEC -->\`, which is
|
|
409
|
-
replaced with the authoritative parser spec at draft time
|
|
410
|
-
(same mechanism the bundled default uses) so skill prompts
|
|
411
|
-
stay in sync with the parser as it evolves.
|
|
412
|
-
- --outline Path to this episode's per-episode 集纲 file. Accepts a
|
|
413
|
-
literal path or a template with the {NN} placeholder.
|
|
414
|
-
Default: <workspace>/episodes/ep{NN}.outline.md
|
|
415
|
-
- --ref <spec> Inject a named context block. Format: "<title>=<path>".
|
|
416
|
-
Repeatable; later entries with the same title override earlier.
|
|
417
|
-
scriptctl itself knows NO external file names — the SKILL or
|
|
418
|
-
agent owns which refs to pass.
|
|
419
|
-
Example: --ref "全局设定=analysis-workspace/全局设定.md"
|
|
420
|
-
- --from-md Skip the provider call; ingest a user-provided spec md
|
|
421
|
-
from this path. Useful when the agent / editor wrote the
|
|
422
|
-
episode by hand. Note: the outline file (ep<NN>.outline.md
|
|
423
|
-
at the default or --outline location) is still required —
|
|
424
|
-
the episode title comes from its H1, ensuring assembled
|
|
425
|
-
title and body remain in sync. Run \`scriptctl episode spec\`
|
|
426
|
-
to see the exact spec-md grammar before writing by hand.
|
|
427
|
-
- --provider Writer provider. Production: gemini (default; omit the flag).
|
|
428
|
-
For tests only: mock. Claude does NOT write episode bodies —
|
|
429
|
-
it stays on direct-init structured extraction.
|
|
430
|
-
- --model Override the Gemini model (default: gemini-2.5-pro).
|
|
431
|
-
- --max-tokens Override max_tokens for this draft.
|
|
432
|
-
- --regen Archive the existing ep<n>.md to ep<n>.history/ and roll
|
|
433
|
-
back uncommitted registry entries before drafting.
|
|
434
|
-
- --resume Skip the provider call; re-parse and re-collision-check
|
|
435
|
-
the existing ep<n>.md. Use after hand-editing a collision.
|
|
436
|
-
|
|
437
|
-
Context injection (in order, scriptctl builds the prompt itself):
|
|
438
|
-
1. The writing-prompt template (--prompt-template)
|
|
439
|
-
2. Asset registry summary (auto, from <workspace>/episodes/asset-registry.json)
|
|
440
|
-
3. Reference blocks (from --ref, one block per flag)
|
|
441
|
-
4. The per-episode outline (from --outline or default location)
|
|
442
|
-
5. Previous-episode tail (auto, from <workspace>/episodes/ep<N-1>.md)
|
|
443
|
-
|
|
444
|
-
Only the registry, the previous-episode lookup, and the outline default live in
|
|
445
|
-
scriptctl's own writing directory (<workspace>/episodes/). Everything else is
|
|
446
|
-
agent / SKILL-controlled via --ref.
|
|
447
|
-
|
|
448
|
-
Exit codes
|
|
449
|
-
- 0 pipeline passed all gates; episode committed
|
|
450
|
-
- 64 usage / arguments error (incl. missing outline H1 title)
|
|
451
|
-
- 66 input file unavailable (prompt template, outline, --from-md path missing)
|
|
452
|
-
- 70 provider failure or final parse failure after retry
|
|
453
|
-
- 78 hard collision OR lint critical OR assembled validation blocking — fix and re-run with --resume
|
|
454
|
-
`,
|
|
455
|
-
],
|
|
456
|
-
[
|
|
457
|
-
["write", "batch"],
|
|
458
|
-
`Batch-draft an inclusive range of episodes.
|
|
459
|
-
|
|
460
|
-
Usage
|
|
461
|
-
- scriptctl episode batch --range <a-b> [options]
|
|
462
|
-
|
|
463
|
-
Required
|
|
464
|
-
- --range <a-b> Inclusive episode range, e.g. --range 1-10.
|
|
465
|
-
|
|
466
|
-
Options
|
|
467
|
-
- --workspace-path Workspace directory. Default: workspace
|
|
468
|
-
- --prompt-template Required unless every episode is being --resume'd.
|
|
469
|
-
- --outline Path template with {NN} placeholder (e.g.
|
|
470
|
-
workspace/episodes/ep{NN}.outline.md). Same as draft.
|
|
471
|
-
- --ref <spec> Repeatable context ref (see "episode draft --help").
|
|
472
|
-
- --provider gemini (default) | mock (tests only). Same restriction as draft.
|
|
473
|
-
- --model Override the Gemini model.
|
|
474
|
-
- --max-tokens Per-episode max_tokens override.
|
|
475
|
-
|
|
476
|
-
Output
|
|
477
|
-
- A summary listing committed / blocked episodes.
|
|
478
|
-
- Blocked episodes need agent resolution; see their collision.json or lint.json.
|
|
479
|
-
`,
|
|
480
|
-
],
|
|
481
|
-
[
|
|
482
|
-
["write", "merge"],
|
|
483
|
-
`Assemble all committed episodes (those with .done-<NN> markers) + episodes/meta.json
|
|
484
|
-
into a single script.json, run schema validation, and persist locally for review.
|
|
485
|
-
NO network — gateway upload is the separate "episode push" command.
|
|
486
|
-
|
|
487
|
-
Usage
|
|
488
|
-
- scriptctl episode merge [options]
|
|
317
|
+
- [dir] md workspace directory. Default: <workspace>/parse.
|
|
318
|
+
- --workspace-path <path> Workspace root behind the default md dir (<workspace>/parse). Default: workspace.
|
|
319
|
+
- --md-dir <path> Point directly at the md workspace root (overrides [dir] / --workspace-path).
|
|
320
|
+
- --episodes-dir <path> Override the per-episode body directory.
|
|
321
|
+
- --title <title> Script title when the workspace omits 元信息.md.
|
|
322
|
+
- --publish Validate then store the assembled script in the DB
|
|
323
|
+
(omit to assemble + validate only, no write).
|
|
324
|
+
- --project-group-no <no> Target project for --publish.
|
|
325
|
+
- --request-id <id> Idempotency key for --publish.
|
|
489
326
|
|
|
490
|
-
|
|
491
|
-
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
- workspace/episodes/.done-<NN> at least one episode passed draft auto-commit
|
|
495
|
-
|
|
496
|
-
Options
|
|
497
|
-
- --workspace-path Workspace directory. Default: workspace
|
|
498
|
-
- --meta-path Override meta location. Default: <workspace>/episodes/meta.json
|
|
499
|
-
- --from <n> Lower bound episode number (inclusive). Default: all
|
|
500
|
-
- --to <n> Upper bound episode number (inclusive). Default: all
|
|
501
|
-
- --force Allow non-blocking validation warnings. Blocking errors still
|
|
502
|
-
refuse to write a receipt.
|
|
503
|
-
|
|
504
|
-
Behavior
|
|
505
|
-
- Scans episodes with .done-<NN> marker only — blocked (collision / lint) drafts
|
|
506
|
-
are skipped so a half-broken draft can never enter the merged script.
|
|
507
|
-
- Assembles using direct-core's mergeEpisodeResults (same shape as direct export).
|
|
508
|
-
- Re-runs validateScript (defense-in-depth — catches hand-edited ep<n>.json).
|
|
509
|
-
- On success: writes script.json + merge-receipt.json (sha256 of script, meta,
|
|
510
|
-
each ep<n>.json). \`episode push\` later re-verifies these hashes before uploading.
|
|
511
|
-
- On validation failure: script.json IS written (for agent inspection) but NO
|
|
512
|
-
receipt is — push will refuse until you re-merge.
|
|
513
|
-
|
|
514
|
-
Outputs
|
|
515
|
-
- workspace/episodes/.merged/script.json assembled script for review
|
|
516
|
-
- workspace/episodes/.merged/merge-receipt.json inputs + output sha256, locks state
|
|
517
|
-
|
|
518
|
-
Don't edit either file by hand. \`episode push\` validates them strictly; any drift
|
|
519
|
-
means re-merge. Treat .merged/ as read-only output of \`episode merge\`.
|
|
520
|
-
|
|
521
|
-
Exit codes
|
|
522
|
-
- 0 merged OK; receipt written; ready to push
|
|
523
|
-
- 64 usage / arguments error
|
|
524
|
-
- 66 meta or committed episodes missing
|
|
525
|
-
- 78 validation needs agent repair
|
|
526
|
-
`,
|
|
527
|
-
],
|
|
528
|
-
[
|
|
529
|
-
["write", "push"],
|
|
530
|
-
`Upload the most recent \`episode merge\` artifact to the script-output gateway.
|
|
531
|
-
Pure uploader — does not assemble or validate (merge already did). Refuses to
|
|
532
|
-
upload if the artifact / inputs drifted since merge.
|
|
533
|
-
|
|
534
|
-
Usage
|
|
535
|
-
- scriptctl episode push [options]
|
|
536
|
-
|
|
537
|
-
Required environment (gateway)
|
|
538
|
-
- AWB_BASE_URL gateway base
|
|
539
|
-
- LINGJING_AWB_ACCESS_KEY gateway access key
|
|
540
|
-
- SANDBOX_PROJECT_GROUP_NO or --project-group-no
|
|
541
|
-
|
|
542
|
-
Required workspace files
|
|
543
|
-
- workspace/episodes/.merged/script.json produced by \`episode merge\`
|
|
544
|
-
- workspace/episodes/.merged/merge-receipt.json produced by \`episode merge\`
|
|
545
|
-
|
|
546
|
-
Options
|
|
547
|
-
- --workspace-path Workspace directory. Default: workspace
|
|
548
|
-
- --project-group-no Override the project group number.
|
|
549
|
-
- --request-id Override the auto-derived idempotency key (defaults to
|
|
550
|
-
sha256 of the merged script).
|
|
551
|
-
|
|
552
|
-
Behavior — triple hash check (refuses any drift)
|
|
553
|
-
- (a) workspace/episodes/.merged/script.json sha == receipt.scriptSha256
|
|
554
|
-
- (b) meta.json (path from receipt) sha == receipt.metaSha256
|
|
555
|
-
- (c) every ep<n>.json sha == receipt.episodes[i].sha256
|
|
556
|
-
- Any mismatch → BLOCKED; agent must re-run \`episode merge\`.
|
|
557
|
-
- All pass → single gateway call (replaceScript), idempotency key from script sha.
|
|
558
|
-
|
|
559
|
-
Outputs
|
|
560
|
-
- workspace/episodes/.merged/push-receipt.json revision, requestId, pushedAt
|
|
561
|
-
|
|
562
|
-
Exit codes
|
|
563
|
-
- 0 uploaded OK
|
|
564
|
-
- 64 usage / arguments error
|
|
565
|
-
- 66 merge artifact or env missing
|
|
566
|
-
- 70 gateway runtime failure
|
|
567
|
-
- 78 merge receipt stale — re-merge required
|
|
568
|
-
`,
|
|
569
|
-
],
|
|
570
|
-
[
|
|
571
|
-
["write", "spec"],
|
|
572
|
-
`Print the spec-md grammar scriptctl's parser accepts. \`episode draft\` (Gemini)
|
|
573
|
-
auto-injects this into the writing prompt; this command exposes the same string
|
|
574
|
-
for agents writing spec md by hand (for \`episode draft --from-md\` / \`--resume\`).
|
|
575
|
-
|
|
576
|
-
Usage
|
|
577
|
-
- scriptctl episode spec
|
|
578
|
-
- scriptctl episode spec > spec.md (capture to a file for reference)
|
|
579
|
-
|
|
580
|
-
Behavior
|
|
581
|
-
- Reads the same MARKDOWN_BATCH_PROMPT_SPEC constant the bundled prompt uses —
|
|
582
|
-
single source of truth. No options, no side effects, no network.
|
|
583
|
-
|
|
584
|
-
Output
|
|
585
|
-
- Default text mode: the spec body verbatim — no title / exit wrapper, so
|
|
586
|
-
\`scriptctl episode spec > spec.md\` produces a clean spec file.
|
|
587
|
-
- --json mode: standard envelope with \`body\` field holding the spec text.
|
|
588
|
-
|
|
589
|
-
Exit codes
|
|
590
|
-
- 0 always (read-only command).
|
|
591
|
-
`,
|
|
592
|
-
],
|
|
593
|
-
[
|
|
594
|
-
["write", "workspace"],
|
|
595
|
-
`Report per-episode draft state inside the \`episode\` from-scratch workspace.
|
|
596
|
-
|
|
597
|
-
This is a workspace-area introspection command. It only knows about files under
|
|
598
|
-
workspace/episodes/. An empty result means "no from-scratch drafts in this
|
|
599
|
-
workspace" — NOT "no final script exists". To query the existing final script
|
|
600
|
-
(episode count, per-episode size, asset counts, etc.) use:
|
|
601
|
-
scriptctl summary
|
|
602
|
-
scriptctl episodes
|
|
603
|
-
|
|
604
|
-
Usage
|
|
605
|
-
- scriptctl episode workspace [options]
|
|
606
|
-
|
|
607
|
-
Options
|
|
608
|
-
- --workspace-path Workspace directory. Default: workspace
|
|
609
|
-
|
|
610
|
-
States
|
|
611
|
-
- drafted ep<NN>.md exists, no auto-commit yet
|
|
612
|
-
- blocked-collision collision report exists; agent must resolve
|
|
613
|
-
- blocked-lint lint critical report exists; agent must resolve
|
|
614
|
-
- committed .done-<NN> marker exists
|
|
327
|
+
Notes
|
|
328
|
+
- Completeness gaps (empty episode/scene, missing description) are warnings, not
|
|
329
|
+
blockers — same semantics as validate. Only integrity errors block --publish.
|
|
330
|
+
- Run \`scriptctl parse --spec\` first to see the exact md layout and line grammar.
|
|
615
331
|
`,
|
|
616
332
|
],
|
|
617
333
|
// =========================================================================
|
package/dist/help-text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-text.js","sourceRoot":"","sources":["../src/help-text.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAuC;IACvD;QACE,EAAE;QACF
|
|
1
|
+
{"version":3,"file":"help-text.js","sourceRoot":"","sources":["../src/help-text.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAuC;IACvD;QACE,EAAE;QACF;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -2,11 +2,6 @@ import { type ProviderLike } from "../domain/direct-core.js";
|
|
|
2
2
|
type Dict = Record<string, unknown>;
|
|
3
3
|
export declare class MockProvider implements ProviderLike {
|
|
4
4
|
readonly name = "mock";
|
|
5
|
-
/**
|
|
6
|
-
* Mock completion for episode draft tests. Returns a small valid spec-md fragment.
|
|
7
|
-
* Real callers must never use mock provider for delivery.
|
|
8
|
-
*/
|
|
9
|
-
complete(_prompt: string, _maxTokens?: number): Promise<string>;
|
|
10
5
|
extractEpisode(sourceText: string, episodePlan: Dict): Dict;
|
|
11
6
|
extractBatch(sourceText: string, batchPlan: Dict): Dict;
|
|
12
7
|
extractMetadata(_sourceText: string, script: Dict): Dict;
|
|
@@ -28,42 +23,11 @@ export declare class AnthropicProvider implements ProviderLike {
|
|
|
28
23
|
* raise a method-specific CliError.
|
|
29
24
|
*/
|
|
30
25
|
private collectToolUseInput;
|
|
31
|
-
/**
|
|
32
|
-
* Generic completion entry point. Used by episode subcommand's gemini-writer to draft
|
|
33
|
-
* one episode's spec markdown from the assembled prompt. Throws CliError when the
|
|
34
|
-
* provider truncates output (so the caller can surface a deterministic error rather
|
|
35
|
-
* than committing a half-baked episode).
|
|
36
|
-
*/
|
|
37
|
-
complete(prompt: string, maxTokens?: number): Promise<string>;
|
|
38
26
|
extractEpisode(sourceText: string, episodePlan: Dict): Promise<Dict>;
|
|
39
27
|
extractBatch(sourceText: string, batchPlan: Dict): Promise<Dict>;
|
|
40
28
|
extractEpisodeTitles(sourceText: string, episodePlan: Dict): Promise<Dict>;
|
|
41
29
|
extractAssetCuration(_sourceText: string, script: Dict): Promise<Dict>;
|
|
42
30
|
extractMetadata(_sourceText: string, script: Dict): Promise<Dict>;
|
|
43
31
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Google Gemini provider via REST API. No SDK dependency (uses fetch).
|
|
46
|
-
*
|
|
47
|
-
* Used as the default writer for `scriptctl episode draft`. The Anthropic provider
|
|
48
|
-
* stays available for other internal extraction tasks (metadata / title generation /
|
|
49
|
-
* direct-init batch extraction) where Claude tends to outperform Gemini on JSON
|
|
50
|
-
* schema adherence.
|
|
51
|
-
*
|
|
52
|
-
* Env:
|
|
53
|
-
* - `SCRIPTCTL_GEMINI_API_KEY` (or fallback `GEMINI_API_KEY`) required
|
|
54
|
-
* - `SCRIPTCTL_GEMINI_BASE_URL` optional override
|
|
55
|
-
* - `SCRIPTCTL_GEMINI_MODEL` optional default-model override
|
|
56
|
-
*/
|
|
57
|
-
export declare class GeminiProvider implements ProviderLike {
|
|
58
|
-
readonly name = "gemini";
|
|
59
|
-
private readonly apiKey;
|
|
60
|
-
private readonly baseUrl;
|
|
61
|
-
private readonly model;
|
|
62
|
-
constructor(model?: string);
|
|
63
|
-
/**
|
|
64
|
-
* Plain-text completion. Used by `episode draft` to write a spec-md episode body.
|
|
65
|
-
*/
|
|
66
|
-
complete(prompt: string, maxTokens?: number): Promise<string>;
|
|
67
|
-
}
|
|
68
32
|
export declare function makeProvider(name: string, model: string): ProviderLike;
|
|
69
33
|
export {};
|