{"_id":"@buckeyestudio/toh-host-directory-picker-auto","name":"@buckeyestudio/toh-host-directory-picker-auto","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-auto","description":"Adaptive chooser of the directory-picker seam: resolves the host situation at boot and mounts the native or browse backend 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-auto"},"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/cordis-plugin-loader":"^1.0.2","@buckeyestudio/toh-client-ui-directory-picker-browse":"^0.1.1-rc.2","@buckeyestudio/toh-client-ui-directory-picker-native":"^0.1.1-rc.2","@buckeyestudio/toh-host-directory-picker-browse":"^0.1.1-rc.2","@buckeyestudio/toh-host-directory-picker-native":"^0.1.1-rc.2","@buckeyestudio/toh-host-webserver":"^0.1.1-rc.2","@buckeyestudio/toh-invariants":"^0.1.1-rc.2"},"devDependencies":{"@buckeyestudio/cordis":"^4.0.1","@buckeyestudio/cordis-plugin-include":"^1.0.6","@buckeyestudio/toh-client-ui-directory-picker-browse":"^0.1.1-rc.2","@buckeyestudio/cordis-plugin-loader":"^1.0.2","@buckeyestudio/toh-client-ui-directory-picker-native":"^0.1.1-rc.2","@buckeyestudio/toh-host-directory-picker":"^0.1.1-rc.2","@buckeyestudio/toh-host-directory-picker-native":"^0.1.1-rc.2","@buckeyestudio/toh-host-webserver":"^0.1.1-rc.2","@buckeyestudio/toh-host-directory-picker-browse":"^0.1.1-rc.2","@buckeyestudio/toh-invariants":"^0.1.1-rc.2"},"_id":"@buckeyestudio/toh-host-directory-picker-auto@0.1.1-rc.2","bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"homepage":"https://github.com/dustinwloring1988/theopen-harness#readme","_integrity":"sha512-c6IMcFZlmiNEciggQbaqIvvH5hiUaY6EnP3B03Z1RKDPNLJCd4dnq6f/jwGotSQUC3IX3IUUN5FHrf5kUL3aSA==","_resolved":"/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-host-directory-picker-auto-0.1.1-rc.2.tgz","_from":"file:/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-host-directory-picker-auto-0.1.1-rc.2.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-c6IMcFZlmiNEciggQbaqIvvH5hiUaY6EnP3B03Z1RKDPNLJCd4dnq6f/jwGotSQUC3IX3IUUN5FHrf5kUL3aSA==","shasum":"d3e98afba3acd860e0ba6d7a456fd3b07ce714ac","tarball":"https://registry.npmjs.org/@buckeyestudio/toh-host-directory-picker-auto/-/toh-host-directory-picker-auto-0.1.1-rc.2.tgz","fileCount":11,"unpackedSize":24751,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG3uLBGc6v5X2/VcdRKlo/wi1EarS410u2zCiKKXAPkKAiEAgj2fQ6lv7fo6auJZiuIKQNXe8Zldmmnao8lsqnLd+jE="}]},"_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-auto_0.1.1-rc.2_1787489697788_0.419565089828136"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-23T12:54:57.602Z","0.1.1-rc.2":"2026-08-23T12:54:57.972Z","modified":"2026-08-23T12:54:58.365Z"},"maintainers":[{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"}],"description":"Adaptive chooser of the directory-picker seam: resolves the host situation at boot and mounts the native or browse backend 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-auto"},"author":{"name":"buckeyestudio"},"bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"license":"MIT","readme":"# @buckeyestudio/toh-host-directory-picker-auto\n\n[English](README.md) | 中文\n\n[目录选择 seam](../directory-picker/README.zh.md) 的**自适应选择器**：一个只有 node 半侧的插件，在启动时一次性判定宿主处境，并把匹配的双面后端——[`-native`](../directory-picker-native/README.zh.md) 或 [`-browse`](../directory-picker-browse/README.zh.md)——作为真实的 Loader 条目挂进内存根树（绝不持久化到配置文件；根树的 `write()` 是 no-op）。由于后端以普通条目的形式到达，其 browser half 被 client 模块表发现的方式与配置行完全相同，因此对判定出的选择，seam 的“一行同时换两面”不变式依然成立。卸载该选择器会再次移除该条目，连同两面一起卸载。\n\n判定是一次纯函数的启动时采样（`resolveDirectoryPickerBackend`），已导出供复用。`native` 要求“操作者看得到宿主屏幕、且 native 后端能服务它”的全部信号：仅回环的绑定（从注入的 `webServer` 读取；全网卡绑定会接入任何 OS 选择器都触及不到的远程浏览器）；非 SSH 启动（`SSH_CONNECTION`／`SSH_TTY` 未设置或为空——SSH 端口转发下选择器会弹在无人值守的服务器上）；以及可服务的显示会话——darwin／win32 上视为存在；linux 上要求 `DISPLAY`／`WAYLAND_DISPLAY`，外加 `PATH` 上有 zenity 或 kdialog 二进制（该探查是又一项启动时事实）；其余任何平台上都不成立，因为 native 后端驱动的平台恰为 darwin／win32／linux。任何含糊情形都判定为处处可用的 `browse`。采样每次启动恰好发生一次，因此挂载的能力在服务生命周期内保持稳定，符合 seam 的要求。固定某种交互在这里不是配置字段——直接组合 `-native` 或 `-browse` 行来替代本行，那才是 seam 文档化的切换点；同时挂载选择器**和**某个后端行会明确报错（重复的 `directoryPicker` 服务、`single` 类 slot 中的重复 client 流程）。\n\n## 模型体验\n\n无。该选择器仅组合 GUI 宿主的目录选择；这里没有任何内容进入模型请求。\n\n#### KV Cache 影响\n\n无；该包既不组装也不发送提供方请求。\n\n## 已知限制与暂缓事项\n\n- **探测是从启动上下文推断操作者位置，而任何启动侧信号都无法证明这一点**——从 SSH 启动中脱离的 tmux 会话会丢失 `SSH_*` 标记；Aqua 会话之外的 Darwin 进程仍被算作有显示；在工作站本地启动、之后经 `ssh -L` 访问时，请求会从 `127.0.0.1` 到达，系统会判定 `native`，并把选择器弹在无人值守的工作站上。错误的 `native` 选择会退化为后端既有的可重试失败对话框，而对这类部署，直接组合 `-browse` 即选择安全的交互。\n- **Linux 选择器探查只读 `PATH`**——以其他途径可用的 zenity／kdialog（shell 别名、未装在 PATH 上）仍判定为 `browse`；把任一二进制装到 `PATH` 上，下次启动即恢复 `native` 资格。\n- **仅在启动时判定**——一次判定服务本次启动的所有客户端；按连接自适应（同一台服务器，本地浏览器用 native、远程浏览器用 browse）需要按客户端的能力对象以及 seam 有意删除的协议通告，等到出现同时服务两种形态的部署再做。\n","readmeFilename":"README.zh.md","_rev":"1-bb2557844c93cc5c117f1a7f387565a6"}