Commit Graph
8 Commits
Author SHA1 Message Date
_Kerman 2b7b2a0ee6 refactor(ptc): share the program format type 2026-10-21 15:59:56 +08:00
_Kerman 6085b6fb62 Merge latest master into xtr/ptc-vm-script 2026-10-21 15:12:47 +08:00
_Kerman c3473d1ea6 refactor(ptc-runtime-node): unify temporary and retained processes 2026-10-21 00:03:21 +08:00
_Kerman 36820a5462 refactor(ptc-runtime-node): share the fake child and fold result validation into the protocol
Move the identical in-memory child used by the per-call and persistent
host specs into tests/fake-child.ts, and move readProgramResult next to
the ProgramResult type it validates in protocol.ts.
2026-10-20 23:55:36 +08:00
_Kerman 7745b3b9da feat(ptc-runtime-node): add VM Script execution with optional retained state 2026-10-20 23:16:30 +08:00
_Kerman 82b23cf4d2 refactor(ptc-runtime-node): drop evaluation ids from the control protocol
One pipe delivers each evaluation's messages before its result, and the
child refuses calls from finished evaluations, so the per-message
evaluation id protected nothing. Remove it with the checks, counters and
helpers it required, measure outgoing messages only when posting, and
replace rethrowing validation blocks with early refusals.
2026-10-20 15:15:04 +08:00
_Kerman 534aafce7a refactor(ptc-runtime-node): carry the process control channel over birpc
Replace the length-prefixed JsonChannel and hand-written request/reply
correlation with typed birpc methods over newline-delimited JSON. The
host calls the child's run(); bindings call the host's invoke(); logs
and output-limit reports are notifications. The transport bounds
incoming lines and queued writes, validates UTF-8 and exposed methods,
and rejects outstanding calls when the pipe closes.

Drop logic made obsolete by the new transport, including the 32-bit
frame-length bound on maxMessageBytes.
2026-10-20 14:50:05 +08:00
Tianyi Cui 7c9bb5914c refactor(ptc): align runtime packages and services with PTC naming 2026-09-12 15:03:04 +08:00