@michengai/dsh-agency-agents 0.1.23 → 0.1.24
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/CHANGELOG.md +8 -7
- package/CHANGELOG.zh-CN.md +8 -7
- package/lib/client.js +63 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
The five most recent published versions are listed below.
|
|
6
6
|
|
|
7
|
+
## 0.1.24 — 2026-09-01
|
|
8
|
+
|
|
9
|
+
- Fixed raw keys such as `division.design` and `division.engineering` appearing as group titles in the Chinese `@` expert menu.
|
|
10
|
+
- Fixed expert emoji icons taking up space without rendering on Windows by applying a color-emoji font stack to expert menu items.
|
|
11
|
+
- Group titles now follow the active interface language and refresh after locale changes; added coverage for Chinese, English, and unknown-division fallback behavior.
|
|
12
|
+
|
|
13
|
+
Published package: [`@michengai/dsh-agency-agents@0.1.24`](https://www.npmjs.com/package/@michengai/dsh-agency-agents/v/0.1.24).
|
|
14
|
+
|
|
7
15
|
## 0.1.23 — 2026-08-31
|
|
8
16
|
|
|
9
17
|
- Added a compatibility adapter for the DSH settings API so the plugin works with both the legacy RC runtime and `@deepseek-ai/dsh@0.1.2-alpha.2`.
|
|
@@ -31,10 +39,3 @@ Published package: [`@michengai/dsh-agency-agents@0.1.21`](https://www.npmjs.com
|
|
|
31
39
|
- Refreshed the README with final product artwork.
|
|
32
40
|
|
|
33
41
|
Release tag: [`v0.1.20`](https://github.com/MichengAI/dsh-agency-agents/tree/v0.1.20).
|
|
34
|
-
|
|
35
|
-
## 0.1.19 — 2026-08-17
|
|
36
|
-
|
|
37
|
-
- Enforced task limits for single-agent summons.
|
|
38
|
-
- Added validation for expert names before dispatch.
|
|
39
|
-
|
|
40
|
-
Release tag: [`v0.1.19`](https://github.com/MichengAI/dsh-agency-agents/tree/v0.1.19).
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
以下记录最近发布的五个版本。
|
|
6
6
|
|
|
7
|
+
## 0.1.24 — 2026-09-01
|
|
8
|
+
|
|
9
|
+
- 修复中文界面中 `@` 专家菜单分组标题显示 `division.design`、`division.engineering` 等原始英文键的问题。
|
|
10
|
+
- 修复 Windows 下专家 emoji 图标只占位但不可见的问题,为专家菜单定向补充彩色 emoji 字体栈。
|
|
11
|
+
- 分组标题现在跟随界面语言显示,并在语言切换后自动刷新;新增中英文与未知分区回退测试。
|
|
12
|
+
|
|
13
|
+
发布包:[`@michengai/dsh-agency-agents@0.1.24`](https://www.npmjs.com/package/@michengai/dsh-agency-agents/v/0.1.24)。
|
|
14
|
+
|
|
7
15
|
## 0.1.23 — 2026-08-31
|
|
8
16
|
|
|
9
17
|
- 新增 DSH 设置 API 兼容适配层,同时兼容旧 RC 运行时与 `@deepseek-ai/dsh@0.1.2-alpha.2`。
|
|
@@ -31,10 +39,3 @@
|
|
|
31
39
|
- 使用最终产品视觉更新 README。
|
|
32
40
|
|
|
33
41
|
发布标签:[`v0.1.20`](https://github.com/MichengAI/dsh-agency-agents/tree/v0.1.20)。
|
|
34
|
-
|
|
35
|
-
## 0.1.19 — 2026-08-17
|
|
36
|
-
|
|
37
|
-
- 对单专家召唤强制执行任务数量限制。
|
|
38
|
-
- 调度前增加专家名称校验。
|
|
39
|
-
|
|
40
|
-
发布标签:[`v0.1.19`](https://github.com/MichengAI/dsh-agency-agents/tree/v0.1.19)。
|
package/lib/client.js
CHANGED
|
@@ -6717,11 +6717,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6717
6717
|
function displayName(e, active) {
|
|
6718
6718
|
return active === "en" ? e.nameEn : e.name;
|
|
6719
6719
|
}
|
|
6720
|
+
/** 按当前 locale 取 @ 菜单分组标题;未知分区保留原值,便于扩展来源安全降级。 */
|
|
6721
|
+
function inputTriggerSourceName(division, active) {
|
|
6722
|
+
return (active === "en" ? EN_DIVISION : ZH_DIVISION)[division] ?? division;
|
|
6723
|
+
}
|
|
6720
6724
|
/** 按当前 locale 取专家简介:en 用原始英文描述(缺失时回退中文),其余用中文描述。 */
|
|
6721
6725
|
function displayDescription(e, active) {
|
|
6722
6726
|
return active === "en" && e.descriptionEn !== "" ? e.descriptionEn : e.description;
|
|
6723
6727
|
}
|
|
6724
|
-
const
|
|
6728
|
+
const EXPERT_MENU_ITEM_SELECTORS = [...new Set(DIVISION_ORDER.flatMap((division) => [inputTriggerSourceName(division, "zh"), inputTriggerSourceName(division, "en")]))].map((name) => `[role="listbox"] div[data-source=${JSON.stringify(name)}] ~ button`);
|
|
6729
|
+
const MENU_NAME_OVERRIDE = EXPERT_MENU_ITEM_SELECTORS.map((selector) => `${selector} span:last-child`).join(",");
|
|
6730
|
+
/** Windows 优先使用彩色 emoji 字体,避免宿主字体栈让专家图标只占位不显示。 */
|
|
6731
|
+
const EXPERT_EMOJI_FONT_FAMILY = "\"Segoe UI Emoji\",\"Apple Color Emoji\",\"Noto Color Emoji\",sans-serif";
|
|
6732
|
+
const MENU_ICON_OVERRIDE = EXPERT_MENU_ITEM_SELECTORS.map((selector) => `${selector} span:first-child:not(:last-child)`).join(",");
|
|
6733
|
+
const CSS = ".aag-btn-wrap{position:relative;order:1;margin-right:-8px}.aag-btn{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 4px 0 8px;border:none;border-radius:24px;background:transparent;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px;font-weight:500;cursor:pointer}.aag-btn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.aag-menu{position:absolute;bottom:calc(100% + 4px);left:0;box-sizing:border-box;padding:4px;display:flex;flex-direction:column;gap:0;width:300px;max-width:360px;max-height:calc(100vh - 24px);overflow-y:auto;border:1px solid var(--dsw-alias-border-inverted);border-radius:12px;background:var(--dsw-specific-menu);box-shadow:var(--dsw-shadow-lv3);z-index:10000}.aag-menu-title{padding:8px 10px;font-size:12px;line-height:16px;color:var(--dsw-alias-label-tertiary)}.aag-menu-item{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:8px 10px;border:none;border-radius:10px;background:transparent;cursor:pointer;text-align:left;font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary);box-sizing:border-box}.aag-menu-item:hover{background:var(--dsw-alias-interactive-bg-hover)}.aag-emoji{flex:0 0 auto;font-size:16px}.aag-menu-empty{padding:8px 10px;color:var(--dsw-alias-label-secondary);font-size:13px}[data-composer-card] :has(> button[aria-haspopup=\"listbox\"]) > :nth-child(2){order:2}\n.aag-section{box-sizing:border-box;display:flex;min-width:0;max-width:760px;width:100%;margin:0 auto;flex-direction:column;gap:16px;padding:0 0 32px;color:var(--dsw-alias-label-primary)}\n.aag-toolbar{display:flex;align-items:flex-start;gap:16px;padding-bottom:12px}\n.aag-title{margin:0;font-size:20px;line-height:28px;font-weight:650;letter-spacing:-.2px}\n.aag-desc{margin:4px 0 0;max-width:42em;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}\n.aag-actions{display:flex;align-items:center;gap:8px;margin-left:auto}\n.aag-action{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 12px;border:1px solid transparent;border-radius:8px;background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground);font:inherit;font-size:13px;font-weight:550;cursor:pointer;transition:opacity 180ms ease,background 180ms ease,border-color 180ms ease}\n.aag-action:hover:not(:disabled){opacity:.9}.aag-action:disabled{opacity:.5;cursor:default}\n.aag-action-secondary{background:transparent;border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary)}\n.aag-action:focus-visible{outline:2px solid var(--dsw-alias-state-success-primary);outline-offset:2px}\n.aag-summary{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-2)}\n.aag-summary-count{font-size:18px;font-weight:650}.aag-summary-label{color:var(--dsw-alias-label-secondary);font-size:12px}.aag-summary-separator{width:1px;height:24px;background:var(--dsw-alias-border-l2)}\n.aag-group{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2)}\n.aag-group-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--dsw-alias-border-l1)}\n.aag-group-title{margin:0;font-size:14px;font-weight:600}.aag-count{color:var(--dsw-alias-label-tertiary);font-size:12px}\n.aag-row{display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid var(--dsw-alias-border-l1)}\n.aag-row:last-child{border-bottom:0}\n.aag-row-main{display:flex;min-width:0;flex:1;flex-direction:column;gap:3px}\n.aag-row-id{display:flex;align-items:center;gap:7px;min-width:0}\n.aag-row-name{overflow:hidden;font-size:13px;font-weight:500;line-height:20px;text-overflow:ellipsis;white-space:nowrap}\n.aag-tag{flex:none;padding:1px 6px;border:1px solid var(--dsw-alias-border-l3);border-radius:4px;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:16px}\n.aag-tag-on{border-color:var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}\n.aag-tag-off{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}\n.aag-note{overflow:hidden;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}\n.aag-error{color:var(--dsw-alias-state-error-primary);font-size:13px;line-height:20px}\n.aag-filters{display:flex;align-items:flex-end;gap:10px}\n.aag-field{display:flex;min-width:0;flex:1;flex-direction:column;gap:6px}\n.aag-field-category{flex:0 1 220px}\n.aag-field-search{flex:1 1 240px}\n.aag-label{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:16px}\n.aag-control{box-sizing:border-box;width:100%;min-height:32px;padding:0 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}\n.aag-control:focus-visible{outline:2px solid var(--dsw-alias-state-success-primary);outline-offset:2px}\n.aag-select{position:relative}\n.aag-select-trigger{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:32px;padding:0 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;text-align:left;cursor:pointer}\n.aag-select-trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}\n.aag-select-trigger:focus-visible{outline:2px solid var(--dsw-alias-state-success-primary);outline-offset:2px}\n.aag-select-trigger[aria-expanded=\"true\"]{border-color:var(--dsw-alias-state-success-primary)}\n.aag-select-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.aag-select-caret{flex:none;width:12px;height:12px;color:var(--dsw-alias-label-tertiary)}\n.aag-select-menu{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:30;box-sizing:border-box;max-height:280px;overflow:auto;padding:4px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-specific-menu,var(--dsw-alias-bg-layer-2));box-shadow:var(--dsw-shadow-lv3)}\n.aag-select-option{box-sizing:border-box;display:flex;align-items:center;width:100%;min-height:32px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;text-align:left;cursor:pointer}\n.aag-select-option:hover,.aag-select-option[data-active=\"true\"]{background:var(--dsw-alias-interactive-bg-hover)}\n.aag-select-option[aria-selected=\"true\"]{color:var(--dsw-alias-state-success-primary)}\n.aag-search-wrap{position:relative;display:flex;align-items:center}\n.aag-search{padding-right:32px}.aag-search::-webkit-search-cancel-button,.aag-search::-webkit-search-decoration{-webkit-appearance:none;appearance:none}\n.aag-search-clear{position:absolute;right:4px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:6px;background:transparent;color:var(--dsw-alias-label-tertiary);font:inherit;font-size:16px;line-height:1;cursor:pointer}\n.aag-search-clear:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}\n.aag-search-clear:focus-visible{outline:2px solid var(--dsw-alias-state-success-primary);outline-offset:2px}\n.aag-empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:28px 16px;border:1px dashed var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px;text-align:center}\n.aag-filter-meta{margin-left:auto;color:var(--dsw-alias-label-tertiary);font-size:12px}\n@media (max-width:560px){.aag-toolbar{flex-wrap:wrap}.aag-actions{margin-left:0}.aag-filters{flex-direction:column;align-items:stretch}.aag-field-category,.aag-field-search{flex:none}.aag-row{align-items:flex-start;flex-wrap:wrap}.aag-row>.aag-action{margin-left:auto}.aag-filter-meta{margin-left:0}}\n@media (prefers-reduced-motion:reduce){.aag-action{transition:none}}\n" + MENU_NAME_OVERRIDE + "{flex:1 1 auto;max-width:none;min-width:0}" + MENU_ICON_OVERRIDE + `{font-family:${EXPERT_EMOJI_FONT_FAMILY};font-size:16px;line-height:1;font-variant-emoji:emoji}`;
|
|
6725
6734
|
/** 将写失败映射到 agency 词条;非冲突错误返回 null,由调用方展示原始消息。 */
|
|
6726
6735
|
function writeErrorKey(error, options) {
|
|
6727
6736
|
if (error instanceof Error && error.message.includes("changed since it was read")) {
|
|
@@ -7197,38 +7206,71 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7197
7206
|
remote,
|
|
7198
7207
|
getActive
|
|
7199
7208
|
})));
|
|
7200
|
-
|
|
7201
|
-
const
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7209
|
+
const registerInputTriggerSources = (active) => {
|
|
7210
|
+
const disposers = [];
|
|
7211
|
+
try {
|
|
7212
|
+
for (const [i, div] of DIVISION_ORDER.entries()) {
|
|
7213
|
+
const source = {
|
|
7214
|
+
trigger: "@",
|
|
7215
|
+
name: inputTriggerSourceName(div, active),
|
|
7216
|
+
order: 100 + i,
|
|
7217
|
+
candidates: async (_session, req) => {
|
|
7218
|
+
const enabled = await readEnabled(remote).then((state) => state.enabled).catch(() => /* @__PURE__ */ new Set());
|
|
7219
|
+
const q = String(req.query ?? "").toLowerCase();
|
|
7220
|
+
return EXPERTS.filter((e) => e.division === div && enabled.has(e.slug) && (q === "" || e.name.toLowerCase().includes(q) || e.nameEn.toLowerCase().includes(q) || e.slug.includes(q))).map((e) => ({
|
|
7221
|
+
name: displayName(e, ctx.locale.getSnapshot().active),
|
|
7222
|
+
icon: e.emoji,
|
|
7223
|
+
hint: e.slug
|
|
7224
|
+
}));
|
|
7225
|
+
},
|
|
7226
|
+
onPick: (pick) => ({ text: t("summon.instruction", {
|
|
7227
|
+
name: pick.candidate.name,
|
|
7228
|
+
slug: pick.candidate.hint ?? ""
|
|
7229
|
+
}) })
|
|
7230
|
+
};
|
|
7231
|
+
disposers.push(ctx.inputTriggers.registerSource(source));
|
|
7232
|
+
}
|
|
7233
|
+
} catch (error) {
|
|
7234
|
+
for (const dispose of disposers.reverse()) dispose();
|
|
7235
|
+
throw error;
|
|
7236
|
+
}
|
|
7237
|
+
return () => {
|
|
7238
|
+
for (const dispose of disposers.reverse()) dispose();
|
|
7218
7239
|
};
|
|
7219
|
-
|
|
7220
|
-
|
|
7240
|
+
};
|
|
7241
|
+
ctx.effect(() => {
|
|
7242
|
+
let active = getActive();
|
|
7243
|
+
let disposeSources = registerInputTriggerSources(active);
|
|
7244
|
+
const unsubscribe = ctx.locale.subscribe(() => {
|
|
7245
|
+
const next = getActive();
|
|
7246
|
+
if (next === active) return;
|
|
7247
|
+
disposeSources();
|
|
7248
|
+
try {
|
|
7249
|
+
disposeSources = registerInputTriggerSources(next);
|
|
7250
|
+
active = next;
|
|
7251
|
+
} catch (error) {
|
|
7252
|
+
disposeSources = registerInputTriggerSources(active);
|
|
7253
|
+
console.error("[agency-agents] @ 菜单分组语言切换失败,已恢复原语言来源:", error);
|
|
7254
|
+
}
|
|
7255
|
+
});
|
|
7256
|
+
return () => {
|
|
7257
|
+
unsubscribe();
|
|
7258
|
+
disposeSources();
|
|
7259
|
+
};
|
|
7260
|
+
}, "agency-agents: @ menu sources");
|
|
7221
7261
|
return () => {
|
|
7222
7262
|
disposeRemote();
|
|
7223
7263
|
};
|
|
7224
7264
|
}
|
|
7225
7265
|
//#endregion
|
|
7266
|
+
exports.EXPERT_EMOJI_FONT_FAMILY = EXPERT_EMOJI_FONT_FAMILY;
|
|
7226
7267
|
exports.apply = apply;
|
|
7227
7268
|
exports.applyExpertSummon = applyExpertSummon;
|
|
7228
7269
|
exports.buildSummonInstruction = buildSummonInstruction;
|
|
7229
7270
|
exports.compareExpertName = compareExpertName;
|
|
7230
7271
|
exports.filterExperts = filterExperts;
|
|
7231
7272
|
exports.inject = inject;
|
|
7273
|
+
exports.inputTriggerSourceName = inputTriggerSourceName;
|
|
7232
7274
|
exports.matchExpertQuery = matchExpertQuery;
|
|
7233
7275
|
exports.normalizeExpertQuery = normalizeExpertQuery;
|
|
7234
7276
|
exports.writeErrorKey = writeErrorKey;
|
package/package.json
CHANGED