import { MutationProcedureDescriptor } from '@voltro/protocol'; import { PluginRpcClientDescriptor } from '@voltro/protocol'; import { QueryProcedureDescriptor } from '@voltro/protocol'; import { ReactivityChannel } from '@voltro/protocol'; import { Schema } from 'effect'; import { YieldableError } from 'effect/Cause'; /** * The plugin's canonical package name — the key an app's `alias` is recorded * under, and what `./web`'s hooks resolve their tags through. * * It lives in this BROWSER-SAFE module rather than in `index.ts` because both * halves need it and only one of them may reach the server graph: `index.ts` * passes it to `pluginInstanceName` / `baseName`, and `web.ts` passes it to * `pluginTag`. A second copy in `web.ts` would be a second definition of the * plugin's identity with nothing comparing them. */ export declare const BASE_NAME = "@voltro/plugin-presence"; export declare const heartbeatDescriptor: MutationProcedureDescriptor<"presence.heartbeat", Schema.Struct<{ readonly channel: Schema.String; readonly key: Schema.optional; readonly meta: Schema.optional>; }>, Schema.Struct<{ readonly ok: Schema.Boolean; }>, Schema.Union>; export declare const leaveDescriptor: MutationProcedureDescriptor<"presence.leave", Schema.Struct<{ readonly channel: Schema.String; readonly key: Schema.optional; }>, Schema.Struct<{ readonly ok: Schema.Boolean; }>, Schema.Union>; export declare const listDescriptor: QueryProcedureDescriptor<"presence.list", Schema.Struct<{ readonly channel: Schema.String; }>, Schema.$Array>; }>>, typeof PresenceStoreUnavailable>; /** The caller has no presence identity — an anonymous subject (no subject id) * that also passed no explicit `key`. There's nothing stable to register a * heartbeat under, so the route fails typed instead of silently no-opping. * Pass `usePresence(channel, { key })` (or authenticate) to supply one. */ declare class PresenceKeyMissing extends PresenceKeyMissing_base { } declare const PresenceKeyMissing_base: Schema.Class, YieldableError>; /** * The roster's reactivity channel — presence's push target. * * Declared HERE, in the browser-safe descriptor module, for two reasons. It is * the `source:` of `listDescriptor`, so the client descriptor and the server * route now carry the SAME value instead of the server adding one the client * never saw. And the server's `publishReactivity` imports this exact object, so * the thing that publishes and the thing that subscribes cannot name two * different keys — the failure a pair of strings makes possible and silent. * * It replaces `_voltro_presence`, a table that was declared and deliberately * never written purely to own this name. */ export declare const presenceRoster: ReactivityChannel; /** Declared for the codegen (`VoltroPlugin.rpcClientDescriptors`) so each tag is * emitted into the generated client group. Kept in lockstep with the exports. */ export declare const presenceRpcClientImports: ReadonlyArray; /** The presence store isn't bound — `bindDataStore` never ran. This is a boot/ * wiring bug (the plugin wasn't installed on an app with a DataStore), not a * per-call condition, so it fails loud rather than returning an empty roster. */ declare class PresenceStoreUnavailable extends PresenceStoreUnavailable_base { } declare const PresenceStoreUnavailable_base: Schema.Class, YieldableError>; export { }