@shgroup/dsh-serenity-hooks 1.26.15 → 1.26.17

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.
Files changed (61) hide show
  1. package/dsh.plugin.json +1 -1
  2. package/experiments/autotrajectory/SKILL.md +14 -8
  3. package/experiments/autotrajectory/scripts/autotrajectory-exp.ts +23 -6
  4. package/lib/acp-core.d.ts +100 -0
  5. package/lib/acp-http.d.ts +29 -0
  6. package/lib/api.d.ts +47 -0
  7. package/lib/autotrajectory.d.ts +193 -0
  8. package/lib/ccc-CfDrlfA7.js +141 -0
  9. package/lib/ccc.d.ts +162 -0
  10. package/lib/client.js +5 -0
  11. package/lib/config-ops.d.ts +166 -0
  12. package/lib/constants.d.ts +8 -0
  13. package/lib/fs-ops.d.ts +36 -0
  14. package/lib/gateway-auth.d.ts +89 -0
  15. package/lib/gateway-proxy.d.ts +39 -0
  16. package/lib/gateway.d.ts +80 -0
  17. package/lib/git-ops.d.ts +28 -0
  18. package/lib/handyman-ops.d.ts +68 -0
  19. package/lib/handyman-preset-inherit.d.ts +34 -0
  20. package/lib/index.d.ts +68 -0
  21. package/lib/index.js +10 -8
  22. package/lib/invariant.d.ts +29 -0
  23. package/lib/json.d.ts +9 -0
  24. package/lib/kit-ops.d.ts +23 -0
  25. package/lib/localstore-ops.d.ts +85 -0
  26. package/lib/msm-ops.d.ts +78 -0
  27. package/lib/output-guard-seam.d.ts +21 -0
  28. package/lib/output-guard.d.ts +68 -0
  29. package/lib/rebuild.d.ts +118 -0
  30. package/lib/seams/bootstrap.d.ts +83 -0
  31. package/lib/seams/compact.d.ts +31 -0
  32. package/lib/seams/context.d.ts +48 -0
  33. package/lib/seams/env.d.ts +16 -0
  34. package/lib/seams/guards.d.ts +72 -0
  35. package/lib/seams/keeper.d.ts +61 -0
  36. package/lib/seams/opencode-skills.d.ts +14 -0
  37. package/lib/seams/system-prompt.d.ts +113 -0
  38. package/lib/session-ops.d.ts +127 -0
  39. package/lib/settings-section.d.ts +113 -0
  40. package/lib/skiff-core.d.ts +78 -0
  41. package/lib/skiff-debug.d.ts +86 -0
  42. package/lib/skiff-registry.d.ts +25 -0
  43. package/lib/skiff-role.d.ts +50 -0
  44. package/lib/skills/opencode-scan.d.ts +27 -0
  45. package/lib/skills-discovery.d.ts +25 -0
  46. package/lib/status.d.ts +38 -0
  47. package/lib/tools/autotrajectory-exp.d.ts +24 -0
  48. package/lib/tools/cc-fs.d.ts +7 -0
  49. package/lib/tools/cce.d.ts +9 -0
  50. package/lib/tools/eap.d.ts +7 -0
  51. package/lib/tools/git.d.ts +4 -0
  52. package/lib/tools/handyman.d.ts +43 -0
  53. package/lib/tools/kit.d.ts +4 -0
  54. package/lib/tools/localstore.d.ts +8 -0
  55. package/lib/tools/msm.d.ts +4 -0
  56. package/lib/tools/neat.d.ts +5 -0
  57. package/lib/tools/rebuild.d.ts +19 -0
  58. package/lib/tools/session.d.ts +78 -0
  59. package/lib/tools/skiff-admin.d.ts +25 -0
  60. package/lib/totp.d.ts +40 -0
  61. package/package.json +6 -4
@@ -0,0 +1,127 @@
1
+ /**
2
+ * session-ops.ts — session 工具纯操作层(零 DSH 依赖,可独立单测)
3
+ *
4
+ * 行为对齐 osp(opencode-serenity-plugin/src/session/lib.ts)——osp 是 ACC 工具 spec:
5
+ * - create:--desc / --issue 二选一(互斥、缺省报错);issue 模式目录 YYYY-MM-DD--<issue>
6
+ * (无 S###,sessionId=issue);desc 模式 YYYY-MM-DD--S###--<desc>;goal 写入目标段;dry-run 预览
7
+ * - close:需 name + confirm=true;标记 [x] 已完成+已关闭 + 进度记录"关闭"
8
+ * - archive:name 缺省 → 批量归档(completed + ≥7 天 → 移动 _archived/);单会话需 completed + grace
9
+ * - list/show/health/qa/summary:文本输出格式与 osp 一致
10
+ * 保留 dsp S134 活跃会话机制(内存 Map + events 恢复,不落盘)——osp 同为内存 active-state。
11
+ */
12
+ import type { JsonValue } from './json.js';
13
+ export type SessionAction = 'list' | 'show' | 'create' | 'use' | 'close' | 'health' | 'qa' | 'archive' | 'summary' | 'hook-develop-guide';
14
+ export declare const SESSION_ACTIONS: readonly SessionAction[];
15
+ export declare function sessionsRoot(root: string): string;
16
+ interface SessionStatus {
17
+ hasSessionMd: boolean;
18
+ completed: boolean;
19
+ completedCount: number;
20
+ pendingCount: number;
21
+ unresolvedCount: number;
22
+ }
23
+ export interface SessionEntry {
24
+ dirName: string;
25
+ path: string;
26
+ mtime: Date;
27
+ status: SessionStatus;
28
+ }
29
+ /**
30
+ * 根据 key 查找会话(对齐 osp findSession):
31
+ * 精确目录名 → S### ID(允许 S31→031)→ 唯一模糊子串匹配(多个则报错)
32
+ */
33
+ export declare function findSession(sessionsDir: string, key: string): SessionEntry | null;
34
+ /** list 子命令(对齐 osp listSessions 文本格式 + active 标记) */
35
+ export declare function listSessions(root: string, activeId?: string): string;
36
+ /** show 子命令(对齐 osp showSession:`# dirName\n\n` + SESSION.md 内容) */
37
+ export declare function showSession(root: string, key: string): string;
38
+ export interface CreateSessionOptions {
39
+ root: string;
40
+ /** --desc 模式的描述(与 issue 互斥) */
41
+ desc?: string;
42
+ /** --issue 模式的工单号(与 desc 互斥) */
43
+ issue?: string;
44
+ goal?: string;
45
+ dryRun: boolean;
46
+ }
47
+ export interface CreateSessionResult {
48
+ message: string;
49
+ dirName: string;
50
+ sessionPath: string;
51
+ sessionId: string;
52
+ }
53
+ /** create 子命令(对齐 osp createSession:--desc/--issue 二选一 + dry-run + 长度限制) */
54
+ /** 目录名脱敏(Windows 审计问题 10):非法字符 → '-', 去尾点/空格, 保留名(CON/NUL 等)加前缀 */
55
+ export declare function sanitizeDirName(s: string): string;
56
+ export declare function createSession(opts: CreateSessionOptions): CreateSessionResult;
57
+ /**
58
+ * 活动会话跟踪(S134 v1.16.14 内存化,对齐 osp active-state):
59
+ * **不落盘**——活跃会话状态在内存 Map(key = scope = dsh 会话 id),避免落盘标记
60
+ * 文件累积与跨会话串台(落盘版 `.dsh/active-sessions/<scope>` 已被此方案取代)。
61
+ * 进程重启恢复:从**当前会话历史(events)**解析 `[SESSION CONTEXT]` 标记(use 时注入),
62
+ * 只扫自己会话——无全局扫描、无跨会话污染。
63
+ */
64
+ export declare const DEFAULT_SESSION_SCOPE = "default";
65
+ /** [SESSION CONTEXT] 恢复标记(use 时注入 events 历史;进程重启后从 events 解析) */
66
+ export declare const SESSION_CONTEXT_MARKER = "[SESSION CONTEXT] Activated:";
67
+ export interface ActiveSessionInfo {
68
+ sessionId: string;
69
+ dirName: string;
70
+ mdPath: string;
71
+ }
72
+ export declare function getActiveSessionInfo(scope: string): ActiveSessionInfo | null;
73
+ export declare function getLastActiveSessionInfo(): ActiveSessionInfo | null;
74
+ export declare function setActiveSessionInfo(scope: string, info: ActiveSessionInfo): void;
75
+ export declare function clearActiveSessionInfo(scope: string): void;
76
+ /** 重置内存活跃会话(测试用;进程重启即天然清空) */
77
+ export declare function resetActiveSessionStore(): void;
78
+ /** 当前 scope 的活跃会话 SESSION.md 绝对路径;无激活返回 null(读内存,不落盘) */
79
+ export declare function readActiveSessionMd(_root: string, scope?: string): string | null;
80
+ /**
81
+ * use 子命令:激活会话(写内存 Map)+ 返回对齐 osp 的输出文本
82
+ * (含 [SESSION CONTEXT] 标记 + todowrite 指令;标记随工具结果进 events 历史,
83
+ * 进程重启后从当前会话 events 解析恢复)。
84
+ */
85
+ export declare function useSession(root: string, key: string, scope?: string): {
86
+ dir: string;
87
+ mdPath: string;
88
+ context: string;
89
+ };
90
+ /**
91
+ * close 子命令(对齐 osp closeSession):需 name + confirm=true;
92
+ * 标记 SESSION.md 为 [x] 已完成 + [x] 已关闭 + 进度记录"关闭";清除该会话的活跃状态。
93
+ */
94
+ export declare function closeSession(root: string, key: string, confirm: boolean, scope?: string): string;
95
+ /**
96
+ * 从会话历史(events)解析会话身份(进程重启恢复;只扫**当前会话**自己的历史——无跨会话串台)。
97
+ *
98
+ * v1.24.11 稳固化(S142 用户需求:重建后新会话必须准确知道从哪个 SESSION 恢复):
99
+ * **路径规范行即可,不再要求 [SESSION CONTEXT] 标记**——`session use` 上下文与重建锚点
100
+ * (buildRebuildAnchor 的 `- Persistent trajectory — SESSION.md path: <rel>` 行)同格式,
101
+ * 因此**仅靠重建锚点的会话(从未显式 use)同样可恢复**。从**尾到头**扫描,最后一条
102
+ * 合法路径胜出(时间序最新);会话目录名/ID 从路径本身派生(单一真相源,不猜)。
103
+ * 路径可为相对(重建锚点存 rel)——绝对化与存在性校验在调用方(知道 root)执行。
104
+ */
105
+ export declare function parseSessionContextFromEvents(events: readonly unknown[]): ActiveSessionInfo | null;
106
+ /** 从文本提取 SESSION.md 路径(use 上下文 / 重建锚点规范行通用;无匹配返回 null)。
107
+ * 同行已知尾注(如系统提示词 Session 块的 persistent-body 注释)剥除——规范行只取路径本体。 */
108
+ export declare function extractSessionMdPathFromText(text: string): string | null;
109
+ /**
110
+ * 约定回退(v1.24.11):AGENT_SESSIONS 下最新修改的**未完成**会话的 SESSION.md。
111
+ * readAllSessions 已按「未完成优先 + mtime 降序」排序 → 首个未完成且含 SESSION.md 即最新活动。
112
+ * 只作最后手段(内存/events/锚点全缺时),保证重建锚点至少指向一个真实存在的轨迹。
113
+ */
114
+ export declare function findLatestActiveSessionMd(root: string): string | null;
115
+ /** health 子命令(对齐 osp healthCheck:stale/stalled/ghost/drift 四类检查,文本输出) */
116
+ export declare function healthCheck(root: string): string;
117
+ /** archive 子命令(对齐 osp archiveSessions:移动 _archived/;name 缺省批量) */
118
+ export declare function archiveSessions(root: string, opts: {
119
+ name?: string;
120
+ dryRun: boolean;
121
+ }): string;
122
+ /** summary 子命令(对齐 osp sessionSummary 文本仪表盘) */
123
+ export declare function summarize(root: string): string;
124
+ /** 事实核对:SESSION.md 声明 vs 实际情况(结构/一致性/新鲜度/决策质量/产出物) */
125
+ export declare function qaCheck(root: string, key: string): string;
126
+ export type SessionInfo = SessionEntry;
127
+ export type { JsonValue };
@@ -0,0 +1,113 @@
1
+ /**
2
+ * settings-section.ts — 简单配置注册(dsh 原生设置面板,v1.21 分层)
3
+ *
4
+ * 分层决策(S142):**简单配置(开关/阈值)→ dsh 原生设置面板**;
5
+ * **复杂配置(账号列表)→ 宁静号高级面板**(localstore + /serenity/config)。
6
+ *
7
+ * 本模块承载简单配置层:`installSettingsSection(ctx, settingsNamespace('serenity-hooks'), schema, entry)`
8
+ * 注册 `serenity-hooks` namespace——三功能总开关 + F2 阈值。
9
+ *
10
+ * 运行时降级守卫(版本鲁棒性):旧 RC(staging 架构)api-proxy 有
11
+ * `WEB_SETTINGS_NAMESPACES` 静态白名单,第三方 ns 会收到 settings-not-exposed
12
+ * ——client 面板读不到。新 RC(官方 master)已删除白名单(全量 describe)。
13
+ * 本模块不依赖白名单状态:register 总是执行(host 侧零成本);
14
+ * **client 侧**(SettingsSection 组件)以 describe 结果为据——ns 不在描述列表
15
+ * 则显示降级提示(引导去宁静号面板),在则渲染 schema 表单。零配置自动适配。
16
+ */
17
+ import type { Context } from 'cordis';
18
+ import z from '@deepseek-ai/schemastery';
19
+ /** 插件 Config 的简单配置片段(index.ts Config 组合;settings entry base) */
20
+ export interface SimpleConfigFragment {
21
+ gateway?: {
22
+ enabled?: boolean;
23
+ };
24
+ rebuild?: {
25
+ enabled?: boolean;
26
+ thresholdRatio?: number;
27
+ };
28
+ naming?: {
29
+ enabled?: boolean;
30
+ };
31
+ /** F4 Skiff(实验性):调试服务启停(人工) */
32
+ skiff?: {
33
+ enabled?: boolean;
34
+ debugPort?: number;
35
+ };
36
+ /** F4c ACP(实验性):HTTP JSON-RPC 端点启停(人工) */
37
+ acp?: {
38
+ enabled?: boolean;
39
+ httpPort?: number;
40
+ };
41
+ /** F4d 建议问答页(实验性):按认知容器暴露问答页供他人验证(全局开关;与 ACP 共用端口) */
42
+ publicAsk?: {
43
+ enabled?: boolean;
44
+ };
45
+ }
46
+ /** 简单配置命名空间(dsh 设置面板的 section id / settings.yaml section) */
47
+ export declare const SERENITY_SETTINGS_NS = "serenity-hooks";
48
+ /**
49
+ * 简单配置 schema(schemastery):三功能总开关 + F2 阈值 + F4 Skiff 启停。
50
+ * 与 DSH settings 的 schema 语义一致(z.object 布尔/数字)。
51
+ */
52
+ export interface SerenitySimpleSettings {
53
+ /** F1 双端口网关总开关 */
54
+ gatewayEnabled: boolean;
55
+ /** F2 超限重建总开关 */
56
+ rebuildEnabled: boolean;
57
+ /** F2 contextPressure 触发比例(0~1) */
58
+ rebuildThreshold: number;
59
+ /** F3 会话命名总开关 */
60
+ namingEnabled: boolean;
61
+ /** F4 Skiff 调试服务总开关(实验性;默认关——不随插件加载自动启动,人工开启) */
62
+ skiffEnabled: boolean;
63
+ /** F4 Skiff 调试端口(默认 3099,仅 127.0.0.1) */
64
+ skiffDebugPort: number;
65
+ /** F4c ACP HTTP JSON-RPC 端点总开关(实验性;默认关——人工开启) */
66
+ acpEnabled: boolean;
67
+ /** F4c ACP HTTP 端口(默认 3100,仅 127.0.0.1) */
68
+ acpHttpPort: number;
69
+ /** F4d 建议问答页总开关(实验性;默认关——按认知容器暴露问答页,key 认证) */
70
+ publicAskEnabled: boolean;
71
+ }
72
+ /** schemastery schema(与 DSH 各插件 Config 同款) */
73
+ export declare const simpleSettingsSchema: z<Schemastery.ObjectS<{
74
+ gatewayEnabled: z<boolean, boolean>;
75
+ rebuildEnabled: z<boolean, boolean>;
76
+ rebuildThreshold: z<number, number>;
77
+ namingEnabled: z<boolean, boolean>;
78
+ skiffEnabled: z<boolean, boolean>;
79
+ skiffDebugPort: z<number, number>;
80
+ acpEnabled: z<boolean, boolean>;
81
+ acpHttpPort: z<number, number>;
82
+ publicAskEnabled: z<boolean, boolean>;
83
+ }>, Schemastery.ObjectT<{
84
+ gatewayEnabled: z<boolean, boolean>;
85
+ rebuildEnabled: z<boolean, boolean>;
86
+ rebuildThreshold: z<number, number>;
87
+ namingEnabled: z<boolean, boolean>;
88
+ skiffEnabled: z<boolean, boolean>;
89
+ skiffDebugPort: z<number, number>;
90
+ acpEnabled: z<boolean, boolean>;
91
+ acpHttpPort: z<number, number>;
92
+ publicAskEnabled: z<boolean, boolean>;
93
+ }>>;
94
+ /** 从插件 Config 提取 entry 默认(settings base 层) */
95
+ export declare function entryDefaults(config: SimpleConfigFragment): SerenitySimpleSettings;
96
+ /** 进程级默认(无 settings 服务时的兜底) */
97
+ export declare function defaultSimpleSettings(): SerenitySimpleSettings;
98
+ /**
99
+ * 读取当前简单配置(settings 解析值;无 provider/未注册 → entry 默认)。
100
+ * 各功能(gateway/rebuild/naming)启动与运行时判断开关都经此函数。
101
+ */
102
+ export declare function readSimpleSettings(): SerenitySimpleSettings;
103
+ /**
104
+ * 测试注入钩子(生产零调用):替换/恢复运行时源,便于单测各功能门控
105
+ * (registerSettingsSection 的 setSource 回调在 mock dsh-settings 时不会触发)。
106
+ */
107
+ export declare function __setSimpleSourceForTest(source: (() => SerenitySimpleSettings) | null): void;
108
+ /**
109
+ * 注册简单配置到 DSH settings(零改 DSH;settings.yaml 持久化 + 原生面板渲染)。
110
+ * 注:插件 Config(cordis.yml 组合层)作为 base;用户文档层叠加其上。
111
+ * 运行时读取简单配置统一经 `readSimpleSettings()`。
112
+ */
113
+ export declare function registerSettingsSection(ctx: Context, config: SimpleConfigFragment): void;
@@ -0,0 +1,78 @@
1
+ /**
2
+ * skiff-core.ts — Skiff 会话核心(F4,v1.25.0 实验性)
3
+ *
4
+ * Skiff agent = 标准 DSH agent(ctx.agents.create,跑 DSH agent-loop):
5
+ * 一次提问(followup)→ 模型自主循环调用工具直到 turn 结束(idle)→
6
+ * 读 session.events 取 committed 答案 + 完整轨迹(与 dsh WebUI 同源数据)。
7
+ *
8
+ * 实验性质:仅当 Skiff 调试服务开启(设置面板人工开关)且 CCC 配置了角色时才创建
9
+ * agent;未启用时本模块零副作用(无监听、无 agent、无会话注册)。
10
+ */
11
+ import type { Context } from 'cordis';
12
+ import type { Agent, AgentHandle } from '@deepseek-ai/dsh-agent';
13
+ import { type SkiffRoleConfig } from './skiff-role.js';
14
+ /** 查 sessionId 的 Skiff 角色名(无 → null) */
15
+ export declare function skiffRoleFor(sessionId: string): string | null;
16
+ /** 查 sessionId 的会话绑定(role + ccc;无 → null)——v1.25.10 追问校验 */
17
+ export declare function skiffSessionInfo(sessionId: string): {
18
+ role: string;
19
+ ccc: string;
20
+ } | null;
21
+ /** 查 sessionId 的活体 agent(进程内会话延续用;未注册/已清理 → undefined) */
22
+ export declare function getSkiffAgent(sessionId: string): Agent | undefined;
23
+ export declare function registerSkiffSession(sessionId: string, role: string, ccc: string, agent: Agent): void;
24
+ export declare function unregisterSkiffSession(sessionId: string): void;
25
+ /** 测试/调试:注册表快照(sessionId → {role} 兼容展示) */
26
+ export declare function skiffSessionSnapshot(): ReadonlyMap<string, {
27
+ role: string;
28
+ ccc: string;
29
+ }>;
30
+ export interface SkiffAgentRef {
31
+ handle: AgentHandle;
32
+ agent: Agent;
33
+ sessionId: string;
34
+ }
35
+ /**
36
+ * 创建 Skiff agent:标准 DSH agent + cwd=CCC root + 角色模型 +
37
+ * standard preset(平台工具面)+ scoped 系统提示词(基础提示词 + CCC 定义段,全替换 ACC 默认注入)。
38
+ */
39
+ export declare function createSkiffAgent(ctx: Context, root: string, roleName: string, role: SkiffRoleConfig, defaultModel?: string): Promise<SkiffAgentRef>;
40
+ export interface SkiffTrajectoryEntry {
41
+ role: 'user' | 'assistant' | 'tool';
42
+ text: string;
43
+ /** assistant 的工具调用名(有则填) */
44
+ tool?: string;
45
+ }
46
+ export interface SkiffAskResult {
47
+ answer: string;
48
+ sessionId: string;
49
+ trajectory: SkiffTrajectoryEntry[];
50
+ }
51
+ /**
52
+ * 提问一轮:followup → 等 idle → 读答案 + 轨迹。
53
+ * @param eventsStart 轨迹起点:显式传 0 = 全量轨迹(会话追问时页面重绘完整时间线,
54
+ * v1.25.10 用户拍板);不传(undefined)= 本轮增量(followup 前 events 之后)
55
+ * @param options.includeTrajectory 是否计算轨迹(v1.26.10:**3100 对外只提供问答**——
56
+ * 公开问答页 / ACP JSON-RPC 不返回 trajectory,传 false 跳过计算;3099 调试页默认 true 保留)
57
+ */
58
+ export declare function askSkiff(ctx: Context, agent: Agent, question: string, eventsStart?: number, options?: {
59
+ includeTrajectory?: boolean;
60
+ }): Promise<SkiffAskResult>;
61
+ /**
62
+ * Skiff 会话的轨迹纪律参与判定:非 skiff 会话恒 true(正常参与);
63
+ * skiff 会话按角色 trajectory 子集(session/keeper/rebuild)决定;
64
+ * 注册表缺失(进程重启遗留等)→ 保守旁路(false,完全独立)。
65
+ */
66
+ export declare function skiffTrajectoryEnabled(root: string, sessionId: string | undefined, key: 'session' | 'keeper' | 'rebuild'): boolean;
67
+ export interface SkiffMsmGate {
68
+ /** 拒绝原因(有则拒绝执行) */
69
+ reject?: string;
70
+ /** list 显示白名单(msms);仅 action==='list' 时有值 */
71
+ whitelist?: Set<string>;
72
+ }
73
+ /**
74
+ * acc_msm 的 Skiff 门控:非 skiff 会话恒放行;skiff 会话——
75
+ * exec 非白名单 MSM 拒绝(不列名单)、register/deregister 必拒、
76
+ * list 白名单过滤、check/guide/ccc-config 只读放行。
77
+ */
78
+ export declare function skiffMsmGate(root: string, sessionId: string | undefined, action: string, name?: string): SkiffMsmGate;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * skiff-debug.ts — Skiff 调试问答页(F4a',v1.25.x 实验性)
3
+ *
4
+ * node:http 调试端口(默认关,仅监听 127.0.0.1;启停 = 人工——设置面板「Serenity」
5
+ * 页 Skiff 区块开关,不随插件加载自动启动)。
6
+ *
7
+ * - GET / → 问答 HTML 页(**CCC 选择器** + 角色下拉 + 输入框 + 答案区 + 轨迹区 + WebUI 链接)
8
+ * - POST /ask → {ccc?, role, question} → 走会话核心(skiff-core)→ {answer, sessionId, trajectory}
9
+ *
10
+ * **多 CCC 手工切换(v1.25.4,S142 用户)**:dsh 管理多个 CCC 时,调试页顶部 CCC
11
+ * 下拉列出全部候选(live 会话 cwd 上溯 .serenity 去重 + 默认绑定 root 兜底),
12
+ * 切换后角色下拉联动(各 CCC 的 skiff.roles 实时读取),提问按所选 CCC 创建 agent。
13
+ *
14
+ * 与 ACP stdio 协议(F4c 后续)共用同一会话核心(createSkiffAgent + askSkiff),
15
+ * 协议层后加不返工。轨迹 = session.events 结构化返回(与 dsh WebUI 同源数据),
16
+ * 页面 JS 渲染成对话时间线;同时保留原生 WebUI 会话链接供完整交互。
17
+ *
18
+ * 实验性质:未开启时零资源占用(无监听、无 agent 创建)。
19
+ */
20
+ import type { Context } from 'cordis';
21
+ import { type SkiffTrajectoryEntry } from './skiff-core.js';
22
+ export declare function skiffDebugActive(): boolean;
23
+ export declare function skiffDebugPort(): number | null;
24
+ /** 候选 CCC 条目(调试页 CCC 切换器数据) */
25
+ export interface SkiffCccEntry {
26
+ /** CCC 根(绝对路径) */
27
+ root: string;
28
+ /** 目录名(展示用) */
29
+ name: string;
30
+ /** 该 CCC 的 skiff 角色名列表(实时读取) */
31
+ roles: string[];
32
+ }
33
+ /**
34
+ * 发现候选 CCC 列表(多 CCC 手工切换,v1.25.6):
35
+ * ① **dsh 工作区注册表**(workspaceRegistry.list,持久化——所有工作目录即使无 live 会话;
36
+ * S142 用户 2026-08-29:应直接拉 dsh 工作区,且只列具体 CCC)
37
+ * ② **sessionPersistence 兜底**(持久化会话 headers——必装配服务,覆盖所有历史会话工作目录;
38
+ * 用户实测 workspaceRegistry 拉取仍空时兜底)
39
+ * ③ live 会话兜底
40
+ * ④ 默认绑定 root 兜底(不在列表时放首位)
41
+ */
42
+ export declare function discoverCccs(ctx: Context, defaultRoot: string): Promise<SkiffCccEntry[]>;
43
+ /** 问答页 HTML:CCC 切换器 + 角色下拉 + 输入 + 答案区 + 轨迹区(JS 渲染)+ WebUI 链接 */
44
+ export declare function skiffDebugPage(cccs: SkiffCccEntry[], defaultRoot: string, webPort: number): string;
45
+ /**
46
+ * JSC (Safari/iOS) JSON.parse 快速路径正则兼容化(v1.26.9,S142 调研定稿)。
47
+ *
48
+ * 背景:WebKit bug 200190「JavaScriptCore's Regex can't match the content」——JSC 的
49
+ * JSON.parse 用**内部正则**预校验字符串;内容含**原始** `\u2028`(行分隔符)/`\u2029`
50
+ * (段分隔符)时正则无法匹配 → 对**合法 JSON** 也抛
51
+ * `SyntaxError: The string did not match the expected pattern`(sentry-javascript #2487 同源)。
52
+ * JSON.stringify **不转义** `\u2028`/`\u2029`/`\uFEFF`(它们都是合法 JSON 字符串字符)→
53
+ * 在 JSON **文本层**把它们替换为 `\uXXXX` 转义序列:JSON.parse 后语义完全一致(还原原字符),
54
+ * 且 JSC 正则看到的是常规 ASCII 转义(与 JSON.stringify 对控制字符的输出同形态,安全)。
55
+ *
56
+ * 3100 问答页客户端 `await res.json()`(acp-http.ts)与页面内嵌 JSON(skiff-debug/acp-http)
57
+ * 均需此兼容层——iOS Safari 用户实测"复杂回答"触发。
58
+ *
59
+ * @param jsonText JSON.stringify 的输出文本;原地等价替换,返回 JSC 安全文本
60
+ */
61
+ export declare function jscSafeJsonText(jsonText: string): string;
62
+ /**
63
+ * Markdown 渲染(v1.25.9,正经库 marked 服务端渲染——替代手写正则渲染器,S142 用户要求):
64
+ * ① 提取 `<think>…</think>` 块(v1.26.8 状态机扫描,占位符 \u0001T<idx>\u0001)
65
+ * ② 正文与 think 内容**先 escapeHtml 再 marked.parse**(GFM + breaks)——markdown 语法不受
66
+ * 转义影响,原始 HTML 注入被消除(安全);代码块内 `<` 显示为实体(可接受)
67
+ * ③ think 占位符:默认还原为 `<details class="think">` 折叠卡(🧠 思考过程,默认收起);
68
+ * **hideThink=true(v1.26.4,public 口)→ 直接移除**(思考过程对普通用户不展示)
69
+ * @param hideThink 为 true 时 `<think>` 内容完全不渲染(public 问答页体验)
70
+ */
71
+ export declare function renderSkiffMarkdown(raw: string, hideThink?: boolean): string;
72
+ /**
73
+ * 启动调试问答服务(单实例;重复启动幂等返回既有实例)。
74
+ *
75
+ * **CCC 绑定(v1.25.2 用户指出)**:服务绑定一个默认 CCC root(调用方 resolveSkiffRoot
76
+ * 解析:live 会话中**含 skiff.roles 的 CCC 优先**);v1.25.4 起页面可**手工切换**到
77
+ * 其它候选 CCC(live 会话发现的全部 CCC);角色配置**每次请求实时读取**(不缓存快照)。
78
+ *
79
+ * @param root 默认绑定的 CCC 根(首次加载选中;角色配置读取 + skiff agent cwd)
80
+ * @param port 调试端口(仅 127.0.0.1)
81
+ * @param webPort 主 WebUI 端口(WebUI 链接)
82
+ */
83
+ export declare function startSkiffDebugServer(ctx: Context, root: string, port: number, webPort: number): Promise<void>;
84
+ export declare function stopSkiffDebugServer(): void;
85
+ /** 导出类型引用(测试断言轨迹结构) */
86
+ export type { SkiffTrajectoryEntry };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * skiff-registry.ts — Skiff 会话注册表(sessionId → {role, ccc};零 DSH 依赖,可被任何 seams 安全 import)
3
+ *
4
+ * F4b 会话映射:Skiff agent 创建时注册(skiff-core),guards/seams 按 sessionId 查角色。
5
+ * 独立成模块的原因:guards.ts 等拦截缝需要查角色而不引入 skiff-core 的运行时依赖
6
+ * (skiff-core 依赖 @deepseek-ai/dsh-llm,测试/装配级联成本高)——注册表本身纯内存 Map。
7
+ *
8
+ * 值结构 v1.25.10 扩展:role(guards/seams 依赖,向后兼容)+ ccc(会话追问时
9
+ * 角色/容器绑定校验——同 sessionId 复用必须同 (role, ccc),防串角色污染)。
10
+ *
11
+ * 生命周期:进程内存态;连接/页面关闭时 unregister;进程重启自然清空(skiff 会话不复存在)。
12
+ */
13
+ /** 注册表值:会话绑定的角色 + CCC 根(追问延续校验用) */
14
+ export interface SkiffSessionBinding {
15
+ role: string;
16
+ ccc: string;
17
+ }
18
+ /** 查 sessionId 的 Skiff 角色名(无 → null)——向后兼容(guards/seams 依赖) */
19
+ export declare function skiffRoleFor(sessionId: string): string | null;
20
+ /** 查 sessionId 的完整绑定(role + ccc;无 → null)——v1.25.10 会话追问校验 */
21
+ export declare function skiffSessionInfo(sessionId: string): SkiffSessionBinding | null;
22
+ export declare function registerSkiffSession(sessionId: string, role: string, ccc: string): void;
23
+ export declare function unregisterSkiffSession(sessionId: string): void;
24
+ /** 测试/调试:注册表快照(sessionId → {role, ccc}) */
25
+ export declare function skiffSessionSnapshot(): ReadonlyMap<string, SkiffSessionBinding>;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * skiff-role.ts — Skiff(F4,v1.25.0 实验性)角色层纯逻辑(零 DSH 依赖,可独立单测)
3
+ *
4
+ * 概念(S142 用户拍板):Skiff = 完整宁静号 trajectory(在宁静号内全知全能)的
5
+ * **任意子集**——CCC 通过角色配置定义:能力面(tools 非 MSM 工具白名单 + msms
6
+ * MSM 白名单,双白名单独立,白名单外全隐藏)+ 轨迹纪律面(trajectory 子集)+
7
+ * 系统提示词(CCC 完整定义,dsp 只给基础部分)。
8
+ *
9
+ * 实验性质:未配置任何角色 → Skiff 完全零影响(无监听、无 agent 创建、guard 无规则)。
10
+ */
11
+ import { type SkiffRoleConfig } from './ccc.js';
12
+ export type { SkiffRoleConfig };
13
+ /** Skiff agent 会话 id 前缀(agents.create 生成;seams 旁路/白名单判定用) */
14
+ export declare const SKIFF_SESSION_PREFIX = "skiff-";
15
+ /** 判定 sessionId 是否为 Skiff 会话(仿 handyman- 前缀排除模式) */
16
+ export declare function isSkiffSessionId(sessionId: string | undefined): boolean;
17
+ /**
18
+ * 读取 CCC 的 Skiff 角色配置(.opencode/serenity.json skiff.roles)。
19
+ * @returns 名 → 角色配置 的 Map;未配置(无 skiff 段/空 roles)返回空 Map(Skiff 未启用)
20
+ */
21
+ export declare function readSkiffRoles(root: string, paths?: string[]): Map<string, SkiffRoleConfig>;
22
+ /** 某角色的轨迹纪律子集(缺省全 false = 完全独立) */
23
+ export interface SkiffTrajectorySubset {
24
+ session: boolean;
25
+ keeper: boolean;
26
+ rebuild: boolean;
27
+ }
28
+ export declare function trajectorySubset(role: SkiffRoleConfig | undefined): SkiffTrajectorySubset;
29
+ /** 角色可用工具面(白名单并集):tools + acc_msm(msms 非空时作为 MSM 通道自动可用) */
30
+ export declare function roleToolWhitelist(role: SkiffRoleConfig | undefined): Set<string>;
31
+ /** 角色允许的 MSM 白名单(acc_msm exec 校验 / msm_list 过滤用;独立于 tools 白名单) */
32
+ export declare function roleMsmWhitelist(role: SkiffRoleConfig | undefined): Set<string>;
33
+ /**
34
+ * 解析角色的系统提示词全文(v1.25.10,S142 用户:超长提示词 JSON 内嵌不可读):
35
+ * ① `systemPromptFile` 存在 → 读取文件内容(**推荐配置方法**;相对 CCC 根,
36
+ * 路径逃逸拒绝(resolveInside)+ BOM 剥除(readUtf8)+ 存在性校验)
37
+ * ② 否则 → 内嵌 `systemPrompt`(兼容旧配置)
38
+ * ③ 都无 → 空字符串
39
+ * 文件缺失/逃逸 → 抛错(调用方 catch 降级 + validate 报 issue)。
40
+ * 懒读取:readSkiffRoles 不读文件(guards/seams 每次工具调用查询的热路径零 IO),
41
+ * 仅在本函数(创建 agent / validate / list 时)读取。
42
+ */
43
+ export declare function resolveRoleSystemPrompt(root: string, role: SkiffRoleConfig | undefined): string;
44
+ /** 角色系统提示词来源(validate/list 展示用) */
45
+ export declare function systemPromptSource(role: SkiffRoleConfig | undefined): 'file' | 'inline' | 'none';
46
+ /**
47
+ * Skiff 基础提示词(dsp 只给这部分;CCC 的 systemPrompt 段由调用方拼接):
48
+ * 身份 + 可用 MSM/工具清单 + 调用协议 + 边界声明。动态生成(清单来自角色白名单)。
49
+ */
50
+ export declare function buildSkiffBasePrompt(roleName: string, role: SkiffRoleConfig | undefined): string;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * opencode-scan.ts — opencode skill 标准扫描(纯逻辑,零 DSH 依赖)
3
+ *
4
+ * 兼容 opencode 的 skill 标准:`.opencode/skills/<name>/SKILL.md`
5
+ * (frontmatter: name/description/whenToUse;结构含 references/、scripts/)。
6
+ */
7
+ export interface OpencodeSkillMeta {
8
+ name: string;
9
+ description: string;
10
+ whenToUse?: string;
11
+ }
12
+ export interface OpencodeSkill {
13
+ name: string;
14
+ dir: string;
15
+ meta: OpencodeSkillMeta;
16
+ content: string;
17
+ path: string;
18
+ }
19
+ /** 解析 --- 分隔的 YAML frontmatter(只需 name/description/whenToUse) */
20
+ export declare function parseFrontmatter(raw: string): {
21
+ meta: OpencodeSkillMeta;
22
+ content: string;
23
+ };
24
+ /** 扫描 CCC 的 .opencode/skills(一级目录 + SKILL.md 存在性) */
25
+ export declare function listOpencodeSkillDirs(root: string): string[];
26
+ /** 加载一个 opencode skill(frontmatter 解析 + 正文);读失败(EPERM/占用等)返回 null,单目录容错 */
27
+ export declare function loadOpencodeSkill(skillDir: string): OpencodeSkill | null;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * skills-discovery.ts — CCC 入口 skill 自动发现(纯逻辑,零 DSH 依赖)
3
+ *
4
+ * 发现全部入口技能(原文全量,不截断):
5
+ * 0. **`.serenity` 记号文件内容 = 顶层入口 skill 名**(CCC 记号文件的权威语义,
6
+ * tiangong-serenity 的 .serenity 内容为 `tg-serenity`)—— 最高优先
7
+ * 1. `.dsh/entry-skill` 指针文件(内容 = skill 名)—— 兼容旧约定
8
+ * 2. `.opencode/skills/*-serenity/SKILL.md` —— 自动扫描该 CCC 的顶层入口
9
+ * (home-serenity / tg-serenity / pangu-serenity …,命名模式 `*-serenity`)
10
+ * 3. `.dsh/skills/*-serenity/SKILL.md` —— 自动扫描 ACC/harness 入口(acc-serenity 等)
11
+ * 按名去重;顺序 = 记号文件 → 指针 → opencode 入口 → dsh 入口。
12
+ *
13
+ * 任何 CCC 都能自动注入其顶层入口 skill 全文(不硬编码名字)。
14
+ */
15
+ export type EntrySkillSource = 'serenity-marker' | 'pointer' | 'opencode' | 'dsh';
16
+ export interface EntrySkill {
17
+ name: string;
18
+ content: string;
19
+ source: EntrySkillSource;
20
+ }
21
+ /** 发现全部入口技能(原文全量,不截断) */
22
+ export declare function findEntrySkills(root: string): EntrySkill[];
23
+ /** 兼容旧接口:第一个入口(或 null) */
24
+ export declare function findEntrySkill(root: string): EntrySkill | null;
25
+ export declare function truncateContent(content: string, maxChars: number): string;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * status.ts — 状态与安全模式操作(纯逻辑,零 DSH 依赖,可独立单测)
3
+ *
4
+ * WebUI 停靠栏的数据源:ACC 版本 / CCC 根 / safe-mode 状态 / 黑名单 / keeper 阈值 / handyman 模型。
5
+ * setSafeMode 直接读写 .serenity-safe-on 标记(守卫实时读取,写即生效)。
6
+ */
7
+ /**
8
+ * 读取已安装 DSH CLI 版本;读不到返回 null。
9
+ * 跨平台(Windows 审计问题 13):Windows npm 全局装在 %APPDATA%\npm(非 ~/.npm-global)——
10
+ * 依次尝试 npm_config_prefix / APPDATA\npm / ~/.npm-global。
11
+ */
12
+ export declare function readDshVersion(): string | null;
13
+ export interface SerenityStatus {
14
+ root: string | null;
15
+ accVersion: string;
16
+ dshVersion: string | null;
17
+ nodeVersion: string;
18
+ safeModeOn: boolean;
19
+ /** 黑名单条目(string 或 {pattern, message},对齐 osp) */
20
+ blacklist: {
21
+ pattern: string;
22
+ message?: string;
23
+ }[];
24
+ threshold: number | null;
25
+ handymanModel: string | null;
26
+ restrict: {
27
+ lastKey: string | null;
28
+ lastAttemptAt: string | null;
29
+ lastSuccess: boolean | null;
30
+ lastError: string | null;
31
+ activeKeys: string[];
32
+ };
33
+ }
34
+ export declare function getStatus(cwd: string, configPaths?: string[]): SerenityStatus;
35
+ /** 切换安全模式(写/删标记文件);返回实际生效状态 */
36
+ export declare function setSafeMode(root: string, on: boolean): {
37
+ on: boolean;
38
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * autotrajectory-exp.ts — 自主轨迹实验一站式管理工具(v1.26.12 实验提案,默认关)
3
+ *
4
+ * 定位:dsp **只提供工具与知识**,不向 CCC 自动安装任何东西(实验可能失败,不污染 CCC)——
5
+ * 实验是 CCC 的自选动作:agent 调本工具(doc/全报告)即懂实验,init/random/check 辅助,
6
+ * 实际执行(写配置/写偏见脚本/标记会话)由 CCC 自己决定、自己用现有工具完成。
7
+ *
8
+ * 实现:薄封装——exec 包内静态脚本(npm files 含 experiments/),脚本是单一真相源。
9
+ * 环境注入 SERENITY_ROOT(当前 CCC 根)供脚本定位;bun 优先(可直跑 TS)。
10
+ * diag-live:**进程内诊断**(v1.26.14 用户"排查访问不到")——闭包捕获 ctx,
11
+ * 直接读 live 会话/标题/agent(脚本 diag 看不到运行时),输出实例级诊断报告。
12
+ */
13
+ import { defineTool } from '@deepseek-ai/dsh-tools';
14
+ import type { Context } from 'cordis';
15
+ /**
16
+ * 定位包内实验脚本(npm files 分发 experiments/autotrajectory/)。
17
+ * 布局差异:tsdown bundle 后 import.meta.url 指向 lib/index.js(lib → 包根 1 层);
18
+ * vitest 源码直跑时指向 src/tools/x.ts(src/tools → 包根 2 层)——逐级上溯查找,
19
+ * 两种布局都稳(找到 experiments/autotrajectory/scripts/autotrajectory-exp.ts 即止)。
20
+ */
21
+ export declare function findExpScript(startDir: string): string | null;
22
+ export declare const AUTO_TRAJECTORY_EXP_ACTIONS: readonly ["all", "init", "random", "diag", "doc", "check", "status", "guide", "diag-live"];
23
+ /** 创建 autotrajectory-exp 工具(闭包捕获 ctx → diag-live 进程内诊断;v1.26.14) */
24
+ export declare function createAutoTrajectoryExpTool(ctx: Context): ReturnType<typeof defineTool>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * cc-fs.ts — cc_fs 真实 DSH 工具定义(defineTool)
3
+ *
4
+ * 进程内注册(取代 v0.1 的 bash spawn runner):zod/schemastery 参数校验、
5
+ * 规范 JSON 输出、纯 render 投影。逻辑在 fs-ops.ts(可单测)。
6
+ */
7
+ export declare const ccFsTool: import("@deepseek-ai/dsh-tools").ToolDefinition;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * cce.ts — CCE 认知连续性工程工具(渐进式披露,ACC 标准工具化)
3
+ *
4
+ * 内容:认知连续性工程(Cognitive Continuity Engineering)——在有限资源与
5
+ * 不可逆不确定性约束下,维持认知实体身份、可达性与演化能力的工程学科。
6
+ * 来源:home-serenity `.opencode/skills/cce/SKILL.md` + CCE 理论。
7
+ */
8
+ export declare const CCE_CONTENT = "# CCE \u2014 Cognitive Continuity Engineering\n\n> **Cognitive Continuity Engineering is the engineering discipline of maintaining a cognitive entity's identity, accessibility, and capacity to evolve under the constraints of bounded resources and irreversible uncertainty.**\n> CCE does not optimize cognition. It preserves the conditions under which cognition can continue. \u2014 Persistence Engineering, not performance engineering\n\n## Core Propositions\n- **Continuity belongs to the container, not to any individual participant** \u2014 agents come and go, but the CCC's cognitive trajectory persists\n- **Organization must at minimum keep pace with accumulation** \u2014 otherwise operational cognitive entropy (H_op) grows unboundedly and accessibility is lost\n- **Reconstruction over preservation** \u2014 an artifact's value is determined by its ability to let future agents rebuild the original reasoning\n\n## Cognitive Container\nA bounded cognitive space in which cognition can accumulate, reorganize, and evolve. 5 defining properties:\n| Property | Function |\n|----------|----------|\n| Identity | Distinguishes this cognitive system from others |\n| Boundaries | Define what is inside/outside the cognitive space |\n| Persistent Memory | Retains accumulated cognition across time |\n| Operational Constraints | Define which operations are allowed inside the container |\n| Evolutionary History | Records the trajectory of cognitive change, making reconstruction possible |\n\n## Operational Cognitive Entropy (H_op)\nDoes not measure total entropy (not operational); it measures only the **excess cognitive cost** for agents to complete tasks inside the container:\n> H_op(C, t) = cost(task | C, t) \u2212 cost(task | ideal)\nContinuity condition: **H_op(C, t) \u2264 H_critical** \u2014 agents can still complete tasks at reasonable cost\n\n## Continuity Maintenance Condition\n> **\u0394H_org \u2265 \u0394H_in** \u2014 organization must at minimum keep pace with accumulation\n\n## Six-Phase Lifecycle\nExperience \u2192 Accumulation \u2192 Organization \u2192 Abstraction \u2192 Reconstruction \u2192 Evolution \u2192\uFF08loop\uFF09\n| Phase | Engineering Concern |\n|-------|---------------------|\n| Experience | Does input carry enough structure |\n| Accumulation | Is information stored losslessly |\n| Organization | Entropy management \u2014 \u0394H_org offsets \u0394H_in |\n| Abstraction | Is abstraction explicitly encoded |\n| Reconstruction | Can reasoning structure be recovered from artifacts |\n| Evolution | Does evolution stay coherent or introduce drift |\n\n## Relationship with EAP\nEAP answers \"how a piece of knowledge should be structured\" (explicitness E\u2191 / reconstructability R\u2193 / stability S\u2191);\nCCE answers \"how structured knowledge should keep evolving across time without losing coherence\". They complement each other: EAP is static quality, CCE is dynamic persistence.\n\n## Relationship with Serenity\nSerenity's session system, session tracking, and entropy management mechanisms (SQC quality loop) are all engineering implementations of CCE;\nthe behavioral constraints embedded in CCC system prompts come from CCE.";
9
+ export declare const cceTool: import("@deepseek-ai/dsh-tools").ToolDefinition;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * eap.ts — EAP 认知质量框架工具(渐进式披露,ACC 标准工具化)
3
+ *
4
+ * 内嵌框架内容(自包含,不依赖已安装技能);可选 section 参数聚焦某原则。
5
+ */
6
+ export declare const EAP_CONTENT = "# EAP Cognitive Quality Framework (Explicit Abstraction Principle)\n\n> \"The functional value of a thought is proportional to its external reconstructability.\"\n\n## Three Variables\n| Variable | Meaning | How to improve |\n|----------|---------|----------------|\n| E\u2191 Explicitness | Degree to which variables/entities/relations are clearly defined | Define variables, state relationship direction & cardinality, draw boundaries |\n| R\u2193 Reconstructability | Cost of rebuilding the original reasoning later | Record decision rationale, context, constraints, alternatives |\n| S\u2191 Stability | Degree to which the same input repeatedly produces consistent output | Fix structures, protocolize, avoid relying on implicit context |\n\n## Pre-Output Self-Check Checklist\n- [ ] Variables/entities clearly defined (E\u2191)\n- [ ] Relationships state direction/cardinality (E\u2191)\n- [ ] Boundaries drawn \u2014 what is in scope / what is not (E\u2191)\n- [ ] No ambiguous words: \"handle\" \"optimize\" \"problem\" \u2192 be specific (E\u2191)\n- [ ] Key decisions record rationale and alternatives (R\u2193)\n- [ ] No level-skipping \u2014 align the upper layer before descending (R\u2193)\n- [ ] Structures can be regenerated repeatably (S\u2191)\n\n## Relationship with ACC\nACC (plugin/template) encodes structure as code (E\u2191); generating a CCC from ACC is deterministic (R\u2193); consistent across multiple CCCs (S\u2191).\nCCC (home-serenity etc.) encodes cognitive content as skills/SESSIONs/design docs. Use this checklist to self-check outputs.\n\n## Reference\nhttps://github.com/tellmewhattodo/theory-eap";
7
+ export declare const eapTool: import("@deepseek-ai/dsh-tools").ToolDefinition;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * git.ts — cc_git 真实 DSH 工具定义(defineTool)
3
+ */
4
+ export declare const gitTool: import("@deepseek-ai/dsh-tools").ToolDefinition;