@codexhost/cli-darwin-x64 0.13.2 → 0.14.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 +94 -8
- package/app/console-web.js +537 -146
- package/app/desktop-controller.mjs +108 -12
- package/app/host-runtime.mjs +847 -235
- package/app/plugins/antigravity/plugin.mjs +143 -20
- package/app/plugins/claude-code/plugin.mjs +601 -71
- package/app/plugins/codebuddy/plugin.mjs +227 -30
- package/app/plugins/codex-usage/plugin.mjs +212 -77
- package/app/plugins/copilot/assets/icon.png +0 -0
- package/app/plugins/copilot/manifest.json +26 -0
- package/app/plugins/copilot/plugin.mjs +34546 -0
- package/app/plugins/cursor-cli/plugin.mjs +20805 -44862
- package/app/plugins/deepseek-harness/manifest.json +2 -2
- package/app/plugins/deepseek-harness/plugin.mjs +202 -21
- package/app/plugins/enabled.json +1 -0
- package/app/plugins/grok/plugin.mjs +278 -29
- package/app/plugins/hermes/plugin.mjs +143 -12
- package/app/plugins/kimi-code/plugin.mjs +140 -16
- package/app/plugins/kiro-cli/plugin.mjs +121 -10
- package/app/plugins/omp/plugin.mjs +2200 -2002
- package/app/plugins/opencode/plugin.mjs +137 -16
- package/app/plugins/pi/plugin.mjs +2563 -2282
- package/app/plugins/qoder/plugin.mjs +133 -14
- package/app/plugins/qoder-cn/plugin.mjs +133 -14
- package/app/plugins/workbuddy/plugin.mjs +603 -56
- package/app/plugins/zcode/plugin.mjs +133 -14
- package/app/renderer-extension.js +1171 -529
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -15010,6 +15010,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
15010
15010
|
initializeOnly: external_exports.boolean().optional()
|
|
15011
15011
|
});
|
|
15012
15012
|
|
|
15013
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
15014
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
15015
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
15016
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
15017
|
+
label: displayText(256).optional(),
|
|
15018
|
+
description: displayText(1024).optional()
|
|
15019
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15020
|
+
var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15021
|
+
|
|
15013
15022
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
15014
15023
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
15015
15024
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -15059,10 +15068,19 @@ var model = external_exports.string().min(1).max(512);
|
|
|
15059
15068
|
var project = external_exports.string().min(1).max(4096);
|
|
15060
15069
|
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
15061
15070
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15071
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
15072
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
15073
|
+
try {
|
|
15074
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
15075
|
+
return true;
|
|
15076
|
+
} catch {
|
|
15077
|
+
return false;
|
|
15078
|
+
}
|
|
15079
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
15062
15080
|
harness: harness.optional(),
|
|
15063
15081
|
model: model.nullable().optional(),
|
|
15064
15082
|
project: project.nullable().optional(),
|
|
15065
|
-
/** One
|
|
15083
|
+
/** One date in the query timezone inside the range. */
|
|
15066
15084
|
date: localDate.optional()
|
|
15067
15085
|
});
|
|
15068
15086
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
@@ -15098,7 +15116,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15098
15116
|
});
|
|
15099
15117
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
15100
15118
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15101
|
-
/** First
|
|
15119
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
15102
15120
|
from: localDate.nullable(),
|
|
15103
15121
|
to: localDate,
|
|
15104
15122
|
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
@@ -15138,7 +15156,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15138
15156
|
totals: usageStatisticsTotalsSchema,
|
|
15139
15157
|
/** Each date and Harness of the range: every filter except the day. */
|
|
15140
15158
|
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15141
|
-
/**
|
|
15159
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
15142
15160
|
hourly: external_exports.array(external_exports.strictObject({
|
|
15143
15161
|
weekday: external_exports.number().int().min(0).max(6),
|
|
15144
15162
|
hour: external_exports.number().int().min(0).max(23),
|
|
@@ -15198,6 +15216,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
15198
15216
|
"codexhost/harness/display-settings/set",
|
|
15199
15217
|
"codexhost/harness/inspect",
|
|
15200
15218
|
"codexhost/harness/installation",
|
|
15219
|
+
"codexhost/harness/installation/start",
|
|
15220
|
+
"codexhost/harness/installation/status",
|
|
15201
15221
|
"codexhost/harness/launch-settings/get",
|
|
15202
15222
|
"codexhost/harness/launch-settings/set",
|
|
15203
15223
|
"codexhost/harness/web-ui/open",
|
|
@@ -15273,7 +15293,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
|
15273
15293
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15274
15294
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15275
15295
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15296
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
15297
|
+
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
15298
|
+
kind: external_exports.literal("countdown"),
|
|
15299
|
+
id: external_exports.string().min(1).max(64),
|
|
15300
|
+
expiresAtUnix: nonNegativeSafeIntegerSchema,
|
|
15301
|
+
label: indicatorTextSchema(256).optional(),
|
|
15302
|
+
tooltip: indicatorTextSchema(1024).optional()
|
|
15303
|
+
}).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
|
|
15304
|
+
message: "Composer indicator IDs must be unique"
|
|
15305
|
+
});
|
|
15276
15306
|
var threadUsageSnapshotSchema = external_exports.object({
|
|
15307
|
+
composerIndicators: composerIndicatorsSchema.optional(),
|
|
15277
15308
|
inputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15278
15309
|
cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15279
15310
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15346,8 +15377,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15346
15377
|
}
|
|
15347
15378
|
});
|
|
15348
15379
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15380
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
15381
|
+
"weekly",
|
|
15382
|
+
"monthly",
|
|
15383
|
+
"five_hour",
|
|
15384
|
+
"seven_day",
|
|
15385
|
+
"unknown"
|
|
15386
|
+
]);
|
|
15387
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
15388
|
+
id: external_exports.string().min(1).max(256),
|
|
15389
|
+
label: external_exports.string().min(1).max(256),
|
|
15390
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15391
|
+
}).strict();
|
|
15349
15392
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
15350
15393
|
product: external_exports.string().min(1),
|
|
15394
|
+
/** Native period and scope, never inferred from the display name. */
|
|
15395
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
15396
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15397
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15351
15398
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
15352
15399
|
// Zero is a real empty cap, not an absent field.
|
|
15353
15400
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -15367,9 +15414,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
15367
15414
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
15368
15415
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
15369
15416
|
label: external_exports.string().min(1).optional(),
|
|
15417
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15418
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15370
15419
|
usedPercent: usagePercentSchema,
|
|
15371
15420
|
resetsAt: external_exports.string().min(1).optional(),
|
|
15372
|
-
periodType:
|
|
15421
|
+
periodType: accountCreditsPeriodSchema,
|
|
15373
15422
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
15374
15423
|
resetCredits: accountResetCreditsSchema.optional()
|
|
15375
15424
|
}).strict();
|
|
@@ -15380,7 +15429,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
15380
15429
|
var threadUsageInspectionSchema = external_exports.object({
|
|
15381
15430
|
threadId: hostThreadIdSchema,
|
|
15382
15431
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15383
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15432
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15433
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
15434
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
15384
15435
|
}).strict();
|
|
15385
15436
|
|
|
15386
15437
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -15507,7 +15558,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
15507
15558
|
id: harnessPermissionModeIdSchema,
|
|
15508
15559
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
15509
15560
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
15510
|
-
dangerous: external_exports.boolean().optional()
|
|
15561
|
+
dangerous: external_exports.boolean().optional(),
|
|
15562
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15511
15563
|
}).strict();
|
|
15512
15564
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
15513
15565
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -15660,7 +15712,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
|
|
|
15660
15712
|
}).strict().optional(),
|
|
15661
15713
|
autonomousTurns: external_exports.object({
|
|
15662
15714
|
observe: external_exports.boolean()
|
|
15663
|
-
}).strict().optional()
|
|
15715
|
+
}).strict().optional(),
|
|
15716
|
+
/** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
|
|
15717
|
+
steer: external_exports.boolean().optional()
|
|
15664
15718
|
}).strict();
|
|
15665
15719
|
var harnessConfigurationStateSchema = external_exports.object({
|
|
15666
15720
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
@@ -15707,7 +15761,9 @@ var harnessInspectionSchema = external_exports.union([
|
|
|
15707
15761
|
var harnessInspectParamsSchema = external_exports.object({
|
|
15708
15762
|
harnessId: harnessIdSchema,
|
|
15709
15763
|
cwd: nonBlankTextSchema2.max(16384).optional(),
|
|
15710
|
-
refresh: external_exports.boolean().optional()
|
|
15764
|
+
refresh: external_exports.boolean().optional(),
|
|
15765
|
+
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
15766
|
+
purpose: external_exports.literal("availability").optional()
|
|
15711
15767
|
}).strict();
|
|
15712
15768
|
var harnessWebUiOpenParamsSchema = external_exports.object({
|
|
15713
15769
|
harnessId: harnessIdSchema
|
|
@@ -15790,6 +15846,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15790
15846
|
seen.add(thread.threadId);
|
|
15791
15847
|
}
|
|
15792
15848
|
});
|
|
15849
|
+
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
15850
|
+
threadId: hostThreadIdSchema,
|
|
15851
|
+
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15852
|
+
text: external_exports.string().optional()
|
|
15853
|
+
}).strict();
|
|
15854
|
+
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15855
|
+
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15856
|
+
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15857
|
+
}).strict();
|
|
15793
15858
|
|
|
15794
15859
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15795
15860
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
@@ -15891,11 +15956,31 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
15891
15956
|
latestVersion: external_exports.string().min(1).max(128),
|
|
15892
15957
|
updateAvailable: external_exports.boolean(),
|
|
15893
15958
|
canUpdate: external_exports.boolean(),
|
|
15959
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
15960
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
15961
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
15962
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
15894
15963
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
15895
15964
|
message: external_exports.string().max(2048).optional(),
|
|
15896
15965
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
15966
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
15967
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
15897
15968
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
15898
15969
|
}).strict();
|
|
15970
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
15971
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
15972
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
15973
|
+
external_exports.object({
|
|
15974
|
+
taskId: external_exports.string().uuid(),
|
|
15975
|
+
status: external_exports.literal("succeeded"),
|
|
15976
|
+
result: harnessInstallationStateSchema
|
|
15977
|
+
}).strict(),
|
|
15978
|
+
external_exports.object({
|
|
15979
|
+
taskId: external_exports.string().uuid(),
|
|
15980
|
+
status: external_exports.literal("failed"),
|
|
15981
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
15982
|
+
}).strict()
|
|
15983
|
+
]);
|
|
15899
15984
|
|
|
15900
15985
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
15901
15986
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -16020,6 +16105,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
16020
16105
|
invocation: commandInvocationSchema,
|
|
16021
16106
|
label: commandLabelSchema,
|
|
16022
16107
|
description: commandDescriptionSchema.optional(),
|
|
16108
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
16023
16109
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
16024
16110
|
/**
|
|
16025
16111
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -16372,6 +16458,18 @@ function sanitizeDiagnosticTail(value) {
|
|
|
16372
16458
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
16373
16459
|
}
|
|
16374
16460
|
|
|
16461
|
+
// ../../harness-adapter/dist/steer.js
|
|
16462
|
+
function unsupportedSteer(harnessLabel) {
|
|
16463
|
+
return {
|
|
16464
|
+
ok: false,
|
|
16465
|
+
error: {
|
|
16466
|
+
code: "unsupported",
|
|
16467
|
+
message: `${harnessLabel} cannot steer an active Turn natively`,
|
|
16468
|
+
retryable: false
|
|
16469
|
+
}
|
|
16470
|
+
};
|
|
16471
|
+
}
|
|
16472
|
+
|
|
16375
16473
|
// ../../harness-adapter/dist/usage.js
|
|
16376
16474
|
var tokenFields = [
|
|
16377
16475
|
"inputTokens",
|
|
@@ -16399,6 +16497,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16399
16497
|
...safeIntegerFields,
|
|
16400
16498
|
...percentFields,
|
|
16401
16499
|
"sessionCacheUsage",
|
|
16500
|
+
"composerIndicators",
|
|
16402
16501
|
"totalCostUsd",
|
|
16403
16502
|
"totalCredits",
|
|
16404
16503
|
"contextUsagePercent",
|
|
@@ -17080,6 +17179,12 @@ var ANTIGRAVITY_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.par
|
|
|
17080
17179
|
{
|
|
17081
17180
|
id: "dangerously-skip-permissions",
|
|
17082
17181
|
label: "Skip permissions",
|
|
17182
|
+
localizations: {
|
|
17183
|
+
"zh-CN": {
|
|
17184
|
+
label: "跳过权限检查",
|
|
17185
|
+
description: "使用 --dangerously-skip-permissions 运行 Antigravity CLI;codexhost 不增加工具审批或工作区限制。"
|
|
17186
|
+
}
|
|
17187
|
+
},
|
|
17083
17188
|
description: "Run Antigravity CLI with --dangerously-skip-permissions. codexhost adds no tool approval or workspace restrictions.",
|
|
17084
17189
|
dangerous: true
|
|
17085
17190
|
}
|
|
@@ -17801,6 +17906,8 @@ function parseBuckets(groups) {
|
|
|
17801
17906
|
const resetsAt = nonEmptyString(bucket.reset_time);
|
|
17802
17907
|
buckets.push({
|
|
17803
17908
|
product: groupName ? `${groupName} · ${label}` : label,
|
|
17909
|
+
periodType: periodTypeFrom(window),
|
|
17910
|
+
...groupName ? { scope: { id: groupName, label: groupName } } : {},
|
|
17804
17911
|
usagePercent,
|
|
17805
17912
|
window,
|
|
17806
17913
|
...resetsAt ? { resetsAt } : {}
|
|
@@ -17834,14 +17941,17 @@ function parseAntigravityUsageCommand(command, fetchedAt = (/* @__PURE__ */ new
|
|
|
17834
17941
|
return null;
|
|
17835
17942
|
const others = buckets.filter((bucket) => bucket !== leading);
|
|
17836
17943
|
return {
|
|
17837
|
-
label: leading.product,
|
|
17944
|
+
...leading.scope || periodTypeFrom(leading.window) === "unknown" ? { label: leading.product } : {},
|
|
17945
|
+
...leading.scope ? { scope: leading.scope } : {},
|
|
17838
17946
|
usedPercent: leading.usagePercent,
|
|
17839
17947
|
periodType: periodTypeFrom(leading.window),
|
|
17840
17948
|
fetchedAt,
|
|
17841
17949
|
...leading.resetsAt ? { resetsAt: leading.resetsAt } : {},
|
|
17842
17950
|
...others.length > 0 ? {
|
|
17843
|
-
productUsage: others.map(({ product, usagePercent, resetsAt }) => ({
|
|
17951
|
+
productUsage: others.map(({ product, periodType, scope, usagePercent, resetsAt }) => ({
|
|
17844
17952
|
product,
|
|
17953
|
+
...periodType ? { periodType } : {},
|
|
17954
|
+
...scope ? { scope } : {},
|
|
17845
17955
|
usagePercent,
|
|
17846
17956
|
...resetsAt ? { resetsAt } : {}
|
|
17847
17957
|
}))
|
|
@@ -18998,6 +19108,8 @@ var AntigravitySession = class {
|
|
|
18998
19108
|
#closed = false;
|
|
18999
19109
|
#model;
|
|
19000
19110
|
#nativeRef;
|
|
19111
|
+
/** The last result's `response`: agy carries earlier Turns' replies in it. */
|
|
19112
|
+
#lastResultResponse = "";
|
|
19001
19113
|
#permissionMode;
|
|
19002
19114
|
#thinkingOptionId;
|
|
19003
19115
|
#catalog;
|
|
@@ -19059,6 +19171,8 @@ var AntigravitySession = class {
|
|
|
19059
19171
|
return { ok: false, error: invalidState("Antigravity Session is closed") };
|
|
19060
19172
|
if (command.type === "turn.cancel")
|
|
19061
19173
|
return this.#cancel(command);
|
|
19174
|
+
if (command.type === "turn.steer")
|
|
19175
|
+
return unsupportedSteer("Antigravity");
|
|
19062
19176
|
if (command.type === "model.select")
|
|
19063
19177
|
return this.#selectModel(command);
|
|
19064
19178
|
if (command.type === "permissionMode.select")
|
|
@@ -19385,9 +19499,13 @@ ${line}`).slice(-8e3);
|
|
|
19385
19499
|
this.#history.bindNativeSession(convId);
|
|
19386
19500
|
this.#event({ type: "session.state.changed", state: this.#state() });
|
|
19387
19501
|
}
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19502
|
+
const response = event.result.response ?? "";
|
|
19503
|
+
const turnReply = response.startsWith(this.#lastResultResponse) ? response.slice(this.#lastResultResponse.length) : response;
|
|
19504
|
+
const repliedThisTurn = Boolean(active.agentItem) || turnReply.trim() !== "";
|
|
19505
|
+
if (response)
|
|
19506
|
+
this.#lastResultResponse = response;
|
|
19507
|
+
if (turnReply.trim() !== "")
|
|
19508
|
+
this.#appendOrSyncAgentText(active, turnReply, false);
|
|
19391
19509
|
const safeTurnId = event.result.num_turns !== void 0 && event.result.num_turns !== null ? `turn:${event.result.num_turns}` : `turn:${this.#history.snapshot().length + 1}`;
|
|
19392
19510
|
const safeSessionId = convId || this.#nativeRef?.nativeSessionId || "unknown-session";
|
|
19393
19511
|
const nativeTurnRef = nativeTurnRefSchema.parse({
|
|
@@ -19417,13 +19535,17 @@ ${line}`).slice(-8e3);
|
|
|
19417
19535
|
} else {
|
|
19418
19536
|
const nativeError = event.result.error?.trim();
|
|
19419
19537
|
const errorDetail = nativeError || active.stderr;
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19538
|
+
const error51 = normalizedProcessError(errorDetail, `Antigravity Turn ended with status ${event.result.status}`, nativeError !== void 0);
|
|
19539
|
+
if (repliedThisTurn && nativeError && this.#reportedEarlier(error51)) {
|
|
19540
|
+
this.#completeTurn(active, { status: "succeeded", checkpoint }, nativeTurnRef);
|
|
19541
|
+
} else {
|
|
19542
|
+
this.#completeTurn(active, { status: "failed", error: error51, checkpoint }, nativeTurnRef);
|
|
19543
|
+
}
|
|
19425
19544
|
}
|
|
19426
19545
|
}
|
|
19546
|
+
#reportedEarlier(error51) {
|
|
19547
|
+
return this.#history.snapshot().some(({ outcome }) => outcome.status === "failed" && outcome.error.code === error51.code && outcome.error.message === error51.message);
|
|
19548
|
+
}
|
|
19427
19549
|
#publishUsage(active, usage) {
|
|
19428
19550
|
active.latestUsage = { ...active.latestUsage ?? {}, ...usage };
|
|
19429
19551
|
this.#event({
|
|
@@ -19885,7 +20007,8 @@ var AntigravityAdapter = class {
|
|
|
19885
20007
|
return null;
|
|
19886
20008
|
return {
|
|
19887
20009
|
credits: {
|
|
19888
|
-
label: snapshot.label,
|
|
20010
|
+
...snapshot.label ? { label: snapshot.label } : {},
|
|
20011
|
+
...snapshot.scope ? { scope: snapshot.scope } : {},
|
|
19889
20012
|
usedPercent: snapshot.usedPercent,
|
|
19890
20013
|
periodType: snapshot.periodType,
|
|
19891
20014
|
...snapshot.resetsAt ? { resetsAt: snapshot.resetsAt } : {},
|
|
@@ -19893,7 +20016,7 @@ var AntigravityAdapter = class {
|
|
|
19893
20016
|
}
|
|
19894
20017
|
};
|
|
19895
20018
|
}
|
|
19896
|
-
/**
|
|
20019
|
+
/** Public account telemetry cache; never attributes quota to historical Thread spend. */
|
|
19897
20020
|
credits() {
|
|
19898
20021
|
return this.#quota;
|
|
19899
20022
|
}
|