replicas-cli 0.2.481 → 0.2.483
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/dist/index.mjs +88 -34
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8156,6 +8156,7 @@ var WORKSPACE_SIZES = ["small", "large"];
|
|
|
8156
8156
|
var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
|
|
8157
8157
|
|
|
8158
8158
|
// ../shared/src/urls.ts
|
|
8159
|
+
var DEFAULT_WEB_APP_URL = "https://tryreplicas.com";
|
|
8159
8160
|
function getWorkspaceDashboardUrl(workspaceId, options = {}) {
|
|
8160
8161
|
const { encodeWorkspaceId = true, mode, mediaId } = options;
|
|
8161
8162
|
const workspaceIdValue = encodeWorkspaceId ? encodeURIComponent(workspaceId) : workspaceId;
|
|
@@ -8165,6 +8166,12 @@ function getWorkspaceDashboardUrl(workspaceId, options = {}) {
|
|
|
8165
8166
|
const query = params.length > 0 ? `?${params.join("&")}` : "";
|
|
8166
8167
|
return `https://tryreplicas.com/workspaces/${workspaceIdValue}${query}`;
|
|
8167
8168
|
}
|
|
8169
|
+
function getOrganizationMediaPath(organizationId, mediaId) {
|
|
8170
|
+
return `/organizations/${encodeURIComponent(organizationId)}/media/${encodeURIComponent(mediaId)}`;
|
|
8171
|
+
}
|
|
8172
|
+
function getOrganizationMediaUrl(organizationId, mediaId, webAppUrl = DEFAULT_WEB_APP_URL) {
|
|
8173
|
+
return `${webAppUrl}${getOrganizationMediaPath(organizationId, mediaId)}`;
|
|
8174
|
+
}
|
|
8168
8175
|
var PR_URL_REGEX = /github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/;
|
|
8169
8176
|
function parsePrUrl(url2) {
|
|
8170
8177
|
const match = url2.match(PR_URL_REGEX);
|
|
@@ -8629,6 +8636,7 @@ GitHub does NOT have a public API for uploading images to PRs/issues. When you n
|
|
|
8629
8636
|
- Do NOT use placeholder image URLs
|
|
8630
8637
|
- Do NOT commit screenshots as files to the repository
|
|
8631
8638
|
- Run \`replicas media upload <image> --name "<display name>" --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
8639
|
+
- For a self-contained HTML report, run \`replicas media upload <page.html> --name "<display name>" --access organization\` and put the printed \`Forge link\` Markdown in the PR body or comment. Organization members who are already signed in open it directly; others sign in and return to the page
|
|
8632
8640
|
- For video, embed a shared poster image linked to the recording's **View in Replicas** URL; GitHub does not reliably render externally hosted video inline
|
|
8633
8641
|
- Treat the public URL as an opt-in bearer capability; revoke it with \`replicas media revoke <media-id>\` only when the user asks or the media should stop rendering \u2014 revoking breaks embeds already posted on the PR
|
|
8634
8642
|
- If you were triggered from Slack, also upload the image to the Slack thread so the user can see it directly
|
|
@@ -9230,17 +9238,18 @@ var LINEAR_ABILITY = {
|
|
|
9230
9238
|
|
|
9231
9239
|
// ../shared/src/default-skills/replicas-agent/abilities/media.ts
|
|
9232
9240
|
var SECTION8 = `### Media
|
|
9233
|
-
Share screenshots, screen recordings, generated diagrams,
|
|
9241
|
+
Share screenshots, screen recordings, generated diagrams, audio clips, and self-contained HTML pages through Replicas and external messages.
|
|
9234
9242
|
|
|
9235
9243
|
**Reference:** \`references/MEDIA.md\`
|
|
9236
9244
|
|
|
9237
9245
|
Use this when:
|
|
9238
9246
|
- You produce a screenshot, recording, generated image, or audio clip the user should see
|
|
9247
|
+
- You produce a self-contained HTML report that should be linked from a pull request
|
|
9239
9248
|
- You record video output (browser automation, screen capture) \u2014 including the recommended aspect ratio and FPS
|
|
9240
9249
|
- You need to embed media in a Slack/Linear/GitHub message AND keep a referenceable copy in the Replicas dashboard`;
|
|
9241
|
-
var REFERENCE8 = `# Media (Screenshots, Recordings, Audio)
|
|
9250
|
+
var REFERENCE8 = `# Media (Screenshots, Recordings, Audio, HTML)
|
|
9242
9251
|
|
|
9243
|
-
This guide covers how to share screenshots, screen recordings, generated diagrams,
|
|
9252
|
+
This guide covers how to share screenshots, screen recordings, generated diagrams, audio clips, and self-contained HTML pages through Replicas and external surfaces (Slack, Linear, GitHub).
|
|
9244
9253
|
|
|
9245
9254
|
## Prerequisites
|
|
9246
9255
|
|
|
@@ -9251,7 +9260,7 @@ The \`replicas\` CLI is pre-installed and authenticated in your workspace. No ad
|
|
|
9251
9260
|
Upload to Replicas in these cases \u2014 and **only** these cases:
|
|
9252
9261
|
|
|
9253
9262
|
1. **Media you produce.** Any screenshot, screen recording, generated diagram, or audio clip you create that the user might want to see. Upload before doing anything else with the file (analyzing, deleting, sending elsewhere). This applies even when you're also sending the file to Slack, Linear, GitHub, etc.
|
|
9254
|
-
2. **Files the user explicitly asks you to upload.** If the user sends or points at a file (image, video, audio) and asks you to upload it, run \`replicas media upload\`. Otherwise leave it alone \u2014 files in the workspace the user did not ask about should not be auto-uploaded as media.
|
|
9263
|
+
2. **Files the user explicitly asks you to upload.** If the user sends or points at a file (image, video, audio, HTML) and asks you to upload it, run \`replicas media upload\`. Otherwise leave it alone \u2014 files in the workspace the user did not ask about should not be auto-uploaded as media.
|
|
9255
9264
|
3. **Anything you plan to share externally (Slack, Linear, GitHub, etc.).** Upload to Replicas *in addition to* the platform's native upload. Never as a replacement.
|
|
9256
9265
|
|
|
9257
9266
|
If none of these apply, don't upload.
|
|
@@ -9280,28 +9289,39 @@ replicas media upload /tmp/before.png /tmp/after.png --name "Before fix" --name
|
|
|
9280
9289
|
|
|
9281
9290
|
Names are normalized to hyphen-case (spaces become hyphens, e.g. \`Login page\` is stored as \`login-page\`). Give every asset a **distinct** name \u2014 duplicates are not rejected, but Replicas keeps the first as-is and adds a \`-1\`, \`-2\` suffix to later collisions, which produces confusing lists, so pick unique names yourself.
|
|
9282
9291
|
|
|
9283
|
-
For each file, the CLI prints two lines:
|
|
9292
|
+
For each media file, the CLI prints two lines:
|
|
9284
9293
|
|
|
9285
9294
|
1. \`\` \u2014 the chat embed (renders inline in Replicas chat **only** \u2014 see below).
|
|
9286
9295
|
2. \`View in Replicas: <deep-link>\` \u2014 a per-file dashboard URL of the form \`https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>\` that opens directly to that specific file.
|
|
9287
9296
|
|
|
9288
9297
|
Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
|
|
9289
9298
|
|
|
9290
|
-
|
|
9299
|
+
HTML uploads print an \`HTML page\` Markdown link instead of an image embed.
|
|
9300
|
+
|
|
9301
|
+
For an HTML page that should stay inside the Replicas organization, create an authenticated link:
|
|
9291
9302
|
|
|
9292
9303
|
\`\`\`bash
|
|
9293
|
-
replicas media upload
|
|
9304
|
+
replicas media upload recap.html --name "Visual recap" --access organization
|
|
9294
9305
|
\`\`\`
|
|
9295
9306
|
|
|
9296
|
-
|
|
9307
|
+
The printed \`Forge link (organization only)\` opens a dedicated page. Signed-in organization members go straight to it; signed-out members sign in and return to the page.
|
|
9297
9308
|
|
|
9298
|
-
|
|
9309
|
+
Use public access only when the media must render without Replicas authentication:
|
|
9310
|
+
|
|
9311
|
+
\`\`\`bash
|
|
9312
|
+
replicas media upload screenshot.png --name "Login page" --access public
|
|
9313
|
+
\`\`\`
|
|
9314
|
+
|
|
9315
|
+
\`--share\` remains an alias for \`--access public\`. Public access prints an additional \`Forge embed\` for media or \`Forge link\` for HTML, backed by an opt-in bearer URL. Anyone with that unguessable URL can view the asset until it is rotated or revoked. Use \`replicas media share <media-id>\` to rotate it and \`replicas media revoke <media-id>\` to revoke it.
|
|
9316
|
+
|
|
9317
|
+
## The URLs the CLI gives you \u2014 and where each one is allowed
|
|
9299
9318
|
|
|
9300
9319
|
| URL | What it is | Where it's allowed |
|
|
9301
9320
|
|---|---|---|
|
|
9302
9321
|
| \`https://api.tryreplicas.com/v1/media/<id>\` (inside \`\`) | Authenticated API redirect to a presigned blob \u2014 requires the Replicas chat session | **Only** in the Replicas chat reply. Nowhere else. |
|
|
9303
|
-
| \`https://
|
|
9304
|
-
| \`https://tryreplicas.com/
|
|
9322
|
+
| \`https://tryreplicas.com/organizations/<organization-id>/media/<media-id>\` | Organization-only page printed by \`--access organization\` | Pull requests and other places where every viewer belongs to the Replicas organization. |
|
|
9323
|
+
| \`https://api.tryreplicas.com/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | GitHub image embeds and intentionally public HTML page links. |
|
|
9324
|
+
| \`https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>\` | Authenticated dashboard deep link that opens the media file in the workspace | Everywhere external \u2014 Slack, GitHub, Linear, PR bodies, comments, emails. |
|
|
9305
9325
|
|
|
9306
9326
|
### NEVER link the API redirect URL outside the Replicas chat reply
|
|
9307
9327
|
|
|
@@ -9314,9 +9334,9 @@ This rule has no exceptions:
|
|
|
9314
9334
|
- \u274C Never link to it from any external doc, email, or external chat.
|
|
9315
9335
|
- \u274C Never include it as a "backup link" in case the dashboard link breaks \u2014 it will always break externally.
|
|
9316
9336
|
|
|
9317
|
-
### ALWAYS link
|
|
9337
|
+
### ALWAYS link a Replicas web URL \u2014 never the authenticated API URL \u2014 when referencing media externally
|
|
9318
9338
|
|
|
9319
|
-
|
|
9339
|
+
For an organization-only HTML page, use the \`Forge link\` printed by \`--access organization\`. For other authenticated media references, use the dashboard form:
|
|
9320
9340
|
|
|
9321
9341
|
\`\`\`
|
|
9322
9342
|
https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>
|
|
@@ -9330,7 +9350,7 @@ Always render as a markdown / mrkdwn hyperlink labeled **View in Replicas** \u20
|
|
|
9330
9350
|
|
|
9331
9351
|
## In your Replicas chat reply
|
|
9332
9352
|
|
|
9333
|
-
Include each markdown embed line **verbatim** where you want that file to render inline. The chat substitutes each one with an embedded image, video, or audio player. Multiple embeds can appear in a single reply.
|
|
9353
|
+
Include each markdown embed line **verbatim** where you want that file to render inline. The chat substitutes each one with an embedded image, video, or audio player. For HTML, use the \`HTML page\` or \`View in Replicas\` link instead. Multiple embeds can appear in a single reply.
|
|
9334
9354
|
|
|
9335
9355
|
After (or alongside) the embeds, include a \`[View in Replicas](<deep-link>)\` hyperlink for each file using the per-file dashboard URL from the CLI. This lets the user open the specific item in the workspace.
|
|
9336
9356
|
|
|
@@ -9476,6 +9496,8 @@ GitHub does not reliably render arbitrary external videos as inline players. For
|
|
|
9476
9496
|
|
|
9477
9497
|
Public forge shares are bearer capabilities. For private repositories, create one only when the user asked for inline PR media. Revoke with \`replicas media revoke <media-id>\` **only** when the user asks or the media should intentionally stop rendering \u2014 never as routine post-task cleanup, since revoking breaks every embed already posted on the PR.
|
|
9478
9498
|
|
|
9499
|
+
For a self-contained HTML report, upload it with \`--access organization\` and put the printed \`Forge link\` Markdown in the PR body or comment. GitHub cannot render the page inline, so use the normal link rather than image syntax. Use \`--access public\` only when the user explicitly wants unauthenticated access.
|
|
9500
|
+
|
|
9479
9501
|
Do **not** commit screenshots to the repo, use placeholder URLs, expose the authenticated \`/v1/media/<id>\` URL, or automate GitHub's undocumented browser upload flow.
|
|
9480
9502
|
|
|
9481
9503
|
### GitLab: native inline screenshots and videos
|
|
@@ -9510,8 +9532,9 @@ Auto-detected from the filename extension:
|
|
|
9510
9532
|
| \`png\`, \`jpg\`, \`jpeg\`, \`webp\` | image |
|
|
9511
9533
|
| \`mp4\`, \`webm\` | video |
|
|
9512
9534
|
| \`mp3\`, \`wav\` | audio |
|
|
9535
|
+
| \`html\`, \`htm\` | html |
|
|
9513
9536
|
|
|
9514
|
-
For other extensions, pass \`--kind image|video|audio\` explicitly. The kind applies to every file in that invocation, so group files of the same kind together:
|
|
9537
|
+
For other extensions, pass \`--kind image|video|audio|html\` explicitly. The kind applies to every file in that invocation, so group files of the same kind together:
|
|
9515
9538
|
|
|
9516
9539
|
\`\`\`bash
|
|
9517
9540
|
replicas media upload diagram.svg --name "Architecture diagram" --kind image
|
|
@@ -9520,15 +9543,16 @@ replicas media upload chart-a.svg chart-b.svg --name "Latency chart" --name "Err
|
|
|
9520
9543
|
|
|
9521
9544
|
## Options
|
|
9522
9545
|
|
|
9523
|
-
- \`--kind <image|video|audio>\` \u2014 override auto-detection
|
|
9546
|
+
- \`--kind <image|video|audio|html>\` \u2014 override auto-detection
|
|
9524
9547
|
- \`--name <name>\`: required display name shown in the dashboard, one per file in order
|
|
9525
9548
|
- \`--session-id <id>\` \u2014 associate the upload with a specific session
|
|
9526
|
-
- \`--
|
|
9549
|
+
- \`--access organization|public\`: create an organization-only page link or a public bearer URL
|
|
9550
|
+
- \`--share\`: alias for \`--access public\`
|
|
9527
9551
|
`;
|
|
9528
9552
|
var MEDIA_ABILITY = {
|
|
9529
9553
|
label: "Media",
|
|
9530
|
-
description: "Share screenshots, recordings, generated images, and
|
|
9531
|
-
bullet: "- Producing or showing the user any media \u2014 screenshots, screen recordings, generated images or diagrams, audio clips \u2014 including in your Replicas chat reply, PR descriptions/comments, and other external platforms",
|
|
9554
|
+
description: "Share screenshots, recordings, generated images, audio clips, and HTML pages.",
|
|
9555
|
+
bullet: "- Producing or showing the user any media \u2014 screenshots, screen recordings, generated images or diagrams, audio clips, or HTML recap pages \u2014 including in your Replicas chat reply, PR descriptions/comments, and other external platforms",
|
|
9532
9556
|
section: SECTION8,
|
|
9533
9557
|
referenceFile: { name: "MEDIA.md", content: REFERENCE8 }
|
|
9534
9558
|
};
|
|
@@ -10117,7 +10141,7 @@ function formatTurnElapsed(ms) {
|
|
|
10117
10141
|
}
|
|
10118
10142
|
|
|
10119
10143
|
// ../shared/src/cli-version.ts
|
|
10120
|
-
var CLI_VERSION = "0.2.
|
|
10144
|
+
var CLI_VERSION = "0.2.483";
|
|
10121
10145
|
|
|
10122
10146
|
// ../shared/src/version.ts
|
|
10123
10147
|
function compareVersions(v1, v2) {
|
|
@@ -27491,9 +27515,10 @@ var EMAIL_TEMPLATE_KEYS = [...EMAIL_KEYS, ...MANUAL_EMAIL_TEMPLATE_KEYS];
|
|
|
27491
27515
|
var MEDIA_KIND = {
|
|
27492
27516
|
IMAGE: "image",
|
|
27493
27517
|
VIDEO: "video",
|
|
27494
|
-
AUDIO: "audio"
|
|
27518
|
+
AUDIO: "audio",
|
|
27519
|
+
HTML: "html"
|
|
27495
27520
|
};
|
|
27496
|
-
var MEDIA_KINDS = [MEDIA_KIND.IMAGE, MEDIA_KIND.VIDEO, MEDIA_KIND.AUDIO];
|
|
27521
|
+
var MEDIA_KINDS = [MEDIA_KIND.IMAGE, MEDIA_KIND.VIDEO, MEDIA_KIND.AUDIO, MEDIA_KIND.HTML];
|
|
27497
27522
|
var MAX_ENGINE_LOG_BYTES = 50 * 1024 * 1024;
|
|
27498
27523
|
|
|
27499
27524
|
// ../shared/src/sse.ts
|
|
@@ -30526,6 +30551,7 @@ async function previewRemoveCommand(workspaceId, options) {
|
|
|
30526
30551
|
// src/commands/media.ts
|
|
30527
30552
|
import fs4 from "fs";
|
|
30528
30553
|
import path5 from "path";
|
|
30554
|
+
var MEDIA_ACCESS_VALUES = ["organization", "public"];
|
|
30529
30555
|
function publicMediaUrl(mediaId, token) {
|
|
30530
30556
|
return `${MONOLITH_URL}/v1/media/public/${mediaId}/${token}`;
|
|
30531
30557
|
}
|
|
@@ -30537,12 +30563,15 @@ async function shareMedia(mediaId) {
|
|
|
30537
30563
|
}
|
|
30538
30564
|
function mediaInfo(ext) {
|
|
30539
30565
|
const { kind, mimeType } = classifyCanvasFilename(`.${ext}`);
|
|
30540
|
-
if (kind !== "image" && kind !== "video" && kind !== "audio") return void 0;
|
|
30566
|
+
if (kind !== "image" && kind !== "video" && kind !== "audio" && kind !== "html") return void 0;
|
|
30541
30567
|
return { kind, contentType: mimeType };
|
|
30542
30568
|
}
|
|
30543
30569
|
function isMediaKind(value) {
|
|
30544
30570
|
return MEDIA_KINDS.some((kind) => kind === value);
|
|
30545
30571
|
}
|
|
30572
|
+
function isMediaAccess(value) {
|
|
30573
|
+
return MEDIA_ACCESS_VALUES.some((access) => access === value);
|
|
30574
|
+
}
|
|
30546
30575
|
function resolveKind(ext, override) {
|
|
30547
30576
|
if (override) {
|
|
30548
30577
|
if (!isMediaKind(override)) {
|
|
@@ -30590,6 +30619,12 @@ async function mediaUploadCommand(filePaths, options) {
|
|
|
30590
30619
|
if (options.kind && !isMediaKind(options.kind)) {
|
|
30591
30620
|
throw new Error(`Invalid kind '${options.kind}'. Must be one of: ${MEDIA_KINDS.join(", ")}`);
|
|
30592
30621
|
}
|
|
30622
|
+
if (options.access && !isMediaAccess(options.access)) {
|
|
30623
|
+
throw new Error(`Invalid access '${options.access}'. Must be one of: ${MEDIA_ACCESS_VALUES.join(", ")}`);
|
|
30624
|
+
}
|
|
30625
|
+
if (options.share && options.access) {
|
|
30626
|
+
throw new Error("Pass either --share or --access, not both. --share is an alias for --access public.");
|
|
30627
|
+
}
|
|
30593
30628
|
const names = options.name ?? [];
|
|
30594
30629
|
if (names.length !== filePaths.length) {
|
|
30595
30630
|
throw new Error(
|
|
@@ -30600,17 +30635,36 @@ async function mediaUploadCommand(filePaths, options) {
|
|
|
30600
30635
|
throw new Error("--name must not be empty.");
|
|
30601
30636
|
}
|
|
30602
30637
|
const results = await Promise.allSettled(filePaths.map((p, i) => uploadOne(p, names[i], options)));
|
|
30638
|
+
const publicAccess = options.share || options.access === "public";
|
|
30639
|
+
const shareResults = publicAccess ? await Promise.allSettled(
|
|
30640
|
+
results.map(
|
|
30641
|
+
(result) => result.status === "fulfilled" ? shareMedia(result.value.media.id) : Promise.resolve(null)
|
|
30642
|
+
)
|
|
30643
|
+
) : [];
|
|
30603
30644
|
const config3 = readAgentConfig();
|
|
30604
30645
|
const failures = [];
|
|
30605
30646
|
for (let i = 0; i < results.length; i++) {
|
|
30606
30647
|
const result = results[i];
|
|
30607
30648
|
if (result.status === "fulfilled") {
|
|
30608
30649
|
const { fileName, media } = result.value;
|
|
30609
|
-
|
|
30610
|
-
|
|
30611
|
-
|
|
30612
|
-
|
|
30613
|
-
|
|
30650
|
+
if (media.kind === MEDIA_KIND.HTML) {
|
|
30651
|
+
console.log(`HTML page: [${fileName}](${MONOLITH_URL}/v1/media/${media.id})`);
|
|
30652
|
+
} else {
|
|
30653
|
+
console.log(``);
|
|
30654
|
+
}
|
|
30655
|
+
if (options.access === "organization") {
|
|
30656
|
+
console.log(
|
|
30657
|
+
`Forge link (organization only): [View ${options.name?.[i] ?? fileName}](${getOrganizationMediaUrl(media.organization_id, media.id)})`
|
|
30658
|
+
);
|
|
30659
|
+
}
|
|
30660
|
+
if (publicAccess) {
|
|
30661
|
+
const shareResult = shareResults[i];
|
|
30662
|
+
if (shareResult.status === "fulfilled" && shareResult.value) {
|
|
30663
|
+
console.log(
|
|
30664
|
+
media.kind === MEDIA_KIND.HTML ? `Forge link: [View ${options.name?.[i] ?? fileName}](${shareResult.value})` : `Forge embed: `
|
|
30665
|
+
);
|
|
30666
|
+
} else {
|
|
30667
|
+
const error51 = shareResult.status === "rejected" ? shareResult.reason : new Error("Missing public share URL");
|
|
30614
30668
|
failures.push({
|
|
30615
30669
|
filePath: filePaths[i],
|
|
30616
30670
|
operation: "share",
|
|
@@ -35537,13 +35591,13 @@ if (isAgentMode()) {
|
|
|
35537
35591
|
process.exit(1);
|
|
35538
35592
|
}
|
|
35539
35593
|
});
|
|
35540
|
-
const media = program.command("media").description("Share workspace media
|
|
35541
|
-
media.command("upload <files...>").description("Upload one or more
|
|
35594
|
+
const media = program.command("media").description("Share workspace media and HTML pages");
|
|
35595
|
+
media.command("upload <files...>").description("Upload one or more image, video, audio, or HTML files. Multiple files are uploaded concurrently.").option("-k, --kind <kind>", "Media kind: image, video, audio, or html (inferred from extension if omitted)").option("-s, --session-id <id>", "Session ID to associate the asset with").option(
|
|
35542
35596
|
"-n, --name <name>",
|
|
35543
35597
|
"Required human-facing display name shown in the dashboard. Pass one --name per file, in order.",
|
|
35544
35598
|
(value, previous) => [...previous, value],
|
|
35545
35599
|
[]
|
|
35546
|
-
).option("--
|
|
35600
|
+
).option("--access <access>", "Link access: organization (sign-in required) or public (bearer URL)").option("--share", "Alias for --access public").action(async (files, options) => {
|
|
35547
35601
|
try {
|
|
35548
35602
|
await mediaUploadCommand(files, options);
|
|
35549
35603
|
} catch (error51) {
|
|
@@ -35555,7 +35609,7 @@ if (isAgentMode()) {
|
|
|
35555
35609
|
process.exit(1);
|
|
35556
35610
|
}
|
|
35557
35611
|
});
|
|
35558
|
-
media.command("share <mediaId>").description("Create or rotate a public forge
|
|
35612
|
+
media.command("share <mediaId>").description("Create or rotate a public forge URL for uploaded media").action(async (mediaId) => {
|
|
35559
35613
|
try {
|
|
35560
35614
|
await mediaShareCommand(mediaId);
|
|
35561
35615
|
} catch (error51) {
|
|
@@ -35565,7 +35619,7 @@ if (isAgentMode()) {
|
|
|
35565
35619
|
process.exit(1);
|
|
35566
35620
|
}
|
|
35567
35621
|
});
|
|
35568
|
-
media.command("revoke <mediaId>").description("Revoke the public forge
|
|
35622
|
+
media.command("revoke <mediaId>").description("Revoke the public forge URL for uploaded media").action(async (mediaId) => {
|
|
35569
35623
|
try {
|
|
35570
35624
|
await mediaRevokeCommand(mediaId);
|
|
35571
35625
|
} catch (error51) {
|
|
@@ -35575,7 +35629,7 @@ if (isAgentMode()) {
|
|
|
35575
35629
|
process.exit(1);
|
|
35576
35630
|
}
|
|
35577
35631
|
});
|
|
35578
|
-
media.command("list").description("List media uploaded for this workspace").option("-k, --kind <kind>", "Filter by kind: image, video, or
|
|
35632
|
+
media.command("list").description("List media uploaded for this workspace").option("-k, --kind <kind>", "Filter by kind: image, video, audio, or html").option("-l, --limit <n>", "Page size (default 50, max 200)").option("-p, --page <n>", "Page number (default 1)").action(async (options) => {
|
|
35579
35633
|
try {
|
|
35580
35634
|
await mediaListCommand(options);
|
|
35581
35635
|
} catch (error51) {
|