dsh-plugin-prompt-tool 0.8.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -67
- package/engine/actions/append-context.mjs +49 -0
- package/engine/actions/assembly.mjs +150 -0
- package/engine/actions/catalog.mjs +92 -0
- package/engine/actions/content.mjs +205 -0
- package/engine/actions/decision.mjs +54 -0
- package/engine/actions/examples.mjs +11 -0
- package/engine/actions/guard.mjs +80 -0
- package/engine/actions/inbox-prepend.mjs +37 -0
- package/engine/actions/index.mjs +100 -0
- package/engine/actions/inject-text.mjs +22 -0
- package/engine/actions/pre-step-filter.mjs +55 -0
- package/engine/actions/registration.mjs +168 -0
- package/engine/actions/request-params.mjs +32 -0
- package/engine/actions/sdk-strip.mjs +30 -0
- package/engine/actions/shared.mjs +71 -0
- package/engine/actions.mjs +2 -931
- package/engine/branch.mjs +44 -0
- package/engine/character-tools.mjs +3 -6
- package/engine/compaction-epoch.mjs +31 -13
- package/engine/compositions/library/agent-instructions.yml +1 -1
- package/engine/compositions/library/command-goal.yml +1 -1
- package/engine/compositions/library/compaction.yml +1 -1
- package/engine/compositions/library/delegation-ptc.yml +1 -1
- package/engine/compositions/library/delegation.yml +1 -1
- package/engine/compositions/library/persistent-shell.yml +1 -1
- package/engine/compositions/library/planning.yml +1 -1
- package/engine/compositions/library/skill-filesystem-cordis.yml +1 -1
- package/engine/compositions/library/skill-filesystem.yml +1 -1
- package/engine/compositions/library/tool-ask-user.yml +1 -1
- package/engine/compositions/library/tool-bash.yml +1 -1
- package/engine/compositions/library/tool-cordis.yml +1 -1
- package/engine/compositions/library/tool-fs-search.yml +1 -1
- package/engine/compositions/library/tool-fs.yml +1 -1
- package/engine/compositions/library/tool-goal.yml +1 -1
- package/engine/compositions/library/tool-jobs.yml +1 -1
- package/engine/compositions/library/tool-plugin-manager-disabled.yml +1 -1
- package/engine/compositions/library/tool-plugin-manager.yml +1 -1
- package/engine/compositions/library/tool-present.yml +1 -1
- package/engine/compositions/library/tool-presentation.yml +1 -1
- package/engine/compositions/library/tool-pwsh.yml +1 -1
- package/engine/compositions/library/tool-skill.yml +1 -1
- package/engine/compositions/library/tool-todo.yml +1 -1
- package/engine/compositions/library/tool-web.yml +1 -1
- package/engine/compositions/source/local/dev-tool-search.yml +11 -0
- package/engine/compositions/source/local/instruction-hint.yml +22 -1
- package/engine/compositions/source/local/rule-engine.yml +6 -0
- package/engine/condition.mjs +16 -3
- package/engine/conditions/anchor.mjs +32 -0
- package/engine/conditions/availability.mjs +47 -0
- package/engine/conditions/composite.mjs +83 -0
- package/engine/conditions/count.mjs +140 -0
- package/engine/conditions/evaluation.mjs +41 -0
- package/engine/conditions/examples.mjs +11 -0
- package/engine/conditions/index.mjs +85 -0
- package/engine/conditions/names.mjs +21 -0
- package/engine/conditions/phase.mjs +54 -0
- package/engine/conditions/preset.mjs +94 -0
- package/engine/conditions/scope.mjs +18 -0
- package/engine/conditions/session.mjs +22 -0
- package/engine/conditions/source.mjs +63 -0
- package/engine/conditions/subject.mjs +121 -0
- package/engine/conditions/text.mjs +44 -0
- package/engine/conditions/values.mjs +32 -0
- package/engine/dev-tool-search.mjs +213 -0
- package/engine/executor.mjs +93 -31
- package/engine/fillers.mjs +23 -16
- package/engine/instruction-hint.mjs +39 -23
- package/engine/layers.mjs +171 -77
- package/engine/order.mjs +20 -0
- package/engine/predicates.mjs +2 -753
- package/engine/rule-engine.mjs +40 -0
- package/engine/rule-runtime.mjs +110 -0
- package/engine/rule-spec.mjs +187 -0
- package/engine/schema.mjs +32 -11
- package/engine/session-var-tools.mjs +3 -6
- package/engine/shared.mjs +1 -1
- package/engine/st-render.mjs +8 -4
- package/engine/strategies.mjs +2 -235
- package/engine/subagent-tool-policy-core.mjs +7 -7
- package/engine/subagent-tool-policy.mjs +45 -20
- package/engine/tool-config-engine.mjs +53 -32
- package/engine/trigger-editor-meta.mjs +2 -21
- package/engine/trigger-spec.mjs +49 -133
- package/engine/world-book-tools.mjs +3 -6
- package/lib/client.js +10444 -10886
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +265 -361
- package/lib/index.mjs +1559 -2026
- package/lib/migrate-rules.d.mts +1 -0
- package/lib/migrate-rules.mjs +39 -0
- package/lib/module-package-CHPFweqK.mjs +2 -0
- package/lib/module-package-Cnd1_mwx.mjs +2872 -0
- package/lib/{paths-CY5psBqE.d.mts → paths-CyP0IkaM.d.mts} +388 -231
- package/lib/preset-transfer.d.mts +2 -2
- package/lib/preset-transfer.mjs +3 -2
- package/lib/{preset-package-BnJqrU4R.mjs → rules-migration-DJ6vASB5.mjs} +13825 -15283
- package/modules/ponytail/module.yml +406 -0
- package/modules/skill-surface/module.yml +74 -0
- package/modules/tool-surface/module.yml +67 -0
- package/package.json +50 -80
- package/templates/10-pre-step.yml +26 -22
- package/templates/14-first-turn-anchor.yml +25 -21
- package/templates/15-guide-auto.yml +34 -19
- package/templates/16-custom-fallback.yml +27 -15
- package/templates/18-placeholder-env-facts.yml +23 -14
- package/templates/20-system-section.yml +20 -11
- package/templates/30-runtime-context.yml +13 -7
- package/templates/40-agent-request.yml +11 -8
- package/templates/50-llm-stream.yml +14 -6
- package/templates/60-tool-pipeline.yml +15 -9
- package/templates/65-turn-stop.yml +19 -12
- package/templates/66-subagent-start.yml +12 -7
- package/templates/70-subagent-maintenance.yml +35 -29
- package/templates/75-subagent-end.yml +10 -5
- package/templates/80-tool-surface.yml +66 -0
- package/templates/policies/legacy-defaults.yml +34 -0
- package/templates/tools/50-delegate-worldbook.yml +1 -1
- package/engine/compositions/source/local/prompt-config-engine.yml +0 -7
- package/engine/prompt-config-engine.mjs +0 -104
- package/preset/pt-cordis/preset.yml +0 -43
- package/preset/pt-cordis/skills/cordis-composition-reference/SKILL.md +0 -29
- package/preset/pt-cordis/skills/cordis-composition-reference/references/packages.md +0 -501
- package/preset/pt-cordis/skills/cordis-plugin-development/SKILL.md +0 -38
- package/preset/pt-cordis/skills/cordis-plugin-development/references/host-plugin.md +0 -60
- package/preset/pt-cordis/skills/cordis-plugin-development/references/mcp-bundle.md +0 -5
- package/preset/pt-cordis/skills/cordis-plugin-development/references/ui-plugin.md +0 -13
- package/preset/pt-cordis/skills/cordis-plugin-development/references/verification.md +0 -5
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/client.js +0 -22
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/cordis.patch.yml +0 -3
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/index.js +0 -2
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/package.json +0 -15
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/mcp/cordis.patch.yml +0 -8
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/mcp/package.json +0 -7
- package/preset/pt-cordis/skills/editing-cordis-compositions/SKILL.md +0 -84
- package/preset/pt-custom/preset.yml +0 -15
- package/preset/pt-minimal/preset.yml +0 -27
- package/preset/pt-ptc/preset.yml +0 -45
- package/preset/pt-standard/preset.yml +0 -43
|
@@ -1,11 +1,88 @@
|
|
|
1
1
|
import { parseDocument } from "yaml";
|
|
2
|
+
//#region src/shared/engine-capabilities.d.ts
|
|
3
|
+
type ModuleSourceMode = 'explicit' | 'composition' | 'official' | 'unknown';
|
|
4
|
+
/** 官方九个注入层:与 engine/schema.mjs 的 LAYER_ORDER 同源,改一处必须同步另一处。 */
|
|
5
|
+
type InjectionPoint = 'pre-step' | 'system-section' | 'runtime-context' | 'agent-request' | 'llm-stream' | 'tool-pipeline' | 'turn-stop' | 'subagent-start' | 'subagent-end';
|
|
6
|
+
/** 旧公开类型名只作输入兼容。 */
|
|
7
|
+
/**
|
|
8
|
+
* 九层顺序的共享副本:宿主是旧版本(不下发 meta.layerOrder)时前端退化用它,
|
|
9
|
+
* 而不是各自再写一份层序清单。
|
|
10
|
+
*/
|
|
11
|
+
declare const INJECTION_POINT_ORDER: readonly InjectionPoint[];
|
|
12
|
+
interface ModuleFacts {
|
|
13
|
+
declaredModules: string[] | null;
|
|
14
|
+
effectiveModules: string[] | null;
|
|
15
|
+
rowIds: string[];
|
|
16
|
+
sourceMode: ModuleSourceMode;
|
|
17
|
+
editable: boolean;
|
|
18
|
+
effectiveConfigs?: Record<string, Record<string, unknown>>;
|
|
19
|
+
/** 策略段真实存在;能力声明仍在并不代表策略已开启。 */
|
|
20
|
+
subagentToolPolicyEnabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface ModuleCapability {
|
|
23
|
+
id: string;
|
|
24
|
+
moduleKeys: readonly string[];
|
|
25
|
+
rowIds: readonly string[];
|
|
26
|
+
displayLayer: InjectionPoint;
|
|
27
|
+
/** 真实跨层影响的相关层(只在确有第二通道时登记,避免把归属铺满九层)。 */
|
|
28
|
+
relatedLayers?: readonly InjectionPoint[];
|
|
29
|
+
/**
|
|
30
|
+
* 该能力拥有的 preset 顶层数据段(不是行级 config)。
|
|
31
|
+
* 创建时若段缺失则写入 `skeleton`(保证"模块在 ⇒ 数据在");删除时一并移除该段。
|
|
32
|
+
*/
|
|
33
|
+
ownSection?: {
|
|
34
|
+
/** preset.yml 顶层键名。 */
|
|
35
|
+
key: string;
|
|
36
|
+
/** 启用时写入的可用骨架(必须能通过该段的校验)。 */
|
|
37
|
+
skeleton: Readonly<Record<string, unknown>>;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** 首期只登记已有 typed editor 的能力,避免万能 key/value 表单。 */
|
|
41
|
+
declare const MODULE_CAPABILITIES: readonly ModuleCapability[];
|
|
42
|
+
/**
|
|
43
|
+
* 编辑组 = 前端一张可编辑卡(能力卡或专用卡)的主归属层。
|
|
44
|
+
* id 必须是代码里真实存在的 card / 展开键名,不新增臆造 id。
|
|
45
|
+
*/
|
|
46
|
+
interface EngineEditorGroup {
|
|
47
|
+
id: string;
|
|
48
|
+
displayLayer: InjectionPoint;
|
|
49
|
+
/** 真实跨层影响的相关层(只有确有第二通道时才写)。 */
|
|
50
|
+
relatedLayers?: readonly InjectionPoint[];
|
|
51
|
+
/** 真实生效通道的只读说明键(如 'agent-request' / 'system-section'):供 UI 显示「实际生效通道」,
|
|
52
|
+
* 只写代码里可核对的事实,不承诺未验证的通道。 */
|
|
53
|
+
hook: string;
|
|
54
|
+
}
|
|
55
|
+
interface EngineRecipe {
|
|
56
|
+
id: string;
|
|
57
|
+
capabilities: readonly string[];
|
|
58
|
+
initialParams?: Readonly<Record<string, unknown>>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 只保留已有真实工作流的一键组合;recipe 本身不写入 preset.yml。
|
|
62
|
+
*
|
|
63
|
+
* B7 T3 清空:三条 recipe 的成员都是随本轮退场的专用能力(phase-control /
|
|
64
|
+
* phase-control-ptc / deliberation),没有任何一条还能组成合法能力集合。
|
|
65
|
+
* export 与 `engineRecipe()` 保留——调用点(创建菜单、bridge 校验)不必跟着改,
|
|
66
|
+
* 空表天然让组合项整个消失。
|
|
67
|
+
*/
|
|
68
|
+
declare const ENGINE_RECIPES: readonly EngineRecipe[];
|
|
69
|
+
declare function moduleCapability(id: string): ModuleCapability | undefined;
|
|
70
|
+
declare function engineRecipe(id: string): EngineRecipe | undefined;
|
|
71
|
+
/** 显式模块声明中的实际能力;包含当前参数与顶层策略所需的装配。
|
|
72
|
+
* 创建补声明由 host 单独检查 declaredModules;官方组合行不伪装成可编辑能力。 */
|
|
73
|
+
declare function isModuleCapabilityPresent(id: string, facts: ModuleFacts | undefined): boolean;
|
|
74
|
+
/** custom tool 的运行时名称缺省回落 id;保存前拒绝会导致同层注册失败的重复项。 */
|
|
75
|
+
declare function validateCustomToolIdentities(tools: readonly unknown[]): string[];
|
|
76
|
+
/** 已发布名称只在此边界保留,内部使用模块能力与插入点命名。 */
|
|
77
|
+
type EngineLayer = InjectionPoint;
|
|
78
|
+
//#endregion
|
|
2
79
|
//#region src/shared/instructions.d.ts
|
|
3
80
|
/**
|
|
4
81
|
* 指令文件(AGENTS.md / CLAUDE.md 等)跨 host/client 的最小契约。
|
|
5
82
|
* 只放两端都要理解的形状:读取快照、工作区上下文与写入结果;
|
|
6
83
|
* 引擎侧的位置/晋升/受众算法不在这里复制。
|
|
7
84
|
*/
|
|
8
|
-
/**
|
|
85
|
+
/** 文件卡正文读写上限;官方注入的读取与渲染预算由官方配置决定。 */
|
|
9
86
|
declare const MAX_INSTRUCTION_FILE_BYTES: number;
|
|
10
87
|
declare const INSTRUCTION_FILE_STATUSES: readonly ["ready", "missing", "unreadable", "too-large"];
|
|
11
88
|
/**
|
|
@@ -53,8 +130,7 @@ interface InstructionsSnapshot {
|
|
|
53
130
|
}
|
|
54
131
|
/**
|
|
55
132
|
* 指令负责人事实:本会话实际装配里是否仍挂着官方指令加载行。
|
|
56
|
-
* `true`
|
|
57
|
-
* 的独立来源负责;`null` 表示本次请求还没有该会话的装配观察结果(不猜)。
|
|
133
|
+
* `true` 表示官方负责注入;`false` 表示模块未装配官方来源;`null` 表示尚未观察到。
|
|
58
134
|
*/
|
|
59
135
|
interface InstructionsOwnerView {
|
|
60
136
|
officialInstructions: boolean | null;
|
|
@@ -65,37 +141,23 @@ interface InstructionFileWriteResult {
|
|
|
65
141
|
revision: string;
|
|
66
142
|
}
|
|
67
143
|
/**
|
|
68
|
-
*
|
|
144
|
+
* 指令文件卡策略(独立于模块与 settings 的本插件自有状态)。
|
|
69
145
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* 切换验收,再由用户显式开启。
|
|
146
|
+
* 只承载逐文件开关与展示名;正文、读取版本、会话 ID 和路径不进入策略。
|
|
147
|
+
* 默认放行官方注入,关闭只过滤后续消息,不撤回已持久历史。
|
|
73
148
|
*/
|
|
74
|
-
interface
|
|
75
|
-
|
|
76
|
-
position: string;
|
|
77
|
-
promotion: string;
|
|
78
|
-
audience: string | null;
|
|
79
|
-
modelScope: string;
|
|
80
|
-
}
|
|
81
|
-
interface InstructionPolicyFileOverride extends Partial<InstructionPolicyValues> {
|
|
82
|
-
/** 每文件可关闭注入(默认开启);部署级 enabled 为 false 时整体不注入。 */
|
|
149
|
+
interface InstructionPolicyFileOverride {
|
|
150
|
+
/** 缺省开启;false 拦截该文件后续的官方注入。 */
|
|
83
151
|
enabled?: boolean;
|
|
84
152
|
/** 可选显示名(只影响 UI 标题)。 */
|
|
85
153
|
name?: string;
|
|
86
154
|
}
|
|
87
155
|
interface InstructionPolicy {
|
|
88
|
-
/**
|
|
89
|
-
enabled: boolean;
|
|
90
|
-
/** 未单独覆盖的文件使用这些值。 */
|
|
91
|
-
defaults: InstructionPolicyValues;
|
|
92
|
-
/** 按 fileId 的覆盖;缺省即用 defaults,删除覆盖恢复默认。 */
|
|
156
|
+
/** 按 fileId 的覆盖;删除覆盖恢复默认放行。 */
|
|
93
157
|
files: Record<string, InstructionPolicyFileOverride>;
|
|
94
158
|
}
|
|
95
159
|
/** 局部更新:只写传入的键;files[fileId] = null 表示删除该覆盖。 */
|
|
96
160
|
interface InstructionPolicyPatch {
|
|
97
|
-
enabled?: boolean;
|
|
98
|
-
defaults?: Partial<InstructionPolicyValues>;
|
|
99
161
|
files?: Record<string, InstructionPolicyFileOverride | null>;
|
|
100
162
|
}
|
|
101
163
|
//#endregion
|
|
@@ -122,6 +184,110 @@ interface PersonaSpec {
|
|
|
122
184
|
includeRuntimeContext?: boolean;
|
|
123
185
|
}
|
|
124
186
|
//#endregion
|
|
187
|
+
//#region src/shared/rules.d.ts
|
|
188
|
+
/** 一张独立配置卡的判断树;原语与组合的合法形状由引擎唯一校验。 */
|
|
189
|
+
type RuleCondition = Record<string, unknown>;
|
|
190
|
+
/** 动作拥有稳定身份;其执行点由动作目录推导,不能任意指定宿主事件。 */
|
|
191
|
+
interface RuleAction extends Record<string, unknown> {
|
|
192
|
+
id: string;
|
|
193
|
+
kind: string;
|
|
194
|
+
channelOrder?: number;
|
|
195
|
+
waterfallPosition?: 'default' | 'outermost';
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* module.yml.rules 的单一规则定义;层用于呈现归属,不建立跨层执行顺序。
|
|
199
|
+
*
|
|
200
|
+
* **旧名 `when`/`do` 已随引擎重构退役**(不再作为兼容输入),全链路只有 `if`/`then`/`else`。
|
|
201
|
+
* 定义迁移由 YAML Document API 改键名完成,注释与未知字段原地保留。
|
|
202
|
+
*/
|
|
203
|
+
interface RuleDefinition {
|
|
204
|
+
id: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
enabled?: boolean;
|
|
207
|
+
layer?: EngineLayer;
|
|
208
|
+
group?: string;
|
|
209
|
+
exclusive?: boolean;
|
|
210
|
+
/** 分支条件;缺省 = 无条件。 */
|
|
211
|
+
if?: RuleCondition;
|
|
212
|
+
/** 动作列表。 */
|
|
213
|
+
then: RuleAction[];
|
|
214
|
+
/** `if` 不命中时执行;与 `then` 结构互斥(编译期按 `not(if)` 展开)。 */
|
|
215
|
+
else?: RuleAction[];
|
|
216
|
+
}
|
|
217
|
+
/** 显式旧身份使改名、删除与 configOrder 在同一事务中更新。 */
|
|
218
|
+
interface RuleEdit {
|
|
219
|
+
previousId: string | null;
|
|
220
|
+
rule: RuleDefinition | null;
|
|
221
|
+
/** 正文编辑不拥有启停与互斥状态;修改状态须显式声明并校验 settings 版本。 */
|
|
222
|
+
settingsChanged?: boolean;
|
|
223
|
+
}
|
|
224
|
+
interface RuleRevisions {
|
|
225
|
+
rules: Record<string, string>;
|
|
226
|
+
settings: string;
|
|
227
|
+
variables: string;
|
|
228
|
+
}
|
|
229
|
+
interface RulesRequest {
|
|
230
|
+
expectedModuleId?: string;
|
|
231
|
+
/** 旧公开输入仅在边界归一。 */
|
|
232
|
+
expectedPresetId?: string;
|
|
233
|
+
expectedRevision?: string;
|
|
234
|
+
expectedRevisions?: Partial<RuleRevisions>;
|
|
235
|
+
edits?: RuleEdit[];
|
|
236
|
+
/** 显式启用目标;保存端同时停用同模块互斥组的其他卡。 */
|
|
237
|
+
activateRuleId?: string;
|
|
238
|
+
validateOnly?: boolean;
|
|
239
|
+
/** 只重新发布已提交定义,不能与规则修改或候选校验混用。 */
|
|
240
|
+
refreshOnly?: boolean;
|
|
241
|
+
}
|
|
242
|
+
interface RuleEditorMeta {
|
|
243
|
+
predicates: Array<{
|
|
244
|
+
kind: string;
|
|
245
|
+
example: Record<string, unknown>;
|
|
246
|
+
}>;
|
|
247
|
+
composites: string[];
|
|
248
|
+
actions: Array<{
|
|
249
|
+
kind: string;
|
|
250
|
+
example: Record<string, unknown>;
|
|
251
|
+
channel: string;
|
|
252
|
+
phase: string;
|
|
253
|
+
supportsWhen: boolean;
|
|
254
|
+
lifecycle?: 'event' | 'registration';
|
|
255
|
+
}>;
|
|
256
|
+
waterfallPositions: string[];
|
|
257
|
+
}
|
|
258
|
+
interface RulesSnapshot {
|
|
259
|
+
rules: RuleDefinition[];
|
|
260
|
+
revisions: RuleRevisions;
|
|
261
|
+
/** 仅旧客户端兼容输入,不是规范响应的版本来源。 */
|
|
262
|
+
revision?: string;
|
|
263
|
+
meta: RuleEditorMeta;
|
|
264
|
+
persisted?: boolean;
|
|
265
|
+
publicationPending?: boolean;
|
|
266
|
+
publicationError?: string;
|
|
267
|
+
}
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region src/shared/module-config-order.d.ts
|
|
270
|
+
/** 配置卡身份与排序快照;序号归模块定义,正文不进入排序载荷。 */
|
|
271
|
+
interface ModuleConfigIdentity {
|
|
272
|
+
moduleId: string;
|
|
273
|
+
configId: string;
|
|
274
|
+
}
|
|
275
|
+
interface ModuleConfigOrderEntry extends ModuleConfigIdentity {
|
|
276
|
+
name: string;
|
|
277
|
+
layer: string;
|
|
278
|
+
position: string;
|
|
279
|
+
sequence: number;
|
|
280
|
+
enabled: boolean;
|
|
281
|
+
audience?: 'main' | 'subagent' | null;
|
|
282
|
+
strategy?: string;
|
|
283
|
+
/** 官方文本层的定位档位;其他层不使用。 */
|
|
284
|
+
order?: number;
|
|
285
|
+
}
|
|
286
|
+
interface ModuleConfigOrderSnapshot {
|
|
287
|
+
revision: string;
|
|
288
|
+
entries: ModuleConfigOrderEntry[];
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
125
291
|
//#region src/shared/asset-transfer.d.ts
|
|
126
292
|
/** 资产传输使用显式编码;省略编码仅兼容旧文本请求。 */
|
|
127
293
|
interface AssetFile {
|
|
@@ -157,14 +323,14 @@ interface AssetImportRequest extends ImportChoices {
|
|
|
157
323
|
expectedSourceDigest?: string;
|
|
158
324
|
expectedPreviewRevision?: string;
|
|
159
325
|
}
|
|
160
|
-
interface
|
|
326
|
+
interface ModuleExportRequest {
|
|
161
327
|
id: string;
|
|
162
328
|
mode?: 'definition' | 'zip';
|
|
163
329
|
preview?: boolean;
|
|
164
330
|
expectedRevision?: string;
|
|
165
331
|
memoryChoices?: Record<string, 'include' | 'exclude'>;
|
|
166
332
|
}
|
|
167
|
-
interface
|
|
333
|
+
interface ModuleExportResult {
|
|
168
334
|
id: string;
|
|
169
335
|
name: string;
|
|
170
336
|
content: string;
|
|
@@ -184,73 +350,6 @@ interface PresetExportResult {
|
|
|
184
350
|
excludedMemoryCount?: number;
|
|
185
351
|
}
|
|
186
352
|
//#endregion
|
|
187
|
-
//#region src/shared/engine-capabilities.d.ts
|
|
188
|
-
type ModuleSourceMode = 'explicit' | 'composition' | 'official' | 'unknown';
|
|
189
|
-
/** 官方九个注入层:与 engine/schema.mjs 的 LAYER_ORDER 同源,改一处必须同步另一处。 */
|
|
190
|
-
type EngineLayer = 'pre-step' | 'system-section' | 'runtime-context' | 'agent-request' | 'llm-stream' | 'tool-pipeline' | 'turn-stop' | 'subagent-start' | 'subagent-end';
|
|
191
|
-
interface PresetModuleFacts {
|
|
192
|
-
declaredModules: string[] | null;
|
|
193
|
-
effectiveModules: string[] | null;
|
|
194
|
-
rowIds: string[];
|
|
195
|
-
sourceMode: ModuleSourceMode;
|
|
196
|
-
editable: boolean;
|
|
197
|
-
effectiveConfigs?: Record<string, Record<string, unknown>>;
|
|
198
|
-
}
|
|
199
|
-
interface EngineCapability {
|
|
200
|
-
id: string;
|
|
201
|
-
moduleKeys: readonly string[];
|
|
202
|
-
rowIds: readonly string[];
|
|
203
|
-
displayLayer: EngineLayer;
|
|
204
|
-
/** 真实跨层影响的相关层(只在确有第二通道时登记,避免把归属铺满九层)。 */
|
|
205
|
-
relatedLayers?: readonly EngineLayer[];
|
|
206
|
-
/**
|
|
207
|
-
* 该能力拥有的 preset 顶层数据段(不是行级 config)。
|
|
208
|
-
* 创建时若段缺失则写入 `skeleton`(保证"模块在 ⇒ 数据在");删除时一并移除该段。
|
|
209
|
-
*/
|
|
210
|
-
ownSection?: {
|
|
211
|
-
/** preset.yml 顶层键名。 */
|
|
212
|
-
key: string;
|
|
213
|
-
/** 启用时写入的可用骨架(必须能通过该段的校验)。 */
|
|
214
|
-
skeleton: Readonly<Record<string, unknown>>;
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
/** 首期只登记已有 typed editor 的能力,避免万能 key/value 表单。 */
|
|
218
|
-
declare const ENGINE_CAPABILITIES: readonly EngineCapability[];
|
|
219
|
-
/**
|
|
220
|
-
* 编辑组 = 前端一张可编辑卡(能力卡或专用卡)的主归属层。
|
|
221
|
-
* id 必须是代码里真实存在的 card / 展开键名,不新增臆造 id。
|
|
222
|
-
*/
|
|
223
|
-
interface EngineEditorGroup {
|
|
224
|
-
id: string;
|
|
225
|
-
displayLayer: EngineLayer;
|
|
226
|
-
/** 真实跨层影响的相关层(只有确有第二通道时才写)。 */
|
|
227
|
-
relatedLayers?: readonly EngineLayer[];
|
|
228
|
-
/** 真实生效通道的只读说明键(如 'agent-request' / 'system-section'):供 UI 显示「实际生效通道」,
|
|
229
|
-
* 只写代码里可核对的事实,不承诺未验证的通道。 */
|
|
230
|
-
hook: string;
|
|
231
|
-
}
|
|
232
|
-
interface EngineRecipe {
|
|
233
|
-
id: string;
|
|
234
|
-
capabilities: readonly string[];
|
|
235
|
-
initialParams?: Readonly<Record<string, unknown>>;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* 只保留已有真实工作流的一键组合;recipe 本身不写入 preset.yml。
|
|
239
|
-
*
|
|
240
|
-
* B7 T3 清空:三条 recipe 的成员都是随本轮退场的专用能力(phase-control /
|
|
241
|
-
* phase-control-ptc / deliberation),没有任何一条还能组成合法能力集合。
|
|
242
|
-
* export 与 `engineRecipe()` 保留——调用点(创建菜单、bridge 校验)不必跟着改,
|
|
243
|
-
* 空表天然让组合项整个消失。
|
|
244
|
-
*/
|
|
245
|
-
declare const ENGINE_RECIPES: readonly EngineRecipe[];
|
|
246
|
-
declare function engineCapability(id: string): EngineCapability | undefined;
|
|
247
|
-
declare function engineRecipe(id: string): EngineRecipe | undefined;
|
|
248
|
-
/** 显式模块预设中的实际能力;包含当前参数与顶层策略所需的装配。
|
|
249
|
-
* 创建补声明由 host 单独检查 declaredModules;官方组合行不伪装成可编辑能力。 */
|
|
250
|
-
declare function isEngineCapabilityPresent(id: string, facts: PresetModuleFacts | undefined): boolean;
|
|
251
|
-
/** custom tool 的运行时名称缺省回落 id;保存前拒绝会导致同层注册失败的重复项。 */
|
|
252
|
-
declare function validateCustomToolIdentities(tools: readonly unknown[]): string[];
|
|
253
|
-
//#endregion
|
|
254
353
|
//#region src/shared/managed-config-fields.d.ts
|
|
255
354
|
interface ConfigFieldSources {
|
|
256
355
|
configId: string;
|
|
@@ -363,7 +462,6 @@ declare const BRIDGE_ENDPOINTS: {
|
|
|
363
462
|
readonly models: "/models";
|
|
364
463
|
readonly modelReasoning: "/model-reasoning";
|
|
365
464
|
readonly mutate: "/mutate";
|
|
366
|
-
readonly configsValidate: "/configs-validate";
|
|
367
465
|
readonly skillsList: "/skills-list";
|
|
368
466
|
readonly skillPolicy: "/skill-policy";
|
|
369
467
|
readonly skillRead: "/skill-read";
|
|
@@ -377,31 +475,32 @@ declare const BRIDGE_ENDPOINTS: {
|
|
|
377
475
|
readonly promptConfigs: "/prompt-configs";
|
|
378
476
|
readonly agentsFile: "/agents-file";
|
|
379
477
|
readonly instructionsPolicy: "/instructions-policy";
|
|
380
|
-
readonly
|
|
478
|
+
readonly moduleContent: "/module-content";
|
|
381
479
|
readonly importPreset: "/import-preset";
|
|
382
480
|
readonly paramOverrides: "/param-overrides";
|
|
383
481
|
readonly triggers: "/triggers";
|
|
482
|
+
readonly rules: "/rules";
|
|
384
483
|
readonly persona: "/persona";
|
|
385
|
-
readonly
|
|
484
|
+
readonly moduleVariables: "/module-variables";
|
|
386
485
|
readonly customTools: "/custom-tools";
|
|
387
|
-
readonly
|
|
486
|
+
readonly importModulePackage: "/import-module-package";
|
|
388
487
|
readonly assetUpload: "/asset-upload";
|
|
389
488
|
readonly assetRelease: "/asset-release";
|
|
390
|
-
readonly
|
|
391
|
-
readonly
|
|
392
|
-
readonly
|
|
393
|
-
readonly
|
|
394
|
-
readonly
|
|
489
|
+
readonly exportModule: "/export-module";
|
|
490
|
+
readonly moduleDelete: "/module-delete";
|
|
491
|
+
readonly moduleClone: "/module-clone";
|
|
492
|
+
readonly moduleDuplicate: "/module-duplicate";
|
|
493
|
+
readonly moduleOpen: "/module-open";
|
|
494
|
+
readonly moduleEnable: "/module-enable";
|
|
495
|
+
readonly moduleConfigOrder: "/module-config-order";
|
|
395
496
|
readonly charactersImport: "/characters-import";
|
|
396
497
|
readonly charactersImportStream: "/characters-import-stream";
|
|
397
|
-
readonly
|
|
398
|
-
readonly
|
|
399
|
-
readonly charactersApply: "/characters-apply";
|
|
400
|
-
readonly charactersRemove: "/characters-remove";
|
|
498
|
+
readonly moduleMerge: "/module-merge";
|
|
499
|
+
readonly moduleUnmerge: "/module-unmerge";
|
|
401
500
|
readonly subagentToolPolicy: "/subagent-tool-policy";
|
|
402
501
|
readonly subagentToolPolicyPreview: "/subagent-tool-policy-preview";
|
|
403
502
|
readonly toolSurface: "/tool-surface";
|
|
404
|
-
readonly
|
|
503
|
+
readonly moduleCapability: "/module-capability";
|
|
405
504
|
readonly worldBookDiagnostics: "/world-book-diagnostics";
|
|
406
505
|
};
|
|
407
506
|
type BridgeEndpoint = (typeof BRIDGE_ENDPOINTS)[keyof typeof BRIDGE_ENDPOINTS];
|
|
@@ -412,6 +511,18 @@ type BridgeErrorPayload = {
|
|
|
412
511
|
message?: string;
|
|
413
512
|
conflicts?: string[];
|
|
414
513
|
};
|
|
514
|
+
/** 插件可编辑模块的身份与展示元数据;不可渲染的项保留身份供用户修复。 */
|
|
515
|
+
interface ModuleSummary {
|
|
516
|
+
id: string;
|
|
517
|
+
name: string;
|
|
518
|
+
user?: boolean;
|
|
519
|
+
renderable?: boolean;
|
|
520
|
+
description?: string;
|
|
521
|
+
meta?: Record<string, unknown>;
|
|
522
|
+
broken?: string;
|
|
523
|
+
/** 是否在存储根 `config.yml` 的启用表里(启用即参与运行时装配)。 */
|
|
524
|
+
enabled?: boolean;
|
|
525
|
+
}
|
|
415
526
|
/**
|
|
416
527
|
* 端点级请求体契约(body 形状;无请求体端点 = undefined)。
|
|
417
528
|
* 与 BRIDGE_ENDPOINTS 一一对应:新增端点必须同时补请求/响应映射,否则编译期断言失败。
|
|
@@ -436,10 +547,6 @@ interface BridgeRequestMap {
|
|
|
436
547
|
ops: unknown[];
|
|
437
548
|
expectedRevision?: number;
|
|
438
549
|
};
|
|
439
|
-
configsValidate: {
|
|
440
|
-
promptConfigs: unknown[];
|
|
441
|
-
strategyDir?: string;
|
|
442
|
-
};
|
|
443
550
|
/** 技能清单:按会话工作区扫描官方六类技能根,调用策略取自各技能文件的 frontmatter。 */
|
|
444
551
|
skillsList: {
|
|
445
552
|
sessionId?: string;
|
|
@@ -513,46 +620,50 @@ interface BridgeRequestMap {
|
|
|
513
620
|
* 指令文件卡策略(独立存储,默认禁用):省略 `policy` = 读取;
|
|
514
621
|
* 写入必须带读取时的 `expectedRevision`(文件缺失为 null)。
|
|
515
622
|
*/
|
|
623
|
+
/** 逐文件启停/名称;无 policy 时读取,写入仍校验原始字节版本。 */
|
|
516
624
|
instructionsPolicy: {
|
|
517
625
|
policy?: InstructionPolicyPatch;
|
|
518
626
|
expectedRevision?: string | null;
|
|
519
627
|
} | undefined;
|
|
520
|
-
|
|
628
|
+
moduleContent: undefined;
|
|
521
629
|
importPreset: {
|
|
522
630
|
contents: Array<{
|
|
523
631
|
scope: 'preset' | 'agents';
|
|
524
632
|
content: string;
|
|
525
633
|
}>;
|
|
526
|
-
|
|
634
|
+
expectedModuleId?: string;
|
|
527
635
|
};
|
|
528
636
|
paramOverrides: {
|
|
529
637
|
overrides?: Record<string, unknown>;
|
|
530
638
|
promptConfigs?: unknown[];
|
|
531
639
|
rebuild?: boolean;
|
|
532
|
-
|
|
640
|
+
expectedModuleId?: string;
|
|
533
641
|
};
|
|
534
642
|
triggers: {
|
|
535
|
-
|
|
643
|
+
expectedModuleId: string;
|
|
536
644
|
triggers?: unknown[];
|
|
537
645
|
expectedRevision?: string;
|
|
538
646
|
validateOnly?: boolean;
|
|
539
647
|
};
|
|
648
|
+
rules: RulesRequest;
|
|
540
649
|
/** 顶层 persona 段读写(官方 @deepseek-ai/dsh-persona 行 config 同构);省略 persona 键 = 读取。 */
|
|
541
650
|
persona: {
|
|
542
651
|
persona?: PersonaSpec | null;
|
|
543
|
-
|
|
652
|
+
expectedModuleId?: string;
|
|
544
653
|
} | undefined;
|
|
545
|
-
|
|
654
|
+
moduleVariables: {
|
|
546
655
|
variables?: Record<string, string>;
|
|
547
656
|
enabled?: boolean;
|
|
548
|
-
|
|
657
|
+
expectedModuleId?: string;
|
|
658
|
+
expectedRevisions?: Partial<RuleRevisions>;
|
|
659
|
+
refreshOnly?: boolean;
|
|
549
660
|
};
|
|
550
661
|
customTools: {
|
|
551
662
|
customTools?: unknown[];
|
|
552
|
-
|
|
663
|
+
expectedModuleId?: string;
|
|
553
664
|
} | undefined;
|
|
554
665
|
/**
|
|
555
|
-
*
|
|
666
|
+
* 模块包导入(原生/ST/PNG/ZIP)。`preview: true` 只转换并返回报告,不写目标;
|
|
556
667
|
* 提交必须携带 expectedSourceDigest 和 expectedPreviewRevision,服务端重算并拒绝过期预览。
|
|
557
668
|
* `expectedPreviewRevision` 是预览返回的版本凭据:绑定文件、实际选组、转换器版本与
|
|
558
669
|
* 目标身份(含目标当前内容),服务端提交时重算,不符返回 409 且零写盘。
|
|
@@ -560,41 +671,48 @@ interface BridgeRequestMap {
|
|
|
560
671
|
* (`state: 'needs-order-selection'`),提交时仍无法明确对应则拒绝。
|
|
561
672
|
* 上述参数只接受声明的类型,其它类型一律 400(见 docs/SillyTavern.md)。
|
|
562
673
|
*/
|
|
563
|
-
|
|
674
|
+
importModulePackage: AssetImportRequest;
|
|
564
675
|
assetUpload: undefined;
|
|
565
676
|
assetRelease: {
|
|
566
677
|
sourceId: string;
|
|
567
678
|
};
|
|
568
|
-
|
|
569
|
-
|
|
679
|
+
exportModule: ModuleExportRequest;
|
|
680
|
+
moduleDelete: {
|
|
570
681
|
id: string;
|
|
571
682
|
};
|
|
572
|
-
|
|
683
|
+
moduleClone: {
|
|
573
684
|
id: string;
|
|
574
685
|
autoSuffix?: boolean;
|
|
575
686
|
};
|
|
576
|
-
|
|
687
|
+
moduleDuplicate: {
|
|
577
688
|
id: string;
|
|
578
689
|
};
|
|
579
|
-
|
|
690
|
+
moduleOpen: {
|
|
580
691
|
id: string;
|
|
581
692
|
};
|
|
582
|
-
|
|
583
|
-
charactersImport: AssetImportRequest;
|
|
584
|
-
charactersImportStream: undefined;
|
|
585
|
-
charactersList: undefined;
|
|
586
|
-
charactersDelete: {
|
|
693
|
+
moduleEnable: {
|
|
587
694
|
id: string;
|
|
695
|
+
enabled: boolean;
|
|
588
696
|
};
|
|
589
|
-
|
|
697
|
+
moduleConfigOrder: {
|
|
698
|
+
moduleId: string;
|
|
699
|
+
} | {
|
|
700
|
+
moduleId?: string;
|
|
701
|
+
entries: ModuleConfigIdentity[];
|
|
702
|
+
expectedRevision: string;
|
|
703
|
+
} | undefined;
|
|
704
|
+
/** 角色卡来源导入为普通模块;预览只读,提交与模块安装共用版本边界。 */
|
|
705
|
+
charactersImport: AssetImportRequest;
|
|
706
|
+
charactersImportStream: undefined;
|
|
707
|
+
moduleMerge: {
|
|
590
708
|
id: string;
|
|
591
709
|
};
|
|
592
|
-
|
|
710
|
+
moduleUnmerge: {
|
|
593
711
|
id: string;
|
|
594
712
|
};
|
|
595
713
|
subagentToolPolicy: {
|
|
596
714
|
policy?: unknown;
|
|
597
|
-
|
|
715
|
+
expectedModuleId?: string;
|
|
598
716
|
} | undefined;
|
|
599
717
|
subagentToolPolicyPreview: {
|
|
600
718
|
tool?: string;
|
|
@@ -613,14 +731,14 @@ interface BridgeRequestMap {
|
|
|
613
731
|
presetId: string;
|
|
614
732
|
sessionId?: never;
|
|
615
733
|
};
|
|
616
|
-
|
|
734
|
+
moduleCapability: ({
|
|
617
735
|
action: 'create' | 'remove';
|
|
618
736
|
capabilityId: string;
|
|
619
737
|
} | {
|
|
620
738
|
action: 'create-recipe';
|
|
621
739
|
recipeId: string;
|
|
622
740
|
}) & {
|
|
623
|
-
|
|
741
|
+
expectedModuleId?: string;
|
|
624
742
|
};
|
|
625
743
|
/** 只读世界书诊断:只回当前授权会话最近一次选择的观测记录。 */
|
|
626
744
|
worldBookDiagnostics: {
|
|
@@ -780,6 +898,8 @@ interface EngineMetaLayerContract {
|
|
|
780
898
|
/** 物化配置的只读来源;与配置一同读回,不能作为写入字段或授权。 */
|
|
781
899
|
interface PromptConfigSourceView {
|
|
782
900
|
fieldSources?: ConfigFieldSources;
|
|
901
|
+
/** 只读排序投影;不能作为客户端提供的写盘序号。 */
|
|
902
|
+
sequence?: number;
|
|
783
903
|
}
|
|
784
904
|
/** 端点级响应 value 契约(value 字段形状;扩展字段仍以 value 旁可选字段出现)。 */
|
|
785
905
|
interface BridgeValueMap {
|
|
@@ -801,16 +921,6 @@ interface BridgeValueMap {
|
|
|
801
921
|
reasoning: ModelReasoningView;
|
|
802
922
|
};
|
|
803
923
|
mutate: BridgeSettingsView;
|
|
804
|
-
configsValidate: {
|
|
805
|
-
valid: boolean;
|
|
806
|
-
errors: Array<{
|
|
807
|
-
index: number;
|
|
808
|
-
id: string;
|
|
809
|
-
message: string;
|
|
810
|
-
}>;
|
|
811
|
-
configs?: unknown[];
|
|
812
|
-
files?: unknown[];
|
|
813
|
-
};
|
|
814
924
|
/** 技能清单 + 引用目录 + 技能根(客户端据此渲染来源分组与调用策略)。 */
|
|
815
925
|
skillsList: SkillsCatalogSnapshot & {
|
|
816
926
|
folders: string[];
|
|
@@ -857,11 +967,11 @@ interface BridgeValueMap {
|
|
|
857
967
|
exists: boolean;
|
|
858
968
|
error?: string;
|
|
859
969
|
};
|
|
860
|
-
|
|
970
|
+
moduleContent: Record<string, unknown>;
|
|
861
971
|
importPreset: {
|
|
862
972
|
scopes: Array<'preset' | 'agents'>;
|
|
863
973
|
};
|
|
864
|
-
/**
|
|
974
|
+
/** 参数/提示词配置只保存当前模块,不同步宿主全局默认模型。 */
|
|
865
975
|
paramOverrides: {
|
|
866
976
|
overrides?: Record<string, unknown>;
|
|
867
977
|
promptConfigs?: unknown[];
|
|
@@ -871,17 +981,22 @@ interface BridgeValueMap {
|
|
|
871
981
|
revision: string;
|
|
872
982
|
meta: TriggerEditorMeta;
|
|
873
983
|
};
|
|
984
|
+
rules: RulesSnapshot;
|
|
874
985
|
persona: {
|
|
875
986
|
persona: PersonaSpec | null;
|
|
876
987
|
};
|
|
877
|
-
|
|
988
|
+
moduleVariables: {
|
|
878
989
|
variables: Record<string, string>;
|
|
879
990
|
enabled: boolean;
|
|
991
|
+
revisions: RuleRevisions;
|
|
992
|
+
persisted?: boolean;
|
|
993
|
+
publicationPending?: boolean;
|
|
994
|
+
publicationError?: string;
|
|
880
995
|
};
|
|
881
996
|
customTools: {
|
|
882
997
|
customTools?: unknown[];
|
|
883
998
|
};
|
|
884
|
-
|
|
999
|
+
importModulePackage: {
|
|
885
1000
|
id?: string;
|
|
886
1001
|
backupPath?: string;
|
|
887
1002
|
preview?: boolean;
|
|
@@ -894,7 +1009,6 @@ interface BridgeValueMap {
|
|
|
894
1009
|
report?: StConversionReport;
|
|
895
1010
|
summary?: AssetSummary;
|
|
896
1011
|
kinds?: ImportKind[];
|
|
897
|
-
refreshWarning?: string;
|
|
898
1012
|
};
|
|
899
1013
|
assetUpload: {
|
|
900
1014
|
sourceId: string;
|
|
@@ -904,19 +1018,23 @@ interface BridgeValueMap {
|
|
|
904
1018
|
assetRelease: {
|
|
905
1019
|
released: boolean;
|
|
906
1020
|
};
|
|
907
|
-
|
|
908
|
-
|
|
1021
|
+
exportModule: ModuleExportResult;
|
|
1022
|
+
moduleDelete: {
|
|
909
1023
|
id: string;
|
|
910
1024
|
};
|
|
911
|
-
|
|
1025
|
+
moduleClone: {
|
|
912
1026
|
id: string;
|
|
913
1027
|
};
|
|
914
|
-
|
|
1028
|
+
moduleDuplicate: {
|
|
915
1029
|
id: string;
|
|
916
1030
|
};
|
|
917
|
-
|
|
1031
|
+
moduleOpen: {
|
|
918
1032
|
path: string;
|
|
919
1033
|
};
|
|
1034
|
+
moduleEnable: {
|
|
1035
|
+
enabled: string[];
|
|
1036
|
+
};
|
|
1037
|
+
moduleConfigOrder: ModuleConfigOrderSnapshot;
|
|
920
1038
|
charactersImport: {
|
|
921
1039
|
id?: string;
|
|
922
1040
|
name?: string;
|
|
@@ -933,23 +1051,11 @@ interface BridgeValueMap {
|
|
|
933
1051
|
id: string;
|
|
934
1052
|
name: string;
|
|
935
1053
|
};
|
|
936
|
-
|
|
937
|
-
characters: Array<{
|
|
938
|
-
id: string;
|
|
939
|
-
name: string;
|
|
940
|
-
description?: string;
|
|
941
|
-
hasAvatar: boolean;
|
|
942
|
-
imported: boolean;
|
|
943
|
-
}>;
|
|
944
|
-
};
|
|
945
|
-
charactersDelete: {
|
|
946
|
-
id: string;
|
|
947
|
-
};
|
|
948
|
-
charactersApply: {
|
|
1054
|
+
moduleMerge: {
|
|
949
1055
|
id: string;
|
|
950
1056
|
count: number;
|
|
951
1057
|
};
|
|
952
|
-
|
|
1058
|
+
moduleUnmerge: {
|
|
953
1059
|
id: string;
|
|
954
1060
|
count: number;
|
|
955
1061
|
};
|
|
@@ -971,7 +1077,7 @@ interface BridgeValueMap {
|
|
|
971
1077
|
description: string;
|
|
972
1078
|
}>;
|
|
973
1079
|
};
|
|
974
|
-
|
|
1080
|
+
moduleCapability: {
|
|
975
1081
|
changed: boolean;
|
|
976
1082
|
addedModules?: string[];
|
|
977
1083
|
removedModules?: string[];
|
|
@@ -986,8 +1092,31 @@ interface BridgeValueMap {
|
|
|
986
1092
|
};
|
|
987
1093
|
}
|
|
988
1094
|
//#endregion
|
|
1095
|
+
//#region src/host/module-storage.d.ts
|
|
1096
|
+
interface ModuleDefinitionSnapshot {
|
|
1097
|
+
dir: string;
|
|
1098
|
+
file: string;
|
|
1099
|
+
text: string;
|
|
1100
|
+
doc: ReturnType<typeof parseDocument>;
|
|
1101
|
+
source: Record<string, unknown>;
|
|
1102
|
+
revision: string;
|
|
1103
|
+
revisions: RuleRevisions;
|
|
1104
|
+
rules: RuleDefinition[];
|
|
1105
|
+
configOrder: Record<string, number>;
|
|
1106
|
+
variables: Record<string, string>;
|
|
1107
|
+
variablesEnabled: boolean;
|
|
1108
|
+
}
|
|
1109
|
+
declare function withModuleDefinition$1(directory: string, mutate: (doc: ReturnType<typeof parseDocument>, source: Record<string, unknown>) => void): ModuleDefinitionSnapshot;
|
|
1110
|
+
//#endregion
|
|
989
1111
|
//#region src/host/manifest.d.ts
|
|
990
|
-
|
|
1112
|
+
/**
|
|
1113
|
+
* 模块目录确实存在于本插件存储根(身份判定与官方登记状态无关)。
|
|
1114
|
+
*
|
|
1115
|
+
* 启用表过滤、工具写入目标、TUI 目标共用这一条判据:本插件管理的模块 = 存储根里含
|
|
1116
|
+
* `module.yml` 的目录,与「宿主有没有把它登记成官方预设」是两回事。
|
|
1117
|
+
*/
|
|
1118
|
+
declare function moduleDirExists(root: string, id: string): boolean;
|
|
1119
|
+
interface ModuleSpec {
|
|
991
1120
|
id: string;
|
|
992
1121
|
name: string;
|
|
993
1122
|
/** 官方预设列表顺序;省略时由宿主排序。 */
|
|
@@ -1011,42 +1140,42 @@ interface PresetSpec {
|
|
|
1011
1140
|
layerSettings?: Record<string, Record<string, unknown>>;
|
|
1012
1141
|
/** 顶层人设段(官方 @deepseek-ai/dsh-persona 行同构):prefix/suffix/complete/includeRuntimeContext。 */
|
|
1013
1142
|
persona?: PersonaSpec;
|
|
1014
|
-
/**
|
|
1143
|
+
/** 模块级模板变量({{key}} 插值源;与 layerSettings 分离,顶层 variables 段)。 */
|
|
1015
1144
|
variables?: Record<string, string>;
|
|
1016
1145
|
/** 自定义工具定义(tool-config-engine 渲染进 custom-tools/ 后运行时注册)。 */
|
|
1017
1146
|
customTools?: unknown[];
|
|
1018
1147
|
/** 子代理实例级工具策略(subagentToolPolicy 顶层领域段;缺省 = 官方 delegation 行为)。 */
|
|
1019
1148
|
subagentToolPolicy?: Record<string, unknown>;
|
|
1020
|
-
/**
|
|
1021
|
-
* 触发器声明(`triggers` 顶层段):`{ id, channel, when?, do, … }` 的数组。
|
|
1022
|
-
* 声明**由预设提供**(引擎不带默认),物化为 `triggers.yml` 后由 `declared-triggers`
|
|
1023
|
-
* 运行时模块读入并注册;形状与校验归 `engine/trigger-spec.mjs` 的声明编译器。
|
|
1024
|
-
*/
|
|
1149
|
+
/** @deprecated 仅标记旧导入形状;loadModuleSpec 拒绝,须先离线迁移。 */
|
|
1025
1150
|
triggers?: unknown[];
|
|
1026
1151
|
/** 模板变量插值开关(缺省 true = 启用;false = 停用,writePreset 不生成变量文件)。 */
|
|
1027
1152
|
variablesEnabled?: boolean;
|
|
1028
|
-
/**
|
|
1153
|
+
/** @deprecated 仅标记旧导入形状;loadModuleSpec 拒绝,须先离线迁移。 */
|
|
1029
1154
|
promptConfigs?: unknown[];
|
|
1155
|
+
/** 配置卡的持久文件序号;跨模块UI排序只改此轻量元数据。 */
|
|
1156
|
+
configOrder?: Record<string, number>;
|
|
1157
|
+
/** 模块唯一的条件→动作定义;旧源只供离线迁移器读取。 */
|
|
1158
|
+
rules?: RuleDefinition[];
|
|
1030
1159
|
/** 可选:引擎组合模块行参数直写(行级 map config 浅合并;参数桥未覆盖的键生效,参数桥优先)。 */
|
|
1031
1160
|
moduleConfigs?: Record<string, Record<string, unknown>>;
|
|
1032
1161
|
upstream?: Record<string, unknown>;
|
|
1033
1162
|
}
|
|
1034
1163
|
/**
|
|
1035
|
-
*
|
|
1164
|
+
* 从模块 module.yml 的 modules 清单移除一个模块 id(YAML Document 保留注释
|
|
1036
1165
|
* 与其余字段)。返回是否发生修改;文件缺失或没有该模块时返回 false。
|
|
1037
1166
|
*/
|
|
1038
|
-
declare function
|
|
1039
|
-
/**
|
|
1040
|
-
declare function
|
|
1041
|
-
/**
|
|
1042
|
-
declare function
|
|
1167
|
+
declare function removeModuleCapabilityDeclaration(dir: string, moduleId: string): boolean;
|
|
1168
|
+
/** 加载某个模块模板的单一参数文件 modules/<name>/module.yml。 */
|
|
1169
|
+
declare function loadModuleSpec(dir: string): ModuleSpec;
|
|
1170
|
+
/** 模块根:本插件的存储根(~/.dsh/.prompt-tool),导入/新建/种子化的模块都放这里。 */
|
|
1171
|
+
declare function userModulesDir(): string;
|
|
1043
1172
|
/**
|
|
1044
|
-
*
|
|
1045
|
-
* 目录名与声明的
|
|
1173
|
+
* 解析模块模板目录:当前模块根优先,包内模板回退;不读取其他部署根的同名模块。
|
|
1174
|
+
* 目录名与声明的 module.yml id 一致;不扫描其他目录的 id 别名。
|
|
1046
1175
|
*/
|
|
1047
|
-
declare function
|
|
1048
|
-
/**
|
|
1049
|
-
declare function
|
|
1176
|
+
declare function resolveModuleDir(template: string, moduleRoot?: string): string;
|
|
1177
|
+
/** 本插件模块清单;所有目录按同一身份与组合源规则列举。 */
|
|
1178
|
+
declare function listModules(moduleRoot?: string): Array<{
|
|
1050
1179
|
id: string;
|
|
1051
1180
|
name: string;
|
|
1052
1181
|
user: boolean;
|
|
@@ -1054,17 +1183,17 @@ declare function listPresets(presetRoot?: string): Array<{
|
|
|
1054
1183
|
description?: string;
|
|
1055
1184
|
meta?: Record<string, unknown>;
|
|
1056
1185
|
}>;
|
|
1057
|
-
/**
|
|
1186
|
+
/** 插件目录模板清单(「新建」选择器与首次种子化数据源;不直接出现在模块列表)。 */
|
|
1058
1187
|
declare function listBuiltinTemplates(): Array<{
|
|
1059
1188
|
id: string;
|
|
1060
1189
|
name: string;
|
|
1061
1190
|
}>;
|
|
1062
|
-
/**
|
|
1063
|
-
declare function
|
|
1191
|
+
/** 按包内同名目录补建缺失的内置模块;已有目录的定义、生成物和资源保持原样。 */
|
|
1192
|
+
declare function ensureModuleSeed(root?: string): {
|
|
1064
1193
|
created: string[];
|
|
1065
1194
|
};
|
|
1066
|
-
/**
|
|
1067
|
-
declare function
|
|
1195
|
+
/** 从包内同名目录复制模块;autoSuffix=true 时递增目录名并同步定义身份。 */
|
|
1196
|
+
declare function cloneBuiltinModule(id: string, autoSuffix?: boolean, moduleRoot?: string): {
|
|
1068
1197
|
ok: true;
|
|
1069
1198
|
id: string;
|
|
1070
1199
|
} | {
|
|
@@ -1072,27 +1201,33 @@ declare function cloneBuiltinPreset(id: string, autoSuffix?: boolean, presetRoot
|
|
|
1072
1201
|
message: string;
|
|
1073
1202
|
};
|
|
1074
1203
|
/**
|
|
1075
|
-
*
|
|
1076
|
-
* parseDocument 保留注释与未知键(
|
|
1204
|
+
* 保存部署能力参数与模板变量;规则写入只走 module-rules 的版本事务。
|
|
1205
|
+
* parseDocument 保留注释与未知键(module.yml 模板含大量注释);空值键删除('' / [],
|
|
1077
1206
|
* 回落模板/引擎默认;0 与 false 照常写入——语义与函数内注释、docs §3 一致)。
|
|
1078
1207
|
*/
|
|
1079
|
-
declare function
|
|
1208
|
+
declare function saveModuleParams(moduleRoot: string, templateName: string, params: Record<string, unknown> | undefined, promptConfigs: unknown[] | undefined, variables?: Record<string, string>, variablesEnabled?: boolean, expectedRevisions?: Partial<RuleRevisions>): void;
|
|
1080
1209
|
/**
|
|
1081
|
-
*
|
|
1210
|
+
* 保存激活模块的顶层 persona 段(官方 `@deepseek-ai/dsh-persona` 行 config 同构)。
|
|
1082
1211
|
* null = 删除该段(回落宿主部署人设);默认值不落键(见 personaRowConfig)。
|
|
1083
1212
|
*/
|
|
1084
|
-
declare function
|
|
1085
|
-
/**
|
|
1086
|
-
*
|
|
1087
|
-
*
|
|
1088
|
-
declare function
|
|
1213
|
+
declare function saveModulePersona(moduleRoot: string, templateName: string, persona: PersonaSpec | null): void;
|
|
1214
|
+
/** 模块文件读-改-写(parseDocument 保留注释与未知键;mutate 内 setIn/deleteIn)。
|
|
1215
|
+
* 角色卡库(characters)与世界书工具(world-book-tools)共用此入口,避免
|
|
1216
|
+
* 各自实现 parseDocument 往返。写盘走原子替换,失败保留旧文件。 */
|
|
1217
|
+
declare function withModuleDefinition(moduleDir: string, mutate: (doc: ReturnType<typeof parseDocument>, source: Record<string, unknown>) => void): ReturnType<typeof withModuleDefinition$1>;
|
|
1218
|
+
/** 向 module.yml 的 modules 追加功能模块;空数组保持按需装配语义。 */
|
|
1219
|
+
declare function appendModuleCapabilities(doc: ReturnType<typeof parseDocument>, additions: readonly string[]): void;
|
|
1220
|
+
/** 删除具有合法身份的模块目录(模块根/<id>);隐藏备份不经公共接口删除。
|
|
1221
|
+
* 仅作用于插件自有模块根,包内置模板不受影响;路径越界与非法 id 拒绝。
|
|
1222
|
+
* 模块不在宿主预设注册表里,删除后无需撤销官方登记;调用方按需重建当前模块。 */
|
|
1223
|
+
declare function removeUserModule(id: string, moduleRoot?: string): {
|
|
1089
1224
|
ok: true;
|
|
1090
1225
|
} | {
|
|
1091
1226
|
ok: false;
|
|
1092
1227
|
message: string;
|
|
1093
1228
|
};
|
|
1094
1229
|
/** 当前 layerSettings 与显式运行参数合并;不从旧磁盘 params 段回退取值。 */
|
|
1095
|
-
declare function
|
|
1230
|
+
declare function resolveModuleParams(spec: ModuleSpec, runtime: Record<string, unknown>): Record<string, unknown>;
|
|
1096
1231
|
/**
|
|
1097
1232
|
* 参数桥:params 扁平键 → 引擎模块行 config 对象(取代旧 __TOKEN__ 文本渲染)。
|
|
1098
1233
|
*
|
|
@@ -1110,44 +1245,44 @@ declare function buildModuleConfigsFromParams(params: Record<string, unknown>, o
|
|
|
1110
1245
|
* 行级 config 合并:仅支持 map 型 config 浅合并;
|
|
1111
1246
|
* 数组型 config(如 delegation 组)按子行 id 嵌套合并;未声明模块原样保留。
|
|
1112
1247
|
* 未声明 configs 时返回原文(零开销);parseDocument 往返保留注释。
|
|
1113
|
-
* 本函数是参数桥产物落位组合行的唯一机制(含 delegation 组子行嵌套)
|
|
1248
|
+
* 本函数是参数桥产物落位组合行的唯一机制(含 delegation 组子行嵌套),不是模块覆盖通道。
|
|
1114
1249
|
*/
|
|
1115
1250
|
declare function applyModuleConfigs(raw: string, configs: Record<string, Record<string, unknown>> | undefined): string;
|
|
1116
1251
|
/**
|
|
1117
|
-
*
|
|
1252
|
+
* 解析模块的模块事实,供 UI 卡片存在性和受控创建共用。
|
|
1118
1253
|
* 显式模块及当前参数/策略所需的装配是可编辑插件能力;官方组合 row 仅保留为运行事实。
|
|
1119
1254
|
*/
|
|
1120
|
-
declare function
|
|
1121
|
-
type
|
|
1255
|
+
declare function resolveModuleFacts(spec: ModuleSpec, templateDir?: string, editable?: boolean): ModuleFacts;
|
|
1256
|
+
type ModuleCapabilityCreateRequest = {
|
|
1122
1257
|
action: 'create';
|
|
1123
1258
|
capabilityId: string;
|
|
1124
1259
|
} | {
|
|
1125
1260
|
action: 'create-recipe';
|
|
1126
1261
|
recipeId: string;
|
|
1127
1262
|
};
|
|
1128
|
-
interface
|
|
1263
|
+
interface ModuleCapabilityCreateResult {
|
|
1129
1264
|
changed: boolean;
|
|
1130
1265
|
addedModules: string[];
|
|
1131
1266
|
capabilityIds: string[];
|
|
1132
1267
|
}
|
|
1133
|
-
interface
|
|
1268
|
+
interface ModuleCapabilityRemoveResult {
|
|
1134
1269
|
changed: boolean;
|
|
1135
1270
|
removedModules: string[];
|
|
1136
1271
|
capabilityIds: string[];
|
|
1137
1272
|
}
|
|
1138
|
-
/** 在内存候选文档中展开能力/recipe,校验成功后一次原子替换
|
|
1139
|
-
declare function
|
|
1273
|
+
/** 在内存候选文档中展开能力/recipe,校验成功后一次原子替换 module.yml。 */
|
|
1274
|
+
declare function createModuleCapability(moduleDir: string, request: ModuleCapabilityCreateRequest): ModuleCapabilityCreateResult;
|
|
1140
1275
|
/** 删除能力:模块声明、顶层数据段,以及该能力的**显式参数与行配置**一起移除。
|
|
1141
1276
|
* 参数在 ⇒ 装配在(见 impliedModulesFromParams):留下参数会让移除立刻被隐含装配拉回来,
|
|
1142
1277
|
* 所以"移除能力"必须是完整移除。未登记参数、其他能力的数据与未知字段一律不动。 */
|
|
1143
|
-
declare function
|
|
1278
|
+
declare function removeModuleCapability(moduleDir: string, capabilityId: string): ModuleCapabilityRemoveResult;
|
|
1144
1279
|
/**
|
|
1145
|
-
*
|
|
1280
|
+
* 模块组合渲染完整链路:模块装配 → 参数桥(moduleConfigs + params)行级合并。
|
|
1146
1281
|
* 合并优先级:参数桥(params/UI 基础层) > moduleConfigs(模板/ST 行级直写) > 行默认。
|
|
1147
1282
|
* moduleConfigs 仅补充参数桥未覆盖的行级 config(如 ST 导入的 tool-web.fetch),
|
|
1148
1283
|
* 不再锁定覆盖 UI 可管理参数(旧作者锁定语义已移除)。
|
|
1149
1284
|
*/
|
|
1150
|
-
declare function renderComposition(spec:
|
|
1285
|
+
declare function renderComposition(spec: ModuleSpec, runtime: Record<string, unknown>, templateDir?: string): string;
|
|
1151
1286
|
//#endregion
|
|
1152
1287
|
//#region src/host/sillytavern.d.ts
|
|
1153
1288
|
/** ST marker prompts(marker: true):content 不发送给模型(仅标记注入位置,ST
|
|
@@ -1156,8 +1291,19 @@ declare function renderComposition(spec: PresetSpec, runtime: Record<string, unk
|
|
|
1156
1291
|
* meta.stDroppedMarkers——防止设置 dump 与位置占位污染 promptConfigs 与注入。 */
|
|
1157
1292
|
/** 显式文本求值工具;导入本身仅 prepare,避免执行禁用卡的副作用。 */
|
|
1158
1293
|
declare function processStText(text: string, cardName: string, variables: Record<string, string | number>): string;
|
|
1294
|
+
/** 合并后的最终 id 映射:来源索引 → 该来源 promptConfigs 下标 → 合并后的配置 id。 */
|
|
1295
|
+
type MergeIdMap = Map<number, Map<number, string>>;
|
|
1296
|
+
/**
|
|
1297
|
+
* 合并多个转换结果为一个预设,并返回「来源 + 生成配置下标 → 最终 id」的同一份映射。
|
|
1298
|
+
*
|
|
1299
|
+
* 报告必须消费这份映射,而不是按后缀规则另行推测:后缀分配只发生在这里一次。
|
|
1300
|
+
*/
|
|
1301
|
+
declare function mergeStModulesWithReport(specs: ModuleSpec[]): {
|
|
1302
|
+
spec: ModuleSpec;
|
|
1303
|
+
idMap: MergeIdMap;
|
|
1304
|
+
};
|
|
1159
1305
|
/** 合并多个转换结果为一个预设(角色卡 × 响应预设 → 单预设)。 */
|
|
1160
|
-
declare function
|
|
1306
|
+
declare function mergeStModules(specs: ModuleSpec[]): ModuleSpec;
|
|
1161
1307
|
/** 转换选项:多 prompt_order 分组时显式选择来源角色,避免照搬「默认任取首组」。 */
|
|
1162
1308
|
interface StConversionOptions {
|
|
1163
1309
|
characterId?: string;
|
|
@@ -1167,19 +1313,27 @@ interface StOrderGroupSummary {
|
|
|
1167
1313
|
characterId: string;
|
|
1168
1314
|
entries: number;
|
|
1169
1315
|
}
|
|
1170
|
-
/** SillyTavern JSON 预设卡片 → 本项目
|
|
1171
|
-
declare function
|
|
1316
|
+
/** SillyTavern JSON 预设卡片 → 本项目 ModuleSpec(导入端点直接消费)。 */
|
|
1317
|
+
declare function convertStToModule(card: unknown, baseName: string, options?: StConversionOptions): ModuleSpec;
|
|
1318
|
+
/**
|
|
1319
|
+
* 同源转换 + 结构化报告:预览与实际提交共用这一个纯函数实现,
|
|
1320
|
+
* 报告只是派生元数据(不进 module.yml、不作写入凭证)。
|
|
1321
|
+
*/
|
|
1322
|
+
declare function convertStToModuleWithReport(card: unknown, baseName: string, options?: StConversionOptions): {
|
|
1323
|
+
spec: ModuleSpec;
|
|
1324
|
+
report: StConversionReport;
|
|
1325
|
+
};
|
|
1172
1326
|
/** ST 导入预设 id:必须是官方 agent-presets 可发现的目录名(PRESET_ID =
|
|
1173
1327
|
* /^[a-z0-9][a-z0-9-]*$/——含中文的目录会被宿主 discovery 静默跳过,会话
|
|
1174
1328
|
* resume 报 preset not found)。文件名 slug 化(去中文);纯中文名退化为
|
|
1175
1329
|
* st-<文件名短哈希>(唯一且合法);显示名 name 仍保留中文原名。 */
|
|
1176
|
-
declare function
|
|
1330
|
+
declare function stModuleId(baseName: string): string;
|
|
1177
1331
|
//#endregion
|
|
1178
1332
|
//#region src/host/import-source.d.ts
|
|
1179
1333
|
type PreparedImport = {
|
|
1180
1334
|
state: 'ready';
|
|
1181
1335
|
kind: ImportKind;
|
|
1182
|
-
spec:
|
|
1336
|
+
spec: ModuleSpec;
|
|
1183
1337
|
yaml: string;
|
|
1184
1338
|
files: AssetFile[];
|
|
1185
1339
|
sourceName: string;
|
|
@@ -1199,12 +1353,12 @@ type PreparedImport = {
|
|
|
1199
1353
|
/** 字节集合 → 同一规范化候选;没有目标写入和静默的未知 JSON 回退。 */
|
|
1200
1354
|
declare function prepareImport(input: AssetFile[], target: 'preset' | 'character', choices?: ImportChoices): PreparedImport;
|
|
1201
1355
|
//#endregion
|
|
1202
|
-
//#region src/host/
|
|
1203
|
-
declare function
|
|
1356
|
+
//#region src/host/module-package.d.ts
|
|
1357
|
+
declare function expandModuleSource(input: AssetFile[]): Promise<AssetFile[]>;
|
|
1204
1358
|
type ReadyImport = Extract<ReturnType<typeof prepareImport>, {
|
|
1205
1359
|
state: 'ready';
|
|
1206
1360
|
}>;
|
|
1207
|
-
declare function
|
|
1361
|
+
declare function moduleImportPreview(root: string, files: AssetFile[], request: AssetImportRequest): {
|
|
1208
1362
|
prepared: ReadyImport;
|
|
1209
1363
|
summary: AssetSummary;
|
|
1210
1364
|
sourceDigest: string;
|
|
@@ -1212,22 +1366,25 @@ declare function presetImportPreview(root: string, files: AssetFile[], request:
|
|
|
1212
1366
|
} | Exclude<ReturnType<typeof prepareImport>, {
|
|
1213
1367
|
state: 'ready';
|
|
1214
1368
|
}>;
|
|
1215
|
-
declare function
|
|
1369
|
+
declare function installModulePackage(root: string, files: AssetFile[], request: AssetImportRequest, options?: {
|
|
1370
|
+
preserveAssets?: boolean;
|
|
1371
|
+
}): Promise<{
|
|
1216
1372
|
id: string;
|
|
1217
1373
|
backupPath?: string;
|
|
1218
1374
|
}>;
|
|
1219
|
-
declare function
|
|
1375
|
+
declare function exportModulePackage(root: string, request: ModuleExportRequest): Promise<ModuleExportResult>;
|
|
1220
1376
|
//#endregion
|
|
1221
1377
|
//#region src/host/paths.d.ts
|
|
1222
1378
|
/** 用户技能根:官方 `user-dsh` 技能根,也是本插件创建、复制导入与回收站的落点。
|
|
1223
1379
|
* 插件不再内置任何技能:包内没有 skills 目录,也不再有安装副本与内容账本。 */
|
|
1224
1380
|
declare const USER_SKILLS_DIR: string;
|
|
1225
1381
|
/**
|
|
1226
|
-
*
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1382
|
+
* 存储根下的**模块根**:一个模块一个目录(`modules/<id>/`),定义与物化产物都在其内。
|
|
1383
|
+
*
|
|
1384
|
+
* 这是 `resolveModuleDir` / `assertModuleDirectory` / `listModules` 的扫描根,
|
|
1385
|
+
* 也是「本插件管理的模块」身份判定的基准。模块目录必须是它的**直接子目录**
|
|
1386
|
+
* (`assertModuleDirectory` 的一层深度契约由此成立)。
|
|
1230
1387
|
*/
|
|
1231
|
-
declare const
|
|
1388
|
+
declare const MODULES_DIR: string;
|
|
1232
1389
|
//#endregion
|
|
1233
|
-
export {
|
|
1390
|
+
export { SkillSourceKind as $, removeUserModule as A, BridgeEndpoint as B, ensureModuleSeed as C, moduleCapability as Ct, moduleDirExists as D, loadModuleSpec as E, saveModuleParams as F, MAX_CHARACTER_CARD_STREAM_BYTES as G, BridgeRequestMap as H, saveModulePersona as I, SkillCatalogEntry as J, ModuleSummary as K, userModulesDir as L, resolveModuleDir as M, resolveModuleFacts as N, removeModuleCapability as O, resolveModuleParams as P, SkillPolicyScope as Q, withModuleDefinition as R, createModuleCapability as S, isModuleCapabilityPresent as St, listModules as T, BridgeValueMap as U, BridgeErrorPayload as V, MAX_BRIDGE_BODY_BYTES as W, SkillInvocation as X, SkillContentSnapshot as Y, SkillPolicyChange as Z, ModuleSpec as _, MODULE_CAPABILITIES as _t, installModulePackage as a, ImportChoices as at, buildModuleConfigsFromParams as b, ModuleSourceMode as bt, convertStToModule as c, RuleDefinition as ct, mergeStModulesWithReport as d, InstructionFileSnapshot as dt, SkillsCatalogSnapshot as et, processStText as f, InstructionFileStatus as ft, ModuleCapabilityRemoveResult as g, InjectionPoint as gt, ModuleCapabilityCreateResult as h, INJECTION_POINT_ORDER as ht, exportModulePackage as i, AssetFile as it, renderComposition as j, removeModuleCapabilityDeclaration as k, convertStToModuleWithReport as l, INSTRUCTION_FILE_STATUSES as lt, ModuleCapabilityCreateRequest as m, ENGINE_RECIPES as mt, USER_SKILLS_DIR as n, invocationForScope as nt, moduleImportPreview as o, ModuleExportRequest as ot, stModuleId as p, MAX_INSTRUCTION_FILE_BYTES as pt, SETTINGS_BRIDGE_PREFIX as q, expandModuleSource as r, scopeOfInvocation as rt, StConversionOptions as s, ModuleExportResult as st, MODULES_DIR as t, SkillsState as tt, mergeStModules as u, InstructionContextView as ut, appendModuleCapabilities as v, ModuleCapability as vt, listBuiltinTemplates as w, validateCustomToolIdentities as wt, cloneBuiltinModule as x, engineRecipe as xt, applyModuleConfigs as y, ModuleFacts as yt, BRIDGE_ENDPOINTS as z };
|