Purpose
Themain package is not a reusable library surface. Its job is to assemble the default hrns application from the reusable packages.
Current startup behavior
main.go performs four concrete tasks:
1. Load skills
It calls:load_skill with skills.NewLoadSkillTool(...).
2. Load agents
The bundled app registers built-in agents from theagents package and also loads file-system agents from:
./.hrns/agents~/.hrns/agents
3. Build the default tool map
The default tool map includes:read_filelist_fileswrite_filerun_commandweb_fetchload_skill
4. Start the bundled runner
The package creates:Run(ctx). The TUI composes the runtime system message from the selected agent or base prompt plus the passed skill metadata.
Provider loading, onboarding, client creation, mode detection, and loop creation now happen inside tui.Run(...).
When to reuse it
In most cases, you should not reusemain directly. If you want a custom prompt, custom tools, or a different UI, copy the wiring pattern into your own program and compose the packages yourself.