dsh-deeppilot 0.9.7 → 0.9.9
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/COMPATIBILITY.md +74 -9
- package/README.md +33 -12
- package/README.zh-CN.md +21 -7
- package/bin/SHA256SUMS +6 -6
- package/bin/darwin-amd64/dsh-deeppilot-tunnel +0 -0
- package/bin/darwin-arm64/dsh-deeppilot-tunnel +0 -0
- package/bin/linux-amd64/dsh-deeppilot-tunnel +0 -0
- package/bin/linux-arm64/dsh-deeppilot-tunnel +0 -0
- package/bin/windows-amd64/dsh-deeppilot-tunnel.exe +0 -0
- package/bin/windows-arm64/dsh-deeppilot-tunnel.exe +0 -0
- package/docs/DSH_RELEASE_MEMORY.md +157 -8
- package/docs/NPM_PUBLISHING.md +29 -0
- package/lib/client.js +152 -4
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +90 -3
- package/lib/index.js +1077 -48
- package/lib/index.js.map +1 -1
- package/package.json +12 -12
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import z from "@deepseek-ai/schemastery";
|
|
2
2
|
import { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
//#region src/device-auth.d.ts
|
|
4
|
+
declare const DEVICE_SCOPES: readonly ['sessions.read', 'prompt.send', 'sessions.manage', 'interactions.respond', 'notifications.register', 'schedule.manage'];
|
|
5
|
+
type DeviceScope = (typeof DEVICE_SCOPES)[number];
|
|
6
|
+
//#endregion
|
|
3
7
|
//#region src/wire-errors.d.ts
|
|
4
8
|
/**
|
|
5
9
|
* 错误词表(error vocabulary)的唯一属主。
|
|
@@ -198,12 +202,50 @@ type MutationDispatchResult<T> = {
|
|
|
198
202
|
replayed?: boolean;
|
|
199
203
|
};
|
|
200
204
|
//#endregion
|
|
201
|
-
//#region src/
|
|
202
|
-
|
|
203
|
-
|
|
205
|
+
//#region src/command-api.d.ts
|
|
206
|
+
interface CommandSummary {
|
|
207
|
+
name: string;
|
|
208
|
+
description: string;
|
|
209
|
+
definitionId?: string;
|
|
210
|
+
input?: {
|
|
211
|
+
hint: string;
|
|
212
|
+
attachments?: boolean;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
interface CommandCatalog {
|
|
216
|
+
commands: CommandSummary[];
|
|
217
|
+
permissions: boolean;
|
|
218
|
+
export: boolean;
|
|
219
|
+
}
|
|
220
|
+
interface CommandExecution {
|
|
221
|
+
commandId: string;
|
|
222
|
+
result: {
|
|
223
|
+
kind: 'success' | 'error';
|
|
224
|
+
text?: string;
|
|
225
|
+
sourceEventSeq?: number;
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
interface CommandAttachment {
|
|
229
|
+
type: 'image' | 'document';
|
|
230
|
+
name: string;
|
|
231
|
+
mediaType: string;
|
|
232
|
+
data: string;
|
|
233
|
+
}
|
|
234
|
+
interface PermissionOption {
|
|
235
|
+
value: string;
|
|
236
|
+
name: string;
|
|
237
|
+
description?: string;
|
|
238
|
+
confirmation: boolean;
|
|
239
|
+
}
|
|
240
|
+
interface PermissionCatalog {
|
|
241
|
+
options: PermissionOption[];
|
|
242
|
+
currentValue?: string;
|
|
243
|
+
}
|
|
204
244
|
//#endregion
|
|
205
245
|
//#region src/protocol.d.ts
|
|
206
246
|
interface WelcomeCapabilities {
|
|
247
|
+
/** 会话命令目录、执行、权限与原生日志导出入口。缺省不支持。 */
|
|
248
|
+
commands?: boolean;
|
|
207
249
|
historyPaging: boolean;
|
|
208
250
|
replay: boolean;
|
|
209
251
|
approvals: boolean;
|
|
@@ -214,6 +256,8 @@ interface WelcomeCapabilities {
|
|
|
214
256
|
/** Bridge emits s2c.notify for all four notification categories. */
|
|
215
257
|
notifyAllCategories?: boolean;
|
|
216
258
|
models: boolean;
|
|
259
|
+
/** Session-scoped user-invocable skill metadata and invalidation notices. */
|
|
260
|
+
skills?: boolean;
|
|
217
261
|
sessionManagement: boolean;
|
|
218
262
|
/** Bridge can fork a session at an exact event boundary. */
|
|
219
263
|
sessionFork?: boolean;
|
|
@@ -348,6 +392,12 @@ interface MessageProjection {
|
|
|
348
392
|
ts: number;
|
|
349
393
|
truncated?: boolean;
|
|
350
394
|
}
|
|
395
|
+
/** Metadata only: loading instructions remains the Host's responsibility. */
|
|
396
|
+
interface SkillSummary {
|
|
397
|
+
name: string;
|
|
398
|
+
description: string;
|
|
399
|
+
modelInvocable: boolean;
|
|
400
|
+
}
|
|
351
401
|
type NotifyCategory = 'turn.completed' | 'approval.required' | 'question.asked' | 'session.error';
|
|
352
402
|
/**
|
|
353
403
|
* One offline-push-worthy event (same facts as s2c.notify / pending frames,
|
|
@@ -361,6 +411,9 @@ interface PushNotification {
|
|
|
361
411
|
sessionId: string;
|
|
362
412
|
title: string;
|
|
363
413
|
body: string;
|
|
414
|
+
/** Same optional approval-only fields as NotifyPayload; dropped in `generic` content mode. */
|
|
415
|
+
toolName?: string;
|
|
416
|
+
detail?: string;
|
|
364
417
|
}
|
|
365
418
|
interface PendingApprovalPayload {
|
|
366
419
|
requestId: string;
|
|
@@ -391,6 +444,28 @@ interface PendingSnapshotPayload {
|
|
|
391
444
|
}
|
|
392
445
|
//#endregion
|
|
393
446
|
//#region src/host-api.d.ts
|
|
447
|
+
interface CommandsApiLike {
|
|
448
|
+
list(req: RpcRequestLike<{
|
|
449
|
+
sessionId: string;
|
|
450
|
+
}>): Promise<RpcResponseLike<CommandCatalog>>;
|
|
451
|
+
execute(req: RpcRequestLike<{
|
|
452
|
+
sessionId: string;
|
|
453
|
+
line: string;
|
|
454
|
+
attachments: CommandAttachment[];
|
|
455
|
+
expectedDefinitionId?: string;
|
|
456
|
+
}>): Promise<RpcResponseLike<CommandExecution>>;
|
|
457
|
+
permissions(req: RpcRequestLike<{
|
|
458
|
+
sessionId: string;
|
|
459
|
+
}>): Promise<RpcResponseLike<PermissionCatalog>>;
|
|
460
|
+
feedback(req: RpcRequestLike<{
|
|
461
|
+
sessionId: string;
|
|
462
|
+
text: string;
|
|
463
|
+
category?: string;
|
|
464
|
+
}>): Promise<RpcResponseLike<void>>;
|
|
465
|
+
export(req: RpcRequestLike<{
|
|
466
|
+
sessionId: string;
|
|
467
|
+
}>, signal: AbortSignal): Promise<Response>;
|
|
468
|
+
}
|
|
394
469
|
interface RpcOk<T> {
|
|
395
470
|
ok: true;
|
|
396
471
|
value: T;
|
|
@@ -441,6 +516,11 @@ interface SessionsApiLike {
|
|
|
441
516
|
models?(req: RpcRequestLike<{
|
|
442
517
|
sessionId: string;
|
|
443
518
|
}>): Promise<RpcResponseLike<HostSessionModels>>;
|
|
519
|
+
skills?(req: RpcRequestLike<{
|
|
520
|
+
sessionId: string;
|
|
521
|
+
}>): Promise<RpcResponseLike<{
|
|
522
|
+
skills: SkillSummary[];
|
|
523
|
+
}>>;
|
|
444
524
|
selectModel?(req: RpcRequestLike<{
|
|
445
525
|
sessionId: string;
|
|
446
526
|
provider: string;
|
|
@@ -729,6 +809,7 @@ interface ApiStreamItemLike {
|
|
|
729
809
|
payload: MuxFrameLike;
|
|
730
810
|
}
|
|
731
811
|
interface ApiProxyLike {
|
|
812
|
+
commands?: CommandsApiLike;
|
|
732
813
|
sessions: SessionsApiLike;
|
|
733
814
|
workspace?: WorkspaceApiLike;
|
|
734
815
|
schedule?: ScheduleApiLike;
|
|
@@ -952,6 +1033,12 @@ declare class HostBridge {
|
|
|
952
1033
|
mediaType?: string;
|
|
953
1034
|
data: string;
|
|
954
1035
|
} | null>;
|
|
1036
|
+
commandOperation(operation: 'list' | 'execute' | 'permissions' | 'feedback', payload: Record<string, unknown>): Promise<SessionManagementResult<unknown>>;
|
|
1037
|
+
exportSession(sessionId: string, signal: AbortSignal): Promise<Response>;
|
|
1038
|
+
/** 由会话目录决定技能可见性;不读取正文,也不把本机路径发给移动端。 */
|
|
1039
|
+
sessionSkills(sessionId: string): Promise<SessionManagementResult<{
|
|
1040
|
+
skills: SkillSummary[];
|
|
1041
|
+
}>>;
|
|
955
1042
|
sessionModels(sessionId: string): Promise<ModelBridgeResult<HostSessionModels>>;
|
|
956
1043
|
selectSessionModel(sessionId: string, selection: HostModelSelection): Promise<ModelBridgeResult<HostModelSelection>>;
|
|
957
1044
|
renameSession(sessionId: string, title: string): Promise<SessionManagementResult<string>>;
|