dsh-auto-flow 0.1.0 → 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.
- package/LICENSE +1 -1
- package/README.md +37 -46
- package/cordis.patch.yml +3 -24
- package/lib/client.js +20569 -519
- package/lib/index.d.ts +185 -107
- package/lib/index.js +2915 -420
- package/lib/typert.host.js +623 -155
- package/lib/typert.remote-client.d.ts +25 -13
- package/lib/typert.remote-client.js +446 -96
- package/lib/types.d.ts +2 -106
- package/lib/types.js +7 -1
- package/package.json +39 -28
package/lib/types.d.ts
CHANGED
|
@@ -1,106 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* dsh-auto-flow 的共享业务类型;Host 与 Client 都从这里取(经本包 ./types 出口)。
|
|
4
|
-
* 本文件必须保持「浏览器安全」:只含纯 JSON 可序列化的载荷与类型词汇,
|
|
5
|
-
* 不 import 任何 Host 专属值(Agent / HarnessError 等只在 Host 半 src/index.ts 用)。
|
|
6
|
-
*/
|
|
7
|
-
/** 一条问候记录。 */
|
|
8
|
-
interface Greeting {
|
|
9
|
-
/** 记录 id(自增)。 */
|
|
10
|
-
id: number;
|
|
11
|
-
/** 问候内容(含前缀)。 */
|
|
12
|
-
text: string;
|
|
13
|
-
/** 创建时间戳(毫秒)。 */
|
|
14
|
-
createdAt: number;
|
|
15
|
-
}
|
|
16
|
-
/** 一次运行捕获的一路输出(CollectedOutput 的客户端安全投影)。 */
|
|
17
|
-
interface ExecOutput {
|
|
18
|
-
/** 已捕获文本。 */
|
|
19
|
-
text: string;
|
|
20
|
-
/** 捕获是否被截断(完整输出在 spillPath)。 */
|
|
21
|
-
truncated: boolean;
|
|
22
|
-
/** 截断时的完整输出文件路径。 */
|
|
23
|
-
spillPath?: string;
|
|
24
|
-
}
|
|
25
|
-
/** 一次运行附带的沙箱事实(ShellSandboxInfo 的客户端安全投影,mode 字符串化)。 */
|
|
26
|
-
interface ExecSandboxInfo {
|
|
27
|
-
/** 命令实际运行的模式(read-only / workspace-write / danger-full-access)。 */
|
|
28
|
-
mode: string;
|
|
29
|
-
/** 沙箱是否拒绝了某次文件操作。 */
|
|
30
|
-
denied: boolean;
|
|
31
|
-
/** 选定 runner 对请求模式的执行完整度。 */
|
|
32
|
-
enforcement?: string;
|
|
33
|
-
/** 沙箱 runner 是否在命令运行前就失败(命令未运行)。 */
|
|
34
|
-
runnerFailed?: boolean;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* exec Remote 方法的请求(经 ctx.shell seam,与 bash 工具同一执行器、绝不经过模型)。
|
|
38
|
-
* 轻执行:输出只回调用方,不进会话日志。
|
|
39
|
-
*/
|
|
40
|
-
interface ExecRequest {
|
|
41
|
-
/** 通过 Host 默认 shell 执行的命令行。 */
|
|
42
|
-
command: string;
|
|
43
|
-
/** 工作目录;缺省用执行器的已配置工作目录。 */
|
|
44
|
-
workdir?: string;
|
|
45
|
-
/** 超时(毫秒);执行器会应用其默认值并封顶。后台执行忽略。 */
|
|
46
|
-
timeoutMs?: number;
|
|
47
|
-
/** 前台 stdout 捕获预算(字节);需要完整解析 stdout 的进程内消费者用。 */
|
|
48
|
-
stdoutMaxBytes?: number;
|
|
49
|
-
/** 置 true 走后台(立即返回 jobId,经 execRead/execKill 消费),不设超时。 */
|
|
50
|
-
runInBackground?: boolean;
|
|
51
|
-
}
|
|
52
|
-
/** 前台执行的完成结果(从 ctx.shell 的 ShellRunResult 映射,保留截断/沙箱事实)。 */
|
|
53
|
-
interface ExecForegroundResult {
|
|
54
|
-
kind: 'foreground';
|
|
55
|
-
/** 退出码;被信号杀死时为 null。 */
|
|
56
|
-
exitCode: number | null;
|
|
57
|
-
/** 终止信号(如 'SIGTERM');正常退出为 null。 */
|
|
58
|
-
signal: string | null;
|
|
59
|
-
/** 执行器自身超时是否先终止了命令。 */
|
|
60
|
-
timedOut: boolean;
|
|
61
|
-
/** 调用方取消是否先终止了命令。 */
|
|
62
|
-
aborted: boolean;
|
|
63
|
-
/** 本次实际生效的超时(默认/封顶之后)。 */
|
|
64
|
-
timeoutMs: number;
|
|
65
|
-
stdout: ExecOutput;
|
|
66
|
-
stderr: ExecOutput;
|
|
67
|
-
/** 沙箱执行事实;未沙箱化的执行器缺省。 */
|
|
68
|
-
sandbox?: ExecSandboxInfo;
|
|
69
|
-
}
|
|
70
|
-
/** 后台执行的确认:立即返回 job id,客户端经 execRead/execKill 消费。 */
|
|
71
|
-
interface ExecBackgroundResult {
|
|
72
|
-
kind: 'background';
|
|
73
|
-
jobId: string;
|
|
74
|
-
}
|
|
75
|
-
/** exec Remote 方法的结果:前台完整输出,或后台 job id。 */
|
|
76
|
-
type ExecResult = ExecForegroundResult | ExecBackgroundResult;
|
|
77
|
-
/** 后台进程的一次增量读取(经 shell.start 句柄 readOutput,客户端安全)。 */
|
|
78
|
-
interface ExecReadResult {
|
|
79
|
-
/** 本次增量(流式)或终态输出(final-output)。 */
|
|
80
|
-
text: string;
|
|
81
|
-
/** job 当前状态:running | stopping | completed | killed | failed。 */
|
|
82
|
-
status: string;
|
|
83
|
-
/** 终态详情(如 'exit code: 0'),未终态缺省。 */
|
|
84
|
-
detail?: string;
|
|
85
|
-
}
|
|
86
|
-
/** execKill 的返回。 */
|
|
87
|
-
interface ExecKillResult {
|
|
88
|
-
/** requested:已请求取消;already-finished:已终态。 */
|
|
89
|
-
kind: 'requested' | 'already-finished';
|
|
90
|
-
}
|
|
91
|
-
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
92
|
-
interface RemoteErrorDetailsMap {
|
|
93
|
-
/** exec 命令超过配置的 UTF-8 字节上界。 */
|
|
94
|
-
'autoFlow/command-too-long': {
|
|
95
|
-
readonly maxBytes: number;
|
|
96
|
-
readonly actualBytes: number;
|
|
97
|
-
};
|
|
98
|
-
/** 组合未提供 ctx.shell 提供方(@deepseek-ai/dsh-shell)。 */
|
|
99
|
-
'autoFlow/shell-missing': {};
|
|
100
|
-
/** 后台 job 不存在或已结束。 */
|
|
101
|
-
'autoFlow/job-not-found': {};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
export { ExecBackgroundResult, ExecForegroundResult, ExecKillResult, ExecOutput, ExecReadResult, ExecRequest, ExecResult, ExecSandboxInfo, Greeting };
|
|
106
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
import { A as WORKFLOW_FORMAT_VERSION, C as RunStep, D as ScriptParamField, E as ScriptInfo, F as WorkflowListRouteModelsResult, I as WorkflowListRunsRequest, L as WorkflowLlmRoute, M as WorkflowFile, N as WorkflowListLlmRoutesResult, O as SelectOption, P as WorkflowListRouteModelsRequest, R as WorkflowRouteModel, S as RunState, T as ScriptArtifactSpec, _ as RunEndEvent, a as FlowEdge, b as RunNodeResultEvent, c as FlowNodeData, d as NodeDefinitionSchema, f as NodeMetaSchema, g as PropertyType, h as PropertyPlacement, i as FlowDiagnostic, j as WorkflowDefinition, k as StringFormat, l as FlowSummary, m as NodePropertySchema, n as DatetimeFormat, o as FlowGraph, p as NodePortSchema, r as FlowDataValue, s as FlowNode, t as ApprovalOption, u as FlowValidationResult, v as RunNeedApprovalEvent, w as RunSummary, x as RunStartEvent, y as RunNodeEvent } from "./types-B4zlU2vb.js";
|
|
2
|
+
export { ApprovalOption, DatetimeFormat, FlowDataValue, FlowDiagnostic, FlowEdge, FlowGraph, FlowNode, FlowNodeData, FlowSummary, FlowValidationResult, NodeDefinitionSchema, NodeMetaSchema, NodePortSchema, NodePropertySchema, PropertyPlacement, PropertyType, RunEndEvent, RunNeedApprovalEvent, RunNodeEvent, RunNodeResultEvent, RunStartEvent, RunState, RunStep, RunSummary, ScriptArtifactSpec, ScriptInfo, ScriptParamField, SelectOption, StringFormat, WORKFLOW_FORMAT_VERSION, WorkflowDefinition, WorkflowFile, WorkflowListLlmRoutesResult, WorkflowListRouteModelsRequest, WorkflowListRouteModelsResult, WorkflowListRunsRequest, WorkflowLlmRoute, WorkflowRouteModel };
|
package/lib/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-auto-flow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A DeepSeek Harness plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -52,50 +52,58 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
+
"@dagrejs/dagre": "^1.1.4",
|
|
56
|
+
"@deepseek-ai/cosmokit": "^1.8.3",
|
|
57
|
+
"@deepseek-ai/dsh-timeout": "^0.1.5-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-util-values": "^0.1.5-alpha.1",
|
|
55
59
|
"@deepseek-ai/schemastery": "^3.18.2",
|
|
60
|
+
"@monaco-editor/react": "^4.7.0",
|
|
61
|
+
"mime": "^4.0.7",
|
|
56
62
|
"zod": "^4.4.3"
|
|
57
63
|
},
|
|
58
64
|
"devDependencies": {
|
|
59
65
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
60
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.
|
|
61
|
-
"@deepseek-ai/dsh-client-locale": "^0.1.
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-
|
|
66
|
-
"@deepseek-ai/dsh-client-ui-
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
75
|
-
"@deepseek-ai/dsh-storage-domain": "^0.1.
|
|
76
|
-
"@deepseek-ai/dsh-
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
78
|
-
"@deepseek-ai/dsh-typert-
|
|
79
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.1.2-rc.1",
|
|
66
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.5-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.5-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.5-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-commands": "^0.1.5-alpha.1",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.5-alpha.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-alpha.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-alpha.1",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.5-alpha.1",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.5-alpha.1",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-settings-general": "^0.1.5-alpha.1",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.5-alpha.1",
|
|
78
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
|
|
79
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
|
|
80
|
+
"@deepseek-ai/dsh-settings": "^0.1.5-alpha.1",
|
|
81
|
+
"@deepseek-ai/dsh-storage-domain": "^0.1.5-alpha.1",
|
|
82
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.1",
|
|
83
|
+
"@deepseek-ai/dsh-typert-generator": "^0.1.5-alpha.1",
|
|
84
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.5-alpha.1",
|
|
80
85
|
"@testing-library/react": "^16.1.0",
|
|
81
86
|
"@types/node": "^22.20.0",
|
|
82
87
|
"@types/react": "^18.3.0",
|
|
83
88
|
"@types/react-dom": "^18.3.0",
|
|
89
|
+
"@xyflow/react": "^12.11.6",
|
|
84
90
|
"jsdom": "^29.1.1",
|
|
85
91
|
"lightningcss": "^1.30.1",
|
|
92
|
+
"monaco-editor": "^0.52.2",
|
|
86
93
|
"react": "^18.2.0",
|
|
87
94
|
"react-dom": "^18.2.0",
|
|
88
95
|
"tsdown": "^0.22.2",
|
|
89
96
|
"typescript": "^6.0.3",
|
|
90
|
-
"vitest": "^4.1.8"
|
|
91
|
-
"dsh-auto-flow-core": "0.1.0"
|
|
97
|
+
"vitest": "^4.1.8"
|
|
92
98
|
},
|
|
93
99
|
"peerDependencies": {
|
|
94
100
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-
|
|
101
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.5-alpha.1",
|
|
102
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
|
|
103
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
|
|
104
|
+
"@deepseek-ai/dsh-storage-domain": "^0.1.5-alpha.1",
|
|
105
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.1",
|
|
106
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.5-alpha.1"
|
|
99
107
|
},
|
|
100
108
|
"engines": {
|
|
101
109
|
"node": "^22.19.0 || >=24.0.0"
|
|
@@ -109,6 +117,8 @@
|
|
|
109
117
|
"inject": [
|
|
110
118
|
"@deepseek-ai/dsh-api-remotes",
|
|
111
119
|
"@deepseek-ai/dsh-client-locale",
|
|
120
|
+
"@deepseek-ai/dsh-client-ui-chat",
|
|
121
|
+
"@deepseek-ai/dsh-client-ui-commands",
|
|
112
122
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
113
123
|
"@deepseek-ai/dsh-client-ui-renderer",
|
|
114
124
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
@@ -126,7 +136,8 @@
|
|
|
126
136
|
"dev:host": "tsdown --filter dsh-auto-flow/host --watch",
|
|
127
137
|
"typecheck": "tsc -p tsconfig.host.json --pretty false && tsc -p tsconfig.client.json --pretty false && tsc -p tsconfig.json --pretty false",
|
|
128
138
|
"test": "vitest run",
|
|
129
|
-
"check": "pnpm run typecheck && pnpm run test && pnpm run build",
|
|
139
|
+
"check": "pnpm run check:typert && pnpm run typecheck && pnpm run test && pnpm run build",
|
|
140
|
+
"check:typert": "node scripts/typert-gen.mjs --check",
|
|
130
141
|
"typert:gen": "node scripts/typert-gen.mjs",
|
|
131
142
|
"publish:npm": "pnpm publish --no-git-checks"
|
|
132
143
|
}
|