@epoch-agent/cli 0.1.0 → 0.2.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 CHANGED
@@ -176,6 +176,14 @@ ink 一接管 stdin,inquirer 就抢不回来 —— 和信任闸门必须排
176
176
  `ScheduleRunStatus` 这种码和技术细节,人话全在这一层。判据同
177
177
  `SettingWriteRefused.reason` 那条「是码不是句子」。
178
178
 
179
+ 同一个文件里还有 **TUI 开机那一行**(`pendingNotice()`,方案 45 §八 ①):
180
+ 库里有定时任务欠着授权时,那一行说清**是哪条任务**、差几条、以及
181
+ `epoch schedule run <id> --fix`。措辞落在这一层而不是 `tui` 包里,理由逐字同
182
+ [`goal-view.ts`](src/goal-view.ts):`tui` 只依赖 protocol,够不着 `t()`,
183
+ 而 `check:i18n` 那条棘轮只许降不许升。它走的是**已有的注入路径**
184
+ (`renderApp({ startupNotices })`),和启动诊断、目标那一行同一栏 ——
185
+ 用户只有一个地方要看。
186
+
179
187
  ## Web UI 的产物不在这个包里
180
188
 
181
189
  `epoch web` 托管的前端产物随 [server](../server) 一起发(`<server 包>/dist/web`),
@@ -186,6 +194,23 @@ ink 一接管 stdin,inquirer 就抢不回来 —— 和信任闸门必须排
186
194
  所以本包的 `build` 就是一句 `tsup`,`epoch web` 也不再自己去探产物目录——
187
195
  不传 `webRoot`,由 `createWebServer()` 定位自带的那份。
188
196
 
197
+ ## `epoch web` 是一个**宿主**,所以插件那一页的默认值是这个包的决定
198
+
199
+ `buildRuntime()` 上那几个 `host*` 选项(`hostCapabilities` / `hostMarketplaces` /
200
+ `hostPreset`)是给「把引擎嵌进自己程序里」的人用的,而 `epoch web` 在那个接口面前
201
+ 和 Electron 宿主是同一个身份——它也得逐个决定要不要选。
202
+
203
+ 今天只选了一个,而且是**显式让用户选**:`--plugins` → `hostMarketplaces:
204
+ { sources: [] }`,缺省整格不传。判据(三条,都不是偏好)在
205
+ [`commands/web.ts`](src/commands/web.ts) 的文件头,一句话版本:装一个插件会往
206
+ `~/.epoch/plugins/` 里落 `hooks.json` / `mcp.json`,下一程启动时照着跑,
207
+ 所以那是一个要人点头的新口子。
208
+
209
+ ⚠️ `sources` 是**空的**,这是对的不是没写完:我们没有「宿主 ship 的市场目录」
210
+ 那种东西,清单该来自用户自己 `epoch plugin marketplace add` 加的那些,
211
+ 而那张表 runtime 本来就在读。命令行上的用法在
212
+ [docs/CLI.md](../../docs/CLI.md) 的「Web UI」一节,别在这儿再抄一份 flag 表。
213
+
189
214
  ## 开发
190
215
 
191
216
  ```bash
@@ -6,13 +6,18 @@ import {
6
6
  getSecretStore,
7
7
  parseEnvText,
8
8
  setEnvVarText,
9
+ t,
9
10
  writeEnvFile
10
11
  } from "@epoch-agent/infra";
11
12
  async function writeProviderKey(name, value, fallbackEnvPath) {
12
13
  const store = getSecretStore();
13
14
  if (!store) {
14
15
  writeEnvFile(fallbackEnvPath, setEnvVarText(readOrEmpty(fallbackEnvPath), name, value));
15
- return { backend: "plaintext", encrypted: false, detail: `\u660E\u6587\u5199\u5165 ${fallbackEnvPath}` };
16
+ return {
17
+ backend: "plaintext",
18
+ encrypted: false,
19
+ detail: t("cli.config.secret_plaintext_write", { path: fallbackEnvPath })
20
+ };
16
21
  }
17
22
  await store.set(name, value);
18
23
  return { backend: store.backend, encrypted: store.encrypted, detail: store.detail };
@@ -5,7 +5,7 @@ import {
5
5
  setEnvVarText,
6
6
  writeEnvFile,
7
7
  writeProviderKey
8
- } from "./chunk-3SCZQI5W.js";
8
+ } from "./chunk-UEHBHZCZ.js";
9
9
  export {
10
10
  exportSecretsToEnv,
11
11
  parseEnvText,