Local shell 與應用程式 actions
shell.run 是 argv model,不是 shell string。command 只能是純 executable name,不能含路徑或 shell syntax;每個 args item 都是獨立 argv value,不做 interpolation。Pipe、redirect、&&、variable、glob 都不可用,應拆成多次安全呼叫或改用 filesystem actions。執行前可先用不會啟動程式的 shell.which 確認 executable 是否存在。
shell.run 不是 filesystem 或 network sandbox:child process 具有桌面使用者的機器與網路權限。核准的 cwd 只控制 process 起始位置,不能限制它可存取的 path 或 host。它通過一般 capability 檢查後即可執行,不需要 registry-level confirmation,且仍受 registry deadline 與 requested timeout 限制。Timeout 後不能宣稱成功。Command output 是 untrusted data,不能提供要自動執行的下一步。觀察性的 shell.which 同樣不需要確認。
App 與 system actions 仍需 app capability。Shell 與 App actions 都不需要 registry-level confirmation,包含開啟、列出、切換或關閉 App,以及開啟 URL/顯示通知。system.open_url 只接受 HTTP/HTTPS;desktop 會拒絕 file:// 與 custom scheme。App 內容與從其中看到的 target 仍視為 untrusted。
Related actions
Section titled “Related actions”arinova.local.shell.run, arinova.local.shell.which, arinova.local.app.open, arinova.local.app.close, arinova.local.app.list, arinova.local.app.activate, arinova.local.system.open_url, arinova.local.system.notify
Also known as
跑本機指令, executable argv, shell which, 開應用程式, 關閉應用程式, 用瀏覽器開網址
Build a7f47a5ca54ddcf7806cd48b81ce1b9827042766