@tokenrip/cli 1.4.0 → 1.4.1

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 (68) hide show
  1. package/AGENTS.md +54 -52
  2. package/SKILL.md +99 -95
  3. package/dist/agent-crypto.js +1 -1
  4. package/dist/agent-crypto.js.map +1 -1
  5. package/dist/cjs/agent-crypto.js +1 -1
  6. package/dist/cjs/agent-crypto.js.map +1 -1
  7. package/dist/cjs/commands/account.js +130 -0
  8. package/dist/cjs/commands/account.js.map +1 -0
  9. package/dist/cjs/commands/admin-agent.js +50 -0
  10. package/dist/cjs/commands/admin-agent.js.map +1 -0
  11. package/dist/cjs/commands/agent.js +335 -106
  12. package/dist/cjs/commands/agent.js.map +1 -1
  13. package/dist/cjs/commands/auth.js +8 -8
  14. package/dist/cjs/commands/auth.js.map +1 -1
  15. package/dist/cjs/commands/link.js +4 -4
  16. package/dist/cjs/commands/link.js.map +1 -1
  17. package/dist/cjs/commands/mountedagent.js +8 -179
  18. package/dist/cjs/commands/mountedagent.js.map +1 -1
  19. package/dist/cjs/commands/operator-link.js +3 -3
  20. package/dist/cjs/commands/operator-link.js.map +1 -1
  21. package/dist/cjs/commands/share.js +1 -1
  22. package/dist/cjs/commands/share.js.map +1 -1
  23. package/dist/cjs/config.js.map +1 -1
  24. package/dist/cjs/crypto.js +8 -5
  25. package/dist/cjs/crypto.js.map +1 -1
  26. package/dist/cjs/formatters.js +16 -16
  27. package/dist/cjs/formatters.js.map +1 -1
  28. package/dist/cjs/identities.js +30 -15
  29. package/dist/cjs/identities.js.map +1 -1
  30. package/dist/cjs/index.js +3 -1
  31. package/dist/cjs/index.js.map +1 -1
  32. package/dist/cli.js +118 -118
  33. package/dist/cli.js.map +1 -1
  34. package/dist/commands/account.d.ts +14 -0
  35. package/dist/commands/account.js +119 -0
  36. package/dist/commands/account.js.map +1 -0
  37. package/dist/commands/admin-agent.d.ts +5 -0
  38. package/dist/commands/admin-agent.js +43 -0
  39. package/dist/commands/admin-agent.js.map +1 -0
  40. package/dist/commands/agent.d.ts +58 -14
  41. package/dist/commands/agent.js +315 -101
  42. package/dist/commands/agent.js.map +1 -1
  43. package/dist/commands/auth.js +8 -8
  44. package/dist/commands/auth.js.map +1 -1
  45. package/dist/commands/link.js +4 -4
  46. package/dist/commands/link.js.map +1 -1
  47. package/dist/commands/mountedagent.d.ts +0 -26
  48. package/dist/commands/mountedagent.js +10 -173
  49. package/dist/commands/mountedagent.js.map +1 -1
  50. package/dist/commands/operator-link.js +3 -3
  51. package/dist/commands/operator-link.js.map +1 -1
  52. package/dist/commands/share.js +1 -1
  53. package/dist/commands/share.js.map +1 -1
  54. package/dist/config.d.ts +2 -0
  55. package/dist/config.js.map +1 -1
  56. package/dist/crypto.d.ts +4 -2
  57. package/dist/crypto.js +5 -3
  58. package/dist/crypto.js.map +1 -1
  59. package/dist/formatters.d.ts +5 -5
  60. package/dist/formatters.js +10 -10
  61. package/dist/formatters.js.map +1 -1
  62. package/dist/identities.d.ts +6 -2
  63. package/dist/identities.js +28 -14
  64. package/dist/identities.js.map +1 -1
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.js +2 -2
  67. package/dist/index.js.map +1 -1
  68. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -17,10 +17,10 @@ npm install -g @tokenrip/cli
17
17
 
18
18
  ## Setup
19
19
 
20
- First time: create an agent identity (generates a keypair and registers with the server):
20
+ First time: create an account (generates a keypair and registers with the server):
21
21
 
22
22
  ```bash
23
- rip agent create --alias my-agent
23
+ rip account create --alias my-agent
24
24
  ```
25
25
 
26
26
  If you receive `NO_API_KEY` or `UNAUTHORIZED`, recover your key:
@@ -180,80 +180,82 @@ rip artifact delete <uuid> # permanently delete
180
180
  rip artifact delete-version <uuid> <versionId> # delete one version
181
181
  ```
182
182
 
183
- ## Agent Commands (Mounted Agents)
183
+ ## Agent Commands
184
184
 
185
- Agent imprints are reusable instructions + memory schemas that load into your own model harness. **Publishing is not admin-gated.** Two tiers:
185
+ Agents are reusable instructions + memory schemas that load into your own model harness. **Publishing is not admin-gated.** Two tiers:
186
186
 
187
- - **Tier 1** — personal or team use. Anyone can publish. `rip mountedagent publish <manifest.json>` (add `--team <slug>` to make the imprint team-owned).
188
- - **Tier 2** — public listing on `/agents`. Pass `--publish`. Requires an approved Publisher for the imprint owner (`rip publisher apply`).
187
+ - **Tier 1** — personal or team use. Anyone can publish. `rip agent publish <manifest.json>` (add `--team <slug>` to make the agent team-owned).
188
+ - **Tier 2** — public listing on `/agents`. Pass `--publish`. Requires an approved Publisher for the agent owner (`rip publisher apply`).
189
189
 
190
- A *mount* is one deployment of an imprint. Personal mounts are private to one operator; team mounts are collaborative. Mounts are usually lazy-created on first `mountedagent_load`; only call `rip mountedagent mount` when you want a second named mount of the same imprint.
190
+ A *mount* is one deployment of an agent. Personal mounts are private to one operator; team mounts are collaborative. Mounts are usually lazy-created on first `agent_load`; only call `rip agent mount` when you want a second named mount of the same agent.
191
191
 
192
192
  ```bash
193
193
  # Publish (Tier 1)
194
- rip mountedagent publish <manifest.json>
195
- rip mountedagent publish <manifest.json> --team acme
194
+ rip agent publish <manifest.json>
195
+ rip agent publish <manifest.json> --team acme
196
196
 
197
197
  # Tier 2 — public listing (requires approved Publisher)
198
- rip mountedagent publish <manifest.json> --publish --featured 10
198
+ rip agent publish <manifest.json> --publish --featured 10
199
199
 
200
200
  # Inspect / list
201
- rip mountedagent list # imprints you own
202
- rip mountedagent show office-hours # owner-visible detail
203
- rip mountedagent artifacts office-hours # every artifact the imprint references
201
+ rip agent list # agents you own
202
+ rip agent show office-hours # owner-visible detail
203
+ rip agent artifacts office-hours # every artifact the agent references
204
204
 
205
205
  # Fork — personal default; --team makes it a team fork
206
- rip mountedagent fork chief-of-staff
207
- rip mountedagent fork chief-of-staff --team acme
208
- rip mountedagent fork chief-of-staff --team acme --slug acme-cos
206
+ rip agent fork chief-of-staff
207
+ rip agent fork chief-of-staff --team acme
208
+ rip agent fork chief-of-staff --team acme --slug acme-cos
209
209
 
210
210
  # Mount lifecycle
211
- rip mountedagent mount <slug> [--team <slug>] [--name <label>] [--context-from <file>]
212
- rip mountedagent mounts # list caller's mounts
213
- rip mountedagent show-mount <mount-id> # imprint version, context artifact, layers
214
- rip mountedagent mount-artifacts <mount-id> # every artifact the mount touches
215
- rip mountedagent mount-context <mount-id> # print mount context content
216
- rip mountedagent mount-context <mount-id> --edit # open in $EDITOR, republish on save
217
- rip mountedagent mount-context <mount-id> --from-file <f> # replace from a file
218
- rip mountedagent mount-rename <mount-id> <new-name>
219
- rip mountedagent unmount <mount-id> # cascade destroy (incl. context artifact)
211
+ rip agent mount <slug> [--team <slug>] [--name <label>] [--context-from <file>]
212
+ rip agent mounts # list caller's mounts
213
+ rip agent show-mount <mount-id> # agent version, context artifact, layers
214
+ rip agent mount-artifacts <mount-id> # every artifact the mount touches
215
+ rip agent mount-context <mount-id> # print mount context content
216
+ rip agent mount-context <mount-id> --edit # open in $EDITOR, republish on save
217
+ rip agent mount-context <mount-id> --from-file <f> # replace from a file
218
+ rip agent mount-rename <mount-id> <new-name>
219
+ rip agent unmount <mount-id> # cascade destroy (incl. context artifact)
220
220
  ```
221
221
 
222
- All `rip mountedagent *` commands default to human-readable output, except the four session-lifecycle commands below — those always emit JSON. Pass `--json` (or set `TOKENRIP_OUTPUT=json`) for the existing API shape on the rest. `rip mountedagent publish` prints `Published <slug> as v<N>` on success — `publishedVersion` auto-increments on every publish, and each mount snapshots `imprintVersionAtCreate` so the dashboard can flag drift.
222
+ All `rip agent *` commands default to human-readable output, except the four session-lifecycle commands below — those always emit JSON. Pass `--json` (or set `TOKENRIP_OUTPUT=json`) for the existing API shape on the rest. `rip agent publish` prints `Published <slug> as v<N>` on success — `publishedVersion` auto-increments on every publish, and each mount snapshots `agentVersionAtCreate` so the dashboard can flag drift.
223
223
 
224
224
  **Session lifecycle (no MCP needed):**
225
225
 
226
226
  ```bash
227
- rip --json mountedagent load <slug> [--team <slug>] # start a session
228
- rip --json mountedagent record <session-token> [--collection <slug>] \
227
+ rip --json agent load <slug> [--team <slug>] # start a session
228
+ rip --json agent record <session-token> [--collection <slug>] \
229
229
  --row '<json>' # or --row-file <path>
230
- rip --json mountedagent rewrite-artifact <session-token> <logical-alias> \
230
+ rip --json agent rewrite-artifact <session-token> <logical-alias> \
231
231
  --content-from <file> # or --content '<inline>'
232
- rip --json mountedagent end <session-token> --summary "..." # add --output-from / --output-title
232
+ rip --json agent end <session-token> --summary "..." # add --output-from / --output-title
233
233
  # to publish a wrap-up session output
234
234
  ```
235
235
 
236
- These four commands are 1:1 mirrors of the MCP tools `mountedagent_load`, `mountedagent_record`, `mountedagent_rewrite_artifact`, `mountedagent_session_end`. The CLI surface exists primarily for the generic Claude Code bootloader (`/tokenrip <slug>` — install once via `curl -fsSL https://api.tokenrip.com/skills/tokenrip-bootloader.md > .claude/commands/tokenrip.md`) but is also useful for scripts that want a tracked session without an MCP harness. They always emit JSON because the bootloader pipes results through `jq`.
236
+ These four commands are 1:1 mirrors of the MCP tools `agent_load`, `agent_record`, `agent_rewrite_artifact`, `agent_session_end`. The CLI surface exists primarily for the generic Claude Code bootloader (`/tokenrip <slug>` — install once via `curl -fsSL https://api.tokenrip.com/skills/tokenrip-bootloader.md > .claude/commands/tokenrip.md`) but is also useful for scripts that want a tracked session without an MCP harness. They always emit JSON because the bootloader pipes results through `jq`.
237
237
 
238
- **Templating with mount context:** an imprint can declare an optional `mountIntake.starterArtifactAlias` in its manifest. The starter is a markdown artifact owned by the imprint owner that doubles as (a) the scaffold cloned into every new mount's per-instance context document, and (b) the intake guide Moa reads in mount-creation flow. The brain sees the populated context as a `<mount-context alias="…" version="…">…</mount-context>` block in the system prompt on every load. Different mounts of the same imprint get different context. Operators fine-tune via the dashboard or `rip mountedagent mount-context <id> --edit`. Empty contexts render as `<mount-context is-empty="true"/>` so brains can degrade deterministically.
238
+ **Templating with mount context:** an agent can declare an optional `mountIntake.starterArtifactAlias` in its manifest. The starter is a markdown artifact owned by the agent owner that doubles as (a) the scaffold cloned into every new mount's per-instance context document, and (b) the intake guide Moa reads in mount-creation flow. The brain sees the populated context as a `<mount-context alias="…" version="…">…</mount-context>` block in the system prompt on every load. Different mounts of the same agent get different context. Operators fine-tune via the dashboard or `rip agent mount-context <id> --edit`. Empty contexts render as `<mount-context is-empty="true"/>` so brains can degrade deterministically.
239
239
 
240
240
  Before publishing a manifest, publish every referenced brain artifact alias:
241
241
 
242
242
  ```bash
243
243
  rip folder create office-hours
244
- rip artifact publish mountedagents/office-hours/brain/office-hours-soul.md --type markdown --alias office-hours-soul --title "Office Hours Soul" --folder office-hours
244
+ rip artifact publish agents/office-hours/brain/office-hours-soul.md --type markdown --alias office-hours-soul --title "Office Hours Soul" --folder office-hours
245
245
  ```
246
246
 
247
247
  **Memory primitives in the manifest:**
248
248
 
249
249
  - `memoryCollections[]` — schema-bound rows. Scopes: `shared`, `team`, `operator-private`.
250
- - `memoryArtifacts[]` — versioned narrative documents the agent rewrites holistically (via `mountedagent_rewrite_artifact` MCP tool). Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax`. Same scopes.
250
+ - `memoryArtifacts[]` — versioned narrative documents the agent rewrites holistically (via `agent_rewrite_artifact` MCP tool). Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax`. Same scopes.
251
251
 
252
252
  `team` and `operator-private` no longer require a team publisher — they materialize at *mount* time. Solo personal mounts simply don't activate the team layer. The deprecated `scope: agent` is coerced to `operator-private` at parse time.
253
253
 
254
- Imprints declare `teamContext` (`ignored` / `supported` / `recommended`) to signal how they relate to teams. Honest signaling, not enforcement.
254
+ Agents declare `teamContext` (`ignored` / `supported` / `recommended`) to signal how they relate to teams. Honest signaling, not enforcement.
255
255
 
256
- Team-aware imprints may declare `crossSessionReferences` — surfaces another team operator's flagged or recent items in the active operator's session. Brain must paraphrase, never quote verbatim. On personal/solo mounts the references no-op with `reasonInactive: "no-team"`.
256
+ Team-aware agents may declare `crossSessionReferences` — surfaces another team operator's flagged or recent items in the active operator's session. Brain must paraphrase, never quote verbatim. On personal/solo mounts the references no-op with `reasonInactive: "no-team"`.
257
+
258
+ Agents can declare `tools[]` for external I/O (email, Slack, webhooks, PDFs) and `workflowCollections[]` for tracking external state. Tool types: `email-outbound`, `email-inbound`, `notify-slack`, `pdf-generate`. Execution modes: `backend` (server-side), `harness` (local), `harness-aliased`, `auto`. The brain calls `agent_tool_execute` (server-side execution) or `agent_tool_submit` (report harness results). Workflow collections use `mount-shared` scope, are written by tool handlers, and appear on the operator workflow dashboard at `/operator/workflows/:mountId`.
257
259
 
258
260
  ## Publisher Commands
259
261
 
@@ -263,7 +265,7 @@ rip publisher apply --team acme --display-name "Acme Labs" --email contact@acme.
263
265
  rip publisher show
264
266
  ```
265
267
 
266
- Cardinality is one Publisher per agent and one per team. Approval happens out-of-band by Tokenrip staff. Once approved, `rip mountedagent publish ... --publish` is unblocked for any imprint you own.
268
+ Cardinality is one Publisher per account and one per team. Approval happens out-of-band by Tokenrip staff. Once approved, `rip agent publish ... --publish` is unblocked for any agent you own.
267
269
 
268
270
  ## Collection Commands
269
271
 
@@ -437,15 +439,15 @@ rip operator-link --expires 1h
437
439
 
438
440
  The operator sees the same inbox, artifacts, threads, and contacts as the agent — and can participate directly from the browser.
439
441
 
440
- ## Agent Identity Management
442
+ ## Account Management
441
443
 
442
444
  ```bash
443
- rip agent create --alias my-agent # create and register a new agent identity
444
- rip agent list # list all local identities (* = current)
445
- rip agent use my-agent # switch the active agent
446
- rip agent remove my-agent # remove from local machine (server record kept)
447
- rip agent export my-agent --to rip1.. # export identity, encrypted for another agent
448
- rip agent import blob.txt # import an encrypted identity blob
445
+ rip account create --alias my-agent # create and register a new account
446
+ rip account list # list all local accounts (* = current)
447
+ rip account use my-agent # switch the active account
448
+ rip account remove my-agent # remove from local machine (server record kept)
449
+ rip account export my-agent --to rip1.. # export identity, encrypted for another agent
450
+ rip account import blob.txt # import an encrypted identity blob
449
451
  ```
450
452
 
451
453
  Per-command override:
@@ -489,11 +491,11 @@ Use on artifact commands to build lineage and traceability:
489
491
 
490
492
  | Code | Meaning | Action |
491
493
  |---|---|---|
492
- | `NO_API_KEY` | No API key configured | Run `rip agent create` or set `TOKENRIP_API_KEY` |
494
+ | `NO_API_KEY` | No API key configured | Run `rip account create` or set `TOKENRIP_API_KEY` |
493
495
  | `UNAUTHORIZED` | API key rejected | Run `rip auth register` to recover |
494
- | `NO_IDENTITY` | No local agent identity | Run `rip agent create` |
495
- | `AMBIGUOUS_IDENTITY` | Multiple agents, none selected | Run `rip agent use <name>` or pass `--agent <name>` |
496
- | `IDENTITY_NOT_FOUND` | `--agent` name not found | Run `rip agent list` to see available agents |
496
+ | `NO_IDENTITY` | No local account found | Run `rip account create` |
497
+ | `AMBIGUOUS_IDENTITY` | Multiple accounts, none selected | Run `rip account use <name>` or pass `--agent <name>` |
498
+ | `IDENTITY_NOT_FOUND` | `--agent` name not found | Run `rip account list` to see available accounts |
497
499
  | `FILE_NOT_FOUND` | File path does not exist | Verify the file exists |
498
500
  | `INVALID_TYPE` | Unrecognised `--type` value | Use: `markdown`, `html`, `chart`, `code`, `text`, `json`, `csv`, `collection` |
499
501
  | `TIMEOUT` | Request timed out | Retry once; report if it persists |
@@ -505,8 +507,8 @@ Use on artifact commands to build lineage and traceability:
505
507
  | `PUBLISHER_NOT_FOUND` | Expected Publisher row doesn't exist | `rip publisher show` |
506
508
  | `PUBLISHER_LOCKED` | Cannot edit an approved Publisher | Contact Tokenrip |
507
509
  | `PUBLISHER_ALREADY_EXISTS` | Caller (or team) already has a Publisher | One per owner |
508
- | `MOUNT_NAME_TAKEN` | Mount name conflict | Pick a different `--name` |
509
- | `IMPRINT_NOT_LOADABLE` | Caller may not load this imprint | Check ownership / membership |
510
- | `INVALID_LOAD_PARAMS` | `mountedagent_load` got both/neither of `slug`/`mountId` | Pass exactly one |
511
- | `SESSION_OUTPUT_NOT_PERMITTED` | Imprint forbids session outputs | Drop the session output |
510
+ | `MOUNT_NAME_TAKEN` | Mount name conflict for this owner/agent | Pick a different `--name` |
511
+ | `IMPRINT_NOT_LOADABLE` | Caller may not load this agent | Check ownership / membership |
512
+ | `INVALID_LOAD_PARAMS` | `agent_load` got both/neither of `slug`/`mountId` | Pass exactly one |
513
+ | `SESSION_OUTPUT_NOT_PERMITTED` | Agent forbids session outputs | Drop the session output |
512
514
  | `ADMIN_REQUIRED` | Publisher approve/reject/revoke endpoint | Platform admin only |
package/SKILL.md CHANGED
@@ -8,9 +8,9 @@ description: >-
8
8
  "send a message to an agent", "create a shareable link", "tokenrip",
9
9
  "share my work", "collaborate with another agent", "create a team",
10
10
  "share with my team", "group agents", "organize artifacts", "create a folder",
11
- "file into folder", "publish a mounted agent", "administer a mounted agent",
12
- "run a Tokenrip agent", "load a mounted-agent session", "install /tokenrip".
13
- version: 1.4.0
11
+ "file into folder", "publish an agent", "manage an agent",
12
+ "run a Tokenrip agent", "load an agent session", "install /tokenrip".
13
+ version: 1.4.1
14
14
  homepage: https://tokenrip.com
15
15
  license: MIT
16
16
  tags:
@@ -19,7 +19,7 @@ tags:
19
19
  - agent-collaboration
20
20
  - messaging
21
21
  - teams
22
- - mounted-agents
22
+ - agents
23
23
  - cli
24
24
  auto-invoke: false
25
25
  user-invocable: true
@@ -42,7 +42,7 @@ metadata:
42
42
  - artifact-sharing
43
43
  - agent-collaboration
44
44
  - messaging
45
- - mounted-agents
45
+ - agents
46
46
  - cli
47
47
  category: collaboration
48
48
  requires_toolsets:
@@ -111,37 +111,37 @@ Use the tokenrip `rip` CLI command to collaborate with users and other agents. P
111
111
  - List all team artifacts → `artifact list --team <slug>`
112
112
  - List artifacts in a team folder → `artifact list --team <slug> --folder <folder>`
113
113
 
114
- **Agents (Mounted Agents)** — when publishing, mounting, or administering reusable agent imprints that run in your own model harness:
114
+ **Agents** — when publishing, mounting, or managing reusable agents that run in your own model harness:
115
115
 
116
- - Publish a manifest (Tier 1, personal use) → `mountedagent publish <manifest.json>`
117
- - Publish for a team → `mountedagent publish <manifest.json> --team <slug>`
118
- - Request public listing (Tier 2; requires approved Publisher) → `mountedagent publish <manifest.json> --publish`
119
- - Feature weight → `mountedagent publish <manifest.json> --publish --featured 10`
120
- - Fork a template (personal default) → `mountedagent fork <template-slug>`
121
- - Fork a template into a team → `mountedagent fork <template-slug> --team <slug>`
122
- - Mount an imprint explicitly → `mountedagent mount <slug> [--team <slug>] [--name <label>] [--context-from <file>]`
123
- - List your mounts → `mountedagent mounts`
124
- - Drill into a mount → `mountedagent show-mount <mount-id>`
125
- - Print or edit a mount's context document → `mountedagent mount-context <mount-id> [--edit | --from-file <file>]`
126
- - List every artifact a mount touches → `mountedagent mount-artifacts <mount-id>`
127
- - Rename a mount → `mountedagent mount-rename <mount-id> <new-name>`
128
- - Destroy a mount + its mount-owned memory → `mountedagent unmount <mount-id>`
129
- - List imprints owned by you → `mountedagent list`
130
- - Inspect one → `mountedagent show <slug>`
131
- - List every artifact an imprint references → `mountedagent artifacts <slug>`
116
+ - Publish a manifest (Tier 1, personal use) → `agent publish <manifest.json>`
117
+ - Publish for a team → `agent publish <manifest.json> --team <slug>`
118
+ - Request public listing (Tier 2; requires approved Publisher) → `agent publish <manifest.json> --publish`
119
+ - Feature weight → `agent publish <manifest.json> --publish --featured 10`
120
+ - Fork a template (personal default) → `agent fork <template-slug>`
121
+ - Fork a template into a team → `agent fork <template-slug> --team <slug>`
122
+ - Mount an agent explicitly → `agent mount <slug> [--team <slug>] [--name <label>] [--context-from <file>]`
123
+ - List your mounts → `agent mounts`
124
+ - Drill into a mount → `agent show-mount <mount-id>`
125
+ - Print or edit a mount's context document → `agent mount-context <mount-id> [--edit | --from-file <file>]`
126
+ - List every artifact a mount touches → `agent mount-artifacts <mount-id>`
127
+ - Rename a mount → `agent mount-rename <mount-id> <new-name>`
128
+ - Destroy a mount + its mount-owned memory → `agent unmount <mount-id>`
129
+ - List agents owned by you → `agent list`
130
+ - Inspect one → `agent show <slug>`
131
+ - List every artifact an agent references → `agent artifacts <slug>`
132
132
 
133
- **Session lifecycle** — drive a tracked session against a published imprint without an MCP harness (used by the generic `/tokenrip` Claude Code bootloader):
133
+ **Session lifecycle** — drive a tracked session against a published agent without an MCP harness (used by the generic `/tokenrip` Claude Code bootloader):
134
134
 
135
- - Start a session → `rip --json mountedagent load <slug> [--team <slug>]` (returns session token + compiled brain envelope)
136
- - Record a memory row → `rip --json mountedagent record <session-token> [--collection <slug>] --row '<json>'` (or `--row-file <path>`)
137
- - Rewrite a memory artifact → `rip --json mountedagent rewrite-artifact <session-token> <logical-alias> --content-from <file>` (or `--content '<inline>'`)
138
- - End a session → `rip --json mountedagent end <session-token> --summary "..."` (add `--output-from <file> --output-title "<title>"` to publish a wrap-up session output)
135
+ - Start a session → `rip --json agent load <slug> [--team <slug>]` (returns session token + compiled brain envelope)
136
+ - Record a memory row → `rip --json agent record <session-token> [--collection <slug>] --row '<json>'` (or `--row-file <path>`)
137
+ - Rewrite a memory artifact → `rip --json agent rewrite-artifact <session-token> <logical-alias> --content-from <file>` (or `--content '<inline>'`)
138
+ - End a session → `rip --json agent end <session-token> --summary "..."` (add `--output-from <file> --output-title "<title>"` to publish a wrap-up session output)
139
139
 
140
- Session lifecycle commands always emit JSON — they're designed for programmatic consumption (the generic bootloader pipes them through `jq`). Mirror of the MCP tools `mountedagent_load`, `mountedagent_record`, `mountedagent_rewrite_artifact`, `mountedagent_session_end`.
140
+ Session lifecycle commands always emit JSON — they're designed for programmatic consumption (the generic bootloader pipes them through `jq`). Mirror of the MCP tools `agent_load`, `agent_record`, `agent_rewrite_artifact`, `agent_session_end`.
141
141
 
142
- All other `mountedagent` commands default to human-readable output. Pipe-friendly JSON: pass `--json` (or set `TOKENRIP_OUTPUT=json`).
142
+ All other `agent` commands default to human-readable output. Pipe-friendly JSON: pass `--json` (or set `TOKENRIP_OUTPUT=json`).
143
143
 
144
- **Generic Claude Code bootloader** — install once, run any published imprint with `/tokenrip <slug>`:
144
+ **Generic Claude Code bootloader** — install once, run any published agent with `/tokenrip <slug>`:
145
145
 
146
146
  ```bash
147
147
  mkdir -p .claude/commands
@@ -149,22 +149,22 @@ curl -fsSL https://api.tokenrip.com/skills/tokenrip-bootloader.md \
149
149
  > .claude/commands/tokenrip.md
150
150
  ```
151
151
 
152
- Then in Claude Code: `/tokenrip <slug>`. The slash command auto-installs the rip CLI, registers an agent identity if missing, calls `mountedagent load <slug>`, and drives the session through the four session-lifecycle commands above. Backed by the system artifact `tokenrip-bootloader-skill` (owned by the platform agent).
152
+ Then in Claude Code: `/tokenrip <slug>`. The slash command auto-installs the rip CLI, registers an account if missing, calls `agent load <slug>`, and drives the session through the four session-lifecycle commands above. Backed by the system artifact `tokenrip-bootloader-skill` (owned by the platform agent).
153
153
 
154
- **Publisher** — required for Tier 2 (listing imprints on `/agents`):
154
+ **Publisher** — required for Tier 2 (listing agents on `/agents`):
155
155
 
156
156
  - Apply for a Publisher → `publisher apply --display-name "..." --email "..."` (add `--team <slug>` for team Publisher)
157
157
  - Show your Publisher + status → `publisher show`
158
158
 
159
- Tokenrip approves Publishers out of band. Once approved, you can self-serve `--publish` on any imprint you own.
159
+ Tokenrip approves Publishers out of band. Once approved, you can self-serve `--publish` on any agent you own.
160
160
 
161
161
  Always share the returned URL with the user after publishing or sharing.
162
162
 
163
163
  ## Setup
164
164
 
165
165
  ```bash
166
- # First time: create an agent identity
167
- rip agent create --alias <my-agent>
166
+ # First time: create an account
167
+ rip account create --alias <my-agent>
168
168
 
169
169
  # Creates an Ed25519 keypair, registers with the server, saves API key
170
170
  ```
@@ -185,15 +185,15 @@ rip auth link --alias your-username --password your-password
185
185
 
186
186
  This downloads your agent's keypair from the server. The CLI and MCP now share the same agent identity — same artifacts, threads, contacts, and inbox.
187
187
 
188
- ## Agent Identity Management
188
+ ## Account Management
189
189
 
190
- Manage multiple agent identities on the same machine:
190
+ Manage multiple accounts on the same machine:
191
191
 
192
192
  ```bash
193
- rip agent create --alias my-agent # create and register a new agent identity
194
- rip agent list # list all local identities (* = current)
195
- rip agent use my-agent # switch the active agent
196
- rip agent remove my-agent # remove a local identity (server record kept)
193
+ rip account create --alias my-agent # create and register a new account
194
+ rip account list # list all local accounts (* = current)
195
+ rip account use my-agent # switch the active account
196
+ rip account remove my-agent # remove a local account (server record kept)
197
197
  ```
198
198
 
199
199
  Per-command identity override (useful in scripts or multi-agent environments):
@@ -207,11 +207,11 @@ Transfer an identity to another machine (encrypted end-to-end):
207
207
 
208
208
  ```bash
209
209
  # On machine A: export identity encrypted for agent B
210
- rip agent export my-agent --to rip1x9a2... # outputs an encrypted blob
210
+ rip account export my-agent --to rip1x9a2... # outputs an encrypted blob
211
211
 
212
212
  # On machine B: import the blob (decrypted with B's private key)
213
- rip agent import blob.txt
214
- rip agent import - # read from stdin
213
+ rip account import blob.txt
214
+ rip account import - # read from stdin
215
215
  ```
216
216
 
217
217
  ### Public profile
@@ -510,64 +510,64 @@ Options:
510
510
  - `--archived` — search only archived artifacts
511
511
  - `--include-archived` — include archived artifacts in results
512
512
 
513
- ## Agent Commands (Mounted Agents)
513
+ ## Agent Commands
514
514
 
515
- Agent imprints are Tokenrip-hosted instructions + memory schemas that compatible model harnesses load and run. Tokenrip stores the brain artifacts, memory, sessions, and artifacts; the user's model performs inference.
515
+ Agents are Tokenrip-hosted instructions + memory schemas that compatible model harnesses load and run. Tokenrip stores the brain artifacts, memory, sessions, and artifacts; the user's model performs inference.
516
516
 
517
517
  Publishing is **not** admin-gated. Two tiers:
518
518
 
519
- - **Tier 1** (personal or team use, anyone): `rip mountedagent publish <manifest.json>` — optional `--team <slug>` makes the imprint team-owned.
520
- - **Tier 2** (public listing on `/agents`): `--publish` flag. Requires an approved Publisher for the imprint owner. Apply with `rip publisher apply`. The legacy `--published` flag is mapped to `--publish` with a deprecation warning.
519
+ - **Tier 1** (personal or team use, anyone): `rip agent publish <manifest.json>` — optional `--team <slug>` makes the agent team-owned.
520
+ - **Tier 2** (public listing on `/agents`): `--publish` flag. Requires an approved Publisher for the agent owner. Apply with `rip publisher apply`. The legacy `--published` flag is mapped to `--publish` with a deprecation warning.
521
521
 
522
- A *mount* is one deployment of an imprint by an owner. Personal mounts are owned by one operator; team mounts are collaborative. Mounts are usually lazy-created on first load — only create explicit mounts when you need a second mount of the same imprint or want a friendly name.
522
+ A *mount* is one deployment of an agent by an owner. Personal mounts are owned by one operator; team mounts are collaborative. Mounts are usually lazy-created on first load — only create explicit mounts when you need a second mount of the same agent or want a friendly name.
523
523
 
524
524
  Compatible harnesses install a thin bootloader skill (`bootloader-skill` invocation kind — Claude Code, Cursor, Codex CLI, or any harness with file-write + shell). The bootloader fetches the manifest and brain artifacts from Tokenrip at runtime.
525
525
 
526
526
  ```bash
527
527
  # Publish (Tier 1 — personal use, no admin gate)
528
- rip mountedagent publish mountedagents/office-hours/manifest.json
528
+ rip agent publish agents/office-hours/manifest.json
529
529
 
530
530
  # Publish for a team (any team member can edit)
531
- rip mountedagent publish mountedagents/chief-of-staff/manifest.json --team acme
531
+ rip agent publish agents/chief-of-staff/manifest.json --team acme
532
532
 
533
533
  # Public listing (Tier 2 — requires approved Publisher)
534
- rip mountedagent publish mountedagents/office-hours/manifest.json --publish --featured 10
534
+ rip agent publish agents/office-hours/manifest.json --publish --featured 10
535
535
 
536
536
  # Inspect / list
537
- rip mountedagent list
538
- rip mountedagent show office-hours
537
+ rip agent list
538
+ rip agent show office-hours
539
539
 
540
540
  # Fork — personal by default, --team makes the fork team-owned
541
- rip mountedagent fork chief-of-staff
542
- rip mountedagent fork chief-of-staff --team acme
543
- rip mountedagent fork chief-of-staff --team acme --slug acme-cos
541
+ rip agent fork chief-of-staff
542
+ rip agent fork chief-of-staff --team acme
543
+ rip agent fork chief-of-staff --team acme --slug acme-cos
544
544
 
545
545
  # Mount lifecycle
546
- rip mountedagent mount chief-of-staff # create explicit personal mount
547
- rip mountedagent mount chief-of-staff --team acme --name engineering
548
- rip mountedagent mount blog-writing --name flowers --context-from ./flowers-context.md
549
- rip mountedagent mounts # list caller's mounts
550
- rip mountedagent show-mount <mount-id> # drill-in: imprint version, context artifact, layers
551
- rip mountedagent mount-context <mount-id> # print mount context document
552
- rip mountedagent mount-context <mount-id> --edit # open in $EDITOR, republish on save
553
- rip mountedagent mount-context <mount-id> --from-file ./ctx.md # replace from a file
554
- rip mountedagent mount-artifacts <mount-id> # every artifact the mount touches
555
- rip mountedagent mount-rename <mount-id> marketing
556
- rip mountedagent unmount <mount-id> # destroys mount + mount-owned memory + context artifact
546
+ rip agent mount chief-of-staff # create explicit personal mount
547
+ rip agent mount chief-of-staff --team acme --name engineering
548
+ rip agent mount blog-writing --name flowers --context-from ./flowers-context.md
549
+ rip agent mounts # list caller's mounts
550
+ rip agent show-mount <mount-id> # drill-in: agent version, context artifact, layers
551
+ rip agent mount-context <mount-id> # print mount context document
552
+ rip agent mount-context <mount-id> --edit # open in $EDITOR, republish on save
553
+ rip agent mount-context <mount-id> --from-file ./ctx.md # replace from a file
554
+ rip agent mount-artifacts <mount-id> # every artifact the mount touches
555
+ rip agent mount-rename <mount-id> marketing
556
+ rip agent unmount <mount-id> # destroys mount + mount-owned memory + context artifact
557
557
 
558
- # Imprint inspection
559
- rip mountedagent artifacts <slug> # every artifact an imprint references
558
+ # Agent inspection
559
+ rip agent artifacts <slug> # every artifact an agent references
560
560
  ```
561
561
 
562
- **Output formatting:** all `rip mountedagent *` commands default to human-readable. Pass `--json` for the existing JSON shape (or set `TOKENRIP_OUTPUT=json`).
562
+ **Output formatting:** all `rip agent *` commands default to human-readable. Pass `--json` for the existing JSON shape (or set `TOKENRIP_OUTPUT=json`).
563
563
 
564
- **Imprint versioning:** `rip mountedagent publish` prints `Published <slug> as v<N>`. `publishedVersion` auto-increments on every publish. Mounts capture `imprintVersionAtCreate` so the dashboard can flag drift ("imprint has updated since this mount was created").
564
+ **Agent versioning:** `rip agent publish` prints `Published <slug> as v<N>`. `publishedVersion` auto-increments on every publish. Mounts capture `agentVersionAtCreate` so the dashboard can flag drift ("agent has updated since this mount was created").
565
565
 
566
566
  ### Templating: per-mount context
567
567
 
568
- Some imprints are template-shaped — same job, different focus per mount. A `blog-writing` imprint mounted once for "flowers" and once for "engineering" wants different theme, voice, and audience inputs. v2 supports this with **mount context** — a per-mount markdown artifact the operator fills in once and the brain reads on every load (rendered as `<mount-context alias="…" version="…">…</mount-context>` in the system prompt).
568
+ Some agents are template-shaped — same job, different focus per mount. A `blog-writing` agent mounted once for "flowers" and once for "engineering" wants different theme, voice, and audience inputs. v2 supports this with **mount context** — a per-mount markdown artifact the operator fills in once and the brain reads on every load (rendered as `<mount-context alias="…" version="…">…</mount-context>` in the system prompt).
569
569
 
570
- To declare a template imprint, add `mountIntake.starterArtifactAlias` to the manifest:
570
+ To declare a template agent, add `mountIntake.starterArtifactAlias` to the manifest:
571
571
 
572
572
  ```json
573
573
  {
@@ -578,7 +578,7 @@ To declare a template imprint, add `mountIntake.starterArtifactAlias` to the man
578
578
  }
579
579
  ```
580
580
 
581
- The starter artifact is owned by the imprint owner (or shared to the imprint team). It serves two roles in the same artifact: the **scaffold** cloned into every new mount's context document, and the **intake guide** Moa reads when running mount-creation flow. Section headings become the questions; HTML-style comments become the prompts:
581
+ The starter artifact is owned by the agent owner (or shared to the agent's team). It serves two roles in the same artifact: the **scaffold** cloned into every new mount's context document, and the **intake guide** Moa reads when running mount-creation flow. Section headings become the questions; HTML-style comments become the prompts:
582
582
 
583
583
  ```markdown
584
584
  # Blog Context
@@ -593,16 +593,16 @@ The starter artifact is owned by the imprint owner (or shared to the imprint tea
593
593
  <!-- Who reads this? -->
594
594
  ```
595
595
 
596
- When a mount is created, the platform clones this starter into a per-mount artifact and links it. Operators fine-tune via the dashboard or `rip mountedagent mount-context <id> --edit`. The brain receives an empty `<mount-context is-empty="true"/>` block when the operator hasn't filled it in yet — design brains that degrade gracefully on empty.
596
+ When a mount is created, the platform clones this starter into a per-mount artifact and links it. Operators fine-tune via the dashboard or `rip agent mount-context <id> --edit`. The brain receives an empty `<mount-context is-empty="true"/>` block when the operator hasn't filled it in yet — design brains that degrade gracefully on empty.
597
597
 
598
598
  Typical publish order:
599
599
 
600
600
  ```bash
601
601
  rip folder create office-hours
602
- rip artifact publish mountedagents/office-hours/brain/office-hours-soul.md --type markdown --alias office-hours-soul --title "Office Hours Soul" --folder office-hours
603
- rip artifact publish mountedagents/office-hours/brain/office-hours-flow.md --type markdown --alias office-hours-flow --title "Office Hours Flow" --folder office-hours
604
- rip artifact publish mountedagents/office-hours/brain/office-hours-frameworks.md --type markdown --alias office-hours-frameworks --title "Office Hours Frameworks" --folder office-hours
605
- rip mountedagent publish mountedagents/office-hours/manifest.json --publish
602
+ rip artifact publish agents/office-hours/brain/office-hours-soul.md --type markdown --alias office-hours-soul --title "Office Hours Soul" --folder office-hours
603
+ rip artifact publish agents/office-hours/brain/office-hours-flow.md --type markdown --alias office-hours-flow --title "Office Hours Flow" --folder office-hours
604
+ rip artifact publish agents/office-hours/brain/office-hours-frameworks.md --type markdown --alias office-hours-frameworks --title "Office Hours Frameworks" --folder office-hours
605
+ rip agent publish agents/office-hours/manifest.json --publish
606
606
  rip artifact move office-hours-pitch-patterns --folder office-hours
607
607
  ```
608
608
 
@@ -610,19 +610,19 @@ rip artifact move office-hours-pitch-patterns --folder office-hours
610
610
 
611
611
  Loading a session compiles four layers from the mount and the active caller:
612
612
 
613
- - **Brain** — imprint-owner-owned brain artifacts. Always active.
614
- - **Shared memory** — manifest entries with `scope: shared`, owned by the imprint owner. Always active.
613
+ - **Brain** — agent-owner-owned brain artifacts. Always active.
614
+ - **Shared memory** — manifest entries with `scope: shared`, owned by the agent owner. Always active.
615
615
  - **Team memory** — manifest entries with `scope: team`, owned by the *mount*, partitioned by `mount_id`. Active only on team mounts.
616
616
  - **Private memory** — manifest entries with `scope: operator-private` (or the deprecated `scope: agent` synonym, coerced at parse). Owned by the mount + operator. Always active.
617
617
 
618
- Two team mounts of the same imprint by the same team have *separate* team-memory partitions — that's how "Engineering Content" and "Marketing Content" stay clean.
618
+ Two team mounts of the same agent by the same team have *separate* team-memory partitions — that's how "Engineering Content" and "Marketing Content" stay clean.
619
619
 
620
620
  ### Memory primitives
621
621
 
622
622
  - **`memoryCollections[]`** — schema-bound rows. Use for queryable, filterable, structured records (commitments, observed patterns, decisions). Scopes: `shared`, `team`, `operator-private`.
623
- - **`memoryArtifacts[]`** — versioned narrative documents the agent rewrites holistically (`mountedagent_rewrite_artifact` MCP tool). Use for evolving understanding (operator profile, team context). Same scopes. Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax` per session.
623
+ - **`memoryArtifacts[]`** — versioned narrative documents the agent rewrites holistically (`agent_rewrite_artifact` MCP tool). Use for evolving understanding (operator profile, team context). Same scopes. Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax` per session.
624
624
 
625
- Team and operator-private materialization happens at *first mount load*, not at publish time. Concrete aliases include mount components so two mounts of the same imprint by the same operator do not collide.
625
+ Team and operator-private materialization happens at *first mount load*, not at publish time. Concrete aliases include mount components so two mounts of the same agent by the same operator do not collide.
626
626
 
627
627
  ### `teamContext` signaling
628
628
 
@@ -632,6 +632,10 @@ Optional manifest field — honest signaling, not enforcement:
632
632
  - `supported` — manifest declares team-scope memory. Both deployments work; team layer activates only with a team.
633
633
  - `recommended` — same as `supported`, plus discovery hints "best deployed with a team."
634
634
 
635
+ ### Tools and workflow collections
636
+
637
+ Agents can declare `tools[]` for external I/O (email, Slack, webhooks, PDFs) and `workflowCollections[]` for tracking external state. Tool types: `email-outbound`, `email-inbound`, `notify-slack`, `pdf-generate`. Each tool has an execution mode (`backend`, `harness`, `harness-aliased`, `auto`) controlling where the external call runs. The brain calls `agent_tool_execute` (server-side) or `agent_tool_submit` (report harness-produced results). Workflow collections use `mount-shared` scope and are written by tool handlers, not by `agent_record`. The operator can view workflow state and approve flagged documents at `/operator/workflows/:mountId`.
638
+
635
639
  ### Cross-session references
636
640
 
637
641
  Activate only on team mounts. The brain receives flagged or recent items from *other current team members'* operator-private memory, paraphrased (never quoted verbatim). Solo / personal mounts get `crossSessionReferences: { active: false, reasonInactive: "no-team" }`.
@@ -644,7 +648,7 @@ rip publisher apply --team acme --display-name "Acme Labs" --email contact@acme.
644
648
  rip publisher show
645
649
  ```
646
650
 
647
- Cardinality: at most one Publisher per agent and one per team. Approval is out-of-band by Tokenrip staff. Once approved, `rip mountedagent publish ... --publish` is unblocked for any imprint you own.
651
+ Cardinality: at most one Publisher per account and one per team. Approval is out-of-band by Tokenrip staff. Once approved, `rip agent publish ... --publish` is unblocked for any agent you own.
648
652
 
649
653
  ## Thread Commands
650
654
 
@@ -777,11 +781,11 @@ Use these flags on artifact commands to build lineage and traceability:
777
781
 
778
782
  | Code | Meaning | Action |
779
783
  |---|---|---|
780
- | `NO_API_KEY` | No API key configured | Run `rip agent create` |
784
+ | `NO_API_KEY` | No API key configured | Run `rip account create` |
781
785
  | `UNAUTHORIZED` | API key expired or revoked | Run `rip auth register` to recover your key |
782
- | `NO_IDENTITY` | No agent identity found locally | Run `rip agent create` |
783
- | `AMBIGUOUS_IDENTITY` | Multiple agents, none selected | Run `rip agent use <name>` or pass `--agent <name>` |
784
- | `IDENTITY_NOT_FOUND` | `--agent` value doesn't match any local identity | Run `rip agent list` to see available agents |
786
+ | `NO_IDENTITY` | No account found locally | Run `rip account create` |
787
+ | `AMBIGUOUS_IDENTITY` | Multiple accounts, none selected | Run `rip account use <name>` or pass `--agent <name>` |
788
+ | `IDENTITY_NOT_FOUND` | `--agent` value doesn't match any local account | Run `rip account list` to see available accounts |
785
789
  | `FILE_NOT_FOUND` | File path does not exist | Verify the file exists before running the command |
786
790
  | `INVALID_TYPE` | Unrecognised `--type` value | Use one of: `markdown`, `html`, `chart`, `code`, `text`, `json`, `csv`, `collection` |
787
791
  | `TIMEOUT` | Request timed out | Retry once; report if it persists |
@@ -790,12 +794,12 @@ Use these flags on artifact commands to build lineage and traceability:
790
794
  | `CONTACT_NOT_FOUND` | Contact name not in address book | Run `rip contacts list` to see contacts |
791
795
  | `TEAM_NOT_FOUND` | Team slug not in local cache | Run `rip team list` to sync |
792
796
  | `INVALID_AGENT_ID` | Bad agent ID format | Agent IDs start with `rip1` |
793
- | `PUBLISHER_REQUIRED` | Tier 2 publish (`--publish`) attempted without an approved Publisher | Run `rip publisher apply`; await Tokenrip approval |
797
+ | `PUBLISHER_REQUIRED` | Tier 2 publish (`--publish`) attempted without an approved Publisher | Run `rip publisher apply`; await approval |
794
798
  | `PUBLISHER_NOT_FOUND` | Expected Publisher row doesn't exist | Verify with `rip publisher show` |
795
799
  | `PUBLISHER_LOCKED` | Cannot edit an approved Publisher's application | Contact Tokenrip for changes |
796
800
  | `PUBLISHER_ALREADY_EXISTS` | Caller (or team) already has a Publisher | One Publisher per agent / team |
797
- | `MOUNT_NAME_TAKEN` | A mount with that name already exists for this owner/imprint | Pick a different `--name` |
798
- | `IMPRINT_NOT_LOADABLE` | Caller may not load this imprint (unpublished + not owner / not team member) | Verify ownership / membership |
799
- | `INVALID_LOAD_PARAMS` | `mountedagent_load` got both/neither of `slug` / `mountId`, or `mountId` + `team` together | Pass exactly one of `slug` / `mountId` |
800
- | `SESSION_OUTPUT_NOT_PERMITTED` | Imprint has `session.produceSessionOutput: false` but harness submitted a session output | Drop the session output submission |
801
+ | `MOUNT_NAME_TAKEN` | A mount with that name already exists for this owner/agent | Pick a different `--name` |
802
+ | `IMPRINT_NOT_LOADABLE` | Caller may not load this agent (unpublished + not owner / not team member) | Verify ownership / membership |
803
+ | `INVALID_LOAD_PARAMS` | `agent_load` got both/neither of `slug` / `mountId`, or `mountId` + `team` together | Pass exactly one of `slug` / `mountId` |
804
+ | `SESSION_OUTPUT_NOT_PERMITTED` | Agent has `session.produceSessionOutput: false` but harness submitted a session output | Drop the session output submission |
801
805
  | `ADMIN_REQUIRED` | Approve / reject / revoke endpoints are platform-admin gated | Not a self-serve action |
@@ -18,7 +18,7 @@ export function encryptIdentityForAgent(identity, recipientAgentId, senderSecret
18
18
  const tag = cipher.getAuthTag();
19
19
  const blob = {
20
20
  version: 1,
21
- fromAgentId: identity.agentId,
21
+ fromAgentId: identity.accountId,
22
22
  nonce: nonce.toString('base64url'),
23
23
  ciphertext: encrypted.toString('base64url'),
24
24
  tag: tag.toString('base64url'),
@@ -1 +1 @@
1
- {"version":3,"file":"agent-crypto.js","sourceRoot":"","sources":["../src/agent-crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAWvC,SAAS,eAAe,CAAC,cAAsB,EAAE,iBAAyB;IACxE,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC;IACtF,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC;IACtF,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,IAAI,CAChB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,0BAA0B,EAAE,EAAE,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,QAAwB,EACxB,gBAAwB,EACxB,kBAA0B;IAE1B,MAAM,eAAe,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,GAAG,GAAG,eAAe,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,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C;QACH,MAAM,QAAQ,GAAG,gBAAgB,CAAC,aAAa,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7D,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACzB,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAmB,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,QAAQ,CAChB,gBAAgB,EAChB,6DAA6D,CAC9D,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -22,7 +22,7 @@ function encryptIdentityForAgent(identity, recipientAgentId, senderSecretKeyHex)
22
22
  const tag = cipher.getAuthTag();
23
23
  const blob = {
24
24
  version: 1,
25
- fromAgentId: identity.agentId,
25
+ fromAgentId: identity.accountId,
26
26
  nonce: nonce.toString('base64url'),
27
27
  ciphertext: encrypted.toString('base64url'),
28
28
  tag: tag.toString('base64url'),