StateScopeRead and audit finite state machines without leaving VS Code. StateScope renders IBM FTM / Eclipse UML2
FeaturesFSM Viewer (
|
| Tab | Use |
|---|---|
| Diagram | UML state diagram with UML-style initial dot + final double-circle |
| Sequence | Lifeline / message view for a chosen execution path |
| Table | Flat transition table with guards, actions, and outgoing edges |
Stereotype palette
| Token | Stereotype | Use |
|---|---|---|
--sc-accent (blue #4F7DF5) |
Normal / Initial | Standard processing states |
--alert (#E5484D) |
PMP_Alert | Operator alert — requires intervention |
--ops (#E0A83A) |
PMP_OpsControl | Operator-controlled state |
--terminal (#8A93A6) |
PMP_Terminal | Final state, lifecycle ends |
Supported files
| Extension | Format | Description |
|---|---|---|
.emx |
Eclipse UML2 / XMI | RSAD state machine models (IBM FTM and related) |
Installation
From VSIX
code --install-extension statescope-*.vsix
From source
git clone https://github.com/ShoaibKhan/StateScope.git
cd StateScope
npm install
npm run compile
npm run package
code --install-extension statescope-*.vsix
Usage
- Automatic: open any
.emxfile — StateScope is the default editor. - Command Palette:
Cmd/Ctrl+Shift+P→StateScope: Open in StateScope - Context menu: right-click an
.emxfile in the Explorer.
Sample files
See samples/ for TxnFSM_SWIFT_OUT.emx — two FSMs including alerts, operator resolution, and terminal states.
Tech
- TypeScript extension host, no runtime dependencies.
- SVG rendered in a CSP-locked webview (nonce-gated scripts,
localResourceRootsscoped tomedia/). - Sugiyama-style layered layout in pure TS.
Security posture
- Webview scripts run under a strict
Content-Security-Policywith a per-load nonce; no remote resources loaded. - No runtime npm dependencies; no
eval, nonew Function, noinnerHTMLsinks for untrusted content. - Read-only editor: file contents are parsed locally and never transmitted.
- Suitable for deployment inside regulated environments (financial institutions, air-gapped networks).
License
Part of the Scope Suite (StateScope + FlowScope). Built for enterprise devs who need IBM ACE / RSAD visibility without the Eclipse tax.