replicas-engine 0.1.496 → 0.1.498
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/src/index.js +42 -16
- package/package.json +2 -2
package/dist/src/index.js
CHANGED
|
@@ -225,14 +225,16 @@ function isDefaultChat(chat) {
|
|
|
225
225
|
var CLAUDE_OPUS_1M_MODEL = "opus[1m]";
|
|
226
226
|
var LEGACY_CLAUDE_OPUS_1M_MODEL = "opus-1m";
|
|
227
227
|
var CLAUDE_FABLE_5_MODEL = "claude-fable-5";
|
|
228
|
+
var CLAUDE_OPUS_5_MODEL = "claude-opus-5";
|
|
228
229
|
var CLAUDE_OPUS_4_8_MODEL = "claude-opus-4-8";
|
|
229
230
|
var CLAUDE_SONNET_5_MODEL = "claude-sonnet-5";
|
|
230
231
|
var CLAUDE_HAIKU_4_5_MODEL = "claude-haiku-4-5";
|
|
231
232
|
var CLAUDE_FABLE_5_BEDROCK_MODEL = "anthropic.claude-fable-5";
|
|
233
|
+
var CLAUDE_OPUS_5_BEDROCK_MODEL = "anthropic.claude-opus-5";
|
|
232
234
|
var CLAUDE_OPUS_4_8_BEDROCK_MODEL = "us.anthropic.claude-opus-4-8";
|
|
233
235
|
var CLAUDE_SONNET_5_BEDROCK_MODEL = "anthropic.claude-sonnet-5";
|
|
234
236
|
var CLAUDE_HAIKU_4_5_BEDROCK_MODEL = "us.anthropic.claude-haiku-4-5-20251001-v1:0";
|
|
235
|
-
var DEFAULT_CLAUDE_MODEL =
|
|
237
|
+
var DEFAULT_CLAUDE_MODEL = CLAUDE_OPUS_5_MODEL;
|
|
236
238
|
var GPT_5_6_SOL_MODEL = "gpt-5.6-sol";
|
|
237
239
|
var GPT_5_6_TERRA_MODEL = "gpt-5.6-terra";
|
|
238
240
|
var GPT_5_6_LUNA_MODEL = "gpt-5.6-luna";
|
|
@@ -263,10 +265,12 @@ function normalizeClaudeModel(model) {
|
|
|
263
265
|
}
|
|
264
266
|
var CLAUDE_MODEL_CONTEXT_WINDOWS = {
|
|
265
267
|
[CLAUDE_FABLE_5_MODEL]: 1e6,
|
|
268
|
+
[CLAUDE_OPUS_5_MODEL]: 1e6,
|
|
266
269
|
[CLAUDE_OPUS_4_8_MODEL]: 1e6,
|
|
267
270
|
[CLAUDE_SONNET_5_MODEL]: 1e6,
|
|
268
271
|
[CLAUDE_HAIKU_4_5_MODEL]: 2e5,
|
|
269
272
|
[CLAUDE_FABLE_5_BEDROCK_MODEL]: 1e6,
|
|
273
|
+
[CLAUDE_OPUS_5_BEDROCK_MODEL]: 1e6,
|
|
270
274
|
[CLAUDE_OPUS_4_8_BEDROCK_MODEL]: 1e6,
|
|
271
275
|
[CLAUDE_SONNET_5_BEDROCK_MODEL]: 1e6,
|
|
272
276
|
[CLAUDE_HAIKU_4_5_BEDROCK_MODEL]: 2e5,
|
|
@@ -282,13 +286,15 @@ function getClaudeModelContextWindow(model) {
|
|
|
282
286
|
return CLAUDE_MODEL_CONTEXT_WINDOWS[normalized] ?? CLAUDE_MODEL_CONTEXT_WINDOWS[model] ?? null;
|
|
283
287
|
}
|
|
284
288
|
function canUseClaudeFastMode(model) {
|
|
285
|
-
|
|
289
|
+
const normalized = normalizeClaudeModel(model);
|
|
290
|
+
return normalized === CLAUDE_OPUS_5_MODEL || normalized === CLAUDE_OPUS_4_8_MODEL || model === "claude-opus-4-7";
|
|
286
291
|
}
|
|
287
292
|
var AGENT_MODELS = {
|
|
288
293
|
claude: [CLAUDE_FABLE_5_MODEL, DEFAULT_CLAUDE_MODEL, CLAUDE_SONNET_5_MODEL, CLAUDE_HAIKU_4_5_MODEL],
|
|
289
294
|
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"],
|
|
290
295
|
cursor: [
|
|
291
296
|
CLAUDE_FABLE_5_MODEL,
|
|
297
|
+
CLAUDE_OPUS_5_MODEL,
|
|
292
298
|
CLAUDE_OPUS_4_8_MODEL,
|
|
293
299
|
GPT_5_6_SOL_MODEL,
|
|
294
300
|
GPT_5_6_TERRA_MODEL,
|
|
@@ -323,7 +329,8 @@ var MODEL_LABELS = {
|
|
|
323
329
|
[CLAUDE_FABLE_5_MODEL]: "Fable 5",
|
|
324
330
|
sonnet: "Sonnet 5",
|
|
325
331
|
"claude-sonnet-5": "Sonnet 5",
|
|
326
|
-
opus: "Opus
|
|
332
|
+
opus: "Opus 5",
|
|
333
|
+
[CLAUDE_OPUS_5_MODEL]: "Opus 5",
|
|
327
334
|
[CLAUDE_OPUS_1M_MODEL]: "Opus 4.8 (1M)",
|
|
328
335
|
[LEGACY_CLAUDE_OPUS_1M_MODEL]: "Opus 4.8 (1M)",
|
|
329
336
|
haiku: "Haiku 4.5",
|
|
@@ -602,7 +609,7 @@ var WORKSPACE_SIZES = ["small", "large"];
|
|
|
602
609
|
var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
|
|
603
610
|
|
|
604
611
|
// ../shared/src/e2b.ts
|
|
605
|
-
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-24-
|
|
612
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-24-v6";
|
|
606
613
|
|
|
607
614
|
// ../shared/src/runtime-env.ts
|
|
608
615
|
function shellQuotePosix(value) {
|
|
@@ -865,7 +872,7 @@ replicas computer browser-state /tmp/after-click.png
|
|
|
865
872
|
replicas computer record start /tmp/demo.mp4 --fps 60
|
|
866
873
|
# ... do stuff ...
|
|
867
874
|
replicas computer record stop
|
|
868
|
-
replicas media upload /tmp/demo.mp4
|
|
875
|
+
replicas media upload /tmp/demo.mp4 --name "Demo recording"
|
|
869
876
|
\`\`\`
|
|
870
877
|
|
|
871
878
|
## Command reference
|
|
@@ -955,7 +962,7 @@ Starts an ffmpeg screen recorder and returns only after ffmpeg has written the f
|
|
|
955
962
|
Only one recording at a time. Re-running \`start\` while one is active fails - call \`stop\` first.
|
|
956
963
|
|
|
957
964
|
### \`replicas computer record stop\`
|
|
958
|
-
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
|
|
965
|
+
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.
|
|
959
966
|
|
|
960
967
|
## Patterns
|
|
961
968
|
|
|
@@ -1000,7 +1007,7 @@ For tasks the user wants proof of:
|
|
|
1000
1007
|
replicas computer record start /tmp/walkthrough.mp4
|
|
1001
1008
|
# ... your work ...
|
|
1002
1009
|
replicas computer record stop
|
|
1003
|
-
replicas media upload /tmp/walkthrough.mp4
|
|
1010
|
+
replicas media upload /tmp/walkthrough.mp4 --name "Walkthrough recording"
|
|
1004
1011
|
\`\`\`
|
|
1005
1012
|
Then embed the printed \`\` line in your chat reply. See \`MEDIA.md\`.
|
|
1006
1013
|
|
|
@@ -1201,7 +1208,7 @@ gh pr review 123 --request-changes --body "Changes needed"
|
|
|
1201
1208
|
GitHub does NOT have a public API for uploading images to PRs/issues. When you need to include images:
|
|
1202
1209
|
- Do NOT use placeholder image URLs
|
|
1203
1210
|
- Do NOT commit screenshots as files to the repository
|
|
1204
|
-
- Run \`replicas media upload <image> --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
1211
|
+
- Run \`replicas media upload <image> --name "<display name>" --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
1205
1212
|
- 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
|
|
1206
1213
|
- 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
|
|
1207
1214
|
- If you were triggered from Slack, also upload the image to the Slack thread so the user can see it directly
|
|
@@ -1782,10 +1789,26 @@ If none of these apply, don't upload.
|
|
|
1782
1789
|
## Uploading to Replicas
|
|
1783
1790
|
|
|
1784
1791
|
\`\`\`bash
|
|
1785
|
-
replicas media upload <path-to-file> [<path-to-file> ...]
|
|
1792
|
+
replicas media upload <path-to-file> --name "<display name>" [<path-to-file> --name "<display name>" ...]
|
|
1786
1793
|
\`\`\`
|
|
1787
1794
|
|
|
1788
|
-
Pass one or more file paths. Uploading several files in a single invocation is preferred over running the command repeatedly
|
|
1795
|
+
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.
|
|
1796
|
+
|
|
1797
|
+
### Name each upload
|
|
1798
|
+
|
|
1799
|
+
\`--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\`.
|
|
1800
|
+
|
|
1801
|
+
\`\`\`bash
|
|
1802
|
+
replicas media upload /tmp/shot.png --name "Login page after fix"
|
|
1803
|
+
\`\`\`
|
|
1804
|
+
|
|
1805
|
+
Pass one \`--name\` per file, in the same order as the file paths:
|
|
1806
|
+
|
|
1807
|
+
\`\`\`bash
|
|
1808
|
+
replicas media upload /tmp/before.png /tmp/after.png --name "Before fix" --name "After fix"
|
|
1809
|
+
\`\`\`
|
|
1810
|
+
|
|
1811
|
+
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.
|
|
1789
1812
|
|
|
1790
1813
|
For each file, the CLI prints two lines:
|
|
1791
1814
|
|
|
@@ -1797,7 +1820,7 @@ Match each "View in Replicas" line to the embed line directly above it \u2014 th
|
|
|
1797
1820
|
Pass \`--share\` only when the media must render on an external forge:
|
|
1798
1821
|
|
|
1799
1822
|
\`\`\`bash
|
|
1800
|
-
replicas media upload screenshot.png --share
|
|
1823
|
+
replicas media upload screenshot.png --name "Login page" --share
|
|
1801
1824
|
\`\`\`
|
|
1802
1825
|
|
|
1803
1826
|
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.
|
|
@@ -1967,7 +1990,7 @@ Never paste the \`api.tryreplicas.com/v1/media/<id>\` URL into a Linear body or
|
|
|
1967
1990
|
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:
|
|
1968
1991
|
|
|
1969
1992
|
\`\`\`bash
|
|
1970
|
-
replicas media upload /tmp/screenshot.png --share
|
|
1993
|
+
replicas media upload /tmp/screenshot.png --name "PR screenshot" --share
|
|
1971
1994
|
\`\`\`
|
|
1972
1995
|
|
|
1973
1996
|
GitHub does not reliably render arbitrary external videos as inline players. For a recording:
|
|
@@ -2021,13 +2044,14 @@ Auto-detected from the filename extension:
|
|
|
2021
2044
|
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:
|
|
2022
2045
|
|
|
2023
2046
|
\`\`\`bash
|
|
2024
|
-
replicas media upload diagram.svg --kind image
|
|
2025
|
-
replicas media upload chart-a.svg chart-b.svg --kind image
|
|
2047
|
+
replicas media upload diagram.svg --name "Architecture diagram" --kind image
|
|
2048
|
+
replicas media upload chart-a.svg chart-b.svg --name "Latency chart" --name "Error rate chart" --kind image
|
|
2026
2049
|
\`\`\`
|
|
2027
2050
|
|
|
2028
2051
|
## Options
|
|
2029
2052
|
|
|
2030
2053
|
- \`--kind <image|video|audio>\` \u2014 override auto-detection
|
|
2054
|
+
- \`--name <name>\`: required display name shown in the dashboard, one per file in order
|
|
2031
2055
|
- \`--session-id <id>\` \u2014 associate the upload with a specific session
|
|
2032
2056
|
- \`--share\`: create a revocable public bearer URL for a forge image embed
|
|
2033
2057
|
`;
|
|
@@ -8631,6 +8655,8 @@ function toClaudeCodeModel(model) {
|
|
|
8631
8655
|
switch (normalizeClaudeModel(model)) {
|
|
8632
8656
|
case CLAUDE_FABLE_5_MODEL:
|
|
8633
8657
|
return CLAUDE_FABLE_5_BEDROCK_MODEL;
|
|
8658
|
+
case CLAUDE_OPUS_5_MODEL:
|
|
8659
|
+
return CLAUDE_OPUS_5_BEDROCK_MODEL;
|
|
8634
8660
|
case CLAUDE_OPUS_4_8_MODEL:
|
|
8635
8661
|
return "opus";
|
|
8636
8662
|
case CLAUDE_SONNET_5_MODEL:
|
|
@@ -9908,7 +9934,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
|
9908
9934
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
9909
9935
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
9910
9936
|
var codexCliVersionEnsured = null;
|
|
9911
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
9937
|
+
var ENGINE_PACKAGE_VERSION = "0.1.498";
|
|
9912
9938
|
var INITIALIZE_METHOD = "initialize";
|
|
9913
9939
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
9914
9940
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -13889,7 +13915,7 @@ function getEnvironmentSection() {
|
|
|
13889
13915
|
`Platform: ${process.platform}`,
|
|
13890
13916
|
getShellInfoLine(),
|
|
13891
13917
|
`OS Version: ${unameSR}`,
|
|
13892
|
-
`The most recent Claude
|
|
13918
|
+
`The most recent Claude models are the Claude 5 family and Opus 5. Model IDs \u2014 Fable 5: 'claude-fable-5', Opus 5: 'claude-opus-5', Sonnet 5: 'claude-sonnet-5', Haiku 4.5: 'claude-haiku-4-5-20251001'. When building AI applications, default to the latest and most capable Claude models.`
|
|
13893
13919
|
];
|
|
13894
13920
|
return [
|
|
13895
13921
|
`# Environment`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "replicas-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.498",
|
|
4
4
|
"description": "Lightweight API server for Replicas workspaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"author": "Replicas",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
34
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.219",
|
|
35
35
|
"@connectrpc/connect-node": "1.7.0",
|
|
36
36
|
"@cursor/sdk": "1.0.19",
|
|
37
37
|
"@hono/node-server": "^1.19.5",
|