@hiveai/cli 0.9.9 → 0.9.10
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 +62 -19
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# @hiveai/cli
|
|
2
2
|
|
|
3
|
-
> **hAIve** —
|
|
3
|
+
> **hAIve** — policy enforcement for AI coding agents.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
hAIve makes your team knowledge enforceable. It gives agents a required briefing before work starts, stores decisions/gotchas/failed attempts as version-controlled Markdown, and adds MCP, Git, CI, and wrapper gates so AI-generated changes cannot quietly bypass project policy.
|
|
6
|
+
|
|
7
|
+
The memory system is the mechanism. The CLI is the control plane: initialize policy, run agents inside hAIve, check the repo, and block unsafe workflow states.
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
@@ -23,31 +25,32 @@ This installs the `haive` command globally. **The MCP server is bundled** — us
|
|
|
23
25
|
## Quick start
|
|
24
26
|
|
|
25
27
|
```bash
|
|
26
|
-
# 1. Initialize hAIve in your project (
|
|
28
|
+
# 1. Initialize hAIve in your project (strict enforcement ON by default)
|
|
27
29
|
cd my-project
|
|
28
|
-
haive init #
|
|
29
|
-
|
|
30
|
+
haive init # .ai/, MCP config, hooks, CI, code-map
|
|
31
|
+
haive enforce install # re-apply strict MCP + Git + CI enforcement gates
|
|
30
32
|
|
|
31
33
|
# 2. Point your AI client at the MCP server
|
|
32
34
|
# Add to ~/.claude.json / ~/.cursor/mcp.json:
|
|
33
35
|
# { "mcpServers": { "haive": { "command": "haive", "args": ["mcp", "--stdio", "--root", "/absolute/path"] } } }
|
|
34
36
|
|
|
35
|
-
# 3. Bootstrap
|
|
37
|
+
# 3. Bootstrap project context (run once in your AI client)
|
|
36
38
|
# → Use the bootstrap_project MCP prompt to analyze the codebase and fill .ai/project-context.md
|
|
37
39
|
|
|
38
|
-
# 4.
|
|
40
|
+
# 4. Start work through hAIve
|
|
41
|
+
haive briefing --task "add Stripe webhook"
|
|
42
|
+
haive run -- <agent-command> [args...] # for CLI agents without blocking hooks
|
|
39
43
|
|
|
40
|
-
# 5. Add
|
|
44
|
+
# 5. Add durable policy knowledge manually (or let the agent use mem_save/mem_tried)
|
|
41
45
|
haive memory add \
|
|
42
46
|
--type gotcha --slug "jpa-open-in-view" --scope team \
|
|
43
47
|
--paths src/main/resources/application.properties \
|
|
44
48
|
--body "spring.jpa.open-in-view=false is intentional — do not re-enable."
|
|
45
49
|
|
|
46
|
-
# 6.
|
|
47
|
-
haive
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
haive sync
|
|
50
|
+
# 6. Gate the workflow
|
|
51
|
+
haive enforce status
|
|
52
|
+
haive enforce check --stage pre-commit
|
|
53
|
+
haive enforce ci
|
|
51
54
|
```
|
|
52
55
|
|
|
53
56
|
---
|
|
@@ -56,10 +59,10 @@ haive sync
|
|
|
56
59
|
|
|
57
60
|
### `haive init`
|
|
58
61
|
|
|
59
|
-
Initialize the `.ai/` structure in a project. **Autopilot mode is ON by default**
|
|
62
|
+
Initialize the `.ai/` structure in a project. **Autopilot mode is ON by default** and now installs strict enforcement gates by default.
|
|
60
63
|
|
|
61
64
|
```bash
|
|
62
|
-
haive init # Autopilot:
|
|
65
|
+
haive init # Autopilot: policy config, hooks, CI, MCP setup, code-map
|
|
63
66
|
haive init --manual # Manual mode: you approve every memory yourself
|
|
64
67
|
haive init --no-bridges # Skip bridge file generation (CLAUDE.md, .cursorrules, etc.)
|
|
65
68
|
haive init --dir /other/path # Initialize in a specific directory
|
|
@@ -67,8 +70,8 @@ haive init --dir /other/path # Initialize in a specific directory
|
|
|
67
70
|
|
|
68
71
|
**Autopilot mode** (default):
|
|
69
72
|
- Memories are saved directly as `validated` (no approval cycle)
|
|
70
|
-
- Git hooks installed automatically (`haive
|
|
71
|
-
- CI
|
|
73
|
+
- Git hooks installed automatically (`haive enforce check` gates commits/pushes)
|
|
74
|
+
- CI workflows generated (`haive-enforcement.yml` and sync workflow)
|
|
72
75
|
- Initial code-map built (`.ai/code-map.json`) for symbol lookup
|
|
73
76
|
- Session recaps saved automatically when the MCP server exits
|
|
74
77
|
- Configuration stored in `.ai/haive.config.json`
|
|
@@ -76,7 +79,7 @@ haive init --dir /other/path # Initialize in a specific directory
|
|
|
76
79
|
**Manual mode** (`--manual`):
|
|
77
80
|
- Memories start as `proposed` and require explicit approval (`haive memory approve`)
|
|
78
81
|
- No automatic hooks or CI — set up manually with `haive install-hooks` and `haive init --with-ci`
|
|
79
|
-
- Full control over when knowledge
|
|
82
|
+
- Full control over when knowledge becomes team policy
|
|
80
83
|
|
|
81
84
|
**What it creates:**
|
|
82
85
|
|
|
@@ -96,7 +99,47 @@ your-project/
|
|
|
96
99
|
└── copilot-instructions.md # Bridge for GitHub Copilot (auto-generated)
|
|
97
100
|
```
|
|
98
101
|
|
|
99
|
-
Bridge files include mandatory rules
|
|
102
|
+
Bridge files include mandatory rules, but they are not the enforcement boundary. hAIve's portable enforcement comes from MCP policy, Git hooks, CI checks, and `haive run -- <agent>` for CLI agents.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### `haive enforce`
|
|
107
|
+
|
|
108
|
+
Install and run the agent-agnostic policy gates.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
haive enforce install # strict config + Git hooks + CI + supported client hooks
|
|
112
|
+
haive enforce status # show whether the repo is protected
|
|
113
|
+
haive enforce check --stage local # local policy gate
|
|
114
|
+
haive enforce check --stage pre-push # used by Git hooks
|
|
115
|
+
haive enforce ci # used by required CI checks
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Strict mode checks for:
|
|
119
|
+
|
|
120
|
+
- a recent hAIve briefing marker before local write workflows
|
|
121
|
+
- recent session recap before push/CI gates
|
|
122
|
+
- stale important memories anchored to changed code
|
|
123
|
+
- known anti-patterns from validated gotchas/decisions
|
|
124
|
+
|
|
125
|
+
### `haive run`
|
|
126
|
+
|
|
127
|
+
Wrap any CLI-based coding agent in a hAIve session.
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
haive run -- claude
|
|
131
|
+
haive run -- codex
|
|
132
|
+
haive run -- aider
|
|
133
|
+
haive run -- <custom-agent> [args...]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The wrapper writes a compact briefing file and exports:
|
|
137
|
+
|
|
138
|
+
- `HAIVE_PROJECT_ROOT`
|
|
139
|
+
- `HAIVE_SESSION_ID`
|
|
140
|
+
- `HAIVE_BRIEFING_FILE`
|
|
141
|
+
- `HAIVE_ENFORCEMENT=strict`
|
|
142
|
+
- `HAIVE_TOOL_PROFILE=enforcement`
|
|
100
143
|
|
|
101
144
|
---
|
|
102
145
|
|
package/dist/index.js
CHANGED
|
@@ -6072,7 +6072,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
6072
6072
|
};
|
|
6073
6073
|
}
|
|
6074
6074
|
var SERVER_NAME = "haive";
|
|
6075
|
-
var SERVER_VERSION = "0.9.
|
|
6075
|
+
var SERVER_VERSION = "0.9.10";
|
|
6076
6076
|
function jsonResult(data) {
|
|
6077
6077
|
return {
|
|
6078
6078
|
content: [
|
|
@@ -10494,7 +10494,7 @@ function registerDoctor(program2) {
|
|
|
10494
10494
|
timeout: 3e3,
|
|
10495
10495
|
stdio: ["ignore", "pipe", "ignore"]
|
|
10496
10496
|
}).trim();
|
|
10497
|
-
const cliVersion = "0.9.
|
|
10497
|
+
const cliVersion = "0.9.10";
|
|
10498
10498
|
if (legacyRaw && legacyRaw !== cliVersion) {
|
|
10499
10499
|
findings.push({
|
|
10500
10500
|
severity: "warn",
|
|
@@ -11646,7 +11646,7 @@ function registerRun(program2) {
|
|
|
11646
11646
|
|
|
11647
11647
|
// src/index.ts
|
|
11648
11648
|
var program = new Command49();
|
|
11649
|
-
program.name("haive").description("hAIve \u2014 team-first persistent memory layer for AI coding agents").version("0.9.
|
|
11649
|
+
program.name("haive").description("hAIve \u2014 team-first persistent memory layer for AI coding agents").version("0.9.10");
|
|
11650
11650
|
registerInit(program);
|
|
11651
11651
|
registerWelcome(program);
|
|
11652
11652
|
registerResolveProject(program);
|