replicas-cli 0.2.91 → 0.2.92

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.
@@ -7540,6 +7540,29 @@ function getInitialChatId(chats, preferredProvider = "claude") {
7540
7540
  return mostActive(preferred)?.id ?? mostActive(others)?.id ?? preferred.find(isDefault)?.id ?? others.find(isDefault)?.id ?? chats[0]?.id ?? null;
7541
7541
  }
7542
7542
 
7543
+ // ../shared/src/automations/github/index.ts
7544
+ var REPO_FILTER_PARAM = {
7545
+ id: "repository_ids",
7546
+ label: "Filter by repository",
7547
+ type: "repository_ids"
7548
+ };
7549
+ var ATTACH_TO_USER_PARAM = {
7550
+ id: "attach_to_user",
7551
+ label: "Attach to user",
7552
+ type: "boolean"
7553
+ };
7554
+ var GITHUB_TRIGGER = {
7555
+ type: "github",
7556
+ label: "GitHub",
7557
+ description: "Trigger on repository events",
7558
+ icon: "github",
7559
+ events: [
7560
+ { id: "pull_request.opened", label: "PR opened", parameters: [REPO_FILTER_PARAM, ATTACH_TO_USER_PARAM] },
7561
+ { id: "pull_request.synchronize", label: "PR updated (new commits)", parameters: [REPO_FILTER_PARAM, ATTACH_TO_USER_PARAM] },
7562
+ { id: "pull_request.closed", label: "PR closed", parameters: [REPO_FILTER_PARAM, ATTACH_TO_USER_PARAM] }
7563
+ ]
7564
+ };
7565
+
7543
7566
  // ../shared/src/prompts.ts
7544
7567
  var REPLICAS_INSTRUCTIONS_TAG = "replicas_instructions";
7545
7568
  function removeTag(text, tag) {
@@ -8590,6 +8613,7 @@ export {
8590
8613
  SANDBOX_PATHS,
8591
8614
  REPLICAS_CONFIG_FILENAMES,
8592
8615
  getInitialChatId,
8616
+ GITHUB_TRIGGER,
8593
8617
  parseAgentEvents,
8594
8618
  createUserMessage,
8595
8619
  isAgentBackendEvent,
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
+ GITHUB_TRIGGER,
3
4
  REPLICAS_CONFIG_FILENAMES,
4
5
  SANDBOX_PATHS,
5
6
  deleteConfig,
@@ -15,7 +16,7 @@ import {
15
16
  setIdeCommand,
16
17
  setOrganizationId,
17
18
  writeConfig
18
- } from "./chunk-7W77EZFX.mjs";
19
+ } from "./chunk-SZMMK3Z4.mjs";
19
20
 
20
21
  // src/index.ts
21
22
  import "dotenv/config";
@@ -1898,12 +1899,7 @@ async function promptForTriggers(repositories) {
1898
1899
  type: "select",
1899
1900
  name: "event",
1900
1901
  message: "Select GitHub event:",
1901
- choices: [
1902
- { title: "Pull Request Opened", value: "pull_request.opened" },
1903
- { title: "Pull Request Synchronized (new push)", value: "pull_request.synchronize" },
1904
- { title: "Pull Request Reopened", value: "pull_request.reopened" },
1905
- { title: "Push", value: "push" }
1906
- ]
1902
+ choices: GITHUB_TRIGGER.events?.map((e) => ({ title: e.label, value: e.id })) ?? []
1907
1903
  });
1908
1904
  if (!eventResponse.event) return triggers;
1909
1905
  let triggerRepoIds;
@@ -2509,12 +2505,12 @@ async function interactiveCommand() {
2509
2505
  );
2510
2506
  }
2511
2507
  console.log(chalk18.gray("Starting interactive mode..."));
2512
- const { launchInteractive } = await import("./interactive-MD44DDIJ.mjs");
2508
+ const { launchInteractive } = await import("./interactive-GKYMLMM6.mjs");
2513
2509
  await launchInteractive();
2514
2510
  }
2515
2511
 
2516
2512
  // src/index.ts
2517
- var CLI_VERSION = "0.2.91";
2513
+ var CLI_VERSION = "0.2.92";
2518
2514
  var program = new Command();
2519
2515
  program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
2520
2516
  program.command("login").description("Authenticate with your Replicas account").action(async () => {
@@ -11,7 +11,7 @@ import {
11
11
  isAgentBackendEvent,
12
12
  parseAgentEvents,
13
13
  parseUserMessage
14
- } from "./chunk-7W77EZFX.mjs";
14
+ } from "./chunk-SZMMK3Z4.mjs";
15
15
 
16
16
  // src/interactive/index.tsx
17
17
  import { createCliRenderer } from "@opentui/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.91",
3
+ "version": "0.2.92",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {