memeloop 0.1.3 → 0.2.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/dist/browser.d.cts +14 -14
- package/dist/browser.d.ts +14 -14
- package/dist/{chunk-5JEV7632.js → chunk-5VYZV33O.js} +2 -1
- package/dist/{chunk-5JEV7632.js.map → chunk-5VYZV33O.js.map} +1 -1
- package/dist/chunk-ECNKBH5A.js +1235 -0
- package/dist/chunk-ECNKBH5A.js.map +1 -0
- package/dist/{chunk-MRKY4HGF.js → chunk-EPHRIRAL.js} +20 -11
- package/dist/chunk-EPHRIRAL.js.map +1 -0
- package/dist/{chunk-P6L3444O.js → chunk-KV6TC5UJ.js} +2 -2
- package/dist/chunk-MXRXYGWW.js +1 -0
- package/dist/conversation.d.cts +3 -3
- package/dist/conversation.d.ts +3 -3
- package/dist/device-network-portable.cjs +757 -144
- package/dist/device-network-portable.cjs.map +1 -1
- package/dist/device-network-portable.d.cts +24 -14
- package/dist/device-network-portable.d.ts +24 -14
- package/dist/device-network-portable.js +18 -2
- package/dist/device-network.cjs +776 -154
- package/dist/device-network.cjs.map +1 -1
- package/dist/device-network.d.cts +5 -5
- package/dist/device-network.d.ts +5 -5
- package/dist/device-network.js +19 -3
- package/dist/{fetchProvider-WWnWnQFP.d.ts → fetchProvider-BhqRqi5-.d.ts} +1 -1
- package/dist/{fetchProvider-toTHy5Nu.d.cts → fetchProvider-HJ_FkORN.d.cts} +1 -1
- package/dist/index.cjs +782 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +24 -6
- package/dist/index.js.map +1 -1
- package/dist/{interface-IrKBFtL1.d.ts → interface-3C3eG8Hn.d.cts} +13 -1
- package/dist/{interface-IrKBFtL1.d.cts → interface-3C3eG8Hn.d.ts} +13 -1
- package/dist/llm-providers.d.cts +2 -2
- package/dist/llm-providers.d.ts +2 -2
- package/dist/loop-api.cjs +1 -0
- package/dist/loop-api.cjs.map +1 -1
- package/dist/loop-api.d.cts +7 -7
- package/dist/loop-api.d.ts +7 -7
- package/dist/loop-api.js +2 -2
- package/dist/mobile.d.cts +5 -5
- package/dist/mobile.d.ts +5 -5
- package/dist/{orchestration-portable-BHB_YrNN.d.ts → orchestration-portable-BbkwLbC9.d.ts} +4 -4
- package/dist/{orchestration-portable-mvYBvGBb.d.cts → orchestration-portable-DNKzAtNq.d.cts} +4 -4
- package/dist/orchestration-portable.d.cts +5 -5
- package/dist/orchestration-portable.d.ts +5 -5
- package/dist/pairingInvite-DDx_-IAp.d.cts +271 -0
- package/dist/pairingInvite-Dkz8CLsb.d.ts +271 -0
- package/dist/{promptConcat-0WNFTg4l.d.ts → promptConcat-CUEIA_3T.d.ts} +3 -3
- package/dist/{promptConcat-D6wr5V-V.d.cts → promptConcat-VLe5SEN4.d.cts} +3 -3
- package/dist/{providerRegistry-CPsktuiX.d.cts → providerRegistry-BDGGs5gz.d.cts} +2 -2
- package/dist/{providerRegistry-Bi6pAvSj.d.ts → providerRegistry-CaFK_aUd.d.ts} +2 -2
- package/dist/{registry-D0kbxksn.d.cts → registry-DNSEVYug.d.cts} +3 -3
- package/dist/{registry-DDbvhlhs.d.ts → registry-yGnYHWhq.d.ts} +3 -3
- package/dist/{remoteClient-CBggnRy3.d.cts → remoteClient-BKmQEQY9.d.cts} +1 -1
- package/dist/{remoteClient-B_spK019.d.ts → remoteClient-D5hco6cS.d.ts} +1 -1
- package/dist/{runtime-UONPTAYK.js → runtime-6EELHWVB.js} +2 -2
- package/dist/{scriptDeploymentPipeline-CXJcC82H.d.ts → scriptDeploymentPipeline-B1q-UhrO.d.ts} +1 -1
- package/dist/{scriptDeploymentPipeline-yG1ZhVVI.d.cts → scriptDeploymentPipeline-XJzQyYys.d.cts} +1 -1
- package/dist/{syncCloudDevices-Ds_Kcgrv.d.cts → syncCloudDevices-BFw_c1g5.d.cts} +6 -5
- package/dist/{syncCloudDevices-BEqwgrhD.d.ts → syncCloudDevices-C8fCUhnX.d.ts} +6 -5
- package/dist/{types-CdFVSntj.d.ts → types-C8gnhG9M.d.cts} +6 -4
- package/dist/{types-7pYti-k9.d.cts → types-CcFFIk8W.d.ts} +6 -4
- package/package.json +1 -1
- package/dist/chunk-426CJUZP.js +0 -630
- package/dist/chunk-426CJUZP.js.map +0 -1
- package/dist/chunk-MRKY4HGF.js.map +0 -1
- package/dist/chunk-VZKQX5PP.js +0 -1
- package/dist/pairingInvite-BXPWY3aM.d.cts +0 -149
- package/dist/pairingInvite-Cuz0wuq9.d.ts +0 -149
- /package/dist/{chunk-P6L3444O.js.map → chunk-KV6TC5UJ.js.map} +0 -0
- /package/dist/{chunk-VZKQX5PP.js.map → chunk-MXRXYGWW.js.map} +0 -0
- /package/dist/{runtime-UONPTAYK.js.map → runtime-6EELHWVB.js.map} +0 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { b as VersionVector, a as ConversationMetadataPage, e as ChatMessage } from './interface-3C3eG8Hn.js';
|
|
2
|
+
import { R as RemoteOrchestrationRequest, a as RemoteOrchestrationResponse, b as RemoteOrchestrationTransportOptions, c as RemoteOrchestrationTransport } from './remoteClient-D5hco6cS.js';
|
|
3
|
+
import { M as MemeLoopDuplexStream, h as DeviceConnectionGrant, l as DeviceNetworkService, u as DeviceSyncTransport, D as Device, E as ExchangeVersionVectorResult, b as AttachmentBlob, f as DeviceAuthorizer, T as TrustedDeviceRecord, y as MemeLoopProtocol } from './types-CcFFIk8W.js';
|
|
4
|
+
|
|
5
|
+
interface DeviceSyncStateStore {
|
|
6
|
+
loadVersionVector(): Promise<VersionVector>;
|
|
7
|
+
saveVersionVector(versionVector: VersionVector): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
declare class MemoryDeviceSyncStateStore implements DeviceSyncStateStore {
|
|
10
|
+
private versionVector;
|
|
11
|
+
constructor(initial?: VersionVector);
|
|
12
|
+
loadVersionVector(): Promise<VersionVector>;
|
|
13
|
+
saveVersionVector(versionVector: VersionVector): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type DeviceCloudConnectionStatus = 'not-configured' | 'connecting' | 'online' | 'degraded' | 'offline' | 'error';
|
|
17
|
+
type DeviceCloudConnectionComponent = 'authorizer' | 'registration' | 'relay' | 'heartbeat' | 'directory';
|
|
18
|
+
type DeviceCloudComponentStatus = 'pending' | 'ready' | 'failed' | 'not-run';
|
|
19
|
+
interface DeviceCloudConnectionSnapshot {
|
|
20
|
+
status: DeviceCloudConnectionStatus;
|
|
21
|
+
generation: number;
|
|
22
|
+
components: Record<DeviceCloudConnectionComponent, DeviceCloudComponentStatus>;
|
|
23
|
+
lastError?: unknown;
|
|
24
|
+
nextRetryAt?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A step performs remote or otherwise reversible work first. Durable host
|
|
28
|
+
* state must only be changed by commit(), which the coordinator invokes after
|
|
29
|
+
* confirming that the configuration generation is still current.
|
|
30
|
+
*/
|
|
31
|
+
interface DeviceCloudStepResult {
|
|
32
|
+
commit?: () => Promise<unknown>;
|
|
33
|
+
}
|
|
34
|
+
interface DeviceCloudConnectionAdapter<Configuration> {
|
|
35
|
+
isConfigured(configuration: Configuration | undefined): configuration is Configuration;
|
|
36
|
+
relayRequiredForOnline(configuration: Configuration): boolean;
|
|
37
|
+
ensureAuthorizer(configuration: Configuration, signal: AbortSignal): Promise<DeviceCloudStepResult | undefined>;
|
|
38
|
+
registerDevice(configuration: Configuration, signal: AbortSignal): Promise<DeviceCloudStepResult | undefined>;
|
|
39
|
+
ensureRelay(configuration: Configuration, signal: AbortSignal): Promise<DeviceCloudStepResult | undefined>;
|
|
40
|
+
heartbeat(configuration: Configuration, signal: AbortSignal): Promise<DeviceCloudStepResult | undefined>;
|
|
41
|
+
syncDirectory(configuration: Configuration, signal: AbortSignal): Promise<DeviceCloudStepResult | undefined>;
|
|
42
|
+
classifyError?(error: unknown): 'offline' | 'error';
|
|
43
|
+
}
|
|
44
|
+
interface DeviceCloudConnectionCoordinatorOptions<Configuration> {
|
|
45
|
+
adapter: DeviceCloudConnectionAdapter<Configuration>;
|
|
46
|
+
configuration?: Configuration;
|
|
47
|
+
heartbeatIntervalMs?: number;
|
|
48
|
+
initialBackoffMs?: number;
|
|
49
|
+
maxBackoffMs?: number;
|
|
50
|
+
jitterRatio?: number;
|
|
51
|
+
now?: () => number;
|
|
52
|
+
random?: () => number;
|
|
53
|
+
onStatus?: (snapshot: DeviceCloudConnectionSnapshot) => void | Promise<void>;
|
|
54
|
+
logWarning?: (message: string, error: unknown) => void;
|
|
55
|
+
}
|
|
56
|
+
/** Portable, generation-safe Cloud lifecycle shared by every MemeLoop host. */
|
|
57
|
+
declare class DeviceCloudConnectionCoordinator<Configuration> {
|
|
58
|
+
private readonly options;
|
|
59
|
+
private configuration;
|
|
60
|
+
private generation;
|
|
61
|
+
private controller;
|
|
62
|
+
private timer?;
|
|
63
|
+
private inFlight?;
|
|
64
|
+
private started;
|
|
65
|
+
private consecutiveFailures;
|
|
66
|
+
private snapshotValue;
|
|
67
|
+
private readonly heartbeatIntervalMs;
|
|
68
|
+
private readonly initialBackoffMs;
|
|
69
|
+
private readonly maxBackoffMs;
|
|
70
|
+
private readonly jitterRatio;
|
|
71
|
+
private readonly now;
|
|
72
|
+
private readonly random;
|
|
73
|
+
constructor(options: DeviceCloudConnectionCoordinatorOptions<Configuration>);
|
|
74
|
+
get snapshot(): DeviceCloudConnectionSnapshot;
|
|
75
|
+
start(): Promise<void>;
|
|
76
|
+
stop(): Promise<void>;
|
|
77
|
+
setConfiguration(configuration: Configuration | undefined): Promise<void>;
|
|
78
|
+
runNow(): Promise<void>;
|
|
79
|
+
private maintain;
|
|
80
|
+
private runStep;
|
|
81
|
+
private backoffDelay;
|
|
82
|
+
private schedule;
|
|
83
|
+
private clearTimer;
|
|
84
|
+
private isCurrent;
|
|
85
|
+
private setComponent;
|
|
86
|
+
private updateSnapshot;
|
|
87
|
+
private resetSnapshot;
|
|
88
|
+
private emit;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare const DEVICE_ORCHESTRATION_PROTOCOL: "/memeloop/orchestration/2.0.0";
|
|
92
|
+
interface DeviceOrchestrationTransportOptions {
|
|
93
|
+
deviceNetwork: Pick<DeviceNetworkService, 'openStream'>;
|
|
94
|
+
peerId: string;
|
|
95
|
+
grantProvider?: (peerId: string) => DeviceConnectionGrant | undefined | Promise<DeviceConnectionGrant | undefined>;
|
|
96
|
+
maxFrameBytes?: number;
|
|
97
|
+
}
|
|
98
|
+
interface DeviceOrchestrationStreamHandlerInput {
|
|
99
|
+
remotePeerId: string;
|
|
100
|
+
stream: MemeLoopDuplexStream;
|
|
101
|
+
authorize?: (presentedGrant: DeviceConnectionGrant | undefined) => boolean | Promise<boolean>;
|
|
102
|
+
}
|
|
103
|
+
type RemoteOrchestrationHandler = {
|
|
104
|
+
request(request: RemoteOrchestrationRequest): Promise<RemoteOrchestrationResponse>;
|
|
105
|
+
watch(request: RemoteOrchestrationRequest, options?: RemoteOrchestrationTransportOptions): AsyncIterable<RemoteOrchestrationResponse>;
|
|
106
|
+
};
|
|
107
|
+
interface DeviceOrchestrationStreamHandlerOptions {
|
|
108
|
+
resolveHandler: (remotePeerId: string) => RemoteOrchestrationHandler | Promise<RemoteOrchestrationHandler>;
|
|
109
|
+
maxFrameBytes?: number;
|
|
110
|
+
}
|
|
111
|
+
type DeviceOrchestrationStreamHandler = (input: DeviceOrchestrationStreamHandlerInput) => Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Carry the portable resource protocol over an already authenticated and
|
|
114
|
+
* encrypted device-network stream. No bearer credential crosses the link:
|
|
115
|
+
* authorization is bound to the paired peer identity opening the protocol.
|
|
116
|
+
*/
|
|
117
|
+
declare function createDeviceOrchestrationTransport(options: DeviceOrchestrationTransportOptions): RemoteOrchestrationTransport;
|
|
118
|
+
/** Bind a trusted peer identity to a policy-scoped orchestration handler. */
|
|
119
|
+
declare function createDeviceOrchestrationStreamHandler(options: DeviceOrchestrationStreamHandlerOptions): DeviceOrchestrationStreamHandler;
|
|
120
|
+
|
|
121
|
+
type JsonFrameErrorCode = 'FRAME_TOO_LARGE' | 'TRUNCATED_FRAME' | 'INVALID_UTF8' | 'INVALID_JSON' | 'IDLE_TIMEOUT' | 'TOTAL_TIMEOUT' | 'ABORTED';
|
|
122
|
+
declare class JsonFrameError extends Error {
|
|
123
|
+
readonly code: JsonFrameErrorCode;
|
|
124
|
+
constructor(code: JsonFrameErrorCode, message: string, options?: ErrorOptions);
|
|
125
|
+
}
|
|
126
|
+
interface JsonFrameReaderOptions {
|
|
127
|
+
maxPayloadBytes: number;
|
|
128
|
+
idleTimeoutMs: number;
|
|
129
|
+
totalTimeoutMs: number;
|
|
130
|
+
signal?: AbortSignal;
|
|
131
|
+
abort?: (error: JsonFrameError) => void | Promise<void>;
|
|
132
|
+
}
|
|
133
|
+
declare function encodeJsonFrame(value: unknown, maxPayloadBytes?: number): Uint8Array;
|
|
134
|
+
declare function encodeJsonFrames(values: AsyncIterable<unknown> | Iterable<unknown>, maxPayloadBytes?: number): AsyncIterable<Uint8Array>;
|
|
135
|
+
/**
|
|
136
|
+
* Decode uint32be-length-prefixed, strict UTF-8 JSON frames from an arbitrary
|
|
137
|
+
* chunked byte stream. Buffered remainder is retained so one chunk may contain
|
|
138
|
+
* any number of complete or partial frames.
|
|
139
|
+
*/
|
|
140
|
+
declare function createJsonFrameReader(source: AsyncIterable<Uint8Array>, options: JsonFrameReaderOptions): AsyncIterable<unknown>;
|
|
141
|
+
|
|
142
|
+
interface Libp2pDeviceSyncTransportOptions {
|
|
143
|
+
nodeId: string;
|
|
144
|
+
deviceNetwork: Pick<DeviceNetworkService, 'listDevices' | 'openStream'>;
|
|
145
|
+
grantProvider?: (peerId: string) => Promise<DeviceConnectionGrant | undefined>;
|
|
146
|
+
}
|
|
147
|
+
declare class Libp2pDeviceSyncTransport implements DeviceSyncTransport {
|
|
148
|
+
readonly nodeId: string;
|
|
149
|
+
private readonly deviceNetwork;
|
|
150
|
+
private readonly grantProvider?;
|
|
151
|
+
constructor(options: Libp2pDeviceSyncTransportOptions);
|
|
152
|
+
listPeers(): Promise<Device[]>;
|
|
153
|
+
exchangeVersionVector(peerId: string, localVersion: VersionVector): Promise<ExchangeVersionVectorResult>;
|
|
154
|
+
pullMissingMetadata(peerId: string, sinceVersion: VersionVector, cursor?: string): Promise<ConversationMetadataPage>;
|
|
155
|
+
pullMissingMessages(peerId: string, conversationId: string, knownMessageIds: string[]): Promise<ChatMessage[]>;
|
|
156
|
+
pullAttachmentBlob(peerId: string, contentHash: string): Promise<AttachmentBlob | null>;
|
|
157
|
+
private request;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare const LIBP2P_RPC_REQUEST_TYPE = "memeloop-rpc-request-v2";
|
|
161
|
+
declare const LIBP2P_RPC_RESPONSE_TYPE = "memeloop-rpc-response-v2";
|
|
162
|
+
interface Libp2pRpcRequest {
|
|
163
|
+
type: typeof LIBP2P_RPC_REQUEST_TYPE;
|
|
164
|
+
id: string;
|
|
165
|
+
method: string;
|
|
166
|
+
params: unknown;
|
|
167
|
+
grant?: DeviceConnectionGrant;
|
|
168
|
+
}
|
|
169
|
+
type Libp2pRpcResponse = {
|
|
170
|
+
type: typeof LIBP2P_RPC_RESPONSE_TYPE;
|
|
171
|
+
id: string;
|
|
172
|
+
ok: true;
|
|
173
|
+
result: unknown;
|
|
174
|
+
} | {
|
|
175
|
+
type: typeof LIBP2P_RPC_RESPONSE_TYPE;
|
|
176
|
+
id: string;
|
|
177
|
+
ok: false;
|
|
178
|
+
error: string;
|
|
179
|
+
};
|
|
180
|
+
declare function isLibp2pRpcRequest(value: unknown): value is Libp2pRpcRequest;
|
|
181
|
+
declare function isLibp2pRpcResponse(value: unknown): value is Libp2pRpcResponse;
|
|
182
|
+
|
|
183
|
+
declare const LIBP2P_SYNC_REQUEST_TYPE = "memeloop-sync-request-v2";
|
|
184
|
+
declare const LIBP2P_SYNC_RESPONSE_TYPE = "memeloop-sync-response-v2";
|
|
185
|
+
type Libp2pSyncMethod = 'exchangeVersionVector' | 'pullMissingMetadata' | 'pullMissingMessages' | 'pullAttachmentBlob';
|
|
186
|
+
interface Libp2pSyncRequest {
|
|
187
|
+
type: typeof LIBP2P_SYNC_REQUEST_TYPE;
|
|
188
|
+
id: string;
|
|
189
|
+
method: Libp2pSyncMethod;
|
|
190
|
+
params: unknown;
|
|
191
|
+
grant?: DeviceConnectionGrant;
|
|
192
|
+
}
|
|
193
|
+
type Libp2pSyncResponse = {
|
|
194
|
+
type: typeof LIBP2P_SYNC_RESPONSE_TYPE;
|
|
195
|
+
id: string;
|
|
196
|
+
ok: true;
|
|
197
|
+
result: unknown;
|
|
198
|
+
} | {
|
|
199
|
+
type: typeof LIBP2P_SYNC_RESPONSE_TYPE;
|
|
200
|
+
id: string;
|
|
201
|
+
ok: false;
|
|
202
|
+
error: string;
|
|
203
|
+
};
|
|
204
|
+
interface AttachmentBlobWire {
|
|
205
|
+
dataBase64Url: string;
|
|
206
|
+
filename: string;
|
|
207
|
+
mimeType: string;
|
|
208
|
+
size: number;
|
|
209
|
+
}
|
|
210
|
+
declare function isLibp2pSyncRequest(value: unknown): value is Libp2pSyncRequest;
|
|
211
|
+
declare function isLibp2pSyncResponse(value: unknown): value is Libp2pSyncResponse;
|
|
212
|
+
declare function attachmentBlobFromWire(value: unknown): Promise<{
|
|
213
|
+
data: Uint8Array;
|
|
214
|
+
filename: string;
|
|
215
|
+
mimeType: string;
|
|
216
|
+
size: number;
|
|
217
|
+
} | null>;
|
|
218
|
+
|
|
219
|
+
interface LocalTrustDeviceAuthorizerOptions {
|
|
220
|
+
trustedDevices?: Iterable<TrustedDeviceRecord>;
|
|
221
|
+
getTrustedDevice?: (peerId: string) => TrustedDeviceRecord | undefined;
|
|
222
|
+
allowPairingProtocol?: boolean;
|
|
223
|
+
}
|
|
224
|
+
declare class LocalTrustDeviceAuthorizer implements DeviceAuthorizer {
|
|
225
|
+
private readonly options;
|
|
226
|
+
private readonly trustedDevices;
|
|
227
|
+
private readonly allowPairingProtocol;
|
|
228
|
+
constructor(options?: LocalTrustDeviceAuthorizerOptions);
|
|
229
|
+
setTrustedDevice(record: TrustedDeviceRecord): void;
|
|
230
|
+
removeTrustedDevice(peerId: string): void;
|
|
231
|
+
canOpenProtocol(input: {
|
|
232
|
+
remotePeerId: string;
|
|
233
|
+
protocol: MemeLoopProtocol;
|
|
234
|
+
}): Promise<boolean>;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare const DEVICE_PAIRING_INVITE_PROTOCOL = "memeloop-device-pairing-v2";
|
|
238
|
+
declare const DEVICE_PAIRING_INVITE_TTL_MS: number;
|
|
239
|
+
interface DevicePairingInvite {
|
|
240
|
+
protocol: typeof DEVICE_PAIRING_INVITE_PROTOCOL;
|
|
241
|
+
peerId: string;
|
|
242
|
+
publicKeyMultibase: string;
|
|
243
|
+
deviceName: string;
|
|
244
|
+
multiaddrs: string[];
|
|
245
|
+
createdAt: number;
|
|
246
|
+
expiresAt: number;
|
|
247
|
+
signature: string;
|
|
248
|
+
}
|
|
249
|
+
type DevicePairingInviteUnsignedPayload = Omit<DevicePairingInvite, 'signature'>;
|
|
250
|
+
interface DevicePairingInviteIdentityVerifierInput {
|
|
251
|
+
invite: DevicePairingInvite;
|
|
252
|
+
payload: Uint8Array;
|
|
253
|
+
}
|
|
254
|
+
type DevicePairingInviteIdentityVerifier = (input: DevicePairingInviteIdentityVerifierInput) => boolean | Promise<boolean>;
|
|
255
|
+
interface CreateDevicePairingInviteOptions {
|
|
256
|
+
now?: number;
|
|
257
|
+
ttlMs?: number;
|
|
258
|
+
sign(payload: Uint8Array): Promise<string>;
|
|
259
|
+
}
|
|
260
|
+
interface ParseDevicePairingInviteOptions {
|
|
261
|
+
now?: number;
|
|
262
|
+
verifyIdentity: DevicePairingInviteIdentityVerifier;
|
|
263
|
+
}
|
|
264
|
+
declare function canonicalDevicePairingInviteBytes(invite: DevicePairingInviteUnsignedPayload): Uint8Array;
|
|
265
|
+
declare function createDevicePairingInvite(device: Pick<Device, 'peerId' | 'displayName' | 'multiaddrs'> & {
|
|
266
|
+
publicKeyMultibase: string;
|
|
267
|
+
}, options: CreateDevicePairingInviteOptions): Promise<DevicePairingInvite>;
|
|
268
|
+
declare function encodeDevicePairingInvite(invite: DevicePairingInvite): string;
|
|
269
|
+
declare function parseDevicePairingInvite(serialized: string, options: ParseDevicePairingInviteOptions): Promise<DevicePairingInvite>;
|
|
270
|
+
|
|
271
|
+
export { isLibp2pSyncResponse as $, type AttachmentBlobWire as A, type Libp2pRpcRequest as B, type CreateDevicePairingInviteOptions as C, DEVICE_ORCHESTRATION_PROTOCOL as D, type Libp2pRpcResponse as E, type Libp2pSyncMethod as F, type Libp2pSyncRequest as G, type Libp2pSyncResponse as H, LocalTrustDeviceAuthorizer as I, JsonFrameError as J, type LocalTrustDeviceAuthorizerOptions as K, LIBP2P_RPC_REQUEST_TYPE as L, MemoryDeviceSyncStateStore as M, attachmentBlobFromWire as N, canonicalDevicePairingInviteBytes as O, type ParseDevicePairingInviteOptions as P, createDeviceOrchestrationStreamHandler as Q, type RemoteOrchestrationHandler as R, createDeviceOrchestrationTransport as S, createDevicePairingInvite as T, createJsonFrameReader as U, encodeDevicePairingInvite as V, encodeJsonFrame as W, encodeJsonFrames as X, isLibp2pRpcRequest as Y, isLibp2pRpcResponse as Z, isLibp2pSyncRequest as _, DEVICE_PAIRING_INVITE_PROTOCOL as a, parseDevicePairingInvite as a0, DEVICE_PAIRING_INVITE_TTL_MS as b, type DeviceCloudComponentStatus as c, type DeviceCloudConnectionAdapter as d, type DeviceCloudConnectionComponent as e, DeviceCloudConnectionCoordinator as f, type DeviceCloudConnectionCoordinatorOptions as g, type DeviceCloudConnectionSnapshot as h, type DeviceCloudConnectionStatus as i, type DeviceCloudStepResult as j, type DeviceOrchestrationStreamHandler as k, type DeviceOrchestrationStreamHandlerInput as l, type DeviceOrchestrationStreamHandlerOptions as m, type DeviceOrchestrationTransportOptions as n, type DevicePairingInvite as o, type DevicePairingInviteIdentityVerifier as p, type DevicePairingInviteIdentityVerifierInput as q, type DevicePairingInviteUnsignedPayload as r, type DeviceSyncStateStore as s, type JsonFrameErrorCode as t, type JsonFrameReaderOptions as u, LIBP2P_RPC_RESPONSE_TYPE as v, LIBP2P_SYNC_REQUEST_TYPE as w, LIBP2P_SYNC_RESPONSE_TYPE as x, Libp2pDeviceSyncTransport as y, type Libp2pDeviceSyncTransportOptions as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as LoopProfileScriptReference, h as AgentLoopScriptPolicy, i as AgentLoopStep, f as AgentLoopInput, n as LoopProfile, g as AgentLoopRuntime, e as AgentLoopGenerator, B as AgentClient, C as ScriptDeploymentClient, d as AgentLoopDefinition, k as ILLMProvider, A as AgentFrameworkContext, L as LoopPlugin, o as LoopProfilePluginEntry, P as PromptConcatTool } from './scriptDeploymentPipeline-
|
|
2
|
-
import {
|
|
3
|
-
import { c as AgentStopData, i as HookType, g as HookHandler, H as HookContext, h as HookResult } from './registry-
|
|
1
|
+
import { q as LoopProfileScriptReference, h as AgentLoopScriptPolicy, i as AgentLoopStep, f as AgentLoopInput, n as LoopProfile, g as AgentLoopRuntime, e as AgentLoopGenerator, B as AgentClient, C as ScriptDeploymentClient, d as AgentLoopDefinition, k as ILLMProvider, A as AgentFrameworkContext, L as LoopPlugin, o as LoopProfilePluginEntry, P as PromptConcatTool } from './scriptDeploymentPipeline-B1q-UhrO.js';
|
|
2
|
+
import { w as AgentOrchestrationClient, e as ChatMessage, Z as PromptNode, _ as AgentPromptDescription } from './interface-3C3eG8Hn.js';
|
|
3
|
+
import { c as AgentStopData, i as HookType, g as HookHandler, H as HookContext, h as HookResult } from './registry-yGnYHWhq.js';
|
|
4
4
|
|
|
5
5
|
declare const BUILTIN_AGENT_AGENT_LOOP_ARTIFACT_RESOURCE_LIFECYCLE_SCRIPT_ID = "builtin:agent-agent-loop/artifact-resource-lifecycle";
|
|
6
6
|
declare const BUILTIN_AGENT_AGENT_LOOP_DECLARATIVE_AGENT_RUN_SCRIPT_ID = "builtin:agent-agent-loop/declarative-agent-run";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as LoopProfileScriptReference, h as AgentLoopScriptPolicy, i as AgentLoopStep, f as AgentLoopInput, n as LoopProfile, g as AgentLoopRuntime, e as AgentLoopGenerator, B as AgentClient, C as ScriptDeploymentClient, d as AgentLoopDefinition, k as ILLMProvider, A as AgentFrameworkContext, L as LoopPlugin, o as LoopProfilePluginEntry, P as PromptConcatTool } from './scriptDeploymentPipeline-
|
|
2
|
-
import {
|
|
3
|
-
import { c as AgentStopData, i as HookType, g as HookHandler, H as HookContext, h as HookResult } from './registry-
|
|
1
|
+
import { q as LoopProfileScriptReference, h as AgentLoopScriptPolicy, i as AgentLoopStep, f as AgentLoopInput, n as LoopProfile, g as AgentLoopRuntime, e as AgentLoopGenerator, B as AgentClient, C as ScriptDeploymentClient, d as AgentLoopDefinition, k as ILLMProvider, A as AgentFrameworkContext, L as LoopPlugin, o as LoopProfilePluginEntry, P as PromptConcatTool } from './scriptDeploymentPipeline-XJzQyYys.cjs';
|
|
2
|
+
import { w as AgentOrchestrationClient, e as ChatMessage, Z as PromptNode, _ as AgentPromptDescription } from './interface-3C3eG8Hn.cjs';
|
|
3
|
+
import { c as AgentStopData, i as HookType, g as HookHandler, H as HookContext, h as HookResult } from './registry-DNSEVYug.cjs';
|
|
4
4
|
|
|
5
5
|
declare const BUILTIN_AGENT_AGENT_LOOP_ARTIFACT_RESOURCE_LIFECYCLE_SCRIPT_ID = "builtin:agent-agent-loop/artifact-resource-lifecycle";
|
|
6
6
|
declare const BUILTIN_AGENT_AGENT_LOOP_DECLARATIVE_AGENT_RUN_SCRIPT_ID = "builtin:agent-agent-loop/declarative-agent-run";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { k as ILLMProvider } from './scriptDeploymentPipeline-
|
|
1
|
+
import { p as AgentDefinition } from './interface-3C3eG8Hn.cjs';
|
|
2
|
+
import { k as ILLMProvider } from './scriptDeploymentPipeline-XJzQyYys.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Extended agent definition used by the agent profile registry.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { k as ILLMProvider } from './scriptDeploymentPipeline-
|
|
1
|
+
import { p as AgentDefinition } from './interface-3C3eG8Hn.js';
|
|
2
|
+
import { k as ILLMProvider } from './scriptDeploymentPipeline-B1q-UhrO.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Extended agent definition used by the agent profile registry.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AgentFrameworkContext, f as AgentLoopInput, e as AgentLoopGenerator, n as LoopProfile, g as AgentLoopRuntime, z as ToolOperationEffect } from './scriptDeploymentPipeline-
|
|
2
|
-
import {
|
|
3
|
-
import { A as AgentProfile, a as AgentProfileType } from './providerRegistry-
|
|
1
|
+
import { A as AgentFrameworkContext, f as AgentLoopInput, e as AgentLoopGenerator, n as LoopProfile, g as AgentLoopRuntime, z as ToolOperationEffect } from './scriptDeploymentPipeline-XJzQyYys.cjs';
|
|
2
|
+
import { e as ChatMessage } from './interface-3C3eG8Hn.cjs';
|
|
3
|
+
import { A as AgentProfile, a as AgentProfileType } from './providerRegistry-BDGGs5gz.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Layered permission system types.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AgentFrameworkContext, f as AgentLoopInput, e as AgentLoopGenerator, n as LoopProfile, g as AgentLoopRuntime, z as ToolOperationEffect } from './scriptDeploymentPipeline-
|
|
2
|
-
import {
|
|
3
|
-
import { A as AgentProfile, a as AgentProfileType } from './providerRegistry-
|
|
1
|
+
import { A as AgentFrameworkContext, f as AgentLoopInput, e as AgentLoopGenerator, n as LoopProfile, g as AgentLoopRuntime, z as ToolOperationEffect } from './scriptDeploymentPipeline-B1q-UhrO.js';
|
|
2
|
+
import { e as ChatMessage } from './interface-3C3eG8Hn.js';
|
|
3
|
+
import { A as AgentProfile, a as AgentProfileType } from './providerRegistry-CaFK_aUd.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Layered permission system types.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OrchestrationErrorData,
|
|
1
|
+
import { O as OrchestrationErrorData, w as AgentOrchestrationClient } from './interface-3C3eG8Hn.cjs';
|
|
2
2
|
|
|
3
3
|
declare const REMOTE_ORCHESTRATION_PROTOCOL: "memeloop.resource.v1";
|
|
4
4
|
type RemoteOrchestrationOperation = 'capabilities' | 'apply' | 'get' | 'list' | 'watch' | 'delete';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OrchestrationErrorData,
|
|
1
|
+
import { O as OrchestrationErrorData, w as AgentOrchestrationClient } from './interface-3C3eG8Hn.js';
|
|
2
2
|
|
|
3
3
|
declare const REMOTE_ORCHESTRATION_PROTOCOL: "memeloop.resource.v1";
|
|
4
4
|
type RemoteOrchestrationOperation = 'capabilities' | 'apply' | 'get' | 'list' | 'watch' | 'delete';
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createAgentLoopScriptRunner,
|
|
4
4
|
createAgentProfileRunner,
|
|
5
5
|
createMemeLoopRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5VYZV33O.js";
|
|
7
7
|
import "./chunk-AZFYDWIN.js";
|
|
8
8
|
import "./chunk-LGUGYRR4.js";
|
|
9
9
|
import "./chunk-WAI6BODI.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
createAgentProfileRunner,
|
|
16
16
|
createMemeLoopRuntime
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=runtime-
|
|
18
|
+
//# sourceMappingURL=runtime-6EELHWVB.js.map
|
package/dist/{scriptDeploymentPipeline-CXJcC82H.d.ts → scriptDeploymentPipeline-B1q-UhrO.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { x as OrchestrationResourceManifest, y as OrchestrationOwnerReference, z as OrchestrationTypeMeta, B as OrchestrationObjectMetadata, E as OrchestrationResourceStatus, O as OrchestrationErrorData, w as AgentOrchestrationClient, F as OrchestrationResourceReference, J as OrchestrationGetOptions, K as OrchestrationResource, N as OrchestrationResourceQuery, P as OrchestrationListOptions, Q as OrchestrationResourceList, R as OrchestrationWatchOptions, S as OrchestrationWatchEvent, U as OrchestrationDeleteOptions, W as OrchestrationDeleteResult, e as ChatMessage, X as AgentFrameworkConfig, u as AiAPIConfig, Y as IPrompt, I as IAgentStorage, p as AgentDefinition, C as ConversationMeta } from './interface-3C3eG8Hn.js';
|
|
2
2
|
|
|
3
3
|
declare const AGENT_WORKLOAD_API_VERSION = "workload.memeloop.io/v1alpha1";
|
|
4
4
|
declare const AGENT_WORKLOAD_KIND = "AgentWorkload";
|
package/dist/{scriptDeploymentPipeline-yG1ZhVVI.d.cts → scriptDeploymentPipeline-XJzQyYys.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { x as OrchestrationResourceManifest, y as OrchestrationOwnerReference, z as OrchestrationTypeMeta, B as OrchestrationObjectMetadata, E as OrchestrationResourceStatus, O as OrchestrationErrorData, w as AgentOrchestrationClient, F as OrchestrationResourceReference, J as OrchestrationGetOptions, K as OrchestrationResource, N as OrchestrationResourceQuery, P as OrchestrationListOptions, Q as OrchestrationResourceList, R as OrchestrationWatchOptions, S as OrchestrationWatchEvent, U as OrchestrationDeleteOptions, W as OrchestrationDeleteResult, e as ChatMessage, X as AgentFrameworkConfig, u as AiAPIConfig, Y as IPrompt, I as IAgentStorage, p as AgentDefinition, C as ConversationMeta } from './interface-3C3eG8Hn.cjs';
|
|
2
2
|
|
|
3
3
|
declare const AGENT_WORKLOAD_API_VERSION = "workload.memeloop.io/v1alpha1";
|
|
4
4
|
declare const AGENT_WORKLOAD_KIND = "AgentWorkload";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as DeviceNetworkService, L as LocalDeviceIdentity, g as DeviceCapabilities, T as TrustedDeviceRecord, D as Device, P as PairingSession, x as LocalPairingRequestOptions, y as MemeLoopProtocol, h as DeviceConnectionGrant, M as MemeLoopDuplexStream, S as SyncResult, C as CloudDeviceClient, w as DeviceTrustStore, c as CloudDeviceRecord } from './types-
|
|
1
|
+
import { l as DeviceNetworkService, L as LocalDeviceIdentity, g as DeviceCapabilities, T as TrustedDeviceRecord, D as Device, P as PairingSession, x as LocalPairingRequestOptions, y as MemeLoopProtocol, h as DeviceConnectionGrant, M as MemeLoopDuplexStream, S as SyncResult, C as CloudDeviceClient, w as DeviceTrustStore, c as CloudDeviceRecord } from './types-C8gnhG9M.cjs';
|
|
2
2
|
|
|
3
3
|
interface MemoryDeviceNetworkServiceOptions {
|
|
4
4
|
identity: LocalDeviceIdentity;
|
|
@@ -36,13 +36,14 @@ declare class MemoryDeviceNetworkService implements DeviceNetworkService {
|
|
|
36
36
|
/**
|
|
37
37
|
* Fetch visible cloud devices and merge them into the local trust store.
|
|
38
38
|
* - Cloud devices become trusted with trustMode = "cloud-account".
|
|
39
|
-
* -
|
|
40
|
-
* -
|
|
41
|
-
*
|
|
42
|
-
* - Returns
|
|
39
|
+
* - Explicit local-pairing trust is never replaced by Cloud directory data.
|
|
40
|
+
* - Cloud-account records that are revoked or disappear from the visible
|
|
41
|
+
* directory are removed so stale discovery metadata cannot bypass revocation.
|
|
42
|
+
* - Returns only active Cloud records for callers to emit as discovered devices.
|
|
43
43
|
*/
|
|
44
44
|
declare function syncCloudDevices(input: {
|
|
45
45
|
cloudClient: CloudDeviceClient;
|
|
46
|
+
excludePeerIds?: Iterable<string>;
|
|
46
47
|
trustStore: DeviceTrustStore;
|
|
47
48
|
}): Promise<CloudDeviceRecord[]>;
|
|
48
49
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as DeviceNetworkService, L as LocalDeviceIdentity, g as DeviceCapabilities, T as TrustedDeviceRecord, D as Device, P as PairingSession, x as LocalPairingRequestOptions, y as MemeLoopProtocol, h as DeviceConnectionGrant, M as MemeLoopDuplexStream, S as SyncResult, C as CloudDeviceClient, w as DeviceTrustStore, c as CloudDeviceRecord } from './types-
|
|
1
|
+
import { l as DeviceNetworkService, L as LocalDeviceIdentity, g as DeviceCapabilities, T as TrustedDeviceRecord, D as Device, P as PairingSession, x as LocalPairingRequestOptions, y as MemeLoopProtocol, h as DeviceConnectionGrant, M as MemeLoopDuplexStream, S as SyncResult, C as CloudDeviceClient, w as DeviceTrustStore, c as CloudDeviceRecord } from './types-CcFFIk8W.js';
|
|
2
2
|
|
|
3
3
|
interface MemoryDeviceNetworkServiceOptions {
|
|
4
4
|
identity: LocalDeviceIdentity;
|
|
@@ -36,13 +36,14 @@ declare class MemoryDeviceNetworkService implements DeviceNetworkService {
|
|
|
36
36
|
/**
|
|
37
37
|
* Fetch visible cloud devices and merge them into the local trust store.
|
|
38
38
|
* - Cloud devices become trusted with trustMode = "cloud-account".
|
|
39
|
-
* -
|
|
40
|
-
* -
|
|
41
|
-
*
|
|
42
|
-
* - Returns
|
|
39
|
+
* - Explicit local-pairing trust is never replaced by Cloud directory data.
|
|
40
|
+
* - Cloud-account records that are revoked or disappear from the visible
|
|
41
|
+
* directory are removed so stale discovery metadata cannot bypass revocation.
|
|
42
|
+
* - Returns only active Cloud records for callers to emit as discovered devices.
|
|
43
43
|
*/
|
|
44
44
|
declare function syncCloudDevices(input: {
|
|
45
45
|
cloudClient: CloudDeviceClient;
|
|
46
|
+
excludePeerIds?: Iterable<string>;
|
|
46
47
|
trustStore: DeviceTrustStore;
|
|
47
48
|
}): Promise<CloudDeviceRecord[]>;
|
|
48
49
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as VersionVector, V as VersionRange, a as ConversationMetadataPage, e as ChatMessage } from './interface-3C3eG8Hn.cjs';
|
|
2
2
|
|
|
3
3
|
type DevicePlatform = 'desktop' | 'mobile' | 'cli';
|
|
4
4
|
type DeviceTrustMode = 'local-pairing' | 'cloud-account';
|
|
@@ -7,7 +7,7 @@ type DeviceNetworkPath = 'lan' | 'direct' | 'relay';
|
|
|
7
7
|
type DeviceProtocolDirection = 'inbound' | 'outbound';
|
|
8
8
|
type PairingSessionDirection = 'inbound' | 'outbound';
|
|
9
9
|
type PairingSessionStatus = 'pending' | 'accepted' | 'rejected' | 'expired';
|
|
10
|
-
type MemeLoopProtocol = '/memeloop/rpc/
|
|
10
|
+
type MemeLoopProtocol = '/memeloop/rpc/2.0.0' | '/memeloop/sync/2.0.0' | '/memeloop/pairing/2.0.0' | '/memeloop/orchestration/2.0.0' | '/memeloop/relay-admission/2.0.0';
|
|
11
11
|
interface DeviceCapabilities {
|
|
12
12
|
tools: string[];
|
|
13
13
|
mcpServers: string[];
|
|
@@ -144,6 +144,7 @@ interface MemeLoopDuplexStream {
|
|
|
144
144
|
source: AsyncIterable<Uint8Array>;
|
|
145
145
|
sink(source: AsyncIterable<Uint8Array>): Promise<void>;
|
|
146
146
|
close(): Promise<void>;
|
|
147
|
+
abort(error: Error): void | Promise<void>;
|
|
147
148
|
}
|
|
148
149
|
interface DeviceRpcHandlerInput {
|
|
149
150
|
remotePeerId: string;
|
|
@@ -236,7 +237,8 @@ interface DeviceNetworkService {
|
|
|
236
237
|
}
|
|
237
238
|
interface ExchangeVersionVectorResult {
|
|
238
239
|
remoteVersion: VersionVector;
|
|
239
|
-
missingForRemote:
|
|
240
|
+
missingForRemote: VersionRange[];
|
|
241
|
+
missingForLocal: VersionRange[];
|
|
240
242
|
}
|
|
241
243
|
interface AttachmentBlob {
|
|
242
244
|
data: Uint8Array;
|
|
@@ -247,7 +249,7 @@ interface AttachmentBlob {
|
|
|
247
249
|
interface DeviceSyncTransport {
|
|
248
250
|
listPeers(): Promise<Device[]>;
|
|
249
251
|
exchangeVersionVector(peerId: string, localVersion: VersionVector): Promise<ExchangeVersionVectorResult>;
|
|
250
|
-
pullMissingMetadata(peerId: string, sinceVersion: VersionVector): Promise<
|
|
252
|
+
pullMissingMetadata(peerId: string, sinceVersion: VersionVector, cursor?: string): Promise<ConversationMetadataPage>;
|
|
251
253
|
pullMissingMessages(peerId: string, conversationId: string, knownMessageIds: string[]): Promise<ChatMessage[]>;
|
|
252
254
|
pullAttachmentBlob(peerId: string, contentHash: string): Promise<AttachmentBlob | null>;
|
|
253
255
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as VersionVector, V as VersionRange, a as ConversationMetadataPage, e as ChatMessage } from './interface-3C3eG8Hn.js';
|
|
2
2
|
|
|
3
3
|
type DevicePlatform = 'desktop' | 'mobile' | 'cli';
|
|
4
4
|
type DeviceTrustMode = 'local-pairing' | 'cloud-account';
|
|
@@ -7,7 +7,7 @@ type DeviceNetworkPath = 'lan' | 'direct' | 'relay';
|
|
|
7
7
|
type DeviceProtocolDirection = 'inbound' | 'outbound';
|
|
8
8
|
type PairingSessionDirection = 'inbound' | 'outbound';
|
|
9
9
|
type PairingSessionStatus = 'pending' | 'accepted' | 'rejected' | 'expired';
|
|
10
|
-
type MemeLoopProtocol = '/memeloop/rpc/
|
|
10
|
+
type MemeLoopProtocol = '/memeloop/rpc/2.0.0' | '/memeloop/sync/2.0.0' | '/memeloop/pairing/2.0.0' | '/memeloop/orchestration/2.0.0' | '/memeloop/relay-admission/2.0.0';
|
|
11
11
|
interface DeviceCapabilities {
|
|
12
12
|
tools: string[];
|
|
13
13
|
mcpServers: string[];
|
|
@@ -144,6 +144,7 @@ interface MemeLoopDuplexStream {
|
|
|
144
144
|
source: AsyncIterable<Uint8Array>;
|
|
145
145
|
sink(source: AsyncIterable<Uint8Array>): Promise<void>;
|
|
146
146
|
close(): Promise<void>;
|
|
147
|
+
abort(error: Error): void | Promise<void>;
|
|
147
148
|
}
|
|
148
149
|
interface DeviceRpcHandlerInput {
|
|
149
150
|
remotePeerId: string;
|
|
@@ -236,7 +237,8 @@ interface DeviceNetworkService {
|
|
|
236
237
|
}
|
|
237
238
|
interface ExchangeVersionVectorResult {
|
|
238
239
|
remoteVersion: VersionVector;
|
|
239
|
-
missingForRemote:
|
|
240
|
+
missingForRemote: VersionRange[];
|
|
241
|
+
missingForLocal: VersionRange[];
|
|
240
242
|
}
|
|
241
243
|
interface AttachmentBlob {
|
|
242
244
|
data: Uint8Array;
|
|
@@ -247,7 +249,7 @@ interface AttachmentBlob {
|
|
|
247
249
|
interface DeviceSyncTransport {
|
|
248
250
|
listPeers(): Promise<Device[]>;
|
|
249
251
|
exchangeVersionVector(peerId: string, localVersion: VersionVector): Promise<ExchangeVersionVectorResult>;
|
|
250
|
-
pullMissingMetadata(peerId: string, sinceVersion: VersionVector): Promise<
|
|
252
|
+
pullMissingMetadata(peerId: string, sinceVersion: VersionVector, cursor?: string): Promise<ConversationMetadataPage>;
|
|
251
253
|
pullMissingMessages(peerId: string, conversationId: string, knownMessageIds: string[]): Promise<ChatMessage[]>;
|
|
252
254
|
pullAttachmentBlob(peerId: string, contentHash: string): Promise<AttachmentBlob | null>;
|
|
253
255
|
}
|