ultravisor 1.0.3 → 1.0.8

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 (248) hide show
  1. package/.claude/launch.json +11 -0
  2. package/.claude/ultravisor-dev-config.json +3 -0
  3. package/card-audit.json +1545 -0
  4. package/docs/_sidebar.md +17 -0
  5. package/docs/css/docuserve.css +73 -0
  6. package/docs/features/beacon-authentication.md +209 -0
  7. package/docs/features/beacon-providers.md +1299 -0
  8. package/docs/features/beacons.md +530 -0
  9. package/docs/features/capabilities.md +193 -0
  10. package/docs/features/llm-model-setup.md +505 -0
  11. package/docs/features/llm.md +262 -0
  12. package/docs/features/tasks-content-system.md +110 -0
  13. package/docs/features/tasks-data-transform.md +233 -0
  14. package/docs/features/tasks-extension.md +36 -0
  15. package/docs/features/tasks-file-system.md +203 -0
  16. package/docs/features/tasks-flow-control.md +125 -0
  17. package/docs/features/tasks-http-client.md +119 -0
  18. package/docs/features/tasks-llm.md +118 -0
  19. package/docs/features/tasks-meadow-api.md +163 -0
  20. package/docs/features/tasks-user-interaction.md +49 -0
  21. package/docs/features/tasks.md +14 -0
  22. package/docs/index.html +1 -1
  23. package/docs/retold-catalog.json +1 -1
  24. package/docs/retold-keyword-index.json +17374 -5
  25. package/operation-library/api-data-pipeline.json +143 -0
  26. package/operation-library/beacon-remote-command.json +72 -0
  27. package/operation-library/conditional-file-backup.json +143 -0
  28. package/operation-library/config-processor.json +136 -0
  29. package/operation-library/csv-data-analysis.json +228 -0
  30. package/operation-library/csv-to-json.json +160 -0
  31. package/operation-library/directory-inventory.json +128 -0
  32. package/operation-library/expression-calculator.json +114 -0
  33. package/operation-library/file-search-replace.json +175 -0
  34. package/operation-library/git-status-report.json +368 -0
  35. package/operation-library/health-check-ping.json +329 -0
  36. package/operation-library/json-config-merge.json +313 -0
  37. package/operation-library/llm-embedding-tool-use.json +314 -0
  38. package/operation-library/llm-multi-turn-analysis.json +322 -0
  39. package/operation-library/llm-summarize.json +264 -0
  40. package/operation-library/log-line-counter.json +185 -0
  41. package/operation-library/meadow-crud-lifecycle.json +264 -0
  42. package/operation-library/npm-project-validator.json +193 -0
  43. package/operation-library/rest-api-orchestrator.json +218 -0
  44. package/operation-library/shell-system-info.json +137 -0
  45. package/operation-library/simple-echo.json +95 -0
  46. package/operation-library/template-processor.json +299 -0
  47. package/operation-library/text-sanitizer.json +176 -0
  48. package/package.json +12 -8
  49. package/source/Ultravisor.cjs +30 -3
  50. package/source/beacon/Ultravisor-Beacon-CLI.cjs +143 -0
  51. package/source/beacon/Ultravisor-Beacon-CapabilityProvider.cjs +129 -0
  52. package/source/beacon/Ultravisor-Beacon-Client.cjs +568 -0
  53. package/source/beacon/Ultravisor-Beacon-Executor.cjs +500 -0
  54. package/source/beacon/Ultravisor-Beacon-ProviderRegistry.cjs +330 -0
  55. package/source/beacon/providers/Ultravisor-Beacon-Provider-FileSystem.cjs +331 -0
  56. package/source/beacon/providers/Ultravisor-Beacon-Provider-LLM.cjs +966 -0
  57. package/source/beacon/providers/Ultravisor-Beacon-Provider-Shell.cjs +95 -0
  58. package/source/cli/Ultravisor-CLIProgram.cjs +44 -22
  59. package/source/cli/commands/Ultravisor-Command-SingleOperation.cjs +29 -18
  60. package/source/cli/commands/Ultravisor-Command-SingleTask.cjs +62 -19
  61. package/source/cli/commands/Ultravisor-Command-UpdateTask.cjs +27 -15
  62. package/source/config/Ultravisor-Default-Command-Configuration.cjs +12 -3
  63. package/source/services/Ultravisor-Beacon-Coordinator.cjs +966 -0
  64. package/source/services/Ultravisor-ExecutionEngine.cjs +1093 -0
  65. package/source/services/Ultravisor-ExecutionManifest.cjs +629 -0
  66. package/source/services/Ultravisor-Hypervisor-State.cjs +270 -97
  67. package/source/services/Ultravisor-Hypervisor.cjs +185 -75
  68. package/source/services/Ultravisor-Schedule-Persistence-Base.cjs +45 -0
  69. package/source/services/Ultravisor-StateManager.cjs +253 -0
  70. package/source/services/Ultravisor-TaskTypeRegistry.cjs +213 -0
  71. package/source/services/persistence/Ultravisor-Schedule-Persistence-JSONFile.cjs +140 -0
  72. package/source/services/tasks/Ultravisor-BuiltIn-TaskConfigs.cjs +19 -0
  73. package/source/services/tasks/Ultravisor-TaskHelper-BeaconDispatch.cjs +107 -0
  74. package/source/services/tasks/Ultravisor-TaskType-Base.cjs +125 -0
  75. package/source/services/tasks/content-system/Ultravisor-TaskConfigs-ContentSystem.cjs +90 -0
  76. package/source/services/tasks/content-system/definitions/content-create-folder.json +24 -0
  77. package/source/services/tasks/content-system/definitions/content-list-files.json +27 -0
  78. package/source/services/tasks/content-system/definitions/content-read-file.json +26 -0
  79. package/source/services/tasks/content-system/definitions/content-save-file.json +26 -0
  80. package/source/services/tasks/data-transform/Ultravisor-TaskConfigs-DataTransform.cjs +577 -0
  81. package/source/services/tasks/data-transform/Ultravisor-TaskType-ReplaceString.cjs +80 -0
  82. package/source/services/tasks/data-transform/Ultravisor-TaskType-SetValues.cjs +74 -0
  83. package/source/services/tasks/data-transform/Ultravisor-TaskType-StringAppender.cjs +90 -0
  84. package/source/services/tasks/data-transform/definitions/comprehension-intersect.json +24 -0
  85. package/source/services/tasks/data-transform/definitions/csv-transform.json +24 -0
  86. package/source/services/tasks/data-transform/definitions/expression-solver.json +20 -0
  87. package/source/services/tasks/data-transform/definitions/histogram.json +23 -0
  88. package/source/services/tasks/data-transform/definitions/parse-csv.json +27 -0
  89. package/source/services/tasks/data-transform/definitions/replace-string.json +27 -0
  90. package/source/services/tasks/data-transform/definitions/set-values.json +17 -0
  91. package/source/services/tasks/data-transform/definitions/string-appender.json +22 -0
  92. package/source/services/tasks/data-transform/definitions/template-string.json +20 -0
  93. package/source/services/tasks/extension/Ultravisor-TaskConfigs-Extension.cjs +87 -0
  94. package/source/services/tasks/extension/definitions/beacon-dispatch.json +32 -0
  95. package/source/services/tasks/file-system/Ultravisor-TaskConfigs-FileSystem.cjs +509 -0
  96. package/source/services/tasks/file-system/Ultravisor-TaskType-ReadFile.cjs +96 -0
  97. package/source/services/tasks/file-system/Ultravisor-TaskType-ReadFileBuffered.cjs +123 -0
  98. package/source/services/tasks/file-system/Ultravisor-TaskType-WriteFile.cjs +106 -0
  99. package/source/services/tasks/file-system/definitions/copy-file.json +27 -0
  100. package/source/services/tasks/file-system/definitions/list-files.json +27 -0
  101. package/source/services/tasks/file-system/definitions/read-file-buffered.json +31 -0
  102. package/source/services/tasks/file-system/definitions/read-file.json +26 -0
  103. package/source/services/tasks/file-system/definitions/read-json.json +23 -0
  104. package/source/services/tasks/file-system/definitions/write-file.json +29 -0
  105. package/source/services/tasks/file-system/definitions/write-json.json +30 -0
  106. package/source/services/tasks/flow-control/Ultravisor-TaskConfigs-FlowControl.cjs +353 -0
  107. package/source/services/tasks/flow-control/Ultravisor-TaskType-IfConditional.cjs +125 -0
  108. package/source/services/tasks/flow-control/Ultravisor-TaskType-LaunchOperation.cjs +186 -0
  109. package/source/services/tasks/flow-control/Ultravisor-TaskType-SplitExecute.cjs +164 -0
  110. package/source/services/tasks/flow-control/definitions/if-conditional.json +25 -0
  111. package/source/services/tasks/flow-control/definitions/launch-operation.json +27 -0
  112. package/source/services/tasks/flow-control/definitions/split-execute.json +32 -0
  113. package/source/services/tasks/http-client/Ultravisor-TaskConfigs-HttpClient.cjs +281 -0
  114. package/source/services/tasks/http-client/definitions/get-json.json +26 -0
  115. package/source/services/tasks/http-client/definitions/get-text.json +26 -0
  116. package/source/services/tasks/http-client/definitions/rest-request.json +32 -0
  117. package/source/services/tasks/http-client/definitions/send-json.json +28 -0
  118. package/source/services/tasks/llm/Ultravisor-TaskConfigs-LLM.cjs +605 -0
  119. package/source/services/tasks/llm/definitions/llm-chat-completion.json +46 -0
  120. package/source/services/tasks/llm/definitions/llm-embedding.json +31 -0
  121. package/source/services/tasks/llm/definitions/llm-tool-use.json +42 -0
  122. package/source/services/tasks/meadow-api/Ultravisor-TaskConfigs-MeadowApi.cjs +341 -0
  123. package/source/services/tasks/meadow-api/definitions/meadow-count.json +26 -0
  124. package/source/services/tasks/meadow-api/definitions/meadow-create.json +26 -0
  125. package/source/services/tasks/meadow-api/definitions/meadow-delete.json +23 -0
  126. package/source/services/tasks/meadow-api/definitions/meadow-read.json +26 -0
  127. package/source/services/tasks/meadow-api/definitions/meadow-reads.json +29 -0
  128. package/source/services/tasks/meadow-api/definitions/meadow-update.json +26 -0
  129. package/source/services/tasks/shell/Ultravisor-TaskConfigs-Shell.cjs +63 -0
  130. package/source/services/tasks/shell/definitions/command.json +29 -0
  131. package/source/services/tasks/user-interaction/Ultravisor-TaskConfigs-UserInteraction.cjs +64 -0
  132. package/source/services/tasks/user-interaction/Ultravisor-TaskType-ErrorMessage.cjs +55 -0
  133. package/source/services/tasks/user-interaction/Ultravisor-TaskType-ValueInput.cjs +47 -0
  134. package/source/services/tasks/user-interaction/definitions/error-message.json +18 -0
  135. package/source/services/tasks/user-interaction/definitions/value-input.json +23 -0
  136. package/source/web_server/Ultravisor-API-Server.cjs +849 -124
  137. package/test/Ultravisor_browser_tests.js +2226 -0
  138. package/test/Ultravisor_operation_library_tests.js +894 -0
  139. package/test/Ultravisor_tests.js +4946 -5044
  140. package/test/workflows/test-content-concatenate-all.json +339 -0
  141. package/test/workflows/test-content-full-pipeline.json +159 -0
  142. package/test/workflows/test-content-list-files.json +76 -0
  143. package/test/workflows/test-content-save-and-read.json +106 -0
  144. package/webinterface/css/ultravisor-themes.css +668 -0
  145. package/webinterface/css/ultravisor.css +37 -14
  146. package/webinterface/docs/card-help/beacon-dispatch.md +30 -0
  147. package/webinterface/docs/card-help/command.md +27 -0
  148. package/webinterface/docs/card-help/comprehension-intersect.md +24 -0
  149. package/webinterface/docs/card-help/content-create-folder.md +22 -0
  150. package/webinterface/docs/card-help/content-list-files.md +25 -0
  151. package/webinterface/docs/card-help/content-read-file.md +24 -0
  152. package/webinterface/docs/card-help/content-save-file.md +24 -0
  153. package/webinterface/docs/card-help/copy-file.md +25 -0
  154. package/webinterface/docs/card-help/csv-transform.md +24 -0
  155. package/webinterface/docs/card-help/end.md +11 -0
  156. package/webinterface/docs/card-help/error-message.md +16 -0
  157. package/webinterface/docs/card-help/expression-solver.md +21 -0
  158. package/webinterface/docs/card-help/get-json.md +24 -0
  159. package/webinterface/docs/card-help/get-text.md +24 -0
  160. package/webinterface/docs/card-help/histogram.md +23 -0
  161. package/webinterface/docs/card-help/if-conditional.md +23 -0
  162. package/webinterface/docs/card-help/launch-operation.md +25 -0
  163. package/webinterface/docs/card-help/list-files.md +25 -0
  164. package/webinterface/docs/card-help/llm-chat-completion.md +43 -0
  165. package/webinterface/docs/card-help/llm-embedding.md +24 -0
  166. package/webinterface/docs/card-help/llm-tool-use.md +39 -0
  167. package/webinterface/docs/card-help/meadow-count.md +24 -0
  168. package/webinterface/docs/card-help/meadow-create.md +24 -0
  169. package/webinterface/docs/card-help/meadow-delete.md +19 -0
  170. package/webinterface/docs/card-help/meadow-read.md +24 -0
  171. package/webinterface/docs/card-help/meadow-reads.md +27 -0
  172. package/webinterface/docs/card-help/meadow-update.md +24 -0
  173. package/webinterface/docs/card-help/parse-csv.md +27 -0
  174. package/webinterface/docs/card-help/read-file-buffered.md +29 -0
  175. package/webinterface/docs/card-help/read-file.md +24 -0
  176. package/webinterface/docs/card-help/read-json.md +21 -0
  177. package/webinterface/docs/card-help/replace-string.md +25 -0
  178. package/webinterface/docs/card-help/rest-request.md +30 -0
  179. package/webinterface/docs/card-help/send-json.md +26 -0
  180. package/webinterface/docs/card-help/set-values.md +16 -0
  181. package/webinterface/docs/card-help/split-execute.md +35 -0
  182. package/webinterface/docs/card-help/start.md +11 -0
  183. package/webinterface/docs/card-help/string-appender.md +22 -0
  184. package/webinterface/docs/card-help/template-string.md +21 -0
  185. package/webinterface/docs/card-help/value-input.md +24 -0
  186. package/webinterface/docs/card-help/write-file.md +27 -0
  187. package/webinterface/docs/card-help/write-json.md +28 -0
  188. package/webinterface/html/index.html +5 -0
  189. package/webinterface/package.json +13 -4
  190. package/webinterface/source/Pict-Application-Ultravisor.js +564 -70
  191. package/webinterface/source/Ultravisor-TimingUtils.js +99 -0
  192. package/webinterface/source/card-help-content.js +46 -0
  193. package/webinterface/source/cards/Ultravisor-BuiltIn-CardConfigs.js +174 -0
  194. package/webinterface/source/cards/Ultravisor-CardConfigGenerator.js +431 -0
  195. package/webinterface/source/data/ExampleFlow-CSVPipeline.js +231 -0
  196. package/webinterface/source/data/ExampleFlow-FileProcessor.js +315 -0
  197. package/webinterface/source/data/ExampleFlow-MeadowPipeline.js +328 -0
  198. package/webinterface/source/panels/Ultravisor-CardSettingsPanel.js +902 -0
  199. package/webinterface/source/providers/PictRouter-Ultravisor-Configuration.json +20 -8
  200. package/webinterface/source/views/PictView-Ultravisor-BeaconList.js +817 -0
  201. package/webinterface/source/views/PictView-Ultravisor-BottomBar.js +5 -5
  202. package/webinterface/source/views/PictView-Ultravisor-Dashboard.js +25 -25
  203. package/webinterface/source/views/PictView-Ultravisor-Documentation.js +856 -0
  204. package/webinterface/source/views/PictView-Ultravisor-FlowEditor.js +777 -0
  205. package/webinterface/source/views/PictView-Ultravisor-ManifestList.js +321 -58
  206. package/webinterface/source/views/PictView-Ultravisor-OperationEdit.js +36 -91
  207. package/webinterface/source/views/PictView-Ultravisor-OperationList.js +388 -16
  208. package/webinterface/source/views/PictView-Ultravisor-PendingInput.js +314 -0
  209. package/webinterface/source/views/PictView-Ultravisor-Schedule.js +521 -65
  210. package/webinterface/source/views/PictView-Ultravisor-TimingView.js +333 -71
  211. package/webinterface/source/views/PictView-Ultravisor-TopBar.js +257 -21
  212. package/webinterface/theme-sampler.html +645 -0
  213. package/debug/Harness.js +0 -6
  214. package/source/services/Ultravisor-Operation-Manifest.cjs +0 -160
  215. package/source/services/Ultravisor-Operation.cjs +0 -200
  216. package/source/services/Ultravisor-Task.cjs +0 -349
  217. package/source/services/events/Ultravisor-Hypervisor-Event-Solver.cjs +0 -11
  218. package/source/services/tasks/Ultravisor-Task-Base.cjs +0 -264
  219. package/source/services/tasks/Ultravisor-Task-CollectValues.cjs +0 -188
  220. package/source/services/tasks/Ultravisor-Task-Command.cjs +0 -65
  221. package/source/services/tasks/Ultravisor-Task-CommandEach.cjs +0 -190
  222. package/source/services/tasks/Ultravisor-Task-Conditional.cjs +0 -104
  223. package/source/services/tasks/Ultravisor-Task-DateWindow.cjs +0 -72
  224. package/source/services/tasks/Ultravisor-Task-GeneratePagedOperation.cjs +0 -336
  225. package/source/services/tasks/Ultravisor-Task-LaunchOperation.cjs +0 -143
  226. package/source/services/tasks/Ultravisor-Task-LaunchTask.cjs +0 -146
  227. package/source/services/tasks/Ultravisor-Task-LineMatch.cjs +0 -158
  228. package/source/services/tasks/Ultravisor-Task-Request.cjs +0 -56
  229. package/source/services/tasks/Ultravisor-Task-Solver.cjs +0 -89
  230. package/source/services/tasks/Ultravisor-Task-TemplateString.cjs +0 -93
  231. package/source/services/tasks/rest/Ultravisor-Task-GetBinary.cjs +0 -127
  232. package/source/services/tasks/rest/Ultravisor-Task-GetJSON.cjs +0 -119
  233. package/source/services/tasks/rest/Ultravisor-Task-GetText.cjs +0 -109
  234. package/source/services/tasks/rest/Ultravisor-Task-GetXML.cjs +0 -112
  235. package/source/services/tasks/rest/Ultravisor-Task-RestRequest.cjs +0 -499
  236. package/source/services/tasks/rest/Ultravisor-Task-SendJSON.cjs +0 -150
  237. package/source/services/tasks/stagingfiles/Ultravisor-Task-CopyFile.cjs +0 -110
  238. package/source/services/tasks/stagingfiles/Ultravisor-Task-ListFiles.cjs +0 -89
  239. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadBinary.cjs +0 -87
  240. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadJSON.cjs +0 -67
  241. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadText.cjs +0 -66
  242. package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadXML.cjs +0 -69
  243. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteBinary.cjs +0 -95
  244. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteJSON.cjs +0 -96
  245. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteText.cjs +0 -99
  246. package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteXML.cjs +0 -102
  247. package/webinterface/source/views/PictView-Ultravisor-TaskEdit.js +0 -220
  248. package/webinterface/source/views/PictView-Ultravisor-TaskList.js +0 -248
@@ -0,0 +1,193 @@
1
+ # Capabilities and Actions
2
+
3
+ Every task type in Ultravisor belongs to a **Capability** and performs an
4
+ **Action** within that capability. This two-level taxonomy drives how work
5
+ is matched to workers and makes it straightforward to reason about what any
6
+ given task needs from its execution environment.
7
+
8
+ ## Concepts
9
+
10
+ ### Capability
11
+
12
+ A Capability describes _what_ a worker or environment can do. Examples
13
+ include accessing the local file system, making HTTP requests, executing
14
+ shell commands, or running a machine-learning model.
15
+
16
+ When a worker connects it advertises the set of capabilities it supports.
17
+ The execution engine uses these advertisements to route each task to a
18
+ worker that can handle it.
19
+
20
+ ### Action
21
+
22
+ An Action is a verb within a capability. For example the **File System**
23
+ capability has actions like Read, Write, List, and Copy. A capability may
24
+ have one action (Shell → Execute) or many (Data Transform has nine).
25
+
26
+ ### Tier
27
+
28
+ Capabilities are grouped into four tiers that describe how available the
29
+ capability is likely to be at runtime.
30
+
31
+ | Tier | Description |
32
+ |------|-------------|
33
+ | **Engine** | Always available. Pure in-memory computation with no I/O. These tasks run inside the execution engine itself and never need an external worker. |
34
+ | **Platform** | Standard on any Node.js worker. Uses built-in Node.js modules (`fs`, `child_process`, `http`). Any worker running on Node.js provides these automatically. |
35
+ | **Service** | Requires a specific external service to be reachable. The worker must be configured with the right endpoint and credentials. |
36
+ | **Extension** | Provided by specialized workers. These capabilities do not ship with Ultravisor and are added by connecting purpose-built workers (e.g. machine-learning inference, headless browser automation, media playback). |
37
+
38
+ ## Capability Reference
39
+
40
+ ### Data Transform
41
+
42
+ | | |
43
+ |---|---|
44
+ | **Tier** | Engine |
45
+ | **Description** | In-memory data manipulation — setting values, string operations, template rendering, expression evaluation, and tabular transforms. No I/O required. |
46
+
47
+ | Action | Task Type | What it Does |
48
+ |--------|-----------|--------------|
49
+ | SetValues | `set-values` | Writes one or more key/value pairs into state |
50
+ | ReplaceString | `replace-string` | Find-and-replace within a string |
51
+ | AppendString | `string-appender` | Appends text to a state address |
52
+ | Template | `template-string` | Renders a Pict template against state |
53
+ | EvaluateExpression | `expression-solver` | Evaluates a math or logic expression |
54
+ | ParseCSV | `parse-csv` | Parses CSV text into an array of records |
55
+ | TransformCSV | `csv-transform` | Transforms CSV data between formats |
56
+ | Intersect | `comprehension-intersect` | Computes the intersection of two data sets |
57
+ | Histogram | `histogram` | Buckets values into a histogram |
58
+
59
+ ### Flow Control
60
+
61
+ | | |
62
+ |---|---|
63
+ | **Tier** | Engine |
64
+ | **Description** | Orchestration primitives — branching, looping, sub-operation dispatch, and operation entry/exit markers. |
65
+
66
+ | Action | Task Type | What it Does |
67
+ |--------|-----------|--------------|
68
+ | Begin | `start` | Operation entry point |
69
+ | End | `end` | Operation termination point |
70
+ | Branch | `if-conditional` | Evaluates a condition and fires True or False |
71
+ | Iterate | `split-execute` | Splits input by delimiter and loops over each token |
72
+ | LaunchOperation | `launch-operation` | Executes a child operation by hash |
73
+
74
+ ### File System
75
+
76
+ | | |
77
+ |---|---|
78
+ | **Tier** | Platform |
79
+ | **Description** | Local file system access — reading, writing, listing, and copying files. Paths can be absolute or relative to the operation staging folder. |
80
+
81
+ | Action | Task Type | What it Does |
82
+ |--------|-----------|--------------|
83
+ | Read | `read-file` | Reads a file from disk into state |
84
+ | Write | `write-file` | Writes state content to a file |
85
+ | ReadJSON | `read-json` | Reads and parses a JSON file |
86
+ | WriteJSON | `write-json` | Serializes state to a JSON file |
87
+ | List | `list-files` | Lists files in a directory with glob pattern |
88
+ | Copy | `copy-file` | Copies a file from source to target |
89
+
90
+ ### Shell
91
+
92
+ | | |
93
+ |---|---|
94
+ | **Tier** | Platform |
95
+ | **Description** | Operating system command execution via `child_process`. |
96
+
97
+ | Action | Task Type | What it Does |
98
+ |--------|-----------|--------------|
99
+ | Execute | `command` | Runs a shell command and captures stdout/stderr |
100
+
101
+ ### HTTP Client
102
+
103
+ | | |
104
+ |---|---|
105
+ | **Tier** | Platform |
106
+ | **Description** | Outbound HTTP requests using Node.js built-in modules. |
107
+
108
+ | Action | Task Type | What it Does |
109
+ |--------|-----------|--------------|
110
+ | GetJSON | `get-json` | HTTP GET, parse response as JSON |
111
+ | GetText | `get-text` | HTTP GET, return response as text |
112
+ | SendJSON | `send-json` | Send JSON payload via configurable HTTP method |
113
+ | Request | `rest-request` | Fully configurable REST request with retries |
114
+
115
+ ### User Interaction
116
+
117
+ | | |
118
+ |---|---|
119
+ | **Tier** | Platform |
120
+ | **Description** | Interactions with an end user — displaying messages and requesting input. |
121
+
122
+ | Action | Task Type | What it Does |
123
+ |--------|-----------|--------------|
124
+ | ShowError | `error-message` | Logs an error or warning message |
125
+ | RequestInput | `value-input` | Pauses execution and waits for user input |
126
+
127
+ ### Meadow API
128
+
129
+ | | |
130
+ |---|---|
131
+ | **Tier** | Service |
132
+ | **Description** | CRUD operations against a Meadow ORM endpoint. The worker must be configured with the Meadow API base URL. |
133
+
134
+ | Action | Task Type | What it Does |
135
+ |--------|-----------|--------------|
136
+ | Read | `meadow-read` | Read a single record by ID |
137
+ | ReadMany | `meadow-reads` | Read multiple records with optional filter |
138
+ | Create | `meadow-create` | Create a new record |
139
+ | Update | `meadow-update` | Update an existing record |
140
+ | Delete | `meadow-delete` | Delete a record by ID |
141
+ | Count | `meadow-count` | Count records matching a filter |
142
+
143
+ ## Task Type Definition Fields
144
+
145
+ Every task type definition includes these capability-related fields alongside
146
+ the existing `Category`:
147
+
148
+ ```json
149
+ {
150
+ "Hash": "read-file",
151
+ "Name": "Read File",
152
+ "Category": "file-io",
153
+ "Capability": "File System",
154
+ "Action": "Read",
155
+ "Tier": "Platform"
156
+ }
157
+ ```
158
+
159
+ | Field | Purpose |
160
+ |-------|---------|
161
+ | `Category` | Visual grouping and color-coding in the flow editor |
162
+ | `Capability` | Semantic grouping for worker dispatch |
163
+ | `Action` | Verb within the capability |
164
+ | `Tier` | Availability classification (Engine, Platform, Service, Extension) |
165
+
166
+ `Category` and `Capability` overlap but serve different purposes. For
167
+ example `template-string` has Category `core` (for UI grouping) but
168
+ Capability `Data Transform` (because it is a pure in-memory operation).
169
+
170
+ ## Execution Manifests
171
+
172
+ When an operation executes, each task's manifest now includes `Capability`,
173
+ `Action`, and `Tier` alongside the existing `Category`. The timing summary
174
+ includes a `ByCapability` aggregate in addition to `ByCategory` and
175
+ `ByTaskType`.
176
+
177
+ ## Future: Worker Capability Matching
178
+
179
+ The tier and capability system lays the groundwork for a distributed
180
+ execution model:
181
+
182
+ 1. Workers connect to Ultravisor and advertise their capabilities.
183
+ 2. When the engine needs to execute a task, it looks up the task's
184
+ `Capability` and `Tier`.
185
+ 3. **Engine** tier tasks always run locally — no worker required.
186
+ 4. **Platform** and higher tasks are dispatched to a connected worker
187
+ that advertises the matching capability.
188
+ 5. If no capable worker is available the task enters a waiting state.
189
+
190
+ Extension-tier capabilities will be the primary mechanism for adding new
191
+ types of work — machine-learning inference, headless browser
192
+ automation, hardware control, media processing, and anything else that
193
+ requires a specialized runtime environment.
@@ -0,0 +1,505 @@
1
+ # LLM Model Setup Guide
2
+
3
+ This guide walks through setting up LLM Beacons for different providers.
4
+ Each section covers installation, configuration, and verification for a
5
+ specific backend.
6
+
7
+ You do not need machine learning expertise to set this up. Each LLM
8
+ provider has its own API that the Beacon wraps — you just need the
9
+ provider running and a configuration file pointing the Beacon at it.
10
+
11
+ ## Prerequisites
12
+
13
+ - Node.js 18+ installed on the Beacon machine
14
+ - The Ultravisor source tree (or at minimum the `source/beacon/` directory)
15
+ - An Ultravisor server running and reachable from the Beacon machine
16
+
17
+ Start the Ultravisor server if it isn't already running:
18
+
19
+ ```bash
20
+ cd ultravisor
21
+ node source/cli/Ultravisor-Run.cjs start
22
+ ```
23
+
24
+ By default it listens on port 54321.
25
+
26
+ ## General Setup Pattern
27
+
28
+ Every LLM Beacon follows the same three steps:
29
+
30
+ 1. **Get the LLM API running** (install Ollama, get an API key, etc.)
31
+ 2. **Create `.ultravisor-beacon.json`** in your working directory
32
+ 3. **Start the Beacon** with `node source/beacon/Ultravisor-Beacon-CLI.cjs`
33
+
34
+ The Beacon registers with the Ultravisor server, advertises `LLM`
35
+ capability, and starts polling for work. It runs until you stop it
36
+ with Ctrl+C.
37
+
38
+ ---
39
+
40
+ ## Ollama (Local Models)
41
+
42
+ Ollama runs open-source models locally on your machine. No API keys, no
43
+ cloud services, no usage costs. Good for development, privacy-sensitive
44
+ workloads, or machines with GPUs.
45
+
46
+ ### Step 1: Install Ollama
47
+
48
+ **macOS:**
49
+ ```bash
50
+ brew install ollama
51
+ ```
52
+
53
+ **Linux:**
54
+ ```bash
55
+ curl -fsSL https://ollama.com/install.sh | sh
56
+ ```
57
+
58
+ **Windows:**
59
+ Download the installer from https://ollama.com/download
60
+
61
+ ### Step 2: Start Ollama and pull a model
62
+
63
+ ```bash
64
+ # Start the Ollama server (runs in background)
65
+ ollama serve
66
+
67
+ # Pull a model — this downloads the model weights (may take a few minutes)
68
+ ollama pull llama3.2
69
+
70
+ # Verify it works
71
+ ollama run llama3.2 "Say hello in one sentence"
72
+ ```
73
+
74
+ Other popular models:
75
+
76
+ | Model | Size | Good for |
77
+ |---------------------|--------|-----------------------------------|
78
+ | `llama3.2` | ~2 GB | General purpose, fast |
79
+ | `llama3.2:3b` | ~2 GB | Lighter, faster |
80
+ | `llama3.1:70b` | ~40 GB | High quality, needs serious GPU |
81
+ | `mistral` | ~4 GB | Good general purpose |
82
+ | `codellama` | ~4 GB | Code generation and analysis |
83
+ | `phi3` | ~2 GB | Microsoft's small but capable |
84
+ | `nomic-embed-text` | ~275 MB| Text embeddings |
85
+
86
+ For embeddings, pull a dedicated embedding model:
87
+
88
+ ```bash
89
+ ollama pull nomic-embed-text
90
+ ```
91
+
92
+ ### Step 3: Create the Beacon config
93
+
94
+ Create `.ultravisor-beacon.json` in the directory where you'll run the
95
+ Beacon:
96
+
97
+ ```json
98
+ {
99
+ "ServerURL": "http://localhost:54321",
100
+ "Name": "llm-ollama",
101
+ "MaxConcurrent": 2,
102
+ "Tags": {
103
+ "LLM.Backend": "ollama",
104
+ "LLM.Models": "llama3.2"
105
+ },
106
+ "Providers": [
107
+ {
108
+ "Source": "LLM",
109
+ "Config": {
110
+ "Backend": "ollama",
111
+ "BaseURL": "http://localhost:11434",
112
+ "Model": "llama3.2",
113
+ "DefaultParameters": {
114
+ "Temperature": 0.7,
115
+ "MaxTokens": 4096
116
+ }
117
+ }
118
+ }
119
+ ]
120
+ }
121
+ ```
122
+
123
+ If your Ultravisor server is on a different machine, change `ServerURL`
124
+ to its address (e.g., `"http://192.168.1.50:54321"`).
125
+
126
+ ### Step 4: Start the Beacon
127
+
128
+ ```bash
129
+ node source/beacon/Ultravisor-Beacon-CLI.cjs
130
+ ```
131
+
132
+ You should see:
133
+
134
+ ```
135
+ [Beacon CLI] Loaded config from /path/to/.ultravisor-beacon.json
136
+ [LLM] Provider initialized: backend=ollama, model=llama3.2
137
+ [LLM] Ollama server reachable at localhost:11434
138
+ [ProviderRegistry] Registered "LLM" → LLM [ChatCompletion, Embedding, ToolUse]
139
+ [Beacon] Loaded 1 capability provider(s).
140
+ [Beacon] Capabilities: LLM
141
+ [Beacon] Registered as bcn-llm-ollama-...
142
+ [Beacon CLI] Beacon is running. Polling every 5000ms.
143
+ ```
144
+
145
+ ### Troubleshooting
146
+
147
+ - **"Ollama server not reachable"** — Make sure `ollama serve` is running.
148
+ Check with `curl http://localhost:11434/api/tags`.
149
+ - **Slow responses** — First request after pulling a model is slower
150
+ (loading into memory). Subsequent requests are faster. On CPU-only
151
+ machines, expect 5-30 seconds per response depending on model size.
152
+ - **Out of memory** — Use a smaller model. `llama3.2:3b` or `phi3` work
153
+ well on machines with 8GB RAM. The 70B models need 48GB+ RAM or a GPU
154
+ with equivalent VRAM.
155
+
156
+ ---
157
+
158
+ ## Anthropic (Claude)
159
+
160
+ Anthropic's Claude models are accessed through their cloud API. You need
161
+ an API key with billing set up.
162
+
163
+ ### Step 1: Get an API key
164
+
165
+ 1. Go to https://console.anthropic.com/
166
+ 2. Create an account or sign in
167
+ 3. Navigate to API Keys
168
+ 4. Create a new key
169
+ 5. Copy the key — it starts with `sk-ant-`
170
+
171
+ ### Step 2: Set the API key as an environment variable
172
+
173
+ The Beacon config supports `$ENV_VAR_NAME` syntax so you never put keys
174
+ in config files.
175
+
176
+ **bash/zsh:**
177
+ ```bash
178
+ export ANTHROPIC_API_KEY="sk-ant-your-key-here"
179
+ ```
180
+
181
+ To make it permanent, add that line to `~/.bashrc`, `~/.zshrc`, or
182
+ `~/.profile`.
183
+
184
+ **Windows (PowerShell):**
185
+ ```powershell
186
+ $env:ANTHROPIC_API_KEY = "sk-ant-your-key-here"
187
+ ```
188
+
189
+ ### Step 3: Create the Beacon config
190
+
191
+ ```json
192
+ {
193
+ "ServerURL": "http://localhost:54321",
194
+ "Name": "llm-claude",
195
+ "MaxConcurrent": 3,
196
+ "Tags": {
197
+ "LLM.Backend": "anthropic",
198
+ "LLM.Models": "claude-sonnet-4-20250514"
199
+ },
200
+ "Providers": [
201
+ {
202
+ "Source": "LLM",
203
+ "Config": {
204
+ "Backend": "anthropic",
205
+ "BaseURL": "https://api.anthropic.com",
206
+ "APIKey": "$ANTHROPIC_API_KEY",
207
+ "Model": "claude-sonnet-4-20250514",
208
+ "DefaultParameters": {
209
+ "Temperature": 0.7,
210
+ "MaxTokens": 4096
211
+ },
212
+ "TimeoutMs": 120000
213
+ }
214
+ }
215
+ ]
216
+ }
217
+ ```
218
+
219
+ Available Claude models:
220
+
221
+ | Model | Description |
222
+ |----------------------------------|----------------------------------|
223
+ | `claude-opus-4-20250514` | Most capable, highest cost |
224
+ | `claude-sonnet-4-20250514` | Good balance of speed and quality|
225
+ | `claude-haiku-4-5-20251001` | Fastest, lowest cost |
226
+
227
+ ### Step 4: Start the Beacon
228
+
229
+ ```bash
230
+ node source/beacon/Ultravisor-Beacon-CLI.cjs
231
+ ```
232
+
233
+ ### Troubleshooting
234
+
235
+ - **"401 Unauthorized"** — Your API key is missing or invalid. Check
236
+ `echo $ANTHROPIC_API_KEY` to verify it's set.
237
+ - **"429 Too Many Requests"** — You've hit rate limits. Anthropic has
238
+ per-minute and per-day limits that vary by plan. Reduce `MaxConcurrent`
239
+ or add delays between requests.
240
+ - **"400 max_tokens"** — Anthropic requires `max_tokens` on every
241
+ request. The provider defaults to 4096 if not set, but some models
242
+ support higher values.
243
+
244
+ ---
245
+
246
+ ## OpenAI (GPT-4, etc.)
247
+
248
+ ### Step 1: Get an API key
249
+
250
+ 1. Go to https://platform.openai.com/
251
+ 2. Sign in and navigate to API Keys
252
+ 3. Create a new secret key
253
+ 4. Copy the key — it starts with `sk-`
254
+
255
+ ### Step 2: Set the API key
256
+
257
+ ```bash
258
+ export OPENAI_API_KEY="sk-your-key-here"
259
+ ```
260
+
261
+ ### Step 3: Create the Beacon config
262
+
263
+ ```json
264
+ {
265
+ "ServerURL": "http://localhost:54321",
266
+ "Name": "llm-openai",
267
+ "MaxConcurrent": 5,
268
+ "Tags": {
269
+ "LLM.Backend": "openai",
270
+ "LLM.Models": "gpt-4o"
271
+ },
272
+ "Providers": [
273
+ {
274
+ "Source": "LLM",
275
+ "Config": {
276
+ "Backend": "openai",
277
+ "BaseURL": "https://api.openai.com",
278
+ "APIKey": "$OPENAI_API_KEY",
279
+ "Model": "gpt-4o",
280
+ "DefaultParameters": {
281
+ "Temperature": 0.7,
282
+ "MaxTokens": 4096
283
+ }
284
+ }
285
+ }
286
+ ]
287
+ }
288
+ ```
289
+
290
+ Common OpenAI models:
291
+
292
+ | Model | Description |
293
+ |--------------|----------------------------------------|
294
+ | `gpt-4o` | Latest GPT-4, fast and capable |
295
+ | `gpt-4o-mini`| Cheaper, good for simple tasks |
296
+ | `o1` | Reasoning model, slower but thorough |
297
+
298
+ For embeddings, the model is separate. Set it per-request using the
299
+ `Model` setting on the embedding task:
300
+
301
+ | Embedding Model | Dimensions | Notes |
302
+ |----------------------------|------------|----------------------|
303
+ | `text-embedding-3-small` | 1536 | Cheaper, good enough |
304
+ | `text-embedding-3-large` | 3072 | Higher quality |
305
+
306
+ ### Step 4: Start the Beacon
307
+
308
+ ```bash
309
+ node source/beacon/Ultravisor-Beacon-CLI.cjs
310
+ ```
311
+
312
+ ### Troubleshooting
313
+
314
+ - **"401" or "invalid_api_key"** — Check that `OPENAI_API_KEY` is set
315
+ and has billing enabled. Free-tier keys have very limited access.
316
+ - **"model_not_found"** — Make sure you have access to the model. Some
317
+ models require specific account tiers.
318
+
319
+ ---
320
+
321
+ ## OpenAI-Compatible APIs
322
+
323
+ Many providers offer APIs that follow the OpenAI format: Azure OpenAI,
324
+ Together AI, Groq, Anyscale, local servers like vLLM or text-generation-
325
+ inference, etc. Use the `openai-compatible` backend for these.
326
+
327
+ ### Example: Groq
328
+
329
+ ```json
330
+ {
331
+ "ServerURL": "http://localhost:54321",
332
+ "Name": "llm-groq",
333
+ "MaxConcurrent": 3,
334
+ "Tags": {
335
+ "LLM.Backend": "groq",
336
+ "LLM.Models": "llama-3.1-70b-versatile"
337
+ },
338
+ "Providers": [
339
+ {
340
+ "Source": "LLM",
341
+ "Config": {
342
+ "Backend": "openai-compatible",
343
+ "BaseURL": "https://api.groq.com/openai",
344
+ "APIKey": "$GROQ_API_KEY",
345
+ "Model": "llama-3.1-70b-versatile"
346
+ }
347
+ }
348
+ ]
349
+ }
350
+ ```
351
+
352
+ ### Example: Local vLLM server
353
+
354
+ ```json
355
+ {
356
+ "Providers": [
357
+ {
358
+ "Source": "LLM",
359
+ "Config": {
360
+ "Backend": "openai-compatible",
361
+ "BaseURL": "http://localhost:8000",
362
+ "Model": "meta-llama/Llama-3-8b-hf"
363
+ }
364
+ }
365
+ ]
366
+ }
367
+ ```
368
+
369
+ The key is that `BaseURL` should point to wherever the API serves its
370
+ `/v1/chat/completions` endpoint. The provider appends the path
371
+ automatically.
372
+
373
+ ---
374
+
375
+ ## Running Multiple LLMs
376
+
377
+ You can run multiple Beacons, each wrapping a different model or
378
+ provider. They all register independently with the same Ultravisor
379
+ server.
380
+
381
+ ```
382
+ Machine A (GPU server)
383
+ └── Beacon: ollama + llama3.1:70b
384
+ ServerURL: http://ultravisor-host:54321
385
+
386
+ Machine B (your laptop)
387
+ └── Beacon: ollama + llama3.2
388
+ ServerURL: http://ultravisor-host:54321
389
+
390
+ Machine C (any machine with internet)
391
+ └── Beacon: anthropic + claude-sonnet-4-20250514
392
+ ServerURL: http://ultravisor-host:54321
393
+ ```
394
+
395
+ Each Beacon advertises `Capability: "LLM"`. The coordinator sends work
396
+ to whichever Beacon is available. To target a specific Beacon, use
397
+ `AffinityKey` in your operation graph tasks.
398
+
399
+ ### Multiple providers on one Beacon
400
+
401
+ A single Beacon can also load multiple providers. For example, Shell and
402
+ LLM together:
403
+
404
+ ```json
405
+ {
406
+ "Name": "multi-worker",
407
+ "Providers": [
408
+ { "Source": "Shell" },
409
+ {
410
+ "Source": "LLM",
411
+ "Config": {
412
+ "Backend": "ollama",
413
+ "BaseURL": "http://localhost:11434",
414
+ "Model": "llama3.2"
415
+ }
416
+ }
417
+ ]
418
+ }
419
+ ```
420
+
421
+ This Beacon advertises both `Shell` and `LLM` capabilities and can
422
+ handle work for either.
423
+
424
+ ---
425
+
426
+ ## Remote Beacons
427
+
428
+ The Beacon communicates with the Ultravisor server over HTTP. It does
429
+ **not** need to run on the same machine as the server. The only
430
+ requirement is network connectivity to the server's port (default 54321).
431
+
432
+ The Beacon needs these files from the Ultravisor source tree:
433
+
434
+ ```
435
+ source/beacon/
436
+ ├── Ultravisor-Beacon-CLI.cjs
437
+ ├── Ultravisor-Beacon-Client.cjs
438
+ ├── Ultravisor-Beacon-Executor.cjs
439
+ ├── Ultravisor-Beacon-CapabilityProvider.cjs
440
+ ├── Ultravisor-Beacon-ProviderRegistry.cjs
441
+ └── providers/
442
+ ├── Ultravisor-Beacon-Provider-Shell.cjs
443
+ ├── Ultravisor-Beacon-Provider-FileSystem.cjs
444
+ └── Ultravisor-Beacon-Provider-LLM.cjs
445
+ ```
446
+
447
+ These files have zero npm dependencies — they use only Node.js built-in
448
+ modules. Copy the `source/beacon/` directory to your remote machine,
449
+ create a `.ultravisor-beacon.json` config file, and run:
450
+
451
+ ```bash
452
+ node Ultravisor-Beacon-CLI.cjs
453
+ ```
454
+
455
+ ---
456
+
457
+ ## Verifying Your Setup
458
+
459
+ Once the Beacon is running, you can verify it from the Ultravisor server.
460
+
461
+ ### Check registered Beacons
462
+
463
+ ```bash
464
+ curl http://localhost:54321/Beacons
465
+ ```
466
+
467
+ You should see your LLM Beacon in the list with `Status: "Online"` and
468
+ `Capabilities: ["LLM"]`.
469
+
470
+ ### Test with a simple operation
471
+
472
+ Load one of the example operations and execute it:
473
+
474
+ 1. Copy `operation-library/llm-summarize.json` content
475
+ 2. POST it to the Ultravisor API or load it via the web interface
476
+ 3. Set `Operation.InputFilePath` to a text file you want summarized
477
+ 4. Execute the operation
478
+
479
+ Or use the CLI:
480
+
481
+ ```bash
482
+ node source/cli/Ultravisor-Run.cjs execute --operation llm-summarize
483
+ ```
484
+
485
+ Watch the Beacon terminal — you should see it pick up the work item,
486
+ make the LLM API call, and report back.
487
+
488
+ ---
489
+
490
+ ## Configuration Reference
491
+
492
+ Full provider config options:
493
+
494
+ | Key | Type | Default | Description |
495
+ |--------------------|--------|----------------|------------------------------------------|
496
+ | Backend | string | `"openai"` | `openai`, `anthropic`, `ollama`, or `openai-compatible` |
497
+ | BaseURL | string | (required) | API base URL |
498
+ | APIKey | string | `""` | API key or `$ENV_VAR_NAME` |
499
+ | Model | string | (required) | Default model name |
500
+ | DefaultParameters | object | `{}` | Default `Temperature`, `MaxTokens`, `TopP` |
501
+ | TimeoutMs | number | `120000` | Per-request timeout in milliseconds |
502
+
503
+ Per-request settings (set in the operation graph) override
504
+ `DefaultParameters`. The `Model` setting on a task overrides the
505
+ provider's default model.