dsh-agent-team-presets 0.3.0 → 0.3.2

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/lib/client.js CHANGED
@@ -18836,7 +18836,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18836
18836
  "id": string$1().readonly().describe("Stable identity."),
18837
18837
  "packageName": string$1().readonly().describe("Package the row is about."),
18838
18838
  "source": string$1().readonly().describe("Upstream revision the prebuilt replacement came from."),
18839
- "supportedVersion": string$1().readonly().describe("The version this build ships a replacement for."),
18839
+ "service": string$1().readonly().describe("Service a patched target registers; the page reads it to tell \"active\" from \"installed\"."),
18840
+ "supportedVersion": string$1().readonly().describe("The version whose replacement applies to this row (the newest supported one when none matches)."),
18841
+ "supportedVersions": array(string$1()).readonly().describe("Every upstream version this build ships a replacement for."),
18840
18842
  "installedVersion": string$1().readonly().optional().describe("Installed version, when the package is present."),
18841
18843
  "state": union([
18842
18844
  literal("absent"),
@@ -19644,9 +19646,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
19644
19646
  "type": "string",
19645
19647
  "description": "Upstream revision the prebuilt replacement came from."
19646
19648
  },
19649
+ "service": {
19650
+ "type": "string",
19651
+ "description": "Service a patched target registers; the page reads it to tell \"active\" from \"installed\"."
19652
+ },
19647
19653
  "supportedVersion": {
19648
19654
  "type": "string",
19649
- "description": "The version this build ships a replacement for."
19655
+ "description": "The version whose replacement applies to this row (the newest supported one when none matches)."
19656
+ },
19657
+ "supportedVersions": {
19658
+ "type": "array",
19659
+ "items": { "type": "string" },
19660
+ "description": "Every upstream version this build ships a replacement for."
19650
19661
  },
19651
19662
  "installedVersion": {
19652
19663
  "type": "string",
@@ -19672,7 +19683,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
19672
19683
  "id",
19673
19684
  "packageName",
19674
19685
  "source",
19686
+ "service",
19675
19687
  "supportedVersion",
19688
+ "supportedVersions",
19676
19689
  "state"
19677
19690
  ],
19678
19691
  "additionalProperties": true
@@ -19880,7 +19893,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
19880
19893
  },
19881
19894
  sourceLocation: {
19882
19895
  "file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
19883
- "line": 272,
19896
+ "line": 274,
19884
19897
  "column": 9
19885
19898
  }
19886
19899
  },
@@ -22511,7 +22524,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
22511
22524
  officialSkillBindings: OFFICIAL_RESEARCH_SKILLS
22512
22525
  }
22513
22526
  ];
22514
- BUILTIN_TEAM_CATALOG.map((entry) => entry.id);
22527
+ /** Every official Team identity, in install order. */
22528
+ const BUILTIN_TEAM_IDS = BUILTIN_TEAM_CATALOG.map((entry) => entry.id);
22515
22529
  /**
22516
22530
  * Look up one official Team by identity.
22517
22531
  * @param id - Team identity.
@@ -22883,6 +22897,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
22883
22897
  restoreDefaultsHint: "Puts every preset this plugin ships back to its shipped name, description, prompts, colors, and roster. The model routes and tool permissions you configured stay as they are, and teams you created yourself are not touched.",
22884
22898
  defaultsRestored: "Default presets restored in this draft. Save to apply them.",
22885
22899
  defaultsUnchanged: "The default presets already match what this plugin ships; nothing was staged.",
22900
+ restoreMissingHint: "This deployment was offered the {count} built-in Team presets, but none of them are in the list. Unless you deleted them yourself, click \"Restore built-in presets\" to bring them back, then save.",
22886
22901
  importConfirm: "Import",
22887
22902
  cancel: "Cancel",
22888
22903
  close: "Close",
@@ -23222,6 +23237,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
23222
23237
  restoreDefaultsHint: "把插件自带的预设全部恢复到出厂的名称、说明、提示词、颜色和成员名单;你为它们配置的模型路由与工具权限保持不变,你自己创建的团队完全不受影响。",
23223
23238
  defaultsRestored: "默认预设已恢复到草稿,保存后生效。",
23224
23239
  defaultsUnchanged: "默认预设与插件出厂状态一致,无需恢复。",
23240
+ restoreMissingHint: "这个部署曾经拿到过插件自带的 {count} 个团队预设,但它们现在都不在列表里。如果不是你主动删除的,点「恢复内置预设」可以把它们找回来,然后记得保存。",
23225
23241
  importConfirm: "导入",
23226
23242
  cancel: "取消",
23227
23243
  close: "关闭",
@@ -26754,7 +26770,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
26754
26770
  if (typeof document !== "undefined" && !document.querySelector("style[data-team-presets-style=\"dsh-agent-team-presets:client/TeamPresetsSection.module.css\"]")) {
26755
26771
  const style = document.createElement("style");
26756
26772
  style.dataset.teamPresetsStyle = key$2;
26757
- style.textContent = "._628ArG_section{--tp-accent-violet:#8d6bff;min-height:100%;color:var(--dsw-alias-label-primary);flex-direction:column;display:flex}._628ArG_page{flex-direction:column;gap:10px;max-width:520px;padding-bottom:8px;display:flex}._628ArG_pageHead{flex-direction:column;gap:2px;display:flex}._628ArG_crumb{color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;align-self:flex-start;align-items:center;gap:4px;padding:0;font-size:12px;line-height:18px;display:inline-flex}._628ArG_crumb:hover{color:var(--dsw-alias-label-primary)}._628ArG_title{margin:0;font-size:15px;font-weight:500;line-height:22px}._628ArG_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._628ArG_empty{color:var(--dsw-alias-label-tertiary);margin:4px 0;font-size:12px;line-height:18px}._628ArG_sectionTitle{color:var(--dsw-alias-label-secondary);padding-top:2px;font-size:12px;line-height:18px}._628ArG_tabs{border-bottom:1px solid var(--dsw-alias-border-l2);gap:6px;margin-bottom:10px;display:flex}._628ArG_actionRow{gap:8px;display:flex}._628ArG_toolbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin:0;display:flex}._628ArG_toolbarGroup{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._628ArG_resultsHead{flex-direction:column;gap:2px;margin:0 0 8px;display:flex}._628ArG_resultCount{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._628ArG_resultNote{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:17px}._628ArG_dialogCopy{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;margin:0;font-size:13px;line-height:20px}._628ArG_dialogNote{color:var(--dsw-alias-label-tertiary);margin:10px 0 0;font-size:12px;line-height:18px}._628ArG_fileInput{display:none}._628ArG_conflict{flex-direction:column;gap:6px;display:flex}._628ArG_conflict+._628ArG_conflict{margin-top:16px}._628ArG_conflictLead{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._628ArG_conflictName{overflow-wrap:anywhere;font-size:13px;font-weight:500;line-height:18px}._628ArG_conflictMember{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 12px;display:flex}._628ArG_choiceRow{flex-wrap:wrap;gap:12px;display:flex}._628ArG_choice{cursor:pointer;align-items:center;gap:6px;font-size:12px;line-height:18px;display:inline-flex}._628ArG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-settings-card-fill);border-radius:var(--dsw-radius-xl);flex-direction:column;gap:10px;padding:10px 12px;display:flex}._628ArG_cardHead{justify-content:space-between;align-items:center;gap:8px;display:flex}._628ArG_cardTitle{font-size:13px;font-weight:500;line-height:20px}._628ArG_rows{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:17px;flex-direction:column;margin:0;padding:0;list-style:none;display:flex;overflow:hidden}._628ArG_rows>._628ArG_card{box-sizing:border-box;box-shadow:none;background:0 0;border:0;border-radius:0;flex-direction:row;align-items:center;gap:4px;min-height:64px;padding:6px 10px 6px 14px}._628ArG_rows>._628ArG_card:not(:last-child){border-bottom:1px solid var(--dsw-alias-border-l1)}._628ArG_rows>._628ArG_card:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_plainRows{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}._628ArG_plainRows>._628ArG_card{flex-direction:row;align-items:center;gap:4px;padding:8px 12px}._628ArG_entry{align-items:center;gap:4px;display:flex}._628ArG_entryRow,._628ArG_rowMain{min-width:0;color:inherit;font:inherit;text-align:left;border-radius:var(--dsw-radius-md);cursor:pointer;background:0 0;border:none;flex:auto;align-items:center;gap:8px;padding:4px 2px;display:flex}._628ArG_rowMain:hover,._628ArG_entryRow:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_rowText{flex-direction:column;flex:auto;min-width:0;display:flex}._628ArG_rowName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;overflow:hidden}._628ArG_rowMeta{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;overflow:hidden}._628ArG_rowActions{flex:none;gap:2px;display:flex}._628ArG_chevron{color:var(--dsw-alias-label-tertiary);flex:none;font-size:14px;line-height:18px}._628ArG_dot{background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:10px;height:10px}._628ArG_field{flex-direction:column;gap:4px;min-width:0;display:flex}._628ArG_field>*{box-sizing:border-box;min-width:0;max-width:100%}._628ArG_field input,._628ArG_field textarea,._628ArG_field select{box-sizing:border-box;width:100%;min-width:0;max-width:100%}._628ArG_fieldLabel{color:var(--dsw-alias-label-secondary);margin:10px 0 4px;font-size:12px;line-height:18px;display:block}._628ArG_input{box-sizing:border-box;width:100%;max-width:100%}._628ArG_textInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:100%;height:32px;color:var(--dsw-alias-label-primary);font:inherit;border-radius:8px;outline:none;padding:0 10px;font-size:13px}._628ArG_textInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}select._628ArG_select{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background-color:var(--dsw-specific-input-major);width:100%;height:32px;color:inherit;font:inherit;appearance:none;cursor:pointer;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23818a96' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 10px center;background-repeat:no-repeat;border-radius:8px;padding:0 30px 0 10px;font-size:13px}select._628ArG_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}select._628ArG_select:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._628ArG_toolGroup{flex-direction:column;gap:6px;min-width:0;display:flex}._628ArG_toolGroupHead{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}._628ArG_toolGroupToggle{min-width:0;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:6px;padding:0;display:flex}._628ArG_toolGroupCount{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}._628ArG_toolGrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));gap:10px 12px;min-width:0;display:grid}._628ArG_toolCheckbox{align-items:flex-start;min-width:0}._628ArG_toolCheckbox>span{overflow-wrap:anywhere}._628ArG_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:17px}._628ArG_warn{color:var(--dsw-alias-state-warn-label);margin:0;font-size:11px;line-height:17px}._628ArG_select{border-radius:var(--dsw-radius-lg);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-specific-input-major);width:100%;height:30px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;justify-content:space-between;align-items:center;gap:6px;padding:0 8px;font-size:12px;display:flex}select._628ArG_select:disabled{opacity:.5;cursor:default}._628ArG_selectLabel{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._628ArG_prompt{box-sizing:border-box;border-radius:var(--dsw-radius-lg);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-specific-input-major);width:100%;color:var(--dsw-alias-label-primary);font:inherit;resize:vertical;padding:8px;font-size:12px;line-height:18px}._628ArG_prompt:disabled{opacity:.6}._628ArG_swatches{flex-wrap:wrap;align-items:center;gap:6px;display:flex}._628ArG_swatch,._628ArG_swatchNone{border:.5px solid var(--dsw-alias-settings-card-stroke);cursor:pointer;border-radius:50%;width:18px;height:18px;padding:0}._628ArG_swatch[aria-pressed=true],._628ArG_swatchNone[aria-pressed=true]{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}._628ArG_swatchNone{background:0 0}._628ArG_footer{background:var(--dsw-alias-bg-base);border-top:1px solid var(--dsw-alias-border-l1);justify-content:flex-end;align-items:center;gap:10px;margin-top:auto;padding:8px 0 6px;display:flex}._628ArG_footerNotes{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-1);border-radius:8px;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;margin-right:auto;padding:6px 10px;display:flex}._628ArG_footerActions{white-space:nowrap;flex-shrink:0;align-items:center;gap:10px;display:flex}._628ArG_footerNote{color:var(--dsw-alias-label-tertiary);background:0 0;border:0;padding:0;font-size:11px;line-height:17px}._628ArG_sepTitle{margin:18px 0 8px;font-size:13px;font-weight:550}._628ArG_skillGrid{grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:9px;margin:10px 0 13px;display:grid}._628ArG_skillCard input{width:16px;height:16px;accent-color:var(--dsw-alias-state-business-primary);flex:none;margin:0}._628ArG_skillCard{cursor:pointer;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:10px;flex-direction:column;gap:8px;min-width:0;min-height:128px;padding:11px;transition:border-color .15s,background .15s,box-shadow .15s;display:flex;position:relative}._628ArG_skillCard:hover{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 6%, var(--dsw-alias-settings-card-fill));border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 38%, transparent)}._628ArG_skillCard:has(input:checked){background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, var(--dsw-alias-settings-card-fill));border-color:var(--dsw-alias-state-business-primary);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-state-business-primary) 45%, transparent)}._628ArG_skillCardTop{justify-content:space-between;align-items:flex-start;gap:6px;display:flex}._628ArG_skillCardName{overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font-size:12px;font-weight:550;line-height:1.45}._628ArG_skillCardDesc{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:11px;line-height:1.5;display:-webkit-box;overflow:hidden}._628ArG_skillCardTag{margin-top:auto}@media (width<=820px){._628ArG_skillGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}._628ArG_listToolbar{gap:8px;margin:0;display:flex}._628ArG_listSearch{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);min-width:0;color:var(--dsw-alias-label-primary);border-radius:9px;outline:none;flex:1;padding:8px 11px;font-size:13px}._628ArG_chipRow{flex-wrap:wrap;gap:4px;margin-bottom:8px;display:flex}._628ArG_chip{border:1px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border-radius:7px;padding:6px 10px;font-size:12px}._628ArG_chipActive{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary)}._628ArG_categoryPanel{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:10px;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;padding:9px 10px;display:flex}._628ArG_categoryPill{border:1px solid var(--dsw-alias-border-l3);border-radius:999px;align-items:center;gap:4px;padding:2px 4px 2px 9px;font-size:12px;display:inline-flex}._628ArG_pillInput{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:92px;color:var(--dsw-alias-label-primary);border-radius:6px;padding:1px 6px;font-size:12px}._628ArG_panel{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:12px;margin:12px 0;padding:12px 14px}._628ArG_muted{color:var(--dsw-alias-label-secondary);font-size:12.5px;line-height:1.55}._628ArG_filters{flex-direction:column;gap:6px;display:flex}._628ArG_filterRow{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._628ArG_filterLabel{color:var(--dsw-alias-label-secondary);flex:none;min-width:32px;font-size:12px}._628ArG_addRow{align-items:center;gap:8px;margin:10px 0 12px;display:flex}._628ArG_addRow ._628ArG_textInput{flex:auto;width:auto;min-width:0}._628ArG_addRow>*{white-space:nowrap;flex:none}._628ArG_selectWrap{position:relative}._628ArG_selectValue{text-overflow:ellipsis;white-space:nowrap;padding-right:4px;display:block;overflow:hidden}._628ArG_selectPop{z-index:30;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-3);background:rgb(from var(--dsw-specific-menu,var(--dsw-alias-bg-layer-3)) r g b / 1);box-shadow:var(--dsw-elevation-prominent);border-radius:10px;max-height:232px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow:auto}._628ArG_selectOption{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:0;border-radius:7px;padding:7px 10px;font-size:13px;display:block;overflow:hidden}._628ArG_selectOption:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_selectOptionActive{background:var(--dsw-alias-interactive-bg-active);font-weight:550}._628ArG_rowsEmpty{text-align:center;color:var(--dsw-alias-label-secondary);padding:22px 14px;font-size:12.5px;list-style:none}._628ArG_emptyPage{text-align:center;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l3);border-radius:9px;margin:12px 0;padding:18px;font-size:13px}._628ArG_originTag{white-space:nowrap;border:1px solid #0000;border-radius:5px;align-self:flex-start;align-items:center;padding:0 6px;font-size:11px;line-height:18px;display:inline-flex}._628ArG_originBuiltin{color:var(--dsw-alias-state-business-primary);background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 34%, transparent)}._628ArG_originCustom{color:color-mix(in srgb, var(--tp-accent-violet) 62%, var(--dsw-alias-label-primary));background:color-mix(in srgb, var(--tp-accent-violet) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--tp-accent-violet) 34%, transparent)}._628ArG_originOverride{color:var(--dsw-alias-state-warn-label);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 34%, transparent)}";
26773
+ style.textContent = "._628ArG_section{--tp-accent-violet:#8d6bff;min-height:100%;color:var(--dsw-alias-label-primary);flex-direction:column;display:flex}._628ArG_page{flex-direction:column;gap:10px;max-width:520px;padding-bottom:8px;display:flex}._628ArG_pageHead{flex-direction:column;gap:2px;display:flex}._628ArG_crumb{color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;align-self:flex-start;align-items:center;gap:4px;padding:0;font-size:12px;line-height:18px;display:inline-flex}._628ArG_crumb:hover{color:var(--dsw-alias-label-primary)}._628ArG_title{margin:0;font-size:15px;font-weight:500;line-height:22px}._628ArG_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._628ArG_empty{color:var(--dsw-alias-label-tertiary);margin:4px 0;font-size:12px;line-height:18px}._628ArG_sectionTitle{color:var(--dsw-alias-label-secondary);padding-top:2px;font-size:12px;line-height:18px}._628ArG_tabs{border-bottom:1px solid var(--dsw-alias-border-l2);gap:6px;margin-bottom:10px;display:flex}._628ArG_actionRow{gap:8px;display:flex}._628ArG_toolbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin:0;display:flex}._628ArG_toolbarGroup{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._628ArG_resultsHead{flex-direction:column;gap:2px;margin:0 0 8px;display:flex}._628ArG_resultCount{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._628ArG_resultNote{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:17px}._628ArG_dialogCopy{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;margin:0;font-size:13px;line-height:20px}._628ArG_dialogNote{color:var(--dsw-alias-label-tertiary);margin:10px 0 0;font-size:12px;line-height:18px}._628ArG_fileInput{display:none}._628ArG_conflict{flex-direction:column;gap:6px;display:flex}._628ArG_conflict+._628ArG_conflict{margin-top:16px}._628ArG_conflictLead{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._628ArG_conflictName{overflow-wrap:anywhere;font-size:13px;font-weight:500;line-height:18px}._628ArG_conflictMember{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 12px;display:flex}._628ArG_choiceRow{flex-wrap:wrap;gap:12px;display:flex}._628ArG_choice{cursor:pointer;align-items:center;gap:6px;font-size:12px;line-height:18px;display:inline-flex}._628ArG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-settings-card-fill);border-radius:var(--dsw-radius-xl);flex-direction:column;gap:10px;padding:10px 12px;display:flex}._628ArG_cardHead{justify-content:space-between;align-items:center;gap:8px;display:flex}._628ArG_cardTitle{font-size:13px;font-weight:500;line-height:20px}._628ArG_rows{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:17px;flex-direction:column;margin:0;padding:0;list-style:none;display:flex;overflow:hidden}._628ArG_rows>._628ArG_card{box-sizing:border-box;box-shadow:none;background:0 0;border:0;border-radius:0;flex-direction:row;align-items:center;gap:4px;min-height:64px;padding:6px 10px 6px 14px}._628ArG_rows>._628ArG_card:not(:last-child){border-bottom:1px solid var(--dsw-alias-border-l1)}._628ArG_rows>._628ArG_card:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_plainRows{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}._628ArG_plainRows>._628ArG_card{flex-direction:row;align-items:center;gap:4px;padding:8px 12px}._628ArG_entry{align-items:center;gap:4px;display:flex}._628ArG_entryRow,._628ArG_rowMain{min-width:0;color:inherit;font:inherit;text-align:left;border-radius:var(--dsw-radius-md);cursor:pointer;background:0 0;border:none;flex:auto;align-items:center;gap:8px;padding:4px 2px;display:flex}._628ArG_rowMain:hover,._628ArG_entryRow:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_rowText{flex-direction:column;flex:auto;min-width:0;display:flex}._628ArG_rowName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;overflow:hidden}._628ArG_rowMeta{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;overflow:hidden}._628ArG_rowActions{flex:none;gap:2px;display:flex}._628ArG_chevron{color:var(--dsw-alias-label-tertiary);flex:none;font-size:14px;line-height:18px}._628ArG_dot{background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:10px;height:10px}._628ArG_field{flex-direction:column;gap:4px;min-width:0;display:flex}._628ArG_field>*{box-sizing:border-box;min-width:0;max-width:100%}._628ArG_field input,._628ArG_field textarea,._628ArG_field select{box-sizing:border-box;width:100%;min-width:0;max-width:100%}._628ArG_fieldLabel{color:var(--dsw-alias-label-secondary);margin:10px 0 4px;font-size:12px;line-height:18px;display:block}._628ArG_input{box-sizing:border-box;width:100%;max-width:100%}._628ArG_textInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:100%;height:32px;color:var(--dsw-alias-label-primary);font:inherit;border-radius:8px;outline:none;padding:0 10px;font-size:13px}._628ArG_textInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}select._628ArG_select{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background-color:var(--dsw-specific-input-major);width:100%;height:32px;color:inherit;font:inherit;appearance:none;cursor:pointer;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23818a96' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 10px center;background-repeat:no-repeat;border-radius:8px;padding:0 30px 0 10px;font-size:13px}select._628ArG_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}select._628ArG_select:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._628ArG_toolGroup{flex-direction:column;gap:6px;min-width:0;display:flex}._628ArG_toolGroupHead{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}._628ArG_toolGroupToggle{min-width:0;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:6px;padding:0;display:flex}._628ArG_toolGroupCount{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}._628ArG_toolGrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));gap:10px 12px;min-width:0;display:grid}._628ArG_toolCheckbox{align-items:flex-start;min-width:0}._628ArG_toolCheckbox>span{overflow-wrap:anywhere}._628ArG_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:17px}._628ArG_warn{color:var(--dsw-alias-state-warn-label);margin:0;font-size:11px;line-height:17px}._628ArG_select{border-radius:var(--dsw-radius-lg);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-specific-input-major);width:100%;height:30px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;justify-content:space-between;align-items:center;gap:6px;padding:0 8px;font-size:12px;display:flex}select._628ArG_select:disabled{opacity:.5;cursor:default}._628ArG_selectLabel{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._628ArG_prompt{box-sizing:border-box;border-radius:var(--dsw-radius-lg);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-specific-input-major);width:100%;color:var(--dsw-alias-label-primary);font:inherit;resize:vertical;padding:8px;font-size:12px;line-height:18px}._628ArG_prompt:disabled{opacity:.6}._628ArG_swatches{flex-wrap:wrap;align-items:center;gap:6px;display:flex}._628ArG_swatch,._628ArG_swatchNone{border:.5px solid var(--dsw-alias-settings-card-stroke);cursor:pointer;border-radius:50%;width:18px;height:18px;padding:0}._628ArG_swatch[aria-pressed=true],._628ArG_swatchNone[aria-pressed=true]{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}._628ArG_swatchNone{background:0 0}._628ArG_footer{background:var(--dsw-alias-bg-base);border-top:1px solid var(--dsw-alias-border-l1);justify-content:flex-end;align-items:center;gap:10px;margin-top:auto;padding:8px 0 6px;display:flex}._628ArG_footerNotes{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-1);border-radius:8px;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;margin-right:auto;padding:6px 10px;display:flex}._628ArG_footerActions{white-space:nowrap;flex-shrink:0;align-items:center;gap:10px;display:flex}._628ArG_footerNote{color:var(--dsw-alias-label-tertiary);background:0 0;border:0;padding:0;font-size:11px;line-height:17px}._628ArG_sepTitle{margin:18px 0 8px;font-size:13px;font-weight:550}._628ArG_skillGrid{grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:9px;margin:10px 0 13px;display:grid}._628ArG_skillCard input{width:16px;height:16px;accent-color:var(--dsw-alias-state-business-primary);flex:none;margin:0}._628ArG_skillCard{cursor:pointer;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:10px;flex-direction:column;gap:8px;min-width:0;min-height:128px;padding:11px;transition:border-color .15s,background .15s,box-shadow .15s;display:flex;position:relative}._628ArG_skillCard:hover{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 6%, var(--dsw-alias-settings-card-fill));border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 38%, transparent)}._628ArG_skillCard:has(input:checked){background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, var(--dsw-alias-settings-card-fill));border-color:var(--dsw-alias-state-business-primary);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-state-business-primary) 45%, transparent)}._628ArG_skillCardTop{justify-content:space-between;align-items:flex-start;gap:6px;display:flex}._628ArG_skillCardName{overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font-size:12px;font-weight:550;line-height:1.45}._628ArG_skillCardDesc{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:11px;line-height:1.5;display:-webkit-box;overflow:hidden}._628ArG_skillCardTag{margin-top:auto}@media (width<=820px){._628ArG_skillGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}._628ArG_listToolbar{gap:8px;margin:0;display:flex}._628ArG_listSearch{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);min-width:0;color:var(--dsw-alias-label-primary);border-radius:9px;outline:none;flex:1;padding:8px 11px;font-size:13px}._628ArG_chipRow{flex-wrap:wrap;gap:4px;margin-bottom:8px;display:flex}._628ArG_chip{border:1px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border-radius:7px;padding:6px 10px;font-size:12px}._628ArG_chipActive{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary)}._628ArG_categoryPanel{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:10px;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;padding:9px 10px;display:flex}._628ArG_categoryPill{border:1px solid var(--dsw-alias-border-l3);border-radius:999px;align-items:center;gap:4px;padding:2px 4px 2px 9px;font-size:12px;display:inline-flex}._628ArG_pillInput{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:92px;color:var(--dsw-alias-label-primary);border-radius:6px;padding:1px 6px;font-size:12px}._628ArG_panel{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:12px;margin:12px 0;padding:12px 14px}._628ArG_muted{color:var(--dsw-alias-label-secondary);font-size:12.5px;line-height:1.55}._628ArG_filters{flex-direction:column;gap:6px;display:flex}._628ArG_filterRow{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._628ArG_filterLabel{color:var(--dsw-alias-label-secondary);flex:none;min-width:32px;font-size:12px}._628ArG_addRow{align-items:center;gap:8px;margin:10px 0 12px;display:flex}._628ArG_addRow ._628ArG_textInput{flex:auto;width:auto;min-width:0}._628ArG_addRow>*{white-space:nowrap;flex:none}._628ArG_selectWrap{position:relative}._628ArG_selectValue{text-overflow:ellipsis;white-space:nowrap;padding-right:4px;display:block;overflow:hidden}._628ArG_selectPop{z-index:30;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-3);background:rgb(from var(--dsw-specific-menu,var(--dsw-alias-bg-layer-3)) r g b / 1);box-shadow:var(--dsw-elevation-prominent);border-radius:10px;max-height:232px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow:auto}._628ArG_selectOption{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:0;border-radius:7px;padding:7px 10px;font-size:13px;display:block;overflow:hidden}._628ArG_selectOption:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_selectOptionActive{background:var(--dsw-alias-interactive-bg-active);font-weight:550}._628ArG_rowsEmpty{text-align:center;color:var(--dsw-alias-label-secondary);padding:22px 14px;font-size:12.5px;list-style:none}._628ArG_emptyPage{text-align:center;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l3);border-radius:9px;margin:12px 0;padding:18px;font-size:13px}._628ArG_originTag{white-space:nowrap;border:1px solid #0000;border-radius:5px;align-self:flex-start;align-items:center;padding:0 6px;font-size:11px;line-height:18px;display:inline-flex}._628ArG_originBuiltin{color:var(--dsw-alias-state-business-primary);background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 34%, transparent)}._628ArG_originCustom{color:color-mix(in srgb, var(--tp-accent-violet) 62%, var(--dsw-alias-label-primary));background:color-mix(in srgb, var(--tp-accent-violet) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--tp-accent-violet) 34%, transparent)}._628ArG_originOverride{color:var(--dsw-alias-state-warn-label);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 34%, transparent)}._628ArG_restoreHint{border:1px solid var(--dsw-alias-state-warn-stroke);color:var(--dsw-alias-state-warn-label);border-radius:8px;justify-content:space-between;align-items:center;gap:12px;margin:0 0 12px;padding:10px 12px;font-size:11px;line-height:17px;display:flex}._628ArG_restoreHint span{flex:1;min-width:0}";
26758
26774
  document.head.appendChild(style);
26759
26775
  }
26760
26776
  var TeamPresetsSection_module_css_default = {
@@ -26809,6 +26825,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
26809
26825
  "pillInput": "_628ArG_pillInput",
26810
26826
  "plainRows": "_628ArG_plainRows",
26811
26827
  "prompt": "_628ArG_prompt",
26828
+ "restoreHint": "_628ArG_restoreHint",
26812
26829
  "resultCount": "_628ArG_resultCount",
26813
26830
  "resultNote": "_628ArG_resultNote",
26814
26831
  "resultsHead": "_628ArG_resultsHead",
@@ -28271,6 +28288,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
28271
28288
  children: t("description")
28272
28289
  })]
28273
28290
  }),
28291
+ (props.missingBuiltins ?? 0) === 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
28292
+ className: TeamPresetsSection_module_css_default.restoreHint,
28293
+ role: "status",
28294
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("restoreMissingHint").replace("{count}", String(props.missingBuiltins)) }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
28295
+ size: "sm",
28296
+ variant: "outline",
28297
+ disabled,
28298
+ onClick: () => {
28299
+ setConfirmRestore(true);
28300
+ },
28301
+ children: t("restoreDefaults")
28302
+ })]
28303
+ }),
28274
28304
  (0, react_jsx_runtime.jsxs)("div", {
28275
28305
  className: TeamPresetsSection_module_css_default.toolbar,
28276
28306
  children: [
@@ -29413,6 +29443,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
29413
29443
  });
29414
29444
  }
29415
29445
  /**
29446
+ * The versions a row can patch, as text.
29447
+ *
29448
+ * A Host that predates the multi-version catalog sends no `supportedVersions`,
29449
+ * and the page must still render the single version it does report: the client
29450
+ * bundle reloads on its own while the Host only changes on restart.
29451
+ * @param target - the row.
29452
+ * @returns the versions, comma separated.
29453
+ */
29454
+ function versionsOf(target) {
29455
+ return (target.supportedVersions ?? [target.supportedVersion]).join(", ");
29456
+ }
29457
+ /**
29416
29458
  * Render one target with its state and the action that state allows.
29417
29459
  * @param props - the row facts and the action callback.
29418
29460
  * @returns the row.
@@ -29445,7 +29487,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
29445
29487
  className: CardPatchView_module_css_default.meta,
29446
29488
  children: [
29447
29489
  (0, react_jsx_runtime.jsx)("dt", { children: t("patchSupported") }),
29448
- (0, react_jsx_runtime.jsx)("dd", { children: target.supportedVersion }),
29490
+ (0, react_jsx_runtime.jsx)("dd", { children: versionsOf(target) }),
29449
29491
  (0, react_jsx_runtime.jsx)("dt", { children: t("patchInstalledVersion") }),
29450
29492
  (0, react_jsx_runtime.jsx)("dd", { children: target.installedVersion ?? "—" }),
29451
29493
  (0, react_jsx_runtime.jsx)("dt", { children: t("patchSource") }),
@@ -29513,7 +29555,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
29513
29555
  (0, react_jsx_runtime.jsx)("dt", { children: t("patchFile") }),
29514
29556
  (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: `${target.packageName}/lib/client.js` }) }),
29515
29557
  (0, react_jsx_runtime.jsx)("dt", { children: t("patchSupported") }),
29516
- (0, react_jsx_runtime.jsx)("dd", { children: target.supportedVersion })
29558
+ (0, react_jsx_runtime.jsx)("dd", { children: versionsOf(target) })
29517
29559
  ]
29518
29560
  })]
29519
29561
  });
@@ -29737,6 +29779,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
29737
29779
  }
29738
29780
  const disabled = !state.writable || state.formIssue !== void 0;
29739
29781
  const teamList = state.teams;
29782
+ const heldIds = new Set(teamList.map((entry) => entry.id));
29783
+ const missingBuiltins = BUILTIN_TEAM_IDS.every((id) => !heldIds.has(id)) ? BUILTIN_TEAM_IDS.length : 0;
29740
29784
  const addressed = view.kind === "team" || view.kind === "agent" ? view.teamId : void 0;
29741
29785
  const found = addressed === void 0 ? void 0 : teamList.find((entry) => entry.id === addressed);
29742
29786
  const active = addressed === void 0 || found !== void 0 ? view : { kind: "list" };
@@ -29855,6 +29899,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
29855
29899
  onManageCategories: () => {
29856
29900
  setView({ kind: "categories" });
29857
29901
  },
29902
+ missingBuiltins,
29858
29903
  teamCategories: state.teamCategories,
29859
29904
  onOpen: openTeam,
29860
29905
  onCreate: () => {
@@ -30538,7 +30583,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30538
30583
  const SETTLE_TIMEOUT_MS = 6e3;
30539
30584
  /** How often that wait re-reads the registered services. */
30540
30585
  const SETTLE_POLL_MS = 250;
30541
- /** Services a patched target registers, by target identity. */
30586
+ /**
30587
+ * Fallback services, used only before the Host's rows have arrived.
30588
+ *
30589
+ * Once a row exists its own `service` field is authoritative: the Host derives
30590
+ * it from the catalog entry that matches the installed version, so a target
30591
+ * added by a shipped catalog never needs a code change here.
30592
+ */
30542
30593
  const SERVICES = {
30543
30594
  "dsh-context": "contextAgentCardBadges",
30544
30595
  "dsh-better-sidebar": "betterSidebarAgentCardBadges"
@@ -30623,8 +30674,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30623
30674
  * alone changes nothing until the server restarts and the page reloads.
30624
30675
  * @returns the live target identities, in catalog order.
30625
30676
  */
30626
- liveTargets() {
30627
- return Object.entries(SERVICES).filter(([, service]) => this.ctx.get(service) !== void 0).map(([id]) => id);
30677
+ liveTargets(targets = this.state.targets) {
30678
+ return (targets.length > 0 ? targets.map((target) => [target.id, target.service ?? SERVICES[target.id]]) : Object.entries(SERVICES)).filter(([, service]) => service !== void 0 && this.ctx.get(service) !== void 0).map(([id]) => id);
30628
30679
  }
30629
30680
  /**
30630
30681
  * Re-read every target's installed state.
@@ -30647,7 +30698,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30647
30698
  ...this.state,
30648
30699
  status: "ready",
30649
30700
  targets,
30650
- live: this.liveTargets()
30701
+ live: this.liveTargets(targets)
30651
30702
  };
30652
30703
  } catch (error) {
30653
30704
  this.state = {
package/lib/index.js CHANGED
@@ -1743,7 +1743,7 @@ Team Skill 排查:
1743
1743
 
1744
1744
  ## 9. 安装 / 升级 / 版本
1745
1745
 
1746
- - 本版本要求 DSH >=0.2.2-rc.1 <0.3.0;旧宿主请保留 0.1.8。安装前核对 engines.dsh。
1746
+ - 本版本要求 DSH >=0.2.2-rc.3 <0.3.0;更旧的宿主请保留 0.1.8。安装前核对 engines.dsh。
1747
1747
  - 通过官方插件管理器安装/升级;仓库包含预构建产物,通常无需构建。
1748
1748
  - 安装失败时不要只看版本号:核对 application 结果、warnings、保存的 package source、已安装文件哈希、是否需要重启。
1749
1749
  - 失败的安装可能让 node_modules 比保存的依赖规格更新;这是未完成状态,不要据此宣称升级成功。解决包管理器策略后重试,并再次核对保存的 source 与运行版本。
@@ -8479,6 +8479,24 @@ function seedBuiltinTeams(teams, seeded) {
8479
8479
  changed: install.length > 0 || mark.length > 0
8480
8480
  };
8481
8481
  }
8482
+ /**
8483
+ * The shipped presets a deployment was offered but no longer holds.
8484
+ *
8485
+ * The marker exists so a deleted preset stays deleted, which also means a Team
8486
+ * list that lost its shipped presets for any other reason — a hand edit, a
8487
+ * restored settings file, a rollback — never gets them back on its own. This
8488
+ * reads that state instead of changing it: the caller warns, and the reader can
8489
+ * decide to restore. A preset the deployment was never offered is not reported,
8490
+ * because the install pass will add it on this same startup.
8491
+ * @param teams - the stored Team list.
8492
+ * @param seeded - identities the deployment was already offered.
8493
+ * @returns the shipped identities that are marked as offered yet absent.
8494
+ */
8495
+ function missingSeededBuiltinTeams(teams, seeded) {
8496
+ const held = new Set(teams.map((team) => team.id));
8497
+ const known = new Set(seeded);
8498
+ return BUILTIN_TEAMS.filter((entry) => known.has(entry.id) && !held.has(entry.id)).map((entry) => entry.id);
8499
+ }
8482
8500
 
8483
8501
 
8484
8502
  /**
@@ -8711,6 +8729,8 @@ function teamSettingsReconcile(ctx, config, namespace) {
8711
8729
  return nextTeam;
8712
8730
  });
8713
8731
  const installed = seedBuiltinTeams(cleaned, seeded);
8732
+ const missingShipped = missingSeededBuiltinTeams(installed.teams, installed.seeded);
8733
+ if (missingShipped.length > 0) ctx.logger.warn("agent-team-presets: %d shipped Team preset(s) are marked as offered but missing from the Team list (%s); open Settings → Agent Team presets and click \"Restore built-in presets\", then save", missingShipped.length, missingShipped.join(", "));
8714
8734
  const live = reconciledAssignments(categories, installed.teams, teamCategories);
8715
8735
  const categoriesChanged = live.length !== teamCategories.length;
8716
8736
  if (categoriesChanged) ctx.logger.info("agent-team-presets: dropped %d category membership(s) whose category or custom Team no longer exists", teamCategories.length - live.length);
@@ -19711,13 +19731,15 @@ function registerTeamSkillTools(ctx, agent, deps) {
19711
19731
  * @module dsh-agent-team-presets/card-patches
19712
19732
  */
19713
19733
  /**
19714
- * The supported targets.
19734
+ * The versions compiled into this build.
19715
19735
  *
19716
- * Each entry is fixed to one upstream version on purpose: the replacement is a
19717
- * whole-bundle build, so a different version's bundle would silently change
19718
- * behaviour that was never reviewed here.
19736
+ * Each entry is a finished artifact: the replacement is a whole-bundle build, so
19737
+ * a different version's bundle would silently change behaviour that was never
19738
+ * reviewed here. Newer versions are added by `tools/card-patches.mjs`, which
19739
+ * verifies the rebuild first and then writes them to the shipped catalog
19740
+ * overlay; nothing here needs to change for that.
19719
19741
  */
19720
- const CARD_PATCH_TARGETS = [{
19742
+ const COMPILED_TARGETS = [{
19721
19743
  id: "dsh-context",
19722
19744
  packageName: "dsh-context",
19723
19745
  version: "0.84.0",
@@ -19736,6 +19758,119 @@ const CARD_PATCH_TARGETS = [{
19736
19758
  pristineSha256: "30d0022f89c0bc4751fe6cf274cb7f3543389c27ad18ebf4e58fac4a40ad7cc4",
19737
19759
  patchedSha256: "d0a9f0257e80fb3fdf6eb06a587b5b5aa985e1cfbaaf7a187ee381da0a8ac7ba"
19738
19760
  }];
19761
+ /** The shipped overlay: entries a build produced for versions this code predates. */
19762
+ function shippedCatalogFile() {
19763
+ return join(shippedAssets(), "catalog.json");
19764
+ }
19765
+ /** One validated overlay entry, or a message naming what is wrong with it. */
19766
+ function catalogString(row, field, pattern, hint) {
19767
+ const value = row[field];
19768
+ if (typeof value !== "string" || !pattern.test(value)) throw new Error(`${field} ${hint}: ${JSON.stringify(value)}`);
19769
+ return value;
19770
+ }
19771
+ /**
19772
+ * Validate one overlay entry.
19773
+ *
19774
+ * The overlay is data, not code, so it may be edited by hand or written by an
19775
+ * older tool; every field is checked against the same shape the compiled
19776
+ * entries use. An entry that fails is a reason to ignore the whole document,
19777
+ * because acting on part of it would make "what does this build support"
19778
+ * depend on JSON key order.
19779
+ * @param candidate - one parsed entry.
19780
+ * @returns the normalized target.
19781
+ * @throws when any field is unusable.
19782
+ */
19783
+ function normalizeCatalogTarget(candidate) {
19784
+ if (candidate === null || typeof candidate !== "object" || Array.isArray(candidate)) throw new Error("the entry is not an object");
19785
+ const row = candidate;
19786
+ const pristineSha256 = catalogString(row, "pristineSha256", /^[0-9a-f]{64}$/, "must be 64 lowercase hex characters");
19787
+ const patchedSha256 = catalogString(row, "patchedSha256", /^[0-9a-f]{64}$/, "must be 64 lowercase hex characters");
19788
+ if (pristineSha256 === patchedSha256) throw new Error("pristineSha256 and patchedSha256 must differ, or the replacement would be the published build");
19789
+ const source = row["source"];
19790
+ if (typeof source !== "string" || source.trim() === "" || /\s/.test(source)) throw new Error(`source must be one non-empty token: ${JSON.stringify(source)}`);
19791
+ return {
19792
+ id: catalogString(row, "id", /^[a-z0-9]+(?:-[a-z0-9]+)*$/, "must be lowercase words joined by hyphens"),
19793
+ packageName: catalogString(row, "packageName", /^[a-z0-9][a-z0-9._-]*$/, "must be a bare package name"),
19794
+ version: catalogString(row, "version", /^\d+\.\d+\.\d+(?:-[0-9A-Za-z]+(?:\.[0-9A-Za-z]+)*)?$/, "must be a semver version"),
19795
+ source,
19796
+ asset: catalogString(row, "asset", /^[a-z0-9][a-z0-9._-]*\.client\.js\.gz$/, "must be a bare `<name>.client.js.gz` file name"),
19797
+ service: catalogString(row, "service", /^[A-Za-z_$][A-Za-z0-9_$]*$/, "must be a JavaScript identifier"),
19798
+ pristineSha256,
19799
+ patchedSha256
19800
+ };
19801
+ }
19802
+ /**
19803
+ * Parse a shipped catalog overlay document.
19804
+ * @param text - the document text.
19805
+ * @returns every entry it declares.
19806
+ * @throws when the document or any entry is unusable.
19807
+ */
19808
+ function parseCardPatchCatalog(text) {
19809
+ const document = JSON.parse(text);
19810
+ if (document === null || typeof document !== "object" || Array.isArray(document)) throw new Error("the catalog is not an object");
19811
+ const version = document.version;
19812
+ if (version !== 1) throw new Error(`the catalog version is ${JSON.stringify(version)}, not 1`);
19813
+ const targets = document.targets;
19814
+ if (!Array.isArray(targets)) throw new Error("the catalog has no targets array");
19815
+ return targets.map(normalizeCatalogTarget);
19816
+ }
19817
+ /**
19818
+ * Combine the compiled baseline with the shipped overlay.
19819
+ *
19820
+ * Entries are keyed by identity *and* version, not by identity alone: keeping
19821
+ * the already-supported versions is the whole point of shipping a replacement
19822
+ * per version, so rebuilding 0.84.1 must not drop 0.84.0 for the installations
19823
+ * still on it. Only the exact pair is replaced when the same version is rebuilt.
19824
+ * Compiled order is kept, because that is the order the settings page lists.
19825
+ * @param baseline - entries compiled into this build.
19826
+ * @param overlay - entries read from the shipped catalog.
19827
+ * @returns the merged catalog.
19828
+ */
19829
+ function mergeCatalogTargets(baseline, overlay) {
19830
+ const key = (entry) => `${entry.id}@${entry.version}`;
19831
+ const byKey = new Map(overlay.map((entry) => [key(entry), entry]));
19832
+ const merged = baseline.map((entry) => byKey.get(key(entry)) ?? entry);
19833
+ const order = { numeric: true };
19834
+ for (const [entryKey, entry] of [...byKey].sort(([left], [right]) => left.localeCompare(right, "en", order))) if (!baseline.some((current) => key(current) === entryKey)) merged.push(entry);
19835
+ return merged;
19836
+ }
19837
+ /**
19838
+ * The distinct target identities, in catalog order.
19839
+ * @param targets - the catalog to read.
19840
+ * @returns one identity per target, first occurrence order.
19841
+ */
19842
+ function catalogIdentities(targets = CARD_PATCH_TARGETS) {
19843
+ return [...new Set(targets.map((target) => target.id))];
19844
+ }
19845
+ /**
19846
+ * Every catalog entry for one identity.
19847
+ * @param id - the target identity.
19848
+ * @param targets - the catalog to read.
19849
+ * @returns its entries, oldest build first.
19850
+ */
19851
+ function catalogTargetsFor(id, targets = CARD_PATCH_TARGETS) {
19852
+ return targets.filter((target) => target.id === id);
19853
+ }
19854
+ /**
19855
+ * Read the shipped overlay, or nothing when it is absent or unusable.
19856
+ *
19857
+ * A broken overlay must not take the whole settings page down: it is optional
19858
+ * data, so a refusal here falls back to the versions compiled into this build
19859
+ * and says so in the log.
19860
+ * @returns the overlay entries.
19861
+ */
19862
+ function readShippedCatalog() {
19863
+ const file = shippedCatalogFile();
19864
+ if (!existsSync(file)) return [];
19865
+ try {
19866
+ return parseCardPatchCatalog(readFileSync(file, "utf8"));
19867
+ } catch (error) {
19868
+ console.warn(`[team-presets] ignoring the shipped card-patch catalog: ${error instanceof Error ? error.message : String(error)}`);
19869
+ return [];
19870
+ }
19871
+ }
19872
+ /** Every version this build can patch: the compiled baseline plus the overlay. */
19873
+ const CARD_PATCH_TARGETS = mergeCatalogTargets(COMPILED_TARGETS, readShippedCatalog());
19739
19874
  /** Directory holding the prebuilt replacements shipped with this package. */
19740
19875
  function shippedAssets() {
19741
19876
  return join(dirname(dirname(fileURLToPath(import.meta.url))), "assets", "card-patches");
@@ -19806,7 +19941,9 @@ function targetState(target, env = realCardPatchEnvironment) {
19806
19941
  id: target.id,
19807
19942
  packageName: target.packageName,
19808
19943
  source: target.source,
19809
- supportedVersion: target.version
19944
+ service: target.service,
19945
+ supportedVersion: target.version,
19946
+ supportedVersions: [target.version]
19810
19947
  };
19811
19948
  const directory = env.resolvePackage(target.packageName);
19812
19949
  if (directory === void 0) return {
@@ -19993,12 +20130,80 @@ function uninstallCardPatch(target, env = realCardPatchEnvironment) {
19993
20130
  };
19994
20131
  }
19995
20132
  /**
19996
- * Resolve one catalog entry by target id.
19997
- * @param id - the settings page's row identity.
19998
- * @returns the entry, or undefined for an id this build does not ship.
20133
+ * Classify one identity by the version that is actually installed.
20134
+ *
20135
+ * Several catalog entries may exist for the same target, one per supported
20136
+ * upstream version; which one is relevant depends entirely on the installed
20137
+ * package, so the choice belongs here rather than at each call site. A version
20138
+ * this build has no replacement for reports `unsupported` and names the
20139
+ * versions it does ship, which is what tells an operator whether to update the
20140
+ * target plugin or this one.
20141
+ * @param entries - every catalog entry for one identity, oldest first.
20142
+ * @param env - the file-system facts to read through.
20143
+ * @returns the row the settings page renders.
19999
20144
  */
20000
- function findCardPatchTarget(id) {
20001
- return CARD_PATCH_TARGETS.find((target) => target.id === id);
20145
+ function resolveTargetView(entries, env = realCardPatchEnvironment) {
20146
+ const newest = entries.at(-1);
20147
+ if (newest === void 0) throw new Error("a card-patch target needs at least one catalog entry");
20148
+ const supportedVersions = entries.map((entry) => entry.version);
20149
+ const base = {
20150
+ id: newest.id,
20151
+ packageName: newest.packageName,
20152
+ source: newest.source,
20153
+ service: newest.service,
20154
+ supportedVersion: newest.version,
20155
+ supportedVersions
20156
+ };
20157
+ const directory = env.resolvePackage(newest.packageName);
20158
+ if (directory === void 0) return {
20159
+ ...base,
20160
+ state: "absent",
20161
+ detail: "this plugin is not installed in the running profile"
20162
+ };
20163
+ const installed = installedVersion(directory);
20164
+ if (installed === void 0) return {
20165
+ ...base,
20166
+ state: "absent",
20167
+ detail: "its package.json could not be read"
20168
+ };
20169
+ const target = entries.find((entry) => entry.version === installed);
20170
+ if (target === void 0) return {
20171
+ ...base,
20172
+ installedVersion: installed,
20173
+ state: "unsupported",
20174
+ detail: `this build ships a replacement for ${supportedVersions.join(", ")}, not ${installed}`
20175
+ };
20176
+ return {
20177
+ ...targetState(target, env),
20178
+ supportedVersions
20179
+ };
20180
+ }
20181
+ /**
20182
+ * Resolve the catalog entry that matches the installed version of one target.
20183
+ * @param id - the target identity.
20184
+ * @param env - the file-system facts to read through.
20185
+ * @param targets - the catalog to read.
20186
+ * @returns the entry to patch, when this build has one for that exact version.
20187
+ */
20188
+ function resolveInstalledTarget(id, env = realCardPatchEnvironment, targets = CARD_PATCH_TARGETS) {
20189
+ const entries = catalogTargetsFor(id, targets);
20190
+ if (entries.length === 0) return { view: {
20191
+ id,
20192
+ packageName: id,
20193
+ source: "unknown",
20194
+ service: id,
20195
+ supportedVersion: "",
20196
+ supportedVersions: [],
20197
+ state: "absent",
20198
+ detail: `this build ships no card patch for "${id}"`
20199
+ } };
20200
+ const view = resolveTargetView(entries, env);
20201
+ if (view.state === "absent" || view.state === "unsupported") return { view };
20202
+ const target = entries.find((entry) => entry.version === view.supportedVersion);
20203
+ return target === void 0 ? { view } : {
20204
+ target,
20205
+ view
20206
+ };
20002
20207
  }
20003
20208
 
20004
20209
 
@@ -20352,7 +20557,7 @@ let TeamPresetsToolCatalog = (() => {
20352
20557
  * @returns one row per supported target, in catalog order.
20353
20558
  */
20354
20559
  async cardPatches() {
20355
- return CARD_PATCH_TARGETS.map((target) => targetState(target, this.cardPatchEnvironment));
20560
+ return catalogIdentities().map((id) => resolveTargetView(catalogTargetsFor(id), this.cardPatchEnvironment));
20356
20561
  }
20357
20562
  /**
20358
20563
  * Replace one target's browser bundle with this build's prebuilt replacement.
@@ -20360,12 +20565,12 @@ let TeamPresetsToolCatalog = (() => {
20360
20565
  * @returns the outcome, or a refusal naming why nothing changed.
20361
20566
  */
20362
20567
  async installCardPatch(id) {
20363
- const target = findCardPatchTarget(id);
20568
+ const { target, view } = resolveInstalledTarget(id, this.cardPatchEnvironment);
20364
20569
  if (target === void 0) return {
20365
20570
  ok: false,
20366
20571
  id,
20367
- state: "absent",
20368
- detail: `this build ships no card patch for "${id}"`
20572
+ state: view.state,
20573
+ ...view.detail === void 0 ? {} : { detail: view.detail }
20369
20574
  };
20370
20575
  const result = installCardPatch(target, this.cardPatchEnvironment);
20371
20576
  if (result.ok) this.publishClientBundle(target.packageName);
@@ -20377,12 +20582,12 @@ let TeamPresetsToolCatalog = (() => {
20377
20582
  * @returns the outcome, or a refusal naming why nothing changed.
20378
20583
  */
20379
20584
  async uninstallCardPatch(id) {
20380
- const target = findCardPatchTarget(id);
20585
+ const { target, view } = resolveInstalledTarget(id, this.cardPatchEnvironment);
20381
20586
  if (target === void 0) return {
20382
20587
  ok: false,
20383
20588
  id,
20384
- state: "absent",
20385
- detail: `this build ships no card patch for "${id}"`
20589
+ state: view.state,
20590
+ ...view.detail === void 0 ? {} : { detail: view.detail }
20386
20591
  };
20387
20592
  const result = uninstallCardPatch(target, this.cardPatchEnvironment);
20388
20593
  if (result.ok) this.publishClientBundle(target.packageName);
@@ -19017,7 +19017,9 @@ const dsh_agent_team_presets_teamPresets_cardPatches_result$schema = () => dsh_a
19017
19017
  "id": string$1().readonly().describe("Stable identity."),
19018
19018
  "packageName": string$1().readonly().describe("Package the row is about."),
19019
19019
  "source": string$1().readonly().describe("Upstream revision the prebuilt replacement came from."),
19020
- "supportedVersion": string$1().readonly().describe("The version this build ships a replacement for."),
19020
+ "service": string$1().readonly().describe("Service a patched target registers; the page reads it to tell \"active\" from \"installed\"."),
19021
+ "supportedVersion": string$1().readonly().describe("The version whose replacement applies to this row (the newest supported one when none matches)."),
19022
+ "supportedVersions": array(string$1()).readonly().describe("Every upstream version this build ships a replacement for."),
19021
19023
  "installedVersion": string$1().readonly().optional().describe("Installed version, when the package is present."),
19022
19024
  "state": union([
19023
19025
  literal("absent"),
@@ -19825,9 +19827,18 @@ const $remote = createTypertRemoteInfo({
19825
19827
  "type": "string",
19826
19828
  "description": "Upstream revision the prebuilt replacement came from."
19827
19829
  },
19830
+ "service": {
19831
+ "type": "string",
19832
+ "description": "Service a patched target registers; the page reads it to tell \"active\" from \"installed\"."
19833
+ },
19828
19834
  "supportedVersion": {
19829
19835
  "type": "string",
19830
- "description": "The version this build ships a replacement for."
19836
+ "description": "The version whose replacement applies to this row (the newest supported one when none matches)."
19837
+ },
19838
+ "supportedVersions": {
19839
+ "type": "array",
19840
+ "items": { "type": "string" },
19841
+ "description": "Every upstream version this build ships a replacement for."
19831
19842
  },
19832
19843
  "installedVersion": {
19833
19844
  "type": "string",
@@ -19853,7 +19864,9 @@ const $remote = createTypertRemoteInfo({
19853
19864
  "id",
19854
19865
  "packageName",
19855
19866
  "source",
19867
+ "service",
19856
19868
  "supportedVersion",
19869
+ "supportedVersions",
19857
19870
  "state"
19858
19871
  ],
19859
19872
  "additionalProperties": true
@@ -20061,7 +20074,7 @@ const $remote = createTypertRemoteInfo({
20061
20074
  },
20062
20075
  sourceLocation: {
20063
20076
  "file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
20064
- "line": 272,
20077
+ "line": 274,
20065
20078
  "column": 9
20066
20079
  }
20067
20080
  },
@@ -1 +1 @@
1
- {"version":3,"file":"typert.remote-client.d.ts","names":["cardPatches","catalog","execution","installCardPatch","isPresetMember","roster","uninstallCardPatch","assignRole","createSkill","deleteAsset","detail","importSkill","library","overrideSkill","prepareImportFolder","readFile","resetSkill","restoreBuiltinBindings","scanImportFolder","unassignRole","updateDependencies","writeFile"],"sources":["../src/tool-catalog.ts","../src/team-skills/service.ts"],"sourcesContent":[null,null],"mappings":";;;;;;;;;;;IAqQQA,W;IAnGAC,O;IAwINC,S;IA3BMC,gB;IA3CAC,c;IAVAC,M;IAqEAC,kB;;;ICiJAC,U;IA1MAC,W;IA6KAC,W;IAjPAC,M;IAwFAC,W;IA9GAC,O;IAuNAC,a;IA5EAC,mB;IAtFAC,Q;IAgMAC,U;IAmFAC,sB;IArKAC,gB;IAuJAC,Y;IApFAC,kB;IA/JAC,S;;;IDkDArB,yB;IAnGAC,qB;IAwINC,uB;IA3BMC,8B;IA3CAC,4B;IAVAC,oB;IAqEAC,gC;ICiJAC,uB;IA1MAC,wB;IA6KAC,wB;IAjPAC,mB;IAwFAC,wB;IA9GAC,oB;IAuNAC,0B;IA5EAC,gC;IAtFAC,qB;IAgMAC,uB;IAmFAC,mC;IArKAC,6B;IAuJAC,yB;IApFAC,+B;IA/JAC,sB","ignoreList":[]}
1
+ {"version":3,"file":"typert.remote-client.d.ts","names":["cardPatches","catalog","execution","installCardPatch","isPresetMember","roster","uninstallCardPatch","assignRole","createSkill","deleteAsset","detail","importSkill","library","overrideSkill","prepareImportFolder","readFile","resetSkill","restoreBuiltinBindings","scanImportFolder","unassignRole","updateDependencies","writeFile"],"sources":["../src/tool-catalog.ts","../src/team-skills/service.ts"],"sourcesContent":[null,null],"mappings":";;;;;;;;;;;IAqQQA,W;IAnGAC,O;IAwINC,S;IAzBMC,gB;IA7CAC,c;IAVAC,M;IAqEAC,kB;;;ICiJAC,U;IA1MAC,W;IA6KAC,W;IAjPAC,M;IAwFAC,W;IA9GAC,O;IAuNAC,a;IA5EAC,mB;IAtFAC,Q;IAgMAC,U;IAmFAC,sB;IArKAC,gB;IAuJAC,Y;IApFAC,kB;IA/JAC,S;;;IDkDArB,yB;IAnGAC,qB;IAwINC,uB;IAzBMC,8B;IA7CAC,4B;IAVAC,oB;IAqEAC,gC;ICiJAC,uB;IA1MAC,wB;IA6KAC,wB;IAjPAC,mB;IAwFAC,wB;IA9GAC,oB;IAuNAC,0B;IA5EAC,gC;IAtFAC,qB;IAgMAC,uB;IAmFAC,mC;IArKAC,6B;IAuJAC,yB;IApFAC,+B;IA/JAC,sB","ignoreList":[]}