replicas-engine 0.1.679 → 0.1.680
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.
|
@@ -1621,6 +1621,8 @@ replicas computer record stop
|
|
|
1621
1621
|
replicas media upload /tmp/demo.mp4 --name "Demo recording"
|
|
1622
1622
|
\`\`\`
|
|
1623
1623
|
|
|
1624
|
+
For any external destination, continue with the required delivery flow in \`MEDIA.md\`.
|
|
1625
|
+
|
|
1624
1626
|
## Command reference
|
|
1625
1627
|
|
|
1626
1628
|
### \`replicas computer info\`
|
|
@@ -1755,7 +1757,7 @@ replicas computer record start /tmp/walkthrough.mp4
|
|
|
1755
1757
|
replicas computer record stop
|
|
1756
1758
|
replicas media upload /tmp/walkthrough.mp4 --name "Walkthrough recording"
|
|
1757
1759
|
\`\`\`
|
|
1758
|
-
Then embed the printed \`\` line in your chat reply
|
|
1760
|
+
Then embed the printed \`\` line in your chat reply and follow \`MEDIA.md\` for any external destination.
|
|
1759
1761
|
|
|
1760
1762
|
## Failure modes
|
|
1761
1763
|
|
|
@@ -1955,16 +1957,9 @@ gh pr review 123 --approve
|
|
|
1955
1957
|
gh pr review 123 --request-changes --body "Changes needed"
|
|
1956
1958
|
\`\`\`
|
|
1957
1959
|
|
|
1958
|
-
##
|
|
1960
|
+
## Media in GitHub workflows
|
|
1959
1961
|
|
|
1960
|
-
GitHub
|
|
1961
|
-
- Do NOT use placeholder image URLs
|
|
1962
|
-
- Do NOT commit screenshots as files to the repository
|
|
1963
|
-
- Run \`replicas media upload <image> --name "<display name>" --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
1964
|
-
- 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
|
|
1965
|
-
- 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
|
|
1966
|
-
- 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
|
|
1967
|
-
- If you were triggered from Slack, also upload the image to the Slack thread so the user can see it directly
|
|
1962
|
+
Media delivery is owned by \`references/MEDIA.md\`. Read its GitHub section before adding screenshots, recordings, diagrams, or HTML reports to a pull request, issue, review comment, or commit; it covers the Replicas upload, GitHub's inline fallback, and the required **View in Replicas** link.
|
|
1968
1963
|
`;
|
|
1969
1964
|
var GITHUB_ABILITY = {
|
|
1970
1965
|
label: "GitHub",
|
|
@@ -2026,7 +2021,7 @@ await replicas.gitlab.request('/projects/group%2Frepo/pipelines', {
|
|
|
2026
2021
|
|
|
2027
2022
|
## Descriptions and media
|
|
2028
2023
|
|
|
2029
|
-
API updates replace the entire merge request description, so always preserve the required Replicas footer and co-author trailers.
|
|
2024
|
+
API updates replace the entire merge request description, so always preserve the required Replicas footer and co-author trailers. Media delivery is owned by \`references/MEDIA.md\`; read its GitLab section before adding media so the original bytes are uploaded to Replicas and GitLab and the dashboard link remains secondary.
|
|
2030
2025
|
`;
|
|
2031
2026
|
var GITLAB_ABILITY = {
|
|
2032
2027
|
label: "GitLab",
|
|
@@ -2091,6 +2086,8 @@ await replicas.linear.graphql({
|
|
|
2091
2086
|
\`\`\`
|
|
2092
2087
|
|
|
2093
2088
|
Search with \`containsIgnoreCase: $query\` filters, for example on both \`title\` and \`description\`. Batch independent queries with \`Promise.all\` to save round trips.
|
|
2089
|
+
|
|
2090
|
+
For screenshots, recordings, diagrams, or other media, read \`references/MEDIA.md\` before adding it to an issue or comment. It is the single source of truth for uploading the Replicas copy and the raw file to Linear; a dashboard link alone is not an inline attachment.
|
|
2094
2091
|
`;
|
|
2095
2092
|
var LINEAR_ABILITY = {
|
|
2096
2093
|
label: "Linear",
|
|
@@ -2102,18 +2099,19 @@ var LINEAR_ABILITY = {
|
|
|
2102
2099
|
|
|
2103
2100
|
// ../shared/src/default-skills/replicas-agent/abilities/media.ts
|
|
2104
2101
|
var SECTION6 = `### Media
|
|
2105
|
-
|
|
2102
|
+
Deliver screenshots, screen recordings, generated diagrams, audio clips, and self-contained HTML pages to the Replicas dashboard and, when applicable, inline in the destination workflow.
|
|
2106
2103
|
|
|
2107
2104
|
**Reference:** \`references/MEDIA.md\`
|
|
2108
2105
|
|
|
2109
2106
|
Use this when:
|
|
2107
|
+
- You are about to run \`replicas media upload\`; this reference owns the complete Replicas-first, destination-second workflow
|
|
2110
2108
|
- You produce a screenshot, recording, generated image, or audio clip the user should see
|
|
2111
2109
|
- You produce a self-contained HTML report that should be linked from a pull request
|
|
2112
2110
|
- You record video output (browser automation, screen capture) \u2014 including the recommended aspect ratio and FPS
|
|
2113
|
-
- You need to embed media in a Slack/Linear/GitHub message AND keep a referenceable copy in the Replicas dashboard`;
|
|
2111
|
+
- You need to embed media in a Slack/Linear/GitHub/GitLab message AND keep a referenceable copy in the Replicas dashboard`;
|
|
2114
2112
|
var REFERENCE6 = `# Media (Screenshots, Recordings, Audio, HTML)
|
|
2115
2113
|
|
|
2116
|
-
This
|
|
2114
|
+
This is the single source of truth for delivering screenshots, screen recordings, generated diagrams, audio clips, and self-contained HTML pages through Replicas and external surfaces (Slack, Linear, GitHub, GitLab).
|
|
2117
2115
|
|
|
2118
2116
|
## Prerequisites
|
|
2119
2117
|
|
|
@@ -2123,12 +2121,32 @@ The \`replicas\` CLI is pre-installed and authenticated in your workspace. No ad
|
|
|
2123
2121
|
|
|
2124
2122
|
Upload to Replicas in these cases \u2014 and **only** these cases:
|
|
2125
2123
|
|
|
2126
|
-
1. **Media you produce.** Any screenshot, screen recording, generated diagram,
|
|
2124
|
+
1. **Media you produce.** Any screenshot, screen recording, generated diagram, audio clip, or HTML page 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, or GitLab.
|
|
2127
2125
|
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.
|
|
2128
|
-
3. **Anything you plan to share externally (Slack, Linear, GitHub, etc.).** Upload to Replicas *in addition to* the platform's
|
|
2126
|
+
3. **Anything you plan to share externally (Slack, Linear, GitHub, GitLab, etc.).** Upload to Replicas *in addition to* the platform's destination upload. Never as a replacement.
|
|
2129
2127
|
|
|
2130
2128
|
If none of these apply, don't upload.
|
|
2131
2129
|
|
|
2130
|
+
## Required delivery contract
|
|
2131
|
+
|
|
2132
|
+
\`replicas media upload\` is always the first delivery action. When the current task has an external destination, every other delivery step follows only after that command succeeds. For every file:
|
|
2133
|
+
|
|
2134
|
+
1. First, run \`replicas media upload\` with the original file. Do not begin any destination upload until the command succeeds. This creates the canonical dashboard copy and prints the authenticated chat embed plus a per-file dashboard link.
|
|
2135
|
+
2. Include the printed embed line in the Replicas chat reply, followed by the matching **View in Replicas** link. HTML uses its printed page link instead of an image embed.
|
|
2136
|
+
3. Identify every destination in the task and attempt to upload the same original bytes there. Use the destination's inline representation from the table below; do not replace the file with a Replicas link.
|
|
2137
|
+
4. Put the **View in Replicas** dashboard link next to the destination embed as a secondary link.
|
|
2138
|
+
5. Check each destination response. If a native upload is unavailable or fails, say so explicitly and keep the dashboard link; never claim that a link is an inline upload.
|
|
2139
|
+
|
|
2140
|
+
| Destination | Required file delivery | Inline result |
|
|
2141
|
+
|---|---|---|
|
|
2142
|
+
| Replicas dashboard/chat | \`replicas media upload\` | Printed \`\` line in chat |
|
|
2143
|
+
| Slack | \`files.getUploadURLExternal\` \u2192 raw-byte POST \u2192 \`files.completeUploadExternal\` | Uploaded file in the channel or thread |
|
|
2144
|
+
| Linear | \`fileUpload\` mutation \u2192 presigned upload \u2192 issue/comment mutation | Returned \`assetUrl\` in Markdown |
|
|
2145
|
+
| GitLab | Project \`/uploads\` endpoint with the original bytes | Returned GitLab Markdown |
|
|
2146
|
+
| GitHub | No supported attachment API; use a Replicas public forge share for the inline image or video poster | Printed Forge embed, linked to the recording when needed |
|
|
2147
|
+
|
|
2148
|
+
The dashboard link is the subtitle and jump-back path. It is never a substitute for the destination upload.
|
|
2149
|
+
|
|
2132
2150
|
## Uploading to Replicas
|
|
2133
2151
|
|
|
2134
2152
|
\`\`\`bash
|
|
@@ -2185,7 +2203,7 @@ replicas media upload screenshot.png --name "Login page" --access public
|
|
|
2185
2203
|
| \`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. |
|
|
2186
2204
|
| \`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. |
|
|
2187
2205
|
| \`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. |
|
|
2188
|
-
| \`https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>\` | Authenticated dashboard deep link that opens the media file in the workspace | Everywhere external
|
|
2206
|
+
| \`https://tryreplicas.com/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. |
|
|
2189
2207
|
|
|
2190
2208
|
### NEVER link the API redirect URL outside the Replicas chat reply
|
|
2191
2209
|
|
|
@@ -2195,6 +2213,7 @@ This rule has no exceptions:
|
|
|
2195
2213
|
- \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).
|
|
2196
2214
|
- \u274C Never paste it in a GitHub PR description, issue body, review comment, or commit message.
|
|
2197
2215
|
- \u274C Never paste it in a Linear issue body or comment \u2014 upload via Linear's \`fileUpload\` mutation instead (see below).
|
|
2216
|
+
- \u274C Never paste it in a GitLab merge request or issue; upload the original bytes through GitLab's project upload endpoint instead (see below).
|
|
2198
2217
|
- \u274C Never link to it from any external doc, email, or external chat.
|
|
2199
2218
|
- \u274C Never include it as a "backup link" in case the dashboard link breaks \u2014 it will always break externally.
|
|
2200
2219
|
|
|
@@ -2218,16 +2237,16 @@ Include each markdown embed line **verbatim** where you want that file to render
|
|
|
2218
2237
|
|
|
2219
2238
|
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.
|
|
2220
2239
|
|
|
2221
|
-
## On external platforms
|
|
2240
|
+
## On external platforms: embed the file AND link the dashboard
|
|
2222
2241
|
|
|
2223
|
-
|
|
2242
|
+
After \`replicas media upload\` succeeds, external delivery has two required follow-up steps for every file:
|
|
2224
2243
|
|
|
2225
|
-
1. **Upload the raw bytes
|
|
2244
|
+
1. **Upload the raw bytes through that platform's supported inline path** so the recipient sees the media embedded in the message itself.
|
|
2226
2245
|
2. **Link the Replicas dashboard deep link** (\`?media=<id>\` form) so the user can jump straight to the file in the workspace.
|
|
2227
2246
|
|
|
2228
|
-
A link alone is not enough.
|
|
2247
|
+
A link alone is not enough. An upload without the dashboard link is not enough. Do both.
|
|
2229
2248
|
|
|
2230
|
-
GitHub has no
|
|
2249
|
+
Slack, Linear, and GitLab receive the original bytes through their native upload APIs. GitHub has no supported attachment API, so use an explicit Replicas public share for screenshots and recording previews.
|
|
2231
2250
|
|
|
2232
2251
|
### Slack \u2014 embed natively via the 3-step external file upload flow
|
|
2233
2252
|
|
|
@@ -2358,7 +2377,7 @@ GitHub does not reliably render arbitrary external videos as inline players. For
|
|
|
2358
2377
|
[](<recording-dashboard-url>)
|
|
2359
2378
|
\`\`\`
|
|
2360
2379
|
|
|
2361
|
-
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
|
|
2380
|
+
Public forge shares are unauthenticated bearer capabilities. For private repositories, create one only when the user explicitly asked for inline PR media. Without that consent, keep the media private in Replicas and report that GitHub has no supported attachment API; do not publish a bearer share or pretend the dashboard link is an embed. Revoke with \`replicas media revoke <media-id>\` **only** when the user asks or the media should intentionally stop rendering; never as routine post-task cleanup, since revoking breaks every embed already posted on the PR.
|
|
2362
2381
|
|
|
2363
2382
|
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.
|
|
2364
2383
|
|
|
@@ -2366,7 +2385,7 @@ Do **not** commit screenshots to the repo, use placeholder URLs, expose the auth
|
|
|
2366
2385
|
|
|
2367
2386
|
### GitLab: native inline screenshots and videos
|
|
2368
2387
|
|
|
2369
|
-
GitLab supports native project Markdown uploads.
|
|
2388
|
+
GitLab supports native project Markdown uploads. For a GitLab destination, always upload the media to Replicas first, then POST the same original file to the repository's \`/projects/:id/uploads\` API using the workspace GitLab credential. Insert the returned \`markdown\` value into the merge request body or comment and include the Replicas dashboard link. Image uploads render inline; MP4, MOV, and WebM uploads render as inline video players.
|
|
2370
2389
|
|
|
2371
2390
|
Do not use a Replicas public forge share for GitLab when the native project upload succeeds; native uploads preserve project access controls.
|
|
2372
2391
|
|
|
@@ -2415,7 +2434,7 @@ replicas media upload chart-a.svg chart-b.svg --name "Latency chart" --name "Err
|
|
|
2415
2434
|
`;
|
|
2416
2435
|
var MEDIA_ABILITY = {
|
|
2417
2436
|
label: "Media",
|
|
2418
|
-
description: "
|
|
2437
|
+
description: "Deliver media to Replicas and destination workflows with inline uploads.",
|
|
2419
2438
|
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",
|
|
2420
2439
|
section: SECTION6,
|
|
2421
2440
|
referenceFile: { name: "MEDIA.md", content: REFERENCE6 }
|
|
@@ -2697,7 +2716,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
|
|
|
2697
2716
|
| \`replicas automation ...\` | Manage automations (cron + GitHub/GitLab event triggers) |
|
|
2698
2717
|
| \`replicas preview ...\` | Register / list preview URLs (covered in \`PREVIEWS.md\`) |
|
|
2699
2718
|
| \`replicas service ...\` | Run long-lived services detached so they survive workspace sleep/wake (see below) |
|
|
2700
|
-
| \`replicas media ...\` | Upload
|
|
2719
|
+
| \`replicas media ...\` | Upload media to the dashboard and follow \`MEDIA.md\` for destination embedding |
|
|
2701
2720
|
| \`replicas slack thread ...\` | Attach or switch Slack thread routing (covered in \`SLACK.md\`) |
|
|
2702
2721
|
|
|
2703
2722
|
\`replicas <command> --help\` is always the source of truth for flags.
|
|
@@ -2991,6 +3010,8 @@ await replicas.slack.call('chat.postMessage', {
|
|
|
2991
3010
|
|
|
2992
3011
|
Only the announcing message gets the button \u2014 follow-ups about a pull request already linked in the thread keep the link in the text and drop the \`blocks\`. Use "View MR" for GitLab. With several links, give each button a unique \`action_id\` and name its repository in the label ("View PR \xB7 web").
|
|
2993
3012
|
|
|
3013
|
+
For screenshots, recordings, diagrams, or other media, read \`references/MEDIA.md\` before posting. It is the single source of truth for uploading the Replicas copy and the raw file to Slack; a dashboard link in \`text\` is not an inline attachment.
|
|
3014
|
+
|
|
2994
3015
|
Attach every new top-level conversation so future replies route to this workspace. For a reply in another thread, attach its root \`thread_ts\`, not the reply timestamp. Do not attach the originating thread again.
|
|
2995
3016
|
|
|
2996
3017
|
## Search and batch
|
|
@@ -6677,7 +6698,7 @@ var DEFAULT_CODEX_ARGS = [
|
|
|
6677
6698
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
6678
6699
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
6679
6700
|
var codexCliVersionEnsured = null;
|
|
6680
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
6701
|
+
var ENGINE_PACKAGE_VERSION = "0.1.680";
|
|
6681
6702
|
var INITIALIZE_METHOD = "initialize";
|
|
6682
6703
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
6683
6704
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
package/dist/src/index.js
CHANGED