Repository navigation
Agent KB_tools
grisun0 edited this page Oct 23, 2026
·
12 revisions
Pages: KB_tools.md, KB_tools_p2.md
- Doc: Docstring: tools/abi_stamp.c -- Build-time ABI manifest generator.
- Layer: utility
- Language: c
- Symbols:
-
main(function, line 14)int main(void)
-
- Depends on:
progs/minios_abi.h
- Doc: boot the MiniOS image in QEMU and drive the shell over the serial console with a list of...
- Layer: utility
- Language: sh
- Doc: boot the miniOS Wayland-mini desktop in one step.
- Layer: utility
- Language: py
- Symbols:
-
WlBootConfig(class, line 40)class WlBootConfig -
WlBoot(class, line 67)class WlBoot -
main(function, line 226)def main() -
__init__(method, line 68)def __init__(self, cfg) -
fail(method, line 75)def fail(self, msg) -
close(method, line 80)def close(self) -
boot(method, line 91)def boot(self) -
snapshot(method, line 107)def snapshot(self, timeout) -
wait_prompt(method, line 124)def wait_prompt(self) -
send(method, line 135)def send(self, line) -
send_wait(method, line 142)def send_wait(self, line, timeout) -
setup(method, line 154)def setup(self) -
qmp(method, line 165)def qmp(self, obj) -
headless(method, line 182)def headless(self) -
proxy(method, line 195)def proxy(self)
-
- Depends on:
kernel/time.c
- Doc: MiniOS syscall numbers vs Linux x86-64 truth.
- Layer: utility
- Language: py
- Symbols:
-
normalize(function, line 142)def normalize(minios_name) -
parse_abi(function, line 146)def parse_abi(path) -
parse_ld_stubs(function, line 157)def parse_ld_stubs(path) -
parse_dispatch(function, line 164)def parse_dispatch(path) -
main(function, line 177)def main()
-
- Doc: validate the MiniOS addon marketplace index.
- Layer: utility
- Language: py
- Symbols:
-
load_parser(function, line 22)def load_parser() -
main(function, line 31)def main()
-
- Doc: Architectural cohesion gate for MiniOS CI.
- Layer: utility
- Language: py
- Symbols:
-
load_cpg(function, line 23)def load_cpg(path) -
compute_cohesion(function, line 31)def compute_cohesion(community_nodes, community_edges) -
extract_communities(function, line 42)def extract_communities(cpg) -
main(function, line 58)def main()
-
- Doc: Kernel complexity gate for MiniOS CI.
- Layer: utility
- Language: py
- Symbols:
-
count_symbols(function, line 24)def count_symbols(filepath) -
load_approval(function, line 46)def load_approval(policy_path) -
main(function, line 61)def main()
-
- Doc: Fail-closed stub gate for unimplemented process syscalls. vfork has no implementation in this...
- Layer: testing
- Language: py
- Symbols:
-
Config(class, line 18)class Config -
handler_body(function, line 27)def handler_body(text, name) -
check_stubs(function, line 37)def check_stubs(text, cfg) -
main(function, line 52)def main()
-
- Doc: Verify KNOWLEDGE_BASE.md is in sync with code.
- Layer: utility
- Language: py
- Symbols:
-
regenerate_kb(function, line 24)def regenerate_kb() -
main(function, line 43)def main()
-
- Doc: Verify every mutate.sh mutant anchor matches its target file.
- Layer: utility
- Language: py
- Symbols:
-
Config(class, line 17)class Config -
bash_unquote(function, line 26)def bash_unquote(expr) -
unescaped_quote(function, line 41)def unescaped_quote(expr) -
parse_mutations(function, line 58)def parse_mutations(text) -
anchor_matches(function, line 84)def anchor_matches(repo, target, expr) -
main(function, line 105)def main()
-
- Doc: Check spinlock call-site discipline across kernel C sources.
- Layer: utility
- Language: py
- Symbols:
-
Config(class, line 23)class Config -
iter_functions(function, line 38)def iter_functions(path) -
check_file(function, line 64)def check_file(path) -
main(function, line 99)def main(argv)
-
- Doc: Detect surprising architectural connections.
- Layer: utility
- Language: py
- Symbols:
-
load_cpg(function, line 25)def load_cpg(path) -
build_graph(function, line 33)def build_graph(cpg) -
bfs_min_hops(function, line 56)def bfs_min_hops(nodes, edges, source, target_community, max_hops) -
find_surprising_connections(function, line 87)def find_surprising_connections(nodes, edges, min_hops) -
main(function, line 118)def main()
-
- Doc: Scoped audit gate for syscall user-pointer sanitization.
- Layer: utility
- Language: py
- Symbols:
-
Config(class, line 18)class Config -
split_functions(function, line 70)def split_functions(lines) -
checked_names(function, line 113)def checked_names(body) -
delegated_only(function, line 123)def delegated_only(body, alias) -
split_top_args(function, line 144)def split_top_args(argtext) -
audit_body(function, line 163)def audit_body(name, body) -
audit_file(function, line 218)def audit_file(path) -
main(function, line 229)def main()
-
- Doc: Host to MiniOS clipboard bridge plan builder.
- Layer: utility
- Language: py
- Symbols:
-
ClipBridgeConfig(class, line 30)class ClipBridgeConfig -
valid_dst(function, line 41)def valid_dst(name, cfg) -
printable_line(function, line 52)def printable_line(line, cfg) -
build_plan(function, line 59)def build_plan(text, dst, cfg) -
main(function, line 84)def main(argv)
-
- Doc: grid map to vanilla Doom PWAD writer and checker.
- Layer: utility
- Language: py
- Symbols:
-
DoomPwadConfig(class, line 52)class DoomPwadConfig -
PwadError(class, line 161)class PwadError(Exception) -
pad_tex(function, line 165)def pad_tex(raw) -
parse_grid(function, line 172)def parse_grid(text) -
grid_extents(function, line 195)def grid_extents(rows) -
is_wall(function, line 203)def is_wall(rows, row, col) -
flood_reachable(function, line 210)def flood_reachable(rows) -
validate_grid(function, line 240)def validate_grid(rows) -
cell_corners(function, line 269)def cell_corners(row, col) -
cell_class(function, line 279)def cell_class(cell) -
label_regions(function, line 291)def label_regions(rows) -
region_sector(function, line 326)def region_sector(region, door_tag) -
compile_geometry(function, line 371)def compile_geometry(rows, exit_pos, wall_side) -
compile_things(function, line 485)def compile_things(rows) -
seg_angle(function, line 506)def seg_angle(dx, dy) -
build_lumps(function, line 516)def build_lumps(rows) -
build_pwad(function, line 597)def build_pwad(rows) -
read_pwad(function, line 616)def read_pwad(data) -
check_pwad(function, line 639)def check_pwad(data) -
cmd_build(function, line 816)def cmd_build(grid_path, out_path) -
cmd_check(function, line 826)def cmd_check(path) -
main(function, line 834)def main(argv) -
vertex(function, line 386)def vertex(x, y) -
payload(function, line 650)def payload(name) -
check_multiple(function, line 655)def check_multiple(name, fmt)
-
- Imported by:
tests/test_doom_pwad.py
- Doc: tools/extract_shell.py -- Plan for Phase 6.1 shell extraction.
- Layer: utility
- Language: py
- Doc: — drive a graphics-program sequence under the GDB stub.
- Layer: utility
- Language: py
- Symbols:
-
rs(function, line 23)def rs(m, t) -
main(function, line 27)def main() -
send(function, line 65)def send(line) -
quit_doom(function, line 70)def quit_doom()
-
- Depends on:
kernel/time.c
- Doc: build MiniOS desktop art from user-supplied PNGs.
- Layer: utility
- Language: py
- Symbols:
-
write_atomic(function, line 71)def write_atomic(img, path) -
main(function, line 77)def main()
-
- Doc: generate 32x32 RGBA PNG icon files for the MiniOS desktop.
- Layer: utility
- Language: py
- Symbols:
-
make_png(function, line 179)def make_png(pixels, palette, width, height) -
make_chunk(function, line 209)def make_chunk(chunk_type, data) -
main(function, line 214)def main()
-
- Doc: Generate minifs.c for MiniOS.
- Layer: utility
- Language: py
- Doc: generate the zip test fixtures shipped on the ramdisk.
- Layer: data_access
- Language: py
- Symbols:
-
write_zip(function, line 28)def write_zip(path, entries) -
main(function, line 42)def main()
-
- Layer: utility
- Language: sh
- Doc: verify which C features the MiniOS kernel needs.
- Layer: utility
- Language: py
- Symbols:
-
SurveyConfig(class, line 18)class SurveyConfig -
iter_sources(function, line 34)def iter_sources(root) -
find_fnptr_hits(function, line 43)def find_fnptr_hits(path, text) -
find_asm_constraints(function, line 49)def find_asm_constraints(path, text) -
count_params(function, line 59)def count_params(params) -
survey(function, line 67)def survey(root) -
render_text(function, line 103)def render_text(findings) -
main(function, line 122)def main(argv)
-
- Doc: Docstring: Scoped Lisp validation for the MiniOS interpreter contract.
- Layer: utility
- Language: sh
- Symbols:
-
say(function, line 8) -
die(function, line 9) -
mutant(function, line 20) -
lisp_mut(function, line 41) -
mut_usage(function, line 63)
-
- Doc: Build the MiniOS bootable USB image and optionally write it to a device.
- Layer: utility
- Language: sh
- Symbols:
-
usage(function, line 40) -
wizard(function, line 56)
-
- Doc: Dump/inspect a MiniFS filesystem image.
- Layer: utility
- Language: py
- Symbols:
-
u16(function, line 13)def u16(d, o) -
u32(function, line 14)def u32(d, o) -
mode_str(function, line 16)def mode_str(m) -
FS(class, line 25)class FS -
main(function, line 105)def main() -
__init__(method, line 26)def __init__(self, fn) -
blk(method, line 29)def blk(self, n) -
_sb(method, line 30)def _sb(self) -
inode(method, line 38)def inode(self, i) -
read(method, line 47)def read(self, ino) -
resolve(method, line 67)def resolve(self, path) -
ls(method, line 86)def ls(self, ino, prefix)
-
- Doc: Check MiniFS filesystem consistency.
- Layer: utility
- Language: py
- Symbols:
-
u16(function, line 13)def u16(d, o) -
u32(function, line 14)def u32(d, o) -
crc32(function, line 15)def crc32(data) -
FSCK(class, line 23)class FSCK -
main(function, line 173)def main() -
__init__(method, line 24)def __init__(self, fn) -
_find_base(method, line 31)def _find_base(self) -
blk(method, line 49)def blk(self, n) -
_sb(method, line 52)def _sb(self) -
inode(method, line 58)def inode(self, i) -
inode_crc_ok(method, line 65)def inode_crc_ok(self, i) -
read(method, line 71)def read(self, ino) -
err(method, line 86)def err(self, msg) -
mark_block(method, line 88)def mark_block(self, n) -
scan_inode(method, line 93)def scan_inode(self, i) -
scan_dir(method, line 105)def scan_dir(self, ino) -
bitmap_free(method, line 137)def bitmap_free(self, start, count) -
check_counters(method, line 146)def check_counters(self) -
run(method, line 161)def run(self)
-
- Doc: preserve the guest's saves/ dir across image rebuilds.
- Layer: utility
- Language: py
- Symbols:
-
u16(function, line 53)def u16(d, o) -
u32(function, line 57)def u32(d, o) -
Image(class, line 61)class Image -
FS(class, line 85)class FS -
valid_name(function, line 216)def valid_name(nm) -
strict_name(function, line 224)def strict_name(nm) -
find_partition_base(function, line 233)def find_partition_base(fn) -
cmd_backup(function, line 271)def cmd_backup(img_path, stage) -
main(function, line 343)def main(argv) -
__init__(method, line 64)def __init__(self, fn, base) -
close(method, line 72)def close(self) -
blk(method, line 75)def blk(self, n) -
__init__(method, line 86)def __init__(self, img) -
inode(method, line 95)def inode(self, i) -
is_dir(method, line 110)def is_dir(self, st) -
read_file(method, line 113)def read_file(self, ino) -
listdir(method, line 146)def listdir(self, ino) -
read_file_dir(method, line 165)def read_file_dir(self, ino) -
read_file_raw(method, line 173)def read_file_raw(self, st) -
resolve(method, line 197)def resolve(self, path) -
walk(function, line 293)def walk(dir_ino, rel)
-
- Doc: — drive MiniOS through the MCP bridge, not by hand.
- Layer: utility
- Language: py
- Symbols:
-
Client(class, line 38)class Client -
main(function, line 100)def main() -
__init__(method, line 39)def __init__(self) -
request(method, line 56)def request(self, method, params) -
tool(method, line 77)def tool(self, name, params) -
close(method, line 87)def close(self)
-
- Depends on:
kernel/time.c
- Doc: — inject VGA-mode input and capture the framebuffer.
- Layer: utility
- Language: py
- Symbols:
-
read_serial(function, line 50)def read_serial(master, timeout) -
QMP(class, line 66)class QMP -
main(function, line 118)def main() -
__init__(method, line 67)def __init__(self, path) -
cmd(method, line 79)def cmd(self, obj) -
_recv(method, line 83)def _recv(self) -
mouse(method, line 98)def mouse(self, dx, dy, click) -
key(method, line 108)def key(self, qcode, up) -
screendump(method, line 114)def screendump(self, path)
-
- Depends on:
kernel/time.c
- Doc: host-side ring-minus-one debugger for MiniOS.
- Layer: utility
- Language: py
- Symbols:
-
HyperConfig(class, line 50)class HyperConfig -
RspCodec(class, line 73)class RspCodec -
QmpChannel(class, line 96)class QmpChannel -
GdbChannel(class, line 152)class GdbChannel -
Guest(class, line 211)class Guest -
FrameDiff(class, line 339)class FrameDiff -
HyperChecks(class, line 409)class HyperChecks -
run_selftest(function, line 491)def run_selftest() -
run_boot(function, line 523)def run_boot(checks, extra_shell, interactive) -
repl(function, line 561)def repl(guest) -
main(function, line 591)def main(argv) -
encode(method, line 77)def encode(payload) -
decode(method, line 85)def decode(frame) -
__init__(method, line 99)def __init__(self, path) -
_roundtrip(method, line 109)def _roundtrip(self, obj) -
raw(method, line 117)def raw(self, obj) -
screendump(method, line 121)def screendump(self, path) -
rel(method, line 126)def rel(self, dx, dy) -
key(method, line 132)def key(self, qcode) -
status(method, line 141)def status(self) -
close(method, line 145)def close(self) -
__init__(method, line 155)def __init__(self, port) -
_drain(method, line 162)def _drain(self) -
_cmd(method, line 168)def _cmd(self, payload) -
regs(method, line 181)def regs(self) -
read_mem(method, line 185)def read_mem(self, addr, length) -
halt(method, line 195)def halt(self) -
cont(method, line 201)def cont(self) -
close(method, line 204)def close(self) -
__init__(method, line 214)def __init__(self, with_gdb) -
_ser(method, line 248)def _ser(self) -
_reader(method, line 260)def _reader(self) -
snapshot(method, line 276)def snapshot(self) -
wait_for(method, line 280)def wait_for(self, marker, timeout) -
send(method, line 288)def send(self, line, settle) -
qmp_chan(method, line 298)def qmp_chan(self) -
gdb_chan(method, line 303)def gdb_chan(self) -
dump(method, line 308)def dump(self, name) -
stop(method, line 314)def stop(self) -
mean_diff(method, line 343)def mean_diff(a_path, b_path) -
cursor_positions(method, line 356)def cursor_positions(shot_path) -
count_cursors(method, line 394)def count_cursors(shot_path) -
moved_cursors(method, line 399)def moved_cursors(before_path, after_path) -
__init__(method, line 412)def __init__(self, guest) -
vga_idle(method, line 415)def vga_idle(self) -
vga_cursor(method, line 427)def vga_cursor(self) -
gfx_frames(method, line 439)def gfx_frames(self) -
pixel_oob(method, line 452)def pixel_oob(self) -
sys_trace(method, line 465)def sys_trace(self) -
_last_frames(method, line 476)def _last_frames(self) -
check(function, line 495)def check(ok, msg)
-
- Depends on:
kernel/time.c
- Doc: pack a CPython Lib tree into a zipimport stdlib.
- Layer: utility
- Language: py
- Symbols:
-
build_zip(function, line 22)def build_zip(lib_dir, out_zip, skip) -
main(function, line 41)def main()
-
- Doc: Create a MiniFS filesystem image for MiniOS.
- Layer: utility
- Language: py
- Symbols:
-
roundup4(function, line 28)def roundup4(v) -
div_round_up(function, line 31)def div_round_up(n, d) -
crc16(function, line 34)def crc16(data) -
crc32(function, line 42)def crc32(data) -
count_free(function, line 50)def count_free(bitmap, count) -
MiniFS(class, line 56)class MiniFS -
main(function, line 280)def main() -
__init__(method, line 57)def __init__(self, total_blocks) -
mark_inodes_used(method, line 80)def mark_inodes_used(self, start, count) -
mark_blocks_used(method, line 84)def mark_blocks_used(self, start, count) -
alloc_inode(method, line 88)def alloc_inode(self) -
alloc_block(method, line 94)def alloc_block(self) -
create_root(method, line 100)def create_root(self) -
seal_inode(method, line 108)def seal_inode(self, ino) -
create_inode(method, line 113)def create_inode(self, mode, links) -
inode_set_size(method, line 120)def inode_set_size(self, ino, size) -
inode_set_block(method, line 124)def inode_set_block(self, ino, logblk, phys) -
add_dir_entry(method, line 154)def add_dir_entry(self, dir_ino, name, child_ino, ftype) -
claim_name(method, line 192)def claim_name(self, parent_ino, name, is_dir) -
write_file(method, line 205)def write_file(self, parent_ino, name, data) -
write_dir(method, line 224)def write_dir(self, parent_ino, name) -
serialize(method, line 236)def serialize(self) -
pack_tree(function, line 310)def pack_tree(parent_ino, path, rel)
-
- Doc: Build baseq2/pak1.pak carrying the player model.
- Layer: utility
- Language: py
- Symbols:
-
main(function, line 29)def main()
-
- Doc: Build a MiniOS ramdisk image from files in a directory tree.
- Layer: utility
- Language: py
- Symbols:
-
read_fname_bytes(function, line 41)def read_fname_bytes(kernel_h_path) -
pack_name(function, line 64)def pack_name(path, common) -
main(function, line 74)def main()
-
- Doc: regenerate tls_roots.h from the DER files in tls_roots_src/.
- Layer: utility
- Language: sh
- Doc: Build progs/topogpt3/vocab.bin from the GPT-2 encoder.json.
- Layer: utility
- Language: py
- Symbols:
-
bytes_to_unicode(function, line 18)def bytes_to_unicode() -
main(function, line 35)def main(encoder_path, vocab_path)
-
Next: KB_tools_p2.md
Generated offline by readmenator from commit cd87980b5eb5. Edits here are overwritten by readmenator . --rebuild.
Start
Wiki
- community_0_headers_kernel
- community_10_orphans
- community_1_progs_doomgeneric_d_englsh
- community_2_progs_src
- community_3_progs_doomgeneric_p_spec
- community_4_tools_tls_crypto
- community_5_headers_vga_fb
- community_6_progs_doomgeneric_net_defs
- community_7_headers_batch
- community_8_headers_tick
- community_9_tools_doom_pwad
- concepts
- queries
- REPORT
Agent Docs
- API
- API_p10
- API_p11
- API_p12
- API_p13
- API_p14
- API_p15
- API_p16
- API_p17
- API_p18
- API_p19
- API_p2
- API_p20
- API_p21
- API_p3
- API_p4
- API_p5
- API_p6
- API_p7
- API_p8
- API_p9
- ARCHITECTURE
- ARCHITECTURE_p2
- ARCHITECTURE_p3
- ARCHITECTURE_p4
- CONCEPTS
- GOTCHAS
- INDEX
- INDEX_p2
- KB_asm
- KB_boot
- KB_doomgeneric
- KB_doomgeneric_p10
- KB_doomgeneric_p11
- KB_doomgeneric_p12
- KB_doomgeneric_p2
- KB_doomgeneric_p3
- KB_doomgeneric_p4
- KB_doomgeneric_p5
- KB_doomgeneric_p6
- KB_doomgeneric_p7
- KB_doomgeneric_p8
- KB_doomgeneric_p9
- KB_drivers
- KB_drivers_p2
- KB_file
- KB_freedomui
- KB_fs
- KB_headers
- KB_headers_arch_x86
- KB_headers_drivers
- KB_headers_kernel
- KB_headers_p2
- KB_headers_p3
- KB_headers_p4
- KB_headers_p5
- KB_headers_p6
- KB_kernel
- KB_kernel_p2
- KB_kernel_p3
- KB_kernel_p4
- KB_lib
- KB_lisp
- KB_lua
- KB_mcp
- KB_minios
- KB_misc
- KB_misc_p2
- KB_misc_p3
- KB_mm
- KB_net
- KB_nuklear
- KB_pokemon
- KB_progs
- KB_quake2generic
- KB_root
- KB_src
- KB_src_p2
- KB_src_p3
- KB_tests
- KB_tests_p2
- KB_tls_u
- KB_tools
- KB_tools_p2
- KB_wl
- KB_x86
- MEMORY
- SECURITY
- SYMBOLS
- SYMBOLS_p10
- SYMBOLS_p11
- SYMBOLS_p12
- SYMBOLS_p13
- SYMBOLS_p14
- SYMBOLS_p15
- SYMBOLS_p16
- SYMBOLS_p17
- SYMBOLS_p18
- SYMBOLS_p19
- SYMBOLS_p2
- SYMBOLS_p20
- SYMBOLS_p21
- SYMBOLS_p22
- SYMBOLS_p23
- SYMBOLS_p24
- SYMBOLS_p25
- SYMBOLS_p26
- SYMBOLS_p27
- SYMBOLS_p3
- SYMBOLS_p4
- SYMBOLS_p5
- SYMBOLS_p6
- SYMBOLS_p7
- SYMBOLS_p8
- SYMBOLS_p9
Recipes