zidane 4.0.2 → 4.1.3

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.
Files changed (77) hide show
  1. package/README.md +196 -614
  2. package/dist/agent-BoV5Twdl.d.ts +2347 -0
  3. package/dist/agent-BoV5Twdl.d.ts.map +1 -0
  4. package/dist/contexts-3Arvn7yR.js +321 -0
  5. package/dist/contexts-3Arvn7yR.js.map +1 -0
  6. package/dist/contexts.d.ts +2 -25
  7. package/dist/contexts.js +2 -10
  8. package/dist/errors-D1lhd6mX.js +118 -0
  9. package/dist/errors-D1lhd6mX.js.map +1 -0
  10. package/dist/index-28otmfLX.d.ts +400 -0
  11. package/dist/index-28otmfLX.d.ts.map +1 -0
  12. package/dist/index-BfSdALzk.d.ts +113 -0
  13. package/dist/index-BfSdALzk.d.ts.map +1 -0
  14. package/dist/index-DPsd0qwm.d.ts +254 -0
  15. package/dist/index-DPsd0qwm.d.ts.map +1 -0
  16. package/dist/index.d.ts +5 -95
  17. package/dist/index.js +141 -271
  18. package/dist/index.js.map +1 -0
  19. package/dist/interpolate-CukJwP2G.js +887 -0
  20. package/dist/interpolate-CukJwP2G.js.map +1 -0
  21. package/dist/mcp-8wClKY-3.js +771 -0
  22. package/dist/mcp-8wClKY-3.js.map +1 -0
  23. package/dist/mcp.d.ts +2 -4
  24. package/dist/mcp.js +2 -13
  25. package/dist/messages-z5Pq20p7.js +1020 -0
  26. package/dist/messages-z5Pq20p7.js.map +1 -0
  27. package/dist/presets-Cs7_CsMk.js +39 -0
  28. package/dist/presets-Cs7_CsMk.js.map +1 -0
  29. package/dist/presets.d.ts +2 -43
  30. package/dist/presets.js +2 -17
  31. package/dist/providers-CX-R-Oy-.js +969 -0
  32. package/dist/providers-CX-R-Oy-.js.map +1 -0
  33. package/dist/providers.d.ts +2 -4
  34. package/dist/providers.js +3 -23
  35. package/dist/session/sqlite.d.ts +7 -12
  36. package/dist/session/sqlite.d.ts.map +1 -0
  37. package/dist/session/sqlite.js +67 -79
  38. package/dist/session/sqlite.js.map +1 -0
  39. package/dist/session-Cn68UASv.js +440 -0
  40. package/dist/session-Cn68UASv.js.map +1 -0
  41. package/dist/session.d.ts +2 -4
  42. package/dist/session.js +3 -27
  43. package/dist/skills.d.ts +3 -322
  44. package/dist/skills.js +24 -47
  45. package/dist/skills.js.map +1 -0
  46. package/dist/stats-DoKUtF5T.js +58 -0
  47. package/dist/stats-DoKUtF5T.js.map +1 -0
  48. package/dist/tools-DpeWKzP1.js +3941 -0
  49. package/dist/tools-DpeWKzP1.js.map +1 -0
  50. package/dist/tools.d.ts +3 -95
  51. package/dist/tools.js +2 -40
  52. package/dist/tui.d.ts +533 -0
  53. package/dist/tui.d.ts.map +1 -0
  54. package/dist/tui.js +2004 -0
  55. package/dist/tui.js.map +1 -0
  56. package/dist/types-Bx_F8jet.js +39 -0
  57. package/dist/types-Bx_F8jet.js.map +1 -0
  58. package/dist/types.d.ts +4 -55
  59. package/dist/types.js +4 -28
  60. package/package.json +38 -4
  61. package/dist/agent-BAHrGtqu.d.ts +0 -2425
  62. package/dist/chunk-4ILGBQ23.js +0 -803
  63. package/dist/chunk-4LPBN547.js +0 -3540
  64. package/dist/chunk-64LLNY7F.js +0 -28
  65. package/dist/chunk-6STZTA4N.js +0 -830
  66. package/dist/chunk-7GQ7P6DM.js +0 -566
  67. package/dist/chunk-IC7FT4OD.js +0 -37
  68. package/dist/chunk-JCOB6IYO.js +0 -22
  69. package/dist/chunk-JH6IAAFA.js +0 -28
  70. package/dist/chunk-LNN5UTS2.js +0 -97
  71. package/dist/chunk-PMCQOMV4.js +0 -490
  72. package/dist/chunk-UD25QF3H.js +0 -304
  73. package/dist/chunk-W57VY6DJ.js +0 -834
  74. package/dist/sandbox-D7v6Wy62.d.ts +0 -28
  75. package/dist/skills-use-DwZrNmcw.d.ts +0 -80
  76. package/dist/types-Bai5rKpa.d.ts +0 -89
  77. package/dist/validation-Pm--dQEU.d.ts +0 -185
package/dist/tools.d.ts CHANGED
@@ -1,95 +1,3 @@
1
- export { S as SkillsReadToolOptions, a as SkillsRunScriptToolOptions, b as SkillsUseToolOptions, c as createSkillsReadTool, d as createSkillsRunScriptTool, e as createSkillsUseTool, f as edit, g as glob, h as grep, m as multiEdit } from './skills-use-DwZrNmcw.js';
2
- export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult, c as createInteractionTool, b as createSpawnTool, v as validateToolArgs } from './validation-Pm--dQEU.js';
3
- import { a7 as ToolDef } from './agent-BAHrGtqu.js';
4
- export { a6 as ToolContext, aa as ToolMap } from './agent-BAHrGtqu.js';
5
- import 'hookable';
6
- import './presets.js';
7
- import './types-Bai5rKpa.js';
8
- import '@modelcontextprotocol/sdk/client/index.js';
9
-
10
- declare const listFiles: ToolDef;
11
-
12
- declare const readFile: ToolDef;
13
-
14
- declare const shell: ToolDef;
15
-
16
- /**
17
- * `tool_search` — progressive tool disclosure.
18
- *
19
- * Counterpart to `skills_use` for the MCP tool surface: the catalog (name +
20
- * description) lives in the system prompt; full `inputSchema` payloads load
21
- * lazily through this tool. After a successful match, the matched tools'
22
- * canonical names are added to the per-run "unlocked" set and become callable
23
- * immediately (the loop rebuilds `formattedTools` before the next provider
24
- * request, advertising the unlocked tools to the provider).
25
- *
26
- * Aliasing: the tool advertises and matches on the **wire** (alias-rewritten)
27
- * name — the only name the model ever sees. Internally each lazy entry also
28
- * carries its `canonicalName`, which is what gets added to the `unlocked` set
29
- * (the loop's tool registry is keyed by canonical name).
30
- *
31
- * Result shape: structured pseudo-XML wrapping a JSON `inputSchema` payload.
32
- * The schema is inlined verbatim (NOT XML-escaped) so the model can reuse it
33
- * directly when constructing arguments — escaping the JSON would force the
34
- * model to mentally un-escape `"` etc. when reasoning about field types.
35
- */
36
-
37
- interface LazyToolEntry {
38
- /**
39
- * Wire name (after `toolAliases` rewrite). What the model sees in the
40
- * catalog, what `tool_search` matches against, and what the provider's
41
- * tool list will carry once the entry is unlocked.
42
- */
43
- name: string;
44
- /**
45
- * Canonical (registry-key) name used for unlock-set membership and for the
46
- * loop's `ctx.tools[name]` dispatch lookup. Equal to `name` when no alias
47
- * is configured for this tool.
48
- */
49
- canonicalName: string;
50
- description: string;
51
- inputSchema: Record<string, unknown>;
52
- /** Source MCP server, when applicable. Used for `server`-bulk unlock. */
53
- server?: string;
54
- }
55
- interface ToolSearchToolOptions {
56
- /**
57
- * Snapshot of every lazy tool the model can discover. Built once per run by
58
- * the agent — the tool closes over this array and never mutates it.
59
- */
60
- catalog: readonly LazyToolEntry[];
61
- /**
62
- * Mutable per-run set of unlocked **canonical** tool names. The tool adds
63
- * matches in place; the loop reads the set when rebuilding the wire-level
64
- * tool list. Keyed by canonical (not wire) so dispatch lookups stay
65
- * alias-stable.
66
- */
67
- unlocked: Set<string>;
68
- /** Default cap on returned matches when the model omits `limit`. */
69
- defaultLimit?: number;
70
- }
71
- /**
72
- * Factory for `tool_search`. Auto-injected by the agent when
73
- * `behavior.toolDisclosure === 'lazy'` and at least one MCP tool is in the
74
- * registry. Opt out via `behavior.toolSearch.tool === false`.
75
- */
76
- declare function createToolSearchTool(options: ToolSearchToolOptions): ToolDef;
77
-
78
- /**
79
- * Write a file, with an idempotency signal when the content is unchanged.
80
- *
81
- * Three return shapes — chosen so the model can recognize a no-op without a
82
- * separate read:
83
- * - `Created path (N bytes)` — file did not exist
84
- * - `Updated path (N bytes)` — content differed from on-disk
85
- * - `No change needed: path already at target state (N bytes)` — equal
86
- *
87
- * Race window: in non-process execution contexts (docker, sandbox) shared by
88
- * multiple agents, another writer can mutate the file between our read and
89
- * our write. Local process context is single-writer per agent so the race is
90
- * a non-issue there. Documented rather than locked because the cost of
91
- * cross-context locking outweighs the cost of a stale "No change" message.
92
- */
93
- declare const writeFile: ToolDef;
94
-
95
- export { type LazyToolEntry, ToolDef, type ToolSearchToolOptions, createToolSearchTool, listFiles, readFile, shell, writeFile };
1
+ import { _ as ToolDef, g as ToolContext, v as ToolMap } from "./agent-BoV5Twdl.js";
2
+ import { A as edit, C as readFile, D as createInteractionTool, E as InteractionToolOptions, O as grep, S as shell, T as listFiles, _ as createSkillsUseTool, b as SkillsReadToolOptions, c as validateToolArgs, d as createToolSearchTool, f as ChildAgent, g as SkillsUseToolOptions, h as createSpawnTool, k as glob, l as LazyToolEntry, m as SpawnToolState, o as writeFile, p as SpawnToolOptions, s as ValidationResult, u as ToolSearchToolOptions, v as SkillsRunScriptToolOptions, w as multiEdit, x as createSkillsReadTool, y as createSkillsRunScriptTool } from "./index-28otmfLX.js";
3
+ export { ChildAgent, InteractionToolOptions, LazyToolEntry, SkillsReadToolOptions, SkillsRunScriptToolOptions, SkillsUseToolOptions, SpawnToolOptions, SpawnToolState, ToolContext, ToolDef, ToolMap, ToolSearchToolOptions, ValidationResult, createInteractionTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, glob, grep, listFiles, multiEdit, readFile, shell, validateToolArgs, writeFile };
package/dist/tools.js CHANGED
@@ -1,40 +1,2 @@
1
- import {
2
- createInteractionTool,
3
- createSkillsReadTool,
4
- createSkillsRunScriptTool,
5
- createSkillsUseTool,
6
- createSpawnTool,
7
- createToolSearchTool,
8
- edit,
9
- glob,
10
- grep,
11
- listFiles,
12
- multiEdit,
13
- readFile,
14
- shell,
15
- validateToolArgs,
16
- writeFile
17
- } from "./chunk-4LPBN547.js";
18
- import "./chunk-6STZTA4N.js";
19
- import "./chunk-IC7FT4OD.js";
20
- import "./chunk-UD25QF3H.js";
21
- import "./chunk-7GQ7P6DM.js";
22
- import "./chunk-JH6IAAFA.js";
23
- import "./chunk-LNN5UTS2.js";
24
- export {
25
- createInteractionTool,
26
- createSkillsReadTool,
27
- createSkillsRunScriptTool,
28
- createSkillsUseTool,
29
- createSpawnTool,
30
- createToolSearchTool,
31
- edit,
32
- glob,
33
- grep,
34
- listFiles,
35
- multiEdit,
36
- readFile,
37
- shell,
38
- validateToolArgs,
39
- writeFile
40
- };
1
+ import { a as multiEdit, c as grep, f as createToolSearchTool, g as validateToolArgs, h as createSkillsReadTool, i as readFile, l as glob, m as createSkillsRunScriptTool, n as createSpawnTool, o as listFiles, p as createSkillsUseTool, r as shell, s as createInteractionTool, t as writeFile, u as edit } from "./tools-DpeWKzP1.js";
2
+ export { createInteractionTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, glob, grep, listFiles, multiEdit, readFile, shell, validateToolArgs, writeFile };
package/dist/tui.d.ts ADDED
@@ -0,0 +1,533 @@
1
+ import { Et as SessionTurn, H as Provider, It as TurnUsage, Mt as ToolResultContent, O as SessionStore } from "./agent-BoV5Twdl.js";
2
+ import { P as Preset } from "./index-28otmfLX.js";
3
+ import { SyntaxStyle } from "@opentui/core";
4
+ import * as _$react from "react";
5
+ import { Dispatch, ReactNode, SetStateAction } from "react";
6
+
7
+ //#region src/tui/auth.d.ts
8
+ type ProviderKey = 'anthropic' | 'openai' | 'openrouter' | 'cerebras';
9
+ interface AuthMethod {
10
+ source: 'env' | 'oauth';
11
+ /** Human-readable detail (env var name, expiry timestamp, …). */
12
+ detail: string;
13
+ }
14
+ interface ProviderAuth {
15
+ key: ProviderKey;
16
+ label: string;
17
+ /** True when at least one credential source is present. */
18
+ available: boolean;
19
+ methods: AuthMethod[];
20
+ }
21
+ declare function envKeyFor(key: ProviderKey): string;
22
+ /**
23
+ * Detect available auth across the providers the harness ships with.
24
+ *
25
+ * Mirrors the resolution order used by the providers at runtime:
26
+ * - explicit env var (highest)
27
+ * - OAuth credentials in `.credentials.json` (anthropic + openai-codex only)
28
+ *
29
+ * Pure read — never refreshes or rewrites the credentials file.
30
+ */
31
+ declare function detectAuth(env?: Record<string, string | undefined>): ProviderAuth[];
32
+ //#endregion
33
+ //#region src/tui/types.d.ts
34
+ type Screen = 'auth' | 'sessions' | 'chat';
35
+ /** Identifies the agent that produced a streaming event. */
36
+ type Owner = 'parent' | string;
37
+ interface StreamEvent {
38
+ kind: 'thinking' | 'tool' | 'tool-result' | 'error' | 'info' | 'separator' | 'markdown' | 'spawn-start' | 'spawn-end';
39
+ text: string;
40
+ /**
41
+ * For `markdown` events: true while the block is still receiving deltas.
42
+ * The renderer applies `md4x.heal()` and keeps OpenTUI's markdown parser in
43
+ * streaming mode while this is true. Flipped to false on `turn:after`.
44
+ */
45
+ streaming?: boolean;
46
+ /** Subagent that produced this event. Absent / 'parent' = top-level agent. */
47
+ childId?: string;
48
+ /** Nesting depth — 0 = parent, ≥ 1 = subagent (matches zidane's spawn depth). */
49
+ depth?: number;
50
+ }
51
+ interface Picked {
52
+ provider: ProviderAuth;
53
+ model: string;
54
+ }
55
+ interface SessionMeta {
56
+ id: string;
57
+ title: string;
58
+ turnCount: number;
59
+ updatedAt: number;
60
+ }
61
+ /** Persisted, user-toggleable transcript filters. */
62
+ interface Settings {
63
+ showThinking: boolean;
64
+ showToolCalls: boolean;
65
+ showToolResults: boolean;
66
+ }
67
+ //#endregion
68
+ //#region src/tui/store.d.ts
69
+ declare function createTuiStore(dbPath: string): SessionStore;
70
+ interface TuiState {
71
+ lastProvider?: ProviderKey;
72
+ lastSessionId?: string;
73
+ /** Per-provider last-used model id. */
74
+ lastModelByProvider?: Partial<Record<ProviderKey, string>>;
75
+ /** User-toggled transcript filters. Persisted so they outlive a launch. */
76
+ settings?: Partial<Settings>;
77
+ }
78
+ interface StateStoreApi {
79
+ load: () => TuiState;
80
+ save: (state: TuiState) => void;
81
+ }
82
+ declare function createStateStore(path: string): StateStoreApi;
83
+ declare function loadState(path: string): TuiState;
84
+ declare function saveState(path: string, state: TuiState): void;
85
+ /**
86
+ * Load every session and project it to the compact `SessionMeta` shape used by
87
+ * the picker. Sorted by recency via the underlying store's `list()` contract
88
+ * (sqlite store returns by `updated_at DESC`).
89
+ */
90
+ declare function listSessionMeta(store: SessionStore): Promise<SessionMeta[]>;
91
+ /** Derive a short title from the first user message — returns null when empty. */
92
+ declare function titleFromTurns(turns: SessionTurn[]): string | null;
93
+ /**
94
+ * Replay persisted turns as a viewable transcript. Mirrors the event shape produced
95
+ * live by the agent hooks so loaded and streaming history render identically.
96
+ *
97
+ * Skips `tool_result` blocks (they're not user-visible by default), and inserts a
98
+ * `separator` event between turn groups so the eye can parse turn boundaries.
99
+ */
100
+ declare function eventsFromTurns(turns: SessionTurn[]): StreamEvent[];
101
+ /** Shared formatter for the `↳ name(args)` line shown on tool calls. */
102
+ declare function toolCallPreview(name: string, input: Record<string, unknown>): string;
103
+ /** Render tool output as plain text, whether it's a string or structured content. */
104
+ declare function toolResultText(output: string | ToolResultContent[]): string;
105
+ /** Effective context size of the most recent assistant turn — drives the footer indicator. */
106
+ declare function lastContextSizeFromTurns(turns: SessionTurn[]): number;
107
+ //#endregion
108
+ //#region src/tui/config.d.ts
109
+ /**
110
+ * Structural model metadata — compatible with pi-ai's `Model` interface but
111
+ * not coupled to it, so callers can pass either pi-ai-shaped objects or a
112
+ * custom registry of their own.
113
+ *
114
+ * Deliberately a structural duplicate of `pi-ai`'s `Model` rather than a
115
+ * re-export: keeps the public API stable when pi-ai bumps shape, and lets
116
+ * hosts implement their own registry without depending on pi-ai's types.
117
+ */
118
+ interface ModelInfo {
119
+ id: string;
120
+ name?: string;
121
+ contextWindow: number;
122
+ maxTokens?: number;
123
+ reasoning?: boolean;
124
+ input?: readonly ('text' | 'image')[];
125
+ cost?: {
126
+ input: number;
127
+ output: number;
128
+ cacheRead?: number;
129
+ cacheWrite?: number;
130
+ };
131
+ provider?: string;
132
+ }
133
+ type ProviderRegistry = Partial<Record<ProviderKey, () => Provider>>;
134
+ type ModelRegistry = Partial<Record<ProviderKey, readonly ModelInfo[]>>;
135
+ /**
136
+ * Options accepted by `runTui()` and `resolveConfig()`. Every field is optional
137
+ * — sensible defaults boot a working chat against the four built-in providers
138
+ * with sessions stored under `~/.zidane/`.
139
+ */
140
+ interface TuiOptions {
141
+ /**
142
+ * Directory name used under `storageDir` for sessions + state.
143
+ * Default: `'.zidane'` → `~/.zidane/sessions.db` + `~/.zidane/state.json`.
144
+ * Pass e.g. `'.myapp'` for `~/.myapp/...`, or `'myapp'` for a visible dir.
145
+ */
146
+ prefix?: string;
147
+ /**
148
+ * Storage root. Defaults to the user's home directory. Combined with
149
+ * `prefix` to form the data directory.
150
+ */
151
+ storageDir?: string;
152
+ /**
153
+ * Provider factory map. Override entries (or supply a whole new map) to
154
+ * register custom providers. Default: anthropic/openai/openrouter/cerebras
155
+ * from the built-in zidane factories.
156
+ */
157
+ providers?: ProviderRegistry;
158
+ /**
159
+ * Agent preset (tools, system prompt, behavior). Default: `basic`.
160
+ */
161
+ preset?: Preset;
162
+ /**
163
+ * Bring your own session store. Default: a SQLite store at
164
+ * `<storageDir>/<prefix>/sessions.db`.
165
+ */
166
+ store?: SessionStore;
167
+ /**
168
+ * Per-provider model registry for the in-app model picker. Each list should
169
+ * be in pi-ai's `Model`-compatible shape (see `ModelInfo`). If omitted, the
170
+ * picker falls back to pi-ai's built-in registry via `getModels()`.
171
+ */
172
+ models?: ModelRegistry;
173
+ }
174
+ interface ResolvedConfig {
175
+ prefix: string;
176
+ storageDir: string;
177
+ paths: {
178
+ dir: string;
179
+ db: string;
180
+ state: string;
181
+ };
182
+ providers: ProviderRegistry;
183
+ preset: Preset;
184
+ store: SessionStore;
185
+ stateStore: StateStoreApi;
186
+ /** Lookup by `ProviderKey` returning the available models for the picker. */
187
+ modelsFor: (key: ProviderKey) => readonly ModelInfo[];
188
+ initialState: TuiState;
189
+ initialSettings: Partial<Settings>;
190
+ resumeProvider: ProviderAuth | null;
191
+ initialPicked: Picked | null;
192
+ }
193
+ /** Resolve user options into a fully-bound runtime config. Pure aside from disk reads. */
194
+ declare function resolveConfig(options?: TuiOptions): ResolvedConfig;
195
+ declare function ConfigProvider({
196
+ config,
197
+ children
198
+ }: {
199
+ config: ResolvedConfig;
200
+ children: ReactNode;
201
+ }): ReactNode;
202
+ declare function useConfig(): ResolvedConfig;
203
+ //#endregion
204
+ //#region src/tui/app.d.ts
205
+ /**
206
+ * Top-level TUI component. Accepts a fully-resolved `ResolvedConfig` and wires
207
+ * everything (settings, modal layer, screens, footer) underneath it.
208
+ *
209
+ * Hosts can either drive this via `runTui()` for the standard bootstrap or
210
+ * mount `<App config={resolveConfig(...)} />` themselves inside a renderer
211
+ * they already own.
212
+ */
213
+ declare function App({
214
+ config
215
+ }: {
216
+ config: ResolvedConfig;
217
+ }): _$react.ReactNode;
218
+ //#endregion
219
+ //#region src/tui/components.d.ts
220
+ /**
221
+ * `@opentui/react` extends `React.JSX.IntrinsicElements`, so `onSubmit` on `<input>`
222
+ * gets intersected with the DOM `SubmitEvent` shape and demands an unhelpful overload.
223
+ * The OpenTUI input runtime fires `(value: string) => void`; this helper isolates
224
+ * the cast so each call site stays readable.
225
+ */
226
+ declare function onInputSubmit(handler: (value: string) => void): never;
227
+ interface Hint {
228
+ key: string;
229
+ label: string;
230
+ }
231
+ interface ContextUsage {
232
+ used: number;
233
+ max: number;
234
+ }
235
+ declare function Footer({
236
+ hints,
237
+ picked,
238
+ context
239
+ }: {
240
+ hints: Hint[];
241
+ picked: Picked | null;
242
+ context: ContextUsage | null;
243
+ }): _$react.ReactNode;
244
+ declare function Spinner({
245
+ label
246
+ }: {
247
+ label: string;
248
+ }): _$react.ReactNode;
249
+ declare function Transcript({
250
+ events,
251
+ settings
252
+ }: {
253
+ events: StreamEvent[];
254
+ settings: Settings;
255
+ }): _$react.ReactNode;
256
+ /**
257
+ * Resolve the top margin for an event given the one rendered just before it.
258
+ *
259
+ * The only context-aware rule today: a tool/tool-result event that follows
260
+ * another tool/tool-result event collapses its margin to zero, so a chain of
261
+ * tool calls reads as a tight list — whether the user has hidden tool outputs
262
+ * or not, and whether the agent emits back-to-back calls or call→result pairs.
263
+ *
264
+ * Exported so the spacing matrix can be unit-tested without rendering.
265
+ */
266
+ declare function marginTopFor(event: StreamEvent, previous: StreamEvent | undefined): number;
267
+ //#endregion
268
+ //#region src/tui/format.d.ts
269
+ /** Compact token formatter — 12_415 → "12.4k", 1_234_567 → "1.23M". */
270
+ declare function fmtTokens(n: number): string;
271
+ /** Compact relative-time formatter — "just now / 5m / 3h / 2d". */
272
+ declare function ageString(ts: number, now?: number): string;
273
+ /** Six-char short form of a session id for headers and lists. */
274
+ declare function shortId(id: string): string;
275
+ //#endregion
276
+ //#region src/tui/modal.d.ts
277
+ interface ModalApi {
278
+ open: (node: ReactNode) => void;
279
+ close: () => void;
280
+ isOpen: boolean;
281
+ }
282
+ declare function ModalRoot({
283
+ children
284
+ }: {
285
+ children: ReactNode;
286
+ }): ReactNode;
287
+ declare function useModal(): ModalApi;
288
+ /**
289
+ * Focus computed against the modal layer.
290
+ *
291
+ * Pass a component's preferred focus state and this returns `false` whenever a
292
+ * modal is open — so focused inputs (textarea, selects) release their focus and
293
+ * stop intercepting keys behind the overlay. Pair with `focusable={false}` on
294
+ * "passive" focusables (scrollbox) so the renderer doesn't cycle focus into
295
+ * them when the primary input blurs.
296
+ */
297
+ declare function useModalAwareFocus(preferred?: boolean): boolean;
298
+ interface ModalProps {
299
+ title?: string;
300
+ /** Called when the user presses esc. Defaults to `useModal().close()` if available. */
301
+ onClose?: () => void;
302
+ children: ReactNode;
303
+ /** Preferred width in columns. Modal grows to this when the terminal allows. */
304
+ maxWidth?: number;
305
+ /** Floor on the width, so content stays minimally legible. */
306
+ minWidth?: number;
307
+ /** Columns of breathing room kept on each side of the modal. */
308
+ horizontalMargin?: number;
309
+ }
310
+ /**
311
+ * Responsive modal — picks a width based on the live terminal size.
312
+ *
313
+ * - On a wide terminal, the modal grows to `maxWidth` so descriptions sit on
314
+ * one line and don't wrap.
315
+ * - On a narrow terminal, the modal shrinks down to `minWidth`, keeping a
316
+ * small horizontal margin from the screen edges. Text inside wraps naturally.
317
+ *
318
+ * Uses `useTerminalDimensions()` so it reflows on `SIGWINCH` without remount.
319
+ */
320
+ declare function Modal({
321
+ title,
322
+ onClose,
323
+ children,
324
+ maxWidth,
325
+ minWidth,
326
+ horizontalMargin
327
+ }: ModalProps): ReactNode;
328
+ //#endregion
329
+ //#region src/tui/model-picker.d.ts
330
+ /**
331
+ * Modal that lists the available models for the current provider and lets the
332
+ * user pick one. Options come from `runTui({ models })` if supplied, otherwise
333
+ * from pi-ai's built-in registry.
334
+ *
335
+ * Each row shows: `● selected · name (ctx N · reasoning · vision)`.
336
+ */
337
+ declare function ModelPickerModal({
338
+ models,
339
+ currentModelId,
340
+ onPick
341
+ }: {
342
+ models: readonly ModelInfo[];
343
+ currentModelId: string;
344
+ onPick: (modelId: string) => void;
345
+ }): _$react.ReactNode;
346
+ //#endregion
347
+ //#region src/tui/providers.d.ts
348
+ /**
349
+ * Construct a fresh provider instance for a given key.
350
+ *
351
+ * Providers are cheap to build — credentials are resolved lazily at first
352
+ * stream call — so we instantiate on demand rather than caching a singleton.
353
+ * This also avoids leaking state across session/provider switches.
354
+ */
355
+ declare const FACTORIES: Record<ProviderKey, () => Provider>;
356
+ /** zidane provider key → pi-ai provider id (some don't match 1:1). */
357
+ declare const PI_PROVIDER_ID: Record<ProviderKey, string>;
358
+ /**
359
+ * Look up the model's max context window via pi-ai's model registry.
360
+ * Returns `null` when the model isn't known (e.g. a custom openrouter slug);
361
+ * callers should hide the context indicator in that case.
362
+ */
363
+ declare function getContextWindow(key: ProviderKey, modelId: string): number | null;
364
+ //#endregion
365
+ //#region src/tui/screens.d.ts
366
+ declare function AuthScreen({
367
+ onPick
368
+ }: {
369
+ onPick: (p: ProviderAuth) => void;
370
+ }): _$react.ReactNode;
371
+ declare function SessionsScreen({
372
+ sessions,
373
+ currentId,
374
+ onPick,
375
+ onCreate
376
+ }: {
377
+ sessions: SessionMeta[];
378
+ currentId: string | null;
379
+ onPick: (id: string) => void;
380
+ onCreate: () => void;
381
+ }): _$react.ReactNode;
382
+ declare function ChatScreen({
383
+ events,
384
+ busy,
385
+ settings,
386
+ onSubmit,
387
+ session
388
+ }: {
389
+ events: StreamEvent[];
390
+ busy: boolean;
391
+ settings: Settings;
392
+ onSubmit: (prompt: string) => void;
393
+ session: SessionMeta | null;
394
+ }): _$react.ReactNode;
395
+ //#endregion
396
+ //#region src/tui/settings.d.ts
397
+ declare const DEFAULT_SETTINGS: Settings;
398
+ interface SettingsContextValue {
399
+ settings: Settings;
400
+ toggle: (key: keyof Settings) => void;
401
+ }
402
+ declare function SettingsProvider({
403
+ initial,
404
+ onChange,
405
+ children
406
+ }: {
407
+ initial: Settings;
408
+ onChange?: (settings: Settings) => void;
409
+ children: ReactNode;
410
+ }): ReactNode;
411
+ declare function useSettings(): SettingsContextValue;
412
+ declare function SettingsModal(): ReactNode;
413
+ //#endregion
414
+ //#region src/tui/streaming.d.ts
415
+ /** Flip any trailing streaming markdown blocks (any owner) to finalized. */
416
+ declare function finalizeStreamingMarkdown(events: StreamEvent[]): StreamEvent[];
417
+ /** Flip the trailing streaming markdown block for one specific owner. */
418
+ declare function finalizeStreamingMarkdownForOwner(events: StreamEvent[], owner: Owner): StreamEvent[];
419
+ /**
420
+ * Effective context size for a single turn.
421
+ *
422
+ * `usage.input` is misleading on its own when prompt caching is active: providers
423
+ * (Anthropic, OpenRouter→Anthropic, Gemini) report `input` as the *new uncached*
424
+ * tokens only — the cached prefix shows up in `cacheRead`, and newly-cached
425
+ * tokens in `cacheCreation`. The model still saw all three buckets, so the real
426
+ * context-window utilization is their sum.
427
+ *
428
+ * Non-caching providers leave `cacheRead`/`cacheCreation` undefined, so this
429
+ * collapses to plain `input` for them.
430
+ */
431
+ declare function turnContextSize(usage: TurnUsage | undefined): number;
432
+ interface StreamSource {
433
+ /** Pass `undefined` / omit for parent-agent events. */
434
+ childId?: string;
435
+ /** Nesting depth — 0 for parent, ≥ 1 for subagents. */
436
+ depth?: number;
437
+ }
438
+ interface StreamBuffer {
439
+ /** Queue a streaming delta for the next flush tick. */
440
+ queueStreamDelta: (kind: 'markdown' | 'thinking', delta: string, source?: StreamSource) => void;
441
+ /** Drain pending deltas immediately, then append a non-streaming event. */
442
+ appendImmediate: (evt: StreamEvent) => void;
443
+ /** Drain pending deltas immediately, then transform the event list. */
444
+ flushAndUpdate: (update: (events: StreamEvent[]) => StreamEvent[]) => void;
445
+ /** Drain pending deltas without further transformation. */
446
+ flush: () => void;
447
+ /** Cancel any pending flush and drop buffered deltas (on session teardown). */
448
+ reset: () => void;
449
+ }
450
+ declare function useStreamBuffer(setEvents: Dispatch<SetStateAction<StreamEvent[]>>): StreamBuffer;
451
+ //#endregion
452
+ //#region src/tui/theme.d.ts
453
+ /**
454
+ * Shared color palette. Kept as plain hex strings so it can be consumed by
455
+ * OpenTUI props that accept `string | RGBA`. The names describe role, not
456
+ * literal hue, so the theme can be swapped without touching call sites.
457
+ */
458
+ declare const COLOR: {
459
+ readonly brand: "#FFCC00";
460
+ readonly accent: "#00FF88";
461
+ readonly model: "#88CCFF";
462
+ readonly warn: "#FFAA66";
463
+ readonly error: "#FF6666";
464
+ readonly dim: "#888888";
465
+ readonly mute: "#555555";
466
+ readonly border: "#333333";
467
+ readonly borderActive: "#555555";
468
+ };
469
+ /**
470
+ * Shared select styling — keeps the highlight bar from filling with a
471
+ * different background than the surrounding box. The `▶` marker and the
472
+ * brand-colored selected text carry the focus affordance.
473
+ */
474
+ declare const SELECT_THEME: {
475
+ readonly backgroundColor: "transparent";
476
+ readonly focusedBackgroundColor: "transparent";
477
+ readonly selectedBackgroundColor: "transparent";
478
+ readonly selectedTextColor: "#FFCC00";
479
+ readonly textColor: "#888888";
480
+ readonly descriptionColor: "#555555";
481
+ readonly selectedDescriptionColor: "#888888";
482
+ };
483
+ /**
484
+ * Theme for markdown token highlighting. Token names map to Tree-sitter highlight
485
+ * captures emitted by OpenTUI's markdown parser; the `default` entry is the
486
+ * fallback for unstyled text.
487
+ */
488
+ declare const MD_STYLE: SyntaxStyle;
489
+ //#endregion
490
+ //#region src/tui/index.d.ts
491
+ /**
492
+ * Boot a full chat TUI with sensible defaults. **Does not return** under
493
+ * normal use — it terminates the host process via `process.exit(0)` once
494
+ * the user dismisses the renderer (Ctrl+C / Esc on the auth screen / a
495
+ * non-zero exit code is mapped via the `catch` path below).
496
+ *
497
+ * **One-shot:** this function may only be invoked once per process. The
498
+ * underlying OpenTUI renderer wires up global terminal state on init.
499
+ *
500
+ * **Why it exits the process:** after the renderer's `destroy()` restores
501
+ * the terminal, React's reconciler and OpenTUI's internal listeners can
502
+ * keep the Node/Bun event loop open indefinitely — the script appears to
503
+ * hang in `bun run`, and under `bun --watch run` the watcher waits forever
504
+ * for the child to exit. Forcing a clean exit here is the contract that
505
+ * makes `runTui` a true one-shot launcher.
506
+ *
507
+ * Hosts that need post-renderer cleanup should mount `<App config={...} />`
508
+ * against their own `createCliRenderer()` instead of calling `runTui()`.
509
+ *
510
+ * Env-var overrides (handy when launching from CI or restricted shells):
511
+ * - `ZIDANE_STORAGE_DIR` — sets `storageDir`
512
+ * - `ZIDANE_PREFIX` — sets `prefix`
513
+ *
514
+ * Hosts building on top of `zidane/tui` typically want their own env vars
515
+ * (e.g. `MYAPP_STORAGE_DIR`); read them in your launch script and forward
516
+ * to `runTui({ storageDir, prefix })`.
517
+ *
518
+ * ```ts
519
+ * import { runTui } from 'zidane/tui'
520
+ * import { createRemoteStore } from 'zidane/session' // for the `store` option
521
+ *
522
+ * await runTui() // ~/.zidane/sessions.db + state.json
523
+ * await runTui({ prefix: '.myapp' }) // ~/.myapp/...
524
+ * await runTui({ storageDir: '/data', prefix: 'myapp' })
525
+ * await runTui({ providers: { custom: () => myProvider() } })
526
+ * await runTui({ store: createRemoteStore({ url: '…' }) })
527
+ * await runTui({ models: { anthropic: [{ id: 'claude-foo', contextWindow: 200_000 }] } })
528
+ * ```
529
+ */
530
+ declare function runTui(options?: TuiOptions): Promise<never>;
531
+ //#endregion
532
+ export { App, type AuthMethod, AuthScreen, COLOR, ChatScreen, ConfigProvider, type ContextUsage, DEFAULT_SETTINGS, FACTORIES, Footer, type Hint, MD_STYLE, Modal, type ModalProps, ModalRoot, type ModelInfo, ModelPickerModal, type ModelRegistry, type Owner, PI_PROVIDER_ID, type Picked, type ProviderAuth, type ProviderKey, type ProviderRegistry, type ResolvedConfig, SELECT_THEME, type Screen, type SessionMeta, SessionsScreen, type Settings, SettingsModal, SettingsProvider, Spinner, type StateStoreApi, type StreamBuffer, type StreamEvent, type StreamSource, Transcript, type TuiOptions, type TuiState, ageString, createStateStore, createTuiStore, detectAuth, envKeyFor, eventsFromTurns, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, fmtTokens, getContextWindow, lastContextSizeFromTurns, listSessionMeta, loadState, marginTopFor, onInputSubmit, resolveConfig, runTui, saveState, shortId, titleFromTurns, toolCallPreview, toolResultText, turnContextSize, useConfig, useModal, useModalAwareFocus, useSettings, useStreamBuffer };
533
+ //# sourceMappingURL=tui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui.d.ts","names":[],"sources":["../src/tui/auth.ts","../src/tui/types.ts","../src/tui/store.ts","../src/tui/config.tsx","../src/tui/app.tsx","../src/tui/components.tsx","../src/tui/format.ts","../src/tui/modal.tsx","../src/tui/model-picker.tsx","../src/tui/providers.ts","../src/tui/screens.tsx","../src/tui/settings.tsx","../src/tui/streaming.ts","../src/tui/theme.ts","../src/tui/index.tsx"],"mappings":";;;;;;;KAGY,WAAA;AAAA,UAQK,UAAA;EACf,MAAA;;EAEA,MAAA;AAAA;AAAA,UAGe,YAAA;EACf,GAAA,EAAK,WAAA;EACL,KAAA;;EAEA,SAAA;EACA,OAAA,EAAS,UAAA;AAAA;AAAA,iBAuBK,SAAA,CAAU,GAAA,EAAK,WAAA;;;;AA5B/B;;;;;;iBAyCgB,UAAA,CAAW,GAAA,GAAK,MAAA,+BAAmD,YAAA;;;KCxDvE,MAAA;;KAGA,KAAA;AAAA,UAEK,WAAA;EACf,IAAA;EAUA,IAAA;EDfU;;;;;ECqBV,SAAA;EDbyB;ECezB,OAAA;EDdA;ECgBA,KAAA;AAAA;AAAA,UAGe,MAAA;EACf,QAAA,EAAU,YAAA;EACV,KAAA;AAAA;AAAA,UAG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