From 7e2ebdd78e2da64370d649577ca5957756669270 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Mon, 5 Jan 2026 17:55:15 +0100 Subject: [PATCH] fix: mark with-deps example as private, update changelog --- package-lock.json | 7 ++++++- packages/coding-agent/CHANGELOG.md | 7 +++++++ packages/coding-agent/examples/extensions/claude-rules.ts | 2 +- .../examples/extensions/with-deps/package.json | 1 + packages/coding-agent/src/core/auth-storage.ts | 7 ++----- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4999c54a..1780b4d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5185,6 +5185,7 @@ "resolved": "https://registry.npmjs.org/lit/-/lit-3.3.2.tgz", "integrity": "sha512-NF9zbsP79l4ao2SNrH3NkfmFgN/hBYSQo90saIVI1o5GpjAdCPVstVzO1MrLOakHoEhYkrtRjPK6Ob521aoYWQ==", "license": "BSD-3-Clause", + "peer": true, "dependencies": { "@lit/reactive-element": "^2.1.0", "lit-element": "^4.2.0", @@ -6385,6 +6386,7 @@ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", "license": "MIT", + "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/dcastil" @@ -6413,7 +6415,8 @@ "version": "4.1.18", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.18.tgz", "integrity": "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/tapable": { "version": "2.3.0", @@ -6599,6 +6602,7 @@ "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "~0.27.0", "get-tsconfig": "^4.7.5" @@ -6678,6 +6682,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.0.tgz", "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index cc493161..7126a1a5 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,8 +2,15 @@ ## [Unreleased] +### Added + +- Extension example: add `claude-rules` to load `.claude/rules/` entries into the system prompt ([#461](https://github.com/badlogic/pi-mono/pull/461) by [@vaayne](https://github.com/vaayne)) + ### Fixed +- OAuth refresh no longer logs users out when multiple pi instances are running ([#466](https://github.com/badlogic/pi-mono/pull/466) by [@Cursivez](https://github.com/Cursivez)) +- Migration warnings now ignore `fd.exe` and `rg.exe` in `tools/` on Windows ([#458](https://github.com/badlogic/pi-mono/pull/458) by [@carlosgtrz](https://github.com/carlosgtrz)) +- CI: add `examples/extensions/with-deps` to workspaces to fix typecheck ([#467](https://github.com/badlogic/pi-mono/pull/467) by [@aliou](https://github.com/aliou)) - SDK: passing `extensions: []` now disables extension discovery as documented ([#465](https://github.com/badlogic/pi-mono/pull/465) by [@aliou](https://github.com/aliou)) ## [0.36.0] - 2026-01-05 diff --git a/packages/coding-agent/examples/extensions/claude-rules.ts b/packages/coding-agent/examples/extensions/claude-rules.ts index 6a940b0a..747e9e7a 100644 --- a/packages/coding-agent/examples/extensions/claude-rules.ts +++ b/packages/coding-agent/examples/extensions/claude-rules.ts @@ -17,9 +17,9 @@ * 3. Add .md files with your rules */ -import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; import * as fs from "node:fs"; import * as path from "node:path"; +import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; /** * Recursively find all .md files in a directory diff --git a/packages/coding-agent/examples/extensions/with-deps/package.json b/packages/coding-agent/examples/extensions/with-deps/package.json index 1edb8245..db981179 100644 --- a/packages/coding-agent/examples/extensions/with-deps/package.json +++ b/packages/coding-agent/examples/extensions/with-deps/package.json @@ -1,5 +1,6 @@ { "name": "pi-extension-with-deps", + "private": true, "version": "1.0.0", "type": "module", "pi": { diff --git a/packages/coding-agent/src/core/auth-storage.ts b/packages/coding-agent/src/core/auth-storage.ts index a9f88c9e..78b1029e 100644 --- a/packages/coding-agent/src/core/auth-storage.ts +++ b/packages/coding-agent/src/core/auth-storage.ts @@ -323,8 +323,7 @@ export class AuthStorage { if (updatedCred?.type === "oauth" && Date.now() < updatedCred.expires) { // Another instance refreshed successfully, use those credentials - const needsProjectId = - provider === "google-gemini-cli" || provider === "google-antigravity"; + const needsProjectId = provider === "google-gemini-cli" || provider === "google-antigravity"; return needsProjectId ? JSON.stringify({ token: updatedCred.access, projectId: updatedCred.projectId }) : updatedCred.access; @@ -341,9 +340,7 @@ export class AuthStorage { } else { // Token not expired, use current access token const needsProjectId = provider === "google-gemini-cli" || provider === "google-antigravity"; - return needsProjectId - ? JSON.stringify({ token: cred.access, projectId: cred.projectId }) - : cred.access; + return needsProjectId ? JSON.stringify({ token: cred.access, projectId: cred.projectId }) : cred.access; } }