dsh-cohub 0.13.8 → 0.13.11
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/client.js +12 -211
- package/lib/index.js +147 -29
- package/package.json +1 -1
- package/presets/cohub-cordis/preset.yml +3 -3
- package/presets/cohub-subagent-readonly/preset.yml +3 -2
- package/presets/cohub-subagent-readonly-net/preset.yml +3 -2
- package/presets/cohub-subagent-write/preset.yml +3 -2
- package/presets/cohub-subagent-write-shell/preset.yml +3 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-cohub
|
|
2
2
|
|
|
3
|
-
> 本文对应 **v0.13.
|
|
3
|
+
> 本文对应 **v0.13.11**;完整变更历史见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
4
4
|
|
|
5
5
|
DeepSeek Harness 版(对照 [OpenCode 版](../oh-my-opencode-cohub/)):中文智能体编排插件。
|
|
6
6
|
把「纯调度模式 + 内置技能(代理编排体系 + co-cordis 组合创作 + 写作组)+ 多模型共识 + 运行期调度韧性」移植到 DSH 原生能力之上。
|
package/lib/client.js
CHANGED
|
@@ -450,7 +450,7 @@ window.__ModuleLoader__.load({
|
|
|
450
450
|
var React = require("react");
|
|
451
451
|
|
|
452
452
|
/* ────────────────────────────────────────────────────────────────
|
|
453
|
-
* CoHub
|
|
453
|
+
* CoHub 代理设置页(DSH 0.2.1)
|
|
454
454
|
*
|
|
455
455
|
* 历史纠正(旧注释是错的,别再抄回去):
|
|
456
456
|
* ❌「0.2 官方设置页会自动按 volatile 字段生成表单,无需客户端」
|
|
@@ -533,14 +533,8 @@ window.__ModuleLoader__.load({
|
|
|
533
533
|
|
|
534
534
|
var zh = {
|
|
535
535
|
nav: "CoHub 代理",
|
|
536
|
-
title: "CoHub
|
|
537
|
-
description: "
|
|
538
|
-
provider: "供应商",
|
|
539
|
-
model: "模型",
|
|
540
|
-
configured: "显式配置",
|
|
541
|
-
inherited: "继承父模型",
|
|
542
|
-
providerInherit: "(不配置,继承父模型)",
|
|
543
|
-
modelInherit: "(继承父模型)",
|
|
536
|
+
title: "CoHub 代理",
|
|
537
|
+
description: "团队 → 角色库。每个角色的提示词、绑定工具与运行模型(供应商 / 模型 / 推理强度 / 最大输出)统一在「角色库」里配置。",
|
|
544
538
|
loading: "加载中…",
|
|
545
539
|
unavailable: "当前设置不可用(宿主未提供 cohub 配置命名空间)。",
|
|
546
540
|
readOnly: "当前连接只读,无法修改设置。",
|
|
@@ -552,17 +546,8 @@ window.__ModuleLoader__.load({
|
|
|
552
546
|
saving: "保存中…",
|
|
553
547
|
saved: "已保存。",
|
|
554
548
|
discard: "放弃修改",
|
|
555
|
-
reset: "重置",
|
|
556
|
-
customModel: "输入模型 ID",
|
|
557
|
-
selectProviderFirst: "请先选择供应商",
|
|
558
549
|
loadProvidersFailed: "模型供应商列表加载失败",
|
|
559
550
|
emptyModel: "该供应商未提供模型目录",
|
|
560
|
-
unavailableOption: "{value}(不可用)",
|
|
561
|
-
reasoningEffort: "推理强度",
|
|
562
|
-
effortInherit: "(继承父会话)",
|
|
563
|
-
effortSelectModelFirst: "请先选择模型",
|
|
564
|
-
effortUnsupported: "该模型不支持",
|
|
565
|
-
effortUnsupportedOption: "{value}(当前模型不支持)",
|
|
566
551
|
"skill.co-orchestrator": "调度编排",
|
|
567
552
|
"skill.co-planner": "方案制定",
|
|
568
553
|
"skill.co-oracle": "架构/代码审查",
|
|
@@ -730,14 +715,8 @@ window.__ModuleLoader__.load({
|
|
|
730
715
|
|
|
731
716
|
var en = {
|
|
732
717
|
nav: "CoHub agents",
|
|
733
|
-
title: "CoHub
|
|
734
|
-
description: "
|
|
735
|
-
provider: "Provider",
|
|
736
|
-
model: "Model",
|
|
737
|
-
configured: "Explicit",
|
|
738
|
-
inherited: "Inherited",
|
|
739
|
-
providerInherit: "(not set — inherit parent model)",
|
|
740
|
-
modelInherit: "(inherit parent model)",
|
|
718
|
+
title: "CoHub agents",
|
|
719
|
+
description: "Teams → Roles. Each role's prompt, bound tools and runtime model (provider / model / reasoning effort / max output) are configured in the role library.",
|
|
741
720
|
loading: "Loading…",
|
|
742
721
|
unavailable: "This setting is unavailable (the Host does not serve the cohub configuration namespace).",
|
|
743
722
|
readOnly: "This connection is read-only; settings cannot be changed.",
|
|
@@ -749,17 +728,8 @@ window.__ModuleLoader__.load({
|
|
|
749
728
|
saving: "Saving…",
|
|
750
729
|
saved: "Saved.",
|
|
751
730
|
discard: "Discard",
|
|
752
|
-
reset: "Reset",
|
|
753
|
-
customModel: "Enter model ID",
|
|
754
|
-
selectProviderFirst: "Select a provider first",
|
|
755
731
|
loadProvidersFailed: "Failed to load the provider catalog",
|
|
756
732
|
emptyModel: "This provider publishes no model catalog",
|
|
757
|
-
unavailableOption: "{value} (unavailable)",
|
|
758
|
-
reasoningEffort: "Reasoning effort",
|
|
759
|
-
effortInherit: "(inherit from parent session)",
|
|
760
|
-
effortSelectModelFirst: "Select a model first",
|
|
761
|
-
effortUnsupported: "Not supported by this model",
|
|
762
|
-
effortUnsupportedOption: "{value} (unsupported by this model)",
|
|
763
733
|
"skill.co-orchestrator": "Orchestrator",
|
|
764
734
|
"skill.co-planner": "Planner",
|
|
765
735
|
"skill.co-oracle": "Architecture/code review",
|
|
@@ -2952,10 +2922,6 @@ window.__ModuleLoader__.load({
|
|
|
2952
2922
|
".cohub-row-id{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;}",
|
|
2953
2923
|
".cohub-badge{margin-left:auto;border-radius:999px;padding:1px 8px;font-size:11px;line-height:17px;white-space:nowrap;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);}",
|
|
2954
2924
|
".cohub-badge-explicit{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary);}",
|
|
2955
|
-
// 四列:供应商 / 模型 / 推理强度 / 重置。三列下拉都等分剩余宽度,重置按钮自适应。
|
|
2956
|
-
".cohub-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:8px;margin-top:8px;align-items:end;}",
|
|
2957
|
-
// 窄容器下 4 列会把下拉压到不可读:退成两列(前三个字段各占一行两列,按钮贴右下)。
|
|
2958
|
-
"@media (max-width:560px){.cohub-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}}",
|
|
2959
2925
|
".cohub-field{display:flex;flex-direction:column;gap:4px;min-width:0;}",
|
|
2960
2926
|
".cohub-label{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;}",
|
|
2961
2927
|
".cohub-select,.cohub-input{box-sizing:border-box;width:100%;height:32px;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:0 10px;font-size:13px;line-height:20px;}",
|
|
@@ -2975,7 +2941,7 @@ window.__ModuleLoader__.load({
|
|
|
2975
2941
|
".cohub-button-ghost{color:var(--dsw-alias-label-secondary);background:transparent;border:1px solid var(--dsw-alias-border-l2);}",
|
|
2976
2942
|
".cohub-button-ghost:hover:not(:disabled){color:var(--dsw-alias-label-primary);}",
|
|
2977
2943
|
".cohub-button:disabled{opacity:.45;cursor:default;}",
|
|
2978
|
-
// ──
|
|
2944
|
+
// ── 自定义团队区块(各自独立的草稿与保存按钮) ──
|
|
2979
2945
|
".cohub-roles{display:flex;flex-direction:column;gap:12px;margin-top:8px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l2);}",
|
|
2980
2946
|
".cohub-subtitle{margin:0;font-size:14px;font-weight:600;line-height:22px;}",
|
|
2981
2947
|
".cohub-role-summary{flex:1 1 140px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;}",
|
|
@@ -3046,7 +3012,7 @@ window.__ModuleLoader__.load({
|
|
|
3046
3012
|
/**
|
|
3047
3013
|
* settings.section 页面。
|
|
3048
3014
|
* @param props - 注入面:hooks.cohubSkills→useCohubSkills、动作、locale 提供的 t。
|
|
3049
|
-
* @returns
|
|
3015
|
+
* @returns 页面结构:团队 → 角色库(角色的提示词 / 绑定工具 / 运行模型),底部是 Config.skills 的保存动作条。
|
|
3050
3016
|
*/
|
|
3051
3017
|
function CohubSection(props) {
|
|
3052
3018
|
var t = typeof props.t === "function" ? props.t : fallbackTranslate;
|
|
@@ -3068,171 +3034,8 @@ window.__ModuleLoader__.load({
|
|
|
3068
3034
|
|
|
3069
3035
|
var locked = !state.writable || state.saving || state.conflicted;
|
|
3070
3036
|
var providers = state.providers || [];
|
|
3071
|
-
var modelsByProvider = state.modelsByProvider || {};
|
|
3072
3037
|
var rows = state.rows || [];
|
|
3073
3038
|
|
|
3074
|
-
function renderRow(row) {
|
|
3075
|
-
var known = SKILL_NAMES.indexOf(row.name) >= 0;
|
|
3076
|
-
var label = known ? t("skill." + row.name) : row.name;
|
|
3077
|
-
var providerIds = [];
|
|
3078
|
-
var providerOptions = [
|
|
3079
|
-
React.createElement("option", { key: "__inherit", value: "" }, t("providerInherit"))
|
|
3080
|
-
];
|
|
3081
|
-
for (var i = 0; i < providers.length; i += 1) {
|
|
3082
|
-
providerIds.push(providers[i].id);
|
|
3083
|
-
providerOptions.push(React.createElement("option", { key: providers[i].id, value: providers[i].id }, providers[i].label));
|
|
3084
|
-
}
|
|
3085
|
-
if (row.provider !== "" && providerIds.indexOf(row.provider) < 0) {
|
|
3086
|
-
// 已存但当前目录里没有:给一个不可选回显项,避免下拉显示成第一项造成误读。
|
|
3087
|
-
providerOptions.push(React.createElement("option", {
|
|
3088
|
-
key: "__missing-provider",
|
|
3089
|
-
value: row.provider,
|
|
3090
|
-
disabled: true
|
|
3091
|
-
}, state.catalogStatus === "ready" ? t("unavailableOption", { value: row.provider }) : row.provider));
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
var models = modelsByProvider[row.provider] || [];
|
|
3095
|
-
var modelControl;
|
|
3096
|
-
if (row.provider === "") {
|
|
3097
|
-
modelControl = React.createElement("select", { className: "cohub-select", value: "", disabled: true },
|
|
3098
|
-
React.createElement("option", { value: "" }, t("selectProviderFirst")));
|
|
3099
|
-
} else if (state.catalogStatus === "loading") {
|
|
3100
|
-
modelControl = React.createElement("select", { className: "cohub-select", value: "", disabled: true },
|
|
3101
|
-
React.createElement("option", { value: "" }, t("loading")));
|
|
3102
|
-
} else if (models.length > 0) {
|
|
3103
|
-
// 未保存 model 时必须插入 value="" 的占位项。否则 <select value=""> 会被浏览器
|
|
3104
|
-
// 渲染成列表第一项,用户以为已选、实际存的仍是空 → 子代理拿不到模型(UNKNOWN_MODEL)。
|
|
3105
|
-
var modelOptions = [React.createElement("option", { key: "__inherit", value: "" }, t("modelInherit"))];
|
|
3106
|
-
var modelIds = [];
|
|
3107
|
-
for (var m = 0; m < models.length; m += 1) {
|
|
3108
|
-
modelIds.push(models[m].id);
|
|
3109
|
-
modelOptions.push(React.createElement("option", { key: models[m].id, value: models[m].id }, models[m].label));
|
|
3110
|
-
}
|
|
3111
|
-
if (row.model !== "" && modelIds.indexOf(row.model) < 0) {
|
|
3112
|
-
modelOptions.push(React.createElement("option", {
|
|
3113
|
-
key: "__missing-model",
|
|
3114
|
-
value: row.model,
|
|
3115
|
-
disabled: true
|
|
3116
|
-
}, t("unavailableOption", { value: row.model })));
|
|
3117
|
-
}
|
|
3118
|
-
modelControl = React.createElement("select", {
|
|
3119
|
-
className: "cohub-select",
|
|
3120
|
-
value: row.model === "" ? "" : row.model,
|
|
3121
|
-
disabled: locked,
|
|
3122
|
-
"aria-label": label + " · " + t("model"),
|
|
3123
|
-
onChange: function (event) {
|
|
3124
|
-
props.editRow(row.name, "model", event.target.value);
|
|
3125
|
-
}
|
|
3126
|
-
}, modelOptions);
|
|
3127
|
-
} else {
|
|
3128
|
-
// 该供应商没有可用模型目录(或目录加载失败)→ 降级为手填 model id。
|
|
3129
|
-
modelControl = React.createElement("input", {
|
|
3130
|
-
className: "cohub-input",
|
|
3131
|
-
type: "text",
|
|
3132
|
-
value: row.model,
|
|
3133
|
-
disabled: locked,
|
|
3134
|
-
"aria-label": label + " · " + t("model"),
|
|
3135
|
-
placeholder: state.catalogStatus === "ready" ? t("emptyModel") + " / " + t("customModel") : t("customModel"),
|
|
3136
|
-
onChange: function (event) {
|
|
3137
|
-
props.editRow(row.name, "model", event.target.value);
|
|
3138
|
-
}
|
|
3139
|
-
});
|
|
3140
|
-
}
|
|
3141
|
-
|
|
3142
|
-
var configured = row.provider !== "" || row.model !== "" || effortOf(row) !== "";
|
|
3143
|
-
|
|
3144
|
-
// 第三个下拉:推理强度。档位来自模型目录(models[].reasoning.efforts),
|
|
3145
|
-
// 按「供应商 + 模型」这一对查表;不支持的模型整个 reasoning 字段缺失 → 禁用并提示。
|
|
3146
|
-
var currentEffort = effortOf(row);
|
|
3147
|
-
var efforts = [];
|
|
3148
|
-
if (row.provider !== "" && row.model !== "") {
|
|
3149
|
-
var byModel = state.effortsByModel && state.effortsByModel[row.provider];
|
|
3150
|
-
var list = byModel ? byModel[row.model] : undefined;
|
|
3151
|
-
if (Array.isArray(list)) efforts = list;
|
|
3152
|
-
}
|
|
3153
|
-
var effortControl;
|
|
3154
|
-
if (row.provider === "") {
|
|
3155
|
-
effortControl = React.createElement("select", { className: "cohub-select", value: "", disabled: true },
|
|
3156
|
-
React.createElement("option", { value: "" }, t("selectProviderFirst")));
|
|
3157
|
-
} else if (state.catalogStatus === "loading") {
|
|
3158
|
-
effortControl = React.createElement("select", { className: "cohub-select", value: "", disabled: true },
|
|
3159
|
-
React.createElement("option", { value: "" }, t("loading")));
|
|
3160
|
-
} else if (row.model === "") {
|
|
3161
|
-
effortControl = React.createElement("select", { className: "cohub-select", value: "", disabled: true },
|
|
3162
|
-
React.createElement("option", { value: "" }, t("effortSelectModelFirst")));
|
|
3163
|
-
} else if (efforts.length === 0) {
|
|
3164
|
-
// 模型目录里没有该模型的 reasoning 信息(或手填了不在目录里的 model id)→ 不支持。
|
|
3165
|
-
effortControl = React.createElement("select", { className: "cohub-select", value: "", disabled: true },
|
|
3166
|
-
React.createElement("option", { value: "" }, t("effortUnsupported")));
|
|
3167
|
-
} else {
|
|
3168
|
-
// 与模型下拉同理:value="" 的继承占位项必须在首位,否则浏览器把第一档显示成已选,
|
|
3169
|
-
// 而实际存的是空串(用户以为配了 high,其实继承父会话)。
|
|
3170
|
-
var effortOptions = [React.createElement("option", { key: "__inherit", value: "" }, t("effortInherit"))];
|
|
3171
|
-
var effortIds = [];
|
|
3172
|
-
for (var e = 0; e < efforts.length; e += 1) {
|
|
3173
|
-
effortIds.push(efforts[e].id);
|
|
3174
|
-
effortOptions.push(React.createElement("option", { key: efforts[e].id, value: efforts[e].id }, efforts[e].label));
|
|
3175
|
-
}
|
|
3176
|
-
if (currentEffort !== "" && effortIds.indexOf(currentEffort) < 0) {
|
|
3177
|
-
// 已配强度不在当前模型档位里(手改过 YAML / 换过模型)→ 给不可选回显项,别静默改成第一档。
|
|
3178
|
-
effortOptions.push(React.createElement("option", {
|
|
3179
|
-
key: "__missing-effort",
|
|
3180
|
-
value: currentEffort,
|
|
3181
|
-
disabled: true
|
|
3182
|
-
}, t("effortUnsupportedOption", { value: currentEffort })));
|
|
3183
|
-
}
|
|
3184
|
-
effortControl = React.createElement("select", {
|
|
3185
|
-
className: "cohub-select",
|
|
3186
|
-
value: currentEffort,
|
|
3187
|
-
disabled: locked,
|
|
3188
|
-
"aria-label": label + " · " + t("reasoningEffort"),
|
|
3189
|
-
onChange: function (event) {
|
|
3190
|
-
props.editRow(row.name, "reasoningEffort", event.target.value);
|
|
3191
|
-
}
|
|
3192
|
-
}, effortOptions);
|
|
3193
|
-
}
|
|
3194
|
-
|
|
3195
|
-
return React.createElement("li", { key: row.name, className: "cohub-row" },
|
|
3196
|
-
React.createElement("div", { className: "cohub-row-head" },
|
|
3197
|
-
React.createElement("span", { className: "cohub-row-name" }, label),
|
|
3198
|
-
React.createElement("span", { className: "cohub-row-id" }, row.name),
|
|
3199
|
-
React.createElement("span", {
|
|
3200
|
-
className: configured ? "cohub-badge cohub-badge-explicit" : "cohub-badge"
|
|
3201
|
-
}, configured ? t("configured") : t("inherited"))
|
|
3202
|
-
),
|
|
3203
|
-
React.createElement("div", { className: "cohub-fields" },
|
|
3204
|
-
React.createElement("div", { className: "cohub-field" },
|
|
3205
|
-
React.createElement("label", { className: "cohub-label" }, t("provider")),
|
|
3206
|
-
React.createElement("select", {
|
|
3207
|
-
className: "cohub-select",
|
|
3208
|
-
value: row.provider,
|
|
3209
|
-
disabled: locked,
|
|
3210
|
-
"aria-label": label + " · " + t("provider"),
|
|
3211
|
-
onChange: function (event) {
|
|
3212
|
-
props.editRow(row.name, "provider", event.target.value);
|
|
3213
|
-
}
|
|
3214
|
-
}, providerOptions)
|
|
3215
|
-
),
|
|
3216
|
-
React.createElement("div", { className: "cohub-field" },
|
|
3217
|
-
React.createElement("label", { className: "cohub-label" }, t("model")),
|
|
3218
|
-
modelControl
|
|
3219
|
-
),
|
|
3220
|
-
React.createElement("div", { className: "cohub-field" },
|
|
3221
|
-
React.createElement("label", { className: "cohub-label" }, t("reasoningEffort")),
|
|
3222
|
-
effortControl
|
|
3223
|
-
),
|
|
3224
|
-
React.createElement("button", {
|
|
3225
|
-
type: "button",
|
|
3226
|
-
className: "cohub-row-reset",
|
|
3227
|
-
disabled: locked || !configured,
|
|
3228
|
-
onClick: function () {
|
|
3229
|
-
props.resetRow(row.name);
|
|
3230
|
-
}
|
|
3231
|
-
}, t("reset"))
|
|
3232
|
-
)
|
|
3233
|
-
);
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3236
3039
|
/* ── 自定义团队:增删改 Config.customRoles ─────────────────── */
|
|
3237
3040
|
|
|
3238
3041
|
var roles = state.roles || [];
|
|
@@ -4242,9 +4045,6 @@ window.__ModuleLoader__.load({
|
|
|
4242
4045
|
)
|
|
4243
4046
|
);
|
|
4244
4047
|
|
|
4245
|
-
var items = [];
|
|
4246
|
-
for (var i = 0; i < rows.length; i += 1) items.push(renderRow(rows[i]));
|
|
4247
|
-
|
|
4248
4048
|
var status = null;
|
|
4249
4049
|
var statusClass = "cohub-status";
|
|
4250
4050
|
if (state.conflicted) {
|
|
@@ -4280,7 +4080,10 @@ window.__ModuleLoader__.load({
|
|
|
4280
4080
|
state.conflicted
|
|
4281
4081
|
? React.createElement("p", { className: "cohub-notice cohub-notice-warn" }, t("conflicted"))
|
|
4282
4082
|
: null,
|
|
4283
|
-
|
|
4083
|
+
teamsBlock,
|
|
4084
|
+
rolesBlock,
|
|
4085
|
+
// 角色库 / 角色编辑里的模型区写的是 Config.skills,统一由这条动作条落盘。
|
|
4086
|
+
// 顶部「每个代理一行」的模型区块已移除,这里只剩保存 / 放弃与状态提示。
|
|
4284
4087
|
React.createElement("div", { className: "cohub-actions" },
|
|
4285
4088
|
status !== null ? React.createElement("p", { className: statusClass }, status) : null,
|
|
4286
4089
|
React.createElement("button", {
|
|
@@ -4299,9 +4102,7 @@ window.__ModuleLoader__.load({
|
|
|
4299
4102
|
props.save();
|
|
4300
4103
|
}
|
|
4301
4104
|
}, t(state.saving ? "saving" : "save"))
|
|
4302
|
-
)
|
|
4303
|
-
teamsBlock,
|
|
4304
|
-
rolesBlock
|
|
4105
|
+
)
|
|
4305
4106
|
);
|
|
4306
4107
|
}
|
|
4307
4108
|
|
package/lib/index.js
CHANGED
|
@@ -629,6 +629,7 @@ function materializeJsTags(node, logger, platform = process.platform, path = "pl
|
|
|
629
629
|
}
|
|
630
630
|
return node;
|
|
631
631
|
}
|
|
632
|
+
var TEAM_OWNED_PRESET_IDS = ["co-orchestrator"];
|
|
632
633
|
function isSafePresetId2(id) {
|
|
633
634
|
return /^[a-z0-9][a-z0-9._-]*$/i.test(id) && !id.includes("..");
|
|
634
635
|
}
|
|
@@ -658,6 +659,10 @@ function loadCohubPresetDefs(presetsDir = COHUB_PRESETS_DIR, logger) {
|
|
|
658
659
|
for (const entry of entries) {
|
|
659
660
|
if (!entry.isDirectory() || !isSafePresetId2(entry.name))
|
|
660
661
|
continue;
|
|
662
|
+
if (TEAM_OWNED_PRESET_IDS.includes(entry.name)) {
|
|
663
|
+
logger?.info?.(`cohub: preset ${entry.name} 由团队注册接管(内置 dev 团队),档位注册跳过`);
|
|
664
|
+
continue;
|
|
665
|
+
}
|
|
661
666
|
const dir = join2(presetsDir, entry.name);
|
|
662
667
|
const agentFile = join2(dir, "agent.cordis.yml");
|
|
663
668
|
if (!existsSync2(agentFile))
|
|
@@ -810,6 +815,7 @@ var BUILTIN_TEAMS = [
|
|
|
810
815
|
id: "dev",
|
|
811
816
|
name: "开发团队",
|
|
812
817
|
description: "通用软件开发团队:调度 + 12 个专职子代理",
|
|
818
|
+
presetId: "co-orchestrator",
|
|
813
819
|
members: [
|
|
814
820
|
"co-fixer",
|
|
815
821
|
"co-designer",
|
|
@@ -5760,6 +5766,20 @@ function formatContractViolation(errors) {
|
|
|
5760
5766
|
}
|
|
5761
5767
|
|
|
5762
5768
|
// src/delegate.ts
|
|
5769
|
+
function normalizeAdvisorySignals(value) {
|
|
5770
|
+
if (value === undefined || value === null)
|
|
5771
|
+
return ["S2", "S3"];
|
|
5772
|
+
const raw = Array.isArray(value) ? value : [];
|
|
5773
|
+
const out = [];
|
|
5774
|
+
for (const item of raw) {
|
|
5775
|
+
if (typeof item !== "string")
|
|
5776
|
+
continue;
|
|
5777
|
+
const sig = item.trim().toUpperCase();
|
|
5778
|
+
if ((sig === "S2" || sig === "S3") && !out.includes(sig))
|
|
5779
|
+
out.push(sig);
|
|
5780
|
+
}
|
|
5781
|
+
return out;
|
|
5782
|
+
}
|
|
5763
5783
|
var PARALLEL_TOOL_DISCIPLINE = "【并行工具纪律】① 同一条消息内一次性发起全部独立只读查询,不要发一个等一个。" + "② 真并发的只读工具:read、read_image、web_search、web_fetch、subagent。" + "注意 glob、grep 虽然只读但不可并发(会被串行执行),别指望它们并行。" + "③ 可并发调用必须连续相邻,中间不要插 bash、edit、write、grep 等串行调用," + "否则其后调用另起一组、并发度归零([read, bash, read] 并发度=1,[read, read, read, bash] 并发度=3)。" + "④ 不要依赖平台真并发:需要 N 个互不依赖的子任务时,优先用 delegate_batch" + "(内部 Promise.allSettled,不依赖 agent loop 调度;该工具可用时)。";
|
|
5764
5784
|
var DELEGATE_PERSONA = "你是被委派的专职代理:严格遵循任务消息中的角色定义、关键约束、输出格式与工具指令,并完成末尾的具体任务。" + "你的首条用户消息(下方任务书)已含 `--- 你的具体任务 ---` 分隔符,即身份判据成立:不要调用 skill 工具加载 co-orchestrator 技能——技能指令已由 brief 注入。" + PARALLEL_TOOL_DISCIPLINE;
|
|
5765
5785
|
var DEFAULT_SPAWN_TRANSPORT = "spawn";
|
|
@@ -6100,16 +6120,43 @@ function normalizeArguments(args) {
|
|
|
6100
6120
|
}
|
|
6101
6121
|
return raw.replace(/\s+/g, " ").trim().slice(0, 200);
|
|
6102
6122
|
}
|
|
6123
|
+
function maskSecrets(text) {
|
|
6124
|
+
return text.replace(/\bsk-[A-Za-z0-9_-]{8,}/g, "sk-***").replace(/\bBearer\s+[A-Za-z0-9._-]{8,}/g, "Bearer ***").replace(/\b(api[_-]?key|token|secret|password)(\s*[:=]\s*)[^\s&,"']{6,}/gi, (_m, key, sep) => key + sep + "***").replace(/([?&](?:api[_-]?key|key|token|secret|password)=)[^&\s"']{6,}/gi, (_m, prefix) => prefix + "***");
|
|
6125
|
+
}
|
|
6126
|
+
function describeFailureDetail(value) {
|
|
6127
|
+
const seen = new Set;
|
|
6128
|
+
let cur = value;
|
|
6129
|
+
let text;
|
|
6130
|
+
while (cur !== null && cur !== undefined && typeof cur === "object" && !seen.has(cur)) {
|
|
6131
|
+
seen.add(cur);
|
|
6132
|
+
const next = cur.error ?? cur.errorMessage ?? cur.failure ?? cur.message ?? cur.cause;
|
|
6133
|
+
if (next === cur || next === null || next === undefined)
|
|
6134
|
+
break;
|
|
6135
|
+
cur = next;
|
|
6136
|
+
}
|
|
6137
|
+
if (typeof cur === "string")
|
|
6138
|
+
text = cur;
|
|
6139
|
+
else if (cur !== null && cur !== undefined && typeof cur !== "object")
|
|
6140
|
+
text = String(cur);
|
|
6141
|
+
if (text === undefined)
|
|
6142
|
+
return;
|
|
6143
|
+
const oneLine = maskSecrets(text.replace(/\s+/g, " ").trim());
|
|
6144
|
+
if (oneLine.length === 0)
|
|
6145
|
+
return;
|
|
6146
|
+
return oneLine.length > 200 ? oneLine.slice(0, 200) + "…" : oneLine;
|
|
6147
|
+
}
|
|
6103
6148
|
|
|
6104
6149
|
class StallWatchdog {
|
|
6105
6150
|
cfg;
|
|
6106
6151
|
onStall;
|
|
6152
|
+
onAdvisory;
|
|
6107
6153
|
off = null;
|
|
6108
6154
|
timer = null;
|
|
6109
6155
|
boundId = null;
|
|
6110
6156
|
buffer = new Map;
|
|
6111
6157
|
triggered = false;
|
|
6112
6158
|
maxBuffer = 5000;
|
|
6159
|
+
advisory = { sent: false, since: 0, signals: [] };
|
|
6113
6160
|
s = {
|
|
6114
6161
|
lastToolAt: 0,
|
|
6115
6162
|
lastToolResultAt: 0,
|
|
@@ -6125,18 +6172,22 @@ class StallWatchdog {
|
|
|
6125
6172
|
lastCallKey: null,
|
|
6126
6173
|
pendingCall: null
|
|
6127
6174
|
};
|
|
6128
|
-
constructor(cfg, onStall) {
|
|
6175
|
+
constructor(cfg, onStall, onAdvisory) {
|
|
6176
|
+
const idleMs = Math.max(0, cfg.idleMs ?? 600000);
|
|
6129
6177
|
this.cfg = {
|
|
6130
6178
|
enabled: cfg.enabled ?? false,
|
|
6131
6179
|
consecutiveErrors: Math.max(1, Math.trunc(cfg.consecutiveErrors ?? 3)),
|
|
6132
|
-
idleMs
|
|
6180
|
+
idleMs,
|
|
6133
6181
|
reasoningWithoutAction: Math.max(1, Math.trunc(cfg.reasoningWithoutAction ?? 50)),
|
|
6134
6182
|
loopCount: Math.max(1, Math.trunc(cfg.loopCount ?? 3)),
|
|
6135
6183
|
graceMs: Math.max(0, cfg.graceMs ?? 30000),
|
|
6136
6184
|
recoverable: cfg.recoverable ?? true,
|
|
6185
|
+
advisorySignals: normalizeAdvisorySignals(cfg.advisorySignals),
|
|
6186
|
+
advisoryMaxMs: Math.max(0, cfg.advisoryMaxMs ?? idleMs * 2),
|
|
6137
6187
|
checkIntervalMs: Math.max(50, cfg.checkIntervalMs ?? 1000)
|
|
6138
6188
|
};
|
|
6139
6189
|
this.onStall = onStall;
|
|
6190
|
+
this.onAdvisory = onAdvisory;
|
|
6140
6191
|
}
|
|
6141
6192
|
attach(ctx) {
|
|
6142
6193
|
if (this.off)
|
|
@@ -6248,6 +6299,11 @@ class StallWatchdog {
|
|
|
6248
6299
|
}
|
|
6249
6300
|
this.check();
|
|
6250
6301
|
}
|
|
6302
|
+
resetAdvisory() {
|
|
6303
|
+
if (!this.advisory.sent && this.advisory.since === 0)
|
|
6304
|
+
return;
|
|
6305
|
+
this.advisory = { sent: false, since: 0, signals: [] };
|
|
6306
|
+
}
|
|
6251
6307
|
check() {
|
|
6252
6308
|
if (this.triggered)
|
|
6253
6309
|
return;
|
|
@@ -6258,27 +6314,71 @@ class StallWatchdog {
|
|
|
6258
6314
|
const s2 = s.lastActivityAt > 0 && now - s.lastActivityAt > cfg.idleMs;
|
|
6259
6315
|
const s3 = s.reasoningStreak >= cfg.reasoningWithoutAction;
|
|
6260
6316
|
const s4 = s.loopStreak >= cfg.loopCount;
|
|
6261
|
-
|
|
6317
|
+
if (!s1 && !s2 && !s3 && !s4) {
|
|
6318
|
+
this.resetAdvisory();
|
|
6319
|
+
return;
|
|
6320
|
+
}
|
|
6321
|
+
const graceOk = s.lastSuccessAt === 0 || now - s.lastSuccessAt > cfg.graceMs;
|
|
6322
|
+
if (!graceOk) {
|
|
6323
|
+
this.resetAdvisory();
|
|
6324
|
+
return;
|
|
6325
|
+
}
|
|
6326
|
+
const advisoryOn = new Set(cfg.advisorySignals);
|
|
6327
|
+
const fatal = [];
|
|
6328
|
+
const advisoryNow = [];
|
|
6262
6329
|
if (s1)
|
|
6263
|
-
|
|
6330
|
+
fatal.push("S1:连续同类错误x" + s.consecutiveErrors);
|
|
6331
|
+
if (s4)
|
|
6332
|
+
fatal.push("S4:重复调用循环x" + s.loopStreak);
|
|
6264
6333
|
if (s2)
|
|
6265
|
-
|
|
6334
|
+
(advisoryOn.has("S2") ? advisoryNow : fatal).push("S2:无结果空转");
|
|
6266
6335
|
if (s3)
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
if (
|
|
6336
|
+
(advisoryOn.has("S3") ? advisoryNow : fatal).push("S3:纯推理无动作x" + s.reasoningStreak);
|
|
6337
|
+
const silentMs = s.lastActivityAt > 0 ? now - s.lastActivityAt : -1;
|
|
6338
|
+
const sinceSuccess = s.lastSuccessAt === 0 ? "无" : now - s.lastSuccessAt + "ms";
|
|
6339
|
+
if (fatal.length > 0) {
|
|
6340
|
+
const escalated = this.advisory.sent;
|
|
6341
|
+
const fired = [...new Set(fatal.concat(advisoryNow).concat(this.advisory.signals))];
|
|
6342
|
+
const diag = "停滞检测触发 [" + fired.join(", ") + "];距最近成功工具结果 " + sinceSuccess + ";最近工具结果 " + (s.lastToolResultAt === 0 ? "无" : now - s.lastToolResultAt + "ms 前") + (escalated ? ";已由停滞告警升级(告警持续 " + (now - this.advisory.since) + "ms)" : "");
|
|
6343
|
+
this.triggered = true;
|
|
6344
|
+
const info = {
|
|
6345
|
+
signals: fired,
|
|
6346
|
+
diagnostics: diag,
|
|
6347
|
+
...escalated ? { escalated: true } : {}
|
|
6348
|
+
};
|
|
6349
|
+
queueMicrotask(() => {
|
|
6350
|
+
if (this.triggered && this.off)
|
|
6351
|
+
this.onStall(info);
|
|
6352
|
+
});
|
|
6271
6353
|
return;
|
|
6272
|
-
|
|
6273
|
-
if (!
|
|
6354
|
+
}
|
|
6355
|
+
if (!this.advisory.sent) {
|
|
6356
|
+
this.advisory = { sent: true, since: now, signals: advisoryNow.slice() };
|
|
6357
|
+
const info = {
|
|
6358
|
+
signals: advisoryNow.slice(),
|
|
6359
|
+
diagnostics: "停滞告警(未中止)[" + advisoryNow.join(", ") + "];距最近活动 " + (silentMs < 0 ? "无" : silentMs + "ms") + ";持续满足超过 " + cfg.advisoryMaxMs + "ms 未恢复将升级为中止;距最近成功工具结果 " + sinceSuccess,
|
|
6360
|
+
advisory: true
|
|
6361
|
+
};
|
|
6362
|
+
queueMicrotask(() => {
|
|
6363
|
+
if (this.off && !this.triggered)
|
|
6364
|
+
this.onAdvisory?.(info);
|
|
6365
|
+
});
|
|
6274
6366
|
return;
|
|
6275
|
-
|
|
6276
|
-
const
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6367
|
+
}
|
|
6368
|
+
const heldMs = now - this.advisory.since;
|
|
6369
|
+
if (heldMs > cfg.advisoryMaxMs) {
|
|
6370
|
+
const fired = [...new Set(this.advisory.signals.concat(advisoryNow))];
|
|
6371
|
+
this.triggered = true;
|
|
6372
|
+
const info = {
|
|
6373
|
+
signals: fired,
|
|
6374
|
+
diagnostics: "停滞检测触发(告警超上限,已升级为中止)[" + fired.join(", ") + "];告警已持续 " + heldMs + "ms(上限 " + cfg.advisoryMaxMs + "ms);距最近活动 " + (silentMs < 0 ? "无" : silentMs + "ms") + ";距最近成功工具结果 " + sinceSuccess,
|
|
6375
|
+
escalated: true
|
|
6376
|
+
};
|
|
6377
|
+
queueMicrotask(() => {
|
|
6378
|
+
if (this.triggered && this.off)
|
|
6379
|
+
this.onStall(info);
|
|
6380
|
+
});
|
|
6381
|
+
}
|
|
6282
6382
|
}
|
|
6283
6383
|
}
|
|
6284
6384
|
function resolveSkillAndRoute(requestedSkill, getRoutes, ctx, logger, snapshot) {
|
|
@@ -6646,14 +6746,17 @@ function createDelegateTool(ctx, getRoutes, config = {}, getSettings) {
|
|
|
6646
6746
|
retryDelayMs: Math.max(0, retryCfg?.retryDelayMs ?? 1000),
|
|
6647
6747
|
retryableReasons: retryCfg?.retryableReasons ?? ["aborted"]
|
|
6648
6748
|
};
|
|
6749
|
+
const stallIdleMs = Math.max(0, retryCfg?.stall?.idleMs ?? 600000);
|
|
6649
6750
|
const stall = {
|
|
6650
6751
|
enabled: retryCfg?.stall?.enabled ?? false,
|
|
6651
6752
|
consecutiveErrors: Math.max(1, Math.trunc(retryCfg?.stall?.consecutiveErrors ?? 3)),
|
|
6652
|
-
idleMs:
|
|
6753
|
+
idleMs: stallIdleMs,
|
|
6653
6754
|
reasoningWithoutAction: Math.max(1, Math.trunc(retryCfg?.stall?.reasoningWithoutAction ?? 50)),
|
|
6654
6755
|
loopCount: Math.max(1, Math.trunc(retryCfg?.stall?.loopCount ?? 3)),
|
|
6655
6756
|
graceMs: Math.max(0, retryCfg?.stall?.graceMs ?? 30000),
|
|
6656
6757
|
recoverable: retryCfg?.stall?.recoverable ?? true,
|
|
6758
|
+
advisorySignals: normalizeAdvisorySignals(retryCfg?.stall?.advisorySignals),
|
|
6759
|
+
advisoryMaxMs: Math.max(0, retryCfg?.stall?.advisoryMaxMs ?? stallIdleMs * 2),
|
|
6657
6760
|
checkIntervalMs: Math.max(50, retryCfg?.stall?.checkIntervalMs ?? 1000)
|
|
6658
6761
|
};
|
|
6659
6762
|
const scheduleCfg = settingsNow.schedule ?? config.schedule;
|
|
@@ -6810,6 +6913,8 @@ function createDelegateTool(ctx, getRoutes, config = {}, getSettings) {
|
|
|
6810
6913
|
stallInfo = info;
|
|
6811
6914
|
ctx.logger?.info?.("[cohub stall] " + JSON.stringify(info));
|
|
6812
6915
|
forwardAbort();
|
|
6916
|
+
}, (info) => {
|
|
6917
|
+
ctx.logger?.warn?.("[cohub stall advisory] " + JSON.stringify(info));
|
|
6813
6918
|
});
|
|
6814
6919
|
const attached = watchdog.attach(ctx);
|
|
6815
6920
|
if (!attached) {
|
|
@@ -6947,7 +7052,9 @@ function createDelegateTool(ctx, getRoutes, config = {}, getSettings) {
|
|
|
6947
7052
|
return budgeted + formatDegradeNotes(degradeNotes) + contractMark;
|
|
6948
7053
|
}
|
|
6949
7054
|
lastReason = String(outcome?.stopReason ?? "unknown");
|
|
6950
|
-
|
|
7055
|
+
const outcomeDiag = typeof outcome?.diagnostic === "string" && outcome.diagnostic.length > 0 ? outcome.diagnostic : undefined;
|
|
7056
|
+
const residualDetail = describeFailureDetail(outcome);
|
|
7057
|
+
lastDiagnostic = outcomeDiag ?? (residualDetail === undefined ? undefined : "subagent error: " + residualDetail);
|
|
6951
7058
|
const partialRaw = contentText(outcome?.output ?? []);
|
|
6952
7059
|
lastPartial = partialRaw.slice(0, 500);
|
|
6953
7060
|
lastPartialBudget = budget.enabled && partialRaw.length > budget.partialMaxChars ? applyResultBudget(partialRaw, {
|
|
@@ -7663,6 +7770,12 @@ function createDelegateBatchTool(ctx, getRoutes, config = {}, getSettings) {
|
|
|
7663
7770
|
degradeNotes: taskNotes
|
|
7664
7771
|
});
|
|
7665
7772
|
const run = await spawnAgain(promptText, ac.signal);
|
|
7773
|
+
const timing = {};
|
|
7774
|
+
const markSettled = () => {
|
|
7775
|
+
if (timing.endedAt === undefined)
|
|
7776
|
+
timing.endedAt = Date.now();
|
|
7777
|
+
};
|
|
7778
|
+
run.result.then(markSettled, markSettled);
|
|
7666
7779
|
return {
|
|
7667
7780
|
taskId,
|
|
7668
7781
|
skillName: skill.name,
|
|
@@ -7673,6 +7786,7 @@ function createDelegateBatchTool(ctx, getRoutes, config = {}, getSettings) {
|
|
|
7673
7786
|
ac,
|
|
7674
7787
|
onExecAbort,
|
|
7675
7788
|
startedAt,
|
|
7789
|
+
timing,
|
|
7676
7790
|
startError: undefined,
|
|
7677
7791
|
skillError: undefined,
|
|
7678
7792
|
outputContract,
|
|
@@ -7789,7 +7903,7 @@ ${attribution}`,
|
|
|
7789
7903
|
}, val.startedAt, startErrAt));
|
|
7790
7904
|
continue;
|
|
7791
7905
|
}
|
|
7792
|
-
const { run, taskId, skillName, skillTag, taskNotes, ac, onExecAbort, startedAt, outputContract, buildPrompt, spawnAgain } = val;
|
|
7906
|
+
const { run, taskId, skillName, skillTag, taskNotes, ac, onExecAbort, startedAt, timing, outputContract, buildPrompt, spawnAgain } = val;
|
|
7793
7907
|
const taskEvents = batchEvents[index] ?? [];
|
|
7794
7908
|
let disposed = false;
|
|
7795
7909
|
const safeDispose = () => {
|
|
@@ -7798,11 +7912,11 @@ ${attribution}`,
|
|
|
7798
7912
|
disposed = true;
|
|
7799
7913
|
Promise.resolve().then(() => run.dispose()).catch(() => {});
|
|
7800
7914
|
};
|
|
7801
|
-
runs.push({ run, safeDispose, taskId, skillName, skillTag, taskNotes, ac, onExecAbort, startedAt, taskEvents, outputContract, buildPrompt, spawnAgain });
|
|
7915
|
+
runs.push({ run, safeDispose, taskId, skillName, skillTag, taskNotes, ac, onExecAbort, startedAt, timing, taskEvents, outputContract, buildPrompt, spawnAgain });
|
|
7802
7916
|
perTaskNotes.push({ taskId, notes: taskNotes });
|
|
7803
7917
|
run.result.catch(() => {});
|
|
7804
7918
|
}
|
|
7805
|
-
for (const { run, safeDispose, taskId, skillName, skillTag, taskNotes, ac, startedAt, taskEvents, outputContract, buildPrompt, spawnAgain } of runs) {
|
|
7919
|
+
for (const { run, safeDispose, taskId, skillName, skillTag, taskNotes, ac, startedAt, timing, taskEvents, outputContract, buildPrompt, spawnAgain } of runs) {
|
|
7806
7920
|
let outcome;
|
|
7807
7921
|
let timer = null;
|
|
7808
7922
|
const runId = typeof run?.id === "string" && run.id.length > 0 ? run.id : undefined;
|
|
@@ -7924,7 +8038,7 @@ ${attribution}`,
|
|
|
7924
8038
|
ctx.logger?.warn?.("[cohub contract] " + taskId + " 输出未满足契约(" + outputContract.level + "):" + check.errors.join(";"));
|
|
7925
8039
|
}
|
|
7926
8040
|
}
|
|
7927
|
-
const endedAt = Date.now();
|
|
8041
|
+
const endedAt = timing.endedAt ?? Date.now();
|
|
7928
8042
|
pushBatchEvent(taskEvents, {
|
|
7929
8043
|
taskId,
|
|
7930
8044
|
phase: "completed",
|
|
@@ -7948,8 +8062,9 @@ ${attribution}`,
|
|
|
7948
8062
|
...contractViolated ? { contractViolated: true } : {}
|
|
7949
8063
|
}, startedAt, endedAt, runId));
|
|
7950
8064
|
} else {
|
|
7951
|
-
const endedAt = Date.now();
|
|
7952
|
-
const
|
|
8065
|
+
const endedAt = timing.endedAt ?? Date.now();
|
|
8066
|
+
const residual = describeFailureDetail(outcome);
|
|
8067
|
+
const diag = typeof outcome?.diagnostic === "string" && outcome.diagnostic.length > 0 ? outcome.diagnostic : residual === undefined ? undefined : "subagent error: " + residual;
|
|
7953
8068
|
pushBatchEvent(taskEvents, {
|
|
7954
8069
|
taskId,
|
|
7955
8070
|
phase: "failed",
|
|
@@ -7968,8 +8083,9 @@ ${attribution}`,
|
|
|
7968
8083
|
}, startedAt, endedAt, runId));
|
|
7969
8084
|
}
|
|
7970
8085
|
} catch (e) {
|
|
7971
|
-
const endedAt = Date.now();
|
|
7972
|
-
const
|
|
8086
|
+
const endedAt = timing.endedAt ?? Date.now();
|
|
8087
|
+
const rawMessage = e instanceof Error ? e.message : String(e);
|
|
8088
|
+
const message = describeFailureDetail(rawMessage) ?? rawMessage;
|
|
7973
8089
|
pushBatchEvent(taskEvents, {
|
|
7974
8090
|
taskId,
|
|
7975
8091
|
phase: message.startsWith("超时") ? "timeout" : "failed",
|
|
@@ -10234,7 +10350,9 @@ var StallDetector = z2.object({
|
|
|
10234
10350
|
reasoningWithoutAction: z2.number().default(50),
|
|
10235
10351
|
loopCount: z2.number().default(3),
|
|
10236
10352
|
graceMs: z2.number().default(30000),
|
|
10237
|
-
recoverable: z2.boolean().default(true)
|
|
10353
|
+
recoverable: z2.boolean().default(true),
|
|
10354
|
+
advisorySignals: z2.array(z2.string()).default(["S2", "S3"]),
|
|
10355
|
+
advisoryMaxMs: z2.number().description("告警升级上限毫秒;省略 = idleMs × 2;0 = 告警后立即升级")
|
|
10238
10356
|
}).default({});
|
|
10239
10357
|
var DelegateRetry = z2.object({
|
|
10240
10358
|
maxRetries: z2.number().default(0),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cohub",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.11",
|
|
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",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
name: CoHub 调度者(带 Cordis)(cohub-cordis)
|
|
2
|
-
description: co-orchestrator 主代理 + co_* 运行时工具(co_inspect_list / co_define / co_run 等),可直接委派 co-cordis 子代理修插件、试挂载、审核 harness 组合。纯调度纪律 + cordis 能力。需要无 cordis 的纯调度版本请用 co-orchestrator。co-cordis 子代理
|
|
3
|
-
order:
|
|
1
|
+
name: 内部 · CoHub 调度者(带 Cordis)(cohub-cordis)
|
|
2
|
+
description: 内部工具集,供 cohub 编排自动选择,请勿手动选择。co-orchestrator 主代理 + co_* 运行时工具(co_inspect_list / co_define / co_run 等),可直接委派 co-cordis 子代理修插件、试挂载、审核 harness 组合。纯调度纪律 + cordis 能力。需要无 cordis 的纯调度版本请用 co-orchestrator。co-cordis 子代理
|
|
3
|
+
order: 900
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
name: CoHub 子代理·只读(cohub-subagent-readonly)
|
|
2
|
-
description: cohub 编排体系的只读子代理专用 preset:co-explorer / co-librarian / co-observer / co-oracle / co-planner / co-council / co-rule-* 使用;无写盘、无 Shell、无委派类工具。
|
|
1
|
+
name: 内部 · CoHub 子代理·只读(cohub-subagent-readonly)
|
|
2
|
+
description: 内部工具集,供 cohub 编排自动选择,请勿手动选择。cohub 编排体系的只读子代理专用 preset:co-explorer / co-librarian / co-observer / co-oracle / co-planner / co-council / co-rule-* 使用;无写盘、无 Shell、无委派类工具。
|
|
3
|
+
order: 900
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
name: CoHub 子代理·只读+联网(cohub-subagent-readonly-net)
|
|
2
|
-
description: cohub 编排体系的联网只读子代理专用 preset:co-librarian / co-observer / co-planner / co-council 使用;在 readonly 基础上接通外网抓取(web 检索类工具可用),仍无写盘、无 Shell、无委派类工具。
|
|
1
|
+
name: 内部 · CoHub 子代理·只读+联网(cohub-subagent-readonly-net)
|
|
2
|
+
description: 内部工具集,供 cohub 编排自动选择,请勿手动选择。cohub 编排体系的联网只读子代理专用 preset:co-librarian / co-observer / co-planner / co-council 使用;在 readonly 基础上接通外网抓取(web 检索类工具可用),仍无写盘、无 Shell、无委派类工具。
|
|
3
|
+
order: 900
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
name: CoHub 子代理·可写(cohub-subagent-write)
|
|
2
|
-
description: cohub 编排体系的实施类子代理专用 preset:co-fixer / co-designer / co-cordis 使用;含文件读写与 Shell,但不含任何委派类工具。
|
|
1
|
+
name: 内部 · CoHub 子代理·可写(cohub-subagent-write)
|
|
2
|
+
description: 内部工具集,供 cohub 编排自动选择,请勿手动选择。cohub 编排体系的实施类子代理专用 preset:co-fixer / co-designer / co-cordis 使用;含文件读写与 Shell,但不含任何委派类工具。
|
|
3
|
+
order: 900
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
name: CoHub 子代理·读写+Shell(cohub-subagent-write-shell)
|
|
2
|
-
description: cohub
|
|
1
|
+
name: 内部 · CoHub 子代理·读写+Shell(cohub-subagent-write-shell)
|
|
2
|
+
description: 内部工具集,供 cohub 编排自动选择,请勿手动选择。cohub 编排体系的万能实施类子代理专用 preset:co-fixer / co-designer / co-cordis 使用;文件读写 + Shell + 外网抓取,但不含任何委派类工具。
|
|
3
|
+
order: 900
|