1 2#------------------------------------------------------------------------------ 3# $File: k9,v 1.1 2026/03/20 13:59:12 christos Exp $ 4# k9: file(1) magic for K9 Self-Validating Components 5# URL: https://github.com/hyperpolymath/k9-svc 6# From: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> 7 8# K9 files are self-validating components using the must-just-nickel triad. 9# They begin with the ASCII magic number "K9!" (0x4B 0x39 0x21) and use a 10# tiered security model: Kennel (data only), Yard (validation), Hunt (full 11# execution with cryptographic signature). 12# Specification: https://github.com/hyperpolymath/standards/blob/main/k9-svc/SPEC.adoc 13# MIME type: application/vnd.k9+nickel 14 15# K9 magic number: "K9!" at byte offset 0 160 string K9! K9 Self-Validating Component 17!:mime application/vnd.k9+nickel 18!:ext k9 19 20# Detect security level from content following the magic number 21>&0 search/1024 security_level:\ 'Kennel K9 Self-Validating Component (Kennel level, data only) 22 23>&0 search/1024 security_level:\ 'Yard K9 Self-Validating Component (Yard level, validation) 24 25>&0 search/1024 security_level:\ 'Hunt K9 Self-Validating Component (Hunt level, executable) 26 27# K9 Nickel contract files (.k9.ncl) -- pedigree definition 280 search/256 K9Pedigree K9 Nickel contract (pedigree definition) 29!:mime application/vnd.k9+nickel 30!:ext k9.ncl/ncl 31!:strength -10 32