dsh-deeppilot 0.9.6 → 0.9.8
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 +119 -18
- package/README.md +13 -11
- package/README.zh-CN.md +8 -7
- package/docs/DSH_RELEASE_MEMORY.md +344 -8
- package/docs/NPM_PUBLISHING.md +26 -0
- package/lib/index.d.ts +87 -3
- package/lib/index.js +443 -0
- package/lib/index.js.map +1 -1
- package/package.json +12 -12
package/docs/NPM_PUBLISHING.md
CHANGED
|
@@ -79,6 +79,32 @@
|
|
|
79
79
|
4. `0.9.5` 已完成首次 OIDC 身份认证发布;npm 绑定显示 `Valid`(有效),
|
|
80
80
|
来源证明签名、压缩包摘要与两个支持宿主的注册表安装核验通过。首次运行的末尾
|
|
81
81
|
核对因缓存失败,其上传步骤成功;发布证据及边界见 `docs/DSH_RELEASE_MEMORY.md`。
|
|
82
|
+
5. `0.9.6` 复现了同一形态:OIDC 上传与来源证明步骤成功,紧随其后的核对步骤在
|
|
83
|
+
12 次重试后仍抛 `读取 npm 发布信息失败(dsh-deeppilot/0.9.6,HTTP 404)`,
|
|
84
|
+
整次运行结论因此为失败。事后核验 `npm view dsh-deeppilot dist-tags --prefer-online`
|
|
85
|
+
得到 `latest = 0.9.6`、发布时间与该版本的来源证明均齐全,确认根因是注册表元数据
|
|
86
|
+
的可见性延迟,不是上传失败。该窗口已在 0.9.7 放宽:最多 24 次核对、间隔 5 秒
|
|
87
|
+
线性递增并封顶 20 秒(约 7 分钟),仍然只读元数据、不重复上传包。这样既避免
|
|
88
|
+
「上传成功 + 核对延迟」在 Actions 页留下误导性的红色结论,也不会把真正的失败
|
|
89
|
+
伪装成成功——超出窗口依旧抛错。
|
|
90
|
+
6. `0.9.7` 是放宽窗口后的第一次发布,也是首次全绿的发布:工作流在附注标签
|
|
91
|
+
`v0.9.7`(提交 `bf18755`)上运行,19 个步骤全部成功,包含此前两次失败的末尾
|
|
92
|
+
核对。发布后核验:注册表 `latest = 0.9.7`、来源证明类型为
|
|
93
|
+
`https://slsa.dev/provenance/v1`;在全新隔离 profile 中从 npm 安装该版本,并在
|
|
94
|
+
真实 `0.2.1-alpha.5` 宿主上启动,`/phone/health` 返回 200 且 `serverVersion`
|
|
95
|
+
为 `0.9.7`。公开 GitHub Release 之前先完成了这一步安装验证。
|
|
96
|
+
7. `0.9.8` 的本地发布清单在**待发布工作树**上执行并通过(详细数字见
|
|
97
|
+
`docs/RELEASE_NOTES-0.9.8.md` 第三节):`npm ci`、单元测试 581 项
|
|
98
|
+
(580 通过、0 失败、1 项既有待办)、类型检查、构建前后 `lib/` 逐文件
|
|
99
|
+
sha256 一致、`check:config-schema`(仍针对锁定的 `0.2.0-rc.2` CLI)、
|
|
100
|
+
helper 的 Go 测试、`bin/SHA256SUMS` 6/6。宿主侧本轮改用
|
|
101
|
+
**`0.2.1-rc.2`**:隔离 `DSH_HOME` 下改动前被拒绝激活(单键 `engines.dsh`
|
|
102
|
+
要求 + `Exact-version exemption: not active`),扩围后组合树含插件与
|
|
103
|
+
web-app 补丁、真实启动出现 4 条 `[deeppilot]`,插件自有端口 3098 的
|
|
104
|
+
`/phone/health` 返回 200 且 `serverVersion` 为 `0.9.8`。打包为 68 个条目。
|
|
105
|
+
本轮还确认了一个易漏点:升版本号必须同步重录
|
|
106
|
+
`tests/apply-baseline.snapshot.json`,否则 `npm test` 会失败——已写入
|
|
107
|
+
`AGENTS.md` 的发布流程第 1 步。
|
|
82
108
|
|
|
83
109
|
## 五、官方资料
|
|
84
110
|
|
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,
|
|
@@ -391,6 +441,28 @@ interface PendingSnapshotPayload {
|
|
|
391
441
|
}
|
|
392
442
|
//#endregion
|
|
393
443
|
//#region src/host-api.d.ts
|
|
444
|
+
interface CommandsApiLike {
|
|
445
|
+
list(req: RpcRequestLike<{
|
|
446
|
+
sessionId: string;
|
|
447
|
+
}>): Promise<RpcResponseLike<CommandCatalog>>;
|
|
448
|
+
execute(req: RpcRequestLike<{
|
|
449
|
+
sessionId: string;
|
|
450
|
+
line: string;
|
|
451
|
+
attachments: CommandAttachment[];
|
|
452
|
+
expectedDefinitionId?: string;
|
|
453
|
+
}>): Promise<RpcResponseLike<CommandExecution>>;
|
|
454
|
+
permissions(req: RpcRequestLike<{
|
|
455
|
+
sessionId: string;
|
|
456
|
+
}>): Promise<RpcResponseLike<PermissionCatalog>>;
|
|
457
|
+
feedback(req: RpcRequestLike<{
|
|
458
|
+
sessionId: string;
|
|
459
|
+
text: string;
|
|
460
|
+
category?: string;
|
|
461
|
+
}>): Promise<RpcResponseLike<void>>;
|
|
462
|
+
export(req: RpcRequestLike<{
|
|
463
|
+
sessionId: string;
|
|
464
|
+
}>, signal: AbortSignal): Promise<Response>;
|
|
465
|
+
}
|
|
394
466
|
interface RpcOk<T> {
|
|
395
467
|
ok: true;
|
|
396
468
|
value: T;
|
|
@@ -441,6 +513,11 @@ interface SessionsApiLike {
|
|
|
441
513
|
models?(req: RpcRequestLike<{
|
|
442
514
|
sessionId: string;
|
|
443
515
|
}>): Promise<RpcResponseLike<HostSessionModels>>;
|
|
516
|
+
skills?(req: RpcRequestLike<{
|
|
517
|
+
sessionId: string;
|
|
518
|
+
}>): Promise<RpcResponseLike<{
|
|
519
|
+
skills: SkillSummary[];
|
|
520
|
+
}>>;
|
|
444
521
|
selectModel?(req: RpcRequestLike<{
|
|
445
522
|
sessionId: string;
|
|
446
523
|
provider: string;
|
|
@@ -729,6 +806,7 @@ interface ApiStreamItemLike {
|
|
|
729
806
|
payload: MuxFrameLike;
|
|
730
807
|
}
|
|
731
808
|
interface ApiProxyLike {
|
|
809
|
+
commands?: CommandsApiLike;
|
|
732
810
|
sessions: SessionsApiLike;
|
|
733
811
|
workspace?: WorkspaceApiLike;
|
|
734
812
|
schedule?: ScheduleApiLike;
|
|
@@ -952,6 +1030,12 @@ declare class HostBridge {
|
|
|
952
1030
|
mediaType?: string;
|
|
953
1031
|
data: string;
|
|
954
1032
|
} | null>;
|
|
1033
|
+
commandOperation(operation: 'list' | 'execute' | 'permissions' | 'feedback', payload: Record<string, unknown>): Promise<SessionManagementResult<unknown>>;
|
|
1034
|
+
exportSession(sessionId: string, signal: AbortSignal): Promise<Response>;
|
|
1035
|
+
/** 由会话目录决定技能可见性;不读取正文,也不把本机路径发给移动端。 */
|
|
1036
|
+
sessionSkills(sessionId: string): Promise<SessionManagementResult<{
|
|
1037
|
+
skills: SkillSummary[];
|
|
1038
|
+
}>>;
|
|
955
1039
|
sessionModels(sessionId: string): Promise<ModelBridgeResult<HostSessionModels>>;
|
|
956
1040
|
selectSessionModel(sessionId: string, selection: HostModelSelection): Promise<ModelBridgeResult<HostModelSelection>>;
|
|
957
1041
|
renameSession(sessionId: string, title: string): Promise<SessionManagementResult<string>>;
|