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/omega-mv/blob/main/tools/source-aware/sa # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tools / source-aware / sa` 17 lines ยท 739 bytes Raw Blame History 1 #!/bin/sh 2 # Transport only; all parsing, typing, hashing and decisions execute in native Omega. 3 set -eu 4 cd "$(dirname "$0")/../.." 5 [ "$#" = 1 ] || { echo BAD_COMMAND >&2; exit 64; } 6 case "$1" in 7 encode) mode='\001';; decode) mode='\002';; identity) mode='\003';; 8 provenance) mode='\004';; replay) mode='\005';; legality) mode='\006';; 9 *) echo BAD_COMMAND >&2; exit 64;; 10 esac 11 build=${SA_BUILD:-build/L574} 12 [ -x "$build/sa" ] || { echo 'MISSING_IMPLEMENTATION: run tools/source-aware/build' >&2; exit 69; } 13 tmp=$(mktemp -d) 14 trap 'rm -f "$tmp/out"; rmdir "$tmp"' EXIT HUP INT TERM 15 # The native entry reads through EOF and checks the bounded input before output. 16 { printf "$mode"; cat; } | "$build/sa" > "$tmp/out" || exit "$?" 17 cat "$tmp/out"