From 99f779ffaac29ca6723e97407e927a77383d2635 Mon Sep 17 00:00:00 2001 From: kaghni Date: Fri, 10 Apr 2026 11:46:14 -0700 Subject: [PATCH] Fix regressions: update URL, branding, version display, org after login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GITHUB_RAW_PKG → activeloopai/hivemind - Update command → hivemind@hivemind - Branding → Hivemind (not Deeplake Hivemind) - Commands → /hivemind:login, /hivemind:update - Show 'Hivemind vX.Y.Z (up to date)' when current - Login skill: include org name in welcome message --- claude-code/bundle/session-start.js | 23 +++++++++++++---------- claude-code/commands/login.md | 4 +++- src/hooks/session-start.ts | 21 +++++++++++---------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/claude-code/bundle/session-start.js b/claude-code/bundle/session-start.js index eb2cfc2..5d774d9 100755 --- a/claude-code/bundle/session-start.js +++ b/claude-code/bundle/session-start.js @@ -342,7 +342,7 @@ Organization management \u2014 each argument is SEPARATE (do NOT quote subcomman LIMITS: Do NOT spawn subagents to read deeplake memory. If a file returns empty after 2 attempts, skip it and move on. Report what you found rather than exhaustively retrying. Debugging: Set DEEPLAKE_DEBUG=1 to enable verbose logging to ~/.deeplake/hook-debug.log`; -var GITHUB_RAW_PKG = "https://raw.githubusercontent.com/activeloopai/deeplake-claude-code-plugins/main/package.json"; +var GITHUB_RAW_PKG = "https://raw.githubusercontent.com/activeloopai/hivemind/main/package.json"; var VERSION_CHECK_TIMEOUT = 3e3; function getInstalledVersion() { try { @@ -410,7 +410,7 @@ async function main() { const input = await readStdin(); let creds = loadCredentials(); if (!creds?.token) { - log3("no credentials found \u2014 run /deeplake-hivemind:login to authenticate"); + log3("no credentials found \u2014 run /hivemind:login to authenticate"); } else { log3(`credentials loaded: org=${creds.orgName ?? creds.orgId}`); if (creds.token && !creds.userName) { @@ -451,32 +451,35 @@ async function main() { log3(`autoupdate: updating ${current} \u2192 ${latest}`); try { const scopes = ["user", "project", "local", "managed"]; - const cmd = scopes.map((s) => `claude plugin update deeplake-hivemind@deeplake-claude-code-plugins --scope ${s} 2>/dev/null`).join("; "); + const cmd = scopes.map((s) => `claude plugin update hivemind@hivemind --scope ${s} 2>/dev/null`).join("; "); execSync2(cmd, { stdio: "ignore", timeout: 6e4 }); updateNotice = ` -\u2705 Deeplake Hivemind auto-updated: ${current} \u2192 ${latest}. Run /reload-plugins to apply.`; - process.stderr.write(`\u2705 Deeplake Hivemind auto-updated: ${current} \u2192 ${latest}. Run /reload-plugins to apply. +\u2705 Hivemind auto-updated: ${current} \u2192 ${latest}. Run /reload-plugins to apply.`; + process.stderr.write(`\u2705 Hivemind auto-updated: ${current} \u2192 ${latest}. Run /reload-plugins to apply. `); log3(`autoupdate succeeded: ${current} \u2192 ${latest}`); } catch (e) { updateNotice = ` -\u2B06\uFE0F Deeplake Hivemind update available: ${current} \u2192 ${latest}. Auto-update failed \u2014 run /deeplake-hivemind:update to upgrade manually.`; - process.stderr.write(`\u2B06\uFE0F Deeplake Hivemind update available: ${current} \u2192 ${latest}. Auto-update failed \u2014 run /deeplake-hivemind:update to upgrade manually. +\u2B06\uFE0F Hivemind update available: ${current} \u2192 ${latest}. Auto-update failed \u2014 run /hivemind:update to upgrade manually.`; + process.stderr.write(`\u2B06\uFE0F Hivemind update available: ${current} \u2192 ${latest}. Auto-update failed \u2014 run /hivemind:update to upgrade manually. `); log3(`autoupdate failed: ${e.message}`); } } else { updateNotice = ` -\u2B06\uFE0F Deeplake Hivemind update available: ${current} \u2192 ${latest}. Run /deeplake-hivemind:update to upgrade.`; - process.stderr.write(`\u2B06\uFE0F Deeplake Hivemind update available: ${current} \u2192 ${latest}. Run /deeplake-hivemind:update to upgrade. +\u2B06\uFE0F Hivemind update available: ${current} \u2192 ${latest}. Run /hivemind:update to upgrade.`; + process.stderr.write(`\u2B06\uFE0F Hivemind update available: ${current} \u2192 ${latest}. Run /hivemind:update to upgrade. `); log3(`update available (autoupdate off): ${current} \u2192 ${latest}`); } } else { log3(`version up to date: ${current}`); + updateNotice = ` + +\u2705 Hivemind v${current} (up to date)`; } } } catch (e) { @@ -487,7 +490,7 @@ async function main() { Logged in to Deeplake as org: ${creds.orgName ?? creds.orgId} (workspace: ${creds.workspaceId ?? "default"})${updateNotice}` : `${resolvedContext} -\u26A0\uFE0F Not logged in to Deeplake. Memory search will not work. Ask the user to run /deeplake-hivemind:login to authenticate.${updateNotice}`; +\u26A0\uFE0F Not logged in to Deeplake. Memory search will not work. Ask the user to run /hivemind:login to authenticate.${updateNotice}`; console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: "SessionStart", diff --git a/claude-code/commands/login.md b/claude-code/commands/login.md index 1395768..79a0578 100644 --- a/claude-code/commands/login.md +++ b/claude-code/commands/login.md @@ -9,10 +9,12 @@ Run: node "${CLAUDE_PLUGIN_ROOT}/bundle/commands/auth-login.js" login ``` -If login succeeds, show this welcome message: +If login succeeds, show this welcome message. Include the organization name from the command output: šŸ Welcome to Hivemind! +Current org: **{org name from output}** + Your Claude Code agents can now talk to each other and share memory across sessions, teammates, and machines. Get started: diff --git a/src/hooks/session-start.ts b/src/hooks/session-start.ts index 11f543a..3c07f71 100644 --- a/src/hooks/session-start.ts +++ b/src/hooks/session-start.ts @@ -51,7 +51,7 @@ LIMITS: Do NOT spawn subagents to read deeplake memory. If a file returns empty Debugging: Set DEEPLAKE_DEBUG=1 to enable verbose logging to ~/.deeplake/hook-debug.log`; -const GITHUB_RAW_PKG = "https://raw.githubusercontent.com/activeloopai/deeplake-claude-code-plugins/main/package.json"; +const GITHUB_RAW_PKG = "https://raw.githubusercontent.com/activeloopai/hivemind/main/package.json"; const VERSION_CHECK_TIMEOUT = 3000; // 3s — don't block session start function getInstalledVersion(): string | null { @@ -143,7 +143,7 @@ async function main(): Promise { let creds = loadCredentials(); if (!creds?.token) { - log("no credentials found — run /deeplake-hivemind:login to authenticate"); + log("no credentials found — run /hivemind:login to authenticate"); } else { log(`credentials loaded: org=${creds.orgName ?? creds.orgId}`); // Backfill userName if missing (for users who logged in before this field was added) @@ -190,24 +190,25 @@ async function main(): Promise { try { const scopes = ["user", "project", "local", "managed"]; const cmd = scopes - .map(s => `claude plugin update deeplake-hivemind@deeplake-claude-code-plugins --scope ${s} 2>/dev/null`) + .map(s => `claude plugin update hivemind@hivemind --scope ${s} 2>/dev/null`) .join("; "); execSync(cmd, { stdio: "ignore", timeout: 60_000 }); - updateNotice = `\n\nāœ… Deeplake Hivemind auto-updated: ${current} → ${latest}. Run /reload-plugins to apply.`; - process.stderr.write(`āœ… Deeplake Hivemind auto-updated: ${current} → ${latest}. Run /reload-plugins to apply.\n`); + updateNotice = `\n\nāœ… Hivemind auto-updated: ${current} → ${latest}. Run /reload-plugins to apply.`; + process.stderr.write(`āœ… Hivemind auto-updated: ${current} → ${latest}. Run /reload-plugins to apply.\n`); log(`autoupdate succeeded: ${current} → ${latest}`); } catch (e: any) { - updateNotice = `\n\nā¬†ļø Deeplake Hivemind update available: ${current} → ${latest}. Auto-update failed — run /deeplake-hivemind:update to upgrade manually.`; - process.stderr.write(`ā¬†ļø Deeplake Hivemind update available: ${current} → ${latest}. Auto-update failed — run /deeplake-hivemind:update to upgrade manually.\n`); + updateNotice = `\n\nā¬†ļø Hivemind update available: ${current} → ${latest}. Auto-update failed — run /hivemind:update to upgrade manually.`; + process.stderr.write(`ā¬†ļø Hivemind update available: ${current} → ${latest}. Auto-update failed — run /hivemind:update to upgrade manually.\n`); log(`autoupdate failed: ${e.message}`); } } else { - updateNotice = `\n\nā¬†ļø Deeplake Hivemind update available: ${current} → ${latest}. Run /deeplake-hivemind:update to upgrade.`; - process.stderr.write(`ā¬†ļø Deeplake Hivemind update available: ${current} → ${latest}. Run /deeplake-hivemind:update to upgrade.\n`); + updateNotice = `\n\nā¬†ļø Hivemind update available: ${current} → ${latest}. Run /hivemind:update to upgrade.`; + process.stderr.write(`ā¬†ļø Hivemind update available: ${current} → ${latest}. Run /hivemind:update to upgrade.\n`); log(`update available (autoupdate off): ${current} → ${latest}`); } } else { log(`version up to date: ${current}`); + updateNotice = `\n\nāœ… Hivemind v${current} (up to date)`; } } } catch (e: any) { @@ -217,7 +218,7 @@ async function main(): Promise { const resolvedContext = context.replace(/DEEPLAKE_AUTH_CMD/g, AUTH_CMD); const additionalContext = creds?.token ? `${resolvedContext}\n\nLogged in to Deeplake as org: ${creds.orgName ?? creds.orgId} (workspace: ${creds.workspaceId ?? "default"})${updateNotice}` - : `${resolvedContext}\n\nāš ļø Not logged in to Deeplake. Memory search will not work. Ask the user to run /deeplake-hivemind:login to authenticate.${updateNotice}`; + : `${resolvedContext}\n\nāš ļø Not logged in to Deeplake. Memory search will not work. Ask the user to run /hivemind:login to authenticate.${updateNotice}`; console.log(JSON.stringify({ hookSpecificOutput: {