{"_id":"@buckeyestudio/toh-host-directory-picker-native","name":"@buckeyestudio/toh-host-directory-picker-native","dist-tags":{"next":"0.1.1-rc.2","latest":"0.1.1-rc.2"},"versions":{"0.1.1-rc.2":{"name":"@buckeyestudio/toh-host-directory-picker-native","description":"Native-OS-chooser backend of the directory-picker seam for the TheOpen Harness web GUI host","version":"0.1.1-rc.2","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/dustinwloring1988/theopen-harness.git","directory":"packages/host/directory-picker-native"},"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"},"./worker":{"types":"./lib/types/win32-dialog-worker.d.ts","default":"./lib/worker.cjs"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","author":{"name":"buckeyestudio"},"dependencies":{"koffi":"^3.1.2","@buckeyestudio/toh-host-directory-picker":"^0.1.1-rc.2","@buckeyestudio/toh-native-command":"^0.1.1-rc.2"},"peerDependencies":{"@buckeyestudio/toh-invariants":"^0.1.1-rc.2","@buckeyestudio/cordis":"^4.0.1"},"devDependencies":{"tsx":"^4.23.1","@buckeyestudio/cordis":"^4.0.1","@buckeyestudio/toh-invariants":"^0.1.1-rc.2"},"_id":"@buckeyestudio/toh-host-directory-picker-native@0.1.1-rc.2","bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"homepage":"https://github.com/dustinwloring1988/theopen-harness#readme","_integrity":"sha512-MFBpDTknOKk7HQ5PL6P3TqVvY3MXaQz+HgiuJiMUV+9z4V//TA/AF2VenNEraBNFdthgDh6esUSu9rnUCtdi8g==","_resolved":"/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-host-directory-picker-native-0.1.1-rc.2.tgz","_from":"file:/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-host-directory-picker-native-0.1.1-rc.2.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-MFBpDTknOKk7HQ5PL6P3TqVvY3MXaQz+HgiuJiMUV+9z4V//TA/AF2VenNEraBNFdthgDh6esUSu9rnUCtdi8g==","shasum":"a28beadd8ba1056c5957292768ea3df6f10b1357","tarball":"https://registry.npmjs.org/@buckeyestudio/toh-host-directory-picker-native/-/toh-host-directory-picker-native-0.1.1-rc.2.tgz","fileCount":16,"unpackedSize":42061,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAippg+q3UiicDbNlaieK2jNiny796m5kF6FoUyA29BPAiBM9+c5fBDfh+lhalCkD0qa+btzMLmcBvGxnRux/+23ew=="}]},"_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-host-directory-picker-native_0.1.1-rc.2_1787489693479_0.030456874312833726"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-23T12:54:53.366Z","0.1.1-rc.2":"2026-08-23T12:54:53.610Z","modified":"2026-08-23T12:54:53.778Z"},"maintainers":[{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"}],"description":"Native-OS-chooser backend of the directory-picker seam for the TheOpen Harness web GUI host","homepage":"https://github.com/dustinwloring1988/theopen-harness#readme","repository":{"type":"git","url":"git+https://github.com/dustinwloring1988/theopen-harness.git","directory":"packages/host/directory-picker-native"},"author":{"name":"buckeyestudio"},"bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"license":"MIT","readme":"# @buckeyestudio/toh-host-directory-picker-native\n\n[English](README.md) | 中文\n\n[目录选择 seam](../directory-picker/README.zh.md) 的**原生 OS 选择器后端**：`NativeDirectoryPicker` 以 `native` 能力注册 `ctx.directoryPicker`，其 `pick(signal)` 每次调用打开一个原生选择器并解析出所选绝对路径（取消时为 `null`）。平台工具不经 shell 调用：macOS 使用 `osascript`，Linux 使用 Zenity 并以 KDialog 回退；调用方的中止信号会终止原生进程。Windows 在 spawn 的子进程中打开现代 `IFileOpenDialog`——由 koffi 在子进程主线程上驱动的 COM 会话，采用宿主接受的最佳线程 DPI 感知（优先 per-monitor-v2），中止时向对话框线程投递 `WM_CLOSE`。只有操作者坐在宿主屏幕前时才可用——远程部署应组合 [`-browse`](../directory-picker-browse/README.zh.md)。命令边界（`DirectoryPickerRunner`）与平台事实可注入。共享的免 shell 子进程运行器位于 [`toh-native-command`](../../util/native-command/README.zh.md)。\n\n**双面包**：浏览器端（`./client`）向 [ui-workspace](../../client/ui-workspace/README.zh.md) 的两个目录流 slot 注册一个无渲染的流程占用者——每次 `open` 请求驱动 `host.pickDirectory`，并通过 slot 的属主交互约定上报唯一结果（所选路径／取消／失败）。两个目录流程声明必须同时处于有效状态，任一贡献才会安装。因此一行 cordis.yml 同时组合原生交互的两侧；客户端不包含任何按能力类型进行的分支，挂载第二个流程包会在加载期失败（slot 的 kind 为 `single`）。\n\n## 模型体验\n\n无。该后端服务于 GUI 宿主的目录选择；这里没有任何内容进入模型请求。\n\n#### KV Cache 影响\n\n无；该包既不组装也不发送提供方请求。\n\n## 已知限制与延期工作\n\n- **Linux 依赖桌面工具**——Zenity 与 KDialog 均未安装时，`pick` 以包含解决建议的错误拒绝；它不会回退为手输路径提示（组合层面的回退是 browse 后端）。\n- **Windows 没有机制级回退**——通过打包依赖 koffi 运行的子进程选择器是唯一原生层级，因此 COM 拒绝或对话框崩溃会直接上报失败。组合层面的回退仍是 browse 后端。\n","readmeFilename":"README.zh.md","_rev":"1-a8ec00764ba89d7c8f581c9fcf6bf7fc"}