Recover ## bodies after bad *…* terminators; bracket-aware call args;
invoke Null is 500 not fake ok; sys.exec capture={code,stdout,stderr};
proxy stream sets anti-buffer headers.
Co-authored-by: Cursor <cursoragent@cursor.com>
1.0 KiB
1.0 KiB
title, description
| title | description |
|---|---|
| lib/系统 | 中文系统包装(加载环境 可选 路径=) |
取环境
+ `名`
> host_env_get name=名
设环境
+ `名`
+ `值`
> host_env_set name=名 value=值
加载环境
+ `路径`=None
加载 .env(可选具名实参 路径=)。不覆盖已有进程环境变量。
> host_dotenv_load path=路径
参数表
> host_args
工作目录
> host_cwd
退出
+ `码`
> host_exit code=码
执行
+ `命令`
+ `参数`=None
+ `捕获`=False
运行子进程。默认返回退出码(整数)。
捕获=True 时返回映射 {code, stdout, stderr}(过大输出可能截断)。
在 *…* 内优先写裸变量 参数=参数;参数=`参数` 亦可。
> host_exec cmd=命令 args=参数 capture=捕获
发布流事件
+ `事件`
向进程内 EventBus 发布流事件(供 marqdo view SSE)。无订阅者时为空操作。
> host_stream_publish event=事件