Repository navigation
Publish branded single-agent PWAs with private customer chats - #2191
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef4444cd77
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const s=await request('checkout',{reference});showSession(s); | ||
| if(s.status==='pending')location.assign(s.checkout_url);else if(s.status==='expired'){report('This checkout expired. Press Book again for a new session.');} | ||
| }catch(e){report(e.message);}finally{book.disabled=false;}}); |
There was a problem hiding this comment.
Reset the booking reference when checkout has expired
When a stored checkout expires, internal/pay/pay.go returns an error instead of a session with status: "expired". Consequently, this request throws before reaching showSession, the only place that clears the saved booking reference, and every subsequent booking attempt reuses the expired reference. This is especially problematic if the initial checkout response was lost: no session ID was saved, so the customer cannot recover through Check payment or a reload. Handle confirmed checkout expiration by clearing the reference and allowing a fresh booking, while preserving it for transient failures.
Useful? React with 👍 / 👎.
Creators can now give customers a dedicated installable app for one agent. Edit agent → Configure app lets the creator upload an icon, set the app name and description, choose free or paid customer access, and publish a shareable
/agent/NAME/app/link. Public profiles link to the app and paid booking flow.Each app has its own manifest identity, start URL, scope and service worker. Mu keeps its existing root identity. The shared browser client includes install guidance, customer conversation history, an offline notice and Mu Pay booking/check/start controls, with no background account or payment polling. Authentication and account management continue to use Mu; apps on the same origin share its sign-in.
Customer access is enforced on the server. Conversations belong to the signed-in customer; published execution uses the selected agent's instructions and API model with public tools and no creator/customer account credentials or private context. Usage is charged to the creator. Paid purchases are durably bound to the authenticated customer before Stripe checkout; forged receipts, cross-customer access, missing sessions and expired sessions are rejected. Existing external Mu Pay integrations retain their flow. Shared app configuration and prompt contracts are proto-defined.
Validation:
go build -buildvcs=false ./...andgo vet -buildvcs=false ./...passed.go test -buildvcs=false ./... -shortpassed except the existing browser-process test: the installed Chromium launcher points to a missing binary.TestAgentAppBrowserfor desktop/mobile layout and the actual shared-script chat flow. Downloaded Chrome also fails to launch here because the workspace denies its socket. Browser screenshots and Android installation/coexistence with Mu remain required before merge.See
/help/agent-apps(docs/AGENT_APPS.md) for setup, payment behaviour and limitations. This provides PWAs, not separately packaged Android APKs or custom domains.