dsh-agent-team-presets 0.3.2 → 0.3.4

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.
Files changed (121) hide show
  1. package/NOTICE +58 -3
  2. package/README.md +73 -398
  3. package/README.zh.md +79 -404
  4. package/assets/card-patches/catalog.json +30 -0
  5. package/assets/card-patches/dsh-context-0.85.0.client.js.gz +0 -0
  6. package/assets/card-patches/dsh-context-0.85.1.client.js.gz +0 -0
  7. package/assets/card-patches/dsh-context-0.87.0.client.js.gz +0 -0
  8. package/assets/skills/agent-leader-communication/SKILL.md +100 -0
  9. package/assets/skills/agent-subagent-orchestration/SKILL.md +56 -0
  10. package/assets/skills/agent-subagent-orchestration/references/executor-parallel-execution.md +56 -0
  11. package/assets/skills/agent-subagent-orchestration/references/leader-discovery.md +53 -0
  12. package/assets/skills/agent-subagent-orchestration/references/subagent-communication.md +58 -0
  13. package/assets/skills/backend-architecture-workflow/SKILL.md +55 -0
  14. package/assets/skills/backend-architecture-workflow/references/README.md +9 -0
  15. package/assets/skills/backend-architecture-workflow/references/architecture-audit.md +70 -0
  16. package/assets/skills/backend-architecture-workflow/references/architecture-decay-risks.md +75 -0
  17. package/assets/skills/backend-architecture-workflow/references/architecture-design.md +151 -0
  18. package/assets/skills/backend-architecture-workflow/references/bugfix-regression.md +63 -0
  19. package/assets/skills/backend-architecture-workflow/references/complex-bug-diagnosis.md +104 -0
  20. package/assets/skills/executor-short-task-workflow/SKILL.md +48 -0
  21. package/assets/skills/executor-short-task-workflow/references/agent-communication.md +44 -0
  22. package/assets/skills/executor-short-task-workflow/references/verification-and-reporting.md +45 -0
  23. package/assets/skills/frontend-engineering-workflow/SKILL.md +47 -0
  24. package/assets/skills/frontend-engineering-workflow/references/README.md +7 -0
  25. package/assets/skills/frontend-engineering-workflow/references/frontend-implementation.md +46 -0
  26. package/assets/skills/frontend-engineering-workflow/references/visual-design.md +43 -0
  27. package/assets/skills/frontend-engineering-workflow/references/visual-qa.md +126 -0
  28. package/assets/skills/fullstack-advisor/SKILL.md +50 -0
  29. package/assets/skills/fullstack-advisor/references/brooks-principles.md +51 -0
  30. package/assets/skills/fullstack-advisor/references/consultant-communication.md +51 -0
  31. package/assets/skills/fullstack-advisor/references/consultation-workflow.md +71 -0
  32. package/assets/skills/git-release-hygiene/SKILL.md +33 -21
  33. package/assets/skills/git-release-hygiene/references/git-safety.md +66 -0
  34. package/assets/skills/git-release-hygiene/references/pr-changelog.md +98 -0
  35. package/assets/skills/git-release-hygiene/references/release-standard.md +139 -0
  36. package/assets/skills/git-release-hygiene/references/validation-checklist.md +42 -0
  37. package/assets/skills/github-repository-presentation/SKILL.md +49 -130
  38. package/assets/skills/github-repository-presentation/references/bilingual-writing.md +43 -0
  39. package/assets/skills/github-repository-presentation/references/documentation-architecture.md +156 -0
  40. package/assets/skills/github-repository-presentation/references/readme-standard.md +273 -0
  41. package/assets/skills/github-repository-presentation/references/release-notes.md +70 -0
  42. package/assets/skills/github-repository-presentation/references/validation-checklist.md +47 -0
  43. package/assets/skills/independent-code-review-workflow/SKILL.md +60 -0
  44. package/assets/skills/independent-code-review-workflow/references/README.md +9 -0
  45. package/assets/skills/independent-code-review-workflow/references/decay-risks.md +99 -0
  46. package/assets/skills/independent-code-review-workflow/references/review-checklist.md +53 -0
  47. package/assets/skills/independent-code-review-workflow/references/review-methodology.md +113 -0
  48. package/assets/skills/independent-code-review-workflow/references/review-severity.md +49 -0
  49. package/assets/skills/independent-code-review-workflow/references/test-quality-review.md +71 -0
  50. package/assets/skills/leader-long-task-orchestration/SKILL.md +49 -0
  51. package/assets/skills/leader-long-task-orchestration/references/delivery-plan-template.md +73 -0
  52. package/assets/skills/leader-long-task-orchestration/references/product-alignment.md +46 -0
  53. package/assets/skills/leader-long-task-orchestration/references/rolling-wave-planning.md +32 -0
  54. package/assets/skills/leader-long-task-orchestration/references/technical-decisions-and-escalation.md +34 -0
  55. package/assets/skills/leader-medium-task-workflow/SKILL.md +55 -0
  56. package/assets/skills/leader-medium-task-workflow/references/task-board-and-leader-todo.md +41 -0
  57. package/docs/builtin-team-skills.md +82 -0
  58. package/docs/builtin-team-skills.zh.md +82 -0
  59. package/docs/builtin-teams.md +62 -0
  60. package/docs/builtin-teams.zh.md +62 -0
  61. package/docs/developer/architecture.md +54 -0
  62. package/docs/developer/architecture.zh.md +54 -0
  63. package/docs/guide/install.md +86 -0
  64. package/docs/guide/install.zh.md +86 -0
  65. package/docs/guide/integrations.md +50 -0
  66. package/docs/guide/integrations.zh.md +50 -0
  67. package/docs/guide/team-skills.md +68 -0
  68. package/docs/guide/team-skills.zh.md +68 -0
  69. package/docs/guide/using-teams.md +92 -0
  70. package/docs/guide/using-teams.zh.md +92 -0
  71. package/docs/index.md +53 -0
  72. package/docs/index.zh.md +53 -0
  73. package/docs/reference/tools-and-permissions.md +62 -0
  74. package/docs/reference/tools-and-permissions.zh.md +62 -0
  75. package/docs/reference/troubleshooting.md +59 -0
  76. package/docs/reference/troubleshooting.zh.md +59 -0
  77. package/icon.webp +0 -0
  78. package/lib/client.js +1459 -253
  79. package/lib/index.js +960 -342
  80. package/lib/typert.host.js +402 -29
  81. package/lib/typert.remote-client.d.ts +9 -9
  82. package/lib/typert.remote-client.d.ts.map +1 -1
  83. package/lib/typert.remote-client.js +402 -29
  84. package/lib/types/client/CardPatchView.js +21 -1
  85. package/lib/types/client/ComposerTeamSelect.js +24 -8
  86. package/lib/types/client/TeamAgentView.d.ts +1 -1
  87. package/lib/types/client/TeamAgentView.js +11 -6
  88. package/lib/types/client/TeamImportDialog.d.ts +4 -15
  89. package/lib/types/client/TeamImportDialog.js +29 -25
  90. package/lib/types/client/TeamPresetsSection.js +14 -5
  91. package/lib/types/client/TeamSkillsView.d.ts +5 -4
  92. package/lib/types/client/TeamSkillsView.js +64 -15
  93. package/lib/types/client/locales.d.ts +41 -2
  94. package/lib/types/client/locales.js +185 -8
  95. package/lib/types/client/team-presets-controller.d.ts +15 -2
  96. package/lib/types/client/team-presets-controller.js +86 -30
  97. package/lib/types/client/team-skills-controller.d.ts +14 -5
  98. package/lib/types/client/team-skills-controller.js +71 -37
  99. package/lib/types/index.js +57 -19
  100. package/lib/types/preset-editor.js +3 -4
  101. package/lib/types/preset-transfer.d.ts +1 -1
  102. package/lib/types/presets.d.ts +21 -23
  103. package/lib/types/presets.js +72 -36
  104. package/lib/types/team-catalog.d.ts +50 -3
  105. package/lib/types/team-catalog.js +214 -43
  106. package/lib/types/team-mode.d.ts +48 -0
  107. package/lib/types/team-mode.js +64 -0
  108. package/lib/types/team-skills/import.d.ts +17 -7
  109. package/lib/types/team-skills/import.js +115 -21
  110. package/lib/types/team-skills/index.d.ts +2 -3
  111. package/lib/types/team-skills/index.js +4 -8
  112. package/lib/types/team-skills/manager.d.ts +24 -15
  113. package/lib/types/team-skills/manager.js +98 -105
  114. package/lib/types/team-skills/official-bindings.d.ts +29 -0
  115. package/lib/types/team-skills/official-bindings.js +51 -0
  116. package/lib/types/team-skills/service.d.ts +7 -12
  117. package/lib/types/team-skills/service.js +143 -63
  118. package/lib/types/team-skills/store.d.ts +27 -6
  119. package/lib/types/team-skills/store.js +151 -15
  120. package/lib/types/types.d.ts +18 -4
  121. package/package.json +21 -2
@@ -7,16 +7,17 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
7
7
  * The library page owns discovery: search, the built-in/custom segment, and the
8
8
  * three actions the prototype puts in the title row. The detail page owns one
9
9
  * skill: its file tree and editor, its member references, and the deletion the
10
- * Host refuses while a member still holds it. Assignment itself belongs to the
11
- * member page, so this file never invents a second place to bind a skill.
10
+ * Host refuses while a member still holds it. A built-in skill can be copied
11
+ * here with the option to move its role bindings to the editable copy.
12
12
  * @module dsh-agent-team-presets/client/TeamSkillsView
13
13
  */
14
14
  import { useEffect, useMemo, useState } from 'react';
15
- import { Button } from '@deepseek-ai/dsh-client-ui-primitives';
15
+ import { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives';
16
16
  import css from './TeamSkillsView.module.css';
17
17
  // The library filters are the same control as the Team list's chips, so they use the
18
18
  // very same classes rather than a lookalike set that can drift.
19
19
  import chips from './TeamPresetsSection.module.css';
20
+ import { SKILL_CATEGORIES, SKILL_CATEGORY_LABELS, skillCategoryOf, skillLabel } from "./locales.js";
20
21
  /**
21
22
  * Read one line of provenance text.
22
23
  * @param asset - the row.
@@ -46,6 +47,18 @@ const SCAN_REASON_KEYS = {
46
47
  'duplicate': 'skillsScanDuplicate',
47
48
  'duplicate-path': 'skillsScanDuplicate',
48
49
  'install-refused': 'skillsScanInstallRefused',
50
+ 'builtin-name-conflict': 'skillsScanBuiltinNameConflict',
51
+ 'copy-name-conflict': 'skillsScanCopyNameConflict',
52
+ 'duplicate-source-name': 'skillsScanDuplicateSourceName',
53
+ 'source-missing': 'skillsScanSourceMissingReason',
54
+ 'source-changed': 'skillsScanSourceChanged',
55
+ };
56
+ const SCAN_STATUS_KEYS = {
57
+ imported: 'skillsScanImported',
58
+ existing: 'skillsScanExisting',
59
+ updated: 'skillsScanUpdated',
60
+ invalid: 'skillsScanInvalid',
61
+ missing: 'skillsScanSourceMissing',
49
62
  };
50
63
  /** One scan row's explanation, localized when the scanner's code is known. */
51
64
  function scanReasonText(entry, t) {
@@ -53,6 +66,19 @@ function scanReasonText(entry, t) {
53
66
  const label = entry.reason === undefined ? '' : key === undefined ? entry.reason : t(key);
54
67
  return entry.detail === undefined ? label : `${label} (${entry.detail})`;
55
68
  }
69
+ function ignoredDependencyText(fields, t) {
70
+ return t('skillsIgnoredDependencyFields').replace('{fields}', () => fields.join(', '));
71
+ }
72
+ function ScanRows({ entries, pending = false, t }) {
73
+ return (_jsx("ul", { className: css.scanList, children: entries.map(entry => {
74
+ const needsAttention = entry.status === 'invalid' || entry.status === 'missing';
75
+ const status = pending && entry.status === 'imported' ? 'skillsInboxNew'
76
+ : pending && entry.status === 'updated' ? 'skillsInboxUpdated' : SCAN_STATUS_KEYS[entry.status];
77
+ const tone = needsAttention ? css.tagWarn : !pending && entry.status !== 'existing' ? css.tagOk : '';
78
+ const fields = entry.ignoredDependencyFields ?? [];
79
+ return (_jsxs("li", { className: css.scanRow, children: [_jsx("span", { className: css.scanFolder, children: entry.folder }), _jsx("span", { className: `${css.tag} ${tone}`, children: t(status) }), _jsx("span", { className: css.muted, children: needsAttention ? scanReasonText(entry, t) : entry.assetId ?? entry.skillId ?? '' }), fields.length === 0 ? null : _jsx("span", { className: css.muted, children: ignoredDependencyText(fields, t) })] }, `${entry.folder}:${entry.status}:${entry.assetId ?? entry.skillId ?? ''}`));
80
+ }) }));
81
+ }
56
82
  function originLabel(asset, t) {
57
83
  if (asset.origin === 'builtin')
58
84
  return t('originBuiltin');
@@ -67,26 +93,33 @@ export function TeamSkillsView(props) {
67
93
  const [page, setPage] = useState({ kind: 'list' });
68
94
  const [query, setQuery] = useState('');
69
95
  const [origin, setOrigin] = useState('all');
96
+ const [category, setCategory] = useState('all');
70
97
  const [draft, setDraft] = useState('');
71
98
  const [creating, setCreating] = useState(false);
72
99
  const [name, setName] = useState('');
73
100
  const [description, setDescription] = useState('');
101
+ const [copy, setCopy] = useState(undefined);
74
102
  const [confirmDelete, setConfirmDelete] = useState(false);
75
103
  const [deleteOutcome, setDeleteOutcome] = useState(undefined);
76
104
  useEffect(() => {
77
105
  const unsubscribe = controller.subscribe(() => { setState(controller.getSnapshot()); });
78
- void controller.refresh();
106
+ void controller.refresh(true);
79
107
  return unsubscribe;
80
108
  }, [controller]);
81
109
  useEffect(() => { setDraft(state.fileText ?? ''); }, [state.fileText]);
82
110
  const assets = state.library?.assets ?? [];
83
111
  const visible = useMemo(() => assets.filter((asset) => {
84
112
  const matchesOrigin = origin === 'all' || (origin === 'builtin' ? asset.origin === 'builtin' : asset.origin !== 'builtin');
85
- const haystack = `${asset.skillId} ${asset.description}`.toLocaleLowerCase();
86
- return matchesOrigin && query.trim().split(/\s+/u).every(token => haystack.includes(token.toLocaleLowerCase()));
87
- }), [assets, origin, query]);
88
- const detail = state.detail;
89
- const selected = page.kind === 'detail' ? assets.find(asset => asset.id === page.assetId) : undefined;
113
+ const matchesCategory = category === 'all' || skillCategoryOf(asset) === category;
114
+ // Both names are searchable: the label a reader sees, and the English id
115
+ // every other surface uses.
116
+ const haystack = `${skillLabel(asset.skillId, t)} ${asset.skillId} ${asset.description}`.toLocaleLowerCase();
117
+ return matchesOrigin && matchesCategory && query.trim().split(/\s+/u).every(token => haystack.includes(token.toLocaleLowerCase()));
118
+ }), [assets, origin, category, query, t]);
119
+ const detail = page.kind === 'detail' && state.detail?.asset.id === page.assetId ? state.detail : undefined;
120
+ const copyTitle = detail === undefined ? '' : t('skillsMakeCopyTitle').replace('{skill}', () => skillLabel(detail.asset.skillId, t));
121
+ const ignoredFields = detail?.ignoredDependencyFields ?? [];
122
+ const inboxChanges = (state.inboxChanges ?? []).filter(entry => entry.status !== 'existing');
90
123
  /**
91
124
  * Pick a folder and hand its files to the Host.
92
125
  * @param list - the picker's files.
@@ -100,13 +133,15 @@ export function TeamSkillsView(props) {
100
133
  const path = relative === '' ? file.name : relative.includes('/') ? relative.slice(relative.indexOf('/') + 1) : relative;
101
134
  files.push({ path, content: new Uint8Array(await file.arrayBuffer()) });
102
135
  }
103
- await controller.importFolder(files);
136
+ const assetId = await controller.importFolder(files);
137
+ if (assetId !== undefined)
138
+ setPage({ kind: 'detail', assetId });
104
139
  };
105
140
  if (state.status === 'unavailable') {
106
141
  return (_jsxs("div", { className: css.page, children: [_jsx("h2", { className: css.title, children: t('skillsTitle') }), _jsx("div", { className: css.info, children: state.issue ?? t('skillsEmpty') })] }));
107
142
  }
108
143
  if (page.kind === 'detail') {
109
- return (_jsxs("div", { className: css.page, children: [_jsxs("button", { type: "button", className: css.crumb, onClick: () => { setPage({ kind: 'list' }); setConfirmDelete(false); setDeleteOutcome(undefined); }, children: ["\u2039 ", t('skillsTitle')] }), detail === undefined || selected === undefined ? _jsx("div", { className: css.empty, children: t('skillsEmpty') }) : (_jsxs(_Fragment, { children: [_jsx("h2", { className: css.title, children: detail.asset.skillId }), _jsx("p", { className: css.sub, children: detail.asset.description }), _jsxs("div", { className: css.pills, children: [_jsxs("span", { className: `${chips.originTag} ${originTone(chips, detail.asset.origin)}`, children: [originLabel(detail.asset, t), " \u00B7 ", detail.asset.editable ? t('skillsEditable') : t('skillsReadonly')] }), _jsxs("span", { className: css.tag, children: [t('skillsVersion'), " ", detail.asset.version] }), _jsxs("span", { className: css.tag, children: [detail.asset.fileCount, " ", t('skillsFiles')] }), detail.asset.updateAvailable === true ? _jsx("span", { className: `${css.tag} ${css.tagWarn}`, children: t('skillsOverrideOn') }) : null, (detail.asset.clashesWith?.length ?? 0) > 0 ? _jsx("span", { className: `${css.tag} ${css.tagWarn}`, children: t('skillsNameClash') }) : null] }), (detail.asset.clashesWith?.length ?? 0) > 0 ? (_jsxs("div", { className: css.info, children: [t('skillsNameClashBody'), "\uFF1A", [detail.asset.id, ...(detail.asset.clashesWith ?? [])].join(' / ')] })) : null, (() => {
144
+ return (_jsxs("div", { className: css.page, children: [_jsxs("button", { type: "button", className: css.crumb, onClick: () => { setPage({ kind: 'list' }); setCopy(undefined); setConfirmDelete(false); setDeleteOutcome(undefined); }, children: ["\u2039 ", t('skillsTitle')] }), detail === undefined ? _jsx("div", { className: css.empty, children: t('skillsEmpty') }) : (_jsxs(_Fragment, { children: [_jsxs("h2", { className: css.title, children: [skillLabel(detail.asset.skillId, t), " ", _jsx("span", { className: css.muted, children: detail.asset.skillId })] }), _jsx("p", { className: css.sub, children: detail.asset.description }), _jsxs("div", { className: css.pills, children: [_jsxs("span", { className: `${chips.originTag} ${originTone(chips, detail.asset.origin)}`, children: [originLabel(detail.asset, t), " \u00B7 ", detail.asset.editable ? t('skillsEditable') : t('skillsReadonly')] }), _jsxs("span", { className: css.tag, children: [t('skillsVersion'), " ", detail.asset.version] }), _jsxs("span", { className: css.tag, children: [detail.asset.fileCount, " ", t('skillsFiles')] }), detail.asset.updateAvailable === true ? _jsx("span", { className: `${css.tag} ${css.tagWarn}`, children: t('skillsOverrideOn') }) : null, (detail.asset.clashesWith?.length ?? 0) > 0 ? _jsx("span", { className: `${css.tag} ${css.tagWarn}`, children: t('skillsNameClash') }) : null] }), (detail.asset.clashesWith?.length ?? 0) > 0 ? (_jsxs("div", { className: css.info, children: [t('skillsNameClashBody'), "\uFF1A", [detail.asset.id, ...(detail.asset.clashesWith ?? [])].join(' / ')] })) : null, (() => {
110
145
  const missing = (detail.dependencies?.executables ?? []).filter(row => !row.found);
111
146
  const unverified = detail.asset.mcpServers;
112
147
  if (missing.length === 0 && unverified.length === 0)
@@ -114,11 +149,20 @@ export function TeamSkillsView(props) {
114
149
  return (_jsx("div", { className: `${css.info} ${missing.length > 0 ? css.infoError : ''}`, children: missing.length > 0
115
150
  ? _jsxs("span", { children: [t('skillsBlockedAssign'), "\uFF1A", missing.map(row => row.name).join(', ')] })
116
151
  : _jsxs("span", { children: [t('skillsMcpUnverified'), "\uFF1A", unverified.join(', ')] }) }));
117
- })(), _jsx("div", { className: css.sectionTitle, children: t('skillsResources') }), _jsxs("div", { className: css.fileArea, children: [_jsx("div", { className: css.fileTree, children: detail.files.map(file => (_jsxs("button", { type: "button", className: state.file === file.path ? css.active : '', onClick: () => { void controller.openFile(file.path); }, children: [file.path.includes('/') ? '↳ ' : '◫ ', file.path] }, file.path))) }), _jsxs("div", { className: css.fileEditor, children: [_jsxs("div", { className: css.fileTop, children: [_jsx("span", { children: state.file ?? 'SKILL.md' }), _jsx("span", { children: detail.asset.editable ? t('skillsEditable') : t('skillsReadonly') })] }), _jsx("textarea", { className: css.code, spellCheck: false, value: draft, readOnly: !detail.asset.editable, onChange: (event) => { setDraft(event.target.value); } })] })] }), _jsxs("div", { className: css.actions, children: [detail.asset.editable ? (_jsx(Button, { onClick: () => { void controller.saveFile(state.file ?? 'SKILL.md', draft); }, children: t('skillsSaveFile') })) : (_jsx(Button, { onClick: () => { void controller.createOverride(detail.asset.skillId); }, children: t('skillsMakeCopy') })), detail.asset.origin === 'override'
152
+ })(), ignoredFields.length === 0 ? null : (_jsx("div", { className: css.info, children: ignoredDependencyText(ignoredFields, t) })), detail.bindingSwitchIssue === undefined ? null : (_jsx("div", { className: `${css.info} ${css.infoError}`, role: "status", children: t('skillsMakeCopySwitchIssue').replace('{issue}', () => detail.bindingSwitchIssue ?? '') })), _jsx("div", { className: css.sectionTitle, children: t('skillsResources') }), _jsxs("div", { className: css.fileArea, children: [_jsx("div", { className: css.fileTree, children: detail.files.map(file => (_jsxs("button", { type: "button", className: state.file === file.path ? css.active : '', onClick: () => { void controller.openFile(file.path); }, children: [file.path.includes('/') ? '↳ ' : '◫ ', file.path] }, file.path))) }), _jsxs("div", { className: css.fileEditor, children: [_jsxs("div", { className: css.fileTop, children: [_jsx("span", { children: state.file ?? 'SKILL.md' }), _jsx("span", { children: detail.asset.editable ? t('skillsEditable') : t('skillsReadonly') })] }), _jsx("textarea", { className: css.code, spellCheck: false, value: draft, readOnly: !detail.asset.editable, onChange: (event) => { setDraft(event.target.value); } })] })] }), _jsxs("div", { className: css.actions, children: [detail.asset.editable ? (_jsx(Button, { onClick: () => { void controller.saveFile(state.file ?? 'SKILL.md', draft); }, children: t('skillsSaveFile') })) : (_jsx(Button, { disabled: state.busy, onClick: () => { setCopy({ switchBindings: false, attempted: false }); }, children: t('skillsMakeCopy') })), detail.asset.origin === 'override'
118
153
  ? _jsx(Button, { onClick: () => { void controller.resetOverride(detail.asset.id); }, children: t('skillsResetCopy') })
119
154
  : null, _jsx(Button, { onClick: () => { void navigator.clipboard?.writeText(detail.directory); }, children: t('skillsOpenAssetFolder') }), _jsx(Button, { onClick: () => { setConfirmDelete(true); setDeleteOutcome(undefined); }, children: t('skillsDelete') })] }), _jsxs("div", { className: css.panel, children: [_jsxs("div", { className: css.panelTitle, children: [t('skillsBindings'), " \u00B7 ", detail.asset.bindings.length] }), detail.asset.bindings.length === 0 ? _jsx("div", { className: css.muted, children: t('skillsNoBinding') }) : detail.asset.bindings.map(row => (_jsxs("div", { className: css.bindRow, children: [_jsx("span", { className: css.dot }), _jsxs("span", { className: css.main, children: [_jsx("span", { className: css.rowTitle, children: row.teamName }), _jsx("span", { className: css.rowSub, children: row.roleName })] }), _jsx("button", { type: "button", className: css.mini, onClick: () => { void controller.unassign(row.teamId, row.roleId); }, children: t('skillsUnbind') })] }, `${row.teamId}:${row.roleId}`)))] }), _jsxs("div", { className: css.panel, children: [_jsx("div", { className: css.panelTitle, children: t('skillsDeps') }), (detail.asset.mcpServers.length === 0 && (detail.dependencies?.executables.length ?? 0) === 0)
120
155
  ? _jsx("div", { className: css.muted, children: t('skillsNoDeps') })
121
- : (_jsxs(_Fragment, { children: [detail.asset.mcpServers.map(server => (_jsxs("div", { className: css.muted, children: ["MCP \u00B7 ", server, " ", _jsx("span", { className: css.tag, children: t('skillsDeclared') })] }, server))), (detail.dependencies?.executables ?? []).map(row => (_jsxs("div", { className: css.muted, children: [row.name, " ", _jsx("span", { className: `${css.tag} ${row.found ? css.tagOk : css.tagWarn}`, children: row.found ? t('skillsFound') : t('skillsMissing') })] }, row.name)))] }))] }), state.message === undefined ? null : (_jsx("div", { className: `${css.message} ${state.failed ? css.messageFailed : ''}`, children: state.message })), confirmDelete ? (_jsx("div", { className: css.dialogBackdrop, onClick: () => {
156
+ : (_jsxs(_Fragment, { children: [detail.asset.mcpServers.map(server => (_jsxs("div", { className: css.muted, children: ["MCP \u00B7 ", server, " ", _jsx("span", { className: css.tag, children: t('skillsDeclared') })] }, server))), (detail.dependencies?.executables ?? []).map(row => (_jsxs("div", { className: css.muted, children: [row.name, " ", _jsx("span", { className: `${css.tag} ${row.found ? css.tagOk : css.tagWarn}`, children: row.found ? t('skillsFound') : t('skillsMissing') })] }, row.name)))] }))] }), state.message === undefined || copy !== undefined ? null : (_jsx("div", { className: `${css.message} ${state.failed ? css.messageFailed : ''}`, children: state.message })), copy === undefined ? null : (_jsxs(Modal, { open: true, headless: true, title: copyTitle, className: css.dialog ?? '', backdropBlur: false, onClose: () => { if (!state.busy)
157
+ setCopy(undefined); }, children: [_jsx("h2", { children: copyTitle }), _jsxs("label", { className: css.label, children: [_jsx("input", { type: "checkbox", "data-modal-autofocus": true, checked: copy.switchBindings, disabled: state.busy, onChange: (event) => { setCopy({ ...copy, switchBindings: event.target.checked }); } }), t('skillsMakeCopySwitchBindings').replace('{count}', String(detail.asset.bindings.length))] }), copy.attempted && state.message !== undefined ? (_jsx("div", { className: `${css.message} ${css.messageFailed}`, role: "alert", children: state.message })) : null, _jsxs("div", { className: css.dialogActions, children: [_jsx(Button, { disabled: state.busy, onClick: () => { setCopy(undefined); }, children: t('skillsCancel') }), _jsx(Button, { disabled: state.busy, onClick: () => {
158
+ setCopy({ ...copy, attempted: true });
159
+ void controller.createOverride(detail.asset.skillId, copy.switchBindings).then(assetId => {
160
+ if (assetId === undefined)
161
+ return;
162
+ setPage({ kind: 'detail', assetId });
163
+ setCopy(undefined);
164
+ });
165
+ }, children: t('skillsMakeCopy') })] })] })), confirmDelete ? (_jsx("div", { className: css.dialogBackdrop, onClick: () => {
122
166
  setConfirmDelete(false);
123
167
  setDeleteOutcome(undefined);
124
168
  }, children: _jsxs("div", { className: css.dialog, role: "dialog", "aria-modal": "true", onClick: (event) => { event.stopPropagation(); }, children: [_jsx("h2", { children: t('skillsDeleteTitle') }), _jsx("p", { className: css.muted, children: t('skillsDeleteBody') }), detail.asset.origin === 'builtin' ? (_jsx("div", { className: `${css.info} ${css.infoError}`, style: { margin: '12px 0 0' }, children: _jsx("strong", { children: t('skillsDeleteBuiltinWarning') }) })) : null, detail.asset.bindings.length > 0 ? (_jsxs("div", { className: `${css.info} ${css.infoError}`, style: { margin: '12px 0 0', display: 'flex', flexDirection: 'column', gap: '6px' }, children: [_jsx("div", { children: _jsx("strong", { children: t('skillsDeleteBoundWarning') }) }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px', fontSize: '12px', maxHeight: '140px', overflowY: 'auto' }, children: detail.asset.bindings.map(b => (_jsxs("div", { children: ["\u2022 ", b.teamName, " \u2192 ", b.roleName] }, `${b.teamId}:${b.roleId}`))) })] })) : null, deleteOutcome?.ok === false && deleteOutcome.blockers.length > 0 ? (_jsxs("div", { className: `${css.info} ${css.infoError}`, style: { margin: '12px 0 0', display: 'flex', flexDirection: 'column', gap: '6px' }, children: [_jsx("div", { children: _jsx("strong", { children: t('skillsDeleteBlocked') }) }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px', fontSize: '12px' }, children: deleteOutcome.blockers.map((blocker, idx) => (_jsxs("div", { children: ["\u2022 ", blocker.detail || blocker.kind] }, idx))) })] })) : null, _jsxs("div", { className: css.dialogActions, children: [_jsx(Button, { onClick: () => { setConfirmDelete(false); setDeleteOutcome(undefined); }, children: t('skillsCancel') }), _jsx(Button, { disabled: detail.asset.origin === 'builtin' || detail.asset.bindings.length > 0, onClick: () => {
@@ -135,11 +179,16 @@ export function TeamSkillsView(props) {
135
179
  }, children: t('skillsConfirm') })] })] }) })) : null] }))] }));
136
180
  }
137
181
  return (_jsxs("div", { className: css.page, children: [_jsxs("div", { className: css.headRow, children: [_jsxs("div", { className: css.headText, children: [_jsx("h2", { className: css.title, children: t('skillsTitle') }), _jsx("p", { className: css.sub, children: t('skillsSub') })] }), _jsxs("div", { className: css.titleActions, children: [_jsx(Button, { variant: "outline", onClick: () => { setCreating(true); }, children: t('skillsNew') }), _jsx(Button, { variant: "outline", onClick: () => { void controller.openScanFolder(); }, children: state.canOpenScanFolder ? t('skillsOpenScanFolder') : t('skillsCopyScanFolder') })] })] }), _jsxs("div", { className: css.info, children: ["\u24D8 ", _jsx("span", { children: t('skillsNote') })] }), state.scanFolderNotice === undefined ? null : (_jsx("div", { className: css.info, children: _jsx("span", { children: t(state.scanFolderNotice === 'opened' ? 'skillsScanFolderOpened'
138
- : state.scanFolderNotice === 'copied' ? 'skillsScanFolderCopied' : 'skillsScanFolderCopyFailed') }) })), _jsxs("div", { className: css.actions, children: [_jsx("input", { id: "team-skill-import", type: "file", multiple: true, style: { display: 'none' }, onChange: (event) => { void importFolder(event.target.files); }, webkitdirectory: '' }), _jsx(Button, { variant: "outline", onClick: () => { document.getElementById('team-skill-import')?.click(); }, children: t('skillsImport') }), _jsx(Button, { variant: "outline", onClick: () => { void controller.scanImportFolder(); }, children: t('skillsScan') })] }), state.scan === undefined ? null : (_jsxs("div", { className: css.scan, children: [_jsx("div", { className: css.scanHead, children: t('skillsScanSummary')
182
+ : state.scanFolderNotice === 'copied' ? 'skillsScanFolderCopied' : 'skillsScanFolderCopyFailed') }) })), _jsxs("div", { className: css.actions, children: [_jsx("input", { id: "team-skill-import", type: "file", multiple: true, style: { display: 'none' }, onChange: (event) => {
183
+ void importFolder(event.target.files);
184
+ event.target.value = '';
185
+ }, webkitdirectory: '' }), _jsx(Button, { variant: "outline", disabled: state.busy, onClick: () => { document.getElementById('team-skill-import')?.click(); }, children: t('skillsImport') }), _jsx(Button, { variant: "outline", disabled: state.busy, onClick: () => { void controller.scanImportFolder(); }, children: t('skillsScan') })] }), inboxChanges.length === 0 ? null : (_jsxs("div", { className: css.scan, children: [_jsx("div", { className: css.scanHead, role: "status", children: t('skillsInboxChanges').replace('{count}', String(inboxChanges.length)) }), _jsx(ScanRows, { entries: inboxChanges, pending: true, t: t })] })), state.scan === undefined ? null : (_jsxs("div", { className: css.scan, children: [_jsx("div", { className: css.scanHead, children: t('skillsScanSummary')
139
186
  .replace('{scanned}', String(state.scan.scanned))
140
187
  .replace('{imported}', String(state.scan.imported))
188
+ .replace('{updated}', String(state.scan.updated ?? 0))
141
189
  .replace('{existing}', String(state.scan.existing))
142
- .replace('{invalid}', String(state.scan.invalid)) }), _jsxs("div", { className: css.muted, children: [t('skillsScanHint'), " ", state.scan.root] }), state.scan.entries.length === 0 ? _jsx("div", { className: css.muted, children: t('skillsScanEmpty') }) : (_jsx("ul", { className: css.scanList, children: state.scan.entries.map(entry => (_jsxs("li", { className: css.scanRow, children: [_jsx("span", { className: css.scanFolder, children: entry.folder }), _jsx("span", { className: `${css.tag} ${entry.status === 'imported' ? css.tagOk : entry.status === 'invalid' ? css.tagWarn : ''}`, children: t(entry.status === 'imported' ? 'skillsScanImported' : entry.status === 'existing' ? 'skillsScanExisting' : 'skillsScanInvalid') }), _jsx("span", { className: css.muted, children: entry.status === 'invalid' ? scanReasonText(entry, t) : entry.assetId ?? entry.skillId ?? '' })] }, entry.folder))) }))] })), _jsx("div", { className: css.toolbar, children: _jsx("input", { className: css.search, value: query, placeholder: t('skillsSearch'), onChange: (event) => { setQuery(event.target.value); } }) }), _jsxs("div", { className: css.segment, children: [_jsx("button", { type: "button", className: `${chips.chip} ${origin === 'all' ? chips.chipActive : ''}`, onClick: () => { setOrigin('all'); }, children: t('skillsAll') }), _jsx("button", { type: "button", className: `${chips.chip} ${origin === 'builtin' ? chips.chipActive : ''}`, onClick: () => { setOrigin('builtin'); }, children: t('skillsBuiltin') }), _jsx("button", { type: "button", className: `${chips.chip} ${origin === 'custom' ? chips.chipActive : ''}`, onClick: () => { setOrigin('custom'); }, children: t('skillsCustom') })] }), _jsx("div", { className: css.rowlist, children: visible.length === 0 ? _jsx("div", { className: css.empty, children: t('skillsEmpty') }) : visible.map(asset => (_jsxs("button", { type: "button", className: css.row, onClick: () => { setPage({ kind: 'detail', assetId: asset.id }); void controller.select(asset.id); }, children: [_jsx("span", { className: `${css.dot} ${asset.origin === 'builtin' ? '' : css.dotCustom}` }), _jsxs("span", { className: css.main, children: [_jsxs("span", { className: css.rowTitle, children: [asset.skillId, _jsx("span", { className: `${chips.originTag} ${originTone(chips, asset.origin)}`, children: originLabel(asset, t) }), asset.updateAvailable === true ? _jsx("span", { className: `${css.tag} ${css.tagWarn}`, children: t('skillsOverrideOn') }) : null] }), _jsxs("span", { className: css.rowSub, children: [asset.description, " \u00B7 ", asset.fileCount, " ", t('skillsFiles'), " \u00B7 ", t('skillsBound'), " ", asset.bindings.length] })] }), _jsx("span", { className: css.chev, children: "\u203A" })] }, asset.id))) }), state.message === undefined ? null : (_jsx("div", { className: `${css.message} ${state.failed ? css.messageFailed : ''}`, children: state.message })), creating ? (_jsx("div", { className: css.dialogBackdrop, onClick: () => { setCreating(false); }, children: _jsxs("div", { className: css.dialog, role: "dialog", "aria-modal": "true", onClick: (event) => { event.stopPropagation(); }, children: [_jsx("h2", { children: t('skillsNewTitle') }), _jsx("label", { className: css.label, children: t('skillsName') }), _jsx("input", { className: css.field, value: name, placeholder: "example-skill", onChange: (event) => { setName(event.target.value); } }), _jsx("label", { className: css.label, children: t('skillsDesc') }), _jsx("input", { className: css.field, value: description, placeholder: t('skillsDesc'), onChange: (event) => { setDescription(event.target.value); } }), _jsxs("div", { className: css.dialogActions, children: [_jsx(Button, { onClick: () => { setCreating(false); }, children: t('skillsCancel') }), _jsx(Button, { onClick: () => {
190
+ .replace('{missing}', String(state.scan.missing ?? 0))
191
+ .replace('{invalid}', String(state.scan.invalid)) }), _jsxs("div", { className: css.muted, children: [t('skillsScanHint'), " ", state.scan.root] }), state.scan.entries.length === 0 ? _jsx("div", { className: css.muted, children: t('skillsScanEmpty') }) : _jsx(ScanRows, { entries: state.scan.entries, t: t })] })), _jsxs("div", { className: css.toolbar, children: [_jsx("input", { className: css.search, value: query, placeholder: t('skillsSearch'), onChange: (event) => { setQuery(event.target.value); } }), _jsxs("select", { className: chips.select, "aria-label": t('skillsCategoryAll'), value: category, onChange: (event) => { setCategory(event.target.value); }, children: [_jsx("option", { value: "all", children: t('skillsCategoryAll') }), SKILL_CATEGORIES.map(id => (_jsx("option", { value: id, children: t(SKILL_CATEGORY_LABELS[id]) }, id)))] })] }), _jsxs("div", { className: css.segment, children: [_jsx("button", { type: "button", className: `${chips.chip} ${origin === 'all' ? chips.chipActive : ''}`, onClick: () => { setOrigin('all'); }, children: t('skillsAll') }), _jsx("button", { type: "button", className: `${chips.chip} ${origin === 'builtin' ? chips.chipActive : ''}`, onClick: () => { setOrigin('builtin'); }, children: t('skillsBuiltin') }), _jsx("button", { type: "button", className: `${chips.chip} ${origin === 'custom' ? chips.chipActive : ''}`, onClick: () => { setOrigin('custom'); }, children: t('skillsCustom') })] }), _jsx("div", { className: css.rowlist, children: visible.length === 0 ? _jsx("div", { className: css.empty, children: assets.length === 0 ? t('skillsEmpty') : t('skillsFilterEmpty') }) : visible.map(asset => (_jsxs("button", { type: "button", className: css.row, onClick: () => { setPage({ kind: 'detail', assetId: asset.id }); void controller.select(asset.id); }, children: [_jsx("span", { className: `${css.dot} ${asset.origin === 'builtin' ? '' : css.dotCustom}` }), _jsxs("span", { className: css.main, children: [_jsxs("span", { className: css.rowTitle, children: [skillLabel(asset.skillId, t), _jsx("span", { className: css.muted, children: asset.skillId }), _jsx("span", { className: `${chips.originTag} ${originTone(chips, asset.origin)}`, children: originLabel(asset, t) }), asset.updateAvailable === true ? _jsx("span", { className: `${css.tag} ${css.tagWarn}`, children: t('skillsOverrideOn') }) : null] }), _jsxs("span", { className: css.rowSub, children: [asset.description, " \u00B7 ", asset.fileCount, " ", t('skillsFiles'), " \u00B7 ", t('skillsBound'), " ", asset.bindings.length] })] }), _jsx("span", { className: css.chev, children: "\u203A" })] }, asset.id))) }), state.message === undefined ? null : (_jsx("div", { className: `${css.message} ${state.failed ? css.messageFailed : ''}`, children: state.message })), creating ? (_jsx("div", { className: css.dialogBackdrop, onClick: () => { setCreating(false); }, children: _jsxs("div", { className: css.dialog, role: "dialog", "aria-modal": "true", onClick: (event) => { event.stopPropagation(); }, children: [_jsx("h2", { children: t('skillsNewTitle') }), _jsx("label", { className: css.label, children: t('skillsName') }), _jsx("input", { className: css.field, value: name, placeholder: "example-skill", onChange: (event) => { setName(event.target.value); } }), _jsx("label", { className: css.label, children: t('skillsDesc') }), _jsx("input", { className: css.field, value: description, placeholder: t('skillsDesc'), onChange: (event) => { setDescription(event.target.value); } }), _jsxs("div", { className: css.dialogActions, children: [_jsx(Button, { onClick: () => { setCreating(false); }, children: t('skillsCancel') }), _jsx(Button, { onClick: () => {
143
192
  void controller.create(name, description).then(() => {
144
193
  setName('');
145
194
  setDescription('');
@@ -1,15 +1,54 @@
1
1
  /** Locale bundles for the Agent Team presets page and composer control. */
2
2
  import type { TeamPresetImportFailure } from '../preset-transfer.ts';
3
- import type { TeamExecutionState } from '../types.ts';
3
+ import type { TeamExecutionState, TeamSkillAssetView } from '../types.ts';
4
4
  import type { DefaultsRestore, TeamPresetsFormIssue, TeamSelectionFailure } from './team-presets-controller.ts';
5
5
  /** Locale keys this plugin renders. */
6
- export type TeamPresetsLocaleKey = 'nav' | 'title' | 'description' | 'newTeam' | 'duplicate' | 'remove' | 'removeMember' | 'teamList' | 'emptyTeams' | 'emptySelection' | 'memberCount' | 'teamName' | 'teamNamePlaceholder' | 'teamDescription' | 'captain' | 'captainHint' | 'members' | 'addMember' | 'membersHint' | 'agentName' | 'agentNamePlaceholder' | 'agentColor' | 'agentDescription' | 'route' | 'routeInherit' | 'provider' | 'model' | 'effort' | 'effortDefault' | 'captainModelHint' | 'captainFollowsSession' | 'modelsPartial' | 'modelsFailed' | 'tools' | 'toolsHint' | 'toolMode' | 'toolsDefault' | 'toolsCustom' | 'toolsAllHint' | 'toolsEmpty' | 'toolsScoped' | 'toolsSelectAll' | 'toolsClear' | 'toolsRemove' | 'toolsUnavailable' | 'toolsLoading' | 'toolsFailed' | 'toolsNoCatalog' | 'toolsCaptainOnly' | 'toolsGroupPresets' | 'toolsGroupMcp' | 'toolsGroupOther' | 'toolsInvert' | 'composerMissing' | 'composerMissingHint' | 'systemPrompt' | 'systemPromptPlaceholder' | 'systemPromptHint' | 'promptWarnBraces' | 'save' | 'saving' | 'saveFailed' | 'discard' | 'unsaved' | 'readOnly' | 'unavailable' | 'sectionLoading' | 'formIssueSettingsUnavailable' | 'formIssueNamespaceMissing' | 'formIssueSchemaRejected' | 'selectionUnavailable' | 'selectionRefused' | 'selectionFailed' | 'teamNameRequired' | 'externalUpdateOne' | 'externalUpdateMany' | 'externalUpdateOverriddenOne' | 'externalUpdateOverriddenMany' | 'executionBusy' | 'executionBusyShared' | 'executionIdle' | 'executionUnknown' | 'executionPtcOverridden' | 'externalAddedOne' | 'externalAddedMany' | 'externalRemovedOne' | 'externalRemovedMany' | 'externalRemovedEditedOne' | 'externalRemovedEditedMany' | 'back' | 'backToList' | 'editCaptain' | 'editMember' | 'teamSections' | 'agentSections' | 'modelSection' | 'promptSection' | 'toolsSection' | 'identitySection' | 'emptyMembers' | 'inheritSession' | 'deleteAgent' | 'roleCaptain' | 'roleMember' | 'composerTitle' | 'composerNone' | 'composerHint' | 'trigger' | 'loading' | 'unavailable' | 'roster' | 'model' | 'open' | 'current' | 'memberStatus.running' | 'memberStatus.inactive' | 'presetMemberBadge' | 'presetMemberBadgeHint' | 'tasks' | 'empty' | 'owner' | 'unowned' | 'blockedBy' | 'writeScopes' | 'ready' | 'blocked' | 'task.expand' | 'task.collapse' | 'status.pending' | 'status.in_progress' | 'status.completed' | 'importPreset' | 'exportPreset' | 'importNote' | 'importConfirm' | 'cancel' | 'close' | 'restoreDefaults' | 'restoreDefaultsHint' | 'defaultsRestored' | 'defaultsUnchanged' | 'restoreMissingHint' | 'importConflictTitle' | 'importTeamConflict' | 'importTeamReplace' | 'importTeamRename' | 'importNewTeamName' | 'importCaptainConflict' | 'importCaptainReplace' | 'importCaptainRename' | 'importMemberConflict' | 'importMemberReplace' | 'importMemberRename' | 'importInvalidJson' | 'importInvalidFormat' | 'importUnsupportedVersion' | 'importUnsupportedFields' | 'importDuplicateMembers' | 'importTooManyMembers' | 'importTooLarge' | 'importInvalidMetadata' | 'skillsEmpty' | 'skillsImport' | 'skillsNew' | 'skillsSave' | 'skillsDelete' | 'skillsAssign' | 'skillsUnassign' | 'skillsBuiltinList' | 'skillsFiles' | 'skillsBindings' | 'skillsNamePlaceholder' | 'skillsDescriptionPlaceholder' | 'skillsRoot' | 'skillsRefresh' | 'tabLinks' | 'patchIntro' | 'patchUnavailable' | 'patchStateAbsent' | 'patchStateUnsupported' | 'patchStatePristine' | 'patchStatePatched' | 'patchStateForeign' | 'patchActive' | 'patchSupported' | 'patchInstalledVersion' | 'patchSource' | 'patchPendingHint' | 'patchApplying' | 'patchWaiting' | 'patchInstall' | 'patchUninstall' | 'patchWorking' | 'patchInstallTitle' | 'patchUninstallTitle' | 'patchInstallBody' | 'patchUninstallBody' | 'patchPackage' | 'patchFile' | 'patchInstalledOk' | 'patchRemovedOk' | 'patchRefused' | 'skillsScan' | 'skillsScanHint' | 'skillsScanSummary' | 'skillsScanEmpty' | 'skillsScanImported' | 'skillsScanExisting' | 'skillsScanInvalid' | 'skillsScanMissingSkill' | 'skillsScanInvalidFrontmatter' | 'skillsScanInvalidName' | 'skillsScanMissingDescription' | 'skillsScanTooLarge' | 'skillsScanSymlink' | 'skillsScanNotDirectory' | 'skillsScanUnreadable' | 'skillsScanDuplicate' | 'skillsScanInstallRefused' | 'skillsOpenScanFolder' | 'skillsCopyScanFolder' | 'skillsScanFolderOpened' | 'skillsScanFolderCopied' | 'skillsScanFolderCopyFailed' | 'skillsOverride' | 'skillsReset' | 'skillsBody' | 'tabTeams' | 'tabSkills' | 'skillsHint' | 'skillsAssignTitle' | 'skillsAssignHint' | 'skillsAssignEmpty' | 'skillsNameClash' | 'skillsNameClashBody' | 'skillsBlockedAssign' | 'skillsMcpUnverified' | 'skillsDeclared' | 'skillsFound' | 'skillsMissing' | 'categoryRename' | 'categoryUp' | 'categoryDown' | 'categoryManagePage' | 'categoryTitle' | 'categorySub' | 'categoryTeams' | 'categorySave' | 'categoryRemove' | 'categoryNote' | 'categoryManage' | 'categoryFold' | 'categoryName' | 'categoryAdd' | 'categoryEmpty' | 'categoryOf' | 'categoryNone' | 'metadataTitle' | 'metadataOnlyDisplay' | 'metadataNote' | 'metadataFold' | 'metadataUnfold' | 'metadataSummary' | 'metadataTags' | 'metadataTagsHint' | 'metadataUseCases' | 'metadataQuickPrompts' | 'metadataNotes' | 'filterSource' | 'filterCategory' | 'filterNoCategory' | 'listSearch' | 'listAll' | 'listBuiltin' | 'listCustom' | 'seriesDevelopment' | 'seriesWorkModes' | 'listMatched' | 'listNoInject' | 'listNoMatch' | 'listResultCount' | 'restoreConfirmTitle' | 'restoreConfirmBody' | 'restoreConfirmAction' | 'composeTitle' | 'composeClose' | 'composeSearch' | 'composeAll' | 'composeFilterCategory' | 'composeCategoryAll' | 'composeUncategorized' | 'composeNoneSub' | 'composeSeriesDev' | 'composeSeriesModes' | 'composeEmpty' | 'composePanelTitle' | 'composePanelCaptain' | 'composePanelMembers' | 'composePanelSessionModel' | 'composePanelCaptainHint' | 'composePanelSoloHint' | 'composePanelEmptyMembers' | 'composePanelNoId' | 'composerMissingMember' | 'originBuiltin' | 'originCustom' | 'originOverride' | 'skillsTitle' | 'skillsSub' | 'skillsNote' | 'skillsOpenFolder' | 'skillsOpenAssetFolder' | 'skillsSearch' | 'skillsAll' | 'skillsBuiltin' | 'skillsCustom' | 'skillsBound' | 'skillsResources' | 'skillsSaveFile' | 'skillsEditable' | 'skillsReadonly' | 'skillsMakeCopy' | 'skillsResetCopy' | 'skillsNoBinding' | 'skillsUnbind' | 'skillsDeps' | 'skillsNoDeps' | 'skillsDeleteTitle' | 'skillsDeleteBody' | 'skillsDeleteBlocked' | 'skillsDeleteBoundWarning' | 'skillsDeleteBuiltinWarning' | 'skillsCancel' | 'skillsConfirm' | 'skillsName' | 'skillsDesc' | 'skillsNewTitle' | 'skillsVersion' | 'skillsOverrideOn';
6
+ export type TeamPresetsLocaleKey = 'nav' | 'title' | 'description' | 'newTeam' | 'duplicate' | 'remove' | 'removeMember' | 'teamList' | 'emptyTeams' | 'emptySelection' | 'memberCount' | 'teamName' | 'teamNamePlaceholder' | 'teamDescription' | 'captain' | 'captainHint' | 'members' | 'addMember' | 'membersHint' | 'agentName' | 'agentNamePlaceholder' | 'agentColor' | 'agentDescription' | 'route' | 'routeInherit' | 'provider' | 'model' | 'effort' | 'effortDefault' | 'captainModelHint' | 'captainFollowsSession' | 'modelsPartial' | 'modelsFailed' | 'tools' | 'toolsHint' | 'toolMode' | 'toolsDefault' | 'toolsCustom' | 'toolsAllHint' | 'toolsEmpty' | 'toolsScoped' | 'toolsSelectAll' | 'toolsClear' | 'toolsRemove' | 'toolsUnavailable' | 'toolsLoading' | 'toolsFailed' | 'toolsNoCatalog' | 'toolsCaptainOnly' | 'toolsGroupPresets' | 'toolsGroupMcp' | 'toolsGroupOther' | 'toolsInvert' | 'composerMissing' | 'composerMissingHint' | 'systemPrompt' | 'systemPromptPlaceholder' | 'systemPromptHint' | 'promptWarnBraces' | 'save' | 'saving' | 'saveFailed' | 'discard' | 'unsaved' | 'readOnly' | 'unavailable' | 'sectionLoading' | 'formIssueSettingsUnavailable' | 'formIssueNamespaceMissing' | 'formIssueSchemaRejected' | 'selectionUnavailable' | 'selectionRefused' | 'selectionFailed' | 'teamNameRequired' | 'externalUpdateOne' | 'externalUpdateMany' | 'externalUpdateOverriddenOne' | 'externalUpdateOverriddenMany' | 'executionBusy' | 'executionBusyShared' | 'executionIdle' | 'executionUnknown' | 'executionPtcOverridden' | 'externalAddedOne' | 'externalAddedMany' | 'externalRemovedOne' | 'externalRemovedMany' | 'externalRemovedEditedOne' | 'externalRemovedEditedMany' | 'back' | 'backToList' | 'editCaptain' | 'editMember' | 'teamSections' | 'agentSections' | 'modelSection' | 'promptSection' | 'toolsSection' | 'identitySection' | 'emptyMembers' | 'inheritSession' | 'deleteAgent' | 'roleCaptain' | 'roleMember' | 'composerTitle' | 'composerNone' | 'composerHint' | 'trigger' | 'loading' | 'unavailable' | 'roster' | 'model' | 'open' | 'current' | 'memberStatus.running' | 'memberStatus.inactive' | 'presetMemberBadge' | 'presetMemberBadgeHint' | 'tasks' | 'empty' | 'owner' | 'unowned' | 'blockedBy' | 'writeScopes' | 'ready' | 'blocked' | 'task.expand' | 'task.collapse' | 'status.pending' | 'status.in_progress' | 'status.completed' | 'importPreset' | 'exportPreset' | 'importNote' | 'importConfirm' | 'cancel' | 'close' | 'restoreDefaults' | 'restoreDefaultsHint' | 'defaultsRestored' | 'defaultsUnchanged' | 'restoreMissingHint' | 'importConflictTitle' | 'importTeamConflict' | 'importTeamReplace' | 'importTeamRename' | 'importNewTeamName' | 'importCaptainConflict' | 'importCaptainReplace' | 'importCaptainRename' | 'importMemberConflict' | 'importMemberReplace' | 'importMemberRename' | 'importPreviewTitle' | 'importDraftNote' | 'importSkillDeclarations' | 'importSkillCatalog' | 'importSkillUnknown' | 'importSkillRoleMissing' | 'importSkillRoleAmbiguous' | 'importSkillCatalogIgnored' | 'importSkillEligible' | 'importSkillAssetMissing' | 'importSkillLibraryUnavailable' | 'importSkillLocalOverride' | 'importInvalidJson' | 'importInvalidFormat' | 'importUnsupportedVersion' | 'importUnsupportedFields' | 'importDuplicateMembers' | 'importTooManyMembers' | 'importTooLarge' | 'importInvalidMetadata' | 'skillsEmpty' | 'skillsImport' | 'skillsNew' | 'skillsSave' | 'skillsDelete' | 'skillsAssign' | 'skillsUnassign' | 'skillsBuiltinList' | 'skillsFiles' | 'skillsBindings' | 'skillsNamePlaceholder' | 'skillsDescriptionPlaceholder' | 'skillsRoot' | 'skillsRefresh' | 'tabLinks' | 'patchIntro' | 'patchUnavailable' | 'patchStateAbsent' | 'patchStateUnsupported' | 'patchStatePristine' | 'patchStatePatched' | 'patchStateForeign' | 'patchUnsupportedReason' | 'patchActive' | 'patchSupported' | 'patchInstalledVersion' | 'patchSource' | 'patchPendingHint' | 'patchApplying' | 'patchWaiting' | 'patchInstall' | 'patchUninstall' | 'patchWorking' | 'patchInstallTitle' | 'patchUninstallTitle' | 'patchInstallBody' | 'patchUninstallBody' | 'patchPackage' | 'patchFile' | 'patchInstalledOk' | 'patchRemovedOk' | 'patchRefused' | 'skillsScan' | 'skillsScanHint' | 'skillsScanSummary' | 'skillsScanEmpty' | 'skillsScanImported' | 'skillsScanExisting' | 'skillsScanUpdated' | 'skillsScanInvalid' | 'skillsScanSourceMissing' | 'skillsScanMissingSkill' | 'skillsScanInvalidFrontmatter' | 'skillsScanInvalidName' | 'skillsScanMissingDescription' | 'skillsScanTooLarge' | 'skillsScanSymlink' | 'skillsScanNotDirectory' | 'skillsScanUnreadable' | 'skillsScanDuplicate' | 'skillsScanInstallRefused' | 'skillsScanBuiltinNameConflict' | 'skillsScanCopyNameConflict' | 'skillsScanDuplicateSourceName' | 'skillsScanSourceMissingReason' | 'skillsScanSourceChanged' | 'skillsInboxChanges' | 'skillsInboxNew' | 'skillsInboxUpdated' | 'skillsIgnoredDependencyFields' | 'skillsOpenScanFolder' | 'skillsCopyScanFolder' | 'skillsScanFolderOpened' | 'skillsScanFolderCopied' | 'skillsScanFolderCopyFailed' | 'skillsOverride' | 'skillsReset' | 'skillsBody' | 'tabTeams' | 'tabSkills' | 'skillsHint' | 'skillsAssignTitle' | 'skillsAssignHint' | 'skillsAssignEmpty' | 'skillsNameClash' | 'skillsNameClashBody' | 'skillsBlockedAssign' | 'skillsMcpUnverified' | 'skillsDeclared' | 'skillsFound' | 'skillsMissing' | 'categoryRename' | 'categoryUp' | 'categoryDown' | 'categoryManagePage' | 'categoryTitle' | 'categorySub' | 'categoryTeams' | 'categorySave' | 'categoryRemove' | 'categoryNote' | 'categoryManage' | 'categoryFold' | 'categoryName' | 'categoryAdd' | 'categoryEmpty' | 'categoryOf' | 'categoryNone' | 'metadataTitle' | 'metadataOnlyDisplay' | 'metadataNote' | 'metadataFold' | 'metadataUnfold' | 'metadataSummary' | 'metadataTags' | 'metadataTagsHint' | 'metadataUseCases' | 'metadataQuickPrompts' | 'metadataNotes' | 'filterSource' | 'filterCategory' | 'filterNoCategory' | 'listSearch' | 'listAll' | 'listBuiltin' | 'listCustom' | 'seriesDevelopment' | 'seriesWorkModes' | 'listMatched' | 'listNoInject' | 'listNoMatch' | 'listResultCount' | 'restoreConfirmTitle' | 'restoreConfirmBody' | 'restoreConfirmAction' | 'composeTitle' | 'composeClose' | 'composeSearch' | 'composeAll' | 'composeFilterCategory' | 'composeCategoryAll' | 'composeUncategorized' | 'composeNoneSub' | 'composeSeriesDev' | 'composeSeriesModes' | 'composeEmpty' | 'composePanelTitle' | 'composePanelCaptain' | 'composePanelMembers' | 'composePanelSessionModel' | 'composePanelCaptainHint' | 'composePanelSoloHint' | 'composePanelEmptyMembers' | 'composePanelNoId' | 'composerMissingMember' | 'originBuiltin' | 'originCustom' | 'originOverride' | 'skillsTitle' | 'skillsSub' | 'skillsNote' | 'skillsOpenFolder' | 'skillsOpenAssetFolder' | 'skillsSearch' | 'skillsAll' | 'skillsBuiltin' | 'skillsCustom' | 'skillsBound' | 'skillsResources' | 'skillsSaveFile' | 'skillsEditable' | 'skillsReadonly' | 'skillsMakeCopy' | 'skillsMakeCopyTitle' | 'skillsMakeCopySwitchBindings' | 'skillsMakeCopySwitchIssue' | 'skillsResetCopy' | 'skillsNoBinding' | 'skillsUnbind' | 'skillsDeps' | 'skillsNoDeps' | 'skillsDeleteTitle' | 'skillsDeleteBody' | 'skillsDeleteBlocked' | 'skillsDeleteBoundWarning' | 'skillsDeleteBuiltinWarning' | 'skillsCancel' | 'skillsConfirm' | 'skillsName' | 'skillsDesc' | 'skillsNewTitle' | 'skillsVersion' | 'skillsOverrideOn' | 'skillAgentLeaderCommunication' | 'skillLeaderMediumTaskWorkflow' | 'skillLeaderLongTaskOrchestration' | 'skillAgentSubagentOrchestration' | 'skillFullstackAdvisor' | 'skillExecutorShortTaskWorkflow' | 'skillGithubRepositoryPresentation' | 'skillGitReleaseHygiene' | 'skillGrilling' | 'skillResearch' | 'skillFrontendEngineeringWorkflow' | 'skillBackendArchitectureWorkflow' | 'skillIndependentCodeReviewWorkflow' | 'skillsCategoryAll' | 'skillsCategoryWorkflow' | 'skillsCategoryDelivery' | 'skillsCategoryMethod' | 'skillsCategoryCustom' | 'skillsFilterEmpty';
7
7
  /** Locale namespace owned by this plugin. */
8
8
  export declare const NS = "settings.agentTeamPresets";
9
9
  /** English copy. */
10
10
  export declare const en: Record<TeamPresetsLocaleKey, string>;
11
11
  /** Simplified Chinese copy. */
12
12
  export declare const zh: Record<TeamPresetsLocaleKey, string>;
13
+ /**
14
+ * Display names of the shipped Team Skills, keyed by the English skill id.
15
+ *
16
+ * The id is the asset's identity on every other surface — the skill catalogue
17
+ * the model reads, the stored binding, the preset document, and the asset
18
+ * directory — so the label is presentation only and never reaches the runtime or
19
+ * the disk. English carries the original id rather than a prose title, so an
20
+ * English page shows exactly the name every other surface already uses.
21
+ */
22
+ export declare const SKILL_LABEL_KEYS: Readonly<Record<string, TeamPresetsLocaleKey>>;
23
+ /**
24
+ * The name one Team Skill is shown under.
25
+ * @param skillId - the asset's English identity.
26
+ * @param t - the page's locale reader.
27
+ * @returns the localized label, or the English id for a skill this build does not ship.
28
+ */
29
+ export declare function skillLabel(skillId: string, t: (key: TeamPresetsLocaleKey) => string): string;
30
+ /**
31
+ * The filter categories of a Team Skill list, in menu order.
32
+ *
33
+ * They describe the kind of work a shipped skill belongs to rather than the role
34
+ * that happens to hold it, so a skill keeps its category when a Team re-binds it.
35
+ * Everything this build does not ship — a user's own skill, and a shipped id a
36
+ * newer release added before this table learned about it — is "custom".
37
+ */
38
+ export declare const SKILL_CATEGORIES: readonly ["workflow", "delivery", "method", "custom"];
39
+ /** One filter category of a Team Skill list. */
40
+ export type SkillCategoryId = (typeof SKILL_CATEGORIES)[number];
41
+ /** Locale key of one category's label. */
42
+ export declare const SKILL_CATEGORY_LABELS: Readonly<Record<SkillCategoryId, TeamPresetsLocaleKey>>;
43
+ /**
44
+ * The category one asset is filtered under.
45
+ *
46
+ * A local override of a shipped skill stays with that skill's category: it is the
47
+ * same skill, edited. Only a skill the user brought in themselves is "custom".
48
+ * @param asset - the asset row, as the page received it.
49
+ * @returns its filter category.
50
+ */
51
+ export declare function skillCategoryOf(asset: Pick<TeamSkillAssetView, 'skillId' | 'origin' | 'officialSkillId'>): SkillCategoryId;
13
52
  /**
14
53
  * Locale key for one Host disclosure about how the applied Team runs.
15
54
  *
@@ -134,7 +134,8 @@ export const en = {
134
134
  composerMissingHint: 'This is not No team. An unapplicable selection denies tools; a running task keeps its old policy until idle. Choose a valid Team or No team.',
135
135
  importPreset: 'Import preset',
136
136
  exportPreset: 'Export',
137
- importNote: 'A shared document carries names, descriptions, system prompts, and colors. Model routes and tool permissions stay local.',
137
+ importNote: 'A shared document carries names, descriptions, system prompts, colors, display metadata, and built-in skill declarations. Model routes and tool permissions stay local.',
138
+ importDraftNote: 'Import stages the preset as a draft. Save to apply it. Skill defaults respect existing local overrides and manual unbinding.',
138
139
  restoreDefaults: 'Restore built-in presets',
139
140
  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.',
140
141
  defaultsRestored: 'Default presets restored in this draft. Save to apply them.',
@@ -154,6 +155,17 @@ export const en = {
154
155
  importMemberConflict: 'These members already exist in that team',
155
156
  importMemberReplace: 'Replace that member',
156
157
  importMemberRename: 'Add it renamed',
158
+ importPreviewTitle: 'Review preset import',
159
+ importSkillDeclarations: 'Preset skill declarations',
160
+ importSkillCatalog: 'Built-in team defaults',
161
+ importSkillUnknown: 'Invalid declaration. Only built-in skills are supported.',
162
+ importSkillRoleMissing: 'Invalid declaration. The role does not exist.',
163
+ importSkillRoleAmbiguous: 'Invalid declaration. The role does not resolve to a unique slot.',
164
+ importSkillCatalogIgnored: 'This team ID uses the built-in catalog rules.',
165
+ importSkillEligible: 'Eligible for automatic binding after saving.',
166
+ importSkillAssetMissing: 'The built-in asset is missing. The declaration is kept for automatic binding when the asset becomes available.',
167
+ importSkillLibraryUnavailable: 'Asset availability could not be checked. The declaration is kept.',
168
+ importSkillLocalOverride: 'This role’s existing local override takes precedence.',
157
169
  importInvalidJson: 'That file is not valid JSON.',
158
170
  importInvalidFormat: 'That file is not a Team preset document.',
159
171
  importUnsupportedVersion: 'That document was written by a newer version of this plugin.',
@@ -181,6 +193,7 @@ export const en = {
181
193
  patchUnavailable: 'This session cannot read the integrations state.',
182
194
  patchStateAbsent: 'not installed',
183
195
  patchStateUnsupported: 'version not supported',
196
+ patchUnsupportedReason: 'installed {installed}, this build supports up to {supported}',
184
197
  patchStatePristine: 'not patched',
185
198
  patchStatePatched: 'patched',
186
199
  patchStateForeign: 'modified by something else',
@@ -205,11 +218,13 @@ export const en = {
205
218
  patchRefused: 'Nothing changed.',
206
219
  skillsScan: 'Scan import folder',
207
220
  skillsScanHint: 'Folder path:',
208
- skillsScanSummary: 'Scanned {scanned}: imported {imported}, already present {existing}, refused {invalid}.',
221
+ skillsScanSummary: 'Scanned {scanned}. Imported {imported}, updated {updated}, unchanged {existing}, missing {missing}, refused {invalid}.',
209
222
  skillsScanEmpty: 'No skill folder was found in the import folder.',
210
223
  skillsScanImported: 'imported',
211
- skillsScanExisting: 'already present',
224
+ skillsScanExisting: 'unchanged',
225
+ skillsScanUpdated: 'updated',
212
226
  skillsScanInvalid: 'refused',
227
+ skillsScanSourceMissing: 'source missing',
213
228
  skillsScanMissingSkill: 'missing SKILL.md',
214
229
  skillsScanInvalidFrontmatter: 'invalid frontmatter',
215
230
  skillsScanInvalidName: 'name is not kebab-case',
@@ -220,6 +235,15 @@ export const en = {
220
235
  skillsScanUnreadable: 'cannot be read',
221
236
  skillsScanDuplicate: 'same skill name',
222
237
  skillsScanInstallRefused: 'publish refused',
238
+ skillsScanBuiltinNameConflict: 'name matches a built-in skill',
239
+ skillsScanCopyNameConflict: 'name matches an existing local copy',
240
+ skillsScanDuplicateSourceName: 'another source folder declares this skill name',
241
+ skillsScanSourceMissingReason: 'the previously imported source folder is missing',
242
+ skillsScanSourceChanged: 'source changed during the scan. Scan again.',
243
+ skillsInboxChanges: 'Changes in the import folder ({count})',
244
+ skillsInboxNew: 'new skill',
245
+ skillsInboxUpdated: 'update available',
246
+ skillsIgnoredDependencyFields: 'Dependency fields ignored on import ({fields}). Use set_team_skill_dependencies to configure this skill’s dependencies.',
223
247
  skillsOpenScanFolder: 'Open scan folder',
224
248
  skillsCopyScanFolder: 'Copy scan folder path',
225
249
  skillsScanFolderOpened: 'The scan folder is open. Put one skill folder inside it, then scan.',
@@ -249,7 +273,10 @@ export const en = {
249
273
  skillsEditable: 'editable',
250
274
  skillsReadonly: 'read-only original',
251
275
  skillsMakeCopy: 'Create an editable copy',
252
- skillsResetCopy: 'Reset to the built-in copy',
276
+ skillsMakeCopyTitle: 'Create an editable copy of {skill}?',
277
+ skillsMakeCopySwitchBindings: 'Switch currently bound roles to the copy ({count})',
278
+ skillsMakeCopySwitchIssue: 'The editable copy was created. Role bindings could not be switched. {issue}',
279
+ skillsResetCopy: 'Reset copy and switch roles back to the built-in skill',
253
280
  skillsNoBinding: 'Not assigned to any member yet',
254
281
  skillsUnbind: 'Remove',
255
282
  skillsDeps: 'MCP and runtime dependencies',
@@ -340,6 +367,25 @@ export const en = {
340
367
  skillsAssignHint: 'Checked skills belong to this member only. They are discovered through this Agent scope, never globally.',
341
368
  skillsAssignEmpty: 'No team skill is installed yet. Add one on the Team skills page.',
342
369
  skillsOverrideOn: 'a local override is active',
370
+ skillAgentLeaderCommunication: 'agent-leader-communication',
371
+ skillLeaderMediumTaskWorkflow: 'leader-medium-task-workflow',
372
+ skillLeaderLongTaskOrchestration: 'leader-long-task-orchestration',
373
+ skillAgentSubagentOrchestration: 'agent-subagent-orchestration',
374
+ skillFullstackAdvisor: 'fullstack-advisor',
375
+ skillExecutorShortTaskWorkflow: 'executor-short-task-workflow',
376
+ skillGithubRepositoryPresentation: 'github-repository-presentation',
377
+ skillGitReleaseHygiene: 'git-release-hygiene',
378
+ skillFrontendEngineeringWorkflow: 'frontend-engineering-workflow',
379
+ skillBackendArchitectureWorkflow: 'backend-architecture-workflow',
380
+ skillIndependentCodeReviewWorkflow: 'independent-code-review-workflow',
381
+ skillGrilling: 'grilling',
382
+ skillResearch: 'research',
383
+ skillsCategoryAll: 'All categories',
384
+ skillsCategoryWorkflow: 'Workflow',
385
+ skillsCategoryDelivery: 'Delivery',
386
+ skillsCategoryMethod: 'Method',
387
+ skillsCategoryCustom: 'Custom',
388
+ skillsFilterEmpty: 'No skill in this category.',
343
389
  };
344
390
  /** Simplified Chinese copy. */
345
391
  export const zh = {
@@ -474,7 +520,8 @@ export const zh = {
474
520
  composerMissingHint: '这不是“不使用团队”。无法应用时权限保持拒绝;进行中的任务保留旧策略直到空闲。请改选有效团队或“不使用团队”。',
475
521
  importPreset: '导入预设',
476
522
  exportPreset: '导出',
477
- importNote: '共享文档只携带名称、描述、系统提示词和颜色;模型路由与工具权限保留在本地。',
523
+ importNote: '共享文档携带名称、描述、系统提示词、颜色、展示信息和内置技能声明。模型路由与工具权限保留在本地。',
524
+ importDraftNote: '导入会暂存为草稿,保存后生效。技能默认规则会保留已有的本地副本绑定和手动解绑。',
478
525
  restoreDefaults: '恢复内置预设',
479
526
  restoreDefaultsHint: '把插件自带的预设全部恢复到出厂的名称、说明、提示词、颜色和成员名单;你为它们配置的模型路由与工具权限保持不变,你自己创建的团队完全不受影响。',
480
527
  defaultsRestored: '默认预设已恢复到草稿,保存后生效。',
@@ -494,6 +541,17 @@ export const zh = {
494
541
  importMemberConflict: '该团队已存在这些队员',
495
542
  importMemberReplace: '替换该队员',
496
543
  importMemberRename: '重命名后新增',
544
+ importPreviewTitle: '预览预设导入',
545
+ importSkillDeclarations: '预设技能声明',
546
+ importSkillCatalog: '内置团队默认技能',
547
+ importSkillUnknown: '声明无效,仅支持插件内置技能。',
548
+ importSkillRoleMissing: '声明无效,找不到该角色。',
549
+ importSkillRoleAmbiguous: '声明无效,无法唯一确定该角色。',
550
+ importSkillCatalogIgnored: '该团队 ID 使用内置团队默认规则。',
551
+ importSkillEligible: '保存后符合自动绑定条件。',
552
+ importSkillAssetMissing: '当前缺少该内置资产。声明会保留,资产可用后可自动补绑。',
553
+ importSkillLibraryUnavailable: '暂时无法核实资产是否可用。声明会保留。',
554
+ importSkillLocalOverride: '该角色已有对应的本地副本绑定,将优先保留。',
497
555
  importInvalidJson: '该文件不是合法的 JSON。',
498
556
  importInvalidFormat: '该文件不是团队预设文档。',
499
557
  importUnsupportedVersion: '该文档由更新版本的插件生成。',
@@ -521,6 +579,7 @@ export const zh = {
521
579
  patchUnavailable: '当前会话无法读取插件联动状态。',
522
580
  patchStateAbsent: '未安装',
523
581
  patchStateUnsupported: '版本不支持',
582
+ patchUnsupportedReason: '已安装 {installed},本版本最高适配 {supported}',
524
583
  patchStatePristine: '未打补丁',
525
584
  patchStatePatched: '已打补丁',
526
585
  patchStateForeign: '已被其他改动修改',
@@ -545,11 +604,13 @@ export const zh = {
545
604
  patchRefused: '未做任何修改。',
546
605
  skillsScan: '扫描导入目录',
547
606
  skillsScanHint: '目录路径:',
548
- skillsScanSummary: '已检查 {scanned} 个:新增 {imported},已存在 {existing},无法导入 {invalid}。',
607
+ skillsScanSummary: '已扫描 {scanned} 个目录。导入 {imported},更新 {updated},无变化 {existing},来源缺失 {missing},无法导入 {invalid}。',
549
608
  skillsScanEmpty: '导入目录里没有发现技能文件夹。',
550
609
  skillsScanImported: '已导入',
551
- skillsScanExisting: '已存在',
610
+ skillsScanExisting: '无变化',
611
+ skillsScanUpdated: '已更新',
552
612
  skillsScanInvalid: '无法导入',
613
+ skillsScanSourceMissing: '来源缺失',
553
614
  skillsScanMissingSkill: '缺少 SKILL.md',
554
615
  skillsScanInvalidFrontmatter: 'frontmatter 格式不正确',
555
616
  skillsScanInvalidName: 'name 不符合 kebab-case',
@@ -560,6 +621,15 @@ export const zh = {
560
621
  skillsScanUnreadable: '无法读取',
561
622
  skillsScanDuplicate: '技能名重复',
562
623
  skillsScanInstallRefused: '发布被拒绝',
624
+ skillsScanBuiltinNameConflict: '与内置技能同名',
625
+ skillsScanCopyNameConflict: '与已有本地副本同名',
626
+ skillsScanDuplicateSourceName: '另一个来源目录已声明此技能名',
627
+ skillsScanSourceMissingReason: '此前导入该技能的来源目录已缺失',
628
+ skillsScanSourceChanged: '来源在扫描期间发生了变化,请重新扫描。',
629
+ skillsInboxChanges: '导入目录有变动({count})',
630
+ skillsInboxNew: '新技能',
631
+ skillsInboxUpdated: '有更新',
632
+ skillsIgnoredDependencyFields: '导入时已忽略依赖字段({fields})。请使用 set_team_skill_dependencies 配置此技能的依赖。',
563
633
  skillsOpenScanFolder: '打开扫描技能目录',
564
634
  skillsCopyScanFolder: '复制扫描技能目录',
565
635
  skillsScanFolderOpened: '已打开扫描目录。把一个技能文件夹放进去后点扫描即可。',
@@ -589,7 +659,10 @@ export const zh = {
589
659
  skillsEditable: '可编辑',
590
660
  skillsReadonly: '只读原版',
591
661
  skillsMakeCopy: '创建本地可编辑副本',
592
- skillsResetCopy: '恢复为插件内置版本',
662
+ skillsMakeCopyTitle: '创建「{skill}」的本地可编辑副本?',
663
+ skillsMakeCopySwitchBindings: '将当前绑定此技能的角色切换到副本({count})',
664
+ skillsMakeCopySwitchIssue: '已创建可编辑副本。未能切换角色绑定。{issue}',
665
+ skillsResetCopy: '重置副本并将角色切回内置技能',
593
666
  skillsNoBinding: '尚未分配给任何成员',
594
667
  skillsUnbind: '解除绑定',
595
668
  skillsDeps: 'MCP 及运行环境依赖',
@@ -680,7 +753,111 @@ export const zh = {
680
753
  skillsAssignHint: '勾选的技能只属于这名成员,通过该 Agent 的作用域发现,不会全局注册。',
681
754
  skillsAssignEmpty: '还没有安装任何团队技能,请先到「团队技能」页添加。',
682
755
  skillsOverrideOn: '已启用本地覆盖',
756
+ skillAgentLeaderCommunication: '队长派发与通信',
757
+ skillLeaderMediumTaskWorkflow: '中程任务工作流',
758
+ skillLeaderLongTaskOrchestration: '长程任务编排',
759
+ skillAgentSubagentOrchestration: '孙代理并行编排',
760
+ skillFullstackAdvisor: '全栈技术咨询',
761
+ skillExecutorShortTaskWorkflow: '执行者短程工作流',
762
+ skillGithubRepositoryPresentation: '仓库展示规范',
763
+ skillGitReleaseHygiene: 'Git 提交与发布规范',
764
+ skillFrontendEngineeringWorkflow: '前端工程工作流',
765
+ skillBackendArchitectureWorkflow: '后端架构工作流',
766
+ skillIndependentCodeReviewWorkflow: '独立代码审查工作流',
767
+ skillGrilling: '需求拷问',
768
+ skillResearch: '一手来源调研',
769
+ skillsCategoryAll: '全部分类',
770
+ skillsCategoryWorkflow: '工作流型',
771
+ skillsCategoryDelivery: '交付型',
772
+ skillsCategoryMethod: '方法型',
773
+ skillsCategoryCustom: '自定义',
774
+ skillsFilterEmpty: '该分类下暂无技能。',
683
775
  };
776
+ /**
777
+ * Display names of the shipped Team Skills, keyed by the English skill id.
778
+ *
779
+ * The id is the asset's identity on every other surface — the skill catalogue
780
+ * the model reads, the stored binding, the preset document, and the asset
781
+ * directory — so the label is presentation only and never reaches the runtime or
782
+ * the disk. English carries the original id rather than a prose title, so an
783
+ * English page shows exactly the name every other surface already uses.
784
+ */
785
+ export const SKILL_LABEL_KEYS = {
786
+ 'agent-leader-communication': 'skillAgentLeaderCommunication',
787
+ 'leader-medium-task-workflow': 'skillLeaderMediumTaskWorkflow',
788
+ 'leader-long-task-orchestration': 'skillLeaderLongTaskOrchestration',
789
+ 'agent-subagent-orchestration': 'skillAgentSubagentOrchestration',
790
+ 'fullstack-advisor': 'skillFullstackAdvisor',
791
+ 'executor-short-task-workflow': 'skillExecutorShortTaskWorkflow',
792
+ 'github-repository-presentation': 'skillGithubRepositoryPresentation',
793
+ 'git-release-hygiene': 'skillGitReleaseHygiene',
794
+ 'frontend-engineering-workflow': 'skillFrontendEngineeringWorkflow',
795
+ 'backend-architecture-workflow': 'skillBackendArchitectureWorkflow',
796
+ 'independent-code-review-workflow': 'skillIndependentCodeReviewWorkflow',
797
+ 'grilling': 'skillGrilling',
798
+ 'research': 'skillResearch',
799
+ };
800
+ /**
801
+ * The name one Team Skill is shown under.
802
+ * @param skillId - the asset's English identity.
803
+ * @param t - the page's locale reader.
804
+ * @returns the localized label, or the English id for a skill this build does not ship.
805
+ */
806
+ export function skillLabel(skillId, t) {
807
+ const key = SKILL_LABEL_KEYS[skillId];
808
+ return key === undefined ? skillId : t(key);
809
+ }
810
+ /**
811
+ * The filter categories of a Team Skill list, in menu order.
812
+ *
813
+ * They describe the kind of work a shipped skill belongs to rather than the role
814
+ * that happens to hold it, so a skill keeps its category when a Team re-binds it.
815
+ * Everything this build does not ship — a user's own skill, and a shipped id a
816
+ * newer release added before this table learned about it — is "custom".
817
+ */
818
+ export const SKILL_CATEGORIES = ['workflow', 'delivery', 'method', 'custom'];
819
+ /** Locale key of one category's label. */
820
+ export const SKILL_CATEGORY_LABELS = {
821
+ workflow: 'skillsCategoryWorkflow',
822
+ delivery: 'skillsCategoryDelivery',
823
+ method: 'skillsCategoryMethod',
824
+ custom: 'skillsCategoryCustom',
825
+ };
826
+ /**
827
+ * The category of every shipped skill, keyed by the English skill id.
828
+ *
829
+ * A shipped skill the table does not name falls back to "custom", which is why
830
+ * the package's own test proves the table covers every shipped id: the fallback
831
+ * is for a skill this build did not ship, never for one it did.
832
+ */
833
+ const SHIPPED_SKILL_CATEGORIES = {
834
+ 'agent-leader-communication': 'workflow',
835
+ 'leader-medium-task-workflow': 'workflow',
836
+ 'leader-long-task-orchestration': 'workflow',
837
+ 'agent-subagent-orchestration': 'workflow',
838
+ 'fullstack-advisor': 'workflow',
839
+ 'executor-short-task-workflow': 'workflow',
840
+ 'github-repository-presentation': 'delivery',
841
+ 'git-release-hygiene': 'delivery',
842
+ 'frontend-engineering-workflow': 'workflow',
843
+ 'backend-architecture-workflow': 'workflow',
844
+ 'independent-code-review-workflow': 'workflow',
845
+ 'grilling': 'method',
846
+ 'research': 'method',
847
+ };
848
+ /**
849
+ * The category one asset is filtered under.
850
+ *
851
+ * A local override of a shipped skill stays with that skill's category: it is the
852
+ * same skill, edited. Only a skill the user brought in themselves is "custom".
853
+ * @param asset - the asset row, as the page received it.
854
+ * @returns its filter category.
855
+ */
856
+ export function skillCategoryOf(asset) {
857
+ if (asset.origin === 'custom')
858
+ return 'custom';
859
+ return SHIPPED_SKILL_CATEGORIES[asset.officialSkillId ?? asset.skillId] ?? 'custom';
860
+ }
684
861
  /**
685
862
  * Locale key for one Host disclosure about how the applied Team runs.
686
863
  *