Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/aienux/tree/main/native/omega/allen
# aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
branch `main` Branches Tags History
`aienux / native / omega / allen`
`8903a43` Keep a no-link adapter initialized and show the network scan in stats Drake Stapleton committed 2026-11-07
```
..
tests/
vendor/
ALPHA.md 2734
FONT.md 2020
LOCAL-MODEL.md 4746
PRESENTATION.md 2233
PROVIDER.md 4107
README.md 19406
SURFACE.md 2652
application.om 3864
base.om 1495
build-fw.sh 2838
build-local-model.sh 1585
build-one.sh 1554
code.om 3463
context.om 3815
courier.om 3836
demo.om 3050
efi-main.om 9060
font-data.om 3697
font.om 5196
gate.sh 12287
github.om 18439
golden.sh 784
http.om 6914
intent.om 6482
local-model.om 4589
look-chat.om 2976
look-home.om 20201
look-install.om 3263
look-mind.om 20685
look-night.om 23329
look-paint.om 37779
look-show.om 13228
look-sky.om 9844
look-skydata.om 33296
look-stat.om 5284
main.om 2114
memory.om 6496
net.om 31161
paint.om 2154
platform.om 568
presentation.om 2312
provider-core.om 3271
provider.om 814
reply.om 2151
repository-screen.om 8912
runtime.om 2348
scene-input.om 4221
scene.om 4986
scheduler.om 3449
session.om 3233
surface.om 3959
test-build.sh 1934
test-look-home-dirty.sh 1064
test-look-submit.sh 1468
tls-cert.om 20413
tls-crypto.om 11254
tls-p384.om 10324
tls.om 18959
view.om 1665
```
README.md
# Allen in seeded Omega (L694, WIP)
This directory contains handwritten seeded Omega implementations of Allen's transport-independent state, protocol, memory codecs, scene state, code layout and paint primitives. It compiles directly to static native Linux AArch64 ELF. It has no foreign implementation, interpreter, C translator, launcher or fallback.
It is not the complete iMac Allen replacement. The old production C/Rust paths remain live. No service, machine, physical disk or boot path was changed.
Build on Linux AArch64 from the pinned public compiler source. These are component build instructions, not a released interactive alpha. The compiler is omega-mv commit `b8bd1d03` on the local branch `fix/imac-net-L974-snp` (L974; a compiler change that needs its own review, not yet published), stacked on `81ab1900`, which the tag `allen-omc-pin-81ab1900` holds (the `feat/x86efi-file-word` head of #981, stacked on #980 register slots and #977 site tables; #980 is not merged, so neither commit is on omega-mv main): look-paint.om needs its `const` and `bitcast`, the firmware unit its larger trap/exit-site tables, look-install.om its `efi 11` file word, efi-main.om the `efi 8` that leaves an adapter refused only for its link initialized (so the next attempt sees the link) and reports each scan through `efi 0`, and the x86 back end's live-slot calls and register-resident slots make the firmware's per-pixel code run. From this repository root, with the branch fetched from its bundle (`imac-net-L974-omc.bundle` on the Spark under `~/handoffs/imac-boot-repair-20261107/net/`) until it is published:
```
git clone https://github.com/aien-dev/omega-mv.git build/allen-toolchain
git -C build/allen-toolchain fetch PATH/imac-net-L974-omc.bundle fix/imac-net-L974-snp
git -C build/allen-toolchain checkout --detach b8bd1d03
sha256sum build/allen-toolchain/seed/out/omc # expect 2eeab5147deb8320...
```
The committed `seed/out/omc` on that branch is the pinned compiler; its self-rebuild (`sh seed/omega-from-seed.sh` in a disposable clone) reproduces the same bytes. Self-rebuild equality does not establish diverse compiler ancestry; that qualification is a separate claim. The expected SHA-256 is `2eeab5147deb8320cb1bc7f86a5f3de534955ff89f76be2832155348706e0164`; pass the executable as `OMEGA_COMPILER` (on the Spark: `~/work/imac-net-L974-omc/seed/out/omc`).
The firmware image for the iMac is one unit of every module in the order `build-fw.sh` lists (platform, base, sha256, font, the look, surface, GitHub, HTTP, net, TLS, session, repository screen, runtime, courier, memory, intent, reply, context, application, chat, install, stopwatch, show, efi-main, demo):
```
OMEGA_COMPILER=... sh native/omega/allen/build-fw.sh target/BOOTX64.EFI
```
The typed line `stats` makes Allen say the stopwatch's last line (look-stat.om), network first: `STAT net=N e=E h=H l=L c=C p=P m=MAC s=...` gives the network flag, the last efi 8 / efi 0 error code, the SNP handle count, the LocateHandleBuffer status low byte, the number of scans, one probe step per handle (0 not reached, 1 no Mode, 2 MAC size, 3 IfType, 4 Start, 5 Initialize, 6 GetStatus, 7 state, 8 no link and kept initialized, 9 filter mask, a ReceiveFilters, b not opened, e chosen without link detection, f chosen with a link) and the chosen MAC. `install allen on this computer` copies the image to the internal EFI System Partition (look-install.om); nothing is written at boot.
Run the complete component gate:
```
sh native/omega/allen/gate.sh target/allen-omega-L694/fresh-output
```
On the shared Spark, prefix bootstrap and gate commands with `quiet-build`. For a compiler reconstructed elsewhere, set `OMEGA_COMPILER` to its executable path. The same fixed digest is mandatory; this setting does not permit an unqualified compiler. Paths containing spaces are supported. Build-orchestration checks are available through `sh native/omega/allen/test-build.sh COMPILER FRESH_OUTPUT`.
The output directory must be fresh. `build-one.sh` hashes the compiler before every invocation, rejects empty/wrong-machine/nonstatic ELF and marks only qualified output executable. Failed compilation leaves no published executable; existing outputs, including dangling links, are never replaced. The gate builds all modules together for every test, executes handwritten Omega test programs, compares a byte-exact independent memory fixture and rejects compiled behavioral mutants. The build uses POSIX shell, Git (source reconstruction), GNU file/text utilities, readelf, dd, xxd and sha256sum as external development tools. Existing Rust courier `--split` was used once as a fixture oracle, never as an Omega runtime dependency.
## Modules and API boundary
- `runtime.om`: one outstanding job, chat/code/follow-up, immediate code ack, ID exhaustion refusal, stale answer rejection, cancel/reset,20s slow-once and 30s silence timeout. Injected monotonic milliseconds, no clock syscall. 32 transcript lines of159 bytes, evict oldest whole line, restoration entry.
- `intent.om`: legacy intent word tables and JOB composition, preserving Allen and restored self/person names. No new canned ordinary answer table.
- `code.om`: CODE headers/escapes,128-byte pieces/32768-byte code,256 pieces, IEEE CRC32,800 lines, reorder/loss/duplicate handling; display only when whole.
- `reply.om`: SAY multipart/WAIT folding,159-byte answer capacity, one AGAIN retry for missing/bad code before giving up. Model text is always external input.
- `courier.om`: byte-compatible ALLEN-COURIER datagrams, session binding, JOB reassembly4096 bytes, ordered LINE queue8x319 bytes and duplicate receipt. This is protocol core, not a socket, Ethernet driver or cryptographic peer check.
- `scheduler.om`: serialized client lifecycle over that protocol. `qstart(run,now)` requires a nonzero caller-supplied boot/session ID. `qsubmit(now)` snapshots In/Inlen (1..4096 bytes), maps CR/LF to spaces, increments the bounded wire ID, and queues 1000-byte JOB parts. A new submission is refused while the previous job is unacknowledged or a send result is outstanding. Once acknowledged, a new submission explicitly abandons the previous reply queue; the runtime must still enforce its one-outstanding-conversation rule. `qcancel` discards pending sends, received lines and job state, retaining session ID/clock/keepalive state. `qnext(now,link)` publishes one datagram in Outb/Outlen, prioritizing pending GOT, then HELLO, then JOB. Consume those bytes before any other serializer. Call `qsent(now,success)` for each offered datagram, using actual whole-datagram send success, not an assumption; failed sends remain due. `qincoming(now)` consumes In/Inlen and returns refused0/accepted1/duplicate2. Drain accepted lines with `qtake`. GOT is only scheduled after a line is retained or recognized as a duplicate; queue-full and out-of-order input get no receipt. One pending GOT slot provides backpressure rather than silently losing acknowledgments. HELLO uses2s before readiness/after expiry and10s while ready; HI remains ready for strictly less than30s. Whole JOB sets retry after2s until ACK or LINE. All mutating timed entries refuse backward clocks. `qready(now)` is read-only. The provider owns a genuine monotonic millisecond clock, link state and actual datagram transport. No clock/socket, Ethernet or iMac attachment is claimed.
- `memory.om`:4096-byte AIENALM1 v2/v3/v4 and AIENNOT1 codecs. `Mem` is canonical decoded payload, `Unit` is input/staging, `Enc` is committed encoder output. SHA256(header0:32 || payload) is unkeyed integrity, never authorization or rollback freshness. Those independent proofs remain absent in this legacy format. `loadbeg` resets load state, `loadcopy(slot)` considers each valid copy once. `txbegin -> txwrite -> txflush -> txread` publishes store generation only after exact readback. Provider reads back into Unit and writes Enc to Tx's target. `nbegin -> nwrite -> nflush -> nread` verifies note writes before parent saves; provider must update the parent's note count only after nread succeeds. No disk syscall/driver is bound. Crash tests use explicit fixed simulated disk buffers.
- `context.om`: restores a512-slot catalog from already committed note records and appends bounded memory context to actual application JOBs. After loading canonical Mem through the memory codec, call `ctxbegin`; for each declared slot, place its4096-byte record in Unit and call `ctxtake(index)` exactly once, in any order. Return0 means refused/no visit,1 valid retained,2 damaged visit retained as gone. Deleted/damaged notes never enter model context. The catalog becomes ready only after every declared slot was visited. Cx contains declared count, visited count, readiness, damaged count and loading flag. Loading is refused during a live conversation or note/parent write transaction. The provider must keep the chosen Mem generation stable and restart catalog loading after any memory reload; this is not an incremental concurrent store interface. `ctxmeta(limit)` stages byte-exact legacy self/name/starts/fact and newest-live- note metadata into Meta/Mx without touching Unit, Enc or outgoing bytes. `ctxappend` appends all or none within the4096-byte JOB cap, preserving outgoing bytes/length/error on refusal. `appask` validates context before reading its variable-layout identity fields, includes the newest six live notes, and refuses incomplete catalogs/oversized context before conversation or wire IDs advance. SHA validation is still unkeyed integrity, not authentication. No physical disk loader/writer, note search index or concurrent mutation/commit provider is bound.
- `view.om`: legacy code row wrapping, continuation numbering and saturated scroll, bounded4096 rows. The full code remains held when the row index reaches capacity.
- `scene.om`: mood/say/eight thing kinds, placement/emphasis/arrival/direction, typed field bounds, four things/six fields/2048-byte input/12 lines.
- `scene-input.om`: `scdecode` consumes In/Inlen through bounded scene cleanup, restores the exact caller input and length, and fills the same Sc/Things/Stext output as the strict `scene` parser. Input and normalized output each have a 2048-byte cap. NUL or normalization overflow refuses the whole scene and clears published scene metadata. ASCII tabs/spaces collapse; CR, other control bytes and non-ASCII bytes are dropped, matching the legacy ASCII display boundary. Case-insensitive exact ``/`` tags hide their entire lines and all enclosed lines; an unclosed thought block hides the remainder. Lines beginning with triple backticks are discarded, not the enclosed scene. Supported markdown prefixes and keyword emphasis are stripped. Known kind/placement/mood words are case-folded without changing displayed field text. The first twelve retained canonical lines are eligible, including for mood-only and fallback decisions. If no recognized scene exists, the first short unrecognized line becomes the answer (159-byte cap); rejected known structured commands do not become prose. This fallback is deliberately stricter than legacy truncation/ellipsis. Nm[0..8] reports thinking, normalized bytes, tidying count, hidden lines, scratch-line bytes, eligible mood seen, invalid/overflow, fallback bytes and retained canonical-line count. Like other modules, calls must be serialized. This scene API is not yet connected to the application reply/display provider.
- `paint.om`: legacy integer color operations and soft-light pixel evaluation. Executed192x128 halo/heart component pose, colors from `ck_mind_draw`. This is not the full Allen sky/network animation, font, canvas item renderer or UI.
Fixed global pools model the platform boundary because seeded Omega globals cannot be passed as array parameters. Functions are serialized, not reentrant. Caller-owned metadata is trusted only where stated; lengths and external wire values are validated at entry. Kernel/platform ABI and object ownership wrappers must be specified when a qualified native provider exists.
## Bound conversation/provider API
`application.om` connects the runtime, intent/job builder, courier scheduler, CODE assembly and SAY/WAIT handling. This is an executed native core entry path, not a bound socket/device loop. The older development `main.om` stdio entry remains separate; it does not exercise this datagram binding.
- `appinit(run,now)` initializes one boot session using a nonzero unique run ID and actual monotonic milliseconds supplied by the future qualified provider. Reinitialization is refused rather than reusing job IDs.
- Put a prompt into In/Inlen, then `appask(now)`. It validates admission before adding a transcript entry, builds the real JOB text and queues it. Code requests expose the existing acknowledgement immediately. Restored facts and up to six newest live notes are included in the queued job. Busy, outstanding-send, pending-receipt, invalid-prompt and ID-exhaustion cases refuse admission.
- `apppoll(now,link)` advances silence/slow deadlines and returns whether one datagram is offered in Outb/Outlen. Send those exact bytes and call `appsent(now,success)` with the real whole-datagram outcome. Do not call core serializers yourself while a send is pending.
- Copy a received datagram into In/Inlen and call `appreceive(now)`. Its boolean reports transport acceptance, not acceptance of the inner reply. A[2] distinguishes visible text1, queued code recovery2, code give-up3, refused payload4, slow notice5 and silence timeout6; zero means no UI event. Consume events after each successful call; later successful calls may replace them. Answer/R[8], Code and transcript remain the actual retained content.
- `appcancel` cancels both layers; `appreset` additionally clears runtime session display/history state, without resetting conversation or wire counters.
A missing-code response queues AGAIN with the original conversation ID. The triggering LINE is acknowledged first, then AGAIN uses a new wire sequence. Consequently the two counters can differ; subsequent valid responses still bind correctly. Incoming reply parsing preserves any outstanding outgoing datagram. Old CODE cannot populate or change a code buffer during a newer chat request. WAIT updates the silence deadline without fabricating an answer. Silence timeout cancels courier retries as well as the conversation. Calls remain serialized; fixed global arrays are not thread-safe. Provider must not mix direct core queue operations with this application API.
## Runnable bound provider entry
`provider-core.om` and `provider.om` expose the actual bound application through versioned length-framed stdin/stdout. See PROVIDER.md for the exact 40-byte header, operations and status/event/body format. The gate produces the static native executable at `