@codexhost/cli-darwin-x64 0.12.1 → 0.13.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.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.txt +8 -0
  3. package/app/codexhost-distribution.json +1 -1
  4. package/app/console-server.mjs +232 -21
  5. package/app/console-web.js +5434 -1092
  6. package/app/desktop-controller.mjs +252 -41
  7. package/app/host-runtime.mjs +5318 -1448
  8. package/app/plugins/antigravity/manifest.json +18 -1
  9. package/app/plugins/antigravity/plugin.mjs +276 -42
  10. package/app/plugins/claude-code/manifest.json +28 -0
  11. package/app/plugins/claude-code/plugin.mjs +1049 -359
  12. package/app/plugins/codebuddy/manifest.json +17 -0
  13. package/app/plugins/codebuddy/plugin.mjs +5931 -5358
  14. package/app/plugins/codex-usage/manifest.json +9 -0
  15. package/app/plugins/codex-usage/plugin.mjs +16703 -0
  16. package/app/plugins/cursor-cli/manifest.json +17 -0
  17. package/app/plugins/cursor-cli/plugin.mjs +351 -77
  18. package/app/plugins/deepseek-harness/assets/icon.svg +1 -0
  19. package/app/plugins/deepseek-harness/manifest.json +35 -2
  20. package/app/plugins/deepseek-harness/plugin.mjs +798 -242
  21. package/app/plugins/enabled.json +2 -1
  22. package/app/plugins/grok/manifest.json +21 -1
  23. package/app/plugins/grok/plugin.mjs +884 -259
  24. package/app/plugins/hermes/assets/icon.png +0 -0
  25. package/app/plugins/hermes/manifest.json +30 -2
  26. package/app/plugins/hermes/plugin.mjs +278 -33
  27. package/app/plugins/kimi-code/assets/icon.svg +5 -0
  28. package/app/plugins/kimi-code/manifest.json +25 -2
  29. package/app/plugins/kimi-code/plugin.mjs +555 -36
  30. package/app/plugins/kiro-cli/assets/kiro-agent.svg +11 -0
  31. package/app/plugins/kiro-cli/manifest.json +18 -1
  32. package/app/plugins/kiro-cli/plugin.mjs +284 -22
  33. package/app/plugins/omp/manifest.json +21 -1
  34. package/app/plugins/omp/plugin.mjs +2737 -1956
  35. package/app/plugins/opencode/manifest.json +18 -1
  36. package/app/plugins/opencode/plugin.mjs +694 -147
  37. package/app/plugins/pi/manifest.json +32 -0
  38. package/app/plugins/pi/plugin.mjs +2809 -2254
  39. package/app/plugins/qoder/manifest.json +18 -1
  40. package/app/plugins/qoder/plugin.mjs +585 -81
  41. package/app/plugins/qoder-cn/manifest.json +18 -1
  42. package/app/plugins/qoder-cn/plugin.mjs +585 -81
  43. package/app/plugins/workbuddy/manifest.json +18 -0
  44. package/app/plugins/workbuddy/plugin.mjs +6317 -5746
  45. package/app/plugins/zcode/manifest.json +19 -1
  46. package/app/plugins/zcode/plugin.mjs +1066 -260
  47. package/app/renderer-extension.js +1999 -1686
  48. package/bin/codexhost +0 -0
  49. package/libexec/codexhost-shim +0 -0
  50. package/libexec/codexhost-updater +0 -0
  51. package/licenses/Cordis-LICENSE.txt +21 -0
  52. package/licenses/Cosmokit-LICENSE.txt +21 -0
  53. package/package.json +1 -1
  54. package/app/plugins/kiro-cli/assets/icon.svg +0 -5
@@ -0,0 +1,11 @@
1
+ <svg width="1200" height="1200" viewBox="0 0 1200 1200" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="1200" height="1200" rx="260" fill="#9046FF"/>
3
+ <mask id="mask0_1106_4856" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="272" y="202" width="655" height="796">
4
+ <path d="M926.578 202.793H272.637V997.857H926.578V202.793Z" fill="white"/>
5
+ </mask>
6
+ <g mask="url(#mask0_1106_4856)">
7
+ <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"/>
8
+ <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"/>
9
+ <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"/>
10
+ </g>
11
+ </svg>
@@ -3,10 +3,27 @@
3
3
  "id": "kiro-cli",
4
4
  "name": "Kiro CLI",
5
5
  "version": "0.0.0",
6
+ "installation": {
7
+ "commands": [
8
+ {
9
+ "terminal": "macOS / Linux · Terminal (sh/bash)",
10
+ "command": "curl -fsSL https://cli.kiro.dev/install | bash"
11
+ },
12
+ {
13
+ "terminal": "Windows · PowerShell",
14
+ "command": "irm 'https://cli.kiro.dev/install.ps1' | iex"
15
+ }
16
+ ],
17
+ "after": {
18
+ "en": "After installation, run kiro-cli to complete login or setup.",
19
+ "zh-CN": "安装后运行 kiro-cli,完成登录或配置。"
20
+ }
21
+ },
6
22
  "links": {
23
+ "website": "https://kiro.dev/",
7
24
  "installation": "https://kiro.dev/docs/cli/"
8
25
  },
9
26
  "adapterApiVersion": 1,
10
27
  "entry": "plugin.mjs",
11
- "icon": "./assets/icon.svg"
28
+ "icon": "./assets/kiro-agent.svg"
12
29
  }
@@ -4987,8 +4987,8 @@ function az_default() {
4987
4987
  }
4988
4988
 
4989
4989
  // ../../../node_modules/zod/v4/locales/be.js
4990
- function getBelarusianPlural(count, one, few, many) {
4991
- const absCount = Math.abs(count);
4990
+ function getBelarusianPlural(count2, one, few, many) {
4991
+ const absCount = Math.abs(count2);
4992
4992
  const lastDigit = absCount % 10;
4993
4993
  const lastTwoDigits = absCount % 100;
4994
4994
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -7066,8 +7066,8 @@ function hu_default() {
7066
7066
  }
7067
7067
 
7068
7068
  // ../../../node_modules/zod/v4/locales/hy.js
7069
- function getArmenianPlural(count, one, many) {
7070
- return Math.abs(count) === 1 ? one : many;
7069
+ function getArmenianPlural(count2, one, many) {
7070
+ return Math.abs(count2) === 1 ? one : many;
7071
7071
  }
7072
7072
  function withDefiniteArticle(word) {
7073
7073
  if (!word)
@@ -9195,8 +9195,8 @@ function ro_default() {
9195
9195
  }
9196
9196
 
9197
9197
  // ../../../node_modules/zod/v4/locales/ru.js
9198
- function getRussianPlural(count, one, few, many) {
9199
- const absCount = Math.abs(count);
9198
+ function getRussianPlural(count2, one, few, many) {
9199
+ const absCount = Math.abs(count2);
9200
9200
  const lastDigit = absCount % 10;
9201
9201
  const lastTwoDigits = absCount % 100;
9202
9202
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -14865,6 +14865,15 @@ function date4(params) {
14865
14865
  // ../../../node_modules/zod/v4/classic/external.js
14866
14866
  config(en_default());
14867
14867
 
14868
+ // ../../shared-contracts/dist/delegation-read.js
14869
+ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
14870
+ var delegationReadParamsSchema = external_exports.strictObject({
14871
+ threadId: external_exports.string().min(1).max(1024),
14872
+ view: external_exports.enum(["result", "messages"]),
14873
+ cursor: external_exports.string().min(1).max(8192).optional(),
14874
+ limit: external_exports.number().int().min(1).max(100).optional()
14875
+ });
14876
+
14868
14877
  // ../../shared-contracts/dist/credential-imports.js
14869
14878
  var credentialSourceSchema = external_exports.object({
14870
14879
  id: external_exports.string().min(1).max(256),
@@ -14935,6 +14944,153 @@ var harnessDisplaySetSchema = external_exports.strictObject({
14935
14944
  initializeOnly: external_exports.boolean().optional()
14936
14945
  });
14937
14946
 
14947
+ // ../../shared-contracts/dist/model-price-overrides.js
14948
+ var usdPerMillionTokens = external_exports.number().finite().nonnegative();
14949
+ var modelPriceOverrideSchema = external_exports.strictObject({
14950
+ input: usdPerMillionTokens,
14951
+ output: usdPerMillionTokens,
14952
+ cacheRead: usdPerMillionTokens.optional(),
14953
+ cacheWrite: usdPerMillionTokens.optional(),
14954
+ cacheWrite1h: usdPerMillionTokens.optional()
14955
+ });
14956
+ var modelPriceKeySchema = external_exports.string().max(512).refine((key) => key.trim() === key && key.length > 0, "Model ID is required");
14957
+ var modelPriceOverridesSchema = external_exports.strictObject({
14958
+ /** Absolute path of the Host's `pricing.json`. */
14959
+ path: external_exports.string(),
14960
+ entries: external_exports.array(external_exports.strictObject({ key: external_exports.string(), price: modelPriceOverrideSchema })),
14961
+ /** Why the existing file is unusable; the Host then ignores it and refuses to overwrite it. */
14962
+ error: external_exports.string().nullable()
14963
+ });
14964
+ var modelPriceOverridesGetSchema = external_exports.strictObject({});
14965
+ var modelPriceOverridesSetSchema = external_exports.strictObject({
14966
+ key: modelPriceKeySchema,
14967
+ price: modelPriceOverrideSchema.nullable(),
14968
+ previousKey: modelPriceKeySchema.optional()
14969
+ });
14970
+ var modelPriceDefaultParamsSchema = external_exports.strictObject({
14971
+ model: modelPriceKeySchema
14972
+ });
14973
+ var modelPriceSuggestionSchema = external_exports.strictObject({
14974
+ /** Verified from catalog canonical links, not inferred from names or equal prices. */
14975
+ official: external_exports.boolean().optional(),
14976
+ canonicalModelId: external_exports.string().min(1).optional(),
14977
+ provider: external_exports.string().min(1).max(512),
14978
+ model: external_exports.string().min(1).max(512),
14979
+ price: modelPriceOverrideSchema
14980
+ });
14981
+ var modelPriceDefaultResultSchema = external_exports.strictObject({
14982
+ price: modelPriceOverrideSchema.nullable(),
14983
+ /** Local catalog suggestions only; never used automatically for pricing. */
14984
+ suggestions: external_exports.array(modelPriceSuggestionSchema).max(6).optional()
14985
+ });
14986
+
14987
+ // ../../shared-contracts/dist/usage-statistics.js
14988
+ var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
14989
+ var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
14990
+ var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
14991
+ var harness = external_exports.string().min(1).max(128);
14992
+ var model = external_exports.string().min(1).max(512);
14993
+ var project = external_exports.string().min(1).max(4096);
14994
+ var usageStatisticsParamsSchema = external_exports.strictObject({
14995
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
14996
+ harness: harness.optional(),
14997
+ model: model.nullable().optional(),
14998
+ project: project.nullable().optional(),
14999
+ /** One local date inside the range. */
15000
+ date: localDate.optional()
15001
+ });
15002
+ var usageStatisticsTotalsSchema = external_exports.strictObject({
15003
+ requests: count,
15004
+ inputTokens: count,
15005
+ cachedInputTokens: count,
15006
+ cacheWriteInputTokens: count,
15007
+ cacheKnownInputTokens: count,
15008
+ outputTokens: count,
15009
+ reasoningOutputTokens: count,
15010
+ /** USD at the public price, summed over the priced requests only. */
15011
+ costUsd: external_exports.number().finite().min(0),
15012
+ /** Requests without a price (or the cache data the price needs); not in `costUsd`. */
15013
+ unpricedRequests: count,
15014
+ /**
15015
+ * Requests whose storage gave no token counts: counted as requests, with neither tokens nor
15016
+ * cost, and not as unpriced.
15017
+ */
15018
+ unmeteredRequests: count
15019
+ });
15020
+ var totals = usageStatisticsTotalsSchema.shape;
15021
+ var usageStatisticsSessionSchema = external_exports.strictObject({
15022
+ harness,
15023
+ sessionId: external_exports.string().min(1).max(512),
15024
+ project: project.nullable(),
15025
+ /** Models the session used, most requests first. */
15026
+ models: external_exports.array(model).max(16),
15027
+ firstAtMs: count,
15028
+ lastAtMs: count,
15029
+ ...totals
15030
+ });
15031
+ var usageStatisticsResultSchema = external_exports.strictObject({
15032
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
15033
+ /** First local date of the range; null for all time. */
15034
+ from: localDate.nullable(),
15035
+ to: localDate,
15036
+ /** The filters these figures apply, echoed so a late answer to older filters is recognised. */
15037
+ filters: external_exports.strictObject({
15038
+ harness: harness.nullable(),
15039
+ model: model.nullable(),
15040
+ unknownModel: external_exports.boolean(),
15041
+ project: project.nullable(),
15042
+ unknownProject: external_exports.boolean(),
15043
+ date: localDate.nullable()
15044
+ }),
15045
+ /** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
15046
+ reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
15047
+ /** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
15048
+ failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
15049
+ /** Every value seen in the range, ignoring the filters, to choose filters from. */
15050
+ options: external_exports.strictObject({
15051
+ harnesses: external_exports.array(harness).max(256),
15052
+ models: external_exports.array(model.nullable()).max(4096),
15053
+ projects: external_exports.array(project.nullable()).max(4096)
15054
+ }),
15055
+ /** Current display metadata, scoped by Harness. Never a pricing or filter identity.
15056
+ * Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
15057
+ */
15058
+ modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
15059
+ /** Native credits, all filters applied, never combined across Harnesses or treated as USD.
15060
+ * Only groups with at least one reported value appear; reportedRequests exposes partial data.
15061
+ */
15062
+ credits: external_exports.array(external_exports.strictObject({
15063
+ harness,
15064
+ model: model.nullable(),
15065
+ credits: external_exports.number().finite().min(0),
15066
+ reportedRequests: count,
15067
+ requests: count
15068
+ })).max(4096).optional(),
15069
+ /** All filters applied. */
15070
+ totals: usageStatisticsTotalsSchema,
15071
+ /** Each date and Harness of the range: every filter except the day. */
15072
+ daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
15073
+ /** Local weekday (0 = Sunday) and hour, all filters applied. */
15074
+ hourly: external_exports.array(external_exports.strictObject({
15075
+ weekday: external_exports.number().int().min(0).max(6),
15076
+ hour: external_exports.number().int().min(0).max(23),
15077
+ ...totals
15078
+ })).max(168),
15079
+ byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
15080
+ byModel: external_exports.array(external_exports.strictObject({
15081
+ model: model.nullable(),
15082
+ ...totals,
15083
+ /** Requests priced by what the Harness recorded they cost, not by a price list. */
15084
+ harnessPricedRequests: count
15085
+ })).max(4096),
15086
+ byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
15087
+ /**
15088
+ * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
15089
+ * requests without a native session are not listed here but count everywhere else.
15090
+ */
15091
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
15092
+ });
15093
+
14938
15094
  // ../../shared-contracts/dist/ids.js
14939
15095
  var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
14940
15096
  message: "Identifier must not be empty or whitespace"
@@ -14982,6 +15138,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
14982
15138
  "codexhost/account/list",
14983
15139
  "codexhost/account/refresh",
14984
15140
  "codexhost/account/usage/inspect",
15141
+ "codexhost/usage/model-prices/get",
15142
+ "codexhost/usage/model-prices/set",
15143
+ "codexhost/usage/model-prices/default",
15144
+ "codexhost/usage/statistics/get",
14985
15145
  "codexhost/update/check",
14986
15146
  "codexhost/update/start",
14987
15147
  "codexhost/update/status"
@@ -15046,6 +15206,7 @@ var threadUsageSnapshotSchema = external_exports.object({
15046
15206
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
15047
15207
  outputTokens: nonNegativeSafeIntegerSchema.optional(),
15048
15208
  outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15209
+ apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15049
15210
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
15050
15211
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
15051
15212
  totalCostUsd: finiteNonNegativeNumberSchema.optional(),
@@ -15057,7 +15218,11 @@ var threadUsageSnapshotSchema = external_exports.object({
15057
15218
  planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
15058
15219
  planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15059
15220
  planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
15060
- planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
15221
+ planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15222
+ sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
15223
+ timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
15224
+ costSource: external_exports.enum(["publicPrice", "native"]).optional(),
15225
+ unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
15061
15226
  }).strict().superRefine((usage, context) => {
15062
15227
  if (Object.keys(usage).length === 0) {
15063
15228
  context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
@@ -15078,6 +15243,20 @@ var threadUsageSnapshotSchema = external_exports.object({
15078
15243
  path: ["contextWindowTokens"]
15079
15244
  });
15080
15245
  }
15246
+ if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
15247
+ context.addIssue({
15248
+ code: "custom",
15249
+ message: "Thread Usage costSource must be provided with totalCostUsd",
15250
+ path: ["costSource"]
15251
+ });
15252
+ }
15253
+ if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
15254
+ context.addIssue({
15255
+ code: "custom",
15256
+ message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
15257
+ path: ["unpricedModels"]
15258
+ });
15259
+ }
15081
15260
  if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
15082
15261
  context.addIssue({
15083
15262
  code: "custom",
@@ -15332,27 +15511,27 @@ var harnessModelCatalogSchema = external_exports.object({
15332
15511
  }).strict().superRefine((catalog, context) => {
15333
15512
  const refs = /* @__PURE__ */ new Set();
15334
15513
  const thinkingIds = new Set(catalog.thinkingOptions.map(({ id }) => id));
15335
- for (const [index, model] of catalog.models.entries()) {
15336
- if (refs.has(model.ref.id)) {
15514
+ for (const [index, model2] of catalog.models.entries()) {
15515
+ if (refs.has(model2.ref.id)) {
15337
15516
  context.addIssue({
15338
15517
  code: "custom",
15339
15518
  message: "Model Catalog refs must be unique",
15340
15519
  path: ["models", index, "ref", "id"]
15341
15520
  });
15342
15521
  }
15343
- refs.add(model.ref.id);
15344
- if (model.fastModel) {
15345
- if (refs.has(model.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model.fastModel?.id)) {
15522
+ refs.add(model2.ref.id);
15523
+ if (model2.fastModel) {
15524
+ if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
15346
15525
  context.addIssue({
15347
15526
  code: "custom",
15348
15527
  message: "Fast Model refs must be distinct and unique",
15349
15528
  path: ["models", index, "fastModel"]
15350
15529
  });
15351
15530
  }
15352
- refs.add(model.fastModel.id);
15531
+ refs.add(model2.fastModel.id);
15353
15532
  }
15354
15533
  const supportedThinkingIds = /* @__PURE__ */ new Set();
15355
- for (const [optionIndex, optionId] of (model.supportedThinkingOptionIds ?? []).entries()) {
15534
+ for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
15356
15535
  if (supportedThinkingIds.has(optionId)) {
15357
15536
  context.addIssue({
15358
15537
  code: "custom",
@@ -15546,13 +15725,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
15546
15725
  var harnessPluginIdSchema = external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/u).refine((id) => id !== "codex", "The official Codex identity is reserved").pipe(harnessIdSchema);
15547
15726
  var relativeResourceSchema = external_exports.string().min(1).max(512).refine((value) => !/[\\\u0000:#?]/u.test(value) && !value.startsWith("/") && !value.split("/").some((part) => part === ".." || part === ""), "Plugin resources must be relative paths inside the plugin");
15548
15727
  var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
15728
+ var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
15729
+ var harnessInstallationGuideSchema = external_exports.object({
15730
+ commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
15731
+ before: localizedTextSchema.optional(),
15732
+ after: localizedTextSchema.optional(),
15733
+ downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
15734
+ }).strict();
15549
15735
  var pluginPresentationShape = {
15550
15736
  id: harnessPluginIdSchema,
15551
15737
  name: external_exports.string().trim().min(1).max(128),
15552
15738
  version: external_exports.string().min(1).max(128),
15739
+ /** Capability-only plugin; omitted for existing session-capable plugins. */
15740
+ kind: external_exports.literal("usage").optional(),
15741
+ /** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
15742
+ iconStyle: external_exports.object({
15743
+ vector: external_exports.object({
15744
+ viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
15745
+ color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
15746
+ paths: external_exports.array(external_exports.object({
15747
+ d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
15748
+ fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
15749
+ fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
15750
+ }).strict()).min(1).max(32)
15751
+ }).strict().optional(),
15752
+ background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
15753
+ borderRadius: external_exports.number().min(0).max(50).optional(),
15754
+ paddingRatio: external_exports.number().min(0).max(0.25).optional()
15755
+ }).strict().optional(),
15756
+ installation: harnessInstallationGuideSchema.optional(),
15757
+ notice: localizedTextSchema.optional(),
15553
15758
  /** The factory accepts a persisted local entrypoint through its construction context. */
15554
15759
  launchCommand: external_exports.literal(true).optional(),
15555
15760
  links: external_exports.object({
15761
+ website: documentationUrlSchema.optional(),
15556
15762
  documentation: documentationUrlSchema.optional(),
15557
15763
  installation: documentationUrlSchema.optional()
15558
15764
  }).strict().optional()
@@ -15971,6 +16177,11 @@ var codexSshDraftSchema = external_exports.strictObject({
15971
16177
  });
15972
16178
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
15973
16179
  external_exports.strictObject({ action: external_exports.literal("list") }),
16180
+ external_exports.strictObject({
16181
+ action: external_exports.literal("read-thread"),
16182
+ hostId: hostId.refine((id) => id !== "local"),
16183
+ input: delegationReadParamsSchema
16184
+ }),
15974
16185
  external_exports.strictObject({
15975
16186
  action: external_exports.literal("save"),
15976
16187
  draft: codexSshDraftSchema,
@@ -16102,7 +16313,6 @@ var tokenFields = [
16102
16313
  "cachedInputTokens",
16103
16314
  "cacheWriteInputTokens",
16104
16315
  "outputTokens",
16105
- "outputTokensPerSecond",
16106
16316
  "reasoningOutputTokens",
16107
16317
  "totalTokens",
16108
16318
  "contextWindowTokens",
@@ -16110,10 +16320,12 @@ var tokenFields = [
16110
16320
  ];
16111
16321
  var safeIntegerFields = [
16112
16322
  "planFiveHourResetsAtUnix",
16113
- "planSevenDayResetsAtUnix"
16323
+ "planSevenDayResetsAtUnix",
16324
+ "timeToFirstOutputMs"
16114
16325
  ];
16115
16326
  var percentFields = [
16116
16327
  "cacheHitRatePercent",
16328
+ "sessionCacheHitRatePercent",
16117
16329
  "planFiveHourUsedPercent",
16118
16330
  "planSevenDayUsedPercent"
16119
16331
  ];
@@ -16121,9 +16333,14 @@ var usageFields = /* @__PURE__ */ new Set([
16121
16333
  ...tokenFields,
16122
16334
  ...safeIntegerFields,
16123
16335
  ...percentFields,
16336
+ "sessionCacheUsage",
16124
16337
  "totalCostUsd",
16125
16338
  "totalCredits",
16126
- "contextUsagePercent"
16339
+ "contextUsagePercent",
16340
+ "outputTokensPerSecond",
16341
+ "apiOutputTokensPerSecond",
16342
+ "costSource",
16343
+ "unpricedModels"
16127
16344
  ]);
16128
16345
  function isRecord(value) {
16129
16346
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -16139,7 +16356,11 @@ function parseHostUsage(value) {
16139
16356
  throw new Error(`Harness Usage contains unknown field '${key}'`);
16140
16357
  }
16141
16358
  }
16142
- for (const field of ["totalCredits", "contextUsagePercent"]) {
16359
+ for (const field of [
16360
+ "totalCredits",
16361
+ "contextUsagePercent",
16362
+ "apiOutputTokensPerSecond"
16363
+ ]) {
16143
16364
  const candidate = value[field];
16144
16365
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
16145
16366
  throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
@@ -16169,6 +16390,12 @@ function parseHostUsage(value) {
16169
16390
  throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
16170
16391
  }
16171
16392
  }
16393
+ if (value.sessionCacheUsage !== void 0) {
16394
+ const totals2 = value.sessionCacheUsage;
16395
+ if (!isRecord(totals2) || Object.keys(totals2).some((key) => key !== "inputTokens" && key !== "cachedInputTokens") || typeof totals2.inputTokens !== "number" || !Number.isSafeInteger(totals2.inputTokens) || totals2.inputTokens < 0 || typeof totals2.cachedInputTokens !== "number" || !Number.isSafeInteger(totals2.cachedInputTokens) || totals2.cachedInputTokens < 0 || totals2.cachedInputTokens > totals2.inputTokens) {
16396
+ throw new Error("Harness Usage 'sessionCacheUsage' must contain complete bounded token totals");
16397
+ }
16398
+ }
16172
16399
  const hasContextUsed = value.contextUsedTokens !== void 0;
16173
16400
  const hasContextWindow = value.contextWindowTokens !== void 0;
16174
16401
  if (hasContextUsed !== hasContextWindow) {
@@ -16183,8 +16410,43 @@ function parseHostUsage(value) {
16183
16410
  if (value.planSevenDayResetsAtUnix !== void 0 && value.planSevenDayUsedPercent === void 0) {
16184
16411
  throw new Error("Harness Usage 'planSevenDayResetsAtUnix' must be provided with 'planSevenDayUsedPercent'");
16185
16412
  }
16413
+ if (value.costSource !== void 0) {
16414
+ if (value.costSource !== "publicPrice" && value.costSource !== "native") {
16415
+ throw new Error("Harness Usage 'costSource' must be 'publicPrice' or 'native'");
16416
+ }
16417
+ if (value.totalCostUsd === void 0) {
16418
+ throw new Error("Harness Usage 'costSource' must be provided with 'totalCostUsd'");
16419
+ }
16420
+ }
16421
+ if (value.unpricedModels !== void 0) {
16422
+ const models = value.unpricedModels;
16423
+ if (!Array.isArray(models) || models.length === 0 || !models.every((model2) => typeof model2 === "string" && model2.length > 0)) {
16424
+ throw new Error("Harness Usage 'unpricedModels' must be a non-empty list of Model IDs");
16425
+ }
16426
+ if (value.costSource !== "publicPrice") {
16427
+ throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
16428
+ }
16429
+ return { ...value, unpricedModels: [...models] };
16430
+ }
16186
16431
  return { ...value };
16187
16432
  }
16433
+ var requestTokenFields = [
16434
+ "inputTokens",
16435
+ "cachedInputTokens",
16436
+ "cacheWriteInputTokens",
16437
+ "cacheWrite1hInputTokens",
16438
+ "outputTokens",
16439
+ "reasoningOutputTokens",
16440
+ "startedAtMs",
16441
+ "completedAtMs"
16442
+ ];
16443
+ var requestFields = /* @__PURE__ */ new Set([
16444
+ ...requestTokenFields,
16445
+ "requestId",
16446
+ "historical",
16447
+ "model",
16448
+ "provider"
16449
+ ]);
16188
16450
 
16189
16451
  // ../../harness-adapter/dist/live-command-catalog.js
16190
16452
  var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
@@ -18595,9 +18857,9 @@ var Connection = class {
18595
18857
  return;
18596
18858
  }
18597
18859
  const responseBatch = isResponseBatch(batch);
18598
- const responseCount = responseBatch ? 0 : batch.reduce((count, message) => count + (isNotificationMessage(message) ? 0 : 1), 0);
18860
+ const responseCount = responseBatch ? 0 : batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 0 : 1), 0);
18599
18861
  let remaining = responseCount;
18600
- let remainingNotifications = batch.reduce((count, message) => count + (isNotificationMessage(message) ? 1 : 0), 0);
18862
+ let remainingNotifications = batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 1 : 0), 0);
18601
18863
  let responseSent = false;
18602
18864
  const responses = [];
18603
18865
  const sendResponsesIfReady = async () => {
@@ -23961,9 +24223,9 @@ var KiroSession = class {
23961
24223
  #updateConfig(options) {
23962
24224
  if (this.#closed)
23963
24225
  throw new Error("Session closed during configuration");
23964
- const model = kiroConfigValue(options, "model");
24226
+ const model2 = kiroConfigValue(options, "model");
23965
24227
  const autopilot = kiroConfigValue(options, "autopilot");
23966
- this.#currentModel = model ? harnessModelRefSchema.parse({ id: model }) : void 0;
24228
+ this.#currentModel = model2 ? harnessModelRefSchema.parse({ id: model2 }) : void 0;
23967
24229
  this.#currentPermissionModeId = autopilot === "on" || autopilot === "off" ? encodeKiroPermissionMode(autopilot) : void 0;
23968
24230
  this.#modelCatalog = parseKiroModelCatalog(options);
23969
24231
  this.#thinking = kiroThinkingState(options);
@@ -3,8 +3,28 @@
3
3
  "id": "omp",
4
4
  "name": "Oh My Pi",
5
5
  "version": "0.0.0",
6
+ "iconStyle": {
7
+ "borderRadius": 22.37
8
+ },
9
+ "installation": {
10
+ "commands": [
11
+ {
12
+ "terminal": "macOS / Linux · Terminal (sh/bash)",
13
+ "command": "curl -fsSL https://omp.sh/install | sh"
14
+ },
15
+ {
16
+ "terminal": "Windows · PowerShell",
17
+ "command": "irm https://omp.sh/install.ps1 | iex"
18
+ }
19
+ ],
20
+ "after": {
21
+ "en": "After installation, run omp to complete login or setup.",
22
+ "zh-CN": "安装后运行 omp,完成登录或配置。"
23
+ }
24
+ },
6
25
  "links": {
7
- "installation": "https://github.com/can1357/oh-my-pi"
26
+ "website": "https://github.com/can1357/oh-my-pi",
27
+ "installation": "https://github.com/can1357/oh-my-pi#install"
8
28
  },
9
29
  "adapterApiVersion": 1,
10
30
  "entry": "plugin.mjs",