@codexhost/cli-win32-arm64 0.12.2 → 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 (55) 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 +4924 -935
  6. package/app/desktop-controller.mjs +252 -41
  7. package/app/host-runtime.mjs +5312 -1442
  8. package/app/plugins/antigravity/manifest.json +18 -1
  9. package/app/plugins/antigravity/plugin.mjs +275 -41
  10. package/app/plugins/claude-code/manifest.json +28 -0
  11. package/app/plugins/claude-code/plugin.mjs +1045 -355
  12. package/app/plugins/codebuddy/manifest.json +17 -0
  13. package/app/plugins/codebuddy/plugin.mjs +5930 -5357
  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 +350 -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 +797 -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 +883 -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 +277 -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 +554 -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 +283 -21
  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 +693 -146
  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 +584 -80
  41. package/app/plugins/qoder-cn/manifest.json +18 -1
  42. package/app/plugins/qoder-cn/plugin.mjs +584 -80
  43. package/app/plugins/workbuddy/manifest.json +18 -0
  44. package/app/plugins/workbuddy/plugin.mjs +6316 -5745
  45. package/app/plugins/zcode/manifest.json +19 -1
  46. package/app/plugins/zcode/plugin.mjs +1065 -259
  47. package/app/renderer-extension.js +1485 -1570
  48. package/bin/codexhost.exe +0 -0
  49. package/libexec/codexhost-node-repl.exe +0 -0
  50. package/libexec/codexhost-shim.exe +0 -0
  51. package/libexec/codexhost-updater.exe +0 -0
  52. package/licenses/Cordis-LICENSE.txt +21 -0
  53. package/licenses/Cosmokit-LICENSE.txt +21 -0
  54. package/package.json +1 -1
  55. 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,153 @@ 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
+ /** Models the session used, most requests first. */
15047
+ models: external_exports.array(model).max(16),
15048
+ firstAtMs: count,
15049
+ lastAtMs: count,
15050
+ ...totals
15051
+ });
15052
+ var usageStatisticsResultSchema = external_exports.strictObject({
15053
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
15054
+ /** First local date of the range; null for all time. */
15055
+ from: localDate.nullable(),
15056
+ to: localDate,
15057
+ /** The filters these figures apply, echoed so a late answer to older filters is recognised. */
15058
+ filters: external_exports.strictObject({
15059
+ harness: harness.nullable(),
15060
+ model: model.nullable(),
15061
+ unknownModel: external_exports.boolean(),
15062
+ project: project.nullable(),
15063
+ unknownProject: external_exports.boolean(),
15064
+ date: localDate.nullable()
15065
+ }),
15066
+ /** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
15067
+ reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
15068
+ /** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
15069
+ failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
15070
+ /** Every value seen in the range, ignoring the filters, to choose filters from. */
15071
+ options: external_exports.strictObject({
15072
+ harnesses: external_exports.array(harness).max(256),
15073
+ models: external_exports.array(model.nullable()).max(4096),
15074
+ projects: external_exports.array(project.nullable()).max(4096)
15075
+ }),
15076
+ /** Current display metadata, scoped by Harness. Never a pricing or filter identity.
15077
+ * Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
15078
+ */
15079
+ modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
15080
+ /** Native credits, all filters applied, never combined across Harnesses or treated as USD.
15081
+ * Only groups with at least one reported value appear; reportedRequests exposes partial data.
15082
+ */
15083
+ credits: external_exports.array(external_exports.strictObject({
15084
+ harness,
15085
+ model: model.nullable(),
15086
+ credits: external_exports.number().finite().min(0),
15087
+ reportedRequests: count,
15088
+ requests: count
15089
+ })).max(4096).optional(),
15090
+ /** All filters applied. */
15091
+ totals: usageStatisticsTotalsSchema,
15092
+ /** Each date and Harness of the range: every filter except the day. */
15093
+ daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
15094
+ /** Local weekday (0 = Sunday) and hour, all filters applied. */
15095
+ hourly: external_exports.array(external_exports.strictObject({
15096
+ weekday: external_exports.number().int().min(0).max(6),
15097
+ hour: external_exports.number().int().min(0).max(23),
15098
+ ...totals
15099
+ })).max(168),
15100
+ byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
15101
+ byModel: external_exports.array(external_exports.strictObject({
15102
+ model: model.nullable(),
15103
+ ...totals,
15104
+ /** Requests priced by what the Harness recorded they cost, not by a price list. */
15105
+ harnessPricedRequests: count
15106
+ })).max(4096),
15107
+ byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
15108
+ /**
15109
+ * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
15110
+ * requests without a native session are not listed here but count everywhere else.
15111
+ */
15112
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
15113
+ });
15114
+
14959
15115
  // ../../shared-contracts/dist/ids.js
14960
15116
  var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
14961
15117
  message: "Identifier must not be empty or whitespace"
@@ -15003,6 +15159,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
15003
15159
  "codexhost/account/list",
15004
15160
  "codexhost/account/refresh",
15005
15161
  "codexhost/account/usage/inspect",
15162
+ "codexhost/usage/model-prices/get",
15163
+ "codexhost/usage/model-prices/set",
15164
+ "codexhost/usage/model-prices/default",
15165
+ "codexhost/usage/statistics/get",
15006
15166
  "codexhost/update/check",
15007
15167
  "codexhost/update/start",
15008
15168
  "codexhost/update/status"
@@ -15067,6 +15227,7 @@ var threadUsageSnapshotSchema = external_exports.object({
15067
15227
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
15068
15228
  outputTokens: nonNegativeSafeIntegerSchema.optional(),
15069
15229
  outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15230
+ apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
15070
15231
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
15071
15232
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
15072
15233
  totalCostUsd: finiteNonNegativeNumberSchema.optional(),
@@ -15078,7 +15239,11 @@ var threadUsageSnapshotSchema = external_exports.object({
15078
15239
  planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
15079
15240
  planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15080
15241
  planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
15081
- planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
15242
+ planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
15243
+ sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
15244
+ timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
15245
+ costSource: external_exports.enum(["publicPrice", "native"]).optional(),
15246
+ unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
15082
15247
  }).strict().superRefine((usage, context) => {
15083
15248
  if (Object.keys(usage).length === 0) {
15084
15249
  context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
@@ -15099,6 +15264,20 @@ var threadUsageSnapshotSchema = external_exports.object({
15099
15264
  path: ["contextWindowTokens"]
15100
15265
  });
15101
15266
  }
15267
+ if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
15268
+ context.addIssue({
15269
+ code: "custom",
15270
+ message: "Thread Usage costSource must be provided with totalCostUsd",
15271
+ path: ["costSource"]
15272
+ });
15273
+ }
15274
+ if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
15275
+ context.addIssue({
15276
+ code: "custom",
15277
+ message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
15278
+ path: ["unpricedModels"]
15279
+ });
15280
+ }
15102
15281
  if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
15103
15282
  context.addIssue({
15104
15283
  code: "custom",
@@ -15353,27 +15532,27 @@ var harnessModelCatalogSchema = external_exports.object({
15353
15532
  }).strict().superRefine((catalog, context) => {
15354
15533
  const refs = /* @__PURE__ */ new Set();
15355
15534
  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)) {
15535
+ for (const [index, model2] of catalog.models.entries()) {
15536
+ if (refs.has(model2.ref.id)) {
15358
15537
  context.addIssue({
15359
15538
  code: "custom",
15360
15539
  message: "Model Catalog refs must be unique",
15361
15540
  path: ["models", index, "ref", "id"]
15362
15541
  });
15363
15542
  }
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)) {
15543
+ refs.add(model2.ref.id);
15544
+ if (model2.fastModel) {
15545
+ if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
15367
15546
  context.addIssue({
15368
15547
  code: "custom",
15369
15548
  message: "Fast Model refs must be distinct and unique",
15370
15549
  path: ["models", index, "fastModel"]
15371
15550
  });
15372
15551
  }
15373
- refs.add(model.fastModel.id);
15552
+ refs.add(model2.fastModel.id);
15374
15553
  }
15375
15554
  const supportedThinkingIds = /* @__PURE__ */ new Set();
15376
- for (const [optionIndex, optionId] of (model.supportedThinkingOptionIds ?? []).entries()) {
15555
+ for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
15377
15556
  if (supportedThinkingIds.has(optionId)) {
15378
15557
  context.addIssue({
15379
15558
  code: "custom",
@@ -15567,13 +15746,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
15567
15746
  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
15747
  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
15748
  var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
15749
+ var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
15750
+ var harnessInstallationGuideSchema = external_exports.object({
15751
+ commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
15752
+ before: localizedTextSchema.optional(),
15753
+ after: localizedTextSchema.optional(),
15754
+ downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
15755
+ }).strict();
15570
15756
  var pluginPresentationShape = {
15571
15757
  id: harnessPluginIdSchema,
15572
15758
  name: external_exports.string().trim().min(1).max(128),
15573
15759
  version: external_exports.string().min(1).max(128),
15760
+ /** Capability-only plugin; omitted for existing session-capable plugins. */
15761
+ kind: external_exports.literal("usage").optional(),
15762
+ /** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
15763
+ iconStyle: external_exports.object({
15764
+ vector: external_exports.object({
15765
+ viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
15766
+ color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
15767
+ paths: external_exports.array(external_exports.object({
15768
+ d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
15769
+ fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
15770
+ fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
15771
+ }).strict()).min(1).max(32)
15772
+ }).strict().optional(),
15773
+ background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
15774
+ borderRadius: external_exports.number().min(0).max(50).optional(),
15775
+ paddingRatio: external_exports.number().min(0).max(0.25).optional()
15776
+ }).strict().optional(),
15777
+ installation: harnessInstallationGuideSchema.optional(),
15778
+ notice: localizedTextSchema.optional(),
15574
15779
  /** The factory accepts a persisted local entrypoint through its construction context. */
15575
15780
  launchCommand: external_exports.literal(true).optional(),
15576
15781
  links: external_exports.object({
15782
+ website: documentationUrlSchema.optional(),
15577
15783
  documentation: documentationUrlSchema.optional(),
15578
15784
  installation: documentationUrlSchema.optional()
15579
15785
  }).strict().optional()
@@ -15992,6 +16198,11 @@ var codexSshDraftSchema = external_exports.strictObject({
15992
16198
  });
15993
16199
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
15994
16200
  external_exports.strictObject({ action: external_exports.literal("list") }),
16201
+ external_exports.strictObject({
16202
+ action: external_exports.literal("read-thread"),
16203
+ hostId: hostId.refine((id) => id !== "local"),
16204
+ input: delegationReadParamsSchema
16205
+ }),
15995
16206
  external_exports.strictObject({
15996
16207
  action: external_exports.literal("save"),
15997
16208
  draft: codexSshDraftSchema,
@@ -16130,10 +16341,12 @@ var tokenFields = [
16130
16341
  ];
16131
16342
  var safeIntegerFields = [
16132
16343
  "planFiveHourResetsAtUnix",
16133
- "planSevenDayResetsAtUnix"
16344
+ "planSevenDayResetsAtUnix",
16345
+ "timeToFirstOutputMs"
16134
16346
  ];
16135
16347
  var percentFields = [
16136
16348
  "cacheHitRatePercent",
16349
+ "sessionCacheHitRatePercent",
16137
16350
  "planFiveHourUsedPercent",
16138
16351
  "planSevenDayUsedPercent"
16139
16352
  ];
@@ -16141,10 +16354,31 @@ var usageFields = /* @__PURE__ */ new Set([
16141
16354
  ...tokenFields,
16142
16355
  ...safeIntegerFields,
16143
16356
  ...percentFields,
16357
+ "sessionCacheUsage",
16144
16358
  "totalCostUsd",
16145
16359
  "totalCredits",
16146
16360
  "contextUsagePercent",
16147
- "outputTokensPerSecond"
16361
+ "outputTokensPerSecond",
16362
+ "apiOutputTokensPerSecond",
16363
+ "costSource",
16364
+ "unpricedModels"
16365
+ ]);
16366
+ var requestTokenFields = [
16367
+ "inputTokens",
16368
+ "cachedInputTokens",
16369
+ "cacheWriteInputTokens",
16370
+ "cacheWrite1hInputTokens",
16371
+ "outputTokens",
16372
+ "reasoningOutputTokens",
16373
+ "startedAtMs",
16374
+ "completedAtMs"
16375
+ ];
16376
+ var requestFields = /* @__PURE__ */ new Set([
16377
+ ...requestTokenFields,
16378
+ "requestId",
16379
+ "historical",
16380
+ "model",
16381
+ "provider"
16148
16382
  ]);
16149
16383
 
16150
16384
  // ../../harness-adapter/dist/live-command-catalog.js
@@ -16525,7 +16759,7 @@ function runProbe(pythonExecutable, timeoutMs, environment, arguments_ = ["-I",
16525
16759
  try {
16526
16760
  const payload = stdout.split(/\r?\n/).find((line) => line.startsWith("codexhost_inventory="));
16527
16761
  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);
16762
+ const models = (parsed2.models ?? []).filter((model2) => typeof model2?.modelId === "string" && model2.modelId.length > 0);
16529
16763
  resolve({
16530
16764
  models,
16531
16765
  ...typeof parsed2.configured === "boolean" ? { configured: parsed2.configured } : {},
@@ -16564,14 +16798,14 @@ function catalogModelsFromInventory(inventory) {
16564
16798
  const models = [];
16565
16799
  let defaultModel = null;
16566
16800
  const seen = /* @__PURE__ */ new Set();
16567
- for (const model of inventory.models) {
16568
- if (model.available === false)
16801
+ for (const model2 of inventory.models) {
16802
+ if (model2.available === false)
16569
16803
  continue;
16570
- const nativeModelId = model.modelId;
16804
+ const nativeModelId = model2.modelId;
16571
16805
  const ref = encodeHermesModelRef(nativeModelId);
16572
16806
  if (!ref)
16573
16807
  continue;
16574
- if (inventory.currentModelId && (model.modelId === inventory.currentModelId || nativeModelId === inventory.currentModelId || model.modelIdAliases?.includes(inventory.currentModelId))) {
16808
+ if (inventory.currentModelId && (model2.modelId === inventory.currentModelId || nativeModelId === inventory.currentModelId || model2.modelIdAliases?.includes(inventory.currentModelId))) {
16575
16809
  if (defaultModel && defaultModel.id !== ref.id) {
16576
16810
  throw new HermesInventoryError("Hermes configured Model matches multiple Provider routes");
16577
16811
  }
@@ -16582,8 +16816,8 @@ function catalogModelsFromInventory(inventory) {
16582
16816
  seen.add(ref.id);
16583
16817
  models.push({
16584
16818
  ref,
16585
- label: `${model.provider} / ${model.label}`,
16586
- description: `Provider: ${model.provider}`
16819
+ label: `${model2.provider} / ${model2.label}`,
16820
+ description: `Provider: ${model2.provider}`
16587
16821
  });
16588
16822
  }
16589
16823
  if (inventory.currentModelId && models.length > 0 && !defaultModel) {
@@ -16625,7 +16859,18 @@ ${HERMES_DELEGATION_GUIDANCE}
16625
16859
  },
16626
16860
  // Reserve RPC stdout before native plugin imports. The registration is
16627
16861
  // process-local; no plugin is installed and no user config is changed.
16628
- bootstrap: `from tui_gateway import server
16862
+ //
16863
+ // ``hermes_bootstrap`` must run before ``tui_gateway.server`` is imported:
16864
+ // the gateway spawn uses ``python -I``, so PYTHONPATH and the launcher's
16865
+ // activation are stripped. Hermes's own entry point (``tui_gateway/entry.py``)
16866
+ // imports this module first to put the selected dependency environment on
16867
+ // ``sys.path``; skipping it makes bare third-party imports (e.g.
16868
+ // ``hermes_yaml`` -> ``ruamel``) fail on interpreters whose site-packages
16869
+ // do not already carry Hermes's dependencies. ``hermes_bootstrap`` is
16870
+ // import-safe here for the same reason entry.py relies on it: stdlib-only
16871
+ // at import time, so nothing can shadow it from the launch directory.
16872
+ bootstrap: `import hermes_bootstrap
16873
+ from tui_gateway import server
16629
16874
  from pathlib import Path
16630
16875
  from hermes_cli.plugins import PluginContext, PluginManifest, get_plugin_manager
16631
16876
  PluginContext(PluginManifest(name="codexhost-runtime"), get_plugin_manager()).register_skill(
@@ -17869,9 +18114,9 @@ var HermesGatewaySessionTransport = class {
17869
18114
  session_id: this.sessionId
17870
18115
  });
17871
18116
  const currentThinkingOptionId = gatewayString(reasoning.value);
17872
- const model = gatewayString(this.#info.model);
18117
+ const model2 = gatewayString(this.#info.model);
17873
18118
  const provider = gatewayString(this.#info.provider);
17874
- const currentModelId = provider ? `${provider}:${model}` : model;
18119
+ const currentModelId = provider ? `${provider}:${model2}` : model2;
17875
18120
  return {
17876
18121
  sessionId: this.nativeSessionId,
17877
18122
  session: {
@@ -17879,7 +18124,7 @@ var HermesGatewaySessionTransport = class {
17879
18124
  models: currentModelId ? {
17880
18125
  currentModelId,
17881
18126
  availableModels: [
17882
- { modelId: currentModelId, name: provider ? `${provider} / ${model}` : model }
18127
+ { modelId: currentModelId, name: provider ? `${provider} / ${model2}` : model2 }
17883
18128
  ]
17884
18129
  } : null,
17885
18130
  modes: {
@@ -19611,8 +19856,8 @@ async function openGatewaySession(input, transport, onSettle, inheritedPermissio
19611
19856
  throw new HermesGatewayHistoryError("unsupported", "Hermes gateway supports only native approval policy and session YOLO");
19612
19857
  if (input.kind === "create" && input.executionPolicy === "unattended-full-access" && mode && mode !== "dont_ask")
19613
19858
  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)
19859
+ const model2 = input.kind !== "fork" && input.model ? decodeHermesModelRefId(input.model.id) : null;
19860
+ if (input.kind !== "fork" && input.model && !model2)
19616
19861
  throw new HermesGatewayHistoryError("invalidRequest", "Model Ref does not belong to Hermes");
19617
19862
  if (source && gatewayRecord(source.locator).cwd && !await sameDirectory(String(gatewayRecord(source?.locator).cwd), input.cwd))
19618
19863
  throw new HermesGatewayHistoryError("unsupported", "Hermes gateway preserves the native Session working directory");
@@ -19630,7 +19875,7 @@ async function openGatewaySession(input, transport, onSettle, inheritedPermissio
19630
19875
  });
19631
19876
  nativeRef = await sourceHistory.derive(input.kind === "fork" ? { checkpoint: input.checkpoint } : { rollbackLastTurn: true });
19632
19877
  }
19633
- const choice = model ? await resolveGatewayModel(transport, model) : null;
19878
+ const choice = model2 ? await resolveGatewayModel(transport, model2) : null;
19634
19879
  const response = await transport.request(nativeRef ? "session.resume" : "session.create", nativeRef ? { session_id: nativeRef.nativeSessionId, eager_build: true, omit_messages: true } : {
19635
19880
  cwd: input.cwd,
19636
19881
  close_on_disconnect: true,
@@ -19658,8 +19903,8 @@ async function openGatewaySession(input, transport, onSettle, inheritedPermissio
19658
19903
  const physicalId = await bridge.history.resolvePhysicalSessionId();
19659
19904
  if (gatewayString(info.stored_session_id) !== physicalId)
19660
19905
  throw new Error("Hermes live Session and persisted history identities differ");
19661
- if (model)
19662
- await bridge.setModel(model);
19906
+ if (model2)
19907
+ await bridge.setModel(model2);
19663
19908
  if (input.kind !== "fork" && input.thinkingOptionId)
19664
19909
  await bridge.setThinking(input.thinkingOptionId);
19665
19910
  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
  }