@epoch-agent/cli 3.2.0 → 4.1.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 +3 -2
- package/dist/index.js +5 -2
- package/dist/tui-entry.js +5 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -117,8 +117,9 @@ ink 一接管 stdin,inquirer 就抢不回来 —— 和信任闸门必须排
|
|
|
117
117
|
而这件事只在它拒绝读某个文件时才露头。「白给」(已经在工作区里了)不算错,
|
|
118
118
|
由运行时报一条诊断
|
|
119
119
|
- `--agent` 名字不认识 → 由 **runtime** 抛 `AgentRoleError`(可用角色都在消息里)。
|
|
120
|
-
故意不在 CLI
|
|
121
|
-
|
|
120
|
+
故意不在 CLI 侧先查一遍:合并之后那张角色表(用户级 / 项目级 / 插件 / 宿主)
|
|
121
|
+
只有 `buildRuntime()` 合并得出来,在这儿再发现一遍等于养第二份逻辑,
|
|
122
|
+
而两份迟早会给出不同答案
|
|
122
123
|
|
|
123
124
|
这三个错误加上 `ManagedPolicyError` 共用 `errors.ts` 里那张 `name → 退出码` 表,
|
|
124
125
|
一律只打一行 message(有 hint 再一行)、**不打 stack**:那段 stack 指向别人包里的
|
package/dist/index.js
CHANGED
|
@@ -2920,13 +2920,15 @@ function createExternalApproval(opts) {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
// src/headless/tasks.ts
|
|
2922
2922
|
import { describeBackgroundTask } from "@epoch-agent/core";
|
|
2923
|
-
import { t as t20 } from "@epoch-agent/infra";
|
|
2923
|
+
import { currentLang, t as t20 } from "@epoch-agent/infra";
|
|
2924
2924
|
function backgroundTaskSummary(all) {
|
|
2925
2925
|
const tasks = all.filter((t41) => t41.kind === "command");
|
|
2926
2926
|
if (tasks.length === 0) return "";
|
|
2927
2927
|
const running = tasks.filter((t41) => t41.status === "running").length;
|
|
2928
2928
|
const head = running > 0 ? t20("background_tasks.head_running", { total: tasks.length, running }) : t20("background_tasks.head_done", { total: tasks.length });
|
|
2929
|
-
return [head, ...tasks.map((
|
|
2929
|
+
return [head, ...tasks.map((task) => ` ${describeBackgroundTask(task, currentLang())}`)].join(
|
|
2930
|
+
"\n"
|
|
2931
|
+
);
|
|
2930
2932
|
}
|
|
2931
2933
|
// src/import-prompt.ts
|
|
2932
2934
|
import {
|
|
@@ -3308,6 +3310,7 @@ async function runOnce(query, opts, resumeId) {
|
|
|
3308
3310
|
sessionId: () => rt?.sessionId,
|
|
3309
3311
|
preauth: (req) => preauthorizedBy(rt?.config.headless, headless, req)
|
|
3310
3312
|
}) : createInteractiveApproval({ permission: () => rt?.permission }),
|
|
3313
|
+
// cli/__tests__/signal-handlers.test.ts
|
|
3311
3314
|
installSignalHandlers: false,
|
|
3312
3315
|
...approver ? { interactive: true } : {},
|
|
3313
3316
|
...headless ? { headless } : {},
|
package/dist/tui-entry.js
CHANGED
|
@@ -456,6 +456,7 @@ import {
|
|
|
456
456
|
suggestRuleFromApproval
|
|
457
457
|
} from "@epoch-agent/core";
|
|
458
458
|
import { pluginsStatePath as pluginsStatePath2, t as t11 } from "@epoch-agent/infra";
|
|
459
|
+
import { stripTurnDigest } from "@epoch-agent/protocol";
|
|
459
460
|
import { listBackgroundTasks } from "@epoch-agent/runtime";
|
|
460
461
|
// src/clipboard.ts
|
|
461
462
|
import { execFile } from "child_process";
|
|
@@ -1543,7 +1544,10 @@ function buildHostActions(runtime, workDir) {
|
|
|
1543
1544
|
...runtime.session ? { compactContext: (instruction) => runtime.session.compact(instruction) } : {},
|
|
1544
1545
|
...runtime.sessions ? {
|
|
1545
1546
|
listSessions: () => runtime.sessions.list(),
|
|
1546
|
-
resumeSession: (sessionId) => runtime.sessions.resume(sessionId)
|
|
1547
|
+
resumeSession: (sessionId) => runtime.sessions.resume(sessionId).map((m) => ({
|
|
1548
|
+
...m,
|
|
1549
|
+
content: stripTurnDigest(m.content)
|
|
1550
|
+
})),
|
|
1547
1551
|
searchSessions: (query) => runtime.sessions.search(query)
|
|
1548
1552
|
} : {},
|
|
1549
1553
|
...runtime.sessionStore ? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epoch-agent/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "epoch-agent CLI 入口",
|
|
6
6
|
"repository": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"commander": "^15.0.0",
|
|
23
23
|
"ink": "^7.1.1",
|
|
24
24
|
"react": "^19.2.8",
|
|
25
|
-
"@epoch-agent/
|
|
26
|
-
"@epoch-agent/core": "
|
|
27
|
-
"@epoch-agent/
|
|
28
|
-
"@epoch-agent/
|
|
29
|
-
"@epoch-agent/
|
|
30
|
-
"@epoch-agent/
|
|
25
|
+
"@epoch-agent/protocol": "4.1.0",
|
|
26
|
+
"@epoch-agent/core": "4.1.0",
|
|
27
|
+
"@epoch-agent/infra": "4.1.0",
|
|
28
|
+
"@epoch-agent/tui": "^4.1.0",
|
|
29
|
+
"@epoch-agent/runtime": "4.1.0",
|
|
30
|
+
"@epoch-agent/server": "4.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^22.20.1",
|