zidane 5.1.23 → 5.2.1

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 (43) hide show
  1. package/README.md +4 -4
  2. package/dist/{agent-CYpPKn5Z.d.ts → agent-CGQajqtC.d.ts} +2 -2
  3. package/dist/{agent-CYpPKn5Z.d.ts.map → agent-CGQajqtC.d.ts.map} +1 -1
  4. package/dist/chat.d.ts +155 -5
  5. package/dist/chat.d.ts.map +1 -1
  6. package/dist/chat.js +2 -2
  7. package/dist/{index-Cc-q1hLT.d.ts → index-BDP6mA3Y.d.ts} +2 -2
  8. package/dist/{index-Cc-q1hLT.d.ts.map → index-BDP6mA3Y.d.ts.map} +1 -1
  9. package/dist/{index-D-cTScN3.d.ts → index-DwbcFBr_.d.ts} +30 -9
  10. package/dist/{index-D-cTScN3.d.ts.map → index-DwbcFBr_.d.ts.map} +1 -1
  11. package/dist/index.d.ts +3 -3
  12. package/dist/index.js +3 -3
  13. package/dist/{login-BXVt5wuA.js → login-D7Tp-K5f.js} +2 -2
  14. package/dist/{login-BXVt5wuA.js.map → login-D7Tp-K5f.js.map} +1 -1
  15. package/dist/mcp.d.ts +1 -1
  16. package/dist/{presets-tvD28pCu.js → presets-AgF0RFx1.js} +29 -10
  17. package/dist/presets-AgF0RFx1.js.map +1 -0
  18. package/dist/presets.d.ts +2 -2
  19. package/dist/presets.js +1 -1
  20. package/dist/providers.d.ts +1 -1
  21. package/dist/session/sqlite.d.ts +1 -1
  22. package/dist/session.d.ts +1 -1
  23. package/dist/skills.d.ts +2 -2
  24. package/dist/{tools-CMVruxF0.js → tools-BRbbfdJh.js} +130 -2
  25. package/dist/tools-BRbbfdJh.js.map +1 -0
  26. package/dist/tools.d.ts +2 -2
  27. package/dist/tools.js +1 -1
  28. package/dist/{transcript-anchors-MFY4ArMh.d.ts → transcript-anchors-BBuIoU0x.d.ts} +12 -3
  29. package/dist/transcript-anchors-BBuIoU0x.d.ts.map +1 -0
  30. package/dist/tui.d.ts +2 -2
  31. package/dist/tui.js +78 -42
  32. package/dist/tui.js.map +1 -1
  33. package/dist/{turn-operations-CSlpiiqJ.js → turn-operations-gJ0qtLPv.js} +357 -8
  34. package/dist/turn-operations-gJ0qtLPv.js.map +1 -0
  35. package/dist/types-IcokUOyC.js.map +1 -1
  36. package/dist/types.d.ts +2 -2
  37. package/docs/CHAT.md +63 -3
  38. package/docs/SKILL.md +5 -3
  39. package/package.json +1 -1
  40. package/dist/presets-tvD28pCu.js.map +0 -1
  41. package/dist/tools-CMVruxF0.js.map +0 -1
  42. package/dist/transcript-anchors-MFY4ArMh.d.ts.map +0 -1
  43. package/dist/turn-operations-CSlpiiqJ.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { a as multiEdit, c as grep, d as resolveOldString, f as styleReplacementForVia, i as readFile$1, l as glob, n as createSpawnTool, o as listFiles, r as shell, t as writeFile$1, u as edit } from "./tools-CMVruxF0.js";
1
+ import { a as multiEdit, c as grep, d as resolveOldString, f as styleReplacementForVia, i as readFile$1, l as glob, n as createSpawnTool, o as listFiles, r as shell, t as writeFile$1, u as edit } from "./tools-BRbbfdJh.js";
2
2
  import { o as errorMessage } from "./errors-COmsomd5.js";
3
3
  import { n as toolResultToText } from "./types-IcokUOyC.js";
4
4
  import { r as normalizeMcpServers } from "./mcp-B1psg7jf.js";
5
5
  import { a as discoverSkills } from "./interpolate-BhmHKD6x.js";
6
6
  import { n as formatTokenUsage } from "./stats-DgOvY7wd.js";
7
- import { n as definePreset } from "./presets-tvD28pCu.js";
7
+ import { n as definePreset, t as composePresets } from "./presets-AgF0RFx1.js";
8
8
  import { a as writeFileAtomic, i as anthropic, n as openai, r as cerebras, t as openrouter } from "./providers-v1Rn2rqG.js";
9
9
  import { spawn } from "node:child_process";
10
10
  import { readdir, stat, writeFile } from "node:fs/promises";
@@ -253,6 +253,311 @@ function joinPrompt(parts) {
253
253
  return parts.filter((p) => typeof p === "string" && p.length > 0).join("\n\n");
254
254
  }
255
255
  //#endregion
256
+ //#region src/chat/todos.ts
257
+ const TODOWRITE_TOOL = "todowrite";
258
+ const TODOREAD_TOOL = "todoread";
259
+ /** True when `name` is one of the todo tool canonical names. */
260
+ function isTodoTool(name) {
261
+ return name === "todowrite" || name === "todoread";
262
+ }
263
+ /** `session.metadata[TODOS_METADATA_KEY]: Record<runId, TodoItem[]>` */
264
+ const TODOS_METADATA_KEY = "todosByRun";
265
+ /** `session.metadata[TODO_WRITE_COUNTS_METADATA_KEY]: Record<runId, number>` */
266
+ const TODO_WRITE_COUNTS_METADATA_KEY = "todoWriteCountsByRun";
267
+ const TODO_STATUS_VALUES = [
268
+ "pending",
269
+ "in_progress",
270
+ "completed",
271
+ "cancelled"
272
+ ];
273
+ const WRITE_DESCRIPTION = "Replace the active task list. Pass the **full** list of items every call — there is no partial update. Use the `status` field to track progress: `pending` (queued), `in_progress` (currently working), `completed` (done), `cancelled` (no longer relevant).\n\nOnly checkpoint at significant transitions:\n 1. When the user gives you a multi-step task — write the initial plan with everything `pending`.\n 2. When you transition between steps — mark the previous one `completed` and the next one `in_progress`.\n 3. When the user asks for the current status — re-emit the list unchanged so they can see it.\n\nDo NOT call this on every action. The list is for the user's situational awareness, not for self-narrating.";
274
+ const READ_DESCRIPTION = "Return the current active task list (the one most recently written by `todowrite` in this run). Returns an empty list if nothing has been written yet. Use sparingly — you already see the latest list in your own `todowrite` tool_result above.";
275
+ function defaultReminder(count) {
276
+ return `(You've called todowrite ${count} times in this run. Make sure each checkpoint reflects real progress; avoid re-planning every step.)`;
277
+ }
278
+ /**
279
+ * Read the active list for a given run. Returns a fresh `[]` (not stored
280
+ * in metadata) when no slot exists — the caller can mutate the result
281
+ * without affecting state.
282
+ */
283
+ function getTodosForRun(session, runId) {
284
+ const items = readTodosBag(session)[runId];
285
+ return Array.isArray(items) ? [...items] : [];
286
+ }
287
+ /**
288
+ * Replace the active list for a given run. Empty arrays don't create a
289
+ * slot — see the file-level "empty-payload guard" note.
290
+ */
291
+ function setTodosForRun(session, runId, items) {
292
+ const bag = { ...readTodosBag(session) };
293
+ if (items.length === 0) delete bag[runId];
294
+ else bag[runId] = items.map(normalizeItem);
295
+ session.setMeta(TODOS_METADATA_KEY, bag);
296
+ }
297
+ /**
298
+ * Reconcile `session.metadata.todosByRun` against `session.runs`. Drops
299
+ * keys whose runId isn't in the run list. Useful after `session.setRuns()`
300
+ * (fork / restore) or to GC stale metadata mutated by an external caller.
301
+ *
302
+ * Also prunes the parallel counter bag so it doesn't drift.
303
+ */
304
+ function pruneTodosByRun(session) {
305
+ const validRunIds = new Set(session.runs.map((r) => r.id));
306
+ const dropped = [];
307
+ const bag = readTodosBag(session);
308
+ const nextBag = {};
309
+ for (const [runId, items] of Object.entries(bag)) if (validRunIds.has(runId)) nextBag[runId] = items;
310
+ else dropped.push(runId);
311
+ if (dropped.length > 0) session.setMeta(TODOS_METADATA_KEY, nextBag);
312
+ const counts = readCountsBag(session);
313
+ const nextCounts = {};
314
+ let countsChanged = false;
315
+ for (const [runId, n] of Object.entries(counts)) if (validRunIds.has(runId)) nextCounts[runId] = n;
316
+ else countsChanged = true;
317
+ if (countsChanged) session.setMeta(TODO_WRITE_COUNTS_METADATA_KEY, nextCounts);
318
+ return { dropped };
319
+ }
320
+ /**
321
+ * Build a `Preset` carrying the `{ todowrite, todoread }` tool pair plus the
322
+ * per-run write budget that caps the model's checkpoint frequency. Identical-
323
+ * payload dedup is handled inside the tool body (run-scoped) and intentionally
324
+ * does NOT plumb through `behavior.dedupTools` — see the `dedupIdentical`
325
+ * option doc for the rationale.
326
+ *
327
+ * Returning a `Preset` (not a bare tool map) lets the result flow through
328
+ * {@link composePresets} unchanged — todos compose with any other preset
329
+ * the same way every other preset does. `toolBudgets` is a tool-name-keyed
330
+ * record that `composePresets` deep-merges, so a caller's custom budget
331
+ * entries for other tools survive the layering, and a caller's override
332
+ * for `todowrite` itself wins by being placed later in the chain.
333
+ *
334
+ * ```ts
335
+ * import { basic, composePresets } from 'zidane/presets'
336
+ * import { createTodoTools } from 'zidane/chat'
337
+ *
338
+ * createAgent({
339
+ * ...composePresets(basic, createTodoTools({ maxWritesPerRun: 6 })),
340
+ * provider,
341
+ * })
342
+ * ```
343
+ *
344
+ * For the trivial "just add the tools to an existing config" case, plain
345
+ * spread is also fine since the returned `Preset` only sets `tools` +
346
+ * `behavior`:
347
+ *
348
+ * ```ts
349
+ * createAgent({ ...basic, ...createTodoTools(), provider })
350
+ * ```
351
+ */
352
+ function createTodoTools(options = {}) {
353
+ const maxItems = options.maxItems ?? 100;
354
+ const remindAfter = options.remindAfter ?? 3;
355
+ const reminderText = options.reminderText ?? ((count, _items) => defaultReminder(count));
356
+ const dedupIdentical = options.dedupIdentical ?? true;
357
+ const maxWritesPerRun = options.maxWritesPerRun ?? 6;
358
+ const onMaxWrites = options.onMaxWrites ?? "steer";
359
+ const tools = {
360
+ [TODOWRITE_TOOL]: createTodoWriteTool({
361
+ maxItems,
362
+ remindAfter,
363
+ reminderText,
364
+ dedupIdentical,
365
+ description: options.writeDescription ?? WRITE_DESCRIPTION
366
+ }),
367
+ [TODOREAD_TOOL]: createTodoReadTool({ description: options.readDescription ?? READ_DESCRIPTION })
368
+ };
369
+ const behavior = {};
370
+ if (maxWritesPerRun > 0) behavior.toolBudgets = { [TODOWRITE_TOOL]: {
371
+ max: maxWritesPerRun,
372
+ onExceed: onMaxWrites
373
+ } };
374
+ return definePreset(Object.keys(behavior).length > 0 ? {
375
+ tools,
376
+ behavior
377
+ } : { tools });
378
+ }
379
+ function createTodoWriteTool(opts) {
380
+ return {
381
+ spec: {
382
+ name: TODOWRITE_TOOL,
383
+ description: opts.description,
384
+ inputSchema: {
385
+ type: "object",
386
+ properties: { todos: {
387
+ type: "array",
388
+ description: "The complete task list. Replaces the prior list in full.",
389
+ maxItems: opts.maxItems,
390
+ items: {
391
+ type: "object",
392
+ properties: {
393
+ id: {
394
+ type: "string",
395
+ description: "Stable identifier (the model picks)."
396
+ },
397
+ content: {
398
+ type: "string",
399
+ description: "One-line task summary."
400
+ },
401
+ status: {
402
+ type: "string",
403
+ enum: [...TODO_STATUS_VALUES],
404
+ description: "`pending`, `in_progress`, `completed`, or `cancelled`."
405
+ }
406
+ },
407
+ required: [
408
+ "id",
409
+ "content",
410
+ "status"
411
+ ]
412
+ }
413
+ } },
414
+ required: ["todos"]
415
+ }
416
+ },
417
+ async execute(input, ctx) {
418
+ const { session, runId } = requireSessionAndRun(ctx, TODOWRITE_TOOL);
419
+ const rawItems = Array.isArray(input.todos) ? input.todos : [];
420
+ const items = sanitizeItems(rawItems, opts.maxItems);
421
+ const dropped = rawItems.length - items.length;
422
+ const byId = /* @__PURE__ */ new Map();
423
+ for (const item of items) byId.set(item.id, item);
424
+ const normalized = [...byId.values()];
425
+ const current = getTodosForRun(session, runId);
426
+ const unchanged = opts.dedupIdentical && todosEqual(current, normalized);
427
+ const count = incrementCount(session, runId);
428
+ if (!unchanged) setTodosForRun(session, runId, normalized);
429
+ return formatWriteResult({
430
+ items: normalized,
431
+ dropped,
432
+ count,
433
+ unchanged,
434
+ opts
435
+ });
436
+ }
437
+ };
438
+ }
439
+ function formatWriteResult(input) {
440
+ const { items, dropped, count, unchanged, opts } = input;
441
+ const lines = [];
442
+ const n = items.length;
443
+ const suffix = n === 1 ? "" : "s";
444
+ lines.push(unchanged ? `No change — ${n} todo item${suffix} already tracked.` : `Updated ${n} todo item${suffix}.`);
445
+ const tally = summarizeStatuses(items);
446
+ if (tally) lines.push(tally);
447
+ if (dropped > 0) lines.push(`Dropped ${dropped} malformed item${dropped === 1 ? "" : "s"}.`);
448
+ const reminder = opts.remindAfter > 0 && count >= opts.remindAfter ? opts.reminderText(count, items) : void 0;
449
+ if (reminder && reminder.length > 0) lines.push(reminder);
450
+ return lines.join("\n");
451
+ }
452
+ function createTodoReadTool(opts) {
453
+ return {
454
+ spec: {
455
+ name: TODOREAD_TOOL,
456
+ description: opts.description,
457
+ inputSchema: {
458
+ type: "object",
459
+ properties: {}
460
+ }
461
+ },
462
+ async execute(_input, ctx) {
463
+ const { session, runId } = requireSessionAndRun(ctx, TODOREAD_TOOL);
464
+ const items = getTodosForRun(session, runId);
465
+ if (items.length === 0) return "No todos yet — call todowrite to start tracking tasks.";
466
+ return JSON.stringify({ todos: items });
467
+ }
468
+ };
469
+ }
470
+ /**
471
+ * Both tool bodies need a `Session` + `runId`. Centralize the guards so the
472
+ * error messages stay symmetric and one fix lands in both places.
473
+ */
474
+ function requireSessionAndRun(ctx, toolName) {
475
+ if (!ctx.session) throw new Error(`${toolName}: no session on tool context — todos require a session via createSession().`);
476
+ if (!ctx.runId) throw new Error(`${toolName}: no runId on tool context.`);
477
+ return {
478
+ session: ctx.session,
479
+ runId: ctx.runId
480
+ };
481
+ }
482
+ function readTodosBag(session) {
483
+ const raw = session.metadata[TODOS_METADATA_KEY];
484
+ if (!raw || typeof raw !== "object") return {};
485
+ return raw;
486
+ }
487
+ function readCountsBag(session) {
488
+ const raw = session.metadata[TODO_WRITE_COUNTS_METADATA_KEY];
489
+ if (!raw || typeof raw !== "object") return {};
490
+ return raw;
491
+ }
492
+ function incrementCount(session, runId) {
493
+ const bag = { ...readCountsBag(session) };
494
+ const next = (bag[runId] ?? 0) + 1;
495
+ bag[runId] = next;
496
+ session.setMeta(TODO_WRITE_COUNTS_METADATA_KEY, bag);
497
+ return next;
498
+ }
499
+ function normalizeItem(item) {
500
+ return {
501
+ id: item.id,
502
+ content: item.content,
503
+ status: item.status
504
+ };
505
+ }
506
+ function sanitizeItems(raw, cap) {
507
+ const out = [];
508
+ for (const item of raw) {
509
+ if (!item || typeof item !== "object" || Array.isArray(item)) continue;
510
+ const obj = item;
511
+ const id = typeof obj.id === "string" ? obj.id : void 0;
512
+ const content = typeof obj.content === "string" ? obj.content : void 0;
513
+ const status = typeof obj.status === "string" && TODO_STATUS_VALUES.includes(obj.status) ? obj.status : void 0;
514
+ if (!id || !content || !status) continue;
515
+ out.push({
516
+ id,
517
+ content,
518
+ status
519
+ });
520
+ if (out.length >= cap) break;
521
+ }
522
+ return out;
523
+ }
524
+ function summarizeStatuses(items) {
525
+ if (items.length === 0) return void 0;
526
+ const counts = {
527
+ pending: 0,
528
+ in_progress: 0,
529
+ completed: 0,
530
+ cancelled: 0
531
+ };
532
+ for (const item of items) counts[item.status] += 1;
533
+ const parts = [];
534
+ if (counts.completed) parts.push(`${counts.completed} completed`);
535
+ if (counts.in_progress) parts.push(`${counts.in_progress} in progress`);
536
+ if (counts.pending) parts.push(`${counts.pending} pending`);
537
+ if (counts.cancelled) parts.push(`${counts.cancelled} cancelled`);
538
+ return parts.length > 0 ? parts.join(" · ") : void 0;
539
+ }
540
+ /**
541
+ * Order-sensitive structural equality on todo lists. Used by the
542
+ * `dedupIdentical` short-circuit to decide whether an incoming payload
543
+ * matches the current run's stored slot.
544
+ *
545
+ * Order-sensitive on purpose: re-ordering the list is a meaningful state
546
+ * change ("the model reprioritized") and should NOT collapse to a no-op.
547
+ * Three-field comparison is exhaustive for `TodoItem` — `normalizeItem`
548
+ * strips any extra fields before they reach the slot, so we never need to
549
+ * compare beyond `{ id, content, status }`.
550
+ */
551
+ function todosEqual(a, b) {
552
+ if (a.length !== b.length) return false;
553
+ for (let i = 0; i < a.length; i++) {
554
+ const x = a[i];
555
+ const y = b[i];
556
+ if (x.id !== y.id || x.status !== y.status || x.content !== y.content) return false;
557
+ }
558
+ return true;
559
+ }
560
+ //#endregion
256
561
  //#region src/chat/agents.ts
257
562
  /**
258
563
  * Resolve a profile's `accent` token to a concrete hex color via the
@@ -314,7 +619,9 @@ const DEFAULT_PERSIST_EXCLUDE_TOOLS = [
314
619
  "skills_read",
315
620
  "present_plan",
316
621
  "ask_user",
317
- "spawn"
622
+ "spawn",
623
+ "todowrite",
624
+ "todoread"
318
625
  ];
319
626
  /**
320
627
  * Token-saving `AgentBehavior` defaults shared by the built-in profiles.
@@ -370,7 +677,7 @@ const BUILD_AGENT = {
370
677
  label: "Build",
371
678
  description: "full tool access — read, write, edit, shell, and spawn subagents",
372
679
  accent: "accent",
373
- preset: definePreset({
680
+ preset: composePresets(definePreset({
374
681
  name: "build",
375
682
  system: buildBuildSystem(),
376
683
  behavior: { ...SHARED_BEHAVIOR },
@@ -378,7 +685,7 @@ const BUILD_AGENT = {
378
685
  ...BUILD_TOOLS,
379
686
  spawn: createSpawnTool({ persist: true })
380
687
  }
381
- })
688
+ }), createTodoTools())
382
689
  };
383
690
  /**
384
691
  * Plan agent — read-only exploration mode. Locked down to file reading and
@@ -2926,6 +3233,15 @@ function selectableTurnIds(events, settings) {
2926
3233
  * after a session ends mid-spawn would be misleading. The next prompt
2927
3234
  * feeds the parent, so the parent's last view is what matters.
2928
3235
  *
3236
+ * Zero-context placeholder turns are also skipped. `executeTurn`
3237
+ * synthesizes an assistant turn with `usage: { input: 0, output: 0 }`
3238
+ * when the provider stream throws / aborts before any usage is reported
3239
+ * (see `src/loop.ts`'s catch path) — that turn is purely a shape
3240
+ * contract for resume, not a real context-window measurement. Without
3241
+ * the skip, an abort mid-stream shadows the prior real turn and the
3242
+ * footer reads `ctx 0` on the next session load even though earlier
3243
+ * turns accumulated meaningful context (and `run.cost`).
3244
+ *
2929
3245
  * `runs` is optional for backwards compatibility (older call sites and
2930
3246
  * tests that don't have ancestry info). Without it, this falls back to the
2931
3247
  * pre-fix behavior — depth is unknown so every assistant turn qualifies.
@@ -2937,7 +3253,9 @@ function lastContextSizeFromTurns(turns, runs = []) {
2937
3253
  const turn = turns[i];
2938
3254
  if (turn.role !== "assistant" || !turn.usage) continue;
2939
3255
  if (turn.runId && childRunIds.has(turn.runId)) continue;
2940
- return (turn.usage.input ?? 0) + (turn.usage.cacheRead ?? 0) + (turn.usage.cacheCreation ?? 0);
3256
+ const size = (turn.usage.input ?? 0) + (turn.usage.cacheRead ?? 0) + (turn.usage.cacheCreation ?? 0);
3257
+ if (size === 0) continue;
3258
+ return size;
2941
3259
  }
2942
3260
  return 0;
2943
3261
  }
@@ -7033,6 +7351,37 @@ const TOOL_DISPLAY = {
7033
7351
  };
7034
7352
  }
7035
7353
  },
7354
+ todowrite: {
7355
+ displayName: "Todos",
7356
+ format: (input) => {
7357
+ const todos = Array.isArray(input.todos) ? input.todos : null;
7358
+ if (!todos) return null;
7359
+ const counts = {
7360
+ pending: 0,
7361
+ in_progress: 0,
7362
+ completed: 0,
7363
+ cancelled: 0
7364
+ };
7365
+ for (const t of todos) {
7366
+ if (!t || typeof t !== "object") continue;
7367
+ const status = t.status;
7368
+ if (typeof status === "string" && status in counts) counts[status] += 1;
7369
+ }
7370
+ const meta = [];
7371
+ if (counts.completed) meta.push(`${counts.completed} done`);
7372
+ if (counts.in_progress) meta.push(`${counts.in_progress} in progress`);
7373
+ if (counts.pending) meta.push(`${counts.pending} pending`);
7374
+ if (counts.cancelled) meta.push(`${counts.cancelled} cancelled`);
7375
+ return {
7376
+ target: `${todos.length} item${todos.length === 1 ? "" : "s"}`,
7377
+ meta
7378
+ };
7379
+ }
7380
+ },
7381
+ todoread: {
7382
+ displayName: "Todos",
7383
+ format: () => ({ target: "read" })
7384
+ },
7036
7385
  ask_user: {
7037
7386
  displayName: "Ask user",
7038
7387
  format: (input) => {
@@ -7277,6 +7626,6 @@ function countNeighbors(turnIds, turnId) {
7277
7626
  };
7278
7627
  }
7279
7628
  //#endregion
7280
- export { useMcpAuthDispatch as $, bootTick as $n, isVisible as $t, getSafelist as A, KEYBINDING_DEF_BY_ACTION as An, ACTIONS_WITH_CARE_DOCTRINE as Ar, clampFps as At, supportsOAuth as B, uniqueSkillNamesFromReferences as Bn, buildBuildSystem as Br, CATPPUCCIN_MOCHA as Bt, resolveSessionExportTarget as C, maskToOutcomeKinds as Cn, BUILTIN_AGENTS as Cr, shortId as Ct, useSafeModeQueue as D, findGitRoot$1 as Dn, accentColor as Dr, SETTINGS_CHOICES as Dt, useSafeModeActions as E, summarizeOutcomes as En, PLAN_AGENT as Er, DEFAULT_SETTINGS as Et, suggestSafelistEntry as F, parseBindingSpec as Fn, INTERACTION_GUIDANCE_NO_PROMPTS as Fr, resolveTheme as Ft, defaultMcpsConfigPaths as G, collectReferences as Gn, ConfigProvider as Gt, filterModelCatalog as H, createFilesCompletionProvider as Hn, envSection as Hr, DiscoveryProvider as Ht, writeProjects as I, readKeybindings as In, PLAN_MODE_DOCTRINE as Ir, VAPORWAVE_THEME as It, projectUserPaths as J, useCompletion as Jn, createStateStore as Jt, discoverProjectMcps as K, findActiveTrigger as Kn, useConfig as Kt, splitPromptSegments as L, stripJsonComments as Ln, PLAN_MODE_DOCTRINE_NO_PROMPTS as Lr, CATPPUCCIN_FRAPPE as Lt, matchesSafelistEntry as M, keybindingsPath as Mn, DOING_TASKS_DOCTRINE as Mr, BUILTIN_THEMES as Mt, projectsFilePath as N, matchesBinding as Nn, IDENTITY_PREFIX as Nr, DEFAULT_THEME as Nt, IMPLICITLY_SAFE_TOOLS as O, DEFAULT_KEYBINDINGS as On, resolveAgentId as Or, SETTINGS_TOGGLES as Ot, readProjects as P, mergeKeybindings as Pn, INTERACTION_GUIDANCE as Pr, resolveChipColor as Pt, McpAuthProvider as Q, bootProfileEnabled as Qn, isTurnHighlighted as Qt, formatPathForCwd as R, SKILLS_TRIGGER as Rn, SUBAGENT_GUIDANCE as Rr, CATPPUCCIN_LATTE as Rt, renderSession as S, buildEditOutcomesAnnotation as Sn, BUILD_AGENT as Sr, fmtTokens as St, SafeModeProvider as T, resolveApprovalForPayload as Tn, DEFAULT_PERSIST_EXCLUDE_TOOLS as Tr, useEnabledToggleSet as Tt, indexOfEntry as U, uniqueFilesFromReferences as Un, useDiscovery as Ut, buildModelCatalog as V, FILES_TRIGGER as Vn, buildPlanSystem as Vr, createDiscoverySlot as Vt, buildMcpServers as W, applyInsert as Wn, useDiscoveryOptional as Wt, mcpCredentialsPath as X, buildLinearRamp as Xn, eventsFromTurns as Xt, createFileMcpCredentialStore as Y, blendHsl as Yn, deriveSessionTitle as Yt, patchMcpCredential as Z, tryOpenBrowser as Zn, isEditErrorResult as Zt, turnContextSize as _, extractEditPayload as _n, modelSupportsReasoning as _r, truncateTrailing as _t, computeTurnAnchors as a, selectableTurnIds as an, readProviderCredential as ar, InteractionsProvider as at, defaultSkillScanPaths as b, splitLines as bn, openrouterDescriptor as br, ageString as bt, formatToolCall as c, titleFromTurns as cn, writeCredentials as cr, createInteractionTools as ct, useSelectStyle as d, turnSelectionOwnership as dn, anthropicDescriptor as dr, pendingInteractionsFromTurns as dt, lastContextSizeFromTurns as en, shouldAutoCompact as er, useMcpAuthState as et, useSurfaces as f, applyEditPayload as fn, cerebrasDescriptor as fr, serializeInteractionResponse as ft, finalizeStreamingMarkdownForOwner as g, computeLineDiff as gn, getModelInfo as gr, hintsLength as gt, finalizeStreamingMarkdown as h, computeInlineDiff as hn, getContextWindow as hr, clipHintsToWidth as ht, turnAsText as i, saveState as in, readCredentials as ir, ASK_USER_TOOL as it, isOnSafelist as j, ensureKeybindingsFile as jn, COMMUNICATION_DOCTRINE as jr, useSettings as jt, addToSafelist as k, KEYBINDING_DEFS as kn, singleAgentRegistry as kr, SettingsProvider as kt, ThemeProvider as l, toolCallPreview as ln, BUILTIN_PROVIDERS as lr, isInteractionTool as lt, useTheme as m, buildUnifiedDiff as mn, effectiveContextWindow as mr, useInteractionsQueue as mt, deleteTurnSafely as n, loadState as nn, applyApiKeyEnv as nr, reduceMcpAuth as nt, TOOL_DISPLAY as o, stripSpawnTokensLine as on, removeProviderCredential as or, PRESENT_PLAN_TOOL as ot, useSyntaxStyles as p, buildContextualDiff as pn, credKeyOf as pr, useInteractionsActions as pt, parseMcpsFile as q, mergeReferences as qn, resolveConfig as qt, truncateTurnsAt as r, marginTopFor as rn, credentialsPath as rr, splitMarkdownCodeBlocks as rt, displayNameFor as s, sumRunCosts as sn, setProviderCredential as sr, buildResumedToolResultsTurn as st, countNeighbors as t, listSessionMeta as tn, detectAuth as tr, getMcpAuthStatus as tt, useColors as u, toolResultText as un, OUTPUT_RESERVE_TOKENS as ur, makeRequestInteraction as ut, useStreamBuffer as v, filetypeFromPath as vn, modelsForDescriptor as vr, cleanTitle as vt, writeSessionExport as w, parseEditOutcomesFromResult as wn, DEFAULT_AGENT_ID as wr, listProjectFiles as wt, discoverProjectSkills as x, tokenize as xn, piIdOf as xr, compactPath as xt, buildSkillsConfig as y, previewEditPayload as yn, openaiDescriptor as yr, generateSessionTitle as yt, runOAuthLogin as z, createSkillsCompletionProvider as zn, TOKEN_DISCIPLINE_DOCTRINE as zr, CATPPUCCIN_MACCHIATO as zt };
7629
+ export { useMcpAuthDispatch as $, bootTick as $n, isVisible as $t, getSafelist as A, KEYBINDING_DEF_BY_ACTION as An, TODOREAD_TOOL as Ar, clampFps as At, supportsOAuth as B, uniqueSkillNamesFromReferences as Bn, COMMUNICATION_DOCTRINE as Br, CATPPUCCIN_MOCHA as Bt, resolveSessionExportTarget as C, maskToOutcomeKinds as Cn, BUILTIN_AGENTS as Cr, shortId as Ct, useSafeModeQueue as D, findGitRoot$1 as Dn, accentColor as Dr, SETTINGS_CHOICES as Dt, useSafeModeActions as E, summarizeOutcomes as En, PLAN_AGENT as Er, DEFAULT_SETTINGS as Et, suggestSafelistEntry as F, parseBindingSpec as Fn, getTodosForRun as Fr, resolveTheme as Ft, defaultMcpsConfigPaths as G, collectReferences as Gn, PLAN_MODE_DOCTRINE as Gr, ConfigProvider as Gt, filterModelCatalog as H, createFilesCompletionProvider as Hn, IDENTITY_PREFIX as Hr, DiscoveryProvider as Ht, writeProjects as I, readKeybindings as In, isTodoTool as Ir, VAPORWAVE_THEME as It, projectUserPaths as J, useCompletion as Jn, TOKEN_DISCIPLINE_DOCTRINE as Jr, createStateStore as Jt, discoverProjectMcps as K, findActiveTrigger as Kn, PLAN_MODE_DOCTRINE_NO_PROMPTS as Kr, useConfig as Kt, splitPromptSegments as L, stripJsonComments as Ln, pruneTodosByRun as Lr, CATPPUCCIN_FRAPPE as Lt, matchesSafelistEntry as M, keybindingsPath as Mn, TODOWRITE_TOOL as Mr, BUILTIN_THEMES as Mt, projectsFilePath as N, matchesBinding as Nn, TODO_WRITE_COUNTS_METADATA_KEY as Nr, DEFAULT_THEME as Nt, IMPLICITLY_SAFE_TOOLS as O, DEFAULT_KEYBINDINGS as On, resolveAgentId as Or, SETTINGS_TOGGLES as Ot, readProjects as P, mergeKeybindings as Pn, createTodoTools as Pr, resolveChipColor as Pt, McpAuthProvider as Q, bootProfileEnabled as Qn, isTurnHighlighted as Qt, formatPathForCwd as R, SKILLS_TRIGGER as Rn, setTodosForRun as Rr, CATPPUCCIN_LATTE as Rt, renderSession as S, buildEditOutcomesAnnotation as Sn, BUILD_AGENT as Sr, fmtTokens as St, SafeModeProvider as T, resolveApprovalForPayload as Tn, DEFAULT_PERSIST_EXCLUDE_TOOLS as Tr, useEnabledToggleSet as Tt, indexOfEntry as U, uniqueFilesFromReferences as Un, INTERACTION_GUIDANCE as Ur, useDiscovery as Ut, buildModelCatalog as V, FILES_TRIGGER as Vn, DOING_TASKS_DOCTRINE as Vr, createDiscoverySlot as Vt, buildMcpServers as W, applyInsert as Wn, INTERACTION_GUIDANCE_NO_PROMPTS as Wr, useDiscoveryOptional as Wt, mcpCredentialsPath as X, buildLinearRamp as Xn, buildPlanSystem as Xr, eventsFromTurns as Xt, createFileMcpCredentialStore as Y, blendHsl as Yn, buildBuildSystem as Yr, deriveSessionTitle as Yt, patchMcpCredential as Z, tryOpenBrowser as Zn, envSection as Zr, isEditErrorResult as Zt, turnContextSize as _, extractEditPayload as _n, modelSupportsReasoning as _r, truncateTrailing as _t, computeTurnAnchors as a, selectableTurnIds as an, readProviderCredential as ar, InteractionsProvider as at, defaultSkillScanPaths as b, splitLines as bn, openrouterDescriptor as br, ageString as bt, formatToolCall as c, titleFromTurns as cn, writeCredentials as cr, createInteractionTools as ct, useSelectStyle as d, turnSelectionOwnership as dn, anthropicDescriptor as dr, pendingInteractionsFromTurns as dt, lastContextSizeFromTurns as en, shouldAutoCompact as er, useMcpAuthState as et, useSurfaces as f, applyEditPayload as fn, cerebrasDescriptor as fr, serializeInteractionResponse as ft, finalizeStreamingMarkdownForOwner as g, computeLineDiff as gn, getModelInfo as gr, hintsLength as gt, finalizeStreamingMarkdown as h, computeInlineDiff as hn, getContextWindow as hr, clipHintsToWidth as ht, turnAsText as i, saveState as in, readCredentials as ir, ASK_USER_TOOL as it, isOnSafelist as j, ensureKeybindingsFile as jn, TODOS_METADATA_KEY as jr, useSettings as jt, addToSafelist as k, KEYBINDING_DEFS as kn, singleAgentRegistry as kr, SettingsProvider as kt, ThemeProvider as l, toolCallPreview as ln, BUILTIN_PROVIDERS as lr, isInteractionTool as lt, useTheme as m, buildUnifiedDiff as mn, effectiveContextWindow as mr, useInteractionsQueue as mt, deleteTurnSafely as n, loadState as nn, applyApiKeyEnv as nr, reduceMcpAuth as nt, TOOL_DISPLAY as o, stripSpawnTokensLine as on, removeProviderCredential as or, PRESENT_PLAN_TOOL as ot, useSyntaxStyles as p, buildContextualDiff as pn, credKeyOf as pr, useInteractionsActions as pt, parseMcpsFile as q, mergeReferences as qn, SUBAGENT_GUIDANCE as qr, resolveConfig as qt, truncateTurnsAt as r, marginTopFor as rn, credentialsPath as rr, splitMarkdownCodeBlocks as rt, displayNameFor as s, sumRunCosts as sn, setProviderCredential as sr, buildResumedToolResultsTurn as st, countNeighbors as t, listSessionMeta as tn, detectAuth as tr, getMcpAuthStatus as tt, useColors as u, toolResultText as un, OUTPUT_RESERVE_TOKENS as ur, makeRequestInteraction as ut, useStreamBuffer as v, filetypeFromPath as vn, modelsForDescriptor as vr, cleanTitle as vt, writeSessionExport as w, parseEditOutcomesFromResult as wn, DEFAULT_AGENT_ID as wr, listProjectFiles as wt, discoverProjectSkills as x, tokenize as xn, piIdOf as xr, compactPath as xt, buildSkillsConfig as y, previewEditPayload as yn, openaiDescriptor as yr, generateSessionTitle as yt, runOAuthLogin as z, createSkillsCompletionProvider as zn, ACTIONS_WITH_CARE_DOCTRINE as zr, CATPPUCCIN_MACCHIATO as zt };
7281
7630
 
7282
- //# sourceMappingURL=turn-operations-CSlpiiqJ.js.map
7631
+ //# sourceMappingURL=turn-operations-gJ0qtLPv.js.map