@epoch-agent/core 3.1.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@ Agent 引擎。ReAct 循环、Provider 路由、权限、记忆、技能、Hook
16
16
 
17
17
  | 目录 | 职责 |
18
18
  | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
- | `agent/` | ReAct 循环(`loop.ts`)、工具执行、实时输出泵、prompt 组装、Nudge / Stall 检测、消息编解码、plan 模式状态、**运行前 token 估算**(`run-estimate.ts`)、**沙箱升权门的措辞层**(`escalation.ts`:判据在 infra 的 `sandbox/escalation.ts`,入口在 `tool-executor.ts` 的 `resolveEscalation()`,2026-10-27 方案 65 §2.1) |
19
+ | `agent/` | ReAct 循环(`loop.ts`)、工具执行、实时输出泵、prompt 组装、Nudge / Stall 检测、消息编解码、plan 模式状态、**运行前 token 估算**(`run-estimate.ts`)、**沙箱升权门的措辞层**(`escalation.ts`:判据在 infra 的 `sandbox/escalation.ts`,入口在 `tool-executor.ts` 的 `resolveEscalation()`,2026-10-27 方案 65 §2.1)。⚠️ **附件(图 / `@文件` / `@:` 引用的会话)必须以 `parts` 一起送出去**(2026-11-05 修):只把它们折进 `content` 那份文本投影的话,模型收到的是一行 `[referenced session "…"]` 元数据、正文一个字都没有 —— 守着这件事的是 `__tests__/session-reference-delivery.test.ts`(走真 `AgentLoop`) |
20
20
  | `provider/` | 多 provider 路由 + 降级、模型元数据探测、AI SDK 适配、**token 估算**(`tokenizer.ts`,全仓唯一口径) |
21
21
  | `config/` | 10 层配置解析链 + 迁移 + 设置来源分层(`sources.ts`)+ **「为什么是这个值」**(`provenance.ts`,每个键赢在哪一层)+ **「我现在写、写完谁说了算」**(`write.ts`)+ JSON Schema 导出。`schema.ts` 是配置形状的**唯一**真源 |
22
22
  | `session/` | SQLite 会话持久化 + FTS5 搜索,落盘完整 `EpochMessage`(工具调用 / artifact 引用)+ 逐轮真实用量(`recordUsage`)+ 已批准的计划 + **那一次工作区决定**(v7 两列,见下)。开给模型那一侧的检索 / 前后文窗口 / 血缘在 `query.ts` + `trace.ts`,开给人那一侧的 `@:` 引用(候选 / 解析 / 当前面)在 `reference.ts`,「哪些会话我能读」**两边共用** `authorization.ts` 那一份,索引体检在 `fts-health.ts`(`epoch doctor` 用) |
@@ -30,6 +30,7 @@ Agent 引擎。ReAct 循环、Provider 路由、权限、记忆、技能、Hook
30
30
  | `context/` | 上下文压缩(工具结果裁剪是**摘要之前的独立一步**,头中尾保留,裁完够了就不调模型;2026-08-16 起认 `compression.*` 两个配置项,见下)、项目发现、指令文件与它的 `@import` 展开 + 项目外放行闸门、artifact 闸门与清理、图片 token 估算、`@` 提及的候选清单与解析(**文件和 `@:` 会话共享同一本 200KB 的账**,方案 53) |
31
31
  | `sandbox/` | `CodeSandbox`(`code_exec` 的执行器)+ 隔离能力的**对外说法**:`describeIsolation()` 那句中文、以及「哪些工具走沙箱」两份清单。**机制那一半 2026-08-16 搬去了 [infra](../infra) 的 `sandbox/`**(消费者不止 core 一个了,`plugin-terminal` 够不着 core);既有 import 路径靠再导出保住 |
32
32
  | `delegate/` | 子 agent 任务委托(`delegate_task` 的后端;`background: true` 时登记成一格 `agent` 作业,见 [infra/jobs.ts](../infra/src/jobs.ts))。⚠️ 2026-10-27 起两件事变了:**子任务跑完把整轮按步落进会话库**(带 `parent_id`,`source` 是 `delegate`,所以它不出现在「接着哪一段聊」的列表里 —— 判据在 `DELEGATE_SESSION_SOURCE` 上),以及**超时来自 `delegate.taskTimeoutSec`**(缺省 15 分钟,`0` = 不限时;在此之前是写死的 5 分钟) |
33
+ | `goal/` | **目标**(方案 52):一段会话的完成判据 + 那几把尺子。`engine` / `provider` / `service` / `store` / `types` / `wording` 六份;`goal` 工具与 `report_goal` 那一路都接在这儿。2026-11-03 补进这张表(上一版漏了) |
33
34
  | `team/` | 团队通信里**住在进程内**的那一半:`registry.ts`(名册 + 共享任务 DAG,写入带 `expectedRevision` compare-and-set,过期就拒)、`inbox.ts`(成员收件箱,实现 `SteerSource` —— 引擎在步骤边界 `take()`,所以插话当轮生效而不是等下一轮)、`board.ts`(讨论板:频道 / 线程 / 帖子 / 订阅)。⚠️ **名册和板子的持久性故意不同**:名册只在内存(进程退出即散,成员本来就活在进程里),板子挂 `sessions.db` 的 `board` namespace(**多个 `epoch` 进程共用同一份库就共享同一块板**,2026-10-30 用两个真进程验收过)。别把两者混成一层 —— 判据在这两个文件头。**2026-11-02 起主会话在名册里有身份**:`registerSession` 登记每一段活会话(建会话 / 复活 / 每轮 `run()`),`send_message` 因此能寻址**另一段主会话**,成员回给 `lead` 的消息按 `parentSessionId` 投回派它出来的那一段 —— 在这之前所有主会话共用一个 `lead` 收件箱,谁先发请求谁把别人的回话吃掉 |
34
35
  | `agent-role/` | agent 角色定义、注册与工具作用域收窄(子 agent 和**顶层会话**两条来路走同一个 `roleScopedProvider`);`createRoleScope` 把它包成**可变槽** —— 身份行和工具表从同一个变量读,好让「这一条消息换个专家」有地方落。⚠️ 2026-08-18 起这里多了一条**写**的路(`create.ts`,全仓第一条建角色的路):它和读口共用同一份 frontmatter schema、同一个解析器,写完**先读回来验一遍**再落盘。⚠️ 2026-09-16 又多了它的反面(`remove.ts`,「能加就得能删」):**落点靠读口解析出来的 `name` 找,不是拿名字拼路径** —— frontmatter 的 `name` 优先于文件名,拼路径要么删不到一份界面上明明列着的身份,要么删掉另一个,而两种错法都不报错;同名两份时**一个字节都不删**。那道「什么样的客户端才准写」的闸门**两条都不在这儿**,在 `@epoch-agent/server`(判据见那两个文件头第三节) |
35
36
  | `agent-plugin/` | **插件面板那个可变槽**(2026-10-20):`createPluginScope` —— 「这一条消息是点着哪个插件面板发的」,`<self>` 段从它读。⚠️ **和 `agent-role/` 有同一个形状、少两样东西**:没有 `provider`(插件名不换工具表)、没有身份 —— 它只影响 system prompt 里一句话,判据在那份文件头那张对照表上。别照着 `createRoleScope` 全抄一遍 |
@@ -45,9 +46,14 @@ Agent 引擎。ReAct 循环、Provider 路由、权限、记忆、技能、Hook
45
46
  | `trust/` | 工作区信任判定与闸门 |
46
47
  | `telemetry/` | span 属性脱敏 |
47
48
 
48
- 另外 10 个工具在四个 plugin 里,不在这里:见
49
+ 另外 **21 个工具在五个 plugin 里**,不在这里:见
49
50
  [plugin-file](../plugins/plugin-file) / [plugin-terminal](../plugins/plugin-terminal) /
50
- [plugin-web](../plugins/plugin-web) / [plugin-mcp](../plugins/plugin-mcp)。
51
+ [plugin-web](../plugins/plugin-web) / [plugin-lsp](../plugins/plugin-lsp) /
52
+ [plugin-mcp](../plugins/plugin-mcp)。
53
+
54
+ > **2026-11-03 核出来的数**:file 8 + terminal 10 + web 2 + lsp 1 = **21**。
55
+ > 上一版这里写的是「10 个工具在四个 plugin 里」(lsp 的 `lsp_diagnostics`
56
+ > 和那 8 个都没算)。plugin-mcp 的工具是运行时从 MCP server 拉来的,数不出来也不该数。
51
57
 
52
58
  ## 几个刻意的取舍
53
59
 
@@ -4,7 +4,7 @@ import { workerData, parentPort } from 'worker_threads';
4
4
  // src/code-mode/worker.ts
5
5
  process.removeAllListeners("warning");
6
6
  function requirePort() {
7
- if (!parentPort) throw new Error("code-mode worker \u5FC5\u987B\u7531 new Worker() \u542F\u52A8");
7
+ if (!parentPort) throw new Error("the code-mode worker must be started by new Worker()");
8
8
  return parentPort;
9
9
  }
10
10
  var port = requirePort();
@@ -64,7 +64,7 @@ function renderValue(value) {
64
64
  if (value === void 0) return "";
65
65
  const text = typeof value === "string" ? value : safeJson(value);
66
66
  return text.length > input.maxValueChars ? `${text.slice(0, input.maxValueChars)}
67
- \u2026[\u8FD4\u56DE\u503C\u8D85\u8FC7 ${input.maxValueChars} \u5B57\u7B26\uFF0C\u5DF2\u622A\u65AD]` : text;
67
+ \u2026[the return value exceeded ${input.maxValueChars} characters and was truncated]` : text;
68
68
  }
69
69
  function compile(code) {
70
70
  const wrapped = `async function __epochProgram(tools, print) {
@@ -81,7 +81,7 @@ async function main() {
81
81
  } catch (err) {
82
82
  send({
83
83
  type: "failed",
84
- message: `\u7A0B\u5E8F\u65E0\u6CD5\u89E3\u6790\uFF08TypeScript \u8BED\u6CD5\u9519\u8BEF\uFF09\uFF1A${describe(err)}`
84
+ message: `The program cannot be parsed (TypeScript syntax error): ${describe(err)}`
85
85
  });
86
86
  return;
87
87
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ToolProvider, EpochTool, EpochPlugin, ToolExposure, EpochSkill, HookType, EpochHook, PluginContext, QuestionRequest, QuestionAnswer, ComplianceCategory, ComplianceAction, ToolArtifactInput, ToolArtifact, TrustLevel, TrustManager as TrustManager$1, TokenUsage, EpochConfig, BudgetBreach, NoticeCode, ProviderType, EpochMessage, JsonSchema, ModelSelection, AgentMessage, EpochUserContent, TeamTask, TeamTaskStatus, TeamTaskPatch, AgentMemberInfo, AgentMemberStatus, BackgroundTaskInfo, EpochToolCall, Telemetry, HookManager as HookManager$1, Lang, PermissionManager as PermissionManager$1, ApprovalRequest, ApprovalReply, AgentRoleScope, AgentRoleSource, EpochContentPart, AgentEvent, AgentRole, PermissionLevel, PlanProposal, ScheduleRunnerSpec, ScheduleBackendKind, ScheduleTrigger, OperationType, ScheduleAllowlist, ScheduleDefinition, ScheduleRunStatus, ScheduleRun, SchedulePendingApproval, BoardChannel, BoardThread, BoardPost, DiagnosticSink, CustomCommandDef, ModelRef, ExpandedCommand, CustomCommandSource, ContextBreakdown, WireMcpConnector, SelectionContext, SetSelectionResult, ModelEntry, ReasoningState, ReasoningChoice, PermissionRuleLists, MoneyDigits, CurrencyDisplay, KeybindingTable, Diagnostic, KeybindingReport, FileOmitReason, SessionOmitReason, EpochToolResult, EpochUserCommand, EpochTurnFacts, EpochDiffSnapshot, LocalizedDetail, ApprovalScope, RuleValue, Operation, ApprovalOutcome, PermissionDecision, ScheduleDraft, ScheduleWideningKind, WireAgentEvent, WireAgentEnvelope, HookEvent, LogFn, HookRegistration, HookHandler, HookContext, VerifyResult, EpochFilePart, EpochSessionPart, MentionSet, EpochImagePart, TrustExecGrant, DecidedTrustLevel, TrustScope, TrustGrant, TrustRecord } from '@epoch-agent/protocol';
1
+ import { ToolProvider, EpochTool, EpochPlugin, ToolExposure, EpochSkill, HookType, EpochHook, PluginContext, QuestionRequest, QuestionAnswer, ComplianceCategory, ComplianceAction, ToolArtifactInput, ToolArtifact, TrustLevel, TrustManager as TrustManager$1, TokenUsage, EpochConfig, BudgetBreach, NoticeCode, ProviderType, EpochMessage, JsonSchema, ModelSelection, AgentMessage, EpochUserContent, TeamTask, TeamTaskStatus, TeamTaskPatch, AgentMemberInfo, AgentMemberStatus, BackgroundTaskInfo, EpochToolCall, Telemetry, HookManager as HookManager$1, Lang as Lang$1, PermissionManager as PermissionManager$1, ApprovalRequest, ApprovalReply, AgentRoleScope, AgentRoleSource, EpochContentPart, AgentEvent, AgentRole, PermissionLevel, PlanProposal, ScheduleRunnerSpec, ScheduleBackendKind, ScheduleTrigger, OperationType, ScheduleAllowlist, ScheduleDefinition, ScheduleRunStatus, ScheduleRun, SchedulePendingApproval, BoardChannel, BoardThread, BoardPost, DiagnosticSink, CustomCommandDef, ModelRef, ExpandedCommand, CustomCommandSource, ContextBreakdown, WireMcpConnector, SelectionContext, SetSelectionResult, ModelEntry, ReasoningState, ReasoningChoice, PermissionRuleLists, MoneyDigits, CurrencyDisplay, KeybindingTable, Diagnostic, KeybindingReport, FileOmitReason, SessionOmitReason, EpochToolResult, EpochUserCommand, EpochTurnFacts, EpochDiffSnapshot, LocalizedDetail, ApprovalScope, RuleValue, Operation, ApprovalOutcome, PermissionDecision, ScheduleDraft, ScheduleWideningKind, WireAgentEvent, WireAgentEnvelope, HookEvent, LogFn, HookRegistration, HookHandler, HookContext, VerifyResult, EpochFilePart, EpochSessionPart, MentionSet, EpochImagePart, TrustExecGrant, DecidedTrustLevel, TrustScope, TrustGrant, TrustRecord } from '@epoch-agent/protocol';
2
2
  export { API_KEY_ENV_VARS, AgentEvent, AgentEventOf, AgentEventType, ApprovalAnswer, ApprovalOutcome, ApprovalReply, ApprovalRequest, ApprovalScope, BudgetBreach, COMPLIANCE_ACTIONS, COMPLIANCE_CATEGORIES, ComplianceAction, ComplianceCategory, DecidedTrustLevel, EpochConfig, EpochHook, EpochPlugin, EpochSkill, EpochTool, FinishReason, HookContext, HookEvent, HookHandler, HookRegistration, HookType, HookManager as IHookManager, PermissionManager as IPermissionManager, TrustManager as ITrustManager, JsonSchema, LEGACY_LEVEL_ALIASES, MAX_ATTACH_BYTES, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_SESSION_ATTACH_BYTES, MAX_SESSION_REFS, OPERATION_TYPES, Operation, OperationType, PERMISSION_LEVELS, PLAN_OUTCOMES, PROVIDER_INFOS, PROVIDER_TYPES, PermissionDecision, PermissionLevel, PlanApprovalOutcome, PlanProposal, PluginContext, ProviderInfo, ProviderType, TokenUsage, ToolContext, ToolDefinition, ToolExposure, ToolResult, TrustExecGrant, TrustGrant, TrustLevel, TrustRecord, TrustScope, TrustTier, VerifyResult, apiKeyEnvVar, approvalPolicyForLevel, extractAllMentions, extractMentions, extractSessionMentions, getProviderInfo, isOperationType, isPermissionLevel, isPlanOutcome, isProviderType, normalizeApproval, resolvePermissionLevel } from '@epoch-agent/protocol';
3
- import { IsolationBackend, SqliteDatabase, ParseIssue, ShellFlavor, SandboxMode, FailureVerdict } from '@epoch-agent/infra';
3
+ import { IsolationBackend, Lang, SqliteDatabase, ParseIssue, ShellFlavor, SandboxMode, FailureVerdict } from '@epoch-agent/infra';
4
4
  export { BubblewrapOptions, DangerMatch, IS_WINDOWS, IsolationBackend, IsolationOptions, LogLevel, SeatbeltOptions, WINDOWS_HIDE_FLAGS, buildBwrapArgs, buildProfile, checkDangerousCommand, checkObfuscation, createLogger, detectBackend, getDefaultShell, getPythonCommand, isInWorkspace, isReadOnlyCommand, isolate, maskApiKey, probeBubblewrap, probeSeatbelt, complianceDir as resolveComplianceDir, policiesDir as resolvePoliciesDir, setLogLevel } from '@epoch-agent/infra';
5
5
  import { z } from 'zod';
6
6
  import { existsSync } from 'node:fs';
@@ -3148,8 +3148,22 @@ declare class TaskNoticeTracker {
3148
3148
  * 导出是给 `epoch -p` 的收尾摘要复用的(方案 36 验收 #13,实现在
3149
3149
  * cli 的 `headless/tasks.ts`)。同一件事只该有一种说法:一处写「已被停止」
3150
3150
  * 另一处写「已终止」,用户会以为那是两种不同的状态。
3151
+ *
3152
+ * ## 两个读者,一种字,两种语言(2026-11-05)
3153
+ *
3154
+ * 模型读的那一份**一律英文**(判据同 `code-mode/notice.ts` 的文件头),
3155
+ * 而 `epoch -p` 的收尾摘要读的那一份要跟用户界面语言走。两种语言都由
3156
+ * `background_tasks.line_*` 这个集合供字(`t(key, vars, lang)`):
3157
+ *
3158
+ * - 模型那一侧走默认参数(`lang = 'en'`,冻住);
3159
+ * - CLI 那一侧显式传 `currentLang()`。
3160
+ *
3161
+ * 于是文案只有一份,两种语言的措辞在 catalog 里并列(同 `reasonPair()` 的判据)。
3162
+ * ⚠️ **别把它改回硬编码的中文或英文**:这个函数是两边共用的那个「一个状态一种说法」。
3163
+ *
3164
+ * @param lang 给谁看。缺省 `'en'` = 给模型看(冻住的那一份)
3151
3165
  */
3152
- declare function describeBackgroundTask(task: BackgroundTaskInfo): string;
3166
+ declare function describeBackgroundTask(task: BackgroundTaskInfo, lang?: Lang): string;
3153
3167
 
3154
3168
  /**
3155
3169
  * Agent 层类型。
@@ -3602,7 +3616,7 @@ interface AgentConfig {
3602
3616
  *
3603
3617
  * 不接 = 那条规则逐字保持原样 = 这一轮之前逐字节相同。
3604
3618
  */
3605
- replyLang?: () => Lang | undefined;
3619
+ replyLang?: () => Lang$1 | undefined;
3606
3620
  /**
3607
3621
  * 技能学习器(可选——Nudge 触发时自动学习)。
3608
3622
  *
@@ -4814,7 +4828,7 @@ declare function createGoalTool(deps: GoalToolDeps): EpochTool;
4814
4828
  *
4815
4829
  * ---
4816
4830
  *
4817
- * # ⚠️ 改这个文件里的 `description` / `parameters` = 34 段 eval 录像作废
4831
+ * # ⚠️ 改这个文件里的 `description` / `parameters` = 23 份 eval 录像作废
4818
4832
  *
4819
4833
  * 工具定义(名字 / 描述 / 参数)进 eval 的新鲜度指纹
4820
4834
  * (`evals/harness/fingerprint.ts`,那个文件头说得很清楚为什么必须进)。
@@ -4832,6 +4846,29 @@ declare function createGoalTool(deps: GoalToolDeps): EpochTool;
4832
4846
  * 数 `memory` 在 `toolCalls` 里出现几次,必须是 0。
4833
4847
  *
4834
4848
  * ⚠️ 下次再想在这儿加一句话之前先问:**非说在工具描述里不可吗**。
4849
+ *
4850
+ * ---
4851
+ *
4852
+ * # 2026-11-03:写入纪律进描述(明知代价改的第二轮)
4853
+ *
4854
+ * 加的是「写之前先分清三件事」那五行:范围 / 归属 / 证据。来路是 codex 的
4855
+ * `memories/write/templates/memories/stage_one_system_v2.md`(那份原文是它们的
4856
+ * 每会话摘要管道,**只有纪律可搬、管道不可搬** —— 它那句「Write task history,
4857
+ * not a user profile」在这里是要反过来读的,本工具的 `target=user` 本来就是
4858
+ * 用户画像)。
4859
+ *
4860
+ * 为什么落在描述里而不是技能正文:纪律要在**模型准备写记忆那一刻**被看到,
4861
+ * 而那一刻它手上没有任何技能(技能正文要先 `skill_view` 才进上下文)。描述是
4862
+ * 唯一常驻在决策点上的位置 —— 这也是 09-10 那一轮同样的判断。
4863
+ *
4864
+ * 措辞刻意压成三件事、不写成禁令清单:`evals/README.md:261` 记着
4865
+ * `ask_user_question` 描述写长两句之后命中率 8/9 → 5/9 的先例。写成「别记这个
4866
+ * 别记那个」的话,最可能的副作用是该记的也少记了 —— 而这条纪律要治的是
4867
+ * **记偏**(一次性的要求被升格成长期偏好,会一直留在后面每一轮里),不是记多。
4868
+ *
4869
+ * 收账同 09-10:`evals/README.md` 第三行那个窄例外,两条举证
4870
+ * (witness 逐对 diff + 真 key 活体数 `memory` 被选中几次)。改动前的基线是
4871
+ * **0 次**(`grep -c "name: 'memory'" evals/*.eval.ts` 零命中)。
4835
4872
  */
4836
4873
 
4837
4874
  declare function createMemoryTool(memory: MemoryManager$1): EpochTool;
@@ -6789,6 +6826,28 @@ declare const SESSION_TRACE_TOOL = "session_trace";
6789
6826
  * `__tests__/session-query-sites.test.ts` 有一个东西可以对着比。
6790
6827
  */
6791
6828
  declare const SESSION_QUERY_TOOLS: readonly string[];
6829
+ /**
6830
+ * 「这段会话的可读范围按哪个项目根算」—— 一个固定值,或者一个**按会话取**的函数
6831
+ * (2026-11-05)。
6832
+ *
6833
+ * ## 为什么允许函数
6834
+ *
6835
+ * 会话工具表是**一个进程一套**(`buildRuntime()` 里注册一次),而项目根是**每段会话
6836
+ * 一个**(`workspaces.of(sessionId).projectContext.rootDir`)。写死成引导会话那个根
6837
+ * 的时候,从别的工作区起的那段会话调 `session_messages_read` 会一直报 8009
6838
+ * `out of readable scope` —— 而同一段会话用 `@:` 引用**读得到**,因为引用那条路
6839
+ * (`server/src/mentions.ts` 的 `visibilityOf`)取的是它自己的根。
6840
+ *
6841
+ * 两条路喂给 `authorization.ts` 里那个唯一的判定函数的输入不一致,表现就是
6842
+ * 「@ 能引用、工具读不到」。
6843
+ *
6844
+ * ## 为什么住在这个文件而不是 `tools/builtin/session-search.ts`
6845
+ *
6846
+ * 三个工具文件(search / list / read)都要用它,而 `session-search.ts` 反过来
6847
+ * import 了另外两个的工厂 —— 把 helper 放在那儿就是一个运行时的环
6848
+ * (`import/no-cycle` 当场红)。这个文件是三者共同的依赖,不 import 任何工具。
6849
+ */
6850
+ type WorkspaceCwdSource = string | ((sessionId: string) => string | undefined);
6792
6851
  /** 一条命中现在的处境。二态,语义见文件头 */
6793
6852
  type MessageSurface = 'active' | 'compacted';
6794
6853
  /** 一条消息命中 */
@@ -7131,8 +7190,12 @@ interface SessionSearchDeps {
7131
7190
  *
7132
7191
  * 必须和写入侧同一个口径(`SessionStore` 写的是 `projectContext.rootDir`),
7133
7192
  * 否则在子目录里启动的会话一条都匹配不上。不给 = 只放行血缘链。
7193
+ *
7194
+ * ⚠️ **可以是函数**(2026-11-05):工具表一个进程一套,而项目根每段会话一个 ——
7195
+ * 写死成引导会话那个根会让别的会话读不到自己的历史。判据在
7196
+ * `session/query.ts` 的 {@link WorkspaceCwdSource} 上。
7134
7197
  */
7135
- workspaceCwd?: string | undefined;
7198
+ workspaceCwd?: WorkspaceCwdSource | undefined;
7136
7199
  /**
7137
7200
  * 配置里那个跨工作区开关(`sessionSearch.allWorkspaces`),默认关。
7138
7201
  *
@@ -7727,10 +7790,11 @@ declare function createSkillViewTool(deps: SkillViewDeps): EpochTool;
7727
7790
  *
7728
7791
  * ## 四、错误话术为什么是英文
7729
7792
  *
7730
- * 判据逐字同 [skill-view.ts](./skill-view.js) 第七节。⚠️ 但**下一层抛出来的那
7731
- * 几句是中文的**(`requireWritable()` 走 `t('skill_load.readonly_*')`),这里
7732
- * **原样转发不改写** —— 那三句话里带着「去哪儿改」的路径,是模型下一步唯一的
7733
- * 依据,翻一遍只会把它译丢。
7793
+ * 判据逐字同 [skill-view.ts](./skill-view.js) 第七节。⚠️ **下一层抛出来的那几句
7794
+ * 也是英文**(`requireWritable()` 走 `t('skill_load.readonly_*', …, 'en')` ——
7795
+ * 2026-11-05 起显式钉 'en',以前它跟着界面语言走),这里**原样转发不改写** ——
7796
+ * 那三句话里带着「去哪儿改」的路径,是模型下一步唯一的依据,改写成另一种句式
7797
+ * 只会把它译丢。
7734
7798
  */
7735
7799
 
7736
7800
  /**
@@ -8147,19 +8211,32 @@ interface RoleLoadSummary {
8147
8211
  declare function loadRoleDefinitions(opts: LoadRolesOptions): RoleLoadSummary;
8148
8212
 
8149
8213
  /**
8150
- * 角色注册表 —— 内置三个角色 + 与外部定义合并。
8214
+ * 角色注册表 —— 外部定义(用户 / 项目 / 插件 / 宿主)的合并。
8151
8215
  *
8152
- * **为什么只有三个内置角色**:角色一多,主 agent「该派给谁」本身就成了新的
8153
- * 错误来源,而派错角色比不分角色更糟 —— 缺工具的角色会卡在半路,父 agent
8154
- * 还得重派一次。竞品的角色 description 里塞满 "Use this when…" 就是在补
8155
- * 这个洞。每个角色的边界要一句话说得清,说不清就别加。
8216
+ * ## 2026-11-05:内置那三个角色删了
8156
8217
  *
8157
- * `explore` 和 `review` 的工具集**故意相同**、只有 prompt 不同 —— 这正好
8158
- * 说明「角色 = prompt + 工具集」这个组合有意义,不是把 prompt 换个地方放。
8218
+ * 这里原来有一张 `BUILTIN_ROLES`:`general` / `explore` / `review`。用户点名
8219
+ * 「不需要内置身份了」,于是整张表、连同只读白名单和两段 prompt 一起删掉。
8220
+ *
8221
+ * **机制一个字没动**:`~/.epoch/agents/*.md`、项目 `.epoch/agents/*.md`、插件
8222
+ * 带来的身份、宿主经 `hostCapabilities` 注入的身份,照旧加载、合并、派活、
8223
+ * 出现在 `epoch agents` 和能力页上。变的是「一条都没定义时」这张表是空的 ——
8224
+ * 而这件事本身是合法的,不是故障(空表的表现在 `delegate_task` 那边:
8225
+ * `role` 参数整个不出现,派出去的子 agent 继承父的全部工具)。
8226
+ *
8227
+ * ## ⚠️ 「叫 explore 的东西一定只读」这条判据跟着变了
8228
+ *
8229
+ * 原来它由内置的 `explore` 保证:同名覆盖只能**取交集**,所以一份项目级
8230
+ * `explore.md` 加不进 `terminal`。现在内核里没有那一层底座,交集只在
8231
+ * **同名覆盖链**上成立 —— 用户级与项目级都写了 `explore` 时,项目级那份
8232
+ * 仍然收不宽;但**只写一份**时它就是一个普通自定义身份,给不给 `terminal`
8233
+ * 完全由写的人决定。别把这句判据当成今天还成立的承诺。
8234
+ *
8235
+ * 同理,`general` 也不再有特殊地位:`delegate_task` 不传 `role` 时**不再查表**
8236
+ * (判据在 `runtime/src/session-factory.ts` 的 `subRunner`),所以建一份叫
8237
+ * `general` 的身份不会静默变成全局默认 —— 那曾是删掉内置之后最容易长出来的坑。
8159
8238
  */
8160
8239
 
8161
- /** 内置角色的独立副本(调用方拿去改不会污染下一次) */
8162
- declare function builtinRoles(): AgentRole[];
8163
8240
  /** 一次合并里被记下的取舍,交给装配层写进启动诊断 */
8164
8241
  interface RoleMergeNotice {
8165
8242
  role: string;
@@ -8198,25 +8275,24 @@ interface RoleMergeResult {
8198
8275
  notices: RoleMergeNotice[];
8199
8276
  }
8200
8277
  /**
8201
- * 合并内置角色与外部定义。
8278
+ * 合并外部定义(没有内置角色了,2026-11-05)。
8202
8279
  *
8203
- * 优先级 `project > user > builtin`(按 `overrides` 的入参顺序,后来的赢),
8280
+ * 优先级 `project > user > host > plugin`(按 `overrides` 的入参顺序,后来的赢),
8204
8281
  * **但工具集取交集,不取覆盖值**:
8205
8282
  *
8206
- * 项目文件不能把内置的 `explore` 改成一个带 `terminal` 的角色 —— 那样这个
8207
- * 名字就在骗人,而角色名是会被写进别人的 prompt 和文档的。想要更宽的边界
8208
- * 就换个名字(换了名字也仍然受 `roleScopedProvider` 的父可用集约束,
8209
- * 所以这不是一个绕过口子,只是让「叫 explore 的东西一定只读」成立)。
8283
+ * 用户级写了一份带 `terminal` 的 `explore`,项目级再写一份同名的时候**收不宽** ——
8284
+ * 这是同名覆盖链上唯一还成立的交集语义。它防的是「同一个名字在两处有两条边界,
8285
+ * 谁赢说不清」,不是「explore 一定只读」:内核里已经没有那个底座了,只写一份的
8286
+ * 时候它就是一个普通自定义身份(判据在文件头第二节)。
8210
8287
  *
8211
8288
  * `prompt` / `description` / `maxTurns` / `displayName` 允许整体替换 —— 它们是文案、
8212
8289
  * 预算和称呼,不是边界。
8213
8290
  *
8214
8291
  * ⚠️ **`displayName` 不写就沿用被覆盖的那一份**(下面 `...existing` 那个展开)。
8215
- * 内置三个现在都带展示名,所以一份只改了 prompt 的 `explore.md` 在屏幕上仍然是
8216
- * 「检索」。这是**刻意**的,和 `description` 一条口径:同名就是同一个角色,
8217
- * 覆盖方只改它关心的那几格,其余的跟着原样;要换称呼就自己写一行 `displayName:`。
8218
- * (反过来的代价是:一个项目级 `explore` 如果完全是另一回事,屏幕上仍然叫
8219
- * 「检索」—— 那种情况正确动作是换个名字,不是靠展示名区分。)
8292
+ * 比如用户级写了一份 `explore.md` 并给了 `displayName: 检索`,项目级那份只改了
8293
+ * prompt,屏幕上仍然是「检索」。这是**刻意**的,和 `description` 一条口径:同名
8294
+ * 就是同一个角色,覆盖方只改它关心的那几格,其余的跟着原样;要换称呼就自己写
8295
+ * 一行 `displayName:`。
8220
8296
  *
8221
8297
  * @param overrides 外部定义,按优先级**从低到高**排列(user 在前,project 在后)
8222
8298
  */
@@ -8235,6 +8311,10 @@ declare function findRole(roles: readonly AgentRole[], name: string): AgentRole
8235
8311
  * ⚠️ **加一档来源就要在这儿加一支**,而这个函数的形状(if 链 + 兜底 return)
8236
8312
  * 让编译器管不到这件事 —— 漏了的表现是宿主注入的角色在 `epoch agents` 里
8237
8313
  * 印着「项目」,一个没人会去核对的假话。方案 44 加 `host` 时就是照这条来的。
8314
+ *
8315
+ * `builtin` 那一支留着但**今天没有生产者**:内置角色 2026-11-05 删了,而
8316
+ * `AgentRoleSource` 还是 protocol 的公开导出,这一档不能只在一个包里消失。
8317
+ * 看见它印出「内置」就说明有个调用方拿到了源码里并不存在的东西。
8238
8318
  */
8239
8319
  declare function roleSourceLabel(source: AgentRoleSource): string;
8240
8320
 
@@ -8409,9 +8489,16 @@ interface RoleCreateOptions {
8409
8489
  * 1. **这个目录里的同名文件**(下面 `existsSync` + `wx` 两道);
8410
8490
  * 2. **进程里那张合并后的角色表** —— 那一道**不在这个函数里**,在调用方
8411
8491
  * (`runtime/src/role-write.ts`)。理由是它才拿得到那张表,而漏了它的后果
8412
- * 不是「多一个重名」:一份叫 `general` 的用户级角色会**静默收窄内置的那个**
8413
- * (`mergeRoles` 的同名交集语义),而 `general` 正是 `delegate_task` 不带
8414
- * `role` 时的默认值 —— 于是每一次没指定身份的派活都跑在他刚敲的那份 prompt 上。
8492
+ * 不是「多一个重名」而是**一次静默的覆盖**(`mergeRoles` 的同名语义是工具取
8493
+ * 交集、prompt 和 description 整份替换)。
8494
+ *
8495
+ * ⚠️ **2026-11-05 之前这条最典型的例子是撞内置的 `general`** —— 那时它会
8496
+ * 把「`delegate_task` 不传 `role` 时的默认身份」换成用户刚敲的那份 prompt。
8497
+ * 内置角色删掉之后,不传 `role` **不再查表**(判据在
8498
+ * `runtime/src/session-factory.ts` 的 `subRunner`),于是现在建一份叫
8499
+ * `general` 的只是一份普通身份:不会被默认选中,也就不会在你看不见的地方
8500
+ * 改掉别人的行为。撞名仍然拦,但理由换成「同一条覆盖链上两份定义会互相
8501
+ * 收窄,而屏幕上只画得出一份」。
8415
8502
  *
8416
8503
  * ## ⚠️ 不覆盖这件事由 **`flag: 'wx'` 一道**守,**不再多一道 `existsSync`**
8417
8504
  *
@@ -8521,7 +8608,7 @@ interface RoleRemoveOptions {
8521
8608
  * 全在这一层渲染,而它们会原样上屏。不透这一格的话,英文界面上按一次删除
8522
8609
  * 拿到的是一句中文 —— 这条病 2026-08-18 在导入那一屏上实测见过一次。
8523
8610
  */
8524
- lang?: Lang;
8611
+ lang?: Lang$1;
8525
8612
  }
8526
8613
  /**
8527
8614
  * 按身份名删掉那一份定义文件。
@@ -11768,7 +11855,7 @@ interface SystemPromptParams {
11768
11855
  * {@link REPLY_LANG_RULE} 上),所以嵌入宿主不接这个参数**也会**看到
11769
11856
  * 一行新的字节。这是认下的代价,理由写在 `systemPromptSegments` 里那一行上。
11770
11857
  */
11771
- replyLang?: Lang;
11858
+ replyLang?: Lang$1;
11772
11859
  }
11773
11860
  /**
11774
11861
  * system prompt 的**分段**形态(方案 25 §2.5 的 `/context` 要它)。
@@ -14979,6 +15066,22 @@ declare const EpochConfigSchema: z.ZodObject<{
14979
15066
  label: z.ZodString;
14980
15067
  icon: z.ZodOptional<z.ZodString>;
14981
15068
  }, z.core.$strip>>>;
15069
+ trayMenuLeft: z.ZodOptional<z.ZodArray<z.ZodObject<{
15070
+ id: z.ZodString;
15071
+ label: z.ZodString;
15072
+ icon: z.ZodOptional<z.ZodString>;
15073
+ activeLabel: z.ZodOptional<z.ZodString>;
15074
+ activeIcon: z.ZodOptional<z.ZodString>;
15075
+ closable: z.ZodOptional<z.ZodBoolean>;
15076
+ }, z.core.$strip>>>;
15077
+ trayMenuRight: z.ZodOptional<z.ZodArray<z.ZodObject<{
15078
+ id: z.ZodString;
15079
+ label: z.ZodString;
15080
+ icon: z.ZodOptional<z.ZodString>;
15081
+ activeLabel: z.ZodOptional<z.ZodString>;
15082
+ activeIcon: z.ZodOptional<z.ZodString>;
15083
+ closable: z.ZodOptional<z.ZodBoolean>;
15084
+ }, z.core.$strip>>>;
14982
15085
  blankCards: z.ZodOptional<z.ZodArray<z.ZodObject<{
14983
15086
  id: z.ZodString;
14984
15087
  title: z.ZodString;
@@ -15619,10 +15722,15 @@ declare function buildSchemaExports(): SchemaExport[];
15619
15722
  *
15620
15723
  * | 档 | 判据 | 今天几个 |
15621
15724
  * | --- | --- | --- |
15622
- * | `scalar` | 顶层标量,或**一层** `段.字段`,且不是 {@link BLOCKED} 里那三个 | 37 |
15623
- * | `manual` | 两层以上的路径,或数组 / 对象 | 40 |
15725
+ * | `scalar` | 顶层标量,或**一层** `段.字段`,且不是 {@link BLOCKED} 里那三个 | 57 |
15726
+ * | `manual` | 两层以上的路径,或数组 / 对象 | 23 |
15624
15727
  * | `blocked` | 「位置 / 身份」类的三个键 | 3 |
15625
15728
  *
15729
+ * (合计 **83** 个叶子。这三个数 2026-11-03 对 `configKeyTable()` 当场重数过 ——
15730
+ * 本注释上一版写的是 `37 / 40 / 3`,合计 80,而实际表里是 83;
15731
+ * `docs/CLI.md` 与 `docs/CONFIGURATION.md` 那两份文档当时**是对的**,错的是这里。
15732
+ * 改 schema 的叶子数时三处要一起改,`config-key-table.test.ts` 只守「表 ↔ schema 一致」。)
15733
+ *
15626
15734
  * ### 为什么两层以上的路径不开放
15627
15735
  *
15628
15736
  * `setSectionField` 的就地改写只做一层(`infra/src/config-yaml.ts` 文件头那句
@@ -16821,6 +16929,18 @@ interface SessionMeta {
16821
16929
  workspaceRoot?: string;
16822
16930
  gitBranch?: string;
16823
16931
  gitRepoRoot?: string;
16932
+ /**
16933
+ * **建行那一刻生效的模型**(`AgentProvider.modelId`,如 `deepseek-flash`)。
16934
+ *
16935
+ * 口径是「开始时用的」,不是「最后用的」 —— 和 {@link source}「一段会话是被谁
16936
+ * 开出来的,是它开始那一刻的事实」同一条规矩。`/model` 中途换过**不回写**:
16937
+ * 「最后用的是什么」在每条 assistant 行的 `turnFacts.model` 上,那一份逐轮记。
16938
+ *
16939
+ * 空串 = **没记过**,不是「没有模型」。2026-11-03 之前本机新建的会话全是这一档
16940
+ * (`ensure()` 那时根本没传这一格,只有 `importSession` 搬进来的那些有值)。
16941
+ * 读侧要「不知道」就按真值判,导出那条路已经退回占位符
16942
+ * (`session_manage.export_model_unknown`)。
16943
+ */
16824
16944
  model: string;
16825
16945
  tags: string[];
16826
16946
  preview: string;
@@ -17031,6 +17151,15 @@ interface Message {
17031
17151
  * **只给 `getContext()` 截断上下文用**,不再汇总进 `SessionMeta` 的 token 列
17032
17152
  * (方案 42 PR-0:那五列改由 `recordUsage()` 记 provider 的真实用量,
17033
17153
  * 两个写入方往同一列累加就是双份记账)。
17154
+ *
17155
+ * ⚠️ **生产路径没有任何写入点,库里恒为 NULL**(2026-11-03 核实:本机 1676 行
17156
+ * 全是 NULL)。`insertMessage` 照写 `msg.tokenCount ?? null`,而
17157
+ * `SessionStore.record()` / `appendSteps()` 从来不传这一格 —— 只有用例塞过数。
17158
+ * 所以 `getContext()` 事实上永远走它自己那条 `content.length / 3` 的兜底。
17159
+ *
17160
+ * 为什么不去接线:provider 只报**整轮**用量(`TokenUsage`),摊不到单条;
17161
+ * 拿字符数估一个值写进名叫 `token_count` 的列,等于把估算冒充真值 ——
17162
+ * 正是 v9 那次「0 = 免费」的反面教材。
17034
17163
  */
17035
17164
  tokenCount?: number;
17036
17165
  finishReason?: string;
@@ -19888,6 +20017,14 @@ interface RunningSchedule {
19888
20017
  startedAt: number;
19889
20018
  pid: number;
19890
20019
  host: string;
20020
+ /**
20021
+ * 有人请求终止这一次运行(2026-11-04)。`undefined` = 没请求过。
20022
+ *
20023
+ * ⚠️ **这是一个「请求」而不是「已停」** —— 执行器要等下一次事件循环才看得到。
20024
+ * 界面拿它把「停止」那颗按钮换成「正在停止…」,而**不能**因此就把转子撤掉:
20025
+ * 那一次真的还在跑。
20026
+ */
20027
+ cancelRequestedAt?: number;
19891
20028
  }
19892
20029
  /**
19893
20030
  * 抢一把锁。抢不到时把当前持有者一起回去 —— 记 `skipped-overlap` 那条运行记录
@@ -19913,6 +20050,35 @@ declare function acquireScheduleLock(db: SqliteDatabase, scheduleId: string, clo
19913
20050
  * @param clock 可注入的时钟,同 {@link acquireScheduleLock}
19914
20051
  */
19915
20052
  declare function listRunningSchedules(db: SqliteDatabase, clock?: () => number): RunningSchedule[];
20053
+ /**
20054
+ * 「请这一次运行停下来」—— 往锁行上写一个时间戳(2026-11-04)。
20055
+ *
20056
+ * ## 返回 false 是什么意思
20057
+ *
20058
+ * **此刻没有活着的锁**:那一次已经跑完了,或者压根没在跑。调用方(控制面 /
20059
+ * 端点)据此回 `no-active-run`,**不许假装成功** —— 界面上那颗按钮是按着
20060
+ * 「我刚看到它在跑」按下去的,而它看到的是一枚过期的转子。
20061
+ *
20062
+ * ## 为什么先判活再写
20063
+ *
20064
+ * 锁行可能是上一次被 `kill -9` 留下的残骸(心跳早就停了)。那时写标记等于
20065
+ * 给一条不存在的运行排队:下一次抢锁会把它盖掉(`acquireScheduleLock` 的
20066
+ * `ON CONFLICT … cancel_requested_at = NULL`),但「写了却永远不会被处理」
20067
+ * 本身仍然是一句假话。
20068
+ *
20069
+ * @param clock 可注入的时钟,用法同 {@link acquireScheduleLock}
20070
+ */
20071
+ declare function requestScheduleCancel(db: SqliteDatabase, scheduleId: string, clock?: () => number): boolean;
20072
+ /**
20073
+ * 执行器那一侧:有人请求取消吗。看到了就 `abort()`。
20074
+ *
20075
+ * 收尾时锁行被 `release()` 删掉,标记跟着一起消失,所以这里**没有对应的
20076
+ * 「清除」函数** —— 写一处、删一处,中间没有第三种状态要维护。
20077
+ *
20078
+ * ⚠️ **调用方必须节流**(执行器那边是 1 秒一次):事件流是逐 token 的,
20079
+ * 每个 delta 都查一次库会让一小时的运行多出十几万次查询。
20080
+ */
20081
+ declare function readCancelRequest(db: SqliteDatabase, scheduleId: string): number | undefined;
19916
20082
 
19917
20083
  /**
19918
20084
  * 触发器的校验、下一次触发时刻、以及生效区间(方案 45 §2.1)。
@@ -21964,7 +22130,7 @@ interface SkillImportOptions {
21964
22130
  * prompt 或者落盘,属于第三档「谁都不跟」(`agent_role.handoff` 那条判据)——
21965
22131
  * 让一段比这次响应活得久的文本跟着某一次请求的语言走,是这个方案明确禁止的事。
21966
22132
  */
21967
- lang?: Lang;
22133
+ lang?: Lang$1;
21968
22134
  /**
21969
22135
  * 同名的**用户级**技能要不要换成这一份(2026-10-09,云同步要用)。不给 = 不换(照旧跳过)。
21970
22136
  *
@@ -23546,4 +23712,4 @@ declare function resolveCodeModeWorker(baseDir: string, exists?: typeof existsSy
23546
23712
  */
23547
23713
  declare function codeModeWorkerPath(): string | undefined;
23548
23714
 
23549
- 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, AgentInbox, AgentLoop, type AgentProvider, type AgentSite, type AgentSiteRef, AppearanceStore, type AppendMessageInput, ApprovalCache, type ApprovalDecision, type ArtifactOpenRefusal, type ArtifactRetention, type AskQuestionDeps, type AttachmentRetention, BLOCKED_TOOLS, BOARD_TOOL_NAMES, type BackendOptions, type BackendOutcome, type BackgroundTaskSource, type BaseOrigin, type BaseSlot, type BeginTurnInput, type BoardPending, BoardStore, type BoardTarget, 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 ConfigKeyEntry, type ConfigKeyKind, type ConfigKeyReason, type ConfigKeyWrite, type ConfigMigration, type ConfigOrigins, type ConfigValueCheck, type ConfigValueProblem, ContextCompressor, type ContextEngine, type CreateScheduleInput, type CreateSessionInput, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_INBOX_CAPACITY, DEFAULT_MAX_HOLD_CHARS, DEFAULT_MAX_RUNNING_MEMBERS, DEFAULT_MAX_WOKEN_SESSIONS, DELEGATE_SESSION_SOURCE, type DelegateArgs, type DelegateConfig, DelegateManager, type DelegateTaskResult, type DeliveryResult, 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_POST_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, 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_ISSUE_CODES, SCHTASKS_FOLDER, SEND_MESSAGE_TOOL, 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 SessionBridge, 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, TEAM_TOOL_NAMES, TOOL_SEARCH_TOOL, TaskNoticeTracker, type TeamLimits, TeamRegistry, type TodoItem, type ToggleOutcome, 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, checkConfigValue, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, configKeyByPath, configKeyTable, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createBoardTools, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createPluginScope, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSendMessageTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTeamTools, 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, offloadOldestImages, 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, requestImageBytes, 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, writableConfigKeys, writeSettingValue };
23715
+ 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, AgentInbox, AgentLoop, type AgentProvider, type AgentSite, type AgentSiteRef, AppearanceStore, type AppendMessageInput, ApprovalCache, type ApprovalDecision, type ArtifactOpenRefusal, type ArtifactRetention, type AskQuestionDeps, type AttachmentRetention, BLOCKED_TOOLS, BOARD_TOOL_NAMES, type BackendOptions, type BackendOutcome, type BackgroundTaskSource, type BaseOrigin, type BaseSlot, type BeginTurnInput, type BoardPending, BoardStore, type BoardTarget, 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 ConfigKeyEntry, type ConfigKeyKind, type ConfigKeyReason, type ConfigKeyWrite, type ConfigMigration, type ConfigOrigins, type ConfigValueCheck, type ConfigValueProblem, ContextCompressor, type ContextEngine, type CreateScheduleInput, type CreateSessionInput, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_INBOX_CAPACITY, DEFAULT_MAX_HOLD_CHARS, DEFAULT_MAX_RUNNING_MEMBERS, DEFAULT_MAX_WOKEN_SESSIONS, DELEGATE_SESSION_SOURCE, type DelegateArgs, type DelegateConfig, DelegateManager, type DelegateTaskResult, type DeliveryResult, 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_POST_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, 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_ISSUE_CODES, SCHTASKS_FOLDER, SEND_MESSAGE_TOOL, 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 SessionBridge, 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, TEAM_TOOL_NAMES, TOOL_SEARCH_TOOL, TaskNoticeTracker, type TeamLimits, TeamRegistry, type TodoItem, type ToggleOutcome, 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, capabilityOfRef, checkConfigValue, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, configKeyByPath, configKeyTable, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createBoardTools, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createPluginScope, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSendMessageTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTeamTools, 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, offloadOldestImages, 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, readCancelRequest, readEntryKey, readImageSize, readMarketplaces, readPluginAbout, readPluginIcon, readPluginManifest, readPluginRecords, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, requestImageBytes, requestScheduleCancel, 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, writableConfigKeys, writeSettingValue };