@voltro/plugin-presence 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1968 -0
- package/README.md +1 -1
- package/dist/index.d.ts +72 -71
- package/dist/index.js +132 -144
- package/dist/rpc.d.ts +16 -1
- package/dist/rpc.js +16 -13
- package/dist/web.d.ts +0 -1
- package/package.json +4 -5
package/dist/rpc.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { PresenceKeyMissing as e, PresenceStoreUnavailable as t } from "./errors.js";
|
|
2
2
|
import { Schema as n } from "effect";
|
|
3
|
-
import { defineMutation as r, defineQuery as i } from "@voltro/protocol";
|
|
3
|
+
import { defineMutation as r, defineQuery as i, reactivityChannel as a } from "@voltro/protocol";
|
|
4
4
|
//#region src/rpc.ts
|
|
5
|
-
var a = n.Struct({
|
|
5
|
+
var o = a("presence"), s = n.Struct({
|
|
6
6
|
key: n.String,
|
|
7
7
|
meta: n.NullOr(n.Record({
|
|
8
8
|
key: n.String,
|
|
9
9
|
value: n.Unknown
|
|
10
|
-
}))
|
|
11
|
-
|
|
12
|
-
}), o = r({
|
|
10
|
+
}))
|
|
11
|
+
}), c = r({
|
|
13
12
|
name: "presence.heartbeat",
|
|
14
13
|
input: n.Struct({
|
|
15
14
|
channel: n.String,
|
|
@@ -20,21 +19,25 @@ var a = n.Struct({
|
|
|
20
19
|
}))
|
|
21
20
|
}),
|
|
22
21
|
output: n.Struct({ ok: n.Boolean }),
|
|
23
|
-
error: n.Union(e, t)
|
|
24
|
-
|
|
22
|
+
error: n.Union(e, t),
|
|
23
|
+
openAccess: "presence serves anonymous-capable apps; the tracked key defaults to the caller's own subject id (PresenceKeyMissing without one) and entries are tenant-scoped in the tracker"
|
|
24
|
+
}), l = i({
|
|
25
25
|
name: "presence.list",
|
|
26
|
+
source: o,
|
|
26
27
|
input: n.Struct({ channel: n.String }),
|
|
27
|
-
output: n.Array(
|
|
28
|
-
error: t
|
|
29
|
-
|
|
28
|
+
output: n.Array(s),
|
|
29
|
+
error: t,
|
|
30
|
+
openAccess: "presence serves anonymous-capable apps; the roster is tenant-scoped fail-closed in the tracker (a caller sees only its own tenant's members) and carries only key + caller-published meta"
|
|
31
|
+
}), u = r({
|
|
30
32
|
name: "presence.leave",
|
|
31
33
|
input: n.Struct({
|
|
32
34
|
channel: n.String,
|
|
33
35
|
key: n.optional(n.String)
|
|
34
36
|
}),
|
|
35
37
|
output: n.Struct({ ok: n.Boolean }),
|
|
36
|
-
error: n.Union(e, t)
|
|
37
|
-
|
|
38
|
+
error: n.Union(e, t),
|
|
39
|
+
openAccess: "presence serves anonymous-capable apps; the key to remove defaults to the caller's own subject id (PresenceKeyMissing without one) and removal is tenant-scoped in the tracker"
|
|
40
|
+
}), d = [
|
|
38
41
|
{
|
|
39
42
|
tag: "presence.heartbeat",
|
|
40
43
|
kind: "mutation",
|
|
@@ -61,4 +64,4 @@ var a = n.Struct({
|
|
|
61
64
|
}
|
|
62
65
|
];
|
|
63
66
|
//#endregion
|
|
64
|
-
export {
|
|
67
|
+
export { c as heartbeatDescriptor, u as leaveDescriptor, l as listDescriptor, o as presenceRoster, d as presenceRpcClientImports };
|
package/dist/web.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export declare const activeTypers: (members: ReadonlyArray<PresenceMember>, self
|
|
|
5
5
|
export declare interface PresenceMember {
|
|
6
6
|
readonly key: string;
|
|
7
7
|
readonly meta: Record<string, unknown> | null;
|
|
8
|
-
readonly lastSeen: number;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
export declare interface TypingState {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-presence",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Ephemeral realtime presence — who is online in a channel, with heartbeat + live roster + per-member metadata (cursor, status).
|
|
3
|
+
"version": "0.35.0",
|
|
4
|
+
"description": "Ephemeral realtime presence — who is online in a channel, with heartbeat + live roster + per-member metadata (cursor, status). Held in memory, owner-partitioned; cross-instance with @voltro/plugin-broadcast.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
7
7
|
"typescript",
|
|
@@ -48,9 +48,8 @@
|
|
|
48
48
|
"node": ">=24.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@voltro/client": "0.
|
|
52
|
-
"@voltro/
|
|
53
|
-
"@voltro/protocol": "0.33.0"
|
|
51
|
+
"@voltro/client": "0.35.0",
|
|
52
|
+
"@voltro/protocol": "0.35.0"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
55
|
"effect": "^3.22.0",
|