@honcho-ai/claude-honcho 0.3.0-rc.1

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 (67) hide show
  1. package/.claude-plugin/plugin.json +21 -0
  2. package/dist/chunk-084dpgp3.js +556 -0
  3. package/dist/chunk-084dpgp3.js.map +10 -0
  4. package/dist/chunk-49wja30f.js +20 -0
  5. package/dist/chunk-49wja30f.js.map +10 -0
  6. package/dist/chunk-4ryv9310.js +15534 -0
  7. package/dist/chunk-4ryv9310.js.map +87 -0
  8. package/dist/chunk-4zgbdwm4.js +261 -0
  9. package/dist/chunk-4zgbdwm4.js.map +10 -0
  10. package/dist/chunk-6yybt92z.js +106 -0
  11. package/dist/chunk-6yybt92z.js.map +9 -0
  12. package/dist/chunk-9pntsn3x.js +35 -0
  13. package/dist/chunk-9pntsn3x.js.map +10 -0
  14. package/dist/chunk-d2gc13m0.js +161 -0
  15. package/dist/chunk-d2gc13m0.js.map +11 -0
  16. package/dist/chunk-dxbm7kmf.js +331 -0
  17. package/dist/chunk-dxbm7kmf.js.map +10 -0
  18. package/dist/chunk-gnp95nzg.js +438 -0
  19. package/dist/chunk-gnp95nzg.js.map +12 -0
  20. package/dist/chunk-jgtvcc65.js +90 -0
  21. package/dist/chunk-jgtvcc65.js.map +10 -0
  22. package/dist/chunk-jr0fd6n2.js +181 -0
  23. package/dist/chunk-jr0fd6n2.js.map +11 -0
  24. package/dist/chunk-wm6hvkcv.js +245 -0
  25. package/dist/chunk-wm6hvkcv.js.map +10 -0
  26. package/dist/chunk-xdntcesh.js +15450 -0
  27. package/dist/chunk-xdntcesh.js.map +86 -0
  28. package/dist/chunk-xtdvbfxw.js +146 -0
  29. package/dist/chunk-xtdvbfxw.js.map +10 -0
  30. package/dist/chunk-yfrrc1d5.js +838 -0
  31. package/dist/chunk-yfrrc1d5.js.map +12 -0
  32. package/dist/hooks/post-tool-use.js +220 -0
  33. package/dist/hooks/post-tool-use.js.map +11 -0
  34. package/dist/hooks/pre-compact.js +217 -0
  35. package/dist/hooks/pre-compact.js.map +12 -0
  36. package/dist/hooks/pre-tool-honcho.js +38 -0
  37. package/dist/hooks/pre-tool-honcho.js.map +11 -0
  38. package/dist/hooks/save-user-message.js +96 -0
  39. package/dist/hooks/save-user-message.js.map +11 -0
  40. package/dist/hooks/session-end.js +51 -0
  41. package/dist/hooks/session-end.js.map +11 -0
  42. package/dist/hooks/session-start.js +246 -0
  43. package/dist/hooks/session-start.js.map +12 -0
  44. package/dist/hooks/stop.js +158 -0
  45. package/dist/hooks/stop.js.map +11 -0
  46. package/dist/hooks/user-prompt.js +19 -0
  47. package/dist/hooks/user-prompt.js.map +10 -0
  48. package/dist/mcp-server.js +13640 -0
  49. package/dist/mcp-server.js.map +110 -0
  50. package/dist/skills/backfill-runner.js +245 -0
  51. package/dist/skills/backfill-runner.js.map +10 -0
  52. package/dist/skills/setup-runner.js +339 -0
  53. package/dist/skills/setup-runner.js.map +12 -0
  54. package/dist/skills/status-runner.js +86 -0
  55. package/dist/skills/status-runner.js.map +10 -0
  56. package/hooks/hooks.json +108 -0
  57. package/mcp-servers.json +10 -0
  58. package/package.json +19 -0
  59. package/scripts/check-version.sh +50 -0
  60. package/scripts/honcho-statusline.sh +101 -0
  61. package/skills/briefing/SKILL.md +20 -0
  62. package/skills/config/SKILL.md +288 -0
  63. package/skills/import/SKILL.md +73 -0
  64. package/skills/insights/SKILL.md +109 -0
  65. package/skills/interview/SKILL.md +61 -0
  66. package/skills/setup/SKILL.md +60 -0
  67. package/skills/status/SKILL.md +30 -0
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../node_modules/@honcho-ai/sdk/dist/index.js", "../../src/skills/setup-runner.ts", "../../src/styles.ts"],
4
+ "sourcesContent": [
5
+ "\"use strict\";\n// Main entry point for the Honcho TypeScript SDK\n// Exports all main classes and types\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Summary = exports.SessionSummaries = exports.SessionContext = exports.Session = exports.PeerContext = exports.Peer = exports.Page = exports.Message = exports.DialecticStreamResponse = exports.UnprocessableEntityError = exports.TimeoutError = exports.ServerError = exports.RateLimitError = exports.PermissionDeniedError = exports.NotFoundError = exports.HonchoError = exports.ConnectionError = exports.ConflictError = exports.BadRequestError = exports.AuthenticationError = exports.ConclusionScope = exports.Conclusion = exports.Honcho = void 0;\n// Domain classes\nvar client_1 = require(\"./client\");\nObject.defineProperty(exports, \"Honcho\", { enumerable: true, get: function () { return client_1.Honcho; } });\nvar conclusions_1 = require(\"./conclusions\");\nObject.defineProperty(exports, \"Conclusion\", { enumerable: true, get: function () { return conclusions_1.Conclusion; } });\nObject.defineProperty(exports, \"ConclusionScope\", { enumerable: true, get: function () { return conclusions_1.ConclusionScope; } });\n// HTTP infrastructure\nvar errors_1 = require(\"./http/errors\");\nObject.defineProperty(exports, \"AuthenticationError\", { enumerable: true, get: function () { return errors_1.AuthenticationError; } });\nObject.defineProperty(exports, \"BadRequestError\", { enumerable: true, get: function () { return errors_1.BadRequestError; } });\nObject.defineProperty(exports, \"ConflictError\", { enumerable: true, get: function () { return errors_1.ConflictError; } });\nObject.defineProperty(exports, \"ConnectionError\", { enumerable: true, get: function () { return errors_1.ConnectionError; } });\nObject.defineProperty(exports, \"HonchoError\", { enumerable: true, get: function () { return errors_1.HonchoError; } });\nObject.defineProperty(exports, \"NotFoundError\", { enumerable: true, get: function () { return errors_1.NotFoundError; } });\nObject.defineProperty(exports, \"PermissionDeniedError\", { enumerable: true, get: function () { return errors_1.PermissionDeniedError; } });\nObject.defineProperty(exports, \"RateLimitError\", { enumerable: true, get: function () { return errors_1.RateLimitError; } });\nObject.defineProperty(exports, \"ServerError\", { enumerable: true, get: function () { return errors_1.ServerError; } });\nObject.defineProperty(exports, \"TimeoutError\", { enumerable: true, get: function () { return errors_1.TimeoutError; } });\nObject.defineProperty(exports, \"UnprocessableEntityError\", { enumerable: true, get: function () { return errors_1.UnprocessableEntityError; } });\n// Streaming types\nvar streaming_1 = require(\"./http/streaming\");\nObject.defineProperty(exports, \"DialecticStreamResponse\", { enumerable: true, get: function () { return streaming_1.DialecticStreamResponse; } });\nvar message_1 = require(\"./message\");\nObject.defineProperty(exports, \"Message\", { enumerable: true, get: function () { return message_1.Message; } });\nvar pagination_1 = require(\"./pagination\");\nObject.defineProperty(exports, \"Page\", { enumerable: true, get: function () { return pagination_1.Page; } });\nvar peer_1 = require(\"./peer\");\nObject.defineProperty(exports, \"Peer\", { enumerable: true, get: function () { return peer_1.Peer; } });\nObject.defineProperty(exports, \"PeerContext\", { enumerable: true, get: function () { return peer_1.PeerContext; } });\nvar session_1 = require(\"./session\");\nObject.defineProperty(exports, \"Session\", { enumerable: true, get: function () { return session_1.Session; } });\nvar session_context_1 = require(\"./session_context\");\nObject.defineProperty(exports, \"SessionContext\", { enumerable: true, get: function () { return session_context_1.SessionContext; } });\nObject.defineProperty(exports, \"SessionSummaries\", { enumerable: true, get: function () { return session_context_1.SessionSummaries; } });\nObject.defineProperty(exports, \"Summary\", { enumerable: true, get: function () { return session_context_1.Summary; } });\n",
6
+ "#!/usr/bin/env bun\nimport { Honcho } from \"@honcho-ai/sdk\";\nimport {\n loadConfig,\n loadConfigFromEnv,\n saveConfig,\n getConfigPath,\n getConfigDir,\n getHonchoClientOptions,\n getDetectedHost,\n getDefaultWorkspace,\n getDefaultAiPeer,\n configExists,\n setDetectedHost,\n getClaudeSettingsPath,\n getClaudeSettingsDir,\n saveRootField,\n} from \"../config.js\";\nimport * as s from \"../styles.js\";\nimport { copyFileSync, chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from \"fs\";\nimport { dirname, join } from \"path\";\nimport { fileURLToPath } from \"url\";\n\n// Installs the memory statusLine: ships the renderer to a stable path and\n// registers it in the user's global Claude Code settings. Plugins can't\n// self-register a statusLine and ${CLAUDE_PLUGIN_ROOT} isn't expanded in\n// settings.json, so an absolute path under ~/.honcho is the portable target.\n// Idempotent and non-destructive: never clobbers an existing statusLine.\nfunction installStatusline(): void {\n console.log(s.section(\"Installing memory statusLine\"));\n\n const src = join(dirname(fileURLToPath(import.meta.url)), \"..\", \"..\", \"scripts\", \"honcho-statusline.sh\");\n const dest = join(getConfigDir(), \"honcho-statusline.sh\");\n try {\n if (!existsSync(getConfigDir())) mkdirSync(getConfigDir(), { recursive: true });\n copyFileSync(src, dest);\n chmodSync(dest, 0o755);\n console.log(s.success(`Renderer installed at ${dest}`));\n } catch (err) {\n console.log(s.warn(`Could not install renderer: ${err instanceof Error ? err.message : String(err)}`));\n return;\n }\n\n // Default visibility to \"full\" only on first run — respect an existing choice.\n try {\n const raw = existsSync(getConfigPath()) ? JSON.parse(readFileSync(getConfigPath(), \"utf-8\")) : {};\n if (raw.statusline === undefined) saveRootField(\"statusline\", \"on\");\n } catch {\n // leave config as-is; the renderer defaults to \"full\" when the key is absent\n }\n\n // Register in ~/.claude/settings.json without disturbing an existing line.\n const settingsPath = getClaudeSettingsPath();\n let settings: Record<string, unknown> = {};\n try {\n if (existsSync(settingsPath)) settings = JSON.parse(readFileSync(settingsPath, \"utf-8\"));\n } catch {\n console.log(s.warn(`Could not parse ${settingsPath} — add the statusLine entry manually:`));\n console.log(s.dim(` \"statusLine\": { \"type\": \"command\", \"command\": \"${dest}\" }`));\n return;\n }\n\n // refreshInterval re-runs the renderer on a timer so the working glyph can\n // animate at rest; without it Claude Code only repaints on conversation\n // activity and the statusLine looks frozen. 1s is the host minimum.\n const REFRESH = 1;\n const existing = settings.statusLine as { command?: string; refreshInterval?: number } | undefined;\n if (existing?.command === dest) {\n if (existing.refreshInterval === REFRESH) {\n console.log(s.dim(\"statusLine already points at the honcho renderer\"));\n return;\n }\n // Upgrade an older registration that predates the animated renderer.\n settings.statusLine = { type: \"command\", command: dest, refreshInterval: REFRESH };\n try {\n writeFileSync(settingsPath, JSON.stringify(settings, null, 2));\n console.log(s.success(\"statusLine refreshInterval enabled — memory glyph now animates\"));\n } catch (err) {\n console.log(s.warn(`Could not update settings.json: ${err instanceof Error ? err.message : String(err)}`));\n }\n return;\n }\n if (existing) {\n console.log(s.warn(\"A different statusLine is already configured — leaving it untouched.\"));\n console.log(s.dim(\" To use honcho's instead, set settings.json statusLine.command to:\"));\n console.log(s.dim(` ${dest}`));\n console.log(s.dim(` and add \"refreshInterval\": ${REFRESH} so the glyph animates.`));\n return;\n }\n\n settings.statusLine = { type: \"command\", command: dest, refreshInterval: REFRESH };\n try {\n if (!existsSync(getClaudeSettingsDir())) mkdirSync(getClaudeSettingsDir(), { recursive: true });\n writeFileSync(settingsPath, JSON.stringify(settings, null, 2));\n console.log(s.success(\"statusLine registered in ~/.claude/settings.json\"));\n } catch (err) {\n console.log(s.warn(`Could not write settings.json: ${err instanceof Error ? err.message : String(err)}`));\n console.log(s.dim(` Add manually: \"statusLine\": { \"type\": \"command\", \"command\": \"${dest}\" }`));\n }\n}\n\nasync function setup(): Promise<void> {\n // Default to claude_code for this runner\n setDetectedHost(\"claude_code\");\n\n console.log(\"\");\n console.log(s.header(\"honcho setup\"));\n console.log(\"\");\n\n // Check for API key — env var takes precedence, then config file\n let apiKey = process.env.HONCHO_API_KEY;\n let keySource = \"environment\";\n\n if (!apiKey) {\n // Try reading from config file\n try {\n const { readFileSync } = await import(\"fs\");\n const configRaw = readFileSync(getConfigPath(), \"utf-8\");\n const configData = JSON.parse(configRaw);\n apiKey = configData.apiKey;\n keySource = \"config\";\n } catch {\n // No config file or no apiKey in it\n }\n }\n\n if (!apiKey) {\n console.log(s.warn(\"No API key found (checked env and config)\"));\n console.log(\"\");\n console.log(\" 1. Get a free key at https://app.honcho.dev\");\n if (process.platform === \"win32\") {\n console.log(\" 2. Set it in PowerShell:\");\n console.log(s.dim(' setx HONCHO_API_KEY \"your-key-here\"'));\n } else {\n console.log(\" 2. Add to ~/.zshrc or ~/.bashrc:\");\n console.log(s.dim(' export HONCHO_API_KEY=\"your-key-here\"'));\n }\n console.log(\" 3. Restart Claude Code and run /honcho:setup\");\n process.exit(1);\n }\n\n console.log(s.success(`API key found (${keySource})`));\n console.log(\"\");\n\n // Validate connection\n console.log(s.section(\"Validating connection\"));\n const config = loadConfig() || loadConfigFromEnv();\n if (!config) {\n console.log(s.warn(\"Failed to build config from environment\"));\n process.exit(1);\n }\n\n try {\n const honcho = new Honcho(getHonchoClientOptions(config));\n await honcho.workspaces();\n console.log(s.success(\"Connected to Honcho API\"));\n console.log(` ${s.label(\"Workspace\")}: ${config.workspace}`);\n console.log(` ${s.label(\"Peer\")}: ${config.peerName}`);\n console.log(` ${s.label(\"AI Peer\")}: ${config.aiPeer}`);\n console.log(\"\");\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n console.log(s.warn(`Connection failed: ${msg}`));\n if (msg.includes(\"401\") || msg.includes(\"auth\")) {\n console.log(s.dim(\" API key may be invalid. Get a new one at https://app.honcho.dev\"));\n }\n process.exit(1);\n }\n\n // Write config if it doesn't exist\n if (!configExists()) {\n console.log(s.section(\"Creating config\"));\n try {\n // Root-level globals (owned by user/CLI, written only at initial setup)\n const { saveRootField } = await import(\"../config.js\");\n saveRootField(\"apiKey\", config.apiKey);\n saveRootField(\"peerName\", config.peerName);\n // Per-host config goes in hosts.claude_code via saveConfig\n saveConfig({\n apiKey: config.apiKey,\n peerName: config.peerName,\n workspace: config.workspace,\n aiPeer: config.aiPeer,\n saveMessages: true,\n enabled: true,\n logging: true,\n });\n console.log(s.success(`Written to ${getConfigPath()}`));\n } catch (err) {\n console.log(s.warn(`Failed to write config: ${err instanceof Error ? err.message : String(err)}`));\n process.exit(1);\n }\n console.log(\"\");\n } else {\n console.log(s.dim(`Config already exists at ${getConfigPath()}`));\n console.log(\"\");\n }\n\n installStatusline();\n console.log(\"\");\n\n // Report availability only — importing lives in /honcho:import.\n try {\n const { findTranscripts } = await import(\"./backfill-runner.js\");\n const transcripts = findTranscripts(30);\n if (transcripts.length > 0) {\n console.log(s.section(\"Import past sessions (optional)\"));\n console.log(s.listItem(`Found ${transcripts.length} local Claude Code session(s) from the last 30 days.`));\n console.log(s.dim(\" Run /honcho:import whenever you'd like to add your past work to Honcho.\"));\n console.log(\"\");\n }\n } catch {\n // Non-fatal — the import is optional.\n }\n\n console.log(s.success(\"Setup complete -- Honcho memory is ready\"));\n console.log(\"\");\n}\n\nsetup();\n",
7
+ "/**\n * Shared color scheme and styling utilities for honcho CLI\n *\n * Design principles:\n * - No emojis, only tasteful Unicode symbols\n * - Orange to pale light blue gradient\n * - Consistent hierarchy: headers, labels, values, dim text\n */\n\n// ANSI color codes - orange to pale light blue gradient\nexport const colors = {\n reset: \"\\x1b[0m\",\n bold: \"\\x1b[1m\",\n dim: \"\\x1b[2m\",\n\n // Primary gradient: orange → pale blue\n orange: \"\\x1b[38;5;208m\",\n lightOrange: \"\\x1b[38;5;214m\",\n peach: \"\\x1b[38;5;215m\",\n palePeach: \"\\x1b[38;5;223m\",\n paleBlue: \"\\x1b[38;5;195m\",\n lightBlue: \"\\x1b[38;5;159m\",\n skyBlue: \"\\x1b[38;5;117m\",\n brightBlue: \"\\x1b[38;5;81m\",\n\n // Semantic colors\n success: \"\\x1b[38;5;114m\", // green\n error: \"\\x1b[38;5;203m\", // red\n warn: \"\\x1b[38;5;214m\", // light orange (warning)\n\n // Utility\n white: \"\\x1b[38;5;255m\",\n gray: \"\\x1b[38;5;245m\",\n};\n\n// Unicode symbols generated at runtime (survives bundling)\nexport const symbols = {\n check: String.fromCodePoint(0x2713), // ✓\n cross: String.fromCodePoint(0x2717), // ✗\n dot: String.fromCodePoint(0x00B7), // ·\n bullet: String.fromCodePoint(0x2022), // •\n arrow: String.fromCodePoint(0x2192), // →\n line: String.fromCodePoint(0x2500), // ─\n corner: String.fromCodePoint(0x2514), // └\n pipe: String.fromCodePoint(0x2502), // │\n sparkle: String.fromCodePoint(0x2726), // ✦\n};\n\n/**\n * Style a header/title\n */\nexport function header(text: string): string {\n const line = symbols.line.repeat(text.length);\n return `${colors.orange}${text}${colors.reset}\\n${colors.dim}${line}${colors.reset}`;\n}\n\n/**\n * Style a section header (smaller than main header)\n */\nexport function section(text: string): string {\n return `${colors.lightBlue}${text}${colors.reset}`;\n}\n\n/**\n * Style a label (for key-value pairs)\n */\nexport function label(text: string): string {\n return `${colors.skyBlue}${text}${colors.reset}`;\n}\n\n/**\n * Style a value\n */\nexport function value(text: string): string {\n return `${colors.white}${text}${colors.reset}`;\n}\n\n/**\n * Style dim/secondary text\n */\nexport function dim(text: string): string {\n return `${colors.dim}${text}${colors.reset}`;\n}\n\n/**\n * Style a success message\n */\nexport function success(message: string): string {\n return `${colors.success}${symbols.check}${colors.reset} ${message}`;\n}\n\n/**\n * Style an error message\n */\nexport function error(message: string): string {\n return `${colors.error}${symbols.cross}${colors.reset} ${message}`;\n}\n\n/**\n * Style a warning message\n */\nexport function warn(message: string): string {\n return `${colors.warn}!${colors.reset} ${message}`;\n}\n\n/**\n * Style a list item\n */\nexport function listItem(text: string, indent: number = 0): string {\n const padding = \" \".repeat(indent);\n return `${padding}${colors.dim}${symbols.bullet}${colors.reset} ${text}`;\n}\n\n/**\n * Style a key-value pair\n */\nexport function keyValue(key: string, val: string): string {\n return `${label(key)}: ${value(val)}`;\n}\n\n/**\n * Style current/active item marker\n */\nexport function current(text: string): string {\n return `${colors.palePeach}(${text})${colors.reset}`;\n}\n\n/**\n * Create a horizontal rule\n */\nexport function hr(width: number = 40): string {\n return `${colors.dim}${symbols.line.repeat(width)}${colors.reset}`;\n}\n\n/**\n * Style a path\n */\nexport function path(p: string): string {\n return `${colors.gray}${p}${colors.reset}`;\n}\n\n/**\n * Highlight text\n */\nexport function highlight(text: string): string {\n return `${colors.peach}${text}${colors.reset}`;\n}\n\n/**\n * Build a Honcho app URL for a session\n */\nexport function honchoSessionUrl(workspace: string, sessionName: string): string {\n return `https://app.honcho.dev/explore?workspace=${encodeURIComponent(workspace)}&view=sessions&session=${encodeURIComponent(sessionName)}`;\n}\n\n/**\n * OSC 8 terminal hyperlink (clickable in supported terminals)\n */\nexport function hyperlink(url: string, text: string): string {\n return `\\x1b]8;;${url}\\x07${text}\\x1b]8;;\\x07`;\n}\n\n/**\n * Styled session line with clickable hyperlink to Honcho app\n */\nexport function sessionLine(workspace: string, sessionName: string): string {\n const url = honchoSessionUrl(workspace, sessionName);\n return `${colors.dim}Honcho session:${colors.reset} ${hyperlink(url, `${colors.skyBlue}${sessionName}${colors.reset}`)}`;\n}\n"
8
+ ],
9
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;AAAA,EACpD,kBAAkB,2BAA2B,yBAAyB,kBAAkB,sBAAsB,eAAe,eAAe,kBAAkB,kCAAkC,mCAAmC,uBAAuB,sBAAsB,yBAAyB,gCAAgC,wBAAwB,sBAAsB,0BAA0B,wBAAwB,0BAA0B,8BAA8B,0BAA0B,qBAAqB,iBAAc;AAAA,EAEtiB,IAAI;AAAA,EACJ,OAAO,eAAe,SAAS,UAAU,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG;AAAA,IAAE,OAAO,SAAS;AAAA,IAAU,CAAC;AAAA,EAC3G,IAAI;AAAA,EACJ,OAAO,eAAe,SAAS,cAAc,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG;AAAA,IAAE,OAAO,cAAc;AAAA,IAAc,CAAC;AAAA,EACxH,OAAO,eAAe,SAAS,mBAAmB,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG;AAAA,IAAE,OAAO,cAAc;AAAA,IAAmB,CAAC;AAAA,EAElI,IAAI;AAAA,EACJ,OAAO,eAAe,SAAS,uBAAuB,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG;AAAA,IAAE,OAAO,SAAS;AAAA,IAAuB,CAAC;AAAA,EACrI,OAAO,eAAe,SAAS,mBAAmB,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG;AAAA,IAAE,OAAO,SAAS;AAAA,IAAmB,CAAC;AAAA,EAC7H,OAAO,eAAe,SAAS,iBAAiB,EAAE,YAAY,MAAM,K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AA,EAClB,QAAQ,IAAI,EAAE;AAAA,EAGd,IAAI;AAAA,IACF,QAAQ,oBAAoB,MAAa;AAAA,IACzC,MAAM,cAAc,gBAAgB,EAAE;AAAA,IACtC,IAAI,YAAY,SAAS,GAAG;AAAA,MAC1B,QAAQ,IAAM,QAAQ,iCAAiC,CAAC;AAAA,MACxD,QAAQ,IAAM,SAAS,SAAS,YAAY,4DAA4D,CAAC;AAAA,MACzG,QAAQ,IAAM,IAAI,2EAA2E,CAAC;AAAA,MAC9F,QAAQ,IAAI,EAAE;AAAA,IAChB;AAAA,IACA,MAAM;AAAA,EAIR,QAAQ,IAAM,QAAQ,0CAA0C,CAAC;AAAA,EACjE,QAAQ,IAAI,EAAE;AAAA;AAGhB,MAAM;",
10
+ "debugId": "E44FDBA860D5B7D464756E2164756E21",
11
+ "names": []
12
+ }
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env bun
2
+ import {
3
+ dim,
4
+ error,
5
+ header,
6
+ label,
7
+ require_dist,
8
+ success,
9
+ warn
10
+ } from "../chunk-d2gc13m0.js";
11
+ import"../chunk-xdntcesh.js";
12
+ import {
13
+ __toESM,
14
+ getEndpointInfo,
15
+ getHonchoClientOptions,
16
+ getSessionName,
17
+ loadConfig
18
+ } from "../chunk-gnp95nzg.js";
19
+
20
+ // src/skills/status-runner.ts
21
+ var import_sdk = __toESM(require_dist(), 1);
22
+ async function status() {
23
+ console.log("");
24
+ console.log(header("honcho status"));
25
+ console.log("");
26
+ const config = loadConfig();
27
+ if (!config) {
28
+ console.log(warn("Not configured"));
29
+ console.log(dim("Set HONCHO_API_KEY environment variable"));
30
+ return;
31
+ }
32
+ const endpointInfo = getEndpointInfo(config);
33
+ try {
34
+ const honcho = new import_sdk.Honcho(getHonchoClientOptions(config));
35
+ const pingStart = Date.now();
36
+ const [queueResult, conclusionsResult] = await Promise.allSettled([
37
+ honcho.queueStatus(),
38
+ honcho.peer(config.peerName).then((peer) => peer.conclusions.list())
39
+ ]);
40
+ const latency = Date.now() - pingStart;
41
+ if (queueResult.status === "rejected" && conclusionsResult.status === "rejected") {
42
+ throw queueResult.reason;
43
+ }
44
+ console.log(` ${label("Connection")}: ${success("connected")} ${dim(`(${latency}ms)`)}`);
45
+ console.log(` ${label("Workspace")}: ${config.workspace} ${dim(`@ ${endpointInfo.url}`)}`);
46
+ console.log(` ${label("Session")}: ${getSessionName(process.cwd())}`);
47
+ console.log(` ${label("Peers")}: ${config.peerName} / ${config.aiPeer}`);
48
+ if (queueResult.status === "fulfilled") {
49
+ const q = queueResult.value;
50
+ const total = q.totalWorkUnits ?? 0;
51
+ const completed = q.completedWorkUnits ?? 0;
52
+ const inProgress = q.inProgressWorkUnits ?? 0;
53
+ const sessionCount = q.sessions ? Object.keys(q.sessions).length : 0;
54
+ if (total > 0) {
55
+ const pct = Math.round(completed / total * 100);
56
+ let detail = `${completed}/${total} messages observed (${pct}%)`;
57
+ if (inProgress > 0)
58
+ detail += `, ${inProgress} active`;
59
+ if (sessionCount > 0)
60
+ detail += ` across ${sessionCount} sessions`;
61
+ console.log(` ${label("Observing")}: ${detail}`);
62
+ } else {
63
+ console.log(` ${label("Observing")}: ${dim("idle")}`);
64
+ }
65
+ }
66
+ if (conclusionsResult.status === "fulfilled") {
67
+ const page = conclusionsResult.value;
68
+ const total = page.total ?? page.items?.length ?? "?";
69
+ console.log(` ${label("Conclusions")}: ${total} ${dim(`(${config.peerName})`)}`);
70
+ }
71
+ } catch (err) {
72
+ const message = err instanceof Error ? err.message : String(err);
73
+ if (message.includes("401") || message.includes("Unauthorized")) {
74
+ console.log(` ${label("Connection")}: ${error("auth failed")} ${dim("check API key")}`);
75
+ } else if (message.includes("ECONNREFUSED") || message.includes("fetch failed")) {
76
+ console.log(` ${label("Connection")}: ${error("unreachable")} ${dim(endpointInfo.url)}`);
77
+ } else {
78
+ console.log(` ${label("Connection")}: ${error("failed")} ${dim(message.slice(0, 60))}`);
79
+ }
80
+ }
81
+ console.log("");
82
+ }
83
+ status();
84
+
85
+ //# debugId=673F0FFE57BCD94064756E2164756E21
86
+ //# sourceMappingURL=status-runner.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/skills/status-runner.ts"],
4
+ "sourcesContent": [
5
+ "#!/usr/bin/env bun\n/**\n * Runner script for the status skill.\n * Minimal: connection, queue, conclusions.\n */\nimport { Honcho, type Page, type Conclusion } from \"@honcho-ai/sdk\";\nimport type { QueueStatus } from \"@honcho-ai/sdk\";\nimport { loadConfig, getHonchoClientOptions, getEndpointInfo, getSessionName } from \"../config.js\";\nimport * as s from \"../styles.js\";\n\nasync function status(): Promise<void> {\n console.log(\"\");\n console.log(s.header(\"honcho status\"));\n console.log(\"\");\n\n const config = loadConfig();\n if (!config) {\n console.log(s.warn(\"Not configured\"));\n console.log(s.dim(\"Set HONCHO_API_KEY environment variable\"));\n return;\n }\n\n const endpointInfo = getEndpointInfo(config);\n\n try {\n const honcho = new Honcho(getHonchoClientOptions(config));\n const pingStart = Date.now();\n\n const [queueResult, conclusionsResult] = await Promise.allSettled([\n honcho.queueStatus(),\n honcho.peer(config.peerName).then((peer) => peer.conclusions.list()),\n ]);\n\n const latency = Date.now() - pingStart;\n\n // If both API calls failed, treat as a connection failure\n if (queueResult.status === \"rejected\" && conclusionsResult.status === \"rejected\") {\n throw queueResult.reason;\n }\n\n console.log(` ${s.label(\"Connection\")}: ${s.success(\"connected\")} ${s.dim(`(${latency}ms)`)}`);\n console.log(` ${s.label(\"Workspace\")}: ${config.workspace} ${s.dim(`@ ${endpointInfo.url}`)}`);\n console.log(` ${s.label(\"Session\")}: ${getSessionName(process.cwd())}`);\n console.log(` ${s.label(\"Peers\")}: ${config.peerName} / ${config.aiPeer}`);\n\n // Observation queue — messages being processed into conclusions\n if (queueResult.status === \"fulfilled\") {\n const q: QueueStatus = queueResult.value;\n const total = q.totalWorkUnits ?? 0;\n const completed = q.completedWorkUnits ?? 0;\n const inProgress = q.inProgressWorkUnits ?? 0;\n const sessionCount = q.sessions ? Object.keys(q.sessions).length : 0;\n if (total > 0) {\n const pct = Math.round((completed / total) * 100);\n let detail = `${completed}/${total} messages observed (${pct}%)`;\n if (inProgress > 0) detail += `, ${inProgress} active`;\n if (sessionCount > 0) detail += ` across ${sessionCount} sessions`;\n console.log(` ${s.label(\"Observing\")}: ${detail}`);\n } else {\n console.log(` ${s.label(\"Observing\")}: ${s.dim(\"idle\")}`);\n }\n }\n\n // Conclusions\n if (conclusionsResult.status === \"fulfilled\") {\n const page: Page<Conclusion> = conclusionsResult.value;\n const total = page.total ?? page.items?.length ?? \"?\";\n console.log(` ${s.label(\"Conclusions\")}: ${total} ${s.dim(`(${config.peerName})`)}`);\n }\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : String(err);\n if (message.includes(\"401\") || message.includes(\"Unauthorized\")) {\n console.log(` ${s.label(\"Connection\")}: ${s.error(\"auth failed\")} ${s.dim(\"check API key\")}`);\n } else if (message.includes(\"ECONNREFUSED\") || message.includes(\"fetch failed\")) {\n console.log(` ${s.label(\"Connection\")}: ${s.error(\"unreachable\")} ${s.dim(endpointInfo.url)}`);\n } else {\n console.log(` ${s.label(\"Connection\")}: ${s.error(\"failed\")} ${s.dim(message.slice(0, 60))}`);\n }\n }\n\n console.log(\"\");\n}\n\nstatus();\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAKA;AAKA,eAAe,MAAM,GAAkB;AAAA,EACrC,QAAQ,IAAI,EAAE;AAAA,EACd,QAAQ,IAAM,OAAO,eAAe,CAAC;AAAA,EACrC,QAAQ,IAAI,EAAE;AAAA,EAEd,MAAM,SAAS,WAAW;AAAA,EAC1B,IAAI,CAAC,QAAQ;AAAA,IACX,QAAQ,IAAM,KAAK,gBAAgB,CAAC;AAAA,IACpC,QAAQ,IAAM,IAAI,yCAAyC,CAAC;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,MAAM,eAAe,gBAAgB,MAAM;AAAA,EAE3C,IAAI;AAAA,IACF,MAAM,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,QAAQ,IAAI,KAAO,MAAM,WAAW,QAAQ,QAAQ;AAAA,MACtD,EAAO;AAAA,QACL,QAAQ,IAAI,KAAO,MAAM,WAAW,QAAU,IAAI,MAAM,GAAG;AAAA;AAAA,IAE/D;AAAA,IAGA,IAAI,kBAAkB,WAAW,aAAa;AAAA,MAC5C,MAAM,OAAyB,kBAAkB;AAAA,MACjD,MAAM,QAAQ,KAAK,SAAS,KAAK,OAAO,UAAU;AAAA,MAClD,QAAQ,IAAI,KAAO,MAAM,aAAa,MAAM,SAAW,IAAI,IAAI,OAAO,WAAW,GAAG;AAAA,IACtF;AAAA,IACA,OAAO,KAAc;AAAA,IACrB,MAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,IAC/D,IAAI,QAAQ,SAAS,KAAK,KAAK,QAAQ,SAAS,cAAc,GAAG;AAAA,MAC/D,QAAQ,IAAI,KAAO,MAAM,YAAY,OAAS,MAAM,aAAa,KAAO,IAAI,eAAe,GAAG;AAAA,IAChG,EAAO,SAAI,QAAQ,SAAS,cAAc,KAAK,QAAQ,SAAS,cAAc,GAAG;AAAA,MAC/E,QAAQ,IAAI,KAAO,MAAM,YAAY,OAAS,MAAM,aAAa,KAAO,IAAI,aAAa,GAAG,GAAG;AAAA,IACjG,EAAO;AAAA,MACL,QAAQ,IAAI,KAAO,MAAM,YAAY,OAAS,MAAM,QAAQ,KAAO,IAAI,QAAQ,MAAM,GAAG,EAAE,CAAC,GAAG;AAAA;AAAA;AAAA,EAIlG,QAAQ,IAAI,EAAE;AAAA;AAGhB,OAAO;",
8
+ "debugId": "673F0FFE57BCD94064756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "description": "Honcho memory hooks for Claude Code sessions",
3
+ "hooks": {
4
+ "SessionStart": [
5
+ {
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/check-version.sh\"",
10
+ "timeout": 5
11
+ },
12
+ {
13
+ "type": "command",
14
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/session-start.js",
15
+ "timeout": 30
16
+ }
17
+ ]
18
+ }
19
+ ],
20
+ "SessionEnd": [
21
+ {
22
+ "hooks": [
23
+ {
24
+ "type": "command",
25
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/session-end.js",
26
+ "timeout": 5
27
+ }
28
+ ]
29
+ }
30
+ ],
31
+ "PostToolUse": [
32
+ {
33
+ "matcher": "Write|Edit|Bash|Task",
34
+ "hooks": [
35
+ {
36
+ "type": "command",
37
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/post-tool-use.js",
38
+ "timeout": 10,
39
+ "async": true
40
+ }
41
+ ]
42
+ }
43
+ ],
44
+ "PreToolUse": [
45
+ {
46
+ "matcher": "mcp__plugin_honcho_honcho__.*",
47
+ "hooks": [
48
+ {
49
+ "type": "command",
50
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/pre-tool-honcho.js",
51
+ "timeout": 4
52
+ }
53
+ ]
54
+ }
55
+ ],
56
+ "UserPromptSubmit": [
57
+ {
58
+ "hooks": [
59
+ {
60
+ "type": "command",
61
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/user-prompt.js",
62
+ "timeout": 125
63
+ },
64
+ {
65
+ "type": "command",
66
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/save-user-message.js",
67
+ "timeout": 30,
68
+ "async": true
69
+ }
70
+ ]
71
+ }
72
+ ],
73
+ "PreCompact": [
74
+ {
75
+ "matcher": "auto",
76
+ "hooks": [
77
+ {
78
+ "type": "command",
79
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/pre-compact.js",
80
+ "timeout": 20
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "matcher": "manual",
86
+ "hooks": [
87
+ {
88
+ "type": "command",
89
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/pre-compact.js",
90
+ "timeout": 20
91
+ }
92
+ ]
93
+ }
94
+ ],
95
+ "Stop": [
96
+ {
97
+ "hooks": [
98
+ {
99
+ "type": "command",
100
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/stop.js",
101
+ "timeout": 10,
102
+ "async": true
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ }
108
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "honcho": {
3
+ "command": "node",
4
+ "args": [
5
+ "${CLAUDE_PLUGIN_ROOT}/dist/mcp-server.js"
6
+ ],
7
+ "timeout": 150000,
8
+ "alwaysLoad": true
9
+ }
10
+ }
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@honcho-ai/claude-honcho",
3
+ "version": "0.3.0-rc.1",
4
+ "type": "module",
5
+ "description": "Persistent memory for Claude Code sessions using Honcho by Plastic Labs",
6
+ "author": "Plastic Labs <hello@plasticlabs.ai>",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/plastic-labs/claude-honcho.git"
11
+ },
12
+ "keywords": [
13
+ "memory",
14
+ "context",
15
+ "ai",
16
+ "honcho",
17
+ "persistence"
18
+ ]
19
+ }
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env bash
2
+ # Nag users when their installed honcho plugin lags behind the published
3
+ # version. Throttled to one network check per 24h. Dep-free; uses curl + sort -V.
4
+ set -eu
5
+
6
+ ROOT="${CLAUDE_PLUGIN_ROOT:-}"
7
+ DATA="${CLAUDE_PLUGIN_DATA:-}"
8
+
9
+ [ -z "$ROOT" ] && exit 0
10
+ [ -z "$DATA" ] && exit 0
11
+
12
+ mkdir -p "$DATA"
13
+ STAMP="${DATA}/.version-check"
14
+ FLAG="${DATA}/.version-stale"
15
+
16
+ # Throttle: skip if checked within last 24h.
17
+ if [ -f "$STAMP" ]; then
18
+ if find "$STAMP" -mtime -1 -print 2>/dev/null | grep -q .; then
19
+ exit 0
20
+ fi
21
+ fi
22
+
23
+ LOCAL_VERSION=$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' \
24
+ "${ROOT}/.claude-plugin/plugin.json" | head -n1)
25
+ [ -z "$LOCAL_VERSION" ] && exit 0
26
+
27
+ REMOTE_JSON=$(curl --max-time 2 -fsSL \
28
+ "https://raw.githubusercontent.com/plastic-labs/claude-honcho/main/.claude-plugin/marketplace.json" \
29
+ 2>/dev/null) || exit 0
30
+
31
+ # Pull the version of the "honcho" plugin entry. Naive but adequate for our schema.
32
+ REMOTE_VERSION=$(printf '%s' "$REMOTE_JSON" \
33
+ | tr -d '\n' \
34
+ | sed -n 's/.*"name"[[:space:]]*:[[:space:]]*"honcho"[^}]*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' \
35
+ | head -n1)
36
+ [ -z "$REMOTE_VERSION" ] && exit 0
37
+
38
+ # Touch stamp regardless of outcome so we don't keep hammering the network.
39
+ touch "$STAMP"
40
+
41
+ # If local >= remote, clear any stale flag and exit.
42
+ LATEST=$(printf '%s\n%s\n' "$LOCAL_VERSION" "$REMOTE_VERSION" | sort -V | tail -n1)
43
+ if [ "$LOCAL_VERSION" = "$LATEST" ]; then
44
+ rm -f "$FLAG"
45
+ exit 0
46
+ fi
47
+
48
+ printf 'honcho plugin: v%s installed, v%s available. To update: run /plugins, search honcho, press Enter, choose "Update now".\n' \
49
+ "$LOCAL_VERSION" "$REMOTE_VERSION" > "$FLAG"
50
+ exit 0
@@ -0,0 +1,101 @@
1
+ #!/usr/bin/env bash
2
+ # Renders honcho memory state as a statusLine segment with a soft truecolor
3
+ # glow. The statusline is the one surface the Claude Code TUI re-paints on its
4
+ # own refresh cycle, so it is where memory activity can actually animate --
5
+ # hooks write ~/.honcho/state.json, this reads it. Motion is slow and
6
+ # low-contrast by design (no flashing).
7
+ #
8
+ # At rest it shows only sync status + a clickable session link. Quantitative
9
+ # detail is intentionally omitted; activity (loading/recalling/tool
10
+ # calls) animates while it happens.
11
+ #
12
+ # Visibility via "statusline" in ~/.honcho/config.json:
13
+ # "on" (default) · "off" (hidden)
14
+ HONCHO_DIR="$HOME/.honcho"
15
+ # Read the statusLine JSON Claude pipes in, but never block: time out fast if
16
+ # stdin has no EOF, so the bar can't freeze.
17
+ INPUT=""
18
+ IFS= read -r -t 1 INPUT 2>/dev/null || true
19
+
20
+ exec python3 - "$HONCHO_DIR" "$INPUT" <<'PY'
21
+ import json, sys, time, os
22
+
23
+ honcho_dir, raw = sys.argv[1], sys.argv[2]
24
+
25
+ def load(name):
26
+ try:
27
+ return json.load(open(os.path.join(honcho_dir, name)))
28
+ except Exception:
29
+ return {}
30
+
31
+ # session_id is the one field guaranteed identical between this statusLine
32
+ # stdin and the hook stdin -> use it to read THIS window's files, with a
33
+ # global-file fallback for back-compat.
34
+ sess_id = ""
35
+ try:
36
+ sess_id = (json.loads(raw).get("session_id") or "") if raw.strip() else ""
37
+ except Exception:
38
+ pass
39
+
40
+ def keyed(base):
41
+ if sess_id and os.path.exists(os.path.join(honcho_dir, f"{base}-{sess_id}.json")):
42
+ return f"{base}-{sess_id}.json"
43
+ return f"{base}.json"
44
+
45
+ # --- visibility toggle ------------------------------------------------------
46
+ if (load("config.json").get("statusline") or "on").lower() == "off":
47
+ sys.exit(0)
48
+
49
+ # --- connection + session link ----------------------------------------------
50
+ synced = bool((load("context-cache.json").get("userContext", {}) or {}).get("data"))
51
+ link_url = (load(keyed("session")).get("url") or "")
52
+
53
+ # --- live phase from the hooks ----------------------------------------------
54
+ TTL = {"loading": 40, "compacting": 40, "recalling": 6, "querying": 8}
55
+ phase, detail = "idle", ""
56
+ s = load(keyed("state"))
57
+ ph = s.get("phase", "idle")
58
+ since = (s.get("since", 0) or 0) / 1000
59
+ if ph in TTL and (time.time() - since) <= TTL[ph]:
60
+ phase, detail = ph, (s.get("detail") or "")
61
+
62
+ # --- styling: glyph animates while working, fixed colors, no flashing -------
63
+ # (The statusLine is registered with refreshInterval, so Claude Code re-runs
64
+ # this script on a timer even at rest. Active phases advance a slow moon-phase
65
+ # frame off the wall clock; idle stays a single static marker. Only the glyph
66
+ # shape rotates -- colors are constant, ~1 Hz, well under any flicker threshold.)
67
+ def fg(rgb):
68
+ return f"\x1b[38;2;{rgb[0]};{rgb[1]};{rgb[2]}m"
69
+
70
+ R = "\x1b[0m"
71
+ DIM = "\x1b[38;2;120;120;128m"
72
+ CALM = (130, 200, 225) # synced / resting
73
+ WORK = (230, 175, 110) # memory actively working
74
+ SEP = f"{DIM} · {R}"
75
+
76
+ # Slow clockwise moon rotation while working; a gentle two-frame pulse for
77
+ # point queries. Frame advances ~1 Hz off the wall clock so each repaint moves.
78
+ SPIN = ["◐", "◓", "◑", "◒"]
79
+ SPARK = ["✦", "✧"]
80
+ LABEL = {"loading": "loading memory", "compacting": "anchoring memory",
81
+ "recalling": "recalling"}
82
+
83
+ def osc8(url, text): # clickable link, no raw URL shown
84
+ return f"\x1b]8;;{url}\x07{text}\x1b]8;;\x07"
85
+
86
+ if phase == "idle":
87
+ color = CALM if synced else (120, 120, 128)
88
+ glyph = f"{fg(color)}{'◆' if synced else '◇'}{R}"
89
+ if not link_url:
90
+ out = f"{glyph}{DIM} honcho{R}"
91
+ else:
92
+ out = f"{glyph} {DIM}{osc8(link_url, 'honcho ↗')}{R}"
93
+ else:
94
+ frames = SPARK if phase == "querying" else SPIN
95
+ char = frames[int(time.time()) % len(frames)]
96
+ glyph = f"{fg(WORK)}{char}{R}"
97
+ label = detail if phase == "querying" else LABEL.get(phase, phase)
98
+ out = f"{glyph}{DIM} honcho{R}{SEP}{fg(WORK)}{label or 'memory'}{R}"
99
+
100
+ sys.stdout.write(out)
101
+ PY
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Load the Honcho session briefing (session summary + peer card) via a visible tool call
3
+ user-invocable: true
4
+ ---
5
+
6
+ # Honcho Briefing
7
+
8
+ Load the stored session summary and the user's peer card through the `get_briefing` MCP tool.
9
+
10
+ ## Usage
11
+
12
+ Run `/honcho:briefing` at any point to load (or reload) the briefing. The session-start directives may also ask for this automatically on the first turn when the `briefing` component is configured.
13
+
14
+ ## Implementation
15
+
16
+ Call the `get_briefing` tool from the honcho MCP server (`mcp__plugin_honcho_honcho__get_briefing`). No arguments.
17
+
18
+ ## Presentation
19
+
20
+ The payload is already visible in the expandable tool row — do NOT repeat it back. After the call, reply with at most two sentences: confirm the briefing is loaded and name where the session left off (from the summary). If the tool reports no briefing available, say so in one line.