Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body:

Describe who encountered the bug, the problem it creates, why it matters, and the observable criteria for a fix. Please check the latest `@ai-openshell/sdk` release on npm and search existing issues for possible duplicates before filing.

Problems with the gateway, CLI, or sandboxes belong in [NVIDIA/OpenShell](https://github.com/NVIDIA/OpenShell/issues). Do not report security vulnerabilities here; follow [SECURITY.md](https://github.com/ai-openshell/sdk-typescript/blob/main/SECURITY.md) instead.
Problems with the gateway, CLI, or sandboxes belong in [ai-openshell/openshell](https://github.com/ai-openshell/openshell/issues). Do not report security vulnerabilities here; follow [SECURITY.md](https://github.com/ai-openshell/sdk-typescript/blob/main/SECURITY.md) instead.

- type: textarea
id: user-story
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
blank_issues_enabled: false
contact_links:
- name: Gateway, CLI, or sandbox problem?
url: https://github.com/NVIDIA/OpenShell/issues/new/choose
url: https://github.com/ai-openshell/openshell/issues/new/choose
about: >
This repository is the TypeScript SDK only. Report problems with the
OpenShell gateway, CLI, sandboxes, or the gRPC API in NVIDIA/OpenShell.
OpenShell gateway, CLI, sandboxes, or the gRPC API in ai-openshell/openshell.
- name: Security vulnerability?
url: https://github.com/ai-openshell/sdk-typescript/blob/main/SECURITY.md
about: >
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body:

Describe who needs the feature, the problem it solves, why the current gap matters, the API you would like to use, and the observable criteria for success. Leave implementation choices to the people building the feature.

The SDK wraps the OpenShell gateway's API. A feature that needs a new gateway capability starts in [NVIDIA/OpenShell](https://github.com/NVIDIA/OpenShell/issues); link that issue here.
The SDK wraps the OpenShell gateway's API. A feature that needs a new gateway capability starts in [ai-openshell/openshell](https://github.com/ai-openshell/openshell/issues); link that issue here.

- type: textarea
id: user-story
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NVIDIA/OpenShell/main/docs/brand/assets/openshell-banner-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NVIDIA/OpenShell/main/docs/brand/assets/openshell-banner-light.png">
<img alt="OpenShell" src="https://raw.githubusercontent.com/NVIDIA/OpenShell/main/docs/brand/assets/openshell-banner-light.png" width="430">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ai-openshell/openshell/main/docs/brand/assets/openshell-banner-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ai-openshell/openshell/main/docs/brand/assets/openshell-banner-light.png">
<img alt="OpenShell" src="https://raw.githubusercontent.com/ai-openshell/openshell/main/docs/brand/assets/openshell-banner-light.png" width="430">
</picture>

# TypeScript SDK for OpenShell
Expand All @@ -10,12 +10,12 @@
[![npm](https://img.shields.io/npm/v/@ai-openshell/sdk?logo=npm)](https://www.npmjs.com/package/@ai-openshell/sdk)
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen)](https://docs.nvidia.com/openshell/latest/sdk/typescript)

Use the TypeScript SDK to manage [OpenShell](https://github.com/NVIDIA/OpenShell) sandboxes from Node.js applications and automation. Create sandboxes, run and stream commands, forward ports, and manage templates, policy, and provider credentials through the gateway.
Use the TypeScript SDK to manage [OpenShell](https://github.com/ai-openshell/openshell) sandboxes from Node.js applications and automation. Create sandboxes, run and stream commands, forward ports, and manage templates, policy, and provider credentials through the gateway.

> [!WARNING]
> **Do not run `npm install @ai-openshell/sdk` yet.** The first release of this package will be published on
> Tuesday, November 24, 2026, so the install command fails until then. Until the release, consume the SDK from
> the [OpenShell core repository](https://github.com/NVIDIA/OpenShell/tree/main/sdk/typescript).
> the [OpenShell core repository](https://github.com/ai-openshell/openshell/tree/main/sdk/typescript).

See the [TypeScript SDK documentation](https://docs.nvidia.com/openshell/latest/sdk/typescript) for connection options, authentication, and the raw client.

Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
## Reporting a vulnerability

Report vulnerabilities in the OpenShell TypeScript SDK privately through
[NVIDIA/OpenShell's private reporting
form](https://github.com/NVIDIA/OpenShell/security/advisories/new) and name
[ai-openshell/openshell's private reporting
form](https://github.com/ai-openshell/openshell/security/advisories/new) and name
`ai-openshell/sdk-typescript` as the affected component. Do not disclose
vulnerabilities in public issues, discussions, or pull requests.

The OpenShell security policy applies to this repository: the [report template,
review process, and coordinated
disclosure](https://github.com/NVIDIA/OpenShell/blob/main/SECURITY.md) are the
disclosure](https://github.com/ai-openshell/openshell/blob/main/SECURITY.md) are the
same. Private reporting directly on this repository will be enabled once its
process is set up; until then, use the form above.
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ run = """
#!/usr/bin/env bash
set -euo pipefail
rm -rf proto
npx --no-install buf export "https://github.com/NVIDIA/OpenShell.git#ref=${OPENSHELL_CORE_REF},depth=1,subdir=proto" \
npx --no-install buf export "https://github.com/ai-openshell/openshell.git#ref=${OPENSHELL_CORE_REF},depth=1,subdir=proto" \
--path openshell.proto --path sandbox.proto --path datamodel.proto --path options.proto \
--output proto
"""
Expand Down
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The workflows use a GitHub App token from the `sdk-bot` environment (secrets `SD

| File | mise task | Purpose |
|------|-----------|---------|
| `core-tags.sh [--all]` | `core:tags` | List NVIDIA/OpenShell release tags newer than the pin: every stable tag, plus the newest pre-release when it is newer than all of them. |
| `core-tags.sh [--all]` | `core:tags` | List ai-openshell/openshell release tags newer than the pin: every stable tag, plus the newest pre-release when it is newer than all of them. |
| `open-bump-pr.sh <tag> [--dry-run]` | `core:bump` | Open the update proposal for one core tag: branch `core/<tag>`, pin change, regenerated bindings in `src/gen`, refreshed copies of core files, proto diff in the body, labels `core-bump` plus `stable` or `prerelease`. Closes older pre-release proposals. |
| `bump-pr-body.md` | | PR body template for `open-bump-pr.sh`. |
| `drift-check.sh --out <file>` | `core:drift` | Compare core `main` with the pin: `buf breaking`, regenerate, then run `check` and the unit tests, list the RPCs the curated SDK doesn't call. Writes the markdown report. |
Expand Down
4 changes: 2 additions & 2 deletions scripts/core-sync/core-tags.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0

# core-tags.sh: print NVIDIA/OpenShell release tags newer than the pin,
# core-tags.sh: print ai-openshell/openshell release tags newer than the pin,
# oldest first.
#
# Usage: core-tags.sh [--all] [--pin <tag>]
Expand All @@ -14,7 +14,7 @@
# must be a release tag; a commit SHA fails.
set -euo pipefail

repo=${CORE_REPO:-NVIDIA/OpenShell}
repo=${CORE_REPO:-ai-openshell/openshell}
all=0
pin=

Expand Down
2 changes: 1 addition & 1 deletion scripts/core-sync/drift-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# check. Exits 0 when checks 1 and 2 pass, 1 otherwise.
set -euo pipefail

core_url=${CORE_URL:-https://github.com/NVIDIA/OpenShell.git}
core_url=${CORE_URL:-https://github.com/ai-openshell/openshell.git}
out=
while [ $# -gt 0 ]; do
case $1 in
Expand Down
4 changes: 2 additions & 2 deletions scripts/core-sync/open-bump-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
# Git identity and GH_TOKEN come from the environment (the App in CI).
set -euo pipefail

core_repo=${CORE_REPO:-NVIDIA/OpenShell}
core_repo=${CORE_REPO:-ai-openshell/openshell}
sdk_repo=${SDK_REPO:-ai-openshell/sdk-typescript}
image=ghcr.io/nvidia/openshell/gateway
image=quay.io/ai-openshell/gateway
diff_cap=400

tag=
Expand Down
40 changes: 22 additions & 18 deletions scripts/e2e/start-gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# the same version instead of :latest. --default-image replaces the image that
# sandboxes run when they don't name one (core's default is plain Ubuntu); the
# gateway pulls it only when it isn't present locally. Then registers the
# gateway as "e2e" for the SDK in $XDG_CONFIG_HOME/openshell. Waits up to 15
# minutes for the gateway image of a fresh tag to be published.
# gateway as "e2e" for the SDK in $XDG_CONFIG_HOME/openshell. Takes the image
# registry from core's compose file at the tag (core moved its images from
# ghcr.io/nvidia/openshell to quay.io/ai-openshell in v0.1.10-pre.5). Waits up
# to 15 minutes for the gateway image of a fresh tag to be published.
#
# Needs docker with the compose plugin and a host path /var/lib/openshell
# (core's compose file bind-mounts it at the same path). Meant for throwaway
Expand All @@ -23,8 +25,7 @@
# including sandboxes of another local gateway that uses the same namespace.
set -euo pipefail

core_repo=${CORE_REPO:-NVIDIA/OpenShell}
registry=ghcr.io/nvidia/openshell
core_repo=${CORE_REPO:-ai-openshell/openshell}
name=e2e
port=8080
health_port=8081
Expand All @@ -48,28 +49,31 @@ semver=${tag#v}
mkdir -p "$state"
echo "$tag" >"$state/core-version"

# Core pushes images after tagging; a proposal can be faster than that.
manifest_exists() {
local token
token=$(curl -fsS "https://ghcr.io/token?scope=repository:nvidia/openshell/gateway:pull" | jq -r .token) || return 1
curl -fsS -o /dev/null -H "Authorization: Bearer $token" \
-H 'Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json,application/vnd.oci.image.manifest.v1+json' \
"https://ghcr.io/v2/nvidia/openshell/gateway/manifests/$semver"
# Core's deployment files at the tag.
base="https://raw.githubusercontent.com/$core_repo/$tag/deploy/docker"
curl -fsSL "$base/docker-compose.yml" -o "$state/docker-compose.yml"
curl -fsSL "$base/gateway.toml" -o "$state/gateway.toml"

# The registry core publishes this version's images to, from the gateway
# service's image (for example quay.io/ai-openshell/gateway:${IMAGE_TAG:-latest}).
gateway_image=$(sed -nE 's#^ *image: *&gateway-image +([^ :]+/gateway):.*#\1#p' "$state/docker-compose.yml")
[ -n "$gateway_image" ] || {
echo "ERROR: could not find the gateway image in core's docker-compose.yml at $tag" >&2
exit 1
}
registry=${gateway_image%/gateway}

# Core pushes images after tagging; a proposal can be faster than that.
for i in $(seq 1 15); do
manifest_exists && break
docker manifest inspect "$gateway_image:$semver" >/dev/null 2>&1 && break
if [ "$i" -eq 15 ]; then
echo "ERROR: gateway image for $semver not published yet, re-run later" >&2
echo "ERROR: $gateway_image:$semver not published yet, re-run later" >&2
exit 1
fi
echo "Waiting for $registry/gateway:$semver ($i/15) ..."
echo "Waiting for $gateway_image:$semver ($i/15) ..."
sleep 60
done

# Core's deployment files at the tag.
base="https://raw.githubusercontent.com/$core_repo/$tag/deploy/docker"
curl -fsSL "$base/docker-compose.yml" -o "$state/docker-compose.yml"
curl -fsSL "$base/gateway.toml" -o "$state/gateway.toml"
sed -i.bak \
-e "s#\"$registry/supervisor:latest\"#\"$registry/supervisor:$semver\"#" \
-e "s#\"$registry/sandbox:latest\"#\"$registry/sandbox:$semver\"#" \
Expand Down
4 changes: 2 additions & 2 deletions scripts/fetch-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# fetch-core.sh: copy files from NVIDIA/OpenShell at a pinned ref.
# fetch-core.sh: copy files from ai-openshell/openshell at a pinned ref.
#
# The protos come from `buf export` (mise run proto:fetch); this script fetches
# the other core files the repository checks against, such as the vendored
Expand All @@ -23,7 +23,7 @@ fi
ref=$1
out=$2
shift 2
remote=${OPENSHELL_CORE_REMOTE:-https://github.com/NVIDIA/OpenShell.git}
remote=${OPENSHELL_CORE_REMOTE:-https://github.com/ai-openshell/openshell.git}
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT

Expand Down
2 changes: 1 addition & 1 deletion scripts/vendored-core-files.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
#
# Files copied from NVIDIA/OpenShell at the pinned ref, one per line:
# Files copied from ai-openshell/openshell at the pinned ref, one per line:
# <path in core> <path here>. `mise run vendored:check` fails when a copy
# differs from core.
sdk/conformance/oauth-client-credentials.json test/fixtures/oauth-client-credentials.json
Expand Down