@imdeadpool/guardex 7.0.21 → 7.0.23
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 +39 -29
- package/package.json +5 -1
- package/src/cli/args.js +89 -0
- package/src/cli/main.js +645 -2873
- package/src/context.js +195 -31
- package/src/core/stdin.js +52 -0
- package/src/core/versions.js +33 -0
- package/src/doctor/index.js +1071 -0
- package/src/finish/index.js +456 -358
- package/src/git/index.js +604 -1
- package/src/hooks/index.js +64 -0
- package/src/output/index.js +72 -5
- package/src/report/session-severity.js +213 -0
- package/src/sandbox/index.js +301 -52
- package/src/scaffold/index.js +627 -0
- package/src/toolchain/index.js +559 -179
- package/templates/AGENTS.multiagent-safety.md +25 -0
- package/templates/scripts/agent-branch-finish.sh +86 -6
- package/templates/scripts/agent-session-state.js +62 -1
- package/templates/scripts/agent-worktree-prune.sh +15 -1
- package/templates/scripts/codex-agent.sh +38 -0
- package/templates/scripts/install-vscode-active-agents-extension.js +38 -11
- package/templates/scripts/openspec/init-plan-workspace.sh +34 -3
- package/templates/vscode/guardex-active-agents/README.md +9 -6
- package/templates/vscode/guardex-active-agents/extension.js +805 -77
- package/templates/vscode/guardex-active-agents/icon.png +0 -0
- package/templates/vscode/guardex-active-agents/package.json +15 -3
- package/templates/vscode/guardex-active-agents/session-schema.js +311 -4
package/README.md
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img alt="gitguardex logo" src="./logo.png" width="
|
|
2
|
+
<img alt="gitguardex logo" src="./logo.png" width="390">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center">
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
guardian t-rex for multi-agent repos
|
|
9
|
-
</p>
|
|
5
|
+
<h1 align="center"> guardian t-rex for multi-agent repos</h1>
|
|
10
6
|
|
|
11
7
|
<p align="center">
|
|
12
8
|
isolated worktrees, file locks, and PR-only merges for codex, claude, and human teammates
|
|
@@ -14,6 +10,9 @@
|
|
|
14
10
|
|
|
15
11
|
<p align="center">
|
|
16
12
|
<a href="https://www.npmjs.com/package/@imdeadpool/guardex"><img alt="npm version" src="https://img.shields.io/npm/v/%40imdeadpool%2Fguardex?label=npm&style=flat-square&color=cb3837&logo=npm&logoColor=white"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/@imdeadpool/guardex"><img alt="npm downloads per month" src="https://img.shields.io/npm/dm/%40imdeadpool%2Fguardex?label=downloads%2Fmonth&style=flat-square&color=0b76c5"></a>
|
|
14
|
+
<a href="https://github.com/recodeee/gitguardex/actions/workflows/ci.yml"><img alt="CI status" src="https://img.shields.io/github/actions/workflow/status/recodeee/gitguardex/ci.yml?branch=main&label=CI&style=flat-square"></a>
|
|
15
|
+
<a href="https://scorecard.dev/viewer/?uri=github.com/recodeee/gitguardex"><img alt="OpenSSF Scorecard" src="https://img.shields.io/ossf-scorecard/github.com/recodeee/gitguardex?label=OpenSSF%20Scorecard&style=flat-square"></a>
|
|
17
16
|
<a href="https://github.com/recodeee/gitguardex/stargazers"><img alt="stars" src="https://img.shields.io/github/stars/recodeee/gitguardex?label=stars&style=flat-square&color=d4ac0d"></a>
|
|
18
17
|
<a href="https://github.com/recodeee/gitguardex/commits/main"><img alt="last commit" src="https://img.shields.io/github/last-commit/recodeee/gitguardex?label=last%20commit&style=flat-square&color=7aa2f7"></a>
|
|
19
18
|
<a href="./LICENSE"><img alt="license" src="https://img.shields.io/npm/l/%40imdeadpool%2Fguardex?label=license&style=flat-square&color=97ca00"></a>
|
|
@@ -28,14 +27,30 @@
|
|
|
28
27
|
<a href="#commands">Commands</a>
|
|
29
28
|
</p>
|
|
30
29
|
|
|
30
|
+
|
|
31
|
+
<h3 align="center">Install in one line</h3>
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm i -g @imdeadpool/guardex
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<sub>
|
|
39
|
+
Then <code>cd</code> into your repo and run <code>gx setup</code> — hook shims, repo state,
|
|
40
|
+
and OMX / OpenSpec / caveman wiring all scaffold in one go.
|
|
41
|
+
</sub>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
31
44
|
<p align="center">
|
|
32
45
|
<strong>guard many agent. keep one repo clean.</strong>
|
|
33
46
|
</p>
|
|
34
47
|
|
|
48
|
+
[about_description.txt](./about_description.txt)
|
|
49
|
+
|
|
50
|
+
Guardian T-Rex for your multi-agent repo. Isolated worktrees, file locks, and PR-only merges stop parallel Codex & Claude agents from overwriting each other's work. Auto-wires Oh My Codex, Oh My Claude, OpenSpec, and Caveman.
|
|
51
|
+
|
|
35
52
|
<p align="center">
|
|
36
|
-
|
|
37
|
-
worktree, claimed files, and a PR-only finish path instead of one shared checkout where agents
|
|
38
|
-
stomp each other.
|
|
53
|
+
Guardian T-Rex for your multi-agent repo. Isolated worktrees, file locks, and PR-only merges stop parallel Codex & Claude agents from overwriting each other's work. Auto-wires Oh My Codex, Oh My Claude, OpenSpec, and Caveman.
|
|
39
54
|
</p>
|
|
40
55
|
|
|
41
56
|
---
|
|
@@ -66,25 +81,6 @@ GitGuardex exists to stop that loop. Every agent gets its own worktree, claims t
|
|
|
66
81
|
<img alt="Install GitGuardex" src="https://raw.githubusercontent.com/recodeee/gitguardex/main/docs/images/install-hero.svg" width="680">
|
|
67
82
|
</p>
|
|
68
83
|
|
|
69
|
-
<h3 align="center">Install in one line</h3>
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
npm i -g @imdeadpool/guardex
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
<p align="center">
|
|
76
|
-
<sub>
|
|
77
|
-
Then <code>cd</code> into your repo and run <code>gx setup</code> — hook shims, repo state,
|
|
78
|
-
and OMX / OpenSpec / caveman wiring all scaffold in one go.
|
|
79
|
-
</sub>
|
|
80
|
-
</p>
|
|
81
|
-
|
|
82
|
-
<p align="center">
|
|
83
|
-
<a href="https://www.npmjs.com/package/@imdeadpool/guardex"><img alt="npm" src="https://img.shields.io/npm/v/%40imdeadpool%2Fguardex?label=latest&style=flat-square&color=cb3837&logo=npm&logoColor=white"></a>
|
|
84
|
-
<a href="https://www.npmjs.com/package/@imdeadpool/guardex"><img alt="downloads" src="https://img.shields.io/npm/dm/%40imdeadpool%2Fguardex?label=downloads&style=flat-square&color=0b76c5"></a>
|
|
85
|
-
<a href="https://github.com/recodeee/gitguardex/stargazers"><img alt="stars" src="https://img.shields.io/github/stars/recodeee/gitguardex?style=flat-square&color=d4ac0d"></a>
|
|
86
|
-
</p>
|
|
87
|
-
|
|
88
84
|
### Dashboard
|
|
89
85
|
|
|
90
86
|

|
|
@@ -270,7 +266,7 @@ To install the real companion into local VS Code from a GitGuardex-wired repo:
|
|
|
270
266
|
node scripts/install-vscode-active-agents-extension.js
|
|
271
267
|
```
|
|
272
268
|
|
|
273
|
-
It adds an `Active Agents` view to the Source Control container, groups each live repo into `ACTIVE AGENTS` and `CHANGES` sections, splits `ACTIVE AGENTS` into `BLOCKED`, `WORKING NOW`, `IDLE`, `STALLED`, and `DEAD` when those states are present, reads `.omx/state/active-sessions/*.json`, derives session state from git conflict markers, dirty worktree status, PID liveness, and recent file mtimes, and surfaces working/dead counts in the repo/header affordances. Reload the VS Code window after install.
|
|
269
|
+
It adds an `Active Agents` view to the Source Control container, groups each live repo into `ACTIVE AGENTS` and `CHANGES` sections, splits `ACTIVE AGENTS` into `BLOCKED`, `WORKING NOW`, `IDLE`, `STALLED`, and `DEAD` when those states are present, mirrors the selected session or active-agent count in the VS Code status bar, reads `.omx/state/active-sessions/*.json`, derives session state from git conflict markers, dirty worktree status, PID liveness, and recent file mtimes, and surfaces working/dead counts in the repo/header affordances. Reload the VS Code window after install.
|
|
274
270
|
|
|
275
271
|
---
|
|
276
272
|
|
|
@@ -344,6 +340,7 @@ gx sync
|
|
|
344
340
|
```sh
|
|
345
341
|
gx agents start # review monitor + stale cleanup
|
|
346
342
|
gx agents stop
|
|
343
|
+
gx agents stop --pid 12345
|
|
347
344
|
gx agents status
|
|
348
345
|
|
|
349
346
|
# tuning
|
|
@@ -372,6 +369,9 @@ That GitHub release then triggers `.github/workflows/release.yml`, which perform
|
|
|
372
369
|
```sh
|
|
373
370
|
gx prompt # full checklist (paste into Codex/Claude)
|
|
374
371
|
gx prompt --exec # commands only
|
|
372
|
+
gx prompt --part task-loop
|
|
373
|
+
gx prompt --exec --part finish --part cleanup
|
|
374
|
+
gx prompt --list-parts
|
|
375
375
|
gx prompt --snippet # AGENTS.md managed-block template
|
|
376
376
|
```
|
|
377
377
|
|
|
@@ -672,6 +672,16 @@ npm pack --dry-run
|
|
|
672
672
|
<details>
|
|
673
673
|
<summary><strong>v7.x</strong></summary>
|
|
674
674
|
|
|
675
|
+
### v7.0.23
|
|
676
|
+
- Bumped `@imdeadpool/guardex` from `7.0.22` to `7.0.23` so GitHub release and npm can advance together after `7.0.22` reached npm without a matching published GitHub release.
|
|
677
|
+
- Active Agents stays easier to scan and more truthful: the package repo remains the canonical source, inspect/install paths stay loadable across VS Code churn, and session rows group under worktrees with clearer merged-cleanup truth.
|
|
678
|
+
- Guardex prompt and finish guidance now pushes faster phase-based execution, keeps helper behavior single-sourced, and avoids fragmented probe loops when cleanup or branch-deletion races appear.
|
|
679
|
+
|
|
680
|
+
### v7.0.22
|
|
681
|
+
- Bumped `@imdeadpool/guardex` from `7.0.21` to `7.0.22` so npm can publish the next release from the current merged mainline.
|
|
682
|
+
- The shipped `main` payload already includes lower-token prompt slices, SCM-selected lane visibility, truthful merged-cleanup evidence, the Active Agents brand/icon refresh, and the remaining CLI extraction cleanups without changing Guardex behavior.
|
|
683
|
+
- Keep the release scoped to version and release metadata only; the package payload stays the same as the verified `main` branch contents.
|
|
684
|
+
|
|
675
685
|
### v7.0.21
|
|
676
686
|
- Bumped `@imdeadpool/guardex` from `7.0.20` to `7.0.21` so npm can publish the next release from the current merged mainline.
|
|
677
687
|
- Keep the release scoped to version and release metadata only; the package payload stays the same as the verified `main` branch contents.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imdeadpool/guardex",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.23",
|
|
4
4
|
"description": "Guardian T-Rex for your multi-agent repo. Isolated worktrees, file locks, and PR-only merges stop parallel Codex & Claude agents from overwriting each other's work. Auto-wires Oh My Codex, Oh My Claude, OpenSpec, and Caveman.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"preferGlobal": true,
|
|
@@ -69,5 +69,9 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"fast-check": "^3.23.2"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"jsonc-parser": "^3.3.1",
|
|
75
|
+
"semver": "^7.7.4"
|
|
72
76
|
}
|
|
73
77
|
}
|
package/src/cli/args.js
CHANGED
|
@@ -271,6 +271,7 @@ function parseAgentsArgs(rawArgs) {
|
|
|
271
271
|
reviewIntervalSeconds: 30,
|
|
272
272
|
cleanupIntervalSeconds: 60,
|
|
273
273
|
idleMinutes: DEFAULT_SHADOW_CLEANUP_IDLE_MINUTES,
|
|
274
|
+
pid: null,
|
|
274
275
|
};
|
|
275
276
|
|
|
276
277
|
for (let index = 0; index < rest.length; index += 1) {
|
|
@@ -314,12 +315,28 @@ function parseAgentsArgs(rawArgs) {
|
|
|
314
315
|
index += 1;
|
|
315
316
|
continue;
|
|
316
317
|
}
|
|
318
|
+
if (arg === '--pid') {
|
|
319
|
+
const next = rest[index + 1];
|
|
320
|
+
if (!next) {
|
|
321
|
+
throw new Error('--pid requires a positive integer value');
|
|
322
|
+
}
|
|
323
|
+
const parsedValue = Number.parseInt(next, 10);
|
|
324
|
+
if (!Number.isInteger(parsedValue) || parsedValue <= 0) {
|
|
325
|
+
throw new Error('--pid must be a positive integer');
|
|
326
|
+
}
|
|
327
|
+
options.pid = parsedValue;
|
|
328
|
+
index += 1;
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
317
331
|
throw new Error(`Unknown option: ${arg}`);
|
|
318
332
|
}
|
|
319
333
|
|
|
320
334
|
if (!['start', 'stop', 'status'].includes(options.subcommand)) {
|
|
321
335
|
throw new Error(`Unknown agents subcommand: ${options.subcommand}`);
|
|
322
336
|
}
|
|
337
|
+
if (options.pid !== null && options.subcommand !== 'stop') {
|
|
338
|
+
throw new Error('--pid is only supported with `gx agents stop`');
|
|
339
|
+
}
|
|
323
340
|
|
|
324
341
|
return options;
|
|
325
342
|
}
|
|
@@ -332,6 +349,15 @@ function parseReportArgs(rawArgs) {
|
|
|
332
349
|
scorecardJson: '',
|
|
333
350
|
outputDir: '',
|
|
334
351
|
date: '',
|
|
352
|
+
taskSize: '',
|
|
353
|
+
tokens: '',
|
|
354
|
+
execCount: '',
|
|
355
|
+
writeStdinCount: '',
|
|
356
|
+
completionBeforeTail: '',
|
|
357
|
+
expectedBound: '',
|
|
358
|
+
fragmentation: '',
|
|
359
|
+
finishPath: '',
|
|
360
|
+
postProof: '',
|
|
335
361
|
dryRun: false,
|
|
336
362
|
json: false,
|
|
337
363
|
};
|
|
@@ -373,6 +399,69 @@ function parseReportArgs(rawArgs) {
|
|
|
373
399
|
index += 1;
|
|
374
400
|
continue;
|
|
375
401
|
}
|
|
402
|
+
if (arg === '--task-size') {
|
|
403
|
+
const next = rawArgs[index + 1];
|
|
404
|
+
if (!next) throw new Error('--task-size requires a value');
|
|
405
|
+
options.taskSize = next;
|
|
406
|
+
index += 1;
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
if (arg === '--tokens') {
|
|
410
|
+
const next = rawArgs[index + 1];
|
|
411
|
+
if (!next) throw new Error('--tokens requires a value');
|
|
412
|
+
options.tokens = next;
|
|
413
|
+
index += 1;
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
if (arg === '--exec-count') {
|
|
417
|
+
const next = rawArgs[index + 1];
|
|
418
|
+
if (!next) throw new Error('--exec-count requires a value');
|
|
419
|
+
options.execCount = next;
|
|
420
|
+
index += 1;
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
if (arg === '--write-stdin-count') {
|
|
424
|
+
const next = rawArgs[index + 1];
|
|
425
|
+
if (!next) throw new Error('--write-stdin-count requires a value');
|
|
426
|
+
options.writeStdinCount = next;
|
|
427
|
+
index += 1;
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
if (arg === '--completion-before-tail') {
|
|
431
|
+
const next = rawArgs[index + 1];
|
|
432
|
+
if (!next) throw new Error('--completion-before-tail requires yes or no');
|
|
433
|
+
options.completionBeforeTail = next;
|
|
434
|
+
index += 1;
|
|
435
|
+
continue;
|
|
436
|
+
}
|
|
437
|
+
if (arg === '--expected-bound') {
|
|
438
|
+
const next = rawArgs[index + 1];
|
|
439
|
+
if (!next) throw new Error('--expected-bound requires a value');
|
|
440
|
+
options.expectedBound = next;
|
|
441
|
+
index += 1;
|
|
442
|
+
continue;
|
|
443
|
+
}
|
|
444
|
+
if (arg === '--fragmentation') {
|
|
445
|
+
const next = rawArgs[index + 1];
|
|
446
|
+
if (!next) throw new Error('--fragmentation requires a value');
|
|
447
|
+
options.fragmentation = next;
|
|
448
|
+
index += 1;
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
if (arg === '--finish-path') {
|
|
452
|
+
const next = rawArgs[index + 1];
|
|
453
|
+
if (!next) throw new Error('--finish-path requires a value');
|
|
454
|
+
options.finishPath = next;
|
|
455
|
+
index += 1;
|
|
456
|
+
continue;
|
|
457
|
+
}
|
|
458
|
+
if (arg === '--post-proof') {
|
|
459
|
+
const next = rawArgs[index + 1];
|
|
460
|
+
if (!next) throw new Error('--post-proof requires a value');
|
|
461
|
+
options.postProof = next;
|
|
462
|
+
index += 1;
|
|
463
|
+
continue;
|
|
464
|
+
}
|
|
376
465
|
if (arg === '--dry-run') {
|
|
377
466
|
options.dryRun = true;
|
|
378
467
|
continue;
|