@epoch-agent/core 3.1.2 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -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
 
package/dist/index.d.ts CHANGED
@@ -4814,7 +4814,7 @@ declare function createGoalTool(deps: GoalToolDeps): EpochTool;
4814
4814
  *
4815
4815
  * ---
4816
4816
  *
4817
- * # ⚠️ 改这个文件里的 `description` / `parameters` = 34 段 eval 录像作废
4817
+ * # ⚠️ 改这个文件里的 `description` / `parameters` = 23 份 eval 录像作废
4818
4818
  *
4819
4819
  * 工具定义(名字 / 描述 / 参数)进 eval 的新鲜度指纹
4820
4820
  * (`evals/harness/fingerprint.ts`,那个文件头说得很清楚为什么必须进)。
@@ -4832,6 +4832,29 @@ declare function createGoalTool(deps: GoalToolDeps): EpochTool;
4832
4832
  * 数 `memory` 在 `toolCalls` 里出现几次,必须是 0。
4833
4833
  *
4834
4834
  * ⚠️ 下次再想在这儿加一句话之前先问:**非说在工具描述里不可吗**。
4835
+ *
4836
+ * ---
4837
+ *
4838
+ * # 2026-11-03:写入纪律进描述(明知代价改的第二轮)
4839
+ *
4840
+ * 加的是「写之前先分清三件事」那五行:范围 / 归属 / 证据。来路是 codex 的
4841
+ * `memories/write/templates/memories/stage_one_system_v2.md`(那份原文是它们的
4842
+ * 每会话摘要管道,**只有纪律可搬、管道不可搬** —— 它那句「Write task history,
4843
+ * not a user profile」在这里是要反过来读的,本工具的 `target=user` 本来就是
4844
+ * 用户画像)。
4845
+ *
4846
+ * 为什么落在描述里而不是技能正文:纪律要在**模型准备写记忆那一刻**被看到,
4847
+ * 而那一刻它手上没有任何技能(技能正文要先 `skill_view` 才进上下文)。描述是
4848
+ * 唯一常驻在决策点上的位置 —— 这也是 09-10 那一轮同样的判断。
4849
+ *
4850
+ * 措辞刻意压成三件事、不写成禁令清单:`evals/README.md:261` 记着
4851
+ * `ask_user_question` 描述写长两句之后命中率 8/9 → 5/9 的先例。写成「别记这个
4852
+ * 别记那个」的话,最可能的副作用是该记的也少记了 —— 而这条纪律要治的是
4853
+ * **记偏**(一次性的要求被升格成长期偏好,会一直留在后面每一轮里),不是记多。
4854
+ *
4855
+ * 收账同 09-10:`evals/README.md` 第三行那个窄例外,两条举证
4856
+ * (witness 逐对 diff + 真 key 活体数 `memory` 被选中几次)。改动前的基线是
4857
+ * **0 次**(`grep -c "name: 'memory'" evals/*.eval.ts` 零命中)。
4835
4858
  */
4836
4859
 
4837
4860
  declare function createMemoryTool(memory: MemoryManager$1): EpochTool;
@@ -14979,6 +15002,22 @@ declare const EpochConfigSchema: z.ZodObject<{
14979
15002
  label: z.ZodString;
14980
15003
  icon: z.ZodOptional<z.ZodString>;
14981
15004
  }, z.core.$strip>>>;
15005
+ trayMenuLeft: z.ZodOptional<z.ZodArray<z.ZodObject<{
15006
+ id: z.ZodString;
15007
+ label: z.ZodString;
15008
+ icon: z.ZodOptional<z.ZodString>;
15009
+ activeLabel: z.ZodOptional<z.ZodString>;
15010
+ activeIcon: z.ZodOptional<z.ZodString>;
15011
+ closable: z.ZodOptional<z.ZodBoolean>;
15012
+ }, z.core.$strip>>>;
15013
+ trayMenuRight: z.ZodOptional<z.ZodArray<z.ZodObject<{
15014
+ id: z.ZodString;
15015
+ label: z.ZodString;
15016
+ icon: z.ZodOptional<z.ZodString>;
15017
+ activeLabel: z.ZodOptional<z.ZodString>;
15018
+ activeIcon: z.ZodOptional<z.ZodString>;
15019
+ closable: z.ZodOptional<z.ZodBoolean>;
15020
+ }, z.core.$strip>>>;
14982
15021
  blankCards: z.ZodOptional<z.ZodArray<z.ZodObject<{
14983
15022
  id: z.ZodString;
14984
15023
  title: z.ZodString;
@@ -15619,10 +15658,15 @@ declare function buildSchemaExports(): SchemaExport[];
15619
15658
  *
15620
15659
  * | 档 | 判据 | 今天几个 |
15621
15660
  * | --- | --- | --- |
15622
- * | `scalar` | 顶层标量,或**一层** `段.字段`,且不是 {@link BLOCKED} 里那三个 | 37 |
15623
- * | `manual` | 两层以上的路径,或数组 / 对象 | 40 |
15661
+ * | `scalar` | 顶层标量,或**一层** `段.字段`,且不是 {@link BLOCKED} 里那三个 | 57 |
15662
+ * | `manual` | 两层以上的路径,或数组 / 对象 | 23 |
15624
15663
  * | `blocked` | 「位置 / 身份」类的三个键 | 3 |
15625
15664
  *
15665
+ * (合计 **83** 个叶子。这三个数 2026-11-03 对 `configKeyTable()` 当场重数过 ——
15666
+ * 本注释上一版写的是 `37 / 40 / 3`,合计 80,而实际表里是 83;
15667
+ * `docs/CLI.md` 与 `docs/CONFIGURATION.md` 那两份文档当时**是对的**,错的是这里。
15668
+ * 改 schema 的叶子数时三处要一起改,`config-key-table.test.ts` 只守「表 ↔ schema 一致」。)
15669
+ *
15626
15670
  * ### 为什么两层以上的路径不开放
15627
15671
  *
15628
15672
  * `setSectionField` 的就地改写只做一层(`infra/src/config-yaml.ts` 文件头那句
@@ -16821,6 +16865,18 @@ interface SessionMeta {
16821
16865
  workspaceRoot?: string;
16822
16866
  gitBranch?: string;
16823
16867
  gitRepoRoot?: string;
16868
+ /**
16869
+ * **建行那一刻生效的模型**(`AgentProvider.modelId`,如 `deepseek-flash`)。
16870
+ *
16871
+ * 口径是「开始时用的」,不是「最后用的」 —— 和 {@link source}「一段会话是被谁
16872
+ * 开出来的,是它开始那一刻的事实」同一条规矩。`/model` 中途换过**不回写**:
16873
+ * 「最后用的是什么」在每条 assistant 行的 `turnFacts.model` 上,那一份逐轮记。
16874
+ *
16875
+ * 空串 = **没记过**,不是「没有模型」。2026-11-03 之前本机新建的会话全是这一档
16876
+ * (`ensure()` 那时根本没传这一格,只有 `importSession` 搬进来的那些有值)。
16877
+ * 读侧要「不知道」就按真值判,导出那条路已经退回占位符
16878
+ * (`session_manage.export_model_unknown`)。
16879
+ */
16824
16880
  model: string;
16825
16881
  tags: string[];
16826
16882
  preview: string;
@@ -17031,6 +17087,15 @@ interface Message {
17031
17087
  * **只给 `getContext()` 截断上下文用**,不再汇总进 `SessionMeta` 的 token 列
17032
17088
  * (方案 42 PR-0:那五列改由 `recordUsage()` 记 provider 的真实用量,
17033
17089
  * 两个写入方往同一列累加就是双份记账)。
17090
+ *
17091
+ * ⚠️ **生产路径没有任何写入点,库里恒为 NULL**(2026-11-03 核实:本机 1676 行
17092
+ * 全是 NULL)。`insertMessage` 照写 `msg.tokenCount ?? null`,而
17093
+ * `SessionStore.record()` / `appendSteps()` 从来不传这一格 —— 只有用例塞过数。
17094
+ * 所以 `getContext()` 事实上永远走它自己那条 `content.length / 3` 的兜底。
17095
+ *
17096
+ * 为什么不去接线:provider 只报**整轮**用量(`TokenUsage`),摊不到单条;
17097
+ * 拿字符数估一个值写进名叫 `token_count` 的列,等于把估算冒充真值 ——
17098
+ * 正是 v9 那次「0 = 免费」的反面教材。
17034
17099
  */
17035
17100
  tokenCount?: number;
17036
17101
  finishReason?: string;
@@ -19888,6 +19953,14 @@ interface RunningSchedule {
19888
19953
  startedAt: number;
19889
19954
  pid: number;
19890
19955
  host: string;
19956
+ /**
19957
+ * 有人请求终止这一次运行(2026-11-04)。`undefined` = 没请求过。
19958
+ *
19959
+ * ⚠️ **这是一个「请求」而不是「已停」** —— 执行器要等下一次事件循环才看得到。
19960
+ * 界面拿它把「停止」那颗按钮换成「正在停止…」,而**不能**因此就把转子撤掉:
19961
+ * 那一次真的还在跑。
19962
+ */
19963
+ cancelRequestedAt?: number;
19891
19964
  }
19892
19965
  /**
19893
19966
  * 抢一把锁。抢不到时把当前持有者一起回去 —— 记 `skipped-overlap` 那条运行记录
@@ -19913,6 +19986,35 @@ declare function acquireScheduleLock(db: SqliteDatabase, scheduleId: string, clo
19913
19986
  * @param clock 可注入的时钟,同 {@link acquireScheduleLock}
19914
19987
  */
19915
19988
  declare function listRunningSchedules(db: SqliteDatabase, clock?: () => number): RunningSchedule[];
19989
+ /**
19990
+ * 「请这一次运行停下来」—— 往锁行上写一个时间戳(2026-11-04)。
19991
+ *
19992
+ * ## 返回 false 是什么意思
19993
+ *
19994
+ * **此刻没有活着的锁**:那一次已经跑完了,或者压根没在跑。调用方(控制面 /
19995
+ * 端点)据此回 `no-active-run`,**不许假装成功** —— 界面上那颗按钮是按着
19996
+ * 「我刚看到它在跑」按下去的,而它看到的是一枚过期的转子。
19997
+ *
19998
+ * ## 为什么先判活再写
19999
+ *
20000
+ * 锁行可能是上一次被 `kill -9` 留下的残骸(心跳早就停了)。那时写标记等于
20001
+ * 给一条不存在的运行排队:下一次抢锁会把它盖掉(`acquireScheduleLock` 的
20002
+ * `ON CONFLICT … cancel_requested_at = NULL`),但「写了却永远不会被处理」
20003
+ * 本身仍然是一句假话。
20004
+ *
20005
+ * @param clock 可注入的时钟,用法同 {@link acquireScheduleLock}
20006
+ */
20007
+ declare function requestScheduleCancel(db: SqliteDatabase, scheduleId: string, clock?: () => number): boolean;
20008
+ /**
20009
+ * 执行器那一侧:有人请求取消吗。看到了就 `abort()`。
20010
+ *
20011
+ * 收尾时锁行被 `release()` 删掉,标记跟着一起消失,所以这里**没有对应的
20012
+ * 「清除」函数** —— 写一处、删一处,中间没有第三种状态要维护。
20013
+ *
20014
+ * ⚠️ **调用方必须节流**(执行器那边是 1 秒一次):事件流是逐 token 的,
20015
+ * 每个 delta 都查一次库会让一小时的运行多出十几万次查询。
20016
+ */
20017
+ declare function readCancelRequest(db: SqliteDatabase, scheduleId: string): number | undefined;
19916
20018
 
19917
20019
  /**
19918
20020
  * 触发器的校验、下一次触发时刻、以及生效区间(方案 45 §2.1)。
@@ -23546,4 +23648,4 @@ declare function resolveCodeModeWorker(baseDir: string, exists?: typeof existsSy
23546
23648
  */
23547
23649
  declare function codeModeWorkerPath(): string | undefined;
23548
23650
 
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 };
23651
+ 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, 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 };
package/dist/index.js CHANGED
@@ -2572,6 +2572,11 @@ function createMemoryTool(memory) {
2572
2572
  "action=add \u65B0\u589E\u6761\u76EE\uFF1Breplace \u66FF\u6362\u5DF2\u6709\u6761\u76EE\uFF1Bremove \u5220\u9664\uFF1Bsearch \u68C0\u7D22\uFF1Bread \u6309 id \u53D6\u5168\u6587\uFF1Bbudget \u67E5\u770B\u914D\u989D\u3002",
2573
2573
  'target=user \u5B58"\u7528\u6237\u662F\u8C01/\u504F\u597D\u4EC0\u4E48"\uFF1Btarget=memory \u5B58"\u6211\u9700\u8981\u8BB0\u4F4F\u7684\u9879\u76EE\u77E5\u8BC6"\u3002',
2574
2574
  "\u53EA\u8BB0\u5F55\u975E\u663E\u800C\u6613\u89C1\u3001\u4EE5\u540E\u8FD8\u4F1A\u7528\u5230\u7684\u4FE1\u606F\u2014\u2014\u4E0D\u8981\u8BB0\u5F55\u80FD\u4ECE\u4EE3\u7801\u6216 git \u5386\u53F2\u8BFB\u51FA\u6765\u7684\u5185\u5BB9\u3002",
2575
+ "\u5199\u4E4B\u524D\u5148\u5206\u6E05\u4E09\u4EF6\u4E8B\u3002\u8BB0\u504F\u4E86\u4E00\u6761\u4F1A\u4E00\u76F4\u7559\u5728\u540E\u9762\u6BCF\u4E00\u8F6E\u91CC\uFF0C\u6BD4\u5C11\u8BB0\u4E00\u6761\u574F\u5F97\u591A\uFF1A",
2576
+ "\u2460 \u8303\u56F4\uFF1A\u7528\u6237\u660E\u786E\u8BF4\u4E86\u300C\u4EE5\u540E\u90FD\u8FD9\u6837\u300D\u624D\u8BB0\u6210\u504F\u597D\uFF1B\u53EA\u662F\u4E00\u6B21\u6027\u8981\u6C42\uFF08\u300C\u8FD9\u6B21\u5148\u7ED9\u65B9\u6848\u300D\uFF09\u5C31\u7167\u4ED6\u8981\u8FC7\u8FD9\u4E00\u6B21\u5199\uFF0C\u522B\u5347\u683C\u3002\u62FF\u4E0D\u51C6\u5C31\u5F15\u539F\u8BDD\u3002",
2577
+ "\u2461 \u5F52\u5C5E\uFF1A\u7528\u6237\u7684\u539F\u8BDD\u662F\u4E8B\u5B9E\uFF1B\u4F60\u81EA\u5DF1\u6216\u5B50 agent \u7684\u63A8\u65AD\u3001\u5047\u8BBE\u3001\u6CA1\u9A8C\u8BC1\u7684\u7ED3\u8BBA\u4E0D\u662F\u2014\u2014\u522B\u8BB0\u6210\u7528\u6237\u7684\u610F\u601D\u3002",
2578
+ "\u2462 \u8BC1\u636E\uFF1A\u7F3A\u8BC1\u636E\u4E0D\u7B49\u4E8E\u6CA1\u53D1\u751F\u3002\u6CA1\u770B\u5230\u6388\u6743 / \u6CA1\u505A\u5B8C\uFF0C\u5C31\u5199\u300C\u672A\u89C1\u300D\uFF1B\u522B\u58F0\u79F0\u5B8C\u6210\u3001\u5DF2\u9A8C\u8BC1\u3001\u7528\u6237\u5DF2\u6279\u51C6\u3002",
2579
+ "\u9879\u76EE\u51B3\u7B56\u8FDB target=memory\uFF0C\u7528\u6237\u600E\u4E48\u5DE5\u4F5C\u8FDB target=user\uFF0C\u522B\u6DF7\uFF1B\u7528\u6237\u540E\u6765\u7EA0\u6B63\u8FC7\u7684\u7528 replace \u8986\u76D6\uFF0C\u522B\u65B0\u65E7\u5E76\u5B58\u3002",
2575
2580
  "system prompt \u91CC\u7684 MEMORY INDEX \u53EA\u6709\u6BCF\u6761\u7684\u9996\u884C\u6458\u8981\uFF1B\u8981\u5168\u6587\u7528 read\uFF0C\u627E\u4E0D\u5230\u7684\u7528 search\u3002"
2576
2581
  ].join("\n"),
2577
2582
  parameters: {
@@ -16145,6 +16150,11 @@ var SidebarMenuItemSchema = z.object({
16145
16150
  var SidebarNavItemSchema = SidebarMenuItemSchema.extend({
16146
16151
  primary: z.boolean().optional()
16147
16152
  });
16153
+ var TrayMenuItemSchema = SidebarMenuItemSchema.extend({
16154
+ activeLabel: z.string().min(1).optional(),
16155
+ activeIcon: z.string().min(1).optional(),
16156
+ closable: z.boolean().optional()
16157
+ });
16148
16158
  var BlankCardSchema = z.object({
16149
16159
  id: z.string().min(1),
16150
16160
  title: z.string().min(1),
@@ -16252,6 +16262,12 @@ var EpochConfigSchema = z.object({
16252
16262
  topbarMenu: z.array(SidebarMenuItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
16253
16263
  message: "topbarMenu: id must be unique"
16254
16264
  }).optional(),
16265
+ trayMenuLeft: z.array(TrayMenuItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
16266
+ message: "trayMenuLeft: id must be unique"
16267
+ }).optional(),
16268
+ trayMenuRight: z.array(TrayMenuItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
16269
+ message: "trayMenuRight: id must be unique"
16270
+ }).optional(),
16255
16271
  blankCards: z.array(BlankCardSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
16256
16272
  message: "blankCards: id must be unique"
16257
16273
  }).optional(),
@@ -19120,6 +19136,8 @@ var DESCRIPTIONS = {
19120
19136
  userMenuHost: "\u300C\u7528\u6237\u300D\u90A3\u4E00\u683C\u6574\u5F20\u83DC\u5355\u5F52\u5BBF\u4E3B\u81EA\u5DF1\u753B\u3002\u7F3A\u7701 false = \u7167\u65E7\u6211\u4EEC\u753B\u3002",
19121
19137
  sidebarHeadMenu: "\u5BBF\u4E3B\u81EA\u5B9A\u4E49\u7684\u4FA7\u680F\u5934\u90A3\u51E0\u679A\u56FE\u6807\u3002\u7F3A\u7701 = \u4E00\u679A\u90FD\u4E0D\u591A\uFF1B`id` \u4E0D\u8BB8\u91CD\u590D\uFF08\u90A3\u4E00\u6392\u4E0D\u5206\u91CC\u5916\uFF0C\u5199 `primary` \u4F1A\u88AB\u5265\u6389\uFF09\u3002",
19122
19138
  topbarMenu: "\u5BBF\u4E3B\u81EA\u5B9A\u4E49\u7684\u9876\u680F\u53F3\u4E0A\u56FE\u6807\u3002\u7F3A\u7701 = \u4E00\u679A\u90FD\u4E0D\u591A\uFF1B\u754C\u9762\u4E0A\u53EA\u628A\u7B2C\u4E00\u9879\u9732\u5728\u5916\u9762\uFF0C\u5176\u4F59\u6536\u8FDB\u300C\u22EF\u300D\u3002",
19139
+ trayMenuLeft: "\u5BBF\u4E3B\u81EA\u5B9A\u4E49\u7684\u6258\u76D8\u5DE6\u7AEF\u3002\u7F3A\u7701 = \u5DE6\u7AEF\u4E00\u679A\u90FD\u4E0D\u591A\uFF1B\u6BCF\u9879\u6709\u9ED8\u8BA4 / \u9009\u4E2D\u4E24\u5957\u6587\u6848\u548C\u56FE\u6807\uFF0C\u72B6\u6001\u7531\u5BBF\u4E3B\u4E0B\u53D1\u3001\u4E0D\u5728\u914D\u7F6E\u91CC\u3002",
19140
+ trayMenuRight: "\u5BBF\u4E3B\u81EA\u5B9A\u4E49\u7684\u6258\u76D8\u53F3\u7AEF\uFF08\u4E0A\u4E0B\u6587\u73AF\u4E4B\u524D\uFF09\u3002\u7F3A\u7701 = \u53F3\u7AEF\u4E00\u679A\u90FD\u4E0D\u591A\uFF1B\u5F62\u72B6\u548C\u5DE6\u7AEF\u90A3\u4E2A\u952E\u9010\u5B57\u76F8\u540C\uFF0C\u4E24\u8005\u4E92\u4E0D\u515C\u5E95\u3002",
19123
19141
  blankCards: "\u5BBF\u4E3B\u81EA\u5B9A\u4E49\u7684\u5F00\u573A\u5361\u7247\u3002\u7F3A\u7701 = \u65B0\u4F1A\u8BDD\u7A7A\u5C4F\u4E0A\u4E00\u5F20\u90FD\u6CA1\u6709\u3002",
19124
19142
  blankGreeting: "\u5BBF\u4E3B\u81EA\u5B9A\u4E49\u7684\u90A3\u53E5\u5F00\u573A\u62DB\u547C\u3002\u7F3A\u7701 = \u7528\u6211\u4EEC\u90A3\u53E5\uFF08\u548C\u4E0A\u9762\u51E0\u4E2A\u5BBF\u4E3B\u952E\u7684\u9ED8\u8BA4\u6863\u76F8\u53CD\uFF09\u3002",
19125
19143
  "blankGreeting.eyebrow": "\u62DB\u547C\u4E0A\u65B9\u90A3\u884C\u5C0F\u5B57\uFF0C\u6309\u8BED\u8A00\u7ED9\uFF08`zh` / `en`\uFF09\uFF0C\u81F3\u5C11\u7ED9\u4E00\u79CD\u3002",
@@ -22358,7 +22376,7 @@ var SessionManager = class {
22358
22376
  const lines = [
22359
22377
  `# ${meta.title || t("session_manage.export_untitled")}`,
22360
22378
  "",
22361
- t("session_manage.export_model", { model: meta.model }),
22379
+ meta.model ? t("session_manage.export_model", { model: meta.model }) : t("session_manage.export_model_unknown"),
22362
22380
  t("session_manage.export_time", { time: meta.startedAt.toISOString() }),
22363
22381
  t("session_manage.export_count", { count: messages.length }),
22364
22382
  "",
@@ -23869,6 +23887,14 @@ var MIGRATIONS4 = [
23869
23887
  up: (db) => {
23870
23888
  db.exec(`ALTER TABLE schedules DROP COLUMN max_budget_usd;`);
23871
23889
  }
23890
+ },
23891
+ {
23892
+ id: "schedule-cancel-request",
23893
+ version: 4,
23894
+ description: "\u9501\u8868\u591A\u4E00\u683C\uFF1A\u6709\u4EBA\u8BF7\u6C42\u7EC8\u6B62\u8FD9\u4E00\u6B21\u8FD0\u884C\u5417\uFF08\u534F\u4F5C\u5F0F\u53D6\u6D88\uFF0C2026-11-04\uFF09",
23895
+ up: (db) => {
23896
+ db.exec(`ALTER TABLE schedule_locks ADD COLUMN cancel_requested_at REAL;`);
23897
+ }
23872
23898
  }
23873
23899
  ];
23874
23900
  var ScheduleStore = class {
@@ -24275,7 +24301,8 @@ function acquireScheduleLock(db, scheduleId, clock2 = Date.now) {
24275
24301
  `INSERT INTO schedule_locks (schedule_id, pid, host, acquired_at, heartbeat_at)
24276
24302
  VALUES (@schedule_id, @pid, @host, @now, @now)
24277
24303
  ON CONFLICT(schedule_id) DO UPDATE SET
24278
- pid = @pid, host = @host, acquired_at = @now, heartbeat_at = @now
24304
+ pid = @pid, host = @host, acquired_at = @now, heartbeat_at = @now,
24305
+ cancel_requested_at = NULL
24279
24306
  WHERE schedule_locks.heartbeat_at < @stale`
24280
24307
  ).run({ schedule_id: scheduleId, pid, host, now, stale: now - LOCK_STALE_MS });
24281
24308
  if (info.changes === 0) {
@@ -24318,16 +24345,29 @@ function listRunningSchedules(db, clock2 = Date.now) {
24318
24345
  const now = clock2();
24319
24346
  const rows = db.prepare(
24320
24347
  `SELECT schedule_id AS scheduleId, pid, host,
24321
- acquired_at AS acquiredAt, heartbeat_at AS heartbeatAt
24348
+ acquired_at AS acquiredAt, heartbeat_at AS heartbeatAt,
24349
+ cancel_requested_at AS cancelRequestedAt
24322
24350
  FROM schedule_locks`
24323
24351
  ).all();
24324
24352
  return rows.filter((row) => isLive(row, now)).map((row) => ({
24325
24353
  scheduleId: row.scheduleId,
24326
24354
  startedAt: row.acquiredAt,
24327
24355
  pid: row.pid,
24328
- host: row.host
24356
+ host: row.host,
24357
+ ...row.cancelRequestedAt === null ? {} : { cancelRequestedAt: row.cancelRequestedAt }
24329
24358
  }));
24330
24359
  }
24360
+ function requestScheduleCancel(db, scheduleId, clock2 = Date.now) {
24361
+ const now = clock2();
24362
+ const holder = readHolder(db, scheduleId);
24363
+ if (!holder || !isLive(holder, now)) return false;
24364
+ const info = db.prepare("UPDATE schedule_locks SET cancel_requested_at = ? WHERE schedule_id = ?").run(now, scheduleId);
24365
+ return info.changes > 0;
24366
+ }
24367
+ function readCancelRequest(db, scheduleId) {
24368
+ const row = db.prepare("SELECT cancel_requested_at AS at FROM schedule_locks WHERE schedule_id = ?").get(scheduleId);
24369
+ return row?.at ?? void 0;
24370
+ }
24331
24371
  function readHolder(db, scheduleId) {
24332
24372
  const row = db.prepare(
24333
24373
  "SELECT pid, host, acquired_at AS acquiredAt, heartbeat_at AS heartbeatAt FROM schedule_locks WHERE schedule_id = ?"
@@ -28574,4 +28614,4 @@ function hasDedicatedExecContent(inv) {
28574
28614
  * `--tree` 的命令帮助里,让用户自己知道 `--tree` 意味着什么。
28575
28615
  */
28576
28616
 
28577
- 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, AgentInbox, AgentLoop, AppearanceStore, ApprovalCache, BLOCKED_TOOLS, BOARD_TOOL_NAMES, BoardStore, 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_INBOX_CAPACITY, DEFAULT_MAX_HOLD_CHARS, DEFAULT_MAX_RUNNING_MEMBERS, DEFAULT_MAX_WOKEN_SESSIONS, DELEGATE_SESSION_SOURCE, 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_POST_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, 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_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, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, SessionManager, SessionQueries, SessionReferences, SettingsFileError, SettingsFileSchema, SkillLearner, SkillSystem, TEAM_TOOL_NAMES, TOOL_SEARCH_TOOL, TaskNoticeTracker, TeamRegistry, 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, 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, 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, writableConfigKeys, writeSettingValue };
28617
+ 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, AgentInbox, AgentLoop, AppearanceStore, ApprovalCache, BLOCKED_TOOLS, BOARD_TOOL_NAMES, BoardStore, 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_INBOX_CAPACITY, DEFAULT_MAX_HOLD_CHARS, DEFAULT_MAX_RUNNING_MEMBERS, DEFAULT_MAX_WOKEN_SESSIONS, DELEGATE_SESSION_SOURCE, 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_POST_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, 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_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, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, SessionManager, SessionQueries, SessionReferences, SettingsFileError, SettingsFileSchema, SkillLearner, SkillSystem, TEAM_TOOL_NAMES, TOOL_SEARCH_TOOL, TaskNoticeTracker, TeamRegistry, 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, 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, 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, writableConfigKeys, writeSettingValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoch-agent/core",
3
- "version": "3.1.2",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "description": "epoch-agent 核心引擎:ReAct 循环、Provider 路由、工具调度、记忆管理",
6
6
  "repository": {
@@ -26,9 +26,9 @@
26
26
  "better-sqlite3": "^13.0.2",
27
27
  "gpt-tokenizer": "^3.4.0",
28
28
  "js-yaml": "^5.2.3",
29
- "zod": "^4.4.3",
30
- "@epoch-agent/infra": "3.1.2",
31
- "@epoch-agent/protocol": "3.1.2"
29
+ "zod": "^4.6.7",
30
+ "@epoch-agent/protocol": "3.2.0",
31
+ "@epoch-agent/infra": "3.2.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@ai-sdk/alibaba": "^2.0.69",