NEARBuilders / NEARBuilders/everything-dev
bos-auth: 01 bos login — session + scoped FC key export, bos.config.json driven
Open
@elliotBraem is already working on this.
Since Sep 18, 2026.
ready-for-agent
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 6
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Sprout of #274 (v2 platform services spec). Ticket 01 of the gasless-auth sprint (frontier, parallel with #290).
What to build
bos login gives a human (or agent) a way to establish publish identity with zero keys on disk by default:
bos login(interactive): opens a wallet-approval popup (SIWN/NEP-413 browser flow at minimum), creates a session bound to the NEAR account, and persists a session handle under.bos/(gitignored). Sessions are short-lived; the handle is re-verifiable server-side against nonce + recipient.bos login --key: additionally mints/exports a function-access key scoped to the FastKV registry contract for headless use (CI and agents). This is the "AI agent signs with its own NEAR key" loop, preserved first-class.bos.config.jsonis the single declarative surface: the config'saccount+extendschain picks the auth target; optionalpublish.auth = "session" | "key"selects the default credential kind. No auth state lives outside.bos/state.json-style local files mirrored by the config's declared account.
Acceptance criteria
-
bos logingets a session binding the NEAR account without asking for a seed phrase or private key -
bos login --keyproduces a scoped function-call key that works whenNEAR_PRIVATE_KEYis consumed by the existing publish path -
bos.config.jsondeclares the auth contract (account, optionalpublish.auth), and a mismatched session is rejected with a clear error - Sessions expire; re-login is non-destructive for an existing key
- Logout deletes both the handle and exported key
Blocked by
- none (frontier)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.