holycodex 0.5.2 → 0.6.1-dev.29547206710.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/README.md +6 -89
- package/THIRD-PARTY-NOTICES.md +6 -2
- package/bin/holycodex.js +1 -1
- package/dist/cli.js +834 -0
- package/package.json +15 -27
- package/marketplace.json +0 -12
- package/plugin/.codex-plugin/plugin.json +0 -23
- package/plugin/.mcp.json +0 -7
- package/plugin/agents/explorer.toml +0 -6
- package/plugin/agents/librarian.toml +0 -6
- package/plugin/agents/worker.toml +0 -6
- package/plugin/hooks/hooks.json +0 -62
- package/plugin/runtime/bootstrap.js +0 -31
- package/plugin/runtime/cli.js +0 -235
- package/plugin/runtime/core-instructions.js +0 -4
- package/plugin/runtime/git-bash.js +0 -355
- package/plugin/runtime/lsp.js +0 -3665
- package/plugin/runtime/mcp-stdio-core.js +0 -209
- package/plugin/runtime/rules.js +0 -171
- package/plugin/skills/ast-grep/LICENSE +0 -21
- package/plugin/skills/ast-grep/SKILL.md +0 -20
- package/plugin/skills/ast-grep/references/cli.md +0 -3
- package/plugin/skills/ast-grep/references/install.md +0 -3
- package/plugin/skills/ast-grep/references/patterns.md +0 -3
- package/plugin/skills/ast-grep/references/pitfalls.md +0 -3
- package/plugin/skills/ast-grep/references/recipes.md +0 -9
- package/plugin/skills/ast-grep/references/sgconfig.md +0 -3
- package/plugin/skills/ast-grep/references/yaml-rules.md +0 -3
- package/plugin/skills/caveman/LICENSE +0 -21
- package/plugin/skills/caveman/SKILL.md +0 -31
- package/plugin/skills/compress/SKILL.md +0 -18
- package/plugin/skills/debugging/SKILL.md +0 -22
- package/plugin/skills/debugging/references/runtimes/README.md +0 -9
- package/plugin/skills/debugging/references/tools/README.md +0 -8
- package/plugin/skills/define-goal/LICENSE.txt +0 -201
- package/plugin/skills/define-goal/SKILL.md +0 -37
- package/plugin/skills/frontend/ATTRIBUTION.md +0 -218
- package/plugin/skills/frontend/LICENSE-Apache-2.0.txt +0 -201
- package/plugin/skills/frontend/SKILL.md +0 -50
- package/plugin/skills/frontend/references/perfection/README.md +0 -5
- package/plugin/skills/frontend/references/perfection/react-perf-tooling.md +0 -3
- package/plugin/skills/frontend/references/ui-ux-db/README.md +0 -5
- package/plugin/skills/frontend/references/ui-ux-db/data/charts.csv +0 -26
- package/plugin/skills/frontend/references/ui-ux-db/data/colors.csv +0 -162
- package/plugin/skills/frontend/references/ui-ux-db/data/icons.csv +0 -106
- package/plugin/skills/frontend/references/ui-ux-db/data/landing.csv +0 -35
- package/plugin/skills/frontend/references/ui-ux-db/data/products.csv +0 -162
- package/plugin/skills/frontend/references/ui-ux-db/data/react-performance.csv +0 -45
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +0 -54
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +0 -53
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +0 -56
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +0 -53
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +0 -53
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +0 -51
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +0 -59
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +0 -52
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/react.csv +0 -54
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +0 -61
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +0 -54
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +0 -51
- package/plugin/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +0 -50
- package/plugin/skills/frontend/references/ui-ux-db/data/styles.csv +0 -85
- package/plugin/skills/frontend/references/ui-ux-db/data/typography.csv +0 -74
- package/plugin/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +0 -162
- package/plugin/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +0 -100
- package/plugin/skills/frontend/references/ui-ux-db/data/web-interface.csv +0 -31
- package/plugin/skills/frontend/references/ui-ux-db/scripts/core.py +0 -262
- package/plugin/skills/frontend/references/ui-ux-db/scripts/design_system.py +0 -1148
- package/plugin/skills/frontend/references/ui-ux-db/scripts/search.py +0 -114
- package/plugin/skills/handoff/SKILL.md +0 -10
- package/plugin/skills/lsp/SKILL.md +0 -35
- package/plugin/skills/lsp-setup/SKILL.md +0 -18
- package/plugin/skills/lsp-setup/scripts/detect-lsp.ts +0 -233
- package/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +0 -188
- package/plugin/skills/lsp-setup/scripts/tsconfig.json +0 -17
- package/plugin/skills/lsp-setup/scripts/verify-lsp.ts +0 -166
- package/plugin/skills/plan/SKILL.md +0 -24
- package/plugin/skills/plan-review/SKILL.md +0 -22
- package/plugin/skills/programming/SKILL.md +0 -33
- package/plugin/skills/programming/references/code-smells.md +0 -3
- package/plugin/skills/programming/references/go/README.md +0 -3
- package/plugin/skills/programming/references/logging.md +0 -3
- package/plugin/skills/programming/references/python/README.md +0 -3
- package/plugin/skills/programming/references/rust/README.md +0 -3
- package/plugin/skills/programming/references/rust-ub/README.md +0 -3
- package/plugin/skills/programming/references/typescript/README.md +0 -3
- package/plugin/skills/refactor/SKILL.md +0 -21
- package/plugin/skills/remove-ai-slops/SKILL.md +0 -20
- package/plugin/skills/rules/SKILL.md +0 -16
- package/plugin/skills/security-research/SKILL.md +0 -38
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "holycodex",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Lean Codex-only agent toolkit
|
|
3
|
+
"version": "0.6.1-dev.29547206710.2",
|
|
4
|
+
"description": "Lean Codex-only agent toolkit installer and doctor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
7
7
|
"chatgpt",
|
|
@@ -16,44 +16,32 @@
|
|
|
16
16
|
"author": "David Basile Filho",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/davidbasilefilho/holycodex.git"
|
|
19
|
+
"url": "git+https://github.com/davidbasilefilho/holycodex.git",
|
|
20
|
+
"directory": "packages/cli"
|
|
20
21
|
},
|
|
21
22
|
"bin": {
|
|
22
23
|
"holycodex": "bin/holycodex.js"
|
|
23
24
|
},
|
|
24
|
-
"workspaces": [
|
|
25
|
-
"packages/git-bash-mcp",
|
|
26
|
-
"packages/lsp-core",
|
|
27
|
-
"packages/lsp-daemon",
|
|
28
|
-
"packages/mcp-stdio-core"
|
|
29
|
-
],
|
|
30
25
|
"files": [
|
|
31
26
|
"bin",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
27
|
+
"dist",
|
|
28
|
+
"README.md",
|
|
34
29
|
"LICENSE.md",
|
|
35
30
|
"THIRD-PARTY-NOTICES.md"
|
|
36
31
|
],
|
|
37
32
|
"type": "module",
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
38
36
|
"scripts": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"prepack": "vp build",
|
|
43
|
-
"version:check": "bun scripts/version.mjs check",
|
|
44
|
-
"version:patch": "bun scripts/version.mjs patch",
|
|
45
|
-
"version:minor": "bun scripts/version.mjs minor",
|
|
46
|
-
"version:set": "bun scripts/version.mjs"
|
|
37
|
+
"build": "vp build --config vite.config.ts",
|
|
38
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
39
|
+
"prepack": "vp run --workspace-root build"
|
|
47
40
|
},
|
|
48
|
-
"
|
|
49
|
-
"@
|
|
50
|
-
"typescript": "^6.0.0",
|
|
51
|
-
"vite": "^7.0.0",
|
|
52
|
-
"vite-plus": "^0.1.24",
|
|
53
|
-
"vitest": "^4.0.0"
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@holycodex/plugin": "0.6.1-dev.29547206710.2"
|
|
54
43
|
},
|
|
55
44
|
"engines": {
|
|
56
45
|
"node": ">=20"
|
|
57
|
-
}
|
|
58
|
-
"packageManager": "bun@1.3.14"
|
|
46
|
+
}
|
|
59
47
|
}
|
package/marketplace.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "HolyCodex",
|
|
3
|
-
"interface": { "displayName": "HolyCodex" },
|
|
4
|
-
"plugins": [
|
|
5
|
-
{
|
|
6
|
-
"name": "holycodex",
|
|
7
|
-
"source": "./plugin",
|
|
8
|
-
"category": "Developer Tools",
|
|
9
|
-
"policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" }
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "holycodex",
|
|
3
|
-
"version": "0.5.2",
|
|
4
|
-
"description": "Lean Codex workflows with routed skills, bounded subagents, scoped rules, Git Bash, and LSP.",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "David Basile Filho",
|
|
7
|
-
"url": "https://github.com/davidbasilefilho"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/davidbasilefilho/holycodex",
|
|
10
|
-
"repository": "https://github.com/davidbasilefilho/holycodex",
|
|
11
|
-
"license": "SUL-1.0",
|
|
12
|
-
"skills": "./skills/",
|
|
13
|
-
"mcpServers": "./.mcp.json",
|
|
14
|
-
"interface": {
|
|
15
|
-
"displayName": "HolyCodex",
|
|
16
|
-
"shortDescription": "Codex agents, routed skills, scoped rules, Git Bash, LSP, code search, and docs lookup.",
|
|
17
|
-
"longDescription": "Use HolyCodex for repository work needing routed engineering workflows, Windows shell reliability, or semantic code tools. Skills own their declared methods and gates; the main agent owns decisions, integration, and verification. Delegate only narrow independent repository facts, current external facts, or isolated implementation; do not delegate trivial, coupled, ambiguous, architectural, or final-responsibility work.",
|
|
18
|
-
"defaultPrompt": "Use HolyCodex to implement and verify this task.",
|
|
19
|
-
"developerName": "David Basile Filho",
|
|
20
|
-
"category": "Developer Tools",
|
|
21
|
-
"capabilities": ["Hooks", "MCP Tools", "Code Intelligence"]
|
|
22
|
-
}
|
|
23
|
-
}
|
package/plugin/.mcp.json
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
description = "Use for a narrow, read-only repository fact question with explicit scope; do not use for edits, external research, architecture, or final decisions. Returns cited paths, symbols, history, or diagnostics for main-agent integration."
|
|
2
|
-
model = "gpt-5.6-luna"
|
|
3
|
-
model_reasoning_effort = "low"
|
|
4
|
-
developer_instructions = """
|
|
5
|
-
Start: "I detect investigation intent — [reason]. [action]." Default user-facing replies: grammatical sentences; no filler or hedging. Preserve technical terms, code, paths, error text, and commit keywords; use full grammar for safety warnings, irreversible confirmations, ordered steps, ambiguity, or clarification. Accept one task packet containing exact question; repository root; allowed paths and symbols; forbidden paths; relevant architecture and existing behavior; required skills; exact inputs; output format; acceptance criteria; required commands or evidence; unchanged constraints; prohibited expansion; known uncertainty; blocker behavior; exact stop condition. Reject incomplete or ambiguous packets. Inspect only assigned scope. On native Windows, before any shell call resolve `mcp__git_bash__run` from the full callable registry, including deferred tools, and use it when available; otherwise use native shell directly. Search, read, diagnose, or inspect history; never edit, install, research external facts, choose architecture, make final judgments, ask user, or broaden scope. Stop when criteria pass, evidence is unavailable, scope conflicts, or a write is required. Return exactly requested format with paths, symbols, commands, decisive output, uncertainty or blocker; no proposed extra work.
|
|
6
|
-
"""
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
description = "Use for a narrow current external-fact question requiring primary sources; do not use for repository inspection, implementation, architecture, or final decisions. Returns dated, cited findings for main-agent integration."
|
|
2
|
-
model = "gpt-5.6-luna"
|
|
3
|
-
model_reasoning_effort = "low"
|
|
4
|
-
developer_instructions = """
|
|
5
|
-
Start: "I detect research intent — [reason]. [action]." Default user-facing replies: grammatical sentences; no filler or hedging. Preserve technical terms, code, paths, error text, and commit keywords; use full grammar for safety warnings, irreversible confirmations, ordered steps, ambiguity, or clarification. Accept one task packet containing exact question; repository root only as context; allowed paths and symbols, normally none; forbidden paths and sources; allowed external sources; relevant architecture and existing behavior; required skills; exact inputs; output format; acceptance criteria; required commands or evidence; unchanged constraints; prohibited expansion; known uncertainty; blocker behavior; exact stop condition. Reject incomplete or ambiguous packets. On native Windows, before any shell call resolve `mcp__git_bash__run` from the full callable registry, including deferred tools, and use it when available; otherwise use native shell directly. Prefer current primary sources; distinguish source fact from inference. Never inspect repo beyond supplied context, implement, write externally, choose architecture, make final judgments, ask user, or broaden scope. Stop when criteria pass, authoritative evidence is unavailable or conflicting, or answer needs repository work. Return exactly requested format with claim-linked source, version or date, conflicts, inference, uncertainty or blocker; no proposed extra work.
|
|
6
|
-
"""
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
description = "Use for an isolated implementation slice with fixed files and acceptance criteria; do not use for discovery, architecture, ambiguous or coupled changes, integration, or final verification. Returns a minimal tested patch for main-agent review."
|
|
2
|
-
model = "gpt-5.6-luna"
|
|
3
|
-
model_reasoning_effort = "medium"
|
|
4
|
-
developer_instructions = """
|
|
5
|
-
Start: "I detect implementation intent — [reason]. [action]." Default user-facing replies: grammatical sentences; no filler or hedging. Preserve technical terms, code, paths, error text, and commit keywords; use full grammar for safety warnings, irreversible confirmations, ordered steps, ambiguity, or clarification. Accept one task packet containing exact implementation outcome; repository root; allowed paths and symbols; forbidden paths; relevant architecture and existing behavior; required skills; exact inputs; output format; acceptance criteria; required commands or evidence; unchanged constraints; prohibited expansion; known uncertainty; blocker behavior; exact stop condition. Reject or stop on ambiguity, overlap, architecture choice, coupled out-of-scope work, user-work conflict, or missing authority. On native Windows, before any shell call resolve `mcp__git_bash__run` from the full callable registry, including deferred tools, and use it when available; otherwise use native shell directly. Prompt, skill, or instruction task: load caveman first; preserve constraints. Load required skills before governed action. Change only assigned files. Preserve architecture, API, behavior, naming, style, and user work. Add no speculative cleanup, abstraction, dependency, docs, or scope. Run specified proof; never claim integration or final verification. Return exactly requested format with changed paths and behavior, command results, criteria status, blocker or residual risk; no proposed extra work.
|
|
6
|
-
"""
|
package/plugin/hooks/hooks.json
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"SessionStart": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "*",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "node \"${PLUGIN_ROOT}/runtime/bootstrap.js\"",
|
|
10
|
-
"timeout": 10,
|
|
11
|
-
"statusMessage": "HolyCodex: checking readiness"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"type": "command",
|
|
15
|
-
"command": "node \"${PLUGIN_ROOT}/runtime/rules.js\"",
|
|
16
|
-
"timeout": 10,
|
|
17
|
-
"statusMessage": "HolyCodex: loading scoped rules"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"UserPromptSubmit": [
|
|
23
|
-
{
|
|
24
|
-
"matcher": "*",
|
|
25
|
-
"hooks": [
|
|
26
|
-
{
|
|
27
|
-
"type": "command",
|
|
28
|
-
"command": "node \"${PLUGIN_ROOT}/runtime/rules.js\"",
|
|
29
|
-
"timeout": 10,
|
|
30
|
-
"statusMessage": "HolyCodex: loading scoped rules"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"PostToolUse": [
|
|
36
|
-
{
|
|
37
|
-
"matcher": "^apply_patch$",
|
|
38
|
-
"hooks": [
|
|
39
|
-
{
|
|
40
|
-
"type": "command",
|
|
41
|
-
"command": "node \"${PLUGIN_ROOT}/runtime/rules.js\"",
|
|
42
|
-
"timeout": 10,
|
|
43
|
-
"statusMessage": "HolyCodex: matching scoped rules"
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"PostCompact": [
|
|
49
|
-
{
|
|
50
|
-
"matcher": "*",
|
|
51
|
-
"hooks": [
|
|
52
|
-
{
|
|
53
|
-
"type": "command",
|
|
54
|
-
"command": "node \"${PLUGIN_ROOT}/runtime/rules.js\"",
|
|
55
|
-
"timeout": 10,
|
|
56
|
-
"statusMessage": "HolyCodex: resetting scoped rule cache"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { t as CORE_INSTRUCTIONS } from "./core-instructions.js";
|
|
2
|
-
import { access } from "node:fs/promises";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
//#region src/bootstrap.ts
|
|
5
|
-
var REQUIRED = [
|
|
6
|
-
"git-bash.js",
|
|
7
|
-
"lsp.js",
|
|
8
|
-
"rules.js"
|
|
9
|
-
];
|
|
10
|
-
async function readinessContext(pluginRoot) {
|
|
11
|
-
const missing = [];
|
|
12
|
-
for (const file of REQUIRED) try {
|
|
13
|
-
await access(join(pluginRoot, "runtime", file));
|
|
14
|
-
} catch (error) {
|
|
15
|
-
if (error instanceof Error && "code" in error && error.code === "ENOENT") missing.push(file);
|
|
16
|
-
else throw error;
|
|
17
|
-
}
|
|
18
|
-
if (missing.length === 0) return CORE_INSTRUCTIONS;
|
|
19
|
-
return `${CORE_INSTRUCTIONS}\n\nHolyCodex incomplete: missing runtime/${missing.join(", runtime/")}. Reinstall HolyCodex before using its local MCPs or hooks.`;
|
|
20
|
-
}
|
|
21
|
-
async function readinessOutput(pluginRoot) {
|
|
22
|
-
const additionalContext = await readinessContext(pluginRoot);
|
|
23
|
-
return `${JSON.stringify({ hookSpecificOutput: {
|
|
24
|
-
hookEventName: "SessionStart",
|
|
25
|
-
additionalContext
|
|
26
|
-
} })}\n`;
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/bootstrap-cli.ts
|
|
30
|
-
process.stdout.write(await readinessOutput(process.env.PLUGIN_ROOT ?? process.cwd()));
|
|
31
|
-
//#endregion
|
package/plugin/runtime/cli.js
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { copyFile, cp, lstat, mkdir, readFile, readdir, readlink, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
2
|
-
import { basename, dirname, join } from "node:path";
|
|
3
|
-
import process$1 from "node:process";
|
|
4
|
-
import { homedir, tmpdir } from "node:os";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
//#region src/config.ts
|
|
7
|
-
var START = "# >>> holycodex managed >>>";
|
|
8
|
-
var END = "# <<< holycodex managed <<<";
|
|
9
|
-
var OLD_NAMESPACES = [
|
|
10
|
-
"marketplaces.sisyphuslabs",
|
|
11
|
-
"plugins.\"omo@sisyphuslabs\"",
|
|
12
|
-
"marketplaces.lazycodex",
|
|
13
|
-
"plugins.\"omo@lazycodex\"",
|
|
14
|
-
"marketplaces.code-yeongyu-codex-plugins",
|
|
15
|
-
"plugins.\"omo@code-yeongyu-codex-plugins\"",
|
|
16
|
-
"agents.plan",
|
|
17
|
-
"agents.metis",
|
|
18
|
-
"agents.momus",
|
|
19
|
-
"agents.oracle",
|
|
20
|
-
"agents.sisyphus",
|
|
21
|
-
"agents.prometheus",
|
|
22
|
-
"agents.atlas",
|
|
23
|
-
"agents.hephaestus",
|
|
24
|
-
"hooks.state.\"omo@sisyphuslabs",
|
|
25
|
-
"hooks.state.\"omo@lazycodex",
|
|
26
|
-
"hooks.state.\"omo@code-yeongyu-codex-plugins"
|
|
27
|
-
];
|
|
28
|
-
function removeManaged(input) {
|
|
29
|
-
const escapedStart = START.replaceAll(">", "\\>");
|
|
30
|
-
const escapedEnd = END.replaceAll("<", "\\<");
|
|
31
|
-
return input.replace(new RegExp(`${escapedStart}[\\s\\S]*?${escapedEnd}\\r?\\n?`, "g"), "").trim();
|
|
32
|
-
}
|
|
33
|
-
function removeLegacyOmo(input) {
|
|
34
|
-
return input.split(/(?=^\s*\[)/m).filter((section) => {
|
|
35
|
-
const header = /^\s*\[([^\]]+)]/.exec(section)?.[1];
|
|
36
|
-
if (header === void 0) return true;
|
|
37
|
-
if (OLD_NAMESPACES.some((name) => header === name || header.startsWith(`${name}.`) || name.includes("\"omo@") && header.startsWith(name))) return false;
|
|
38
|
-
return ![
|
|
39
|
-
"agents.explorer",
|
|
40
|
-
"agents.librarian",
|
|
41
|
-
"agents.worker"
|
|
42
|
-
].some((name) => header === name || header.startsWith(`${name}.`)) || !/(?:sisyphuslabs|omo@|oh-my|code-yeongyu)/i.test(section);
|
|
43
|
-
}).join("").trimEnd();
|
|
44
|
-
}
|
|
45
|
-
function rewriteForbiddenReasoning(input) {
|
|
46
|
-
return input.split(/(?=^\s*\[)/m).map((section) => {
|
|
47
|
-
const model = /^\s*model\s*=\s*"([^"]+)"/im.exec(section)?.[1]?.toLowerCase();
|
|
48
|
-
if (model === void 0 || !/(?:sol|terra|luna)/.test(model)) return section;
|
|
49
|
-
const allowsHigh = model.includes("luna");
|
|
50
|
-
const rewritten = section.replace(/^(\s*model_reasoning_effort\s*=\s*)"([^"]+)"/gim, (_match, prefix, effort) => {
|
|
51
|
-
const normalized = effort.toLowerCase();
|
|
52
|
-
if (normalized === "low" || normalized === "medium" || allowsHigh && normalized === "high") return `${prefix}"${normalized}"`;
|
|
53
|
-
return `${prefix}"${normalized === "high" ? "medium" : "low"}"`;
|
|
54
|
-
});
|
|
55
|
-
return /^\s*model_reasoning_effort\s*=/im.test(rewritten) ? rewritten : rewritten.replace(/^(\s*model\s*=\s*"[^"]+")/im, "$1\nmodel_reasoning_effort = \"low\"");
|
|
56
|
-
}).join("");
|
|
57
|
-
}
|
|
58
|
-
function installConfig(input, autonomous) {
|
|
59
|
-
const base = rewriteForbiddenReasoning(removeLegacyOmo(removeManaged(input)));
|
|
60
|
-
const firstTable = base.search(/^\s*\[/m);
|
|
61
|
-
const rootSection = firstTable < 0 ? base : base.slice(0, firstTable);
|
|
62
|
-
const tables = firstTable < 0 ? "" : base.slice(firstTable);
|
|
63
|
-
const preservedRoot = rootSection.replace(/^\s*max_concurrent_threads_per_session\s*=.*\r?\n?/gm, "").replace(autonomous ? /^\s*(?:approval_policy|sandbox_mode)\s*=.*\r?\n?/gm : /$^/g, "").trimEnd();
|
|
64
|
-
const rootBlock = `${START}\n${/^\s*model\s*=/m.test(preservedRoot) ? "" : "model = \"gpt-5.6-sol\"\nmodel_reasoning_effort = \"low\"\n"}${autonomous ? "approval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n" : ""}max_concurrent_threads_per_session = 2\n${END}`;
|
|
65
|
-
const agents = [
|
|
66
|
-
"explorer",
|
|
67
|
-
"librarian",
|
|
68
|
-
"worker"
|
|
69
|
-
].filter((name) => !new RegExp(`^\\s*\\[agents\\.${name}]`, "m").test(base)).map((name) => `[agents.${name}]\nconfig_file = "holycodex/agents/${name}.toml"`).join("\n\n");
|
|
70
|
-
const pluginBlock = `${START}\n[marketplaces.holycodex]\nsource = "https://github.com/davidbasilefilho/holycodex.git"\n\n[plugins."holycodex@holycodex"]\nenabled = true${agents.length > 0 ? `\n\n${agents}` : ""}\n${END}`;
|
|
71
|
-
return `${rootBlock}${preservedRoot.length > 0 ? `\n${preservedRoot}` : ""}${tables.length > 0 ? `\n\n${tables}` : ""}\n\n${pluginBlock}\n`;
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/files.ts
|
|
75
|
-
async function exists(path) {
|
|
76
|
-
try {
|
|
77
|
-
await stat(path);
|
|
78
|
-
return true;
|
|
79
|
-
} catch (error) {
|
|
80
|
-
if (error instanceof Error && "code" in error && error.code === "ENOENT") return false;
|
|
81
|
-
throw error;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
async function backup(path, root) {
|
|
85
|
-
if (!await exists(path)) return void 0;
|
|
86
|
-
const target = join(root, path.replace(/^([A-Za-z]:)?[\\/]+/, "").replaceAll(":", ""));
|
|
87
|
-
await mkdir(dirname(target), { recursive: true });
|
|
88
|
-
await copyBackup(path, target);
|
|
89
|
-
return target;
|
|
90
|
-
}
|
|
91
|
-
async function copyBackup(source, target) {
|
|
92
|
-
const metadata = await lstat(source);
|
|
93
|
-
if (metadata.isSymbolicLink()) {
|
|
94
|
-
await writeFile(`${target}.symlink`, await readlink(source), "utf8");
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (!metadata.isDirectory()) {
|
|
98
|
-
await copyFile(source, target);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
await mkdir(target, { recursive: true });
|
|
102
|
-
for (const entry of await readdir(source)) await copyBackup(join(source, entry), join(target, entry));
|
|
103
|
-
}
|
|
104
|
-
async function atomicWrite(path, content) {
|
|
105
|
-
await mkdir(dirname(path), { recursive: true });
|
|
106
|
-
const temporary = `${path}.${process.pid}.tmp`;
|
|
107
|
-
await writeFile(temporary, content, "utf8");
|
|
108
|
-
await rename(temporary, path);
|
|
109
|
-
}
|
|
110
|
-
async function readText(path) {
|
|
111
|
-
return await exists(path) ? readFile(path, "utf8") : "";
|
|
112
|
-
}
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/install.ts
|
|
115
|
-
var moduleDirectory = dirname(fileURLToPath(import.meta.url));
|
|
116
|
-
var packageRoot = join(moduleDirectory, basename(moduleDirectory) === "runtime" ? "../.." : "..");
|
|
117
|
-
function paths(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")) {
|
|
118
|
-
const marketplaceCache = join(home, "plugins", "cache", "holycodex");
|
|
119
|
-
const cacheRoot = join(marketplaceCache, "holycodex");
|
|
120
|
-
return {
|
|
121
|
-
home,
|
|
122
|
-
config: join(home, "config.toml"),
|
|
123
|
-
marketplaceCache,
|
|
124
|
-
cacheRoot,
|
|
125
|
-
cache: join(cacheRoot, "0.5.2"),
|
|
126
|
-
agents: join(home, "holycodex", "agents"),
|
|
127
|
-
legacy: [
|
|
128
|
-
join(home, "plugins", "cache", "sisyphuslabs", "omo"),
|
|
129
|
-
join(home, "plugins", "cache", "lazycodex", "omo"),
|
|
130
|
-
join(home, "plugins", "cache", "code-yeongyu-codex-plugins", "omo")
|
|
131
|
-
]
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
function backupRoot() {
|
|
135
|
-
return join(tmpdir(), "holycodex-backups", (/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-"));
|
|
136
|
-
}
|
|
137
|
-
async function install(options) {
|
|
138
|
-
const target = paths();
|
|
139
|
-
const root = backupRoot();
|
|
140
|
-
const backups = [
|
|
141
|
-
await backup(target.config, root),
|
|
142
|
-
await backup(target.marketplaceCache, root),
|
|
143
|
-
await backup(target.agents, root),
|
|
144
|
-
...await Promise.all(target.legacy.map((path) => backup(path, root)))
|
|
145
|
-
].filter((path) => path !== void 0);
|
|
146
|
-
const config = installConfig(await readText(target.config), options.autonomous);
|
|
147
|
-
await atomicWrite(target.config, config);
|
|
148
|
-
await rm(target.marketplaceCache, {
|
|
149
|
-
recursive: true,
|
|
150
|
-
force: true
|
|
151
|
-
});
|
|
152
|
-
await mkdir(dirname(target.cache), { recursive: true });
|
|
153
|
-
await cp(join(packageRoot, "plugin"), target.cache, { recursive: true });
|
|
154
|
-
await rm(target.agents, {
|
|
155
|
-
recursive: true,
|
|
156
|
-
force: true
|
|
157
|
-
});
|
|
158
|
-
await cp(join(packageRoot, "plugin", "agents"), target.agents, { recursive: true });
|
|
159
|
-
const removedLegacy = [];
|
|
160
|
-
for (const path of target.legacy) {
|
|
161
|
-
if (!await exists(path)) continue;
|
|
162
|
-
await rm(path, { recursive: true });
|
|
163
|
-
removedLegacy.push(path);
|
|
164
|
-
}
|
|
165
|
-
return {
|
|
166
|
-
action: "install",
|
|
167
|
-
changed: [
|
|
168
|
-
target.config,
|
|
169
|
-
target.cache,
|
|
170
|
-
target.agents,
|
|
171
|
-
...removedLegacy
|
|
172
|
-
],
|
|
173
|
-
backups
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
async function cleanup(_options) {
|
|
177
|
-
const target = paths();
|
|
178
|
-
const root = backupRoot();
|
|
179
|
-
const backups = [
|
|
180
|
-
await backup(target.config, root),
|
|
181
|
-
await backup(target.marketplaceCache, root),
|
|
182
|
-
await backup(target.agents, root)
|
|
183
|
-
].filter((path) => path !== void 0);
|
|
184
|
-
const changed = [];
|
|
185
|
-
if (await exists(target.config)) {
|
|
186
|
-
const current = await readText(target.config);
|
|
187
|
-
const unmanaged = removeManaged(current);
|
|
188
|
-
const cleaned = `${unmanaged}\n`;
|
|
189
|
-
if (unmanaged.length === 0 && current.includes("# >>> holycodex managed >>>")) {
|
|
190
|
-
await rm(target.config);
|
|
191
|
-
changed.push(target.config);
|
|
192
|
-
} else if (cleaned !== current) {
|
|
193
|
-
await atomicWrite(target.config, cleaned);
|
|
194
|
-
changed.push(target.config);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (await exists(target.marketplaceCache)) {
|
|
198
|
-
await rm(target.marketplaceCache, { recursive: true });
|
|
199
|
-
changed.push(target.marketplaceCache);
|
|
200
|
-
}
|
|
201
|
-
if (await exists(target.agents)) {
|
|
202
|
-
await rm(target.agents, { recursive: true });
|
|
203
|
-
changed.push(target.agents);
|
|
204
|
-
}
|
|
205
|
-
return {
|
|
206
|
-
action: "cleanup",
|
|
207
|
-
changed,
|
|
208
|
-
backups
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/cli.ts
|
|
213
|
-
var VERSION = "0.5.2";
|
|
214
|
-
var HELP = `HolyCodex ${VERSION}\n\nUsage: holycodex <install|cleanup> [options]\n\nOptions:\n --help Show help\n --version Show version\n --no-tui Accepted; commands are noninteractive\n --codex-autonomous Set autonomous Codex permissions (default)\n --no-codex-autonomous Preserve existing Codex permissions\n --json Print machine-readable result\n`;
|
|
215
|
-
async function main() {
|
|
216
|
-
const args = process$1.argv.slice(2);
|
|
217
|
-
if (args.includes("--help") || args.length === 0) {
|
|
218
|
-
process$1.stdout.write(HELP);
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
if (args.includes("--version")) {
|
|
222
|
-
process$1.stdout.write(`${VERSION}\n`);
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
const command = args.find((arg) => !arg.startsWith("--"));
|
|
226
|
-
const options = {
|
|
227
|
-
autonomous: !args.includes("--no-codex-autonomous"),
|
|
228
|
-
json: args.includes("--json")
|
|
229
|
-
};
|
|
230
|
-
const result = command === "install" ? await install(options) : command === "cleanup" ? await cleanup(options) : void 0;
|
|
231
|
-
if (result === void 0) throw new Error(`Unknown command: ${command ?? ""}`);
|
|
232
|
-
process$1.stdout.write(options.json ? `${JSON.stringify(result)}\n` : `HolyCodex ${result.action} complete.\n`);
|
|
233
|
-
}
|
|
234
|
-
await main();
|
|
235
|
-
//#endregion
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region src/core-instructions.ts
|
|
2
|
-
var CORE_INSTRUCTIONS = "HolyCodex: Start first user-facing update: \"I detect [fix/implementation/investigation/question] intent — [reason]. [action].\" Act. Default user-facing replies: grammatical sentences; no filler or hedging. Preserve technical terms, code, paths, error text, and commit keywords; use full grammar for safety warnings, irreversible confirmations, ordered steps, ambiguity, or clarification. Shell: on native Windows, before any shell call resolve `mcp__git_bash__run` from the full callable registry, including deferred tools, and use it when available; otherwise use the native shell directly. Prompt, skill, or instruction edit: load caveman; preserve constraints. Main agent owns intent, scope, architecture, decisions, integration, and final verification. Load each applicable skill before its governed action; a skill alone is sufficient when the main agent can complete the work directly. Delegate only a bounded, independent, unambiguous slice cheaper to integrate than local work and suitable for its Luna model: explorer=read-only exact repo facts; librarian=read-only current external facts from primary sources; worker=isolated fixed-scope implementation. Never delegate trivial or coupled work, architecture, user clarification, integration, final judgment, or final verification. Every packet states exact question or outcome; repository root; allowed paths and symbols; forbidden paths; relevant architecture and existing behavior; required skills; exact inputs; output format; acceptance criteria; required commands or evidence; unchanged constraints; prohibited expansion; known uncertainty; blocker behavior; exact stop condition. Use concrete names, paths, APIs, functions, tests, versions, and expected observations when known; include no unrelated transcript. Treat returns as input: inspect, reconcile, integrate, and verify. Stop when packet is satisfied or blocked; never recurse or create agent organizations. Use GPT 5.6 Luna low for explorer and librarian; use GPT 5.6 Luna medium for worker.";
|
|
3
|
-
//#endregion
|
|
4
|
-
export { CORE_INSTRUCTIONS as t };
|