@ aphrody/ runtime- sdk
YOLO 本地运行时间的 Light TypeScript SDK : 加载已预编的 yolo_runtime 库通过
其版本为 C ABI 的 bun:ffi核心模块 runtime:system 财务报告和审定财务报表 runtime:process· ;
可选客户端是 runtime:desktop 财务报告和审定财务报表 runtime:browser。 。 。 .
这里没有编译一个引擎 。 见仓库的 运行时间 ABI 财务报告和审定财务报表 运行时间决定。 。 。 .
import { Runtime } from "@aphrody/runtime-sdk";
using runtime = Runtime.load(); // verified artifact, ABI negotiated first
using child = runtime.spawn({
program: "server",
args: ["--port", "8080"],
stdio: "capture",
});
await child.waitForHttp({ port: 8080, path: "/health" });
await child.stopAsync(2000);
图书馆分辨率 : $YOLO_RUNTIME_LIB,然后安装的文物
(单位:千美元)$YOLO_RUNTIME_HOME/<target>/current默认值 ~/.yolo/runtime,则 target/runtime/ 会 议 日 程 和 议 程
这个Bun OS的检查。 安装方式 just yolo::runtime-install后滚 just yolo::runtime-rollback。 。 。 .
对于一发二进制输出,ABI 1.4 提供有明确表示的无损失捕获
预算。 过量流拒绝 RuntimeError 编号 : Status.OutputLimit; 无成功
反应被截断。 现有 capture 模式仍然是64 KiB诊断尾.
using runtime = Runtime.load();
using child = runtime.spawn({
program: "converter",
args: ["input"],
stdio: "capture-lossless",
maxOutputBytes: 8 * 1024 * 1024, // per stream, total across all drains
});
const { stdout, stderr, status } = await child.collectOutput({
timeoutMs: 30_000,
});
// stdout/stderr are owned Uint8Arrays; arbitrary bytes survive without UTF-8 decoding.
collectOutput 在超时时阻止孩子,中止或捕捉出错和排水
合并阅读器关闭后终端输出 。 召师放出手柄.
土著捕捉工人在进程释放/运行时间破坏返回之前加入.
运行时间关闭后, SDK 手柄会拒绝更多本地呼叫, 可以处理
没有输入已卸下代码。 Unix 关闭覆盖自有进程组;
Windows 进程- 树上关闭和运行时对其他目标的行为仍然需要
执行资格.
可选客户端不激活任一引擎就加载. 桌面单独打开一个
已安装 yolo-desktop CEF主机通过共享进程主管.
导入 @aphrody/runtime-sdk/desktop 打电话 desktop.open 明确
grants 准确 allowedOrigins; 处理会话以关闭窗口和
加入它的东道主。 已验证的桌面安装帮助从导出
@aphrody/runtime-sdk/desktop-artifact。 。 。 .
导入 @aphrody/runtime-sdk/browser 打电话 BrowserRuntime.load 用于使用
可选本地浏览器提供者。 核心ABI和 browser.* 能力是:
在任何扩展符号被绑定之前谈判。 每个上下文都需要精确
HTTP( S) 函数 allowedOrigins; 私人网络访问需要一个明确的上下文选择.
上下文拥有与世隔绝的入室饼干和JavaScript域. 导航,
提取、评价和PNG 捕获接受取消;处置其所有者
在图书馆卸货前加入本地工人.
这些SDK API没有建立本地渲染或分销资格. ABI 1.4 核心文物缺乏浏览器能力,桌面需要自己的 经核实的本地可执行性(其载荷为CEF)加上Linux上的GTK 4平台的先决条件。 本地提供者 并且目标支持仍然受制于其实际建造和执行大门.