From 9a9b1cacfed364513fc29d85ab1f0176ae7c52bf Mon Sep 17 00:00:00 2001 From: Hanzo AI Date: Fri, 24 Jul 2026 17:16:42 -0700 Subject: [PATCH] =?UTF-8?q?fix(build):=20resolve=20@hanzo/ai=20+=20@hanzo/?= =?UTF-8?q?usage=20from=20npm,=20not=20sibling=20paths=20=E2=86=92=201.9.3?= =?UTF-8?q?4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The @hanzo/usage sibling-path alias pointed at /…/usage that doesn't exist on CI, breaking every release build. Both are now published deps resolved from node_modules — CI build works. Bump 1.9.33→1.9.34 (1.9.33 store build failed here). --- packages/browser/package.json | 3 ++- packages/browser/src/build.js | 11 +++-------- packages/browser/src/manifest-firefox.json | 2 +- packages/browser/src/manifest.json | 2 +- pnpm-lock.yaml | 21 +++++++++++++++++++++ 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/browser/package.json b/packages/browser/package.json index 5303bb2..dae8749 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -1,6 +1,6 @@ { "name": "@hanzo/browser-extension", - "version": "1.9.33", + "version": "1.9.34", "description": "Hanzo AI Browser Extension", "main": "dist/background.js", "scripts": { @@ -13,6 +13,7 @@ }, "dependencies": { "@hanzo/ai": "^0.2.3", + "@hanzo/usage": "^0.1.6", "@supabase/supabase-js": "^2.50.3", "axios": "^1.10.0", "chalk": "^4.1.2", diff --git a/packages/browser/src/build.js b/packages/browser/src/build.js index 1863b70..4953a4d 100644 --- a/packages/browser/src/build.js +++ b/packages/browser/src/build.js @@ -27,12 +27,9 @@ async function build() { console.log('Using @hanzo/gui local primitives shim:', hanzoGuiShim); // The Usage panel runs the headless @hanzo/usage engine in the background - // context. The package lives in the sibling repo (hanzoai/usage); alias its - // built ESM entry so esbuild bundles it into the background scripts. Same - // pattern as the @hanzo/gui shim above — one specifier, one source of truth. - const hanzoUsage = path.join(__dirname, '..', '..', '..', '..', 'usage', 'packages', 'core', 'dist', 'index.js'); - const backgroundAliases = { '@hanzo/usage': hanzoUsage }; - console.log('Using @hanzo/usage engine:', hanzoUsage); + // context. It's a published npm dependency (^0.1.6) — esbuild resolves it + // from node_modules like any package, so the build works identically locally + // and on CI (no sibling-repo path assumption). // The answer engine (new-tab landing) consumes the @hanzo/ai SDK's `search` // primitive — the ONE place the search/deep-research capability is defined. @@ -64,7 +61,6 @@ async function build() { target: ['chrome90', 'safari14'], format: 'esm', external: ['chrome', 'browser'], - alias: backgroundAliases }); // Build Firefox-specific background script (no ESM export, uses browser.* APIs) @@ -76,7 +72,6 @@ async function build() { target: ['firefox91'], format: 'iife', // Immediately-invoked function expression (no exports) external: ['browser'], - alias: backgroundAliases }); // Build WebGPU AI module diff --git a/packages/browser/src/manifest-firefox.json b/packages/browser/src/manifest-firefox.json index 6e91974..296a7e9 100644 --- a/packages/browser/src/manifest-firefox.json +++ b/packages/browser/src/manifest-firefox.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Hanzo AI", - "version": "1.9.33", + "version": "1.9.34", "description": "AI answer engine, search, and dev assistant — Hanzo AI in a new tab, address-bar search, source-cited answers, realtime news, WebGPU AI, and MCP.", "permissions": [ "activeTab", diff --git a/packages/browser/src/manifest.json b/packages/browser/src/manifest.json index aef41b1..43d6fc6 100644 --- a/packages/browser/src/manifest.json +++ b/packages/browser/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Hanzo AI", - "version": "1.9.33", + "version": "1.9.34", "description": "AI answer engine, search, and dev assistant — Hanzo AI in a new tab, address-bar search, source-cited answers, realtime news, WebGPU AI, and MCP.", "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxfXGh0lPUT5m04GKfjUwrLsV6pLaK3VcZuFRPogqAir2tzyLYnQPRtHynue9yvDyguIVnlkwvcwfDOYZrvH76zbw4s6onPBG8HqTKO6LQ9K3kdO1qBBkMMjdOgULQ1MrWThEbpU7NSTiwLYpEta/jAvrKRCAeKIlQE8p6htZmPy9aRUZuae66JgLcAlzD2vviX9sVB1asFABJVswL1RgZ55/8IzZaUrFjzOo9OHK4hmEOtudzkML+5silsAYdC+1BZugph2x94ai17YmZTCL1XyUa5Ke4q80cj+i9rOTgzhZs+mruyhL/AvNVOXilsgqCdNqSz77naWzC3pVGbxOewIDAQAB", "permissions": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f5b623..871e0ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -150,6 +150,9 @@ importers: '@hanzo/ai': specifier: ^0.2.3 version: 0.2.3 + '@hanzo/usage': + specifier: ^0.1.6 + version: 0.1.6(react@18.3.1) '@supabase/supabase-js': specifier: ^2.50.3 version: 2.50.3 @@ -2892,6 +2895,20 @@ packages: react: optional: true + '@hanzo/usage@0.1.6': + resolution: {integrity: sha512-0gr4ZJ5qTH1hRt706uMciAevFPXG/08Xd5zbyZBlAi1o4k4EdKHTqLm/pRnbhv6jZbWTIOUtRQSysGyeJfOQMQ==} + peerDependencies: + '@hanzo/gui': '>=7.2.2' + '@hanzogui/lucide-icons-2': '>=7.2.2' + react: '>=18' + peerDependenciesMeta: + '@hanzo/gui': + optional: true + '@hanzogui/lucide-icons-2': + optional: true + react: + optional: true + '@hono/node-server@1.19.14': resolution: {integrity: sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==} engines: {node: '>=18.14.1'} @@ -13450,6 +13467,10 @@ snapshots: optionalDependencies: react: 19.2.7 + '@hanzo/usage@0.1.6(react@18.3.1)': + optionalDependencies: + react: 18.3.1 + '@hono/node-server@1.19.14(hono@4.12.27)': dependencies: hono: 4.12.27