дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
A plugin web view can open interactive PTY sessions (spawn, input, resize, kill, streamed output and exit). Spawning requires the exact granted `process:<program>` and its pinned executable, with no PATH re-resolution or fallback shell; the cwd is the trusted project, arguments, environment (append-only) and sizes are validated, and at most eight sessions run per plugin. A frame can only drive the sessions it opened; output is acknowledged chunk by chunk and input/output are bounded. Sessions end on permission change, reload, disable, uninstall, frame teardown or window close. Requires API ^1.3; adds a web-pty test fixture. Verified on macOS; Windows/Linux not run. Co-authored-by: dengliu <[email protected]>
Rust plugin SDK
The Rust API is documented by cargo doc. Web pages shipped alongside a Rust
component use window.openidea rather than Rust imports.
API 1.3 adds capability-gated interactive PTYs to that web bridge. Declare
engines.openidea = "^1.3" and process:<program> in plugin.toml, then send
pty-spawn, pty-input, pty-resize and pty-kill JSON strings using
openidea.postMessage. Consume pty-data and acknowledge its sequence using
pty-ack; handle pty-exit and pty-error through openidea.onMessage.
See the protocol, permission and resource limits and the minimal fixture. The frame cannot access IPC directly. Its sessions belong to that frame and end with its view or plugin. There is no new WIT import for this API.