@lingjingai/scriptctl 0.49.16 → 0.51.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 +8 -2
- package/changes/0.50.0.md +63 -0
- package/changes/0.51.0.md +24 -0
- package/dist/cli/register-batch.d.ts +3 -0
- package/dist/cli/register-batch.js +28 -0
- package/dist/cli/register-batch.js.map +1 -0
- package/dist/cli/register-edits.d.ts +4 -0
- package/dist/cli/register-edits.js +226 -0
- package/dist/cli/register-edits.js.map +1 -0
- package/dist/cli/register-query.d.ts +4 -0
- package/dist/cli/register-query.js +93 -0
- package/dist/cli/register-query.js.map +1 -0
- package/dist/cli/register-tools.d.ts +3 -0
- package/dist/cli/register-tools.js +23 -0
- package/dist/cli/register-tools.js.map +1 -0
- package/dist/cli/register-workflows.d.ts +4 -0
- package/dist/cli/register-workflows.js +71 -0
- package/dist/cli/register-workflows.js.map +1 -0
- package/dist/cli/registry.d.ts +14 -0
- package/dist/cli/registry.js +65 -0
- package/dist/cli/registry.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +146 -575
- package/dist/cli.js.map +1 -1
- package/dist/common.d.ts +12 -38
- package/dist/common.js +5 -11
- package/dist/common.js.map +1 -1
- package/dist/domain/authoring/apply.d.ts +1 -33
- package/dist/domain/authoring/apply.js +1 -783
- package/dist/domain/authoring/apply.js.map +1 -1
- package/dist/domain/authoring/export.d.ts +1 -7
- package/dist/domain/authoring/export.js +1 -84
- package/dist/domain/authoring/export.js.map +1 -1
- package/dist/domain/authoring/parser.d.ts +2 -3
- package/dist/domain/authoring/parser.js +2 -914
- package/dist/domain/authoring/parser.js.map +1 -1
- package/dist/domain/authoring/serializer.d.ts +1 -2
- package/dist/domain/authoring/serializer.js +1 -243
- package/dist/domain/authoring/serializer.js.map +1 -1
- package/dist/domain/authoring/shared/bracket.d.ts +4 -0
- package/dist/domain/authoring/shared/bracket.js +95 -0
- package/dist/domain/authoring/shared/bracket.js.map +1 -0
- package/dist/domain/authoring/shared/types.d.ts +12 -0
- package/dist/domain/authoring/shared/types.js +2 -0
- package/dist/domain/authoring/shared/types.js.map +1 -0
- package/dist/domain/authoring/types.d.ts +2 -87
- package/dist/domain/authoring/types.js +2 -1
- package/dist/domain/authoring/types.js.map +1 -1
- package/dist/domain/authoring/v3/apply.d.ts +33 -0
- package/dist/domain/authoring/v3/apply.js +784 -0
- package/dist/domain/authoring/v3/apply.js.map +1 -0
- package/dist/domain/authoring/v3/export.d.ts +7 -0
- package/dist/domain/authoring/v3/export.js +85 -0
- package/dist/domain/authoring/v3/export.js.map +1 -0
- package/dist/domain/authoring/v3/parser.d.ts +3 -0
- package/dist/domain/authoring/v3/parser.js +823 -0
- package/dist/domain/authoring/v3/parser.js.map +1 -0
- package/dist/domain/authoring/v3/serializer.d.ts +2 -0
- package/dist/domain/authoring/v3/serializer.js +244 -0
- package/dist/domain/authoring/v3/serializer.js.map +1 -0
- package/dist/domain/authoring/v3/types.d.ts +76 -0
- package/dist/domain/authoring/v3/types.js +2 -0
- package/dist/domain/authoring/v3/types.js.map +1 -0
- package/dist/domain/authoring/v4/apply.d.ts +40 -0
- package/dist/domain/authoring/v4/apply.js +451 -0
- package/dist/domain/authoring/v4/apply.js.map +1 -0
- package/dist/domain/authoring/v4/parser.d.ts +2 -0
- package/dist/domain/authoring/v4/parser.js +729 -0
- package/dist/domain/authoring/v4/parser.js.map +1 -0
- package/dist/domain/authoring/v4/serializer.d.ts +6 -0
- package/dist/domain/authoring/v4/serializer.js +280 -0
- package/dist/domain/authoring/v4/serializer.js.map +1 -0
- package/dist/domain/authoring/v4/types.d.ts +50 -0
- package/dist/domain/authoring/v4/types.js +2 -0
- package/dist/domain/authoring/v4/types.js.map +1 -0
- package/dist/domain/ingest/apply-plan.d.ts +1 -1
- package/dist/domain/ingest/assembler.d.ts +9 -0
- package/dist/domain/ingest/assembler.js +98 -36
- package/dist/domain/ingest/assembler.js.map +1 -1
- package/dist/domain/ingest/asset-audit.d.ts +50 -0
- package/dist/domain/ingest/asset-audit.js +196 -0
- package/dist/domain/ingest/asset-audit.js.map +1 -0
- package/dist/domain/ingest/production-validation.d.ts +5 -4
- package/dist/domain/ingest/production-validation.js +10 -25
- package/dist/domain/ingest/production-validation.js.map +1 -1
- package/dist/domain/ingest/records.d.ts +1 -1
- package/dist/domain/ingest/records.js +1 -1
- package/dist/domain/ingest/records.js.map +1 -1
- package/dist/domain/ingest/serial-context.d.ts +1 -1
- package/dist/domain/ingest/validation.d.ts +1 -11
- package/dist/domain/ingest/validation.js +1 -199
- package/dist/domain/ingest/validation.js.map +1 -1
- package/dist/domain/ingest/video-apply.js +68 -45
- package/dist/domain/ingest/video-apply.js.map +1 -1
- package/dist/domain/script/address.d.ts +1 -32
- package/dist/domain/script/address.js +1 -144
- package/dist/domain/script/address.js.map +1 -1
- package/dist/domain/script/dispatch.d.ts +14 -0
- package/dist/domain/script/dispatch.js +45 -0
- package/dist/domain/script/dispatch.js.map +1 -0
- package/dist/domain/script/lookups.d.ts +1 -33
- package/dist/domain/script/lookups.js +1 -316
- package/dist/domain/script/lookups.js.map +1 -1
- package/dist/domain/script/parse.d.ts +1 -3
- package/dist/domain/script/parse.js +1 -164
- package/dist/domain/script/parse.js.map +1 -1
- package/dist/domain/script/patch/apply.d.ts +1 -2
- package/dist/domain/script/patch/apply.js +1 -30
- package/dist/domain/script/patch/apply.js.map +1 -1
- package/dist/domain/script/patch/helpers.d.ts +1 -17
- package/dist/domain/script/patch/helpers.js +1 -210
- package/dist/domain/script/patch/helpers.js.map +1 -1
- package/dist/domain/script/patch/inline-speaker.d.ts +1 -2
- package/dist/domain/script/patch/inline-speaker.js +1 -49
- package/dist/domain/script/patch/inline-speaker.js.map +1 -1
- package/dist/domain/script/patch/ops-action.d.ts +1 -12
- package/dist/domain/script/patch/ops-action.js +1 -366
- package/dist/domain/script/patch/ops-action.js.map +1 -1
- package/dist/domain/script/patch/ops-asset.d.ts +1 -14
- package/dist/domain/script/patch/ops-asset.js +1 -364
- package/dist/domain/script/patch/ops-asset.js.map +1 -1
- package/dist/domain/script/patch/ops-dialogue.d.ts +1 -2
- package/dist/domain/script/patch/ops-dialogue.js +1 -25
- package/dist/domain/script/patch/ops-dialogue.js.map +1 -1
- package/dist/domain/script/patch/ops-extend.d.ts +1 -8
- package/dist/domain/script/patch/ops-extend.js +1 -110
- package/dist/domain/script/patch/ops-extend.js.map +1 -1
- package/dist/domain/script/patch/ops-meta.d.ts +1 -5
- package/dist/domain/script/patch/ops-meta.js +1 -81
- package/dist/domain/script/patch/ops-meta.js.map +1 -1
- package/dist/domain/script/patch/ops-scene.d.ts +1 -6
- package/dist/domain/script/patch/ops-scene.js +1 -350
- package/dist/domain/script/patch/ops-scene.js.map +1 -1
- package/dist/domain/script/patch/ops-state.d.ts +1 -8
- package/dist/domain/script/patch/ops-state.js +1 -164
- package/dist/domain/script/patch/ops-state.js.map +1 -1
- package/dist/domain/script/patch/registry.d.ts +1 -2
- package/dist/domain/script/patch/registry.js +1 -52
- package/dist/domain/script/patch/registry.js.map +1 -1
- package/dist/domain/script/patch/types.d.ts +1 -10
- package/dist/domain/script/patch/types.js +1 -1
- package/dist/domain/script/patch/types.js.map +1 -1
- package/dist/domain/script/refs.d.ts +1 -4
- package/dist/domain/script/refs.js +1 -63
- package/dist/domain/script/refs.js.map +1 -1
- package/dist/domain/script/scene-refs.d.ts +1 -3
- package/dist/domain/script/scene-refs.js +1 -34
- package/dist/domain/script/scene-refs.js.map +1 -1
- package/dist/domain/script/schema.d.ts +1 -6
- package/dist/domain/script/schema.js +1 -55
- package/dist/domain/script/schema.js.map +1 -1
- package/dist/domain/script/selector.d.ts +1 -45
- package/dist/domain/script/selector.js +1 -184
- package/dist/domain/script/selector.js.map +1 -1
- package/dist/domain/script/shared/regex.d.ts +2 -0
- package/dist/domain/script/shared/regex.js +7 -0
- package/dist/domain/script/shared/regex.js.map +1 -0
- package/dist/domain/script/shared/types.d.ts +18 -0
- package/dist/domain/script/shared/types.js +9 -0
- package/dist/domain/script/shared/types.js.map +1 -0
- package/dist/domain/script/shared/validation.d.ts +10 -0
- package/dist/domain/script/shared/validation.js +2 -0
- package/dist/domain/script/shared/validation.js.map +1 -0
- package/dist/domain/script/shared.js +4 -6
- package/dist/domain/script/shared.js.map +1 -1
- package/dist/domain/script/types.d.ts +1 -123
- package/dist/domain/script/types.js +1 -8
- package/dist/domain/script/types.js.map +1 -1
- package/dist/domain/script/v3/address.d.ts +32 -0
- package/dist/domain/script/v3/address.js +136 -0
- package/dist/domain/script/v3/address.js.map +1 -0
- package/dist/domain/script/v3/lookups.d.ts +33 -0
- package/dist/domain/script/v3/lookups.js +316 -0
- package/dist/domain/script/v3/lookups.js.map +1 -0
- package/dist/domain/script/v3/ordinal.d.ts +8 -0
- package/dist/domain/script/v3/ordinal.js +91 -0
- package/dist/domain/script/v3/ordinal.js.map +1 -0
- package/dist/domain/script/v3/parse.d.ts +3 -0
- package/dist/domain/script/v3/parse.js +164 -0
- package/dist/domain/script/v3/parse.js.map +1 -0
- package/dist/domain/script/v3/patch/apply.d.ts +2 -0
- package/dist/domain/script/v3/patch/apply.js +31 -0
- package/dist/domain/script/v3/patch/apply.js.map +1 -0
- package/dist/domain/script/v3/patch/helpers.d.ts +17 -0
- package/dist/domain/script/v3/patch/helpers.js +209 -0
- package/dist/domain/script/v3/patch/helpers.js.map +1 -0
- package/dist/domain/script/v3/patch/inline-speaker.d.ts +2 -0
- package/dist/domain/script/v3/patch/inline-speaker.js +50 -0
- package/dist/domain/script/v3/patch/inline-speaker.js.map +1 -0
- package/dist/domain/script/v3/patch/ops-action.d.ts +12 -0
- package/dist/domain/script/v3/patch/ops-action.js +367 -0
- package/dist/domain/script/v3/patch/ops-action.js.map +1 -0
- package/dist/domain/script/v3/patch/ops-asset.d.ts +14 -0
- package/dist/domain/script/v3/patch/ops-asset.js +365 -0
- package/dist/domain/script/v3/patch/ops-asset.js.map +1 -0
- package/dist/domain/script/v3/patch/ops-dialogue.d.ts +2 -0
- package/dist/domain/script/v3/patch/ops-dialogue.js +26 -0
- package/dist/domain/script/v3/patch/ops-dialogue.js.map +1 -0
- package/dist/domain/script/v3/patch/ops-extend.d.ts +8 -0
- package/dist/domain/script/v3/patch/ops-extend.js +111 -0
- package/dist/domain/script/v3/patch/ops-extend.js.map +1 -0
- package/dist/domain/script/v3/patch/ops-meta.d.ts +5 -0
- package/dist/domain/script/v3/patch/ops-meta.js +82 -0
- package/dist/domain/script/v3/patch/ops-meta.js.map +1 -0
- package/dist/domain/script/v3/patch/ops-scene.d.ts +6 -0
- package/dist/domain/script/v3/patch/ops-scene.js +351 -0
- package/dist/domain/script/v3/patch/ops-scene.js.map +1 -0
- package/dist/domain/script/v3/patch/ops-state.d.ts +8 -0
- package/dist/domain/script/v3/patch/ops-state.js +165 -0
- package/dist/domain/script/v3/patch/ops-state.js.map +1 -0
- package/dist/domain/script/v3/patch/registry.d.ts +2 -0
- package/dist/domain/script/v3/patch/registry.js +53 -0
- package/dist/domain/script/v3/patch/registry.js.map +1 -0
- package/dist/domain/script/v3/patch/types.d.ts +10 -0
- package/dist/domain/script/v3/patch/types.js +2 -0
- package/dist/domain/script/v3/patch/types.js.map +1 -0
- package/dist/domain/script/v3/refs.d.ts +4 -0
- package/dist/domain/script/v3/refs.js +64 -0
- package/dist/domain/script/v3/refs.js.map +1 -0
- package/dist/domain/script/v3/scene-refs.d.ts +3 -0
- package/dist/domain/script/v3/scene-refs.js +35 -0
- package/dist/domain/script/v3/scene-refs.js.map +1 -0
- package/dist/domain/script/v3/schema.d.ts +6 -0
- package/dist/domain/script/v3/schema.js +56 -0
- package/dist/domain/script/v3/schema.js.map +1 -0
- package/dist/domain/script/v3/selector.d.ts +44 -0
- package/dist/domain/script/v3/selector.js +178 -0
- package/dist/domain/script/v3/selector.js.map +1 -0
- package/dist/domain/script/v3/types.d.ts +106 -0
- package/dist/domain/script/v3/types.js +2 -0
- package/dist/domain/script/v3/types.js.map +1 -0
- package/dist/domain/script/v3/validation.d.ts +3 -0
- package/dist/domain/script/v3/validation.js +200 -0
- package/dist/domain/script/v3/validation.js.map +1 -0
- package/dist/domain/script/v4/address.d.ts +61 -0
- package/dist/domain/script/v4/address.js +99 -0
- package/dist/domain/script/v4/address.js.map +1 -0
- package/dist/domain/script/v4/factory.d.ts +2 -0
- package/dist/domain/script/v4/factory.js +13 -0
- package/dist/domain/script/v4/factory.js.map +1 -0
- package/dist/domain/script/v4/from-v3.d.ts +29 -0
- package/dist/domain/script/v4/from-v3.js +307 -0
- package/dist/domain/script/v4/from-v3.js.map +1 -0
- package/dist/domain/script/v4/ids.d.ts +27 -0
- package/dist/domain/script/v4/ids.js +62 -0
- package/dist/domain/script/v4/ids.js.map +1 -0
- package/dist/domain/script/v4/ordinal.d.ts +3 -0
- package/dist/domain/script/v4/ordinal.js +66 -0
- package/dist/domain/script/v4/ordinal.js.map +1 -0
- package/dist/domain/script/v4/parse.d.ts +3 -0
- package/dist/domain/script/v4/parse.js +17 -0
- package/dist/domain/script/v4/parse.js.map +1 -0
- package/dist/domain/script/v4/patch/apply.d.ts +3 -0
- package/dist/domain/script/v4/patch/apply.js +24 -0
- package/dist/domain/script/v4/patch/apply.js.map +1 -0
- package/dist/domain/script/v4/patch/helpers.d.ts +32 -0
- package/dist/domain/script/v4/patch/helpers.js +138 -0
- package/dist/domain/script/v4/patch/helpers.js.map +1 -0
- package/dist/domain/script/v4/patch/ops-action.d.ts +13 -0
- package/dist/domain/script/v4/patch/ops-action.js +376 -0
- package/dist/domain/script/v4/patch/ops-action.js.map +1 -0
- package/dist/domain/script/v4/patch/ops-asset.d.ts +17 -0
- package/dist/domain/script/v4/patch/ops-asset.js +617 -0
- package/dist/domain/script/v4/patch/ops-asset.js.map +1 -0
- package/dist/domain/script/v4/patch/ops-extend.d.ts +11 -0
- package/dist/domain/script/v4/patch/ops-extend.js +86 -0
- package/dist/domain/script/v4/patch/ops-extend.js.map +1 -0
- package/dist/domain/script/v4/patch/ops-meta.d.ts +5 -0
- package/dist/domain/script/v4/patch/ops-meta.js +49 -0
- package/dist/domain/script/v4/patch/ops-meta.js.map +1 -0
- package/dist/domain/script/v4/patch/ops-scene-ref.d.ts +3 -0
- package/dist/domain/script/v4/patch/ops-scene-ref.js +98 -0
- package/dist/domain/script/v4/patch/ops-scene-ref.js.map +1 -0
- package/dist/domain/script/v4/patch/ops-structure.d.ts +6 -0
- package/dist/domain/script/v4/patch/ops-structure.js +236 -0
- package/dist/domain/script/v4/patch/ops-structure.js.map +1 -0
- package/dist/domain/script/v4/patch/registry.d.ts +2 -0
- package/dist/domain/script/v4/patch/registry.js +50 -0
- package/dist/domain/script/v4/patch/registry.js.map +1 -0
- package/dist/domain/script/v4/patch/schema.d.ts +7 -0
- package/dist/domain/script/v4/patch/schema.js +75 -0
- package/dist/domain/script/v4/patch/schema.js.map +1 -0
- package/dist/domain/script/v4/patch/types.d.ts +10 -0
- package/dist/domain/script/v4/patch/types.js +2 -0
- package/dist/domain/script/v4/patch/types.js.map +1 -0
- package/dist/domain/script/v4/selector.d.ts +11 -0
- package/dist/domain/script/v4/selector.js +124 -0
- package/dist/domain/script/v4/selector.js.map +1 -0
- package/dist/domain/script/v4/types.d.ts +120 -0
- package/dist/domain/script/v4/types.js +2 -0
- package/dist/domain/script/v4/types.js.map +1 -0
- package/dist/domain/script/v4/validation.d.ts +2 -0
- package/dist/domain/script/v4/validation.js +378 -0
- package/dist/domain/script/v4/validation.js.map +1 -0
- package/dist/infra/ingest/video-discovery.js +7 -4
- package/dist/infra/ingest/video-discovery.js.map +1 -1
- package/dist/infra/script-output-store.js +6 -11
- package/dist/infra/script-output-store.js.map +1 -1
- package/dist/infra/script-working-copy.js +15 -16
- package/dist/infra/script-working-copy.js.map +1 -1
- package/dist/llm/config.js +5 -4
- package/dist/llm/config.js.map +1 -1
- package/dist/llm/registry.d.ts +1 -0
- package/dist/llm/registry.js +3 -0
- package/dist/llm/registry.js.map +1 -1
- package/dist/llm/router.js +6 -8
- package/dist/llm/router.js.map +1 -1
- package/dist/llm/tasks/ingest/asset-audit.d.ts +6 -0
- package/dist/llm/tasks/ingest/asset-audit.js +164 -0
- package/dist/llm/tasks/ingest/asset-audit.js.map +1 -0
- package/dist/llm/tasks/ingest/asset-curate.d.ts +1 -1
- package/dist/llm/tasks/ingest/text-normalize.js +3 -3
- package/dist/llm/tasks/ingest/text-normalize.js.map +1 -1
- package/dist/llm/tasks/ingest/video-serial.js +3 -3
- package/dist/llm/tasks/ingest/video-serial.js.map +1 -1
- package/dist/llm/types.d.ts +1 -1
- package/dist/llm/types.js.map +1 -1
- package/dist/output.d.ts +2 -3
- package/dist/output.js +72 -109
- package/dist/output.js.map +1 -1
- package/dist/usecases/changelog.d.ts +2 -2
- package/dist/usecases/changelog.js +28 -36
- package/dist/usecases/changelog.js.map +1 -1
- package/dist/usecases/doctor.d.ts +2 -2
- package/dist/usecases/doctor.js +3 -5
- package/dist/usecases/doctor.js.map +1 -1
- package/dist/usecases/ingest/command.d.ts +2 -2
- package/dist/usecases/ingest/command.js +23 -6
- package/dist/usecases/ingest/command.js.map +1 -1
- package/dist/usecases/ingest/final-asset-audit.d.ts +39 -0
- package/dist/usecases/ingest/final-asset-audit.js +88 -0
- package/dist/usecases/ingest/final-asset-audit.js.map +1 -0
- package/dist/usecases/ingest/pass5-extract.js +5 -4
- package/dist/usecases/ingest/pass5-extract.js.map +1 -1
- package/dist/usecases/ingest/pass5-govern.js +13 -11
- package/dist/usecases/ingest/pass5-govern.js.map +1 -1
- package/dist/usecases/ingest/pipeline.js +77 -23
- package/dist/usecases/ingest/pipeline.js.map +1 -1
- package/dist/usecases/ingest/serial-govern.d.ts +2 -1
- package/dist/usecases/ingest/serial-govern.js +16 -8
- package/dist/usecases/ingest/serial-govern.js.map +1 -1
- package/dist/usecases/ingest/status.d.ts +2 -2
- package/dist/usecases/ingest/status.js +1 -1
- package/dist/usecases/ingest/status.js.map +1 -1
- package/dist/usecases/ingest/video-pipeline.js +121 -29
- package/dist/usecases/ingest/video-pipeline.js.map +1 -1
- package/dist/usecases/ingest/view-command.d.ts +2 -2
- package/dist/usecases/ingest/view-command.js +7 -6
- package/dist/usecases/ingest/view-command.js.map +1 -1
- package/dist/usecases/ingest/view-server.d.ts +2 -2
- package/dist/usecases/ingest/view-server.js +9 -7
- package/dist/usecases/ingest/view-server.js.map +1 -1
- package/dist/usecases/script/actions.d.ts +2 -2
- package/dist/usecases/script/actions.js +106 -11
- package/dist/usecases/script/actions.js.map +1 -1
- package/dist/usecases/script/actor.d.ts +2 -2
- package/dist/usecases/script/actor.js +3 -4
- package/dist/usecases/script/actor.js.map +1 -1
- package/dist/usecases/script/actors.d.ts +2 -2
- package/dist/usecases/script/actors.js +18 -9
- package/dist/usecases/script/actors.js.map +1 -1
- package/dist/usecases/script/add-actor.d.ts +2 -2
- package/dist/usecases/script/add-episode.d.ts +2 -2
- package/dist/usecases/script/add-location.d.ts +2 -2
- package/dist/usecases/script/add-prop.d.ts +2 -2
- package/dist/usecases/script/alias.d.ts +2 -2
- package/dist/usecases/script/alias.js +13 -14
- package/dist/usecases/script/alias.js.map +1 -1
- package/dist/usecases/script/assets.d.ts +2 -2
- package/dist/usecases/script/assets.js +29 -5
- package/dist/usecases/script/assets.js.map +1 -1
- package/dist/usecases/script/audit-assets.d.ts +4 -0
- package/dist/usecases/script/audit-assets.js +37 -0
- package/dist/usecases/script/audit-assets.js.map +1 -0
- package/dist/usecases/script/command-constraints.d.ts +36 -0
- package/dist/usecases/script/command-constraints.js +114 -0
- package/dist/usecases/script/command-constraints.js.map +1 -0
- package/dist/usecases/script/context.d.ts +2 -2
- package/dist/usecases/script/context.js +34 -8
- package/dist/usecases/script/context.js.map +1 -1
- package/dist/usecases/script/create.d.ts +2 -2
- package/dist/usecases/script/create.js +5 -6
- package/dist/usecases/script/create.js.map +1 -1
- package/dist/usecases/script/delete.d.ts +2 -2
- package/dist/usecases/script/delete.js +15 -15
- package/dist/usecases/script/delete.js.map +1 -1
- package/dist/usecases/script/describe.d.ts +2 -2
- package/dist/usecases/script/describe.js +13 -12
- package/dist/usecases/script/describe.js.map +1 -1
- package/dist/usecases/script/dialogue.d.ts +2 -2
- package/dist/usecases/script/dialogue.js +18 -9
- package/dist/usecases/script/dialogue.js.map +1 -1
- package/dist/usecases/script/dispatch.d.ts +3 -0
- package/dist/usecases/script/dispatch.js +10 -0
- package/dist/usecases/script/dispatch.js.map +1 -0
- package/dist/usecases/script/do.d.ts +2 -2
- package/dist/usecases/script/do.js +105 -45
- package/dist/usecases/script/do.js.map +1 -1
- package/dist/usecases/script/emotion.d.ts +2 -2
- package/dist/usecases/script/emotion.js +14 -3
- package/dist/usecases/script/emotion.js.map +1 -1
- package/dist/usecases/script/episodes.d.ts +2 -2
- package/dist/usecases/script/episodes.js +19 -8
- package/dist/usecases/script/episodes.js.map +1 -1
- package/dist/usecases/script/export-authoring.d.ts +2 -2
- package/dist/usecases/script/export-authoring.js +47 -26
- package/dist/usecases/script/export-authoring.js.map +1 -1
- package/dist/usecases/script/extend.d.ts +2 -2
- package/dist/usecases/script/extend.js +43 -31
- package/dist/usecases/script/extend.js.map +1 -1
- package/dist/usecases/script/ids.d.ts +2 -2
- package/dist/usecases/script/ids.js +68 -21
- package/dist/usecases/script/ids.js.map +1 -1
- package/dist/usecases/script/importance.d.ts +2 -2
- package/dist/usecases/script/importance.js +3 -4
- package/dist/usecases/script/importance.js.map +1 -1
- package/dist/usecases/script/insert.d.ts +2 -2
- package/dist/usecases/script/insert.js +80 -46
- package/dist/usecases/script/insert.js.map +1 -1
- package/dist/usecases/script/issues.d.ts +2 -2
- package/dist/usecases/script/issues.js +10 -2
- package/dist/usecases/script/issues.js.map +1 -1
- package/dist/usecases/script/lib.d.ts +62 -7
- package/dist/usecases/script/lib.js +782 -184
- package/dist/usecases/script/lib.js.map +1 -1
- package/dist/usecases/script/locations.d.ts +2 -2
- package/dist/usecases/script/locations.js +18 -9
- package/dist/usecases/script/locations.js.map +1 -1
- package/dist/usecases/script/merge.d.ts +2 -2
- package/dist/usecases/script/merge.js +17 -17
- package/dist/usecases/script/merge.js.map +1 -1
- package/dist/usecases/script/move.d.ts +2 -2
- package/dist/usecases/script/move.js +30 -13
- package/dist/usecases/script/move.js.map +1 -1
- package/dist/usecases/script/parenthetical.d.ts +3 -0
- package/dist/usecases/script/parenthetical.js +52 -0
- package/dist/usecases/script/parenthetical.js.map +1 -0
- package/dist/usecases/script/props.d.ts +2 -2
- package/dist/usecases/script/props.js +18 -9
- package/dist/usecases/script/props.js.map +1 -1
- package/dist/usecases/script/refs.d.ts +2 -2
- package/dist/usecases/script/refs.js +61 -11
- package/dist/usecases/script/refs.js.map +1 -1
- package/dist/usecases/script/rename.d.ts +2 -2
- package/dist/usecases/script/rename.js +13 -12
- package/dist/usecases/script/rename.js.map +1 -1
- package/dist/usecases/script/replace.d.ts +2 -2
- package/dist/usecases/script/replace.js +6 -8
- package/dist/usecases/script/replace.js.map +1 -1
- package/dist/usecases/script/role.d.ts +2 -2
- package/dist/usecases/script/role.js +3 -4
- package/dist/usecases/script/role.js.map +1 -1
- package/dist/usecases/script/scenes.d.ts +2 -2
- package/dist/usecases/script/scenes.js +35 -7
- package/dist/usecases/script/scenes.js.map +1 -1
- package/dist/usecases/script/script-patch.d.ts +2 -2
- package/dist/usecases/script/script-patch.js +219 -72
- package/dist/usecases/script/script-patch.js.map +1 -1
- package/dist/usecases/script/script-validate.d.ts +2 -2
- package/dist/usecases/script/script-validate.js +11 -7
- package/dist/usecases/script/script-validate.js.map +1 -1
- package/dist/usecases/script/session.d.ts +3 -0
- package/dist/usecases/script/session.js +74 -65
- package/dist/usecases/script/session.js.map +1 -1
- package/dist/usecases/script/split.d.ts +2 -2
- package/dist/usecases/script/split.js +18 -14
- package/dist/usecases/script/split.js.map +1 -1
- package/dist/usecases/script/state-add.d.ts +2 -2
- package/dist/usecases/script/state-add.js +3 -4
- package/dist/usecases/script/state-add.js.map +1 -1
- package/dist/usecases/script/state-delete.d.ts +2 -2
- package/dist/usecases/script/state-delete.js +3 -4
- package/dist/usecases/script/state-delete.js.map +1 -1
- package/dist/usecases/script/state-rename.d.ts +2 -2
- package/dist/usecases/script/state-rename.js +3 -4
- package/dist/usecases/script/state-rename.js.map +1 -1
- package/dist/usecases/script/states.d.ts +2 -2
- package/dist/usecases/script/states.js +91 -20
- package/dist/usecases/script/states.js.map +1 -1
- package/dist/usecases/script/summary.d.ts +2 -2
- package/dist/usecases/script/summary.js +21 -2
- package/dist/usecases/script/summary.js.map +1 -1
- package/dist/usecases/script/synopsis-generate.d.ts +2 -2
- package/dist/usecases/script/synopsis-generate.js +38 -39
- package/dist/usecases/script/synopsis-generate.js.map +1 -1
- package/dist/usecases/script/synopsis.d.ts +2 -2
- package/dist/usecases/script/synopsis.js +20 -16
- package/dist/usecases/script/synopsis.js.map +1 -1
- package/dist/usecases/script/transition.d.ts +2 -2
- package/dist/usecases/script/transition.js +3 -4
- package/dist/usecases/script/transition.js.map +1 -1
- package/dist/usecases/script/type.d.ts +2 -2
- package/dist/usecases/script/type.js +3 -4
- package/dist/usecases/script/type.js.map +1 -1
- package/dist/usecases/script/v3/mutations.d.ts +2 -0
- package/dist/usecases/script/v3/mutations.js +5 -0
- package/dist/usecases/script/v3/mutations.js.map +1 -0
- package/dist/usecases/script/v4/mutations.d.ts +2 -0
- package/dist/usecases/script/v4/mutations.js +6 -0
- package/dist/usecases/script/v4/mutations.js.map +1 -0
- package/dist/usecases/script/v4/queries.d.ts +15 -0
- package/dist/usecases/script/v4/queries.js +191 -0
- package/dist/usecases/script/v4/queries.js.map +1 -0
- package/dist/usecases/script/working-copy.d.ts +4 -4
- package/dist/usecases/script/working-copy.js +98 -94
- package/dist/usecases/script/working-copy.js.map +1 -1
- package/dist/usecases/script/worldview.d.ts +2 -2
- package/dist/usecases/script/worldview.js +3 -4
- package/dist/usecases/script/worldview.js.map +1 -1
- package/dist/usecases/script/write-authoring.d.ts +2 -2
- package/dist/usecases/script/write-authoring.js +125 -50
- package/dist/usecases/script/write-authoring.js.map +1 -1
- package/dist/usecases/update.d.ts +2 -2
- package/dist/usecases/update.js +32 -47
- package/dist/usecases/update.js.map +1 -1
- package/package.json +3 -2
- package/skills/scriptctl/SKILL.md +128 -282
- package/skills/scriptctl/references/atomic-edit-workflow.md +23 -38
- package/skills/scriptctl/references/bulk-authoring.md +35 -154
- package/skills/scriptctl/references/ingest-workflow.md +12 -11
- package/skills/scriptctl/references/production-writing-standard.md +38 -67
- package/skills/scriptctl/references/state-reference-repair.md +19 -42
- package/dist/help-text.d.ts +0 -2
- package/dist/help-text.js +0 -1112
- package/dist/help-text.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lingjingai/scriptctl
|
|
2
2
|
|
|
3
|
-
剧本阶段统一 CLI:把 txt/md/docx 或视频素材转为结构化 Script v3
|
|
3
|
+
剧本阶段统一 CLI:把 txt/md/docx 或视频素材转为结构化 Script v4,同时继续原样读写和发布线上 Script v3;在本地工作副本上查询、校验、完整块批量写作或原子精修,并通过 revision CAS 发布。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
@@ -28,9 +28,11 @@ scriptctl update # 更新全局安装的 scriptctl
|
|
|
28
28
|
scriptctl changelog # 查看当前版本功能变更
|
|
29
29
|
scriptctl ingest --source-path <file|dir>
|
|
30
30
|
scriptctl checkout --script-path workspace/script.json
|
|
31
|
-
scriptctl
|
|
31
|
+
scriptctl actions --in '@ep:2/scn:1' --script-path workspace/script.json
|
|
32
|
+
scriptctl export episodes --in epA3kP9x..epQ7mN2v --output rewrite.scriptctl
|
|
32
33
|
scriptctl write rewrite.scriptctl --replace
|
|
33
34
|
scriptctl write rewrite.scriptctl --replace --apply --plan sha256:...
|
|
35
|
+
scriptctl audit-assets --script-path workspace/script.json # 全剧资产一致性审计(不自动修改)
|
|
34
36
|
scriptctl validate
|
|
35
37
|
scriptctl publish
|
|
36
38
|
```
|
|
@@ -38,6 +40,10 @@ scriptctl publish
|
|
|
38
40
|
详细子命令、参数与退出码以 `scriptctl <cmd> --help` 为准,agent 行为约定见
|
|
39
41
|
[`agent-sandbox-runtime` 中的 SKILL.md](https://gitcode.lingjingai.cn/algorithm/anime-agent/agent-sandbox-runtime/-/blob/main/templates/1_script/.claude/skills/scriptctl/SKILL.md)。
|
|
40
42
|
|
|
43
|
+
Script v4 的新节点使用类型前缀加 6 位 Bitcoin Base58 的 NanoID。查询可用
|
|
44
|
+
1-based `@` 序号定位,修改使用查询返回的正式 ID。已有 Script v3 按显式
|
|
45
|
+
`version: 3` 继续走原有查询、写入、authoring 和 publish 实现,不改写旧 ID。
|
|
46
|
+
|
|
41
47
|
## 退出码
|
|
42
48
|
|
|
43
49
|
| 码 | 含义 |
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# 0.50.0
|
|
2
|
+
|
|
3
|
+
## Added
|
|
4
|
+
- Script v4 adds typed NanoID identities (including `ac` for Actions), query-only 1-based ordinal anchors, ID/range selectors, version-dispatched validation, atomic edits, and canonical authoring round-trips.
|
|
5
|
+
- `scriptctl parenthetical` sets, preserves an explicit empty value, or removes speaking-action performance hints in Script v4.
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
- `scriptctl create` and text/video `ingest` now create Script v4; existing Script v3 files remain on the frozen v3 query, edit, validation, and publish path.
|
|
9
|
+
- Script v4 scene references store one reference per asset with a complete, sorted `state_ids` set; repeated `--state` flags replace that set.
|
|
10
|
+
- Script v4 selector edits, `do`, and JSON `patch` require the exact digest from their complete dry-run plan before applying.
|
|
11
|
+
- `scriptctl ids` generates Nano ID-based typed candidates and supports Action IDs without requiring an existing script.
|
|
12
|
+
- V4 authoring supports homogeneous multi-target create/replace batches, undirected inclusive spans, explicit Action IDs, complete scene state sets, and ordered non-overlapping replace plans.
|
|
13
|
+
- V4 `do` and JSON `patch` creation ops require explicit candidate IDs so dry-run and apply bind the same new nodes.
|
|
14
|
+
- V4 multi-target edit and authoring plans now report every step/target, exact typed targets, before/after counts, complete created/removed/retained identities, untouched identities or siblings, declarations, retained orphan assets, and validation; the digest binds the complete plan.
|
|
15
|
+
- V3 domain, patch, validation, and authoring implementations now live in dedicated version directories behind explicit top-level dispatch, while existing import paths remain thin compatibility facades.
|
|
16
|
+
- Ingest persists and prunes a source-to-v4 identity checkpoint so resumed runs retain live IDs without keeping deleted-ID tombstones.
|
|
17
|
+
|
|
18
|
+
## Fixed
|
|
19
|
+
- `publish` validates the script's declared v3 or v4 dialect instead of assuming v3.
|
|
20
|
+
- Version-sensitive command entrypoints now parse V4 bare IDs only after reading the target script version, while V3 keeps its existing compound addresses and behavior.
|
|
21
|
+
- Text and video ingest now report production warnings against the final Script v4 document, using `parenthetical` paths instead of intermediate V3 `emotion` paths.
|
|
22
|
+
- V4 authoring span export rejects out-of-order or overlapping regions instead of producing a file that cannot be replaced unchanged.
|
|
23
|
+
- V4 mutation plans derive typed targets from each operation's identity fields without treating content as IDs or omitting referenced scene assets and states.
|
|
24
|
+
- Ingest production validation accepts omitted, empty, and non-empty V4 `parenthetical` values.
|
|
25
|
+
- V4 `refs --level action` excludes scene-level asset references.
|
|
26
|
+
- V3 asset queries accept query-only ordinal anchors in `--in`.
|
|
27
|
+
- V4 authoring export rejects selections with no matching targets instead of writing an unreadable file.
|
|
28
|
+
- V4 asset queries with `--in '*'` include registered assets that are not yet referenced by a scene.
|
|
29
|
+
- V4 state deletion rejects the state being deleted as its own replacement, preventing dangling state references.
|
|
30
|
+
- V4 Action and scene insertion reject incompatible speaking or location-state fields instead of silently discarding them.
|
|
31
|
+
- V4 authoring treats property-order-only differences as no-op retries and reports retry declarations as existing.
|
|
32
|
+
- V4 authoring span batches resolve every range against the pre-edit document, so moving an ID between covered targets cannot redirect a later replacement.
|
|
33
|
+
- V4 authoring plans report each target's root and descendant identities, recursive before/after counts, and correct untouched siblings for creates.
|
|
34
|
+
- V3-to-V4 ingest conversion preserves typed V3 transition targets.
|
|
35
|
+
- V4 authoring span exports accept query-only ordinal anchors in every endpoint.
|
|
36
|
+
- Script v4 validation rejects legacy singular scene-reference states and duplicate state names within one asset.
|
|
37
|
+
- V4 `move --at` rejects numeric placement instead of silently appending; use `--before` or `--after`.
|
|
38
|
+
- V3 episode and Action query rows expose their current ordinal columns in default output.
|
|
39
|
+
- V4 scene merge preserves Action document order and rejects non-adjacent scenes that would reorder intervening narrative.
|
|
40
|
+
- V4 asset merge rejects referenced owner-local state IDs whose definitions differ between source and survivor.
|
|
41
|
+
- V3 `insert` rejects V4-only identity, state-set, and `parenthetical` flags instead of silently discarding them.
|
|
42
|
+
- Video ingest streaming publishes only validated V4 snapshots and checkpoints their identity map before exposing new IDs.
|
|
43
|
+
- Selector and single-point edits reject `--plan` outside V4 multi-target apply instead of silently ignoring it.
|
|
44
|
+
- Script v3 `do` and JSON `patch` reject `--plan` instead of applying while silently ignoring the supplied digest.
|
|
45
|
+
- Script v3 `move` rejects V4-only `--before` and `--after` placement flags instead of silently discarding them.
|
|
46
|
+
- `scriptctl do` rejects version- or target-incompatible `scene-ref`, `move`, and `insert` flags instead of silently discarding them.
|
|
47
|
+
- V4 `do` asset creation accepts the same `--id` flag as the corresponding atomic commands.
|
|
48
|
+
- V4 JSON `patch` rejects unknown, missing, or incorrectly typed operation fields and conflicting `--apply --dry-run` modes instead of silently coercing input or writing during an explicit dry-run.
|
|
49
|
+
- V4 JSON `patch` accepts one or multiple aliases consistently with atomic `alias` and `do` operations.
|
|
50
|
+
- V4 state and asset deletion rejects `--replacement` unless `--strategy replace` is selected.
|
|
51
|
+
- V4 asset merge preserves the removed asset's canonical name as an alias and ignores aliases equal to the survivor's canonical name.
|
|
52
|
+
- Script v4 validation rejects blank asset and state names.
|
|
53
|
+
- Resumed ingest keeps surviving Script v4 episode, scene, Action, and asset identities when earlier V3 nodes are merged or removed.
|
|
54
|
+
- V4 regex replacement requires `--all` for multiple matches and reports invalid patterns consistently.
|
|
55
|
+
- V4 speaking operations reject actor state IDs on non-actor speakers.
|
|
56
|
+
- V3 episode, scene, and Action queries remain usable on structurally inspectable documents with unrelated validation errors.
|
|
57
|
+
- V4 `actions --context` avoids quadratic scans on wide selections while preserving same-scene document-order expansion.
|
|
58
|
+
- V4 state deletion leaves the script unchanged when any affected scene would lose its complete state set.
|
|
59
|
+
- `actions --grep` applies global and sticky regular expressions independently to every Action.
|
|
60
|
+
|
|
61
|
+
## Breaking
|
|
62
|
+
- New scripts use short random typed IDs instead of numeric sequence IDs, and Script v4 writes accept stable IDs rather than ordinal or array-index addresses.
|
|
63
|
+
- Script v4 replaces speaking-action `emotion` with `parenthetical`; non-speaking ingest emotions are discarded.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 0.51.0
|
|
2
|
+
|
|
3
|
+
## Added
|
|
4
|
+
- `scriptctl audit-assets` performs a model-backed whole-script audit for duplicate actors, locations, props, equivalent visual states, and suspicious unused or singleton states without modifying the script.
|
|
5
|
+
- Text and video `scriptctl ingest` write `asset-audit.json` and include confirmed audit findings as non-blocking validation warnings.
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
- CLI help is generated from Commander command, argument, and option declarations. Commands now use standard `Usage`, `Commands`, `Arguments`, and `Options` sections.
|
|
9
|
+
- Added short options for frequent safe flags: `-h`, `-v`, `-j`, `-p`, `-w`, `-s`, `-o`, `-i`, `-g`, `-t`, `-a`, `-k`, and `-n`.
|
|
10
|
+
|
|
11
|
+
## Fixed
|
|
12
|
+
- Asset, state, and reference queries expose structured address rows, so `--format addr` returns their matched addresses.
|
|
13
|
+
- `-j` selects JSON error output when combined with another short option, without misreading option values, invalid clusters, or tokens after `--`.
|
|
14
|
+
- Text errors include the relevant received inputs and expected shape when diagnostic data is available.
|
|
15
|
+
- `scriptctl view --watch --json` emits its startup JSON while the server is running and keeps stdout as a single parseable document.
|
|
16
|
+
- `scriptctl update` includes package-manager exit and stderr diagnostics in default error output.
|
|
17
|
+
- `scriptctl ingest status --help` documents its workspace option, and ingest help identifies the generated Script version correctly.
|
|
18
|
+
- Edit command help identifies the supported address kinds and provides a valid `scene-ref` example.
|
|
19
|
+
- `scriptctl issues --json` preserves filtered validation issues as structured `issues`.
|
|
20
|
+
|
|
21
|
+
## Breaking
|
|
22
|
+
- Default text output is command-specific and concise; the shared `Required`, `Received`, `Result`, `Artifacts`, `Issues`, and `Next` report sections are removed.
|
|
23
|
+
- Text errors are written to stderr. JSON errors remain on stdout with `ok`, `exit_code`, `error_code`, `message`, optional `hint`, and typed diagnostic fields.
|
|
24
|
+
- JSON output no longer includes the presentation fields `title`, `result`, `artifacts`, `required`, `received`, or `next`. Commands expose structured business data directly; table queries use `rows` and `row_columns`, and dump commands use `content`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { commandDo } from "../usecases/script/do.js";
|
|
2
|
+
import { commandScriptPatch } from "../usecases/script/script-patch.js";
|
|
3
|
+
import { describeArguments, dispatch, withScriptOpts } from "./registry.js";
|
|
4
|
+
export function registerBatchCommands(program, state) {
|
|
5
|
+
const doCommand = withScriptOpts(program.command("do [file]"))
|
|
6
|
+
.description("Run one CLI edit per line as one transaction")
|
|
7
|
+
.option("--apply", "Apply the planned transaction")
|
|
8
|
+
.option("--plan <digest>", "Exact plan digest to apply")
|
|
9
|
+
.option("-n, --dry-run", "Preview the transaction without writing")
|
|
10
|
+
.addHelpText("after", "\nExample:\n scriptctl do edits.txt\n scriptctl do edits.txt --apply --plan <digest>\n")
|
|
11
|
+
.action(dispatch(commandDo, state));
|
|
12
|
+
describeArguments(doCommand, ["Command file, or stdin when omitted"]);
|
|
13
|
+
const patch = withScriptOpts(program.command("patch [file]"))
|
|
14
|
+
.description("Apply structured JSON patch operations")
|
|
15
|
+
.option("--schema [op]", "Show every operation schema or one named operation")
|
|
16
|
+
.option("-n, --dry-run", "Preview patch operations without writing")
|
|
17
|
+
.option("--apply", "Apply the exact planned patch")
|
|
18
|
+
.option("--plan <digest>", "Exact plan digest to apply")
|
|
19
|
+
.addHelpText("after", "\nExample:\n scriptctl patch --schema\n scriptctl patch changes.json --dry-run\n")
|
|
20
|
+
.action(dispatch((opts) => {
|
|
21
|
+
const args = opts["_args"] || [];
|
|
22
|
+
if (args[0])
|
|
23
|
+
opts["patch"] = args[0];
|
|
24
|
+
return commandScriptPatch(opts);
|
|
25
|
+
}, state));
|
|
26
|
+
describeArguments(patch, ["Patch JSON file"]);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=register-batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-batch.js","sourceRoot":"","sources":["../../src/cli/register-batch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAiB,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3F,MAAM,UAAU,qBAAqB,CAAC,OAAgB,EAAE,KAAe;IACrE,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;SAC3D,WAAW,CAAC,8CAA8C,CAAC;SAC3D,MAAM,CAAC,SAAS,EAAE,+BAA+B,CAAC;SAClD,MAAM,CAAC,iBAAiB,EAAE,4BAA4B,CAAC;SACvD,MAAM,CAAC,eAAe,EAAE,yCAAyC,CAAC;SAClE,WAAW,CAAC,OAAO,EAAE,0FAA0F,CAAC;SAChH,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IACtC,iBAAiB,CAAC,SAAS,EAAE,CAAC,qCAAqC,CAAC,CAAC,CAAC;IAEtE,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;SAC1D,WAAW,CAAC,wCAAwC,CAAC;SACrD,MAAM,CAAC,eAAe,EAAE,oDAAoD,CAAC;SAC7E,MAAM,CAAC,eAAe,EAAE,0CAA0C,CAAC;SACnE,MAAM,CAAC,SAAS,EAAE,+BAA+B,CAAC;SAClD,MAAM,CAAC,iBAAiB,EAAE,4BAA4B,CAAC;SACvD,WAAW,CAAC,OAAO,EAAE,oFAAoF,CAAC;SAC1G,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,MAAM,IAAI,GAAI,IAAI,CAAC,OAAO,CAAc,IAAI,EAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,CAAC,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACrC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IACb,iBAAiB,CAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { commandAddActor } from "../usecases/script/add-actor.js";
|
|
2
|
+
import { commandAddEpisode } from "../usecases/script/add-episode.js";
|
|
3
|
+
import { commandAddLocation } from "../usecases/script/add-location.js";
|
|
4
|
+
import { commandAddProp } from "../usecases/script/add-prop.js";
|
|
5
|
+
import { commandActor } from "../usecases/script/actor.js";
|
|
6
|
+
import { commandAlias } from "../usecases/script/alias.js";
|
|
7
|
+
import { commandContext } from "../usecases/script/context.js";
|
|
8
|
+
import { commandCreate } from "../usecases/script/create.js";
|
|
9
|
+
import { commandDelete } from "../usecases/script/delete.js";
|
|
10
|
+
import { commandDescribe } from "../usecases/script/describe.js";
|
|
11
|
+
import { commandDialogue } from "../usecases/script/dialogue.js";
|
|
12
|
+
import { commandEmotion } from "../usecases/script/emotion.js";
|
|
13
|
+
import { commandExtend } from "../usecases/script/extend.js";
|
|
14
|
+
import { commandImportance } from "../usecases/script/importance.js";
|
|
15
|
+
import { commandInsert } from "../usecases/script/insert.js";
|
|
16
|
+
import { commandMerge } from "../usecases/script/merge.js";
|
|
17
|
+
import { commandMove } from "../usecases/script/move.js";
|
|
18
|
+
import { commandParenthetical } from "../usecases/script/parenthetical.js";
|
|
19
|
+
import { commandRename } from "../usecases/script/rename.js";
|
|
20
|
+
import { commandReplace } from "../usecases/script/replace.js";
|
|
21
|
+
import { commandRole } from "../usecases/script/role.js";
|
|
22
|
+
import { commandSplit } from "../usecases/script/split.js";
|
|
23
|
+
import { commandStateAdd } from "../usecases/script/state-add.js";
|
|
24
|
+
import { commandStateDelete } from "../usecases/script/state-delete.js";
|
|
25
|
+
import { commandStateRename } from "../usecases/script/state-rename.js";
|
|
26
|
+
import { commandSynopsis } from "../usecases/script/synopsis.js";
|
|
27
|
+
import { commandSynopsisGenerate } from "../usecases/script/synopsis-generate.js";
|
|
28
|
+
import { commandTransition } from "../usecases/script/transition.js";
|
|
29
|
+
import { commandType } from "../usecases/script/type.js";
|
|
30
|
+
import { commandWorldview } from "../usecases/script/worldview.js";
|
|
31
|
+
import { appendString, describeArguments, dispatch, withScriptOpts, withSelection, } from "./registry.js";
|
|
32
|
+
export function registerEditCommands(program, state, llm) {
|
|
33
|
+
withScriptOpts(program.command("create"))
|
|
34
|
+
.description("Create an empty script")
|
|
35
|
+
.option("--title <title>", "Script title")
|
|
36
|
+
.option("--force", "Replace an existing script file")
|
|
37
|
+
.action(dispatch(commandCreate, state));
|
|
38
|
+
const addActor = withScriptOpts(program.command("add-actor <name>"))
|
|
39
|
+
.description("Add an actor")
|
|
40
|
+
.option("--id <id>", "Actor ID")
|
|
41
|
+
.option("--role <role>", "Actor role")
|
|
42
|
+
.option("--description <text>", "Actor description")
|
|
43
|
+
.option("--alias <alias>", "Actor alias; repeatable", appendString, [])
|
|
44
|
+
.action(dispatch(commandAddActor, state));
|
|
45
|
+
describeArguments(addActor, ["Actor name"]);
|
|
46
|
+
const addLocation = withScriptOpts(program.command("add-location <name>"))
|
|
47
|
+
.description("Add a location")
|
|
48
|
+
.option("--id <id>", "Location ID")
|
|
49
|
+
.option("--description <text>", "Location description")
|
|
50
|
+
.action(dispatch(commandAddLocation, state));
|
|
51
|
+
describeArguments(addLocation, ["Location name"]);
|
|
52
|
+
const addProp = withScriptOpts(program.command("add-prop <name>"))
|
|
53
|
+
.description("Add a prop")
|
|
54
|
+
.option("--id <id>", "Prop ID")
|
|
55
|
+
.option("--description <text>", "Prop description")
|
|
56
|
+
.action(dispatch(commandAddProp, state));
|
|
57
|
+
describeArguments(addProp, ["Prop name"]);
|
|
58
|
+
withScriptOpts(program.command("add-episode"))
|
|
59
|
+
.description("Append an episode")
|
|
60
|
+
.option("--id <id>", "Episode ID")
|
|
61
|
+
.option("--title <title>", "Episode title")
|
|
62
|
+
.action(dispatch(commandAddEpisode, state));
|
|
63
|
+
const replace = withSelection(withScriptOpts(program.command("replace [at]")))
|
|
64
|
+
.description("Replace action text at one address or across a selection")
|
|
65
|
+
.requiredOption("--from <text>", "Text or pattern to replace")
|
|
66
|
+
.option("--to <text>", "Replacement text", "")
|
|
67
|
+
.option("--all", "Replace every occurrence")
|
|
68
|
+
.option("--regex", "Treat --from as a regular expression")
|
|
69
|
+
.addHelpText("after", "\nExample:\n scriptctl replace --in ep_001 -g \"old\" --from old --to new\n")
|
|
70
|
+
.action(dispatch(commandReplace, state));
|
|
71
|
+
describeArguments(replace, ["Single action address"]);
|
|
72
|
+
const type = withSelection(withScriptOpts(program.command("type [at] [type]")))
|
|
73
|
+
.description("Set action type at one address or across a selection")
|
|
74
|
+
.action(dispatch(commandType, state));
|
|
75
|
+
describeArguments(type, ["Single action address", "New action type"]);
|
|
76
|
+
const actor = withSelection(withScriptOpts(program.command("actor [at] [actor-id]")))
|
|
77
|
+
.description("Set an action actor at one address or across a selection")
|
|
78
|
+
.action(dispatch(commandActor, state));
|
|
79
|
+
describeArguments(actor, ["Single action address", "Actor ID"]);
|
|
80
|
+
const emotion = withSelection(withScriptOpts(program.command("emotion [at] [emotion]")))
|
|
81
|
+
.description("Set or clear action emotion")
|
|
82
|
+
.option("--clear", "Clear the emotion")
|
|
83
|
+
.action(dispatch(commandEmotion, state));
|
|
84
|
+
describeArguments(emotion, ["Single action address", "Emotion value"]);
|
|
85
|
+
const parenthetical = withSelection(withScriptOpts(program.command("parenthetical [at]")))
|
|
86
|
+
.description("Set or remove a dialogue parenthetical")
|
|
87
|
+
.option("--set <text>", "Parenthetical text")
|
|
88
|
+
.option("--remove", "Remove the parenthetical")
|
|
89
|
+
.action(dispatch(commandParenthetical, state));
|
|
90
|
+
describeArguments(parenthetical, ["Single action address"]);
|
|
91
|
+
const insert = withScriptOpts(program.command("insert <addr>"))
|
|
92
|
+
.description("Insert an action into a scene or a scene into an episode")
|
|
93
|
+
.option("-t, --type <type>", "Action type")
|
|
94
|
+
.option("--content <text>", "Action content")
|
|
95
|
+
.option("--emotion <emotion>", "Dialogue emotion")
|
|
96
|
+
.option("--parenthetical <text>", "Dialogue parenthetical")
|
|
97
|
+
.option("--action-id <id>", "Action ID")
|
|
98
|
+
.option("--at <idx>", "Numeric insertion position")
|
|
99
|
+
.option("--before <addr>", "Insert before this sibling")
|
|
100
|
+
.option("--after <addr>", "Insert after this sibling")
|
|
101
|
+
.option("-a, --actor <id>", "Actor ID")
|
|
102
|
+
.option("--speaker-state <id>", "Actor state ID")
|
|
103
|
+
.option("-k, --kind <kind>", "Non-actor speaker kind")
|
|
104
|
+
.option("--label <text>", "Non-actor speaker label")
|
|
105
|
+
.option("--location <id>", "Scene location ID")
|
|
106
|
+
.option("--time <time>", "Scene time")
|
|
107
|
+
.option("--space <space>", "Scene space")
|
|
108
|
+
.option("--scene-id <id>", "Scene ID")
|
|
109
|
+
.option("--state <id>", "Asset state ID; repeatable", appendString, [])
|
|
110
|
+
.action(dispatch(commandInsert, state));
|
|
111
|
+
describeArguments(insert, ["Episode or scene address"]);
|
|
112
|
+
const deleteCommand = withScriptOpts(program.command("delete <addr>"))
|
|
113
|
+
.description("Delete an action, scene, asset, state, or speaker")
|
|
114
|
+
.option("--strategy <strategy>", "Reference handling strategy")
|
|
115
|
+
.option("--replacement <addr>", "Replacement address for references")
|
|
116
|
+
.option("--force", "Allow guarded destructive deletion")
|
|
117
|
+
.action(dispatch(commandDelete, state));
|
|
118
|
+
describeArguments(deleteCommand, ["Address to delete"]);
|
|
119
|
+
const move = withScriptOpts(program.command("move <addr> <to>"))
|
|
120
|
+
.description("Move an action across scenes or a scene across episodes")
|
|
121
|
+
.option("--at <idx>", "Numeric destination position")
|
|
122
|
+
.option("--before <id>", "Place before this sibling ID")
|
|
123
|
+
.option("--after <id>", "Place after this sibling ID")
|
|
124
|
+
.action(dispatch(commandMove, state));
|
|
125
|
+
describeArguments(move, ["Action or scene address", "Destination scene or episode address"]);
|
|
126
|
+
const split = withScriptOpts(program.command("split <ep/scn>"))
|
|
127
|
+
.description("Split a scene")
|
|
128
|
+
.requiredOption("--at <index-or-action-id>", "Split position")
|
|
129
|
+
.option("--new-scene-id <id>", "ID for the new scene")
|
|
130
|
+
.action(dispatch(commandSplit, state));
|
|
131
|
+
describeArguments(split, ["Scene address"]);
|
|
132
|
+
const merge = withScriptOpts(program.command("merge <src>"))
|
|
133
|
+
.description("Merge one asset or scene into another")
|
|
134
|
+
.requiredOption("--into <dst>", "Destination asset or scene address")
|
|
135
|
+
.action(dispatch(commandMerge, state));
|
|
136
|
+
describeArguments(merge, ["Source asset or scene address"]);
|
|
137
|
+
const transition = withSelection(withScriptOpts(program.command("transition [at] [target]")))
|
|
138
|
+
.description("Set or clear an action transition")
|
|
139
|
+
.option("--process <text>", "Transition process")
|
|
140
|
+
.option("--contrast <text>", "Transition contrast")
|
|
141
|
+
.option("--clear", "Clear the transition")
|
|
142
|
+
.action(dispatch(commandTransition, state));
|
|
143
|
+
describeArguments(transition, ["Single action address", "Transition target"]);
|
|
144
|
+
const sceneRef = withScriptOpts(program.command("scene-ref <at> <target>"))
|
|
145
|
+
.description("Set or remove an asset reference in a scene")
|
|
146
|
+
.option("--state <id>", "Target state ID; repeatable", appendString, [])
|
|
147
|
+
.option("--clear", "Clear the matching v3 reference state")
|
|
148
|
+
.option("--remove", "Remove the matching reference")
|
|
149
|
+
.option("--append", "Append instead of replacing")
|
|
150
|
+
.option("--occurrence <n>", "Target occurrence number")
|
|
151
|
+
.addHelpText("after", "\nExample:\n scriptctl scene-ref ep_001/scn_001 actor:act_001 --state st_calm\n")
|
|
152
|
+
.action(dispatch(commandContext, state));
|
|
153
|
+
describeArguments(sceneRef, ["Scene address", "Referenced asset address"]);
|
|
154
|
+
const rename = withScriptOpts(program.command("rename <target> <name>"))
|
|
155
|
+
.description("Rename an asset or state")
|
|
156
|
+
.action(dispatch(commandRename, state));
|
|
157
|
+
describeArguments(rename, ["Asset or state address", "New name"]);
|
|
158
|
+
const describe = withScriptOpts(program.command("describe <target> <text>"))
|
|
159
|
+
.description("Set an asset or state description")
|
|
160
|
+
.action(dispatch(commandDescribe, state));
|
|
161
|
+
describeArguments(describe, ["Asset or state address", "Description"]);
|
|
162
|
+
const alias = withScriptOpts(program.command("alias <target>"))
|
|
163
|
+
.description("Add or remove asset aliases")
|
|
164
|
+
.option("--add <alias>", "Alias to add; repeatable", appendString, [])
|
|
165
|
+
.option("--remove <alias>", "Alias to remove; repeatable", appendString, [])
|
|
166
|
+
.action(dispatch(commandAlias, state));
|
|
167
|
+
describeArguments(alias, ["Asset address"]);
|
|
168
|
+
for (const [name, description, handler, second] of [
|
|
169
|
+
["role", "Set an actor role", commandRole, "Role"],
|
|
170
|
+
["importance", "Set asset importance", commandImportance, "Importance"],
|
|
171
|
+
]) {
|
|
172
|
+
const command = withScriptOpts(program.command(`${name} <target> <value>`))
|
|
173
|
+
.description(description)
|
|
174
|
+
.action(dispatch(handler, state));
|
|
175
|
+
describeArguments(command, ["Asset address", second]);
|
|
176
|
+
}
|
|
177
|
+
const worldview = withScriptOpts(program.command("worldview <value>"))
|
|
178
|
+
.description("Set the script worldview")
|
|
179
|
+
.action(dispatch(commandWorldview, state));
|
|
180
|
+
describeArguments(worldview, ["Worldview value"]);
|
|
181
|
+
const synopsis = withScriptOpts(program.command("synopsis [target-or-text] [text]"))
|
|
182
|
+
.description("Set script or episode synopsis text")
|
|
183
|
+
.action(dispatch(commandSynopsis, state));
|
|
184
|
+
describeArguments(synopsis, ["Episode address or script synopsis", "Episode synopsis text"]);
|
|
185
|
+
withScriptOpts(synopsis.command("generate"))
|
|
186
|
+
.description("Generate synopsis fields with an LLM")
|
|
187
|
+
.option("--llm-config <path>", "LLM configuration file")
|
|
188
|
+
.option("--concurrency <n>", "Maximum concurrent model calls", "30")
|
|
189
|
+
.option("--checkpoint <dir>", "Checkpoint directory")
|
|
190
|
+
.option("--overwrite", "Regenerate existing synopsis fields")
|
|
191
|
+
.option("--apply", "Write generated fields")
|
|
192
|
+
.option("-n, --dry-run", "Generate a preview without writing")
|
|
193
|
+
.action(dispatch((options) => commandSynopsisGenerate(options, llm), state));
|
|
194
|
+
const extend = withScriptOpts(program.command("extend <addr> [key] [value]"))
|
|
195
|
+
.description("Read, set, or clear extension data")
|
|
196
|
+
.option("--json-value", "Parse the value as JSON")
|
|
197
|
+
.option("--clear", "Delete the key or extension container")
|
|
198
|
+
.action(dispatch(commandExtend, state));
|
|
199
|
+
describeArguments(extend, ["Target address", "Extension key", "Extension value"]);
|
|
200
|
+
const stateAdd = withScriptOpts(program.command("state-add <target> <name>"))
|
|
201
|
+
.description("Add an asset state")
|
|
202
|
+
.option("--description <text>", "State description", "")
|
|
203
|
+
.option("--state-id <id>", "State ID")
|
|
204
|
+
.action(dispatch(commandStateAdd, state));
|
|
205
|
+
describeArguments(stateAdd, ["Asset address", "State name"]);
|
|
206
|
+
const stateRename = withScriptOpts(program.command("state-rename <target> <name>"))
|
|
207
|
+
.description("Rename an asset state")
|
|
208
|
+
.action(dispatch(commandStateRename, state));
|
|
209
|
+
describeArguments(stateRename, ["State address", "New name"]);
|
|
210
|
+
const stateDelete = withScriptOpts(program.command("state-delete <target>"))
|
|
211
|
+
.description("Delete an asset state")
|
|
212
|
+
.requiredOption("--strategy <strategy>", "Reference handling strategy")
|
|
213
|
+
.option("--replacement <id>", "Replacement state ID")
|
|
214
|
+
.action(dispatch(commandStateDelete, state));
|
|
215
|
+
describeArguments(stateDelete, ["State address"]);
|
|
216
|
+
const dialogue = withScriptOpts(program.command("dialogue <at>"))
|
|
217
|
+
.description("Set the speaker for dialogue or inner thought")
|
|
218
|
+
.option("-a, --actor <id>", "Actor speaker ID")
|
|
219
|
+
.option("--state <id>", "Actor state ID")
|
|
220
|
+
.option("-k, --kind <kind>", "Non-actor speaker kind")
|
|
221
|
+
.option("--label <text>", "Non-actor speaker label")
|
|
222
|
+
.addHelpText("after", "\nExample:\n scriptctl dialogue ep_001/scn_001#3 --actor act_001\n")
|
|
223
|
+
.action(dispatch(commandDialogue, state));
|
|
224
|
+
describeArguments(dialogue, ["Dialogue action address"]);
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=register-edits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-edits.js","sourceRoot":"","sources":["../../src/cli/register-edits.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,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C,OAAO,CAAC,8BAA8B,CAAC,CAAC;SAChF,WAAW,CAAC,uBAAuB,CAAC;SACpC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC;IAC/C,iBAAiB,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;IAE9D,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;SACzE,WAAW,CAAC,uBAAuB,CAAC;SACpC,cAAc,CAAC,uBAAuB,EAAE,6BAA6B,CAAC;SACtE,MAAM,CAAC,oBAAoB,EAAE,sBAAsB,CAAC;SACpD,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC;IAC/C,iBAAiB,CAAC,WAAW,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAElD,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;SAC9D,WAAW,CAAC,+CAA+C,CAAC;SAC5D,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;SAC9C,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC;SACxC,MAAM,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;SACrD,MAAM,CAAC,gBAAgB,EAAE,yBAAyB,CAAC;SACnD,WAAW,CAAC,OAAO,EAAE,qEAAqE,CAAC;SAC3F,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;IAC5C,iBAAiB,CAAC,QAAQ,EAAE,CAAC,yBAAyB,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { commandActions } from "../usecases/script/actions.js";
|
|
2
|
+
import { commandActors } from "../usecases/script/actors.js";
|
|
3
|
+
import { commandAssets } from "../usecases/script/assets.js";
|
|
4
|
+
import { commandAuditAssets } from "../usecases/script/audit-assets.js";
|
|
5
|
+
import { commandEpisodes } from "../usecases/script/episodes.js";
|
|
6
|
+
import { commandIds } from "../usecases/script/ids.js";
|
|
7
|
+
import { commandIssues } from "../usecases/script/issues.js";
|
|
8
|
+
import { commandLocations } from "../usecases/script/locations.js";
|
|
9
|
+
import { commandProps } from "../usecases/script/props.js";
|
|
10
|
+
import { commandRefs } from "../usecases/script/refs.js";
|
|
11
|
+
import { commandScenes } from "../usecases/script/scenes.js";
|
|
12
|
+
import { commandScriptValidate } from "../usecases/script/script-validate.js";
|
|
13
|
+
import { commandStates } from "../usecases/script/states.js";
|
|
14
|
+
import { commandSummary } from "../usecases/script/summary.js";
|
|
15
|
+
import { describeArguments, dispatch, withScriptOpts } from "./registry.js";
|
|
16
|
+
export function registerQueryCommands(program, state, llm) {
|
|
17
|
+
withScriptOpts(program.command("summary"), "read")
|
|
18
|
+
.description("Show a compact script summary")
|
|
19
|
+
.action(dispatch(commandSummary, state));
|
|
20
|
+
withScriptOpts(program.command("episodes"), "read")
|
|
21
|
+
.description("List episodes")
|
|
22
|
+
.option("--id <id>", "Filter by episode ID")
|
|
23
|
+
.option("-i, --in <addr>", "Limit results to an address")
|
|
24
|
+
.option("--min-chars <n>", "Minimum episode character count")
|
|
25
|
+
.option("--max-chars <n>", "Maximum episode character count")
|
|
26
|
+
.action(dispatch(commandEpisodes, state));
|
|
27
|
+
withScriptOpts(program.command("scenes"), "read")
|
|
28
|
+
.description("List scenes")
|
|
29
|
+
.option("-i, --in <addr>", "Limit results to an address")
|
|
30
|
+
.option("--has-actor <id>", "Require an actor reference")
|
|
31
|
+
.option("--has-location <id>", "Require a location reference")
|
|
32
|
+
.option("--has-prop <id>", "Require a prop reference")
|
|
33
|
+
.action(dispatch(commandScenes, state));
|
|
34
|
+
withScriptOpts(program.command("actions"), "read")
|
|
35
|
+
.description("List actions")
|
|
36
|
+
.option("-i, --in <addr>", "Limit results to an address or range")
|
|
37
|
+
.option("-g, --grep <text>", "Match action text")
|
|
38
|
+
.option("-t, --type <type>", "Filter by action type")
|
|
39
|
+
.option("-a, --actor <id>", "Filter by actor ID")
|
|
40
|
+
.option("--has <kind>", "Require a populated action facet")
|
|
41
|
+
.option("--context <n>", "Include surrounding actions")
|
|
42
|
+
.addHelpText("after", "\nExample:\n scriptctl actions --in ep_001/scn_001 --grep \"door\"\n")
|
|
43
|
+
.action(dispatch(commandActions, state));
|
|
44
|
+
for (const [name, description, handler] of [
|
|
45
|
+
["actors", "List actors", commandActors],
|
|
46
|
+
["locations", "List locations", commandLocations],
|
|
47
|
+
["props", "List props", commandProps],
|
|
48
|
+
]) {
|
|
49
|
+
withScriptOpts(program.command(name), "read")
|
|
50
|
+
.description(description)
|
|
51
|
+
.option("--id <id>", `Filter ${name} by ID`)
|
|
52
|
+
.option("--name <text>", `Filter ${name} by name`)
|
|
53
|
+
.option("-i, --in <addr>", "Limit results to an address")
|
|
54
|
+
.option("--counts", "Include reference counts")
|
|
55
|
+
.action(dispatch(handler, state));
|
|
56
|
+
}
|
|
57
|
+
withScriptOpts(program.command("assets"), "read")
|
|
58
|
+
.description("List actors, locations, and props")
|
|
59
|
+
.option("-k, --kind <kind>", "Filter by asset kind")
|
|
60
|
+
.option("--id <id>", "Filter by asset ID")
|
|
61
|
+
.option("--name <text>", "Filter by asset name")
|
|
62
|
+
.option("-i, --in <addr>", "Limit results to an address")
|
|
63
|
+
.option("--counts", "Include reference counts")
|
|
64
|
+
.action(dispatch(commandAssets, state));
|
|
65
|
+
const states = withScriptOpts(program.command("states <asset-addr>"), "read")
|
|
66
|
+
.description("List states for an asset")
|
|
67
|
+
.action(dispatch(commandStates, state));
|
|
68
|
+
describeArguments(states, ["Actor, location, or prop address"]);
|
|
69
|
+
withScriptOpts(program.command("issues"), "read")
|
|
70
|
+
.description("List validation issues")
|
|
71
|
+
.option("--severity <severity>", "Filter by severity")
|
|
72
|
+
.option("--code <code>", "Filter by issue code")
|
|
73
|
+
.action(dispatch(commandIssues, state));
|
|
74
|
+
const refs = withScriptOpts(program.command("refs <addr>"), "read")
|
|
75
|
+
.description("List references to an address")
|
|
76
|
+
.option("--level <level>", "Reference detail level")
|
|
77
|
+
.action(dispatch(commandRefs, state));
|
|
78
|
+
describeArguments(refs, ["Address to inspect"]);
|
|
79
|
+
withScriptOpts(program.command("validate"), "read")
|
|
80
|
+
.description("Validate the script")
|
|
81
|
+
.action(dispatch(commandScriptValidate, state));
|
|
82
|
+
withScriptOpts(program.command("audit-assets"), "read")
|
|
83
|
+
.description("Audit asset consistency with an LLM")
|
|
84
|
+
.option("--llm-config <path>", "LLM configuration file")
|
|
85
|
+
.option("-o, --output <path>", "Audit JSON output file")
|
|
86
|
+
.action(dispatch((options) => commandAuditAssets(options, llm), state));
|
|
87
|
+
withScriptOpts(program.command("ids"), "read")
|
|
88
|
+
.description("Generate unreserved candidate IDs")
|
|
89
|
+
.requiredOption("-k, --kind <kind>", "ID kind")
|
|
90
|
+
.requiredOption("--count <n>", "Number of IDs")
|
|
91
|
+
.action(dispatch(commandIds, state));
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=register-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-query.js","sourceRoot":"","sources":["../../src/cli/register-query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,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AO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;SAChD,WAAW,CAAC,qBAAqB,CAAC;SAClC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC,CAAC;IAElD,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;SACpD,WAAW,CAAC,qCAAqC,CAAC;SAClD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC;SACvD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC;SACvD,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAE1E,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;SAC3C,WAAW,CAAC,mCAAmC,CAAC;SAChD,cAAc,CAAC,mBAAmB,EAAE,SAAS,CAAC;SAC9C,cAAc,CAAC,aAAa,EAAE,eAAe,CAAC;SAC9C,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { commandChangelog } from "../usecases/changelog.js";
|
|
2
|
+
import { commandDoctor } from "../usecases/doctor.js";
|
|
3
|
+
import { commandUpdate } from "../usecases/update.js";
|
|
4
|
+
import { describeArguments, dispatch } from "./registry.js";
|
|
5
|
+
export function registerToolCommands(program, state) {
|
|
6
|
+
program.command("doctor")
|
|
7
|
+
.description("Check configuration and runtime dependencies")
|
|
8
|
+
.option("--llm-config <path>", "LLM configuration file")
|
|
9
|
+
.action(dispatch(commandDoctor, state));
|
|
10
|
+
program.command("update")
|
|
11
|
+
.description("Update scriptctl to the latest release")
|
|
12
|
+
.option("-n, --dry-run", "Show the update without installing")
|
|
13
|
+
.option("--patch", "Allow a patch-level update")
|
|
14
|
+
.action(dispatch(commandUpdate, state));
|
|
15
|
+
const changelog = program.command("changelog [version]")
|
|
16
|
+
.description("Show release notes")
|
|
17
|
+
.option("--from <version>", "Start version")
|
|
18
|
+
.option("--to <version>", "End version")
|
|
19
|
+
.option("--unreleased", "Show unreleased changes")
|
|
20
|
+
.action(dispatch(commandChangelog, state));
|
|
21
|
+
describeArguments(changelog, ["Release version"]);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=register-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-tools.js","sourceRoot":"","sources":["../../src/cli/register-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAiB,MAAM,eAAe,CAAC;AAE3E,MAAM,UAAU,oBAAoB,CAAC,OAAgB,EAAE,KAAe;IACpE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;SACtB,WAAW,CAAC,8CAA8C,CAAC;SAC3D,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC;SACvD,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAE1C,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;SACtB,WAAW,CAAC,wCAAwC,CAAC;SACrD,MAAM,CAAC,eAAe,EAAE,oCAAoC,CAAC;SAC7D,MAAM,CAAC,SAAS,EAAE,4BAA4B,CAAC;SAC/C,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;SACrD,WAAW,CAAC,oBAAoB,CAAC;SACjC,MAAM,CAAC,kBAAkB,EAA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