@nova-energy/openamx 0.12.0 → 0.15.0

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.
package/README.md CHANGED
@@ -2,29 +2,37 @@
2
2
 
3
3
  ![OpenAMX](./docs/images/open_amx_screenshot.png)
4
4
 
5
- OpenAMX is a text-based format and toolset for **computable documents**. It
6
- combines Markdown narrative with executable `amx` code blocks and inline
7
- `{{ expressions }}` so a document can explain an analysis and calculate its
8
- results in one readable, versionable file.
9
-
10
- The core is domain-neutral: authors define calculations and data structures for
11
- their own work. Optional libraries and examples demonstrate asset-management
12
- workflows, but OpenAMX does not prescribe a risk model or certify domain rules.
13
-
14
- ## What You Can Do
15
-
16
- - Write narrative reports with executable calculations, reusable local modules,
17
- typed records and pure functions.
18
- - Read local JSON and CSV data through declared logical inputs, validate it
19
- against document types, and export named results as JSON or CSV.
20
- - Add data tables and charts to a document, then render the narrative,
21
- calculations and views together.
22
- - Create standalone HTML reports, or export offline PDF and editable DOCX
23
- reports.
24
- - Author in the desktop workbench or use OpenAMX language features in VS Code.
25
- - Run the TypeScript-based engine and command-line tools in local workflows.
26
-
27
- ## A Small Example
5
+ OpenAMX is a text-based format and toolset for **computable documents**. Write
6
+ an explanation in Markdown, add calculations in executable `amx` code blocks,
7
+ and refer to their results inline with `{{ expressions }}`. The document,
8
+ analysis, and report stay together in a readable, versionable `.amx` file.
9
+
10
+ OpenAMX is domain-neutral: you define the calculations and data structures for
11
+ your work. The included asset-management examples are optional demonstrations,
12
+ not certified risk models or industry standards.
13
+
14
+ ## What you can do
15
+
16
+ - **Write and calculate in one document.** Markdown provides the narrative;
17
+ only exact, case-sensitive `amx` fences execute. Inline expressions display
18
+ evaluated results in the report.
19
+ - **Model real data.** Use typed records, enums, pure functions, local modules,
20
+ and explicitly mapped JSON or CSV inputs. Validate inputs and export named
21
+ results as JSON or CSV.
22
+ - **Build visual explanations.** Create tables, charts, and formula-driven 2D
23
+ diagrams alongside the narrative.
24
+ - **Use the latest language additions.** V0.14 adds runtime type predicates,
25
+ mathematical functions, text helpers, and bounded numeric formatting with
26
+ `en-US`, `de-DE`, and `fr-FR` locales. Earlier additions include record
27
+ inheritance, enums, and braced conditionals.
28
+ - **Publish reports in familiar formats.** Render standalone, offline HTML or
29
+ export PDF and DOCX. Charts are interactive in HTML; PDF charts are static
30
+ with their data retained in tables. DOCX charts are editable native charts
31
+ when the chart can be represented.
32
+ - **Choose your authoring environment.** Use the command-line interface (CLI),
33
+ the offline-first desktop workbench, or the VS Code extension.
34
+
35
+ ## A small example
28
36
 
29
37
  Save this as `analysis.amx`:
30
38
 
@@ -39,501 +47,144 @@ score += 5
39
47
  ```
40
48
  ````
41
49
 
42
- Only exact, case-sensitive `amx` fenced blocks execute. Markdown remains
43
- narrative, and inline expressions resolve using the document's evaluated
44
- results.
50
+ The inline expression displays `15`. Ordinary Markdown and other code fences
51
+ remain narrative; they are not executed.
45
52
 
46
- ## Installation
53
+ ## Install
47
54
 
48
- OpenAMX has three independent components. Install whichever you need; release
49
- downloads are on the [GitHub releases page](https://github.com/NovaEnergyConsulting/openamx/releases).
50
- Release builds are unsigned, so your operating system may show a warning before
51
- installing them.
55
+ Choose the tool that fits your workflow. Prebuilt downloads are available from
56
+ the [GitHub Releases page](https://github.com/NovaEnergyConsulting/openamx/releases).
57
+ Release builds are unsigned, so your operating system may show a warning.
52
58
 
53
- ### Command-line tool (CLI)
59
+ ### CLI
54
60
 
55
61
  The CLI is published to npm as `@nova-energy/openamx` and runs on
56
62
  [Bun](https://bun.sh/) 1.0 or newer. Node.js and Deno are not supported.
57
63
 
58
- 1. Install Bun by following the instructions at [bun.sh](https://bun.sh/).
59
- 2. Install the CLI globally:
64
+ 1. Install Bun using the instructions at [bun.sh](https://bun.sh/).
65
+ 2. Install OpenAMX:
60
66
 
61
67
  ```sh
62
68
  bun add -g @nova-energy/openamx
63
69
  ```
64
70
 
65
- 3. Check the installation:
71
+ 3. Verify it:
66
72
 
67
73
  ```sh
68
74
  openamx --version
69
75
  openamx --help
70
76
  ```
71
77
 
72
- To run it once without installing, use
73
- `bunx @nova-energy/openamx render analysis.amx`. Installing with
74
- `npm install -g @nova-energy/openamx` also works, provided Bun is on your
75
- `PATH`. To remove it, run `bun remove -g @nova-energy/openamx`.
78
+ To try it without a global install, run `bunx @nova-energy/openamx --help`.
79
+ To uninstall the global package, run `bun remove -g @nova-energy/openamx`.
76
80
 
77
- ### Desktop application
81
+ ### Desktop app
78
82
 
79
83
  Download the installer for your platform from the
80
- [releases page](https://github.com/NovaEnergyConsulting/openamx/releases). The
81
- installed application includes its own runtime; you do not need Bun or Node.js.
82
-
83
- - **Linux (x64):** download `OpenAMX-Desktop-<version>-linux-x64.tar.gz`, then
84
- extract it and run the installer:
85
-
86
- ```sh
87
- mkdir openamx-setup
88
- tar -xzf OpenAMX-Desktop-<version>-linux-x64.tar.gz -C openamx-setup
89
- cd openamx-setup && ./installer
90
- ```
91
-
92
- The application uses your system's WebKitGTK 4.1 and GTK libraries; install
93
- them with your distribution's package manager if they are missing. To
94
- uninstall, run `uninstall --quiet` from the application's data directory
95
- (`~/.local/share/dev.openamx.desktop/stable/`). Your project documents are
96
- not removed.
97
- - **Windows:** download the Setup `.zip`, extract it, and run the Setup
98
- program it contains.
99
- - **macOS:** download the `.dmg`, open it, and follow the installer.
100
-
101
- Windows and macOS builds have not yet been formally verified. See the
102
- [desktop guide](desktop-app/README.md) for details.
84
+ [Releases page](https://github.com/NovaEnergyConsulting/openamx/releases). The
85
+ app includes its own runtime; Bun and Node.js are not required.
103
86
 
104
- ### VS Code extension
105
-
106
- The extension requires VS Code 1.85.0 or newer. It is not yet on the Visual
107
- Studio Marketplace, so install it from the VSIX file:
108
-
109
- 1. Download `openamx-vscode-<version>.vsix` from the
110
- [releases page](https://github.com/NovaEnergyConsulting/openamx/releases).
111
- 2. Install it from a terminal:
112
-
113
- ```sh
114
- code --install-extension openamx-vscode-<version>.vsix
115
- ```
87
+ - **Linux x64:** extract the `OpenAMX-Desktop-<version>-linux-x64.tar.gz`
88
+ archive and run `./installer`. The app requires WebKitGTK 4.1, GTK, and
89
+ related system libraries. The current Linux x64 installer has been reported
90
+ to launch and work, but broad Linux compatibility has not been established.
91
+ - **Windows:** extract the Setup `.zip` and run the Setup program it contains.
92
+ - **macOS:** open the `.dmg` and follow the installer.
116
93
 
117
- Or, in VS Code, open the Extensions view, choose **...** >
118
- **Install from VSIX...**, and select the downloaded file.
119
- 3. Open any `.amx` file to activate syntax highlighting, formatting,
120
- completion and diagnostics.
94
+ Windows, macOS, and Linux arm64 builds have not been formally verified. See the
95
+ [desktop guide](desktop-app/README.md) for current platform notes and
96
+ installation details.
121
97
 
122
- To build any component from source instead, see [Get Started](#get-started)
123
- and the [desktop](desktop-app/README.md) and [extension](vscode-extension/README.md)
124
- guides.
125
-
126
- ## Get Started
127
-
128
- Install [Bun](https://bun.sh/), then install dependencies and build from the
129
- repository root:
130
-
131
- ```sh
132
- bun install
133
- bun run build
134
- ```
98
+ ### VS Code extension
135
99
 
136
- Run a document, render it to standalone HTML, or export a report:
100
+ The extension requires VS Code 1.85.0 or newer. It is not yet available on the
101
+ Visual Studio Marketplace; install the VSIX from the
102
+ [Releases page](https://github.com/NovaEnergyConsulting/openamx/releases):
137
103
 
138
104
  ```sh
139
- bun run dist/cli.js run examples/hello-world.amx
140
- bun run dist/cli.js render examples/hello-world.amx --out hello-world.html
141
- bun run dist/cli.js export pdf examples/typed-asset-analysis.amx --out analysis.pdf \
142
- --input asset=examples/typed-asset.json \
143
- --input screenings=examples/typed-screenings.csv \
144
- --input reviewedAt=examples/typed-reviewed-at.json
105
+ code --install-extension openamx-vscode-<version>.vsix
145
106
  ```
146
107
 
147
- The `run` command prints evaluated bindings as JSON. `render` produces a
148
- standalone HTML document; `export` supports `pdf` and `docx`. Data inputs are
149
- explicitly mapped with `--input name=path`. See `bun run dist/cli.js --help` for
150
- the available commands and options.
151
-
152
- Charts are interactive in standalone HTML and the desktop live preview; their
153
- runtime is bundled, so reports work offline. PDF charts are static, and the
154
- complete chart data remains in report tables. DOCX charts are native and editable
155
- with embedded data when representable; approved deferrals use a clear notice and
156
- complete data table rather than a static-image substitute.
157
-
158
- Run the test suite with:
108
+ The extension provides OpenAMX editing support, including formatting,
109
+ completion, diagnostics, hover, navigation, outline, references, and contextual
110
+ fixes. It analyzes source; running documents and validating CSV/JSON inputs are
111
+ CLI or desktop workbench tasks. See the
112
+ [VS Code guide](vscode-extension/README.md).
159
113
 
160
- ```sh
161
- bun test
162
- ```
114
+ ## Try OpenAMX
163
115
 
164
- ## Tooling
165
-
166
- - **Desktop workbench:** local project browsing, AMX editing and analysis, live
167
- preview, structured JSON/CSV editing, input mapping, and HTML/PDF/DOCX export.
168
- See the [desktop guide](desktop-app/README.md).
169
- - **VS Code extension:** formatting, completion, diagnostics, hover, navigation,
170
- symbols, references, and code actions. See the
171
- [extension guide](vscode-extension/README.md).
172
- - **CLI:** evaluate documents, render HTML, and export PDF or DOCX reports.
173
-
174
- ## Examples and Specifications
175
-
176
- Start with [Hello OpenAMX](examples/hello-world.amx) for the document basics.
177
- Other [examples](examples/) show calculations, tables and charts, typed JSON/CSV
178
- inputs, local modules, and JSON/CSV outputs. The Asset Management schemas are
179
- opt-in examples, not domain-certified standards.
180
-
181
- The [V0.12 language specification](docs/language-spec-v0.12.md) documents the
182
- current additive language contract. Try the [record inheritance and enums](examples/v0.12-records-and-enums.amx)
183
- and [braced conditional](examples/v0.12-braced-if.amx) examples. The
184
- [V0.9 language specification](docs/language-spec-v0.9.md) and [V0.9 migration guide](docs/migrating-to-v0.9.md)
185
- remain historical references for the earlier language contract and its approved compatibility changes. Earlier specifications describe
186
- the language's evolution: [V0.5](docs/language-spec-v0.5.md),
187
- [V0.2](docs/language-spec-v0.2.md),
188
- [V0.3](docs/language-spec-v0.3.md), and [V0.4](docs/language-spec-v0.4.md).
189
-
190
- ## Design Boundaries
191
-
192
- OpenAMX is intended for local documents, local modules, and explicitly mapped
193
- data files. It does not load remote packages or data. Hiding source in a report
194
- is a presentation choice, not a confidentiality boundary; source files and
195
- inputs should be protected independently. Report output is designed to work
196
- offline, but exact visual parity across HTML, PDF, DOCX, and office applications
197
- is not guaranteed.# OpenAMX
198
-
199
- Status: V0.6 is COMPLETE and approved for release with Lead Developer-accepted
200
- exceptions. The CLI, shared report identity, HTML/PDF/DOCX exports, desktop
201
- workbench and VS Code productivity providers are present. Native macOS 14+,
202
- Windows 11+, native Ubuntu 24.04+, Hutch packaging/launch, broad Office
203
- compatibility, project licensing/Marketplace publication, formal accessibility,
204
- V0.5 report-mobile overflow, and VS Code apply-time action safety were not
205
- verified as passes; they are accepted release exceptions and follow-up
206
- requirements for V0.7 planning. Release approval is not a claim that artifacts
207
- have been published or that these certifications were completed. Root, desktop,
208
- and extension package metadata are aligned to 0.6.0.
209
-
210
- OpenAMX combines Markdown narrative, executable `amx` fences, and inline
211
- `{{ expression }}` calculations in plain-text `.amx` documents. The TypeScript
212
- core remains domain-neutral; asset-management examples use ordinary values.
213
- See the [V0.2 language specification](docs/language-spec-v0.2.md) for the
214
- historical contract, the [V0.3 language specification](docs/language-spec-v0.3.md)
215
- for typed-data workflows, and the [V0.4 language specification](docs/language-spec-v0.4.md)
216
- for typed visualizations and their historical export behavior. The
217
- [V0.5 product and report contract](docs/language-spec-v0.5.md) defines additive
218
- report identity, source visibility and product boundaries; it does not mean every
219
- acceptance or release gate has passed.
220
-
221
- ## Install and verify
222
-
223
- Install [Bun](https://bun.sh/), then from the repository root run:
116
+ With the CLI installed, run a document, render it to HTML, or export a PDF:
224
117
 
225
118
  ```sh
226
- bun install
227
- bun run build
228
- bun test
119
+ openamx run examples/01_First_Computable_Document.amx
120
+ openamx render examples/01_First_Computable_Document.amx --out first-computable-document.html
121
+ openamx export pdf examples/01_First_Computable_Document.amx --out first-computable-document.pdf
229
122
  ```
230
123
 
231
- ## Desktop Workbench
232
-
233
- The repository includes an offline-first desktop authoring workbench with active-document preview, project recovery, AMX editor intelligence, structured CSV/JSON editing, logical inputs, report settings, and a unified export workflow. Sprint 043 is completing onboarding, migration, and integrated acceptance; native target certification and release readiness are not implied. See the [desktop development guide](desktop-app/README.md) for current workflows, privacy limits, and verification status.
234
-
235
- ## Write a document
236
-
237
- An optional YAML front matter and a Markdown heading can precede executable
238
- blocks. A narrative sentence such as `The final score is {{ score }}.` resolves
239
- against the final environment, even when the following block appears later:
240
-
241
- ```amx
242
- let score = 10
243
- score += 5
244
- ```
245
-
246
- The paragraph displays 15. Executable source is visible as escaped, canonically
247
- formatted code in the standalone HTML. V0.2 supports mutable `let` bindings
248
- (including repeated declarations), `=` and `+=`, arithmetic, comparisons,
249
- logicals, single-line `if ... then ... else ...`, lists, inclusive integer
250
- `[start to end]` ranges, statement loops, expression loops with one per-iteration
251
- `return`, literal-case `match` with exactly one `default`, and the `sum`, `min`,
252
- `max`, `mean`, `round`, `abs`, `sqrt`, and `pow` functions. Loops iterate over
253
- lists or ranges; their iterator does not persist in the final environment.
254
-
255
- V0.3 adds records, typed pure functions, local imports/exports, JSON and CSV
256
- inputs, aggregate or fail-fast validation, and named JSON/CSV exports. The six
257
- initial Asset Management schemas are an opt-in structural library, not
258
- domain-certified standards.
259
-
260
- **Migration from V0.1:** bare `let score = 10` lines outside exact, case-sensitive
261
- `amx` backtick fences are narrative and do not execute. Move old declarations
262
- into ` ```amx ` fences. Ordinary Markdown code fences also do not execute;
263
- there is no V0.1 compatibility mode.
264
-
265
- ## VS Code Extension
266
-
267
- The [VS Code extension](vscode-extension/README.md) requires VS Code 1.85.0 or
268
- newer and runs in the Node extension host. The workspace implementation includes
269
- formatting, completion, static diagnostics, hover, definition, outline,
270
- references and a diagnostic-backed quick fix. Runtime CSV/JSON validation remains
271
- a CLI concern. The quick fix is guarded when resolved; VS Code 1.85 cannot attach
272
- an apply-time document-version precondition, and that limitation still requires a
273
- Lead Developer disposition.
274
-
275
- From the repository root, develop, test, package, and install a local VSIX:
276
-
277
- ```bash
278
- cd vscode-extension
279
- bun install
280
- bun run compile
281
- bun run test
282
- CI=1 bun run package
283
- bun run install-local
284
- code --list-extensions --show-versions
285
- ```
286
-
287
- `bun run test` launches the VS Code 1.85.0 Extension Development Host; a display
288
- or headless display server is required. For manual launch, open the extension
289
- directory and select **Run OpenAMX Extension**. The locally installed package is
290
- `engineerstools.openamx-vscode@0.4.0`. This repository has no license file;
291
- Marketplace publication is deferred until the project chooses a license and adds
292
- the corresponding file. Packaging may prompt about the missing license.
293
-
294
- ---
295
-
296
- ## CLI usage
297
-
298
- Build first. Render a document to standalone HTML (by default next to its source):
299
-
300
- ```bash
301
- bun run dist/cli.js render examples/hello-world.amx --out examples/hello-world.html
302
- ```
303
-
304
- Or use the bundled script:
305
-
306
- ```bash
307
- bun run render:hello
308
- bun run render:transformer
309
- bun run render:fleet
310
- bun run render:typed
311
- ```
312
-
313
- Run a document and print the evaluated context as JSON:
314
-
315
- ```bash
316
- bun run dist/cli.js run examples/transformer-strategy.amx
317
- ```
318
-
319
- The `run` command prints final variable bindings as JSON.
320
-
321
- Typed documents accept repeated logical input mappings and named export mappings:
322
-
323
- ```bash
324
- bun run dist/cli.js run examples/typed-asset-analysis.amx \
325
- --input asset=examples/typed-asset.json \
326
- --input screenings=examples/typed-screenings.csv \
327
- --input reviewedAt=examples/typed-reviewed-at.json \
328
- --output summary=out/summary.json \
329
- --output resultRows=out/result-rows.csv
330
- ```
331
-
332
- Use `--validation fail-fast` to stop at the first ordered input diagnostic;
333
- aggregate validation is the default. `render` accepts the same mappings and
334
- adds `--out` for the HTML destination.
335
-
336
- `render` and `export pdf|docx` accept `--project-root <dir>` to load report
337
- identity defaults from that project's `.openamx/project.json`. This option does
338
- not supply input mappings or change their process-working-directory path base;
339
- `run` does not read project report configuration. Without the option, project
340
- configuration is not discovered. Frontmatter identity without a logo remains
341
- available.
342
-
343
- Export an offline PDF or editable DOCX report. The commands analyze once, prepare
344
- the complete report before writing, and require an existing parent:
345
-
346
- ```bash
347
- bun run dist/cli.js export docx examples/typed-asset-analysis.amx --out out/analysis.docx \
348
- --input asset=examples/typed-asset.json \
349
- --input screenings=examples/typed-screenings.csv \
350
- --input reviewedAt=examples/typed-reviewed-at.json
351
- ```
352
-
353
- DOCX contains editable semantic headings, paragraphs, lists, tables, and native
354
- charts with embedded data for representable cases. Numeric-X line charts use
355
- straight-line XY scatter. Unsupported axis counts, charts with no plottable
356
- points, and mixed-group scatter with a null-only group are omitted with a notice
357
- and complete table; a numeric-X line series with no plottable pairs is omitted
358
- from the chart, disclosed, and retained in the table. These mappings do not
359
- promise pixel parity or broad native Office compatibility.
360
-
361
- Report narratives support headings, formatted paragraphs, lists, blockquotes,
362
- tables, code, rules, and visible source line breaks; authored raw HTML remains
363
- inert text. Narrative images must be project-contained PNG or JPEG files with
364
- nonempty alternative text, no more than 4 MiB and 4,000,000 decoded pixels per
365
- image. They are sanitized and embedded, so reports do not fetch remote images.
366
- External links are limited to HTTP(S); local links are limited to PDF, PNG,
367
- JPEG, TXT, CSV, and JSON targets contained by the project. Local links are
368
- relative to the final report location, and companion files are not copied; keep
369
- them at the corresponding relative paths when moving a report. Desktop preview
370
- routes activated external/local links through host confirmation. Viewer behavior
371
- varies: Word for the Web rewrote tested relative DOCX links as HTTPS targets, so
372
- local companion-file opening there is not claimed.
373
-
374
- Run the V0.5 typed example with its local imports, JSON/CSV inputs, table and
375
- chart. Copy the sample project config into a temporary project because the CLI
376
- intentionally does not discover parent projects:
377
-
378
- ```bash
379
- review=$(mktemp -d)
380
- mkdir -p "$review/.openamx"
381
- cp examples/v05-asset-screening.amx "$review/"
382
- cp -R examples/libraries "$review/"
383
- cp examples/v05-project.json "$review/.openamx/project.json"
384
- bun run dist/cli.js run "$review/v05-asset-screening.amx" \
385
- --input asset=examples/typed-asset.json \
386
- --input screenings=examples/typed-screenings.csv
387
- bun run dist/cli.js render "$review/v05-asset-screening.amx" \
388
- --out "$review/report.html" --project-root "$review" \
389
- --input asset=examples/typed-asset.json \
390
- --input screenings=examples/typed-screenings.csv
391
- bun run dist/cli.js export pdf "$review/v05-asset-screening.amx" \
392
- --out "$review/report.pdf" --project-root "$review" \
393
- --input asset=examples/typed-asset.json \
394
- --input screenings=examples/typed-screenings.csv
395
- bun run dist/cli.js export docx "$review/v05-asset-screening.amx" \
396
- --out "$review/report.docx" --project-root "$review" \
397
- --input asset=examples/typed-asset.json \
398
- --input screenings=examples/typed-screenings.csv
399
- ```
400
-
401
- The example calculation is illustrative, not a domain-standard risk formula.
402
- `sourceVisible` defaults to true; hiding source is a presentation choice, not a
403
- confidentiality boundary. Logo assets must be contained local PNG/JPEG files and
404
- are validated and re-encoded before report output is written.
405
-
406
- ---
407
-
408
- ## Example files
409
-
410
- The canonical examples are:
411
-
412
- - [Hello OpenAMX](examples/hello-world.amx), with generated
413
- [HTML](examples/hello-world.html), introduces executable fences and score 15.
414
- - [Kitchen Sink](examples/kitchen-sink.amx), contains a comprehensive explanation of every construct in the AMX framework.
415
- - [Power Transformer Failure Mode Analysis](examples/transformer-strategy.amx)
416
- computes mode scores `[24, 18, 27]`, initial aggregate 69, then adjusted
417
- aggregate 60. Its [HTML](examples/transformer-strategy.html) shows the final
418
- value even in an earlier paragraph.
419
- - [Asset Fleet Risk Analysis](examples/asset-fleet-risk-analysis.amx) computes
420
- `[5, 10, 15]`, total 30, then 35 after an access adjustment. Its
421
- [HTML](examples/asset-fleet-risk-analysis.html) displays the default decision
422
- "Schedule review" and the final score 35; ordinary fences and bare
423
- declarations are visible but never executed.
424
- - [Typed Asset Screening Analysis](examples/typed-asset-analysis.amx) imports
425
- opt-in Asset Management and screening schemas, consumes nested JSON and CSV,
426
- computes scores with a typed pure function, and exports summary JSON plus
427
- result CSV. Its [HTML](examples/typed-asset-analysis.html) is generated by
428
- the production CLI.
429
- - [Branded Asset Screening Snapshot](examples/v05-asset-screening.amx) reuses
430
- typed inputs, local libraries and V0.4 table/chart constructs;
431
- [project identity defaults](examples/v05-project.json) apply only when the
432
- CLI receives an explicit `--project-root`.
433
-
434
- ```sh
435
- bun run dist/cli.js run examples/transformer-strategy.amx
436
- bun run dist/cli.js run examples/asset-fleet-risk-analysis.amx
437
- ```
438
-
439
- ---
440
-
441
- ## Current limits
442
-
443
- No nested loops, range steps, `break`/`continue`, match guards/destructuring,
444
- or chained `else if`. A record constructor directly in a `match` arm remains a
445
- known core parser limitation and is not claimed as supported. Editor
446
- diagnostics cover parsing, static checks, and local module links, not CSV/JSON
447
- runtime validation. Modules and data files are local and entry-root-contained;
448
- there are no remote packages, units/currency, or broad multi-file workflows.
449
- PDF and DOCX exports are local and offline. DOCX charts are editable native
450
- objects with embedded data for representable cases; explicit no-chart notices
451
- and complete tables cover the approved deferrals. Word desktop open and
452
- chart-edit persistence have been exercised on the build recorded in the sprint
453
- evidence, but broad Office compatibility, the Word for the Web numeric-X
454
- null-gap visual, and a formal screen-reader review are not claimed. The Asset
455
- Management library remains provisional pending domain review.
456
-
457
- ---
458
-
459
- ## OpenAMX Licensing
460
-
461
- This project is dual licensed.
462
-
463
- You may use this software under either:
464
-
465
- 1. The GNU Affero General Public License v3.0 (AGPLv3)
466
- 2. A Commercial License from Nova Energy Consulting Pty Ltd
467
-
468
- By using this software, you agree to comply with the terms of one of these licences.
469
-
470
- ### Open Source Licence (AGPLv3)
471
-
472
- The Community Edition of this software is licensed under the GNU Affero General Public License Version 3 (AGPLv3).
473
-
474
- The AGPLv3 permits you to:
475
-
476
- - Use the software for any purpose
477
- - Study and modify the software
478
- - Distribute original or modified versions
479
- - Use the software within an organisation
480
- - Deploy the software as a network service
481
-
482
- Subject to the conditions of the AGPLv3, including making source code available where required by the licence.
483
-
484
- See the LICENSE file for the full licence text.
485
-
486
- ### Commercial Licence
487
-
488
- A commercial licence is available for organisations that wish to:
489
-
490
- - Keep modifications proprietary
491
- - Distribute the software as part of a closed-source product
492
- - Embed the software within commercial solutions
493
- - Avoid AGPLv3 source disclosure obligations
494
- - Obtain commercial support arrangements
495
-
496
- See COMMERCIAL-LICENSE.md for details.
497
-
498
- ### Which Licence Should I Choose?
499
-
500
- #### Use AGPLv3 if:
501
-
502
- - You are an individual user
503
- - You are happy to comply with AGPL obligations
504
- - You wish to participate in the open-source community
505
- - Your project is also open source
506
-
507
- #### Use a Commercial Licence if:
508
-
509
- - You require proprietary use rights
510
- - Your organisation cannot comply with AGPL obligations
511
- - You wish to distribute closed-source derivative works
512
- - You require contractual warranties, support or indemnities
513
-
514
- ### Commercial Enquiries
515
-
516
- For commercial licensing and support enquiries:
517
-
518
- **Nova Energy Consulting Pty Ltd**
519
-
520
- Email: licensing@novaenergy.digital
521
-
522
- ---
124
+ For documents that use external data, map each declared logical input
125
+ explicitly with `--input name=path`. See the
126
+ [mapped-data lesson](examples/06_Mapped_Data_and_Validation.amx) and the CLI
127
+ help for all options. The desktop workbench offers project browsing, live
128
+ preview, structured JSON/CSV editing, input mapping, report settings, and a
129
+ unified HTML/PDF/DOCX export workflow.
130
+
131
+ ## Examples and documentation
132
+
133
+ - [OpenAMX learning guide](examples/00_Table_of_Contents.amx) is the offline,
134
+ numbered path from the first computable document to a complete report.
135
+ - [First computable document](examples/01_First_Computable_Document.amx) is
136
+ the guide's small, input-free first lesson.
137
+ - [Mapped data and validation](examples/06_Mapped_Data_and_Validation.amx)
138
+ introduces explicit JSON/CSV input mappings.
139
+ - [Complete asset screening report](examples/12_Complete_Asset_Screening_Report.amx)
140
+ is the guided destination; [route measurements](examples/13_Route_Measurement_Report.amx)
141
+ and the [battery-resistor circuit](examples/14_Battery_Resistor_Circuit.amx)
142
+ are standalone references.
143
+ - V0.12 features: [records and enums](examples/04_Typed_Records_Enums_and_Modules.amx)
144
+ and [expressions and decisions](examples/02_Expressions_and_Decisions.amx).
145
+ - V0.13 diagrams: [formula-driven diagrams](examples/08_Formula_Driven_Diagrams.amx)
146
+ and the [battery-resistor reference](examples/14_Battery_Resistor_Circuit.amx).
147
+ - V0.14 examples: [runtime type checks](examples/09_Runtime_Type_Checks.amx),
148
+ [math and Measurements](examples/10_Mathematics_and_Measurement_Operations.amx),
149
+ and [text and formatting](examples/11_Text_and_Numeric_Formatting.amx).
150
+
151
+ Read the [V0.9 language specification](docs/language-spec-v0.9.md) and
152
+ [V0.9 migration guide](docs/migrating-to-v0.9.md), then the additive
153
+ [V0.12 language specification](docs/language-spec-v0.12.md),
154
+ [V0.13 diagram specification](docs/language-spec-v0.13.md), and
155
+ [V0.14 language specification](docs/language-spec-v0.14.md) for the current
156
+ language contract. Browse the [examples](examples/) and [documentation](docs/). The
157
+ [desktop guide](desktop-app/README.md) and
158
+ [VS Code guide](vscode-extension/README.md) cover their respective tools.
159
+
160
+ ## Licensing
161
+
162
+ OpenAMX is offered under a dual-licensing model. You may use it under either:
163
+
164
+ 1. The [GNU Affero General Public License v3.0 (AGPLv3)](LICENSE.md), subject
165
+ to its terms, including the source-code obligations that apply to covered
166
+ modified versions used over a network.
167
+ 2. A separate written commercial license from Nova Energy Consulting Pty Ltd,
168
+ for organizations that need rights outside the AGPLv3 terms.
169
+
170
+ The [commercial license overview](COMMERCIAL-LICENSE.md) describes the
171
+ commercial option; the definitive terms are set out in a separately executed
172
+ agreement. For inquiries, contact
173
+ [licensing@novaenergy.digital](mailto:licensing@novaenergy.digital).
174
+
175
+ ## Scope and limitations
176
+
177
+ OpenAMX is designed for local documents, local modules, and explicitly mapped
178
+ local data files; it does not load remote packages or data. Hiding source in a
179
+ report is a presentation choice, not a confidentiality boundary. Protect source
180
+ files and inputs independently. Report formats work offline, but exact visual
181
+ parity across HTML, PDF, DOCX, and office applications is not guaranteed.
182
+
183
+ The Asset Management library and examples are opt-in demonstrations and have
184
+ not been domain-certified. Review the calculations and obtain appropriate
185
+ domain validation before relying on results.
523
186
 
524
187
  ## Contributing
525
188
 
526
- By submitting a contribution to this project, you agree that your contribution may be distributed under both:
527
-
528
- - AGPLv3
529
- - The commercial licensing program for this project
530
-
531
- See CONTRIBUTING.md and the contributor agreement (if applicable) for details.
532
-
533
- ---
534
-
535
- ## Disclaimer
536
-
537
- This software is provided "as is" without warranty of any kind.
538
-
539
- See the applicable licence for full terms and conditions.
189
+ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for
190
+ development and contribution guidance.