rho-cli 0.1.25

Rho CLI tools for encrypted agent collaboration, dataset publishing, controlled runs, and result release workflows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# Processes and Data Structures

This document is the working place to define the key data structures for Rho.

The goal is to make the main manifests and core types explicit before implementation hardens them in Rust code.

In many senses this is the most important thing as this defines what data and steps matter at each level of abstraction.

### Identity

Represents a person, org, or agent owner.

Minimum v1 fields:

Suggested split:

Keep public identity separate from local key storage and peer trust state.

#### Identity

Public and portable.

See also:

- [url-schema.md]/Users/madhavajay/dev/rho/main/docs/architecture/url-schema.md

Suggested fields:

- `version`
- `id`
- `kind`
- `handle`
- `display_name`
- `public_keys`
- `proofs`
- `created_at`

Example:

```yaml
version: 1
identity:
  id: rho://id/github/madhavajay
  kind: github
  handle: madhavajay
  display_name: Madhava Jay
  public_keys:
    - id: rho://key/github/madhavajay/ssh-ed25519-1
      kind: ssh-signing
      algorithm: ssh-ed25519
      public_key: ssh-ed25519 AAAA...
      fingerprint: SHA256:...
      created_at: 2026-04-08T00:00:00Z
  proofs:
    - kind: github-profile-fragment-claim
      provider_url: https://github.com/madhavajay
      claim: rho.claim/id/github/madhavajay/key/ssh-ed25519/sha256-...
      proof_url: https://github.com/madhavajay#rho.claim/id/github/madhavajay/key/ssh-ed25519/sha256-...
      verified_at:
```

Notes:

- `id` identifies the actor, not a specific key.
- A single identity may have more than one public key.
- Proofs bind the identity to external systems such as GitHub.

#### Local Identity Profile

Local machine state for using an identity.

Suggested fields:

- `version`
- `identity_id`
- `profile_name`
- `key_ref`
- `resolver_hints`
- `storage_backend`
- `is_default`

Example:

```yaml
version: 1
local_identity_profile:
  identity_id: rho://id/github/madhavajay
  signing_key:
    kind: ssh-signing
    algorithm: ssh-ed25519
    public_key_path: ~/.ssh/id_ed25519.pub
    private_key_ref:
      backend: ssh-file
      path: ~/.ssh/id_ed25519
  resolver_hints:
    - ~/.ssh/
    - ~/.rho/keys/github/madhavajay/
  storage_backend: file
```

Notes:

- Do not treat `private key location` as part of the portable identity.
- Prefer `key_ref` plus resolver logic over one fixed path.
- Later backends may include keychain, TPM, Secure Enclave, agent process, or plugin-based auth.

#### Peer Identity Bundle

Imported or fetched public identity material.

Suggested fields:

- `version`
- `identity_id`
- `public_keys`
- `proofs`
- `claims`
- `fetched_from`
- `fetched_at`

Notes:

- This is what another user can share or what `rho id fetch` can resolve.
- Trust in this bundle should be handled by `rho auth`, not `rho id`.

### Crypto Key
Lets start with some reasonable cryptography


### Repo Layout

Root manifest:

```yaml
rho: 1

project:
  id: rho://repo/github/org/project
  name: example-project
  owner: rho://id/github/rho-owner

transport:
  kind: git
  provider: github
  repo:
    owner: org
    name: project

members:
  file: rho/membership.yaml

participants:
  path: rho/participants/

permissions:
  file: rho/policy/permissions.yaml

crypto:
  file: rho/policy/crypto.yaml

auth:
  file: rho/policy/auth.yaml

tools:
  path: rho/tools/

resources:
  file: rho/resources.yaml
```

The root manifest is the discovery document. It should identify the logical
project and point to the rest of the protocol files without encoding each user's
local Git remote URL.

### Repo Permissions

```yaml
version: 1

permissions:
  - id: direct_inbox
    pattern: rho/messages/inbox/{member.handle}/**
    expand: members
    write:
      allowed:
        - members
    read:
      encrypted_to:
        - "{member.id}"

  - id: group_messages
    pattern: rho/messages/groups/{group.id}/**
    expand: groups
    write:
      allowed:
        - "{group.members}"
    read:
      encrypted_to:
        - "{group.members}"

  - id: public_workspace
    pattern: workspace/public/**
    write:
      allowed:
        - members
    read:
      public: true
```

Permissions are the source of truth for normal read/write path semantics.
Private read permissions imply recipient encryption. Public read permissions do
not require encryption.

### Auth
- handshake
- tofu


### Tools



### Messages






My Data Structures
- run yaml template


- tools

Suggested fields:

- `id`
- `version`
- `description`
- `inputs`
- `outputs`
- `runner`
- `sandbox`
- `approval`


# Shared Model

## Purpose

This document defines the concepts that every `rho` command should share.



### Crypto Policy

Represents how artifacts are signed or encrypted.

Minimum v1 fields:

- policy id
- mode
- recipients
- signing requirement
- encryption requirement

### Auth Policy

Represents who may do what in a repo or interaction context.

Minimum v1 fields:

- policy id
- subject
- action
- resource
- decision
- conditions

### Repo

A collaboration space backed by Git.

Minimum v1 concerns:

- repo metadata
- participant list
- permissions policy
- crypto algorithm policy
- auth policy
- message roots
- tool roots

### Tool

A named contract for an allowed capability.

Minimum v1 fields:

- tool id
- version
- input schema
- output schema
- execution mode
- policy requirements

### Message

A file-backed communication artifact between participants or agents.

Minimum v1 fields:

- message id
- from
- to
- created_at
- type
- body

### Request

A structured ask for a protected action.

Examples:

- run a tool
- read a protected path
- release an output
- contact a human approver

### Approval

A structured decision attached to a request.

Minimum v1 fields:

- request id
- decision
- decided_by
- decided_at
- reason

### Trust Record

A structured record of trust or distrust toward a peer.

Minimum v1 fields:

- peer id
- key fingerprint
- trust state
- paired_at
- paired_by
- block state
- notes

### Run

A concrete execution of a tool or agent task.

Minimum v1 fields:

- run id
- subject
- command or tool ref
- sandbox profile
- status
- output refs

### Diagnostic Check

A structured environment or readiness check.

Minimum v1 fields:

- check id
- category
- status
- details
- suggested fix

## Default Repo Layout

V1 should use one obvious hidden root:

```text
rho/
  repo.yaml
  identities/
  crypto/
  auth/
  tools/
  messages/
    inbox/
    outbox/
  requests/
  approvals/
  runs/
  data/
    mock/
    private/
    released/
  middleware/
```

This is intentionally simpler than the older systems.

## State Transitions That Must Stay Explicit

Rho should make these transitions visible:

- local draft -> repo message
- plaintext artifact -> signed or encrypted artifact
- repo message -> interpreted action request
- actor identity and key -> trusted, pending, or blocked peer state
- action request -> approval pending
- approval pending -> approved or denied
- approved -> sandbox run
- sandbox output -> released output
- private input -> mock derivative

## Cross-Cutting Rules

- Every file-backed artifact should have a version field.
- Protected actions should have typed request manifests.
- Middleware should consume requests, not arbitrary free text.
- Agents should read prompts and messages, but protected execution should depend on structured manifests.


## How To Use This Doc

For each structure, capture:

- purpose
- owner command or layer
- canonical file path or storage location
- required fields
- optional fields
- validation rules
- notes on future migration

## Candidate Core Structures

### Identity

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Peer Identity Bundle

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Crypto Policy

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Auth Policy

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Trust Record

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Block Record

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Repo Manifest

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Participant Record

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Tool Manifest

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Message

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Request

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Approval

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Run Record

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Data Registry Entry

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

### Diagnostic Check Result

- purpose:
- owner:
- canonical path:
- required fields:
- optional fields:
- validation rules:
- migration notes:

## Notes

- Every file-backed structure should carry a version field.
- Structures that cross trust boundaries should be designed for deterministic validation.
- If a structure is only derived and never authoritative, note that explicitly.