banso-dsh-web 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +16 -2
- package/cordis.patch.yml +91 -0
- package/package.json +60 -3
- package/src/index.js +24 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tindada
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Banso 最小 Web 聊天
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`banso-dsh-web` 是追加在 `banso-dsh` 后的 Web bundle。它在自己的 patch 中停用 SDK 启动和 stdio 服务,不修改基础包或业务包;复用 DSH `0.2.0-rc.2` 的通信、会话对象、持久化和前端启动壳。
|
|
4
|
+
|
|
5
|
+
本包组合 `banso-dsh-ui` 提供 Web 聊天。安装、密钥配置、启动和端口设置见 [Web 聊天使用说明](https://github.com/Tindada/banso-dsh/blob/main/README.md#web-聊天源码安装),界面行为和限制见 [UI 说明](https://github.com/Tindada/banso-dsh/blob/main/packages/ui/README.md#展示与限制)。
|
|
6
|
+
|
|
7
|
+
修改 profile 配置后需重启服务。
|
|
8
|
+
|
|
9
|
+
## 组合和存储
|
|
10
|
+
|
|
11
|
+
- profile 中的 bundle 顺序必须是 `banso-dsh`、`banso-dsh-web`,不要同时加载 `banso-dsh-base` 或官方 `dsh-web-app`。
|
|
12
|
+
- 会话沿用 `DSH_HOME/sessions-banso-base`(默认 `~/.dsh/sessions-banso-base`)。工作区元数据和附件放在 `DSH_HOME/banso-web/`。
|
|
13
|
+
- `attachment-local`、`file-upload`、`commands`、文件系统及工作区存储来自官方会话接口的依赖,即使前端不显示这些功能也需要加载。
|
|
14
|
+
- `ui-renderer` 负责根页面渲染;`ui-session` 只提供 renderer 所需的会话作用域适配;`banso-dsh-ui` 是唯一页面。未加载官方 chat、layout、sidebar 等界面。
|
|
15
|
+
- 网页直接连接 Node.js DSH 服务,不经过 Python SDK;SDK 原 profile 继续使用原有组合。
|
|
16
|
+
|
|
17
|
+
构建和浏览器集成验证见 [开发文档](https://github.com/Tindada/banso-dsh/blob/main/docs/development.md)。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Apply after banso-dsh. SDK configuration and business packages stay unchanged.
|
|
2
|
+
- id: sdk-app-startup
|
|
3
|
+
disabled: true
|
|
4
|
+
- id: sdk-jsonrpc-server
|
|
5
|
+
disabled: true
|
|
6
|
+
# Config patches replace the whole object: preserve Jina and disabled native fetch.
|
|
7
|
+
- id: web
|
|
8
|
+
config:
|
|
9
|
+
searchProvider: deepseek-official
|
|
10
|
+
fetchProvider: jina
|
|
11
|
+
- id: tool-web
|
|
12
|
+
config:
|
|
13
|
+
search: true
|
|
14
|
+
fetch: false
|
|
15
|
+
searchTimeoutMs: 60000
|
|
16
|
+
- insert:
|
|
17
|
+
- id: web-search-deepseek
|
|
18
|
+
name: '@deepseek-ai/dsh-web-search-deepseek'
|
|
19
|
+
config:
|
|
20
|
+
apiKeyEnv: DEEPSEEK_API_KEY
|
|
21
|
+
- id: banso-web-startup
|
|
22
|
+
name: banso-dsh-web
|
|
23
|
+
- id: host-webserver
|
|
24
|
+
name: "@deepseek-ai/dsh-host-webserver"
|
|
25
|
+
inject: [bansoWebStartup]
|
|
26
|
+
config:
|
|
27
|
+
host: 127.0.0.1
|
|
28
|
+
port: !!js ctx.bansoWebStartup.port
|
|
29
|
+
- id: host-frontend-static
|
|
30
|
+
name: "@deepseek-ai/dsh-host-frontend-static"
|
|
31
|
+
inject: [bansoWebStartup]
|
|
32
|
+
config:
|
|
33
|
+
distIndex: !!js ctx.bansoWebStartup.distIndex
|
|
34
|
+
- id: client-modules
|
|
35
|
+
name: "@deepseek-ai/dsh-client-modules"
|
|
36
|
+
- id: client-connection
|
|
37
|
+
name: "@deepseek-ai/dsh-client-connection"
|
|
38
|
+
- id: typert-registry
|
|
39
|
+
name: "@deepseek-ai/dsh-typert-registry"
|
|
40
|
+
- id: typert-loader
|
|
41
|
+
name: "@deepseek-ai/dsh-typert-loader"
|
|
42
|
+
- id: api-gateway
|
|
43
|
+
name: "@deepseek-ai/dsh-api-gateway"
|
|
44
|
+
- id: api-remotes
|
|
45
|
+
name: "@deepseek-ai/dsh-api-remotes"
|
|
46
|
+
- id: api-session-controller
|
|
47
|
+
name: "@deepseek-ai/dsh-api-session-controller"
|
|
48
|
+
config:
|
|
49
|
+
nativeOpen: false
|
|
50
|
+
- id: credentials-local
|
|
51
|
+
name: "@deepseek-ai/dsh-credentials-local"
|
|
52
|
+
- id: agent-default-model
|
|
53
|
+
name: "@deepseek-ai/dsh-agent-default-model"
|
|
54
|
+
config:
|
|
55
|
+
provider: deepseek-official
|
|
56
|
+
model: deepseek-flash
|
|
57
|
+
- id: session-query-sqlite
|
|
58
|
+
name: "@deepseek-ai/dsh-session-query-sqlite"
|
|
59
|
+
config:
|
|
60
|
+
path: ':memory:'
|
|
61
|
+
openAt: never
|
|
62
|
+
- id: attachment-local
|
|
63
|
+
name: "@deepseek-ai/dsh-attachment-local"
|
|
64
|
+
config:
|
|
65
|
+
dshHome: !!js dshHomePath('banso-web')
|
|
66
|
+
- id: client-file-upload
|
|
67
|
+
name: "@deepseek-ai/dsh-client-file-upload"
|
|
68
|
+
- id: commands
|
|
69
|
+
name: "@deepseek-ai/dsh-commands"
|
|
70
|
+
- id: fs-local
|
|
71
|
+
name: "@deepseek-ai/dsh-fs-local"
|
|
72
|
+
- id: file-reference-local
|
|
73
|
+
name: "@deepseek-ai/dsh-file-reference-local"
|
|
74
|
+
- id: workspace
|
|
75
|
+
name: "@deepseek-ai/dsh-workspace"
|
|
76
|
+
- id: storage
|
|
77
|
+
name: "@deepseek-ai/dsh-storage"
|
|
78
|
+
- id: storage-json
|
|
79
|
+
name: "@deepseek-ai/dsh-storage-json"
|
|
80
|
+
config:
|
|
81
|
+
root: !!js dshHomePath('banso-web/storages')
|
|
82
|
+
- id: storage-domain
|
|
83
|
+
name: "@deepseek-ai/dsh-storage-domain"
|
|
84
|
+
config:
|
|
85
|
+
backend: json
|
|
86
|
+
- id: client-ui-renderer
|
|
87
|
+
name: "@deepseek-ai/dsh-client-ui-renderer"
|
|
88
|
+
- id: client-ui-session
|
|
89
|
+
name: "@deepseek-ai/dsh-client-ui-session"
|
|
90
|
+
- id: banso-ui
|
|
91
|
+
name: banso-dsh-ui
|
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "banso-dsh-web",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./src/index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"cordis.patch.yml",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"dsh": {
|
|
16
|
+
"bundle": {
|
|
17
|
+
"patch": "./cordis.patch.yml"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"banso-dsh": "0.1.1",
|
|
22
|
+
"banso-dsh-ui": "0.1.0",
|
|
23
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.0-rc.2",
|
|
24
|
+
"@deepseek-ai/dsh-host-frontend-static": "0.2.0-rc.2",
|
|
25
|
+
"@deepseek-ai/dsh-client-modules": "0.2.0-rc.2",
|
|
26
|
+
"@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
|
|
27
|
+
"@deepseek-ai/dsh-typert-registry": "0.2.0-rc.2",
|
|
28
|
+
"@deepseek-ai/dsh-typert-loader": "0.2.0-rc.2",
|
|
29
|
+
"@deepseek-ai/dsh-api-gateway": "0.2.0-rc.2",
|
|
30
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.0-rc.2",
|
|
31
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.0-rc.2",
|
|
32
|
+
"@deepseek-ai/dsh-credentials-local": "0.2.0-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-agent-default-model": "0.2.0-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-session-query-sqlite": "0.2.0-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-attachment-local": "0.2.0-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-client-file-upload": "0.2.0-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-commands": "0.2.0-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-fs-local": "0.2.0-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-file-reference-local": "0.2.0-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-workspace": "0.2.0-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-storage": "0.2.0-rc.2",
|
|
42
|
+
"@deepseek-ai/dsh-storage-json": "0.2.0-rc.2",
|
|
43
|
+
"@deepseek-ai/dsh-storage-domain": "0.2.0-rc.2",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-web-frontend": "0.2.0-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-cmdline": "0.2.0-rc.2",
|
|
47
|
+
"commander": "^15.0.0",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-web-search-deepseek": "0.2.0-rc.2"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@deepseek-ai/cordis": "^4.0.4"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
56
|
+
"@deepseek-ai/dsh": "0.2.0-rc.2",
|
|
57
|
+
"playwright": "^1.49.0"
|
|
58
|
+
},
|
|
59
|
+
"description": "Banso research web bundle for DeepSeek Harness",
|
|
60
|
+
"scripts": {
|
|
61
|
+
"test": "node --test tests/*.test.mjs"
|
|
62
|
+
}
|
|
6
63
|
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { parseCmdline } from '@deepseek-ai/dsh-cmdline';
|
|
4
|
+
|
|
5
|
+
export const inject = ['cmdlineArgs'];
|
|
6
|
+
export function apply(ctx) {
|
|
7
|
+
const program = new Command().name('dsh --profile banso-web')
|
|
8
|
+
.description('Serve the minimal Banso chat UI on localhost.')
|
|
9
|
+
.option('--port <port>', 'localhost port (0 chooses a free port)', '3080');
|
|
10
|
+
program.action(() => {
|
|
11
|
+
const value = program.opts().port;
|
|
12
|
+
if (!/^\d+$/.test(value) || Number(value) > 65535) program.error('port must be an integer from 0 to 65535');
|
|
13
|
+
const require = createRequire(import.meta.url);
|
|
14
|
+
ctx.provide('bansoWebStartup', {
|
|
15
|
+
port: Number(value),
|
|
16
|
+
distIndex: require.resolve('@deepseek-ai/dsh-web-frontend/dist/index.html'),
|
|
17
|
+
});
|
|
18
|
+
ctx.inject(['webServer', 'connection'], child => {
|
|
19
|
+
const report = () => console.log(`Banso Web: ${child.connection.authenticatedUrl(`http://127.0.0.1:${child.webServer.port}`)}`);
|
|
20
|
+
if (ctx.appReady) child.effect(() => ctx.appReady.onReady(report));
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
parseCmdline(ctx, program);
|
|
24
|
+
}
|