replicas-cli 0.2.71 → 0.2.73

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.
@@ -8484,9 +8484,44 @@ function parseLinearIssue(content) {
8484
8484
  issueUrl: issueUrlMatch?.[1]?.trim()
8485
8485
  };
8486
8486
  }
8487
+ function safeHttpsUrl(raw) {
8488
+ if (!raw) return void 0;
8489
+ const trimmed = raw.trim();
8490
+ return trimmed.startsWith("https://") ? trimmed : void 0;
8491
+ }
8492
+ function parseAutomationTriggered(content) {
8493
+ if (!content.startsWith("# Automation Triggered")) return null;
8494
+ const nameMatch = content.match(/\*\*Automation Name:\*\*\s*(.+)/);
8495
+ if (!nameMatch) return null;
8496
+ const triggerTypeMatch = content.match(/\*\*Trigger Type:\*\*\s*(.+)/);
8497
+ const triggeredAtMatch = content.match(/\*\*Triggered At:\*\*\s*(.+)/);
8498
+ const eventMatch = content.match(/\*\*Event:\*\*\s*(.+)/);
8499
+ const repoMatch = content.match(/\*\*Repository:\*\*\s*(.+)/);
8500
+ const repoUrlMatch = content.match(/\*\*Repository URL:\*\*\s*(.+)/);
8501
+ const prNumberMatch = content.match(/\*\*PR Number:\*\*\s*(.+)/);
8502
+ const prUrlMatch = content.match(/\*\*PR URL:\*\*\s*(.+)/);
8503
+ const triggeredByMatch = content.match(/\*\*Triggered By:\*\*\s*@?(.+)/);
8504
+ const triggeredByUrlMatch = content.match(/\*\*Triggered By URL:\*\*\s*(.+)/);
8505
+ const promptMatch = content.match(/## Automation Prompt\n([\s\S]*)$/);
8506
+ const parsedPrNumber = prNumberMatch ? parseInt(prNumberMatch[1].trim(), 10) : NaN;
8507
+ return {
8508
+ source: "automation_triggered",
8509
+ automationName: nameMatch[1].trim(),
8510
+ triggerType: triggerTypeMatch?.[1]?.trim() ?? "unknown",
8511
+ triggeredAt: triggeredAtMatch?.[1]?.trim() ?? "",
8512
+ event: eventMatch?.[1]?.trim(),
8513
+ repositoryName: repoMatch?.[1]?.trim(),
8514
+ repositoryUrl: safeHttpsUrl(repoUrlMatch?.[1]),
8515
+ prNumber: isNaN(parsedPrNumber) ? void 0 : parsedPrNumber,
8516
+ prUrl: safeHttpsUrl(prUrlMatch?.[1]),
8517
+ triggeredBy: triggeredByMatch?.[1]?.trim(),
8518
+ triggeredByUrl: safeHttpsUrl(triggeredByUrlMatch?.[1]),
8519
+ userPrompt: promptMatch?.[1]?.trim() ?? ""
8520
+ };
8521
+ }
8487
8522
  function parseUserMessage(rawContent) {
8488
8523
  const content = removeReplicasInstructions(rawContent).trim();
8489
- return parseCIFailure(content) ?? parseGitHubIssueNew(content) ?? parseGitHubIssueExisting(content) ?? parseGitHubPRNew(content) ?? parseGitHubPRExistingPRReview(content) ?? parseGitHubPRExistingReview(content) ?? parseGitHubPRExistingGeneral(content) ?? parseSlackTask(content) ?? parseLinearIssue(content) ?? { source: "raw", content };
8524
+ return parseCIFailure(content) ?? parseGitHubIssueNew(content) ?? parseGitHubIssueExisting(content) ?? parseGitHubPRNew(content) ?? parseGitHubPRExistingPRReview(content) ?? parseGitHubPRExistingReview(content) ?? parseGitHubPRExistingGeneral(content) ?? parseSlackTask(content) ?? parseLinearIssue(content) ?? parseAutomationTriggered(content) ?? { source: "raw", content };
8490
8525
  }
8491
8526
 
8492
8527
  // ../shared/src/user-message-parser/source-config.ts
@@ -8499,7 +8534,8 @@ var SOURCE_CONFIG = {
8499
8534
  github_pr_existing_review: { label: "Code Review", color: "#8b949e" },
8500
8535
  github_pr_existing_pr_review: { label: "PR Review", color: "#8b949e" },
8501
8536
  github_pr_existing_general: { label: "GitHub PR", color: "#8b949e" },
8502
- slack_task: { label: "Slack", color: "#BF6CC2" }
8537
+ slack_task: { label: "Slack", color: "#BF6CC2" },
8538
+ automation_triggered: { label: "Automation", color: "#f59e0b" }
8503
8539
  };
8504
8540
 
8505
8541
  export {
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  setIdeCommand,
16
16
  setOrganizationId,
17
17
  writeConfig
18
- } from "./chunk-KFEFUK5A.mjs";
18
+ } from "./chunk-ZWXIWBWN.mjs";
19
19
 
20
20
  // src/index.ts
21
21
  import "dotenv/config";
@@ -2509,12 +2509,12 @@ async function interactiveCommand() {
2509
2509
  );
2510
2510
  }
2511
2511
  console.log(chalk18.gray("Starting interactive mode..."));
2512
- const { launchInteractive } = await import("./interactive-WT776LWE.mjs");
2512
+ const { launchInteractive } = await import("./interactive-VMAIEMDZ.mjs");
2513
2513
  await launchInteractive();
2514
2514
  }
2515
2515
 
2516
2516
  // src/index.ts
2517
- var CLI_VERSION = "0.2.71";
2517
+ var CLI_VERSION = "0.2.73";
2518
2518
  var program = new Command();
2519
2519
  program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
2520
2520
  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-KFEFUK5A.mjs";
14
+ } from "./chunk-ZWXIWBWN.mjs";
15
15
 
16
16
  // src/interactive/index.tsx
17
17
  import { createCliRenderer } from "@opentui/core";
@@ -2212,7 +2212,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
2212
2212
  if (!item) return;
2213
2213
  switch (item.type) {
2214
2214
  case "dashboard":
2215
- open(`${WEB_APP_URL}/dashboard?workspaceId=${item.workspaceId}`).catch(() => {
2215
+ open(`${WEB_APP_URL}/dashboard/workspaces/${item.workspaceId}`).catch(() => {
2216
2216
  });
2217
2217
  break;
2218
2218
  case "wake":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
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": {