Skip to content

Simplify workspace package builds and deps#2676

Merged
juliusmarminge merged 3 commits into
mainfrom
feature/simplify-package-build
May 13, 2026
Merged

Simplify workspace package builds and deps#2676
juliusmarminge merged 3 commits into
mainfrom
feature/simplify-package-build

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented May 13, 2026

Summary

  • Moves several @t3tools/* workspace packages from devDependencies to runtime dependencies where they are actually consumed.
  • Removes redundant package versions and unused tsdown build scripts from internal packages that are no longer published independently.
  • Simplifies tsdown externalization rules in apps/desktop and apps/server to match the new package layout.
  • Drops the dedicated test:process-reaper script in apps/server and keeps the main Vitest entrypoint.
  • Adds @effect/platform-node-shared to apps/server to support the updated server dependency graph.

Testing

  • Not run (not provided in the commit diff).
  • Expected verification: bun fmt
  • Expected verification: bun lint
  • Expected verification: bun typecheck
  • Expected verification: bun run test

Note

Medium Risk
Medium risk because it changes package exports/bundling rules (notably @t3tools/contracts dropping CJS entrypoints) and shifts workspace dependencies, which can cause runtime/module-resolution issues in consumers.

Overview
Consolidates advertised-endpoint helpers into @t3tools/shared/advertisedEndpoint and updates desktop backend imports to use the new shared module, while keeping @t3tools/client-runtime as a thin re-export for compatibility.

Cleans up workspace packaging by moving @t3tools/* deps to runtime where used (e.g., desktop), removing per-package tsdown build scripts/metadata for internal-only packages, and simplifying bundler noExternal rules in both desktop and server.

Updates server deps/scripts by adding @effect/platform-node-shared and dropping the dedicated test:process-reaper script; @t3tools/contracts exports are simplified to ESM-only via the exports map.

Reviewed by Cursor Bugbot for commit a0878f5. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Move advertised endpoint utilities to @t3tools/shared and simplify workspace package builds

  • Moves createAdvertisedEndpoint and related types from @t3tools/client-runtime into a new @t3tools/shared/advertisedEndpoint subpath export; client-runtime now re-exports from there.
  • Updates imports in DesktopServerExposure.ts and tailscaleEndpointProvider.ts to use the new source.
  • Removes standalone dev/build scripts and tsdown dependencies from contracts, effect-acp, and effect-codex-app-server packages, consolidating build responsibility into consuming apps.
  • Removes CJS require export targets from packages/contracts, making it ESM-only.
  • Behavioral Change: the desktop bundler no longer treats effect-acp as noExternal, and the server bundler adds effect-codex-app-server to its internal prefix list, changing what gets bundled vs. left external.

Macroscope summarized a0878f5.

- Move internal runtime deps into app manifests
- Drop unused tsdown build scripts and CJS outputs
- Remove stale package versions from private workspaces
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a38f7453-bb40-412a-9bfc-0890961a7c4d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/simplify-package-build

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels May 13, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Missing @t3tools/client-runtime dependency in desktop package
    • Added "@t3tools/client-runtime": "workspace:*" to the dependencies section of apps/desktop/package.json, consistent with the other @t3tools/* workspace packages that were moved from devDependencies.

Create PR

Or push these changes by commenting:

@cursor push 2b17f09531
Preview (2b17f09531)
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -16,6 +16,7 @@
   },
   "dependencies": {
     "@effect/platform-node": "catalog:",
+    "@t3tools/client-runtime": "workspace:*",
     "@t3tools/contracts": "workspace:*",
     "@t3tools/shared": "workspace:*",
     "@t3tools/ssh": "workspace:*",

diff --git a/bun.lock b/bun.lock
--- a/bun.lock
+++ b/bun.lock
@@ -20,6 +20,7 @@
       "version": "0.0.23",
       "dependencies": {
         "@effect/platform-node": "catalog:",
+        "@t3tools/client-runtime": "workspace:*",
         "@t3tools/contracts": "workspace:*",
         "@t3tools/shared": "workspace:*",
         "@t3tools/ssh": "workspace:*",

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 02f89d3. Configure here.

Comment thread apps/desktop/package.json
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 13, 2026

Approvability

Verdict: Approved

Mechanical refactoring that moves shared code from client-runtime to the shared package, updates import paths, and cleans up build configurations and dependency organization. No runtime behavior changes - the relocated code is identical to the original.

You can customize Macroscope's approvability policy. Learn more.

- Move advertisedEndpoint utilities from client-runtime to shared
- Re-export shared helpers for existing consumers
- Add tests for URL normalization and endpoint construction
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels May 13, 2026
- Delete outdated coverage for advertised endpoint helpers
- Keeps package build focused on shared runtime code
@juliusmarminge juliusmarminge merged commit f92e1e1 into main May 13, 2026
12 checks passed
@juliusmarminge juliusmarminge deleted the feature/simplify-package-build branch May 13, 2026 19:35
heyNag added a commit to nag-codes/t3code that referenced this pull request May 14, 2026
Upstream PR pingdotgg#2676 moved @t3tools/* packages from devDependencies to
runtime dependencies in apps/desktop/package.json. The release build
script then copies those specs into a stage dir outside the workspace
where bun install cannot resolve workspace:*, breaking every desktop
artifact build (mac/linux/win — same failure on upstream main since
2026-05-13 21:37 UTC).

Strip workspace:* entries from apps/desktop/package.json before invoking
the build, restore via trap. tsdown's noExternal already inlines these
packages into main.cjs, so the runtime manifest entries are metadata-only
and safe to drop. Refuses to run if the file has uncommitted changes.

Remove once upstream fixes the build script or moves the deps back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant