holycodex 0.13.3 → 0.13.4
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 +20 -15
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process$1 from "node:process";
|
|
2
2
|
import { access, copyFile, cp, lstat, mkdir, mkdtemp, readFile, readdir, readlink, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
3
3
|
import { homedir, tmpdir } from "node:os";
|
|
4
|
-
import { delimiter, dirname, join } from "node:path";
|
|
4
|
+
import { delimiter, dirname, join, resolve } from "node:path";
|
|
5
5
|
import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
7
7
|
import { Buffer } from "node:buffer";
|
|
@@ -4391,7 +4391,7 @@ function superRefine(fn, params) {
|
|
|
4391
4391
|
}
|
|
4392
4392
|
//#endregion
|
|
4393
4393
|
//#region packages/cli/src/catalog.ts
|
|
4394
|
-
var VERSION = "0.13.
|
|
4394
|
+
var VERSION = "0.13.4";
|
|
4395
4395
|
var SKILLS = [
|
|
4396
4396
|
"ast-grep",
|
|
4397
4397
|
"babysit-ci",
|
|
@@ -4524,7 +4524,7 @@ function workflowFor(permittedRoutes, limits, projectedUsage, maxInputTokens) {
|
|
|
4524
4524
|
}
|
|
4525
4525
|
};
|
|
4526
4526
|
}
|
|
4527
|
-
var DEFAULT_PLAN = "plus
|
|
4527
|
+
var DEFAULT_PLAN = "plus";
|
|
4528
4528
|
var LUNA_HIGH = {
|
|
4529
4529
|
model: "gpt-5.6-luna",
|
|
4530
4530
|
reasoningEffort: "high"
|
|
@@ -5139,9 +5139,9 @@ function parseCliArguments(args) {
|
|
|
5139
5139
|
if (fastFlags.length > 1) throw new Error(`Conflicting Fast flags: ${fastFlags.join(", ")}`);
|
|
5140
5140
|
const computerUseFlags = ["--computer-use", "--no-computer-use"].filter((flag) => values.has(flag));
|
|
5141
5141
|
if (computerUseFlags.length > 1) throw new Error(`Conflicting Computer Use flags: ${computerUseFlags.join(", ")}`);
|
|
5142
|
-
const planValue = values.get("--plan")
|
|
5143
|
-
const plan = PlanNameSchema.safeParse(planValue);
|
|
5144
|
-
if (!plan.success) throw new Error(`Unknown plan: ${String(planValue)}. Valid plans: ${PLAN_NAMES.join(", ")}.`);
|
|
5142
|
+
const planValue = values.get("--plan");
|
|
5143
|
+
const plan = planValue === void 0 ? void 0 : PlanNameSchema.safeParse(planValue);
|
|
5144
|
+
if (plan !== void 0 && !plan.success) throw new Error(`Unknown plan: ${String(planValue)}. Valid plans: ${PLAN_NAMES.join(", ")}.`);
|
|
5145
5145
|
const maxValue = values.get("--max-subagents");
|
|
5146
5146
|
if (maxValue !== void 0 && (typeof maxValue !== "string" || !/^\d+$/.test(maxValue) || Number(maxValue) > 3)) throw new Error(`Invalid --max-subagents value: ${String(maxValue)}. Expected an integer from 0 through 3.`);
|
|
5147
5147
|
const autonomy = values.has("--dangerous-codex-autonomous") ? {
|
|
@@ -5161,7 +5161,7 @@ function parseCliArguments(args) {
|
|
|
5161
5161
|
command,
|
|
5162
5162
|
json: values.has("--json"),
|
|
5163
5163
|
noTui: values.has("--no-tui"),
|
|
5164
|
-
plan: plan.data,
|
|
5164
|
+
...plan === void 0 ? {} : { plan: plan.data },
|
|
5165
5165
|
...maxValue === void 0 ? {} : { maxSubagents: Number(maxValue) },
|
|
5166
5166
|
autonomy,
|
|
5167
5167
|
...computerUse === void 0 ? {} : { computerUse },
|
|
@@ -5174,7 +5174,6 @@ function base(action) {
|
|
|
5174
5174
|
action,
|
|
5175
5175
|
json: false,
|
|
5176
5176
|
noTui: false,
|
|
5177
|
-
plan: DEFAULT_PLAN,
|
|
5178
5177
|
autonomy: { requested: false },
|
|
5179
5178
|
fast: "standard",
|
|
5180
5179
|
verbose: false
|
|
@@ -6586,8 +6585,9 @@ function mergedStatusLine(original) {
|
|
|
6586
6585
|
return `[${items.map((item) => JSON.stringify(item)).join(", ")}]`;
|
|
6587
6586
|
}
|
|
6588
6587
|
/** Installs config. */
|
|
6589
|
-
function installConfig(input, mode, _platform,
|
|
6588
|
+
function installConfig(input, mode, _platform, requestedPlan, maxSubagents, fastMode = "standard", computerUse) {
|
|
6590
6589
|
const request = normalizeRequestedAutonomy(mode);
|
|
6590
|
+
const plan = requestedPlan ?? readManagedPlan(input) ?? "plus";
|
|
6591
6591
|
const effectiveComputerUse = computerUse ?? readManagedComputerUse(input) ?? "disabled";
|
|
6592
6592
|
const priorAutonomy = readAutonomyMetadata(input);
|
|
6593
6593
|
const previousOriginalRoot = readOriginalRootMetadata(input);
|
|
@@ -6749,6 +6749,11 @@ function executableOnPath(name) {
|
|
|
6749
6749
|
}
|
|
6750
6750
|
//#endregion
|
|
6751
6751
|
//#region packages/cli/src/core-instructions.ts
|
|
6752
|
+
/** Formats the installed workflow runtime command for the active shell. */
|
|
6753
|
+
function formatInstalledRuntimeGuidance(pluginRoot) {
|
|
6754
|
+
const quotedPath = `'${(/^[A-Za-z]:[\\/]/.test(pluginRoot) || pluginRoot.startsWith("\\\\") || pluginRoot.startsWith("/") ? `${pluginRoot.replace(/[\\/]+$/, "")}/runtime/workflow.js` : resolve(pluginRoot, "runtime", "workflow.js")).replaceAll("\\", "/").replaceAll("'", "'\\\"'\\\"'")}'`;
|
|
6755
|
+
return `Use the installed HolyCodex workflow runtime with an absolute path: node ${quotedPath}. For help, run node ${quotedPath} --help.`;
|
|
6756
|
+
}
|
|
6752
6757
|
/** Shared HolyCodex root instructions. */
|
|
6753
6758
|
var CORE_INSTRUCTIONS = "HolyCodex: Root is user-facing. Before updates, classify intent and load required skills. Start with \"I detect [intent] intent — [action].\" Choose the accurate intent naturally; no fixed intent taxonomy applies. `plan` and `plan-review` instead own their exact heading and intent as the first visible block; no other mode prints a heading. Do not conceal orchestration. Give concise updates naming each specialist type and what it will do, such as \"Explorer maps X\", \"Librarian verifies Y\", or \"Worker implements Z\". Do not disclose Root orchestration mechanics or explain why delegation is running unless asked. Skills govern method only. Root owns interaction, intent, scope, architecture, product choices, ambiguity, integration, external state, and final judgment and verification. Root is not another implementation branch: evaluate specialist output against scope, fixed architecture, user decisions, repository conventions, and proof; reject or repair weak output and integrate only accepted work. On every plan other than Go, use a CLI workflow for substantive discovery, implementation, verification, multi-file work, risky changes, or architecture-sensitive work. Root may work directly for genuinely small bounded operations such as repository synchronization, one quick mechanical edit, or an equivalent one-off change. State when the direct-work exception applies, and never use it to bypass delegation for broader work. Never invoke regular Codex collaboration subagents. If a required workflow is unavailable or cannot perform the operation, report the blocker instead of bypassing delegation. Missing task-child visibility is not a reason to avoid workflows. Go does not support workflows, so Root works directly without specialist subagents. A task may contain multiple sequential workflows. Prefer the smallest useful fan-out, stop discovery when evidence is sufficient, and avoid duplicate investigation. The selected plan is authoritative: enforce its permitted model routes for each agent and stage, low verbosity, Fast as the only service-tier variation, concurrency, soft target calls, hard maximum calls, workflow depth, retries, loop iterations, fan-out, projected usage, and soft-size guidance. Root should remain near target calls and exceed them only when intermediate evidence justifies more work; the hard maximum is only a safety and quota ceiling. Larger plans do not automatically consume larger allowances. Keep explorer, librarian, and worker selectable only where the plan permits. Root owns workflow integration and final proof. After any code or manifest implementation, Root loads `code-review` exactly once before final response; it also loads `code-review` for a user-requested snippet, file, directory, diff, patch, or PR review. That skill owns the final audit, repair, proportional checks and reruns, reinspection, diff, and status. Classify unknowns: delegate facts, ask material decisions, and state and use safe reversible defaults. Whenever Root needs user input or would ask any question, it must use `request_user_input` when that tool is available, in every scenario and mode. Root must never stop or reply with a plain-text question when the tool is available. If the tool is unavailable, use a safe reversible default where possible or report a non-question blocker. Never repeat questions or ask discoverable facts. Root must use `request_user_input` immediately before committing, pushing, creating or moving tags, building or compiling, publishing, deploying, destructive or irreversible actions, permission changes, financial actions, sending, or any other externally visible action. Earlier general authorization does not replace this immediate approval unless the user explicitly authorized that exact action in the current turn. Root controls browser and native desktop UI itself. Explorer is repository-read-only, Librarian research-only, and Worker cannot alter dashboards, accounts, permissions, or external state. Specialists never delegate, broaden, review, or make final judgments.";
|
|
6754
6759
|
var NATIVE_IO_INSTRUCTIONS = "For `plan` and `plan-review` headings, never print provisionally. Never delegate browser or computer control. For frontend creation, redesign, or visual verification, use installed Build Web Apps `frontend-app-builder` for concept, approval, implementation, and visual verification. For authorized security reviews, audits, scans, threat models, vulnerabilities, or attack paths, use matching installed Codex Security plugin skills. Use these capabilities instead of manual-click instructions, shell-as-GUI, or public research as a substitute for authenticated control. Use Codex native `apply_patch` for workspace file creation, updates, moves, and deletion. Use available native read or shell tools for file inspection and repository search. Do not re-read files only to verify a successful `apply_patch` call.";
|
|
@@ -6756,12 +6761,12 @@ var COMPUTER_USE_INSTRUCTIONS = "For native desktop tasks, use the available Com
|
|
|
6756
6761
|
var ROOT_LUNA_POLICY = "Root is the judgment and control plane: own interaction, scope, architecture, product and risk decisions, workflow integration, material ambiguity, external state, and the final decision. Luna specialists are bounded execution context: Explorer maps sufficient repository facts, Librarian verifies assigned current facts, and Worker implements, integrates, inspects diffs, runs checks, performs mechanical repair and retest, routine review, evidence compression, and optional synthesis. Root accepts successful structured Luna evidence without rereading or re-verifying it; material architecture, product, scope, risk, or contradictory-evidence decisions return to Root. On plus-low, prefer retained context, compact outcomes, Luna-local loops and synthesis, sufficient discovery, and genuine concurrency without changing plan quotas. Structured substantive outcomes are the branching contract, not prose parsing. Escalate Luna high to xhigh to max only when the evidence justifies it and the active plan permits the route; max insufficiency returns compact evidence to Root and never creates a Sol specialist.";
|
|
6757
6762
|
var CODE_REVIEW_ACTIVATION_POLICY = "After loading `code-review`, its first visible line is **CODE REVIEW MODE ACTIVATED**.";
|
|
6758
6763
|
/** Gets core instructions with platform and active agent-capacity context. */
|
|
6759
|
-
function coreInstructions(platform, capacity, computerUseEnabled = false) {
|
|
6764
|
+
function coreInstructions(platform, capacity, computerUseEnabled = false, pluginRoot) {
|
|
6760
6765
|
const threads = capacity?.maxThreads;
|
|
6761
6766
|
const depth = capacity?.maxDepth;
|
|
6762
|
-
const capacityInstructions = threads === void 0 || depth === void 0 ? "Before delegation, use active collaboration tool instructions as the authoritative agent-capacity limit." : `Host agent capacity: agents.max_concurrent_threads_per_session=${threads} includes Root. The host nesting limit is ${depth}; the active plan's maxCalls is the hard workflow call ceiling and targetCalls is soft planning guidance. Its lower concurrency, depth, and fan-out limits remain authoritative.
|
|
6767
|
+
const capacityInstructions = threads === void 0 || depth === void 0 ? "Before delegation, use active collaboration tool instructions as the authoritative agent-capacity limit." : `Host agent capacity: agents.max_concurrent_threads_per_session=${threads} includes Root. The host nesting limit is ${depth}; the active plan's maxCalls is the hard workflow call ceiling and targetCalls is soft planning guidance. Its lower concurrency, depth, and fan-out limits remain authoritative. Substantive, multi-file, risky, and architecture-sensitive work uses a CLI workflow; genuinely small bounded operations may remain direct. Report a blocker when a required workflow runtime is unavailable. Go does not support workflows, so Root works directly without specialist subagents.`;
|
|
6763
6768
|
const platformInstructions = platform === "win32" ? ` ${WINDOWS_SHELL_POLICY}` : "";
|
|
6764
|
-
return `${CORE_INSTRUCTIONS} ${ROOT_LUNA_POLICY} ${LITE_WRITING_POLICY} ${CONTEXT7_POLICY} ${NATIVE_IO_INSTRUCTIONS}${computerUseEnabled ? ` ${COMPUTER_USE_INSTRUCTIONS}` : ""} ${CODE_REVIEW_ACTIVATION_POLICY} ${capacityInstructions}${platformInstructions}`;
|
|
6769
|
+
return `${CORE_INSTRUCTIONS} ${ROOT_LUNA_POLICY} ${LITE_WRITING_POLICY} ${CONTEXT7_POLICY} ${NATIVE_IO_INSTRUCTIONS}${computerUseEnabled ? ` ${COMPUTER_USE_INSTRUCTIONS}` : ""} ${CODE_REVIEW_ACTIVATION_POLICY} ${capacityInstructions}${platformInstructions}${pluginRoot === void 0 ? "" : ` ${formatInstalledRuntimeGuidance(pluginRoot)}`}`;
|
|
6765
6770
|
}
|
|
6766
6771
|
//#endregion
|
|
6767
6772
|
//#region packages/cli/src/doctor.ts
|
|
@@ -6998,9 +7003,9 @@ async function install(options, runtime = defaultRuntime) {
|
|
|
6998
7003
|
notify(options, "prerequisites", "Checking prerequisites", "running");
|
|
6999
7004
|
assertGitBashReady(runtime.platform, runtime.gitBash());
|
|
7000
7005
|
notify(options, "prerequisites", "Checking prerequisites", "complete");
|
|
7001
|
-
const plan = options.plan ?? "plus-low";
|
|
7002
7006
|
const target = paths();
|
|
7003
7007
|
const existingConfig = await readText(target.config);
|
|
7008
|
+
const plan = options.plan ?? readManagedPlan(existingConfig) ?? "plus";
|
|
7004
7009
|
const computerUseChoice = resolveComputerUseChoice(options);
|
|
7005
7010
|
const root = backupRoot();
|
|
7006
7011
|
notify(options, "backup", "Backing up existing installation", "running");
|
|
@@ -7143,7 +7148,7 @@ async function restoreTarget(target, source) {
|
|
|
7143
7148
|
}
|
|
7144
7149
|
async function removeObsoleteVersionCaches(cacheRoot) {
|
|
7145
7150
|
if (!await exists(cacheRoot)) return;
|
|
7146
|
-
for (const entry of await readdir(cacheRoot)) if (entry !== "0.13.
|
|
7151
|
+
for (const entry of await readdir(cacheRoot)) if (entry !== "0.13.4") await rm(join(cacheRoot, entry), {
|
|
7147
7152
|
recursive: true,
|
|
7148
7153
|
force: true
|
|
7149
7154
|
});
|
|
@@ -7406,7 +7411,7 @@ async function main() {
|
|
|
7406
7411
|
...parsed.computerUse === void 0 ? {} : { computerUse: parsed.computerUse },
|
|
7407
7412
|
fast: parsed.fast,
|
|
7408
7413
|
json: parsed.json,
|
|
7409
|
-
plan: parsed.plan,
|
|
7414
|
+
...parsed.plan === void 0 ? {} : { plan: parsed.plan },
|
|
7410
7415
|
verbose: parsed.verbose,
|
|
7411
7416
|
...parsed.command === "install" && !parsed.json ? { onProgress: (event) => process$1.stdout.write(renderInstallProgress(event, stdoutColor, process$1.stdout.isTTY === true, parsed.verbose)) } : {},
|
|
7412
7417
|
...parsed.maxSubagents === void 0 ? {} : { maxSubagents: parsed.maxSubagents }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "holycodex",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
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.13.
|
|
42
|
+
"@holycodex/plugin": "0.13.4",
|
|
43
43
|
"zod": "^4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|