@voltro/plugin-guilds 0.89.2 โ†’ 0.91.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/README.md CHANGED
@@ -1,166 +1,26 @@
1
- # @voltro/plugin-guilds
2
-
3
- ## Take
4
-
5
- ```ts
6
- import { guildsPlugin } from '@voltro/plugin-guilds'
7
-
8
- const plugin = guildsPlugin()
9
- ```
10
-
11
- Eight SQL tables own guilds, members, roles, applications, invites, chronicle,
12
- announcements and subject admission. Twenty-two typed RPCs and twelve web hooks
13
- are authored. The server receives human intentions and trusted request identity;
14
- anonymous/machine self calls refuse. Guest and registered users share stable IDs.
15
- Guild-role bits are guild data; they never grant app/tenant RBAC permissions.
16
-
17
- `guilds.create` takes a request ID, name, 3โ€“5 ASCII alphanumeric tag, description,
18
- membership policy, region and language. Deterministic sender/request IDs preserve
19
- the exact creation claim. Name NFKC/space/case normalization and uppercase tags
20
- use tenant-hashed unique SQL claims. This is no confusable-name proof. Name/tag
21
- moderation composes the existing keyword provider; an empty denylist is no
22
- classification coverage. This foundation creates guilds without currency charges.
23
- Economy-backed optional creation cost and emblem Storage lifecycle remain open.
24
-
25
- `guilds.mine`, `get`, `search`, `members`, `roles` read scoped state. Search is a
26
- bounded exact name/tag or region/language query, not fuzzy search. Detailed member
27
- and history reads require actual guild membership. Inputs never supply owner,
28
- tenant, XP, membership rows or arbitrary metadata state.
29
-
30
- Search projects a separate GuildSummary without owner identity, private metadata or creation claims; members-only get keeps the full scoped projection.
31
-
32
- ## Configure
33
-
34
- | Option | Default | Meaning |
35
- |---|---|---|
36
- | `baseMemberCap` | 50 | Initial guild member budget |
37
- | `maximumMemberCap` | 500 | Level-curve member ceiling |
38
- | `maxGuildsPerSubject` | 1 | SQL-serialized guild admission budget |
39
- | `maxRoles` | 20 | Configured role count budget |
40
- | `maxPending` | 100 | Pending application/invite budget per guild |
41
- | `inviteTtlMs` | 7 days | Invitation acceptance lifetime |
42
- | `inactiveAfterMs` | 30 days | Successor proposal threshold |
43
- | `pageSize` | 50 | Bounded search/chronicle/announcement page |
44
- | `maxExportRows` | 10,000 | Complete export/operation scan ceiling |
45
- | `maxDescriptionLength` | 2,000 code points | Description/application budget |
46
- | `maxAnnouncementLength` | 4,000 code points | Announcement body budget |
47
- | `denyWords` | empty | Explicit existing keyword-provider policy |
48
- | `strategies` | three defaults | Permission, level and inactivity rules |
49
- | `now` | `Date.now` | Trusted rule/observation clock |
50
-
51
- These are budgets, not measured capacity. Subject admission rows are inserted
52
- outside transactions, then locked in deterministic hash order before the guild
53
- writer row. Guild/member counts and role state are read after writer admission.
54
- SQL owns cross-pool limits; there is no in-memory mutex or second hot truth.
55
- This conservative serialization has not been measured under load.
56
-
57
- ## Hook
1
+ <div align="center">
58
2
 
59
- `guilds.join`, `apply`, `decideApplication`, `invite`, `decideInvite` implement
60
- open/application/invite admission. Invites expire and re-check the inviter's
61
- current membership/permission before acceptance. `SocialBlockPort` controls
62
- invite admission and blocks at acceptance when installed; a replacement Layer is
63
- used, never Social tables. Cross-system block-race admission is not yet proven.
64
-
65
- `kick`, `setRole`, `configureRole` enforce permission bits, strict rank order,
66
- no peer/owner kick, no self-promotion and no second owner via normal role changes.
67
- Only the committed owner transfers ownership through `transferOwner`. An owner's
68
- departure chooses a remaining member by rank/join date/ID; the last departure
69
- dissolves the guild and frees name/tag claims. `updateProfile` requires version
70
- CAS; `announce` is moderated, permission-checked and request-idempotent.
71
-
72
- `guilds.changed` is a discovered operator metadata event (`guilds:events:read`):
73
- guild routing key plus log ID/kind, no body or personal detail. Committed SQL log
74
- rows select the tenant; the normal once change claimer is used. CDC is best-effort,
75
- not durable notification delivery. Player state comes through guarded Live Queries.
76
- Named business events, Notifications and end-to-end discovery remain open.
77
-
78
- `dataStoreGuilds(...).recordContribution` accepts only internal System or same-
79
- tenant service account with `guilds:contributions:write`; stable request IDs
80
- apply trusted XP once in a SQL transaction. It updates guild XP/level/member cap
81
- and the real member contribution. Clients cannot award themselves XP. This is
82
- not an economy wallet, war rule or periodic leaderboard aggregation.
83
-
84
- ## Override
85
-
86
- `./strategies` exports one default per slot: `bitSetGuildPermissions`,
87
- `quadraticGuildLevels`, `highestActiveGuildSuccessor`. Permissions evaluate actual
88
- guild role bits; owner/rank safety boundaries remain server invariants. The
89
- level curve maps trusted XP to a validated level/member cap. Inactivity proposes
90
- the highest active rank; it never transfers ownership automatically.
91
-
92
- `inactivityProposal` requires System or a same-tenant service account with
93
- `guilds:inactivity:read`. Custom proposals must name an existing candidate.
94
- Activity currently comes from creation/join and trusted contribution; Presence-
95
- driven activity, scheduled ownership offer and acknowledgement remain open.
96
-
97
- ## Extend or replace
98
-
99
- Guilds is currently a leaf with three strategies and events, no dependency port.
100
- Other dependency integrations use their own ports. Exported table handles and
101
- JSON metadata carry small extensions; export preserves actual contributed row
102
- columns. Arbitrary mixin fields are not yet propagated by static wire schemas/UI.
103
- Complete S4a, namespace composition and system removal remain open.
104
-
105
- Treasury requires the Economy guild wallet. Guild chat/membership revocation,
106
- Presence, leaderboards, min-level admission, emblem lifecycle, weekly events/
107
- workflow and currency-backed creation are not yet integrated. No store I/O belongs
108
- in a Room tick. Rooms may submit trusted contributions outside ticks.
109
-
110
- ## Panel and GM
3
+ # @voltro/plugin-guilds
111
4
 
112
- Plugin `GET /status`, shared `GuildsPage`, Local read-token HTTP provider and
113
- Cloud authorized-app/replica proxy are authored together. Strict decoders show
114
- dated configuration, rule-slot selection and current binding; no guild/member
115
- data, health or measured capacity is disclosed. Full guild list/treasury/log,
116
- rename/transfer/dissolve/emblem-removal GM actions and metrics remain open.
5
+ **SQL-authoritative guilds, scoped roles, membership admission and privacy with replaceable rules**
117
6
 
118
- `./web` exposes `useGuild`, `useGuildList`, `useGuildMembers`, `useGuildRoles`,
119
- `useGuildSearch`, `useGuildApplications`, `useGuildInvites`,
120
- `useGuildAnnouncements`, `useGuildLog`, `useGuildCreate`, `useGuildJoin`,
121
- `useGuildLeave`. Components are `GuildCard`, `GuildBrowser`, `GuildMemberList`,
122
- `GuildCreateDialog`, `GuildLog`. They reuse ui-shadcn, en/de labels, escaped
123
- text and explicit unknown identity. Parents provide trusted Players projections
124
- and scoped data, permission projections, draft/request ID/pending state across
125
- dialog close. Browser and creation use credential/tenant `scopeKey` and matching
126
- `dataScopeKey`; old data/actions are hidden/refused. Mutation callbacks carry
127
- target IDs/intent only; controls are not authorization. No automatic retry or
128
- success clearing.
7
+ [๐Ÿ“– Documentation](https://docs.voltro.dev/docs/plugins/guilds) ยท [voltro.dev](https://voltro.dev) ยท [Voltro Cloud](https://voltro.cloud)
129
8
 
130
- ## Tests
9
+ </div>
131
10
 
132
- Written memory-adapter cases exercise stable guest identity, creation claims,
133
- name/tag uniqueness, membership caps, roles/rank matrix, revoked invitations,
134
- Social port replacement, moderation, profile CAS, trusted contribution receipts,
135
- ownership erase, peer preservation and refused re-creation. Three slot fixtures
136
- and `systemContractConformance` cover actual factory stages, events, metadata,
137
- all eight tables' user/guest privacy and inspection. Native PostgreSQL/MySQL/
138
- MariaDB/MSSQL/SQLite/Turso cases cover all tables, Unicode/JSON/date fields,
139
- two-pool member/subject admission, version races and privacy/successor readback.
140
- Missing native connection fields fail rather than silently skipping acceptance.
141
- DOM/panel/provider contracts are written. None ran.
11
+ ---
142
12
 
143
- ## Membership port
13
+ ```sh
14
+ npm install @voltro/plugin-guilds
15
+ ```
144
16
 
145
- `@voltro/plugin-guilds/port` exports `GuildMembershipPort`. The installed plugin
146
- provides it through its service Layer, so other plugins and app code ask
147
- `isMember(subject, guildId)` instead of reading Guild SQL. It answers `true`
148
- only while the subject currently belongs to the guild in its own tenant;
149
- strangers, other tenants, unknown guilds and anonymous callers get `false`, not
150
- an error. It is the building block for guild chat, guild parties and guild
151
- leaderboards; those bridges are not wired yet.
17
+ > ### [โ†’ Read the documentation for @voltro/plugin-guilds](https://docs.voltro.dev/docs/plugins/guilds)
152
18
 
153
- ## Privacy and limits
19
+ Installation, guides, the full API reference, and examples all live in the
20
+ **[Voltro documentation](https://docs.voltro.dev/docs/intro/getting-started)** โ€” the single source of truth. This README is
21
+ deliberately short so there is nothing here to drift out of date.
154
22
 
155
- Export returns actual owned/referenced rows with a bounded complete scan. Erase
156
- serializes the subject, locks affected guilds, removes membership, transfers
157
- ownership or dissolves a solo guild, scrubs former-owned content/role metadata,
158
- applications/invites, authored announcements and personal chronicle references.
159
- Peer membership/history and other tenants survive. A redacted deterministic SQL
160
- admission tombstone retains no subject ID and refuses re-created membership
161
- under the erased subject, including retries. There is no reactivation/unlock API
162
- yet.
23
+ ## License
163
24
 
164
- Production activation now source-checks the actual deployment-wide plugin grant.
165
- Declare actual Licensing first; development/test remains free. See the bilingual
166
- Licensing contract and manual update migration.
25
+ Proprietary. ยฉ 2026 Voltro UG. Your use is governed by the
26
+ [Terms of Service](https://voltro.cloud/legal/terms). See the bundled `LICENSE`.