@delurio/cli 0.10.0 → 0.11.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.
Files changed (86) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/NOTICE +7 -0
  3. package/README.md +14 -13
  4. package/js/changes.d.ts +17 -0
  5. package/js/cli.js +6 -0
  6. package/{dist → js}/edges.d.ts +2 -2
  7. package/js/edges.js +40 -0
  8. package/js/expr.js +25 -0
  9. package/js/graph.js +59 -0
  10. package/{dist → js}/html.d.ts +6 -6
  11. package/js/html.js +13 -0
  12. package/js/internal.js +408 -0
  13. package/js/kit.js +54 -0
  14. package/{dist → js}/model.d.ts +2 -2
  15. package/js/model.js +136 -0
  16. package/js/native.cjs +46 -0
  17. package/js/native.d.cts +322 -0
  18. package/{dist → js}/nav.d.ts +1 -1
  19. package/js/nav.js +70 -0
  20. package/js/needs.js +30 -0
  21. package/{dist → js}/spine.d.ts +3 -3
  22. package/js/spine.js +22 -0
  23. package/{dist → js}/starts.d.ts +1 -3
  24. package/{dist → js}/story.d.ts +2 -2
  25. package/js/story.js +22 -0
  26. package/{dist → js}/wireframe.d.ts +2 -2
  27. package/js/wireframe.js +29 -0
  28. package/js/yaml.d.ts +20 -0
  29. package/js/yaml.js +40 -0
  30. package/package.json +40 -24
  31. package/dist/anchors.d.ts +0 -29
  32. package/dist/anchors.js +0 -160
  33. package/dist/changes.d.ts +0 -25
  34. package/dist/changes.js +0 -101
  35. package/dist/check.d.ts +0 -23
  36. package/dist/check.js +0 -649
  37. package/dist/cli.d.ts +0 -2
  38. package/dist/cli.js +0 -194
  39. package/dist/compare.d.ts +0 -34
  40. package/dist/compare.js +0 -143
  41. package/dist/diff-flow.d.ts +0 -33
  42. package/dist/diff-flow.js +0 -547
  43. package/dist/diff-nav.d.ts +0 -20
  44. package/dist/diff-nav.js +0 -401
  45. package/dist/diff.d.ts +0 -25
  46. package/dist/diff.js +0 -331
  47. package/dist/domain-names.d.ts +0 -18
  48. package/dist/domain-names.js +0 -124
  49. package/dist/domain.d.ts +0 -25
  50. package/dist/domain.js +0 -110
  51. package/dist/edges.js +0 -120
  52. package/dist/expr.js +0 -157
  53. package/dist/graph.js +0 -236
  54. package/dist/html.js +0 -311
  55. package/dist/index-page.d.ts +0 -12
  56. package/dist/index-page.js +0 -50
  57. package/dist/invokes.d.ts +0 -10
  58. package/dist/invokes.js +0 -67
  59. package/dist/kit.js +0 -711
  60. package/dist/mermaid.d.ts +0 -3
  61. package/dist/mermaid.js +0 -50
  62. package/dist/model.js +0 -608
  63. package/dist/nav-page.d.ts +0 -15
  64. package/dist/nav-page.js +0 -283
  65. package/dist/nav.js +0 -578
  66. package/dist/needs.js +0 -335
  67. package/dist/pan.d.ts +0 -2
  68. package/dist/pan.js +0 -252
  69. package/dist/schemas.d.ts +0 -15
  70. package/dist/schemas.js +0 -316
  71. package/dist/spine.js +0 -156
  72. package/dist/starts.js +0 -88
  73. package/dist/story.js +0 -109
  74. package/dist/tutorial-check.d.ts +0 -9
  75. package/dist/tutorial-check.js +0 -297
  76. package/dist/ui-check.d.ts +0 -8
  77. package/dist/ui-check.js +0 -142
  78. package/dist/watch.d.ts +0 -5
  79. package/dist/watch.js +0 -114
  80. package/dist/wireframe.js +0 -276
  81. package/dist/yaml.d.ts +0 -19
  82. package/dist/yaml.js +0 -134
  83. /package/{dist → js}/expr.d.ts +0 -0
  84. /package/{dist → js}/graph.d.ts +0 -0
  85. /package/{dist → js}/kit.d.ts +0 -0
  86. /package/{dist → js}/needs.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  While the version is 0.x, a release that can judge the same graphs differently (a new check, a stricter schema) bumps the minor; a fix that judges nothing differently bumps the patch.
4
4
 
5
+ ## 0.11.0 (2026-11-16)
6
+
7
+ - The checker is written in Rust: `check`, `page` and `diff`, and every module the package exports, are the TypeScript checker's ported one module at a time (crates/delurio-core, crates/delurio-page, the `delurio` binary in crates/delurio, and the addon in crates/delurio-node). It judges every graph as 0.10.0 does: on the examples, on delurio's, QAuth's and Medaris's own graphs, and in the 35 behaviour cases of the CI, every finding (its rule, level, file, line, words and fingerprint), the SARIF, the exit codes, every page, diagram and Mermaid file, and every diff are those 0.10.0 gives. Where 0.10.0 stopped with a JavaScript TypeError on a value of the wrong type, 0.11.0 reads the value as absent (the `schema` rule already reports it), and a baseline or a file it cannot read is an `error:` line, not a stack trace.
8
+ - It reads YAML as 0.10.0 did: the yaml library 2.9.1's lexer, parser and composer are ported, so a refusal (SPEC.md §1), a YAML error and a key are found at the same place and in the same words. The `schema` rule gives Ajv 8.20's findings: Ajv's evaluation of the keywords the schemas use is reproduced. A flow's diagram is still laid out by elkjs 0.12.1 itself, now run inside the binary (QuickJS-NG), so its places are the same to the last digit as before and as the dashboard's.
9
+ - Faster and smaller: on Medaris's 179 graphs, `check --strict --baseline` takes 34 s and 299 MB, where 0.10.0 took 87 s and 1 GB; `page` takes 96 s, where 0.10.0 took 15 minutes. On delurio's own graphs `check` takes 56 s and 0.56 GB, where 0.10.0 took 228 s and 4.2 GB (more than Node's default heap): the explorer keeps each (state, context) pair as packed words, 16 bytes a pair, so delurio's billing.plan (16.76 million pairs) explores in 21 s and 0.54 GB.
10
+ - One new limit: a context variable may hold up to 65,536 values.
11
+ - For installers: `delurio` is one static binary, from the GitHub release of each tag (Linux x64 and arm64, glibc and musl, macOS arm64, Windows x64, with SHA256SUMS), from `cargo install --locked --git https://github.com/delurio-labs/delurio --tag v0.11.0 delurio`, and in the image `ghcr.io/delurio-labs/delurio`, which is now the binary alone `FROM scratch`. `npm install @delurio/cli` installs the same command (`npx delurio`) and the same entry points with their types, on a prebuilt addon of the platform: npm picks one of six packages `@delurio/cli-<platform>` (no install script). The package needs Node 26 or later and depends only on elkjs. A process that loads the library under Node's permission model needs `--allow-addons`, and a bundler must leave `@delurio/cli` external.
12
+ - The library: `renderPage` and `callLine` (`@delurio/cli/html`) are gone; `delurio page` writes a flow's page. An `Exploration` must come from `explore`, and a graph, a navigation graph or a kit is read once per object (a copy is read again).
13
+
5
14
  ## 0.10.0 (2026-11-16)
6
15
 
7
16
  - New warning of `check`, which fails nothing: `role-missing`, a node of type `field` or `action` that gives no `role` (SPEC.md §4). A screen reader, a replay and `kit check` find a control by its WAI-ARIA role; before, `kit check` expected such a node's type (`field`, `action`) as its role, which no drawn element can have, so every such node was a mismatch. `@delurio/cli/wireframe`'s `Expectation` says so with `roleGiven`, so a kit check holds that node's name and state only.
package/NOTICE CHANGED
@@ -3,3 +3,10 @@ Copyright 2026 delurio Labs
3
3
 
4
4
  This product includes software developed by delurio Labs
5
5
  and its contributors.
6
+
7
+ The delurio binary and the npm package's addons include:
8
+ - elkjs 0.12.1 (https://github.com/kieler/elkjs), the Eclipse Layout Kernel compiled to JavaScript, under the
9
+ Eclipse Public License 2.0: crates/delurio-page/vendor/elkjs/ holds it unchanged with its LICENSE.md and SOURCE;
10
+ - QuickJS-NG (https://github.com/quickjs-ng/quickjs), through the rquickjs crate, under the MIT License, which runs it.
11
+ Each Rust crate they are built from keeps its own licence (cargo metadata lists them; all are MIT, Apache-2.0 or both,
12
+ or similarly permissive).
package/README.md CHANGED
@@ -6,26 +6,25 @@ This package is the part a project's own CI runs: it reads graph files and nothi
6
6
 
7
7
  ## Install
8
8
 
9
- Run it once, without installing:
9
+ `delurio` is one program with no runtime of its own to install. Pin an exact version in a project, in whichever way it
10
+ already installs its tools:
10
11
 
11
12
  ```sh
12
- npx @delurio/cli@0.1.1 check graphs --strict
13
+ npm install --save-dev --save-exact @delurio/cli # then: npx delurio check graphs --strict
14
+ cargo install --locked --git https://github.com/delurio-labs/delurio --tag v<x.y.z> delurio # then: delurio check graphs --strict
13
15
  ```
14
16
 
15
- or pin an exact version in a project, after which the command is `delurio`:
16
-
17
- ```sh
18
- npm install --save-dev --save-exact @delurio/cli
19
- npx delurio check graphs --strict
20
- ```
21
-
22
- or the container image, pinned by its digest:
17
+ or download the binary of your platform from the [releases](https://github.com/delurio-labs/delurio/releases) (Linux
18
+ x64 and arm64, glibc and musl; macOS arm64; Windows x64; each release lists their SHA-256 in `SHA256SUMS`), or
19
+ run the container image, pinned by its digest (the binary alone, `FROM scratch`):
23
20
 
24
21
  ```sh
25
22
  docker run --rm -v "$PWD:/work" -w /work ghcr.io/delurio-labs/delurio@sha256:<digest> check graphs --strict
26
23
  ```
27
24
 
28
- Node 26 or later.
25
+ The npm package installs a prebuilt addon of your platform (one of the `@delurio/cli-<platform>` packages, chosen by
26
+ npm, with no install script) and needs Node 26 or later. Running it once without installing works too:
27
+ `npx @delurio/cli@<x.y.z> check graphs --strict`.
29
28
 
30
29
  ## Check every graph
31
30
 
@@ -135,7 +134,7 @@ This prints Markdown for a pull request. It covers what the flow does differentl
135
134
 
136
135
  ## As a library
137
136
 
138
- A tool built on the format can use the same loader and checker the CLI uses:
137
+ A tool built on the format can use the same loader and checker the CLI uses, from Node:
139
138
 
140
139
  ```ts
141
140
  import { load } from '@delurio/cli/graph';
@@ -145,7 +144,9 @@ const g = load('graphs/billing/billing.payment');
145
144
  const configurations = explore(new Model(g.flow)).configs.length;
146
145
  ```
147
146
 
148
- The entry points are `graph`, `model`, `story`, `wireframe`, `kit`, `edges`, `html`, `nav`, `expr`, `yaml` and `needs`, each with its types. `yaml` reads a graph file's text as the CLI does (`readYaml`), refusing what SPEC.md §1 rules out before the text is resolved; a server that reads graphs it was sent should read them with it. `needs` reads a flow's needs (`readNeeds`) and gives the states and nodes that only missing needs are drawn as (`planned`), which a tool that walks the flow on the app leaves out. While the version is 0.x their API may change in any minor release: pin an exact version.
147
+ The entry points are `graph`, `model`, `story`, `wireframe`, `kit`, `edges`, `html`, `nav`, `expr`, `spine`, `yaml` and `needs`, each with its types. They run the checker's Rust code in a native addon: values go in and come out as plain JavaScript objects, callbacks (`load`'s readers, `explore`'s `keep`, `evaluate`'s lookup, the warnings) are called as the code reaches them, and errors are real `GraphError`, `ModelError` and `KitError` instances. `renderSpine` lays the diagram out with the package's own elkjs. Under Node's permission model a process that imports them needs `--allow-addons`, and a bundler must leave `@delurio/cli` (and `@delurio/cli-*`) external. `yaml` reads a graph file's text as the CLI does (`readYaml`), refusing what SPEC.md §1 rules out before the text is resolved; a server that reads graphs it was sent should read them with it. `needs` reads a flow's needs (`readNeeds`) and gives the states and nodes that only missing needs are drawn as (`planned`), which a tool that walks the flow on the app leaves out. While the version is 0.x their API may change in any minor release: pin an exact version.
148
+
149
+ The Rust crates are the same code for a Rust program: `delurio-core` (the graph, the model, every rule of `check`, `diff`), `delurio-page` (the page) and `delurio` (the command line).
149
150
 
150
151
  ## Licence
151
152
 
@@ -0,0 +1,17 @@
1
+ // types only, for html.d.ts: the domain a flow names (the module is internal to the checker)
2
+ export interface DomainAction {
3
+ route?: string;
4
+ serverFn?: string;
5
+ result?: {
6
+ returns?: string;
7
+ };
8
+ sideEffects?: unknown[];
9
+ }
10
+ export interface Domain {
11
+ id?: string;
12
+ actions?: Record<string, DomainAction | null>;
13
+ policies?: Array<{
14
+ do?: string[];
15
+ write?: string[];
16
+ }>;
17
+ }
package/js/cli.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ // delurio: the open checker and page of delurio-graph/0 (SPEC.md). The command line is the Rust one, run in this
3
+ // process by the addon; it writes to this process's stdout and stderr and gives the exit code.
4
+ import native from './native.cjs';
5
+
6
+ process.exitCode = native.runCli(process.argv.slice(2));
@@ -1,5 +1,5 @@
1
- import type { Graph, State } from './graph.ts';
2
- import type { Exploration } from './model.ts';
1
+ import type { Graph, State } from './graph.js';
2
+ import type { Exploration } from './model.js';
3
3
  export type EdgeKind = 'user' | 'system' | 'route' | 'fail';
4
4
  export interface VizEdge {
5
5
  from: string;
package/js/edges.js ADDED
@@ -0,0 +1,40 @@
1
+ // The edges a flow's diagrams draw, merged by their ends, and the words of their nodes: what a person presses, where
2
+ // an exit leaves them, a step's response in one line. The checker is the Rust one (crates/delurio-core/src/edges.rs).
3
+ import { json, native, nativeExploration, nativeGraph } from './internal.js';
4
+
5
+ export const BY = JSON.parse(native.edgesConstants());
6
+
7
+ export function kindOf(g, name) {
8
+ return native.kindOf(nativeGraph(g), String(name));
9
+ }
10
+
11
+ export function exitLine(st) {
12
+ return native.exitLine(st === undefined ? undefined : json(st));
13
+ }
14
+
15
+ // a step's `response` in one line: the status, the code and the redirect first, then the other fields
16
+ export function responseLine(r) {
17
+ return native.responseLine(json(r ?? {}));
18
+ }
19
+
20
+ export function nodeLine(g, name) {
21
+ return native.nodeLine(nativeGraph(g), String(name));
22
+ }
23
+
24
+ // visible text for a catalog key, with {placeholders} filled from the samples
25
+ export function plain(g, key) {
26
+ return native.plain(nativeGraph(g), String(key));
27
+ }
28
+
29
+ // the button or link text a person presses to send `event` while in `state`, if there is one
30
+ export function pressLabel(g, state, event) {
31
+ return native.pressLabel(nativeGraph(g), String(state), String(event)) ?? null;
32
+ }
33
+
34
+ export function wrap(text, max) {
35
+ return native.wrap(String(text), Number(max));
36
+ }
37
+
38
+ export function collectEdges(g, ex) {
39
+ return JSON.parse(native.collectEdges(nativeGraph(g), nativeExploration(ex)));
40
+ }
package/js/expr.js ADDED
@@ -0,0 +1,25 @@
1
+ // The guard and assertion language: a small, fixed subset, interpreted without eval.
2
+ // or / and / not, == / != / in / not in, parentheses, [lists], 'strings', numbers, true / false / null, names.
3
+ // The checker is the Rust one (crates/delurio-core/src/expr.rs).
4
+ import { Trap, call, native } from './internal.js';
5
+
6
+ const cache = new Map();
7
+
8
+ export function parseExpr(src) {
9
+ const hit = cache.get(src);
10
+ if (hit !== undefined) return hit;
11
+ const e = JSON.parse(call(null, () => native.parseExpr(String(src))));
12
+ cache.set(src, e);
13
+ return e;
14
+ }
15
+
16
+ // `lookup` is called for each name the expression reads, as it reads them; what it throws reaches the caller
17
+ export function evaluate(e, lookup) {
18
+ const t = new Trap();
19
+ return JSON.parse(call(t, () => native.evaluate(JSON.stringify(e), t.lookup(lookup))));
20
+ }
21
+
22
+ export function identifiers(e, out = new Set()) {
23
+ for (const name of native.identifiers(JSON.stringify(e))) out.add(name);
24
+ return out;
25
+ }
package/js/graph.js ADDED
@@ -0,0 +1,59 @@
1
+ // A graph as `load` reads it from its folder: flow.yaml, ui.yaml and the catalog ui.yaml names (SPEC.md §2-§4), and
2
+ // the readers of its parts. The checker is the Rust one (crates/delurio-core/src/graph.rs), run in the addon.
3
+ import { existsSync, readFileSync } from 'node:fs';
4
+ import { join } from 'node:path';
5
+ import { GraphError, Trap, call, json, native, nativeValue, placed, rememberGraph, warnings } from './internal.js';
6
+
7
+ export { GraphError, placed };
8
+
9
+ const constants = JSON.parse(native.graphConstants());
10
+
11
+ // in a returnsFocus, the node that was pressed to open the dialog (SPEC.md §4)
12
+ export const OPENER = constants.OPENER;
13
+
14
+ // the roles whose node may say whether it is `checked`
15
+ export const CHECKABLE = constants.CHECKABLE;
16
+
17
+ export const isDialog = (n) => native.isDialogNode(n === undefined ? undefined : JSON.stringify(n));
18
+
19
+ // the place of a transition in flow.yaml: `on.<event>`, the item of a list of alternatives, or an item of `always`
20
+ export function transitionPath(state, st, event, i) {
21
+ return native.transitionPathOf(String(state), json(st ?? {}), event === null || event === undefined ? undefined : String(event), i);
22
+ }
23
+
24
+ // 'silentRedirect' -> 'Silent redirect'; used only when the graph gives no title
25
+ export function humanize(id) {
26
+ return native.humanize(String(id));
27
+ }
28
+
29
+ export function titleOf(flow, state) {
30
+ return native.titleOfState(nativeValue(flow), String(state));
31
+ }
32
+
33
+ // a node is shown in a state when the state is in its `in` and not in its `unless`
34
+ export function shownIn(n, state) {
35
+ return native.shownInState(json(n ?? {}), String(state));
36
+ }
37
+
38
+ // The node that has focus once the flow has moved from the state `from` (null when it starts) into another state `to`
39
+ // (SPEC.md §4, Focus). `ui` is read as it is at the call.
40
+ export function focusAfter(ui, from, to, pressed) {
41
+ return JSON.parse(native.focusAfterStep(json(ui), from ?? undefined, String(to), pressed ?? undefined));
42
+ }
43
+
44
+ export function alternatives(spec) {
45
+ if (spec === undefined) return [undefined];
46
+ return JSON.parse(native.alternativesOf(json(spec)));
47
+ }
48
+
49
+ // `read` and `exists` take a path relative to `dir`; the revision diff passes ones that read a git revision instead of the disk
50
+ export function load(dir, read = (file) => readFileSync(join(dir, file), 'utf8'), exists = (file) => existsSync(join(dir, file))) {
51
+ const t = new Trap();
52
+ try {
53
+ const n = call(t, () => native.load(String(dir), t.reader(read), t.exister(exists)));
54
+ return rememberGraph(JSON.parse(n.json()), n);
55
+ } finally {
56
+ warnings();
57
+ }
58
+ }
59
+
@@ -1,9 +1,9 @@
1
- import type { Graph } from './graph.ts';
2
- import type { AssertionResult, Exploration, FinalPath, Model } from './model.ts';
3
- import type { Story } from './story.ts';
4
- import type { Kit } from './kit.ts';
5
- import type { HandOver } from './starts.ts';
6
- import type { Domain, DomainAction } from './changes.ts';
1
+ import type { Graph } from './graph.js';
2
+ import type { AssertionResult, Exploration, FinalPath, Model } from './model.js';
3
+ import type { Story } from './story.js';
4
+ import type { Kit } from './kit.js';
5
+ import type { HandOver } from './starts.js';
6
+ import type { Domain, DomainAction } from './changes.js';
7
7
  export declare const CSS = "\n:root { --bg:#fafaf9; --surface:#ffffff; --ink:#1c1917; --muted:#6b6560; --line:#d6d3d1; --accent:#1d4ed8; --accent-bg:#eef3ff; --ok:#15803d; --bad:#b91c1c; --server:#eeeeec; --focus:#1d4ed8; --ai:#7e22ce; --ai-bg:#f5edff; --agent:#c2410c; --agent-bg:#fff1e8; --ci:#0f766e; --ci-bg:#e6f6f3; --ok-bg:#eaf7ee; }\n@media (prefers-color-scheme: dark) { :root { --bg:#161513; --surface:#1f1d1b; --ink:#f2efec; --muted:#a8a29e; --line:#44403c; --accent:#8fb0ff; --accent-bg:#1c2438; --ok:#5fcf85; --bad:#f08080; --server:#2a2826; --focus:#8fb0ff; --ai:#c99bff; --ai-bg:#2a2135; --agent:#ff9a66; --agent-bg:#33241b; --ci:#5fd4c4; --ci-bg:#1a2e2b; --ok-bg:#16291d; } }\n* { box-sizing: border-box; }\nbody { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, \"Segoe UI\", sans-serif; }\nmain { max-width: 1000px; margin: 0 auto; padding: 28px 16px 80px; }\nh1 { font-size: 30px; line-height: 1.2; margin: 6px 0 8px; } h2 { font-size: 21px; margin: 44px 0 12px; } h3 { font-size: 16px; margin: 0; }\ncode, pre, .mono { font-family: ui-monospace, \"SF Mono\", Menlo, Consolas, monospace; font-size: 13px; }\n.muted { color: var(--muted); } .label { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }\n.eyebrow { margin: 0; color: var(--muted); } .lede { font-size: 18px; max-width: 46em; margin: 0; }\n.tag { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; color: var(--muted); vertical-align: middle; }\n.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }\ntable { border-collapse: collapse; width: 100%; } th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); } th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } tr:last-child td { border-bottom: 0; }\ntd ol { margin: 0; padding-left: 20px; }\n.ok { color: var(--ok); font-weight: 600; } .bad { color: var(--bad); font-weight: 600; }\n.story { margin-top: 28px; padding: 18px 22px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 10px; background: var(--surface); }\n.story h2 { margin: 0 0 6px; } .story .given { margin: 0 0 8px; } .story ol { margin: 0; padding-left: 26px; } .story li { margin: 5px 0; padding-left: 4px; } .story .result { margin: 10px 0 0; font-weight: 600; }\n.views input { margin-right: 8px; accent-color: var(--accent); } .views label { display: inline-block; margin: 0 0 10px; cursor: pointer; }\n.views .panel-full { display: none; } .views input:checked ~ .panel-main { display: none; } .views input:checked ~ .panel-full { display: block; }\nsvg.spine { display: block; width: 100%; height: auto; padding: 8px; background: var(--surface); margin: 0 auto; }\n.spine .edge { fill: none; stroke-width: 1.5; } .spine .edge-user { stroke: var(--muted); } .spine .edge-system { stroke: var(--muted); } .spine .edge-route { stroke: var(--muted); stroke-dasharray: 2 4; } .spine .edge-fail { stroke: var(--bad); stroke-dasharray: 7 4; } .spine .edge-unused { stroke: var(--line); }\n.spine .edge-main { stroke: var(--accent); stroke-width: 3.5; stroke-dasharray: none; }\n.spine .arrow { fill: var(--muted); } .spine .arrow-fail { fill: var(--bad); } .spine .arrow-main { fill: var(--accent); }\n.spine .elabel rect { fill: var(--surface); stroke: var(--line); } .spine .elabel text { fill: var(--ink); font: 13px system-ui, sans-serif; } .spine .elabel-fail text { fill: var(--bad); } .spine .elabel-main rect { stroke: var(--accent); }\n.spine .node rect { fill: var(--surface); stroke: var(--ink); stroke-width: 1.6; } .spine .node-server rect { fill: var(--server); stroke: var(--muted); stroke-dasharray: 5 3; }\n.spine .node-subflow rect { stroke: var(--accent); } .spine .node-subflow rect.inner { fill: none; stroke-width: 1; }\n.spine .on-main rect { stroke-width: 3; } .spine .node-server.on-main rect { stroke: var(--accent); }\n.spine .exit-never rect { stroke: var(--bad); stroke-width: 3; } .spine .exit-error rect { stroke-dasharray: 6 3; } .spine .exit-left rect { stroke-dasharray: 2 3; stroke: var(--muted); } .spine .exit-success rect { stroke: var(--ok); stroke-width: 3; }\n.spine .node.by-human rect { fill: var(--surface); stroke: var(--ink); stroke-dasharray: none; }\n.spine .node.by-ai rect { fill: var(--ai-bg); stroke: var(--ai); stroke-dasharray: none; }\n.spine .node.by-agent rect { fill: var(--agent-bg); stroke: var(--agent); stroke-dasharray: none; } .spine .node.by-agent rect.inner { fill: none; stroke-width: 1; }\n.spine .node.by-ci rect { fill: var(--ci-bg); stroke: var(--ci); stroke-dasharray: none; }\n.spine .node.goal rect { fill: var(--ok-bg); stroke: var(--ok); stroke-width: 3.5; stroke-dasharray: none; }\n.spine .node.on-main rect { stroke-width: 3.5; }\n.spine .nmore { fill: var(--muted); font: 600 11px system-ui, sans-serif; }\n.legend .sw { display: inline-flex; align-items: center; gap: 6px; } .legend svg { flex: none; }\n.legend .sw-node rect { stroke-width: 1.6; }\n.legend .sw-human rect { fill: var(--surface); stroke: var(--ink); } .legend .sw-ai rect { fill: var(--ai-bg); stroke: var(--ai); } .legend .sw-agent rect { fill: var(--agent-bg); stroke: var(--agent); } .legend .sw-agent rect.inner { fill: none; stroke-width: 1; }\n.legend .sw-ci rect { fill: var(--ci-bg); stroke: var(--ci); } .legend .sw-goal rect { fill: var(--ok-bg); stroke: var(--ok); stroke-width: 3; } .legend .sw-server rect { fill: var(--server); stroke: var(--muted); stroke-dasharray: 4 2; }\n.legend .sw-screen rect { fill: var(--surface); stroke: var(--ink); } .legend .sw-subflow rect { fill: var(--surface); stroke: var(--accent); }\n.legend .sw-node.sw-fail rect { fill: var(--surface); stroke: var(--bad); stroke-width: 3; }\n.legend .sw-line path { fill: none; stroke-width: 3; } .legend .sw-main path { stroke: var(--accent); stroke-width: 3.5; } .legend .sw-fail path { stroke: var(--bad); stroke-dasharray: 6 3; } .legend .sw-route path { stroke: var(--muted); stroke-dasharray: 2 3; }\n.covers { display: grid; gap: 10px; } .covers .cv { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 14px; } .covers ul { margin: 4px 0 0; padding-left: 20px; }\n.spine .node-unreachable rect { stroke: var(--bad); fill: none; }\n.spine .nname { fill: var(--ink); font: 600 14.5px system-ui, sans-serif; } .spine .nline { fill: var(--muted); font: 11.5px ui-monospace, Menlo, Consolas, monospace; } .spine .start { fill: var(--ink); }\n.spine a:focus-visible .node rect, .spine a:hover .node rect { stroke: var(--focus); stroke-width: 3; }\n.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }\n.screens { display: grid; gap: 18px; }\n.screen { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 14px 16px 16px; scroll-margin-top: 16px; }\n.screen:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }\n.screen header { display: flex; align-items: center; gap: 10px; } .screen > p { margin: 4px 0 10px; }\n.wf { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 10px; background: var(--bg); max-width: 560px; }\n.wf-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 2px; border-radius: 4px; }\n.wf-cond { outline: 1.5px dashed var(--muted); outline-offset: 2px; } .wf-focus { outline: 2.5px solid var(--focus); outline-offset: 2px; }\n.wf-h { margin: 0; font-size: 17px; } .wf-t { margin: 0; color: var(--muted); }\n.wf-row { display: flex; flex-wrap: wrap; gap: 10px; }\n.wf-btn, .wf-link { font: inherit; border-radius: 6px; padding: 6px 14px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); }\n.wf-confirm { background: var(--ink); color: var(--bg); } .wf-link { border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 0; }\n.wf button:disabled { opacity: .45; }\n.wf-list { margin: 0; padding-left: 20px; display: grid; gap: 2px; }\n.wf-status { color: var(--muted); font-style: italic; } .wf-alert { border: 1.5px solid var(--bad); border-radius: 6px; padding: 6px 10px; }\n.wf-check { display: flex; gap: 8px; align-items: center; } .wf-field { display: grid; gap: 4px; } .wf-input { font: inherit; border: 1px solid var(--muted); border-radius: 6px; padding: 6px 10px; background: var(--surface); color: var(--ink); }\n.wf-unmapped { border: 1.5px solid var(--bad); padding: 6px 10px; }\n.chip { font: 11px ui-monospace, Menlo, Consolas, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; }\ndetails { margin-top: 12px; } summary { cursor: pointer; color: var(--muted); }\ndetails.ax-wrap { margin-top: 10px; } pre.ax { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); line-height: 1.55; }\ndl.guards { margin: 10px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; } dl.guards dt { font-weight: 600; } dl.guards dd { margin: 0; }\nul.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } ul.checks li { padding-left: 26px; position: relative; } ul.checks li::before { content: \"\u2713\"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; } ul.checks li.fail::before { content: \"\u2717\"; color: var(--bad); }\nfooter { margin-top: 56px; color: var(--muted); font-size: 13px; }\n";
8
8
  export interface PageInput {
9
9
  g: Graph;
package/js/html.js ADDED
@@ -0,0 +1,13 @@
1
+ // The page of a flow: its styles, shared with the index and the navigation pages, and the page itself
2
+ // (crates/delurio-page). renderPage and callLine answer with an error until the port of html.ts is in this build.
3
+ import { call, native } from './internal.js';
4
+
5
+ export const CSS = native.pageCss();
6
+
7
+ export function callLine(_a) {
8
+ return call(null, () => native.pageNotPorted('callLine'));
9
+ }
10
+
11
+ export function renderPage(_p) {
12
+ return call(null, () => native.pageNotPorted('renderPage'));
13
+ }