zidane 5.7.8 → 5.8.2

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 (64) hide show
  1. package/README.md +4 -1
  2. package/dist/{agent-BSPhByzT.d.ts → agent-acjWZ_4E.d.ts} +145 -2
  3. package/dist/agent-acjWZ_4E.d.ts.map +1 -0
  4. package/dist/chat/pure.d.ts +3 -3
  5. package/dist/chat.d.ts +6 -6
  6. package/dist/chat.js +2 -2
  7. package/dist/{headless-CEtk5dzV.js → headless-CJFFU6DI.js} +16 -3
  8. package/dist/headless-CJFFU6DI.js.map +1 -0
  9. package/dist/headless.d.ts +1 -1
  10. package/dist/headless.js +1 -1
  11. package/dist/{index-DmbrQjOk.d.ts → index-Cgr_mbMJ.d.ts} +2 -2
  12. package/dist/{index-DmbrQjOk.d.ts.map → index-Cgr_mbMJ.d.ts.map} +1 -1
  13. package/dist/{index-DEqGfnZr.d.ts → index-zy4OtFSv.d.ts} +17 -3
  14. package/dist/index-zy4OtFSv.d.ts.map +1 -0
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +5 -296
  17. package/dist/index.js.map +1 -1
  18. package/dist/{login-C8Kc4gH0.js → login-BjY_sBdn.js} +301 -4
  19. package/dist/login-BjY_sBdn.js.map +1 -0
  20. package/dist/{mcp-Kqzz-Rs_.js → mcp-Br3b1Xm3.js} +50 -8
  21. package/dist/mcp-Br3b1Xm3.js.map +1 -0
  22. package/dist/mcp.d.ts +2 -2
  23. package/dist/mcp.js +2 -2
  24. package/dist/{presets-DTxFbEZ5.js → presets-BmsTNxjR.js} +2 -2
  25. package/dist/{presets-DTxFbEZ5.js.map → presets-BmsTNxjR.js.map} +1 -1
  26. package/dist/presets.d.ts +2 -2
  27. package/dist/presets.js +1 -1
  28. package/dist/providers.d.ts +1 -1
  29. package/dist/restate.d.ts +1 -1
  30. package/dist/session/sqlite.d.ts +1 -1
  31. package/dist/session.d.ts +1 -1
  32. package/dist/skills.d.ts +2 -2
  33. package/dist/{tool-formatters-fUAp2Nr4.d.ts → tool-formatters-B5UNV_sy.d.ts} +2 -2
  34. package/dist/{tool-formatters-fUAp2Nr4.d.ts.map → tool-formatters-B5UNV_sy.d.ts.map} +1 -1
  35. package/dist/tools/fetch-url.d.ts +1 -1
  36. package/dist/tools/web-search.d.ts +1 -1
  37. package/dist/{tools-dkB_jARJ.js → tools-BzQtic6M.js} +211 -7
  38. package/dist/tools-BzQtic6M.js.map +1 -0
  39. package/dist/tools.d.ts +2 -2
  40. package/dist/tools.js +1 -1
  41. package/dist/{transcript-anchors-Cl7lbbeP.js → transcript-anchors-C571npbs.js} +46 -6
  42. package/dist/transcript-anchors-C571npbs.js.map +1 -0
  43. package/dist/{transcript-anchors-BBN7jlvp.d.ts → transcript-anchors-Dtz6U4GW.d.ts} +5 -5
  44. package/dist/transcript-anchors-Dtz6U4GW.d.ts.map +1 -0
  45. package/dist/tui.d.ts +14 -4
  46. package/dist/tui.d.ts.map +1 -1
  47. package/dist/tui.js +284 -78
  48. package/dist/tui.js.map +1 -1
  49. package/dist/{turn-operations-CE1prnuP.d.ts → turn-operations-CqJAEzoe.d.ts} +3 -3
  50. package/dist/{turn-operations-CE1prnuP.d.ts.map → turn-operations-CqJAEzoe.d.ts.map} +1 -1
  51. package/dist/types-BPw_i5vb.js.map +1 -1
  52. package/dist/types.d.ts +3 -3
  53. package/docs/ARCHITECTURE.md +4 -2
  54. package/docs/CHAT.md +19 -1
  55. package/docs/SKILL.md +1 -0
  56. package/package.json +1 -1
  57. package/dist/agent-BSPhByzT.d.ts.map +0 -1
  58. package/dist/headless-CEtk5dzV.js.map +0 -1
  59. package/dist/index-DEqGfnZr.d.ts.map +0 -1
  60. package/dist/login-C8Kc4gH0.js.map +0 -1
  61. package/dist/mcp-Kqzz-Rs_.js.map +0 -1
  62. package/dist/tools-dkB_jARJ.js.map +0 -1
  63. package/dist/transcript-anchors-BBN7jlvp.d.ts.map +0 -1
  64. package/dist/transcript-anchors-Cl7lbbeP.js.map +0 -1
package/dist/tools.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { C as getReadState, E as resolveReadStateMap, S as ReadStateMap, T as readStateKey, b as ToolMap, v as ToolContext, w as hashContent, x as ReadStateEntry, y as ToolDef } from "./agent-BSPhByzT.js";
2
- import { $t as InteractionToolOptions, At as validateToolArgs, Bt as SkillsUseToolOptions, Ft as SpawnToolOptions, Gt as createSkillsReadTool, Ht as SkillsRunScriptToolOptions, It as SpawnToolState, Jt as createShellTool, Kt as shellKill, Lt as SubagentDef, Mt as ToolSearchToolOptions, Nt as createToolSearchTool, Ot as writeFile, Pt as ChildAgent, Qt as listFiles, Rt as SubagentRegistry, Ut as createSkillsRunScriptTool, Vt as createSkillsUseTool, Wt as SkillsReadToolOptions, Xt as readFile, Yt as shell, Zt as multiEdit, en as createInteractionTool, jt as LazyToolEntry, kt as ValidationResult, nn as glob, qt as CreateShellToolOptions, rn as edit, tn as grep, zt as createSpawnTool } from "./index-DEqGfnZr.js";
1
+ import { C as ReadStateMap, D as resolveReadStateMap, E as readStateKey, S as ReadStateEntry, T as hashContent, b as ToolDef, w as getReadState, x as ToolMap, y as ToolContext } from "./agent-acjWZ_4E.js";
2
+ import { $t as InteractionToolOptions, At as validateToolArgs, Bt as SkillsUseToolOptions, Ft as SpawnToolOptions, Gt as createSkillsReadTool, Ht as SkillsRunScriptToolOptions, It as SpawnToolState, Jt as createShellTool, Kt as shellKill, Lt as SubagentDef, Mt as ToolSearchToolOptions, Nt as createToolSearchTool, Ot as writeFile, Pt as ChildAgent, Qt as listFiles, Rt as SubagentRegistry, Ut as createSkillsRunScriptTool, Vt as createSkillsUseTool, Wt as SkillsReadToolOptions, Xt as readFile, Yt as shell, Zt as multiEdit, en as createInteractionTool, jt as LazyToolEntry, kt as ValidationResult, nn as glob, qt as CreateShellToolOptions, rn as edit, tn as grep, zt as createSpawnTool } from "./index-zy4OtFSv.js";
3
3
  export { type ChildAgent, type CreateShellToolOptions, type InteractionToolOptions, type LazyToolEntry, type ReadStateEntry, type ReadStateMap, type SkillsReadToolOptions, type SkillsRunScriptToolOptions, type SkillsUseToolOptions, type SpawnToolOptions, type SpawnToolState, type SubagentDef, type SubagentRegistry, type ToolContext, type ToolDef, type ToolMap, type ToolSearchToolOptions, type ValidationResult, createInteractionTool, createShellTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, getReadState, glob, grep, hashContent, listFiles, multiEdit, readFile, readStateKey, resolveReadStateMap, shell, shellKill, validateToolArgs, writeFile };
package/dist/tools.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as getReadState, M as readStateKey, N as resolveReadStateMap, S as validateToolArgs, _ as shell, a as multiEdit, c as grep, f as createToolSearchTool, g as createShellTool, h as createSkillsReadTool, i as readFile, j as hashContent, l as glob, m as createSkillsRunScriptTool, n as createSpawnTool, o as listFiles, p as createSkillsUseTool, r as shellKill, s as createInteractionTool, t as writeFile, u as edit } from "./tools-dkB_jARJ.js";
1
+ import { M as hashContent, N as readStateKey, P as resolveReadStateMap, S as validateToolArgs, _ as shell, a as multiEdit, c as grep, f as createToolSearchTool, g as createShellTool, h as createSkillsReadTool, i as readFile, j as getReadState, l as glob, m as createSkillsRunScriptTool, n as createSpawnTool, o as listFiles, p as createSkillsUseTool, r as shellKill, s as createInteractionTool, t as writeFile, u as edit } from "./tools-BzQtic6M.js";
2
2
  export { createInteractionTool, createShellTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, getReadState, glob, grep, hashContent, listFiles, multiEdit, readFile, readStateKey, resolveReadStateMap, shell, shellKill, validateToolArgs, writeFile };
@@ -1,13 +1,13 @@
1
- import { G as modelSupportsReasoning, K as modelsForDescriptor, P as BUILTIN_PROVIDERS, R as credKeyOf, X as restoreModelOptions, _ as shell, a as multiEdit, c as grep, i as readFile$1, l as glob$1, n as createSpawnTool, o as listFiles, t as writeFile$1, u as edit, z as effectiveContextWindow } from "./tools-dkB_jARJ.js";
1
+ import { B as effectiveContextWindow, F as BUILTIN_PROVIDERS, K as modelSupportsReasoning, Z as restoreModelOptions, _ as shell, a as multiEdit, c as grep, i as readFile$1, l as glob$1, n as createSpawnTool, o as listFiles, q as modelsForDescriptor, t as writeFile$1, u as edit, z as credKeyOf } from "./tools-BzQtic6M.js";
2
2
  import { d as shortId, o as fmtTokens, u as previewLine } from "./edit-utils-DnfNoj16.js";
3
3
  import { u as writeFileAtomic } from "./providers-h4HJPbbv.js";
4
4
  import { l as errorMessage } from "./errors-CoQnKRf1.js";
5
5
  import { O as joinSystemPrompt } from "./messages-CvRQTdbR.js";
6
6
  import { r as toolResultToText } from "./types-BPw_i5vb.js";
7
7
  import { a as discoverSkills } from "./interpolate-TySiqKzc.js";
8
- import { r as normalizeMcpServers, t as connectMcpServers } from "./mcp-Kqzz-Rs_.js";
8
+ import { i as normalizeMcpServers, n as connectMcpServers } from "./mcp-Br3b1Xm3.js";
9
9
  import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
10
- import { n as definePreset, t as composePresets } from "./presets-DTxFbEZ5.js";
10
+ import { n as definePreset, t as composePresets } from "./presets-BmsTNxjR.js";
11
11
  import { r as fetchUrl } from "./fetch-url-CPxfiXDa.js";
12
12
  import { webSearch } from "./tools/web-search.js";
13
13
  import { D as extractEditPayload, I as parseEditOutcomesFromResult, J as collectReferences, Y as findActiveTrigger, q as applyInsert, u as ownerOf } from "./turn-operations-CCHfR9eC.js";
@@ -1042,6 +1042,21 @@ const DEFAULT_BUDGET_EXCLUDE_TOOLS = [
1042
1042
  * `Settings.persistToolResults` (sets the threshold to 0 at agent build
1043
1043
  * time).
1044
1044
  */
1045
+ /**
1046
+ * Stable JSON of a tool input with keys sorted, used as a dedup cache key for
1047
+ * the read-only discovery tools. Covers EVERY input field, so `grep -i` never
1048
+ * collides with `grep` and a widened `limit` busts the cache. Empty objects
1049
+ * opt out (returns `undefined`) — a zero-arg `list_files` of cwd is cheap and
1050
+ * a stale replay there is more surprising than re-running it.
1051
+ */
1052
+ function discoveryDedupHash(input) {
1053
+ const keys = Object.keys(input);
1054
+ if (keys.length === 0) return void 0;
1055
+ keys.sort();
1056
+ const norm = {};
1057
+ for (const k of keys) norm[k] = input[k];
1058
+ return JSON.stringify(norm);
1059
+ }
1045
1060
  const SHARED_BEHAVIOR = {
1046
1061
  compactStrategy: "tail",
1047
1062
  compactThreshold: 128 * 1024,
@@ -1051,7 +1066,19 @@ const SHARED_BEHAVIOR = {
1051
1066
  toolOutputBudget: 64 * 1024,
1052
1067
  toolOutputBudgetExcludeTools: DEFAULT_BUDGET_EXCLUDE_TOOLS,
1053
1068
  persistThreshold: 8 * 1024,
1054
- persistExcludeTools: DEFAULT_PERSIST_EXCLUDE_TOOLS
1069
+ persistExcludeTools: DEFAULT_PERSIST_EXCLUDE_TOOLS,
1070
+ requireReadBeforeEdit: true,
1071
+ dedupTools: {
1072
+ glob: discoveryDedupHash,
1073
+ grep: discoveryDedupHash,
1074
+ list_files: discoveryDedupHash
1075
+ },
1076
+ repeatGuard: {},
1077
+ thinkingDecay: {
1078
+ afterTurn: 10,
1079
+ factor: .5,
1080
+ floor: 1024
1081
+ }
1055
1082
  };
1056
1083
  /**
1057
1084
  * Build agent — the default profile. Full read/write/shell access plus
@@ -2728,6 +2755,13 @@ const KEYBINDING_DEFS = [
2728
2755
  description: "open the session details modal (stats, export, delete, rename)",
2729
2756
  group: "Global"
2730
2757
  },
2758
+ {
2759
+ action: "newSession",
2760
+ default: "ctrl+n",
2761
+ label: "new session",
2762
+ description: "start a fresh chat session with the active provider/model (same as the \"+ new session\" row)",
2763
+ group: "Global"
2764
+ },
2731
2765
  {
2732
2766
  action: "openModelPicker",
2733
2767
  default: "ctrl+m",
@@ -3481,6 +3515,11 @@ function eventsFromTurns(turns, runs = []) {
3481
3515
  streaming: false,
3482
3516
  ...tag
3483
3517
  });
3518
+ else if (block.type === "thinking" && block.text.trim()) for (const line of block.text.split("\n")) events.push({
3519
+ kind: "thinking",
3520
+ text: line,
3521
+ ...tag
3522
+ });
3484
3523
  else if (block.type === "tool_call") {
3485
3524
  let edit = extractEditPayload(block.name, block.input);
3486
3525
  if (edit) {
@@ -3692,7 +3731,7 @@ const MARGIN_TOP = {
3692
3731
  "separator": 0,
3693
3732
  "user-prompt": 1,
3694
3733
  "info": 1,
3695
- "thinking": 0,
3734
+ "thinking": 1,
3696
3735
  "tool": 1,
3697
3736
  "tool-result": 0,
3698
3737
  "error": 1,
@@ -3732,6 +3771,7 @@ const TOOL_KINDS = new Set(["tool", "tool-result"]);
3732
3771
  function marginTopFor(event, previous) {
3733
3772
  if (TOOL_KINDS.has(event.kind) && previous && TOOL_KINDS.has(previous.kind)) return 0;
3734
3773
  if (event.kind === "task-notification" && previous?.kind === "task-notification") return 0;
3774
+ if (event.kind === "thinking" && previous?.kind === "thinking" && previous.childId === event.childId) return 0;
3735
3775
  return MARGIN_TOP[event.kind] ?? 0;
3736
3776
  }
3737
3777
  /** Effective context size of the most recent assistant turn — drives the footer indicator. */
@@ -9089,4 +9129,4 @@ function computeTurnAnchors(items) {
9089
9129
  //#endregion
9090
9130
  export { useMcpAuthDispatch as $, BUILD_AGENT as $n, deriveSessionTitle as $t, runOAuthLogin as A, buildUpdateHint as An, SUBAGENT_GUIDANCE as Ar, clampFps as At, refreshMcpToolsCatalog as B, AUTO_COMPACT_MIN_GROWTH_FRACTION as Bn, CATPPUCCIN_LATTE as Bt, projectsFilePath as C, parseBindingSpec as Cn, COMMUNICATION_DOCTRINE as Cr, listProjectFiles as Ct, formatPathForCwd as D, tryOpenBrowser as Dn, INTERACTION_GUIDANCE_NO_PROMPTS as Dr, SETTINGS_CHOICES as Dt, writeProjects as E, useCompletion as En, INTERACTION_GUIDANCE as Er, SETTINGS_CATEGORIES as Et, parseMcpsFile as F, detectPackageManager as Fn, resolveTheme as Ft, useMcpToolToggleSet as G, readCredentials as Gn, useDiscovery as Gt, subscribeMcpToolsCache as H, detectAuth as Hn, CATPPUCCIN_MOCHA as Ht, projectUserPaths as I, parseSemver as In, VAPORWAVE_THEME as It, parentServerName as J, setProviderCredential as Jn, useConfig as Jt, buildVisibleMcpRows as K, readProviderCredential as Kn, useDiscoveryOptional as Kt, clearMcpToolsCache as L, performInPlaceSelfUpdate as Ln, GRUVBOX_DARK as Lt, buildMcpServers as M, checkForUpdate as Mn, buildBuildSystem as Mr, BUILTIN_THEMES as Mt, defaultMcpsConfigPaths as N, compareSemver as Nn, buildPlanSystem as Nr, DEFAULT_THEME as Nt, fetchOAuthRedirect as O, bootProfileEnabled as On, PLAN_MODE_DOCTRINE as Or, SETTINGS_TOGGLES as Ot, discoverProjectMcps as P, detectLibc as Pn, envSection as Pr, resolveChipColor as Pt, McpAuthProvider as Q, findGitRoot$1 as Qn, createStateStore as Qt, loadMcpToolsCache as R, performSelfUpdate as Rn, GRUVBOX_LIGHT as Rt, matchesSafelistEntry as S, mergeKeybindings as Sn, ACTIONS_WITH_CARE_DOCTRINE as Sr, shortChord as St, suggestSafelistEntry as T, stripJsonComments as Tn, IDENTITY_PREFIX as Tr, DEFAULT_SETTINGS as Tt, buildToolToggle as U, applyApiKeyEnv as Un, createDiscoverySlot as Ut, saveMcpToolsCache as V, shouldAutoCompact as Vn, CATPPUCCIN_MACCHIATO as Vt, useMcpToolToggleMap as W, credentialsPath as Wn, DiscoveryProvider as Wt, mcpCredentialsPath as X, discoverAgentsMd as Xn, resolveStoragePaths as Xt, createFileMcpCredentialStore as Y, writeCredentials as Yn, resolveConfig as Yt, patchMcpCredential as Z, renderAgentsMdBlock as Zn, resolveStorageDirs as Zt, useSafeModeQueue as _, ensureKeybindingsFile as _n, pickActiveRunId as _r, hintsLength as _t, useSurfaces as a, saveState as an, accentColor as ar, InteractionsProvider as at, getSafelist as b, keybindingsPath as bn, setTodosForRun as br, generateSessionTitle as bt, useStreamBuffer as c, sumRunCosts as cn, TODOREAD_TOOL as cr, createInteractionTools as ct, discoverProjectSkills as d, toolResultText as dn, TODO_STATUS_GLYPHS as dr, pendingInteractionsFromTurns as dt, eventsFromTurns as en, BUILTIN_AGENTS as er, useMcpAuthState as et, renderSession as f, updateToolEventOutcomes as fn, TODO_WRITE_COUNTS_METADATA_KEY as fr, serializeInteractionResponse as ft, useSafeModeActions as g, KEYBINDING_KEY_COL_WIDTH as gn, isTodoTool as gr, clipHintsToWidth as gt, SafeModeProvider as h, KEYBINDING_DEF_BY_ACTION as hn, getTodosForRun as hr, EMPTY_HINTS as ht, useSelectStyle as i, marginTopFor as in, PLAN_AGENT as ir, ASK_USER_TOOL as it, supportsOAuth as j, useUpdateCheck as jn, TOKEN_DISCIPLINE_DOCTRINE as jr, useSettings as jt, oauthUsesManualCodePaste as k, bootTick as kn, PLAN_MODE_DOCTRINE_NO_PROMPTS as kr, SettingsProvider as kt, buildSkillsConfig as l, titleFromTurns as ln, TODOS_METADATA_KEY as lr, isInteractionTool as lt, writeSessionExport as m, KEYBINDING_DEFS as mn, getArchivedTodosForRun as mr, useInteractionsQueue as mt, ThemeProvider as n, listSessionMeta as nn, DEFAULT_BUDGET_EXCLUDE_TOOLS as nr, reduceMcpAuth as nt, useSyntaxStyles as o, serverToolResultSummary as on, resolveAgentId as or, PRESENT_PLAN_TOOL as ot, resolveSessionExportTarget as p, DEFAULT_KEYBINDINGS as pn, createTodoTools as pr, useInteractionsActions as pt, indexOfServerRow as q, removeProviderCredential as qn, ConfigProvider as qt, useColors as r, loadState as rn, DEFAULT_PERSIST_EXCLUDE_TOOLS as rr, splitMarkdownCodeBlocks as rt, useTheme as s, stripSpawnTokensLine as sn, singleAgentRegistry as sr, buildResumedToolResultsTurn as st, computeTurnAnchors as t, lastContextSizeFromTurns as tn, DEFAULT_AGENT_ID as tr, getMcpAuthStatus as tt, defaultSkillScanPaths as u, toolCallPreview as un, TODOWRITE_TOOL as ur, makeRequestInteraction as ut, IMPLICITLY_SAFE_TOOLS as v, formatBindingForDisplay as vn, pruneTodosByRun as vr, truncateTrailing as vt, readProjects as w, readKeybindings as wn, DOING_TASKS_DOCTRINE as wr, useEnabledToggleSet as wt, isOnSafelist as x, matchesBinding as xn, useActiveTodos as xr, buildHints as xt, addToSafelist as y, groupBindings as yn, selectActiveTodos as yr, cleanTitle as yt, mcpToolsCachePath as z, resolvePlatformPackage as zn, CATPPUCCIN_FRAPPE as zt };
9091
9131
 
9092
- //# sourceMappingURL=transcript-anchors-Cl7lbbeP.js.map
9132
+ //# sourceMappingURL=transcript-anchors-C571npbs.js.map