Nostrscript is the thing @jb55 used to brag about which eventually became nostrdb (I think). AFAIK a spec or library was never published. I also played around with a lua scripting language: 
GitHub
GitHub - coracle-social/ostrich-script-js: OstrichScript is a convention for extending nostr clients with user-defined functionality.
OstrichScript is a convention for extending nostr clients with user-defined functionality. - coracle-social/ostrich-script-js