jac-sv-multi-user

Implement 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/nihalnihalani/jachacks-sf-2026 --skill jac-sv-multi-user-nihalnihalani
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: jac-sv-multi-user
Source: https://github.com/nihalnihalani/jachacks-sf-2026/tree/main/plugins/jac-codex/skills/jac-sv-multi-user
Command: npx skills add https://github.com/nihalnihalani/jachacks-sf-2026 --skill jac-sv-multi-user-nihalnihalani

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, shared documents) requires explicit permission machinery that is easy to get wrong. ## Core Features & Use Cases - Permission grants: Use grant/revoke with ReadPerm, ConnectPerm, and WritePerm levels to open individual nodes to all logged-in users, or Jac.allow_root to share one node with a single specific user. - Public commons graph: Publish genuinely public data to root.shared so feeds and catalogs resolve in one traversal instead of an O(N-users) allroots() scan. - Cross-user scans and roles: Enumerate every user's root with allroots() for admin fan-outs, and gate privileged writes behind per-user role checks stored on the user's own graph. - Use Case: Building a social app like littleX where tweets must be readable and likeable by other users: create the tweet under the author's root, grant it WritePerm so likes mutate its fields, and serve the public feed from root.shared. ## Quick Start Show me how to let other logged-in users read and like a Tweet node in my Jac server using grant and root.shared.

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 one node to every logged-in user, Jac.allow_root(node, root_id, level) to share with one specific user, or write public data directly to root.shared. Creating a node under your own root is never enough; the grant must happen at creation time.

What is the difference between ReadPerm, ConnectPerm, and WritePerm in Jac?▼

ReadPerm allows reading fields and traversing in, ConnectPerm adds the ability to attach edges, and WritePerm adds field mutation. Pick the least level that works: follows need ConnectPerm, while interactions that mutate fields on the target node need WritePerm.

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

Use root.shared for genuinely public data like feeds and catalogs because it resolves in one traversal regardless of user count. allroots() scans every user's root per request, which is O(number of users) and better reserved for admin fan-outs.

Why is another user's feed empty even though I created the nodes?▼

The nodes were never granted. A node is only reachable by other users if it was opened with grant, allow_root, or placed openly on root.shared; connecting an edge under your own root does not share it. Grants are also per-node, not per-subtree.

Does allroots() work outside a running Jac server?▼

No, allroots() needs a served context from jac start. In a single-session jac run it returns only one root, so cross-user features must be validated with two real logged-in users rather than a single-root script.