package zed:extension; world extension { export init-extension: func(); record github-release { version: string, assets: list, } record github-release-asset { name: string, download-url: string, } record github-release-options { require-assets: bool, pre-release: bool, } enum os { mac, linux, windows, } enum architecture { aarch64, x86, x8664, } enum downloaded-file-type { gzip, gzip-tar, zip, uncompressed, } variant language-server-installation-status { checking-for-update, downloaded, downloading, cached, failed(string), } /// Gets the current operating system and architecture import current-platform: func() -> tuple; /// Gets the latest version of the given NPM package. import npm-package-latest-version: func(package-name: string) -> result; /// Gets the latest release for the given GitHub repository. import latest-github-release: func(repo: string, options: github-release-options) -> result; /// Downloads a file from the given url, and saves it to the given filename within the extension's /// working directory. Extracts the file according to the given file type. import download-file: func(url: string, output-filename: string, file-type: downloaded-file-type) -> result<_, string>; /// Updates the installation status for the given language server. import set-language-server-installation-status: func(language-server-name: string, status: language-server-installation-status); record command { command: string, args: list, env: list>, } resource worktree { read-text-file: func(path: string) -> result; } record language-server-config { name: string, language-name: string, } export language-server-command: func(config: language-server-config, worktree: borrow) -> result; }