holycodex 0.8.1-dev.29750492041.1 → 0.8.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 +32 -70
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -4059,11 +4059,7 @@ function detectPackageRunner(env = process.env) {
|
|
|
4059
4059
|
}
|
|
4060
4060
|
/** Builds the runner-specific codexslimedit invocation. */
|
|
4061
4061
|
function codexSlimEditInvocation(input) {
|
|
4062
|
-
const args = [
|
|
4063
|
-
input.packageVersion.includes("-dev.") ? "codexslimedit@dev" : "codexslimedit@latest",
|
|
4064
|
-
...input.includeVersion ? ["--version"] : [],
|
|
4065
|
-
...input.accessMode === void 0 ? [] : [`--${input.accessMode}`]
|
|
4066
|
-
];
|
|
4062
|
+
const args = [input.packageVersion.includes("-dev.") ? "codexslimedit@dev" : "codexslimedit@latest", ...input.includeVersion ? ["--version"] : []];
|
|
4067
4063
|
return input.packageRunner === "bun" ? {
|
|
4068
4064
|
command: "bunx",
|
|
4069
4065
|
args
|
|
@@ -4091,7 +4087,7 @@ async function installCodexSlimEdit(input, env = process.env) {
|
|
|
4091
4087
|
}
|
|
4092
4088
|
//#endregion
|
|
4093
4089
|
//#region packages/cli/src/catalog.ts
|
|
4094
|
-
var VERSION = "0.8.1
|
|
4090
|
+
var VERSION = "0.8.1";
|
|
4095
4091
|
var SKILLS = [
|
|
4096
4092
|
"ast-grep",
|
|
4097
4093
|
"caveman",
|
|
@@ -4165,12 +4161,7 @@ var RoutingPresetSchema = strictObject({
|
|
|
4165
4161
|
worker: ModelRouteSchema
|
|
4166
4162
|
}),
|
|
4167
4163
|
usage: strictObject({
|
|
4168
|
-
|
|
4169
|
-
literal(0),
|
|
4170
|
-
literal(1),
|
|
4171
|
-
literal(2),
|
|
4172
|
-
literal(3)
|
|
4173
|
-
]),
|
|
4164
|
+
maxThreads: union([literal(1), literal(2)]),
|
|
4174
4165
|
maxDepth: literal(1)
|
|
4175
4166
|
})
|
|
4176
4167
|
});
|
|
@@ -4204,7 +4195,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4204
4195
|
}
|
|
4205
4196
|
},
|
|
4206
4197
|
usage: {
|
|
4207
|
-
|
|
4198
|
+
maxThreads: 1,
|
|
4208
4199
|
maxDepth: 1
|
|
4209
4200
|
}
|
|
4210
4201
|
},
|
|
@@ -4228,14 +4219,14 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4228
4219
|
}
|
|
4229
4220
|
},
|
|
4230
4221
|
usage: {
|
|
4231
|
-
|
|
4222
|
+
maxThreads: 2,
|
|
4232
4223
|
maxDepth: 1
|
|
4233
4224
|
}
|
|
4234
4225
|
},
|
|
4235
4226
|
plus: {
|
|
4236
4227
|
root: {
|
|
4237
4228
|
model: "gpt-5.6-sol",
|
|
4238
|
-
reasoningEffort: "
|
|
4229
|
+
reasoningEffort: "medium"
|
|
4239
4230
|
},
|
|
4240
4231
|
agents: {
|
|
4241
4232
|
explorer: {
|
|
@@ -4252,7 +4243,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4252
4243
|
}
|
|
4253
4244
|
},
|
|
4254
4245
|
usage: {
|
|
4255
|
-
|
|
4246
|
+
maxThreads: 2,
|
|
4256
4247
|
maxDepth: 1
|
|
4257
4248
|
}
|
|
4258
4249
|
},
|
|
@@ -4276,7 +4267,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4276
4267
|
}
|
|
4277
4268
|
},
|
|
4278
4269
|
usage: {
|
|
4279
|
-
|
|
4270
|
+
maxThreads: 2,
|
|
4280
4271
|
maxDepth: 1
|
|
4281
4272
|
}
|
|
4282
4273
|
},
|
|
@@ -4300,7 +4291,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4300
4291
|
}
|
|
4301
4292
|
},
|
|
4302
4293
|
usage: {
|
|
4303
|
-
|
|
4294
|
+
maxThreads: 2,
|
|
4304
4295
|
maxDepth: 1
|
|
4305
4296
|
}
|
|
4306
4297
|
},
|
|
@@ -4324,7 +4315,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4324
4315
|
}
|
|
4325
4316
|
},
|
|
4326
4317
|
usage: {
|
|
4327
|
-
|
|
4318
|
+
maxThreads: 2,
|
|
4328
4319
|
maxDepth: 1
|
|
4329
4320
|
}
|
|
4330
4321
|
}
|
|
@@ -4471,12 +4462,11 @@ var GENERATED_RUNTIMES = [
|
|
|
4471
4462
|
];
|
|
4472
4463
|
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.";
|
|
4473
4464
|
/** Provides effective mcp servers. */
|
|
4474
|
-
function effectiveMcpServers(platform, packageRunner = "bun"
|
|
4465
|
+
function effectiveMcpServers(platform, packageRunner = "bun") {
|
|
4475
4466
|
const codexSlimEdit = codexSlimEditInvocation({
|
|
4476
4467
|
packageRunner,
|
|
4477
4468
|
platform,
|
|
4478
|
-
packageVersion: VERSION
|
|
4479
|
-
accessMode
|
|
4469
|
+
packageVersion: VERSION
|
|
4480
4470
|
});
|
|
4481
4471
|
return {
|
|
4482
4472
|
...platform === "win32" ? { git_bash: {
|
|
@@ -4676,7 +4666,6 @@ var END = "# <<< holycodex managed <<<";
|
|
|
4676
4666
|
var ORIGINAL_ROOT = "# holycodex original root: ";
|
|
4677
4667
|
var ORIGINAL_TABLE_KEY = "# holycodex original table key: ";
|
|
4678
4668
|
var PLAN_PREFIX = "# holycodex plan: ";
|
|
4679
|
-
var MAX_SUBAGENTS_PREFIX = "# holycodex max-subagents: ";
|
|
4680
4669
|
var OLD_NAMESPACES = [
|
|
4681
4670
|
"marketplaces.sisyphuslabs",
|
|
4682
4671
|
"plugins.\"omo@sisyphuslabs\"",
|
|
@@ -4754,16 +4743,6 @@ function readManagedPlan(input) {
|
|
|
4754
4743
|
const value = new RegExp(`^${PLAN_PREFIX}(.+)$`, "m").exec(input)?.[1]?.trim();
|
|
4755
4744
|
return PLAN_NAMES.find((plan) => plan === value);
|
|
4756
4745
|
}
|
|
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
|
-
}
|
|
4767
4746
|
/** Identifies explicit Root route overrides preserved from active managed configuration. */
|
|
4768
4747
|
function readPreservedRootOverrides(input) {
|
|
4769
4748
|
const managedRoot = new RegExp(`^${START}\\r?\\n([\\s\\S]*?)^${END}\\r?$`, "m").exec(input)?.[1];
|
|
@@ -4818,7 +4797,7 @@ function mergedStatusLine(original) {
|
|
|
4818
4797
|
return `[${items.map((item) => JSON.stringify(item)).join(", ")}]`;
|
|
4819
4798
|
}
|
|
4820
4799
|
/** Installs config. */
|
|
4821
|
-
function installConfig(input, mode, _platform, plan = DEFAULT_PLAN
|
|
4800
|
+
function installConfig(input, mode, _platform, plan = DEFAULT_PLAN) {
|
|
4822
4801
|
const base = preserveManagedRootPreferences(input, removeLegacyOmo(removeManaged(input)));
|
|
4823
4802
|
const firstTable = base.search(/^\s*\[/m);
|
|
4824
4803
|
const root = firstTable < 0 ? base : base.slice(0, firstTable);
|
|
@@ -4835,20 +4814,17 @@ function installConfig(input, mode, _platform, plan = DEFAULT_PLAN, maxSubagents
|
|
|
4835
4814
|
const hasEffort = /^\s*model_reasoning_effort\s*=/m.test(preservedRoot);
|
|
4836
4815
|
const hasVerbosity = /^\s*model_verbosity\s*=/m.test(preservedRoot);
|
|
4837
4816
|
const rootRoute = MODEL_ROUTING_PLANS[plan].root;
|
|
4838
|
-
const effectiveMaxSubagents = maxSubagents ?? MODEL_ROUTING_PLANS[plan].usage.maxSubagents;
|
|
4839
4817
|
const model = hasModel ? "" : `model = "${rootRoute.model}"\n`;
|
|
4840
4818
|
const effort = hasEffort ? "" : `model_reasoning_effort = "${rootRoute.reasoningEffort}"\n`;
|
|
4841
4819
|
const verbosity = hasVerbosity ? "" : "model_verbosity = \"low\"\n";
|
|
4842
4820
|
const approval = mode === "default" ? "on-request" : "never";
|
|
4843
4821
|
const sandbox = mode === "dangerous" ? "danger-full-access" : "workspace-write";
|
|
4844
|
-
|
|
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}` : ""}`;
|
|
4822
|
+
let configured = `${`${START}\n${PLAN_PREFIX}${plan}\n${originalRoot ? `${ORIGINAL_ROOT}${Buffer.from(originalRoot).toString("base64")}\n` : ""}${model}${effort}${verbosity}${preservedRoot ? `${preservedRoot}\n` : ""}approval_policy = "${approval}"\nsandbox_mode = "${sandbox}"\nstatus_line = ${mergedStatusLine(controlled[3])}\n${END}`}${tables ? `\n\n${tables}` : ""}`;
|
|
4847
4823
|
configured = injectTableKey(configured, "features", "default_mode_request_user_input", "true");
|
|
4848
4824
|
configured = injectTableKey(configured, "features", "multi_agent", "true");
|
|
4849
4825
|
configured = injectTableKey(configured, "features", "multi_agent_v2", "true");
|
|
4850
4826
|
const usage = MODEL_ROUTING_PLANS[plan].usage;
|
|
4851
|
-
configured = injectTableKey(configured, "agents", "max_threads", String(
|
|
4827
|
+
configured = injectTableKey(configured, "agents", "max_threads", String(usage.maxThreads));
|
|
4852
4828
|
configured = injectTableKey(configured, "agents", "max_depth", String(usage.maxDepth));
|
|
4853
4829
|
if (mode !== "dangerous") configured = injectTableKey(configured, "sandbox_workspace_write", "network_access", "true");
|
|
4854
4830
|
for (const agent of AGENTS) configured = injectTableKey(configured, `agents.${agent}`, "config_file", `"holycodex/agents/${agent}.toml"`);
|
|
@@ -4961,13 +4937,6 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
4961
4937
|
const pluginRoot = join(home, "plugins", "cache", "holycodex", "holycodex", VERSION);
|
|
4962
4938
|
const agentRoot = join(home, "holycodex", "agents");
|
|
4963
4939
|
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
|
-
}
|
|
4971
4940
|
const missing = await missingFiles(pluginRoot, [
|
|
4972
4941
|
".codex-plugin/plugin.json",
|
|
4973
4942
|
".mcp.json",
|
|
@@ -4993,8 +4962,7 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
4993
4962
|
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.`));
|
|
4994
4963
|
}
|
|
4995
4964
|
const codexSlimEdit = servers?.codexslimedit;
|
|
4996
|
-
const
|
|
4997
|
-
const codexSlimEditConfig = ["bun", "npm"].map((runner) => effectiveMcpServers(runtime.platform, runner, codexSlimEditAccess).codexslimedit).find((expected) => {
|
|
4965
|
+
const codexSlimEditConfig = ["bun", "npm"].map((runner) => effectiveMcpServers(runtime.platform, runner).codexslimedit).find((expected) => {
|
|
4998
4966
|
return expected !== void 0 && codexSlimEdit !== void 0 && mcpConfigMatches(codexSlimEdit, expected);
|
|
4999
4967
|
});
|
|
5000
4968
|
const codexSlimEditStarted = codexSlimEditConfig === void 0 ? void 0 : await runtime.command(codexSlimEditConfig.command, [...codexSlimEditConfig.args, "--version"]);
|
|
@@ -5029,16 +4997,19 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
5029
4997
|
const gitBash = runtime.gitBash();
|
|
5030
4998
|
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));
|
|
5031
4999
|
} else checks.push(check("git-bash", "ok", "git-bash-not-applicable", "Git Bash is not applicable on this platform."));
|
|
5032
|
-
|
|
5000
|
+
let config = "";
|
|
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
|
+
}
|
|
5033
5006
|
const mode = autonomy(config);
|
|
5034
5007
|
const plan = readManagedPlan(config);
|
|
5035
5008
|
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.`));
|
|
5036
5009
|
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;
|
|
5039
5010
|
const rootOverrides = readPreservedRootOverrides(config);
|
|
5040
5011
|
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."));
|
|
5041
|
-
checks.push(preset === void 0 ||
|
|
5012
|
+
checks.push(preset === void 0 || tableInteger(config, "agents", "max_threads") !== preset.usage.maxThreads || 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.", "Reinstall HolyCodex.") : check("agent-usage", "ok", "agent-usage-ready", "Agent concurrency matches the selected routing plan."));
|
|
5042
5013
|
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."));
|
|
5043
5014
|
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."));
|
|
5044
5015
|
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."));
|
|
@@ -5155,8 +5126,7 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5155
5126
|
].filter((path) => path !== void 0);
|
|
5156
5127
|
const existingConfig = await readText(target.config);
|
|
5157
5128
|
const previousPlan = readManagedPlan(existingConfig);
|
|
5158
|
-
const
|
|
5159
|
-
const config = installConfig(existingConfig, options.autonomy, runtime.platform, plan, options.maxSubagents);
|
|
5129
|
+
const config = installConfig(existingConfig, options.autonomy, runtime.platform, plan);
|
|
5160
5130
|
await atomicWrite(target.config, config);
|
|
5161
5131
|
await rm(target.marketplaceCache, {
|
|
5162
5132
|
recursive: true,
|
|
@@ -5164,7 +5134,7 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5164
5134
|
});
|
|
5165
5135
|
await mkdir(dirname(target.cache), { recursive: true });
|
|
5166
5136
|
await cp(pluginRoot, target.cache, { recursive: true });
|
|
5167
|
-
await writePlatformPlugin(target.cache, runtime.platform, plan, runtime.packageRunner
|
|
5137
|
+
await writePlatformPlugin(target.cache, runtime.platform, plan, runtime.packageRunner);
|
|
5168
5138
|
const existingAgentPreferences = await readAgentPreferences(target.agents, previousPlan);
|
|
5169
5139
|
await rm(target.agents, {
|
|
5170
5140
|
recursive: true,
|
|
@@ -5188,8 +5158,7 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5188
5158
|
...removedLegacy
|
|
5189
5159
|
],
|
|
5190
5160
|
backups,
|
|
5191
|
-
plan
|
|
5192
|
-
maxSubagents
|
|
5161
|
+
plan
|
|
5193
5162
|
};
|
|
5194
5163
|
}
|
|
5195
5164
|
async function readAgentPreferences(root, previousPlan) {
|
|
@@ -5220,8 +5189,8 @@ async function preserveAgentPreferences(root, preferences) {
|
|
|
5220
5189
|
function replaceTomlString(input, key, value) {
|
|
5221
5190
|
return input.replace(new RegExp(`^${key}\\s*=.*$`, "m"), `${key} = ${JSON.stringify(value)}`);
|
|
5222
5191
|
}
|
|
5223
|
-
async function writePlatformPlugin(root, platform, plan, packageRunner
|
|
5224
|
-
await atomicWrite(join(root, ".mcp.json"), `${JSON.stringify({ mcpServers: effectiveMcpServers(platform, packageRunner
|
|
5192
|
+
async function writePlatformPlugin(root, platform, plan, packageRunner) {
|
|
5193
|
+
await atomicWrite(join(root, ".mcp.json"), `${JSON.stringify({ mcpServers: effectiveMcpServers(platform, packageRunner) }, null, 2)}\n`);
|
|
5225
5194
|
await writeInstalledAgents(join(root, "agents"), platform, plan);
|
|
5226
5195
|
}
|
|
5227
5196
|
async function writeInstalledAgents(root, platform, plan) {
|
|
@@ -5301,13 +5270,13 @@ function renderHelp(version, color) {
|
|
|
5301
5270
|
const title = paint(color, `${BOLD}${CYAN}`, `HOLYCODEX ${version}`);
|
|
5302
5271
|
const section = (text) => paint(color, BOLD, text);
|
|
5303
5272
|
const muted = (text) => paint(color, DIM, text);
|
|
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
|
|
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`;
|
|
5305
5274
|
}
|
|
5306
5275
|
/** Renders install-specific model plan and option help. */
|
|
5307
5276
|
function renderInstallHelp(version, color) {
|
|
5308
5277
|
const title = paint(color, `${BOLD}${CYAN}`, `HOLYCODEX ${version}`);
|
|
5309
5278
|
const section = (text) => paint(color, BOLD, text);
|
|
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 --
|
|
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`;
|
|
5311
5280
|
}
|
|
5312
5281
|
/** Renders error. */
|
|
5313
5282
|
function renderError(message, color) {
|
|
@@ -5335,7 +5304,7 @@ async function main() {
|
|
|
5335
5304
|
const args = process$1.argv.slice(2);
|
|
5336
5305
|
const stdoutColor = supportsColor(process$1.stdout.isTTY, process$1.env.NO_COLOR);
|
|
5337
5306
|
const stderrColor = supportsColor(process$1.stderr.isTTY, process$1.env.NO_COLOR);
|
|
5338
|
-
const command = args.find((arg, index) => !arg.startsWith("-") && args[index - 1] !== "--plan"
|
|
5307
|
+
const command = args.find((arg, index) => !arg.startsWith("-") && args[index - 1] !== "--plan");
|
|
5339
5308
|
if (args.includes("--help") || args.includes("-h") || args.length === 0) {
|
|
5340
5309
|
process$1.stdout.write(command === "install" ? renderInstallHelp(VERSION, stdoutColor) : renderHelp(VERSION, stdoutColor));
|
|
5341
5310
|
return;
|
|
@@ -5351,12 +5320,6 @@ async function main() {
|
|
|
5351
5320
|
const parsedPlan = PlanNameSchema.safeParse(planValue);
|
|
5352
5321
|
if (!parsedPlan.success) throw new Error(`Unknown plan: ${planValue}. Valid plans: ${PLAN_NAMES.join(", ")}.`);
|
|
5353
5322
|
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);
|
|
5360
5323
|
const autonomyFlags = args.filter((arg) => [
|
|
5361
5324
|
"--codex-autonomous",
|
|
5362
5325
|
"--no-codex-autonomous",
|
|
@@ -5370,8 +5333,7 @@ async function main() {
|
|
|
5370
5333
|
const options = {
|
|
5371
5334
|
autonomy: args.includes("--dangerous-codex-autonomous") ? "dangerous" : args.includes("--codex-autonomous") ? "autonomous" : "default",
|
|
5372
5335
|
json: args.includes("--json"),
|
|
5373
|
-
plan
|
|
5374
|
-
...maxSubagents === void 0 ? {} : { maxSubagents }
|
|
5336
|
+
plan
|
|
5375
5337
|
};
|
|
5376
5338
|
if (command === "doctor") {
|
|
5377
5339
|
const result = await doctor();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "holycodex",
|
|
3
|
-
"version": "0.8.1
|
|
3
|
+
"version": "0.8.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.1
|
|
42
|
+
"@holycodex/plugin": "0.8.1",
|
|
43
43
|
"zod": "^4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|