Add OpenID agent prompt dock, session mint, and Google sign-in - #5
Draft
Hewlbern wants to merge 2 commits into
Draft
Add OpenID agent prompt dock, session mint, and Google sign-in#5Hewlbern wants to merge 2 commits into
Hewlbern wants to merge 2 commits into
Conversation
Mirror megabot’s prompt+session pattern for Solid/OpenID: public GET /llms.txt and /api/agent/prompt, signed-in POST /api/agent/session that remints a short-lived spark-mcp Bearer, and a /app copy dock so Codex/Cursor traces can land in conversations/spark/. Add Continue with Google beside handle login. Vercel runs the OAuth dance; Railway POST /idp/google verifies the ID token and mints the same WebID session. Existing Spark MCP save/list/share paths stay. Co-authored-by: audacity <Hewlbern@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Public GET /api/agent/prompt now returns a DingCAD-style brief with a <TOKEN> placeholder and does not mint. Signed-in POST /api/agent/session issues a ~30m user-scoped JWT when AGENT_JWT_SECRET (or an existing Spark secret) is set, otherwise it embeds the session access token. The yellow PROMPT chip copies that brief; signed-out Copy opens sign-in. Google OAuth lands on /auth/callback. Co-authored-by: audacity <Hewlbern@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors the megabot agent-prompt + Google sign-in shape on askclaw.xyz, adapted for Solid/OpenID (no robot-workshop semantics).
Agent APIs
GET /api/agent/prompt→{ prompt, docs, mint, auth }— DingCAD-style brief withAuthorization: Bearer <TOKEN>. Does not mint. CORS*.POST /api/agent/session— signed-in browser only. Remints a ~30m user-scoped JWT whenAGENT_JWT_SECRET(or an existing Spark/Solid HMAC) is set; otherwise embeds the session access token. Never a service-role key. Clipboard text includes the real Bearer.GET /llms.txt— agent-facing docs (MCP tools, recipe, Google, yellow dock).Auth header for private APIs:
Authorization: Bearer <TOKEN>.Copy dock
Yellow PROMPT chip (megabot
LibraryPromptDock/AgentPromptDockshape) on/,/app, and/dashboard:<TOKEN>.POST /api/agent/sessionand writes the full prompt to the clipboard./appalso keeps the in-page walk-card as a second copy surface.Google OAuth (not Supabase)
Equivalent of megabot
signInWithOAuth({ provider: 'google' })+/auth/callback:GET /api/auth/google(alias/auth/google)GET /auth/callback→ session on/appPOST /idp/google(Railway; existing email accounts need that deploy)Create a new Web client in GCP
dreammachina. Do not edit megabot’s Supabase client.Redirect URIs:
https://askclaw.xyz/auth/callbackhttps://identity-two-plum.vercel.app/auth/callbackhttp://localhost:3000/auth/callbackVercel
identity:GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET, optionalAGENT_JWT_SECRET,OPENID_PUBLIC_URL=https://askclaw.xyz.Agent recipe (Codex / Cursor)
/appand copies the prompt (remints).POST /api/agent/session.Authorization: Bearer <token>on/mcpand/api/spark-conversations.spark_save_conversationwith full transcript +source(codex|cursor|claude|grok|gemini-spark).Existing
spark_*MCP tools and 30-day Spark connect tokens are unchanged. Handle + password login stays.