ultravisor 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.babelrc +6 -0
  2. package/.browserslistrc +1 -0
  3. package/.browserslistrc-BACKUP +1 -0
  4. package/.gulpfile-quackage-config.json +7 -0
  5. package/.gulpfile-quackage.js +2 -0
  6. package/CONTRIBUTING.md +50 -0
  7. package/README.md +34 -0
  8. package/debug/Harness.js +2 -1
  9. package/docs/.nojekyll +0 -0
  10. package/docs/_sidebar.md +18 -0
  11. package/docs/_topbar.md +7 -0
  12. package/docs/architecture.md +103 -0
  13. package/docs/cover.md +15 -0
  14. package/docs/features/api.md +230 -0
  15. package/docs/features/cli.md +182 -0
  16. package/docs/features/configuration.md +245 -0
  17. package/docs/features/manifests.md +177 -0
  18. package/docs/features/operations.md +292 -0
  19. package/docs/features/scheduling.md +179 -0
  20. package/docs/features/tasks.md +1857 -0
  21. package/docs/index.html +39 -0
  22. package/docs/overview.md +75 -0
  23. package/docs/quickstart.md +167 -0
  24. package/docs/retold-catalog.json +24 -0
  25. package/docs/retold-keyword-index.json +19 -0
  26. package/package.json +5 -2
  27. package/source/Ultravisor.cjs +2 -2
  28. package/source/cli/Ultravisor-CLIProgram.cjs +38 -0
  29. package/source/cli/commands/Ultravisor-Command-ScheduleOperation.cjs +26 -2
  30. package/source/cli/commands/Ultravisor-Command-ScheduleTask.cjs +26 -2
  31. package/source/cli/commands/Ultravisor-Command-ScheduleView.cjs +22 -0
  32. package/source/cli/commands/Ultravisor-Command-SingleOperation.cjs +49 -1
  33. package/source/cli/commands/Ultravisor-Command-SingleTask.cjs +51 -1
  34. package/source/cli/commands/Ultravisor-Command-Stop.cjs +4 -0
  35. package/source/cli/commands/Ultravisor-Command-UpdateTask.cjs +91 -0
  36. package/source/config/Ultravisor-Default-Command-Configuration.cjs +6 -1
  37. package/source/services/Ultravisor-Hypervisor-Event-Base.cjs +18 -1
  38. package/source/services/Ultravisor-Hypervisor-State.cjs +213 -0
  39. package/source/services/Ultravisor-Hypervisor.cjs +225 -1
  40. package/source/services/Ultravisor-Operation-Manifest.cjs +150 -1
  41. package/source/services/Ultravisor-Operation.cjs +190 -1
  42. package/source/services/Ultravisor-Task.cjs +339 -1
  43. package/source/services/events/Ultravisor-Hypervisor-Event-Cron.cjs +71 -1
  44. package/source/services/tasks/Ultravisor-Task-Base.cjs +264 -0
  45. package/source/services/tasks/Ultravisor-Task-CollectValues.cjs +188 -0
  46. package/source/services/tasks/Ultravisor-Task-Command.cjs +65 -0
  47. package/source/services/tasks/Ultravisor-Task-CommandEach.cjs +190 -0
  48. package/source/services/tasks/Ultravisor-Task-Conditional.cjs +104 -0
  49. package/source/services/tasks/Ultravisor-Task-DateWindow.cjs +72 -0
  50. package/source/services/tasks/Ultravisor-Task-GeneratePagedOperation.cjs +336 -0
  51. package/source/services/tasks/Ultravisor-Task-LaunchOperation.cjs +143 -0
  52. package/source/services/tasks/Ultravisor-Task-LaunchTask.cjs +146 -0
  53. package/source/services/tasks/Ultravisor-Task-LineMatch.cjs +158 -0
  54. package/source/services/tasks/Ultravisor-Task-Request.cjs +56 -0
  55. package/source/services/tasks/Ultravisor-Task-Solver.cjs +89 -0
  56. package/source/services/tasks/Ultravisor-Task-TemplateString.cjs +93 -0
  57. package/source/services/tasks/rest/Ultravisor-Task-GetBinary.cjs +127 -0
  58. package/source/services/tasks/rest/Ultravisor-Task-GetJSON.cjs +119 -0
  59. package/source/services/tasks/rest/Ultravisor-Task-GetText.cjs +109 -0
  60. package/source/services/tasks/rest/Ultravisor-Task-GetXML.cjs +112 -0
  61. package/source/services/tasks/rest/Ultravisor-Task-RestRequest.cjs +499 -0
  62. package/source/services/tasks/rest/Ultravisor-Task-SendJSON.cjs +150 -0
  63. package/source/services/tasks/stagingfiles/Ultravisor-Task-CopyFile.cjs +110 -0
  64. package/source/services/tasks/stagingfiles/Ultravisor-Task-ListFiles.cjs +89 -0
  65. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadBinary.cjs +87 -0
  66. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadJSON.cjs +67 -0
  67. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadText.cjs +66 -0
  68. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadXML.cjs +69 -0
  69. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteBinary.cjs +95 -0
  70. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteJSON.cjs +96 -0
  71. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteText.cjs +99 -0
  72. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteXML.cjs +102 -0
  73. package/source/web_server/Ultravisor-API-Server.cjs +463 -3
  74. package/test/Ultravisor_tests.js +6097 -1
  75. package/webinterface/.babelrc +6 -0
  76. package/webinterface/.browserslistrc +1 -0
  77. package/webinterface/.browserslistrc-BACKUP +1 -0
  78. package/webinterface/.gulpfile-quackage-config.json +7 -0
  79. package/webinterface/.gulpfile-quackage.js +2 -0
  80. package/webinterface/css/ultravisor.css +121 -0
  81. package/webinterface/html/index.html +32 -0
  82. package/webinterface/package.json +39 -0
  83. package/webinterface/source/Pict-Application-Ultravisor-Configuration.json +15 -0
  84. package/webinterface/source/Pict-Application-Ultravisor.js +414 -0
  85. package/webinterface/source/providers/PictRouter-Ultravisor-Configuration.json +42 -0
  86. package/webinterface/source/views/PictView-Ultravisor-BottomBar.js +65 -0
  87. package/webinterface/source/views/PictView-Ultravisor-Dashboard.js +236 -0
  88. package/webinterface/source/views/PictView-Ultravisor-Layout.js +83 -0
  89. package/webinterface/source/views/PictView-Ultravisor-ManifestList.js +273 -0
  90. package/webinterface/source/views/PictView-Ultravisor-OperationEdit.js +243 -0
  91. package/webinterface/source/views/PictView-Ultravisor-OperationList.js +141 -0
  92. package/webinterface/source/views/PictView-Ultravisor-Schedule.js +280 -0
  93. package/webinterface/source/views/PictView-Ultravisor-TaskEdit.js +220 -0
  94. package/webinterface/source/views/PictView-Ultravisor-TaskList.js +248 -0
  95. package/webinterface/source/views/PictView-Ultravisor-TimingView.js +420 -0
  96. package/webinterface/source/views/PictView-Ultravisor-TopBar.js +147 -0
package/.babelrc ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "presets": [
3
+ "@babel/preset-env"
4
+ ],
5
+ "sourceMaps": "both"
6
+ }
@@ -0,0 +1 @@
1
+ > 0.01%
@@ -0,0 +1 @@
1
+ since 2018
@@ -0,0 +1,7 @@
1
+ {
2
+ "EntrypointInputSourceFile": "/Users/stevenvelozo/Code/retold/modules/utility/ultravisor/source/Ultravisor.js",
3
+ "LibraryObjectName": "Ultravisor",
4
+ "LibraryOutputFolder": "/Users/stevenvelozo/Code/retold/modules/utility/ultravisor/dist/",
5
+ "LibraryUniminifiedFileName": "ultravisor.compatible.js",
6
+ "LibraryMinifiedFileName": "ultravisor.compatible.min.js"
7
+ }
@@ -0,0 +1,2 @@
1
+ require('/Users/stevenvelozo/Code/retold/node_modules/quackage/gulp/Quackage-Gulpfile.js');
2
+ require('/Users/stevenvelozo/Code/retold/node_modules/quackage/gulp/Quackage-Gulpfile.js');
@@ -0,0 +1,50 @@
1
+ # Contributing to Retold
2
+
3
+ We welcome contributions to Retold and its modules. This guide covers the expectations and process for contributing.
4
+
5
+ ## Code of Conduct
6
+
7
+ The Retold community values **empathy**, **equity**, **kindness**, and **thoughtfulness**. We expect all participants to treat each other with respect, assume good intent, and engage constructively. These values apply to all interactions: pull requests, issues, discussions, and code review.
8
+
9
+ ## How to Contribute
10
+
11
+ ### Pull Requests
12
+
13
+ Pull requests are the preferred method for contributing changes. To submit one:
14
+
15
+ 1. Fork the module repository you want to change
16
+ 2. Create a branch for your work
17
+ 3. Make your changes, following the code style of the module you are editing
18
+ 4. Ensure your changes have test coverage (see below)
19
+ 5. Open a pull request against the module's main branch
20
+
21
+ **Submitting a pull request does not guarantee it will be accepted.** Maintainers review contributions for fit, quality, and alignment with the project's direction. A PR may be declined, or you may be asked to revise it. This is normal and not a reflection on the quality of your effort.
22
+
23
+ ### Reporting Issues
24
+
25
+ If you find a bug or have a feature suggestion, open an issue on the relevant module's repository. Include enough detail to reproduce the problem or understand the proposal.
26
+
27
+ ## Test Coverage
28
+
29
+ Every commit must include test coverage for the changes it introduces. Retold modules use Mocha in TDD style. Before submitting:
30
+
31
+ - **Write tests** for any new functionality or bug fixes
32
+ - **Run the existing test suite** with `npm test` and confirm all tests pass
33
+ - **Check coverage** with `npm run coverage` if the module supports it
34
+
35
+ Pull requests that break existing tests or lack coverage for new code will not be merged.
36
+
37
+ ## Code Style
38
+
39
+ Follow the conventions of the module you are working in. The general Retold style is:
40
+
41
+ - **Tabs** for indentation, never spaces
42
+ - **Plain JavaScript** only (no TypeScript)
43
+ - **Allman-style braces** (opening brace on its own line)
44
+ - **Variable naming:** `pVariable` for parameters, `tmpVariable` for temporaries, `libSomething` for imports
45
+
46
+ When in doubt, match what the surrounding code does.
47
+
48
+ ## Repository Structure
49
+
50
+ Each module is its own git repository. The [retold](https://github.com/stevenvelozo/retold) repository tracks module organization but does not contain module source code. Direct your pull request to the specific module repository where your change belongs.
package/README.md CHANGED
@@ -62,6 +62,26 @@ Tasks can be executed based on a number of scenarios:
62
62
  * After a condition is met (a condition in a browser, a disk drops below 5g)
63
63
  * After another task is completed (ffmpeg returns successfully transcoding)
64
64
 
65
+ #### Task Model
66
+
67
+ Each task has at minimum a GUID, Code and Name, as well as a type and
68
+ parameters. There is also a description to store markdown content about the
69
+ task.
70
+
71
+ #### Task Types
72
+
73
+ Tasks have a type which dictates how they are executed:
74
+
75
+ * Command - a shell command executed on the node
76
+ * Browser - a headless browser task that can navigate, click and interact
77
+ * Browser Read - a headless browser task that only reads data from pages
78
+ * Browser Action - a click, navigation or data fill action for a browser
79
+ * Request - an HTTP request task for pulling/pushing data from/to APIs
80
+ * Store File - a task for storing files in the output file store
81
+ * Read File - a task for reading files from the output file store
82
+ * Database Table - a task for creating a table in the output data store
83
+ * Integration - a meadow integration task
84
+
65
85
  ### Nodes
66
86
 
67
87
  Any execution of Ultravisor. Can be distributed across multiple machines.
@@ -117,3 +137,17 @@ meant to be a persistent storage location that is accessible across nodes.
117
137
  The output data store is a flexible database for storing final output data from
118
138
  operations. This can be used to store structured data, metadata, or any other
119
139
  information that needs to be queried or analyzed later.
140
+
141
+ ## Related Packages
142
+
143
+ - [orator](https://github.com/stevenvelozo/orator) - API server abstraction
144
+ - [pict](https://github.com/stevenvelozo/pict) - MVC application framework
145
+ - [fable](https://github.com/stevenvelozo/fable) - Application services framework
146
+
147
+ ## License
148
+
149
+ MIT
150
+
151
+ ## Contributing
152
+
153
+ Pull requests are welcome. For details on our code of conduct, contribution process, and testing requirements, see the [Retold Contributing Guide](https://github.com/stevenvelozo/retold/blob/main/docs/contributing.md).
package/debug/Harness.js CHANGED
@@ -1,4 +1,5 @@
1
1
  let libUltravisor = require(`../source/cli/Ultravisor-CLIProgram.cjs`);
2
2
 
3
3
  //libUltravisor.run(['node', 'Harness.js', 'explain-config']);
4
- libUltravisor.run(['node', 'Harness.js', 'start']);
4
+
5
+ //libUltravisor.run(['node', 'Harness.js', 'start']);
package/docs/.nojekyll ADDED
File without changes
@@ -0,0 +1,18 @@
1
+ - Getting Started
2
+
3
+ - [Overview](overview.md)
4
+ - [Quick Start](quickstart.md)
5
+ - [Architecture](architecture.md)
6
+
7
+ - Features
8
+
9
+ - [Tasks](features/tasks.md)
10
+ - [Operations](features/operations.md)
11
+ - [Scheduling](features/scheduling.md)
12
+ - [Manifests](features/manifests.md)
13
+
14
+ - Reference
15
+
16
+ - [API Server](features/api.md)
17
+ - [CLI Commands](features/cli.md)
18
+ - [Configuration](features/configuration.md)
@@ -0,0 +1,7 @@
1
+ # Ultravisor
2
+
3
+ - [Overview](overview.md)
4
+ - [Quick Start](quickstart.md)
5
+ - [Tasks](features/tasks.md)
6
+ - [Configuration](features/configuration.md)
7
+ - [GitHub](https://github.com/stevenvelozo/ultravisor)
@@ -0,0 +1,103 @@
1
+ # Ultravisor Architecture
2
+
3
+ ## Service Provider Pattern
4
+
5
+ Ultravisor is built on the Retold `fable-serviceproviderbase` pattern. Each
6
+ major component is a service registered with a Fable instance via
7
+ `addAndInstantiateServiceTypeIfNotExists`. Services access each other through
8
+ the shared `this.fable[ServiceName]` namespace.
9
+
10
+ ## Service Map
11
+
12
+ ```
13
+ Ultravisor-CLIProgram (Pict CLI entrypoint)
14
+ |
15
+ +-- Ultravisor-Hypervisor Scheduler / orchestrator
16
+ | |
17
+ | +-- Ultravisor-Hypervisor-Event-Cron Cron job management
18
+ | +-- Ultravisor-Hypervisor-Event-Solver Condition-based triggers (future)
19
+ |
20
+ +-- Ultravisor-Hypervisor-State Task/operation CRUD + persistence
21
+ |
22
+ +-- Ultravisor-Task Task execution engine
23
+ +-- Ultravisor-Operation Operation execution (sequential task runner)
24
+ +-- Ultravisor-Operation-Manifest Execution output tracking
25
+ |
26
+ +-- Ultravisor-API-Server REST API (Orator + Restify)
27
+ ```
28
+
29
+ ## Data Flow
30
+
31
+ ### Immediate Execution
32
+
33
+ ```
34
+ CLI Command or API Request
35
+ --> Hypervisor-State.getTask() or getOperation()
36
+ --> Task.executeTask() or Operation.executeOperation()
37
+ --> Operation-Manifest tracks results
38
+ --> Manifest returned to caller
39
+ ```
40
+
41
+ ### Scheduled Execution
42
+
43
+ ```
44
+ Hypervisor.startSchedule()
45
+ --> For each schedule entry:
46
+ --> Event-Cron creates a CronJob
47
+ --> On tick: look up target from State
48
+ --> Execute via Task or Operation service
49
+ --> Results logged
50
+ ```
51
+
52
+ ### State Persistence
53
+
54
+ ```
55
+ State.updateTask() or updateOperation()
56
+ --> In-memory hash updated
57
+ --> persistState() writes merged JSON to .ultravisor.json
58
+ ```
59
+
60
+ ## File Structure
61
+
62
+ ```
63
+ source/
64
+ Ultravisor.cjs Module entry point
65
+ cli/
66
+ Ultravisor-CLIProgram.cjs CLI bootstrap + service init
67
+ Ultravisor-Run.cjs Executable entry (shebang)
68
+ commands/
69
+ Ultravisor-Command-Start.cjs Start API server
70
+ Ultravisor-Command-Stop.cjs Stop scheduler
71
+ Ultravisor-Command-ScheduleView.cjs View schedule
72
+ Ultravisor-Command-ScheduleOperation.cjs Schedule an operation
73
+ Ultravisor-Command-ScheduleTask.cjs Schedule a task
74
+ Ultravisor-Command-UpdateTask.cjs Add/update a task definition
75
+ Ultravisor-Command-SingleOperation.cjs Run operation immediately
76
+ Ultravisor-Command-SingleTask.cjs Run task immediately
77
+ config/
78
+ Ultravisor-Default-Command-Configuration.cjs Default config values
79
+ services/
80
+ Ultravisor-Hypervisor.cjs Scheduler + schedule management
81
+ Ultravisor-Hypervisor-State.cjs CRUD + persistence
82
+ Ultravisor-Task.cjs Task execution engine
83
+ Ultravisor-Operation.cjs Operation runner
84
+ Ultravisor-Operation-Manifest.cjs Manifest lifecycle
85
+ Ultravisor-Hypervisor-Event-Base.cjs Base event class
86
+ events/
87
+ Ultravisor-Hypervisor-Event-Cron.cjs Cron scheduling
88
+ Ultravisor-Hypervisor-Event-Solver.cjs Condition-based (future)
89
+ web_server/
90
+ Ultravisor-API-Server.cjs REST endpoint definitions
91
+ ```
92
+
93
+ ## Configuration Layering
94
+
95
+ Configuration is gathered automatically by Pict in this order:
96
+
97
+ 1. **Default Program Configuration** -- hardcoded defaults in
98
+ `Ultravisor-Default-Command-Configuration.cjs`
99
+ 2. **`.ultravisor.json`** -- project-level overrides (searched from cwd upward)
100
+
101
+ The final merged result is available as `fable.ProgramConfiguration`. Tasks
102
+ and operations are stored in this same file under the `Tasks` and
103
+ `Operations` keys.
package/docs/cover.md ADDED
@@ -0,0 +1,15 @@
1
+ # Ultravisor
2
+
3
+ > Cyclic process execution with AI integration
4
+
5
+ - Run shell commands and HTTP requests on a schedule
6
+ - Compose tasks into sequential operations
7
+ - Full REST API for remote management
8
+ - Structured manifests track every execution
9
+ - Cron-based scheduling with daily and hourly shortcuts
10
+ - CLI and API for task and operation CRUD
11
+ - Persistent state in a single JSON config file
12
+
13
+ [Get Started](overview.md)
14
+ [Quick Start](quickstart.md)
15
+ [GitHub](https://github.com/stevenvelozo/ultravisor)
@@ -0,0 +1,230 @@
1
+ # API Server
2
+
3
+ Ultravisor includes a REST API server built on Orator (Restify). Start it
4
+ with `ultravisor start` and it exposes endpoints for managing tasks,
5
+ operations, schedules and manifests.
6
+
7
+ ## Server Configuration
8
+
9
+ The API server port is configured in `.ultravisor.json`:
10
+
11
+ ```json
12
+ {
13
+ "UltravisorAPIServerPort": 54321
14
+ }
15
+ ```
16
+
17
+ Default port: `54321`. Fallback if not configured: `55555`.
18
+
19
+ ## Starting the Server
20
+
21
+ ```bash
22
+ ultravisor start
23
+ ```
24
+
25
+ Or with verbose logging:
26
+
27
+ ```bash
28
+ ultravisor start --verbose
29
+ ```
30
+
31
+ ## Endpoint Reference
32
+
33
+ ### System
34
+
35
+ | Method | Path | Description |
36
+ |--------|------|-------------|
37
+ | `GET` | `/package` | Returns the package.json metadata |
38
+ | `GET` | `/status` | Returns server and schedule status |
39
+ | `GET` | `/stop` | Stops the scheduler and shuts down the server |
40
+
41
+ #### GET /status
42
+
43
+ ```json
44
+ {
45
+ "Status": "Running",
46
+ "ScheduleEntries": 3,
47
+ "ScheduleRunning": true
48
+ }
49
+ ```
50
+
51
+ ### Tasks
52
+
53
+ | Method | Path | Description |
54
+ |--------|------|-------------|
55
+ | `GET` | `/Task` | List all tasks |
56
+ | `GET` | `/Task/:GUIDTask` | Get a single task |
57
+ | `POST` | `/Task` | Create or update a task |
58
+ | `PUT` | `/Task/:GUIDTask` | Update a task |
59
+ | `DELETE` | `/Task/:GUIDTask` | Delete a task |
60
+ | `GET` | `/Task/:GUIDTask/Execute` | Execute a task immediately |
61
+
62
+ #### POST /Task
63
+
64
+ ```bash
65
+ curl -X POST http://localhost:54321/Task \
66
+ -H "Content-Type: application/json" \
67
+ -d '{
68
+ "GUIDTask": "my-task",
69
+ "Name": "My Task",
70
+ "Type": "Command",
71
+ "Command": "echo hello"
72
+ }'
73
+ ```
74
+
75
+ Response:
76
+
77
+ ```json
78
+ {
79
+ "GUIDTask": "my-task",
80
+ "Name": "My Task",
81
+ "Type": "Command",
82
+ "Command": "echo hello"
83
+ }
84
+ ```
85
+
86
+ #### GET /Task/:GUIDTask/Execute
87
+
88
+ ```bash
89
+ curl http://localhost:54321/Task/my-task/Execute
90
+ ```
91
+
92
+ Response:
93
+
94
+ ```json
95
+ {
96
+ "GUIDTask": "my-task",
97
+ "Name": "My Task",
98
+ "Type": "Command",
99
+ "StartTime": "2026-02-10T12:00:00.000Z",
100
+ "StopTime": "2026-02-10T12:00:00.025Z",
101
+ "Status": "Complete",
102
+ "Success": true,
103
+ "Output": "hello\n",
104
+ "Log": ["..."]
105
+ }
106
+ ```
107
+
108
+ ### Operations
109
+
110
+ | Method | Path | Description |
111
+ |--------|------|-------------|
112
+ | `GET` | `/Operation` | List all operations |
113
+ | `GET` | `/Operation/:GUIDOperation` | Get a single operation |
114
+ | `POST` | `/Operation` | Create or update an operation |
115
+ | `PUT` | `/Operation/:GUIDOperation` | Update an operation |
116
+ | `DELETE` | `/Operation/:GUIDOperation` | Delete an operation |
117
+ | `GET` | `/Operation/:GUIDOperation/Execute` | Execute an operation |
118
+
119
+ #### POST /Operation
120
+
121
+ ```bash
122
+ curl -X POST http://localhost:54321/Operation \
123
+ -H "Content-Type: application/json" \
124
+ -d '{
125
+ "GUIDOperation": "my-pipeline",
126
+ "Name": "My Pipeline",
127
+ "Tasks": ["task-a", "task-b", "task-c"]
128
+ }'
129
+ ```
130
+
131
+ #### GET /Operation/:GUIDOperation/Execute
132
+
133
+ Returns a full manifest with results for each task in the operation.
134
+
135
+ ### Schedule
136
+
137
+ | Method | Path | Description |
138
+ |--------|------|-------------|
139
+ | `GET` | `/Schedule` | List all schedule entries |
140
+ | `POST` | `/Schedule/Task` | Schedule a task |
141
+ | `POST` | `/Schedule/Operation` | Schedule an operation |
142
+ | `DELETE` | `/Schedule/:GUID` | Remove a schedule entry |
143
+ | `GET` | `/Schedule/Start` | Start all scheduled cron jobs |
144
+ | `GET` | `/Schedule/Stop` | Stop all scheduled cron jobs |
145
+
146
+ #### POST /Schedule/Task
147
+
148
+ ```bash
149
+ curl -X POST http://localhost:54321/Schedule/Task \
150
+ -H "Content-Type: application/json" \
151
+ -d '{
152
+ "GUIDTask": "disk-check",
153
+ "ScheduleType": "cron",
154
+ "Parameters": "*/5 * * * *"
155
+ }'
156
+ ```
157
+
158
+ Response:
159
+
160
+ ```json
161
+ {
162
+ "GUID": "sched-task-disk-check-1707566400000",
163
+ "TargetType": "Task",
164
+ "TargetGUID": "disk-check",
165
+ "ScheduleType": "cron",
166
+ "Parameters": "*/5 * * * *",
167
+ "CronExpression": "*/5 * * * *",
168
+ "Active": false,
169
+ "CreatedAt": "2026-02-10T12:00:00.000Z"
170
+ }
171
+ ```
172
+
173
+ #### POST /Schedule/Operation
174
+
175
+ ```bash
176
+ curl -X POST http://localhost:54321/Schedule/Operation \
177
+ -H "Content-Type: application/json" \
178
+ -d '{
179
+ "GUIDOperation": "nightly-etl",
180
+ "ScheduleType": "daily",
181
+ "Parameters": "0 2 * * *"
182
+ }'
183
+ ```
184
+
185
+ ### Manifests
186
+
187
+ | Method | Path | Description |
188
+ |--------|------|-------------|
189
+ | `GET` | `/Manifest` | List all operation run manifests |
190
+ | `GET` | `/Manifest/:GUIDRun` | Get a specific manifest by run GUID |
191
+
192
+ #### GET /Manifest
193
+
194
+ Returns an array of all operation manifests from the current session.
195
+
196
+ #### GET /Manifest/:GUIDRun
197
+
198
+ ```json
199
+ {
200
+ "GUIDOperation": "my-pipeline",
201
+ "GUIDRun": "my-pipeline-1707566400000",
202
+ "Name": "My Pipeline",
203
+ "StartTime": "2026-02-10T12:00:00.000Z",
204
+ "StopTime": "2026-02-10T12:00:02.500Z",
205
+ "Status": "Complete",
206
+ "Success": true,
207
+ "Summary": "Operation my-pipeline Complete: 3 task(s) executed.",
208
+ "TaskResults": [],
209
+ "Log": []
210
+ }
211
+ ```
212
+
213
+ ## Error Responses
214
+
215
+ All error responses follow this format:
216
+
217
+ ```json
218
+ {
219
+ "Error": "Description of what went wrong"
220
+ }
221
+ ```
222
+
223
+ HTTP status codes used:
224
+
225
+ | Code | Meaning |
226
+ |------|---------|
227
+ | `200` | Success |
228
+ | `400` | Bad request (invalid input) |
229
+ | `404` | Resource not found |
230
+ | `500` | Server error |
@@ -0,0 +1,182 @@
1
+ # CLI Commands
2
+
3
+ Ultravisor provides a command-line interface for managing tasks, operations,
4
+ schedules, and the API server. The CLI is invoked via the `ultravisor`
5
+ command (or `node source/cli/Ultravisor-Run.cjs`).
6
+
7
+ ## Command Reference
8
+
9
+ ### start
10
+
11
+ Start the API server.
12
+
13
+ ```bash
14
+ ultravisor start
15
+ ultravisor start --verbose
16
+ ```
17
+
18
+ | Option | Description |
19
+ |--------|-------------|
20
+ | `-v, --verbose` | Enable verbose console output |
21
+
22
+ The server starts on the port configured in `.ultravisor.json`
23
+ (`UltravisorAPIServerPort`, default `54321`).
24
+
25
+ ### stop
26
+
27
+ Stop the Hypervisor scheduler. Deactivates all running cron jobs.
28
+
29
+ ```bash
30
+ ultravisor stop
31
+ ```
32
+
33
+ ### updatetask
34
+
35
+ Add or update a task definition. The task is persisted to
36
+ `.ultravisor.json`.
37
+
38
+ ```bash
39
+ ultravisor updatetask -g disk-check -n "Check Disk" -t Command -p "df -h"
40
+ ```
41
+
42
+ | Option | Description | Default |
43
+ |--------|-------------|---------|
44
+ | `-g, --guid` | Task GUID | (none) |
45
+ | `-c, --code` | Task code | (none) |
46
+ | `-n, --name` | Task name | (none) |
47
+ | `-t, --type` | Task type | `CRON` |
48
+ | `-p, --parameters` | Task parameters | `0 0 * * * *` |
49
+ | `-f, --file` | Path to JSON task definition file | (none) |
50
+
51
+ When `-f` is provided, the JSON file is loaded and then any CLI parameters
52
+ override the file values:
53
+
54
+ ```bash
55
+ # Load from file, but override the GUID
56
+ ultravisor updatetask -f ./my-task.json -g custom-guid
57
+ ```
58
+
59
+ Example JSON file:
60
+
61
+ ```json
62
+ {
63
+ "GUIDTask": "api-health",
64
+ "Name": "API Health Check",
65
+ "Type": "Request",
66
+ "URL": "https://api.example.com/health"
67
+ }
68
+ ```
69
+
70
+ ### singletask (alias: task)
71
+
72
+ Execute a single task immediately.
73
+
74
+ ```bash
75
+ ultravisor singletask disk-check
76
+ ultravisor task disk-check
77
+ ultravisor singletask disk-check --dry_run
78
+ ```
79
+
80
+ | Argument | Description |
81
+ |----------|-------------|
82
+ | `<task>` | The task GUID to execute |
83
+
84
+ | Option | Description | Default |
85
+ |--------|-------------|---------|
86
+ | `-o, --operation` | Scope task to an operation | `Default` |
87
+ | `-d, --dry_run` | Print what would happen without executing | `false` |
88
+
89
+ ### singleoperation (alias: operation)
90
+
91
+ Execute a single operation immediately.
92
+
93
+ ```bash
94
+ ultravisor singleoperation etl-pipeline
95
+ ultravisor operation etl-pipeline
96
+ ultravisor singleoperation etl-pipeline --dry_run
97
+ ```
98
+
99
+ | Argument | Description |
100
+ |----------|-------------|
101
+ | `<operation>` | The operation GUID to execute |
102
+
103
+ | Option | Description | Default |
104
+ |--------|-------------|---------|
105
+ | `-d, --dry_run` | Print what would happen without executing | `false` |
106
+
107
+ ### schedule (alias: cal)
108
+
109
+ View the current schedule.
110
+
111
+ ```bash
112
+ ultravisor schedule
113
+ ultravisor cal
114
+ ```
115
+
116
+ | Option | Description | Default |
117
+ |--------|-------------|---------|
118
+ | `-f, --format` | Visualization format (day, week, month) | `day` |
119
+
120
+ Example output:
121
+
122
+ ```
123
+ === Ultravisor Schedule (2 entries) ===
124
+
125
+ [INACTIVE] Task: disk-check
126
+ Schedule: cron (*/5 * * * *)
127
+ GUID: sched-task-disk-check-1707566400000
128
+
129
+ [INACTIVE] Operation: etl-pipeline
130
+ Schedule: daily (0 2 * * *)
131
+ GUID: sched-op-etl-pipeline-1707566400001
132
+ ```
133
+
134
+ ### schedule_task (alias: st)
135
+
136
+ Add a task to the schedule.
137
+
138
+ ```bash
139
+ ultravisor schedule_task disk-check -t cron -p "*/5 * * * *"
140
+ ultravisor st disk-check -t hourly
141
+ ```
142
+
143
+ | Argument | Description |
144
+ |----------|-------------|
145
+ | `<task_guid>` | The task GUID to schedule |
146
+
147
+ | Option | Description | Default |
148
+ |--------|-------------|---------|
149
+ | `-t, --type` | Schedule type (cron, daily, hourly, solver) | `cron` |
150
+ | `-p, --parameters` | Cron expression or schedule parameters | (empty) |
151
+
152
+ ### schedule_operation (alias: so)
153
+
154
+ Add an operation to the schedule.
155
+
156
+ ```bash
157
+ ultravisor schedule_operation etl-pipeline -t daily -p "0 2 * * *"
158
+ ultravisor so etl-pipeline -t cron -p "0 6 * * 1-5"
159
+ ```
160
+
161
+ | Argument | Description |
162
+ |----------|-------------|
163
+ | `<operation_guid>` | The operation GUID to schedule |
164
+
165
+ | Option | Description | Default |
166
+ |--------|-------------|---------|
167
+ | `-t, --type` | Schedule type (cron, daily, hourly, solver) | `cron` |
168
+ | `-p, --parameters` | Cron expression or schedule parameters | (empty) |
169
+
170
+ ### configuration
171
+
172
+ Auto-generated command that explains how Ultravisor resolved its
173
+ configuration (which files were loaded, what values came from where).
174
+
175
+ ```bash
176
+ ultravisor configuration
177
+ ```
178
+
179
+ ## Exit Codes
180
+
181
+ - `0` -- command completed successfully
182
+ - Non-zero -- an error occurred during execution