@yeison.restrepo.r/code-conductor 1.52.11 → 1.52.12
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
CHANGED
|
@@ -407,6 +407,7 @@ This is the first slice of `[FEAT-048]` (issue #97), and it covers enforcement o
|
|
|
407
407
|
| Guards 5, 6 and 7 (band roles, orchestrator run) | Not enforced for subagents: OpenCode does not tell the plugin which subagent made the call |
|
|
408
408
|
| Guard warnings | Not shown |
|
|
409
409
|
| `patch`/`apply_patch`, `multiedit` | Sent to the guard; a patch is checked file by file, confined to the project, under a strict marker grammar |
|
|
410
|
+
| `bash` with an argument other than `command`, `description` or `timeout`, a working directory included | Blocked: the guard checks a command as if it runs in the project directory, so put any `cd` in the command itself |
|
|
410
411
|
| `task`, `batch`, MCP and any other tool | Blocked: the guard cannot inspect them |
|
|
411
412
|
| `glob`, `grep`, `list`, `webfetch`, `websearch`, `codesearch` and other read-only tools | Allowed, as on Claude Code |
|
|
412
413
|
| `cc-*` commands, band agents, verbosity and context hooks | Not installed for OpenCode yet. OpenCode reads `CLAUDE.md` when there is no `AGENTS.md`, and loads `.claude/skills` |
|
|
@@ -497,7 +498,6 @@ The backup and temp rules keep the installer's own backups and crash-stranded te
|
|
|
497
498
|
- **`[BUG-058]`, open:** the test suite does not pass on a Windows checkout (CRLF checkout of `.mjs` files, `--import` given a bare path, symlink and `chmod` fixtures, `spawnSync('npm')` without a shell), and CI has no Windows leg to show it. Until it is fixed, develop against the suite on Linux/macOS or WSL; the shipped product itself is unaffected.
|
|
498
499
|
- **`[BUG-059]`, open:** the test helper that fakes the `gh` CLI is POSIX-only, so on a Windows machine where the suites load, tests can reach a real, logged-in `gh` and perform live GitHub writes. Until it is fixed, do not run `npm test` on Windows while authenticated to `gh`, or log out (`gh auth logout`) first.
|
|
499
500
|
- **`[BUG-070]`, open:** the GitHub Actions workflows pin `actions/checkout` and `actions/setup-node` by tag rather than by commit SHA, so a moved tag would change what runs; the risk is low, since both actions are first-party and the records guard runs with a read-only token and no secrets. Until it is fixed, a fork can pin both actions to full commit SHAs in its own workflows.
|
|
500
|
-
- **`[BUG-071]`, open:** the OpenCode guard plugin forwards only `command` from OpenCode's `bash` call, so if that tool runs a command in another working directory, Guard 3 evaluates it as if it ran in the project root. Until it is fixed, treat Guard 3 under OpenCode as best-effort for commands that set their own working directory.
|
|
501
501
|
- **`[BUG-074]`, open:** the `/cc-orchestrate` role definitions disagree on when a task's tests are done: `code` may hand back `build_executed` on a red suite, `plan` requires each task to end green, and `qa` passes only on exit 0, so one suite result gates differently depending on the role. Until it is fixed, read a `build_executed` hand-back's reported suite exit code yourself and treat a non-zero one as not done.
|
|
502
502
|
- **The `P7` false positive** described under [Guard 3, and what it learned](#guard-3-and-what-it-learned) is still live.
|
|
503
503
|
- **A re-run against an untouched `project.md` prints a recovery hint it cannot prove is needed.** If you install, never write anything into `.claude/memory/project.md`, and install again, you get a line suggesting the file may have been overwritten by a pre-`1.30.0` re-run. It was not; it equals the stub because it was seeded and never edited. The check compares content and **cannot distinguish "seeded and untouched" from "clobbered"**, which is why the wording is hedged to "may have been" rather than "was". This residual is named and accepted in [`BUG-039`'s spec at `:129`](docs/superpowers/specs/2026-09-27-bug039-installer-host-owned-state-design.md), where the alternative (restoring from the host's own git history) was rejected as writing host files out of the host's history with new failure modes. A **fresh** install is silent, which the Quickstart shows.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeison.restrepo.r/code-conductor",
|
|
3
|
-
"version": "1.52.
|
|
3
|
+
"version": "1.52.12",
|
|
4
4
|
"description": "A governance layer for Claude Code sessions: hooks that check an agent's commands before they run, a spec-first workflow, and project memory the next session reads.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic-development",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// Every tool is one of three kinds: mapped (sent to the guard), read-only (passes, as its
|
|
6
6
|
// Claude Code twin passes the hook matcher), or blocked. Anything not named is blocked:
|
|
7
7
|
// OpenCode's tool set is not versioned with this guard, so an unknown tool is never trusted.
|
|
8
|
+
// An unknown argument of a mapped tool is not trusted either: bash blocks any argument outside the few it knows.
|
|
8
9
|
// Zero dependencies by design; node: builtins only.
|
|
9
10
|
import { spawnSync } from 'node:child_process';
|
|
10
11
|
import { join, resolve, sep } from 'node:path';
|
|
@@ -85,10 +86,25 @@ function patchTool(a, directory, tool) {
|
|
|
85
86
|
return parsePatch(tool, a.patchText, directory);
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
// The guard checks a command as if it runs in the project directory, so an argument that
|
|
90
|
+
// could change where or how it runs is not trusted. The set is closed because OpenCode's
|
|
91
|
+
// bash schema is not versioned with this guard (BUG-071). An empty command is the guard's
|
|
92
|
+
// to judge (it allows it), so only the type of command is checked.
|
|
93
|
+
const BASH_ARGS = new Set(['command', 'description', 'timeout']);
|
|
94
|
+
const BASH_ARG_REASON = 'not supported; the guard checks a command as if it runs in the project directory, so drop the argument and put any cd in the command, where the guard sees it';
|
|
95
|
+
|
|
96
|
+
function bashTool(a, _d, tool) {
|
|
97
|
+
if (typeof a.command !== 'string') return badArg(tool, 'command', 'a string');
|
|
98
|
+
const unknown = Object.keys(a).filter((k) => a[k] !== undefined && !BASH_ARGS.has(k)).sort();
|
|
99
|
+
if (unknown.length === 0) return one('Bash', { command: a.command });
|
|
100
|
+
const names = unknown.map((k) => `"${k}"`).join(', ');
|
|
101
|
+
const which = unknown.length === 1 ? `argument ${names} is` : `arguments ${names} are`;
|
|
102
|
+
return blocked(tool, `${which} ${BASH_ARG_REASON}`);
|
|
103
|
+
}
|
|
104
|
+
|
|
88
105
|
// OpenCode tool name -> { payloads } for the guard, or { block } before any guard runs.
|
|
89
106
|
const MAPPED = {
|
|
90
|
-
|
|
91
|
-
bash: (a, _d, t) => (typeof a.command === 'string' ? one('Bash', { command: a.command }) : badArg(t, 'command', 'a string')),
|
|
107
|
+
bash: bashTool,
|
|
92
108
|
read: (a, _d, t) => (isText(a.filePath) ? one('Read', { file_path: a.filePath, offset: a.offset, limit: a.limit }) : badArg(t, 'filePath', 'a non-empty string')),
|
|
93
109
|
write: (a, _d, t) => (isText(a.filePath) ? one('Write', { file_path: a.filePath, content: a.content }) : badArg(t, 'filePath', 'a non-empty string')),
|
|
94
110
|
edit: (a, _d, t) => (isText(a.filePath) ? one('Edit', { file_path: a.filePath, old_string: a.oldString, new_string: a.newString }) : badArg(t, 'filePath', 'a non-empty string')),
|