Add realm operations API to BoxelCLIClient#4423
Draft
jurgenwerk wants to merge 5 commits intomainfrom
Draft
Conversation
Add a programmatic pull() method to BoxelCLIClient that reuses the
existing RealmPuller (auth via active profile, concurrent downloads,
checkpoints) and returns { files, error? } instead of calling
process.exit().
Replace the 90-line HTTP implementation of pullRealmFiles in
realm-operations.ts with a 3-line delegation to the new client method.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Expose realm file operations as methods on BoxelCLIClient. Each method uses the profile manager's authedRealmFetch for auth (automatic token lookup, 401 retry, token refresh) so callers never touch tokens directly. This is Phase 1 of migrating the factory off manual token management — the methods exist now, Phase 2 will swap factory callers to use them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rations Replace explicit RealmFetchOptions (authorization + fetch) threading with BoxelCLIClient methods throughout the software-factory package. Auth is now fully owned by the boxel-cli profile manager. Key changes: - ToolBuilderConfig.realmTokens replaced with client: BoxelCLIClient - All factory tools use client.read/write/search instead of realm-operations - RealmIssueStore, RealmIssueRelationshipLoader, factory-seed, lint-result-cards, test-run-cards all accept client instead of RealmFetchOptions - Added getRealmToken() to BoxelCLIClient for Playwright token injection - Removed buildFetchOptions/resolveAuthForUrl from factory-tool-builder Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FadhlanR
reviewed
Apr 16, 2026
| } | ||
| } | ||
|
|
||
| export async function pull( |
Contributor
There was a problem hiding this comment.
I think we can drop the pullCommand function and use this function in registerPullCommand and move the console.log and process.exit that previously handled in pullCommand to registerPullCommand.
Add runCommand, lint, waitForFile, waitForReady, authedServerFetch to BoxelCLIClient. Remove authorization from CreateRealmResult, ToolBuilderConfig, ToolExecutorConfig, IssueLoopWiringConfig, ValidationPipelineConfig, SeedIssueOptions, and all validator configs. The factory no longer threads raw JWT tokens — BoxelCLIClient handles all auth via the profile manager's authedRealmFetch/authedRealmServerFetch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…unCommand through authed fetch The mock client had stubs returning canned responses for lint(), listFiles(), and runCommand(). These need to delegate through the injected fetch (which has auth headers) for e2e tests against the live realm server. Also fix lint-validation.spec.ts to pass authed fetch to mock client instead of bare globalThis.fetch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
read(),write(),delete(),search(),listFiles()methods toBoxelCLIClientauthedRealmFetch()for auth (automatic token lookup, 401 retry, refresh) — callers never touch tokensBuilds on #4422 (pullRealmFiles replacement).
Test plan
🤖 Generated with Claude Code