Skip to content

v1.2.0

Choose a tag to compare

@tarasovd tarasovd released this 05 Apr 15:37
· 115 commits to main since this release
ea6544c

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=1 to get all input fields)
  • WS command: readMdt → WS event: {type: 'mdt', data: {fields, modifiedOnly}}
  • Adapters: RestAdapter.readMdt(modifiedOnly?) and WebSocketAdapter.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.resumed forwarded 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 + WS markAuthenticated — flip session status to authenticated after your own cascade completes
  • POST /wait-for-fields + WS waitForFields — 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 \s which 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 F character 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; typing F fell 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:

  1. RestClient — low-level async REST (httpx). One method per proxy endpoint, typed dataclasses in/out.
  2. WsClient — low-level async WebSocket (websockets). Single WS, real-time onScreen/onStatus/onSessionLost callbacks, reattach for process restarts.
  3. 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 production to main.
  • GitHub Actions workflows (ci.yml, deploy-demo.yml) repointed to main.
  • main and v1.2.0 pushed; stale production deleted.

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