@hiveai/mcp 0.3.0 → 0.3.3
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 +67 -14
- package/dist/index.js +527 -83
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +13 -0
- package/dist/server.js +527 -83
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,11 +23,19 @@ npm install -g @hiveai/cli
|
|
|
23
23
|
## Quick start
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
# 1.
|
|
27
|
-
|
|
26
|
+
# 1. Install the CLI
|
|
27
|
+
npm install -g @hiveai/cli
|
|
28
|
+
|
|
29
|
+
# 2. Initialize hAIve in your project (autopilot ON by default)
|
|
30
|
+
cd my-project
|
|
31
|
+
haive init # sets up .ai/, hooks, CI workflow, code-map — everything automatic
|
|
32
|
+
# haive init --manual # if you want to approve memories yourself
|
|
33
|
+
|
|
34
|
+
# 3. Point your AI client at the MCP server (see Client configuration below)
|
|
35
|
+
|
|
36
|
+
# 4. Bootstrap project context — run bootstrap_project prompt in your AI client once
|
|
28
37
|
|
|
29
|
-
#
|
|
30
|
-
# 3. Ask your AI to call get_briefing before starting any task
|
|
38
|
+
# 5. Your AI client now calls get_briefing at every session start automatically
|
|
31
39
|
```
|
|
32
40
|
|
|
33
41
|
---
|
|
@@ -99,6 +107,7 @@ One-shot onboarding: returns project context + module contexts + ranked relevant
|
|
|
99
107
|
{
|
|
100
108
|
"task": "add a Stripe payment integration",
|
|
101
109
|
"files": ["src/payments/PaymentService.ts"],
|
|
110
|
+
"symbols": ["PaymentService", "TenantFilter"],
|
|
102
111
|
"max_tokens": 8000,
|
|
103
112
|
"max_memories": 8,
|
|
104
113
|
"format": "full",
|
|
@@ -112,6 +121,7 @@ One-shot onboarding: returns project context + module contexts + ranked relevant
|
|
|
112
121
|
|---|---|---|
|
|
113
122
|
| `task` | — | What you're about to do. Used to rank memories by relevance. |
|
|
114
123
|
| `files` | `[]` | Files you're editing. Surfaces memories anchored to these files. |
|
|
124
|
+
| `symbols` | `[]` | Symbol names to look up in the code-map (e.g. `["PaymentService"]`). Returns file + line + kind without grepping. Requires `haive index code`. |
|
|
115
125
|
| `max_tokens` | `8000` | Token budget for the entire response. Sections are truncated to fit. |
|
|
116
126
|
| `max_memories` | `8` | Max memories to include. |
|
|
117
127
|
| `format` | `"full"` | `"full"` = complete bodies · `"compact"` = 1-line summaries (call `mem_get` for details) |
|
|
@@ -120,17 +130,22 @@ One-shot onboarding: returns project context + module contexts + ranked relevant
|
|
|
120
130
|
| `track` | `true` | Increment read_count for returned memories. |
|
|
121
131
|
|
|
122
132
|
**Response includes:**
|
|
123
|
-
- `
|
|
133
|
+
- `last_session` — most recent `haive session end` recap (surfaced first so agents start with fresh context)
|
|
134
|
+
- `project_context` — `.ai/project-context.md` (suppressed if still template — `is_template: true`)
|
|
124
135
|
- `module_contexts` — relevant `.ai/modules/<name>/context.md` files
|
|
125
|
-
- `memories` — ranked
|
|
126
|
-
- `
|
|
136
|
+
- `memories` — ranked memories with `confidence`, `unverified` flag (for draft/proposed), and `match reason`
|
|
137
|
+
- `symbol_locations` — file:line:kind results for each requested symbol (from code-map)
|
|
138
|
+
- `decay_warnings` — memory IDs not read in >90 days
|
|
139
|
+
- `setup_warnings` — actionable warnings (e.g. template project-context, missing init)
|
|
127
140
|
- `search_mode` — `"semantic"` | `"literal_fallback"` | `"literal"`
|
|
128
141
|
|
|
129
142
|
---
|
|
130
143
|
|
|
131
144
|
### `mem_save`
|
|
132
145
|
|
|
133
|
-
Save a
|
|
146
|
+
Save a piece of knowledge as a persistent memory. For failed approaches, use `mem_tried` instead. For code discoveries during reading, use `mem_observe` instead.
|
|
147
|
+
|
|
148
|
+
> **Autopilot mode:** memories go directly to `validated` with `team` scope by default. No approval cycle.
|
|
134
149
|
|
|
135
150
|
```json
|
|
136
151
|
{
|
|
@@ -139,22 +154,28 @@ Save a new memory. For failed approaches, use `mem_tried` instead — it enforce
|
|
|
139
154
|
"scope": "team",
|
|
140
155
|
"body": "spring.jpa.open-in-view=false is intentional — do not re-enable. Lazy loading outside transactions causes N+1 queries.",
|
|
141
156
|
"paths": ["src/main/resources/application.properties"],
|
|
142
|
-
"tags": ["spring", "jpa", "performance"]
|
|
157
|
+
"tags": ["spring", "jpa", "performance"],
|
|
158
|
+
"topic": "jpa-config"
|
|
143
159
|
}
|
|
144
160
|
```
|
|
145
161
|
|
|
146
162
|
| Parameter | Required | Description |
|
|
147
163
|
|---|---|---|
|
|
148
164
|
| `type` | ✅ | `convention` · `decision` · `gotcha` · `architecture` · `glossary` |
|
|
149
|
-
| `slug` | ✅ | Short kebab-case identifier |
|
|
150
|
-
| `scope` | — | `personal` (default) · `team` · `module` |
|
|
151
|
-
| `body` | ✅ | Markdown content |
|
|
152
|
-
| `paths` | — |
|
|
165
|
+
| `slug` | ✅ | Short kebab-case identifier used in the file name |
|
|
166
|
+
| `scope` | — | `personal` (default in manual mode) · `team` · `module` |
|
|
167
|
+
| `body` | ✅ | Markdown content of the memory |
|
|
168
|
+
| `paths` | — | Source file paths to anchor to — enables staleness detection by `haive sync`. **Warning if path doesn't exist.** |
|
|
153
169
|
| `symbols` | — | Function/class names to anchor to |
|
|
154
|
-
| `tags` | — | Tags for filtering |
|
|
170
|
+
| `tags` | — | Tags for filtering and search |
|
|
171
|
+
| `topic` | — | Stable key for upsert: if a memory with this `topic`+`scope` exists, update it in-place (`revision_count++`) |
|
|
155
172
|
| `domain` | — | Business domain (e.g. `payments`) |
|
|
156
173
|
| `author` | — | Author handle |
|
|
157
174
|
|
|
175
|
+
**Response:** `{ id, scope, file_path, action: "created"|"updated", warning?, invalid_paths? }`
|
|
176
|
+
|
|
177
|
+
**Deduplication:** identical body content within the same scope is rejected. Use `mem_update` to modify an existing memory.
|
|
178
|
+
|
|
158
179
|
---
|
|
159
180
|
|
|
160
181
|
### `mem_tried` ⭐ Record failures immediately
|
|
@@ -263,6 +284,38 @@ Compare two memories side-by-side: shows frontmatter fields that differ and line
|
|
|
263
284
|
|
|
264
285
|
---
|
|
265
286
|
|
|
287
|
+
### `mem_session_end`
|
|
288
|
+
|
|
289
|
+
Save a structured end-of-session recap. Topic-upsert: one recap per scope is kept and updated with `revision_count++`. Automatically surfaced at the top of the next `get_briefing`.
|
|
290
|
+
|
|
291
|
+
```json
|
|
292
|
+
{
|
|
293
|
+
"goal": "Add Stripe payment integration",
|
|
294
|
+
"accomplished": "PaymentService done, tests passing, deployed to staging",
|
|
295
|
+
"discoveries": "Webhook signature requires raw body, not parsed JSON",
|
|
296
|
+
"files_touched": ["src/payments/PaymentService.ts", "src/payments/webhook.ts"],
|
|
297
|
+
"next_steps": "Add retry logic for failed webhooks",
|
|
298
|
+
"scope": "team"
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
### `mem_observe`
|
|
305
|
+
|
|
306
|
+
Capture a code-level discovery in structured form (found-while, not a convention or decision).
|
|
307
|
+
|
|
308
|
+
```json
|
|
309
|
+
{
|
|
310
|
+
"file": "src/payments/PaymentService.ts",
|
|
311
|
+
"symbol": "processPayment",
|
|
312
|
+
"observation": "This method calls the external API synchronously — any timeout blocks the entire request thread.",
|
|
313
|
+
"scope": "team"
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
266
319
|
### `mem_approve` / `mem_reject` / `mem_pending` / `mem_delete`
|
|
267
320
|
|
|
268
321
|
Lifecycle operations:
|