@liberseek/boft-cli-win32-arm64 0.6.2 → 0.6.4

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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ BOFT CLI runs Pi and other external harnesses inside Codex Desktop.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install -g @liberseek/boft-cli@0.6.2
10
+ npm install -g @liberseek/boft-cli@0.6.4
11
11
  ```
12
12
 
13
13
  Do not install this package directly. npm selects it through the optional dependencies of `@liberseek/boft-cli`.
@@ -1 +1 @@
1
- {"schemaVersion":1,"version":"0.6.2","distribution":"npm","target":"windows-arm64"}
1
+ {"schemaVersion":1,"version":"0.6.4","distribution":"npm","target":"windows-arm64"}
@@ -1352,7 +1352,10 @@ ${rendererSource}`,
1352
1352
  "opencode",
1353
1353
  "grok",
1354
1354
  "omp",
1355
- "antigravity"
1355
+ "antigravity",
1356
+ "hermes",
1357
+ "muse",
1358
+ "kiro-cli"
1356
1359
  ],
1357
1360
  timeoutMs: PRODUCTION_INSTALL_TIMEOUT_MS
1358
1361
  },
@@ -19732,6 +19732,8 @@ var threadUsageSnapshotSchema = external_exports.object({
19732
19732
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
19733
19733
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
19734
19734
  totalCostUsd: finiteNonNegativeNumberSchema.optional(),
19735
+ totalCredits: finiteNonNegativeNumberSchema.optional(),
19736
+ contextUsagePercent: finiteNonNegativeNumberSchema.optional(),
19735
19737
  cacheHitRatePercent: cacheHitRatePercentSchema.optional(),
19736
19738
  contextWindowTokens: nonNegativeSafeIntegerSchema.optional(),
19737
19739
  contextUsedTokens: nonNegativeSafeIntegerSchema.optional(),
@@ -20667,7 +20669,9 @@ var usageFields = /* @__PURE__ */ new Set([
20667
20669
  ...tokenFields,
20668
20670
  ...safeIntegerFields,
20669
20671
  ...percentFields,
20670
- "totalCostUsd"
20672
+ "totalCostUsd",
20673
+ "totalCredits",
20674
+ "contextUsagePercent"
20671
20675
  ]);
20672
20676
  function isRecord2(value2) {
20673
20677
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
@@ -20701,6 +20705,12 @@ function parseHostUsage(value2) {
20701
20705
  if (value2.totalCostUsd !== void 0 && (typeof value2.totalCostUsd !== "number" || !Number.isFinite(value2.totalCostUsd) || value2.totalCostUsd < 0)) {
20702
20706
  throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
20703
20707
  }
20708
+ for (const field of ["totalCredits", "contextUsagePercent"]) {
20709
+ const candidate = value2[field];
20710
+ if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
20711
+ throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
20712
+ }
20713
+ }
20704
20714
  for (const field of percentFields) {
20705
20715
  const candidate = value2[field];
20706
20716
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
@@ -21269,6 +21279,9 @@ var MappingStore = class {
21269
21279
  async setTitle(hostThreadId, title) {
21270
21280
  return this.#update(hostThreadId, (current) => ({ ...current, title }));
21271
21281
  }
21282
+ async setCwd(hostThreadId, cwd) {
21283
+ return this.#update(hostThreadId, (current) => current.cwd === cwd ? null : { ...current, cwd });
21284
+ }
21272
21285
  async setTransportModelId(hostThreadId, transportModelId) {
21273
21286
  return this.#update(hostThreadId, (current) => current.transportModelId === transportModelId ? null : { ...current, transportModelId });
21274
21287
  }
@@ -21640,9 +21653,16 @@ function projectCodexApprovalRequest(input) {
21640
21653
  throw new Error("Host Approval subject is unsupported");
21641
21654
  }
21642
21655
  validateActions(interaction);
21643
- const allow = requiredActionForEffect(interaction, "allowOnce");
21656
+ if (new Set(interaction.actions.map(({ effect }) => effect)).size !== interaction.actions.length) {
21657
+ return projectApprovalChoices(input);
21658
+ }
21659
+ const allowOnce = optionalActionForEffect(interaction, "allowOnce");
21644
21660
  const allowForSession = optionalActionForEffect(interaction, "allowForSession");
21645
21661
  const allowAlways = optionalActionForEffect(interaction, "allowAlways");
21662
+ const allow = allowOnce ?? allowForSession ?? allowAlways;
21663
+ if (!allow) {
21664
+ throw new Error("Host Approval must declare an allowOnce, allowForSession, or allowAlways action");
21665
+ }
21646
21666
  const deny = requiredActionForEffect(interaction, "deny");
21647
21667
  const serverName = boundedText(input.serverName, "server name", SERVER_NAME_MAX_LENGTH);
21648
21668
  const title = clampedText(interaction.title, "title", TITLE_MAX_LENGTH);
@@ -21705,6 +21725,63 @@ function projectCodexApprovalRequest(input) {
21705
21725
  }
21706
21726
  };
21707
21727
  }
21728
+ function projectApprovalChoices(input) {
21729
+ const { interaction } = input;
21730
+ const allow = actionsForEffect(interaction, "allowOnce")[0];
21731
+ const deny = actionsForEffect(interaction, "deny")[0];
21732
+ if (!allow || !deny)
21733
+ throw new Error("Host Approval must declare allowOnce and deny actions");
21734
+ const denyResponse = { type: "approval", actionId: deny.id };
21735
+ return {
21736
+ request: {
21737
+ method: "mcpServer/elicitation/request",
21738
+ params: {
21739
+ serverName: boundedText(input.serverName, "server name", SERVER_NAME_MAX_LENGTH),
21740
+ threadId: input.threadId,
21741
+ turnId: interaction.turnId,
21742
+ mode: "form",
21743
+ message: [
21744
+ clampedText(interaction.title, "title", TITLE_MAX_LENGTH),
21745
+ ...interaction.description ? [interaction.description] : []
21746
+ ].join("\n\n"),
21747
+ requestedSchema: {
21748
+ type: "object",
21749
+ properties: {
21750
+ actionId: {
21751
+ type: "string",
21752
+ title: "Approval",
21753
+ oneOf: interaction.actions.map(({ id: id2, label }) => ({ const: id2, title: label })),
21754
+ default: allow.id
21755
+ }
21756
+ },
21757
+ required: ["actionId"]
21758
+ }
21759
+ }
21760
+ },
21761
+ denyResponse,
21762
+ parseResponse(result) {
21763
+ if (!isRecord3(result) || typeof result.action !== "string")
21764
+ throw responseError("missing action");
21765
+ if (Object.keys(result).some((key) => !["action", "content", "_meta"].includes(key))) {
21766
+ throw responseError("contains unreviewed fields");
21767
+ }
21768
+ if (result._meta !== void 0 && result._meta !== null) {
21769
+ throw responseError("contains unexpected persist metadata");
21770
+ }
21771
+ if (result.action === "decline" || result.action === "cancel") {
21772
+ if (result.content !== void 0 && result.content !== null) {
21773
+ throw responseError("contains fields incompatible with denial");
21774
+ }
21775
+ return denyResponse;
21776
+ }
21777
+ const content = result.content;
21778
+ if (result.action !== "accept" || !isRecord3(content) || Object.keys(content).length !== 1 || !interaction.actions.some(({ id: id2 }) => id2 === content.actionId)) {
21779
+ throw responseError("contains an undeclared approval choice");
21780
+ }
21781
+ return { type: "approval", actionId: content.actionId };
21782
+ }
21783
+ };
21784
+ }
21708
21785
 
21709
21786
  // packages/protocol-core/dist/codex-question.js
21710
21787
  function isRecord4(value2) {
@@ -22417,7 +22494,7 @@ function projectItem(item, outcome, defaultCwd, includeCommandOutput = true, sen
22417
22494
  id: item.itemId,
22418
22495
  type: "agentMessage",
22419
22496
  text: item.text,
22420
- phase: null,
22497
+ phase: item.phase ?? null,
22421
22498
  memoryCitation: null,
22422
22499
  durationMs: item.durationMs ?? null
22423
22500
  };
@@ -22482,7 +22559,8 @@ function projectItem(item, outcome, defaultCwd, includeCommandOutput = true, sen
22482
22559
  changes: projectFileChanges(item.changes),
22483
22560
  status: itemStatus(outcome)
22484
22561
  };
22485
- case "subagentDelegation":
22562
+ case "subagentDelegation": {
22563
+ const primary = item.subagents[0];
22486
22564
  return {
22487
22565
  id: item.itemId,
22488
22566
  type: "collabAgentToolCall",
@@ -22491,13 +22569,14 @@ function projectItem(item, outcome, defaultCwd, includeCommandOutput = true, sen
22491
22569
  senderThreadId: senderThreadId ?? "",
22492
22570
  receiverThreadIds: item.subagents.map(({ subagentId }) => subagentId),
22493
22571
  prompt: item.prompt ?? null,
22494
- model: null,
22495
- reasoningEffort: null,
22572
+ model: primary?.model ?? null,
22573
+ reasoningEffort: primary?.reasoningEffort ?? null,
22496
22574
  agentsStates: Object.fromEntries(item.subagents.map(({ subagentId, status, resultSummary }) => [
22497
22575
  subagentId,
22498
22576
  { status: collabAgentStatus(status), message: resultSummary ?? null }
22499
22577
  ]))
22500
22578
  };
22579
+ }
22501
22580
  }
22502
22581
  }
22503
22582
  function reasoningPreviewItemId(itemId) {
@@ -24305,6 +24384,9 @@ var ExternalThreadRepository = class {
24305
24384
  setTitle(hostThreadId, title) {
24306
24385
  return this.store.setTitle(hostThreadId, title);
24307
24386
  }
24387
+ setCwd(hostThreadId, cwd) {
24388
+ return this.store.setCwd(hostThreadId, cwd);
24389
+ }
24308
24390
  setTransportModelId(hostThreadId, transportModelId) {
24309
24391
  return this.store.setTransportModelId(hostThreadId, transportModelId);
24310
24392
  }
@@ -24521,6 +24603,19 @@ function createExternalThreadRecordInput(input) {
24521
24603
  ...input.subagent ? { subagent: input.subagent } : {}
24522
24604
  };
24523
24605
  }
24606
+ function subagentThreadModelFields(record3) {
24607
+ if (!record3.subagent) return {};
24608
+ try {
24609
+ const selection = decodeExternalTransportSelection(record3.harnessId, record3.transportModelId);
24610
+ if (!selection) return {};
24611
+ return {
24612
+ ...selection.model?.id ? { model: selection.model.id } : {},
24613
+ ...selection.thinkingOptionId ? { reasoningEffort: selection.thinkingOptionId } : {}
24614
+ };
24615
+ } catch {
24616
+ return {};
24617
+ }
24618
+ }
24524
24619
  function externalThreadValue(input) {
24525
24620
  const { record: record3 } = input;
24526
24621
  const createdAt = Math.floor(Date.parse(record3.createdAt) / 1e3);
@@ -24567,7 +24662,8 @@ function externalThreadValue(input) {
24567
24662
  isPinned: record3.isPinned,
24568
24663
  agentNickname: record3.subagent ? record3.title || null : null,
24569
24664
  agentRole: record3.subagent?.role ?? null,
24570
- extra: null
24665
+ extra: null,
24666
+ ...subagentThreadModelFields(record3)
24571
24667
  };
24572
24668
  }
24573
24669
 
@@ -24812,8 +24908,25 @@ var HarnessSessionImporter = class {
24812
24908
  return { ok: false, error: fixedError(-32081, "Session mappings could not be read") };
24813
24909
  }
24814
24910
  const existing = this.#mappedRecord(records, nativeSessionId);
24815
- if (existing) return importedThread(existing);
24816
24911
  const capability = this.#capability;
24912
+ if (existing) {
24913
+ if (!capability?.resolveCandidate) return importedThread(existing);
24914
+ try {
24915
+ const resolved = await capability.resolveCandidate(nativeSessionId);
24916
+ if (!resolved.ok) return importedThread(existing);
24917
+ const metadata2 = harnessSessionImportCandidateSchema.safeParse(resolved.value.candidate);
24918
+ const ref2 = nativeSessionRefSchema.safeParse(resolved.value.nativeRef);
24919
+ if (!metadata2.success || !ref2.success || ref2.data.harnessId !== this.#harnessId || ref2.data.nativeSessionId !== nativeSessionId || metadata2.data.nativeSessionId !== nativeSessionId || metadata2.data.cwd === existing.cwd) {
24920
+ return importedThread(existing);
24921
+ }
24922
+ return importedThread(
24923
+ await this.#repository.setCwd(existing.hostThreadId, metadata2.data.cwd)
24924
+ );
24925
+ } catch (error51) {
24926
+ this.#diagnose(error51);
24927
+ return importedThread(existing);
24928
+ }
24929
+ }
24817
24930
  if (!capability?.resolveCandidate) return { ok: false, error: this.#unavailable() };
24818
24931
  let source;
24819
24932
  try {
@@ -28013,7 +28126,11 @@ function opposite(direction) {
28013
28126
  return direction === "asc" ? "desc" : "asc";
28014
28127
  }
28015
28128
  function officialParams(query, cursor, limit) {
28016
- return { ...query.params, cursor, limit };
28129
+ const params = { ...query.params, cursor, limit };
28130
+ if (Array.isArray(params.modelProviders) && params.modelProviders.length === 0) {
28131
+ delete params.modelProviders;
28132
+ }
28133
+ return params;
28017
28134
  }
28018
28135
  function cursorValue(input) {
28019
28136
  return encodeHostThreadListCursor({
@@ -31241,17 +31358,15 @@ var AppServerHost = class {
31241
31358
  resolve: cancellationGate.resolve
31242
31359
  };
31243
31360
  thread.responseGates.set(turnId, gate);
31244
- const result = await thread.session.execute({ type: "turn.cancel", turnId });
31245
- if (!result.ok) {
31246
- try {
31247
- await this.#writer.json(rpcError(request, -32074, result.error.message));
31248
- } finally {
31249
- gate.resolve();
31250
- }
31251
- return;
31361
+ let response;
31362
+ try {
31363
+ const result = await thread.session.execute({ type: "turn.cancel", turnId });
31364
+ response = result.ok ? rpcEnvelope(request, { result: {} }) : rpcError(request, -32074, result.error.message);
31365
+ } catch (error51) {
31366
+ response = rpcError(request, -32074, errorMessage3(error51));
31252
31367
  }
31253
31368
  try {
31254
- await this.#writer.json(rpcEnvelope(request, { result: {} }));
31369
+ await this.#writer.json(response);
31255
31370
  } finally {
31256
31371
  gate.resolve();
31257
31372
  }
@@ -31551,12 +31666,14 @@ var AppServerHost = class {
31551
31666
  await this.#repository.setDelegationStatus(delegation.delegationId, status);
31552
31667
  }
31553
31668
  }
31554
- for (const message of result.messages) await this.#writer.json(message);
31555
31669
  if (event.type === "turn.completed") {
31556
31670
  await this.#setThreadStatus(
31557
31671
  thread,
31558
31672
  this.#hasRunningSubagents(thread.id) ? { type: "active", activeFlags: [] } : { type: "idle" }
31559
31673
  );
31674
+ }
31675
+ for (const message of result.messages) await this.#writer.json(message);
31676
+ if (event.type === "turn.completed") {
31560
31677
  this.#externalSteering.terminal(thread.id, event.turnId, event.outcome);
31561
31678
  }
31562
31679
  }
@@ -31596,6 +31713,8 @@ var AppServerHost = class {
31596
31713
  sessionId: parent.sessionId,
31597
31714
  running: status === "active"
31598
31715
  });
31716
+ if (subagent.model) thread.model = subagent.model;
31717
+ if (subagent.reasoningEffort) thread.reasoningEffort = subagent.reasoningEffort;
31599
31718
  this.#subagentThreadStatuses.set(record3.hostThreadId, status);
31600
31719
  this.#trackRunningSubagent(parent.id, record3.hostThreadId, status);
31601
31720
  await this.#writer.json({
@@ -32295,6 +32414,7 @@ import path15 from "node:path";
32295
32414
  var SKILL_VERSION = 5;
32296
32415
  var SKILL_RELATIVE_PATH = path15.join("skills", "codexhost-delegation", "SKILL.md");
32297
32416
  var PREVIOUS_MANAGED_DIGESTS = [
32417
+ "aff258622dc8ff321f32b15620d081e578cb9c9ed1134d6a57f35ca8e7762c0a",
32298
32418
  "ba509f57e5448e796b3dfdd5031dcb08672eded50b61c0a54de84cfa02c49dd3",
32299
32419
  "d3ddf6db9bc5c5df825479c885bbbf0ca08da66f7057a12e02e1fdf57525149e",
32300
32420
  "15eb63519ff867e1536c97188a0c43738d7a49d38d4d6adeb7a1036726e7246d",
@@ -32304,12 +32424,12 @@ var CODEXHOST_DELEGATION_SKILL = `---
32304
32424
  name: codexhost-delegation
32305
32425
  version: ${SKILL_VERSION}
32306
32426
  description: >
32307
- Delegate work to another coding agent. Use when the user explicitly asks
32308
- Claude Code, Pi, Codex/OpenAI, OMP, Grok, another agent, or an agent mentioned
32309
- as @<agent> to independently review, investigate, implement, test, or verify
32310
- something. Do not use when the user is merely discussing, comparing, or
32311
- configuring agents, choosing a Model or Provider, or asking the current agent
32312
- to role-play as another agent.
32427
+ Delegate tasks to other coding agents, or read and follow up on existing
32428
+ external agent sessions. Use when the user asks another agent (including
32429
+ @agent) to independently perform a task, or asks to view a specified external
32430
+ session's content, progress, or results, send follow-up messages, wait, or
32431
+ cancel a task. Not for recapping the current conversation, discussing or
32432
+ configuring agents, or role-playing.
32313
32433
  ---
32314
32434
 
32315
32435
  # Execute the task
@@ -32334,9 +32454,14 @@ When the user asks for a specific Model or Thinking level, inspect the target
32334
32454
  Harness first and use the exact opaque IDs returned by the authoritative CLI.
32335
32455
  When they do not specify either setting, omit it so the target keeps its default.
32336
32456
 
32337
- Create an independent child session and submit the requested task.
32457
+ For a new delegation, create an independent child session and submit the
32458
+ requested task. For an existing external session, resolve the target from the
32459
+ user-provided session link, identifier, or context and operate on that Thread
32460
+ directly; it need not have been created by the current assistant. If the target
32461
+ is ambiguous, ask the user to identify it. Keep requests to view or summarize a
32462
+ session read-only.
32338
32463
 
32339
- After starting the task, choose the appropriate next action based on the
32464
+ For a new or existing task, choose the appropriate next action based on the
32340
32465
  user’s request and the task:
32341
32466
 
32342
32467
  - send a follow-up message to the same Thread;
@@ -32346,10 +32471,11 @@ user’s request and the task:
32346
32471
  - check it again later;
32347
32472
  - leave it running in the background.
32348
32473
 
32349
- When the result is needed, explicitly read the child Thread. Report only the
32474
+ When the result is needed, explicitly read the target Thread. Report only the
32350
32475
  visible result returned by that Thread.
32351
32476
 
32352
- Provide the user with the necessary tracking information, including:
32477
+ Provide the user with the necessary tracking information available from the
32478
+ CLI; omit unavailable fields rather than inventing them:
32353
32479
 
32354
32480
  - target agent;
32355
32481
  - \`delegationId\`;
@@ -35045,10 +35171,13 @@ async function runRemoteHostCli(input) {
35045
35171
  var HARNESS_BROKER_PROTOCOL_VERSION = 1;
35046
35172
  var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
35047
35173
  var HARNESS_BROKER_MAX_PENDING_REQUESTS = 32;
35174
+ var HARNESS_BROKER_SESSION_IMPORT_PAGE_SIZE = 100;
35048
35175
  var harnessBrokerMethodSchema = external_exports.enum([
35049
35176
  "adapter.inspect",
35050
35177
  "adapter.inspectAccount",
35051
35178
  "adapter.open",
35179
+ "adapter.sessionImport.list",
35180
+ "adapter.sessionImport.resolve",
35052
35181
  "adapter.subagent.readSnapshot",
35053
35182
  "session.readSnapshot",
35054
35183
  "session.refreshUsage",
@@ -35204,6 +35333,27 @@ var brokerOpenInputSchema = external_exports.discriminatedUnion("kind", [
35204
35333
  rollbackSchema
35205
35334
  ]);
35206
35335
  var brokerInspectInputSchema = external_exports.object({ cwd: cwdSchema.optional(), refresh: external_exports.boolean().optional() }).strict();
35336
+ var brokerSessionImportListParamsSchema = external_exports.object({
35337
+ offset: external_exports.number().int().nonnegative().safe(),
35338
+ limit: external_exports.number().int().min(1).max(HARNESS_BROKER_SESSION_IMPORT_PAGE_SIZE)
35339
+ }).strict();
35340
+ var brokerSessionImportResolveParamsSchema = external_exports.object({ nativeSessionId: harnessSessionImportIdSchema }).strict();
35341
+ var brokerSessionImportCandidatesSchema = external_exports.array(harnessSessionImportCandidateSchema);
35342
+ var brokerSessionImportPageSchema = external_exports.object({
35343
+ candidates: external_exports.array(harnessSessionImportCandidateSchema).max(HARNESS_BROKER_SESSION_IMPORT_PAGE_SIZE),
35344
+ total: external_exports.number().int().nonnegative().safe()
35345
+ }).strict();
35346
+ var brokerSessionImportSourceSchema = external_exports.object({
35347
+ candidate: harnessSessionImportCandidateSchema,
35348
+ nativeRef: nativeSessionRefSchema
35349
+ }).strict().superRefine((source, context) => {
35350
+ if (source.nativeRef.harnessId !== "claude-code" || source.nativeRef.nativeSessionId !== source.candidate.nativeSessionId) {
35351
+ context.addIssue({
35352
+ code: "custom",
35353
+ message: "Claude Session import source identity does not match"
35354
+ });
35355
+ }
35356
+ });
35207
35357
  var textInputSchema = external_exports.object({ type: external_exports.literal("text"), text: external_exports.string().max(4e6) }).strict();
35208
35358
  var turnStartSchema = external_exports.object({
35209
35359
  type: external_exports.literal("turn.start"),
@@ -35702,6 +35852,50 @@ async function startHarnessBrokerServer(input) {
35702
35852
  return { ok: false, error: harnessError("Claude subagents are unavailable", false) };
35703
35853
  return subagents.readSnapshot(subagentReadSnapshotSchema.parse(request.params));
35704
35854
  }
35855
+ if (request.method === "adapter.sessionImport.list") {
35856
+ const { limit, offset } = brokerSessionImportListParamsSchema.parse(request.params);
35857
+ const sessionImport = input.adapter.sessionImport;
35858
+ if (!sessionImport?.resolveCandidate) {
35859
+ return {
35860
+ ok: false,
35861
+ error: harnessError("Claude Session import is unavailable", false)
35862
+ };
35863
+ }
35864
+ if (offset === 0) {
35865
+ const result = await sessionImport.listCandidates();
35866
+ if (!result.ok)
35867
+ return result;
35868
+ state.sessionImportCandidates = result.value.map((candidate) => harnessSessionImportCandidateSchema.parse(candidate));
35869
+ }
35870
+ const candidates = state.sessionImportCandidates;
35871
+ if (!candidates) {
35872
+ return {
35873
+ ok: false,
35874
+ error: {
35875
+ code: "invalidState",
35876
+ message: "Claude Session import page snapshot is unavailable",
35877
+ retryable: true,
35878
+ stage: "harnessBroker.sessionImport"
35879
+ }
35880
+ };
35881
+ }
35882
+ const page = candidates.slice(offset, offset + limit);
35883
+ const total = candidates.length;
35884
+ if (offset + page.length >= total)
35885
+ delete state.sessionImportCandidates;
35886
+ return { ok: true, value: { candidates: page, total } };
35887
+ }
35888
+ if (request.method === "adapter.sessionImport.resolve") {
35889
+ const { nativeSessionId } = brokerSessionImportResolveParamsSchema.parse(request.params);
35890
+ const resolveCandidate = input.adapter.sessionImport?.resolveCandidate;
35891
+ if (!resolveCandidate) {
35892
+ return {
35893
+ ok: false,
35894
+ error: harnessError("Claude Session import is unavailable", false)
35895
+ };
35896
+ }
35897
+ return resolveCandidate(nativeSessionId);
35898
+ }
35705
35899
  if (request.method === "adapter.open") {
35706
35900
  const openInput = brokerOpenInputSchema.parse(request.params);
35707
35901
  const sourceRef = openInput.kind === "create" ? void 0 : openInput.kind === "resume" ? openInput.nativeRef : openInput.sourceRef;
@@ -14554,6 +14554,8 @@ var threadUsageSnapshotSchema = external_exports.object({
14554
14554
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
14555
14555
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
14556
14556
  totalCostUsd: finiteNonNegativeNumberSchema.optional(),
14557
+ totalCredits: finiteNonNegativeNumberSchema.optional(),
14558
+ contextUsagePercent: finiteNonNegativeNumberSchema.optional(),
14557
14559
  cacheHitRatePercent: cacheHitRatePercentSchema.optional(),
14558
14560
  contextWindowTokens: nonNegativeSafeIntegerSchema.optional(),
14559
14561
  contextUsedTokens: nonNegativeSafeIntegerSchema.optional(),
@@ -15509,7 +15511,9 @@ var usageFields = /* @__PURE__ */ new Set([
15509
15511
  ...tokenFields,
15510
15512
  ...safeIntegerFields,
15511
15513
  ...percentFields,
15512
- "totalCostUsd"
15514
+ "totalCostUsd",
15515
+ "totalCredits",
15516
+ "contextUsagePercent"
15513
15517
  ]);
15514
15518
 
15515
15519
  // ../../harness-discovery/dist/environment.js
@@ -19177,6 +19181,7 @@ function historySubagentState(history, id) {
19177
19181
  return void 0;
19178
19182
  }
19179
19183
  var AntigravityAdapter = class {
19184
+ commandCatalog = ANTIGRAVITY_COMMAND_CATALOG;
19180
19185
  harnessId = antigravityHarnessId;
19181
19186
  subagents = {
19182
19187
  readSnapshot: async (input) => {