akari-video 0.1.18 → 0.1.19

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akari-video",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
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
@@ -6,7 +6,7 @@ import { resolveLauncherAssets } from './repo-assets.mjs';
6
6
  import { detectProjectState } from './project-state.mjs';
7
7
  import { findClaudeExecutable, findOpencodeExecutable } from './path-lookup.mjs';
8
8
  import { loadTaskLabels } from './task-labels.mjs';
9
- import { describeForceReinstall, describeInstalledVersions, describeIntake, claudeMissingGuidance, opencodeMissingGuidance, describeUpdateCommand, describeVersionStatus, formatUpdateNotice } from './messages.mjs';
9
+ import { describeForceReinstall, describeInstalledVersions, describeIntake, claudeMissingGuidance, opencodeMissingGuidance, describeUpdateCacheFallback, describeUpdateCommand, describeVersionStatus, formatUpdateNotice } from './messages.mjs';
10
10
  import { resolveEffectiveProjectRoot } from './first-run.mjs';
11
11
  import { maybeShowAssetIntroNotice } from './sounds-setup.mjs';
12
12
  import {
@@ -188,8 +188,8 @@ function defaultSpawnOpencode(opencodePath, args, projectRoot) {
188
188
  * 自己更新を試みず、キャッシュに載っている最新版の通知を今後出さないよう記録するだけ
189
189
  * (既存挙動を維持)。`--force` は同じ版の本体も再導入し、`--rollback` は直前 1 世代
190
190
  * (`~/.akari/app-previous/`)へ戻す。
191
- * 通常時にネットワークへ触れるのは自己更新の DL 区間のみ。`--force` だけはキャッシュが
192
- * 未取得なら、復旧経路を塞がないためフィードの同期取得を 1 回試す。
191
+ * `--dismiss` / `--rollback` 以外の明示 update は、キャッシュ TTL に関係なく
192
+ * フィードの同期取得を 1 回試す。取得失敗時だけ既存キャッシュへフォールバックする。
193
193
  */
194
194
  export async function runUpdateCommand(args, options = {}) {
195
195
  const log = options.log ?? ((line) => console.log(line));
@@ -201,6 +201,7 @@ export async function runUpdateCommand(args, options = {}) {
201
201
  const dismissRequested = args.includes('--dismiss');
202
202
  const rollbackRequested = args.includes('--rollback');
203
203
  const forceRequested = args.includes('--force');
204
+ let usingCachedFeed = false;
204
205
 
205
206
  if (rollbackRequested) {
206
207
  return (options.rollbackSelfUpdate ?? rollbackSelfUpdate)({ env, log });
@@ -219,9 +220,12 @@ export async function runUpdateCommand(args, options = {}) {
219
220
  return { exitCode: 0 };
220
221
  }
221
222
 
222
- if (forceRequested && !cache?.feed) {
223
- await (options.refreshUpdateFeed ?? refreshUpdateFeed)({ env, fetchImpl: options.fetchImpl });
224
- cache = readCacheSync(cachePath);
223
+ const refreshed = await (options.refreshUpdateFeed ?? refreshUpdateFeed)({ env, fetchImpl: options.fetchImpl });
224
+ if (isValidFeedShape(refreshed?.feed)) {
225
+ cache = refreshed;
226
+ } else {
227
+ cache = readCacheSync(cachePath) ?? cache;
228
+ usingCachedFeed = isValidFeedShape(cache?.feed);
225
229
  }
226
230
 
227
231
  const feed = cache?.feed;
@@ -234,12 +238,15 @@ export async function runUpdateCommand(args, options = {}) {
234
238
  && (hasManagedApp || (options.isRunningFromAppDir ?? isRunningFromAppDir)({ env, launcherRoot: options.launcherRoot }));
235
239
 
236
240
  if (!selfUpdateEligible) {
237
- for (const line of describeUpdateCommand({ currentVersion, versionInfo, cache, dismissed: false })) {
241
+ for (const line of describeUpdateCommand({ currentVersion, versionInfo, cache, dismissed: false, usingCachedFeed })) {
238
242
  log(line);
239
243
  }
240
244
  return { exitCode: 0 };
241
245
  }
242
246
 
247
+ if (usingCachedFeed) {
248
+ log(describeUpdateCacheFallback(cache));
249
+ }
243
250
  for (const line of describeInstalledVersions(versionInfo)) {
244
251
  log(line);
245
252
  }
package/src/messages.mjs CHANGED
@@ -172,7 +172,7 @@ export function creatorRootPromptText(defaultPath) {
172
172
  * `akari update` の出力本文(複数行)。フィード未取得・最新・新版ありで案内が変わる。
173
173
  * `dismissed` は今回の実行で dismiss 記録を書いたかどうか(表示文言の切り替えのみに使う)。
174
174
  */
175
- export function describeUpdateCommand({ currentVersion, versionInfo, cache, dismissed }) {
175
+ export function describeUpdateCommand({ currentVersion, versionInfo, cache, dismissed, usingCachedFeed = false }) {
176
176
  const info = versionInfo ?? normalizeVersionInfo(currentVersion);
177
177
  const lines = versionInfo ? describeInstalledVersions(info) : [`現在のバージョン: v${currentVersion}`];
178
178
  const feed = cache?.feed;
@@ -182,6 +182,10 @@ export function describeUpdateCommand({ currentVersion, versionInfo, cache, dism
182
182
  return lines;
183
183
  }
184
184
 
185
+ if (usingCachedFeed) {
186
+ lines.push(describeUpdateCacheFallback(cache));
187
+ }
188
+
185
189
  lines.push(`最新バージョン: v${feed.product}${channelSuffix(feed.channel)}`);
186
190
  if (feed.notes_url) {
187
191
  lines.push(`リリースノート: ${feed.notes_url}`);
@@ -208,6 +212,12 @@ export function describeUpdateCommand({ currentVersion, versionInfo, cache, dism
208
212
  return lines;
209
213
  }
210
214
 
215
+ /** 明示 update の再取得失敗時に、参照するキャッシュの取得時刻を示す 1 行。 */
216
+ export function describeUpdateCacheFallback(cache) {
217
+ const fetchedAt = typeof cache?.fetched_at === 'string' ? cache.fetched_at : '取得時刻不明';
218
+ return `更新フィードを取得できなかったため、${fetchedAt} 時点のキャッシュを表示します。`;
219
+ }
220
+
211
221
  /**
212
222
  * `akari init` の出力文言(タスク契約 launcher-init・内部リポ)。作業場
213
223
  * (creator-root)の作成・確認だけを行う入口コマンド専用。1 行主義の既存流儀に従う。
@@ -113,6 +113,23 @@ perspective のレイヤー分割フォールバック — perspective は `crop
113
113
  外形を四隅の基準にし、rotate と非 normal blend は固定外形化による既存意味の変化を排除できない
114
114
  ため、この組み合わせだけは従来互換経路を維持する。
115
115
 
116
+ - **主映像カット拡大・crop の固定キャンバス化(2026-08-25 追記)**: v2 主映像トラックから
117
+ gap-aware cuts へ変換された `transform.scale` / crop キーフレームにも、レイヤー経路と同じ
118
+ `layerFixedCanvasKeyframeSteps` を適用する。normal blend・perspective 非宣言・rotate=0(静的・
119
+ キーフレームとも)の場合に限り、素材ネイティブ寸法の 2 倍グリッドで補間し、最大 footprint の
120
+ 固定透明キャンバスへ偶数座標で配置した後、Lanczos で実寸へ縮小する。これにより毎フレームの
121
+ 可変 bitmap 寸法と中央 overlay の組み合わせを排除し、拡大後サイズの偶奇変化による ±1px 往復を
122
+ 防ぐ。perspective・rotate・非 normal blend は従来互換経路を維持し、キーフレーム無しカットの
123
+ filter 文字列は変更しない。
124
+
125
+ - **rotate 適用条件の追補(2026-08-25)**: 上記の「rotate=0(静的・キーフレームとも)」は、
126
+ 下流 filter に rotate ステップが実際に出るかどうかへ読み替え、`rotateConstant === 0` のときだけ
127
+ 固定キャンバスを適用する。静的 `transform.rotate` が非 0 でも、キーフレームが `transform` を
128
+ 宣言すれば rotate はキーフレーム由来の既定 0 で解決され、rotate ステップが出ないため対象となる
129
+ (rotate の描画意味論は不変)。これで `layers.mjs` の同名ガードと一致する。静的 rotate 非 0 かつ
130
+ transform キーフレーム無し、キーフレーム rotate が非 0、rotate が時間変化する構成は、rotate
131
+ ステップが実際に出るため従来互換経路を維持する。
132
+
116
133
  ## 5. macOS の字幕レンダ用 Chrome 起動(2026-08-24 追記)
117
134
 
118
135
  - macOS では `.app` 内の Chrome 実行ファイルを子プロセスとして直接起動しない。書き出し専用の
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akari-video",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
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": [
@@ -31,6 +31,7 @@ const FALLBACK_CLAUDE_GUIDANCE = [
31
31
  '- 編集スキルは `.claude/skills/` にあり、`/analyze-footage` などの素の名前で使えます。',
32
32
  '- Codex や Cursor など他の AI エージェント用の入り口が `.agents/skills/`、`.cursor/skills/`、`.codex/skills/` にあります(中身は `.claude/skills/` へのリンク)。',
33
33
  '- `.akari/intake.json` の `status` が `submitted` なら、そこに書かれた `tasks` / `target` / `autonomy` に従って進めます。`autonomy` が `checkpoint`(既定)なら、企画の承認や書き出し前などの要所で必ず人に確認します。`status` が `draft` のときは進め方がまだ決まっていないので、フォームや対話で確定させてから作業を始めます。',
34
+ '- 進め方を `.akari/intake.json` に書くときは、`tasks` は決められた 5 つの id だけを使い、`target` は `duration_s` か `keep_length: true` のどちらか片方にします。`status` を `submitted` にする前に lint で確認します。',
34
35
  '- 利用者へは日本語で、内部の仕組みではなく「変更履歴」「企画メモ」「素材」などの言葉で説明します。',
35
36
  '',
36
37
  'このファイルはあなたのプロジェクトのものです。自由に書き換えて構いません。',
@@ -52,6 +53,8 @@ const FALLBACK_AGENT_GUIDANCE = [
52
53
  '`.akari/intake.json` の `status` が `submitted` なら `tasks` / `target` / `autonomy` に従って進める。',
53
54
  '`autonomy: checkpoint`(既定)なら企画承認・書き出し前などの要所で人に確認する。',
54
55
  '`status: draft` なら進め方が未確定のため、フォームまたは対話で確定させてから進める。',
56
+ '進め方を `.akari/intake.json` に書くときは、`tasks` は決められた 5 つの id だけを使い、`target` は `duration_s` か `keep_length: true` のどちらか片方にする。',
57
+ '`status` を `submitted` にする前に lint で確認する。',
55
58
  '',
56
59
  '利用者へは日本語で、内部の仕組みではなく役割が伝わる言葉を使う。',
57
60
  'この案内はこのプロジェクトのものです。自由に書き換えて構いません。',
@@ -51,6 +51,14 @@ test("bare template: scaffold generates a draft .akari/intake.json and a CLAUDE.
51
51
  assert.match(claudeMd, /submitted/);
52
52
  assert.match(claudeMd, /draft/);
53
53
  assert.match(claudeMd, /checkpoint/);
54
+ assert.match(claudeMd, /`tasks` は決められた 5 つの id だけ/);
55
+ assert.match(claudeMd, /`duration_s` か `keep_length: true` のどちらか片方/);
56
+ assert.match(claudeMd, /`submitted` にする前に lint で確認/);
57
+
58
+ const agentsMd = await readFile(join(destination, "AGENTS.md"), "utf8");
59
+ assert.match(agentsMd, /`tasks` は決められた 5 つの id だけ/);
60
+ assert.match(agentsMd, /`duration_s` か `keep_length: true` のどちらか片方/);
61
+ assert.match(agentsMd, /`submitted` にする前に lint で確認/);
54
62
 
55
63
  assert.ok(report.fallback.writtenFiles.includes(".akari/intake.json"));
56
64
  assert.ok(report.fallback.writtenFiles.includes("CLAUDE.md"));
@@ -64,3 +64,24 @@ akari new <target-dir> [--template <path>]
64
64
  ## intake.json(進め方フォームの保存先)
65
65
 
66
66
  作成直後の `.akari/intake.json` は `status: "draft"`・空 `tasks` から始まる(契約: `packages/schemas/intake.schema.json`)。プロジェクトの CLAUDE.md には intake の規律を追記する — `status: "submitted"` なら `tasks` / `target` / `autonomy` に従い、`autonomy: "checkpoint"`(既定)なら企画承認・書き出し前などの要所で人に確認し、`status: "draft"` のままなら進め方をフォームまたは対話で確定させてから進める。
67
+
68
+ - `tasks` は次の固定語彙のみを使う。日本語ラベルの正本は契約正本の `x-akari-labels` とする
69
+ - `transcribe-captions`(文字起こし・テロップ)
70
+ - `silence-cut`(いらない間・NG のカット)
71
+ - `bgm-sfx`(BGM・効果音)
72
+ - `narration`(ナレーション(自分の声 / 既製の声))
73
+ - `3d-inserts`(3D・画面はめ込みの演出)
74
+ - 依頼文・自由文を `tasks` に入れない。語彙に無い要望は `tasks` に書かず、
75
+ `target.taste`(自由記述)や `planning/` 側へ置く
76
+ - `target.duration_s`(数値指定)と `target.keep_length: true`(尺維持)はどちらか片方にする。
77
+ 「約60秒にする」なら `{"duration_s": 60, "keep_length": false}`、「尺は変えない」なら
78
+ `{"duration_s": null, "keep_length": true}` とする
79
+ - `status` を `"submitted"` へ変える前に、リポジトリルートから edit-lint スキルと同じ CLI を
80
+ 実行し、`intake.*` の error finding が無いことを確認する。`submitted` にするときは
81
+ `submitted_at` に ISO 8601 日時を必ず入れる
82
+
83
+ ```sh
84
+ node packages/edit-lint/bin/edit-lint.mjs <project-root>
85
+ ```
86
+
87
+ フィールドの契約正本は `packages/schemas/intake.schema.json` とする。
@@ -13,6 +13,8 @@
13
13
  従って進める。`autonomy: checkpoint`(既定)なら企画承認・書き出し前などの要所で
14
14
  利用者に確認する。`status: draft` なら進め方が未確定のため、フォームまたは対話で
15
15
  確定させてから進める。
16
+ - 進め方を `.akari/intake.json` に書くときは、`tasks` は決められた 5 つの id だけを使い、`target` は `duration_s` か `keep_length: true` のどちらか片方にする。
17
+ `status` を `submitted` にする前に lint で確認する。
16
18
  - プロジェクトルート直下に新規ファイルを作らない(`edit.json` 等の既存契約ファイルを除く)。
17
19
  生成物は `.akari/work/`、証跡は `.akari/reports/`、キャッシュは `.akari/cache/` に置く。
18
20
  詳しい層の定義は `docs/contract-2026-07-25-project-structure-v0.md`(本モノレポ側)を参照する。
@@ -19,6 +19,8 @@
19
19
  要所で必ず利用者に確認します。`status` が `draft` のときは進め方がまだ決まっていないので、
20
20
  フォームまたは対話で確定させてから作業を始めます。
21
21
 
22
+ 進め方を `.akari/intake.json` に書くときは、`tasks` は決められた 5 つの id だけを使い、`target` は `duration_s` か `keep_length: true` のどちらか片方にします。`status` を `submitted` にする前に lint で確認します。
23
+
22
24
  素材が足りないときは、`akari assets list` でアカウントの素材ライブラリ(無料全部 + 購入済み)を
23
25
  確認できます。使いたい素材が見つかったら `akari assets fetch <id> --project .` でこのプロジェクトへ
24
26
  取り込みます(sha256 検証込み)。有料素材は `akari store connect` で接続済みのアカウントで