@r4-sdk/cli 1.0.0 → 1.0.2

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
@@ -25,7 +25,7 @@ Manage machine agents and bootstrap the local runtime.
25
25
  - `r4 agent update <id>` -- Update agent name, budget, and security-group memberships
26
26
  - `r4 agent get-tenant-roles <id>` -- Show the explicit and inherited tenant roles for an agent
27
27
  - `r4 agent set-tenant-roles <id>` -- Replace the explicit tenant roles for an agent
28
- - `r4 agent init` -- Read credentials, generate/reuse a private key, register the public key, save the profile, and run a health check
28
+ - `r4 agent init` -- Read credentials, generate/reuse a private key, register the public key, send the local hostname claim for operator visibility, save the profile, and run a health check
29
29
 
30
30
  ### `r4 auth`
31
31
  Manage API key authentication.
@@ -76,9 +76,10 @@ Inspect the active runtime context.
76
76
  Manage vault secrets.
77
77
  - `r4 vault create` -- Create a checkpoint-signed vault from inline JSON or `--body-file`
78
78
  - `r4 vault create-item <vaultId>` -- Create a checkpoint-signed vault item from inline JSON or `--body-file`
79
+ - `r4 vault download-asset <vaultId> <assetId> [--output <path>]` -- Download and locally decrypt a vault attachment
79
80
  - `r4 vault list` -- List locally decrypted environment variables
80
81
  - `r4 vault get <name>` -- Get a specific locally decrypted secret
81
- - `r4 vault list-items` -- List vault item metadata without local decryption
82
+ - `r4 vault list-items` -- List vault item metadata without local decryption, including hidden parent-vault item shares
82
83
  - `r4 vault items --metadata-only` -- Metadata-only alias when decryption is failing
83
84
 
84
85
  ### `r4 project`
@@ -160,11 +161,16 @@ Operators should let the runtime complete that first public-key registration
160
161
  before they assign security-group, project, or direct vault access to the
161
162
  agent. Re-registering the same key is safe, and rotating to a different key is
162
163
  supported when the caller submits the replacement `rewrappedVaultKeys` batch for
163
- the active vault DEKs that key can reach.
164
+ the active vault DEKs that key can reach. Official CLI registration requests
165
+ also send `X-R4-Agent-Hostname: <local hostname>` so the platform Agents table
166
+ can show where the active runtime key most recently initialized.
164
167
 
165
168
  When decryption is failing but API access is otherwise correct, use
166
169
  `r4 doctor`, `r4 vault list-items`, or `r4 vault items --metadata-only` to
167
170
  separate metadata/access problems from local key or trust issues.
171
+ Metadata-only item listing now also merges `/vault/shared-items`, so item-level
172
+ shares from otherwise hidden parent vaults still appear with
173
+ `vaultName: "[Direct Item Share]"`.
168
174
  `r4 auth whoami` is the fastest way to confirm the current machine scope,
169
175
  tenant binding, and policy summary without exercising vault reads.
170
176
  `r4 space info` and `r4 profile show` expose the same identity view together
@@ -176,6 +182,17 @@ and the checkpoint-signed `vault create` / `vault create-item` wrappers, but
176
182
  use `--body-file` for large signed checkpoint or permission payloads when you
177
183
  do drop down to the generic surface.
178
184
 
185
+ Vault attachments now have a first-class zero-trust download helper too:
186
+
187
+ ```bash
188
+ r4 vault download-asset <vaultId> <assetId> --output ./artifact.bin
189
+ r4 --json vault download-asset <vaultId> <assetId>
190
+ ```
191
+
192
+ That path verifies the signed attachment checkpoint, checks ciphertext and
193
+ plaintext hashes/sizes, decrypts the blob locally with the vault DEK, and then
194
+ writes the plaintext file to disk. JSON output returns metadata only.
195
+
179
196
  ## Profile Storage
180
197
 
181
198
  The CLI now keeps profile state under one consistent root:
@@ -196,7 +213,7 @@ The CLI now keeps profile state under one consistent root:
196
213
 
197
214
  ## Dependencies
198
215
 
199
- Uses the published `@r4-sdk/sdk` package under the hood for API communication. Built with Commander, Chalk, ora, and cli-table3.
216
+ Uses the published `@r4-sdk/node` package under the hood for API communication. Built with Commander, Chalk, ora, and cli-table3.
200
217
 
201
218
  ## Development
202
219