Overview
| Artifact ID: | 8ebfd5d9b5bea47f82cf5c41cdc7e838cc9e1eaafd203a4ed89ffa1f681d4b16 |
|---|---|
| Page Name: | checkin/88759093c7e4988a7bbfb32ad60e2eb000da032f691c7707eb0c055908716a13 |
| Date: | 2026-11-24 20:11:45 |
| Original User: | dmestas |
| Mimetype: | text/x-markdown |
Content
/auth step 6 (#75): profiles, and the /auth list on the phone
Profiles
A profile is the setting profile:NAME = {"model", "key"?, "thinking"?}, kept in userdb.c
(pic_profile_get, pic_profile_set, pic_profiles_each).
pic profiles [list] | set NAME --model M [--key L] [--thinking T] | remove NAME, each with[--json]. A name is 1-32 of a-z, 0-9,-and_, and may not be a provider's name. A key the model's provider lacks is refused.--model NAMEwith no/uses the profile: its model, plus its key and thinking level unless--keyor--thinkingis given. The level is clamped to what the model takes.- TUI
/model NAME(asksget_profiles), RPCset_model {profile}, andget_profilesin the registry.
On the phone (pic remote)
- Answered through the registry:
get_credentials,check_credentialsandget_profiles. These return names, kinds, states, what is left, expiry and rules, never a key.check_credentialsruns on the computer, inside pic remote's loop, for up to the 8-second check deadline. set_credentialis held per conversation (rmt_choice.key), asset_modelis, and passed to that conversation's next run as--key. Withpersist: trueit becomes the provider's saved key.set_model {profile}sets the model, key and level together.get_stategainscredential(provider:label): the phone's choice, else the conversation's own.- Not carried (answered
not_available): add_credential, command keys, removing a key, rules, expiry and unlock. - docs/design/remote-protocol.md: a new subsection "Keys and profiles" and two command-table rows. It is byte-identical to pic-relay's docs/remote-protocol.md (pic-relay branch auth-6).
Tests
- authcmd.sh: profiles over the shell and RPC.
- remote.sh: phone get_credentials, set_credential (held, and a missing label refused), get_state credential, get_profiles, set_model profile, and no key reaching the phone.
Tier: core (userdb.c, rpc.c), bundled (remote.c), root (main.c), client (tui); no new file. Clock:
pi. Record: settings profile:NAME. Default: no profiles.