Skip to content

feat(api): publish the typed remote client - #1912

Open
m-mohamed wants to merge 3 commits into
UsefulSoftwareCo:mainfrom
manifest-platform:codex/public-executor-api-client-20260831
Open

feat(api): publish the typed remote client#1912
m-mohamed wants to merge 3 commits into
UsefulSoftwareCo:mainfrom
manifest-platform:codex/public-executor-api-client-20260831

Conversation

@m-mohamed

Copy link
Copy Markdown

Makes the existing generic Executor remote client consumable as the public @executor-js/api/client package.\n\nThe public package exposes only the client entrypoint, depends only on the published SDK plus Effect peer compatibility, and bundles the shared runtime schemas needed to work with the currently published SDK. It does not expose or depend on host-mcp, execution, server routes, or any hosted-product handoff.\n\nRelease safety includes Changesets validation, package-boundary tests, the repository packed-package batch smoke, and a separate no-override clean-consumer smoke that installs only the API tarball while resolving the SDK from npm.\n\nValidated with 120 API tests, API typecheck, repository typecheck, lint, format, release workflow tests, changeset status, release:check, and both package smoke paths.

@devin-ai-integration

Copy link
Copy Markdown

Verdict: needs a decision from Rhys — mechanics check out; whether @executor-js/api becomes a public npm package (and with this shape) is a product/release call, not something I can settle in triage. Open 2 days, no linked issue, rebases cleanly onto current main (b5271a6).

What I ran on the branch (all green): bun run lint, bun run format:check, bun run typecheck (45/45), bun run --filter @executor-js/api test (120 passed, incl. the 2 new tests in packages/core/api/src/client.test.ts), bun run --filter @executor-js/api build, bun run scripts/smoke-test-packed.ts (batch smoke + the new clean-consumer smoke resolved @executor-js/sdk@1.6.7 from npm and type-checked the client), docker build --target prod-deps of apps/host-selfhost/Dockerfile, and bun run release:check. bun.lock diff is only the manifest re-shape, no installer churn.

Things Rhys should weigh before merging (none are bugs in the code as written):

  1. Bundled copy of @executor-js/sdk/shared (packages/core/api/tsup.config.ts noExternal). dist/client.js (67 KB) inlines ToolNotFoundError, HealthStatus, ElicitationMeta, ArtifactId, … and even UrlRedactingOtlpSerialization/effect/unstable/observability/OtlpSerialization. The SDK already publishes ./shared, so the stated reason ("work with the currently published SDK") is a version-skew workaround: consumers who also import from @executor-js/sdk get two distinct class identities for the same schemas/errors (instanceof/Schema.is on SDK-exported classes won't match values decoded by this client). Simpler option that matches how the other public packages do it: externalize @executor-js/sdk/shared and let the SDK dep carry it, publishing api in lockstep.

  2. Runtime deps declared as devDependencies (packages/core/api/package.json). ./server still imports @executor-js/execution and @executor-js/host-mcp at runtime for apps/host-selfhost, apps/cloud, apps/cli; they were moved to devDependencies purely to keep the published manifest clean. scripts/publish-packages.ts already strips non-publishable @executor-js/* deps (host-mcp) at pack time, so only execution would have leaked. Consequence of the workaround is Add Cloudflare Workers sandbox runtime for isolated code execution #3.

  3. Self-host Dockerfile drops --production (apps/host-selfhost/Dockerfile prod-deps stage) and adds --filter @executor-js/api, because with Add organization billing model and members/billing console flows #2 the api workspace package's server-side collaborators are now dev-only. Build passes, but the prod-deps stage now installs devDependencies for both filtered workspaces; package-runtime.ts walks the runtime closure so the shipped image should be unaffected — I did not diff the resulting .selfhost-runtime against main.

  4. Side effect on plugin packages: now that @executor-js/api is in PUBLIC_PACKAGE_DIRS, applyWorkspaceVersions will encode @executor-js/api@1.4.70 as an (optional) peer in the published plugin-openapi/mcp/graphql/toolkits/onepassword manifests instead of stripping it. Harmless once api exists on npm, but the published api only exports ./client, while those plugins' src/api/* reference server-side subpaths — worth confirming that's the intended contract.

  5. Version: packages/core/api is at 1.4.70 while the rest of the public set is at 1.6.7; the changeset is patch. First publish will land as 1.4.71 unless bumped.

Nothing pushed to the branch — the contributor's approach is internally consistent, and changing #1/#2 is a design choice rather than a fixup.

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