zidane 5.10.4 → 5.10.6

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/dist/tui.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as useMcpAuthDispatch, $t as deriveSessionTitle, A as runOAuthLogin, An as buildUpdateHint, At as clampFps, B as refreshMcpToolsCatalog, Bn as AUTO_COMPACT_MIN_GROWTH_FRACTION, Ct as listProjectFiles, D as formatPathForCwd, Dn as tryOpenBrowser, Dt as SETTINGS_CHOICES, En as useCompletion, Et as SETTINGS_CATEGORIES, Ft as resolveTheme, Gt as useDiscovery, H as subscribeMcpToolsCache, Hn as detectAuth, J as parentServerName, Jn as setProviderCredential, Jt as useConfig, K as buildVisibleMcpRows, Kt as useDiscoveryOptional, M as buildMcpServers, Mr as buildBuildSystem, Nr as buildPlanSystem, O as fetchOAuthRedirect, Ot as SETTINGS_TOGGLES, P as discoverProjectMcps, Pr as envSection, Pt as resolveChipColor, Q as McpAuthProvider, Qn as findGitRoot, R as loadMcpToolsCache, T as suggestSafelistEntry, Tt as DEFAULT_SETTINGS, Ut as createDiscoverySlot, Vn as shouldAutoCompact, W as useMcpToolToggleMap, Wt as DiscoveryProvider, Xn as discoverAgentsMd, Y as createFileMcpCredentialStore, Yt as resolveConfig, _ as useSafeModeQueue, _n as ensureKeybindingsFile, _t as hintsLength, a as useSurfaces, ar as accentColor, at as InteractionsProvider, b as getSafelist, bn as keybindingsPath, bt as generateSessionTitle, c as useStreamBuffer, cn as sumRunCosts, ct as createInteractionTools, d as discoverProjectSkills, dn as toolResultText, dr as TODO_STATUS_GLYPHS, dt as pendingInteractionsFromTurns, en as eventsFromTurns, et as useMcpAuthState, fn as updateToolEventOutcomes, g as useSafeModeActions, gn as KEYBINDING_KEY_COL_WIDTH, gt as clipHintsToWidth, h as SafeModeProvider, ht as EMPTY_HINTS, i as useSelectStyle, in as marginTopFor, j as supportsOAuth, jn as useUpdateCheck, jt as useSettings, k as oauthUsesManualCodePaste, kn as bootTick, kt as SettingsProvider, l as buildSkillsConfig, m as writeSessionExport, mn as KEYBINDING_DEFS, mt as useInteractionsQueue, n as ThemeProvider, nn as listSessionMeta, on as serverToolResultSummary, pt as useInteractionsActions, q as indexOfServerRow, qt as ConfigProvider, r as useColors, rt as splitMarkdownCodeBlocks, s as useTheme, sn as stripSpawnTokensLine, st as buildResumedToolResultsTurn, t as computeTurnAnchors, tn as lastContextSizeFromTurns, tt as getMcpAuthStatus, u as defaultSkillScanPaths, un as toolCallPreview, ut as makeRequestInteraction, vn as formatBindingForDisplay, vt as truncateTrailing, wt as useEnabledToggleSet, x as isOnSafelist, xn as matchesBinding, xr as useActiveTodos, xt as buildHints, y as addToSafelist, yn as groupBindings } from "./transcript-anchors-BtRC9WEQ.js";
2
- import { B as enabledModelOptions, F as OUTPUT_RESERVE_TOKENS, G as modelSupportsReasoning, M as resolvePersistDir, N as resolveTasksDir, V as getContextWindow, W as modelOptionsFor, X as restoreModelOptions, Y as piIdOf, d as createAgent, j as resolveMcpWarningsDir, k as cleanupPersistedSession, z as effectiveContextWindow } from "./tools-BbVXIpFo.js";
1
+ import { $ as useMcpAuthDispatch, $t as deriveSessionTitle, A as runOAuthLogin, An as buildUpdateHint, At as clampFps, B as refreshMcpToolsCatalog, Bn as AUTO_COMPACT_MIN_GROWTH_FRACTION, Ct as listProjectFiles, D as formatPathForCwd, Dn as tryOpenBrowser, Dt as SETTINGS_CHOICES, En as useCompletion, Et as SETTINGS_CATEGORIES, Ft as resolveTheme, Gt as useDiscovery, H as subscribeMcpToolsCache, Hn as detectAuth, J as parentServerName, Jn as setProviderCredential, Jt as useConfig, K as buildVisibleMcpRows, Kt as useDiscoveryOptional, M as buildMcpServers, Mr as buildBuildSystem, Nr as buildPlanSystem, O as fetchOAuthRedirect, Ot as SETTINGS_TOGGLES, P as discoverProjectMcps, Pr as envSection, Pt as resolveChipColor, Q as McpAuthProvider, Qn as findGitRoot, R as loadMcpToolsCache, T as suggestSafelistEntry, Tt as DEFAULT_SETTINGS, Ut as createDiscoverySlot, Vn as shouldAutoCompact, W as useMcpToolToggleMap, Wt as DiscoveryProvider, Xn as discoverAgentsMd, Y as createFileMcpCredentialStore, Yt as resolveConfig, _ as useSafeModeQueue, _n as ensureKeybindingsFile, _t as hintsLength, a as useSurfaces, ar as accentColor, at as InteractionsProvider, b as getSafelist, bn as keybindingsPath, bt as generateSessionTitle, c as useStreamBuffer, cn as sumRunCosts, ct as createInteractionTools, d as discoverProjectSkills, dn as toolResultText, dr as TODO_STATUS_GLYPHS, dt as pendingInteractionsFromTurns, en as eventsFromTurns, et as useMcpAuthState, fn as updateToolEventOutcomes, g as useSafeModeActions, gn as KEYBINDING_KEY_COL_WIDTH, gt as clipHintsToWidth, h as SafeModeProvider, ht as EMPTY_HINTS, i as useSelectStyle, in as marginTopFor, j as supportsOAuth, jn as useUpdateCheck, jt as useSettings, k as oauthUsesManualCodePaste, kn as bootTick, kt as SettingsProvider, l as buildSkillsConfig, m as writeSessionExport, mn as KEYBINDING_DEFS, mt as useInteractionsQueue, n as ThemeProvider, nn as listSessionMeta, on as serverToolResultSummary, pt as useInteractionsActions, q as indexOfServerRow, qt as ConfigProvider, r as useColors, rt as splitMarkdownCodeBlocks, s as useTheme, sn as stripSpawnTokensLine, st as buildResumedToolResultsTurn, t as computeTurnAnchors, tn as lastContextSizeFromTurns, tt as getMcpAuthStatus, u as defaultSkillScanPaths, un as toolCallPreview, ut as makeRequestInteraction, vn as formatBindingForDisplay, vt as truncateTrailing, wt as useEnabledToggleSet, x as isOnSafelist, xn as matchesBinding, xr as useActiveTodos, xt as buildHints, y as addToSafelist, yn as groupBindings } from "./transcript-anchors-DUhGHgyL.js";
2
+ import { B as enabledModelOptions, F as OUTPUT_RESERVE_TOKENS, G as modelSupportsReasoning, M as resolvePersistDir, N as resolveTasksDir, V as getContextWindow, W as modelOptionsFor, X as restoreModelOptions, Y as piIdOf, d as createAgent, j as resolveMcpWarningsDir, k as cleanupPersistedSession, z as effectiveContextWindow } from "./tools-CRaNjjn-.js";
3
3
  import { a as formatTaskStatus, c as shortId, i as formatDuration, n as compactPath, o as formatTaskSummary, r as fmtTokens, s as previewLine, t as ageString } from "./format-BNOXpl-1.js";
4
4
  import { l as errorMessage } from "./errors-B-GeaKTX.js";
5
5
  import { j as replaceDynamicSection } from "./messages-_E1RxSxV.js";
@@ -8,7 +8,7 @@ import { r as createProcessContext } from "./contexts-GKAWYq07.js";
8
8
  import { c as McpOAuthProvider, n as connectMcpServers } from "./mcp-BVuDO44W.js";
9
9
  import { r as formatTokenUsage, t as effectiveInputFromTurn } from "./stats-DAKBEKjc.js";
10
10
  import { d as compactConversation, i as createLogger, l as selectFilesFromSession, r as consoleSink, s as buildPostCompactAttachments, t as loginMcpServer, w as summaryToTurn } from "./login-D-SWsD7j.js";
11
- import { i as basic_default } from "./presets-9NpXoxzg.js";
11
+ import { i as basic_default } from "./presets-BX3X4Oi1.js";
12
12
  import { n as loadSession, t as createSession } from "./session-CZniOWFD.js";
13
13
  import { createDockerContext } from "./contexts/docker.js";
14
14
  import { createTuiStore } from "./session/sqlite.js";
package/docs/RESTATE.md CHANGED
@@ -190,9 +190,34 @@ restateTool(deployTool, ctx, {
190
190
  })
191
191
  ```
192
192
 
193
- A crash after `start` journals replays into `attach` with the recorded token. The wrapped tool deliberately does not advertise `durableExecute` (the two-phase composition is native-async); the batch scheduler runs it sequentially, which is the right shape for long re-attachable work.
193
+ A crash after `start` journals replays into the wait phase with the recorded token. The wrapped tool deliberately does not advertise `durableExecute` (the two-phase composition is native-async); the batch scheduler runs it sequentially, which is the right shape for long re-attachable work.
194
194
 
195
- The optional `onAbort(token, input, toolCtx)` is the abort seam: when the per-call signal fires before `attach` settles (run abort, `cancelTool`, `destroy()` mid-run), it runs once, best-effort, so the started job doesn't keep running with nobody attached. It is NOT called on process death that's not termination; the journaled token re-attaches on replay. It runs outside the journal (an aborting invocation can't reliably open new `ctx.run` entries); journal host-side cleanup yourself if it must be durable.
195
+ **`attach` holds the wait inside one `ctx.run` entry** fine for waits bounded well below the server's inactivity timeout, but a long busy-poll in there starves the journal: the inactivity timeout fires, the abort timeout kills the attempt, and each retry re-runs `attach` with a fresh deadline. The invocation can never complete. Keep `attach` only as the degraded mode for hosts without a push seam.
196
+
197
+ **`wait` is the awakeable-based alternative for long-running work.** Hosts that can push completion (e.g. a runner firing `task:exit` → resumer → `ctx.resolveAwakeable`) configure it instead of `attach` (it wins when both are set):
198
+
199
+ ```ts
200
+ restateTool(shellTool, ctx, {
201
+ durableStart: {
202
+ start: async input => startBackgroundTask(input), // → { taskId }
203
+ wait: {
204
+ // Journaled — hand the awakeable id to the host as the exit resumer.
205
+ register: (token, awakeableId) => registerExitResumer(token.taskId, awakeableId),
206
+ // The model's own timeout becomes the durable park deadline.
207
+ timeoutMs: input => input.timeout as number,
208
+ promises: RestatePromise, // durable race combinator
209
+ // Journaled — synthesize the foreground-shaped result. `null` = timeout:
210
+ // kill the job and shape the timeout result here.
211
+ result: async (token, resumed) =>
212
+ resumed ? formatExit(token.taskId, resumed) : killAndFormatTimeout(token.taskId),
213
+ },
214
+ },
215
+ })
216
+ ```
217
+
218
+ The orchestration follows `restateAwakeableTool`'s journal discipline, keyed by the same entry naming: `register` runs in a journaled entry (`…-register`, exactly once across replays, marker invariant included), the park happens **outside** any `ctx.run` so the invocation suspends cleanly (no held worker, immune to inactivity/abort timeouts), and `result` runs in the final journaled result entry. With `timeoutMs` the park is an `awakeableWithTimeout` race against a durable `ctx.sleep` — replay-stable, unlike a `Date.now()` deadline that resets per attempt.
219
+
220
+ The optional `onAbort(token, input, toolCtx)` is the abort seam: when the per-call signal fires before the wait settles (run abort, `cancelTool`, `destroy()` mid-run), it runs once, best-effort, so the started job doesn't keep running with nobody attached. In `wait` mode the abort also unblocks the park (the call rejects instead of waiting on a resumer nobody will consume). It is NOT called on process death — that's not termination; the journaled token re-attaches on replay. It runs outside the journal (an aborting invocation can't reliably open new `ctx.run` entries); journal host-side cleanup yourself if it must be durable.
196
221
 
197
222
  ### `restateAwakeableTool`
198
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zidane",
3
- "version": "5.10.4",
3
+ "version": "5.10.6",
4
4
  "description": "an agent that goes straight to the goal",
5
5
  "type": "module",
6
6
  "private": false,