@codexhost/cli-linux-arm64 0.18.0 → 0.20.0
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/console-server.mjs +83 -5
- package/app/console-web.js +1172 -687
- package/app/desktop-controller.mjs +314 -15
- package/app/host-runtime.mjs +13158 -2853
- package/app/plugins/antigravity/plugin.mjs +8861 -3944
- package/app/plugins/claude-code/plugin.mjs +164 -14
- package/app/plugins/codebuddy/plugin.mjs +193 -25
- package/app/plugins/codex-usage/plugin.mjs +85 -5
- package/app/plugins/copilot/plugin.mjs +85 -5
- package/app/plugins/cursor-cli/plugin.mjs +160 -15
- package/app/plugins/deepseek-harness/manifest.json +2 -2
- package/app/plugins/deepseek-harness/plugin.mjs +112 -10
- package/app/plugins/devin/plugin.mjs +84 -5
- package/app/plugins/grok/plugin.mjs +418 -272
- package/app/plugins/hermes/plugin.mjs +163 -17
- package/app/plugins/kimi-code/plugin.mjs +85 -5
- package/app/plugins/kiro-cli/plugin.mjs +313 -21
- package/app/plugins/omp/plugin.mjs +1018 -819
- package/app/plugins/opencode/plugin.mjs +85 -5
- package/app/plugins/pi/plugin.mjs +828 -663
- package/app/plugins/qoder/plugin.mjs +109 -10
- package/app/plugins/qoder-cn/plugin.mjs +109 -10
- package/app/plugins/qwen-code/plugin.mjs +194 -97
- package/app/plugins/workbuddy/plugin.mjs +197 -28
- package/app/plugins/zcode/plugin.mjs +158 -8
- package/app/renderer-extension.js +2065 -1004
- package/app/web/assets/index-D6-hvggd.css +1 -0
- package/app/web/assets/index-D85gPBbQ.js +201 -0
- package/app/web/assets/langs/{graphql-B8vkg11W.js → graphql-ChAeyPkT.js} +1 -1
- package/app/web/assets/langs/{http-DmoDEjMt.js → http-BvreBIbD.js} +1 -1
- package/app/web/assets/langs/{php-DJ5ovfAM.js → php-D8omCIuJ.js} +1 -1
- package/app/web/assets/langs/{rst-U5-R5x3p.js → rst-Do7RLLCS.js} +1 -1
- package/app/web/assets/langs/{ruby-VKVsnS0H.js → ruby-rH_O_vse.js} +1 -1
- package/app/web/assets/langs/{svelte-C20lOv9V.js → svelte-xZy73wAj.js} +1 -1
- package/app/web/assets/langs/{vue-z6Y-lzP-.js → vue-C4DW8agZ.js} +1 -1
- package/app/web/assets/{vendor-dSL872WO.js → vendor-C9g2bw8s.js} +3 -3
- package/app/web/codexhost-settings.js +1178 -689
- package/app/web/index.html +4 -3
- package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-connection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-file-upload/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-locale/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-attachment/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +134 -8
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +65 -63
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +95 -93
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-session/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.excel.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-user-questions/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +11 -11
- package/app/web-modules/server.mjs +2468 -1575
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-C0aXz2jD.js +0 -199
- package/app/web/assets/index-C3lniEH1.css +0 -1
|
@@ -3432,8 +3432,8 @@ var require_utils = __commonJS({
|
|
|
3432
3432
|
}
|
|
3433
3433
|
return ind;
|
|
3434
3434
|
}
|
|
3435
|
-
function removeDotSegments(
|
|
3436
|
-
let input =
|
|
3435
|
+
function removeDotSegments(path6) {
|
|
3436
|
+
let input = path6;
|
|
3437
3437
|
const output = [];
|
|
3438
3438
|
let nextSlash = -1;
|
|
3439
3439
|
let len = 0;
|
|
@@ -3685,8 +3685,8 @@ var require_schemes = __commonJS({
|
|
|
3685
3685
|
wsComponent.secure = void 0;
|
|
3686
3686
|
}
|
|
3687
3687
|
if (wsComponent.resourceName) {
|
|
3688
|
-
const [
|
|
3689
|
-
wsComponent.path =
|
|
3688
|
+
const [path6, query] = wsComponent.resourceName.split("?");
|
|
3689
|
+
wsComponent.path = path6 && path6 !== "/" ? path6 : void 0;
|
|
3690
3690
|
wsComponent.query = query;
|
|
3691
3691
|
wsComponent.resourceName = void 0;
|
|
3692
3692
|
}
|
|
@@ -6897,7 +6897,7 @@ var require_dist = __commonJS({
|
|
|
6897
6897
|
|
|
6898
6898
|
// dist/qwen-code-adapter.js
|
|
6899
6899
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
6900
|
-
import
|
|
6900
|
+
import path5 from "node:path";
|
|
6901
6901
|
|
|
6902
6902
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
6903
6903
|
var external_exports = {};
|
|
@@ -7665,10 +7665,10 @@ function mergeDefs(...defs) {
|
|
|
7665
7665
|
function cloneDef(schema) {
|
|
7666
7666
|
return mergeDefs(schema._zod.def);
|
|
7667
7667
|
}
|
|
7668
|
-
function getElementAtPath(obj,
|
|
7669
|
-
if (!
|
|
7668
|
+
function getElementAtPath(obj, path6) {
|
|
7669
|
+
if (!path6)
|
|
7670
7670
|
return obj;
|
|
7671
|
-
return
|
|
7671
|
+
return path6.reduce((acc, key) => acc?.[key], obj);
|
|
7672
7672
|
}
|
|
7673
7673
|
function promiseAllObject(promisesObj) {
|
|
7674
7674
|
const keys = Object.keys(promisesObj);
|
|
@@ -8077,11 +8077,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
8077
8077
|
}
|
|
8078
8078
|
return false;
|
|
8079
8079
|
}
|
|
8080
|
-
function prefixIssues(
|
|
8080
|
+
function prefixIssues(path6, issues) {
|
|
8081
8081
|
return issues.map((iss) => {
|
|
8082
8082
|
var _a3;
|
|
8083
8083
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
8084
|
-
iss.path.unshift(
|
|
8084
|
+
iss.path.unshift(path6);
|
|
8085
8085
|
return iss;
|
|
8086
8086
|
});
|
|
8087
8087
|
}
|
|
@@ -8228,16 +8228,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
8228
8228
|
}
|
|
8229
8229
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
8230
8230
|
const fieldErrors = { _errors: [] };
|
|
8231
|
-
const processError = (error52,
|
|
8231
|
+
const processError = (error52, path6 = []) => {
|
|
8232
8232
|
for (const issue2 of error52.issues) {
|
|
8233
8233
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
8234
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
8234
|
+
issue2.errors.map((issues) => processError({ issues }, [...path6, ...issue2.path]));
|
|
8235
8235
|
} else if (issue2.code === "invalid_key") {
|
|
8236
|
-
processError({ issues: issue2.issues }, [...
|
|
8236
|
+
processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
|
|
8237
8237
|
} else if (issue2.code === "invalid_element") {
|
|
8238
|
-
processError({ issues: issue2.issues }, [...
|
|
8238
|
+
processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
|
|
8239
8239
|
} else {
|
|
8240
|
-
const fullpath = [...
|
|
8240
|
+
const fullpath = [...path6, ...issue2.path];
|
|
8241
8241
|
if (fullpath.length === 0) {
|
|
8242
8242
|
fieldErrors._errors.push(mapper(issue2));
|
|
8243
8243
|
} else {
|
|
@@ -8264,17 +8264,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
8264
8264
|
}
|
|
8265
8265
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
8266
8266
|
const result = { errors: [] };
|
|
8267
|
-
const processError = (error52,
|
|
8267
|
+
const processError = (error52, path6 = []) => {
|
|
8268
8268
|
var _a3, _b;
|
|
8269
8269
|
for (const issue2 of error52.issues) {
|
|
8270
8270
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
8271
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
8271
|
+
issue2.errors.map((issues) => processError({ issues }, [...path6, ...issue2.path]));
|
|
8272
8272
|
} else if (issue2.code === "invalid_key") {
|
|
8273
|
-
processError({ issues: issue2.issues }, [...
|
|
8273
|
+
processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
|
|
8274
8274
|
} else if (issue2.code === "invalid_element") {
|
|
8275
|
-
processError({ issues: issue2.issues }, [...
|
|
8275
|
+
processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
|
|
8276
8276
|
} else {
|
|
8277
|
-
const fullpath = [...
|
|
8277
|
+
const fullpath = [...path6, ...issue2.path];
|
|
8278
8278
|
if (fullpath.length === 0) {
|
|
8279
8279
|
result.errors.push(mapper(issue2));
|
|
8280
8280
|
continue;
|
|
@@ -8306,8 +8306,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
8306
8306
|
}
|
|
8307
8307
|
function toDotPath(_path) {
|
|
8308
8308
|
const segs = [];
|
|
8309
|
-
const
|
|
8310
|
-
for (const seg of
|
|
8309
|
+
const path6 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
8310
|
+
for (const seg of path6) {
|
|
8311
8311
|
if (typeof seg === "number")
|
|
8312
8312
|
segs.push(`[${seg}]`);
|
|
8313
8313
|
else if (typeof seg === "symbol")
|
|
@@ -20999,13 +20999,13 @@ function resolveRef(ref, ctx) {
|
|
|
20999
20999
|
if (!ref.startsWith("#")) {
|
|
21000
21000
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
21001
21001
|
}
|
|
21002
|
-
const
|
|
21003
|
-
if (
|
|
21002
|
+
const path6 = ref.slice(1).split("/").filter(Boolean);
|
|
21003
|
+
if (path6.length === 0) {
|
|
21004
21004
|
return ctx.rootSchema;
|
|
21005
21005
|
}
|
|
21006
21006
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
21007
|
-
if (
|
|
21008
|
-
const key =
|
|
21007
|
+
if (path6[0] === defsKey) {
|
|
21008
|
+
const key = path6[1];
|
|
21009
21009
|
if (!key || !ctx.defs[key]) {
|
|
21010
21010
|
throw new Error(`Reference not found: ${ref}`);
|
|
21011
21011
|
}
|
|
@@ -21550,13 +21550,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
21550
21550
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
21551
21551
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
21552
21552
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
21553
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
21554
|
+
version: external_exports.literal(3).optional(),
|
|
21555
|
+
requestId: external_exports.string().min(1),
|
|
21556
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
21557
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
21558
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
21559
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
21560
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
21553
21561
|
var usageMeasurementSchema = external_exports.object({
|
|
21562
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
|
|
21554
21563
|
value: finiteNonNegativeNumberSchema,
|
|
21555
21564
|
turnId: external_exports.string().min(1).max(1024),
|
|
21556
21565
|
at: nonNegativeSafeIntegerSchema
|
|
21557
21566
|
}).strict();
|
|
21558
21567
|
var usageMeasurementsSchema = external_exports.object({
|
|
21559
|
-
|
|
21568
|
+
// Unversioned intervals can omit hidden thinking time; do not restore them into averages.
|
|
21569
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
|
|
21570
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
21571
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
|
|
21560
21572
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
21561
21573
|
}).strict();
|
|
21562
21574
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -21576,6 +21588,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
21576
21588
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
21577
21589
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
21578
21590
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
21591
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
21579
21592
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
21580
21593
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
21581
21594
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -21987,11 +22000,19 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
21987
22000
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
21988
22001
|
}).strict();
|
|
21989
22002
|
|
|
22003
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
22004
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
22005
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
22006
|
+
|
|
21990
22007
|
// ../../shared-contracts/dist/client-channel.js
|
|
21991
22008
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
21992
22009
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
21993
22010
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
21994
22011
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
22012
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
22013
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
22014
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
22015
|
+
}).strict();
|
|
21995
22016
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
21996
22017
|
prompt: external_exports.string().max(16384).optional()
|
|
21997
22018
|
}).strict();
|
|
@@ -22008,6 +22029,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
22008
22029
|
sequence: external_exports.number().int().nonnegative()
|
|
22009
22030
|
});
|
|
22010
22031
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
22032
|
+
external_exports.object({
|
|
22033
|
+
type: external_exports.literal("skills-changed"),
|
|
22034
|
+
cursor: clientChannelCursorSchema,
|
|
22035
|
+
cwd: external_exports.string().optional()
|
|
22036
|
+
}),
|
|
22011
22037
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
22012
22038
|
external_exports.object({
|
|
22013
22039
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -22117,7 +22143,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
22117
22143
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
22118
22144
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
22119
22145
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
22120
|
-
command: external_exports.object({
|
|
22146
|
+
command: external_exports.object({
|
|
22147
|
+
name: external_exports.string().min(1),
|
|
22148
|
+
turn: clientTurnSchema,
|
|
22149
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
22150
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
22151
|
+
}).optional(),
|
|
22121
22152
|
thread: external_exports.object({
|
|
22122
22153
|
id: external_exports.string().min(1),
|
|
22123
22154
|
cwd: external_exports.string(),
|
|
@@ -22205,6 +22236,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
22205
22236
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
22206
22237
|
]);
|
|
22207
22238
|
|
|
22239
|
+
// ../../shared-contracts/dist/skills.js
|
|
22240
|
+
var skillsListParamsSchema = external_exports.object({
|
|
22241
|
+
threadId: hostThreadIdSchema.optional(),
|
|
22242
|
+
cwd: external_exports.string().min(1).optional()
|
|
22243
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
22244
|
+
message: "Specify threadId or cwd, not both"
|
|
22245
|
+
});
|
|
22246
|
+
var librarySkillSchema = external_exports.object({
|
|
22247
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
22248
|
+
description: external_exports.string().optional(),
|
|
22249
|
+
path: external_exports.string().min(1),
|
|
22250
|
+
scope: external_exports.enum(["project", "global"]),
|
|
22251
|
+
source: external_exports.string().min(1)
|
|
22252
|
+
}).strict();
|
|
22253
|
+
var skillsListResultSchema = external_exports.object({
|
|
22254
|
+
revision: external_exports.number().int().nonnegative(),
|
|
22255
|
+
complete: external_exports.boolean(),
|
|
22256
|
+
skills: external_exports.array(librarySkillSchema),
|
|
22257
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
22258
|
+
}).strict();
|
|
22259
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
22260
|
+
|
|
22208
22261
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
22209
22262
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
22210
22263
|
/**
|
|
@@ -22303,15 +22356,14 @@ var webAccessStateSchema = external_exports.object({
|
|
|
22303
22356
|
quotaUntil: external_exports.string().optional()
|
|
22304
22357
|
}).strict().optional()
|
|
22305
22358
|
}).strict();
|
|
22306
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
22307
22359
|
|
|
22308
22360
|
// ../../shared-contracts/dist/delegation-read.js
|
|
22309
22361
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
22310
22362
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
22311
22363
|
threadId: external_exports.string().min(1).max(1024),
|
|
22312
22364
|
view: external_exports.enum(["result", "messages"]),
|
|
22313
|
-
|
|
22314
|
-
|
|
22365
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
22366
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
22315
22367
|
});
|
|
22316
22368
|
|
|
22317
22369
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -23262,6 +23314,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
23262
23314
|
status: updateStatusSchema.nullable()
|
|
23263
23315
|
});
|
|
23264
23316
|
|
|
23317
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
23318
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
23319
|
+
"completed",
|
|
23320
|
+
"failed",
|
|
23321
|
+
"interrupted",
|
|
23322
|
+
"timedOut",
|
|
23323
|
+
"unreadable",
|
|
23324
|
+
"notFound"
|
|
23325
|
+
];
|
|
23326
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
23327
|
+
|
|
23265
23328
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
23266
23329
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
23267
23330
|
"idle",
|
|
@@ -23309,6 +23372,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
23309
23372
|
archived: external_exports.boolean()
|
|
23310
23373
|
}),
|
|
23311
23374
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
23375
|
+
external_exports.strictObject({
|
|
23376
|
+
kind: external_exports.literal("configure"),
|
|
23377
|
+
...thread,
|
|
23378
|
+
epoch: identity,
|
|
23379
|
+
modelId: identity.optional(),
|
|
23380
|
+
thinkingOptionId: identity.optional(),
|
|
23381
|
+
permissionModeId: identity.optional()
|
|
23382
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
23312
23383
|
external_exports.strictObject({
|
|
23313
23384
|
kind: external_exports.literal("prompt"),
|
|
23314
23385
|
...thread,
|
|
@@ -23381,6 +23452,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
23381
23452
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
23382
23453
|
]);
|
|
23383
23454
|
|
|
23455
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
23456
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
23457
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
23458
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
23459
|
+
});
|
|
23460
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
23461
|
+
|
|
23384
23462
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
23385
23463
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
23386
23464
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -23561,6 +23639,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
23561
23639
|
"totalCredits",
|
|
23562
23640
|
"contextUsagePercent",
|
|
23563
23641
|
"outputTokensPerSecond",
|
|
23642
|
+
"sessionOutputTokensPerSecond",
|
|
23564
23643
|
"apiOutputTokensPerSecond",
|
|
23565
23644
|
"costSource",
|
|
23566
23645
|
"unpricedModels"
|
|
@@ -23583,6 +23662,7 @@ function parseHostUsage(value) {
|
|
|
23583
23662
|
for (const field2 of [
|
|
23584
23663
|
"totalCredits",
|
|
23585
23664
|
"contextUsagePercent",
|
|
23665
|
+
"sessionOutputTokensPerSecond",
|
|
23586
23666
|
"apiOutputTokensPerSecond"
|
|
23587
23667
|
]) {
|
|
23588
23668
|
const candidate = value[field2];
|
|
@@ -25446,7 +25526,9 @@ var It = class n2 {
|
|
|
25446
25526
|
f && (k.execPath = f), this.childProcess = Fs(d, m, k);
|
|
25447
25527
|
} else K.debug(`Spawning CLI (${s.type}): ${s.command} ${[...s.args, ...e].join(" ")}`), this.childProcess = jn(s.command, [...s.args, ...e], { cwd: t, env: o, stdio: ["pipe", "pipe", r], signal: this.abortController.signal });
|
|
25448
25528
|
} else K.debug(`Spawning CLI (${s.type}): ${s.command} ${[...s.args, ...e].join(" ")}`), this.childProcess = jn(s.command, [...s.args, ...e], { cwd: t, env: o, stdio: ["pipe", "pipe", r], signal: this.abortController.signal });
|
|
25449
|
-
this.childStdin = this.childProcess.stdin, this.
|
|
25529
|
+
this.childStdin = this.childProcess.stdin, this.childStdin.on("error", (i) => {
|
|
25530
|
+
this.inputClosed = true, K.warn(`CLI stdin closed: ${i.message}`);
|
|
25531
|
+
}), this.childStdout = this.childProcess.stdout, (this.options.debug || this.options.stderr) && this.childProcess.stderr?.on("data", (i) => {
|
|
25450
25532
|
K.debug(i.toString());
|
|
25451
25533
|
}), this.abortHandler = () => {
|
|
25452
25534
|
this.killChildProcess();
|
|
@@ -27727,57 +27809,6 @@ var sd = /* @__PURE__ */ new Set(["plan", "default"]);
|
|
|
27727
27809
|
var Ds = pe.filter((n18) => !sd.has(n18));
|
|
27728
27810
|
var rd = pe.join(", ");
|
|
27729
27811
|
|
|
27730
|
-
// dist/permission-modes.js
|
|
27731
|
-
var nativePermissionModes = /* @__PURE__ */ new Set([
|
|
27732
|
-
"plan",
|
|
27733
|
-
"default",
|
|
27734
|
-
"auto-edit",
|
|
27735
|
-
"auto",
|
|
27736
|
-
"yolo"
|
|
27737
|
-
]);
|
|
27738
|
-
var QWEN_CODE_DEFAULT_PERMISSION_MODE_ID = harnessPermissionModeIdSchema.parse("default");
|
|
27739
|
-
var QWEN_CODE_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
|
|
27740
|
-
modes: [
|
|
27741
|
-
{
|
|
27742
|
-
id: "plan",
|
|
27743
|
-
label: "Plan",
|
|
27744
|
-
description: "Analyze only, do not modify files or execute commands."
|
|
27745
|
-
},
|
|
27746
|
-
{
|
|
27747
|
-
id: "default",
|
|
27748
|
-
label: "Default",
|
|
27749
|
-
description: "Require approval for file edits or shell commands."
|
|
27750
|
-
},
|
|
27751
|
-
{
|
|
27752
|
-
id: "auto-edit",
|
|
27753
|
-
label: "Auto Edit",
|
|
27754
|
-
description: "Automatically approve file edits."
|
|
27755
|
-
},
|
|
27756
|
-
{
|
|
27757
|
-
id: "auto",
|
|
27758
|
-
label: "Auto",
|
|
27759
|
-
description: "LLM classifier auto-approves safe actions, blocks risky ones."
|
|
27760
|
-
},
|
|
27761
|
-
{
|
|
27762
|
-
id: "yolo",
|
|
27763
|
-
label: "YOLO",
|
|
27764
|
-
description: "Automatically approve all tools.",
|
|
27765
|
-
dangerous: true
|
|
27766
|
-
}
|
|
27767
|
-
],
|
|
27768
|
-
defaultModeId: QWEN_CODE_DEFAULT_PERMISSION_MODE_ID
|
|
27769
|
-
});
|
|
27770
|
-
function decodeQwenCodePermissionModeId(permissionModeId) {
|
|
27771
|
-
const parsed = harnessPermissionModeIdSchema.parse(permissionModeId);
|
|
27772
|
-
if (!nativePermissionModes.has(parsed)) {
|
|
27773
|
-
throw new Error("Qwen Code Permission Mode belongs to another Adapter");
|
|
27774
|
-
}
|
|
27775
|
-
return parsed;
|
|
27776
|
-
}
|
|
27777
|
-
|
|
27778
|
-
// dist/command.js
|
|
27779
|
-
import path2 from "node:path";
|
|
27780
|
-
|
|
27781
27812
|
// ../../harness-discovery/dist/environment.js
|
|
27782
27813
|
import fs from "node:fs";
|
|
27783
27814
|
import path from "node:path";
|
|
@@ -27824,6 +27855,20 @@ function newestFirst(names) {
|
|
|
27824
27855
|
return [...names].sort((left, right) => right.localeCompare(left, void 0, { numeric: true }));
|
|
27825
27856
|
}
|
|
27826
27857
|
|
|
27858
|
+
// ../../harness-discovery/dist/node-runtime.js
|
|
27859
|
+
import path2 from "node:path";
|
|
27860
|
+
function withNodeRuntimeOnPath(environment, runtimeExecutable = process.execPath, platform = process.platform) {
|
|
27861
|
+
const pathKey = Object.keys(environment).find((name) => name.toLowerCase() === "path") ?? "PATH";
|
|
27862
|
+
const delimiter = platform === "win32" ? ";" : ":";
|
|
27863
|
+
const runtimeDirectory = path2.dirname(runtimeExecutable);
|
|
27864
|
+
const directories = (environment[pathKey] ?? "").split(delimiter).filter(Boolean);
|
|
27865
|
+
const equal = platform === "win32" ? (value) => value.toLowerCase() : (value) => value;
|
|
27866
|
+
if (!directories.some((directory) => equal(directory) === equal(runtimeDirectory))) {
|
|
27867
|
+
directories.push(runtimeDirectory);
|
|
27868
|
+
}
|
|
27869
|
+
return { ...environment, [pathKey]: directories.join(delimiter) };
|
|
27870
|
+
}
|
|
27871
|
+
|
|
27827
27872
|
// ../../harness-discovery/dist/resolve.js
|
|
27828
27873
|
import os from "node:os";
|
|
27829
27874
|
|
|
@@ -27987,7 +28032,56 @@ function resolveHarnessExecutable(spec, input, dependencies = {}) {
|
|
|
27987
28032
|
return void 0;
|
|
27988
28033
|
}
|
|
27989
28034
|
|
|
28035
|
+
// dist/permission-modes.js
|
|
28036
|
+
var nativePermissionModes = /* @__PURE__ */ new Set([
|
|
28037
|
+
"plan",
|
|
28038
|
+
"default",
|
|
28039
|
+
"auto-edit",
|
|
28040
|
+
"auto",
|
|
28041
|
+
"yolo"
|
|
28042
|
+
]);
|
|
28043
|
+
var QWEN_CODE_DEFAULT_PERMISSION_MODE_ID = harnessPermissionModeIdSchema.parse("default");
|
|
28044
|
+
var QWEN_CODE_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
|
|
28045
|
+
modes: [
|
|
28046
|
+
{
|
|
28047
|
+
id: "plan",
|
|
28048
|
+
label: "Plan",
|
|
28049
|
+
description: "Analyze only, do not modify files or execute commands."
|
|
28050
|
+
},
|
|
28051
|
+
{
|
|
28052
|
+
id: "default",
|
|
28053
|
+
label: "Default",
|
|
28054
|
+
description: "Require approval for file edits or shell commands."
|
|
28055
|
+
},
|
|
28056
|
+
{
|
|
28057
|
+
id: "auto-edit",
|
|
28058
|
+
label: "Auto Edit",
|
|
28059
|
+
description: "Automatically approve file edits."
|
|
28060
|
+
},
|
|
28061
|
+
{
|
|
28062
|
+
id: "auto",
|
|
28063
|
+
label: "Auto",
|
|
28064
|
+
description: "LLM classifier auto-approves safe actions, blocks risky ones."
|
|
28065
|
+
},
|
|
28066
|
+
{
|
|
28067
|
+
id: "yolo",
|
|
28068
|
+
label: "YOLO",
|
|
28069
|
+
description: "Automatically approve all tools.",
|
|
28070
|
+
dangerous: true
|
|
28071
|
+
}
|
|
28072
|
+
],
|
|
28073
|
+
defaultModeId: QWEN_CODE_DEFAULT_PERMISSION_MODE_ID
|
|
28074
|
+
});
|
|
28075
|
+
function decodeQwenCodePermissionModeId(permissionModeId) {
|
|
28076
|
+
const parsed = harnessPermissionModeIdSchema.parse(permissionModeId);
|
|
28077
|
+
if (!nativePermissionModes.has(parsed)) {
|
|
28078
|
+
throw new Error("Qwen Code Permission Mode belongs to another Adapter");
|
|
28079
|
+
}
|
|
28080
|
+
return parsed;
|
|
28081
|
+
}
|
|
28082
|
+
|
|
27990
28083
|
// dist/command.js
|
|
28084
|
+
import path3 from "node:path";
|
|
27991
28085
|
var QWEN_NPM_ENTRY = "node_modules/@qwen-code/qwen-code/cli-entry.js";
|
|
27992
28086
|
var qwenCodeDiscoverySpec = {
|
|
27993
28087
|
id: "qwen-code",
|
|
@@ -28019,7 +28113,7 @@ function resolveQwenCodeExecutable(input = {}, dependencies = {}) {
|
|
|
28019
28113
|
}, dependencies);
|
|
28020
28114
|
if (!resolution)
|
|
28021
28115
|
throw new Error("Executable file not found: Qwen Code CLI is not installed");
|
|
28022
|
-
return targetPath(platform).isAbsolute(resolution.executable) ? resolution.executable :
|
|
28116
|
+
return targetPath(platform).isAbsolute(resolution.executable) ? resolution.executable : path3.resolve(resolution.executable);
|
|
28023
28117
|
}
|
|
28024
28118
|
|
|
28025
28119
|
// dist/qwen-tool-output.js
|
|
@@ -28375,7 +28469,7 @@ var QwenCodeSdkTransport = class {
|
|
|
28375
28469
|
cwd: this.#options.cwd,
|
|
28376
28470
|
...input.model ? { model: input.model } : {},
|
|
28377
28471
|
...this.#options.commandTimeoutMs ? { timeout: { controlRequest: this.#options.commandTimeoutMs } } : {},
|
|
28378
|
-
|
|
28472
|
+
env: environment,
|
|
28379
28473
|
abortController,
|
|
28380
28474
|
includePartialMessages: true,
|
|
28381
28475
|
pathToQwenExecutable: executable,
|
|
@@ -28402,10 +28496,13 @@ var QwenCodeSdkTransport = class {
|
|
|
28402
28496
|
throw classifyError(error51);
|
|
28403
28497
|
}
|
|
28404
28498
|
}
|
|
28499
|
+
/**
|
|
28500
|
+
* The SDK merges `env` over `process.env`. Supplying PATH here keeps a
|
|
28501
|
+
* `#!/usr/bin/env node` launcher runnable when the Host started with a
|
|
28502
|
+
* minimal PATH (for example from a login item).
|
|
28503
|
+
*/
|
|
28405
28504
|
#environment() {
|
|
28406
|
-
const environment = this.#options.environment;
|
|
28407
|
-
if (!environment)
|
|
28408
|
-
return void 0;
|
|
28505
|
+
const environment = withNodeRuntimeOnPath({ ...process.env, ...this.#options.environment });
|
|
28409
28506
|
return Object.fromEntries(Object.entries(environment).filter((entry) => typeof entry[1] === "string"));
|
|
28410
28507
|
}
|
|
28411
28508
|
#canUseTool = async (toolName, input) => {
|
|
@@ -28619,7 +28716,7 @@ function stateForQwenCodeModel(modelState, nativeState, model2 = modelState.curr
|
|
|
28619
28716
|
// dist/qwen-history.js
|
|
28620
28717
|
import { readFile } from "node:fs/promises";
|
|
28621
28718
|
import os2 from "node:os";
|
|
28622
|
-
import
|
|
28719
|
+
import path4 from "node:path";
|
|
28623
28720
|
var QWEN_CODE_TURN_KEY_PREFIX = "qwen-turn-";
|
|
28624
28721
|
function qwenCodeTurnKey(ordinal) {
|
|
28625
28722
|
return `${QWEN_CODE_TURN_KEY_PREFIX}${ordinal}`;
|
|
@@ -28864,21 +28961,21 @@ function sanitizeCwd(cwd) {
|
|
|
28864
28961
|
return (process.platform === "win32" ? cwd.toLowerCase() : cwd).replace(/[^a-zA-Z0-9]/g, "-");
|
|
28865
28962
|
}
|
|
28866
28963
|
function resolveQwenDirectory(value, cwd) {
|
|
28867
|
-
const expanded = value === "~" || value.startsWith("~/") || value.startsWith("~\\") ?
|
|
28868
|
-
return
|
|
28964
|
+
const expanded = value === "~" || value.startsWith("~/") || value.startsWith("~\\") ? path4.join(os2.homedir(), ...value.slice(value === "~" ? 1 : 2).split(/[/\\]+/u).filter(Boolean)) : value;
|
|
28965
|
+
return path4.isAbsolute(expanded) ? expanded : path4.resolve(cwd, expanded);
|
|
28869
28966
|
}
|
|
28870
28967
|
function qwenRuntimeBase(cwd, environment) {
|
|
28871
28968
|
const overrides = Object.fromEntries(Object.entries(environment ?? {}).filter((entry) => typeof entry[1] === "string"));
|
|
28872
28969
|
const effectiveEnvironment = { ...process.env, ...overrides };
|
|
28873
28970
|
const configured = effectiveEnvironment.QWEN_RUNTIME_DIR || effectiveEnvironment.QWEN_HOME;
|
|
28874
|
-
return configured ? resolveQwenDirectory(configured, cwd) :
|
|
28971
|
+
return configured ? resolveQwenDirectory(configured, cwd) : path4.join(os2.homedir(), ".qwen");
|
|
28875
28972
|
}
|
|
28876
28973
|
async function readQwenCodeHistory(cwd, harnessId, sessionId, knownTurnRefs = [], toolOutputLimit = 64e3, environment) {
|
|
28877
28974
|
const runtimeBase = qwenRuntimeBase(cwd, environment);
|
|
28878
|
-
const projectDir =
|
|
28975
|
+
const projectDir = path4.join(runtimeBase, "projects", sanitizeCwd(cwd), "chats");
|
|
28879
28976
|
const paths = [
|
|
28880
|
-
|
|
28881
|
-
|
|
28977
|
+
path4.join(projectDir, `${sessionId}.jsonl`),
|
|
28978
|
+
path4.join(projectDir, "archive", `${sessionId}.jsonl`)
|
|
28882
28979
|
];
|
|
28883
28980
|
let lastReadError;
|
|
28884
28981
|
for (const filePath of paths) {
|
|
@@ -29621,7 +29718,7 @@ var QwenCodeAdapter = class {
|
|
|
29621
29718
|
if (this.#closePromise) {
|
|
29622
29719
|
return { status: "unavailable", error: invalidState("Qwen Code Adapter is closed") };
|
|
29623
29720
|
}
|
|
29624
|
-
const cwd =
|
|
29721
|
+
const cwd = path5.resolve(input.cwd ?? process.cwd());
|
|
29625
29722
|
if (!input.refresh) {
|
|
29626
29723
|
const cached2 = this.#inspectionCache.get(cwd);
|
|
29627
29724
|
if (cached2)
|
|
@@ -29688,7 +29785,7 @@ var QwenCodeAdapter = class {
|
|
|
29688
29785
|
}
|
|
29689
29786
|
};
|
|
29690
29787
|
}
|
|
29691
|
-
const cwd =
|
|
29788
|
+
const cwd = path5.resolve(input.cwd);
|
|
29692
29789
|
const sessionEnvironment = mergeEnvironment(this.#environment, input.environment);
|
|
29693
29790
|
let initialPermissionModeId = QWEN_CODE_DEFAULT_PERMISSION_MODE_ID;
|
|
29694
29791
|
if (input.kind === "create") {
|