← Catalog

pi-rngit-work-document-skill

Pi skill for creating and updating rngit work documents over the Reticulum mesh, built on reticulum-js.

Skill

Install

Install with PiG

pig install npm:pi-rngit-work-document-skill

Install with Pi

pi install npm:pi-rngit-work-document-skill
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [
    "./skills"
  ]
}

README

Written by the package's publisher, shown as published in version 0.8.0 (README.md). PiG does not review it.

pi-rngit-work-document-skill

A Pi skill (also usable as a plain Node library) for creating and updating rngit work documents over the Reticulum mesh — without the interactive editor that the rngit work CLI requires.

It speaks the exact same /mgmt/work request/response protocol as the Python rngit work tooling (see RNS/Utilities/rngit/server.py). Built on reticulum-js.

What it does

OperationPermission neededNotes
listreadactive (default) / completed / proposed / all
viewreaddocument body + update history
createwrite + interactlands in active, signed by your identity
proposeproposelands in proposed
editwrite + interactonly the original author
updateinteractadds a signed update (comment)
completewrite + interactmoves a doc to completed
activatewrite + interactreactivates a doc into active

Install as a Pi skill

pi install npm:pi-rngit-work-document-skill
# or from a local checkout:
pi install ./packages/pi-rngit-work-document-skill

Configuration

The client connects to a local rnsd by default and needs to know which rngit node/repository to talk to.

Target discovery

The target rns://<hash>/<group>/<repo> is resolved automatically, in order:

  1. Auto-discovery from project files in the current directory:
    • a rns:// git remote in .git/config (set by git clone rns://...), then
    • a package.json field (rngit, rngit.url, reticulum.rngit, or an rns:// repository/repository.url), then
    • the first rns:// URL in AGENTS.md, README.md, or CONTRIBUTING.md.
  2. The RNGIT_URL / RNGIT_TARGET env var, which overrides discovery.

Environment variables

VariableMeaningDefault
RNGIT_TARGET_HASH + RNGIT_GROUP + RNGIT_REPOalternative to RNGIT_URL—
RNS_HOST / RNS_PORTlocal rnsd TCP interface (both required)—
RNGIT_IDENTITYpath to the client identity key~/.pi-rngit-work/identity.key
RNGIT_PATH_TIMEOUT_MStime to learn the remote identity30000
RNGIT_REQUEST_TIMEOUT_MSper-request response timeout300000

Bootstrapping permissions

Pi keeps its own identity (separate from the human's rngit client identity), so the node admin can grant different permissions to humans and machines. The identity key is generated on first use; print its hash (no network) and hand it to the admin:

node skills/rngit-work/scripts/work.js identity

The admin then grants that hash permissions on the rngit server, e.g. in ~/.rngit/config:

[access]
public = r:all, w:<pi-hash>, i:<pi-hash>

…or per repository in a <repo>.allowed file. Flags: r=read, w=write, i=interact, p=propose, adm=admin. create/edit/update need w+i; propose needs p; list/view need r.

CLI usage

work.js list [--scope active|completed|proposed|all]
work.js view <id> [--scope ...]
work.js create <title...> --file <path|-> [--propose]
work.js edit <id> --file <path|-> [--title <t>] [--scope ...]
work.js update <id> --file <path|-> [--scope ...]
work.js complete <id>
work.js activate <id>
work.js identity                        # print pi's identity hash (no network)

Content is read with --file <path>, or from stdin via --file -. Add --json for structured output. Flags --url, --host, --port, --identity override the environment for a single run.

echo "# Heading\nBody text" | node scripts/work.js create "My first doc" --file -
node scripts/work.js list --scope all

As a library

import { WorkClient, loadConfig } from "pi-rngit-work-document-skill";

const client = new WorkClient(loadConfig());
await client.connect();

const created = await client.create("Plan something", "# Plan\nLet's …");
console.log(`Created #${created.id}`);

await client.update(created.id, "Update: started on this.");
console.log(await client.view(created.id));

await client.close();

Protocol notes

  • Destination aspect: git.repositories; request path: /mgmt/work.
  • Requests are msgpack maps keyed by the integer 0 (IDX_REPOSITORY) plus string fields. A plain JS object would coerce key 0 to "0" and be rejected, so the client builds payloads as a Map.
  • Responses are a status byte (0 = OK) followed by a msgpack payload.
  • create/propose/edit include a 64-byte Ed25519 signature over the content.

License

EUPL-1.2