@lingjingai/scriptctl 0.63.14 → 0.63.16
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 +12 -1
- package/changes/0.63.15.md +15 -0
- package/dist/bin.js +1 -20844
- package/dist/chunk-YOCQDDQC.js +823 -0
- package/dist/cli.d.ts +214 -5
- package/dist/cli.js +1 -187
- package/dist/review-agent.js +60 -3593
- package/package.json +17 -9
- package/skills/scriptctl/SKILL.md +2 -0
- package/skills/scriptctl/references/ingest-workflow.md +4 -0
- package/skills/scriptctl/references/production-writing-standard.md +10 -1
- package/skills/scriptctl/references/state-reference-repair.md +8 -0
- package/dist/bin.d.ts +0 -2
- package/dist/bin.js.map +0 -7
- package/dist/cli/register-authoring.d.ts +0 -4
- package/dist/cli/register-authoring.js +0 -35
- package/dist/cli/register-authoring.js.map +0 -1
- package/dist/cli/register-review.d.ts +0 -3
- package/dist/cli/register-review.js +0 -20
- package/dist/cli/register-review.js.map +0 -1
- package/dist/cli/register-script.d.ts +0 -3
- package/dist/cli/register-script.js +0 -297
- package/dist/cli/register-script.js.map +0 -1
- package/dist/cli/register-tools.d.ts +0 -3
- package/dist/cli/register-tools.js +0 -23
- package/dist/cli/register-tools.js.map +0 -1
- package/dist/cli/register-workflows.d.ts +0 -4
- package/dist/cli/register-workflows.js +0 -108
- package/dist/cli/register-workflows.js.map +0 -1
- package/dist/cli/registry.d.ts +0 -14
- package/dist/cli/registry.js +0 -65
- package/dist/cli/registry.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/common.d.ts +0 -93
- package/dist/common.js +0 -240
- package/dist/common.js.map +0 -1
- package/dist/domain/authoring/apply.d.ts +0 -1
- package/dist/domain/authoring/apply.js +0 -2
- package/dist/domain/authoring/apply.js.map +0 -1
- package/dist/domain/authoring/export.d.ts +0 -1
- package/dist/domain/authoring/export.js +0 -2
- package/dist/domain/authoring/export.js.map +0 -1
- package/dist/domain/authoring/parser.d.ts +0 -2
- package/dist/domain/authoring/parser.js +0 -3
- package/dist/domain/authoring/parser.js.map +0 -1
- package/dist/domain/authoring/serializer.d.ts +0 -1
- package/dist/domain/authoring/serializer.js +0 -2
- package/dist/domain/authoring/serializer.js.map +0 -1
- package/dist/domain/authoring/shared/bracket.d.ts +0 -4
- package/dist/domain/authoring/shared/bracket.js +0 -95
- package/dist/domain/authoring/shared/bracket.js.map +0 -1
- package/dist/domain/authoring/shared/types.d.ts +0 -12
- package/dist/domain/authoring/shared/types.js +0 -2
- package/dist/domain/authoring/shared/types.js.map +0 -1
- package/dist/domain/authoring/types.d.ts +0 -2
- package/dist/domain/authoring/types.js +0 -3
- package/dist/domain/authoring/types.js.map +0 -1
- package/dist/domain/authoring/v3/apply.d.ts +0 -33
- package/dist/domain/authoring/v3/apply.js +0 -784
- package/dist/domain/authoring/v3/apply.js.map +0 -1
- package/dist/domain/authoring/v3/export.d.ts +0 -7
- package/dist/domain/authoring/v3/export.js +0 -85
- package/dist/domain/authoring/v3/export.js.map +0 -1
- package/dist/domain/authoring/v3/parser.d.ts +0 -3
- package/dist/domain/authoring/v3/parser.js +0 -823
- package/dist/domain/authoring/v3/parser.js.map +0 -1
- package/dist/domain/authoring/v3/serializer.d.ts +0 -2
- package/dist/domain/authoring/v3/serializer.js +0 -244
- package/dist/domain/authoring/v3/serializer.js.map +0 -1
- package/dist/domain/authoring/v3/types.d.ts +0 -76
- package/dist/domain/authoring/v3/types.js +0 -2
- package/dist/domain/authoring/v3/types.js.map +0 -1
- package/dist/domain/authoring/v4/apply.d.ts +0 -40
- package/dist/domain/authoring/v4/apply.js +0 -451
- package/dist/domain/authoring/v4/apply.js.map +0 -1
- package/dist/domain/authoring/v4/parser.d.ts +0 -2
- package/dist/domain/authoring/v4/parser.js +0 -729
- package/dist/domain/authoring/v4/parser.js.map +0 -1
- package/dist/domain/authoring/v4/serializer.d.ts +0 -6
- package/dist/domain/authoring/v4/serializer.js +0 -280
- package/dist/domain/authoring/v4/serializer.js.map +0 -1
- package/dist/domain/authoring/v4/types.d.ts +0 -50
- package/dist/domain/authoring/v4/types.js +0 -2
- package/dist/domain/authoring/v4/types.js.map +0 -1
- package/dist/domain/creative-draft/compose.d.ts +0 -18
- package/dist/domain/creative-draft/compose.js +0 -448
- package/dist/domain/creative-draft/compose.js.map +0 -1
- package/dist/domain/ingest/apply-plan.d.ts +0 -23
- package/dist/domain/ingest/apply-plan.js +0 -210
- package/dist/domain/ingest/apply-plan.js.map +0 -1
- package/dist/domain/ingest/assembler.d.ts +0 -65
- package/dist/domain/ingest/assembler.js +0 -263
- package/dist/domain/ingest/assembler.js.map +0 -1
- package/dist/domain/ingest/asset-audit.d.ts +0 -50
- package/dist/domain/ingest/asset-audit.js +0 -196
- package/dist/domain/ingest/asset-audit.js.map +0 -1
- package/dist/domain/ingest/chunker.d.ts +0 -9
- package/dist/domain/ingest/chunker.js +0 -49
- package/dist/domain/ingest/chunker.js.map +0 -1
- package/dist/domain/ingest/environment.d.ts +0 -3
- package/dist/domain/ingest/environment.js +0 -32
- package/dist/domain/ingest/environment.js.map +0 -1
- package/dist/domain/ingest/evidence.d.ts +0 -5
- package/dist/domain/ingest/evidence.js +0 -66
- package/dist/domain/ingest/evidence.js.map +0 -1
- package/dist/domain/ingest/govern.d.ts +0 -3
- package/dist/domain/ingest/govern.js +0 -157
- package/dist/domain/ingest/govern.js.map +0 -1
- package/dist/domain/ingest/jsonl-parser.d.ts +0 -6
- package/dist/domain/ingest/jsonl-parser.js +0 -204
- package/dist/domain/ingest/jsonl-parser.js.map +0 -1
- package/dist/domain/ingest/markdown-parser.d.ts +0 -6
- package/dist/domain/ingest/markdown-parser.js +0 -187
- package/dist/domain/ingest/markdown-parser.js.map +0 -1
- package/dist/domain/ingest/production-validation.d.ts +0 -8
- package/dist/domain/ingest/production-validation.js +0 -37
- package/dist/domain/ingest/production-validation.js.map +0 -1
- package/dist/domain/ingest/records.d.ts +0 -72
- package/dist/domain/ingest/records.js +0 -10
- package/dist/domain/ingest/records.js.map +0 -1
- package/dist/domain/ingest/renumber.d.ts +0 -14
- package/dist/domain/ingest/renumber.js +0 -130
- package/dist/domain/ingest/renumber.js.map +0 -1
- package/dist/domain/ingest/serial-context.d.ts +0 -93
- package/dist/domain/ingest/serial-context.js +0 -355
- package/dist/domain/ingest/serial-context.js.map +0 -1
- package/dist/domain/ingest/state-identity.d.ts +0 -2
- package/dist/domain/ingest/state-identity.js +0 -3
- package/dist/domain/ingest/state-identity.js.map +0 -1
- package/dist/domain/ingest/state-reconcile.d.ts +0 -12
- package/dist/domain/ingest/state-reconcile.js +0 -92
- package/dist/domain/ingest/state-reconcile.js.map +0 -1
- package/dist/domain/ingest/validation.d.ts +0 -1
- package/dist/domain/ingest/validation.js +0 -2
- package/dist/domain/ingest/validation.js.map +0 -1
- package/dist/domain/ingest/video-apply.d.ts +0 -4
- package/dist/domain/ingest/video-apply.js +0 -128
- package/dist/domain/ingest/video-apply.js.map +0 -1
- package/dist/domain/ingest/video-context.d.ts +0 -64
- package/dist/domain/ingest/video-context.js +0 -480
- package/dist/domain/ingest/video-context.js.map +0 -1
- package/dist/domain/ingest/video-records.d.ts +0 -57
- package/dist/domain/ingest/video-records.js +0 -9
- package/dist/domain/ingest/video-records.js.map +0 -1
- package/dist/domain/ingest/video-serial-md.d.ts +0 -81
- package/dist/domain/ingest/video-serial-md.js +0 -297
- package/dist/domain/ingest/video-serial-md.js.map +0 -1
- package/dist/domain/ingest/video-source-evolution.d.ts +0 -25
- package/dist/domain/ingest/video-source-evolution.js +0 -40
- package/dist/domain/ingest/video-source-evolution.js.map +0 -1
- package/dist/domain/ingest/video-state-evidence.d.ts +0 -66
- package/dist/domain/ingest/video-state-evidence.js +0 -385
- package/dist/domain/ingest/video-state-evidence.js.map +0 -1
- package/dist/domain/ingest/video-timestamp.d.ts +0 -8
- package/dist/domain/ingest/video-timestamp.js +0 -26
- package/dist/domain/ingest/video-timestamp.js.map +0 -1
- package/dist/domain/loom/checkpointer.d.ts +0 -3
- package/dist/domain/loom/checkpointer.js +0 -30
- package/dist/domain/loom/checkpointer.js.map +0 -1
- package/dist/domain/loom/index.d.ts +0 -45
- package/dist/domain/loom/index.js +0 -277
- package/dist/domain/loom/index.js.map +0 -1
- package/dist/domain/loom/types.d.ts +0 -101
- package/dist/domain/loom/types.js +0 -2
- package/dist/domain/loom/types.js.map +0 -1
- package/dist/domain/script/address.d.ts +0 -1
- package/dist/domain/script/address.js +0 -2
- package/dist/domain/script/address.js.map +0 -1
- package/dist/domain/script/dispatch.d.ts +0 -18
- package/dist/domain/script/dispatch.js +0 -55
- package/dist/domain/script/dispatch.js.map +0 -1
- package/dist/domain/script/lookups.d.ts +0 -1
- package/dist/domain/script/lookups.js +0 -2
- package/dist/domain/script/lookups.js.map +0 -1
- package/dist/domain/script/migrations/registry.d.ts +0 -4
- package/dist/domain/script/migrations/registry.js +0 -76
- package/dist/domain/script/migrations/registry.js.map +0 -1
- package/dist/domain/script/migrations/types.d.ts +0 -17
- package/dist/domain/script/migrations/types.js +0 -2
- package/dist/domain/script/migrations/types.js.map +0 -1
- package/dist/domain/script/migrations/v3-to-v4.d.ts +0 -3
- package/dist/domain/script/migrations/v3-to-v4.js +0 -57
- package/dist/domain/script/migrations/v3-to-v4.js.map +0 -1
- package/dist/domain/script/names.d.ts +0 -1
- package/dist/domain/script/names.js +0 -2
- package/dist/domain/script/names.js.map +0 -1
- package/dist/domain/script/parse.d.ts +0 -1
- package/dist/domain/script/parse.js +0 -2
- package/dist/domain/script/parse.js.map +0 -1
- package/dist/domain/script/patch/apply.d.ts +0 -1
- package/dist/domain/script/patch/apply.js +0 -2
- package/dist/domain/script/patch/apply.js.map +0 -1
- package/dist/domain/script/patch/helpers.d.ts +0 -1
- package/dist/domain/script/patch/helpers.js +0 -2
- package/dist/domain/script/patch/helpers.js.map +0 -1
- package/dist/domain/script/patch/inline-speaker.d.ts +0 -1
- package/dist/domain/script/patch/inline-speaker.js +0 -2
- package/dist/domain/script/patch/inline-speaker.js.map +0 -1
- package/dist/domain/script/patch/ops-action.d.ts +0 -1
- package/dist/domain/script/patch/ops-action.js +0 -2
- package/dist/domain/script/patch/ops-action.js.map +0 -1
- package/dist/domain/script/patch/ops-asset.d.ts +0 -1
- package/dist/domain/script/patch/ops-asset.js +0 -2
- package/dist/domain/script/patch/ops-asset.js.map +0 -1
- package/dist/domain/script/patch/ops-dialogue.d.ts +0 -1
- package/dist/domain/script/patch/ops-dialogue.js +0 -2
- package/dist/domain/script/patch/ops-dialogue.js.map +0 -1
- package/dist/domain/script/patch/ops-extend.d.ts +0 -1
- package/dist/domain/script/patch/ops-extend.js +0 -2
- package/dist/domain/script/patch/ops-extend.js.map +0 -1
- package/dist/domain/script/patch/ops-meta.d.ts +0 -1
- package/dist/domain/script/patch/ops-meta.js +0 -2
- package/dist/domain/script/patch/ops-meta.js.map +0 -1
- package/dist/domain/script/patch/ops-scene.d.ts +0 -1
- package/dist/domain/script/patch/ops-scene.js +0 -2
- package/dist/domain/script/patch/ops-scene.js.map +0 -1
- package/dist/domain/script/patch/ops-state.d.ts +0 -1
- package/dist/domain/script/patch/ops-state.js +0 -2
- package/dist/domain/script/patch/ops-state.js.map +0 -1
- package/dist/domain/script/patch/registry.d.ts +0 -1
- package/dist/domain/script/patch/registry.js +0 -2
- package/dist/domain/script/patch/registry.js.map +0 -1
- package/dist/domain/script/patch/types.d.ts +0 -1
- package/dist/domain/script/patch/types.js +0 -2
- package/dist/domain/script/patch/types.js.map +0 -1
- package/dist/domain/script/refs.d.ts +0 -1
- package/dist/domain/script/refs.js +0 -2
- package/dist/domain/script/refs.js.map +0 -1
- package/dist/domain/script/scene-refs.d.ts +0 -1
- package/dist/domain/script/scene-refs.js +0 -2
- package/dist/domain/script/scene-refs.js.map +0 -1
- package/dist/domain/script/schema.d.ts +0 -1
- package/dist/domain/script/schema.js +0 -2
- package/dist/domain/script/schema.js.map +0 -1
- package/dist/domain/script/selector.d.ts +0 -1
- package/dist/domain/script/selector.js +0 -2
- package/dist/domain/script/selector.js.map +0 -1
- package/dist/domain/script/shared/regex.d.ts +0 -2
- package/dist/domain/script/shared/regex.js +0 -7
- package/dist/domain/script/shared/regex.js.map +0 -1
- package/dist/domain/script/shared/types.d.ts +0 -1
- package/dist/domain/script/shared/types.js +0 -5
- package/dist/domain/script/shared/types.js.map +0 -1
- package/dist/domain/script/shared/validation.d.ts +0 -1
- package/dist/domain/script/shared/validation.js +0 -3
- package/dist/domain/script/shared/validation.js.map +0 -1
- package/dist/domain/script/shared.d.ts +0 -15
- package/dist/domain/script/shared.js +0 -35
- package/dist/domain/script/shared.js.map +0 -1
- package/dist/domain/script/text-util.d.ts +0 -7
- package/dist/domain/script/text-util.js +0 -95
- package/dist/domain/script/text-util.js.map +0 -1
- package/dist/domain/script/timestamp.d.ts +0 -1
- package/dist/domain/script/timestamp.js +0 -3
- package/dist/domain/script/timestamp.js.map +0 -1
- package/dist/domain/script/types.d.ts +0 -1
- package/dist/domain/script/types.js +0 -2
- package/dist/domain/script/types.js.map +0 -1
- package/dist/domain/script/v3/address.d.ts +0 -32
- package/dist/domain/script/v3/address.js +0 -136
- package/dist/domain/script/v3/address.js.map +0 -1
- package/dist/domain/script/v3/lookups.d.ts +0 -33
- package/dist/domain/script/v3/lookups.js +0 -316
- package/dist/domain/script/v3/lookups.js.map +0 -1
- package/dist/domain/script/v3/ordinal.d.ts +0 -8
- package/dist/domain/script/v3/ordinal.js +0 -91
- package/dist/domain/script/v3/ordinal.js.map +0 -1
- package/dist/domain/script/v3/parse.d.ts +0 -3
- package/dist/domain/script/v3/parse.js +0 -164
- package/dist/domain/script/v3/parse.js.map +0 -1
- package/dist/domain/script/v3/patch/apply.d.ts +0 -2
- package/dist/domain/script/v3/patch/apply.js +0 -31
- package/dist/domain/script/v3/patch/apply.js.map +0 -1
- package/dist/domain/script/v3/patch/helpers.d.ts +0 -15
- package/dist/domain/script/v3/patch/helpers.js +0 -155
- package/dist/domain/script/v3/patch/helpers.js.map +0 -1
- package/dist/domain/script/v3/patch/inline-speaker.d.ts +0 -2
- package/dist/domain/script/v3/patch/inline-speaker.js +0 -50
- package/dist/domain/script/v3/patch/inline-speaker.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-action.d.ts +0 -12
- package/dist/domain/script/v3/patch/ops-action.js +0 -355
- package/dist/domain/script/v3/patch/ops-action.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-asset.d.ts +0 -14
- package/dist/domain/script/v3/patch/ops-asset.js +0 -347
- package/dist/domain/script/v3/patch/ops-asset.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-dialogue.d.ts +0 -2
- package/dist/domain/script/v3/patch/ops-dialogue.js +0 -21
- package/dist/domain/script/v3/patch/ops-dialogue.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-extend.d.ts +0 -8
- package/dist/domain/script/v3/patch/ops-extend.js +0 -122
- package/dist/domain/script/v3/patch/ops-extend.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-meta.d.ts +0 -5
- package/dist/domain/script/v3/patch/ops-meta.js +0 -82
- package/dist/domain/script/v3/patch/ops-meta.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-scene.d.ts +0 -6
- package/dist/domain/script/v3/patch/ops-scene.js +0 -351
- package/dist/domain/script/v3/patch/ops-scene.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-state.d.ts +0 -8
- package/dist/domain/script/v3/patch/ops-state.js +0 -155
- package/dist/domain/script/v3/patch/ops-state.js.map +0 -1
- package/dist/domain/script/v3/patch/ops-timestamp.d.ts +0 -6
- package/dist/domain/script/v3/patch/ops-timestamp.js +0 -47
- package/dist/domain/script/v3/patch/ops-timestamp.js.map +0 -1
- package/dist/domain/script/v3/patch/registry.d.ts +0 -2
- package/dist/domain/script/v3/patch/registry.js +0 -56
- package/dist/domain/script/v3/patch/registry.js.map +0 -1
- package/dist/domain/script/v3/patch/types.d.ts +0 -10
- package/dist/domain/script/v3/patch/types.js +0 -2
- package/dist/domain/script/v3/patch/types.js.map +0 -1
- package/dist/domain/script/v3/refs.d.ts +0 -4
- package/dist/domain/script/v3/refs.js +0 -64
- package/dist/domain/script/v3/refs.js.map +0 -1
- package/dist/domain/script/v3/scene-refs.d.ts +0 -3
- package/dist/domain/script/v3/scene-refs.js +0 -35
- package/dist/domain/script/v3/scene-refs.js.map +0 -1
- package/dist/domain/script/v3/schema.d.ts +0 -6
- package/dist/domain/script/v3/schema.js +0 -58
- package/dist/domain/script/v3/schema.js.map +0 -1
- package/dist/domain/script/v3/selector.d.ts +0 -44
- package/dist/domain/script/v3/selector.js +0 -178
- package/dist/domain/script/v3/selector.js.map +0 -1
- package/dist/domain/script/v3/types.d.ts +0 -106
- package/dist/domain/script/v3/types.js +0 -2
- package/dist/domain/script/v3/types.js.map +0 -1
- package/dist/domain/script/v3/validation.d.ts +0 -2
- package/dist/domain/script/v3/validation.js +0 -2
- package/dist/domain/script/v3/validation.js.map +0 -1
- package/dist/domain/script/v4/address.d.ts +0 -61
- package/dist/domain/script/v4/address.js +0 -99
- package/dist/domain/script/v4/address.js.map +0 -1
- package/dist/domain/script/v4/factory.d.ts +0 -2
- package/dist/domain/script/v4/factory.js +0 -13
- package/dist/domain/script/v4/factory.js.map +0 -1
- package/dist/domain/script/v4/from-v3.d.ts +0 -29
- package/dist/domain/script/v4/from-v3.js +0 -307
- package/dist/domain/script/v4/from-v3.js.map +0 -1
- package/dist/domain/script/v4/ids.d.ts +0 -5
- package/dist/domain/script/v4/ids.js +0 -41
- package/dist/domain/script/v4/ids.js.map +0 -1
- package/dist/domain/script/v4/ordinal.d.ts +0 -3
- package/dist/domain/script/v4/ordinal.js +0 -66
- package/dist/domain/script/v4/ordinal.js.map +0 -1
- package/dist/domain/script/v4/parse.d.ts +0 -5
- package/dist/domain/script/v4/parse.js +0 -196
- package/dist/domain/script/v4/parse.js.map +0 -1
- package/dist/domain/script/v4/patch/apply.d.ts +0 -3
- package/dist/domain/script/v4/patch/apply.js +0 -24
- package/dist/domain/script/v4/patch/apply.js.map +0 -1
- package/dist/domain/script/v4/patch/helpers.d.ts +0 -32
- package/dist/domain/script/v4/patch/helpers.js +0 -138
- package/dist/domain/script/v4/patch/helpers.js.map +0 -1
- package/dist/domain/script/v4/patch/ops-action.d.ts +0 -13
- package/dist/domain/script/v4/patch/ops-action.js +0 -351
- package/dist/domain/script/v4/patch/ops-action.js.map +0 -1
- package/dist/domain/script/v4/patch/ops-asset.d.ts +0 -17
- package/dist/domain/script/v4/patch/ops-asset.js +0 -556
- package/dist/domain/script/v4/patch/ops-asset.js.map +0 -1
- package/dist/domain/script/v4/patch/ops-extend.d.ts +0 -11
- package/dist/domain/script/v4/patch/ops-extend.js +0 -103
- package/dist/domain/script/v4/patch/ops-extend.js.map +0 -1
- package/dist/domain/script/v4/patch/ops-meta.d.ts +0 -5
- package/dist/domain/script/v4/patch/ops-meta.js +0 -49
- package/dist/domain/script/v4/patch/ops-meta.js.map +0 -1
- package/dist/domain/script/v4/patch/ops-scene-ref.d.ts +0 -3
- package/dist/domain/script/v4/patch/ops-scene-ref.js +0 -74
- package/dist/domain/script/v4/patch/ops-scene-ref.js.map +0 -1
- package/dist/domain/script/v4/patch/ops-structure.d.ts +0 -6
- package/dist/domain/script/v4/patch/ops-structure.js +0 -236
- package/dist/domain/script/v4/patch/ops-structure.js.map +0 -1
- package/dist/domain/script/v4/patch/ops-timestamp.d.ts +0 -6
- package/dist/domain/script/v4/patch/ops-timestamp.js +0 -40
- package/dist/domain/script/v4/patch/ops-timestamp.js.map +0 -1
- package/dist/domain/script/v4/patch/registry.d.ts +0 -2
- package/dist/domain/script/v4/patch/registry.js +0 -53
- package/dist/domain/script/v4/patch/registry.js.map +0 -1
- package/dist/domain/script/v4/patch/schema.d.ts +0 -7
- package/dist/domain/script/v4/patch/schema.js +0 -77
- package/dist/domain/script/v4/patch/schema.js.map +0 -1
- package/dist/domain/script/v4/patch/types.d.ts +0 -10
- package/dist/domain/script/v4/patch/types.js +0 -2
- package/dist/domain/script/v4/patch/types.js.map +0 -1
- package/dist/domain/script/v4/selector.d.ts +0 -11
- package/dist/domain/script/v4/selector.js +0 -124
- package/dist/domain/script/v4/selector.js.map +0 -1
- package/dist/domain/script/v4/types.d.ts +0 -120
- package/dist/domain/script/v4/types.js +0 -2
- package/dist/domain/script/v4/types.js.map +0 -1
- package/dist/domain/script/v4/validation.d.ts +0 -2
- package/dist/domain/script/v4/validation.js +0 -2
- package/dist/domain/script/v4/validation.js.map +0 -1
- package/dist/failures.d.ts +0 -58
- package/dist/failures.js +0 -96
- package/dist/failures.js.map +0 -1
- package/dist/infra/converters.d.ts +0 -9
- package/dist/infra/converters.js +0 -689
- package/dist/infra/converters.js.map +0 -1
- package/dist/infra/env.d.ts +0 -2
- package/dist/infra/env.js +0 -81
- package/dist/infra/env.js.map +0 -1
- package/dist/infra/episode-title.d.ts +0 -4
- package/dist/infra/episode-title.js +0 -129
- package/dist/infra/episode-title.js.map +0 -1
- package/dist/infra/ingest/review-renderer.d.ts +0 -1
- package/dist/infra/ingest/review-renderer.js +0 -440
- package/dist/infra/ingest/review-renderer.js.map +0 -1
- package/dist/infra/ingest/source-resolver.d.ts +0 -21
- package/dist/infra/ingest/source-resolver.js +0 -51
- package/dist/infra/ingest/source-resolver.js.map +0 -1
- package/dist/infra/ingest/text-reader.d.ts +0 -3
- package/dist/infra/ingest/text-reader.js +0 -27
- package/dist/infra/ingest/text-reader.js.map +0 -1
- package/dist/infra/ingest/video-discovery.d.ts +0 -8
- package/dist/infra/ingest/video-discovery.js +0 -69
- package/dist/infra/ingest/video-discovery.js.map +0 -1
- package/dist/infra/ingest/video-source-snapshot.d.ts +0 -4
- package/dist/infra/ingest/video-source-snapshot.js +0 -47
- package/dist/infra/ingest/video-source-snapshot.js.map +0 -1
- package/dist/infra/ingest/video-state-evidence.d.ts +0 -14
- package/dist/infra/ingest/video-state-evidence.js +0 -140
- package/dist/infra/ingest/video-state-evidence.js.map +0 -1
- package/dist/infra/ingest/video-transcode.d.ts +0 -7
- package/dist/infra/ingest/video-transcode.js +0 -98
- package/dist/infra/ingest/video-transcode.js.map +0 -1
- package/dist/infra/ingest/workspace-lock.d.ts +0 -1
- package/dist/infra/ingest/workspace-lock.js +0 -32
- package/dist/infra/ingest/workspace-lock.js.map +0 -1
- package/dist/infra/ingest/workspace-store.d.ts +0 -18
- package/dist/infra/ingest/workspace-store.js +0 -70
- package/dist/infra/ingest/workspace-store.js.map +0 -1
- package/dist/infra/llm/anthropic-model.d.ts +0 -11
- package/dist/infra/llm/anthropic-model.js +0 -130
- package/dist/infra/llm/anthropic-model.js.map +0 -1
- package/dist/infra/llm/doubao-model.d.ts +0 -60
- package/dist/infra/llm/doubao-model.js +0 -249
- package/dist/infra/llm/doubao-model.js.map +0 -1
- package/dist/infra/llm/failure-mapping.d.ts +0 -6
- package/dist/infra/llm/failure-mapping.js +0 -146
- package/dist/infra/llm/failure-mapping.js.map +0 -1
- package/dist/infra/llm/gemini-upload.d.ts +0 -13
- package/dist/infra/llm/gemini-upload.js +0 -138
- package/dist/infra/llm/gemini-upload.js.map +0 -1
- package/dist/infra/llm/gemini-video-model.d.ts +0 -50
- package/dist/infra/llm/gemini-video-model.js +0 -371
- package/dist/infra/llm/gemini-video-model.js.map +0 -1
- package/dist/infra/llm/openai-compatible-model.d.ts +0 -14
- package/dist/infra/llm/openai-compatible-model.js +0 -207
- package/dist/infra/llm/openai-compatible-model.js.map +0 -1
- package/dist/infra/llm/retry.d.ts +0 -8
- package/dist/infra/llm/retry.js +0 -41
- package/dist/infra/llm/retry.js.map +0 -1
- package/dist/infra/local-script-output-store.d.ts +0 -43
- package/dist/infra/local-script-output-store.js +0 -168
- package/dist/infra/local-script-output-store.js.map +0 -1
- package/dist/infra/script-output-api.d.ts +0 -50
- package/dist/infra/script-output-api.js +0 -251
- package/dist/infra/script-output-api.js.map +0 -1
- package/dist/infra/script-output-store.d.ts +0 -152
- package/dist/infra/script-output-store.js +0 -114
- package/dist/infra/script-output-store.js.map +0 -1
- package/dist/infra/script-working-copy.d.ts +0 -23
- package/dist/infra/script-working-copy.js +0 -157
- package/dist/infra/script-working-copy.js.map +0 -1
- package/dist/infra/storage.d.ts +0 -35
- package/dist/infra/storage.js +0 -91
- package/dist/infra/storage.js.map +0 -1
- package/dist/llm/composition.d.ts +0 -5
- package/dist/llm/composition.js +0 -5
- package/dist/llm/composition.js.map +0 -1
- package/dist/llm/config.d.ts +0 -28
- package/dist/llm/config.js +0 -231
- package/dist/llm/config.js.map +0 -1
- package/dist/llm/registry.d.ts +0 -43
- package/dist/llm/registry.js +0 -69
- package/dist/llm/registry.js.map +0 -1
- package/dist/llm/router.d.ts +0 -46
- package/dist/llm/router.js +0 -512
- package/dist/llm/router.js.map +0 -1
- package/dist/llm/tasks/ingest/arc-summary.d.ts +0 -8
- package/dist/llm/tasks/ingest/arc-summary.js +0 -26
- package/dist/llm/tasks/ingest/arc-summary.js.map +0 -1
- package/dist/llm/tasks/ingest/asset-audit.d.ts +0 -6
- package/dist/llm/tasks/ingest/asset-audit.js +0 -158
- package/dist/llm/tasks/ingest/asset-audit.js.map +0 -1
- package/dist/llm/tasks/ingest/asset-curate.d.ts +0 -13
- package/dist/llm/tasks/ingest/asset-curate.js +0 -45
- package/dist/llm/tasks/ingest/asset-curate.js.map +0 -1
- package/dist/llm/tasks/ingest/asset-extract.d.ts +0 -12
- package/dist/llm/tasks/ingest/asset-extract.js +0 -51
- package/dist/llm/tasks/ingest/asset-extract.js.map +0 -1
- package/dist/llm/tasks/ingest/asset-govern.d.ts +0 -22
- package/dist/llm/tasks/ingest/asset-govern.js +0 -143
- package/dist/llm/tasks/ingest/asset-govern.js.map +0 -1
- package/dist/llm/tasks/ingest/body-start.d.ts +0 -10
- package/dist/llm/tasks/ingest/body-start.js +0 -41
- package/dist/llm/tasks/ingest/body-start.js.map +0 -1
- package/dist/llm/tasks/ingest/episode-assets.d.ts +0 -29
- package/dist/llm/tasks/ingest/episode-assets.js +0 -282
- package/dist/llm/tasks/ingest/episode-assets.js.map +0 -1
- package/dist/llm/tasks/ingest/mention-resolve.d.ts +0 -9
- package/dist/llm/tasks/ingest/mention-resolve.js +0 -39
- package/dist/llm/tasks/ingest/mention-resolve.js.map +0 -1
- package/dist/llm/tasks/ingest/name-fix.d.ts +0 -9
- package/dist/llm/tasks/ingest/name-fix.js +0 -56
- package/dist/llm/tasks/ingest/name-fix.js.map +0 -1
- package/dist/llm/tasks/ingest/state-reconcile.d.ts +0 -8
- package/dist/llm/tasks/ingest/state-reconcile.js +0 -44
- package/dist/llm/tasks/ingest/state-reconcile.js.map +0 -1
- package/dist/llm/tasks/ingest/text-normalize.d.ts +0 -10
- package/dist/llm/tasks/ingest/text-normalize.js +0 -122
- package/dist/llm/tasks/ingest/text-normalize.js.map +0 -1
- package/dist/llm/tasks/ingest/video-serial.d.ts +0 -24
- package/dist/llm/tasks/ingest/video-serial.js +0 -416
- package/dist/llm/tasks/ingest/video-serial.js.map +0 -1
- package/dist/llm/tasks/schemas.d.ts +0 -9
- package/dist/llm/tasks/schemas.js +0 -466
- package/dist/llm/tasks/schemas.js.map +0 -1
- package/dist/llm/types.d.ts +0 -178
- package/dist/llm/types.js +0 -44
- package/dist/llm/types.js.map +0 -1
- package/dist/output.d.ts +0 -3
- package/dist/output.js +0 -94
- package/dist/output.js.map +0 -1
- package/dist/package-root.d.ts +0 -2
- package/dist/package-root.js +0 -38
- package/dist/package-root.js.map +0 -1
- package/dist/review-agent.js.map +0 -7
- package/dist/usecases/changelog.d.ts +0 -9
- package/dist/usecases/changelog.js +0 -134
- package/dist/usecases/changelog.js.map +0 -1
- package/dist/usecases/doctor.d.ts +0 -2
- package/dist/usecases/doctor.js +0 -231
- package/dist/usecases/doctor.js.map +0 -1
- package/dist/usecases/ingest/body-start.d.ts +0 -8
- package/dist/usecases/ingest/body-start.js +0 -36
- package/dist/usecases/ingest/body-start.js.map +0 -1
- package/dist/usecases/ingest/command.d.ts +0 -5
- package/dist/usecases/ingest/command.js +0 -183
- package/dist/usecases/ingest/command.js.map +0 -1
- package/dist/usecases/ingest/failure.d.ts +0 -26
- package/dist/usecases/ingest/failure.js +0 -153
- package/dist/usecases/ingest/failure.js.map +0 -1
- package/dist/usecases/ingest/fanout.d.ts +0 -10
- package/dist/usecases/ingest/fanout.js +0 -23
- package/dist/usecases/ingest/fanout.js.map +0 -1
- package/dist/usecases/ingest/final-asset-audit.d.ts +0 -39
- package/dist/usecases/ingest/final-asset-audit.js +0 -88
- package/dist/usecases/ingest/final-asset-audit.js.map +0 -1
- package/dist/usecases/ingest/generate-video-state-evidence.d.ts +0 -23
- package/dist/usecases/ingest/generate-video-state-evidence.js +0 -124
- package/dist/usecases/ingest/generate-video-state-evidence.js.map +0 -1
- package/dist/usecases/ingest/pass4-mention-resolve.d.ts +0 -11
- package/dist/usecases/ingest/pass4-mention-resolve.js +0 -52
- package/dist/usecases/ingest/pass4-mention-resolve.js.map +0 -1
- package/dist/usecases/ingest/pass5-extract.d.ts +0 -7
- package/dist/usecases/ingest/pass5-extract.js +0 -51
- package/dist/usecases/ingest/pass5-extract.js.map +0 -1
- package/dist/usecases/ingest/pass5-govern.d.ts +0 -13
- package/dist/usecases/ingest/pass5-govern.js +0 -157
- package/dist/usecases/ingest/pass5-govern.js.map +0 -1
- package/dist/usecases/ingest/pipeline.d.ts +0 -28
- package/dist/usecases/ingest/pipeline.js +0 -335
- package/dist/usecases/ingest/pipeline.js.map +0 -1
- package/dist/usecases/ingest/publish-command.d.ts +0 -1
- package/dist/usecases/ingest/publish-command.js +0 -4
- package/dist/usecases/ingest/publish-command.js.map +0 -1
- package/dist/usecases/ingest/serial-govern.d.ts +0 -40
- package/dist/usecases/ingest/serial-govern.js +0 -488
- package/dist/usecases/ingest/serial-govern.js.map +0 -1
- package/dist/usecases/ingest/skip-video-episode.d.ts +0 -4
- package/dist/usecases/ingest/skip-video-episode.js +0 -120
- package/dist/usecases/ingest/skip-video-episode.js.map +0 -1
- package/dist/usecases/ingest/status.d.ts +0 -61
- package/dist/usecases/ingest/status.js +0 -347
- package/dist/usecases/ingest/status.js.map +0 -1
- package/dist/usecases/ingest/timings.d.ts +0 -51
- package/dist/usecases/ingest/timings.js +0 -68
- package/dist/usecases/ingest/timings.js.map +0 -1
- package/dist/usecases/ingest/usage-report.d.ts +0 -125
- package/dist/usecases/ingest/usage-report.js +0 -248
- package/dist/usecases/ingest/usage-report.js.map +0 -1
- package/dist/usecases/ingest/video-pipeline.d.ts +0 -81
- package/dist/usecases/ingest/video-pipeline.js +0 -548
- package/dist/usecases/ingest/video-pipeline.js.map +0 -1
- package/dist/usecases/ingest/video-skip-state.d.ts +0 -29
- package/dist/usecases/ingest/video-skip-state.js +0 -148
- package/dist/usecases/ingest/video-skip-state.js.map +0 -1
- package/dist/usecases/ingest/view-command.d.ts +0 -4
- package/dist/usecases/ingest/view-command.js +0 -67
- package/dist/usecases/ingest/view-command.js.map +0 -1
- package/dist/usecases/ingest/view-server.d.ts +0 -29
- package/dist/usecases/ingest/view-server.js +0 -364
- package/dist/usecases/ingest/view-server.js.map +0 -1
- package/dist/usecases/script/action-span.d.ts +0 -10
- package/dist/usecases/script/action-span.js +0 -42
- package/dist/usecases/script/action-span.js.map +0 -1
- package/dist/usecases/script/actions.d.ts +0 -3
- package/dist/usecases/script/actions.js +0 -184
- package/dist/usecases/script/actions.js.map +0 -1
- package/dist/usecases/script/actor.d.ts +0 -3
- package/dist/usecases/script/actor.js +0 -26
- package/dist/usecases/script/actor.js.map +0 -1
- package/dist/usecases/script/actors.d.ts +0 -3
- package/dist/usecases/script/actors.js +0 -25
- package/dist/usecases/script/actors.js.map +0 -1
- package/dist/usecases/script/add-actor.d.ts +0 -3
- package/dist/usecases/script/add-actor.js +0 -13
- package/dist/usecases/script/add-actor.js.map +0 -1
- package/dist/usecases/script/add-episode.d.ts +0 -3
- package/dist/usecases/script/add-episode.js +0 -9
- package/dist/usecases/script/add-episode.js.map +0 -1
- package/dist/usecases/script/add-location.d.ts +0 -3
- package/dist/usecases/script/add-location.js +0 -11
- package/dist/usecases/script/add-location.js.map +0 -1
- package/dist/usecases/script/add-prop.d.ts +0 -3
- package/dist/usecases/script/add-prop.js +0 -11
- package/dist/usecases/script/add-prop.js.map +0 -1
- package/dist/usecases/script/alias.d.ts +0 -3
- package/dist/usecases/script/alias.js +0 -39
- package/dist/usecases/script/alias.js.map +0 -1
- package/dist/usecases/script/assets.d.ts +0 -3
- package/dist/usecases/script/assets.js +0 -46
- package/dist/usecases/script/assets.js.map +0 -1
- package/dist/usecases/script/audit-assets.d.ts +0 -4
- package/dist/usecases/script/audit-assets.js +0 -37
- package/dist/usecases/script/audit-assets.js.map +0 -1
- package/dist/usecases/script/command-constraints.d.ts +0 -38
- package/dist/usecases/script/command-constraints.js +0 -143
- package/dist/usecases/script/command-constraints.js.map +0 -1
- package/dist/usecases/script/compose-creative-draft.d.ts +0 -3
- package/dist/usecases/script/compose-creative-draft.js +0 -106
- package/dist/usecases/script/compose-creative-draft.js.map +0 -1
- package/dist/usecases/script/context.d.ts +0 -3
- package/dist/usecases/script/context.js +0 -52
- package/dist/usecases/script/context.js.map +0 -1
- package/dist/usecases/script/create.d.ts +0 -3
- package/dist/usecases/script/create.js +0 -27
- package/dist/usecases/script/create.js.map +0 -1
- package/dist/usecases/script/delete.d.ts +0 -3
- package/dist/usecases/script/delete.js +0 -88
- package/dist/usecases/script/delete.js.map +0 -1
- package/dist/usecases/script/describe.d.ts +0 -3
- package/dist/usecases/script/describe.js +0 -32
- package/dist/usecases/script/describe.js.map +0 -1
- package/dist/usecases/script/dialogue.d.ts +0 -3
- package/dist/usecases/script/dialogue.js +0 -30
- package/dist/usecases/script/dialogue.js.map +0 -1
- package/dist/usecases/script/dispatch.d.ts +0 -3
- package/dist/usecases/script/dispatch.js +0 -10
- package/dist/usecases/script/dispatch.js.map +0 -1
- package/dist/usecases/script/do.d.ts +0 -3
- package/dist/usecases/script/do.js +0 -186
- package/dist/usecases/script/do.js.map +0 -1
- package/dist/usecases/script/emotion.d.ts +0 -3
- package/dist/usecases/script/emotion.js +0 -24
- package/dist/usecases/script/emotion.js.map +0 -1
- package/dist/usecases/script/episodes.d.ts +0 -3
- package/dist/usecases/script/episodes.js +0 -62
- package/dist/usecases/script/episodes.js.map +0 -1
- package/dist/usecases/script/export-authoring.d.ts +0 -4
- package/dist/usecases/script/export-authoring.js +0 -326
- package/dist/usecases/script/export-authoring.js.map +0 -1
- package/dist/usecases/script/extend.d.ts +0 -3
- package/dist/usecases/script/extend.js +0 -94
- package/dist/usecases/script/extend.js.map +0 -1
- package/dist/usecases/script/ids.d.ts +0 -3
- package/dist/usecases/script/ids.js +0 -148
- package/dist/usecases/script/ids.js.map +0 -1
- package/dist/usecases/script/importance.d.ts +0 -3
- package/dist/usecases/script/importance.js +0 -16
- package/dist/usecases/script/importance.js.map +0 -1
- package/dist/usecases/script/insert.d.ts +0 -3
- package/dist/usecases/script/insert.js +0 -127
- package/dist/usecases/script/insert.js.map +0 -1
- package/dist/usecases/script/issues.d.ts +0 -3
- package/dist/usecases/script/issues.js +0 -35
- package/dist/usecases/script/issues.js.map +0 -1
- package/dist/usecases/script/lib.d.ts +0 -152
- package/dist/usecases/script/lib.js +0 -1654
- package/dist/usecases/script/lib.js.map +0 -1
- package/dist/usecases/script/locations.d.ts +0 -3
- package/dist/usecases/script/locations.js +0 -25
- package/dist/usecases/script/locations.js.map +0 -1
- package/dist/usecases/script/merge.d.ts +0 -3
- package/dist/usecases/script/merge.js +0 -43
- package/dist/usecases/script/merge.js.map +0 -1
- package/dist/usecases/script/migrate.d.ts +0 -3
- package/dist/usecases/script/migrate.js +0 -210
- package/dist/usecases/script/migrate.js.map +0 -1
- package/dist/usecases/script/move.d.ts +0 -3
- package/dist/usecases/script/move.js +0 -50
- package/dist/usecases/script/move.js.map +0 -1
- package/dist/usecases/script/parenthetical.d.ts +0 -3
- package/dist/usecases/script/parenthetical.js +0 -52
- package/dist/usecases/script/parenthetical.js.map +0 -1
- package/dist/usecases/script/props.d.ts +0 -3
- package/dist/usecases/script/props.js +0 -25
- package/dist/usecases/script/props.js.map +0 -1
- package/dist/usecases/script/refs.d.ts +0 -3
- package/dist/usecases/script/refs.js +0 -111
- package/dist/usecases/script/refs.js.map +0 -1
- package/dist/usecases/script/rename.d.ts +0 -3
- package/dist/usecases/script/rename.js +0 -35
- package/dist/usecases/script/rename.js.map +0 -1
- package/dist/usecases/script/replace.d.ts +0 -3
- package/dist/usecases/script/replace.js +0 -33
- package/dist/usecases/script/replace.js.map +0 -1
- package/dist/usecases/script/review.d.ts +0 -3
- package/dist/usecases/script/review.js +0 -187
- package/dist/usecases/script/review.js.map +0 -1
- package/dist/usecases/script/role.d.ts +0 -3
- package/dist/usecases/script/role.js +0 -16
- package/dist/usecases/script/role.js.map +0 -1
- package/dist/usecases/script/scenes.d.ts +0 -3
- package/dist/usecases/script/scenes.js +0 -66
- package/dist/usecases/script/scenes.js.map +0 -1
- package/dist/usecases/script/script-patch.d.ts +0 -3
- package/dist/usecases/script/script-patch.js +0 -321
- package/dist/usecases/script/script-patch.js.map +0 -1
- package/dist/usecases/script/script-validate.d.ts +0 -3
- package/dist/usecases/script/script-validate.js +0 -27
- package/dist/usecases/script/script-validate.js.map +0 -1
- package/dist/usecases/script/session.d.ts +0 -62
- package/dist/usecases/script/session.js +0 -567
- package/dist/usecases/script/session.js.map +0 -1
- package/dist/usecases/script/split.d.ts +0 -3
- package/dist/usecases/script/split.js +0 -41
- package/dist/usecases/script/split.js.map +0 -1
- package/dist/usecases/script/state-add.d.ts +0 -3
- package/dist/usecases/script/state-add.js +0 -22
- package/dist/usecases/script/state-add.js.map +0 -1
- package/dist/usecases/script/state-delete.d.ts +0 -3
- package/dist/usecases/script/state-delete.js +0 -22
- package/dist/usecases/script/state-delete.js.map +0 -1
- package/dist/usecases/script/state-rename.d.ts +0 -3
- package/dist/usecases/script/state-rename.js +0 -16
- package/dist/usecases/script/state-rename.js.map +0 -1
- package/dist/usecases/script/states.d.ts +0 -3
- package/dist/usecases/script/states.js +0 -197
- package/dist/usecases/script/states.js.map +0 -1
- package/dist/usecases/script/summary.d.ts +0 -3
- package/dist/usecases/script/summary.js +0 -72
- package/dist/usecases/script/summary.js.map +0 -1
- package/dist/usecases/script/synopsis-generate.d.ts +0 -115
- package/dist/usecases/script/synopsis-generate.js +0 -776
- package/dist/usecases/script/synopsis-generate.js.map +0 -1
- package/dist/usecases/script/synopsis.d.ts +0 -3
- package/dist/usecases/script/synopsis.js +0 -45
- package/dist/usecases/script/synopsis.js.map +0 -1
- package/dist/usecases/script/timestamp-filter.d.ts +0 -4
- package/dist/usecases/script/timestamp-filter.js +0 -55
- package/dist/usecases/script/timestamp-filter.js.map +0 -1
- package/dist/usecases/script/timestamp.d.ts +0 -3
- package/dist/usecases/script/timestamp.js +0 -11
- package/dist/usecases/script/timestamp.js.map +0 -1
- package/dist/usecases/script/transition.d.ts +0 -3
- package/dist/usecases/script/transition.js +0 -23
- package/dist/usecases/script/transition.js.map +0 -1
- package/dist/usecases/script/type.d.ts +0 -3
- package/dist/usecases/script/type.js +0 -23
- package/dist/usecases/script/type.js.map +0 -1
- package/dist/usecases/script/v3/mutations.d.ts +0 -2
- package/dist/usecases/script/v3/mutations.js +0 -5
- package/dist/usecases/script/v3/mutations.js.map +0 -1
- package/dist/usecases/script/v4/mutations.d.ts +0 -2
- package/dist/usecases/script/v4/mutations.js +0 -6
- package/dist/usecases/script/v4/mutations.js.map +0 -1
- package/dist/usecases/script/v4/queries.d.ts +0 -15
- package/dist/usecases/script/v4/queries.js +0 -196
- package/dist/usecases/script/v4/queries.js.map +0 -1
- package/dist/usecases/script/working-copy.d.ts +0 -5
- package/dist/usecases/script/working-copy.js +0 -399
- package/dist/usecases/script/working-copy.js.map +0 -1
- package/dist/usecases/script/worldview.d.ts +0 -3
- package/dist/usecases/script/worldview.js +0 -17
- package/dist/usecases/script/worldview.js.map +0 -1
- package/dist/usecases/script/write-authoring.d.ts +0 -3
- package/dist/usecases/script/write-authoring.js +0 -263
- package/dist/usecases/script/write-authoring.js.map +0 -1
- package/dist/usecases/update.d.ts +0 -13
- package/dist/usecases/update.js +0 -128
- package/dist/usecases/update.js.map +0 -1
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import { sha256Text } from "../../common.js";
|
|
2
|
-
import { noopCheckpointer, } from "./checkpointer.js";
|
|
3
|
-
export { fileCheckpointer, noopCheckpointer, } from "./checkpointer.js";
|
|
4
|
-
function stableStringify(value) {
|
|
5
|
-
if (Array.isArray(value))
|
|
6
|
-
return `[${value.map((v) => stableStringify(v)).join(",")}]`;
|
|
7
|
-
if (value && typeof value === "object") {
|
|
8
|
-
const obj = value;
|
|
9
|
-
return `{${Object.keys(obj).sort().map((k) => `${JSON.stringify(k)}:${stableStringify(obj[k])}`).join(",")}}`;
|
|
10
|
-
}
|
|
11
|
-
return JSON.stringify(value);
|
|
12
|
-
}
|
|
13
|
-
function signature(value) {
|
|
14
|
-
return sha256Text(stableStringify(value));
|
|
15
|
-
}
|
|
16
|
-
function checkpointRecord(key, sig, value) {
|
|
17
|
-
return {
|
|
18
|
-
key,
|
|
19
|
-
signature: sig,
|
|
20
|
-
value,
|
|
21
|
-
createdAt: new Date().toISOString(),
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function joinPrompt(instruction, format) {
|
|
25
|
-
return [instruction.trim(), format.trim()].filter(Boolean).join("\n\n");
|
|
26
|
-
}
|
|
27
|
-
function renderLlmRequest(task, parcelValue) {
|
|
28
|
-
return {
|
|
29
|
-
system: joinPrompt(task.instruction, task.format),
|
|
30
|
-
user: task.input ? task.input({ parcel: parcelValue }) : String(parcelValue),
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function extractCheckpointPayload(task, parcelValue, runtime) {
|
|
34
|
-
if (task.kind === "llm") {
|
|
35
|
-
if (!runtime.executor)
|
|
36
|
-
throw new Error("loom llm task requires run({ executor })");
|
|
37
|
-
const request = renderLlmRequest(task, parcelValue);
|
|
38
|
-
const route = runtime.executor.route(task.taskId);
|
|
39
|
-
return {
|
|
40
|
-
request,
|
|
41
|
-
payload: {
|
|
42
|
-
step: "extract",
|
|
43
|
-
kind: "llm",
|
|
44
|
-
taskId: task.taskId,
|
|
45
|
-
version: task.version ?? "",
|
|
46
|
-
routeFingerprint: route.fingerprint,
|
|
47
|
-
system: request.system,
|
|
48
|
-
user: request.user,
|
|
49
|
-
salt: runtime.checkpointSalt,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
payload: {
|
|
55
|
-
step: "extract",
|
|
56
|
-
kind: "fn",
|
|
57
|
-
version: task.version ?? "",
|
|
58
|
-
parcel: parcelValue,
|
|
59
|
-
salt: runtime.checkpointSalt,
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export function root(children) {
|
|
64
|
-
return { kind: "root", children };
|
|
65
|
-
}
|
|
66
|
-
export function group(scope, children, data) {
|
|
67
|
-
return { kind: "scope", scope, data, children };
|
|
68
|
-
}
|
|
69
|
-
export function parcel(data) {
|
|
70
|
-
return { kind: "parcel", data };
|
|
71
|
-
}
|
|
72
|
-
export function llm(opts) {
|
|
73
|
-
return { kind: "llm", ...opts };
|
|
74
|
-
}
|
|
75
|
-
export function fn(opts) {
|
|
76
|
-
return { kind: "fn", ...opts };
|
|
77
|
-
}
|
|
78
|
-
export class LoomJob {
|
|
79
|
-
input;
|
|
80
|
-
steps;
|
|
81
|
-
constructor(input, steps = []) {
|
|
82
|
-
this.input = input;
|
|
83
|
-
this.steps = steps;
|
|
84
|
-
}
|
|
85
|
-
split(spec) {
|
|
86
|
-
return new LoomJob(this.input, [...this.steps, { kind: "split", spec: spec }]);
|
|
87
|
-
}
|
|
88
|
-
extract(task) {
|
|
89
|
-
return new LoomJob(this.input, [...this.steps, { kind: "extract", task: task }]);
|
|
90
|
-
}
|
|
91
|
-
reduce(scope, task) {
|
|
92
|
-
const normalized = typeof task === "function" ? { run: task } : task;
|
|
93
|
-
return new LoomJob(this.input, [
|
|
94
|
-
...this.steps,
|
|
95
|
-
{ kind: "reduce", scope, task: normalized },
|
|
96
|
-
]);
|
|
97
|
-
}
|
|
98
|
-
plan() {
|
|
99
|
-
return { input: this.input, steps: [...this.steps] };
|
|
100
|
-
}
|
|
101
|
-
async run(opts = {}) {
|
|
102
|
-
const result = await executePlan(this.input, this.steps, opts);
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
export function loom(input) {
|
|
107
|
-
return new LoomJob(input);
|
|
108
|
-
}
|
|
109
|
-
async function mapWithConcurrency(items, concurrency, worker) {
|
|
110
|
-
if (items.length === 0)
|
|
111
|
-
return [];
|
|
112
|
-
const out = new Array(items.length);
|
|
113
|
-
let cursor = 0;
|
|
114
|
-
const limit = Math.max(1, Math.min(concurrency, items.length));
|
|
115
|
-
await Promise.all(Array.from({ length: limit }, async () => {
|
|
116
|
-
while (true) {
|
|
117
|
-
const idx = cursor++;
|
|
118
|
-
if (idx >= items.length)
|
|
119
|
-
break;
|
|
120
|
-
out[idx] = await worker(items[idx], idx);
|
|
121
|
-
}
|
|
122
|
-
}));
|
|
123
|
-
return out;
|
|
124
|
-
}
|
|
125
|
-
function splitTree(input, spec) {
|
|
126
|
-
const scopes = spec.partition(input);
|
|
127
|
-
return root(scopes.map((scopeData) => {
|
|
128
|
-
const chunks = spec.chunk(scopeData).map((chunk) => parcel(chunk));
|
|
129
|
-
return group(spec.scope, chunks, scopeData);
|
|
130
|
-
}));
|
|
131
|
-
}
|
|
132
|
-
function flattenParcels(node, path = []) {
|
|
133
|
-
if (node.kind === "parcel")
|
|
134
|
-
return [{ parcel: node.data, path }];
|
|
135
|
-
const children = node.kind === "root" ? node.children : node.children;
|
|
136
|
-
const out = [];
|
|
137
|
-
for (let i = 0; i < children.length; i++) {
|
|
138
|
-
const child = children[i];
|
|
139
|
-
const childPath = child.kind === "scope"
|
|
140
|
-
? [...path, `${child.scope}:${i}`]
|
|
141
|
-
: [...path, `parcel:${i}`];
|
|
142
|
-
out.push(...flattenParcels(child, childPath));
|
|
143
|
-
}
|
|
144
|
-
return out;
|
|
145
|
-
}
|
|
146
|
-
function validateOutput(validate, output) {
|
|
147
|
-
validate?.(output);
|
|
148
|
-
return output;
|
|
149
|
-
}
|
|
150
|
-
async function runFnExtractTask(task, parcelValue) {
|
|
151
|
-
return validateOutput(task.validate, await task.run({ parcel: parcelValue }));
|
|
152
|
-
}
|
|
153
|
-
async function runLlmModel(task, request, runtime) {
|
|
154
|
-
if (!runtime.executor)
|
|
155
|
-
throw new Error("loom llm task requires run({ executor })");
|
|
156
|
-
return runtime.executor.generateText(task.taskId, { system: request.system, user: request.user, signal: runtime.signal });
|
|
157
|
-
}
|
|
158
|
-
function parseLlmResponse(task, parcelValue, response) {
|
|
159
|
-
return validateOutput(task.validate, task.parse({ text: response.text, parcel: parcelValue, raw: response.raw }));
|
|
160
|
-
}
|
|
161
|
-
function replaceParcels(node, values, cursor) {
|
|
162
|
-
if (node.kind === "parcel") {
|
|
163
|
-
const value = values[cursor.index];
|
|
164
|
-
cursor.index += 1;
|
|
165
|
-
return parcel(value);
|
|
166
|
-
}
|
|
167
|
-
const children = node.children.map((child) => replaceParcels(child, values, cursor));
|
|
168
|
-
if (node.kind === "root")
|
|
169
|
-
return root(children);
|
|
170
|
-
return group(node.scope, children, node.data);
|
|
171
|
-
}
|
|
172
|
-
function allChildrenParcels(node) {
|
|
173
|
-
return node.children.every((child) => child.kind === "parcel");
|
|
174
|
-
}
|
|
175
|
-
async function reduceScopeNode(node, scope, task, runtime, path) {
|
|
176
|
-
if (node.kind === "parcel")
|
|
177
|
-
return node;
|
|
178
|
-
const reducedChildren = [];
|
|
179
|
-
for (let i = 0; i < node.children.length; i++) {
|
|
180
|
-
const child = node.children[i];
|
|
181
|
-
reducedChildren.push(await reduceScopeNode(child, scope, task, runtime, [...path, `${child.kind}:${i}`]));
|
|
182
|
-
}
|
|
183
|
-
const rebuilt = node.kind === "root" ? root(reducedChildren) : group(node.scope, reducedChildren, node.data);
|
|
184
|
-
const isTargetRoot = scope === "root" && rebuilt.kind === "root";
|
|
185
|
-
const isTargetScope = rebuilt.kind === "scope" && rebuilt.scope === scope;
|
|
186
|
-
if (!isTargetRoot && !isTargetScope)
|
|
187
|
-
return rebuilt;
|
|
188
|
-
if (!allChildrenParcels(rebuilt))
|
|
189
|
-
return rebuilt;
|
|
190
|
-
const items = rebuilt.children.map((child) => child.data);
|
|
191
|
-
const scopeData = rebuilt.kind === "scope" ? rebuilt.data : null;
|
|
192
|
-
const scopeName = rebuilt.kind === "scope" ? rebuilt.scope : "root";
|
|
193
|
-
const version = task.version ?? "";
|
|
194
|
-
const key = `reduce:${scope}:${path.join("/")}:${signature({ items, scopeData, version, salt: runtime.checkpointSalt })}`;
|
|
195
|
-
const sig = signature({ step: "reduce", scope, version, items, scopeData, salt: runtime.checkpointSalt });
|
|
196
|
-
const cached = await readCheckpoint(runtime.checkpoint, key, sig);
|
|
197
|
-
if (cached.hit) {
|
|
198
|
-
runtime.report.reused += 1;
|
|
199
|
-
return parcel(validateOutput(task.validate, cached.value));
|
|
200
|
-
}
|
|
201
|
-
const out = validateOutput(task.validate, await task.run(items, { scope: scopeData, scopeName }));
|
|
202
|
-
runtime.report.ran += 1;
|
|
203
|
-
await runtime.checkpoint.write(checkpointRecord(key, sig, out));
|
|
204
|
-
return parcel(out);
|
|
205
|
-
}
|
|
206
|
-
async function readCheckpoint(checkpoint, key, sig) {
|
|
207
|
-
const record = await checkpoint.read(key);
|
|
208
|
-
if (record && record.signature === sig)
|
|
209
|
-
return { hit: true, value: record.value };
|
|
210
|
-
return { hit: false };
|
|
211
|
-
}
|
|
212
|
-
async function executePlan(input, steps, opts) {
|
|
213
|
-
const runtime = {
|
|
214
|
-
executor: opts.executor,
|
|
215
|
-
signal: opts.signal,
|
|
216
|
-
checkpointSalt: opts.checkpointSalt,
|
|
217
|
-
checkpoint: opts.checkpoint ?? noopCheckpointer(),
|
|
218
|
-
concurrency: opts.concurrency ?? 4,
|
|
219
|
-
report: { reused: 0, ran: 0 },
|
|
220
|
-
};
|
|
221
|
-
let tree = null;
|
|
222
|
-
let currentInput = input;
|
|
223
|
-
for (const step of steps) {
|
|
224
|
-
if (step.kind === "split") {
|
|
225
|
-
tree = splitTree(currentInput, step.spec);
|
|
226
|
-
currentInput = tree;
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
if (!tree) {
|
|
230
|
-
tree = root([parcel(currentInput)]);
|
|
231
|
-
}
|
|
232
|
-
if (step.kind === "extract") {
|
|
233
|
-
const leaves = flattenParcels(tree);
|
|
234
|
-
const values = await mapWithConcurrency(leaves, runtime.concurrency, async (leaf) => {
|
|
235
|
-
const checkpoint = extractCheckpointPayload(step.task, leaf.parcel, runtime);
|
|
236
|
-
const sig = signature(checkpoint.payload);
|
|
237
|
-
const key = `extract:${leaf.path.join("/")}:${sig}`;
|
|
238
|
-
if (step.task.kind === "llm") {
|
|
239
|
-
const cached = await readCheckpoint(runtime.checkpoint, key, sig);
|
|
240
|
-
if (cached.hit) {
|
|
241
|
-
runtime.report.reused += 1;
|
|
242
|
-
runtime.executor?.recordReuse(step.task.taskId);
|
|
243
|
-
return parseLlmResponse(step.task, leaf.parcel, cached.value);
|
|
244
|
-
}
|
|
245
|
-
const request = checkpoint.request ?? renderLlmRequest(step.task, leaf.parcel);
|
|
246
|
-
const response = await runLlmModel(step.task, request, runtime);
|
|
247
|
-
const value = parseLlmResponse(step.task, leaf.parcel, response);
|
|
248
|
-
runtime.report.ran += 1;
|
|
249
|
-
await runtime.checkpoint.write(checkpointRecord(key, sig, response));
|
|
250
|
-
return value;
|
|
251
|
-
}
|
|
252
|
-
const cached = await readCheckpoint(runtime.checkpoint, key, sig);
|
|
253
|
-
if (cached.hit) {
|
|
254
|
-
runtime.report.reused += 1;
|
|
255
|
-
return validateOutput(step.task.validate, cached.value);
|
|
256
|
-
}
|
|
257
|
-
const value = await runFnExtractTask(step.task, leaf.parcel);
|
|
258
|
-
runtime.report.ran += 1;
|
|
259
|
-
await runtime.checkpoint.write(checkpointRecord(key, sig, value));
|
|
260
|
-
return value;
|
|
261
|
-
});
|
|
262
|
-
tree = replaceParcels(tree, values, { index: 0 });
|
|
263
|
-
currentInput = tree;
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
tree = await reduceScopeNode(tree, step.scope, step.task, runtime, []);
|
|
267
|
-
currentInput = tree;
|
|
268
|
-
}
|
|
269
|
-
if (!tree)
|
|
270
|
-
return { value: currentInput, report: runtime.report };
|
|
271
|
-
const leaves = flattenParcels(tree);
|
|
272
|
-
if (leaves.length !== 1) {
|
|
273
|
-
throw new Error(`loom plan ended with ${leaves.length} result(s); reduce to root before run completes`);
|
|
274
|
-
}
|
|
275
|
-
return { value: leaves[0].parcel, report: runtime.report };
|
|
276
|
-
}
|
|
277
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/loom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAsB3B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAwB3B,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACvF,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,GAAG,GAAG,KAAgC,CAAC;QAC7C,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CA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YACH,IAAI,GAAG,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAsB,CAAC;YACvE,YAAY,GAAG,IAAI,CAAC;YACpB,SAAS;QACX,CAAC;QACD,IAAI,GAAG,MAAM,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAsB,CAAC;QAC5F,YAAY,GAAG,IAAI,CAAC;IACtB,CAAC;IACD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,YAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IACvE,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,wBAAwB,MAAM,CAAC,MAAM,iDAAiD,CAAC,CAAC;IAC1G,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAE,CAAC,MAAW,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AACnE,CAAC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import type { LlmTaskExecutor, LlmTaskId } from "../../llm/types.js";
|
|
2
|
-
export type ScopeName = string;
|
|
3
|
-
export interface ModelRequest {
|
|
4
|
-
system: string;
|
|
5
|
-
user: string;
|
|
6
|
-
signal?: AbortSignal;
|
|
7
|
-
metadata?: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface ModelResponse {
|
|
10
|
-
text: string;
|
|
11
|
-
raw?: unknown;
|
|
12
|
-
}
|
|
13
|
-
export interface ScopeNode<TScope, TParcel> {
|
|
14
|
-
kind: "scope";
|
|
15
|
-
scope: ScopeName;
|
|
16
|
-
data: TScope;
|
|
17
|
-
children: Array<ScopeNode<unknown, TParcel> | ParcelNode<TParcel>>;
|
|
18
|
-
}
|
|
19
|
-
export interface ParcelNode<TParcel> {
|
|
20
|
-
kind: "parcel";
|
|
21
|
-
data: TParcel;
|
|
22
|
-
}
|
|
23
|
-
export interface RootNode<TParcel> {
|
|
24
|
-
kind: "root";
|
|
25
|
-
children: Array<ScopeNode<unknown, TParcel> | ParcelNode<TParcel>>;
|
|
26
|
-
}
|
|
27
|
-
export type LoomTree<TParcel> = RootNode<TParcel>;
|
|
28
|
-
export interface LlmTask<TInput, TOutput> {
|
|
29
|
-
kind: "llm";
|
|
30
|
-
taskId: LlmTaskId;
|
|
31
|
-
version?: string;
|
|
32
|
-
instruction: string;
|
|
33
|
-
format: string;
|
|
34
|
-
input?: (ctx: {
|
|
35
|
-
parcel: TInput;
|
|
36
|
-
}) => string;
|
|
37
|
-
parse: (ctx: {
|
|
38
|
-
text: string;
|
|
39
|
-
parcel: TInput;
|
|
40
|
-
raw?: unknown;
|
|
41
|
-
}) => TOutput;
|
|
42
|
-
validate?: (output: TOutput) => void;
|
|
43
|
-
}
|
|
44
|
-
export interface FnTask<TInput, TOutput> {
|
|
45
|
-
kind: "fn";
|
|
46
|
-
version?: string;
|
|
47
|
-
run: (ctx: {
|
|
48
|
-
parcel: TInput;
|
|
49
|
-
}) => Promise<TOutput> | TOutput;
|
|
50
|
-
validate?: (output: TOutput) => void;
|
|
51
|
-
}
|
|
52
|
-
export type ExtractTask<TInput, TOutput> = LlmTask<TInput, TOutput> | FnTask<TInput, TOutput>;
|
|
53
|
-
export interface ReduceTask<TInput, TOutput, TScope = unknown> {
|
|
54
|
-
version?: string;
|
|
55
|
-
run: (items: TInput[], ctx: {
|
|
56
|
-
scope: TScope | null;
|
|
57
|
-
scopeName: ScopeName;
|
|
58
|
-
}) => Promise<TOutput> | TOutput;
|
|
59
|
-
validate?: (output: TOutput) => void;
|
|
60
|
-
}
|
|
61
|
-
export interface SplitSpec<TInput, TScope, TParcel> {
|
|
62
|
-
scope: ScopeName;
|
|
63
|
-
partition: (input: TInput) => TScope[];
|
|
64
|
-
chunk: (scope: TScope) => TParcel[];
|
|
65
|
-
}
|
|
66
|
-
export type LoomStep = {
|
|
67
|
-
kind: "split";
|
|
68
|
-
spec: SplitSpec<unknown, unknown, unknown>;
|
|
69
|
-
} | {
|
|
70
|
-
kind: "extract";
|
|
71
|
-
task: ExtractTask<unknown, unknown>;
|
|
72
|
-
} | {
|
|
73
|
-
kind: "reduce";
|
|
74
|
-
scope: ScopeName;
|
|
75
|
-
task: ReduceTask<unknown, unknown, unknown>;
|
|
76
|
-
};
|
|
77
|
-
export interface CheckpointRecord<T = unknown> {
|
|
78
|
-
key: string;
|
|
79
|
-
signature: string;
|
|
80
|
-
value: T;
|
|
81
|
-
createdAt: string;
|
|
82
|
-
}
|
|
83
|
-
export interface Checkpointer {
|
|
84
|
-
read<T = unknown>(key: string): Promise<CheckpointRecord<T> | null> | CheckpointRecord<T> | null;
|
|
85
|
-
write<T = unknown>(record: CheckpointRecord<T>): Promise<void> | void;
|
|
86
|
-
}
|
|
87
|
-
export interface RunOptions {
|
|
88
|
-
executor?: LlmTaskExecutor;
|
|
89
|
-
concurrency?: number;
|
|
90
|
-
checkpoint?: Checkpointer;
|
|
91
|
-
checkpointSalt?: unknown;
|
|
92
|
-
signal?: AbortSignal;
|
|
93
|
-
}
|
|
94
|
-
export interface LoomReport {
|
|
95
|
-
reused: number;
|
|
96
|
-
ran: number;
|
|
97
|
-
}
|
|
98
|
-
export interface LoomResult<T> {
|
|
99
|
-
value: T;
|
|
100
|
-
report: LoomReport;
|
|
101
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/domain/loom/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./v3/address.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../src/domain/script/address.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ScriptV3 } from "./v3/types.js";
|
|
2
|
-
import type { ScriptV4 } from "./v4/types.js";
|
|
3
|
-
import type { ValidationResult } from "./shared/validation.js";
|
|
4
|
-
export type ScriptVersion = 3 | 4;
|
|
5
|
-
export type ScriptDocument = ScriptV3 | ScriptV4;
|
|
6
|
-
export declare const SUPPORTED_SCRIPT_VERSIONS: readonly ScriptVersion[];
|
|
7
|
-
export interface ScriptDialect {
|
|
8
|
-
readonly version: ScriptVersion;
|
|
9
|
-
readonly require: (value: unknown) => ScriptDocument;
|
|
10
|
-
readonly requireStructurallyReadable: (value: unknown) => ScriptDocument;
|
|
11
|
-
readonly validate: (value: unknown) => ValidationResult;
|
|
12
|
-
}
|
|
13
|
-
export declare function isSupportedScriptVersion(value: unknown): value is ScriptVersion;
|
|
14
|
-
export declare function scriptVersionOf(value: unknown): ScriptVersion;
|
|
15
|
-
export declare function dialectFor(value: unknown): ScriptDialect;
|
|
16
|
-
export declare function requireScriptDocument(value: unknown): ScriptDocument;
|
|
17
|
-
export declare function requireStructurallyReadableScriptDocument(value: unknown): ScriptDocument;
|
|
18
|
-
export declare function validateScriptDocument(value: unknown): ValidationResult;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { CliError, EXIT_INPUT } from "../../common.js";
|
|
2
|
-
import { requireScriptV3 } from "./v3/parse.js";
|
|
3
|
-
import { requireScriptV4, requireStructurallyReadableScriptV4 } from "./v4/parse.js";
|
|
4
|
-
import { validateScriptV4 } from "./v4/validation.js";
|
|
5
|
-
import { validateScriptV3 } from "./v3/validation.js";
|
|
6
|
-
export const SUPPORTED_SCRIPT_VERSIONS = [3, 4];
|
|
7
|
-
const DIALECTS = {
|
|
8
|
-
3: {
|
|
9
|
-
version: 3,
|
|
10
|
-
require: requireScriptV3,
|
|
11
|
-
requireStructurallyReadable: requireScriptV3,
|
|
12
|
-
validate: validateScriptV3,
|
|
13
|
-
},
|
|
14
|
-
4: {
|
|
15
|
-
version: 4,
|
|
16
|
-
require: requireScriptV4,
|
|
17
|
-
requireStructurallyReadable: requireStructurallyReadableScriptV4,
|
|
18
|
-
validate: validateScriptV4,
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
export function isSupportedScriptVersion(value) {
|
|
22
|
-
return typeof value === "number"
|
|
23
|
-
&& SUPPORTED_SCRIPT_VERSIONS.some((version) => version === value);
|
|
24
|
-
}
|
|
25
|
-
export function scriptVersionOf(value) {
|
|
26
|
-
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
27
|
-
throw new CliError("script.json must be an object with an explicit version.", {
|
|
28
|
-
exitCode: EXIT_INPUT,
|
|
29
|
-
errorCode: "SCRIPT_VERSION_MISSING",
|
|
30
|
-
data: { expected: ["version: 3 or version: 4"], actual: [Array.isArray(value) ? "array" : typeof value] },
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
const version = value.version;
|
|
34
|
-
if (isSupportedScriptVersion(version))
|
|
35
|
-
return version;
|
|
36
|
-
throw new CliError("script.json must declare version 3 or version 4.", {
|
|
37
|
-
exitCode: EXIT_INPUT,
|
|
38
|
-
errorCode: version === undefined ? "SCRIPT_VERSION_MISSING" : "SCRIPT_VERSION_UNSUPPORTED",
|
|
39
|
-
hint: "Use an explicit supported script version; scriptctl does not infer a version from document shape.",
|
|
40
|
-
data: { expected: ["version: 3 or version: 4"], actual: [String(version)] },
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
export function dialectFor(value) {
|
|
44
|
-
return DIALECTS[scriptVersionOf(value)];
|
|
45
|
-
}
|
|
46
|
-
export function requireScriptDocument(value) {
|
|
47
|
-
return dialectFor(value).require(value);
|
|
48
|
-
}
|
|
49
|
-
export function requireStructurallyReadableScriptDocument(value) {
|
|
50
|
-
return dialectFor(value).requireStructurallyReadable(value);
|
|
51
|
-
}
|
|
52
|
-
export function validateScriptDocument(value) {
|
|
53
|
-
return dialectFor(value).validate(value);
|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
|
1
|
-
{"version":3,"file":"lookups.js","sourceRoot":"","sources":["../../../src/domain/script/lookups.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type ScriptVersion } from "../dispatch.js";
|
|
2
|
-
import type { ScriptMigrationResult, ScriptMigrationStepArtifact } from "./types.js";
|
|
3
|
-
export declare function parseScriptMigrationStepArtifacts(value: unknown): ScriptMigrationStepArtifact[];
|
|
4
|
-
export declare function migrateScriptToVersion(value: unknown, targetVersion: ScriptVersion, priorArtifacts?: readonly ScriptMigrationStepArtifact[]): ScriptMigrationResult;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { CliError, EXIT_INPUT } from "../../../common.js";
|
|
2
|
-
import { isSupportedScriptVersion, requireScriptDocument, scriptVersionOf, } from "../dispatch.js";
|
|
3
|
-
import { isDict } from "../shared.js";
|
|
4
|
-
import { migrate as migrateV3ToV4 } from "./v3-to-v4.js";
|
|
5
|
-
const MIGRATIONS = [
|
|
6
|
-
{
|
|
7
|
-
sourceVersion: 3,
|
|
8
|
-
targetVersion: 4,
|
|
9
|
-
migrate: migrateV3ToV4,
|
|
10
|
-
},
|
|
11
|
-
];
|
|
12
|
-
function isMigrationArtifact(value) {
|
|
13
|
-
return isDict(value)
|
|
14
|
-
&& isSupportedScriptVersion(value["source_version"])
|
|
15
|
-
&& isSupportedScriptVersion(value["target_version"])
|
|
16
|
-
&& value["source_version"] < value["target_version"]
|
|
17
|
-
&& "identity_map" in value;
|
|
18
|
-
}
|
|
19
|
-
export function parseScriptMigrationStepArtifacts(value) {
|
|
20
|
-
if (!Array.isArray(value)) {
|
|
21
|
-
throw new CliError("Migration manifest steps must be an array.", {
|
|
22
|
-
exitCode: EXIT_INPUT,
|
|
23
|
-
errorCode: "MIGRATE_MANIFEST_INVALID",
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return value.map((item) => {
|
|
27
|
-
if (!isMigrationArtifact(item)) {
|
|
28
|
-
throw new CliError("Migration manifest contains an invalid step artifact.", {
|
|
29
|
-
exitCode: EXIT_INPUT,
|
|
30
|
-
errorCode: "MIGRATE_MANIFEST_INVALID",
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
sourceVersion: item.source_version,
|
|
35
|
-
targetVersion: item.target_version,
|
|
36
|
-
identityMap: item.identity_map,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function migrationFor(sourceVersion, targetVersion) {
|
|
41
|
-
return MIGRATIONS.find((migration) => (migration.sourceVersion === sourceVersion
|
|
42
|
-
&& migration.targetVersion <= targetVersion));
|
|
43
|
-
}
|
|
44
|
-
function priorArtifactFor(artifacts, migration) {
|
|
45
|
-
return artifacts.find((artifact) => (artifact.sourceVersion === migration.sourceVersion
|
|
46
|
-
&& artifact.targetVersion === migration.targetVersion));
|
|
47
|
-
}
|
|
48
|
-
export function migrateScriptToVersion(value, targetVersion, priorArtifacts = []) {
|
|
49
|
-
const sourceVersion = scriptVersionOf(value);
|
|
50
|
-
if (targetVersion < sourceVersion) {
|
|
51
|
-
throw new CliError("A migration target must be newer than the source script.", {
|
|
52
|
-
exitCode: EXIT_INPUT,
|
|
53
|
-
errorCode: "MIGRATE_TARGET_OLDER",
|
|
54
|
-
data: { expected: [String(sourceVersion)], actual: [String(targetVersion)] },
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
let current = requireScriptDocument(value);
|
|
58
|
-
let currentVersion = sourceVersion;
|
|
59
|
-
const steps = [];
|
|
60
|
-
while (currentVersion < targetVersion) {
|
|
61
|
-
const migration = migrationFor(currentVersion, targetVersion);
|
|
62
|
-
if (migration === undefined) {
|
|
63
|
-
throw new CliError(`No migration path exists from Script v${currentVersion} to Script v${targetVersion}.`, {
|
|
64
|
-
exitCode: EXIT_INPUT,
|
|
65
|
-
errorCode: "MIGRATE_PATH_UNSUPPORTED",
|
|
66
|
-
data: { actual: [String(currentVersion), String(targetVersion)] },
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
const migrated = migration.migrate(current, priorArtifactFor(priorArtifacts, migration));
|
|
70
|
-
current = migrated.script;
|
|
71
|
-
currentVersion = migration.targetVersion;
|
|
72
|
-
steps.push(migrated.artifact);
|
|
73
|
-
}
|
|
74
|
-
return { sourceVersion, targetVersion, script: current, steps };
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/domain/script/migrations/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,eAAe,GAGhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,eAAe,CAAC;AAazD,MAAM,UAAU,GAAyC;IACvD;QACE,aAAa,EAAE,CAAC;QAChB,aAAa,EAAE,CAAC;QAChB,OAAO,EAAE,aAAa;KACvB;CACF,CAAC;AAEF,SAAS,mBAAmB,CAAC,KAAc;IAKzC,OAAO,MAAM,CAAC,KAAK,CAAC;WACf,wBAAwB,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;WACjD,wBAAwB,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;WACjD,KAAK,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC;WACjD,cAAc,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,KAAc;IAEd,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,QAAQ,CAAC,4CAA4C,EAAE;YAC/D,QAAQ,EAAE,UAAU;YACp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,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE;SAC7E,CAAC,CAAC;IACL,CAAC;IAED,IAAI,OAAO,GAAmB,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC3D,IAAI,cAAc,GAAG,aAAa,CAAC;IACnC,MAAM,KAAK,GAAkC,EAAE,CAAC;IAChD,OAAO,cAAc,GAAG,aAAa,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,YAAY,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAC9D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,IAAI,QAAQ,CAAC,yCAAyC,cAAc,eAAe,aAAa,GAAG,EAAE;gBACzG,QAAQ,EAAE,UAAU;gBACpB,SAAS,EAAE,0BAA0B;gBACrC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE;aAClE,CAAC,CAAC;QACL,CAAC;QACD,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;QACzF,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC1B,cAAc,GAAG,SAAS,CAAC,aAAa,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ScriptDocument, ScriptVersion } from "../dispatch.js";
|
|
2
|
-
export interface ScriptMigrationStepArtifact {
|
|
3
|
-
readonly sourceVersion: ScriptVersion;
|
|
4
|
-
readonly targetVersion: ScriptVersion;
|
|
5
|
-
readonly identityMap: unknown;
|
|
6
|
-
}
|
|
7
|
-
export interface ScriptMigrationStepResult {
|
|
8
|
-
readonly script: ScriptDocument;
|
|
9
|
-
readonly artifact: ScriptMigrationStepArtifact;
|
|
10
|
-
}
|
|
11
|
-
export type ScriptMigration = (source: ScriptDocument, prior: ScriptMigrationStepArtifact | undefined) => ScriptMigrationStepResult;
|
|
12
|
-
export interface ScriptMigrationResult {
|
|
13
|
-
readonly sourceVersion: ScriptVersion;
|
|
14
|
-
readonly targetVersion: ScriptVersion;
|
|
15
|
-
readonly script: ScriptDocument;
|
|
16
|
-
readonly steps: readonly ScriptMigrationStepArtifact[];
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/domain/script/migrations/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ScriptDocument } from "../dispatch.js";
|
|
2
|
-
import type { ScriptMigrationStepArtifact, ScriptMigrationStepResult } from "./types.js";
|
|
3
|
-
export declare function migrate(source: ScriptDocument, prior: ScriptMigrationStepArtifact | undefined): ScriptMigrationStepResult;
|