akari-video 0.1.50 → 0.1.51
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/package.json +1 -1
- package/src/cli.mjs +2 -0
- package/src/decision-log-command.mjs +20 -0
- package/src/repo-assets.mjs +4 -0
- package/vendor/docs/contract-2026-09-06-vgpu-layer-v0.md +6 -0
- package/vendor/packages/akari-launcher/package.json +1 -1
- package/vendor/packages/overlay-runtime/README.md +1 -0
- package/vendor/skills/edit-plan/autonomy.md +2 -2
- package/vendor/skills/edit-plan/execution.md +2 -2
- package/vendor/skills/render-cut/SKILL.md +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akari-video",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
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": {
|
package/src/cli.mjs
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
triggerBackgroundRefresh
|
|
23
23
|
} from './update-check.mjs';
|
|
24
24
|
import { applySelfUpdate, isRunningFromAppDir, rollbackSelfUpdate } from './self-update.mjs';
|
|
25
|
+
import { runDecisionLogCommand } from './decision-log-command.mjs';
|
|
25
26
|
import { runCaptionsCommand } from './captions-command.mjs';
|
|
26
27
|
import { runCaptureCommand } from './capture-command.mjs';
|
|
27
28
|
import { runMediaCommand } from './media-command.mjs';
|
|
@@ -44,6 +45,7 @@ export async function run(args, options = {}) {
|
|
|
44
45
|
error(`akari ${retiredBrowserCommand} は廃止されました(Chrome は不要になりました)`);
|
|
45
46
|
return { exitCode: 1 };
|
|
46
47
|
}
|
|
48
|
+
if (args[0] === 'decision-log') return runDecisionLogCommand(args.slice(1), options);
|
|
47
49
|
if (args[0] === 'captions') return runCaptionsCommand(args.slice(1), options);
|
|
48
50
|
if (args[0] === 'capture') return runCaptureCommand(args.slice(1), options);
|
|
49
51
|
if (args[0] === 'media') return runMediaCommand(args.slice(1), options);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
|
|
4
|
+
import { resolveLauncherAssets } from "./repo-assets.mjs";
|
|
5
|
+
|
|
6
|
+
export async function runDecisionLogCommand(argv, options = {}) {
|
|
7
|
+
const logError = options.error ?? options.logError ?? ((line) => console.error(line));
|
|
8
|
+
const assets = options.assets ?? resolveLauncherAssets();
|
|
9
|
+
if (!assets.decisionLogScript || !existsSync(assets.decisionLogScript)) {
|
|
10
|
+
logError("akari decision-log の実行スクリプトが見つかりません。AKARI Video を再インストールしてください。");
|
|
11
|
+
return { exitCode: 1 };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const spawn = options.spawn ?? spawnSync;
|
|
15
|
+
const result = spawn(process.execPath, [assets.decisionLogScript, ...argv], {
|
|
16
|
+
stdio: "inherit",
|
|
17
|
+
cwd: options.cwd ?? process.cwd(),
|
|
18
|
+
});
|
|
19
|
+
return { exitCode: typeof result.status === "number" ? result.status : 1 };
|
|
20
|
+
}
|
package/src/repo-assets.mjs
CHANGED
|
@@ -33,6 +33,7 @@ const AUDIO_FETCH_SCRIPT_RELATIVE = path.join('packages', 'audio-library-setup',
|
|
|
33
33
|
const ASSET_RESOLVER_CLI_RELATIVE = path.join('packages', 'asset-resolver', 'bin', 'akari-assets.mjs');
|
|
34
34
|
const BEATMAP_SCRIPT_RELATIVE = path.join('packages', 'akari-tools', 'bin', 'beatmap.mjs');
|
|
35
35
|
const PROBE_FRAME_SCRIPT_RELATIVE = path.join('packages', 'akari-tools', 'bin', 'probe-frame.mjs');
|
|
36
|
+
const DECISION_LOG_SCRIPT_RELATIVE = path.join('packages', 'akari-tools', 'bin', 'decision-log.mjs');
|
|
36
37
|
const CAPTIONS_SCRIPT_RELATIVE = path.join('packages', 'akari-tools', 'bin', 'captions.mjs');
|
|
37
38
|
const CAPTURE_SCRIPT_RELATIVE = path.join('packages', 'akari-tools', 'bin', 'capture.mjs');
|
|
38
39
|
const RENDER_WHEN_IDLE_SCRIPT_RELATIVE = path.join('packages', 'akari-tools', 'bin', 'render-when-idle.sh');
|
|
@@ -56,6 +57,7 @@ export function resolveRepoAssets(repoRoot = DEFAULT_REPO_ROOT_CANDIDATE) {
|
|
|
56
57
|
const renderWhenIdleScript = path.join(repoRoot, RENDER_WHEN_IDLE_SCRIPT_RELATIVE);
|
|
57
58
|
const eyeBarScript = path.join(repoRoot, EYE_BAR_SCRIPT_RELATIVE);
|
|
58
59
|
const mediaScript = path.join(repoRoot, 'packages', 'akari-tools', 'bin', 'media.mjs');
|
|
60
|
+
const decisionLogScript = path.join(repoRoot, DECISION_LOG_SCRIPT_RELATIVE);
|
|
59
61
|
const wordBookScript = path.join(repoRoot, 'packages', 'akari-tools', 'bin', 'word-book.mjs');
|
|
60
62
|
|
|
61
63
|
return {
|
|
@@ -75,6 +77,7 @@ export function resolveRepoAssets(repoRoot = DEFAULT_REPO_ROOT_CANDIDATE) {
|
|
|
75
77
|
renderWhenIdleScript: existsSync(renderWhenIdleScript) ? renderWhenIdleScript : null,
|
|
76
78
|
eyeBarScript: existsSync(eyeBarScript) ? eyeBarScript : null,
|
|
77
79
|
mediaScript: existsSync(mediaScript) ? mediaScript : null,
|
|
80
|
+
...(existsSync(decisionLogScript) ? { decisionLogScript } : {}),
|
|
78
81
|
...(existsSync(wordBookScript) ? { wordBookScript } : {})
|
|
79
82
|
};
|
|
80
83
|
}
|
|
@@ -111,6 +114,7 @@ export function resolveLauncherAssets({
|
|
|
111
114
|
renderWhenIdleScript: candidate.renderWhenIdleScript ?? vendor.renderWhenIdleScript,
|
|
112
115
|
eyeBarScript: candidate.eyeBarScript ?? vendor.eyeBarScript,
|
|
113
116
|
mediaScript: candidate.mediaScript ?? vendor.mediaScript,
|
|
117
|
+
...(candidate.decisionLogScript ?? vendor.decisionLogScript ? { decisionLogScript: candidate.decisionLogScript ?? vendor.decisionLogScript } : {}),
|
|
114
118
|
...(candidate.wordBookScript ?? vendor.wordBookScript
|
|
115
119
|
? { wordBookScript: candidate.wordBookScript ?? vendor.wordBookScript }
|
|
116
120
|
: {})
|
|
@@ -50,6 +50,7 @@ CPU への画素読み戻しはこの経路に追加しない。ブラウザ内
|
|
|
50
50
|
| `passes[].wgsl` | 必須、空白だけではない WGSL 文字列 |
|
|
51
51
|
| `passes[].inputs` | 先行パス id の文字列配列、最大 8 個。省略時 `[]`。自己参照・前方参照不可 |
|
|
52
52
|
| `passes[].scale` | 正の有限数、省略時 `1`。最終パスでは無視する |
|
|
53
|
+
| `passes[].format` | `pure` のみ、`"rgba8unorm"` または `"rgba16float"`。省略時 `"rgba8unorm"`。最終パスでは無視する(surface の format は vgpu の既定) |
|
|
53
54
|
|
|
54
55
|
未知のトップレベルキー・pass キー、不正 JSON、不正な値は `readDescriptor` が TypeError にする。
|
|
55
56
|
`uniforms` のキーは WGSL `Params` のメンバーに対応し、断片が
|
|
@@ -91,6 +92,9 @@ fn akari_uv(pos: vec4f) -> vec2f { return pos.xy / vec2f(akari.pad.x, akari.pad.
|
|
|
91
92
|
断片は `akari_uv(position)`、または vgpu の頂点段が供給する左上原点の `@location(0) uv` を使う。
|
|
92
93
|
`position.xy / vec2f(akari.width, akari.height)` は縮小時に構図が変わるので使わない。
|
|
93
94
|
|
|
95
|
+
`rgba16float` の中間 target は線形 HDR(> 1)をそのまま次のパスへ渡せる。
|
|
96
|
+
`rgba8unorm` は [0,1] に飽和する。
|
|
97
|
+
|
|
94
98
|
## 4. API・解像度・ツマミ
|
|
95
99
|
|
|
96
100
|
- `probe()` はページで 1 回だけ `init()` し、同じ Promise を返す。64×64 一時 surface に 2 コマ描画し、
|
|
@@ -152,6 +156,8 @@ vgpu 不在の overlay sheet には新しい script や seek 文を一切挿入
|
|
|
152
156
|
|
|
153
157
|
## 6. fail-loud と v0 の限界
|
|
154
158
|
|
|
159
|
+
- `passes[].format` の `rgba32float` は未対応(`float32-filterable` 機能に依存するため)。
|
|
160
|
+
|
|
155
161
|
- WebGPU 未提供・adapter null・初期化/試験描画失敗は `VGPU-UNAVAILABLE:` で probe を reject。
|
|
156
162
|
- device lost 後の render は `VGPU-DEVICE-LOST:` で throw。復帰や別 device への切り替えは行わない。
|
|
157
163
|
- `auto` でも `VGPU-` を含む失敗は OSR へフォールバックせずそのまま伝播する。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akari-video",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
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. Use `akari doctor --json` and run the path reported in `render_cut.path`. Full installations provide it in a monorepo checkout, ~/.akari/app, /Applications/AKARI Video.app/Contents/Resources/packages, or %LOCALAPPDATA%\\Programs\\@akari-videoshell\\resources\\packages.]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -164,6 +164,7 @@ vgpu は他の宣言型ランタイムと同じく `runtimes.mjs` に登録さ
|
|
|
164
164
|
`ready` であることを確認する。プレビューは `render(container, localTimeSeconds, { previewScale: 0.5, fps })` を呼び、
|
|
165
165
|
非表示化と unmount で `dispose(container)` を呼ぶ。非対応環境の警告はランタイムが 1 回にまとめる。
|
|
166
166
|
共有 device は container の破棄時には落とさない。
|
|
167
|
+
`pure` の中間パスは `passes[].format` に `rgba16float` を指定すると線形 HDR を保持でき、省略時は `rgba8unorm`、最終パスでは format を無視する。
|
|
167
168
|
`mode: "stateful"` の断片では `render(container, localTimeSeconds, { fps })` の `fps`(= `edit.output.fps`)が必須で、省略すると TypeError になる。
|
|
168
169
|
stateful のプレビューは上の options にも `fps` を加え、`{ previewScale: 0.5, fps }` を渡す。
|
|
169
170
|
逆戻りシークは reset + 固定ステップ replay で追従し、`maxReplaySteps` 超過は `VGPU-REPLAY-LIMIT` で失敗する。
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
1. 依頼文 + `intake.tasks` + akari.md の好みで「入れる物」を決める。**頼まれた物に加えて良さそうな物を足してよい**(B ロール・図解・テロップ演出・BGM・SE・章立て。足す判断は akari.md の調達の好み表に従う)。
|
|
33
33
|
2. 分析は事実層 `analysis.json` だけを読む。分析レポートの必読は課さない。無ければ [analyze-footage](../analyze-footage/SKILL.md) の既定(L0 + L1)を実行する。
|
|
34
34
|
3. 方針・素材計画をチャットで提示しない・承認を求めない。
|
|
35
|
-
4. **足した物 1 件ごとに `decision-log.md` へ「予測」1 行**を、タイムラインに入れるのと同じターンで書く。既存の [decision_log 表形式](report-guide.md#decision_log) を使い、ISO 8601 日時と `category = proposal` / `subject = item id または caption id` / `決定 = 何を入れたか` / `理由 = なぜ良さそうか(根拠 = analysis.json のどこ / akari.md のどの行)` / `決定者 = machine:director` / `関連 = 出所(素材 id・手段)`
|
|
35
|
+
4. **足した物 1 件ごとに `decision-log.md` へ「予測」1 行**を、タイムラインに入れるのと同じターンで書く。既存の [decision_log 表形式](report-guide.md#decision_log) を使い、ISO 8601 日時と `category = proposal` / `subject = item id または caption id` / `決定 = 何を入れたか` / `理由 = なぜ良さそうか(根拠 = analysis.json のどこ / akari.md のどの行)` / `決定者 = machine:director` / `関連 = 出所(素材 id・手段)` を記す。関連セルには必ず `sha:<提案時の item / record の canonical JSON の sha256 先頭 8 hex>` を含める。canonical JSON はオブジェクトのキーを再帰的にソートして JSON.stringify した文字列(配列の順序は保持)とする。例: `source-01 / HTML overlay sha:1a2b3c4d`(sha は提案時の実データから計算する)。頼まれた物そのもの(提案でない物)には予測行を書かない。予測行の欠落は edit-lint の warning 止まりとする。
|
|
36
36
|
5. [execution.md](execution.md) の出力ルールで v2 の `edit.json` / `captions.json` / overlays を書き、書いた直後に [edit-lint](../edit-lint/SKILL.md) を実行する。FAIL は直して再実行する。直せなければ §4 に従って止まる。原本は変更せず、`edit.json` を書くのはディレクター 1 人とし、生成物には `<file>.meta.json` の provenance を残す。字幕は `akari captions <project-dir>`(execution.md §4)を使う。
|
|
37
37
|
6. **書き出さない(render-cut を呼ばない)**。最後に「入れた物 N 件(うち提案 M 件・帳面に M 行)・lint 結果・**プレビューで見て、要らなければ消してください。書き出しはヘッダの書き出しボタン**」を報告する。この報告が唯一のチャット出力となる(§1 の offer-once と §4 の停止時の連絡を除く)。
|
|
38
|
-
7. 人間が消した / 直した / そのまま出した
|
|
38
|
+
7. 人間が消した / 直した / そのまま出した の**結果行は書き出し時**に `akari decision-log settle`(render-cut の CLI が自動で呼ぶ)が追記する。シェルの書き出しからの呼び出しは別票。
|
|
39
39
|
|
|
40
40
|
## 4. 止まる条件(3 つだけ)
|
|
41
41
|
|
|
@@ -169,8 +169,8 @@ akari captions <project-dir>
|
|
|
169
169
|
- **次 caption の start まで引き伸ばさない**(敷き詰め禁止)。**無発話区間は無字幕**とし、隙間を字幕で埋めない。短い字幕は次 caption を超えない範囲で既定 1.0 秒の床まで延ばし、床に届かない場合は warning を確認する。
|
|
170
170
|
- caption の start / end は source 秒アンカー(§1)。`words[]` も同じ source 秒で持つ。
|
|
171
171
|
|
|
172
|
-
`--max-chars`
|
|
173
|
-
按分 fallback は CLI
|
|
172
|
+
`--max-chars` は既定 20・文節優先(句点 > ポーズ > 読点 > 文字数 / 秒数)。`--split none` で旧挙動に戻せる。複数素材では `--source <sources[].id>` で対象を選ぶ。
|
|
173
|
+
按分 fallback は CLI が内包する(語時刻が無い場合は句点等で切り、segment 区間を文字数比で按分して読み切り猶予を加える)。
|
|
174
174
|
字幕の付ける/付けない・スタイル等の方針レベルは [report-guide.md](report-guide.md) の素材計画 §字幕枠で決め、ここでは区間の作り方だけを定める。
|
|
175
175
|
|
|
176
176
|
### 字幕スタイルを適用する
|
|
@@ -86,6 +86,7 @@ node の解決順は `AKARI_NODE_BIN` → PATH の node(20 以上)→ 同梱
|
|
|
86
86
|
|
|
87
87
|
- 成果物は既定で `<project>/exports/<source-name>.mp4` に置く。既存名があれば連番を使う。
|
|
88
88
|
- 状態の正本は `<project>/.akari/render.json` とする。HTML レポートは可視化専用とする。
|
|
89
|
+
- CLI は書き出し成功後に帳面の結果行を追記する(`akari decision-log settle`)。`--no-settle` で抑止できる。
|
|
89
90
|
- 成功時だけ `<project>/.akari/render-tmp/` を削除する。失敗時は診断用に保持する。
|
|
90
91
|
- 字幕は `captions.json` から決定的な HTML へ生成し、他のオーバーレイと同じ経路で焼き込む。
|
|
91
92
|
- 字幕スタイルの preset は `presets/textstyle/` にあり、`akari-apply-textstyle.mjs` で `captions.json` へ適用できる。この実行体も同じ解決の対象で、`<render-cut>` と同じ `bin/` 配下にある。通常は edit-plan 段階で適用を済ませ、render-cut はその結果をそのまま描画する。
|