@dxos/halo-adapter-client 0.0.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.
@@ -0,0 +1,7 @@
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,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAGxB,SACEC,oCAEAC,cAAcC,kBACdC,yBACK;AACP,SAA2DC,uBAAuB;AAClF,SAASC,mBAAmB;AAC5B,SAASA,eAAeC,uBAAuB;AAOxC,IAAMC,uBAAuB,CAAIC,eAC/BC,aAAgB,CAACC,SAAAA;AACtB,QAAMC,eAAeH,WAAWI,UAC9B,CAACC,UAAa,KAAKH,KAAKI,OAAOD,KAAAA,GAC/B,CAACE,QAAe,KAAKL,KAAKM,KAAKD,GAAAA,CAAAA;AAEjC,SAAcE,YAAK,MAAMN,aAAaO,YAAW,CAAA;AACnD,CAAA,EAAGC,KAAYC,YAAK;AAEtB,IAAMC,kBAAuD,oBAAIC,IAAI;EACnEpB,iBAAiBqB,MAAMC;EACvBtB,iBAAiBqB,MAAME;EACvBvB,iBAAiBqB,MAAMG;EACvBxB,iBAAiBqB,MAAMI;EACvBzB,iBAAiBqB,MAAMK;CACxB;AAED,IAAMC,UAAU,CAACC,eAAAA;AACf,UAAQA,WAAWC,OAAK;IACt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AE9D,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
+ }
@@ -0,0 +1 @@
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}}}
@@ -0,0 +1,13 @@
1
+ import * as Context from 'effect/Context';
2
+ import * as Layer from 'effect/Layer';
3
+ import { type Client } from '@dxos/client';
4
+ import { Identity as HaloIdentity } from '@dxos/halo';
5
+ /**
6
+ * Builds the {@link HaloIdentity.Service} implementation over a client's `halo` proxy.
7
+ */
8
+ export declare const makeIdentityService: (client: Client) => Context.Tag.Service<HaloIdentity.Service>;
9
+ /**
10
+ * Layer providing {@link HaloIdentity.Service} backed by the given client.
11
+ */
12
+ export declare const layerIdentity: (client: Client) => Layer.Layer<HaloIdentity.Service>;
13
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/identity.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAiB,MAAM,YAAY,CAAC;AA8BrE;;GAEG;AACH,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CA2F3F,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,WAAY,MAAM,KAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CACb,CAAC"}
@@ -0,0 +1,13 @@
1
+ import * as Layer from 'effect/Layer';
2
+ import { type Client } from '@dxos/client';
3
+ import { type Identity, type Space } from '@dxos/halo';
4
+ export { layerIdentity, makeIdentityService } from './identity';
5
+ export { layerSpace, makeSpaceService } from './space';
6
+ /**
7
+ * A single layer providing both HALO services ({@link Identity.Service}, {@link Space.Service})
8
+ * backed by one {@link Client}. This is the composition-root layer that replaces direct
9
+ * `@dxos/client` access for HALO concerns. Invitation querying lives on these two services;
10
+ * flow-level verbs need no service.
11
+ */
12
+ export declare const layerClient: (client: Client) => Layer.Layer<Identity.Service | Space.Service>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAKvD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,KAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAC9B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import * as Context from 'effect/Context';
2
+ import * as Layer from 'effect/Layer';
3
+ import { type Client } from '@dxos/client';
4
+ import { Space as HaloSpace } from '@dxos/halo';
5
+ /**
6
+ * Builds the {@link HaloSpace.Service} implementation over a client's `spaces` proxy.
7
+ */
8
+ export declare const makeSpaceService: (client: Client) => Context.Tag.Service<HaloSpace.Service>;
9
+ /**
10
+ * Layer providing {@link HaloSpace.Service} backed by the given client.
11
+ */
12
+ export declare const layerSpace: (client: Client) => Layer.Layer<HaloSpace.Service>;
13
+ //# sourceMappingURL=space.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/space.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAc,MAAM,YAAY,CAAC;AA0E5D;;GAEG;AACH,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CA2GrF,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,WAAY,MAAM,KAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CACb,CAAC"}
@@ -0,0 +1,41 @@
1
+ import * as Stream from 'effect/Stream';
2
+ import { type MulticastObservable } from '@dxos/async';
3
+ import { type CancellableInvitationObservable, Invitation as ClientInvitation } from '@dxos/client/invitations';
4
+ import { Invitation as HaloInvitation, Space as HaloSpace } from '@dxos/halo';
5
+ import { SpaceMember } from '@dxos/protocols/proto/dxos/client/services';
6
+ import { SpaceMember as HaloSpaceMember } from '@dxos/protocols/proto/dxos/halo/credentials';
7
+ /**
8
+ * Bridges a {@link MulticastObservable} into an Effect {@link Stream}. The current value is
9
+ * emitted on subscription (matching the observable's semantics); the stream runs until the
10
+ * consumer stops or the observable errors.
11
+ */
12
+ export declare const streamFromObservable: <T>(observable: MulticastObservable<T>) => Stream.Stream<T>;
13
+ /**
14
+ * Maps an invitation observable's state transitions to the {@link HaloInvitation.Event} stream,
15
+ * completing after a terminal event.
16
+ */
17
+ export declare const invitationEvents: (observable: CancellableInvitationObservable) => Stream.Stream<HaloInvitation.Event>;
18
+ /**
19
+ * Wraps a client invitation observable as a {@link HaloInvitation.Flow}.
20
+ */
21
+ export declare const makeFlow: (observable: CancellableInvitationObservable, kind: HaloInvitation.Kind) => HaloInvitation.Flow;
22
+ /**
23
+ * Maps {@link HaloInvitation.ShareOptions} to the client invitation options. Defaults to a
24
+ * no-auth interactive invitation so programmatic flows complete without an auth code.
25
+ */
26
+ export declare const toShareOptions: (options?: HaloInvitation.ShareOptions) => Partial<ClientInvitation>;
27
+ /**
28
+ * Maps a legacy space-member role to the Keyhive-aligned {@link HaloSpace.Access} level.
29
+ * Returns `undefined` for `REMOVED` (not a current member).
30
+ */
31
+ export declare const toAccess: (role: HaloSpaceMember.Role) => HaloSpace.Access | undefined;
32
+ /**
33
+ * Maps a Keyhive-aligned {@link HaloSpace.Access} level to a legacy space-member role.
34
+ * Returns `undefined` for `pull` (no legacy equivalent — reject at the call site).
35
+ */
36
+ export declare const fromAccess: (access: HaloSpace.Access) => HaloSpaceMember.Role | undefined;
37
+ /**
38
+ * Whether a member is currently online.
39
+ */
40
+ export declare const isOnline: (member: SpaceMember) => boolean;
41
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAEL,KAAK,+BAA+B,EACpC,UAAU,IAAI,gBAAgB,EAE/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,KAAK,IAAI,SAAS,EAAmB,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE7F;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,cAAc,mBAAmB,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAOrE,CAAC;AAkCxB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,eAAgB,+BAA+B,KAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAkB7G,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,QAAQ,eACP,+BAA+B,QACrC,cAAc,CAAC,IAAI,KACxB,cAAc,CAAC,IAahB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,aAAc,cAAc,CAAC,YAAY,KAAG,OAAO,CAAC,gBAAgB,CAK7F,CAAC;AA0BH;;;GAGG;AACH,eAAO,MAAM,QAAQ,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