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,316 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// captions.json v0 のレコード、語タイミング、テキストスタイルを依存ゼロで検証する。
|
|
4
|
+
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
|
|
9
|
+
const HEX_COLOR = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
|
|
10
|
+
const CAPTION_ID = /^c-\d{4}$/;
|
|
11
|
+
const LEGACY_CAPTION_ID = /^caption-[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
12
|
+
const CAPTION_STYLES = new Set(["karaoke", "pop", "reveal"]);
|
|
13
|
+
const CAPTION_ZONES = new Set([
|
|
14
|
+
"top-left",
|
|
15
|
+
"top",
|
|
16
|
+
"top-right",
|
|
17
|
+
"left",
|
|
18
|
+
"center",
|
|
19
|
+
"right",
|
|
20
|
+
"bottom-left",
|
|
21
|
+
"bottom",
|
|
22
|
+
"bottom-right",
|
|
23
|
+
]);
|
|
24
|
+
const CAPTION_FIELDS = new Set([
|
|
25
|
+
"id",
|
|
26
|
+
"start",
|
|
27
|
+
"end",
|
|
28
|
+
"text",
|
|
29
|
+
"speaker",
|
|
30
|
+
"sourceRef",
|
|
31
|
+
"edited",
|
|
32
|
+
"src",
|
|
33
|
+
"words",
|
|
34
|
+
"style",
|
|
35
|
+
"display_text",
|
|
36
|
+
"text_style",
|
|
37
|
+
]);
|
|
38
|
+
const REQUIRED_CAPTION_FIELDS = ["id", "start", "end", "text", "speaker", "sourceRef", "edited"];
|
|
39
|
+
const usage = "使い方: node packages/schemas/bin/validate-captions.mjs <captions.json>";
|
|
40
|
+
const captionsArgument = process.argv[2];
|
|
41
|
+
|
|
42
|
+
if (!captionsArgument || process.argv.length !== 3) {
|
|
43
|
+
console.error(usage);
|
|
44
|
+
process.exit(2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (captionsArgument === "--help" || captionsArgument === "-h") {
|
|
48
|
+
console.log(usage);
|
|
49
|
+
process.exit(0);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const captionsPath = path.resolve(captionsArgument);
|
|
53
|
+
const schemaPath = fileURLToPath(new URL("../captions.schema.json", import.meta.url));
|
|
54
|
+
const errors = [];
|
|
55
|
+
|
|
56
|
+
if (!isRegularFile(captionsPath)) {
|
|
57
|
+
fail(`captions.json が見つかりません: ${captionsPath}`);
|
|
58
|
+
finish();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
let schema;
|
|
62
|
+
try {
|
|
63
|
+
schema = JSON.parse(fs.readFileSync(schemaPath, "utf8"));
|
|
64
|
+
} catch (error) {
|
|
65
|
+
fail(`captions.schema.json を JSON として読めません: ${messageOf(error)}`);
|
|
66
|
+
finish();
|
|
67
|
+
}
|
|
68
|
+
if (schema.$id !== "urn:akari-video:schema:captions:v0") {
|
|
69
|
+
fail("captions.schema.json の $id が v0 契約と一致しません");
|
|
70
|
+
finish();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
let root;
|
|
74
|
+
try {
|
|
75
|
+
root = JSON.parse(fs.readFileSync(captionsPath, "utf8"));
|
|
76
|
+
} catch (error) {
|
|
77
|
+
fail(`captions.json を JSON として読めません: ${messageOf(error)}`);
|
|
78
|
+
finish();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
validateCaptionsRoot(root);
|
|
82
|
+
finish();
|
|
83
|
+
|
|
84
|
+
function validateCaptionsRoot(value) {
|
|
85
|
+
let captions;
|
|
86
|
+
if (Array.isArray(value)) {
|
|
87
|
+
captions = value;
|
|
88
|
+
} else if (isPlainObject(value)) {
|
|
89
|
+
for (const key of Object.keys(value)) {
|
|
90
|
+
if (key !== "default_text_style" && key !== "captions") {
|
|
91
|
+
fail(`captions.json のルートに未知のキーがあります: ${key}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (hasOwn(value, "default_text_style")) {
|
|
95
|
+
validateTextStyle(value.default_text_style, "default_text_style");
|
|
96
|
+
}
|
|
97
|
+
if (!hasOwn(value, "captions")) {
|
|
98
|
+
fail("captions.json の object ルートでは captions が必須です");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!Array.isArray(value.captions)) {
|
|
102
|
+
fail("captions は配列である必要があります");
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
captions = value.captions;
|
|
106
|
+
} else {
|
|
107
|
+
fail("captions.json のルートは配列または object である必要があります");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
validateCaptionsArray(captions);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function validateCaptionsArray(captions) {
|
|
114
|
+
const ids = new Set();
|
|
115
|
+
captions.forEach((caption, index) => {
|
|
116
|
+
const label = `captions[${index}]`;
|
|
117
|
+
if (!isPlainObject(caption)) {
|
|
118
|
+
fail(`${label} は object である必要があります`);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
for (const field of REQUIRED_CAPTION_FIELDS) {
|
|
122
|
+
if (!hasOwn(caption, field)) fail(`${label}.${field} は必須です`);
|
|
123
|
+
}
|
|
124
|
+
for (const key of Object.keys(caption)) {
|
|
125
|
+
if (!CAPTION_FIELDS.has(key)) fail(`${label} に未知のキーがあります: ${key}`);
|
|
126
|
+
}
|
|
127
|
+
if (
|
|
128
|
+
typeof caption.id !== "string"
|
|
129
|
+
|| (!CAPTION_ID.test(caption.id) && !LEGACY_CAPTION_ID.test(caption.id))
|
|
130
|
+
) {
|
|
131
|
+
fail(`${label}.id は c- に続く 4 桁の数字である必要があります`);
|
|
132
|
+
} else if (ids.has(caption.id)) {
|
|
133
|
+
fail(`captions[].id が重複しています: ${caption.id}`);
|
|
134
|
+
} else {
|
|
135
|
+
ids.add(caption.id);
|
|
136
|
+
}
|
|
137
|
+
const startValid = isFiniteNumber(caption.start) && caption.start >= 0;
|
|
138
|
+
const endValid = isFiniteNumber(caption.end) && caption.end >= 0;
|
|
139
|
+
if (!startValid || !endValid || caption.end <= caption.start) {
|
|
140
|
+
fail(`${label} は 0 <= start < end を満たす必要があります`);
|
|
141
|
+
}
|
|
142
|
+
if (!isNonEmptyString(caption.text)) {
|
|
143
|
+
fail(`${label}.text は空でない文字列である必要があります`);
|
|
144
|
+
}
|
|
145
|
+
if (caption.speaker !== null && typeof caption.speaker !== "string") {
|
|
146
|
+
fail(`${label}.speaker は文字列または null である必要があります`);
|
|
147
|
+
}
|
|
148
|
+
validateSourceRef(caption.sourceRef, `${label}.sourceRef`);
|
|
149
|
+
if (typeof caption.edited !== "boolean") {
|
|
150
|
+
fail(`${label}.edited は boolean である必要があります`);
|
|
151
|
+
}
|
|
152
|
+
if (hasOwn(caption, "src") && !isNonEmptyString(caption.src)) {
|
|
153
|
+
fail(`${label}.src は空でない文字列である必要があります`);
|
|
154
|
+
}
|
|
155
|
+
if (hasOwn(caption, "words")) validateCaptionWords(caption.words, label);
|
|
156
|
+
if (hasOwn(caption, "style") && !CAPTION_STYLES.has(caption.style)) {
|
|
157
|
+
fail(`${label}.style は karaoke/pop/reveal のいずれかである必要があります`);
|
|
158
|
+
}
|
|
159
|
+
if (hasOwn(caption, "display_text") && typeof caption.display_text !== "string") {
|
|
160
|
+
fail(`${label}.display_text は文字列である必要があります`);
|
|
161
|
+
}
|
|
162
|
+
if (hasOwn(caption, "text_style")) {
|
|
163
|
+
validateTextStyle(caption.text_style, `${label}.text_style`);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function validateSourceRef(value, label) {
|
|
169
|
+
if (value === null) return;
|
|
170
|
+
if (!isPlainObject(value)) {
|
|
171
|
+
fail(`${label} は null または object である必要があります`);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
for (const key of Object.keys(value)) {
|
|
175
|
+
if (key !== "segment") fail(`${label} に未知のキーがあります: ${key}`);
|
|
176
|
+
}
|
|
177
|
+
if (!Number.isInteger(value.segment) || value.segment < 0) {
|
|
178
|
+
fail(`${label}.segment は 0 以上の整数である必要があります`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function validateCaptionWords(value, captionLabel) {
|
|
183
|
+
if (!Array.isArray(value)) {
|
|
184
|
+
fail(`${captionLabel}.words は配列である必要があります`);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
value.forEach((word, index) => {
|
|
188
|
+
const label = `${captionLabel}.words[${index}]`;
|
|
189
|
+
if (!isPlainObject(word)) {
|
|
190
|
+
fail(`${label} は object である必要があります`);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
for (const field of ["start", "end", "text"]) {
|
|
194
|
+
if (!hasOwn(word, field)) fail(`${label}.${field} は必須です`);
|
|
195
|
+
}
|
|
196
|
+
for (const key of Object.keys(word)) {
|
|
197
|
+
if (!["start", "end", "text"].includes(key)) fail(`${label} に未知のキーがあります: ${key}`);
|
|
198
|
+
}
|
|
199
|
+
const startValid = isFiniteNumber(word.start) && word.start >= 0;
|
|
200
|
+
const endValid = isFiniteNumber(word.end) && word.end >= 0;
|
|
201
|
+
if (!startValid || !endValid || word.end < word.start) {
|
|
202
|
+
fail(`${label} は 0 <= start <= end を満たす必要があります`);
|
|
203
|
+
}
|
|
204
|
+
if (!isNonEmptyString(word.text)) {
|
|
205
|
+
fail(`${label}.text は空でない文字列である必要があります`);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function validateTextStyle(value, label) {
|
|
211
|
+
if (!isPlainObject(value)) {
|
|
212
|
+
fail(`${label} は object である必要があります`);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const allowedKeys = new Set(["color", "size_px", "stroke", "background", "zone"]);
|
|
216
|
+
for (const key of Object.keys(value)) {
|
|
217
|
+
if (!allowedKeys.has(key)) fail(`${label} に未知のキーがあります: ${key}`);
|
|
218
|
+
}
|
|
219
|
+
if (hasOwn(value, "color")) validateHexColor(value.color, `${label}.color`);
|
|
220
|
+
if (hasOwn(value, "size_px") && (!isFiniteNumber(value.size_px) || value.size_px <= 0)) {
|
|
221
|
+
fail(`${label}.size_px は 0 より大きい有限数である必要があります`);
|
|
222
|
+
}
|
|
223
|
+
if (hasOwn(value, "stroke")) validateTextStrokeStyle(value.stroke, `${label}.stroke`);
|
|
224
|
+
if (hasOwn(value, "background")) {
|
|
225
|
+
validateTextBackgroundStyle(value.background, `${label}.background`);
|
|
226
|
+
}
|
|
227
|
+
if (hasOwn(value, "zone") && !CAPTION_ZONES.has(value.zone)) {
|
|
228
|
+
fail(`${label}.zone は定義済みの 9 値のいずれかである必要があります`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function validateTextStrokeStyle(value, label) {
|
|
233
|
+
if (!isPlainObject(value)) {
|
|
234
|
+
fail(`${label} は object である必要があります`);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
for (const key of Object.keys(value)) {
|
|
238
|
+
if (key !== "color" && key !== "width_px") fail(`${label} に未知のキーがあります: ${key}`);
|
|
239
|
+
}
|
|
240
|
+
if (hasOwn(value, "color")) validateHexColor(value.color, `${label}.color`);
|
|
241
|
+
if (hasOwn(value, "width_px") && (!isFiniteNumber(value.width_px) || value.width_px < 0)) {
|
|
242
|
+
fail(`${label}.width_px は 0 以上の有限数である必要があります`);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function validateTextBackgroundStyle(value, label) {
|
|
247
|
+
if (!isPlainObject(value)) {
|
|
248
|
+
fail(`${label} は object である必要があります`);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const allowedKeys = new Set(["color", "opacity", "radius_px", "mode"]);
|
|
252
|
+
for (const key of Object.keys(value)) {
|
|
253
|
+
if (!allowedKeys.has(key)) fail(`${label} に未知のキーがあります: ${key}`);
|
|
254
|
+
}
|
|
255
|
+
if (hasOwn(value, "color")) validateHexColor(value.color, `${label}.color`);
|
|
256
|
+
if (
|
|
257
|
+
hasOwn(value, "opacity")
|
|
258
|
+
&& (!isFiniteNumber(value.opacity) || value.opacity < 0 || value.opacity > 1)
|
|
259
|
+
) {
|
|
260
|
+
fail(`${label}.opacity は 0 から 1 の範囲の有限数である必要があります`);
|
|
261
|
+
}
|
|
262
|
+
if (hasOwn(value, "radius_px") && (!isFiniteNumber(value.radius_px) || value.radius_px < 0)) {
|
|
263
|
+
fail(`${label}.radius_px は 0 以上の有限数である必要があります`);
|
|
264
|
+
}
|
|
265
|
+
if (hasOwn(value, "mode") && value.mode !== "per-line" && value.mode !== "block") {
|
|
266
|
+
fail(`${label}.mode は per-line または block である必要があります`);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function validateHexColor(value, label) {
|
|
271
|
+
if (typeof value !== "string" || !HEX_COLOR.test(value)) {
|
|
272
|
+
fail(`${label} は #RGB/#RRGGBB/#RRGGBBAA 形式の hex カラーである必要があります`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function isRegularFile(filePath) {
|
|
277
|
+
try {
|
|
278
|
+
return fs.statSync(filePath).isFile();
|
|
279
|
+
} catch {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function isPlainObject(value) {
|
|
285
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function isFiniteNumber(value) {
|
|
289
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function isNonEmptyString(value) {
|
|
293
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function hasOwn(value, key) {
|
|
297
|
+
return Object.prototype.hasOwnProperty.call(value, key);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function messageOf(error) {
|
|
301
|
+
return error instanceof Error ? error.message : String(error);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function fail(message) {
|
|
305
|
+
errors.push(message);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function finish() {
|
|
309
|
+
if (errors.length > 0) {
|
|
310
|
+
console.error(`NG: ${captionsPath}`);
|
|
311
|
+
for (const error of errors) console.error(`- ${error}`);
|
|
312
|
+
process.exit(1);
|
|
313
|
+
}
|
|
314
|
+
console.log(`OK: ${captionsPath}`);
|
|
315
|
+
process.exit(0);
|
|
316
|
+
}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// connections.json 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-connections.mjs <connections.json>";
|
|
10
|
+
const connectionsArgument = process.argv[2];
|
|
11
|
+
|
|
12
|
+
if (!connectionsArgument || process.argv.length !== 3) {
|
|
13
|
+
console.error(usage);
|
|
14
|
+
process.exit(2);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (connectionsArgument === "--help" || connectionsArgument === "-h") {
|
|
18
|
+
console.log(usage);
|
|
19
|
+
process.exit(0);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const connectionsPath = path.resolve(connectionsArgument);
|
|
23
|
+
const schemaPath = fileURLToPath(new URL("../connections.schema.json", import.meta.url));
|
|
24
|
+
const errors = [];
|
|
25
|
+
|
|
26
|
+
if (!isRegularFile(connectionsPath)) {
|
|
27
|
+
fail(`connections.json が見つかりません: ${connectionsPath}`);
|
|
28
|
+
finish();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let schema;
|
|
32
|
+
try {
|
|
33
|
+
schema = JSON.parse(fs.readFileSync(schemaPath, "utf8"));
|
|
34
|
+
} catch (error) {
|
|
35
|
+
fail(`connections.schema.json を JSON として読めません: ${messageOf(error)}`);
|
|
36
|
+
finish();
|
|
37
|
+
}
|
|
38
|
+
if (schema.$id !== "urn:akari-video:schema:connections:v0") {
|
|
39
|
+
fail("connections.schema.json の $id が v0 契約と一致しません");
|
|
40
|
+
finish();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let connections;
|
|
44
|
+
try {
|
|
45
|
+
connections = JSON.parse(fs.readFileSync(connectionsPath, "utf8"));
|
|
46
|
+
} catch (error) {
|
|
47
|
+
fail(`connections.json を JSON として読めません: ${messageOf(error)}`);
|
|
48
|
+
finish();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
validateConnections(connections);
|
|
52
|
+
finish();
|
|
53
|
+
|
|
54
|
+
function validateConnections(value) {
|
|
55
|
+
if (!isPlainObject(value)) {
|
|
56
|
+
fail("connections.json のルートは object である必要があります");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
validateFields(value, ["providers", "policy"], ["providers", "policy", "memory"], "ルート");
|
|
60
|
+
validateProviders(value.providers);
|
|
61
|
+
validatePolicy(value.policy);
|
|
62
|
+
if (hasOwn(value, "memory")) validateMemory(value.memory);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function validateProviders(value) {
|
|
66
|
+
if (!Array.isArray(value)) {
|
|
67
|
+
fail("providers は配列である必要があります");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const ids = new Set();
|
|
71
|
+
for (const [index, provider] of value.entries()) {
|
|
72
|
+
const label = `providers[${index}]`;
|
|
73
|
+
if (!isPlainObject(provider)) {
|
|
74
|
+
fail(`${label} は object である必要があります`);
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const fields = ["id", "kind", "auth", "env", "models", "notes", "doctor"];
|
|
78
|
+
validateFields(provider, fields, fields, label);
|
|
79
|
+
validateNonEmptyString(provider.id, `${label}.id`);
|
|
80
|
+
if (typeof provider.id === "string") {
|
|
81
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(provider.id)) {
|
|
82
|
+
fail(`${label}.id は英小文字・数字の kebab-case である必要があります`);
|
|
83
|
+
}
|
|
84
|
+
if (ids.has(provider.id)) fail(`provider id が重複しています: ${provider.id}`);
|
|
85
|
+
ids.add(provider.id);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
validateEnum(provider.kind, ["genai", "image", "video", "tts", "music", "sns", "analytics"], `${label}.kind`);
|
|
89
|
+
validateEnum(provider.auth, ["login", "env-key", "oauth-mcp", "none"], `${label}.auth`);
|
|
90
|
+
if (provider.auth === "env-key") {
|
|
91
|
+
if (typeof provider.env !== "string" || !/^\$\{[A-Za-z_][A-Za-z0-9_]*\}$/.test(provider.env)) {
|
|
92
|
+
fail(`${label}.env は env-key 認証では \${KEY_NAME} 形式である必要があります`);
|
|
93
|
+
}
|
|
94
|
+
} else if (provider.env !== null) {
|
|
95
|
+
fail(`${label}.env は login / oauth-mcp 認証では null である必要があります`);
|
|
96
|
+
}
|
|
97
|
+
validateModels(provider.models, `${label}.models`);
|
|
98
|
+
validateNotes(provider.notes, `${label}.notes`, provider.auth);
|
|
99
|
+
validateDoctor(provider.doctor, `${label}.doctor`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function validateModels(value, label) {
|
|
104
|
+
if (!isPlainObject(value)) {
|
|
105
|
+
fail(`${label} は object である必要があります`);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
validateFields(value, ["default", "allowed"], ["default", "allowed"], label);
|
|
109
|
+
if (value.default !== null) validateNonEmptyString(value.default, `${label}.default`);
|
|
110
|
+
validateStringArray(value.allowed, `${label}.allowed`);
|
|
111
|
+
if (typeof value.default === "string" && Array.isArray(value.allowed) && !value.allowed.includes(value.default)) {
|
|
112
|
+
fail(`${label}.default は allowed に含まれている必要があります`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function validateNotes(value, label, auth) {
|
|
117
|
+
if (!isPlainObject(value)) {
|
|
118
|
+
fail(`${label} は object である必要があります`);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const fields = ["description", "workflows", "billing", "quota", "scopes", "setup_url"];
|
|
122
|
+
validateFields(value, fields, fields, label);
|
|
123
|
+
for (const field of ["description", "billing", "quota"]) {
|
|
124
|
+
validateNonEmptyString(value[field], `${label}.${field}`);
|
|
125
|
+
}
|
|
126
|
+
validateStringArray(value.workflows, `${label}.workflows`);
|
|
127
|
+
validateStringArray(value.scopes, `${label}.scopes`);
|
|
128
|
+
if (value.setup_url !== null) validateHttpsUrl(value.setup_url, `${label}.setup_url`);
|
|
129
|
+
if (auth === "env-key" && value.setup_url === null) {
|
|
130
|
+
fail(`${label}.setup_url は env-key の取得先案内に必要です`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function validateDoctor(value, label) {
|
|
135
|
+
if (!isPlainObject(value)) {
|
|
136
|
+
fail(`${label} は object である必要があります`);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
validateFields(value, ["status"], ["last_checked", "status", "detail"], label);
|
|
140
|
+
validateEnum(
|
|
141
|
+
value.status,
|
|
142
|
+
["ok", "unauthorized", "unconfigured", "unchecked", "setup_required"],
|
|
143
|
+
`${label}.status`,
|
|
144
|
+
);
|
|
145
|
+
if (hasOwn(value, "last_checked") && value.last_checked !== null) {
|
|
146
|
+
if (typeof value.last_checked !== "string" || !isIsoDateTime(value.last_checked)) {
|
|
147
|
+
fail(`${label}.last_checked は null または ISO 8601 日時である必要があります`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (hasOwn(value, "detail")) validateNonEmptyString(value.detail, `${label}.detail`);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function validateMemory(value) {
|
|
154
|
+
if (!Array.isArray(value)) {
|
|
155
|
+
fail("memory は配列である必要があります");
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const names = new Set();
|
|
159
|
+
for (const [index, connection] of value.entries()) {
|
|
160
|
+
const label = `memory[${index}]`;
|
|
161
|
+
if (!isPlainObject(connection)) {
|
|
162
|
+
fail(`${label} は object である必要があります`);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
const required = ["name", "root"];
|
|
166
|
+
const allowed = ["name", "root", "entry", "include", "exclude", "read_policy"];
|
|
167
|
+
validateFields(connection, required, allowed, label);
|
|
168
|
+
validateNonEmptyString(connection.name, `${label}.name`);
|
|
169
|
+
if (typeof connection.name === "string") {
|
|
170
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(connection.name)) {
|
|
171
|
+
fail(`${label}.name は英小文字・数字の kebab-case である必要があります`);
|
|
172
|
+
}
|
|
173
|
+
if (names.has(connection.name)) fail(`memory name が重複しています: ${connection.name}`);
|
|
174
|
+
names.add(connection.name);
|
|
175
|
+
}
|
|
176
|
+
validateNonEmptyString(connection.root, `${label}.root`);
|
|
177
|
+
if (hasOwn(connection, "entry")) validateNonEmptyString(connection.entry, `${label}.entry`);
|
|
178
|
+
if (hasOwn(connection, "include")) validateStringArray(connection.include, `${label}.include`);
|
|
179
|
+
if (hasOwn(connection, "exclude")) validateStringArray(connection.exclude, `${label}.exclude`);
|
|
180
|
+
if (hasOwn(connection, "read_policy") && connection.read_policy !== "read-only") {
|
|
181
|
+
fail(`${label}.read_policy は read-only である必要があります`);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function validatePolicy(value) {
|
|
187
|
+
const label = "policy";
|
|
188
|
+
if (!isPlainObject(value)) {
|
|
189
|
+
fail(`${label} は object である必要があります`);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const fields = ["currency", "monthly_budget", "approval_threshold"];
|
|
193
|
+
validateFields(value, fields, fields, label);
|
|
194
|
+
if (typeof value.currency !== "string" || !/^[A-Z]{3}$/.test(value.currency)) {
|
|
195
|
+
fail("policy.currency は 3 文字の大文字通貨コードである必要があります");
|
|
196
|
+
}
|
|
197
|
+
for (const field of ["monthly_budget", "approval_threshold"]) {
|
|
198
|
+
const item = value[field];
|
|
199
|
+
if (item !== null && (!isFiniteNumber(item) || item < 0)) {
|
|
200
|
+
fail(`policy.${field} は null または 0 以上の有限数である必要があります`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function validateFields(value, required, allowed, label) {
|
|
206
|
+
for (const field of required) {
|
|
207
|
+
if (!hasOwn(value, field)) fail(`${label}.${field} は必須です`);
|
|
208
|
+
}
|
|
209
|
+
for (const field of Object.keys(value)) {
|
|
210
|
+
if (!allowed.includes(field)) fail(`${label}.${field} は未定義のフィールドです`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function validateStringArray(value, label) {
|
|
215
|
+
if (!Array.isArray(value)) {
|
|
216
|
+
fail(`${label} は配列である必要があります`);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
const seen = new Set();
|
|
220
|
+
for (const [index, item] of value.entries()) {
|
|
221
|
+
validateNonEmptyString(item, `${label}[${index}]`);
|
|
222
|
+
if (typeof item === "string") {
|
|
223
|
+
if (seen.has(item)) fail(`${label} に重複があります: ${item}`);
|
|
224
|
+
seen.add(item);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function validateNonEmptyString(value, label) {
|
|
230
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
231
|
+
fail(`${label} は空でない文字列である必要があります`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function validateEnum(value, allowed, label) {
|
|
236
|
+
if (typeof value !== "string" || !allowed.includes(value)) {
|
|
237
|
+
fail(`${label} は ${allowed.join(" / ")} のいずれかである必要があります`);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function validateHttpsUrl(value, label) {
|
|
242
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
243
|
+
fail(`${label} は空でない文字列である必要があります`);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
try {
|
|
247
|
+
const parsed = new URL(value);
|
|
248
|
+
if (parsed.protocol !== "https:") fail(`${label} は https URL である必要があります`);
|
|
249
|
+
} catch {
|
|
250
|
+
fail(`${label} は有効な URL である必要があります`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function isIsoDateTime(value) {
|
|
255
|
+
const timestamp = Date.parse(value);
|
|
256
|
+
return Number.isFinite(timestamp) && /^\d{4}-\d{2}-\d{2}T/.test(value);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function isRegularFile(filePath) {
|
|
260
|
+
try {
|
|
261
|
+
return fs.statSync(filePath).isFile();
|
|
262
|
+
} catch {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function isPlainObject(value) {
|
|
268
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function isFiniteNumber(value) {
|
|
272
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function hasOwn(value, key) {
|
|
276
|
+
return Object.prototype.hasOwnProperty.call(value, key);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function messageOf(error) {
|
|
280
|
+
return error instanceof Error ? error.message : String(error);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function fail(message) {
|
|
284
|
+
errors.push(message);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function finish() {
|
|
288
|
+
if (errors.length > 0) {
|
|
289
|
+
console.error(`NG: ${connectionsPath}`);
|
|
290
|
+
for (const error of errors) console.error(`- ${error}`);
|
|
291
|
+
process.exit(1);
|
|
292
|
+
}
|
|
293
|
+
console.log(`OK: ${connectionsPath}`);
|
|
294
|
+
process.exit(0);
|
|
295
|
+
}
|