Skip to content

Publish branded single-agent PWAs with private customer chats - #2191

Merged
asim merged 3 commits into
mainfrom
codex/agent-pwa
Nov 26, 2026
Merged

asim merged 3 commits into
mainfrom
codex/agent-pwa

Conversation

@asim

@asim asim commented Nov 26, 2026

Copy link
Copy Markdown
Member

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 ./... and go vet -buildvcs=false ./... passed.
  • Focused agent, payment, app, docs and proto tests passed, including real HTTP model round trips, private history isolation, paid thread recovery, receipt ownership, CSRF and icon validation.
  • Race tests for the new app/payment cases passed; JavaScript syntax and gofmt checks passed.
  • go test -buildvcs=false ./... -short passed except the existing browser-process test: the installed Chromium launcher points to a missing binary.
  • Added TestAgentAppBrowser for 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T10:40:42.322387Z ef4444c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread internal/app/html/mu.js
Comment on lines +2410 to +2412
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;}});

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 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 👍 / 👎.

@asim
asim merged commit 65029d1 into main Nov 26, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant