@adelin-io/cli 0.1.7 → 0.1.8

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@adelin-io/cli",
4
- "version": "0.1.7",
4
+ "version": "0.1.8",
5
5
  "compilerVersion": "6.0.3",
6
6
  "hostProtocol": 1,
7
7
  "files": {
@@ -17,7 +17,7 @@
17
17
  "skill/authoring/content-binding.md": "124090ebdd6011bdd7c5f9c94f715ab15ad2af7741fae90fc5d3e2c7a2f442a8",
18
18
  "skill/authoring/i18n.md": "a264167e27b9ea02c76647146601ee0d1d9a83e9d33d7cd60d9d0b39d9ee1f60",
19
19
  "skill/authoring/language.md": "533d597b785f6df99234f7e83be80d8ea1818cd24062b4f51ec5e4091a2db393",
20
- "skill/authoring/local-workflow.md": "58de4490bd3a6de3942c94929806c4215aa6fa1bd02d915aa0c61e220f00387f",
20
+ "skill/authoring/local-workflow.md": "4b34f0551bdb1c5ea00de453e4895016a360a0518f87276d498de42c1497f3a8",
21
21
  "skill/authoring/offline/connectivity.md": "e00cb804cfdcda2950cb190432e8f36cd13d99b36075b5ceec71438671393e81",
22
22
  "skill/authoring/offline/example.md": "2e79d91f05d7a55b4a3f136f0db28d02e458c9fc24b77ab0e074fff7ab635447",
23
23
  "skill/authoring/offline/history-sync.md": "65652b536a84c47ddf04519e3dac35a9bed836fba67043fd43dabd77af3cd3ec",
@@ -47,7 +47,7 @@
47
47
  "skill/design/design-guide.md": "cc981df68755971801f826532c16d4aa15c1c3b0c09638d99dba1714c165302f",
48
48
  "skill/design/edge-to-edge.md": "d163b0e3ae393377546508d7eab0d44cfab139d022a360e993a734c73394119e",
49
49
  "skill/design/icons.md": "c3c6dfc57d2d346dac34ef6f876371943ed36e810730edc224196bc967da9248",
50
- "skill/design/responsive-layout.md": "c83763be82e29ec16799256aa4a0d8e4570bce117b1a29d6d90ca3c98ccf7449",
50
+ "skill/design/responsive-layout.md": "8fce1fa378731f1ed5c795cdb72a73dae4b2e3581861a90c14fc3f5ae634b51b",
51
51
  "skill/design/safe-area.md": "a6522b995454adb2d459a4651086c108d5d9b2399f9399e40c6d320237947820",
52
52
  "skill/design/streaming-playbook.md": "13bcab8d9232d6514337fcd112022968011db895b1aed66f7976bd3bc81c83d5",
53
53
  "skill/design/visual-review.md": "87d5025a7a365656cbbb1a1eac817b69eb0f066c812d0a94322d7a02c6b3207a",
@@ -170,5 +170,5 @@
170
170
  "types/adelin-worklets.d.ts": "f56edc56715df189933f180605ee8c41a785d11ad0c0d454258f1c1f71159ab9",
171
171
  "workspace-tsconfig.json": "a1321a0ea06e5fb9d4e3c1a7d92045e730b44114ab10553172142cb978b9147a"
172
172
  },
173
- "contractId": "ad5566d44f7cdc25a02fb09825b6fa8c76a90bd76ca4ecf003c00e0b6a737438"
173
+ "contractId": "dcfca25ac8ebdc6c85e3a820833af53d51d595f02df824223b937818c600eec8"
174
174
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adelin-io/cli",
3
3
  "private": false,
4
- "version": "0.1.7",
4
+ "version": "0.1.8",
5
5
  "description": "Adelin CLI, local app builder, and agent skill",
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -1,5 +1,5 @@
1
1
  {
2
- "scripts/adelin.mjs": "0f32c49e80aade2bec981bed622292bfebc819c25bc0a38fbf9582850426f6da",
2
+ "scripts/adelin.mjs": "db7b0a7327d788152e703f4b2e7d00e087e43b1f89b99fc06ed04d277245d7e8",
3
3
  "scripts/assemble-checkout.mjs": "3f35e00a76075b3b0e8c72b5477184a986b15ae1e933317ceaad9a08cbeb589c",
4
4
  "scripts/local-save.mjs": "54f9532d57cb9dd754bbaa4d517c8a3229c2ea6fbe43236bdc15fda2822cde9f",
5
5
  "scripts/materialize.mjs": "8c00ec43de43698c5d7ef918e6d2f0c2f4eb01c51172b67ea36f7544cfe5b03f",
@@ -44,6 +44,110 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
44
44
  mod
45
45
  ));
46
46
 
47
+ // skills/adelin-app-generation/scripts/cli-auth-page.mjs
48
+ function render({ tone, icon, title: title2, body, note: note2, retry, footer }) {
49
+ return `<!doctype html>
50
+ <html lang="en">
51
+ <head>
52
+ <meta charset="utf-8">
53
+ <meta name="viewport" content="width=device-width,initial-scale=1">
54
+ <title>${title2} | Adelin CLI</title>
55
+ <style>${STYLE}</style>
56
+ </head>
57
+ <body>
58
+ <div class="brand">${mark(36, "brand")}<span>Adelin</span></div>
59
+ <main>
60
+ <div class="link ${tone}" aria-hidden="true">
61
+ <span class="tile cli"><svg width="28" height="28" viewBox="0 0 24 24" stroke-width="2" ${STROKE}><path d="m5 7 5 5-5 5M13 17h6"/></svg></span>
62
+ <span class="line"></span><span class="dot"><svg width="20" height="20" viewBox="0 0 20 20" stroke-width="2.2" ${STROKE}><path d="${icon}"/></svg></span><span class="line"></span>
63
+ <span class="tile">${mark(36, "tile")}</span>
64
+ </div>
65
+ <div><h1>${title2}</h1><p>${body}</p></div>
66
+ ${note2 ? `<p class="note">${note2}</p>` : ""}${retry ? '<p class="retry">To try again, run <code>adelin login</code></p>' : ""}
67
+ </main>
68
+ ${footer ? `<footer>${footer}</footer>` : ""}
69
+ </body>
70
+ </html>
71
+ `;
72
+ }
73
+ function sendSignInPage(res, result) {
74
+ let page = PAGES[result];
75
+ return new Promise((resolve16) => {
76
+ if (res.destroyed) return resolve16();
77
+ res.once("close", resolve16), res.writeHead(page.status, {
78
+ "Content-Type": "text/html; charset=utf-8",
79
+ "Cache-Control": "no-store",
80
+ Connection: "close",
81
+ "Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'"
82
+ }), res.end(render(page));
83
+ });
84
+ }
85
+ var CHECK, ALERT, PAGES, MARK, STROKE, STYLE, mark, init_cli_auth_page = __esm({
86
+ "skills/adelin-app-generation/scripts/cli-auth-page.mjs"() {
87
+ CHECK = "m4.5 10.5 3.5 3.5 7.5-8", ALERT = "M10 4.5v6.5M10 15v.1", PAGES = {
88
+ complete: {
89
+ status: 200,
90
+ tone: "ok",
91
+ icon: CHECK,
92
+ title: "You're signed in",
93
+ body: "Adelin CLI is connected. Return to your terminal to continue.",
94
+ note: "You can close this tab.",
95
+ footer: "Change its apps or disconnect it any time in Adelin, under Settings, Connected code agents."
96
+ },
97
+ denied: {
98
+ status: 200,
99
+ tone: "err",
100
+ icon: "m5 5 10 10M15 5 5 15",
101
+ title: "Connection denied",
102
+ body: "Adelin CLI wasn't given access to your account. You can close this tab.",
103
+ retry: !0
104
+ },
105
+ changed: {
106
+ status: 200,
107
+ tone: "info",
108
+ icon: "M15.5 8A6 6 0 0 0 5 6.5L3.5 8M3.5 4v4h4M4.5 12A6 6 0 0 0 15 13.5l1.5-1.5M16.5 16v-4h-4",
109
+ title: "Your app access changed",
110
+ body: "Adelin CLI is opening a new tab so you can review your apps again. You can close this one."
111
+ },
112
+ failed: {
113
+ status: 500,
114
+ tone: "err",
115
+ icon: ALERT,
116
+ title: "Sign-in didn't finish",
117
+ body: "Adelin CLI couldn't sign you in. Return to your terminal for details.",
118
+ retry: !0
119
+ },
120
+ invalid: {
121
+ status: 400,
122
+ tone: "err",
123
+ icon: ALERT,
124
+ title: "This sign-in link isn't valid",
125
+ body: "It may belong to an earlier sign-in.",
126
+ retry: !0
127
+ }
128
+ }, MARK = "M108.106 99.0001H86.8545L54.0527 39.1173L21.7139 99.0001H0L54.0527 0.497146L108.106 99.0001ZM106.618 0C137.364 0 155.01 18.0697 157.696 44.2764C159.277 59.6984 154.594 72.605 145.794 82.085C134.211 94.5628 117.078 97.9958 117.032 98.005L106.618 78.6036C106.618 78.6036 135.877 78.6032 134.885 45.2716C134.47 31.3417 121.991 19.4024 106.618 19.4024H73.8887L63.4746 0H106.618Z", STROKE = 'fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"', STYLE = `:root{color-scheme:light dark;--page:#EDF5FC;--card:#FFF;--text:#333;--strong:#1F1F1F;--muted:#5C5C5C;--edge:rgba(16,24,40,.13);--tile:#FFF;--sunken:#ECEEF3;--line:#9AA7C7;--ok:#0E7C68;--on-ok:#FFF;--err:#BC183E;--err-bg:rgba(188,24,62,.1);--info:#1844BC;--info-bg:rgba(24,68,188,.12);--shadow:0 0 15px rgba(0,0,0,.08)}
129
+ @media (prefers-color-scheme:dark){:root{--page:#14181B;--card:#000;--text:#DDD;--strong:#FFF;--muted:#BDBDBD;--edge:rgba(255,255,255,.12);--tile:#1C1D20;--sunken:#141414;--line:#56616E;--ok:#3CDBBE;--on-ok:#04251E;--err:#FF5C7F;--err-bg:rgba(255,92,127,.16);--info:#399CFF;--info-bg:rgba(57,156,255,.22);--shadow:0 0 20px rgba(0,0,0,.6)}}
130
+ *{box-sizing:border-box}
131
+ body{margin:0;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:32px 16px;background:var(--page);color:var(--text);font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
132
+ .brand{display:flex;align-items:center;gap:10px;font-size:24px;font-weight:600;line-height:1;color:var(--strong)}
133
+ main{width:100%;max-width:480px;padding:44px 32px 36px;border-radius:14px;background:var(--card);box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;gap:24px;text-align:center}
134
+ .link{display:flex;align-items:center}
135
+ .tile{width:60px;height:60px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:var(--tile);border:1px solid var(--edge)}
136
+ .tile.cli{background:#101828;color:#FFF}
137
+ .line{width:28px;border-top:2px dashed var(--line)}
138
+ .dot{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--err-bg);color:var(--err)}
139
+ .ok .line{border-top:2px solid var(--ok)}
140
+ .ok .dot{background:var(--ok);color:var(--on-ok)}
141
+ .info .dot{background:var(--info-bg);color:var(--info)}
142
+ h1{margin:0 0 10px;font-size:28px;font-weight:600;line-height:1.2;letter-spacing:-.01em;color:var(--strong);text-wrap:balance}
143
+ p{margin:0;text-wrap:balance}
144
+ .note,footer{font-size:14px;color:var(--muted)}
145
+ .retry{width:100%;padding:14px 16px;border-radius:10px;background:var(--sunken);font-size:14px;color:var(--muted)}
146
+ code{font:15px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--strong)}
147
+ footer{max-width:440px;text-align:center;text-wrap:balance}`, mark = (width, id10) => `<svg width="${width}" height="${Math.round(width * 99 / 158)}" viewBox="0 0 158 99" aria-hidden="true"><defs><linearGradient id="${id10}" x1="57" y1="4" x2="158" y2="99" gradientUnits="userSpaceOnUse"><stop stop-color="#7C3AED"/><stop offset="1" stop-color="#2962FF"/></linearGradient></defs><path d="${MARK}" fill="url(#${id10})"/></svg>`;
148
+ }
149
+ });
150
+
47
151
  // skills/adelin-app-generation/scripts/cli-server.mjs
48
152
  import { existsSync, readFileSync } from "node:fs";
49
153
  import { dirname, join, resolve } from "node:path";
@@ -193,10 +297,11 @@ function openBrowser(url) {
193
297
  child2.on("error", () => {
194
298
  }), child2.unref();
195
299
  }
196
- var MAX_AUTH_BYTES, MAX_FILE_BYTES, LOGIN_TIMEOUT_MS, LOOPBACK, CliAuth, init_cli_auth = __esm({
300
+ var MAX_AUTH_BYTES, MAX_FILE_BYTES, LOGIN_TIMEOUT_MS, LOGIN_ATTEMPTS, LOOPBACK, CliAuth, init_cli_auth = __esm({
197
301
  "skills/adelin-app-generation/scripts/cli-auth.mjs"() {
302
+ init_cli_auth_page();
198
303
  init_cli_server();
199
- MAX_AUTH_BYTES = 16 * 1024, MAX_FILE_BYTES = 64 * 1024, LOGIN_TIMEOUT_MS = 5 * 6e4, LOOPBACK = "127.0.0.1";
304
+ MAX_AUTH_BYTES = 16 * 1024, MAX_FILE_BYTES = 64 * 1024, LOGIN_TIMEOUT_MS = 5 * 6e4, LOGIN_ATTEMPTS = 3, LOOPBACK = "127.0.0.1";
200
305
  CliAuth = class {
201
306
  constructor(mcpUrl, {
202
307
  path = configPath(),
@@ -218,7 +323,10 @@ var MAX_AUTH_BYTES, MAX_FILE_BYTES, LOGIN_TIMEOUT_MS, LOOPBACK, CliAuth, init_cl
218
323
  });
219
324
  let address = callback.address();
220
325
  if (!address || typeof address == "string") throw new Error("Could not start OAuth callback.");
221
- let redirectUri = `http://${LOOPBACK}:${address.port}/callback`, origin = new URL(this.mcpUrl).origin, loginTimer;
326
+ let redirectUri = `http://${LOOPBACK}:${address.port}/callback`, origin = new URL(this.mcpUrl).origin, loginTimer, waiting = [], answerBrowser = (result) => Promise.race([
327
+ Promise.all(waiting.splice(0).map((res) => sendSignInPage(res, result))),
328
+ delay(2e3, void 0, { ref: !1 })
329
+ ]);
222
330
  try {
223
331
  let registration = await readJson(await this.fetcher(`${origin}/oauth/register`, {
224
332
  method: "POST",
@@ -239,7 +347,7 @@ var MAX_AUTH_BYTES, MAX_FILE_BYTES, LOGIN_TIMEOUT_MS, LOOPBACK, CliAuth, init_cl
239
347
  if (typeof registration.client_id != "string" || !registration.client_id)
240
348
  throw new Error("Adelin did not register the CLI.");
241
349
  let recovery;
242
- for (let attempt = 0; attempt < 3; attempt++) {
350
+ for (let attempt = 0; attempt < LOGIN_ATTEMPTS; attempt++) {
243
351
  let verifier = randomBytes(32).toString("base64url"), challenge = createHash("sha256").update(verifier).digest("base64url"), state = randomBytes(32).toString("base64url");
244
352
  callback.removeAllListeners("request");
245
353
  let authorize = new URL(`${origin}/oauth/authorize`);
@@ -256,24 +364,26 @@ var MAX_AUTH_BYTES, MAX_FILE_BYTES, LOGIN_TIMEOUT_MS, LOOPBACK, CliAuth, init_cl
256
364
  recovery && authorize.searchParams.set("adelin_recovery", recovery);
257
365
  let answer = await new Promise((resolveCode, reject) => {
258
366
  loginTimer = setTimeout(() => reject(new Error("Adelin login timed out.")), LOGIN_TIMEOUT_MS), callback.on("request", (req, res) => {
259
- let url = new URL(req.url ?? "/", redirectUri), provided = Buffer.from(url.searchParams.get("state") ?? ""), expected = Buffer.from(state), valid = url.pathname === "/callback" && req.method === "GET" && provided.length === expected.length && timingSafeEqual(provided, expected);
260
- if (res.writeHead(valid ? 200 : 400, {
261
- "Content-Type": "text/html; charset=utf-8",
262
- "Cache-Control": "no-store",
263
- "Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'"
264
- }), res.end(valid ? "<h1>Adelin sign-in complete</h1><p>You can close this tab.</p>" : "<h1>Invalid Adelin sign-in callback</h1>"), !valid) return;
265
- clearTimeout(loginTimer);
367
+ let url = new URL(req.url ?? "/", redirectUri), provided = Buffer.from(url.searchParams.get("state") ?? ""), expected = Buffer.from(state);
368
+ if (!(url.pathname === "/callback" && req.method === "GET" && provided.length === expected.length && timingSafeEqual(provided, expected))) return void sendSignInPage(res, "invalid");
369
+ waiting.push(res), clearTimeout(loginTimer);
266
370
  let receivedCode = url.searchParams.get("code");
267
371
  if (url.searchParams.get("error") === "APP_SELECTION_CHANGED" && /^[A-Za-z0-9_-]{43}$/.test(url.searchParams.get("error_description") ?? ""))
268
372
  return resolveCode({ recovery: url.searchParams.get("error_description") });
269
- receivedCode ? resolveCode({ code: receivedCode }) : reject(new Error("Adelin login was denied."));
373
+ resolveCode(receivedCode ? { code: receivedCode } : { error: url.searchParams.get("error") });
270
374
  }), this.onUrl(authorize.href), Promise.resolve(this.browser(authorize.href)).catch(reject);
271
375
  });
272
- if (answer.recovery) {
273
- recovery = answer.recovery;
376
+ if (answer.recovery && attempt < LOGIN_ATTEMPTS - 1) {
377
+ await answerBrowser("changed"), recovery = answer.recovery;
274
378
  continue;
275
379
  }
276
- let code = answer.code, token = await readJson(await this.fetcher(`${origin}/oauth/token`, {
380
+ if (answer.recovery) break;
381
+ let code = answer.code;
382
+ if (!code) {
383
+ let denied = answer.error === "access_denied";
384
+ throw await answerBrowser(denied ? "denied" : "failed"), new Error(denied ? "Adelin login was denied." : "Adelin login did not finish. Run adelin login again.");
385
+ }
386
+ let token = await readJson(await this.fetcher(`${origin}/oauth/token`, {
277
387
  method: "POST",
278
388
  redirect: "error",
279
389
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
@@ -290,11 +400,11 @@ var MAX_AUTH_BYTES, MAX_FILE_BYTES, LOGIN_TIMEOUT_MS, LOOPBACK, CliAuth, init_cl
290
400
  return await withCredentialLock(this.path, () => saveCredential(this.path, tokenFields(
291
401
  token,
292
402
  { mcpUrl: this.mcpUrl, clientId: registration.client_id }
293
- ))), { signedIn: !0 };
403
+ ))), await answerBrowser("complete"), { signedIn: !0 };
294
404
  }
295
405
  throw new Error("App access changed. Start login again.");
296
406
  } finally {
297
- clearTimeout(loginTimer), callback.close();
407
+ clearTimeout(loginTimer), await answerBrowser("failed"), callback.close();
298
408
  }
299
409
  }
300
410
  async accessToken() {
@@ -20,19 +20,19 @@ The CLI stores sign-in per user in `adelin/auth.json` under the user config dire
20
20
 
21
21
  The CLI and background upload workers on the same host serialize every sign-in save, logout and token refresh through an exclusive loopback listener keyed by the canonical credential path. The listener exchanges no credential data, and the operating system releases it when its process exits or crashes. A second process reuses the rotated credential; logout waits for an active refresh, then removes only that server's sign-in so the refresh cannot recreate it. Another credential operation or an unrelated service occupying the same local port causes a wait with a 30-second deadline before a retry refusal. A loopback permission failure also refuses the operation without changing stored credentials.
22
22
 
23
- Local byte transfers and live-key access require a native loopback connection requesting `local-transfer` and `live-credentials`. The sign-in page names the unverified requester and offers separate unchecked approvals for private file transfers and saving live keys locally. A client name never authenticates its publisher. Live-key approval requires local-transfer approval and `live.manage` in at least one app the connection covers. These approvals belong to the current account, client and grant; removing or expiring consent denies subsequent sensitive actions.
23
+ Local byte transfers and live-key access require a native loopback connection requesting `local-transfer` and `live-credentials`. The sign-in page names the unverified requester and lists private file transfers among what approving allows, and offers separate approvals, off by default, for saving live keys locally and for changing prices and plans. A client name never authenticates its publisher. Live-key approval requires a connection with file transfers and `live.manage` in at least one app the connection covers. These approvals belong to the current account, client and grant; removing or expiring consent denies subsequent sensitive actions.
24
24
 
25
25
  `adelin logout` revokes the current connection and removes its local sign-in. `adelin logout --local-only` removes only the local sign-in; it does not revoke the app grant. Revoking the connection in account settings ends its app grants. Follow [private local output](#private-local-output) for deliberately written credential files, their handling and rotation.
26
26
 
27
27
  ## Choose and open an app
28
28
 
29
- At sign-in the builder chooses **All apps, including new ones** (the default) or **Only selected apps**. Apps you create are always usable by that connection. **Settings → Connected code agents → Manage apps** adds or removes apps and switches mode without signing in again. With all apps, the connection can do what the builder's current role allows in each app, checked on every call, so a role change narrows or widens it at once. With selected apps, each app keeps the capabilities approved for it, and the builder's current role can only narrow them. Live stream keys need a separate opt-in at sign-in. `connection_status` reports `scope` (`all_apps` or `selected`) and project setup state. When signed out, tools answer `SIGN_IN_REQUIRED`: tell the builder to run `adelin login`; the Adelin tools appear shortly after login without restarting the agent. While the stored sign-in still works, `adelin login` only reports that the builder is already signed in; `adelin login --force` signs in again to change what the connection may do.
29
+ At sign-in the builder chooses **All apps, including new ones** (the default) or **Only selected apps**. Apps you create are always usable by that connection. **Settings → Connected code agents → Manage apps** adds or removes apps and switches mode without signing in again. With all apps, the connection can do what the builder's current role allows in each app, checked on every call, so a role change narrows or widens it at once. With selected apps, each app keeps the capabilities approved for it, and the builder's current role can only narrow them. Live stream keys and pricing changes each need a separate opt-in at sign-in. `connection_status` reports `scope` (`all_apps` or `selected`) and project setup state. When signed out, tools answer `SIGN_IN_REQUIRED`: tell the builder to run `adelin login`; the Adelin tools appear shortly after login without restarting the agent. While the stored sign-in still works, `adelin login` only reports that the builder is already signed in; `adelin login --force` signs in again to change what the connection may do.
30
30
 
31
31
  Call `list_editable_apps` (`limit` 1–25, default 10, and `nextCursor` as `cursor`) or `select_app(app_id)` to choose an allowed app. `select_app` returns `app` or `APP_NOT_EDITABLE`. Arguments outside a tool's input schema, on any tool, return `{ok:false,error:{code:"INVALID_ARGUMENT",message}}` with `isError: true` and change nothing. The message names the first wrong field and what was expected, for example `mode is not accepted for entry.patch` or `payload.patch.title: expected string`, and never repeats the value sent; correct that field and call again. The `library_mutate` description lists each action's payload and which actions accept `mode`. To make a new app, follow [create an app](#create-an-app).
32
32
 
33
33
  ### Pricing and icons
34
34
 
35
- The access tools in [access.md](access.md) and `search_icons` from [icons.md](../design/icons.md) work over this connection. Each access tool takes `app_id`, needs no open edit session, and checks on every call that the connection covers the app and that the builder's current role may view pricing (`read_access`, `explain_access`, `check_access_change`) or manage it (`save_access_offer`, `set_access_coverage`, `set_access_level`, `archive_access_offer`). Replies are plain text, including refusals. `search_icons` takes no app.
35
+ The access tools in [access.md](access.md) and `search_icons` from [icons.md](../design/icons.md) work over this connection. Each access tool takes `app_id`, needs no open edit session, and checks on every call that the connection covers the app and that the builder's current role may view pricing (`read_access`, `explain_access`, `check_access_change`) or manage it (`save_access_offer`, `set_access_coverage`, `set_access_level`, `archive_access_offer`). Changing anything also needs **Manage prices and plans**, an opt-in at sign-in; without it those four tools answer `PRICING_NOT_ALLOWED` and change nothing, while the read tools keep working on a connection with file transfer. Tell the builder to run `adelin login --force` and turn it on; never retry around it. Replies are plain text, including refusals. `search_icons` takes no app.
36
36
 
37
37
  ### Create an app {#create-an-app}
38
38
 
@@ -859,7 +859,7 @@ The media library holds the app's uploaded video and audio files and its transco
859
859
  | `adelin media inspect` | `operation.inspect` | `library.view` | read-only |
860
860
  | `adelin media preview-page` | `preview.page` | `library.manage` | read-only |
861
861
 
862
- Upload commands require the explicit local-transfer approval described under [sign-in](#sign-in-and-credentials); a connection without it gets `ACCESS_DENIED`. `NOT_FOUND` never tells an unknown upload from one in another app. Removing the app or the approval makes the next call return `ACCESS_DENIED`. Invalid flags or arguments return `INVALID_ARGUMENT` naming the field before any request is sent. `RETRYABLE_CONFLICT` means another writer held the upload or the profiles for a moment. File-transfer commands retry the identical operation up to six times, waiting 2, 4, 8, 16 and 30 seconds; other media commands return the conflict for review. A failed asset cannot be completed again: `media complete` returns `UPLOAD_NOT_RESUMABLE` with reason `failed` or the canonical `abandoned` disposition, never an `uploaded` success.
862
+ Upload commands require the file-transfer access described under [sign-in](#sign-in-and-credentials); a connection without it gets `ACCESS_DENIED`. `NOT_FOUND` never tells an unknown upload from one in another app. Removing the app or the approval makes the next call return `ACCESS_DENIED`. Invalid flags or arguments return `INVALID_ARGUMENT` naming the field before any request is sent. `RETRYABLE_CONFLICT` means another writer held the upload or the profiles for a moment. File-transfer commands retry the identical operation up to six times, waiting 2, 4, 8, 16 and 30 seconds; other media commands return the conflict for review. A failed asset cannot be completed again: `media complete` returns `UPLOAD_NOT_RESUMABLE` with reason `failed` or the canonical `abandoned` disposition, never an `uploaded` success.
863
863
 
864
864
  Upload sessions belong to the authorized connection that started them. Use that connection to inspect a session, resume, sign parts, complete or cancel it; another connection receives `NOT_FOUND`. `media get` and `media status` remain authorized app reads. To cancel another connection's upload in an app you manage, use `media delete` with its preview and confirmation.
865
865
 
@@ -91,11 +91,15 @@ fold-posture support.
91
91
 
92
92
  ## Focus scrolling
93
93
 
94
- Vertical TV scroll views and virtualized lists park focused content 80 authoring
95
- units below the viewport top, clamped so the focused item fits and the page stays
96
- inside its scroll range. Moving sideways in a visible row keeps its vertical
97
- position. Horizontal lists reveal only the needed overflow; touch scrolling stays
98
- native. `ScrollView` and `FlashList` accept a `viewportOffset` override.
94
+ Vertical TV scroll views park focused content 80 authoring units below the viewport
95
+ top, clamped so the focused item fits and the page stays inside its scroll range.
96
+ Moving sideways in a visible row keeps its vertical
97
+ position. Native and web TV FlashLists align focus toward the leading edge when
98
+ moving right or down, and toward the trailing edge when moving left or up.
99
+ Reversals scroll at most two item lengths per move unless more movement is needed to reveal focus; content
100
+ boundaries limit every destination. Horizontal lists respect their leading content
101
+ padding and `scrollPaddingStart`. Touch scrolling stays native. `ScrollView` and
102
+ `FlashList` accept a vertical `viewportOffset` override.
99
103
 
100
104
  TV focus scrolling animates in the runtime. Repeated remote input retargets the
101
105
  current motion instead of starting competing animations. System reduced motion