codehere 2.0.0-beta.3 → 2.0.0
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 +4 -4
- package/package.json +1 -1
- package/src/commands.js +4 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Codehere is built to remove work, not add it. You keep using Claude Code, Codex
|
|
|
21
21
|
## Install (2 minutes)
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm install -g codehere
|
|
24
|
+
npm install -g codehere
|
|
25
25
|
cd your-project
|
|
26
26
|
codehere init --agent claude,codex,copilot # finds your test command, adds the hooks, asks you to approve the command
|
|
27
27
|
git add .codehere .claude/settings.json .codex/hooks.json .github/hooks/codehere.json .gitignore
|
|
@@ -30,7 +30,7 @@ git commit -m "Add Codehere" && git push
|
|
|
30
30
|
|
|
31
31
|
Name only the agents your team uses, such as `--agent claude` or `--agent codex,copilot`; with no `--agent`, `init` sets up Claude Code. The hooks go in `.claude/settings.json`, `.codex/hooks.json` and `.github/hooks/codehere.json`.
|
|
32
32
|
|
|
33
|
-
Each teammate installs the CLI once (`npm install -g codehere
|
|
33
|
+
Each teammate installs the CLI once (`npm install -g codehere`) and runs `codehere approve` once in the repo. Until they do, their agent tells them at session start that the test check is off. The hooks and the brain arrive through git.
|
|
34
34
|
|
|
35
35
|
Codex runs a repo's hooks only after each developer trusts them. Open Codex in the repo, trust the project if asked, then type `/hooks` and trust the four Codehere hooks. Do it once per clone, and again after an update that changes the hooks. Until then Codex skips them, and `codex exec` does not warn.
|
|
36
36
|
|
|
@@ -82,7 +82,7 @@ Don't want to commit help cards? Copy the printed text into WhatsApp, Discord or
|
|
|
82
82
|
| Restart-brief suggestion in long sessions | yes | no | no |
|
|
83
83
|
| Before it works | nothing | each developer trusts the hooks in `/hooks` | each developer trusts the folder when Copilot asks |
|
|
84
84
|
| MCP tools, instruction file | no | no | no |
|
|
85
|
-
| Tested on | 2.1.311 with haiku: [result](docs/conformance/2026-10-27-claude-2.1.311-haiku.md) | 0.164.0 with a local model (Qwen 3.5 9B through Ollama): [result](docs/conformance/2026-10-27-codex-0.164.0-qwen3.5-9b-q4-K-M.md) | 1.0.105 with a local model (Qwen 3.5 9B through Ollama): [result](docs/conformance/2026-10-29-copilot-1.0.105-qwen3.5-9b-q4-K-M.md),
|
|
85
|
+
| Tested on | 2.1.311 with haiku: [result](docs/conformance/2026-10-27-claude-2.1.311-haiku.md) | 0.164.0 with a local model (Qwen 3.5 9B through Ollama): [result](docs/conformance/2026-10-27-codex-0.164.0-qwen3.5-9b-q4-K-M.md) | 1.0.105 with a local model (Qwen 3.5 9B through Ollama): [result](docs/conformance/2026-10-29-copilot-1.0.105-qwen3.5-9b-q4-K-M.md), with only the Claude Code hooks installed: [result](docs/conformance/2026-10-29-copilot-1.0.105-qwen3.5-9b-q4-K-M-claude-hooks-only.md), and with a GitHub-hosted model (`auto`, which picked gpt-6-luna): [result](docs/conformance/2026-10-29-copilot-1.0.105-auto.md) |
|
|
86
86
|
|
|
87
87
|
The rows for rules, lessons and the finish check are checked on the real agent by `node scripts/conformance.mjs`. The other rows are checked by `npm test` on hook inputs recorded from each agent.
|
|
88
88
|
|
|
@@ -137,7 +137,7 @@ node demo/demo.mjs --step # press Enter between scenes (good for a live talk)
|
|
|
137
137
|
npm test # end-to-end checks
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
## Known limits
|
|
140
|
+
## Known limits
|
|
141
141
|
|
|
142
142
|
- Claude Code, Codex CLI and Copilot CLI. OpenCode is next. Copilot in VS Code reads the same hook files but has not been checked, and Copilot's cloud agent is not supported. See [Which agents](#which-agents) for what works on each.
|
|
143
143
|
- Lessons match by error text. Very generic errors can bring up a lesson that doesn't fit, which is why the agent gets it as reference, not as an instruction.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codehere",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A git-native team brain for vibe coders. Silent fixes for AI coding agents: breaks doom loops, verifies 'done', blocks test tampering, and shares what your team learned.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/src/commands.js
CHANGED
|
@@ -170,14 +170,16 @@ const PS = fs.existsSync('/bin/ps') ? '/bin/ps' : '/usr/bin/ps';
|
|
|
170
170
|
function underAgent() {
|
|
171
171
|
let pid = process.ppid;
|
|
172
172
|
for (let i = 0; i < 100 && pid > 1; i++) {
|
|
173
|
-
let line;
|
|
173
|
+
let line, args;
|
|
174
174
|
try {
|
|
175
175
|
line = execFileSync(PS, ['-o', 'ppid=,comm=', '-p', String(pid)], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();
|
|
176
|
+
args = execFileSync(PS, ['-o', 'args=', '-p', String(pid)], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();
|
|
176
177
|
} catch {
|
|
177
178
|
return true;
|
|
178
179
|
}
|
|
179
180
|
const m = /^(\d+)\s+(.+)$/.exec(line);
|
|
180
|
-
|
|
181
|
+
// on Linux, comm can be a thread name and not the program (seen with Node 24), so argv[0] counts too
|
|
182
|
+
if (!m || [m[2], args.split(/\s/, 1)[0]].some((n) => AGENT_PROCESSES.has(path.basename(n).toLowerCase()))) return true;
|
|
181
183
|
pid = Number(m[1]);
|
|
182
184
|
}
|
|
183
185
|
return pid > 1;
|