@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 +75 -12
- package/README.md +12 -0
- package/SKILL.md +162 -24
- package/dist/cjs/commands/admin-mountedagent.js +50 -0
- package/dist/cjs/commands/admin-mountedagent.js.map +1 -0
- package/dist/cjs/commands/mountedagent.js +292 -14
- package/dist/cjs/commands/mountedagent.js.map +1 -1
- package/dist/cjs/commands/publisher.js +57 -0
- package/dist/cjs/commands/publisher.js.map +1 -0
- package/dist/cjs/formatters.js +207 -1
- package/dist/cjs/formatters.js.map +1 -1
- package/dist/cli.js +248 -11
- package/dist/cli.js.map +1 -1
- package/dist/commands/admin-mountedagent.d.ts +5 -0
- package/dist/commands/admin-mountedagent.js +43 -0
- package/dist/commands/admin-mountedagent.js.map +1 -0
- package/dist/commands/mountedagent.d.ts +46 -0
- package/dist/commands/mountedagent.js +276 -15
- package/dist/commands/mountedagent.js.map +1 -1
- package/dist/commands/publisher.d.ts +8 -0
- package/dist/commands/publisher.js +53 -0
- package/dist/commands/publisher.js.map +1 -0
- package/dist/formatters.d.ts +12 -0
- package/dist/formatters.js +193 -0
- package/dist/formatters.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
1
|
+
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
2
3
|
import path from 'node:path';
|
|
4
|
+
import { spawnSync } from 'node:child_process';
|
|
3
5
|
import { requireAuthClient } from '../auth-client.js';
|
|
4
6
|
import { CliError } from '../errors.js';
|
|
7
|
+
import { formatImprintAssets, formatMount, formatMountAssets, formatMountContext, formatMountDrillIn, formatMountList, formatMountedAgent, formatMountedAgentList, formatMountedAgentPublished, formatMountedAgentScaffold, formatUnmounted, } from '../formatters.js';
|
|
5
8
|
import { outputSuccess } from '../output.js';
|
|
6
9
|
export async function mountedAgentPublish(manifestPath, options) {
|
|
7
10
|
const manifest = readManifest(manifestPath);
|
|
8
11
|
const body = { manifest };
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
// Legacy --published → --publish with deprecation warning (TTY-gated, stderr).
|
|
13
|
+
let wantsPublish = options.publish ?? false;
|
|
14
|
+
if (options.published) {
|
|
15
|
+
if (process.stderr.isTTY) {
|
|
16
|
+
console.warn('warning: --published is deprecated; use --publish for v2 (Tier 2 public listing). Mapping for now.');
|
|
17
|
+
}
|
|
18
|
+
wantsPublish = true;
|
|
19
|
+
}
|
|
20
|
+
if (wantsPublish)
|
|
21
|
+
body.publish = true;
|
|
11
22
|
if (options.featured !== undefined) {
|
|
12
23
|
const parsed = Number.parseInt(options.featured, 10);
|
|
13
24
|
if (!Number.isFinite(parsed)) {
|
|
@@ -16,31 +27,34 @@ export async function mountedAgentPublish(manifestPath, options) {
|
|
|
16
27
|
body.isFeatured = parsed;
|
|
17
28
|
}
|
|
18
29
|
if (options.team)
|
|
19
|
-
body.
|
|
30
|
+
body.teamSlug = options.team;
|
|
20
31
|
const { client } = requireAuthClient();
|
|
21
32
|
const { data } = await client.post('/v0/mountedagents', body);
|
|
22
|
-
outputSuccess(data.data);
|
|
33
|
+
outputSuccess(data.data, formatMountedAgentPublished);
|
|
23
34
|
}
|
|
24
35
|
export async function mountedAgentShow(slug) {
|
|
25
36
|
const { client } = requireAuthClient();
|
|
26
37
|
const { data } = await client.get(`/v0/mountedagents/mine/${encodeURIComponent(slug)}`);
|
|
27
|
-
outputSuccess(data.data);
|
|
38
|
+
outputSuccess(data.data, formatMountedAgent);
|
|
28
39
|
}
|
|
29
40
|
export async function mountedAgentList() {
|
|
30
41
|
const { client } = requireAuthClient();
|
|
31
42
|
const { data } = await client.get('/v0/mountedagents/mine');
|
|
32
|
-
outputSuccess(data.data);
|
|
43
|
+
outputSuccess(data.data, formatMountedAgentList);
|
|
44
|
+
}
|
|
45
|
+
export async function mountedAgentAssets(slug) {
|
|
46
|
+
const { client } = requireAuthClient();
|
|
47
|
+
const { data } = await client.get(`/v0/mountedagents/mine/${encodeURIComponent(slug)}/assets`);
|
|
48
|
+
outputSuccess(data.data, formatImprintAssets);
|
|
33
49
|
}
|
|
34
50
|
export async function mountedAgentFork(templateSlug, options) {
|
|
35
|
-
if (!options.team) {
|
|
36
|
-
throw new CliError('TEAM_REQUIRED', '--team is required for mounted agent forks');
|
|
37
|
-
}
|
|
38
51
|
const { client } = requireAuthClient();
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
teamSlug
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
const body = { templateSlug };
|
|
53
|
+
if (options.team)
|
|
54
|
+
body.teamSlug = options.team;
|
|
55
|
+
if (options.slug)
|
|
56
|
+
body.newSlug = options.slug;
|
|
57
|
+
const { data } = await client.post('/v0/mountedagents/fork', body);
|
|
44
58
|
const fork = data.data;
|
|
45
59
|
const root = options.outputDir ?? process.cwd();
|
|
46
60
|
const scaffoldRoot = path.join(root, 'mountedagents', fork.slug);
|
|
@@ -56,7 +70,153 @@ export async function mountedAgentFork(templateSlug, options) {
|
|
|
56
70
|
slug: fork.slug,
|
|
57
71
|
path: path.relative(root, scaffoldRoot),
|
|
58
72
|
nextStep: `/moa --iterate ${fork.slug}`,
|
|
73
|
+
}, formatMountedAgentScaffold);
|
|
74
|
+
}
|
|
75
|
+
export async function mountedAgentMount(imprintSlug, options) {
|
|
76
|
+
const { client } = requireAuthClient();
|
|
77
|
+
const body = { imprintSlug };
|
|
78
|
+
if (options.team)
|
|
79
|
+
body.teamSlug = options.team;
|
|
80
|
+
if (options.name)
|
|
81
|
+
body.name = options.name;
|
|
82
|
+
if (options.contextFrom)
|
|
83
|
+
body.contextMd = readFileSync(options.contextFrom, 'utf-8');
|
|
84
|
+
const { data } = await client.post('/v0/mounts', body);
|
|
85
|
+
outputSuccess(data.data, formatMount);
|
|
86
|
+
}
|
|
87
|
+
export async function mountedAgentMounts() {
|
|
88
|
+
const { client } = requireAuthClient();
|
|
89
|
+
const { data } = await client.get('/v0/mounts');
|
|
90
|
+
outputSuccess(data.data, formatMountList);
|
|
91
|
+
}
|
|
92
|
+
export async function mountedAgentMountRename(mountId, newName) {
|
|
93
|
+
const { client } = requireAuthClient();
|
|
94
|
+
const { data } = await client.patch(`/v0/mounts/${encodeURIComponent(mountId)}`, { name: newName });
|
|
95
|
+
outputSuccess(data.data, formatMount);
|
|
96
|
+
}
|
|
97
|
+
export async function mountedAgentShowMount(mountId) {
|
|
98
|
+
const { client } = requireAuthClient();
|
|
99
|
+
const { data } = await client.get(`/v0/mounts/${encodeURIComponent(mountId)}`);
|
|
100
|
+
outputSuccess(data.data, formatMountDrillIn);
|
|
101
|
+
}
|
|
102
|
+
export async function mountedAgentMountAssets(mountId) {
|
|
103
|
+
const { client } = requireAuthClient();
|
|
104
|
+
const { data } = await client.get(`/v0/mounts/${encodeURIComponent(mountId)}/assets`);
|
|
105
|
+
outputSuccess(data.data, formatMountAssets);
|
|
106
|
+
}
|
|
107
|
+
export async function mountedAgentMountContext(mountId, options) {
|
|
108
|
+
if (options.fromFile && options.edit) {
|
|
109
|
+
throw new CliError('INVALID_MOUNT_CONTEXT', 'Use either --from-file or --edit, not both');
|
|
110
|
+
}
|
|
111
|
+
const { client } = requireAuthClient();
|
|
112
|
+
const { data } = await client.get(`/v0/mounts/${encodeURIComponent(mountId)}/context`);
|
|
113
|
+
const current = data.data;
|
|
114
|
+
const publicId = current.contextAsset?.publicId;
|
|
115
|
+
if (!publicId) {
|
|
116
|
+
throw new CliError('MOUNT_CONTEXT_NOT_FOUND', 'This mount does not have a context asset');
|
|
117
|
+
}
|
|
118
|
+
if (options.fromFile) {
|
|
119
|
+
const content = readFileSync(options.fromFile, 'utf-8');
|
|
120
|
+
const { data: updated } = await client.post(`/v0/assets/${encodeURIComponent(publicId)}/versions`, {
|
|
121
|
+
type: 'markdown',
|
|
122
|
+
content,
|
|
123
|
+
});
|
|
124
|
+
outputSuccess({ ...current, updatedVersion: updated.data.version }, formatMountContext);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (options.edit) {
|
|
128
|
+
const editor = process.env.EDITOR || process.env.VISUAL;
|
|
129
|
+
if (!editor)
|
|
130
|
+
throw new CliError('EDITOR_REQUIRED', 'Set $EDITOR or use --from-file');
|
|
131
|
+
const dir = mkdtempSync(path.join(tmpdir(), 'tokenrip-mount-context-'));
|
|
132
|
+
const file = path.join(dir, 'context.md');
|
|
133
|
+
writeFileSync(file, current.content ?? '');
|
|
134
|
+
const result = spawnSync(editor, [file], { stdio: 'inherit' });
|
|
135
|
+
if (result.status !== 0) {
|
|
136
|
+
rmSync(dir, { recursive: true, force: true });
|
|
137
|
+
throw new CliError('EDITOR_FAILED', `$EDITOR exited with status ${result.status}`);
|
|
138
|
+
}
|
|
139
|
+
const content = readFileSync(file, 'utf-8');
|
|
140
|
+
rmSync(dir, { recursive: true, force: true });
|
|
141
|
+
const { data: updated } = await client.post(`/v0/assets/${encodeURIComponent(publicId)}/versions`, {
|
|
142
|
+
type: 'markdown',
|
|
143
|
+
content,
|
|
144
|
+
});
|
|
145
|
+
outputSuccess({ ...current, updatedVersion: updated.data.version }, formatMountContext);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
outputSuccess(current, formatMountContext);
|
|
149
|
+
}
|
|
150
|
+
export async function mountedAgentUnmount(mountId) {
|
|
151
|
+
const { client } = requireAuthClient();
|
|
152
|
+
await client.delete(`/v0/mounts/${encodeURIComponent(mountId)}`);
|
|
153
|
+
outputSuccess({ id: mountId, unmounted: true }, formatUnmounted);
|
|
154
|
+
}
|
|
155
|
+
export async function mountedAgentUnpublish(slug) {
|
|
156
|
+
const { client } = requireAuthClient();
|
|
157
|
+
const { data } = await client.patch(`/v0/mountedagents/${encodeURIComponent(slug)}`, { isPublished: false });
|
|
158
|
+
outputSuccess(data.data, formatMountedAgent);
|
|
159
|
+
}
|
|
160
|
+
export async function mountedAgentPublishToggle(slug) {
|
|
161
|
+
const { client } = requireAuthClient();
|
|
162
|
+
const { data: current } = await client.get(`/v0/mountedagents/mine/${encodeURIComponent(slug)}`);
|
|
163
|
+
const next = !current.data.isPublished;
|
|
164
|
+
const { data } = await client.patch(`/v0/mountedagents/${encodeURIComponent(slug)}`, { isPublished: next });
|
|
165
|
+
outputSuccess(data.data, formatMountedAgent);
|
|
166
|
+
}
|
|
167
|
+
export async function mountedAgentSetFeatured(slug, weightArg) {
|
|
168
|
+
let weight;
|
|
169
|
+
if (weightArg === 'clear' || weightArg === 'null') {
|
|
170
|
+
weight = null;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
weight = Number.parseInt(weightArg, 10);
|
|
174
|
+
if (!Number.isFinite(weight)) {
|
|
175
|
+
throw new CliError('INVALID_FEATURED', 'Weight must be an integer or "clear"');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const { client } = requireAuthClient();
|
|
179
|
+
const { data } = await client.patch(`/v0/mountedagents/${encodeURIComponent(slug)}`, { isFeatured: weight });
|
|
180
|
+
outputSuccess(data.data, formatMountedAgent);
|
|
181
|
+
}
|
|
182
|
+
export async function mountedAgentSetDisplay(slug, options) {
|
|
183
|
+
const body = {};
|
|
184
|
+
if (options.displayName !== undefined)
|
|
185
|
+
body.displayName = options.displayName;
|
|
186
|
+
if (options.tagline !== undefined)
|
|
187
|
+
body.tagline = options.tagline;
|
|
188
|
+
if (options.description !== undefined)
|
|
189
|
+
body.description = options.description;
|
|
190
|
+
if (options.capability !== undefined && options.capability.length > 0)
|
|
191
|
+
body.capabilities = options.capability;
|
|
192
|
+
if (Object.keys(body).length === 0) {
|
|
193
|
+
throw new CliError('NO_FIELDS', 'Pass at least one of --display-name / --tagline / --description / --capability');
|
|
194
|
+
}
|
|
195
|
+
const { client } = requireAuthClient();
|
|
196
|
+
const { data } = await client.patch(`/v0/mountedagents/${encodeURIComponent(slug)}/display`, body);
|
|
197
|
+
outputSuccess(data.data, formatMountedAgent);
|
|
198
|
+
}
|
|
199
|
+
export async function mountedAgentDelete(slug, options) {
|
|
200
|
+
if (!options.force) {
|
|
201
|
+
if (!process.stdin.isTTY) {
|
|
202
|
+
throw new CliError('CONFIRMATION_REQUIRED', 'Pass --force or run interactively');
|
|
203
|
+
}
|
|
204
|
+
const ok = await confirmTypedSlug(slug);
|
|
205
|
+
if (!ok) {
|
|
206
|
+
outputSuccess({ slug, deleted: false, reason: 'cancelled' });
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const { client } = requireAuthClient();
|
|
211
|
+
await client.delete(`/v0/mountedagents/${encodeURIComponent(slug)}`);
|
|
212
|
+
outputSuccess({ slug, deleted: true });
|
|
213
|
+
}
|
|
214
|
+
async function confirmTypedSlug(slug) {
|
|
215
|
+
process.stdout.write(`Type "${slug}" to confirm delete: `);
|
|
216
|
+
const input = await new Promise((resolve) => {
|
|
217
|
+
process.stdin.once('data', (buf) => resolve(buf.toString().trim()));
|
|
59
218
|
});
|
|
219
|
+
return input === slug;
|
|
60
220
|
}
|
|
61
221
|
function readManifest(path) {
|
|
62
222
|
try {
|
|
@@ -69,4 +229,105 @@ function readManifest(path) {
|
|
|
69
229
|
throw new CliError('INVALID_JSON', `Manifest file must contain valid JSON: ${path}`);
|
|
70
230
|
}
|
|
71
231
|
}
|
|
232
|
+
// ─── Session lifecycle ──────────────────────────────────────────────
|
|
233
|
+
//
|
|
234
|
+
// These four commands mirror the MCP tool surface (`mountedagent_load`,
|
|
235
|
+
// `_record`, `_rewrite_asset`, `_session_end`) so the bootloader skill can
|
|
236
|
+
// drive a tracked session from Claude Code via Bash, no MCP setup required.
|
|
237
|
+
//
|
|
238
|
+
// JSON-only output by design — the bootloader pipes results into `jq`. The
|
|
239
|
+
// global `--json` flag is already implied for these (we always write
|
|
240
|
+
// machine-readable JSON regardless of `outputFormat` config).
|
|
241
|
+
export async function mountedAgentLoad(slug, options) {
|
|
242
|
+
const { client } = requireAuthClient();
|
|
243
|
+
const body = {};
|
|
244
|
+
if (options.team)
|
|
245
|
+
body.team = options.team;
|
|
246
|
+
const { data } = await client.post(`/v0/mountedagents/${encodeURIComponent(slug)}/sessions`, body);
|
|
247
|
+
// No human formatter — load output is structured for programmatic use only.
|
|
248
|
+
outputSuccess(data.data);
|
|
249
|
+
}
|
|
250
|
+
export async function mountedAgentRecord(sessionToken, options) {
|
|
251
|
+
const payload = readJsonOption(options.row, options.rowFile, '--row / --row-file');
|
|
252
|
+
const body = { payload };
|
|
253
|
+
if (options.collection)
|
|
254
|
+
body.collection = options.collection;
|
|
255
|
+
const { client } = requireAuthClient();
|
|
256
|
+
const { data } = await client.post(`/v0/ma-sessions/${encodeURIComponent(sessionToken)}/rows`, body);
|
|
257
|
+
outputSuccess(data.data);
|
|
258
|
+
}
|
|
259
|
+
export async function mountedAgentRewriteAsset(sessionToken, alias, options) {
|
|
260
|
+
if (options.content !== undefined && options.contentFrom !== undefined) {
|
|
261
|
+
throw new CliError('INVALID_REWRITE', 'Use either --content or --content-from, not both');
|
|
262
|
+
}
|
|
263
|
+
let content;
|
|
264
|
+
if (options.content !== undefined) {
|
|
265
|
+
content = options.content;
|
|
266
|
+
}
|
|
267
|
+
else if (options.contentFrom !== undefined) {
|
|
268
|
+
content = readContentFile(options.contentFrom);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
throw new CliError('INVALID_REWRITE', 'Pass --content <string> or --content-from <file>');
|
|
272
|
+
}
|
|
273
|
+
const { client } = requireAuthClient();
|
|
274
|
+
const { data } = await client.post(`/v0/ma-sessions/${encodeURIComponent(sessionToken)}/asset-rewrites`, { alias, content });
|
|
275
|
+
outputSuccess(data.data);
|
|
276
|
+
}
|
|
277
|
+
export async function mountedAgentEnd(sessionToken, options) {
|
|
278
|
+
const body = {};
|
|
279
|
+
if (options.summary !== undefined)
|
|
280
|
+
body.summary = options.summary;
|
|
281
|
+
if (options.artifactFrom !== undefined) {
|
|
282
|
+
if (!options.artifactTitle) {
|
|
283
|
+
throw new CliError('INVALID_END', '--artifact-title is required when --artifact-from is set');
|
|
284
|
+
}
|
|
285
|
+
body.artifact = {
|
|
286
|
+
title: options.artifactTitle,
|
|
287
|
+
content: readContentFile(options.artifactFrom),
|
|
288
|
+
isPublic: options.artifactPublic ?? false,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
const { client } = requireAuthClient();
|
|
292
|
+
const { data } = await client.post(`/v0/ma-sessions/${encodeURIComponent(sessionToken)}/end`, body);
|
|
293
|
+
outputSuccess(data.data);
|
|
294
|
+
}
|
|
295
|
+
function readJsonOption(inline, filePath, label) {
|
|
296
|
+
if (inline !== undefined && filePath !== undefined) {
|
|
297
|
+
throw new CliError('INVALID_RECORD', `Pass either ${label} inline or as a file, not both`);
|
|
298
|
+
}
|
|
299
|
+
let raw;
|
|
300
|
+
if (inline !== undefined) {
|
|
301
|
+
raw = inline;
|
|
302
|
+
}
|
|
303
|
+
else if (filePath !== undefined) {
|
|
304
|
+
raw = readContentFile(filePath);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
throw new CliError('INVALID_RECORD', `Provide ${label} <json>`);
|
|
308
|
+
}
|
|
309
|
+
try {
|
|
310
|
+
const parsed = JSON.parse(raw);
|
|
311
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
312
|
+
throw new CliError('INVALID_JSON', `${label} must decode to a JSON object`);
|
|
313
|
+
}
|
|
314
|
+
return parsed;
|
|
315
|
+
}
|
|
316
|
+
catch (err) {
|
|
317
|
+
if (err instanceof CliError)
|
|
318
|
+
throw err;
|
|
319
|
+
throw new CliError('INVALID_JSON', `${label} is not valid JSON: ${err.message}`);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function readContentFile(path) {
|
|
323
|
+
try {
|
|
324
|
+
return readFileSync(path, 'utf-8');
|
|
325
|
+
}
|
|
326
|
+
catch (err) {
|
|
327
|
+
if (err.code === 'ENOENT') {
|
|
328
|
+
throw new CliError('FILE_NOT_FOUND', `File not found: ${path}`);
|
|
329
|
+
}
|
|
330
|
+
throw err;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
72
333
|
//# sourceMappingURL=mountedagent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mountedagent.js","sourceRoot":"","sources":["../../src/commands/mountedagent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,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,QAAQ,CAAC,kBAAkB,EAAE,+BAA+B,CAAC,CAAC;QAC1E,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;IAC3B,CAAC;IACD,IAAI,OAAO,CAAC,IAAI;QAAE,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAEtD,MAAM,EAAE,MAAM,E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AC;IAC9F,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACrD,MAAM,IAAI,QAAQ,CAAC,gBAAgB,EAAE,mBAAmB,IAAI,EAAE,CAAC,CAAC;QAClE,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { requireAuthClient } from '../auth-client.js';
|
|
2
|
+
import { CliError } from '../errors.js';
|
|
3
|
+
import { formatPublisher } from '../formatters.js';
|
|
4
|
+
import { outputSuccess } from '../output.js';
|
|
5
|
+
export async function publisherApply(options) {
|
|
6
|
+
if (!options.displayName)
|
|
7
|
+
throw new CliError('MISSING_FIELD', '--display-name is required');
|
|
8
|
+
if (!options.email)
|
|
9
|
+
throw new CliError('MISSING_FIELD', '--email is required');
|
|
10
|
+
const ownerKind = options.team ? 'team' : 'agent';
|
|
11
|
+
const body = {
|
|
12
|
+
ownerKind,
|
|
13
|
+
displayName: options.displayName,
|
|
14
|
+
contactEmail: options.email,
|
|
15
|
+
};
|
|
16
|
+
if (options.team)
|
|
17
|
+
body.teamSlug = options.team;
|
|
18
|
+
if (options.bio)
|
|
19
|
+
body.bio = options.bio;
|
|
20
|
+
if (options.website)
|
|
21
|
+
body.websiteUrl = options.website;
|
|
22
|
+
const { client } = requireAuthClient();
|
|
23
|
+
const { data } = await client.post('/v0/publishers', body);
|
|
24
|
+
outputSuccess(data.data, formatPublisher);
|
|
25
|
+
}
|
|
26
|
+
export async function publisherShow() {
|
|
27
|
+
const { client } = requireAuthClient();
|
|
28
|
+
try {
|
|
29
|
+
const { data } = await client.get('/v0/publishers/me');
|
|
30
|
+
outputSuccess(data.data, formatPublisher);
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
// The shared HTTP client wraps server errors into CliError with the
|
|
34
|
+
// server's `error` code. The backend returns PUBLISHER_NOT_FOUND
|
|
35
|
+
// (publisher.controller.ts) but we also accept a bare HTTP 404 as a
|
|
36
|
+
// friendly "none" state for any client transport that bypasses the
|
|
37
|
+
// wrapper.
|
|
38
|
+
let code = null;
|
|
39
|
+
if (err instanceof CliError)
|
|
40
|
+
code = err.code;
|
|
41
|
+
else if (typeof err === 'object' && err !== null && 'response' in err) {
|
|
42
|
+
const status = err.response?.status;
|
|
43
|
+
if (status === 404)
|
|
44
|
+
code = 'NOT_FOUND';
|
|
45
|
+
}
|
|
46
|
+
if (code === 'PUBLISHER_NOT_FOUND' || code === 'NOT_FOUND') {
|
|
47
|
+
outputSuccess({ status: 'none', message: 'No Publisher application yet. Run: rip publisher apply ...' }, formatPublisher);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
throw err;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=publisher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../src/commands/publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAMpC;IACC,IAAI,CAAC,OAAO,CAAC,WAAW;QAAE,MAAM,IAAI,QAAQ,CAAC,eAAe,EAAE,4BAA4B,CAAC,CAAC;IAC5F,IAAI,CAAC,OAAO,CAAC,KAAK;QAAE,MAAM,IAAI,QAAQ,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;IAE/E,MAAM,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AAI,UAAU,IAAI,GAAG,EAAE,CAAC;YACtE,MAAM,MAAM,GAAI,GAA0C,CAAC,QAAQ,EAAE,MAAM,CAAC;YAC5E,IAAI,MAAM,KAAK,GAAG;gBAAE,IAAI,GAAG,WAAW,CAAC;QACzC,CAAC;QACD,IAAI,IAAI,KAAK,qBAAqB,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YAC3D,aAAa,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,4DAA4D,EAAE,EAAE,eAAe,CAAC,CAAC;YAC1H,OAAO;QACT,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/formatters.d.ts
CHANGED
|
@@ -41,3 +41,15 @@ export declare const formatTeamDetails: Formatter;
|
|
|
41
41
|
export declare const formatTeamInvite: Formatter;
|
|
42
42
|
export declare const formatSelfUpdate: Formatter;
|
|
43
43
|
export declare const formatAgentList: Formatter;
|
|
44
|
+
export declare const formatMount: Formatter;
|
|
45
|
+
export declare const formatMountList: Formatter;
|
|
46
|
+
export declare const formatUnmounted: Formatter;
|
|
47
|
+
export declare const formatMountedAgentPublished: Formatter;
|
|
48
|
+
export declare const formatMountedAgent: Formatter;
|
|
49
|
+
export declare const formatMountedAgentList: Formatter;
|
|
50
|
+
export declare const formatMountedAgentScaffold: Formatter;
|
|
51
|
+
export declare const formatImprintAssets: Formatter;
|
|
52
|
+
export declare const formatMountAssets: Formatter;
|
|
53
|
+
export declare const formatMountDrillIn: Formatter;
|
|
54
|
+
export declare const formatMountContext: Formatter;
|
|
55
|
+
export declare const formatPublisher: Formatter;
|
package/dist/formatters.js
CHANGED
|
@@ -591,6 +591,199 @@ function formatTimeAgo(date) {
|
|
|
591
591
|
return `${Math.floor(seconds / 3600)}h ago`;
|
|
592
592
|
return `${Math.floor(seconds / 86400)}d ago`;
|
|
593
593
|
}
|
|
594
|
+
// ── Mounted-agents v2 ────────────────────────────────────────────────
|
|
595
|
+
export const formatMount = (data) => {
|
|
596
|
+
const lines = [`Mount: ${data.name || '(default)'}`];
|
|
597
|
+
if (data.id)
|
|
598
|
+
lines.push(` ID: ${data.id}`);
|
|
599
|
+
if (data.imprintSlug)
|
|
600
|
+
lines.push(` Imprint: ${data.imprintSlug}`);
|
|
601
|
+
if (data.imprintVersionAtCreate)
|
|
602
|
+
lines.push(` Created at: imprint v${data.imprintVersionAtCreate}`);
|
|
603
|
+
if (data.contextAssetPublicId)
|
|
604
|
+
lines.push(` Context: ${data.contextAssetPublicId}`);
|
|
605
|
+
if (data.ownerAgentId)
|
|
606
|
+
lines.push(` Owner agent: ${data.ownerAgentId}`);
|
|
607
|
+
if (data.teamId)
|
|
608
|
+
lines.push(` Team: ${data.teamId}`);
|
|
609
|
+
if (data.createdByAgentId)
|
|
610
|
+
lines.push(` Created by: ${data.createdByAgentId}`);
|
|
611
|
+
if (data.createdAt)
|
|
612
|
+
lines.push(` Created: ${data.createdAt}`);
|
|
613
|
+
return lines.join('\n');
|
|
614
|
+
};
|
|
615
|
+
export const formatMountList = (data) => {
|
|
616
|
+
const mounts = data;
|
|
617
|
+
if (!Array.isArray(mounts) || mounts.length === 0)
|
|
618
|
+
return 'No mounts.';
|
|
619
|
+
const lines = [`${mounts.length} mount(s):\n`];
|
|
620
|
+
for (const m of mounts) {
|
|
621
|
+
const label = m.name || '(default)';
|
|
622
|
+
const scope = m.teamId ? `team:${m.teamId}` : 'personal';
|
|
623
|
+
lines.push(` ${String(label).padEnd(24)} ${scope}`);
|
|
624
|
+
if (m.id)
|
|
625
|
+
lines.push(` id: ${m.id}`);
|
|
626
|
+
if (m.imprintSlug)
|
|
627
|
+
lines.push(` imprint: ${m.imprintSlug}`);
|
|
628
|
+
}
|
|
629
|
+
return lines.join('\n');
|
|
630
|
+
};
|
|
631
|
+
export const formatUnmounted = (data) => {
|
|
632
|
+
return `Unmounted: ${data.id}`;
|
|
633
|
+
};
|
|
634
|
+
export const formatMountedAgentPublished = (data) => {
|
|
635
|
+
const lines = [`Published ${data.slug} as v${data.publishedVersion ?? '?'}`];
|
|
636
|
+
if (data.isPublished)
|
|
637
|
+
lines.push(' Public listing: yes');
|
|
638
|
+
if (data.publisherId)
|
|
639
|
+
lines.push(` Publisher: ${data.publisherId}`);
|
|
640
|
+
return lines.join('\n');
|
|
641
|
+
};
|
|
642
|
+
export const formatMountedAgent = (data) => {
|
|
643
|
+
const manifest = data.manifest;
|
|
644
|
+
const lines = [`Mounted agent: ${data.slug}`];
|
|
645
|
+
if (data.publishedVersion)
|
|
646
|
+
lines.push(` Version: v${data.publishedVersion}`);
|
|
647
|
+
if (data.manifestVersion)
|
|
648
|
+
lines.push(` Manifest: v${data.manifestVersion}`);
|
|
649
|
+
if (data.ownerAgentId)
|
|
650
|
+
lines.push(` Owner agent: ${data.ownerAgentId}`);
|
|
651
|
+
if (data.ownerTeamId)
|
|
652
|
+
lines.push(` Owner team: ${data.ownerTeamId}`);
|
|
653
|
+
if (typeof data.isPublished === 'boolean')
|
|
654
|
+
lines.push(` Listed: ${data.isPublished ? 'yes' : 'no'}`);
|
|
655
|
+
if (manifest?.display?.displayName)
|
|
656
|
+
lines.push(` Display: ${manifest.display.displayName}`);
|
|
657
|
+
if (manifest?.display?.tagline)
|
|
658
|
+
lines.push(` Tagline: ${manifest.display.tagline}`);
|
|
659
|
+
if (manifest?.mountIntake?.starterAssetAlias)
|
|
660
|
+
lines.push(` Mount intake: ${manifest.mountIntake.starterAssetAlias}`);
|
|
661
|
+
const brain = manifest?.brain?.assets ?? [];
|
|
662
|
+
if (Array.isArray(brain) && brain.length > 0) {
|
|
663
|
+
lines.push('');
|
|
664
|
+
lines.push('Brain:');
|
|
665
|
+
for (const asset of brain)
|
|
666
|
+
lines.push(` ${asset.role}: ${asset.alias}`);
|
|
667
|
+
}
|
|
668
|
+
return lines.join('\n');
|
|
669
|
+
};
|
|
670
|
+
export const formatMountedAgentList = (data) => {
|
|
671
|
+
const agents = data;
|
|
672
|
+
if (!Array.isArray(agents) || agents.length === 0)
|
|
673
|
+
return 'No mounted agents.';
|
|
674
|
+
const lines = [`${agents.length} mounted agent(s):\n`];
|
|
675
|
+
for (const agent of agents) {
|
|
676
|
+
const manifest = agent.manifest;
|
|
677
|
+
const name = manifest?.display?.displayName ?? agent.slug;
|
|
678
|
+
const version = agent.publishedVersion ? ` v${agent.publishedVersion}` : '';
|
|
679
|
+
const listed = agent.isPublished ? ' listed' : ' draft';
|
|
680
|
+
lines.push(` ${String(agent.slug).padEnd(28)}${version}${listed} ${name}`);
|
|
681
|
+
}
|
|
682
|
+
return lines.join('\n');
|
|
683
|
+
};
|
|
684
|
+
export const formatMountedAgentScaffold = (data) => {
|
|
685
|
+
const lines = [`Forked: ${data.slug}`];
|
|
686
|
+
if (data.path)
|
|
687
|
+
lines.push(` Path: ${data.path}`);
|
|
688
|
+
if (data.nextStep)
|
|
689
|
+
lines.push(` Next: ${data.nextStep}`);
|
|
690
|
+
return lines.join('\n');
|
|
691
|
+
};
|
|
692
|
+
export const formatImprintAssets = (data) => {
|
|
693
|
+
return formatAssetRows(data, 'imprint asset');
|
|
694
|
+
};
|
|
695
|
+
export const formatMountAssets = (data) => {
|
|
696
|
+
return formatAssetRows(data, 'mount asset');
|
|
697
|
+
};
|
|
698
|
+
export const formatMountDrillIn = (data) => {
|
|
699
|
+
const mount = data.mount ?? {};
|
|
700
|
+
const imprint = data.imprint ?? {};
|
|
701
|
+
const contextAsset = data.contextAsset;
|
|
702
|
+
const lines = [`Mount: ${mount.name || '(default)'}`];
|
|
703
|
+
if (mount.id)
|
|
704
|
+
lines.push(` ID: ${mount.id}`);
|
|
705
|
+
if (imprint.slug) {
|
|
706
|
+
const current = imprint.publishedVersion ? ` v${imprint.publishedVersion}` : '';
|
|
707
|
+
lines.push(` Imprint: ${imprint.slug}${current}`);
|
|
708
|
+
}
|
|
709
|
+
if (mount.imprintVersionAtCreate)
|
|
710
|
+
lines.push(` Created at: imprint v${mount.imprintVersionAtCreate}`);
|
|
711
|
+
if (contextAsset) {
|
|
712
|
+
lines.push('');
|
|
713
|
+
lines.push('Context:');
|
|
714
|
+
if (contextAsset.alias)
|
|
715
|
+
lines.push(` Alias: ${contextAsset.alias}`);
|
|
716
|
+
if (contextAsset.publicId)
|
|
717
|
+
lines.push(` Asset ID: ${contextAsset.publicId}`);
|
|
718
|
+
if (contextAsset.version)
|
|
719
|
+
lines.push(` Version: v${contextAsset.version}`);
|
|
720
|
+
if (contextAsset.sizeBytes != null)
|
|
721
|
+
lines.push(` Size: ${formatBytes(contextAsset.sizeBytes)}`);
|
|
722
|
+
}
|
|
723
|
+
const layers = data.layers;
|
|
724
|
+
if (layers) {
|
|
725
|
+
lines.push('');
|
|
726
|
+
lines.push(`Layers: shared ${countLayer(layers.shared)}, team ${countLayer(layers.team)}, private ${countLayer(layers.private)}`);
|
|
727
|
+
}
|
|
728
|
+
return lines.join('\n');
|
|
729
|
+
};
|
|
730
|
+
export const formatMountContext = (data) => {
|
|
731
|
+
if (data.updatedVersion) {
|
|
732
|
+
const lines = [`Mount context updated to v${data.updatedVersion}`];
|
|
733
|
+
const asset = data.contextAsset;
|
|
734
|
+
if (asset?.publicId)
|
|
735
|
+
lines.push(` Asset ID: ${asset.publicId}`);
|
|
736
|
+
return lines.join('\n');
|
|
737
|
+
}
|
|
738
|
+
return String(data.content ?? '');
|
|
739
|
+
};
|
|
740
|
+
export const formatPublisher = (data) => {
|
|
741
|
+
const lines = [`Publisher: ${data.displayName || '(unnamed)'}`];
|
|
742
|
+
if (data.id)
|
|
743
|
+
lines.push(` ID: ${data.id}`);
|
|
744
|
+
if (data.status)
|
|
745
|
+
lines.push(` Status: ${data.status}`);
|
|
746
|
+
if (typeof data.isApproved === 'boolean')
|
|
747
|
+
lines.push(` Approved: ${data.isApproved ? 'yes' : 'no'}`);
|
|
748
|
+
if (data.contactEmail)
|
|
749
|
+
lines.push(` Contact: ${data.contactEmail}`);
|
|
750
|
+
if (data.websiteUrl)
|
|
751
|
+
lines.push(` Website: ${data.websiteUrl}`);
|
|
752
|
+
if (data.agentId)
|
|
753
|
+
lines.push(` Owner agent: ${data.agentId}`);
|
|
754
|
+
if (data.teamId)
|
|
755
|
+
lines.push(` Owner team: ${data.teamId}`);
|
|
756
|
+
if (data.bio)
|
|
757
|
+
lines.push(` Bio: ${data.bio}`);
|
|
758
|
+
if (data.rejectionReason)
|
|
759
|
+
lines.push(` Reject why: ${data.rejectionReason}`);
|
|
760
|
+
// Friendly "no publisher yet" shape from the CLI:
|
|
761
|
+
if (data.status === 'none' && data.message)
|
|
762
|
+
lines.push(` ${data.message}`);
|
|
763
|
+
return lines.join('\n');
|
|
764
|
+
};
|
|
765
|
+
function formatAssetRows(rows, label) {
|
|
766
|
+
if (!Array.isArray(rows) || rows.length === 0)
|
|
767
|
+
return `No ${label}s.`;
|
|
768
|
+
const lines = [`${rows.length} ${label}(s):\n`];
|
|
769
|
+
for (const row of rows) {
|
|
770
|
+
lines.push(` ${String(row.kind ?? '').padEnd(18)} ${String(row.logicalKey ?? '').padEnd(24)} ${row.alias ?? '(no alias)'}`);
|
|
771
|
+
if (row.publicId)
|
|
772
|
+
lines.push(` id: ${row.publicId}`);
|
|
773
|
+
if (row.type)
|
|
774
|
+
lines.push(` type: ${row.type}${row.version ? ` v${row.version}` : ''}`);
|
|
775
|
+
if (row.title)
|
|
776
|
+
lines.push(` title: ${row.title}`);
|
|
777
|
+
}
|
|
778
|
+
return lines.join('\n');
|
|
779
|
+
}
|
|
780
|
+
function countLayer(layer) {
|
|
781
|
+
if (!layer)
|
|
782
|
+
return '0';
|
|
783
|
+
const collections = Array.isArray(layer.collections) ? layer.collections.length : 0;
|
|
784
|
+
const memoryAssets = Array.isArray(layer.memoryAssets) ? layer.memoryAssets.length : 0;
|
|
785
|
+
return String(collections + memoryAssets);
|
|
786
|
+
}
|
|
594
787
|
function formatBytes(bytes) {
|
|
595
788
|
if (bytes === 0)
|
|
596
789
|
return '0 B';
|