This folder contains the Java TPS runtime.
Package namespace: com.managedcode.tps
SDK/java is the standalone Java implementation of the TPS runtime. It provides the same compile, validation, transport, and playback behavior as the other SDKs while staying dependency-light.
The Java runtime is exposed through ManagedCodeTps and nested types:
ManagedCodeTps.TpsSpecManagedCodeTps.TpsKeywordsManagedCodeTps.TpsRuntime.validateTps(source)ManagedCodeTps.TpsRuntime.parseTps(source)ManagedCodeTps.TpsRuntime.compileTps(source)ManagedCodeTps.TpsRuntime.toCompiledJson(script)ManagedCodeTps.TpsRuntime.fromCompiledJson(json)ManagedCodeTps.TpsPlayer: deterministic state resolverManagedCodeTps.TpsPlaybackSession: timed playback controller with transport, navigation, speed correction, and eventsManagedCodeTps.TpsStandalonePlayer: compile-and-play wrapper with restore-from-JSON support
src/main/java/com/managedcode/tps/ManagedCodeTps.java: runtime implementationsrc/test/java/com/managedcode/tps/ManagedCodeTpsTests.java: integration-style parity testsbuild.sh: compile main runtime classestest.sh: compile tests and run the Java test harness
The Java runtime is renderer-neutral. Host UIs should compile or restore TPS, bind buttons to the playback commands, and render from snapshots instead of recomputing active-word state themselves.
Use:
TpsPlayerfor host-owned clocksTpsPlaybackSessionfor SDK-owned timer playbackTpsStandalonePlayerfor compile-and-play or restore-and-play entry points
cd SDK/java && ./build.shcd SDK/java && ./test.shcd SDK/java && ./coverage.sh
The Java suite covers:
- constants and keyword parity
- canonical transport JSON parity
- shared example snapshots
- invalid TPS diagnostics
- public parse/validate API behavior for title headers, front matter, punctuation, and malformed authoring
- compiled JSON restore guards and playback session lifecycle
- timed playback completion
- large generated-script compile/player smoke
- line coverage gate at 90% or higher for SDK source
Keep this package aligned with the root README.md specification and the shared fixtures under SDK/fixtures/.