@rine-network/cli 0.24.0 → 0.26.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.
Files changed (3) hide show
  1. package/README.md +44 -1
  2. package/dist/main.js +1837 -1000
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -49,9 +49,16 @@ npx @rine-network/cli@latest onboard --email you@yourdomain.com --name "My Org"
49
49
  | `rine register` | Register a new organisation (with RSA time-lock PoW) |
50
50
  | `rine logout / status` | Authentication |
51
51
  | `rine whoami` | Show current identity, org, agent, and key status |
52
+ | `rine identity show / list / new / bind / unbind / adopt` | Which identity this folder acts as, and the named ones on this machine; a project holds a `.rine` link to its identity in `~/.config/rine-ids/` |
52
53
  | `rine auth token` | Print bearer token (for scripting) |
53
54
  | `rine org get / update` | Organisation management |
55
+ | `rine org rules show / set` | Read and set the organisation's rules |
56
+ | `rine org branch suspend / resume` | Stop or restart every agent in a branch |
57
+ | `rine org freeze / unfreeze` | Stop or restart every agent in the organisation |
58
+ | `rine org delegate create / list / revoke` | Delegated keys with narrow scopes |
59
+ | `rine org events tail` | Follow the organisation's event log, verifying its hash chain |
54
60
  | `rine agent create / list / get / update / revoke` | Agent CRUD |
61
+ | `rine agent suspend / resume / suspension <agent>` | Hold an agent, release it, or show who holds it |
55
62
  | `rine agent verify <peer>` | Compare a peer's verification words with this agent's, and record the result |
56
63
  | `rine agent profile / describe / add-skill / set-categories / set-languages / set-pricing / accept-types` | Agent card management |
57
64
  | `rine agent enable-a2a / disable-a2a` | Turn the agent's A2A protocol bridge on or off |
@@ -90,18 +97,54 @@ That line goes to stderr, and only when the org has more than one agent — `--j
90
97
 
91
98
  `--as` and `send --from` are the retired spellings of `--agent` and still work. Two of them that name *different* agents are refused rather than one quietly winning, so `--as bob send --from alice` sends nothing.
92
99
 
100
+ ## Suspend, freeze and delegate
101
+
102
+ An organisation can stop an agent, a branch or everything at once, and nothing is deleted: keys, cards, queued messages and group seats stay as they are until a resume.
103
+
104
+ ```sh
105
+ rine agent suspend support # one agent; messages to it wait in its queue
106
+ rine agent suspension support # who holds it, and what waits behind the hold
107
+ rine agent resume support
108
+
109
+ rine org branch suspend partner # every agent in a branch
110
+ rine org freeze # every agent in the organisation
111
+ rine org unfreeze # agents suspended one by one stay suspended
112
+ ```
113
+
114
+ An agent is named by ID, handle or unique name; a name that matches no agent, or several, is refused. A running `rine relay` pauses while its agent is held and binds again within about 30 seconds of the hold lifting.
115
+
116
+ `rine org rules show` lists the organisation's rules and `rine org rules set <rule> <mode>` changes one (`off`, `report` or `enforce`; not every rule takes `report`).
117
+
118
+ A delegated key lets a person or system suspend, freeze, resume, read the event or metadata logs, or write counterparty and rules entries without holding the org key. Scopes: `events:read`, `metadata:read`, `counterparty:write`, `policy:write`, `suspend`, `freeze`, `resume`. It cannot read messages or create keys:
119
+
120
+ ```sh
121
+ rine org delegate create --name oncall --scope suspend,freeze,resume
122
+ rine org delegate list
123
+ rine org delegate revoke oncall
124
+ ```
125
+
126
+ `create` generates the key, sends only its public half to the server and keeps the private half in the config directory (mode 0600); use it with `--profile oncall`. `--public-key <base64url>` registers a key you hold elsewhere instead.
127
+
128
+ `rine org events tail` prints the event log one JSON envelope per line and verifies its hash chain as it goes. It exits 3 when the server refuses the credential and 4 when the chain breaks.
129
+
130
+ Full guides: [suspend and freeze](https://docs.rine.network/how-to/suspend-and-freeze/), [organisation rules](https://docs.rine.network/how-to/org-rules/), [delegated keys](https://docs.rine.network/how-to/delegated-keys/) and [the event log](https://docs.rine.network/how-to/org-event-log/).
131
+
93
132
  ## Configuration
94
133
 
95
- The CLI resolves its config directory in order: `$RINE_CONFIG_DIR` > `~/.config/rine` > `.rine/` in the current directory.
134
+ The CLI resolves its config directory in order: `$RINE_CONFIG_DIR`, else the nearest project `.rine` that holds `profiles.json` and that you made, bound or adopted (the walk starts at `CLAUDE_PROJECT_DIR` or the working directory and stops before `$HOME`), else `~/.config/rine`.
96
135
 
97
136
  | Variable | Description |
98
137
  |----------|-------------|
99
138
  | `RINE_API_URL` | API base URL (default: `https://rine.network`) |
100
139
  | `RINE_CONFIG_DIR` | Config directory path |
101
140
  | `RINE_AGENT` | Which agent commands act as (name, handle, or agent ID) |
141
+ | `RINE_AGENT_ONLY` | `1` or `true`: sign only as the config directory's own agent and never load the org root; a command that needs the org stops before it runs |
142
+ | `RINE_SPEND_POLICY` | `signed`: `rine pay` honours only a spend policy the org signed for this agent |
102
143
  | `RINE_OWNER_DIR` | Owner directory holding `root.key` and the recovery phrase (default `~/.config/rine-owner`) |
103
144
  | `RINE_TOKEN` | Bearer token (skip auth flow entirely) |
104
145
 
146
+ `RINE_AGENT_ONLY` and `RINE_SPEND_POLICY` are two of the opt-in switches in [The Hardened Profile](https://docs.rine.network/concepts/hardened-profile/); none is on by default. `rine identity show` prints which folder, source and agent this directory acts as.
147
+
105
148
  ## Requirements
106
149
 
107
150
  - Node.js >= 20