@deeplake/hivemind 0.7.4 → 0.7.9

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.
Files changed (35) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +97 -0
  4. package/bundle/cli.js +820 -20
  5. package/codex/bundle/capture.js +40 -10
  6. package/codex/bundle/commands/auth-login.js +84 -18
  7. package/codex/bundle/pre-tool-use.js +41 -11
  8. package/codex/bundle/session-start-setup.js +40 -10
  9. package/codex/bundle/session-start.js +27 -3
  10. package/codex/bundle/shell/deeplake-shell.js +41 -11
  11. package/codex/bundle/skilify-worker.js +907 -0
  12. package/codex/bundle/stop.js +373 -51
  13. package/cursor/bundle/capture.js +354 -13
  14. package/cursor/bundle/commands/auth-login.js +84 -18
  15. package/cursor/bundle/pre-tool-use.js +40 -10
  16. package/cursor/bundle/session-end.js +303 -6
  17. package/cursor/bundle/session-start.js +68 -14
  18. package/cursor/bundle/shell/deeplake-shell.js +41 -11
  19. package/cursor/bundle/skilify-worker.js +907 -0
  20. package/hermes/bundle/capture.js +354 -13
  21. package/hermes/bundle/commands/auth-login.js +84 -18
  22. package/hermes/bundle/pre-tool-use.js +40 -10
  23. package/hermes/bundle/session-end.js +305 -7
  24. package/hermes/bundle/session-start.js +68 -14
  25. package/hermes/bundle/shell/deeplake-shell.js +41 -11
  26. package/hermes/bundle/skilify-worker.js +907 -0
  27. package/mcp/bundle/server.js +41 -11
  28. package/openclaw/dist/chunks/{config-G23NI5TV.js → config-ZLH6JFJS.js} +1 -0
  29. package/openclaw/dist/index.js +185 -16
  30. package/openclaw/dist/skilify-worker.js +907 -0
  31. package/openclaw/openclaw.plugin.json +1 -1
  32. package/openclaw/package.json +1 -1
  33. package/openclaw/skills/SKILL.md +19 -0
  34. package/package.json +6 -1
  35. package/pi/extension-source/hivemind.ts +130 -1
@@ -6,13 +6,13 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Cloud-backed persistent shared memory for AI agents powered by Deeplake",
9
- "version": "0.7.4"
9
+ "version": "0.7.9"
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.4",
15
+ "version": "0.7.9",
16
16
  "source": "./claude-code",
17
17
  "homepage": "https://github.com/activeloopai/hivemind"
18
18
  }
@@ -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",
4
+ "version": "0.7.9",
5
5
  "author": {
6
6
  "name": "Activeloop",
7
7
  "url": "https://deeplake.ai"
package/README.md CHANGED
@@ -393,6 +393,103 @@ For pi specifically, the wiki worker is bundled separately at
393
393
  The other agents ship the wiki worker inside their per-agent plugin
394
394
  bundle.
395
395
 
396
+ ## Skills (skilify)
397
+
398
+ Hivemind also crystallises **recurring patterns from your recent sessions
399
+ into reusable Claude Code skills**, automatically. Same architecture as
400
+ the wiki worker: an async background process that fires on Stop /
401
+ SessionEnd, mines recent sessions in scope, asks Haiku whether the
402
+ activity contains something worth keeping, and writes a `SKILL.md` if so.
403
+
404
+ ### When the skilify worker fires
405
+
406
+ | Trigger | When it fires |
407
+ |------------------|--------------------------------------------------------------------------------|
408
+ | **Stop counter** | Mid-session, after every `HIVEMIND_SKILIFY_EVERY_N_TURNS` (default 20) turns. |
409
+ | **SessionEnd** | Always at end-of-session, regardless of counter — catches tail-of-session knowledge. |
410
+
411
+ Per-project counter state lives at
412
+ `~/.deeplake/state/skilify/<project-key>.json`. Project key is the sha1
413
+ of `git config remote.origin.url` (with the absolute path as fallback for
414
+ non-git dirs).
415
+
416
+ ### How a skill is generated
417
+
418
+ 1. The worker pulls the **last 10 sessions in scope** from the `sessions`
419
+ Deeplake table — strictly newer than the watermark in the state file.
420
+ 2. It strips each session to **prompt + assistant text only** (tool calls
421
+ and thinking blocks are dropped — they're noise for skill mining).
422
+ 3. It builds a gate prompt: existing project skill bodies + the 10
423
+ stripped exchanges + decision rules.
424
+ 4. It runs `claude -p haiku --permission-mode bypassPermissions` with the
425
+ prompt. The model returns a JSON verdict:
426
+ - `KEEP <name> <body>` — write a new skill.
427
+ - `MERGE <existing-name> <merged-body>` — update an existing skill, bump version.
428
+ - `SKIP <reason>` — pattern is one-off / generic / already covered.
429
+ 5. On KEEP/MERGE the skill is written to `<project>/.claude/skills/<name>/SKILL.md`
430
+ (or `~/.claude/skills/...` if you've set `install` to `global`), with
431
+ provenance frontmatter (`source_sessions`, `version`, `created_by_agent`,
432
+ timestamps).
433
+ 6. A row is also inserted into the `skills` Deeplake table for org-wide
434
+ provenance (append-only — never UPDATE, sidesteps the
435
+ UPDATE-coalescing quirk).
436
+
437
+ ### `/skilify` — managing scope, team, install location
438
+
439
+ The `/skilify` slash command (Claude Code, Codex) and the `hivemind
440
+ skilify` CLI control mining behaviour.
441
+
442
+ ```bash
443
+ hivemind skilify # show current scope, team, install, per-project state
444
+ hivemind skilify scope <me|team|org> # who counts as "in scope" for mining
445
+ hivemind skilify install <project|global> # where new skills are written
446
+ hivemind skilify promote <skill-name> # move a project skill to ~/.claude/skills/
447
+ hivemind skilify team add <username> # add to the team list (used when scope=team)
448
+ hivemind skilify team remove <username> # remove from team
449
+ hivemind skilify team list # list current team members
450
+ ```
451
+
452
+ The team list flows into the worker's session-fetch SQL: `scope=me`
453
+ filters by your own username, `scope=team` filters by `author IN
454
+ (<team>)`, `scope=org` applies no author filter.
455
+
456
+ Config persists at `~/.deeplake/state/skilify/config.json` (one global
457
+ file shared across projects).
458
+
459
+ ### Configuration
460
+
461
+ | Env var | Default | Effect |
462
+ |--------------------------------------|---------|---------------------------------------------------------|
463
+ | `HIVEMIND_SKILIFY_EVERY_N_TURNS` | `20` | Stop-counter threshold for mid-session worker fires |
464
+ | `HIVEMIND_SKILLS_TABLE` | `skills`| Deeplake table name for org-wide provenance |
465
+ | `HIVEMIND_SKILIFY_WORKER=1` | unset | Recursion guard (set automatically inside the worker) |
466
+ | `HIVEMIND_CURSOR_MODEL` | `auto` | (cursor only) model passed to the cursor-agent gate call |
467
+ | `HIVEMIND_HERMES_PROVIDER` | `openrouter` | (hermes only) provider passed to the hermes gate call |
468
+ | `HIVEMIND_HERMES_MODEL` | `anthropic/claude-haiku-4-5` | (hermes only) model passed to hermes |
469
+
470
+ ### Per-agent gate CLI
471
+
472
+ The skilify worker calls each agent's own headless CLI for the gate
473
+ prompt — so a user who only has codex / cursor / hermes installed
474
+ never needs `claude` in their PATH:
475
+
476
+ | Agent | Gate command |
477
+ |-------------|----------------------------------------------------------------------------------------|
478
+ | claude_code | `claude -p <prompt> --no-session-persistence --model haiku --permission-mode bypassPermissions` |
479
+ | codex | `codex exec --dangerously-bypass-approvals-and-sandbox <prompt>` |
480
+ | cursor | `cursor-agent --print --model <HIVEMIND_CURSOR_MODEL> --force --output-format text <prompt>` |
481
+ | hermes | `hermes -z <prompt> --provider <HIVEMIND_HERMES_PROVIDER> -m <HIVEMIND_HERMES_MODEL> --yolo --ignore-user-config` |
482
+
483
+ For hermes via OpenRouter (the default), set `OPENROUTER_API_KEY` in
484
+ the environment; the worker inherits the parent process env. Other
485
+ providers (anthropic, openai, etc.) need their respective API keys.
486
+
487
+ ### Logs
488
+
489
+ Worker activity logs to `~/.claude/hooks/skilify.log`. Each line shows
490
+ which session pool was mined, what the gate decided, and whether a file
491
+ was written.
492
+
396
493
  ## Architecture
397
494
 
398
495
  ### Integration model per agent