@dsh-plus/secret-env 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +1 -9
- package/package.json +14 -13
- package/src/client/command.ts +10 -12
package/lib/client.js
CHANGED
|
@@ -22,20 +22,12 @@ window.__ModuleLoader__.load({
|
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/client/command.ts
|
|
25
|
-
/**
|
|
26
|
-
* `/var` 斜杠命令(dsh-client-ui-commands 的 commandUi 服务):
|
|
27
|
-
* contribution 仅支持官方 popupSelect 壳(kind 唯一),故命令提供单个
|
|
28
|
-
* 「打开面板」动作,选中后经打开总线唤起本会话的变量面板——
|
|
29
|
-
* 完全自定义的 React 面板只能在自己占有的 overlay 槽渲染。
|
|
30
|
-
* 子代理会话不提供本命令(对齐官方 /model 的可用性过滤)。
|
|
31
|
-
* @module secret-env/client/command
|
|
32
|
-
*/
|
|
33
25
|
/** 注册 /var 命令(commandUi 服务缺席时 inject 回调不触发,自然跳过)。 */
|
|
34
26
|
function registerVarCommand(ctx, sessions, t) {
|
|
35
27
|
ctx.inject(["commandUi"], (scope) => {
|
|
36
28
|
scope.effect(() => scope.commandUi.register({
|
|
37
29
|
name: "var",
|
|
38
|
-
description: t("command.description"),
|
|
30
|
+
description: () => t("command.description"),
|
|
39
31
|
available: (session) => sessions.subagentAddress?.(session.sessionId) === void 0,
|
|
40
32
|
ui: {
|
|
41
33
|
kind: "popupSelect",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plus/secret-env",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "dsh-plus service+ui plugin: 密钥环境变量——以 $DSH_VAR_* 变量名向 agent 暴露密钥(全局持久/会话级/一次性),执行期经 dsh-shell-env 原生注入,值不进消息流,不影响缓存率",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,25 +19,26 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dsh-plus/shared": "0.1.
|
|
22
|
+
"@dsh-plus/shared": "0.1.14"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
26
|
-
"@deepseek-ai/dsh-credentials": "^0.1.5-
|
|
27
|
-
"@deepseek-ai/dsh-host-webserver": "^0.1.5-
|
|
28
|
-
"@deepseek-ai/dsh-settings": "^0.1.5-
|
|
29
|
-
"@deepseek-ai/dsh-shell-env": "^0.1.5-
|
|
26
|
+
"@deepseek-ai/dsh-credentials": "^0.1.5-rc.1",
|
|
27
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.5-rc.1",
|
|
28
|
+
"@deepseek-ai/dsh-settings": "^0.1.5-rc.1",
|
|
29
|
+
"@deepseek-ai/dsh-shell-env": "^0.1.5-rc.1",
|
|
30
30
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "4.0.2",
|
|
34
|
-
"@deepseek-ai/dsh-client-ui-
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
34
|
+
"@deepseek-ai/dsh-client-ui-commands": "0.1.5-rc.1",
|
|
35
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.5-rc.1",
|
|
36
|
+
"@deepseek-ai/dsh-credentials": "0.1.5-rc.1",
|
|
37
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.5-rc.1",
|
|
38
|
+
"@deepseek-ai/dsh-session": "0.1.5-rc.1",
|
|
39
|
+
"@deepseek-ai/dsh-settings": "0.1.5-rc.1",
|
|
40
|
+
"@deepseek-ai/dsh-shell-env": "0.1.5-rc.1",
|
|
41
|
+
"@deepseek-ai/dsh-tools": "0.1.5-rc.1",
|
|
41
42
|
"@deepseek-ai/schemastery": "3.18.2",
|
|
42
43
|
"@types/node": "26.4.0",
|
|
43
44
|
"@types/react": "~18.3.31",
|
package/src/client/command.ts
CHANGED
|
@@ -6,20 +6,18 @@
|
|
|
6
6
|
* 子代理会话不提供本命令(对齐官方 /model 的可用性过滤)。
|
|
7
7
|
* @module secret-env/client/command
|
|
8
8
|
*/
|
|
9
|
+
import type { CommandContribution } from '@deepseek-ai/dsh-client-ui-commands/client'
|
|
10
|
+
|
|
9
11
|
import { requestOpenSessionPanel } from './panel-bus.ts'
|
|
10
12
|
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* commandUi 服务的结构子集。contribution 形状直接取自官方契约——
|
|
15
|
+
* 平台在 alpha 线把 `description` 从字符串改成惰性求值函数,本地结构类型
|
|
16
|
+
* 若不跟官方契约同源,传字符串会在候选合成期抛 TypeError,被 input-trigger
|
|
17
|
+
* 静默摘除整个 `command` 源(斜杠菜单只剩 skill 分组)。
|
|
18
|
+
*/
|
|
12
19
|
interface CommandUiLike {
|
|
13
|
-
register(contribution:
|
|
14
|
-
name: string
|
|
15
|
-
description: string
|
|
16
|
-
available(session: { sessionId: string }): boolean
|
|
17
|
-
ui: {
|
|
18
|
-
kind: 'popupSelect'
|
|
19
|
-
options(session: { sessionId: string }): Promise<readonly { id: string; label: string }[]>
|
|
20
|
-
onSelect(option: { id: string }, session: { sessionId: string }): void | Promise<void>
|
|
21
|
-
}
|
|
22
|
-
}): () => void
|
|
20
|
+
register(contribution: CommandContribution): () => void
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
interface CommandScope {
|
|
@@ -46,7 +44,7 @@ export function registerVarCommand(
|
|
|
46
44
|
() =>
|
|
47
45
|
scope.commandUi.register({
|
|
48
46
|
name: 'var',
|
|
49
|
-
description: t('command.description'),
|
|
47
|
+
description: () => t('command.description'),
|
|
50
48
|
available: (session) => sessions.subagentAddress?.(session.sessionId) === undefined,
|
|
51
49
|
ui: {
|
|
52
50
|
kind: 'popupSelect',
|