@dxos/halo-adapter-client 0.0.0 → 0.11.1
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 +40 -0
- package/dist/lib/index.mjs +358 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +1 -7
- package/package.json +9 -9
- package/vite.config.ts +7 -0
- package/dist/lib/neutral/index.mjs +0 -479
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
package/moon.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/halo-adapter-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Implements the @dxos/halo services over a @dxos/client instance.",
|
|
5
5
|
"homepage": "https://github.com/dxos/dxos/tree/main/packages/core/halo/halo-adapter-client#readme",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"source": "./src/index.ts",
|
|
18
18
|
"types": "./dist/types/src/index.d.ts",
|
|
19
|
-
"
|
|
19
|
+
"import": "./dist/lib/index.mjs"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"types": "dist/types/src/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"effect": "3.21.4",
|
|
25
|
-
"@dxos/
|
|
26
|
-
"@dxos/halo": "0.
|
|
27
|
-
"@dxos/invariant": "0.
|
|
28
|
-
"@dxos/client": "0.
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/protocols": "0.
|
|
31
|
-
"@dxos/
|
|
25
|
+
"@dxos/client": "0.11.1",
|
|
26
|
+
"@dxos/halo": "0.11.1",
|
|
27
|
+
"@dxos/invariant": "0.11.1",
|
|
28
|
+
"@dxos/client-protocol": "0.11.1",
|
|
29
|
+
"@dxos/keys": "0.11.1",
|
|
30
|
+
"@dxos/protocols": "0.11.1",
|
|
31
|
+
"@dxos/async": "0.11.1"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
package/vite.config.ts
ADDED
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
import "@dxos/node-std/globals";
|
|
2
|
-
|
|
3
|
-
// src/index.ts
|
|
4
|
-
import * as Layer3 from "effect/Layer";
|
|
5
|
-
|
|
6
|
-
// src/identity.ts
|
|
7
|
-
import * as Effect2 from "effect/Effect";
|
|
8
|
-
import * as Layer from "effect/Layer";
|
|
9
|
-
import * as Option from "effect/Option";
|
|
10
|
-
import * as Stream2 from "effect/Stream";
|
|
11
|
-
import { InvitationEncoder as InvitationEncoder2 } from "@dxos/client/invitations";
|
|
12
|
-
import { Identity as HaloIdentity, IdentityError } from "@dxos/halo";
|
|
13
|
-
import { IdentityDid } from "@dxos/keys";
|
|
14
|
-
import { DeviceKind } from "@dxos/protocols/proto/dxos/client/services";
|
|
15
|
-
|
|
16
|
-
// src/util.ts
|
|
17
|
-
import * as Effect from "effect/Effect";
|
|
18
|
-
import * as Stream from "effect/Stream";
|
|
19
|
-
import { AuthenticatingInvitationObservable, Invitation as ClientInvitation, InvitationEncoder } from "@dxos/client/invitations";
|
|
20
|
-
import { InvitationError } from "@dxos/halo";
|
|
21
|
-
import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
22
|
-
import { SpaceMember as HaloSpaceMember } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
23
|
-
var streamFromObservable = (observable) => Stream.async((emit) => {
|
|
24
|
-
const subscription = observable.subscribe((value) => void emit.single(value), (err) => void emit.fail(err));
|
|
25
|
-
return Effect.sync(() => subscription.unsubscribe());
|
|
26
|
-
}).pipe(Stream.orDie);
|
|
27
|
-
var TERMINAL_STATES = /* @__PURE__ */ new Set([
|
|
28
|
-
ClientInvitation.State.SUCCESS,
|
|
29
|
-
ClientInvitation.State.CANCELLED,
|
|
30
|
-
ClientInvitation.State.TIMEOUT,
|
|
31
|
-
ClientInvitation.State.ERROR,
|
|
32
|
-
ClientInvitation.State.EXPIRED
|
|
33
|
-
]);
|
|
34
|
-
var toEvent = (invitation) => {
|
|
35
|
-
switch (invitation.state) {
|
|
36
|
-
case ClientInvitation.State.CONNECTING:
|
|
37
|
-
return {
|
|
38
|
-
_tag: "connecting"
|
|
39
|
-
};
|
|
40
|
-
case ClientInvitation.State.CONNECTED:
|
|
41
|
-
return {
|
|
42
|
-
_tag: "connected"
|
|
43
|
-
};
|
|
44
|
-
case ClientInvitation.State.READY_FOR_AUTHENTICATION:
|
|
45
|
-
return {
|
|
46
|
-
_tag: "readyForAuthentication",
|
|
47
|
-
authCode: invitation.authCode
|
|
48
|
-
};
|
|
49
|
-
case ClientInvitation.State.AUTHENTICATING:
|
|
50
|
-
return {
|
|
51
|
-
_tag: "authenticating"
|
|
52
|
-
};
|
|
53
|
-
case ClientInvitation.State.SUCCESS:
|
|
54
|
-
return {
|
|
55
|
-
_tag: "success",
|
|
56
|
-
result: {}
|
|
57
|
-
};
|
|
58
|
-
case ClientInvitation.State.CANCELLED:
|
|
59
|
-
return {
|
|
60
|
-
_tag: "cancelled"
|
|
61
|
-
};
|
|
62
|
-
case ClientInvitation.State.TIMEOUT:
|
|
63
|
-
case ClientInvitation.State.ERROR:
|
|
64
|
-
case ClientInvitation.State.EXPIRED:
|
|
65
|
-
return {
|
|
66
|
-
_tag: "error",
|
|
67
|
-
message: `Invitation ${ClientInvitation.State[invitation.state]}`
|
|
68
|
-
};
|
|
69
|
-
default:
|
|
70
|
-
return void 0;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var invitationEvents = (observable) => Stream.async((emit) => {
|
|
74
|
-
const subscription = observable.subscribe((invitation) => {
|
|
75
|
-
const event = toEvent(invitation);
|
|
76
|
-
if (event) {
|
|
77
|
-
void emit.single(event);
|
|
78
|
-
if (TERMINAL_STATES.has(invitation.state)) {
|
|
79
|
-
void emit.end();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}, (err) => {
|
|
83
|
-
void emit.single({
|
|
84
|
-
_tag: "error",
|
|
85
|
-
message: err.message
|
|
86
|
-
});
|
|
87
|
-
void emit.end();
|
|
88
|
-
});
|
|
89
|
-
return Effect.sync(() => subscription.unsubscribe());
|
|
90
|
-
});
|
|
91
|
-
var makeFlow = (observable, kind) => ({
|
|
92
|
-
id: observable.get().invitationId,
|
|
93
|
-
kind,
|
|
94
|
-
events: invitationEvents(observable),
|
|
95
|
-
authenticate: (code) => observable instanceof AuthenticatingInvitationObservable ? Effect.tryPromise({
|
|
96
|
-
try: () => observable.authenticate(code),
|
|
97
|
-
catch: (error) => new InvitationError({
|
|
98
|
-
context: {
|
|
99
|
-
error
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
}) : Effect.fail(new InvitationError({
|
|
103
|
-
context: {
|
|
104
|
-
reason: "flow is not awaiting authentication"
|
|
105
|
-
}
|
|
106
|
-
})),
|
|
107
|
-
cancel: () => Effect.promise(() => observable.cancel()),
|
|
108
|
-
code: Effect.sync(() => InvitationEncoder.encode(observable.get()))
|
|
109
|
-
});
|
|
110
|
-
var toShareOptions = (options) => ({
|
|
111
|
-
authMethod: toAuthMethod(options?.authMethod),
|
|
112
|
-
type: toType(options?.type),
|
|
113
|
-
...options?.multiUse !== void 0 ? {
|
|
114
|
-
multiUse: options.multiUse
|
|
115
|
-
} : {},
|
|
116
|
-
...options?.target !== void 0 ? {
|
|
117
|
-
target: options.target
|
|
118
|
-
} : {}
|
|
119
|
-
});
|
|
120
|
-
var toAuthMethod = (method) => {
|
|
121
|
-
switch (method) {
|
|
122
|
-
case "shared-secret":
|
|
123
|
-
return ClientInvitation.AuthMethod.SHARED_SECRET;
|
|
124
|
-
case "known-public-key":
|
|
125
|
-
return ClientInvitation.AuthMethod.KNOWN_PUBLIC_KEY;
|
|
126
|
-
case "none":
|
|
127
|
-
default:
|
|
128
|
-
return ClientInvitation.AuthMethod.NONE;
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
var toType = (type) => {
|
|
132
|
-
switch (type) {
|
|
133
|
-
case "delegated":
|
|
134
|
-
return ClientInvitation.Type.DELEGATED;
|
|
135
|
-
case "multiuse":
|
|
136
|
-
return ClientInvitation.Type.MULTIUSE;
|
|
137
|
-
case "interactive":
|
|
138
|
-
default:
|
|
139
|
-
return ClientInvitation.Type.INTERACTIVE;
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
var toAccess = (role) => {
|
|
143
|
-
switch (role) {
|
|
144
|
-
case HaloSpaceMember.Role.OWNER:
|
|
145
|
-
case HaloSpaceMember.Role.ADMIN:
|
|
146
|
-
return "admin";
|
|
147
|
-
case HaloSpaceMember.Role.EDITOR:
|
|
148
|
-
return "edit";
|
|
149
|
-
case HaloSpaceMember.Role.READER:
|
|
150
|
-
return "read";
|
|
151
|
-
default:
|
|
152
|
-
return void 0;
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
var fromAccess = (access) => {
|
|
156
|
-
switch (access) {
|
|
157
|
-
case "admin":
|
|
158
|
-
return HaloSpaceMember.Role.ADMIN;
|
|
159
|
-
case "edit":
|
|
160
|
-
return HaloSpaceMember.Role.EDITOR;
|
|
161
|
-
case "read":
|
|
162
|
-
return HaloSpaceMember.Role.READER;
|
|
163
|
-
default:
|
|
164
|
-
return void 0;
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
var isOnline = (member) => member.presence === SpaceMember.PresenceState.ONLINE;
|
|
168
|
-
|
|
169
|
-
// src/identity.ts
|
|
170
|
-
var toInfo = (identity) => ({
|
|
171
|
-
did: IdentityDid.make(identity.did),
|
|
172
|
-
identityKey: identity.identityKey?.toHex(),
|
|
173
|
-
displayName: identity.profile?.displayName,
|
|
174
|
-
data: identity.profile?.data
|
|
175
|
-
});
|
|
176
|
-
var toDeviceInfo = (device) => ({
|
|
177
|
-
key: device.deviceKey.toHex(),
|
|
178
|
-
label: device.profile?.label,
|
|
179
|
-
current: device.kind === DeviceKind.CURRENT
|
|
180
|
-
});
|
|
181
|
-
var toCredential = (credential) => ({
|
|
182
|
-
id: credential.id?.toHex(),
|
|
183
|
-
type: credential.subject.assertion["@type"],
|
|
184
|
-
issuanceDate: credential.issuanceDate
|
|
185
|
-
});
|
|
186
|
-
var makeIdentityService = (client) => ({
|
|
187
|
-
identity: streamFromObservable(client.halo.identity).pipe(Stream2.map((identity) => identity ? Option.some(toInfo(identity)) : Option.none())),
|
|
188
|
-
getSnapshot: () => {
|
|
189
|
-
const identity = client.halo.identity.get();
|
|
190
|
-
return identity ? Option.some(toInfo(identity)) : Option.none();
|
|
191
|
-
},
|
|
192
|
-
subscribe: (callback) => {
|
|
193
|
-
const subscription = client.halo.identity.subscribe((identity) => callback(identity ? Option.some(toInfo(identity)) : Option.none()));
|
|
194
|
-
return () => subscription.unsubscribe();
|
|
195
|
-
},
|
|
196
|
-
create: (options) => Effect2.tryPromise({
|
|
197
|
-
try: async () => toInfo(await client.halo.createIdentity(options?.displayName !== void 0 ? {
|
|
198
|
-
displayName: options.displayName
|
|
199
|
-
} : {}, options?.deviceLabel !== void 0 ? {
|
|
200
|
-
label: options.deviceLabel
|
|
201
|
-
} : void 0)),
|
|
202
|
-
catch: (error) => new IdentityError({
|
|
203
|
-
context: {
|
|
204
|
-
error
|
|
205
|
-
}
|
|
206
|
-
})
|
|
207
|
-
}),
|
|
208
|
-
recover: (args) => Effect2.tryPromise({
|
|
209
|
-
try: async () => toInfo(await client.halo.recoverIdentity(args)),
|
|
210
|
-
catch: (error) => new IdentityError({
|
|
211
|
-
context: {
|
|
212
|
-
error
|
|
213
|
-
}
|
|
214
|
-
})
|
|
215
|
-
}),
|
|
216
|
-
updateProfile: (profile) => Effect2.tryPromise({
|
|
217
|
-
try: async () => toInfo(await client.halo.updateProfile(profile)),
|
|
218
|
-
catch: (error) => new IdentityError({
|
|
219
|
-
context: {
|
|
220
|
-
error
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
}),
|
|
224
|
-
devices: streamFromObservable(client.halo.devices).pipe(Stream2.map((devices) => devices.map(toDeviceInfo))),
|
|
225
|
-
getDevicesSnapshot: () => client.halo.devices.get().map(toDeviceInfo),
|
|
226
|
-
credentials: streamFromObservable(client.halo.credentials).pipe(Stream2.map((credentials) => credentials.map(toCredential))),
|
|
227
|
-
grantServiceAccess: (options) => Effect2.tryPromise({
|
|
228
|
-
try: async () => {
|
|
229
|
-
const identityKey = client.halo.identity.get()?.identityKey;
|
|
230
|
-
if (!identityKey) {
|
|
231
|
-
throw new Error("No identity.");
|
|
232
|
-
}
|
|
233
|
-
await client.halo.writeCredentials([
|
|
234
|
-
{
|
|
235
|
-
issuer: identityKey,
|
|
236
|
-
issuanceDate: /* @__PURE__ */ new Date(),
|
|
237
|
-
subject: {
|
|
238
|
-
id: identityKey,
|
|
239
|
-
assertion: {
|
|
240
|
-
"@type": "dxos.halo.credentials.ServiceAccess",
|
|
241
|
-
"serverName": options.serverName,
|
|
242
|
-
"serverKey": identityKey,
|
|
243
|
-
identityKey,
|
|
244
|
-
"capabilities": [
|
|
245
|
-
...options.capabilities
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
]);
|
|
251
|
-
},
|
|
252
|
-
catch: (error) => new IdentityError({
|
|
253
|
-
context: {
|
|
254
|
-
error
|
|
255
|
-
}
|
|
256
|
-
})
|
|
257
|
-
}),
|
|
258
|
-
share: (options) => Effect2.try({
|
|
259
|
-
try: () => makeFlow(client.halo.share(toShareOptions(options)), "device"),
|
|
260
|
-
catch: (error) => new IdentityError({
|
|
261
|
-
context: {
|
|
262
|
-
error
|
|
263
|
-
}
|
|
264
|
-
})
|
|
265
|
-
}),
|
|
266
|
-
join: (code) => Effect2.try({
|
|
267
|
-
try: () => makeFlow(client.halo.join(InvitationEncoder2.decode(code)), "device"),
|
|
268
|
-
catch: (error) => new IdentityError({
|
|
269
|
-
context: {
|
|
270
|
-
error
|
|
271
|
-
}
|
|
272
|
-
})
|
|
273
|
-
}),
|
|
274
|
-
invitations: streamFromObservable(client.halo.invitations).pipe(Stream2.map((invitations) => invitations.map((invitation) => makeFlow(invitation, "device"))))
|
|
275
|
-
});
|
|
276
|
-
var layerIdentity = (client) => Layer.succeed(HaloIdentity.Service, makeIdentityService(client));
|
|
277
|
-
|
|
278
|
-
// src/space.ts
|
|
279
|
-
import * as Effect3 from "effect/Effect";
|
|
280
|
-
import * as Layer2 from "effect/Layer";
|
|
281
|
-
import * as Option2 from "effect/Option";
|
|
282
|
-
import * as Stream3 from "effect/Stream";
|
|
283
|
-
import { SpaceState } from "@dxos/client/echo";
|
|
284
|
-
import { Space as HaloSpace, SpaceError } from "@dxos/halo";
|
|
285
|
-
import { IdentityDid as IdentityDid2 } from "@dxos/keys";
|
|
286
|
-
import { SpaceArchive } from "@dxos/protocols/proto/dxos/client/services";
|
|
287
|
-
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
288
|
-
import { SpaceMember as HaloSpaceMember2, MembershipPolicy } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
289
|
-
var toState = (state) => {
|
|
290
|
-
switch (state) {
|
|
291
|
-
case SpaceState.SPACE_READY:
|
|
292
|
-
return "ready";
|
|
293
|
-
case SpaceState.SPACE_CLOSED:
|
|
294
|
-
return "closed";
|
|
295
|
-
default:
|
|
296
|
-
return "inactive";
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
var toSpaceInfo = (space) => ({
|
|
300
|
-
id: space.id,
|
|
301
|
-
name: space.state.get() === SpaceState.SPACE_READY ? space.properties.name : void 0,
|
|
302
|
-
state: toState(space.state.get())
|
|
303
|
-
});
|
|
304
|
-
var toMembers = (members) => members.flatMap((member) => {
|
|
305
|
-
const role = toAccess(member.role);
|
|
306
|
-
if (role === void 0) {
|
|
307
|
-
return [];
|
|
308
|
-
}
|
|
309
|
-
return [
|
|
310
|
-
{
|
|
311
|
-
did: member.identity?.did !== void 0 ? IdentityDid2.make(member.identity.did) : void 0,
|
|
312
|
-
identityKey: member.identity?.identityKey?.toHex(),
|
|
313
|
-
displayName: member.identity?.profile?.displayName,
|
|
314
|
-
data: member.identity?.profile?.data,
|
|
315
|
-
role,
|
|
316
|
-
online: isOnline(member)
|
|
317
|
-
}
|
|
318
|
-
];
|
|
319
|
-
});
|
|
320
|
-
var toMembershipPolicy = (policy) => policy === "locked" ? MembershipPolicy.LOCKED : MembershipPolicy.INVITE;
|
|
321
|
-
var toEdgeReplicationSetting = (setting) => setting === "enabled" ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED;
|
|
322
|
-
var resolveSpace = (client, id) => {
|
|
323
|
-
const space = client.spaces.get(id);
|
|
324
|
-
if (!space) {
|
|
325
|
-
throw new Error(`Space not found: ${id}`);
|
|
326
|
-
}
|
|
327
|
-
return space;
|
|
328
|
-
};
|
|
329
|
-
var setMemberRole = async (client, id, subject, newRole) => {
|
|
330
|
-
const space = resolveSpace(client, id);
|
|
331
|
-
const member = space.members.get().find((entry) => entry.identity?.did === subject);
|
|
332
|
-
if (!member) {
|
|
333
|
-
throw new Error(`Member not found: ${subject}`);
|
|
334
|
-
}
|
|
335
|
-
await space.updateMemberRole({
|
|
336
|
-
memberKey: member.identity.identityKey,
|
|
337
|
-
newRole
|
|
338
|
-
});
|
|
339
|
-
};
|
|
340
|
-
var makeSpaceService = (client) => ({
|
|
341
|
-
spaces: streamFromObservable(client.spaces).pipe(Stream3.map((spaces) => (spaces ?? []).map(toSpaceInfo))),
|
|
342
|
-
get: (id) => Effect3.sync(() => {
|
|
343
|
-
const space = client.spaces.get(id);
|
|
344
|
-
return space ? Option2.some(toSpaceInfo(space)) : Option2.none();
|
|
345
|
-
}),
|
|
346
|
-
create: (options) => Effect3.tryPromise({
|
|
347
|
-
try: async () => {
|
|
348
|
-
const createOptions = {};
|
|
349
|
-
if (options?.tags !== void 0) {
|
|
350
|
-
createOptions.tags = [
|
|
351
|
-
...options.tags
|
|
352
|
-
];
|
|
353
|
-
}
|
|
354
|
-
if (options?.membershipPolicy !== void 0) {
|
|
355
|
-
createOptions.membershipPolicy = toMembershipPolicy(options.membershipPolicy);
|
|
356
|
-
}
|
|
357
|
-
return toSpaceInfo(await client.spaces.create(options?.name !== void 0 ? {
|
|
358
|
-
name: options.name
|
|
359
|
-
} : {}, createOptions));
|
|
360
|
-
},
|
|
361
|
-
catch: (error) => new SpaceError({
|
|
362
|
-
context: {
|
|
363
|
-
error
|
|
364
|
-
}
|
|
365
|
-
})
|
|
366
|
-
}),
|
|
367
|
-
waitReady: (id) => Effect3.tryPromise({
|
|
368
|
-
try: async () => {
|
|
369
|
-
await resolveSpace(client, id).waitUntilReady();
|
|
370
|
-
},
|
|
371
|
-
catch: (error) => new SpaceError({
|
|
372
|
-
context: {
|
|
373
|
-
error
|
|
374
|
-
}
|
|
375
|
-
})
|
|
376
|
-
}),
|
|
377
|
-
setEdgeReplication: (id, setting) => Effect3.tryPromise({
|
|
378
|
-
try: async () => {
|
|
379
|
-
await resolveSpace(client, id).internal.setEdgeReplicationPreference(toEdgeReplicationSetting(setting));
|
|
380
|
-
},
|
|
381
|
-
catch: (error) => new SpaceError({
|
|
382
|
-
context: {
|
|
383
|
-
error
|
|
384
|
-
}
|
|
385
|
-
})
|
|
386
|
-
}),
|
|
387
|
-
members: (id) => {
|
|
388
|
-
const space = client.spaces.get(id);
|
|
389
|
-
return space ? streamFromObservable(space.members).pipe(Stream3.map(toMembers)) : Stream3.empty;
|
|
390
|
-
},
|
|
391
|
-
updateMemberRole: (id, subject, role) => Effect3.tryPromise({
|
|
392
|
-
try: async () => {
|
|
393
|
-
const newRole = fromAccess(role);
|
|
394
|
-
if (newRole === void 0) {
|
|
395
|
-
throw new Error(`No legacy role for access level: ${role}`);
|
|
396
|
-
}
|
|
397
|
-
await setMemberRole(client, id, subject, newRole);
|
|
398
|
-
},
|
|
399
|
-
catch: (error) => new SpaceError({
|
|
400
|
-
context: {
|
|
401
|
-
error
|
|
402
|
-
}
|
|
403
|
-
})
|
|
404
|
-
}),
|
|
405
|
-
removeMember: (id, subject) => Effect3.tryPromise({
|
|
406
|
-
try: () => setMemberRole(client, id, subject, HaloSpaceMember2.Role.REMOVED),
|
|
407
|
-
catch: (error) => new SpaceError({
|
|
408
|
-
context: {
|
|
409
|
-
error
|
|
410
|
-
}
|
|
411
|
-
})
|
|
412
|
-
}),
|
|
413
|
-
share: (id, options) => Effect3.try({
|
|
414
|
-
try: () => makeFlow(resolveSpace(client, id).share(toShareOptions(options)), "space"),
|
|
415
|
-
catch: (error) => new SpaceError({
|
|
416
|
-
context: {
|
|
417
|
-
error
|
|
418
|
-
}
|
|
419
|
-
})
|
|
420
|
-
}),
|
|
421
|
-
join: (code) => Effect3.try({
|
|
422
|
-
try: () => makeFlow(client.spaces.join(code), "space"),
|
|
423
|
-
catch: (error) => new SpaceError({
|
|
424
|
-
context: {
|
|
425
|
-
error
|
|
426
|
-
}
|
|
427
|
-
})
|
|
428
|
-
}),
|
|
429
|
-
invitations: (id) => {
|
|
430
|
-
const space = client.spaces.get(id);
|
|
431
|
-
return space ? streamFromObservable(space.invitations).pipe(Stream3.map((invitations) => invitations.map((invitation) => makeFlow(invitation, "space")))) : Stream3.empty;
|
|
432
|
-
},
|
|
433
|
-
export: (id) => Effect3.tryPromise({
|
|
434
|
-
try: async () => {
|
|
435
|
-
const archive = await resolveSpace(client, id).internal.export();
|
|
436
|
-
return {
|
|
437
|
-
filename: archive.filename,
|
|
438
|
-
contents: archive.contents
|
|
439
|
-
};
|
|
440
|
-
},
|
|
441
|
-
catch: (error) => new SpaceError({
|
|
442
|
-
context: {
|
|
443
|
-
error
|
|
444
|
-
}
|
|
445
|
-
})
|
|
446
|
-
}),
|
|
447
|
-
import: (archive, options) => Effect3.tryPromise({
|
|
448
|
-
try: async () => {
|
|
449
|
-
const format = archive.filename.endsWith(".json") ? SpaceArchive.Format.JSON : SpaceArchive.Format.BINARY;
|
|
450
|
-
const space = await client.spaces.import({
|
|
451
|
-
filename: archive.filename,
|
|
452
|
-
contents: archive.contents,
|
|
453
|
-
format
|
|
454
|
-
}, options?.tags !== void 0 ? {
|
|
455
|
-
tags: [
|
|
456
|
-
...options.tags
|
|
457
|
-
]
|
|
458
|
-
} : void 0);
|
|
459
|
-
return toSpaceInfo(space);
|
|
460
|
-
},
|
|
461
|
-
catch: (error) => new SpaceError({
|
|
462
|
-
context: {
|
|
463
|
-
error
|
|
464
|
-
}
|
|
465
|
-
})
|
|
466
|
-
})
|
|
467
|
-
});
|
|
468
|
-
var layerSpace = (client) => Layer2.succeed(HaloSpace.Service, makeSpaceService(client));
|
|
469
|
-
|
|
470
|
-
// src/index.ts
|
|
471
|
-
var layerClient = (client) => Layer3.mergeAll(layerIdentity(client), layerSpace(client));
|
|
472
|
-
export {
|
|
473
|
-
layerClient,
|
|
474
|
-
layerIdentity,
|
|
475
|
-
layerSpace,
|
|
476
|
-
makeIdentityService,
|
|
477
|
-
makeSpaceService
|
|
478
|
-
};
|
|
479
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/index.ts", "../../../src/identity.ts", "../../../src/util.ts", "../../../src/space.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Layer from 'effect/Layer';\n\nimport { type Client } from '@dxos/client';\nimport { type Identity, type Space } from '@dxos/halo';\n\nimport { layerIdentity } from './identity';\nimport { layerSpace } from './space';\n\nexport { layerIdentity, makeIdentityService } from './identity';\nexport { layerSpace, makeSpaceService } from './space';\n\n/**\n * A single layer providing both HALO services ({@link Identity.Service}, {@link Space.Service})\n * backed by one {@link Client}. This is the composition-root layer that replaces direct\n * `@dxos/client` access for HALO concerns. Invitation querying lives on these two services;\n * flow-level verbs need no service.\n */\nexport const layerClient = (client: Client): Layer.Layer<Identity.Service | Space.Service> =>\n Layer.mergeAll(layerIdentity(client), layerSpace(client));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\nimport * as Option from 'effect/Option';\nimport * as Stream from 'effect/Stream';\n\nimport { type Client } from '@dxos/client';\nimport { InvitationEncoder } from '@dxos/client/invitations';\nimport { Identity as HaloIdentity, IdentityError } from '@dxos/halo';\nimport { IdentityDid } from '@dxos/keys';\nimport {\n type Device as ClientDevice,\n type Identity as ClientIdentity,\n DeviceKind,\n} from '@dxos/protocols/proto/dxos/client/services';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { makeFlow, streamFromObservable, toShareOptions } from './util';\n\nconst toInfo = (identity: ClientIdentity): HaloIdentity.Info => ({\n did: IdentityDid.make(identity.did),\n identityKey: identity.identityKey?.toHex(),\n displayName: identity.profile?.displayName,\n data: identity.profile?.data,\n});\n\nconst toDeviceInfo = (device: ClientDevice): HaloIdentity.DeviceInfo => ({\n key: device.deviceKey.toHex(),\n label: device.profile?.label,\n current: device.kind === DeviceKind.CURRENT,\n});\n\nconst toCredential = (credential: Credential): HaloIdentity.Credential => ({\n id: credential.id?.toHex(),\n type: credential.subject.assertion['@type'],\n issuanceDate: credential.issuanceDate,\n});\n\n/**\n * Builds the {@link HaloIdentity.Service} implementation over a client's `halo` proxy.\n */\nexport const makeIdentityService = (client: Client): Context.Tag.Service<HaloIdentity.Service> => ({\n identity: streamFromObservable(client.halo.identity).pipe(\n Stream.map((identity) => (identity ? Option.some(toInfo(identity)) : Option.none())),\n ),\n\n getSnapshot: () => {\n const identity = client.halo.identity.get();\n return identity ? Option.some(toInfo(identity)) : Option.none();\n },\n\n subscribe: (callback) => {\n const subscription = client.halo.identity.subscribe((identity) =>\n callback(identity ? Option.some(toInfo(identity)) : Option.none()),\n );\n return () => subscription.unsubscribe();\n },\n\n create: (options) =>\n Effect.tryPromise({\n try: async () =>\n toInfo(\n await client.halo.createIdentity(\n options?.displayName !== undefined ? { displayName: options.displayName } : {},\n options?.deviceLabel !== undefined ? { label: options.deviceLabel } : undefined,\n ),\n ),\n catch: (error) => new IdentityError({ context: { error } }),\n }),\n\n recover: (args) =>\n Effect.tryPromise({\n try: async () => toInfo(await client.halo.recoverIdentity(args)),\n catch: (error) => new IdentityError({ context: { error } }),\n }),\n\n updateProfile: (profile) =>\n Effect.tryPromise({\n try: async () => toInfo(await client.halo.updateProfile(profile)),\n catch: (error) => new IdentityError({ context: { error } }),\n }),\n\n devices: streamFromObservable(client.halo.devices).pipe(Stream.map((devices) => devices.map(toDeviceInfo))),\n\n getDevicesSnapshot: () => client.halo.devices.get().map(toDeviceInfo),\n\n credentials: streamFromObservable(client.halo.credentials).pipe(\n Stream.map((credentials) => credentials.map(toCredential)),\n ),\n\n grantServiceAccess: (options) =>\n Effect.tryPromise({\n try: async () => {\n const identityKey = client.halo.identity.get()?.identityKey;\n if (!identityKey) {\n throw new Error('No identity.');\n }\n await client.halo.writeCredentials([\n {\n issuer: identityKey,\n issuanceDate: new Date(),\n subject: {\n id: identityKey,\n assertion: {\n '@type': 'dxos.halo.credentials.ServiceAccess',\n 'serverName': options.serverName,\n 'serverKey': identityKey,\n identityKey,\n 'capabilities': [...options.capabilities],\n },\n },\n },\n ]);\n },\n catch: (error) => new IdentityError({ context: { error } }),\n }),\n\n share: (options) =>\n Effect.try({\n try: () => makeFlow(client.halo.share(toShareOptions(options)), 'device'),\n catch: (error) => new IdentityError({ context: { error } }),\n }),\n\n join: (code) =>\n Effect.try({\n try: () => makeFlow(client.halo.join(InvitationEncoder.decode(code)), 'device'),\n catch: (error) => new IdentityError({ context: { error } }),\n }),\n\n invitations: streamFromObservable(client.halo.invitations).pipe(\n Stream.map((invitations) => invitations.map((invitation) => makeFlow(invitation, 'device'))),\n ),\n});\n\n/**\n * Layer providing {@link HaloIdentity.Service} backed by the given client.\n */\nexport const layerIdentity = (client: Client): Layer.Layer<HaloIdentity.Service> =>\n Layer.succeed(HaloIdentity.Service, makeIdentityService(client));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Stream from 'effect/Stream';\n\nimport { type MulticastObservable } from '@dxos/async';\nimport {\n AuthenticatingInvitationObservable,\n type CancellableInvitationObservable,\n Invitation as ClientInvitation,\n InvitationEncoder,\n} from '@dxos/client/invitations';\nimport { Invitation as HaloInvitation, Space as HaloSpace, InvitationError } from '@dxos/halo';\nimport { SpaceMember } from '@dxos/protocols/proto/dxos/client/services';\nimport { SpaceMember as HaloSpaceMember } from '@dxos/protocols/proto/dxos/halo/credentials';\n\n/**\n * Bridges a {@link MulticastObservable} into an Effect {@link Stream}. The current value is\n * emitted on subscription (matching the observable's semantics); the stream runs until the\n * consumer stops or the observable errors.\n */\nexport const streamFromObservable = <T>(observable: MulticastObservable<T>): Stream.Stream<T> =>\n Stream.async<T, Error>((emit) => {\n const subscription = observable.subscribe(\n (value: T) => void emit.single(value),\n (err: Error) => void emit.fail(err),\n );\n return Effect.sync(() => subscription.unsubscribe());\n }).pipe(Stream.orDie);\n\nconst TERMINAL_STATES: ReadonlySet<ClientInvitation.State> = new Set([\n ClientInvitation.State.SUCCESS,\n ClientInvitation.State.CANCELLED,\n ClientInvitation.State.TIMEOUT,\n ClientInvitation.State.ERROR,\n ClientInvitation.State.EXPIRED,\n]);\n\nconst toEvent = (invitation: ClientInvitation): HaloInvitation.Event | undefined => {\n switch (invitation.state) {\n case ClientInvitation.State.CONNECTING:\n return { _tag: 'connecting' };\n case ClientInvitation.State.CONNECTED:\n return { _tag: 'connected' };\n case ClientInvitation.State.READY_FOR_AUTHENTICATION:\n return { _tag: 'readyForAuthentication', authCode: invitation.authCode };\n case ClientInvitation.State.AUTHENTICATING:\n return { _tag: 'authenticating' };\n case ClientInvitation.State.SUCCESS:\n return { _tag: 'success', result: {} };\n case ClientInvitation.State.CANCELLED:\n return { _tag: 'cancelled' };\n case ClientInvitation.State.TIMEOUT:\n case ClientInvitation.State.ERROR:\n case ClientInvitation.State.EXPIRED:\n return { _tag: 'error', message: `Invitation ${ClientInvitation.State[invitation.state]}` };\n default:\n // INIT and any unmodeled state — not surfaced.\n return undefined;\n }\n};\n\n/**\n * Maps an invitation observable's state transitions to the {@link HaloInvitation.Event} stream,\n * completing after a terminal event.\n */\nexport const invitationEvents = (observable: CancellableInvitationObservable): Stream.Stream<HaloInvitation.Event> =>\n Stream.async<HaloInvitation.Event>((emit) => {\n const subscription = observable.subscribe(\n (invitation: ClientInvitation) => {\n const event = toEvent(invitation);\n if (event) {\n void emit.single(event);\n if (TERMINAL_STATES.has(invitation.state)) {\n void emit.end();\n }\n }\n },\n (err: Error) => {\n void emit.single({ _tag: 'error', message: err.message });\n void emit.end();\n },\n );\n return Effect.sync(() => subscription.unsubscribe());\n });\n\n/**\n * Wraps a client invitation observable as a {@link HaloInvitation.Flow}.\n */\nexport const makeFlow = (\n observable: CancellableInvitationObservable,\n kind: HaloInvitation.Kind,\n): HaloInvitation.Flow => ({\n id: observable.get().invitationId,\n kind,\n events: invitationEvents(observable),\n authenticate: (code: string) =>\n observable instanceof AuthenticatingInvitationObservable\n ? Effect.tryPromise({\n try: () => observable.authenticate(code),\n catch: (error) => new InvitationError({ context: { error } }),\n })\n : Effect.fail(new InvitationError({ context: { reason: 'flow is not awaiting authentication' } })),\n cancel: () => Effect.promise(() => observable.cancel()),\n code: Effect.sync(() => InvitationEncoder.encode(observable.get())),\n});\n\n/**\n * Maps {@link HaloInvitation.ShareOptions} to the client invitation options. Defaults to a\n * no-auth interactive invitation so programmatic flows complete without an auth code.\n */\nexport const toShareOptions = (options?: HaloInvitation.ShareOptions): Partial<ClientInvitation> => ({\n authMethod: toAuthMethod(options?.authMethod),\n type: toType(options?.type),\n ...(options?.multiUse !== undefined ? { multiUse: options.multiUse } : {}),\n ...(options?.target !== undefined ? { target: options.target } : {}),\n});\n\nconst toAuthMethod = (method?: HaloInvitation.AuthMethod): ClientInvitation.AuthMethod => {\n switch (method) {\n case 'shared-secret':\n return ClientInvitation.AuthMethod.SHARED_SECRET;\n case 'known-public-key':\n return ClientInvitation.AuthMethod.KNOWN_PUBLIC_KEY;\n case 'none':\n default:\n return ClientInvitation.AuthMethod.NONE;\n }\n};\n\nconst toType = (type?: HaloInvitation.Type): ClientInvitation.Type => {\n switch (type) {\n case 'delegated':\n return ClientInvitation.Type.DELEGATED;\n case 'multiuse':\n return ClientInvitation.Type.MULTIUSE;\n case 'interactive':\n default:\n return ClientInvitation.Type.INTERACTIVE;\n }\n};\n\n/**\n * Maps a legacy space-member role to the Keyhive-aligned {@link HaloSpace.Access} level.\n * Returns `undefined` for `REMOVED` (not a current member).\n */\nexport const toAccess = (role: HaloSpaceMember.Role): HaloSpace.Access | undefined => {\n switch (role) {\n case HaloSpaceMember.Role.OWNER:\n case HaloSpaceMember.Role.ADMIN:\n return 'admin';\n case HaloSpaceMember.Role.EDITOR:\n return 'edit';\n case HaloSpaceMember.Role.READER:\n return 'read';\n default:\n return undefined;\n }\n};\n\n/**\n * Maps a Keyhive-aligned {@link HaloSpace.Access} level to a legacy space-member role.\n * Returns `undefined` for `pull` (no legacy equivalent — reject at the call site).\n */\nexport const fromAccess = (access: HaloSpace.Access): HaloSpaceMember.Role | undefined => {\n switch (access) {\n case 'admin':\n return HaloSpaceMember.Role.ADMIN;\n case 'edit':\n return HaloSpaceMember.Role.EDITOR;\n case 'read':\n return HaloSpaceMember.Role.READER;\n default:\n return undefined;\n }\n};\n\n/**\n * Whether a member is currently online.\n */\nexport const isOnline = (member: SpaceMember): boolean => member.presence === SpaceMember.PresenceState.ONLINE;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\nimport * as Option from 'effect/Option';\nimport * as Stream from 'effect/Stream';\n\nimport { type Client } from '@dxos/client';\nimport { type Space as ClientSpace, SpaceState } from '@dxos/client/echo';\nimport { Space as HaloSpace, SpaceError } from '@dxos/halo';\nimport { IdentityDid, type SpaceId } from '@dxos/keys';\nimport { SpaceArchive, type SpaceMember } from '@dxos/protocols/proto/dxos/client/services';\nimport { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';\nimport { SpaceMember as HaloSpaceMember, MembershipPolicy } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { fromAccess, isOnline, makeFlow, streamFromObservable, toAccess, toShareOptions } from './util';\n\nconst toState = (state: SpaceState): HaloSpace.State => {\n switch (state) {\n case SpaceState.SPACE_READY:\n return 'ready';\n case SpaceState.SPACE_CLOSED:\n return 'closed';\n default:\n return 'inactive';\n }\n};\n\nconst toSpaceInfo = (space: ClientSpace): HaloSpace.Info => ({\n id: space.id,\n name: space.state.get() === SpaceState.SPACE_READY ? space.properties.name : undefined,\n state: toState(space.state.get()),\n});\n\nconst toMembers = (members: readonly SpaceMember[]): HaloSpace.Member[] =>\n members.flatMap((member) => {\n const role = toAccess(member.role);\n if (role === undefined) {\n // Skip removed members.\n return [];\n }\n return [\n {\n did: member.identity?.did !== undefined ? IdentityDid.make(member.identity.did) : undefined,\n identityKey: member.identity?.identityKey?.toHex(),\n displayName: member.identity?.profile?.displayName,\n data: member.identity?.profile?.data,\n role,\n online: isOnline(member),\n },\n ];\n });\n\nconst toMembershipPolicy = (policy: HaloSpace.MembershipPolicy): MembershipPolicy =>\n policy === 'locked' ? MembershipPolicy.LOCKED : MembershipPolicy.INVITE;\n\nconst toEdgeReplicationSetting = (setting: HaloSpace.EdgeReplication): EdgeReplicationSetting =>\n setting === 'enabled' ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED;\n\nconst resolveSpace = (client: Client, id: SpaceId): ClientSpace => {\n const space = client.spaces.get(id);\n if (!space) {\n throw new Error(`Space not found: ${id}`);\n }\n return space;\n};\n\n// The HALO API addresses members by DID; the legacy proxy needs the identity key, resolved here\n// from the materialized membership.\nconst setMemberRole = async (\n client: Client,\n id: SpaceId,\n subject: IdentityDid,\n newRole: HaloSpaceMember.Role,\n): Promise<void> => {\n const space = resolveSpace(client, id);\n const member = space.members.get().find((entry) => entry.identity?.did === subject);\n if (!member) {\n throw new Error(`Member not found: ${subject}`);\n }\n await space.updateMemberRole({ memberKey: member.identity.identityKey, newRole });\n};\n\n/**\n * Builds the {@link HaloSpace.Service} implementation over a client's `spaces` proxy.\n */\nexport const makeSpaceService = (client: Client): Context.Tag.Service<HaloSpace.Service> => ({\n spaces: streamFromObservable(client.spaces).pipe(Stream.map((spaces) => (spaces ?? []).map(toSpaceInfo))),\n\n get: (id) =>\n Effect.sync(() => {\n const space = client.spaces.get(id);\n return space ? Option.some(toSpaceInfo(space)) : Option.none();\n }),\n\n create: (options) =>\n Effect.tryPromise({\n try: async () => {\n const createOptions: { tags?: string[]; membershipPolicy?: MembershipPolicy } = {};\n if (options?.tags !== undefined) {\n createOptions.tags = [...options.tags];\n }\n if (options?.membershipPolicy !== undefined) {\n createOptions.membershipPolicy = toMembershipPolicy(options.membershipPolicy);\n }\n return toSpaceInfo(\n await client.spaces.create(options?.name !== undefined ? { name: options.name } : {}, createOptions),\n );\n },\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n waitReady: (id) =>\n Effect.tryPromise({\n try: async () => {\n await resolveSpace(client, id).waitUntilReady();\n },\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n setEdgeReplication: (id, setting) =>\n Effect.tryPromise({\n try: async () => {\n await resolveSpace(client, id).internal.setEdgeReplicationPreference(toEdgeReplicationSetting(setting));\n },\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n members: (id) => {\n const space = client.spaces.get(id);\n return space ? streamFromObservable(space.members).pipe(Stream.map(toMembers)) : Stream.empty;\n },\n\n updateMemberRole: (id, subject, role) =>\n Effect.tryPromise({\n try: async () => {\n const newRole = fromAccess(role);\n if (newRole === undefined) {\n throw new Error(`No legacy role for access level: ${role}`);\n }\n await setMemberRole(client, id, subject, newRole);\n },\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n removeMember: (id, subject) =>\n Effect.tryPromise({\n try: () => setMemberRole(client, id, subject, HaloSpaceMember.Role.REMOVED),\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n share: (id, options) =>\n Effect.try({\n try: () => makeFlow(resolveSpace(client, id).share(toShareOptions(options)), 'space'),\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n join: (code) =>\n Effect.try({\n try: () => makeFlow(client.spaces.join(code), 'space'),\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n invitations: (id) => {\n const space = client.spaces.get(id);\n return space\n ? streamFromObservable(space.invitations).pipe(\n Stream.map((invitations) => invitations.map((invitation) => makeFlow(invitation, 'space'))),\n )\n : Stream.empty;\n },\n\n export: (id) =>\n Effect.tryPromise({\n try: async () => {\n const archive = await resolveSpace(client, id).internal.export();\n return { filename: archive.filename, contents: archive.contents };\n },\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n\n import: (archive, options) =>\n Effect.tryPromise({\n try: async () => {\n const format = archive.filename.endsWith('.json') ? SpaceArchive.Format.JSON : SpaceArchive.Format.BINARY;\n const space = await client.spaces.import(\n { filename: archive.filename, contents: archive.contents, format },\n options?.tags !== undefined ? { tags: [...options.tags] } : undefined,\n );\n return toSpaceInfo(space);\n },\n catch: (error) => new SpaceError({ context: { error } }),\n }),\n});\n\n/**\n * Layer providing {@link HaloSpace.Service} backed by the given client.\n */\nexport const layerSpace = (client: Client): Layer.Layer<HaloSpace.Service> =>\n Layer.succeed(HaloSpace.Service, makeSpaceService(client));\n"],
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAW;;;ACCvB,YAAYC,aAAY;AACxB,YAAYC,WAAW;AACvB,YAAYC,YAAY;AACxB,YAAYC,aAAY;AAGxB,SAASC,qBAAAA,0BAAyB;AAClC,SAASC,YAAYC,cAAcC,qBAAqB;AACxD,SAASC,mBAAmB;AAC5B,SAGEC,kBACK;;;ACdP,YAA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CAAA,IAE5EZ;EACb;EAEAa,QAAQ,CAAC/E,OACAoD,mBAAW;IAChBC,KAAK,YAAA;AACH,YAAM2B,UAAU,MAAMhD,aAAaC,QAAQjC,EAAAA,EAAIgE,SAASe,OAAM;AAC9D,aAAO;QAAEE,UAAUD,QAAQC;QAAUC,UAAUF,QAAQE;MAAS;IAClE;IACAzB,OAAO,CAACC,UAAU,IAAIC,WAAW;MAAEC,SAAS;QAAEF;MAAM;IAAE,CAAA;EACxD,CAAA;EAEFyB,QAAQ,CAACH,SAAS7B,YACTC,mBAAW;IAChBC,KAAK,YAAA;AACH,YAAM+B,SAASJ,QAAQC,SAASI,SAAS,OAAA,IAAWC,aAAaC,OAAOC,OAAOF,aAAaC,OAAOE;AACnG,YAAM1F,QAAQ,MAAMkC,OAAOC,OAAOiD,OAChC;QAAEF,UAAUD,QAAQC;QAAUC,UAAUF,QAAQE;QAAUE;MAAO,GACjEjC,SAASI,SAASnD,SAAY;QAAEmD,MAAM;aAAIJ,QAAQI;;MAAM,IAAInD,MAAAA;AAE9D,aAAON,YAAYC,KAAAA;IACrB;IACA0D,OAAO,CAACC,UAAU,IAAIC,WAAW;MAAEC,SAAS;QAAEF;MAAM;IAAE,CAAA;EACxD,CAAA;AACJ;AAKO,IAAMgC,aAAa,CAACzD,WACnB0D,eAAQC,UAAUC,SAASlD,iBAAiBV,MAAAA,CAAAA;;;AHrL7C,IAAM6D,cAAc,CAACC,WACpBC,gBAASC,cAAcF,MAAAA,GAASG,WAAWH,MAAAA,CAAAA;",
|
|
6
|
-
"names": ["Layer", "Effect", "Layer", "Option", "Stream", "InvitationEncoder", "Identity", "HaloIdentity", "IdentityError", "IdentityDid", "DeviceKind", "Effect", "Stream", "AuthenticatingInvitationObservable", "Invitation", "ClientInvitation", "InvitationEncoder", "InvitationError", "SpaceMember", "HaloSpaceMember", "streamFromObservable", "observable", "async", "emit", "subscription", "subscribe", "value", "single", "err", "fail", "sync", "unsubscribe", "pipe", "orDie", "TERMINAL_STATES", "Set", "State", "SUCCESS", "CANCELLED", "TIMEOUT", "ERROR", "EXPIRED", "toEvent", "invitation", "state", "CONNECTING", "_tag", "CONNECTED", "READY_FOR_AUTHENTICATION", "authCode", "AUTHENTICATING", "result", "message", "undefined", "invitationEvents", "event", "has", "end", "makeFlow", "kind", "id", "get", "invitationId", "events", "authenticate", "code", "tryPromise", "try", "catch", "error", "context", "reason", "cancel", "promise", "encode", "toShareOptions", "options", "authMethod", "toAuthMethod", "type", "toType", "multiUse", "target", "method", "AuthMethod", "SHARED_SECRET", "KNOWN_PUBLIC_KEY", "NONE", "Type", "DELEGATED", "MULTIUSE", "INTERACTIVE", "toAccess", "role", "Role", "OWNER", "ADMIN", "EDITOR", "READER", "fromAccess", "access", "isOnline", "member", "presence", "PresenceState", "ONLINE", "toInfo", "identity", "did", "IdentityDid", "make", "identityKey", "toHex", "displayName", "profile", "data", "toDeviceInfo", "device", "key", "deviceKey", "label", "current", "kind", "DeviceKind", "CURRENT", "toCredential", "credential", "id", "type", "subject", "assertion", "issuanceDate", "makeIdentityService", "client", "streamFromObservable", "halo", "pipe", "map", "some", "none", "getSnapshot", "get", "subscribe", "callback", "subscription", "unsubscribe", "create", "options", "tryPromise", "try", "createIdentity", "undefined", "deviceLabel", "catch", "error", "IdentityError", "context", "recover", "args", "recoverIdentity", "updateProfile", "devices", "getDevicesSnapshot", "credentials", "grantServiceAccess", "Error", "writeCredentials", "issuer", "Date", "serverName", "capabilities", "share", "makeFlow", "toShareOptions", "join", "code", "InvitationEncoder", "decode", "invitations", "invitation", "layerIdentity", "succeed", "HaloIdentity", "Service", "Effect", "Layer", "Option", "Stream", "SpaceState", "Space", "HaloSpace", "SpaceError", "IdentityDid", "SpaceArchive", "EdgeReplicationSetting", "SpaceMember", "HaloSpaceMember", "MembershipPolicy", "toState", "state", "SpaceState", "SPACE_READY", "SPACE_CLOSED", "toSpaceInfo", "space", "id", "name", "get", "properties", "undefined", "toMembers", "members", "flatMap", "member", "role", "toAccess", "did", "identity", "IdentityDid", "make", "identityKey", "toHex", "displayName", "profile", "data", "online", "isOnline", "toMembershipPolicy", "policy", "MembershipPolicy", "LOCKED", "INVITE", "toEdgeReplicationSetting", "setting", "EdgeReplicationSetting", "ENABLED", "DISABLED", "resolveSpace", "client", "spaces", "Error", "setMemberRole", "subject", "newRole", "find", "entry", "updateMemberRole", "memberKey", "makeSpaceService", "streamFromObservable", "pipe", "map", "sync", "some", "none", "create", "options", "tryPromise", "try", "createOptions", "tags", "membershipPolicy", "catch", "error", "SpaceError", "context", "waitReady", "waitUntilReady", "setEdgeReplication", "internal", "setEdgeReplicationPreference", "empty", "fromAccess", "removeMember", "HaloSpaceMember", "Role", "REMOVED", "share", "makeFlow", "toShareOptions", "join", "code", "invitations", "invitation", "export", "archive", "filename", "contents", "import", "format", "endsWith", "SpaceArchive", "Format", "JSON", "BINARY", "layerSpace", "succeed", "HaloSpace", "Service", "layerClient", "client", "mergeAll", "layerIdentity", "layerSpace"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/util.ts":{"bytes":21747,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/halo","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true}],"format":"esm"},"src/identity.ts":{"bytes":18285,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/halo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/space.ts":{"bytes":26716,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/halo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/metadata","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/index.ts":{"bytes":2550,"imports":[{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"src/identity.ts","kind":"import-statement","original":"./identity"},{"path":"src/space.ts","kind":"import-statement","original":"./space"},{"path":"src/identity.ts","kind":"import-statement","original":"./identity"},{"path":"src/space.ts","kind":"import-statement","original":"./space"}],"format":"esm"}},"outputs":{"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":34443},"dist/lib/neutral/index.mjs":{"imports":[{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/halo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/client/invitations","kind":"import-statement","external":true},{"path":"@dxos/halo","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/halo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/metadata","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true}],"exports":["layerClient","layerIdentity","layerSpace","makeIdentityService","makeSpaceService"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":130},"src/identity.ts":{"bytesInOutput":4124},"src/util.ts":{"bytesInOutput":4506},"src/space.ts":{"bytesInOutput":6049}},"bytes":15084}}}
|