@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
@@ -3,9 +3,37 @@
3
3
  "id": "hermes",
4
4
  "name": "Hermes",
5
5
  "version": "0.1.0",
6
+ "iconStyle": {
7
+ "background": "#d8d8e8",
8
+ "borderRadius": 22.37,
9
+ "paddingRatio": 0.0625
10
+ },
11
+ "installation": {
12
+ "commands": [
13
+ {
14
+ "terminal": "macOS / Linux · Terminal (sh/bash)",
15
+ "command": "curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash"
16
+ },
17
+ {
18
+ "terminal": "Windows · PowerShell",
19
+ "command": "iex (irm https://hermes-agent.nousresearch.com/install.ps1)"
20
+ }
21
+ ],
22
+ "before": {
23
+ "en": "On macOS/Linux, install Git first. Linux also needs curl and xz-utils.",
24
+ "zh-CN": "macOS / Linux 请先安装 Git;Linux 还需要 curl 和 xz-utils。"
25
+ },
26
+ "after": {
27
+ "en": "After installation, run hermes to complete login or setup.",
28
+ "zh-CN": "安装后运行 hermes,完成登录或配置。"
29
+ }
30
+ },
6
31
  "links": {
7
- "documentation": "https://hermes-agent.nousresearch.com/docs"
32
+ "website": "https://hermes-agent.nousresearch.com/",
33
+ "documentation": "https://hermes-agent.nousresearch.com/docs",
34
+ "installation": "https://hermes-agent.nousresearch.com/docs/getting-started/installation"
8
35
  },
9
36
  "adapterApiVersion": 1,
10
- "entry": "plugin.mjs"
37
+ "entry": "plugin.mjs",
38
+ "icon": "./assets/icon.png"
11
39
  }
@@ -5008,8 +5008,8 @@ function az_default() {
5008
5008
  }
5009
5009
 
5010
5010
  // ../../../node_modules/zod/v4/locales/be.js
5011
- function getBelarusianPlural(count, one, few, many) {
5012
- const absCount = Math.abs(count);
5011
+ function getBelarusianPlural(count2, one, few, many) {
5012
+ const absCount = Math.abs(count2);
5013
5013
  const lastDigit = absCount % 10;
5014
5014
  const lastTwoDigits = absCount % 100;
5015
5015
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -7087,8 +7087,8 @@ function hu_default() {
7087
7087
  }
7088
7088
 
7089
7089
  // ../../../node_modules/zod/v4/locales/hy.js
7090
- function getArmenianPlural(count, one, many) {
7091
- return Math.abs(count) === 1 ? one : many;
7090
+ function getArmenianPlural(count2, one, many) {
7091
+ return Math.abs(count2) === 1 ? one : many;
7092
7092
  }
7093
7093
  function withDefiniteArticle(word) {
7094
7094
  if (!word)
@@ -9216,8 +9216,8 @@ function ro_default() {
9216
9216
  }
9217
9217
 
9218
9218
  // ../../../node_modules/zod/v4/locales/ru.js
9219
- function getRussianPlural(count, one, few, many) {
9220
- const absCount = Math.abs(count);
9219
+ function getRussianPlural(count2, one, few, many) {
9220
+ const absCount = Math.abs(count2);
9221
9221
  const lastDigit = absCount % 10;
9222
9222
  const lastTwoDigits = absCount % 100;
9223
9223
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -14886,6 +14886,15 @@ function date4(params) {
14886
14886
  // ../../../node_modules/zod/v4/classic/external.js
14887
14887
  config(en_default());
14888
14888
 
14889
+ // ../../shared-contracts/dist/delegation-read.js
14890
+ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
14891
+ var delegationReadParamsSchema = external_exports.strictObject({
14892
+ threadId: external_exports.string().min(1).max(1024),
14893
+ view: external_exports.enum(["result", "messages"]),
14894
+ cursor: external_exports.string().min(1).max(8192).optional(),
14895
+ limit: external_exports.number().int().min(1).max(100).optional()
14896
+ });
14897
+
14889
14898
  // ../../shared-contracts/dist/credential-imports.js
14890
14899
  var credentialSourceSchema = external_exports.object({
14891
14900
  id: external_exports.string().min(1).max(256),
@@ -14956,6 +14965,160 @@ var harnessDisplaySetSchema = external_exports.strictObject({
14956
14965
  initializeOnly: external_exports.boolean().optional()
14957
14966
  });
14958
14967
 
14968
+ // ../../shared-contracts/dist/model-price-overrides.js
14969
+ var usdPerMillionTokens = external_exports.number().finite().nonnegative();
14970
+ var modelPriceOverrideSchema = external_exports.strictObject({
14971
+ input: usdPerMillionTokens,
14972
+ output: usdPerMillionTokens,
14973
+ cacheRead: usdPerMillionTokens.optional(),
14974
+ cacheWrite: usdPerMillionTokens.optional(),
14975
+ cacheWrite1h: usdPerMillionTokens.optional()
14976
+ });
14977
+ var modelPriceKeySchema = external_exports.string().max(512).refine((key) => key.trim() === key && key.length > 0, "Model ID is required");
14978
+ var modelPriceOverridesSchema = external_exports.strictObject({
14979
+ /** Absolute path of the Host's `pricing.json`. */
14980
+ path: external_exports.string(),
14981
+ entries: external_exports.array(external_exports.strictObject({ key: external_exports.string(), price: modelPriceOverrideSchema })),
14982
+ /** Why the existing file is unusable; the Host then ignores it and refuses to overwrite it. */
14983
+ error: external_exports.string().nullable()
14984
+ });
14985
+ var modelPriceOverridesGetSchema = external_exports.strictObject({});
14986
+ var modelPriceOverridesSetSchema = external_exports.strictObject({
14987
+ key: modelPriceKeySchema,
14988
+ price: modelPriceOverrideSchema.nullable(),
14989
+ previousKey: modelPriceKeySchema.optional()
14990
+ });
14991
+ var modelPriceDefaultParamsSchema = external_exports.strictObject({
14992
+ model: modelPriceKeySchema
14993
+ });
14994
+ var modelPriceSuggestionSchema = external_exports.strictObject({
14995
+ /** Verified from catalog canonical links, not inferred from names or equal prices. */
14996
+ official: external_exports.boolean().optional(),
14997
+ canonicalModelId: external_exports.string().min(1).optional(),
14998
+ provider: external_exports.string().min(1).max(512),
14999
+ model: external_exports.string().min(1).max(512),
15000
+ price: modelPriceOverrideSchema
15001
+ });
15002
+ var modelPriceDefaultResultSchema = external_exports.strictObject({
15003
+ price: modelPriceOverrideSchema.nullable(),
15004
+ /** Local catalog suggestions only; never used automatically for pricing. */
15005
+ suggestions: external_exports.array(modelPriceSuggestionSchema).max(6).optional()
15006
+ });
15007
+
15008
+ // ../../shared-contracts/dist/usage-statistics.js
15009
+ var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
15010
+ var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
15011
+ var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
15012
+ var harness = external_exports.string().min(1).max(128);
15013
+ var model = external_exports.string().min(1).max(512);
15014
+ var project = external_exports.string().min(1).max(4096);
15015
+ var usageStatisticsParamsSchema = external_exports.strictObject({
15016
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
15017
+ harness: harness.optional(),
15018
+ model: model.nullable().optional(),
15019
+ project: project.nullable().optional(),
15020
+ /** One local date inside the range. */
15021
+ date: localDate.optional()
15022
+ });
15023
+ var usageStatisticsTotalsSchema = external_exports.strictObject({
15024
+ requests: count,
15025
+ inputTokens: count,
15026
+ cachedInputTokens: count,
15027
+ cacheWriteInputTokens: count,
15028
+ cacheKnownInputTokens: count,
15029
+ outputTokens: count,
15030
+ reasoningOutputTokens: count,
15031
+ /** USD at the public price, summed over the priced requests only. */
15032
+ costUsd: external_exports.number().finite().min(0),
15033
+ /** Requests without a price (or the cache data the price needs); not in `costUsd`. */
15034
+ unpricedRequests: count,
15035
+ /**
15036
+ * Requests whose storage gave no token counts: counted as requests, with neither tokens nor
15037
+ * cost, and not as unpriced.
15038
+ */
15039
+ unmeteredRequests: count
15040
+ });
15041
+ var totals = usageStatisticsTotalsSchema.shape;
15042
+ var usageStatisticsSessionSchema = external_exports.strictObject({
15043
+ harness,
15044
+ sessionId: external_exports.string().min(1).max(512),
15045
+ project: project.nullable(),
15046
+ /** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
15047
+ title: external_exports.string().min(1).max(200).optional(),
15048
+ /** Models the session used, most requests first. */
15049
+ models: external_exports.array(model).max(16),
15050
+ firstAtMs: count,
15051
+ lastAtMs: count,
15052
+ ...totals
15053
+ });
15054
+ var usageStatisticsResultSchema = external_exports.strictObject({
15055
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
15056
+ /** First local date of the range; null for all time. */
15057
+ from: localDate.nullable(),
15058
+ to: localDate,
15059
+ /** The filters these figures apply, echoed so a late answer to older filters is recognised. */
15060
+ filters: external_exports.strictObject({
15061
+ harness: harness.nullable(),
15062
+ model: model.nullable(),
15063
+ unknownModel: external_exports.boolean(),
15064
+ project: project.nullable(),
15065
+ unknownProject: external_exports.boolean(),
15066
+ date: localDate.nullable()
15067
+ }),
15068
+ /** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
15069
+ reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
15070
+ /** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
15071
+ failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
15072
+ /** Every value seen in the range, ignoring the filters, to choose filters from. */
15073
+ options: external_exports.strictObject({
15074
+ harnesses: external_exports.array(harness).max(256),
15075
+ models: external_exports.array(model.nullable()).max(4096),
15076
+ projects: external_exports.array(project.nullable()).max(4096)
15077
+ }),
15078
+ /** Current display metadata, scoped by Harness. Never a pricing or filter identity.
15079
+ * Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
15080
+ */
15081
+ modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
15082
+ /** Native credits, all filters applied, never combined across Harnesses or treated as USD.
15083
+ * Only groups with at least one reported value appear; reportedRequests exposes partial data.
15084
+ */
15085
+ credits: external_exports.array(external_exports.strictObject({
15086
+ harness,
15087
+ model: model.nullable(),
15088
+ credits: external_exports.number().finite().min(0),
15089
+ reportedRequests: count,
15090
+ requests: count
15091
+ })).max(4096).optional(),
15092
+ /** All filters applied. */
15093
+ totals: usageStatisticsTotalsSchema,
15094
+ /** Each date and Harness of the range: every filter except the day. */
15095
+ daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
15096
+ /** Local weekday (0 = Sunday) and hour, all filters applied. */
15097
+ hourly: external_exports.array(external_exports.strictObject({
15098
+ weekday: external_exports.number().int().min(0).max(6),
15099
+ hour: external_exports.number().int().min(0).max(23),
15100
+ ...totals
15101
+ })).max(168),
15102
+ byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
15103
+ byModel: external_exports.array(external_exports.strictObject({
15104
+ model: model.nullable(),
15105
+ ...totals,
15106
+ /** Requests priced by what the Harness recorded they cost, not by a price list. */
15107
+ harnessPricedRequests: count
15108
+ })).max(4096),
15109
+ byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
15110
+ /**
15111
+ * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
15112
+ * requests without a native session are not listed here but count everywhere else.
15113
+ */
15114
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
15115
+ /**
15116
+ * The sessions last active in the range, newest first, all filters applied. Optional for older
15117
+ * Hosts; missing is treated as no list rather than no sessions.
15118
+ */
15119
+ recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
15120
+ });
15121
+
14959
15122
  // ../../shared-contracts/dist/ids.js
14960
15123
  var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
14961
15124
  message: "Identifier must not be empty or whitespace"
@@ -15003,6 +15166,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
15003
15166
  "codexhost/account/list",
15004
15167
  "codexhost/account/refresh",
15005
15168
  "codexhost/account/usage/inspect",
15169
+ "codexhost/usage/model-prices/get",
15170
+ "codexhost/usage/model-prices/set",
15171
+ "codexhost/usage/model-prices/default",
15172
+ "codexhost/usage/statistics/get",
15006
15173
  "codexhost/update/check",
15007
15174
  "codexhost/update/start",
15008
15175
  "codexhost/update/status"
@@ -15067,6 +15234,7 @@ var threadUsageSnapshotSchema = external_exports.object({
15067
15234
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
15068
15235
  outputTokens: nonNegativeSafeIntegerSchema.optional(),
15069
15236
  outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15237
+ apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15070
15238
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
15071
15239
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
15072
15240
  totalCostUsd: finiteNonNegativeNumberSchema.optional(),
@@ -15078,7 +15246,11 @@ var threadUsageSnapshotSchema = external_exports.object({
15078
15246
  planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
15079
15247
  planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15080
15248
  planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
15081
- planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
15249
+ planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15250
+ sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
15251
+ timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
15252
+ costSource: external_exports.enum(["publicPrice", "native"]).optional(),
15253
+ unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
15082
15254
  }).strict().superRefine((usage, context) => {
15083
15255
  if (Object.keys(usage).length === 0) {
15084
15256
  context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
@@ -15099,6 +15271,20 @@ var threadUsageSnapshotSchema = external_exports.object({
15099
15271
  path: ["contextWindowTokens"]
15100
15272
  });
15101
15273
  }
15274
+ if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
15275
+ context.addIssue({
15276
+ code: "custom",
15277
+ message: "Thread Usage costSource must be provided with totalCostUsd",
15278
+ path: ["costSource"]
15279
+ });
15280
+ }
15281
+ if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
15282
+ context.addIssue({
15283
+ code: "custom",
15284
+ message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
15285
+ path: ["unpricedModels"]
15286
+ });
15287
+ }
15102
15288
  if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
15103
15289
  context.addIssue({
15104
15290
  code: "custom",
@@ -15353,27 +15539,27 @@ var harnessModelCatalogSchema = external_exports.object({
15353
15539
  }).strict().superRefine((catalog, context) => {
15354
15540
  const refs = /* @__PURE__ */ new Set();
15355
15541
  const thinkingIds = new Set(catalog.thinkingOptions.map(({ id }) => id));
15356
- for (const [index, model] of catalog.models.entries()) {
15357
- if (refs.has(model.ref.id)) {
15542
+ for (const [index, model2] of catalog.models.entries()) {
15543
+ if (refs.has(model2.ref.id)) {
15358
15544
  context.addIssue({
15359
15545
  code: "custom",
15360
15546
  message: "Model Catalog refs must be unique",
15361
15547
  path: ["models", index, "ref", "id"]
15362
15548
  });
15363
15549
  }
15364
- refs.add(model.ref.id);
15365
- if (model.fastModel) {
15366
- if (refs.has(model.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model.fastModel?.id)) {
15550
+ refs.add(model2.ref.id);
15551
+ if (model2.fastModel) {
15552
+ if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
15367
15553
  context.addIssue({
15368
15554
  code: "custom",
15369
15555
  message: "Fast Model refs must be distinct and unique",
15370
15556
  path: ["models", index, "fastModel"]
15371
15557
  });
15372
15558
  }
15373
- refs.add(model.fastModel.id);
15559
+ refs.add(model2.fastModel.id);
15374
15560
  }
15375
15561
  const supportedThinkingIds = /* @__PURE__ */ new Set();
15376
- for (const [optionIndex, optionId] of (model.supportedThinkingOptionIds ?? []).entries()) {
15562
+ for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
15377
15563
  if (supportedThinkingIds.has(optionId)) {
15378
15564
  context.addIssue({
15379
15565
  code: "custom",
@@ -15567,13 +15753,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
15567
15753
  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);
15568
15754
  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");
15569
15755
  var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
15756
+ var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
15757
+ var harnessInstallationGuideSchema = external_exports.object({
15758
+ commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
15759
+ before: localizedTextSchema.optional(),
15760
+ after: localizedTextSchema.optional(),
15761
+ downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
15762
+ }).strict();
15570
15763
  var pluginPresentationShape = {
15571
15764
  id: harnessPluginIdSchema,
15572
15765
  name: external_exports.string().trim().min(1).max(128),
15573
15766
  version: external_exports.string().min(1).max(128),
15767
+ /** Capability-only plugin; omitted for existing session-capable plugins. */
15768
+ kind: external_exports.literal("usage").optional(),
15769
+ /** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
15770
+ iconStyle: external_exports.object({
15771
+ vector: external_exports.object({
15772
+ viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
15773
+ color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
15774
+ paths: external_exports.array(external_exports.object({
15775
+ d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
15776
+ fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
15777
+ fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
15778
+ }).strict()).min(1).max(32)
15779
+ }).strict().optional(),
15780
+ background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
15781
+ borderRadius: external_exports.number().min(0).max(50).optional(),
15782
+ paddingRatio: external_exports.number().min(0).max(0.25).optional()
15783
+ }).strict().optional(),
15784
+ installation: harnessInstallationGuideSchema.optional(),
15785
+ notice: localizedTextSchema.optional(),
15574
15786
  /** The factory accepts a persisted local entrypoint through its construction context. */
15575
15787
  launchCommand: external_exports.literal(true).optional(),
15576
15788
  links: external_exports.object({
15789
+ website: documentationUrlSchema.optional(),
15577
15790
  documentation: documentationUrlSchema.optional(),
15578
15791
  installation: documentationUrlSchema.optional()
15579
15792
  }).strict().optional()
@@ -15992,6 +16205,11 @@ var codexSshDraftSchema = external_exports.strictObject({
15992
16205
  });
15993
16206
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
15994
16207
  external_exports.strictObject({ action: external_exports.literal("list") }),
16208
+ external_exports.strictObject({
16209
+ action: external_exports.literal("read-thread"),
16210
+ hostId: hostId.refine((id) => id !== "local"),
16211
+ input: delegationReadParamsSchema
16212
+ }),
15995
16213
  external_exports.strictObject({
15996
16214
  action: external_exports.literal("save"),
15997
16215
  draft: codexSshDraftSchema,
@@ -16130,10 +16348,12 @@ var tokenFields = [
16130
16348
  ];
16131
16349
  var safeIntegerFields = [
16132
16350
  "planFiveHourResetsAtUnix",
16133
- "planSevenDayResetsAtUnix"
16351
+ "planSevenDayResetsAtUnix",
16352
+ "timeToFirstOutputMs"
16134
16353
  ];
16135
16354
  var percentFields = [
16136
16355
  "cacheHitRatePercent",
16356
+ "sessionCacheHitRatePercent",
16137
16357
  "planFiveHourUsedPercent",
16138
16358
  "planSevenDayUsedPercent"
16139
16359
  ];
@@ -16141,10 +16361,31 @@ var usageFields = /* @__PURE__ */ new Set([
16141
16361
  ...tokenFields,
16142
16362
  ...safeIntegerFields,
16143
16363
  ...percentFields,
16364
+ "sessionCacheUsage",
16144
16365
  "totalCostUsd",
16145
16366
  "totalCredits",
16146
16367
  "contextUsagePercent",
16147
- "outputTokensPerSecond"
16368
+ "outputTokensPerSecond",
16369
+ "apiOutputTokensPerSecond",
16370
+ "costSource",
16371
+ "unpricedModels"
16372
+ ]);
16373
+ var requestTokenFields = [
16374
+ "inputTokens",
16375
+ "cachedInputTokens",
16376
+ "cacheWriteInputTokens",
16377
+ "cacheWrite1hInputTokens",
16378
+ "outputTokens",
16379
+ "reasoningOutputTokens",
16380
+ "startedAtMs",
16381
+ "completedAtMs"
16382
+ ];
16383
+ var requestFields = /* @__PURE__ */ new Set([
16384
+ ...requestTokenFields,
16385
+ "requestId",
16386
+ "historical",
16387
+ "model",
16388
+ "provider"
16148
16389
  ]);
16149
16390
 
16150
16391
  // ../../harness-adapter/dist/live-command-catalog.js
@@ -16525,7 +16766,7 @@ function runProbe(pythonExecutable, timeoutMs, environment, arguments_ = ["-I",
16525
16766
  try {
16526
16767
  const payload = stdout.split(/\r?\n/).find((line) => line.startsWith("codexhost_inventory="));
16527
16768
  const parsed2 = JSON.parse(payload ? payload.slice("codexhost_inventory=".length) : stdout.trim());
16528
- const models = (parsed2.models ?? []).filter((model) => typeof model?.modelId === "string" && model.modelId.length > 0);
16769
+ const models = (parsed2.models ?? []).filter((model2) => typeof model2?.modelId === "string" && model2.modelId.length > 0);
16529
16770
  resolve({
16530
16771
  models,
16531
16772
  ...typeof parsed2.configured === "boolean" ? { configured: parsed2.configured } : {},
@@ -16564,14 +16805,14 @@ function catalogModelsFromInventory(inventory) {
16564
16805
  const models = [];
16565
16806
  let defaultModel = null;
16566
16807
  const seen = /* @__PURE__ */ new Set();
16567
- for (const model of inventory.models) {
16568
- if (model.available === false)
16808
+ for (const model2 of inventory.models) {
16809
+ if (model2.available === false)
16569
16810
  continue;
16570
- const nativeModelId = model.modelId;
16811
+ const nativeModelId = model2.modelId;
16571
16812
  const ref = encodeHermesModelRef(nativeModelId);
16572
16813
  if (!ref)
16573
16814
  continue;
16574
- if (inventory.currentModelId && (model.modelId === inventory.currentModelId || nativeModelId === inventory.currentModelId || model.modelIdAliases?.includes(inventory.currentModelId))) {
16815
+ if (inventory.currentModelId && (model2.modelId === inventory.currentModelId || nativeModelId === inventory.currentModelId || model2.modelIdAliases?.includes(inventory.currentModelId))) {
16575
16816
  if (defaultModel && defaultModel.id !== ref.id) {
16576
16817
  throw new HermesInventoryError("Hermes configured Model matches multiple Provider routes");
16577
16818
  }
@@ -16582,8 +16823,8 @@ function catalogModelsFromInventory(inventory) {
16582
16823
  seen.add(ref.id);
16583
16824
  models.push({
16584
16825
  ref,
16585
- label: `${model.provider} / ${model.label}`,
16586
- description: `Provider: ${model.provider}`
16826
+ label: `${model2.provider} / ${model2.label}`,
16827
+ description: `Provider: ${model2.provider}`
16587
16828
  });
16588
16829
  }
16589
16830
  if (inventory.currentModelId && models.length > 0 && !defaultModel) {
@@ -16625,7 +16866,18 @@ ${HERMES_DELEGATION_GUIDANCE}
16625
16866
  },
16626
16867
  // Reserve RPC stdout before native plugin imports. The registration is
16627
16868
  // process-local; no plugin is installed and no user config is changed.
16628
- bootstrap: `from tui_gateway import server
16869
+ //
16870
+ // ``hermes_bootstrap`` must run before ``tui_gateway.server`` is imported:
16871
+ // the gateway spawn uses ``python -I``, so PYTHONPATH and the launcher's
16872
+ // activation are stripped. Hermes's own entry point (``tui_gateway/entry.py``)
16873
+ // imports this module first to put the selected dependency environment on
16874
+ // ``sys.path``; skipping it makes bare third-party imports (e.g.
16875
+ // ``hermes_yaml`` -> ``ruamel``) fail on interpreters whose site-packages
16876
+ // do not already carry Hermes's dependencies. ``hermes_bootstrap`` is
16877
+ // import-safe here for the same reason entry.py relies on it: stdlib-only
16878
+ // at import time, so nothing can shadow it from the launch directory.
16879
+ bootstrap: `import hermes_bootstrap
16880
+ from tui_gateway import server
16629
16881
  from pathlib import Path
16630
16882
  from hermes_cli.plugins import PluginContext, PluginManifest, get_plugin_manager
16631
16883
  PluginContext(PluginManifest(name="codexhost-runtime"), get_plugin_manager()).register_skill(
@@ -17869,9 +18121,9 @@ var HermesGatewaySessionTransport = class {
17869
18121
  session_id: this.sessionId
17870
18122
  });
17871
18123
  const currentThinkingOptionId = gatewayString(reasoning.value);
17872
- const model = gatewayString(this.#info.model);
18124
+ const model2 = gatewayString(this.#info.model);
17873
18125
  const provider = gatewayString(this.#info.provider);
17874
- const currentModelId = provider ? `${provider}:${model}` : model;
18126
+ const currentModelId = provider ? `${provider}:${model2}` : model2;
17875
18127
  return {
17876
18128
  sessionId: this.nativeSessionId,
17877
18129
  session: {
@@ -17879,7 +18131,7 @@ var HermesGatewaySessionTransport = class {
17879
18131
  models: currentModelId ? {
17880
18132
  currentModelId,
17881
18133
  availableModels: [
17882
- { modelId: currentModelId, name: provider ? `${provider} / ${model}` : model }
18134
+ { modelId: currentModelId, name: provider ? `${provider} / ${model2}` : model2 }
17883
18135
  ]
17884
18136
  } : null,
17885
18137
  modes: {
@@ -19611,8 +19863,8 @@ async function openGatewaySession(input, transport, onSettle, inheritedPermissio
19611
19863
  throw new HermesGatewayHistoryError("unsupported", "Hermes gateway supports only native approval policy and session YOLO");
19612
19864
  if (input.kind === "create" && input.executionPolicy === "unattended-full-access" && mode && mode !== "dont_ask")
19613
19865
  throw new HermesGatewayHistoryError("invalidRequest", "unattended-full-access requires dont_ask");
19614
- const model = input.kind !== "fork" && input.model ? decodeHermesModelRefId(input.model.id) : null;
19615
- if (input.kind !== "fork" && input.model && !model)
19866
+ const model2 = input.kind !== "fork" && input.model ? decodeHermesModelRefId(input.model.id) : null;
19867
+ if (input.kind !== "fork" && input.model && !model2)
19616
19868
  throw new HermesGatewayHistoryError("invalidRequest", "Model Ref does not belong to Hermes");
19617
19869
  if (source && gatewayRecord(source.locator).cwd && !await sameDirectory(String(gatewayRecord(source?.locator).cwd), input.cwd))
19618
19870
  throw new HermesGatewayHistoryError("unsupported", "Hermes gateway preserves the native Session working directory");
@@ -19630,7 +19882,7 @@ async function openGatewaySession(input, transport, onSettle, inheritedPermissio
19630
19882
  });
19631
19883
  nativeRef = await sourceHistory.derive(input.kind === "fork" ? { checkpoint: input.checkpoint } : { rollbackLastTurn: true });
19632
19884
  }
19633
- const choice = model ? await resolveGatewayModel(transport, model) : null;
19885
+ const choice = model2 ? await resolveGatewayModel(transport, model2) : null;
19634
19886
  const response = await transport.request(nativeRef ? "session.resume" : "session.create", nativeRef ? { session_id: nativeRef.nativeSessionId, eager_build: true, omit_messages: true } : {
19635
19887
  cwd: input.cwd,
19636
19888
  close_on_disconnect: true,
@@ -19658,8 +19910,8 @@ async function openGatewaySession(input, transport, onSettle, inheritedPermissio
19658
19910
  const physicalId = await bridge.history.resolvePhysicalSessionId();
19659
19911
  if (gatewayString(info.stored_session_id) !== physicalId)
19660
19912
  throw new Error("Hermes live Session and persisted history identities differ");
19661
- if (model)
19662
- await bridge.setModel(model);
19913
+ if (model2)
19914
+ await bridge.setModel(model2);
19663
19915
  if (input.kind !== "fork" && input.thinkingOptionId)
19664
19916
  await bridge.setThinking(input.thinkingOptionId);
19665
19917
  const desiredMode = input.kind === "create" && input.executionPolicy === "unattended-full-access" ? "dont_ask" : mode;
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
2
+ <rect width="40" height="40" rx="10" fill="#000000"/>
3
+ <path d="M31.6957 7.11414C32.8305 7.11414 33.7505 8.0341 33.7505 9.16893V9.16893C33.7505 10.3038 32.8305 11.2237 31.6957 11.2237L29.8826 11.2237C29.7491 11.2237 29.6409 11.1155 29.6409 10.982L29.6409 9.16893C29.6409 8.0341 30.5609 7.11414 31.6957 7.11414Z" fill="#1783FF"/>
4
+ <path d="M20.1757 19.0798L27.9302 11.3864C28.0761 11.2413 27.9939 10.9498 27.8056 10.9498H23.633C23.5877 10.9498 23.5438 10.9683 23.5084 11.0038L15.1533 19.2911C15.023 19.4192 14.8304 19.305 14.8304 19.0998V11.1951C14.8304 11.0593 14.7411 10.9498 14.6321 10.9498H11.7569C11.6478 10.9498 11.5586 11.0593 11.5586 11.1951V28.2387C11.5586 28.3745 11.6478 28.484 11.7569 28.484H14.6321C14.7411 28.484 14.8304 28.3745 14.8304 28.2387V24.7661C14.8304 24.6921 14.8573 24.6211 14.904 24.5748L17.4945 22.0047C17.5568 21.943 17.6432 21.9337 17.7126 21.98L24.6414 27.0786C25.7759 27.8423 27.0436 28.3112 28.331 28.4501C28.4458 28.4624 28.5449 28.3483 28.5449 28.2048V24.9343C28.5449 24.8093 28.4698 24.7075 28.3693 24.6921C27.6115 24.5733 26.8722 24.2802 26.2037 23.8297L20.2054 19.487C20.0808 19.4037 20.0652 19.1893 20.1757 19.0798Z" fill="#FFFFFF"/>
5
+ </svg>
@@ -3,9 +3,32 @@
3
3
  "id": "kimi-code",
4
4
  "name": "Kimi Code",
5
5
  "version": "0.1.0",
6
+ "installation": {
7
+ "commands": [
8
+ {
9
+ "terminal": "macOS / Linux · Terminal (sh/bash)",
10
+ "command": "curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash"
11
+ },
12
+ {
13
+ "terminal": "Windows · PowerShell",
14
+ "command": "irm https://code.kimi.com/kimi-code/install.ps1 | iex"
15
+ }
16
+ ],
17
+ "before": {
18
+ "en": "On Windows, install Git for Windows first.",
19
+ "zh-CN": "Windows 请先安装 Git for Windows。"
20
+ },
21
+ "after": {
22
+ "en": "After installation, run kimi to complete login or setup.",
23
+ "zh-CN": "安装后运行 kimi,完成登录或配置。"
24
+ }
25
+ },
6
26
  "links": {
7
- "documentation": "https://moonshotai.github.io/kimi-code/en/reference/kimi-acp.html"
27
+ "website": "https://code.kimi.com/",
28
+ "documentation": "https://moonshotai.github.io/kimi-code/en/reference/kimi-acp.html",
29
+ "installation": "https://moonshotai.github.io/kimi-code/en/guides/getting-started.html"
8
30
  },
9
31
  "adapterApiVersion": 1,
10
- "entry": "plugin.mjs"
32
+ "entry": "plugin.mjs",
33
+ "icon": "./assets/icon.svg"
11
34
  }