Skip to content

v0.2.2: One-step registration, remove checkUsername/claimUsername, fix JACS rotate API #13

Merged
Hendler merged 23 commits intomainfrom
0.2.2
Apr 8, 2026
Merged

v0.2.2: One-step registration, remove checkUsername/claimUsername, fix JACS rotate API #13
Hendler merged 23 commits intomainfrom
0.2.2

Conversation

@Hendler
Copy link
Copy Markdown
Contributor

@Hendler Hendler commented Apr 3, 2026

  • One-step registration: haiai init --name <name> --key <key> now generates keypair, registers with HAI, and claims the username in a single command. Removes the separate checkUsername / claimUsername flow from
    all SDKs (Rust, Python, Node, Go).
  • CI: clone JACS in all test jobs: Switched from stripping [patch.crates-io] to cloning the JACS repo at the expected relative path, so CI tests against the same JACS source as local dev.
  • Fix JACS rotate() API change: Pass algorithm: None to simple::advanced::rotate() after upstream added a second parameter — fixes all CI build failures since April 7.
  • Version bump: All 10 packages bumped from 0.2.1 → 0.2.2.
  • Bindings label: Native SDKs promoted from "pre-alpha" to "beta" in README.

Test plan

  • CI passes on all 4 language jobs (Rust, Python, Node, Go)
  • haiai init --name <name> --key <key> completes registration end-to-end
  • Key rotation (rotate_keys) works with updated JACS API

Hendler and others added 22 commits March 30, 2026 20:08
JACS now validates that required fields (jacs_data_directory, jacs_key_directory,
etc.) are present. Use the existing _create_jacs_config() helper to translate
the HAI-format config into JACS-native format before calling SimpleAgent.load().
The CheckUsername mock method was removed during the one-step registration
cleanup, but its net/url import alias (neturl) was left behind, causing
go vet to fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The one-step registration flow makes these methods unnecessary:
username claiming now happens atomically during registration via
the --key flag.

- Remove checkUsername/claimUsername from FFI client interface and adapter
- Remove corresponding mock stubs and test cases (4 failing tests)
- Update integration tests to use one-step registration flow
- Fix stale docstrings and error messages referencing old methods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  Key changes:
  - One-step registration: init --name <name> --key <key> now creates keypair, registers, and claims username in a single command
  - Removed checkUsername/claimUsername from all 4 SDKs (Rust, Python, Node, Go), FFI bindings, CLI, MCP tools, types, and tests
  - Removed register CLI command (folded into init)
  - Removed DefaultKeysEndpoint (keys.hai.ai) — all traffic through main endpoint
  - Updated all contract fixtures: command count 29→26, MCP tools 28→26, FFI methods 68→66
  - Added registration_key to MCP register tool schema
  - Renamed config_path → jacs_config_path in Node FFI config
  - Version bump 0.2.1 → 0.2.2 across all 10 packages
  - Native bindings label upgraded from "pre-alpha" to "beta"
  - Added verify link TODO comments (chicken-and-egg constraint)
  - Added email templates support in Node SDK

  Here's a suggested commit message:

  v0.2.2: consolidate registration into one-step init flow

  Merge init + register + claim-username into a single `init --name <name> --key <key>`
  command that creates the keypair, registers with HAI, and assigns the @hai.ai email
  in one step. Remove checkUsername and claimUsername from all 4 SDKs, FFI layer, CLI,
  MCP tools, contract fixtures, and tests. Remove separate keys.hai.ai endpoint.
  Bump all 10 packages to 0.2.2.
All four test jobs (Python, Node, Go, Rust) build through the Cargo
workspace which has [patch.crates-io] pointing to a local JACS checkout.
Previously only test-rust stripped these patches (and then failed because
published jacs 0.9.13 lacks update_config/sign_config). The other three
jobs had no patch handling at all, causing "failed to load source for
dependency jacs" errors.

Fix: clone JACS to the expected relative path in every job so workspace
patches resolve correctly. This also fixes the Rust compilation errors
since the local JACS source has the needed methods.
JACS simple::advanced::rotate() now requires a second `algorithm: Option<&str>`
parameter. Pass None to use the default algorithm, fixing all CI build failures.
@Hendler Hendler changed the title 0.2.2 v0.2.2: One-step registration, remove checkUsername/claimUsername, fix JACS rotate API Apr 8, 2026
@Hendler Hendler merged commit bceb4a1 into main Apr 8, 2026
6 checks passed
@Hendler Hendler deleted the 0.2.2 branch April 8, 2026 16:24
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.

1 participant