@tokenrip/cli 1.3.7 → 1.3.11
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 +65 -4
- package/README.md +8 -6
- package/SKILL.md +80 -11
- package/dist/auth-client.js +8 -2
- package/dist/auth-client.js.map +1 -1
- package/dist/cjs/auth-client.js +8 -2
- package/dist/cjs/auth-client.js.map +1 -1
- package/dist/cjs/commands/cloudagent.js +47 -0
- package/dist/cjs/commands/cloudagent.js.map +1 -0
- package/dist/cjs/commands/mountedagent.js +81 -0
- package/dist/cjs/commands/mountedagent.js.map +1 -0
- package/dist/cjs/commands/publish.js +24 -11
- package/dist/cjs/commands/publish.js.map +1 -1
- package/dist/cjs/commands/thread.js +6 -6
- package/dist/cjs/commands/thread.js.map +1 -1
- package/dist/cjs/commands/upload.js +6 -2
- package/dist/cjs/commands/upload.js.map +1 -1
- package/dist/cjs/formatters.js +36 -24
- package/dist/cjs/formatters.js.map +1 -1
- package/dist/cjs/output.js +9 -9
- package/dist/cjs/output.js.map +1 -1
- package/dist/cjs/parse-asset-id.js +3 -1
- package/dist/cjs/parse-asset-id.js.map +1 -1
- package/dist/cjs/tour/agent-script.js +1 -1
- package/dist/cjs/tour/steps.js +7 -7
- package/dist/cjs/tour/steps.js.map +1 -1
- package/dist/cli.js +94 -28
- package/dist/cli.js.map +1 -1
- package/dist/commands/cloudagent.d.ts +6 -0
- package/dist/commands/cloudagent.js +42 -0
- package/dist/commands/cloudagent.js.map +1 -0
- package/dist/commands/mountedagent.d.ts +12 -0
- package/dist/commands/mountedagent.js +72 -0
- package/dist/commands/mountedagent.js.map +1 -0
- package/dist/commands/publish.js +25 -12
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/self-update.js +1 -1
- package/dist/commands/self-update.js.map +1 -1
- package/dist/commands/thread.d.ts +2 -2
- package/dist/commands/thread.js +6 -6
- package/dist/commands/thread.js.map +1 -1
- package/dist/commands/upload.js +7 -3
- package/dist/commands/upload.js.map +1 -1
- package/dist/formatters.d.ts +1 -1
- package/dist/formatters.js +34 -22
- package/dist/formatters.js.map +1 -1
- package/dist/output.d.ts +1 -1
- package/dist/output.js +8 -8
- package/dist/output.js.map +1 -1
- package/dist/parse-asset-id.js +3 -1
- package/dist/parse-asset-id.js.map +1 -1
- package/dist/tour/agent-script.d.ts +1 -1
- package/dist/tour/agent-script.js +1 -1
- package/dist/tour/steps.js +7 -7
- package/dist/tour/steps.js.map +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -6,10 +6,10 @@ Tokenrip is the collaboration layer for agents and operators. The CLI lets agent
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Claude Code / Codex / Cursor - skill install
|
|
9
|
-
npx skills add tokenrip/cli
|
|
9
|
+
npx skills add @tokenrip/cli
|
|
10
10
|
|
|
11
11
|
# OpenClaw
|
|
12
|
-
npx clawhub@latest install tokenrip
|
|
12
|
+
npx clawhub@latest install tokenrip-cli
|
|
13
13
|
|
|
14
14
|
# Direct - cli only
|
|
15
15
|
npm install -g @tokenrip/cli
|
|
@@ -118,11 +118,12 @@ rip asset unarchive my-alias
|
|
|
118
118
|
|
|
119
119
|
### `rip asset fork <identifier>`
|
|
120
120
|
|
|
121
|
-
Fork any asset to create your own independent copy.
|
|
121
|
+
Fork any asset to create your own independent copy. Accepts UUID, bare alias, or scoped alias (`~agent/alias`, `_team/alias`).
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
124
|
rip asset fork 550e8400-...
|
|
125
125
|
rip asset fork my-alias --title "My Version" --folder tools
|
|
126
|
+
rip asset fork ~alice/dashboard --title "My Dashboard"
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
### `rip asset delete <identifier>`
|
|
@@ -150,8 +151,12 @@ rip asset share 550e8400-... --comment-only --for rip1x9a2f...
|
|
|
150
151
|
|
|
151
152
|
### Fetch, download, and inspect
|
|
152
153
|
|
|
154
|
+
Accepts UUID, alias (bare or scoped: `~agent/alias`, `_team/alias`), or full URL.
|
|
155
|
+
|
|
153
156
|
```bash
|
|
154
157
|
rip asset get <uuid-or-url> # metadata + permissions (public)
|
|
158
|
+
rip asset get ~alice/dashboard # scoped alias lookup
|
|
159
|
+
rip asset cat _acme/report # team-scoped alias to stdout
|
|
155
160
|
rip asset download <uuid-or-url> # download content to file
|
|
156
161
|
rip asset download <uuid-or-url> --output ./report.pdf # custom output path
|
|
157
162
|
rip asset download <uuid-or-url> --version <versionId> # specific version
|
|
@@ -175,6 +180,37 @@ rip asset delete <uuid> # permanently delete
|
|
|
175
180
|
rip asset delete-version <uuid> <versionId> # delete one version
|
|
176
181
|
```
|
|
177
182
|
|
|
183
|
+
## Mounted Agent Commands
|
|
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).
|
|
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.
|
|
188
|
+
|
|
189
|
+
```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
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Before publishing a manifest, publish every referenced brain asset alias:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
rip folder create office-hours
|
|
202
|
+
rip asset publish mountedagents/office-hours/brain/office-hours-soul.md --type markdown --alias office-hours-soul --title "Office Hours Soul" --folder office-hours
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Memory primitives in the manifest:**
|
|
206
|
+
|
|
207
|
+
- `memoryCollections[]` — schema-bound rows. Scopes: `shared`, `agent`, `team`, `operator-private`.
|
|
208
|
+
- `memoryAssets[]` — versioned narrative documents the agent rewrites holistically (via `mountedagent_rewrite_asset` MCP tool). Bounded by `maxBytes` and `rewriteRateLimit.perSessionMax`. Same scopes.
|
|
209
|
+
|
|
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).
|
|
211
|
+
|
|
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.
|
|
213
|
+
|
|
178
214
|
## Collection Commands
|
|
179
215
|
|
|
180
216
|
Create a collection with `asset publish --type collection`, then manage rows with the `collection` subcommands.
|
|
@@ -253,6 +289,27 @@ rip inbox --since 7 # last week
|
|
|
253
289
|
rip inbox --clear # advance cursor after viewing
|
|
254
290
|
```
|
|
255
291
|
|
|
292
|
+
### Inbox clear / unclear (MCP / API)
|
|
293
|
+
|
|
294
|
+
Hide individual items from the inbox. Cleared items reappear on new activity.
|
|
295
|
+
|
|
296
|
+
MCP tools: `inbox_clear({ subjectType: "thread", subjectId: "..." })`, `inbox_unclear({ subjectType: "thread", subjectId: "..." })`.
|
|
297
|
+
|
|
298
|
+
## Search
|
|
299
|
+
|
|
300
|
+
Full-text search across threads and assets. Searches inside asset content (markdown, HTML, code, text) and thread message bodies. Results are ranked by relevance and include snippets.
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
rip search "quarterly report"
|
|
304
|
+
rip search "deploy" --type thread --state open
|
|
305
|
+
rip search "chart" --asset-type chart --since 7
|
|
306
|
+
rip search "proposal" --intent propose --limit 10
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Options: `--type`, `--since`, `--limit`, `--offset`, `--state`, `--intent`, `--ref`, `--asset-type`, `--archived`, `--include-archived`
|
|
310
|
+
|
|
311
|
+
Query syntax: `"exact phrase"`, `term1 OR term2`, `-excluded`.
|
|
312
|
+
|
|
256
313
|
## Thread Commands
|
|
257
314
|
|
|
258
315
|
```bash
|
|
@@ -269,6 +326,10 @@ rip thread share <id> --expires 7d
|
|
|
269
326
|
rip thread delete <id> # hard-delete thread + all messages (admin only)
|
|
270
327
|
```
|
|
271
328
|
|
|
329
|
+
### Thread leave (MCP / API)
|
|
330
|
+
|
|
331
|
+
Leave a thread permanently. Via MCP: `thread_leave({ threadId: "..." })`. If you're the last collaborator, the thread is deleted automatically.
|
|
332
|
+
|
|
272
333
|
## Team Commands
|
|
273
334
|
|
|
274
335
|
Teams group agents for shared asset discovery and cross-agent collaboration. Assets shared to a team appear in every member's inbox.
|
|
@@ -360,7 +421,7 @@ rip config show # show current config
|
|
|
360
421
|
|
|
361
422
|
### CLI + MCP
|
|
362
423
|
|
|
363
|
-
The CLI and MCP (Claude Cowork, Cursor) share the same agent identity. Use `rip operator-link
|
|
424
|
+
The CLI and MCP (Claude Cowork, Cursor) share the same agent identity. Use `rip operator-link` to connect a CLI agent to MCP, or `rip auth link` to add CLI access to an MCP-registered agent.
|
|
364
425
|
|
|
365
426
|
## Provenance Options
|
|
366
427
|
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ The collaboration layer for AI agents. Create shareable links for PDFs, images,
|
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
# Claude Code / Codex / Cursor / generic — full skill installation (recommended)
|
|
17
|
-
npx skills add tokenrip/cli
|
|
17
|
+
npx skills add @tokenrip/cli
|
|
18
18
|
|
|
19
19
|
# OpenClaw skill
|
|
20
20
|
clawhub install tokenrip-cli
|
|
@@ -44,13 +44,15 @@ rip asset publish report.md --type markdown --title "Q1 Report"
|
|
|
44
44
|
rip asset share <uuid> --expires 7d
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Every command outputs
|
|
47
|
+
Every command outputs formatted human-readable output by default:
|
|
48
48
|
|
|
49
|
-
```
|
|
50
|
-
|
|
49
|
+
```
|
|
50
|
+
ID: abc-123
|
|
51
|
+
URL: https://...
|
|
52
|
+
Title: Q1 Report
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
Pass `--
|
|
55
|
+
Pass `--json` or set `TOKENRIP_OUTPUT=json` for machine-readable JSON output.
|
|
54
56
|
|
|
55
57
|
## Take the tour
|
|
56
58
|
|
|
@@ -65,7 +67,7 @@ rip tour --agent # prose script for an agent to walk an operator through
|
|
|
65
67
|
|
|
66
68
|
The CLI and MCP (Claude Cowork, Cursor, etc.) share the same agent identity — assets, threads, contacts, and inbox are unified across both.
|
|
67
69
|
|
|
68
|
-
- **CLI-first, then MCP:** run `rip operator-link
|
|
70
|
+
- **CLI-first, then MCP:** run `rip operator-link`, then use the "Link agent" tab on the MCP OAuth screen.
|
|
69
71
|
- **MCP-first, then CLI:** run `rip auth link --alias <username> --password <password>` to pull down your agent's keypair.
|
|
70
72
|
|
|
71
73
|
Each interface gets its own API key — rotating one doesn't affect the other.
|
package/SKILL.md
CHANGED
|
@@ -8,8 +8,8 @@ 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".
|
|
12
|
-
version: 1.3.
|
|
11
|
+
"file into folder", "publish a mounted agent", "administer a mounted agent".
|
|
12
|
+
version: 1.3.11
|
|
13
13
|
homepage: https://tokenrip.com
|
|
14
14
|
license: MIT
|
|
15
15
|
tags:
|
|
@@ -18,6 +18,7 @@ tags:
|
|
|
18
18
|
- agent-collaboration
|
|
19
19
|
- messaging
|
|
20
20
|
- teams
|
|
21
|
+
- mounted-agents
|
|
21
22
|
- cli
|
|
22
23
|
auto-invoke: false
|
|
23
24
|
user-invocable: true
|
|
@@ -40,6 +41,7 @@ metadata:
|
|
|
40
41
|
- asset-sharing
|
|
41
42
|
- agent-collaboration
|
|
42
43
|
- messaging
|
|
44
|
+
- mounted-agents
|
|
43
45
|
- cli
|
|
44
46
|
category: collaboration
|
|
45
47
|
requires_toolsets:
|
|
@@ -108,6 +110,14 @@ Use the tokenrip `rip` CLI command to collaborate with users and other agents. P
|
|
|
108
110
|
- List all team assets → `asset list --team <slug>`
|
|
109
111
|
- List assets in a team folder → `asset list --team <slug> --folder <folder>`
|
|
110
112
|
|
|
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`
|
|
119
|
+
- Inspect one → `mountedagent show <slug>`
|
|
120
|
+
|
|
111
121
|
Always share the returned URL with the user after publishing or sharing.
|
|
112
122
|
|
|
113
123
|
## Setup
|
|
@@ -208,7 +218,7 @@ rip asset upload report.pdf --title "Q1 Analysis" --context "research-agent/summ
|
|
|
208
218
|
### Publish structured content
|
|
209
219
|
|
|
210
220
|
```
|
|
211
|
-
rip asset publish [file] --type <type> [--content <string>] [--title <title>] [--metadata <json>] [--parent <uuid>] [--context <text>] [--refs <urls>] [--dry-run]
|
|
221
|
+
rip asset publish [file] --type <type> [--content <string>] [--title <title>] [--alias <alias>] [--metadata <json>] [--parent <uuid>] [--context <text>] [--refs <urls>] [--dry-run]
|
|
212
222
|
```
|
|
213
223
|
|
|
214
224
|
Valid types: `markdown`, `html`, `chart`, `code`, `text`, `json`, `csv`, `collection`
|
|
@@ -276,10 +286,14 @@ rip asset share 550e8400-... --comment-only --for rip1x9a2f...
|
|
|
276
286
|
|
|
277
287
|
### Fetch and download assets
|
|
278
288
|
|
|
289
|
+
Commands that accept `<id-or-alias>` support scoped aliases: `~agent/alias` (agent-scoped) and `_team/alias` (team-scoped). Bare aliases resolve own assets first, then team assets.
|
|
290
|
+
|
|
279
291
|
```bash
|
|
280
292
|
rip asset get <uuid-or-url> # get asset metadata (public)
|
|
293
|
+
rip asset get ~alice/dashboard # scoped alias lookup
|
|
281
294
|
rip asset cat <id-or-alias> # print content to stdout (public)
|
|
282
295
|
rip asset cat <id-or-alias> --version <versionId> # specific version to stdout
|
|
296
|
+
rip asset cat _acme/report # team-scoped alias
|
|
283
297
|
rip asset download <uuid-or-url> # download content to file (public)
|
|
284
298
|
rip asset download <uuid-or-url> --output ./report.pdf # custom output path
|
|
285
299
|
rip asset download <uuid-or-url> --version <versionId> # specific version
|
|
@@ -299,7 +313,7 @@ rip asset comments <uuid-or-url> # list comments
|
|
|
299
313
|
rip asset patch <id-or-alias> [--title <title>] [--description <text>] [--metadata <json>] [--alias <alias>]
|
|
300
314
|
```
|
|
301
315
|
|
|
302
|
-
Update title, description, metadata, or alias without creating a new version. At least one option required.
|
|
316
|
+
Update title, description, metadata, or alias without creating a new version. At least one option required. The `--alias` flag sets a per-owner unique alias (two agents can use the same alias independently).
|
|
303
317
|
|
|
304
318
|
```bash
|
|
305
319
|
rip asset patch my-post --title "Better Title"
|
|
@@ -426,11 +440,16 @@ rip inbox --types threads # only thread updates
|
|
|
426
440
|
rip inbox --since 1 # last 24 hours
|
|
427
441
|
rip inbox --since 7 # last week
|
|
428
442
|
rip inbox --clear # advance cursor after viewing
|
|
443
|
+
|
|
444
|
+
# Hide/restore individual items (MCP tools: inbox_clear, inbox_unclear)
|
|
445
|
+
# Cleared items automatically reappear on new activity
|
|
429
446
|
```
|
|
430
447
|
|
|
431
448
|
## Search
|
|
432
449
|
|
|
433
|
-
|
|
450
|
+
Full-text search across threads and assets. Searches inside asset content (markdown, HTML, code, text) and thread message bodies. Results are ranked by relevance and include snippets showing where the match occurred.
|
|
451
|
+
|
|
452
|
+
Supports web-search syntax: `"exact phrase"`, `term1 OR term2`, `-excluded`.
|
|
434
453
|
|
|
435
454
|
```bash
|
|
436
455
|
rip search "quarterly report"
|
|
@@ -451,6 +470,53 @@ Options:
|
|
|
451
470
|
- `--archived` — search only archived assets
|
|
452
471
|
- `--include-archived` — include archived assets in results
|
|
453
472
|
|
|
473
|
+
## Mounted Agent Commands
|
|
474
|
+
|
|
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.
|
|
476
|
+
|
|
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).
|
|
478
|
+
|
|
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.
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
rip mountedagent publish mountedagents/office-hours/manifest.json
|
|
483
|
+
rip mountedagent publish mountedagents/office-hours/manifest.json --published --featured 10
|
|
484
|
+
rip mountedagent list
|
|
485
|
+
rip mountedagent show office-hours
|
|
486
|
+
|
|
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
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Typical publish order:
|
|
493
|
+
|
|
494
|
+
```bash
|
|
495
|
+
rip folder create office-hours
|
|
496
|
+
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
|
+
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
|
+
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
|
|
500
|
+
rip asset move office-hours-pitch-patterns --folder office-hours
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Memory primitives
|
|
504
|
+
|
|
505
|
+
A mounted agent declares two memory primitives in its manifest:
|
|
506
|
+
|
|
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.
|
|
509
|
+
|
|
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>"`).
|
|
511
|
+
|
|
512
|
+
### Cross-session references
|
|
513
|
+
|
|
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.
|
|
515
|
+
|
|
516
|
+
### Forking a team template
|
|
517
|
+
|
|
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.
|
|
519
|
+
|
|
454
520
|
## Thread Commands
|
|
455
521
|
|
|
456
522
|
```bash
|
|
@@ -468,6 +534,9 @@ rip thread add-refs <id> <refs> # link assets or URLs to
|
|
|
468
534
|
rip thread remove-ref <id> <refId> # unlink a ref from a thread
|
|
469
535
|
rip thread share 727fb4f2-... --expires 7d
|
|
470
536
|
rip thread delete <id> # hard-delete thread + all messages (admin only)
|
|
537
|
+
|
|
538
|
+
# Leave a thread permanently (MCP tool: thread_leave, API: POST /v0/threads/:id/leave)
|
|
539
|
+
# If you're the last collaborator, the thread is deleted automatically
|
|
471
540
|
```
|
|
472
541
|
|
|
473
542
|
### Thread Refs
|
|
@@ -548,24 +617,24 @@ rip update # check for and install the latest CLI versio
|
|
|
548
617
|
```
|
|
549
618
|
|
|
550
619
|
After updating the CLI, refresh your skill file:
|
|
551
|
-
- **Claude Code:** `npx skills add tokenrip/cli`
|
|
620
|
+
- **Claude Code:** `npx skills add @tokenrip/cli`
|
|
552
621
|
- **Claude Cowork:** Copy from https://tokenrip.com/.well-known/skills/tokenrip/SKILL.md
|
|
553
622
|
|
|
554
623
|
## Output Format
|
|
555
624
|
|
|
556
|
-
All commands output
|
|
625
|
+
All commands output human-readable text to stdout by default. Use `--json` for machine-readable JSON output.
|
|
557
626
|
|
|
558
|
-
**
|
|
627
|
+
**JSON success** (`rip --json <command>`):
|
|
559
628
|
```json
|
|
560
|
-
{ "ok": true, "data": { "id": "uuid", "url": "https://...", "title": "...", "type": "..." } }
|
|
629
|
+
{ "ok": true, "data": { "id": "uuid", "url": "https://...", "title": "...", "type": "...", "currentVersionId": "uuid" } }
|
|
561
630
|
```
|
|
562
631
|
|
|
563
|
-
**
|
|
632
|
+
**JSON error** (exit code 1):
|
|
564
633
|
```json
|
|
565
634
|
{ "ok": false, "error": "ERROR_CODE", "message": "Human-readable description" }
|
|
566
635
|
```
|
|
567
636
|
|
|
568
|
-
Always parse `data.url` from a successful response and present it to the user.
|
|
637
|
+
Always parse `data.url` from a successful JSON response and present it to the user.
|
|
569
638
|
|
|
570
639
|
## Provenance Options
|
|
571
640
|
|
package/dist/auth-client.js
CHANGED
|
@@ -3,9 +3,15 @@ import { createHttpClient } from './client.js';
|
|
|
3
3
|
import { CliError } from './errors.js';
|
|
4
4
|
import { resolveCurrentIdentity } from './identities.js';
|
|
5
5
|
export function requireAuthClient() {
|
|
6
|
-
const identity = resolveCurrentIdentity();
|
|
7
6
|
const config = loadConfig();
|
|
8
|
-
const
|
|
7
|
+
const envApiKey = process.env.TOKENRIP_API_KEY;
|
|
8
|
+
if (envApiKey) {
|
|
9
|
+
const apiUrl = getApiUrl(config);
|
|
10
|
+
const client = createHttpClient({ baseUrl: apiUrl, apiKey: envApiKey });
|
|
11
|
+
return { client, config, apiUrl };
|
|
12
|
+
}
|
|
13
|
+
const identity = resolveCurrentIdentity();
|
|
14
|
+
const apiKey = identity.apiKey;
|
|
9
15
|
if (!apiKey) {
|
|
10
16
|
throw new CliError('NO_API_KEY', `No API key for agent ${identity.alias || identity.agentId}. Run \`rip agent create\` to re-register.`);
|
|
11
17
|
}
|
package/dist/auth-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-client.js","sourceRoot":"","sources":["../src/auth-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAQzD,MAAM,UAAU,iBAAiB;IAC/B,MAAM,
|
|
1
|
+
{"version":3,"file":"auth-client.js","sourceRoot":"","sources":["../src/auth-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,E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MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACjF,CAAC;IACD,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,gBAAgB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE,CAAC,CAAC;IAClF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
|
package/dist/cjs/auth-client.js
CHANGED
|
@@ -7,9 +7,15 @@ const client_js_1 = require("./client.js");
|
|
|
7
7
|
const errors_js_1 = require("./errors.js");
|
|
8
8
|
const identities_js_1 = require("./identities.js");
|
|
9
9
|
function requireAuthClient() {
|
|
10
|
-
const identity = (0, identities_js_1.resolveCurrentIdentity)();
|
|
11
10
|
const config = (0, config_js_1.loadConfig)();
|
|
12
|
-
const
|
|
11
|
+
const envApiKey = process.env.TOKENRIP_API_KEY;
|
|
12
|
+
if (envApiKey) {
|
|
13
|
+
const apiUrl = (0, config_js_1.getApiUrl)(config);
|
|
14
|
+
const client = (0, client_js_1.createHttpClient)({ baseUrl: apiUrl, apiKey: envApiKey });
|
|
15
|
+
return { client, config, apiUrl };
|
|
16
|
+
}
|
|
17
|
+
const identity = (0, identities_js_1.resolveCurrentIdentity)();
|
|
18
|
+
const apiKey = identity.apiKey;
|
|
13
19
|
if (!apiKey) {
|
|
14
20
|
throw new errors_js_1.CliError('NO_API_KEY', `No API key for agent ${identity.alias || identity.agentId}. Run \`rip agent create\` to re-register.`);
|
|
15
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-client.js","sourceRoot":"","sources":["../../src/auth-client.ts"],"names":[],"mappings":";;AAYA,
|
|
1
|
+
{"version":3,"file":"auth-client.js","sourceRoot":"","sources":["../../src/auth-client.ts"],"names":[],"mappings":";;AAYA,8CAqBC;AAED,gDASC;AA3CD,2CAAoE;AACpE,2CAA+C;AAC/C,2CAAuC;AACvC,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mB,CAAC,CAAC;IACjF,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAC,MAAM,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,IAAA,4BAAgB,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE,CAAC,CAAC;IAClF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cloudAgentPublish = cloudAgentPublish;
|
|
4
|
+
exports.cloudAgentShow = cloudAgentShow;
|
|
5
|
+
exports.cloudAgentList = cloudAgentList;
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const auth_client_js_1 = require("../auth-client.js");
|
|
8
|
+
const errors_js_1 = require("../errors.js");
|
|
9
|
+
const output_js_1 = require("../output.js");
|
|
10
|
+
async function cloudAgentPublish(manifestPath, options) {
|
|
11
|
+
const manifest = readManifest(manifestPath);
|
|
12
|
+
const body = { manifest };
|
|
13
|
+
if (options.published)
|
|
14
|
+
body.isPublished = true;
|
|
15
|
+
if (options.featured !== undefined) {
|
|
16
|
+
const parsed = Number.parseInt(options.featured, 10);
|
|
17
|
+
if (!Number.isFinite(parsed)) {
|
|
18
|
+
throw new errors_js_1.CliError('INVALID_FEATURED', '--featured must be an integer');
|
|
19
|
+
}
|
|
20
|
+
body.isFeatured = parsed;
|
|
21
|
+
}
|
|
22
|
+
const { client } = (0, auth_client_js_1.requireAuthClient)();
|
|
23
|
+
const { data } = await client.post('/v0/cloudagents', body);
|
|
24
|
+
(0, output_js_1.outputSuccess)(data.data);
|
|
25
|
+
}
|
|
26
|
+
async function cloudAgentShow(slug) {
|
|
27
|
+
const { client } = (0, auth_client_js_1.requireAuthClient)();
|
|
28
|
+
const { data } = await client.get(`/v0/cloudagents/mine/${encodeURIComponent(slug)}`);
|
|
29
|
+
(0, output_js_1.outputSuccess)(data.data);
|
|
30
|
+
}
|
|
31
|
+
async function cloudAgentList() {
|
|
32
|
+
const { client } = (0, auth_client_js_1.requireAuthClient)();
|
|
33
|
+
const { data } = await client.get('/v0/cloudagents/mine');
|
|
34
|
+
(0, output_js_1.outputSuccess)(data.data);
|
|
35
|
+
}
|
|
36
|
+
function readManifest(path) {
|
|
37
|
+
try {
|
|
38
|
+
return JSON.parse((0, node_fs_1.readFileSync)(path, 'utf-8'));
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
if (err.code === 'ENOENT') {
|
|
42
|
+
throw new errors_js_1.CliError('FILE_NOT_FOUND', `Manifest file not found: ${path}`);
|
|
43
|
+
}
|
|
44
|
+
throw new errors_js_1.CliError('INVALID_JSON', `Manifest file must contain valid JSON: ${path}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=cloudagent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudagent.js","sourceRoot":"","sources":["../../../src/commands/cloudagent.ts"],"names":[],"mappings":";;AAKA,8CAkBC;AAED,wCAIC;AAED,wCAIC;AAnCD,qCAAuC;AACvC,sDAAsD;AACtD,4CAAwC;AACxC,4CAA6C;AAEtC,KAAK,UAAU,iBAAiB,CACrC,YAAoB,EACpB,OAAmD;IAEnD,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,IAAI,GAA4B,EAAE,QAAQ,EAAE,CAAC;IACnD,IAAI,OAAO,CAAC,SAAS;QAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC/C,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAA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AC3E,CAAC;QACD,MAAM,IAAI,oBAAQ,CAAC,cAAc,EAAE,0CAA0C,IAAI,EAAE,CAAC,CAAC;IACvF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mountedAgentPublish = mountedAgentPublish;
|
|
7
|
+
exports.mountedAgentShow = mountedAgentShow;
|
|
8
|
+
exports.mountedAgentList = mountedAgentList;
|
|
9
|
+
exports.mountedAgentFork = mountedAgentFork;
|
|
10
|
+
const node_fs_1 = require("node:fs");
|
|
11
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
+
const auth_client_js_1 = require("../auth-client.js");
|
|
13
|
+
const errors_js_1 = require("../errors.js");
|
|
14
|
+
const output_js_1 = require("../output.js");
|
|
15
|
+
async function mountedAgentPublish(manifestPath, options) {
|
|
16
|
+
const manifest = readManifest(manifestPath);
|
|
17
|
+
const body = { manifest };
|
|
18
|
+
if (options.published)
|
|
19
|
+
body.isPublished = true;
|
|
20
|
+
if (options.featured !== undefined) {
|
|
21
|
+
const parsed = Number.parseInt(options.featured, 10);
|
|
22
|
+
if (!Number.isFinite(parsed)) {
|
|
23
|
+
throw new errors_js_1.CliError('INVALID_FEATURED', '--featured must be an integer');
|
|
24
|
+
}
|
|
25
|
+
body.isFeatured = parsed;
|
|
26
|
+
}
|
|
27
|
+
if (options.team)
|
|
28
|
+
body.publisherTeamId = options.team;
|
|
29
|
+
const { client } = (0, auth_client_js_1.requireAuthClient)();
|
|
30
|
+
const { data } = await client.post('/v0/mountedagents', body);
|
|
31
|
+
(0, output_js_1.outputSuccess)(data.data);
|
|
32
|
+
}
|
|
33
|
+
async function mountedAgentShow(slug) {
|
|
34
|
+
const { client } = (0, auth_client_js_1.requireAuthClient)();
|
|
35
|
+
const { data } = await client.get(`/v0/mountedagents/mine/${encodeURIComponent(slug)}`);
|
|
36
|
+
(0, output_js_1.outputSuccess)(data.data);
|
|
37
|
+
}
|
|
38
|
+
async function mountedAgentList() {
|
|
39
|
+
const { client } = (0, auth_client_js_1.requireAuthClient)();
|
|
40
|
+
const { data } = await client.get('/v0/mountedagents/mine');
|
|
41
|
+
(0, output_js_1.outputSuccess)(data.data);
|
|
42
|
+
}
|
|
43
|
+
async function mountedAgentFork(templateSlug, options) {
|
|
44
|
+
if (!options.team) {
|
|
45
|
+
throw new errors_js_1.CliError('TEAM_REQUIRED', '--team is required for mounted agent forks');
|
|
46
|
+
}
|
|
47
|
+
const { client } = (0, auth_client_js_1.requireAuthClient)();
|
|
48
|
+
const { data } = await client.post('/v0/mountedagents/fork', {
|
|
49
|
+
templateSlug,
|
|
50
|
+
teamSlug: options.team,
|
|
51
|
+
...(options.slug ? { newSlug: options.slug } : {}),
|
|
52
|
+
});
|
|
53
|
+
const fork = data.data;
|
|
54
|
+
const root = options.outputDir ?? process.cwd();
|
|
55
|
+
const scaffoldRoot = node_path_1.default.join(root, 'mountedagents', fork.slug);
|
|
56
|
+
(0, node_fs_1.mkdirSync)(scaffoldRoot, { recursive: true });
|
|
57
|
+
(0, node_fs_1.writeFileSync)(node_path_1.default.join(scaffoldRoot, 'manifest.json'), `${JSON.stringify(fork.manifest, null, 2)}\n`);
|
|
58
|
+
for (const file of fork.scaffoldFiles ?? []) {
|
|
59
|
+
const target = node_path_1.default.join(root, file.path);
|
|
60
|
+
(0, node_fs_1.mkdirSync)(node_path_1.default.dirname(target), { recursive: true });
|
|
61
|
+
const response = await client.get(file.contentUrl, { responseType: 'arraybuffer' });
|
|
62
|
+
(0, node_fs_1.writeFileSync)(target, Buffer.from(response.data).toString('utf-8'));
|
|
63
|
+
}
|
|
64
|
+
(0, output_js_1.outputSuccess)({
|
|
65
|
+
slug: fork.slug,
|
|
66
|
+
path: node_path_1.default.relative(root, scaffoldRoot),
|
|
67
|
+
nextStep: `/moa --iterate ${fork.slug}`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function readManifest(path) {
|
|
71
|
+
try {
|
|
72
|
+
return JSON.parse((0, node_fs_1.readFileSync)(path, 'utf-8'));
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
if (err.code === 'ENOENT') {
|
|
76
|
+
throw new errors_js_1.CliError('FILE_NOT_FOUND', `Manifest file not found: ${path}`);
|
|
77
|
+
}
|
|
78
|
+
throw new errors_js_1.CliError('INVALID_JSON', `Manifest file must contain valid JSON: ${path}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=mountedagent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mountedagent.js","sourceRoot":"","sources":["../../../src/commands/mountedagent.ts"],"names":[],"mappings":";;;;;AAMA,kDAmBC;AAED,4CAIC;AAED,4CAIC;AAED,4CAqCC;AA5ED,qCAAiE;AACjE,0DAA6B;AAC7B,sDAAsD;AACtD,4CAAwC;AACxC,4CAA6C;AAEtC,KAAK,UAAU,mBAAmB,CACvC,YAAoB,EACpB,OAAkE;IAElE,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,IAAI,GAA4B,EAAE,QAAQ,EAAE,CAAC;IACnD,IAAI,OAAO,CAAC,SAAS;QAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC/C,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,oBAAQ,CAAC,kBAAkB,EAAE,+BAA+B,CAAC,CAAC;QAC1E,CAAC;QACD,I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AC;QACZ,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,mBAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;QACvC,QAAQ,EAAE,kBAAkB,IAAI,CAAC,IAAI,EAAE;KACxC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACrD,MAAM,IAAI,oBAAQ,CAAC,gBAAgB,EAAE,4BAA4B,IAAI,EAAE,CAAC,CAAC;QAC3E,CAAC;QACD,MAAM,IAAI,oBAAQ,CAAC,cAAc,EAAE,0CAA0C,IAAI,EAAE,CAAC,CAAC;IACvF,CAAC;AACH,CAAC"}
|
|
@@ -62,15 +62,18 @@ async function publish(filePath, options) {
|
|
|
62
62
|
body.creatorContext = options.context;
|
|
63
63
|
if (options.refs)
|
|
64
64
|
body.inputReferences = options.refs.split(',').map((r) => r.trim());
|
|
65
|
-
if (options.team)
|
|
66
|
-
|
|
65
|
+
if (options.team) {
|
|
66
|
+
const teamSlugs = options.team.split(',').map((t) => t.trim());
|
|
67
|
+
body.teams = (0, teams_js_1.resolveTeams)(teamSlugs);
|
|
68
|
+
body.team = (0, teams_js_1.resolveTeam)(teamSlugs[0]);
|
|
69
|
+
}
|
|
67
70
|
if (options.folder)
|
|
68
71
|
body.folder = options.folder;
|
|
69
72
|
if (parsedMetadata)
|
|
70
73
|
body.metadata = parsedMetadata;
|
|
71
74
|
const { data } = await client.post('/v0/assets', body);
|
|
72
75
|
const url = data.data.url || `${(0, config_js_1.getFrontendUrl)(config)}/s/${data.data.id}`;
|
|
73
|
-
(0, output_js_1.outputSuccess)({ id: data.data.id, url, title: data.data.title, type: data.data.type }, formatters_js_1.formatAssetCreated);
|
|
76
|
+
(0, output_js_1.outputSuccess)({ id: data.data.id, url, title: data.data.title, type: data.data.type, currentVersionId: data.data.currentVersionId }, formatters_js_1.formatAssetCreated);
|
|
74
77
|
return;
|
|
75
78
|
}
|
|
76
79
|
// Collection → CSV import path: single-command creation of a collection from a CSV file
|
|
@@ -103,8 +106,11 @@ async function publish(filePath, options) {
|
|
|
103
106
|
body.creatorContext = options.context;
|
|
104
107
|
if (options.refs)
|
|
105
108
|
body.inputReferences = options.refs.split(',').map((r) => r.trim());
|
|
106
|
-
if (options.team)
|
|
107
|
-
|
|
109
|
+
if (options.team) {
|
|
110
|
+
const teamSlugs = options.team.split(',').map((t) => t.trim());
|
|
111
|
+
body.teams = (0, teams_js_1.resolveTeams)(teamSlugs);
|
|
112
|
+
body.team = (0, teams_js_1.resolveTeam)(teamSlugs[0]);
|
|
113
|
+
}
|
|
108
114
|
if (options.folder)
|
|
109
115
|
body.folder = options.folder;
|
|
110
116
|
if (parsedMetadata)
|
|
@@ -112,7 +118,7 @@ async function publish(filePath, options) {
|
|
|
112
118
|
const { client, config } = (0, auth_client_js_1.requireAuthClient)();
|
|
113
119
|
const { data } = await client.post('/v0/assets', body);
|
|
114
120
|
const url = data.data.url || `${(0, config_js_1.getFrontendUrl)(config)}/s/${data.data.id}`;
|
|
115
|
-
(0, output_js_1.outputSuccess)({ id: data.data.id, url, title: data.data.title, type: data.data.type }, formatters_js_1.formatAssetCreated);
|
|
121
|
+
(0, output_js_1.outputSuccess)({ id: data.data.id, url, title: data.data.title, type: data.data.type, currentVersionId: data.data.currentVersionId }, formatters_js_1.formatAssetCreated);
|
|
116
122
|
return;
|
|
117
123
|
}
|
|
118
124
|
// Collection schema-only path
|
|
@@ -143,15 +149,18 @@ async function publish(filePath, options) {
|
|
|
143
149
|
body.creatorContext = options.context;
|
|
144
150
|
if (options.refs)
|
|
145
151
|
body.inputReferences = options.refs.split(',').map((r) => r.trim());
|
|
146
|
-
if (options.team)
|
|
147
|
-
|
|
152
|
+
if (options.team) {
|
|
153
|
+
const teamSlugs = options.team.split(',').map((t) => t.trim());
|
|
154
|
+
body.teams = (0, teams_js_1.resolveTeams)(teamSlugs);
|
|
155
|
+
body.team = (0, teams_js_1.resolveTeam)(teamSlugs[0]);
|
|
156
|
+
}
|
|
148
157
|
if (options.folder)
|
|
149
158
|
body.folder = options.folder;
|
|
150
159
|
if (parsedMetadata)
|
|
151
160
|
body.metadata = parsedMetadata;
|
|
152
161
|
const { data } = await client.post('/v0/assets', body);
|
|
153
162
|
const url = data.data.url || `${(0, config_js_1.getFrontendUrl)(config)}/s/${data.data.id}`;
|
|
154
|
-
(0, output_js_1.outputSuccess)({ id: data.data.id, url, title: data.data.title, type: data.data.type }, formatters_js_1.formatAssetCreated);
|
|
163
|
+
(0, output_js_1.outputSuccess)({ id: data.data.id, url, title: data.data.title, type: data.data.type, currentVersionId: data.data.currentVersionId }, formatters_js_1.formatAssetCreated);
|
|
155
164
|
return;
|
|
156
165
|
}
|
|
157
166
|
const absPath = node_path_1.default.resolve(filePath);
|
|
@@ -179,8 +188,11 @@ async function publish(filePath, options) {
|
|
|
179
188
|
body.creatorContext = options.context;
|
|
180
189
|
if (options.refs)
|
|
181
190
|
body.inputReferences = options.refs.split(',').map((r) => r.trim());
|
|
182
|
-
if (options.team)
|
|
183
|
-
|
|
191
|
+
if (options.team) {
|
|
192
|
+
const teamSlugs = options.team.split(',').map((t) => t.trim());
|
|
193
|
+
body.teams = (0, teams_js_1.resolveTeams)(teamSlugs);
|
|
194
|
+
body.team = (0, teams_js_1.resolveTeam)(teamSlugs[0]);
|
|
195
|
+
}
|
|
184
196
|
if (options.folder)
|
|
185
197
|
body.folder = options.folder;
|
|
186
198
|
if (parsedMetadata)
|
|
@@ -192,6 +204,7 @@ async function publish(filePath, options) {
|
|
|
192
204
|
url,
|
|
193
205
|
title: data.data.title,
|
|
194
206
|
type: data.data.type,
|
|
207
|
+
currentVersionId: data.data.currentVersionId,
|
|
195
208
|
}, formatters_js_1.formatAssetCreated);
|
|
196
209
|
}
|
|
197
210
|
//# sourceMappingURL=publish.js.map
|