reevesagents 2.2.0 → 2.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/CHANGELOG.md +22 -0
- package/README.md +5 -10
- package/dist/{chunk-QWI77WYQ.js → chunk-BHUY46Z3.js} +3 -3
- package/dist/{chunk-3ALQMRN6.js → chunk-ETUW7JDR.js} +2 -2
- package/dist/{chunk-I54VATHO.js → chunk-H7HEBQDW.js} +4 -2
- package/dist/{chunk-KZRUGMML.js → chunk-IKWMNWP4.js} +266 -20
- package/dist/{chunk-3RDILV4F.js → chunk-Q4PR3NOT.js} +2 -2
- package/dist/{chunk-HCLKJS4S.js → chunk-T3KAXZJK.js} +3 -3
- package/dist/{chunk-DQKP7LSP.js → chunk-VNACTZPD.js} +34 -8
- package/dist/{chunk-RBLMXDCV.js → chunk-ZED5YGNK.js} +2 -2
- package/dist/chunk-ZNOYXAJO.js +225 -0
- package/dist/cli.js +10 -10
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2 -2
- package/dist/{router-2KZWMLZR.js → router-GGZMVGO7.js} +11 -7
- package/dist/{server-OXNRGXWX.js → server-4DQ7LMRT.js} +322 -11
- package/dist/{server-6DUIO733.js → server-IMN4GWAU.js} +9 -5
- package/dist/{tui-launch-BYUJ2Z6R.js → tui-launch-EZMMQS7K.js} +2 -2
- package/dist/web/app.css +74 -0
- package/dist/web/app.js +230 -41
- package/dist/web/index.html +3 -1
- package/dist/web/insights-core.js +5 -3
- package/package.json +8 -7
|
@@ -3959,14 +3959,18 @@ function windowInSession(driver, session, windowId) {
|
|
|
3959
3959
|
return false;
|
|
3960
3960
|
}
|
|
3961
3961
|
}
|
|
3962
|
-
function
|
|
3963
|
-
if (!session
|
|
3962
|
+
function sessionPaneIds(driver, session) {
|
|
3963
|
+
if (!session) return [];
|
|
3964
3964
|
try {
|
|
3965
|
-
return driver.tmux(["list-panes", "-s", "-t", exactSession(session), "-F", "#{pane_id}"]).split("\n").
|
|
3965
|
+
return driver.tmux(["list-panes", "-s", "-t", exactSession(session), "-F", "#{pane_id}"]).split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
3966
3966
|
} catch {
|
|
3967
|
-
return
|
|
3967
|
+
return [];
|
|
3968
3968
|
}
|
|
3969
3969
|
}
|
|
3970
|
+
function paneInSession(driver, session, paneId) {
|
|
3971
|
+
if (!session || !paneId) return false;
|
|
3972
|
+
return sessionPaneIds(driver, session).includes(paneId);
|
|
3973
|
+
}
|
|
3970
3974
|
|
|
3971
3975
|
// src/core/runs.ts
|
|
3972
3976
|
function runsDir() {
|
|
@@ -4101,6 +4105,17 @@ function normalizeRunHistory(raw) {
|
|
|
4101
4105
|
root_provider: isProvider(raw.root_provider) ? raw.root_provider : null
|
|
4102
4106
|
};
|
|
4103
4107
|
}
|
|
4108
|
+
function normalizeAttention(value) {
|
|
4109
|
+
if (typeof value !== "object" || value === null) return null;
|
|
4110
|
+
const raw = value;
|
|
4111
|
+
const reason = raw.reason;
|
|
4112
|
+
if (reason !== "approval" && reason !== "input" && reason !== "question") return null;
|
|
4113
|
+
return {
|
|
4114
|
+
reason,
|
|
4115
|
+
detail: asString(raw.detail),
|
|
4116
|
+
since: asString(raw.since, nowIso())
|
|
4117
|
+
};
|
|
4118
|
+
}
|
|
4104
4119
|
function normalizeAgent(raw) {
|
|
4105
4120
|
const id = asString(raw.id);
|
|
4106
4121
|
return {
|
|
@@ -4122,6 +4137,7 @@ function normalizeAgent(raw) {
|
|
|
4122
4137
|
permissions: normalizePermissions(raw.permissions),
|
|
4123
4138
|
headless: raw.headless === true,
|
|
4124
4139
|
inbox: normalizeInbox(raw.inbox),
|
|
4140
|
+
attention: normalizeAttention(raw.attention),
|
|
4125
4141
|
last_seen: typeof raw.last_seen === "number" ? raw.last_seen : 0,
|
|
4126
4142
|
started_at: asString(raw.started_at, nowIso()),
|
|
4127
4143
|
ended_at: asNullableString(raw.ended_at)
|
|
@@ -4132,7 +4148,10 @@ function redactAgent(agent) {
|
|
|
4132
4148
|
...agent,
|
|
4133
4149
|
task: redactSecrets(agent.task),
|
|
4134
4150
|
task_note: redactSecrets(agent.task_note),
|
|
4135
|
-
inbox: agent.inbox.map((message) => ({ ...message, text: redactSecrets(message.text) }))
|
|
4151
|
+
inbox: agent.inbox.map((message) => ({ ...message, text: redactSecrets(message.text) })),
|
|
4152
|
+
// The attention detail is captured pane text: an approval prompt carries the command
|
|
4153
|
+
// line, so it can hold a key pasted into the agent's own prompt.
|
|
4154
|
+
attention: agent.attention ? { ...agent.attention, detail: redactSecrets(agent.attention.detail) } : agent.attention
|
|
4136
4155
|
};
|
|
4137
4156
|
}
|
|
4138
4157
|
function writeRunUnlocked(run) {
|
|
@@ -5705,8 +5724,11 @@ var SIGNALS = {
|
|
|
5705
5724
|
busy: [/enter\s+(?:чтобы\s+)?прервать/i, /esc\s+to\s+interrupt/i],
|
|
5706
5725
|
// Idle input box, drawn as "❯ <text or placeholder>" above the status line.
|
|
5707
5726
|
// A bare prompt (no text typed yet) trims to "❯", so the marker allows end of line.
|
|
5708
|
-
|
|
5709
|
-
|
|
5727
|
+
// A non-default Hermes profile prepends its name to the glyph (`dev ❯ …`), so that token is
|
|
5728
|
+
// optional: without it a flow whose dev runs under `--profile` reads as 'unknown' and holds
|
|
5729
|
+
// before every dispatch.
|
|
5730
|
+
idle: [/^\s*(?:[a-z0-9][a-z0-9_-]{0,63}\s+)?❯(?:\s|$)/m],
|
|
5731
|
+
marker: /^\s*(?:[a-z0-9][a-z0-9_-]{0,63}\s+)?❯\s?/
|
|
5710
5732
|
},
|
|
5711
5733
|
codex: {
|
|
5712
5734
|
// Status line while a turn runs: "◦ Working (8s • esc to interrupt)".
|
|
@@ -7493,6 +7515,7 @@ export {
|
|
|
7493
7515
|
tmuxCommand,
|
|
7494
7516
|
execTmux,
|
|
7495
7517
|
spawnTmux,
|
|
7518
|
+
realDriver,
|
|
7496
7519
|
exactSession,
|
|
7497
7520
|
tmuxAvailable,
|
|
7498
7521
|
sessionExists,
|
|
@@ -7507,6 +7530,7 @@ export {
|
|
|
7507
7530
|
sessionInGroup,
|
|
7508
7531
|
windowIds,
|
|
7509
7532
|
windowByName,
|
|
7533
|
+
sessionPaneIds,
|
|
7510
7534
|
parseSpecJson,
|
|
7511
7535
|
specFromMarkdown,
|
|
7512
7536
|
formatSpecIssues,
|
|
@@ -7515,6 +7539,7 @@ export {
|
|
|
7515
7539
|
isCommitId,
|
|
7516
7540
|
findingsText,
|
|
7517
7541
|
countFindings,
|
|
7542
|
+
validateNotesText,
|
|
7518
7543
|
ensureNotesInbox,
|
|
7519
7544
|
readNewestNotes,
|
|
7520
7545
|
readDurable,
|
|
@@ -7595,6 +7620,7 @@ export {
|
|
|
7595
7620
|
deleteRunHistory,
|
|
7596
7621
|
computeRunStatus,
|
|
7597
7622
|
readAgent,
|
|
7623
|
+
updateAgent,
|
|
7598
7624
|
tryListAgents,
|
|
7599
7625
|
archiveAndRemoveRun,
|
|
7600
7626
|
listAgents,
|
|
@@ -7657,4 +7683,4 @@ export {
|
|
|
7657
7683
|
checkTmux,
|
|
7658
7684
|
runDoctor
|
|
7659
7685
|
};
|
|
7660
|
-
//# sourceMappingURL=chunk-
|
|
7686
|
+
//# sourceMappingURL=chunk-VNACTZPD.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
PROVIDER_DEFS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VNACTZPD.js";
|
|
5
5
|
|
|
6
6
|
// src/core/model-catalog.ts
|
|
7
7
|
var PROVIDER_DEFAULT_MODEL = "";
|
|
@@ -27,4 +27,4 @@ export {
|
|
|
27
27
|
modelDisplayName,
|
|
28
28
|
modelSourceForProvider
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-ZED5YGNK.js.map
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
execTmux,
|
|
4
|
+
listAgents,
|
|
5
|
+
listRuns,
|
|
6
|
+
realDriver,
|
|
7
|
+
redactSecrets,
|
|
8
|
+
sessionPaneIds,
|
|
9
|
+
updateAgent
|
|
10
|
+
} from "./chunk-VNACTZPD.js";
|
|
11
|
+
|
|
12
|
+
// src/core/attention.ts
|
|
13
|
+
var SCAN_LINES = 40;
|
|
14
|
+
var BOX_CORNER = /[╭╰]/;
|
|
15
|
+
var NUMBERED_OPTION = /^\s*[│┃|]\s*(?:❯\s*)?\d+\.\s+\S/;
|
|
16
|
+
var NAV_HINT = /↑\/↓/;
|
|
17
|
+
var ANSWER_COUNTDOWN = /\(\s*\d+\s*s\s*\)/;
|
|
18
|
+
var APPROVAL_WORDS = [
|
|
19
|
+
"approv",
|
|
20
|
+
"approb",
|
|
21
|
+
"\u043E\u0434\u043E\u0431\u0440",
|
|
22
|
+
"\u0440\u0430\u0437\u0440\u0435\u0448",
|
|
23
|
+
"\u043E\u0442\u043A\u043B\u043E\u043D",
|
|
24
|
+
"\u043E\u043F\u0430\u0441\u043D",
|
|
25
|
+
"genehmig",
|
|
26
|
+
"freigabe",
|
|
27
|
+
"aprob",
|
|
28
|
+
"onay",
|
|
29
|
+
"\u0627\u0644\u0645\u0648\u0627\u0641\u0642",
|
|
30
|
+
"\u6279\u51C6",
|
|
31
|
+
"\u5371\u9669",
|
|
32
|
+
"consent",
|
|
33
|
+
"dangerous",
|
|
34
|
+
"risky",
|
|
35
|
+
"pericoloso",
|
|
36
|
+
"rischioso",
|
|
37
|
+
"tehlike"
|
|
38
|
+
];
|
|
39
|
+
var QUESTION_WORDS = [
|
|
40
|
+
"\u0432\u043E\u043F\u0440\u043E\u0441",
|
|
41
|
+
"question",
|
|
42
|
+
"frage",
|
|
43
|
+
"pregunta",
|
|
44
|
+
"pergunta",
|
|
45
|
+
"domanda",
|
|
46
|
+
"soru",
|
|
47
|
+
"\u95EE\u9898",
|
|
48
|
+
"\u0633\u0624\u0627\u0644"
|
|
49
|
+
];
|
|
50
|
+
function stripAnsi(text) {
|
|
51
|
+
return text.replace(/\u001b\][^\u0007]*\u0007/g, "").replace(/\u001b\[[0-9;?]*[ -/]*[@-~]/g, "").replace(/\r/g, "");
|
|
52
|
+
}
|
|
53
|
+
function cleanBoxLine(line) {
|
|
54
|
+
return line.replace(/^[\s│┃|╭╮╰╯─━═]+/, "").replace(/[\s│┃|╭╮╰╯─━═]+$/, "").trim();
|
|
55
|
+
}
|
|
56
|
+
function truncate(text, max = 140) {
|
|
57
|
+
return text.length > max ? `${text.slice(0, max - 1)}\u2026` : text;
|
|
58
|
+
}
|
|
59
|
+
function sanitizeDetail(text) {
|
|
60
|
+
return truncate(redactSecrets(text));
|
|
61
|
+
}
|
|
62
|
+
function containsAny(haystack, needles) {
|
|
63
|
+
const lower = haystack.toLowerCase();
|
|
64
|
+
return needles.some((needle) => lower.includes(needle));
|
|
65
|
+
}
|
|
66
|
+
function detectHermesAttention(paneText) {
|
|
67
|
+
const lines = stripAnsi(paneText).split("\n");
|
|
68
|
+
while (lines.length > 0 && (lines[lines.length - 1] ?? "").trim() === "") lines.pop();
|
|
69
|
+
const tail = lines.slice(-SCAN_LINES);
|
|
70
|
+
const text = tail.join("\n");
|
|
71
|
+
const hasModal = BOX_CORNER.test(text) && tail.some((line) => NUMBERED_OPTION.test(line)) && NAV_HINT.test(text) && ANSWER_COUNTDOWN.test(text);
|
|
72
|
+
if (hasModal) {
|
|
73
|
+
const optionIndex = tail.findIndex((line) => NUMBERED_OPTION.test(line));
|
|
74
|
+
let bodyStart = 0;
|
|
75
|
+
for (let i = (optionIndex === -1 ? tail.length : optionIndex) - 1; i >= 0; i -= 1) {
|
|
76
|
+
if (BOX_CORNER.test(tail[i] ?? "")) {
|
|
77
|
+
bodyStart = i + 1;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const body = tail.slice(bodyStart, optionIndex === -1 ? tail.length : optionIndex).map(cleanBoxLine).filter((line) => line.length > 0 && !line.startsWith("\u26A0"));
|
|
82
|
+
const detail = body.length > 0 ? body[body.length - 1] : "";
|
|
83
|
+
const bodyText = body.join(" ");
|
|
84
|
+
const asksQuestion = bodyText.includes("?") || bodyText.includes("\uFF1F");
|
|
85
|
+
const reason = asksQuestion ? "input" : containsAny(text, APPROVAL_WORDS) ? "approval" : containsAny(text, QUESTION_WORDS) ? "input" : "approval";
|
|
86
|
+
return { reason, detail: sanitizeDetail(detail) };
|
|
87
|
+
}
|
|
88
|
+
if (/BLOCKED:\s*Command was not approved/i.test(text)) {
|
|
89
|
+
return { reason: "approval", detail: sanitizeDetail("command was blocked, no approval could be delivered") };
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
var CODEX_PROMPT_QUESTION = /Would you like to run the following command\?/i;
|
|
94
|
+
var CODEX_PROMPT_HINT = /Press enter to confirm or esc to cancel/i;
|
|
95
|
+
var CODEX_SELECTED_OPTION = /^\s*[›>]\s*\d+\.\s+\S/;
|
|
96
|
+
var CODEX_OPTION = /^\s*\d+\.\s+\S/;
|
|
97
|
+
function lastIndexOfLine(lines, pattern, limit = lines.length) {
|
|
98
|
+
for (let index = Math.min(limit, lines.length) - 1; index >= 0; index -= 1) {
|
|
99
|
+
if (pattern.test(lines[index] ?? "")) return index;
|
|
100
|
+
}
|
|
101
|
+
return -1;
|
|
102
|
+
}
|
|
103
|
+
function detectCodexAttention(paneText) {
|
|
104
|
+
const lines = stripAnsi(paneText).split("\n");
|
|
105
|
+
while (lines.length > 0 && (lines[lines.length - 1] ?? "").trim() === "") lines.pop();
|
|
106
|
+
const tail = lines.slice(-SCAN_LINES);
|
|
107
|
+
const text = tail.join("\n");
|
|
108
|
+
const trimmed = tail.map((line) => line.trim());
|
|
109
|
+
const isChoiceList = trimmed.some((line) => CODEX_SELECTED_OPTION.test(line)) && trimmed.some((line) => CODEX_OPTION.test(line)) && CODEX_PROMPT_HINT.test(text);
|
|
110
|
+
if (!isChoiceList) return null;
|
|
111
|
+
const choicesAt = lastIndexOfLine(trimmed, CODEX_SELECTED_OPTION);
|
|
112
|
+
const questionAt = lastIndexOfLine(trimmed, CODEX_PROMPT_QUESTION, choicesAt);
|
|
113
|
+
if (questionAt === -1) return { reason: "approval", detail: "codex is waiting for command approval" };
|
|
114
|
+
const prompt = trimmed.slice(questionAt + 1, choicesAt);
|
|
115
|
+
const command = prompt.find((line) => line.startsWith("$ ") && line.length > 2);
|
|
116
|
+
const reason = prompt.find((line) => line.startsWith("Reason:"));
|
|
117
|
+
const detail = command ?? reason ?? "codex is waiting for command approval";
|
|
118
|
+
return { reason: "approval", detail: sanitizeDetail(detail) };
|
|
119
|
+
}
|
|
120
|
+
var OPENCODE_PROMPT_TITLE = /Permission required/i;
|
|
121
|
+
var OPENCODE_ALLOW_ONCE = /Allow once/i;
|
|
122
|
+
var OPENCODE_REJECT = /Reject\b/i;
|
|
123
|
+
function detectOpencodeAttention(paneText) {
|
|
124
|
+
const lines = stripAnsi(paneText).split("\n");
|
|
125
|
+
while (lines.length > 0 && (lines[lines.length - 1] ?? "").trim() === "") lines.pop();
|
|
126
|
+
const tail = lines.slice(-SCAN_LINES);
|
|
127
|
+
const text = tail.join("\n");
|
|
128
|
+
if (!OPENCODE_PROMPT_TITLE.test(text) || !OPENCODE_ALLOW_ONCE.test(text) || !OPENCODE_REJECT.test(text)) return null;
|
|
129
|
+
const trimmed = tail.map((line) => cleanBoxLine(line));
|
|
130
|
+
const buttonsAt = lastIndexOfLine(trimmed, OPENCODE_ALLOW_ONCE);
|
|
131
|
+
const titleAt = lastIndexOfLine(trimmed, OPENCODE_PROMPT_TITLE, buttonsAt);
|
|
132
|
+
if (titleAt === -1) return { reason: "approval", detail: "opencode is waiting for permission" };
|
|
133
|
+
const dialog = trimmed.slice(titleAt + 1, buttonsAt);
|
|
134
|
+
const command = dialog.find((line) => line.startsWith("$ ") && line.length > 2);
|
|
135
|
+
const kind = dialog.find((line) => line.startsWith("#"));
|
|
136
|
+
const detail = command ?? kind ?? "opencode is waiting for permission";
|
|
137
|
+
return { reason: "approval", detail: sanitizeDetail(detail) };
|
|
138
|
+
}
|
|
139
|
+
var DETECTORS = {
|
|
140
|
+
hermes: detectHermesAttention,
|
|
141
|
+
codex: detectCodexAttention,
|
|
142
|
+
opencode: detectOpencodeAttention
|
|
143
|
+
};
|
|
144
|
+
function detectAgentAttention(agent, paneText) {
|
|
145
|
+
const detector = DETECTORS[agent.provider];
|
|
146
|
+
if (!detector) return null;
|
|
147
|
+
return detector(paneText);
|
|
148
|
+
}
|
|
149
|
+
function nextAttentionState(previous, detected, at) {
|
|
150
|
+
if (!detected) return null;
|
|
151
|
+
if (previous && previous.reason === detected.reason && previous.detail === detected.detail) return previous;
|
|
152
|
+
return { reason: detected.reason, detail: detected.detail, since: at };
|
|
153
|
+
}
|
|
154
|
+
function defaultCapture(paneId) {
|
|
155
|
+
return execTmux(["capture-pane", "-p", "-S", String(-SCAN_LINES), "-t", paneId]);
|
|
156
|
+
}
|
|
157
|
+
function defaultSessionPanes(session) {
|
|
158
|
+
return sessionPaneIds(realDriver, session);
|
|
159
|
+
}
|
|
160
|
+
var lastSweepAt = 0;
|
|
161
|
+
function sweepAttention(options = {}) {
|
|
162
|
+
const capture = options.capture ?? defaultCapture;
|
|
163
|
+
const now = options.now ? options.now() : /* @__PURE__ */ new Date();
|
|
164
|
+
const at = now.toISOString();
|
|
165
|
+
const listRunsFn = options.runs ?? listRuns;
|
|
166
|
+
const listAgentsFn = options.agents ?? listAgents;
|
|
167
|
+
const update = options.update ?? updateAgent;
|
|
168
|
+
const panesBySession = /* @__PURE__ */ new Map();
|
|
169
|
+
const paneBelongsToAgent = (session, paneId) => {
|
|
170
|
+
if (options.paneInSession) return options.paneInSession(session, paneId);
|
|
171
|
+
let panes = panesBySession.get(session);
|
|
172
|
+
if (panes === void 0) {
|
|
173
|
+
panes = (options.sessionPanes ?? defaultSessionPanes)(session);
|
|
174
|
+
panesBySession.set(session, panes);
|
|
175
|
+
}
|
|
176
|
+
return panes.includes(paneId);
|
|
177
|
+
};
|
|
178
|
+
let changed = 0;
|
|
179
|
+
for (const run of listRunsFn()) {
|
|
180
|
+
if (run.ended_at) continue;
|
|
181
|
+
let agents;
|
|
182
|
+
try {
|
|
183
|
+
agents = listAgentsFn(run.id);
|
|
184
|
+
} catch {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
for (const agent of agents) {
|
|
188
|
+
const previous = agent.attention ?? null;
|
|
189
|
+
let detected = null;
|
|
190
|
+
if (!agent.ended_at && !agent.headless && agent.tmux_pane_id && paneBelongsToAgent(agent.tmux_session, agent.tmux_pane_id)) {
|
|
191
|
+
let paneText;
|
|
192
|
+
try {
|
|
193
|
+
paneText = capture(agent.tmux_pane_id);
|
|
194
|
+
} catch {
|
|
195
|
+
paneText = "";
|
|
196
|
+
}
|
|
197
|
+
const raw = detectAgentAttention(agent, paneText);
|
|
198
|
+
detected = raw ? { reason: raw.reason, detail: redactSecrets(raw.detail) } : null;
|
|
199
|
+
}
|
|
200
|
+
const next = nextAttentionState(previous, detected, at);
|
|
201
|
+
if (next?.reason === previous?.reason && next?.detail === previous?.detail && next?.since === previous?.since) {
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
if (next === null && previous === null) continue;
|
|
205
|
+
try {
|
|
206
|
+
update(run.id, agent.id, { attention: next });
|
|
207
|
+
changed += 1;
|
|
208
|
+
} catch {
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
lastSweepAt = now.getTime();
|
|
213
|
+
return changed;
|
|
214
|
+
}
|
|
215
|
+
function sweepAttentionThrottled(options = {}) {
|
|
216
|
+
const nowMs = options.now ? options.now().getTime() : Date.now();
|
|
217
|
+
const throttleMs = options.throttleMs ?? 1500;
|
|
218
|
+
if (nowMs - lastSweepAt < throttleMs) return 0;
|
|
219
|
+
return sweepAttention(options);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export {
|
|
223
|
+
sweepAttentionThrottled
|
|
224
|
+
};
|
|
225
|
+
//# sourceMappingURL=chunk-ZNOYXAJO.js.map
|
package/dist/cli.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
runOnboarding,
|
|
5
5
|
suggestedAgentPrompt,
|
|
6
6
|
writeTuiOpenToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ETUW7JDR.js";
|
|
8
8
|
import {
|
|
9
9
|
startFlow
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T3KAXZJK.js";
|
|
11
11
|
import {
|
|
12
12
|
installSkills,
|
|
13
13
|
removeSkills,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-QIHT27ZG.js";
|
|
16
16
|
import {
|
|
17
17
|
MODEL_CATALOG
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZED5YGNK.js";
|
|
19
19
|
import {
|
|
20
20
|
addFlowSpecs,
|
|
21
21
|
applyPlanMarks,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
roundIsLive,
|
|
30
30
|
stepFlow,
|
|
31
31
|
stopFlow
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BHUY46Z3.js";
|
|
33
33
|
import {
|
|
34
34
|
REEVESAGENTS_VERSION,
|
|
35
35
|
ackFlowIncident,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
sweepOrphanSessions,
|
|
49
49
|
tickStateText,
|
|
50
50
|
writeTickStatus
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-H7HEBQDW.js";
|
|
52
52
|
import {
|
|
53
53
|
ALLOWED_KEYS,
|
|
54
54
|
CONFIG_FIELDS,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
verifyServerLaunch,
|
|
135
135
|
windowByName,
|
|
136
136
|
windowIds
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-VNACTZPD.js";
|
|
138
138
|
import "./chunk-Q3WWQP2R.js";
|
|
139
139
|
|
|
140
140
|
// src/surfaces/cli/index.ts
|
|
@@ -900,7 +900,7 @@ function registerDetach(program2) {
|
|
|
900
900
|
function registerMcp(program2) {
|
|
901
901
|
program2.command("mcp").description("start the agent control MCP server over stdio (for CLIs that have it attached)").action(async () => {
|
|
902
902
|
try {
|
|
903
|
-
const { startAgentMcpServer } = await import("./server-
|
|
903
|
+
const { startAgentMcpServer } = await import("./server-IMN4GWAU.js");
|
|
904
904
|
await startAgentMcpServer();
|
|
905
905
|
} catch (err) {
|
|
906
906
|
console.error(err instanceof Error ? err.message : String(err));
|
|
@@ -1958,7 +1958,7 @@ async function runWeb(opts) {
|
|
|
1958
1958
|
console.error(webExtrasMessage(extras.missing));
|
|
1959
1959
|
process.exit(1);
|
|
1960
1960
|
}
|
|
1961
|
-
const { startWebServer } = await import("./server-
|
|
1961
|
+
const { startWebServer } = await import("./server-4DQ7LMRT.js");
|
|
1962
1962
|
const parsed = opts.port ? Number.parseInt(opts.port, 10) : void 0;
|
|
1963
1963
|
const handle = await startWebServer({
|
|
1964
1964
|
port: parsed !== void 0 && Number.isFinite(parsed) ? parsed : void 0,
|
|
@@ -2089,12 +2089,12 @@ async function renderTui() {
|
|
|
2089
2089
|
const [{ default: React }, { render }, { Router }] = await Promise.all([
|
|
2090
2090
|
import("react"),
|
|
2091
2091
|
import("ink"),
|
|
2092
|
-
import("./router-
|
|
2092
|
+
import("./router-GGZMVGO7.js")
|
|
2093
2093
|
]);
|
|
2094
2094
|
try {
|
|
2095
2095
|
await render(React.createElement(Router), { alternateScreen: false }).waitUntilExit();
|
|
2096
2096
|
} finally {
|
|
2097
|
-
const { closeTuiWebServer } = await import("./tui-launch-
|
|
2097
|
+
const { closeTuiWebServer } = await import("./tui-launch-EZMMQS7K.js");
|
|
2098
2098
|
await closeTuiWebServer();
|
|
2099
2099
|
}
|
|
2100
2100
|
process.exit(0);
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ type Provider = 'cc' | 'codex' | 'opencode' | 'hermes' | 'kimi' | 'deepseek' | '
|
|
|
2
2
|
type LanguageCode = 'en' | 'de' | 'fr' | 'es' | 'pt' | 'it' | 'tr' | 'ru' | 'zh-Hans' | 'ar';
|
|
3
3
|
type Permissions = 'skip' | 'ask';
|
|
4
4
|
type TaskStatus = 'queued' | 'working' | 'done' | 'failed' | 'blocked';
|
|
5
|
+
type AttentionReason = 'approval' | 'input' | 'question';
|
|
6
|
+
interface AttentionState {
|
|
7
|
+
reason: AttentionReason;
|
|
8
|
+
detail: string;
|
|
9
|
+
since: string;
|
|
10
|
+
}
|
|
5
11
|
type AuthMode = 'default' | 'api-key';
|
|
6
12
|
type Effort = 'default' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
7
13
|
type AgentRole = 'root' | 'worker';
|
|
@@ -59,6 +65,7 @@ interface AgentRecord {
|
|
|
59
65
|
permissions: Permissions;
|
|
60
66
|
headless?: boolean;
|
|
61
67
|
inbox: Message[];
|
|
68
|
+
attention?: AttentionState | null;
|
|
62
69
|
last_seen: number;
|
|
63
70
|
started_at: string;
|
|
64
71
|
ended_at: string | null;
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
modelDisplayName,
|
|
7
7
|
modelSourceForProvider,
|
|
8
8
|
modelValuesForProvider
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZED5YGNK.js";
|
|
10
10
|
import {
|
|
11
11
|
BIN,
|
|
12
12
|
PROVIDERS,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
startRun,
|
|
40
40
|
stateRoot,
|
|
41
41
|
stopRun
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-VNACTZPD.js";
|
|
43
43
|
import "./chunk-Q3WWQP2R.js";
|
|
44
44
|
export {
|
|
45
45
|
BIN,
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
buildOnboardingState,
|
|
4
4
|
readTuiOpenToken
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ETUW7JDR.js";
|
|
6
6
|
import "./chunk-QIHT27ZG.js";
|
|
7
7
|
import {
|
|
8
8
|
flowAttentionText,
|
|
9
9
|
flowBadgeText,
|
|
10
10
|
translate,
|
|
11
11
|
translatePhrase
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IKWMNWP4.js";
|
|
13
13
|
import {
|
|
14
14
|
modelDisplayName,
|
|
15
15
|
modelValuesForProvider
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZED5YGNK.js";
|
|
17
|
+
import {
|
|
18
|
+
sweepAttentionThrottled
|
|
19
|
+
} from "./chunk-ZNOYXAJO.js";
|
|
17
20
|
import {
|
|
18
21
|
REEVESAGENTS_VERSION,
|
|
19
22
|
flowSectionLines,
|
|
@@ -25,7 +28,7 @@ import {
|
|
|
25
28
|
sameFlowBadges,
|
|
26
29
|
sweepAgentsThrottled,
|
|
27
30
|
sweepOrphanSessionsThrottled
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-H7HEBQDW.js";
|
|
29
32
|
import {
|
|
30
33
|
CONFIG_FIELDS,
|
|
31
34
|
DEFAULT_LANGUAGE,
|
|
@@ -78,11 +81,11 @@ import {
|
|
|
78
81
|
startRunFromPreset,
|
|
79
82
|
stateRoot,
|
|
80
83
|
stopRun
|
|
81
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-VNACTZPD.js";
|
|
82
85
|
import "./chunk-Q3WWQP2R.js";
|
|
83
86
|
import {
|
|
84
87
|
startWebFromTui
|
|
85
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-Q4PR3NOT.js";
|
|
86
89
|
|
|
87
90
|
// src/surfaces/tui/router.tsx
|
|
88
91
|
import { createContext as createContext6, useContext as useContext6, useState as useState37, useCallback as useCallback5, useEffect as useEffect17, useRef as useRef4 } from "react";
|
|
@@ -1223,6 +1226,7 @@ function Runs() {
|
|
|
1223
1226
|
function refresh() {
|
|
1224
1227
|
sweepAgentsThrottled();
|
|
1225
1228
|
sweepOrphanSessionsThrottled();
|
|
1229
|
+
sweepAttentionThrottled();
|
|
1226
1230
|
autoCleanupRuns();
|
|
1227
1231
|
const next = listRuns();
|
|
1228
1232
|
setRuns((prev) => {
|
|
@@ -6731,4 +6735,4 @@ export {
|
|
|
6731
6735
|
nextHistoryOnReset,
|
|
6732
6736
|
useRouter
|
|
6733
6737
|
};
|
|
6734
|
-
//# sourceMappingURL=router-
|
|
6738
|
+
//# sourceMappingURL=router-GGZMVGO7.js.map
|