@deepseek-ai/dsh-api-terminal-controller 0.1.6-alpha.1 → 0.1.6-alpha.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/README.i18n.yaml +2 -2
- package/README.md +14 -5
- package/README.zh.md +14 -5
- package/lib/client.js +249 -19
- package/lib/index.js +263 -61
- package/lib/typert.host.js +165 -78
- package/lib/typert.remote-client.d.ts +3 -1
- package/lib/typert.remote-client.js +152 -76
- package/lib/types/client/bindings.d.ts +31 -0
- package/lib/types/client/bindings.js +71 -0
- package/lib/types/client/index.d.ts +22 -4
- package/lib/types/client/index.js +83 -8
- package/lib/types/client/model.d.ts +3 -1
- package/lib/types/client/model.js +20 -7
- package/lib/types/client/retention.d.ts +35 -0
- package/lib/types/client/retention.js +77 -0
- package/lib/types/index.d.ts +17 -3
- package/lib/types/index.js +49 -43
- package/lib/types/retention.d.ts +53 -0
- package/lib/types/retention.js +153 -0
- package/lib/types/terminal.d.ts +23 -1
- package/lib/types/terminal.js +40 -9
- package/lib/types/types.d.ts +6 -0
- package/package.json +17 -16
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
4
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_0$schema$value
|
|
5
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
6
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_1$schema$value
|
|
7
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_1$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_1$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
8
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_close_result$schema$value
|
|
9
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_close_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_close_result$schema$value ??= z.void())
|
|
10
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_0$schema$value
|
|
11
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
12
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_1$schema$value
|
|
13
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_1$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_1$schema$value ??= z.object({
|
|
9
14
|
'shellPath': z.string().readonly().optional(),
|
|
10
15
|
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
11
16
|
'cols': z.number().readonly(),
|
|
12
17
|
'rows': z.number().readonly(),
|
|
13
|
-
})
|
|
14
|
-
|
|
18
|
+
}))
|
|
19
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_create_result$schema$value
|
|
20
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_create_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_create_result$schema$value ??= z.object({
|
|
15
21
|
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
16
22
|
'title': z.string().readonly(),
|
|
17
23
|
'shell': z.object({
|
|
@@ -26,19 +32,25 @@ const _deepseek_ai_dsh_api_terminal_controller_terminal_create_result$schema = z
|
|
|
26
32
|
'exitCode': z.union([z.literal(null), z.number()]).readonly(),
|
|
27
33
|
'error': z.string().readonly().optional(),
|
|
28
34
|
'controllerId': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const
|
|
35
|
+
}))
|
|
36
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_environment_parameter_0$schema$value
|
|
37
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_environment_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_environment_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
38
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_environment_result$schema$value
|
|
39
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_environment_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_environment_result$schema$value ??= z.object({
|
|
32
40
|
'cwd': z.string().readonly(),
|
|
33
41
|
'maxInputBytes': z.number().readonly(),
|
|
34
42
|
'maxCols': z.number().readonly(),
|
|
35
43
|
'maxRows': z.number().readonly(),
|
|
36
44
|
'scrollback': z.number().readonly(),
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const
|
|
45
|
+
}))
|
|
46
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_0$schema$value
|
|
47
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
48
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_1$schema$value
|
|
49
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_1$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_1$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
50
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_2$schema$value
|
|
51
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_2$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_2$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
52
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_follow_result$schema$value
|
|
53
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_follow_result$schema$value ??= z.union([z.object({
|
|
42
54
|
'type': z.literal("snapshot").readonly(),
|
|
43
55
|
'sequence': z.number().readonly(),
|
|
44
56
|
'screen': z.string().readonly(),
|
|
@@ -80,9 +92,11 @@ const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_result$schema = z
|
|
|
80
92
|
'error': z.string().readonly().optional(),
|
|
81
93
|
'controllerId': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
82
94
|
}).readonly(),
|
|
83
|
-
})])
|
|
84
|
-
|
|
85
|
-
const
|
|
95
|
+
})]))
|
|
96
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_list_parameter_0$schema$value
|
|
97
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_list_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_list_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
98
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_list_result$schema$value
|
|
99
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_list_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_list_result$schema$value ??= z.array(z.object({
|
|
86
100
|
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
87
101
|
'title': z.string().readonly(),
|
|
88
102
|
'shell': z.object({
|
|
@@ -97,28 +111,53 @@ const _deepseek_ai_dsh_api_terminal_controller_terminal_list_result$schema = z.a
|
|
|
97
111
|
'exitCode': z.union([z.literal(null), z.number()]).readonly(),
|
|
98
112
|
'error': z.string().readonly().optional(),
|
|
99
113
|
'controllerId': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
114
|
+
})))
|
|
115
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_0$schema$value
|
|
116
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
117
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_1$schema$value
|
|
118
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_1$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_1$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
119
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_2$schema$value
|
|
120
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_2$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_2$schema$value ??= z.string())
|
|
121
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_rename_result$schema$value
|
|
122
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_rename_result$schema$value ??= z.void())
|
|
123
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_0$schema$value
|
|
124
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
125
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_1$schema$value
|
|
126
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_1$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_1$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
127
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_2$schema$value
|
|
128
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_2$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_2$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
129
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_3$schema$value
|
|
130
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_3$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_3$schema$value ??= z.number())
|
|
131
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_4$schema$value
|
|
132
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_4$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_4$schema$value ??= z.number())
|
|
133
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_resize_result$schema$value
|
|
134
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_resize_result$schema$value ??= z.void())
|
|
135
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_0$schema$value
|
|
136
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
137
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_1$schema$value
|
|
138
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_1$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_1$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
139
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_retain_result$schema$value
|
|
140
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_retain_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_retain_result$schema$value ??= z.object({
|
|
141
|
+
'type': z.literal("retained").readonly(),
|
|
100
142
|
}))
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
106
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
107
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_2$schema = z.intersection(z.string(), z.unknown())
|
|
108
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_3$schema = z.number()
|
|
109
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_4$schema = z.number()
|
|
110
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_result$schema = z.void()
|
|
111
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_shells_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
112
|
-
const _deepseek_ai_dsh_api_terminal_controller_terminal_shells_result$schema = z.array(z.object({
|
|
143
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_shells_parameter_0$schema$value
|
|
144
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_shells_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_shells_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
145
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_shells_result$schema$value
|
|
146
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_shells_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_shells_result$schema$value ??= z.array(z.object({
|
|
113
147
|
'path': z.string().readonly(),
|
|
114
148
|
'args': z.array(z.string()).readonly(),
|
|
115
149
|
'name': z.string().readonly(),
|
|
116
|
-
}))
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
150
|
+
})))
|
|
151
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_0$schema$value
|
|
152
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_0$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
153
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_1$schema$value
|
|
154
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_1$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_1$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
155
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_2$schema$value
|
|
156
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_2$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_2$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
157
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_3$schema$value
|
|
158
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_3$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_3$schema$value ??= z.string())
|
|
159
|
+
let _deepseek_ai_dsh_api_terminal_controller_terminal_write_result$schema$value
|
|
160
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_result$schema = () => (_deepseek_ai_dsh_api_terminal_controller_terminal_write_result$schema$value ??= z.void())
|
|
122
161
|
|
|
123
162
|
export const TYPERT_REMOTE = {
|
|
124
163
|
package: '@deepseek-ai/dsh-api-terminal-controller',
|
|
@@ -142,7 +181,7 @@ export const TYPERT_REMOTE = {
|
|
|
142
181
|
codec: {
|
|
143
182
|
mode: 'strict',
|
|
144
183
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
145
|
-
|
|
184
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_0$schema,
|
|
146
185
|
},
|
|
147
186
|
},
|
|
148
187
|
{
|
|
@@ -152,16 +191,16 @@ export const TYPERT_REMOTE = {
|
|
|
152
191
|
codec: {
|
|
153
192
|
mode: 'strict',
|
|
154
193
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
155
|
-
|
|
194
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_1$schema,
|
|
156
195
|
},
|
|
157
196
|
},
|
|
158
197
|
],
|
|
159
198
|
result: {
|
|
160
199
|
mode: 'strict',
|
|
161
200
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/close:result',
|
|
162
|
-
|
|
201
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_close_result$schema,
|
|
163
202
|
},
|
|
164
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
203
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":269,"column":9},
|
|
165
204
|
},
|
|
166
205
|
{
|
|
167
206
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/create',
|
|
@@ -182,7 +221,7 @@ export const TYPERT_REMOTE = {
|
|
|
182
221
|
codec: {
|
|
183
222
|
mode: 'strict',
|
|
184
223
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
185
|
-
|
|
224
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_0$schema,
|
|
186
225
|
},
|
|
187
226
|
},
|
|
188
227
|
{
|
|
@@ -192,7 +231,7 @@ export const TYPERT_REMOTE = {
|
|
|
192
231
|
codec: {
|
|
193
232
|
mode: 'strict',
|
|
194
233
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalCreateRequest',
|
|
195
|
-
|
|
234
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_1$schema,
|
|
196
235
|
},
|
|
197
236
|
},
|
|
198
237
|
],
|
|
@@ -200,9 +239,9 @@ export const TYPERT_REMOTE = {
|
|
|
200
239
|
result: {
|
|
201
240
|
mode: 'strict',
|
|
202
241
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalInfo',
|
|
203
|
-
|
|
242
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_create_result$schema,
|
|
204
243
|
},
|
|
205
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
244
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":158,"column":9},
|
|
206
245
|
},
|
|
207
246
|
{
|
|
208
247
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/environment',
|
|
@@ -223,7 +262,7 @@ export const TYPERT_REMOTE = {
|
|
|
223
262
|
codec: {
|
|
224
263
|
mode: 'strict',
|
|
225
264
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
226
|
-
|
|
265
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_environment_parameter_0$schema,
|
|
227
266
|
},
|
|
228
267
|
},
|
|
229
268
|
],
|
|
@@ -231,9 +270,9 @@ export const TYPERT_REMOTE = {
|
|
|
231
270
|
result: {
|
|
232
271
|
mode: 'strict',
|
|
233
272
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalEnvironment',
|
|
234
|
-
|
|
273
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_environment_result$schema,
|
|
235
274
|
},
|
|
236
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
275
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":118,"column":3},
|
|
237
276
|
},
|
|
238
277
|
{
|
|
239
278
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/follow',
|
|
@@ -255,7 +294,7 @@ export const TYPERT_REMOTE = {
|
|
|
255
294
|
codec: {
|
|
256
295
|
mode: 'strict',
|
|
257
296
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
258
|
-
|
|
297
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_0$schema,
|
|
259
298
|
},
|
|
260
299
|
},
|
|
261
300
|
{
|
|
@@ -265,7 +304,7 @@ export const TYPERT_REMOTE = {
|
|
|
265
304
|
codec: {
|
|
266
305
|
mode: 'strict',
|
|
267
306
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
268
|
-
|
|
307
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_1$schema,
|
|
269
308
|
},
|
|
270
309
|
},
|
|
271
310
|
{
|
|
@@ -275,7 +314,7 @@ export const TYPERT_REMOTE = {
|
|
|
275
314
|
codec: {
|
|
276
315
|
mode: 'strict',
|
|
277
316
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalAttachmentId',
|
|
278
|
-
|
|
317
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_2$schema,
|
|
279
318
|
},
|
|
280
319
|
},
|
|
281
320
|
],
|
|
@@ -283,9 +322,9 @@ export const TYPERT_REMOTE = {
|
|
|
283
322
|
result: {
|
|
284
323
|
mode: 'strict',
|
|
285
324
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalFrame',
|
|
286
|
-
|
|
325
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_result$schema,
|
|
287
326
|
},
|
|
288
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
327
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":216,"column":3},
|
|
289
328
|
},
|
|
290
329
|
{
|
|
291
330
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/list',
|
|
@@ -301,16 +340,16 @@ export const TYPERT_REMOTE = {
|
|
|
301
340
|
codec: {
|
|
302
341
|
mode: 'strict',
|
|
303
342
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
304
|
-
|
|
343
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_list_parameter_0$schema,
|
|
305
344
|
},
|
|
306
345
|
},
|
|
307
346
|
],
|
|
308
347
|
result: {
|
|
309
348
|
mode: 'strict',
|
|
310
349
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/list:result',
|
|
311
|
-
|
|
350
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_list_result$schema,
|
|
312
351
|
},
|
|
313
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
352
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":144,"column":3},
|
|
314
353
|
},
|
|
315
354
|
{
|
|
316
355
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/rename',
|
|
@@ -331,7 +370,7 @@ export const TYPERT_REMOTE = {
|
|
|
331
370
|
codec: {
|
|
332
371
|
mode: 'strict',
|
|
333
372
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
334
|
-
|
|
373
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_0$schema,
|
|
335
374
|
},
|
|
336
375
|
},
|
|
337
376
|
{
|
|
@@ -341,7 +380,7 @@ export const TYPERT_REMOTE = {
|
|
|
341
380
|
codec: {
|
|
342
381
|
mode: 'strict',
|
|
343
382
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
344
|
-
|
|
383
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_1$schema,
|
|
345
384
|
},
|
|
346
385
|
},
|
|
347
386
|
{
|
|
@@ -351,16 +390,16 @@ export const TYPERT_REMOTE = {
|
|
|
351
390
|
codec: {
|
|
352
391
|
mode: 'strict',
|
|
353
392
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/rename:title',
|
|
354
|
-
|
|
393
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_2$schema,
|
|
355
394
|
},
|
|
356
395
|
},
|
|
357
396
|
],
|
|
358
397
|
result: {
|
|
359
398
|
mode: 'strict',
|
|
360
399
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/rename:result',
|
|
361
|
-
|
|
400
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_result$schema,
|
|
362
401
|
},
|
|
363
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
402
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":257,"column":3},
|
|
364
403
|
},
|
|
365
404
|
{
|
|
366
405
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize',
|
|
@@ -381,7 +420,7 @@ export const TYPERT_REMOTE = {
|
|
|
381
420
|
codec: {
|
|
382
421
|
mode: 'strict',
|
|
383
422
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
384
|
-
|
|
423
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_0$schema,
|
|
385
424
|
},
|
|
386
425
|
},
|
|
387
426
|
{
|
|
@@ -391,7 +430,7 @@ export const TYPERT_REMOTE = {
|
|
|
391
430
|
codec: {
|
|
392
431
|
mode: 'strict',
|
|
393
432
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
394
|
-
|
|
433
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_1$schema,
|
|
395
434
|
},
|
|
396
435
|
},
|
|
397
436
|
{
|
|
@@ -401,7 +440,7 @@ export const TYPERT_REMOTE = {
|
|
|
401
440
|
codec: {
|
|
402
441
|
mode: 'strict',
|
|
403
442
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalAttachmentId',
|
|
404
|
-
|
|
443
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_2$schema,
|
|
405
444
|
},
|
|
406
445
|
},
|
|
407
446
|
{
|
|
@@ -411,7 +450,7 @@ export const TYPERT_REMOTE = {
|
|
|
411
450
|
codec: {
|
|
412
451
|
mode: 'strict',
|
|
413
452
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize:cols',
|
|
414
|
-
|
|
453
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_3$schema,
|
|
415
454
|
},
|
|
416
455
|
},
|
|
417
456
|
{
|
|
@@ -421,16 +460,53 @@ export const TYPERT_REMOTE = {
|
|
|
421
460
|
codec: {
|
|
422
461
|
mode: 'strict',
|
|
423
462
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize:rows',
|
|
424
|
-
|
|
463
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_4$schema,
|
|
425
464
|
},
|
|
426
465
|
},
|
|
427
466
|
],
|
|
428
467
|
result: {
|
|
429
468
|
mode: 'strict',
|
|
430
469
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize:result',
|
|
431
|
-
|
|
470
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_result$schema,
|
|
471
|
+
},
|
|
472
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":245,"column":9},
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/retain',
|
|
476
|
+
service: 'terminalController',
|
|
477
|
+
namespace: 'terminal',
|
|
478
|
+
method: 'retain',
|
|
479
|
+
mode: 'stream',
|
|
480
|
+
invocation: { kind: 'direct' },
|
|
481
|
+
parameters: [
|
|
482
|
+
{
|
|
483
|
+
name: 'sessionId',
|
|
484
|
+
wire: 'sessionId',
|
|
485
|
+
source: 'json',
|
|
486
|
+
codec: {
|
|
487
|
+
mode: 'strict',
|
|
488
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
489
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_0$schema,
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
name: 'id',
|
|
494
|
+
wire: 'id',
|
|
495
|
+
source: 'json',
|
|
496
|
+
codec: {
|
|
497
|
+
mode: 'strict',
|
|
498
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
499
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_retain_parameter_1$schema,
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
cancellation: { parameter: 'signal' },
|
|
504
|
+
result: {
|
|
505
|
+
mode: 'strict',
|
|
506
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalRetentionFrame',
|
|
507
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_retain_result$schema,
|
|
432
508
|
},
|
|
433
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
509
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":198,"column":3},
|
|
434
510
|
},
|
|
435
511
|
{
|
|
436
512
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/shells',
|
|
@@ -451,7 +527,7 @@ export const TYPERT_REMOTE = {
|
|
|
451
527
|
codec: {
|
|
452
528
|
mode: 'strict',
|
|
453
529
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
454
|
-
|
|
530
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_shells_parameter_0$schema,
|
|
455
531
|
},
|
|
456
532
|
},
|
|
457
533
|
],
|
|
@@ -459,9 +535,9 @@ export const TYPERT_REMOTE = {
|
|
|
459
535
|
result: {
|
|
460
536
|
mode: 'strict',
|
|
461
537
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/shells:result',
|
|
462
|
-
|
|
538
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_shells_result$schema,
|
|
463
539
|
},
|
|
464
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
540
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":133,"column":3},
|
|
465
541
|
},
|
|
466
542
|
{
|
|
467
543
|
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/write',
|
|
@@ -482,7 +558,7 @@ export const TYPERT_REMOTE = {
|
|
|
482
558
|
codec: {
|
|
483
559
|
mode: 'strict',
|
|
484
560
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
485
|
-
|
|
561
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_0$schema,
|
|
486
562
|
},
|
|
487
563
|
},
|
|
488
564
|
{
|
|
@@ -492,7 +568,7 @@ export const TYPERT_REMOTE = {
|
|
|
492
568
|
codec: {
|
|
493
569
|
mode: 'strict',
|
|
494
570
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
495
|
-
|
|
571
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_1$schema,
|
|
496
572
|
},
|
|
497
573
|
},
|
|
498
574
|
{
|
|
@@ -502,7 +578,7 @@ export const TYPERT_REMOTE = {
|
|
|
502
578
|
codec: {
|
|
503
579
|
mode: 'strict',
|
|
504
580
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalAttachmentId',
|
|
505
|
-
|
|
581
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_2$schema,
|
|
506
582
|
},
|
|
507
583
|
},
|
|
508
584
|
{
|
|
@@ -512,16 +588,16 @@ export const TYPERT_REMOTE = {
|
|
|
512
588
|
codec: {
|
|
513
589
|
mode: 'strict',
|
|
514
590
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/write:data',
|
|
515
|
-
|
|
591
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_3$schema,
|
|
516
592
|
},
|
|
517
593
|
},
|
|
518
594
|
],
|
|
519
595
|
result: {
|
|
520
596
|
mode: 'strict',
|
|
521
597
|
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/write:result',
|
|
522
|
-
|
|
598
|
+
create: _deepseek_ai_dsh_api_terminal_controller_terminal_write_result$schema,
|
|
523
599
|
},
|
|
524
|
-
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":
|
|
600
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":230,"column":9},
|
|
525
601
|
},
|
|
526
602
|
],
|
|
527
603
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Independent content-to-terminal records keep concurrent browser writes disjoint. */
|
|
2
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
3
|
+
import type { WebTerminalId } from '../types.ts';
|
|
4
|
+
/** Saved recovery targets keyed by Session and globally unique terminal content identity. */
|
|
5
|
+
export declare class TerminalBindings {
|
|
6
|
+
private readonly memory;
|
|
7
|
+
/**
|
|
8
|
+
* Read a saved target, retaining this window's value when storage is unavailable.
|
|
9
|
+
* @param sessionId - owning Session.
|
|
10
|
+
* @param contentId - terminal content identity, shared only by deliberate copies.
|
|
11
|
+
* @returns the existing Host identity, if one has been saved.
|
|
12
|
+
*/
|
|
13
|
+
get(sessionId: SessionId, contentId: string): WebTerminalId | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Save an identity before its Host allocation begins.
|
|
16
|
+
* @param sessionId - owning Session.
|
|
17
|
+
* @param contentId - globally unique terminal content identity.
|
|
18
|
+
* @param id - existing or newly allocated Host identity.
|
|
19
|
+
*/
|
|
20
|
+
set(sessionId: SessionId, contentId: string, id: WebTerminalId): void;
|
|
21
|
+
/**
|
|
22
|
+
* Remove this content's target after its close intent has been saved.
|
|
23
|
+
* @param sessionId - owning Session.
|
|
24
|
+
* @param contentId - closing terminal content identity.
|
|
25
|
+
*/
|
|
26
|
+
delete(sessionId: SessionId, contentId: string): void;
|
|
27
|
+
/** Release cached values when the Client service is disposed. */
|
|
28
|
+
clear(): void;
|
|
29
|
+
private key;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=bindings.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const PREFIX = 'dsh.terminal.binding.v1.';
|
|
2
|
+
/** Saved recovery targets keyed by Session and globally unique terminal content identity. */
|
|
3
|
+
export class TerminalBindings {
|
|
4
|
+
memory = new Map();
|
|
5
|
+
/**
|
|
6
|
+
* Read a saved target, retaining this window's value when storage is unavailable.
|
|
7
|
+
* @param sessionId - owning Session.
|
|
8
|
+
* @param contentId - terminal content identity, shared only by deliberate copies.
|
|
9
|
+
* @returns the existing Host identity, if one has been saved.
|
|
10
|
+
*/
|
|
11
|
+
get(sessionId, contentId) {
|
|
12
|
+
const key = this.key(sessionId, contentId);
|
|
13
|
+
const known = this.memory.get(key);
|
|
14
|
+
if (known !== undefined)
|
|
15
|
+
return known;
|
|
16
|
+
if (typeof localStorage === 'undefined')
|
|
17
|
+
return undefined;
|
|
18
|
+
try {
|
|
19
|
+
const raw = localStorage.getItem(key);
|
|
20
|
+
if (raw === null)
|
|
21
|
+
return undefined;
|
|
22
|
+
const value = JSON.parse(raw);
|
|
23
|
+
if (typeof value !== 'string' || !/^[\w-]{1,128}$/u.test(value))
|
|
24
|
+
return undefined;
|
|
25
|
+
this.memory.set(key, value);
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
catch (_storageUnavailable) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Save an identity before its Host allocation begins.
|
|
34
|
+
* @param sessionId - owning Session.
|
|
35
|
+
* @param contentId - globally unique terminal content identity.
|
|
36
|
+
* @param id - existing or newly allocated Host identity.
|
|
37
|
+
*/
|
|
38
|
+
set(sessionId, contentId, id) {
|
|
39
|
+
const key = this.key(sessionId, contentId);
|
|
40
|
+
this.memory.set(key, id);
|
|
41
|
+
if (typeof localStorage === 'undefined')
|
|
42
|
+
return;
|
|
43
|
+
try {
|
|
44
|
+
localStorage.setItem(key, JSON.stringify(id));
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.error('Terminal binding persistence failed:', error);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Remove this content's target after its close intent has been saved.
|
|
52
|
+
* @param sessionId - owning Session.
|
|
53
|
+
* @param contentId - closing terminal content identity.
|
|
54
|
+
*/
|
|
55
|
+
delete(sessionId, contentId) {
|
|
56
|
+
const key = this.key(sessionId, contentId);
|
|
57
|
+
this.memory.delete(key);
|
|
58
|
+
if (typeof localStorage === 'undefined')
|
|
59
|
+
return;
|
|
60
|
+
try {
|
|
61
|
+
localStorage.removeItem(key);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error('Terminal binding cleanup failed:', error);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** Release cached values when the Client service is disposed. */
|
|
68
|
+
clear() { this.memory.clear(); }
|
|
69
|
+
key(sessionId, contentId) { return PREFIX + JSON.stringify([sessionId, contentId]); }
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=bindings.js.map
|
|
@@ -32,6 +32,10 @@ export declare class ClientTerminals extends Service {
|
|
|
32
32
|
private readonly closed;
|
|
33
33
|
private disposed;
|
|
34
34
|
private readonly views;
|
|
35
|
+
private readonly bindings;
|
|
36
|
+
private readonly holds;
|
|
37
|
+
private readonly releasing;
|
|
38
|
+
private openTabs;
|
|
35
39
|
/**
|
|
36
40
|
* @param ctx - Client root Context with Gateway and terminal Remote namespace.
|
|
37
41
|
* @param remote - generated terminal namespace.
|
|
@@ -41,11 +45,12 @@ export declare class ClientTerminals extends Service {
|
|
|
41
45
|
* Return the stable model for one sidebar occurrence.
|
|
42
46
|
* @param sessionId - owning Session.
|
|
43
47
|
* @param key - sidebar occurrence key.
|
|
44
|
-
* @param
|
|
48
|
+
* @param contentId - globally unique content identity; layout-local tab ids are not persistence keys.
|
|
49
|
+
* @param terminalId - existing Host identity when restoring a listed terminal; otherwise reuse the saved content identity.
|
|
45
50
|
* @param shellPath - explicit shell for a new terminal; restored terminals retain their own shell.
|
|
46
51
|
* @returns its observable state and terminal commands.
|
|
47
52
|
*/
|
|
48
|
-
view(sessionId: SessionId, key: string, terminalId?: WebTerminalId, shellPath?: string): TerminalView;
|
|
53
|
+
view(sessionId: SessionId, key: string, contentId: string, terminalId?: WebTerminalId, shellPath?: string): TerminalView;
|
|
49
54
|
/**
|
|
50
55
|
* Discover available launch choices on demand without allocating a PTY.
|
|
51
56
|
* @param sessionId - target Session.
|
|
@@ -62,11 +67,24 @@ export declare class ClientTerminals extends Service {
|
|
|
62
67
|
* Save a close intent and release the tab immediately; cleanup outlives DOM unmount and reload.
|
|
63
68
|
* @param sessionId - owning Session.
|
|
64
69
|
* @param key - sidebar occurrence key, including an inactive restored tab.
|
|
70
|
+
* @param contentId - globally unique content identity whose binding is removed.
|
|
65
71
|
* @param terminalId - restored identity if the tab has no model yet.
|
|
66
72
|
*/
|
|
67
|
-
close(sessionId: SessionId, key: string, terminalId?: WebTerminalId): void;
|
|
73
|
+
close(sessionId: SessionId, key: string, contentId: string, terminalId?: WebTerminalId): void;
|
|
68
74
|
/**
|
|
69
|
-
*
|
|
75
|
+
* Reconcile this window's open terminal occurrences, including dormant saved Sessions.
|
|
76
|
+
* @param tabs - terminal-kind membership supplied by the sidebar layout owner.
|
|
77
|
+
*/
|
|
78
|
+
retainTabs(tabs: readonly {
|
|
79
|
+
sessionId: SessionId;
|
|
80
|
+
tabId: string;
|
|
81
|
+
contentId: string;
|
|
82
|
+
}[]): void;
|
|
83
|
+
private hold;
|
|
84
|
+
private reconcileHolds;
|
|
85
|
+
private release;
|
|
86
|
+
/**
|
|
87
|
+
* Query Host terminals without a live view or unfinished close.
|
|
70
88
|
* @param sessionId - Session being displayed.
|
|
71
89
|
* @returns terminals available for opening as recovered tabs.
|
|
72
90
|
*/
|