Repository navigation
feat(config): dormant profiles with model tiers, allow list, memory room and skills - #612
Merged
Merged
Conversation
…oom and skills [profiles.<name>] tables in the user config, selected with the global --profile flag. A profile is one settings layer between the per-key flags and the environment; its default tier's model beats TOLE_MODEL, its persona replaces the system prompt, and the memory loop uses its room unless a child mailbox is set. Resolving a profile reads only its persona file and starts nothing. Project configs cannot define profiles. Closes #584.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
# Conflicts: # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds dormant profiles (#584):
[profiles.<name>]tables in the user config, selected with a new global--profile <name>flag. A profile holds a persona file, an allow list, skills, a memory room, model tiers and secret grant names.Why
Closes #584 (epic #583). The owner keeps several specialised agents but uses few at a time. A profile should cost nothing until it is used, and should carry everything a delegated or scheduled run needs. The design is
docs/profiles-collaboration-secrets.mdA5.1, A6 and A9.3, implemented through the existing config layer with no new mechanism.Changes
config.rs: newProfileConfigandModelTiers(bothdeny_unknown_fields) andConfig.profiles.[a-z0-9_-], max 64 chars, no leading-.memory_roommust use the room charset.models.defaultmust belight,standardorheavyand must name a tier that is set.grantsmust be environment-variable NAMES. A value-shaped entry is an error, and the error does not echo it.layereddrops a project config's[profiles]table. Startup warns about it andconfig checkshows it asIGNORED, exactly like[tui].profile.rs(new):Profile::resolve(cfg, name, base, home).~/and user-config-relative paths) and starts nothing.Profile::granted(parent)returns the intersection of the parent grant and the profile grant, by name only.config_apply.rs: newSource::Profile, a layer between the per-key flags and the env: per-key flag > profile > env > config > user config.system_prompt,allowandskill.allowlist replaces the configallowlist; the two are not merged. This is the same rule as a non-empty--allowover config, and it only narrows pre-authorization: the config's patterns do not apply while the profile is selected. The README Profiles section says so.TOLE_MODEL.Settings::memory_room, andSettings::fill_with_profileso the server faces see the profile model and persona.main.rs:--profileis resolved once from the layered config.TOLE_MEMORY_NAMESPACE) > profile room >repo-<dir>, via the purememory_roomhelper.missionuses the persona as its base prompt.session_host.rs: server faces use profile persona >TOLE_SYSTEM_PROMPT> config.docs/threat-model.md: new Profiles section.docs/epics.mdstatus.Not in this PR:
tole cron create --profile: a small follow-up after the feat(cron):tole cronCLI,cron tick, serve ticker, agent and script modes #579 part-3 PR merges.tole config check --profile: skipped for now.grants(delegation feat(core): delegation — budget carve, depth 2 (max 3), write lease and mandatory report #585, scoped release feat!: scoped secret release — [secrets] grants, no secrets for run_command, sensitive-path reads #598). Their values are parsed, validated and resolved here.Testing
All run locally on head 435605f (merge of develop a38284b into the branch; no rebase, no force push):
cargo test --workspacepasses: 1401 passed, 0 failed (78 suites).cargo test -p tole-core --no-default-featurespasses: 474 passed, 0 failed.cargo fmt --all -- --checkpasses.cargo clippy --workspace --all-targets -- -D warningspasses.cora review --no-llm --base origin/develop(cora v0.20.0): "No issues found". The LLM review is CI Cora Review.tests/profile_e2e.rs):--profile coder runsends the persona as the system message and the profile model instead ofTOLE_MODEL, against a recording mock provider.[profiles]is ignored with a warning.New tests:
config::tests::profiles_parse_strictly_and_only_the_user_layer_survives_layeringprofile::tests::*(6 tests)config_apply::tests::profile_layer_is_below_flags_and_above_env_and_configconfig_apply::tests::fill_with_profile_carries_the_profile_model_and_personamemory_room_tests::child_mailbox_beats_profile_room_beats_repo_defaulttests/profile_e2e.rs(3 tests)Red/green: each behavior was broken on purpose, the named test was seen failing, the file was restored, and the test passed again.
profiles_parse_strictly…,profile_e2e::a_project_config_cannot_define_profilesprofile_layer_is_below…profile_e2e::a_profile_sets_the_persona_and_beats_the_env_modelprofile_layer_is_below…,profile_e2e::a_profile_sets_the_persona…profile_layer_is_below…profile_layer_is_below…child_mailbox_beats_profile_room_beats_repo_defaultprofiles_parse_strictly…granted_secrets_are_the_intersection_with_the_parentresolving_one_profile_reads_only_its_persona,profile_e2e::a_profile_sets_the_persona…fresh_mission_prompt_names_the_review_flow…models.defaultignoredresolving_one_profile_reads_only_its_personainstall_fillis a write-once process global.fill_with_profileitself is unit-tested.Related Issues
Closes #584. Epic #583. Follows #595 (
grantsuses the same secret-name vocabulary).Checklist
feat/dormant-profiles)develop