Repository navigation
shell: deprecate in favour of @cloudflare/computer - #2564
mattzcarey wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 65eae7d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
✅ agents import sizes: no significant changes ( |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
47e6e77 to
7a1314b
Compare
| // Absolute targets move with the files; relative ones need no change. | ||
| const target = entry.target.startsWith("/") | ||
| ? at(entry.target) | ||
| : entry.target; |
There was a problem hiding this comment.
🟡 Relative links escape the migrated workspace
When a Shell link uses .. past the old root, copyShellWorkspace preserves its target under /workspace. The copied link resolves outside /workspace, leaving migrated files unreachable through that link.
Learn more
Shell normalizes relative symlink targets against the link's parent and clamps paths at / in resolveSymlink. Moving the link below /workspace adds a directory level. A relative target that previously traversed above / can now resolve outside /workspace, even though the target file was migrated there. Absolute targets are already rebased by the copy script.
Example: Shell has /file.txt and /link pointing to ../file.txt; Shell resolves the link to /file.txt. The copy creates /workspace/file.txt and /workspace/link pointing to ../file.txt, which resolves to /file.txt instead.
Recommended fix: Resolve relative targets against the original link parent using Shell's path normalization, rebase the resolved absolute path under root, then emit a relative target from the copied link's parent. Keep dangling-link behavior in mind when computing paths; no file lookup is needed.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed: the script resolves each target the way Shell does (against the link's directory, never above /), then moves it under root.
7a1314b to
6d242a5
Compare
6d242a5 to
1ed438f
Compare
1ed438f to
65eae7d
Compare
Deprecates
@cloudflare/shelland adds Migrating to@cloudflare/computer. The guide covers what changes, both storage schemas, and a script that copies a Shell workspace into Computer throughworkspace.fs. By default the script copies under/workspace, where Think and Computer's tools work. Cleanup deletes only the copied rows' exact R2 keys, so other namespaces that share a prefix keep their data.What's included:
docs/index.md,AGENTS.mdanddesign/workspace.mdmark Shell as deprecated.The two packages use different tables (
cf_workspace_<namespace>andvfs_*), so switching doesn't move any data. The guide documents where each schema lives for people writing their own migration.After this publishes, run
npm deprecate @cloudflare/shell "Use @cloudflare/computer".Docs and package metadata only.
Stacked on #2563.
Stack (merge in order, or merge the top to land them all together):