@epoch-agent/cli 4.1.0 → 5.0.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 +10 -16
- package/dist/index.js +7 -9
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -202,22 +202,16 @@ ink 一接管 stdin,inquirer 就抢不回来 —— 和信任闸门必须排
|
|
|
202
202
|
所以本包的 `build` 就是一句 `tsup`,`epoch web` 也不再自己去探产物目录——
|
|
203
203
|
不传 `webRoot`,由 `createWebServer()` 定位自带的那份。
|
|
204
204
|
|
|
205
|
-
## `epoch web`
|
|
206
|
-
|
|
207
|
-
`buildRuntime()` 上那几个 `host*` 选项(`hostCapabilities` / `
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
所以那是一个要人点头的新口子。
|
|
216
|
-
|
|
217
|
-
⚠️ `sources` 是**空的**,这是对的不是没写完:我们没有「宿主 ship 的市场目录」
|
|
218
|
-
那种东西,清单该来自用户自己 `epoch plugin marketplace add` 加的那些,
|
|
219
|
-
而那张表 runtime 本来就在读。命令行上的用法在
|
|
220
|
-
[docs/CLI.md](../../docs/CLI.md) 的「Web UI」一节,别在这儿再抄一份 flag 表。
|
|
205
|
+
## `epoch web` 是一个**宿主**,但插件页不再需要它点头
|
|
206
|
+
|
|
207
|
+
`buildRuntime()` 上那几个 `host*` 选项(`hostCapabilities` / `hostPreset`)是给
|
|
208
|
+
「把引擎嵌进自己程序里」的人用的。2026-11-06 之前这里还有第三个:
|
|
209
|
+
`hostMarketplaces` + `--plugins`,让 `epoch web` 显式决定开不开插件页。
|
|
210
|
+
市场 / 上传那一整套宿主定制删掉之后,**本地安装不依赖任何宿主开关**,
|
|
211
|
+
`runtime.plugins` 永远装配 —— 那个旗子没有可切的东西了,于是删了。
|
|
212
|
+
|
|
213
|
+
⚠️ 写口那些 POST 的回环闸不受影响:`--host 0.0.0.0` 下读得到、装不了。
|
|
214
|
+
命令行上的用法在 [docs/CLI.md](../../docs/CLI.md) 的「Web UI」一节。
|
|
221
215
|
|
|
222
216
|
## 开发
|
|
223
217
|
|
package/dist/index.js
CHANGED
|
@@ -5224,7 +5224,7 @@ var err = (msg) => {
|
|
|
5224
5224
|
`);
|
|
5225
5225
|
};
|
|
5226
5226
|
function registerWebCommand(program2) {
|
|
5227
|
-
program2.command("web").description(t39("cli.web.summary")).option("-p, --port <port>", t39("cli.web.opt_port", { port: DEFAULT_WEB_PORT })).option("--host <host>", t39("cli.web.opt_host", { host: DEFAULT_WEB_HOST })).option("--token <token>", t39("cli.web.opt_token")).option("--no-open", t39("cli.web.opt_no_open")).option("--json", t39("cli.web.opt_json")).
|
|
5227
|
+
program2.command("web").description(t39("cli.web.summary")).option("-p, --port <port>", t39("cli.web.opt_port", { port: DEFAULT_WEB_PORT })).option("--host <host>", t39("cli.web.opt_host", { host: DEFAULT_WEB_HOST })).option("--token <token>", t39("cli.web.opt_token")).option("--no-open", t39("cli.web.opt_no_open")).option("--json", t39("cli.web.opt_json")).action(async (opts, command) => {
|
|
5228
5228
|
await runWeb({ ...opts, json: jsonRequested(opts.json, command.parent?.opts()["json"]) });
|
|
5229
5229
|
});
|
|
5230
5230
|
}
|
|
@@ -5242,7 +5242,7 @@ async function runWeb(opts) {
|
|
|
5242
5242
|
if (!binding.ok) return fail(binding.error);
|
|
5243
5243
|
if (!await maybePromptForTrust()) process.exit(1);
|
|
5244
5244
|
if (!await maybePromptForExternalImports()) process.exit(1);
|
|
5245
|
-
const booted = await boot(binding
|
|
5245
|
+
const booted = await boot(binding);
|
|
5246
5246
|
if (!booted) return;
|
|
5247
5247
|
const { server } = booted;
|
|
5248
5248
|
const json = opts.json === true;
|
|
@@ -5264,18 +5264,16 @@ async function runWeb(opts) {
|
|
|
5264
5264
|
}
|
|
5265
5265
|
var missingWebRoot = () => t39("cli.web.missing_root");
|
|
5266
5266
|
var browserFailed = () => ` ${t39("cli.web.browser_failed")}`;
|
|
5267
|
-
function
|
|
5268
|
-
|
|
5269
|
-
}
|
|
5270
|
-
async function boot(binding, plugins) {
|
|
5271
|
-
const runtime = await buildRuntime3({
|
|
5267
|
+
async function boot(binding) {
|
|
5268
|
+
const build = () => buildRuntime3({
|
|
5272
5269
|
installSignalHandlers: false,
|
|
5273
|
-
interactive: true
|
|
5274
|
-
...pluginsOption(plugins)
|
|
5270
|
+
interactive: true
|
|
5275
5271
|
});
|
|
5272
|
+
const runtime = await build();
|
|
5276
5273
|
const noProvider = runtime.session === null;
|
|
5277
5274
|
const created = await createWebServer({
|
|
5278
5275
|
runtime,
|
|
5276
|
+
rebuild: build,
|
|
5279
5277
|
version: VERSION,
|
|
5280
5278
|
host: binding.host,
|
|
5281
5279
|
port: binding.port,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epoch-agent/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.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/
|
|
27
|
-
"@epoch-agent/
|
|
28
|
-
"@epoch-agent/
|
|
29
|
-
"@epoch-agent/runtime": "
|
|
30
|
-
"@epoch-agent/
|
|
25
|
+
"@epoch-agent/core": "5.0.0",
|
|
26
|
+
"@epoch-agent/infra": "5.0.0",
|
|
27
|
+
"@epoch-agent/protocol": "5.0.0",
|
|
28
|
+
"@epoch-agent/server": "5.0.0",
|
|
29
|
+
"@epoch-agent/runtime": "5.0.0",
|
|
30
|
+
"@epoch-agent/tui": "^5.0.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^22.20.1",
|