@epoch-agent/core 2.0.1 → 2.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 +29 -28
- package/dist/index.d.ts +191 -4
- package/dist/index.js +140 -14
- package/package.json +34 -34
package/README.md
CHANGED
|
@@ -14,34 +14,35 @@ Agent 引擎。ReAct 循环、Provider 路由、权限、记忆、技能、Hook
|
|
|
14
14
|
|
|
15
15
|
## 模块
|
|
16
16
|
|
|
17
|
-
| 目录
|
|
18
|
-
|
|
|
19
|
-
| `agent/`
|
|
20
|
-
| `provider/`
|
|
21
|
-
| `config/`
|
|
22
|
-
| `session/`
|
|
23
|
-
| `memory/`
|
|
24
|
-
| `skill/`
|
|
25
|
-
| `hook/`
|
|
26
|
-
| `permission/`
|
|
27
|
-
| `workspace/`
|
|
28
|
-
| `compliance/`
|
|
29
|
-
| `policy/`
|
|
30
|
-
| `context/`
|
|
31
|
-
| `sandbox/`
|
|
32
|
-
| `delegate/`
|
|
33
|
-
| `agent-role/`
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
17
|
+
| 目录 | 职责 |
|
|
18
|
+
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| `agent/` | ReAct 循环(`loop.ts`)、工具执行、实时输出泵、prompt 组装、Nudge / Stall 检测、消息编解码、plan 模式状态、**运行前 token 估算**(`run-estimate.ts`) |
|
|
20
|
+
| `provider/` | 多 provider 路由 + 降级、模型元数据探测、AI SDK 适配、**token 估算**(`tokenizer.ts`,全仓唯一口径) |
|
|
21
|
+
| `config/` | 10 层配置解析链 + 迁移 + 设置来源分层(`sources.ts`)+ **「为什么是这个值」**(`provenance.ts`,每个键赢在哪一层)+ **「我现在写、写完谁说了算」**(`write.ts`)+ JSON Schema 导出。`schema.ts` 是配置形状的**唯一**真源 |
|
|
22
|
+
| `session/` | SQLite 会话持久化 + FTS5 搜索,落盘完整 `EpochMessage`(工具调用 / artifact 引用)+ 逐轮真实用量(`recordUsage`)+ 已批准的计划 + **那一次工作区决定**(v7 两列,见下)。开给模型那一侧的检索 / 前后文窗口 / 血缘在 `query.ts` + `trace.ts`,开给人那一侧的 `@:` 引用(候选 / 解析 / 当前面)在 `reference.ts`,「哪些会话我能读」**两边共用** `authorization.ts` 那一份,索引体检在 `fts-health.ts`(`epoch doctor` 用) |
|
|
23
|
+
| `memory/` | 文件 + SQLite 双存储。**命中注入模式的条目原文照留、只在渲染给模型时遮罩**(索引块 / `prefetch` / `search` / `read` 四条通道回占位符;文件一个字节不动),写前则直接拒 —— 判据在 `manager.ts` 的 `classifyEntry` / `blockedPlaceholder` 上。配额到九成的提醒走 `takeNotices()` → 那一帧 `notice`(2026-09-28 之前是 `reviewer.ts` 的 5 分钟后台审查,结论没人读,已删) |
|
|
24
|
+
| `skill/` | `SKILL.md` 文件系统 + 自动学习(`learner.ts`)。**读正文有两条路,别混**:`view()` 是模型那条(会 `matchCount++`,而那个数喂着有效性评分、也就是模型下次看得见哪些技能),`body()` 是「人点开看一眼」那条(**一个字都不动统计**)—— 一次浏览不是一次命中,判据写在 `SkillSystem.body` 上。**`create()` 建的目录名取 frontmatter 的 `name`**(不是参数那个,2026-09-28):索引取的也是它,不对齐的话 learner 那条通知会报一个查不到的名字。**写口只有两个导出**(`previewSkillImport` / `importSkills`,方案 42 §六):从本机目录导入技能,收路径不收字节,staging 那一层刻意不导出 —— 判据在 `skill/import.ts` 文件头 |
|
|
25
|
+
| `hook/` | Hook 匹配与执行、命令执行;`sources.ts` 定「读哪几份配置」(两级 `hooks.json` + **Claude Code 的三份 `settings.json`**,方案 50),`config-loader.ts` 只管解析我们自己的格式,`claude-settings.ts` / `claude-matcher.ts` 只管翻 Claude Code 的方言 |
|
|
26
|
+
| `permission/` | 5 级权限(`default` / `acceptEdits` / `plan` / `auto` / `bypass`)+ 审批缓存(`approval-cache.ts`:记弹窗答案;**逐条撤销**走 `revoke(id)` / `PermissionManager.revokeApproval()`,2026-08-27 补 —— 在那之前一次点错的「拒绝」只在内存里、永不过期,除了重启进程收不回来)+ 无头策略 + 紧凑规则 `Tool(content)` + **审计流水**(`audit.ts`:权限层每一次裁决的定长流水,`getAudit()` 取,**只在进程内、永不进遥测**) |
|
|
27
|
+
| `workspace/` | 这次会话的地盘:主根 + `--add-dir` 的额外根、目录体检、「哪些指令文件没被加载」,外加「已知工作区」最近使用清单(`~/.epoch/workspaces.json`,**本机文件不是服务**)。判据本身在 infra 的 `isInWorkspace`,这里是壳 |
|
|
28
|
+
| `compliance/` | **内容合规闸门**:本地词表 + 正则。**缺省只拦用户输入**(送进模型之前,命中 block 时请求不发也不计费);模型输出那一侧同一套东西都在(`agent/turn.ts` 那个唯一出口 + 句子级 holdback),一行配置就能开,但缺省关 —— 它是误伤和流式延迟的大头,判据在 `settings.ts`。变体归一化(全角 / 零宽 / 分隔符 / leet / 繁简,**带 offset 映射**因为 `mask` 要打回原文)、Aho-Corasick 多模式匹配、豁免表(治「`台独` 命中『平**台独**立部署』」那一类)、句子级 holdback 的流式 guard。**缺省跳过代码**(围栏块与行内 code)—— 这是个写代码的 agent,那一格决定这层能不能用。类别 / 动作两个联合住 [protocol](../protocol)(它们同时是配置键名、词库文件名、遥测属性值)。**内置词表是种子不是生产词库**,正式部署挂 `~/.epoch/compliance/<类别>.txt` |
|
|
29
|
+
| `policy/` | 策略文件加载与校验;`sources.ts` 定「扫哪几个 policies 目录」 |
|
|
30
|
+
| `context/` | 上下文压缩(工具结果裁剪是**摘要之前的独立一步**,头中尾保留,裁完够了就不调模型;2026-08-16 起认 `compression.*` 两个配置项,见下)、项目发现、指令文件与它的 `@import` 展开 + 项目外放行闸门、artifact 闸门与清理、图片 token 估算、`@` 提及的候选清单与解析(**文件和 `@:` 会话共享同一本 200KB 的账**,方案 53) |
|
|
31
|
+
| `sandbox/` | `CodeSandbox`(`code_exec` 的执行器)+ 隔离能力的**对外说法**:`describeIsolation()` 那句中文、以及「哪些工具走沙箱」两份清单。**机制那一半 2026-08-16 搬去了 [infra](../infra) 的 `sandbox/`**(消费者不止 core 一个了,`plugin-terminal` 够不着 core);既有 import 路径靠再导出保住 |
|
|
32
|
+
| `delegate/` | 子 agent 任务委托(`delegate_task` 的后端) |
|
|
33
|
+
| `agent-role/` | agent 角色定义、注册与工具作用域收窄(子 agent 和**顶层会话**两条来路走同一个 `roleScopedProvider`);`createRoleScope` 把它包成**可变槽** —— 身份行和工具表从同一个变量读,好让「这一条消息换个专家」有地方落。⚠️ 2026-08-18 起这里多了一条**写**的路(`create.ts`,全仓第一条建角色的路):它和读口共用同一份 frontmatter schema、同一个解析器,写完**先读回来验一遍**再落盘。⚠️ 2026-09-16 又多了它的反面(`remove.ts`,「能加就得能删」):**落点靠读口解析出来的 `name` 找,不是拿名字拼路径** —— frontmatter 的 `name` 优先于文件名,拼路径要么删不到一份界面上明明列着的身份,要么删掉另一个,而两种错法都不报错;同名两份时**一个字节都不删**。那道「什么样的客户端才准写」的闸门**两条都不在这儿**,在 `@epoch-agent/server`(判据见那两个文件头第三节) |
|
|
34
|
+
| `agent-plugin/` | **插件面板那个可变槽**(2026-10-20):`createPluginScope` —— 「这一条消息是点着哪个插件面板发的」,`<self>` 段从它读。⚠️ **和 `agent-role/` 有同一个形状、少两样东西**:没有 `provider`(插件名不换工具表)、没有身份 —— 它只影响 system prompt 里一句话,判据在那份文件头那张对照表上。别照着 `createRoleScope` 全抄一遍 |
|
|
35
|
+
| `extensions/` | 项目级扩展:自定义斜杠命令的发现 / 加载 / 插值 / 按轮次收窄工具表;三种扩展物共用的 frontmatter 解析 |
|
|
36
|
+
| `plugin/` | 插件:清单校验、四种来源的安装、安装记录(带跨进程锁)、市场、加载成「六类扩展物的来源」(`PLUGIN_LAYOUT` 那七个约定子路径)。见 [docs/PLUGINS.md](../../docs/PLUGINS.md)。⚠️ **2026-10-20 起清单里多了 `panel` 那一格**(输入框上方那块面板,`url` 只收本机回环、判据在 `manifest.ts` 的 `isLoopbackUrl` 上):**写歪了只有这一格不生效,插件照常装得上** —— 那一条口径逐字同 `visibility` / `appearance` |
|
|
37
|
+
| `tools/` | `ToolRegistry` + `builtin/` 下那批内置工具(`todo` / `memory` / `goal` / `code_exec` / `run_code` / `delegate_task` / `ask_user_question` / `skill_view` / **技能写入那四个** / `tool_search` / `schedule_draft` / plan 模式那两个 / 会话检索那**四个**)。**清单与边界的唯一真源是 [docs/TOOLS.md](../../docs/TOOLS.md)** —— 这里不再抄一个会过期的条数(原来写的「13 个」漏了 `tool_search`) |
|
|
38
|
+
| `code-mode/` | `run_code` 的 worker 运行时(方案 51):线程入口、宿主 ↔ worker 的工具绑定协议、四道上限、只读闸门。⚠️ **和 `sandbox/` 是两回事,隔离模型正好相反** —— 那一个的边界是沙箱,这一个的边界是权限管线(子调用通道本身在 `agent/tool-executor.ts`)。**默认关**,`tools.mode: both` 才注册那个工具 |
|
|
39
|
+
| `checkpoint/` | 写类工具动手前的文件快照 + 回退(两阶段原子、不覆盖手工改动)。见 [docs/CHECKPOINTS.md](../../docs/CHECKPOINTS.md) |
|
|
40
|
+
| `tracker/` | 待办追踪的 SQLite 表 |
|
|
41
|
+
| `schedule/` | 定时任务(方案 45):store / 单实例锁 / 触发器算术 / 保存期校验 / 录像与留存 / 注册器 / `doctor`,外加 `os/` 下的两个 OS 后端(`schtasks` / `launchd`)和 `draft.ts`(对话里那份草稿的解析与判定,**不是写入路**)。**不含执行器** —— 跑一次要 `buildRuntime()`,那在 [runtime](../runtime) 的 `fireSchedule()` |
|
|
42
|
+
| `cost/` | 计价表、预算守卫、花费状态。缓存命中单独计价,口径见 `pricing.ts` 文件头 |
|
|
43
|
+
| `compat/` | 竞品词汇表。今天只有 `claude-tool-names.ts`(Claude Code 工具名 ↔ 我们的,双向从同一份数据推出来)—— 放在 `hook/` 之外是因为方案 50 §八 点名的第二个消费者(兼容它的权限规则)不住在 hook 里 |
|
|
44
|
+
| `trust/` | 工作区信任判定与闸门 |
|
|
45
|
+
| `telemetry/` | span 属性脱敏 |
|
|
45
46
|
|
|
46
47
|
另外 10 个工具在四个 plugin 里,不在这里:见
|
|
47
48
|
[plugin-file](../plugins/plugin-file) / [plugin-terminal](../plugins/plugin-terminal) /
|
package/dist/index.d.ts
CHANGED
|
@@ -2197,8 +2197,10 @@ type ResponseFormat = {
|
|
|
2197
2197
|
* **形状照抄 AI SDK 的 `CallWarning`(= `SharedV4Warning`)判别联合,字段名一个不改**
|
|
2198
2198
|
* ——判据同 `ToolAnnotations` 对齐 MCP 那条:自造一层映射意味着两边任一侧改了都不会红,
|
|
2199
2199
|
* 而这一格的读者要拿它做分支。核过的出处是
|
|
2200
|
-
* `@ai-sdk/provider@4.0.
|
|
2201
|
-
*
|
|
2200
|
+
* `@ai-sdk/provider@4.0.29` 的 `index.d.ts:158`(`export type SharedV4Warning`),
|
|
2201
|
+
* 而 `ai@7.0.143` 的 `index.d.ts:139` 写着
|
|
2202
|
+
* `type CallWarning = CallWarningRegistry[keyof CallWarningRegistry]`(那个 registry
|
|
2203
|
+
* 只有 `sharedV4: SharedV4Warning` 一格)。
|
|
2202
2204
|
*
|
|
2203
2205
|
* ⚠️ **`feature` / `setting` / `message` 都是 provider 自己写的文本**,不是枚举。
|
|
2204
2206
|
* 「这条说的是不是我们那个 JSON 约束」要靠匹配,而**那个匹配的负担在我们这一侧**:
|
|
@@ -6660,6 +6662,86 @@ declare function blockedRoleTools(role: AgentRole | undefined, blocked: readonly
|
|
|
6660
6662
|
*/
|
|
6661
6663
|
declare function unknownRoleSkills(available: readonly string[], role: AgentRole | undefined): string[];
|
|
6662
6664
|
|
|
6665
|
+
/**
|
|
6666
|
+
* 插件面板的作用域 —— 「**这一条消息**是点着哪个插件发出去的」(2026-10-20)。
|
|
6667
|
+
*
|
|
6668
|
+
* ## ⚠️ 它和 `agent-role/scope.ts` 长得像,但**少两样,而那两样是有意少的**
|
|
6669
|
+
*
|
|
6670
|
+
* 两份都是「一个可变的槽 + `enter()` 返回还原函数」,因为要解的是同一个问题:
|
|
6671
|
+
* 消息排队跑,多个会话可能同时在飞,而槽只有一份——不进入 / 还原就会串。
|
|
6672
|
+
*
|
|
6673
|
+
* 不同的是这一份**只影响 `system prompt` 里的一句话**:
|
|
6674
|
+
*
|
|
6675
|
+
* | 那一份有 | 这一份有没有 | 为什么 |
|
|
6676
|
+
* | --- | --- | --- |
|
|
6677
|
+
* | `provider`(换工具表) | ❌ **没有** | 插件名不换任何工具。一个插件带来的工具本来就在表里(`mcp__<前缀>__*`),点不点面板它们都在 |
|
|
6678
|
+
* | 身份行 / `maxTurns` | ❌ 没有 | 那是「以谁的身份工作」,这是「用户此刻在看哪个插件的面板」,两件事 |
|
|
6679
|
+
*
|
|
6680
|
+
* 所以**别照着 `createRoleScope` 全抄一遍**:抄过来的 `provider` 会是一个
|
|
6681
|
+
* 永远原样返回 `base` 的包装,而那种东西的存在本身就在暗示「这条路上能换工具表」。
|
|
6682
|
+
*
|
|
6683
|
+
* ## 它为什么**必须**是一个槽,而不是一个参数
|
|
6684
|
+
*
|
|
6685
|
+
* `PromptBuilder.buildSystem()` 每条消息现算一遍,全程没有「这一条消息」这个
|
|
6686
|
+
* 上下文对象。把值递进去要么改 `buildSystem(sessionId, …)` 的签名(三个读点
|
|
6687
|
+
* 一起动),要么在 `AgentConfig` 上再开一格 —— 而那一格是装配期快照,
|
|
6688
|
+
* 拿到的是**建 loop 那一刻**的值,那时用户通常还没点开任何面板,于是这条提示
|
|
6689
|
+
* 永远不出现,且不会有任何东西变红。
|
|
6690
|
+
*
|
|
6691
|
+
* 这和 `AgentConfig.role` 当年从对象改成函数的判据逐字相同(方案 57 §3.3)。
|
|
6692
|
+
*
|
|
6693
|
+
* ## 进出成对**不由这个文件保证**
|
|
6694
|
+
*
|
|
6695
|
+
* 还原写在调用方那一侧的 `finally` 里(`runtime/src/agent-plugin-scope.ts` 的
|
|
6696
|
+
* `withPluginScope`)。漏掉的症状比角色那一份轻:模型会以为用户一直开着上一个
|
|
6697
|
+
* 插件的面板,于是「优先用它带来的东西」——而用户早就叉掉了。不报错、不崩,
|
|
6698
|
+
* 只是它答的方向偏了。
|
|
6699
|
+
*/
|
|
6700
|
+
/** 用户此刻开着的那个插件面板。**只有给模型看的那两格**,不是整条 `WirePluginEntry` */
|
|
6701
|
+
interface ActivePlugin {
|
|
6702
|
+
/** 插件标识(`feishu-kit`)。模型靠它筛 `feishu-kit:` 前缀的技能、拼插件目录 */
|
|
6703
|
+
name: string;
|
|
6704
|
+
/**
|
|
6705
|
+
* 给人看的称呼(清单里的 `displayName`,`飞书文档`)。**缺省不给**,渲染时回落 `name`。
|
|
6706
|
+
*
|
|
6707
|
+
* ⚠️ **纯展示,引擎一处都不许据此分叉** —— 判据同 `ActiveAgentRole.displayName`:
|
|
6708
|
+
* 标识才是身份,这一格换了它,`skills/` 的查找和清单的对应一个都不动。
|
|
6709
|
+
*/
|
|
6710
|
+
displayName?: string;
|
|
6711
|
+
}
|
|
6712
|
+
/**
|
|
6713
|
+
* 一个会话那一格「这一条消息点着哪个插件面板」。
|
|
6714
|
+
*
|
|
6715
|
+
* **一个会话一份** —— 槽在 `assemble()` 里建,和这个会话的 `AgentLoop` 绑死。
|
|
6716
|
+
* 别拿引导会话那一份去答别的会话,判据逐字同 `LiveSession.role` 上那条 ⚠️:
|
|
6717
|
+
* 拿错的表现是「在 B 上点了插件,A 的模型优先去用了那个插件的东西」。
|
|
6718
|
+
*/
|
|
6719
|
+
interface PluginScope {
|
|
6720
|
+
/**
|
|
6721
|
+
* 这一刻生效的那个。`undefined` = 没开任何面板 —— **那时 `<self>` 里那条规则
|
|
6722
|
+
* 整条不出现**(判据在 `agent/self-index.ts` 的 `SelfIndexInput.activePlugin` 上)。
|
|
6723
|
+
*/
|
|
6724
|
+
readonly current: ActivePlugin | undefined;
|
|
6725
|
+
/**
|
|
6726
|
+
* 进入一条消息的作用域,返回还原函数。
|
|
6727
|
+
*
|
|
6728
|
+
* `plugin` 给 `undefined` = 「这一条没有开面板」,这是个**正常的入参**而不是
|
|
6729
|
+
* 「没换」:用户绝大多数消息都是在没开面板的时候发的,而这条路上调用方
|
|
6730
|
+
* 无论有没有插件都拿得到一个可调用的还原函数(同 `ToolScope.enter` 的形状)。
|
|
6731
|
+
*
|
|
6732
|
+
* @returns 还原到进入之前那个值(**不是清空** —— 嵌套的两层要能各自回到自己的前一层)
|
|
6733
|
+
*/
|
|
6734
|
+
enter: (plugin: ActivePlugin | undefined) => () => void;
|
|
6735
|
+
}
|
|
6736
|
+
/**
|
|
6737
|
+
* 建一个槽。
|
|
6738
|
+
*
|
|
6739
|
+
* 没有「会话默认值」这一档(`initial` 只是为了嵌入宿主和用例方便,产品里不传):
|
|
6740
|
+
* 和角色不同,插件面板**没有**一段会话级的身份 —— 它每一刻不是「开着哪个」
|
|
6741
|
+
* 就是「没开」。所以缺席是常态,不是「退回到某个默认值」。
|
|
6742
|
+
*/
|
|
6743
|
+
declare function createPluginScope(initial?: ActivePlugin): PluginScope;
|
|
6744
|
+
|
|
6663
6745
|
/**
|
|
6664
6746
|
* 扩展注册表 —— 三个来源的发现、加载、合并与诊断(方案 23 + 方案 32)。
|
|
6665
6747
|
*
|
|
@@ -7253,7 +7335,15 @@ declare function loadPlugins(opts: PluginLoadOptions): PluginArtifacts;
|
|
|
7253
7335
|
* "epochVersion": ">=0.6.0",
|
|
7254
7336
|
* "displayName": "淘宝批量改价",
|
|
7255
7337
|
* "category": "office",
|
|
7256
|
-
* "visibility": "private"
|
|
7338
|
+
* "visibility": "private",
|
|
7339
|
+
* "appearance": [
|
|
7340
|
+
* {
|
|
7341
|
+
* "id": "ocean",
|
|
7342
|
+
* "label": "海风",
|
|
7343
|
+
* "accent": "default",
|
|
7344
|
+
* "background": { "kind": "image", "file": "assets/ocean.jpg", "opacity": 30, "fit": "cover" }
|
|
7345
|
+
* }
|
|
7346
|
+
* ]
|
|
7257
7347
|
* }
|
|
7258
7348
|
* ```
|
|
7259
7349
|
*
|
|
@@ -7367,6 +7457,12 @@ declare const ManifestSchema: z.ZodObject<{
|
|
|
7367
7457
|
private: "private";
|
|
7368
7458
|
public: "public";
|
|
7369
7459
|
}>>>;
|
|
7460
|
+
appearance: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
7461
|
+
panel: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
7462
|
+
title: z.ZodOptional<z.ZodString>;
|
|
7463
|
+
url: z.ZodString;
|
|
7464
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
7465
|
+
}, z.core.$strip>>>;
|
|
7370
7466
|
}, z.core.$strip>;
|
|
7371
7467
|
/**
|
|
7372
7468
|
* 认识的顶层键,用来产出「未知配置项」提示。
|
|
@@ -9853,6 +9949,28 @@ interface SelfIndexInput {
|
|
|
9853
9949
|
hooks: number;
|
|
9854
9950
|
/** `<settings>` 那一段。不给就整段不出现 */
|
|
9855
9951
|
settings?: SelfSettings;
|
|
9952
|
+
/**
|
|
9953
|
+
* 用户**这一刻开着的**那个插件面板(2026-10-20)。不给 = 没开任何面板。
|
|
9954
|
+
*
|
|
9955
|
+
* ## 它只影响一条规则,而那一整句在没有它时不出现
|
|
9956
|
+
*
|
|
9957
|
+
* 原来是常驻一句「用户点了插件名,这一轮优先用它带来的东西」—— 那句里没有
|
|
9958
|
+
* 名字,于是它只说得清「有这么一件事」,说不出「点的是谁」。给了这一格,那句
|
|
9959
|
+
* 就变成「用户点了插件「飞书文档」(feishu-kit)…」。
|
|
9960
|
+
*
|
|
9961
|
+
* ⚠️ **没给时那一条整个不出现**(用户 2026-10-20 定的:叉掉面板就没有这个提示)。
|
|
9962
|
+
* 代价写在 `renderSelfIndex` 那一段注释里:这一条今天同时承担「用户在**正文里**
|
|
9963
|
+
* 直接提到插件名时怎么反应」,整句消失后那一半只能靠上面那条「技能名 / 角色名
|
|
9964
|
+
* 带 `<前缀>:`」的规则兜着。
|
|
9965
|
+
*
|
|
9966
|
+
* ⚠️ **必须现读**,值来自装配层那个可变槽(`runtime/src/agent-plugin-scope.ts`)
|
|
9967
|
+
* —— 「这一条消息是点着哪个面板发的」在会话跑到一半会变,快照拿到的是装配
|
|
9968
|
+
* 那一刻那一个(那时通常是「没开」)。
|
|
9969
|
+
*/
|
|
9970
|
+
activePlugin?: {
|
|
9971
|
+
name: string;
|
|
9972
|
+
displayName?: string;
|
|
9973
|
+
};
|
|
9856
9974
|
}
|
|
9857
9975
|
/**
|
|
9858
9976
|
* `<settings>` 里允许出现的**全部**字段 —— 这是一份白名单,不是 `EpochConfig` 的投影。
|
|
@@ -12676,6 +12794,11 @@ declare const EpochConfigSchema: z.ZodObject<{
|
|
|
12676
12794
|
label: z.ZodString;
|
|
12677
12795
|
icon: z.ZodOptional<z.ZodString>;
|
|
12678
12796
|
}, z.core.$strip>>>;
|
|
12797
|
+
topbarMenu: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12798
|
+
id: z.ZodString;
|
|
12799
|
+
label: z.ZodString;
|
|
12800
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
12801
|
+
}, z.core.$strip>>>;
|
|
12679
12802
|
blankCards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12680
12803
|
id: z.ZodString;
|
|
12681
12804
|
title: z.ZodString;
|
|
@@ -15885,6 +16008,48 @@ interface StoredAppearance {
|
|
|
15885
16008
|
* `isAppearanceSidebarWidth`,由写入口和首屏那段脚本各自把关 —— 盘上一个越界的数是惰性的
|
|
15886
16009
|
*/
|
|
15887
16010
|
sidebarWidth?: number;
|
|
16011
|
+
/**
|
|
16012
|
+
* 工作区 diff 那一屏右侧文件树的宽度(px,2026-10-20 可拖之后)。缺席 = 没拖过。
|
|
16013
|
+
* 同上面那格:这一层只判结构(正整数),上下限归 protocol 的
|
|
16014
|
+
* `isAppearanceDiffTreeWidth`
|
|
16015
|
+
*/
|
|
16016
|
+
diffTreeWidth?: number;
|
|
16017
|
+
/** 强调色(预设名或 `#rrggbb`)。缺席 = 没选过 */
|
|
16018
|
+
accent?: string;
|
|
16019
|
+
/** 主题名(2026-10-19 第二轮)。缺席 = 没起过名 */
|
|
16020
|
+
themeName?: string;
|
|
16021
|
+
/** 画布底色(`#rrggbb`)。缺席 = 没改过 */
|
|
16022
|
+
canvasColor?: string;
|
|
16023
|
+
/** 前景墨色(`#rrggbb`)。缺席 = 没改过 */
|
|
16024
|
+
inkColor?: string;
|
|
16025
|
+
/** 用户消息气泡的底色(`#rrggbb`,2026-10-20)。缺席 = 没改过 */
|
|
16026
|
+
saidColor?: string;
|
|
16027
|
+
/** 界面字号(px,正整数)。缺席 = 没选过 */
|
|
16028
|
+
fontSize?: number;
|
|
16029
|
+
/** 代码字号(px,正整数)。缺席 = 没选过 */
|
|
16030
|
+
codeFontSize?: number;
|
|
16031
|
+
/** 界面字体('system' 等)。缺席 = 没选过 */
|
|
16032
|
+
uiFont?: string;
|
|
16033
|
+
/** 代码字体。缺席 = 没选过 */
|
|
16034
|
+
codeFont?: string;
|
|
16035
|
+
/** 减少动态效果('system | on | off')。缺席 = 没选过 */
|
|
16036
|
+
reduceMotion?: string;
|
|
16037
|
+
/**
|
|
16038
|
+
* 半透明侧边栏:`--bg-chrome` 的 alpha 百分比(0–100 整数,100 = 不透明)。
|
|
16039
|
+
* 缺席 = 没选过。⚠️ 2026-10-20 起是数字(原来是布尔开关),盘上的老 `true` / `false`
|
|
16040
|
+
* 由 protocol 的 `normalizeAppearanceTranslucent` 归一(72 / 100)
|
|
16041
|
+
*/
|
|
16042
|
+
translucentSidebar?: number;
|
|
16043
|
+
/** 对比度(0–100 整数)。缺席 = 没选过 */
|
|
16044
|
+
contrast?: number;
|
|
16045
|
+
/** 「分别设置浅色和深色」的总开关。缺席 = 没选过 */
|
|
16046
|
+
perMode?: boolean;
|
|
16047
|
+
/** 浅色档的覆盖(结构合法就收,值域归 protocol)。缺席 = 没选过 */
|
|
16048
|
+
light?: Record<string, unknown>;
|
|
16049
|
+
/** 深色档的覆盖。同上 */
|
|
16050
|
+
dark?: Record<string, unknown>;
|
|
16051
|
+
/** 背景设置(结构合法就收,**不含路径**,判据在 protocol `AppearanceBackground`)。缺席 = 没选过 */
|
|
16052
|
+
background?: Record<string, unknown>;
|
|
15888
16053
|
}
|
|
15889
16054
|
declare class AppearanceStore {
|
|
15890
16055
|
private readonly filePath;
|
|
@@ -15913,6 +16078,28 @@ declare class AppearanceStore {
|
|
|
15913
16078
|
* (同 `LastOpenSessions.remember` 那条理由)。
|
|
15914
16079
|
*/
|
|
15915
16080
|
set(patch: StoredAppearance): void;
|
|
16081
|
+
/**
|
|
16082
|
+
* 把盘上那一份**整个清掉**(2026-10-19,用户要的「一键恢复默认值」)。
|
|
16083
|
+
*
|
|
16084
|
+
* ## 为什么是删文件,而不是「把每一格写成默认值」
|
|
16085
|
+
*
|
|
16086
|
+
* 三层理由,一层比一层硬:
|
|
16087
|
+
*
|
|
16088
|
+
* 1. **有几格没有「默认值」这个写法**:`themeName` 的最小长度是 1
|
|
16089
|
+
* (`isAppearanceThemeName`),`canvasColor` / `inkColor` 只收 `#rrggbb` ——
|
|
16090
|
+
* 「这格没有用户选择」在这三格上**只有一种形状:键缺席**。
|
|
16091
|
+
* 2. **写默认值和「没选过」在语义上不是一回事**:前者会让宿主给的 `ui` 初值
|
|
16092
|
+
* 永远不生效(盘上那格是用户「明确选了默认」)。而用户按「恢复默认」要的
|
|
16093
|
+
* 正是回到**出厂状态**,也就是宿主那一套重新说了算(判据同文件头第 3 节)。
|
|
16094
|
+
* 3. 逐格写会留下一条不属于这次操作的历史 —— 下次有人读这份文件,看到的是
|
|
16095
|
+
* 「用户挨个把每一格都设成了默认值」,而那件事没发生过。
|
|
16096
|
+
*
|
|
16097
|
+
* ## 失败照旧不抛
|
|
16098
|
+
*
|
|
16099
|
+
* 判据同 {@link set}:清不掉(权限 / 只读盘)时把原因回给调用方,
|
|
16100
|
+
* 内存里那一份照样已经清了 —— 这一次的界面是对的,只是下次启动会读回旧的。
|
|
16101
|
+
*/
|
|
16102
|
+
clear(): void;
|
|
15916
16103
|
private load;
|
|
15917
16104
|
/** JSON → 偏好。认不出来的一律当没选过,一个字都不说(判据在文件头末段) */
|
|
15918
16105
|
private adopt;
|
|
@@ -21620,4 +21807,4 @@ declare function resolveCodeModeWorker(baseDir: string, exists?: typeof existsSy
|
|
|
21620
21807
|
*/
|
|
21621
21808
|
declare function codeModeWorkerPath(): string | undefined;
|
|
21622
21809
|
|
|
21623
|
-
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, type AcquireResult, type AgentConfig, AgentLoop, type AgentProvider, type AgentSite, type AgentSiteRef, AppearanceStore, type AppendMessageInput, ApprovalCache, type ApprovalDecision, type ArtifactOpenRefusal, type ArtifactRetention, type AskQuestionDeps, type AttachmentRetention, BLOCKED_TOOLS, type BackendOptions, type BackendOutcome, type BackgroundTaskSource, type BaseOrigin, type BaseSlot, type BeginTurnInput, type BreakdownInput, BudgetGuard, type BudgetGuardOptions, type BudgetInfo, type BudgetLevel, type BudgetOptions, type BudgetStatus, BudgetStore, type BudgetStoreOptions, type BuildFireArgvInput, type BuildIndexOptions, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, type CachedApproval, type CachedDecision, type CheckpointCapture, type CheckpointFile, CheckpointManager, type CheckpointManagerOptions, type CheckpointManifest, CheckpointStore, type CheckpointStoreOptions, type CheckpointSummary, type ClaudeHooksParseOptions, type CodeModeLimits, type CodeRequest, type CodeResult, CodeSandbox, type CommandHookConfig, type CommandHookResult, type CommandLoadOutcome, type CommandLoadSummary, type CommandResult, type CommandRunner, type CompactionResult, type CompiledRules, type ComplianceDirSpec, type ComplianceDirsSummary, ComplianceEngine, type ComplianceEngineInput, type ComplianceGate, type ComplianceHit, type ComplianceRule, type ComplianceRuleSource, type ComplianceSettings, type ComplianceVerdict, type CompressConfig, type CompressResult, type ConfigMigration, type ConfigOrigins, ContextCompressor, type ContextEngine, type CreateScheduleInput, type CreateSessionInput, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, type DelegateArgs, type DelegateConfig, DelegateManager, type DelegateTaskResult, type DiagnoseOptions, type DiscoverOutcome, type DiscoveredFile, type DoctorReport, type DraftParse, EMPTY_RULES, EPOCH_DISK_LEDGER, type EntryProbeCode, type EntryProbeResult, EpochConfigSchema, type ExpandOptions, type ExtractOutcome, FTS_TABLES, FTS_TRIGGERS, type FallbackEvent, type FileSlots, type FileSourceKind, type ForkInput, type FrontmatterParse, type FrontmatterSplit, type FtsHealth, type FtsReclaim, type FtsSpace, type FtsTableHealth, GOAL_BLOCK_CODES, type GateAxis, type GateVerdict, type GenerateInput, type GenerateOutput, type Goal, type GoalBlockReason, type GoalClear, type GoalPhase, type GoalPromptView, type GoalRefusal, type GoalRoundResult, GoalService, GoalStore, type GoalToolDeps, type GoalWrite, HEADLESS_AUDIT_CODES, type HeadlessPolicy, type HookConfigEntry, HookManager, type HookManagerOptions, type HookMatcher, type HookSourceKind, type HookSourceStatus, type HookSourcesOptions, type HookSourcesSummary, type HooksParseOutcome, type MemoryManager$1 as IMemoryManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, type SessionManager$1 as ISessionManager, type SkillSystem$1 as ISkillSystem, ImageLoadError, type ImageSize, type ImportDecision, type ImportGate, type ImportGoal, type ImportMessage, type ImportNode, type ImportPartsResult, type ImportSessionInput, type ImportSessionMeta, type ImportSessionResult, type ImportSkipReason, type ImportTodo, ImportTrustStore, type InstallDependency, type InstallOptions, type InstallOutcome, type InstallPreview, type InstallStep, type InstructionScan, type InstructionSource, type IsolationReason, type IsolationReport, type JsonSchemaDocument, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, type LastOpenSession, LastOpenSessions, type LayerOutcome, type LayerScalars, type LayerStatus, type LearningContext, type LearningResult, type LearningSkipReason, type LexiconLoadOutcome, type LifecycleOutcome, type ListCandidatesInput, type ListSessionsInput, type ListSessionsOutput, type LoadCommandsOptions, type LoadConfigOptions, type LoadKeybindingsOptions, type LoadKeybindingsResult, type LoadRolesOptions, type LoadedPlugin, type LockHolder, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_ENTRIES_FILE, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, type ManagedPolicy, ManagedPolicyError, type ManagedSettings, ManagedSettingsSchema, type MarketplaceCatalog, type MarketplaceCategory, type MarketplaceDisplay, type MarketplaceDisplayField, type MarketplaceEntry, type MarketplaceOutcome, type MarketplaceRecord, type MarketplaceStatus, type MemoryConfig, type MemoryEntry, type MemoryImportRecord, type MemoryImportResult, MemoryManager, type MemoryManagerOptions, type MemoryNotice, type MemoryRemoval, type MemorySearchResult, type MemoryTarget, type MemoryWriteResult, type MentionPart, type MentionResolution, type Message, type MessageHit, type MessageRecord, type MessageSurface, type ModelCapability, ModelFailureTracker, type ModelMetaEntry, type ModelPricing, type MultimodalPolicy, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, type NonInteractiveProbe, type OsTaskSnapshot, type OutputGuard, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_ICON_MAX_BYTES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, type PackFile, type PackLimits, type PackOutcome, type PackPlan, type PackPlanOutcome, type PermissionAuditCode, type PermissionAuditEntry, type PermissionAuditOutcome, type PermissionAuditScope, type PermissionAuditSnapshot, PermissionManager, type PersistFailureKind, type PersistedBudget, type PersistedPart, type PlanApprovalFn, type PlanEnterResult, type PlanModeDeps, PlanModeState, type PlanSettlement, type PluginAbout, type PluginArtifacts, type PluginAuthor, PluginAuthorSchema, type PluginCommandDir, type PluginCounts, type PluginDoc, type PluginHookFile, type PluginInventory, type PluginLoadOptions, type PluginManifest, type PluginPathRef, type PluginRecord, type PluginSettingsFile, type PluginSourceType, type PluginStateReadOutcome, PluginStore, type PluginVisibility, type PolicyDirSpec, type PolicyDirsSummary, type PolicyLoadOutcome, type PolicyRule, PolicyRuleSchema, type PricingAt, type PricingOverride, type ProjectContext, type ProjectExtensionInventory, ProviderError, ProviderRouter, type ProviderStreamChunk, type ProviderToolCall$1 as ProviderToolCall, type ProviderWarning, type PruneResult, type QuestionAskFn, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, type ReadMessagesInput, type ReadMessagesOutput, type RecentWorkspace, RecentWorkspaces, type RecordRunInput, type RecorderOptions, type RecoveryAction, type RegisterInput, type RegisterOutcome, type RegistrarOptions, type RegistrationPatch, type RepairOutcome, type ResolveMentionsOptions, type ResolveReferenceInput, type ResolveSettingsOptions, type ResolvedCompression, type ResolvedReference, type ResolvedSource, type ResponseFormat, type RestorePartsOptions, type RewindAction, type RewindDrift, type RewindFilePlan, type RewindOptions, type RewindOutcome, type RewindPreview, type RoleCreateFailure, type RoleCreateInput, type RoleCreateOptions, type RoleCreateOutcome, type RoleLoadOutcome, type RoleLoadSummary, type RoleMergeNotice, type RoleMergeResult, type RoleRemoveFailure, type RoleRemoveOptions, type RoleRemoveOutcome, type RoleScope, type RuleMatch, type RuleSuggestion, type RuleVerdict, type RunCodeFailure, type RunCodeInput, type RunCodeOutcome, type RunCodeToolDeps, type RunEstimateInput, type RunInput, type RunResult, type RunningSchedule, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, type ScalarKey, type ScanInstructionsOptions, type ScheduleArgvRefusal, type ScheduleArgvResult, type ScheduleArgvWarning, type ScheduleBackend, type ScheduleCliEntry, type ScheduleDraftDeps, type ScheduleDrift, type ScheduleDriftKind, type ScheduleImportInput, type ScheduleInstallForm, type ScheduleIssue, type ScheduleIssueCode, type ScheduleLock, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, type ScheduleValidation, type SchemaExport, type SearchHit, type SearchInput, type SearchMessagesInput, type SearchMessagesOutput, type SearchOutput, type SearchSessionsInput, type SelectionDeps, type SelfConnector, type SelfIndexInput, type SelfSettings, type Session, type SessionCandidate, type SessionHit, SessionManager, type SessionMentionDeps, type SessionMeta, SessionQueries, SessionReferences, type SessionSearchDeps, type SessionStats, type SessionSurface, type SessionTrace, type SessionVisibility, type SessionVisibilityInput, type SettingApply, type SettingApplyFacts, type SettingChain, type SettingFutile, type SettingLayer, type SettingStep, type SettingValue, type SettingValueKind, type SettingWriteFailure, type SettingWriteKey, type SettingWriteLayer, type SettingWriteOutcome, type SettingWriteRequest, type SettingWriteTarget, type SettingWriteTargetsOptions, type SettingsFile, SettingsFileError, SettingsFileSchema, type SettingsLayer, type SettingsResolution, type ShadowFinding, type ShadowKind, type Skill, type SkillDirSource, type SkillDirSpec, type SkillDirsSummary, type SkillImportConflict, type SkillImportDone, type SkillImportEntry, type SkillImportFailure, type SkillImportForm, type SkillImportOptions, type SkillImportPreview, type SkillImportResult, type SkillIndexEntry, type SkillIndexOptions, type SkillIndexResidency, type SkillIndexStats, SkillLearner, type SkillLearningProvider, type SkillMeta, type SkillStats, SkillSystem, type SkillSystemOptions, type SkillViewDeps, type SkillWriteDeps, type SteerSource, type StoredAppearance, type SubAgentRunner, type SubTask, type SubToolCaller, type SummarizeOutput, type SurfaceMessage, type SystemPromptParams, type SystemPromptSegments, TOOL_SEARCH_TOOL, TaskNoticeTracker, type TodoItem, type ToolCall, type ToolConflict, type ToolGate, type ToolNameFidelity, type ToolNameLookup, ToolRegistry, type ToolRevealState, type ToolScope, type ToolSearchDeps, type ToolTableCost, type TraceInput, type TraceNode, TrackerDB, type TrustDecision, type TrustGate, type TrustGateOptions, TrustManager, type TurnRecord, type TurnTiming, UNSETTABLE_USER_KEYS, type UpdateScheduleInput, type UtilityModelInfo, type ValidateScheduleInput, type VersionCheck, Workspace, type WorkspaceFiles, type WorkspaceIssue, type WorkspaceIssueKind, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, capabilityOfRef, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, discoverySpec, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, hasUsableModel, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidInterval, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listEntryModels, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadModelEntries, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelEntriesPath, modelListCandidates, needsAllowlist, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, normalizeModelEntry, normalizeTrigger, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelEntry, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readEntryKey, readImageSize, readMarketplaces, readPluginAbout, readPluginIcon, readPluginManifest, readPluginRecords, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, saveModelEntries, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, testModelEntry, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, unsetUserSetting, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
|
21810
|
+
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, type AcquireResult, type ActivePlugin, type AgentConfig, AgentLoop, type AgentProvider, type AgentSite, type AgentSiteRef, AppearanceStore, type AppendMessageInput, ApprovalCache, type ApprovalDecision, type ArtifactOpenRefusal, type ArtifactRetention, type AskQuestionDeps, type AttachmentRetention, BLOCKED_TOOLS, type BackendOptions, type BackendOutcome, type BackgroundTaskSource, type BaseOrigin, type BaseSlot, type BeginTurnInput, type BreakdownInput, BudgetGuard, type BudgetGuardOptions, type BudgetInfo, type BudgetLevel, type BudgetOptions, type BudgetStatus, BudgetStore, type BudgetStoreOptions, type BuildFireArgvInput, type BuildIndexOptions, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, type CachedApproval, type CachedDecision, type CheckpointCapture, type CheckpointFile, CheckpointManager, type CheckpointManagerOptions, type CheckpointManifest, CheckpointStore, type CheckpointStoreOptions, type CheckpointSummary, type ClaudeHooksParseOptions, type CodeModeLimits, type CodeRequest, type CodeResult, CodeSandbox, type CommandHookConfig, type CommandHookResult, type CommandLoadOutcome, type CommandLoadSummary, type CommandResult, type CommandRunner, type CompactionResult, type CompiledRules, type ComplianceDirSpec, type ComplianceDirsSummary, ComplianceEngine, type ComplianceEngineInput, type ComplianceGate, type ComplianceHit, type ComplianceRule, type ComplianceRuleSource, type ComplianceSettings, type ComplianceVerdict, type CompressConfig, type CompressResult, type ConfigMigration, type ConfigOrigins, ContextCompressor, type ContextEngine, type CreateScheduleInput, type CreateSessionInput, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, type DelegateArgs, type DelegateConfig, DelegateManager, type DelegateTaskResult, type DiagnoseOptions, type DiscoverOutcome, type DiscoveredFile, type DoctorReport, type DraftParse, EMPTY_RULES, EPOCH_DISK_LEDGER, type EntryProbeCode, type EntryProbeResult, EpochConfigSchema, type ExpandOptions, type ExtractOutcome, FTS_TABLES, FTS_TRIGGERS, type FallbackEvent, type FileSlots, type FileSourceKind, type ForkInput, type FrontmatterParse, type FrontmatterSplit, type FtsHealth, type FtsReclaim, type FtsSpace, type FtsTableHealth, GOAL_BLOCK_CODES, type GateAxis, type GateVerdict, type GenerateInput, type GenerateOutput, type Goal, type GoalBlockReason, type GoalClear, type GoalPhase, type GoalPromptView, type GoalRefusal, type GoalRoundResult, GoalService, GoalStore, type GoalToolDeps, type GoalWrite, HEADLESS_AUDIT_CODES, type HeadlessPolicy, type HookConfigEntry, HookManager, type HookManagerOptions, type HookMatcher, type HookSourceKind, type HookSourceStatus, type HookSourcesOptions, type HookSourcesSummary, type HooksParseOutcome, type MemoryManager$1 as IMemoryManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, type SessionManager$1 as ISessionManager, type SkillSystem$1 as ISkillSystem, ImageLoadError, type ImageSize, type ImportDecision, type ImportGate, type ImportGoal, type ImportMessage, type ImportNode, type ImportPartsResult, type ImportSessionInput, type ImportSessionMeta, type ImportSessionResult, type ImportSkipReason, type ImportTodo, ImportTrustStore, type InstallDependency, type InstallOptions, type InstallOutcome, type InstallPreview, type InstallStep, type InstructionScan, type InstructionSource, type IsolationReason, type IsolationReport, type JsonSchemaDocument, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, type LastOpenSession, LastOpenSessions, type LayerOutcome, type LayerScalars, type LayerStatus, type LearningContext, type LearningResult, type LearningSkipReason, type LexiconLoadOutcome, type LifecycleOutcome, type ListCandidatesInput, type ListSessionsInput, type ListSessionsOutput, type LoadCommandsOptions, type LoadConfigOptions, type LoadKeybindingsOptions, type LoadKeybindingsResult, type LoadRolesOptions, type LoadedPlugin, type LockHolder, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_ENTRIES_FILE, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, type ManagedPolicy, ManagedPolicyError, type ManagedSettings, ManagedSettingsSchema, type MarketplaceCatalog, type MarketplaceCategory, type MarketplaceDisplay, type MarketplaceDisplayField, type MarketplaceEntry, type MarketplaceOutcome, type MarketplaceRecord, type MarketplaceStatus, type MemoryConfig, type MemoryEntry, type MemoryImportRecord, type MemoryImportResult, MemoryManager, type MemoryManagerOptions, type MemoryNotice, type MemoryRemoval, type MemorySearchResult, type MemoryTarget, type MemoryWriteResult, type MentionPart, type MentionResolution, type Message, type MessageHit, type MessageRecord, type MessageSurface, type ModelCapability, ModelFailureTracker, type ModelMetaEntry, type ModelPricing, type MultimodalPolicy, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, type NonInteractiveProbe, type OsTaskSnapshot, type OutputGuard, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_ICON_MAX_BYTES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, type PackFile, type PackLimits, type PackOutcome, type PackPlan, type PackPlanOutcome, type PermissionAuditCode, type PermissionAuditEntry, type PermissionAuditOutcome, type PermissionAuditScope, type PermissionAuditSnapshot, PermissionManager, type PersistFailureKind, type PersistedBudget, type PersistedPart, type PlanApprovalFn, type PlanEnterResult, type PlanModeDeps, PlanModeState, type PlanSettlement, type PluginAbout, type PluginArtifacts, type PluginAuthor, PluginAuthorSchema, type PluginCommandDir, type PluginCounts, type PluginDoc, type PluginHookFile, type PluginInventory, type PluginLoadOptions, type PluginManifest, type PluginPathRef, type PluginRecord, type PluginScope, type PluginSettingsFile, type PluginSourceType, type PluginStateReadOutcome, PluginStore, type PluginVisibility, type PolicyDirSpec, type PolicyDirsSummary, type PolicyLoadOutcome, type PolicyRule, PolicyRuleSchema, type PricingAt, type PricingOverride, type ProjectContext, type ProjectExtensionInventory, ProviderError, ProviderRouter, type ProviderStreamChunk, type ProviderToolCall$1 as ProviderToolCall, type ProviderWarning, type PruneResult, type QuestionAskFn, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, type ReadMessagesInput, type ReadMessagesOutput, type RecentWorkspace, RecentWorkspaces, type RecordRunInput, type RecorderOptions, type RecoveryAction, type RegisterInput, type RegisterOutcome, type RegistrarOptions, type RegistrationPatch, type RepairOutcome, type ResolveMentionsOptions, type ResolveReferenceInput, type ResolveSettingsOptions, type ResolvedCompression, type ResolvedReference, type ResolvedSource, type ResponseFormat, type RestorePartsOptions, type RewindAction, type RewindDrift, type RewindFilePlan, type RewindOptions, type RewindOutcome, type RewindPreview, type RoleCreateFailure, type RoleCreateInput, type RoleCreateOptions, type RoleCreateOutcome, type RoleLoadOutcome, type RoleLoadSummary, type RoleMergeNotice, type RoleMergeResult, type RoleRemoveFailure, type RoleRemoveOptions, type RoleRemoveOutcome, type RoleScope, type RuleMatch, type RuleSuggestion, type RuleVerdict, type RunCodeFailure, type RunCodeInput, type RunCodeOutcome, type RunCodeToolDeps, type RunEstimateInput, type RunInput, type RunResult, type RunningSchedule, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, type ScalarKey, type ScanInstructionsOptions, type ScheduleArgvRefusal, type ScheduleArgvResult, type ScheduleArgvWarning, type ScheduleBackend, type ScheduleCliEntry, type ScheduleDraftDeps, type ScheduleDrift, type ScheduleDriftKind, type ScheduleImportInput, type ScheduleInstallForm, type ScheduleIssue, type ScheduleIssueCode, type ScheduleLock, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, type ScheduleValidation, type SchemaExport, type SearchHit, type SearchInput, type SearchMessagesInput, type SearchMessagesOutput, type SearchOutput, type SearchSessionsInput, type SelectionDeps, type SelfConnector, type SelfIndexInput, type SelfSettings, type Session, type SessionCandidate, type SessionHit, SessionManager, type SessionMentionDeps, type SessionMeta, SessionQueries, SessionReferences, type SessionSearchDeps, type SessionStats, type SessionSurface, type SessionTrace, type SessionVisibility, type SessionVisibilityInput, type SettingApply, type SettingApplyFacts, type SettingChain, type SettingFutile, type SettingLayer, type SettingStep, type SettingValue, type SettingValueKind, type SettingWriteFailure, type SettingWriteKey, type SettingWriteLayer, type SettingWriteOutcome, type SettingWriteRequest, type SettingWriteTarget, type SettingWriteTargetsOptions, type SettingsFile, SettingsFileError, SettingsFileSchema, type SettingsLayer, type SettingsResolution, type ShadowFinding, type ShadowKind, type Skill, type SkillDirSource, type SkillDirSpec, type SkillDirsSummary, type SkillImportConflict, type SkillImportDone, type SkillImportEntry, type SkillImportFailure, type SkillImportForm, type SkillImportOptions, type SkillImportPreview, type SkillImportResult, type SkillIndexEntry, type SkillIndexOptions, type SkillIndexResidency, type SkillIndexStats, SkillLearner, type SkillLearningProvider, type SkillMeta, type SkillStats, SkillSystem, type SkillSystemOptions, type SkillViewDeps, type SkillWriteDeps, type SteerSource, type StoredAppearance, type SubAgentRunner, type SubTask, type SubToolCaller, type SummarizeOutput, type SurfaceMessage, type SystemPromptParams, type SystemPromptSegments, TOOL_SEARCH_TOOL, TaskNoticeTracker, type TodoItem, type ToolCall, type ToolConflict, type ToolGate, type ToolNameFidelity, type ToolNameLookup, ToolRegistry, type ToolRevealState, type ToolScope, type ToolSearchDeps, type ToolTableCost, type TraceInput, type TraceNode, TrackerDB, type TrustDecision, type TrustGate, type TrustGateOptions, TrustManager, type TurnRecord, type TurnTiming, UNSETTABLE_USER_KEYS, type UpdateScheduleInput, type UtilityModelInfo, type ValidateScheduleInput, type VersionCheck, Workspace, type WorkspaceFiles, type WorkspaceIssue, type WorkspaceIssueKind, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, capabilityOfRef, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createPluginScope, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, discoverySpec, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, hasUsableModel, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidInterval, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listEntryModels, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadModelEntries, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelEntriesPath, modelListCandidates, needsAllowlist, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, normalizeModelEntry, normalizeTrigger, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelEntry, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readEntryKey, readImageSize, readMarketplaces, readPluginAbout, readPluginIcon, readPluginManifest, readPluginRecords, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, saveModelEntries, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, testModelEntry, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, unsetUserSetting, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { REASONING_EFFORTS, MODEL_ENTRY_PROTOCOLS, PROVIDER_TYPES, isModelEntryId, parseModelRef, OPERATION_TYPES as OPERATION_TYPES$1, COMPLIANCE_CATEGORIES, COMPLIANCE_ACTIONS, SEARCH_PROVIDER_TYPES, CURRENCIES, LANGS, isSettingsPaneId, SETTINGS_PANE_IDS, BRAND_WHEN_SIDEBAR_COLLAPSED, PERMISSION_LEVELS, SHELL_KINDS, cronTimes, SCHEDULE_MAX_TIMES_PER_DAY, SCHEDULE_INTERVAL_MIN_MINUTES, SCHEDULE_INTERVAL_MAX_MINUTES, ToolExposure, MIN_OPTIONS, MAX_OPTIONS, MAX_HEADER_CHARS, MAX_QUESTIONS, isPermissionLevel, SCHEDULE_DRAFT_TOOL, isValidAgentRoleName, DEFAULT_AGENT_ROLE, isValidCommandName, RESERVED_COMMAND_NAMES, isWirePluginArchiveName, systemNote, formatMoney, totalUsageTokens, NOOP_TELEMETRY, METRIC, contentToText, GEN_AI, isPromptOversize, promptTokens, entrySecretName, isEntrySecretName, entryRef, KEY_ACTIONS, tableOf, perAction, isKeyAction, parseSequence, RESERVED_CHORDS, chordId, sequenceId, ACTION_CONTEXTS, SEQUENCE_CONTEXTS, assertNeverPart, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_SESSION_REFS, utf8ByteLength, truncateToBudget, attachSessionSurface, isContextNearlyFull, isOperationType, normalizeApproval, imagePartOmittedSummary, ENTRY_REF_PREFIX, MAX_ATTACH_BYTES, SIMULTANEOUS_CONTEXTS, SESSION_REFERENCE_ERROR_CODES, filePartSummary, sessionPartSummary } from '@epoch-agent/protocol';
|
|
1
|
+
import { REASONING_EFFORTS, MODEL_ENTRY_PROTOCOLS, PROVIDER_TYPES, isModelEntryId, parseModelRef, OPERATION_TYPES as OPERATION_TYPES$1, COMPLIANCE_CATEGORIES, COMPLIANCE_ACTIONS, SEARCH_PROVIDER_TYPES, CURRENCIES, LANGS, isSettingsPaneId, SETTINGS_PANE_IDS, BRAND_WHEN_SIDEBAR_COLLAPSED, PERMISSION_LEVELS, SHELL_KINDS, cronTimes, SCHEDULE_MAX_TIMES_PER_DAY, SCHEDULE_INTERVAL_MIN_MINUTES, SCHEDULE_INTERVAL_MAX_MINUTES, ToolExposure, MIN_OPTIONS, MAX_OPTIONS, MAX_HEADER_CHARS, MAX_QUESTIONS, isPermissionLevel, SCHEDULE_DRAFT_TOOL, isValidAgentRoleName, DEFAULT_AGENT_ROLE, isValidCommandName, RESERVED_COMMAND_NAMES, isWirePluginArchiveName, systemNote, formatMoney, totalUsageTokens, NOOP_TELEMETRY, METRIC, contentToText, GEN_AI, isPromptOversize, promptTokens, entrySecretName, isEntrySecretName, entryRef, KEY_ACTIONS, tableOf, perAction, isKeyAction, parseSequence, RESERVED_CHORDS, chordId, sequenceId, ACTION_CONTEXTS, SEQUENCE_CONTEXTS, assertNeverPart, normalizeAppearanceTranslucent, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_SESSION_REFS, utf8ByteLength, truncateToBudget, attachSessionSurface, isContextNearlyFull, isOperationType, normalizeApproval, imagePartOmittedSummary, ENTRY_REF_PREFIX, MAX_ATTACH_BYTES, SIMULTANEOUS_CONTEXTS, SESSION_REFERENCE_ERROR_CODES, filePartSummary, sessionPartSummary } from '@epoch-agent/protocol';
|
|
2
2
|
export { API_KEY_ENV_VARS, COMPLIANCE_ACTIONS, COMPLIANCE_CATEGORIES, MAX_ATTACH_BYTES, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_SESSION_ATTACH_BYTES, MAX_SESSION_REFS, OPERATION_TYPES, PERMISSION_LEVELS, PLAN_OUTCOMES, PROVIDER_INFOS, PROVIDER_TYPES, ToolExposure, apiKeyEnvVar, extractAllMentions, extractMentions, extractSessionMentions, getProviderInfo, isOperationType, isPermissionLevel, isPlanOutcome, isProviderType, normalizeApproval } from '@epoch-agent/protocol';
|
|
3
3
|
import { existsSync, statSync, readdirSync, readFileSync, mkdirSync, writeFileSync, rmSync, renameSync, realpathSync, symlinkSync, cpSync, lstatSync, unlinkSync, rmdirSync, mkdtempSync, copyFileSync, openSync, writeSync, closeSync, readSync } from 'fs';
|
|
4
4
|
import { homedir, platform, tmpdir, hostname } from 'os';
|
|
@@ -5899,6 +5899,22 @@ function unknownRoleSkills(available2, role) {
|
|
|
5899
5899
|
const names = new Set(available2);
|
|
5900
5900
|
return role.skills.filter((name) => !names.has(name));
|
|
5901
5901
|
}
|
|
5902
|
+
// src/agent-plugin/scope.ts
|
|
5903
|
+
function createPluginScope(initial) {
|
|
5904
|
+
let perMessage = initial;
|
|
5905
|
+
return {
|
|
5906
|
+
enter: (plugin) => {
|
|
5907
|
+
const prev = perMessage;
|
|
5908
|
+
perMessage = plugin;
|
|
5909
|
+
return () => {
|
|
5910
|
+
perMessage = prev;
|
|
5911
|
+
};
|
|
5912
|
+
},
|
|
5913
|
+
get current() {
|
|
5914
|
+
return perMessage;
|
|
5915
|
+
}
|
|
5916
|
+
};
|
|
5917
|
+
}
|
|
5902
5918
|
var MAX_COMMAND_DEPTH = 3;
|
|
5903
5919
|
function discoverMarkdown(root) {
|
|
5904
5920
|
const files = [];
|
|
@@ -6494,9 +6510,36 @@ var ManifestSchema = z.object({
|
|
|
6494
6510
|
category: z.string().min(1).optional(),
|
|
6495
6511
|
icon: z.string().min(1).optional(),
|
|
6496
6512
|
changelog: z.string().min(1).optional(),
|
|
6497
|
-
visibility: z.enum(PLUGIN_VISIBILITY).optional().catch(void 0)
|
|
6513
|
+
visibility: z.enum(PLUGIN_VISIBILITY).optional().catch(void 0),
|
|
6514
|
+
appearance: z.array(z.record(z.string(), z.unknown())).optional().catch(void 0),
|
|
6515
|
+
panel: z.object({
|
|
6516
|
+
title: z.string().min(1).optional(),
|
|
6517
|
+
url: z.string().min(1).refine(isLoopbackUrl),
|
|
6518
|
+
height: z.number().finite().positive().optional()
|
|
6519
|
+
}).optional().catch(void 0)
|
|
6498
6520
|
});
|
|
6521
|
+
function isLoopbackUrl(raw) {
|
|
6522
|
+
let url;
|
|
6523
|
+
try {
|
|
6524
|
+
url = new URL(raw);
|
|
6525
|
+
} catch {
|
|
6526
|
+
return false;
|
|
6527
|
+
}
|
|
6528
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return false;
|
|
6529
|
+
return url.hostname === "127.0.0.1" || url.hostname === "localhost";
|
|
6530
|
+
}
|
|
6499
6531
|
var PLUGIN_MANIFEST_KEYS = Object.keys(ManifestSchema.shape);
|
|
6532
|
+
function panelIssues(path, raw) {
|
|
6533
|
+
const at = `${path}.panel`;
|
|
6534
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
6535
|
+
return [{ path: at, message: t("plugin_manifest.bad_panel", { reason: "object" }) }];
|
|
6536
|
+
}
|
|
6537
|
+
const url = raw["url"];
|
|
6538
|
+
if (typeof url !== "string" || !isLoopbackUrl(url)) {
|
|
6539
|
+
return [{ path: at, message: t("plugin_manifest.bad_panel", { reason: "loopback" }) }];
|
|
6540
|
+
}
|
|
6541
|
+
return [];
|
|
6542
|
+
}
|
|
6500
6543
|
function readPluginManifest(dir) {
|
|
6501
6544
|
const path = join(dir, PLUGIN_MANIFEST_FILE);
|
|
6502
6545
|
let raw;
|
|
@@ -6549,6 +6592,10 @@ function readPluginManifest(dir) {
|
|
|
6549
6592
|
}
|
|
6550
6593
|
}
|
|
6551
6594
|
}
|
|
6595
|
+
const rawPanel = parsed?.panel;
|
|
6596
|
+
if (rawPanel !== void 0) {
|
|
6597
|
+
issues.push(...panelIssues(path, rawPanel));
|
|
6598
|
+
}
|
|
6552
6599
|
const checked = parseLenient(ManifestSchema.optional(), parsed, void 0);
|
|
6553
6600
|
if (!checked.value) {
|
|
6554
6601
|
issues.push(
|
|
@@ -9448,7 +9495,11 @@ function renderSelfIndex(input) {
|
|
|
9448
9495
|
rules.push(
|
|
9449
9496
|
`\u63D2\u4EF6\u81EA\u5DF1\u4E0D\u80FD\u88AB\u8C03\u7528\uFF0C\u5B83\u80FD\u5E2E\u4EC0\u4E48\u5FD9\u770B\u5B83\u5E26\u6765\u7684\u90A3\u51E0\u6837\u3002\u95EE\u300C\u67D0\u4E2A\u63D2\u4EF6\u80FD\u5E72\u561B\u300D\u5C31\u8BFB ${join(pluginsDir(input.homeDir), "<\u63D2\u4EF6\u540D>")} \u4E0B\u7684 epoch-plugin.json \u548C README.md\uFF0C\u4E00\u6B21\u5B9A\u70B9\u8BFB\uFF0C\u522B\u626B\u5BB6\u76EE\u5F55\u3002`
|
|
9450
9497
|
);
|
|
9451
|
-
|
|
9498
|
+
const active = input.activePlugin;
|
|
9499
|
+
if (active) {
|
|
9500
|
+
const who = active.displayName ? `\u300C${active.displayName}\u300D\uFF08${active.name}\uFF09` : active.name;
|
|
9501
|
+
rules.push(`\u7528\u6237\u70B9\u4E86\u63D2\u4EF6 ${who}\uFF0C\u8FD9\u4E00\u8F6E\u4F18\u5148\u7528\u5B83\u5E26\u6765\u7684\u4E1C\u897F\uFF1B\u5BF9\u4E0D\u4E0A\u5C31\u76F4\u8BF4\u4E00\u53E5\uFF0C\u8D70\u6700\u8FD1\u7684\u9000\u8DEF\u3002`);
|
|
9502
|
+
}
|
|
9452
9503
|
}
|
|
9453
9504
|
rules.push(
|
|
9454
9505
|
"\u5BB6\u76EE\u5F55\u4E0B\u4F60\u53EA\u8BFB\u5F97\u5230\u63D2\u4EF6\u76EE\u5F55\u90A3\u4E00\u683C\uFF1Bconfig.yaml / .env / mcp.json / hooks.json / plugins.json / sessions.db \u90FD\u8BFB\u4E0D\u5230\uFF08\u91CC\u9762\u6709\u51ED\u636E\uFF09\uFF0C\u522B\u8BD5\u3002\u7528\u6237\u95EE\u90A3\u91CC\u9762\u7684\u8BBE\u7F6E\uFF0C\u5C31\u8BF4\u4F60\u770B\u4E0D\u5230\u3002"
|
|
@@ -10705,6 +10756,7 @@ var ProviderError = class extends Error {
|
|
|
10705
10756
|
var PROVIDER_NO_CREDENTIAL = 1001;
|
|
10706
10757
|
var PROVIDER_ABORTED = 1060;
|
|
10707
10758
|
var PROVIDER_CONTEXT_OVERFLOW = 1030;
|
|
10759
|
+
var PROVIDER_BODY_TOO_LARGE = 1051;
|
|
10708
10760
|
function isContextOverflow(err) {
|
|
10709
10761
|
if (err instanceof ProviderError) return err.code === PROVIDER_CONTEXT_OVERFLOW;
|
|
10710
10762
|
return classifyProviderError(err).code === PROVIDER_CONTEXT_OVERFLOW;
|
|
@@ -10780,6 +10832,10 @@ function classifyProviderError(err) {
|
|
|
10780
10832
|
return { code: PROVIDER_CONTEXT_OVERFLOW, recovery: "abort" };
|
|
10781
10833
|
if (/invalid.*api.?key|unauthorized|authentication|permission.?denied|forbidden/i.test(msg))
|
|
10782
10834
|
return { code: 1001, recovery: "rotate_credential" };
|
|
10835
|
+
if (/request.?entity.?too.?large|payload.?too.?large|request.?body.?too.?large|body.?size.?(?:exceeds|limit)|content.?too.?large|请求体(?:过大|太大|超大|超过)|报文过大/i.test(
|
|
10836
|
+
msg
|
|
10837
|
+
))
|
|
10838
|
+
return { code: PROVIDER_BODY_TOO_LARGE, recovery: "abort" };
|
|
10783
10839
|
if (/billing|quota.*exceeded|insufficient.*(balance|credit)|payment.?required/i.test(msg))
|
|
10784
10840
|
return { code: 1012, recovery: "switch_provider" };
|
|
10785
10841
|
if (/rate.?limit|too.?many.?requests/i.test(msg)) return { code: 1010, recovery: "retry" };
|
|
@@ -10792,6 +10848,7 @@ function classifyProviderError(err) {
|
|
|
10792
10848
|
if (code !== void 0) {
|
|
10793
10849
|
if (code === 401 || code === 403) return { code: 1001, recovery: "rotate_credential" };
|
|
10794
10850
|
if (code === 402) return { code: 1012, recovery: "switch_provider" };
|
|
10851
|
+
if (code === 413) return { code: PROVIDER_BODY_TOO_LARGE, recovery: "abort" };
|
|
10795
10852
|
if (code === 404) return { code: 1040, recovery: "switch_model" };
|
|
10796
10853
|
if (code === 429) return { code: 1010, recovery: "retry" };
|
|
10797
10854
|
if (code >= 500) return { code: 1020, recovery: "retry" };
|
|
@@ -13382,6 +13439,9 @@ var EpochConfigSchema = z.object({
|
|
|
13382
13439
|
sidebarHeadMenu: z.array(SidebarMenuItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
|
|
13383
13440
|
message: "sidebarHeadMenu: id must be unique"
|
|
13384
13441
|
}).optional(),
|
|
13442
|
+
topbarMenu: z.array(SidebarMenuItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
|
|
13443
|
+
message: "topbarMenu: id must be unique"
|
|
13444
|
+
}).optional(),
|
|
13385
13445
|
blankCards: z.array(BlankCardSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
|
|
13386
13446
|
message: "blankCards: id must be unique"
|
|
13387
13447
|
}).optional(),
|
|
@@ -14777,7 +14837,7 @@ var TOOL_RESULT_MEDIA = {
|
|
|
14777
14837
|
google: true,
|
|
14778
14838
|
azure: true,
|
|
14779
14839
|
"amazon-bedrock": true,
|
|
14780
|
-
deepseek:
|
|
14840
|
+
deepseek: true,
|
|
14781
14841
|
"openai-compatible": false,
|
|
14782
14842
|
zhipu: false,
|
|
14783
14843
|
bytedance: false,
|
|
@@ -14785,7 +14845,7 @@ var TOOL_RESULT_MEDIA = {
|
|
|
14785
14845
|
groq: false,
|
|
14786
14846
|
mistral: false,
|
|
14787
14847
|
dashscope: false,
|
|
14788
|
-
xai:
|
|
14848
|
+
xai: true,
|
|
14789
14849
|
cohere: false,
|
|
14790
14850
|
moonshotai: false,
|
|
14791
14851
|
togetherai: false,
|
|
@@ -14888,6 +14948,9 @@ function maxOptions(dialect) {
|
|
|
14888
14948
|
return void 0;
|
|
14889
14949
|
}
|
|
14890
14950
|
}
|
|
14951
|
+
function offOptions(dialect) {
|
|
14952
|
+
return dialect === "openai-compatible" ? { openaiCompatible: { reasoningEffort: "none" } } : void 0;
|
|
14953
|
+
}
|
|
14891
14954
|
function dialectOf(provider, entry) {
|
|
14892
14955
|
if (provider === "openai-compatible") {
|
|
14893
14956
|
return entry?.protocol === "anthropic-messages" ? "anthropic" : "openai-compatible";
|
|
@@ -14900,7 +14963,10 @@ function dialectOf(provider, entry) {
|
|
|
14900
14963
|
}
|
|
14901
14964
|
function reasoningArgs(choice, dialect) {
|
|
14902
14965
|
if (choice === void 0) return void 0;
|
|
14903
|
-
if (choice === "off")
|
|
14966
|
+
if (choice === "off") {
|
|
14967
|
+
const extra2 = offOptions(dialect);
|
|
14968
|
+
return extra2 ? { reasoning: "none", providerOptions: extra2 } : { reasoning: "none" };
|
|
14969
|
+
}
|
|
14904
14970
|
if (choice !== "max") return { reasoning: choice };
|
|
14905
14971
|
const extra = maxOptions(dialect);
|
|
14906
14972
|
return extra ? { reasoning: "xhigh", providerOptions: extra } : { reasoning: "xhigh" };
|
|
@@ -15602,7 +15668,7 @@ var STATIC_MODEL_CATALOG = {
|
|
|
15602
15668
|
qianfan: ["ernie-5.0", "ernie-speed-128k", "ernie-4.0-turbo-8k"],
|
|
15603
15669
|
cohere: ["command-r-plus-04-2024", "command-r7b-12-2024", "command-a-03-2025"],
|
|
15604
15670
|
xai: ["grok-vision-beta"],
|
|
15605
|
-
perplexity: ["
|
|
15671
|
+
perplexity: ["fast", "low", "medium", "high", "xhigh"],
|
|
15606
15672
|
togetherai: ["meta-llama/Llama-3.3-70B-Instruct-Turbo"],
|
|
15607
15673
|
ollama: [],
|
|
15608
15674
|
"openai-compatible": []
|
|
@@ -19653,7 +19719,8 @@ function isLastOpenSession(value) {
|
|
|
19653
19719
|
return typeof v["root"] === "string" && v["root"].length > 0 && typeof v["sessionId"] === "string" && v["sessionId"].length > 0 && typeof v["at"] === "number";
|
|
19654
19720
|
}
|
|
19655
19721
|
var isWidthShaped = (value) => typeof value === "number" && Number.isInteger(value) && value > 0;
|
|
19656
|
-
var FILE_VERSION4 =
|
|
19722
|
+
var FILE_VERSION4 = 2;
|
|
19723
|
+
var isPlainObject2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19657
19724
|
function describe9(err) {
|
|
19658
19725
|
return err instanceof Error ? err.message : String(err);
|
|
19659
19726
|
}
|
|
@@ -19676,12 +19743,46 @@ var AppearanceStore = class {
|
|
|
19676
19743
|
if (typeof value === "string" && value.length > 0) next[key] = value;
|
|
19677
19744
|
}
|
|
19678
19745
|
if (isWidthShaped(patch.sidebarWidth)) next.sidebarWidth = patch.sidebarWidth;
|
|
19679
|
-
if (
|
|
19746
|
+
if (isWidthShaped(patch.diffTreeWidth)) next.diffTreeWidth = patch.diffTreeWidth;
|
|
19747
|
+
if (typeof patch.accent === "string" && patch.accent.length > 0) next.accent = patch.accent;
|
|
19748
|
+
if (typeof patch.themeName === "string" && patch.themeName.length > 0)
|
|
19749
|
+
next.themeName = patch.themeName;
|
|
19750
|
+
if (typeof patch.canvasColor === "string" && patch.canvasColor.length > 0)
|
|
19751
|
+
next.canvasColor = patch.canvasColor;
|
|
19752
|
+
if (typeof patch.inkColor === "string" && patch.inkColor.length > 0)
|
|
19753
|
+
next.inkColor = patch.inkColor;
|
|
19754
|
+
if (typeof patch.saidColor === "string" && patch.saidColor.length > 0)
|
|
19755
|
+
next.saidColor = patch.saidColor;
|
|
19756
|
+
if (isWidthShaped(patch.fontSize)) next.fontSize = patch.fontSize;
|
|
19757
|
+
if (isWidthShaped(patch.codeFontSize)) next.codeFontSize = patch.codeFontSize;
|
|
19758
|
+
if (typeof patch.uiFont === "string" && patch.uiFont.length > 0) next.uiFont = patch.uiFont;
|
|
19759
|
+
if (typeof patch.codeFont === "string" && patch.codeFont.length > 0)
|
|
19760
|
+
next.codeFont = patch.codeFont;
|
|
19761
|
+
if (typeof patch.reduceMotion === "string" && patch.reduceMotion.length > 0)
|
|
19762
|
+
next.reduceMotion = patch.reduceMotion;
|
|
19763
|
+
const translucent = normalizeAppearanceTranslucent(patch.translucentSidebar);
|
|
19764
|
+
if (translucent !== void 0) next.translucentSidebar = translucent;
|
|
19765
|
+
if (isWidthShaped(patch.contrast)) next.contrast = patch.contrast;
|
|
19766
|
+
if (typeof patch.perMode === "boolean") next.perMode = patch.perMode;
|
|
19767
|
+
if (isPlainObject2(patch.light)) next.light = patch.light;
|
|
19768
|
+
if (isPlainObject2(patch.dark)) next.dark = patch.dark;
|
|
19769
|
+
if (isPlainObject2(patch.background)) next.background = patch.background;
|
|
19770
|
+
if (JSON.stringify(next) === JSON.stringify(this.prefs)) {
|
|
19680
19771
|
return;
|
|
19681
19772
|
}
|
|
19682
19773
|
this.prefs = next;
|
|
19683
19774
|
this.save();
|
|
19684
19775
|
}
|
|
19776
|
+
clear() {
|
|
19777
|
+
this.prefs = {};
|
|
19778
|
+
try {
|
|
19779
|
+
rmSync(this.filePath, { force: true });
|
|
19780
|
+
} catch (err) {
|
|
19781
|
+
this.writeErrors.push(
|
|
19782
|
+
(lang) => t("appearance.write_failed", { path: this.filePath, reason: describe9(err) }, lang)
|
|
19783
|
+
);
|
|
19784
|
+
}
|
|
19785
|
+
}
|
|
19685
19786
|
load() {
|
|
19686
19787
|
this.prefs = {};
|
|
19687
19788
|
if (!existsSync(this.filePath)) return;
|
|
@@ -19699,10 +19800,34 @@ var AppearanceStore = class {
|
|
|
19699
19800
|
adopt(parsed) {
|
|
19700
19801
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return;
|
|
19701
19802
|
const file = parsed;
|
|
19702
|
-
if (file.version !== FILE_VERSION4) return;
|
|
19803
|
+
if (file.version !== FILE_VERSION4 && file.version !== 1) return;
|
|
19703
19804
|
if (typeof file.theme === "string" && file.theme.length > 0) this.prefs.theme = file.theme;
|
|
19704
19805
|
if (typeof file.lang === "string" && file.lang.length > 0) this.prefs.lang = file.lang;
|
|
19705
19806
|
if (isWidthShaped(file.sidebarWidth)) this.prefs.sidebarWidth = file.sidebarWidth;
|
|
19807
|
+
if (isWidthShaped(file.diffTreeWidth)) this.prefs.diffTreeWidth = file.diffTreeWidth;
|
|
19808
|
+
if (typeof file.accent === "string" && file.accent.length > 0) this.prefs.accent = file.accent;
|
|
19809
|
+
if (typeof file.themeName === "string" && file.themeName.length > 0)
|
|
19810
|
+
this.prefs.themeName = file.themeName;
|
|
19811
|
+
if (typeof file.canvasColor === "string" && file.canvasColor.length > 0)
|
|
19812
|
+
this.prefs.canvasColor = file.canvasColor;
|
|
19813
|
+
if (typeof file.inkColor === "string" && file.inkColor.length > 0)
|
|
19814
|
+
this.prefs.inkColor = file.inkColor;
|
|
19815
|
+
if (typeof file.saidColor === "string" && file.saidColor.length > 0)
|
|
19816
|
+
this.prefs.saidColor = file.saidColor;
|
|
19817
|
+
if (isWidthShaped(file.fontSize)) this.prefs.fontSize = file.fontSize;
|
|
19818
|
+
if (isWidthShaped(file.codeFontSize)) this.prefs.codeFontSize = file.codeFontSize;
|
|
19819
|
+
if (typeof file.uiFont === "string" && file.uiFont.length > 0) this.prefs.uiFont = file.uiFont;
|
|
19820
|
+
if (typeof file.codeFont === "string" && file.codeFont.length > 0)
|
|
19821
|
+
this.prefs.codeFont = file.codeFont;
|
|
19822
|
+
if (typeof file.reduceMotion === "string" && file.reduceMotion.length > 0)
|
|
19823
|
+
this.prefs.reduceMotion = file.reduceMotion;
|
|
19824
|
+
const translucent = normalizeAppearanceTranslucent(file.translucentSidebar);
|
|
19825
|
+
if (translucent !== void 0) this.prefs.translucentSidebar = translucent;
|
|
19826
|
+
if (isWidthShaped(file.contrast)) this.prefs.contrast = file.contrast;
|
|
19827
|
+
if (typeof file.perMode === "boolean") this.prefs.perMode = file.perMode;
|
|
19828
|
+
if (isPlainObject2(file.light)) this.prefs.light = file.light;
|
|
19829
|
+
if (isPlainObject2(file.dark)) this.prefs.dark = file.dark;
|
|
19830
|
+
if (isPlainObject2(file.background)) this.prefs.background = file.background;
|
|
19706
19831
|
}
|
|
19707
19832
|
save() {
|
|
19708
19833
|
const body2 = JSON.stringify(
|
|
@@ -21666,13 +21791,14 @@ var TextGuard = class {
|
|
|
21666
21791
|
const opener = line.trimStart();
|
|
21667
21792
|
if (opener.startsWith("```") || opener.startsWith("~~~")) {
|
|
21668
21793
|
this.inFence = !this.inFence;
|
|
21669
|
-
return
|
|
21794
|
+
return BLANK.repeat(line.length);
|
|
21670
21795
|
}
|
|
21671
|
-
if (this.inFence) return
|
|
21672
|
-
return line.replace(/`[^`]*`/g, (m) =>
|
|
21796
|
+
if (this.inFence) return BLANK.repeat(line.length);
|
|
21797
|
+
return line.replace(/`[^`]*`/g, (m) => BLANK.repeat(m.length));
|
|
21673
21798
|
}).join("\n");
|
|
21674
21799
|
}
|
|
21675
21800
|
};
|
|
21801
|
+
var BLANK = "\0";
|
|
21676
21802
|
function strongestOf(hits) {
|
|
21677
21803
|
return hits.reduce(
|
|
21678
21804
|
(acc, hit) => strongerAction(acc, hit.action),
|
|
@@ -25429,4 +25555,4 @@ function trunc(stdout, stderr) {
|
|
|
25429
25555
|
* `--tree` 的命令帮助里,让用户自己知道 `--tree` 意味着什么。
|
|
25430
25556
|
*/
|
|
25431
25557
|
|
|
25432
|
-
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, AgentLoop, AppearanceStore, ApprovalCache, BLOCKED_TOOLS, BudgetGuard, BudgetStore, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, CheckpointManager, CheckpointStore, CodeSandbox, ComplianceEngine, ContextCompressor, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, DelegateManager, EMPTY_RULES, EPOCH_DISK_LEDGER, EpochConfigSchema, FTS_TABLES, FTS_TRIGGERS, GOAL_BLOCK_CODES, GoalService, GoalStore, HEADLESS_AUDIT_CODES, HookManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, ImageLoadError, ImportTrustStore, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, LastOpenSessions, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_ENTRIES_FILE, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, ManagedPolicyError, ManagedSettingsSchema, MemoryManager, ModelFailureTracker, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_ICON_MAX_BYTES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, PermissionManager, PlanModeState, PluginAuthorSchema, PluginStore, PolicyRuleSchema, ProviderError, ProviderRouter, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, RecentWorkspaces, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, SessionManager, SessionQueries, SessionReferences, SettingsFileError, SettingsFileSchema, SkillLearner, SkillSystem, TOOL_SEARCH_TOOL, TaskNoticeTracker, ToolRegistry, TrackerDB, TrustManager, UNSETTABLE_USER_KEYS, Workspace, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, capabilityOfRef, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, discoverySpec, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, hasUsableModel, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidInterval, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listEntryModels, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadModelEntries, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelEntriesPath, modelListCandidates, needsAllowlist, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, normalizeModelEntry, normalizeTrigger, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelEntry, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readEntryKey, readImageSize, readMarketplaces, readPluginAbout, readPluginIcon, readPluginManifest, readPluginRecords, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand2 as runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, saveModelEntries, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, testModelEntry, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, unsetUserSetting, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
|
25558
|
+
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, AgentLoop, AppearanceStore, ApprovalCache, BLOCKED_TOOLS, BudgetGuard, BudgetStore, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, CheckpointManager, CheckpointStore, CodeSandbox, ComplianceEngine, ContextCompressor, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, DelegateManager, EMPTY_RULES, EPOCH_DISK_LEDGER, EpochConfigSchema, FTS_TABLES, FTS_TRIGGERS, GOAL_BLOCK_CODES, GoalService, GoalStore, HEADLESS_AUDIT_CODES, HookManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, ImageLoadError, ImportTrustStore, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, LastOpenSessions, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_ENTRIES_FILE, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, ManagedPolicyError, ManagedSettingsSchema, MemoryManager, ModelFailureTracker, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_ICON_MAX_BYTES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, PermissionManager, PlanModeState, PluginAuthorSchema, PluginStore, PolicyRuleSchema, ProviderError, ProviderRouter, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, RecentWorkspaces, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, SessionManager, SessionQueries, SessionReferences, SettingsFileError, SettingsFileSchema, SkillLearner, SkillSystem, TOOL_SEARCH_TOOL, TaskNoticeTracker, ToolRegistry, TrackerDB, TrustManager, UNSETTABLE_USER_KEYS, Workspace, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, capabilityOfRef, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createPluginScope, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, discoverySpec, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, hasUsableModel, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidInterval, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listEntryModels, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadModelEntries, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelEntriesPath, modelListCandidates, needsAllowlist, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, normalizeModelEntry, normalizeTrigger, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelEntry, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readEntryKey, readImageSize, readMarketplaces, readPluginAbout, readPluginIcon, readPluginManifest, readPluginRecords, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand2 as runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, saveModelEntries, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, testModelEntry, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, unsetUserSetting, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epoch-agent/core",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "epoch-agent 核心引擎:ReAct 循环、Provider 路由、工具调度、记忆管理",
|
|
6
6
|
"repository": {
|
|
@@ -22,30 +22,30 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"ai": "^7.0.
|
|
25
|
+
"ai": "^7.0.143",
|
|
26
26
|
"better-sqlite3": "^13.0.2",
|
|
27
27
|
"gpt-tokenizer": "^3.4.0",
|
|
28
28
|
"js-yaml": "^5.2.3",
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
|
-
"@epoch-agent/protocol": "2.0
|
|
31
|
-
"@epoch-agent/infra": "2.0
|
|
30
|
+
"@epoch-agent/protocol": "2.2.0",
|
|
31
|
+
"@epoch-agent/infra": "2.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@ai-sdk/alibaba": "^2.0.
|
|
35
|
-
"@ai-sdk/amazon-bedrock": "^5.0.
|
|
36
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
37
|
-
"@ai-sdk/azure": "^4.0.
|
|
38
|
-
"@ai-sdk/cohere": "^4.0.
|
|
39
|
-
"@ai-sdk/deepseek": "^3.0.
|
|
40
|
-
"@ai-sdk/google": "^4.0.
|
|
41
|
-
"@ai-sdk/groq": "^4.0.
|
|
42
|
-
"@ai-sdk/mistral": "^4.0.
|
|
43
|
-
"@ai-sdk/moonshotai": "^3.0.
|
|
44
|
-
"@ai-sdk/openai": "^4.0.
|
|
45
|
-
"@ai-sdk/openai-compatible": "^3.0.
|
|
46
|
-
"@ai-sdk/perplexity": "^
|
|
47
|
-
"@ai-sdk/togetherai": "^3.0.
|
|
48
|
-
"@ai-sdk/xai": "^
|
|
34
|
+
"@ai-sdk/alibaba": "^2.0.69",
|
|
35
|
+
"@ai-sdk/amazon-bedrock": "^5.0.118",
|
|
36
|
+
"@ai-sdk/anthropic": "^4.0.82",
|
|
37
|
+
"@ai-sdk/azure": "^4.0.104",
|
|
38
|
+
"@ai-sdk/cohere": "^4.0.63",
|
|
39
|
+
"@ai-sdk/deepseek": "^3.0.67",
|
|
40
|
+
"@ai-sdk/google": "^4.0.99",
|
|
41
|
+
"@ai-sdk/groq": "^4.0.63",
|
|
42
|
+
"@ai-sdk/mistral": "^4.0.66",
|
|
43
|
+
"@ai-sdk/moonshotai": "^3.0.71",
|
|
44
|
+
"@ai-sdk/openai": "^4.0.96",
|
|
45
|
+
"@ai-sdk/openai-compatible": "^3.0.71",
|
|
46
|
+
"@ai-sdk/perplexity": "^5.0.14",
|
|
47
|
+
"@ai-sdk/togetherai": "^3.0.72",
|
|
48
|
+
"@ai-sdk/xai": "^5.0.24",
|
|
49
49
|
"@types/better-sqlite3": "^7.6.13",
|
|
50
50
|
"@types/js-yaml": "^4.0.9",
|
|
51
51
|
"@types/node": "^22.0.0",
|
|
@@ -55,21 +55,21 @@
|
|
|
55
55
|
"vitest": "^3.0.0"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@ai-sdk/alibaba": "^2.0.
|
|
59
|
-
"@ai-sdk/amazon-bedrock": "^5.0.
|
|
60
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
61
|
-
"@ai-sdk/azure": "^4.0.
|
|
62
|
-
"@ai-sdk/cohere": "^4.0.
|
|
63
|
-
"@ai-sdk/deepseek": "^3.0.
|
|
64
|
-
"@ai-sdk/google": "^4.0.
|
|
65
|
-
"@ai-sdk/groq": "^4.0.
|
|
66
|
-
"@ai-sdk/mistral": "^4.0.
|
|
67
|
-
"@ai-sdk/moonshotai": "^3.0.
|
|
68
|
-
"@ai-sdk/openai": "^4.0.
|
|
69
|
-
"@ai-sdk/openai-compatible": "^3.0.
|
|
70
|
-
"@ai-sdk/perplexity": "^
|
|
71
|
-
"@ai-sdk/togetherai": "^3.0.
|
|
72
|
-
"@ai-sdk/xai": "^
|
|
58
|
+
"@ai-sdk/alibaba": "^2.0.69",
|
|
59
|
+
"@ai-sdk/amazon-bedrock": "^5.0.118",
|
|
60
|
+
"@ai-sdk/anthropic": "^4.0.82",
|
|
61
|
+
"@ai-sdk/azure": "^4.0.104",
|
|
62
|
+
"@ai-sdk/cohere": "^4.0.63",
|
|
63
|
+
"@ai-sdk/deepseek": "^3.0.67",
|
|
64
|
+
"@ai-sdk/google": "^4.0.99",
|
|
65
|
+
"@ai-sdk/groq": "^4.0.63",
|
|
66
|
+
"@ai-sdk/mistral": "^4.0.66",
|
|
67
|
+
"@ai-sdk/moonshotai": "^3.0.71",
|
|
68
|
+
"@ai-sdk/openai": "^4.0.96",
|
|
69
|
+
"@ai-sdk/openai-compatible": "^3.0.71",
|
|
70
|
+
"@ai-sdk/perplexity": "^5.0.14",
|
|
71
|
+
"@ai-sdk/togetherai": "^3.0.72",
|
|
72
|
+
"@ai-sdk/xai": "^5.0.24",
|
|
73
73
|
"ollama-ai-provider-v2": "^4.0.1"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|