@imdeadpool/guardex 5.0.7 → 5.0.9
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 +50 -4
- package/bin/multiagent-safety.js +989 -14
- package/package.json +1 -1
- package/templates/AGENTS.multiagent-safety.md +11 -2
- package/templates/githooks/pre-commit +20 -6
- package/templates/githooks/pre-push +3 -3
- package/templates/scripts/agent-branch-finish.sh +2 -2
- package/templates/scripts/agent-branch-start.sh +92 -60
- package/templates/scripts/codex-agent.sh +234 -5
package/README.md
CHANGED
|
@@ -69,6 +69,13 @@ gx cleanup --branch "$(git rev-parse --abbrev-ref HEAD)"
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
If you use `scripts/codex-agent.sh`, the finish flow is auto-run after the Codex session exits.
|
|
72
|
+
It auto-commits sandbox changes, retries once after syncing if the branch moved behind base during the run, then pushes/opens PR merge flow against the current base branch.
|
|
73
|
+
|
|
74
|
+
If you run Codex in multiple existing agent worktrees directly (for example from VS Code Source Control), finalize all completed branches with:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
gx finish --all
|
|
78
|
+
```
|
|
72
79
|
|
|
73
80
|
## Visual workflow
|
|
74
81
|
|
|
@@ -88,6 +95,10 @@ If you use `scripts/codex-agent.sh`, the finish flow is auto-run after the Codex
|
|
|
88
95
|
|
|
89
96
|

|
|
90
97
|
|
|
98
|
+
### Real VS Code Source Control layout (exact screenshot)
|
|
99
|
+
|
|
100
|
+

|
|
101
|
+
|
|
91
102
|
## Copy-paste: common commands
|
|
92
103
|
|
|
93
104
|
```sh
|
|
@@ -97,6 +108,9 @@ gx status
|
|
|
97
108
|
# setup and repair
|
|
98
109
|
gx setup
|
|
99
110
|
gx doctor
|
|
111
|
+
# setup + repair another repo without switching your current repo checkout
|
|
112
|
+
gx setup --target /path/to/repo
|
|
113
|
+
gx doctor --target /path/to/repo
|
|
100
114
|
|
|
101
115
|
# protected branch management
|
|
102
116
|
gx protect list
|
|
@@ -108,7 +122,10 @@ gx sync --check
|
|
|
108
122
|
gx sync
|
|
109
123
|
|
|
110
124
|
# continuously monitor open PRs targeting current branch and dispatch codex-agent review/merge tasks
|
|
111
|
-
|
|
125
|
+
gx review --interval 30
|
|
126
|
+
|
|
127
|
+
# auto-commit finished agent branches and open/merge PR flow in one pass
|
|
128
|
+
gx finish --all
|
|
112
129
|
|
|
113
130
|
# cleanup merged agent branches and hide clean stale agent worktrees
|
|
114
131
|
gx cleanup
|
|
@@ -123,7 +140,7 @@ gx report scorecard --repo github.com/recodeecom/multiagent-safety
|
|
|
123
140
|
Run this in your local shell to keep watching PRs targeting the current branch (or `--base <branch>`):
|
|
124
141
|
|
|
125
142
|
```sh
|
|
126
|
-
|
|
143
|
+
gx review --interval 30
|
|
127
144
|
```
|
|
128
145
|
|
|
129
146
|
Useful flags:
|
|
@@ -143,10 +160,12 @@ Note: the monitor dispatches Codex through explicit `--task/--agent/--base` flag
|
|
|
143
160
|
- `gx setup` checks GitHub CLI (`gh`) and prints install guidance if missing.
|
|
144
161
|
- Interactive self-update prompt defaults to **No** (`[y/N]`).
|
|
145
162
|
- In initialized repos, `setup`/`install`/`fix` block protected-base writes unless explicitly overridden.
|
|
146
|
-
- Direct commits/pushes to protected branches are blocked by default
|
|
163
|
+
- Direct commits/pushes to protected branches are blocked by default.
|
|
164
|
+
- Exception: VS Code Source Control commits are allowed on protected branches that exist only locally (no upstream and no remote branch).
|
|
147
165
|
- Optional repo override for manual VS Code protected-branch writes: `git config multiagent.allowVscodeProtectedBranchWrites true`.
|
|
148
166
|
- Codex/agent sessions stay blocked on protected branches and must use `agent/*` branch + PR workflow.
|
|
149
167
|
- On protected `main`, `gx doctor` auto-runs in a sandbox agent branch/worktree.
|
|
168
|
+
- In-place agent branching is disabled; `scripts/agent-branch-start.sh` always creates a separate worktree to keep your visible local/base branch unchanged.
|
|
150
169
|
- `scripts/agent-branch-start.sh` hydrates `scripts/codex-agent.sh` into new sandbox worktrees when missing, so auto-finish launcher flow stays available.
|
|
151
170
|
|
|
152
171
|
## Configure protected branches
|
|
@@ -222,6 +241,19 @@ scripts/openspec/init-plan-workspace.sh
|
|
|
222
241
|
|
|
223
242
|
If `package.json` exists, setup also adds `agent:*` helper scripts.
|
|
224
243
|
|
|
244
|
+
## OpenSpec quick start after `gx setup`
|
|
245
|
+
|
|
246
|
+
If you enabled global OpenSpec install during setup (`@fission-ai/openspec`), use the full guide here:
|
|
247
|
+
|
|
248
|
+
- [`docs/openspec-getting-started.md`](./docs/openspec-getting-started.md)
|
|
249
|
+
|
|
250
|
+
### OpenSpec in agent sub-branches
|
|
251
|
+
|
|
252
|
+
- `scripts/codex-agent.sh` enforces an OpenSpec workspace before it launches Codex in each sandbox branch/worktree.
|
|
253
|
+
- `scripts/agent-branch-start.sh` can also scaffold `openspec/plan/<agent-branch-slug>/` when you set `MUSAFETY_OPENSPEC_AUTO_INIT=true`.
|
|
254
|
+
- Set `MUSAFETY_OPENSPEC_AUTO_INIT=false` (default for `agent-branch-start`) to skip branch-start auto-bootstrap.
|
|
255
|
+
- Set `MUSAFETY_OPENSPEC_PLAN_SLUG=<kebab-case-slug>` to force a specific plan workspace name.
|
|
256
|
+
|
|
225
257
|
## Security and maintenance posture
|
|
226
258
|
|
|
227
259
|
- CI matrix on Node 18/20/22 (`npm test`, `node --check`, `npm pack --dry-run`)
|
|
@@ -239,9 +271,23 @@ npm pack --dry-run
|
|
|
239
271
|
|
|
240
272
|
## Release notes
|
|
241
273
|
|
|
274
|
+
### v5.0.9
|
|
275
|
+
|
|
276
|
+
- Enforced OpenSpec workspace bootstrap for sandbox agent execution: `scripts/codex-agent.sh` now initializes `openspec/plan/<agent-branch-slug>/` before launching Codex, and `scripts/agent-branch-start.sh` supports `MUSAFETY_OPENSPEC_AUTO_INIT` plus `MUSAFETY_OPENSPEC_PLAN_SLUG`.
|
|
277
|
+
- Tightened doctor auto-finish correctness: sandbox finish now waits for merge and exits non-zero if the PR closes without merge, so repair flows are not reported as complete when policy blocks merge.
|
|
278
|
+
- Updated package version from `5.0.8` to `5.0.9` for the next npm publish.
|
|
279
|
+
|
|
280
|
+
### v5.0.8
|
|
281
|
+
|
|
282
|
+
- Fixed `bin/multiagent-safety.js` syntax regressions in the doctor sandbox flow (`Unexpected identifier` / `Unexpected end of input`) that were breaking CLI execution and CI tests.
|
|
283
|
+
- Restored `scripts/codex-agent.sh` from `templates/scripts/codex-agent.sh` so critical runtime helper parity checks pass in clean CI clones.
|
|
284
|
+
- Bumped package version from `5.0.7` to `5.0.8` for the next npm publish.
|
|
285
|
+
|
|
242
286
|
### v5.0.7
|
|
287
|
+
### Unreleased (generated draft, not versioned yet)
|
|
243
288
|
|
|
244
|
-
-
|
|
289
|
+
- Add the user-facing changes for the next release here before assigning a version number.
|
|
290
|
+
- Keep this section focused on behavior changes (`Added`, `Changed`, `Fixed`) rather than version-bump-only notes.
|
|
245
291
|
|
|
246
292
|
### v5.0.6
|
|
247
293
|
|