theclawbay 0.3.48 → 0.3.49
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/commands/setup.js +38 -4
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -61,7 +61,7 @@ const SHELL_END = "# theclawbay-shell-managed:end";
|
|
|
61
61
|
const OPENCLAW_PROVIDER_ID = DEFAULT_PROVIDER_ID;
|
|
62
62
|
const HISTORY_PROVIDER_NEUTRALIZE_SOURCES = new Set(["openai", "theclawbay-wan", DEFAULT_PROVIDER_ID]);
|
|
63
63
|
const HISTORY_PROVIDER_DB_MIGRATE_SOURCES = ["openai", "theclawbay-wan"];
|
|
64
|
-
const SETUP_CLIENT_IDS = ["codex", "continue", "cline", "openclaw", "opencode", "kilo", "roo", "trae", "aider", "zo"];
|
|
64
|
+
const SETUP_CLIENT_IDS = ["codex", "claude", "continue", "cline", "openclaw", "opencode", "kilo", "roo", "trae", "aider", "zo"];
|
|
65
65
|
const LEGACY_THECLAWBAY_OPENAI_PROXY_SUFFIX = "/api/codex-auth/v1/proxy/v1";
|
|
66
66
|
const CANONICAL_THECLAWBAY_OPENAI_PROXY_SUFFIX = "/v1";
|
|
67
67
|
const CANONICAL_CODEX_NATIVE_PROXY_SUFFIX = "/backend-api/codex";
|
|
@@ -1116,6 +1116,20 @@ async function detectContinueClient() {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
return (await detectExtensionHosts(["continue.continue-"])).length > 0;
|
|
1118
1118
|
}
|
|
1119
|
+
async function detectClaudeCodeClient() {
|
|
1120
|
+
if (hasCommand("claude"))
|
|
1121
|
+
return true;
|
|
1122
|
+
const candidates = [
|
|
1123
|
+
node_path_1.default.join(node_os_1.default.homedir(), ".claude"),
|
|
1124
|
+
node_path_1.default.join(node_os_1.default.homedir(), ".claude.json"),
|
|
1125
|
+
node_path_1.default.join(node_os_1.default.homedir(), ".config", "claude"),
|
|
1126
|
+
];
|
|
1127
|
+
for (const candidate of candidates) {
|
|
1128
|
+
if (await pathExists(candidate))
|
|
1129
|
+
return true;
|
|
1130
|
+
}
|
|
1131
|
+
return false;
|
|
1132
|
+
}
|
|
1119
1133
|
async function detectClineClient() {
|
|
1120
1134
|
if (hasCommand("cline"))
|
|
1121
1135
|
return true;
|
|
@@ -1952,8 +1966,9 @@ class SetupCommand extends base_command_1.BaseCommand {
|
|
|
1952
1966
|
managed?.backendUrl ??
|
|
1953
1967
|
DEFAULT_BACKEND_URL;
|
|
1954
1968
|
const backendUrl = normalizeUrl(backendRaw, "--backend");
|
|
1955
|
-
const [codexDetected, continueDetected, clineDetected, kiloDetected, rooDetected, traeDetected, aiderDetected, zoDetected] = await Promise.all([
|
|
1969
|
+
const [codexDetected, claudeDetected, continueDetected, clineDetected, kiloDetected, rooDetected, traeDetected, aiderDetected, zoDetected] = await Promise.all([
|
|
1956
1970
|
detectCodexClient(),
|
|
1971
|
+
detectClaudeCodeClient(),
|
|
1957
1972
|
detectContinueClient(),
|
|
1958
1973
|
detectClineClient(),
|
|
1959
1974
|
detectKiloClient(),
|
|
@@ -1972,6 +1987,15 @@ class SetupCommand extends base_command_1.BaseCommand {
|
|
|
1972
1987
|
icon: "◎",
|
|
1973
1988
|
siteUrl: "https://openai.com/codex",
|
|
1974
1989
|
},
|
|
1990
|
+
{
|
|
1991
|
+
id: "claude",
|
|
1992
|
+
label: "Claude Code CLI",
|
|
1993
|
+
summaryLabel: "Claude Code",
|
|
1994
|
+
detected: claudeDetected,
|
|
1995
|
+
recommended: true,
|
|
1996
|
+
icon: "✳",
|
|
1997
|
+
siteUrl: "https://code.claude.com",
|
|
1998
|
+
},
|
|
1975
1999
|
{
|
|
1976
2000
|
id: "continue",
|
|
1977
2001
|
label: "Continue",
|
|
@@ -2314,6 +2338,7 @@ class SetupCommand extends base_command_1.BaseCommand {
|
|
|
2314
2338
|
this.log(resolved.note);
|
|
2315
2339
|
if (claudeAccess?.enabled) {
|
|
2316
2340
|
this.log(`- Claude Code base URL: ${anthropicCompatibleProxyUrl(backendUrl)}`);
|
|
2341
|
+
this.log(`- Claude Code selected: ${selectedSetupClients.has("claude") ? "yes" : "no"}`);
|
|
2317
2342
|
}
|
|
2318
2343
|
else if (claudeAccess?.note) {
|
|
2319
2344
|
this.log(`- Claude Code: ${claudeAccess.note}`);
|
|
@@ -2479,6 +2504,15 @@ class SetupCommand extends base_command_1.BaseCommand {
|
|
|
2479
2504
|
else {
|
|
2480
2505
|
this.log("- Zo: not detected (skipped)");
|
|
2481
2506
|
}
|
|
2507
|
+
if (selectedSetupClients.has("claude")) {
|
|
2508
|
+
this.log(`- Claude Code: ${claudeAccess?.enabled ? "configured via shared env" : "selected, but no Claude access was detected for this credential"}`);
|
|
2509
|
+
}
|
|
2510
|
+
else if (claudeDetected) {
|
|
2511
|
+
this.log("- Claude Code: detected but skipped");
|
|
2512
|
+
}
|
|
2513
|
+
else {
|
|
2514
|
+
this.log("- Claude Code: not detected (skipped)");
|
|
2515
|
+
}
|
|
2482
2516
|
if (authSeed?.action === "seeded" && authSeed.mode === "chatgpt-auth-tokens") {
|
|
2483
2517
|
this.log("- Codex login state: seeded local Codex auth so remaining usage can be shown.");
|
|
2484
2518
|
}
|
|
@@ -2513,7 +2547,7 @@ class SetupCommand extends base_command_1.BaseCommand {
|
|
|
2513
2547
|
});
|
|
2514
2548
|
}
|
|
2515
2549
|
}
|
|
2516
|
-
SetupCommand.description = "One-time setup: configure Codex plus any detected Continue, Cline, OpenClaw, OpenCode, Kilo, Roo Code, Trae, Aider, or Zo installs to use The Claw Bay";
|
|
2550
|
+
SetupCommand.description = "One-time setup: configure Codex, Claude Code, plus any detected Continue, Cline, OpenClaw, OpenCode, Kilo, Roo Code, Trae, Aider, or Zo installs to use The Claw Bay";
|
|
2517
2551
|
SetupCommand.flags = {
|
|
2518
2552
|
backend: core_1.Flags.string({
|
|
2519
2553
|
required: false,
|
|
@@ -2531,7 +2565,7 @@ SetupCommand.flags = {
|
|
|
2531
2565
|
}),
|
|
2532
2566
|
clients: core_1.Flags.string({
|
|
2533
2567
|
required: false,
|
|
2534
|
-
description: "Detected local clients to configure: codex, continue, cline, openclaw, opencode, kilo, roo, trae, aider, zo",
|
|
2568
|
+
description: "Detected local clients to configure: codex, claude, continue, cline, openclaw, opencode, kilo, roo, trae, aider, zo",
|
|
2535
2569
|
}),
|
|
2536
2570
|
yes: core_1.Flags.boolean({
|
|
2537
2571
|
required: false,
|
package/package.json
CHANGED