Skip to content

Names on the hub: import name@version, --publish name@version, bend link, bend login - #996

Merged
Lorenzobattistela merged 6 commits into
mainfrom
hub-names
Sep 23, 2026
Merged

Lorenzobattistela merged 6 commits into
mainfrom
hub-names

Conversation

@Lorenzobattistela

@Lorenzobattistela Lorenzobattistela commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Packages on the hub get names. import <name>@<version>/x.bend as X asks the hub once for the hash (GET /name/<name>@<version>) and keeps it under BEND_LIB/names. bend <file> --publish <name>@<version> checks the name and version with the hub before mining, publishes, registers the name if free and links it. bend link <name>@<version> 0x<hash> names a package already on the hub. bend login is Bender's CLI login; the key lives in ~/.bend/bender.json (0600).

Needs the hub deployed after this PR closes. Do NOT merge this directly

Also points the ping gate at the site's new layout (apps/hub/hub.ts, release/release.ts) and annotates the operator in its sample program, refused since 2.0.16.

Gates: repo 46/46; ping 20/20 against the site checkout on bendhub-spec; test's check and interp lanes 1427/1427 locally (the C and JS lanes need the cluster); the named import, publish, link and login paths verified against a fake hub.

Lorenzobattistela and others added 3 commits September 22, 2026 14:24
…b does, the CLI's hub client is one request helper, bend.ts may reach 44000 ttok

The loader rejects a name@version the hub would, with the hub's wording,
and re-asks the hub when its cached answer is not a hash. NAMED lives in
bend.ts and main.ts imports it.

In the CLI: an unreachable hub says so and keeps the key; only a 401
forgets it, on every request that sends it. A named publish prints the
hash before naming, and a failed link ends with the bend link command to
recover. The login keeps polling through a dropped poll, with a floor on
the interval. A wrong argument count to link or login fails with usage.
A hub answer that is not ok prints the hub's reason.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ease/, and its program annotates its operator

The site repo moved deploy/hub.ts to apps/hub/hub.ts and deploy/release.ts
to release/release.ts; both keep their environment and arguments. The
sample program the gate runs through the executable was 2n + 3n, refused
since 2.0.16 (a bare operator demands its type), so the gate could not
pass on any layout.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Comment thread bend2/bend.ts Resolved
Comment thread bend2/main.ts Resolved
Comment thread bend2/main.ts Resolved
Comment thread bend2/main.ts Resolved
Comment thread bend2/main.ts Resolved
Lorenzobattistela and others added 3 commits September 22, 2026 16:39
Co-authored-by: Nico Abril <[email protected]>
…e hub's /publish-check, two comments shorter, a GET's body is JSON.stringify(undefined)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@Lorenzobattistela
Lorenzobattistela merged commit f7dc536 into main Sep 23, 2026
@Lorenzobattistela
Lorenzobattistela deleted the hub-names branch September 23, 2026 13:02
Phylliida pushed a commit to Phylliida/bend that referenced this pull request Sep 27, 2026
…ink, bend login (bendlang#996)

Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Nico Abril <[email protected]>
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.

2 participants