Skip to content
Source
Sign inSign up
pingdotgg/t3code

Simplify workspace package builds and deps #2676

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/2676/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

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](https://cursor.com/bugbot) for commit a0878f5c60dddeb7a40537760d40bb04afaf5d1c. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

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.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. 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 (pingdotgg/t3code@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](https://cursor.com/bugbot) for commit 02f89d32dfab48cd60d1f3f69a1270be363ac502. Configure [here](https://www.cursor.com/dashboard/bugbot).
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. juliusmarminge merged thisf92e1e1

    6. juliusmarminge closed this

Sign in to join this conversation.