akari-video 0.1.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/LICENSE +21 -0
- package/README.md +81 -0
- package/bin/akari.mjs +14 -0
- package/package.json +42 -0
- package/src/cli.mjs +140 -0
- package/src/messages.mjs +100 -0
- package/src/path-lookup.mjs +47 -0
- package/src/project-state.mjs +25 -0
- package/src/repo-assets.mjs +59 -0
- package/src/task-labels.mjs +30 -0
- package/src/update-check.mjs +189 -0
- package/vendor/packages/project-scaffold/package.json +11 -0
- package/vendor/packages/project-scaffold/src/index.mjs +523 -0
- package/vendor/packages/project-scaffold/test/create-project.test.mjs +81 -0
- package/vendor/packages/project-scaffold/test/skill-adapter-link.test.mjs +204 -0
- package/vendor/packages/schemas/analysis.schema.json +475 -0
- package/vendor/packages/schemas/asset-meta.schema.json +225 -0
- package/vendor/packages/schemas/avatar-rendition.schema.json +65 -0
- package/vendor/packages/schemas/avatar.schema.json +178 -0
- package/vendor/packages/schemas/bin/validate-asset.mjs +597 -0
- package/vendor/packages/schemas/bin/validate-avatar.mjs +486 -0
- package/vendor/packages/schemas/bin/validate-captions.mjs +316 -0
- package/vendor/packages/schemas/bin/validate-connections.mjs +295 -0
- package/vendor/packages/schemas/bin/validate-edit.mjs +766 -0
- package/vendor/packages/schemas/bin/validate-intake.mjs +185 -0
- package/vendor/packages/schemas/bin/validate-interpretation.mjs +515 -0
- package/vendor/packages/schemas/bin/validate-plan-comments.mjs +170 -0
- package/vendor/packages/schemas/bin/validate-plan.mjs +365 -0
- package/vendor/packages/schemas/bin/validate-recipe.mjs +267 -0
- package/vendor/packages/schemas/bin/validate-research-plan.mjs +510 -0
- package/vendor/packages/schemas/bin/validate-review.mjs +427 -0
- package/vendor/packages/schemas/captions.schema.json +141 -0
- package/vendor/packages/schemas/connections.schema.json +153 -0
- package/vendor/packages/schemas/edit.schema.json +437 -0
- package/vendor/packages/schemas/examples/analysis-person-matte-valid/analysis.json +18 -0
- package/vendor/packages/schemas/examples/captions-text-style-background-mode-invalid/captions.json +18 -0
- package/vendor/packages/schemas/examples/captions-text-style-color-non-hex-invalid/captions.json +14 -0
- package/vendor/packages/schemas/examples/captions-text-style-default-only-valid/captions.json +27 -0
- package/vendor/packages/schemas/examples/captions-text-style-omitted-valid/captions.json +11 -0
- package/vendor/packages/schemas/examples/captions-text-style-opacity-out-of-range-invalid/captions.json +8 -0
- package/vendor/packages/schemas/examples/captions-text-style-record-override-valid/captions.json +27 -0
- package/vendor/packages/schemas/examples/captions-text-style-size-non-positive-invalid/captions.json +14 -0
- package/vendor/packages/schemas/examples/captions-text-style-zone-invalid/captions.json +16 -0
- package/vendor/packages/schemas/examples/connections-v0-invalid-auth/connections.json +32 -0
- package/vendor/packages/schemas/examples/connections-v0-memory-valid/connections.json +42 -0
- package/vendor/packages/schemas/examples/edit-beats-duplicate-id/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-beats-invalid-id/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-beats-missing-kind/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-beats-strength-out-of-range/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-beats-v0-src-present/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-beats-v0-valid/edit.json +29 -0
- package/vendor/packages/schemas/examples/edit-beats-v1-src-missing-reference/edit.json +14 -0
- package/vendor/packages/schemas/examples/edit-beats-v1-valid/edit.json +37 -0
- package/vendor/packages/schemas/examples/edit-bgm-ducking-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-fade-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-fade-valid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-in-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-in-valid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-missing-path/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-null-valid/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-bgm-sfx-gain-out-of-range/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-bgm-sfx-valid/edit.json +23 -0
- package/vendor/packages/schemas/examples/edit-chroma-key-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-cuts-at-negative-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-cuts-at-track-valid/edit.json +20 -0
- package/vendor/packages/schemas/examples/edit-cuts-opacity-out-of-range-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-track-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-full-valid/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-omitted-valid/edit.json +9 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-partial-valid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-rotate-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-scale-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-unknown-key-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-direction-intensity-negative/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-intensity-not-integer/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-intensity-out-of-range/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-missing-preset/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-overrides-array/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-preset-only/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-valid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-empty-word/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-invalid-id/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-missing-emotion/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-range-invalid/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-v0-src-present/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-v0-valid/edit.json +32 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-v1-valid/edit.json +39 -0
- package/vendor/packages/schemas/examples/edit-layers-invalid-bad-blend/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-layers-invalid-chroma-key-on-baked/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-layers-invalid-duplicate-id/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-layers-track-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-layers-valid/edit.json +31 -0
- package/vendor/packages/schemas/examples/edit-look-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-master-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-narration-gain-out-of-range/edit.json +18 -0
- package/vendor/packages/schemas/examples/edit-narration-invalid-id/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-narration-missing-provenance/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-narration-valid/edit.json +36 -0
- package/vendor/packages/schemas/examples/edit-narration-voicevox-missing-credit/edit.json +20 -0
- package/vendor/packages/schemas/examples/edit-render-basics-valid/edit.json +22 -0
- package/vendor/packages/schemas/examples/edit-sfx-in-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-in-out-valid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-out-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-out-type-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-t-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-track-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-speed-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-timeline-declared-valid/edit.json +14 -0
- package/vendor/packages/schemas/examples/edit-timeline-duplicate-id-invalid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-timeline-interleaved-valid/edit.json +22 -0
- package/vendor/packages/schemas/examples/edit-timeline-omitted-valid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-timeline-ref-invalid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-tracks-section-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-tracks-section-valid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-transition-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-v0-sample/edit.json +27 -0
- package/vendor/packages/schemas/examples/edit-v0-sample/overlays/cap-a.html +17 -0
- package/vendor/packages/schemas/examples/edit-v0-sample/overlays/cap-b.html +17 -0
- package/vendor/packages/schemas/examples/edit-v1-bgm-sfx-valid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-v1-sample/edit.json +14 -0
- package/vendor/packages/schemas/examples/plan-comments-v0-sample/plan-comments.json +19 -0
- package/vendor/packages/schemas/examples/plan-v0-sample/plan.json +39 -0
- package/vendor/packages/schemas/examples/recipe-v0-sample/product-demo-quick-cuts.json +23 -0
- package/vendor/packages/schemas/examples/review-v1-sample/review.json +11 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/AVATAR.md +159 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/avatar.json +21 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-no-avatar-json/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/avatar.json +23 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-voice-only/AVATAR.md +28 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-voice-only/avatar.json +19 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-duplicate-task/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-missing-submitted-at/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-target-exclusive/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-unknown-task/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/valid-draft/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/valid-submitted/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-bad-confidence-enum/plan.json +15 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-constraint-bad-applies-to/plan.json +18 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-dangling-media-path/plan.json +15 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-duplicate-slot-id/plan.json +25 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-missing-required-field/plan.json +14 -0
- package/vendor/packages/schemas/fixtures/plan/unsupported-version/plan.json +4 -0
- package/vendor/packages/schemas/fixtures/plan/valid/plan.json +40 -0
- package/vendor/packages/schemas/fixtures/plan/valid/scaffold/beat-01.png +1 -0
- package/vendor/packages/schemas/fixtures/plan/valid/scaffold/beat-01.wav +1 -0
- package/vendor/packages/schemas/fixtures/plan/valid/scaffold/broll.mp4 +1 -0
- package/vendor/packages/schemas/fixtures/plan/warns-confidence-gap/plan.json +28 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-pass/plan-comments.json +6 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-target-id-for-index-kind/plan-comments.json +13 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-target-kind/plan-comments.json +13 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-comments-not-array/plan-comments.json +6 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-missing-comment-field/plan-comments.json +12 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-missing-version/plan-comments.json +5 -0
- package/vendor/packages/schemas/fixtures/plan-comments/unsupported-version/plan-comments.json +6 -0
- package/vendor/packages/schemas/fixtures/plan-comments/valid/plan-comments.json +19 -0
- package/vendor/packages/schemas/fixtures/plan-comments/valid-unknown-fields/plan-comments.json +15 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-aspect/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-confirmed-by/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-name-casing/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-workflow/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-duplicate-overlay-kind/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-empty-confirmed/recipe.json +9 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-empty-narration/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-missing-version/recipe.json +12 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-provenance-mismatch/recipe.json +15 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-source-project-path/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/unsupported-version/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/valid/recipe.json +15 -0
- package/vendor/packages/schemas/fixtures/recipe/valid-unknown-fields/recipe.json +16 -0
- package/vendor/packages/schemas/fixtures/review/invalid-malformed-canvas-target/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-malformed-doc-target/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-malformed-image-target/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-strokes-bad-space/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-strokes-canvas-rect-with-frame/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-strokes-image-rect-with-frame/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-video-null-sourcet/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/valid/review.json +8 -0
- package/vendor/packages/schemas/fixtures/review/valid-canvas-target/review.json +7 -0
- package/vendor/packages/schemas/fixtures/review/valid-input-session/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/valid-strokes/review.json +8 -0
- package/vendor/packages/schemas/intake.schema.json +117 -0
- package/vendor/packages/schemas/interpretation.schema.json +419 -0
- package/vendor/packages/schemas/package.json +18 -0
- package/vendor/packages/schemas/plan-comments.schema.json +52 -0
- package/vendor/packages/schemas/plan.schema.json +129 -0
- package/vendor/packages/schemas/recipe.schema.json +106 -0
- package/vendor/packages/schemas/research-plan.schema.json +230 -0
- package/vendor/packages/schemas/review.schema.json +227 -0
- package/vendor/packages/schemas/test/fixtures/asset/invalid-matched-by/audio/whoosh-transition/meta.json +31 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-catalog/audio/whoosh-transition/meta.json +31 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/fragment.html +139 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/meta.json +32 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/preview.png +0 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-analyses-missing-ref/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-analyses-ref-mismatch/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-arc-empty-refs/interpretation.json +126 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-context-missing-interview/interpretation.json +126 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-context-null-intake/interpretation.json +133 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-dangling-arc-ref/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-duplicate-asset-ref/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-flag-bad-type/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-flag-missing-evidence/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-missing-required-field/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-open-question-answer-present-when-open/interpretation.json +133 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-open-question-answered-without-answer/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-relations-dangling-target/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-relations-self-reference/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-section-end-before-start/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-section-mismatched-start-end/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-unknown-root-field/interpretation.json +133 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/unsupported-version/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/valid/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-bad-category-enum/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-dangling-chapter-ref/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-dangling-shot-list-ref/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-decided-at-mismatch/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-duplicate-candidate-id/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-japan-sns-notes-empty/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-missing-required-field/research-plan.json +127 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-selected-missing-candidate/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-structure-confirmed-mismatch/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/unsupported-version/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/valid/research-plan.json +79 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/warns-empty-sources/research-plan.json +120 -0
- package/vendor/packages/schemas/test/validate-asset.test.mjs +38 -0
- package/vendor/packages/schemas/test/validate-avatar.test.mjs +109 -0
- package/vendor/packages/schemas/test/validate-captions.test.mjs +59 -0
- package/vendor/packages/schemas/test/validate-connections.test.mjs +31 -0
- package/vendor/packages/schemas/test/validate-edit.test.mjs +490 -0
- package/vendor/packages/schemas/test/validate-intake.test.mjs +66 -0
- package/vendor/packages/schemas/test/validate-interpretation.test.mjs +167 -0
- package/vendor/packages/schemas/test/validate-plan-comments.test.mjs +70 -0
- package/vendor/packages/schemas/test/validate-plan.test.mjs +67 -0
- package/vendor/packages/schemas/test/validate-recipe.test.mjs +107 -0
- package/vendor/packages/schemas/test/validate-research-plan.test.mjs +98 -0
- package/vendor/packages/schemas/test/validate-review.test.mjs +102 -0
- package/vendor/skills/.gitkeep +0 -0
- package/vendor/skills/address-review/SKILL.md +84 -0
- package/vendor/skills/address-review/bin/core/review-store.mjs +210 -0
- package/vendor/skills/address-review/bin/list.mjs +198 -0
- package/vendor/skills/address-review/bin/respond.mjs +89 -0
- package/vendor/skills/address-review/dev-fixtures/fixture-project/captions.json +22 -0
- package/vendor/skills/address-review/dev-fixtures/fixture-project/edit.json +12 -0
- package/vendor/skills/address-review/dev-fixtures/fixture-project/review.json +100 -0
- package/vendor/skills/address-review/test/review-store.test.mjs +201 -0
- package/vendor/skills/analyze-footage/SKILL.md +35 -0
- package/vendor/skills/analyze-footage/analysis-json.md +185 -0
- package/vendor/skills/analyze-footage/bin/person-matte/person-matte-helper.swift +343 -0
- package/vendor/skills/analyze-footage/bin/person-matte/person-matte.mjs +415 -0
- package/vendor/skills/analyze-footage/bin/speechanalyzer-helper.swift +138 -0
- package/vendor/skills/analyze-footage/bin/transcribe-cloud.mjs +486 -0
- package/vendor/skills/analyze-footage/bin/transcribe-sa.mjs +189 -0
- package/vendor/skills/analyze-footage/events-and-hooks.md +93 -0
- package/vendor/skills/analyze-footage/keyframes-and-review.md +130 -0
- package/vendor/skills/analyze-footage/media-and-transcript.md +219 -0
- package/vendor/skills/analyze-footage/person-matte.md +121 -0
- package/vendor/skills/analyze-footage/references/akari-data-contract.md +18 -0
- package/vendor/skills/analyze-footage/references/asset.meta.example.json +23 -0
- package/vendor/skills/analyze-footage/test/fixtures/scribe-punctuation-inflation.json +17 -0
- package/vendor/skills/analyze-footage/test/normalize-scribe.test.mjs +76 -0
- package/vendor/skills/analyze-footage/workflow.md +95 -0
- package/vendor/skills/analyze-project/SKILL.md +58 -0
- package/vendor/skills/analyze-project/collect.md +51 -0
- package/vendor/skills/analyze-project/decision-record.md +55 -0
- package/vendor/skills/analyze-project/interpretation.md +128 -0
- package/vendor/skills/analyze-project/interview.md +66 -0
- package/vendor/skills/analyze-project/references/interpretation-shape.md +42 -0
- package/vendor/skills/analyze-project/references/open-questions-examples.md +35 -0
- package/vendor/skills/analyze-project/validate-and-render.md +66 -0
- package/vendor/skills/bake-3d/SKILL.md +78 -0
- package/vendor/skills/compile-review-session/SKILL.md +78 -0
- package/vendor/skills/compile-review-session/bin/compile-review-session.mjs +799 -0
- package/vendor/skills/compile-review-session/bin/core/canvas-compiler.mjs +105 -0
- package/vendor/skills/compile-review-session/bin/core/compiler.mjs +221 -0
- package/vendor/skills/compile-review-session/bin/core/review-store.mjs +74 -0
- package/vendor/skills/compile-review-session/bin/core/time-mapping.mjs +370 -0
- package/vendor/skills/compile-review-session/bin/core/transcription.mjs +721 -0
- package/vendor/skills/compile-review-session/compilation-rules.md +98 -0
- package/vendor/skills/compile-review-session/dev-fixtures/README.md +24 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/events.jsonl +5 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/events.jsonl +19 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0005/session.json +1 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/edit.snapshot.json +13 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/events.jsonl +9 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/transcript.json +9 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review.json +7 -0
- package/vendor/skills/compile-review-session/test/canvas-compiler.test.mjs +283 -0
- package/vendor/skills/compile-review-session/test/compiler.test.mjs +458 -0
- package/vendor/skills/create-project/SKILL.md +46 -0
- package/vendor/skills/create-project/bin/create-project.mjs +88 -0
- package/vendor/skills/edit-lint/SKILL.md +73 -0
- package/vendor/skills/edit-plan/SKILL.md +64 -0
- package/vendor/skills/edit-plan/approvals-and-generation.md +106 -0
- package/vendor/skills/edit-plan/avatar-resolution.md +241 -0
- package/vendor/skills/edit-plan/beat-sync.md +545 -0
- package/vendor/skills/edit-plan/beats.md +197 -0
- package/vendor/skills/edit-plan/emphasis-detection.md +366 -0
- package/vendor/skills/edit-plan/execution.md +157 -0
- package/vendor/skills/edit-plan/expression-selection.md +290 -0
- package/vendor/skills/edit-plan/plan-json.md +52 -0
- package/vendor/skills/edit-plan/recipe.md +74 -0
- package/vendor/skills/edit-plan/references/asset.decisions.example.json +12 -0
- package/vendor/skills/edit-plan/references/event.example.json +7 -0
- package/vendor/skills/edit-plan/report-guide.md +192 -0
- package/vendor/skills/edit-plan/workflow.md +108 -0
- package/vendor/skills/generate-narration/SKILL.md +40 -0
- package/vendor/skills/generate-narration/assets/reading-script-v1.md +18 -0
- package/vendor/skills/generate-narration/avatar-voice.md +54 -0
- package/vendor/skills/generate-narration/bin/generate-narration.mjs +572 -0
- package/vendor/skills/generate-narration/engines.md +78 -0
- package/vendor/skills/generate-narration/reading-text.md +36 -0
- package/vendor/skills/generate-narration/voice-profile-setup.md +77 -0
- package/vendor/skills/harvest-asset/SKILL.md +132 -0
- package/vendor/skills/manage-connections/SKILL.md +75 -0
- package/vendor/skills/manage-connections/bin/doctor.mjs +341 -0
- package/vendor/skills/overlay-authoring/3d.md +143 -0
- package/vendor/skills/overlay-authoring/SKILL.md +30 -0
- package/vendor/skills/overlay-authoring/motion.md +58 -0
- package/vendor/skills/overlay-authoring/table.md +41 -0
- package/vendor/skills/overlay-authoring/telop.md +69 -0
- package/vendor/skills/overlay-authoring/text-behind-person.md +224 -0
- package/vendor/skills/overlay-authoring/thumbnail.md +126 -0
- package/vendor/skills/render-cut/SKILL.md +66 -0
- package/vendor/skills/research-plan/SKILL.md +75 -0
- package/vendor/skills/research-plan/competitor.md +50 -0
- package/vendor/skills/research-plan/ideate.md +56 -0
- package/vendor/skills/research-plan/shotlist.md +46 -0
- package/vendor/skills/research-plan/storyboard.md +48 -0
- package/vendor/skills/research-plan/trends.md +33 -0
- package/vendor/skills/setup-audio-library/SKILL.md +93 -0
- package/vendor/skills/setup-audio-library/candidate-list.md +72 -0
- package/vendor/skills/setup-audio-library/drop-folder.md +72 -0
- package/vendor/skills/setup-audio-library/gallery.md +43 -0
- package/vendor/skills/setup-library/SKILL.md +33 -0
- package/vendor/skills/setup-library/fetch-and-validate.md +102 -0
- package/vendor/skills/setup-library/starter-pack.md +55 -0
- package/vendor/skills/setup-library/tools-check.md +83 -0
- package/vendor/skills/verify/SKILL.md +137 -0
- package/vendor/templates/project-default/.akari/cache/.gitkeep +0 -0
- package/vendor/templates/project-default/.akari/connections.json +233 -0
- package/vendor/templates/project-default/.akari/diffs/.gitkeep +1 -0
- package/vendor/templates/project-default/.akari/events/.gitkeep +1 -0
- package/vendor/templates/project-default/.akari/reports/.gitkeep +0 -0
- package/vendor/templates/project-default/.akari/sidecars/.gitkeep +1 -0
- package/vendor/templates/project-default/.akari/work/.gitkeep +0 -0
- package/vendor/templates/project-default/.akari/workflow.json +48 -0
- package/vendor/templates/project-default/.claude/settings.json +15 -0
- package/vendor/templates/project-default/.claude/skills/README.md +26 -0
- package/vendor/templates/project-default/AGENTS.md +49 -0
- package/vendor/templates/project-default/CLAUDE.md +35 -0
- package/vendor/templates/project-default/assets/.gitkeep +1 -0
- package/vendor/templates/project-default/exports/.gitkeep +1 -0
- package/vendor/templates/project-default/planning/.gitkeep +1 -0
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// 素材ライブラリ契約 v0 の構造を、Node.js 組み込み機能だけで検証する。
|
|
4
|
+
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
|
|
9
|
+
const usage = "使い方: node packages/schemas/bin/validate-asset.mjs assets/telop/<id>";
|
|
10
|
+
const assetArgument = process.argv[2];
|
|
11
|
+
|
|
12
|
+
if (!assetArgument || process.argv.length !== 3) {
|
|
13
|
+
console.error(usage);
|
|
14
|
+
process.exit(2);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (assetArgument === "--help" || assetArgument === "-h") {
|
|
18
|
+
console.log(usage);
|
|
19
|
+
process.exit(0);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const assetDir = path.resolve(assetArgument);
|
|
23
|
+
const metaPath = path.join(assetDir, "meta.json");
|
|
24
|
+
const previewPath = path.join(assetDir, "preview.png");
|
|
25
|
+
const errors = [];
|
|
26
|
+
|
|
27
|
+
if (!isDirectory(assetDir)) {
|
|
28
|
+
fail(`素材ディレクトリが見つかりません: ${assetDir}`);
|
|
29
|
+
finish();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!isRegularFile(metaPath)) {
|
|
33
|
+
fail(`meta.json が見つかりません: ${metaPath}`);
|
|
34
|
+
finish();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let meta;
|
|
38
|
+
try {
|
|
39
|
+
meta = JSON.parse(fs.readFileSync(metaPath, "utf8"));
|
|
40
|
+
} catch (error) {
|
|
41
|
+
fail(`meta.json を JSON として読めません: ${messageOf(error)}`);
|
|
42
|
+
finish();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
validateMeta(meta);
|
|
46
|
+
validateDirectoryContract(meta);
|
|
47
|
+
validateFiles();
|
|
48
|
+
finish();
|
|
49
|
+
|
|
50
|
+
function validateMeta(value) {
|
|
51
|
+
if (!isPlainObject(value)) {
|
|
52
|
+
fail("meta.json のルートは object である必要があります");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const requiredFields = [
|
|
57
|
+
"id",
|
|
58
|
+
"category",
|
|
59
|
+
"title",
|
|
60
|
+
"description",
|
|
61
|
+
"when_to_use",
|
|
62
|
+
"tags",
|
|
63
|
+
"knobs",
|
|
64
|
+
"ai_usage",
|
|
65
|
+
"requires",
|
|
66
|
+
"provenance",
|
|
67
|
+
"author",
|
|
68
|
+
"license",
|
|
69
|
+
"price",
|
|
70
|
+
];
|
|
71
|
+
// source / remote / matched_by は任意フィールド。
|
|
72
|
+
// 後方互換のため必須フィールドには加えない。
|
|
73
|
+
const optionalFields = ["source", "remote", "matched_by"];
|
|
74
|
+
const allowedFields = [...requiredFields, ...optionalFields];
|
|
75
|
+
for (const field of requiredFields) {
|
|
76
|
+
if (!hasOwn(value, field)) fail(`必須フィールドがありません: ${field}`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const unknownFields = Object.keys(value).filter((field) => !allowedFields.includes(field));
|
|
80
|
+
for (const field of unknownFields) fail(`未定義のトップレベルフィールドです: ${field}`);
|
|
81
|
+
|
|
82
|
+
validateNonEmptyString(value.id, "id");
|
|
83
|
+
if (typeof value.id === "string" && !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(value.id)) {
|
|
84
|
+
fail("id は英小文字・数字の kebab-case である必要があります");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const categories = new Set(["3d", "motion", "telop", "audio", "broll", "font", "thumbnail"]);
|
|
88
|
+
if (typeof value.category !== "string" || !categories.has(value.category)) {
|
|
89
|
+
fail("category は 3d / motion / telop / audio / broll / font / thumbnail のいずれかである必要があります");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
for (const field of ["title", "description", "when_to_use", "ai_usage", "author"]) {
|
|
93
|
+
validateNonEmptyString(value[field], field);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
validateStringArray(value.tags, "tags");
|
|
97
|
+
validateStringArray(value.requires, "requires");
|
|
98
|
+
validateKnobs(value.knobs);
|
|
99
|
+
validateProvenance(value.provenance);
|
|
100
|
+
validateLicense(value.license);
|
|
101
|
+
|
|
102
|
+
if (value.price !== null && (!isFiniteNumber(value.price) || value.price < 0)) {
|
|
103
|
+
fail("price は null または 0 以上の有限数である必要があります");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const matchedByValues = new Set(["title-normalized"]);
|
|
107
|
+
if (hasOwn(value, "matched_by") && !matchedByValues.has(value.matched_by)) {
|
|
108
|
+
fail(`matched_by は ${[...matchedByValues].join(" / ")} のいずれかである必要があります`);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const isRemote = value.remote === true;
|
|
112
|
+
if (hasOwn(value, "remote") && typeof value.remote !== "boolean") {
|
|
113
|
+
fail("remote は boolean である必要があります");
|
|
114
|
+
}
|
|
115
|
+
if (hasOwn(value, "source")) {
|
|
116
|
+
validateSource(value.source);
|
|
117
|
+
}
|
|
118
|
+
if (isRemote && !hasOwn(value, "source")) {
|
|
119
|
+
fail("remote: true のエントリには source ブロックが必須です");
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function validateSource(source) {
|
|
124
|
+
if (!isPlainObject(source)) {
|
|
125
|
+
fail("source は object である必要があります");
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const sourceFields = ["url", "acquisition", "license_at_source", "attribution_required", "preview_url"];
|
|
130
|
+
const requiredSourceFields = ["url", "acquisition", "license_at_source", "attribution_required"];
|
|
131
|
+
for (const field of requiredSourceFields) {
|
|
132
|
+
if (!hasOwn(source, field)) fail(`source.${field} は必須です`);
|
|
133
|
+
}
|
|
134
|
+
for (const field of Object.keys(source)) {
|
|
135
|
+
if (!sourceFields.includes(field)) fail(`source.${field} は未定義のフィールドです`);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
validateHttpUrl(source.url, "source.url");
|
|
139
|
+
|
|
140
|
+
const acquisitionTypes = new Set(["direct", "login", "purchase"]);
|
|
141
|
+
if (typeof source.acquisition !== "string" || !acquisitionTypes.has(source.acquisition)) {
|
|
142
|
+
fail("source.acquisition は direct / login / purchase のいずれかである必要があります");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
validateNonEmptyString(source.license_at_source, "source.license_at_source");
|
|
146
|
+
|
|
147
|
+
if (typeof source.attribution_required !== "boolean") {
|
|
148
|
+
fail("source.attribution_required は boolean である必要があります");
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (hasOwn(source, "preview_url")) {
|
|
152
|
+
validateHttpUrl(source.preview_url, "source.preview_url");
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function validateHttpUrl(value, label) {
|
|
157
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
158
|
+
fail(`${label} は空でない文字列である必要があります`);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
let parsed;
|
|
163
|
+
try {
|
|
164
|
+
parsed = new URL(value);
|
|
165
|
+
} catch {
|
|
166
|
+
fail(`${label} は有効な URL である必要があります: ${value}`);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
171
|
+
fail(`${label} は http(s) URL である必要があります: ${value}`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function validateKnobs(knobs) {
|
|
176
|
+
if (!Array.isArray(knobs)) {
|
|
177
|
+
fail("knobs は配列である必要があります");
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const knobTypes = new Set(["text", "color", "slider", "dropdown", "checkbox", "media"]);
|
|
182
|
+
const cssVars = new Set();
|
|
183
|
+
const params = new Set();
|
|
184
|
+
for (const [index, knob] of knobs.entries()) {
|
|
185
|
+
const label = `knobs[${index}]`;
|
|
186
|
+
if (!isPlainObject(knob)) {
|
|
187
|
+
fail(`${label} は object である必要があります`);
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
for (const field of ["type", "group"]) {
|
|
192
|
+
if (!hasOwn(knob, field)) fail(`${label}.${field} は必須です`);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// バインド先は cssVar(オーバーレイ素材)か param(3D ベイクレシピ)のどちらか一方(2026-07-14 追記)
|
|
196
|
+
const hasCssVar = hasOwn(knob, "cssVar");
|
|
197
|
+
const hasParam = hasOwn(knob, "param");
|
|
198
|
+
if (hasCssVar === hasParam) {
|
|
199
|
+
fail(`${label} は cssVar か param のどちらか一方を必須とします`);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (hasCssVar) {
|
|
203
|
+
validateNonEmptyString(knob.cssVar, `${label}.cssVar`);
|
|
204
|
+
if (typeof knob.cssVar === "string") {
|
|
205
|
+
if (!/^--[A-Za-z_][A-Za-z0-9_-]*$/.test(knob.cssVar)) {
|
|
206
|
+
fail(`${label}.cssVar は CSS カスタムプロパティ名である必要があります`);
|
|
207
|
+
}
|
|
208
|
+
if (cssVars.has(knob.cssVar)) fail(`${label}.cssVar が重複しています: ${knob.cssVar}`);
|
|
209
|
+
cssVars.add(knob.cssVar);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (hasParam) {
|
|
214
|
+
validateNonEmptyString(knob.param, `${label}.param`);
|
|
215
|
+
if (typeof knob.param === "string") {
|
|
216
|
+
if (!/^[a-z_][a-z0-9_]*$/.test(knob.param)) {
|
|
217
|
+
fail(`${label}.param は snake_case(英小文字・数字・アンダースコア)である必要があります`);
|
|
218
|
+
}
|
|
219
|
+
if (params.has(knob.param)) fail(`${label}.param が重複しています: ${knob.param}`);
|
|
220
|
+
params.add(knob.param);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (typeof knob.type !== "string" || !knobTypes.has(knob.type)) {
|
|
225
|
+
fail(`${label}.type は ${[...knobTypes].join(" / ")} のいずれかである必要があります`);
|
|
226
|
+
}
|
|
227
|
+
validateNonEmptyString(knob.group, `${label}.group`);
|
|
228
|
+
if (hasOwn(knob, "label")) validateNonEmptyString(knob.label, `${label}.label`);
|
|
229
|
+
if (hasOwn(knob, "min") && !isFiniteNumber(knob.min)) {
|
|
230
|
+
fail(`${label}.min は有限数である必要があります`);
|
|
231
|
+
}
|
|
232
|
+
if (hasOwn(knob, "max") && !isFiniteNumber(knob.max)) {
|
|
233
|
+
fail(`${label}.max は有限数である必要があります`);
|
|
234
|
+
}
|
|
235
|
+
if (isFiniteNumber(knob.min) && isFiniteNumber(knob.max) && knob.min > knob.max) {
|
|
236
|
+
fail(`${label}.min は max 以下である必要があります`);
|
|
237
|
+
}
|
|
238
|
+
if (hasOwn(knob, "unit") && typeof knob.unit !== "string") {
|
|
239
|
+
fail(`${label}.unit は文字列である必要があります`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function validateProvenance(provenance) {
|
|
245
|
+
if (!isPlainObject(provenance)) {
|
|
246
|
+
fail("provenance は object である必要があります");
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
for (const field of ["origin", "generator"]) {
|
|
251
|
+
if (!hasOwn(provenance, field)) fail(`provenance.${field} は必須です`);
|
|
252
|
+
}
|
|
253
|
+
for (const field of Object.keys(provenance)) {
|
|
254
|
+
if (!["origin", "generator"].includes(field)) {
|
|
255
|
+
fail(`provenance.${field} は未定義のフィールドです`);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
validateNonEmptyString(provenance.origin, "provenance.origin");
|
|
259
|
+
if (provenance.generator !== null) {
|
|
260
|
+
validateNonEmptyString(provenance.generator, "provenance.generator");
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function validateLicense(license) {
|
|
265
|
+
if (!isPlainObject(license)) {
|
|
266
|
+
fail("license は object である必要があります");
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const licenseFields = [
|
|
271
|
+
"spdx",
|
|
272
|
+
"scope",
|
|
273
|
+
"attribution_required",
|
|
274
|
+
"ai_training_allowed",
|
|
275
|
+
];
|
|
276
|
+
for (const field of licenseFields) {
|
|
277
|
+
if (!hasOwn(license, field)) fail(`license.${field} は必須です`);
|
|
278
|
+
}
|
|
279
|
+
for (const field of Object.keys(license)) {
|
|
280
|
+
if (!licenseFields.includes(field)) fail(`license.${field} は未定義のフィールドです`);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
validateNonEmptyString(license.spdx, "license.spdx");
|
|
284
|
+
validateNonEmptyString(license.scope, "license.scope");
|
|
285
|
+
if (typeof license.attribution_required !== "boolean") {
|
|
286
|
+
fail("license.attribution_required は boolean である必要があります");
|
|
287
|
+
}
|
|
288
|
+
if (typeof license.ai_training_allowed !== "boolean") {
|
|
289
|
+
fail("license.ai_training_allowed は boolean である必要があります");
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function validateDirectoryContract(value) {
|
|
294
|
+
if (!isPlainObject(value)) return;
|
|
295
|
+
|
|
296
|
+
const assetId = path.basename(assetDir);
|
|
297
|
+
const categoryDir = path.basename(path.dirname(assetDir));
|
|
298
|
+
if (typeof value.id === "string" && value.id !== assetId) {
|
|
299
|
+
fail(`id と素材ディレクトリ名が一致しません: ${value.id} != ${assetId}`);
|
|
300
|
+
}
|
|
301
|
+
if (typeof value.category === "string" && value.category !== categoryDir) {
|
|
302
|
+
fail(`category と親ディレクトリ名が一致しません: ${value.category} != ${categoryDir}`);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function validateFiles() {
|
|
307
|
+
if (isPlainObject(meta) && meta.remote === true) {
|
|
308
|
+
// remote: true のエントリは実体(fragment.html / preview.png / バイナリ等)を持たない。
|
|
309
|
+
// source ブロックの妥当性は validateMeta 側(validateSource)で検証済み。
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (!isRegularFile(previewPath)) {
|
|
314
|
+
fail(`preview.png が見つかりません: ${previewPath}`);
|
|
315
|
+
} else {
|
|
316
|
+
validatePng(previewPath);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
let payloadFiles;
|
|
320
|
+
try {
|
|
321
|
+
payloadFiles = listRegularFiles(assetDir).filter(
|
|
322
|
+
(filePath) => filePath !== metaPath && filePath !== previewPath,
|
|
323
|
+
);
|
|
324
|
+
} catch (error) {
|
|
325
|
+
fail(`素材ディレクトリを列挙できません: ${messageOf(error)}`);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (payloadFiles.length === 0) {
|
|
329
|
+
fail("実体ファイルがありません(meta.json / preview.png 以外に 1 ファイル以上必要です)");
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const category = path.basename(path.dirname(assetDir));
|
|
334
|
+
if (["motion", "telop", "thumbnail"].includes(category)) {
|
|
335
|
+
const fragmentPath = path.join(assetDir, "fragment.html");
|
|
336
|
+
if (!isRegularFile(fragmentPath)) {
|
|
337
|
+
fail(`${category} 素材には fragment.html が必要です`);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if (category === "3d") {
|
|
342
|
+
// 3d は fragment.html(経路 A: オーバーレイ)か scene.py(経路 B: ベイクレシピ)のどちらか一方
|
|
343
|
+
// (契約: docs/contract-2026-07-14-3d-bake-recipe.md)
|
|
344
|
+
const hasFragment = isRegularFile(path.join(assetDir, "fragment.html"));
|
|
345
|
+
const hasScene = isRegularFile(path.join(assetDir, "scene.py"));
|
|
346
|
+
if (hasFragment === hasScene) {
|
|
347
|
+
fail("3d 素材は fragment.html(オーバーレイ)か scene.py(ベイクレシピ)のどちらか一方を実体に持つ必要があります");
|
|
348
|
+
}
|
|
349
|
+
if (hasFragment && !payloadFiles.some((filePath) => /\.(?:glb|gltf)$/i.test(filePath))) {
|
|
350
|
+
fail("3d オーバーレイ素材には glTF 実体(.glb または .gltf)が必要です");
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
for (const filePath of payloadFiles) {
|
|
355
|
+
if (/\.(?:html?|css|svg|m?js|cjs)$/i.test(filePath)) validateLocalReferences(filePath);
|
|
356
|
+
else if (/\.gltf$/i.test(filePath)) validateGltfReferences(filePath);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function validatePng(filePath) {
|
|
361
|
+
try {
|
|
362
|
+
const header = fs.readFileSync(filePath).subarray(0, 24);
|
|
363
|
+
if (
|
|
364
|
+
header.length < 24 ||
|
|
365
|
+
header.subarray(0, 8).toString("hex") !== "89504e470d0a1a0a"
|
|
366
|
+
) {
|
|
367
|
+
fail("preview.png は有効な PNG シグネチャを持つ必要があります");
|
|
368
|
+
}
|
|
369
|
+
} catch (error) {
|
|
370
|
+
fail(`preview.png を読めません: ${messageOf(error)}`);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function validateLocalReferences(filePath) {
|
|
375
|
+
let source;
|
|
376
|
+
try {
|
|
377
|
+
source = fs.readFileSync(filePath, "utf8");
|
|
378
|
+
} catch (error) {
|
|
379
|
+
fail(`参照元ファイルを読めません: ${relativeToAsset(filePath)}: ${messageOf(error)}`);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
const references = new Set();
|
|
384
|
+
const patterns = [
|
|
385
|
+
/\b(?:src|href|poster)\s*=\s*["']([^"']+)["']/gi,
|
|
386
|
+
/\burl\(\s*["']?([^"')]+)["']?\s*\)/gi,
|
|
387
|
+
/@import\s+["']([^"']+)["']/gi,
|
|
388
|
+
/\bfetch\s*\(\s*["']([^"']+)["']/gi,
|
|
389
|
+
/\bnew\s+URL\s*\(\s*["']([^"']+)["']/gi,
|
|
390
|
+
/\.load(?:Async)?\s*\(\s*["']([^"']+)["']/gi,
|
|
391
|
+
];
|
|
392
|
+
for (const pattern of patterns) {
|
|
393
|
+
for (const match of source.matchAll(pattern)) references.add(match[1].trim());
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
for (const match of source.matchAll(/\bimport\s+(?:[^"']*?\s+from\s+)?["']([^"']+)["']/gi)) {
|
|
397
|
+
if (isPathLikeReference(match[1])) references.add(match[1].trim());
|
|
398
|
+
}
|
|
399
|
+
for (const match of source.matchAll(/\bimport\s*\(\s*["']([^"']+)["']/gi)) {
|
|
400
|
+
if (isPathLikeReference(match[1])) references.add(match[1].trim());
|
|
401
|
+
}
|
|
402
|
+
for (const match of source.matchAll(/\bsrcset\s*=\s*["']([^"']+)["']/gi)) {
|
|
403
|
+
if (match[1].trim().startsWith("data:")) continue;
|
|
404
|
+
for (const candidate of match[1].split(",")) {
|
|
405
|
+
const reference = candidate.trim().split(/\s+/, 1)[0];
|
|
406
|
+
if (reference) references.add(reference);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
for (const reference of references) validateReference(filePath, reference);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
function validateGltfReferences(filePath) {
|
|
414
|
+
let gltf;
|
|
415
|
+
try {
|
|
416
|
+
gltf = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
417
|
+
} catch (error) {
|
|
418
|
+
fail(`${relativeToAsset(filePath)} を glTF JSON として読めません: ${messageOf(error)}`);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (!isPlainObject(gltf)) {
|
|
423
|
+
fail(`${relativeToAsset(filePath)} のルートは object である必要があります`);
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
for (const collectionName of ["buffers", "images"]) {
|
|
428
|
+
const collection = gltf[collectionName];
|
|
429
|
+
if (collection === undefined) continue;
|
|
430
|
+
if (!Array.isArray(collection)) {
|
|
431
|
+
fail(`${relativeToAsset(filePath)}.${collectionName} は配列である必要があります`);
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
for (const [index, entry] of collection.entries()) {
|
|
436
|
+
if (!isPlainObject(entry)) {
|
|
437
|
+
fail(`${relativeToAsset(filePath)}.${collectionName}[${index}] は object である必要があります`);
|
|
438
|
+
continue;
|
|
439
|
+
}
|
|
440
|
+
if (!hasOwn(entry, "uri")) continue;
|
|
441
|
+
if (typeof entry.uri !== "string" || entry.uri.trim().length === 0) {
|
|
442
|
+
fail(`${relativeToAsset(filePath)}.${collectionName}[${index}].uri は空でない文字列である必要があります`);
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
validateReference(filePath, entry.uri.trim());
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
function validateReference(sourcePath, reference) {
|
|
451
|
+
if (isExternalReference(reference)) return;
|
|
452
|
+
|
|
453
|
+
if (reference.startsWith("file:")) {
|
|
454
|
+
let filePathReference;
|
|
455
|
+
try {
|
|
456
|
+
filePathReference = fileURLToPath(reference);
|
|
457
|
+
} catch {
|
|
458
|
+
fail(`${relativeToAsset(sourcePath)} の file: 参照が不正です: ${reference}`);
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
validateReferenceTarget(sourcePath, reference, filePathReference);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const withoutSuffix = reference.split(/[?#]/, 1)[0];
|
|
466
|
+
if (!withoutSuffix) return;
|
|
467
|
+
|
|
468
|
+
let decoded;
|
|
469
|
+
try {
|
|
470
|
+
decoded = decodeURIComponent(withoutSuffix);
|
|
471
|
+
} catch {
|
|
472
|
+
fail(`${relativeToAsset(sourcePath)} の参照を URL デコードできません: ${reference}`);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
validateReferenceTarget(sourcePath, reference, path.resolve(path.dirname(sourcePath), decoded));
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function validateReferenceTarget(sourcePath, reference, targetPath) {
|
|
480
|
+
const relativeTarget = path.relative(assetDir, targetPath);
|
|
481
|
+
if (relativeTarget.startsWith("..") || path.isAbsolute(relativeTarget)) {
|
|
482
|
+
fail(`${relativeToAsset(sourcePath)} が素材ディレクトリ外を参照しています: ${reference}`);
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
if (!isRegularFile(targetPath)) {
|
|
486
|
+
fail(`${relativeToAsset(sourcePath)} の参照ファイルが見つかりません: ${reference}`);
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
try {
|
|
491
|
+
const realAssetDir = fs.realpathSync(assetDir);
|
|
492
|
+
const realTargetPath = fs.realpathSync(targetPath);
|
|
493
|
+
const realRelativeTarget = path.relative(realAssetDir, realTargetPath);
|
|
494
|
+
if (realRelativeTarget.startsWith("..") || path.isAbsolute(realRelativeTarget)) {
|
|
495
|
+
fail(`${relativeToAsset(sourcePath)} が symlink 経由で素材ディレクトリ外を参照しています: ${reference}`);
|
|
496
|
+
}
|
|
497
|
+
} catch (error) {
|
|
498
|
+
fail(`${relativeToAsset(sourcePath)} の参照先を解決できません: ${reference}: ${messageOf(error)}`);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function isExternalReference(reference) {
|
|
503
|
+
return (
|
|
504
|
+
!reference ||
|
|
505
|
+
reference.startsWith("#") ||
|
|
506
|
+
reference.startsWith("//") ||
|
|
507
|
+
reference.startsWith("var(") ||
|
|
508
|
+
/^(?:https?|data|blob|mailto|javascript):/i.test(reference)
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
function isPathLikeReference(reference) {
|
|
513
|
+
return /^(?:\.{0,2}\/|file:)/.test(reference);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function validateStringArray(value, label) {
|
|
517
|
+
if (!Array.isArray(value)) {
|
|
518
|
+
fail(`${label} は配列である必要があります`);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const seen = new Set();
|
|
523
|
+
for (const [index, item] of value.entries()) {
|
|
524
|
+
validateNonEmptyString(item, `${label}[${index}]`);
|
|
525
|
+
if (typeof item === "string") {
|
|
526
|
+
if (seen.has(item)) fail(`${label} に重複があります: ${item}`);
|
|
527
|
+
seen.add(item);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
function validateNonEmptyString(value, label) {
|
|
533
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
534
|
+
fail(`${label} は空でない文字列である必要があります`);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
function listRegularFiles(directory) {
|
|
539
|
+
const files = [];
|
|
540
|
+
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
541
|
+
const entryPath = path.join(directory, entry.name);
|
|
542
|
+
if (entry.isDirectory()) files.push(...listRegularFiles(entryPath));
|
|
543
|
+
else if (entry.isFile()) files.push(entryPath);
|
|
544
|
+
}
|
|
545
|
+
return files;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
function isDirectory(filePath) {
|
|
549
|
+
try {
|
|
550
|
+
return fs.statSync(filePath).isDirectory();
|
|
551
|
+
} catch {
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
function isRegularFile(filePath) {
|
|
557
|
+
try {
|
|
558
|
+
return fs.statSync(filePath).isFile();
|
|
559
|
+
} catch {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
function isPlainObject(value) {
|
|
565
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
function isFiniteNumber(value) {
|
|
569
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
function hasOwn(value, key) {
|
|
573
|
+
return Object.prototype.hasOwnProperty.call(value, key);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
function relativeToAsset(filePath) {
|
|
577
|
+
return path.relative(assetDir, filePath) || ".";
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
function messageOf(error) {
|
|
581
|
+
return error instanceof Error ? error.message : String(error);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
function fail(message) {
|
|
585
|
+
errors.push(message);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
function finish() {
|
|
589
|
+
if (errors.length > 0) {
|
|
590
|
+
console.error(`NG: ${assetDir}`);
|
|
591
|
+
for (const error of errors) console.error(`- ${error}`);
|
|
592
|
+
process.exit(1);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
console.log(`OK: ${assetDir}`);
|
|
596
|
+
process.exit(0);
|
|
597
|
+
}
|