replicas-cli 0.2.393 → 0.2.394
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/index.mjs +11 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -22517,9 +22517,8 @@ var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZ
|
|
|
22517
22517
|
function getWorkspaceDashboardUrl(workspaceId, options = {}) {
|
|
22518
22518
|
const { encodeWorkspaceId = true, mode, mediaId } = options;
|
|
22519
22519
|
const workspaceIdValue = encodeWorkspaceId ? encodeURIComponent(workspaceId) : workspaceId;
|
|
22520
|
-
const effectiveMode = mediaId ? mode ?? "media" : mode;
|
|
22521
22520
|
const params = [];
|
|
22522
|
-
if (
|
|
22521
|
+
if (mode) params.push(`mode=${encodeURIComponent(mode)}`);
|
|
22523
22522
|
if (mediaId) params.push(`media=${encodeURIComponent(mediaId)}`);
|
|
22524
22523
|
const query = params.length > 0 ? `?${params.join("&")}` : "";
|
|
22525
22524
|
return `https://tryreplicas.com/workspaces/${workspaceIdValue}${query}`;
|
|
@@ -23573,7 +23572,7 @@ Pass one or more file paths. Uploading several files in a single invocation is p
|
|
|
23573
23572
|
For each file, the CLI prints two lines:
|
|
23574
23573
|
|
|
23575
23574
|
1. \`\` \u2014 the chat embed (renders inline in Replicas chat **only** \u2014 see below).
|
|
23576
|
-
2. \`View in Replicas: <deep-link>\` \u2014 a per-file dashboard URL of the form \`https://tryreplicas.com/workspaces/<workspace-id>?
|
|
23575
|
+
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.
|
|
23577
23576
|
|
|
23578
23577
|
Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
|
|
23579
23578
|
|
|
@@ -23591,7 +23590,7 @@ This prints an additional \`Forge embed\` Markdown line backed by an opt-in publ
|
|
|
23591
23590
|
|---|---|---|
|
|
23592
23591
|
| \`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. |
|
|
23593
23592
|
| \`https://api.tryreplicas.com/v1/media/public/<id>/<token>\` | Opt-in public bearer URL printed by \`--share\` | GitHub image embeds only. |
|
|
23594
|
-
| \`https://tryreplicas.com/workspaces/<workspace-id>?
|
|
23593
|
+
| \`https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>\` | Public dashboard deep link that opens the media file in the workspace | Everywhere external \u2014 Slack, GitHub, Linear, PR bodies, comments, emails. |
|
|
23595
23594
|
|
|
23596
23595
|
### NEVER link the API redirect URL outside the Replicas chat reply
|
|
23597
23596
|
|
|
@@ -23609,14 +23608,12 @@ This rule has no exceptions:
|
|
|
23609
23608
|
When you reference an uploaded file from anywhere outside the Replicas chat reply, the link must be the dashboard form:
|
|
23610
23609
|
|
|
23611
23610
|
\`\`\`
|
|
23612
|
-
https://tryreplicas.com/workspaces/<workspace-id>?
|
|
23611
|
+
https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>
|
|
23613
23612
|
\`\`\`
|
|
23614
23613
|
|
|
23615
|
-
|
|
23616
|
-
- \`mode=media\` opens the media tab in the dashboard.
|
|
23617
|
-
- \`media=<media-id>\` scrolls to and opens that specific file.
|
|
23614
|
+
The \`media=<media-id>\` query param opens that specific file in the workspace.
|
|
23618
23615
|
|
|
23619
|
-
|
|
23616
|
+
When you have a specific file in mind, never link the bare workspace URL without the \`media=<id>\` param.
|
|
23620
23617
|
|
|
23621
23618
|
Always render as a markdown / mrkdwn hyperlink labeled **View in Replicas** \u2014 never paste a raw URL.
|
|
23622
23619
|
|
|
@@ -23624,14 +23621,14 @@ Always render as a markdown / mrkdwn hyperlink labeled **View in Replicas** \u20
|
|
|
23624
23621
|
|
|
23625
23622
|
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.
|
|
23626
23623
|
|
|
23627
|
-
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
|
|
23624
|
+
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.
|
|
23628
23625
|
|
|
23629
23626
|
## On external platforms \u2014 upload natively AND link the dashboard
|
|
23630
23627
|
|
|
23631
23628
|
Sharing media externally is a **two-step requirement** for every file:
|
|
23632
23629
|
|
|
23633
23630
|
1. **Upload the raw bytes natively to that platform** so the recipient sees the media embedded inline in the message itself.
|
|
23634
|
-
2. **Link the Replicas dashboard deep link** (\`?
|
|
23631
|
+
2. **Link the Replicas dashboard deep link** (\`?media=<id>\` form) so the user can jump straight to the file in the workspace.
|
|
23635
23632
|
|
|
23636
23633
|
A link alone is not enough. A native upload alone is not enough. Do both.
|
|
23637
23634
|
|
|
@@ -23671,7 +23668,7 @@ curl -s -X POST "https://slack.com/api/files.completeUploadExternal" \\
|
|
|
23671
23668
|
\\"files\\": [{\\"id\\": \\"$FILE_ID\\", \\"title\\": \\"Screenshot\\"}],
|
|
23672
23669
|
\\"channel_id\\": \\"CHANNEL_ID\\",
|
|
23673
23670
|
\\"thread_ts\\": \\"THREAD_TS\\",
|
|
23674
|
-
\\"initial_comment\\": \\"<https://tryreplicas.com/workspaces/<workspace-id>?
|
|
23671
|
+
\\"initial_comment\\": \\"<https://tryreplicas.com/workspaces/<workspace-id>?media=<media-id>|View in Replicas>\\"
|
|
23675
23672
|
}"
|
|
23676
23673
|
\`\`\`
|
|
23677
23674
|
|
|
@@ -23731,7 +23728,7 @@ curl -s -X PUT "$UPLOAD_URL" \\
|
|
|
23731
23728
|
--data-binary @"$FILE"
|
|
23732
23729
|
|
|
23733
23730
|
# 3. Reference assetUrl inline in the comment body, alongside the dashboard link.
|
|
23734
|
-
BODY=$(printf '\\n\\n[View in Replicas](https://tryreplicas.com/workspaces/%s?
|
|
23731
|
+
BODY=$(printf '\\n\\n[View in Replicas](https://tryreplicas.com/workspaces/%s?media=%s)' \\
|
|
23735
23732
|
"$ASSET_URL" "$WORKSPACE_ID" "$MEDIA_ID")
|
|
23736
23733
|
|
|
23737
23734
|
jq -n \\
|
|
@@ -24379,7 +24376,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
24379
24376
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
24380
24377
|
|
|
24381
24378
|
// ../shared/src/cli-version.ts
|
|
24382
|
-
var CLI_VERSION = "0.2.
|
|
24379
|
+
var CLI_VERSION = "0.2.394";
|
|
24383
24380
|
|
|
24384
24381
|
// ../shared/src/version.ts
|
|
24385
24382
|
function compareVersions(v1, v2) {
|