Repository navigation
feat(clients): bring TypeScript, Python, and local MCP to 0.1.4 parity (ticket 83) - #344
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: 81829849f0
ℹ️ 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".
| state: text(body, "state"), | ||
| credential: typeof body.credential === "string" ? body.credential : null, | ||
| claimUrl: text(body, "claim_url"), | ||
| claimExpiresAt: text(body, "claim_expires_at"), |
There was a problem hiding this comment.
Read the registration expiry from the actual response field
Every successful initial registration and pending-Credential refresh returns expires_at from src/register.ts, not claim_expires_at. Consequently, this required text() lookup throws after the server has already created the registration, so registerAgent() never returns the one-time Credential or claim link. Python's register_agent() has the same failing lookup. Read expires_at in both helpers and correct the mocked responses so they match the Worker.
Useful? React with 👍 / 👎.
| export type VerifyXStatus = WithRequestId & { | ||
| verified: boolean; | ||
| verified_x: VerifiedXBadge | null; | ||
| }; |
There was a problem hiding this comment.
Match the X verification types to the Worker responses
Against the implemented endpoints in src/verify-x.ts, these types promise fields that never arrive: a challenge contains code, not verification_code; status contains top-level verified, x_handle, badge, and verified_at, not verified_x; and confirmation returns status: "verified" rather than a verified boolean. Because the SDK methods only cast the JSON, code following these declarations reads undefined or raises a Python KeyError despite successful verification requests. Align both SDKs' challenge, status, and confirmation types with their respective responses instead of sharing the fabricated status shape.
Useful? React with 👍 / 👎.
| export type RemixExploration = WithRequestId & { | ||
| post: Record<string, unknown>; | ||
| sources: Array<Record<string, unknown>>; | ||
| remixes: Array<Record<string, unknown>>; | ||
| next_cursor: string | null; |
There was a problem hiding this comment.
Expose the actual remix exploration response keys
src/remix-explorer.ts returns { source, ancestry, items, next_cursor }, whereas the new TypeScript and Python RemixExploration declarations expose { post, sources, remixes, next_cursor }. Neither client transforms the response, so consumers accessing the advertised Post or iterating the advertised remixes fail on real responses even though the new mock-based tests pass. Use the actual response keys in both SDKs, or explicitly normalize the payload before returning it.
Useful? React with 👍 / 👎.
| thumbnail_url: string | null; | ||
| created_at: string; | ||
| contributing_operators: number; | ||
| direct_remixes: number; | ||
| score: number; |
There was a problem hiding this comment.
Define discovery items using the shipped discovery projection
For nonempty discovery results, src/chain-discovery.ts supplies contributors, latest_remix_at, explorer_url, asset_id, and license, but this declaration omits them and instead requires nonexistent fields such as contributing_operators, direct_remixes, score, and thumbnail_url. Since discover() returns the JSON unchanged, TypeScript consumers can compile against these required fields and then receive undefined at runtime, while the actual chain links and contributor counts are inaccessible through the declared type. Model the existing discovery projection rather than a different ranking payload.
Useful? React with 👍 / 👎.
Summary
Bring
@zero-state/jchain(clients/typescript),zero-state-jchain(clients/python), and@zero-state/jchain-mcp(clients/mcp) to0.1.4parity with all shipped/v1routes while keepingCLIENTS_HOSTED_VERSION = "0.1.3"untilclients-v0.1.4is tagged (ticket 83).Evidence
Merge Danger
Door: two-way
Additive client SDK methods, local MCP tools, secret-scrubber prefix coverage, and
CLIENTS_VERSION = "0.1.4"manifest bump;CLIENTS_HOSTED_VERSION(0.1.3) and all hosted tarball SHA-256 checksums remain untouched.Blast Radius: Low
Prepares
clients/{typescript,python,mcp}for a cleanclients-v0.1.4tag without changing Worker/v1behavior or/clientsdownloads.