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.json is the single declarative surface: the config's account + extends chain picks the auth target; optional publish.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
Blocked by
Sprout of #274 (v2 platform services spec). Ticket 01 of the gasless-auth sprint (frontier, parallel with #290).
What to build
bos logingives 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 keybos login --keyproduces a scoped function-call key that works whenNEAR_PRIVATE_KEYis consumed by the existing publish pathbos.config.jsondeclares the auth contract (account, optionalpublish.auth), and a mismatched session is rejected with a clear errorBlocked by