From b70ea94b797372e47fe10f5f4a41cefacaac12de Mon Sep 17 00:00:00 2001 From: isihussain <35667459+isihussain@users.noreply.github.com> Date: Fri, 13 Nov 2026 13:50:31 +0300 Subject: [PATCH] fix(headshot): add Tools/package.json for @google/genai dependency (#2781) Headshot skill was missing Tools/package.json, so @google/genai was never installed and bun check crashed with 'Cannot find module @google/genai'. Add package.json with @google/genai dependency and trustedDependencies, and update Setup.md with bun install instruction. Closes #2781 Signed-off-by: isihussain --- LifeOS/install/skills/Headshot/Setup.md | 4 +++- .../skills/Headshot/Tools/package.json | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 LifeOS/install/skills/Headshot/Tools/package.json diff --git a/LifeOS/install/skills/Headshot/Setup.md b/LifeOS/install/skills/Headshot/Setup.md index efceac2da6..775829da07 100644 --- a/LifeOS/install/skills/Headshot/Setup.md +++ b/LifeOS/install/skills/Headshot/Setup.md @@ -38,13 +38,15 @@ Generated headshots are written to `LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Headshot/g - A Google AI Studio account. Create an API key at https://aistudio.google.com/apikey and make sure the project can use the Gemini image model (billing may be required). - Env key `GOOGLE_API_KEY` in `~/.claude/.env`, set to that key. +- Tool dependencies: run `bun install` in `~/.claude/skills/Headshot/Tools` (installs `@google/genai`). - Optional: ImageMagick (`magick`) for the pick-sheet montage. ## Prove it works ```bash +cd ~/.claude/skills/Headshot/Tools && bun install bun ~/.claude/skills/Headshot/Tools/Headshot.ts check bun ~/.claude/skills/Headshot/Tools/Headshot.ts references --sentiment neutral ``` -The first prints `OK: reference photo(s) in ; GOOGLE_API_KEY set; ...` and exits 0. If `Config.md` is missing, lists no photos, none of the listed files exist, or the key is unset, it exits 1 and says which, pointing at this guide. The second prints a JSON list with the photo's `path` and `"exists": true`; it exits 1 when no existing photo carries that sentiment. To see a real result, ask the assistant for a headshot: it saves a PNG under `generated-headshots/` and, once the ArtDirection critique passes, delivers a copy to `~/Downloads/` through `Deliver.ts`. +The first prints `OK: reference photo(s) in ; GOOGLE_API_KEY set; ...` and exits 0. If `Config.md` is missing, lists no photos, none of the listed files exist, or the key is unset, it exits 1 and says which, pointing at this guide. The second prints a JSON list with the photo's `path` and `"exists": true`; it exits 1 when no existing photo carries that sentiment. To see a real result, ask the assistant for a headshot: it saves a PNG under `generated-headshots/` and, once the ArtDirection critique passes, delivers a copy to `~/Downloads/` through `Deliver.ts`. \ No newline at end of file diff --git a/LifeOS/install/skills/Headshot/Tools/package.json b/LifeOS/install/skills/Headshot/Tools/package.json new file mode 100644 index 0000000000..e3f2f02dfe --- /dev/null +++ b/LifeOS/install/skills/Headshot/Tools/package.json @@ -0,0 +1,20 @@ +{ + "name": "headshot-tools", + "private": true, + "type": "module", + "description": "Headshot generation CLI tools. Requires @google/genai. node_modules is gitignored.", + "scripts": { + "typecheck": "bunx tsc --noEmit" + }, + "dependencies": { + "@google/genai": "^1.40.0" + }, + "devDependencies": { + "@types/bun": "^1.3.6", + "typescript": "^5.9.0" + }, + "trustedDependencies": [ + "@google/genai", + "protobufjs" + ] +} \ No newline at end of file