@deeplake/hivemind 0.7.62 → 0.7.64
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +59 -35
- package/bundle/cli.js +2 -2
- package/codex/bundle/wiki-worker.js +32 -1
- package/openclaw/dist/index.js +1 -1
- package/openclaw/openclaw.plugin.json +1 -1
- package/openclaw/package.json +1 -1
- package/package.json +1 -1
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Cloud-backed persistent shared memory for AI agents powered by Deeplake",
|
|
9
|
-
"version": "0.7.
|
|
9
|
+
"version": "0.7.64"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "hivemind",
|
|
14
14
|
"description": "Persistent shared memory powered by Deeplake — captures all session activity and provides cross-session, cross-agent memory search",
|
|
15
|
-
"version": "0.7.
|
|
15
|
+
"version": "0.7.64",
|
|
16
16
|
"source": {
|
|
17
17
|
"source": "git-subdir",
|
|
18
18
|
"url": "https://github.com/activeloopai/hivemind.git",
|
|
19
19
|
"path": "claude-code",
|
|
20
|
-
"sha": "
|
|
20
|
+
"sha": "1b089b2e268cffb7387c5366eef9272d89d3b6e3"
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/activeloopai/hivemind"
|
|
23
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hivemind",
|
|
3
3
|
"description": "Cloud-backed persistent memory powered by Deeplake — read, write, and share memory across Claude Code sessions and agents",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.64",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Activeloop",
|
|
7
7
|
"url": "https://deeplake.ai"
|
package/README.md
CHANGED
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
<h4 align="center">One brain for all your agents</h4>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
|
-
<a href="https://www.npmjs.com/package/@deeplake/hivemind"><img src="https://img.shields.io/npm/v/@deeplake/hivemind?color=blue&label=npm" alt="npm"></a>
|
|
15
|
-
<a href="https://github.com/activeloopai/hivemind/stargazers"><img src="https://img.shields.io/github/stars/activeloopai/hivemind?style=
|
|
16
|
-
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"></a>
|
|
17
|
-
<a href="package.json"><img src="https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg" alt="Node"></a>
|
|
18
|
-
<a href="https://deeplake.ai"><img src="https://img.shields.io/badge/Powered%20by-Deeplake-orange.svg" alt="Deeplake"></a>
|
|
19
|
-
<a href="https://www.ycombinator.com"><img src="https://img.shields.io/badge/Y%20Combinator-backed-ff6600.svg" alt="Y Combinator backed"></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/@deeplake/hivemind"><img src="https://img.shields.io/npm/v/@deeplake/hivemind?color=blue&label=npm&style=for-the-badge" alt="npm"></a>
|
|
15
|
+
<a href="https://github.com/activeloopai/hivemind/stargazers"><img src="https://img.shields.io/github/stars/activeloopai/hivemind?style=for-the-badge&logo=github" alt="GitHub stars"></a>
|
|
16
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge" alt="License"></a>
|
|
17
|
+
<a href="package.json"><img src="https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg?style=for-the-badge" alt="Node"></a>
|
|
18
|
+
<a href="https://deeplake.ai"><img src="https://img.shields.io/badge/Powered%20by-Deeplake-orange.svg?style=for-the-badge" alt="Deeplake"></a>
|
|
19
|
+
<a href="https://www.ycombinator.com"><img src="https://img.shields.io/badge/Y%20Combinator-backed-ff6600.svg?style=for-the-badge" alt="Y Combinator backed"></a>
|
|
20
|
+
<a href="https://discord.gg/EeGjnyDBx"><img src="https://img.shields.io/badge/Discord-chat-5865F2?logo=discord&logoColor=white&style=for-the-badge" alt="Join us on Discord"></a>
|
|
21
|
+
<a href="https://join.slack.com/t/hubdb/shared_invite/zt-35zr0yil0-lnzJcQhACsBlB7~3lufrCg"><img src="https://img.shields.io/badge/Slack-chat-4A154B?logo=slack&logoColor=white&style=for-the-badge" alt="Join us on Slack"></a>
|
|
20
22
|
</p>
|
|
21
23
|
|
|
22
24
|
<p align="center">
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
|
|
30
32
|
On [LoCoMo](https://arxiv.org/abs/2402.17753), the public long-context memory benchmark, Hivemind is **25% cheaper, 1.7× fewer tokens, and 31% fewer turns** than running without shared memory. ([See the numbers below.](#benchmarks))
|
|
31
33
|
|
|
32
|
-
**Beyond memory.** Hivemind doesn't just remember
|
|
34
|
+
**Beyond memory.** Hivemind doesn't just remember. It mines your team's traces for repeated patterns and codifies them into reusable skills that propagate back into every agent on the team. The agent your junior engineer used this morning is sharper because of what your senior engineer's agent figured out last week.
|
|
33
35
|
|
|
34
36
|
- 📥 **Captures** every session's prompts, tool calls, and responses as structured traces in Deeplake
|
|
35
37
|
- 🧠 **Codifies** patterns into reusable `SKILL.md` files, available to every agent on your team
|
|
@@ -37,7 +39,7 @@ On [LoCoMo](https://arxiv.org/abs/2402.17753), the public long-context memory be
|
|
|
37
39
|
- 🔗 **Propagates** capability across sessions, agents, teammates, and machines in real time
|
|
38
40
|
- 📁 **Intercepts** file operations on `~/.deeplake/memory/` through a virtual filesystem backed by SQL
|
|
39
41
|
- 📝 **Summarizes** sessions into AI-generated wiki pages via a background worker at session end
|
|
40
|
-
- ☁️ **BYOC**: keep data in your own GCS, Azure, S3, or on-prem bucket
|
|
42
|
+
- ☁️ **BYOC**: keep data in your own GCS, Azure, S3, or on-prem bucket. [See Security & storage](#security--storage)
|
|
41
43
|
|
|
42
44
|
## Benchmarks
|
|
43
45
|
|
|
@@ -49,13 +51,7 @@ On the [LoCoMo](https://arxiv.org/abs/2402.17753) long-context memory benchmark
|
|
|
49
51
|
| Tokens / question | 1,700 | 1,008 | **1.7× fewer** |
|
|
50
52
|
| Turns / question | 8.9 | 6.2 | **31% fewer** |
|
|
51
53
|
|
|
52
|
-
The agent reaches the answer in fewer turns with less context, because the prior work is already in scope at recall time
|
|
53
|
-
|
|
54
|
-
<p align="center">
|
|
55
|
-
<a href="https://star-history.com/#activeloopai/hivemind&Date">
|
|
56
|
-
<img src="https://api.star-history.com/svg?repos=activeloopai/hivemind&type=Date" alt="Star History Chart" width="600">
|
|
57
|
-
</a>
|
|
58
|
-
</p>
|
|
54
|
+
The agent reaches the answer in fewer turns with less context, because the prior work is already in scope at recall time, not re-derived per session.
|
|
59
55
|
|
|
60
56
|
## Quick start
|
|
61
57
|
|
|
@@ -67,7 +63,7 @@ npm install -g @deeplake/hivemind && hivemind install
|
|
|
67
63
|
|
|
68
64
|
The installer detects every supported assistant on your machine (table below), wires up the hooks, and shows a one-line consent prompt before opening a browser for sign-in. Restart your assistants after install.
|
|
69
65
|
|
|
70
|
-
**Headless / CI installs
|
|
66
|
+
**Headless / CI installs:** pass an API token instead of using the browser flow:
|
|
71
67
|
|
|
72
68
|
```bash
|
|
73
69
|
HIVEMIND_TOKEN=<your-token> hivemind install
|
|
@@ -157,7 +153,7 @@ Hivemind runs **alongside** OpenClaw's built-in `memory-core` plugin. It does **
|
|
|
157
153
|
- **`openclaw model <id>` says "plugins.allow excludes model".** The `model` plugin CLI is disabled by default. Edit `~/.openclaw/openclaw.json` directly (key `agents.defaults.model`) and restart the gateway: `systemctl --user restart openclaw-gateway.service`.
|
|
158
154
|
- **Model switch rejected as "not allowed".** Use the exact dated provider-prefixed ID (`anthropic/claude-haiku-4-5-20251001`, `anthropic/claude-sonnet-4-6`). Legacy IDs like `claude-3-5-haiku-latest` and unprefixed bare IDs are not on OpenClaw's allowlist.
|
|
159
155
|
- **Self-update via Telegram fails with "elevated is not available".** `tools.elevated.allowFrom` must include `telegram` before elevated commands work from that channel. Safer alternative: run the upgrade in a local shell with `openclaw plugins update hivemind`.
|
|
160
|
-
- **`npm error EACCES` during self-update.** OpenClaw was installed under a root-owned npm prefix (e.g. `/usr/lib/node_modules/openclaw`). Reinstall under a user-writable prefix, or run the update with appropriate privileges locally
|
|
156
|
+
- **`npm error EACCES` during self-update.** OpenClaw was installed under a root-owned npm prefix (e.g. `/usr/lib/node_modules/openclaw`). Reinstall under a user-writable prefix, or run the update with appropriate privileges locally, not via a channel.
|
|
161
157
|
</details>
|
|
162
158
|
|
|
163
159
|
<details>
|
|
@@ -182,7 +178,7 @@ Restart Codex to activate.
|
|
|
182
178
|
<details>
|
|
183
179
|
<summary><b>Cursor (1.7+)</b></summary>
|
|
184
180
|
|
|
185
|
-
The unified installer wires six lifecycle events in `~/.cursor/hooks.json
|
|
181
|
+
The unified installer wires six lifecycle events in `~/.cursor/hooks.json`: sessionStart, beforeSubmitPrompt, postToolUse, afterAgentResponse, stop, sessionEnd. Hooks fork a Node bundle at `~/.cursor/hivemind/bundle/` per event. Restart Cursor after install to load.
|
|
186
182
|
|
|
187
183
|
```bash
|
|
188
184
|
hivemind cursor install
|
|
@@ -210,7 +206,7 @@ Upserts an idempotent BEGIN/END marker block into `~/.pi/agent/AGENTS.md` (auto-
|
|
|
210
206
|
hivemind pi install
|
|
211
207
|
```
|
|
212
208
|
|
|
213
|
-
Note: no per-agent SKILL.md is dropped under `~/.pi/agent/skills
|
|
209
|
+
Note: no per-agent SKILL.md is dropped under `~/.pi/agent/skills/`; pi reads skills from both that directory AND the shared `~/.agents/skills/` location. If the codex installer has run on the same machine, pi picks up the hivemind skill from the shared `~/.agents/skills/hivemind-memory` symlink automatically. The AGENTS.md block plus the registered tools cover the action surface in either case.
|
|
214
210
|
</details>
|
|
215
211
|
|
|
216
212
|
|
|
@@ -265,24 +261,24 @@ This plugin captures session activity and stores it in your Deeplake workspace:
|
|
|
265
261
|
| Subagent activity | Subagent tool calls and responses |
|
|
266
262
|
| Codified skills | Patterns extracted from traces |
|
|
267
263
|
|
|
268
|
-
**All users in your Deeplake workspace can read this data.** That's the design
|
|
264
|
+
**All users in your Deeplake workspace can read this data.** That's the design. Shared capability requires shared substrate. A DATA NOTICE is displayed at the start of every session. Workspace-level isolation prevents data leakage between orgs.
|
|
269
265
|
|
|
270
266
|
## Configuration
|
|
271
267
|
|
|
272
268
|
| Variable | Default | Description |
|
|
273
269
|
|---------------------------|---------------------------|--------------------------------------------|
|
|
274
|
-
| `HIVEMIND_TOKEN` |
|
|
275
|
-
| `HIVEMIND_ORG_ID` |
|
|
270
|
+
| `HIVEMIND_TOKEN` | _(none)_ | API token (auto-set by login) |
|
|
271
|
+
| `HIVEMIND_ORG_ID` | _(none)_ | Organization ID (auto-set by login) |
|
|
276
272
|
| `HIVEMIND_WORKSPACE_ID` | `default` | Workspace name |
|
|
277
273
|
| `HIVEMIND_API_URL` | `https://api.deeplake.ai` | API endpoint |
|
|
278
274
|
| `HIVEMIND_TABLE` | `memory` | SQL table for summaries and virtual FS |
|
|
279
275
|
| `HIVEMIND_SESSIONS_TABLE` | `sessions` | SQL table for per-event session capture |
|
|
280
276
|
| `HIVEMIND_MEMORY_PATH` | `~/.deeplake/memory` | Path that triggers interception |
|
|
281
277
|
| `HIVEMIND_CAPTURE` | `true` | Set to `false` to disable capture |
|
|
282
|
-
| `HIVEMIND_CAPTURE_ONLY_CLI` |
|
|
278
|
+
| `HIVEMIND_CAPTURE_ONLY_CLI` | _(none)_ | Set to `true` to capture only interactive CLI sessions. Sessions spawned by the Claude Agent SDK (Python/TypeScript) are skipped; their `CLAUDE_CODE_ENTRYPOINT` is `sdk-py` / `sdk-ts`, so they fail the substring check for `cli`. |
|
|
283
279
|
| `HIVEMIND_SKILLIFY_EVERY_N_TURNS` | `20` | Assistant turns between auto skill-mining attempts. Lower = more frequent mining (cheaper sessions, noisier output); higher = fewer attempts on longer histories. |
|
|
284
280
|
| `HIVEMIND_EMBEDDINGS` | `true` | Set to `false` to force lexical-only mode |
|
|
285
|
-
| `HIVEMIND_DEBUG` |
|
|
281
|
+
| `HIVEMIND_DEBUG` | _(none)_ | Set to `1` for verbose hook debug logs |
|
|
286
282
|
|
|
287
283
|
## Semantic search (optional)
|
|
288
284
|
|
|
@@ -292,13 +288,13 @@ Full guide: **[docs/EMBEDDINGS.md](docs/EMBEDDINGS.md)**.
|
|
|
292
288
|
|
|
293
289
|
## Summaries
|
|
294
290
|
|
|
295
|
-
After each session, a background worker generates an AI-written wiki summary and stores it in the `memory` table alongside its 768-dim embedding. Long sessions checkpoint mid-session every 50 messages or 2 hours (configurable). The wiki worker shells out to the host agent's own CLI (`claude -p`, `codex exec`, `pi --print`, …)
|
|
291
|
+
After each session, a background worker generates an AI-written wiki summary and stores it in the `memory` table alongside its 768-dim embedding. Long sessions checkpoint mid-session every 50 messages or 2 hours (configurable). The wiki worker shells out to the host agent's own CLI (`claude -p`, `codex exec`, `pi --print`, …) so no separate API key is needed. Browse summaries at `~/.deeplake/memory/summaries/`.
|
|
296
292
|
|
|
297
293
|
Triggers, generation flow, and env-var reference: **[docs/SUMMARIES.md](docs/SUMMARIES.md)**.
|
|
298
294
|
|
|
299
295
|
## Skills (skillify)
|
|
300
296
|
|
|
301
|
-
Hivemind **codifies recurring patterns from your team's recent sessions into reusable skills** that propagate to every agent on your team
|
|
297
|
+
Hivemind **codifies recurring patterns from your team's recent sessions into reusable skills** that propagate to every agent on your team, automatically. An async background worker fires on Stop / SessionEnd, mines recent sessions in scope, asks Haiku whether the activity contains something worth keeping, and writes a `SKILL.md` to `<project>/.claude/skills/<name>/`.
|
|
302
298
|
|
|
303
299
|
```bash
|
|
304
300
|
hivemind skillify # show current scope, team, install, per-project state
|
|
@@ -309,6 +305,16 @@ hivemind skillify unpull # remove pulled skills
|
|
|
309
305
|
|
|
310
306
|
Triggers, generation flow, full `pull` / `unpull` semantics, gate-CLI table per agent, env vars, logs: **[docs/SKILLIFY.md](docs/SKILLIFY.md)**.
|
|
311
307
|
|
|
308
|
+
## Codebase graph
|
|
309
|
+
|
|
310
|
+
Hivemind builds a live graph of your codebase from the same traces it captures: files, symbols, imports, and the edges your agents actually traverse during real sessions. Search and recall walk this graph, not just plain text, so "where do we handle auth?" lands on the actual files the team's agents have touched, not just every file that mentions "auth".
|
|
311
|
+
|
|
312
|
+
<p align="center">
|
|
313
|
+
<img src="docs/screenshots/codebase-graph.webp" alt="Hivemind codebase graph visualizing the hivemind repo itself" width="800">
|
|
314
|
+
</p>
|
|
315
|
+
|
|
316
|
+
Above: the Hivemind codebase rendered through its own graph feature.
|
|
317
|
+
|
|
312
318
|
## Rules (cross-agent team principles)
|
|
313
319
|
|
|
314
320
|
Hivemind **shares team rules across every agent in the org**, injected at SessionStart so every claude-code / cursor / hermes session starts knowing them. For personal or team work items with progress tracking, use [Goals + KPIs](#goals--kpis) (VFS-backed) instead.
|
|
@@ -323,14 +329,14 @@ hivemind rules done <rule-id> # mark closed
|
|
|
323
329
|
hivemind context # print the injection block on demand
|
|
324
330
|
```
|
|
325
331
|
|
|
326
|
-
**What's injected at SessionStart** (claude-code, cursor, hermes
|
|
332
|
+
**What's injected at SessionStart** (claude-code, cursor, hermes. Codex is
|
|
327
333
|
deliberately excluded to keep its user-visible TUI clean; pi/openclaw
|
|
328
334
|
fall back to `hivemind context`):
|
|
329
335
|
|
|
330
336
|
```text
|
|
331
337
|
=== HIVEMIND RULES (N active) ===
|
|
332
338
|
- <rule_id>: <text>
|
|
333
|
-
(X more
|
|
339
|
+
(X more, run 'hivemind rules list' to see all)
|
|
334
340
|
|
|
335
341
|
=== HIVEMIND HOW-TO ===
|
|
336
342
|
- Rules above are team principles. Treat any action that would violate one as a critical error and surface it to the user before proceeding.
|
|
@@ -338,8 +344,8 @@ fall back to `hivemind context`):
|
|
|
338
344
|
```
|
|
339
345
|
|
|
340
346
|
**Env vars:**
|
|
341
|
-
- `HIVEMIND_RULES_TABLE
|
|
342
|
-
- `HIVEMIND_CAPTURE=false
|
|
347
|
+
- `HIVEMIND_RULES_TABLE`: table name (default `hivemind_rules`).
|
|
348
|
+
- `HIVEMIND_CAPTURE=false`: full read-only mode. Skips placeholder + ensure DDL; renderer still injects.
|
|
343
349
|
|
|
344
350
|
## Goals + KPIs
|
|
345
351
|
|
|
@@ -353,7 +359,7 @@ hivemind goal done <goal_id>
|
|
|
353
359
|
hivemind goal progress <goal_id> opened|in_progress|closed
|
|
354
360
|
```
|
|
355
361
|
|
|
356
|
-
For VFS-capable runtimes (claude-code/codex) the `hivemind-goals` skill creates and edits goals/KPIs directly via Bash heredoc against the VFS path
|
|
362
|
+
For VFS-capable runtimes (claude-code/codex) the `hivemind-goals` skill creates and edits goals/KPIs directly via Bash heredoc against the VFS path. `mv` between `opened/`, `in_progress/`, and `closed/` is the canonical status transition. KPIs are manual files; the body format is documented in the skill (`target:`, `current:`, `unit:`).
|
|
357
363
|
|
|
358
364
|
## Architecture
|
|
359
365
|
|
|
@@ -370,7 +376,7 @@ Per-agent integration mechanisms (marketplace plugin, hooks, skills, native exte
|
|
|
370
376
|
|
|
371
377
|
### Tenant isolation & encryption
|
|
372
378
|
|
|
373
|
-
- TLS between every agent and Deep Lake. AES-256 on the bytes once they land. Your cloud credentials live in Deep Lake's vault
|
|
379
|
+
- TLS between every agent and Deep Lake. AES-256 on the bytes once they land. Your cloud credentials live in Deep Lake's vault, and Hivemind never sees the raw keys.
|
|
374
380
|
- Org and workspace boundaries enforced at the storage layer, not just the API. Sessions never share a row, a partition, or an index with another workspace.
|
|
375
381
|
- Disable capture per session with `HIVEMIND_CAPTURE=false`. Delete a workspace and the underlying objects go with it.
|
|
376
382
|
|
|
@@ -383,7 +389,7 @@ Per-agent integration mechanisms (marketplace plugin, hooks, skills, native exte
|
|
|
383
389
|
|
|
384
390
|
### Bring your own cloud (BYOC)
|
|
385
391
|
|
|
386
|
-
Hivemind Cloud is the default. When that isn't enough, point Hivemind at storage in your own cloud
|
|
392
|
+
Hivemind Cloud is the default. When that isn't enough, point Hivemind at storage in your own cloud. We handle the orchestration, data never leaves your perimeter.
|
|
387
393
|
|
|
388
394
|
| Provider | Status | Setup |
|
|
389
395
|
|----------------------------|------------|--------------------------------------------------------|
|
|
@@ -394,10 +400,20 @@ Hivemind Cloud is the default. When that isn't enough, point Hivemind at storage
|
|
|
394
400
|
|
|
395
401
|
## Who builds Hivemind
|
|
396
402
|
|
|
397
|
-
Hivemind is built and maintained by [Activeloop](https://activeloop.ai)
|
|
403
|
+
Hivemind is built and maintained by [Activeloop](https://activeloop.ai), the open-source team behind [Deeplake](https://github.com/activeloopai/deeplake), backed by Y Combinator.
|
|
398
404
|
|
|
399
405
|
We run Hivemind ourselves, all day, across Claude Code, OpenClaw, Codex, and Cursor. Every benchmark number above came from our own internal eval against the LoCoMo public benchmark. If you're running coding agents at a team or org and want to talk through your setup, drop us a line: [hello@activeloop.ai](mailto:hello@activeloop.ai).
|
|
400
406
|
|
|
407
|
+
## Got questions?
|
|
408
|
+
|
|
409
|
+
Setup, BYOC, agent integrations, or workflow. Come ask in the community. We hang out on both:
|
|
410
|
+
|
|
411
|
+
<p align="center">
|
|
412
|
+
<a href="https://discord.gg/EeGjnyDBx"><img src="https://img.shields.io/badge/Join_us_on-Discord-5865F2?logo=discord&logoColor=white&style=for-the-badge" alt="Join us on Discord"></a>
|
|
413
|
+
|
|
414
|
+
<a href="https://join.slack.com/t/hubdb/shared_invite/zt-35zr0yil0-lnzJcQhACsBlB7~3lufrCg"><img src="https://img.shields.io/badge/Join_us_on-Slack-4A154B?logo=slack&logoColor=white&style=for-the-badge" alt="Join us on Slack"></a>
|
|
415
|
+
</p>
|
|
416
|
+
|
|
401
417
|
## Development
|
|
402
418
|
|
|
403
419
|
```bash
|
|
@@ -420,7 +436,15 @@ Interactive shell against Deeplake:
|
|
|
420
436
|
npm run shell
|
|
421
437
|
```
|
|
422
438
|
|
|
439
|
+
## Star history
|
|
440
|
+
|
|
441
|
+
<p align="center">
|
|
442
|
+
<a href="https://star-history.com/#activeloopai/hivemind&Date">
|
|
443
|
+
<img src="https://api.star-history.com/svg?repos=activeloopai/hivemind&type=Date" alt="Star History Chart" width="600">
|
|
444
|
+
</a>
|
|
445
|
+
</p>
|
|
446
|
+
|
|
423
447
|
## License
|
|
424
448
|
|
|
425
|
-
Apache License 2.0
|
|
449
|
+
Apache License 2.0, © Activeloop, Inc. See [LICENSE](LICENSE) for details.
|
|
426
450
|
|
package/bundle/cli.js
CHANGED
|
@@ -355,9 +355,9 @@ function hookCmd(bundleFile, timeout, matcher) {
|
|
|
355
355
|
function buildHooksJson() {
|
|
356
356
|
return {
|
|
357
357
|
hooks: {
|
|
358
|
-
SessionStart: [hookCmd("session-start.js",
|
|
358
|
+
SessionStart: [hookCmd("session-start.js", 10, "startup|resume")],
|
|
359
359
|
UserPromptSubmit: [hookCmd("capture.js", 10)],
|
|
360
|
-
PreToolUse: [hookCmd("pre-tool-use.js",
|
|
360
|
+
PreToolUse: [hookCmd("pre-tool-use.js", 10, "Bash")],
|
|
361
361
|
PostToolUse: [hookCmd("capture.js", 15)],
|
|
362
362
|
Stop: [hookCmd("stop.js", 30)]
|
|
363
363
|
}
|
|
@@ -717,6 +717,28 @@ function cleanup() {
|
|
|
717
717
|
dlog2(`cleanup failed to remove ${tmpDir}: ${cleanupErr.message}`);
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
+
function tailText(text, maxChars = 240) {
|
|
721
|
+
const compact = text.replace(/\s+/g, " ").trim();
|
|
722
|
+
return compact.length <= maxChars ? compact : `\u2026${compact.slice(-maxChars)}`;
|
|
723
|
+
}
|
|
724
|
+
function formatExecFailure(error) {
|
|
725
|
+
const parts = [];
|
|
726
|
+
if (error?.code)
|
|
727
|
+
parts.push(`code=${error.code}`);
|
|
728
|
+
if (error?.status !== void 0 && error?.status !== null)
|
|
729
|
+
parts.push(`status=${error.status}`);
|
|
730
|
+
if (error?.signal)
|
|
731
|
+
parts.push(`signal=${error.signal}`);
|
|
732
|
+
if (error?.message)
|
|
733
|
+
parts.push(`message=${tailText(String(error.message))}`);
|
|
734
|
+
const stderr = Buffer.isBuffer(error?.stderr) ? error.stderr.toString("utf-8") : typeof error?.stderr === "string" ? error.stderr : "";
|
|
735
|
+
if (stderr.trim())
|
|
736
|
+
parts.push(`stderr=${tailText(stderr)}`);
|
|
737
|
+
const stdout = Buffer.isBuffer(error?.stdout) ? error.stdout.toString("utf-8") : typeof error?.stdout === "string" ? error.stdout : "";
|
|
738
|
+
if (stdout.trim())
|
|
739
|
+
parts.push(`stdout=${tailText(stdout)}`);
|
|
740
|
+
return parts.length > 0 ? parts.join(", ") : "unknown failure";
|
|
741
|
+
}
|
|
720
742
|
async function main() {
|
|
721
743
|
try {
|
|
722
744
|
wlog("fetching session events");
|
|
@@ -746,6 +768,8 @@ async function main() {
|
|
|
746
768
|
}
|
|
747
769
|
const prompt = cfg.promptTemplate.replace(/__JSONL__/g, tmpJsonl).replace(/__SUMMARY__/g, tmpSummary).replace(/__SESSION_ID__/g, cfg.sessionId).replace(/__PROJECT__/g, cfg.project).replace(/__PREV_OFFSET__/g, String(prevOffset)).replace(/__JSONL_LINES__/g, String(jsonlLines)).replace(/__JSONL_SERVER_PATH__/g, jsonlServerPath);
|
|
748
770
|
wlog("running codex exec");
|
|
771
|
+
let execSucceeded = false;
|
|
772
|
+
const summaryBeforeExec = existsSync4(tmpSummary) ? readFileSync4(tmpSummary, "utf-8") : null;
|
|
749
773
|
try {
|
|
750
774
|
execFileSync(cfg.codexBin, [
|
|
751
775
|
"exec",
|
|
@@ -756,12 +780,19 @@ async function main() {
|
|
|
756
780
|
timeout: 12e4,
|
|
757
781
|
env: { ...process.env, HIVEMIND_WIKI_WORKER: "1", HIVEMIND_CAPTURE: "false" }
|
|
758
782
|
});
|
|
783
|
+
execSucceeded = true;
|
|
759
784
|
wlog("codex exec exited (code 0)");
|
|
760
785
|
} catch (e) {
|
|
761
|
-
|
|
786
|
+
const detail = formatExecFailure(e);
|
|
787
|
+
wlog(`codex exec failed: ${detail}`);
|
|
762
788
|
}
|
|
763
789
|
if (existsSync4(tmpSummary)) {
|
|
764
790
|
const text = readFileSync4(tmpSummary, "utf-8");
|
|
791
|
+
const summaryChanged = summaryBeforeExec === null ? text.trim().length > 0 : text !== summaryBeforeExec;
|
|
792
|
+
if (!execSucceeded && !summaryChanged) {
|
|
793
|
+
wlog("codex exec failed without producing a new summary; skipping upload");
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
765
796
|
if (text.trim()) {
|
|
766
797
|
const fname = `${cfg.sessionId}.md`;
|
|
767
798
|
const vpath = `/summaries/${cfg.userName}/${fname}`;
|
package/openclaw/dist/index.js
CHANGED
|
@@ -1823,7 +1823,7 @@ function extractLatestVersion(body) {
|
|
|
1823
1823
|
return typeof v === "string" && v.length > 0 ? v : null;
|
|
1824
1824
|
}
|
|
1825
1825
|
function getInstalledVersion() {
|
|
1826
|
-
return "0.7.
|
|
1826
|
+
return "0.7.64".length > 0 ? "0.7.64" : null;
|
|
1827
1827
|
}
|
|
1828
1828
|
function isNewer(latest, current) {
|
|
1829
1829
|
const parse = (v) => v.replace(/-.*$/, "").split(".").map(Number);
|
package/openclaw/package.json
CHANGED