Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/billing/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/brand/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/edge-shared/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/edge-shared/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the deployed router import map

When the Supabase operator-router function is deployed, supabase/functions/operator-router/index.ts imports @pickforge/edge-shared through supabase/functions/operator-router/deno.json, which is still pinned to npm:@pickforge/[email protected] on line 5. Because this commit only changes the package source/version, the hosted router will continue loading the old 0.7.0 prompt that still advertises selectWidget, so click/select requests keep producing the action this change is trying to suppress after a normal deploy. Please bump the function import map to 0.7.1 (or otherwise make the function consume this local package update).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — both operator-router and create-credit-checkout deno.json now pin @pickforge/[email protected]; I'll redeploy operator-router after 0.7.1 publishes so the catalog trim takes effect live.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid charging unsupported widget-selection routes

For commands like "click the login button", this new instruction makes the hosted model return an unclear proposal, but createOperatorRouterHandler still debits after every successful completion before returning the proposal. Because that path is still a 200 response with stored metadata, users still spend the routing credit for the unsupported widget-selection request; this only stops the selectWidget action from being proposed, not the hosted-charge problem the change is meant to avoid.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional — hosted routing is metered per model call, so an 'unclear' result is still a real model invocation and is billed like any other route. The app now shows this honestly ('routed · 1¢ · unclear'), and the ladder tries deterministic + BYO first (both free) before hosted ever runs. Making widget-ish commands free isn't feasible (the app can't classify a command as widget-selection before the model runs) and would open a free-routing loophole (any command could be phrased to return 'unclear'). #27's scope was to stop the model proposing an action the app can't fulfill (the charge-then-fail bug), which it does; charging for the model call itself is the correct billing model.

"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\"}.",
Expand Down
6 changes: 6 additions & 0 deletions packages/edge-shared/test/edge-shared.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
getUserFromRequest,
jsonResponse,
newIdempotencyKey,
operatorRouterSystemPrompt,
requireEntitlement,
type EdgeSharedJson,
type SupabaseClientLike,
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/flags/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/sync/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tauri-release/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion supabase/functions/create-credit-checkout/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"stripe": "npm:[email protected]",
"@supabase/supabase-js": "npm:@supabase/[email protected]",
"@pickforge/billing": "npm:@pickforge/[email protected]",
"@pickforge/edge-shared": "npm:@pickforge/[email protected].0"
"@pickforge/edge-shared": "npm:@pickforge/[email protected].1"
}
}
2 changes: 1 addition & 1 deletion supabase/functions/operator-router/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"imports": {
"@supabase/supabase-js": "npm:@supabase/[email protected]",
"@pickforge/billing": "npm:@pickforge/[email protected]",
"@pickforge/edge-shared": "npm:@pickforge/[email protected].0"
"@pickforge/edge-shared": "npm:@pickforge/[email protected].1"
}
}