zidane 7.0.16 → 7.0.17
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/README.md +3 -5
- package/dist/{acp-Bw2b_kka.js → acp-DTnq3bda.js} +4 -4
- package/dist/{acp-Bw2b_kka.js.map → acp-DTnq3bda.js.map} +1 -1
- package/dist/acp-cli.js +5 -5
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-B_uQo4f1.js → agent-C5xr7lqh.js} +170 -22
- package/dist/agent-C5xr7lqh.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-QbHqqTkV.js → anthropic-D_aMBEj8.js} +88 -5
- package/dist/anthropic-D_aMBEj8.js.map +1 -0
- package/dist/{approvals-B9aIQJRQ.js → approvals-D3P3Wz58.js} +48 -72
- package/dist/approvals-D3P3Wz58.js.map +1 -0
- package/dist/{auth-plw6npda.js → auth-893jSFew.js} +5 -5
- package/dist/auth-893jSFew.js.map +1 -0
- package/dist/chat/pure.d.ts +4 -4
- package/dist/chat/pure.js +2 -2
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +5 -5
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/{index-Df2CH6bn.d.ts → index-CyOGLSQN.d.ts} +27 -16
- package/dist/index-CyOGLSQN.d.ts.map +1 -0
- package/dist/{index-Dc_zYpEu.d.ts → index-D7H81_kd.d.ts} +125 -4
- package/dist/index-D7H81_kd.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/{ipc-T_pPnHkp.js → ipc-DY40IbcP.js} +2 -2
- package/dist/{ipc-T_pPnHkp.js.map → ipc-DY40IbcP.js.map} +1 -1
- package/dist/ipc.d.ts +5 -5
- package/dist/ipc.js +3 -3
- package/dist/mcp.d.ts +1 -1
- package/dist/{messages-21XfHxyF.js → messages-aORUmIKe.js} +2 -2
- package/dist/{messages-21XfHxyF.js.map → messages-aORUmIKe.js.map} +1 -1
- package/dist/{openai-compat-DY-AKxCg.js → openai-compat-cIeLSED_.js} +23 -25
- package/dist/openai-compat-cIeLSED_.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +2 -2
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +2 -2
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-CoK1rZ1p.js → providers-CTkZSxvp.js} +2 -2
- package/dist/{providers-CoK1rZ1p.js.map → providers-CTkZSxvp.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +3 -3
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +2 -2
- package/dist/{server-DXM8ZbGi.js → server-DaZqNd61.js} +5 -5
- package/dist/{server-DXM8ZbGi.js.map → server-DaZqNd61.js.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-DPZnncaQ.js → session-23Stp71-.js} +2 -2
- package/dist/{session-DPZnncaQ.js.map → session-23Stp71-.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-BgdOYAy9.d.ts → tool-formatters-9_ABHXRG.d.ts} +2 -2
- package/dist/{tool-formatters-BgdOYAy9.d.ts.map → tool-formatters-9_ABHXRG.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-CtnwuQJM.d.ts → transcript-anchors-CbZkEMIN.d.ts} +11 -5
- package/dist/transcript-anchors-CbZkEMIN.d.ts.map +1 -0
- package/dist/tui.d.ts +67 -11
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +2930 -2596
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-khAvr7KJ.d.ts → turn-operations-DsVjoO3S.d.ts} +30 -4
- package/dist/{turn-operations-khAvr7KJ.d.ts.map → turn-operations-DsVjoO3S.d.ts.map} +1 -1
- package/dist/{turn-operations-DkJ1R0p8.js → turn-operations-Dt5L8smX.js} +31 -2
- package/dist/{turn-operations-DkJ1R0p8.js.map → turn-operations-Dt5L8smX.js.map} +1 -1
- package/dist/types-CWgENVLY.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/ARTIFACTS.md +25 -10
- package/docs/CHAT.md +3 -3
- package/docs/EXTENSIONS.md +2 -2
- package/docs/IPC.md +2 -1
- package/docs/README.md +1 -1
- package/docs/SKILL.md +1 -0
- package/docs/TUI.md +8 -3
- package/package.json +1 -1
- package/dist/agent-B_uQo4f1.js.map +0 -1
- package/dist/anthropic-QbHqqTkV.js.map +0 -1
- package/dist/approvals-B9aIQJRQ.js.map +0 -1
- package/dist/auth-plw6npda.js.map +0 -1
- package/dist/index-Dc_zYpEu.d.ts.map +0 -1
- package/dist/index-Df2CH6bn.d.ts.map +0 -1
- package/dist/openai-compat-DY-AKxCg.js.map +0 -1
- package/dist/transcript-anchors-CtnwuQJM.d.ts.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as ClassifiedErrorKind, i as AgentContextExceededError, l as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, n as AgentAbortedError, o as AgentProviderError, p as matchesContextExceeded, r as AgentBudgetExceededError, s as AgentToolNotAllowedError, u as ClassifiedError } from "./timeout-DEaqslLO.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Ag as PromptAudioPart, B_ as SkillConfig, Bg as RetryConfig, Br as InteractionToolOptions, C as SuccessfulMutationOutcome, C_ as ReadStateMap, Cg as McpToolHookContext, Cm as TurnResult, Dg as OAuthRefreshHookContext, F_ as ToolStateView, Fg as PromptVideoPart, G_ as CreateSessionOptions, Gg as SessionMessage, H_ as SkillResource, Hg as SessionContentBlock, Ig as RepeatGuardConfig, J_ as SessionData, Ji as AgentHookMap, Jv as McpConnection, Kg as SessionTurn, Lg as RepeatGuardToolMatcher, M_ as ToolStateController, Mg as PromptImagePart, N_ as ToolStateOp, Ng as PromptPart, Og as ProgressNudgeKind, P_ as ToolStateStore, Pg as PromptTextPart, Pm as OpenRouterParams, Rg as ResolveContentRef, S as MutationValidationResult, S_ as ReadStateEntry, Sg as McpServerConfig, Sm as ToolSpec, Th as AnthropicParams, Ug as SessionEndStatus, Vg as RunHookMap, W_ as SkillsConfig, Wg as SessionHookContext, X_ as SessionRun, Xg as StreamHookContext, Xi as AgentOptions, Yi as AgentHooks, Z_ as SessionStore, _ as statsByModel, __ as toolResultToText, _g as DEFAULT_AGENT_CLOCK, _m as StreamCallbacks, a_ as ToolResultContent, ag as AgentBehavior, b as MutationValidationHooksOptions, b_ as ToolMap, bm as ToolCall, c_ as ToolResultImageContent, cg as AgentStats, d_ as ToolResultTextContent, dc as SpawnToolOptions, e_ as ThinkingLevel, f_ as ToolResultVideoContent, fc as SpawnToolState, fg as ChildRunStats, g_ as toolOutputByteLength, gh as CerebrasParams, h as flattenTurns, h_ as toolOutputBudgetByteLength, hm as ProviderCapabilities, i_ as ToolResultAudioContent, ih as OpenAIParams, j_ as StagedToolState, jg as PromptDocumentPart, kg as ProgressNudgeMessage, l_ as ToolResultImageRefContent, m_ as TurnUsage, mm as Provider, n_ as ToolHookContext, o_ as ToolResultDocumentContent, oc as ChildAgent, og as AgentClock, p as ModelUsage, p_ as TurnFinishReason, q_ as Session, qg as SpawnHookContext, qi as Agent, r_ as ToolOutcome, s_ as ToolResultDocumentRefContent, sg as AgentRunOptions, sv as RemoteStoreOptions, t as Preset, u_ as ToolResultMetadata, v as MutationValidationBatch, v_ as ToolContext, vm as StreamOptions, vr as ValidationResult, x as MutationValidationMutation, xm as ToolResult, y as MutationValidationFailure, y_ as ToolDef, zg as ResolveContentRefBlock } from "./index-D7H81_kd.js";
|
|
3
3
|
import { _ as TaskHandle, a as ContextType, c as ExecutionContext, g as TaskExitInfo, h as TaskEntry, l as ExecutionHandle, n as ContextCapabilities, o as DetachedTasksCapability, p as SpawnConfig, r as ContextHardening, s as ExecResult, t as BackgroundTaskStatus, v as TaskStallInfo } from "./types-U-rIVUDw.js";
|
|
4
4
|
import { t as SandboxProvider } from "./sandbox-CDl9tfTo.js";
|
|
5
5
|
export { type Agent, AgentAbortedError, type AgentBehavior, AgentBudgetExceededError, type AgentClock, AgentContextExceededError, type AgentHookMap, type AgentHooks, type AgentOptions, AgentProviderError, type AgentRunOptions, type AgentStats, AgentToolNotAllowedError, type AnthropicParams, type BackgroundTaskStatus, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, type CerebrasParams, type ChildAgent, type ChildRunStats, type ClassifiedError, type ClassifiedErrorKind, type ContextCapabilities, type ContextHardening, type ContextType, type CreateSessionOptions, DEFAULT_AGENT_CLOCK, type DetachedTasksCapability, type ExecResult, type ExecutionContext, type ExecutionHandle, type InteractionToolOptions, type McpConnection, type McpServerConfig, type McpToolHookContext, type ModelUsage, type MutationValidationBatch, type MutationValidationFailure, type MutationValidationHooksOptions, type MutationValidationMutation, type MutationValidationResult, type OAuthRefreshHookContext, type OpenAIParams, type OpenRouterParams, type Preset, type ProgressNudgeKind, type ProgressNudgeMessage, type PromptAudioPart, type PromptDocumentPart, type PromptImagePart, type PromptPart, type PromptTextPart, type PromptVideoPart, type Provider, type ProviderCapabilities, type ReadStateEntry, type ReadStateMap, type RemoteStoreOptions, type RepeatGuardConfig, type RepeatGuardToolMatcher, type ResolveContentRef, type ResolveContentRefBlock, type RetryConfig, type RunHookMap, type SandboxProvider, type Session, type SessionContentBlock, type SessionData, type SessionEndStatus, type SessionHookContext, type SessionMessage, type SessionRun, type SessionStore, type SessionTurn, type SkillConfig, type SkillResource, type SkillsConfig, type SpawnConfig, type SpawnHookContext, type SpawnToolOptions, type SpawnToolState, type StagedToolState, type StreamCallbacks, type StreamHookContext, type StreamOptions, type SuccessfulMutationOutcome, type TaskEntry, type TaskExitInfo, type TaskHandle, type TaskStallInfo, type ThinkingLevel, type ToolCall, type ToolContext, type ToolDef, type ToolHookContext, type ToolMap, type ToolOutcome, type ToolResult, type ToolResultAudioContent, type ToolResultContent, type ToolResultDocumentContent, type ToolResultDocumentRefContent, type ToolResultImageContent, type ToolResultImageRefContent, type ToolResultMetadata, type ToolResultTextContent, type ToolResultVideoContent, type ToolSpec, type ToolStateController, type ToolStateOp, type ToolStateStore, type ToolStateView, type TurnFinishReason, type TurnResult, type TurnUsage, type ValidationResult, flattenTurns, matchesContextExceeded, statsByModel, toolOutputBudgetByteLength, toolOutputByteLength, toolResultToText };
|
package/docs/ARTIFACTS.md
CHANGED
|
@@ -5,10 +5,10 @@ An **artifact** is a durable, typed pointer to something a session produced outs
|
|
|
5
5
|
- **Model / store:** `src/session/artifacts.ts`, `SessionStore` artifact methods in `src/session/index.ts`
|
|
6
6
|
- **Producers:** the `metadata.artifacts` tool-result namespace, lifted by `src/loop.ts`
|
|
7
7
|
- **Kinds:** `src/extensions/builtin-artifact-kinds.ts` + `ctx.registerArtifactKind`
|
|
8
|
-
- **Surfaces:** TUI
|
|
8
|
+
- **Surfaces:** TUI rail + `▢` title-bar chip · GUI rail + header chip · sessions-list badge · `#pr` completion
|
|
9
9
|
- **IPC:** `sessions.artifacts`, `artifacts.list` / `delete` / `upsert`; signals `artifact:recorded`, `artifact:changed`
|
|
10
10
|
|
|
11
|
-
Contents: [Model](#model) · [Producers](#producers) · [Storage](#storage) · [Extension API](#extension-api) · [Surfaces](#surfaces) · [IPC](#ipc) · [Lazy refresh](#lazy-refresh) · [Known gaps](#known-gaps)
|
|
11
|
+
Contents: [Model](#model) · [Producers](#producers) · [Storage](#storage) · [Extension API](#extension-api) · [Surfaces](#surfaces) · [IPC](#ipc) · [Lazy refresh](#lazy-refresh) · [Disabling](#disabling) · [Known gaps](#known-gaps)
|
|
12
12
|
|
|
13
13
|
## Model
|
|
14
14
|
|
|
@@ -41,13 +41,14 @@ Artifacts are **not** part of `SessionData`: `load()` / `save()` / export / comp
|
|
|
41
41
|
|
|
42
42
|
## Producers
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Tool-driven paths converge on one channel — the reserved `artifacts` key of tool-result metadata; host-side code (`/` commands) writes through `ctx.artifacts.record`. Every path runs the same normalization and bounds and upserts on the same identity.
|
|
45
45
|
|
|
46
46
|
| Path | How |
|
|
47
47
|
|---|---|
|
|
48
48
|
| **Tool-result metadata** | Any `tool:transform` hook appends `SessionArtifactInput[]` to `ctx.metadata.artifacts`. After the tool settles, the loop normalizes each entry (`normalizeArtifactInput`), canonicalizes `file:` URIs against the execution cwd, and calls `session.addArtifact`. ≤ 50 entries per tool result. |
|
|
49
|
-
| **Built-in detectors** (`artifactsPreset`) | Keyed on the command or tool name, never on free text: `gh pr create` / `glab mr create` / `*create_pull_request` → `pull_request` · `git commit` → `commit` · `git switch -c` / `checkout -b` / `push -u` → `branch
|
|
50
|
-
| **`record_artifact` tool** |
|
|
49
|
+
| **Built-in detectors** (`artifactsPreset`) | Keyed on the command or tool name, never on free text: `gh pr create` / `glab mr create` / `*create_pull_request` → `pull_request` · `git commit` → `commit` · `git switch -c` / `checkout -b` / `push -u` → `branch`. **Files are never auto-detected** — a source edit is not a deliverable; `file` artifacts exist only via `record_artifact` / `ctx.artifacts.record`. Composed under every TUI / daemon / GUI profile when `Settings.artifacts` is on; SDK users opt in with `composePresets(artifactsPreset, …)`. |
|
|
50
|
+
| **`record_artifact` tool** | The model marks a *deliverable*: a PR the detectors couldn't see (background shell), a deployment / preview URL, an issue it filed, a release, a generated report / export the user asked for. The tool description carries the worth-it / not-worth-it guidance (source edits, scratch files, logs are not artifacts). Input `{ kind, uri, label?, meta? }`; the preset's detector reads the input and emits it. |
|
|
51
|
+
| **`ctx.artifacts.record`** (extensions) | For work that never passes through a tool result — a `/` command running `gh pr create` via `ctx.workspace.exec`. Stamps the active session (+ `runId` when in a run), writes the store (daemon-owned when attached), fans out `artifact:changed`. git-flow's `/pr` (PR + created branch) and `/commit` use it with the same locators the detectors emit, so agent- and command-made rows merge. |
|
|
51
52
|
|
|
52
53
|
Emission is best-effort: a store failure never fails the tool call, and the persisted turn / wire payload are byte-identical with or without artifacts. Each stored artifact fires `artifact:recorded` (`child:artifact:recorded` when bubbled from a subagent).
|
|
53
54
|
|
|
@@ -79,12 +80,13 @@ ctx.registerArtifactKind({
|
|
|
79
80
|
ctx.tui.registerArtifactRenderer({ kind, renderDetail: artifact => <Pane /> }) // TUI detail pane
|
|
80
81
|
ctx.artifacts.list({ scope: 'session' | 'project' | 'all', kind?, since?, limit? })
|
|
81
82
|
ctx.artifacts.find(kind, uri) // reverse lookup across sessions
|
|
83
|
+
ctx.artifacts.record({ kind, uri, label, projectRoot?, meta? }) // host-side producer (commands)
|
|
82
84
|
ctx.registerHook('artifact:recorded', ({ artifact, runId, turnId }) => …)
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
- Kinds are a global namespace; first registration wins (logged). Built-ins use the same API and can be refined by an extension re-registering the kind.
|
|
86
88
|
- `detect` rides `tool:transform` and `child:tool:transform` but can only append to `metadata.artifacts`; it never changes what the model sees. A throwing detector emits nothing.
|
|
87
|
-
- `ctx.artifacts` is late-bound (like `ctx.sessions`): `[]` when detached or
|
|
89
|
+
- `ctx.artifacts` is late-bound (like `ctx.sessions`): reads answer `[]`, `record` answers `undefined`, when detached or the store lacks artifact support. `record` never throws for unusable input either.
|
|
88
90
|
- Row presentation goes through `renderArtifactRow(artifact, registry)`: registry kind → built-in kind → `label` + `uri` fallback. A throwing `render` falls back.
|
|
89
91
|
|
|
90
92
|
Authoring example: [EXTENSIONS.md → Session artifacts](./EXTENSIONS.md#session-artifacts).
|
|
@@ -93,9 +95,9 @@ Authoring example: [EXTENSIONS.md → Session artifacts](./EXTENSIONS.md#session
|
|
|
93
95
|
|
|
94
96
|
| Surface | Behavior |
|
|
95
97
|
|---|---|
|
|
96
|
-
|
|
|
97
|
-
| TUI modal
|
|
98
|
-
| GUI
|
|
98
|
+
| TUI rail (`ctrl+shift+a`) | Read-only column docked right of the chat screen, 34 cells: kind headers, bullet rows (PR state tints the bullet), path tails. Click a row to open its href. Hides itself under 110 columns; the toggle survives. Live via the same change ticks as the modal. |
|
|
99
|
+
| TUI actions modal | Opened from the rail's `⋯ actions` footer: `↵` open href · `tab` session ↔ project · `c` copy locator · `d` remove. Grouped by kind, built-ins first; extension `renderDetail` mounts under the list in an error boundary. |
|
|
100
|
+
| GUI rail (`⌃⇧A`, header chip, `⋯` menu) | 288 px column right of transcript + composer, under the header; session scope only (the project-wide view belongs to the project page). No controls of its own — the chip / shortcut open and close it. Hover → copy / remove, PR rows lazily refresh on first hover. Header chip shows the live count. Rows pre-rendered main-side (`artifacts:list` IPC). |
|
|
99
101
|
| Sessions list | `N artifacts` badge from `artifactCount` (hidden at 0 or when the store doesn't report it). |
|
|
100
102
|
| `#` completion | Shares the trigger with chats. `#pr` / `#br` / `#file` rank by kind alias; selecting inserts the locator as plain text (no reference grammar). |
|
|
101
103
|
|
|
@@ -118,10 +120,23 @@ All additive: a pre-artifact daemon rejects the methods and clients treat that a
|
|
|
118
120
|
|
|
119
121
|
`resolve()` is never polled. UIs call it once per focused row per open (`refreshArtifact(artifact, registry)`), persist the patched row through the store or `artifacts.upsert`, and the change signal re-converges other windows. The built-in `pull_request` resolver queries the GitHub API (bearer token from `GITHUB_TOKEN` / `GH_TOKEN` when set, 4 s timeout), writes `meta.state` (`open` / `draft` / `merged` / `closed`), `title`, `resolvedAt`, and skips terminal states and entries fresher than 5 minutes.
|
|
120
122
|
|
|
123
|
+
## Disabling
|
|
124
|
+
|
|
125
|
+
`Settings.artifacts` (default on; TUI Settings → UI, GUI Settings → Chat → Artifacts) is the master switch. Off:
|
|
126
|
+
|
|
127
|
+
- the `artifacts` preset is not composed — no detectors, no `record_artifact` tool;
|
|
128
|
+
- `AgentOptions.artifacts: false` makes the loop ignore `metadata.artifacts` entirely (covers extension detectors too);
|
|
129
|
+
- `ctx.artifacts` scope is detached — reads answer `[]`, `record` returns `undefined`;
|
|
130
|
+
- the rail, the `▢` chip, `ctrl+shift+a` / `⌃⇧A`, GUI header chip, sessions badge and `#pr` completion are hidden.
|
|
131
|
+
|
|
132
|
+
No `/` command exists for artifacts on purpose: slash commands are the agent's vocabulary, UI chrome stays in the frame.
|
|
133
|
+
|
|
134
|
+
Existing rows are kept, not deleted; turning it back on shows them again. The TUI rebuilds the agent on toggle (the preset is a build-time input).
|
|
135
|
+
|
|
121
136
|
## Known gaps
|
|
122
137
|
|
|
123
138
|
- **PR / commit / branch attribution.** Detected from shell output, these carry no local path, so `projectRoot` is the session's root; `cd ../other && gh pr create` files under the current project. Fix needs the execution cwd on the detect outcome plus `cd` parsing, or an `owner/repo` → checkout map.
|
|
124
|
-
- **Staleness.** `git commit --amend` records a second commit; deleted
|
|
139
|
+
- **Staleness.** `git commit --amend` records a second commit; deleted branches persist until removed (`d` / `×`).
|
|
125
140
|
- **Remote / file-map stores** don't implement artifacts (by design); everything degrades to empty.
|
|
126
141
|
- **Background shells.** Output that never reaches a tool result isn't detected; `record_artifact` is the model's escape hatch.
|
|
127
142
|
|
package/docs/CHAT.md
CHANGED
|
@@ -98,7 +98,7 @@ Every named export lives in one file under `src/chat/`; each row is `<module>`
|
|
|
98
98
|
| `store` | `eventsFromTurns`, `listSessionMeta`, `deriveSessionTitle`, transcript-view rules. See **Session reconstruction**. |
|
|
99
99
|
| `streaming` | `useStreamBuffer`, `finalizeStreamingMarkdown(ForOwner)`, `turnContextSize`. See **Streaming buffer**. |
|
|
100
100
|
| `completion`, `completion-skills`, `completion-files`, `completion-chats`, `completion-artifacts`, `completion-commands` | `useCompletion` + built-in providers (`/` skills & commands, `@` files, `#` chats & artifacts). See **Completion**. |
|
|
101
|
-
| `commands`, `builtin-commands` | `Command`/`CommandStep`, `executeCommand`, `createBuiltinCommands` (`/help`, `/reload
|
|
101
|
+
| `commands`, `builtin-commands` | `Command`/`CommandStep`, `executeCommand`, `createBuiltinCommands` (`/help`, `/reload`). See **Commands**. |
|
|
102
102
|
| `markdown-segments`, `prompt-segments` | Markdown → renderable segments; `splitPromptSegments` for submitted-prompt chip highlighting. |
|
|
103
103
|
| `session-export` | `renderSession`, `writeSessionExport`. See **Session export**. |
|
|
104
104
|
| `generate-title` | `generateSessionTitle`, `cleanTitle`. See **Title generation**. |
|
|
@@ -260,6 +260,7 @@ Both join `[...doctrine, userInstructions]` as the **static** half and `[envSect
|
|
|
260
260
|
| `smoothStreaming` | `boolean` | `true` | |
|
|
261
261
|
| `fileLogging` | `boolean` | `false` | The in-TUI Logs panel works regardless (in-memory). |
|
|
262
262
|
| `showTodoIndicator`, `showUsageIndicator`, `showThrobber` | `boolean` | `true`, `true`, `false` | See **Todos**, **Subscription usage**. |
|
|
263
|
+
| `artifacts` | `boolean` | `true` | Master switch for session artifacts (detection, `record_artifact`, every surface). See [ARTIFACTS.md § Disabling](./ARTIFACTS.md#disabling). |
|
|
263
264
|
| `checkForUpdates` | `boolean` | `true` | |
|
|
264
265
|
| `subscriptionUsage` | `boolean` | `true` | Gates *automatic* usage probes; see **Subscription usage**. |
|
|
265
266
|
| `uiMode` | `'full'\|'minimal'` | `'full'` | |
|
|
@@ -738,7 +739,7 @@ Anchor walks upward from `cwd` looking for `.git`; the first hit anchors to that
|
|
|
738
739
|
|
|
739
740
|
## Session artifacts
|
|
740
741
|
|
|
741
|
-
`SessionStore` carries three **optional** methods — `upsertArtifact`, `listArtifacts`, `deleteArtifact` — and `SessionMetaRow` an optional `artifactCount`; a store that omits them degrades to empty artifact listings rather than throwing. `Session.addArtifact(input, origin)` / `Session.listArtifacts(filter?)` are the per-session convenience wrappers built on top.
|
|
742
|
+
`SessionStore` carries three **optional** methods — `upsertArtifact`, `listArtifacts`, `deleteArtifact` — and `SessionMetaRow` an optional `artifactCount`; a store that omits them degrades to empty artifact listings rather than throwing. `Session.addArtifact(input, origin)` / `Session.listArtifacts(filter?)` are the per-session convenience wrappers built on top. There is deliberately no `/artifacts` command — artifacts are UI chrome (rail, title-bar chip, sessions badge), not agent vocabulary. The `#` completion trigger is shared between the chats provider (`completion-chats.ts`) and the artifacts provider (`completion-artifacts.ts`) — see **Completion**. `Settings.artifacts` is the master switch. Full schema, kinds, and the extension-facing `ctx.artifacts` surface are owned by `docs/ARTIFACTS.md`.
|
|
742
743
|
|
|
743
744
|
## Commands
|
|
744
745
|
|
|
@@ -750,7 +751,6 @@ Anchor walks upward from `cwd` looking for `.git`; the first hit anchors to that
|
|
|
750
751
|
|---|---|---|
|
|
751
752
|
| `/help` | — | Lists `opts.getCommands()` (built-ins + extensions), read live so it stays accurate after `/reload`. |
|
|
752
753
|
| `/reload` | `opts.reloadExtensions` | Re-discovers, re-runs `setup`, tears down the old extension instances. Omitted from the list on hosts without one. |
|
|
753
|
-
| `/artifacts [project\|session]` | `opts.artifacts` | Lists what the session (or every session in the project) produced. A host with a modal (the TUI) opens it instead of emitting markdown. Omitted on hosts without a session store. |
|
|
754
754
|
|
|
755
755
|
`createCommandsCompletionProvider` (trigger `/`, shared with skills) suggests from the live merged command list. Authoring a new command — the full `Command` shape, `CommandInteraction`, `generateData`/`spawnAgents` — is documented in `docs/EXTENSIONS.md`; this module is the runtime that executes whatever a `Command` describes.
|
|
756
756
|
|
package/docs/EXTENSIONS.md
CHANGED
|
@@ -128,7 +128,7 @@ Three namespaces:
|
|
|
128
128
|
| `registerContextPanelSection(section)` | Richer context panel section (`id`, `title`, rows, optional async `load`) | Normalized into the same model as above |
|
|
129
129
|
| `registerToolResultMetadata(registration)` | Interpret namespaced metadata attached to tool results | Can project entries into context-panel rows |
|
|
130
130
|
| `registerArtifactKind({ kind, label, detect?, validateMeta?, render?, resolve? })` | Give meaning to a session artifact kind | Global namespace, first registration wins. See [ARTIFACTS.md](./ARTIFACTS.md) |
|
|
131
|
-
| `artifacts.list(query)` / `artifacts.find(kind, uri)` | Read the artifact store | Late-bound like `sessions`: `[]` when detached. See [ARTIFACTS.md](./ARTIFACTS.md) |
|
|
131
|
+
| `artifacts.list(query)` / `artifacts.find(kind, uri)` / `artifacts.record(input)` | Read the artifact store; record one from host-side code (a `/` command that ran `gh pr create`) | Late-bound like `sessions`: reads `[]`, `record` `undefined`, when detached. See [ARTIFACTS.md](./ARTIFACTS.md) |
|
|
132
132
|
| `registerRunTransform(fn)` | Rewrite `agent.run()` options before precondition checks | Synchronous, applied in extension order; throws logged under `ZIDANE_DEBUG` and ignored |
|
|
133
133
|
| `registerBehaviorTransform(fn)` | Rewrite resolved behavior (`maxTurns`, retry, budgets) | Run-level `behavior` options re-applied after, so explicit caller choices win |
|
|
134
134
|
| `registerProviderMiddleware(fn)` | Wrap provider instances (tracing, fallback, metrics, policy) | Runs per provider-factory call; `undefined` return = pass-through |
|
|
@@ -164,7 +164,7 @@ ctx.tui.setStatus('✓ indexed', { timeout: 3000 }) // transient
|
|
|
164
164
|
ctx.tui.setBanner(['review pending: 3 files'], { timeout: 10_000 }) // block above the prompt
|
|
165
165
|
ctx.tui.setStatus(null) // clear (also wiped on disposal)
|
|
166
166
|
|
|
167
|
-
// Artifact detail pane in the
|
|
167
|
+
// Artifact detail pane in the TUI artifacts modal (row rendering is on the
|
|
168
168
|
// renderer-agnostic registerArtifactKind({ render })):
|
|
169
169
|
ctx.tui.registerArtifactRenderer({
|
|
170
170
|
kind: 'my-ext.deployment',
|
package/docs/IPC.md
CHANGED
|
@@ -156,6 +156,7 @@ Host → every connected client, one push channel. Source of truth:
|
|
|
156
156
|
| `event` | Canonical `StreamEvent`; `echo: true` marks the sender's own send/steer echo. |
|
|
157
157
|
| `compacting:start` | Manual or auto-compaction began. |
|
|
158
158
|
| `compacting:progress` | Live summary-token estimate during an in-flight compaction. |
|
|
159
|
+
| `stream:progress` | Live counters for the streaming parent turn (`outputTokens`, `estimated`, `elapsedMs`, optional `estCostUsd`), throttled ~4/s plus one final tick before the turn settles. Clients fold `estCostUsd` into the session cost until the matching `turn:end`. |
|
|
159
160
|
| `compacting:end` | Compaction finished; `effectiveTokens` (success only) is the post-compact estimate. |
|
|
160
161
|
| `prompt-turns` | Persisted prompt turns, reduced to `PromptTurnRef` (id + texts) for echo binding. |
|
|
161
162
|
| `model:fallback` | The run fell back off its primary model. |
|
|
@@ -347,7 +348,7 @@ store at the next run-end resync; **gap** = known missing cabling.
|
|
|
347
348
|
| Todos indicator + editing modal | synced | `todos:snapshot` mirror; `todos.set` writes the live `Session` |
|
|
348
349
|
| Running work + ctrl+k cancel picker | synced | `work:snapshot` mirror; cancel via `chat.cancelWork` |
|
|
349
350
|
| Context panel (ctrl+?) | synced | `sessions.contextBreakdown` RPC |
|
|
350
|
-
| Artifacts (
|
|
351
|
+
| Artifacts (rail, badges, `#pr` completion) | synced | see [ARTIFACTS.md § IPC](./ARTIFACTS.md#ipc) |
|
|
351
352
|
| History edits (selection modal) | synced | store refresh, `chat.rebuildAgent`, `sessions.touch` |
|
|
352
353
|
| History search (transcript + cross-session) | synced + accelerated | `history.searchSession`/`searchAll`, daemon LRU cache |
|
|
353
354
|
| Provider-retry indicator | synced | `stream:retry`; clears on resume / run end |
|
package/docs/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Each topic has exactly one owner doc; the others link to it. If two docs seem to
|
|
|
34
34
|
| Settings keys and defaults | CHAT.md § Settings |
|
|
35
35
|
| Safe mode, approvals, per-edit approval | CHAT.md § Safe mode / Per-edit approval |
|
|
36
36
|
| Todos (`todowrite`) contract | CHAT.md § Todos |
|
|
37
|
-
| Slash commands (`/help`, `/
|
|
37
|
+
| Slash commands (`/help`, `/reload`, extension commands) | CHAT.md § Commands (runtime) · EXTENSIONS.md (authoring) |
|
|
38
38
|
| `@` `/` `#` `!` completion | CHAT.md § Completion |
|
|
39
39
|
| Keybindings and rebinding | TUI.md § Keyboard |
|
|
40
40
|
| A modal or screen | TUI.md § Modals / Screens |
|
package/docs/SKILL.md
CHANGED
|
@@ -328,6 +328,7 @@ Every event in `AgentHooks` (`src/agent.ts`), one row each. `child:*` bubble eve
|
|
|
328
328
|
| `stream:thinking` | Each reasoning chunk | — | `delta, thinking` |
|
|
329
329
|
| `stream:text` | Each text chunk | — | `delta, text` |
|
|
330
330
|
| `stream:end` | Text stream complete (only if text present) | — | `text` |
|
|
331
|
+
| `stream:progress` | Throttled (~4/s) while the parent turn streams, plus one final tick before `stream:end`; not bubbled for subagents | — | `elapsedMs, outputTokens, estimated, inputTokens?, cacheRead?, cacheCreation?, estCostUsd?` — provider-counted when the wire reports usage mid-stream (`StreamCallbacks.onUsage`), else chars ÷ 4; `estCostUsd` absent for unpriced models and flat-rate (subscription) traffic |
|
|
331
332
|
| `stream:server_tool_use` | Provider-executed tool invocation closes (e.g. Anthropic `web_search_20250305`) | — | `id, name, input` |
|
|
332
333
|
| `stream:server_tool_result` | Matching provider-executed tool result closes | — | `toolUseId, toolName, content` |
|
|
333
334
|
| `stream:error` | Provider stream rejects before `stream:end` | — | `err, statusCode?, requestId?` — never fires on user aborts (those land on `agent:abort`) |
|
package/docs/TUI.md
CHANGED
|
@@ -135,7 +135,7 @@ Every action routes through `<userDir>/keybindings.json`, matched via `matchesBi
|
|
|
135
135
|
| `ctrl+m` | `openModelPicker` | chat (idle) | cross-provider model picker |
|
|
136
136
|
| `ctrl+l` | `openEffortPicker` | chat (idle, model has reasoning or options) | open `ModelOptionsPickerModal` (reasoning effort + feature toggles, e.g. fast mode) |
|
|
137
137
|
| `ctrl+t` | `openTodos` | chat (session attached) | open `TodosModal` (read-only) |
|
|
138
|
-
| `ctrl+shift+a` | `openArtifacts` | chat (session attached) |
|
|
138
|
+
| `ctrl+shift+a` | `openArtifacts` | chat (session attached) | toggle the artifacts rail (`ArtifactsPanel`) — same as clicking the `▢` chip on the chat title bar; the rail's `⋯ actions` footer opens the modal. Collapses to `ctrl+a` without kitty; rebind there |
|
|
139
139
|
| `ctrl+shift+g` | `openContextPanel` | chat | context-usage breakdown (read-only). Collapses to `ctrl+g`; rebind there |
|
|
140
140
|
| `ctrl+shift+m` | `openMainSession` | any, when `Settings.orchestration` is on | jump to (or lazily create) the pinned Main orchestration session for the cwd; requires the daemon runtime. Silent no-op when the setting/runtime is off |
|
|
141
141
|
| `ctrl+p` | `openUsagePanel` | chat | subscription usage panel; also opens by clicking the footer's `▰ 5h 43%` segment |
|
|
@@ -207,9 +207,13 @@ Inline-mounted in `ChatScreen`'s transcript slot (not stacked); keyed on `reques
|
|
|
207
207
|
|
|
208
208
|
The above-prompt "in progress" bar this modal replaced is gone — the same signal now renders as a footer hint chip (`N/M todos`, from `todoProgressLabel`), gated on `Settings.showTodoIndicator`, clickable to open the modal. Every `todowrite` call in the transcript also gets an inline "what's in progress" sub-list under the formatted call line (reads that call's own `input.todos`, not live session state).
|
|
209
209
|
|
|
210
|
+
### ArtifactsPanel
|
|
211
|
+
|
|
212
|
+
`ctrl+shift+a` (`openArtifacts`) toggles a read-only rail docked right of the chat screen (`artifacts-panel.tsx`, 34 cells): kind headers, bullet rows with PR state, path tails, row click opens the href. Auto-hides below 110 columns (the toggle survives). `ChatScreen` receives `frameWidth` so its title-overlay budget tracks the narrower border. Actions live in the modal below.
|
|
213
|
+
|
|
210
214
|
### ArtifactsModal
|
|
211
215
|
|
|
212
|
-
|
|
216
|
+
Opened from the rail's `⋯ actions` footer — what the session produced: pull requests, branches, commits, recorded files, extension-contributed kinds. `tab` toggles session ↔ project scope, `↵` opens the focused row's href (browser/editor), `c` copies its locator, `j` jumps to the producing turn (session scope only), `d` removes it. Live via a `subscribe` tick (local `artifact:recorded` hook, or daemon `artifact:recorded`/`artifact:changed`) so artifacts created while the modal is open appear without a re-open. Extension `renderDetail` panes mount under the list inside an error boundary. Semantics + extension API: [ARTIFACTS.md](./ARTIFACTS.md).
|
|
213
217
|
|
|
214
218
|
### ContextPanelModal
|
|
215
219
|
|
|
@@ -357,7 +361,8 @@ src/tui/
|
|
|
357
361
|
file-edit-approval-modal.tsx SingleEditApprovalModal + MultiEditApprovalModal + UnresolvedHunkPanel; inline-mounted, keyed on request.id
|
|
358
362
|
cancel-tool-modal.tsx In-flight tool picker (ctrl+k)
|
|
359
363
|
todos-modal.tsx Read-only todowrite viewer (ctrl+t); falls back to the archive snapshot when the live list is empty
|
|
360
|
-
artifacts-
|
|
364
|
+
artifacts-panel.tsx Read-only artifacts rail docked right of ChatScreen (ctrl+shift+a) — see ARTIFACTS.md
|
|
365
|
+
artifacts-modal.tsx Session/project artifacts with actions (rail footer) — see ARTIFACTS.md
|
|
361
366
|
context-panel.tsx Context-usage breakdown (ctrl+shift+g)
|
|
362
367
|
usage-panel.tsx Subscription usage panel (ctrl+p)
|
|
363
368
|
use-provider-usage.ts useActiveProviderUsage (footer) + useAllProviderUsage (panel) hooks
|