dsh-cohub 0.13.19 → 0.13.20
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/lib/index.js +14 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-cohub
|
|
2
2
|
|
|
3
|
-
> 本文对应 **v0.13.
|
|
3
|
+
> 本文对应 **v0.13.20**;完整变更历史见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
4
4
|
|
|
5
5
|
DeepSeek Harness 版(对照 [OpenCode 版](../oh-my-opencode-cohub/)):中文智能体编排插件。
|
|
6
6
|
把「纯调度模式 + 内置技能(代理编排体系 + co-cordis 组合创作 + 写作组)+ 多模型共识 + 运行期调度韧性」移植到 DSH 原生能力之上。
|
package/lib/index.js
CHANGED
|
@@ -694,13 +694,7 @@ function materializeJsTags(node, logger, platform = process.platform, path = "pl
|
|
|
694
694
|
}
|
|
695
695
|
return node;
|
|
696
696
|
}
|
|
697
|
-
var TEAM_OWNED_PRESET_IDS = [
|
|
698
|
-
"co-orchestrator",
|
|
699
|
-
"cohub-subagent-readonly",
|
|
700
|
-
"cohub-subagent-readonly-net",
|
|
701
|
-
"cohub-subagent-write",
|
|
702
|
-
"cohub-subagent-write-shell"
|
|
703
|
-
];
|
|
697
|
+
var TEAM_OWNED_PRESET_IDS = ["co-orchestrator"];
|
|
704
698
|
function isSafePresetId2(id) {
|
|
705
699
|
return /^[a-z0-9][a-z0-9._-]*$/i.test(id) && !id.includes("..");
|
|
706
700
|
}
|
|
@@ -2266,6 +2260,13 @@ Orchestrator 会在 prompt 中明确指定:
|
|
|
2266
2260
|
|
|
2267
2261
|
// src/roles.ts
|
|
2268
2262
|
var ALL_TIERS = ["ro", "ro-net", "rw", "rw-shell", "cordis"];
|
|
2263
|
+
var TIER_TO_PRESET = {
|
|
2264
|
+
ro: "cohub-subagent-readonly",
|
|
2265
|
+
"ro-net": "cohub-subagent-readonly-net",
|
|
2266
|
+
rw: "cohub-subagent-write",
|
|
2267
|
+
"rw-shell": "cohub-subagent-write-shell",
|
|
2268
|
+
cordis: "cohub-cordis"
|
|
2269
|
+
};
|
|
2269
2270
|
var BUILTIN_ROLE_TIERS = {
|
|
2270
2271
|
"co-explorer": "ro",
|
|
2271
2272
|
"co-oracle": "ro",
|
|
@@ -2365,6 +2366,10 @@ function resolveRoleKind(roleName, customRoles) {
|
|
|
2365
2366
|
return custom.kind;
|
|
2366
2367
|
return BUILTIN_ROLE_KINDS[key] ?? "member";
|
|
2367
2368
|
}
|
|
2369
|
+
function presetForTier(tier) {
|
|
2370
|
+
const preset = TIER_TO_PRESET[tier];
|
|
2371
|
+
return typeof preset === "string" && preset.length > 0 ? preset : TIER_TO_PRESET["rw-shell"];
|
|
2372
|
+
}
|
|
2368
2373
|
var PRIMARY_AGENT_ROLE = "co-orchestrator";
|
|
2369
2374
|
function resolveActiveTeam(config) {
|
|
2370
2375
|
const id = (config?.activeTeam ?? "").trim();
|
|
@@ -6084,14 +6089,14 @@ function resolveSkillToolFilter(skillName, enabled = true, logger, customRoles)
|
|
|
6084
6089
|
return;
|
|
6085
6090
|
}
|
|
6086
6091
|
}
|
|
6087
|
-
var CORDIS_PRESET = "cohub-cordis";
|
|
6088
6092
|
function resolveSkillAgentPreset(skillName, enabled = true, customRoles, _logger) {
|
|
6089
6093
|
if (!enabled)
|
|
6090
6094
|
return;
|
|
6091
6095
|
const key = (skillName ?? "").trim();
|
|
6092
6096
|
if (key === "co-orchestrator")
|
|
6093
6097
|
return;
|
|
6094
|
-
|
|
6098
|
+
const tier = resolveTier(key, customRoles);
|
|
6099
|
+
return presetForTier(tier ?? "rw-shell");
|
|
6095
6100
|
}
|
|
6096
6101
|
function intersectWithRestrictable(filter, restrictableNames) {
|
|
6097
6102
|
if (!filter || !restrictableNames)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cohub",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.20",
|
|
4
4
|
"description": "DeepSeek Harness 版 CoHub:中文智能体编排——用户可选 2 种工作模式(co-orchestrator 纯调度 / cohub-cordis 创造模式)+ 13 个专职代理技能 + 多模型共识;另由 cohub-subagent-readonly / cohub-subagent-write 两个支撑 preset 实现子代理读写硬隔离(共 4 个 preset)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|