Repository navigation
Conversation
shriyatheunicorn
requested changes
Nov 13, 2026
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
shrey150
marked this pull request as draft
November 13, 2026 18:41
shrey150
marked this pull request as ready for review
November 13, 2026 21:26
shriyatheunicorn
requested changes
Nov 14, 2026
shriyatheunicorn
left a comment
Collaborator
There was a problem hiding this comment.
few comments abt failure handling, other lgtm! lmk when rereview and ill stamp
- Send MCP requests through the Poppy SDK SessionFetchClient so a session_ended answer starts one replacement Session and retries once; persist the replacement for later reads. - Read the MCP resource metadata before the blocked checkpoint so a metadata outage no longer forces disconnect; keep the checkpoint around the token exchange itself. - Record 429 (and 503 with Retry-After) per provider origin in a process-wide SDK SharedRateLimitBudget, refuse later requests locally until the pause ends (including the MCP initialize fallback and separate tool calls), and return rate_limited with retryAfterSeconds.
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.
Bell can discover a company's
/.well-known/poppy.json, inspect its MCP tools, and perform explicitly read-only operations using published clients.@datalayer/personal-agent-protocolowns discovery, protocol versions, Session signing, device authorization, resource-bound tokens, refresh, and revocation.Compatibility and setup
The pinned Poppy SDK uses 0.4 by default. Providers serving 0.3 are unsupported; Bell contains no protocol translation or compatibility patches. This integration exposes MCP reads only. OpenAPI execution, writes, purchases, and browser handoff are excluded. Only uniquely named tools with
readOnlyHint: trueand withoutdestructiveHint: trueare exposed. These annotations are provider claims, not verified behavior: use providers trusted with the requested data. Bell does not infer permissions from tool or parameter names.The encrypted file store requires one agent process with durable storage. MCP requests use the SDK session transport: a
session_endedanswer starts one replacement Session, retries once, and Bell keeps the replacement for later reads. A provider429(or503withRetry-After) pauses every Bell request to that provider origin for the requested time (at most one hour, in process memory), across tool calls; reads returnrate_limitedwithretryAfterSeconds. Resource metadata is fetched before the credential-mutation checkpoint, so a metadata outage or rate limit does not force a disconnect. SDK-provided locks serialize each owner/company independently; short file checkpoints reread, merge, and atomically save current state without holding a file-wide lock during provider requests. Setup is in docs/poppy.md; the repeatable production smoke is in docs/provider-tests.md.E2E Test Matrix
--onceflower query completed three tool calls in 12 seconds. Both exited 0 and confirmed session retirement.sites:readapproval. A scripted Cancel produced a persisteddeniedevent, no successful connection or sign-in result, and a normal agent reply. Unauthenticated session creation returned HTTP 401.sites:readpassed through Bell's SDK-backed client: API inspection, two successfullist_sitesreads, and SDK disconnect. Both reads returned an empty list.session_endedrecovery persisted across two later reads, a resource-metadata 503 that leaves the account connected, and a429 Retry-After: 60that stops the MCPinitializefallback and later tool calls until the pause ends.pnpm audit --prodreports zero known vulnerabilities after a scoped override updates Reactor’s transitive TOON package to 2.3.1. Thirty-two temporary compatibility/security checks passed against TOON and the installed Reactor formatter/runner.main:pnpm testwith PostgreSQL 529 passed, 34 opt-in tests skipped; typecheck, lint, and production build passed. CI and both Socket checks passed on e2ff090.The repeatable production demo is documented in provider tests. Authenticated model conversations and live iMessage delivery remain separate verification steps.
Code flow
Before this PR, all channels reach the existing Eve agent and its browser/integration tools:
flowchart LR Message["Web/API or iMessage via Linq"] --> Eve["Eve conversation and model"] Eve --> Existing["Existing browser and integration tools"] Existing --> Results["Tool results"] Results --> Eve Eve --> Reply["Reply in the same conversation"]The PR adds a Poppy tool path alongside those existing tools. Green nodes are new Bell code; blue nodes are published packages.
flowchart TD Message["Existing message entrypoints"] --> Eve["Same Eve conversation and model"] Eve --> Existing["Existing browser and integration tools"] Existing --> Eve Eve --> Tools["New Poppy tools: owner identity and account approvals"] Tools --> App["client.ts: account orchestration"] App <--> Store["store.ts: encrypted owner/company state"] App --> SDK["Poppy SDK: discovery, signing and account authorization"] SDK --> Catalog["Official MCP client: fetch tool catalog"] Catalog --> Policy["apis.ts: provider read-only hints and known-credential input check"] Policy --> MCP["Official MCP client: schema validation and tool call"] MCP --> Provider["Company API"] Provider --> Output["apis.ts: filter known credential echoes and limit output"] Output --> Eve Eve --> Reply["Reply in the same conversation"] classDef added fill:#e6f4ea,stroke:#137333,color:#123 classDef package fill:#e8f0fe,stroke:#1967d2,color:#123 class Tools,App,Store,Policy,Output added class SDK,Catalog,MCP packageAccount connection additionally pauses for Bell approval and the provider’s human consent flow. Public agent metadata/JWKS routes let providers verify Bell’s signing identity. The diagram shows logical control/data flow; the SDKs own their HTTP requests and responses.