@karlorz/codexhost-cli-win32-arm64 0.13.3-7 → 0.14.0-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 (34) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +55 -4
  4. package/app/console-web.js +344 -54
  5. package/app/cpa-live-voice-hook.js +55 -4
  6. package/app/desktop-controller.mjs +69 -8
  7. package/app/host-runtime.mjs +743 -230
  8. package/app/plugins/antigravity/plugin.mjs +88 -12
  9. package/app/plugins/claude-code/plugin.mjs +397 -21
  10. package/app/plugins/codebuddy/plugin.mjs +107 -17
  11. package/app/plugins/codex-usage/plugin.mjs +67 -7
  12. package/app/plugins/copilot/assets/icon.png +0 -0
  13. package/app/plugins/copilot/manifest.json +26 -0
  14. package/app/plugins/copilot/plugin.mjs +34645 -0
  15. package/app/plugins/cursor-cli/plugin.mjs +88 -6
  16. package/app/plugins/deepseek-harness/plugin.mjs +73 -6
  17. package/app/plugins/enabled.json +1 -0
  18. package/app/plugins/grok/plugin.mjs +272 -60
  19. package/app/plugins/hermes/plugin.mjs +70 -4
  20. package/app/plugins/kimi-code/plugin.mjs +73 -6
  21. package/app/plugins/kiro-cli/plugin.mjs +73 -6
  22. package/app/plugins/omp/plugin.mjs +73 -112
  23. package/app/plugins/opencode/plugin.mjs +75 -6
  24. package/app/plugins/pi/plugin.mjs +204 -44
  25. package/app/plugins/qoder/plugin.mjs +73 -6
  26. package/app/plugins/qoder-cn/plugin.mjs +73 -6
  27. package/app/plugins/workbuddy/plugin.mjs +368 -41
  28. package/app/plugins/zcode/plugin.mjs +74 -6
  29. package/app/renderer-extension.js +749 -157
  30. package/bin/codexhost.exe +0 -0
  31. package/libexec/codexhost-node-repl.exe +0 -0
  32. package/libexec/codexhost-shim.exe +0 -0
  33. package/libexec/codexhost-updater.exe +0 -0
  34. package/package.json +1 -1
@@ -15138,10 +15138,19 @@ var model = external_exports.string().min(1).max(512);
15138
15138
  var project = external_exports.string().min(1).max(4096);
15139
15139
  var usageStatisticsParamsSchema = external_exports.strictObject({
15140
15140
  range: external_exports.enum(USAGE_STATISTICS_RANGES),
15141
+ /** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
15142
+ timeZone: external_exports.string().min(1).max(128).refine((value) => {
15143
+ try {
15144
+ new Intl.DateTimeFormat("en", { timeZone: value });
15145
+ return true;
15146
+ } catch {
15147
+ return false;
15148
+ }
15149
+ }, "Unsupported usage statistics timezone").optional(),
15141
15150
  harness: harness.optional(),
15142
15151
  model: model.nullable().optional(),
15143
15152
  project: project.nullable().optional(),
15144
- /** One local date inside the range. */
15153
+ /** One date in the query timezone inside the range. */
15145
15154
  date: localDate.optional()
15146
15155
  });
15147
15156
  var usageStatisticsTotalsSchema = external_exports.strictObject({
@@ -15177,7 +15186,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
15177
15186
  });
15178
15187
  var usageStatisticsResultSchema = external_exports.strictObject({
15179
15188
  range: external_exports.enum(USAGE_STATISTICS_RANGES),
15180
- /** First local date of the range; null for all time. */
15189
+ /** First date in the query timezone (Host local when omitted); null for all time. */
15181
15190
  from: localDate.nullable(),
15182
15191
  to: localDate,
15183
15192
  /** The filters these figures apply, echoed so a late answer to older filters is recognised. */
@@ -15217,7 +15226,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
15217
15226
  totals: usageStatisticsTotalsSchema,
15218
15227
  /** Each date and Harness of the range: every filter except the day. */
15219
15228
  daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
15220
- /** Local weekday (0 = Sunday) and hour, all filters applied. */
15229
+ /** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
15221
15230
  hourly: external_exports.array(external_exports.strictObject({
15222
15231
  weekday: external_exports.number().int().min(0).max(6),
15223
15232
  hour: external_exports.number().int().min(0).max(23),
@@ -15308,6 +15317,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
15308
15317
  "codexhost/harness/display-settings/set",
15309
15318
  "codexhost/harness/inspect",
15310
15319
  "codexhost/harness/installation",
15320
+ "codexhost/harness/installation/start",
15321
+ "codexhost/harness/installation/status",
15311
15322
  "codexhost/harness/launch-settings/get",
15312
15323
  "codexhost/harness/launch-settings/set",
15313
15324
  "codexhost/harness/grok-computer-use/get",
@@ -15385,7 +15396,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
15385
15396
  var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
15386
15397
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
15387
15398
  var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
15399
+ var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
15400
+ var composerIndicatorsSchema = external_exports.array(external_exports.object({
15401
+ kind: external_exports.literal("countdown"),
15402
+ id: external_exports.string().min(1).max(64),
15403
+ expiresAtUnix: nonNegativeSafeIntegerSchema,
15404
+ label: indicatorTextSchema(256).optional(),
15405
+ tooltip: indicatorTextSchema(1024).optional()
15406
+ }).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
15407
+ message: "Composer indicator IDs must be unique"
15408
+ });
15388
15409
  var threadUsageSnapshotSchema = external_exports.object({
15410
+ composerIndicators: composerIndicatorsSchema.optional(),
15389
15411
  inputTokens: nonNegativeSafeIntegerSchema.optional(),
15390
15412
  cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
15391
15413
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
@@ -15793,7 +15815,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
15793
15815
  }).strict().optional(),
15794
15816
  autonomousTurns: external_exports.object({
15795
15817
  observe: external_exports.boolean()
15796
- }).strict().optional()
15818
+ }).strict().optional(),
15819
+ /** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
15820
+ steer: external_exports.boolean().optional()
15797
15821
  }).strict();
15798
15822
  var harnessConfigurationStateSchema = external_exports.object({
15799
15823
  effectiveModel: harnessModelRefSchema.optional(),
@@ -15925,6 +15949,15 @@ var threadOwnershipListResultSchema = external_exports.object({
15925
15949
  seen.add(thread.threadId);
15926
15950
  }
15927
15951
  });
15952
+ var threadSteeringInspectParamsSchema = external_exports.object({
15953
+ threadId: hostThreadIdSchema,
15954
+ /** The text about to be steered; a Harness command always stops and restarts. */
15955
+ text: external_exports.string().optional()
15956
+ }).strict();
15957
+ var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
15958
+ var threadSteeringInspectResultSchema = external_exports.object({
15959
+ delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
15960
+ }).strict();
15928
15961
 
15929
15962
  // ../../shared-contracts/dist/harness-plugins.js
15930
15963
  var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
@@ -16046,6 +16079,10 @@ var harnessInstallationStateSchema = external_exports.object({
16046
16079
  latestVersion: external_exports.string().min(1).max(128),
16047
16080
  updateAvailable: external_exports.boolean(),
16048
16081
  canUpdate: external_exports.boolean(),
16082
+ /** Defaults to CLI; some Harnesses ship only inside a desktop application. */
16083
+ versionKind: external_exports.enum(["cli", "application"]).optional(),
16084
+ /** Official download opened by the user; does not imply an automatic installation. */
16085
+ manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
16049
16086
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
16050
16087
  message: external_exports.string().max(2048).optional(),
16051
16088
  messageCode: external_exports.string().min(1).max(128).optional(),
@@ -16053,6 +16090,20 @@ var harnessInstallationStateSchema = external_exports.object({
16053
16090
  notice: harnessLocalizedTextSchema.optional(),
16054
16091
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
16055
16092
  }).strict();
16093
+ var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
16094
+ var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
16095
+ external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
16096
+ external_exports.object({
16097
+ taskId: external_exports.string().uuid(),
16098
+ status: external_exports.literal("succeeded"),
16099
+ result: harnessInstallationStateSchema
16100
+ }).strict(),
16101
+ external_exports.object({
16102
+ taskId: external_exports.string().uuid(),
16103
+ status: external_exports.literal("failed"),
16104
+ error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
16105
+ }).strict()
16106
+ ]);
16056
16107
 
16057
16108
  // ../../shared-contracts/dist/codex-accounts.js
16058
16109
  var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
@@ -16601,6 +16652,18 @@ function sanitizeDiagnosticTail(value) {
16601
16652
  return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
16602
16653
  }
16603
16654
 
16655
+ // ../../harness-adapter/dist/steer.js
16656
+ function unsupportedSteer(harnessLabel) {
16657
+ return {
16658
+ ok: false,
16659
+ error: {
16660
+ code: "unsupported",
16661
+ message: `${harnessLabel} cannot steer an active Turn natively`,
16662
+ retryable: false
16663
+ }
16664
+ };
16665
+ }
16666
+
16604
16667
  // ../../harness-adapter/dist/usage.js
16605
16668
  var tokenFields = [
16606
16669
  "inputTokens",
@@ -16628,6 +16691,7 @@ var usageFields = /* @__PURE__ */ new Set([
16628
16691
  ...safeIntegerFields,
16629
16692
  ...percentFields,
16630
16693
  "sessionCacheUsage",
16694
+ "composerIndicators",
16631
16695
  "totalCostUsd",
16632
16696
  "totalCredits",
16633
16697
  "contextUsagePercent",
@@ -16650,6 +16714,7 @@ function parseHostUsage(value) {
16650
16714
  throw new Error(`Harness Usage contains unknown field '${key}'`);
16651
16715
  }
16652
16716
  }
16717
+ const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
16653
16718
  for (const field of [
16654
16719
  "totalCredits",
16655
16720
  "contextUsagePercent",
@@ -16720,9 +16785,9 @@ function parseHostUsage(value) {
16720
16785
  if (value.costSource !== "publicPrice") {
16721
16786
  throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
16722
16787
  }
16723
- return { ...value, unpricedModels: [...models] };
16788
+ return { ...value, ...indicators, unpricedModels: [...models] };
16724
16789
  }
16725
- return { ...value };
16790
+ return { ...value, ...indicators };
16726
16791
  }
16727
16792
  var requestTokenFields = [
16728
16793
  "inputTokens",
@@ -22735,9 +22800,23 @@ var ClientSideConnection = class {
22735
22800
 
22736
22801
  // dist/copy-cleanup.js
22737
22802
  import { randomBytes } from "node:crypto";
22803
+
22804
+ // dist/acp-stdio.js
22738
22805
  import { createInterface as createInterface2 } from "node:readline";
22739
- import { stripVTControlCharacters } from "node:util";
22740
22806
  import { Readable } from "node:stream";
22807
+ import { stripVTControlCharacters } from "node:util";
22808
+ function codeBuddyAcpOutput(stdout, onLine) {
22809
+ return Readable.from((async function* () {
22810
+ for await (const line of createInterface2({ input: stdout })) {
22811
+ onLine?.(stripVTControlCharacters(line));
22812
+ if (line.trimStart().startsWith("{"))
22813
+ yield Buffer.from(`${line}
22814
+ `);
22815
+ }
22816
+ })());
22817
+ }
22818
+
22819
+ // dist/copy-cleanup.js
22741
22820
  var CodeBuddyCopyCleanup = class {
22742
22821
  copyId;
22743
22822
  cwd;
@@ -22767,17 +22846,11 @@ var CodeBuddyCopyCleanup = class {
22767
22846
  }
22768
22847
  /** Native --serve banners include its password; never pass them to the ACP parser/logs. */
22769
22848
  protocolOutput(stdout) {
22770
- return Readable.from(this.#protocolLines(stdout));
22771
- }
22772
- async *#protocolLines(stdout) {
22773
- for await (const line of createInterface2({ input: stdout })) {
22774
- const endpoint = /^\s*Endpoint\s+(http:\/\/127\.0\.0\.1:\d+)\s*$/u.exec(stripVTControlCharacters(line));
22849
+ return codeBuddyAcpOutput(stdout, (line) => {
22850
+ const endpoint = /^\s*Endpoint\s+(http:\/\/127\.0\.0\.1:\d+)\s*$/u.exec(line);
22775
22851
  if (endpoint)
22776
22852
  this.#endpoint = endpoint[1];
22777
- if (line.trimStart().startsWith("{"))
22778
- yield Buffer.from(`${line}
22779
- `);
22780
- }
22853
+ });
22781
22854
  }
22782
22855
  async remove() {
22783
22856
  if (!this.#endpoint)
@@ -22857,7 +22930,7 @@ var CodeBuddyAcpClient = class {
22857
22930
  return { outcome: "cancelled" };
22858
22931
  return options.handlers.question(params);
22859
22932
  }
22860
- }), ndJsonStream2(Writable.toWeb(this.#child.stdin), Readable2.toWeb(this.#copyCleanup?.protocolOutput(this.#child.stdout) ?? this.#child.stdout)));
22933
+ }), ndJsonStream2(Writable.toWeb(this.#child.stdin), Readable2.toWeb(this.#copyCleanup?.protocolOutput(this.#child.stdout) ?? (invocation.arguments.includes("--serve") ? codeBuddyAcpOutput(this.#child.stdout) : this.#child.stdout))));
22861
22934
  void this.#connection.closed.then(() => {
22862
22935
  this.#fault(new CodeBuddyError("processExited", "ACP connection closed"));
22863
22936
  }).catch((error51) => {
@@ -24884,6 +24957,8 @@ var CodeBuddySession = class {
24884
24957
  async #execute(command, nativeCommand = false) {
24885
24958
  if (this.#closed || this.#fault)
24886
24959
  return failure("invalidState", "Session is closed or faulted", this.profile);
24960
+ if (command.type === "turn.steer")
24961
+ return unsupportedSteer(this.profile.displayName);
24887
24962
  if (command.type === "interaction.respond")
24888
24963
  return this.#interactions.respond(command);
24889
24964
  if (command.type === "turn.cancel") {
@@ -25297,6 +25372,7 @@ var harnessBrokerMethodSchema = external_exports.enum([
25297
25372
  "adapter.open",
25298
25373
  "adapter.subagent.readSnapshot",
25299
25374
  "session.readSnapshot",
25375
+ "session.readCapabilities",
25300
25376
  "session.refreshUsage",
25301
25377
  "session.execute",
25302
25378
  "session.commands.list",
@@ -25477,6 +25553,11 @@ var turnStartSchema = external_exports.object({
25477
25553
  turnId: hostTurnIdSchema,
25478
25554
  input: external_exports.array(textInputSchema)
25479
25555
  }).strict();
25556
+ var turnSteerSchema = external_exports.object({
25557
+ type: external_exports.literal("turn.steer"),
25558
+ turnId: hostTurnIdSchema,
25559
+ input: external_exports.array(textInputSchema)
25560
+ }).strict();
25480
25561
  var turnCancelSchema = external_exports.object({ type: external_exports.literal("turn.cancel"), turnId: hostTurnIdSchema }).strict();
25481
25562
  var interactionResponseSchema = external_exports.union([
25482
25563
  external_exports.object({
@@ -25502,6 +25583,7 @@ var permissionSelectSchema = external_exports.object({
25502
25583
  }).strict();
25503
25584
  var brokerHostCommandSchema = external_exports.discriminatedUnion("type", [
25504
25585
  turnStartSchema,
25586
+ turnSteerSchema,
25505
25587
  turnCancelSchema,
25506
25588
  interactionRespondSchema,
25507
25589
  modelSelectSchema,
@@ -25694,6 +25776,7 @@ function parseSessionMetadata(value) {
25694
25776
  sessionId: candidate.sessionId,
25695
25777
  sessionGeneration: candidate.sessionGeneration,
25696
25778
  capabilities: harnessSessionCapabilitiesSchema.parse(candidate.capabilities),
25779
+ readCapabilities: candidate.readCapabilities === true,
25697
25780
  initialState: state,
25698
25781
  initialUsage: candidate.initialUsage === null ? null : parseHostUsage(candidate.initialUsage),
25699
25782
  commands: candidate.commands === true
@@ -26045,6 +26128,11 @@ var BrokeredHarnessSession = class {
26045
26128
  event: { type: "session.faulted", error: unavailable(error51.message) }
26046
26129
  });
26047
26130
  }
26131
+ async readCapabilities() {
26132
+ if (!this.#metadata.readCapabilities)
26133
+ return { ...this.capabilities, steer: false };
26134
+ return harnessSessionCapabilitiesSchema.parse(await this.#request("session.readCapabilities", {}));
26135
+ }
26048
26136
  async refreshUsage() {
26049
26137
  await this.#request("session.refreshUsage", {});
26050
26138
  }
@@ -26076,6 +26164,8 @@ var BrokeredHarnessSession = class {
26076
26164
  try {
26077
26165
  return parseHarnessResult(await this.#request("session.execute", { command }));
26078
26166
  } catch (error51) {
26167
+ if (command.type === "turn.steer")
26168
+ throw error51;
26079
26169
  return {
26080
26170
  ok: false,
26081
26171
  error: unavailable(error51 instanceof Error ? error51.message : String(error51))
@@ -14656,10 +14656,19 @@ var model = external_exports.string().min(1).max(512);
14656
14656
  var project = external_exports.string().min(1).max(4096);
14657
14657
  var usageStatisticsParamsSchema = external_exports.strictObject({
14658
14658
  range: external_exports.enum(USAGE_STATISTICS_RANGES),
14659
+ /** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
14660
+ timeZone: external_exports.string().min(1).max(128).refine((value) => {
14661
+ try {
14662
+ new Intl.DateTimeFormat("en", { timeZone: value });
14663
+ return true;
14664
+ } catch {
14665
+ return false;
14666
+ }
14667
+ }, "Unsupported usage statistics timezone").optional(),
14659
14668
  harness: harness.optional(),
14660
14669
  model: model.nullable().optional(),
14661
14670
  project: project.nullable().optional(),
14662
- /** One local date inside the range. */
14671
+ /** One date in the query timezone inside the range. */
14663
14672
  date: localDate.optional()
14664
14673
  });
14665
14674
  var usageStatisticsTotalsSchema = external_exports.strictObject({
@@ -14695,7 +14704,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
14695
14704
  });
14696
14705
  var usageStatisticsResultSchema = external_exports.strictObject({
14697
14706
  range: external_exports.enum(USAGE_STATISTICS_RANGES),
14698
- /** First local date of the range; null for all time. */
14707
+ /** First date in the query timezone (Host local when omitted); null for all time. */
14699
14708
  from: localDate.nullable(),
14700
14709
  to: localDate,
14701
14710
  /** The filters these figures apply, echoed so a late answer to older filters is recognised. */
@@ -14735,7 +14744,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
14735
14744
  totals: usageStatisticsTotalsSchema,
14736
14745
  /** Each date and Harness of the range: every filter except the day. */
14737
14746
  daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
14738
- /** Local weekday (0 = Sunday) and hour, all filters applied. */
14747
+ /** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
14739
14748
  hourly: external_exports.array(external_exports.strictObject({
14740
14749
  weekday: external_exports.number().int().min(0).max(6),
14741
14750
  hour: external_exports.number().int().min(0).max(23),
@@ -14826,6 +14835,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
14826
14835
  "codexhost/harness/display-settings/set",
14827
14836
  "codexhost/harness/inspect",
14828
14837
  "codexhost/harness/installation",
14838
+ "codexhost/harness/installation/start",
14839
+ "codexhost/harness/installation/status",
14829
14840
  "codexhost/harness/launch-settings/get",
14830
14841
  "codexhost/harness/launch-settings/set",
14831
14842
  "codexhost/harness/grok-computer-use/get",
@@ -14903,7 +14914,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
14903
14914
  var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
14904
14915
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
14905
14916
  var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
14917
+ var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
14918
+ var composerIndicatorsSchema = external_exports.array(external_exports.object({
14919
+ kind: external_exports.literal("countdown"),
14920
+ id: external_exports.string().min(1).max(64),
14921
+ expiresAtUnix: nonNegativeSafeIntegerSchema,
14922
+ label: indicatorTextSchema(256).optional(),
14923
+ tooltip: indicatorTextSchema(1024).optional()
14924
+ }).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
14925
+ message: "Composer indicator IDs must be unique"
14926
+ });
14906
14927
  var threadUsageSnapshotSchema = external_exports.object({
14928
+ composerIndicators: composerIndicatorsSchema.optional(),
14907
14929
  inputTokens: nonNegativeSafeIntegerSchema.optional(),
14908
14930
  cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
14909
14931
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
@@ -15311,7 +15333,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
15311
15333
  }).strict().optional(),
15312
15334
  autonomousTurns: external_exports.object({
15313
15335
  observe: external_exports.boolean()
15314
- }).strict().optional()
15336
+ }).strict().optional(),
15337
+ /** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
15338
+ steer: external_exports.boolean().optional()
15315
15339
  }).strict();
15316
15340
  var harnessConfigurationStateSchema = external_exports.object({
15317
15341
  effectiveModel: harnessModelRefSchema.optional(),
@@ -15443,6 +15467,15 @@ var threadOwnershipListResultSchema = external_exports.object({
15443
15467
  seen.add(thread.threadId);
15444
15468
  }
15445
15469
  });
15470
+ var threadSteeringInspectParamsSchema = external_exports.object({
15471
+ threadId: hostThreadIdSchema,
15472
+ /** The text about to be steered; a Harness command always stops and restarts. */
15473
+ text: external_exports.string().optional()
15474
+ }).strict();
15475
+ var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
15476
+ var threadSteeringInspectResultSchema = external_exports.object({
15477
+ delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
15478
+ }).strict();
15446
15479
 
15447
15480
  // ../../shared-contracts/dist/harness-plugins.js
15448
15481
  var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
@@ -15564,6 +15597,10 @@ var harnessInstallationStateSchema = external_exports.object({
15564
15597
  latestVersion: external_exports.string().min(1).max(128),
15565
15598
  updateAvailable: external_exports.boolean(),
15566
15599
  canUpdate: external_exports.boolean(),
15600
+ /** Defaults to CLI; some Harnesses ship only inside a desktop application. */
15601
+ versionKind: external_exports.enum(["cli", "application"]).optional(),
15602
+ /** Official download opened by the user; does not imply an automatic installation. */
15603
+ manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
15567
15604
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15568
15605
  message: external_exports.string().max(2048).optional(),
15569
15606
  messageCode: external_exports.string().min(1).max(128).optional(),
@@ -15571,6 +15608,20 @@ var harnessInstallationStateSchema = external_exports.object({
15571
15608
  notice: harnessLocalizedTextSchema.optional(),
15572
15609
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15573
15610
  }).strict();
15611
+ var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
15612
+ var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
15613
+ external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
15614
+ external_exports.object({
15615
+ taskId: external_exports.string().uuid(),
15616
+ status: external_exports.literal("succeeded"),
15617
+ result: harnessInstallationStateSchema
15618
+ }).strict(),
15619
+ external_exports.object({
15620
+ taskId: external_exports.string().uuid(),
15621
+ status: external_exports.literal("failed"),
15622
+ error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
15623
+ }).strict()
15624
+ ]);
15574
15625
 
15575
15626
  // ../../shared-contracts/dist/codex-accounts.js
15576
15627
  var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
@@ -16005,6 +16056,13 @@ import { setImmediate as yieldToEventLoop } from "node:timers/promises";
16005
16056
  // ../../harness-adapter/dist/usage-statistics.js
16006
16057
  import { createReadStream } from "node:fs";
16007
16058
  import { createInterface } from "node:readline";
16059
+ var HarnessUsageSourceChangedError = class extends Error {
16060
+ code = "HARNESS_USAGE_SOURCE_CHANGED";
16061
+ /** Plugins may bundle their own copy of this contract, so instanceof is insufficient. */
16062
+ static is(error51) {
16063
+ return typeof error51 === "object" && error51 !== null && "code" in error51 && error51.code === "HARNESS_USAGE_SOURCE_CHANGED";
16064
+ }
16065
+ };
16008
16066
  var MAX_SESSION_ID_LENGTH = 512;
16009
16067
  var MAX_CWD_LENGTH = 4096;
16010
16068
  var MAX_SESSION_TITLE_LENGTH = 200;
@@ -16980,7 +17038,7 @@ function createCodexUsageStatistics(environment, options = {}) {
16980
17038
  const entries = await readCodexRollouts(kept.map(({ file: file2 }) => file2), group.thread, signal, options);
16981
17039
  for (const file2 of group.files)
16982
17040
  if (await stamp(file2.file) !== file2.fingerprint)
16983
- throw new Error("Codex rollout changed while reading; refresh to retry");
17041
+ throw new HarnessUsageSourceChangedError("Codex rollout changed while reading; refresh to retry");
16984
17042
  const named = options.sessionId ? void 0 : (await threadNames(signal)).get(group.thread);
16985
17043
  return named ? entries.map((entry) => withUsageSession(entry, {
16986
17044
  sessionId: entry.sessionId,
@@ -17021,6 +17079,7 @@ var usageFields = /* @__PURE__ */ new Set([
17021
17079
  ...safeIntegerFields,
17022
17080
  ...percentFields,
17023
17081
  "sessionCacheUsage",
17082
+ "composerIndicators",
17024
17083
  "totalCostUsd",
17025
17084
  "totalCredits",
17026
17085
  "contextUsagePercent",
@@ -17043,6 +17102,7 @@ function parseHostUsage(value) {
17043
17102
  throw new Error(`Harness Usage contains unknown field '${key2}'`);
17044
17103
  }
17045
17104
  }
17105
+ const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
17046
17106
  for (const field of [
17047
17107
  "totalCredits",
17048
17108
  "contextUsagePercent",
@@ -17113,9 +17173,9 @@ function parseHostUsage(value) {
17113
17173
  if (value.costSource !== "publicPrice") {
17114
17174
  throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
17115
17175
  }
17116
- return { ...value, unpricedModels: [...models] };
17176
+ return { ...value, ...indicators, unpricedModels: [...models] };
17117
17177
  }
17118
- return { ...value };
17178
+ return { ...value, ...indicators };
17119
17179
  }
17120
17180
  var requestTokenFields = [
17121
17181
  "inputTokens",
@@ -0,0 +1,26 @@
1
+ {
2
+ "manifestVersion": 1,
3
+ "id": "copilot",
4
+ "name": "GitHub Copilot",
5
+ "version": "0.0.0",
6
+ "installation": {
7
+ "commands": [
8
+ {
9
+ "terminal": "npm · macOS / Linux / Windows",
10
+ "command": "npm install -g @github/copilot"
11
+ }
12
+ ],
13
+ "after": {
14
+ "en": "Run copilot; use /login only if authentication is unavailable. Existing native authentication on the target Host can be reused. CODEXHOST_COPILOT_COMMAND selects an existing CLI installation. Windows npm launchers resolve to that installation's actual JavaScript or executable entrypoint; arbitrary shell wrappers are not supported.",
15
+ "zh-CN": "运行 copilot;若缺少认证,再使用 /login。可复用目标 Host 已有的原生登录;CODEXHOST_COPILOT_COMMAND 可指定已有 CLI 安装。Windows npm 启动器会解析到同一安装的实际 JavaScript 或可执行入口,不支持任意 shell 包装脚本。"
16
+ }
17
+ },
18
+ "links": {
19
+ "website": "https://github.com/features/copilot",
20
+ "documentation": "https://docs.github.com/en/copilot/get-started/cli-quickstart",
21
+ "installation": "https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli"
22
+ },
23
+ "adapterApiVersion": 1,
24
+ "entry": "plugin.mjs",
25
+ "icon": "./assets/icon.png"
26
+ }