holycodex 0.7.1-dev.29609959823.1 → 0.7.1-dev.29611508860.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.
Files changed (2) hide show
  1. package/dist/cli.js +9 -11
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -3925,7 +3925,7 @@ function superRefine(fn, params) {
3925
3925
  }
3926
3926
  //#endregion
3927
3927
  //#region packages/cli/src/catalog.ts
3928
- var VERSION = "0.7.1-dev.29609959823.1";
3928
+ var VERSION = "0.7.1-dev.29611508860.1";
3929
3929
  var SKILLS = [
3930
3930
  "ast-grep",
3931
3931
  "caveman",
@@ -4835,7 +4835,9 @@ async function install(options, runtime = defaultRuntime) {
4835
4835
  await backup(target.agents, root),
4836
4836
  ...await Promise.all(target.legacy.map((path) => backup(path, root)))
4837
4837
  ].filter((path) => path !== void 0);
4838
- const config = installConfig(await readText(target.config), options.autonomy, runtime.platform, plan);
4838
+ const existingConfig = await readText(target.config);
4839
+ const previousPlan = readManagedPlan(existingConfig);
4840
+ const config = installConfig(existingConfig, options.autonomy, runtime.platform, plan);
4839
4841
  await atomicWrite(target.config, config);
4840
4842
  await rm(target.marketplaceCache, {
4841
4843
  recursive: true,
@@ -4844,7 +4846,7 @@ async function install(options, runtime = defaultRuntime) {
4844
4846
  await mkdir(dirname(target.cache), { recursive: true });
4845
4847
  await cp(pluginRoot, target.cache, { recursive: true });
4846
4848
  await writePlatformPlugin(target.cache, runtime.platform, plan);
4847
- const existingAgentPreferences = await readAgentPreferences(target.agents);
4849
+ const existingAgentPreferences = await readAgentPreferences(target.agents, previousPlan);
4848
4850
  await rm(target.agents, {
4849
4851
  recursive: true,
4850
4852
  force: true
@@ -4870,14 +4872,14 @@ async function install(options, runtime = defaultRuntime) {
4870
4872
  plan
4871
4873
  };
4872
4874
  }
4873
- async function readAgentPreferences(root) {
4875
+ async function readAgentPreferences(root, previousPlan) {
4874
4876
  const preferences = {};
4875
4877
  await Promise.all(AGENTS.map(async (agent) => {
4876
4878
  const source = await readText(join(root, `${agent}.toml`));
4877
4879
  const model = rootTomlString(source, "model");
4878
4880
  const reasoningEffort = rootTomlString(source, "model_reasoning_effort");
4879
4881
  if (model === void 0 && reasoningEffort === void 0) return;
4880
- if (!MANAGED_AGENT_MODEL_HISTORY[agent].some((item) => item.model === model && item.reasoningEffort === reasoningEffort)) preferences[agent] = {
4882
+ if (!(previousPlan === void 0 ? MANAGED_AGENT_MODEL_HISTORY[agent] : [MODEL_ROUTING_PLANS[previousPlan].agents[agent]]).some((item) => item.model === model && item.reasoningEffort === reasoningEffort)) preferences[agent] = {
4881
4883
  ...model === void 0 ? {} : { model },
4882
4884
  ...reasoningEffort === void 0 ? {} : { reasoningEffort }
4883
4885
  };
@@ -4984,7 +4986,7 @@ function renderHelp(version, color) {
4984
4986
  function renderInstallHelp(version, color) {
4985
4987
  const title = paint(color, `${BOLD}${CYAN}`, `HOLYCODEX ${version}`);
4986
4988
  const section = (text) => paint(color, BOLD, text);
4987
- return `${title}\n\n${section("Usage:")}\n holycodex install [options]\n\n${section("Options:")}\n --plan <plan> Model routing plan: go, plus, pro-5x, or pro-20x\n Default: plus\n\nPlans optimize model routing for the corresponding ChatGPT subscription allowance.\n\n${section("Examples:")}\n bunx holycodex install\n bunx holycodex install --plan go\n bunx holycodex install --plan pro-5x\n bunx holycodex install --plan pro-20x\n`;
4989
+ return `${title}\n\n${section("Usage:")}\n holycodex install [options]\n\n${section("Options:")}\n --plan <plan> Model routing plan: go, plus, pro-5x, or pro-20x\n Default: plus\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 optimize model routing for the corresponding ChatGPT subscription allowance.\n\n${section("Examples:")}\n bunx holycodex install\n bunx holycodex install --plan go\n bunx holycodex install --plan pro-5x\n bunx holycodex install --plan pro-20x\n`;
4988
4990
  }
4989
4991
  /** Renders error. */
4990
4992
  function renderError(message, color) {
@@ -5012,11 +5014,7 @@ async function main() {
5012
5014
  const args = process$1.argv.slice(2);
5013
5015
  const stdoutColor = supportsColor(process$1.stdout.isTTY, process$1.env.NO_COLOR);
5014
5016
  const stderrColor = supportsColor(process$1.stderr.isTTY, process$1.env.NO_COLOR);
5015
- const command = args.find((arg) => [
5016
- "install",
5017
- "cleanup",
5018
- "doctor"
5019
- ].includes(arg));
5017
+ const command = args.find((arg, index) => !arg.startsWith("-") && args[index - 1] !== "--plan");
5020
5018
  if (args.includes("--help") || args.includes("-h") || args.length === 0) {
5021
5019
  process$1.stdout.write(command === "install" ? renderInstallHelp(VERSION, stdoutColor) : renderHelp(VERSION, stdoutColor));
5022
5020
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holycodex",
3
- "version": "0.7.1-dev.29609959823.1",
3
+ "version": "0.7.1-dev.29611508860.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.7.1-dev.29609959823.1",
42
+ "@holycodex/plugin": "0.7.1-dev.29611508860.1",
43
43
  "zod": "^4.4.3"
44
44
  },
45
45
  "engines": {