ae-agent-setup 0.2.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.
Files changed (34) hide show
  1. package/CSXS/manifest.xml +44 -0
  2. package/README.ja.md +249 -0
  3. package/README.md +249 -0
  4. package/bin/ae-agent-setup.mjs +337 -0
  5. package/client/CSInterface.js +1291 -0
  6. package/client/index.html +64 -0
  7. package/client/lib/bridge_utils.js +56 -0
  8. package/client/lib/logging.js +10 -0
  9. package/client/lib/request_handlers.js +468 -0
  10. package/client/lib/request_handlers_essential.js +35 -0
  11. package/client/lib/request_handlers_layer_structure.js +180 -0
  12. package/client/lib/request_handlers_scene.js +38 -0
  13. package/client/lib/request_handlers_shape.js +288 -0
  14. package/client/lib/request_handlers_timeline.js +115 -0
  15. package/client/lib/runtime.js +35 -0
  16. package/client/lib/server.js +33 -0
  17. package/client/main.js +1 -0
  18. package/host/index.jsx +11 -0
  19. package/host/json2.js +504 -0
  20. package/host/lib/common.jsx +128 -0
  21. package/host/lib/mutation_handlers.jsx +358 -0
  22. package/host/lib/mutation_keyframe_handlers.jsx +265 -0
  23. package/host/lib/mutation_layer_structure_handlers.jsx +235 -0
  24. package/host/lib/mutation_scene_handlers.jsx +1226 -0
  25. package/host/lib/mutation_shape_handlers.jsx +358 -0
  26. package/host/lib/mutation_timeline_handlers.jsx +137 -0
  27. package/host/lib/property_utils.jsx +105 -0
  28. package/host/lib/query_handlers.jsx +427 -0
  29. package/package.json +21 -0
  30. package/scripts/signing/build-zxp.sh +56 -0
  31. package/scripts/signing/create-dev-cert.sh +97 -0
  32. package/scripts/signing/install-zxp.sh +29 -0
  33. package/templates/skills/aftereffects-cli.SKILL.md +74 -0
  34. package/templates/skills/aftereffects-declarative.SKILL.md +112 -0
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: aftereffects-declarative
3
+ description: Primary After Effects workflow using ae-cli apply-scene with declarative JSON (composition/layers/animations/expressions/parent/repeater/effect params). Use this by default for composition building.
4
+ ---
5
+
6
+ # aftereffects-declarative
7
+
8
+ After Effects を宣言型 JSON で構築する標準スキル。
9
+ **新規構築・再実行性の高い編集でこのスキルを優先**し、既存シーンの外科的な部分修正は命令型スキルを優先する。
10
+
11
+ ## 目的
12
+
13
+ - 1ファイルの scene JSON で comp 構成を一括適用
14
+ - 再実行時は `layers[].id` で upsert 再利用
15
+ - 人手編集後も再適用しやすい運用に寄せる
16
+
17
+ ## 使い分け(重要)
18
+
19
+ - 宣言型を使う:
20
+ - 新規 comp / 新規レイヤー群を組み上げる
21
+ - 同種変更を複数箇所へ展開する
22
+ - scene JSON を成果物として残し、再実行可能にしたい
23
+ - 命令型(`aftereffects-cli-legacy`)を使う:
24
+ - 人間が作った既存シーン(scene JSON 未管理)へ部分修正を入れる
25
+ - 複雑な既存レイヤーに expression をピンポイント適用する
26
+ - comp 全体の再宣言を避け、局所的に安全修正したい
27
+ - 併用方針:
28
+ - まず命令型で調査・局所修正し、安定して繰り返す段階で宣言型へ移行する
29
+
30
+ ## 基本フロー
31
+
32
+ 1. 疎通確認: `ae-cli health`
33
+ 2. scene JSON を作成/更新(作業中は `work/` 配下)
34
+ 3. `--validate-only` で検証
35
+ 4. 実適用
36
+ 5. `layers` / `properties` / `expression-errors` で確認
37
+ 6. 完了版は `done/` 配下へコピーして保管
38
+
39
+ ## ファイル運用ルール(重要)
40
+
41
+ - `work/`: 作業中の scene JSON を置くディレクトリ
42
+ - `done/`: 完了した scene JSON の保管ディレクトリ
43
+ - どちらもリポジトリにはコミットしない(`.gitignore` 前提)
44
+ - 例:
45
+ - `ae-cli apply-scene --scene-file work/main.scene.json --validate-only`
46
+ - `ae-cli apply-scene --scene-file work/main.scene.json`
47
+
48
+ ## コマンド
49
+
50
+ ```bash
51
+ ae-cli health
52
+ ae-cli apply-scene --scene-file <scene.json> --validate-only
53
+ ae-cli apply-scene --scene-file <scene.json>
54
+ ae-cli apply-scene --scene-file <scene.json> --mode replace-managed
55
+ ae-cli apply-scene --scene-file <scene.json> --mode clear-all
56
+ ae-cli layers
57
+ ae-cli properties --layer-name <layer> --include-group <group> --include-group-children
58
+ ae-cli expression-errors
59
+ ```
60
+
61
+ ### apply mode 指針
62
+
63
+ - `merge`(既定): 既存維持 + 宣言分だけ upsert
64
+ - `replace-managed`: `aeSceneId:*` の管理対象だけ差し替え
65
+ - `clear-all`: comp を空にして完全再宣言
66
+
67
+ ## scene 設計ルール
68
+
69
+ - 正式スキーマは `schemas/scene.schema.json` を参照
70
+ - `layers[].id` は必須推奨(upsert の安定キー)
71
+ - `layers[].parentId` は scene id を参照
72
+ - アニメーション対象プロパティは `animations` で管理
73
+ - 3Dベクトルには2D入力可(`[x,y] -> [x,y,0]` 自動補完)
74
+ - Repeater は `layers[].repeaters[]`
75
+ - Effect 値は `layers[].effects[].params[]`
76
+ - expression は `layers[].expressions[]`
77
+ - Essential Graphics は `layers[].essentialProperties[]`
78
+ - expression 内の effect 参照は表示名ではなく matchName を推奨(例: `ADBE Slider Control-0001`)
79
+
80
+ ## propertyPath 運用ルール(汎用)
81
+
82
+ - 目的: 実装コードを読まずに `propertyPath` を安定して決める。
83
+ - `propertyPath` は基本的に matchName ベースで指定する(表示名依存を避ける)。
84
+ - 適用前に `ae-cli properties` で対象レイヤーの実パスを確認し、出力に合わせて JSON へ転記する。
85
+ - Shape 内部プロパティは次の順で辿る:
86
+ - `ADBE Root Vectors Group`(Contents)
87
+ - `ADBE Vector Group`
88
+ - `ADBE Vectors Group`
89
+ - 各要素(例: Shape Path / Fill / Stroke / Filter)
90
+ - Effect パラメータ参照は `layers[].effects[].params[]` でも expression でも matchName 優先にする。
91
+ - 迷ったら「推測で書く」のではなく、先に `properties` 出力を正として合わせる。
92
+
93
+ ## 標準デバッグ手順(実装コードを読まない)
94
+
95
+ 1. `ae-cli apply-scene --scene-file <scene.json> --validate-only`
96
+ 2. `ae-cli apply-scene --scene-file <scene.json>`
97
+ 3. `ae-cli expression-errors` で失敗箇所を確認
98
+ 4. 対象レイヤーに対して `ae-cli properties --layer-name <layer> --include-group <group> --include-group-children` を実行し、`propertyPath` を再特定
99
+ 5. scene JSON の `propertyPath` を修正して再適用
100
+
101
+ ## トラブル時
102
+
103
+ - validation 失敗:
104
+ - JSON構造と型を確認
105
+ - expression が効かない:
106
+ - `ae-cli expression-errors`
107
+ - 意図しない新規レイヤー作成:
108
+ - `layers[].id` 未指定/変更を確認
109
+ - 旧レイヤーが残る:
110
+ - `apply-scene --mode replace-managed` または `--mode clear-all` を使う
111
+ - 既存シーンへ局所修正したい / 宣言型で表現しづらい:
112
+ - `aftereffects-cli-legacy` へ切り替え