Repository navigation
v1.2.0
Major release. Per-field MDT state on the wire, pluggable session store + lifecycle events, lower-level sign-on primitives, and a new standalone Python client package.
Highlights
Per-field MDT state + /read-mdt primitive
Field.modified is now serialized on every screen push, and a new FieldValue type carries {row, col, length, value, modified} for the cheap post-write verification path. Cheaper than diffing the whole screen when you only want to know what a batch of writes actually landed.
- REST:
GET /read-mdt(use?includeUnmodified=1to get all input fields) - WS command:
readMdt→ WS event:{type: 'mdt', data: {fields, modifiedOnly}} - Adapters:
RestAdapter.readMdt(modifiedOnly?)andWebSocketAdapter.readMdt(modifiedOnly?)
Pluggable session store + lifecycle events
Sessions default to in-memory. Implement SessionStore and call setSessionStore() before the proxy starts accepting traffic for multi-process / Redis-routing deployments.
- REST:
POST /session/resume— idempotent alive probe for REST-only reattach - Lifecycle bus:
sessionLifecycle.on('session.lost' | 'session.resumed', ...) - WS events:
session.lost,session.resumedforwarded to all clients watching the affected session - Client hooks:
WebSocketAdapter.onSessionLost()/onSessionResumed()
Lower-level sign-on primitives (protocol-generic)
Instead of baking host-specific sign-on cascades into the proxy, v1.2.0 exposes the primitives integrators need to compose their own:
POST /session/authenticated+ WSmarkAuthenticated— flip session status toauthenticatedafter your own cascade completesPOST /wait-for-fields+ WSwaitForFields— wait until the current screen has at least N input fields (with timeout)
Bug fixes
- Tab no longer skips password fields on IBM i sign-on screens — the filter was excluding every non-display input; the fix matches against native underscore OR non-display so password fields remain reachable
- Row 24 content no longer shifts right — the artifact-cleanup regexes were operating on the row-joined string with
\swhich matches newlines, so matches could straddle row boundaries and the replacement would eat the newline and merge rows - Non-display (password) fields render as blank, not asterisks — real 5250 emulators (ACS, Mocha, native) never echo password characters; the yellow underline and cursor already convey field position
- Bare
Fcharacter no longer gets swallowed — the F-key guard matched `e.key.startsWith('F') && length ≤ 3`, called `preventDefault()` unconditionally, and only dispatched when the inner F1..F24 regex matched; typingFfell through with nothing dispatched. Outer guard is now the full F1..F24 regex.
New package: green-screen-client (PyPI)
Standalone Python async client for green-screen-proxy, published independently on PyPI. Not bundled with or required by the npm packages.
Three layers — pick what fits your integration style:
RestClient— low-level async REST (httpx). One method per proxy endpoint, typed dataclasses in/out.WsClient— low-level async WebSocket (websockets). Single WS, real-time onScreen/onStatus/onSessionLost callbacks, reattach for process restarts.ProxyTerminalClient+ScreenBuffer— high-level drop-in for Python integrations that already read `client.screen.fields`, `client.screen.cursor_row`, etc.
Full dataclass parity with green-screen-types. Install:
```bash
pip install green-screen-client
```
See packages/client-py/README.md.
Repo changes
- Default branch migrated from
productiontomain. - GitHub Actions workflows (
ci.yml,deploy-demo.yml) repointed tomain. mainandv1.2.0pushed; staleproductiondeleted.
Published versions
| Package | Registry | Version |
|---|---|---|
green-screen-react |
npm | 1.2.0 |
green-screen-proxy |
npm | 1.2.0 |
green-screen-terminal |
npm | 1.2.0 |
green-screen-client |
PyPI | 1.2.0 |
green-screen-types |
— | workspace-internal, not published |