@karlorz/codexhost-cli-darwin-x64 0.13.3-7 → 0.14.0-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 +55 -4
- package/app/console-web.js +344 -54
- package/app/cpa-live-voice-hook.js +55 -4
- package/app/desktop-controller.mjs +69 -8
- package/app/host-runtime.mjs +743 -230
- package/app/plugins/antigravity/plugin.mjs +88 -12
- package/app/plugins/claude-code/plugin.mjs +397 -21
- package/app/plugins/codebuddy/plugin.mjs +107 -17
- package/app/plugins/codex-usage/plugin.mjs +67 -7
- package/app/plugins/copilot/assets/icon.png +0 -0
- package/app/plugins/copilot/manifest.json +26 -0
- package/app/plugins/copilot/plugin.mjs +34645 -0
- package/app/plugins/cursor-cli/plugin.mjs +88 -6
- package/app/plugins/deepseek-harness/plugin.mjs +73 -6
- package/app/plugins/enabled.json +1 -0
- package/app/plugins/grok/plugin.mjs +272 -60
- package/app/plugins/hermes/plugin.mjs +70 -4
- package/app/plugins/kimi-code/plugin.mjs +73 -6
- package/app/plugins/kiro-cli/plugin.mjs +73 -6
- package/app/plugins/omp/plugin.mjs +73 -112
- package/app/plugins/opencode/plugin.mjs +75 -6
- package/app/plugins/pi/plugin.mjs +204 -44
- package/app/plugins/qoder/plugin.mjs +73 -6
- package/app/plugins/qoder-cn/plugin.mjs +73 -6
- package/app/plugins/workbuddy/plugin.mjs +368 -41
- package/app/plugins/zcode/plugin.mjs +74 -6
- package/app/renderer-extension.js +749 -157
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -15205,10 +15205,19 @@ var model = external_exports.string().min(1).max(512);
|
|
|
15205
15205
|
var project = external_exports.string().min(1).max(4096);
|
|
15206
15206
|
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
15207
15207
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15208
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
15209
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
15210
|
+
try {
|
|
15211
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
15212
|
+
return true;
|
|
15213
|
+
} catch {
|
|
15214
|
+
return false;
|
|
15215
|
+
}
|
|
15216
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
15208
15217
|
harness: harness.optional(),
|
|
15209
15218
|
model: model.nullable().optional(),
|
|
15210
15219
|
project: project.nullable().optional(),
|
|
15211
|
-
/** One
|
|
15220
|
+
/** One date in the query timezone inside the range. */
|
|
15212
15221
|
date: localDate.optional()
|
|
15213
15222
|
});
|
|
15214
15223
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
@@ -15244,7 +15253,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15244
15253
|
});
|
|
15245
15254
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
15246
15255
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15247
|
-
/** First
|
|
15256
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
15248
15257
|
from: localDate.nullable(),
|
|
15249
15258
|
to: localDate,
|
|
15250
15259
|
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
@@ -15284,7 +15293,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15284
15293
|
totals: usageStatisticsTotalsSchema,
|
|
15285
15294
|
/** Each date and Harness of the range: every filter except the day. */
|
|
15286
15295
|
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15287
|
-
/**
|
|
15296
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
15288
15297
|
hourly: external_exports.array(external_exports.strictObject({
|
|
15289
15298
|
weekday: external_exports.number().int().min(0).max(6),
|
|
15290
15299
|
hour: external_exports.number().int().min(0).max(23),
|
|
@@ -15375,6 +15384,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
15375
15384
|
"codexhost/harness/display-settings/set",
|
|
15376
15385
|
"codexhost/harness/inspect",
|
|
15377
15386
|
"codexhost/harness/installation",
|
|
15387
|
+
"codexhost/harness/installation/start",
|
|
15388
|
+
"codexhost/harness/installation/status",
|
|
15378
15389
|
"codexhost/harness/launch-settings/get",
|
|
15379
15390
|
"codexhost/harness/launch-settings/set",
|
|
15380
15391
|
"codexhost/harness/grok-computer-use/get",
|
|
@@ -15452,7 +15463,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
|
15452
15463
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15453
15464
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15454
15465
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15466
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
15467
|
+
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
15468
|
+
kind: external_exports.literal("countdown"),
|
|
15469
|
+
id: external_exports.string().min(1).max(64),
|
|
15470
|
+
expiresAtUnix: nonNegativeSafeIntegerSchema,
|
|
15471
|
+
label: indicatorTextSchema(256).optional(),
|
|
15472
|
+
tooltip: indicatorTextSchema(1024).optional()
|
|
15473
|
+
}).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
|
|
15474
|
+
message: "Composer indicator IDs must be unique"
|
|
15475
|
+
});
|
|
15455
15476
|
var threadUsageSnapshotSchema = external_exports.object({
|
|
15477
|
+
composerIndicators: composerIndicatorsSchema.optional(),
|
|
15456
15478
|
inputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15457
15479
|
cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15458
15480
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15860,7 +15882,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
|
|
|
15860
15882
|
}).strict().optional(),
|
|
15861
15883
|
autonomousTurns: external_exports.object({
|
|
15862
15884
|
observe: external_exports.boolean()
|
|
15863
|
-
}).strict().optional()
|
|
15885
|
+
}).strict().optional(),
|
|
15886
|
+
/** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
|
|
15887
|
+
steer: external_exports.boolean().optional()
|
|
15864
15888
|
}).strict();
|
|
15865
15889
|
var harnessConfigurationStateSchema = external_exports.object({
|
|
15866
15890
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
@@ -15992,6 +16016,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15992
16016
|
seen.add(thread.threadId);
|
|
15993
16017
|
}
|
|
15994
16018
|
});
|
|
16019
|
+
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
16020
|
+
threadId: hostThreadIdSchema,
|
|
16021
|
+
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
16022
|
+
text: external_exports.string().optional()
|
|
16023
|
+
}).strict();
|
|
16024
|
+
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
16025
|
+
var threadSteeringInspectResultSchema = external_exports.object({
|
|
16026
|
+
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
16027
|
+
}).strict();
|
|
15995
16028
|
|
|
15996
16029
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15997
16030
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
@@ -16113,6 +16146,10 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16113
16146
|
latestVersion: external_exports.string().min(1).max(128),
|
|
16114
16147
|
updateAvailable: external_exports.boolean(),
|
|
16115
16148
|
canUpdate: external_exports.boolean(),
|
|
16149
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
16150
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
16151
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
16152
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
16116
16153
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
16117
16154
|
message: external_exports.string().max(2048).optional(),
|
|
16118
16155
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
@@ -16120,6 +16157,20 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16120
16157
|
notice: harnessLocalizedTextSchema.optional(),
|
|
16121
16158
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
16122
16159
|
}).strict();
|
|
16160
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
16161
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
16162
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
16163
|
+
external_exports.object({
|
|
16164
|
+
taskId: external_exports.string().uuid(),
|
|
16165
|
+
status: external_exports.literal("succeeded"),
|
|
16166
|
+
result: harnessInstallationStateSchema
|
|
16167
|
+
}).strict(),
|
|
16168
|
+
external_exports.object({
|
|
16169
|
+
taskId: external_exports.string().uuid(),
|
|
16170
|
+
status: external_exports.literal("failed"),
|
|
16171
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
16172
|
+
}).strict()
|
|
16173
|
+
]);
|
|
16123
16174
|
|
|
16124
16175
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
16125
16176
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -16967,6 +17018,18 @@ function sanitizeDiagnosticTail(value) {
|
|
|
16967
17018
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
16968
17019
|
}
|
|
16969
17020
|
|
|
17021
|
+
// ../../harness-adapter/dist/steer.js
|
|
17022
|
+
function unsupportedSteer(harnessLabel) {
|
|
17023
|
+
return {
|
|
17024
|
+
ok: false,
|
|
17025
|
+
error: {
|
|
17026
|
+
code: "unsupported",
|
|
17027
|
+
message: `${harnessLabel} cannot steer an active Turn natively`,
|
|
17028
|
+
retryable: false
|
|
17029
|
+
}
|
|
17030
|
+
};
|
|
17031
|
+
}
|
|
17032
|
+
|
|
16970
17033
|
// ../../harness-adapter/dist/usage.js
|
|
16971
17034
|
var tokenFields = [
|
|
16972
17035
|
"inputTokens",
|
|
@@ -16994,6 +17057,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16994
17057
|
...safeIntegerFields,
|
|
16995
17058
|
...percentFields,
|
|
16996
17059
|
"sessionCacheUsage",
|
|
17060
|
+
"composerIndicators",
|
|
16997
17061
|
"totalCostUsd",
|
|
16998
17062
|
"totalCredits",
|
|
16999
17063
|
"contextUsagePercent",
|
|
@@ -17016,6 +17080,7 @@ function parseHostUsage(value) {
|
|
|
17016
17080
|
throw new Error(`Harness Usage contains unknown field '${key}'`);
|
|
17017
17081
|
}
|
|
17018
17082
|
}
|
|
17083
|
+
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
17019
17084
|
for (const field of [
|
|
17020
17085
|
"totalCredits",
|
|
17021
17086
|
"contextUsagePercent",
|
|
@@ -17086,9 +17151,9 @@ function parseHostUsage(value) {
|
|
|
17086
17151
|
if (value.costSource !== "publicPrice") {
|
|
17087
17152
|
throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
|
|
17088
17153
|
}
|
|
17089
|
-
return { ...value, unpricedModels: [...models] };
|
|
17154
|
+
return { ...value, ...indicators, unpricedModels: [...models] };
|
|
17090
17155
|
}
|
|
17091
|
-
return { ...value };
|
|
17156
|
+
return { ...value, ...indicators };
|
|
17092
17157
|
}
|
|
17093
17158
|
var requestTokenFields = [
|
|
17094
17159
|
"inputTokens",
|
|
@@ -20712,9 +20777,6 @@ var OmpHarnessSession = class {
|
|
|
20712
20777
|
#usage;
|
|
20713
20778
|
#usageGeneration = 0;
|
|
20714
20779
|
#usageRefreshSequence = 0;
|
|
20715
|
-
#backgroundTurnId = null;
|
|
20716
|
-
#backgroundSubagents = /* @__PURE__ */ new Map();
|
|
20717
|
-
#backgroundTurnFailed = false;
|
|
20718
20780
|
constructor(cwd, createTransport, onClosed, options) {
|
|
20719
20781
|
this.#cwd = cwd;
|
|
20720
20782
|
this.#createTransport = createTransport;
|
|
@@ -20772,44 +20834,6 @@ var OmpHarnessSession = class {
|
|
|
20772
20834
|
#backgroundStatus(status) {
|
|
20773
20835
|
return status === "pending" || status === "running" ? "running" : status === "interrupted" ? "interrupted" : status;
|
|
20774
20836
|
}
|
|
20775
|
-
#ensureBackgroundTurn() {
|
|
20776
|
-
if (this.#backgroundTurnId)
|
|
20777
|
-
return this.#backgroundTurnId;
|
|
20778
|
-
const turnId = hostTurnIdSchema.parse(randomUUID2());
|
|
20779
|
-
this.#backgroundTurnId = turnId;
|
|
20780
|
-
this.#backgroundTurnFailed = false;
|
|
20781
|
-
this.#event({
|
|
20782
|
-
type: "turn.autonomous.started",
|
|
20783
|
-
turnId,
|
|
20784
|
-
input: []
|
|
20785
|
-
});
|
|
20786
|
-
return turnId;
|
|
20787
|
-
}
|
|
20788
|
-
#backgroundDelegationStart(event) {
|
|
20789
|
-
const turnId = this.#ensureBackgroundTurn();
|
|
20790
|
-
const description = event.type === "subagent.started" ? event.description : event.type === "subagent.updated" ? event.description ?? "Background subagent" : "Background subagent";
|
|
20791
|
-
const role = event.type === "subagent.started" ? event.role : void 0;
|
|
20792
|
-
const background = event.type === "subagent.started" ? event.background : true;
|
|
20793
|
-
const state = {
|
|
20794
|
-
subagentId: event.nativeSubagentId,
|
|
20795
|
-
nativeSubagentId: event.nativeSubagentId,
|
|
20796
|
-
description,
|
|
20797
|
-
...role ? { role } : {},
|
|
20798
|
-
background,
|
|
20799
|
-
status: "running"
|
|
20800
|
-
};
|
|
20801
|
-
const item = {
|
|
20802
|
-
type: "subagentDelegation",
|
|
20803
|
-
itemId: this.#newItemId(),
|
|
20804
|
-
operation: "spawn",
|
|
20805
|
-
...event.type === "subagent.started" && event.prompt ? { prompt: event.prompt } : {},
|
|
20806
|
-
subagents: [state]
|
|
20807
|
-
};
|
|
20808
|
-
const delegation = { item, turnId };
|
|
20809
|
-
this.#backgroundSubagents.set(event.callId, delegation);
|
|
20810
|
-
this.#event({ type: "item.started", turnId, item });
|
|
20811
|
-
return delegation;
|
|
20812
|
-
}
|
|
20813
20837
|
#handleBackgroundSubagentEvent(event) {
|
|
20814
20838
|
if (event.type === "subagent.transcript.changed") {
|
|
20815
20839
|
this.#event({
|
|
@@ -20821,12 +20845,6 @@ var OmpHarnessSession = class {
|
|
|
20821
20845
|
if (event.type !== "subagent.started" && event.type !== "subagent.updated" && event.type !== "subagent.completed") {
|
|
20822
20846
|
return;
|
|
20823
20847
|
}
|
|
20824
|
-
let delegation = this.#backgroundSubagents.get(event.callId);
|
|
20825
|
-
if (!delegation)
|
|
20826
|
-
delegation = this.#backgroundDelegationStart(event);
|
|
20827
|
-
const current = delegation.item.subagents[0];
|
|
20828
|
-
if (!current)
|
|
20829
|
-
throw new Error("Omp background delegation has no Agent state");
|
|
20830
20848
|
if (event.type === "subagent.started") {
|
|
20831
20849
|
this.#event({
|
|
20832
20850
|
type: "subagent.state.changed",
|
|
@@ -20837,19 +20855,6 @@ var OmpHarnessSession = class {
|
|
|
20837
20855
|
}
|
|
20838
20856
|
if (event.type === "subagent.updated") {
|
|
20839
20857
|
const status2 = this.#backgroundStatus(event.status);
|
|
20840
|
-
const subagent2 = {
|
|
20841
|
-
...current,
|
|
20842
|
-
status: status2,
|
|
20843
|
-
...event.description ? { description: event.description } : {},
|
|
20844
|
-
...event.resultSummary ? { resultSummary: event.resultSummary } : {}
|
|
20845
|
-
};
|
|
20846
|
-
delegation.item = { ...delegation.item, subagents: [subagent2] };
|
|
20847
|
-
this.#event({
|
|
20848
|
-
type: "item.updated",
|
|
20849
|
-
turnId: delegation.turnId,
|
|
20850
|
-
itemId: delegation.item.itemId,
|
|
20851
|
-
update: { type: "subagents.replace", subagents: delegation.item.subagents }
|
|
20852
|
-
});
|
|
20853
20858
|
this.#event({
|
|
20854
20859
|
type: "subagent.state.changed",
|
|
20855
20860
|
nativeSubagentId: event.nativeSubagentId,
|
|
@@ -20859,58 +20864,12 @@ var OmpHarnessSession = class {
|
|
|
20859
20864
|
return;
|
|
20860
20865
|
}
|
|
20861
20866
|
const status = event.isError ? "failed" : "completed";
|
|
20862
|
-
const subagent = {
|
|
20863
|
-
...current,
|
|
20864
|
-
status,
|
|
20865
|
-
...event.resultSummary ? { resultSummary: event.resultSummary } : {}
|
|
20866
|
-
};
|
|
20867
|
-
delegation.item = { ...delegation.item, subagents: [subagent] };
|
|
20868
|
-
this.#event({
|
|
20869
|
-
type: "item.updated",
|
|
20870
|
-
turnId: delegation.turnId,
|
|
20871
|
-
itemId: delegation.item.itemId,
|
|
20872
|
-
update: { type: "subagents.replace", subagents: delegation.item.subagents }
|
|
20873
|
-
});
|
|
20874
|
-
this.#event({
|
|
20875
|
-
type: "item.completed",
|
|
20876
|
-
turnId: delegation.turnId,
|
|
20877
|
-
snapshot: {
|
|
20878
|
-
item: delegation.item,
|
|
20879
|
-
outcome: event.isError ? {
|
|
20880
|
-
status: "failed",
|
|
20881
|
-
error: {
|
|
20882
|
-
code: "nativeFailure",
|
|
20883
|
-
message: "Omp background Subagent failed",
|
|
20884
|
-
retryable: false
|
|
20885
|
-
}
|
|
20886
|
-
} : { status: "succeeded" }
|
|
20887
|
-
}
|
|
20888
|
-
});
|
|
20889
20867
|
this.#event({
|
|
20890
20868
|
type: "subagent.state.changed",
|
|
20891
20869
|
nativeSubagentId: event.nativeSubagentId,
|
|
20892
20870
|
status,
|
|
20893
20871
|
...event.resultSummary ? { resultSummary: event.resultSummary } : {}
|
|
20894
20872
|
});
|
|
20895
|
-
this.#backgroundTurnFailed ||= event.isError;
|
|
20896
|
-
this.#backgroundSubagents.delete(event.callId);
|
|
20897
|
-
if (this.#backgroundSubagents.size === 0 && this.#backgroundTurnId === delegation.turnId) {
|
|
20898
|
-
const turnId = this.#backgroundTurnId;
|
|
20899
|
-
this.#backgroundTurnId = null;
|
|
20900
|
-
this.#event({
|
|
20901
|
-
type: "turn.completed",
|
|
20902
|
-
turnId,
|
|
20903
|
-
outcome: this.#backgroundTurnFailed ? {
|
|
20904
|
-
status: "failed",
|
|
20905
|
-
error: {
|
|
20906
|
-
code: "nativeFailure",
|
|
20907
|
-
message: "Omp background Subagent failed",
|
|
20908
|
-
retryable: false
|
|
20909
|
-
}
|
|
20910
|
-
} : { status: "succeeded" }
|
|
20911
|
-
});
|
|
20912
|
-
this.#backgroundTurnFailed = false;
|
|
20913
|
-
}
|
|
20914
20873
|
}
|
|
20915
20874
|
async readSnapshot() {
|
|
20916
20875
|
if (this.#phase !== "open" && this.#phase !== "faulted") {
|
|
@@ -20965,6 +20924,8 @@ var OmpHarnessSession = class {
|
|
|
20965
20924
|
}
|
|
20966
20925
|
if (command.type === "turn.cancel")
|
|
20967
20926
|
return this.#cancel(command);
|
|
20927
|
+
if (command.type === "turn.steer")
|
|
20928
|
+
return unsupportedSteer("OMP");
|
|
20968
20929
|
if (command.type === "interaction.respond")
|
|
20969
20930
|
return this.#respond(command);
|
|
20970
20931
|
if (command.type === "model.select")
|
|
@@ -15202,10 +15202,19 @@ var model = external_exports.string().min(1).max(512);
|
|
|
15202
15202
|
var project = external_exports.string().min(1).max(4096);
|
|
15203
15203
|
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
15204
15204
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15205
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
15206
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
15207
|
+
try {
|
|
15208
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
15209
|
+
return true;
|
|
15210
|
+
} catch {
|
|
15211
|
+
return false;
|
|
15212
|
+
}
|
|
15213
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
15205
15214
|
harness: harness.optional(),
|
|
15206
15215
|
model: model.nullable().optional(),
|
|
15207
15216
|
project: project.nullable().optional(),
|
|
15208
|
-
/** One
|
|
15217
|
+
/** One date in the query timezone inside the range. */
|
|
15209
15218
|
date: localDate.optional()
|
|
15210
15219
|
});
|
|
15211
15220
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
@@ -15241,7 +15250,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15241
15250
|
});
|
|
15242
15251
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
15243
15252
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15244
|
-
/** First
|
|
15253
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
15245
15254
|
from: localDate.nullable(),
|
|
15246
15255
|
to: localDate,
|
|
15247
15256
|
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
@@ -15281,7 +15290,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15281
15290
|
totals: usageStatisticsTotalsSchema,
|
|
15282
15291
|
/** Each date and Harness of the range: every filter except the day. */
|
|
15283
15292
|
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15284
|
-
/**
|
|
15293
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
15285
15294
|
hourly: external_exports.array(external_exports.strictObject({
|
|
15286
15295
|
weekday: external_exports.number().int().min(0).max(6),
|
|
15287
15296
|
hour: external_exports.number().int().min(0).max(23),
|
|
@@ -15372,6 +15381,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
15372
15381
|
"codexhost/harness/display-settings/set",
|
|
15373
15382
|
"codexhost/harness/inspect",
|
|
15374
15383
|
"codexhost/harness/installation",
|
|
15384
|
+
"codexhost/harness/installation/start",
|
|
15385
|
+
"codexhost/harness/installation/status",
|
|
15375
15386
|
"codexhost/harness/launch-settings/get",
|
|
15376
15387
|
"codexhost/harness/launch-settings/set",
|
|
15377
15388
|
"codexhost/harness/grok-computer-use/get",
|
|
@@ -15449,7 +15460,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
|
15449
15460
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15450
15461
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15451
15462
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15463
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
15464
|
+
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
15465
|
+
kind: external_exports.literal("countdown"),
|
|
15466
|
+
id: external_exports.string().min(1).max(64),
|
|
15467
|
+
expiresAtUnix: nonNegativeSafeIntegerSchema,
|
|
15468
|
+
label: indicatorTextSchema(256).optional(),
|
|
15469
|
+
tooltip: indicatorTextSchema(1024).optional()
|
|
15470
|
+
}).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
|
|
15471
|
+
message: "Composer indicator IDs must be unique"
|
|
15472
|
+
});
|
|
15452
15473
|
var threadUsageSnapshotSchema = external_exports.object({
|
|
15474
|
+
composerIndicators: composerIndicatorsSchema.optional(),
|
|
15453
15475
|
inputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15454
15476
|
cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15455
15477
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15857,7 +15879,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
|
|
|
15857
15879
|
}).strict().optional(),
|
|
15858
15880
|
autonomousTurns: external_exports.object({
|
|
15859
15881
|
observe: external_exports.boolean()
|
|
15860
|
-
}).strict().optional()
|
|
15882
|
+
}).strict().optional(),
|
|
15883
|
+
/** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
|
|
15884
|
+
steer: external_exports.boolean().optional()
|
|
15861
15885
|
}).strict();
|
|
15862
15886
|
var harnessConfigurationStateSchema = external_exports.object({
|
|
15863
15887
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
@@ -15989,6 +16013,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15989
16013
|
seen.add(thread.threadId);
|
|
15990
16014
|
}
|
|
15991
16015
|
});
|
|
16016
|
+
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
16017
|
+
threadId: hostThreadIdSchema,
|
|
16018
|
+
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
16019
|
+
text: external_exports.string().optional()
|
|
16020
|
+
}).strict();
|
|
16021
|
+
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
16022
|
+
var threadSteeringInspectResultSchema = external_exports.object({
|
|
16023
|
+
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
16024
|
+
}).strict();
|
|
15992
16025
|
|
|
15993
16026
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15994
16027
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
@@ -16110,6 +16143,10 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16110
16143
|
latestVersion: external_exports.string().min(1).max(128),
|
|
16111
16144
|
updateAvailable: external_exports.boolean(),
|
|
16112
16145
|
canUpdate: external_exports.boolean(),
|
|
16146
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
16147
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
16148
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
16149
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
16113
16150
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
16114
16151
|
message: external_exports.string().max(2048).optional(),
|
|
16115
16152
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
@@ -16117,6 +16154,20 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16117
16154
|
notice: harnessLocalizedTextSchema.optional(),
|
|
16118
16155
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
16119
16156
|
}).strict();
|
|
16157
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
16158
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
16159
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
16160
|
+
external_exports.object({
|
|
16161
|
+
taskId: external_exports.string().uuid(),
|
|
16162
|
+
status: external_exports.literal("succeeded"),
|
|
16163
|
+
result: harnessInstallationStateSchema
|
|
16164
|
+
}).strict(),
|
|
16165
|
+
external_exports.object({
|
|
16166
|
+
taskId: external_exports.string().uuid(),
|
|
16167
|
+
status: external_exports.literal("failed"),
|
|
16168
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
16169
|
+
}).strict()
|
|
16170
|
+
]);
|
|
16120
16171
|
|
|
16121
16172
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
16122
16173
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -16648,6 +16699,18 @@ function sanitizeDiagnosticTail(value) {
|
|
|
16648
16699
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
16649
16700
|
}
|
|
16650
16701
|
|
|
16702
|
+
// ../../harness-adapter/dist/steer.js
|
|
16703
|
+
function unsupportedSteer(harnessLabel) {
|
|
16704
|
+
return {
|
|
16705
|
+
ok: false,
|
|
16706
|
+
error: {
|
|
16707
|
+
code: "unsupported",
|
|
16708
|
+
message: `${harnessLabel} cannot steer an active Turn natively`,
|
|
16709
|
+
retryable: false
|
|
16710
|
+
}
|
|
16711
|
+
};
|
|
16712
|
+
}
|
|
16713
|
+
|
|
16651
16714
|
// ../../harness-adapter/dist/usage.js
|
|
16652
16715
|
var tokenFields = [
|
|
16653
16716
|
"inputTokens",
|
|
@@ -16675,6 +16738,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16675
16738
|
...safeIntegerFields,
|
|
16676
16739
|
...percentFields,
|
|
16677
16740
|
"sessionCacheUsage",
|
|
16741
|
+
"composerIndicators",
|
|
16678
16742
|
"totalCostUsd",
|
|
16679
16743
|
"totalCredits",
|
|
16680
16744
|
"contextUsagePercent",
|
|
@@ -16697,6 +16761,7 @@ function parseHostUsage(value) {
|
|
|
16697
16761
|
throw new Error(`Harness Usage contains unknown field '${key}'`);
|
|
16698
16762
|
}
|
|
16699
16763
|
}
|
|
16764
|
+
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16700
16765
|
for (const field of [
|
|
16701
16766
|
"totalCredits",
|
|
16702
16767
|
"contextUsagePercent",
|
|
@@ -16767,9 +16832,9 @@ function parseHostUsage(value) {
|
|
|
16767
16832
|
if (value.costSource !== "publicPrice") {
|
|
16768
16833
|
throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
|
|
16769
16834
|
}
|
|
16770
|
-
return { ...value, unpricedModels: [...models] };
|
|
16835
|
+
return { ...value, ...indicators, unpricedModels: [...models] };
|
|
16771
16836
|
}
|
|
16772
|
-
return { ...value };
|
|
16837
|
+
return { ...value, ...indicators };
|
|
16773
16838
|
}
|
|
16774
16839
|
var requestTokenFields = [
|
|
16775
16840
|
"inputTokens",
|
|
@@ -23885,6 +23950,8 @@ var OpenCodeHarnessSession = class {
|
|
|
23885
23950
|
if (this.#phase !== "open") {
|
|
23886
23951
|
return { ok: false, error: invalidState("OpenCode Session is not open") };
|
|
23887
23952
|
}
|
|
23953
|
+
if (command.type === "turn.steer")
|
|
23954
|
+
return unsupportedSteer("OpenCode");
|
|
23888
23955
|
if (command.type === "turn.cancel")
|
|
23889
23956
|
return this.#cancel(command);
|
|
23890
23957
|
if (command.type === "interaction.respond")
|
|
@@ -27565,6 +27632,8 @@ var V2Session = class {
|
|
|
27565
27632
|
async execute(command) {
|
|
27566
27633
|
if (this.#closed)
|
|
27567
27634
|
return { ok: false, error: failure("OpenCode Session is closed", "invalidState") };
|
|
27635
|
+
if (command.type === "turn.steer")
|
|
27636
|
+
return unsupportedSteer("OpenCode");
|
|
27568
27637
|
if (command.type === "turn.start")
|
|
27569
27638
|
return this.#start(command, false);
|
|
27570
27639
|
if (command.type === "turn.cancel") {
|