Skip to content

feat(clients): bring TypeScript, Python, and local MCP to 0.1.4 parity (ticket 83) - #344

Merged
scrimshawlife-ctrl merged 1 commit into
mainfrom
feat/83-clients-0.1.4-parity
Nov 28, 2026
Merged

scrimshawlife-ctrl merged 1 commit into
mainfrom
feat/83-clients-0.1.4-parity

Conversation

@scrimshawlife-ctrl

Copy link
Copy Markdown
Contributor

Summary

Bring @zero-state/jchain (clients/typescript), zero-state-jchain (clients/python), and @zero-state/jchain-mcp (clients/mcp) to 0.1.4 parity with all shipped /v1 routes while keeping CLIENTS_HOSTED_VERSION = "0.1.3" until clients-v0.1.4 is tagged (ticket 83).

 clients/typescript (0.1.4)
+  registerAgent() + User-Agent on connectAgent()
+  requestClaimLink(), startVerifyX(), confirmVerifyX(), getVerifyX()
+  convertUpload(), discover(), exploreRemixes(), handle support on getAgent()/listAgentPosts()
+  9-prefix SECRET regex in detect.ts

 clients/python (0.1.4)
+  register_agent(), request_claim_link(), start_verify_x(), confirm_verify_x(), get_verify_x()
+  check_updates(), acknowledge_update(), posts_to_react(), responses(include_remixes=True)
+  convert_upload(), discover(), explore_remixes(), prepare_x_share()
+  9-prefix _SECRET_TEXT / _SECRET regex in content.py & detect.py

 clients/mcp (0.1.4) + src/clients-release.ts
+  9 parity tools (check_updates, acknowledge_update, posts_to_react, discover_chains, explore_remixes, prepare_x_share, verify_x_*)
+  fix cursor regex to accept dotted react1.* cursors + preserve agent_models on leaderboard + 9-prefix redact()
+  CLIENTS_VERSION = "0.1.4" (CLIENTS_HOSTED_VERSION stays "0.1.3")

Evidence

  • Before:
    clients/mcp cursor regex     -> rejected dotted react1.* cursors; leaderboard stripped agent_models; 15 tools vs 27 hosted
    clients/typescript & python  -> missing register, claim-link, verify-x, uploads/convert, discover, remixes; 2-prefix secret check
    
    After:
    clients/typescript (vitest + tsc + pack) -> 79/79 passed
    clients/mcp (vitest + tsc + pack)        -> 41/41 passed (24 stdio tools)
    clients/python (pytest + mypy --strict)  -> all passed
    

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 clean clients-v0.1.4 tag without changing Worker /v1 behavior or /clients downloads.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 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-28T12:01:06.200036Z 8182984 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: 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"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment on lines +443 to +446
export type VerifyXStatus = WithRequestId & {
verified: boolean;
verified_x: VerifiedXBadge | null;
};

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

Comment on lines +490 to +494
export type RemixExploration = WithRequestId & {
post: Record<string, unknown>;
sources: Array<Record<string, unknown>>;
remixes: Array<Record<string, unknown>>;
next_cursor: string | null;

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

Comment on lines +477 to +481
thumbnail_url: string | null;
created_at: string;
contributing_operators: number;
direct_remixes: number;
score: number;

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

@scrimshawlife-ctrl
scrimshawlife-ctrl merged commit 3ea23dd into main Nov 28, 2026
11 checks passed
@scrimshawlife-ctrl
scrimshawlife-ctrl deleted the feat/83-clients-0.1.4-parity branch November 28, 2026 12:07
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