replicas-cli 0.2.726 → 0.2.727
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.cjs +18 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24051,6 +24051,8 @@ replicas media upload screenshot.png --name "Login page" --access public
|
|
|
24051
24051
|
|
|
24052
24052
|
\`--share\` remains an alias for \`--access public\`. Public access prints the raw \`Forge embed\` Markdown instead of the authenticated chat-only embed for image, video, or audio media, backed by an opt-in bearer URL. Anyone with that unguessable URL can view the asset until it is rotated or revoked. HTML pages only support organization access. Use \`replicas media share <media-id>\` to rotate a public media URL and \`replicas media revoke <media-id>\` to revoke it.
|
|
24053
24053
|
|
|
24054
|
+
Permanently delete an upload with \`replicas media delete <media-id>\`. The backend only permits deletion when the media belongs to the current workspace; media from another workspace returns not found.
|
|
24055
|
+
|
|
24054
24056
|
## The URLs the CLI gives you \u2014 and where each one is allowed
|
|
24055
24057
|
|
|
24056
24058
|
| URL | What it is | Where it's allowed |
|
|
@@ -24712,7 +24714,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
|
|
|
24712
24714
|
| \`replicas automation ...\` | Manage automations (cron + GitHub/GitLab event triggers) |
|
|
24713
24715
|
| \`replicas preview ...\` | Register / list preview URLs (covered in \`PREVIEWS.md\`) |
|
|
24714
24716
|
| \`replicas service ...\` | Run long-lived services detached so they survive workspace sleep/wake (see below) |
|
|
24715
|
-
| \`replicas media ...\` | Upload
|
|
24717
|
+
| \`replicas media ...\` | Upload, list, share, revoke, or delete workspace media; follow \`MEDIA.md\` for destination embedding |
|
|
24716
24718
|
| \`replicas slack thread ...\` | Attach or switch Slack thread routing (covered in \`SLACK.md\`) |
|
|
24717
24719
|
|
|
24718
24720
|
\`replicas <command> --help\` is always the source of truth for flags.
|
|
@@ -27455,7 +27457,7 @@ var headlessFilesystemAgentResultSchema = external_exports.object({
|
|
|
27455
27457
|
});
|
|
27456
27458
|
|
|
27457
27459
|
// ../shared/src/cli-version.ts
|
|
27458
|
-
var CLI_VERSION = "0.2.
|
|
27460
|
+
var CLI_VERSION = "0.2.727";
|
|
27459
27461
|
|
|
27460
27462
|
// ../shared/src/version.ts
|
|
27461
27463
|
function compareVersions(v1, v2) {
|
|
@@ -31594,6 +31596,10 @@ async function mediaRevokeCommand(mediaId) {
|
|
|
31594
31596
|
await agentFetch(`/v1/engine/media/${mediaId}/share`, { method: "DELETE" });
|
|
31595
31597
|
console.log(`Revoked public share for ${mediaId}`);
|
|
31596
31598
|
}
|
|
31599
|
+
async function mediaDeleteCommand(mediaId) {
|
|
31600
|
+
await agentFetch(`/v1/engine/media/${mediaId}`, { method: "DELETE" });
|
|
31601
|
+
console.log(`Deleted media ${mediaId}`);
|
|
31602
|
+
}
|
|
31597
31603
|
async function mediaListCommand(options) {
|
|
31598
31604
|
const qs = new URLSearchParams();
|
|
31599
31605
|
if (options.kind) qs.set("kind", options.kind);
|
|
@@ -33203,6 +33209,16 @@ if (isAgentMode()) {
|
|
|
33203
33209
|
} catch (error51) {
|
|
33204
33210
|
if (error51 instanceof Error) console.error(import_chalk24.default.red(`
|
|
33205
33211
|
\u2717 ${error51.message}
|
|
33212
|
+
`));
|
|
33213
|
+
process.exit(1);
|
|
33214
|
+
}
|
|
33215
|
+
});
|
|
33216
|
+
media.command("delete <mediaId>").description("Permanently delete media uploaded by this workspace").action(async (mediaId) => {
|
|
33217
|
+
try {
|
|
33218
|
+
await mediaDeleteCommand(mediaId);
|
|
33219
|
+
} catch (error51) {
|
|
33220
|
+
if (error51 instanceof Error) console.error(import_chalk24.default.red(`
|
|
33221
|
+
\u2717 ${error51.message}
|
|
33206
33222
|
`));
|
|
33207
33223
|
process.exit(1);
|
|
33208
33224
|
}
|