@artenx/dshb 0.1.34 → 0.1.36
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/lib/client.js +34 -3
- package/lib/client.js.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/routes.d.ts +1 -1
- package/lib/core/sync/coordinator.d.ts +16 -5
- package/lib/core/sync/coordinator.js +108 -37
- package/lib/core/sync/coordinator.js.map +1 -1
- package/lib/core/sync/host-key.d.ts +1 -1
- package/lib/core/sync/internal-routes.d.ts +3 -3
- package/lib/core/sync/internal-routes.js +1 -1
- package/lib/core/sync/model.d.ts +1 -1
- package/lib/core/sync/model.js.map +1 -1
- package/lib/core/sync/node-sync.d.ts +1 -1
- package/lib/core/sync/offline-archive.d.ts +3 -3
- package/lib/core/sync/offline-archive.js +1 -1
- package/lib/core/sync/offline-routes.js +1 -1
- package/lib/core/sync/peer-manager.d.ts +2 -2
- package/lib/core/sync/peer-manager.js +18 -5
- package/lib/core/sync/peer-manager.js.map +1 -1
- package/lib/core/sync/routes.d.ts +1 -1
- package/lib/core/sync/routes.js +19 -0
- package/lib/core/sync/routes.js.map +1 -1
- package/lib/core/sync/session-journal.d.ts +1 -1
- package/lib/core/sync/session-journal.js +16 -0
- package/lib/core/sync/session-journal.js.map +1 -1
- package/lib/core/sync/session-routes.d.ts +1 -1
- package/lib/core/sync/session-routes.js +1 -1
- package/lib/core/sync/session-sync.d.ts +1 -1
- package/lib/core/sync/session-sync.js +1 -1
- package/lib/core/sync/ssh-transport.d.ts +1 -1
- package/lib/core/sync/ssh-transport.js +29 -2
- package/lib/core/sync/ssh-transport.js.map +1 -1
- package/lib/core/sync/stores.d.ts +1 -1
- package/lib/core/sync/stores.js +1 -1
- package/lib/core/sync/stores.js.map +1 -1
- package/lib/core/workspaces.d.ts +1 -1
- package/lib/{host-key-C5afhAUd.d.ts → host-key-CSnpIrjq.d.ts} +2 -2
- package/lib/{model-BP7Gw1yk.d.ts → model-CKTBf-Pl.d.ts} +2 -2
- package/lib/{node-sync-3Z9QLz2n.d.ts → node-sync-C3Ym-HDu.d.ts} +3 -3
- package/lib/{session-journal-pgPqcWn9.d.ts → session-journal-VE_1tA2-.d.ts} +8 -2
- package/lib/{session-sync-CIqjuWkh.js → session-sync-DLr_BdvN.js} +15 -1
- package/lib/{session-sync-CIqjuWkh.js.map → session-sync-DLr_BdvN.js.map} +1 -1
- package/lib/{session-sync-BuOJvFxK.d.ts → session-sync-DrKShc5c.d.ts} +11 -5
- package/lib/{ssh-transport-C7povM0s.d.ts → ssh-transport-BxPWfu9X.d.ts} +13 -6
- package/lib/{stores-CKyEt0yk.d.ts → stores-puyTC075.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { o as NodeRegistry } from "./node-registry-BTnnM5-k.js";
|
|
2
2
|
import { r as WorkspaceBindingsStore } from "./workspace-bindings-CsB0TIJB.js";
|
|
3
3
|
import { r as SyncRevision } from "./revision-C9sOlDZ6.js";
|
|
4
|
-
import { d as SyncSessionArchive, i as SyncOrigin, l as SyncRecordMetadata, r as SyncImportMethod } from "./model-
|
|
5
|
-
import { n as SyncStateStore } from "./stores-
|
|
6
|
-
import { s as SyncNodeService } from "./node-sync-
|
|
4
|
+
import { d as SyncSessionArchive, i as SyncOrigin, l as SyncRecordMetadata, r as SyncImportMethod } from "./model-CKTBf-Pl.js";
|
|
5
|
+
import { n as SyncStateStore } from "./stores-puyTC075.js";
|
|
6
|
+
import { s as SyncNodeService } from "./node-sync-C3Ym-HDu.js";
|
|
7
7
|
import { S as BrandedNumber, _ as FileAttachmentRef, a as SystemPromptUpdate, b as TypertResource, c as ToolSchema, d as Message, f as SystemMessage, g as ToolCallId, i as LlmFailure, l as AssistantMessage, m as UserMessage, n as LlmCallConfig, o as TokenUsage, p as ToolResultMessage, r as LlmCallConfigAdapterDefaults, s as ToolHistory, t as AssistantStreamRecord, u as DeveloperMessage, v as ImageAttachmentRef, x as Branded, y as TypertLookup } from "./index-VF8bcBeX.js";
|
|
8
8
|
import { a as SessionInstructionSnapshotStore } from "./workspace-instructions-DirYYiku.js";
|
|
9
|
-
import { t as SyncSessionJournalStore } from "./session-journal-
|
|
9
|
+
import { t as SyncSessionJournalStore } from "./session-journal-VE_1tA2-.js";
|
|
10
10
|
import { Context, Service } from "@deepseek-ai/cordis";
|
|
11
11
|
//#region ../../node_modules/@deepseek-ai/dsh-scope/lib/types/index.d.ts
|
|
12
12
|
declare const ScopedBrand: unique symbol;
|
|
@@ -1314,6 +1314,12 @@ declare class SyncSessionService {
|
|
|
1314
1314
|
applyBundle(value: unknown, sourceName: string, peerId?: string, options?: SyncSessionApplyOptions): Promise<SyncSessionApplyResult>;
|
|
1315
1315
|
preflightBundle(value: unknown, options?: SyncSessionApplyOptions): void;
|
|
1316
1316
|
pendingPeerIds(): string[];
|
|
1317
|
+
/**
|
|
1318
|
+
* 丢弃指定对端的全部未完成 journal 批次(含正在应用中的当前批)。
|
|
1319
|
+
* 手动停止同步时调用:未应用的条目不再落地,重启后也不会回放;
|
|
1320
|
+
* 已应用完成的条目不受影响。
|
|
1321
|
+
*/
|
|
1322
|
+
discardPendingBatches(peerId: string): number;
|
|
1317
1323
|
recoverPending(): Promise<void>;
|
|
1318
1324
|
cleanupOrphanedStaging(): void;
|
|
1319
1325
|
listArchives(): SyncSessionArchive[];
|
|
@@ -1363,4 +1369,4 @@ declare class SyncSessionService {
|
|
|
1363
1369
|
}
|
|
1364
1370
|
//#endregion
|
|
1365
1371
|
export { sessionEventListDigest as C, validateSyncSessionManifest as D, validateSyncSessionBundle as E, planSessionTransfers as S, validateObjectPayload as T, SyncSessionWorkspace as _, SyncSessionBundle as a, makeSyncSessionBundle as b, SyncSessionEventDelta as c, SyncSessionManifest as d, SyncSessionManifestEntry as f, SyncSessionTransferPlan as g, SyncSessionService as h, SyncSessionApplyResult as i, SyncSessionEventPrefix as l, SyncSessionObjectInbox as m, SyncObjectInboxWriter as n, SyncSessionEntry as o, SyncSessionObject as p, SyncSessionApplyOptions as r, SyncSessionError as s, ExportObjectCache as t, SyncSessionInstructionSnapshot as u, WorkspaceRegistryLike as v, syncSessionEntryKey as w, makeSyncSessionManifest as x, estimateJsonBytes as y };
|
|
1366
|
-
//# sourceMappingURL=session-sync-
|
|
1372
|
+
//# sourceMappingURL=session-sync-DrKShc5c.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as SyncPeer } from "./model-
|
|
2
|
-
import { i as SyncNodeManifest, t as SyncNodeApplyResult } from "./node-sync-
|
|
1
|
+
import { a as SyncPeer } from "./model-CKTBf-Pl.js";
|
|
2
|
+
import { i as SyncNodeManifest, t as SyncNodeApplyResult } from "./node-sync-C3Ym-HDu.js";
|
|
3
3
|
import { SyncPeerManager, SyncPeerSecrets } from "./core/sync/peer-manager.js";
|
|
4
|
-
import { r as SyncHostKeyChallenges, t as SyncHostKeyChallengeError } from "./host-key-
|
|
4
|
+
import { r as SyncHostKeyChallenges, t as SyncHostKeyChallengeError } from "./host-key-CSnpIrjq.js";
|
|
5
5
|
import { d as SyncFrame } from "./protocol-DJ0zyVlB.js";
|
|
6
|
-
import { a as SyncSessionBundle, d as SyncSessionManifest, i as SyncSessionApplyResult, l as SyncSessionEventPrefix, p as SyncSessionObject } from "./session-sync-
|
|
6
|
+
import { a as SyncSessionBundle, d as SyncSessionManifest, i as SyncSessionApplyResult, l as SyncSessionEventPrefix, p as SyncSessionObject } from "./session-sync-DrKShc5c.js";
|
|
7
7
|
import { Client, ClientChannel, ConnectConfig } from "ssh2";
|
|
8
8
|
//#region src/core/sync/ssh-transport.d.ts
|
|
9
9
|
type SyncSshErrorCategory = 'auth' | 'network' | 'hostkey' | 'timeout' | 'helper' | 'protocol';
|
|
@@ -25,6 +25,7 @@ interface SyncRemoteNodeManifest extends SyncNodeManifest {
|
|
|
25
25
|
declare class SyncSshSession {
|
|
26
26
|
private readonly client;
|
|
27
27
|
private readonly channel;
|
|
28
|
+
private readonly onClosed?;
|
|
28
29
|
private readonly decoder;
|
|
29
30
|
private readonly closeSignal;
|
|
30
31
|
private reading;
|
|
@@ -32,7 +33,7 @@ declare class SyncSshSession {
|
|
|
32
33
|
private inputEnded;
|
|
33
34
|
private nextDataSequence;
|
|
34
35
|
private pendingError;
|
|
35
|
-
constructor(client: Client, channel: ClientChannel);
|
|
36
|
+
constructor(client: Client, channel: ClientChannel, onClosed?: (() => void) | undefined);
|
|
36
37
|
sendControl(value: Record<string, unknown>): Promise<void>;
|
|
37
38
|
sendData(sequence: number, data: Buffer): Promise<void>;
|
|
38
39
|
endInput(): void;
|
|
@@ -44,7 +45,13 @@ declare function buildSyncSshConnectConfig(peer: SyncPeer, secrets: SyncPeerSecr
|
|
|
44
45
|
declare class SyncSshTransport {
|
|
45
46
|
private readonly peerManager;
|
|
46
47
|
private readonly hostKeyChallenges;
|
|
48
|
+
/** 每对端当前打开的 SSH 会话:手动停止同步时立即关闭通道,等待中的 readFrames 随即返回。 */
|
|
49
|
+
private readonly openSessions;
|
|
47
50
|
constructor(peerManager: SyncPeerManager);
|
|
51
|
+
private trackSession;
|
|
52
|
+
private untrackSession;
|
|
53
|
+
/** 立即关闭该对端的全部活跃 SSH 会话(幂等;用于手动停止同步)。 */
|
|
54
|
+
stopActiveSessions(peerId: string): number;
|
|
48
55
|
probe(peerId: string): Promise<SyncRemoteHandshake>;
|
|
49
56
|
openSession(peerId: string): Promise<{
|
|
50
57
|
peer: SyncPeer;
|
|
@@ -112,4 +119,4 @@ declare class SyncRemoteProbe {
|
|
|
112
119
|
}
|
|
113
120
|
//#endregion
|
|
114
121
|
export { parseRemoteProbeOutput as _, SyncRemoteProbe as a, SyncRemoteProbeProfile as c, SyncSshErrorCategory as d, SyncSshProbeError as f, buildSyncSshConnectConfig as g, buildRemoteProbeScript as h, SyncRemoteNodeManifest as i, SyncRemoteProbeResult as l, SyncSshTransport as m, REMOTE_PROBE_END_MARKER as n, SyncRemoteProbeDraft as o, SyncSshSession as p, SyncRemoteHandshake as r, SyncRemoteProbeHandshake as s, REMOTE_PROBE_BEGIN_MARKER as t, SyncSessionDeltaPrefixError as u };
|
|
115
|
-
//# sourceMappingURL=ssh-transport-
|
|
122
|
+
//# sourceMappingURL=ssh-transport-BxPWfu9X.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as SyncRevision } from "./revision-C9sOlDZ6.js";
|
|
2
|
-
import { a as SyncPeer, f as SyncState, o as SyncPeerDraft } from "./model-
|
|
2
|
+
import { a as SyncPeer, f as SyncState, o as SyncPeerDraft } from "./model-CKTBf-Pl.js";
|
|
3
3
|
//#region src/core/sync/stores.d.ts
|
|
4
4
|
declare function getOrCreateSyncInstanceId(home?: string): string;
|
|
5
5
|
declare class SyncPeerStore {
|
|
@@ -28,4 +28,4 @@ declare class SyncStateStore {
|
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
export { SyncStateStore as n, getOrCreateSyncInstanceId as r, SyncPeerStore as t };
|
|
31
|
-
//# sourceMappingURL=stores-
|
|
31
|
+
//# sourceMappingURL=stores-puyTC075.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artenx/dshb",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "Routes DSH filesystem, shell, subprocess, and PTY operations to local, SSH, and Docker execution nodes, with a node registry, an authentication gate, a mobile-aware management UI, and per-workspace custom project instructions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|