@codexhost/cli-darwin-x64 0.19.0 → 0.21.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 +45 -4
- package/app/console-web.js +1124 -684
- package/app/desktop-controller.mjs +197 -50
- package/app/host-runtime.mjs +36192 -29254
- package/app/plugins/antigravity/assets/icon.svg +1 -1
- package/app/plugins/antigravity/plugin.mjs +8863 -4094
- package/app/plugins/claude-code/plugin.mjs +173 -26
- package/app/plugins/codebuddy/plugin.mjs +71 -6
- package/app/plugins/codex-usage/plugin.mjs +56 -4
- package/app/plugins/copilot/plugin.mjs +48 -4
- package/app/plugins/cursor-cli/plugin.mjs +48 -4
- package/app/plugins/deepseek-harness/plugin.mjs +73 -9
- package/app/plugins/devin/plugin.mjs +47 -4
- package/app/plugins/grok/plugin.mjs +84 -13
- package/app/plugins/hermes/plugin.mjs +47 -4
- package/app/plugins/kimi-code/plugin.mjs +73 -14
- package/app/plugins/kiro-cli/plugin.mjs +48 -4
- package/app/plugins/omp/plugin.mjs +74 -7
- package/app/plugins/opencode/plugin.mjs +74 -13
- package/app/plugins/pi/plugin.mjs +75 -7
- package/app/plugins/qoder/plugin.mjs +85 -5
- package/app/plugins/qoder-cn/plugin.mjs +85 -5
- package/app/plugins/qwen-code/plugin.mjs +48 -4
- package/app/plugins/workbuddy/plugin.mjs +75 -9
- package/app/plugins/zcode/plugin.mjs +56 -4
- package/app/renderer-extension.js +1431 -737
- package/app/web/assets/index-BdmZfTRW.js +201 -0
- package/app/web/assets/index-DJW4bmyx.css +1 -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 +1130 -686
- 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-ui-chat/client.js +74 -69
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +7 -7
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +27 -27
- 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/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.js +9 -9
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +7 -7
- package/app/web-modules/server.mjs +1144 -731
- 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-BNQIOOHE.css +0 -1
- package/app/web/assets/index-Feo4BkqN.js +0 -199
|
@@ -15023,13 +15023,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
15023
15023
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15024
15024
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15025
15025
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15026
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
15027
|
+
version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
15028
|
+
requestId: external_exports.string().min(1),
|
|
15029
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
15030
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
15031
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
15032
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
15033
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
15026
15034
|
var usageMeasurementSchema = external_exports.object({
|
|
15035
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
15027
15036
|
value: finiteNonNegativeNumberSchema,
|
|
15028
15037
|
turnId: external_exports.string().min(1).max(1024),
|
|
15029
15038
|
at: nonNegativeSafeIntegerSchema
|
|
15030
15039
|
}).strict();
|
|
15031
15040
|
var usageMeasurementsSchema = external_exports.object({
|
|
15032
|
-
|
|
15041
|
+
// Older intervals can omit hidden thinking time; do not restore them into averages.
|
|
15042
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
|
|
15043
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
15044
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
|
|
15033
15045
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
15034
15046
|
}).strict();
|
|
15035
15047
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -15049,6 +15061,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15049
15061
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15050
15062
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15051
15063
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15064
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15052
15065
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15053
15066
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15054
15067
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15460,6 +15473,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15460
15473
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15461
15474
|
}).strict();
|
|
15462
15475
|
|
|
15476
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
15477
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
15478
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
15479
|
+
|
|
15463
15480
|
// ../../shared-contracts/dist/client-channel.js
|
|
15464
15481
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15465
15482
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -15490,6 +15507,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
15490
15507
|
cursor: clientChannelCursorSchema,
|
|
15491
15508
|
cwd: external_exports.string().optional()
|
|
15492
15509
|
}),
|
|
15510
|
+
external_exports.object({
|
|
15511
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
15512
|
+
cursor: clientChannelCursorSchema,
|
|
15513
|
+
harnessId: external_exports.string().min(1)
|
|
15514
|
+
}),
|
|
15493
15515
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15494
15516
|
external_exports.object({
|
|
15495
15517
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15561,6 +15583,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
15561
15583
|
var clientTurnSchema = external_exports.object({
|
|
15562
15584
|
id: external_exports.string().min(1),
|
|
15563
15585
|
status: external_exports.string().min(1),
|
|
15586
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
15587
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
15564
15588
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
15565
15589
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
15566
15590
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -15599,7 +15623,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
15599
15623
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
15600
15624
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
15601
15625
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
15602
|
-
command: external_exports.object({
|
|
15626
|
+
command: external_exports.object({
|
|
15627
|
+
name: external_exports.string().min(1),
|
|
15628
|
+
turn: clientTurnSchema,
|
|
15629
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
15630
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
15631
|
+
}).optional(),
|
|
15603
15632
|
thread: external_exports.object({
|
|
15604
15633
|
id: external_exports.string().min(1),
|
|
15605
15634
|
cwd: external_exports.string(),
|
|
@@ -15807,7 +15836,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
15807
15836
|
quotaUntil: external_exports.string().optional()
|
|
15808
15837
|
}).strict().optional()
|
|
15809
15838
|
}).strict();
|
|
15810
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
15811
15839
|
|
|
15812
15840
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15813
15841
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -16773,6 +16801,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
16773
16801
|
"completed",
|
|
16774
16802
|
"failed",
|
|
16775
16803
|
"interrupted",
|
|
16804
|
+
"needsInput",
|
|
16776
16805
|
"timedOut",
|
|
16777
16806
|
"unreadable",
|
|
16778
16807
|
"notFound"
|
|
@@ -16819,13 +16848,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
16819
16848
|
var thread = { ...target, threadId: identity };
|
|
16820
16849
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16821
16850
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16851
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
16822
16852
|
external_exports.strictObject({
|
|
16823
16853
|
kind: external_exports.literal("list"),
|
|
16824
16854
|
...target,
|
|
16825
16855
|
cursor: external_exports.string().nullable(),
|
|
16826
16856
|
archived: external_exports.boolean()
|
|
16827
16857
|
}),
|
|
16828
|
-
external_exports.strictObject({
|
|
16858
|
+
external_exports.strictObject({
|
|
16859
|
+
kind: external_exports.literal("read"),
|
|
16860
|
+
...thread,
|
|
16861
|
+
page: external_exports.strictObject({
|
|
16862
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
16863
|
+
epoch: identity.optional(),
|
|
16864
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
16865
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
16866
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
16867
|
+
message: "A history continuation requires its connection epoch"
|
|
16868
|
+
}).optional()
|
|
16869
|
+
}),
|
|
16829
16870
|
external_exports.strictObject({
|
|
16830
16871
|
kind: external_exports.literal("configure"),
|
|
16831
16872
|
...thread,
|
|
@@ -17119,6 +17160,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
17119
17160
|
"totalCredits",
|
|
17120
17161
|
"contextUsagePercent",
|
|
17121
17162
|
"outputTokensPerSecond",
|
|
17163
|
+
"sessionOutputTokensPerSecond",
|
|
17122
17164
|
"apiOutputTokensPerSecond",
|
|
17123
17165
|
"costSource",
|
|
17124
17166
|
"unpricedModels"
|
|
@@ -17141,6 +17183,7 @@ function parseHostUsage(value) {
|
|
|
17141
17183
|
for (const field2 of [
|
|
17142
17184
|
"totalCredits",
|
|
17143
17185
|
"contextUsagePercent",
|
|
17186
|
+
"sessionOutputTokensPerSecond",
|
|
17144
17187
|
"apiOutputTokensPerSecond"
|
|
17145
17188
|
]) {
|
|
17146
17189
|
const candidate = value[field2];
|
|
@@ -17219,6 +17262,7 @@ var requestTokenFields = [
|
|
|
17219
17262
|
"cacheWrite1hInputTokens",
|
|
17220
17263
|
"outputTokens",
|
|
17221
17264
|
"reasoningOutputTokens",
|
|
17265
|
+
"timedOutputTokens",
|
|
17222
17266
|
"startedAtMs",
|
|
17223
17267
|
"completedAtMs"
|
|
17224
17268
|
];
|
|
@@ -18903,13 +18903,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
18903
18903
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
18904
18904
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
18905
18905
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
18906
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
18907
|
+
version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
18908
|
+
requestId: external_exports.string().min(1),
|
|
18909
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
18910
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
18911
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
18912
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
18913
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
18906
18914
|
var usageMeasurementSchema = external_exports.object({
|
|
18915
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
18907
18916
|
value: finiteNonNegativeNumberSchema,
|
|
18908
18917
|
turnId: external_exports.string().min(1).max(1024),
|
|
18909
18918
|
at: nonNegativeSafeIntegerSchema
|
|
18910
18919
|
}).strict();
|
|
18911
18920
|
var usageMeasurementsSchema = external_exports.object({
|
|
18912
|
-
|
|
18921
|
+
// Older intervals can omit hidden thinking time; do not restore them into averages.
|
|
18922
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
|
|
18923
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
18924
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
|
|
18913
18925
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
18914
18926
|
}).strict();
|
|
18915
18927
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -18929,6 +18941,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
18929
18941
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
18930
18942
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
18931
18943
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
18944
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
18932
18945
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
18933
18946
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
18934
18947
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -19340,6 +19353,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
19340
19353
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
19341
19354
|
}).strict();
|
|
19342
19355
|
|
|
19356
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
19357
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
19358
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
19359
|
+
|
|
19343
19360
|
// ../../shared-contracts/dist/client-channel.js
|
|
19344
19361
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
19345
19362
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -19370,6 +19387,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
19370
19387
|
cursor: clientChannelCursorSchema,
|
|
19371
19388
|
cwd: external_exports.string().optional()
|
|
19372
19389
|
}),
|
|
19390
|
+
external_exports.object({
|
|
19391
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
19392
|
+
cursor: clientChannelCursorSchema,
|
|
19393
|
+
harnessId: external_exports.string().min(1)
|
|
19394
|
+
}),
|
|
19373
19395
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
19374
19396
|
external_exports.object({
|
|
19375
19397
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -19441,6 +19463,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
19441
19463
|
var clientTurnSchema = external_exports.object({
|
|
19442
19464
|
id: external_exports.string().min(1),
|
|
19443
19465
|
status: external_exports.string().min(1),
|
|
19466
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
19467
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
19444
19468
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
19445
19469
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
19446
19470
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -19479,7 +19503,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
19479
19503
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
19480
19504
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
19481
19505
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
19482
|
-
command: external_exports.object({
|
|
19506
|
+
command: external_exports.object({
|
|
19507
|
+
name: external_exports.string().min(1),
|
|
19508
|
+
turn: clientTurnSchema,
|
|
19509
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
19510
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
19511
|
+
}).optional(),
|
|
19483
19512
|
thread: external_exports.object({
|
|
19484
19513
|
id: external_exports.string().min(1),
|
|
19485
19514
|
cwd: external_exports.string(),
|
|
@@ -19687,7 +19716,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
19687
19716
|
quotaUntil: external_exports.string().optional()
|
|
19688
19717
|
}).strict().optional()
|
|
19689
19718
|
}).strict();
|
|
19690
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
19691
19719
|
|
|
19692
19720
|
// ../../shared-contracts/dist/delegation-read.js
|
|
19693
19721
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -20657,6 +20685,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
20657
20685
|
"completed",
|
|
20658
20686
|
"failed",
|
|
20659
20687
|
"interrupted",
|
|
20688
|
+
"needsInput",
|
|
20660
20689
|
"timedOut",
|
|
20661
20690
|
"unreadable",
|
|
20662
20691
|
"notFound"
|
|
@@ -20703,13 +20732,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
20703
20732
|
var thread = { ...target, threadId: identity };
|
|
20704
20733
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
20705
20734
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
20735
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
20706
20736
|
external_exports.strictObject({
|
|
20707
20737
|
kind: external_exports.literal("list"),
|
|
20708
20738
|
...target,
|
|
20709
20739
|
cursor: external_exports.string().nullable(),
|
|
20710
20740
|
archived: external_exports.boolean()
|
|
20711
20741
|
}),
|
|
20712
|
-
external_exports.strictObject({
|
|
20742
|
+
external_exports.strictObject({
|
|
20743
|
+
kind: external_exports.literal("read"),
|
|
20744
|
+
...thread,
|
|
20745
|
+
page: external_exports.strictObject({
|
|
20746
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
20747
|
+
epoch: identity.optional(),
|
|
20748
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
20749
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
20750
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
20751
|
+
message: "A history continuation requires its connection epoch"
|
|
20752
|
+
}).optional()
|
|
20753
|
+
}),
|
|
20713
20754
|
external_exports.strictObject({
|
|
20714
20755
|
kind: external_exports.literal("configure"),
|
|
20715
20756
|
...thread,
|
|
@@ -21008,6 +21049,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
21008
21049
|
"totalCredits",
|
|
21009
21050
|
"contextUsagePercent",
|
|
21010
21051
|
"outputTokensPerSecond",
|
|
21052
|
+
"sessionOutputTokensPerSecond",
|
|
21011
21053
|
"apiOutputTokensPerSecond",
|
|
21012
21054
|
"costSource",
|
|
21013
21055
|
"unpricedModels"
|
|
@@ -21030,6 +21072,7 @@ function parseHostUsage(value) {
|
|
|
21030
21072
|
for (const field2 of [
|
|
21031
21073
|
"totalCredits",
|
|
21032
21074
|
"contextUsagePercent",
|
|
21075
|
+
"sessionOutputTokensPerSecond",
|
|
21033
21076
|
"apiOutputTokensPerSecond"
|
|
21034
21077
|
]) {
|
|
21035
21078
|
const candidate = value[field2];
|
|
@@ -21108,6 +21151,7 @@ var requestTokenFields = [
|
|
|
21108
21151
|
"cacheWrite1hInputTokens",
|
|
21109
21152
|
"outputTokens",
|
|
21110
21153
|
"reasoningOutputTokens",
|
|
21154
|
+
"timedOutputTokens",
|
|
21111
21155
|
"startedAtMs",
|
|
21112
21156
|
"completedAtMs"
|
|
21113
21157
|
];
|
|
@@ -21160,6 +21204,14 @@ function parseHostUsageRequest(value) {
|
|
|
21160
21204
|
if (request.startedAtMs === void 0 !== (request.completedAtMs === void 0)) {
|
|
21161
21205
|
throw new Error("Harness Usage request timing fields must be provided together");
|
|
21162
21206
|
}
|
|
21207
|
+
if (request.timedOutputTokens !== void 0) {
|
|
21208
|
+
if (request.startedAtMs === void 0) {
|
|
21209
|
+
throw new Error("Harness Usage request 'timedOutputTokens' requires timing fields");
|
|
21210
|
+
}
|
|
21211
|
+
if (request.timedOutputTokens > request.outputTokens) {
|
|
21212
|
+
throw new Error("Harness Usage request 'timedOutputTokens' must not exceed 'outputTokens'");
|
|
21213
|
+
}
|
|
21214
|
+
}
|
|
21163
21215
|
if (request.startedAtMs !== void 0 && request.completedAtMs !== void 0 && request.completedAtMs < request.startedAtMs) {
|
|
21164
21216
|
throw new Error("Harness Usage request 'completedAtMs' must not precede 'startedAtMs'");
|
|
21165
21217
|
}
|
|
@@ -22767,11 +22819,23 @@ function isRecord5(value) {
|
|
|
22767
22819
|
function count2(value) {
|
|
22768
22820
|
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : null;
|
|
22769
22821
|
}
|
|
22770
|
-
function firstTokenTime(chunks) {
|
|
22822
|
+
function firstTokenTime(chunks, reasoning2) {
|
|
22823
|
+
if (reasoning2 !== null && reasoning2 > 0 && !chunks.some(({ chunk }) => chunk.type === "block-start" && chunk.blockType === "reasoning" || chunk.type === "reasoning-delta" && typeof chunk.text === "string" && chunk.text.length > 0))
|
|
22824
|
+
return null;
|
|
22771
22825
|
for (const { time: time3, chunk } of chunks) {
|
|
22772
|
-
if (
|
|
22826
|
+
if (chunk.type === "block-start" && chunk.blockType === "reasoning" || (chunk.type === "reasoning-delta" || chunk.type === "text-delta") && typeof chunk.text === "string" && chunk.text.length > 0) {
|
|
22773
22827
|
return time3;
|
|
22774
22828
|
}
|
|
22829
|
+
if (chunk.type === "tool-call-delta" && typeof chunk.argumentsDelta === "string" && chunk.argumentsDelta.trim().length > 0) {
|
|
22830
|
+
try {
|
|
22831
|
+
JSON.parse(chunk.argumentsDelta);
|
|
22832
|
+
} catch {
|
|
22833
|
+
if (typeof chunk.name === "string" && chunk.name.length > 0)
|
|
22834
|
+
return time3;
|
|
22835
|
+
continue;
|
|
22836
|
+
}
|
|
22837
|
+
return null;
|
|
22838
|
+
}
|
|
22775
22839
|
}
|
|
22776
22840
|
return null;
|
|
22777
22841
|
}
|
|
@@ -22809,8 +22873,8 @@ function deepSeekUsageRecord(event, historical) {
|
|
|
22809
22873
|
if (input === null || output === null || cacheRead === null || cacheWrite === null) {
|
|
22810
22874
|
return { kind: "missing" };
|
|
22811
22875
|
}
|
|
22812
|
-
const startedAtMs = historical ? null : firstTokenTime(chunks);
|
|
22813
|
-
const completedAtMs =
|
|
22876
|
+
const startedAtMs = historical ? null : count2(firstTokenTime(chunks, reasoning2));
|
|
22877
|
+
const completedAtMs = count2(event.time);
|
|
22814
22878
|
try {
|
|
22815
22879
|
return {
|
|
22816
22880
|
kind: "request",
|
|
@@ -22823,7 +22887,7 @@ function deepSeekUsageRecord(event, historical) {
|
|
|
22823
22887
|
cacheWriteInputTokens: cacheWrite,
|
|
22824
22888
|
outputTokens: output,
|
|
22825
22889
|
...reasoning2 !== null && reasoning2 <= output ? { reasoningOutputTokens: reasoning2 } : {},
|
|
22826
|
-
...startedAtMs !== null && completedAtMs !== null && completedAtMs
|
|
22890
|
+
...startedAtMs !== null && completedAtMs !== null && completedAtMs > startedAtMs ? { startedAtMs, completedAtMs } : {}
|
|
22827
22891
|
})
|
|
22828
22892
|
};
|
|
22829
22893
|
} catch {
|
|
@@ -14660,13 +14660,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
14660
14660
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
14661
14661
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
14662
14662
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
14663
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
14664
|
+
version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
14665
|
+
requestId: external_exports.string().min(1),
|
|
14666
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
14667
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
14668
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
14669
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
14670
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
14663
14671
|
var usageMeasurementSchema = external_exports.object({
|
|
14672
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
14664
14673
|
value: finiteNonNegativeNumberSchema,
|
|
14665
14674
|
turnId: external_exports.string().min(1).max(1024),
|
|
14666
14675
|
at: nonNegativeSafeIntegerSchema
|
|
14667
14676
|
}).strict();
|
|
14668
14677
|
var usageMeasurementsSchema = external_exports.object({
|
|
14669
|
-
|
|
14678
|
+
// Older intervals can omit hidden thinking time; do not restore them into averages.
|
|
14679
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
|
|
14680
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
14681
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
|
|
14670
14682
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
14671
14683
|
}).strict();
|
|
14672
14684
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -14686,6 +14698,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14686
14698
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14687
14699
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14688
14700
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14701
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14689
14702
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14690
14703
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14691
14704
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15097,6 +15110,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15097
15110
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15098
15111
|
}).strict();
|
|
15099
15112
|
|
|
15113
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
15114
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
15115
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
15116
|
+
|
|
15100
15117
|
// ../../shared-contracts/dist/client-channel.js
|
|
15101
15118
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15102
15119
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -15127,6 +15144,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
15127
15144
|
cursor: clientChannelCursorSchema,
|
|
15128
15145
|
cwd: external_exports.string().optional()
|
|
15129
15146
|
}),
|
|
15147
|
+
external_exports.object({
|
|
15148
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
15149
|
+
cursor: clientChannelCursorSchema,
|
|
15150
|
+
harnessId: external_exports.string().min(1)
|
|
15151
|
+
}),
|
|
15130
15152
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15131
15153
|
external_exports.object({
|
|
15132
15154
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15198,6 +15220,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
15198
15220
|
var clientTurnSchema = external_exports.object({
|
|
15199
15221
|
id: external_exports.string().min(1),
|
|
15200
15222
|
status: external_exports.string().min(1),
|
|
15223
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
15224
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
15201
15225
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
15202
15226
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
15203
15227
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -15236,7 +15260,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
15236
15260
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
15237
15261
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
15238
15262
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
15239
|
-
command: external_exports.object({
|
|
15263
|
+
command: external_exports.object({
|
|
15264
|
+
name: external_exports.string().min(1),
|
|
15265
|
+
turn: clientTurnSchema,
|
|
15266
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
15267
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
15268
|
+
}).optional(),
|
|
15240
15269
|
thread: external_exports.object({
|
|
15241
15270
|
id: external_exports.string().min(1),
|
|
15242
15271
|
cwd: external_exports.string(),
|
|
@@ -15444,7 +15473,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
15444
15473
|
quotaUntil: external_exports.string().optional()
|
|
15445
15474
|
}).strict().optional()
|
|
15446
15475
|
}).strict();
|
|
15447
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
15448
15476
|
|
|
15449
15477
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15450
15478
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -16410,6 +16438,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
16410
16438
|
"completed",
|
|
16411
16439
|
"failed",
|
|
16412
16440
|
"interrupted",
|
|
16441
|
+
"needsInput",
|
|
16413
16442
|
"timedOut",
|
|
16414
16443
|
"unreadable",
|
|
16415
16444
|
"notFound"
|
|
@@ -16456,13 +16485,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
16456
16485
|
var thread = { ...target, threadId: identity };
|
|
16457
16486
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16458
16487
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16488
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
16459
16489
|
external_exports.strictObject({
|
|
16460
16490
|
kind: external_exports.literal("list"),
|
|
16461
16491
|
...target,
|
|
16462
16492
|
cursor: external_exports.string().nullable(),
|
|
16463
16493
|
archived: external_exports.boolean()
|
|
16464
16494
|
}),
|
|
16465
|
-
external_exports.strictObject({
|
|
16495
|
+
external_exports.strictObject({
|
|
16496
|
+
kind: external_exports.literal("read"),
|
|
16497
|
+
...thread,
|
|
16498
|
+
page: external_exports.strictObject({
|
|
16499
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
16500
|
+
epoch: identity.optional(),
|
|
16501
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
16502
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
16503
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
16504
|
+
message: "A history continuation requires its connection epoch"
|
|
16505
|
+
}).optional()
|
|
16506
|
+
}),
|
|
16466
16507
|
external_exports.strictObject({
|
|
16467
16508
|
kind: external_exports.literal("configure"),
|
|
16468
16509
|
...thread,
|
|
@@ -16744,6 +16785,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16744
16785
|
"totalCredits",
|
|
16745
16786
|
"contextUsagePercent",
|
|
16746
16787
|
"outputTokensPerSecond",
|
|
16788
|
+
"sessionOutputTokensPerSecond",
|
|
16747
16789
|
"apiOutputTokensPerSecond",
|
|
16748
16790
|
"costSource",
|
|
16749
16791
|
"unpricedModels"
|
|
@@ -16755,6 +16797,7 @@ var requestTokenFields = [
|
|
|
16755
16797
|
"cacheWrite1hInputTokens",
|
|
16756
16798
|
"outputTokens",
|
|
16757
16799
|
"reasoningOutputTokens",
|
|
16800
|
+
"timedOutputTokens",
|
|
16758
16801
|
"startedAtMs",
|
|
16759
16802
|
"completedAtMs"
|
|
16760
16803
|
];
|