dsh-mnemon 0.5.42 → 0.5.44
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 +1 -1
- package/README.zh-CN.md +1 -1
- package/bin/repair-legacy-session.mjs +18 -2
- package/lib/bundle.js +1 -1
- package/lib/client.js +587 -162
- package/lib/extension-sdk.js +39 -1
- package/lib/index.js +818 -170
- package/lib/{starter-resolution-B5mdKlvf.js → starter-resolution-LTLQsJPW.js} +7 -7
- package/lib/starter.js +1 -1
- package/lib/types/src/client/locales.d.ts +25 -0
- package/lib/types/src/host/protocol.d.ts +11 -0
- package/lib/types/src/sdk/index.d.ts +1 -0
- package/lib/types/src/sdk/projection-reservation.d.ts +3 -0
- package/locale/detail.en.md +7 -0
- package/locale/detail.zh.md +7 -0
- package/locale/en.json +3 -1
- package/locale/zh.json +2 -1
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ The default **Layered strategy** keeps runtime memory resident and reads the oth
|
|
|
83
83
|
| [](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/guides/skills.md#in-a-conversation) | [](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/guides/skills.md#evolution) |
|
|
84
84
|
|
|
85
85
|
- **Manage.** Switch a skill off for the model or the `/` menu, use it in the conversation in one click, edit it, and go back to any earlier version.
|
|
86
|
-
- **Evolve.** With self-evolution on, finished conversations are reviewed in the background for corrections, "from now on" instructions, failed tools and reusable procedures. A suggestion cites the steps it rests on; a task Agent drafts the new `SKILL.md`, which is backtested against the current version before you adopt it.
|
|
86
|
+
- **Evolve.** With self-evolution on, finished conversations are reviewed in the background for corrections, "from now on" instructions, failed tools and reusable procedures. A suggestion cites the steps it rests on; a task Agent drafts the new `SKILL.md`, which is backtested against the current version before you adopt it. Manual **Adopt** remains the default; opt-in automatic adoption can process new idle-review suggestions after complete, non-regressing backtests.
|
|
87
87
|
- **Test.** Each skill has its own cases, from reviews, from recorded conversations or written by hand, and a backtest scores any version on them.
|
|
88
88
|
- **Install.** The market searches skills.sh's open index and reads any GitHub repository, any site publishing an Agent Skills discovery index, and curated catalogs; every install is previewed, with security reviews where they exist.
|
|
89
89
|
- **In the conversation.** A line under each turn names the skills it used and what its review suggested, each one click from its page.
|
package/README.zh-CN.md
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
| [](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/guides/skills.md#对话中) | [](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/guides/skills.md#进化) |
|
|
85
85
|
|
|
86
86
|
- **管理。** 让技能不被模型加载或不出现在 `/` 菜单里,一键在对话中使用,直接编辑,并能回到任意历史版本。
|
|
87
|
-
- **进化。** 开启自进化后,对话结束会在后台复盘,寻找多次纠正、“以后都这样做”的指示、工具失败和可复用的流程。每条建议都标出所依据的步骤;任务 Agent 写出新的 `SKILL.md
|
|
87
|
+
- **进化。** 开启自进化后,对话结束会在后台复盘,寻找多次纠正、“以后都这样做”的指示、工具失败和可复用的流程。每条建议都标出所依据的步骤;任务 Agent 写出新的 `SKILL.md`,先与当前版本回测对比,再由你采纳。默认仍须手动**采纳**;可显式开启自动采纳,让新的空闲审查建议在完整回测不退步时落地。
|
|
88
88
|
- **测试。** 每个技能都有自己的用例,来自复盘、记录的对话或手写,任意版本都能在这些用例上回测打分。
|
|
89
89
|
- **安装。** 市场可以搜索 skills.sh 的开放索引,读取任意 GitHub 仓库、任何按 Agent Skills 发现协议发布技能的网站,以及技能目录;每次安装前都能预览,有安全审核的会一并显示。
|
|
90
90
|
- **对话中。** 每个回合下方的一行列出这一回合用到的技能和复盘提出的建议,点一下就能打开。
|
|
@@ -637,6 +637,8 @@ async function repairIdleProbeSession(entries, original, compressed, input, outp
|
|
|
637
637
|
const pending = new Map()
|
|
638
638
|
const roots = new Set()
|
|
639
639
|
let openTurn
|
|
640
|
+
let openStep
|
|
641
|
+
let completedStep = false
|
|
640
642
|
let completed = false
|
|
641
643
|
const refuse = () => { throw new Error('Unrecognized or incomplete out-of-turn PTC audit; no output written.') }
|
|
642
644
|
for (const entry of entries.slice(1)) {
|
|
@@ -647,17 +649,31 @@ async function repairIdleProbeSession(entries, original, compressed, input, outp
|
|
|
647
649
|
if (row.type === 'turn/start') {
|
|
648
650
|
if (openTurn !== undefined) refuse()
|
|
649
651
|
openTurn = row.data.turn
|
|
652
|
+
completedStep = false
|
|
650
653
|
} else {
|
|
651
654
|
if (openTurn !== row.data.turn) refuse()
|
|
652
655
|
openTurn = undefined
|
|
653
656
|
completed = true
|
|
654
657
|
}
|
|
658
|
+
openStep = undefined
|
|
655
659
|
}
|
|
656
|
-
if (
|
|
660
|
+
if (row.type === 'step/start' || row.type === 'step/end') {
|
|
661
|
+
assertUniqueJson(entry.line, row)
|
|
662
|
+
if (pending.size || openTurn !== row.data?.turn || !count(row.data?.step)) refuse()
|
|
663
|
+
if (row.type === 'step/start') {
|
|
664
|
+
if (openStep !== undefined) refuse()
|
|
665
|
+
openStep = row.data.step
|
|
666
|
+
} else {
|
|
667
|
+
if (openStep !== row.data.step) refuse()
|
|
668
|
+
openStep = undefined
|
|
669
|
+
completedStep = true
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
if (!['tool/ptc-dispatch-start', 'tool/ptc-dispatch'].includes(row.type) || openStep !== undefined) continue
|
|
657
673
|
assertUniqueJson(entry.line, row)
|
|
658
674
|
const data = row.data
|
|
659
675
|
const start = row.type === 'tool/ptc-dispatch-start'
|
|
660
|
-
if (!completed || !exactKeys(row, ['type', 'seq', 'time', 'data']) || !count(row.seq) || !integer(row.time) ||
|
|
676
|
+
if (!(openTurn === undefined ? completed : completedStep) || !exactKeys(row, ['type', 'seq', 'time', 'data']) || !count(row.seq) || !integer(row.time) ||
|
|
661
677
|
!exactKeys(data, ['rootCallId', 'parentCallId', 'subCallId', 'name', 'arguments', ...(start ? [] : ['isError', 'content'])], start ? [] : ['error', 'meta']) ||
|
|
662
678
|
!uuid.test(data.rootCallId) || data.parentCallId !== data.rootCallId || data.subCallId !== `${data.rootCallId}:ptc:1` ||
|
|
663
679
|
data.name !== 'mnemon_subagent_result' || !exactKeys(data.arguments, ['requestId', 'result']) ||
|
package/lib/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as prepareStarterResolution } from "./starter-resolution-
|
|
1
|
+
import { t as prepareStarterResolution } from "./starter-resolution-LTLQsJPW.js";
|
|
2
2
|
//#region src/bundle.ts
|
|
3
3
|
const groupKey = Symbol.for("cordis.group");
|
|
4
4
|
const init = Symbol.for("cordis.init");
|