#!/usr/bin/env dotslash

// This is an instance of the fork of Bash that we bundle with
// https://www.npmjs.com/package/@openai/codex-shell-tool-mcp.
// Fetching the prebuilt version via DotSlash makes it easier to write
// integration tests for shell execution flows.
//
// TODO(mbolin): Currently, we use a .tgz artifact that includes binaries for
// multiple platforms, but we could save a bit of space by making arch-specific
// artifacts available in the GitHub releases and referencing those here.
{
  "name": "codex-bash",
  "platforms": {
    // macOS 13 builds (and therefore x86_64) were dropped in
    // https://github.com/openai/codex/pull/7295, so we only provide an
    // Apple Silicon build for now.
    "macos-aarch64": {
      "size": 37003612,
      "hash": "blake3",
      "digest": "d9cd5928c993b65c340507931c61c02bd6e9179933f8bf26a548482bb5fa53bb",
      "format": "tar.gz",
      "path": "package/vendor/aarch64-apple-darwin/bash/macos-15/bash",
      "providers": [
        {
          "url": "https://github.com/openai/codex/releases/download/rust-v0.65.0/codex-shell-tool-mcp-npm-0.65.0.tgz"
        },
        {
          "type": "github-release",
          "repo": "openai/codex",
          "tag": "rust-v0.65.0",
          "name": "codex-shell-tool-mcp-npm-0.65.0.tgz"
        }
      ]
    },
    // Note the `musl` parts of the Linux paths are misleading: the Bash
    // binaries are actually linked against `glibc`, but the
    // `codex-execve-wrapper` that invokes them is linked against `musl`.
    "linux-x86_64": {
      "size": 37003612,
      "hash": "blake3",
      "digest": "d9cd5928c993b65c340507931c61c02bd6e9179933f8bf26a548482bb5fa53bb",
      "format": "tar.gz",
      "path": "package/vendor/x86_64-unknown-linux-musl/bash/ubuntu-24.04/bash",
      "providers": [
        {
          "url": "https://github.com/openai/codex/releases/download/rust-v0.65.0/codex-shell-tool-mcp-npm-0.65.0.tgz"
        },
        {
          "type": "github-release",
          "repo": "openai/codex",
          "tag": "rust-v0.65.0",
          "name": "codex-shell-tool-mcp-npm-0.65.0.tgz"
        }
      ]
    },
    "linux-aarch64": {
      "size": 37003612,
      "hash": "blake3",
      "digest": "d9cd5928c993b65c340507931c61c02bd6e9179933f8bf26a548482bb5fa53bb",
      "format": "tar.gz",
      "path": "package/vendor/aarch64-unknown-linux-musl/bash/ubuntu-24.04/bash",
      "providers": [
        {
          "url": "https://github.com/openai/codex/releases/download/rust-v0.65.0/codex-shell-tool-mcp-npm-0.65.0.tgz"
        },
        {
          "type": "github-release",
          "repo": "openai/codex",
          "tag": "rust-v0.65.0",
          "name": "codex-shell-tool-mcp-npm-0.65.0.tgz"
        }
      ]
    },
  }
}
