Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ After Effects の **スクリプト/エクステンション開発そのもの

## 現在の状態

`packages/ae-devtools-cli`(`@ido-bata/ae-devtools-cli@0.5.0`)として CLI + JSX toolchain +
`packages/ae-devtools-cli`(`@ido-bata/ae-devtools-cli@0.7.0`)として CLI + JSX toolchain +
capability catalog + conformance gate が shipped 済み(fake-level 検証 +
macOS arm64 / AE 26.5 の verified-real-host 証跡あり。Windows・配布・
実 editor 受入は未検証)。shipped 済みの範囲を超えて **未確定 / 未検証** のままの領域:
Expand Down
21 changes: 14 additions & 7 deletions packages/ae-devtools-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ fake-level evidence として記録され、real-host 検証済みとは表示

```sh
npm install @ido-bata/ae-devtools-cli # registry latest
npm install @ido-bata/ae-devtools-cli@0.5.0 # this release, once published
npm install @ido-bata/ae-devtools-cli@0.7.0 # this release, once published
# tarball / local checkout からも可:
npm install ./ae-devtools-cli-0.5.0.tgz
npm install ./ae-devtools-cli-0.7.0.tgz
```

### Migrating to 0.7.0

- The `@ido-bata/ae-a8n` pin is `0.5.0`, which ships `AfterEffects.attach`.
Registry installs of this version can now use the a8n-attached session
lane; on the previous pin (`0.2.0`) it was refused up front with
`ATTACHED_TARGET_UNSUPPORTED` (#395).

### Migrating to 0.5.0

- Scripting adapter coverage was extended across comp settings /
Expand Down Expand Up @@ -46,8 +53,8 @@ npm install ./ae-devtools-cli-0.5.0.tgz
satisfying the capability contract** (#102 handshake exports +
#103/#105 fixes). ae-a8n `<=0.1.0-alpha.2` predates them and is refused
up front (`AE_A8N_CONTRACT_UNSUPPORTED`; check `ae-devtools doctor` →
`aeA8n.contractOk`). The pin is `@ido-bata/ae-a8n@0.2.0` (published
under the `next` dist-tag); override with `--ae-a8n-root <checkout>`.
`aeA8n.contractOk`). The pin is `@ido-bata/ae-a8n@0.5.0`; override
with `--ae-a8n-root <checkout>`.
The `fake` session is unaffected.

Provides seven bins:
Expand Down Expand Up @@ -107,8 +114,8 @@ ae-devtools execute <opId> --session a8n --ae-a8n-root <local-a8n-checkout> --co
解決される ae-a8n が必要 contract(#102 handshake export。#103/#105
修正を祖先に持つ)を満たさない場合は launch 前に
`AE_A8N_CONTRACT_UNSUPPORTED` で refuse される — `ae-devtools doctor`
の `aeA8n.contractOk` で事前確認できる。npm pin は `@ido-bata/ae-a8n@0.2.0`
(`next` dist-tag で公開)で contract を満たす。`<=0.1.0-alpha.2` を
の `aeA8n.contractOk` で事前確認できる。npm pin は `@ido-bata/ae-a8n@0.5.0`
で contract を満たす。`<=0.1.0-alpha.2` を
解決した場合は launch 前に refuse される。別 build を使う場合は
`--ae-a8n-root <ae-a8n checkout>` で override できる。
`attached`/`unknown` ownership は拒否される。
Expand All @@ -129,7 +136,7 @@ AE / GUI 不要で consumer 環境でも動く。
`observe` / `recover` / `verify-exit` は real-host 前提:

- ae-a8n #109(GUI 観測)/#111(GUI lease + dialog class)の export を
含む ae-a8n が必要。npm pin の `@ido-bata/ae-a8n@0.2.0` はこれらを
含む ae-a8n が必要。npm pin の `@ido-bata/ae-a8n@0.5.0` はこれらを
同梱するため `--ae-a8n-root` なしで解決される。古い ae-a8n を
使う場合のみ `--ae-a8n-root <built-ae-a8n>` を指定する。
- `recover` は devtools-cli の run marker
Expand Down
9 changes: 5 additions & 4 deletions packages/ae-devtools-cli/a8n-transport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ runner.runScript(source)

## ae-a8n pin

`package.json` pins `@ido-bata/ae-a8n@0.2.0` — the first published
version carrying the ae-a8n #102 handshake exports and #103/#104/#105
host-context fixes (published under the `next` dist-tag; `latest`
still resolves `0.1.0-alpha.0`). Earlier pins (`<=0.1.0-alpha.2`)
`package.json` pins `@ido-bata/ae-a8n@0.5.0` — it carries the ae-a8n
#102 handshake exports and #103/#104/#105 host-context fixes (first
published carrying them was `0.2.0`) plus `AfterEffects.attach`
(ae-a8n #269), which the `a8n-attached` lane requires. Earlier pins
(`<=0.1.0-alpha.2`)
predated those fixes — a real launch through them fails
(`EVIDENCE.md`, Attempt 1); the contract gate in `compat.mjs`
(Issue #138) refuses them with `AE_A8N_CONTRACT_UNSUPPORTED` before
Expand Down
2 changes: 1 addition & 1 deletion packages/ae-devtools-cli/a8n-transport/compat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function aeA8nContractError({ source, version, missing }) {
(version ? `@${version}` : "") +
` is missing ${missing.join(", ")} — required: ${CONTRACT_DESCRIPTION}. ` +
"ae-a8n@0.1.0-alpha.2 and earlier predate these fixes " +
"(@ido-bata/ae-a8n@0.2.0 under the `next` dist-tag satisfies them); " +
"(the pinned @ido-bata/ae-a8n dependency satisfies them); " +
"pass --ae-a8n-root <ae-a8n checkout> to override the pinned dependency.",
);
error.code = "AE_A8N_CONTRACT_UNSUPPORTED";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from "node:fs";
import { mkdtempSync, mkdirSync, readFileSync, writeFileSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";

import { resolveAeA8n } from "../ae-a8n-resolve.mjs";

Expand Down Expand Up @@ -73,12 +74,15 @@ test("resolveAeA8n: missing dist/index.js rejects (fail closed)", async () => {
});

test("resolveAeA8n: npm branch resolves the pinned dependency", async () => {
const pkg = JSON.parse(readFileSync(
join(dirname(fileURLToPath(import.meta.url)), "..", "..", "package.json"), "utf8"));
const pinned = pkg.dependencies["@ido-bata/ae-a8n"];
const r = await resolveAeA8n({});
assert.equal(r.source, "npm:@ido-bata/ae-a8n");
assert.equal(r.version, "0.2.0");
assert.equal(r.version, pinned);
assert.equal(typeof r.AfterEffects, "function");
assert.match(r.cliPath, /dist[\\/]cli\.js$/);
assert.match(r.entry, /ae-a8n/);
// npm installs attest version, not a git head
assert.equal(r.head, "0.2.0");
assert.equal(r.head, pinned);
});
9 changes: 7 additions & 2 deletions packages/ae-devtools-cli/dev-loop/devloop.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export async function verify(input = {}) {
const {
runner, pin, projectIdentity, consentProvider, trustedScriptOptIn,
scriptProvenance, readOpId = "read.projectSummary", readArgs = {}, requestId,
hostProjectGuard, hostProjectGuardRequired,
hostProjectGuard, hostProjectGuardRequired, consentAudit,
} = input ?? {};
const op = (() => { try { return getOperation(readOpId); } catch { return null; } })();
if (!op || op.mutating) {
Expand All @@ -190,9 +190,14 @@ export async function verify(input = {}) {
: `readOpId '${readOpId}' is a mutating op; verify requires a read-only op`;
return { status: "refused", stage: "adapter", reason: "VERIFY_REQUIRES_READ_OP", detail, opId: readOpId };
}
// Explicit forward list — consentAudit MUST be here: verify dispatches
// are execute-class dispatches and their consent decisions are audit
// events (Issue #403). confirmRender/confirmDestructive/targetGuard
// are intentionally absent: verify only admits non-mutating ops, and
// runOperation's confirm gates and targetGuard never fire for them.
return runOperation({
opId: readOpId, args: readArgs, runner, pin, projectIdentity,
consentProvider, trustedScriptOptIn, scriptProvenance, requestId,
hostProjectGuard, hostProjectGuardRequired,
hostProjectGuard, hostProjectGuardRequired, consentAudit,
});
}
22 changes: 22 additions & 0 deletions packages/ae-devtools-cli/dev-loop/tests/devloop.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,28 @@ test("execute/verify on null input produce structured refusals, not TypeErrors",
assert.equal(typeof v.reason, "string");
});

test("verify forwards consentAudit — verify dispatches record consent decisions (Issue #403)", async () => {
const f = fixture();
const entries = [];
const consentAudit = {
recordConsentDecision(entry) { entries.push(entry); },
};
const v = await verify({ ...f, consentAudit, requestId: "req-verify-1" });
assert.equal(v.outcome, "COMPLETED");
assert.equal(entries.length, 1);
assert.equal(entries[0].decision, "approved");
assert.equal(entries[0].opId, "read.projectSummary");
assert.equal(entries[0].requestId, "req-verify-1");
assert.equal(entries[0].mutating, false);
});

test("verify surfaces a malformed consentAudit as CONSENT_AUDIT_INVALID (Issue #403)", async () => {
const f = fixture();
const v = await verify({ ...f, consentAudit: { bogus: true } });
assert.equal(v.status, "refused");
assert.equal(v.reason, "CONSENT_AUDIT_INVALID");
});

test("execute adds no approval path: denial still refuses before transport", async () => {
const f = fixture();
const origSend = f.transport.send.bind(f.transport);
Expand Down
24 changes: 22 additions & 2 deletions packages/ae-devtools-cli/devtools-cli/EVIDENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,28 @@ this loop, MCP/VSCode surfaces on the attached session.
window not on-screen, AX sees 0 windows). No dispatch completed,
no Problems-panel diagnostics were produced. Evidence:
`vscode-extension/evidence/vscode-iso-a8n-366/`. Status:
**BLOCKED (environmental)** — needs an unlocked GUI session to
settle consent, then Problems-panel verification.
superseded by the 2026-11-21 real-host run below.
- VSCode real-host run (issue #172, branch 172, 2026-11-21T00:04Z):
same isolated instance, packaged VSIX rebuilt from the release
branch, `session:"a8n"` + `aeA8nRoot` → owned AE 2027 launch
(aeVersion 27.0x78, ownership `owned`). All lanes settled through
the real command path with AX-driven QuickInput/consent:
`discover` (registry metadata), `execute` `read.projectSummary`
(req-mcp-1 COMPLETED), `execute` `read.itemById` id=999999
(req-mcp-2 FAILED "Item Not Found"), `verify` (req-mcp-3
COMPLETED, toast "verified on real host (macOS)"). The failed
execute published a real diagnostic into the Problems panel
(`ae-devtools:diagnostics/script-exception`, mappingStatus
`no-map`); a subsequent clean verify cleared it per the
authoritative-plan rule (#302). Owned-launch caveat: AE 2027 birth
was blocked by dvaui Thor-language warning dialogs (missing
`/Library/.../AMT/application.xml`, invisible to AX); dismissed via
frontmost+Return (`run-20261121T0004Z/ae2027-dismisser.log`).
Evidence: `vscode-extension/evidence/vscode-iso-a8n-366/
attempt-2026-11-21-realhost.json` + `run-20261121T0004Z/`.
Status: **verified on real host** for discover/execute/verify +
Problems-panel publish (unmapped case); source-map `mapped`
diagnostics case remains unexercised.

## 2026-11-21 — attach-only hardening (branch 374, issue #374)

Expand Down
6 changes: 3 additions & 3 deletions packages/ae-devtools-cli/docs/adoption.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ npm install --save-dev @ido-bata/ae-devtools-cli
`--session a8n` は owned AE session を `@ido-bata/ae-a8n` 経由で使う。
この経路が要求する ae-a8n contract(capability handshake export =
ae-a8n#102。#103 extension prelude / #105 LaunchServices 修正を祖先に持つ)を
満たすのは ae-a8n `release-0-2-0` 以降。npm pin は `@ido-bata/ae-a8n@0.2.0`
(`next` dist-tag で公開済み)で、これを満たす。`<=0.1.0-alpha.2` を
満たすのは ae-a8n `release-0-2-0` 以降。npm pin は `@ido-bata/ae-a8n@0.5.0`
で、これを満たす。`<=0.1.0-alpha.2` を
解決した場合のみ contract gate が launch 前に refuse する。

- `ae-devtools doctor` が解決した ae-a8n の `contractOk` を報告する
Expand Down Expand Up @@ -173,7 +173,7 @@ tarball install して実行:
必要とする ae-a8n surface(`readGuiSession` / `listAppInstances` /
`censusRunnerInSession` / `windowServerCensus` / `MacGuiRecovery` /
`MacHostRecovery` / GUI lease 関連 export)は、公開版
`@ido-bata/ae-a8n@0.2.0` が全て ship しているため、pinned
`@ido-bata/ae-a8n@0.5.0` が全て ship しているため、pinned
dependency のまま動作する。`--ae-a8n-root` は別 build / 開発版の
ae-a8n を指したい場合の override であり必須ではない。コマンド別に
必要 export が検証され、欠落時は `AE_A8N_SURFACE_MISSING` で
Expand Down
12 changes: 6 additions & 6 deletions packages/ae-devtools-cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/ae-devtools-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ido-bata/ae-devtools-cli",
"version": "0.6.0",
"version": "0.7.0",
"description": "Developer CLI, JSX/TypeScript toolchain, MCP server and extension devkits for After Effects scripting/extension/native development",
"type": "module",
"engines": {
Expand Down Expand Up @@ -60,7 +60,7 @@
"check:syntax": "node scripts/check-syntax.mjs"
},
"dependencies": {
"@ido-bata/ae-a8n": "0.2.0",
"@ido-bata/ae-a8n": "0.5.0",
"acorn": "^8.19.0",
"esbuild": "0.28.2",
"typescript": "5.9.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"schema": "ae-devtools.vscode-iso-attempt/v1",
"issue": 172,
"ticket": 366,
"attemptedAt": "2026-11-21T00:04:10Z",
"host": "macOS (MacBook, VS Code 1.146.0, isolated --extensions-dir/--user-data-dir, workspace /tmp/vscode-iso)",
"packagedVsix": "ae-devtools-vscode-extension-0.0.0.vsix built by scripts/package-vsix.mjs from branch 172 @ release-0.7.0 base",
"config": {
"session": "a8n",
"aeA8nRoot": "/Users/rebui/work/ae-a8n",
"aeA8nHead": "716dada4c9c7ceaf8f6e32e02b40875f32af7070 (ae-a8n 0.5.0, branch 267)"
},
"driver": "tests/qa-driver variant (mode=seq172, /tmp copy only — repo driver unchanged): discover -> execute(read.projectSummary,{}) -> execute(read.itemById,{id:999999}) -> verify; QuickInput opId/args and consent modals settled via macOS AX (sanctioned by qa-driver README); notifications captured via AX 'entire contents' polling",
"aeLaunchNote": "Owned AE 2027 instance was blocked at birth by dvaui Thor-language warning dialogs (missing /Library/Application Support/Adobe/After Effects/27.0/AMT/application.xml — custom-drawn, invisible to AX). Dismissed via System Events frontmost + Return key (ae2027-dismisser.log). User's AE 2026 instance untouched.",
"observed": {
"extensionInstalled": true,
"lanes": {
"discover": "settled — registry metadata, no session opened (notification: 'AE DevTools: ok (evidence: registry metadata — no dispatch)' via AX dump)",
"execute-success": "ae-devtools.execute -> QuickInput opId 'read.projectSummary' + args '{}' -> consent Allow -> dispatched req-mcp-1 read.projectSummary COMPLETED on owned AE 2027 (run-guard + consent-audit)",
"execute-failure": "ae-devtools.execute -> opId 'read.itemById' + args '{\"id\":999999}' -> consent Allow -> dispatched req-mcp-2 read.itemById FAILED ('Item Not Found') — dispatch-store state=failed",
"verify": "ae-devtools.verify -> consent Allow -> req-mcp-3 read.projectSummary COMPLETED; notification 'AE DevTools: COMPLETED (evidence: verified on real host (macOS))' captured in AX dump",
Comment thread
rebuildup marked this conversation as resolved.
Resolved
"problemsPanel": "publishDiagnostics landed: vscode.languages.getDiagnostics() at exec-itembyid settle showed uri 'ae-devtools:diagnostics/script-exception' count=1, message 'Error: After Effects エラー: 内部確認に失敗しました。{Item Not Found} [source position: no-map]', source 'ae-devtools · script-exception', severity Error, range line 247. Problems panel opened via workbench.actions.view.problems. Subsequent clean verify published an empty plan and cleared the entry (Issue #302 semantics observed live)."
},
"session": "a8n owned launch, aeVersion 27.0x78, ownership 'owned', aeA8nHead 716dada — run-guard marker run-2026-11-21T00-05-42-829Z-1e782d67 (self-removed on clean close; reconstructed copy in run-guard-marker.json)",
"cleanTeardown": "Cmd+Q graceful quit -> deactivate -> controller.close -> session close -> app.quit; AE 2027 exited, run-guard marker removed (status was 'open' while live)"
},
"evidenceLevel": "verified on real host — discover/execute(success)/execute(failure)/verify all dispatched through the real VSCode command path on an owned AE 2027 session; Problems-panel diagnostics publish observed for a real failure outcome (mappingStatus 'no-map' — unmapped case)",
"remainingGaps": [
"source-map 'mapped' diagnostics case not exercised (only no-map observed; would need a jsx sourcemap scenario)",
"per-lane notification toasts for discover/exec-summary/exec-itembyid were cleared by the 25s driver clearer before AX polling; outcomes corroborated by run-guard requests[], dispatch-store and consent-audit instead — verify toast text was captured",
"qa-driver repo file unchanged; seq172 multi-lane mode exists only as a /tmp copy (mode.txt committed for provenance)"
],
"artifacts": {
"runDir": "run-20261121T0004Z/",
"qaResults": "run-20261121T0004Z/qa-results-seq172.json",
"axDump": "run-20261121T0004Z/ax-dump-final.txt",
"exthostLog": "run-20261121T0004Z/exthost-log-090409/exthost.log",
"runGuard": "run-20261121T0004Z/run-guard-marker.json",
"dispatchStore": [
"run-20261121T0004Z/dispatch-store-readitembyid-FAILED.json",
"run-20261121T0004Z/dispatch-store-readprojectsummary-verify-COMPLETED.json"
],
"consentAudit": "run-20261121T0004Z/consent-audit.jsonl",
"dismisserLog": "run-20261121T0004Z/ae2027-dismisser.log",
"mode": "run-20261121T0004Z/mode.txt"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2026-11-21T00:04:08Z dismisser start
2026-11-21T00:05:46Z pid=15789 dialogs=1 main=0 -> return
2026-11-21T00:05:48Z main window up, dialogs clear — done
Loading
Loading