zidane 5.2.1 → 5.3.0
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 +7 -5
- package/dist/{agent-CGQajqtC.d.ts → agent-CYpPKn5Z.d.ts} +2 -2
- package/dist/{agent-CGQajqtC.d.ts.map → agent-CYpPKn5Z.d.ts.map} +1 -1
- package/dist/chat.d.ts +5 -155
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/{index-BDP6mA3Y.d.ts → index-Cc-q1hLT.d.ts} +2 -2
- package/dist/{index-BDP6mA3Y.d.ts.map → index-Cc-q1hLT.d.ts.map} +1 -1
- package/dist/{index-DwbcFBr_.d.ts → index-D-cTScN3.d.ts} +9 -30
- package/dist/{index-DwbcFBr_.d.ts.map → index-D-cTScN3.d.ts.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{login-D7Tp-K5f.js → login-BXVt5wuA.js} +2 -2
- package/dist/{login-D7Tp-K5f.js.map → login-BXVt5wuA.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/{presets-AgF0RFx1.js → presets-tvD28pCu.js} +10 -29
- package/dist/presets-tvD28pCu.js.map +1 -0
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +2 -2
- package/dist/{tools-BRbbfdJh.js → tools-CMVruxF0.js} +2 -130
- package/dist/tools-CMVruxF0.js.map +1 -0
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-BBuIoU0x.d.ts → transcript-anchors-eyhlGeBI.d.ts} +3 -3
- package/dist/transcript-anchors-eyhlGeBI.d.ts.map +1 -0
- package/dist/tui.d.ts +2 -2
- package/dist/tui.js +55 -5
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-gJ0qtLPv.js → turn-operations-Y7e15gJf.js} +7 -345
- package/dist/turn-operations-Y7e15gJf.js.map +1 -0
- package/dist/types-IcokUOyC.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/docs/ARCHITECTURE.md +3 -2
- package/docs/CHAT.md +55 -16
- package/docs/TUI.md +22 -2
- package/package.json +1 -1
- package/dist/presets-AgF0RFx1.js.map +0 -1
- package/dist/tools-BRbbfdJh.js.map +0 -1
- package/dist/transcript-anchors-BBuIoU0x.d.ts.map +0 -1
- package/dist/turn-operations-gJ0qtLPv.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-
|
|
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";
|
|
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
|
|
7
|
+
import { n as definePreset } from "./presets-tvD28pCu.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,311 +253,6 @@ 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
|
|
561
256
|
//#region src/chat/agents.ts
|
|
562
257
|
/**
|
|
563
258
|
* Resolve a profile's `accent` token to a concrete hex color via the
|
|
@@ -619,9 +314,7 @@ const DEFAULT_PERSIST_EXCLUDE_TOOLS = [
|
|
|
619
314
|
"skills_read",
|
|
620
315
|
"present_plan",
|
|
621
316
|
"ask_user",
|
|
622
|
-
"spawn"
|
|
623
|
-
"todowrite",
|
|
624
|
-
"todoread"
|
|
317
|
+
"spawn"
|
|
625
318
|
];
|
|
626
319
|
/**
|
|
627
320
|
* Token-saving `AgentBehavior` defaults shared by the built-in profiles.
|
|
@@ -677,7 +370,7 @@ const BUILD_AGENT = {
|
|
|
677
370
|
label: "Build",
|
|
678
371
|
description: "full tool access — read, write, edit, shell, and spawn subagents",
|
|
679
372
|
accent: "accent",
|
|
680
|
-
preset:
|
|
373
|
+
preset: definePreset({
|
|
681
374
|
name: "build",
|
|
682
375
|
system: buildBuildSystem(),
|
|
683
376
|
behavior: { ...SHARED_BEHAVIOR },
|
|
@@ -685,7 +378,7 @@ const BUILD_AGENT = {
|
|
|
685
378
|
...BUILD_TOOLS,
|
|
686
379
|
spawn: createSpawnTool({ persist: true })
|
|
687
380
|
}
|
|
688
|
-
})
|
|
381
|
+
})
|
|
689
382
|
};
|
|
690
383
|
/**
|
|
691
384
|
* Plan agent — read-only exploration mode. Locked down to file reading and
|
|
@@ -7351,37 +7044,6 @@ const TOOL_DISPLAY = {
|
|
|
7351
7044
|
};
|
|
7352
7045
|
}
|
|
7353
7046
|
},
|
|
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
|
-
},
|
|
7385
7047
|
ask_user: {
|
|
7386
7048
|
displayName: "Ask user",
|
|
7387
7049
|
format: (input) => {
|
|
@@ -7626,6 +7288,6 @@ function countNeighbors(turnIds, turnId) {
|
|
|
7626
7288
|
};
|
|
7627
7289
|
}
|
|
7628
7290
|
//#endregion
|
|
7629
|
-
export { useMcpAuthDispatch as $, bootTick as $n, isVisible as $t, getSafelist as A, KEYBINDING_DEF_BY_ACTION as An,
|
|
7291
|
+
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 };
|
|
7630
7292
|
|
|
7631
|
-
//# sourceMappingURL=turn-operations-
|
|
7293
|
+
//# sourceMappingURL=turn-operations-Y7e15gJf.js.map
|