Overview
| Comment: | Profiles, and the /auth list on the phone (#75) |
|---|---|
| Timelines: | family | ancestors | descendants | both | auth-6 |
| Files: | files | file ages | folders |
| SHA3-256: |
88759093c7e4988a7bbfb32ad60e2eb0 |
| User & Date: | dmestas on 2026-11-24 19:48:05.502 |
| Other Links: | branch diff | manifest | tags |
/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.
Context
|
2026-11-25
| ||
| 00:13 | merge trunk check-in: 017edb636c user: dmestas tags: auth-6 | |
|
2026-11-24
| ||
| 19:48 | Profiles, and the /auth list on the phone (#75) check-in: 88759093c7 user: dmestas tags: auth-6 | |
| 19:28 | Create new branch named "auth-6" check-in: 02d9d360d7 user: dmestas tags: auth-6 | |
Changes
Modified CHANGELOG.md
from [9b2113f828]
to [0e9ec7698d].
[diff]
Modified docs/design/remote-protocol.md
from [f9ceb32a97]
to [9c9d1a6664].
[diff]
Modified docs/manual/models.md
from [692d7dad37]
to [8b2842e8a4].
[diff]
Modified docs/manual/remote-control.md
from [4db2045669]
to [d365194beb].
[diff]
Modified docs/reference/cli.md
from [3b51cd2920]
to [1fa1fa1291].
[diff]
Modified docs/reference/rpc-commands.md
from [3123e14c1f]
to [2ed373b000].
[diff]
Modified docs/reference/settings.md
from [ee65704399]
to [9fe8427f20].
[diff]
Modified src/main.c
from [480038666f]
to [12e6b0813d].
[diff]
Modified src/remote.c
from [4bfb9790fb]
to [fb77ed9895].
[diff]
Modified src/rpc.c
from [e0ef7b27b5]
to [a1caa0c5ab].
[diff]
Modified src/tui/app.c
from [380cfebd6a]
to [fd65d08781].
[diff]
Modified src/userdb.c
from [b09696d152]
to [186f47d806].
[diff]
Modified src/userdb.h
from [7345ef99a6]
to [e0d2cf9e1b].
[diff]
Modified test/pic/authcmd.sh
from [610cea0cfd]
to [6407848fb5].
[diff]
Modified test/pic/docs.sh
from [085055521e]
to [2327021515].
[diff]
Modified test/pic/remote.sh
from [bbd419352d]
to [df421145ea].
[diff]