replicas-cli 0.2.281 → 0.2.283
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 +49 -43
- 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";
|
|
@@ -9295,6 +9304,12 @@ var DEFAULT_DEFAULT_SKILLS = {
|
|
|
9295
9304
|
|
|
9296
9305
|
// ../shared/src/prompts.ts
|
|
9297
9306
|
var REPLICAS_INSTRUCTIONS_TAG = "replicas_instructions";
|
|
9307
|
+
var CREATE_PR_PROMPT = "Push changes and open a pull request (or a merge request for GitLab repositories).";
|
|
9308
|
+
function buildCreatePrPrompt(providers) {
|
|
9309
|
+
const distinct = new Set(providers.filter((p) => p === "github" || p === "gitlab"));
|
|
9310
|
+
if (distinct.size !== 1) return CREATE_PR_PROMPT;
|
|
9311
|
+
return distinct.has("gitlab") ? "Push changes and open a merge request." : "Push changes and create a pull request.";
|
|
9312
|
+
}
|
|
9298
9313
|
function removeTag(text, tag) {
|
|
9299
9314
|
const regex = new RegExp(`<${tag}>[\\s\\S]*?</${tag}>`, "g");
|
|
9300
9315
|
return text.replace(regex, "").trim();
|
|
@@ -9316,7 +9331,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
9316
9331
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
9317
9332
|
|
|
9318
9333
|
// ../shared/src/cli-version.ts
|
|
9319
|
-
var CLI_VERSION = "0.2.
|
|
9334
|
+
var CLI_VERSION = "0.2.283";
|
|
9320
9335
|
|
|
9321
9336
|
// ../shared/src/engine/environment.ts
|
|
9322
9337
|
var DESKTOP_NOVNC_PORT = 6080;
|
|
@@ -12663,14 +12678,14 @@ Update available: ${currentVersion} \u2192 ${latestVersion}`));
|
|
|
12663
12678
|
// src/commands/replica.ts
|
|
12664
12679
|
import chalk15 from "chalk";
|
|
12665
12680
|
import prompts3 from "prompts";
|
|
12666
|
-
var
|
|
12681
|
+
var CLI_CODING_AGENT_LABEL = getCodingAgentDisplayNames();
|
|
12667
12682
|
function parseReplicaAgent(value) {
|
|
12668
12683
|
if (!value) return void 0;
|
|
12669
12684
|
const normalized = value.trim().toLowerCase();
|
|
12670
|
-
if (
|
|
12685
|
+
if (isValidCodingAgentProvider(normalized)) {
|
|
12671
12686
|
return normalized;
|
|
12672
12687
|
}
|
|
12673
|
-
console.log(chalk15.red(`Invalid coding agent: ${value}. Must be one of: ${
|
|
12688
|
+
console.log(chalk15.red(`Invalid coding agent: ${value}. Must be one of: ${CLI_CODING_AGENT_LABEL}`));
|
|
12674
12689
|
process.exit(1);
|
|
12675
12690
|
}
|
|
12676
12691
|
function formatDate(dateString) {
|
|
@@ -16783,6 +16798,17 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
16783
16798
|
codexAuthMethod: agentAvailability.codex.available ? rawEnv.codexAuthMethod : "none",
|
|
16784
16799
|
cursorAuthMethod: agentAvailability.cursor.available ? rawEnv.cursorAuthMethod : "none"
|
|
16785
16800
|
} : rawEnv;
|
|
16801
|
+
const processingIndicators = [
|
|
16802
|
+
{ label: "Claude", active: status.isClaudeProcessing },
|
|
16803
|
+
{ label: "Codex", active: status.isCodexProcessing },
|
|
16804
|
+
{ label: "Cursor", active: status.isCursorProcessing },
|
|
16805
|
+
{ label: "Relay", active: status.isRelayProcessing }
|
|
16806
|
+
].filter((indicator) => indicator.active);
|
|
16807
|
+
const agentAuthRows = env ? [
|
|
16808
|
+
{ label: "Claude", authMethod: env.claudeAuthMethod },
|
|
16809
|
+
{ label: "Codex", authMethod: env.codexAuthMethod },
|
|
16810
|
+
{ label: "Cursor", authMethod: env.cursorAuthMethod }
|
|
16811
|
+
] : [];
|
|
16786
16812
|
const dashboardItem = findItem("dashboard");
|
|
16787
16813
|
const wakeItem = findItem("wake");
|
|
16788
16814
|
const createPrItem = findItem("createPr");
|
|
@@ -16842,38 +16868,19 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
16842
16868
|
onClick: () => handleAction(wakeItem)
|
|
16843
16869
|
}
|
|
16844
16870
|
),
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
"\
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
status.isRelayProcessing && /* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsxs8("span", { fg: "#ffaa00", children: [
|
|
16859
|
-
"\u25C6",
|
|
16860
|
-
" Relay thinking..."
|
|
16861
|
-
] }) })
|
|
16862
|
-
] }),
|
|
16863
|
-
env && /* @__PURE__ */ jsxs8(Section, { title: "Agents", children: [
|
|
16864
|
-
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16865
|
-
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Claude" }) }),
|
|
16866
|
-
/* @__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" }) })
|
|
16867
|
-
] }),
|
|
16868
|
-
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16869
|
-
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Codex" }) }),
|
|
16870
|
-
/* @__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" }) })
|
|
16871
|
-
] }),
|
|
16872
|
-
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16873
|
-
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Cursor" }) }),
|
|
16874
|
-
/* @__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" }) })
|
|
16875
|
-
] })
|
|
16876
|
-
] }),
|
|
16871
|
+
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: [
|
|
16872
|
+
"\u25C6",
|
|
16873
|
+
" ",
|
|
16874
|
+
label,
|
|
16875
|
+
" thinking..."
|
|
16876
|
+
] }) }, label)) }),
|
|
16877
|
+
env && /* @__PURE__ */ jsx8(Section, { title: "Agents", children: agentAuthRows.map(({ label, authMethod }) => {
|
|
16878
|
+
const authLabel = AUTH_METHOD_LABELS[authMethod];
|
|
16879
|
+
return /* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
16880
|
+
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: label }) }),
|
|
16881
|
+
/* @__PURE__ */ jsx8("text", { children: authLabel ? /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: authLabel }) : /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" }) })
|
|
16882
|
+
] }, label);
|
|
16883
|
+
}) }),
|
|
16877
16884
|
/* @__PURE__ */ jsx8(Section, { title: "View", children: (() => {
|
|
16878
16885
|
const chatItem = findItem("view-chat");
|
|
16879
16886
|
const diffItem = findItem("view-diff");
|
|
@@ -17160,6 +17167,9 @@ function AppInner() {
|
|
|
17160
17167
|
const { data: setsData } = useRepositorySets();
|
|
17161
17168
|
const { data: envsData } = useEnvironments();
|
|
17162
17169
|
const workspaces = workspacesData?.workspaces ?? [];
|
|
17170
|
+
if (!selectedWorkspaceId && workspaces.length > 0) {
|
|
17171
|
+
setSelectedWorkspaceId(workspaces[0].id);
|
|
17172
|
+
}
|
|
17163
17173
|
const selectedWorkspace = workspaces.find((ws) => ws.id === selectedWorkspaceId) ?? null;
|
|
17164
17174
|
const isMockSelected = selectedWorkspace?.status === "preparing";
|
|
17165
17175
|
const { data: statusData, isLoading: loadingStatus } = useWorkspaceStatus(
|
|
@@ -17212,11 +17222,6 @@ function AppInner() {
|
|
|
17212
17222
|
}, [isMockSelected, mockMessages, historyData, selectedChat?.provider]);
|
|
17213
17223
|
const showInfoPanel = width >= 100;
|
|
17214
17224
|
const showWorkspacePanel = width >= 60;
|
|
17215
|
-
useEffect3(() => {
|
|
17216
|
-
if (!selectedWorkspaceId && workspaces.length > 0) {
|
|
17217
|
-
setSelectedWorkspaceId(workspaces[0].id);
|
|
17218
|
-
}
|
|
17219
|
-
}, [workspaces, selectedWorkspaceId]);
|
|
17220
17225
|
const [prevIsMockSelected, setPrevIsMockSelected] = useState8(isMockSelected);
|
|
17221
17226
|
if (prevIsMockSelected !== isMockSelected) {
|
|
17222
17227
|
setPrevIsMockSelected(isMockSelected);
|
|
@@ -17505,7 +17510,8 @@ function AppInner() {
|
|
|
17505
17510
|
onViewDiff: handleViewDiff,
|
|
17506
17511
|
onCreatePr: () => {
|
|
17507
17512
|
if (!resolvedChatId) return;
|
|
17508
|
-
|
|
17513
|
+
const providers = (statusData?.repoStatuses ?? []).map((repo) => repo.provider);
|
|
17514
|
+
sendMessageMutation.mutate({ message: buildCreatePrPrompt(providers) });
|
|
17509
17515
|
},
|
|
17510
17516
|
isPlanMode: taskMode === "plan",
|
|
17511
17517
|
wakingWorkspaceId,
|