@dsh-workbench/shared 1.1.3 → 1.1.5
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/dist/api/host-write.d.ts +4 -1
- package/dist/api/workbench-client.d.ts +2 -0
- package/dist/components/ApprovalPlan.css +7 -8
- package/dist/config/constants.d.ts +4 -0
- package/dist/config/constants.js +4 -0
- package/dist/contract/approval.d.ts +4 -0
- package/dist/contract/approval.js +4 -0
- package/dist/contract/command.d.ts +33 -0
- package/dist/contract/command.js +1 -1
- package/dist/contract/needs.d.ts +17 -0
- package/dist/contract/needs.js +41 -1
- package/dist/contract/protocol/bundle-install.d.ts +4 -0
- package/dist/contract/protocol/market-index.d.ts +14 -0
- package/dist/contract/protocol/market-index.js +1 -0
- package/dist/contract/unit.d.ts +10 -0
- package/dist/host/adapter-types.d.ts +2 -0
- package/dist/host/data-error.d.ts +2 -0
- package/dist/host/data-error.js +3 -0
- package/dist/host/http.js +1 -0
- package/dist/host/install-failure.d.ts +49 -0
- package/dist/host/install-failure.js +167 -0
- package/dist/host/installed-sources.d.ts +10 -0
- package/dist/host/installed-sources.js +64 -0
- package/dist/host/lib-install.d.ts +12 -1
- package/dist/host/lib-install.js +33 -1
- package/dist/host/paths.d.ts +7 -0
- package/dist/host/paths.js +17 -0
- package/dist/host/runtime-links.d.ts +7 -0
- package/dist/host/runtime-links.js +25 -0
- package/dist/host/tool-approval.d.ts +4 -2
- package/dist/host/tool-approval.js +4 -2
- package/dist/host.d.ts +3 -0
- package/dist/host.js +3 -0
- package/dist/i18n/en.js +46 -1
- package/dist/i18n/index.d.ts +47 -2
- package/dist/i18n/zh.d.ts +46 -1
- package/dist/i18n/zh.js +46 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/api/host-write.ts +5 -1
- package/src/api/workbench-client.ts +2 -0
- package/src/components/ApprovalPlan.css +7 -8
- package/src/config/constants.ts +6 -0
- package/src/contract/__tests__/needs.test.ts +53 -0
- package/src/contract/approval.ts +4 -0
- package/src/contract/command.ts +22 -0
- package/src/contract/needs.ts +56 -1
- package/src/contract/protocol/bundle-install.ts +5 -0
- package/src/contract/protocol/market-index.ts +17 -0
- package/src/contract/unit.ts +11 -0
- package/src/host/adapter-types.ts +2 -0
- package/src/host/data-error.ts +3 -1
- package/src/host/http.ts +1 -0
- package/src/host/install-failure.test.ts +121 -0
- package/src/host/install-failure.ts +198 -0
- package/src/host/installed-sources.test.ts +80 -0
- package/src/host/installed-sources.ts +73 -0
- package/src/host/lib-install.ts +38 -2
- package/src/host/paths.test.ts +26 -0
- package/src/host/paths.ts +18 -0
- package/src/host/runtime-links.test.ts +31 -0
- package/src/host/runtime-links.ts +23 -0
- package/src/host/tool-approval.ts +11 -4
- package/src/host.ts +3 -0
- package/src/i18n/en.ts +47 -1
- package/src/i18n/zh.ts +47 -1
- package/src/index.ts +1 -0
package/src/host.ts
CHANGED
|
@@ -42,6 +42,8 @@ export * from './host/data-root.js';
|
|
|
42
42
|
export * from './host/shell-text.js';
|
|
43
43
|
export * from './host/shell.js';
|
|
44
44
|
export * from './host/data-error.js';
|
|
45
|
+
export * from './host/install-failure.js';
|
|
46
|
+
export * from './host/runtime-links.js';
|
|
45
47
|
export * from './host/provision.js';
|
|
46
48
|
export * from './host/channel-plugin.js';
|
|
47
49
|
export * from './host/recipe.js';
|
|
@@ -75,3 +77,4 @@ export * from './host/version-range.js';
|
|
|
75
77
|
export * from './host/market-index.js';
|
|
76
78
|
export * from './host/market-index-claim.js';
|
|
77
79
|
export * from './host/changelog.js';
|
|
80
|
+
export * from './host/installed-sources.js';
|
package/src/i18n/en.ts
CHANGED
|
@@ -154,7 +154,43 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
154
154
|
'I understand: using it again means reinstalling it.',
|
|
155
155
|
'panels.market.confirmYes': 'Uninstall',
|
|
156
156
|
'panels.market.confirmNo': 'Cancel',
|
|
157
|
+
'panels.market.noMarketSource': 'The index has no newer version of this module (refresh the index and retry)',
|
|
157
158
|
'panels.market.failed': 'Failed: {reason}',
|
|
159
|
+
'panels.market.askAgent': 'Ask the agent',
|
|
160
|
+
'panels.market.askAgentCopied': 'Copied',
|
|
161
|
+
'panels.market.askAgentText':
|
|
162
|
+
'This workbench module cannot be used: "{name}" (unit {unit}) — {reason}. Work out what is missing and how to add it, then confirm it works.',
|
|
163
|
+
'panels.market.failure.permission': "Didn't install: no write access",
|
|
164
|
+
'panels.market.failure.diskFull': "Didn't install: the disk is full",
|
|
165
|
+
'panels.market.failure.sandbox': "Didn't install: the system blocked it",
|
|
166
|
+
'panels.market.failure.unknown': "Didn't install: cause not recognised",
|
|
167
|
+
'panels.market.failure.factOwner': '{path} belongs to {owner}, and this account ({me}) cannot write to it. Hand it back to yourself (asks for your login password).',
|
|
168
|
+
'panels.market.failure.factMode': '{path} is mode {mode}, so this account cannot write to it.',
|
|
169
|
+
'panels.market.failure.factSpace': 'The disk holding {path} is full.',
|
|
170
|
+
'panels.market.failure.factStuck': 'This command ran in a restricted environment and cannot write to {path}.',
|
|
171
|
+
'panels.market.failure.nowhere': '(the directory was not identified)',
|
|
172
|
+
'panels.market.failure.copyFix': 'Copy the fix command',
|
|
173
|
+
'panels.market.failure.copied': 'Copied',
|
|
174
|
+
'panels.market.failure.copiedHint': 'Paste it in a terminal, run it, then click Check again.',
|
|
175
|
+
'panels.market.failure.askAgent': 'Copy for the agent',
|
|
176
|
+
'panels.market.failure.askAgentText': 'Installing this module could not write: `{command}` exited {code} at {path}. Work out whether the sandbox or file permissions blocked it, then install again somewhere writable.',
|
|
177
|
+
'panels.market.failure.askAgentHint': 'Paste it into the chat and let the agent carry on.',
|
|
178
|
+
'panels.market.failure.recheck': 'Check again',
|
|
179
|
+
'panels.market.failure.showOutput': 'Show install output',
|
|
180
|
+
'panels.market.failure.hideOutput': 'Hide install output',
|
|
181
|
+
'panels.market.failure.term.commandLine': 'command on line {line}',
|
|
182
|
+
'panels.market.failure.term.signal': 'killed by {signal}',
|
|
183
|
+
'panels.market.failure.term.exitCode': 'exit code {exitCode}',
|
|
184
|
+
'panels.market.failure.term.noExitCode': 'no exit code',
|
|
185
|
+
'panels.market.failure.term.running': 'running',
|
|
186
|
+
'panels.market.failure.term.failed': 'failed',
|
|
187
|
+
'panels.market.failure.term.done': 'done',
|
|
188
|
+
'panels.market.failure.term.copy': 'Copy',
|
|
189
|
+
'panels.market.failure.term.copied': 'Copied',
|
|
190
|
+
'panels.market.failure.term.noOutput': 'No output',
|
|
191
|
+
'panels.market.failure.term.collapse': 'Collapse',
|
|
192
|
+
'panels.market.failure.term.expandAria': 'Show the remaining {hidden} lines',
|
|
193
|
+
'panels.market.failure.term.expand': 'Show {hidden} lines',
|
|
158
194
|
'panels.market.needEnv': 'Set {env} in the terminal that started the workbench first',
|
|
159
195
|
'panels.market.needCommands': 'Missing commands: {commands}',
|
|
160
196
|
'panels.market.needBinary': 'Install the {command} command first',
|
|
@@ -190,9 +226,13 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
190
226
|
'panels.market.pluginBroken': 'This plugin install is broken: it cannot be identified. Uninstall it first, then ask the agent to reinstall it by package name.',
|
|
191
227
|
'panels.market.restartNeeded': 'The new version is installed — restart once to pick it up.',
|
|
192
228
|
'panels.market.foot': 'After installing, enable it in the panel page of that project.',
|
|
193
|
-
'panels.market.recheck': 'Check for updates',
|
|
194
229
|
'panels.market.checkUpdates': 'Check for updates',
|
|
230
|
+
'panels.market.checkingNow': 'Checking…',
|
|
231
|
+
'panels.market.checkFailed': 'The last check failed. Check your connection and retry.',
|
|
195
232
|
'panels.market.checkedAt': 'Last checked: {time}',
|
|
233
|
+
'panels.market.latestPartial': 'Could not check {n} modules',
|
|
234
|
+
'panels.market.latestNoRegistry': 'No source configured — the latest version was not checked',
|
|
235
|
+
'panels.market.latestProbeFailed': 'Could not reach the source — try again later',
|
|
196
236
|
'panels.market.justNow': 'just now',
|
|
197
237
|
'panels.market.minutesAgo': '{n} min ago',
|
|
198
238
|
'panels.market.hoursAgo': '{n} h ago',
|
|
@@ -372,6 +412,9 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
372
412
|
'panels.discover.transportTest': 'Test this address',
|
|
373
413
|
'panels.discover.transportPlaceholder': 'Or paste another address (mirror, alias)',
|
|
374
414
|
'panels.discover.transportNeedsAuth': 'This repository needs credentials: clone it once in a terminal, or set up an SSH key / credential helper, then install again.',
|
|
415
|
+
'panels.discover.transportChange': 'Change address',
|
|
416
|
+
'panels.discover.transportChangeHide': 'Hide',
|
|
417
|
+
'panels.discover.transportNone': 'No readable address',
|
|
375
418
|
'panels.discover.expand': 'Show versions',
|
|
376
419
|
'panels.discover.collapse': 'Hide versions',
|
|
377
420
|
'panels.discover.versionCount': '{n} versions',
|
|
@@ -665,6 +708,9 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
665
708
|
'approval.longTask.what': 'Task to stop',
|
|
666
709
|
'approval.longTask.signal':
|
|
667
710
|
'stopping only sends an interrupt signal \u2014 wrapping up the run is up to the module',
|
|
711
|
+
'approval.plugin.name': 'Plugin',
|
|
712
|
+
'approval.plugin.command': 'Command',
|
|
713
|
+
'approval.plugin.note': 'Agent says',
|
|
668
714
|
'approval.publish.module': 'Module',
|
|
669
715
|
'approval.publish.target': 'Target',
|
|
670
716
|
'approval.publish.version': 'Version',
|
package/src/i18n/zh.ts
CHANGED
|
@@ -151,7 +151,43 @@ export const zh = {
|
|
|
151
151
|
'panels.market.confirmUninstallAck': '我明白:卸载后想再用,得重新装一遍。',
|
|
152
152
|
'panels.market.confirmYes': '卸载',
|
|
153
153
|
'panels.market.confirmNo': '取消',
|
|
154
|
+
'panels.market.noMarketSource': '索引里没有这个模块的新版本(刷新一次索引再试)',
|
|
154
155
|
'panels.market.failed': '没成功:{reason}',
|
|
156
|
+
'panels.market.askAgent': '问 agent',
|
|
157
|
+
'panels.market.askAgentCopied': '已复制',
|
|
158
|
+
'panels.market.askAgentText':
|
|
159
|
+
'工作台里「{name}」(单元 {unit})用不了:{reason}。帮我查清缺什么、怎么补,补完确认真能用。',
|
|
160
|
+
'panels.market.failure.permission': '没装上:没有写入权限',
|
|
161
|
+
'panels.market.failure.diskFull': '没装上:磁盘满了',
|
|
162
|
+
'panels.market.failure.sandbox': '没装上:被系统拦住了',
|
|
163
|
+
'panels.market.failure.unknown': '没装上:原因没认出来',
|
|
164
|
+
'panels.market.failure.factOwner': '{path} 属于 {owner},当前账号({me})写不进去。把它还给自己就行(会要开机密码)。',
|
|
165
|
+
'panels.market.failure.factMode': '{path} 的权限是 {mode},当前账号没有写权限。',
|
|
166
|
+
'panels.market.failure.factSpace': '{path} 所在的磁盘满了。',
|
|
167
|
+
'panels.market.failure.factStuck': '这条命令跑在受限环境里,写不进 {path}。',
|
|
168
|
+
'panels.market.failure.nowhere': '(没认出是哪个目录)',
|
|
169
|
+
'panels.market.failure.copyFix': '复制修复命令',
|
|
170
|
+
'panels.market.failure.copied': '已复制',
|
|
171
|
+
'panels.market.failure.copiedHint': '粘到终端跑一次,回来点「再检测」。',
|
|
172
|
+
'panels.market.failure.askAgent': '复制给 agent',
|
|
173
|
+
'panels.market.failure.askAgentText': '装这个模块时写不进去:`{command}` 退出码 {code},卡在 {path}。帮我看看是被沙箱拦的还是权限问题,换一条能写进去的路再装。',
|
|
174
|
+
'panels.market.failure.askAgentHint': '粘到对话里,让 agent 接着弄。',
|
|
175
|
+
'panels.market.failure.recheck': '再检测',
|
|
176
|
+
'panels.market.failure.showOutput': '查看安装输出',
|
|
177
|
+
'panels.market.failure.hideOutput': '收起安装输出',
|
|
178
|
+
'panels.market.failure.term.commandLine': '第 {line} 行的命令',
|
|
179
|
+
'panels.market.failure.term.signal': '被 {signal} 终止',
|
|
180
|
+
'panels.market.failure.term.exitCode': '退出码 {exitCode}',
|
|
181
|
+
'panels.market.failure.term.noExitCode': '没有退出码',
|
|
182
|
+
'panels.market.failure.term.running': '在跑',
|
|
183
|
+
'panels.market.failure.term.failed': '没跑通',
|
|
184
|
+
'panels.market.failure.term.done': '跑完了',
|
|
185
|
+
'panels.market.failure.term.copy': '复制',
|
|
186
|
+
'panels.market.failure.term.copied': '已复制',
|
|
187
|
+
'panels.market.failure.term.noOutput': '没有输出',
|
|
188
|
+
'panels.market.failure.term.collapse': '收起',
|
|
189
|
+
'panels.market.failure.term.expandAria': '展开剩下的 {hidden} 行',
|
|
190
|
+
'panels.market.failure.term.expand': '展开 {hidden} 行',
|
|
155
191
|
'panels.market.needEnv': '先在启动工作台的终端里设 {env}',
|
|
156
192
|
'panels.market.needCommands': '缺这几条命令:{commands}',
|
|
157
193
|
'panels.market.needBinary': '先装 {command} 命令',
|
|
@@ -187,9 +223,13 @@ export const zh = {
|
|
|
187
223
|
'panels.market.pluginBroken': '这份插件装坏了:认不出它是什么。可以先卸载,再让 agent 按包名重装一次。',
|
|
188
224
|
'panels.market.restartNeeded': '新版装好了,重启一次才生效。',
|
|
189
225
|
'panels.market.foot': '装好后到那个项目的面板页勾选它,模块才会出现。',
|
|
190
|
-
'panels.market.recheck': '重新检查更新',
|
|
191
226
|
'panels.market.checkUpdates': '检查更新',
|
|
227
|
+
'panels.market.checkingNow': '正在检查…',
|
|
228
|
+
'panels.market.checkFailed': '最近一次没查到,检查网络后重试',
|
|
192
229
|
'panels.market.checkedAt': '最近检查:{time}',
|
|
230
|
+
'panels.market.latestPartial': '{n} 个模块没查成',
|
|
231
|
+
'panels.market.latestNoRegistry': '没配来源,未检查新版',
|
|
232
|
+
'panels.market.latestProbeFailed': '问不到源,稍后重试',
|
|
193
233
|
'panels.market.justNow': '刚刚',
|
|
194
234
|
'panels.market.minutesAgo': '{n} 分钟前',
|
|
195
235
|
'panels.market.hoursAgo': '{n} 小时前',
|
|
@@ -369,6 +409,9 @@ export const zh = {
|
|
|
369
409
|
'panels.discover.transportTest': '试这个地址',
|
|
370
410
|
'panels.discover.transportPlaceholder': '或贴一个别的地址(公司镜像、别名)',
|
|
371
411
|
'panels.discover.transportNeedsAuth': '这个仓库要凭证:先在终端里把它 clone 一次,或配好 SSH key / 凭据助手;配好后再点安装。',
|
|
412
|
+
'panels.discover.transportChange': '换一个地址',
|
|
413
|
+
'panels.discover.transportChangeHide': '收起',
|
|
414
|
+
'panels.discover.transportNone': '没有可读的地址',
|
|
372
415
|
'panels.discover.expand': '展开版本',
|
|
373
416
|
'panels.discover.collapse': '收起版本',
|
|
374
417
|
'panels.discover.versionCount': '{n} 个版本',
|
|
@@ -660,6 +703,9 @@ export const zh = {
|
|
|
660
703
|
'approval.record.noSwitch': '录完不会替你切回来(左栏底部会亮一条状态)',
|
|
661
704
|
'approval.longTask.what': '要停的那次任务',
|
|
662
705
|
'approval.longTask.signal': '停了只是让工作台发出中断信号 —— 这次任务怎么收尾由模块自己负责',
|
|
706
|
+
'approval.plugin.name': '插件',
|
|
707
|
+
'approval.plugin.command': '命令',
|
|
708
|
+
'approval.plugin.note': 'agent 说',
|
|
663
709
|
'approval.publish.module': '模块',
|
|
664
710
|
'approval.publish.target': '目标',
|
|
665
711
|
'approval.publish.version': '版本',
|
package/src/index.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from './components/board-module.js';
|
|
|
35
35
|
export * from './components/icons.js';
|
|
36
36
|
export * from './config/constants.js';
|
|
37
37
|
export * from './config/storage.js';
|
|
38
|
+
export * from './contract/approval.js';
|
|
38
39
|
export * from './contract/blocker.js';
|
|
39
40
|
export * from './contract/data.js';
|
|
40
41
|
export * from './contract/extension.js';
|