@codexhost/cli-linux-arm64 0.9.2 → 0.10.1
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/THIRD_PARTY_NOTICES.txt +0 -4
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +49 -18
- package/app/host-runtime.mjs +1050 -673
- package/app/plugins/antigravity/plugin.mjs +18 -3
- package/app/plugins/claude-code/plugin.mjs +214 -7
- package/app/plugins/codebuddy/plugin.mjs +103 -5
- package/app/plugins/cursor-cli/plugin.mjs +152 -53
- package/app/plugins/deepseek-harness/plugin.mjs +622 -109
- package/app/plugins/enabled.json +2 -1
- package/app/plugins/grok/plugin.mjs +272 -79
- package/app/plugins/hermes/plugin.mjs +162 -63
- package/app/plugins/kimi-code/manifest.json +11 -0
- package/app/plugins/kimi-code/plugin.mjs +24226 -0
- package/app/plugins/kiro-cli/plugin.mjs +257 -65
- package/app/plugins/omp/plugin.mjs +407 -156
- package/app/plugins/opencode/plugin.mjs +18 -3
- package/app/plugins/pi/plugin.mjs +215 -5
- package/app/plugins/qoder/plugin.mjs +279 -187
- package/app/plugins/qoder-cn/plugin.mjs +279 -187
- package/app/plugins/workbuddy/plugin.mjs +102 -5
- package/app/renderer-extension.js +1445 -497
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/licenses/opencodex-LICENSE.txt +0 -21
|
@@ -15286,10 +15286,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
15286
15286
|
invocation: commandInvocationSchema,
|
|
15287
15287
|
label: commandLabelSchema,
|
|
15288
15288
|
description: commandDescriptionSchema.optional(),
|
|
15289
|
-
argumentMode: external_exports.enum(["none", "text"])
|
|
15289
|
+
argumentMode: external_exports.enum(["none", "text"]),
|
|
15290
|
+
/**
|
|
15291
|
+
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
15292
|
+
* not tell skills and commands apart; consumers treat that as "command".
|
|
15293
|
+
*/
|
|
15294
|
+
kind: external_exports.enum(["command", "skill"]).optional()
|
|
15290
15295
|
}).strict();
|
|
15291
15296
|
var harnessCommandCatalogSchema = external_exports.object({
|
|
15292
|
-
commands: external_exports.array(harnessCommandDescriptorSchema)
|
|
15297
|
+
commands: external_exports.array(harnessCommandDescriptorSchema),
|
|
15298
|
+
/**
|
|
15299
|
+
* `live` when the catalog includes what a native Session reports for its
|
|
15300
|
+
* workspace (custom commands, skills); `static` for Adapter built-ins only.
|
|
15301
|
+
* Omitted by Adapters; set by the Host on inspection results.
|
|
15302
|
+
*/
|
|
15303
|
+
source: external_exports.enum(["live", "static"]).optional()
|
|
15293
15304
|
}).strict().superRefine((catalog, context) => {
|
|
15294
15305
|
const ids = /* @__PURE__ */ new Set();
|
|
15295
15306
|
for (const [index, command] of catalog.commands.entries()) {
|
|
@@ -15303,7 +15314,11 @@ var harnessCommandCatalogSchema = external_exports.object({
|
|
|
15303
15314
|
ids.add(command.id);
|
|
15304
15315
|
}
|
|
15305
15316
|
});
|
|
15306
|
-
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
15317
|
+
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
15318
|
+
harnessId: harnessIdSchema,
|
|
15319
|
+
/** Workspace of a draft without a Thread, for its live catalog when known. */
|
|
15320
|
+
cwd: external_exports.string().min(1).optional()
|
|
15321
|
+
}).strict();
|
|
15307
15322
|
var threadCommandsInspectParamsSchema = external_exports.object({
|
|
15308
15323
|
threadId: hostThreadIdSchema
|
|
15309
15324
|
}).strict();
|
|
@@ -15282,10 +15282,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
15282
15282
|
invocation: commandInvocationSchema,
|
|
15283
15283
|
label: commandLabelSchema,
|
|
15284
15284
|
description: commandDescriptionSchema.optional(),
|
|
15285
|
-
argumentMode: external_exports.enum(["none", "text"])
|
|
15285
|
+
argumentMode: external_exports.enum(["none", "text"]),
|
|
15286
|
+
/**
|
|
15287
|
+
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
15288
|
+
* not tell skills and commands apart; consumers treat that as "command".
|
|
15289
|
+
*/
|
|
15290
|
+
kind: external_exports.enum(["command", "skill"]).optional()
|
|
15286
15291
|
}).strict();
|
|
15287
15292
|
var harnessCommandCatalogSchema = external_exports.object({
|
|
15288
|
-
commands: external_exports.array(harnessCommandDescriptorSchema)
|
|
15293
|
+
commands: external_exports.array(harnessCommandDescriptorSchema),
|
|
15294
|
+
/**
|
|
15295
|
+
* `live` when the catalog includes what a native Session reports for its
|
|
15296
|
+
* workspace (custom commands, skills); `static` for Adapter built-ins only.
|
|
15297
|
+
* Omitted by Adapters; set by the Host on inspection results.
|
|
15298
|
+
*/
|
|
15299
|
+
source: external_exports.enum(["live", "static"]).optional()
|
|
15289
15300
|
}).strict().superRefine((catalog, context) => {
|
|
15290
15301
|
const ids = /* @__PURE__ */ new Set();
|
|
15291
15302
|
for (const [index, command] of catalog.commands.entries()) {
|
|
@@ -15299,7 +15310,11 @@ var harnessCommandCatalogSchema = external_exports.object({
|
|
|
15299
15310
|
ids.add(command.id);
|
|
15300
15311
|
}
|
|
15301
15312
|
});
|
|
15302
|
-
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
15313
|
+
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
15314
|
+
harnessId: harnessIdSchema,
|
|
15315
|
+
/** Workspace of a draft without a Thread, for its live catalog when known. */
|
|
15316
|
+
cwd: external_exports.string().min(1).optional()
|
|
15317
|
+
}).strict();
|
|
15303
15318
|
var threadCommandsInspectParamsSchema = external_exports.object({
|
|
15304
15319
|
threadId: hostThreadIdSchema
|
|
15305
15320
|
}).strict();
|
|
@@ -15638,6 +15653,124 @@ function parseHostUsage(value) {
|
|
|
15638
15653
|
return { ...value };
|
|
15639
15654
|
}
|
|
15640
15655
|
|
|
15656
|
+
// ../../harness-adapter/dist/live-command-catalog.js
|
|
15657
|
+
var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
15658
|
+
// Session lifecycle
|
|
15659
|
+
"branch",
|
|
15660
|
+
"clear",
|
|
15661
|
+
"exit",
|
|
15662
|
+
"fork",
|
|
15663
|
+
"fresh",
|
|
15664
|
+
"new",
|
|
15665
|
+
"quit",
|
|
15666
|
+
"rename",
|
|
15667
|
+
"rename-chat",
|
|
15668
|
+
"reset",
|
|
15669
|
+
"resume",
|
|
15670
|
+
"rewind",
|
|
15671
|
+
"session",
|
|
15672
|
+
"sessions",
|
|
15673
|
+
// Desktop-owned configuration
|
|
15674
|
+
"autocompact",
|
|
15675
|
+
"color",
|
|
15676
|
+
"config",
|
|
15677
|
+
"effort",
|
|
15678
|
+
"fast",
|
|
15679
|
+
"keybindings",
|
|
15680
|
+
"model",
|
|
15681
|
+
"models",
|
|
15682
|
+
"output-style",
|
|
15683
|
+
"permissions",
|
|
15684
|
+
"settings",
|
|
15685
|
+
"statusline",
|
|
15686
|
+
"terminal-setup",
|
|
15687
|
+
"theme",
|
|
15688
|
+
"vim",
|
|
15689
|
+
// Trust and approval policy
|
|
15690
|
+
"always-approve",
|
|
15691
|
+
"auto-mode-setup",
|
|
15692
|
+
// Native login
|
|
15693
|
+
"login",
|
|
15694
|
+
"logout",
|
|
15695
|
+
// Work outliving the Turn
|
|
15696
|
+
"autopilot",
|
|
15697
|
+
"background",
|
|
15698
|
+
"bg",
|
|
15699
|
+
"goal",
|
|
15700
|
+
"jobs",
|
|
15701
|
+
"loop",
|
|
15702
|
+
"multitask",
|
|
15703
|
+
"queue",
|
|
15704
|
+
"remote-control",
|
|
15705
|
+
"schedule",
|
|
15706
|
+
"steer",
|
|
15707
|
+
// Native terminal UI
|
|
15708
|
+
"copy",
|
|
15709
|
+
"debug",
|
|
15710
|
+
"feedback",
|
|
15711
|
+
"heapdump",
|
|
15712
|
+
"share",
|
|
15713
|
+
"shell",
|
|
15714
|
+
// Plugin and MCP management
|
|
15715
|
+
"marketplace",
|
|
15716
|
+
"mcp",
|
|
15717
|
+
"plugins",
|
|
15718
|
+
"reload-plugins"
|
|
15719
|
+
]);
|
|
15720
|
+
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
15721
|
+
function isExcludedLiveCommand(name, kind, extra = {}) {
|
|
15722
|
+
const normalized = name.trim().replace(/^\//u, "");
|
|
15723
|
+
if (new Set(extra.names ?? []).has(normalized))
|
|
15724
|
+
return true;
|
|
15725
|
+
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
15726
|
+
return true;
|
|
15727
|
+
if (kind === "skill")
|
|
15728
|
+
return false;
|
|
15729
|
+
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
15730
|
+
}
|
|
15731
|
+
function liveHarnessCommandPrompt(catalog, idPrefix, commandId, argumentText) {
|
|
15732
|
+
if (!commandId.startsWith(idPrefix))
|
|
15733
|
+
return null;
|
|
15734
|
+
const descriptor = catalog.commands.find(({ id }) => id === commandId);
|
|
15735
|
+
if (!descriptor)
|
|
15736
|
+
return null;
|
|
15737
|
+
const text = typeof argumentText === "string" ? argumentText.trim() : "";
|
|
15738
|
+
return text ? `${descriptor.invocation} ${text}` : descriptor.invocation;
|
|
15739
|
+
}
|
|
15740
|
+
function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
15741
|
+
if (!live)
|
|
15742
|
+
return builtIns;
|
|
15743
|
+
const invocations = new Set(builtIns.commands.map(({ invocation }) => invocation));
|
|
15744
|
+
const ids = new Set(builtIns.commands.map(({ id }) => id));
|
|
15745
|
+
const dynamic = [];
|
|
15746
|
+
for (const command of live) {
|
|
15747
|
+
const name = command.name.trim().replace(/^\//u, "");
|
|
15748
|
+
if (!name || /\s/u.test(name))
|
|
15749
|
+
continue;
|
|
15750
|
+
if (isExcludedLiveCommand(name, command.kind, exclusions))
|
|
15751
|
+
continue;
|
|
15752
|
+
const invocation = `/${name}`;
|
|
15753
|
+
const id = `${idPrefix}${name.replace(/[^A-Za-z0-9._:-]/gu, "-")}`.slice(0, 128);
|
|
15754
|
+
if (invocations.has(invocation) || ids.has(id))
|
|
15755
|
+
continue;
|
|
15756
|
+
const description = command.description?.trim().slice(0, 512);
|
|
15757
|
+
const parsed = harnessCommandDescriptorSchema.safeParse({
|
|
15758
|
+
id,
|
|
15759
|
+
invocation,
|
|
15760
|
+
label: name.slice(0, 128),
|
|
15761
|
+
...description ? { description } : {},
|
|
15762
|
+
argumentMode: "text",
|
|
15763
|
+
kind: command.kind
|
|
15764
|
+
});
|
|
15765
|
+
if (!parsed.success)
|
|
15766
|
+
continue;
|
|
15767
|
+
invocations.add(invocation);
|
|
15768
|
+
ids.add(id);
|
|
15769
|
+
dynamic.push(parsed.data);
|
|
15770
|
+
}
|
|
15771
|
+
return harnessCommandCatalogSchema.parse({ commands: [...builtIns.commands, ...dynamic] });
|
|
15772
|
+
}
|
|
15773
|
+
|
|
15641
15774
|
// ../../harness-broker/dist/protocol.js
|
|
15642
15775
|
var HARNESS_BROKER_PROTOCOL_VERSION = 1;
|
|
15643
15776
|
var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
|
|
@@ -16433,6 +16566,7 @@ var BrokeredHarnessSession = class {
|
|
|
16433
16566
|
var BrokeredHarnessAdapter = class {
|
|
16434
16567
|
#sessions = /* @__PURE__ */ new Set();
|
|
16435
16568
|
commandCatalog;
|
|
16569
|
+
liveCommandCatalog;
|
|
16436
16570
|
harnessId;
|
|
16437
16571
|
#descriptorPath;
|
|
16438
16572
|
#forwardEnvironment;
|
|
@@ -16455,6 +16589,8 @@ var BrokeredHarnessAdapter = class {
|
|
|
16455
16589
|
this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
|
|
16456
16590
|
if (input.commandCatalog)
|
|
16457
16591
|
this.commandCatalog = input.commandCatalog;
|
|
16592
|
+
if (input.liveCommandCatalog)
|
|
16593
|
+
this.liveCommandCatalog = true;
|
|
16458
16594
|
this.#descriptorPath = input.descriptorPath ?? defaultHarnessBrokerDescriptorPath(input.environment, this.harnessId);
|
|
16459
16595
|
}
|
|
16460
16596
|
async inspectAccount() {
|
|
@@ -43897,6 +44033,51 @@ function isClaudePermissionMode(value) {
|
|
|
43897
44033
|
// dist/sdk-transport.js
|
|
43898
44034
|
import { spawn } from "node:child_process";
|
|
43899
44035
|
|
|
44036
|
+
// dist/slash-commands.js
|
|
44037
|
+
var DYNAMIC_ID_PREFIX = "claude.slash.";
|
|
44038
|
+
var CLAUDE_EXCLUDED_COMMANDS = [
|
|
44039
|
+
"advisor",
|
|
44040
|
+
"agents",
|
|
44041
|
+
"design-consent",
|
|
44042
|
+
"design-revoke",
|
|
44043
|
+
"doctor",
|
|
44044
|
+
"extra-usage",
|
|
44045
|
+
"import",
|
|
44046
|
+
"team-onboarding",
|
|
44047
|
+
"ultrareview",
|
|
44048
|
+
"usage-credits",
|
|
44049
|
+
"workflow-launch-exec"
|
|
44050
|
+
];
|
|
44051
|
+
function parseClaudeSlashCommands(value) {
|
|
44052
|
+
if (!Array.isArray(value))
|
|
44053
|
+
return [];
|
|
44054
|
+
return value.flatMap((entry) => {
|
|
44055
|
+
if (typeof entry !== "object" || entry === null)
|
|
44056
|
+
return [];
|
|
44057
|
+
const record2 = entry;
|
|
44058
|
+
const name = typeof record2.name === "string" ? record2.name.trim().replace(/^\//u, "") : "";
|
|
44059
|
+
if (!name)
|
|
44060
|
+
return [];
|
|
44061
|
+
return [
|
|
44062
|
+
{
|
|
44063
|
+
name,
|
|
44064
|
+
description: typeof record2.description === "string" ? record2.description : "",
|
|
44065
|
+
argumentHint: typeof record2.argumentHint === "string" ? record2.argumentHint : ""
|
|
44066
|
+
}
|
|
44067
|
+
];
|
|
44068
|
+
});
|
|
44069
|
+
}
|
|
44070
|
+
function claudeLiveCommandCatalog(builtIns, snapshot) {
|
|
44071
|
+
return mergeLiveHarnessCommands(builtIns, DYNAMIC_ID_PREFIX, snapshot?.commands.map((command) => ({
|
|
44072
|
+
name: command.name,
|
|
44073
|
+
description: command.description,
|
|
44074
|
+
kind: snapshot.skillNames.has(command.name) ? "skill" : "command"
|
|
44075
|
+
})) ?? null, { names: CLAUDE_EXCLUDED_COMMANDS });
|
|
44076
|
+
}
|
|
44077
|
+
function claudeDynamicCommandPrompt(catalog, commandId, argumentText) {
|
|
44078
|
+
return liveHarnessCommandPrompt(catalog, DYNAMIC_ID_PREFIX, commandId, argumentText);
|
|
44079
|
+
}
|
|
44080
|
+
|
|
43900
44081
|
// dist/account-usage.js
|
|
43901
44082
|
function projectClaudeAccountUsage(usage, account) {
|
|
43902
44083
|
if (!usage.rate_limits_available || !usage.rate_limits)
|
|
@@ -44979,6 +45160,8 @@ var ClaudeSdkTransport = class {
|
|
|
44979
45160
|
#interactionOrdinal = 0;
|
|
44980
45161
|
#provider;
|
|
44981
45162
|
#query = null;
|
|
45163
|
+
#slashCommands = null;
|
|
45164
|
+
#skillNames = /* @__PURE__ */ new Set();
|
|
44982
45165
|
#started = false;
|
|
44983
45166
|
#backgroundTasks = /* @__PURE__ */ new Set();
|
|
44984
45167
|
constructor(options) {
|
|
@@ -45051,7 +45234,8 @@ var ClaudeSdkTransport = class {
|
|
|
45051
45234
|
});
|
|
45052
45235
|
this.#query = activeQuery;
|
|
45053
45236
|
try {
|
|
45054
|
-
await activeQuery.initializationResult();
|
|
45237
|
+
const initialization = await activeQuery.initializationResult();
|
|
45238
|
+
this.#slashCommands = parseClaudeSlashCommands(initialization.commands);
|
|
45055
45239
|
this.#provider = (await activeQuery.accountInfo().catch(() => void 0))?.apiProvider;
|
|
45056
45240
|
} catch (error52) {
|
|
45057
45241
|
activeQuery.close();
|
|
@@ -45061,6 +45245,20 @@ var ClaudeSdkTransport = class {
|
|
|
45061
45245
|
this.#started = true;
|
|
45062
45246
|
this.#consumeTask = this.#consume(activeQuery);
|
|
45063
45247
|
}
|
|
45248
|
+
slashCommands() {
|
|
45249
|
+
if (!this.#started || this.#slashCommands === null)
|
|
45250
|
+
return null;
|
|
45251
|
+
return { commands: this.#slashCommands, skillNames: this.#skillNames };
|
|
45252
|
+
}
|
|
45253
|
+
#observeSlashCommands(message) {
|
|
45254
|
+
if (!isRecord7(message) || message.type !== "system")
|
|
45255
|
+
return;
|
|
45256
|
+
if (message.subtype === "init" && Array.isArray(message.skills)) {
|
|
45257
|
+
this.#skillNames = new Set(message.skills.filter((name) => typeof name === "string"));
|
|
45258
|
+
} else if (message.subtype === "commands_changed") {
|
|
45259
|
+
this.#slashCommands = parseClaudeSlashCommands(message.commands);
|
|
45260
|
+
}
|
|
45261
|
+
}
|
|
45064
45262
|
async getContextUsage() {
|
|
45065
45263
|
const activeQuery = this.#query;
|
|
45066
45264
|
if (!this.#started || !activeQuery)
|
|
@@ -45351,6 +45549,7 @@ var ClaudeSdkTransport = class {
|
|
|
45351
45549
|
try {
|
|
45352
45550
|
for await (const message of activeQuery) {
|
|
45353
45551
|
this.#observeBackgroundTasks(message);
|
|
45552
|
+
this.#observeSlashCommands(message);
|
|
45354
45553
|
const permissionMode = permissionModeFromMessage(message);
|
|
45355
45554
|
if (permissionMode && permissionMode !== this.#permissionMode) {
|
|
45356
45555
|
this.#permissionMode = permissionMode;
|
|
@@ -46302,7 +46501,7 @@ var ClaudeHarnessSession = class {
|
|
|
46302
46501
|
formatVersion: 1
|
|
46303
46502
|
});
|
|
46304
46503
|
this.commands = {
|
|
46305
|
-
list: async () => ({ ok: true, value:
|
|
46504
|
+
list: async () => ({ ok: true, value: this.#liveCommandCatalog() }),
|
|
46306
46505
|
execute: (command) => this.#executeHarnessCommand(command)
|
|
46307
46506
|
};
|
|
46308
46507
|
const durable = this.#openMode === "resume" || options.nativeRef !== void 0;
|
|
@@ -46538,11 +46737,17 @@ var ClaudeHarnessSession = class {
|
|
|
46538
46737
|
}
|
|
46539
46738
|
return { ok: true, value: { turnId: command.turnId } };
|
|
46540
46739
|
}
|
|
46740
|
+
/** Built-ins plus the live commands and skills of the started native Session. */
|
|
46741
|
+
#liveCommandCatalog() {
|
|
46742
|
+
return claudeLiveCommandCatalog(claudeCommandCatalog, this.#transport?.slashCommands?.() ?? null);
|
|
46743
|
+
}
|
|
46541
46744
|
async #executeHarnessCommand(command) {
|
|
46542
46745
|
if (this.#phase !== "open") {
|
|
46543
46746
|
return { ok: false, error: invalidState("Claude Code Session is not open") };
|
|
46544
46747
|
}
|
|
46545
|
-
const
|
|
46748
|
+
const argumentText = command.arguments?.text;
|
|
46749
|
+
const dynamicPrompt = claudeDynamicCommandPrompt(this.#liveCommandCatalog(), command.commandId, typeof argumentText === "string" ? argumentText : void 0);
|
|
46750
|
+
const parsed = dynamicPrompt === null ? parseClaudeHarnessCommand(command) : { ok: true, value: { id: "slash", text: dynamicPrompt } };
|
|
46546
46751
|
if (!parsed.ok)
|
|
46547
46752
|
return parsed;
|
|
46548
46753
|
if (this.#acceptingTurn || this.#active || this.#configurationTask || this.#readingHistory) {
|
|
@@ -46627,7 +46832,7 @@ var ClaudeHarnessSession = class {
|
|
|
46627
46832
|
this.#event({ type: "turn.started", turnId: command.turnId });
|
|
46628
46833
|
if (item)
|
|
46629
46834
|
this.#event({ type: "item.started", turnId: command.turnId, item });
|
|
46630
|
-
const running = parsed.value.id === "claude.compact" ? transport.compact(nativeTurnKey, parsed.value.text, (event) => this.#handleTurnEvent(active, event)) : parsed.value.id === "claude.init" ? transport.init(nativeTurnKey, (event) => this.#handleTurnEvent(active, event)) : transport.recap(nativeTurnKey, (event) => this.#handleTurnEvent(active, event));
|
|
46835
|
+
const running = parsed.value.id === "claude.compact" ? transport.compact(nativeTurnKey, parsed.value.text, (event) => this.#handleTurnEvent(active, event)) : parsed.value.id === "claude.init" ? transport.init(nativeTurnKey, (event) => this.#handleTurnEvent(active, event)) : parsed.value.id === "slash" ? transport.runTurn(parsed.value.text, nativeTurnKey, (event) => this.#handleTurnEvent(active, event)) : transport.recap(nativeTurnKey, (event) => this.#handleTurnEvent(active, event));
|
|
46631
46836
|
try {
|
|
46632
46837
|
void running.then((result) => this.#finishResult(active, result), () => this.#handleTurnTransportFailure(active));
|
|
46633
46838
|
} catch {
|
|
@@ -47936,6 +48141,7 @@ var ClaudeHarnessSession = class {
|
|
|
47936
48141
|
};
|
|
47937
48142
|
var ClaudeCodeAdapter = class {
|
|
47938
48143
|
commandCatalog = claudeCommandCatalog;
|
|
48144
|
+
liveCommandCatalog = true;
|
|
47939
48145
|
harnessId = claudeCodeHarnessId2;
|
|
47940
48146
|
sessionImport = Object.freeze({
|
|
47941
48147
|
listCandidates: async () => {
|
|
@@ -48480,6 +48686,7 @@ async function createHarnessAdapter(context) {
|
|
|
48480
48686
|
if (context.platform === "darwin" && context.managedRemoteHost) {
|
|
48481
48687
|
return new BrokeredHarnessAdapter({
|
|
48482
48688
|
commandCatalog: claudeCommandCatalog,
|
|
48689
|
+
liveCommandCatalog: true,
|
|
48483
48690
|
environment,
|
|
48484
48691
|
...context.brokerDescriptorPath ? { descriptorPath: context.brokerDescriptorPath } : {}
|
|
48485
48692
|
});
|
|
@@ -15277,10 +15277,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
15277
15277
|
invocation: commandInvocationSchema,
|
|
15278
15278
|
label: commandLabelSchema,
|
|
15279
15279
|
description: commandDescriptionSchema.optional(),
|
|
15280
|
-
argumentMode: external_exports.enum(["none", "text"])
|
|
15280
|
+
argumentMode: external_exports.enum(["none", "text"]),
|
|
15281
|
+
/**
|
|
15282
|
+
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
15283
|
+
* not tell skills and commands apart; consumers treat that as "command".
|
|
15284
|
+
*/
|
|
15285
|
+
kind: external_exports.enum(["command", "skill"]).optional()
|
|
15281
15286
|
}).strict();
|
|
15282
15287
|
var harnessCommandCatalogSchema = external_exports.object({
|
|
15283
|
-
commands: external_exports.array(harnessCommandDescriptorSchema)
|
|
15288
|
+
commands: external_exports.array(harnessCommandDescriptorSchema),
|
|
15289
|
+
/**
|
|
15290
|
+
* `live` when the catalog includes what a native Session reports for its
|
|
15291
|
+
* workspace (custom commands, skills); `static` for Adapter built-ins only.
|
|
15292
|
+
* Omitted by Adapters; set by the Host on inspection results.
|
|
15293
|
+
*/
|
|
15294
|
+
source: external_exports.enum(["live", "static"]).optional()
|
|
15284
15295
|
}).strict().superRefine((catalog, context) => {
|
|
15285
15296
|
const ids = /* @__PURE__ */ new Set();
|
|
15286
15297
|
for (const [index, command] of catalog.commands.entries()) {
|
|
@@ -15294,7 +15305,11 @@ var harnessCommandCatalogSchema = external_exports.object({
|
|
|
15294
15305
|
ids.add(command.id);
|
|
15295
15306
|
}
|
|
15296
15307
|
});
|
|
15297
|
-
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
15308
|
+
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
15309
|
+
harnessId: harnessIdSchema,
|
|
15310
|
+
/** Workspace of a draft without a Thread, for its live catalog when known. */
|
|
15311
|
+
cwd: external_exports.string().min(1).optional()
|
|
15312
|
+
}).strict();
|
|
15298
15313
|
var threadCommandsInspectParamsSchema = external_exports.object({
|
|
15299
15314
|
threadId: hostThreadIdSchema
|
|
15300
15315
|
}).strict();
|
|
@@ -15650,6 +15665,82 @@ function parseHostUsage(value) {
|
|
|
15650
15665
|
return { ...value };
|
|
15651
15666
|
}
|
|
15652
15667
|
|
|
15668
|
+
// ../../harness-adapter/dist/live-command-catalog.js
|
|
15669
|
+
var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
15670
|
+
// Session lifecycle
|
|
15671
|
+
"branch",
|
|
15672
|
+
"clear",
|
|
15673
|
+
"exit",
|
|
15674
|
+
"fork",
|
|
15675
|
+
"fresh",
|
|
15676
|
+
"new",
|
|
15677
|
+
"quit",
|
|
15678
|
+
"rename",
|
|
15679
|
+
"rename-chat",
|
|
15680
|
+
"reset",
|
|
15681
|
+
"resume",
|
|
15682
|
+
"rewind",
|
|
15683
|
+
"session",
|
|
15684
|
+
"sessions",
|
|
15685
|
+
// Desktop-owned configuration
|
|
15686
|
+
"autocompact",
|
|
15687
|
+
"color",
|
|
15688
|
+
"config",
|
|
15689
|
+
"effort",
|
|
15690
|
+
"fast",
|
|
15691
|
+
"keybindings",
|
|
15692
|
+
"model",
|
|
15693
|
+
"models",
|
|
15694
|
+
"output-style",
|
|
15695
|
+
"permissions",
|
|
15696
|
+
"settings",
|
|
15697
|
+
"statusline",
|
|
15698
|
+
"terminal-setup",
|
|
15699
|
+
"theme",
|
|
15700
|
+
"vim",
|
|
15701
|
+
// Trust and approval policy
|
|
15702
|
+
"always-approve",
|
|
15703
|
+
"auto-mode-setup",
|
|
15704
|
+
// Native login
|
|
15705
|
+
"login",
|
|
15706
|
+
"logout",
|
|
15707
|
+
// Work outliving the Turn
|
|
15708
|
+
"autopilot",
|
|
15709
|
+
"background",
|
|
15710
|
+
"bg",
|
|
15711
|
+
"goal",
|
|
15712
|
+
"jobs",
|
|
15713
|
+
"loop",
|
|
15714
|
+
"multitask",
|
|
15715
|
+
"queue",
|
|
15716
|
+
"remote-control",
|
|
15717
|
+
"schedule",
|
|
15718
|
+
"steer",
|
|
15719
|
+
// Native terminal UI
|
|
15720
|
+
"copy",
|
|
15721
|
+
"debug",
|
|
15722
|
+
"feedback",
|
|
15723
|
+
"heapdump",
|
|
15724
|
+
"share",
|
|
15725
|
+
"shell",
|
|
15726
|
+
// Plugin and MCP management
|
|
15727
|
+
"marketplace",
|
|
15728
|
+
"mcp",
|
|
15729
|
+
"plugins",
|
|
15730
|
+
"reload-plugins"
|
|
15731
|
+
]);
|
|
15732
|
+
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
15733
|
+
function isExcludedLiveCommand(name, kind, extra = {}) {
|
|
15734
|
+
const normalized = name.trim().replace(/^\//u, "");
|
|
15735
|
+
if (new Set(extra.names ?? []).has(normalized))
|
|
15736
|
+
return true;
|
|
15737
|
+
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
15738
|
+
return true;
|
|
15739
|
+
if (kind === "skill")
|
|
15740
|
+
return false;
|
|
15741
|
+
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
15742
|
+
}
|
|
15743
|
+
|
|
15653
15744
|
// dist/common.js
|
|
15654
15745
|
var CODEBUDDY_ID = harnessIdSchema.parse("codebuddy");
|
|
15655
15746
|
var CODEBUDDY_RUNTIME_PROFILE = {
|
|
@@ -15741,7 +15832,8 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
15741
15832
|
return {
|
|
15742
15833
|
commands: rows(value).flatMap((entry) => {
|
|
15743
15834
|
const name = text(entry.name).replace(/^\//u, "");
|
|
15744
|
-
|
|
15835
|
+
const skill = record2(entry._meta).type === "skill";
|
|
15836
|
+
if (excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name, skill ? "skill" : "command"))
|
|
15745
15837
|
return [];
|
|
15746
15838
|
const parsed = harnessCommandCatalogSchema.safeParse({
|
|
15747
15839
|
commands: [
|
|
@@ -15750,7 +15842,8 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
15750
15842
|
invocation: `/${name}`,
|
|
15751
15843
|
label: name,
|
|
15752
15844
|
...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
|
|
15753
|
-
argumentMode: name === "compact" || record2(entry.input).hint || record2(entry._meta).type === "skill" ? "text" : "none"
|
|
15845
|
+
argumentMode: name === "compact" || record2(entry.input).hint || record2(entry._meta).type === "skill" ? "text" : "none",
|
|
15846
|
+
...record2(entry._meta).type === "skill" ? { kind: "skill" } : {}
|
|
15754
15847
|
}
|
|
15755
15848
|
]
|
|
15756
15849
|
});
|
|
@@ -23389,6 +23482,7 @@ var CodeBuddyAdapter = class {
|
|
|
23389
23482
|
options;
|
|
23390
23483
|
harnessId;
|
|
23391
23484
|
commandCatalog;
|
|
23485
|
+
liveCommandCatalog = true;
|
|
23392
23486
|
subagents = {
|
|
23393
23487
|
readSnapshot: async ({ parent, nativeSubagentId, cwd }) => {
|
|
23394
23488
|
try {
|
|
@@ -24361,6 +24455,7 @@ var BrokeredHarnessSession = class {
|
|
|
24361
24455
|
var BrokeredHarnessAdapter = class {
|
|
24362
24456
|
#sessions = /* @__PURE__ */ new Set();
|
|
24363
24457
|
commandCatalog;
|
|
24458
|
+
liveCommandCatalog;
|
|
24364
24459
|
harnessId;
|
|
24365
24460
|
#descriptorPath;
|
|
24366
24461
|
#forwardEnvironment;
|
|
@@ -24383,6 +24478,8 @@ var BrokeredHarnessAdapter = class {
|
|
|
24383
24478
|
this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
|
|
24384
24479
|
if (input.commandCatalog)
|
|
24385
24480
|
this.commandCatalog = input.commandCatalog;
|
|
24481
|
+
if (input.liveCommandCatalog)
|
|
24482
|
+
this.liveCommandCatalog = true;
|
|
24386
24483
|
this.#descriptorPath = input.descriptorPath ?? defaultHarnessBrokerDescriptorPath(input.environment, this.harnessId);
|
|
24387
24484
|
}
|
|
24388
24485
|
async inspectAccount() {
|
|
@@ -24477,6 +24574,7 @@ function createHarnessAdapter(context) {
|
|
|
24477
24574
|
harnessId: "codebuddy",
|
|
24478
24575
|
forwardDelegationEnvironment: true,
|
|
24479
24576
|
commandCatalog: CODEBUDDY_COMMAND_CATALOG,
|
|
24577
|
+
liveCommandCatalog: true,
|
|
24480
24578
|
environment: { ...context.environment }
|
|
24481
24579
|
});
|
|
24482
24580
|
return new CodeBuddyAdapter({ environment: { ...context.environment } });
|