termigan 0.1.0 → 0.1.1

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.
@@ -76,7 +76,7 @@ Input and output `List(U8)` staging buffers are also allocated and freed inside
76
76
 
77
77
  ### Binary dirty-row projection instead of draw callbacks or JSON
78
78
 
79
- As recorded in [.agents/brain/decisions/0001-roc-wasm-architecture.md](../.agents/brain/decisions/0001-roc-wasm-architecture.md), Termigan rejected two common WebAssembly renderer designs:
79
+ As recorded in [decisions/0001-roc-wasm-architecture.md](decisions/0001-roc-wasm-architecture.md), Termigan rejected two common WebAssembly renderer designs:
80
80
 
81
81
  1. **Hosted canvas draw callbacks.** Importing JS fill and glyph callbacks into Roc would cross the WebAssembly boundary thousands of times when PTY output bursts. It would also tie stream parsing to browser paint timing and break pure `roc test` runs.
82
82
  2. **JSON state serialization.** Encoding the active screen and up to 10,000 scrollback rows as JSON would allocate and copy megabytes of state on each chunk.
@@ -88,15 +88,15 @@ Instead, `FrameCodec.encode_frame` writes one compact little-endian byte array p
88
88
 
89
89
  ## Formally verified gateway models
90
90
 
91
- Termigan models every component boundary as a state chart and verifies it in TLA+ with `everystate` before implementation crosses the boundary. All six formal models, their `.cfg` configurations, and their state charts live in [.agents/brain/models/](../.agents/brain/models/state-charts.md) and [PtySocketBridge.md](../.agents/brain/models/PtySocketBridge.md). The verification summaries from `everystate 0.4.6` live in [models-2026-12-02.md](../.agents/brain/verification/models-2026-12-02.md) and [pty-socket-bridge-2026-12-02.md](../.agents/brain/verification/pty-socket-bridge-2026-12-02.md).
91
+ Termigan models every component boundary as a state chart and verifies it in TLA+ with `everystate` before implementation crosses the boundary. All six formal models, their `.cfg` configurations, and their state charts live in [models/](../models/state-charts.md) and [PtySocketBridge.md](../models/PtySocketBridge.md). The verification summaries from `everystate 0.4.6` live in [models-2026-12-02.md](verification/models-2026-12-02.md) and [pty-socket-bridge-2026-12-02.md](verification/pty-socket-bridge-2026-12-02.md).
92
92
 
93
93
  | Gateway | TLA+ model | Generated states | Distinct states | Max depth | Checked invariants |
94
94
  |---|---|---:|---:|---:|---|
95
- | Gateway 1, VT parser | [.agents/brain/models/VtParser.tla](../.agents/brain/models/VtParser.tla) | 701 | 160 | 12 | `TypeOK`, `Utf8Consistency`, `GroundClearsBuffers`, `NoUnboundedAccumulation` |
96
- | Gateway 2, Terminal screen | [.agents/brain/models/TerminalScreen.tla](../.agents/brain/models/TerminalScreen.tla) | 469,281 | 30,240 | 19 | `TypeOK`, `DimensionsPositive`, `CursorInBounds`, `ScrollRegionValid`, `ScrollbackBounded`, `AltPreservesNormal` |
97
- | Gateway 3, WASM memory bridge | [.agents/brain/models/WasmMemoryBridge.tla](../.agents/brain/models/WasmMemoryBridge.tla) | 577 | 144 | 9 | `TypeOK`, `LiveBoxCountMatchesLifecycle`, `NoLeakedOutputAfterDispose` |
98
- | Gateway 4, Viewport display | [.agents/brain/models/ViewportDisplay.tla](../.agents/brain/models/ViewportDisplay.tla) | 13,159 | 1,548 | 14 | `TypeOK`, `ScrollOffsetInRange`, `ExpandedNeverReconnects`, `MirrorNeverEmitsResize`, `AltScreenBlocksNormalScroll` |
99
- | Gateway 5, Input routing | [.agents/brain/models/InputRouting.tla](../.agents/brain/models/InputRouting.tla) | 5,052 | 401 | 8 | `TypeOK`, `UnfocusedNeverCaptures`, `HostInterceptorWins`, `ComposingBlocksKeydown`, `SendKeyMatchesMode`, `PasteMatchesBracketedMode` |
100
- | Gateway 6, PTY socket bridge | [.agents/brain/models/PtySocketBridge.tla](../.agents/brain/models/PtySocketBridge.tla) | 500 | 99 | 5 | `TypeOK`, `BridgeNeverClosesSocket`, `ListenersMatchState`, `NoEffectWhenDetached`, `SendRequiresOpenAndAttached`, `ReadOnlyNeverSends`, `ResizeDisabledNeverSendsResize` |
95
+ | Gateway 1, VT parser | [models/VtParser.tla](../models/VtParser.tla) | 701 | 160 | 12 | `TypeOK`, `Utf8Consistency`, `GroundClearsBuffers`, `NoUnboundedAccumulation` |
96
+ | Gateway 2, Terminal screen | [models/TerminalScreen.tla](../models/TerminalScreen.tla) | 469,281 | 30,240 | 19 | `TypeOK`, `DimensionsPositive`, `CursorInBounds`, `ScrollRegionValid`, `ScrollbackBounded`, `AltPreservesNormal` |
97
+ | Gateway 3, WASM memory bridge | [models/WasmMemoryBridge.tla](../models/WasmMemoryBridge.tla) | 577 | 144 | 9 | `TypeOK`, `LiveBoxCountMatchesLifecycle`, `NoLeakedOutputAfterDispose` |
98
+ | Gateway 4, Viewport display | [models/ViewportDisplay.tla](../models/ViewportDisplay.tla) | 13,159 | 1,548 | 14 | `TypeOK`, `ScrollOffsetInRange`, `ExpandedNeverReconnects`, `MirrorNeverEmitsResize`, `AltScreenBlocksNormalScroll` |
99
+ | Gateway 5, Input routing | [models/InputRouting.tla](../models/InputRouting.tla) | 5,052 | 401 | 8 | `TypeOK`, `UnfocusedNeverCaptures`, `HostInterceptorWins`, `ComposingBlocksKeydown`, `SendKeyMatchesMode`, `PasteMatchesBracketedMode` |
100
+ | Gateway 6, PTY socket bridge | [models/PtySocketBridge.tla](../models/PtySocketBridge.tla) | 500 | 99 | 5 | `TypeOK`, `BridgeNeverClosesSocket`, `ListenersMatchState`, `NoEffectWhenDetached`, `SendRequiresOpenAndAttached`, `ReadOnlyNeverSends`, `ResizeDisabledNeverSendsResize` |
101
101
 
102
102
  Run all six model checks locally with `make models`, which executes [scripts/verify-models.sh](../scripts/verify-models.sh).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termigan",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Standalone browser terminal viewer with a pure Roc WebAssembly VT core",
5
5
  "license": "MIT",
6
6
  "author": "Daniel Neighman",