replicas-engine 0.1.581 → 0.1.583
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 +41 -22
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -1434,6 +1434,7 @@ GitHub does NOT have a public API for uploading images to PRs/issues. When you n
|
|
|
1434
1434
|
- Do NOT use placeholder image URLs
|
|
1435
1435
|
- Do NOT commit screenshots as files to the repository
|
|
1436
1436
|
- Run \`replicas media upload <image> --name "<display name>" --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
1437
|
+
- 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
|
|
1437
1438
|
- 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
|
|
1438
1439
|
- 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
|
|
1439
1440
|
- If you were triggered from Slack, also upload the image to the Slack thread so the user can see it directly
|
|
@@ -2035,17 +2036,18 @@ var LINEAR_ABILITY = {
|
|
|
2035
2036
|
|
|
2036
2037
|
// ../shared/src/default-skills/replicas-agent/abilities/media.ts
|
|
2037
2038
|
var SECTION8 = `### Media
|
|
2038
|
-
Share screenshots, screen recordings, generated diagrams,
|
|
2039
|
+
Share screenshots, screen recordings, generated diagrams, audio clips, and self-contained HTML pages through Replicas and external messages.
|
|
2039
2040
|
|
|
2040
2041
|
**Reference:** \`references/MEDIA.md\`
|
|
2041
2042
|
|
|
2042
2043
|
Use this when:
|
|
2043
2044
|
- You produce a screenshot, recording, generated image, or audio clip the user should see
|
|
2045
|
+
- You produce a self-contained HTML report that should be linked from a pull request
|
|
2044
2046
|
- You record video output (browser automation, screen capture) \u2014 including the recommended aspect ratio and FPS
|
|
2045
2047
|
- You need to embed media in a Slack/Linear/GitHub message AND keep a referenceable copy in the Replicas dashboard`;
|
|
2046
|
-
var REFERENCE8 = `# Media (Screenshots, Recordings, Audio)
|
|
2048
|
+
var REFERENCE8 = `# Media (Screenshots, Recordings, Audio, HTML)
|
|
2047
2049
|
|
|
2048
|
-
This guide covers how to share screenshots, screen recordings, generated diagrams,
|
|
2050
|
+
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).
|
|
2049
2051
|
|
|
2050
2052
|
## Prerequisites
|
|
2051
2053
|
|
|
@@ -2056,7 +2058,7 @@ The \`replicas\` CLI is pre-installed and authenticated in your workspace. No ad
|
|
|
2056
2058
|
Upload to Replicas in these cases \u2014 and **only** these cases:
|
|
2057
2059
|
|
|
2058
2060
|
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.
|
|
2059
|
-
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.
|
|
2061
|
+
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.
|
|
2060
2062
|
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.
|
|
2061
2063
|
|
|
2062
2064
|
If none of these apply, don't upload.
|
|
@@ -2085,28 +2087,39 @@ replicas media upload /tmp/before.png /tmp/after.png --name "Before fix" --name
|
|
|
2085
2087
|
|
|
2086
2088
|
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.
|
|
2087
2089
|
|
|
2088
|
-
For each file, the CLI prints two lines:
|
|
2090
|
+
For each media file, the CLI prints two lines:
|
|
2089
2091
|
|
|
2090
2092
|
1. \`\` \u2014 the chat embed (renders inline in Replicas chat **only** \u2014 see below).
|
|
2091
2093
|
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.
|
|
2092
2094
|
|
|
2093
2095
|
Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
|
|
2094
2096
|
|
|
2095
|
-
|
|
2097
|
+
HTML uploads print an \`HTML page\` Markdown link instead of an image embed.
|
|
2098
|
+
|
|
2099
|
+
For an HTML page that should stay inside the Replicas organization, create an authenticated link:
|
|
2096
2100
|
|
|
2097
2101
|
\`\`\`bash
|
|
2098
|
-
replicas media upload
|
|
2102
|
+
replicas media upload recap.html --name "Visual recap" --access organization
|
|
2099
2103
|
\`\`\`
|
|
2100
2104
|
|
|
2101
|
-
|
|
2105
|
+
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.
|
|
2106
|
+
|
|
2107
|
+
Use public access only when the media must render without Replicas authentication:
|
|
2102
2108
|
|
|
2103
|
-
|
|
2109
|
+
\`\`\`bash
|
|
2110
|
+
replicas media upload screenshot.png --name "Login page" --access public
|
|
2111
|
+
\`\`\`
|
|
2112
|
+
|
|
2113
|
+
\`--share\` remains an alias for \`--access public\`. Public access prints an additional \`Forge 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.
|
|
2114
|
+
|
|
2115
|
+
## The URLs the CLI gives you \u2014 and where each one is allowed
|
|
2104
2116
|
|
|
2105
2117
|
| URL | What it is | Where it's allowed |
|
|
2106
2118
|
|---|---|---|
|
|
2107
2119
|
| \`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. |
|
|
2108
|
-
| \`https://
|
|
2109
|
-
| \`https://tryreplicas.com/
|
|
2120
|
+
| \`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. |
|
|
2121
|
+
| \`https://api.tryreplicas.com/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | GitHub embeds for image, video, or audio media. |
|
|
2122
|
+
| \`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. |
|
|
2110
2123
|
|
|
2111
2124
|
### NEVER link the API redirect URL outside the Replicas chat reply
|
|
2112
2125
|
|
|
@@ -2119,9 +2132,9 @@ This rule has no exceptions:
|
|
|
2119
2132
|
- \u274C Never link to it from any external doc, email, or external chat.
|
|
2120
2133
|
- \u274C Never include it as a "backup link" in case the dashboard link breaks \u2014 it will always break externally.
|
|
2121
2134
|
|
|
2122
|
-
### ALWAYS link
|
|
2135
|
+
### ALWAYS link a Replicas web URL \u2014 never the authenticated API URL \u2014 when referencing media externally
|
|
2123
2136
|
|
|
2124
|
-
|
|
2137
|
+
For an organization-only HTML page, use the \`Forge link\` printed by \`--access organization\`. For other authenticated media references, use the dashboard form:
|
|
2125
2138
|
|
|
2126
2139
|
\`\`\`
|
|
2127
2140
|
https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>
|
|
@@ -2135,7 +2148,7 @@ Always render as a markdown / mrkdwn hyperlink labeled **View in Replicas** \u20
|
|
|
2135
2148
|
|
|
2136
2149
|
## In your Replicas chat reply
|
|
2137
2150
|
|
|
2138
|
-
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.
|
|
2151
|
+
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.
|
|
2139
2152
|
|
|
2140
2153
|
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.
|
|
2141
2154
|
|
|
@@ -2281,6 +2294,8 @@ GitHub does not reliably render arbitrary external videos as inline players. For
|
|
|
2281
2294
|
|
|
2282
2295
|
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.
|
|
2283
2296
|
|
|
2297
|
+
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. HTML pages cannot be shared publicly.
|
|
2298
|
+
|
|
2284
2299
|
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.
|
|
2285
2300
|
|
|
2286
2301
|
### GitLab: native inline screenshots and videos
|
|
@@ -2315,8 +2330,9 @@ Auto-detected from the filename extension:
|
|
|
2315
2330
|
| \`png\`, \`jpg\`, \`jpeg\`, \`webp\` | image |
|
|
2316
2331
|
| \`mp4\`, \`webm\` | video |
|
|
2317
2332
|
| \`mp3\`, \`wav\` | audio |
|
|
2333
|
+
| \`html\`, \`htm\` | html |
|
|
2318
2334
|
|
|
2319
|
-
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:
|
|
2335
|
+
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:
|
|
2320
2336
|
|
|
2321
2337
|
\`\`\`bash
|
|
2322
2338
|
replicas media upload diagram.svg --name "Architecture diagram" --kind image
|
|
@@ -2325,15 +2341,16 @@ replicas media upload chart-a.svg chart-b.svg --name "Latency chart" --name "Err
|
|
|
2325
2341
|
|
|
2326
2342
|
## Options
|
|
2327
2343
|
|
|
2328
|
-
- \`--kind <image|video|audio>\` \u2014 override auto-detection
|
|
2344
|
+
- \`--kind <image|video|audio|html>\` \u2014 override auto-detection
|
|
2329
2345
|
- \`--name <name>\`: required display name shown in the dashboard, one per file in order
|
|
2330
2346
|
- \`--session-id <id>\` \u2014 associate the upload with a specific session
|
|
2331
|
-
- \`--
|
|
2347
|
+
- \`--access organization|public\`: create an organization-only link, or a public bearer URL for non-HTML media
|
|
2348
|
+
- \`--share\`: alias for \`--access public\`; not supported for HTML
|
|
2332
2349
|
`;
|
|
2333
2350
|
var MEDIA_ABILITY = {
|
|
2334
2351
|
label: "Media",
|
|
2335
|
-
description: "Share screenshots, recordings, generated images, and
|
|
2336
|
-
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",
|
|
2352
|
+
description: "Share screenshots, recordings, generated images, audio clips, and HTML pages.",
|
|
2353
|
+
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",
|
|
2337
2354
|
section: SECTION8,
|
|
2338
2355
|
referenceFile: { name: "MEDIA.md", content: REFERENCE8 }
|
|
2339
2356
|
};
|
|
@@ -5567,9 +5584,11 @@ var EMAIL_TEMPLATE_KEYS = [...EMAIL_KEYS, ...MANUAL_EMAIL_TEMPLATE_KEYS];
|
|
|
5567
5584
|
var MEDIA_KIND = {
|
|
5568
5585
|
IMAGE: "image",
|
|
5569
5586
|
VIDEO: "video",
|
|
5570
|
-
AUDIO: "audio"
|
|
5587
|
+
AUDIO: "audio",
|
|
5588
|
+
HTML: "html"
|
|
5571
5589
|
};
|
|
5572
|
-
var MEDIA_KINDS = [MEDIA_KIND.IMAGE, MEDIA_KIND.VIDEO, MEDIA_KIND.AUDIO];
|
|
5590
|
+
var MEDIA_KINDS = [MEDIA_KIND.IMAGE, MEDIA_KIND.VIDEO, MEDIA_KIND.AUDIO, MEDIA_KIND.HTML];
|
|
5591
|
+
var PUBLIC_MEDIA_KINDS = [MEDIA_KIND.IMAGE, MEDIA_KIND.VIDEO, MEDIA_KIND.AUDIO];
|
|
5573
5592
|
var MAX_ENGINE_LOG_BYTES = 50 * 1024 * 1024;
|
|
5574
5593
|
|
|
5575
5594
|
// ../shared/src/skill-registry.ts
|
|
@@ -10988,7 +11007,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
|
10988
11007
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
10989
11008
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
10990
11009
|
var codexCliVersionEnsured = null;
|
|
10991
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
11010
|
+
var ENGINE_PACKAGE_VERSION = "0.1.583";
|
|
10992
11011
|
var INITIALIZE_METHOD = "initialize";
|
|
10993
11012
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
10994
11013
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|