Repository navigation
Settings
The runtime settings changed with !set <key> <value> (and the shortcuts !kbd, !cores, /temp, /think, plus the agent's set_setting tool): every key, the values it accepts, its default at boot, and whether it survives a poweroff. One function, shell::set_setting, applies all of them.
!set SHALL accept exactly these keys: temperature (alias temp), cores, keyboard (alias kbd), think, compact, snappool, consolidate, slot, constrain, spec, gramdraft, confidence, seed, color, rounds, judge; Tab SHALL complete the 16 main names; any other key SHALL be refused with error: unknown setting '<key>' (...) listing every main name, and nothing changes.
Source: kernel/src/shell.rs SETTINGS, set_setting
- WHEN the user sets the key colour, which does not exist
-
THEN the shell prints
error: unknown setting 'colour' (temperature, cores, keyboard, think, compact, snappool, consolidate, slot, constrain, spec, gramdraft, confidence, seed, color, rounds, judge)
Every setting that was applied SHALL write its result line to the kernel log; a refused value SHALL not. Source: kernel/src/shell.rs set_setting
-
WHEN the user types
!set slot 100 -
THEN
slot = 100 tokens for the memory slot of a new conversationappears in!log
!set temperature T SHALL accept a number from 0 to 2: 0 selects greedy decoding, above 0 top-p 0.95 sampling at T; other values SHALL be refused with error: temperature must be a number from 0 to 2. Default 0 (greedy). Saved in the hibernation image.
Source: kernel/src/shell.rs set_setting; kernel/src/llm.rs TEMP_BITS; kernel/src/hib.rs extra, apply
-
WHEN the user types
!set temperature 3 - THEN the temperature stays as it was and the error is printed
!set cores N SHALL accept 1 up to the number of worker threads online and set the threads used for inference; other values SHALL be refused with error: cores must be 1..<max>. Default: every core online. Not saved: each boot uses every core.
Source: kernel/src/shell.rs set_setting; kernel/src/smp.rs start
-
WHEN 8 threads are online and the user types
!set cores 9 -
THEN the shell prints
error: cores must be 1..8
!set keyboard L SHALL accept the layouts us and it; another name SHALL be refused with error: keyboard layout must be one of: us it. Default it. Not saved.
Source: kernel/src/shell.rs set_setting; kernel/src/kbd.rs LAYOUTS, LAYOUT
-
WHEN the user types
!set keyboard us -
THEN the shell prints
keyboard layout = us
!set compact P SHALL accept a percent from 1 to 95, the context fill at which a turn compacts the context; other values SHALL be refused with error: compact must be a percent from 1 to 95. Default 75. Saved in the hibernation image.
Source: kernel/src/shell.rs set_setting; kernel/src/agent.rs COMPACT_PCT; kernel/src/hib.rs extra, apply
-
WHEN the user types
!set compact 0 - THEN the error is printed and the threshold stays 75
!set snappool M SHALL accept 64 MiB up to the pool size and cap the memory usable for snapshots, never below what is in use; other values SHALL be refused with error: snappool must be 64..<max> MiB. Default: the whole pool. Saved with the snapshot tree in the hibernation image.
Source: kernel/src/shell.rs set_setting; kernel/src/snap.rs init_root, hib_save, txt, set_cap, max_mib
-
WHEN the user types
!set snappool 32 - THEN the cap does not change and the error is printed
!set consolidate S SHALL accept any non-negative integer of idle seconds at the prompt before an automatic memory consolidation, 0 meaning only /consolidate; a value that is not an integer SHALL be refused. Default 60. Not saved.
Source: kernel/src/shell.rs set_setting; kernel/src/agentd.rs CONS_IDLE_S
-
WHEN the user types
!set consolidate 0 -
THEN the shell prints
consolidate = 0 s (off: /consolidate only)
!set slot N SHALL accept a token budget from 0 to 1000 for the memory slot put in front of the first message of a conversation, 0 turning the slot off; other values SHALL be refused. Default 200. Not saved.
Source: kernel/src/shell.rs set_setting; kernel/src/agentd.rs SLOT_BUDGET
-
WHEN the user types
!set slot 0 -
THEN the shell prints
slot = 0 tokens (off: no memory slot)
!set constrain V SHALL make tool calls follow the tool schemas when on, and let the grammar only check tool calls when off; values that are not on/off SHALL be refused. Default on. Saved in the hibernation image.
Source: kernel/src/shell.rs set_setting; kernel/src/gram.rs ON; kernel/src/hib.rs extra, apply
-
WHEN the user types
!set constrain off -
THEN the shell prints
constrain = off (the grammar only checks tool calls)
!set gramdraft V SHALL use the grammar's forced continuation inside a tool call as the speculative draft when on and stop when off; values that are not on/off SHALL be refused. Default on. Not saved.
Source: kernel/src/shell.rs set_setting; kernel/src/llm.rs GRAM_DRAFT
-
WHEN the user types
!set gramdraft off -
THEN the shell prints
gramdraft = off (inside a tool call the grammar's continuation is the speculative draft)
!set confidence V SHALL print a [confidence] line per tool call and ask first on low-margin calls of write_file, mkdir, set_setting and remember when on, and do neither when off; values that are not on/off SHALL be refused; the on line SHALL name the ask threshold CONF_LO with two decimals and the tools that ask. Default on. Not saved.
Source: kernel/src/shell.rs set_setting; kernel/src/gram.rs CONF_ON; kernel/src/agent.rs CONF_LO, ASK_LOW
-
WHEN the kernel was built with the default CONF_ASK and the user types
!set confidence on -
THEN the line says
a margin below 0.80 asks first on write_file, mkdir, set_setting and remember
!set seed R SHALL set the sampler RNG state to a positive integer R; 0 and non-integers SHALL be refused with error: seed must be a positive integer. Default 42. The RNG state is stored with every snapshot point, so /undo and /switch bring it back.
Source: kernel/src/shell.rs set_setting; kernel/src/llm.rs RNG; kernel/src/snap.rs save
-
WHEN the user types
!set seed 0 - THEN the error is printed
The agent's set_setting tool SHALL reach only temperature, cores and keyboard; the other keys SHALL be changeable only by the user at the shell. They are the Agent rows of the Settings table (AGENT_KEYS, the key enum of the grammar). Source: kernel/src/agent.rs TOOLS, SPECS, AGENT_KEYS, exec; kernel/src/gram.rs step
-
WHEN the model calls set_setting with key
confidence - THEN validation refuses the call and confidence does not change
A resumed hibernation image SHALL restore temperature, think, constrain, compact, color, rounds, the compaction count, the transcript and the snapshot pool cap; the other settings SHALL start at their defaults. An image written before color was saved (extra version 1) SHALL still resume, with color on, and one written before rounds was saved (extra version 2) SHALL resume with the build default of rounds. Source: kernel/src/hib.rs key, apply, XVER; kernel/src/snap.rs hib_save, txt
-
WHEN the user sets
!kbd us, powers off and boots again into the resumed conversation - THEN the keyboard layout is it again
-
WHEN the user sets
!set color off, powers off and boots again into the resumed conversation - THEN the prompt has no escape codes
-
WHEN the user sets
!set rounds 3, powers off and boots again into the resumed conversation - THEN the tool round limit is 3
The on/off settings (think, constrain, confidence, gramdraft, color, judge) SHALL accept on, 1 or true for on and off, 0 or false for off; any other value SHALL be refused with error: <key> must be on or off, the setting SHALL keep its value and nothing SHALL be logged.
Source: kernel/src/shell.rs onoff, set_setting
-
WHEN think is on and the user types
!set think of -
THEN the shell prints
error: think must be on or offand think stays on
-
WHEN the user types
!set gramdraft 0 -
THEN the shell prints
gramdraft = off (inside a tool call the grammar's continuation is the speculative draft)
!set think V SHALL turn model thinking on or off with an on/off value; any other value SHALL be refused. Default off. Saved in the hibernation image.
Source: kernel/src/shell.rs set_setting; kernel/src/llm.rs THINK; kernel/src/hib.rs extra, apply
-
WHEN the user types
!set think yes -
THEN the shell prints
error: think must be on or off
!set spec V SHALL turn speculative decoding on for on or true, on with the longest draft N for an integer N from 1 to 15, and off for off or false; any other value (0, 16, a word) SHALL be refused and change nothing. Default on, drafts up to 8 tokens. Without a speculative path the line SHALL say on, but not available on this build. Not saved.
Source: kernel/src/shell.rs set_setting; kernel/src/llm.rs SPEC_ROWS, SPEC_K
-
WHEN the user types
!set spec 4 -
THEN the shell prints
spec = on (prompt lookup, drafts up to 4 tokens)
-
WHEN the user types
!set spec 16 -
THEN the shell prints
error: spec must be on, off or the longest draft from 1 to 15and speculation stays as it was
!set color V SHALL turn the console role colors on or off with an on/off value; any other value SHALL be refused with error: color must be on or off. Default on. Saved in the hibernation image.
Source: kernel/src/shell.rs set_setting; kernel/src/console.rs COLOR; kernel/src/hib.rs extra, apply
-
WHEN the user types
!set color off -
THEN the shell prints
color = off (plain text)and the next prompt has no escape codes
!set rounds N SHALL set the tool rounds per question to an integer N from 1 to 20 and print rounds = N (tool calls per question, then the agent answers without tools); any other value SHALL be refused with error: rounds must be an integer from 1 to 20 and change nothing. Default 10, or the build option ROUNDS. Saved in the hibernation image.
Source: kernel/src/shell.rs set_setting; kernel/src/agent.rs ROUNDS, ROUNDS_MAX; kernel/src/hib.rs extra, apply
-
WHEN the user types
!set rounds 4 -
THEN the shell prints
rounds = 4 (tool calls per question, then the agent answers without tools)
-
WHEN the user types
!set rounds 0or!set rounds 21or!set rounds five -
THEN the shell prints
error: rounds must be an integer from 1 to 20and the limit stays as it was
The settings SHALL be the keys of the table below, in its order, with these values, defaults and hibernation behaviour; the requirement of each key has the exact messages. The /help column is the key's part of the !set help text. tools/spec_gen.py writes from it SETTINGS and the !set help (shell.rs), AGENT_KEYS (agent.rs) and the INFO.md table.
Source: kernel/src/shell.rs SETTINGS, CMDS, set_setting; kernel/src/agent.rs AGENT_KEYS; tools/spec_gen.py
-
WHEN the user types
/help -
THEN the
!setentry lists the /help column of every row, in this order, after<key> <value>
| Key | Also | Values | Default | Saved | Agent | /help |
|---|---|---|---|---|---|---|
!set temperature |
alias temp, /temp T
|
0..2: 0 greedy, above 0 top-p 0.95 sampling | 0 (greedy) | yes | yes | temperature |
!set cores |
!cores N |
1..the worker threads online | every core online | no | yes | cores |
!set keyboard |
alias kbd, !kbd L
|
us, it | it | no | yes | keyboard |
!set think |
/think on|off |
on, off | off | yes | no | think |
!set compact |
percent 1..95 of the context fill | 75 | yes | no | compact (percent) | |
!set snappool |
MiB, 64..the pool size | the whole pool | yes, with the snapshot tree | no | snappool (MiB) | |
!set consolidate |
idle seconds, 0 = only /consolidate
|
60 | no | no | consolidate (idle s, 0 = off) | |
!set slot |
tokens 0..1000, 0 = no memory slot | 200 | no | no | slot (tokens, 0 = off) | |
!set constrain |
on, off | on | yes | no | constrain (on|off: tool-call grammar) | |
!set spec |
on, off, or the longest draft 1..15 | on, drafts up to 8 | no | no | spec (on|off|N: speculative decoding, N = longest draft) | |
!set gramdraft |
on, off | on | no | no | gramdraft (on|off: tool-call text the grammar implies as a draft) | |
!set confidence |
on, off | on | no | no | confidence (on|off: margin of a tool call's decision tokens, low ones ask first) | |
!set seed |
a positive integer | 42 | stored with every snapshot point | no | seed (sampler RNG) | |
!set color |
on, off | on | yes | no | color (on|off: role colors on both consoles) | |
!set rounds |
1..20 | 10 (build option ROUNDS) | yes | no | rounds (tool rounds per question, 1..20) | |
!set judge |
on, off | off | no | no | judge (on|off: end-of-turn goal judge, verdicts in /proc/judge) |
!set judge V SHALL switch the end-of-turn goal judge: on prints judge = on (after a turn with tool calls the goal judge checks it; not done: a hint and up to 2 more tool rounds; verdicts in /proc/judge), or judge = on, but no judge model is loaded (judge.asmbin) when the ISO has no judge module (nothing is judged then); off prints judge = off; other values SHALL be refused. Default off. Not saved.
Source: kernel/src/shell.rs set_setting; kernel/src/judge.rs ON
-
WHEN the ISO has boot/judge.asmbin and the user types
!set judge on - THEN the shell prints the on line and the next turn with tool calls is judged
-
WHEN the ISO has no judge module and the user types
!set judge on -
THEN the shell prints
judge = on, but no judge model is loaded (judge.asmbin)and turns run as with judge off
Every applied change of temperature, think, compact, constrain, color or rounds (from !set, its shortcuts or the agent's set_setting) SHALL write all six to /var/lib/ringzero/settings, a comment line then one key=value line each, by writing settings.new there and renaming it over settings. Changes of the other settings SHALL not write the file.
Source: kernel/src/setfile.rs KEYS, changed; kernel/src/shell.rs set_setting
-
WHEN the user types
!set rounds 5 -
THEN
!cat /var/lib/ringzero/settingsshowsrounds=5and the five other saved settings
A boot that resumes no hibernation image (none, or a key that differs, as after an upgrade) SHALL apply the settings file (settings.new if settings is missing) through set_setting; an unknown key or a refused value SHALL be skipped with one settings: ... skipped log line. The boot logs settings: N values loaded from <path>, or settings: no /var/lib/ringzero/settings, defaults.
Source: kernel/src/setfile.rs load; kernel/src/hib.rs boot
-
WHEN the user types
!set temperature 0.7and!set rounds 5, powers off, and boots a newer kernel that does not resume the image -
THEN the log has
settings: 6 values loaded from /var/lib/ringzero/settingsand temperature is 0.7, rounds 5
-
WHEN the file has
rounds=99andcores=2and the boot resumes no image - THEN both lines are skipped with a log line each, rounds keeps its default and the other values load
- WHEN the disk has no settings file and the boot resumes no image
-
THEN the log has
settings: no /var/lib/ringzero/settings, defaultsand every setting has its default
Source of this page: openspec/specs/settings/spec.md
Generated from openspec/specs at 0221909 by tools/wiki_gen.py. Do not edit here: change the spec and regenerate.