holycodex 0.10.1 → 0.10.2
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 +99 -24
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -4252,7 +4252,7 @@ function superRefine(fn, params) {
|
|
|
4252
4252
|
}
|
|
4253
4253
|
//#endregion
|
|
4254
4254
|
//#region packages/cli/src/catalog.ts
|
|
4255
|
-
var VERSION = "0.10.
|
|
4255
|
+
var VERSION = "0.10.2";
|
|
4256
4256
|
var SKILLS = [
|
|
4257
4257
|
"ast-grep",
|
|
4258
4258
|
"caveman",
|
|
@@ -4289,6 +4289,11 @@ var ReasoningEffortSchema = _enum([
|
|
|
4289
4289
|
"high",
|
|
4290
4290
|
"xhigh"
|
|
4291
4291
|
]);
|
|
4292
|
+
var FastModeSchema = _enum([
|
|
4293
|
+
"standard",
|
|
4294
|
+
"fast",
|
|
4295
|
+
"fast-all"
|
|
4296
|
+
]);
|
|
4292
4297
|
var ModelRouteSchema = discriminatedUnion("model", [
|
|
4293
4298
|
strictObject({
|
|
4294
4299
|
model: literal("gpt-5.6-luna"),
|
|
@@ -4365,7 +4370,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4365
4370
|
},
|
|
4366
4371
|
worker: {
|
|
4367
4372
|
model: "gpt-5.6-luna",
|
|
4368
|
-
reasoningEffort: "
|
|
4373
|
+
reasoningEffort: "high"
|
|
4369
4374
|
}
|
|
4370
4375
|
},
|
|
4371
4376
|
usage: {
|
|
@@ -4385,7 +4390,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4385
4390
|
},
|
|
4386
4391
|
librarian: {
|
|
4387
4392
|
model: "gpt-5.6-luna",
|
|
4388
|
-
reasoningEffort: "
|
|
4393
|
+
reasoningEffort: "high"
|
|
4389
4394
|
},
|
|
4390
4395
|
worker: {
|
|
4391
4396
|
model: "gpt-5.6-luna",
|
|
@@ -4460,7 +4465,7 @@ var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
|
|
|
4460
4465
|
reasoningEffort: "xhigh"
|
|
4461
4466
|
},
|
|
4462
4467
|
worker: {
|
|
4463
|
-
model: "gpt-5.6-
|
|
4468
|
+
model: "gpt-5.6-luna",
|
|
4464
4469
|
reasoningEffort: "xhigh"
|
|
4465
4470
|
}
|
|
4466
4471
|
},
|
|
@@ -4497,6 +4502,9 @@ var LEGACY_MANAGED_AGENT_MODEL_HISTORY = {
|
|
|
4497
4502
|
reasoningEffort: "medium"
|
|
4498
4503
|
}],
|
|
4499
4504
|
worker: [{
|
|
4505
|
+
model: "gpt-5.6-luna",
|
|
4506
|
+
reasoningEffort: "xhigh"
|
|
4507
|
+
}, {
|
|
4500
4508
|
model: "gpt-5.6-terra",
|
|
4501
4509
|
reasoningEffort: "medium"
|
|
4502
4510
|
}]
|
|
@@ -4510,6 +4518,10 @@ var LEGACY_MANAGED_AGENT_MODEL_HISTORY = {
|
|
|
4510
4518
|
reasoningEffort: "medium"
|
|
4511
4519
|
}],
|
|
4512
4520
|
librarian: [
|
|
4521
|
+
{
|
|
4522
|
+
model: "gpt-5.6-luna",
|
|
4523
|
+
reasoningEffort: "xhigh"
|
|
4524
|
+
},
|
|
4513
4525
|
{
|
|
4514
4526
|
model: "gpt-5.6-luna",
|
|
4515
4527
|
reasoningEffort: "low"
|
|
@@ -4594,6 +4606,10 @@ var LEGACY_MANAGED_AGENT_MODEL_HISTORY = {
|
|
|
4594
4606
|
reasoningEffort: "medium"
|
|
4595
4607
|
}],
|
|
4596
4608
|
worker: [
|
|
4609
|
+
{
|
|
4610
|
+
model: "gpt-5.6-terra",
|
|
4611
|
+
reasoningEffort: "xhigh"
|
|
4612
|
+
},
|
|
4597
4613
|
{
|
|
4598
4614
|
model: "gpt-5.6-terra",
|
|
4599
4615
|
reasoningEffort: "high"
|
|
@@ -4993,6 +5009,7 @@ var END = "# <<< holycodex managed <<<";
|
|
|
4993
5009
|
var ORIGINAL_ROOT = "# holycodex original root: ";
|
|
4994
5010
|
var ORIGINAL_TABLE_KEY = "# holycodex original table key: ";
|
|
4995
5011
|
var PLAN_PREFIX = "# holycodex plan: ";
|
|
5012
|
+
var FAST_MODE_PREFIX = "# holycodex fast: ";
|
|
4996
5013
|
var MAX_SUBAGENTS_PREFIX = "# holycodex max-subagents: ";
|
|
4997
5014
|
var MANAGED_PERMISSION_PROFILE = "holycodex-config";
|
|
4998
5015
|
var OLD_NAMESPACES = [
|
|
@@ -5079,6 +5096,11 @@ function readManagedPlan(input) {
|
|
|
5079
5096
|
const value = new RegExp(`^${PLAN_PREFIX}(.+)$`, "m").exec(input)?.[1]?.trim();
|
|
5080
5097
|
return PLAN_NAMES.find((plan) => plan === value);
|
|
5081
5098
|
}
|
|
5099
|
+
/** Reads the explicitly recorded managed Fast mode. */
|
|
5100
|
+
function readManagedFastMode(input) {
|
|
5101
|
+
const value = new RegExp(`^${FAST_MODE_PREFIX}(.+)$`, "m").exec(input)?.[1]?.trim();
|
|
5102
|
+
return FastModeSchema.safeParse(value).data;
|
|
5103
|
+
}
|
|
5082
5104
|
/** Reads an explicit managed direct-subagent override. */
|
|
5083
5105
|
function readManagedMaxSubagents(input) {
|
|
5084
5106
|
const raw = new RegExp(`^${MAX_SUBAGENTS_PREFIX}(.*)$`, "m").exec(input)?.[1]?.trim();
|
|
@@ -5138,7 +5160,7 @@ function mergedStatusLine(original) {
|
|
|
5138
5160
|
return `[${items.map((item) => JSON.stringify(item)).join(", ")}]`;
|
|
5139
5161
|
}
|
|
5140
5162
|
/** Installs config. */
|
|
5141
|
-
function installConfig(input, mode, _platform, plan = DEFAULT_PLAN, maxSubagents,
|
|
5163
|
+
function installConfig(input, mode, _platform, plan = DEFAULT_PLAN, maxSubagents, fastMode = "standard") {
|
|
5142
5164
|
const base = preserveManagedRootPreferences(input, removeLegacyOmo(removeManaged(input)));
|
|
5143
5165
|
const firstTable = base.search(/^\s*\[/m);
|
|
5144
5166
|
const root = firstTable < 0 ? base : base.slice(0, firstTable);
|
|
@@ -5171,7 +5193,7 @@ function installConfig(input, mode, _platform, plan = DEFAULT_PLAN, maxSubagents
|
|
|
5171
5193
|
const approval = mode === "default" ? "on-request" : "never";
|
|
5172
5194
|
const sandbox = mode === "dangerous" ? "danger-full-access" : "workspace-write";
|
|
5173
5195
|
const original = originalControlled ? `${ORIGINAL_ROOT}${Buffer.from(originalControlled).toString("base64")}\n` : "";
|
|
5174
|
-
const rootBlock = `${START}\n${PLAN_PREFIX}${plan}\n${maxSubagents === void 0 ? "" : `${MAX_SUBAGENTS_PREFIX}${maxSubagents}\n`}${original}${model}${effort}model_verbosity = "low"\nservice_tier = "${fast ? "fast" : "default"}"\napproval_policy = "${approval}"\nsandbox_mode = "${sandbox}"\ndefault_permissions = "${MANAGED_PERMISSION_PROFILE}"\nstatus_line = ${mergedStatusLine(rootValue(root, "status_line"))}\n${END}`;
|
|
5196
|
+
const rootBlock = `${START}\n${PLAN_PREFIX}${plan}\n${FAST_MODE_PREFIX}${fastMode}\n${maxSubagents === void 0 ? "" : `${MAX_SUBAGENTS_PREFIX}${maxSubagents}\n`}${original}${model}${effort}model_verbosity = "low"\nservice_tier = "${fastMode === "fast-all" ? "fast" : "default"}"\napproval_policy = "${approval}"\nsandbox_mode = "${sandbox}"\ndefault_permissions = "${MANAGED_PERMISSION_PROFILE}"\nstatus_line = ${mergedStatusLine(rootValue(root, "status_line"))}\n${END}`;
|
|
5175
5197
|
let configured = `${preservedRoot ? `${preservedRoot}\n` : ""}${rootBlock}${tables ? `\n\n${tables}` : ""}`;
|
|
5176
5198
|
configured = injectTableKeys(configured, `permissions.${MANAGED_PERMISSION_PROFILE}`, [["description", "\"HolyCodex config.toml permissions.\""], ["extends", "\":workspace\""]]);
|
|
5177
5199
|
configured = injectTableKeys(configured, `permissions.${MANAGED_PERMISSION_PROFILE}.network`, [["enabled", "true"]]);
|
|
@@ -5366,11 +5388,12 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
5366
5388
|
const plan = readManagedPlan(config);
|
|
5367
5389
|
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.`));
|
|
5368
5390
|
const preset = plan === void 0 ? void 0 : MODEL_ROUTING_PLANS[plan];
|
|
5391
|
+
const managedFastMode = readManagedFastMode(config);
|
|
5369
5392
|
const managedMaxSubagents = readManagedMaxSubagents(config);
|
|
5370
5393
|
const expectedMaxSubagents = managedMaxSubagents.configured ? managedMaxSubagents.value : preset?.usage.maxSubagents;
|
|
5371
5394
|
const rootOverrides = readPreservedRootOverrides(config);
|
|
5372
5395
|
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."));
|
|
5373
|
-
checks.push(["default", "fast"].includes(rootTomlString(config, "service_tier") ?? "") ? check("service-tier", "ok", "service-tier-ready", "Codex service tier is explicitly managed.") : check("service-tier", "error", "service-tier-stale", "service_tier
|
|
5396
|
+
checks.push(["default", "fast"].includes(rootTomlString(config, "service_tier") ?? "") && (managedFastMode === void 0 || rootTomlString(config, "service_tier") === (managedFastMode === "fast-all" ? "fast" : "default")) ? check("service-tier", "ok", "service-tier-ready", "Codex service tier is explicitly managed.") : check("service-tier", "error", "service-tier-stale", "service_tier does not match the managed Fast mode.", "Reinstall HolyCodex with --fast, --fast-all, or --no-fast."));
|
|
5374
5397
|
checks.push(rootTomlString(config, "model_verbosity") === "low" ? check("root-verbosity", "ok", "root-verbosity-ready", "Root model verbosity is forced to low.") : check("root-verbosity", "error", "root-verbosity-stale", "Root model verbosity must be low.", "Reinstall HolyCodex."));
|
|
5375
5398
|
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"}.`));
|
|
5376
5399
|
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."));
|
|
@@ -5382,14 +5405,18 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
|
|
|
5382
5405
|
checks.push(codex.ok ? check("codex", "ok", "codex-version", codex.output || "Codex is available.") : check("codex", "warning", "codex-version-unavailable", "Codex version could not be read; status-line compatibility cannot be independently confirmed."));
|
|
5383
5406
|
if (runtime.platform === "win32") checks.push(tableString(config, "windows", "sandbox") === "unelevated" ? check("windows-sandbox", "ok", "windows-sandbox-ready", "Windows sandbox runs unelevated.") : check("windows-sandbox", "error", "windows-sandbox-stale", "Windows sandbox must run unelevated.", "Reinstall HolyCodex on Windows."));
|
|
5384
5407
|
const agentModelFailures = [];
|
|
5408
|
+
const agentTierValues = [];
|
|
5385
5409
|
for (const agent of AGENTS) try {
|
|
5386
5410
|
const text = await readFile(join(agentRoot, `${agent}.toml`), "utf8");
|
|
5387
5411
|
const expected = plan === void 0 ? void 0 : MODEL_ROUTING_PLANS[plan].agents[agent];
|
|
5388
5412
|
if (expected === void 0 || rootTomlString(text, "model") !== expected.model || rootTomlString(text, "model_reasoning_effort") !== expected.reasoningEffort) agentModelFailures.push(agent);
|
|
5413
|
+
agentTierValues.push(rootTomlString(text, "service_tier"));
|
|
5389
5414
|
} catch {
|
|
5390
5415
|
agentModelFailures.push(agent);
|
|
5391
5416
|
}
|
|
5392
5417
|
checks.push(agentModelFailures.length === 0 ? check("agent-models", "ok", "agent-models-ready", `Specialist models match the ${plan ?? "unknown"} routing plan.`) : check("agent-models", "error", "agent-models-stale", `Agent model configuration is stale for ${agentModelFailures.join(", ")}.`, "Reinstall HolyCodex."));
|
|
5418
|
+
const expectedAgentTier = managedFastMode === "standard" ? "default" : "fast";
|
|
5419
|
+
if (agentTierValues.some((value) => value !== void 0)) checks.push(agentTierValues.every((value) => value === expectedAgentTier) ? check("agent-service-tiers", "ok", "agent-service-tiers-ready", `Specialist service tiers use ${expectedAgentTier}.`) : check("agent-service-tiers", "error", "agent-service-tiers-stale", `Specialist service tiers must use ${expectedAgentTier}.`, "Reinstall HolyCodex."));
|
|
5393
5420
|
return {
|
|
5394
5421
|
healthy: !checks.some((item) => item.status === "error"),
|
|
5395
5422
|
autonomy: mode,
|
|
@@ -5485,7 +5512,8 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5485
5512
|
].filter((path) => path !== void 0);
|
|
5486
5513
|
const existingConfig = await readText(target.config);
|
|
5487
5514
|
const previousPlan = readManagedPlan(existingConfig);
|
|
5488
|
-
const
|
|
5515
|
+
const fastMode = options.fast ?? "standard";
|
|
5516
|
+
const config = installConfig(existingConfig, options.autonomy, runtime.platform, plan, options.maxSubagents, fastMode);
|
|
5489
5517
|
await atomicWrite(target.config, config);
|
|
5490
5518
|
await rm(target.cache, {
|
|
5491
5519
|
recursive: true,
|
|
@@ -5493,15 +5521,15 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5493
5521
|
});
|
|
5494
5522
|
await mkdir(dirname(target.cache), { recursive: true });
|
|
5495
5523
|
await cp(pluginRoot, target.cache, { recursive: true });
|
|
5496
|
-
await writePlatformPlugin(target.cache, runtime.platform, plan);
|
|
5524
|
+
await writePlatformPlugin(target.cache, runtime.platform, plan, fastMode);
|
|
5497
5525
|
const existingAgentPreferences = await readAgentPreferences(target.agents, previousPlan);
|
|
5498
5526
|
await rm(target.agents, {
|
|
5499
5527
|
recursive: true,
|
|
5500
5528
|
force: true
|
|
5501
5529
|
});
|
|
5502
5530
|
await cp(join(pluginRoot, "agents"), target.agents, { recursive: true });
|
|
5503
|
-
await writeInstalledAgents(target.agents, runtime.platform, plan);
|
|
5504
|
-
await preserveAgentPreferences(target.agents, existingAgentPreferences);
|
|
5531
|
+
await writeInstalledAgents(target.agents, runtime.platform, plan, fastMode);
|
|
5532
|
+
await preserveAgentPreferences(target.agents, existingAgentPreferences, plan, fastMode);
|
|
5505
5533
|
const removedLegacy = [];
|
|
5506
5534
|
for (const path of target.legacy) {
|
|
5507
5535
|
if (!await exists(path)) continue;
|
|
@@ -5521,39 +5549,81 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
5521
5549
|
...options.maxSubagents === void 0 ? {} : { maxSubagents: options.maxSubagents }
|
|
5522
5550
|
};
|
|
5523
5551
|
}
|
|
5552
|
+
var AGENT_MANAGED_KEYS = /* @__PURE__ */ new Set([
|
|
5553
|
+
"model",
|
|
5554
|
+
"model_reasoning_effort",
|
|
5555
|
+
"model_verbosity",
|
|
5556
|
+
"service_tier"
|
|
5557
|
+
]);
|
|
5558
|
+
var AGENT_BUNDLED_KEYS = /* @__PURE__ */ new Set(["description", "developer_instructions"]);
|
|
5524
5559
|
async function readAgentPreferences(root, previousPlan) {
|
|
5525
5560
|
const preferences = {};
|
|
5526
5561
|
await Promise.all(AGENTS.map(async (agent) => {
|
|
5527
5562
|
const source = await readText(join(root, `${agent}.toml`));
|
|
5528
5563
|
const model = rootTomlString(source, "model");
|
|
5529
5564
|
const reasoningEffort = rootTomlString(source, "model_reasoning_effort");
|
|
5530
|
-
if (
|
|
5531
|
-
|
|
5565
|
+
if (source.trim() === "") return;
|
|
5566
|
+
const managed = (previousPlan === void 0 ? MANAGED_AGENT_MODEL_HISTORY[agent] : MANAGED_AGENT_MODEL_HISTORY_BY_PLAN[previousPlan][agent]).some((item) => item.model === model && item.reasoningEffort === reasoningEffort);
|
|
5567
|
+
const custom = extractCustomAgentSettings(source);
|
|
5568
|
+
if (!managed || custom !== void 0) preferences[agent] = {
|
|
5532
5569
|
...model === void 0 ? {} : { model },
|
|
5533
|
-
...reasoningEffort === void 0 ? {} : { reasoningEffort }
|
|
5570
|
+
...reasoningEffort === void 0 ? {} : { reasoningEffort },
|
|
5571
|
+
...custom === void 0 ? {} : { custom }
|
|
5534
5572
|
};
|
|
5535
5573
|
}));
|
|
5536
5574
|
return preferences;
|
|
5537
5575
|
}
|
|
5538
|
-
async function preserveAgentPreferences(root, preferences) {
|
|
5576
|
+
async function preserveAgentPreferences(root, preferences, plan, fastMode) {
|
|
5539
5577
|
await Promise.all(AGENTS.map(async (agent) => {
|
|
5540
5578
|
const preference = preferences[agent];
|
|
5541
5579
|
if (preference === void 0) return;
|
|
5542
5580
|
const path = join(root, `${agent}.toml`);
|
|
5581
|
+
const route = MODEL_ROUTING_PLANS[plan].agents[agent];
|
|
5543
5582
|
let source = await readText(path);
|
|
5544
|
-
if (preference.
|
|
5545
|
-
|
|
5583
|
+
if (preference.custom !== void 0) source = mergeCustomAgentSettings(source, preference.custom);
|
|
5584
|
+
source = replaceOrAppendTomlString(source, "model", preference.model ?? route.model);
|
|
5585
|
+
source = replaceOrAppendTomlString(source, "model_reasoning_effort", preference.reasoningEffort ?? route.reasoningEffort);
|
|
5586
|
+
source = replaceOrAppendTomlString(source, "model_verbosity", "low");
|
|
5587
|
+
source = replaceOrAppendTomlString(source, "service_tier", fastMode === "standard" ? "default" : "fast");
|
|
5546
5588
|
await atomicWrite(path, source);
|
|
5547
5589
|
}));
|
|
5548
5590
|
}
|
|
5549
5591
|
function replaceTomlString(input, key, value) {
|
|
5550
5592
|
return input.replace(new RegExp(`^${key}\\s*=.*$`, "m"), `${key} = ${JSON.stringify(value)}`);
|
|
5551
5593
|
}
|
|
5552
|
-
|
|
5594
|
+
function replaceOrAppendTomlString(input, key, value) {
|
|
5595
|
+
const replaced = replaceTomlString(input, key, value);
|
|
5596
|
+
return replaced === input ? `${input.trimEnd()}${input.trimEnd() === "" ? "" : "\n"}${key} = ${JSON.stringify(value)}\n` : replaced;
|
|
5597
|
+
}
|
|
5598
|
+
function extractCustomAgentSettings(input) {
|
|
5599
|
+
const customRoot = (input.split(/^\s*\[/m, 1)[0] ?? "").split(/\r?\n/).filter((line) => {
|
|
5600
|
+
const key = /^\s*([A-Za-z0-9_-]+)\s*=/.exec(line)?.[1];
|
|
5601
|
+
return key !== void 0 && !AGENT_MANAGED_KEYS.has(key) && !AGENT_BUNDLED_KEYS.has(key);
|
|
5602
|
+
}).join("\n");
|
|
5603
|
+
const firstTable = input.search(/^\s*\[/m);
|
|
5604
|
+
const customTables = firstTable < 0 ? "" : input.slice(firstTable).trim();
|
|
5605
|
+
if (customRoot === "" && customTables === "") return void 0;
|
|
5606
|
+
return {
|
|
5607
|
+
...customRoot === "" ? {} : { root: customRoot },
|
|
5608
|
+
...customTables === "" ? {} : { tables: customTables }
|
|
5609
|
+
};
|
|
5610
|
+
}
|
|
5611
|
+
function mergeCustomAgentSettings(input, custom) {
|
|
5612
|
+
let output = input.trimEnd();
|
|
5613
|
+
if (custom.root !== void 0) {
|
|
5614
|
+
const firstTable = output.search(/^\s*\[/m);
|
|
5615
|
+
const root = firstTable < 0 ? output : output.slice(0, firstTable).trimEnd();
|
|
5616
|
+
const tables = firstTable < 0 ? "" : output.slice(firstTable).trimStart();
|
|
5617
|
+
output = `${root}\n${custom.root}${tables === "" ? "" : `\n${tables}`}`;
|
|
5618
|
+
}
|
|
5619
|
+
if (custom.tables !== void 0 && !output.includes(custom.tables)) output = `${output.trimEnd()}\n\n${custom.tables}`;
|
|
5620
|
+
return `${output.trimEnd()}\n`;
|
|
5621
|
+
}
|
|
5622
|
+
async function writePlatformPlugin(root, platform, plan, fastMode) {
|
|
5553
5623
|
await atomicWrite(join(root, ".mcp.json"), `${JSON.stringify({ mcpServers: effectiveMcpServers(platform) }, null, 2)}\n`);
|
|
5554
|
-
await writeInstalledAgents(join(root, "agents"), platform, plan);
|
|
5624
|
+
await writeInstalledAgents(join(root, "agents"), platform, plan, fastMode);
|
|
5555
5625
|
}
|
|
5556
|
-
async function writeInstalledAgents(root, platform, plan) {
|
|
5626
|
+
async function writeInstalledAgents(root, platform, plan, fastMode) {
|
|
5557
5627
|
await Promise.all(AGENTS.map(async (agent) => {
|
|
5558
5628
|
const path = join(root, `${agent}.toml`);
|
|
5559
5629
|
const route = MODEL_ROUTING_PLANS[plan].agents[agent];
|
|
@@ -5561,6 +5631,7 @@ async function writeInstalledAgents(root, platform, plan) {
|
|
|
5561
5631
|
source = replaceTomlString(source, "model", route.model);
|
|
5562
5632
|
source = replaceTomlString(source, "model_reasoning_effort", route.reasoningEffort);
|
|
5563
5633
|
source = replaceTomlString(source, "model_verbosity", "low");
|
|
5634
|
+
source = replaceOrAppendTomlString(source, "service_tier", fastMode === "standard" ? "default" : "fast");
|
|
5564
5635
|
if (platform === "win32") {
|
|
5565
5636
|
await atomicWrite(path, source);
|
|
5566
5637
|
return;
|
|
@@ -5631,13 +5702,13 @@ function renderHelp(version, color) {
|
|
|
5631
5702
|
const title = paint(color, `${BOLD}${CYAN}`, `HolyCodex ${version}`);
|
|
5632
5703
|
const section = (text) => paint(color, BOLD, text);
|
|
5633
5704
|
const muted = (text) => paint(color, DIM, text);
|
|
5634
|
-
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 <count> Override concurrent direct subagents for install\n --fast Use
|
|
5705
|
+
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 <count> Override concurrent direct subagents for install\n --fast Use Fast for generated subagents only\n --fast-all Use Fast for Root and generated subagents\n --no-fast Use Standard for Root and generated subagents\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`;
|
|
5635
5706
|
}
|
|
5636
5707
|
/** Renders install-specific model plan and option help. */
|
|
5637
5708
|
function renderInstallHelp(version, color) {
|
|
5638
5709
|
const title = paint(color, `${BOLD}${CYAN}`, `HolyCodex ${version}`);
|
|
5639
5710
|
const section = (text) => paint(color, BOLD, text);
|
|
5640
|
-
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 <count> Override concurrent direct subagents\n --fast Use
|
|
5711
|
+
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 <count> Override concurrent direct subagents\n --fast Use Fast for generated subagents only\n --fast-all Use Fast for Root and generated subagents\n --no-fast Use Standard for Root and generated 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. Fast flags are mutually exclusive.\n\n${section("Examples:")}\n bunx holycodex install\n bunx holycodex install --plan go\n bunx holycodex install --plan plus-low --fast\n bunx holycodex install --plan plus-high\n bunx holycodex install --plan pro-5x --fast-all\n bunx holycodex install --plan pro-20x --no-fast\n`;
|
|
5641
5712
|
}
|
|
5642
5713
|
/** Renders error. */
|
|
5643
5714
|
function renderError(message, color) {
|
|
@@ -5701,7 +5772,11 @@ async function main() {
|
|
|
5701
5772
|
process$1.exitCode = 1;
|
|
5702
5773
|
return;
|
|
5703
5774
|
}
|
|
5704
|
-
const fastFlags = args.filter((arg) => [
|
|
5775
|
+
const fastFlags = args.filter((arg) => [
|
|
5776
|
+
"--fast",
|
|
5777
|
+
"--fast-all",
|
|
5778
|
+
"--no-fast"
|
|
5779
|
+
].includes(arg));
|
|
5705
5780
|
if (fastFlags.length > 1) {
|
|
5706
5781
|
process$1.stderr.write(renderError(`Conflicting fast flags: ${fastFlags.join(", ")}`, stderrColor));
|
|
5707
5782
|
process$1.exitCode = 1;
|
|
@@ -5710,7 +5785,7 @@ async function main() {
|
|
|
5710
5785
|
const options = {
|
|
5711
5786
|
autonomy: args.includes("--dangerous-codex-autonomous") ? "dangerous" : args.includes("--codex-autonomous") ? "autonomous" : "default",
|
|
5712
5787
|
json: args.includes("--json"),
|
|
5713
|
-
fast: args.includes("--fast"),
|
|
5788
|
+
fast: args.includes("--fast-all") ? "fast-all" : args.includes("--fast") ? "fast" : "standard",
|
|
5714
5789
|
plan,
|
|
5715
5790
|
...maxSubagents === void 0 ? {} : { maxSubagents }
|
|
5716
5791
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "holycodex",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
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.10.
|
|
42
|
+
"@holycodex/plugin": "0.10.2",
|
|
43
43
|
"zod": "^4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|