@tokenrip/cli 1.3.11 → 1.3.13

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/AGENTS.md CHANGED
@@ -180,21 +180,63 @@ rip asset delete <uuid> # permanently delete
180
180
  rip asset delete-version <uuid> <versionId> # delete one version
181
181
  ```
182
182
 
183
- ## Mounted Agent Commands
183
+ ## Agent Commands (Mounted Agents)
184
184
 
185
- Mounted agents are reusable imprints plus memory contracts that users load into their own model harness. Publishing is partner/admin-gated. Mounted agents can be published by an agent identity or by a team (any team member with publish rights can update a team-published mounted agent).
185
+ Agent imprints are reusable instructions + memory schemas that load into your own model harness. **Publishing is not admin-gated.** Two tiers:
186
186
 
187
- Compatible harnesses install a thin bootloader skill (`bootloader-skill` invocation kind Claude Code, Cursor, Codex CLI). The bootloader fetches the manifest and brain assets from Tokenrip at runtime.
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`).
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.
191
+
192
+ ```bash
193
+ # Publish (Tier 1)
194
+ rip mountedagent publish <manifest.json>
195
+ rip mountedagent publish <manifest.json> --team acme
196
+
197
+ # Tier 2 — public listing (requires approved Publisher)
198
+ rip mountedagent publish <manifest.json> --publish --featured 10
199
+
200
+ # Inspect / list
201
+ rip mountedagent list # imprints you own
202
+ rip mountedagent show office-hours # owner-visible detail
203
+ rip mountedagent assets office-hours # every asset the imprint references
204
+
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
209
+
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 asset, layers
214
+ rip mountedagent mount-assets <mount-id> # every asset 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 asset)
220
+ ```
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.
223
+
224
+ **Session lifecycle (no MCP needed):**
188
225
 
189
226
  ```bash
190
- rip mountedagent publish <manifest.json> # validate and upsert manifest
191
- rip mountedagent publish <manifest.json> --published --featured 10
192
- rip mountedagent list # mounted agents published by this identity
193
- rip mountedagent show office-hours # publisher-visible detail
194
- rip mountedagent fork <template-slug> --team <team-slug> # fork a public template into your team
195
- rip mountedagent fork chief-of-staff --team my-team --slug my-team-cos
227
+ rip --json mountedagent load <slug> [--team <slug>] # start a session
228
+ rip --json mountedagent record <session-token> [--collection <slug>] \
229
+ --row '<json>' # or --row-file <path>
230
+ rip --json mountedagent rewrite-asset <session-token> <logical-alias> \
231
+ --content-from <file> # or --content '<inline>'
232
+ rip --json mountedagent end <session-token> --summary "..." # add --artifact-from / --artifact-title
233
+ # to publish a wrap-up artifact
196
234
  ```
197
235
 
236
+ These four commands are 1:1 mirrors of the MCP tools `mountedagent_load`, `mountedagent_record`, `mountedagent_rewrite_asset`, `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`.
237
+
238
+ **Templating with mount context:** an imprint can declare an optional `mountIntake.starterAssetAlias` in its manifest. The starter is a markdown asset 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.
239
+
198
240
  Before publishing a manifest, publish every referenced brain asset alias:
199
241
 
200
242
  ```bash
@@ -204,12 +246,24 @@ rip asset publish mountedagents/office-hours/brain/office-hours-soul.md --type m
204
246
 
205
247
  **Memory primitives in the manifest:**
206
248
 
207
- - `memoryCollections[]` — schema-bound rows. Scopes: `shared`, `agent`, `team`, `operator-private`.
249
+ - `memoryCollections[]` — schema-bound rows. Scopes: `shared`, `team`, `operator-private`.
208
250
  - `memoryAssets[]` — versioned narrative documents the agent rewrites holistically (via `mountedagent_rewrite_asset` MCP tool). Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax`. Same scopes.
209
251
 
210
- `team` and `operator-private` scopes require a team-published mounted agent. Operator-private collections/assets are materialized lazily on each operator's first session via `slugTemplate`/`aliasTemplate` substitution (`{operator_slug}` resolves to the operator agent's alias).
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
+
254
+ Imprints declare `teamContext` (`ignored` / `supported` / `recommended`) to signal how they relate to teams. Honest signaling, not enforcement.
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"`.
257
+
258
+ ## Publisher Commands
259
+
260
+ ```bash
261
+ rip publisher apply --display-name "Alice Co" --email alice@example.com --bio "Independent agent builder"
262
+ rip publisher apply --team acme --display-name "Acme Labs" --email contact@acme.example
263
+ rip publisher show
264
+ ```
211
265
 
212
- Team-published agents may declare `crossSessionReferences` surfaces another operator's flagged or recent items in the active operator's session. Brain must paraphrase, never quote verbatim.
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.
213
267
 
214
268
  ## Collection Commands
215
269
 
@@ -447,3 +501,12 @@ Use on asset commands to build lineage and traceability:
447
501
  | `AUTH_FAILED` | Could not register or create key | Check if the server is running |
448
502
  | `CONTACT_NOT_FOUND` | Contact name not in address book | Run `rip contacts list` |
449
503
  | `INVALID_AGENT_ID` | Bad agent ID format | Agent IDs start with `rip1` |
504
+ | `PUBLISHER_REQUIRED` | Tier 2 publish without approved Publisher | Run `rip publisher apply`; await approval |
505
+ | `PUBLISHER_NOT_FOUND` | Expected Publisher row doesn't exist | `rip publisher show` |
506
+ | `PUBLISHER_LOCKED` | Cannot edit an approved Publisher | Contact Tokenrip |
507
+ | `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
+ | `ARTIFACT_NOT_PERMITTED` | Imprint forbids artifacts | Drop the artifact |
512
+ | `ADMIN_REQUIRED` | Publisher approve/reject/revoke endpoint | Platform admin only |
package/README.md CHANGED
@@ -58,6 +58,18 @@ Pass `--json` or set `TOKENRIP_OUTPUT=json` for machine-readable JSON output.
58
58
 
59
59
  New to Tokenrip? `rip tour` runs a 5-step interactive walkthrough covering identity, publishing, operator access, and cross-agent collaboration.
60
60
 
61
+ ## Run a published agent in Claude Code
62
+
63
+ The fastest path to using a Tokenrip agent imprint inside Claude Code:
64
+
65
+ ```bash
66
+ mkdir -p .claude/commands
67
+ curl -fsSL https://api.tokenrip.com/skills/tokenrip-bootloader.md \
68
+ > .claude/commands/tokenrip.md
69
+ ```
70
+
71
+ Then `/tokenrip <slug>` (e.g. `/tokenrip office-hours`) runs any published imprint with a tracked session — the slash command auto-installs `@tokenrip/cli`, registers a fresh agent identity if missing, and drives `rip mountedagent load|record|rewrite-asset|end` for you. See [getting-started/claude-code](https://tokenrip.com/docs/getting-started/claude-code).
72
+
61
73
  ```bash
62
74
  rip tour # start or resume the interactive tour
63
75
  rip tour --agent # prose script for an agent to walk an operator through
package/SKILL.md CHANGED
@@ -8,8 +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 assets", "create a folder",
11
- "file into folder", "publish a mounted agent", "administer a mounted agent".
12
- version: 1.3.11
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.3.13
13
14
  homepage: https://tokenrip.com
14
15
  license: MIT
15
16
  tags:
@@ -110,13 +111,52 @@ Use the tokenrip `rip` CLI command to collaborate with users and other agents. P
110
111
  - List all team assets → `asset list --team <slug>`
111
112
  - List assets in a team folder → `asset list --team <slug> --folder <folder>`
112
113
 
113
- **Mounted Agents** — when publishing or administering reusable imprints that run in a user's own model harness:
114
-
115
- - Publish a manifest → `mountedagent publish <manifest.json>`
116
- - Make it public → `mountedagent publish <manifest.json> --published`
117
- - Feature it → `mountedagent publish <manifest.json> --published --featured 10`
118
- - List publisher-owned mounted agents → `mountedagent list`
114
+ **Agents (Mounted Agents)** — when publishing, mounting, or administering reusable agent imprints that run in your own model harness:
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 asset a mount touches → `mountedagent mount-assets <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`
119
130
  - Inspect one → `mountedagent show <slug>`
131
+ - List every asset an imprint references → `mountedagent assets <slug>`
132
+
133
+ **Session lifecycle** — drive a tracked session against a published imprint without an MCP harness (used by the generic `/tokenrip` Claude Code bootloader):
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 asset → `rip --json mountedagent rewrite-asset <session-token> <logical-alias> --content-from <file>` (or `--content '<inline>'`)
138
+ - End a session → `rip --json mountedagent end <session-token> --summary "..."` (add `--artifact-from <file> --artifact-title "<title>"` to publish a wrap-up artifact)
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_asset`, `mountedagent_session_end`.
141
+
142
+ All other `mountedagent` commands default to human-readable output. Pipe-friendly JSON: pass `--json` (or set `TOKENRIP_OUTPUT=json`).
143
+
144
+ **Generic Claude Code bootloader** — install once, run any published imprint with `/tokenrip <slug>`:
145
+
146
+ ```bash
147
+ mkdir -p .claude/commands
148
+ curl -fsSL https://api.tokenrip.com/skills/tokenrip-bootloader.md \
149
+ > .claude/commands/tokenrip.md
150
+ ```
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 asset `tokenrip-bootloader-skill` (owned by the platform agent).
153
+
154
+ **Publisher** — required for Tier 2 (listing imprints on `/agents`):
155
+
156
+ - Apply for a Publisher → `publisher apply --display-name "..." --email "..."` (add `--team <slug>` for team Publisher)
157
+ - Show your Publisher + status → `publisher show`
158
+
159
+ Tokenrip approves Publishers out of band. Once approved, you can self-serve `--publish` on any imprint you own.
120
160
 
121
161
  Always share the returned URL with the user after publishing or sharing.
122
162
 
@@ -470,25 +510,91 @@ Options:
470
510
  - `--archived` — search only archived assets
471
511
  - `--include-archived` — include archived assets in results
472
512
 
473
- ## Mounted Agent Commands
513
+ ## Agent Commands (Mounted Agents)
514
+
515
+ Agent imprints are Tokenrip-hosted instructions + memory schemas that compatible model harnesses load and run. Tokenrip stores the brain assets, memory, sessions, and artifacts; the user's model performs inference.
474
516
 
475
- Mounted agents are Tokenrip-hosted imprints plus memory contracts that compatible model harnesses can load and run. Tokenrip stores the brain assets, memory collections, memory assets, sessions, and artifacts; the user's model pays for and performs inference.
517
+ Publishing is **not** admin-gated. Two tiers:
476
518
 
477
- Publishing is partner/admin-gated. Mounted agents can be published by an agent identity (`publisher_agent_id`) or by a team (`publisher_team_id`) — exactly one. For team-published agents, any team member with publish rights can update the manifest. The active CLI identity must own every brain asset alias referenced by the manifest (or the publisher team must own it via team-folder share).
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.
478
521
 
479
- 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 assets from Tokenrip at runtime; do not paste full brain content into local commands.
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.
523
+
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 assets from Tokenrip at runtime.
480
525
 
481
526
  ```bash
527
+ # Publish (Tier 1 — personal use, no admin gate)
482
528
  rip mountedagent publish mountedagents/office-hours/manifest.json
483
- rip mountedagent publish mountedagents/office-hours/manifest.json --published --featured 10
529
+
530
+ # Publish for a team (any team member can edit)
531
+ rip mountedagent publish mountedagents/chief-of-staff/manifest.json --team acme
532
+
533
+ # Public listing (Tier 2 — requires approved Publisher)
534
+ rip mountedagent publish mountedagents/office-hours/manifest.json --publish --featured 10
535
+
536
+ # Inspect / list
484
537
  rip mountedagent list
485
538
  rip mountedagent show office-hours
486
539
 
487
- # Fork a published team-template (e.g. chief-of-staff) into your team's workspace
488
- rip mountedagent fork chief-of-staff --team my-team
489
- rip mountedagent fork chief-of-staff --team my-team --slug my-team-cos
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
544
+
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 asset, 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-assets <mount-id> # every asset the mount touches
555
+ rip mountedagent mount-rename <mount-id> marketing
556
+ rip mountedagent unmount <mount-id> # destroys mount + mount-owned memory + context asset
557
+
558
+ # Imprint inspection
559
+ rip mountedagent assets <slug> # every asset an imprint references
560
+ ```
561
+
562
+ **Output formatting:** all `rip mountedagent *` commands default to human-readable. Pass `--json` for the existing JSON shape (or set `TOKENRIP_OUTPUT=json`).
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").
565
+
566
+ ### Templating: per-mount context
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 asset 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
+
570
+ To declare a template imprint, add `mountIntake.starterAssetAlias` to the manifest:
571
+
572
+ ```json
573
+ {
574
+ "slug": "blog-writing",
575
+ "mountIntake": {
576
+ "starterAssetAlias": "blog-writing-context-starter"
577
+ }
578
+ }
579
+ ```
580
+
581
+ The starter asset 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:
582
+
583
+ ```markdown
584
+ # Blog Context
585
+
586
+ ## Theme
587
+ <!-- What is this blog about? One sentence. -->
588
+
589
+ ## Voice
590
+ <!-- 3–5 adjectives that describe how posts should sound. -->
591
+
592
+ ## Audience
593
+ <!-- Who reads this? -->
490
594
  ```
491
595
 
596
+ When a mount is created, the platform clones this starter into a per-mount asset 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.
597
+
492
598
  Typical publish order:
493
599
 
494
600
  ```bash
@@ -496,26 +602,49 @@ rip folder create office-hours
496
602
  rip asset publish mountedagents/office-hours/brain/office-hours-soul.md --type markdown --alias office-hours-soul --title "Office Hours Soul" --folder office-hours
497
603
  rip asset publish mountedagents/office-hours/brain/office-hours-flow.md --type markdown --alias office-hours-flow --title "Office Hours Flow" --folder office-hours
498
604
  rip asset publish mountedagents/office-hours/brain/office-hours-frameworks.md --type markdown --alias office-hours-frameworks --title "Office Hours Frameworks" --folder office-hours
499
- rip mountedagent publish mountedagents/office-hours/manifest.json --published
605
+ rip mountedagent publish mountedagents/office-hours/manifest.json --publish
500
606
  rip asset move office-hours-pitch-patterns --folder office-hours
501
607
  ```
502
608
 
609
+ ### The four memory layers
610
+
611
+ Loading a session compiles four layers from the mount and the active caller:
612
+
613
+ - **Brain** — imprint-owner-owned brain assets. Always active.
614
+ - **Shared memory** — manifest entries with `scope: shared`, owned by the imprint owner. Always active.
615
+ - **Team memory** — manifest entries with `scope: team`, owned by the *mount*, partitioned by `mount_id`. Active only on team mounts.
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
+
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.
619
+
503
620
  ### Memory primitives
504
621
 
505
- A mounted agent declares two memory primitives in its manifest:
622
+ - **`memoryCollections[]`** schema-bound rows. Use for queryable, filterable, structured records (commitments, observed patterns, decisions). Scopes: `shared`, `team`, `operator-private`.
623
+ - **`memoryAssets[]`** — versioned narrative documents the agent rewrites holistically (`mountedagent_rewrite_asset` MCP tool). Use for evolving understanding (operator profile, team context). Same scopes. Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax` per session.
506
624
 
507
- - **`memoryCollections[]`** schema-bound rows. Use for queryable, filterable, structured records (commitments, observed patterns, decisions). Scopes: `shared`, `agent`, `team`, `operator-private`.
508
- - **`memoryAssets[]`** — versioned narrative documents the agent rewrites holistically (`mountedagent_rewrite_asset` MCP tool). Use for evolving understanding (operator profile, team context). Scopes: `shared`, `agent`, `team`, `operator-private`. Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax` per session.
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.
509
626
 
510
- `team` and `operator-private` scopes require a team-published mounted agent. Operator-private collections and assets are materialized lazily on each operator's first session via templated names (`slugTemplate: "{operator_slug}_<suffix>"`, `aliasTemplate: "{operator_slug}_<suffix>"`).
627
+ ### `teamContext` signaling
628
+
629
+ Optional manifest field — honest signaling, not enforcement:
630
+
631
+ - `ignored` — manifest declares no team-scope memory. Solo and team deployments behave identically.
632
+ - `supported` — manifest declares team-scope memory. Both deployments work; team layer activates only with a team.
633
+ - `recommended` — same as `supported`, plus discovery hints "best deployed with a team."
511
634
 
512
635
  ### Cross-session references
513
636
 
514
- Team-published agents may declare `crossSessionReferences` to surface another operator's flagged or recent items in the active operator's session. Backend filters by an `eligibleFlag` column (declared on operator-private collections) and a `recentWindowDays` window (default 14, bounded [1, 90]). Brain is responsible for paraphrasing, not quoting verbatim.
637
+ 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" }`.
638
+
639
+ ### Publisher commands
515
640
 
516
- ### Forking a team template
641
+ ```bash
642
+ rip publisher apply --display-name "Alice Co" --email alice@example.com --bio "Independent agent builder"
643
+ rip publisher apply --team acme --display-name "Acme Labs" --email contact@acme.example
644
+ rip publisher show
645
+ ```
517
646
 
518
- `rip mountedagent fork <template-slug> --team <team-slug>` calls `POST /v0/mountedagents/fork`, copies the template's brain and sample assets into a team-owned folder (using existing `forkAsset` storage-key reuse — zero-cost initial fork), creates fresh team-scoped collections/memory assets from the template schema, rewrites manifest aliases, and writes the local scaffold under `mountedagents/<new-slug>/`. The fork is created `is_published: false`. Customize via `/moa --iterate <new-slug>` (the Moa builder agent), then publish.
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.
519
648
 
520
649
  ## Thread Commands
521
650
 
@@ -661,3 +790,12 @@ Use these flags on asset commands to build lineage and traceability:
661
790
  | `CONTACT_NOT_FOUND` | Contact name not in address book | Run `rip contacts list` to see contacts |
662
791
  | `TEAM_NOT_FOUND` | Team slug not in local cache | Run `rip team list` to sync |
663
792
  | `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 |
794
+ | `PUBLISHER_NOT_FOUND` | Expected Publisher row doesn't exist | Verify with `rip publisher show` |
795
+ | `PUBLISHER_LOCKED` | Cannot edit an approved Publisher's application | Contact Tokenrip for changes |
796
+ | `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
+ | `ARTIFACT_NOT_PERMITTED` | Imprint has `session.produceArtifact: false` but harness submitted an artifact | Drop the artifact submission |
801
+ | `ADMIN_REQUIRED` | Approve / reject / revoke endpoints are platform-admin gated | Not a self-serve action |
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.adminMountedAgentList = adminMountedAgentList;
4
+ exports.adminMountedAgentShow = adminMountedAgentShow;
5
+ exports.adminMountedAgentUnpublish = adminMountedAgentUnpublish;
6
+ exports.adminMountedAgentSetFeatured = adminMountedAgentSetFeatured;
7
+ exports.adminMountedAgentSessions = adminMountedAgentSessions;
8
+ const auth_client_js_1 = require("../auth-client.js");
9
+ const errors_js_1 = require("../errors.js");
10
+ const output_js_1 = require("../output.js");
11
+ async function adminMountedAgentList() {
12
+ const { client } = (0, auth_client_js_1.requireAuthClient)();
13
+ const { data } = await client.get('/v0/admin/mountedagents');
14
+ (0, output_js_1.outputSuccess)(data.data);
15
+ }
16
+ async function adminMountedAgentShow(slug) {
17
+ const { client } = (0, auth_client_js_1.requireAuthClient)();
18
+ const { data } = await client.get(`/v0/admin/mountedagents/${encodeURIComponent(slug)}`);
19
+ (0, output_js_1.outputSuccess)(data.data);
20
+ }
21
+ async function adminMountedAgentUnpublish(slug) {
22
+ const { client } = (0, auth_client_js_1.requireAuthClient)();
23
+ const { data } = await client.patch(`/v0/admin/mountedagents/${encodeURIComponent(slug)}`, {
24
+ isPublished: false,
25
+ });
26
+ (0, output_js_1.outputSuccess)(data.data);
27
+ }
28
+ async function adminMountedAgentSetFeatured(slug, weightArg) {
29
+ let weight;
30
+ if (weightArg === 'clear' || weightArg === 'null') {
31
+ weight = null;
32
+ }
33
+ else {
34
+ weight = Number.parseInt(weightArg, 10);
35
+ if (!Number.isFinite(weight)) {
36
+ throw new errors_js_1.CliError('INVALID_FEATURED', 'Weight must be an integer or "clear"');
37
+ }
38
+ }
39
+ const { client } = (0, auth_client_js_1.requireAuthClient)();
40
+ const { data } = await client.patch(`/v0/admin/mountedagents/${encodeURIComponent(slug)}`, {
41
+ isFeatured: weight,
42
+ });
43
+ (0, output_js_1.outputSuccess)(data.data);
44
+ }
45
+ async function adminMountedAgentSessions(slug) {
46
+ const { client } = (0, auth_client_js_1.requireAuthClient)();
47
+ const { data } = await client.get(`/v0/admin/mountedagents/${encodeURIComponent(slug)}/sessions`);
48
+ (0, output_js_1.outputSuccess)(data.data);
49
+ }
50
+ //# sourceMappingURL=admin-mountedagent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-mountedagent.js","sourceRoot":"","sources":["../../../src/commands/admin-mountedagent.ts"],"names":[],"mappings":";;AAIA,sDAIC;AAED,sDAIC;AAED,gEAMC;AAED,oEAeC;AAED,8DAMC;AA/CD,sDAAsD;AACtD,4CAAwC;AACxC,4CAA6C;AAEtC,KAAK,UAAU,qBAAqB;IACzC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kCAAiB,GAAE,CAAC;IACvC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAC7D,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAAC,IAAY;IACtD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kCAAiB,GAAE,CAAC;IACvC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,2BAA2B,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzF,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAEM,KAAK,UAAU,0BAA0B,CAAC,IAAY;IAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kCAAiB,GAAE,CAAC;IACvC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,2BAA2B,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE;QACzF,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;IACH,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAEM,KAAK,UAAU,4BAA4B,CAAC,IAAY,EAAE,SAAiB;IAChF,IAAI,MAAqB,CAAC;IAC1B,IAAI,SAAS,KAAK,OAAO,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QAClD,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,oBAAQ,CAAC,kBAAkB,EAAE,sCAAsC,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IACD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kCAAiB,GAAE,CAAC;IACvC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,2BAA2B,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE;QACzF,UAAU,EAAE,MAAM;KACnB,CAAC,CAAC;IACH,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAEM,KAAK,UAAU,yBAAyB,CAAC,IAAY;IAC1D,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kCAAiB,GAAE,CAAC;IACvC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAC/B,2BAA2B,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAC/D,CAAC;IACF,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}