Skip to content

refactor(remote): extract src/remote into @agent-device/remote - #3711

Merged
thymikee merged 2 commits into
mainfrom
t3/extract-remote-package
Oct 16, 2026
Merged

thymikee merged 2 commits into
mainfrom
t3/extract-remote-package

Conversation

@thymikee

@thymikee thymikee commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Moves src/remote (11 production files, 9 tests) into the private @agent-device/remote package with 6 narrow production exports. No behavior change, no root shims. Public agent-device/remote-config is unchanged; the sdk-remote-config tsdown chunk patterns follow the move.

Rebased onto 9ca333d5fb (plugins #3712). RemoteConfigProfile stays declared only in @agent-device/contracts; packages/plugins/src/connection.ts keeps its contracts import, so there is no plugins→remote dependency. 83 files, +250/−145.

Validation

Tested commit: 5fde2314e2 (base 9ca333d5fb), clean worktree, pnpm 11.17.0 (the pinned packageManager).

  • pnpm install --frozen-lockfile, pnpm build: exit 0.
  • pnpm check:affected --run --head 5fde2314e2, AGENT_DEVICE_VITEST_MAX_WORKERS=1, fail-open full selection (63 checks): 36 passed, 2 deduplicated, 25 skipped as GitHub-authoritative or parked. Exit 0, receipt exactCommit: true.
  • An earlier run of this same commit used pnpm 11.21.0 and also passed; the pinned run above replaces it.
  • Fresh-context review: no correctness findings. Two low suggestions declined as out of scope for a move: sharing stream-capture.ts through test-kit, and dropping the pre-existing remote-config.ts re-export.

Limits: unit and gate evidence only. CI owns coverage, provider integration and native lanes for this head.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 83 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/sdk/remote-config.ts
@thymikee
thymikee force-pushed the t3/extract-remote-package branch from 3e23fbf to 45f85df Compare October 16, 2026 12:13
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-16 14:23 UTC

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.30 MB 5.30 MB +61 B
Package (unpacked) 5.30 MB 5.30 MB +61 B
Package (download) 1.59 MB 1.59 MB -29 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 22.4 ms 22.1 ms -0.2 ms
CLI --help 63.6 ms 61.8 ms -1.8 ms

@thymikee

Copy link
Copy Markdown
Member Author

This PR looks ready for review at 45f85df. The move reads as a pure extraction, and all 39 checks pass, with the size report at +61 B installed. Not blocking: the stderr capture in packages/remote/src/tests/upload-progress.test.ts (https://github.com/callstack/agent-device/blob/45f85df/packages/remote/src/__tests__/upload-progress.test.ts#L8) is a hand rewrite of withCapturedStderr, so you could later move stream-capture.ts into @agent-device/test-kit and import it from both sides, and 'remote' could move from TARGET_DAG_RANK to UNRANKED_ZONES in scripts/layering/model.ts (https://github.com/callstack/agent-device/blob/45f85df/scripts/layering/model.ts#L69), as #3706 did for react-native. Take or leave both.

I did not run the build, typecheck or layering gates locally, and I did not inspect the built dist for the sdk-remote-config chunk. I relied on the green CI and your check:affected run. No conflicts. Nothing else blocks it.

The Cubic thread on the sdk-remote-config regexes in tsdown.config.ts no longer applies, because the regexes now match packages/remote/src/remote-config-schema, so please resolve it: #3711 (comment)

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 16, 2026
@thymikee
thymikee force-pushed the t3/extract-remote-package branch from 45f85df to 5fde231 Compare October 16, 2026 13:55
@thymikee
thymikee merged commit 40b1602 into main Oct 16, 2026
38 checks passed
@thymikee
thymikee deleted the t3/extract-remote-package branch October 16, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant