Repository navigation
Conversation
Signed-off-by: Graham <graham@snappy.io>
|
@snappyio is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Signed-off-by: Graham <graham@snappy.io>
bensabic
left a comment
There was a problem hiding this comment.
Requesting changes
Thanks for the adapter. Its docs and catalog entry closely match the published @wayza/chat-adapter@0.1.0. Three things block merge:
pnpm validatefails.ultracite checkflags a formatting error inpackages/catalog/src/adapters/vendor-official/wayza.ts:27(suggestion inline).- Both commits are unsigned.
3a67521andf0e005fshowverified: false, reason: "unsigned"..github/CONTRIBUTING.mdsays PRs with unsigned commits won't be merged. DCO sign-offs are present and match the author email. Re-sign and force-push, e.g.git rebase --exec 'git commit --amend --no-edit -S -s' main. - The
create-chat-sdkscaffold doesn't work when deployed. It uses memory state and treats everyWAYZA_*var as optional, so each cold start signs up a new Wayza AI. Webhooks also401without a secret and needsubscribe(). See the inline comments onwayza.ts:9andwayza.mdx:20.
The other inline comments are suggestions: claim-link disclosure, subscribe() identity, room delivery under webhooks, feature-matrix accuracy (buttons, select menus, fetchMessages), and page layout. Also, the PR title isn't in Conventional Commits form, which CONTRIBUTING asks for; suggest feat(catalog): add vendor-official Wayza adapter.
What was verified (head f0e005f)
pnpm install --frozen-lockfileandknippass.turbo typecheckpasses 49/49 (run with--concurrency=1).turbo testpasses 58/58, including catalog, create-chat-sdk (with the all-adapter scaffold e2e), and integration-testsdocs-adapters.test.ts.build:validatepasses.ultracite checkfails (item 1).- The npm package exists: Apache-2.0, ESM-only, peer
chat ^4.44.0, no install scripts. Its repository field points atwayza-protocol/wayza-js. The pinned commit53d469bexists, and rebuilding from it reproduces the publisheddist/byte-for-byte. - Every docs code sample typechecks under
tsc --strictagainst the published package andchat@4.44.0. - The credential claim holds:
keyis resolved on every request,webhookSecreton every webhook andsubscribe(), anddeployKeyat sign-up. - Network calls go only to
${home}/wayza/v0/*, with no telemetry and no disk writes. Webhook signatures are verified in constant time before parsing. - Meta.json ordering, the
ADAPTERSentry, the scaffold-spec shape, and the changeset bumps follow existing vendor-official conventions.
Not verified
- CI hasn't run. The fork workflow is
action_required. - The docs site build was not run, due to sandbox memory limits. MDX compiles and the docs typecheck passes.
- Live Wayza behavior. No real accounts were created. Questions for the vendor, from comparing adapter source with Wayza's docs:
room.askedisn't in Wayza's published wake-up list, and ownerless AIs reportedly can't subscribe to more than their own messages. Doessubscribe()throw for a self-signed-up bot?- Ownerless AIs get at most 3 webhooks and 10 new ones a day, and each
subscribe()registers 2. Does a daily renewal count as new? - The adapter checks
event.name === "_gap", but Wayza's docs show{"type":"gap"}. Does gap recovery ever trigger? - Concurrent cold starts sharing state can both sign up, since there's no lock. The identity state key also includes
userName, so renaming the bot creates a new identity.
| "WAYZA_WEBHOOK_SECRET", | ||
| "Standard Webhooks secret (whsec_ followed by 32 random bytes in base64) for signed deliveries." | ||
| ), | ||
| env("WAYZA_HOME", "Override the Wayza home. Defaults to https://wayza.com."), |
There was a problem hiding this comment.
Blocking: pnpm validate fails here. ultracite check wants this call wrapped:
packages/catalog/src/adapters/vendor-official/wayza.ts format
× Formatter would have printed the following content:
27 │ - env("WAYZA_HOME", "Override the Wayza home. Defaults to https://wayza.com."),
| env("WAYZA_HOME", "Override the Wayza home. Defaults to https://wayza.com."), | |
| env( | |
| "WAYZA_HOME", | |
| "Override the Wayza home. Defaults to https://wayza.com." | |
| ), |
| description: | ||
| "Gives a Chat SDK bot its own Wayza address, where people and AIs from any maker (Claude, ChatGPT, Grok, or another Chat SDK bot) can message it, in direct threads and in Wayza rooms. With no key, the bot signs itself up on first start.", | ||
| env: { | ||
| config: ["instance", "name", "cautionInText"], |
There was a problem hiding this comment.
Blocking: the generated scaffold breaks when deployed. With wayza memory, the scaffold emits createWayzaAdapter() + createMemoryState(), and .env.example marks every WAYZA_* var as optional. In @wayza/chat-adapter@0.1.0, me() signs up fresh (GET /agents/challenge → PoW → POST /agents) whenever there's no key and no identity in state. A smoke test with mocked fetch gave a new address on every cold start (ai-1@…, then ai-2@…), each logging a new claim link. Also, handleWebhook returns 401 when WAYZA_WEBHOOK_SECRET is unset, and delivery only starts after subscribe(). Wayza has no dashboard webhook URL, which the scaffold README implies it does.
Net effect: a scaffolded bot deployed to serverless as generated never answers, and every cold start creates an orphaned Wayza AI. At minimum, surface this through notes (it's rendered into .env.example). Consider also moving WAYZA_WEBHOOK_URL/WAYZA_WEBHOOK_SECRET to required, since the scaffold is webhook-only (Gmail does this for its push-verification vars).
| config: ["instance", "name", "cautionInText"], | |
| config: ["instance", "name", "cautionInText"], | |
| notes: | |
| "Set WAYZA_KEY or use a persistent state adapter such as Redis or Postgres. With in-memory state and no key, the bot signs up as a new Wayza AI every time a process or serverless instance starts. Webhooks need WAYZA_WEBHOOK_URL and WAYZA_WEBHOOK_SECRET, and a subscribe() call after deploying, renewed at least every 7 days.", |
|
|
||
| <CreateChatSdk adapters="wayza memory" /> | ||
|
|
||
| The generated app uses the [Memory state adapter](/adapters/official/memory) for local development. To add the adapter to an existing app, start at [Install](#install). |
There was a problem hiding this comment.
Same issue as the catalog comment: the scaffold path never sees the warning under Install (line 26). Please put it where scaffold users will read it. Also, nothing here, in the README, or on wayza.com/docs/chat-sdk says where a user gets a WAYZA_KEY. A self-signed-up key only ever goes into Chat SDK state and is never logged.
| The generated app uses the [Memory state adapter](/adapters/official/memory) for local development. To add the adapter to an existing app, start at [Install](#install). | |
| The generated app uses the [Memory state adapter](/adapters/official/memory) for local development. Memory state doesn't keep the bot's Wayza identity, so without `WAYZA_KEY` the bot signs up as a new Wayza AI every time the process or a serverless instance starts. Before you deploy, set `WAYZA_KEY` or switch to [Redis](/adapters/official/redis) or [PostgreSQL](/adapters/official/postgres). To add the adapter to an existing app, start at [Install](#install). |
|
|
||
| A bot that signs itself up is an AI with no owner. Its name shows as "Concierge (unverified)", it works within daily limits, and people choose whether AIs with no owner may reach them. | ||
|
|
||
| The first log line gives you a claim link. Open it yourself, once, within 7 days, and never share it: whoever opens it first owns the bot. The bot then moves to an address under your name and keeps its conversations. |
There was a problem hiding this comment.
Suggestion: the page says to never share the claim link, but the adapter itself logs it at info (loadIdentity(): "To make this bot yours, open ${id.claim_link} yourself …") and saves it in state next to the key. Anyone with log or log-drain access can claim the bot. Wayza's changelog also says ownerless AIs left unused for 30 days are retired. Please disclose both.
| The first log line gives you a claim link. Open it yourself, once, within 7 days, and never share it: whoever opens it first owns the bot. The bot then moves to an address under your name and keeps its conversations. | |
| The first time it signs up, the adapter logs a claim link at `info` level and keeps it in Chat SDK state with the bot's key. Anyone who can read those logs or that state, including log drains, can claim the bot: whoever opens the link first owns it. Open it yourself, once, within 7 days, or start with a deploy key (below) where logs are shared. The bot then moves to an address under your name and keeps its conversations. A bot with no owner that goes unused for 30 days is retired, and its key stops working. |
| await bot.getAdapter("wayza").subscribe(); | ||
| ``` | ||
|
|
||
| Wayza checks the URL with a signed challenge, then signs every delivery with Standard Webhooks. A subscription lasts 7 days, so call `subscribe()` again on a daily cron. |
There was a problem hiding this comment.
Suggestion: subscribe() calls me() first, so running this snippet as a separate script with memory state and no key signs up and subscribes a different bot. It also ends with await this.poll(), which runs handlers inside the script process.
| Wayza checks the URL with a signed challenge, then signs every delivery with Standard Webhooks. A subscription lasts 7 days, so call `subscribe()` again on a daily cron. | |
| Wayza checks the URL with a signed challenge, then signs every delivery with Standard Webhooks. Run `subscribe()` with the deployed bot's identity: set `WAYZA_KEY`, or share its persistent state. Otherwise the script signs up and subscribes a different bot. `subscribe()` also polls once and runs your handlers for anything already waiting. A subscription lasts 7 days, so call `subscribe()` again on a daily cron. |
| cardFormat: { status: "yes", label: "Markdown" }, | ||
| buttons: { status: "partial", label: "Listed as choices" }, | ||
| linkButtons: "yes", | ||
| selectMenus: { status: "partial", label: "Listed as choices" }, |
There was a problem hiding this comment.
Same as buttons: select menus render as text, with no interaction.
| selectMenus: { status: "partial", label: "Listed as choices" }, | |
| selectMenus: { status: "no", label: "Rendered as a text list" }, |
| ephemeralMessages: "no", | ||
| userLookup: "no", | ||
| customApiEndpoint: { status: "yes", label: "home override" }, | ||
| fetchMessages: "yes", |
There was a problem hiding this comment.
Suggestion: for DMs, fetchMessages reads one inbox page and keeps only messages from that address, so the bot's own replies are missing and there's no cursor. For rooms it pages only forward, and backward ignores cursor. Dial labels similar behavior partial.
| fetchMessages: "yes", | |
| fetchMessages: { | |
| status: "partial", | |
| label: "DMs: latest received only; rooms: latest page or forward", | |
| }, |
| | `WAYZA_WEBHOOK_SECRET` | For webhooks | Standard Webhooks secret (`whsec_` and 32 random bytes in base64). | | ||
| | `WAYZA_HOME` | No | Override the Wayza home. | | ||
|
|
||
| ## Threads |
There was a problem hiding this comment.
Suggestion (layout): .agents/skills/add-adapter/references/page-layout.md asks for ## Thread IDs with the ID format, ## Webhooks instead of "Receiving messages" (line 60), and ## Limitations as its own section (split line 150 into ## Cards and ## Limitations). It also asks for no marketing-style sections, which covers "Make it yours" and "AIs talking to AIs".
| ## Threads | |
| ## Thread IDs | |
| Thread IDs take the form `wayza:dm:{address}` for direct messages and `wayza:room:{roomId}` for rooms, with the address or room ID base64url-encoded, for example `wayza:dm:YWktNWU1NWFiYTJAd2F5emEuY29t`. |
|
|
||
| If you already have a Wayza account, make a deploy key on your AIs page and set `WAYZA_DEPLOY_KEY`. The bot is then vouched for by you from its first start. With `instance` set, it keeps the same address on every redeploy. | ||
|
|
||
| ## Receiving messages |
There was a problem hiding this comment.
Per the page-layout guide:
| ## Receiving messages | |
| ## Webhooks |
| @@ -0,0 +1,164 @@ | |||
| --- | |||
| title: Wayza | |||
| description: Vendor-official Wayza adapter for Chat SDK. Gives your bot its own Wayza address, where people and AIs from any maker can message it, in direct threads and in Wayza rooms. | |||
There was a problem hiding this comment.
Nit: the layout guide asks for vendor-official descriptions to match the catalog description exactly, and these differ. Consider also dropping the third-party AI brand names (Claude, ChatGPT, Grok) here, in the tagline (line 7), and in the catalog description.
|
In addition to the review above, please reply on this PR to confirm the following before we can consider the listing:
|
Summary
Adds
@wayza/chat-adapter, built and maintained by Wayza, as a vendor-official adapter. It gives a Chat SDK bot its own Wayza address, where people and AIs from any maker (Claude, ChatGPT, Grok, or another Chat SDK bot) can message it, in direct threads and in Wayza rooms. With no key, the bot signs itself up on first start.apps/docs/content/adapters/vendor-official/wayza.mdx, registered inmeta.jsonpackages/catalog/src/adapters/vendor-official/wayza.ts, registered inADAPTERScreate-chat-sdkscaffold entry (zero-arg, webhook-compatible)@chat-adapter/catalogandcreate-chat-sdkQualifications:
key,deployKey,webhookSecret) acceptstring | (() => string | Promise<string>)and are resolved on each callTest plan
pnpm validateChecklist
git commit -s)pnpm validatepasses