dsh-ronge-adaptive-skill-archive 5.0.4 → 5.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/README.md +6 -6
- package/client.js +32 -1
- package/docs/dsh-compatibility.md +3 -3
- package/index.js +61 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<sub>会话右侧的「技能」抽屉:推荐 / 组队计划 / 经验 / 安全与更新,都在一个面板里。</sub>
|
|
32
32
|
</p>
|
|
33
33
|
|
|
34
|
-
> **v5.0
|
|
34
|
+
> **v5.1.0 发布说明**:本 README 是当前发布稿。三大新能力 `plan → compose → draft`(任务拆解 / 技能组队 / 按缺口造技能)与 12 领域包为本次发布新增;每条声明的证据、实测状态与未验证项统一记录在 **[docs/claims.md](docs/claims.md)**。benchmark 数字见 **[docs/benchmark.md](docs/benchmark.md)**(2026-10-30 快照)。
|
|
35
35
|
|
|
36
36
|
## 为什么需要 v5
|
|
37
37
|
|
|
@@ -59,8 +59,8 @@ v5 的驾驶舱把这条链路补全:
|
|
|
59
59
|
npx dsh-ronge-adaptive-skill-archive
|
|
60
60
|
# 想先体检:npx dsh-ronge-adaptive-skill-archive doctor
|
|
61
61
|
|
|
62
|
-
# 2) 把打印出的这一行交给任意 DSH 会话里的 Agent 执行(v5.0
|
|
63
|
-
plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0
|
|
62
|
+
# 2) 把打印出的这一行交给任意 DSH 会话里的 Agent 执行(v5.1.0 发布后可用)
|
|
63
|
+
plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.1.0
|
|
64
64
|
|
|
65
65
|
# 3) 刷新页面 → 右上角「技能」→ 右侧抽屉;计划模式 / 沉浸模式切换
|
|
66
66
|
```
|
|
@@ -246,8 +246,8 @@ v5.0.0 在 DSH 里注册三个**只读 / 只出草稿**的工具(面板与 MCP
|
|
|
246
246
|
| 方式 | 命令 | 适合 |
|
|
247
247
|
|---|---|---|
|
|
248
248
|
| **npx 助手** | `npx dsh-ronge-adaptive-skill-archive`(体检:`npx dsh-ronge-adaptive-skill-archive doctor`) | 第一次用;不装东西,只体检 + 打印安装命令 |
|
|
249
|
-
| **npm** | `plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0
|
|
250
|
-
| **GitHub tag** | `plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.0
|
|
249
|
+
| **npm** | `plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.1.0` | v5.1.0 发布到 npm 后可用 |
|
|
250
|
+
| **GitHub tag** | `plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.1.0` | 固定版本、可审源码 |
|
|
251
251
|
| **本地目录** | `plugin_manager install_bundle target="/absolute/path/to/dsh-ronge-adaptive-skill-archive"` | 开发、改代码、离线 |
|
|
252
252
|
|
|
253
253
|
> v5.0.0 打 tag / 发布 npm 之前,`@5.0.0` 会 404:请先用本地目录,或安装当时最新的已发布版本。安装后 DSH 需**重启**才会加载新的 Host 模块;浏览器刷新加载 Client。
|
|
@@ -356,7 +356,7 @@ MIT。见 [LICENSE](LICENSE)。索引中的技能元数据归原作者,边界
|
|
|
356
356
|
**Install** (in a DSH session):
|
|
357
357
|
|
|
358
358
|
```bash
|
|
359
|
-
plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0
|
|
359
|
+
plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.1.0
|
|
360
360
|
# then open any session → 「技能」 → switch Plan / Immersive
|
|
361
361
|
```
|
|
362
362
|
|
package/client.js
CHANGED
|
@@ -271,6 +271,10 @@ window.__ModuleLoader__.load({
|
|
|
271
271
|
intelStages: '阶段',
|
|
272
272
|
intelInstalledCount: '已安装技能',
|
|
273
273
|
intelReviewGap: '缺少独立复核技能:计划未假装复核',
|
|
274
|
+
intelPlanOptions: '方案',
|
|
275
|
+
intelPlanFast: '快速',
|
|
276
|
+
intelPlanBalanced: '均衡',
|
|
277
|
+
intelPlanQuality: '高质量',
|
|
274
278
|
intelStage: '阶段',
|
|
275
279
|
intelRole: '角色',
|
|
276
280
|
intelSkills: '技能',
|
|
@@ -560,6 +564,10 @@ window.__ModuleLoader__.load({
|
|
|
560
564
|
intelStages: 'Stages',
|
|
561
565
|
intelInstalledCount: 'Installed skills',
|
|
562
566
|
intelReviewGap: 'No independent reviewer: plan does not fake a review',
|
|
567
|
+
intelPlanOptions: 'Plans',
|
|
568
|
+
intelPlanFast: 'Fast',
|
|
569
|
+
intelPlanBalanced: 'Balanced',
|
|
570
|
+
intelPlanQuality: 'Quality',
|
|
563
571
|
intelStage: 'Stage',
|
|
564
572
|
intelRole: 'Role',
|
|
565
573
|
intelSkills: 'Skills',
|
|
@@ -1567,6 +1575,7 @@ window.__ModuleLoader__.load({
|
|
|
1567
1575
|
const [intelError, setIntelError] = React.useState(null)
|
|
1568
1576
|
const [intelNotice, setIntelNotice] = React.useState(null)
|
|
1569
1577
|
const [intelPlan, setIntelPlan] = React.useState(null)
|
|
1578
|
+
const [intelPlans, setIntelPlans] = React.useState([])
|
|
1570
1579
|
const [intelDraft, setIntelDraft] = React.useState(null)
|
|
1571
1580
|
const [intelDraftFrom, setIntelDraftFrom] = React.useState(null)
|
|
1572
1581
|
const [intelCreatedPath, setIntelCreatedPath] = React.useState(null)
|
|
@@ -2268,6 +2277,7 @@ window.__ModuleLoader__.load({
|
|
|
2268
2277
|
if (intelBusy || (action !== 'plan' && action !== 'compose' && action !== 'draft')) return
|
|
2269
2278
|
setIntelBusy(action)
|
|
2270
2279
|
setIntelMode(action)
|
|
2280
|
+
setIntelPlans([])
|
|
2271
2281
|
setIntelError(null)
|
|
2272
2282
|
setIntelNotice(null)
|
|
2273
2283
|
setIntelCreatedPath(null)
|
|
@@ -2280,7 +2290,8 @@ window.__ModuleLoader__.load({
|
|
|
2280
2290
|
} else {
|
|
2281
2291
|
if (currentMode && currentMode !== 'off') body.mode = currentMode
|
|
2282
2292
|
if (data && data.cwd) body.cwd = String(data.cwd)
|
|
2283
|
-
if (
|
|
2293
|
+
if (state.sessionId) body.sessionId = String(state.sessionId)
|
|
2294
|
+
if (action === 'compose') body.maxSkills = 5
|
|
2284
2295
|
}
|
|
2285
2296
|
const response = await abortableFetch('/dsh-ronge-adaptive-skill-archive/intelligence/' + action, {
|
|
2286
2297
|
method: 'POST',
|
|
@@ -2303,6 +2314,7 @@ window.__ModuleLoader__.load({
|
|
|
2303
2314
|
setIntelError(t('intelEmpty'))
|
|
2304
2315
|
} else {
|
|
2305
2316
|
setIntelPlan(plan)
|
|
2317
|
+
setIntelPlans(Array.isArray(payload.plans) ? payload.plans.filter((item) => item && item.plan) : [])
|
|
2306
2318
|
setIntelNotice({ kind: 'ok', text: t('intelPlanReady') })
|
|
2307
2319
|
}
|
|
2308
2320
|
}
|
|
@@ -4104,6 +4116,25 @@ window.__ModuleLoader__.load({
|
|
|
4104
4116
|
plan.reviewGap
|
|
4105
4117
|
? h('div', { className: 'sf-intel-note' }, t('intelReviewGap'))
|
|
4106
4118
|
: null,
|
|
4119
|
+
intelPlans.length > 1
|
|
4120
|
+
? h(
|
|
4121
|
+
'div',
|
|
4122
|
+
{ className: 'sf-intel-choices' },
|
|
4123
|
+
h('span', { className: 'sf-intel-k' }, t('intelPlanOptions')),
|
|
4124
|
+
intelPlans.map((choice) =>
|
|
4125
|
+
h(
|
|
4126
|
+
'button',
|
|
4127
|
+
{
|
|
4128
|
+
type: 'button',
|
|
4129
|
+
key: 'choice-' + choice.id,
|
|
4130
|
+
className: 'sf-chip' + (choice.id === plan.variant ? ' sf-chip-active' : ''),
|
|
4131
|
+
onClick: () => setIntelPlan(choice.plan),
|
|
4132
|
+
},
|
|
4133
|
+
choice.id === 'fast' ? t('intelPlanFast') : choice.id === 'quality' ? t('intelPlanQuality') : t('intelPlanBalanced'),
|
|
4134
|
+
),
|
|
4135
|
+
),
|
|
4136
|
+
)
|
|
4137
|
+
: null,
|
|
4107
4138
|
stages.length
|
|
4108
4139
|
? h(
|
|
4109
4140
|
'ol',
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
# npm(推荐)
|
|
10
|
-
plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0
|
|
10
|
+
plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.1.0
|
|
11
11
|
|
|
12
12
|
# GitHub tag(固定版本、可审源码)
|
|
13
|
-
plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.0
|
|
13
|
+
plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.1.0
|
|
14
14
|
|
|
15
15
|
# 本地目录(开发)
|
|
16
16
|
plugin_manager install_bundle target=/absolute/path/to/dsh-ronge-adaptive-skill-archive
|
|
@@ -42,7 +42,7 @@ plugin_manager install_bundle target=/absolute/path/to/dsh-ronge-adaptive-skill-
|
|
|
42
42
|
- Host E2E:20/20(真实 loopback HTTP + raw.githubusercontent.com)
|
|
43
43
|
- UI E2E:27/27
|
|
44
44
|
- `npm run check:dsh`:manifest / factory id / slots / routes / 数据迁移 / market index 全部通过
|
|
45
|
-
- npm registry 安装 v3.0.0 历史验证;v5.0
|
|
45
|
+
- npm registry 安装 v3.0.0 历史验证;v5.1.0 发布后以 registry 为准;市场索引 format 1 托管在 `https://bugtakue.github.io/dsh-ronge-adaptive-skill-archive/plugin-market.json`
|
|
46
46
|
|
|
47
47
|
## 已知边界
|
|
48
48
|
|
package/index.js
CHANGED
|
@@ -3287,6 +3287,55 @@ async function resolveInstalledSkills(ctx, cwd) {
|
|
|
3287
3287
|
}
|
|
3288
3288
|
|
|
3289
3289
|
|
|
3290
|
+
function planRequestCwd(ctx, payload) {
|
|
3291
|
+
if (payload && payload.cwd) return String(payload.cwd)
|
|
3292
|
+
if (payload && payload.sessionId) {
|
|
3293
|
+
try {
|
|
3294
|
+
const header = ctx.get('agents')?.get?.(payload.sessionId)?.header
|
|
3295
|
+
if (header && header.cwd) return String(header.cwd)
|
|
3296
|
+
} catch {}
|
|
3297
|
+
}
|
|
3298
|
+
return process.cwd()
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
function planRequestContext(cwd) {
|
|
3302
|
+
try {
|
|
3303
|
+
const files = fs
|
|
3304
|
+
.readdirSync(cwd, { withFileTypes: true })
|
|
3305
|
+
.filter((entry) => !entry.name.startsWith('.') && entry.isFile())
|
|
3306
|
+
.slice(0, 20)
|
|
3307
|
+
.map((entry) => entry.name)
|
|
3308
|
+
return files.length ? 'workspace files: ' + files.join(', ') : ''
|
|
3309
|
+
} catch {
|
|
3310
|
+
return ''
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
function buildPlanAlternatives(intel, base) {
|
|
3315
|
+
const configs = [
|
|
3316
|
+
{ id: 'fast', label: 'fast', maxSkills: 3 },
|
|
3317
|
+
{ id: 'balanced', label: 'balanced', maxSkills: 4 },
|
|
3318
|
+
{ id: 'quality', label: 'quality', maxSkills: 5 },
|
|
3319
|
+
]
|
|
3320
|
+
const plans = configs.map((config) => {
|
|
3321
|
+
const plan = intel.composeSkillPlan({ ...base, maxSkills: config.maxSkills })
|
|
3322
|
+
plan.variant = config.id
|
|
3323
|
+
return { id: config.id, label: config.label, maxSkills: config.maxSkills, plan }
|
|
3324
|
+
})
|
|
3325
|
+
const bySignature = new Map()
|
|
3326
|
+
for (const choice of plans) {
|
|
3327
|
+
const signature = JSON.stringify({
|
|
3328
|
+
pattern: choice.plan.pattern,
|
|
3329
|
+
stages: choice.plan.stages.map((stage) => (stage.skills || []).map((skill) => skill.name)),
|
|
3330
|
+
missing: choice.plan.missing.map((item) => item.capability),
|
|
3331
|
+
})
|
|
3332
|
+
if (!bySignature.has(signature)) bySignature.set(signature, choice)
|
|
3333
|
+
}
|
|
3334
|
+
const unique = [...bySignature.values()]
|
|
3335
|
+
const selected = unique.find((choice) => choice.id === 'balanced') || unique[0]
|
|
3336
|
+
return { plans: unique, plan: selected.plan, selectedPlan: selected.id }
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3290
3339
|
function registerIntelligenceTools(ctx) {
|
|
3291
3340
|
const tools = ctx.get ? ctx.get('tools') : ctx.tools
|
|
3292
3341
|
if (!tools || typeof tools.register !== 'function') return []
|
|
@@ -3318,9 +3367,10 @@ function registerIntelligenceTools(ctx) {
|
|
|
3318
3367
|
installedSkills: resolved.skills,
|
|
3319
3368
|
libraryEntries: loadLibraryIndex().entries || [],
|
|
3320
3369
|
capabilityIndex: loadCapabilityIndex(),
|
|
3370
|
+
context: planRequestContext(cwd),
|
|
3321
3371
|
maxSkills: 5,
|
|
3322
3372
|
})
|
|
3323
|
-
plan.diagnostics = { installedCount: resolved.count, installedSource: resolved.source }
|
|
3373
|
+
plan.diagnostics = { installedCount: resolved.count, installedSource: resolved.source, cwd }
|
|
3324
3374
|
return { ok: true, plan: { ...plan, stages: plan?.stages?.slice(0, 4) } }
|
|
3325
3375
|
},
|
|
3326
3376
|
}),
|
|
@@ -3352,9 +3402,10 @@ function registerIntelligenceTools(ctx) {
|
|
|
3352
3402
|
installedSkills: resolved.skills,
|
|
3353
3403
|
libraryEntries: loadLibraryIndex().entries || [],
|
|
3354
3404
|
capabilityIndex: loadCapabilityIndex(),
|
|
3405
|
+
context: planRequestContext(cwd),
|
|
3355
3406
|
maxSkills: Number(args?.maxSkills) || 5,
|
|
3356
3407
|
}),
|
|
3357
|
-
diagnostics: { installedCount: resolved.count, installedSource: resolved.source },
|
|
3408
|
+
diagnostics: { installedCount: resolved.count, installedSource: resolved.source, cwd },
|
|
3358
3409
|
}
|
|
3359
3410
|
},
|
|
3360
3411
|
}),
|
|
@@ -3737,9 +3788,9 @@ export function apply(ctx, config = {}) {
|
|
|
3737
3788
|
const task = String(payload?.task || '').trim()
|
|
3738
3789
|
if (!task) throw new HttpError(400, 'task is required')
|
|
3739
3790
|
const intel = await loadIntelligence()
|
|
3740
|
-
const cwd =
|
|
3791
|
+
const cwd = planRequestCwd(ctx, payload)
|
|
3741
3792
|
const resolved = await resolveInstalledSkills(ctx, cwd)
|
|
3742
|
-
const diagnostics = { installedCount: resolved.count, installedSource: resolved.source }
|
|
3793
|
+
const diagnostics = { installedCount: resolved.count, installedSource: resolved.source, cwd }
|
|
3743
3794
|
if (action === 'draft') {
|
|
3744
3795
|
const draft = intel.draftSkill({
|
|
3745
3796
|
task,
|
|
@@ -3749,18 +3800,18 @@ export function apply(ctx, config = {}) {
|
|
|
3749
3800
|
sendJson(res, 200, { ok: true, diagnostics, draft })
|
|
3750
3801
|
return
|
|
3751
3802
|
}
|
|
3752
|
-
const
|
|
3803
|
+
const base = {
|
|
3753
3804
|
task,
|
|
3754
3805
|
cwd,
|
|
3755
|
-
context: String(payload?.context ||
|
|
3806
|
+
context: String(payload?.context || planRequestContext(cwd)),
|
|
3756
3807
|
mode: String(payload?.mode || ''),
|
|
3757
3808
|
installedSkills: resolved.skills,
|
|
3758
3809
|
libraryEntries: loadLibraryIndex().entries || [],
|
|
3759
3810
|
capabilityIndex: loadCapabilityIndex(),
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
plan.diagnostics = diagnostics
|
|
3763
|
-
sendJson(res, 200, { ok: true, diagnostics, plan })
|
|
3811
|
+
}
|
|
3812
|
+
const choices = buildPlanAlternatives(intel, base)
|
|
3813
|
+
choices.plan.diagnostics = diagnostics
|
|
3814
|
+
sendJson(res, 200, { ok: true, diagnostics, plans: choices.plans, selectedPlan: choices.selectedPlan, plan: choices.plan })
|
|
3764
3815
|
}),
|
|
3765
3816
|
}),
|
|
3766
3817
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ronge-adaptive-skill-archive",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "DSH-native skill intelligence cockpit: task decomposition, cross-domain multi-skill composition, skill authoring, local recommendations and safety scans for DeepSeek Harness.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|