dsh-super-code 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,16 @@ A faster, more efficient coding plugin for DeepSeek Harness. It handles straight
8
8
 
9
9
  On the same SWE-bench Pro hard-100 set, the Batch.3 candidate adopted for 0.3.0 uses **48% less response time**, **45% fewer total tokens**, and **44.5% fewer model calls**, with **54% passing versus 44%** for official minimal. [Full results and limitations](docs/EvaluationResults.md)
10
10
 
11
+ ## 0.3.1 · What's New
12
+
13
+ 设置页始终展开,显示插件与当前预设的独立版本,并提示版本不一致或旧预设未记录版本。目录式和 DSH NEXT 等声明式宿主均提供安装、确认重装、改名及恢复备份,默认名称和描述跟随中英文切换。[版本检查与更新](docs/UsageGuide.md#查看预设版本--checking-the-preset-version)
14
+
15
+ The settings page stays expanded, shows independent plugin and preset versions, and flags mismatched or unrecorded versions. Directory and declarative hosts such as DSH NEXT support installation, confirmed reinstallation, renaming and recovery backups. Default names and descriptions follow Chinese/English language changes. [Version checks and updates](docs/UsageGuide.md#查看预设版本--checking-the-preset-version)
16
+
17
+ 本版本已逐版验证 Harness `0.1.5-alpha.1`~`0.2.1-alpha.2` 的 15 个官方 Web/CLI 版本;原生桌面范围和限制见[兼容矩阵](docs/Compatibility.md)。
18
+
19
+ This version verifies 15 official Web/CLI versions from Harness `0.1.5-alpha.1` through `0.2.1-alpha.2`; see the [matrix](docs/Compatibility.md) for native Desktop coverage and limits.
20
+
11
21
  ## 0.3.0 · What's New
12
22
 
13
23
  - **批量工具调用:** 用 Harness 原生 PTC 在一次模型调用中组合多个操作,减少来回;独立读取可以并行,写入、测试和有依赖的操作依次执行,不用额外配置。
@@ -33,8 +43,8 @@ Use Node.js 22 or later and a [verified Harness version](docs/Compatibility.md).
33
43
  dsh plugin --profile web add dsh-super-code
34
44
  ```
35
45
 
36
- 本地 0.3.0 安装包可用 `dsh plugin --profile web add ./dsh-super-code-0.3.0.tgz` 安装。
37
- For a local 0.3.0 package, use `dsh plugin --profile web add ./dsh-super-code-0.3.0.tgz`.
46
+ GitHub Release 中的 0.3.1 安装包可用 `dsh plugin --profile web add ./dsh-super-code-0.3.1.tgz` 安装。
47
+ To install the 0.3.1 package from GitHub Releases, use `dsh plugin --profile web add ./dsh-super-code-0.3.1.tgz`.
38
48
 
39
49
  2. **选中预设:** 打开“设置”→“Agent 预设”,选择 `super-code`。
40
50
 
package/client/index.js CHANGED
@@ -28,13 +28,26 @@ const zh = {
28
28
  'memory.usageEmpty': '尚无记忆读取记录', 'memory.context': '带入上下文', 'memory.read': '读取详情', 'memory.summary': '读取摘要',
29
29
  'memory.remember': '保存', 'memory.forget': '删除', 'memory.omitted': '仅展示最近 100 条不同动作,完整记录保留在会话中。', 'memory.open': '查看记忆库',
30
30
  'preset.title': 'Super Code 模式', 'usage.cacheUnknown': '缓存 —',
31
- 'preset.description': '更快、更省、更聪明的编码模式。', 'preset.refresh': '刷新状态', 'preset.expand': '展开设置', 'preset.collapse': '收起设置',
31
+ 'preset.description': '更快、更省、更聪明的编码模式。', 'preset.refresh': '刷新状态',
32
32
  'preset.state.available': '预设可用', 'preset.state.installed': '用户预设已安装', 'preset.state.conflict': '已有同名预设',
33
33
  'preset.state.missing': '尚未安装', 'preset.state.broken': '预设不可用',
34
- 'preset.availableHint': '可在新对话中选择此预设。升级仅更新未修改的默认名称和描述。',
35
- 'preset.installHint': '安装一份用户预设;已有内容会保留,标识符冲突时请换个标识符。',
34
+ 'preset.availableHint': '可在新对话中选择此预设。',
35
+ 'preset.installHint': '安装 Super Code 预设;已有内容会保留,标识符冲突时请换个标识符。',
36
36
  'preset.userConflict': '用户目录中已有相同标识符的预设,已保留。可更换标识符安装独立副本。',
37
- 'preset.readonly': '此宿主未提供用户预设目录,无法安装副本。',
37
+ 'preset.declaredHint': '此宿主通过预设声明加载 Super Code,可在此安装或确认重装。',
38
+ 'preset.declaredReadonly': '此宿主通过插件声明加载预设,但未开放管理接口。请检查插件启用状态或重启宿主。',
39
+ 'preset.state.declaredInstalled': '预设已安装',
40
+ 'preset.installDeclared': '安装预设',
41
+ 'preset.declaredNameHint': '用于识别预设,通常保留 super-code。以小写字母或数字开头,仅支持小写字母、数字和连字符,最多 64 个字符。',
42
+ 'preset.readonly': '此宿主未开放用户预设目录,无法在此安装或重装副本。',
43
+ 'preset.unavailableHint': '请检查插件是否已启用,然后重启宿主或刷新状态。',
44
+ 'preset.pluginVersion': '插件版本', 'preset.presetVersion': '当前预设版本',
45
+ 'preset.versionUnknown': '未记录版本', 'preset.versionMissing': '未安装',
46
+ 'preset.versionMatches': '预设版本与当前插件一致。',
47
+ 'preset.versionMismatch': '预设版本与当前插件版本不一致。',
48
+ 'preset.versionUnknownHint': '此预设未记录版本,无法确认是否与当前插件一致。',
49
+ 'preset.versionReinstallHint': '如需更新预设,请先保留自定义内容,再确认重新安装。',
50
+ 'preset.versionReloadHint': '请确认插件更新已生效,重启宿主后刷新状态;若仍不一致,请重新安装插件。',
38
51
  'preset.displayName': '显示名称', 'preset.displayNameHint': '支持中文和空格,最多 120 个字符,例如 Super Code 模式。', 'preset.name': '预设标识符', 'preset.nameHint': '用于安装目录,通常保留 super-code 即可。以小写字母或数字开头,仅含小写字母、数字和连字符,最多 64 个字符。',
39
52
  'preset.confirmTitle': '确认重新安装预设',
40
53
  'preset.confirmHint': '以下是通过本插件安装的预设,将会被移除并按照新名称重新安装,旧内容会保留恢复备份。对于需要保留的预设可以手动在列表中移除。',
@@ -46,7 +59,8 @@ const zh = {
46
59
  'preset.error.invalid-display-name': '显示名称不能为空或全为空格,最多 120 个字符;支持中文和空格。',
47
60
  'preset.error.name-taken': '该标识符已被占用,原预设未改动。请更换标识符。',
48
61
  'preset.error.no-user-root': '此宿主没有可写的用户预设目录。',
49
- 'preset.error.install-failed': '安装未完成,请检查预设目录的写入权限后重试。',
62
+ 'preset.error.management-unavailable': '此宿主未开放预设管理接口,请检查插件启用状态或重启宿主。',
63
+ 'preset.error.install-failed': '安装未完成,已尝试恢复原配置。请检查写入权限和宿主日志后重试。',
50
64
  'preset.error.connection': '暂时无法读取预设状态,请刷新重试。',
51
65
  'task.memory': '任务档案', 'task.other': '其他任务', 'task.history': '任务记录',
52
66
  'status.active': '进行中', 'status.paused': '已暂停', 'status.completed': '已完成', 'status.cancelled': '已取消',
@@ -73,13 +87,26 @@ const en = {
73
87
  'memory.usageEmpty': 'No memory reads recorded yet', 'memory.context': 'Added to context', 'memory.read': 'Read details', 'memory.summary': 'Read summary',
74
88
  'memory.remember': 'Saved', 'memory.forget': 'Removed', 'memory.omitted': 'Showing the latest 100 distinct actions. Full records remain in the conversation.', 'memory.open': 'Open memory library',
75
89
  'preset.title': 'Super Code', 'usage.cacheUnknown': 'Cache —',
76
- 'preset.description': 'A faster, more efficient, smarter coding mode.', 'preset.refresh': 'Refresh status', 'preset.expand': 'Show settings', 'preset.collapse': 'Hide settings',
90
+ 'preset.description': 'A faster, more efficient, smarter coding mode.', 'preset.refresh': 'Refresh status',
77
91
  'preset.state.available': 'Preset available', 'preset.state.installed': 'User preset installed', 'preset.state.conflict': 'Preset name already exists',
78
92
  'preset.state.missing': 'Not installed', 'preset.state.broken': 'Preset unavailable',
79
- 'preset.availableHint': 'Select this preset in a new conversation. Upgrades update only unchanged default names and descriptions.',
80
- 'preset.installHint': 'Install a user copy. Existing content is preserved; choose another identifier if it is taken.',
93
+ 'preset.availableHint': 'Select this preset in a new conversation.',
94
+ 'preset.installHint': 'Install the Super Code preset. Existing content is preserved; choose another identifier if it is taken.',
81
95
  'preset.userConflict': 'A user preset with this identifier already exists and was preserved. Choose another identifier for a separate copy.',
82
- 'preset.readonly': 'This host does not provide a user preset directory.',
96
+ 'preset.declaredHint': 'This host loads Super Code through a preset declaration. You can install it here or confirm reinstallation.',
97
+ 'preset.declaredReadonly': 'This host loads plugin preset declarations but does not expose preset management. Check plugin activation or restart the host.',
98
+ 'preset.state.declaredInstalled': 'Preset installed',
99
+ 'preset.installDeclared': 'Install preset',
100
+ 'preset.declaredNameHint': 'Identifies the preset; usually keep super-code. Start with a lowercase letter or digit; use only lowercase letters, digits and hyphens, up to 64 characters.',
101
+ 'preset.readonly': 'This host does not expose a user preset directory for installing or reinstalling copies.',
102
+ 'preset.unavailableHint': 'Check that the plugin is enabled, then restart the host or refresh the status.',
103
+ 'preset.pluginVersion': 'Plugin version', 'preset.presetVersion': 'Current preset version',
104
+ 'preset.versionUnknown': 'Version not recorded', 'preset.versionMissing': 'Not installed',
105
+ 'preset.versionMatches': 'The preset version matches the installed plugin.',
106
+ 'preset.versionMismatch': 'The preset version differs from the installed plugin.',
107
+ 'preset.versionUnknownHint': 'This preset has no recorded version, so its version cannot be compared with the installed plugin.',
108
+ 'preset.versionReinstallHint': 'To update the preset, save any custom content, then confirm reinstallation.',
109
+ 'preset.versionReloadHint': 'Check that the plugin update has taken effect, restart the host and refresh the status. If the versions still differ, reinstall the plugin.',
83
110
  'preset.displayName': 'Display name', 'preset.displayNameHint': 'Supports Chinese characters and spaces, up to 120 characters, e.g. Super Code 模式.', 'preset.name': 'Preset identifier', 'preset.nameHint': 'Used for the installation directory; usually keep super-code. Start with a lowercase letter or digit; use only lowercase letters, digits and hyphens, up to 64 characters.',
84
111
  'preset.confirmTitle': 'Confirm preset reinstallation',
85
112
  'preset.confirmHint': 'These presets were installed by this plugin. They will be removed and reinstalled with the new names shown, and recovery backups will be kept. Remove any preset you want to keep from the list.',
@@ -91,7 +118,8 @@ const en = {
91
118
  'preset.error.invalid-display-name': 'The display name cannot be empty or whitespace-only and must be at most 120 characters. Chinese characters and spaces are supported.',
92
119
  'preset.error.name-taken': 'This identifier is taken. The existing preset was preserved. Choose another identifier.',
93
120
  'preset.error.no-user-root': 'This host has no writable user preset directory.',
94
- 'preset.error.install-failed': 'Installation failed. Check directory write permissions and retry.',
121
+ 'preset.error.management-unavailable': 'This host does not expose preset management. Check plugin activation or restart the host.',
122
+ 'preset.error.install-failed': 'Installation failed and restoration of the original configuration was attempted. Check write permissions and host logs, then retry.',
95
123
  'preset.error.connection': 'Preset status is unavailable. Refresh to try again.',
96
124
  'task.memory': 'Task memory', 'task.other': 'Other tasks', 'task.history': 'Task history',
97
125
  'status.active': 'Active', 'status.paused': 'Paused', 'status.completed': 'Completed', 'status.cancelled': 'Cancelled', 'next': 'Next: ',
@@ -1047,10 +1075,11 @@ function synchronizePresetDisplay(api, locale, reload, onError) {
1047
1075
 
1048
1076
  function PresetSettings({ api, t }) {
1049
1077
  const [status, setStatus] = useState(null), [customId, setCustomId] = useState(null)
1050
- const name = customId ?? (status?.state === 'installed' ? status.id : 'super-code')
1078
+ const reinstall = status?.reinstallable ?? status?.state === 'installed'
1079
+ const name = customId ?? (reinstall ? status.id : 'super-code')
1051
1080
  const [customDisplayName, setCustomDisplayName] = useState(null)
1052
- const displayName = customDisplayName ?? (status?.state === 'installed' ? status.name || t('preset.title') : t('preset.title'))
1053
- const [busy, setBusy] = useState(true), [error, setError] = useState(''), [open, setOpen] = useState(false)
1081
+ const displayName = customDisplayName ?? (reinstall ? status.name || t('preset.title') : t('preset.title'))
1082
+ const [busy, setBusy] = useState(true), [error, setError] = useState('')
1054
1083
  const [confirmation, setConfirmation] = useState(null)
1055
1084
  const dialog = useRef(null)
1056
1085
  const alive = useRef(false), pending = useRef(false)
@@ -1059,7 +1088,20 @@ function PresetSettings({ api, t }) {
1059
1088
  const element = dialog.current
1060
1089
  element.showModal()
1061
1090
  element.querySelector('[data-super-code-cancel]')?.focus()
1062
- return () => { if (element.open) element.close() }
1091
+ // Removing the focused list row can leave focus outside the native dialog.
1092
+ // Capture Escape before the host's document listener closes Settings too.
1093
+ const target = element.ownerDocument.defaultView
1094
+ const cancel = event => {
1095
+ if (event.key !== 'Escape' || event.isComposing) return
1096
+ event.preventDefault()
1097
+ event.stopPropagation()
1098
+ setConfirmation(null)
1099
+ }
1100
+ target.addEventListener('keydown', cancel, true)
1101
+ return () => {
1102
+ target.removeEventListener('keydown', cancel, true)
1103
+ if (element.open) element.close()
1104
+ }
1063
1105
  }, [confirmation !== null])
1064
1106
  const run = async (install, confirmed = null) => {
1065
1107
  if (pending.current) return
@@ -1089,28 +1131,36 @@ function PresetSettings({ api, t }) {
1089
1131
  useEffect(() => { alive.current = true; run(false); return () => { alive.current = false } }, [api])
1090
1132
  const submit = () => {
1091
1133
  if (busy || pending.current || !displayName.trim() || !/^[a-z0-9][a-z0-9-]{0,63}$/.test(name.trim())) return
1092
- if (status?.state === 'installed') {
1134
+ if (reinstall) {
1093
1135
  setConfirmation([{ previousId: status.id, id: name.trim(),
1094
1136
  name: customDisplayName === null && displayName === t('preset.title') ? '' : displayName.trim(), label: displayName.trim() }])
1095
1137
  } else run(true)
1096
1138
  }
1097
1139
  const available = status && ['available', 'installed'].includes(status.state)
1098
- return React.createElement('section', { className: `dsh-super-code-settings${open ? ' dsh-super-code-settings-open' : ''}` },
1099
- React.createElement('button', { type: 'button', className: 'dsh-super-code-settings-header', 'aria-expanded': open,
1100
- 'aria-label': `${t(open ? 'preset.collapse' : 'preset.expand')}: ${t('preset.title')}`, onClick: () => setOpen(!open) },
1140
+ const versionState = status?.presetVersion ? status.presetVersion === status.pluginVersion ? 'match' : 'mismatch' : 'unknown'
1141
+ return React.createElement('section', { className: 'dsh-super-code-settings' },
1142
+ React.createElement('header', { className: 'dsh-super-code-settings-header' },
1101
1143
  React.createElement('span', { className: 'dsh-super-code-settings-head-text' },
1102
- React.createElement('span', { className: 'dsh-super-code-settings-name' }, t('preset.title')),
1103
- React.createElement('span', { className: 'dsh-super-code-settings-description' }, t('preset.description'))),
1104
- React.createElement(IconChevronDownOutline14, { className: `dsh-super-code-settings-chevron${open ? ' dsh-super-code-settings-chevron-open' : ''}`, 'aria-hidden': true })),
1105
- open && React.createElement('div', { className: 'dsh-super-code-settings-body' },
1144
+ React.createElement('h2', { className: 'dsh-super-code-settings-name' }, t('preset.title')),
1145
+ React.createElement('span', { className: 'dsh-super-code-settings-description' }, t('preset.description')))),
1146
+ React.createElement('div', { className: 'dsh-super-code-settings-body' },
1106
1147
  status && React.createElement('p', { className: 'dsh-super-code-preset-status', role: 'status', 'data-available': available },
1107
- React.createElement('span', { 'aria-hidden': true }, '●'), ' ', t(`preset.state.${status.state}`), ' · ', status.id),
1148
+ React.createElement('span', { 'aria-hidden': true }, '●'), ' ', t(status.delivery === 'declaration' && status.state === 'installed' ? 'preset.state.declaredInstalled' : `preset.state.${status.state}`), ' · ', status.id),
1108
1149
  React.createElement('div', { className: 'dsh-super-code-settings-actions' },
1109
1150
  React.createElement('button', { type: 'button', disabled: busy, onClick: () => run(false), 'aria-label': t('preset.refresh') }, t('preset.refresh'))),
1110
- status && React.createElement('p', null, t(available ? 'preset.availableHint' : 'preset.installHint')),
1111
- status?.state === 'installed' && React.createElement('p', null, t('preset.reinstallHint')),
1151
+ status && React.createElement('dl', { className: 'dsh-super-code-preset-versions' },
1152
+ React.createElement('dt', null, t('preset.pluginVersion')),
1153
+ React.createElement('dd', null, status.pluginVersion),
1154
+ React.createElement('dt', null, t('preset.presetVersion')),
1155
+ React.createElement('dd', null, status.state === 'missing' ? t('preset.versionMissing') : status.presetVersion || t('preset.versionUnknown'))),
1156
+ status && status.state !== 'missing' && React.createElement('p', { className: 'dsh-super-code-version-hint', role: 'status', 'data-version-state': versionState },
1157
+ t(versionState === 'match' ? 'preset.versionMatches' : versionState === 'mismatch' ? 'preset.versionMismatch' : 'preset.versionUnknownHint'),
1158
+ versionState === 'mismatch' && ` ${t(reinstall && status.authorable ? 'preset.versionReinstallHint' : 'preset.versionReloadHint')}`),
1159
+ status && React.createElement('p', null, t(available ? 'preset.availableHint' : status.authorable ? 'preset.installHint' : 'preset.unavailableHint')),
1160
+ reinstall && React.createElement('p', null, t('preset.reinstallHint')),
1112
1161
  status?.userConflict && status.state !== 'conflict' && React.createElement('p', null, t('preset.userConflict')),
1113
- status && !status.authorable && React.createElement('p', { role: 'note' }, t('preset.readonly')),
1162
+ status?.delivery === 'declaration' && React.createElement('p', { role: 'note' }, t(status.authorable ? 'preset.declaredHint' : 'preset.declaredReadonly')),
1163
+ status?.delivery === 'directory' && !status.authorable && React.createElement('p', { role: 'note' }, t('preset.readonly')),
1114
1164
  status?.authorable && React.createElement('form', { onSubmit: event => { event.preventDefault(); submit() } },
1115
1165
  React.createElement('label', { htmlFor: 'super-code-display-name' }, t('preset.displayName')),
1116
1166
  React.createElement('input', { id: 'super-code-display-name', value: displayName, maxLength: 120, required: true, disabled: busy, 'aria-describedby': 'super-code-display-name-hint', onChange: event => setCustomDisplayName(event.target.value) }),
@@ -1120,8 +1170,8 @@ function PresetSettings({ api, t }) {
1120
1170
  React.createElement('input', { id: 'super-code-preset-name', value: name, maxLength: 64, disabled: busy,
1121
1171
  pattern: '[a-z0-9][a-z0-9\\-]{0,63}', required: true, autoComplete: 'off', spellCheck: false,
1122
1172
  'aria-describedby': 'super-code-preset-name-hint', onChange: event => setCustomId(event.target.value) }),
1123
- React.createElement('button', { type: 'submit', disabled: busy || !displayName.trim() || !/^[a-z0-9][a-z0-9-]{0,63}$/.test(name.trim()) }, t(busy ? 'preset.working' : status?.state === 'installed' ? 'preset.reinstall' : 'preset.install'))),
1124
- React.createElement('small', { id: 'super-code-preset-name-hint' }, t('preset.nameHint'))),
1173
+ React.createElement('button', { type: 'submit', disabled: busy || !displayName.trim() || !/^[a-z0-9][a-z0-9-]{0,63}$/.test(name.trim()) }, t(busy ? 'preset.working' : reinstall ? 'preset.reinstall' : status?.delivery === 'declaration' ? 'preset.installDeclared' : 'preset.install'))),
1174
+ React.createElement('small', { id: 'super-code-preset-name-hint' }, t(status?.delivery === 'declaration' ? 'preset.declaredNameHint' : 'preset.nameHint'))),
1125
1175
  error && React.createElement('p', { role: 'alert' }, t(error))),
1126
1176
  confirmation && React.createElement('dialog', { ref: dialog, className: 'dsh-super-code-confirm',
1127
1177
  'aria-labelledby': 'super-code-confirm-title', 'aria-describedby': 'super-code-confirm-hint',
@@ -1196,11 +1246,12 @@ function apply(ctx) {
1196
1246
  .dsh-super-code-memory-activity{margin-top:14px;font-size:12px}.dsh-super-code-memory-activity summary{cursor:pointer}.dsh-super-code-memory-activity-list{max-height:200px;overflow:auto}.dsh-super-code-memory-activity-list button{display:grid;grid-template-columns:auto 1fr;gap:5px 8px;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--agent-line);padding:10px 2px;color:inherit;font:inherit;cursor:pointer}.dsh-super-code-memory-activity-list small{grid-column:2;color:var(--agent-muted);overflow-wrap:anywhere}.dsh-super-code-memory-activity-list span{overflow-wrap:anywhere}
1197
1247
  .dsh-super-code-memory-action{font-size:10px;color:#4d779f}.dsh-super-code-memory-action[data-action=read]{color:#14867b}.dsh-super-code-memory-action[data-action=remember]{color:#927247}.dsh-super-code-memory-action[data-action=forget]{color:var(--agent-muted)}
1198
1248
  .dsh-super-code-memory button:focus-visible,.dsh-super-code-memory input:focus-visible{outline:2px solid var(--dsw-color-primary,#3276dc);outline-offset:2px}
1199
- .dsh-super-code-settings{list-style:none;border:.5px solid var(--dsw-alias-border-l4,#dedfe3);border-radius:16px;background:var(--dsw-alias-bg-layer-3,transparent);line-height:1.6;font-size:13px;transition:border-color .16s,background .16s}
1200
- .dsh-super-code-settings:hover{border-color:var(--dsw-alias-label-dimmed,#a8abb2)}.dsh-super-code-settings-open{background:var(--dsw-alias-bg-layer-2,transparent);border-color:var(--dsw-alias-label-dimmed,#a8abb2)}
1201
- .dsh-super-code-settings-header{width:100%;appearance:none;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:12px}
1202
- .dsh-super-code-settings-head-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.dsh-super-code-settings-name{font-size:15px;font-weight:600;line-height:1.4;color:var(--dsw-alias-label-primary,inherit)}
1203
- .dsh-super-code-settings-description{font-size:13px;line-height:1.5;color:var(--dsw-alias-label-tertiary,#70757d)}.dsh-super-code-settings-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#70757d);transition:transform .16s}.dsh-super-code-settings-chevron-open{transform:rotate(180deg)}
1249
+ .dsh-super-code-settings{list-style:none;border:.5px solid var(--dsw-alias-border-l4,#dedfe3);border-radius:16px;background:var(--dsw-alias-bg-layer-2,transparent);line-height:1.6;font-size:13px}
1250
+ .dsh-super-code-settings-header{display:flex;align-items:center;gap:12px;padding:14px 16px}
1251
+ .dsh-super-code-settings-head-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.dsh-super-code-settings-name{margin:0;font-size:15px;font-weight:600;line-height:1.4;color:var(--dsw-alias-label-primary,inherit)}
1252
+ .dsh-super-code-settings-description{font-size:13px;line-height:1.5;color:var(--dsw-alias-label-tertiary,#70757d)}
1253
+ .dsh-super-code-preset-versions{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 16px;margin:12px 0}.dsh-super-code-preset-versions dt{color:var(--dsw-alias-label-secondary,#70757d)}.dsh-super-code-preset-versions dd{margin:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
1254
+ .dsh-super-code-settings .dsh-super-code-version-hint[data-version-state=mismatch],.dsh-super-code-settings .dsh-super-code-version-hint[data-version-state=unknown]{border-left:2px solid #b87716;padding:8px 12px;background:color-mix(in srgb,#b87716 8%,transparent)}
1204
1255
  .dsh-super-code-confirm{box-sizing:border-box;width:min(560px,calc(100vw - 48px));max-height:80vh;overflow:auto;border:1px solid var(--dsw-alias-border-l2,#dedfe3);border-radius:8px;padding:24px;color:var(--dsw-alias-label-primary,#202126);background:var(--dsw-alias-bg-layer-1,#fff);font-size:13px;line-height:1.6}.dsh-super-code-confirm::backdrop{background:#0006}.dsh-super-code-confirm h3{font-size:16px;margin:0 0 12px}.dsh-super-code-confirm p{margin:0 0 14px}.dsh-super-code-confirm ul{padding:0;margin:0 0 18px;list-style:none}.dsh-super-code-confirm li{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0;overflow-wrap:anywhere}.dsh-super-code-confirm-actions{display:flex;justify-content:flex-end;gap:8px}.dsh-super-code-confirm button{font:inherit;color:inherit;border:1px solid var(--dsw-alias-border-l1,#dedfe3);border-radius:6px;background:transparent;padding:7px 10px;min-height:34px;cursor:pointer}.dsh-super-code-confirm button:disabled{opacity:.45;cursor:default}.dsh-super-code-confirm button:focus-visible{outline:2px solid var(--dsw-color-primary,#3276dc);outline-offset:2px}
1205
1256
  .dsh-super-code-settings-body{border-top:.5px solid var(--dsw-alias-border-l2,#dedfe3);margin:0 16px;padding:12px 0 14px}.dsh-super-code-settings-actions{display:flex;justify-content:flex-end}
1206
1257
  .dsh-super-code-settings p{margin:8px 0;color:var(--dsw-alias-label-secondary,#70757d)}
package/cordis.patch.yml CHANGED
@@ -16,6 +16,9 @@
16
16
  plugins:
17
17
  - id: super-code
18
18
  name: dsh-super-code/super-code
19
+ config:
20
+ presetVersion: 0.3.1
21
+ presetInstallation: bundle:dsh-super-code
19
22
  - id: compaction
20
23
  name: cordis:group
21
24
  group: true
package/docs/Changelog.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # 版本记录 · Changelog
2
2
 
3
+ - **0.3.1 · 2026-10-10**:设置页始终展开,展示插件与当前预设的独立版本,提示不一致或未记录版本;声明式宿主新增安装、确认重装、改名、恢复备份及默认名称/描述语言同步。保留目录式安装、归属校验和自定义内容保护,允许新版宿主使用的 Cordis/Schemastery alpha 依赖。
4
+ **0.3.1 · 2026-10-10**: Keeps settings expanded and shows independent plugin/preset versions with mismatch or unrecorded-version notices. Adds installation, confirmed reinstallation, renaming, recovery backups and default display-language synchronization on declarative hosts. Retains directory installation, ownership checks and custom display-field protection, and accepts the Cordis/Schemastery alpha dependencies used by newer hosts.
5
+ 修复原生桌面宿主管理 API 的解析位置,以及移除确认列表条目后 Escape 误关设置页的问题。逐版验证 15 个官方 Harness 版本(`0.1.5-alpha.1`~`0.2.1-alpha.2`)及可获取的四个 macOS arm64 Desktop 发行包;[验证范围与限制](Compatibility.md)。
6
+ Fixes native Desktop management API resolution and Escape closing Settings after removing a confirmation row. Verifies 15 official Harness versions (`0.1.5-alpha.1`–`0.2.1-alpha.2`) and four available macOS arm64 Desktop releases; [verification scope and limits](Compatibility.md).
7
+
3
8
  - **0.3.0 · 2026-10-09**:合入 Batch.3,用 Harness 原生 PTC 合并工具调用、并行独立读取,补齐批量调用中的 Agent 记忆使用记录,保留分层记忆及 0.2.1 的兼容适配,更新完整 100 题成绩和使用说明。
4
9
  **0.3.0 · 2026-10-09**: Integrates Batch.3 with Harness-native PTC for composed tool calls and parallel independent reads, adds per-Agent memory activity for nested calls, retains layered memory and 0.2.1 compatibility updates, and refreshes the complete 100-task results and usage guide.
5
10
 
@@ -1,5 +1,51 @@
1
1
  # 宿主兼容性 · Host Compatibility
2
2
 
3
+ ## 0.3.1 · 2026-10-10
4
+
5
+ 支持下限保持 `0.1.5-alpha.1`。截至本次核对,官方 npm 的 `latest`/`next` 指向 `0.2.0-rc.2`,`alpha` 指向 `0.2.1-alpha.2`;官方 macOS arm64 Desktop 更新源指向 `0.2.0-rc.2`。
6
+
7
+ The minimum remains `0.1.5-alpha.1`. On this date, official npm `latest`/`next` points to `0.2.0-rc.2` and `alpha` to `0.2.1-alpha.2`; the official macOS arm64 Desktop update feed points to `0.2.0-rc.2`.
8
+
9
+ 下表 15 个官方 Harness 版本均真实安装 0.3.1 候选包,使用固定并审计的宿主依赖和隔离 profile。预设检查覆盖缺失安装、确认流程所用的改名/改标识符重装接口、冲突保护、语言同步和重启后读取/重装。主/子 Agent、任务与项目/全局记忆、跨工作区隔离、重启读取及网页执行树、缩放拖动、侧栏详情、记忆库、展开设置、版本展示和确认列表移除/取消均通过。模型由本地确定性测试提供,没有调用外部模型。
10
+
11
+ All 15 official Harness versions below installed the 0.3.1 candidate with pinned, audited host dependencies and isolated profiles. Preset checks covered missing installation, rename/identifier reinstallation, conflicts, language synchronization and restart recovery. Main/child Agents, task/project/global memory, workspace isolation and restart reads passed, along with web tree/zoom/pan, sidebar details, memory library, expanded settings, independent versions, and removable/cancellable confirmation lists. Tests used a local deterministic model without external model calls.
12
+
13
+ | Harness | 预设机制 / Presets | 0.3.1 Web/CLI 与浏览器 / Web/CLI and browser |
14
+ |---|---|---|
15
+ | `0.1.5-alpha.1` | 目录 / Directory | 通过 / Pass |
16
+ | `0.1.5-alpha.2` | 目录 / Directory | 通过 / Pass |
17
+ | `0.1.5-rc.1` | 目录 / Directory | 通过 / Pass |
18
+ | `0.1.5-rc.2` | 目录 / Directory | 通过 / Pass |
19
+ | `0.1.5-rc.3` | 目录 / Directory | 通过 / Pass |
20
+ | `0.1.6-alpha.1` | 目录 / Directory | 通过 / Pass |
21
+ | `0.1.6-alpha.2` | 目录 / Directory | 通过 / Pass |
22
+ | `0.1.7-alpha.1` | 声明式 / Declarative | 通过 / Pass |
23
+ | `0.1.7-alpha.2` | 声明式 / Declarative | 通过 / Pass |
24
+ | `0.1.7-rc.1` | 声明式 / Declarative | 通过 / Pass |
25
+ | `0.1.7-rc.2` | 声明式 / Declarative | 通过 / Pass |
26
+ | `0.2.0-rc.1` | 声明式 / Declarative | 通过 / Pass |
27
+ | `0.2.0-rc.2` | 声明式 / Declarative | 通过 / Pass |
28
+ | `0.2.1-alpha.1` | 声明式 / Declarative | 通过 / Pass |
29
+ | `0.2.1-alpha.2` | 声明式 / Declarative | 通过 / Pass |
30
+
31
+ 原生 PTC 另在最低版、稳定最新版和预发布最新版(`0.1.5-alpha.1`、`0.2.0-rc.2`、`0.2.1-alpha.2`)验证独立读取并行、写入顺序、权限拒绝与部分失败保留。0.1.7 的两个 alpha 版没有预设文档读取接口,因此归属核验要求唯一、启用的 Loader 声明;其他声明式版本核验实际活跃组合的来源标记。桌面宿主使用自己的安装位置解析管理 API,避免加载第二份宿主模块。
32
+
33
+ Native PTC additionally passed parallel independent reads, ordered writes, permission denial and partial-failure preservation on the minimum, stable latest and prerelease latest versions. The two 0.1.7 alpha hosts lack the document reader, so ownership requires a unique enabled Loader declaration; later hosts verify the marker in the active composition. Desktop management resolves APIs from the running host installation to avoid loading a separate host module.
34
+
35
+ 官方 macOS arm64 的 `0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2` 发行包均在隔离应用副本中启动,验证原生后端的预设安装、改名重装、语言和版本状态。副本保留原始 CFBundleName,仅隔离应用身份、profile 与测试端口。Safari 最新 alpha.2 与官方 Desktop rc.2 的实际界面验收另留截图。DSH NEXT 2.0.17-next(Harness rc.2)也使用隔离副本验收。
36
+
37
+ The official macOS arm64 releases of `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1` and `0.2.0-rc.2` launched in isolated app copies and passed native-backend preset installation, renamed reinstallation, language and version-state checks. Copies retain the original CFBundleName and isolate application identity, profiles and test ports. Separate screenshots record Safari alpha.2 and official Desktop rc.2 UI checks. DSH NEXT 2.0.17-next (Harness rc.2) uses an isolated copy as well.
38
+
39
+ 四版原生后端均验证重启后的归属与版本恢复。官方 Desktop rc.2 和 DSH NEXT 实际点击完成缺失安装、改名/改标识符确认重装,核对设置回填及旧内容恢复备份。官方 Desktop 的中文版本不一致提示通过截图;移除聚焦条目后 Escape 只关闭确认框、保留设置页的修复已复验。英文及未知版本状态有双语单元覆盖,但后续原生截图受桌面控制接口超时限制,未记作通过。
40
+
41
+ All four native backends restored ownership and version state after restart. Actual clicks in official Desktop rc.2 and DSH NEXT completed missing installation and confirmed rename/identifier reinstallation, with form values and recovery backups checked. The official Desktop Chinese mismatch notice was captured, and Escape after removing the focused row now closes only the confirmation while retaining Settings. Unit tests cover English and unknown-version states; subsequent native screenshots were limited by desktop-control timeouts and are not claimed as passed.
42
+
43
+ 更早版本及 `0.2.1-alpha.1/alpha.2` 的对应官方 macOS arm64 安装包未从本次核对的下载地址获取(HTTP 404),不能据此宣称这些版本的原生桌面窗口已通过。Web/CLI 验证与原生 Desktop 验证分别记录;其他平台、外部模型和完整用户升级场景仍需单独验收。下面保留历史发布记录。
44
+
45
+ Matching official macOS arm64 installers for earlier versions and `0.2.1-alpha.1/alpha.2` returned HTTP 404 at the checked download URLs; their native desktop windows are not claimed as verified. Web/CLI and native Desktop results are recorded separately. Other platforms, external models and complete user-upgrade scenarios require separate checks. Historical release records follow.
46
+
47
+ ## 历史发布验证 · Previous Release Checks
48
+
3
49
  Super Code 0.3.0 于 2026-10-09 重新验证了最低支持版 `0.1.5-alpha.1`、`0.2.0-rc.2` 和最新已适配版 `0.2.1-alpha.1`。三版均在隔离 profile 中真实安装发布候选包,通过原生 PTC 独立读取并行、写入顺序、权限拒绝、部分失败保留、主/子 Agent 记忆及重启读取;Playwright 网页回归覆盖执行树、拖动和缩放、侧栏详情、记忆库、记忆使用记录及可折叠设置。使用本地确定性模型,没有调用外部模型服务。
4
50
 
5
51
  On October 9, 2026, Super Code 0.3.0 rechecked the minimum supported host, `0.1.5-alpha.1`, plus `0.2.0-rc.2` and the latest adapted host, `0.2.1-alpha.1`. All three installed the release candidate in isolated profiles and passed native PTC parallel reads, ordered writes, permission denial, partial-failure preservation, main/child Agent memory, and restart reads. Playwright web checks covered the tree, drag and zoom, sidebar details, the memory library, memory activity, and collapsible settings. These checks used a local deterministic model with no external model calls.
@@ -51,9 +97,9 @@ The host also splits composer `stats` and removes the runtime `invariant` export
51
97
 
52
98
  ## 依赖与安装注意事项 · Dependency and Installation Notes
53
99
 
54
- 对外说明按 Harness `0.1.5-alpha.1`~`0.2.1-alpha.1` 的适配范围写;npm 依赖声明仍需分别列出预发布系列。按 npm 的版本规则,单写 `>=0.1.5-alpha.1 <0.3.0` 会排除 `0.1.6-alpha.1`、`0.2.0-rc.2` 等已支持的 alpha/rc 版本,因此不能直接合并成一个连续范围。
100
+ 对外说明按 Harness `0.1.5-alpha.1`~`0.2.1-alpha.2` 的适配范围写;npm 依赖声明仍需分别列出预发布系列。按 npm 的版本规则,单写 `>=0.1.5-alpha.1 <0.3.0` 会排除 `0.1.6-alpha.1`、`0.2.0-rc.2` 等已支持的 alpha/rc 版本,因此不能直接合并成一个连续范围。
55
101
 
56
- User-facing guidance describes adaptations for Harness `0.1.5-alpha.1`–`0.2.1-alpha.1`; npm dependency declarations still list the prerelease series individually. Under npm's version rules, a single `>=0.1.5-alpha.1 <0.3.0` range excludes supported prereleases such as `0.1.6-alpha.1` and `0.2.0-rc.2`, so those declarations cannot be collapsed into one continuous range.
102
+ User-facing guidance describes adaptations for Harness `0.1.5-alpha.1`–`0.2.1-alpha.2`; npm dependency declarations still list the prerelease series individually. Under npm's version rules, a single `>=0.1.5-alpha.1 <0.3.0` range excludes supported prereleases such as `0.1.6-alpha.1` and `0.2.0-rc.2`, so those declarations cannot be collapsed into one continuous range.
57
103
 
58
104
  预发布依赖的 caret 范围可能解析到其他 alpha/rc 版本。此前默认安装 `0.1.6-alpha.1` 时混入 alpha.2,导致宿主在插件加载前报 `watchUserPatches` 导出缺失;`0.1.7-alpha.1` 也曾解析到 rc.1。验证环境通过精确 overrides 解决混版,但这并未修复上游发布的依赖声明,也不证明未锁定的默认安装总能成功。遇到类似错误时,应先核对实际安装的宿主组件版本。
59
105
 
@@ -32,13 +32,13 @@ First confirm the plugin is enabled and check the host version and installed dep
32
32
 
33
33
  ### Harness 0.1.7 / 0.2.0 / 0.2.1:声明式预设 · Declarative Presets
34
34
 
35
- 在已验证的 0.1.7、0.2.0 和 0.2.1 版本上,Super Code 由插件 bundle 声明,宿主负责发现和加载;插件不会创建用户预设目录。设置页显示宿主报告的预设状态,不提供安装、重命名或重装目录副本的流程。若状态为缺失或损坏,检查插件是否启用、宿主组件是否混版,以及日志中的预设依赖错误,而不是反复点击安装。
35
+ Super Code 由插件 bundle 声明,宿主负责加载。从 0.3.1 起,未安装时可以在“设置”→ **Super Code** 安装预设;已安装时提供“重新安装预设”,确认后按所填名称和标识符替换。声明保存在当前 profile 的补丁层,通过宿主公开接口加载,不需要用户预设目录。宿主未开放管理接口时,页面会明确提示。
36
36
 
37
- On the verified 0.1.7, 0.2.0, and 0.2.1 versions, the plugin bundle declares Super Code and the host discovers and loads it; the plugin does not create a user preset directory. Settings show the host's preset status rather than a workflow for installing, renaming, or reinstalling directory copies. If the preset is missing or broken, check plugin activation, mixed host versions, and preset dependency errors in the logs instead of retrying directory installation.
37
+ The plugin bundle declares Super Code and the host loads it. From 0.3.1, use “Settings” → **Super Code** to install a missing preset or confirm reinstallation of an installed preset with the entered name and identifier. Declarations persist in the current profile's patch layer and load through public host APIs; no user preset directory is needed. Hosts without management APIs show an explicit notice.
38
38
 
39
- 声明默认名称为 `Super Code`,描述为 `A faster, more efficient, smarter coding mode.`;插件不在此路径同步预设名称/描述的语言或改写用户 profile。定制应通过宿主支持的配置机制进行,本轮兼容冒烟不覆盖全部定制场景。插件界面本身仍支持中英文。
39
+ 声明式预设的默认名称和描述从 0.3.1 起跟随中英文设置,已自定义的字段保留。语言变化只调整展示字段,不更新旧预设的内容或版本;确认重装才使用当前插件随包的组合。
40
40
 
41
- The declaration defaults to the name `Super Code` and description `A faster, more efficient, smarter coding mode.` On this path, the plugin does not synchronize the preset name/description language or rewrite the user profile. Use the host's supported configuration mechanisms for customization; the smoke checks do not cover every customization scenario. The plugin interface itself still supports Chinese and English.
41
+ From 0.3.1, default declarative preset names and descriptions follow Chinese/English settings while custom fields remain intact. Language changes update display fields only, retaining the older preset's content and version. Confirmed reinstallation uses the composition shipped with the current plugin.
42
42
 
43
43
  插件管理中的展示信息独立于预设声明:0.2.1 通过导出的语言资源提供 `Super Code 模式` / `Super Code` 和对应描述,支持新版宿主读取根路径及子路径的展示信息。
44
44
 
@@ -46,15 +46,25 @@ Plugin management metadata is separate from the preset declaration. Version 0.2.
46
46
 
47
47
  ### Harness 0.1.5/0.1.6:目录预设 · Directory Presets
48
48
 
49
- 如果 Harness 没发现插件自带的 `super-code`,插件首次加载时会尝试安装一份用户预设。仍然没看到时,打开“设置”→ **Super Code**,展开卡片查看状态并手动安装。默认标识符 `super-code` 若已被占用,换一个即可;原有预设不会被覆盖。之后若主动删除这份用户副本,重启也不会自动重装,需要再次手动安装。0.2.0 以前的插件设置入口在“插件”→“插件配置”中。
49
+ 如果 Harness 没发现插件自带的 `super-code`,插件首次加载时会尝试安装一份用户预设。仍然没看到时,打开“设置”→ **Super Code**,查看状态并手动安装;0.3.1 起此页始终展开。默认标识符 `super-code` 若已被占用,换一个即可;原有预设不会被覆盖。之后若主动删除这份用户副本,重启也不会自动重装,需要再次手动安装。0.2.0 以前的插件设置入口在“插件”→“插件配置”中。
50
50
 
51
- If Harness doesn't find the bundled `super-code` preset, the plugin tries to install a user copy on first load. If it still isn't listed, open “Settings” → **Super Code** and expand the card to check its status or install it manually. If the default identifier `super-code` is taken, choose another; the existing preset won't be overwritten. If you later delete this copy, a restart won't reinstall it automatically. Plugin versions before 0.2.0 place this page under “Plugins” → “Plugin configuration”.
51
+ If Harness doesn't find the bundled `super-code` preset, the plugin tries to install a user copy on first load. If it still isn't listed, open “Settings” → **Super Code** to check its status or install it manually; this page stays expanded from 0.3.1 onward. If the default identifier `super-code` is taken, choose another; the existing preset won't be overwritten. If you later delete this copy, a restart won't reinstall it automatically. Plugin versions before 0.2.0 place this page under “Plugins” → “Plugin configuration”.
52
+
53
+ ## 查看预设版本 · Checking the Preset Version
54
+
55
+ 0.3.1 起,“设置”→ **Super Code** 分别显示已加载的插件版本和当前预设版本。预设版本来自实际加载的预设组合;两者一致时表示预设与当前安装的插件同步,不代表 npm 上没有更新版本。旧预设没有版本记录时,会显示“未记录版本”,不会自动视为最新版。修改名称或切换语言不改变预设版本。
56
+
57
+ From 0.3.1 onward, “Settings” → **Super Code** shows the loaded plugin version and the current preset version separately. The preset version comes from its actual composition. Matching versions mean the preset is in sync with the installed plugin, not that no newer npm release exists. Older presets without version metadata show “Version not recorded”. Renaming a preset or changing the language does not change its version.
58
+
59
+ 若版本不一致,先保留需要的自定义内容,再通过确认清单重装。目录式宿主替换用户副本,声明式宿主替换本插件拥有的声明,均保留恢复备份。重装后刷新仍不一致时,检查插件更新是否生效及宿主日志。
60
+
61
+ If versions differ, save the custom content you need, then confirm reinstallation. Directory hosts replace the user copy; declarative hosts replace this plugin's owned declaration. Both retain recovery backups. If refreshed versions still differ, check that the plugin update took effect and inspect host logs.
52
62
 
53
63
  ## 名称与语言 · Names and Language
54
64
 
55
- 本节的名称同步和自定义安装名称适用于旧宿主的目录预设,不适用于 0.1.7 / 0.2.0 / 0.2.1 的声明式预设。
65
+ 0.3.1 的名称同步和自定义安装名称同时支持目录式与声明式预设。
56
66
 
57
- The name synchronization and custom installation names in this section apply to directory presets on older hosts, not declarative presets on 0.1.7 / 0.2.0 / 0.2.1.
67
+ Version 0.3.1 supports display-language synchronization and custom installation names for directory and declarative presets.
58
68
 
59
69
  标识符和显示名称是两回事:标识符用于选择预设,显示名称可以单独修改。默认名称会跟随 Harness 的中英文语言设置;自定义名称可以包含中文和空格,例如 `Super Code 模式`,最多 120 个字符。插件只更新仍保持默认值的名称和描述,不会改动你的自定义内容。
60
70
 
@@ -66,9 +76,9 @@ Older Harness versions cache the preset list, so the page refreshes once if the
66
76
 
67
77
  ## 重装与备份 · Reinstallation and Backup
68
78
 
69
- 仅适用于插件在旧宿主上管理的用户目录副本;0.1.7 / 0.2.0 / 0.2.1 声明式预设没有此重装/备份流程。
79
+ 目录副本与声明式预设均支持此流程;插件只替换能够核实归属的预设。
70
80
 
71
- This applies only to user-directory copies managed by the plugin on older hosts. Declarative presets on 0.1.7 / 0.2.0 / 0.2.1 do not use this reinstallation/backup workflow.
81
+ This workflow supports directory copies and declarative presets. The plugin replaces only presets whose ownership can be verified.
72
82
 
73
83
  已安装用户预设时,可以点“重新安装预设”。确认框会列出将被替换的预设及新名称、标识符,先核对再确认。可以从列表中移除条目,但全部移除后不能确认;取消或按 Escape 不会改动预设。重装会重置旧副本的内容,所以自定义内容请先自行留存。
74
84
 
@@ -78,6 +88,10 @@ If a user preset is already installed, you can choose “Reinstall preset”. Th
78
88
 
79
89
  To avoid removing the wrong files, the plugin replaces only copies whose installation record, UUID, path, and directory identity all match. It never automatically deletes unmarked legacy copies. The previous directory stays under `.super-code-backup-*/<old-id>` in the user preset root and won't appear in the preset list. An installation failure restores the old directory; after an unexpected interruption, you can recover it manually from the backup.
80
90
 
91
+ 声明式宿主通过 bundle 来源标记,或匹配的安装记录、声明标识符和 UUID 核实归属;同名的无标记声明不会自动认领。旧声明及原 profile 补丁保存在当前 profile 的 `.super-code-backup-*` 中,安装记录位于 `.super-code-presets.json`。失败时尝试恢复原补丁和记录;若进程中断,可从备份恢复。已有会话继续使用宿主保留的旧预设组合,新会话使用重装后的版本。
92
+
93
+ Declarative hosts verify a bundle source marker or matching installation record, entry identity and UUID. Unmarked same-name declarations are not adopted automatically. The previous declaration and profile patch stay in `.super-code-backup-*` under the current profile; `.super-code-presets.json` stores ownership records. Failures attempt to restore the original patch and record; backups allow recovery after interruption. Existing sessions retain their old composition through the host; new sessions use the reinstalled version.
94
+
81
95
  ## Agent 执行树 · Agent Execution Tree
82
96
 
83
97
  右侧执行树显示当前会话中各 Agent 的状态、用量和缓存率。拖动空白处平移,滚轮或按钮缩放;点一个节点,就能在侧栏新标签查看详情,主对话不会切换。界面跟随 Harness 的中英文语言设置。
@@ -0,0 +1,75 @@
1
+ import yaml from 'js-yaml';
2
+ import { type DisplayBaseline } from './preset-metadata.js';
3
+ import type { DeclaredPresetRegistry, PresetInstallationResult, PresetInstallationStatus } from './preset-installation.js';
4
+ export declare const declarationSchema: yaml.Schema;
5
+ export interface DeclarationConfig {
6
+ id: string;
7
+ name?: string;
8
+ description?: string;
9
+ order?: number;
10
+ plugins: Array<{
11
+ name?: string;
12
+ config?: Record<string, unknown>;
13
+ [key: string]: unknown;
14
+ }>;
15
+ }
16
+ export interface DeclarationEntry {
17
+ id: string;
18
+ disabled?: boolean;
19
+ options: {
20
+ name: string;
21
+ config?: DeclarationConfig;
22
+ };
23
+ }
24
+ export interface DeclarationHost {
25
+ patchPath: string;
26
+ entries(): readonly DeclarationEntry[];
27
+ reload(): Promise<void>;
28
+ exclusive<T>(run: () => Promise<T>): Promise<T>;
29
+ }
30
+ export interface DeclarationSettings {
31
+ declaration?: {
32
+ entryId: string;
33
+ id: string;
34
+ token: string;
35
+ };
36
+ declarationDisplay?: DisplayBaseline;
37
+ }
38
+ export interface DeclarationState {
39
+ get(): DeclarationSettings;
40
+ update(patch: Partial<DeclarationSettings>): Promise<void>;
41
+ }
42
+ /** Newer settings providers edit Loader forms; installation records stay local. */
43
+ export declare class DeclarationStateFile implements DeclarationState {
44
+ private readonly path;
45
+ private value;
46
+ private constructor();
47
+ static open(path: string): Promise<DeclarationStateFile>;
48
+ get(): DeclarationSettings;
49
+ update(patch: Partial<DeclarationSettings>): Promise<void>;
50
+ }
51
+ /** Only marked bundle rows or UUID-matched manual installations may be replaced. */
52
+ export declare class DeclaredPresetInstaller {
53
+ private readonly registry;
54
+ private readonly settings;
55
+ private readonly host;
56
+ private readonly bundlePath;
57
+ private tail;
58
+ constructor(registry: DeclaredPresetRegistry, settings: DeclarationState, host: DeclarationHost, bundlePath: string);
59
+ private entry;
60
+ private document;
61
+ status(): Promise<PresetInstallationStatus>;
62
+ install(id: unknown, name?: string): Promise<PresetInstallationResult>;
63
+ reinstall(previousId: string, id: unknown, name?: string): Promise<PresetInstallationResult>;
64
+ private reject;
65
+ private replace;
66
+ synchronize(language: string): Promise<{
67
+ changed: boolean;
68
+ }>;
69
+ /** Back up first, refuse a stale file, and restore only our own failed write. */
70
+ private save;
71
+ private readPatch;
72
+ private atomicWrite;
73
+ private enqueue;
74
+ }
75
+ //# sourceMappingURL=preset-declaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset-declaration.d.ts","sourceRoot":"","sources":["../../src/dsh/preset-declaration.ts"],"names":[],"mappings":"AAIA,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAExE,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAO1H,eAAO,MAAM,iBAAiB,EAAE,IAAI,CAAC,MAKlC,CAAA;AAEH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAA;CAC5F;AACD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,iBAAiB,CAAA;KAAE,CAAA;CACtD;AACD,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,IAAI,SAAS,gBAAgB,EAAE,CAAA;IACtC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACvB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CAChD;AACD,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5D,kBAAkB,CAAC,EAAE,eAAe,CAAA;CACrC;AACD,MAAM,WAAW,gBAAgB;IAC/B,GAAG,IAAI,mBAAmB,CAAA;IAC1B,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3D;AAED,mFAAmF;AACnF,qBAAa,oBAAqB,YAAW,gBAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAU,OAAO,CAAC,KAAK;IAAhE,OAAO;WACM,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAkB9D,GAAG,IAAI,mBAAmB;IACpB,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAcjE;AAUD,oFAAoF;AACpF,qBAAa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAL7B,OAAO,CAAC,IAAI,CAAsC;gBAE/B,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,MAAM;IAGrC,OAAO,CAAC,KAAK;YAUC,QAAQ;IAoBhB,MAAM,IAAI,OAAO,CAAC,wBAAwB,CAAC;IAa3C,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAOtE,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;YAOpF,MAAM;YAIN,OAAO;IAgCf,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IA0BlE,iFAAiF;YACnE,IAAI;YAuCJ,SAAS;YAKT,WAAW;IASzB,OAAO,CAAC,OAAO;CAKhB"}