dsh-plugin-om 0.0.57 → 0.0.59
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 +8 -6
- package/dist/client/om-config-controller.d.ts +16 -16
- package/dist/client/om-config-controller.d.ts.map +1 -1
- package/dist/client.js +19 -19
- package/dist/client.js.map +1 -1
- package/dist/compress-loop.d.ts +9 -5
- package/dist/compress-loop.d.ts.map +1 -1
- package/dist/compress-tools.d.ts.map +1 -1
- package/dist/constants.d.ts +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.mjs +69 -24
- package/dist/skill/compaction-eval/scripts/compress.mjs +70 -25
- package/dist/skill/compaction-eval/scripts/prepare.mjs +8 -0
- package/dist/skill/compaction-eval/scripts/view.mjs +9 -2
- package/package.json +43 -43
package/README.md
CHANGED
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
- 最近真实用户消息、非空模型文本、`ask_user_question` 调用或进度提醒之后,开启 `progressReminderIdleEnabled` 且表层活动累计至少 `progressReminderIdleSteps`(默认 4)个已结束模型 step、工具调用超过 `progressReminderIdleToolCalls`(默认 10)次时重发,并要求立刻输出记录
|
|
14
14
|
- 完整消息定义写在 history 块顶注释和 recall 工具描述中
|
|
15
15
|
- 通过工具循环生成摘要,保留用户消息和未压缩内容;手动加载的 skill 计入完整消息,其余系统消息不占 index
|
|
16
|
+
- 压缩会话首条消息附带区间全部条目,模型首轮即可提交全部摘要并完成
|
|
16
17
|
- 压缩循环中 `getHistory` 返回当前状态,本次已压缩的区间显示为摘要条目
|
|
18
|
+
- 同轮有失败的摘要或问答重写未修正时,`completeCompression` 不执行
|
|
17
19
|
- 压缩循环连续 3 轮不调用工具或连续 3 轮被 max-tokens 截断才判失败,两者分开计数
|
|
18
20
|
- 压缩请求遇到 5xx 或网络错误时最多重试 3 次,等待复用 429 限流门
|
|
19
21
|
- 保留工具加载与手动加载的 skill 原文,并在压缩前再次确认
|
|
20
|
-
-
|
|
22
|
+
- 有效提问首次直接压缩需再次确认,保留时重写问答并展开选项引用
|
|
21
23
|
- 中断或错误的提问作为普通工具调用处理
|
|
22
24
|
- 压缩后发给 Claude 的请求剥离保留尾部中压缩前生成的 thinking 签名,避免前缀变化导致签名校验失败
|
|
23
25
|
- 使用 `recall` 按消息序号回看原文,启用语义增强后还可按含义检索
|
|
@@ -58,24 +60,24 @@ pnpm 11 安装失败时,在 profile 的 `pnpm-workspace.yaml` 中设置 `allow
|
|
|
58
60
|
|
|
59
61
|
| 配置项 | 默认值 | 说明 |
|
|
60
62
|
| --- | --- | --- |
|
|
63
|
+
| `omEnabled` | `true` | 是否启用自动压缩,关闭后进度提醒也不再注入 |
|
|
61
64
|
| `observeThresholdTokens` | `35000` | 观察压缩阈值 |
|
|
62
65
|
| `reflectThresholdTokens` | `40000` | 摘要合并阈值 |
|
|
63
66
|
| `tailMessageCount` | `20` | 触发后保留的完整消息数 |
|
|
64
|
-
| `
|
|
67
|
+
| `recallEnabled` | `true` | 是否启用原文召回 |
|
|
68
|
+
| `semanticRecallEnabled` | `true` | 是否为 `recall` 启用语义增强,依赖 `recallEnabled` |
|
|
69
|
+
| `modelDir` | DSH 共享目录 | 嵌入模型目录 |
|
|
65
70
|
| `compressProvider` | 会话路由 | 压缩 provider,需与 `compressModel` 同时配置 |
|
|
66
71
|
| `compressModel` | 会话路由 | 压缩模型,需与 `compressProvider` 同时配置 |
|
|
67
72
|
| `compressReasoningEffort` | 模型默认值 | 思考等级 |
|
|
73
|
+
| `compressMaxTokens` | 模型默认值 | 单轮生成上限 |
|
|
68
74
|
| `compressSkipReasoning` | `true` | 是否忽略 reasoning |
|
|
69
75
|
| `rateLimitWaitMs` | `60000` | 429 与 5xx 重试前的等待毫秒数,`0` 表示不等待 |
|
|
70
76
|
| `recompressConcurrency` | `2` | 重压缩同时运行的上限,至少为 `1`,超出的排队 |
|
|
71
|
-
| `modelDir` | DSH 共享目录 | 嵌入模型目录 |
|
|
72
|
-
| `omEnabled` | `true` | 是否启用自动压缩,关闭后进度提醒也不再注入 |
|
|
73
77
|
| `progressReminderEnabled` | `true` | 是否注入进度提醒,需同时开启 `omEnabled` |
|
|
74
78
|
| `progressReminderIdleEnabled` | `false` | 长期无记录时是否重发进度提醒,关闭后仅在提醒缺失时补发 |
|
|
75
79
|
| `progressReminderIdleSteps` | `4` | 无记录的已结束 step 数达到该值才重发,至少为 `1` |
|
|
76
80
|
| `progressReminderIdleToolCalls` | `10` | 无记录期间工具调用数超过该值才重发,至少为 `0` |
|
|
77
|
-
| `recallEnabled` | `true` | 是否启用原文召回 |
|
|
78
|
-
| `semanticRecallEnabled` | `true` | 是否为 `recall` 启用语义增强,依赖 `recallEnabled` |
|
|
79
81
|
| `debug` | 开发环境启用 | 是否输出步骤日志 |
|
|
80
82
|
|
|
81
83
|
配置页在依赖项关闭时隐藏关联项:原文召回关闭隐藏语义增强,语义增强未生效隐藏 `modelDir`,长期无记录时重发关闭隐藏两个重发阈值。
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
/** WebUI
|
|
1
|
+
/** WebUI 行配置表单:字段顺序、严格整数/布尔解析与 19 项草稿的宿主原子提交。 */
|
|
2
2
|
import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
3
3
|
import { type SettingsFieldState, type SettingsFormActions, type SettingsFormScope, type SettingsFormShell } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
4
4
|
import type { PluginConfig } from '../config.ts';
|
|
5
5
|
/** 由宿主提供的插件条目配置命名空间。 */
|
|
6
6
|
export declare const CONFIG_NS = "dsh-plugin-om";
|
|
7
|
-
/**
|
|
7
|
+
/** 完整表单字段及控件类别,顺序即面板顺序:父开关在前,其控制的细节紧随其后。 */
|
|
8
8
|
export declare const OM_CONFIG_FIELDS: readonly [{
|
|
9
|
+
readonly name: "omEnabled";
|
|
10
|
+
readonly kind: "boolean";
|
|
11
|
+
}, {
|
|
9
12
|
readonly name: "observeThresholdTokens";
|
|
10
13
|
readonly kind: "integer";
|
|
11
14
|
}, {
|
|
@@ -15,8 +18,14 @@ export declare const OM_CONFIG_FIELDS: readonly [{
|
|
|
15
18
|
readonly name: "tailMessageCount";
|
|
16
19
|
readonly kind: "integer";
|
|
17
20
|
}, {
|
|
18
|
-
readonly name: "
|
|
19
|
-
readonly kind: "
|
|
21
|
+
readonly name: "recallEnabled";
|
|
22
|
+
readonly kind: "boolean";
|
|
23
|
+
}, {
|
|
24
|
+
readonly name: "semanticRecallEnabled";
|
|
25
|
+
readonly kind: "boolean";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "modelDir";
|
|
28
|
+
readonly kind: "text";
|
|
20
29
|
}, {
|
|
21
30
|
readonly name: "compressProvider";
|
|
22
31
|
readonly kind: "text";
|
|
@@ -26,6 +35,9 @@ export declare const OM_CONFIG_FIELDS: readonly [{
|
|
|
26
35
|
}, {
|
|
27
36
|
readonly name: "compressReasoningEffort";
|
|
28
37
|
readonly kind: "text";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "compressMaxTokens";
|
|
40
|
+
readonly kind: "integer";
|
|
29
41
|
}, {
|
|
30
42
|
readonly name: "compressSkipReasoning";
|
|
31
43
|
readonly kind: "boolean";
|
|
@@ -35,12 +47,6 @@ export declare const OM_CONFIG_FIELDS: readonly [{
|
|
|
35
47
|
}, {
|
|
36
48
|
readonly name: "recompressConcurrency";
|
|
37
49
|
readonly kind: "integer";
|
|
38
|
-
}, {
|
|
39
|
-
readonly name: "modelDir";
|
|
40
|
-
readonly kind: "text";
|
|
41
|
-
}, {
|
|
42
|
-
readonly name: "omEnabled";
|
|
43
|
-
readonly kind: "boolean";
|
|
44
50
|
}, {
|
|
45
51
|
readonly name: "progressReminderEnabled";
|
|
46
52
|
readonly kind: "boolean";
|
|
@@ -53,12 +59,6 @@ export declare const OM_CONFIG_FIELDS: readonly [{
|
|
|
53
59
|
}, {
|
|
54
60
|
readonly name: "progressReminderIdleToolCalls";
|
|
55
61
|
readonly kind: "integer";
|
|
56
|
-
}, {
|
|
57
|
-
readonly name: "recallEnabled";
|
|
58
|
-
readonly kind: "boolean";
|
|
59
|
-
}, {
|
|
60
|
-
readonly name: "semanticRecallEnabled";
|
|
61
|
-
readonly kind: "boolean";
|
|
62
62
|
}, {
|
|
63
63
|
readonly name: "debug";
|
|
64
64
|
readonly kind: "boolean";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"om-config-controller.d.ts","sourceRoot":"","sources":["../../src/client/om-config-controller.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"om-config-controller.d.ts","sourceRoot":"","sources":["../../src/client/om-config-controller.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAExB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAwB;AACxB,eAAO,MAAM,SAAS,kBAAkB,CAAC;AAQzC,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBwB,CAAC;AAoCtD,wBAAwB;AACxB,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,YAAY,EAAE,kBAAkB,CAAC,CAAC;CACxD;AAED,yBAAyB;AACzB,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,KAAK,EAAE;QAAE,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;KAAE,CAAC;CAC3D;AAED,yBAAyB;AACzB,qBAAa,kBAAkB;IAKjB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJlC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA2C;IAChE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmC;IACzD,OAAO,CAAC,QAAQ,CAAS;gBAEI,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAgB5E,wBAAwB;IACxB,OAAO,CAAC,UAAU;IAWlB,4BAA4B;IAC5B,MAAM,IAAI,gBAAgB;IAI1B,gBAAgB;IAChB,OAAO,IAAI,IAAI;CAGhB"}
|
package/dist/client.js
CHANGED
|
@@ -1519,8 +1519,12 @@ window.__ModuleLoader__.load({
|
|
|
1519
1519
|
//#region src/client/om-config-controller.ts
|
|
1520
1520
|
/** 由宿主提供的插件条目配置命名空间。 */
|
|
1521
1521
|
const CONFIG_NS = "dsh-plugin-om";
|
|
1522
|
-
/**
|
|
1522
|
+
/** 完整表单字段及控件类别,顺序即面板顺序:父开关在前,其控制的细节紧随其后。 */
|
|
1523
1523
|
const OM_CONFIG_FIELDS = [
|
|
1524
|
+
{
|
|
1525
|
+
name: "omEnabled",
|
|
1526
|
+
kind: "boolean"
|
|
1527
|
+
},
|
|
1524
1528
|
{
|
|
1525
1529
|
name: "observeThresholdTokens",
|
|
1526
1530
|
kind: "integer"
|
|
@@ -1534,8 +1538,16 @@ window.__ModuleLoader__.load({
|
|
|
1534
1538
|
kind: "integer"
|
|
1535
1539
|
},
|
|
1536
1540
|
{
|
|
1537
|
-
name: "
|
|
1538
|
-
kind: "
|
|
1541
|
+
name: "recallEnabled",
|
|
1542
|
+
kind: "boolean"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
name: "semanticRecallEnabled",
|
|
1546
|
+
kind: "boolean"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
name: "modelDir",
|
|
1550
|
+
kind: "text"
|
|
1539
1551
|
},
|
|
1540
1552
|
{
|
|
1541
1553
|
name: "compressProvider",
|
|
@@ -1549,6 +1561,10 @@ window.__ModuleLoader__.load({
|
|
|
1549
1561
|
name: "compressReasoningEffort",
|
|
1550
1562
|
kind: "text"
|
|
1551
1563
|
},
|
|
1564
|
+
{
|
|
1565
|
+
name: "compressMaxTokens",
|
|
1566
|
+
kind: "integer"
|
|
1567
|
+
},
|
|
1552
1568
|
{
|
|
1553
1569
|
name: "compressSkipReasoning",
|
|
1554
1570
|
kind: "boolean"
|
|
@@ -1561,14 +1577,6 @@ window.__ModuleLoader__.load({
|
|
|
1561
1577
|
name: "recompressConcurrency",
|
|
1562
1578
|
kind: "integer"
|
|
1563
1579
|
},
|
|
1564
|
-
{
|
|
1565
|
-
name: "modelDir",
|
|
1566
|
-
kind: "text"
|
|
1567
|
-
},
|
|
1568
|
-
{
|
|
1569
|
-
name: "omEnabled",
|
|
1570
|
-
kind: "boolean"
|
|
1571
|
-
},
|
|
1572
1580
|
{
|
|
1573
1581
|
name: "progressReminderEnabled",
|
|
1574
1582
|
kind: "boolean"
|
|
@@ -1585,14 +1593,6 @@ window.__ModuleLoader__.load({
|
|
|
1585
1593
|
name: "progressReminderIdleToolCalls",
|
|
1586
1594
|
kind: "integer"
|
|
1587
1595
|
},
|
|
1588
|
-
{
|
|
1589
|
-
name: "recallEnabled",
|
|
1590
|
-
kind: "boolean"
|
|
1591
|
-
},
|
|
1592
|
-
{
|
|
1593
|
-
name: "semanticRecallEnabled",
|
|
1594
|
-
kind: "boolean"
|
|
1595
|
-
},
|
|
1596
1596
|
{
|
|
1597
1597
|
name: "debug",
|
|
1598
1598
|
kind: "boolean"
|