@gatherthread/dsh-host 0.1.0-alpha.3 → 0.1.0-alpha.5
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.md +1 -1
- package/bundle/manifest.json +1 -1
- package/dist/bundle/native-plugin.js +15 -2
- package/dist/bundle/plugin.js +15 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ The package does not install a DSH runtime dependency.
|
|
|
19
19
|
After `@gatherthread/dsh-host` is published, the ordinary three-step path is:
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
|
-
npx @deepseek-ai/dsh@0.1.2-rc.1 plugin --profile web add @gatherthread/dsh-host@0.1.0-alpha.
|
|
22
|
+
npx @deepseek-ai/dsh@0.1.2-rc.1 plugin --profile web add @gatherthread/dsh-host@0.1.0-alpha.5
|
|
23
23
|
npx @deepseek-ai/dsh@0.1.2-rc.1 web
|
|
24
24
|
# In DSH: Settings -> GatherThread / 共序 -> Sign in and pair
|
|
25
25
|
```
|
package/bundle/manifest.json
CHANGED
|
@@ -191,10 +191,10 @@ var HttpCollaborationClient = class {
|
|
|
191
191
|
const body = requiredObject(await this.#request(`/snapshot-requests/${encodeURIComponent(requestId)}`));
|
|
192
192
|
return fromWireSnapshotRequest(body.snapshot_request ?? body);
|
|
193
193
|
}
|
|
194
|
-
async createSnapshotRequest(sessionId) {
|
|
194
|
+
async createSnapshotRequest(sessionId, kind = "immutable", targetRuntimeId) {
|
|
195
195
|
const body = requiredObject(await this.#request(`/sessions/${encodeURIComponent(sessionId)}/snapshot-requests`, {
|
|
196
196
|
method: "POST",
|
|
197
|
-
body:
|
|
197
|
+
body: JSON.stringify({ kind, ...targetRuntimeId === void 0 ? {} : { target_runtime_id: targetRuntimeId } })
|
|
198
198
|
}));
|
|
199
199
|
return fromWireSnapshotRequest(body.snapshot_request ?? body);
|
|
200
200
|
}
|
|
@@ -312,9 +312,22 @@ function fromWireSnapshotRequest(value) {
|
|
|
312
312
|
message: requiredString(failureInput.message, "snapshot_request.failure.message")
|
|
313
313
|
} : void 0;
|
|
314
314
|
const createdAt = optionalWireString(input.created_at) ?? optionalWireString(input.requested_at);
|
|
315
|
+
const kind = requiredString(input.kind, "snapshot_request.kind");
|
|
316
|
+
if (![
|
|
317
|
+
"immutable",
|
|
318
|
+
"visible_history_replace",
|
|
319
|
+
"local_sync_status",
|
|
320
|
+
"local_auto_upload_enable",
|
|
321
|
+
"local_auto_upload_disable",
|
|
322
|
+
"local_turn_upload"
|
|
323
|
+
].includes(kind)) {
|
|
324
|
+
throw new Error("Collaboration API returned an invalid snapshot request kind");
|
|
325
|
+
}
|
|
315
326
|
return {
|
|
316
327
|
id: requiredString(input.id, "snapshot_request.id"),
|
|
317
328
|
sessionId: requiredString(input.session_id, "snapshot_request.session_id"),
|
|
329
|
+
kind,
|
|
330
|
+
...typeof input.target_runtime_id === "string" ? { targetRuntimeId: input.target_runtime_id } : {},
|
|
318
331
|
throughSequence: requiredNumber(input.through_sequence, "snapshot_request.through_sequence"),
|
|
319
332
|
status,
|
|
320
333
|
...createdAt === void 0 ? {} : { createdAt },
|
package/dist/bundle/plugin.js
CHANGED
|
@@ -512,10 +512,10 @@ var HttpCollaborationClient = class {
|
|
|
512
512
|
const body = requiredObject2(await this.#request(`/snapshot-requests/${encodeURIComponent(requestId)}`));
|
|
513
513
|
return fromWireSnapshotRequest(body.snapshot_request ?? body);
|
|
514
514
|
}
|
|
515
|
-
async createSnapshotRequest(sessionId) {
|
|
515
|
+
async createSnapshotRequest(sessionId, kind = "immutable", targetRuntimeId) {
|
|
516
516
|
const body = requiredObject2(await this.#request(`/sessions/${encodeURIComponent(sessionId)}/snapshot-requests`, {
|
|
517
517
|
method: "POST",
|
|
518
|
-
body:
|
|
518
|
+
body: JSON.stringify({ kind, ...targetRuntimeId === void 0 ? {} : { target_runtime_id: targetRuntimeId } })
|
|
519
519
|
}));
|
|
520
520
|
return fromWireSnapshotRequest(body.snapshot_request ?? body);
|
|
521
521
|
}
|
|
@@ -633,9 +633,22 @@ function fromWireSnapshotRequest(value) {
|
|
|
633
633
|
message: requiredString2(failureInput.message, "snapshot_request.failure.message")
|
|
634
634
|
} : void 0;
|
|
635
635
|
const createdAt = optionalWireString(input.created_at) ?? optionalWireString(input.requested_at);
|
|
636
|
+
const kind = requiredString2(input.kind, "snapshot_request.kind");
|
|
637
|
+
if (![
|
|
638
|
+
"immutable",
|
|
639
|
+
"visible_history_replace",
|
|
640
|
+
"local_sync_status",
|
|
641
|
+
"local_auto_upload_enable",
|
|
642
|
+
"local_auto_upload_disable",
|
|
643
|
+
"local_turn_upload"
|
|
644
|
+
].includes(kind)) {
|
|
645
|
+
throw new Error("Collaboration API returned an invalid snapshot request kind");
|
|
646
|
+
}
|
|
636
647
|
return {
|
|
637
648
|
id: requiredString2(input.id, "snapshot_request.id"),
|
|
638
649
|
sessionId: requiredString2(input.session_id, "snapshot_request.session_id"),
|
|
650
|
+
kind,
|
|
651
|
+
...typeof input.target_runtime_id === "string" ? { targetRuntimeId: input.target_runtime_id } : {},
|
|
639
652
|
throughSequence: requiredNumber(input.through_sequence, "snapshot_request.through_sequence"),
|
|
640
653
|
status,
|
|
641
654
|
...createdAt === void 0 ? {} : { createdAt },
|