Script Structure
đ Description
A script in NAVA is a declarative automation description written in the .nava format (plain JSON).
It defines what to do, what to work with, and how exactly to perform actions â in a minimalistic and human-readable way.
Typically, everything is defined in a single .nava file: a flow of actions (flow), data context (context), and execution environment parameters (environment).
If needed, context and environment can be placed in separate files â for example, to reuse the same context across scripts or define environment centrally.
đī¸ File Naming and Organization
While a .nava file can include all parts of the script, it's recommended to follow these conventions when splitting content into separate files:
File Name | Purpose | Format |
---|---|---|
*.nava |
Main script file with any name | JSON |
context.json |
Context data: targets and other inputs | JSON |
environment.json |
Execution environment parameters | JSON |
đ§Š Script Structure
The .nava file is a full-fledged JSON object script
, without wrappers or extra structure â it starts directly with the script content.
Field | Type | Required | Description | Default value |
---|---|---|---|---|
name |
string | Human-readable script name. Used in logs and UI. | Unnamed Script | |
description |
string | Script description (e.g. purpose, author, date). | ||
debugMode |
bool | Enables debug mode with extra logging. | false | |
flow |
NavaAction[] | Array of automation steps, each represented as a NavaAction object. | ||
environment |
NavaEnvironment | Execution environment settings: browser, headless, viewport, etc. | Must be provided either in the script or via environment.json | |
context |
NavaContext | Context data â variables, targets, input parameters. | Must be provided either in the script or via context.json | |
watcher |
WatcherSettings | Watcher mode configuration object (WatcherSettings). |
đ§Šī¸ Watcher Settings Structure
Parameters that control cyclic execution of the script in watcher mode.
Field | Type | Required | Description | Default value |
---|---|---|---|---|
enabled |
bool | Enables watcher mode â the script will run periodically. | false | |
intervalMs |
int | Interval between script runs in watcher mode (in milliseconds). | 60000 |