@michengai/dsh-agency-agents 1.0.7 → 1.0.8

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 CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  This file records features and upgrade boundaries. npm and GitHub Releases remain the publication source of truth.
6
6
 
7
+ ## 1.0.8 - 2026-10-05
8
+
9
+ ### Improvements
10
+
11
+ - Opening and switching sessions stays smoother when the MCP connector is also enabled.
12
+ - Expert team tools follow the current language and still update immediately when switching between Chinese and English.
13
+
7
14
  ## 1.0.7 - 2026-09-30
8
15
 
9
16
  ### Improvements
@@ -4,6 +4,13 @@
4
4
 
5
5
  本文件记录版本功能与升级边界。正式发布状态以 npm 和 GitHub Releases 为准。
6
6
 
7
+ ## 1.0.8 - 2026-10-05
8
+
9
+ ### 体验优化
10
+
11
+ - 同时启用 MCP 连接器时,打开和切换会话更顺畅。
12
+ - 专家团工具会跟随当前语言,切换中英文后仍然即时更新。
13
+
7
14
  ## 1.0.7 - 2026-09-30
8
15
 
9
16
  ### 体验优化
package/README.md CHANGED
@@ -69,7 +69,7 @@ Retain `list_experts`, `summon_expert`, and `summon_experts`. Add `list_expert_t
69
69
  - Team configuration lives in the host `agency-agents` settings namespace. Keep drafts on edit conflicts and review the latest configuration. Disabling or deleting teams does not disable experts or delete historical conversations.
70
70
  - Experts cannot summon further experts or automatically add analysis rounds. Cancellation prevents queued starts; completed results and failures are reported separately.
71
71
 
72
- > This README describes version 1.0.7; npm and GitHub Releases determine publication status. See the [changelog](CHANGELOG.md) for the full changes and [release notes](RELEASE_NOTES.md) for the bilingual release description. Upgrades retain expert settings. Back up settings before downgrading because older versions do not support teams.
72
+ > This README describes version 1.0.8; npm and GitHub Releases determine publication status. See the [changelog](CHANGELOG.md) for the full changes and [release notes](RELEASE_NOTES.md) for the bilingual release description. Upgrades retain expert settings. Back up settings before downgrading because older versions do not support teams.
73
73
  ## Screenshots
74
74
 
75
75
  The screenshots below show the 1.0.0 interface in Chinese. Experts and expert teams share the same settings page.
package/README.zh-CN.md CHANGED
@@ -69,7 +69,7 @@
69
69
  - 团队配置保存在宿主 `agency-agents` 命名空间。编辑冲突保留草稿并提示核对最新配置;停用或删除团队不会停用专家,也不会删除历史会话。
70
70
  - 专家不得继续召唤专家或自动追加分析轮次。取消会停止未启动任务;已有结果和失败原因分别报告。
71
71
 
72
- > 本 README 描述 1.0.7,正式发行以 npm 和 GitHub Releases 为准。完整改动见[更新日志](CHANGELOG.zh-CN.md),双语版本说明见[发行说明](RELEASE_NOTES.md)。升级保留已有专家配置;回退旧版前先备份设置,旧版不具备团队功能。
72
+ > 本 README 描述 1.0.8,正式发行以 npm 和 GitHub Releases 为准。完整改动见[更新日志](CHANGELOG.zh-CN.md),双语版本说明见[发行说明](RELEASE_NOTES.md)。升级保留已有专家配置;回退旧版前先备份设置,旧版不具备团队功能。
73
73
  ## 界面预览
74
74
 
75
75
  以下为 1.0.0 中文界面截图,专家与专家团共用同一个设置页面。
package/RELEASE_NOTES.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ### 体验优化
4
4
 
5
- - 支持 DeepSeek Harness 0.2.0-rc.2,并继续兼容此前已支持的 RC 版本。
5
+ - 同时启用 MCP 连接器时,打开和切换会话更顺畅。
6
+ - 专家团工具会跟随当前语言,切换中英文后仍然即时更新。
6
7
 
7
8
  ---
8
9
 
@@ -10,4 +11,5 @@
10
11
 
11
12
  ### Improvements
12
13
 
13
- - Support DeepSeek Harness 0.2.0-rc.2, and keep the previously supported release candidates.
14
+ - Opening and switching sessions stays smoother when the MCP connector is also enabled.
15
+ - Expert team tools follow the current language and still update immediately when switching between Chinese and English.
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { C as unquote, P as ZH_NAME, S as truncate, _ as resolveCatalogRoot, a as SUMMON_EXPERTS_MAX, b as stripBom, c as createAgencyPersonaSource, d as loadCatalog, f as mapPool, g as readLocalizedExpertPrompt, h as readExpertPrompt, i as SUMMON_EXPERTS_CONCURRENCY, l as inject, m as parseFrontmatter, n as Config, o as SUMMON_TASK_MAX_CHARS, p as name, r as DEFAULT_DIVISIONS, s as apply, t as AGENCY_PERSONA_SERVICE, u as liveSchemaField, v as resolveExpert, w as validateSummonSpecs, x as toSummonItemResult, y as sanitize } from "./src-D62nL1RE.js";
1
+ import { C as unquote, P as ZH_NAME, S as truncate, _ as resolveCatalogRoot, a as SUMMON_EXPERTS_MAX, b as stripBom, c as createAgencyPersonaSource, d as loadCatalog, f as mapPool, g as readLocalizedExpertPrompt, h as readExpertPrompt, i as SUMMON_EXPERTS_CONCURRENCY, l as inject, m as parseFrontmatter, n as Config, o as SUMMON_TASK_MAX_CHARS, p as name, r as DEFAULT_DIVISIONS, s as apply, t as AGENCY_PERSONA_SERVICE, u as liveSchemaField, v as resolveExpert, w as validateSummonSpecs, x as toSummonItemResult, y as sanitize } from "./src-XDq4eHLn.js";
2
2
  export { AGENCY_PERSONA_SERVICE, Config, DEFAULT_DIVISIONS, SUMMON_EXPERTS_CONCURRENCY, SUMMON_EXPERTS_MAX, SUMMON_TASK_MAX_CHARS, ZH_NAME, apply, createAgencyPersonaSource, inject, liveSchemaField, loadCatalog, mapPool, name, parseFrontmatter, readExpertPrompt, readLocalizedExpertPrompt, resolveCatalogRoot, resolveExpert, sanitize, stripBom, toSummonItemResult, truncate, unquote, validateSummonSpecs };
package/lib/remote.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as CUSTOM_EXPERT_SLUG, D as readHostLocale, E as formatHost, F as AGENCY_TEAM_SERVICE, I as teamInputSchema, L as teamSnapshotSchema, M as customExpertInputSchema, N as expertEditSchema, O as settingsNamespaceCompat, R as teamText, T as nativeTeamMemberName, g as readLocalizedExpertPrompt, h as readExpertPrompt, j as catalogSnapshotSchema, k as AGENCY_LIBRARY_SERVICE, t as AGENCY_PERSONA_SERVICE } from "./src-D62nL1RE.js";
1
+ import { A as CUSTOM_EXPERT_SLUG, D as readHostLocale, E as formatHost, F as AGENCY_TEAM_SERVICE, I as teamInputSchema, L as teamSnapshotSchema, M as customExpertInputSchema, N as expertEditSchema, O as settingsNamespaceCompat, R as teamText, T as nativeTeamMemberName, g as readLocalizedExpertPrompt, h as readExpertPrompt, j as catalogSnapshotSchema, k as AGENCY_LIBRARY_SERVICE, t as AGENCY_PERSONA_SERVICE } from "./src-XDq4eHLn.js";
2
2
  import { z } from "zod";
3
3
  import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
4
4
  //#region src/remote-contract.ts
@@ -258,7 +258,7 @@ function teamText(locale, key, values = []) {
258
258
  }
259
259
  //#endregion
260
260
  //#region src/team-tool-locale.ts
261
- /** 每次生成模型工具说明时读取当前语言;真实宿主注册及组装契约由 team-tool-host.test.ts 验证。 */
261
+ /** 每次生成模型工具说明时读取语言快照;locale 不应调用全局配置投影。 */
262
262
  function localizeTeamTool(tool, locale) {
263
263
  const { description, parameters } = tool;
264
264
  return {
@@ -1928,6 +1928,44 @@ function readHostLocale(ctx) {
1928
1928
  return "zh";
1929
1929
  }
1930
1930
  }
1931
+ /** 工具 schema 只读语言快照;初始化、locale 激活和语言变更后才调用 describe。 */
1932
+ function createHostLocaleReader(ctx) {
1933
+ let current = readHostLocale(ctx);
1934
+ let scheduled = false;
1935
+ let refreshing = false;
1936
+ let disposed = false;
1937
+ const scheduleRefresh = () => {
1938
+ if (disposed || refreshing || scheduled) return;
1939
+ scheduled = true;
1940
+ queueMicrotask(() => {
1941
+ scheduled = false;
1942
+ if (disposed) return;
1943
+ refreshing = true;
1944
+ try {
1945
+ current = readHostLocale(ctx);
1946
+ } finally {
1947
+ refreshing = false;
1948
+ }
1949
+ });
1950
+ };
1951
+ ctx.on?.("settings/document-updated", (ns) => {
1952
+ if (ns === LOCALE_SETTINGS_NAMESPACE) scheduleRefresh();
1953
+ });
1954
+ ctx.on?.("internal/status", (fiber) => {
1955
+ const entry = fiber.entry;
1956
+ if (fiber.state === 2 && entry?.options?.id === LOCALE_SETTINGS_NAMESPACE) scheduleRefresh();
1957
+ });
1958
+ ctx.effect?.(() => () => {
1959
+ disposed = true;
1960
+ });
1961
+ return () => {
1962
+ try {
1963
+ const section = ctx.settings?.get?.(LOCALE_SETTINGS_NAMESPACE);
1964
+ if (section !== void 0) current = resolveHostLocale(section.preference);
1965
+ } catch {}
1966
+ return current;
1967
+ };
1968
+ }
1931
1969
  /** 分区查询同时认 key、中文名和英文名。 */
1932
1970
  function matchDivision(query, division) {
1933
1971
  const q = query.trim().toLowerCase();
@@ -2958,7 +2996,7 @@ function apply(ctx, config) {
2958
2996
  customExperts: []
2959
2997
  });
2960
2998
  const enabledSet = () => new Set(settingsSource().enabled);
2961
- const activeLocale = () => readHostLocale(ctx);
2999
+ const activeLocale = createHostLocaleReader(ctx);
2962
3000
  const teamTx = (key, values) => teamText(activeLocale(), key, values);
2963
3001
  const catalogRoot = resolveCatalogRoot(config.root);
2964
3002
  const basePersonaSource = createAgencyPersonaSource(catalogRoot, config.divisions, async () => {
@@ -3023,24 +3061,24 @@ function apply(ctx, config) {
3023
3061
  retryCleanup();
3024
3062
  },
3025
3063
  onChange: () => {},
3026
- validate: (value) => validateAgencySettings(value, readHostLocale(ctx))
3027
- }, void 0, readHostLocale(ctx));
3064
+ validate: (value) => validateAgencySettings(value, activeLocale())
3065
+ }, void 0, activeLocale());
3028
3066
  else if (isLiveValue(config.enabled)) {
3029
- settingsSource = () => readAgencySettings(config, readHostLocale(ctx));
3067
+ settingsSource = () => readAgencySettings(config, activeLocale());
3030
3068
  retryCleanup();
3031
3069
  const settingsApi = ctx.settings;
3032
3070
  const fiber = ctx.fiber;
3033
3071
  if (typeof ctx.effect === "function" && fiber !== void 0 && typeof settingsApi.configure === "function") ctx.effect(() => settingsApi.configure({ auto: false }, fiber), "agency-agents: settings presentation");
3034
3072
  if (typeof ctx.effect === "function") ctx.effect(() => {
3035
3073
  let cancelled = false;
3036
- recoverImportedAgencySettings(ctx, settingsNamespace, () => settingsSource(), () => cancelled, void 0, readHostLocale(ctx)).catch((error) => {
3074
+ recoverImportedAgencySettings(ctx, settingsNamespace, () => settingsSource(), () => cancelled, void 0, activeLocale()).catch((error) => {
3037
3075
  console.warn("[agency-agents] 旧设置导入失败,数据仍保留在 settings.yaml.imported:", error);
3038
3076
  });
3039
3077
  return () => {
3040
3078
  cancelled = true;
3041
3079
  };
3042
3080
  }, "agency-agents: import legacy settings");
3043
- } else throw new Error(formatHost(readHostLocale(ctx), "error.settingsLiveUnsupported"));
3081
+ } else throw new Error(formatHost(activeLocale(), "error.settingsLiveUnsupported"));
3044
3082
  const personaSource = { async getPrompt(slug, division, locale) {
3045
3083
  if (slug.startsWith("custom-") && settingsSource().customExperts?.some((item) => item.slug === slug)) {
3046
3084
  const expert = await library.getCustom(slug);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@michengai/dsh-agency-agents",
3
3
  "description": "DSH Agency Agents — 为 DeepSeek Harness 提供 321 名可召唤的专业智能体 · 321 summonable domain experts for DeepSeek Harness",
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",
7
7
  "engines": {