feat(embed): add the browser client (client + kit) - #13
Merged
Conversation
mattj-monad
requested review from
Credgate,
alastaird-monad,
andrewc-monad,
brenth-monad,
mon-aneesh and
saikapuluru99
as code owners
July 30, 2026 19:52
Adds the two remaining @monad-inc/embed entrypoints, typed to the /embed contract (connect is already on main): - src/client — the 9-route browser client (createEmbedClient) host front-ends call: catalog, connectors, session, pipeline build/status/state/remove. - src/kit — the backend-only Monad client (session, catalog, pipeline, teams) hosts/routers use server-side. Wires the ./client and ./kit subpath exports and the tsup/tsconfig build, and finalizes the shared eslint config in one place (ignore .venv, grant node globals to .mjs/.cjs scripts, allow _-prefixed unused args) so downstream router/conformance layers don't re-touch it. 19 unit tests, green against mocks. Layer 2 (PRO-401) of the staged rollout; stacked on the contract (PRO-400). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
mattj-monad
force-pushed
the
feature/pro-400
branch
from
July 30, 2026 22:50
95224b4 to
19f3cfb
Compare
mattj-monad
force-pushed
the
feature/pro-401
branch
from
July 30, 2026 22:50
fbb2e38 to
2cd9b48
Compare
Contributor
Author
|
Force-pushed a review fix. The browser client's success path now surfaces a non-JSON 2xx — e.g. an expired-host-session HTML login page served with status 200 — as a branded |
andrewc-monad
approved these changes
Jul 31, 2026
andrewc-monad
left a comment
Collaborator
There was a problem hiding this comment.
Code looks good. There's 1 or 2 things I'd suggest to change but they'd be more over-reaching and might affect other PRs above this one in the stack, so they can be pushed to later.
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.
Layer 2 of the Monad Embed SDK staged rollout (PRO-401). Stacked on #12 (PRO-400) — review/merge that first; this PR targets
feature/pro-400.What this adds
The two remaining
@monad-inc/embedentrypoints (connectis already onmain):src/client— the 9-route browser client (createEmbedClient) host front-ends call: catalog, connectors, session, and pipeline build/status/state/remove.src/kit— the backend-only Monad client (session, catalog, pipeline, teams) hosts/routers use server-side.Plus the
./clientand./kitsubpath exports and the tsup/tsconfig build wiring.Shared eslint config finalized here
This is the first layer with lintable SDK source, so I brought the shared
eslint.config.jsto its final form in one place: ignore**/.venv/**(Python harness assets), grant node globals to.mjs/.cjsscripts, and allow_-prefixed unused args. Downstream router/conformance layers won't need to touch it.Verification (local)
tsc --noEmitclean;vitest19/19 green (client 12, kit 7)no-explicit-anywarnings — Monad API responses are deliberately untyped JSON)prettier --checkclean;tsupbuild succeeds for connect/client/kitStack
400 (contract) → 401 (client) → 402 (TS router + conformance) → 403 (Go) → 404 (Python) → 405 (docs/CI).
🤖 Generated with Claude Code
https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n