replicas-cli 0.2.280 → 0.2.282
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 +102 -50
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7556,9 +7556,15 @@ function createErrorResult(error) {
|
|
|
7556
7556
|
|
|
7557
7557
|
// ../shared/src/agent.ts
|
|
7558
7558
|
var VALID_AGENT_PROVIDERS = ["claude", "codex", "cursor", "relay"];
|
|
7559
|
+
var VALID_CODING_AGENT_PROVIDERS = VALID_AGENT_PROVIDERS.filter(
|
|
7560
|
+
(provider) => provider !== "relay"
|
|
7561
|
+
);
|
|
7559
7562
|
function isValidAgentProvider(value) {
|
|
7560
7563
|
return VALID_AGENT_PROVIDERS.some((p) => p === value);
|
|
7561
7564
|
}
|
|
7565
|
+
function isValidCodingAgentProvider(value) {
|
|
7566
|
+
return VALID_CODING_AGENT_PROVIDERS.some((provider) => provider === value);
|
|
7567
|
+
}
|
|
7562
7568
|
var AGENT_PROVIDER_OPTIONS = [
|
|
7563
7569
|
{
|
|
7564
7570
|
value: "claude",
|
|
@@ -7578,7 +7584,7 @@ var AGENT_PROVIDER_OPTIONS = [
|
|
|
7578
7584
|
{
|
|
7579
7585
|
value: "relay",
|
|
7580
7586
|
label: "Relay",
|
|
7581
|
-
description: "Orchestrating agent that delegates to Claude Code and
|
|
7587
|
+
description: "Orchestrating agent that delegates to Claude Code, Codex, and Cursor subagents"
|
|
7582
7588
|
}
|
|
7583
7589
|
];
|
|
7584
7590
|
var VALID_THINKING_LEVELS = ["low", "medium", "high", "max"];
|
|
@@ -7597,6 +7603,9 @@ function getProviderDisplayName(provider, variant = "short") {
|
|
|
7597
7603
|
return variant === "long" ? "Claude Code" : "Claude";
|
|
7598
7604
|
}
|
|
7599
7605
|
}
|
|
7606
|
+
function getCodingAgentDisplayNames() {
|
|
7607
|
+
return VALID_CODING_AGENT_PROVIDERS.map((provider) => getProviderDisplayName(provider)).join(", ");
|
|
7608
|
+
}
|
|
7600
7609
|
|
|
7601
7610
|
// ../shared/src/event.ts
|
|
7602
7611
|
var CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE = "claude-partial-message";
|
|
@@ -7735,9 +7744,61 @@ function parsePrUrl(url) {
|
|
|
7735
7744
|
if (!Number.isFinite(number)) return null;
|
|
7736
7745
|
return { owner, repo, number };
|
|
7737
7746
|
}
|
|
7738
|
-
function
|
|
7739
|
-
const
|
|
7740
|
-
|
|
7747
|
+
function parseCodeHostPrUrl(url) {
|
|
7748
|
+
const github = parsePrUrl(url);
|
|
7749
|
+
if (github) {
|
|
7750
|
+
return {
|
|
7751
|
+
...github,
|
|
7752
|
+
provider: "github",
|
|
7753
|
+
host: "github.com",
|
|
7754
|
+
repositoryPath: `${github.owner}/${github.repo}`,
|
|
7755
|
+
repoUrl: `https://github.com/${github.owner}/${github.repo}`
|
|
7756
|
+
};
|
|
7757
|
+
}
|
|
7758
|
+
let parsed;
|
|
7759
|
+
try {
|
|
7760
|
+
parsed = new URL(url);
|
|
7761
|
+
} catch {
|
|
7762
|
+
return null;
|
|
7763
|
+
}
|
|
7764
|
+
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return null;
|
|
7765
|
+
const segments = parsed.pathname.split("/").filter(Boolean);
|
|
7766
|
+
const separatorIndex = segments.indexOf("-");
|
|
7767
|
+
if (separatorIndex <= 0 || segments[separatorIndex + 1] !== "merge_requests") return null;
|
|
7768
|
+
const number = Number.parseInt(segments[separatorIndex + 2] ?? "", 10);
|
|
7769
|
+
if (!Number.isFinite(number)) return null;
|
|
7770
|
+
const repositorySegments = decodePathSegments(segments.slice(0, separatorIndex));
|
|
7771
|
+
const repo = repositorySegments[repositorySegments.length - 1];
|
|
7772
|
+
const owner = repositorySegments[0];
|
|
7773
|
+
if (!owner || !repo) return null;
|
|
7774
|
+
const repositoryPath = repositorySegments.join("/");
|
|
7775
|
+
return {
|
|
7776
|
+
provider: "gitlab",
|
|
7777
|
+
host: parsed.host.toLowerCase(),
|
|
7778
|
+
owner,
|
|
7779
|
+
repo,
|
|
7780
|
+
number,
|
|
7781
|
+
repositoryPath,
|
|
7782
|
+
repoUrl: `${parsed.origin}/${repositoryPath}`
|
|
7783
|
+
};
|
|
7784
|
+
}
|
|
7785
|
+
function decodePathSegments(segments) {
|
|
7786
|
+
return segments.map((segment) => {
|
|
7787
|
+
try {
|
|
7788
|
+
return decodeURIComponent(segment);
|
|
7789
|
+
} catch {
|
|
7790
|
+
return segment;
|
|
7791
|
+
}
|
|
7792
|
+
});
|
|
7793
|
+
}
|
|
7794
|
+
function getCodeHostRequestNoun(url) {
|
|
7795
|
+
return parseCodeHostPrUrl(url)?.provider === "gitlab" ? "MR" : "PR";
|
|
7796
|
+
}
|
|
7797
|
+
function formatCodeHostRequestRef(url, number) {
|
|
7798
|
+
const parsed = parseCodeHostPrUrl(url);
|
|
7799
|
+
const requestNumber = number ?? parsed?.number;
|
|
7800
|
+
if (!requestNumber) return null;
|
|
7801
|
+
return `${parsed?.provider === "gitlab" ? "!" : "#"}${requestNumber}`;
|
|
7741
7802
|
}
|
|
7742
7803
|
|
|
7743
7804
|
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
@@ -9264,7 +9325,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
9264
9325
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
9265
9326
|
|
|
9266
9327
|
// ../shared/src/cli-version.ts
|
|
9267
|
-
var CLI_VERSION = "0.2.
|
|
9328
|
+
var CLI_VERSION = "0.2.282";
|
|
9268
9329
|
|
|
9269
9330
|
// ../shared/src/engine/environment.ts
|
|
9270
9331
|
var DESKTOP_NOVNC_PORT = 6080;
|
|
@@ -12611,14 +12672,14 @@ Update available: ${currentVersion} \u2192 ${latestVersion}`));
|
|
|
12611
12672
|
// src/commands/replica.ts
|
|
12612
12673
|
import chalk15 from "chalk";
|
|
12613
12674
|
import prompts3 from "prompts";
|
|
12614
|
-
var
|
|
12675
|
+
var CLI_CODING_AGENT_LABEL = getCodingAgentDisplayNames();
|
|
12615
12676
|
function parseReplicaAgent(value) {
|
|
12616
12677
|
if (!value) return void 0;
|
|
12617
12678
|
const normalized = value.trim().toLowerCase();
|
|
12618
|
-
if (
|
|
12679
|
+
if (isValidCodingAgentProvider(normalized)) {
|
|
12619
12680
|
return normalized;
|
|
12620
12681
|
}
|
|
12621
|
-
console.log(chalk15.red(`Invalid coding agent: ${value}. Must be one of: ${
|
|
12682
|
+
console.log(chalk15.red(`Invalid coding agent: ${value}. Must be one of: ${CLI_CODING_AGENT_LABEL}`));
|
|
12622
12683
|
process.exit(1);
|
|
12623
12684
|
}
|
|
12624
12685
|
function formatDate(dateString) {
|
|
@@ -16445,9 +16506,10 @@ function getItemLabel(item) {
|
|
|
16445
16506
|
case "preview":
|
|
16446
16507
|
return `\u2197 Preview :${item.port}`;
|
|
16447
16508
|
case "pr": {
|
|
16448
|
-
const
|
|
16449
|
-
const
|
|
16450
|
-
|
|
16509
|
+
const noun = getCodeHostRequestNoun(item.url);
|
|
16510
|
+
const ref = formatCodeHostRequestRef(item.url);
|
|
16511
|
+
const suffix = ref ? ` ${ref}` : "";
|
|
16512
|
+
return `\u2197 View ${noun} (${item.repoName})${suffix}`;
|
|
16451
16513
|
}
|
|
16452
16514
|
case "diff":
|
|
16453
16515
|
return `\u25B8 Diff +${item.added} -${item.removed}`;
|
|
@@ -16468,8 +16530,8 @@ function getItemId(item) {
|
|
|
16468
16530
|
case "preview":
|
|
16469
16531
|
return `info-preview-${item.port}`;
|
|
16470
16532
|
case "pr": {
|
|
16471
|
-
const
|
|
16472
|
-
return `info-pr-${item.repoName}-${
|
|
16533
|
+
const parsed = parseCodeHostPrUrl(item.url);
|
|
16534
|
+
return `info-pr-${item.repoName}-${parsed?.number ?? item.url}`;
|
|
16473
16535
|
}
|
|
16474
16536
|
case "diff":
|
|
16475
16537
|
return `info-diff-${item.repoName}`;
|
|
@@ -16730,6 +16792,17 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
16730
16792
|
codexAuthMethod: agentAvailability.codex.available ? rawEnv.codexAuthMethod : "none",
|
|
16731
16793
|
cursorAuthMethod: agentAvailability.cursor.available ? rawEnv.cursorAuthMethod : "none"
|
|
16732
16794
|
} : rawEnv;
|
|
16795
|
+
const processingIndicators = [
|
|
16796
|
+
{ label: "Claude", active: status.isClaudeProcessing },
|
|
16797
|
+
{ label: "Codex", active: status.isCodexProcessing },
|
|
16798
|
+
{ label: "Cursor", active: status.isCursorProcessing },
|
|
16799
|
+
{ label: "Relay", active: status.isRelayProcessing }
|
|
16800
|
+
].filter((indicator) => indicator.active);
|
|
16801
|
+
const agentAuthRows = env ? [
|
|
16802
|
+
{ label: "Claude", authMethod: env.claudeAuthMethod },
|
|
16803
|
+
{ label: "Codex", authMethod: env.codexAuthMethod },
|
|
16804
|
+
{ label: "Cursor", authMethod: env.cursorAuthMethod }
|
|
16805
|
+
] : [];
|
|
16733
16806
|
const dashboardItem = findItem("dashboard");
|
|
16734
16807
|
const wakeItem = findItem("wake");
|
|
16735
16808
|
const createPrItem = findItem("createPr");
|
|
@@ -16789,38 +16862,19 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
16789
16862
|
onClick: () => handleAction(wakeItem)
|
|
16790
16863
|
}
|
|
16791
16864
|
),
|
|
16792
|
-
|
|
16793
|
-
|
|
16794
|
-
|
|
16795
|
-
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
"\
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
status.isRelayProcessing && /* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsxs8("span", { fg: "#ffaa00", children: [
|
|
16806
|
-
"\u25C6",
|
|
16807
|
-
" Relay thinking..."
|
|
16808
|
-
] }) })
|
|
16809
|
-
] }),
|
|
16810
|
-
env && /* @__PURE__ */ jsxs8(Section, { title: "Agents", children: [
|
|
16811
|
-
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16812
|
-
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Claude" }) }),
|
|
16813
|
-
/* @__PURE__ */ jsx8("text", { children: AUTH_METHOD_LABELS[env.claudeAuthMethod] ? /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: AUTH_METHOD_LABELS[env.claudeAuthMethod] }) : /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" }) })
|
|
16814
|
-
] }),
|
|
16815
|
-
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16816
|
-
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Codex" }) }),
|
|
16817
|
-
/* @__PURE__ */ jsx8("text", { children: AUTH_METHOD_LABELS[env.codexAuthMethod] ? /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: AUTH_METHOD_LABELS[env.codexAuthMethod] }) : /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" }) })
|
|
16818
|
-
] }),
|
|
16819
|
-
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16820
|
-
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Cursor" }) }),
|
|
16821
|
-
/* @__PURE__ */ jsx8("text", { children: AUTH_METHOD_LABELS[env.cursorAuthMethod] ? /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: AUTH_METHOD_LABELS[env.cursorAuthMethod] }) : /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" }) })
|
|
16822
|
-
] })
|
|
16823
|
-
] }),
|
|
16865
|
+
processingIndicators.length > 0 && /* @__PURE__ */ jsx8("box", { backgroundColor: "#1a1500", paddingX: 1, marginX: 1, marginBottom: 1, children: processingIndicators.map(({ label }) => /* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsxs8("span", { fg: "#ffaa00", children: [
|
|
16866
|
+
"\u25C6",
|
|
16867
|
+
" ",
|
|
16868
|
+
label,
|
|
16869
|
+
" thinking..."
|
|
16870
|
+
] }) }, label)) }),
|
|
16871
|
+
env && /* @__PURE__ */ jsx8(Section, { title: "Agents", children: agentAuthRows.map(({ label, authMethod }) => {
|
|
16872
|
+
const authLabel = AUTH_METHOD_LABELS[authMethod];
|
|
16873
|
+
return /* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16874
|
+
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: label }) }),
|
|
16875
|
+
/* @__PURE__ */ jsx8("text", { children: authLabel ? /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: authLabel }) : /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" }) })
|
|
16876
|
+
] }, label);
|
|
16877
|
+
}) }),
|
|
16824
16878
|
/* @__PURE__ */ jsx8(Section, { title: "View", children: (() => {
|
|
16825
16879
|
const chatItem = findItem("view-chat");
|
|
16826
16880
|
const diffItem = findItem("view-diff");
|
|
@@ -17107,6 +17161,9 @@ function AppInner() {
|
|
|
17107
17161
|
const { data: setsData } = useRepositorySets();
|
|
17108
17162
|
const { data: envsData } = useEnvironments();
|
|
17109
17163
|
const workspaces = workspacesData?.workspaces ?? [];
|
|
17164
|
+
if (!selectedWorkspaceId && workspaces.length > 0) {
|
|
17165
|
+
setSelectedWorkspaceId(workspaces[0].id);
|
|
17166
|
+
}
|
|
17110
17167
|
const selectedWorkspace = workspaces.find((ws) => ws.id === selectedWorkspaceId) ?? null;
|
|
17111
17168
|
const isMockSelected = selectedWorkspace?.status === "preparing";
|
|
17112
17169
|
const { data: statusData, isLoading: loadingStatus } = useWorkspaceStatus(
|
|
@@ -17159,11 +17216,6 @@ function AppInner() {
|
|
|
17159
17216
|
}, [isMockSelected, mockMessages, historyData, selectedChat?.provider]);
|
|
17160
17217
|
const showInfoPanel = width >= 100;
|
|
17161
17218
|
const showWorkspacePanel = width >= 60;
|
|
17162
|
-
useEffect3(() => {
|
|
17163
|
-
if (!selectedWorkspaceId && workspaces.length > 0) {
|
|
17164
|
-
setSelectedWorkspaceId(workspaces[0].id);
|
|
17165
|
-
}
|
|
17166
|
-
}, [workspaces, selectedWorkspaceId]);
|
|
17167
17219
|
const [prevIsMockSelected, setPrevIsMockSelected] = useState8(isMockSelected);
|
|
17168
17220
|
if (prevIsMockSelected !== isMockSelected) {
|
|
17169
17221
|
setPrevIsMockSelected(isMockSelected);
|