From 2e66fca788456390d4783910be8b1d5dacbf4764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elberte=20Pl=C3=ADnio?= Date: Fri, 10 Jul 2026 01:28:22 -0300 Subject: [PATCH 1/2] fix(edge): drop selectWidget from the hosted router catalog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Semantic widget selection has no hosted endpoint yet, so the hosted model must not propose selectWidget — it would charge a routing credit for an action the app can only decline. Instruct the model to treat on-screen selection requests as unclear instead. Bump to 0.7.1. --- packages/auth/package.json | 2 +- packages/billing/package.json | 2 +- packages/brand/package.json | 2 +- packages/edge-shared/package.json | 2 +- packages/edge-shared/src/index.ts | 2 +- packages/edge-shared/test/edge-shared.test.ts | 6 ++++++ packages/flags/package.json | 2 +- packages/sync/package.json | 2 +- packages/tauri-release/package.json | 2 +- 9 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/auth/package.json b/packages/auth/package.json index 5e43495..bdb76e2 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@pickforge/auth", - "version": "0.7.0", + "version": "0.7.1", "description": "UI-free Supabase Auth and entitlements wrapper for Pickforge apps.", "license": "MIT", "repository": { diff --git a/packages/billing/package.json b/packages/billing/package.json index 7151142..6f3a125 100644 --- a/packages/billing/package.json +++ b/packages/billing/package.json @@ -1,6 +1,6 @@ { "name": "@pickforge/billing", - "version": "0.7.0", + "version": "0.7.1", "description": "UI-free Stripe billing and credit-ledger helpers for Pickforge apps.", "license": "MIT", "repository": { diff --git a/packages/brand/package.json b/packages/brand/package.json index 8f2f202..fbe41ef 100644 --- a/packages/brand/package.json +++ b/packages/brand/package.json @@ -1,6 +1,6 @@ { "name": "@pickforge/brand", - "version": "0.7.0", + "version": "0.7.1", "description": "Pickforge CSS tokens, fonts, reset, and primitives.", "license": "MIT", "repository": { diff --git a/packages/edge-shared/package.json b/packages/edge-shared/package.json index ea5df3b..e48993a 100644 --- a/packages/edge-shared/package.json +++ b/packages/edge-shared/package.json @@ -1,6 +1,6 @@ { "name": "@pickforge/edge-shared", - "version": "0.7.0", + "version": "0.7.1", "description": "Deno-compatible shared helpers for Pickforge Edge Functions.", "license": "MIT", "repository": { diff --git a/packages/edge-shared/src/index.ts b/packages/edge-shared/src/index.ts index 3fb7814..d4ea969 100644 --- a/packages/edge-shared/src/index.ts +++ b/packages/edge-shared/src/index.ts @@ -329,7 +329,7 @@ export const operatorRouterSystemPrompt = [ "- hotRestart: {\"action\":\"hotRestart\"}.", "- enterSelectMode: {\"action\":\"enterSelectMode\"}.", "- takeScreenshot: {\"action\":\"takeScreenshot\"}.", - "- selectWidget: {\"action\":\"selectWidget\",\"description\":string}.", + "Semantic widget selection is not available over hosted routing; treat any request to select or click an on-screen element as unclear.", "The router only proposes; local code handles ids, provenance, approval, cost, audit, and execution.", "Confidence is 0..1 and advisory. Use projectRef only as an opaque natural-language hint.", "If the command cannot map safely to one action, return {\"unclear\":true,\"reason\":\"short reason\"}.", diff --git a/packages/edge-shared/test/edge-shared.test.ts b/packages/edge-shared/test/edge-shared.test.ts index 194c7ab..e8c1243 100644 --- a/packages/edge-shared/test/edge-shared.test.ts +++ b/packages/edge-shared/test/edge-shared.test.ts @@ -10,6 +10,7 @@ import { getUserFromRequest, jsonResponse, newIdempotencyKey, + operatorRouterSystemPrompt, requireEntitlement, type EdgeSharedJson, type SupabaseClientLike, @@ -22,6 +23,11 @@ const USER_ID = "11111111-1111-4111-8111-111111111111"; const OTHER_USER_ID = "22222222-2222-4222-8222-222222222222"; describe("@pickforge/edge-shared", () => { + it("does not offer selectWidget over hosted routing", () => { + expect(operatorRouterSystemPrompt).not.toContain("selectWidget"); + expect(operatorRouterSystemPrompt).toContain("Semantic widget selection is not available over hosted routing"); + }); + it("parses bearer tokens from Authorization headers", () => { expect(getBearerToken(new Request("https://edge.test", { headers: { Authorization: "Bearer jwt_123" } }))).toBe( "jwt_123", diff --git a/packages/flags/package.json b/packages/flags/package.json index 139775b..43b5ff4 100644 --- a/packages/flags/package.json +++ b/packages/flags/package.json @@ -1,6 +1,6 @@ { "name": "@pickforge/flags", - "version": "0.7.0", + "version": "0.7.1", "description": "UI-free feature-flag registry for release gating in Pickforge apps.", "license": "MIT", "repository": { diff --git a/packages/sync/package.json b/packages/sync/package.json index 30cc18f..ddf5480 100644 --- a/packages/sync/package.json +++ b/packages/sync/package.json @@ -1,6 +1,6 @@ { "name": "@pickforge/sync", - "version": "0.7.0", + "version": "0.7.1", "description": "UI-free settings sync helpers for Pickforge apps.", "license": "MIT", "repository": { diff --git a/packages/tauri-release/package.json b/packages/tauri-release/package.json index 4965975..bc92a98 100644 --- a/packages/tauri-release/package.json +++ b/packages/tauri-release/package.json @@ -1,6 +1,6 @@ { "name": "@pickforge/tauri-release", - "version": "0.7.0", + "version": "0.7.1", "description": "Signed Tauri release and updater-feed automation for Pickforge apps.", "license": "MIT", "repository": { From 2a72fc33e3235a0c2599e1b687367deb189c6596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elberte=20Pl=C3=ADnio?= Date: Fri, 10 Jul 2026 01:33:14 -0300 Subject: [PATCH 2/2] fix(edge): pin deployed functions to edge-shared 0.7.1 --- supabase/functions/create-credit-checkout/deno.json | 2 +- supabase/functions/operator-router/deno.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/supabase/functions/create-credit-checkout/deno.json b/supabase/functions/create-credit-checkout/deno.json index 53690b0..11f5f3d 100644 --- a/supabase/functions/create-credit-checkout/deno.json +++ b/supabase/functions/create-credit-checkout/deno.json @@ -3,6 +3,6 @@ "stripe": "npm:stripe@19.1.0", "@supabase/supabase-js": "npm:@supabase/supabase-js@2.110.0", "@pickforge/billing": "npm:@pickforge/billing@0.7.0", - "@pickforge/edge-shared": "npm:@pickforge/edge-shared@0.7.0" + "@pickforge/edge-shared": "npm:@pickforge/edge-shared@0.7.1" } } diff --git a/supabase/functions/operator-router/deno.json b/supabase/functions/operator-router/deno.json index ab61a94..e5bbaf2 100644 --- a/supabase/functions/operator-router/deno.json +++ b/supabase/functions/operator-router/deno.json @@ -2,6 +2,6 @@ "imports": { "@supabase/supabase-js": "npm:@supabase/supabase-js@2.110.0", "@pickforge/billing": "npm:@pickforge/billing@0.7.0", - "@pickforge/edge-shared": "npm:@pickforge/edge-shared@0.7.0" + "@pickforge/edge-shared": "npm:@pickforge/edge-shared@0.7.1" } }