@gitlawb/openclaude 0.1.5 → 0.1.6
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/README.md +5 -0
- package/dist/cli.mjs +139 -65
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,6 +18,8 @@ npm install -g @gitlawb/openclaude
|
|
|
18
18
|
|
|
19
19
|
### Option B: From source (requires Bun)
|
|
20
20
|
|
|
21
|
+
Use Bun `1.3.11` or newer for source builds on Windows. Older Bun versions such as `1.3.4` can fail with a large batch of unresolved module errors during `bun run build`.
|
|
22
|
+
|
|
21
23
|
```bash
|
|
22
24
|
# Clone from gitlawb
|
|
23
25
|
git clone https://node.gitlawb.com/z6MkqDnb7Siv3Cwj7pGJq4T5EsUisECqR8KpnDLwcaZq5TPr/openclaude.git
|
|
@@ -187,9 +189,12 @@ export OPENAI_MODEL=gpt-4o
|
|
|
187
189
|
| `CODEX_API_KEY` | Codex only | Codex/ChatGPT access token override |
|
|
188
190
|
| `CODEX_AUTH_JSON_PATH` | Codex only | Path to a Codex CLI `auth.json` file |
|
|
189
191
|
| `CODEX_HOME` | Codex only | Alternative Codex home directory (`auth.json` will be read from here) |
|
|
192
|
+
| `OPENCLAUDE_DISABLE_CO_AUTHORED_BY` | No | Set to `1` to suppress the default `Co-Authored-By` trailer in generated git commit messages |
|
|
190
193
|
|
|
191
194
|
You can also use `ANTHROPIC_MODEL` to override the model name. `OPENAI_MODEL` takes priority.
|
|
192
195
|
|
|
196
|
+
OpenClaude PR bodies use OpenClaude branding by default. `OPENCLAUDE_DISABLE_CO_AUTHORED_BY` only affects the commit trailer, not PR attribution text.
|
|
197
|
+
|
|
193
198
|
---
|
|
194
199
|
|
|
195
200
|
## Runtime Hardening
|
package/dist/cli.mjs
CHANGED
|
@@ -107371,7 +107371,7 @@ function shouldBypassProxy(urlString, noProxy = getNoProxy()) {
|
|
|
107371
107371
|
try {
|
|
107372
107372
|
const url3 = new URL(urlString);
|
|
107373
107373
|
const hostname2 = url3.hostname.toLowerCase();
|
|
107374
|
-
const port = url3.port || (url3.protocol === "https:" ? "443" : "80");
|
|
107374
|
+
const port = url3.port || (url3.protocol === "https:" || url3.protocol === "wss:" ? "443" : "80");
|
|
107375
107375
|
const hostWithPort = `${hostname2}:${port}`;
|
|
107376
107376
|
const noProxyList = noProxy.split(/[,\s]+/).filter(Boolean);
|
|
107377
107377
|
return noProxyList.some((pattern) => {
|
|
@@ -107837,6 +107837,9 @@ var init_configs = __esm(() => {
|
|
|
107837
107837
|
function getAPIProvider() {
|
|
107838
107838
|
return isEnvTruthy(process.env.CLAUDE_CODE_USE_GEMINI) ? "gemini" : isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) ? "openai" : isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ? "bedrock" : isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ? "vertex" : isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ? "foundry" : "firstParty";
|
|
107839
107839
|
}
|
|
107840
|
+
function usesAnthropicAccountFlow() {
|
|
107841
|
+
return getAPIProvider() === "firstParty";
|
|
107842
|
+
}
|
|
107840
107843
|
function getAPIProviderForStatsig() {
|
|
107841
107844
|
return getAPIProvider();
|
|
107842
107845
|
}
|
|
@@ -110458,7 +110461,8 @@ function convertMessages(messages, system) {
|
|
|
110458
110461
|
function: {
|
|
110459
110462
|
name: tu.name ?? "unknown",
|
|
110460
110463
|
arguments: typeof tu.input === "string" ? tu.input : JSON.stringify(tu.input ?? {})
|
|
110461
|
-
}
|
|
110464
|
+
},
|
|
110465
|
+
...tu.extra_content ? { extra_content: tu.extra_content } : {}
|
|
110462
110466
|
}));
|
|
110463
110467
|
}
|
|
110464
110468
|
result.push(assistantMsg);
|
|
@@ -110472,32 +110476,39 @@ function convertMessages(messages, system) {
|
|
|
110472
110476
|
}
|
|
110473
110477
|
return result;
|
|
110474
110478
|
}
|
|
110475
|
-
function normalizeSchemaForOpenAI(schema) {
|
|
110479
|
+
function normalizeSchemaForOpenAI(schema, strict = true) {
|
|
110476
110480
|
if (schema.type !== "object" || !schema.properties)
|
|
110477
110481
|
return schema;
|
|
110478
110482
|
const properties = schema.properties;
|
|
110479
110483
|
const existingRequired = Array.isArray(schema.required) ? schema.required : [];
|
|
110480
|
-
|
|
110481
|
-
|
|
110484
|
+
if (strict) {
|
|
110485
|
+
const allKeys = Object.keys(properties);
|
|
110486
|
+
const required3 = Array.from(new Set([...existingRequired, ...allKeys]));
|
|
110487
|
+
return { ...schema, required: required3 };
|
|
110488
|
+
}
|
|
110489
|
+
const required2 = existingRequired.filter((k) => (k in properties));
|
|
110482
110490
|
return { ...schema, required: required2 };
|
|
110483
110491
|
}
|
|
110484
110492
|
function convertTools(tools) {
|
|
110493
|
+
const isGemini = process.env.CLAUDE_CODE_USE_GEMINI === "1" || process.env.CLAUDE_CODE_USE_GEMINI === "true";
|
|
110485
110494
|
return tools.filter((t) => t.name !== "ToolSearchTool").map((t) => {
|
|
110486
|
-
const schema = t.input_schema ?? { type: "object", properties: {} };
|
|
110495
|
+
const schema = { ...t.input_schema ?? { type: "object", properties: {} } };
|
|
110487
110496
|
if (t.name === "Agent" && schema.properties) {
|
|
110488
|
-
|
|
110497
|
+
const props = schema.properties;
|
|
110498
|
+
if (!Array.isArray(schema.required))
|
|
110489
110499
|
schema.required = [];
|
|
110490
|
-
|
|
110491
|
-
|
|
110492
|
-
|
|
110493
|
-
|
|
110500
|
+
const req = schema.required;
|
|
110501
|
+
for (const key of ["message", "subagent_type"]) {
|
|
110502
|
+
if (key in props && !req.includes(key))
|
|
110503
|
+
req.push(key);
|
|
110504
|
+
}
|
|
110494
110505
|
}
|
|
110495
110506
|
return {
|
|
110496
110507
|
type: "function",
|
|
110497
110508
|
function: {
|
|
110498
110509
|
name: t.name,
|
|
110499
110510
|
description: t.description ?? "",
|
|
110500
|
-
parameters: normalizeSchemaForOpenAI(schema)
|
|
110511
|
+
parameters: normalizeSchemaForOpenAI(schema, !isGemini)
|
|
110501
110512
|
}
|
|
110502
110513
|
};
|
|
110503
110514
|
});
|
|
@@ -110569,7 +110580,7 @@ async function* openaiStreamToAnthropic(response, model) {
|
|
|
110569
110580
|
const chunkUsage = convertChunkUsage(chunk.usage);
|
|
110570
110581
|
for (const choice of chunk.choices ?? []) {
|
|
110571
110582
|
const delta = choice.delta;
|
|
110572
|
-
if (delta.content) {
|
|
110583
|
+
if (delta.content != null) {
|
|
110573
110584
|
if (!hasEmittedContentStart) {
|
|
110574
110585
|
yield {
|
|
110575
110586
|
type: "content_block_start",
|
|
@@ -110608,7 +110619,8 @@ async function* openaiStreamToAnthropic(response, model) {
|
|
|
110608
110619
|
type: "tool_use",
|
|
110609
110620
|
id: tc.id,
|
|
110610
110621
|
name: tc.function.name,
|
|
110611
|
-
input: {}
|
|
110622
|
+
input: {},
|
|
110623
|
+
...tc.extra_content ? { extra_content: tc.extra_content } : {}
|
|
110612
110624
|
}
|
|
110613
110625
|
};
|
|
110614
110626
|
contentBlockIndex++;
|
|
@@ -110731,9 +110743,13 @@ class OpenAIShimMessages {
|
|
|
110731
110743
|
const body = {
|
|
110732
110744
|
model: request.resolvedModel,
|
|
110733
110745
|
messages: openaiMessages,
|
|
110734
|
-
max_tokens: params.max_tokens,
|
|
110735
110746
|
stream: params.stream ?? false
|
|
110736
110747
|
};
|
|
110748
|
+
if (params.max_tokens !== undefined) {
|
|
110749
|
+
body.max_completion_tokens = params.max_tokens;
|
|
110750
|
+
} else if (params.max_completion_tokens !== undefined) {
|
|
110751
|
+
body.max_completion_tokens = params.max_completion_tokens;
|
|
110752
|
+
}
|
|
110737
110753
|
if (params.stream) {
|
|
110738
110754
|
body.stream_options = { include_usage: true };
|
|
110739
110755
|
}
|
|
@@ -110768,10 +110784,29 @@ class OpenAIShimMessages {
|
|
|
110768
110784
|
...options?.headers ?? {}
|
|
110769
110785
|
};
|
|
110770
110786
|
const apiKey = process.env.OPENAI_API_KEY ?? "";
|
|
110787
|
+
const isAzure = /cognitiveservices\.azure\.com|openai\.azure\.com/.test(request.baseUrl);
|
|
110771
110788
|
if (apiKey) {
|
|
110772
|
-
|
|
110789
|
+
if (isAzure) {
|
|
110790
|
+
headers["api-key"] = apiKey;
|
|
110791
|
+
} else {
|
|
110792
|
+
headers.Authorization = `Bearer ${apiKey}`;
|
|
110793
|
+
}
|
|
110773
110794
|
}
|
|
110774
|
-
|
|
110795
|
+
let chatCompletionsUrl;
|
|
110796
|
+
if (isAzure) {
|
|
110797
|
+
const apiVersion = process.env.AZURE_OPENAI_API_VERSION ?? "2024-12-01-preview";
|
|
110798
|
+
const deployment = request.resolvedModel ?? process.env.OPENAI_MODEL ?? "gpt-4o";
|
|
110799
|
+
if (/\/deployments\//i.test(request.baseUrl)) {
|
|
110800
|
+
const base2 = request.baseUrl.replace(/\/+$/, "");
|
|
110801
|
+
chatCompletionsUrl = `${base2}/chat/completions?api-version=${apiVersion}`;
|
|
110802
|
+
} else {
|
|
110803
|
+
const base2 = request.baseUrl.replace(/\/(openai\/)?v1\/?$/, "").replace(/\/+$/, "");
|
|
110804
|
+
chatCompletionsUrl = `${base2}/openai/deployments/${deployment}/chat/completions?api-version=${apiVersion}`;
|
|
110805
|
+
}
|
|
110806
|
+
} else {
|
|
110807
|
+
chatCompletionsUrl = `${request.baseUrl}/chat/completions`;
|
|
110808
|
+
}
|
|
110809
|
+
const response = await fetch(chatCompletionsUrl, {
|
|
110775
110810
|
method: "POST",
|
|
110776
110811
|
headers,
|
|
110777
110812
|
body: JSON.stringify(body),
|
|
@@ -110801,7 +110836,8 @@ class OpenAIShimMessages {
|
|
|
110801
110836
|
type: "tool_use",
|
|
110802
110837
|
id: tc.id,
|
|
110803
110838
|
name: tc.function.name,
|
|
110804
|
-
input
|
|
110839
|
+
input,
|
|
110840
|
+
...tc.extra_content ? { extra_content: tc.extra_content } : {}
|
|
110805
110841
|
});
|
|
110806
110842
|
}
|
|
110807
110843
|
}
|
|
@@ -117749,6 +117785,9 @@ function getOpenAIMaxOutputTokens(model) {
|
|
|
117749
117785
|
var OPENAI_CONTEXT_WINDOWS, OPENAI_MAX_OUTPUT_TOKENS;
|
|
117750
117786
|
var init_openaiContextWindows = __esm(() => {
|
|
117751
117787
|
OPENAI_CONTEXT_WINDOWS = {
|
|
117788
|
+
"gpt-5.4": 1050000,
|
|
117789
|
+
"gpt-5.4-mini": 400000,
|
|
117790
|
+
"gpt-5.4-nano": 400000,
|
|
117752
117791
|
"gpt-4o": 128000,
|
|
117753
117792
|
"gpt-4o-mini": 128000,
|
|
117754
117793
|
"gpt-4.1": 1047576,
|
|
@@ -117781,6 +117820,9 @@ var init_openaiContextWindows = __esm(() => {
|
|
|
117781
117820
|
"codellama:13b": 16384
|
|
117782
117821
|
};
|
|
117783
117822
|
OPENAI_MAX_OUTPUT_TOKENS = {
|
|
117823
|
+
"gpt-5.4": 128000,
|
|
117824
|
+
"gpt-5.4-mini": 128000,
|
|
117825
|
+
"gpt-5.4-nano": 128000,
|
|
117784
117826
|
"gpt-4o": 16384,
|
|
117785
117827
|
"gpt-4o-mini": 16384,
|
|
117786
117828
|
"gpt-4.1": 32768,
|
|
@@ -121500,14 +121542,12 @@ var init_user = __esm(() => {
|
|
|
121500
121542
|
|
|
121501
121543
|
// src/services/analytics/config.ts
|
|
121502
121544
|
function isAnalyticsDisabled() {
|
|
121503
|
-
return
|
|
121545
|
+
return true;
|
|
121504
121546
|
}
|
|
121505
121547
|
function isFeedbackSurveyDisabled() {
|
|
121506
121548
|
return isTelemetryDisabled();
|
|
121507
121549
|
}
|
|
121508
|
-
var init_config =
|
|
121509
|
-
init_envUtils();
|
|
121510
|
-
});
|
|
121550
|
+
var init_config = () => {};
|
|
121511
121551
|
|
|
121512
121552
|
// src/types/generated/google/protobuf/timestamp.ts
|
|
121513
121553
|
function createBaseTimestamp() {
|
|
@@ -123162,7 +123202,7 @@ var init_metadata = __esm(() => {
|
|
|
123162
123202
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
123163
123203
|
version: "99.0.0",
|
|
123164
123204
|
versionBase: getVersionBase(),
|
|
123165
|
-
buildTime: "2026-04-
|
|
123205
|
+
buildTime: "2026-04-02T03:17:59.855Z",
|
|
123166
123206
|
deploymentEnvironment: env3.detectDeploymentEnvironment(),
|
|
123167
123207
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
123168
123208
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -276313,7 +276353,7 @@ async function installOrUpdateClaudePackage(channel, specificVersion) {
|
|
|
276313
276353
|
return "install_failed";
|
|
276314
276354
|
}
|
|
276315
276355
|
const versionSpec = specificVersion ? specificVersion : channel === "stable" ? "stable" : "latest";
|
|
276316
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${
|
|
276356
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${"@gitlawb/openclaude"}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
|
|
276317
276357
|
if (result.code !== 0) {
|
|
276318
276358
|
const error42 = new Error(`Failed to install Claude CLI package: ${result.stderr}`);
|
|
276319
276359
|
logError2(error42);
|
|
@@ -276621,7 +276661,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
276621
276661
|
}
|
|
276622
276662
|
async function getLatestVersion(channel) {
|
|
276623
276663
|
const npmTag = channel === "stable" ? "stable" : "latest";
|
|
276624
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${
|
|
276664
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${"@gitlawb/openclaude"}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir19() });
|
|
276625
276665
|
if (result.code !== 0) {
|
|
276626
276666
|
logForDebugging2(`npm view failed with code ${result.code}`);
|
|
276627
276667
|
if (result.stderr) {
|
|
@@ -276637,7 +276677,7 @@ async function getLatestVersion(channel) {
|
|
|
276637
276677
|
return result.stdout.trim();
|
|
276638
276678
|
}
|
|
276639
276679
|
async function getNpmDistTags() {
|
|
276640
|
-
const result = await execFileNoThrowWithCwd("npm", ["view",
|
|
276680
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", "@gitlawb/openclaude", "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir19() });
|
|
276641
276681
|
if (result.code !== 0) {
|
|
276642
276682
|
logForDebugging2(`npm view dist-tags failed with code ${result.code}`);
|
|
276643
276683
|
return { latest: null, stable: null };
|
|
@@ -276705,7 +276745,7 @@ To fix this issue:
|
|
|
276705
276745
|
if (!hasPermissions) {
|
|
276706
276746
|
return "no_permissions";
|
|
276707
276747
|
}
|
|
276708
|
-
const packageSpec = specificVersion ? `${
|
|
276748
|
+
const packageSpec = specificVersion ? `${"@gitlawb/openclaude"}@${specificVersion}` : "@gitlawb/openclaude";
|
|
276709
276749
|
const packageManager = env3.isRunningWithBun() ? "bun" : "npm";
|
|
276710
276750
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir19() });
|
|
276711
276751
|
if (installResult.code !== 0) {
|
|
@@ -277037,8 +277077,8 @@ async function detectMultipleInstallations() {
|
|
|
277037
277077
|
installations.push({ type: "npm-local", path: localPath });
|
|
277038
277078
|
}
|
|
277039
277079
|
const packagesToCheck = ["@anthropic-ai/claude-code"];
|
|
277040
|
-
if (
|
|
277041
|
-
packagesToCheck.push(
|
|
277080
|
+
if (true) {
|
|
277081
|
+
packagesToCheck.push("@gitlawb/openclaude");
|
|
277042
277082
|
}
|
|
277043
277083
|
const npmResult = await execFileNoThrow("npm", [
|
|
277044
277084
|
"-g",
|
|
@@ -277233,8 +277273,8 @@ async function getDoctorDiagnostic() {
|
|
|
277233
277273
|
for (const install of npmInstalls) {
|
|
277234
277274
|
if (install.type === "npm-global") {
|
|
277235
277275
|
let uninstallCmd = "npm -g uninstall @anthropic-ai/claude-code";
|
|
277236
|
-
if (
|
|
277237
|
-
uninstallCmd += ` && npm -g uninstall ${
|
|
277276
|
+
if (true) {
|
|
277277
|
+
uninstallCmd += ` && npm -g uninstall ${"@gitlawb/openclaude"}`;
|
|
277238
277278
|
}
|
|
277239
277279
|
warnings.push({
|
|
277240
277280
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -277346,7 +277386,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
277346
277386
|
const startTime = Date.now();
|
|
277347
277387
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
277348
277388
|
"view",
|
|
277349
|
-
`${
|
|
277389
|
+
`${undefined}@${tag2}`,
|
|
277350
277390
|
"version",
|
|
277351
277391
|
"--prefer-online",
|
|
277352
277392
|
"--registry",
|
|
@@ -277370,7 +277410,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
277370
277410
|
latency_ms: latencyMs,
|
|
277371
277411
|
source_npm: true
|
|
277372
277412
|
});
|
|
277373
|
-
logForDebugging2(`npm view ${
|
|
277413
|
+
logForDebugging2(`npm view ${undefined}@${tag2} version: ${stdout}`);
|
|
277374
277414
|
const latestVersion = stdout.trim();
|
|
277375
277415
|
return latestVersion;
|
|
277376
277416
|
}
|
|
@@ -277426,7 +277466,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
277426
277466
|
const fs3 = getFsImplementation();
|
|
277427
277467
|
await fs3.rm(stagingPath, { recursive: true, force: true });
|
|
277428
277468
|
const platform4 = getPlatform2();
|
|
277429
|
-
const platformPackageName = `${
|
|
277469
|
+
const platformPackageName = `${undefined}-${platform4}`;
|
|
277430
277470
|
logForDebugging2(`Fetching integrity hash for ${platformPackageName}@${version2}`);
|
|
277431
277471
|
const {
|
|
277432
277472
|
stdout: integrityOutput,
|
|
@@ -277455,7 +277495,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
277455
277495
|
name: "claude-native-installer",
|
|
277456
277496
|
version: "0.0.1",
|
|
277457
277497
|
dependencies: {
|
|
277458
|
-
[
|
|
277498
|
+
[undefined]: version2
|
|
277459
277499
|
}
|
|
277460
277500
|
};
|
|
277461
277501
|
const packageLock = {
|
|
@@ -277468,10 +277508,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
277468
277508
|
name: "claude-native-installer",
|
|
277469
277509
|
version: "0.0.1",
|
|
277470
277510
|
dependencies: {
|
|
277471
|
-
[
|
|
277511
|
+
[undefined]: version2
|
|
277472
277512
|
}
|
|
277473
277513
|
},
|
|
277474
|
-
[`node_modules/${
|
|
277514
|
+
[`node_modules/${undefined}`]: {
|
|
277475
277515
|
version: version2,
|
|
277476
277516
|
optionalDependencies: {
|
|
277477
277517
|
[platformPackageName]: version2
|
|
@@ -277493,7 +277533,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
277493
277533
|
if (result.code !== 0) {
|
|
277494
277534
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
277495
277535
|
}
|
|
277496
|
-
logForDebugging2(`Successfully downloaded and verified ${
|
|
277536
|
+
logForDebugging2(`Successfully downloaded and verified ${undefined}@${version2}`);
|
|
277497
277537
|
}
|
|
277498
277538
|
function getStallTimeoutMs() {
|
|
277499
277539
|
return Number(process.env.CLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -278910,8 +278950,8 @@ async function cleanupNpmInstallations() {
|
|
|
278910
278950
|
} else if (codePackageResult.error) {
|
|
278911
278951
|
errors4.push(codePackageResult.error);
|
|
278912
278952
|
}
|
|
278913
|
-
if (
|
|
278914
|
-
const macroPackageResult = await attemptNpmUninstall(
|
|
278953
|
+
if (true) {
|
|
278954
|
+
const macroPackageResult = await attemptNpmUninstall("@gitlawb/openclaude");
|
|
278915
278955
|
if (macroPackageResult.success) {
|
|
278916
278956
|
removed++;
|
|
278917
278957
|
if (macroPackageResult.warning) {
|
|
@@ -279205,7 +279245,9 @@ function buildAPIProviderProperties() {
|
|
|
279205
279245
|
const providerLabel = {
|
|
279206
279246
|
bedrock: "AWS Bedrock",
|
|
279207
279247
|
vertex: "Google Vertex AI",
|
|
279208
|
-
foundry: "Microsoft Foundry"
|
|
279248
|
+
foundry: "Microsoft Foundry",
|
|
279249
|
+
openai: "OpenAI-compatible",
|
|
279250
|
+
gemini: "Google Gemini"
|
|
279209
279251
|
}[apiProvider];
|
|
279210
279252
|
properties.push({
|
|
279211
279253
|
label: "API provider",
|
|
@@ -279281,6 +279323,36 @@ function buildAPIProviderProperties() {
|
|
|
279281
279323
|
value: "Microsoft Foundry auth skipped"
|
|
279282
279324
|
});
|
|
279283
279325
|
}
|
|
279326
|
+
} else if (apiProvider === "openai") {
|
|
279327
|
+
const openaiBaseUrl = process.env.OPENAI_BASE_URL;
|
|
279328
|
+
if (openaiBaseUrl) {
|
|
279329
|
+
properties.push({
|
|
279330
|
+
label: "OpenAI base URL",
|
|
279331
|
+
value: openaiBaseUrl
|
|
279332
|
+
});
|
|
279333
|
+
}
|
|
279334
|
+
const openaiModel = process.env.OPENAI_MODEL;
|
|
279335
|
+
if (openaiModel) {
|
|
279336
|
+
properties.push({
|
|
279337
|
+
label: "Model",
|
|
279338
|
+
value: openaiModel
|
|
279339
|
+
});
|
|
279340
|
+
}
|
|
279341
|
+
} else if (apiProvider === "gemini") {
|
|
279342
|
+
const geminiBaseUrl = process.env.GEMINI_BASE_URL;
|
|
279343
|
+
if (geminiBaseUrl) {
|
|
279344
|
+
properties.push({
|
|
279345
|
+
label: "Gemini base URL",
|
|
279346
|
+
value: geminiBaseUrl
|
|
279347
|
+
});
|
|
279348
|
+
}
|
|
279349
|
+
const geminiModel = process.env.GEMINI_MODEL;
|
|
279350
|
+
if (geminiModel) {
|
|
279351
|
+
properties.push({
|
|
279352
|
+
label: "Model",
|
|
279353
|
+
value: geminiModel
|
|
279354
|
+
});
|
|
279355
|
+
}
|
|
279284
279356
|
}
|
|
279285
279357
|
const proxyUrl = getProxyUrl();
|
|
279286
279358
|
if (proxyUrl) {
|
|
@@ -357643,8 +357715,8 @@ function getAttributionTexts() {
|
|
|
357643
357715
|
const model = getMainLoopModel();
|
|
357644
357716
|
const isKnownPublicModel = getPublicModelDisplayName(model) !== null;
|
|
357645
357717
|
const modelName = isInternalModelRepoCached() || isKnownPublicModel ? getPublicModelName(model) : "Claude Opus 4.6";
|
|
357646
|
-
const defaultAttribution =
|
|
357647
|
-
const defaultCommit = `Co-Authored-By: ${modelName} <noreply@anthropic.com>`;
|
|
357718
|
+
const defaultAttribution = "\uD83E\uDD16 Generated with [OpenClaude](https://github.com/Gitlawb/openclaude)";
|
|
357719
|
+
const defaultCommit = isEnvTruthy(process.env.OPENCLAUDE_DISABLE_CO_AUTHORED_BY) ? "" : `Co-Authored-By: ${modelName} <noreply@anthropic.com>`;
|
|
357648
357720
|
const settings = getInitialSettings();
|
|
357649
357721
|
if (settings.attribution) {
|
|
357650
357722
|
return {
|
|
@@ -357772,7 +357844,7 @@ async function getEnhancedPRAttribution(getAppState) {
|
|
|
357772
357844
|
if (settings.includeCoAuthoredBy === false) {
|
|
357773
357845
|
return "";
|
|
357774
357846
|
}
|
|
357775
|
-
const defaultAttribution =
|
|
357847
|
+
const defaultAttribution = "\uD83E\uDD16 Generated with [OpenClaude](https://github.com/Gitlawb/openclaude)";
|
|
357776
357848
|
const appState = getAppState();
|
|
357777
357849
|
logForDebugging2(`PR Attribution: appState.attribution exists: ${!!appState.attribution}`);
|
|
357778
357850
|
if (appState.attribution) {
|
|
@@ -357795,7 +357867,7 @@ async function getEnhancedPRAttribution(getAppState) {
|
|
|
357795
357867
|
return defaultAttribution;
|
|
357796
357868
|
}
|
|
357797
357869
|
const memSuffix = memoryAccessCount > 0 ? `, ${memoryAccessCount} ${memoryAccessCount === 1 ? "memory" : "memories"} recalled` : "";
|
|
357798
|
-
const summary = `\uD83E\uDD16 Generated with [
|
|
357870
|
+
const summary = `\uD83E\uDD16 Generated with [OpenClaude](https://github.com/Gitlawb/openclaude) (${claudePercent}% ${promptCount}-shotted by ${shortModelName}${memSuffix})`;
|
|
357799
357871
|
if (false) {}
|
|
357800
357872
|
logForDebugging2(`PR Attribution: returning summary: ${summary}`);
|
|
357801
357873
|
return summary;
|
|
@@ -357803,6 +357875,7 @@ async function getEnhancedPRAttribution(getAppState) {
|
|
|
357803
357875
|
var MEMORY_ACCESS_TOOL_NAMES;
|
|
357804
357876
|
var init_attribution = __esm(() => {
|
|
357805
357877
|
init_state();
|
|
357878
|
+
init_envUtils();
|
|
357806
357879
|
init_xml();
|
|
357807
357880
|
init_prompt2();
|
|
357808
357881
|
init_prompt3();
|
|
@@ -364142,7 +364215,7 @@ function getAnthropicEnvMetadata() {
|
|
|
364142
364215
|
function getBuildAgeMinutes() {
|
|
364143
364216
|
if (false)
|
|
364144
364217
|
;
|
|
364145
|
-
const buildTime = new Date("2026-04-
|
|
364218
|
+
const buildTime = new Date("2026-04-02T03:17:59.855Z").getTime();
|
|
364146
364219
|
if (isNaN(buildTime))
|
|
364147
364220
|
return;
|
|
364148
364221
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -455328,7 +455401,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
455328
455401
|
var call56 = async () => {
|
|
455329
455402
|
return {
|
|
455330
455403
|
type: "text",
|
|
455331
|
-
value: `${"99.0.0"} (built ${"2026-04-
|
|
455404
|
+
value: `${"99.0.0"} (built ${"2026-04-02T03:17:59.855Z"})`
|
|
455332
455405
|
};
|
|
455333
455406
|
}, version2, version_default;
|
|
455334
455407
|
var init_version = __esm(() => {
|
|
@@ -496753,7 +496826,7 @@ function AutoUpdater({
|
|
|
496753
496826
|
" ",
|
|
496754
496827
|
/* @__PURE__ */ jsx_dev_runtime392.jsxDEV(ThemedText, {
|
|
496755
496828
|
bold: true,
|
|
496756
|
-
children: hasLocalInstall ? `cd ~/.claude/local && npm update ${
|
|
496829
|
+
children: hasLocalInstall ? `cd ~/.claude/local && npm update ${"@gitlawb/openclaude"}` : `npm i -g ${"@gitlawb/openclaude"}`
|
|
496757
496830
|
}, undefined, false, undefined, this)
|
|
496758
496831
|
]
|
|
496759
496832
|
}, undefined, true, undefined, this)
|
|
@@ -528066,7 +528139,7 @@ function WelcomeV2() {
|
|
|
528066
528139
|
dimColor: true,
|
|
528067
528140
|
children: [
|
|
528068
528141
|
"v",
|
|
528069
|
-
"0.1.
|
|
528142
|
+
"0.1.6",
|
|
528070
528143
|
" "
|
|
528071
528144
|
]
|
|
528072
528145
|
}, undefined, true, undefined, this)
|
|
@@ -528266,7 +528339,7 @@ function WelcomeV2() {
|
|
|
528266
528339
|
dimColor: true,
|
|
528267
528340
|
children: [
|
|
528268
528341
|
"v",
|
|
528269
|
-
"0.1.
|
|
528342
|
+
"0.1.6",
|
|
528270
528343
|
" "
|
|
528271
528344
|
]
|
|
528272
528345
|
}, undefined, true, undefined, this)
|
|
@@ -528492,7 +528565,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
528492
528565
|
dimColor: true,
|
|
528493
528566
|
children: [
|
|
528494
528567
|
"v",
|
|
528495
|
-
"0.1.
|
|
528568
|
+
"0.1.6",
|
|
528496
528569
|
" "
|
|
528497
528570
|
]
|
|
528498
528571
|
}, undefined, true, undefined, this);
|
|
@@ -528746,7 +528819,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
528746
528819
|
dimColor: true,
|
|
528747
528820
|
children: [
|
|
528748
528821
|
"v",
|
|
528749
|
-
"0.1.
|
|
528822
|
+
"0.1.6",
|
|
528750
528823
|
" "
|
|
528751
528824
|
]
|
|
528752
528825
|
}, undefined, true, undefined, this);
|
|
@@ -530299,10 +530372,10 @@ async function showSetupScreens(root2, permissionMode, allowDangerouslySkipPermi
|
|
|
530299
530372
|
if (isEnvTruthy(false) || process.env.IS_DEMO) {
|
|
530300
530373
|
return false;
|
|
530301
530374
|
}
|
|
530302
|
-
const
|
|
530375
|
+
const usesAnthropicSetup = usesAnthropicAccountFlow();
|
|
530303
530376
|
const config3 = getGlobalConfig();
|
|
530304
530377
|
let onboardingShown = false;
|
|
530305
|
-
if (
|
|
530378
|
+
if (usesAnthropicSetup && (!config3.theme || !config3.hasCompletedOnboarding)) {
|
|
530306
530379
|
onboardingShown = true;
|
|
530307
530380
|
const {
|
|
530308
530381
|
Onboarding: Onboarding2
|
|
@@ -530317,7 +530390,7 @@ async function showSetupScreens(root2, permissionMode, allowDangerouslySkipPermi
|
|
|
530317
530390
|
});
|
|
530318
530391
|
}
|
|
530319
530392
|
if (!isEnvTruthy(process.env.CLAUBBIT)) {
|
|
530320
|
-
if (
|
|
530393
|
+
if (usesAnthropicSetup && !checkHasTrustDialogAccepted()) {
|
|
530321
530394
|
const {
|
|
530322
530395
|
TrustDialog: TrustDialog2
|
|
530323
530396
|
} = await Promise.resolve().then(() => (init_TrustDialog(), exports_TrustDialog));
|
|
@@ -530330,7 +530403,7 @@ async function showSetupScreens(root2, permissionMode, allowDangerouslySkipPermi
|
|
|
530330
530403
|
resetGrowthBook();
|
|
530331
530404
|
initializeGrowthBook();
|
|
530332
530405
|
getSystemContext();
|
|
530333
|
-
if (
|
|
530406
|
+
if (usesAnthropicSetup) {
|
|
530334
530407
|
const {
|
|
530335
530408
|
errors: allErrors
|
|
530336
530409
|
} = getSettingsWithAllErrors();
|
|
@@ -530476,6 +530549,7 @@ var init_interactiveHelpers = __esm(() => {
|
|
|
530476
530549
|
init_envUtils();
|
|
530477
530550
|
init_githubRepoPathMapping();
|
|
530478
530551
|
init_managedEnv();
|
|
530552
|
+
init_providers();
|
|
530479
530553
|
init_renderOptions();
|
|
530480
530554
|
init_allErrors();
|
|
530481
530555
|
init_settings2();
|
|
@@ -546714,9 +546788,9 @@ async function update() {
|
|
|
546714
546788
|
await removeInstalledSymlink();
|
|
546715
546789
|
}
|
|
546716
546790
|
logForDebugging2("update: Checking npm registry for latest version");
|
|
546717
|
-
logForDebugging2(`update: Package URL: ${
|
|
546791
|
+
logForDebugging2(`update: Package URL: ${"@gitlawb/openclaude"}`);
|
|
546718
546792
|
const npmTag = channel === "stable" ? "stable" : "latest";
|
|
546719
|
-
const npmCommand = `npm view ${
|
|
546793
|
+
const npmCommand = `npm view ${"@gitlawb/openclaude"}@${npmTag} version`;
|
|
546720
546794
|
logForDebugging2(`update: Running: ${npmCommand}`);
|
|
546721
546795
|
const latestVersion = await getLatestVersion(channel);
|
|
546722
546796
|
logForDebugging2(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -546736,7 +546810,7 @@ async function update() {
|
|
|
546736
546810
|
`);
|
|
546737
546811
|
process.stderr.write(` • Corporate proxy/firewall blocking npm
|
|
546738
546812
|
`);
|
|
546739
|
-
if (
|
|
546813
|
+
if (!"@gitlawb/openclaude".startsWith("@anthropic")) {
|
|
546740
546814
|
process.stderr.write(` • Internal/development build not published to npm
|
|
546741
546815
|
`);
|
|
546742
546816
|
}
|
|
@@ -546748,7 +546822,7 @@ async function update() {
|
|
|
546748
546822
|
`);
|
|
546749
546823
|
process.stderr.write(` • Run with --debug flag for more details
|
|
546750
546824
|
`);
|
|
546751
|
-
const packageName =
|
|
546825
|
+
const packageName = "@gitlawb/openclaude";
|
|
546752
546826
|
process.stderr.write(` • Manually check: npm view ${packageName} version
|
|
546753
546827
|
`);
|
|
546754
546828
|
process.stderr.write(` • Check if you need to login: npm whoami
|
|
@@ -546815,7 +546889,7 @@ async function update() {
|
|
|
546815
546889
|
if (useLocalUpdate) {
|
|
546816
546890
|
process.stderr.write(`Try manually updating with:
|
|
546817
546891
|
`);
|
|
546818
|
-
process.stderr.write(` cd ~/.claude/local && npm update ${
|
|
546892
|
+
process.stderr.write(` cd ~/.claude/local && npm update ${"@gitlawb/openclaude"}
|
|
546819
546893
|
`);
|
|
546820
546894
|
} else {
|
|
546821
546895
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -546831,7 +546905,7 @@ async function update() {
|
|
|
546831
546905
|
if (useLocalUpdate) {
|
|
546832
546906
|
process.stderr.write(`Try manually updating with:
|
|
546833
546907
|
`);
|
|
546834
|
-
process.stderr.write(` cd ~/.claude/local && npm update ${
|
|
546908
|
+
process.stderr.write(` cd ~/.claude/local && npm update ${"@gitlawb/openclaude"}
|
|
546835
546909
|
`);
|
|
546836
546910
|
} else {
|
|
546837
546911
|
process.stderr.write(`Or consider using native installation with: claude install
|
|
@@ -548828,7 +548902,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
548828
548902
|
pendingHookMessages
|
|
548829
548903
|
}, renderAndRun);
|
|
548830
548904
|
}
|
|
548831
|
-
}).version("0.1.
|
|
548905
|
+
}).version("0.1.6 (Open Claude)", "-v, --version", "Output the version number");
|
|
548832
548906
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
548833
548907
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
548834
548908
|
if (canUserConfigureAdvisor()) {
|
|
@@ -549388,7 +549462,7 @@ function validateProviderEnvOrExit() {
|
|
|
549388
549462
|
async function main2() {
|
|
549389
549463
|
const args = process.argv.slice(2);
|
|
549390
549464
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
549391
|
-
console.log(`${"0.1.
|
|
549465
|
+
console.log(`${"0.1.6"} (Open Claude)`);
|
|
549392
549466
|
return;
|
|
549393
549467
|
}
|
|
549394
549468
|
validateProviderEnvOrExit();
|
|
@@ -549477,4 +549551,4 @@ async function main2() {
|
|
|
549477
549551
|
}
|
|
549478
549552
|
main2();
|
|
549479
549553
|
|
|
549480
|
-
//# debugId=
|
|
549554
|
+
//# debugId=CE37720AB3004F1264756E2164756E21
|