thincoder 0.12.34 → 0.12.35
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 +1 -1
- package/package.json +1 -1
- package/src/advisor/run.mjs +4 -6
- package/src/agent/completion.mjs +4 -3
- package/src/agent/helpers.mjs +31 -4
- package/src/agent-tools/subagent.mjs +1 -1
- package/src/config.mjs +1 -1
- package/src/prompts/engineering.md +10 -0
- package/src/prompts/explore.md +5 -0
- package/src/prompts/main.md +1 -0
- package/src/prompts/system.md +3 -1
- package/src/tui/agent-turn.mjs +3 -3
- package/src/tui/cmd-advisor.mjs +6 -14
- package/src/tui/render-frame.mjs +2 -2
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Design philosophy (the entire meaning of the name): if the Node standard library
|
|
|
15
15
|
- **Fix-verify loop**: file changes without `verify` get pushed back — syntax check + tests must pass before the agent can claim completion (auto-repair up to 3 rounds)
|
|
16
16
|
- **Checkpoint system**: auto-snapshot before every user task, `list`/`create`/`rewind` tools for the model, single-file restore — rewinding itself is reversible (pre-rewind state auto-saved)
|
|
17
17
|
- **Codebase understanding** ⭐0.5.0: `repo_outline` (dependency outline, auto-injected at startup), `code_search` (source FTS5 + vectors + JSDoc extraction), `doc_search` (docs chunked by ## headings) — background indexing, auto-incremental updates on file writes, three tools guided by "structure → intent → details"
|
|
18
|
-
- **Model adaptation** ⭐: top-tier only, latest only. Built-in flagship models from seventeen providers — DeepSeek / Kimi / Kimi For Coding / GLM / Qwen / Qwen Token Plan / MiniMax / OpenAI / Claude / Gemini / Grok / Mistral / Volcengine Ark (豆包) / Hunyuan (腾讯混元) / SiliconFlow (硅基流动) / OpenRouter / Groq. No legacy model compatibility
|
|
18
|
+
- **Model adaptation** ⭐: top-tier only, latest only. Built-in flagship models from seventeen providers — DeepSeek / Kimi / Kimi For Coding / GLM / Qwen / Qwen Token Plan / MiniMax / OpenAI / Claude / Gemini / Grok / Mistral / Volcengine Ark (豆包) / Hunyuan (腾讯混元) / SiliconFlow (硅基流动) / OpenRouter / Groq. No legacy model compatibility. Auto-matched context windows, truncation-resume protocols (prefix/partial), thinking-mode APIs (thinking.type / reasoning_effort), reasoning_content echo strategies (reasoningEcho), output limits, temperature range clamping — all deeply adapted.
|
|
19
19
|
- **Toolset**: `read` / `write` / `edit` / `bash` / `glob` (supports `**`) / `grep` / `websearch` / `ls` / `fetch` + `read_image` (image/video paste) + three retrieval tools + MCP — all zero-dependency, file tools confined to the working directory
|
|
20
20
|
- **Memory system**: three layers (personal/project/team), FTS5 + vector RRF hybrid retrieval, git-friendly markdown format
|
|
21
21
|
- **Two-phase tool scheduling**: permission prompts serialized, read-only tools parallelized, side-effect tools serialized
|
package/package.json
CHANGED
package/src/advisor/run.mjs
CHANGED
|
@@ -361,13 +361,11 @@ function extractUnfixedIssues(priorText) {
|
|
|
361
361
|
export async function runAdvisorReview(agent, reviewType, callbacks, designToken = null, documents = null, paths = null) {
|
|
362
362
|
const onOutput = callbacks?.onOutput
|
|
363
363
|
const signal = callbacks?.signal
|
|
364
|
-
const cfg = agent.config?.advisor
|
|
365
364
|
const startTime = Date.now()
|
|
366
|
-
|
|
367
|
-
//
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
365
|
+
|
|
366
|
+
// Advisor reviews are ALWAYS available (2026-08-21 semantic refactor): the
|
|
367
|
+
// former advisor.enabled gate is removed — review capability has no off
|
|
368
|
+
// switch; only the guard (completion pushback) is opt-in via advisor.guard.
|
|
371
369
|
|
|
372
370
|
// Mechanical convergence cap — refuse further reviews once the protocol has run
|
|
373
371
|
// its rounds. _advisorRound counts completed advisor calls (incremented by the
|
package/src/agent/completion.mjs
CHANGED
|
@@ -111,10 +111,11 @@ export function handleCompletion(agent, response, depth, turn, guardPushbacks, h
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// --- advisor guard: review of mutated files before completion ---
|
|
114
|
-
//
|
|
115
|
-
// and NEVER in engineering mode.
|
|
114
|
+
// OPT-IN ONLY (advisor.guard === true, default OFF — 2026-08-21 semantic
|
|
115
|
+
// refactor), and NEVER in engineering mode. The advisor tool itself is always
|
|
116
|
+
// available; this guard only controls whether completion is pushed back.
|
|
116
117
|
const cfg = agent.config?.advisor
|
|
117
|
-
const advisorReview = cfg?.
|
|
118
|
+
const advisorReview = cfg?.guard === true
|
|
118
119
|
if (depth === 0 && advisorReview && !agent.config?.agent?.engineering) {
|
|
119
120
|
// Cap sync: beyond MAX_ADVISOR_ROUNDS the advisor tool refuses to review
|
|
120
121
|
// (run.mjs convergence cap) — pushing back further would loop forever
|
package/src/agent/helpers.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { configDir } from "../config.mjs"
|
|
5
5
|
import { readFileSync, readdirSync, existsSync } from "node:fs"
|
|
6
6
|
import { homedir } from "node:os"
|
|
7
|
-
import { writeFile, mkdir } from "node:fs/promises"
|
|
7
|
+
import { writeFile, mkdir, readdir, stat, unlink } from "node:fs/promises"
|
|
8
8
|
import { join } from "node:path"
|
|
9
9
|
import { execSync } from "node:child_process"
|
|
10
10
|
|
|
@@ -23,6 +23,9 @@ export const REPORT_CONTINUATION =
|
|
|
23
23
|
const TOOL_RESULT_OFFLOAD_LIMIT = 16_000
|
|
24
24
|
const TOOL_RESULT_PREVIEW = 2_000
|
|
25
25
|
|
|
26
|
+
/** Offload-dir write-time self-cleanup retention window (2026-08-21): files older than 3 days are deleted on the next offload. */
|
|
27
|
+
export const TMP_RETENTION_MS = 3 * 24 * 3600 * 1000
|
|
28
|
+
|
|
26
29
|
const GIT_TIMEOUT_MS = 5000
|
|
27
30
|
const MAX_GIT_CHANGES_DISPLAY = 20
|
|
28
31
|
|
|
@@ -39,11 +42,35 @@ export function tryCanonicalize(name, args) {
|
|
|
39
42
|
try { return name + ":" + JSON.stringify(JSON.parse(args)) } catch { return name + ":" + args }
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
/**
|
|
43
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Best-effort write-time self-cleanup: delete files in dir whose mtime exceeds TMP_RETENTION_MS.
|
|
47
|
+
* Subdirectories are never touched; every failure is silent — cleanup must not affect offload.
|
|
48
|
+
*/
|
|
49
|
+
export async function cleanupOldToolResults(dir) {
|
|
50
|
+
const now = Date.now()
|
|
51
|
+
let entries
|
|
52
|
+
try {
|
|
53
|
+
entries = await readdir(dir, { withFileTypes: true })
|
|
54
|
+
} catch {
|
|
55
|
+
return // dir missing or unreadable → nothing to clean
|
|
56
|
+
}
|
|
57
|
+
for (const entry of entries) {
|
|
58
|
+
if (!entry.isFile()) continue // subdirectories untouched
|
|
59
|
+
try {
|
|
60
|
+
const st = await stat(join(dir, entry.name))
|
|
61
|
+
if (now - st.mtimeMs > TMP_RETENTION_MS) await unlink(join(dir, entry.name))
|
|
62
|
+
} catch {
|
|
63
|
+
/* entry vanished concurrently or I/O error — best effort, keep going */
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Offload oversized tool results (>16k chars) to disk, returning a preview + file path.
|
|
69
|
+
* Writes trigger write-time self-cleanup of the offload dir first (dir param overridable for tests). */
|
|
70
|
+
export async function offloadToolResult(text, callId, dir = join(configDir, "tool-results")) {
|
|
44
71
|
if (text.length <= TOOL_RESULT_OFFLOAD_LIMIT) return text
|
|
45
72
|
try {
|
|
46
|
-
|
|
73
|
+
await cleanupOldToolResults(dir)
|
|
47
74
|
await mkdir(dir, { recursive: true })
|
|
48
75
|
const file = join(dir, `${Date.now()}-${String(callId).replace(/[^a-zA-Z0-9_-]/g, "_")}.log`)
|
|
49
76
|
await writeFile(file, text, "utf8")
|
|
@@ -53,7 +53,7 @@ export const subagentTool = {
|
|
|
53
53
|
name: "subagent",
|
|
54
54
|
description:
|
|
55
55
|
"Spawn a sub-agent to handle an independent subtask in an isolated context. The sub-agent returns only its final report. Spawn MULTIPLE subagents in the SAME response for parallel work—they run concurrently.\n" +
|
|
56
|
-
"Use role='explore' for codebase search/analysis (read-only, fast), role='plan' for read-only implementation planning (returns a step-by-step plan, never edits), role='coder' for self-contained implementation tasks. Do not give parallel subagents tasks that edit the same files.\n\n" +
|
|
56
|
+
"Use role='explore' for codebase search/analysis (read-only, fast — specify thoroughness in the task: quick / medium / thorough (default medium)), role='plan' for read-only implementation planning (returns a step-by-step plan, never edits), role='coder' for self-contained implementation tasks. Do not give parallel subagents tasks that edit the same files.\n\n" +
|
|
57
57
|
"Writing the prompt:\n" +
|
|
58
58
|
"- The sub-agent starts with zero context — it has not seen this conversation. Brief it like a colleague who just walked into the room: state the goal, list what you already know, hand over the specifics.\n" +
|
|
59
59
|
"- Put exact paths and commands in the prompt when you know them. The sub-agent should not search for things you already know.\n" +
|
package/src/config.mjs
CHANGED
|
@@ -52,7 +52,7 @@ const DEFAULTS = {
|
|
|
52
52
|
consultTurns: 40, // per-consultant tool-turn budget (diagnosis tasks)
|
|
53
53
|
consultTimeoutMs: 600000, // wall-clock ceiling per consultant (10min)
|
|
54
54
|
streamRules: [], // time-traveling stream rules: [{ pattern: "regex", message: "reminder", action: "abort"|"warn", repeat: "always"|"once" }]
|
|
55
|
-
advisor: {
|
|
55
|
+
advisor: { guard: false }, // code review is always available; guard: true pushes completion back until reviewed (opt-in). Also accepts provider/model/thinking/reasoningEffort overrides. Deprecated: enabled (2026-08-21)
|
|
56
56
|
autoThink: false, // auto-classify task difficulty and set reasoning effort per-turn
|
|
57
57
|
engineering: false, // strict methodology enforcement — read METHODOLOGY.md, design-before-code
|
|
58
58
|
},
|
|
@@ -19,6 +19,16 @@ subagents only.
|
|
|
19
19
|
non-functional standards. Clarification is DONE when each layer is concrete
|
|
20
20
|
enough to design against (the user confirms, or the answers stop changing
|
|
21
21
|
the requirement). Do NOT start the design before this.
|
|
22
|
+
- **Plan confirmation before writing any doc — no exemptions.** When
|
|
23
|
+
clarification is DONE, and before writing the requirements doc (or the
|
|
24
|
+
design doc), state in plain text your understanding of the requirement
|
|
25
|
+
plus your next-step plan, and WAIT for the user's explicit confirmation
|
|
26
|
+
("OK / 可以 / continue"-type reply) before writing. No confirmation,
|
|
27
|
+
silence, or a new question from the user → do not write. Even if you
|
|
28
|
+
are completely sure you understand, you must still write the plan out
|
|
29
|
+
and wait — "this is obvious enough to skip asking" is never a valid
|
|
30
|
+
reason. Writing docs is a writing action — it is under the same
|
|
31
|
+
discipline.
|
|
22
32
|
2. **Design.** Write the design document in `docs/` (problem statement,
|
|
23
33
|
solution approach, full affected-file list, verifiable acceptance criteria).
|
|
24
34
|
Do NOT open any code file for editing before this document exists.
|
package/src/prompts/explore.md
CHANGED
|
@@ -15,3 +15,8 @@ Guidelines:
|
|
|
15
15
|
- Complete the search efficiently and report findings in a structured format
|
|
16
16
|
- If the expected pattern doesn't exist, report that explicitly: what you searched for, which tools you used, and that nothing matched. "Probably there" is not a finding — only report what you actually saw.
|
|
17
17
|
- If something is ambiguous, note it in your report; do not ask the user
|
|
18
|
+
|
|
19
|
+
**Thoroughness levels** — pick the depth the task actually needs (the parent agent may state one in the task description):
|
|
20
|
+
- quick — a single targeted search answering one specific question
|
|
21
|
+
- medium — the default: a moderate multi-pronged search, several probes in parallel
|
|
22
|
+
- thorough — exhaustive analysis across multiple locations and naming conventions; your report must list what you searched for and what you did NOT find
|
package/src/prompts/main.md
CHANGED
|
@@ -10,6 +10,7 @@ For tasks that match the Coding discipline's "complex" tier, plan mode is your d
|
|
|
10
10
|
|
|
11
11
|
Delegate well — spawn subagents for independent subtasks.
|
|
12
12
|
- Explore agents for parallel codebase search, plan agents for architecture design, coder agents for self-contained implementation.
|
|
13
|
+
- When delegating an explore agent, state the thoroughness in the task description — quick / medium / thorough — graded by need; unspecified means the default.
|
|
13
14
|
- Delegate breadth-first exploration; do precision edits yourself.
|
|
14
15
|
- Never give parallel subagents tasks that edit the same files — conflicts waste everyone's time.
|
|
15
16
|
- When a coder subagent finishes, verify its report: read the files it claims to have changed, run the tests — do not trust subagent reports blindly.
|
package/src/prompts/system.md
CHANGED
|
@@ -10,7 +10,9 @@ Programming is collaborative labor between you and the human. The human decides
|
|
|
10
10
|
- **Read design docs first.** Use `doc_search` to find relevant design docs, AGENTS.md, and architecture decisions. Code without design context is guesswork. If docs conflict with code, docs are right. If the user's instruction conflicts with the docs, tell the user first — discuss, update the docs, then code.
|
|
11
11
|
- **Check existing code.** Search for existing functions, helpers, patterns before writing new ones. Duplicates are technical debt.
|
|
12
12
|
- **Understand intent.** Ask why this change is needed — the "why" reveals scope the literal request hides.
|
|
13
|
-
- **Confirm understanding.** State what you believe the user asked for and what you plan to deliver. Wait for confirmation. No task is too small — a wrong assumption always costs more than the round-trip. Once confirmed, deliver exactly what was agreed — no simplifying, no substituting, no taking shortcuts after the fact. Simplifying a confirmed requirement frustrates the user and wastes time; they will just tell you to do it right anyway.
|
|
13
|
+
- **Confirm understanding.** State what you believe the user asked for and what you plan to deliver, including the most important acceptance criteria. Wait for confirmation. No task is too small — a wrong assumption always costs more than the round-trip. Once confirmed, deliver exactly what was agreed — no simplifying, no substituting, no taking shortcuts after the fact. Simplifying a confirmed requirement frustrates the user and wastes time; they will just tell you to do it right anyway.
|
|
14
|
+
- **Confirm before any file-writing action — no exemptions.** Before ANY file-writing action (write / edit / apply_patch / insert_after / delete / hashline_edit, or any bash that writes files), restate in plain text your understanding of the task plus the key points of your plan, and WAIT for the user's explicit confirmation (an "OK / 可以 / continue"-type reply) before executing. No confirmation, silence, or the user answering with a new question or a new requirement → do not touch anything, no matter how small or obvious the change seems. Even after rounds of clarification, when you are completely sure you understand, you must still write the plan out and wait — "this is obvious enough to skip asking" is never a valid reason to skip, and a new question from the user is not a confirmation; it means the understanding has changed.
|
|
15
|
+
- **Re-confirm when the requirement changes.** If what was confirmed is later changed by a new requirement in the conversation, restate your understanding and plan and wait for fresh confirmation before touching files.
|
|
14
16
|
|
|
15
17
|
**How you work — while coding:**
|
|
16
18
|
- When you need multiple independent pieces of information, call tools in parallel — read files, search, grep all at once.
|
package/src/tui/agent-turn.mjs
CHANGED
|
@@ -94,7 +94,7 @@ export async function runAgentTurn(ctx, text) {
|
|
|
94
94
|
const callbacks = {
|
|
95
95
|
onToken: (t) => {
|
|
96
96
|
// Subagent streaming: prefix format role#id/ → extract id, update subTask streaming text
|
|
97
|
-
const subMatch = t.match(/^(\w+)#(\d+)\//)
|
|
97
|
+
const subMatch = t.match(/^([\w-]+)#(\d+)\//)
|
|
98
98
|
if (subMatch) {
|
|
99
99
|
const key = `${subMatch[1]}#${subMatch[2]}`
|
|
100
100
|
const payload = t.slice(subMatch[0].length)
|
|
@@ -114,7 +114,7 @@ export async function runAgentTurn(ctx, text) {
|
|
|
114
114
|
},
|
|
115
115
|
onReasoning: (t) => {
|
|
116
116
|
// Subagent reasoning tokens also carry role#id/ prefix, go into subTasks panel
|
|
117
|
-
const subMatch = t.match(/^(\w+)#(\d+)\//)
|
|
117
|
+
const subMatch = t.match(/^([\w-]+)#(\d+)\//)
|
|
118
118
|
if (subMatch) {
|
|
119
119
|
const key = `${subMatch[1]}#${subMatch[2]}`
|
|
120
120
|
if (!state.subTasks[key]) {
|
|
@@ -129,7 +129,7 @@ export async function runAgentTurn(ctx, text) {
|
|
|
129
129
|
},
|
|
130
130
|
onToolCall: (name, args) => {
|
|
131
131
|
// Subagent tool call: prefix role#id/toolName → update subTask current tool
|
|
132
|
-
const subMatch = name.match(/^(\w+)#(\d+)\//)
|
|
132
|
+
const subMatch = name.match(/^([\w-]+)#(\d+)\//)
|
|
133
133
|
if (subMatch) {
|
|
134
134
|
const key = `${subMatch[1]}#${subMatch[2]}`
|
|
135
135
|
const toolName = name.slice(subMatch[0].length)
|
package/src/tui/cmd-advisor.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** /advisor command:
|
|
1
|
+
/** /advisor command: configure review model/thinking and toggle the review guard.
|
|
2
2
|
* Interactive loop UX — stays in menu after each action, Esc to exit.
|
|
3
3
|
* ctx: { agent, showPicker, pushLine, pushLabel, persistRaw } */
|
|
4
4
|
import { ansi, C } from "./ansi.mjs"
|
|
@@ -6,6 +6,9 @@ import { ansi, C } from "./ansi.mjs"
|
|
|
6
6
|
export async function handleAdvisorCommand(ctx) {
|
|
7
7
|
const { agent, showPicker, pushLine, pushLabel } = ctx
|
|
8
8
|
const cfg = agent.config.advisor ??= {}
|
|
9
|
+
// Deprecated field cleanup (2026-08-21): advisor.enabled is no longer read
|
|
10
|
+
// anywhere; drop it here so persist() never re-writes the stale flag.
|
|
11
|
+
delete cfg.enabled
|
|
9
12
|
|
|
10
13
|
const persist = async () => {
|
|
11
14
|
if (ctx.persistRaw) {
|
|
@@ -21,13 +24,12 @@ export async function handleAdvisorCommand(ctx) {
|
|
|
21
24
|
|
|
22
25
|
// ── State helpers ──
|
|
23
26
|
function advisorStatus() {
|
|
24
|
-
const enabled = cfg.enabled === true
|
|
25
27
|
const curModel = cfg.model || agent.provider.model
|
|
26
28
|
const thinkInfo = cfg.thinking === null ? "off"
|
|
27
29
|
: cfg.thinking?.type === "disabled" ? "off"
|
|
28
30
|
: cfg.reasoningEffort ? `on (${cfg.reasoningEffort})`
|
|
29
31
|
: cfg.thinking ? `on (${cfg.thinking.type})` : "(main)"
|
|
30
|
-
return `Advisor:
|
|
32
|
+
return `Advisor: always available | Model: ${curModel} | Think: ${thinkInfo}`
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
function headerLine() {
|
|
@@ -105,14 +107,12 @@ export async function handleAdvisorCommand(ctx) {
|
|
|
105
107
|
// ── Main loop ──
|
|
106
108
|
let mainIdx = 0
|
|
107
109
|
for (;;) {
|
|
108
|
-
const enabled = cfg.enabled === true
|
|
109
110
|
const curProvider = cfg.provider || "(main)"
|
|
110
111
|
const curModel = cfg.model || agent.provider.model
|
|
111
112
|
const guardInfo = cfg.guard === true ? "on" : "off"
|
|
112
113
|
|
|
113
114
|
const entries = [
|
|
114
115
|
{ type: "header", text: headerLine() },
|
|
115
|
-
{ type: "item", text: `Advisor: ${enabled ? "ON" : "OFF"}`, action: "toggle" },
|
|
116
116
|
{ type: "item", text: `Model: ${curModel}`, action: "model", note: `Provider: ${curProvider}` },
|
|
117
117
|
{ type: "item", text: `Thinking: ${advisorStatus().split("|")[2]?.trim() || "(main)"}`, action: "thinking" },
|
|
118
118
|
{ type: "item", text: `Guard: ${guardInfo}`, action: "guard" },
|
|
@@ -125,21 +125,13 @@ export async function handleAdvisorCommand(ctx) {
|
|
|
125
125
|
|
|
126
126
|
if (choice.action === "view") {
|
|
127
127
|
pushLabel("❯ Advisor", ansi.bold + C.tool)
|
|
128
|
-
pushLine(`Status:
|
|
128
|
+
pushLine(`Status: always available`, C.dim)
|
|
129
129
|
pushLine(`Model: ${curModel} (provider: ${curProvider})`, C.dim)
|
|
130
130
|
pushLine(`Guard: ${guardInfo}`, C.dim)
|
|
131
131
|
pushLine(`Thinking: ${advisorStatus().split("|")[2]?.trim() || "(main)"}`, C.dim)
|
|
132
132
|
continue
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
if (choice.action === "toggle") {
|
|
136
|
-
cfg.enabled = !cfg.enabled
|
|
137
|
-
await persist().catch(err => pushLine(`[error] Advisor toggle: ${err.message}`, C.error))
|
|
138
|
-
pushLabel("❯ Advisor", ansi.bold + C.tool)
|
|
139
|
-
pushLine(`Advisor: ${cfg.enabled ? "ON" : "OFF"}`, C.tool)
|
|
140
|
-
continue
|
|
141
|
-
}
|
|
142
|
-
|
|
143
135
|
if (choice.action === "guard") {
|
|
144
136
|
cfg.guard = !(cfg.guard === true)
|
|
145
137
|
await persist().catch(err => pushLine(`[error] ${err.message}`, C.error))
|
package/src/tui/render-frame.mjs
CHANGED
|
@@ -268,9 +268,9 @@ export function renderStatus(state, agent, cols, slashCommands) {
|
|
|
268
268
|
const statusLine = buildStatusLine(state, agent, { cols, slashCommands })
|
|
269
269
|
const autoBanner = agent.autoApprove ? `${C.warn} AUTO${ansi.reset}${ansi.dim}│` : ""
|
|
270
270
|
const planBanner = agent.planMode ? `${C.tool} PLAN${ansi.reset}${ansi.dim}│` : ""
|
|
271
|
-
const advisorBanner = agent.config?.advisor?.
|
|
271
|
+
const advisorBanner = agent.config?.advisor?.guard === true ? `${C.advisor} GUARD${ansi.reset}${ansi.dim}│` : ""
|
|
272
272
|
const engBanner = agent.config?.agent?.engineering ? `${C.advisor} ENG${ansi.reset}${ansi.dim}│` : ""
|
|
273
|
-
const bannerPrefix = (agent.planMode ? " PLAN│ " : "") + (agent.autoApprove ? " AUTO│ " : "") + (agent.config?.advisor?.
|
|
273
|
+
const bannerPrefix = (agent.planMode ? " PLAN│ " : "") + (agent.autoApprove ? " AUTO│ " : "") + (agent.config?.advisor?.guard === true ? " GUARD│ " : "") + (agent.config?.agent?.engineering ? " ENG│ " : "")
|
|
274
274
|
const statusMax = cols - 1 - (bannerPrefix ? stringWidth(bannerPrefix) : 0)
|
|
275
275
|
return `${ansi.dim}${planBanner}${autoBanner}${advisorBanner}${engBanner}${sliceByWidth(statusLine, Math.max(10, statusMax))}${ansi.reset}`
|
|
276
276
|
}
|