{"_id":"@buckeyestudio/toh-native-command","name":"@buckeyestudio/toh-native-command","dist-tags":{"next":"0.1.1-rc.2","latest":"0.1.1-rc.2"},"versions":{"0.1.1-rc.2":{"name":"@buckeyestudio/toh-native-command","description":"Zero-dependency no-shell execFile runner for host-native OS integrations: utf8 stdio capture, abort propagation, Windows hide","version":"0.1.1-rc.2","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/dustinwloring1988/theopen-harness.git","directory":"packages/util/native-command"},"type":"module","main":"lib/index.js","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","author":{"name":"buckeyestudio"},"peerDependencies":{"@buckeyestudio/cordis":"^4.0.1","@buckeyestudio/toh-invariants":"^0.1.1-rc.2"},"devDependencies":{"@buckeyestudio/toh-invariants":"^0.1.1-rc.2","@buckeyestudio/cordis":"^4.0.1"},"_id":"@buckeyestudio/toh-native-command@0.1.1-rc.2","bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"homepage":"https://github.com/dustinwloring1988/theopen-harness#readme","_integrity":"sha512-0SEeGuOslYy8IjMxLkI8ifHRMXTs5q+Or2tmNJ7JY2GNcfsIWxXTHAhAv81+fOClOGH1Cb72gXppN1iEFQBcDg==","_resolved":"/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-native-command-0.1.1-rc.2.tgz","_from":"file:/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-native-command-0.1.1-rc.2.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-0SEeGuOslYy8IjMxLkI8ifHRMXTs5q+Or2tmNJ7JY2GNcfsIWxXTHAhAv81+fOClOGH1Cb72gXppN1iEFQBcDg==","shasum":"b31251f1adc052c6f10f36b6757abdccdf1a4359","tarball":"https://registry.npmjs.org/@buckeyestudio/toh-native-command/-/toh-native-command-0.1.1-rc.2.tgz","fileCount":9,"unpackedSize":9670,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCmQ2yODvNE7glgrY/wf5FjNQQcfe/zX9Cex43L//zL4wIgJd/EAp1AlIz9gphwpEGd7jqgWxmz3yJ488wW08hYPGw="}]},"_npmUser":{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"},"directories":{},"maintainers":[{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/toh-native-command_0.1.1-rc.2_1787489106855_0.7112251465833506"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-23T12:45:06.746Z","0.1.1-rc.2":"2026-08-23T12:45:07.048Z","modified":"2026-08-23T12:45:07.194Z"},"maintainers":[{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"}],"description":"Zero-dependency no-shell execFile runner for host-native OS integrations: utf8 stdio capture, abort propagation, Windows hide","homepage":"https://github.com/dustinwloring1988/theopen-harness#readme","repository":{"type":"git","url":"git+https://github.com/dustinwloring1988/theopen-harness.git","directory":"packages/util/native-command"},"author":{"name":"buckeyestudio"},"bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"license":"MIT","readme":"# toh-native-command\n\n[English](README.md) | 中文\n\n宿主原生 OS 集成共享的**零依赖免 shell `execFile` 运行器**：一次 `runNativeCommand(command, args, signal)` 调用直接 spawn 可执行文件（绝不拼 shell 字符串），以 utf8 捕获 stdout/stderr，把调用方的 abort 传播为子进程终止，并在 Windows 上隐藏瞬时控制台窗口。失败时，调用会以错误拒绝；该错误附带退出 `code` 与两路已捕获输出，调用方无需重跑即可分类（工具缺失、已取消、真实失败）。\n\n它的两个消费方都是宿主侧原生集成：[`directory-picker-native`](../../host/directory-picker-native/README.zh.md) 后端的 OS 选择器命令，以及网关将路径交由默认应用打开的操作（[`toh-host-apiproxy`](../../host/apiproxy/README.zh.md) 的 `host.openPath`）。`NativeCommandRunner` 类型是这些调用方的可注入命令边界。\n\n它是**库，不是服务或插件**：没有 `ctx`、不注册任何东西、不持有状态、不发事件。\n\n## 接口面\n\n```ts\nimport { runNativeCommand, type NativeCommandRunner } from '@buckeyestudio/toh-native-command'\n```\n\n## 模型体验\n\n无；这是宿主侧子进程管道，这里没有任何东西进入模型请求。\n\n#### KV Cache 影响\n\n无；该包既不组装也不发送提供方请求。\n\n## 已知限制与暂缓事项\n\n- **不做输出限量**——两路流在内存中无界缓冲；当前每个调用方只运行输出为一个路径或一行错误的小型原生工具。把它指向输出量可观的命令之前，先接入 `toh-output-retention` 限量。\n","readmeFilename":"README.zh.md","_rev":"1-7b07b684d194b9419f9099a64429baae"}