dsh-browser-view 0.0.0-stage → 0.1.2

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,59 @@
1
+ /** 最小 Cordis 上下文(我们只消费这几个成员)。 */
2
+ export interface ReefContext {
3
+ get<T = any>(name: string): T | undefined;
4
+ effect(fn: () => (() => void) | void, label?: string): void;
5
+ on?(event: string, listener: (...args: unknown[]) => unknown): (() => void) | void;
6
+ logger?: {
7
+ info?: (message: string) => void;
8
+ warn?: (message: string) => void;
9
+ error?: (message: string) => void;
10
+ };
11
+ tools?: {
12
+ register(definition: PlainToolDefinition): unknown;
13
+ };
14
+ systemPrompt?: {
15
+ section(section: {
16
+ name: string;
17
+ order?: number;
18
+ text: string;
19
+ }): () => void;
20
+ };
21
+ }
22
+ /** 工具执行上下文(ToolRunContext 的我们用到的最小面)。 */
23
+ export interface ToolRunContext {
24
+ signal: AbortSignal;
25
+ agent?: {
26
+ session?: {
27
+ meta?: {
28
+ cwd?: string;
29
+ };
30
+ };
31
+ };
32
+ callId?: string;
33
+ }
34
+ /** 规范化工具输出契约。 */
35
+ export interface PlainToolOutput {
36
+ schema: Record<string, unknown>;
37
+ render: (args: unknown, value: unknown) => {
38
+ type: "text";
39
+ text: string;
40
+ }[];
41
+ }
42
+ /** 注册到 ctx.tools 的规范化工具定义。 */
43
+ export interface PlainToolDefinition {
44
+ name: string;
45
+ description: string;
46
+ parameters: Record<string, unknown>;
47
+ output: PlainToolOutput;
48
+ execute: (args: any, exec: ToolRunContext) => Promise<unknown> | unknown;
49
+ presentCall?: (args: any) => unknown;
50
+ isConcurrencySafe?: () => boolean;
51
+ timeoutMs?: number;
52
+ }
53
+ /** webServer 路由契约。 */
54
+ export interface WebRoute {
55
+ kind: "exact" | "prefix";
56
+ path: string;
57
+ handler: (req: import("node:http").IncomingMessage, res: import("node:http").ServerResponse) => void | Promise<void>;
58
+ }
59
+ //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,78 @@
1
1
  {
2
2
  "name": "dsh-browser-view",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.2",
4
+ "description": "DSH 插件:共享 Playwright 浏览器自动化(27 个 browser_* 工具)+ 原生界面实时画面面板 + 官方设置弹窗内的浏览器录制管理。仅依赖 playwright-core,不依赖任何 @deepseek-ai 运行时包。",
5
+ "type": "module",
6
+ "main": "./lib/index.js",
7
+ "types": "./lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./client": {
14
+ "types": "./lib/types/client/index.d.ts",
15
+ "default": "./lib/client.js"
16
+ },
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "lib/index.js",
21
+ "lib/client.js",
22
+ "lib/types/**/*.d.ts",
23
+ "cordis.patch.yml",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "scripts": {
28
+ "build": "tsc -p tsconfig.json && tsdown",
29
+ "typecheck": "tsc -p tsconfig.json --noEmit --pretty false && tsc -p tsconfig.test.json --noEmit --pretty false",
30
+ "test": "vitest run",
31
+ "verify": "npm run typecheck && npm run test && npm run build",
32
+ "prepublishOnly": "npm run verify"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/HelloTomBruce/dsh-browser.git"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public",
40
+ "registry": "https://registry.npmjs.org/"
41
+ },
42
+ "keywords": [
43
+ "dsh",
44
+ "dsh-plugin",
45
+ "deepseek-harness",
46
+ "browser",
47
+ "playwright",
48
+ "automation",
49
+ "testing"
50
+ ],
51
+ "license": "MIT",
52
+ "engines": {
53
+ "node": ">=22"
54
+ },
55
+ "dependencies": {
56
+ "playwright-core": "^1.49.0"
57
+ },
58
+ "devDependencies": {
59
+ "@types/node": "^22.0.0",
60
+ "@types/react": "^18.2.0",
61
+ "tsdown": "^0.22.0",
62
+ "typescript": "^5.9.2",
63
+ "vitest": "^3.0.0"
64
+ },
65
+ "dsh": {
66
+ "bundle": {
67
+ "patch": "./cordis.patch.yml"
68
+ },
69
+ "client": {
70
+ "inject": [
71
+ "@deepseek-ai/dsh-client-runtime",
72
+ "@deepseek-ai/dsh-client-ui-settings",
73
+ "@deepseek-ai/dsh-client-ui-slots"
74
+ ],
75
+ "platform": "web"
76
+ }
77
+ }
78
+ }