holycodex 0.8.0 → 0.8.1-dev.29750492041.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/dist/cli.js +70 -32
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -4059,7 +4059,11 @@ function detectPackageRunner(env = process.env) {
|
|
|
4059
4059
|
}
|
|
4060
4060
|
/** Builds the runner-specific codexslimedit invocation. */
|
|
4061
4061
|
function codexSlimEditInvocation(input) {
|
|
4062
|
-
const args = [
|
|
4062
|
+
const args = [
|
|
4063
|
+
input.packageVersion.includes("-dev.") ? "codexslimedit@dev" : "codexslimedit@latest",
|
|
4064
|
+
...input.includeVersion ? ["--version"] : [],
|
|
4065
|
+
...input.accessMode === void 0 ? [] : [`--${input.accessMode}`]
|
|
4066
|
+
];
|
|
4063
4067
|
return input.packageRunner === "bun" ? {
|
|
4064
4068
|
command: "bunx",
|
|
4065
4069
|
args
|
|
@@ -4087,7 +4091,7 @@ async function installCodexSlimEdit(input, env = process.env) {
|
|
|
4087
4091
|
}
|
|
4088
4092
|
//#endregion
|
|
4089
4093
|
//#region packages/cli/src/catalog.ts
|
|
4090
|
-
var VERSION = "0.8.
|
|
4094
|
+
var VERSION = "0.8.1-dev.29750492041.1";
|
|
4091
4095
|
var SKILLS = [
|
|
4092
4096
|
"ast-grep",
|
|
4093
4097
|
"caveman",
|
|
@@ -4161,7 +4165,12 @@ var RoutingPresetSchema = strictObject({
|
|
|
4161
4165
|
worker: ModelRouteSchema
|
|
4162
4166
|
}),
|
|
4163
4167
|
usage: strictObject({
|
|
4164
|
-
|
|
4168
|
+
maxSubagents: union([
|
|
4169
|
+
literal(0),
|
|
4170
|
+
literal(1),
|
|
4171
|
+
literal(2),
|
|
4172
|
+
literal(3)
|
|
4173
|
+
]),
|
|
4165
4174
|
maxDepth: literal(1)
|
|
4166
4175
|
})
|
|
4167
4176
|
});
|
|
@@ -4195,7 +4204,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4195
4204
|
}
|
|
4196
4205
|
},
|
|
4197
4206
|
usage: {
|
|
4198
|
-
|
|
4207
|
+
maxSubagents: 0,
|
|
4199
4208
|
maxDepth: 1
|
|
4200
4209
|
}
|
|
4201
4210
|
},
|
|
@@ -4219,14 +4228,14 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4219
4228
|
}
|
|
4220
4229
|
},
|
|
4221
4230
|
usage: {
|
|
4222
|
-
|
|
4231
|
+
maxSubagents: 1,
|
|
4223
4232
|
maxDepth: 1
|
|
4224
4233
|
}
|
|
4225
4234
|
},
|
|
4226
4235
|
plus: {
|
|
4227
4236
|
root: {
|
|
4228
4237
|
model: "gpt-5.6-sol",
|
|
4229
|
-
reasoningEffort: "
|
|
4238
|
+
reasoningEffort: "low"
|
|
4230
4239
|
},
|
|
4231
4240
|
agents: {
|
|
4232
4241
|
explorer: {
|
|
@@ -4243,7 +4252,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4243
4252
|
}
|
|
4244
4253
|
},
|
|
4245
4254
|
usage: {
|
|
4246
|
-
|
|
4255
|
+
maxSubagents: 2,
|
|
4247
4256
|
maxDepth: 1
|
|
4248
4257
|
}
|
|
4249
4258
|
},
|
|
@@ -4267,7 +4276,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4267
4276
|
}
|
|
4268
4277
|
},
|
|
4269
4278
|
usage: {
|
|
4270
|
-
|
|
4279
|
+
maxSubagents: 2,
|
|
4271
4280
|
maxDepth: 1
|
|
4272
4281
|
}
|
|
4273
4282
|
},
|
|
@@ -4291,7 +4300,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4291
4300
|
}
|
|
4292
4301
|
},
|
|
4293
4302
|
usage: {
|
|
4294
|
-
|
|
4303
|
+
maxSubagents: 2,
|
|
4295
4304
|
maxDepth: 1
|
|
4296
4305
|
}
|
|
4297
4306
|
},
|
|
@@ -4315,7 +4324,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4315
4324
|
}
|
|
4316
4325
|
},
|
|
4317
4326
|
usage: {
|
|
4318
|
-
|
|
4327
|
+
maxSubagents: 2,
|
|
4319
4328
|
maxDepth: 1
|
|
4320
4329
|
}
|
|
4321
4330
|
}
|
|
@@ -4462,11 +4471,12 @@ var GENERATED_RUNTIMES = [
|
|
|
4462
4471
|
];
|
|
4463
4472
|
var WINDOWS_SHELL_POLICY = "On native Windows, before the first shell action, inspect callable and deferred tools until `mcp__git_bash__run` is resolved. Use it for every shell command, including Git, Bash, POSIX, package, build, test, and script commands. If unavailable, stop and report the blocker. Never fall back to PowerShell or cmd.";
|
|
4464
4473
|
/** Provides effective mcp servers. */
|
|
4465
|
-
function effectiveMcpServers(platform, packageRunner = "bun") {
|
|
4474
|
+
function effectiveMcpServers(platform, packageRunner = "bun", accessMode = "workspace-write") {
|
|
4466
4475
|
const codexSlimEdit = codexSlimEditInvocation({
|
|
4467
4476
|
packageRunner,
|
|
4468
4477
|
platform,
|
|
4469
|
-
packageVersion: VERSION
|
|
4478
|
+
packageVersion: VERSION,
|
|
4479
|
+
accessMode
|
|
4470
4480
|
});
|
|
4471
4481
|
return {
|
|
4472
4482
|
...platform === "win32" ? { git_bash: {
|
|
@@ -4666,6 +4676,7 @@ var END = "# <<< holycodex managed <<<";
|
|
|
4666
4676
|
var ORIGINAL_ROOT = "# holycodex original root: ";
|
|
4667
4677
|
var ORIGINAL_TABLE_KEY = "# holycodex original table key: ";
|
|
4668
4678
|
var PLAN_PREFIX = "# holycodex plan: ";
|
|
4679
|
+
var MAX_SUBAGENTS_PREFIX = "# holycodex max-subagents: ";
|
|
4669
4680
|
var OLD_NAMESPACES = [
|
|
4670
4681
|
"marketplaces.sisyphuslabs",
|
|
4671
4682
|
"plugins.\"omo@sisyphuslabs\"",
|
|
@@ -4743,6 +4754,16 @@ function readManagedPlan(input) {
|
|
|
4743
4754
|
const value = new RegExp(`^${PLAN_PREFIX}(.+)$`, "m").exec(input)?.[1]?.trim();
|
|
4744
4755
|
return PLAN_NAMES.find((plan) => plan === value);
|
|
4745
4756
|
}
|
|
4757
|
+
/** Reads an explicit managed direct-subagent override. */
|
|
4758
|
+
function readManagedMaxSubagents(input) {
|
|
4759
|
+
const raw = new RegExp(`^${MAX_SUBAGENTS_PREFIX}(.*)$`, "m").exec(input)?.[1]?.trim();
|
|
4760
|
+
if (raw === void 0) return { configured: false };
|
|
4761
|
+
if (!/^[0-3]$/.test(raw)) return { configured: true };
|
|
4762
|
+
return {
|
|
4763
|
+
configured: true,
|
|
4764
|
+
value: Number(raw)
|
|
4765
|
+
};
|
|
4766
|
+
}
|
|
4746
4767
|
/** Identifies explicit Root route overrides preserved from active managed configuration. */
|
|
4747
4768
|
function readPreservedRootOverrides(input) {
|
|
4748
4769
|
const managedRoot = new RegExp(`^${START}\\r?\\n([\\s\\S]*?)^${END}\\r?$`, "m").exec(input)?.[1];
|
|
@@ -4797,7 +4818,7 @@ function mergedStatusLine(original) {
|
|
|
4797
4818
|
return `[${items.map((item) => JSON.stringify(item)).join(", ")}]`;
|
|
4798
4819
|
}
|
|
4799
4820
|
/** Installs config. */
|
|
4800
|
-
function installConfig(input, mode, _platform, plan = DEFAULT_PLAN) {
|
|
4821
|
+
function installConfig(input, mode, _platform, plan = DEFAULT_PLAN, maxSubagents) {
|
|
4801
4822
|
const base = preserveManagedRootPreferences(input, removeLegacyOmo(removeManaged(input)));
|
|
4802
4823
|
const firstTable = base.search(/^\s*\[/m);
|
|
4803
4824
|
const root = firstTable < 0 ? base : base.slice(0, firstTable);
|
|
@@ -4814,17 +4835,20 @@ function installConfig(input, mode, _platform, plan = DEFAULT_PLAN) {
|
|
|
4814
4835
|
const hasEffort = /^\s*model_reasoning_effort\s*=/m.test(preservedRoot);
|
|
4815
4836
|
const hasVerbosity = /^\s*model_verbosity\s*=/m.test(preservedRoot);
|
|
4816
4837
|
const rootRoute = MODEL_ROUTING_PLANS[plan].root;
|
|
4838
|
+
const effectiveMaxSubagents = maxSubagents ?? MODEL_ROUTING_PLANS[plan].usage.maxSubagents;
|
|
4817
4839
|
const model = hasModel ? "" : `model = "${rootRoute.model}"\n`;
|
|
4818
4840
|
const effort = hasEffort ? "" : `model_reasoning_effort = "${rootRoute.reasoningEffort}"\n`;
|
|
4819
4841
|
const verbosity = hasVerbosity ? "" : "model_verbosity = \"low\"\n";
|
|
4820
4842
|
const approval = mode === "default" ? "on-request" : "never";
|
|
4821
4843
|
const sandbox = mode === "dangerous" ? "danger-full-access" : "workspace-write";
|
|
4822
|
-
|
|
4844
|
+
const original = originalRoot ? `${ORIGINAL_ROOT}${Buffer.from(originalRoot).toString("base64")}\n` : "";
|
|
4845
|
+
const preserved = preservedRoot ? `${preservedRoot}\n` : "";
|
|
4846
|
+
let configured = `${`${START}\n${PLAN_PREFIX}${plan}\n${maxSubagents === void 0 ? "" : `${MAX_SUBAGENTS_PREFIX}${maxSubagents}\n`}${original}${model}${effort}${verbosity}${preserved}approval_policy = "${approval}"\nsandbox_mode = "${sandbox}"\nstatus_line = ${mergedStatusLine(controlled[3])}\n${END}`}${tables ? `\n\n${tables}` : ""}`;
|
|
4823
4847
|
configured = injectTableKey(configured, "features", "default_mode_request_user_input", "true");
|
|
4824
4848
|
configured = injectTableKey(configured, "features", "multi_agent", "true");
|
|
4825
4849
|
configured = injectTableKey(configured, "features", "multi_agent_v2", "true");
|
|
4826
4850
|
const usage = MODEL_ROUTING_PLANS[plan].usage;
|
|
4827
|
-
configured = injectTableKey(configured, "agents", "max_threads", String(
|
|
4851
|
+
configured = injectTableKey(configured, "agents", "max_threads", String(effectiveMaxSubagents + 1));
|
|
4828
4852
|
configured = injectTableKey(configured, "agents", "max_depth", String(usage.maxDepth));
|
|
4829
4853
|
if (mode !== "dangerous") configured = injectTableKey(configured, "sandbox_workspace_write", "network_access", "true");
|
|
4830
4854
|
for (const agent of AGENTS) configured = injectTableKey(configured, `agents.${agent}`, "config_file", `"holycodex/agents/${agent}.toml"`);
|
|
@@ -4937,6 +4961,13 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
4937
4961
|
const pluginRoot = join(home, "plugins", "cache", "holycodex", "holycodex", VERSION);
|
|
4938
4962
|
const agentRoot = join(home, "holycodex", "agents");
|
|
4939
4963
|
const configPath = join(home, "config.toml");
|
|
4964
|
+
let config = "";
|
|
4965
|
+
let configAvailable = true;
|
|
4966
|
+
try {
|
|
4967
|
+
config = await readFile(configPath, "utf8");
|
|
4968
|
+
} catch {
|
|
4969
|
+
configAvailable = false;
|
|
4970
|
+
}
|
|
4940
4971
|
const missing = await missingFiles(pluginRoot, [
|
|
4941
4972
|
".codex-plugin/plugin.json",
|
|
4942
4973
|
".mcp.json",
|
|
@@ -4962,7 +4993,8 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
4962
4993
|
checks.push(configured === void 0 || expected === void 0 ? check(`mcp-${name}`, "error", "missing-required-mcp", `${name} is not configured.`, "Reinstall HolyCodex.") : !mcpConfigMatches(configured, expected) ? check(`mcp-${name}`, "error", "invalid-required-mcp-config", `${name} configuration is stale or contains unsupported settings.`, "Reinstall HolyCodex.") : check(`mcp-${name}`, "ok", "required-mcp-ready", `${name} is configured locally.`));
|
|
4963
4994
|
}
|
|
4964
4995
|
const codexSlimEdit = servers?.codexslimedit;
|
|
4965
|
-
const
|
|
4996
|
+
const codexSlimEditAccess = autonomy(config) === "dangerous" ? "full-access" : "workspace-write";
|
|
4997
|
+
const codexSlimEditConfig = ["bun", "npm"].map((runner) => effectiveMcpServers(runtime.platform, runner, codexSlimEditAccess).codexslimedit).find((expected) => {
|
|
4966
4998
|
return expected !== void 0 && codexSlimEdit !== void 0 && mcpConfigMatches(codexSlimEdit, expected);
|
|
4967
4999
|
});
|
|
4968
5000
|
const codexSlimEditStarted = codexSlimEditConfig === void 0 ? void 0 : await runtime.command(codexSlimEditConfig.command, [...codexSlimEditConfig.args, "--version"]);
|
|
@@ -4997,19 +5029,16 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
4997
5029
|
const gitBash = runtime.gitBash();
|
|
4998
5030
|
checks.push(gitBash.found ? check("git-bash", "ok", "git-bash-ready", `Git Bash: ${gitBash.path ?? "configured"}.`) : check("git-bash", "error", "missing-git-bash", "Git Bash is required on Windows but unavailable.", gitBash.installHint));
|
|
4999
5031
|
} else checks.push(check("git-bash", "ok", "git-bash-not-applicable", "Git Bash is not applicable on this platform."));
|
|
5000
|
-
|
|
5001
|
-
try {
|
|
5002
|
-
config = await readFile(configPath, "utf8");
|
|
5003
|
-
} catch {
|
|
5004
|
-
checks.push(check("codex-config", "error", "missing-codex-config", `Missing ${configPath}.`, "Run holycodex install."));
|
|
5005
|
-
}
|
|
5032
|
+
if (!configAvailable) checks.push(check("codex-config", "error", "missing-codex-config", `Missing ${configPath}.`, "Run holycodex install."));
|
|
5006
5033
|
const mode = autonomy(config);
|
|
5007
5034
|
const plan = readManagedPlan(config);
|
|
5008
5035
|
checks.push(plan === void 0 ? check("routing-plan", "error", "routing-plan-missing", "No managed model routing plan is recorded.", "Rerun holycodex install.") : check("routing-plan", "ok", "routing-plan-ready", `Model routing plan ${plan} is active.`));
|
|
5009
5036
|
const preset = plan === void 0 ? void 0 : MODEL_ROUTING_PLANS[plan];
|
|
5037
|
+
const managedMaxSubagents = readManagedMaxSubagents(config);
|
|
5038
|
+
const expectedMaxSubagents = managedMaxSubagents.configured ? managedMaxSubagents.value : preset?.usage.maxSubagents;
|
|
5010
5039
|
const rootOverrides = readPreservedRootOverrides(config);
|
|
5011
5040
|
checks.push(preset !== void 0 && rootTomlString(config, "model") === preset.root.model && rootTomlString(config, "model_reasoning_effort") === preset.root.reasoningEffort ? check("root-model", "ok", "root-model-ready", "Root model matches the selected routing plan.") : rootOverrides.model || rootOverrides.reasoningEffort ? check("root-model", "ok", "root-model-override", "Root model uses an intentionally preserved explicit override.") : check("root-model", "error", "root-model-stale", "Root model configuration does not match the selected routing plan.", "Reinstall HolyCodex."));
|
|
5012
|
-
checks.push(preset === void 0 || tableInteger(config, "agents", "max_threads") !==
|
|
5041
|
+
checks.push(preset === void 0 || expectedMaxSubagents === void 0 || tableInteger(config, "agents", "max_threads") !== expectedMaxSubagents + 1 || tableInteger(config, "agents", "max_depth") !== preset.usage.maxDepth ? check("agent-usage", "error", "agent-usage-stale", "Agent concurrency configuration does not match the selected routing plan or explicit override.", "Reinstall HolyCodex.") : check("agent-usage", "ok", "agent-usage-ready", `Agent concurrency allows ${expectedMaxSubagents} direct subagent${expectedMaxSubagents === 1 ? "" : "s"}.`));
|
|
5013
5042
|
checks.push(mode === "unknown" ? check("autonomy", "error", "invalid-autonomy-config", "Approval, sandbox, and network settings do not match a supported mode.", "Rerun install with the intended autonomy flag.") : mode === "dangerous" ? check("autonomy", "warning", "dangerous-autonomy", "Explicit dangerous autonomy is active; workspace containment is removed.") : check("autonomy", "ok", `${mode}-ready`, mode === "safe-workspace" ? "Safe workspace autonomy is active." : "Approval-free workspace autonomy is active."));
|
|
5014
5043
|
checks.push(tableBoolean(config, "features", "default_mode_request_user_input") === true ? check("user-input", "ok", "user-input-ready", "default_mode_request_user_input is enabled.") : check("user-input", "error", "user-input-disabled", "default_mode_request_user_input is not enabled.", "Rerun holycodex install."));
|
|
5015
5044
|
checks.push(rootTomlStringArray(config, "status_line")?.includes("context-remaining") === true ? check("context-visibility", "warning", "context-visible-support-unverified", "status_line includes context-remaining. Current official Codex config documents this item, but publishes no minimum compatible Codex version.") : check("context-visibility", "error", "context-hidden", "status_line does not include context-remaining.", "Rerun holycodex install."));
|
|
@@ -5126,7 +5155,8 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5126
5155
|
].filter((path) => path !== void 0);
|
|
5127
5156
|
const existingConfig = await readText(target.config);
|
|
5128
5157
|
const previousPlan = readManagedPlan(existingConfig);
|
|
5129
|
-
const
|
|
5158
|
+
const maxSubagents = options.maxSubagents ?? MODEL_ROUTING_PLANS[plan].usage.maxSubagents;
|
|
5159
|
+
const config = installConfig(existingConfig, options.autonomy, runtime.platform, plan, options.maxSubagents);
|
|
5130
5160
|
await atomicWrite(target.config, config);
|
|
5131
5161
|
await rm(target.marketplaceCache, {
|
|
5132
5162
|
recursive: true,
|
|
@@ -5134,7 +5164,7 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5134
5164
|
});
|
|
5135
5165
|
await mkdir(dirname(target.cache), { recursive: true });
|
|
5136
5166
|
await cp(pluginRoot, target.cache, { recursive: true });
|
|
5137
|
-
await writePlatformPlugin(target.cache, runtime.platform, plan, runtime.packageRunner);
|
|
5167
|
+
await writePlatformPlugin(target.cache, runtime.platform, plan, runtime.packageRunner, options.autonomy);
|
|
5138
5168
|
const existingAgentPreferences = await readAgentPreferences(target.agents, previousPlan);
|
|
5139
5169
|
await rm(target.agents, {
|
|
5140
5170
|
recursive: true,
|
|
@@ -5158,7 +5188,8 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5158
5188
|
...removedLegacy
|
|
5159
5189
|
],
|
|
5160
5190
|
backups,
|
|
5161
|
-
plan
|
|
5191
|
+
plan,
|
|
5192
|
+
maxSubagents
|
|
5162
5193
|
};
|
|
5163
5194
|
}
|
|
5164
5195
|
async function readAgentPreferences(root, previousPlan) {
|
|
@@ -5189,8 +5220,8 @@ async function preserveAgentPreferences(root, preferences) {
|
|
|
5189
5220
|
function replaceTomlString(input, key, value) {
|
|
5190
5221
|
return input.replace(new RegExp(`^${key}\\s*=.*$`, "m"), `${key} = ${JSON.stringify(value)}`);
|
|
5191
5222
|
}
|
|
5192
|
-
async function writePlatformPlugin(root, platform, plan, packageRunner) {
|
|
5193
|
-
await atomicWrite(join(root, ".mcp.json"), `${JSON.stringify({ mcpServers: effectiveMcpServers(platform, packageRunner) }, null, 2)}\n`);
|
|
5223
|
+
async function writePlatformPlugin(root, platform, plan, packageRunner, autonomy) {
|
|
5224
|
+
await atomicWrite(join(root, ".mcp.json"), `${JSON.stringify({ mcpServers: effectiveMcpServers(platform, packageRunner, autonomy === "dangerous" ? "full-access" : "workspace-write") }, null, 2)}\n`);
|
|
5194
5225
|
await writeInstalledAgents(join(root, "agents"), platform, plan);
|
|
5195
5226
|
}
|
|
5196
5227
|
async function writeInstalledAgents(root, platform, plan) {
|
|
@@ -5270,13 +5301,13 @@ function renderHelp(version, color) {
|
|
|
5270
5301
|
const title = paint(color, `${BOLD}${CYAN}`, `HOLYCODEX ${version}`);
|
|
5271
5302
|
const section = (text) => paint(color, BOLD, text);
|
|
5272
5303
|
const muted = (text) => paint(color, DIM, text);
|
|
5273
|
-
return `${title}\n${muted("Lean Codex toolkit installer and doctor")}\n\n${section("USAGE")}\n holycodex <command> [options]\n\n${section("COMMANDS")}\n install Install or update HolyCodex\n cleanup Remove HolyCodex-owned state\n doctor Diagnose installation and runtime\n\n${section("OPTIONS")}\n --plan <plan> Model routing plan for install: ${PLAN_HELP}\n Default: ${DEFAULT_PLAN}\n -h, --help Show help\n -v, --version Show version\n --no-tui Accepted; commands remain noninteractive\n --codex-autonomous Never ask; keep workspace sandbox\n --no-codex-autonomous Safe interactive defaults\n --dangerous-codex-autonomous Never ask; disable filesystem sandbox\n --json Print machine-readable output\n`;
|
|
5304
|
+
return `${title}\n${muted("Lean Codex toolkit installer and doctor")}\n\n${section("USAGE")}\n holycodex <command> [options]\n\n${section("COMMANDS")}\n install Install or update HolyCodex\n cleanup Remove HolyCodex-owned state\n doctor Diagnose installation and runtime\n\n${section("OPTIONS")}\n --plan <plan> Model routing plan for install: ${PLAN_HELP}\n Default: ${DEFAULT_PLAN}\n --max-subagents <0-3> Override concurrent direct subagents for install\n -h, --help Show help\n -v, --version Show version\n --no-tui Accepted; commands remain noninteractive\n --codex-autonomous Never ask; keep workspace sandbox\n --no-codex-autonomous Safe interactive defaults\n --dangerous-codex-autonomous Never ask; disable filesystem sandbox\n --json Print machine-readable output\n`;
|
|
5274
5305
|
}
|
|
5275
5306
|
/** Renders install-specific model plan and option help. */
|
|
5276
5307
|
function renderInstallHelp(version, color) {
|
|
5277
5308
|
const title = paint(color, `${BOLD}${CYAN}`, `HOLYCODEX ${version}`);
|
|
5278
5309
|
const section = (text) => paint(color, BOLD, text);
|
|
5279
|
-
return `${title}\n\n${section("Usage:")}\n holycodex install [options]\n\n${section("Options:")}\n --plan <plan> Model routing plan: ${PLAN_HELP}\n Default: ${DEFAULT_PLAN}\n --json Print machine-readable output\n --no-tui Accepted; install remains noninteractive\n --codex-autonomous Never ask; keep workspace sandbox\n --no-codex-autonomous Safe interactive defaults\n --dangerous-codex-autonomous Never ask; disable filesystem sandbox\n -h, --help Show help\n\nPlans provide increasing expected model usage and capability.\n\n${section("Examples:")}\n bunx holycodex install\n bunx holycodex install --plan go\n bunx holycodex install --plan plus-low\n bunx holycodex install --plan plus-high\n bunx holycodex install --plan pro-5x\n bunx holycodex install --plan pro-20x\n`;
|
|
5310
|
+
return `${title}\n\n${section("Usage:")}\n holycodex install [options]\n\n${section("Options:")}\n --plan <plan> Model routing plan: ${PLAN_HELP}\n Default: ${DEFAULT_PLAN}\n --max-subagents <0-3> Override concurrent direct subagents\n --json Print machine-readable output\n --no-tui Accepted; install remains noninteractive\n --codex-autonomous Never ask; keep workspace sandbox\n --no-codex-autonomous Safe interactive defaults\n --dangerous-codex-autonomous Never ask; disable filesystem sandbox\n -h, --help Show help\n\nPlans provide increasing expected model usage and capability.\n\n${section("Examples:")}\n bunx holycodex install\n bunx holycodex install --plan go\n bunx holycodex install --plan plus-low\n bunx holycodex install --plan plus-high\n bunx holycodex install --plan pro-5x\n bunx holycodex install --plan pro-20x\n`;
|
|
5280
5311
|
}
|
|
5281
5312
|
/** Renders error. */
|
|
5282
5313
|
function renderError(message, color) {
|
|
@@ -5304,7 +5335,7 @@ async function main() {
|
|
|
5304
5335
|
const args = process$1.argv.slice(2);
|
|
5305
5336
|
const stdoutColor = supportsColor(process$1.stdout.isTTY, process$1.env.NO_COLOR);
|
|
5306
5337
|
const stderrColor = supportsColor(process$1.stderr.isTTY, process$1.env.NO_COLOR);
|
|
5307
|
-
const command = args.find((arg, index) => !arg.startsWith("-") && args[index - 1] !== "--plan");
|
|
5338
|
+
const command = args.find((arg, index) => !arg.startsWith("-") && args[index - 1] !== "--plan" && args[index - 1] !== "--max-subagents");
|
|
5308
5339
|
if (args.includes("--help") || args.includes("-h") || args.length === 0) {
|
|
5309
5340
|
process$1.stdout.write(command === "install" ? renderInstallHelp(VERSION, stdoutColor) : renderHelp(VERSION, stdoutColor));
|
|
5310
5341
|
return;
|
|
@@ -5320,6 +5351,12 @@ async function main() {
|
|
|
5320
5351
|
const parsedPlan = PlanNameSchema.safeParse(planValue);
|
|
5321
5352
|
if (!parsedPlan.success) throw new Error(`Unknown plan: ${planValue}. Valid plans: ${PLAN_NAMES.join(", ")}.`);
|
|
5322
5353
|
const plan = parsedPlan.data;
|
|
5354
|
+
if (args.flatMap((arg, index) => arg === "--max-subagents" ? [index] : []).length > 1) throw new Error("--max-subagents may be specified only once.");
|
|
5355
|
+
const maxSubagentsIndex = args.indexOf("--max-subagents");
|
|
5356
|
+
const maxSubagentsValue = maxSubagentsIndex < 0 ? void 0 : args[maxSubagentsIndex + 1];
|
|
5357
|
+
if (maxSubagentsIndex >= 0 && (maxSubagentsValue === void 0 || maxSubagentsValue.startsWith("-") || maxSubagentsValue === command)) throw new Error("Missing --max-subagents value. Valid range: 0-3.");
|
|
5358
|
+
if (maxSubagentsValue !== void 0 && !/^[0-3]$/.test(maxSubagentsValue)) throw new Error(`Invalid --max-subagents value: ${maxSubagentsValue}. Valid range: 0-3.`);
|
|
5359
|
+
const maxSubagents = maxSubagentsValue === void 0 ? void 0 : Number(maxSubagentsValue);
|
|
5323
5360
|
const autonomyFlags = args.filter((arg) => [
|
|
5324
5361
|
"--codex-autonomous",
|
|
5325
5362
|
"--no-codex-autonomous",
|
|
@@ -5333,7 +5370,8 @@ async function main() {
|
|
|
5333
5370
|
const options = {
|
|
5334
5371
|
autonomy: args.includes("--dangerous-codex-autonomous") ? "dangerous" : args.includes("--codex-autonomous") ? "autonomous" : "default",
|
|
5335
5372
|
json: args.includes("--json"),
|
|
5336
|
-
plan
|
|
5373
|
+
plan,
|
|
5374
|
+
...maxSubagents === void 0 ? {} : { maxSubagents }
|
|
5337
5375
|
};
|
|
5338
5376
|
if (command === "doctor") {
|
|
5339
5377
|
const result = await doctor();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "holycodex",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-dev.29750492041.1",
|
|
4
4
|
"description": "Lean Codex-only agent toolkit installer and doctor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"prepack": "vp run --workspace-root build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@holycodex/plugin": "0.8.
|
|
42
|
+
"@holycodex/plugin": "0.8.1-dev.29750492041.1",
|
|
43
43
|
"zod": "^4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|