replicas-cli 0.2.251 → 0.2.253
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 +85 -26
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8056,8 +8056,66 @@ var GITHUB_ABILITY = {
|
|
|
8056
8056
|
referenceFile: { name: "GITHUB.md", content: REFERENCE3 }
|
|
8057
8057
|
};
|
|
8058
8058
|
|
|
8059
|
+
// ../shared/src/default-skills/replicas-agent/abilities/gitlab.ts
|
|
8060
|
+
var SECTION4 = `### GitLab
|
|
8061
|
+
Workspace repos hosted on GitLab use pre-configured git credentials \u2014 push, pull, and open merge requests with plain \`git\`.
|
|
8062
|
+
|
|
8063
|
+
**Reference:** \`references/GITLAB.md\`
|
|
8064
|
+
|
|
8065
|
+
Use this when:
|
|
8066
|
+
- A repo's remote is on gitlab.com or a self-managed GitLab instance
|
|
8067
|
+
- You need to open or update a merge request`;
|
|
8068
|
+
var REFERENCE4 = `# GitLab Integration
|
|
8069
|
+
|
|
8070
|
+
This guide covers how to work with GitLab-hosted repositories from within your Replicas workspace.
|
|
8071
|
+
|
|
8072
|
+
## Prerequisites
|
|
8073
|
+
|
|
8074
|
+
Git credentials for the workspace's GitLab hosts are pre-configured in \`~/.git-credentials\` and refreshed automatically. Plain \`git fetch\` / \`git pull\` / \`git push\` over HTTPS work with no additional setup.
|
|
8075
|
+
|
|
8076
|
+
- Never ask the user for a GitLab token or PAT \u2014 credentials are already wired. If a push fails with an authentication error, report it to the user instead of working around it.
|
|
8077
|
+
- There is no \`glab\` CLI in the workspace, and \`gh\` only works for GitHub remotes. Check a repo's host with \`git remote get-url origin\` before choosing the GitHub or GitLab workflow.
|
|
8078
|
+
|
|
8079
|
+
## Merge Requests
|
|
8080
|
+
|
|
8081
|
+
Create a merge request directly from a push using push options:
|
|
8082
|
+
|
|
8083
|
+
\`\`\`bash
|
|
8084
|
+
git push -o merge_request.create -o merge_request.target=<default-branch> origin HEAD
|
|
8085
|
+
\`\`\`
|
|
8086
|
+
|
|
8087
|
+
Useful options:
|
|
8088
|
+
|
|
8089
|
+
\`\`\`bash
|
|
8090
|
+
-o merge_request.title="Title"
|
|
8091
|
+
-o merge_request.description="Description"
|
|
8092
|
+
-o merge_request.draft # open as draft
|
|
8093
|
+
-o merge_request.remove_source_branch # delete branch on merge
|
|
8094
|
+
\`\`\`
|
|
8095
|
+
|
|
8096
|
+
GitLab prints the MR URL in the push output \u2014 include it in your reply to the user.
|
|
8097
|
+
|
|
8098
|
+
## GitLab API (advanced)
|
|
8099
|
+
|
|
8100
|
+
For operations with no git equivalent (commenting on MRs, reading pipelines), call the REST API with the workspace credential:
|
|
8101
|
+
|
|
8102
|
+
\`\`\`bash
|
|
8103
|
+
TOKEN=$(grep -m1 '://oauth2:' ~/.git-credentials | sed -E 's#https://oauth2:([^@]+)@.*#\\1#')
|
|
8104
|
+
curl -s -H "Authorization: Bearer $TOKEN" "https://gitlab.com/api/v4/projects/<url-encoded-path>/merge_requests"
|
|
8105
|
+
\`\`\`
|
|
8106
|
+
|
|
8107
|
+
Use the repo's own host in the API base URL for self-managed instances.
|
|
8108
|
+
`;
|
|
8109
|
+
var GITLAB_ABILITY = {
|
|
8110
|
+
label: "GitLab",
|
|
8111
|
+
description: "Pre-configured git credentials for GitLab repos; merge requests via push options.",
|
|
8112
|
+
bullet: "- Interacting with GitLab (pushing to GitLab repos, opening merge requests)",
|
|
8113
|
+
section: SECTION4,
|
|
8114
|
+
referenceFile: { name: "GITLAB.md", content: REFERENCE4 }
|
|
8115
|
+
};
|
|
8116
|
+
|
|
8059
8117
|
// ../shared/src/default-skills/replicas-agent/abilities/google.ts
|
|
8060
|
-
var
|
|
8118
|
+
var SECTION5 = `### Google Workspace (Docs, Sheets, Forms, Drive)
|
|
8061
8119
|
Create and edit Google Docs, Sheets, and Forms via the Replicas gateway. Files are owned by Replicas \u2014 the integration cannot access pre-existing Google content created outside of it.
|
|
8062
8120
|
|
|
8063
8121
|
**Reference:** \`references/GOOGLE.md\`
|
|
@@ -8066,7 +8124,7 @@ Use this when:
|
|
|
8066
8124
|
- You need to create or edit a Google Doc, Sheet, or Form
|
|
8067
8125
|
- You need to share, rename, move, or delete a Replicas-created Google file
|
|
8068
8126
|
- You need to read responses from a Replicas-created Google Form`;
|
|
8069
|
-
var
|
|
8127
|
+
var REFERENCE5 = `# Google Workspace (Docs, Sheets, Forms, Drive)
|
|
8070
8128
|
|
|
8071
8129
|
This guide covers how to create and edit Google Docs, Sheets, and Forms \u2014 plus do basic Drive file operations \u2014 from inside a Replicas workspace, using the monolith as a gateway to Google's APIs.
|
|
8072
8130
|
|
|
@@ -8327,12 +8385,12 @@ var GOOGLE_ABILITY = {
|
|
|
8327
8385
|
label: "Google Workspace",
|
|
8328
8386
|
description: "Create / edit Docs, Sheets, Forms, and Drive files via the Replicas gateway.",
|
|
8329
8387
|
bullet: "- Interacting with Google Workspace (creating and editing Docs, Sheets, and Forms, sharing files, reading form responses, etc.)",
|
|
8330
|
-
section:
|
|
8331
|
-
referenceFile: { name: "GOOGLE.md", content:
|
|
8388
|
+
section: SECTION5,
|
|
8389
|
+
referenceFile: { name: "GOOGLE.md", content: REFERENCE5 }
|
|
8332
8390
|
};
|
|
8333
8391
|
|
|
8334
8392
|
// ../shared/src/default-skills/replicas-agent/abilities/linear.ts
|
|
8335
|
-
var
|
|
8393
|
+
var SECTION6 = `### Linear
|
|
8336
8394
|
Fetch issues, update state, add comments, and search via the Linear GraphQL API.
|
|
8337
8395
|
|
|
8338
8396
|
**Reference:** \`references/LINEAR.md\`
|
|
@@ -8341,7 +8399,7 @@ Use this when:
|
|
|
8341
8399
|
- You encounter a Linear issue link and need to understand the task
|
|
8342
8400
|
- You need to update an issue's state (e.g. mark as done)
|
|
8343
8401
|
- You need to comment on or search for Linear issues`;
|
|
8344
|
-
var
|
|
8402
|
+
var REFERENCE6 = `# Linear Integration
|
|
8345
8403
|
|
|
8346
8404
|
This guide covers how to interact with Linear from within your Replicas workspace.
|
|
8347
8405
|
|
|
@@ -8416,12 +8474,12 @@ var LINEAR_ABILITY = {
|
|
|
8416
8474
|
label: "Linear",
|
|
8417
8475
|
description: "Fetch issues, post comments, update states via the Linear GraphQL API.",
|
|
8418
8476
|
bullet: "- Interacting with Linear (fetching issues, updating state, commenting, etc.)",
|
|
8419
|
-
section:
|
|
8420
|
-
referenceFile: { name: "LINEAR.md", content:
|
|
8477
|
+
section: SECTION6,
|
|
8478
|
+
referenceFile: { name: "LINEAR.md", content: REFERENCE6 }
|
|
8421
8479
|
};
|
|
8422
8480
|
|
|
8423
8481
|
// ../shared/src/default-skills/replicas-agent/abilities/media.ts
|
|
8424
|
-
var
|
|
8482
|
+
var SECTION7 = `### Media
|
|
8425
8483
|
Share screenshots, screen recordings, generated diagrams, and audio clips inline in the Replicas chat and natively embedded in external messages.
|
|
8426
8484
|
|
|
8427
8485
|
**Reference:** \`references/MEDIA.md\`
|
|
@@ -8430,7 +8488,7 @@ Use this when:
|
|
|
8430
8488
|
- You produce a screenshot, recording, generated image, or audio clip the user should see
|
|
8431
8489
|
- You record video output (browser automation, screen capture) \u2014 including the recommended aspect ratio and FPS
|
|
8432
8490
|
- You need to embed media in a Slack/Linear/GitHub message AND keep a referenceable copy in the Replicas dashboard`;
|
|
8433
|
-
var
|
|
8491
|
+
var REFERENCE7 = `# Media (Screenshots, Recordings, Audio)
|
|
8434
8492
|
|
|
8435
8493
|
This guide covers how to share screenshots, screen recordings, generated diagrams, and audio clips \u2014 both inline in the Replicas chat and natively embedded in external surfaces (Slack, Linear, GitHub).
|
|
8436
8494
|
|
|
@@ -8681,12 +8739,12 @@ var MEDIA_ABILITY = {
|
|
|
8681
8739
|
label: "Media",
|
|
8682
8740
|
description: "Share screenshots, recordings, generated images, and audio clips.",
|
|
8683
8741
|
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",
|
|
8684
|
-
section:
|
|
8685
|
-
referenceFile: { name: "MEDIA.md", content:
|
|
8742
|
+
section: SECTION7,
|
|
8743
|
+
referenceFile: { name: "MEDIA.md", content: REFERENCE7 }
|
|
8686
8744
|
};
|
|
8687
8745
|
|
|
8688
8746
|
// ../shared/src/default-skills/replicas-agent/abilities/previews.ts
|
|
8689
|
-
var
|
|
8747
|
+
var SECTION8 = `### Previews
|
|
8690
8748
|
Expose locally running services (web apps, APIs, databases) as public preview URLs so humans can interact with them directly.
|
|
8691
8749
|
|
|
8692
8750
|
**Reference:** \`references/PREVIEWS.md\`
|
|
@@ -8695,7 +8753,7 @@ Use this when:
|
|
|
8695
8753
|
- You need to start a service that a human should view or interact with
|
|
8696
8754
|
- The task involves UI work that benefits from human review
|
|
8697
8755
|
- You are verifying frontend/backend integrations visually`;
|
|
8698
|
-
var
|
|
8756
|
+
var REFERENCE8 = `# Preview URLs
|
|
8699
8757
|
|
|
8700
8758
|
When you run services on ports \u2014 such as a web app, API server, or database \u2014 humans may want to interact with them directly. You can expose your locally running services as public preview URLs.
|
|
8701
8759
|
|
|
@@ -8777,12 +8835,12 @@ var PREVIEWS_ABILITY = {
|
|
|
8777
8835
|
label: "Previews",
|
|
8778
8836
|
description: "Expose locally running services on public preview URLs for humans.",
|
|
8779
8837
|
bullet: "- Creating preview URLs for locally running services",
|
|
8780
|
-
section:
|
|
8781
|
-
referenceFile: { name: "PREVIEWS.md", content:
|
|
8838
|
+
section: SECTION8,
|
|
8839
|
+
referenceFile: { name: "PREVIEWS.md", content: REFERENCE8 }
|
|
8782
8840
|
};
|
|
8783
8841
|
|
|
8784
8842
|
// ../shared/src/default-skills/replicas-agent/abilities/replicas.ts
|
|
8785
|
-
var
|
|
8843
|
+
var SECTION9 = `### Replicas (in-workspace CLI)
|
|
8786
8844
|
Take action *with* Replicas itself \u2014 manage automations, environments (variables, files), repos, and \`replicas.json\` config \u2014 using the pre-installed, pre-authenticated \`replicas\` CLI.
|
|
8787
8845
|
|
|
8788
8846
|
**Reference:** \`references/REPLICAS.md\`
|
|
@@ -8792,7 +8850,7 @@ Use this when:
|
|
|
8792
8850
|
- The user asks you to manage environments, environment variables, or environment files
|
|
8793
8851
|
- The user asks "what envs / repos / automations do I have?"
|
|
8794
8852
|
- The user asks you to scaffold a \`replicas.json\` / \`replicas.yaml\` in a repo`;
|
|
8795
|
-
var
|
|
8853
|
+
var REFERENCE9 = `# Replicas (in-workspace CLI)
|
|
8796
8854
|
|
|
8797
8855
|
This guide covers how to take action *with* Replicas itself from inside a Replicas workspace \u2014 managing automations, environments (and their variables/files), repos, previews, and the user's \`replicas.json\` config \u2014 using the pre-installed \`replicas\` CLI.
|
|
8798
8856
|
|
|
@@ -8986,13 +9044,13 @@ var REPLICAS_ABILITY = {
|
|
|
8986
9044
|
description: "Teach the agent about Replicas itself \u2014 automations, environments, the in-workspace CLI.",
|
|
8987
9045
|
// No bullet — help_instructions covers the `replicas` CLI surface in detail.
|
|
8988
9046
|
bullet: "",
|
|
8989
|
-
section:
|
|
8990
|
-
referenceFile: { name: "REPLICAS.md", content:
|
|
9047
|
+
section: SECTION9,
|
|
9048
|
+
referenceFile: { name: "REPLICAS.md", content: REFERENCE9 },
|
|
8991
9049
|
locked: true
|
|
8992
9050
|
};
|
|
8993
9051
|
|
|
8994
9052
|
// ../shared/src/default-skills/replicas-agent/abilities/slack.ts
|
|
8995
|
-
var
|
|
9053
|
+
var SECTION10 = `### Slack
|
|
8996
9054
|
Send messages, read threads, search conversations, and upload files via the Slack Web API.
|
|
8997
9055
|
|
|
8998
9056
|
**Reference:** \`references/SLACK.md\`
|
|
@@ -9002,7 +9060,7 @@ Use this when:
|
|
|
9002
9060
|
- You need to read or fetch a Slack conversation
|
|
9003
9061
|
- You encounter a Slack message link and need to retrieve its content
|
|
9004
9062
|
- The task asks you to notify, update, or communicate via Slack`;
|
|
9005
|
-
var
|
|
9063
|
+
var REFERENCE10 = `# Slack Integration
|
|
9006
9064
|
|
|
9007
9065
|
This guide covers how to interact with Slack from within your Replicas workspace.
|
|
9008
9066
|
|
|
@@ -9103,8 +9161,8 @@ var SLACK_ABILITY = {
|
|
|
9103
9161
|
label: "Slack",
|
|
9104
9162
|
description: "Send messages, read threads, search conversations, upload files.",
|
|
9105
9163
|
bullet: "- Interacting with Slack (sending messages, reading threads, etc.)",
|
|
9106
|
-
section:
|
|
9107
|
-
referenceFile: { name: "SLACK.md", content:
|
|
9164
|
+
section: SECTION10,
|
|
9165
|
+
referenceFile: { name: "SLACK.md", content: REFERENCE10 }
|
|
9108
9166
|
};
|
|
9109
9167
|
|
|
9110
9168
|
// ../shared/src/default-skills/replicas-agent/registry.ts
|
|
@@ -9113,6 +9171,7 @@ var REPLICAS_AGENT_ABILITY_REGISTRY = {
|
|
|
9113
9171
|
computer: COMPUTER_ABILITY,
|
|
9114
9172
|
docker: DOCKER_ABILITY,
|
|
9115
9173
|
github: GITHUB_ABILITY,
|
|
9174
|
+
gitlab: GITLAB_ABILITY,
|
|
9116
9175
|
google: GOOGLE_ABILITY,
|
|
9117
9176
|
linear: LINEAR_ABILITY,
|
|
9118
9177
|
media: MEDIA_ABILITY,
|
|
@@ -9157,7 +9216,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
9157
9216
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
9158
9217
|
|
|
9159
9218
|
// ../shared/src/cli-version.ts
|
|
9160
|
-
var CLI_VERSION = "0.2.
|
|
9219
|
+
var CLI_VERSION = "0.2.253";
|
|
9161
9220
|
|
|
9162
9221
|
// ../shared/src/engine/environment.ts
|
|
9163
9222
|
var DESKTOP_NOVNC_PORT = 6080;
|
|
@@ -11349,7 +11408,7 @@ Found ${response.workspaces.length} workspaces matching "${workspaceName}":`));
|
|
|
11349
11408
|
console.log(chalk4.gray(` Status: ${selectedWorkspace.status || "unknown"}`));
|
|
11350
11409
|
if (selectedWorkspace.status === "sleeping") {
|
|
11351
11410
|
throw new Error(
|
|
11352
|
-
"Workspace is currently sleeping. Wake it using `replicas
|
|
11411
|
+
"Workspace is currently sleeping. Wake it using `replicas interact` (press w on a sleeping workspace) or visit https://tryreplicas.com"
|
|
11353
11412
|
);
|
|
11354
11413
|
}
|
|
11355
11414
|
console.log(chalk4.blue("\nRequesting SSH access token..."));
|