Ship @executor-js/* beta from monorepo with promise wrapper - #142
Merged
Conversation
This was referenced Apr 9, 2026
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 1e30334 | Apr 10 2026, 01:40 AM |
Undoes the earlier core/sdk package split and ships a single
@executor-js/sdk with two subpath entry points, matching the plugin
layout:
- @executor-js/sdk → promise-based wrapper (default import)
- @executor-js/sdk/core → raw Effect-based primitives
Internally the packages stay under `@executor/*` (workspace scope).
scripts/publish-packages.ts rewrites the scope to `@executor-js/*` at
pack time — in both package.json (name, deps, peer deps) and the
compiled dist/ artifacts — and resolves `workspace:*` dep specifiers
to concrete versions before pack. This keeps the diff vs main small,
and `@executor/api` / `@executor/react` (unpublished optional peers)
are left alone so source code and the workspace graph are unchanged.
The promise wrapper (src/promise.ts + src/promise-executor.ts) lives
alongside the Effect sources in packages/core/sdk/src/, so for that
directory the only new files are the two wrappers — no renames vs main.
tsup builds a dual-entry bundle
({ index: src/promise.ts, core: src/index.ts }) and publishConfig
rewrites exports to point at the packed dist/ at publish time.
Also:
- Add scripts/publish-packages.ts. Works around bun pm pack not
substituting publishConfig overrides by rewriting package.json in
place during pack and restoring it after.
- Remove the separate packages/core/core package and the
packages/published/ folder that the earlier stack introduced.
- Bump all 8 publishable packages to 0.0.1-beta.4.
RhysSullivan
force-pushed
the
sdk-consolidation
branch
from
April 9, 2026 23:00
cbd1a79 to
d0b9414
Compare
- add optional tools/sources/secrets/policies to promise ExecutorConfig, adapting user-supplied promise-shaped impls into Effect services - fix onepassword promise entry to export onepasswordPlugin (was types-only) - rewrite plugin READMEs to lead with async/await, demote Effect to a "Using with Effect" aside rather than an "Effect entry point" lead - bump 8 public packages to 0.0.1-beta.5
Rewires dev exports so internal code treats @executor/sdk (and the 7 plugin packages) as normal packages: bare imports resolve to the Effect-based entry, no more /core subpath gymnastics in the source. - @executor/sdk dev exports: `.` -> src/index.ts (Effect), `./promise` -> src/promise.ts. publishConfig unchanged, so the published package still ships `.` as the promise wrapper and `./core` as the raw Effect primitives. - 7 plugin packages follow the same pattern: dev `.` now points at the plugin's Effect entry, `./promise` added, `./core` dropped. publishConfigs unchanged. - Rewrote 82 `@executor/sdk/core` imports and 9 `@executor/plugin-*/core` imports to bare paths across packages, apps, and READMEs. - examples/promise-sdk imports from `/promise` subpaths since dev bare is now Effect. Published consumers still get the promise API at the bare path via the publishConfig swap at pack time. No changes to scripts/publish-packages.ts or tsup configs — the existing publish-time exports override is what flips dev's bare-Effect into published bare-promise.
RhysSullivan
added a commit
that referenced
this pull request
May 31, 2026
* consolidate @executor-js/core + @executor-js/sdk into one package
Undoes the earlier core/sdk package split and ships a single
@executor-js/sdk with two subpath entry points, matching the plugin
layout:
- @executor-js/sdk → promise-based wrapper (default import)
- @executor-js/sdk/core → raw Effect-based primitives
Internally the packages stay under `@executor/*` (workspace scope).
scripts/publish-packages.ts rewrites the scope to `@executor-js/*` at
pack time — in both package.json (name, deps, peer deps) and the
compiled dist/ artifacts — and resolves `workspace:*` dep specifiers
to concrete versions before pack. This keeps the diff vs main small,
and `@executor/api` / `@executor/react` (unpublished optional peers)
are left alone so source code and the workspace graph are unchanged.
The promise wrapper (src/promise.ts + src/promise-executor.ts) lives
alongside the Effect sources in packages/core/sdk/src/, so for that
directory the only new files are the two wrappers — no renames vs main.
tsup builds a dual-entry bundle
({ index: src/promise.ts, core: src/index.ts }) and publishConfig
rewrites exports to point at the packed dist/ at publish time.
Also:
- Add scripts/publish-packages.ts. Works around bun pm pack not
substituting publishConfig overrides by rewriting package.json in
place during pack and restoring it after.
- Remove the separate packages/core/core package and the
packages/published/ folder that the earlier stack introduced.
- Bump all 8 publishable packages to 0.0.1-beta.4.
* expose pluggable storage on promise createExecutor, refresh READMEs
- add optional tools/sources/secrets/policies to promise ExecutorConfig,
adapting user-supplied promise-shaped impls into Effect services
- fix onepassword promise entry to export onepasswordPlugin (was types-only)
- rewrite plugin READMEs to lead with async/await, demote Effect to a
"Using with Effect" aside rather than an "Effect entry point" lead
- bump 8 public packages to 0.0.1-beta.5
* Drop /core subpath; internal imports use bare @executor/sdk
Rewires dev exports so internal code treats @executor/sdk (and the 7
plugin packages) as normal packages: bare imports resolve to the
Effect-based entry, no more /core subpath gymnastics in the source.
- @executor/sdk dev exports: `.` -> src/index.ts (Effect),
`./promise` -> src/promise.ts. publishConfig unchanged, so the
published package still ships `.` as the promise wrapper and
`./core` as the raw Effect primitives.
- 7 plugin packages follow the same pattern: dev `.` now points at
the plugin's Effect entry, `./promise` added, `./core` dropped.
publishConfigs unchanged.
- Rewrote 82 `@executor/sdk/core` imports and 9 `@executor/plugin-*/core`
imports to bare paths across packages, apps, and READMEs.
- examples/promise-sdk imports from `/promise` subpaths since dev
bare is now Effect. Published consumers still get the promise API
at the bare path via the publishConfig swap at pack time.
No changes to scripts/publish-packages.ts or tsup configs — the
existing publish-time exports override is what flips dev's
bare-Effect into published bare-promise.
* fix unused import
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.
Summary
Publishes 8
@executor-js/*packages (sdk+ 7 plugins) from this monorepo, with a promise-shaped wrapper as the default published entry and pluggable storage exposed on it. Source code stays on the internal@executor/*scope and keeps bare imports — the@executor→@executor-jsscope rename and promise/Effect entry-point swap both happen at pack time, so dev imports don't contort to accommodate the publish flow.What ships
@executor-js/sdk— default import is a promise-basedcreateExecutor/definePluginsurface (no Effect knowledge required)../coresubpath exposes the raw Effect primitives for advanced users.file-secrets,google-discovery,graphql,keychain,mcp,onepassword,openapi) — same dual-entry shape: default import is a promise wrapper,./coreis the Effect plugin.createExecutor: user-suppliedtools/sources/secrets/policiesstores (promise-shapedToolRegistry/SourceRegistry/SecretStore/PolicyEngineinterfaces). Promise ↔ Effect adapter layer converts to/from the internal Effect services.examples/promise-sdk— runnable end-to-end example demonstrating the promise API with MCP + OpenAPI + GraphQL plugins and a custom plugin.Dev vs published shape
Dev imports stay simple — everything uses bare
@executor/sdkand bare@executor/plugin-*, resolving to the Effect sources (what internal code actually needs). At pack timescripts/publish-packages.tsapplies two transformations:@executor/*→@executor-js/*inpackage.json(name + dep blocks, withworkspace:*resolved to concrete versions) and in compileddist/artifacts.publishConfig.exportsswap: the packed tarball'sexportsmap has.pointing at the built promise wrapper bundle and./corepointing at the Effect bundle — so published consumers get promise-by-default while dev still sees Effect-by-default.Both transformations are reverted after pack, so the working tree is never left in a published-shape state.
@executor/apiand@executor/reactare left on the internal scope because they're unpublished optional peers.Notable changes
scripts/publish-packages.ts— walks the 8 publishable package dirs, handles the scope rename +publishConfigapplication +bun pm pack+npm publishdance. Works aroundbun pm packnot substitutingpublishConfig.exportson its own.src/promise.ts+src/promise-executor.tsinpackages/core/sdk/(and a matchingsrc/promise.tsin each plugin) — hand-written promise/Effect adapter layer withEffect.tryPromise+orDiefor never-error methods and typed-error passthrough for methods with tagged errors.tsup.config.tsper publishable package, dual-entry{ index: src/promise.ts, core: src/index.ts }so both bundles land indist/.@executor/sdkand bare@executor/plugin-*now point at the Effect entry (source of truth for internal code). A dev-only./promisesubpath exists for the example. The old./coresubpath is removed from dev so the working tree stays free of/coreimports — the publish-time swap re-introduces it for consumers..github/workflows/release.ymlgains apublish-packagesstep.RELEASING.mddocuments the flow. All 8 packages bump to0.0.1-beta.5.Supersedes
Closes the earlier 4-branch Graphite stack: #112, #115, #116, #138.
Test plan
bun run build:packages— all 8 packages build todist/bun run release:publish:packages:dry-run— produces tarballs with rewritten scope + swappedexports0.0.1-beta.5to npm and smoke-tested against an external project using both bare and/coreentry pointsbun run typecheckacross the workspace — remaining failures are pre-existing and unrelated to this PR