@epoch-agent/core 3.0.0 → 3.1.1
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 +30 -29
- package/dist/index.d.ts +707 -6
- package/dist/index.js +2236 -582
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, BackgroundTaskInfo, EpochToolCall, Telemetry, HookManager as HookManager$1, Lang, PermissionManager as PermissionManager$1, ApprovalRequest, ApprovalReply, AgentRoleScope, AgentRoleSource,
|
|
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';
|
|
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
3
|
import { IsolationBackend, 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';
|
|
@@ -2544,6 +2544,324 @@ interface UtilityModelInfo {
|
|
|
2544
2544
|
issue?: string;
|
|
2545
2545
|
}
|
|
2546
2546
|
|
|
2547
|
+
/**
|
|
2548
|
+
* 一个成员的收件箱 —— 子 agent 那一侧的投递口。
|
|
2549
|
+
*
|
|
2550
|
+
* ## 它实现的是 `SteerSource`
|
|
2551
|
+
*
|
|
2552
|
+
* 引擎(`loop.ts:723`)在每个**步骤边界**调一次 `take()`,把拿到的东西当成
|
|
2553
|
+
* 一条 `steer` 事件插进当前这一轮。所以「子任务跑到第 3 步收到一条消息、
|
|
2554
|
+
* 当轮改变行为」这件事,**不需要新机制** —— 主会话的插话走的就是这条路
|
|
2555
|
+
* (`agent-session.ts:174` 把宿主的队列原样透给 `RunInput.steer`)。
|
|
2556
|
+
*
|
|
2557
|
+
* 我们做的只是:给子 agent 也接一个源,而那个源的另一头是 `send_message`。
|
|
2558
|
+
*
|
|
2559
|
+
* ## 满了丢最老的,但要**说一声**
|
|
2560
|
+
*
|
|
2561
|
+
* 计划里的风险一是上下文膨胀:成员互发消息时历史会一直长,而子 agent 的
|
|
2562
|
+
* 上下文刻意是小的。所以给收件箱一个硬容量。
|
|
2563
|
+
*
|
|
2564
|
+
* 丢最老的而不是拒收新的:拒收会让**最新的纠正**进不来,而那正是这个功能
|
|
2565
|
+
* 存在的理由。代价是老消息没了 —— 所以 `take()` 时如果丢过,前面补一行
|
|
2566
|
+
* 说明。静默丢话是最坏的一种:模型不知道自己漏看了什么。
|
|
2567
|
+
*
|
|
2568
|
+
* ## 为什么 `take()` 一次取干净
|
|
2569
|
+
*
|
|
2570
|
+
* 判据和 `SteerSource.take()` 上那段逐字相同:两条消息之间没有模型的回答,
|
|
2571
|
+
* 分两轮送进去等于让它对着第一句先答一遍 —— 而这两句本来是**同一批**
|
|
2572
|
+
* 纠正。这里 additionally 把几条消息拼成同一条 user 内容,省一次角色切换。
|
|
2573
|
+
*/
|
|
2574
|
+
|
|
2575
|
+
/** 一个成员收件箱最多攒多少条还没被读走的消息 */
|
|
2576
|
+
declare const DEFAULT_INBOX_CAPACITY = 20;
|
|
2577
|
+
declare class AgentInbox implements SteerSource {
|
|
2578
|
+
private readonly capacity;
|
|
2579
|
+
private queue;
|
|
2580
|
+
private dropped;
|
|
2581
|
+
constructor(capacity?: number);
|
|
2582
|
+
/**
|
|
2583
|
+
* 投一条。返回 `false` = 因为满了挤掉了一条更老的。
|
|
2584
|
+
*
|
|
2585
|
+
* 返回值不是「成功与否」:**这条总是进去了**。它只用来让调用方在工具结果
|
|
2586
|
+
* 里说一句「顺带挤掉了 N 条」,而不是让模型以为一切照旧。
|
|
2587
|
+
*/
|
|
2588
|
+
push(msg: AgentMessage): boolean;
|
|
2589
|
+
pending(): boolean;
|
|
2590
|
+
/**
|
|
2591
|
+
* 取走全部待读消息,折成**一条** user 内容。
|
|
2592
|
+
*
|
|
2593
|
+
* 前缀由 protocol 的 `agentMessageLine` 拼 —— 那是两个消费方(这里和父会话的
|
|
2594
|
+
* `TaskNoticeTracker`)逐字相同的唯一保证,见那个函数的注释。
|
|
2595
|
+
*/
|
|
2596
|
+
take(): EpochUserContent[];
|
|
2597
|
+
/** 还没被读走的条数。`list_agents` 和排障用 */
|
|
2598
|
+
get size(): number;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
/**
|
|
2602
|
+
* 团队共享任务板(阶段 2)—— 一组带依赖和归属的任务,多个成员看得见同一份。
|
|
2603
|
+
*
|
|
2604
|
+
* ## 为什么是内存、不是 SQLite
|
|
2605
|
+
*
|
|
2606
|
+
* 判据和 `registry.ts` 文件头那条**逐字相同**:这份东西的读者是**同一个进程里
|
|
2607
|
+
* 的那几个成员**。别的进程既不该看见你的任务、也不该往里写 —— 那是两拨互不
|
|
2608
|
+
* 相干的活,混在一块板上只会互相干扰。要跨进程共享的是**讨论板**(阶段 3),
|
|
2609
|
+
* 它才走 SQLite。
|
|
2610
|
+
*
|
|
2611
|
+
* ## `expectedRevision` 是 compare-and-set,不是「乐观锁的装饰」
|
|
2612
|
+
*
|
|
2613
|
+
* 两个成员同时看到「任务 3 还是 pending」,各自都决定去认领它。没有这道闸门
|
|
2614
|
+
* 的话后写的那个会静默盖掉前一个,而**两边都收到成功**—— 于是两个人干同一件
|
|
2615
|
+
* 事,而板上写着只有一个 owner。
|
|
2616
|
+
*
|
|
2617
|
+
* 所以 `update()` 收一个调用方**上一次读到的** revision:对不上就整笔拒绝,
|
|
2618
|
+
* 一个字段都不改,并告诉它现在是多少(让它可以重读再决定,而不是瞎猜)。
|
|
2619
|
+
* 不传 = 不检查,那条路留给「我确实是唯一写者」的场景。
|
|
2620
|
+
*
|
|
2621
|
+
* 这和 harness 的 `team_task_update`、codex 的 DAG 板是同一条规矩。
|
|
2622
|
+
*/
|
|
2623
|
+
|
|
2624
|
+
/** 一次写入的结果。失败时**一个字段都没改** */
|
|
2625
|
+
type TaskWriteResult = {
|
|
2626
|
+
ok: true;
|
|
2627
|
+
task: TeamTask;
|
|
2628
|
+
} | {
|
|
2629
|
+
ok: false;
|
|
2630
|
+
reason: string;
|
|
2631
|
+
};
|
|
2632
|
+
declare class TeamTaskBoard {
|
|
2633
|
+
private readonly capacity;
|
|
2634
|
+
private readonly tasks;
|
|
2635
|
+
/** 插一个变更回调。registry 拿它把「板子变了」也算进「团队变了」 */
|
|
2636
|
+
private readonly listeners;
|
|
2637
|
+
constructor(capacity?: number);
|
|
2638
|
+
onChange(cb: () => void): () => void;
|
|
2639
|
+
private notify;
|
|
2640
|
+
/**
|
|
2641
|
+
* 建一条。
|
|
2642
|
+
*
|
|
2643
|
+
* `dependsOn` 里出现不存在的 id 是**硬失败**:那种依赖永远不会被满足,
|
|
2644
|
+
* 而任务会一直卡在「等一个不存在的东西」上,看起来像「它还没开始」。
|
|
2645
|
+
*/
|
|
2646
|
+
create(input: {
|
|
2647
|
+
title: string;
|
|
2648
|
+
description?: string;
|
|
2649
|
+
owner?: string;
|
|
2650
|
+
dependsOn?: string[];
|
|
2651
|
+
}): TaskWriteResult;
|
|
2652
|
+
get(id: string): TeamTask | undefined;
|
|
2653
|
+
list(filter?: {
|
|
2654
|
+
status?: TeamTaskStatus;
|
|
2655
|
+
owner?: string;
|
|
2656
|
+
}): TeamTask[];
|
|
2657
|
+
/**
|
|
2658
|
+
* 改一条。
|
|
2659
|
+
*
|
|
2660
|
+
* `expectedRevision` 给了就必须**正好等于**当前值 —— 这是两个成员同时认领
|
|
2661
|
+
* 同一件事时唯一能拦住「后写的静默盖掉前一个」的地方。
|
|
2662
|
+
*/
|
|
2663
|
+
update(id: string, patch: TeamTaskPatch, expectedRevision?: number): TaskWriteResult;
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
/**
|
|
2667
|
+
* 进程内的成员表 —— 谁在、它现在什么状态、它的收件箱在哪。
|
|
2668
|
+
*
|
|
2669
|
+
* ## 为什么**不持久化**
|
|
2670
|
+
*
|
|
2671
|
+
* 一个成员就是一次 `new AgentLoop(...).run()`(`session-factory.ts:1306`),
|
|
2672
|
+
* 跑完那个实例就没人持有了。它能被「记住」的唯一载体是会话库里那一行
|
|
2673
|
+
* (`persistDelegateTurn`,带 `parent_id`)—— 而那是**事后回看**用的,
|
|
2674
|
+
* 不是「它还活着」的证据。
|
|
2675
|
+
*
|
|
2676
|
+
* 所以这张表每个进程一套,进程退出即消失。这和阶段 3 的讨论板是**两回事**:
|
|
2677
|
+
* 板子要跨进程共享(那是它存在的理由),所以它走 SQLite;roster 跨进程没有
|
|
2678
|
+
* 意义 —— 别的进程里的成员不在你这个进程里,你既看不到它的收件箱也打不断它。
|
|
2679
|
+
* 混在一起做会让「板上有一条消息,但收件人是另一个进程里早就结束的成员」
|
|
2680
|
+
* 变成一种没法处理的中间态。
|
|
2681
|
+
*
|
|
2682
|
+
* ## 为什么收件箱住在表里而不是调用方手里
|
|
2683
|
+
*
|
|
2684
|
+
* 两个不相干的调用方要往同一个成员塞话:父 agent 的 `send_message`
|
|
2685
|
+
* (`core/src/tools/builtin/send-message.ts`)和阶段 2 的成员之间互发。
|
|
2686
|
+
* 收件箱跟着成员走,这两条路就都只需要一个 `agentId`。
|
|
2687
|
+
*
|
|
2688
|
+
* 另外子 agent 那一侧(`runtime/src/session-factory.ts`)拿到收件箱的方式
|
|
2689
|
+
* 是**按 `subSessionId` 反查** —— 它手里只有这个,没有 agentId。所以表同时
|
|
2690
|
+
* 按两个键索引,见 `bySession()`。
|
|
2691
|
+
*/
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* 一次投递的结果。
|
|
2695
|
+
*
|
|
2696
|
+
* `ok: false` 时消息**没有进任何收件箱** —— 调用方(那个工具)要把 `reason`
|
|
2697
|
+
* 原样交给模型,别自己改写。原因是这条路的失败模式全是「模型以为送到了」:
|
|
2698
|
+
* 发给一个已经收工的成员,它下一轮永远不来,而父 agent 会干等着。
|
|
2699
|
+
*/
|
|
2700
|
+
type DeliveryResult = {
|
|
2701
|
+
ok: true;
|
|
2702
|
+
to: string;
|
|
2703
|
+
status: AgentMemberStatus;
|
|
2704
|
+
} | {
|
|
2705
|
+
ok: false;
|
|
2706
|
+
to: string;
|
|
2707
|
+
reason: string;
|
|
2708
|
+
};
|
|
2709
|
+
declare class TeamRegistry {
|
|
2710
|
+
private readonly inboxCapacity;
|
|
2711
|
+
private readonly members;
|
|
2712
|
+
/** 按子会话 id 反查 —— 子 agent 那一侧只有这个键 */
|
|
2713
|
+
private readonly bySessionId;
|
|
2714
|
+
/**
|
|
2715
|
+
* 主会话的收件箱们 —— 按 sessionId 索引。
|
|
2716
|
+
*
|
|
2717
|
+
* 不再只有一个 `lead` 收件箱:每个主会话有自己的身份(用 sessionId 做 agentId),
|
|
2718
|
+
* 这样不同会话派出的成员不会串话,且会话之间可以互相通信。
|
|
2719
|
+
*/
|
|
2720
|
+
private readonly mainInboxes;
|
|
2721
|
+
/** 登记过的主会话 id(判据在 `registerSession` 上) */
|
|
2722
|
+
private readonly sessions;
|
|
2723
|
+
/**
|
|
2724
|
+
* 打断用的回调(`interrupt_agent` 拉的就是它们)。
|
|
2725
|
+
*
|
|
2726
|
+
* 和 `members` 分开存:那个控制器住在 `DelegateManager.runSingleTask` 里,
|
|
2727
|
+
* 而成员登记**早于**控制器诞生(先登记才能早点收到消息)。所以这条线是
|
|
2728
|
+
* 「后补的」,判据在 `setAbort` 上。
|
|
2729
|
+
*/
|
|
2730
|
+
private readonly aborters;
|
|
2731
|
+
/** 「团队变了」的订阅者(`wait_agent` 挂在这里) */
|
|
2732
|
+
private readonly listeners;
|
|
2733
|
+
/** 共享任务板(阶段 2)。它也变动时也会叫醒 `wait_agent` */
|
|
2734
|
+
readonly tasks: TeamTaskBoard;
|
|
2735
|
+
constructor(inboxCapacity?: number);
|
|
2736
|
+
/** 订阅「团队变了」。返回取消订阅 */
|
|
2737
|
+
onChange(cb: () => void): () => void;
|
|
2738
|
+
/**
|
|
2739
|
+
* 叫醒所有等着的(`wait_agent` 的底座)。
|
|
2740
|
+
*
|
|
2741
|
+
* ⚠️ **`setActivity` 刻意不叫**:它每完成一步就变一次,接上去的话
|
|
2742
|
+
* `wait_agent` 会在一个子 agent 跑得正欢时每一步都返回一次,而调用方要的是
|
|
2743
|
+
* 「有实质变化」(新人 / 新消息 / 任务动了)。
|
|
2744
|
+
*/
|
|
2745
|
+
private notify;
|
|
2746
|
+
/**
|
|
2747
|
+
* 等下一次团队变化。
|
|
2748
|
+
*
|
|
2749
|
+
* @returns `true` = 真的变了;`false` = 等到超时或被中止。
|
|
2750
|
+
* 两种情况都只报「有没有变」,**不带变了什么** —— 调用方应该自己去
|
|
2751
|
+
* `list_agents` / `team_task_list` 读一遍,而不是相信一个可能已经过时的摘要。
|
|
2752
|
+
*/
|
|
2753
|
+
waitForChange(ms: number, signal?: {
|
|
2754
|
+
readonly aborted: boolean;
|
|
2755
|
+
}): Promise<boolean>;
|
|
2756
|
+
/**
|
|
2757
|
+
* 派出去一个成员。返回它的 `AgentMemberInfo`(含 `agentId`)。
|
|
2758
|
+
*
|
|
2759
|
+
* `agentId` 今天就是子会话 id:一次派活的子会话本来就唯一,再造一个短名
|
|
2760
|
+
* 只是多一个要同步的映射。阶段 2 的 `spawn_teammate` 要「具名」时再让
|
|
2761
|
+
* 调用方传 `agentId` 进来。
|
|
2762
|
+
*/
|
|
2763
|
+
createMember(args: {
|
|
2764
|
+
sessionId: string;
|
|
2765
|
+
parentSessionId: string;
|
|
2766
|
+
/** 具名成员(阶段 2 的 `spawn_teammate`)。缺省 = 子会话 id */
|
|
2767
|
+
agentId?: string;
|
|
2768
|
+
/** 角色名。纯展示,进 `list_agents` */
|
|
2769
|
+
role?: string;
|
|
2770
|
+
}): AgentMemberInfo;
|
|
2771
|
+
/**
|
|
2772
|
+
* 补上「怎么打断这个成员」。
|
|
2773
|
+
*
|
|
2774
|
+
* 控制器诞生在 `DelegateManager.runSingleTask` 里,而成员登记比它早 ——
|
|
2775
|
+
* 所以那条线只能事后接进来。没接上的成员 `interrupt()` 返回 `false`,
|
|
2776
|
+
* 而不是假装打断了。
|
|
2777
|
+
*/
|
|
2778
|
+
setAbort(agentId: string, fn: () => void): void;
|
|
2779
|
+
/** 打断一个成员。返回 `false` = 没有可打断的(已经收工,或者从没接上) */
|
|
2780
|
+
interrupt(agentId: string): boolean;
|
|
2781
|
+
/** 按 `agentId` 取。返回的是**快照**,改它不会影响表 */
|
|
2782
|
+
get(agentId: string): AgentMemberInfo | undefined;
|
|
2783
|
+
/** 按子会话 id 取 —— 子 agent 那一侧唯一的入口 */
|
|
2784
|
+
bySession(sessionId: string): AgentMemberInfo | undefined;
|
|
2785
|
+
/** 全部成员,按派出去的先后 */
|
|
2786
|
+
list(): AgentMemberInfo[];
|
|
2787
|
+
/** 把一个成员的收件箱交给子 agent 那一侧(`sub.run({ steer })`) */
|
|
2788
|
+
inboxOf(agentId: string): AgentInbox | undefined;
|
|
2789
|
+
/** 同上,按子会话 id 查 */
|
|
2790
|
+
inboxBySession(sessionId: string): AgentInbox | undefined;
|
|
2791
|
+
/**
|
|
2792
|
+
* 登记一段主会话 —— 「这个 id 是活的会话」的唯一凭据。
|
|
2793
|
+
*
|
|
2794
|
+
* ## 为什么需要它
|
|
2795
|
+
*
|
|
2796
|
+
* `deliver` 现在要同时接受两种收件人:成员(在 `members` 里)和**别的主会话**
|
|
2797
|
+
* (不在表里)。只看「表里没有」就当成主会话的话,一个拼错的成员名会被静默
|
|
2798
|
+
* 投进一个永远没人读的箱子 —— 那正是 `send_message` 从一开始就要防的
|
|
2799
|
+
* 「调用方以为送到了」。
|
|
2800
|
+
*
|
|
2801
|
+
* 所以主会话先登记再寻址,剩下的未知 id 仍然报错。登记点只有一处:
|
|
2802
|
+
* `AgentLoop.runTurns()` 开跑时登记自己(判据在那儿)。
|
|
2803
|
+
*/
|
|
2804
|
+
registerSession(sessionId: string): void;
|
|
2805
|
+
/** 这个 id 是不是一段登记过的主会话(诊断和 `list_agents --all` 用) */
|
|
2806
|
+
hasSession(sessionId: string): boolean;
|
|
2807
|
+
/** 登记过的全部主会话 id,按登记先后 */
|
|
2808
|
+
sessionIds(): string[];
|
|
2809
|
+
/**
|
|
2810
|
+
* 取主会话的收件箱。**不存在时会新建** —— 这样成员给一个还没调用过团队工具的
|
|
2811
|
+
* 主会话发消息时,它下一轮能收到,而不是因为「收件箱不存在」失败。
|
|
2812
|
+
*/
|
|
2813
|
+
mainInbox(sessionId: string): AgentInbox;
|
|
2814
|
+
/**
|
|
2815
|
+
* 记它此刻在干什么。
|
|
2816
|
+
*
|
|
2817
|
+
* 来源是 `SubAgentRunner.onProgress` 那条通道。**没有就不叫**,别填占位符 ——
|
|
2818
|
+
* `list_agents` 会把它原样印出来,一句话占位会让模型以为那是真进度。
|
|
2819
|
+
*/
|
|
2820
|
+
setActivity(agentId: string, line: string): void;
|
|
2821
|
+
/**
|
|
2822
|
+
* 把它重新标成「在跑」(阶段 2 的 `followup_task`)。
|
|
2823
|
+
*
|
|
2824
|
+
* ## 为什么不是再 `createMember` 一次
|
|
2825
|
+
*
|
|
2826
|
+
* 成员已经在表里了 —— 再建一次撞名,而那个错会以「`followup_task` 明明成了、
|
|
2827
|
+
* 却报成员名被占用」的形态出现。这一条只动状态,不动身份:`sessionId`、
|
|
2828
|
+
* `parentSessionId`、`role`、`startedAt` 全部保留 —— 续跑的是**同一个**成员,
|
|
2829
|
+
* 不是新派出去的一个。
|
|
2830
|
+
*
|
|
2831
|
+
* ## `finishedAt` 必须清掉
|
|
2832
|
+
*
|
|
2833
|
+
* `markFinished` 有一道「`finishedAt` 只写一次」的闸。不清的话这一轮跑完
|
|
2834
|
+
* 那道闸会把新的收工挡掉 —— 成员会永远停在 `running`,而 `list_agents`
|
|
2835
|
+
* 上那一行看着像还在干活。
|
|
2836
|
+
*
|
|
2837
|
+
* `activity` 也清:它上一轮最后那句话(「读完了 src/a.ts」)说的是**上一次**
|
|
2838
|
+
* 的收尾,留着会让 `list_agents` 在它刚醒来时报告一句过期的话。
|
|
2839
|
+
*/
|
|
2840
|
+
markRunning(agentId: string): void;
|
|
2841
|
+
/** 收工(或挂掉)。`finishedAt` 只写一次 —— 重复调用是空操作 */
|
|
2842
|
+
markFinished(agentId: string, status: Extract<AgentMemberStatus, 'idle' | 'finalized' | 'failed'>): void;
|
|
2843
|
+
/**
|
|
2844
|
+
* 投一条消息。
|
|
2845
|
+
*
|
|
2846
|
+
* ## `finalized` / `failed` 一律失败,消息**不进收件箱**
|
|
2847
|
+
*
|
|
2848
|
+
* 计划里那条规矩(照 codex 的 `api.rs:35-36`):通知不唤醒已终结的 agent。
|
|
2849
|
+
* 收进一个永远不会有下一轮读它的箱子,等于给调用方一个假成功 —— 而父 agent
|
|
2850
|
+
* 接下来会照常等回音。
|
|
2851
|
+
*
|
|
2852
|
+
* 阶段 2 有了 `followup_task`(2026-10-30)之后,唤醒走的是**另一条路**:
|
|
2853
|
+
* 用 `resumeSessionId` 另起一轮 `run()`,而不是往这个箱子里塞一条「等下一轮」
|
|
2854
|
+
* 的消息。两件事刻意分开 —— 收进一个不会有人读的箱子却报成功,正是这一条要防的。
|
|
2855
|
+
*/
|
|
2856
|
+
deliver(msg: AgentMessage): DeliveryResult;
|
|
2857
|
+
/** 造一条消息。`id` 现在没有消费方(阶段 2 的重试去重要用),但形状先定下 */
|
|
2858
|
+
static message(args: {
|
|
2859
|
+
from: string;
|
|
2860
|
+
to: string;
|
|
2861
|
+
text: string;
|
|
2862
|
+
}): AgentMessage;
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2547
2865
|
/**
|
|
2548
2866
|
* 给人看的路径:工作区内走相对路径,分隔符统一成 `/`。
|
|
2549
2867
|
*
|
|
@@ -2601,15 +2919,74 @@ type BackgroundTaskSource = () => readonly BackgroundTaskInfo[];
|
|
|
2601
2919
|
*/
|
|
2602
2920
|
declare class TaskNoticeTracker {
|
|
2603
2921
|
private readonly source;
|
|
2922
|
+
/**
|
|
2923
|
+
* 成员表(阶段 1)。给了才把成员发来的话拌进这条 note。
|
|
2924
|
+
*
|
|
2925
|
+
* 不给 = 行为和改造前逐字节相同 —— 用例、嵌入宿主不必为了跑一轮
|
|
2926
|
+
* 对话去建一张成员表。
|
|
2927
|
+
*/
|
|
2928
|
+
private readonly team?;
|
|
2929
|
+
/**
|
|
2930
|
+
* 讨论板的订阅拉取点(阶段 3)。`pending` 纯读,`markRead` 推到最新。
|
|
2931
|
+
*
|
|
2932
|
+
* ⚠️ **`markRead` 只在确定要返回 note 时调**(见下面 `notice()` 里那一段):
|
|
2933
|
+
* 提前推游标等于把还没进上下文的帖子标记成「看过了」。
|
|
2934
|
+
*/
|
|
2935
|
+
private readonly board?;
|
|
2604
2936
|
private readonly seen;
|
|
2605
|
-
constructor(source: BackgroundTaskSource | undefined
|
|
2937
|
+
constructor(source: BackgroundTaskSource | undefined,
|
|
2938
|
+
/**
|
|
2939
|
+
* 成员表(阶段 1)。给了才把成员发来的话拌进这条 note。
|
|
2940
|
+
*
|
|
2941
|
+
* 不给 = 行为和改造前逐字节相同 —— 用例、嵌入宿主不必为了跑一轮
|
|
2942
|
+
* 对话去建一张成员表。
|
|
2943
|
+
*/
|
|
2944
|
+
team?: TeamRegistry | undefined,
|
|
2945
|
+
/**
|
|
2946
|
+
* 讨论板的订阅拉取点(阶段 3)。`pending` 纯读,`markRead` 推到最新。
|
|
2947
|
+
*
|
|
2948
|
+
* ⚠️ **`markRead` 只在确定要返回 note 时调**(见下面 `notice()` 里那一段):
|
|
2949
|
+
* 提前推游标等于把还没进上下文的帖子标记成「看过了」。
|
|
2950
|
+
*/
|
|
2951
|
+
board?: {
|
|
2952
|
+
pending: () => Array<{
|
|
2953
|
+
target: string;
|
|
2954
|
+
count: number;
|
|
2955
|
+
}>;
|
|
2956
|
+
markRead: () => void;
|
|
2957
|
+
} | undefined);
|
|
2958
|
+
/**
|
|
2959
|
+
* 取走父亲收件箱里的成员消息,折成 notice 里的那几行。
|
|
2960
|
+
*
|
|
2961
|
+
* ⚠️ **只能在确定要返回一条 note 时调**(`take()` 会清空队列)。
|
|
2962
|
+
* 现在的调用点(`loop.ts:1367`)拿到什么就往 `messages` 里推什么,
|
|
2963
|
+
* 所以那里是安全;哪天有人把它改成「先问一句再决定」,这个函数就要跟着改。
|
|
2964
|
+
*/
|
|
2965
|
+
private takeAgentMessages;
|
|
2606
2966
|
/**
|
|
2607
2967
|
* 算出这一轮要报的话;没有变化时返回 `null`。
|
|
2608
2968
|
*
|
|
2609
2969
|
* 返回 `null` 而不是空串很重要 —— 调用方据此决定**要不要往 messages 里塞
|
|
2610
2970
|
* 一条消息**。塞一条空消息会白白多一轮 role 切换,还可能打断 prompt cache。
|
|
2611
2971
|
*/
|
|
2612
|
-
notice(): string | null;
|
|
2972
|
+
notice(sessionId?: string): string | null;
|
|
2973
|
+
/**
|
|
2974
|
+
* 和 {@link notice} 同一次计算,但把**成员发来的那几行**单独交出来
|
|
2975
|
+
* (2026-11-02)。
|
|
2976
|
+
*
|
|
2977
|
+
* 判据是它有两类消费方:模型那一侧要整段(后台任务 + 成员消息 + 讨论板),
|
|
2978
|
+
* 而**界面和会话历史只要成员消息那一半** —— 后台任务状态每轮都可能变,
|
|
2979
|
+
* 把它落进库等于往对话里灌噪音。拆开之后两个消费方各取所需,
|
|
2980
|
+
* 而不是让落盘那一侧拿字符串前缀去猜哪几行是消息。
|
|
2981
|
+
*
|
|
2982
|
+
* ⚠️ **取走就没了**(`take()` 清空队列),所以 `notice()` 和它
|
|
2983
|
+
* **不能对同一个箱子里调两次** —— 调一次拿 `text` 和 `agent` 两样。
|
|
2984
|
+
* 两个方法都留着的理由是旧调用方只要一句话。
|
|
2985
|
+
*/
|
|
2986
|
+
noticeDetailed(sessionId?: string): {
|
|
2987
|
+
text: string;
|
|
2988
|
+
agent: string[];
|
|
2989
|
+
} | null;
|
|
2613
2990
|
}
|
|
2614
2991
|
/**
|
|
2615
2992
|
* 一条变化的措辞。**不带输出、不带 pid**。
|
|
@@ -3295,6 +3672,35 @@ interface AgentConfig {
|
|
|
3295
3672
|
* core 不 import plugin-terminal(分层不允许),所以这条线由装配层接。
|
|
3296
3673
|
*/
|
|
3297
3674
|
backgroundTasks?: BackgroundTaskSource;
|
|
3675
|
+
/**
|
|
3676
|
+
* 成员表(阶斵 1)。给了就在每轮 LLM 请求前把**成员发来的话**拌成一条 note
|
|
3677
|
+
* (与上面 `backgroundTasks` 那条并排,但各自一条)。
|
|
3678
|
+
*
|
|
3679
|
+
* 不给 = 行为与改造前逐字节相同。子 agent 那条**不要填**:它没有可寻址的
|
|
3680
|
+
* 成员表,它的收件箱是另一回事(`RunInput.steer`,由 `subRunner` 接)。
|
|
3681
|
+
*
|
|
3682
|
+
* ⚠️ 只取类型(编译后擦掉):`TeamRegistry` 反过来依赖 `SteerSource`,
|
|
3683
|
+
* 运行期走 type-only 才不会成环。
|
|
3684
|
+
*/
|
|
3685
|
+
team?: TeamRegistry;
|
|
3686
|
+
/**
|
|
3687
|
+
* 讨论板的订阅拉取点(阶段 3)。给了就在每轮请求前把「你订阅的格子有新帖」
|
|
3688
|
+
* 拌成一条 note(与上面两条并排,各自一条)。
|
|
3689
|
+
*
|
|
3690
|
+
* 两个回调而不是一个对象:`markRead` 必须**只在确定要返回 note 时**调
|
|
3691
|
+
* (它会把游标推到最新),而 `pending()` 是纯读。把它们合成一个
|
|
3692
|
+
* `pendingAndMark()` 会让「这次没返回 note」变成一次静默漏看。
|
|
3693
|
+
*
|
|
3694
|
+
* 不给 = 行为与改造前逐字节相同。子 agent 那条**不要填** ——
|
|
3695
|
+
* 它的收件箱是 `RunInput.steer`,和板子无关。
|
|
3696
|
+
*/
|
|
3697
|
+
board?: {
|
|
3698
|
+
pending: () => Array<{
|
|
3699
|
+
target: string;
|
|
3700
|
+
count: number;
|
|
3701
|
+
}>;
|
|
3702
|
+
markRead: () => void;
|
|
3703
|
+
};
|
|
3298
3704
|
/**
|
|
3299
3705
|
* 内容合规闸门(core 的 `compliance/`)。给了就在两处生效:
|
|
3300
3706
|
* 模型输出(`agent/turn.ts` 那个唯一出口)和用户输入(发请求之前)。
|
|
@@ -3483,6 +3889,16 @@ interface TurnRecord {
|
|
|
3483
3889
|
result: string;
|
|
3484
3890
|
}>;
|
|
3485
3891
|
duration: number;
|
|
3892
|
+
/**
|
|
3893
|
+
* 在这**一次请求之前**插进来的消息(2026-11-02)。今天只有一种来源:
|
|
3894
|
+
* 子 agent 的收件箱(`drainSteer` 在步骤边界取走的 `send_message`)。
|
|
3895
|
+
*
|
|
3896
|
+
* 它进这一步的判据是**顺序**:这些消息是在本步那次模型请求之前进上下文的,
|
|
3897
|
+
* 所以落盘时它们应该排在本步 assistant 行**前面**(`persistDelegateTurn`
|
|
3898
|
+
* 那一侧就是这么用的)。不带它的话,子会话的历史里只有它自己说过的话,
|
|
3899
|
+
* 「谁跟它说了什么」查不到 —— 而子 agent 恰恰是靠这些话才改的行为。
|
|
3900
|
+
*/
|
|
3901
|
+
received?: string[];
|
|
3486
3902
|
}
|
|
3487
3903
|
/** 中止信号的最小接口(AbortSignal 也满足) */
|
|
3488
3904
|
interface AbortLike {
|
|
@@ -3540,6 +3956,26 @@ interface SubTask {
|
|
|
3540
3956
|
* 是常见形态,强制整批同角色没道理。
|
|
3541
3957
|
*/
|
|
3542
3958
|
role?: string;
|
|
3959
|
+
/**
|
|
3960
|
+
* 具名成员(阶段 2 的 `spawn_teammate`)。缺省 = 用子会话 id。
|
|
3961
|
+
*
|
|
3962
|
+
* 给了之后 `send_message` / `interrupt_agent` 都能按这个名字找到它 ——
|
|
3963
|
+
* 而 `delegate_task` 派出去的匿名成员只能靠 `list_agents` 看到那个
|
|
3964
|
+
* `delegate-xxxx`。重名由 registry 直接抛(不会静默改名)。
|
|
3965
|
+
*/
|
|
3966
|
+
agentId?: string;
|
|
3967
|
+
/**
|
|
3968
|
+
* 接着这个**子会话**再跑一轮(阶段 2 的 `followup_task`)。
|
|
3969
|
+
*
|
|
3970
|
+
* 给了之后:
|
|
3971
|
+
* - 会话 id 就用它(不现生成 `delegate-xxxx`)—— 而“用同一个 id”就是这整
|
|
3972
|
+
* 条路的实现:runner 会按它把库里那段历史装回来;
|
|
3973
|
+
* - **不重新登记成员**(那个成员已经在了,重登记会撞名),改走 `markRunning`。
|
|
3974
|
+
*
|
|
3975
|
+
* ⚠️ 它和 `agentId` **不绑定**:匿名成员(`delegate_task` 派出去的)也有一行
|
|
3976
|
+
* 子会话,也能被续。只是它们没有名字,得用 `list_agents` 看到的那个 id 寻址。
|
|
3977
|
+
*/
|
|
3978
|
+
resumeSessionId?: string;
|
|
3543
3979
|
}
|
|
3544
3980
|
/** 委托参数(工具接收) */
|
|
3545
3981
|
interface DelegateArgs {
|
|
@@ -3580,6 +4016,10 @@ interface DelegateOutcome {
|
|
|
3580
4016
|
/**
|
|
3581
4017
|
* 子 Agent 被禁止的工具 [Hermes]。
|
|
3582
4018
|
*
|
|
4019
|
+
* ⚠️ `send_message` **不在**这个名单里(2026-10-30 起,阶段 1 的父子单通道)。
|
|
4020
|
+
* 它曾经在(继承自 Hermes 的名单),但那时候全仓也没有这个工具的实现 ——
|
|
4021
|
+
* 那是一个**预防性的封禁**,不是做过又删掉的东西。放行的判据写在下面那一条。
|
|
4022
|
+
*
|
|
3583
4023
|
* plan 模式那两个(方案 35)在这里不是「子任务用不上」,是**会串台**:
|
|
3584
4024
|
* 子 agent 和父 agent 共用同一个 `PermissionManager`(见 build.ts 的 runner),
|
|
3585
4025
|
* 子 agent 调一次 `enter_plan_mode` 就把**父会话**的权限级别压成了只读,
|
|
@@ -3597,6 +4037,14 @@ interface DelegateConfig {
|
|
|
3597
4037
|
* 构造函数里那个 `900_000` 只给不经过配置的调用方(用例、嵌入宿主)。
|
|
3598
4038
|
*/
|
|
3599
4039
|
task_timeout: number;
|
|
4040
|
+
/**
|
|
4041
|
+
* 成员表(阶段 1)。给了才登记成员、才能被 `send_message` 寻址到。
|
|
4042
|
+
*
|
|
4043
|
+
* 不给 = 行为和改造前逐字节相同(用例、嵌入宿主不必为了跑一次子任务去建表)。
|
|
4044
|
+
* 它和上面两个数是不同类别的东西(一个是实例、两个是数量),但都从同一个
|
|
4045
|
+
* `createDelegateTool` 的配置面进来 —— 拆成两个参数得多改一打调用方。
|
|
4046
|
+
*/
|
|
4047
|
+
team?: TeamRegistry;
|
|
3600
4048
|
}
|
|
3601
4049
|
declare class DelegateManager {
|
|
3602
4050
|
private config;
|
|
@@ -3691,18 +4139,49 @@ interface SubAgentRunner {
|
|
|
3691
4139
|
* **同步那一档目前不给**:父回合正卡在这个工具调用上,没有地方显示它。
|
|
3692
4140
|
* 后台那一档接了 —— 那里的 `task_output` 在此之前只能看到「还没跑完」。
|
|
3693
4141
|
*/
|
|
3694
|
-
onProgress?: (line: string) => void
|
|
4142
|
+
onProgress?: (line: string) => void,
|
|
4143
|
+
/**
|
|
4144
|
+
* 这一次是不是**接着一个已有的子会话**跑(阶段 2 的 `followup_task`)。
|
|
4145
|
+
*
|
|
4146
|
+
* ⚠️ 收一个对象而不是第 8 个位置参数:这个接口已经有七格了,再加一格
|
|
4147
|
+
* 位置参数之后,每处调用都变成一串「第四个是 role、第六个是 signal」的
|
|
4148
|
+
* 排列谜题。而对象只增不减,下一个开关加进去也不用改签名。
|
|
4149
|
+
*
|
|
4150
|
+
* 实现方看到 `resume` 为真时应该把 `sessionId` 那段**已有历史**装进去
|
|
4151
|
+
* (`session-store.loadHistory()`)—— 不装的话第二次跑就是一段全新的对话,
|
|
4152
|
+
* 而「再跑一轮」的全部意义就是它还记得上一次。
|
|
4153
|
+
*/
|
|
4154
|
+
runOptions?: SubAgentRunOptions): Promise<{
|
|
3695
4155
|
text: string;
|
|
3696
4156
|
error?: string;
|
|
3697
4157
|
}>;
|
|
3698
4158
|
}
|
|
4159
|
+
/** {@link SubAgentRunner} 第 8 个参数 */
|
|
4160
|
+
interface SubAgentRunOptions {
|
|
4161
|
+
/**
|
|
4162
|
+
* 接着这个子会话的**已有历史**跑。
|
|
4163
|
+
*
|
|
4164
|
+
* 缺省(`undefined` / `false`)= 这是一次全新的派活,`sessionId` 那一格
|
|
4165
|
+
* 是个刚生成的 id,库里没有它那一行。
|
|
4166
|
+
*/
|
|
4167
|
+
resume?: boolean;
|
|
4168
|
+
}
|
|
3699
4169
|
/**
|
|
3700
4170
|
* @param roles 可派的角色表(方案 18)。**函数而不是数组** —— 角色表理论上
|
|
3701
4171
|
* 可以在运行期变,而工具描述是每次 `list()` 时读的,给数组就把它钉死在
|
|
3702
4172
|
* 装配那一刻。这跟 `toolProvider` 是同一条规矩(方案 15)。
|
|
3703
4173
|
* 不给 = 没有角色系统,`role` 入参一律报错,其余行为与改造前一致。
|
|
3704
4174
|
*/
|
|
3705
|
-
declare function createDelegateTool(runner: SubAgentRunner, config?: Partial<DelegateConfig>, roles?: () => readonly AgentRole[]
|
|
4175
|
+
declare function createDelegateTool(runner: SubAgentRunner, config?: Partial<DelegateConfig>, roles?: () => readonly AgentRole[],
|
|
4176
|
+
/**
|
|
4177
|
+
* 拿到这里面的那个 manager(阶段 2 的 `spawn_teammate` 要复用同一个)。
|
|
4178
|
+
*
|
|
4179
|
+
* 为什么要它:`spawn_teammate` 和 `delegate_task` 走的是**同一套派活逻辑**
|
|
4180
|
+
* (并发、超时、成员登记、收尾),差只差在参数。各建一个 manager 也能跑,
|
|
4181
|
+
* 但那样两边会给同一个 team 建两份互不相干的调度状态 —— 而那正是将来
|
|
4182
|
+
* 「为什么超时时间不一样」这类问题的温床
|
|
4183
|
+
*/
|
|
4184
|
+
onManager?: (manager: DelegateManager) => void): EpochTool;
|
|
3706
4185
|
|
|
3707
4186
|
/**
|
|
3708
4187
|
* goal 的类型([方案 52](../../../../docs/verify/VERIFY_RECORD-52-goal.md))——
|
|
@@ -5614,6 +6093,219 @@ interface ScheduleDraftDeps {
|
|
|
5614
6093
|
}
|
|
5615
6094
|
declare function createScheduleDraftTool(deps: ScheduleDraftDeps): EpochTool;
|
|
5616
6095
|
|
|
6096
|
+
/**
|
|
6097
|
+
* `send_message` —— agent 之间发一条消息(阶段 1:父子单通道)。
|
|
6098
|
+
*
|
|
6099
|
+
* ## 它和 `delegate_task` 不是一回事
|
|
6100
|
+
*
|
|
6101
|
+
* - `delegate_task` 是**派活**:开一个新成员、给它一段 goal、等它交结论
|
|
6102
|
+
* - 这个工具是**对已经在跑的人说一句**:不新开成员、不等结论、不改变谁在干活
|
|
6103
|
+
*
|
|
6104
|
+
* 所以它不能替代 `delegate_task`,也不该被用来「再派一个」。模型手上两个都有时
|
|
6105
|
+
* 最容易犯的错是拿它当派活用 —— 描述里那段「什么时候用它」就是为这个写的。
|
|
6106
|
+
*
|
|
6107
|
+
* ## 投递语义(两个方向不对称,这是刻意的)
|
|
6108
|
+
*
|
|
6109
|
+
* - **发给一个 running 成员**:进它的收件箱,引擎在**下一个步骤边界**取走
|
|
6110
|
+
* (`loop.ts:723` 的 `steer.take()`)。它当轮就会看到,不用等这一轮跑完
|
|
6111
|
+
* - **发给 `lead`**:进主会话的收件箱,下一轮 `TaskNoticeTracker` 在请求前
|
|
6112
|
+
* 拼成一条 note(`loop.ts:1367`)。**父会话没在跑时它待在那儿不动**
|
|
6113
|
+
* - **发给已经收工的成员**:直接失败。收进一个永远不会有下一轮读它的箱子
|
|
6114
|
+
* 等于给调用方一个假成功 —— 父 agent 会照着它继续等回音
|
|
6115
|
+
*
|
|
6116
|
+
* 第三条是 codex `api.rs:35-36` 那条规矩的本地版:通知**不唤醒**已终结的 agent。
|
|
6117
|
+
* 阶段 2 有了 `followup_task`,唤醒才会变成一条显式的路。
|
|
6118
|
+
*/
|
|
6119
|
+
|
|
6120
|
+
/** 工具名。`BLOCKED_TOOLS` 那边按这个名字放行,别各写各的 */
|
|
6121
|
+
declare const SEND_MESSAGE_TOOL = "send_message";
|
|
6122
|
+
declare function createSendMessageTool(team: TeamRegistry): EpochTool;
|
|
6123
|
+
|
|
6124
|
+
/**
|
|
6125
|
+
* 讨论板(阶段 3)—— **跨进程**共享的一块板。
|
|
6126
|
+
*
|
|
6127
|
+
* ## 为什么它和 roster / 任务板不是一类东西
|
|
6128
|
+
*
|
|
6129
|
+
* `registry.ts` 和 `tasks.ts` 都是内存里的:那两样的读者是**同一个进程里的
|
|
6130
|
+
* 那几个成员**,别的进程既不该看见也不该写。而板子存在的**全部理由**就是
|
|
6131
|
+
* 「我开着两个 epoch 窗口,它们看到的是同一块板」。
|
|
6132
|
+
*
|
|
6133
|
+
* 所以它走 SQLite,并且挂在 `~/.epoch/sessions.db` 这个**本来就多进程共享**的
|
|
6134
|
+
* 文件上(判据:`session/db.ts:1193`、`fts-health.ts:297` 都写着「两个进程打开
|
|
6135
|
+
* 同一个 sessions.db」),用 `migrate()` 的 namespace 隔离,不另开一个文件。
|
|
6136
|
+
* 另开文件的话 `openDatabase` 的 refCount 要自己再管一份,而那边已经有一套了。
|
|
6137
|
+
*
|
|
6138
|
+
* ## 通知是**拉取式**的,不唤醒任何人
|
|
6139
|
+
*
|
|
6140
|
+
* 照 codex `api.rs:35-36` 那条规矩:通知不唤醒已终结的 agent。这里更彻底 ——
|
|
6141
|
+
* 板子自己**不投递任何东西**,它只记「每个订阅者看到哪一条了」(`last_seen_seq`)。
|
|
6142
|
+
* 谁想知道有没有新帖,谁自己来 `pendingFor()` 拉。
|
|
6143
|
+
*
|
|
6144
|
+
* 这样做的代价是「发帖的人不知道对方看没看」,而收益是不用维护投递队列、
|
|
6145
|
+
* 也不会有「消息发往一个早就退出的进程」那种没法处理的中间态。
|
|
6146
|
+
*
|
|
6147
|
+
* ## `append` 和 `post` 的差别
|
|
6148
|
+
*
|
|
6149
|
+
* - `post`:发帖,**会自动订阅作者并通知订阅者**
|
|
6150
|
+
* - `append`:静默写入,不订阅、不通知(贴证据、记流水用它)
|
|
6151
|
+
*
|
|
6152
|
+
* 这是 codex 的同一条分法(`PostBehavior::Discussion` / `SilentAppend`)。
|
|
6153
|
+
*/
|
|
6154
|
+
|
|
6155
|
+
/** 单条帖子的字符上限。超了截断并明说 —— 不静默丢 */
|
|
6156
|
+
declare const MAX_POST_CHARS = 20000;
|
|
6157
|
+
/** 订阅目标:`channel:<名字>` 或 `thread:<id>` */
|
|
6158
|
+
type BoardTarget = {
|
|
6159
|
+
kind: 'channel';
|
|
6160
|
+
name: string;
|
|
6161
|
+
} | {
|
|
6162
|
+
kind: 'thread';
|
|
6163
|
+
id: string;
|
|
6164
|
+
};
|
|
6165
|
+
/** 一条「你有新帖」的摘要。**不带正文** —— 要看得自己去 read_thread */
|
|
6166
|
+
interface BoardPending {
|
|
6167
|
+
target: string;
|
|
6168
|
+
count: number;
|
|
6169
|
+
}
|
|
6170
|
+
declare class BoardStore {
|
|
6171
|
+
private readonly path;
|
|
6172
|
+
private readonly db;
|
|
6173
|
+
constructor(homeDir: string);
|
|
6174
|
+
/** 归还连接(引用计数 -1)。宿主 dispose 时调 */
|
|
6175
|
+
close(): void;
|
|
6176
|
+
createChannel(args: {
|
|
6177
|
+
name: string;
|
|
6178
|
+
description?: string;
|
|
6179
|
+
by: string;
|
|
6180
|
+
}): BoardChannel;
|
|
6181
|
+
/** 只改描述,**不碰帖子和订阅**。不存在的频道会被建出来(判据同 codex 的 upsert) */
|
|
6182
|
+
upsertChannel(args: {
|
|
6183
|
+
name: string;
|
|
6184
|
+
description: string;
|
|
6185
|
+
by: string;
|
|
6186
|
+
}): BoardChannel;
|
|
6187
|
+
channel(name: string): BoardChannel | undefined;
|
|
6188
|
+
listChannels(): BoardChannel[];
|
|
6189
|
+
listThreads(channel: string, limit?: number): BoardThread[];
|
|
6190
|
+
/**
|
|
6191
|
+
* 发帖。
|
|
6192
|
+
*
|
|
6193
|
+
* - 目标是**频道**:开一个新线程,这条是 root post,标题取正文第一行
|
|
6194
|
+
* - 目标是**线程**:回复进去
|
|
6195
|
+
*
|
|
6196
|
+
* 无论哪种,作者都会被**自动订阅**(判据同 codex:`Posting subscribes its author`),
|
|
6197
|
+
* 且不会收到自己这条的通知(`last_seen_seq` 直接推到它自己这条)。
|
|
6198
|
+
*/
|
|
6199
|
+
post(args: {
|
|
6200
|
+
target: BoardTarget;
|
|
6201
|
+
author: string;
|
|
6202
|
+
text: string;
|
|
6203
|
+
}): {
|
|
6204
|
+
post: BoardPost;
|
|
6205
|
+
threadId: string;
|
|
6206
|
+
};
|
|
6207
|
+
/** 静默追加:不订阅、不通知 */
|
|
6208
|
+
append(args: {
|
|
6209
|
+
target: BoardTarget;
|
|
6210
|
+
author: string;
|
|
6211
|
+
text: string;
|
|
6212
|
+
}): {
|
|
6213
|
+
post: BoardPost;
|
|
6214
|
+
threadId: string;
|
|
6215
|
+
};
|
|
6216
|
+
private write;
|
|
6217
|
+
readThread(threadId: string, limit?: number): BoardPost[];
|
|
6218
|
+
readPost(id: string): BoardPost | undefined;
|
|
6219
|
+
searchPosts(query: string, channel?: string, limit?: number): BoardPost[];
|
|
6220
|
+
/**
|
|
6221
|
+
* 订阅。`seenSeq` 给了就把游标推到那儿(作者发帖时用)。
|
|
6222
|
+
*
|
|
6223
|
+
* 重复订阅是**幂等**的:只更新游标(如果新游标更小就不动 —— 别让一次
|
|
6224
|
+
* 重订阅把读者没看的帖子吞掉)。
|
|
6225
|
+
*/
|
|
6226
|
+
subscribe(agent: string, target: BoardTarget, seenSeq?: number): void;
|
|
6227
|
+
/** 全板最大的 seq(空板是 0) */
|
|
6228
|
+
private maxSeq;
|
|
6229
|
+
unsubscribe(agent: string, target: BoardTarget): boolean;
|
|
6230
|
+
/**
|
|
6231
|
+
* 这个 agent 订阅的格子里,**自它上次看之后**新增了多少条。
|
|
6232
|
+
*
|
|
6233
|
+
* 只给条数,不给正文 —— 要读自己去 `read_thread`。判据同 `waitForChange`:
|
|
6234
|
+
* 一个会过期的摘要比没有更坏。
|
|
6235
|
+
*/
|
|
6236
|
+
pendingFor(agent: string): BoardPending[];
|
|
6237
|
+
/** 把游标推到「现在」(读过之后调)。不带 target = 全部 */
|
|
6238
|
+
markRead(agent: string, target?: BoardTarget): void;
|
|
6239
|
+
private countSince;
|
|
6240
|
+
}
|
|
6241
|
+
|
|
6242
|
+
/**
|
|
6243
|
+
* 讨论板的 11 个工具(阶段 3)。
|
|
6244
|
+
*
|
|
6245
|
+
* ## 寻址:`target` 一个参数两种形态
|
|
6246
|
+
*
|
|
6247
|
+
* - `th-xxxxxxxx` → 一个线程(回复进去)
|
|
6248
|
+
* - 其他 → 频道名(**开一个新线程**,这条是 root post)
|
|
6249
|
+
*
|
|
6250
|
+
* 不做 `channel:name` 那种前缀:列表里 `th-` 开头的 id 和频道名永远不会撞,
|
|
6251
|
+
* 而少一层语法就是少一处模型会写错的地方。
|
|
6252
|
+
*
|
|
6253
|
+
* ## `post` 和 `append` 的区别要写进描述
|
|
6254
|
+
*
|
|
6255
|
+
* 前者会**订阅作者并通知订阅者**,后者静默。模型拿 `append` 去「在讨论里说一句」
|
|
6256
|
+
* 的话,别人永远不知道有新内容 —— 那是最容易发生的一种误用,所以两边的描述
|
|
6257
|
+
* 都把这一点写在第一句。
|
|
6258
|
+
*
|
|
6259
|
+
* ## 板子是**跨进程**的,所以这里没有任何「当前进程内」的假设
|
|
6260
|
+
*
|
|
6261
|
+
* 别人的窗口发的帖,你这边 `read_thread` 读得到;反过来也一样。这也是这几个
|
|
6262
|
+
* 工具和 `send_message` / `team_task_*` 的根本差别 —— 那两组只在进程内。
|
|
6263
|
+
*/
|
|
6264
|
+
|
|
6265
|
+
/**
|
|
6266
|
+
* @param store 板子。`undefined` = 这个进程没开起来(比如 homeDir 不可写),
|
|
6267
|
+
* 那时**一个工具都不注册** —— 装了但每次调用都报错,模型会以为那是它用错了
|
|
6268
|
+
*/
|
|
6269
|
+
declare function createBoardTools(store: BoardStore, deps: {
|
|
6270
|
+
agentOf: (sessionId: string) => string | undefined;
|
|
6271
|
+
}): EpochTool[];
|
|
6272
|
+
/** 工具名清单(门禁和 `docs/TOOLS.md` 按它们对名字) */
|
|
6273
|
+
declare const BOARD_TOOL_NAMES: readonly string[];
|
|
6274
|
+
|
|
6275
|
+
/**
|
|
6276
|
+
* 阶段 2 的团队工具:派具名成员、看名册、等变化、打断,以及共享任务板。
|
|
6277
|
+
*
|
|
6278
|
+
* ## 八个工具为什么在一个文件里
|
|
6279
|
+
*
|
|
6280
|
+
* 它们共享**同一份状态**(`TeamRegistry`,任务板挂在它下面),而且语义上是一套:
|
|
6281
|
+
* 名册 + 消息 + 任务。拆成三个文件的话,`wait_agent` 那种「等任意一种变化」
|
|
6282
|
+
* 的工具会横跨两边,反而要 import 两处。
|
|
6283
|
+
*
|
|
6284
|
+
* ## 曝光:只 `list_agents` 是 Direct
|
|
6285
|
+
*
|
|
6286
|
+
* 计划里定的:20 个新工具默认 `Deferred`(走 `tool_search` 按需发现),
|
|
6287
|
+
* 只留最常用的直接出现。`list_agents` 是每次想跟谁说话之前都要看一眼的那个,
|
|
6288
|
+
* 放 Deferred 会让模型先 `tool_search` 一次再 `list_agents` —— 两步换一步。
|
|
6289
|
+
*
|
|
6290
|
+
* ## `spawn_teammate` 和 `delegate_task` 的区别(描述里必须说清)
|
|
6291
|
+
*
|
|
6292
|
+
* - `delegate_task`:一次性,派完等结论,跑完即止
|
|
6293
|
+
* - `spawn_teammate`:具名、后台、**跑着的时候能收到消息**
|
|
6294
|
+
*
|
|
6295
|
+
* 合并它们会让模型两头都判断错:拿 `delegate_task` 去派一个「需要中途纠正」的活,
|
|
6296
|
+
* 那个成员根本收不到消息(它一开始就没名字)。
|
|
6297
|
+
*/
|
|
6298
|
+
|
|
6299
|
+
/**
|
|
6300
|
+
* 全部阶段 2 工具。
|
|
6301
|
+
*
|
|
6302
|
+
* 顺序不影响行为(注册表按名字去重),但 `list_agents` 排前面:
|
|
6303
|
+
* 它是 `ToolExposure.Direct` 的那一个,而其余是 Deferred。
|
|
6304
|
+
*/
|
|
6305
|
+
declare function createTeamTools(team: TeamRegistry, manager: DelegateManager): EpochTool[];
|
|
6306
|
+
/** 工具名清单。`BLOCKED_TOOLS` 和门禁按它们对名字,别各写各的 */
|
|
6307
|
+
declare const TEAM_TOOL_NAMES: readonly string[];
|
|
6308
|
+
|
|
5617
6309
|
/**
|
|
5618
6310
|
* 「哪些历史会话,这一段会话能读」—— **全仓唯一一份判定**(方案 48 §四)。
|
|
5619
6311
|
*
|
|
@@ -16151,6 +16843,13 @@ interface Message {
|
|
|
16151
16843
|
tokenCount?: number;
|
|
16152
16844
|
finishReason?: string;
|
|
16153
16845
|
reasoning?: string;
|
|
16846
|
+
/**
|
|
16847
|
+
* 这一步里工具改过的文件(补丁预览,v7)。和 `reasoning` 同一个位置:
|
|
16848
|
+
* 一条 assistant 行 = 一步,那一步可能改了多个文件。
|
|
16849
|
+
*
|
|
16850
|
+
* 老库里这一列是 NULL(迁移刚加的),读侧见到 `undefined` 就当没有补丁卡。
|
|
16851
|
+
*/
|
|
16852
|
+
diffs?: EpochDiffSnapshot[];
|
|
16154
16853
|
active: boolean;
|
|
16155
16854
|
compacted: boolean;
|
|
16156
16855
|
observed: boolean;
|
|
@@ -16251,6 +16950,8 @@ interface AppendMessageInput {
|
|
|
16251
16950
|
tokenCount?: number;
|
|
16252
16951
|
finishReason?: string;
|
|
16253
16952
|
reasoning?: string;
|
|
16953
|
+
/** 这一步里工具改过的文件(补丁预览,v7)。**只该传给 assistant 行** */
|
|
16954
|
+
diffs?: EpochDiffSnapshot[];
|
|
16254
16955
|
}
|
|
16255
16956
|
interface ListSessionsInput {
|
|
16256
16957
|
/**
|
|
@@ -22653,4 +23354,4 @@ declare function resolveCodeModeWorker(baseDir: string, exists?: typeof existsSy
|
|
|
22653
23354
|
*/
|
|
22654
23355
|
declare function codeModeWorkerPath(): string | undefined;
|
|
22655
23356
|
|
|
22656
|
-
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, type AcquireResult, type ActivePlugin, type AgentConfig, AgentLoop, type AgentProvider, type AgentSite, type AgentSiteRef, AppearanceStore, type AppendMessageInput, ApprovalCache, type ApprovalDecision, type ArtifactOpenRefusal, type ArtifactRetention, type AskQuestionDeps, type AttachmentRetention, BLOCKED_TOOLS, type BackendOptions, type BackendOutcome, type BackgroundTaskSource, type BaseOrigin, type BaseSlot, type BeginTurnInput, type BreakdownInput, BudgetGuard, type BudgetGuardOptions, type BudgetInfo, type BudgetLevel, type BudgetOptions, type BudgetStatus, BudgetStore, type BudgetStoreOptions, type BuildFireArgvInput, type BuildIndexOptions, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, type CachedApproval, type CachedDecision, type CheckpointCapture, type CheckpointFile, CheckpointManager, type CheckpointManagerOptions, type CheckpointManifest, CheckpointStore, type CheckpointStoreOptions, type CheckpointSummary, type ClaudeHooksParseOptions, type CodeModeLimits, type CodeRequest, type CodeResult, CodeSandbox, type CommandHookConfig, type CommandHookResult, type CommandLoadOutcome, type CommandLoadSummary, type CommandResult, type CommandRunner, type CompactionResult, type CompiledRules, type ComplianceDirSpec, type ComplianceDirsSummary, ComplianceEngine, type ComplianceEngineInput, type ComplianceGate, type ComplianceHit, type ComplianceRule, type ComplianceRuleSource, type ComplianceSettings, type ComplianceVerdict, type CompressConfig, type CompressResult, type 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_MAX_HOLD_CHARS, DELEGATE_SESSION_SOURCE, type DelegateArgs, type DelegateConfig, DelegateManager, type DelegateTaskResult, type DiagnoseOptions, type DiscoverOutcome, type DiscoveredFile, type DoctorReport, type DraftParse, EMPTY_RULES, EPOCH_DISK_LEDGER, type EntryProbeCode, type EntryProbeResult, EpochConfigSchema, type ExpandOptions, type ExtractOutcome, FTS_TABLES, FTS_TRIGGERS, type FallbackEvent, type FileSlots, type FileSourceKind, type ForkInput, type FrontmatterParse, type FrontmatterSplit, type FtsHealth, type FtsReclaim, type FtsSpace, type FtsTableHealth, GOAL_BLOCK_CODES, type GateAxis, type GateVerdict, type GenerateInput, type GenerateOutput, type Goal, type GoalBlockReason, type GoalClear, type GoalPhase, type GoalPromptView, type GoalRefusal, type GoalRoundResult, GoalService, GoalStore, type GoalToolDeps, type GoalWrite, HEADLESS_AUDIT_CODES, type HeadlessPolicy, type HookConfigEntry, HookManager, type HookManagerOptions, type HookMatcher, type HookSourceKind, type HookSourceStatus, type HookSourcesOptions, type HookSourcesSummary, type HooksParseOutcome, type MemoryManager$1 as IMemoryManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, type SessionManager$1 as ISessionManager, type SkillSystem$1 as ISkillSystem, ImageLoadError, type ImageSize, type ImportDecision, type ImportGate, type ImportGoal, type ImportMessage, type ImportNode, type ImportPartsResult, type ImportSessionInput, type ImportSessionMeta, type ImportSessionResult, type ImportSkipReason, type ImportTodo, ImportTrustStore, type InstallDependency, type InstallOptions, type InstallOutcome, type InstallPreview, type InstallStep, type InstructionScan, type InstructionSource, type IsolationReason, type IsolationReport, type JsonSchemaDocument, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, type LastOpenSession, LastOpenSessions, type LayerOutcome, type LayerScalars, type LayerStatus, type LearningContext, type LearningResult, type LearningSkipReason, type LexiconLoadOutcome, type LifecycleOutcome, type ListCandidatesInput, type ListSessionsInput, type ListSessionsOutput, type LoadCommandsOptions, type LoadConfigOptions, type LoadKeybindingsOptions, type LoadKeybindingsResult, type LoadRolesOptions, type LoadedPlugin, type LockHolder, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_ENTRIES_FILE, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, type ManagedPolicy, ManagedPolicyError, type ManagedSettings, ManagedSettingsSchema, type MarketplaceCatalog, type MarketplaceCategory, type MarketplaceDisplay, type MarketplaceDisplayField, type MarketplaceEntry, type MarketplaceOutcome, type MarketplaceRecord, type MarketplaceStatus, type MemoryConfig, type MemoryEntry, type MemoryImportRecord, type MemoryImportResult, MemoryManager, type MemoryManagerOptions, type MemoryNotice, type MemoryRemoval, type MemorySearchResult, type MemoryTarget, type MemoryWriteResult, type MentionPart, type MentionResolution, type Message, type MessageHit, type MessageRecord, type MessageSurface, type ModelCapability, ModelFailureTracker, type ModelMetaEntry, type ModelPricing, type MultimodalPolicy, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, type NonInteractiveProbe, type OsTaskSnapshot, type OutputGuard, PACK_EXCLUDES, 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, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, type ScalarKey, type ScanInstructionsOptions, type ScheduleArgvRefusal, type ScheduleArgvResult, type ScheduleArgvWarning, type ScheduleBackend, type ScheduleCliEntry, type ScheduleDraftDeps, type ScheduleDrift, type ScheduleDriftKind, type ScheduleImportInput, type ScheduleInstallForm, type ScheduleIssue, type ScheduleIssueCode, type ScheduleLock, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, type ScheduleValidation, type SchemaExport, type SearchHit, type SearchInput, type SearchMessagesInput, type SearchMessagesOutput, type SearchOutput, type SearchSessionsInput, type SelectionDeps, type SelfConnector, type SelfIndexInput, type SelfSettings, type Session, type SessionCandidate, type SessionHit, SessionManager, type SessionMentionDeps, type SessionMeta, SessionQueries, SessionReferences, type SessionSearchDeps, type SessionStats, type SessionSurface, type SessionTrace, type SessionVisibility, type SessionVisibilityInput, type SettingApply, type SettingApplyFacts, type SettingChain, type SettingFutile, type SettingLayer, type SettingStep, type SettingValue, type SettingValueKind, type SettingWriteFailure, type SettingWriteKey, type SettingWriteLayer, type SettingWriteOutcome, type SettingWriteRequest, type SettingWriteTarget, type SettingWriteTargetsOptions, type SettingsFile, SettingsFileError, SettingsFileSchema, type SettingsLayer, type SettingsResolution, type ShadowFinding, type ShadowKind, type Skill, type SkillDirSource, type SkillDirSpec, type SkillDirsSummary, type SkillImportConflict, type SkillImportDone, type SkillImportEntry, type SkillImportFailure, type SkillImportForm, type SkillImportOptions, type SkillImportPreview, type SkillImportResult, type SkillIndexEntry, type SkillIndexOptions, type SkillIndexResidency, type SkillIndexStats, SkillLearner, type SkillLearningProvider, type SkillMeta, type SkillStats, SkillSystem, type SkillSystemOptions, type SkillViewDeps, type SkillWriteDeps, type SteerSource, type StoredAppearance, type SubAgentRunner, type SubTask, type SubToolCaller, type SummarizeOutput, type SurfaceMessage, type SystemPromptParams, type SystemPromptSegments, TOOL_SEARCH_TOOL, TaskNoticeTracker, type TodoItem, type 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, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createPluginScope, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, discoverySpec, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, hasUsableModel, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidInterval, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listEntryModels, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadModelEntries, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelEntriesPath, modelListCandidates, needsAllowlist, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, normalizeModelEntry, normalizeTrigger, 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 };
|
|
23357
|
+
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, 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 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, 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 };
|