@karlorz/codexhost-cli-win32-arm64 0.13.3-6 → 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 +539 -95
- package/app/console-web.js +879 -73
- package/app/cpa-live-voice-hook.js +605 -37
- package/app/desktop-controller.mjs +94 -9
- package/app/host-runtime.mjs +1662 -642
- package/app/plugins/antigravity/plugin.mjs +113 -13
- package/app/plugins/claude-code/plugin.mjs +429 -26
- package/app/plugins/codebuddy/plugin.mjs +139 -22
- package/app/plugins/codex-usage/plugin.mjs +198 -74
- 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 +20877 -44973
- package/app/plugins/deepseek-harness/plugin.mjs +105 -11
- package/app/plugins/enabled.json +1 -0
- package/app/plugins/grok/plugin.mjs +1073 -214
- package/app/plugins/hermes/plugin.mjs +102 -9
- package/app/plugins/kimi-code/plugin.mjs +98 -7
- package/app/plugins/kiro-cli/plugin.mjs +98 -7
- package/app/plugins/omp/plugin.mjs +2177 -2000
- package/app/plugins/opencode/plugin.mjs +107 -11
- package/app/plugins/pi/plugin.mjs +2554 -2285
- package/app/plugins/qoder/plugin.mjs +105 -11
- package/app/plugins/qoder-cn/plugin.mjs +105 -11
- package/app/plugins/workbuddy/plugin.mjs +400 -46
- package/app/plugins/zcode/plugin.mjs +106 -11
- package/app/renderer-extension.js +2717 -1237
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
|
@@ -15138,10 +15138,19 @@ var model = external_exports.string().min(1).max(512);
|
|
|
15138
15138
|
var project = external_exports.string().min(1).max(4096);
|
|
15139
15139
|
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
15140
15140
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15141
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
15142
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
15143
|
+
try {
|
|
15144
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
15145
|
+
return true;
|
|
15146
|
+
} catch {
|
|
15147
|
+
return false;
|
|
15148
|
+
}
|
|
15149
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
15141
15150
|
harness: harness.optional(),
|
|
15142
15151
|
model: model.nullable().optional(),
|
|
15143
15152
|
project: project.nullable().optional(),
|
|
15144
|
-
/** One
|
|
15153
|
+
/** One date in the query timezone inside the range. */
|
|
15145
15154
|
date: localDate.optional()
|
|
15146
15155
|
});
|
|
15147
15156
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
@@ -15177,7 +15186,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15177
15186
|
});
|
|
15178
15187
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
15179
15188
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15180
|
-
/** First
|
|
15189
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
15181
15190
|
from: localDate.nullable(),
|
|
15182
15191
|
to: localDate,
|
|
15183
15192
|
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
@@ -15217,7 +15226,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15217
15226
|
totals: usageStatisticsTotalsSchema,
|
|
15218
15227
|
/** Each date and Harness of the range: every filter except the day. */
|
|
15219
15228
|
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15220
|
-
/**
|
|
15229
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
15221
15230
|
hourly: external_exports.array(external_exports.strictObject({
|
|
15222
15231
|
weekday: external_exports.number().int().min(0).max(6),
|
|
15223
15232
|
hour: external_exports.number().int().min(0).max(23),
|
|
@@ -15308,8 +15317,12 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
15308
15317
|
"codexhost/harness/display-settings/set",
|
|
15309
15318
|
"codexhost/harness/inspect",
|
|
15310
15319
|
"codexhost/harness/installation",
|
|
15320
|
+
"codexhost/harness/installation/start",
|
|
15321
|
+
"codexhost/harness/installation/status",
|
|
15311
15322
|
"codexhost/harness/launch-settings/get",
|
|
15312
15323
|
"codexhost/harness/launch-settings/set",
|
|
15324
|
+
"codexhost/harness/grok-computer-use/get",
|
|
15325
|
+
"codexhost/harness/grok-computer-use/set",
|
|
15313
15326
|
"codexhost/harness/web-ui/open",
|
|
15314
15327
|
"codexhost/harness/accounts/sources",
|
|
15315
15328
|
"codexhost/harness/accounts/list",
|
|
@@ -15383,7 +15396,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
|
15383
15396
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15384
15397
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15385
15398
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15399
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
|
|
15400
|
+
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
15401
|
+
kind: external_exports.literal("countdown"),
|
|
15402
|
+
id: external_exports.string().min(1).max(64),
|
|
15403
|
+
expiresAtUnix: nonNegativeSafeIntegerSchema,
|
|
15404
|
+
label: indicatorTextSchema(256).optional(),
|
|
15405
|
+
tooltip: indicatorTextSchema(1024).optional()
|
|
15406
|
+
}).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
|
|
15407
|
+
message: "Composer indicator IDs must be unique"
|
|
15408
|
+
});
|
|
15386
15409
|
var threadUsageSnapshotSchema = external_exports.object({
|
|
15410
|
+
composerIndicators: composerIndicatorsSchema.optional(),
|
|
15387
15411
|
inputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15388
15412
|
cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15389
15413
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15791,7 +15815,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
|
|
|
15791
15815
|
}).strict().optional(),
|
|
15792
15816
|
autonomousTurns: external_exports.object({
|
|
15793
15817
|
observe: external_exports.boolean()
|
|
15794
|
-
}).strict().optional()
|
|
15818
|
+
}).strict().optional(),
|
|
15819
|
+
/** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
|
|
15820
|
+
steer: external_exports.boolean().optional()
|
|
15795
15821
|
}).strict();
|
|
15796
15822
|
var harnessConfigurationStateSchema = external_exports.object({
|
|
15797
15823
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
@@ -15838,7 +15864,9 @@ var harnessInspectionSchema = external_exports.union([
|
|
|
15838
15864
|
var harnessInspectParamsSchema = external_exports.object({
|
|
15839
15865
|
harnessId: harnessIdSchema,
|
|
15840
15866
|
cwd: nonBlankTextSchema2.max(16384).optional(),
|
|
15841
|
-
refresh: external_exports.boolean().optional()
|
|
15867
|
+
refresh: external_exports.boolean().optional(),
|
|
15868
|
+
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
15869
|
+
purpose: external_exports.literal("availability").optional()
|
|
15842
15870
|
}).strict();
|
|
15843
15871
|
var harnessWebUiOpenParamsSchema = external_exports.object({
|
|
15844
15872
|
harnessId: harnessIdSchema
|
|
@@ -15921,6 +15949,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15921
15949
|
seen.add(thread.threadId);
|
|
15922
15950
|
}
|
|
15923
15951
|
});
|
|
15952
|
+
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
15953
|
+
threadId: hostThreadIdSchema,
|
|
15954
|
+
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15955
|
+
text: external_exports.string().optional()
|
|
15956
|
+
}).strict();
|
|
15957
|
+
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15958
|
+
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15959
|
+
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15960
|
+
}).strict();
|
|
15924
15961
|
|
|
15925
15962
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15926
15963
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
@@ -16012,6 +16049,26 @@ var harnessLaunchSettingsSchema = external_exports.object({
|
|
|
16012
16049
|
restartRequired: external_exports.boolean()
|
|
16013
16050
|
}).strict();
|
|
16014
16051
|
|
|
16052
|
+
// ../../shared-contracts/dist/grok-computer-use.js
|
|
16053
|
+
var grokComputerUseGetSchema = external_exports.object({}).strict();
|
|
16054
|
+
var grokComputerUseSetSchema = external_exports.object({
|
|
16055
|
+
enabled: external_exports.boolean().optional(),
|
|
16056
|
+
browser: external_exports.boolean().optional()
|
|
16057
|
+
}).strict().refine((value) => value.enabled !== void 0 || value.browser !== void 0, {
|
|
16058
|
+
message: "Expected enabled or browser"
|
|
16059
|
+
});
|
|
16060
|
+
var grokComputerUseSettingsSchema = external_exports.object({
|
|
16061
|
+
enabled: external_exports.boolean(),
|
|
16062
|
+
available: external_exports.boolean(),
|
|
16063
|
+
unavailableReason: external_exports.string().min(1).max(500).optional(),
|
|
16064
|
+
browser: external_exports.boolean().optional(),
|
|
16065
|
+
browserFilesPresent: external_exports.boolean().optional(),
|
|
16066
|
+
browserAvailable: external_exports.boolean().optional(),
|
|
16067
|
+
browserUnavailableReason: external_exports.string().min(1).max(500).optional(),
|
|
16068
|
+
applyFailed: external_exports.boolean().optional(),
|
|
16069
|
+
applyError: external_exports.string().min(1).max(500).optional()
|
|
16070
|
+
}).strict();
|
|
16071
|
+
|
|
16015
16072
|
// ../../shared-contracts/dist/harness-installation.js
|
|
16016
16073
|
var harnessInstallationParamsSchema = external_exports.object({
|
|
16017
16074
|
harnessId: harnessIdSchema,
|
|
@@ -16022,6 +16079,10 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16022
16079
|
latestVersion: external_exports.string().min(1).max(128),
|
|
16023
16080
|
updateAvailable: external_exports.boolean(),
|
|
16024
16081
|
canUpdate: external_exports.boolean(),
|
|
16082
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
16083
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
16084
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
16085
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
16025
16086
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
16026
16087
|
message: external_exports.string().max(2048).optional(),
|
|
16027
16088
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
@@ -16029,6 +16090,20 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16029
16090
|
notice: harnessLocalizedTextSchema.optional(),
|
|
16030
16091
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
16031
16092
|
}).strict();
|
|
16093
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
16094
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
16095
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
16096
|
+
external_exports.object({
|
|
16097
|
+
taskId: external_exports.string().uuid(),
|
|
16098
|
+
status: external_exports.literal("succeeded"),
|
|
16099
|
+
result: harnessInstallationStateSchema
|
|
16100
|
+
}).strict(),
|
|
16101
|
+
external_exports.object({
|
|
16102
|
+
taskId: external_exports.string().uuid(),
|
|
16103
|
+
status: external_exports.literal("failed"),
|
|
16104
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
16105
|
+
}).strict()
|
|
16106
|
+
]);
|
|
16032
16107
|
|
|
16033
16108
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
16034
16109
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -16577,6 +16652,18 @@ function sanitizeDiagnosticTail(value) {
|
|
|
16577
16652
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
16578
16653
|
}
|
|
16579
16654
|
|
|
16655
|
+
// ../../harness-adapter/dist/steer.js
|
|
16656
|
+
function unsupportedSteer(harnessLabel) {
|
|
16657
|
+
return {
|
|
16658
|
+
ok: false,
|
|
16659
|
+
error: {
|
|
16660
|
+
code: "unsupported",
|
|
16661
|
+
message: `${harnessLabel} cannot steer an active Turn natively`,
|
|
16662
|
+
retryable: false
|
|
16663
|
+
}
|
|
16664
|
+
};
|
|
16665
|
+
}
|
|
16666
|
+
|
|
16580
16667
|
// ../../harness-adapter/dist/usage.js
|
|
16581
16668
|
var tokenFields = [
|
|
16582
16669
|
"inputTokens",
|
|
@@ -16604,6 +16691,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16604
16691
|
...safeIntegerFields,
|
|
16605
16692
|
...percentFields,
|
|
16606
16693
|
"sessionCacheUsage",
|
|
16694
|
+
"composerIndicators",
|
|
16607
16695
|
"totalCostUsd",
|
|
16608
16696
|
"totalCredits",
|
|
16609
16697
|
"contextUsagePercent",
|
|
@@ -16626,6 +16714,7 @@ function parseHostUsage(value) {
|
|
|
16626
16714
|
throw new Error(`Harness Usage contains unknown field '${key}'`);
|
|
16627
16715
|
}
|
|
16628
16716
|
}
|
|
16717
|
+
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16629
16718
|
for (const field of [
|
|
16630
16719
|
"totalCredits",
|
|
16631
16720
|
"contextUsagePercent",
|
|
@@ -16696,9 +16785,9 @@ function parseHostUsage(value) {
|
|
|
16696
16785
|
if (value.costSource !== "publicPrice") {
|
|
16697
16786
|
throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
|
|
16698
16787
|
}
|
|
16699
|
-
return { ...value, unpricedModels: [...models] };
|
|
16788
|
+
return { ...value, ...indicators, unpricedModels: [...models] };
|
|
16700
16789
|
}
|
|
16701
|
-
return { ...value };
|
|
16790
|
+
return { ...value, ...indicators };
|
|
16702
16791
|
}
|
|
16703
16792
|
var requestTokenFields = [
|
|
16704
16793
|
"inputTokens",
|
|
@@ -17055,10 +17144,13 @@ function usageSessionTitle(value) {
|
|
|
17055
17144
|
return void 0;
|
|
17056
17145
|
if (normalized.length <= MAX_SESSION_TITLE_LENGTH)
|
|
17057
17146
|
return normalized;
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17061
|
-
|
|
17147
|
+
let title = "";
|
|
17148
|
+
for (const character of normalized) {
|
|
17149
|
+
if (title.length + character.length >= MAX_SESSION_TITLE_LENGTH)
|
|
17150
|
+
break;
|
|
17151
|
+
title += character;
|
|
17152
|
+
}
|
|
17153
|
+
return `${title.trimEnd()}…`;
|
|
17062
17154
|
}
|
|
17063
17155
|
function sessionIdOk(value) {
|
|
17064
17156
|
return typeof value === "string" && value.length > 0 && value.length <= MAX_SESSION_ID_LENGTH;
|
|
@@ -22708,9 +22800,23 @@ var ClientSideConnection = class {
|
|
|
22708
22800
|
|
|
22709
22801
|
// dist/copy-cleanup.js
|
|
22710
22802
|
import { randomBytes } from "node:crypto";
|
|
22803
|
+
|
|
22804
|
+
// dist/acp-stdio.js
|
|
22711
22805
|
import { createInterface as createInterface2 } from "node:readline";
|
|
22712
|
-
import { stripVTControlCharacters } from "node:util";
|
|
22713
22806
|
import { Readable } from "node:stream";
|
|
22807
|
+
import { stripVTControlCharacters } from "node:util";
|
|
22808
|
+
function codeBuddyAcpOutput(stdout, onLine) {
|
|
22809
|
+
return Readable.from((async function* () {
|
|
22810
|
+
for await (const line of createInterface2({ input: stdout })) {
|
|
22811
|
+
onLine?.(stripVTControlCharacters(line));
|
|
22812
|
+
if (line.trimStart().startsWith("{"))
|
|
22813
|
+
yield Buffer.from(`${line}
|
|
22814
|
+
`);
|
|
22815
|
+
}
|
|
22816
|
+
})());
|
|
22817
|
+
}
|
|
22818
|
+
|
|
22819
|
+
// dist/copy-cleanup.js
|
|
22714
22820
|
var CodeBuddyCopyCleanup = class {
|
|
22715
22821
|
copyId;
|
|
22716
22822
|
cwd;
|
|
@@ -22740,17 +22846,11 @@ var CodeBuddyCopyCleanup = class {
|
|
|
22740
22846
|
}
|
|
22741
22847
|
/** Native --serve banners include its password; never pass them to the ACP parser/logs. */
|
|
22742
22848
|
protocolOutput(stdout) {
|
|
22743
|
-
return
|
|
22744
|
-
|
|
22745
|
-
async *#protocolLines(stdout) {
|
|
22746
|
-
for await (const line of createInterface2({ input: stdout })) {
|
|
22747
|
-
const endpoint = /^\s*Endpoint\s+(http:\/\/127\.0\.0\.1:\d+)\s*$/u.exec(stripVTControlCharacters(line));
|
|
22849
|
+
return codeBuddyAcpOutput(stdout, (line) => {
|
|
22850
|
+
const endpoint = /^\s*Endpoint\s+(http:\/\/127\.0\.0\.1:\d+)\s*$/u.exec(line);
|
|
22748
22851
|
if (endpoint)
|
|
22749
22852
|
this.#endpoint = endpoint[1];
|
|
22750
|
-
|
|
22751
|
-
yield Buffer.from(`${line}
|
|
22752
|
-
`);
|
|
22753
|
-
}
|
|
22853
|
+
});
|
|
22754
22854
|
}
|
|
22755
22855
|
async remove() {
|
|
22756
22856
|
if (!this.#endpoint)
|
|
@@ -22830,7 +22930,7 @@ var CodeBuddyAcpClient = class {
|
|
|
22830
22930
|
return { outcome: "cancelled" };
|
|
22831
22931
|
return options.handlers.question(params);
|
|
22832
22932
|
}
|
|
22833
|
-
}), ndJsonStream2(Writable.toWeb(this.#child.stdin), Readable2.toWeb(this.#copyCleanup?.protocolOutput(this.#child.stdout) ?? this.#child.stdout)));
|
|
22933
|
+
}), ndJsonStream2(Writable.toWeb(this.#child.stdin), Readable2.toWeb(this.#copyCleanup?.protocolOutput(this.#child.stdout) ?? (invocation.arguments.includes("--serve") ? codeBuddyAcpOutput(this.#child.stdout) : this.#child.stdout))));
|
|
22834
22934
|
void this.#connection.closed.then(() => {
|
|
22835
22935
|
this.#fault(new CodeBuddyError("processExited", "ACP connection closed"));
|
|
22836
22936
|
}).catch((error51) => {
|
|
@@ -24857,6 +24957,8 @@ var CodeBuddySession = class {
|
|
|
24857
24957
|
async #execute(command, nativeCommand = false) {
|
|
24858
24958
|
if (this.#closed || this.#fault)
|
|
24859
24959
|
return failure("invalidState", "Session is closed or faulted", this.profile);
|
|
24960
|
+
if (command.type === "turn.steer")
|
|
24961
|
+
return unsupportedSteer(this.profile.displayName);
|
|
24860
24962
|
if (command.type === "interaction.respond")
|
|
24861
24963
|
return this.#interactions.respond(command);
|
|
24862
24964
|
if (command.type === "turn.cancel") {
|
|
@@ -25270,6 +25372,7 @@ var harnessBrokerMethodSchema = external_exports.enum([
|
|
|
25270
25372
|
"adapter.open",
|
|
25271
25373
|
"adapter.subagent.readSnapshot",
|
|
25272
25374
|
"session.readSnapshot",
|
|
25375
|
+
"session.readCapabilities",
|
|
25273
25376
|
"session.refreshUsage",
|
|
25274
25377
|
"session.execute",
|
|
25275
25378
|
"session.commands.list",
|
|
@@ -25450,6 +25553,11 @@ var turnStartSchema = external_exports.object({
|
|
|
25450
25553
|
turnId: hostTurnIdSchema,
|
|
25451
25554
|
input: external_exports.array(textInputSchema)
|
|
25452
25555
|
}).strict();
|
|
25556
|
+
var turnSteerSchema = external_exports.object({
|
|
25557
|
+
type: external_exports.literal("turn.steer"),
|
|
25558
|
+
turnId: hostTurnIdSchema,
|
|
25559
|
+
input: external_exports.array(textInputSchema)
|
|
25560
|
+
}).strict();
|
|
25453
25561
|
var turnCancelSchema = external_exports.object({ type: external_exports.literal("turn.cancel"), turnId: hostTurnIdSchema }).strict();
|
|
25454
25562
|
var interactionResponseSchema = external_exports.union([
|
|
25455
25563
|
external_exports.object({
|
|
@@ -25475,6 +25583,7 @@ var permissionSelectSchema = external_exports.object({
|
|
|
25475
25583
|
}).strict();
|
|
25476
25584
|
var brokerHostCommandSchema = external_exports.discriminatedUnion("type", [
|
|
25477
25585
|
turnStartSchema,
|
|
25586
|
+
turnSteerSchema,
|
|
25478
25587
|
turnCancelSchema,
|
|
25479
25588
|
interactionRespondSchema,
|
|
25480
25589
|
modelSelectSchema,
|
|
@@ -25667,6 +25776,7 @@ function parseSessionMetadata(value) {
|
|
|
25667
25776
|
sessionId: candidate.sessionId,
|
|
25668
25777
|
sessionGeneration: candidate.sessionGeneration,
|
|
25669
25778
|
capabilities: harnessSessionCapabilitiesSchema.parse(candidate.capabilities),
|
|
25779
|
+
readCapabilities: candidate.readCapabilities === true,
|
|
25670
25780
|
initialState: state,
|
|
25671
25781
|
initialUsage: candidate.initialUsage === null ? null : parseHostUsage(candidate.initialUsage),
|
|
25672
25782
|
commands: candidate.commands === true
|
|
@@ -26018,6 +26128,11 @@ var BrokeredHarnessSession = class {
|
|
|
26018
26128
|
event: { type: "session.faulted", error: unavailable(error51.message) }
|
|
26019
26129
|
});
|
|
26020
26130
|
}
|
|
26131
|
+
async readCapabilities() {
|
|
26132
|
+
if (!this.#metadata.readCapabilities)
|
|
26133
|
+
return { ...this.capabilities, steer: false };
|
|
26134
|
+
return harnessSessionCapabilitiesSchema.parse(await this.#request("session.readCapabilities", {}));
|
|
26135
|
+
}
|
|
26021
26136
|
async refreshUsage() {
|
|
26022
26137
|
await this.#request("session.refreshUsage", {});
|
|
26023
26138
|
}
|
|
@@ -26049,6 +26164,8 @@ var BrokeredHarnessSession = class {
|
|
|
26049
26164
|
try {
|
|
26050
26165
|
return parseHarnessResult(await this.#request("session.execute", { command }));
|
|
26051
26166
|
} catch (error51) {
|
|
26167
|
+
if (command.type === "turn.steer")
|
|
26168
|
+
throw error51;
|
|
26052
26169
|
return {
|
|
26053
26170
|
ok: false,
|
|
26054
26171
|
error: unavailable(error51 instanceof Error ? error51.message : String(error51))
|