@codexhost/cli-win32-arm64 0.9.1 → 0.9.2
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 +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +255 -179
- package/app/host-runtime.mjs +392 -225
- package/app/plugins/antigravity/plugin.mjs +55 -0
- package/app/plugins/claude-code/plugin.mjs +232 -41
- package/app/plugins/codebuddy/plugin.mjs +56 -1
- package/app/plugins/cursor-cli/plugin.mjs +55 -0
- package/app/plugins/deepseek-harness/plugin.mjs +55 -0
- package/app/plugins/grok/plugin.mjs +178 -82
- package/app/plugins/hermes/plugin.mjs +55 -0
- package/app/plugins/kiro-cli/plugin.mjs +55 -0
- package/app/plugins/omp/plugin.mjs +55 -0
- package/app/plugins/opencode/plugin.mjs +55 -0
- package/app/plugins/pi/plugin.mjs +1920 -769
- package/app/plugins/qoder/plugin.mjs +55 -0
- package/app/plugins/qoder-cn/plugin.mjs +55 -0
- package/app/plugins/workbuddy/plugin.mjs +56 -1
- package/app/renderer-extension.js +4225 -2820
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
|
@@ -14528,6 +14528,61 @@ function date4(params) {
|
|
|
14528
14528
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
14529
14529
|
config(en_default());
|
|
14530
14530
|
|
|
14531
|
+
// ../../shared-contracts/dist/credential-imports.js
|
|
14532
|
+
var credentialSourceSchema = external_exports.object({
|
|
14533
|
+
id: external_exports.string().min(1).max(256),
|
|
14534
|
+
harnessId: external_exports.string().min(1),
|
|
14535
|
+
label: external_exports.string().min(1).max(512),
|
|
14536
|
+
provider: external_exports.enum(["openai-codex", "xai"])
|
|
14537
|
+
}).strict();
|
|
14538
|
+
var credentialImportNameSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
14539
|
+
var credentialImportRecordSchema = external_exports.object({
|
|
14540
|
+
name: credentialImportNameSchema,
|
|
14541
|
+
source: credentialSourceSchema,
|
|
14542
|
+
importedAt: external_exports.string()
|
|
14543
|
+
}).strict();
|
|
14544
|
+
var credentialImportsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
14545
|
+
external_exports.object({ action: external_exports.literal("list") }).strict(),
|
|
14546
|
+
external_exports.object({
|
|
14547
|
+
action: external_exports.literal("import"),
|
|
14548
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
14549
|
+
name: credentialImportNameSchema,
|
|
14550
|
+
confirmed: external_exports.literal(true)
|
|
14551
|
+
}).strict(),
|
|
14552
|
+
external_exports.object({
|
|
14553
|
+
action: external_exports.literal("reimport"),
|
|
14554
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
14555
|
+
name: credentialImportNameSchema,
|
|
14556
|
+
confirmed: external_exports.literal(true)
|
|
14557
|
+
}).strict(),
|
|
14558
|
+
external_exports.object({
|
|
14559
|
+
action: external_exports.literal("remove"),
|
|
14560
|
+
name: credentialImportNameSchema,
|
|
14561
|
+
confirmed: external_exports.literal(true)
|
|
14562
|
+
}).strict()
|
|
14563
|
+
]);
|
|
14564
|
+
var credentialOtherLoginSchema = external_exports.object({
|
|
14565
|
+
provider: external_exports.string().min(1).max(128),
|
|
14566
|
+
type: external_exports.enum(["oauth", "api_key", "unknown"]),
|
|
14567
|
+
/** Best-effort account label (e.g. the email in a Codex token), derived locally when present. */
|
|
14568
|
+
label: external_exports.string().min(1).max(512).optional(),
|
|
14569
|
+
/** Recognized credential vendor, derived from the OAuth token issuer. Absent when unknown. */
|
|
14570
|
+
vendor: external_exports.enum(["openai-codex", "xai"]).optional()
|
|
14571
|
+
}).strict();
|
|
14572
|
+
var credentialImportsResultSchema = external_exports.object({
|
|
14573
|
+
sources: external_exports.array(credentialSourceSchema),
|
|
14574
|
+
targets: external_exports.array(external_exports.object({
|
|
14575
|
+
harnessId: external_exports.string(),
|
|
14576
|
+
providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
|
|
14577
|
+
imports: external_exports.array(credentialImportRecordSchema),
|
|
14578
|
+
others: external_exports.array(credentialOtherLoginSchema).default([])
|
|
14579
|
+
}).strict())
|
|
14580
|
+
}).strict();
|
|
14581
|
+
var credentialImportsParamsSchema = external_exports.object({
|
|
14582
|
+
targetHarnessId: external_exports.string().min(1).max(128).optional(),
|
|
14583
|
+
request: credentialImportsRequestSchema
|
|
14584
|
+
}).strict();
|
|
14585
|
+
|
|
14531
14586
|
// ../../shared-contracts/dist/version.js
|
|
14532
14587
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14533
14588
|
|
|
@@ -776,10 +776,10 @@ function mergeDefs(...defs) {
|
|
|
776
776
|
function cloneDef(schema) {
|
|
777
777
|
return mergeDefs(schema._zod.def);
|
|
778
778
|
}
|
|
779
|
-
function getElementAtPath(obj,
|
|
780
|
-
if (!
|
|
779
|
+
function getElementAtPath(obj, path14) {
|
|
780
|
+
if (!path14)
|
|
781
781
|
return obj;
|
|
782
|
-
return
|
|
782
|
+
return path14.reduce((acc, key) => acc?.[key], obj);
|
|
783
783
|
}
|
|
784
784
|
function promiseAllObject(promisesObj) {
|
|
785
785
|
const keys = Object.keys(promisesObj);
|
|
@@ -1188,11 +1188,11 @@ function explicitlyAborted(x2, startIndex = 0) {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
return false;
|
|
1190
1190
|
}
|
|
1191
|
-
function prefixIssues(
|
|
1191
|
+
function prefixIssues(path14, issues) {
|
|
1192
1192
|
return issues.map((iss) => {
|
|
1193
1193
|
var _a4;
|
|
1194
1194
|
(_a4 = iss).path ?? (_a4.path = []);
|
|
1195
|
-
iss.path.unshift(
|
|
1195
|
+
iss.path.unshift(path14);
|
|
1196
1196
|
return iss;
|
|
1197
1197
|
});
|
|
1198
1198
|
}
|
|
@@ -1339,16 +1339,16 @@ function flattenError(error52, mapper = (issue2) => issue2.message) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
function formatError(error52, mapper = (issue2) => issue2.message) {
|
|
1341
1341
|
const fieldErrors = { _errors: [] };
|
|
1342
|
-
const processError = (error53,
|
|
1342
|
+
const processError = (error53, path14 = []) => {
|
|
1343
1343
|
for (const issue2 of error53.issues) {
|
|
1344
1344
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1345
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
1345
|
+
issue2.errors.map((issues) => processError({ issues }, [...path14, ...issue2.path]));
|
|
1346
1346
|
} else if (issue2.code === "invalid_key") {
|
|
1347
|
-
processError({ issues: issue2.issues }, [...
|
|
1347
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
1348
1348
|
} else if (issue2.code === "invalid_element") {
|
|
1349
|
-
processError({ issues: issue2.issues }, [...
|
|
1349
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
1350
1350
|
} else {
|
|
1351
|
-
const fullpath = [...
|
|
1351
|
+
const fullpath = [...path14, ...issue2.path];
|
|
1352
1352
|
if (fullpath.length === 0) {
|
|
1353
1353
|
fieldErrors._errors.push(mapper(issue2));
|
|
1354
1354
|
} else {
|
|
@@ -1375,17 +1375,17 @@ function formatError(error52, mapper = (issue2) => issue2.message) {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
function treeifyError(error52, mapper = (issue2) => issue2.message) {
|
|
1377
1377
|
const result = { errors: [] };
|
|
1378
|
-
const processError = (error53,
|
|
1378
|
+
const processError = (error53, path14 = []) => {
|
|
1379
1379
|
var _a4, _b2;
|
|
1380
1380
|
for (const issue2 of error53.issues) {
|
|
1381
1381
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1382
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
1382
|
+
issue2.errors.map((issues) => processError({ issues }, [...path14, ...issue2.path]));
|
|
1383
1383
|
} else if (issue2.code === "invalid_key") {
|
|
1384
|
-
processError({ issues: issue2.issues }, [...
|
|
1384
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
1385
1385
|
} else if (issue2.code === "invalid_element") {
|
|
1386
|
-
processError({ issues: issue2.issues }, [...
|
|
1386
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
1387
1387
|
} else {
|
|
1388
|
-
const fullpath = [...
|
|
1388
|
+
const fullpath = [...path14, ...issue2.path];
|
|
1389
1389
|
if (fullpath.length === 0) {
|
|
1390
1390
|
result.errors.push(mapper(issue2));
|
|
1391
1391
|
continue;
|
|
@@ -1417,8 +1417,8 @@ function treeifyError(error52, mapper = (issue2) => issue2.message) {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
function toDotPath(_path) {
|
|
1419
1419
|
const segs = [];
|
|
1420
|
-
const
|
|
1421
|
-
for (const seg of
|
|
1420
|
+
const path14 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
1421
|
+
for (const seg of path14) {
|
|
1422
1422
|
if (typeof seg === "number")
|
|
1423
1423
|
segs.push(`[${seg}]`);
|
|
1424
1424
|
else if (typeof seg === "symbol")
|
|
@@ -14110,13 +14110,13 @@ function resolveRef(ref, ctx) {
|
|
|
14110
14110
|
if (!ref.startsWith("#")) {
|
|
14111
14111
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
14112
14112
|
}
|
|
14113
|
-
const
|
|
14114
|
-
if (
|
|
14113
|
+
const path14 = ref.slice(1).split("/").filter(Boolean);
|
|
14114
|
+
if (path14.length === 0) {
|
|
14115
14115
|
return ctx.rootSchema;
|
|
14116
14116
|
}
|
|
14117
14117
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
14118
|
-
if (
|
|
14119
|
-
const key =
|
|
14118
|
+
if (path14[0] === defsKey) {
|
|
14119
|
+
const key = path14[1];
|
|
14120
14120
|
if (!key || !ctx.defs[key]) {
|
|
14121
14121
|
throw new Error(`Reference not found: ${ref}`);
|
|
14122
14122
|
}
|
|
@@ -14524,6 +14524,61 @@ function date4(params) {
|
|
|
14524
14524
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
14525
14525
|
config(en_default());
|
|
14526
14526
|
|
|
14527
|
+
// ../../shared-contracts/dist/credential-imports.js
|
|
14528
|
+
var credentialSourceSchema = external_exports.object({
|
|
14529
|
+
id: external_exports.string().min(1).max(256),
|
|
14530
|
+
harnessId: external_exports.string().min(1),
|
|
14531
|
+
label: external_exports.string().min(1).max(512),
|
|
14532
|
+
provider: external_exports.enum(["openai-codex", "xai"])
|
|
14533
|
+
}).strict();
|
|
14534
|
+
var credentialImportNameSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
14535
|
+
var credentialImportRecordSchema = external_exports.object({
|
|
14536
|
+
name: credentialImportNameSchema,
|
|
14537
|
+
source: credentialSourceSchema,
|
|
14538
|
+
importedAt: external_exports.string()
|
|
14539
|
+
}).strict();
|
|
14540
|
+
var credentialImportsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
14541
|
+
external_exports.object({ action: external_exports.literal("list") }).strict(),
|
|
14542
|
+
external_exports.object({
|
|
14543
|
+
action: external_exports.literal("import"),
|
|
14544
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
14545
|
+
name: credentialImportNameSchema,
|
|
14546
|
+
confirmed: external_exports.literal(true)
|
|
14547
|
+
}).strict(),
|
|
14548
|
+
external_exports.object({
|
|
14549
|
+
action: external_exports.literal("reimport"),
|
|
14550
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
14551
|
+
name: credentialImportNameSchema,
|
|
14552
|
+
confirmed: external_exports.literal(true)
|
|
14553
|
+
}).strict(),
|
|
14554
|
+
external_exports.object({
|
|
14555
|
+
action: external_exports.literal("remove"),
|
|
14556
|
+
name: credentialImportNameSchema,
|
|
14557
|
+
confirmed: external_exports.literal(true)
|
|
14558
|
+
}).strict()
|
|
14559
|
+
]);
|
|
14560
|
+
var credentialOtherLoginSchema = external_exports.object({
|
|
14561
|
+
provider: external_exports.string().min(1).max(128),
|
|
14562
|
+
type: external_exports.enum(["oauth", "api_key", "unknown"]),
|
|
14563
|
+
/** Best-effort account label (e.g. the email in a Codex token), derived locally when present. */
|
|
14564
|
+
label: external_exports.string().min(1).max(512).optional(),
|
|
14565
|
+
/** Recognized credential vendor, derived from the OAuth token issuer. Absent when unknown. */
|
|
14566
|
+
vendor: external_exports.enum(["openai-codex", "xai"]).optional()
|
|
14567
|
+
}).strict();
|
|
14568
|
+
var credentialImportsResultSchema = external_exports.object({
|
|
14569
|
+
sources: external_exports.array(credentialSourceSchema),
|
|
14570
|
+
targets: external_exports.array(external_exports.object({
|
|
14571
|
+
harnessId: external_exports.string(),
|
|
14572
|
+
providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
|
|
14573
|
+
imports: external_exports.array(credentialImportRecordSchema),
|
|
14574
|
+
others: external_exports.array(credentialOtherLoginSchema).default([])
|
|
14575
|
+
}).strict())
|
|
14576
|
+
}).strict();
|
|
14577
|
+
var credentialImportsParamsSchema = external_exports.object({
|
|
14578
|
+
targetHarnessId: external_exports.string().min(1).max(128).optional(),
|
|
14579
|
+
request: credentialImportsRequestSchema
|
|
14580
|
+
}).strict();
|
|
14581
|
+
|
|
14527
14582
|
// ../../shared-contracts/dist/version.js
|
|
14528
14583
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14529
14584
|
|
|
@@ -16489,7 +16544,7 @@ var BrokeredHarnessAdapter = class {
|
|
|
16489
16544
|
|
|
16490
16545
|
// dist/claude-code-adapter.js
|
|
16491
16546
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
16492
|
-
import
|
|
16547
|
+
import path12 from "node:path";
|
|
16493
16548
|
|
|
16494
16549
|
// ../../../node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
|
|
16495
16550
|
import { createRequire as DW } from "node:module";
|
|
@@ -20394,8 +20449,8 @@ var qU = v(function(BU) {
|
|
|
20394
20449
|
BU._globalThis = void 0;
|
|
20395
20450
|
BU._globalThis = typeof globalThis === "object" ? globalThis : global;
|
|
20396
20451
|
});
|
|
20397
|
-
var GU = v(function(
|
|
20398
|
-
var Axe =
|
|
20452
|
+
var GU = v(function(os7) {
|
|
20453
|
+
var Axe = os7 && os7.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
20399
20454
|
if (n === void 0) n = r;
|
|
20400
20455
|
Object.defineProperty(e, n, { enumerable: true, get: function() {
|
|
20401
20456
|
return t[r];
|
|
@@ -20403,11 +20458,11 @@ var GU = v(function(os6) {
|
|
|
20403
20458
|
} : function(e, t, r, n) {
|
|
20404
20459
|
if (n === void 0) n = r;
|
|
20405
20460
|
e[n] = t[r];
|
|
20406
|
-
}), kxe =
|
|
20461
|
+
}), kxe = os7 && os7.__exportStar || function(e, t) {
|
|
20407
20462
|
for (var r in e) if (r !== "default" && !Object.prototype.hasOwnProperty.call(t, r)) Axe(t, e, r);
|
|
20408
20463
|
};
|
|
20409
|
-
Object.defineProperty(
|
|
20410
|
-
kxe(qU(),
|
|
20464
|
+
Object.defineProperty(os7, "__esModule", { value: true });
|
|
20465
|
+
kxe(qU(), os7);
|
|
20411
20466
|
});
|
|
20412
20467
|
var WU = v(function(is) {
|
|
20413
20468
|
var Oxe = is && is.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
@@ -43497,6 +43552,9 @@ async function readClaudeTranscript(input) {
|
|
|
43497
43552
|
|
|
43498
43553
|
// dist/model-catalog.js
|
|
43499
43554
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
43555
|
+
import { readFile as readFile4 } from "node:fs/promises";
|
|
43556
|
+
import os6 from "node:os";
|
|
43557
|
+
import path9 from "node:path";
|
|
43500
43558
|
|
|
43501
43559
|
// dist/thinking-options.js
|
|
43502
43560
|
var option = (id, label) => ({
|
|
@@ -43536,8 +43594,19 @@ var CLAUDE_MODEL_VALUE_MAX_LENGTH = 512;
|
|
|
43536
43594
|
var modelInfoSchema = external_exports.object({
|
|
43537
43595
|
value: external_exports.string().trim().min(1).max(CLAUDE_MODEL_VALUE_MAX_LENGTH),
|
|
43538
43596
|
displayName: external_exports.string().trim().min(1).max(HARNESS_MODEL_LABEL_MAX_LENGTH),
|
|
43597
|
+
description: external_exports.string().trim().min(1).max(HARNESS_MODEL_LABEL_MAX_LENGTH).optional(),
|
|
43539
43598
|
resolvedModel: harnessResolvedModelLabelSchema.optional()
|
|
43540
43599
|
});
|
|
43600
|
+
var modelPickerOptionSchema = external_exports.object({
|
|
43601
|
+
model: external_exports.string().trim().min(1).max(CLAUDE_MODEL_VALUE_MAX_LENGTH),
|
|
43602
|
+
label: external_exports.string().trim().min(1).max(HARNESS_MODEL_LABEL_MAX_LENGTH).optional(),
|
|
43603
|
+
description: external_exports.string().trim().min(1).max(HARNESS_MODEL_LABEL_MAX_LENGTH).optional(),
|
|
43604
|
+
behavesAs: external_exports.string().trim().min(1).max(HARNESS_MODEL_LABEL_MAX_LENGTH).optional()
|
|
43605
|
+
});
|
|
43606
|
+
var modelPickerSettingsSchema = external_exports.object({
|
|
43607
|
+
options: external_exports.array(external_exports.unknown()).optional(),
|
|
43608
|
+
replaceBuiltInOptions: external_exports.boolean().optional()
|
|
43609
|
+
});
|
|
43541
43610
|
var CLAUDE_DEFAULT_MODEL_REF = encodeClaudeModelRef("default");
|
|
43542
43611
|
function encodeClaudeModelRef(value) {
|
|
43543
43612
|
const parsed = external_exports.string().trim().min(1).max(CLAUDE_MODEL_VALUE_MAX_LENGTH).parse(value);
|
|
@@ -43566,6 +43635,127 @@ function decodeClaudeModelRef(ref) {
|
|
|
43566
43635
|
}
|
|
43567
43636
|
return value === "default" ? void 0 : value;
|
|
43568
43637
|
}
|
|
43638
|
+
function resolveClaudeConfigDirectory(environment = process.env) {
|
|
43639
|
+
return path9.resolve(environment.CLAUDE_CONFIG_DIR ?? path9.join(os6.homedir(), ".claude"));
|
|
43640
|
+
}
|
|
43641
|
+
function parseModelPickerOptions(value) {
|
|
43642
|
+
if (!Array.isArray(value))
|
|
43643
|
+
return [];
|
|
43644
|
+
const options = [];
|
|
43645
|
+
const seen = /* @__PURE__ */ new Set();
|
|
43646
|
+
for (const entry of value) {
|
|
43647
|
+
const parsed = modelPickerOptionSchema.safeParse(entry);
|
|
43648
|
+
if (!parsed.success)
|
|
43649
|
+
continue;
|
|
43650
|
+
if (seen.has(parsed.data.model))
|
|
43651
|
+
continue;
|
|
43652
|
+
seen.add(parsed.data.model);
|
|
43653
|
+
options.push({
|
|
43654
|
+
model: parsed.data.model,
|
|
43655
|
+
...parsed.data.label ? { label: parsed.data.label } : {},
|
|
43656
|
+
...parsed.data.description ? { description: parsed.data.description } : {},
|
|
43657
|
+
...parsed.data.behavesAs ? { behavesAs: parsed.data.behavesAs } : {}
|
|
43658
|
+
});
|
|
43659
|
+
}
|
|
43660
|
+
return options;
|
|
43661
|
+
}
|
|
43662
|
+
function parseClaudeModelPickerSettings(value) {
|
|
43663
|
+
if (value === void 0 || value === null)
|
|
43664
|
+
return void 0;
|
|
43665
|
+
const parsed = modelPickerSettingsSchema.safeParse(value);
|
|
43666
|
+
if (!parsed.success)
|
|
43667
|
+
return void 0;
|
|
43668
|
+
if (parsed.data.options === void 0 && parsed.data.replaceBuiltInOptions === void 0) {
|
|
43669
|
+
return void 0;
|
|
43670
|
+
}
|
|
43671
|
+
const options = parseModelPickerOptions(parsed.data.options);
|
|
43672
|
+
if (Array.isArray(parsed.data.options) && parsed.data.options.length > 0 && options.length === 0) {
|
|
43673
|
+
return void 0;
|
|
43674
|
+
}
|
|
43675
|
+
return {
|
|
43676
|
+
options,
|
|
43677
|
+
replaceBuiltInOptions: parsed.data.replaceBuiltInOptions === true
|
|
43678
|
+
};
|
|
43679
|
+
}
|
|
43680
|
+
async function readClaudeUserModelPicker(environment = process.env) {
|
|
43681
|
+
const settingsPath = path9.join(resolveClaudeConfigDirectory(environment), "settings.json");
|
|
43682
|
+
let raw;
|
|
43683
|
+
try {
|
|
43684
|
+
raw = await readFile4(settingsPath, "utf8");
|
|
43685
|
+
} catch {
|
|
43686
|
+
return void 0;
|
|
43687
|
+
}
|
|
43688
|
+
let document2;
|
|
43689
|
+
try {
|
|
43690
|
+
document2 = JSON.parse(raw);
|
|
43691
|
+
} catch {
|
|
43692
|
+
return void 0;
|
|
43693
|
+
}
|
|
43694
|
+
if (document2 === null || typeof document2 !== "object" || Array.isArray(document2)) {
|
|
43695
|
+
return void 0;
|
|
43696
|
+
}
|
|
43697
|
+
return parseClaudeModelPickerSettings(document2.modelPicker);
|
|
43698
|
+
}
|
|
43699
|
+
function optionToModelInfo(option2) {
|
|
43700
|
+
return {
|
|
43701
|
+
value: option2.model,
|
|
43702
|
+
displayName: option2.label ?? option2.model,
|
|
43703
|
+
...option2.description ? { description: option2.description } : {},
|
|
43704
|
+
...option2.behavesAs ? { resolvedModel: option2.behavesAs } : {}
|
|
43705
|
+
};
|
|
43706
|
+
}
|
|
43707
|
+
function readModelValue(row) {
|
|
43708
|
+
if (row === null || typeof row !== "object" || Array.isArray(row))
|
|
43709
|
+
return void 0;
|
|
43710
|
+
const value = row.value;
|
|
43711
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
43712
|
+
}
|
|
43713
|
+
function mergeOptionOntoSdkRow(sdkRow, option2) {
|
|
43714
|
+
const base = sdkRow !== null && typeof sdkRow === "object" && !Array.isArray(sdkRow) ? { ...sdkRow } : {};
|
|
43715
|
+
const overlay = optionToModelInfo(option2);
|
|
43716
|
+
return { ...base, ...overlay };
|
|
43717
|
+
}
|
|
43718
|
+
function mergeClaudeModelPickerOptions(sdkModels, modelPicker) {
|
|
43719
|
+
if (!modelPicker)
|
|
43720
|
+
return sdkModels;
|
|
43721
|
+
const sdkRows = Array.isArray(sdkModels) ? [...sdkModels] : [];
|
|
43722
|
+
const sdkByValue = /* @__PURE__ */ new Map();
|
|
43723
|
+
for (const row of sdkRows) {
|
|
43724
|
+
const value = readModelValue(row);
|
|
43725
|
+
if (value && !sdkByValue.has(value))
|
|
43726
|
+
sdkByValue.set(value, row);
|
|
43727
|
+
}
|
|
43728
|
+
if (modelPicker.replaceBuiltInOptions) {
|
|
43729
|
+
const defaultSdk = sdkByValue.get("default");
|
|
43730
|
+
const merged2 = [
|
|
43731
|
+
defaultSdk !== void 0 ? defaultSdk : { value: "default", displayName: "Default" }
|
|
43732
|
+
];
|
|
43733
|
+
const included2 = /* @__PURE__ */ new Set(["default"]);
|
|
43734
|
+
for (const option2 of modelPicker.options) {
|
|
43735
|
+
if (included2.has(option2.model)) {
|
|
43736
|
+
if (option2.model === "default") {
|
|
43737
|
+
merged2[0] = mergeOptionOntoSdkRow(merged2[0], option2);
|
|
43738
|
+
}
|
|
43739
|
+
continue;
|
|
43740
|
+
}
|
|
43741
|
+
merged2.push(mergeOptionOntoSdkRow(sdkByValue.get(option2.model), option2));
|
|
43742
|
+
included2.add(option2.model);
|
|
43743
|
+
}
|
|
43744
|
+
return merged2;
|
|
43745
|
+
}
|
|
43746
|
+
const merged = [...sdkRows];
|
|
43747
|
+
const included = new Set(sdkRows.flatMap((row) => {
|
|
43748
|
+
const value = readModelValue(row);
|
|
43749
|
+
return value ? [value] : [];
|
|
43750
|
+
}));
|
|
43751
|
+
for (const option2 of modelPicker.options) {
|
|
43752
|
+
if (included.has(option2.model))
|
|
43753
|
+
continue;
|
|
43754
|
+
merged.push(mergeOptionOntoSdkRow(void 0, option2));
|
|
43755
|
+
included.add(option2.model);
|
|
43756
|
+
}
|
|
43757
|
+
return merged;
|
|
43758
|
+
}
|
|
43569
43759
|
function uniqueDisplayLabels(rows) {
|
|
43570
43760
|
const groups = /* @__PURE__ */ new Map();
|
|
43571
43761
|
for (const row of rows) {
|
|
@@ -43754,7 +43944,7 @@ function projectClaudeAccountUsage(usage, account) {
|
|
|
43754
43944
|
}
|
|
43755
43945
|
|
|
43756
43946
|
// dist/file-change.js
|
|
43757
|
-
import
|
|
43947
|
+
import path10 from "node:path";
|
|
43758
43948
|
var hunkSchema = external_exports.object({
|
|
43759
43949
|
oldStart: external_exports.number().int().nonnegative(),
|
|
43760
43950
|
oldLines: external_exports.number().int().nonnegative(),
|
|
@@ -43802,10 +43992,10 @@ function parseClaudeNativeFileChange(toolName, value) {
|
|
|
43802
43992
|
};
|
|
43803
43993
|
}
|
|
43804
43994
|
function displayPath(nativePath, cwd) {
|
|
43805
|
-
const resolvedCwd =
|
|
43806
|
-
const resolvedPath =
|
|
43807
|
-
const relative =
|
|
43808
|
-
const selected = relative.length > 0 && relative !== ".." && !relative.startsWith(`..${
|
|
43995
|
+
const resolvedCwd = path10.resolve(cwd);
|
|
43996
|
+
const resolvedPath = path10.isAbsolute(nativePath) ? path10.resolve(nativePath) : path10.resolve(cwd, nativePath);
|
|
43997
|
+
const relative = path10.relative(resolvedCwd, resolvedPath);
|
|
43998
|
+
const selected = relative.length > 0 && relative !== ".." && !relative.startsWith(`..${path10.sep}`) ? relative : resolvedPath;
|
|
43809
43999
|
const normalized = selected.replaceAll("\\", "/");
|
|
43810
44000
|
return validNativePath(normalized) && normalized !== "." ? normalized : null;
|
|
43811
44001
|
}
|
|
@@ -43817,7 +44007,7 @@ function projectClaudeFileChange(value, cwd) {
|
|
|
43817
44007
|
`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`,
|
|
43818
44008
|
...hunk.lines
|
|
43819
44009
|
]);
|
|
43820
|
-
const absoluteDisplayPath =
|
|
44010
|
+
const absoluteDisplayPath = path10.posix.isAbsolute(normalizedPath);
|
|
43821
44011
|
const oldHeader = value.kind === "add" ? "/dev/null" : absoluteDisplayPath ? normalizedPath : `a/${normalizedPath}`;
|
|
43822
44012
|
const newHeader = absoluteDisplayPath ? normalizedPath : `b/${normalizedPath}`;
|
|
43823
44013
|
const unifiedDiff = [`--- ${oldHeader}`, `+++ ${newHeader}`, ...body, ""].join("\n");
|
|
@@ -44506,7 +44696,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44506
44696
|
|
|
44507
44697
|
// dist/process-fence.js
|
|
44508
44698
|
import { execFile } from "node:child_process";
|
|
44509
|
-
import
|
|
44699
|
+
import path11 from "node:path";
|
|
44510
44700
|
import { setTimeout as setTimeout2 } from "node:timers/promises";
|
|
44511
44701
|
import { promisify } from "node:util";
|
|
44512
44702
|
var executeFile = promisify(execFile);
|
|
@@ -44530,9 +44720,9 @@ async function closeClaudeProcessGroup(child, timeoutMs) {
|
|
|
44530
44720
|
if (child.exitCode !== null || child.signalCode !== null)
|
|
44531
44721
|
throw new Error("Claude process tree cannot be confirmed after its Windows root exited");
|
|
44532
44722
|
const root = process.env.SystemRoot ?? process.env.SYSTEMROOT;
|
|
44533
|
-
if (!root || !
|
|
44723
|
+
if (!root || !path11.win32.isAbsolute(root))
|
|
44534
44724
|
throw new Error("Windows SystemRoot is unavailable");
|
|
44535
|
-
await executeFile(
|
|
44725
|
+
await executeFile(path11.win32.join(root, "System32", "taskkill.exe"), ["/PID", String(pid), "/T", "/F"], {
|
|
44536
44726
|
timeout: timeoutMs,
|
|
44537
44727
|
windowsHide: true
|
|
44538
44728
|
});
|
|
@@ -45334,8 +45524,9 @@ var ClaudeSdkModelInspector = class {
|
|
|
45334
45524
|
const candidate = activeQuery;
|
|
45335
45525
|
const canSelectModel = Array.isArray(initialized.models) && typeof candidate.setModel === "function";
|
|
45336
45526
|
const canSelectPermissionMode = typeof candidate.setPermissionMode === "function";
|
|
45527
|
+
const modelPicker = await readClaudeUserModelPicker(this.#environment);
|
|
45337
45528
|
return {
|
|
45338
|
-
models: initialized.models,
|
|
45529
|
+
models: mergeClaudeModelPickerOptions(initialized.models, modelPicker),
|
|
45339
45530
|
canSelectModel,
|
|
45340
45531
|
canSelectPermissionMode
|
|
45341
45532
|
};
|
|
@@ -47903,7 +48094,7 @@ var ClaudeCodeAdapter = class {
|
|
|
47903
48094
|
error: invalidState("Claude Code Adapter is closing")
|
|
47904
48095
|
};
|
|
47905
48096
|
}
|
|
47906
|
-
const cwd =
|
|
48097
|
+
const cwd = path12.resolve(input.cwd ?? process.cwd());
|
|
47907
48098
|
if (!input.refresh) {
|
|
47908
48099
|
const cached2 = this.#inspectionCache.get(cwd);
|
|
47909
48100
|
if (cached2)
|
|
@@ -48084,7 +48275,7 @@ var ClaudeCodeAdapter = class {
|
|
|
48084
48275
|
}
|
|
48085
48276
|
};
|
|
48086
48277
|
}
|
|
48087
|
-
const cwd =
|
|
48278
|
+
const cwd = path12.resolve(input.cwd);
|
|
48088
48279
|
if (input.kind === "rollbackLastTurn") {
|
|
48089
48280
|
for (const source of this.#sessions) {
|
|
48090
48281
|
const ready = await source.prepareRollback(input.sourceRef.nativeSessionId);
|
|
@@ -48207,7 +48398,7 @@ var ClaudeCodeAdapter = class {
|
|
|
48207
48398
|
};
|
|
48208
48399
|
|
|
48209
48400
|
// dist/user-shell-environment.js
|
|
48210
|
-
import
|
|
48401
|
+
import path13 from "node:path";
|
|
48211
48402
|
import { execFile as execFile2 } from "node:child_process";
|
|
48212
48403
|
var ENVIRONMENT_MARKER = Buffer.from("\0CODEXHOST_USER_SHELL_ENV_V1\0");
|
|
48213
48404
|
var ENVIRONMENT_COMMAND = "printf '\\0CODEXHOST_USER_SHELL_ENV_V1\\0'; /usr/bin/env -0";
|
|
@@ -48250,7 +48441,7 @@ async function withUserShellEnvironment(environment, dependencies) {
|
|
|
48250
48441
|
if (platform === "win32" || !environment.HOME)
|
|
48251
48442
|
return environment;
|
|
48252
48443
|
const shell = environment.SHELL?.trim() || defaultShell(platform);
|
|
48253
|
-
if (!shell || !SUPPORTED_SHELLS.has(
|
|
48444
|
+
if (!shell || !SUPPORTED_SHELLS.has(path13.basename(shell)))
|
|
48254
48445
|
return environment;
|
|
48255
48446
|
const cacheKey = `${platform}\0${shell}\0${environment.HOME}`;
|
|
48256
48447
|
const cached2 = dependencies ? void 0 : shellEnvironmentCache.get(cacheKey);
|
|
@@ -14519,6 +14519,61 @@ function date4(params) {
|
|
|
14519
14519
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
14520
14520
|
config(en_default());
|
|
14521
14521
|
|
|
14522
|
+
// ../../shared-contracts/dist/credential-imports.js
|
|
14523
|
+
var credentialSourceSchema = external_exports.object({
|
|
14524
|
+
id: external_exports.string().min(1).max(256),
|
|
14525
|
+
harnessId: external_exports.string().min(1),
|
|
14526
|
+
label: external_exports.string().min(1).max(512),
|
|
14527
|
+
provider: external_exports.enum(["openai-codex", "xai"])
|
|
14528
|
+
}).strict();
|
|
14529
|
+
var credentialImportNameSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
14530
|
+
var credentialImportRecordSchema = external_exports.object({
|
|
14531
|
+
name: credentialImportNameSchema,
|
|
14532
|
+
source: credentialSourceSchema,
|
|
14533
|
+
importedAt: external_exports.string()
|
|
14534
|
+
}).strict();
|
|
14535
|
+
var credentialImportsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
14536
|
+
external_exports.object({ action: external_exports.literal("list") }).strict(),
|
|
14537
|
+
external_exports.object({
|
|
14538
|
+
action: external_exports.literal("import"),
|
|
14539
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
14540
|
+
name: credentialImportNameSchema,
|
|
14541
|
+
confirmed: external_exports.literal(true)
|
|
14542
|
+
}).strict(),
|
|
14543
|
+
external_exports.object({
|
|
14544
|
+
action: external_exports.literal("reimport"),
|
|
14545
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
14546
|
+
name: credentialImportNameSchema,
|
|
14547
|
+
confirmed: external_exports.literal(true)
|
|
14548
|
+
}).strict(),
|
|
14549
|
+
external_exports.object({
|
|
14550
|
+
action: external_exports.literal("remove"),
|
|
14551
|
+
name: credentialImportNameSchema,
|
|
14552
|
+
confirmed: external_exports.literal(true)
|
|
14553
|
+
}).strict()
|
|
14554
|
+
]);
|
|
14555
|
+
var credentialOtherLoginSchema = external_exports.object({
|
|
14556
|
+
provider: external_exports.string().min(1).max(128),
|
|
14557
|
+
type: external_exports.enum(["oauth", "api_key", "unknown"]),
|
|
14558
|
+
/** Best-effort account label (e.g. the email in a Codex token), derived locally when present. */
|
|
14559
|
+
label: external_exports.string().min(1).max(512).optional(),
|
|
14560
|
+
/** Recognized credential vendor, derived from the OAuth token issuer. Absent when unknown. */
|
|
14561
|
+
vendor: external_exports.enum(["openai-codex", "xai"]).optional()
|
|
14562
|
+
}).strict();
|
|
14563
|
+
var credentialImportsResultSchema = external_exports.object({
|
|
14564
|
+
sources: external_exports.array(credentialSourceSchema),
|
|
14565
|
+
targets: external_exports.array(external_exports.object({
|
|
14566
|
+
harnessId: external_exports.string(),
|
|
14567
|
+
providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
|
|
14568
|
+
imports: external_exports.array(credentialImportRecordSchema),
|
|
14569
|
+
others: external_exports.array(credentialOtherLoginSchema).default([])
|
|
14570
|
+
}).strict())
|
|
14571
|
+
}).strict();
|
|
14572
|
+
var credentialImportsParamsSchema = external_exports.object({
|
|
14573
|
+
targetHarnessId: external_exports.string().min(1).max(128).optional(),
|
|
14574
|
+
request: credentialImportsRequestSchema
|
|
14575
|
+
}).strict();
|
|
14576
|
+
|
|
14522
14577
|
// ../../shared-contracts/dist/version.js
|
|
14523
14578
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14524
14579
|
|
|
@@ -22466,7 +22521,7 @@ var CodeBuddyInteractions = class {
|
|
|
22466
22521
|
});
|
|
22467
22522
|
}
|
|
22468
22523
|
const actions = request.options.flatMap((option) => {
|
|
22469
|
-
const effect = option.kind === "allow_once" ? "allowOnce" : option.kind === "allow_always" ? "
|
|
22524
|
+
const effect = option.kind === "allow_once" ? "allowOnce" : option.kind === "allow_always" ? "allowForSession" : option.kind === "reject_once" || option.kind === "reject_always" ? "deny" : void 0;
|
|
22470
22525
|
return effect ? [{ id: option.optionId, label: option.name, effect }] : [];
|
|
22471
22526
|
});
|
|
22472
22527
|
if (!actions.some((action) => action.effect === "deny"))
|
|
@@ -27208,6 +27208,61 @@ function date4(params) {
|
|
|
27208
27208
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
27209
27209
|
config(en_default());
|
|
27210
27210
|
|
|
27211
|
+
// ../../shared-contracts/dist/credential-imports.js
|
|
27212
|
+
var credentialSourceSchema = external_exports.object({
|
|
27213
|
+
id: external_exports.string().min(1).max(256),
|
|
27214
|
+
harnessId: external_exports.string().min(1),
|
|
27215
|
+
label: external_exports.string().min(1).max(512),
|
|
27216
|
+
provider: external_exports.enum(["openai-codex", "xai"])
|
|
27217
|
+
}).strict();
|
|
27218
|
+
var credentialImportNameSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
27219
|
+
var credentialImportRecordSchema = external_exports.object({
|
|
27220
|
+
name: credentialImportNameSchema,
|
|
27221
|
+
source: credentialSourceSchema,
|
|
27222
|
+
importedAt: external_exports.string()
|
|
27223
|
+
}).strict();
|
|
27224
|
+
var credentialImportsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
27225
|
+
external_exports.object({ action: external_exports.literal("list") }).strict(),
|
|
27226
|
+
external_exports.object({
|
|
27227
|
+
action: external_exports.literal("import"),
|
|
27228
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
27229
|
+
name: credentialImportNameSchema,
|
|
27230
|
+
confirmed: external_exports.literal(true)
|
|
27231
|
+
}).strict(),
|
|
27232
|
+
external_exports.object({
|
|
27233
|
+
action: external_exports.literal("reimport"),
|
|
27234
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
27235
|
+
name: credentialImportNameSchema,
|
|
27236
|
+
confirmed: external_exports.literal(true)
|
|
27237
|
+
}).strict(),
|
|
27238
|
+
external_exports.object({
|
|
27239
|
+
action: external_exports.literal("remove"),
|
|
27240
|
+
name: credentialImportNameSchema,
|
|
27241
|
+
confirmed: external_exports.literal(true)
|
|
27242
|
+
}).strict()
|
|
27243
|
+
]);
|
|
27244
|
+
var credentialOtherLoginSchema = external_exports.object({
|
|
27245
|
+
provider: external_exports.string().min(1).max(128),
|
|
27246
|
+
type: external_exports.enum(["oauth", "api_key", "unknown"]),
|
|
27247
|
+
/** Best-effort account label (e.g. the email in a Codex token), derived locally when present. */
|
|
27248
|
+
label: external_exports.string().min(1).max(512).optional(),
|
|
27249
|
+
/** Recognized credential vendor, derived from the OAuth token issuer. Absent when unknown. */
|
|
27250
|
+
vendor: external_exports.enum(["openai-codex", "xai"]).optional()
|
|
27251
|
+
}).strict();
|
|
27252
|
+
var credentialImportsResultSchema = external_exports.object({
|
|
27253
|
+
sources: external_exports.array(credentialSourceSchema),
|
|
27254
|
+
targets: external_exports.array(external_exports.object({
|
|
27255
|
+
harnessId: external_exports.string(),
|
|
27256
|
+
providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
|
|
27257
|
+
imports: external_exports.array(credentialImportRecordSchema),
|
|
27258
|
+
others: external_exports.array(credentialOtherLoginSchema).default([])
|
|
27259
|
+
}).strict())
|
|
27260
|
+
}).strict();
|
|
27261
|
+
var credentialImportsParamsSchema = external_exports.object({
|
|
27262
|
+
targetHarnessId: external_exports.string().min(1).max(128).optional(),
|
|
27263
|
+
request: credentialImportsRequestSchema
|
|
27264
|
+
}).strict();
|
|
27265
|
+
|
|
27211
27266
|
// ../../shared-contracts/dist/version.js
|
|
27212
27267
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
27213
27268
|
|