dsh-plugin-dshm 0.0.0-stage → 0.1.0
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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +228 -2
- package/README.zh-CN.md +190 -0
- package/cordis.patch.yml +7 -0
- package/lib/auth/signature.d.ts +4 -0
- package/lib/auth/signature.js +24 -0
- package/lib/cli/index.d.ts +4 -0
- package/lib/cli/index.js +41 -0
- package/lib/client.js +419 -0
- package/lib/config.d.ts +10 -0
- package/lib/config.js +27 -0
- package/lib/discovery/advertiser.d.ts +45 -0
- package/lib/discovery/advertiser.js +141 -0
- package/lib/discovery/interfaces.d.ts +5 -0
- package/lib/discovery/interfaces.js +24 -0
- package/lib/errors.d.ts +5 -0
- package/lib/errors.js +10 -0
- package/lib/host/local.d.ts +5 -0
- package/lib/host/local.js +122 -0
- package/lib/host/tailscale.d.ts +43 -0
- package/lib/host/tailscale.js +137 -0
- package/lib/host/types.d.ts +40 -0
- package/lib/host/types.js +1 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.js +98 -0
- package/lib/methods/index.d.ts +9 -0
- package/lib/methods/index.js +206 -0
- package/lib/pairing/state.d.ts +26 -0
- package/lib/pairing/state.js +89 -0
- package/lib/pairing/window.d.ts +18 -0
- package/lib/pairing/window.js +57 -0
- package/lib/projection/client.d.mts +2 -0
- package/lib/projection/client.mjs +11 -0
- package/lib/projection/files.d.ts +33 -0
- package/lib/projection/files.js +278 -0
- package/lib/projection/fold-recording.d.mts +50 -0
- package/lib/projection/fold-recording.mjs +440 -0
- package/lib/projection/host.d.ts +6 -0
- package/lib/projection/host.js +86 -0
- package/lib/projection/ids.d.mts +1 -0
- package/lib/projection/ids.mjs +1 -0
- package/lib/projection/index.d.ts +2 -0
- package/lib/projection/index.js +2 -0
- package/lib/projection/interactions.d.ts +10 -0
- package/lib/projection/interactions.js +73 -0
- package/lib/projection/native.d.ts +114 -0
- package/lib/projection/native.js +903 -0
- package/lib/protocol/THIRD_PARTY_LICENSES.txt +135 -0
- package/lib/protocol/dmp.d.ts +402 -0
- package/lib/protocol/dmp.js +1 -0
- package/lib/protocol/schema/dmp-v1/common.schema.json +88 -0
- package/lib/protocol/schema/dmp-v1/events.schema.json +107 -0
- package/lib/protocol/schema/dmp-v1/frames.schema.json +280 -0
- package/lib/protocol/schema/dmp-v1/methods.schema.json +584 -0
- package/lib/protocol/schema/dmp-v1/models.schema.json +674 -0
- package/lib/protocol/scripts/contract.mjs +8106 -0
- package/lib/push/controller.d.ts +64 -0
- package/lib/push/controller.js +290 -0
- package/lib/push/observer.d.ts +51 -0
- package/lib/push/observer.js +266 -0
- package/lib/push/payload.d.ts +15 -0
- package/lib/push/payload.js +18 -0
- package/lib/push/store.d.ts +17 -0
- package/lib/push/store.js +75 -0
- package/lib/server/index.d.ts +30 -0
- package/lib/server/index.js +500 -0
- package/lib/server/rate-limit.d.ts +7 -0
- package/lib/server/rate-limit.js +19 -0
- package/lib/server/uploads.d.ts +21 -0
- package/lib/server/uploads.js +74 -0
- package/lib/types.d.ts +92 -0
- package/lib/types.js +1 -0
- package/lib/ui/card.d.mts +3 -0
- package/lib/ui/card.mjs +59 -0
- package/lib/ui/copy.d.mts +146 -0
- package/lib/ui/copy.mjs +106 -0
- package/lib/ui/remote-setup.d.mts +81 -0
- package/lib/ui/remote-setup.mjs +75 -0
- package/package.json +67 -4
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { ContentMethod, DmpEvent, DmpObject, ProjectionHost, ProjectionPeer, ProjectionWatch, WatchMethod } from '../types.js';
|
|
2
|
+
interface NativePeer {
|
|
3
|
+
dispose(): Promise<void> | void;
|
|
4
|
+
}
|
|
5
|
+
interface Context {
|
|
6
|
+
permissionPresets: {
|
|
7
|
+
resolve(preset: string): {
|
|
8
|
+
approval: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
connection: {
|
|
12
|
+
createPeer(options: {
|
|
13
|
+
principal: {
|
|
14
|
+
kind: 'owner';
|
|
15
|
+
};
|
|
16
|
+
interactions: 'answer';
|
|
17
|
+
}): NativePeer;
|
|
18
|
+
createSharedFetchHandler(prefix: string): {
|
|
19
|
+
fetch(request: Request, peer: NativePeer): Promise<Response>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
typertGateway: {
|
|
23
|
+
invoke(options: {
|
|
24
|
+
namespace: string;
|
|
25
|
+
method: string;
|
|
26
|
+
args: DmpObject;
|
|
27
|
+
peer: NativePeer;
|
|
28
|
+
signal: AbortSignal;
|
|
29
|
+
}): Promise<unknown>;
|
|
30
|
+
wireStream: {
|
|
31
|
+
open(endpoint: string, payload: {
|
|
32
|
+
args: DmpObject;
|
|
33
|
+
}, uplink: AsyncIterable<never>, peer: NativePeer, signal: AbortSignal): Promise<AsyncIterable<unknown>>;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
on(event: 'dispose', handler: () => void | Promise<void>): void;
|
|
37
|
+
}
|
|
38
|
+
interface Attachment {
|
|
39
|
+
deviceId: string;
|
|
40
|
+
sessionId: string;
|
|
41
|
+
content: DmpObject;
|
|
42
|
+
size: number;
|
|
43
|
+
expires: number;
|
|
44
|
+
sendId?: string;
|
|
45
|
+
}
|
|
46
|
+
interface Diagnostics {
|
|
47
|
+
createdPeers: number;
|
|
48
|
+
disposedPeers: number;
|
|
49
|
+
activePeers: number;
|
|
50
|
+
}
|
|
51
|
+
export declare const inject: string[];
|
|
52
|
+
export declare function onDispose(context: unknown, handler: () => void | Promise<void>): void;
|
|
53
|
+
export declare function createProjectionHost(context: unknown): ProjectionHost & {
|
|
54
|
+
diagnostics(): Diagnostics;
|
|
55
|
+
};
|
|
56
|
+
export declare class LivePeer implements ProjectionPeer {
|
|
57
|
+
private ctx;
|
|
58
|
+
private peer;
|
|
59
|
+
private deviceId;
|
|
60
|
+
private attachments;
|
|
61
|
+
private onDisposed;
|
|
62
|
+
private lifetime;
|
|
63
|
+
private streams;
|
|
64
|
+
private workspaces;
|
|
65
|
+
private nativeSummaries;
|
|
66
|
+
private sessions;
|
|
67
|
+
private deliveries;
|
|
68
|
+
private listListeners;
|
|
69
|
+
private clientId;
|
|
70
|
+
private disposed;
|
|
71
|
+
private archived;
|
|
72
|
+
private pinned;
|
|
73
|
+
private files;
|
|
74
|
+
constructor(ctx: Context, peer: NativePeer, deviceId: string, attachments: Map<string, Attachment>, onDisposed: () => void);
|
|
75
|
+
private rawCall;
|
|
76
|
+
private call;
|
|
77
|
+
private startStream;
|
|
78
|
+
start(): Promise<void>;
|
|
79
|
+
private workspaceFrame;
|
|
80
|
+
private controlFrame;
|
|
81
|
+
private eventFrame;
|
|
82
|
+
private listEmit;
|
|
83
|
+
private workspace;
|
|
84
|
+
private summary;
|
|
85
|
+
private refresh;
|
|
86
|
+
private queueFrom;
|
|
87
|
+
private accept;
|
|
88
|
+
private waitForProjection;
|
|
89
|
+
private expireMissingInteractions;
|
|
90
|
+
private interactionsReady;
|
|
91
|
+
private loadChanges;
|
|
92
|
+
private acceptNative;
|
|
93
|
+
private ensure;
|
|
94
|
+
private window;
|
|
95
|
+
watch(method: WatchMethod, params: DmpObject, emit: (event: DmpEvent) => void, signal: AbortSignal): Promise<ProjectionWatch>;
|
|
96
|
+
private list;
|
|
97
|
+
create(workspaceId: string, sessionId: string, signal: AbortSignal): Promise<{
|
|
98
|
+
sessionId: string;
|
|
99
|
+
}>;
|
|
100
|
+
private model;
|
|
101
|
+
private permissions;
|
|
102
|
+
private job;
|
|
103
|
+
private reconcileJob;
|
|
104
|
+
private watchJobs;
|
|
105
|
+
request(method: string, params: DmpObject, signal: AbortSignal): Promise<DmpObject>;
|
|
106
|
+
private expireAttachments;
|
|
107
|
+
upload(sessionId: string, name: string, mime: string, bytes: Uint8Array, signal: AbortSignal): Promise<{
|
|
108
|
+
attachmentId: string;
|
|
109
|
+
}>;
|
|
110
|
+
private answer;
|
|
111
|
+
content(method: ContentMethod, params: DmpObject, signal: AbortSignal): Promise<Uint8Array>;
|
|
112
|
+
dispose(): Promise<void>;
|
|
113
|
+
}
|
|
114
|
+
export {};
|