agents-gitflow-guard 0.0.22 → 0.0.24
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 +17 -23
- package/README.zh.md +17 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,20 +40,20 @@ You define your own branches —
|
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
# DSH — in-process plugin; restart DSH afterwards (plugins load at startup)
|
|
43
|
-
dsh plugin --profile web add agents-gitflow-guard
|
|
43
|
+
dsh plugin --profile web add agents-gitflow-guard
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
47
|
# Claude Code · Codex · OpenCode · Antigravity — standalone hooks, no DSH needed
|
|
48
|
-
npm i -g agents-gitflow-guard
|
|
48
|
+
npm i -g agents-gitflow-guard
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
# Pi — in-process extension
|
|
53
|
-
npm i -D agents-gitflow-guard
|
|
53
|
+
npm i -D agents-gitflow-guard
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
> **
|
|
56
|
+
> **Note**: A bare `add` or `npm i` installs the latest version from npm registry. If your registry mirror has a cache delay or you need to lock to a specific version, append `@<version>` (e.g. `npm i -g agents-gitflow-guard@<version>`). (DSH users: the pnpm peer-dependency *warning* is expected — DSH supplies `@deepseek-ai/cordis` / `@deepseek-ai/dsh-tools` through its shared profile module fallback at startup; the plugin works normally.)
|
|
57
57
|
>
|
|
58
58
|
> The hook clients (Claude Code · Codex · OpenCode · Antigravity) need one wiring step after install — **one command per client** (below). Pi needs a copy step; DSH is already wired by install.
|
|
59
59
|
|
|
@@ -356,14 +356,14 @@ The PR/MR target is resolved via `gh pr view` (GitHub) or `glab mr view` (GitLab
|
|
|
356
356
|
|
|
357
357
|
| Agent | Install command | After that |
|
|
358
358
|
|---|---|---|
|
|
359
|
-
| DSH | `dsh plugin --profile web add agents-gitflow-guard
|
|
360
|
-
| Claude Code · Codex · OpenCode · Antigravity | `npm i -g agents-gitflow-guard
|
|
361
|
-
| Pi | `npm i -D agents-gitflow-guard
|
|
359
|
+
| DSH | `dsh plugin --profile web add agents-gitflow-guard` | restart DSH — the plugin auto-mounts as a profile layer |
|
|
360
|
+
| Claude Code · Codex · OpenCode · Antigravity | `npm i -g agents-gitflow-guard` | `gitflow-guard wire --client <name>` — one command per client (below) |
|
|
361
|
+
| Pi | `npm i -D agents-gitflow-guard` | copy `pi/gitflow-guard.ts` into `.pi/extensions/` (below) |
|
|
362
362
|
|
|
363
363
|
**DSH — in-process plugin** (the standard path, already covered in [Quick Start](#quick-start--30-seconds-to-a-guarded-repo)):
|
|
364
364
|
|
|
365
365
|
```bash
|
|
366
|
-
dsh plugin --profile web add agents-gitflow-guard
|
|
366
|
+
dsh plugin --profile web add agents-gitflow-guard
|
|
367
367
|
```
|
|
368
368
|
|
|
369
369
|
Then restart DSH. Upgrades are the same command, followed by another restart.
|
|
@@ -380,7 +380,7 @@ The package declares `dsh.bundle.patch`, so `dsh plugin add` automatically makes
|
|
|
380
380
|
**Standalone agent hooks** — Claude Code / Codex / OpenCode / Antigravity, no DSH required. Install the CLI once, then wire one client per command (the guard is on by default via its built-in config, so wiring is all that remains):
|
|
381
381
|
|
|
382
382
|
```bash
|
|
383
|
-
npm i -g agents-gitflow-guard
|
|
383
|
+
npm i -g agents-gitflow-guard # provides the `gitflow-guard` binary
|
|
384
384
|
gitflow-guard wire --client claude --project --yes
|
|
385
385
|
gitflow-guard wire --client codex --project --yes
|
|
386
386
|
gitflow-guard wire --client opencode --project --yes
|
|
@@ -440,7 +440,7 @@ gitflow-guard wire --client antigravity --project --yes
|
|
|
440
440
|
Pi loads extensions in-process (no stdin payload, no subprocess hook). Install the shipped entry point into the project and keep the package in devDependencies:
|
|
441
441
|
|
|
442
442
|
```bash
|
|
443
|
-
npm i -D agents-gitflow-guard
|
|
443
|
+
npm i -D agents-gitflow-guard
|
|
444
444
|
mkdir -p .pi/extensions
|
|
445
445
|
cp node_modules/agents-gitflow-guard/pi/gitflow-guard.ts .pi/extensions/gitflow-guard.ts
|
|
446
446
|
```
|
|
@@ -545,18 +545,14 @@ If it saves your team from a shortcut gone wrong, the coffee button at the top o
|
|
|
545
545
|
|
|
546
546
|
## Roadmap
|
|
547
547
|
|
|
548
|
-
|
|
548
|
+
Future capabilities and areas under active exploration:
|
|
549
549
|
|
|
550
|
-
-
|
|
551
|
-
-
|
|
552
|
-
-
|
|
553
|
-
-
|
|
550
|
+
- **New agent integrations**: Research and adapt to emerging agent hooks/extensions (e.g. Cursor, Windsurf, emerging agent CLIs).
|
|
551
|
+
- **Audit aggregation**: Cross-machine audit trail synchronization and team-level compliance export formats.
|
|
552
|
+
- **Workflow presets**: Ready-to-use configuration presets for common Git branching flows (Trunk-based development, multi-environment enterprise setups).
|
|
553
|
+
- **CI hard-gating**: Native CI pipeline hooks and PR check integration while keeping zero-dependency local execution.
|
|
554
554
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
- **audit sync**: sync the user-level audit log across machines (audit is local-only today; since 0.0.14 it lives outside the repository).
|
|
558
|
-
- **more pre-built templates**: extend the built-in defaults with ready-made presets for common flows (solo `develop`, multi-env enterprise) as community-contributed configs.
|
|
559
|
-
- **CI hard-gating research**: whether `pr checks` could become a real gate without hurting the platform-agnostic core.
|
|
555
|
+
For shipped features and release history, see [CHANGELOG.md](CHANGELOG.md).
|
|
560
556
|
|
|
561
557
|
Contributions welcome — see [Development](#development).
|
|
562
558
|
|
|
@@ -577,7 +573,7 @@ npm install
|
|
|
577
573
|
npm test # unit tests: classify / gate / config / cli / repo / platform / i18n / index / accuracy-audit / pi
|
|
578
574
|
npm run typecheck # tsc --noEmit, 0 errors
|
|
579
575
|
npm run build # tsdown → lib/ (CLI and plugin share the build)
|
|
580
|
-
npm run check:pins # assert package.json version matches
|
|
576
|
+
npm run check:pins # assert package.json version matches CHANGELOG heading and any README version pins
|
|
581
577
|
npm run verify:matrix # continuous cross-agent regression: DSH logic + zh-locale regression + Claude Code / Codex / OpenCode / Antigravity hook wiring + Pi extension
|
|
582
578
|
```
|
|
583
579
|
|
|
@@ -590,5 +586,3 @@ npm run verify:matrix # continuous cross-agent regression: DSH logic + zh-locale
|
|
|
590
586
|
## License
|
|
591
587
|
|
|
592
588
|
[MIT](LICENSE) © FeatureAgents
|
|
593
|
-
|
|
594
|
-
Historical v0 design decisions (Chinese; superseded by the role-driven model shipped in 0.0.2 — current behavior is documented in this README): [docs/design.md](docs/design.md).
|
package/README.zh.md
CHANGED
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
# DSH —— 进程内插件(装完重启 DSH; 插件在进程启动时加载)
|
|
42
|
-
dsh plugin --profile web add agents-gitflow-guard
|
|
42
|
+
dsh plugin --profile web add agents-gitflow-guard
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
# Claude Code · Codex · OpenCode · Antigravity —— 独立 hook,不需要 DSH
|
|
47
|
-
npm i -g agents-gitflow-guard
|
|
47
|
+
npm i -g agents-gitflow-guard
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
# Pi —— 进程内扩展
|
|
52
|
-
npm i -D agents-gitflow-guard
|
|
52
|
+
npm i -D agents-gitflow-guard
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
>
|
|
55
|
+
> **提示**: 裸 `add` 或 `npm i` 会默认安装 npm 注册表上的最新版本。若镜像源缓存有延迟或需锁定版本,可指定版本号(如 `npm i -g agents-gitflow-guard@<版本>`)。(DSH 用户: pnpm 打印的 peer 依赖 *警告* 属预期——DSH 启动时经共享模块回退提供 `@deepseek-ai/cordis` / `@deepseek-ai/dsh-tools`,插件正常工作。)
|
|
56
56
|
>
|
|
57
57
|
> hook 客户端(Claude Code · Codex · OpenCode · Antigravity)装完还要各做一步接线——**每个客户端一条命令**(见下)。Pi 拷贝一个文件;DSH 装完即已接线。
|
|
58
58
|
|
|
@@ -354,14 +354,14 @@ PR/MR 目标通过 `gh pr view`(GitHub)或 `glab mr view`(GitLab)解析;没有
|
|
|
354
354
|
|
|
355
355
|
| 客户端 | 安装命令 | 装完再做什么 |
|
|
356
356
|
|---|---|---|
|
|
357
|
-
| DSH | `dsh plugin --profile web add agents-gitflow-guard
|
|
358
|
-
| Claude Code · Codex · OpenCode · Antigravity | `npm i -g agents-gitflow-guard
|
|
359
|
-
| Pi | `npm i -D agents-gitflow-guard
|
|
357
|
+
| DSH | `dsh plugin --profile web add agents-gitflow-guard` | 重启 DSH——插件自动挂为 profile 层 |
|
|
358
|
+
| Claude Code · Codex · OpenCode · Antigravity | `npm i -g agents-gitflow-guard` | `gitflow-guard wire --client <名>`——每个客户端一条命令(见下) |
|
|
359
|
+
| Pi | `npm i -D agents-gitflow-guard` | 把 `pi/gitflow-guard.ts` 拷进 `.pi/extensions/`(见下) |
|
|
360
360
|
|
|
361
361
|
**DSH —— 进程内插件**(标准路径,已在[快速开始](#快速开始30-秒用上)覆盖):
|
|
362
362
|
|
|
363
363
|
```bash
|
|
364
|
-
dsh plugin --profile web add agents-gitflow-guard
|
|
364
|
+
dsh plugin --profile web add agents-gitflow-guard
|
|
365
365
|
```
|
|
366
366
|
|
|
367
367
|
然后重启 DSH。升级用同一命令,再重启一次。
|
|
@@ -378,7 +378,7 @@ dsh plugin --profile web add file:/path/to/agents-gitflow-guard
|
|
|
378
378
|
**各 agent 独立 hook**——Claude Code / Codex / OpenCode / Antigravity,不依赖 DSH。全局装一次 CLI,然后**每客户端一条命令接线**(守卫凭内置默认配置已默认开启,接线是唯一剩下的事):
|
|
379
379
|
|
|
380
380
|
```bash
|
|
381
|
-
npm i -g agents-gitflow-guard
|
|
381
|
+
npm i -g agents-gitflow-guard # 提供 `gitflow-guard` 二进制
|
|
382
382
|
gitflow-guard wire --client claude --project --yes
|
|
383
383
|
gitflow-guard wire --client codex --project --yes
|
|
384
384
|
gitflow-guard wire --client opencode --project --yes
|
|
@@ -437,7 +437,7 @@ gitflow-guard wire --client antigravity --project --yes
|
|
|
437
437
|
Pi 以进程内扩展装载(没有 stdin payload,也没有子进程 hook)。把随包发布的入口装进项目、包留在 devDependencies:
|
|
438
438
|
|
|
439
439
|
```bash
|
|
440
|
-
npm i -D agents-gitflow-guard
|
|
440
|
+
npm i -D agents-gitflow-guard
|
|
441
441
|
mkdir -p .pi/extensions
|
|
442
442
|
cp node_modules/agents-gitflow-guard/pi/gitflow-guard.ts .pi/extensions/gitflow-guard.ts
|
|
443
443
|
```
|
|
@@ -542,18 +542,14 @@ MIT,免费,无条件。随便用、随便改、随便发,唯一义务是保留
|
|
|
542
542
|
|
|
543
543
|
## 路线图
|
|
544
544
|
|
|
545
|
-
|
|
545
|
+
未来规划与正在探索的方向:
|
|
546
546
|
|
|
547
|
-
-
|
|
548
|
-
-
|
|
549
|
-
-
|
|
550
|
-
-
|
|
547
|
+
- **更多 Agent 平台接入**: 调研并适配新兴 Coding Agent 工具(如 Cursor、Windsurf、新一代 CLI Agent)。
|
|
548
|
+
- **审计汇总与导出**: 跨机器审计日志同步及团队级安全合规导出格式。
|
|
549
|
+
- **场景化流程预设**: 针对常见 Git 分支模式(Trunk-based 单主干模式、多环境企业级 GitFlow)的现成配置预设。
|
|
550
|
+
- **CI 门禁与 PR 校验**: 探索原生 CI 管道集成与 PR 检查联动机制, 同时保持本地执行零依赖。
|
|
551
551
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
- **审计同步**:跨机器同步用户级审计日志(现仍仅本地;0.0.14 起已存于仓库外)。
|
|
555
|
-
- **更多预制模板**:在内置默认之上延伸,为常用流程(solo `develop`、多环境企业)提供社区贡献的现成配置预设。
|
|
556
|
-
- **CI 硬门槛研究**:`pr checks` 能否在不伤平台无关核心的前提下变成真实门槛。
|
|
552
|
+
已发布功能与历史版本记录详见 [CHANGELOG.md](CHANGELOG.md)。
|
|
557
553
|
|
|
558
554
|
欢迎贡献——见[开发](#开发)。
|
|
559
555
|
|
|
@@ -574,7 +570,7 @@ npm install
|
|
|
574
570
|
npm test # 单测: classify / gate / config / cli / repo / platform / i18n / index / accuracy-audit / pi
|
|
575
571
|
npm run typecheck # tsc --noEmit, 0 Error
|
|
576
572
|
npm run build # tsdown → lib/(CLI 与插件共用)
|
|
577
|
-
npm run check:pins # 校验 package.json
|
|
573
|
+
npm run check:pins # 校验 package.json 版本与 CHANGELOG 标题及版本示例一致
|
|
578
574
|
npm run verify:matrix # 连续复测矩阵: DSH 逻辑 + zh 文案回归 + Claude Code / Codex / OpenCode / Antigravity hook 编码 + Pi 扩展
|
|
579
575
|
```
|
|
580
576
|
|
|
@@ -587,5 +583,3 @@ npm run verify:matrix # 连续复测矩阵: DSH 逻辑 + zh 文案回归 + Claud
|
|
|
587
583
|
## 许可证
|
|
588
584
|
|
|
589
585
|
[MIT](LICENSE) © FeatureAgents
|
|
590
|
-
|
|
591
|
-
v0 历史设计决策(中文;已被 0.0.2 角色驱动模型取代——现行行为以本 README 为准):[docs/design.md](docs/design.md)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-gitflow-guard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "A configurable branch-role guard for AI coding agents (DSH / Claude Code / Codex / OpenCode / Antigravity / Pi) — zero-config defaults (develop+main) out of the box, deep-merge override, and per-client native hooks via gitflow-guard wire/setup; integration/preview/production/archive, each with its own update rules",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|