@codexhost/cli-darwin-x64 0.6.0 → 0.6.1
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/desktop-controller.mjs +2 -1
- package/app/host-runtime.mjs +296 -147
- package/app/plugins/antigravity/plugin.mjs +6 -1
- package/app/plugins/claude-code/plugin.mjs +661 -219
- package/app/plugins/deepseek-harness/plugin.mjs +87 -18
- package/app/plugins/enabled.json +2 -1
- package/app/plugins/grok/plugin.mjs +11 -1
- package/app/plugins/kiro-cli/assets/icon.svg +5 -0
- package/app/plugins/kiro-cli/manifest.json +12 -0
- package/app/plugins/kiro-cli/plugin.mjs +23316 -0
- package/app/plugins/omp/plugin.mjs +11 -1
- package/app/plugins/opencode/plugin.mjs +297 -143
- package/app/plugins/pi/plugin.mjs +1489 -1300
- package/app/renderer-extension.js +152 -84
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"opencode",
|
|
16
16
|
"grok",
|
|
17
17
|
"omp",
|
|
18
|
-
"antigravity"
|
|
18
|
+
"antigravity",
|
|
19
|
+
"kiro-cli"
|
|
19
20
|
];
|
|
20
21
|
var DEFAULT_RENDERER_AGENTS = KNOWN_RENDERER_AGENTS;
|
|
21
22
|
function defaultIdFactory(sequence) {
|
|
@@ -131,6 +132,7 @@
|
|
|
131
132
|
if (agent === "grok" && model) state.grokModel = model;
|
|
132
133
|
if (agent === "omp" && model) state.ompModel = model;
|
|
133
134
|
if (agent === "antigravity" && model) state.antigravityModel = model;
|
|
135
|
+
if (agent === "kiro-cli" && model) state.kiroCliModel = model;
|
|
134
136
|
if (agent === "pi" && thinkingOptionId) state.piThinkingOptionId = thinkingOptionId;
|
|
135
137
|
else if (agent === "pi") delete state.piThinkingOptionId;
|
|
136
138
|
if (agent === "claude-code" && thinkingOptionId) {
|
|
@@ -146,6 +148,9 @@
|
|
|
146
148
|
if (agent === "antigravity" && thinkingOptionId) {
|
|
147
149
|
state.antigravityThinkingOptionId = thinkingOptionId;
|
|
148
150
|
} else if (agent === "antigravity") delete state.antigravityThinkingOptionId;
|
|
151
|
+
if (agent === "kiro-cli" && thinkingOptionId) {
|
|
152
|
+
state.kiroCliThinkingOptionId = thinkingOptionId;
|
|
153
|
+
} else if (agent === "kiro-cli") delete state.kiroCliThinkingOptionId;
|
|
149
154
|
if (agent !== "codex") {
|
|
150
155
|
const permissionModeByAgent = {};
|
|
151
156
|
for (const candidate of [
|
|
@@ -155,7 +160,8 @@
|
|
|
155
160
|
"opencode",
|
|
156
161
|
"grok",
|
|
157
162
|
"omp",
|
|
158
|
-
"antigravity"
|
|
163
|
+
"antigravity",
|
|
164
|
+
"kiro-cli"
|
|
159
165
|
]) {
|
|
160
166
|
const current = state.permissionModeByAgent?.[candidate];
|
|
161
167
|
if (candidate !== agent && current) permissionModeByAgent[candidate] = current;
|
|
@@ -177,7 +183,9 @@
|
|
|
177
183
|
if (agent === "opencode") return state.openCodeModel;
|
|
178
184
|
if (agent === "grok") return state.grokModel;
|
|
179
185
|
if (agent === "omp") return state.ompModel;
|
|
180
|
-
return state.antigravityModel;
|
|
186
|
+
if (agent === "antigravity") return state.antigravityModel;
|
|
187
|
+
if (agent === "kiro-cli") return state.kiroCliModel;
|
|
188
|
+
return void 0;
|
|
181
189
|
}
|
|
182
190
|
thinkingOptionForAgent(composer, agent) {
|
|
183
191
|
const state = this.#state(composer);
|
|
@@ -186,7 +194,9 @@
|
|
|
186
194
|
if (agent === "grok") return state.grokThinkingOptionId;
|
|
187
195
|
if (agent === "opencode") return state.openCodeThinkingOptionId;
|
|
188
196
|
if (agent === "omp") return state.ompThinkingOptionId;
|
|
189
|
-
|
|
197
|
+
if (agent === "antigravity") return state.antigravityThinkingOptionId;
|
|
198
|
+
if (agent === "kiro-cli") return state.kiroCliThinkingOptionId;
|
|
199
|
+
return void 0;
|
|
190
200
|
}
|
|
191
201
|
permissionModeForAgent(composer, agent) {
|
|
192
202
|
return this.#state(composer).permissionModeByAgent?.[agent];
|
|
@@ -207,7 +217,8 @@
|
|
|
207
217
|
else if (agent === "opencode") state.openCodeModel = model;
|
|
208
218
|
else if (agent === "grok") state.grokModel = model;
|
|
209
219
|
else if (agent === "omp") state.ompModel = model;
|
|
210
|
-
else state.antigravityModel = model;
|
|
220
|
+
else if (agent === "antigravity") state.antigravityModel = model;
|
|
221
|
+
else if (agent === "kiro-cli") state.kiroCliModel = model;
|
|
211
222
|
return state;
|
|
212
223
|
}
|
|
213
224
|
setPiConfiguration(composer, model, thinkingOptionId) {
|
|
@@ -244,6 +255,10 @@
|
|
|
244
255
|
state.antigravityThinkingOptionId = thinkingOptionId;
|
|
245
256
|
} else if (agent === "antigravity") {
|
|
246
257
|
delete state.antigravityThinkingOptionId;
|
|
258
|
+
} else if (agent === "kiro-cli" && thinkingOptionId) {
|
|
259
|
+
state.kiroCliThinkingOptionId = thinkingOptionId;
|
|
260
|
+
} else if (agent === "kiro-cli") {
|
|
261
|
+
delete state.kiroCliThinkingOptionId;
|
|
247
262
|
}
|
|
248
263
|
return state;
|
|
249
264
|
}
|
|
@@ -14876,6 +14891,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14876
14891
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14877
14892
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14878
14893
|
totalCostUsd: finiteNonNegativeNumberSchema.optional(),
|
|
14894
|
+
totalCredits: finiteNonNegativeNumberSchema.optional(),
|
|
14895
|
+
contextUsagePercent: finiteNonNegativeNumberSchema.optional(),
|
|
14879
14896
|
cacheHitRatePercent: cacheHitRatePercentSchema.optional(),
|
|
14880
14897
|
contextWindowTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14881
14898
|
contextUsedTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15362,12 +15379,36 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15362
15379
|
});
|
|
15363
15380
|
|
|
15364
15381
|
// ../shared-contracts/dist/harness-route.js
|
|
15382
|
+
var HARNESS_PLUGIN_ROUTE_PREFIX = "codexhost/plugin-v1@";
|
|
15383
|
+
var MAX_ROUTE_LENGTH = 4096;
|
|
15365
15384
|
var harnessPluginRouteSchema = external_exports.object({
|
|
15366
15385
|
harnessId: harnessPluginIdSchema,
|
|
15367
15386
|
model: harnessModelRefSchema.optional(),
|
|
15368
15387
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
15369
15388
|
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
15370
15389
|
}).strict();
|
|
15390
|
+
function encodeHarnessPluginRoute(route) {
|
|
15391
|
+
const parsed = harnessPluginRouteSchema.parse(route);
|
|
15392
|
+
const payload = [...JSON.stringify(parsed)].map((character) => character.charCodeAt(0).toString(16).padStart(2, "0")).join("");
|
|
15393
|
+
return `${HARNESS_PLUGIN_ROUTE_PREFIX}${payload}`;
|
|
15394
|
+
}
|
|
15395
|
+
function decodeHarnessPluginRoute(value) {
|
|
15396
|
+
if (typeof value !== "string" || !value.startsWith(HARNESS_PLUGIN_ROUTE_PREFIX))
|
|
15397
|
+
return null;
|
|
15398
|
+
const payload = value.slice(HARNESS_PLUGIN_ROUTE_PREFIX.length);
|
|
15399
|
+
if (value.length > MAX_ROUTE_LENGTH || !/^(?:[a-f0-9]{2})+$/u.test(payload)) {
|
|
15400
|
+
throw new Error("Invalid Harness plugin route");
|
|
15401
|
+
}
|
|
15402
|
+
try {
|
|
15403
|
+
const json2 = payload.replace(/[a-f0-9]{2}/gu, (byte) => String.fromCharCode(Number.parseInt(byte, 16)));
|
|
15404
|
+
const decoded = harnessPluginRouteSchema.parse(JSON.parse(json2));
|
|
15405
|
+
if (encodeHarnessPluginRoute(decoded) !== value)
|
|
15406
|
+
throw new Error("Noncanonical Harness plugin route");
|
|
15407
|
+
return decoded;
|
|
15408
|
+
} catch {
|
|
15409
|
+
throw new Error("Invalid Harness plugin route");
|
|
15410
|
+
}
|
|
15411
|
+
}
|
|
15371
15412
|
|
|
15372
15413
|
// ../shared-contracts/dist/codex-accounts.js
|
|
15373
15414
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -15794,6 +15835,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15794
15835
|
// src/assets/antigravity-agent.svg
|
|
15795
15836
|
var antigravity_agent_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -1 28 28"><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" fill="url(%23ag)"/><defs><linearGradient id="ag" x1="2" y1="12" x2="22" y2="12" gradientUnits="userSpaceOnUse"><stop stop-color="%234285F4"/><stop offset=".33" stop-color="%23EA4335"/><stop offset=".66" stop-color="%23FBBC04"/><stop offset="1" stop-color="%2334A853"/></linearGradient></defs></svg>%0A';
|
|
15796
15837
|
|
|
15838
|
+
// src/assets/kiro-agent.svg
|
|
15839
|
+
var kiro_agent_default = 'data:image/svg+xml,<svg width="1200" height="1200" viewBox="0 0 1200 1200" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="1200" height="1200" rx="260" fill="%239046FF"/>%0A<mask id="mask0_1106_4856" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="272" y="202" width="655" height="796">%0A<path d="M926.578 202.793H272.637V997.857H926.578V202.793Z" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_1106_4856)">%0A<path d="M398.554 818.914C316.315 1001.03 491.477 1046.74 620.672 940.156C658.687 1059.66 801.052 970.473 852.234 877.795C964.787 673.567 919.318 465.357 907.64 422.374C827.637 129.443 427.623 128.946 358.8 423.865C342.651 475.544 342.402 534.18 333.458 595.051C328.986 625.86 325.507 645.488 313.83 677.785C306.873 696.424 297.68 712.819 282.773 740.645C259.915 783.881 269.604 867.113 387.87 823.883L399.051 818.914H398.554Z" fill="white"/>%0A<path d="M636.123 549.353C603.328 549.353 598.359 510.097 598.359 486.742C598.359 465.623 602.086 448.977 609.293 438.293C615.504 428.852 624.697 424.131 636.123 424.131C647.555 424.131 657.492 428.852 664.447 438.541C672.398 449.474 676.623 466.12 676.623 486.742C676.623 525.998 661.471 549.353 636.375 549.353H636.123Z" fill="black"/>%0A<path d="M771.24 549.353C738.445 549.353 733.477 510.097 733.477 486.742C733.477 465.623 737.203 448.977 744.41 438.293C750.621 428.852 759.814 424.131 771.24 424.131C782.672 424.131 792.609 428.852 799.564 438.541C807.516 449.474 811.74 466.12 811.74 486.742C811.74 525.998 796.588 549.353 771.492 549.353H771.24Z" fill="black"/>%0A</g>%0A</svg>%0A';
|
|
15840
|
+
|
|
15797
15841
|
// src/assets/omp-agent.svg
|
|
15798
15842
|
var omp_agent_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <defs>%0A <linearGradient id="omp-gradient" x1="0" y1="0" x2="1" y2="1">%0A <stop offset="0" stop-color="%23ed4abf" />%0A <stop offset=".5" stop-color="%239b4dff" />%0A <stop offset="1" stop-color="%235ad8e6" />%0A </linearGradient>%0A </defs>%0A <path%0A fill="url(%23omp-gradient)"%0A transform="translate(-14.4 -20.2) scale(1.45)"%0A d="M14 16h36v8H40v32h-8V24h-6v22h-8V24h-4z"%0A />%0A</svg>%0A';
|
|
15799
15843
|
|
|
@@ -15809,7 +15853,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15809
15853
|
opencode: "OpenCode",
|
|
15810
15854
|
grok: "Grok",
|
|
15811
15855
|
omp: "Oh My Pi",
|
|
15812
|
-
antigravity: "Antigravity CLI"
|
|
15856
|
+
antigravity: "Antigravity CLI",
|
|
15857
|
+
"kiro-cli": "Kiro CLI"
|
|
15813
15858
|
};
|
|
15814
15859
|
var PI_PATHS = [
|
|
15815
15860
|
{
|
|
@@ -15832,6 +15877,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15832
15877
|
const path = ownerDocument.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
15833
15878
|
path.setAttribute("d", definition.d);
|
|
15834
15879
|
if (definition.fillRule) path.setAttribute("fill-rule", definition.fillRule);
|
|
15880
|
+
if (definition.fill) path.setAttribute("fill", definition.fill);
|
|
15835
15881
|
svg.append(path);
|
|
15836
15882
|
}
|
|
15837
15883
|
return svg;
|
|
@@ -15884,9 +15930,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15884
15930
|
image.style.flex = "none";
|
|
15885
15931
|
return image;
|
|
15886
15932
|
}
|
|
15887
|
-
if (agent === "antigravity") {
|
|
15933
|
+
if (agent === "antigravity" || agent === "kiro-cli") {
|
|
15888
15934
|
const image = ownerDocument.createElement("img");
|
|
15889
|
-
image.src = antigravity_agent_default;
|
|
15935
|
+
image.src = agent === "kiro-cli" ? kiro_agent_default : antigravity_agent_default;
|
|
15890
15936
|
image.alt = "";
|
|
15891
15937
|
image.draggable = false;
|
|
15892
15938
|
image.style.width = `${size}px`;
|
|
@@ -16532,7 +16578,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16532
16578
|
opencode: "https://opencode.ai/docs/",
|
|
16533
16579
|
grok: "https://grok.com/",
|
|
16534
16580
|
omp: "https://github.com/can1357/oh-my-pi",
|
|
16535
|
-
antigravity: "https://antigravity.google/product/antigravity-cli"
|
|
16581
|
+
antigravity: "https://antigravity.google/product/antigravity-cli",
|
|
16582
|
+
"kiro-cli": "https://kiro.dev/docs/cli/"
|
|
16536
16583
|
});
|
|
16537
16584
|
function connectionStatusLabel(availability, messages, hasError = false) {
|
|
16538
16585
|
if (hasError && availability !== "notInstalled") return messages.connectionStatusError;
|
|
@@ -17755,7 +17802,8 @@ ${error51.stderrTail}`] : []
|
|
|
17755
17802
|
opencode: "https://opencode.ai/docs/",
|
|
17756
17803
|
grok: "https://grok.com/",
|
|
17757
17804
|
omp: "https://github.com/can1357/oh-my-pi",
|
|
17758
|
-
antigravity: "https://antigravity.google/product/antigravity-cli"
|
|
17805
|
+
antigravity: "https://antigravity.google/product/antigravity-cli",
|
|
17806
|
+
"kiro-cli": "https://kiro.dev/docs/cli/"
|
|
17759
17807
|
};
|
|
17760
17808
|
var CONTROL_ATTRIBUTE = "data-codexhost-agent-control";
|
|
17761
17809
|
var AGENT_MENU_WIDTH = 224;
|
|
@@ -19393,7 +19441,9 @@ ${error51.stderrTail}`] : []
|
|
|
19393
19441
|
// src/renderer-usage-control.ts
|
|
19394
19442
|
var ENGLISH_USAGE_MESSAGES = Object.freeze({
|
|
19395
19443
|
usage: "Usage",
|
|
19444
|
+
account: "Account",
|
|
19396
19445
|
context: "Context",
|
|
19446
|
+
recordedCredits: "Recorded usage",
|
|
19397
19447
|
latestCacheHit: "Latest cache hit",
|
|
19398
19448
|
outputSpeed: "Output speed",
|
|
19399
19449
|
cacheRead: "Cache read",
|
|
@@ -19401,19 +19451,17 @@ ${error51.stderrTail}`] : []
|
|
|
19401
19451
|
reasoning: "Reasoning",
|
|
19402
19452
|
totalTokens: "Total tokens",
|
|
19403
19453
|
inputOutput: "Input / output",
|
|
19404
|
-
fiveHourLimit: "5-hour limit",
|
|
19405
|
-
sevenDayLimit: "7-day limit",
|
|
19406
19454
|
sessionCostEstimate: "Session cost estimate",
|
|
19407
19455
|
threadUsage: "Thread Usage",
|
|
19408
19456
|
threadUsageDetails: "Thread Usage details",
|
|
19409
19457
|
tokensSummary: "tokens",
|
|
19410
|
-
tokensPerSecond: "tok/s"
|
|
19411
|
-
fiveHourSummary: "5h",
|
|
19412
|
-
sevenDaySummary: "7d"
|
|
19458
|
+
tokensPerSecond: "tok/s"
|
|
19413
19459
|
});
|
|
19414
19460
|
var CHINESE_USAGE_MESSAGES = Object.freeze({
|
|
19415
19461
|
usage: "\u7528\u91CF",
|
|
19462
|
+
account: "\u8D26\u53F7",
|
|
19416
19463
|
context: "\u4E0A\u4E0B\u6587",
|
|
19464
|
+
recordedCredits: "\u5DF2\u8BB0\u5F55\u6D88\u8017",
|
|
19417
19465
|
latestCacheHit: "\u6700\u8FD1\u7F13\u5B58\u547D\u4E2D\u7387",
|
|
19418
19466
|
outputSpeed: "\u8F93\u51FA\u901F\u5EA6",
|
|
19419
19467
|
cacheRead: "\u7F13\u5B58\u8BFB\u53D6",
|
|
@@ -19421,15 +19469,11 @@ ${error51.stderrTail}`] : []
|
|
|
19421
19469
|
reasoning: "\u63A8\u7406",
|
|
19422
19470
|
totalTokens: "Token \u603B\u6570",
|
|
19423
19471
|
inputOutput: "\u8F93\u5165 / \u8F93\u51FA",
|
|
19424
|
-
fiveHourLimit: "5 \u5C0F\u65F6\u9650\u989D",
|
|
19425
|
-
sevenDayLimit: "7 \u5929\u9650\u989D",
|
|
19426
19472
|
sessionCostEstimate: "\u4F1A\u8BDD\u8D39\u7528\u4F30\u7B97",
|
|
19427
19473
|
threadUsage: "\u5BF9\u8BDD\u7528\u91CF",
|
|
19428
19474
|
threadUsageDetails: "\u5BF9\u8BDD\u7528\u91CF\u8BE6\u60C5",
|
|
19429
19475
|
tokensSummary: "Token",
|
|
19430
|
-
tokensPerSecond: "Token/\u79D2"
|
|
19431
|
-
fiveHourSummary: "5 \u5C0F\u65F6",
|
|
19432
|
-
sevenDaySummary: "7 \u5929"
|
|
19476
|
+
tokensPerSecond: "Token/\u79D2"
|
|
19433
19477
|
});
|
|
19434
19478
|
function rendererUsageMessages(locale) {
|
|
19435
19479
|
return locale === "zh-CN" ? CHINESE_USAGE_MESSAGES : ENGLISH_USAGE_MESSAGES;
|
|
@@ -19443,6 +19487,9 @@ ${error51.stderrTail}`] : []
|
|
|
19443
19487
|
function formatRendererCost(value) {
|
|
19444
19488
|
return `$${value.toFixed(3)}`;
|
|
19445
19489
|
}
|
|
19490
|
+
function formatRendererCredits(value) {
|
|
19491
|
+
return `${value > 0 && value < 1e-3 ? "<0.001" : decimal(value, 3)} credits`;
|
|
19492
|
+
}
|
|
19446
19493
|
function formatRendererTokenRate(value, locale = "en") {
|
|
19447
19494
|
return `${decimal(value, 1)} ${rendererUsageMessages(locale).tokensPerSecond}`;
|
|
19448
19495
|
}
|
|
@@ -19497,27 +19544,11 @@ ${error51.stderrTail}`] : []
|
|
|
19497
19544
|
svg.append(track, fill);
|
|
19498
19545
|
return svg;
|
|
19499
19546
|
}
|
|
19500
|
-
function formatRendererPlanReset(unixSeconds, locale) {
|
|
19501
|
-
const date5 = new Date(unixSeconds * 1e3);
|
|
19502
|
-
if (Number.isNaN(date5.getTime())) return "";
|
|
19503
|
-
return date5.toLocaleString(locale === "zh-CN" ? "zh-CN" : void 0, {
|
|
19504
|
-
month: "long",
|
|
19505
|
-
day: "numeric",
|
|
19506
|
-
hour: "numeric",
|
|
19507
|
-
minute: "2-digit"
|
|
19508
|
-
});
|
|
19509
|
-
}
|
|
19510
|
-
function formatRendererPlanWindow(usedPercent, resetsAtUnix, locale) {
|
|
19511
|
-
const percent = formatRendererCreditsPercent(usedPercent);
|
|
19512
|
-
if (resetsAtUnix === void 0) return percent;
|
|
19513
|
-
const reset = formatRendererPlanReset(resetsAtUnix, locale);
|
|
19514
|
-
return reset.length > 0 ? `${percent} \xB7 ${reset}` : percent;
|
|
19515
|
-
}
|
|
19516
19547
|
function rendererUsageTriggerMaxWidth() {
|
|
19517
19548
|
return "min(180px, 30vw)";
|
|
19518
19549
|
}
|
|
19519
19550
|
function rendererUsageHasDisplayData(usage) {
|
|
19520
|
-
return usage?.cacheHitRatePercent !== void 0 || usage?.outputTokensPerSecond !== void 0 || usage?.totalCostUsd !== void 0 || usage?.
|
|
19551
|
+
return usage?.cacheHitRatePercent !== void 0 || usage?.outputTokensPerSecond !== void 0 || usage?.totalCostUsd !== void 0 || usage?.totalCredits !== void 0 || usage?.contextUsagePercent !== void 0 || usage?.contextUsedTokens !== void 0 && usage.contextWindowTokens !== void 0 || usage?.totalTokens !== void 0 || usage?.inputTokens !== void 0 || usage?.cachedInputTokens !== void 0 || usage?.cacheWriteInputTokens !== void 0 || usage?.outputTokens !== void 0 || usage?.reasoningOutputTokens !== void 0;
|
|
19521
19552
|
}
|
|
19522
19553
|
function applyRendererPopoverChrome(popover) {
|
|
19523
19554
|
popover.style.border = "1px solid light-dark(rgba(15, 23, 42, 0.10), color-mix(in srgb, CanvasText 16%, transparent))";
|
|
@@ -19526,10 +19557,10 @@ ${error51.stderrTail}`] : []
|
|
|
19526
19557
|
popover.style.color = "CanvasText";
|
|
19527
19558
|
popover.style.boxShadow = "light-dark(0 10px 24px rgba(15, 23, 42, 0.12), 0 20px 45px rgba(0, 0, 0, 0.42)), 0 2px 8px light-dark(rgba(15, 23, 42, 0.06), rgba(0, 0, 0, 0.28))";
|
|
19528
19559
|
}
|
|
19529
|
-
function addDetailRow(parent, label, value) {
|
|
19560
|
+
function addDetailRow(parent, label, value, wrap = false) {
|
|
19530
19561
|
const row = document.createElement("div");
|
|
19531
19562
|
row.style.display = "grid";
|
|
19532
|
-
row.style.gridTemplateColumns = "minmax(0, 1fr) auto";
|
|
19563
|
+
row.style.gridTemplateColumns = wrap ? "auto minmax(0, 1fr)" : "minmax(0, 1fr) auto";
|
|
19533
19564
|
row.style.gap = "20px";
|
|
19534
19565
|
row.style.padding = "4px 0";
|
|
19535
19566
|
const labelElement = document.createElement("span");
|
|
@@ -19539,17 +19570,24 @@ ${error51.stderrTail}`] : []
|
|
|
19539
19570
|
valueElement.textContent = value;
|
|
19540
19571
|
valueElement.style.fontVariantNumeric = "tabular-nums";
|
|
19541
19572
|
valueElement.style.textAlign = "right";
|
|
19573
|
+
if (wrap) {
|
|
19574
|
+
valueElement.style.overflowWrap = "anywhere";
|
|
19575
|
+
valueElement.title = value;
|
|
19576
|
+
}
|
|
19542
19577
|
row.append(labelElement, valueElement);
|
|
19543
19578
|
parent.append(row);
|
|
19544
19579
|
}
|
|
19545
|
-
function renderDetails(popover, usage, messages, locale) {
|
|
19580
|
+
function renderDetails(popover, usage, messages, locale, accountName) {
|
|
19546
19581
|
popover.replaceChildren();
|
|
19547
19582
|
const heading = document.createElement("div");
|
|
19548
19583
|
heading.textContent = messages.usage;
|
|
19549
19584
|
heading.style.fontWeight = "600";
|
|
19550
19585
|
heading.style.marginBottom = "6px";
|
|
19551
19586
|
popover.append(heading);
|
|
19552
|
-
if (
|
|
19587
|
+
if (accountName) addDetailRow(popover, messages.account, accountName, true);
|
|
19588
|
+
if (usage?.contextUsagePercent !== void 0) {
|
|
19589
|
+
addDetailRow(popover, messages.context, `${decimal(usage.contextUsagePercent, 1)}%`);
|
|
19590
|
+
} else if (usage?.contextUsedTokens !== void 0 && usage.contextWindowTokens !== void 0) {
|
|
19553
19591
|
const contextPercent = usage.contextWindowTokens > 0 ? usage.contextUsedTokens / usage.contextWindowTokens * 100 : null;
|
|
19554
19592
|
addDetailRow(
|
|
19555
19593
|
popover,
|
|
@@ -19595,34 +19633,15 @@ ${error51.stderrTail}`] : []
|
|
|
19595
19633
|
addDetailRow(
|
|
19596
19634
|
popover,
|
|
19597
19635
|
messages.inputOutput,
|
|
19598
|
-
`${
|
|
19599
|
-
);
|
|
19600
|
-
}
|
|
19601
|
-
if (usage?.planFiveHourUsedPercent !== void 0) {
|
|
19602
|
-
addDetailRow(
|
|
19603
|
-
popover,
|
|
19604
|
-
messages.fiveHourLimit,
|
|
19605
|
-
formatRendererPlanWindow(
|
|
19606
|
-
usage.planFiveHourUsedPercent,
|
|
19607
|
-
usage.planFiveHourResetsAtUnix,
|
|
19608
|
-
locale
|
|
19609
|
-
)
|
|
19610
|
-
);
|
|
19611
|
-
}
|
|
19612
|
-
if (usage?.planSevenDayUsedPercent !== void 0) {
|
|
19613
|
-
addDetailRow(
|
|
19614
|
-
popover,
|
|
19615
|
-
messages.sevenDayLimit,
|
|
19616
|
-
formatRendererPlanWindow(
|
|
19617
|
-
usage.planSevenDayUsedPercent,
|
|
19618
|
-
usage.planSevenDayResetsAtUnix,
|
|
19619
|
-
locale
|
|
19620
|
-
)
|
|
19636
|
+
`${usage.inputTokens === void 0 ? "-" : formatRendererTokenCount(usage.inputTokens)} / ${usage.outputTokens === void 0 ? "-" : formatRendererTokenCount(usage.outputTokens)}`
|
|
19621
19637
|
);
|
|
19622
19638
|
}
|
|
19623
19639
|
if (usage?.totalCostUsd !== void 0) {
|
|
19624
19640
|
addDetailRow(popover, messages.sessionCostEstimate, formatRendererCost(usage.totalCostUsd));
|
|
19625
19641
|
}
|
|
19642
|
+
if (usage?.totalCredits !== void 0) {
|
|
19643
|
+
addDetailRow(popover, messages.recordedCredits, formatRendererCredits(usage.totalCredits));
|
|
19644
|
+
}
|
|
19626
19645
|
}
|
|
19627
19646
|
function popoverIsOpen(popover) {
|
|
19628
19647
|
try {
|
|
@@ -19706,6 +19725,8 @@ ${error51.stderrTail}`] : []
|
|
|
19706
19725
|
popover.setAttribute("popover", "auto");
|
|
19707
19726
|
popover.hidden = typeof popover.showPopover !== "function";
|
|
19708
19727
|
popover.style.position = "fixed";
|
|
19728
|
+
popover.style.boxSizing = "border-box";
|
|
19729
|
+
popover.style.margin = "0";
|
|
19709
19730
|
popover.style.inset = "auto";
|
|
19710
19731
|
popover.style.width = "260px";
|
|
19711
19732
|
popover.style.maxWidth = "min(320px, calc(100vw - 24px))";
|
|
@@ -19777,7 +19798,7 @@ ${error51.stderrTail}`] : []
|
|
|
19777
19798
|
document.body.append(popover);
|
|
19778
19799
|
return control;
|
|
19779
19800
|
}
|
|
19780
|
-
function renderRendererUsageControl(control, usage, locale = control.locale) {
|
|
19801
|
+
function renderRendererUsageControl(control, usage, locale = control.locale, accountName = null) {
|
|
19781
19802
|
control.locale = locale;
|
|
19782
19803
|
const messages = rendererUsageMessages(locale);
|
|
19783
19804
|
control.popover.setAttribute("aria-label", messages.threadUsageDetails);
|
|
@@ -19786,18 +19807,20 @@ ${error51.stderrTail}`] : []
|
|
|
19786
19807
|
const totalCostUsd = usage?.totalCostUsd;
|
|
19787
19808
|
const hasContext = usage?.contextUsedTokens !== void 0 && usage.contextWindowTokens !== void 0;
|
|
19788
19809
|
const hasTokenUsage = usage?.totalTokens !== void 0 || usage?.inputTokens !== void 0 || usage?.cachedInputTokens !== void 0 || usage?.cacheWriteInputTokens !== void 0 || usage?.outputTokens !== void 0 || usage?.reasoningOutputTokens !== void 0;
|
|
19789
|
-
const
|
|
19790
|
-
const visible = rendererUsageHasDisplayData(usage);
|
|
19810
|
+
const visible = rendererUsageHasDisplayData(usage) || Boolean(accountName);
|
|
19791
19811
|
control.root.style.display = visible ? "inline-flex" : "none";
|
|
19792
19812
|
if (!visible) {
|
|
19793
19813
|
closePopover(control);
|
|
19794
19814
|
return false;
|
|
19795
19815
|
}
|
|
19796
19816
|
const summary = [
|
|
19817
|
+
usage?.totalCredits !== void 0 ? formatRendererCredits(usage.totalCredits) : null,
|
|
19797
19818
|
cacheHitRatePercent !== void 0 ? formatRendererCacheHitRate(cacheHitRatePercent) : null,
|
|
19798
19819
|
outputTokensPerSecond !== void 0 ? formatRendererTokenRate(outputTokensPerSecond, locale) : null,
|
|
19799
19820
|
totalCostUsd !== void 0 ? formatRendererCost(totalCostUsd) : null
|
|
19800
19821
|
].filter((value) => value !== null);
|
|
19822
|
+
const contextPercent = usage?.contextUsagePercent;
|
|
19823
|
+
if (contextPercent !== void 0 && summary.length === 0) summary.push(messages.usage);
|
|
19801
19824
|
if (summary.length === 0 && hasContext && usage?.contextWindowTokens !== void 0 && usage.contextWindowTokens > 0) {
|
|
19802
19825
|
summary.push(
|
|
19803
19826
|
formatRendererContextSummary(usage.contextUsedTokens ?? 0, usage.contextWindowTokens)
|
|
@@ -19811,18 +19834,13 @@ ${error51.stderrTail}`] : []
|
|
|
19811
19834
|
`${formatRendererTokenCount((usage?.inputTokens ?? 0) + (usage?.outputTokens ?? 0))} ${messages.tokensSummary}`
|
|
19812
19835
|
);
|
|
19813
19836
|
}
|
|
19814
|
-
|
|
19815
|
-
|
|
19816
|
-
usage?.planFiveHourUsedPercent !== void 0 ? `${messages.fiveHourSummary} ${formatRendererCreditsPercent(usage.planFiveHourUsedPercent)}` : `${messages.sevenDaySummary} ${formatRendererCreditsPercent(usage?.planSevenDayUsedPercent ?? 0)}`
|
|
19817
|
-
);
|
|
19818
|
-
}
|
|
19819
|
-
const compactSummary = summary.join(" \xB7 ");
|
|
19820
|
-
const accessibleSummary = `${messages.threadUsage}: ${compactSummary}`;
|
|
19837
|
+
const compactSummary = summary.join(" \xB7 ") || messages.usage;
|
|
19838
|
+
const accessibleSummary = `${messages.threadUsage}: ${compactSummary}${contextPercent !== void 0 ? `; ${messages.context} ${decimal(contextPercent, 1)}%` : ""}`;
|
|
19821
19839
|
control.trigger.style.maxWidth = rendererUsageTriggerMaxWidth();
|
|
19822
19840
|
control.trigger.setAttribute("aria-label", accessibleSummary);
|
|
19823
19841
|
control.trigger.title = accessibleSummary;
|
|
19824
19842
|
control.label.textContent = compactSummary;
|
|
19825
|
-
renderDetails(control.popover, usage, messages, locale);
|
|
19843
|
+
renderDetails(control.popover, usage, messages, locale, accountName);
|
|
19826
19844
|
return true;
|
|
19827
19845
|
}
|
|
19828
19846
|
|
|
@@ -20986,7 +21004,15 @@ ${error51.stderrTail}`] : []
|
|
|
20986
21004
|
permissionModeVisible,
|
|
20987
21005
|
locale
|
|
20988
21006
|
);
|
|
20989
|
-
|
|
21007
|
+
const selectedCodexAccount = state.agent === "codex" && !ownershipError ? codexAccounts.find((account) => account.active) : void 0;
|
|
21008
|
+
if (control.usage) {
|
|
21009
|
+
renderRendererUsageControl(
|
|
21010
|
+
control.usage,
|
|
21011
|
+
usage,
|
|
21012
|
+
locale,
|
|
21013
|
+
selectedCodexAccount?.email ?? selectedCodexAccount?.label ?? null
|
|
21014
|
+
);
|
|
21015
|
+
}
|
|
20990
21016
|
control.harnessCommands.setLocale(locale);
|
|
20991
21017
|
control.harnessCommands.root.hidden = state.agent === "codex";
|
|
20992
21018
|
control.harnessCommands.root.style.display = state.agent === "codex" ? "none" : "inline-flex";
|
|
@@ -21135,6 +21161,7 @@ ${error51.stderrTail}`] : []
|
|
|
21135
21161
|
if (ownership.harnessId === "grok") return "grok";
|
|
21136
21162
|
if (ownership.harnessId === "omp") return "omp";
|
|
21137
21163
|
if (ownership.harnessId === "antigravity") return "antigravity";
|
|
21164
|
+
if (ownership.harnessId === "kiro-cli") return "kiro-cli";
|
|
21138
21165
|
return null;
|
|
21139
21166
|
}
|
|
21140
21167
|
var BrowserSidebarAgentIconRow = class {
|
|
@@ -22195,6 +22222,7 @@ ${error51.stderrTail}`] : []
|
|
|
22195
22222
|
}
|
|
22196
22223
|
var DRAFT_PREWARM_POLICY_WAIT_TIMEOUT_MS = 1e4;
|
|
22197
22224
|
var DRAFT_PREWARM_POLICY_POLL_INTERVAL_MS = 25;
|
|
22225
|
+
var KIRO_CLI_HARNESS_ID = harnessIdSchema.parse("kiro-cli");
|
|
22198
22226
|
function transportModelIdForAgent(agent) {
|
|
22199
22227
|
if (agent === "pi") return PI_TRANSPORT_MODEL_ID;
|
|
22200
22228
|
if (agent === "claude-code") return CLAUDE_CODE_TRANSPORT_MODEL_ID;
|
|
@@ -22203,6 +22231,7 @@ ${error51.stderrTail}`] : []
|
|
|
22203
22231
|
if (agent === "grok") return GROK_TRANSPORT_MODEL_ID;
|
|
22204
22232
|
if (agent === "omp") return OMP_TRANSPORT_MODEL_ID;
|
|
22205
22233
|
if (agent === "antigravity") return ANTIGRAVITY_TRANSPORT_MODEL_ID;
|
|
22234
|
+
if (agent === "kiro-cli") return encodeHarnessPluginRoute({ harnessId: KIRO_CLI_HARNESS_ID });
|
|
22206
22235
|
return null;
|
|
22207
22236
|
}
|
|
22208
22237
|
function isRecord6(value) {
|
|
@@ -22645,7 +22674,12 @@ ${error51.stderrTail}`] : []
|
|
|
22645
22674
|
}
|
|
22646
22675
|
}
|
|
22647
22676
|
function modelSelectionForAgent(officialSelection, reasoningEffort, agent, model, thinkingOptionId, permissionModeId) {
|
|
22648
|
-
const transportModelId = agent === "pi" ? piTransportModelId(model, thinkingOptionId) : agent === "claude-code" ? claudeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "deepseek-harness" ? deepSeekHarnessTransportModelId(model, permissionModeId) : agent === "opencode" ? openCodeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "grok" ? grokTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "omp" ? ompTransportModelId(model, thinkingOptionId, permissionModeId) : agent === "antigravity" ? antigravityTransportModelId(model, permissionModeId, thinkingOptionId) :
|
|
22677
|
+
const transportModelId = agent === "pi" ? piTransportModelId(model, thinkingOptionId) : agent === "claude-code" ? claudeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "deepseek-harness" ? deepSeekHarnessTransportModelId(model, permissionModeId) : agent === "opencode" ? openCodeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "grok" ? grokTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "omp" ? ompTransportModelId(model, thinkingOptionId, permissionModeId) : agent === "antigravity" ? antigravityTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "kiro-cli" ? encodeHarnessPluginRoute({
|
|
22678
|
+
harnessId: KIRO_CLI_HARNESS_ID,
|
|
22679
|
+
...model ? { model } : {},
|
|
22680
|
+
...thinkingOptionId ? { thinkingOptionId } : {},
|
|
22681
|
+
...permissionModeId ? { permissionModeId } : {}
|
|
22682
|
+
}) : transportModelIdForAgent(agent);
|
|
22649
22683
|
return transportModelId ? { model: transportModelId, reasoningEffort } : officialSelection;
|
|
22650
22684
|
}
|
|
22651
22685
|
function installCurrentRendererAdapter() {
|
|
@@ -26103,7 +26137,8 @@ ${accounts_default}`;
|
|
|
26103
26137
|
opencode: harnessIdSchema.parse("opencode"),
|
|
26104
26138
|
grok: harnessIdSchema.parse("grok"),
|
|
26105
26139
|
omp: harnessIdSchema.parse("omp"),
|
|
26106
|
-
antigravity: harnessIdSchema.parse("antigravity")
|
|
26140
|
+
antigravity: harnessIdSchema.parse("antigravity"),
|
|
26141
|
+
"kiro-cli": harnessIdSchema.parse("kiro-cli")
|
|
26107
26142
|
};
|
|
26108
26143
|
var externalAgents = [
|
|
26109
26144
|
"pi",
|
|
@@ -26112,7 +26147,8 @@ ${accounts_default}`;
|
|
|
26112
26147
|
"opencode",
|
|
26113
26148
|
"grok",
|
|
26114
26149
|
"omp",
|
|
26115
|
-
"antigravity"
|
|
26150
|
+
"antigravity",
|
|
26151
|
+
"kiro-cli"
|
|
26116
26152
|
];
|
|
26117
26153
|
function isRetryableHarnessAvailability(availability, error51) {
|
|
26118
26154
|
return availability !== void 0 && availability !== "ready" && availability !== "notInstalled" && error51?.retryable === true;
|
|
@@ -26148,8 +26184,8 @@ ${accounts_default}`;
|
|
|
26148
26184
|
if (usage === null) return true;
|
|
26149
26185
|
return externalAgentHasAccountCredits(agent) && accountCredits === null;
|
|
26150
26186
|
}
|
|
26151
|
-
function shouldReloadExternalCatalogAfterAvailabilityRefresh(previous, next, configurationReady) {
|
|
26152
|
-
return previous !== next || !configurationReady;
|
|
26187
|
+
function shouldReloadExternalCatalogAfterAvailabilityRefresh(previous, next, configurationReady, explicitRefresh = false) {
|
|
26188
|
+
return explicitRefresh || previous !== next || !configurationReady;
|
|
26153
26189
|
}
|
|
26154
26190
|
function isExternalConfigurationReadyView(modelView, permissionModeView) {
|
|
26155
26191
|
return modelView.status !== "selecting" && modelView.catalog?.models.some((model) => model.ref.id === modelView.selected?.id) === true && isPermissionModeControlReady(permissionModeView);
|
|
@@ -26282,6 +26318,21 @@ ${accounts_default}`;
|
|
|
26282
26318
|
...permissionModeId ? { permissionModeId } : {}
|
|
26283
26319
|
};
|
|
26284
26320
|
}
|
|
26321
|
+
if (inspection.harnessId === "kiro-cli") {
|
|
26322
|
+
const route = decodeHarnessPluginRoute(inspection.transportModelId);
|
|
26323
|
+
if (!route || route.harnessId !== "kiro-cli") {
|
|
26324
|
+
throw new Error("Kiro CLI Thread reported an incompatible transport Model");
|
|
26325
|
+
}
|
|
26326
|
+
const model = inspection.effectiveModel ?? route.model;
|
|
26327
|
+
const thinkingOptionId = inspection.availableThinkingOptions !== void 0 ? selectableThinkingOptionId(inspection) : inspection.effectiveThinkingOptionId ?? route.thinkingOptionId;
|
|
26328
|
+
const permissionModeId = inspection.effectivePermissionModeId ?? route.permissionModeId;
|
|
26329
|
+
return {
|
|
26330
|
+
agent: "kiro-cli",
|
|
26331
|
+
...model ? { model } : {},
|
|
26332
|
+
...thinkingOptionId ? { thinkingOptionId } : {},
|
|
26333
|
+
...permissionModeId ? { permissionModeId } : {}
|
|
26334
|
+
};
|
|
26335
|
+
}
|
|
26285
26336
|
throw new Error("Thread owner is not a Renderer Agent");
|
|
26286
26337
|
}
|
|
26287
26338
|
function isOwnershipSubmissionBlocked(status) {
|
|
@@ -26424,7 +26475,8 @@ ${accounts_default}`;
|
|
|
26424
26475
|
opencode: void 0,
|
|
26425
26476
|
grok: void 0,
|
|
26426
26477
|
omp: void 0,
|
|
26427
|
-
antigravity: void 0
|
|
26478
|
+
antigravity: void 0,
|
|
26479
|
+
"kiro-cli": void 0
|
|
26428
26480
|
},
|
|
26429
26481
|
webUi: Object.fromEntries(
|
|
26430
26482
|
externalAgents.map((agent) => [agent, false])
|
|
@@ -26907,7 +26959,22 @@ ${accounts_default}`;
|
|
|
26907
26959
|
return;
|
|
26908
26960
|
}
|
|
26909
26961
|
if (current.phase === "locked" && previousModel && !previousModelAvailable) {
|
|
26910
|
-
|
|
26962
|
+
mounted.modelView = {
|
|
26963
|
+
status: "error",
|
|
26964
|
+
catalog: inspection.catalog,
|
|
26965
|
+
selected: previousModel,
|
|
26966
|
+
thinkingSelectionSupported: inspection.capabilities.configuration.selectThinkingOption,
|
|
26967
|
+
error: "Existing Thread Model is absent from the current Catalog"
|
|
26968
|
+
};
|
|
26969
|
+
if (selectedPermissionModeId && mounted.permissionModeView.catalog) {
|
|
26970
|
+
mounted.permissionModeView = {
|
|
26971
|
+
status: "ready",
|
|
26972
|
+
catalog: mounted.permissionModeView.catalog,
|
|
26973
|
+
selected: selectedPermissionModeId,
|
|
26974
|
+
...permissionModeLock
|
|
26975
|
+
};
|
|
26976
|
+
}
|
|
26977
|
+
return;
|
|
26911
26978
|
}
|
|
26912
26979
|
const selected = previousModelAvailable ? previousModel : preferredConfiguration?.model ?? inspection.catalog.defaultModel;
|
|
26913
26980
|
if (!selected) throw new Error("External Harness did not report its default Model");
|
|
@@ -27550,7 +27617,8 @@ ${accounts_default}`;
|
|
|
27550
27617
|
if (composerState.agent === agent && shouldReloadExternalCatalogAfterAvailabilityRefresh(
|
|
27551
27618
|
previousStatus,
|
|
27552
27619
|
status,
|
|
27553
|
-
isExternalConfigurationStable(mounted.modelView, mounted.permissionModeView)
|
|
27620
|
+
isExternalConfigurationStable(mounted.modelView, mounted.permissionModeView),
|
|
27621
|
+
refresh && force
|
|
27554
27622
|
)) {
|
|
27555
27623
|
void loadExternalCatalog(mounted);
|
|
27556
27624
|
}
|
package/bin/codexhost
CHANGED
|
Binary file
|
package/libexec/codexhost-shim
CHANGED
|
Binary file
|
|
Binary file
|