@liberseek/boft-cli-win32-arm64 0.6.2 → 0.6.3
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 +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +4 -1
- package/app/host-runtime.mjs +201 -25
- package/app/plugins/antigravity/plugin.mjs +6 -1
- package/app/plugins/claude-code/plugin.mjs +528 -49
- package/app/plugins/deepseek-harness/plugin.mjs +11 -1
- package/app/plugins/enabled.json +4 -1
- package/app/plugins/grok/plugin.mjs +11 -1
- package/app/plugins/hermes/manifest.json +11 -0
- package/app/plugins/hermes/plugin.mjs +21491 -0
- package/app/plugins/kiro-cli/assets/icon.svg +5 -0
- package/app/plugins/kiro-cli/manifest.json +12 -0
- package/app/plugins/kiro-cli/plugin.mjs +23353 -0
- package/app/plugins/muse/assets/icon.svg +4 -0
- package/app/plugins/muse/manifest.json +12 -0
- package/app/plugins/muse/plugin.mjs +18151 -0
- package/app/plugins/omp/plugin.mjs +11 -1
- package/app/plugins/opencode/plugin.mjs +11 -1
- package/app/plugins/pi/plugin.mjs +11 -1
- package/app/renderer-extension.js +486 -149
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
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.
|
|
10
|
+
npm install -g @liberseek/boft-cli@0.6.3
|
|
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.
|
|
1
|
+
{"schemaVersion":1,"version":"0.6.3","distribution":"npm","target":"windows-arm64"}
|
package/app/host-runtime.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
};
|
|
@@ -24305,6 +24382,9 @@ var ExternalThreadRepository = class {
|
|
|
24305
24382
|
setTitle(hostThreadId, title) {
|
|
24306
24383
|
return this.store.setTitle(hostThreadId, title);
|
|
24307
24384
|
}
|
|
24385
|
+
setCwd(hostThreadId, cwd) {
|
|
24386
|
+
return this.store.setCwd(hostThreadId, cwd);
|
|
24387
|
+
}
|
|
24308
24388
|
setTransportModelId(hostThreadId, transportModelId) {
|
|
24309
24389
|
return this.store.setTransportModelId(hostThreadId, transportModelId);
|
|
24310
24390
|
}
|
|
@@ -24812,8 +24892,25 @@ var HarnessSessionImporter = class {
|
|
|
24812
24892
|
return { ok: false, error: fixedError(-32081, "Session mappings could not be read") };
|
|
24813
24893
|
}
|
|
24814
24894
|
const existing = this.#mappedRecord(records, nativeSessionId);
|
|
24815
|
-
if (existing) return importedThread(existing);
|
|
24816
24895
|
const capability = this.#capability;
|
|
24896
|
+
if (existing) {
|
|
24897
|
+
if (!capability?.resolveCandidate) return importedThread(existing);
|
|
24898
|
+
try {
|
|
24899
|
+
const resolved = await capability.resolveCandidate(nativeSessionId);
|
|
24900
|
+
if (!resolved.ok) return importedThread(existing);
|
|
24901
|
+
const metadata2 = harnessSessionImportCandidateSchema.safeParse(resolved.value.candidate);
|
|
24902
|
+
const ref2 = nativeSessionRefSchema.safeParse(resolved.value.nativeRef);
|
|
24903
|
+
if (!metadata2.success || !ref2.success || ref2.data.harnessId !== this.#harnessId || ref2.data.nativeSessionId !== nativeSessionId || metadata2.data.nativeSessionId !== nativeSessionId || metadata2.data.cwd === existing.cwd) {
|
|
24904
|
+
return importedThread(existing);
|
|
24905
|
+
}
|
|
24906
|
+
return importedThread(
|
|
24907
|
+
await this.#repository.setCwd(existing.hostThreadId, metadata2.data.cwd)
|
|
24908
|
+
);
|
|
24909
|
+
} catch (error51) {
|
|
24910
|
+
this.#diagnose(error51);
|
|
24911
|
+
return importedThread(existing);
|
|
24912
|
+
}
|
|
24913
|
+
}
|
|
24817
24914
|
if (!capability?.resolveCandidate) return { ok: false, error: this.#unavailable() };
|
|
24818
24915
|
let source;
|
|
24819
24916
|
try {
|
|
@@ -28013,7 +28110,11 @@ function opposite(direction) {
|
|
|
28013
28110
|
return direction === "asc" ? "desc" : "asc";
|
|
28014
28111
|
}
|
|
28015
28112
|
function officialParams(query, cursor, limit) {
|
|
28016
|
-
|
|
28113
|
+
const params = { ...query.params, cursor, limit };
|
|
28114
|
+
if (Array.isArray(params.modelProviders) && params.modelProviders.length === 0) {
|
|
28115
|
+
delete params.modelProviders;
|
|
28116
|
+
}
|
|
28117
|
+
return params;
|
|
28017
28118
|
}
|
|
28018
28119
|
function cursorValue(input) {
|
|
28019
28120
|
return encodeHostThreadListCursor({
|
|
@@ -31241,17 +31342,15 @@ var AppServerHost = class {
|
|
|
31241
31342
|
resolve: cancellationGate.resolve
|
|
31242
31343
|
};
|
|
31243
31344
|
thread.responseGates.set(turnId, gate);
|
|
31244
|
-
|
|
31245
|
-
|
|
31246
|
-
|
|
31247
|
-
|
|
31248
|
-
|
|
31249
|
-
|
|
31250
|
-
}
|
|
31251
|
-
return;
|
|
31345
|
+
let response;
|
|
31346
|
+
try {
|
|
31347
|
+
const result = await thread.session.execute({ type: "turn.cancel", turnId });
|
|
31348
|
+
response = result.ok ? rpcEnvelope(request, { result: {} }) : rpcError(request, -32074, result.error.message);
|
|
31349
|
+
} catch (error51) {
|
|
31350
|
+
response = rpcError(request, -32074, errorMessage3(error51));
|
|
31252
31351
|
}
|
|
31253
31352
|
try {
|
|
31254
|
-
await this.#writer.json(
|
|
31353
|
+
await this.#writer.json(response);
|
|
31255
31354
|
} finally {
|
|
31256
31355
|
gate.resolve();
|
|
31257
31356
|
}
|
|
@@ -31551,12 +31650,14 @@ var AppServerHost = class {
|
|
|
31551
31650
|
await this.#repository.setDelegationStatus(delegation.delegationId, status);
|
|
31552
31651
|
}
|
|
31553
31652
|
}
|
|
31554
|
-
for (const message of result.messages) await this.#writer.json(message);
|
|
31555
31653
|
if (event.type === "turn.completed") {
|
|
31556
31654
|
await this.#setThreadStatus(
|
|
31557
31655
|
thread,
|
|
31558
31656
|
this.#hasRunningSubagents(thread.id) ? { type: "active", activeFlags: [] } : { type: "idle" }
|
|
31559
31657
|
);
|
|
31658
|
+
}
|
|
31659
|
+
for (const message of result.messages) await this.#writer.json(message);
|
|
31660
|
+
if (event.type === "turn.completed") {
|
|
31560
31661
|
this.#externalSteering.terminal(thread.id, event.turnId, event.outcome);
|
|
31561
31662
|
}
|
|
31562
31663
|
}
|
|
@@ -32295,6 +32396,7 @@ import path15 from "node:path";
|
|
|
32295
32396
|
var SKILL_VERSION = 5;
|
|
32296
32397
|
var SKILL_RELATIVE_PATH = path15.join("skills", "codexhost-delegation", "SKILL.md");
|
|
32297
32398
|
var PREVIOUS_MANAGED_DIGESTS = [
|
|
32399
|
+
"aff258622dc8ff321f32b15620d081e578cb9c9ed1134d6a57f35ca8e7762c0a",
|
|
32298
32400
|
"ba509f57e5448e796b3dfdd5031dcb08672eded50b61c0a54de84cfa02c49dd3",
|
|
32299
32401
|
"d3ddf6db9bc5c5df825479c885bbbf0ca08da66f7057a12e02e1fdf57525149e",
|
|
32300
32402
|
"15eb63519ff867e1536c97188a0c43738d7a49d38d4d6adeb7a1036726e7246d",
|
|
@@ -32304,12 +32406,12 @@ var CODEXHOST_DELEGATION_SKILL = `---
|
|
|
32304
32406
|
name: codexhost-delegation
|
|
32305
32407
|
version: ${SKILL_VERSION}
|
|
32306
32408
|
description: >
|
|
32307
|
-
Delegate
|
|
32308
|
-
|
|
32309
|
-
|
|
32310
|
-
|
|
32311
|
-
|
|
32312
|
-
|
|
32409
|
+
Delegate tasks to other coding agents, or read and follow up on existing
|
|
32410
|
+
external agent sessions. Use when the user asks another agent (including
|
|
32411
|
+
@agent) to independently perform a task, or asks to view a specified external
|
|
32412
|
+
session's content, progress, or results, send follow-up messages, wait, or
|
|
32413
|
+
cancel a task. Not for recapping the current conversation, discussing or
|
|
32414
|
+
configuring agents, or role-playing.
|
|
32313
32415
|
---
|
|
32314
32416
|
|
|
32315
32417
|
# Execute the task
|
|
@@ -32334,9 +32436,14 @@ When the user asks for a specific Model or Thinking level, inspect the target
|
|
|
32334
32436
|
Harness first and use the exact opaque IDs returned by the authoritative CLI.
|
|
32335
32437
|
When they do not specify either setting, omit it so the target keeps its default.
|
|
32336
32438
|
|
|
32337
|
-
|
|
32439
|
+
For a new delegation, create an independent child session and submit the
|
|
32440
|
+
requested task. For an existing external session, resolve the target from the
|
|
32441
|
+
user-provided session link, identifier, or context and operate on that Thread
|
|
32442
|
+
directly; it need not have been created by the current assistant. If the target
|
|
32443
|
+
is ambiguous, ask the user to identify it. Keep requests to view or summarize a
|
|
32444
|
+
session read-only.
|
|
32338
32445
|
|
|
32339
|
-
|
|
32446
|
+
For a new or existing task, choose the appropriate next action based on the
|
|
32340
32447
|
user’s request and the task:
|
|
32341
32448
|
|
|
32342
32449
|
- send a follow-up message to the same Thread;
|
|
@@ -32346,10 +32453,11 @@ user’s request and the task:
|
|
|
32346
32453
|
- check it again later;
|
|
32347
32454
|
- leave it running in the background.
|
|
32348
32455
|
|
|
32349
|
-
When the result is needed, explicitly read the
|
|
32456
|
+
When the result is needed, explicitly read the target Thread. Report only the
|
|
32350
32457
|
visible result returned by that Thread.
|
|
32351
32458
|
|
|
32352
|
-
Provide the user with the necessary tracking information
|
|
32459
|
+
Provide the user with the necessary tracking information available from the
|
|
32460
|
+
CLI; omit unavailable fields rather than inventing them:
|
|
32353
32461
|
|
|
32354
32462
|
- target agent;
|
|
32355
32463
|
- \`delegationId\`;
|
|
@@ -35045,10 +35153,13 @@ async function runRemoteHostCli(input) {
|
|
|
35045
35153
|
var HARNESS_BROKER_PROTOCOL_VERSION = 1;
|
|
35046
35154
|
var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
|
|
35047
35155
|
var HARNESS_BROKER_MAX_PENDING_REQUESTS = 32;
|
|
35156
|
+
var HARNESS_BROKER_SESSION_IMPORT_PAGE_SIZE = 100;
|
|
35048
35157
|
var harnessBrokerMethodSchema = external_exports.enum([
|
|
35049
35158
|
"adapter.inspect",
|
|
35050
35159
|
"adapter.inspectAccount",
|
|
35051
35160
|
"adapter.open",
|
|
35161
|
+
"adapter.sessionImport.list",
|
|
35162
|
+
"adapter.sessionImport.resolve",
|
|
35052
35163
|
"adapter.subagent.readSnapshot",
|
|
35053
35164
|
"session.readSnapshot",
|
|
35054
35165
|
"session.refreshUsage",
|
|
@@ -35204,6 +35315,27 @@ var brokerOpenInputSchema = external_exports.discriminatedUnion("kind", [
|
|
|
35204
35315
|
rollbackSchema
|
|
35205
35316
|
]);
|
|
35206
35317
|
var brokerInspectInputSchema = external_exports.object({ cwd: cwdSchema.optional(), refresh: external_exports.boolean().optional() }).strict();
|
|
35318
|
+
var brokerSessionImportListParamsSchema = external_exports.object({
|
|
35319
|
+
offset: external_exports.number().int().nonnegative().safe(),
|
|
35320
|
+
limit: external_exports.number().int().min(1).max(HARNESS_BROKER_SESSION_IMPORT_PAGE_SIZE)
|
|
35321
|
+
}).strict();
|
|
35322
|
+
var brokerSessionImportResolveParamsSchema = external_exports.object({ nativeSessionId: harnessSessionImportIdSchema }).strict();
|
|
35323
|
+
var brokerSessionImportCandidatesSchema = external_exports.array(harnessSessionImportCandidateSchema);
|
|
35324
|
+
var brokerSessionImportPageSchema = external_exports.object({
|
|
35325
|
+
candidates: external_exports.array(harnessSessionImportCandidateSchema).max(HARNESS_BROKER_SESSION_IMPORT_PAGE_SIZE),
|
|
35326
|
+
total: external_exports.number().int().nonnegative().safe()
|
|
35327
|
+
}).strict();
|
|
35328
|
+
var brokerSessionImportSourceSchema = external_exports.object({
|
|
35329
|
+
candidate: harnessSessionImportCandidateSchema,
|
|
35330
|
+
nativeRef: nativeSessionRefSchema
|
|
35331
|
+
}).strict().superRefine((source, context) => {
|
|
35332
|
+
if (source.nativeRef.harnessId !== "claude-code" || source.nativeRef.nativeSessionId !== source.candidate.nativeSessionId) {
|
|
35333
|
+
context.addIssue({
|
|
35334
|
+
code: "custom",
|
|
35335
|
+
message: "Claude Session import source identity does not match"
|
|
35336
|
+
});
|
|
35337
|
+
}
|
|
35338
|
+
});
|
|
35207
35339
|
var textInputSchema = external_exports.object({ type: external_exports.literal("text"), text: external_exports.string().max(4e6) }).strict();
|
|
35208
35340
|
var turnStartSchema = external_exports.object({
|
|
35209
35341
|
type: external_exports.literal("turn.start"),
|
|
@@ -35702,6 +35834,50 @@ async function startHarnessBrokerServer(input) {
|
|
|
35702
35834
|
return { ok: false, error: harnessError("Claude subagents are unavailable", false) };
|
|
35703
35835
|
return subagents.readSnapshot(subagentReadSnapshotSchema.parse(request.params));
|
|
35704
35836
|
}
|
|
35837
|
+
if (request.method === "adapter.sessionImport.list") {
|
|
35838
|
+
const { limit, offset } = brokerSessionImportListParamsSchema.parse(request.params);
|
|
35839
|
+
const sessionImport = input.adapter.sessionImport;
|
|
35840
|
+
if (!sessionImport?.resolveCandidate) {
|
|
35841
|
+
return {
|
|
35842
|
+
ok: false,
|
|
35843
|
+
error: harnessError("Claude Session import is unavailable", false)
|
|
35844
|
+
};
|
|
35845
|
+
}
|
|
35846
|
+
if (offset === 0) {
|
|
35847
|
+
const result = await sessionImport.listCandidates();
|
|
35848
|
+
if (!result.ok)
|
|
35849
|
+
return result;
|
|
35850
|
+
state.sessionImportCandidates = result.value.map((candidate) => harnessSessionImportCandidateSchema.parse(candidate));
|
|
35851
|
+
}
|
|
35852
|
+
const candidates = state.sessionImportCandidates;
|
|
35853
|
+
if (!candidates) {
|
|
35854
|
+
return {
|
|
35855
|
+
ok: false,
|
|
35856
|
+
error: {
|
|
35857
|
+
code: "invalidState",
|
|
35858
|
+
message: "Claude Session import page snapshot is unavailable",
|
|
35859
|
+
retryable: true,
|
|
35860
|
+
stage: "harnessBroker.sessionImport"
|
|
35861
|
+
}
|
|
35862
|
+
};
|
|
35863
|
+
}
|
|
35864
|
+
const page = candidates.slice(offset, offset + limit);
|
|
35865
|
+
const total = candidates.length;
|
|
35866
|
+
if (offset + page.length >= total)
|
|
35867
|
+
delete state.sessionImportCandidates;
|
|
35868
|
+
return { ok: true, value: { candidates: page, total } };
|
|
35869
|
+
}
|
|
35870
|
+
if (request.method === "adapter.sessionImport.resolve") {
|
|
35871
|
+
const { nativeSessionId } = brokerSessionImportResolveParamsSchema.parse(request.params);
|
|
35872
|
+
const resolveCandidate = input.adapter.sessionImport?.resolveCandidate;
|
|
35873
|
+
if (!resolveCandidate) {
|
|
35874
|
+
return {
|
|
35875
|
+
ok: false,
|
|
35876
|
+
error: harnessError("Claude Session import is unavailable", false)
|
|
35877
|
+
};
|
|
35878
|
+
}
|
|
35879
|
+
return resolveCandidate(nativeSessionId);
|
|
35880
|
+
}
|
|
35705
35881
|
if (request.method === "adapter.open") {
|
|
35706
35882
|
const openInput = brokerOpenInputSchema.parse(request.params);
|
|
35707
35883
|
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) => {
|