code: protected String getType(String script) {
          int i = script.indexOf(':');
          return i < 0 ? "" : script.substring(0, i);
      }
docs: Extracts the action type prefix.
  
  @param script The script.
  @return The action type, or empty string if none.