@codexhost/cli-darwin-x64 0.12.2 → 0.13.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.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.txt +9 -1
  3. package/app/codexhost-distribution.json +1 -1
  4. package/app/console-server.mjs +319 -64
  5. package/app/console-web.js +5089 -1367
  6. package/app/desktop-controller.mjs +259 -41
  7. package/app/host-runtime.mjs +5735 -1564
  8. package/app/plugins/antigravity/manifest.json +18 -1
  9. package/app/plugins/antigravity/plugin.mjs +282 -41
  10. package/app/plugins/claude-code/manifest.json +28 -0
  11. package/app/plugins/claude-code/plugin.mjs +35300 -23918
  12. package/app/plugins/codebuddy/manifest.json +17 -0
  13. package/app/plugins/codebuddy/plugin.mjs +5971 -5355
  14. package/app/plugins/codex-usage/manifest.json +9 -0
  15. package/app/plugins/codex-usage/plugin.mjs +17324 -0
  16. package/app/plugins/cursor-cli/manifest.json +17 -0
  17. package/app/plugins/cursor-cli/plugin.mjs +357 -76
  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 +822 -241
  21. package/app/plugins/enabled.json +2 -1
  22. package/app/plugins/grok/manifest.json +21 -1
  23. package/app/plugins/grok/plugin.mjs +918 -258
  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 +284 -32
  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 +561 -35
  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 +290 -21
  33. package/app/plugins/omp/manifest.json +21 -1
  34. package/app/plugins/omp/plugin.mjs +2765 -1960
  35. package/app/plugins/opencode/manifest.json +18 -1
  36. package/app/plugins/opencode/plugin.mjs +723 -146
  37. package/app/plugins/pi/manifest.json +32 -0
  38. package/app/plugins/pi/plugin.mjs +2908 -2312
  39. package/app/plugins/qoder/manifest.json +18 -1
  40. package/app/plugins/qoder/plugin.mjs +634 -80
  41. package/app/plugins/qoder-cn/manifest.json +18 -1
  42. package/app/plugins/qoder-cn/plugin.mjs +634 -80
  43. package/app/plugins/workbuddy/manifest.json +18 -0
  44. package/app/plugins/workbuddy/plugin.mjs +6361 -5747
  45. package/app/plugins/zcode/manifest.json +19 -1
  46. package/app/plugins/zcode/plugin.mjs +1098 -259
  47. package/app/renderer-extension.js +13080 -8884
  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,160 @@ 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
+ /** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
15026
+ title: external_exports.string().min(1).max(200).optional(),
15027
+ /** Models the session used, most requests first. */
15028
+ models: external_exports.array(model).max(16),
15029
+ firstAtMs: count,
15030
+ lastAtMs: count,
15031
+ ...totals
15032
+ });
15033
+ var usageStatisticsResultSchema = external_exports.strictObject({
15034
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
15035
+ /** First local date of the range; null for all time. */
15036
+ from: localDate.nullable(),
15037
+ to: localDate,
15038
+ /** The filters these figures apply, echoed so a late answer to older filters is recognised. */
15039
+ filters: external_exports.strictObject({
15040
+ harness: harness.nullable(),
15041
+ model: model.nullable(),
15042
+ unknownModel: external_exports.boolean(),
15043
+ project: project.nullable(),
15044
+ unknownProject: external_exports.boolean(),
15045
+ date: localDate.nullable()
15046
+ }),
15047
+ /** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
15048
+ reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
15049
+ /** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
15050
+ failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
15051
+ /** Every value seen in the range, ignoring the filters, to choose filters from. */
15052
+ options: external_exports.strictObject({
15053
+ harnesses: external_exports.array(harness).max(256),
15054
+ models: external_exports.array(model.nullable()).max(4096),
15055
+ projects: external_exports.array(project.nullable()).max(4096)
15056
+ }),
15057
+ /** Current display metadata, scoped by Harness. Never a pricing or filter identity.
15058
+ * Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
15059
+ */
15060
+ modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
15061
+ /** Native credits, all filters applied, never combined across Harnesses or treated as USD.
15062
+ * Only groups with at least one reported value appear; reportedRequests exposes partial data.
15063
+ */
15064
+ credits: external_exports.array(external_exports.strictObject({
15065
+ harness,
15066
+ model: model.nullable(),
15067
+ credits: external_exports.number().finite().min(0),
15068
+ reportedRequests: count,
15069
+ requests: count
15070
+ })).max(4096).optional(),
15071
+ /** All filters applied. */
15072
+ totals: usageStatisticsTotalsSchema,
15073
+ /** Each date and Harness of the range: every filter except the day. */
15074
+ daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
15075
+ /** Local weekday (0 = Sunday) and hour, all filters applied. */
15076
+ hourly: external_exports.array(external_exports.strictObject({
15077
+ weekday: external_exports.number().int().min(0).max(6),
15078
+ hour: external_exports.number().int().min(0).max(23),
15079
+ ...totals
15080
+ })).max(168),
15081
+ byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
15082
+ byModel: external_exports.array(external_exports.strictObject({
15083
+ model: model.nullable(),
15084
+ ...totals,
15085
+ /** Requests priced by what the Harness recorded they cost, not by a price list. */
15086
+ harnessPricedRequests: count
15087
+ })).max(4096),
15088
+ byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
15089
+ /**
15090
+ * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
15091
+ * requests without a native session are not listed here but count everywhere else.
15092
+ */
15093
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
15094
+ /**
15095
+ * The sessions last active in the range, newest first, all filters applied. Optional for older
15096
+ * Hosts; missing is treated as no list rather than no sessions.
15097
+ */
15098
+ recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
15099
+ });
15100
+
14938
15101
  // ../../shared-contracts/dist/ids.js
14939
15102
  var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
14940
15103
  message: "Identifier must not be empty or whitespace"
@@ -14982,6 +15145,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
14982
15145
  "codexhost/account/list",
14983
15146
  "codexhost/account/refresh",
14984
15147
  "codexhost/account/usage/inspect",
15148
+ "codexhost/usage/model-prices/get",
15149
+ "codexhost/usage/model-prices/set",
15150
+ "codexhost/usage/model-prices/default",
15151
+ "codexhost/usage/statistics/get",
14985
15152
  "codexhost/update/check",
14986
15153
  "codexhost/update/start",
14987
15154
  "codexhost/update/status"
@@ -15046,6 +15213,7 @@ var threadUsageSnapshotSchema = external_exports.object({
15046
15213
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
15047
15214
  outputTokens: nonNegativeSafeIntegerSchema.optional(),
15048
15215
  outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15216
+ apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15049
15217
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
15050
15218
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
15051
15219
  totalCostUsd: finiteNonNegativeNumberSchema.optional(),
@@ -15057,7 +15225,11 @@ var threadUsageSnapshotSchema = external_exports.object({
15057
15225
  planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
15058
15226
  planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15059
15227
  planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
15060
- planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
15228
+ planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15229
+ sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
15230
+ timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
15231
+ costSource: external_exports.enum(["publicPrice", "native"]).optional(),
15232
+ unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
15061
15233
  }).strict().superRefine((usage, context) => {
15062
15234
  if (Object.keys(usage).length === 0) {
15063
15235
  context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
@@ -15078,6 +15250,20 @@ var threadUsageSnapshotSchema = external_exports.object({
15078
15250
  path: ["contextWindowTokens"]
15079
15251
  });
15080
15252
  }
15253
+ if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
15254
+ context.addIssue({
15255
+ code: "custom",
15256
+ message: "Thread Usage costSource must be provided with totalCostUsd",
15257
+ path: ["costSource"]
15258
+ });
15259
+ }
15260
+ if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
15261
+ context.addIssue({
15262
+ code: "custom",
15263
+ message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
15264
+ path: ["unpricedModels"]
15265
+ });
15266
+ }
15081
15267
  if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
15082
15268
  context.addIssue({
15083
15269
  code: "custom",
@@ -15332,27 +15518,27 @@ var harnessModelCatalogSchema = external_exports.object({
15332
15518
  }).strict().superRefine((catalog, context) => {
15333
15519
  const refs = /* @__PURE__ */ new Set();
15334
15520
  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)) {
15521
+ for (const [index, model2] of catalog.models.entries()) {
15522
+ if (refs.has(model2.ref.id)) {
15337
15523
  context.addIssue({
15338
15524
  code: "custom",
15339
15525
  message: "Model Catalog refs must be unique",
15340
15526
  path: ["models", index, "ref", "id"]
15341
15527
  });
15342
15528
  }
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)) {
15529
+ refs.add(model2.ref.id);
15530
+ if (model2.fastModel) {
15531
+ if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
15346
15532
  context.addIssue({
15347
15533
  code: "custom",
15348
15534
  message: "Fast Model refs must be distinct and unique",
15349
15535
  path: ["models", index, "fastModel"]
15350
15536
  });
15351
15537
  }
15352
- refs.add(model.fastModel.id);
15538
+ refs.add(model2.fastModel.id);
15353
15539
  }
15354
15540
  const supportedThinkingIds = /* @__PURE__ */ new Set();
15355
- for (const [optionIndex, optionId] of (model.supportedThinkingOptionIds ?? []).entries()) {
15541
+ for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
15356
15542
  if (supportedThinkingIds.has(optionId)) {
15357
15543
  context.addIssue({
15358
15544
  code: "custom",
@@ -15546,13 +15732,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
15546
15732
  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
15733
  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
15734
  var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
15735
+ var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
15736
+ var harnessInstallationGuideSchema = external_exports.object({
15737
+ commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
15738
+ before: localizedTextSchema.optional(),
15739
+ after: localizedTextSchema.optional(),
15740
+ downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
15741
+ }).strict();
15549
15742
  var pluginPresentationShape = {
15550
15743
  id: harnessPluginIdSchema,
15551
15744
  name: external_exports.string().trim().min(1).max(128),
15552
15745
  version: external_exports.string().min(1).max(128),
15746
+ /** Capability-only plugin; omitted for existing session-capable plugins. */
15747
+ kind: external_exports.literal("usage").optional(),
15748
+ /** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
15749
+ iconStyle: external_exports.object({
15750
+ vector: external_exports.object({
15751
+ viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
15752
+ color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
15753
+ paths: external_exports.array(external_exports.object({
15754
+ d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
15755
+ fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
15756
+ fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
15757
+ }).strict()).min(1).max(32)
15758
+ }).strict().optional(),
15759
+ background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
15760
+ borderRadius: external_exports.number().min(0).max(50).optional(),
15761
+ paddingRatio: external_exports.number().min(0).max(0.25).optional()
15762
+ }).strict().optional(),
15763
+ installation: harnessInstallationGuideSchema.optional(),
15764
+ notice: localizedTextSchema.optional(),
15553
15765
  /** The factory accepts a persisted local entrypoint through its construction context. */
15554
15766
  launchCommand: external_exports.literal(true).optional(),
15555
15767
  links: external_exports.object({
15768
+ website: documentationUrlSchema.optional(),
15556
15769
  documentation: documentationUrlSchema.optional(),
15557
15770
  installation: documentationUrlSchema.optional()
15558
15771
  }).strict().optional()
@@ -15971,6 +16184,11 @@ var codexSshDraftSchema = external_exports.strictObject({
15971
16184
  });
15972
16185
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
15973
16186
  external_exports.strictObject({ action: external_exports.literal("list") }),
16187
+ external_exports.strictObject({
16188
+ action: external_exports.literal("read-thread"),
16189
+ hostId: hostId.refine((id) => id !== "local"),
16190
+ input: delegationReadParamsSchema
16191
+ }),
15974
16192
  external_exports.strictObject({
15975
16193
  action: external_exports.literal("save"),
15976
16194
  draft: codexSshDraftSchema,
@@ -16109,10 +16327,12 @@ var tokenFields = [
16109
16327
  ];
16110
16328
  var safeIntegerFields = [
16111
16329
  "planFiveHourResetsAtUnix",
16112
- "planSevenDayResetsAtUnix"
16330
+ "planSevenDayResetsAtUnix",
16331
+ "timeToFirstOutputMs"
16113
16332
  ];
16114
16333
  var percentFields = [
16115
16334
  "cacheHitRatePercent",
16335
+ "sessionCacheHitRatePercent",
16116
16336
  "planFiveHourUsedPercent",
16117
16337
  "planSevenDayUsedPercent"
16118
16338
  ];
@@ -16120,10 +16340,14 @@ var usageFields = /* @__PURE__ */ new Set([
16120
16340
  ...tokenFields,
16121
16341
  ...safeIntegerFields,
16122
16342
  ...percentFields,
16343
+ "sessionCacheUsage",
16123
16344
  "totalCostUsd",
16124
16345
  "totalCredits",
16125
16346
  "contextUsagePercent",
16126
- "outputTokensPerSecond"
16347
+ "outputTokensPerSecond",
16348
+ "apiOutputTokensPerSecond",
16349
+ "costSource",
16350
+ "unpricedModels"
16127
16351
  ]);
16128
16352
  function isRecord(value) {
16129
16353
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -16139,7 +16363,11 @@ function parseHostUsage(value) {
16139
16363
  throw new Error(`Harness Usage contains unknown field '${key}'`);
16140
16364
  }
16141
16365
  }
16142
- for (const field of ["totalCredits", "contextUsagePercent"]) {
16366
+ for (const field of [
16367
+ "totalCredits",
16368
+ "contextUsagePercent",
16369
+ "apiOutputTokensPerSecond"
16370
+ ]) {
16143
16371
  const candidate = value[field];
16144
16372
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
16145
16373
  throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
@@ -16169,6 +16397,12 @@ function parseHostUsage(value) {
16169
16397
  throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
16170
16398
  }
16171
16399
  }
16400
+ if (value.sessionCacheUsage !== void 0) {
16401
+ const totals2 = value.sessionCacheUsage;
16402
+ 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) {
16403
+ throw new Error("Harness Usage 'sessionCacheUsage' must contain complete bounded token totals");
16404
+ }
16405
+ }
16172
16406
  const hasContextUsed = value.contextUsedTokens !== void 0;
16173
16407
  const hasContextWindow = value.contextWindowTokens !== void 0;
16174
16408
  if (hasContextUsed !== hasContextWindow) {
@@ -16183,8 +16417,43 @@ function parseHostUsage(value) {
16183
16417
  if (value.planSevenDayResetsAtUnix !== void 0 && value.planSevenDayUsedPercent === void 0) {
16184
16418
  throw new Error("Harness Usage 'planSevenDayResetsAtUnix' must be provided with 'planSevenDayUsedPercent'");
16185
16419
  }
16420
+ if (value.costSource !== void 0) {
16421
+ if (value.costSource !== "publicPrice" && value.costSource !== "native") {
16422
+ throw new Error("Harness Usage 'costSource' must be 'publicPrice' or 'native'");
16423
+ }
16424
+ if (value.totalCostUsd === void 0) {
16425
+ throw new Error("Harness Usage 'costSource' must be provided with 'totalCostUsd'");
16426
+ }
16427
+ }
16428
+ if (value.unpricedModels !== void 0) {
16429
+ const models = value.unpricedModels;
16430
+ if (!Array.isArray(models) || models.length === 0 || !models.every((model2) => typeof model2 === "string" && model2.length > 0)) {
16431
+ throw new Error("Harness Usage 'unpricedModels' must be a non-empty list of Model IDs");
16432
+ }
16433
+ if (value.costSource !== "publicPrice") {
16434
+ throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
16435
+ }
16436
+ return { ...value, unpricedModels: [...models] };
16437
+ }
16186
16438
  return { ...value };
16187
16439
  }
16440
+ var requestTokenFields = [
16441
+ "inputTokens",
16442
+ "cachedInputTokens",
16443
+ "cacheWriteInputTokens",
16444
+ "cacheWrite1hInputTokens",
16445
+ "outputTokens",
16446
+ "reasoningOutputTokens",
16447
+ "startedAtMs",
16448
+ "completedAtMs"
16449
+ ];
16450
+ var requestFields = /* @__PURE__ */ new Set([
16451
+ ...requestTokenFields,
16452
+ "requestId",
16453
+ "historical",
16454
+ "model",
16455
+ "provider"
16456
+ ]);
16188
16457
 
16189
16458
  // ../../harness-adapter/dist/live-command-catalog.js
16190
16459
  var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
@@ -18595,9 +18864,9 @@ var Connection = class {
18595
18864
  return;
18596
18865
  }
18597
18866
  const responseBatch = isResponseBatch(batch);
18598
- const responseCount = responseBatch ? 0 : batch.reduce((count, message) => count + (isNotificationMessage(message) ? 0 : 1), 0);
18867
+ const responseCount = responseBatch ? 0 : batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 0 : 1), 0);
18599
18868
  let remaining = responseCount;
18600
- let remainingNotifications = batch.reduce((count, message) => count + (isNotificationMessage(message) ? 1 : 0), 0);
18869
+ let remainingNotifications = batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 1 : 0), 0);
18601
18870
  let responseSent = false;
18602
18871
  const responses = [];
18603
18872
  const sendResponsesIfReady = async () => {
@@ -23961,9 +24230,9 @@ var KiroSession = class {
23961
24230
  #updateConfig(options) {
23962
24231
  if (this.#closed)
23963
24232
  throw new Error("Session closed during configuration");
23964
- const model = kiroConfigValue(options, "model");
24233
+ const model2 = kiroConfigValue(options, "model");
23965
24234
  const autopilot = kiroConfigValue(options, "autopilot");
23966
- this.#currentModel = model ? harnessModelRefSchema.parse({ id: model }) : void 0;
24235
+ this.#currentModel = model2 ? harnessModelRefSchema.parse({ id: model2 }) : void 0;
23967
24236
  this.#currentPermissionModeId = autopilot === "on" || autopilot === "off" ? encodeKiroPermissionMode(autopilot) : void 0;
23968
24237
  this.#modelCatalog = parseKiroModelCatalog(options);
23969
24238
  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",