akari-video 0.1.21 → 0.1.23

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 (26) hide show
  1. package/package.json +1 -1
  2. package/src/migrate-command.mjs +11 -2
  3. package/vendor/.akari-capability-sources.json +3 -0
  4. package/vendor/docs/contract-2026-07-25-project-structure-v0.md +17 -0
  5. package/vendor/docs/contract-2026-08-02-preview-parity.md +39 -0
  6. package/vendor/packages/akari-launcher/package.json +1 -1
  7. package/vendor/packages/analysis-report/package.json +4 -8
  8. package/vendor/packages/analysis-report/render-analysis-report.mjs +544 -0
  9. package/vendor/packages/analysis-report/template.html +2023 -0
  10. package/vendor/packages/edit-lint/src/edit-lint.mjs +20 -0
  11. package/vendor/packages/edit-store/lib/caption-display.d.ts +10 -0
  12. package/vendor/packages/edit-store/lib/caption-display.js +57 -0
  13. package/vendor/packages/edit-store/lib/index.d.ts +1 -0
  14. package/vendor/packages/edit-store/lib/index.js +1 -0
  15. package/vendor/packages/edit-store/lib/internal-model.js +20 -8
  16. package/vendor/packages/edit-store/lib/migrate/index.d.ts +2 -0
  17. package/vendor/packages/edit-store/lib/migrate/index.js +32 -15
  18. package/vendor/packages/edit-store/lib/transition-visual.d.ts +23 -0
  19. package/vendor/packages/edit-store/lib/transition-visual.js +141 -0
  20. package/vendor/packages/edit-store/lib/webview-kernel.d.ts +2 -0
  21. package/vendor/packages/edit-store/lib/webview-kernel.js +139 -0
  22. package/vendor/packages/frame-engine/README.ja.md +24 -0
  23. package/vendor/packages/frame-engine/README.md +24 -0
  24. package/vendor/packages/frame-engine/package.json +27 -0
  25. package/vendor/packages/preview-engine/README.md +38 -0
  26. package/vendor/packages/preview-server/package.json +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akari-video",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "AKARI Video launcher CLI — start an AI-edited video project from any directory: scaffold, connection check, then hand over to Claude Code (or opencode). AKARI Video を opencode や Claude Code で、どのディレクトリからでも始めるための `akari` ランチャー CLI。接続確認(doctor)→ 未セットアップならプロジェクト雛形を作成 → AI エージェントを起動する。外部 npm 依存ゼロ(Node.js 組み込みモジュールのみ)。",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,15 +22,24 @@ export async function runMigrateCommand(args, options = {}) {
22
22
  }
23
23
  const projectRoot = parsed.projectRoot;
24
24
  const editPath = path.join(projectRoot, 'edit.json');
25
+ const captionsPath = path.join(projectRoot, 'captions.json');
26
+ const readText = options.readFile ?? readFile;
25
27
  let text;
26
28
  try {
27
- text = await (options.readFile ?? readFile)(editPath, 'utf8');
29
+ text = await readText(editPath, 'utf8');
28
30
  } catch (cause) {
29
31
  error(`edit.json を読めません: ${editPath} (${messageOf(cause)})`);
30
32
  return { exitCode: 2 };
31
33
  }
32
34
  const migrate = options.migrate ?? loadMigrateModule(options.assets ?? resolveLauncherAssets());
33
- const proposal = migrate.planMigration(projectRoot, editPath, text, { now: options.now });
35
+ let captionsRoot;
36
+ try {
37
+ captionsRoot = JSON.parse(await readText(captionsPath, 'utf8'));
38
+ } catch {
39
+ // captions.json の不在・読み取り失敗・壊れた JSON は cue なしとして移行を続ける。
40
+ }
41
+ const hasCaptions = migrate.captionsHaveRenderableCues(captionsRoot);
42
+ const proposal = migrate.planMigration(projectRoot, editPath, text, { hasCaptions, now: options.now });
34
43
  if (proposal.ok === false) {
35
44
  if (parsed.json) {
36
45
  log(JSON.stringify({ ok: false, error: 'このプロジェクトは変換できません', blockers: proposal.blockers }));
@@ -60,6 +60,9 @@
60
60
  "packages/edit-lint/package.json",
61
61
  "packages/edit-store/package.json",
62
62
  "packages/export-nle/package.json",
63
+ "packages/frame-engine/package.json",
64
+ "packages/frame-engine/README.ja.md",
65
+ "packages/frame-engine/README.md",
63
66
  "packages/intake-form/package.json",
64
67
  "packages/intake-form/README.md",
65
68
  "packages/matte-rvm/package.json",
@@ -1,3 +1,9 @@
1
+ ---
2
+ lifecycle: draft
3
+ created: 2026-07-25
4
+ updated: 2026-08-26
5
+ ---
6
+
1
7
  # project-structure-v0(生成物の置き場所)契約
2
8
 
3
9
  - 日付: 2026-07-25
@@ -60,6 +66,17 @@
60
66
  3 ファイル以外の生成物は、性質に応じて §1 の層へ振り分ける(具体例は §4)
61
67
  - 新しいトップレベル契約ファイルを追加する場合(将来の話)は、本契約の改訂を通す
62
68
 
69
+ #### 2026-08-26 追記: ルート直下の判断記録・分析レポート
70
+
71
+ - `decision-log.md` は analyze-project と edit-plan が共同追記する判断履歴の単一 SSOT であり、
72
+ プロジェクトルート直下の正当な契約ファイルとする(根拠:
73
+ `skills/edit-plan/report-guide.md` の `decision_log` 節)
74
+ - `analysis-report.html` は analyze-project が生成し edit-plan が読む正式な分析レポートであり、
75
+ プロジェクトルート直下の正当な契約ファイルとする(根拠:
76
+ `skills/edit-plan/workflow.md` §1)
77
+ - この追記は上記 2 ファイルを §2-1 の許可リストへ追加するものであり、その他のファイルに
78
+ ルート直下配置を許可しない
79
+
63
80
  ### 2-2. 削除安全の定義
64
81
 
65
82
  `.akari/work/` と `.akari/cache/` は**再生成可能・削除安全**と定義する。
@@ -581,3 +581,42 @@ ffmpeg の `perspective` フィルタの制約(式に時刻変数を持たな
581
581
  段階計画・差分マップの正本: 内部リポ `planning/notes-2026-08-01-webui-shell-convergence.md`。
582
582
  Phase 2 以降(共有カーネル抽出: edit-store / ペン / タイムライン写像 / overlay-runtime 一本化)は
583
583
  本契約への適合を保ったまま実装を共通化する。
584
+
585
+ ### 4.1 `packages/preview-engine` の処遇 — **凍結**(2026-08-27 裁定・実行済み)
586
+
587
+ WebCodecs ベースの `packages/preview-engine` は、Web UI からも shell からも import されない
588
+ 死蔵コードだった(`packages/preview-server` が `public/preview-engine.bundle.js` へバンドル・
589
+ 配信していたが、`index.html` / `app.js` に読み込み口が無い)。本契約の 3 面
590
+ (render-cut / Web UI / shell)のどれにも属さない 4 つ目の実装であり、パリティの対象外である
591
+ ことを明記したうえで**凍結**する。
592
+
593
+ - **実行済み**: preview-server の `build` から esbuild 行を削除・追跡されていた
594
+ `public/preview-engine.bundle.js` を削除・`test/server.spec.mjs` の配信スモークを削除。
595
+ 以後 `npm run build` の成果物に preview-engine 由来のファイルは含まれない
596
+ - **削除はしない**: 合成エンジンを 1 個へ統一する「エンジン v2」路線(WebCodecs +
597
+ GPU コンポジタ)の土台候補として資産価値を実査済みであり、再利用 / 新規の裁定は
598
+ エンジン v2 のゲート(Phase 0 スパイクの実測と併せて裁定)に委ねる。
599
+ 詳細と復活手順は `packages/preview-engine/README.md` 冒頭の凍結ノートを正とする
600
+ - **凍結中の規律**: 本パッケージへ追随改修を新たに入れない。スキーマや語彙が増えても
601
+ preview-engine 側の追随は不要(誰も実行しないため、追随は保守錯覚にしかならない)
602
+
603
+ ### 4.2 ducking(BGM の narration ダッキング)の実装本数と正本
604
+
605
+ §2.5 が定める「narration 再生区間で BGM -12dB」は、**プレビュー側に 3 実装ある**:
606
+
607
+ | 面 | 実装 | 位置づけ |
608
+ |---|---|---|
609
+ | Web UI | `packages/preview-server/public/app.js`(`hasNarration` / `duckDb`) | 稼働中 |
610
+ | shell | `apps/shell/extensions/akari-preview/src/browser/akari-preview-open-handler.ts`(`duckGainDbAt`) | 稼働中 |
611
+ | preview-engine | `packages/preview-engine/src/duckingGain.ts`(純関数 + `node --test`) | **凍結(§4.1)** |
612
+
613
+ - **現時点で 3 者は数値的に同値**(2026-08-27 実測: 0〜10s を 10ms 刻み × `ducking` on/off の
614
+ 2,002 点で不一致 0)。したがって本契約 §2.5 への適合は 3 面とも保たれている
615
+ - **-12dB 固定は正(render-cut)とは挙動の違う近似である**。render-cut は
616
+ `sidechaincompress=threshold=0.063:ratio=8:attack=5:release=300` で、減衰量は narration の
617
+ 実レベルに依存し attack 5ms / release 300ms の時間応答を持つ。プレビュー 3 実装は
618
+ 「区間内なら常に -12dB・立ち上がり/戻りは瞬時」であり、**§2.4 系と同じ宣言済みの近似**として扱う
619
+ - **正本の一本化は未了**(稼働中 2 実装の書き換えを伴うため別タスク)。一本化先は共有カーネル
620
+ `packages/edit-store`(`computeDuckIntervals` / `computeBgmDuckGainDb` 相当を昇格し、
621
+ shell は直接 import・Web UI は `edit-kernel.bundle.js` 経由で消費)。それまでは
622
+ **どれか 1 面の -12dB や区間規則を単独で変えないこと**(3 面同時に変えるか、一本化を先に済ませる)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akari-video",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "AKARI Video launcher CLI — start an AI-edited video project from any directory: scaffold, connection check, then hand over to Claude Code (or opencode). AKARI Video を opencode や Claude Code で、どのディレクトリからでも始めるための `akari` ランチャー CLI。接続確認(doctor)→ 未セットアップならプロジェクト雛形を作成 → AI エージェントを起動する。外部 npm 依存ゼロ(Node.js 組み込みモジュールのみ)。 [akari-video npm vendor: bin/akari.mjs is reference-only. These CLI entrypoints are not included in the akari-video npm package. Run them from a full AKARI Video app installation (normally ~/.akari/app) or a monorepo checkout.]",
5
5
  "type": "module",
6
6
  "files": [
@@ -2,16 +2,12 @@
2
2
  "name": "@akari-video/analysis-report",
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
- "description": "analysis.json(事実層)+ interpretation.json(解釈層)から読み取り専用の分析レポート HTML を生成する依存ゼロの CLI。テンプレート(template.html)は不変で、生成物はテンプレへ schema 準拠 JSON を <script type=\"application/json\"> ブロックとして埋め込むだけ。 [akari-video npm vendor: render-analysis-report.mjs is reference-only. These CLI entrypoints are not included in the akari-video npm package. Run them from a full AKARI Video app installation (normally ~/.akari/app) or a monorepo checkout.]",
5
+ "description": "analysis.json(事実層)+ interpretation.json(解釈層)から読み取り専用の分析レポート HTML を生成する依存ゼロの CLI。テンプレート(template.html)は不変で、生成物はテンプレへ schema 準拠 JSON を <script type=\"application/json\"> ブロックとして埋め込むだけ。",
6
6
  "type": "module",
7
+ "bin": {
8
+ "render-analysis-report": "render-analysis-report.mjs"
9
+ },
7
10
  "scripts": {
8
11
  "test": "node --test \"test/*.test.mjs\""
9
- },
10
- "akariVideoVendor": {
11
- "execution": "reference-only",
12
- "omittedBin": {
13
- "render-analysis-report": "render-analysis-report.mjs"
14
- },
15
- "guidance": "These CLI entrypoints are not included in the akari-video npm package. Run them from a full AKARI Video app installation (normally ~/.akari/app) or a monorepo checkout."
16
12
  }
17
13
  }