dsh-agent-toolkit 0.1.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/LICENSE +21 -0
- package/README.md +88 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +55625 -0
- package/lib/client.js.map +1 -0
- package/lib/index.d.ts +71 -0
- package/lib/index.js +3151 -0
- package/lib/index.js.map +1 -0
- package/package.json +112 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import z from "@deepseek-ai/schemastery";
|
|
2
|
+
import { z as z$1 } from "zod";
|
|
3
|
+
import "@deepseek-ai/dsh-storage-domain";
|
|
4
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
5
|
+
//#region src/prompt/types.d.ts
|
|
6
|
+
/** prompt-stack 的配置类型(仅类型,无运行时代码)。 */
|
|
7
|
+
/** 一个语义层:name 同时是 section 名后缀(`prompt-stack:<name>`)。 */
|
|
8
|
+
interface LayerConfig {
|
|
9
|
+
name: string;
|
|
10
|
+
/** 拼接顺序,升序;建议区间见 spec:0 persona / 10–40 domain / 50 task。 */
|
|
11
|
+
order: number;
|
|
12
|
+
/** 层文本,支持 dsh 严格插值 `{{variable}}`。 */
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
/** 模型匹配条件:三字段均可选但至少一个;多字段为 AND 语义。 */
|
|
16
|
+
interface RuleMatch {
|
|
17
|
+
/** provider 精确匹配。 */
|
|
18
|
+
provider?: string;
|
|
19
|
+
/** 模型 id 精确匹配。 */
|
|
20
|
+
model?: string;
|
|
21
|
+
/** 模型 id glob(`*` / `?`),如 `deepseek-*`、`gpt*codex*`。 */
|
|
22
|
+
modelPattern?: string;
|
|
23
|
+
}
|
|
24
|
+
/** 一条模型规则:命中后按层覆盖文本,可选追加 model-notes。 */
|
|
25
|
+
interface Rule {
|
|
26
|
+
match: RuleMatch;
|
|
27
|
+
/** 层名 -> 替换文本。 */
|
|
28
|
+
overrides?: Record<string, string>;
|
|
29
|
+
/** 命中时渲染为固定追加层 `prompt-stack:model-notes`。 */
|
|
30
|
+
append?: string;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/bots/index.d.ts
|
|
34
|
+
/** project-bot Config 的 6 个全局可调参数(字段名不变;schemastery 定义与默认值源:archive/2026-08-26-merged-plugins/project-bot/src/index.ts:38-45,由 Task 15 平移进 suite Config)。 */
|
|
35
|
+
interface BotsModuleConfig {
|
|
36
|
+
/** 卡片流式更新节流间隔(毫秒)。 */
|
|
37
|
+
cardUpdateThrottleMs: number;
|
|
38
|
+
/** 单张卡片内容字节上限(飞书硬上限 30KB,留余量)。 */
|
|
39
|
+
cardMaxBytes: number;
|
|
40
|
+
/** 过程区(思考 + 工具调用)字节上限(截尾保留最近内容)。 */
|
|
41
|
+
processMaxBytes: number;
|
|
42
|
+
/** 扫码创建应用的轮询超时(毫秒)。 */
|
|
43
|
+
registerAppTimeoutMs: number;
|
|
44
|
+
/** 「处理中」表情回复的 emoji_type。 */
|
|
45
|
+
processingReactionEmoji: string;
|
|
46
|
+
/** 回传飞书的错误摘要最大字符数。 */
|
|
47
|
+
errorDetailMaxChars: number;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/index.d.ts
|
|
51
|
+
declare const name = "dsh-agent-toolkit";
|
|
52
|
+
declare const inject: string[];
|
|
53
|
+
/** 插件配置输出型。 */
|
|
54
|
+
interface Config {
|
|
55
|
+
modules: {
|
|
56
|
+
feishu: boolean;
|
|
57
|
+
usage: boolean;
|
|
58
|
+
};
|
|
59
|
+
layers: LayerConfig[];
|
|
60
|
+
rules: Rule[];
|
|
61
|
+
timezone: string;
|
|
62
|
+
provider: string;
|
|
63
|
+
toolName: string;
|
|
64
|
+
feishu: BotsModuleConfig;
|
|
65
|
+
}
|
|
66
|
+
/** layers/rules 的 schemastery schema 照归档 prompt-stack/src/index.ts:21-41 逐字段平移(含 overrides transform hack)。 */
|
|
67
|
+
declare const Config: z<unknown, Config>;
|
|
68
|
+
declare function apply(ctx: Context, config: Config): Promise<void>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { Config, apply, inject, name };
|
|
71
|
+
//# sourceMappingURL=index.d.ts.map
|