replicas-engine 0.1.680 → 0.1.682
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.
|
@@ -366,7 +366,9 @@ var FALLBACK_AGENT_MODEL = {
|
|
|
366
366
|
relay: DEFAULT_CLAUDE_MODEL
|
|
367
367
|
};
|
|
368
368
|
function getDefaultAgentModel(provider, overrides) {
|
|
369
|
-
|
|
369
|
+
const fallback = FALLBACK_AGENT_MODEL[provider];
|
|
370
|
+
const options = getAgentModelOptions(provider, overrides);
|
|
371
|
+
return options.includes(fallback) ? fallback : options[0];
|
|
370
372
|
}
|
|
371
373
|
function normalizeClaudeModel(model) {
|
|
372
374
|
if (model === "opus" || model === CLAUDE_OPUS_1M_MODEL || model === LEGACY_CLAUDE_OPUS_1M_MODEL) {
|
|
@@ -454,6 +456,10 @@ var AGENT_MODELS = {
|
|
|
454
456
|
pi: [...OPENROUTER_MODELS, ...ASTER_MODELS],
|
|
455
457
|
relay: [CLAUDE_FABLE_5_MODEL, CLAUDE_OPUS_5_MODEL, CLAUDE_OPUS_4_8_MODEL, CLAUDE_SONNET_5_MODEL]
|
|
456
458
|
};
|
|
459
|
+
function getAgentModelOptions(provider, overrides) {
|
|
460
|
+
const override = overrides?.[provider];
|
|
461
|
+
return override?.length ? override : AGENT_MODELS[provider];
|
|
462
|
+
}
|
|
457
463
|
var MODEL_LABELS = {
|
|
458
464
|
fable: "Fable 5",
|
|
459
465
|
[CLAUDE_FABLE_5_MODEL]: "Fable 5",
|
|
@@ -1626,7 +1632,7 @@ For any external destination, continue with the required delivery flow in \`MEDI
|
|
|
1626
1632
|
## Command reference
|
|
1627
1633
|
|
|
1628
1634
|
### \`replicas computer info\`
|
|
1629
|
-
Prints the live desktop viewer URL (\`https://6080-<hash>.
|
|
1635
|
+
Prints the live desktop viewer URL (\`https://6080-<hash>.replicas.dev/\`). The engine auto-registers this authenticated preview on startup; \`info\` just looks it up. Use it when you want to share the live stream URL with the user out-of-band (e.g. in a Slack reply) - the dashboard \`Desktop\` tab already points at the same URL automatically.
|
|
1630
1636
|
|
|
1631
1637
|
If invoked very early in the workspace lifecycle, \`info\` will poll briefly while the engine finishes registering the preview, then error if it's still not available.
|
|
1632
1638
|
|
|
@@ -2174,7 +2180,7 @@ Names are normalized to hyphen-case (spaces become hyphens, e.g. \`Login page\`
|
|
|
2174
2180
|
For each media file, the CLI prints two lines:
|
|
2175
2181
|
|
|
2176
2182
|
1. \`\` \u2014 the chat embed (renders inline in Replicas chat **only** \u2014 see below).
|
|
2177
|
-
2. \`View in Replicas: <deep-link>\` \u2014 a per-file dashboard URL of the form \`https://
|
|
2183
|
+
2. \`View in Replicas: <deep-link>\` \u2014 a per-file dashboard URL of the form \`https://replicas.dev/workspaces/<workspace-id>?media=<media-id>\` that opens directly to that specific file.
|
|
2178
2184
|
|
|
2179
2185
|
Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
|
|
2180
2186
|
|
|
@@ -2200,14 +2206,14 @@ replicas media upload screenshot.png --name "Login page" --access public
|
|
|
2200
2206
|
|
|
2201
2207
|
| URL | What it is | Where it's allowed |
|
|
2202
2208
|
|---|---|---|
|
|
2203
|
-
| \`https://api.
|
|
2204
|
-
| \`https://
|
|
2205
|
-
| \`https://api.
|
|
2206
|
-
| \`https://
|
|
2209
|
+
| \`https://api.replicas.dev/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. |
|
|
2210
|
+
| \`https://replicas.dev/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. |
|
|
2211
|
+
| \`https://api.replicas.dev/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | GitHub embeds for image, video, or audio media. |
|
|
2212
|
+
| \`https://replicas.dev/workspaces/<workspace-id>?media=<media-id>\` | Authenticated dashboard deep link that opens the media file in the workspace | Everywhere external: Slack, GitHub, GitLab, Linear, PR bodies, comments, emails. |
|
|
2207
2213
|
|
|
2208
2214
|
### NEVER link the API redirect URL outside the Replicas chat reply
|
|
2209
2215
|
|
|
2210
|
-
The \`api.
|
|
2216
|
+
The \`api.replicas.dev/v1/media/<id>\` URL is **not public**. It's an authenticated redirect that only resolves to a presigned download when the Replicas chat session token is present. Anywhere else (Slack, Linear, GitHub, a browser tab the user opens directly, a customer copy-pasting from chat) it returns \`{"error":"Missing authorization token"}\` and renders as a broken image.
|
|
2211
2217
|
|
|
2212
2218
|
This rule has no exceptions:
|
|
2213
2219
|
- \u274C Never paste it in a Slack message \u2014 upload the actual bytes via the 3-step \`files.getUploadURLExternal\` \u2192 POST bytes \u2192 \`files.completeUploadExternal\` flow instead (see below).
|
|
@@ -2222,7 +2228,7 @@ This rule has no exceptions:
|
|
|
2222
2228
|
For an organization-only HTML page, use the \`Forge link\` printed by \`--access organization\`. For other authenticated media references, use the dashboard form:
|
|
2223
2229
|
|
|
2224
2230
|
\`\`\`
|
|
2225
|
-
https://
|
|
2231
|
+
https://replicas.dev/workspaces/<workspace-id>?media=<media-id>
|
|
2226
2232
|
\`\`\`
|
|
2227
2233
|
|
|
2228
2234
|
The \`media=<media-id>\` query param opens that specific file in the workspace.
|
|
@@ -2250,7 +2256,7 @@ Slack, Linear, and GitLab receive the original bytes through their native upload
|
|
|
2250
2256
|
|
|
2251
2257
|
### Slack \u2014 embed natively via the 3-step external file upload flow
|
|
2252
2258
|
|
|
2253
|
-
A Slack message that just contains a \`
|
|
2259
|
+
A Slack message that just contains a \`replicas.dev\` link is not acceptable when the message is supposed to show an image. The recipient should see the image inline in the thread.
|
|
2254
2260
|
|
|
2255
2261
|
Slack deprecated the single-shot \`files.upload\` endpoint. The raw HTTP replacement is a 3-step flow: reserve an upload URL with \`files.getUploadURLExternal\`, POST the bytes to it, then share into the channel/thread with \`files.completeUploadExternal\`. (\`files.uploadV2\` is **only** an SDK convenience wrapper \u2014 it is NOT a real Web API HTTP endpoint and \`POST https://slack.com/api/files.uploadV2\` will return \`unknown_method\`.)
|
|
2256
2262
|
|
|
@@ -2282,7 +2288,7 @@ curl -s -X POST "https://slack.com/api/files.completeUploadExternal" \\
|
|
|
2282
2288
|
\\"files\\": [{\\"id\\": \\"$FILE_ID\\", \\"title\\": \\"Screenshot\\"}],
|
|
2283
2289
|
\\"channel_id\\": \\"CHANNEL_ID\\",
|
|
2284
2290
|
\\"thread_ts\\": \\"THREAD_TS\\",
|
|
2285
|
-
\\"initial_comment\\": \\"<https://
|
|
2291
|
+
\\"initial_comment\\": \\"<https://replicas.dev/workspaces/<workspace-id>?media=<media-id>|View in Replicas>\\"
|
|
2286
2292
|
}"
|
|
2287
2293
|
\`\`\`
|
|
2288
2294
|
|
|
@@ -2293,7 +2299,7 @@ Notes:
|
|
|
2293
2299
|
- For multiple files in the same message, run steps 1\u20132 per file and pass all \`{id, title}\` objects in the \`files\` array of a single \`files.completeUploadExternal\` call \u2014 they share into the thread together.
|
|
2294
2300
|
- If you also need to post a separate text reply in the thread, send it with \`chat.postMessage\` after the upload \u2014 but the upload itself must carry the image.
|
|
2295
2301
|
|
|
2296
|
-
Never paste the \`api.
|
|
2302
|
+
Never paste the \`api.replicas.dev/v1/media/<id>\` URL into a Slack message body or \`initial_comment\` \u2014 it will render as a broken image attempt.
|
|
2297
2303
|
|
|
2298
2304
|
### Linear \u2014 embed natively via the GraphQL \`fileUpload\` mutation
|
|
2299
2305
|
|
|
@@ -2342,7 +2348,7 @@ curl -s -X PUT "$UPLOAD_URL" \\
|
|
|
2342
2348
|
--data-binary @"$FILE"
|
|
2343
2349
|
|
|
2344
2350
|
# 3. Reference assetUrl inline in the comment body, alongside the dashboard link.
|
|
2345
|
-
BODY=$(printf '\\n\\n[View in Replicas](https://
|
|
2351
|
+
BODY=$(printf '\\n\\n[View in Replicas](https://replicas.dev/workspaces/%s?media=%s)' \\
|
|
2346
2352
|
"$ASSET_URL" "$REPLICAS_WORKSPACE_ID" "$MEDIA_ID")
|
|
2347
2353
|
|
|
2348
2354
|
jq -n \\
|
|
@@ -2356,7 +2362,7 @@ jq -n \\
|
|
|
2356
2362
|
|
|
2357
2363
|
The same flow works for issue bodies (use \`issueCreate\` / \`issueUpdate\` with the same markdown body).
|
|
2358
2364
|
|
|
2359
|
-
Never paste the \`api.
|
|
2365
|
+
Never paste the \`api.replicas.dev/v1/media/<id>\` URL into a Linear body or comment \u2014 it will render as a broken image to anyone outside your Replicas chat.
|
|
2360
2366
|
|
|
2361
2367
|
### GitHub: inline screenshots and recording previews
|
|
2362
2368
|
|
|
@@ -6698,7 +6704,7 @@ var DEFAULT_CODEX_ARGS = [
|
|
|
6698
6704
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
6699
6705
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
6700
6706
|
var codexCliVersionEnsured = null;
|
|
6701
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
6707
|
+
var ENGINE_PACKAGE_VERSION = "0.1.682";
|
|
6702
6708
|
var INITIALIZE_METHOD = "initialize";
|
|
6703
6709
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
6704
6710
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
package/dist/src/index.js
CHANGED