acryl-cli-linux-x64 0.1.35 → 0.1.36

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.
@@ -6,6 +6,7 @@
6
6
  * without any of them depending on pi-tui.
7
7
  * @module @tomowang/dsh-tui/tui/actions
8
8
  */
9
+ import type { AuthMethod } from 'acryl-control';
9
10
  import type { GoalCommand } from './commands.js';
10
11
  import type { ProviderDraft, ProviderRow } from './modelProfile/types.js';
11
12
  import type { QuestionAnswer } from './interaction/types.js';
@@ -43,7 +44,7 @@ export interface TuiActions {
43
44
  /** Close the `/login` overlay. */
44
45
  closeLogin(): void;
45
46
  /** Run the authorization flow for the selected provider (pi-ai OAuth). `method` defaults to the flow's first (its preferred) method when omitted. */
46
- beginAuthorization(key: string, method?: string): void;
47
+ beginAuthorization(key: string, method?: AuthMethod): void;
47
48
  /** Answer the in-flight authorization prompt (typed text/secret, or a chosen option id). */
48
49
  answerAuthorizationPrompt(value: string): void;
49
50
  /** Close the `/model` overlay, discarding any in-progress edit. */
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Scrollable-list windowing shared by every overlay that paints a
3
+ * selection-following list (`/login`'s provider list, `/model`'s picker and
4
+ * provider list). Previously duplicated verbatim in `LoginOverlay.ts` and
5
+ * `ModelProfileOverlay.ts` (specs/001-acryl-refactor-improvements-and-tech-debt, R7).
6
+ * @module @tomowang/dsh-tui/tui/listWindow
7
+ */
8
+ /**
9
+ * Rows available for a scrollable list body: terminal height minus the lines
10
+ * every such screen spends on chrome (header/hint/notice/search — `chrome`
11
+ * lines, caller-counted since it varies by screen). Long catalogs (~35
12
+ * providers, matching that many models) previously rendered every row
13
+ * unconditionally, pushing the key-legend hint line — the only place a
14
+ * shortcut is documented — past the bottom of the terminal, invisible
15
+ * without scrolling back. Every list-shaped view windows around the current
16
+ * selection instead, so the hint line is always the last line printed and
17
+ * always fits on screen.
18
+ */
19
+ export declare function listWindow(terminalRows: number, chrome: number): number;
20
+ /** The `[start, end)` slice of `count` items to show so `selected` stays visible within `maxVisible` rows, biased to keep it centered. */
21
+ export declare function visibleRange(count: number, selected: number, maxVisible: number): {
22
+ start: number;
23
+ end: number;
24
+ };
@@ -23,21 +23,11 @@ export declare class LoginOverlay implements Component {
23
23
  private readonly tui;
24
24
  private readonly store;
25
25
  private readonly actions;
26
- private step;
27
- private authType;
28
- private authTypeCursor;
29
- private chooserSkipped;
30
- private autoSkipChecked;
31
- private listCursor;
32
- private searchQuery;
26
+ private view;
33
27
  private promptField;
34
28
  private promptCursor;
35
29
  constructor(tui: TUI, store: TuiStore, actions: TuiActions);
36
30
  invalidate(): void;
37
- /** See `ModelProfileOverlay.listWindow` — same overflow bug, same fix: a long provider list (~35 catalog entries) must never push the key-legend hint line past the bottom of the terminal. */
38
- private listWindow;
39
- /** The `[start, end)` slice of `count` items to show so `selected` stays visible within `maxVisible` rows, biased to keep it centered. */
40
- private visibleRange;
41
31
  /**
42
32
  * The global one-line notice (`store.setNotice`), rendered inline here.
43
33
  * `/login` runs as a full-screen overlay that paints over the whole
@@ -48,8 +38,24 @@ export declare class LoginOverlay implements Component {
48
38
  * of the screen appearing to do nothing once the browser redirects back.
49
39
  */
50
40
  private noticeLines;
51
- /** Partition the loaded flows by method type, once, the first time they arrive; auto-advances past the chooser if only one type is on offer. */
52
- private maybeAutoSkipChooser;
41
+ /**
42
+ * Pure: given the loaded flows, which single method (if any) they all
43
+ * share — the chooser has nothing to offer when only one method type is
44
+ * registered at all. Recomputed fresh every call (no cached/latched
45
+ * result), so a later-refreshed flow set is always re-evaluated instead of
46
+ * replaying a stale decision (specs/001-…, R6).
47
+ */
48
+ private autoSkipAuthType;
49
+ /**
50
+ * Pure: the view to actually render/operate against. `this.view` stays the
51
+ * untouched `authType` default until the user explicitly chooses (Enter on
52
+ * the chooser) — until then, this derives the auto-skipped `list` view on
53
+ * every call instead of mutating `this.view` from inside `render()`. The
54
+ * first `handleInput` mutation against a derived (not-yet-explicit) `list`
55
+ * view reassigns `this.view` directly (see `handleProviderListInput`), so
56
+ * cursor/search state persists across renders once the user interacts.
57
+ */
58
+ private effectiveView;
53
59
  private filteredFlows;
54
60
  private renderAuthTypeChooser;
55
61
  private renderProviderList;
@@ -3,6 +3,7 @@
3
3
  * `ctx.authorization`'s registered flows with the surface that renders them.
4
4
  * @module @tomowang/dsh-tui/tui/login/types
5
5
  */
6
+ import type { AuthMethod } from 'acryl-control';
6
7
  /** One method a flow offers (e.g. `oauth`, `api-key`). */
7
8
  export interface AuthorizationMethodRow {
8
9
  readonly id: string;
@@ -21,7 +22,7 @@ export interface AuthorizationFlowRow {
21
22
  /** Whether a credential is already stored for this flow's key — signed in and ready to use. */
22
23
  readonly configured: boolean;
23
24
  /** How the stored credential was obtained, or `undefined` when `configured` is false. */
24
- readonly authMethod: 'oauth' | 'api-key' | undefined;
25
+ readonly authMethod: AuthMethod | undefined;
25
26
  }
26
27
  /** One choice offered by a `select` authorization prompt. */
27
28
  export interface LoginPromptOption {
@@ -38,20 +38,6 @@ export declare class ModelProfileOverlay implements Component {
38
38
  private modelSelected;
39
39
  constructor(tui: TUI, store: TuiStore, actions: TuiActions);
40
40
  invalidate(): void;
41
- /**
42
- * Rows available for a scrollable list body: terminal height minus the
43
- * lines every such screen spends on chrome (header/hint/notice/search —
44
- * `chrome` lines, caller-counted since it varies by screen). Long catalogs
45
- * (~35 providers, matching that many models) previously rendered every row
46
- * unconditionally, pushing the key-legend hint line — the only place a
47
- * shortcut is documented — past the bottom of the terminal, invisible
48
- * without scrolling back. Every list-shaped view here windows around the
49
- * current selection instead, so the hint line is always the last line
50
- * printed and always fits on screen.
51
- */
52
- private listWindow;
53
- /** The `[start, end)` slice of `count` items to show so `selected` stays visible within `maxVisible` rows, biased to keep it centered. */
54
- private visibleRange;
55
41
  /**
56
42
  * The global one-line notice (`store.setNotice`), rendered inline here.
57
43
  * `/model` runs as a full-screen overlay that paints over the whole
@@ -5,6 +5,7 @@
5
5
  * draft one add/edit form works with before a save round-trips it back.
6
6
  * @module @tomowang/dsh-tui/tui/modelProfile/types
7
7
  */
8
+ import type { AuthMethod } from 'acryl-control';
8
9
  /**
9
10
  * The `apiKeyEnv` reference a provider route falls back to when its settings
10
11
  * profile names none, e.g. `my-proxy` -> `MY_PROXY_API_KEY`. Shared between
@@ -59,7 +60,7 @@ export interface ProviderRow {
59
60
  readonly apiKeyRef: string;
60
61
  readonly apiKeyConfigured: boolean;
61
62
  /** How the credential behind `apiKeyConfigured` was obtained, or `undefined` when none is configured. */
62
- readonly authMethod: 'oauth' | 'api-key' | undefined;
63
+ readonly authMethod: AuthMethod | undefined;
63
64
  readonly models: readonly ModelEntry[];
64
65
  /** Settings revision this row was read at; replayed as `expectedRevision` on write. */
65
66
  readonly revision: number | undefined;
@@ -76,7 +77,7 @@ export interface ProviderDraft {
76
77
  readonly apiKeyRef: string;
77
78
  readonly apiKeyConfigured: boolean;
78
79
  /** How the credential behind `apiKeyConfigured` was obtained, or `undefined` when none is configured. */
79
- readonly authMethod: 'oauth' | 'api-key' | undefined;
80
+ readonly authMethod: AuthMethod | undefined;
80
81
  /** Local-only plaintext key entered in this session; empty means "keep current". */
81
82
  readonly apiKeyDraft: string;
82
83
  /** First/last few characters of the currently-stored key (e.g. `sk-p…9sZ4`), so the field isn't blank-looking when one is already set; `undefined` when none is configured. */
@@ -10,7 +10,7 @@
10
10
  * no movement) and random-length *active* bursts (the mode's clip plays). A
11
11
  * mode change (`setMode`) wakes it into an active burst so an agent turn still
12
12
  * reads as activity, and the status bar carries the live state meanwhile.
13
- * @module acryl-tui/yly/yly-pet
13
+ * @module acryl-cli/yly/yly-pet
14
14
  */
15
15
  import type { Component, TUI } from '@earendil-works/pi-tui';
16
16
  import { type YlyState } from './yly-programs.js';
@@ -3,7 +3,7 @@
3
3
  * `ylyAnimations.ts` (frame indices + per-step ms + loop/next + bob). A pi-tui
4
4
  * terminal renders these frame-for-frame. Frame names follow `ylyFrames.ts`
5
5
  * (sheet cell indices 0..12).
6
- * @module acryl-tui/yly/yly-programs
6
+ * @module acryl-cli/yly/yly-programs
7
7
  */
8
8
  export type YlyState = 'idle' | 'thinking' | 'walking' | 'tool' | 'typing' | 'success' | 'error' | 'sleeping';
9
9
  export interface YlyStep {
@@ -1699,7 +1699,7 @@
1699
1699
  "packageManager": "pnpm@11.8.0",
1700
1700
  "pendingBuilds": [],
1701
1701
  "publicHoistPattern": [],
1702
- "prunedAt": "Tue, 08 Sep 2026 14:35:40 GMT",
1702
+ "prunedAt": "Tue, 08 Sep 2026 18:18:03 GMT",
1703
1703
  "registries": {
1704
1704
  "default": "https://registry.npmjs.org/",
1705
1705
  "@jsr": "https://npm.jsr.io/"