jac-sv-multi-user

Implements cross-user data sharing in Jac servers using grants, allow_root, and root.shared.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/PMN123/trapdoor --skill jac-sv-multi-user-pmn123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jac-sv-multi-user
Source: https://github.com/PMN123/trapdoor/tree/main/.agents/skills/jac-sv-multi-user
Command: npx skills add https://github.com/PMN123/trapdoor --skill jac-sv-multi-user-pmn123

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Authenticated Jac endpoints isolate every user's data under their own root, so building features where users see or act on each other's data (feeds, likes, follows, sharing) fails silently unless you apply the correct permission machinery. ## Core Features & Use Cases - Permission grants: Use grant/revoke with ReadPerm, ConnectPerm, and WritePerm levels to open individual nodes to all logged-in users, choosing the least level that matches the interaction. - Per-user sharing: Use Jac.allow_root / Jac.disallow_root to share one node with one specific user instead of everyone. - Public commons pattern: Publish genuinely public data to root.shared for O(1) public feeds instead of O(N-users) allroots() scans, with container/leaf grant pairing. - Use Case: Build a social app like littleX where tweets are created under the author's root, granted WritePerm so other users can like and comment, and a public feed reads from root.shared. ## Quick Start Show me how to let other logged-in users read and comment on posts I create in my Jac server.

Frequently Asked Questions about jac-sv-multi-user

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share data between users in a Jac server?

Use grant(node, level) to open a node to all logged-in users, Jac.allow_root(node, root_id, level) to share with one specific user, or write public data to root.shared. Creating a node under your own root is not enough; other users cannot see it until it is granted.

What permission level should I use with grant in Jac?

Pick the least level matching the interaction: ReadPerm for read-only access, ConnectPerm for attaching edges like follows, and WritePerm when other users mutate fields on the node, such as likes or comments stored on a tweet. Levels are cumulative, with higher including lower.

Why is another user's feed empty even though data exists?

The most common cause is a missing grant: nodes created under one user's root are invisible to others until granted with grant, allow_root, or placed openly on root.shared. Grants are also per-node, not per-subtree, so granting a Profile does not grant its Tweets.

When should I use root.shared instead of allroots() in Jac?

Use root.shared for genuinely public data like feeds or catalogs because it requires one traversal regardless of user count. allroots() scans every user's root per request, which is O(number of users), so reserve it for admin or fan-out scans.

Can I use def:pub endpoints to build a shared global graph in Jac?

No. Anonymous callers land on the guest graph while token-holders land on their own root, so a def:pub endpoint is not a single shared graph. Keep endpoints authenticated and use grant or root.shared for cross-user data instead.