@deeplake/hivemind 0.7.17 → 0.7.19

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.
@@ -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.17"
9
+ "version": "0.7.19"
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.17",
15
+ "version": "0.7.19",
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.17",
4
+ "version": "0.7.19",
5
5
  "author": {
6
6
  "name": "Activeloop",
7
7
  "url": "https://deeplake.ai"
package/bundle/cli.js CHANGED
@@ -3352,7 +3352,7 @@ var EXTENSION_PATH = join8(EXTENSIONS_DIR, "hivemind.ts");
3352
3352
  var VERSION_DIR = join8(PI_AGENT_DIR, ".hivemind");
3353
3353
  var WIKI_WORKER_DIR = join8(PI_AGENT_DIR, "hivemind");
3354
3354
  var WIKI_WORKER_PATH = join8(WIKI_WORKER_DIR, "wiki-worker.js");
3355
- var SKILIFY_WORKER_PATH = join8(WIKI_WORKER_DIR, "skilify-worker.js");
3355
+ var SKILLIFY_WORKER_PATH = join8(WIKI_WORKER_DIR, "skillify-worker.js");
3356
3356
  var AUTOPULL_WORKER_PATH = join8(WIKI_WORKER_DIR, "autopull-worker.js");
3357
3357
  var HIVEMIND_BLOCK_START = "<!-- BEGIN hivemind-memory -->";
3358
3358
  var HIVEMIND_BLOCK_END = "<!-- END hivemind-memory -->";
@@ -3438,10 +3438,10 @@ function installPi() {
3438
3438
  ensureDir(WIKI_WORKER_DIR);
3439
3439
  copyFileSync2(srcWorker, WIKI_WORKER_PATH);
3440
3440
  }
3441
- const srcSkilifyWorker = join8(pkgRoot(), "pi", "bundle", "skilify-worker.js");
3442
- if (existsSync7(srcSkilifyWorker)) {
3441
+ const srcSkillifyWorker = join8(pkgRoot(), "pi", "bundle", "skillify-worker.js");
3442
+ if (existsSync7(srcSkillifyWorker)) {
3443
3443
  ensureDir(WIKI_WORKER_DIR);
3444
- copyFileSync2(srcSkilifyWorker, SKILIFY_WORKER_PATH);
3444
+ copyFileSync2(srcSkillifyWorker, SKILLIFY_WORKER_PATH);
3445
3445
  }
3446
3446
  const srcAutopullWorker = join8(pkgRoot(), "pi", "bundle", "autopull-worker.js");
3447
3447
  if (existsSync7(srcAutopullWorker)) {
@@ -3455,8 +3455,8 @@ function installPi() {
3455
3455
  if (existsSync7(WIKI_WORKER_PATH)) {
3456
3456
  log(` pi wiki-worker installed -> ${WIKI_WORKER_PATH}`);
3457
3457
  }
3458
- if (existsSync7(SKILIFY_WORKER_PATH)) {
3459
- log(` pi skilify-worker installed -> ${SKILIFY_WORKER_PATH}`);
3458
+ if (existsSync7(SKILLIFY_WORKER_PATH)) {
3459
+ log(` pi skillify-worker installed -> ${SKILLIFY_WORKER_PATH}`);
3460
3460
  }
3461
3461
  if (existsSync7(AUTOPULL_WORKER_PATH)) {
3462
3462
  log(` pi autopull-worker installed -> ${AUTOPULL_WORKER_PATH}`);
@@ -4718,20 +4718,53 @@ if (process.argv[1] && process.argv[1].endsWith("auth-login.js")) {
4718
4718
  });
4719
4719
  }
4720
4720
 
4721
- // dist/src/commands/skilify.js
4722
- import { readdirSync as readdirSync4, existsSync as existsSync18, readFileSync as readFileSync13, mkdirSync as mkdirSync8, renameSync as renameSync3 } from "node:fs";
4723
- import { homedir as homedir11 } from "node:os";
4724
- import { dirname as dirname4, join as join21 } from "node:path";
4721
+ // dist/src/commands/skillify.js
4722
+ import { readdirSync as readdirSync4, existsSync as existsSync19, readFileSync as readFileSync13, mkdirSync as mkdirSync8, renameSync as renameSync4 } from "node:fs";
4723
+ import { homedir as homedir12 } from "node:os";
4724
+ import { dirname as dirname4, join as join22 } from "node:path";
4725
+
4726
+ // dist/src/skillify/scope-config.js
4727
+ import { existsSync as existsSync13, mkdirSync as mkdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync6 } from "node:fs";
4728
+ import { homedir as homedir6 } from "node:os";
4729
+ import { join as join16 } from "node:path";
4725
4730
 
4726
- // dist/src/skilify/scope-config.js
4727
- import { existsSync as existsSync12, mkdirSync as mkdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync6 } from "node:fs";
4731
+ // dist/src/skillify/legacy-migration.js
4732
+ import { existsSync as existsSync12, renameSync } from "node:fs";
4728
4733
  import { homedir as homedir5 } from "node:os";
4729
4734
  import { join as join15 } from "node:path";
4730
- var STATE_DIR = join15(homedir5(), ".deeplake", "state", "skilify");
4731
- var CONFIG_PATH2 = join15(STATE_DIR, "config.json");
4735
+ var dlog = (msg) => log2("skillify-migrate", msg);
4736
+ var attempted = false;
4737
+ function migrateLegacyStateDir() {
4738
+ if (attempted)
4739
+ return;
4740
+ attempted = true;
4741
+ const root = join15(homedir5(), ".deeplake", "state");
4742
+ const legacy = join15(root, "skilify");
4743
+ const current = join15(root, "skillify");
4744
+ if (!existsSync12(legacy))
4745
+ return;
4746
+ if (existsSync12(current))
4747
+ return;
4748
+ try {
4749
+ renameSync(legacy, current);
4750
+ dlog(`migrated ${legacy} -> ${current}`);
4751
+ } catch (err) {
4752
+ const code = err.code;
4753
+ if (code === "EXDEV" || code === "EPERM") {
4754
+ dlog(`migration failed (${code}); leaving legacy dir in place`);
4755
+ return;
4756
+ }
4757
+ throw err;
4758
+ }
4759
+ }
4760
+
4761
+ // dist/src/skillify/scope-config.js
4762
+ var STATE_DIR = join16(homedir6(), ".deeplake", "state", "skillify");
4763
+ var CONFIG_PATH2 = join16(STATE_DIR, "config.json");
4732
4764
  var DEFAULT = { scope: "me", team: [], install: "project" };
4733
4765
  function loadScopeConfig() {
4734
- if (!existsSync12(CONFIG_PATH2))
4766
+ migrateLegacyStateDir();
4767
+ if (!existsSync13(CONFIG_PATH2))
4735
4768
  return DEFAULT;
4736
4769
  try {
4737
4770
  const raw = JSON.parse(readFileSync9(CONFIG_PATH2, "utf-8"));
@@ -4744,19 +4777,20 @@ function loadScopeConfig() {
4744
4777
  }
4745
4778
  }
4746
4779
  function saveScopeConfig(cfg) {
4780
+ migrateLegacyStateDir();
4747
4781
  mkdirSync4(STATE_DIR, { recursive: true });
4748
4782
  writeFileSync6(CONFIG_PATH2, JSON.stringify(cfg, null, 2));
4749
4783
  }
4750
4784
 
4751
- // dist/src/skilify/pull.js
4752
- import { existsSync as existsSync16, readFileSync as readFileSync12, writeFileSync as writeFileSync9, mkdirSync as mkdirSync7, renameSync as renameSync2, lstatSync as lstatSync4, readlinkSync as readlinkSync2, symlinkSync as symlinkSync2, unlinkSync as unlinkSync8 } from "node:fs";
4753
- import { homedir as homedir9 } from "node:os";
4754
- import { dirname as dirname3, join as join19 } from "node:path";
4785
+ // dist/src/skillify/pull.js
4786
+ import { existsSync as existsSync17, readFileSync as readFileSync12, writeFileSync as writeFileSync9, mkdirSync as mkdirSync7, renameSync as renameSync3, lstatSync as lstatSync4, readlinkSync as readlinkSync2, symlinkSync as symlinkSync2, unlinkSync as unlinkSync8 } from "node:fs";
4787
+ import { homedir as homedir10 } from "node:os";
4788
+ import { dirname as dirname3, join as join20 } from "node:path";
4755
4789
 
4756
- // dist/src/skilify/skill-writer.js
4757
- import { existsSync as existsSync13, mkdirSync as mkdirSync5, readFileSync as readFileSync10, readdirSync as readdirSync2, statSync as statSync2, writeFileSync as writeFileSync7 } from "node:fs";
4758
- import { homedir as homedir6 } from "node:os";
4759
- import { join as join16 } from "node:path";
4790
+ // dist/src/skillify/skill-writer.js
4791
+ import { existsSync as existsSync14, mkdirSync as mkdirSync5, readFileSync as readFileSync10, readdirSync as readdirSync2, statSync as statSync2, writeFileSync as writeFileSync7 } from "node:fs";
4792
+ import { homedir as homedir7 } from "node:os";
4793
+ import { join as join17 } from "node:path";
4760
4794
  function assertValidSkillName(name) {
4761
4795
  if (typeof name !== "string" || name.length === 0) {
4762
4796
  throw new Error(`invalid skill name: empty or non-string`);
@@ -4814,18 +4848,19 @@ function parseFrontmatter(text) {
4814
4848
  return { fm, body };
4815
4849
  }
4816
4850
 
4817
- // dist/src/skilify/manifest.js
4818
- import { existsSync as existsSync14, lstatSync as lstatSync3, mkdirSync as mkdirSync6, readFileSync as readFileSync11, renameSync, unlinkSync as unlinkSync7, writeFileSync as writeFileSync8 } from "node:fs";
4819
- import { homedir as homedir7 } from "node:os";
4820
- import { dirname as dirname2, join as join17 } from "node:path";
4851
+ // dist/src/skillify/manifest.js
4852
+ import { existsSync as existsSync15, lstatSync as lstatSync3, mkdirSync as mkdirSync6, readFileSync as readFileSync11, renameSync as renameSync2, unlinkSync as unlinkSync7, writeFileSync as writeFileSync8 } from "node:fs";
4853
+ import { homedir as homedir8 } from "node:os";
4854
+ import { dirname as dirname2, join as join18 } from "node:path";
4821
4855
  function emptyManifest() {
4822
4856
  return { version: 1, entries: [] };
4823
4857
  }
4824
4858
  function manifestPath() {
4825
- return join17(homedir7(), ".deeplake", "state", "skilify", "pulled.json");
4859
+ return join18(homedir8(), ".deeplake", "state", "skillify", "pulled.json");
4826
4860
  }
4827
4861
  function loadManifest(path = manifestPath()) {
4828
- if (!existsSync14(path))
4862
+ migrateLegacyStateDir();
4863
+ if (!existsSync15(path))
4829
4864
  return emptyManifest();
4830
4865
  let raw;
4831
4866
  try {
@@ -4875,10 +4910,11 @@ function loadManifest(path = manifestPath()) {
4875
4910
  }
4876
4911
  }
4877
4912
  function saveManifest(m, path = manifestPath()) {
4913
+ migrateLegacyStateDir();
4878
4914
  mkdirSync6(dirname2(path), { recursive: true });
4879
4915
  const tmp = `${path}.tmp`;
4880
4916
  writeFileSync8(tmp, JSON.stringify(m, null, 2) + "\n", { mode: 384 });
4881
- renameSync(tmp, path);
4917
+ renameSync2(tmp, path);
4882
4918
  }
4883
4919
  function recordPull(entry, path = manifestPath()) {
4884
4920
  const m = loadManifest(path);
@@ -4920,7 +4956,7 @@ function pruneOrphanedEntries(path = manifestPath()) {
4920
4956
  const live = [];
4921
4957
  let pruned = 0;
4922
4958
  for (const e of m.entries) {
4923
- if (existsSync14(join17(e.installRoot, e.dirName))) {
4959
+ if (existsSync15(join18(e.installRoot, e.dirName))) {
4924
4960
  live.push(e);
4925
4961
  continue;
4926
4962
  }
@@ -4932,31 +4968,31 @@ function pruneOrphanedEntries(path = manifestPath()) {
4932
4968
  return pruned;
4933
4969
  }
4934
4970
 
4935
- // dist/src/skilify/agent-roots.js
4936
- import { existsSync as existsSync15 } from "node:fs";
4937
- import { homedir as homedir8 } from "node:os";
4938
- import { join as join18 } from "node:path";
4971
+ // dist/src/skillify/agent-roots.js
4972
+ import { existsSync as existsSync16 } from "node:fs";
4973
+ import { homedir as homedir9 } from "node:os";
4974
+ import { join as join19 } from "node:path";
4939
4975
  function resolveDetected(home) {
4940
4976
  const out = [];
4941
- const codexInstalled = existsSync15(join18(home, ".codex"));
4942
- const piInstalled = existsSync15(join18(home, ".pi", "agent"));
4943
- const hermesInstalled = existsSync15(join18(home, ".hermes"));
4977
+ const codexInstalled = existsSync16(join19(home, ".codex"));
4978
+ const piInstalled = existsSync16(join19(home, ".pi", "agent"));
4979
+ const hermesInstalled = existsSync16(join19(home, ".hermes"));
4944
4980
  if (codexInstalled || piInstalled) {
4945
- out.push(join18(home, ".agents", "skills"));
4981
+ out.push(join19(home, ".agents", "skills"));
4946
4982
  }
4947
4983
  if (hermesInstalled) {
4948
- out.push(join18(home, ".hermes", "skills"));
4984
+ out.push(join19(home, ".hermes", "skills"));
4949
4985
  }
4950
4986
  if (piInstalled) {
4951
- out.push(join18(home, ".pi", "agent", "skills"));
4987
+ out.push(join19(home, ".pi", "agent", "skills"));
4952
4988
  }
4953
4989
  return out;
4954
4990
  }
4955
- function detectAgentSkillsRoots(canonicalRoot, home = homedir8()) {
4991
+ function detectAgentSkillsRoots(canonicalRoot, home = homedir9()) {
4956
4992
  return resolveDetected(home).filter((p) => p !== canonicalRoot);
4957
4993
  }
4958
4994
 
4959
- // dist/src/skilify/pull.js
4995
+ // dist/src/skillify/pull.js
4960
4996
  function assertValidAuthor(author) {
4961
4997
  if (!author)
4962
4998
  throw new Error("author is empty");
@@ -4988,15 +5024,15 @@ function isMissingTableError(message) {
4988
5024
  }
4989
5025
  function resolvePullDestination(install, cwd) {
4990
5026
  if (install === "global")
4991
- return join19(homedir9(), ".claude", "skills");
5027
+ return join20(homedir10(), ".claude", "skills");
4992
5028
  if (!cwd)
4993
5029
  throw new Error("install=project requires a cwd");
4994
- return join19(cwd, ".claude", "skills");
5030
+ return join20(cwd, ".claude", "skills");
4995
5031
  }
4996
5032
  function fanOutSymlinks(canonicalDir, dirName, agentRoots) {
4997
5033
  const out = [];
4998
5034
  for (const root of agentRoots) {
4999
- const link = join19(root, dirName);
5035
+ const link = join20(root, dirName);
5000
5036
  let existing;
5001
5037
  try {
5002
5038
  existing = lstatSync4(link);
@@ -5039,8 +5075,8 @@ function backfillSymlinks(installRoot) {
5039
5075
  return;
5040
5076
  const detected = detectAgentSkillsRoots(installRoot);
5041
5077
  for (const entry of entries) {
5042
- const canonical = join19(entry.installRoot, entry.dirName);
5043
- if (!existsSync16(canonical))
5078
+ const canonical = join20(entry.installRoot, entry.dirName);
5079
+ if (!existsSync17(canonical))
5044
5080
  continue;
5045
5081
  const fresh = fanOutSymlinks(canonical, entry.dirName, detected);
5046
5082
  if (sameSorted(fresh, entry.symlinks))
@@ -5125,7 +5161,7 @@ function renderFrontmatter(fm) {
5125
5161
  return lines.join("\n");
5126
5162
  }
5127
5163
  function readLocalVersion(path) {
5128
- if (!existsSync16(path))
5164
+ if (!existsSync17(path))
5129
5165
  return null;
5130
5166
  try {
5131
5167
  const text = readFileSync12(path, "utf-8");
@@ -5214,8 +5250,8 @@ async function runPull(opts) {
5214
5250
  summary.skipped++;
5215
5251
  continue;
5216
5252
  }
5217
- const skillDir = join19(root, dirName);
5218
- const skillFile = join19(skillDir, "SKILL.md");
5253
+ const skillDir = join20(root, dirName);
5254
+ const skillFile = join20(skillDir, "SKILL.md");
5219
5255
  const remoteVersion = Number(row.version ?? 1);
5220
5256
  const localVersion = readLocalVersion(skillFile);
5221
5257
  const action = decideAction({
@@ -5227,9 +5263,9 @@ async function runPull(opts) {
5227
5263
  let manifestError;
5228
5264
  if (action === "wrote") {
5229
5265
  mkdirSync7(skillDir, { recursive: true });
5230
- if (existsSync16(skillFile)) {
5266
+ if (existsSync17(skillFile)) {
5231
5267
  try {
5232
- renameSync2(skillFile, `${skillFile}.bak`);
5268
+ renameSync3(skillFile, `${skillFile}.bak`);
5233
5269
  } catch {
5234
5270
  }
5235
5271
  }
@@ -5274,16 +5310,16 @@ async function runPull(opts) {
5274
5310
  return summary;
5275
5311
  }
5276
5312
 
5277
- // dist/src/skilify/unpull.js
5278
- import { existsSync as existsSync17, readdirSync as readdirSync3, rmSync as rmSync5, statSync as statSync3 } from "node:fs";
5279
- import { homedir as homedir10 } from "node:os";
5280
- import { join as join20 } from "node:path";
5313
+ // dist/src/skillify/unpull.js
5314
+ import { existsSync as existsSync18, readdirSync as readdirSync3, rmSync as rmSync5, statSync as statSync3 } from "node:fs";
5315
+ import { homedir as homedir11 } from "node:os";
5316
+ import { join as join21 } from "node:path";
5281
5317
  function resolveUnpullRoot(install, cwd) {
5282
5318
  if (install === "global")
5283
- return join20(homedir10(), ".claude", "skills");
5319
+ return join21(homedir11(), ".claude", "skills");
5284
5320
  if (!cwd)
5285
5321
  throw new Error("cwd required when install === 'project'");
5286
- return join20(cwd, ".claude", "skills");
5322
+ return join21(cwd, ".claude", "skills");
5287
5323
  }
5288
5324
  function runUnpull(opts) {
5289
5325
  const root = resolveUnpullRoot(opts.install, opts.cwd);
@@ -5306,8 +5342,8 @@ function runUnpull(opts) {
5306
5342
  const entries = entriesForRoot(manifest, opts.install, root);
5307
5343
  for (const entry of entries) {
5308
5344
  summary.scanned++;
5309
- const path = join20(root, entry.dirName);
5310
- if (!existsSync17(path)) {
5345
+ const path = join21(root, entry.dirName);
5346
+ if (!existsSync18(path)) {
5311
5347
  if (!opts.dryRun) {
5312
5348
  unlinkSymlinks(entry.symlinks);
5313
5349
  removePullEntry(opts.install, entry.installRoot, entry.dirName);
@@ -5360,12 +5396,12 @@ function runUnpull(opts) {
5360
5396
  }
5361
5397
  summary.entries.push(result);
5362
5398
  }
5363
- if (existsSync17(root) && (opts.all || opts.legacyCleanup)) {
5399
+ if (existsSync18(root) && (opts.all || opts.legacyCleanup)) {
5364
5400
  const manifestDirNames = new Set(entries.map((e) => e.dirName));
5365
5401
  for (const dirName of readdirSync3(root)) {
5366
5402
  if (manifestDirNames.has(dirName))
5367
5403
  continue;
5368
- const path = join20(root, dirName);
5404
+ const path = join21(root, dirName);
5369
5405
  let st;
5370
5406
  try {
5371
5407
  st = statSync3(path);
@@ -5442,9 +5478,9 @@ function decideTargetForManifestEntry(entry, opts, userFilter, haveUserFilter) {
5442
5478
  return { shouldRemove: true };
5443
5479
  }
5444
5480
 
5445
- // dist/src/commands/skilify.js
5481
+ // dist/src/commands/skillify.js
5446
5482
  function stateDir() {
5447
- return join21(homedir11(), ".deeplake", "state", "skilify");
5483
+ return join22(homedir12(), ".deeplake", "state", "skillify");
5448
5484
  }
5449
5485
  function showStatus() {
5450
5486
  const cfg = loadScopeConfig();
@@ -5452,11 +5488,11 @@ function showStatus() {
5452
5488
  console.log(`team: ${cfg.team.length === 0 ? "(empty)" : cfg.team.join(", ")}`);
5453
5489
  console.log(`install: ${cfg.install} (${cfg.install === "global" ? "~/.claude/skills/" : "<project>/.claude/skills/"})`);
5454
5490
  const dir = stateDir();
5455
- if (!existsSync18(dir)) {
5491
+ if (!existsSync19(dir)) {
5456
5492
  console.log(`state: (no projects tracked yet)`);
5457
5493
  return;
5458
5494
  }
5459
- const files = readdirSync4(dir).filter((f) => f.endsWith(".json") && f !== "config.json" && f !== "pulled.json");
5495
+ const files = readdirSync4(dir).filter((f) => f.endsWith(".json") && f !== "config.json" && f !== "pulled.json" && f !== "autopull-last-run.json");
5460
5496
  if (files.length === 0) {
5461
5497
  console.log(`state: (no projects tracked yet)`);
5462
5498
  return;
@@ -5464,9 +5500,10 @@ function showStatus() {
5464
5500
  console.log(`state: ${files.length} project(s) tracked`);
5465
5501
  for (const f of files) {
5466
5502
  try {
5467
- const s = JSON.parse(readFileSync13(join21(dir, f), "utf-8"));
5468
- const skills = s.skillsGenerated.length === 0 ? "none" : s.skillsGenerated.join(", ");
5469
- console.log(` - ${s.project} (counter=${s.counter}, last=${s.lastDate ?? "never"}, skills=${skills})`);
5503
+ const s = JSON.parse(readFileSync13(join22(dir, f), "utf-8"));
5504
+ const last = typeof s.updatedAt === "number" ? new Date(s.updatedAt).toISOString() : s.lastDate ?? "never";
5505
+ const skills = Array.isArray(s.skillsGenerated) && s.skillsGenerated.length > 0 ? s.skillsGenerated.join(", ") : "none";
5506
+ console.log(` - ${s.project} (counter=${s.counter}, last=${last}, skills=${skills})`);
5470
5507
  } catch {
5471
5508
  }
5472
5509
  }
@@ -5480,7 +5517,7 @@ function setScope(scope) {
5480
5517
  saveScopeConfig({ ...cfg, scope });
5481
5518
  console.log(`Scope set to '${scope}'.`);
5482
5519
  if (scope === "team" && cfg.team.length === 0) {
5483
- console.log(`Note: team list is empty. Use 'hivemind skilify team add <username>' to populate it.`);
5520
+ console.log(`Note: team list is empty. Use 'hivemind skillify team add <username>' to populate it.`);
5484
5521
  }
5485
5522
  }
5486
5523
  function setInstall(loc) {
@@ -5490,31 +5527,31 @@ function setInstall(loc) {
5490
5527
  }
5491
5528
  const cfg = loadScopeConfig();
5492
5529
  saveScopeConfig({ ...cfg, install: loc });
5493
- const path = loc === "global" ? join21(homedir11(), ".claude", "skills") : "<cwd>/.claude/skills";
5530
+ const path = loc === "global" ? join22(homedir12(), ".claude", "skills") : "<cwd>/.claude/skills";
5494
5531
  console.log(`Install location set to '${loc}'. New skills will be written to ${path}/<name>/SKILL.md.`);
5495
5532
  }
5496
5533
  function promoteSkill(name, cwd) {
5497
5534
  if (!name) {
5498
- console.error("Usage: hivemind skilify promote <skill-name>");
5535
+ console.error("Usage: hivemind skillify promote <skill-name>");
5499
5536
  process.exit(1);
5500
5537
  }
5501
- const projectPath = join21(cwd, ".claude", "skills", name);
5502
- const globalPath = join21(homedir11(), ".claude", "skills", name);
5503
- if (!existsSync18(join21(projectPath, "SKILL.md"))) {
5538
+ const projectPath = join22(cwd, ".claude", "skills", name);
5539
+ const globalPath = join22(homedir12(), ".claude", "skills", name);
5540
+ if (!existsSync19(join22(projectPath, "SKILL.md"))) {
5504
5541
  console.error(`Skill '${name}' not found at ${projectPath}/SKILL.md`);
5505
5542
  process.exit(1);
5506
5543
  }
5507
- if (existsSync18(join21(globalPath, "SKILL.md"))) {
5544
+ if (existsSync19(join22(globalPath, "SKILL.md"))) {
5508
5545
  console.error(`Skill '${name}' already exists at ${globalPath}/SKILL.md \u2014 refusing to overwrite. Remove it first or rename the project skill.`);
5509
5546
  process.exit(1);
5510
5547
  }
5511
5548
  mkdirSync8(dirname4(globalPath), { recursive: true });
5512
- renameSync3(projectPath, globalPath);
5549
+ renameSync4(projectPath, globalPath);
5513
5550
  console.log(`Promoted '${name}' from ${projectPath} \u2192 ${globalPath}.`);
5514
5551
  }
5515
5552
  function teamAdd(name) {
5516
5553
  if (!name) {
5517
- console.error("Usage: hivemind skilify team add <username>");
5554
+ console.error("Usage: hivemind skillify team add <username>");
5518
5555
  process.exit(1);
5519
5556
  }
5520
5557
  const cfg = loadScopeConfig();
@@ -5528,7 +5565,7 @@ function teamAdd(name) {
5528
5565
  }
5529
5566
  function teamRemove(name) {
5530
5567
  if (!name) {
5531
- console.error("Usage: hivemind skilify team remove <username>");
5568
+ console.error("Usage: hivemind skillify team remove <username>");
5532
5569
  process.exit(1);
5533
5570
  }
5534
5571
  const cfg = loadScopeConfig();
@@ -5551,14 +5588,14 @@ function teamList() {
5551
5588
  }
5552
5589
  function usage() {
5553
5590
  console.log("Usage:");
5554
- console.log(" hivemind skilify show current scope, team, install, and per-project state");
5555
- console.log(" hivemind skilify scope <me|team|org> set the mining scope");
5556
- console.log(" hivemind skilify install <project|global> set where new skills are written");
5557
- console.log(" hivemind skilify promote <skill-name> move a project skill to the global location");
5558
- console.log(" hivemind skilify team add <username> add a username to the team list");
5559
- console.log(" hivemind skilify team remove <username> remove a username from the team list");
5560
- console.log(" hivemind skilify team list list current team members");
5561
- console.log(" hivemind skilify pull [skill-name] [opts] fetch skills from Deeplake to local FS");
5591
+ console.log(" hivemind skillify show current scope, team, install, and per-project state");
5592
+ console.log(" hivemind skillify scope <me|team|org> set the mining scope");
5593
+ console.log(" hivemind skillify install <project|global> set where new skills are written");
5594
+ console.log(" hivemind skillify promote <skill-name> move a project skill to the global location");
5595
+ console.log(" hivemind skillify team add <username> add a username to the team list");
5596
+ console.log(" hivemind skillify team remove <username> remove a username from the team list");
5597
+ console.log(" hivemind skillify team list list current team members");
5598
+ console.log(" hivemind skillify pull [skill-name] [opts] fetch skills from Deeplake to local FS");
5562
5599
  console.log(" Options for pull:");
5563
5600
  console.log(" --to <project|global> destination (default: global)");
5564
5601
  console.log(" --user <name> only skills authored by this user");
@@ -5566,7 +5603,7 @@ function usage() {
5566
5603
  console.log(" --all-users all authors (default \u2014 equivalent to no filter)");
5567
5604
  console.log(" --dry-run show what would be written, don't touch disk");
5568
5605
  console.log(" --force overwrite even when local version >= remote");
5569
- console.log(" hivemind skilify unpull [opts] remove skills previously installed by pull");
5606
+ console.log(" hivemind skillify unpull [opts] remove skills previously installed by pull");
5570
5607
  console.log(" Options for unpull:");
5571
5608
  console.log(" --to <project|global> where to scan (default: global)");
5572
5609
  console.log(" --user <name> only entries authored by this user");
@@ -5575,7 +5612,7 @@ function usage() {
5575
5612
  console.log(" --dry-run show what would be removed");
5576
5613
  console.log(" --all also remove flat-layout (locally-mined) entries");
5577
5614
  console.log(" --legacy-cleanup also remove pre-`--author`-layout legacy `<projectKey>/` dirs");
5578
- console.log(" hivemind skilify status show per-project state");
5615
+ console.log(" hivemind skillify status show per-project state");
5579
5616
  }
5580
5617
  function takeFlagValue(args, flag) {
5581
5618
  const idx = args.indexOf(flag);
@@ -5639,7 +5676,7 @@ async function pullSkills(args) {
5639
5676
  console.error(`pull failed: ${e?.message ?? e}`);
5640
5677
  process.exit(1);
5641
5678
  }
5642
- const dest = toRaw === "global" ? join21(homedir11(), ".claude", "skills") : `${process.cwd()}/.claude/skills`;
5679
+ const dest = toRaw === "global" ? join22(homedir12(), ".claude", "skills") : `${process.cwd()}/.claude/skills`;
5643
5680
  const filterDesc = users.length === 0 ? "all users" : users.join(", ");
5644
5681
  console.log(`Destination: ${dest}`);
5645
5682
  console.log(`Filter: ${filterDesc}${skillName ? ` \xB7 skill='${skillName}'` : ""}${dryRun ? " \xB7 dry-run" : ""}${force ? " \xB7 force" : ""}`);
@@ -5689,7 +5726,7 @@ async function unpullSkills(args) {
5689
5726
  all,
5690
5727
  legacyCleanup
5691
5728
  });
5692
- const dest = toRaw === "global" ? join21(homedir11(), ".claude", "skills") : `${process.cwd()}/.claude/skills`;
5729
+ const dest = toRaw === "global" ? join22(homedir12(), ".claude", "skills") : `${process.cwd()}/.claude/skills`;
5693
5730
  const filterParts = [];
5694
5731
  if (users.length > 0)
5695
5732
  filterParts.push(`users=${users.join(",")}`);
@@ -5714,7 +5751,7 @@ async function unpullSkills(args) {
5714
5751
  const prunedNote = summary.manifestPruned > 0 ? `, ${summary.manifestPruned} manifest-pruned` : "";
5715
5752
  console.log(`Result: ${summary.removed} removed, ${summary.wouldRemove} dry-run, ${summary.kept} kept${prunedNote}.`);
5716
5753
  }
5717
- function runSkilifyCommand(args) {
5754
+ function runSkillifyCommand(args) {
5718
5755
  const sub = args[0];
5719
5756
  if (!sub || sub === "status") {
5720
5757
  showStatus();
@@ -5761,30 +5798,30 @@ function runSkilifyCommand(args) {
5761
5798
  teamList();
5762
5799
  return;
5763
5800
  }
5764
- console.error("Usage: hivemind skilify team <add|remove|list> [name]");
5801
+ console.error("Usage: hivemind skillify team <add|remove|list> [name]");
5765
5802
  process.exit(1);
5766
5803
  }
5767
5804
  if (sub === "--help" || sub === "-h" || sub === "help") {
5768
5805
  usage();
5769
5806
  return;
5770
5807
  }
5771
- console.error(`Unknown skilify subcommand: ${sub}`);
5808
+ console.error(`Unknown skillify subcommand: ${sub}`);
5772
5809
  usage();
5773
5810
  process.exit(1);
5774
5811
  }
5775
- if (process.argv[1] && process.argv[1].endsWith("skilify.js")) {
5776
- runSkilifyCommand(process.argv.slice(2));
5812
+ if (process.argv[1] && process.argv[1].endsWith("skillify.js")) {
5813
+ runSkillifyCommand(process.argv.slice(2));
5777
5814
  }
5778
5815
 
5779
5816
  // dist/src/cli/update.js
5780
5817
  import { execFileSync as execFileSync4 } from "node:child_process";
5781
- import { existsSync as existsSync19, readFileSync as readFileSync15, realpathSync } from "node:fs";
5818
+ import { existsSync as existsSync20, readFileSync as readFileSync15, realpathSync } from "node:fs";
5782
5819
  import { dirname as dirname6, sep } from "node:path";
5783
5820
  import { fileURLToPath as fileURLToPath2 } from "node:url";
5784
5821
 
5785
5822
  // dist/src/utils/version-check.js
5786
5823
  import { readFileSync as readFileSync14 } from "node:fs";
5787
- import { dirname as dirname5, join as join22 } from "node:path";
5824
+ import { dirname as dirname5, join as join23 } from "node:path";
5788
5825
  function isNewer(latest, current) {
5789
5826
  const parse = (v) => v.split(".").map(Number);
5790
5827
  const [la, lb, lc] = parse(latest);
@@ -5829,7 +5866,7 @@ function detectInstallKind(argv1) {
5829
5866
  }
5830
5867
  let gitDir = installDir;
5831
5868
  for (let i = 0; i < 6; i++) {
5832
- if (existsSync19(`${gitDir}${sep}.git`)) {
5869
+ if (existsSync20(`${gitDir}${sep}.git`)) {
5833
5870
  return { kind: "local-dev", installDir };
5834
5871
  }
5835
5872
  const parent = dirname6(gitDir);
@@ -5986,8 +6023,8 @@ Semantic search (embeddings):
5986
6023
  to run "embeddings install" automatically after installing the agent(s).
5987
6024
 
5988
6025
  Skill management (mine + share reusable Claude skills across the org):
5989
- hivemind skilify Show scope, team, install, and per-project state.
5990
- hivemind skilify pull [skill-name] Sync skills from the org table to local FS.
6026
+ hivemind skillify Show scope, team, install, and per-project state.
6027
+ hivemind skillify pull [skill-name] Sync skills from the org table to local FS.
5991
6028
  Options: --user <email>, --users a,b,c,
5992
6029
  --all-users, --to <project|global>,
5993
6030
  --dry-run, --force.
@@ -5997,17 +6034,17 @@ Skill management (mine + share reusable Claude skills across the org):
5997
6034
  idempotent (skipped when local is
5998
6035
  at-or-newer than remote). Disable via
5999
6036
  HIVEMIND_AUTOPULL_DISABLED=1.
6000
- hivemind skilify unpull Remove skills previously installed by pull.
6037
+ hivemind skillify unpull Remove skills previously installed by pull.
6001
6038
  Options: --user, --users, --not-mine,
6002
6039
  --to <project|global>, --dry-run,
6003
6040
  --all (also locally-mined),
6004
6041
  --legacy-cleanup (pre-suffix-author dirs).
6005
- hivemind skilify scope <me|team|org> Set the sharing scope for newly mined skills.
6006
- hivemind skilify install <project|global> Set where new skills are written.
6007
- hivemind skilify promote <name> Move a project skill to the global location.
6008
- hivemind skilify team add <username> Add a username to the team list.
6009
- hivemind skilify team remove <username> Remove a username from the team list.
6010
- hivemind skilify team list List current team members.
6042
+ hivemind skillify scope <me|team|org> Set the sharing scope for newly mined skills.
6043
+ hivemind skillify install <project|global> Set where new skills are written.
6044
+ hivemind skillify promote <name> Move a project skill to the global location.
6045
+ hivemind skillify team add <username> Add a username to the team list.
6046
+ hivemind skillify team remove <username> Remove a username from the team list.
6047
+ hivemind skillify team list List current team members.
6011
6048
 
6012
6049
  Account / org / workspace:
6013
6050
  hivemind whoami Show current user, org, workspace.
@@ -6158,8 +6195,8 @@ async function main() {
6158
6195
  const code = await runUpdate({ dryRun: hasFlag(args.slice(1), "--dry-run") });
6159
6196
  process.exit(code);
6160
6197
  }
6161
- if (cmd === "skilify") {
6162
- runSkilifyCommand(args.slice(1));
6198
+ if (cmd === "skillify") {
6199
+ runSkillifyCommand(args.slice(1));
6163
6200
  return;
6164
6201
  }
6165
6202
  if (cmd === "embeddings") {