replicas-cli 0.2.602 → 0.2.603

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.
Files changed (2) hide show
  1. package/dist/index.cjs +38 -14
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -23490,7 +23490,7 @@ If none of these apply, don't upload.
23490
23490
  | Slack | \`files.getUploadURLExternal\` \u2192 raw-byte POST \u2192 \`files.completeUploadExternal\` | Uploaded file in the channel or thread |
23491
23491
  | Linear | \`fileUpload\` mutation \u2192 presigned upload \u2192 issue/comment mutation | Returned \`assetUrl\` in Markdown |
23492
23492
  | GitLab | Project \`/uploads\` endpoint with the original bytes | Returned GitLab Markdown |
23493
- | 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 |
23493
+ | GitHub | \`gh\` v2.99.0+ \`--attach\` for images and videos; use a Replicas public forge share as the fallback | Native GitHub attachment URL, or a Forge embed fallback |
23494
23494
 
23495
23495
  The dashboard link is the subtitle and jump-back path. It is never a substitute for the destination upload.
23496
23496
 
@@ -23521,7 +23521,7 @@ Names are normalized to hyphen-case (spaces become hyphens, e.g. \`Login page\`
23521
23521
  For each media file, the CLI prints an embed line and a dashboard link:
23522
23522
 
23523
23523
  1. Default and organization access print \`Replicas chat embed: ![filename](<api-url>)\`; this authenticated URL renders inline in Replicas chat **only** \u2014 see below.
23524
- 2. Public access (\`--access public\` or \`--share\`) prints \`![filename](<public-url>)\` as the Forge embed instead. This is the public, stable bearer URL to paste into GitHub.
23524
+ 2. Public access (\`--access public\` or \`--share\`) prints \`![filename](<public-url>)\` as the Forge embed instead. This is the public, stable bearer URL for GitHub fallback embeds when native \`--attach\` is unavailable and sharing is authorized.
23525
23525
  3. \`View in Replicas: <deep-link>\` is a per-file dashboard URL of the form \`https://replicas.dev/workspaces/<workspace-id>?media=<media-id>\` that opens directly to that specific file.
23526
23526
 
23527
23527
  Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
@@ -23550,7 +23550,7 @@ replicas media upload screenshot.png --name "Login page" --access public
23550
23550
  |---|---|---|
23551
23551
  | \`https://api.replicas.dev/v1/media/<id>\` (inside \`![\u2026](\u2026)\`) | Authenticated API redirect to a presigned blob \u2014 requires the Replicas chat session | **Only** in the Replicas chat reply. Nowhere else. |
23552
23552
  | \`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. |
23553
- | \`https://api.replicas.dev/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | The Replicas chat reply and GitHub embeds, for image, video, or audio media. |
23553
+ | \`https://api.replicas.dev/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--access public\` or \`--share\` | The Replicas chat reply and GitHub fallback embeds, for image, video, or audio media. |
23554
23554
  | \`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. |
23555
23555
 
23556
23556
  ### NEVER link the API redirect URL outside the Replicas chat reply
@@ -23594,7 +23594,7 @@ After \`replicas media upload\` succeeds, external delivery has two required fol
23594
23594
 
23595
23595
  A link alone is not enough. An upload without the dashboard link is not enough. Do both.
23596
23596
 
23597
- 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.
23597
+ Slack, Linear, and GitLab receive the original bytes through their native upload APIs. GitHub image and video attachments use \`gh --attach\` when the installed CLI and host support it; use an explicit Replicas public share only as the fallback.
23598
23598
 
23599
23599
  ### Slack \u2014 embed natively via the 3-step external file upload flow
23600
23600
 
@@ -23706,26 +23706,50 @@ The same flow works for issue bodies (use \`issueCreate\` / \`issueUpdate\` with
23706
23706
 
23707
23707
  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.
23708
23708
 
23709
- ### GitHub: inline screenshots and recording previews
23709
+ ### GitHub: native image and video attachments
23710
23710
 
23711
- 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:
23711
+ GitHub CLI v2.99.0+ supports a repeatable \`--attach\` flag on \`gh pr create\`, \`gh pr edit\`, and \`gh pr comment\` for GitHub.com and GitHub Enterprise Cloud. It uploads local images and videos to GitHub and writes the resulting attachment URL into the PR body or comment; it requires push access to the repository. GitHub Enterprise Server and unsupported media kinds are not covered by this path. See [GitHub's attachment guide](https://docs.github.com/en/github-cli/github-cli/attaching-files-with-github-cli).
23712
+
23713
+ Check \`gh --version\` before choosing the delivery path. On a supported host with v2.99.0 or later:
23714
+
23715
+ 1. Run \`replicas media upload\` with the original file first, without \`--share\`. Keep the matching **View in Replicas** dashboard link for the PR.
23716
+ 2. Put each local file path in the Markdown body where the attachment should appear, and place its dashboard link next to it.
23717
+ 3. Pass the same original path once with \`--attach\`. GitHub CLI rewrites a matching local reference in place, preserving its alt text; an unreferenced attachment is appended to the body.
23718
+
23719
+ \`\`\`markdown
23720
+ Before the change:
23721
+
23722
+ ![Before state](/tmp/before.png)
23723
+ [View in Replicas](https://replicas.dev/workspaces/<workspace-id>?media=<before-media-id>)
23724
+ \`\`\`
23712
23725
 
23713
23726
  \`\`\`bash
23714
- replicas media upload /tmp/screenshot.png --name "PR screenshot" --share
23727
+ gh pr create \\
23728
+ --title "Describe the change" \\
23729
+ --body-file /tmp/pr-body.md \\
23730
+ --attach /tmp/before.png
23731
+
23732
+ gh pr edit 456 --body-file /tmp/pr-body.md --attach /tmp/after.png
23733
+ gh pr comment 456 --body-file /tmp/comment.md --attach /tmp/result.mp4
23715
23734
  \`\`\`
23716
23735
 
23717
- GitHub does not reliably render arbitrary external videos as inline players. For a recording:
23736
+ Repeat \`--attach\` for multiple files, up to 50 per command. For an appended image, add alt text after the path with \`#\`, for example \`--attach './error.png#Error state'\`. To render a video as a player, its local Markdown reference must be the only content in its paragraph. Do not paste a Replicas authenticated API URL into the body, and do not emulate GitHub's undocumented browser upload endpoint.
23737
+
23738
+ ### GitHub attachment fallback
23739
+
23740
+ If \`--attach\` is unavailable, the target is GitHub Enterprise Server, the file is not an image or video, or the native upload fails, keep the Replicas dashboard link and report the limitation. For an inline screenshot or video poster, create a Replicas public forge share only for a public repository or after explicit consent to publish media from a private repository, then use the printed \`Forge embed\` Markdown:
23741
+
23742
+ \`\`\`bash
23743
+ replicas media upload /tmp/screenshot.png --name "PR screenshot" --share
23744
+ \`\`\`
23718
23745
 
23719
- 1. Upload the MP4 normally so it remains available in Replicas.
23720
- 2. Generate a poster image from the recording: \`ffmpeg -i /tmp/demo.mp4 -frames:v 1 /tmp/demo-poster.png\`.
23721
- 3. Upload the poster with \`--share\`.
23722
- 4. Wrap the poster embed in a link to the recording's **View in Replicas** URL.
23746
+ For a fallback recording preview, upload the MP4 normally, generate a poster with \`ffmpeg -i /tmp/demo.mp4 -frames:v 1 /tmp/demo-poster.png\`, share the poster, and link its embed to the recording's **View in Replicas** URL:
23723
23747
 
23724
23748
  \`\`\`markdown
23725
23749
  [![Demo recording](<public-poster-url>)](<recording-dashboard-url>)
23726
23750
  \`\`\`
23727
23751
 
23728
- 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.
23752
+ Public forge shares are unauthenticated bearer capabilities. 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.
23729
23753
 
23730
23754
  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.
23731
23755
 
@@ -24623,7 +24647,7 @@ function isTransientErrorText(text, options = {}) {
24623
24647
  }
24624
24648
 
24625
24649
  // ../shared/src/cli-version.ts
24626
- var CLI_VERSION = "0.2.602";
24650
+ var CLI_VERSION = "0.2.603";
24627
24651
 
24628
24652
  // ../shared/src/version.ts
24629
24653
  function compareVersions(v1, v2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.602",
3
+ "version": "0.2.603",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {