@lynn123411/dsh-web-auth-url 0.1.3 → 0.2.0

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.
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="9" cy="12" r="7"/>
3
+ <ellipse cx="9" cy="12" rx="3" ry="7"/>
4
+ <path d="M2 12h14"/>
5
+ <circle cx="19" cy="8.5" r="2"/>
6
+ <path d="M19 10.5v8"/>
7
+ <path d="M19 15.5h2"/>
8
+ <path d="M19 17.2h1.4"/>
9
+ </svg>
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "GUI auth URL",
4
+ "description": "Hands the current Web instance's token-bearing URL to the model and the shell, without putting the secret into the prompt."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "GUI 鉴权地址",
4
+ "description": "把当前 Web 实例带 token 的访问地址交给模型与 shell,而凭据不进提示词。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@lynn123411/dsh-web-auth-url",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "把当前 Web 实例的带 token 访问地址交给模型与 shell:托管 DSH_WEB_AUTH_URL(每次 shell 调用即时解析,跟随重启后的 token 轮换),并贡献一段紧随 web-surface 的提示词说明 cookie jar 用法,secret 不进提示词与 transcript。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
8
8
  ".": "./lib/index.js",
9
+ "./locale/en.json": "./locale/en.json",
10
+ "./locale/zh.json": "./locale/zh.json",
9
11
  "./package.json": "./package.json",
10
12
  "./cordis.patch.yml": "./cordis.patch.yml"
11
13
  },
@@ -13,7 +15,9 @@
13
15
  "lib",
14
16
  "scripts",
15
17
  "cordis.patch.yml",
16
- "README.md"
18
+ "README.md",
19
+ "locale",
20
+ "assets"
17
21
  ],
18
22
  "license": "MIT",
19
23
  "keywords": [
@@ -46,11 +50,11 @@
46
50
  },
47
51
  "devDependencies": {
48
52
  "@deepseek-ai/cordis": "4.0.4",
49
- "@deepseek-ai/dsh-shell-env": "0.1.7-rc.2",
50
- "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2"
53
+ "@deepseek-ai/dsh-shell-env": ">=0.2.0-rc.2",
54
+ "@deepseek-ai/dsh-system-prompt": ">=0.2.0-rc.2"
51
55
  },
52
56
  "engines": {
53
- "dsh": "0.1.7-rc.2",
57
+ "dsh": ">=0.2.0-rc.2",
54
58
  "node": "^22.19 || >=24"
55
59
  },
56
60
  "publishConfig": {
@@ -60,5 +64,6 @@
60
64
  "bundle": {
61
65
  "patch": "./cordis.patch.yml"
62
66
  }
63
- }
67
+ },
68
+ "icon": "./assets/icon.svg"
64
69
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 宿主半边自检:把两个承重点放在 **真实的 0.1.7-rc.2 内核服务** 上跑,而不是桩件——
2
+ * 宿主半边自检:把两个承重点放在 **真实的 0.2.0-rc.2 内核服务** 上跑,而不是桩件——
3
3
  * 这两条断言的全部意义就是「DSH 换了实现,本插件立刻挂」:
4
4
  *
5
5
  * 1. 托管环境变量:真实 `ctx.shellEnv`(@deepseek-ai/dsh-shell-env)的
@@ -44,7 +44,7 @@ const AUTH_URL = `${CLEAN_URL}/?token=${TOKEN}`;
44
44
 
45
45
  /** 本插件贡献的段落名。 */
46
46
  const SECTION_NAME = 'app:web-auth-url';
47
- /** 0.1.7-rc.2 `SECTION_ORDERS.WEB_SURFACE` 的实际取值,锚点漂了必须当场失败。 */
47
+ /** 0.2.0-rc.2 `SECTION_ORDERS.WEB_SURFACE` 的实际取值,锚点漂了必须当场失败。 */
48
48
  const ANCHOR_ORDER = 10100;
49
49
 
50
50
  /** 读一个已安装包的真实版本号(沿解析出的入口向上找同名 package.json)。 */
@@ -105,16 +105,23 @@ assert.equal(realpathSync(selfDir()), selfDir(), 'selfDir 必须已经是 realpa
105
105
  assert.equal(existsSync(join(selfDir(), manifest.main)), true, 'selfDir 必须能拼出真实入口文件');
106
106
  assert.equal(existsSync(join(selfDir(), 'cordis.patch.yml')), true, 'selfDir 必须能拼出随包文件');
107
107
 
108
- assert.equal(manifest.engines.dsh, '0.1.7-rc.2', 'engines.dsh 必须是精确的目标版本');
108
+ assert.equal(manifest.engines.dsh, '>=0.2.0-rc.2', 'engines.dsh 必须声明不低于基线 0.2.0-rc.2 的支持范围');
109
109
  assert.equal(manifest.peerDependencies['@deepseek-ai/cordis'], '^4.0.4');
110
110
  assert.equal(installedVersion('@deepseek-ai/cordis'), '4.0.4', 'cordis 必须对齐安装版本');
111
111
  assert.equal(manifest.dependencies['@deepseek-ai/schemastery'], '^3.18.4');
112
112
  assert.equal(installedVersion('@deepseek-ai/schemastery'), '3.18.4', 'schemastery 必须对齐安装版本');
113
+ // engines.dsh 写成 >=0.2.0-rc.2(大于等于当前版本),而 devDependencies
114
+ // 仍定向安装基线版本 0.2.0-rc.2,两者刻意不同:声明层必须写同一个范围,安装层必须钉住基线。
113
115
  for (const pkg of ['@deepseek-ai/dsh-system-prompt', '@deepseek-ai/dsh-shell-env']) {
114
116
  assert.equal(
115
- installedVersion(pkg),
117
+ manifest.devDependencies[pkg],
116
118
  manifest.engines.dsh,
117
- `${pkg} 的 devDependency 必须与 engines.dsh 同版本,否则自检跑的不是目标版本`,
119
+ `${pkg} 的 devDependency 必须与 engines.dsh 写同一个版本范围`,
120
+ );
121
+ assert.equal(
122
+ installedVersion(pkg),
123
+ '0.2.0-rc.2',
124
+ '自检跑的内核包必须仍是基线版本 0.2.0-rc.2',
118
125
  );
119
126
  }
120
127
 
@@ -152,7 +159,7 @@ for (const pkg of ['@deepseek-ai/dsh-system-prompt', '@deepseek-ai/dsh-shell-env
152
159
  assert.equal(anchorOrder, ANCHOR_ORDER, 'WEB_SURFACE 位置值变了,+10 的紧邻关系必须重新核对');
153
160
 
154
161
  /**
155
- * 复刻 dsh-web-app 的锚点:它在 0.1.7-rc.2 以
162
+ * 复刻 dsh-web-app 的锚点:它在 0.2.0-rc.2 以
156
163
  * `section({ name: 'app:web-surface', order: getSectionOrder('WEB_SURFACE') })` 注册
157
164
  * (安装副本 `lib/index.js` 第 180-184 行)。它不在本插件的依赖里,所以只能照同样的
158
165
  * 两件事复刻一个再断言紧邻;「这个名字对得上 dsh-web-app」靠读那一处源码保证,不是