◢███◤      ◢██◤                            ◢██◤                            
     ◢██◤       ◢██◤                            ◢██◤                             
    ◢██◤       ◢██◤                            ◢██◤                              
   ◢██◤       ◢██◤                            ◢██◤                               
  ◢██◤       ◢██◤                            ◢██◤                                
◢███◤       ◢██◤                            ◢██◤                          ◥██◣   
◥███       ◢█████◣    ◢████████◤ ◢███████◤ ◢██◤ ◢██◤                 ◢██◤   ██◣  
 ███      ◢███████◣        ◢██◤ ◢██◤ ◢██◤ ◢███████◤                 ◢██◤    ███  
 ███     ◢██◤  ◢██◤ ◢████████◤ ◢██◤      ◢█████◣                   ◢██◤     ███  
 ███    ◢██◤  ◢██◤ ◢██◤  ███◤ ◢██◤ ◢██◤ ◢██◤◥███◣                 ◢██◤      ███  
 ◥██   ◢██◤  ◢██◤ ◢████████◤ ◢███████◤ ◢██◤  ◥███◣               ◢██◤       ███◣ 
  ◥██◣                                                          ◢██◤       ◢███◤ 
                                 ◢███◤ ◢███◤ ◢██◤  ◢██◤ ◢█████████◤       ◢██◤   
                                ◢█████████◤ ◢██◤  ◢██◤ ◢██◤  ████◤       ◢██◤    
                               ◢██◤◢█◤◢██◤ ◢██◤  ◢██◤ ◢██◤   ███◤       ◢██◤     
                              ◢██◤   ◢██◤ ◢████████◤ ◢█████████◤       ◢██◤      
                             ◢██◤   ◢██◤ ◢████████◤ ◢█████████◤      ◢███◤       

0008
[Idea] context.top_script
9etmqs
Name tbd, but basically, the name of the script that was run on the CLI. Similar to context.calling_script, in that regard. It would be set in the context arg for all script calls (including the top level script itself, where it would be the same as context.this_script) and in scriptors. Use-cases: *) Scripts like corp auth often work both based on the caller (i.e. only do stuff if a corpy is calling a script) *and* calling script (i.e. don't let a rival call corp auth to snoop on your user list; fail when called from a rival's script). However, there is no "real" way to tell more than 1 level up, unless you can convince all your corpies to pass context along (and trust them all). You can kinda guess at what is going on with advanced JS stuff (but even that is neither foolproof nor sufficient). At least having context.top_script lets you know the script that was actually run on the command line, so that you can guess if things are maybe-nefarious. *) scriptors right now have no idea what is calling them (other than the aforementioned advanced JS trickery, which still isn't foolproof or sufficient); Since scriptors are passed to the top script, context.top_script gives them a decent idea of where they are being used (even if the top script doesn't actually call them, knowing it is useful)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -