@lingjingai/scriptctl 0.31.0 → 0.33.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/changes/0.32.0.md +30 -0
- package/changes/0.33.0.md +17 -0
- package/dist/common.d.ts +1 -0
- package/dist/common.js +70 -0
- package/dist/common.js.map +1 -1
- package/dist/domain/direct/runner.d.ts +3 -1
- package/dist/domain/direct/runner.js +20 -4
- package/dist/domain/direct/runner.js.map +1 -1
- package/dist/domain/direct/stage.d.ts +23 -1
- package/dist/domain/direct/stage.js +3 -0
- package/dist/domain/direct/stage.js.map +1 -1
- package/dist/domain/direct/stages/asset-curation.js +3 -2
- package/dist/domain/direct/stages/asset-curation.js.map +1 -1
- package/dist/domain/direct/stages/index.d.ts +3 -1
- package/dist/domain/direct/stages/index.js +5 -1
- package/dist/domain/direct/stages/index.js.map +1 -1
- package/dist/domain/direct/stages/state-binding.d.ts +2 -0
- package/dist/domain/direct/stages/state-binding.js +9 -0
- package/dist/domain/direct/stages/state-binding.js.map +1 -0
- package/dist/domain/direct/stages/state-curation.d.ts +2 -0
- package/dist/domain/direct/stages/state-curation.js +10 -0
- package/dist/domain/direct/stages/state-curation.js.map +1 -0
- package/dist/domain/direct-core.d.ts +78 -0
- package/dist/domain/direct-core.js +4252 -239
- package/dist/domain/direct-core.js.map +1 -1
- package/dist/help-text.js +60 -1
- package/dist/help-text.js.map +1 -1
- package/dist/infra/providers.d.ts +12 -0
- package/dist/infra/providers.js +590 -3
- package/dist/infra/providers.js.map +1 -1
- package/dist/usecases/direct.d.ts +2 -0
- package/dist/usecases/direct.js +1533 -53
- package/dist/usecases/direct.js.map +1 -1
- package/package.json +1 -1
package/dist/help-text.js
CHANGED
|
@@ -115,6 +115,7 @@ Usage
|
|
|
115
115
|
|
|
116
116
|
Commands
|
|
117
117
|
- init Build source manifest, episode plan, initial script, validation.
|
|
118
|
+
- run Re-run one direct stage, e.g. state-binding or metadata.
|
|
118
119
|
- validate Validate script.initial.json.
|
|
119
120
|
- review Proofread the draft: curation/issues, or --episode N for source↔extract.
|
|
120
121
|
- export Export script.initial.json to the final script store.
|
|
@@ -181,11 +182,15 @@ Writes
|
|
|
181
182
|
- workspace/draft/scriptctl/direct/batch_results/*.json
|
|
182
183
|
- workspace/draft/scriptctl/direct/batch_results/*.error.json
|
|
183
184
|
- workspace/draft/scriptctl/direct/episode_results/*.json
|
|
185
|
+
- workspace/draft/scriptctl/direct/asset_grouping.json
|
|
184
186
|
- workspace/draft/scriptctl/direct/asset_curation.json
|
|
187
|
+
- workspace/draft/scriptctl/direct/state_curation.json
|
|
188
|
+
- workspace/draft/scriptctl/direct/state_binding.json
|
|
185
189
|
- workspace/draft/scriptctl/direct/asset_metadata.json (unless --skip-metadata)
|
|
186
190
|
- workspace/draft/scriptctl/direct/script.initial.json
|
|
187
191
|
- workspace/draft/scriptctl/direct/validation.json
|
|
188
192
|
- workspace/draft/scriptctl/direct/run_state.json
|
|
193
|
+
- workspace/draft/scriptctl/direct/timings.json
|
|
189
194
|
|
|
190
195
|
Exit codes
|
|
191
196
|
- 0 initial script ready
|
|
@@ -193,6 +198,57 @@ Exit codes
|
|
|
193
198
|
- 66 source file unavailable
|
|
194
199
|
- 70 provider or runtime failure
|
|
195
200
|
- 78 initial script written but agent repair is needed
|
|
201
|
+
`,
|
|
202
|
+
],
|
|
203
|
+
[
|
|
204
|
+
["direct", "run"],
|
|
205
|
+
`Re-run one direct pipeline stage against an existing workspace.
|
|
206
|
+
|
|
207
|
+
Usage
|
|
208
|
+
- scriptctl direct run <stage> [options]
|
|
209
|
+
|
|
210
|
+
Stages
|
|
211
|
+
- source-prepare
|
|
212
|
+
- episode-plan
|
|
213
|
+
- episode-titles
|
|
214
|
+
- batch-plan
|
|
215
|
+
- batch-extract
|
|
216
|
+
- episode-merge
|
|
217
|
+
- episode-synopsis
|
|
218
|
+
- script-merge
|
|
219
|
+
- asset-curation
|
|
220
|
+
- state-curation
|
|
221
|
+
- state-binding
|
|
222
|
+
- metadata
|
|
223
|
+
- script-synopsis
|
|
224
|
+
- validate
|
|
225
|
+
|
|
226
|
+
Options
|
|
227
|
+
- --workspace-path Workspace directory. Default: workspace
|
|
228
|
+
- --force Re-run the stage even when its primary artifact exists.
|
|
229
|
+
- --provider LLM provider for provider-backed stages. Default: anthropic
|
|
230
|
+
- --model Provider model. Default: claude-sonnet-4-6-aihubmix
|
|
231
|
+
- --episodes <list> Force re-run these episodes' batches where relevant.
|
|
232
|
+
- --batches <list> Force re-run these batch keys where relevant.
|
|
233
|
+
- --retry-errors Force re-run batches with existing error markers.
|
|
234
|
+
- --skip-metadata When running metadata, delete asset_metadata.json and mark metadata skipped.
|
|
235
|
+
- --json Print machine-readable JSON.
|
|
236
|
+
- --help Show this help.
|
|
237
|
+
|
|
238
|
+
Notes
|
|
239
|
+
- Script-mutating stages persist script.initial.json when run standalone:
|
|
240
|
+
script-merge, asset-curation, state-curation, state-binding, metadata.
|
|
241
|
+
- state-curation writes state_curation.json and compresses asset state catalogs
|
|
242
|
+
to reusable production visual states before scene-level binding.
|
|
243
|
+
- state-binding writes state_binding.json and updates scene state refs /
|
|
244
|
+
action state_changes using existing assets and states only.
|
|
245
|
+
|
|
246
|
+
Exit codes
|
|
247
|
+
- 0 stage completed
|
|
248
|
+
- 64 usage or arguments error
|
|
249
|
+
- 66 required artifact unavailable
|
|
250
|
+
- 70 provider or runtime failure
|
|
251
|
+
- 78 stage wrote diagnostics but agent repair is needed
|
|
196
252
|
`,
|
|
197
253
|
],
|
|
198
254
|
[
|
|
@@ -254,7 +310,7 @@ Exit codes
|
|
|
254
310
|
`Proofread the direct draft. Read-only; no state side effects.
|
|
255
311
|
|
|
256
312
|
Usage
|
|
257
|
-
- scriptctl direct review [options] # curation decisions + issues
|
|
313
|
+
- scriptctl direct review [options] # curation/state-binding decisions + issues
|
|
258
314
|
- scriptctl direct review --episode <n>[,<n>...] # source.txt ↔ script.initial.json side-by-side per episode
|
|
259
315
|
|
|
260
316
|
Options
|
|
@@ -271,7 +327,10 @@ Notes
|
|
|
271
327
|
|
|
272
328
|
Reads
|
|
273
329
|
- workspace/draft/scriptctl/direct/script.initial.json
|
|
330
|
+
- workspace/draft/scriptctl/direct/asset_grouping.json
|
|
274
331
|
- workspace/draft/scriptctl/direct/asset_curation.json
|
|
332
|
+
- workspace/draft/scriptctl/direct/state_curation.json
|
|
333
|
+
- workspace/draft/scriptctl/direct/state_binding.json
|
|
275
334
|
- workspace/draft/scriptctl/direct/batch_results/*.error.json
|
|
276
335
|
- workspace/draft/scriptctl/direct/episode_plan.json (--episode)
|
|
277
336
|
- workspace/source.txt (--episode)
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDH;KACE;IACD;QACE,CAAC,QAAQ,CAAC;QACV;;;;;;;;;;CAUH;KACE;IACD;QACE,CAAC,WAAW,CAAC;QACb;;;;;;;;;;;;;;CAcH;KACE;IACD;QACE,CAAC,QAAQ,CAAC;QACV;;;;;;;;;;;;;;;CAeH;KACE;IACD;QACE,CAAC,QAAQ,CAAC;QACV
|
|
1
|
+
{"version":3,"file":"help-text.js","sourceRoot":"","sources":["../src/help-text.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAuC;IACvD;QACE,EAAE;QACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDH;KACE;IACD;QACE,CAAC,QAAQ,CAAC;QACV;;;;;;;;;;CAUH;KACE;IACD;QACE,CAAC,WAAW,CAAC;QACb;;;;;;;;;;;;;;CAcH;KACE;IACD;QACE,CAAC,QAAQ,CAAC;QACV;;;;;;;;;;;;;;;CAeH;KACE;IACD;QACE,CAAC,Q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C;AAC3B,CAAC;AAED,MAAM,QAAQ,GAAwB,IAAI,GAAG,CAC3C,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CACtD,CAAC;AAEF,MAAM,UAAU,OAAO,CAAC,OAA0B;IAChD,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC"}
|
|
@@ -5,6 +5,10 @@ export interface ProviderCapabilities {
|
|
|
5
5
|
extractBatch: boolean;
|
|
6
6
|
extractEpisode: boolean;
|
|
7
7
|
extractMetadata: boolean;
|
|
8
|
+
groupAssets: boolean;
|
|
9
|
+
curateAssets: boolean;
|
|
10
|
+
curateStates: boolean;
|
|
11
|
+
bindStates: boolean;
|
|
8
12
|
extractEpisodeTitles: boolean;
|
|
9
13
|
extractEpisodeSynopsis: boolean;
|
|
10
14
|
extractScriptSynopsis: boolean;
|
|
@@ -22,6 +26,10 @@ export declare class MockProvider implements ProviderLike {
|
|
|
22
26
|
extractEpisode(sourceText: string, episodePlan: Dict): Dict;
|
|
23
27
|
extractBatch(sourceText: string, batchPlan: Dict): Dict;
|
|
24
28
|
extractMetadata(_sourceText: string, script: Dict): Dict;
|
|
29
|
+
groupAssets(_script: Dict, contextText: string): string;
|
|
30
|
+
curateAssets(script: Dict, contextText: string): string;
|
|
31
|
+
curateStates(_script: Dict, contextText: string): string;
|
|
32
|
+
bindStates(_script: Dict, context: Dict): Dict;
|
|
25
33
|
extractEpisodeSynopsis(synopses: string[], _ctx: Dict): Dict;
|
|
26
34
|
extractScriptSynopsis(synopses: string[], _ctx: Dict): Dict;
|
|
27
35
|
extractEpisodeTitles(sourceText: string, episodePlan: Dict): Dict;
|
|
@@ -60,6 +68,10 @@ export declare class AnthropicProvider implements ProviderLike {
|
|
|
60
68
|
}>;
|
|
61
69
|
extractBatch(sourceText: string, batchPlan: Dict): Promise<Dict>;
|
|
62
70
|
extractEpisodeTitles(sourceText: string, episodePlan: Dict): Promise<Dict>;
|
|
71
|
+
groupAssets(_script: Dict, contextText: string): Promise<string>;
|
|
72
|
+
curateAssets(_script: Dict, contextText: string): Promise<string>;
|
|
73
|
+
curateStates(_script: Dict, contextText: string): Promise<string>;
|
|
74
|
+
bindStates(_script: Dict, context: Dict): Promise<Dict>;
|
|
63
75
|
extractMetadata(_sourceText: string, script: Dict): Promise<Dict>;
|
|
64
76
|
private runMetadataMarkdown;
|
|
65
77
|
private collectResponseTextWithRetry;
|