modus
Menu
On this page

Commands of the console

The 107 commands that the console has before any module is loaded, as help() prints them. A module that the console loads adds its exports: see the modules.

A command: a function with typed parameters and a typed result.

The console is a process that reads one line at a time and runs it as an expression of a small language: name = expression, or an expression alone. A call is name(argument, ...). Each argument is a number, a text in quotes, a variable, or the result of another call. The console checks the kind of each argument against the parameter before the call. A command gives a result and never prints: the console draws the result of the line by its kind. No process parses text: the text of the line stops at the console.

A command comes from one of three places:

  • The console itself: the built-in commands that this page lists. They exist before any module is loaded.
  • A module of the boot image that load("sample") or isolate("sample") adds: each export of the module becomes a command with the name of the export, and each record of its description becomes a command that makes a record from its fields.
  • A service that runs, which connect("monitor") reaches: each export becomes a command named service.export, as monitor.processes().

The name, the kinds and the help of a command of a module come from the description of its export: the console types nothing for it. When two commands have one name, the command added last is the one that runs: the module probe exports count, so the console names its own count of rows rows.

The kinds of a value. A result is an Integer, a Text, a Record, a Handle, a Table or Bytes. A command whose result is None does something and gives nothing. A command that lists things gives a Table, so where, sort and columns take it as they take the table of an export: where(grants("notes"), state = "held"). A parameter of the kind Value takes any kind, and the command checks it.

Tables compose. A Table is the records of one description, one after the other. The console holds a table as one value and passes it to the next call with no parsing: where, sort, join, columns, first, rows and row read only the description of the records, so they work on each table of each service. Example:

> columns(where(manual.running(), module = "calendar_fixed"), process, slot, module, replaces)

A variable keeps a value for the lines after it: t = readings(4), then sum_values(where(t, sensor = 2)). The console keeps 16 variables. variables() lists them.

Errors. A command that fails gives no value, and the line has an error: the rest of the line does not run. The console draws the error as one line that starts with error: , then the values of its error record when a call gave one. A wrong argument is refused before the call, with the argument and the two kinds: "error: sum_values: argument 1 is Table(Reading, Read), not Table(Reading)".

The keys of the line, the completion list and the line history:.

See: The line of the console: The keys

The comment above Command in src/modules/system/console/commands.odin.

CommandWhat it does
help() -> Table

Gives one row for each command that the console can call now: its name, its signature, and its help.

The table grows with each load, isolate and connect, and shrinks with each unload: it is the command table of this moment, not a fixed list.

describe(Text) -> Text

Gives the help on one name, as a Text: a command gives its signature and its whole help; a word of Lex (let, in, with, |>, _, =>, function, [, list, if) or a name of the evaluation (map, filter) gives a short guide with an example; where and connect give both.

  • name: the name of a command, as help() gives it, or a word of Lex.
> describe("let")
> describe("where")

Error: "no command and no word of Lex has the name ...", with the names near it.

processes() -> Table

Gives one row for each process that runs: the export processes of the service monitor, under a short name.

The list of the processes is a fact of a service, not of the console: the command connects to monitor when the console has no connection to it yet, and calls monitor.processes().

process_modules() -> Table

Gives one row for each module of each process that runs: the slot and the name of the process, the module, the module that it replaces, the head of its hash, and the writer of the record.

The rows are the module records of the kernel: what the loader of each process recorded.

memory() -> Record

Gives the memory of the machine and the counters of the kernel, as one Record.

The fields: the memory and the free memory in MiB, the used pages, the pages that a budget paid for and that have no page frame yet, the pages of the budgets, the free pages that no budget holds (0 when each page is free or paid), the count of memory objects, of kernel entries, of interrupts and of processors.

It needs the grant machine, as process_modules().

locks() -> Table

Gives one row for each kind of lock of the kernel: its name, the count of its waits and the count of its takes.

It needs the grant machine, as memory().

modules() -> Table

Gives one row for each module of the boot image: its name, its bytes and the head of its BLAKE3 hash, the first 8 bytes.

These are the names that load, isolate, start and replace take.

load(Text) -> Record

Loads a module of the boot image into the memory of the console, and makes each of its exports a command: a call is a direct call, with no other process.

  • name: the name of a module of the boot image, as modules() gives it.

The loader checks the hash of the file against the boot image, loads its imports, and applies the replacement table of this time.

isolate(Text) -> Record

Loads a module of the boot image into a new sandboxed process, a call host, and makes each of its exports a command: a call is an isolated call through a call ring.

  • name: the name of a module of the boot image.

The call host receives its call ring, its call region, the log, and the files of the module and of its imports, read-only: no other handle.

isolate_memory(Text, Handle, Integer) -> RecordLoads a module file that a memory object holds into a new call host, and makes each of its exports a command, as isolate does for a module of the boot image.
unload(Text) -> Record

Removes a module that load or isolate added: its commands leave the command table.

  • name: the name of the module, as load or isolate took it.

After isolate, the call host stops: the console closes its handles, and the kernel stops a process that no handle names.

loaded() -> Table

Gives one row for each module and each service whose exports are commands of the console, and one row for each import of such a module.

The fields: the module; how a call runs (direct, isolated, service); for an import, the module that imports it and, when the loader gave another module in its place, the module that the import names; the head of its hash.

> where(loaded(), in_place_of = "calendar")
connect(Text) -> Record

Asks the root service for a connection to a service that runs, and makes each export of the service a command named service.export.

  • name: the name of the service, as processes() gives it.

The root service decides: it refuses a service that the console may not call, with its reason.

start(Text, [Table])Asks the root service to start a process from a module of the boot image.
edit(Text, Text)Starts the editor edit on a text object of a store of the principal of this console.
start_from_disk(Text, Text)Asks the root service to start a disk process: a process whose module file is an object of the store module_files of the storage service, and not a file of the boot image.
allow(Text, Text)Gives a grant to the file that a nickname names, from its next start . See: Module contract: The grants of a disk process
disallow(Text, Text)Takes a grant from the file that a nickname names, from its next start.
remote_allow(Text)Allows the key of a client of the process remote for the principal of this console: each call of that client, from another machine, acts for this principal. See: Principals: The client keys of remote
remote_display_allow(Text, Text)Allows the key of a viewer of the process remote_display for the principal of this console: the viewer sees the screen, and with the input its keys and its pointer go to the desktop as the keys of this principal. See: The remote display in the repository
remote_disallow(Text) -> TextRevokes the key of a client of remote that the principal of this console allowed.
remote_clients() -> Table

Gives one row for each key of a client of remote that the principal of this console allowed, with its state: holds (each call of the client acts for the principal), locked (the session of the principal is locked), or contested (another principal allowed the key too, one in this run and one in its disk grant table: it acts for neither until one of them revokes it), and its uses: calls (of remote), view and view and input (of remote_display), or both.

> remote_clients()
key                                                               principal  state      uses
6a1f...
nickname_move(Text, Text)Points a nickname to another file: its grants and its store follow. The log says "root: the file HASH will get the data of NICKNAME" before the change.
disk_persistence(Text, Text)Sets how long a row of the disk grant table lasts across a restart. A row persists only when its principal has a key for the table: for principal 0, the machine passphrase.
stop(Text)Asks the root service to stop a process that runs.
grants(Text) -> Table

Gives one row for each grant that a process has or lost, of the grants that the root service records and can revoke.

  • name: the name of a process that runs.

The fields: the process; the grant (log, machine, image, log_records, store, network, acts_for_principal, history); its state, held or lost; the number and the name of the principal that the process runs for.

> grants("notes")
process  grant  state  principal  principal_name
notes    log    held           0  machine
notes    store  held           0  machine
2 rows of Grant

Error: the error record of the root service when no process has the name.

revoke(Text, Text) -> Integer

Asks the root service to end one grant of a process that runs, and gives the count of the holdings that ended.

  • name: the name of the process.
  • grant: the name of the grant, as grants() gives it.

The root service closes each handle that came from the grant and records the loss: grants() then gives it with the state lost.

principal_create(Text)Asks the root service to create a named principal: a principal whose session opens with a passphrase.
machine_passphrase()Asks the root service to set the machine passphrase: an optional passphrase of principal 0, the machine, that keeps the disk grant table of principal 0 across a restart.
machine_seal()Asks the root service to seal a new machine key to the measure of the system with the TPM: the window of unlock shows the recovery key one time.
start_policy_choose(Text, Text)Asks the root service to run a start policy of the store module_files at the next start of the machine, with the grant Start_Policy only.
start_policy_default()Ends the choice of a start policy: the next start runs the default start policy of the boot image.
passphrase_change() -> Text

Asks the root service to change the passphrase of the named principal of the session of this console, and gives what changed when the window of unlock ends the change.

The window of unlock asks for the current passphrase, which the TPM counts when it seals the keys, then for the new one two times.

recovery_key_change() -> Text

Asks the root service for a new recovery key of the named principal of the session of this console, and gives what changed when the window of unlock ends the change.

The window of unlock asks for the current passphrase, then shows the new recovery key one time; the file is written after Enter.

lock() -> Integer

Asks the root service to lock the session of the named principal that is unlocked, and gives the count of the processes of the session that stopped.

The window of unlock then asks for the passphrase again.

principals() -> Table

Gives one row for each principal of the machine: its number, its name, its state, the head of its public key, and for principal 0 the head of the measure of the system.

Principal 0 is the machine: it has no unlock, and its state is machine.

replace(Text, Text)Asks the root service to give one module where a module imports another, in each load that follows.
replacements() -> TableGives the replacement table of the machine: one row for each module that a load replaces, with the module that it gets in its place and the heads of the two hashes.
time() -> IntegerGives the milliseconds since the machine started, as an Integer.
hash(Text) -> Text

Gives the BLAKE3 hash of the bytes of a text, as 64 hexadecimal digits.

The same hash names a module in the boot image and an object in a store: hash("") gives af1349b9....

length(Text) -> Integer

Gives the count of bytes of a text, as an Integer.

length("kept across a stop") gives 18.

text(Integer) -> TextGives the decimal text of an integer: text(42) + " pages" gives 42 pages.
character(Integer) -> Text

Gives the text of one character of Unicode, from its code point: character(233) gives the small letter e with an acute accent, two bytes of UTF-8, so length(character(233)) gives 2.

A line of the console holds ASCII, as the keys give it: this command writes each other character.

repeat(Text, Integer) -> Text

Gives a text repeated a count of times: repeat("ab", 3) gives ababab.

The texts of one line share 4096 bytes: past them, "error: the text is too long".

buffer(Integer) -> Handle

Makes a new memory object of a count of pages, paid by the budget of the console, and gives its handle.

The console holds the handle until release.

byte(Handle, Integer) -> Integer

Gives one byte of a memory object, from 0: the console maps the object for the time of the command.

A new object holds zero bytes: byte(buffer(1), 0) gives 0.

bytes(Handle, Integer, Integer) -> Bytes

Gives a count of bytes of a memory object, from a first byte, as Bytes: the console maps the object for the time of the command and copies them.

  • memory: a handle of a memory object.
  • first: the place of the first byte, from 0.
  • count: the count of bytes, at most 4096.

The console draws Bytes as rows of 16 bytes in hexadecimal, with the place of each row and the characters; it draws the first 256 bytes and says how many it does not show.

Errors: the handle names no memory object; the object does not have these bytes; the count is not 0 to 4096.

release(Handle)Closes a memory object that buffer made: the console gives its handle back, and the kernel frees the pages when no handle names the object.
variables() -> Table

Gives one row for each variable: its name, its type and its value as a text.

A line name = expression makes or changes a variable.

clear()Clears the text of the terminal: the edit line becomes the first row of the view.
shutdown()Stops the machine: the console saves its line history, then asks the kernel to stop the machine.
exit()Leaves the child console of a project opened by projects.enter, revoking its temporary module connections and store shares and returning control to the parent console.
history_clear() -> Integer

Forgets the line history, in the memory of the console and in its store, and gives the count of the lines that it forgot.

Its object leaves the store with each of its versions.

measure_completion() -> Table

Measures the work of one key with the completion list open, for the query mcnt, and gives the measure as two rows.

It times four parts: the collect of the names, their rank, the text of the rows, and the colors of the code.

locale(Text) -> Text

Sets or reads the active CLDR interface locale of the console.

  • tag: "en", "fr", or "" to read the active locale tag.
language([Text]) -> Record

Reads a language tag of BCP 47 into its record, a Locale: the language, the script, the region, two variants, the keywords of the extension u (ca, nu, fw, hc, ms, co, rg), in the canonical form of UTS #35 (iw gives he).

  • tag: the text of the tag, in any case; the call may leave it out.
work(Text) -> Table

Gives one row for each connection of a process to a service: the service, the state of its work account, the pages of its work budget in use and in total, the processor time of its work thread since the connection, and its step debt.

  • process: the name of a process that runs, as processes() gives it.

The console knows the connections of its own process only.

roles() -> TableLists the closed system roles defined by the role contract.
delegated_services() -> TableLists the delegated system services (plans, recipes, projects, powerbox, disk_processes, principals, devices, settings).
tree_hash(Text, Text) -> Text

Computes the canonical BLAKE3 tree hash of a one-entry immutable tree.

  • name: entry name inside the tree.
  • content: text bytes hashed as the file leaf.
compile_c(Text, Text) -> Record

Compiles C source text in one step via c_compiler and assemble, then isolates the resulting module under name.

  • name: name of the new isolated module in the console.
  • source: C source code whose exported functions become callable commands.
debug(Text) -> TableMakes the service debugger the debugger of a process for the console, and gives one row: the process, its slot, its threads, its modules and how many of them have a debug object.
detach() -> TableEnds the debugging: the process gets back each thread that the debugger held, with no breakpoint.
threads() -> TableGives one row for each thread of the debugged process: its number, its state, and the instruction of a thread that is held or stopped, with its procedure, its file and its line.
hold(Integer) -> TableStops one thread of the debugged process, and gives its row.
resume(Integer) -> TableLets one thread run again, and gives its row: a thread that hold stopped, or that a breakpoint, a watch or a step stopped.
continue_all() -> TableLets each thread of the debugged process run again, and gives one row for each thread.
registers(Integer) -> Table

Gives one row for each register of a held thread: the 16 general registers, rip with its procedure and its line, and rflags with the flags that are set.

  • thread: the number of a thread that is held or stopped.
stack(Integer) -> Table

Gives one row for each frame of the stack of a held thread: the procedure, the file and the line of the instruction, then of each call, with the frame pointer and the return address.

  • thread: the number of a thread that is held or stopped.
locals(Integer, Integer) -> Table

Gives one row for each parameter and each local variable that is visible at the instruction of a frame: its name, its role, its type, its value or "not readable", and its location.

  • thread: the number of a thread that is held or stopped.
  • frame: the number of a frame, as stack gives it.
value(Integer, Integer, Text) -> Table

Gives one variable or one global by a path, as one row for each of its fields or of its elements.

  • thread, frame: as for locals.
source(Integer, Integer) -> TableGives the source line of the instruction of a frame: its number, the path of its file and the hash of that file at the build.
break_at(Text) -> Table

Sets an execute breakpoint, and gives one row for each breakpoint of the debugger.

The debugger has four breakpoints, for breakpoints and watches together.

breaks() -> TableGives one row for each breakpoint of the debugger.
break_remove(Integer) -> Table

Removes one breakpoint, and gives one row for each one that stays.

  • number: the number of a breakpoint, as breaks() gives it.
watch(Text, Integer) -> Table

Sets a data breakpoint on bytes that the process writes, and gives one row for each breakpoint of the debugger.

  • place: an address (0x403010), or the path of a global with its package.
  • length: 1, 2, 4 or 8 bytes.
step(Integer) -> Table

Runs one instruction of a thread that is held or stopped, and gives its row at its new instruction.

  • thread: the number of a thread that is held or stopped.
step_line(Integer) -> Table

Runs a thread that is held or stopped until the source line of its instruction changes, and gives its row there.

  • thread: the number of a thread that is held or stopped.
step_over(Integer) -> Table

Runs a thread that is held or stopped to the next source line of its procedure, and gives its row there: a call of the line runs to its end, and the thread does not stop inside it.

  • thread: the number of a thread that is held or stopped.
debug_memory(Text, Integer) -> TableGives the bytes of the debugged process from an address, sixteen in each row.
events() -> TableGives one row for each stop of a thread since the last call: the thread, the kind (breakpoint N, watch N, step), and the instruction with its procedure and its line.
wait_stop(Integer) -> Table

Waits until a thread of the debugged process stops, at most the given milliseconds (3000 at most), and gives the rows of events.

  • milliseconds: the longest wait.
stop_report(Text) -> TableGives one row for each frame of the stop report of a disk process that stopped on a fault: the module, the procedure, the file and the line, from the debug object of its module in the store module_files. It needs no debug: the process stopped, and the root service kept its report.
record(Text) -> TableStarts a process held before its first instruction, makes the service debugger its debugger for the console, records each process input of it from that instruction, then lets it run.
record_start() -> TableAsks the kernel to write each process input of the debugged process into an input history, and gives the row of the record.
record_end() -> TableEnds the record of the debugged process, and gives the row of the record with why it ended.
replay_start() -> TableRuns the recorded module again from the history, and gives the row of the record: replaying, then replayed with why the replay ended.
replay_status() -> TableGives the row of the record of the console, also after the kernel ended it by itself (the process stopped, the history is full, the bound of one stint, a revocation) and after the debugging ended.
replay_checkpoint(Integer) -> Table

Keeps a checkpoint of a held thread at the last input point of the record, and gives one row for each checkpoint: its number, its input point, the bytes of the history before it, the instruction and the stack pointer of the thread.

  • thread: the number of a thread that is held or stopped.
replay_step_back(Integer) -> Table

Gives the way back by some input points: the nearest checkpoint at or before the target point, and the input points that a replay runs from it to reach that point.

  • points: the input points to go back, from 1.
> replay_step_back(1)
watch_back(Integer, Integer) -> TableGives the last input of the history that wrote a byte of a range, as one row: its input point, the bytes of the history before it, what wrote (page delta for a point copy or a shared page, kernel entry for bytes that the kernel copied), the first byte written and how many, at most 8 values, the instruction of the thread there, and the checkpoint and the input points of a replay to that write.
where(Table, Condition) -> Table

Gives the rows of a table whose field passes a condition, in their order.

  • table: a table of any record.
  • condition: a field of its record, an operator and a value, as block = 12.
sort(Table, Text) -> Table

Gives the rows of a table in the increasing order of a field.

  • table: a table of any record.
  • field: the name of the field: integers by value, texts byte by byte.

Rows with one value keep their order, so two sorts give an order by two fields.

join(Table, Table, Text) -> Table

Gives one row for each pair of a row of the left table and a row of the right table that have one value of a field.

  • left, right: two tables of any records.
  • field: a field that both records have, of one kind.

The new record has each field of the left record, then each field of the right record whose name the left record does not have, at most 40 fields.

columns(Table, Field...) -> Table

Gives the rows with only the fields that the names choose, in their order.

  • table: a table of any record, or a Stream.
  • fields: one name of a field of its record or more, separated by commas.
first(Table, Integer) -> Table

Gives the first rows of a table, at most a count: a count larger than the table gives the whole table, and 0 or less gives no row.

On a Stream, it reads records until it has the count of rows that pass the conditions of the Stream, or until the stream ends, then closes the stream: the writer reads the end word Side_Closed.

skip(Table, Integer) -> Table

Gives the rows of a table after its first rows: a count larger than the table gives no row, and 0 or less gives the whole table.

The console draws the first 20 rows of a table.

rows(Table) -> Integer

Gives the count of rows of a table, as an Integer.

Its name is not count: the module probe exports count, and a command of a module hides a command of the console with its name.

row(Table, Integer) -> RecordGives one row of a table as a Record, from 1.
table(Table) -> Table

Gives the rows of a Stream until its end, as a Table.

  • stream: a Stream, with its conditions.
record_outputs(Text) -> TableGives one row for each record output that a module declares: its name, its record, and its line of help.
stream_counts(Stream) -> RecordGives the counts of the writer of a record output: the records written, discarded with no reader (or that the condition of each reader left out), and refused as Full.
wire(Stream, Record_Input) -> Table

Gives the Table of one row of a wiring list: the record output from to the record input to, each by its typed name.

  • from: a Stream.
keep(Stream) -> TableShort form of a wiring list that sends a record output to collector.in.
audit(Text) -> TableShort form of a wiring list that audits a service's log output in collector.in.
merge(Stream, Stream) -> TableShort form of a wiring list that merges two compatible record streams through merge.
facts(Table, Fact_Type) -> Table

Gives the facts of one fact type of a table of the rows of log.records, one row for each fact: the number, the time, the process and the level of the record, then each field of the fact type, in the order of its record.

  • table: rows of log.records, or of a command that keeps their fields (where, first, skip, sort).
  • fact: the name of a fact type, package.Type, as a writer declares it: log_reader.Fact_Probe.

Read from src/modules/system/console/commands.odin, src/modules/system/console/debugger_commands.odin, src/modules/system/console/tables.odin and src/modules/system/console/facts.odin.

The commands of tables

tables_start adds the commands of tables. Each one takes a table of any record and reads only its description, so one command serves each table of each service. A command that gives a table gives a new table in the memory of the line: the table of its argument does not change.

The tables of one line share 256 KiB; a variable keeps at most 32 KiB of rows. The console draws a table as a line of the names of its fields, a line for each row, and the count: "2 rows of Import" .

See: The line of the console: Results and their drawers

The comment above tables_start in src/modules/system/console/debugger_commands.odin.

Each command

help

help() -> 

Gives one row for each command that the console can call now: its name, its signature, and its help.

The table grows with each load, isolate and connect, and shrinks with each unload: it is the command table of this moment, not a fixed list. In a signature, a parameter shows its name when the description of the export gives one, and Value when it takes any kind; the result follows ->, and a command with no -> gives nothing. A help longer than its field ends with the cut mark: describe(name) gives it whole.

help takes no argument: describe(name) gives the help on one name, and help("let") says so.

> where(help(), name = "repeat")
name    signature                      about
repeat  repeat(Text, Integer) -> Text  a text, several times
1 row of Command
Parameters
none
Result
What help() prints
the commands, one row each
Source
src/modules/system/console/commands.odin:266

describe

describe() -> 

Gives the help on one name, as a Text: a command gives its signature and its whole help; a word of Lex (let, in, with, |>, _, =>, function, [, list, if) or a name of the evaluation (map, filter) gives a short guide with an example; where and connect give both.

  • name: the name of a command, as help() gives it, or a word of Lex.
> describe("let")
> describe("where")

Error: "no command and no word of Lex has the name ...", with the names near it.

Parameters
Result
What help() prints
the help on one name: a command or a word of Lex
Source
src/modules/system/console/commands.odin:283

processes

processes() -> 

Gives one row for each process that runs: the export processes of the service monitor, under a short name.

The list of the processes is a fact of a service, not of the console: the command connects to monitor when the console has no connection to it yet, and calls monitor.processes(). The rows are those of that export: the slot, the name, the state, the resident and the mapped pages, the handles, the threads, the processor time and the kernel entries of each process, and the hash of the file of a disk process, whose name is its nickname.

> columns(where(processes(), state = "waiting"), slot, name, threads)
> columns(where(processes(), name = "visitor"), name, hash)

Errors: those of connect("monitor") when the service does not run, and those of the export.

Parameters
none
Result
What help() prints
the processes that run: monitor.processes()
Source
src/modules/system/console/commands.odin:303

process_modules

process_modules() -> 

Gives one row for each module of each process that runs: the slot and the name of the process, the module, the module that it replaces, the head of its hash, and the writer of the record.

The rows are the module records of the kernel: what the loader of each process recorded. replaces is empty when the module is in no place but its own. writer is starter when the starter of the process wrote the record, which the process cannot change, and process when the process wrote it for itself.

It needs the grant machine: the console asks the kernel with Inspect on the machine handle. Without it: "error: the console has no grant to inspect the machine".

Parameters
none
Result
What help() prints
the modules of each process that runs
Source
src/modules/system/console/commands.odin:317

memory

memory() -> 

Gives the memory of the machine and the counters of the kernel, as one Record.

The fields: the memory and the free memory in MiB, the used pages, the pages that a budget paid for and that have no page frame yet, the pages of the budgets, the free pages that no budget holds (0 when each page is free or paid), the count of memory objects, of kernel entries, of interrupts and of processors.

It needs the grant machine, as process_modules().

Parameters
none
Result
What help() prints
memory and kernel counters
Source
src/modules/system/console/commands.odin:328

locks

locks() -> 

Gives one row for each kind of lock of the kernel: its name, the count of its waits and the count of its takes.

It needs the grant machine, as memory().

Parameters
none
Result
What help() prints
the waits and the takes of each kind of kernel lock
Source
src/modules/system/console/commands.odin:333

modules

modules() -> 

Gives one row for each module of the boot image: its name, its bytes and the head of its BLAKE3 hash, the first 8 bytes.

These are the names that load, isolate, start and replace take. The boot image is the one source of code of the console: it is what the root service granted, with the grant image.

Parameters
none
Result
What help() prints
the modules of the boot image
Source
src/modules/system/console/commands.odin:340

load

load() -> 

Loads a module of the boot image into the memory of the console, and makes each of its exports a command: a call is a direct call, with no other process.

  • name: the name of a module of the boot image, as modules() gives it.

The loader checks the hash of the file against the boot image, loads its imports, and applies the replacement table of this time. The result is a Record: the module, the count of its commands, how a call runs (direct), and the head of its hash. loaded() then lists its imports, with the module that the loader gave in the place of each one. The module runs with the memory and every handle of the console: load only a module that the console trusts, and isolate the others.

> load("sample")
Loaded
  module     sample
  commands   12
  call       direct
  hash_head  <the first 8 bytes of its hash>

Errors: no module has the name; the module is loaded already; it exports no command (start runs a process); no room for its commands (512 commands, 8 modules); the hash differs from the boot image; the loader refuses the file, with the stage and the reason.

Parameters
Result
What help() prints
load a module here: direct calls
Source
src/modules/system/console/commands.odin:370

isolate

isolate() -> 

Loads a module of the boot image into a new sandboxed process, a call host, and makes each of its exports a command: a call is an isolated call through a call ring.

  • name: the name of a module of the boot image.

The call host receives its call ring, its call region, the log, and the files of the module and of its imports, read-only: no other handle. A fault of the module stops the call host, not the console: the error of the line has the stop report, with the instruction and the frames. Escape during a call stops the call host. The arguments and the results go through the call region, so a table result is limited by its size. The result is the Record of load, with the call isolated.

Errors: as load; also "no room for a sandboxed process" when 8 sandboxes run, and "cannot start a sandboxed process" when the budget of the console cannot pay for it.

Parameters
Result
What help() prints
load a module in a sandboxed process
Source
src/modules/system/console/commands.odin:389

isolate_memory

isolate_memory(, , ) -> 

Loads a module file that a memory object holds into a new call host, and makes each of its exports a command, as isolate does for a module of the boot image. The module that assemble wrote is such a file.

  • name: the name of the module in the console: 1 to 31 ASCII letters, digits and _, with no digit first.
  • memory: the memory object that holds the file from its first byte.
  • size: the bytes of the file, 1 to 4 MiB.

The console copies the bytes into a memory object of its own, checks the copy with module.validate, and computes its hash; the log has the hash. A later write into memory changes nothing. The call host receives the copy as its one file: a module from memory takes no import. The result is the Record of load, with the call isolated.

> f = buffer(4)
> n = assemble("export add(a: Integer, b: Integer) -> Integer; add: mov %rdi, %rax; add %rsi, %rax; ret", f)
> isolate_memory("adder", f, n)

Errors: the name is no name; a size of 0 or past the object or past 4 MiB; the handle names no memory object; the bytes are no module file; the module imports a module; a module with the name or the same bytes is loaded; it exports no command; no room for a sandbox or for its commands.

Parameters
Result
What help() prints
isolate the module file of a memory object
Source
src/modules/system/console/commands.odin:418

unload

unload() -> 

Removes a module that load or isolate added: its commands leave the command table.

  • name: the name of the module, as load or isolate took it.

After isolate, the call host stops: the console closes its handles, and the kernel stops a process that no handle names. After load, the module leaves the memory of the console, unless another loaded module imports it: one copy serves both. The result is a Record: the module, the count of the commands removed, and what became of its memory.

> unload("sample")
Unloaded
  module    sample
  commands  12
  memory    left the console

Error: "load and isolate added no module with the name ...".

Parameters
Result
What help() prints
remove a module that load or isolate added
Source
src/modules/system/console/commands.odin:440

loaded

loaded() -> 

Gives one row for each module and each service whose exports are commands of the console, and one row for each import of such a module.

The fields: the module; how a call runs (direct, isolated, service); for an import, the module that imports it and, when the loader gave another module in its place, the module that the import names; the head of its hash.

> where(loaded(), in_place_of = "calendar")
Parameters
none
Result
What help() prints
the modules and the services whose exports are commands
Source
src/modules/system/console/commands.odin:453

connect

connect() -> 

Asks the root service for a connection to a service that runs, and makes each export of the service a command named service.export.

  • name: the name of the service, as processes() gives it.

The root service decides: it refuses a service that the console may not call, with its reason. It gives a call ring, a call region and the hash of the file of the process; the console reads the descriptions of the exports from that file in the boot image. A call then runs in the service, with the rights of the service, and the service checks its caller. When the service stops, the console ends the connection. The result is the Record of load, with the call service; a service that is connected already gives it again.

> connect("settings")
Loaded
  module     settings
  commands   3
  call       service
  hash_head  <the first 8 bytes of its hash>

Errors: the root service refused, with its error record; the service exports no command; no room for its commands.

Parameters
Result
What help() prints
call the exports of a service that runs
Source
src/modules/system/console/commands.odin:479

start

start(, [])

Asks the root service to start a process from a module of the boot image. It gives nothing.

  • name: the name of the module, which becomes the name of the process.

The root service gives the process the grants of its name, and only those (the reference page of the grants lists them). processes() then has its row.

  • list: a wiring list, which the call may leave out: a Table of Wiring, as wire(from, to) gives it and + joins it. Each row names the module at one end; the root service makes each wiring before the first instruction of the process, so its first record reaches each reader.

When the module declares a record output, the console keeps the handle of the process while it runs, and a line reads each record output by its typed name: output_counter.counts (The line of the console, "Streams").

> start("output_count_reader", wire(where(output_counter.counts, status = 404), output_count_reader.counts))

Errors: the error record of the root service when it refuses (no module has the name, the process runs already, no slot is free, a row of the list, a record input of the count One wired twice), and "the root service did not answer" after 3 seconds; a list that is no Table of Wiring, a row that names no end of the module or names it twice, an end that does not run, a list past its 32 rows or its 16 lent handles; the console keeps the handles of 8 started processes with a record output at most.

Parameters
Result
None
What help() prints
start a process, by module name, with a wiring list or none
Source
src/modules/system/console/commands.odin:513

edit

edit(, )

Starts the editor edit on a text object of a store of the principal of this console. It gives nothing.

  • store: the name of a store of this principal, as storage.stores() lists it, 1 to 31 bytes.
  • name: the name or /-separated path of the text object in that store, 1 to 256 bytes.
> edit("notes", "today.txt")

Errors: invalid store name or object path; the store belongs to another principal or the console lacks acts_for_principal; the root service refused the start or did not answer.

Parameters
Result
None
What help() prints
edit a text object of a store in the editor
Source
src/modules/system/console/commands.odin:529

start_from_disk

start_from_disk(, )

Asks the root service to start a disk process: a process whose module file is an object of the store module_files of the storage service, and not a file of the boot image. It gives nothing.

  • name: the nickname of the process: the name of its entry in the store, 1 to 23 bytes.
  • hash: the BLAKE3 hash of the module file, 64 hexadecimal digits. The tool that wrote the file prints it. An empty text takes the hash that the nickname names in the disk grant table.

The root service reads the object and starts its bytes only when their hash is hash: the storage service does not choose what runs. The process receives the log and a window, and the grants of its nickname in the disk grant table only, whatever its name .

> start_from_disk("visitor", "5f0c...")
> start_from_disk("visitor", "")

Errors: the name or the hash has a wrong form; the store has no object with the name; the bytes have another hash; the nickname names another file, or no file for an empty hash; a module of the boot image has the name, or the root service gives the name a grant; another load runs; the loader refuses the file; the storage service stopped or gave no answer.

See: Module contract: A module from a disk

Parameters
Result
None
What help() prints
start a module of the store module_files, by nickname and hash
Source
src/modules/system/console/commands.odin:557

allow

allow(, )

Gives a grant to the file that a nickname names, from its next start . It gives nothing.

  • nickname: the nickname of a disk process: letters, digits, - and _, 1 to 23 bytes. Its row in the disk grant table, or the disk process of that nickname that runs, gives the file.
  • grant: the name of a start grant. A command gives store only: the store of the nickname, which follows the nickname to its next file.
> allow("visitor", "store")

Errors: the nickname has a wrong form, no row and no process that runs; the grant is one that no command gives to a disk process (the ring of the root service, the machine, a device, the principal), or one that is not built; the table is full.

See: Module contract: The grants of a disk process

Parameters
Result
None
What help() prints
give a disk process a grant, by nickname
Source
src/modules/system/console/commands.odin:577

disallow

disallow(, )

Takes a grant from the file that a nickname names, from its next start. The store stays on the disk; revoke ends the grant of a process that runs. It gives nothing.

  • nickname: the nickname of a disk process with a row.
  • grant: the name of the grant: store.
Parameters
Result
None
What help() prints
take a grant from a disk process, by nickname
Source
src/modules/system/console/commands.odin:584

remote_allow

remote_allow()

Allows the key of a client of the process remote for the principal of this console: each call of that client, from another machine, acts for this principal. It gives nothing.

  • key: the Ed25519 public key of the client, 64 hexadecimal digits. modustool run prints the key of its peer.
> remote_allow("6a1f...")

The grant lasts until remote_disallow, and holds no call while the session of the principal is locked. It is a key of the disk grant table of the principal, so it lasts across a restart of the machine when that table does: principal 0 needs a machine passphrase or a machine key sealed by the TPM, and disk_persistence("", "forget") keeps it until the machine stops.

Errors: this console does not act for its principal; the key has a wrong form; another principal allowed the key; the principal has 4 keys, or the table is full; the disk grant table of the principal takes no change now (the log says why).

See: Principals: The client keys of remote

Parameters
Result
None
What help() prints
let a client of remote call for the principal of this console, by its key
Source
src/modules/system/console/commands.odin:608

remote_display_allow

remote_display_allow(, )

Allows the key of a viewer of the process remote_display for the principal of this console: the viewer sees the screen, and with the input its keys and its pointer go to the desktop as the keys of this principal. While a viewer is connected, the bar shows the mark viewer. It gives nothing.

  • key: the Ed25519 public key of the viewer, 64 hexadecimal digits.
  • use: view, or view_and_input.
> remote_display_allow("6a1f...", "view")

An allow of a key that the principal allowed already adds the use to it. The grant lasts until remote_disallow, which ends every use of the key, and holds nothing while the session of the principal is locked. The view and the input last until the machine stops: no disk grant table keeps them.

Errors: the use is not view or view_and_input; this console does not act for its principal; the key has a wrong form; another principal allowed the key; the principal has 4 keys, or the table is full.

See: The remote display in the repository

Parameters
Result
None
What help() prints
let a viewer of remote_display see the screen, or see it and type, for the principal of this console
Source
src/modules/system/console/commands.odin:632

remote_disallow

remote_disallow() -> 

Revokes the key of a client of remote that the principal of this console allowed. remote ends the open connection of the client, and refuses the key in its next handshake. It gives a sentence with the count of the connections to services that ended, and says when the disk grant table did not take the revocation: the key can then come back at the next start of the machine.

> remote_disallow("6a1f...")
4 connections to services ended

Errors: the principal of this console did not allow the key.

Parameters
Result
What help() prints
end the grant of a client key of remote
Source
src/modules/system/console/commands.odin:648

remote_clients

remote_clients() -> 

Gives one row for each key of a client of remote that the principal of this console allowed, with its state: holds (each call of the client acts for the principal), locked (the session of the principal is locked), or contested (another principal allowed the key too, one in this run and one in its disk grant table: it acts for neither until one of them revokes it), and its uses: calls (of remote), view and view and input (of remote_display), or both.

> remote_clients()
key                                                               principal  state      uses
6a1f...                                                                   0  holds      calls
1 row of Remote_Client
Parameters
none
Result
What help() prints
the client keys of remote that the principal of this console allowed
Source
src/modules/system/console/commands.odin:663

nickname_move

nickname_move(, )

Points a nickname to another file: its grants and its store follow. The log says "root: the file HASH will get the data of NICKNAME" before the change. It gives nothing.

  • nickname: a nickname with a row in the disk grant table.
  • hash: the BLAKE3 hash of the new file, 64 hexadecimal digits.

Errors: the nickname has no row; the hash has a wrong form, or is the hash of its file already.

Parameters
Result
None
What help() prints
point a nickname to another file, with its grants and its store
Source
src/modules/system/console/commands.odin:673

disk_persistence

disk_persistence(, )

Sets how long a row of the disk grant table lasts across a restart. A row persists only when its principal has a key for the table: for principal 0, the machine passphrase. It gives nothing.

  • nickname: a nickname with a row, or no byte for the global setting of the table.
  • setting: persist, forget (the row lasts until the machine stops), or global (the row follows the global setting). The global setting takes persist or forget; the default is persist.
> disk_persistence("visitor", "forget")

Errors: the nickname has no row; the setting is not one of these; the machine passphrase is not typed yet.

Parameters
Result
None
What help() prints
how long a grant of a disk process lasts across a restart
Source
src/modules/system/console/commands.odin:691

stop

stop()

Asks the root service to stop a process that runs. It gives nothing.

  • name: the name of the process, as processes() gives it.

stop("console") stops this console: it saves its line history first, because the save after the line never comes.

Errors: the error record of the root service when it refuses, and "the root service did not answer".

Parameters
Result
None
What help() prints
stop a process, by name
Source
src/modules/system/console/commands.odin:701

grants

grants() -> 

Gives one row for each grant that a process has or lost, of the grants that the root service records and can revoke.

  • name: the name of a process that runs.

The fields: the process; the grant (log, machine, image, log_records, store, network, acts_for_principal, history); its state, held or lost; the number and the name of the principal that the process runs for.

> grants("notes")
process  grant  state  principal  principal_name
notes    log    held           0  machine
notes    store  held           0  machine
2 rows of Grant

Error: the error record of the root service when no process has the name.

Parameters
Result
What help() prints
what a process has from the root service
Source
src/modules/system/console/commands.odin:722

revoke

revoke(, ) -> 

Asks the root service to end one grant of a process that runs, and gives the count of the holdings that ended.

  • name: the name of the process.
  • grant: the name of the grant, as grants() gives it.

The root service closes each handle that came from the grant and records the loss: grants() then gives it with the state lost. The process continues, and an operation on a closed handle fails with an error record that says "was revoked".

Errors: "no grant has the name ...", with the list of the names; the error record of the root service when it refuses.

Parameters
Result
What help() prints
end a grant of a process that runs
Source
src/modules/system/console/commands.odin:736

principal_create

principal_create()

Asks the root service to create a named principal: a principal whose session opens with a passphrase. It gives nothing.

  • name: the name of the principal.

The passphrase is never a text of the console, because the console keeps each line in its history: the window of unlock opens and asks for it. principals() then has the row of the principal.

Parameters
Result
None
What help() prints
create a named principal: its passphrase is typed in the window of unlock
Source
src/modules/system/console/commands.odin:745

machine_passphrase

machine_passphrase()

Asks the root service to set the machine passphrase: an optional passphrase of principal 0, the machine, that keeps the disk grant table of principal 0 across a restart. It gives nothing.

The passphrase is never a text of the console: the window of unlock opens and asks for it two times. At each start of the machine, the window then asks for it; until it is typed, the disk processes of principal 0 start with no grant.

Errors: the machine has a passphrase already; unlock runs.

Parameters
none
Result
None
What help() prints
set the machine passphrase: it is typed in the window of unlock
Source
src/modules/system/console/commands.odin:756

machine_seal

machine_seal()

Asks the root service to seal a new machine key to the measure of the system with the TPM: the window of unlock shows the recovery key one time. It needs Secure Boot that verified the boot program.

Errors: the machine has a record of its key already; no TPM service runs; Secure Boot did not verify the boot program; unlock runs.

Parameters
none
Result
None
What help() prints
seal a machine key to the measure of the system with the TPM: the window of unlock shows its recovery key one time
Source
src/modules/system/console/commands.odin:763

start_policy_choose

start_policy_choose(, )

Asks the root service to run a start policy of the store module_files at the next start of the machine, with the grant Start_Policy only. It gives nothing. The choice is a row of the disk grant table of principal 0, and the TPM measures the start policy into PCR 12 before it runs (Principals: The start policy of principal 0).

  • nickname: the nickname of the module file, as for start_from_disk.
  • hash: the BLAKE3 hash of the file, 64 hexadecimal digits, or empty for the hash of the row of the nickname.
> start_policy_choose("tiny", "5f0c...")

Errors: the console acts for a named principal; the machine has no machine key, or its machine key needs a passphrase; the nickname has no row and no hash is given; the row names another file, or holds the grant store.

Parameters
Result
None
What help() prints
run a start policy of the store module_files at the next start of the machine
Source
src/modules/system/console/commands.odin:784

start_policy_default

start_policy_default()

Ends the choice of a start policy: the next start runs the default start policy of the boot image. The row of the nickname stays.

Parameters
none
Result
None
What help() prints
run the default start policy at the next start of the machine
Source
src/modules/system/console/commands.odin:787

passphrase_change

passphrase_change() -> 

Asks the root service to change the passphrase of the named principal of the session of this console, and gives what changed when the window of unlock ends the change.

The window of unlock asks for the current passphrase, which the TPM counts when it seals the keys, then for the new one two times. The line waits for the end of the change; Escape ends the wait, and the window goes on. Only a console that the desktop starts during the session acts for the principal: the console of the machine cannot ask.

Errors: this console acts for no named principal; its session is locked; unlock runs; the file cannot take the change (the cause follows); the change was cancelled, or failed, and nothing changed.

Parameters
none
Result
What help() prints
change the passphrase of the principal of this session: it is typed in the window of unlock
Source
src/modules/system/console/commands.odin:802

recovery_key_change

recovery_key_change() -> 

Asks the root service for a new recovery key of the named principal of the session of this console, and gives what changed when the window of unlock ends the change.

The window of unlock asks for the current passphrase, then shows the new recovery key one time; the file is written after Enter. The old recovery key opens no file written after it, and still opens the version from before that the store keeps on the disk. Only the keys sealed by the TPM have a recovery key.

Errors: as passphrase_change(); the keys under the passphrase alone have no recovery key.

Parameters
none
Result
What help() prints
make a new recovery key for the principal of this session: the window of unlock shows it one time
Source
src/modules/system/console/commands.odin:815

lock

lock() -> 

Asks the root service to lock the session of the named principal that is unlocked, and gives the count of the processes of the session that stopped.

The window of unlock then asks for the passphrase again.

Parameters
none
Result
What help() prints
end the session of the named principal: its processes stop
Source
src/modules/system/console/commands.odin:821

principals

principals() -> 

Gives one row for each principal of the machine: its number, its name, its state, the head of its public key, and for principal 0 the head of the measure of the system.

Principal 0 is the machine: it has no unlock, and its state is machine. The other states: locked, unlocked (its session runs), and creating (created in the window of unlock). An empty measure: the system was not measured.

> principals()
number  name     state    public_key_head  measure_head
     0  machine  machine
1 row of Principal
Parameters
none
Result
What help() prints
the principals of the machine
Source
src/modules/system/console/commands.odin:837

replace

replace(, )

Asks the root service to give one module where a module imports another, in each load that follows. It gives nothing.

  • name: the module that an import names.
  • by: the module to give in its place; the text "" removes the replacement of name.

The replacement table belongs to the machine: the root service writes it, and each loader reads it at each load. A process that runs keeps the modules that it loaded. replacements() gives the table. The root service adds a replacement only for a pair that a replacement row of the boot image names, signed by the signing key of the system ; a removal needs no row.

Errors: no module has the name; the console has no grant to change the table; a chain of replacements is refused; no signed row names the pair; the signature of its row does not verify; the table is full; a module does not replace itself.

See: Module contract: Who may replace a module

Parameters
Result
None
What help() prints
give the second module where a module imports the first
Source
src/modules/system/console/commands.odin:857

replacements

replacements() -> 

Gives the replacement table of the machine: one row for each module that a load replaces, with the module that it gets in its place and the heads of the two hashes. No replacement: no row.

Parameters
none
Result
What help() prints
the replacement table of the machine
Source
src/modules/system/console/commands.odin:861

time

time() -> 

Gives the milliseconds since the machine started, as an Integer.

Parameters
none
Result
What help() prints
milliseconds since boot
Source
src/modules/system/console/commands.odin:863

hash

hash() -> 

Gives the BLAKE3 hash of the bytes of a text, as 64 hexadecimal digits.

The same hash names a module in the boot image and an object in a store: hash("") gives af1349b9....

Parameters
Result
What help() prints
the BLAKE3 hash of a text
Source
src/modules/system/console/commands.odin:869

length

length() -> 

Gives the count of bytes of a text, as an Integer.

length("kept across a stop") gives 18.

Parameters
Result
What help() prints
the number of bytes of a text
Source
src/modules/system/console/commands.odin:873

text

text() -> 

Gives the decimal text of an integer: text(42) + " pages" gives 42 pages.

Parameters
Result
What help() prints
the decimal text of an integer
Source
src/modules/system/console/commands.odin:876

character

character() -> 

Gives the text of one character of Unicode, from its code point: character(233) gives the small letter e with an acute accent, two bytes of UTF-8, so length(character(233)) gives 2.

A line of the console holds ASCII, as the keys give it: this command writes each other character. The terminal shows a character that its font lacks as the replacement glyph, a box.

Error: "N is no character of a text", for a control character, a surrogate (55296 to 57343) and a number past 1114111.

Parameters
Result
What help() prints
the text of one character, from its code point
Source
src/modules/system/console/commands.odin:887

repeat

repeat(, ) -> 

Gives a text repeated a count of times: repeat("ab", 3) gives ababab.

The texts of one line share 4096 bytes: past them, "error: the text is too long".

Parameters
Result
What help() prints
a text, several times
Source
src/modules/system/console/commands.odin:893

buffer

buffer() -> 

Makes a new memory object of a count of pages, paid by the budget of the console, and gives its handle.

The console holds the handle until release. The console draws a handle with its kind and its rights: "Handle 65541: Memory (Give, Read, Write)". byte and bytes read it.

Error: "the budget of the console cannot pay for N pages".

Parameters
Result
What help() prints
a new memory object, in pages
Source
src/modules/system/console/commands.odin:902

byte

byte(, ) -> 

Gives one byte of a memory object, from 0: the console maps the object for the time of the command.

A new object holds zero bytes: byte(buffer(1), 0) gives 0. Errors: the handle names no memory object, or the object has no byte at that place.

Parameters
Result
What help() prints
one byte of a memory object
Source
src/modules/system/console/commands.odin:909

bytes

bytes(, , ) -> 

Gives a count of bytes of a memory object, from a first byte, as Bytes: the console maps the object for the time of the command and copies them.

  • memory: a handle of a memory object.
  • first: the place of the first byte, from 0.
  • count: the count of bytes, at most 4096.

The console draws Bytes as rows of 16 bytes in hexadecimal, with the place of each row and the characters; it draws the first 256 bytes and says how many it does not show.

Errors: the handle names no memory object; the object does not have these bytes; the count is not 0 to 4096.

Parameters
Result
What help() prints
bytes of a memory object
Source
src/modules/system/console/commands.odin:924

release

release()

Closes a memory object that buffer made: the console gives its handle back, and the kernel frees the pages when no handle names the object. It gives nothing.

Error: "release closes a memory object that buffer made", for each other handle.

Parameters
Result
None
What help() prints
close a handle
Source
src/modules/system/console/commands.odin:931

variables

variables() -> 

Gives one row for each variable: its name, its type and its value as a text.

A line name = expression makes or changes a variable. The console keeps 16 variables; a table keeps at most 32 KiB of rows. The value of a table is the count of its rows; the value of a record is its fields in one line.

Parameters
none
Result
What help() prints
the variables
Source
src/modules/system/console/commands.odin:939

clear

clear()

Clears the text of the terminal: the edit line becomes the first row of the view. The line history stays. It gives nothing.

Parameters
none
Result
None
What help() prints
clear the console
Source
src/modules/system/console/commands.odin:942

shutdown

shutdown()

Stops the machine: the console saves its line history, then asks the kernel to stop the machine. It gives nothing.

It needs the grant machine. Without it: "error: the console has no grant to stop the machine".

Parameters
none
Result
None
What help() prints
stop the machine
Source
src/modules/system/console/commands.odin:948

exit

exit()

Leaves the child console of a project opened by projects.enter, revoking its temporary module connections and store shares and returning control to the parent console. It gives nothing.

Error: "exit: no project console is active" when called outside a child project console.

Parameters
none
Result
None
What help() prints
leave the console of a project
Source
src/modules/system/console/commands.odin:955

history_clear

history_clear() -> 

Forgets the line history, in the memory of the console and in its store, and gives the count of the lines that it forgot.

Its object leaves the store with each of its versions. The line history_clear() goes too.

If the store refuses the removal, the history is still cleared in memory, and the error gives the reason of the store. The design of the history:.

See: The line of the console: The line history across a stop

Parameters
none
Result
What help() prints
forget the line history, in memory and in its store
Source
src/modules/system/console/commands.odin:965

measure_completion

measure_completion() -> 

Measures the work of one key with the completion list open, for the query mcnt, and gives the measure as two rows.

It times four parts: the collect of the names, their rank, the text of the rows, and the colors of the code. Each number is the least of 20 batches of 10 keys, in nanoseconds. The first row is for the names of this console; the second for the worst case, 512 names of 128 bytes. It also writes each row as a line of the log, in microseconds. It runs in the second thread, so the list on the screen stays. The bounds that it measures:.

See: The line of the console: The bounds, and the cost of one key

Parameters
none
Result
What help() prints
measure one key of the completion list
Source
src/modules/system/console/commands.odin:976

locale

locale() -> 

Sets or reads the active CLDR interface locale of the console.

  • tag: "en", "fr", or "" to read the active locale tag.
Parameters
Result
What help() prints
set or read the active CLDR locale (en or fr)
Source
src/modules/system/console/commands.odin:980

language

language([]) -> 

Reads a language tag of BCP 47 into its record, a Locale: the language, the script, the region, two variants, the keywords of the extension u (ca, nu, fw, hc, ms, co, rg), in the canonical form of UTS #35 (iw gives he).

  • tag: the text of the tag, in any case; the call may leave it out. With no tag, or "", it gives the first language of the language list of the settings page, and English when the list is empty.

The console reads the text once: an export takes the record, never the text, so no process parses the tag again. settings.set_languages takes a table of these records, and settings.languages() gives each one with its canonical tag.

> language("fr-CA")
> language("ar-EG-u-nu-latn")
> settings.set_languages([language("fr-CA"), language("en")])
> language()

Error: the tag is refused, with the byte of the subtag at fault and the reason: a private use (-x-), an extension other than u, a key of u other than the seven, a value that names no member of its key, a third variant, an extended language, a tag past 128 bytes.

Parameters
Result
What help() prints
the record of a language tag, or the first language of the principal
Source
src/modules/system/console/commands.odin:1007

work

work() -> 

Gives one row for each connection of a process to a service: the service, the state of its work account, the pages of its work budget in use and in total, the processor time of its work thread since the connection, and its step debt.

  • process: the name of a process that runs, as processes() gives it.

The console knows the connections of its own process only. No service charges a work budget yet: each row has the state unaccounted and no numbers, because the service paid the work itself.

> work("console")

It needs the grant machine, as memory(). Errors: the name is empty or past 31 bytes; no process that runs has the name; the process is not this console.

Parameters
Result
What help() prints
the work that services did for each connection of a process
Source
src/modules/system/console/commands.odin:1028

roles

roles() -> 

Lists the closed system roles defined by the role contract.

Parameters
none
Result
What help() prints
the closed system roles
Source
src/modules/system/console/commands.odin:1030

delegated_services

delegated_services() -> 

Lists the delegated system services (plans, recipes, projects, powerbox, disk_processes, principals, devices, settings).

Parameters
none
Result
What help() prints
the delegated system services
Source
src/modules/system/console/commands.odin:1032

tree_hash

tree_hash(, ) -> 

Computes the canonical BLAKE3 tree hash of a one-entry immutable tree.

  • name: entry name inside the tree.
  • content: text bytes hashed as the file leaf.
Parameters
Result
What help() prints
canonical BLAKE3 hash of an immutable tree entry
Source
src/modules/system/console/commands.odin:1037

compile_c

compile_c(, ) -> 

Compiles C source text in one step via c_compiler and assemble, then isolates the resulting module under name.

  • name: name of the new isolated module in the console.
  • source: C source code whose exported functions become callable commands.
Parameters
Result
What help() prints
compile C source into an isolated module and load its exports
Source
src/modules/system/console/commands.odin:1042

debug

debug() -> 

Makes the service debugger the debugger of a process for the console, and gives one row: the process, its slot, its threads, its modules and how many of them have a debug object. It is the export attach of the service.

  • process: the name of a process that runs.

The root service gives the debug access when the console acts for the principal whose session runs the process, and when each grant of the process is a grant that the console holds itself. A service is refused. The grant is debug in grants("console"), and revoke("console", "debug") ends it.

> debug("clock")

Errors: those of connect("debugger"), and those of the export.

Parameters
Result
What help() prints
debug a process: debugger.attach()
Source
src/modules/system/console/debugger_commands.odin:168

detach

detach() -> 

Ends the debugging: the process gets back each thread that the debugger held, with no breakpoint. It gives one row: the process, the breakpoints that the debugger had and the threads that it held.

Parameters
none
Result
What help() prints
end the debugging: debugger.detach()
Source
src/modules/system/console/debugger_commands.odin:172

threads

threads() -> 

Gives one row for each thread of the debugged process: its number, its state, and the instruction of a thread that is held or stopped, with its procedure, its file and its line.

Parameters
none
Result
What help() prints
the threads of the debugged process: debugger.threads()
Source
src/modules/system/console/debugger_commands.odin:176

hold

hold() -> 

Stops one thread of the debugged process, and gives its row. The command stop stops a whole process by its name: this one holds one thread, which runs again with resume or continue_all.

  • thread: the number of a thread, as threads() gives it.
Parameters
Result
What help() prints
hold one thread of the debugged process: debugger.hold()
Source
src/modules/system/console/debugger_commands.odin:182

resume

resume() -> 

Lets one thread run again, and gives its row: a thread that hold stopped, or that a breakpoint, a watch or a step stopped. It is the export release of the service; release in the console closes a handle.

  • thread: the number of a thread that is held or stopped.
Parameters
Result
What help() prints
let one thread of the debugged process run: debugger.release()
Source
src/modules/system/console/debugger_commands.odin:189

continue_all

continue_all() -> 

Lets each thread of the debugged process run again, and gives one row for each thread.

Parameters
none
Result
What help() prints
let each thread of the debugged process run: debugger.continue_all()
Source
src/modules/system/console/debugger_commands.odin:192

registers

registers() -> 

Gives one row for each register of a held thread: the 16 general registers, rip with its procedure and its line, and rflags with the flags that are set.

  • thread: the number of a thread that is held or stopped.
Parameters
Result
What help() prints
the registers of a held thread: debugger.registers()
Source
src/modules/system/console/debugger_commands.odin:198

stack

stack() -> 

Gives one row for each frame of the stack of a held thread: the procedure, the file and the line of the instruction, then of each call, with the frame pointer and the return address.

  • thread: the number of a thread that is held or stopped.
Parameters
Result
What help() prints
the frames of the stack of a held thread: debugger.stack()
Source
src/modules/system/console/debugger_commands.odin:204

locals

locals(, ) -> 

Gives one row for each parameter and each local variable that is visible at the instruction of a frame: its name, its role, its type, its value or "not readable", and its location.

  • thread: the number of a thread that is held or stopped.
  • frame: the number of a frame, as stack gives it.
Parameters
Result
What help() prints
the variables of a frame: debugger.locals()
Source
src/modules/system/console/debugger_commands.odin:211

value

value(, , ) -> 

Gives one variable or one global by a path, as one row for each of its fields or of its elements.

  • thread, frame: as for locals. A global with its package (debug_target::rounds) needs no held thread.
  • path: a name, then steps: .field, [number], ^.
> value(0, 0, "pair.next^.first")
Parameters
Result
What help() prints
a variable or a global, by a path: debugger.value()
Source
src/modules/system/console/debugger_commands.odin:222

source

source(, ) -> 

Gives the source line of the instruction of a frame: its number, the path of its file and the hash of that file at the build. The system holds no source text; modustool call shows the line on the host when the file of the repository has that hash.

  • thread, frame: as for locals.
Parameters
Result
What help() prints
the source line of a frame: debugger.source()
Source
src/modules/system/console/debugger_commands.odin:229

break_at

break_at() -> 

Sets an execute breakpoint, and gives one row for each breakpoint of the debugger.

The debugger has four breakpoints, for breakpoints and watches together.

Parameters
Result
What help() prints
a breakpoint at a procedure or at a line: debugger.break_at()
Source
src/modules/system/console/debugger_commands.odin:238

breaks

breaks() -> 

Gives one row for each breakpoint of the debugger.

Parameters
none
Result
What help() prints
the breakpoints of the debugger: debugger.breaks()
Source
src/modules/system/console/debugger_commands.odin:240

break_remove

break_remove() -> 

Removes one breakpoint, and gives one row for each one that stays.

  • number: the number of a breakpoint, as breaks() gives it.
Parameters
Result
What help() prints
remove a breakpoint: debugger.break_remove()
Source
src/modules/system/console/debugger_commands.odin:244

watch

watch(, ) -> 

Sets a data breakpoint on bytes that the process writes, and gives one row for each breakpoint of the debugger.

  • place: an address (0x403010), or the path of a global with its package.
  • length: 1, 2, 4 or 8 bytes.
Parameters
Result
What help() prints
stop at a write of some bytes: debugger.watch()
Source
src/modules/system/console/debugger_commands.odin:251

step

step() -> 

Runs one instruction of a thread that is held or stopped, and gives its row at its new instruction.

  • thread: the number of a thread that is held or stopped.
Parameters
Result
What help() prints
one instruction of a held thread: debugger.step()
Source
src/modules/system/console/debugger_commands.odin:256

step_line

step_line() -> 

Runs a thread that is held or stopped until the source line of its instruction changes, and gives its row there.

  • thread: the number of a thread that is held or stopped.
Parameters
Result
What help() prints
a held thread, to its next source line: debugger.step_line()
Source
src/modules/system/console/debugger_commands.odin:261

step_over

step_over() -> 

Runs a thread that is held or stopped to the next source line of its procedure, and gives its row there: a call of the line runs to its end, and the thread does not stop inside it.

  • thread: the number of a thread that is held or stopped.
Parameters
Result
What help() prints
a held thread, to its next source line, over each call: debugger.step_over()
Source
src/modules/system/console/debugger_commands.odin:267

debug_memory

debug_memory(, ) -> 

Gives the bytes of the debugged process from an address, sixteen in each row. It is the export memory of the service; memory in the console gives the memory of the machine.

  • place: an address (0x403010), or the path of a global with its package.
  • count: 1 to 4096 bytes.
Parameters
Result
What help() prints
the bytes of the debugged process: debugger.memory()
Source
src/modules/system/console/debugger_commands.odin:275

events

events() -> 

Gives one row for each stop of a thread since the last call: the thread, the kind (breakpoint N, watch N, step), and the instruction with its procedure and its line.

Parameters
none
Result
What help() prints
the stops of the debugged process: debugger.events()
Source
src/modules/system/console/debugger_commands.odin:279

wait_stop

wait_stop() -> 

Waits until a thread of the debugged process stops, at most the given milliseconds (3000 at most), and gives the rows of events.

  • milliseconds: the longest wait.
Parameters
Result
What help() prints
wait for a stop of the debugged process: debugger.wait_stop()
Source
src/modules/system/console/debugger_commands.odin:285

stop_report

stop_report() -> 

Gives one row for each frame of the stop report of a disk process that stopped on a fault: the module, the procedure, the file and the line, from the debug object of its module in the store module_files. It needs no debug: the process stopped, and the root service kept its report. Row 0 also says what stopped it.

  • process: the nickname of the disk process.
> stop_report("visitor")
Parameters
Result
What help() prints
the frames of a disk process that faulted, named: debugger.stop_report()
Source
src/modules/system/console/debugger_commands.odin:297

record

record() -> 

Starts a process held before its first instruction, makes the service debugger its debugger for the console, records each process input of it from that instruction, then lets it run. It gives the row of the record: its state, its input points, its bytes, why it ended, its checkpoints, and the input point of a divergence. Memory that the process and another process both write is recorded too: the other process writes only while the process is at an input point.

  • process: the name of a module of the boot image.

The root service starts the module for the console, as start does, under the rule of debug.

> record("clock")
Parameters
Result
What help() prints
start a process recorded from its first instruction: debugger.record()
Source
src/modules/system/console/debugger_commands.odin:315

record_start

record_start() -> 

Asks the kernel to write each process input of the debugged process into an input history, and gives the row of the record. The kernel records only a process that did not run yet: record starts one.

> record_start()
Parameters
none
Result
What help() prints
record the inputs of the debugged process: debugger.record_start()
Source
src/modules/system/console/debugger_commands.odin:323

record_end

record_end() -> 

Ends the record of the debugged process, and gives the row of the record with why it ended. The history and its checkpoints stay until the next record, after the end of the debugging too.

Parameters
none
Result
What help() prints
end the record of the debugged process: debugger.record_end()
Source
src/modules/system/console/debugger_commands.odin:327

replay_start

replay_start() -> 

Runs the recorded module again from the history, and gives the row of the record: replaying, then replayed with why the replay ended. The replay reaches the same instructions with the same values, or stops at the first difference, whose input point is in the row. A replay sends nothing to any process.

> replay_start()
Parameters
none
Result
What help() prints
run the recorded module again from its history: debugger.replay_start()
Source
src/modules/system/console/debugger_commands.odin:337

replay_status

replay_status() -> 

Gives the row of the record of the console, also after the kernel ended it by itself (the process stopped, the history is full, the bound of one stint, a revocation) and after the debugging ended.

Parameters
none
Result
What help() prints
the record of the debugged process: debugger.replay_status()
Source
src/modules/system/console/debugger_commands.odin:341

replay_checkpoint

replay_checkpoint() -> 

Keeps a checkpoint of a held thread at the last input point of the record, and gives one row for each checkpoint: its number, its input point, the bytes of the history before it, the instruction and the stack pointer of the thread.

  • thread: the number of a thread that is held or stopped.
Parameters
Result
What help() prints
a checkpoint of a held thread: debugger.replay_checkpoint()
Source
src/modules/system/console/debugger_commands.odin:348

replay_step_back

replay_step_back() -> 

Gives the way back by some input points: the nearest checkpoint at or before the target point, and the input points that a replay runs from it to reach that point.

  • points: the input points to go back, from 1.
> replay_step_back(1)
Parameters
Result
What help() prints
the checkpoint and the points of a step back: debugger.replay_step_back()
Source
src/modules/system/console/debugger_commands.odin:358

watch_back

watch_back(, ) -> 

Gives the last input of the history that wrote a byte of a range, as one row: its input point, the bytes of the history before it, what wrote (page delta for a point copy or a shared page, kernel entry for bytes that the kernel copied), the first byte written and how many, at most 8 values, the instruction of the thread there, and the checkpoint and the input points of a replay to that write. A write by an instruction of the process is not an input, so it is not in the history.

  • address: the first byte of the range, as a decimal number: the console has no hexadecimal number (4206608 is 0x403010).
  • size: 1 to 4096 bytes.
> watch_back(4206608, 8)
Parameters
Result
What help() prints
the last input that wrote some bytes: debugger.watch_back()
Source
src/modules/system/console/debugger_commands.odin:375

where

where(, Condition) -> 

Gives the rows of a table whose field passes a condition, in their order.

  • table: a table of any record.
  • condition: a field of its record, an operator and a value, as block = 12. The field is a name of the record, never a variable. The operators are =, !=, <, <=, > and >=. An Integer or a handle field takes an Integer and each operator. A Text field takes a Text, and a status field the name of a member of its enum (level = Warning), with = and != only: the order of the members is no order of weight.

The result has the record of the table.

> columns(where(manual.running(), module = "calendar_fixed"), process, slot, module, replaces)
> log.records(0) |> where(level = Warning) |> where(process = "storage")

Errors, before any row is read: the records have no such field (the error lists their fields); the kind of the value is not the kind of the field: "error: where: the field code is Integer, the value is Text"; a name that names no member of the enum of a status (the error lists the members); an order on a Text or a status; a hash.

A Stream takes a condition too, and gives the same Stream: the console checks the condition on each record as it reads it, so the line reads no record that it does not keep (The line of the console, "Streams").

> output_counter.counts |> where(status = 404) |> first(3)
Parameters
  • Condition
Result
What help() prints
the rows of a table or a stream whose field passes a condition: where(t, block = 12)
Source
src/modules/system/console/tables.odin:196

sort

sort(, ) -> 

Gives the rows of a table in the increasing order of a field.

  • table: a table of any record.
  • field: the name of the field: integers by value, texts byte by byte.

Rows with one value keep their order, so two sorts give an order by two fields. The result has the record of the table.

> sort(columns(manual.handles("Write"), module, name, rights), "name")
Parameters
Result
What help() prints
the rows of a table in the order of a field
Source
src/modules/system/console/tables.odin:210

join

join(, , ) -> 

Gives one row for each pair of a row of the left table and a row of the right table that have one value of a field.

  • left, right: two tables of any records.
  • field: a field that both records have, of one kind.

The new record has each field of the left record, then each field of the right record whose name the left record does not have, at most 40 fields. Its name is <left>_<right>. The console writes its description in the format of the module contract.

> join(columns(manual.running(), process, hash), columns(manual.modules(), hash, name, code, exports), "hash")

Errors: the field is a text on one side and an integer on the other; the new record is larger than a record can be: choose fewer fields with columns first.

Parameters
Result
What help() prints
each pair of rows of two tables with one value of a field
Source
src/modules/system/console/tables.odin:229

columns

columns(, Field...) -> 

Gives the rows with only the fields that the names choose, in their order.

  • table: a table of any record, or a Stream.
  • fields: one name of a field of its record or more, separated by commas. A name is a field, never a variable or a text.

The new record keeps the name of the record. A table that columns made is not the table that an export takes: an export checks the whole record. On a Stream, it gives a Stream whose rows hold those fields; its conditions still read the whole record.

> columns(manual.importers("calendar_fixed"), module, name, replacement, import_slots)
> output_counter.counts |> columns(status) |> first(2)

Errors: a name names no field (the error lists the fields), before the line runs when the console knows the record on the left of |>.

Parameters
  • Field...
Result
What help() prints
the rows with the fields that the names choose: columns(t, a, b)
Source
src/modules/system/console/tables.odin:249

first

first(, ) -> 

Gives the first rows of a table, at most a count: a count larger than the table gives the whole table, and 0 or less gives no row.

On a Stream, it reads records until it has the count of rows that pass the conditions of the Stream, or until the stream ends, then closes the stream: the writer reads the end word Side_Closed. The Table has the rows only; the draw of a Stream shows its joined record and its gaps. Escape stops the read, and the line fails with the count of the rows that came.

Parameters
Result
What help() prints
the first rows of a table or of a stream
Source
src/modules/system/console/tables.odin:260

skip

skip(, ) -> 

Gives the rows of a table after its first rows: a count larger than the table gives no row, and 0 or less gives the whole table.

The console draws the first 20 rows of a table. skip(table, 20) gives the rows after them, and first(skip(table, 20), 20) the next 20.

Parameters
Result
What help() prints
the rows of a table after its first rows
Source
src/modules/system/console/tables.odin:268

rows

rows() -> 

Gives the count of rows of a table, as an Integer.

Its name is not count: the module probe exports count, and a command of a module hides a command of the console with its name.

Parameters
Result
What help() prints
the count of rows of a table
Source
src/modules/system/console/tables.odin:273

row

row(, ) -> 

Gives one row of a table as a Record, from 1. After r = row(t, 1), r.value reads one field of the first row.

Error: "row: the table has N rows, not a row M".

Parameters
Result
What help() prints
one row of a table, from 1
Source
src/modules/system/console/tables.odin:278

table

table() -> 

Gives the rows of a Stream until its end, as a Table.

  • stream: a Stream, with its conditions. A Table gives itself.

The line waits for the end record of the writer, or for an end word: its stop, a revocation. Escape stops the wait, and the line fails with the count of the rows that came.

> table(output_counter.counts |> where(status = 404))

Error: the rows pass the 32 KiB that a Table of a line keeps before the end of the stream: first(s, n) keeps the first rows.

Parameters
Result
What help() prints
the rows of a stream until its end
Source
src/modules/system/console/tables.odin:293

record_outputs

record_outputs() -> 

Gives one row for each record output that a module declares: its name, its record, and its line of help. The name is the second part of the typed name of the record output: output_counter.counts.

  • module: the name of a module of the boot image.
> record_outputs("output_counter")
output  record   about
counts  Counted  One record each time the writer counts, while a reader is wired.
1 row of Record_Output

Errors: no module of the boot image has the name.

Parameters
Result
What help() prints
the record outputs of a module: record_outputs("server")
Source
src/modules/system/console/tables.odin:309

stream_counts

stream_counts(Stream) -> 

Gives the counts of the writer of a record output: the records written, discarded with no reader (or that the condition of each reader left out), and refused as Full. They are the claim of the writer, as it published them at its last write before the console read them: at least as new as the joined record.

  • stream: a Stream, by its typed name.

The console wires the record output, waits for its first compartment, the joined record, which the writer writes at its next write, also when the condition of the Stream leaves that record out; then it reads the counts and closes the record stream. Escape stops the wait.

> stream_counts(output_counter.counts)
Writer_Counts
  written    12
  discarded  0
  refused    0
  held       0
  rings_past_gap  0
Parameters
  • Stream
Result
What help() prints
the counts of the writer of a record output: stream_counts(server.requests)
Source
src/modules/system/console/tables.odin:333

wire

wire(Stream, Record_Input) -> 

Gives the Table of one row of a wiring list: the record output from to the record input to, each by its typed name.

  • from: a Stream. Its first condition goes with the row, so the writer writes only the records that pass it.
  • to: a record input, by its typed name.

The row names its ends by their names; start(module, list) applies it, and + joins two lists. The record Wiring holds writer, output, reader, input, the text of the condition, and its terms (field, comparison, value_kind, integer, text).

> wire(where(output_counter.counts, status = 404), output_count_reader.counts)

Errors: the two records differ; one process at both ends; a Stream with more than one condition, or that columns cut.

Parameters
  • Stream
  • Record_Input
Result
What help() prints
one row of a wiring list, from a record output to a record input
Source
src/modules/system/console/tables.odin:352

keep

keep(Stream) -> 

Short form of a wiring list that sends a record output to collector.in.

Parameters
  • Stream
Result
What help() prints
a wiring list that keeps a record stream in collector
Source
src/modules/system/console/tables.odin:354

audit

audit() -> 

Short form of a wiring list that audits a service's log output in collector.in.

Parameters
Result
What help() prints
a wiring list that audits a service log in collector
Source
src/modules/system/console/tables.odin:356

merge

merge(Stream, Stream) -> 

Short form of a wiring list that merges two compatible record streams through merge.

Parameters
  • Stream
  • Stream
Result
What help() prints
a wiring list that merges two compatible record streams
Source
src/modules/system/console/tables.odin:358

facts

facts(, Fact_Type) -> 

Gives the facts of one fact type of a table of the rows of log.records, one row for each fact: the number, the time, the process and the level of the record, then each field of the fact type, in the order of its record.

  • table: rows of log.records, or of a command that keeps their fields (where, first, skip, sort).
  • fact: the name of a fact type, package.Type, as a writer declares it: log_reader.Fact_Probe. It is a name, not a text.

The console finds each module of the boot image that writes the fact type, and reads the values of the facts through log.fact_records. A row of another description of the same fact name is left out. The fields are names of the table: where takes them.

> log.records(0) |> facts(log_reader.Fact_Probe) |> where(probe_number = 7)

Errors: a name that no fact table of the boot image holds, before any call, with the fact names of its package; a table that is not rows of log.records; no connection to the service log.

Parameters
  • Fact_Type
Result
What help() prints
the fields of one fact type of the rows of log.records: facts(t, storage.Bad_Block)
Source
src/modules/system/console/facts.odin:102

Table wire form

A wire form of the module contract: one word of a call. Records of one description that follow each other (a table).

Text wire form

A wire form of the module contract: one word of a call. The address of a slice record {address, count} of UTF-8 bytes.

Record wire form

A wire form of the module contract: one word of a call. The address of a record: bytes with a fixed size and described fields (Record).

Handle wire form

A wire form of the module contract: one word of a call. A handle that the caller lends for the time of the call, in a register.

Integer wire form

A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.

Bytes wire form

A wire form of the module contract: one word of a call. Bytes with no description.

Error_Record struct

A struct of the package errors: 56 bytes, aligned on 8 bytes, 0 bytes of padding. The error record: what a call that failed says about why, as seven integers.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes

processes procedure of the package monitor

processes :: proc "c" (result: ^[]Process, error: ^errors.) -> i64

processes gives one row for each process that runs, from the reports of the kernel: its slot, its name, its state, the stop cause of a stopped process and the stop outcome of a process that stopped itself, its resident pages (the mapped pages with a page frame) and its mapped pages, its handles, threads, processor time in milliseconds, kernel entries, the time of its start in microseconds, and the hash of the file of a disk process.

src/modules/system/monitor/exports.odin:121

Integer type of the package interface_messages

Integer :: distinct i64

Typed argument payloads passed into MF2 evaluation.

src/library/modus/contract/interface_messages/message_format.odin:77

Locale type of the package language_tag

Locale :: struct {...}

Locale: a language tag as a record.

src/library/modus/contract/language_tag/locale.odin:33

records procedure of the package log

records :: proc "c" (after: i64, result: ^[]Record) -> i64

records gives the log records of the log scope of the caller from the number after on, one row each: the number, the time in microseconds, the process and its slot, the level, the count of its value runs, and the text.

src/modules/system/log/exports.odin:243

Fact_Probe type of the package log_reader

Fact_Probe :: struct {...}

The log fact of this process.

src/modules/tests/log_reader/main.odin:490

validate procedure of the package module

validate :: proc "contextless" (file: []u8) -> Error

validate checks all that a loader relies on before it maps a module:.

src/library/modus/contract/module/load.odin:126

Wiring type of the package output

Wiring :: struct {...}

One row of a list: one wiring, from its writer to its reader.

src/library/modus/contract/output/wiring_list.odin:81

counts global variable of the package output_counter

counts: system.Record_Output(Counted)

One record each time the writer counts, while a reader is wired.

src/modules/tests/output_counter/main.odin:28

stores procedure of the package storage_service

stores :: proc "c" (result: ^[]u8, error: ^errors.) -> i64

stores gives the generation of the disk, its blocks in use, and the commits, the commits that a read back refused, the commits whose root write or read back failed on the device (not taken: the next open decides), the blocks written (those of refused commits too) and the blocks read back with the time of those reads since the start of the service (a measure of the cost of the read back of each commit), then the stores that the caller may name, one line for each, with its objects, its trees, its versions, its blocks (a shared block counted one time), the blocks that two names share, its limit, the count of connections that hold its grant now, and its damage.

src/modules/system/storage/main.odin:793

remote_disallow procedure of the package console

remote_disallow :: proc "contextless" (arguments: []Value) -> Value

remote_disallow asks the root service to end the grant of the key of a.

src/modules/system/console/commands.odin:3217

remote_allow procedure of the package console

remote_allow :: proc "contextless" (arguments: []Value) -> Value

remote_allow asks the root service to allow the key of a client of.

src/modules/system/console/commands.odin:3186

start_from_disk procedure of the package console

start_from_disk :: proc "contextless" (arguments: []Value) -> Value

start_from_disk asks the root service to start a disk process, and waits.

src/modules/system/console/commands.odin:3014

set_languages procedure of the package settings_process

set_languages :: proc "c" (languages: ^system.Table_To_Read(language_tag.Locale), error: ^errors.) -> i64

set_languages sets the languages that the principal reads, the first first, and keeps them in the store: set_languages([language("fr-CA"), language("en")]).

src/modules/system/settings/main.odin:591

continue_all procedure of the package debugger

continue_all :: proc "c" (result: ^[]Thread_Row, error: ^errors.) -> i64

continue_all lets each thread of the process run again, and gives one row for each thread.

src/modules/system/debugger/exports.odin:503

fact_records procedure of the package log

fact_records :: proc "c" (after: i64, result: ^[]Fact_Row) -> i64

fact_records gives the log facts of the log scope of the caller from the number after on, one row each, with the bytes that its writer gave: the record form, the fact key, the module hash, the count of the value bytes, its part and its count of parts, and the value bytes of the record.

src/modules/system/log/exports.odin:491