@codexhost/cli-darwin-x64 0.10.1 → 0.11.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.
@@ -14579,6 +14579,55 @@ var credentialImportsParamsSchema = external_exports.object({
14579
14579
  request: credentialImportsRequestSchema
14580
14580
  }).strict();
14581
14581
 
14582
+ // ../../shared-contracts/dist/harness-display-settings.js
14583
+ var harnessDisplayEntriesSchema = external_exports.array(external_exports.strictObject({
14584
+ agent: external_exports.string().min(1).max(128),
14585
+ section: external_exports.enum(["main", "more", "auto"])
14586
+ })).max(256).refine((entries) => new Set(entries.map((entry) => entry.agent)).size === entries.length, "Duplicate Harness IDs");
14587
+ var harnessDisplaySettingsSchema = external_exports.strictObject({
14588
+ entries: harnessDisplayEntriesSchema.nullable()
14589
+ });
14590
+ var harnessDisplayGetSchema = external_exports.strictObject({});
14591
+ var harnessDisplaySetSchema = external_exports.strictObject({
14592
+ entries: harnessDisplayEntriesSchema,
14593
+ /** Import legacy Desktop preferences only if no shared settings exist yet. */
14594
+ initializeOnly: external_exports.boolean().optional()
14595
+ });
14596
+
14597
+ // ../../shared-contracts/dist/console.js
14598
+ var consoleAnnouncementSchema = external_exports.strictObject({
14599
+ title: external_exports.string().trim().min(1).max(200),
14600
+ type: external_exports.enum(["info", "warning", "danger"]),
14601
+ body: external_exports.string().trim().min(1).max(16 * 1024)
14602
+ });
14603
+ var consoleOpenParamsSchema = external_exports.strictObject({});
14604
+ var consoleOpenResultSchema = external_exports.strictObject({
14605
+ /** The console address. */
14606
+ url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
14607
+ });
14608
+ var CONSOLE_HOST_METHODS = Object.freeze([
14609
+ "codexhost/harness/plugins/list",
14610
+ "codexhost/harness/display-settings/get",
14611
+ "codexhost/harness/display-settings/set",
14612
+ "codexhost/harness/inspect",
14613
+ "codexhost/harness/launch-settings/get",
14614
+ "codexhost/harness/launch-settings/set",
14615
+ "codexhost/harness/web-ui/open",
14616
+ "codexhost/harness/accounts/sources",
14617
+ "codexhost/harness/accounts/list",
14618
+ "codexhost/harness/accounts/inspect",
14619
+ "codexhost/harness/credential-imports",
14620
+ "codexhost/harness/session-import/sources",
14621
+ "codexhost/harness/session-import/list",
14622
+ "codexhost/harness/session-import/import",
14623
+ "codexhost/account/list",
14624
+ "codexhost/account/refresh",
14625
+ "codexhost/account/usage/inspect",
14626
+ "codexhost/update/check",
14627
+ "codexhost/update/start",
14628
+ "codexhost/update/status"
14629
+ ]);
14630
+
14582
14631
  // ../../shared-contracts/dist/version.js
14583
14632
  var WORKSPACE_CONTRACT_VERSION = 1;
14584
14633
 
@@ -14632,6 +14681,12 @@ var hostTurnIdSchema = opaqueIdSchema.brand();
14632
14681
  var hostItemIdSchema = opaqueIdSchema.brand();
14633
14682
  var hostInteractionIdSchema = opaqueIdSchema.brand();
14634
14683
 
14684
+ // ../../shared-contracts/dist/manual-compaction.js
14685
+ var threadManualCompactionStartedSchema = external_exports.strictObject({
14686
+ threadId: hostThreadIdSchema,
14687
+ turnId: hostTurnIdSchema
14688
+ });
14689
+
14635
14690
  // ../../shared-contracts/dist/thread-usage.js
14636
14691
  var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
14637
14692
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
@@ -14692,6 +14747,10 @@ var threadUsageSnapshotSchema = external_exports.object({
14692
14747
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
14693
14748
  var accountCreditsProductUsageSchema = external_exports.object({
14694
14749
  product: external_exports.string().min(1),
14750
+ used: external_exports.number().finite().nonnegative().optional(),
14751
+ // Zero is a real empty cap, not an absent field.
14752
+ limit: external_exports.number().finite().nonnegative().optional(),
14753
+ unit: external_exports.string().min(1).max(32).optional(),
14695
14754
  usagePercent: usagePercentSchema,
14696
14755
  resetsAt: external_exports.string().min(1).optional()
14697
14756
  }).strict();
@@ -14701,6 +14760,10 @@ var accountResetCreditsSchema = external_exports.object({
14701
14760
  expiresAt: external_exports.array(external_exports.string().min(1)).min(1).max(32).optional()
14702
14761
  }).strict();
14703
14762
  var accountCreditsSnapshotSchema = external_exports.object({
14763
+ used: external_exports.number().finite().nonnegative().optional(),
14764
+ // Zero is a real empty cap, not an absent field.
14765
+ limit: external_exports.number().finite().nonnegative().optional(),
14766
+ unit: external_exports.string().min(1).max(32).optional(),
14704
14767
  /** Native label when the primary limit is scoped to a model or product group. */
14705
14768
  label: external_exports.string().min(1).optional(),
14706
14769
  usedPercent: usagePercentSchema,
@@ -14720,12 +14783,27 @@ var threadUsageInspectionSchema = external_exports.object({
14720
14783
  }).strict();
14721
14784
 
14722
14785
  // ../../shared-contracts/dist/harness-accounts.js
14723
- var harnessAccountSnapshotSchema = external_exports.object({
14786
+ var accountBalanceSnapshotSchema = external_exports.object({
14787
+ amount: external_exports.number().finite().nonnegative(),
14788
+ /** ISO 4217 code as reported by the Provider, for example `CNY`. */
14789
+ currency: external_exports.string().trim().min(1).max(8),
14790
+ /** Native label when the Harness exposes several Billing Sources. */
14791
+ label: external_exports.string().trim().min(1).max(128).optional()
14792
+ }).strict();
14793
+ var harnessAccountSnapshotObject = external_exports.object({
14724
14794
  email: external_exports.string().trim().min(1).max(320).optional(),
14725
14795
  label: external_exports.string().trim().min(1).max(256).optional(),
14726
14796
  plan: external_exports.string().trim().min(1).max(128).optional(),
14727
- credits: accountCreditsSnapshotSchema
14797
+ credits: accountCreditsSnapshotSchema.optional(),
14798
+ balance: accountBalanceSnapshotSchema.optional()
14728
14799
  }).strict();
14800
+ function requireReportedQuota(schema) {
14801
+ return schema.refine((value) => {
14802
+ const reported = value;
14803
+ return reported.credits !== void 0 || reported.balance !== void 0;
14804
+ }, { message: "Account must report either credits or a balance" });
14805
+ }
14806
+ var harnessAccountSnapshotSchema = requireReportedQuota(harnessAccountSnapshotObject);
14729
14807
  var harnessAccountIdentityShape = {
14730
14808
  harnessId: harnessIdSchema,
14731
14809
  harnessName: external_exports.string().trim().min(1).max(128)
@@ -14736,11 +14814,13 @@ var harnessAccountSourceListResultSchema = external_exports.object({ sources: ex
14736
14814
  var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
14737
14815
  var harnessAccountInspectResultSchema = external_exports.object({
14738
14816
  ...harnessAccountIdentityShape,
14739
- account: harnessAccountSnapshotSchema.nullable()
14817
+ account: harnessAccountSnapshotSchema.nullable(),
14818
+ /** Every Billing Source from one Harness; `account` remains the first for older clients. */
14819
+ accounts: external_exports.array(harnessAccountSnapshotSchema).max(8).optional()
14740
14820
  }).strict();
14741
14821
  var harnessAccountListParamsSchema = external_exports.object({ refresh: external_exports.boolean().optional() }).strict();
14742
14822
  var harnessAccountListResultSchema = external_exports.object({
14743
- accounts: external_exports.array(harnessAccountSnapshotSchema.extend(harnessAccountIdentityShape)).max(128)
14823
+ accounts: external_exports.array(requireReportedQuota(harnessAccountSnapshotObject.extend(harnessAccountIdentityShape))).max(128)
14744
14824
  }).strict();
14745
14825
 
14746
14826
  // ../../shared-contracts/dist/json-value.js
@@ -14878,6 +14958,8 @@ var harnessModelSchema = external_exports.object({
14878
14958
  ref: harnessModelRefSchema,
14879
14959
  label: nonBlankTextSchema2.max(HARNESS_MODEL_LABEL_MAX_LENGTH),
14880
14960
  resolvedModelLabel: harnessResolvedModelLabelSchema.optional(),
14961
+ /** Optional opaque selection for this same Model with priority processing enabled. */
14962
+ fastModel: harnessModelRefSchema.optional(),
14881
14963
  supportedThinkingOptionIds: external_exports.array(harnessThinkingOptionIdSchema).optional()
14882
14964
  }).strict();
14883
14965
  var harnessThinkingOptionsSchema = external_exports.array(harnessThinkingOptionSchema).superRefine((options, context) => {
@@ -14910,6 +14992,16 @@ var harnessModelCatalogSchema = external_exports.object({
14910
14992
  });
14911
14993
  }
14912
14994
  refs.add(model.ref.id);
14995
+ if (model.fastModel) {
14996
+ if (refs.has(model.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model.fastModel?.id)) {
14997
+ context.addIssue({
14998
+ code: "custom",
14999
+ message: "Fast Model refs must be distinct and unique",
15000
+ path: ["models", index, "fastModel"]
15001
+ });
15002
+ }
15003
+ refs.add(model.fastModel.id);
15004
+ }
14913
15005
  const supportedThinkingIds = /* @__PURE__ */ new Set();
14914
15006
  for (const [optionIndex, optionId] of (model.supportedThinkingOptionIds ?? []).entries()) {
14915
15007
  if (supportedThinkingIds.has(optionId)) {
@@ -15029,11 +15121,13 @@ var threadThinkingSelectParamsSchema = external_exports.object({
15029
15121
  thinkingOptionId: harnessThinkingOptionIdSchema
15030
15122
  }).strict();
15031
15123
  var threadInspectionParamsSchema = external_exports.object({
15032
- threadId: hostThreadIdSchema
15124
+ threadId: hostThreadIdSchema,
15125
+ includeReferenceCapability: external_exports.boolean().optional()
15033
15126
  }).strict();
15034
15127
  var codexThreadInspectionSchema = external_exports.object({
15035
15128
  owner: external_exports.literal("codex"),
15036
- locked: external_exports.literal(true)
15129
+ locked: external_exports.literal(true),
15130
+ supportsThreadReferences: external_exports.literal(true).optional()
15037
15131
  }).strict();
15038
15132
  var externalThreadInspectionSchema = external_exports.object({
15039
15133
  owner: external_exports.literal("external"),
@@ -15159,6 +15253,19 @@ var harnessLaunchSettingsSchema = external_exports.object({
15159
15253
  restartRequired: external_exports.boolean()
15160
15254
  }).strict();
15161
15255
 
15256
+ // ../../shared-contracts/dist/harness-installation.js
15257
+ var harnessInstallationParamsSchema = external_exports.object({
15258
+ harnessId: harnessIdSchema,
15259
+ action: external_exports.enum(["check", "update"])
15260
+ }).strict();
15261
+ var harnessInstallationStateSchema = external_exports.object({
15262
+ currentVersion: external_exports.string().min(1).max(128),
15263
+ latestVersion: external_exports.string().min(1).max(128),
15264
+ updateAvailable: external_exports.boolean(),
15265
+ canUpdate: external_exports.boolean(),
15266
+ message: external_exports.string().max(2048).optional()
15267
+ }).strict();
15268
+
15162
15269
  // ../../shared-contracts/dist/codex-accounts.js
15163
15270
  var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
15164
15271
  var nonBlankTextSchema3 = external_exports.string().trim().min(1);
@@ -15876,6 +15983,7 @@ function defaultHarnessBrokerDescriptorPath(environment = process.env, harnessId
15876
15983
  var cwdSchema = external_exports.string().min(1).max(16384);
15877
15984
  var brokerEnvironmentSchema = external_exports.object({
15878
15985
  CODEXHOST_CLI_PATH: external_exports.string().max(16384).optional(),
15986
+ CODEXHOST_CLI_NODE_PATH: external_exports.string().max(16384).optional(),
15879
15987
  CODEXHOST_RUNTIME_ENDPOINT: external_exports.string().max(16384).optional(),
15880
15988
  CODEXHOST_RUNTIME_TOKEN: external_exports.string().max(16384).optional(),
15881
15989
  CODEXHOST_THREAD_ID: external_exports.string().max(256).optional()
@@ -16030,6 +16138,7 @@ var eventKeys = /* @__PURE__ */ new Map([
16030
16138
  ["item.started", /* @__PURE__ */ new Set(["type", "turnId", "item"])],
16031
16139
  ["item.updated", /* @__PURE__ */ new Set(["type", "turnId", "itemId", "update"])],
16032
16140
  ["item.completed", /* @__PURE__ */ new Set(["type", "turnId", "snapshot"])],
16141
+ ["item.detached", /* @__PURE__ */ new Set(["type", "turnId", "itemId"])],
16033
16142
  ["interaction.closed", /* @__PURE__ */ new Set(["type", "interactionId", "turnId", "reason"])],
16034
16143
  ["turn.completed", /* @__PURE__ */ new Set(["type", "turnId", "nativeTurnRef", "outcome"])],
16035
16144
  ["session.faulted", /* @__PURE__ */ new Set(["type", "error"])]
@@ -16598,6 +16707,7 @@ var BrokeredHarnessAdapter = class {
16598
16707
  if (this.#forwardEnvironment && input.environment) {
16599
16708
  const allowed = [
16600
16709
  "CODEXHOST_CLI_PATH",
16710
+ "CODEXHOST_CLI_NODE_PATH",
16601
16711
  "CODEXHOST_RUNTIME_ENDPOINT",
16602
16712
  "CODEXHOST_RUNTIME_TOKEN",
16603
16713
  "CODEXHOST_THREAD_ID"