replicas-cli 0.2.653 → 0.2.655
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.cjs +59 -59
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7367,6 +7367,54 @@ var import_node_child_process2 = require("child_process");
|
|
|
7367
7367
|
var import_commander = require("commander");
|
|
7368
7368
|
var import_chalk23 = __toESM(require("chalk"));
|
|
7369
7369
|
|
|
7370
|
+
// ../shared/src/urls.ts
|
|
7371
|
+
var DEFAULT_WEB_APP_URL = "https://app.replicas.dev";
|
|
7372
|
+
var DASHBOARD_PATH = "/dashboard";
|
|
7373
|
+
var WEB_APP_PATHS = {
|
|
7374
|
+
home: "/",
|
|
7375
|
+
onboarding: "/onboarding",
|
|
7376
|
+
workspaces: "/workspace",
|
|
7377
|
+
automations: "/automations",
|
|
7378
|
+
environment: "/environment",
|
|
7379
|
+
analytics: "/analytics",
|
|
7380
|
+
dashboard: DASHBOARD_PATH,
|
|
7381
|
+
agents: `${DASHBOARD_PATH}/agents`,
|
|
7382
|
+
integrations: `${DASHBOARD_PATH}/integrations`,
|
|
7383
|
+
integrationsGithub: `${DASHBOARD_PATH}/integrations/github`,
|
|
7384
|
+
integrationsGitlab: `${DASHBOARD_PATH}/integrations/gitlab`,
|
|
7385
|
+
settings: `${DASHBOARD_PATH}/settings`,
|
|
7386
|
+
billing: `${DASHBOARD_PATH}/billing`,
|
|
7387
|
+
members: `${DASHBOARD_PATH}/members`,
|
|
7388
|
+
"audit-logs": `${DASHBOARD_PATH}/audit-logs`,
|
|
7389
|
+
accountAgents: `${DASHBOARD_PATH}/account/agents`,
|
|
7390
|
+
accountProfile: `${DASHBOARD_PATH}/account/profile`,
|
|
7391
|
+
accountConnections: `${DASHBOARD_PATH}/account/connections`,
|
|
7392
|
+
accountIntegrations: `${DASHBOARD_PATH}/account/integrations`,
|
|
7393
|
+
accountApiKeys: `${DASHBOARD_PATH}/account/api-keys`,
|
|
7394
|
+
accountPreferences: `${DASHBOARD_PATH}/account/preferences`,
|
|
7395
|
+
fullscreenWorkspaces: "/workspaces"
|
|
7396
|
+
};
|
|
7397
|
+
var LEGACY_WEB_APP_PATHS = {
|
|
7398
|
+
app: "/app",
|
|
7399
|
+
home: "/home",
|
|
7400
|
+
dashboardWorkspaces: `${DASHBOARD_PATH}/workspaces`
|
|
7401
|
+
};
|
|
7402
|
+
function getWorkspaceDashboardUrl(workspaceId, options = {}) {
|
|
7403
|
+
const { encodeWorkspaceId = true, mode, mediaId } = options;
|
|
7404
|
+
const workspaceIdValue = encodeWorkspaceId ? encodeURIComponent(workspaceId) : workspaceId;
|
|
7405
|
+
const params = [];
|
|
7406
|
+
if (mode) params.push(`mode=${encodeURIComponent(mode)}`);
|
|
7407
|
+
if (mediaId) params.push(`media=${encodeURIComponent(mediaId)}`);
|
|
7408
|
+
const query = params.length > 0 ? `?${params.join("&")}` : "";
|
|
7409
|
+
return `${DEFAULT_WEB_APP_URL}${WEB_APP_PATHS.fullscreenWorkspaces}/${workspaceIdValue}${query}`;
|
|
7410
|
+
}
|
|
7411
|
+
function getOrganizationMediaPath(organizationId, mediaId) {
|
|
7412
|
+
return `/organizations/${encodeURIComponent(organizationId)}/media/${encodeURIComponent(mediaId)}`;
|
|
7413
|
+
}
|
|
7414
|
+
function getOrganizationMediaUrl(organizationId, mediaId, webAppUrl = DEFAULT_WEB_APP_URL) {
|
|
7415
|
+
return `${webAppUrl}${getOrganizationMediaPath(organizationId, mediaId)}`;
|
|
7416
|
+
}
|
|
7417
|
+
|
|
7370
7418
|
// src/commands/login.ts
|
|
7371
7419
|
var import_http = __toESM(require("http"));
|
|
7372
7420
|
var import_url3 = require("url");
|
|
@@ -23094,54 +23142,6 @@ function skillNamesFromCommand(command) {
|
|
|
23094
23142
|
})));
|
|
23095
23143
|
}
|
|
23096
23144
|
|
|
23097
|
-
// ../shared/src/urls.ts
|
|
23098
|
-
var DEFAULT_WEB_APP_URL = "https://replicas.dev";
|
|
23099
|
-
var HOME_PATH = "/home";
|
|
23100
|
-
var DASHBOARD_PATH = "/dashboard";
|
|
23101
|
-
var WEB_APP_PATHS = {
|
|
23102
|
-
home: HOME_PATH,
|
|
23103
|
-
onboarding: `${HOME_PATH}/onboarding`,
|
|
23104
|
-
workspaces: `${HOME_PATH}/workspace`,
|
|
23105
|
-
automations: `${HOME_PATH}/automations`,
|
|
23106
|
-
environment: `${HOME_PATH}/environment`,
|
|
23107
|
-
analytics: `${HOME_PATH}/analytics`,
|
|
23108
|
-
dashboard: DASHBOARD_PATH,
|
|
23109
|
-
agents: `${DASHBOARD_PATH}/agents`,
|
|
23110
|
-
integrations: `${DASHBOARD_PATH}/integrations`,
|
|
23111
|
-
integrationsGithub: `${DASHBOARD_PATH}/integrations/github`,
|
|
23112
|
-
integrationsGitlab: `${DASHBOARD_PATH}/integrations/gitlab`,
|
|
23113
|
-
settings: `${DASHBOARD_PATH}/settings`,
|
|
23114
|
-
billing: `${DASHBOARD_PATH}/billing`,
|
|
23115
|
-
members: `${DASHBOARD_PATH}/members`,
|
|
23116
|
-
"audit-logs": `${DASHBOARD_PATH}/audit-logs`,
|
|
23117
|
-
accountAgents: `${DASHBOARD_PATH}/account/agents`,
|
|
23118
|
-
accountProfile: `${DASHBOARD_PATH}/account/profile`,
|
|
23119
|
-
accountConnections: `${DASHBOARD_PATH}/account/connections`,
|
|
23120
|
-
accountIntegrations: `${DASHBOARD_PATH}/account/integrations`,
|
|
23121
|
-
accountApiKeys: `${DASHBOARD_PATH}/account/api-keys`,
|
|
23122
|
-
accountPreferences: `${DASHBOARD_PATH}/account/preferences`,
|
|
23123
|
-
fullscreenWorkspaces: "/workspaces"
|
|
23124
|
-
};
|
|
23125
|
-
var LEGACY_WEB_APP_PATHS = {
|
|
23126
|
-
app: "/app",
|
|
23127
|
-
dashboardWorkspaces: `${DASHBOARD_PATH}/workspaces`
|
|
23128
|
-
};
|
|
23129
|
-
function getWorkspaceDashboardUrl(workspaceId, options = {}) {
|
|
23130
|
-
const { encodeWorkspaceId = true, mode, mediaId } = options;
|
|
23131
|
-
const workspaceIdValue = encodeWorkspaceId ? encodeURIComponent(workspaceId) : workspaceId;
|
|
23132
|
-
const params = [];
|
|
23133
|
-
if (mode) params.push(`mode=${encodeURIComponent(mode)}`);
|
|
23134
|
-
if (mediaId) params.push(`media=${encodeURIComponent(mediaId)}`);
|
|
23135
|
-
const query = params.length > 0 ? `?${params.join("&")}` : "";
|
|
23136
|
-
return `${DEFAULT_WEB_APP_URL}${WEB_APP_PATHS.fullscreenWorkspaces}/${workspaceIdValue}${query}`;
|
|
23137
|
-
}
|
|
23138
|
-
function getOrganizationMediaPath(organizationId, mediaId) {
|
|
23139
|
-
return `/organizations/${encodeURIComponent(organizationId)}/media/${encodeURIComponent(mediaId)}`;
|
|
23140
|
-
}
|
|
23141
|
-
function getOrganizationMediaUrl(organizationId, mediaId, webAppUrl = DEFAULT_WEB_APP_URL) {
|
|
23142
|
-
return `${webAppUrl}${getOrganizationMediaPath(organizationId, mediaId)}`;
|
|
23143
|
-
}
|
|
23144
|
-
|
|
23145
23145
|
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
23146
23146
|
var SECTION = `### Computer use (Linux desktop control)
|
|
23147
23147
|
Drive the workspace's Linux desktop - open a browser, click, type, scroll, screenshot, record - via the \`replicas computer\` CLI. Every Replicas workspace boots with a live H.264 and Opus stream published as an authenticated preview, so a \`Desktop\` tab is always available in the dashboard. Use \`replicas computer info\` to get the viewer URL when you want to share it (e.g. point a user on Slack at the live stream).
|
|
@@ -23798,7 +23798,7 @@ For each media file, the CLI prints an embed line and a dashboard link:
|
|
|
23798
23798
|
|
|
23799
23799
|
1. Default and organization access print \`Replicas chat embed: \`; this authenticated URL renders inline in Replicas chat **only** \u2014 see below.
|
|
23800
23800
|
2. Public access (\`--access public\` or \`--share\`) prints \`\` 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.
|
|
23801
|
-
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.
|
|
23801
|
+
3. \`View in Replicas: <deep-link>\` is a per-file dashboard URL of the form \`https://app.replicas.dev/workspaces/<workspace-id>?media=<media-id>\` that opens directly to that specific file.
|
|
23802
23802
|
|
|
23803
23803
|
Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
|
|
23804
23804
|
|
|
@@ -23827,7 +23827,7 @@ replicas media upload screenshot.png --name "Login page" --access public
|
|
|
23827
23827
|
| \`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. |
|
|
23828
23828
|
| \`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. |
|
|
23829
23829
|
| \`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. |
|
|
23830
|
-
| \`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. |
|
|
23830
|
+
| \`https://app.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. |
|
|
23831
23831
|
|
|
23832
23832
|
### NEVER link the API redirect URL outside the Replicas chat reply
|
|
23833
23833
|
|
|
@@ -23846,7 +23846,7 @@ This rule has no exceptions:
|
|
|
23846
23846
|
For an organization-only HTML page, use the \`Forge link\` printed by \`--access organization\`. For other authenticated media references, use the dashboard form:
|
|
23847
23847
|
|
|
23848
23848
|
\`\`\`
|
|
23849
|
-
https://replicas.dev/workspaces/<workspace-id>?media=<media-id>
|
|
23849
|
+
https://app.replicas.dev/workspaces/<workspace-id>?media=<media-id>
|
|
23850
23850
|
\`\`\`
|
|
23851
23851
|
|
|
23852
23852
|
The \`media=<media-id>\` query param opens that specific file in the workspace.
|
|
@@ -23895,7 +23895,7 @@ await replicas.slack.call('files.completeUploadExternal', {
|
|
|
23895
23895
|
files: [{ id: reservation.file_id, title: 'Screenshot' }],
|
|
23896
23896
|
channel_id: 'CHANNEL_ID',
|
|
23897
23897
|
thread_ts: 'THREAD_TS',
|
|
23898
|
-
initial_comment: '<https://replicas.dev/workspaces/<workspace-id>?media=<media-id>|View in Replicas>',
|
|
23898
|
+
initial_comment: '<https://app.replicas.dev/workspaces/<workspace-id>?media=<media-id>|View in Replicas>',
|
|
23899
23899
|
});
|
|
23900
23900
|
\`\`\`
|
|
23901
23901
|
|
|
@@ -23955,7 +23955,7 @@ curl -s -X PUT "$UPLOAD_URL" \\
|
|
|
23955
23955
|
--data-binary @"$FILE"
|
|
23956
23956
|
|
|
23957
23957
|
# 3. Reference assetUrl inline in the comment body, alongside the dashboard link.
|
|
23958
|
-
BODY=$(printf '\\n\\n[View in Replicas](https://replicas.dev/workspaces/%s?media=%s)' \\
|
|
23958
|
+
BODY=$(printf '\\n\\n[View in Replicas](https://app.replicas.dev/workspaces/%s?media=%s)' \\
|
|
23959
23959
|
"$ASSET_URL" "$REPLICAS_WORKSPACE_ID" "$MEDIA_ID")
|
|
23960
23960
|
|
|
23961
23961
|
jq -n \\
|
|
@@ -23985,7 +23985,7 @@ Check \`gh --version\` before choosing the delivery path. On a supported host wi
|
|
|
23985
23985
|
Before the change:
|
|
23986
23986
|
|
|
23987
23987
|

|
|
23988
|
-
[View in Replicas](https://replicas.dev/workspaces/<workspace-id>?media=<before-media-id>)
|
|
23988
|
+
[View in Replicas](https://app.replicas.dev/workspaces/<workspace-id>?media=<before-media-id>)
|
|
23989
23989
|
\`\`\`
|
|
23990
23990
|
|
|
23991
23991
|
\`\`\`bash
|
|
@@ -27254,7 +27254,7 @@ var headlessFilesystemAgentResultSchema = external_exports.object({
|
|
|
27254
27254
|
});
|
|
27255
27255
|
|
|
27256
27256
|
// ../shared/src/cli-version.ts
|
|
27257
|
-
var CLI_VERSION = "0.2.
|
|
27257
|
+
var CLI_VERSION = "0.2.655";
|
|
27258
27258
|
|
|
27259
27259
|
// ../shared/src/version.ts
|
|
27260
27260
|
function compareVersions(v1, v2) {
|
|
@@ -28125,7 +28125,7 @@ async function openForApproval(host, authUrl) {
|
|
|
28125
28125
|
}
|
|
28126
28126
|
|
|
28127
28127
|
// src/commands/login.ts
|
|
28128
|
-
var WEB_APP_URL = process.env.REPLICAS_WEB_URL ||
|
|
28128
|
+
var WEB_APP_URL = process.env.REPLICAS_WEB_URL || DEFAULT_WEB_APP_URL;
|
|
28129
28129
|
function generateState() {
|
|
28130
28130
|
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
28131
28131
|
}
|
|
@@ -28569,7 +28569,7 @@ async function prepareWorkspaceConnection(workspaceName) {
|
|
|
28569
28569
|
const selectedWorkspace = await resolveWorkspaceRecord(workspaceName);
|
|
28570
28570
|
if (isWorkspaceSuspendedStatus(selectedWorkspace.status)) {
|
|
28571
28571
|
throw new Error(
|
|
28572
|
-
`Workspace is currently ${selectedWorkspace.status}. Wake it at
|
|
28572
|
+
`Workspace is currently ${selectedWorkspace.status}. Wake it at ${DEFAULT_WEB_APP_URL}`
|
|
28573
28573
|
);
|
|
28574
28574
|
}
|
|
28575
28575
|
console.log(import_chalk5.default.blue("\nRequesting SSH access token..."));
|
|
@@ -28952,7 +28952,7 @@ var AUTHORIZATION_ENDPOINT = "https://auth.openai.com/oauth/authorize";
|
|
|
28952
28952
|
var TOKEN_ENDPOINT = "https://auth.openai.com/oauth/token";
|
|
28953
28953
|
var CALLBACK_PORT = 1455;
|
|
28954
28954
|
var CALLBACK_PATH = "/auth/callback";
|
|
28955
|
-
var WEB_APP_URL2 = process.env.REPLICAS_WEB_URL ||
|
|
28955
|
+
var WEB_APP_URL2 = process.env.REPLICAS_WEB_URL || DEFAULT_WEB_APP_URL;
|
|
28956
28956
|
function buildAuthorizationUrl(codeChallenge, state) {
|
|
28957
28957
|
const redirectUri = `http://localhost:${CALLBACK_PORT}${CALLBACK_PATH}`;
|
|
28958
28958
|
const params = new URLSearchParams({
|
|
@@ -29163,7 +29163,7 @@ async function runCredentialAuthFlow(options, flow) {
|
|
|
29163
29163
|
}
|
|
29164
29164
|
const saved = reauthenticated || !target.organization ? await resolveAuthFlowTarget(identity) : target;
|
|
29165
29165
|
renderAuthFlowSuccess(providerLabel, response, saved);
|
|
29166
|
-
const completionUrl = new URL("/cli-login/success", process.env.REPLICAS_WEB_URL ||
|
|
29166
|
+
const completionUrl = new URL("/cli-login/success", process.env.REPLICAS_WEB_URL || DEFAULT_WEB_APP_URL);
|
|
29167
29167
|
completionUrl.searchParams.set("provider", flow.provider);
|
|
29168
29168
|
completionUrl.searchParams.set("email", saved.replicasAccount ?? "");
|
|
29169
29169
|
completionUrl.searchParams.set("scope", isUserScoped ? "user" : "org");
|