dsh-agentone 0.5.39 → 0.5.40
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 +5 -1
- package/lib/index.js +4 -3
- package/package.json +2 -2
package/lib/client.js
CHANGED
|
@@ -201,10 +201,14 @@ window.__ModuleLoader__.load({
|
|
|
201
201
|
const startLogin = async () => {
|
|
202
202
|
setError('');
|
|
203
203
|
try {
|
|
204
|
+
// 本组件只跑在桌面壳(DSH Desktop / DSH NEXT "DeepSeek HARNESS")里,
|
|
205
|
+
// 页面经 srcdoc/沙箱 iframe 加载:location.origin 是 "null",拼
|
|
206
|
+
// callback_url 会被插件 400「回调地址不合法」。与 page.js 的桌面
|
|
207
|
+
// 路径一致发 desktop 标记,让插件起一次性 127.0.0.1 本地回调服务。
|
|
204
208
|
const response = await fetch('/agentone/api/login', {
|
|
205
209
|
method: 'POST',
|
|
206
210
|
headers: { 'Content-Type': 'application/json' },
|
|
207
|
-
body: JSON.stringify({
|
|
211
|
+
body: JSON.stringify({ desktop: true }),
|
|
208
212
|
});
|
|
209
213
|
const data = await response.json();
|
|
210
214
|
if (!response.ok) {
|
package/lib/index.js
CHANGED
|
@@ -566,12 +566,13 @@ button{font:inherit;padding:9px 22px;border-radius:10px;border:none;cursor:point
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
/**
|
|
569
|
-
*
|
|
570
|
-
*
|
|
569
|
+
* 是否运行在桌面壳内:宿主进程是 Electron(execPath 指向桌面壳可执行文件)。
|
|
570
|
+
* 壳品牌:DSH Desktop / DSH NEXT / DeepSeek HARNESS(NEXT 的公开发布名)。
|
|
571
|
+
* 与页面侧标记(page.js 传 desktop:true)互为兜底——iframe 内
|
|
571
572
|
* location.search 不含宿主 query,页面自检在设置 iframe 场景会漏。
|
|
572
573
|
*/
|
|
573
574
|
function isDesktopHost() {
|
|
574
|
-
return /DSH Desktop\.(?:app|exe)/i.test(process.execPath);
|
|
575
|
+
return /(?:DSH Desktop|DSH NEXT|DeepSeek HARNESS)\.(?:app|exe)/i.test(process.execPath);
|
|
575
576
|
}
|
|
576
577
|
|
|
577
578
|
export function apply(ctx, config) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agentone",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "AgentOne
|
|
3
|
+
"version": "0.5.40",
|
|
4
|
+
"description": "AgentOne 平台集成:平台模型、SkillHub 技能、套餐与 CLI;lark-cli 首装一键初始化飞书应用;修复 DeepSeek HARNESS 桌面壳登录回调地址不合法",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"smoke": "node scripts/env-matrix-smoke.mjs"
|