feat(cli): accept native ipfs:// and ipns:// URIs#11375
Merged
Conversation
Commands that take a content path or CID now also accept native IPFS URIs (ipfs://cid, ipns://name, and the schemeless ipfs:/ipns: forms), so a URI copied from a browser or another tool works as-is. - cmdutils: PathOrCidPath parses via boxo NewPathFromURI; new CidFromArg for raw-CID commands takes the root CID and rejects sub-paths and mutable IPNS. - files: cp/stat sources and getNodeFromPath accept URIs and content paths; chroot takes its CID via CidFromArg. - resolve and name resolve normalize URIs before the namespace checks; name resolve stays IPNS-only. - routing, provide, filestore, pin remote: raw-CID args via CidFromArg. Depends on boxo NewPathFromURI (ipfs/boxo#1182); go.mod pins the PR commit until it is released.
This was referenced Jul 1, 2026
Open
gammazero
approved these changes
Jul 1, 2026
gammazero
approved these changes
Jul 1, 2026
#11374 made telemetry opt-in and rewrote the explicit "off" mode to no longer log "telemetry disabled via opt-out", but the opt-out subtests still assert that string, so TestTelemetry is red on master. Assert the "telemetry collection skipped: opted out" message the daemon emits whenever telemetry is off.
@helia/interop v11.0.0+ ships without .aegir.js (ipfs/helia#1049), so aegir test finds no specs and the interop job fails. Inject a minimal config pointing at the prebuilt dist specs when it is missing. Helia's own .aegir.js can't be reused as-is: it globs source .ts specs that Node won't run from node_modules. The same omission regressed before (ipfs/helia#1001, fixed by ipfs/helia#1003); see the comment.
lidel
commented
Jul 2, 2026
Comment on lines
+91
to
+116
| # Recurring @helia/interop regression: the package periodically ships | ||
| # without .aegir.js in its published "files", so `aegir test` has no config | ||
| # and discovers no spec files. It slipped in once around ipfs/helia#1001 and | ||
| # was fixed by ipfs/helia#1003 (titled "fix: restore aegir file in interop | ||
| # suite"), then regressed again in ipfs/helia#1049 ("feat!: make libp2p | ||
| # optional"), which dropped the file in the v11 major (first broken release | ||
| # 11.0.0 on 2026-06-29; 11.0.1 and 11.0.2 inherit it). | ||
| # | ||
| # We write a minimal config rather than fetching helia's own .aegir.js from | ||
| # the matching interop-v<version> tag: that file globs its tests at TypeScript | ||
| # sources (./src/*.spec.ts), which Node refuses to run from inside node_modules | ||
| # (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING, no tsconfig is shipped), and the | ||
| # rest of it is browser-only setup skipped under `-t node`. Pointing at the | ||
| # prebuilt ./dist/src is all the node run needs, and is what helia's own | ||
| # helia-interop bin runs. This keeps coming back, so it is the cheapest fix | ||
| # for now; it writes into node_modules and is fragile if helia's dist layout | ||
| # shifts. Drop it once helia ships .aegir.js in a published release again. | ||
| - name: Work around missing @helia/interop/.aegir.js (ipfs/helia#1049) | ||
| run: | | ||
| config=node_modules/@helia/interop/.aegir.js | ||
| if [ ! -f "$config" ]; then | ||
| echo "export default { test: { files: './dist/src/*.spec.js' } }" > "$config" | ||
| echo "injected minimal $config" | ||
| else | ||
| echo "$config already present, no workaround needed" | ||
| fi |
Member
Author
There was a problem hiding this comment.
@achingbrain I've added this workaround and it works but is there a chance for upstream fix in @helia/interop?
(original error without this was: https://github.com/ipfs/kubo/actions/runs/28540221250/job/84611955412)
Member
There was a problem hiding this comment.
Oops, I've landed the upstream fix & shipped it, sorry for the disruption.
The node interop specs leave kubo daemon and libp2p handles open, so mocha prints "N passing" and then hangs until the job timeout instead of exiting. Pass --exit so mocha quits once the run completes.
3 tasks
achingbrain
added a commit
to ipfs/helia
that referenced
this pull request
Jul 2, 2026
Fixes regression introduced in #1049 - this file should be part of the published module. Refs: ipfs/kubo#11375
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.
Commands now accept native IPFS URIs like
ipfs://cidandipns://name(and the schemelessipfs:cid/ipns:nameforms), so you can paste a link straight from a browser or another tool instead of rewriting it into an/ipfs/path first.This is backward-compatible:
/ipfs/cidpaths and bare CIDs still work exactly as they did before, and a URI is just one more accepted form. Each URI is normalized to the equivalent content path at the input boundary, so most commands need no change and the diff here is small.Thus PR depends only on the boxo
NewPathFromURIadded in