honeybook-mcp 0.1.6 → 0.1.7

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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "HoneyBook client-portal tools for Claude Code",
10
- "version": "0.1.6"
10
+ "version": "0.1.7"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "HoneyBook",
16
16
  "source": "./",
17
17
  "description": "HoneyBook client-portal MCP for Claude — view wedding-vendor contracts and invoices via MCP",
18
- "version": "0.1.6",
18
+ "version": "0.1.7",
19
19
  "author": {
20
20
  "name": "Chris Chall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "honeybook",
3
3
  "displayName": "HoneyBook",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "description": "HoneyBook client-portal MCP for Claude — view wedding-vendor contracts and invoices via MCP",
6
6
  "author": {
7
7
  "name": "Chris Chall",
package/dist/bundle.js CHANGED
@@ -21017,6 +21017,8 @@ var StdioServerTransport = class {
21017
21017
  import { existsSync, readFileSync, writeFileSync, mkdirSync, chmodSync } from "node:fs";
21018
21018
  import { homedir } from "node:os";
21019
21019
  import { join, dirname } from "node:path";
21020
+ import { execSync } from "node:child_process";
21021
+ import { createRequire } from "node:module";
21020
21022
  function normalizeOrigin(input) {
21021
21023
  try {
21022
21024
  const url = new URL(input);
@@ -21043,6 +21045,39 @@ function deserializeSessions(body) {
21043
21045
  return /* @__PURE__ */ new Map();
21044
21046
  }
21045
21047
  }
21048
+ var PUPPETEER_VENDOR_DIR = join(homedir(), ".honeybook-mcp", "vendor");
21049
+ async function loadPuppeteer() {
21050
+ try {
21051
+ const mod2 = await import("puppeteer-core");
21052
+ if (mod2.default) return mod2.default;
21053
+ return mod2;
21054
+ } catch (e) {
21055
+ const code = e?.code;
21056
+ const msg = e?.message ?? "";
21057
+ const isMissing = code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND" || msg.includes("Cannot find package");
21058
+ if (!isMissing) throw e;
21059
+ }
21060
+ mkdirSync(PUPPETEER_VENDOR_DIR, { recursive: true });
21061
+ const vendorPkg = join(PUPPETEER_VENDOR_DIR, "package.json");
21062
+ if (!existsSync(vendorPkg)) {
21063
+ writeFileSync(
21064
+ vendorPkg,
21065
+ JSON.stringify({ name: "honeybook-mcp-puppeteer-host", private: true, version: "0.0.0" }, null, 2)
21066
+ );
21067
+ }
21068
+ const marker = join(PUPPETEER_VENDOR_DIR, "node_modules", "puppeteer-core", "package.json");
21069
+ if (!existsSync(marker)) {
21070
+ process.stderr.write("[honeybook-mcp] Installing puppeteer-core (one-time, ~30s)\u2026\n");
21071
+ execSync("npm install --no-fund --no-audit --silent puppeteer-core@^24.0.0", {
21072
+ cwd: PUPPETEER_VENDOR_DIR,
21073
+ stdio: ["ignore", "pipe", "inherit"]
21074
+ });
21075
+ process.stderr.write("[honeybook-mcp] puppeteer-core installed.\n");
21076
+ }
21077
+ const req = createRequire(vendorPkg);
21078
+ const mod = req("puppeteer-core");
21079
+ return mod.default ?? mod;
21080
+ }
21046
21081
  function resolveChromePath() {
21047
21082
  const envPath = process.env.PUPPETEER_EXECUTABLE_PATH;
21048
21083
  if (envPath) return envPath;
@@ -21090,7 +21125,7 @@ var SessionStore = class {
21090
21125
  }
21091
21126
  }
21092
21127
  async activate(magicLinkUrl) {
21093
- const puppeteer = (await import("puppeteer-core")).default;
21128
+ const puppeteer = await loadPuppeteer();
21094
21129
  const showBrowser = !!process.env.HONEYBOOK_SHOW_BROWSER;
21095
21130
  const chromePath = resolveChromePath();
21096
21131
  const browser = await puppeteer.launch({
@@ -21597,7 +21632,7 @@ try {
21597
21632
  }
21598
21633
  var server = new McpServer({
21599
21634
  name: "honeybook-mcp",
21600
- version: "0.1.6"
21635
+ version: "0.1.7"
21601
21636
  });
21602
21637
  registerSessionTools(server);
21603
21638
  registerWorkspaceFileTools(server);
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import { registerContractTools } from './tools/contracts.js';
18
18
  import { registerInvoiceTools } from './tools/invoices.js';
19
19
  const server = new McpServer({
20
20
  name: 'honeybook-mcp',
21
- version: '0.1.6',
21
+ version: '0.1.7',
22
22
  });
23
23
  registerSessionTools(server);
24
24
  registerWorkspaceFileTools(server);
package/dist/sessions.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { existsSync, readFileSync, writeFileSync, mkdirSync, chmodSync } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
3
  import { join, dirname } from 'node:path';
4
+ import { execSync } from 'node:child_process';
5
+ import { createRequire } from 'node:module';
4
6
  // ---------------------------------------------------------------------------
5
7
  // Pure helpers — testable without Puppeteer
6
8
  // ---------------------------------------------------------------------------
@@ -45,6 +47,51 @@ export function deserializeSessions(body) {
45
47
  }
46
48
  }
47
49
  // ---------------------------------------------------------------------------
50
+ // loadPuppeteer — resolve puppeteer-core at runtime, lazy-installing if the
51
+ // MCP was shipped without node_modules alongside dist/bundle.js (e.g. mcpb
52
+ // bundle install). Cached in ~/.honeybook-mcp/vendor so the install only
53
+ // happens on first use.
54
+ // ---------------------------------------------------------------------------
55
+ const PUPPETEER_VENDOR_DIR = join(homedir(), '.honeybook-mcp', 'vendor');
56
+ async function loadPuppeteer() {
57
+ // Fast path: sibling node_modules resolution (git clone + npm install case).
58
+ try {
59
+ const mod = (await import('puppeteer-core'));
60
+ if (mod.default)
61
+ return mod.default;
62
+ return mod;
63
+ }
64
+ catch (e) {
65
+ const code = e?.code;
66
+ const msg = e?.message ?? '';
67
+ const isMissing = code === 'ERR_MODULE_NOT_FOUND' ||
68
+ code === 'MODULE_NOT_FOUND' ||
69
+ msg.includes('Cannot find package');
70
+ if (!isMissing)
71
+ throw e;
72
+ }
73
+ // Slow path: install into ~/.honeybook-mcp/vendor/node_modules/puppeteer-core
74
+ mkdirSync(PUPPETEER_VENDOR_DIR, { recursive: true });
75
+ const vendorPkg = join(PUPPETEER_VENDOR_DIR, 'package.json');
76
+ if (!existsSync(vendorPkg)) {
77
+ writeFileSync(vendorPkg, JSON.stringify({ name: 'honeybook-mcp-puppeteer-host', private: true, version: '0.0.0' }, null, 2));
78
+ }
79
+ const marker = join(PUPPETEER_VENDOR_DIR, 'node_modules', 'puppeteer-core', 'package.json');
80
+ if (!existsSync(marker)) {
81
+ process.stderr.write('[honeybook-mcp] Installing puppeteer-core (one-time, ~30s)…\n');
82
+ execSync('npm install --no-fund --no-audit --silent puppeteer-core@^24.0.0', {
83
+ cwd: PUPPETEER_VENDOR_DIR,
84
+ stdio: ['ignore', 'pipe', 'inherit'],
85
+ });
86
+ process.stderr.write('[honeybook-mcp] puppeteer-core installed.\n');
87
+ }
88
+ // Use createRequire so we resolve puppeteer-core from the vendor dir
89
+ // regardless of where dist/bundle.js lives.
90
+ const req = createRequire(vendorPkg);
91
+ const mod = req('puppeteer-core');
92
+ return mod.default ?? mod;
93
+ }
94
+ // ---------------------------------------------------------------------------
48
95
  // resolveChromePath — copied from scripts/setup-auth.mjs
49
96
  // ---------------------------------------------------------------------------
50
97
  function resolveChromePath() {
@@ -100,7 +147,7 @@ class SessionStore {
100
147
  }
101
148
  }
102
149
  async activate(magicLinkUrl) {
103
- const puppeteer = (await import('puppeteer-core')).default;
150
+ const puppeteer = await loadPuppeteer();
104
151
  const showBrowser = !!process.env.HONEYBOOK_SHOW_BROWSER;
105
152
  const chromePath = resolveChromePath();
106
153
  const browser = await puppeteer.launch({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "honeybook-mcp",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "mcpName": "io.github.chrischall/honeybook-mcp",
5
5
  "description": "HoneyBook client-portal MCP server for Claude",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/chrischall/honeybook-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.6",
9
+ "version": "0.1.7",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "honeybook-mcp",
14
- "version": "0.1.6",
14
+ "version": "0.1.7",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },