Skip to content

chore: remove unused user-directory package#949

Merged
willwashburn merged 2 commits into
mainfrom
codex/remove-user-directory-package
May 22, 2026
Merged

chore: remove unused user-directory package#949
willwashburn merged 2 commits into
mainfrom
codex/remove-user-directory-package

Conversation

@willwashburn
Copy link
Copy Markdown
Member

Summary

  • Remove the unused @agent-relay/user-directory workspace package.
  • Drop the root dependency, build:user-directory script, TypeScript path aliases, Vitest workspace alias, and lockfile entries for that package.
  • Keep the currently active /data/users/{userId} auth behavior in src/cli/lib/auth-ssh.ts, where it is already implemented directly.

Why

@agent-relay/user-directory appears to be historical architecture residue. It was originally extracted from daemon-side per-user credential handling, but the daemon package was later removed/migrated and no current product/runtime code imports it.

The only active behavior it overlapped with is now inlined in SSH auth: auth-ssh.ts creates /data/users/{userId} and sets HOME there for remote provider auth. Provider credential path metadata also now lives in @agent-relay/config/cli-auth-config, and some user-directory mappings had drifted from that source of truth, for example Codex and OpenCode credential paths.

Exhaustive search found no remaining imports or exported-symbol usage for @agent-relay/user-directory, UserDirectoryService, getUserDirectoryService, initializeUserEnvironment, getUserEnvironment, or related helpers outside the package being removed.

Validation

  • rg search for package name and exported symbols: no remaining references
  • npm run audit:deps
  • npm run typecheck
  • npm run pack:validate
  • npm test
  • git diff --check

Note: typecheck/test needed network access because existing package scripts fetch pinned TypeScript/tsx runners through npx.

@willwashburn willwashburn requested a review from khaliqgant as a code owner May 22, 2026 16:37
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 42fbf1ba-6a68-4617-aa12-afd601689cf9

📥 Commits

Reviewing files that changed from the base of the PR and between de2169f and 9d80062.

📒 Files selected for processing (5)
  • .github/workflows/package-validation.yml
  • .github/workflows/publish.yml
  • .trajectories/completed/2026-05/traj_bz1a1o15p7px.json
  • .trajectories/completed/2026-05/traj_bz1a1o15p7px.md
  • .trajectories/index.json
💤 Files with no reviewable changes (2)
  • .github/workflows/package-validation.yml
  • .github/workflows/publish.yml
✅ Files skipped from review due to trivial changes (3)
  • .trajectories/completed/2026-05/traj_bz1a1o15p7px.md
  • .trajectories/completed/2026-05/traj_bz1a1o15p7px.json
  • .trajectories/index.json

📝 Walkthrough

Walkthrough

This PR removes the unused @agent-relay/user-directory workspace package and related build/test/publish wiring, updates TypeScript path aliases, and adds trajectory records documenting the removal and a CI fix.

Changes

Remove unused user-directory package

Layer / File(s) Summary
Trajectory decision and completion logging
.trajectories/completed/2026-05/traj_s5ojo1f4srz4.json, .trajectories/completed/2026-05/traj_s5ojo1f4srz4.md, .trajectories/completed/2026-05/traj_bz1a1o15p7px.json, .trajectories/completed/2026-05/traj_bz1a1o15p7px.md, .trajectories/index.json
Two new completed trajectory records are added documenting the removal of user-directory and a CI fix; the trajectories index lastUpdated and entries are updated.
Root build script, dependency, and workspace alias removal
package.json, vitest.config.ts, .github/workflows/package-validation.yml, .github/workflows/publish.yml
Removes the build:user-directory script and @agent-relay/user-directory dependency from root package.json; removes 'user-directory' from Vitest workspacePackages; removes @agent-relay/user-directory from package-validation import list and from publish job matrices.
Add cloud package TypeScript path alias
tsconfig.json
Adds a new @agent-relay/cloud/*packages/cloud/dist/* path mapping in compilerOptions.paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • khaliqgant

Poem

🐰 I hopped through configs, one by one,
Cleared stale paths beneath the sun.
User folders trimmed, logs set right,
Trajectories filed—sleep tonight. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: removal of an unused workspace package.
Description check ✅ Passed The description covers all template sections with comprehensive detail about what was removed, why it was removed, and how it was validated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remove-user-directory-package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de2169fc37

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -1,39 +0,0 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update CI package lists after deleting user-directory

Deleting packages/user-directory here leaves stale references in two active workflows I checked: .github/workflows/package-validation.yml still imports @agent-relay/user-directory in its key-import check, and .github/workflows/publish.yml still includes user-directory in publish matrices that run with working-directory: packages/${{ matrix.package }}. After this commit, those jobs will fail with module-not-found or missing-directory errors during PR validation and release publishing.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 12 files

Re-trigger cubic

@willwashburn willwashburn merged commit c1cf84d into main May 22, 2026
42 checks passed
@willwashburn willwashburn deleted the codex/remove-user-directory-package branch May 22, 2026 19:33
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