replicas-cli 0.2.406 → 0.2.408
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 +59 -18
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -22280,14 +22280,16 @@ function getInitialChatId(chats, preferredProvider = "claude") {
|
|
|
22280
22280
|
var CLAUDE_OPUS_1M_MODEL = "opus[1m]";
|
|
22281
22281
|
var LEGACY_CLAUDE_OPUS_1M_MODEL = "opus-1m";
|
|
22282
22282
|
var CLAUDE_FABLE_5_MODEL = "claude-fable-5";
|
|
22283
|
+
var CLAUDE_OPUS_5_MODEL = "claude-opus-5";
|
|
22283
22284
|
var CLAUDE_OPUS_4_8_MODEL = "claude-opus-4-8";
|
|
22284
22285
|
var CLAUDE_SONNET_5_MODEL = "claude-sonnet-5";
|
|
22285
22286
|
var CLAUDE_HAIKU_4_5_MODEL = "claude-haiku-4-5";
|
|
22286
22287
|
var CLAUDE_FABLE_5_BEDROCK_MODEL = "anthropic.claude-fable-5";
|
|
22288
|
+
var CLAUDE_OPUS_5_BEDROCK_MODEL = "anthropic.claude-opus-5";
|
|
22287
22289
|
var CLAUDE_OPUS_4_8_BEDROCK_MODEL = "us.anthropic.claude-opus-4-8";
|
|
22288
22290
|
var CLAUDE_SONNET_5_BEDROCK_MODEL = "anthropic.claude-sonnet-5";
|
|
22289
22291
|
var CLAUDE_HAIKU_4_5_BEDROCK_MODEL = "us.anthropic.claude-haiku-4-5-20251001-v1:0";
|
|
22290
|
-
var DEFAULT_CLAUDE_MODEL =
|
|
22292
|
+
var DEFAULT_CLAUDE_MODEL = CLAUDE_OPUS_5_MODEL;
|
|
22291
22293
|
var GPT_5_6_SOL_MODEL = "gpt-5.6-sol";
|
|
22292
22294
|
var GPT_5_6_TERRA_MODEL = "gpt-5.6-terra";
|
|
22293
22295
|
var GPT_5_6_LUNA_MODEL = "gpt-5.6-luna";
|
|
@@ -22316,10 +22318,12 @@ function normalizeClaudeModel(model) {
|
|
|
22316
22318
|
}
|
|
22317
22319
|
var CLAUDE_MODEL_CONTEXT_WINDOWS = {
|
|
22318
22320
|
[CLAUDE_FABLE_5_MODEL]: 1e6,
|
|
22321
|
+
[CLAUDE_OPUS_5_MODEL]: 1e6,
|
|
22319
22322
|
[CLAUDE_OPUS_4_8_MODEL]: 1e6,
|
|
22320
22323
|
[CLAUDE_SONNET_5_MODEL]: 1e6,
|
|
22321
22324
|
[CLAUDE_HAIKU_4_5_MODEL]: 2e5,
|
|
22322
22325
|
[CLAUDE_FABLE_5_BEDROCK_MODEL]: 1e6,
|
|
22326
|
+
[CLAUDE_OPUS_5_BEDROCK_MODEL]: 1e6,
|
|
22323
22327
|
[CLAUDE_OPUS_4_8_BEDROCK_MODEL]: 1e6,
|
|
22324
22328
|
[CLAUDE_SONNET_5_BEDROCK_MODEL]: 1e6,
|
|
22325
22329
|
[CLAUDE_HAIKU_4_5_BEDROCK_MODEL]: 2e5,
|
|
@@ -22334,6 +22338,7 @@ var AGENT_MODELS = {
|
|
|
22334
22338
|
codex: [DEFAULT_CODEX_MODEL, GPT_5_6_TERRA_MODEL, GPT_5_6_LUNA_MODEL, "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.2"],
|
|
22335
22339
|
cursor: [
|
|
22336
22340
|
CLAUDE_FABLE_5_MODEL,
|
|
22341
|
+
CLAUDE_OPUS_5_MODEL,
|
|
22337
22342
|
CLAUDE_OPUS_4_8_MODEL,
|
|
22338
22343
|
GPT_5_6_SOL_MODEL,
|
|
22339
22344
|
GPT_5_6_TERRA_MODEL,
|
|
@@ -22368,7 +22373,8 @@ var MODEL_LABELS = {
|
|
|
22368
22373
|
[CLAUDE_FABLE_5_MODEL]: "Fable 5",
|
|
22369
22374
|
sonnet: "Sonnet 5",
|
|
22370
22375
|
"claude-sonnet-5": "Sonnet 5",
|
|
22371
|
-
opus: "Opus
|
|
22376
|
+
opus: "Opus 5",
|
|
22377
|
+
[CLAUDE_OPUS_5_MODEL]: "Opus 5",
|
|
22372
22378
|
[CLAUDE_OPUS_1M_MODEL]: "Opus 4.8 (1M)",
|
|
22373
22379
|
[LEGACY_CLAUDE_OPUS_1M_MODEL]: "Opus 4.8 (1M)",
|
|
22374
22380
|
haiku: "Haiku 4.5",
|
|
@@ -22649,7 +22655,7 @@ replicas computer browser-state /tmp/after-click.png
|
|
|
22649
22655
|
replicas computer record start /tmp/demo.mp4 --fps 60
|
|
22650
22656
|
# ... do stuff ...
|
|
22651
22657
|
replicas computer record stop
|
|
22652
|
-
replicas media upload /tmp/demo.mp4
|
|
22658
|
+
replicas media upload /tmp/demo.mp4 --name "Demo recording"
|
|
22653
22659
|
\`\`\`
|
|
22654
22660
|
|
|
22655
22661
|
## Command reference
|
|
@@ -22739,7 +22745,7 @@ Starts an ffmpeg screen recorder and returns only after ffmpeg has written the f
|
|
|
22739
22745
|
Only one recording at a time. Re-running \`start\` while one is active fails - call \`stop\` first.
|
|
22740
22746
|
|
|
22741
22747
|
### \`replicas computer record stop\`
|
|
22742
|
-
SIGINTs ffmpeg, verifies that the process has finalized the MP4, then prints the output path. A finalization timeout preserves the recording state so \`stop\` can be retried safely. Upload it with \`replicas media upload <path
|
|
22748
|
+
SIGINTs ffmpeg, verifies that the process has finalized the MP4, then prints the output path. A finalization timeout preserves the recording state so \`stop\` can be retried safely. Upload it with \`replicas media upload <path> --name "<name>"\` to share it.
|
|
22743
22749
|
|
|
22744
22750
|
## Patterns
|
|
22745
22751
|
|
|
@@ -22784,7 +22790,7 @@ For tasks the user wants proof of:
|
|
|
22784
22790
|
replicas computer record start /tmp/walkthrough.mp4
|
|
22785
22791
|
# ... your work ...
|
|
22786
22792
|
replicas computer record stop
|
|
22787
|
-
replicas media upload /tmp/walkthrough.mp4
|
|
22793
|
+
replicas media upload /tmp/walkthrough.mp4 --name "Walkthrough recording"
|
|
22788
22794
|
\`\`\`
|
|
22789
22795
|
Then embed the printed \`\` line in your chat reply. See \`MEDIA.md\`.
|
|
22790
22796
|
|
|
@@ -22985,7 +22991,7 @@ gh pr review 123 --request-changes --body "Changes needed"
|
|
|
22985
22991
|
GitHub does NOT have a public API for uploading images to PRs/issues. When you need to include images:
|
|
22986
22992
|
- Do NOT use placeholder image URLs
|
|
22987
22993
|
- Do NOT commit screenshots as files to the repository
|
|
22988
|
-
- Run \`replicas media upload <image> --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
22994
|
+
- Run \`replicas media upload <image> --name "<display name>" --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
22989
22995
|
- 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
|
|
22990
22996
|
- 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
|
|
22991
22997
|
- If you were triggered from Slack, also upload the image to the Slack thread so the user can see it directly
|
|
@@ -23566,10 +23572,26 @@ If none of these apply, don't upload.
|
|
|
23566
23572
|
## Uploading to Replicas
|
|
23567
23573
|
|
|
23568
23574
|
\`\`\`bash
|
|
23569
|
-
replicas media upload <path-to-file> [<path-to-file> ...]
|
|
23575
|
+
replicas media upload <path-to-file> --name "<display name>" [<path-to-file> --name "<display name>" ...]
|
|
23570
23576
|
\`\`\`
|
|
23571
23577
|
|
|
23572
|
-
Pass one or more file paths. Uploading several files in a single invocation is preferred over running the command repeatedly
|
|
23578
|
+
Pass one or more file paths, each with a required \`--name\` (see below). Uploading several files in a single invocation is preferred over running the command repeatedly: it's faster and keeps the output grouped.
|
|
23579
|
+
|
|
23580
|
+
### Name each upload
|
|
23581
|
+
|
|
23582
|
+
\`--name\` is **required** and sets the short, human-readable display name shown in the Replicas dashboard (the backend still tracks the asset by UUID). Make it descriptive of the content, e.g. \`login-page\`, \`checkout-error\`, or \`db-latency-chart\`. Never use a generic value like \`screenshot\` or \`image\`.
|
|
23583
|
+
|
|
23584
|
+
\`\`\`bash
|
|
23585
|
+
replicas media upload /tmp/shot.png --name "Login page after fix"
|
|
23586
|
+
\`\`\`
|
|
23587
|
+
|
|
23588
|
+
Pass one \`--name\` per file, in the same order as the file paths:
|
|
23589
|
+
|
|
23590
|
+
\`\`\`bash
|
|
23591
|
+
replicas media upload /tmp/before.png /tmp/after.png --name "Before fix" --name "After fix"
|
|
23592
|
+
\`\`\`
|
|
23593
|
+
|
|
23594
|
+
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.
|
|
23573
23595
|
|
|
23574
23596
|
For each file, the CLI prints two lines:
|
|
23575
23597
|
|
|
@@ -23581,7 +23603,7 @@ Match each "View in Replicas" line to the embed line directly above it \u2014 th
|
|
|
23581
23603
|
Pass \`--share\` only when the media must render on an external forge:
|
|
23582
23604
|
|
|
23583
23605
|
\`\`\`bash
|
|
23584
|
-
replicas media upload screenshot.png --share
|
|
23606
|
+
replicas media upload screenshot.png --name "Login page" --share
|
|
23585
23607
|
\`\`\`
|
|
23586
23608
|
|
|
23587
23609
|
This prints an additional \`Forge embed\` Markdown line backed by an opt-in public 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.
|
|
@@ -23751,7 +23773,7 @@ Never paste the \`api.tryreplicas.com/v1/media/<id>\` URL into a Linear body or
|
|
|
23751
23773
|
GitHub has **no public API** for uploading attachments to PRs or issues. Its web UI uses an undocumented internal endpoint that API clients must not emulate. For screenshots, explicitly create a forge share and put the printed \`Forge embed\` Markdown directly in the PR body or comment, followed by the dashboard link:
|
|
23752
23774
|
|
|
23753
23775
|
\`\`\`bash
|
|
23754
|
-
replicas media upload /tmp/screenshot.png --share
|
|
23776
|
+
replicas media upload /tmp/screenshot.png --name "PR screenshot" --share
|
|
23755
23777
|
\`\`\`
|
|
23756
23778
|
|
|
23757
23779
|
GitHub does not reliably render arbitrary external videos as inline players. For a recording:
|
|
@@ -23805,13 +23827,14 @@ Auto-detected from the filename extension:
|
|
|
23805
23827
|
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:
|
|
23806
23828
|
|
|
23807
23829
|
\`\`\`bash
|
|
23808
|
-
replicas media upload diagram.svg --kind image
|
|
23809
|
-
replicas media upload chart-a.svg chart-b.svg --kind image
|
|
23830
|
+
replicas media upload diagram.svg --name "Architecture diagram" --kind image
|
|
23831
|
+
replicas media upload chart-a.svg chart-b.svg --name "Latency chart" --name "Error rate chart" --kind image
|
|
23810
23832
|
\`\`\`
|
|
23811
23833
|
|
|
23812
23834
|
## Options
|
|
23813
23835
|
|
|
23814
23836
|
- \`--kind <image|video|audio>\` \u2014 override auto-detection
|
|
23837
|
+
- \`--name <name>\`: required display name shown in the dashboard, one per file in order
|
|
23815
23838
|
- \`--session-id <id>\` \u2014 associate the upload with a specific session
|
|
23816
23839
|
- \`--share\`: create a revocable public bearer URL for a forge image embed
|
|
23817
23840
|
`;
|
|
@@ -24395,7 +24418,7 @@ function formatTurnElapsed(ms) {
|
|
|
24395
24418
|
}
|
|
24396
24419
|
|
|
24397
24420
|
// ../shared/src/cli-version.ts
|
|
24398
|
-
var CLI_VERSION = "0.2.
|
|
24421
|
+
var CLI_VERSION = "0.2.408";
|
|
24399
24422
|
|
|
24400
24423
|
// ../shared/src/version.ts
|
|
24401
24424
|
function compareVersions(v1, v2) {
|
|
@@ -29684,9 +29707,12 @@ function mediaInfo(ext) {
|
|
|
29684
29707
|
if (kind !== "image" && kind !== "video" && kind !== "audio") return void 0;
|
|
29685
29708
|
return { kind, contentType: mimeType };
|
|
29686
29709
|
}
|
|
29710
|
+
function isMediaKind(value) {
|
|
29711
|
+
return MEDIA_KINDS.some((kind) => kind === value);
|
|
29712
|
+
}
|
|
29687
29713
|
function resolveKind(ext, override) {
|
|
29688
29714
|
if (override) {
|
|
29689
|
-
if (!
|
|
29715
|
+
if (!isMediaKind(override)) {
|
|
29690
29716
|
throw new Error(`Invalid kind '${override}'. Must be one of: ${MEDIA_KINDS.join(", ")}`);
|
|
29691
29717
|
}
|
|
29692
29718
|
return override;
|
|
@@ -29697,7 +29723,7 @@ function resolveKind(ext, override) {
|
|
|
29697
29723
|
}
|
|
29698
29724
|
return inferred;
|
|
29699
29725
|
}
|
|
29700
|
-
async function uploadOne(filePath, options) {
|
|
29726
|
+
async function uploadOne(filePath, displayName, options) {
|
|
29701
29727
|
const absPath = path5.resolve(filePath);
|
|
29702
29728
|
if (!fs4.existsSync(absPath)) {
|
|
29703
29729
|
throw new Error(`File not found: ${absPath}`);
|
|
@@ -29717,6 +29743,7 @@ async function uploadOne(filePath, options) {
|
|
|
29717
29743
|
form.append("file", new Blob([fs4.readFileSync(absPath)], { type: contentType }), fileName);
|
|
29718
29744
|
form.append("kind", kind);
|
|
29719
29745
|
if (options.sessionId) form.append("session_id", options.sessionId);
|
|
29746
|
+
form.append("display_name", displayName);
|
|
29720
29747
|
const { media } = await agentFetch("/v1/engine/media", {
|
|
29721
29748
|
method: "POST",
|
|
29722
29749
|
body: form
|
|
@@ -29727,10 +29754,19 @@ async function mediaUploadCommand(filePaths, options) {
|
|
|
29727
29754
|
if (filePaths.length === 0) {
|
|
29728
29755
|
throw new Error("No files specified");
|
|
29729
29756
|
}
|
|
29730
|
-
if (options.kind && !
|
|
29757
|
+
if (options.kind && !isMediaKind(options.kind)) {
|
|
29731
29758
|
throw new Error(`Invalid kind '${options.kind}'. Must be one of: ${MEDIA_KINDS.join(", ")}`);
|
|
29732
29759
|
}
|
|
29733
|
-
const
|
|
29760
|
+
const names = options.name ?? [];
|
|
29761
|
+
if (names.length !== filePaths.length) {
|
|
29762
|
+
throw new Error(
|
|
29763
|
+
`Each file needs a --name. Got ${filePaths.length} file(s) and ${names.length} --name value(s); pass one --name per file, in order.`
|
|
29764
|
+
);
|
|
29765
|
+
}
|
|
29766
|
+
if (names.some((name) => !name.trim())) {
|
|
29767
|
+
throw new Error("--name must not be empty.");
|
|
29768
|
+
}
|
|
29769
|
+
const results = await Promise.allSettled(filePaths.map((p, i) => uploadOne(p, names[i], options)));
|
|
29734
29770
|
const config3 = readAgentConfig();
|
|
29735
29771
|
const failures = [];
|
|
29736
29772
|
for (let i = 0; i < results.length; i++) {
|
|
@@ -37261,7 +37297,12 @@ if (isAgentMode()) {
|
|
|
37261
37297
|
}
|
|
37262
37298
|
});
|
|
37263
37299
|
const media = program.command("media").description("Share workspace media (screenshots, videos, audio) inline in chat");
|
|
37264
|
-
media.command("upload <files...>").description("Upload one or more screenshot, video, or audio files. Multiple files are uploaded concurrently. Prints a markdown embed per file for the assistant reply.").option("-k, --kind <kind>", "Media kind: image, video, or audio (inferred from extension if omitted)").option("-s, --session-id <id>", "Session ID to associate the asset with").option(
|
|
37300
|
+
media.command("upload <files...>").description("Upload one or more screenshot, video, or audio files. Multiple files are uploaded concurrently. Prints a markdown embed per file for the assistant reply.").option("-k, --kind <kind>", "Media kind: image, video, or audio (inferred from extension if omitted)").option("-s, --session-id <id>", "Session ID to associate the asset with").option(
|
|
37301
|
+
"-n, --name <name>",
|
|
37302
|
+
"Required human-facing display name shown in the dashboard. Pass one --name per file, in order.",
|
|
37303
|
+
(value, previous) => [...previous, value],
|
|
37304
|
+
[]
|
|
37305
|
+
).option("--share", "Create an opt-in public forge embed URL for each asset").action(async (files, options) => {
|
|
37265
37306
|
try {
|
|
37266
37307
|
await mediaUploadCommand(files, options);
|
|
37267
37308
|
} catch (error51) {
|