Remove preview for PR 238 🛬
|
Before Width: | Height: | Size: 141 KiB |
@@ -1,101 +0,0 @@
|
||||
// @ts-check
|
||||
|
||||
// Extra JS capability for selected tabs to be synced
|
||||
// The selection is stored in local storage so that it persists across page loads.
|
||||
|
||||
/**
|
||||
* @type {Record<string, HTMLElement[]>}
|
||||
*/
|
||||
let sd_id_to_elements = {};
|
||||
const storageKeyPrefix = "sphinx-design-tab-id-";
|
||||
|
||||
/**
|
||||
* Create a key for a tab element.
|
||||
* @param {HTMLElement} el - The tab element.
|
||||
* @returns {[string, string, string] | null} - The key.
|
||||
*
|
||||
*/
|
||||
function create_key(el) {
|
||||
let syncId = el.getAttribute("data-sync-id");
|
||||
let syncGroup = el.getAttribute("data-sync-group");
|
||||
if (!syncId || !syncGroup) return null;
|
||||
return [syncGroup, syncId, syncGroup + "--" + syncId];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the tab selection.
|
||||
*
|
||||
*/
|
||||
function ready() {
|
||||
// Find all tabs with sync data
|
||||
|
||||
/** @type {string[]} */
|
||||
let groups = [];
|
||||
|
||||
document.querySelectorAll(".sd-tab-label").forEach((label) => {
|
||||
if (label instanceof HTMLElement) {
|
||||
let data = create_key(label);
|
||||
if (data) {
|
||||
let [group, id, key] = data;
|
||||
|
||||
// add click event listener
|
||||
// @ts-ignore
|
||||
label.onclick = onSDLabelClick;
|
||||
|
||||
// store map of key to elements
|
||||
if (!sd_id_to_elements[key]) {
|
||||
sd_id_to_elements[key] = [];
|
||||
}
|
||||
sd_id_to_elements[key].push(label);
|
||||
|
||||
if (groups.indexOf(group) === -1) {
|
||||
groups.push(group);
|
||||
// Check if a specific tab has been selected via URL parameter
|
||||
const tabParam = new URLSearchParams(window.location.search).get(
|
||||
group
|
||||
);
|
||||
if (tabParam) {
|
||||
console.log(
|
||||
"sphinx-design: Selecting tab id for group '" +
|
||||
group +
|
||||
"' from URL parameter: " +
|
||||
tabParam
|
||||
);
|
||||
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
|
||||
}
|
||||
}
|
||||
|
||||
// Check is a specific tab has been selected previously
|
||||
let previousId = window.sessionStorage.getItem(
|
||||
storageKeyPrefix + group
|
||||
);
|
||||
if (previousId === id) {
|
||||
// console.log(
|
||||
// "sphinx-design: Selecting tab from session storage: " + id
|
||||
// );
|
||||
// @ts-ignore
|
||||
label.previousElementSibling.checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate other tabs with the same sync id.
|
||||
*
|
||||
* @this {HTMLElement} - The element that was clicked.
|
||||
*/
|
||||
function onSDLabelClick() {
|
||||
let data = create_key(this);
|
||||
if (!data) return;
|
||||
let [group, id, key] = data;
|
||||
for (const label of sd_id_to_elements[key]) {
|
||||
if (label === this) continue;
|
||||
// @ts-ignore
|
||||
label.previousElementSibling.checked = true;
|
||||
}
|
||||
window.sessionStorage.setItem(storageKeyPrefix + group, id);
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", ready, false);
|
||||
@@ -1,925 +0,0 @@
|
||||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
||||
div.clearer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.section::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- relbar ---------------------------------------------------------------- */
|
||||
|
||||
div.related {
|
||||
width: 100%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
div.related h3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.related ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.related li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
float: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* -- sidebar --------------------------------------------------------------- */
|
||||
|
||||
div.sphinxsidebarwrapper {
|
||||
padding: 10px 5px 0 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
float: left;
|
||||
width: 230px;
|
||||
margin-left: -100%;
|
||||
font-size: 90%;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap : break-word;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul,
|
||||
div.sphinxsidebar ul.want-points {
|
||||
margin-left: 20px;
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar form {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar input {
|
||||
border: 1px solid #98dbcc;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox form.search {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="text"] {
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||
float: left;
|
||||
width: 20%;
|
||||
border-left: none;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li p.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul.keywordmatches li.goodmatch a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* -- index page ------------------------------------------------------------ */
|
||||
|
||||
table.contentstable {
|
||||
width: 90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.contentstable p.biglink {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
a.biglink {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
span.linkdescr {
|
||||
font-style: italic;
|
||||
padding-top: 5px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* -- general index --------------------------------------------------------- */
|
||||
|
||||
table.indextable {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.indextable td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.indextable ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table.indextable > tbody > tr > td > ul {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
table.indextable tr.pcap {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
table.indextable tr.cap {
|
||||
margin-top: 10px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
img.toggler {
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.modindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
/* -- domain module index --------------------------------------------------- */
|
||||
|
||||
table.modindextable td {
|
||||
padding: 2px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 360px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li, div.body blockquote {
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #551A8B;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
h4:hover > a.headerlink,
|
||||
h5:hover > a.headerlink,
|
||||
h6:hover > a.headerlink,
|
||||
dt:hover > a.headerlink,
|
||||
caption:hover > a.headerlink,
|
||||
p.caption:hover > a.headerlink,
|
||||
div.code-block-caption:hover > a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div.body p.caption {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
div.body td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.first {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
p.rubric {
|
||||
margin-top: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, figure.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-default {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar,
|
||||
aside.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
background-color: #ffe;
|
||||
width: 40%;
|
||||
float: right;
|
||||
clear: right;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
p.sidebar-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
|
||||
p.topic-title {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* -- admonitions ----------------------------------------------------------- */
|
||||
|
||||
div.admonition {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
div.admonition dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
margin: 0px 10px 5px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.body p.centered {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
nav.contents > :last-child,
|
||||
aside.topic > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
nav.contents::after,
|
||||
aside.topic::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* -- tables ---------------------------------------------------------------- */
|
||||
|
||||
table.docutils {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-default {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table caption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table caption span.caption-text {
|
||||
}
|
||||
|
||||
table.docutils td, table.docutils th {
|
||||
padding: 1px 8px 1px 5px;
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
table.citation td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
th > :first-child,
|
||||
td > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
th > :last-child,
|
||||
td > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure, figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption, figcaption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number,
|
||||
figcaption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text,
|
||||
figcaption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
|
||||
table.field-list td, table.field-list th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.field-list ul {
|
||||
margin: 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.field-list p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-name {
|
||||
-moz-hyphens: manual;
|
||||
-ms-hyphens: manual;
|
||||
-webkit-hyphens: manual;
|
||||
hyphens: manual;
|
||||
}
|
||||
|
||||
/* -- hlist styles ---------------------------------------------------------- */
|
||||
|
||||
table.hlist {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
table.hlist td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* -- object description styles --------------------------------------------- */
|
||||
|
||||
.sig {
|
||||
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
||||
}
|
||||
|
||||
.sig-name, code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sig-name {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.sig-prename, code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.sig-param.n {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* C++ specific styling */
|
||||
|
||||
.sig-inline.c-texpr,
|
||||
.sig-inline.cpp-texpr {
|
||||
font-family: unset;
|
||||
}
|
||||
|
||||
.sig.c .k, .sig.c .kt,
|
||||
.sig.cpp .k, .sig.cpp .kt {
|
||||
color: #0033B3;
|
||||
}
|
||||
|
||||
.sig.c .m,
|
||||
.sig.cpp .m {
|
||||
color: #1750EB;
|
||||
}
|
||||
|
||||
.sig.c .s, .sig.c .sc,
|
||||
.sig.cpp .s, .sig.cpp .sc {
|
||||
color: #067D17;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman;
|
||||
}
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:first-child > :first-child,
|
||||
:not(li) > ul > li:first-child > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:last-child > :last-child,
|
||||
:not(li) > ul > li:last-child > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
ol.simple ol p,
|
||||
ol.simple ul p,
|
||||
ul.simple ol p,
|
||||
ul.simple ul p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple > li:not(:first-child) > p,
|
||||
ul.simple > li:not(:first-child) > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple p,
|
||||
ul.simple p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
aside.footnote > span,
|
||||
div.citation > span {
|
||||
float: left;
|
||||
}
|
||||
aside.footnote > span:last-of-type,
|
||||
div.citation > span:last-of-type {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
aside.footnote > p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
div.citation > p {
|
||||
margin-left: 4em;
|
||||
}
|
||||
aside.footnote > p:last-of-type,
|
||||
div.citation > p:last-of-type {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
aside.footnote > p:last-of-type:after,
|
||||
div.citation > p:last-of-type:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
||||
dl.field-list {
|
||||
display: grid;
|
||||
grid-template-columns: fit-content(30%) auto;
|
||||
}
|
||||
|
||||
dl.field-list > dt {
|
||||
font-weight: bold;
|
||||
word-break: break-word;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
dd > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
dd ul, dd table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.sig dd {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.sig dl {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt:target, span.highlighted {
|
||||
background-color: #fbe54e;
|
||||
}
|
||||
|
||||
rect.highlighted {
|
||||
fill: #fbe54e;
|
||||
}
|
||||
|
||||
dl.glossary dt {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.system-message {
|
||||
background-color: #fda;
|
||||
padding: 5px;
|
||||
border: 3px solid red;
|
||||
}
|
||||
|
||||
.footnote:target {
|
||||
background-color: #ffa;
|
||||
}
|
||||
|
||||
.line-block {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.line-block .line-block {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.guilabel, .menuselection {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.accelerator {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.classifier {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0 0.5em;
|
||||
content: ":";
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
border-bottom: dotted 1px;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.translated {
|
||||
background-color: rgba(207, 255, 207, 0.2)
|
||||
}
|
||||
|
||||
.untranslated {
|
||||
background-color: rgba(255, 207, 207, 0.2)
|
||||
}
|
||||
|
||||
/* -- code displays --------------------------------------------------------- */
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
||||
}
|
||||
|
||||
pre, div[class*="highlight-"] {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
span.pre {
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div[class*="highlight-"] {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
td.linenos pre {
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
table.highlighttable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tbody {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
table.highlighttable td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
table.highlighttable td.code {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlight .hll {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.highlight pre,
|
||||
table.highlighttable pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption + div {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption {
|
||||
margin-top: 1em;
|
||||
padding: 2px 5px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
div.code-block-caption code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos,
|
||||
span.linenos,
|
||||
div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
-webkit-user-select: text; /* Safari fallback only */
|
||||
-webkit-user-select: none; /* Chrome/Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* IE10+ */
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
padding: 0.1em 0.3em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-text {
|
||||
}
|
||||
|
||||
div.literal-block-wrapper {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.viewcode-link {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
margin: -1px -10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* -- math display ---------------------------------------------------------- */
|
||||
|
||||
img.math {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.body div.math p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span.eqno {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.eqno a.headerlink {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
div.math:hover a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* -- printout stylesheet --------------------------------------------------- */
|
||||
|
||||
@media print {
|
||||
div.document,
|
||||
div.documentwrapper,
|
||||
div.bodywrapper {
|
||||
margin: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.sphinxsidebar,
|
||||
div.related,
|
||||
div.footer,
|
||||
#top-link {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="44" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="#22863a" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M5 12l5 5l10 -10" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 313 B |
@@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<rect x="8" y="8" width="12" height="12" rx="2" />
|
||||
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 411 B |
@@ -1,94 +0,0 @@
|
||||
/* Copy buttons */
|
||||
button.copybtn {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
top: .3em;
|
||||
right: .3em;
|
||||
width: 1.7em;
|
||||
height: 1.7em;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s, border .3s, background-color .3s;
|
||||
user-select: none;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
border-radius: 0.4em;
|
||||
/* The colors that GitHub uses */
|
||||
border: #1b1f2426 1px solid;
|
||||
background-color: #f6f8fa;
|
||||
color: #57606a;
|
||||
}
|
||||
|
||||
button.copybtn.success {
|
||||
border-color: #22863a;
|
||||
color: #22863a;
|
||||
}
|
||||
|
||||
button.copybtn svg {
|
||||
stroke: currentColor;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
div.highlight {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Show the copybutton */
|
||||
.highlight:hover button.copybtn, button.copybtn.success {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.highlight button.copybtn:hover {
|
||||
background-color: rgb(235, 235, 235);
|
||||
}
|
||||
|
||||
.highlight button.copybtn:active {
|
||||
background-color: rgb(187, 187, 187);
|
||||
}
|
||||
|
||||
/**
|
||||
* A minimal CSS-only tooltip copied from:
|
||||
* https://codepen.io/mildrenben/pen/rVBrpK
|
||||
*
|
||||
* To use, write HTML like the following:
|
||||
*
|
||||
* <p class="o-tooltip--left" data-tooltip="Hey">Short</p>
|
||||
*/
|
||||
.o-tooltip--left {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.o-tooltip--left:after {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
content: attr(data-tooltip);
|
||||
padding: .2em;
|
||||
font-size: .8em;
|
||||
left: -.2em;
|
||||
background: grey;
|
||||
color: white;
|
||||
white-space: nowrap;
|
||||
z-index: 2;
|
||||
border-radius: 2px;
|
||||
transform: translateX(-102%) translateY(0);
|
||||
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
||||
}
|
||||
|
||||
.o-tooltip--left:hover:after {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateX(-100%) translateY(0);
|
||||
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
||||
transition-delay: .5s;
|
||||
}
|
||||
|
||||
/* By default the copy button shouldn't show up when printing a page */
|
||||
@media print {
|
||||
button.copybtn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -1,248 +0,0 @@
|
||||
// Localization support
|
||||
const messages = {
|
||||
'en': {
|
||||
'copy': 'Copy',
|
||||
'copy_to_clipboard': 'Copy to clipboard',
|
||||
'copy_success': 'Copied!',
|
||||
'copy_failure': 'Failed to copy',
|
||||
},
|
||||
'es' : {
|
||||
'copy': 'Copiar',
|
||||
'copy_to_clipboard': 'Copiar al portapapeles',
|
||||
'copy_success': '¡Copiado!',
|
||||
'copy_failure': 'Error al copiar',
|
||||
},
|
||||
'de' : {
|
||||
'copy': 'Kopieren',
|
||||
'copy_to_clipboard': 'In die Zwischenablage kopieren',
|
||||
'copy_success': 'Kopiert!',
|
||||
'copy_failure': 'Fehler beim Kopieren',
|
||||
},
|
||||
'fr' : {
|
||||
'copy': 'Copier',
|
||||
'copy_to_clipboard': 'Copier dans le presse-papier',
|
||||
'copy_success': 'Copié !',
|
||||
'copy_failure': 'Échec de la copie',
|
||||
},
|
||||
'ru': {
|
||||
'copy': 'Скопировать',
|
||||
'copy_to_clipboard': 'Скопировать в буфер',
|
||||
'copy_success': 'Скопировано!',
|
||||
'copy_failure': 'Не удалось скопировать',
|
||||
},
|
||||
'zh-CN': {
|
||||
'copy': '复制',
|
||||
'copy_to_clipboard': '复制到剪贴板',
|
||||
'copy_success': '复制成功!',
|
||||
'copy_failure': '复制失败',
|
||||
},
|
||||
'it' : {
|
||||
'copy': 'Copiare',
|
||||
'copy_to_clipboard': 'Copiato negli appunti',
|
||||
'copy_success': 'Copiato!',
|
||||
'copy_failure': 'Errore durante la copia',
|
||||
}
|
||||
}
|
||||
|
||||
let locale = 'en'
|
||||
if( document.documentElement.lang !== undefined
|
||||
&& messages[document.documentElement.lang] !== undefined ) {
|
||||
locale = document.documentElement.lang
|
||||
}
|
||||
|
||||
let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT;
|
||||
if (doc_url_root == '#') {
|
||||
doc_url_root = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* SVG files for our copy buttons
|
||||
*/
|
||||
let iconCheck = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="44" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="#22863a" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<title>${messages[locale]['copy_success']}</title>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M5 12l5 5l10 -10" />
|
||||
</svg>`
|
||||
|
||||
// If the user specified their own SVG use that, otherwise use the default
|
||||
let iconCopy = ``;
|
||||
if (!iconCopy) {
|
||||
iconCopy = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<title>${messages[locale]['copy_to_clipboard']}</title>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<rect x="8" y="8" width="12" height="12" rx="2" />
|
||||
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
|
||||
</svg>`
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up copy/paste for code blocks
|
||||
*/
|
||||
|
||||
const runWhenDOMLoaded = cb => {
|
||||
if (document.readyState != 'loading') {
|
||||
cb()
|
||||
} else if (document.addEventListener) {
|
||||
document.addEventListener('DOMContentLoaded', cb)
|
||||
} else {
|
||||
document.attachEvent('onreadystatechange', function() {
|
||||
if (document.readyState == 'complete') cb()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const codeCellId = index => `codecell${index}`
|
||||
|
||||
// Clears selected text since ClipboardJS will select the text when copying
|
||||
const clearSelection = () => {
|
||||
if (window.getSelection) {
|
||||
window.getSelection().removeAllRanges()
|
||||
} else if (document.selection) {
|
||||
document.selection.empty()
|
||||
}
|
||||
}
|
||||
|
||||
// Changes tooltip text for a moment, then changes it back
|
||||
// We want the timeout of our `success` class to be a bit shorter than the
|
||||
// tooltip and icon change, so that we can hide the icon before changing back.
|
||||
var timeoutIcon = 2000;
|
||||
var timeoutSuccessClass = 1500;
|
||||
|
||||
const temporarilyChangeTooltip = (el, oldText, newText) => {
|
||||
el.setAttribute('data-tooltip', newText)
|
||||
el.classList.add('success')
|
||||
// Remove success a little bit sooner than we change the tooltip
|
||||
// So that we can use CSS to hide the copybutton first
|
||||
setTimeout(() => el.classList.remove('success'), timeoutSuccessClass)
|
||||
setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon)
|
||||
}
|
||||
|
||||
// Changes the copy button icon for two seconds, then changes it back
|
||||
const temporarilyChangeIcon = (el) => {
|
||||
el.innerHTML = iconCheck;
|
||||
setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon)
|
||||
}
|
||||
|
||||
const addCopyButtonToCodeCells = () => {
|
||||
// If ClipboardJS hasn't loaded, wait a bit and try again. This
|
||||
// happens because we load ClipboardJS asynchronously.
|
||||
if (window.ClipboardJS === undefined) {
|
||||
setTimeout(addCopyButtonToCodeCells, 250)
|
||||
return
|
||||
}
|
||||
|
||||
// Add copybuttons to all of our code cells
|
||||
const COPYBUTTON_SELECTOR = 'div.highlight pre';
|
||||
const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR)
|
||||
codeCells.forEach((codeCell, index) => {
|
||||
const id = codeCellId(index)
|
||||
codeCell.setAttribute('id', id)
|
||||
|
||||
const clipboardButton = id =>
|
||||
`<button class="copybtn o-tooltip--left" data-tooltip="${messages[locale]['copy']}" data-clipboard-target="#${id}">
|
||||
${iconCopy}
|
||||
</button>`
|
||||
codeCell.insertAdjacentHTML('afterend', clipboardButton(id))
|
||||
})
|
||||
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes excluded text from a Node.
|
||||
*
|
||||
* @param {Node} target Node to filter.
|
||||
* @param {string} exclude CSS selector of nodes to exclude.
|
||||
* @returns {DOMString} Text from `target` with text removed.
|
||||
*/
|
||||
function filterText(target, exclude) {
|
||||
const clone = target.cloneNode(true); // clone as to not modify the live DOM
|
||||
if (exclude) {
|
||||
// remove excluded nodes
|
||||
clone.querySelectorAll(exclude).forEach(node => node.remove());
|
||||
}
|
||||
return clone.innerText;
|
||||
}
|
||||
|
||||
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||
function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
|
||||
var regexp;
|
||||
var match;
|
||||
|
||||
// Do we check for line continuation characters and "HERE-documents"?
|
||||
var useLineCont = !!lineContinuationChar
|
||||
var useHereDoc = !!hereDocDelim
|
||||
|
||||
// create regexp to capture prompt and remaining line
|
||||
if (isRegexp) {
|
||||
regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
|
||||
} else {
|
||||
regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
|
||||
}
|
||||
|
||||
const outputLines = [];
|
||||
var promptFound = false;
|
||||
var gotLineCont = false;
|
||||
var gotHereDoc = false;
|
||||
const lineGotPrompt = [];
|
||||
for (const line of textContent.split('\n')) {
|
||||
match = line.match(regexp)
|
||||
if (match || gotLineCont || gotHereDoc) {
|
||||
promptFound = regexp.test(line)
|
||||
lineGotPrompt.push(promptFound)
|
||||
if (removePrompts && promptFound) {
|
||||
outputLines.push(match[2])
|
||||
} else {
|
||||
outputLines.push(line)
|
||||
}
|
||||
gotLineCont = line.endsWith(lineContinuationChar) & useLineCont
|
||||
if (line.includes(hereDocDelim) & useHereDoc)
|
||||
gotHereDoc = !gotHereDoc
|
||||
} else if (!onlyCopyPromptLines) {
|
||||
outputLines.push(line)
|
||||
} else if (copyEmptyLines && line.trim() === '') {
|
||||
outputLines.push(line)
|
||||
}
|
||||
}
|
||||
|
||||
// If no lines with the prompt were found then just use original lines
|
||||
if (lineGotPrompt.some(v => v === true)) {
|
||||
textContent = outputLines.join('\n');
|
||||
}
|
||||
|
||||
// Remove a trailing newline to avoid auto-running when pasting
|
||||
if (textContent.endsWith("\n")) {
|
||||
textContent = textContent.slice(0, -1)
|
||||
}
|
||||
return textContent
|
||||
}
|
||||
|
||||
|
||||
var copyTargetText = (trigger) => {
|
||||
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);
|
||||
|
||||
// get filtered text
|
||||
let exclude = '.linenos, .gp, .go';
|
||||
|
||||
let text = filterText(target, exclude);
|
||||
return formatCopyText(text, '', false, true, true, true, '', '')
|
||||
}
|
||||
|
||||
// Initialize with a callback so we can modify the text before copy
|
||||
const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText})
|
||||
|
||||
// Update UI with error/success messages
|
||||
clipboard.on('success', event => {
|
||||
clearSelection()
|
||||
temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success'])
|
||||
temporarilyChangeIcon(event.trigger)
|
||||
})
|
||||
|
||||
clipboard.on('error', event => {
|
||||
temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure'])
|
||||
})
|
||||
}
|
||||
|
||||
runWhenDOMLoaded(addCopyButtonToCodeCells)
|
||||
@@ -1,73 +0,0 @@
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes excluded text from a Node.
|
||||
*
|
||||
* @param {Node} target Node to filter.
|
||||
* @param {string} exclude CSS selector of nodes to exclude.
|
||||
* @returns {DOMString} Text from `target` with text removed.
|
||||
*/
|
||||
export function filterText(target, exclude) {
|
||||
const clone = target.cloneNode(true); // clone as to not modify the live DOM
|
||||
if (exclude) {
|
||||
// remove excluded nodes
|
||||
clone.querySelectorAll(exclude).forEach(node => node.remove());
|
||||
}
|
||||
return clone.innerText;
|
||||
}
|
||||
|
||||
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||
export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
|
||||
var regexp;
|
||||
var match;
|
||||
|
||||
// Do we check for line continuation characters and "HERE-documents"?
|
||||
var useLineCont = !!lineContinuationChar
|
||||
var useHereDoc = !!hereDocDelim
|
||||
|
||||
// create regexp to capture prompt and remaining line
|
||||
if (isRegexp) {
|
||||
regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
|
||||
} else {
|
||||
regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
|
||||
}
|
||||
|
||||
const outputLines = [];
|
||||
var promptFound = false;
|
||||
var gotLineCont = false;
|
||||
var gotHereDoc = false;
|
||||
const lineGotPrompt = [];
|
||||
for (const line of textContent.split('\n')) {
|
||||
match = line.match(regexp)
|
||||
if (match || gotLineCont || gotHereDoc) {
|
||||
promptFound = regexp.test(line)
|
||||
lineGotPrompt.push(promptFound)
|
||||
if (removePrompts && promptFound) {
|
||||
outputLines.push(match[2])
|
||||
} else {
|
||||
outputLines.push(line)
|
||||
}
|
||||
gotLineCont = line.endsWith(lineContinuationChar) & useLineCont
|
||||
if (line.includes(hereDocDelim) & useHereDoc)
|
||||
gotHereDoc = !gotHereDoc
|
||||
} else if (!onlyCopyPromptLines) {
|
||||
outputLines.push(line)
|
||||
} else if (copyEmptyLines && line.trim() === '') {
|
||||
outputLines.push(line)
|
||||
}
|
||||
}
|
||||
|
||||
// If no lines with the prompt were found then just use original lines
|
||||
if (lineGotPrompt.some(v => v === true)) {
|
||||
textContent = outputLines.join('\n');
|
||||
}
|
||||
|
||||
// Remove a trailing newline to avoid auto-running when pasting
|
||||
if (textContent.endsWith("\n")) {
|
||||
textContent = textContent.slice(0, -1)
|
||||
}
|
||||
return textContent
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
// @ts-check
|
||||
|
||||
// Extra JS capability for selected tabs to be synced
|
||||
// The selection is stored in local storage so that it persists across page loads.
|
||||
|
||||
/**
|
||||
* @type {Record<string, HTMLElement[]>}
|
||||
*/
|
||||
let sd_id_to_elements = {};
|
||||
const storageKeyPrefix = "sphinx-design-tab-id-";
|
||||
|
||||
/**
|
||||
* Create a key for a tab element.
|
||||
* @param {HTMLElement} el - The tab element.
|
||||
* @returns {[string, string, string] | null} - The key.
|
||||
*
|
||||
*/
|
||||
function create_key(el) {
|
||||
let syncId = el.getAttribute("data-sync-id");
|
||||
let syncGroup = el.getAttribute("data-sync-group");
|
||||
if (!syncId || !syncGroup) return null;
|
||||
return [syncGroup, syncId, syncGroup + "--" + syncId];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the tab selection.
|
||||
*
|
||||
*/
|
||||
function ready() {
|
||||
// Find all tabs with sync data
|
||||
|
||||
/** @type {string[]} */
|
||||
let groups = [];
|
||||
|
||||
document.querySelectorAll(".sd-tab-label").forEach((label) => {
|
||||
if (label instanceof HTMLElement) {
|
||||
let data = create_key(label);
|
||||
if (data) {
|
||||
let [group, id, key] = data;
|
||||
|
||||
// add click event listener
|
||||
// @ts-ignore
|
||||
label.onclick = onSDLabelClick;
|
||||
|
||||
// store map of key to elements
|
||||
if (!sd_id_to_elements[key]) {
|
||||
sd_id_to_elements[key] = [];
|
||||
}
|
||||
sd_id_to_elements[key].push(label);
|
||||
|
||||
if (groups.indexOf(group) === -1) {
|
||||
groups.push(group);
|
||||
// Check if a specific tab has been selected via URL parameter
|
||||
const tabParam = new URLSearchParams(window.location.search).get(
|
||||
group
|
||||
);
|
||||
if (tabParam) {
|
||||
console.log(
|
||||
"sphinx-design: Selecting tab id for group '" +
|
||||
group +
|
||||
"' from URL parameter: " +
|
||||
tabParam
|
||||
);
|
||||
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
|
||||
}
|
||||
}
|
||||
|
||||
// Check is a specific tab has been selected previously
|
||||
let previousId = window.sessionStorage.getItem(
|
||||
storageKeyPrefix + group
|
||||
);
|
||||
if (previousId === id) {
|
||||
// console.log(
|
||||
// "sphinx-design: Selecting tab from session storage: " + id
|
||||
// );
|
||||
// @ts-ignore
|
||||
label.previousElementSibling.checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate other tabs with the same sync id.
|
||||
*
|
||||
* @this {HTMLElement} - The element that was clicked.
|
||||
*/
|
||||
function onSDLabelClick() {
|
||||
let data = create_key(this);
|
||||
if (!data) return;
|
||||
let [group, id, key] = data;
|
||||
for (const label of sd_id_to_elements[key]) {
|
||||
if (label === this) continue;
|
||||
// @ts-ignore
|
||||
label.previousElementSibling.checked = true;
|
||||
}
|
||||
window.sessionStorage.setItem(storageKeyPrefix + group, id);
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", ready, false);
|
||||
@@ -1,156 +0,0 @@
|
||||
/*
|
||||
* doctools.js
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Base JavaScript utilities for all Sphinx HTML documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
||||
"TEXTAREA",
|
||||
"INPUT",
|
||||
"SELECT",
|
||||
"BUTTON",
|
||||
]);
|
||||
|
||||
const _ready = (callback) => {
|
||||
if (document.readyState !== "loading") {
|
||||
callback();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", callback);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
const Documentation = {
|
||||
init: () => {
|
||||
Documentation.initDomainIndexTable();
|
||||
Documentation.initOnKeyListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
* i18n support
|
||||
*/
|
||||
TRANSLATIONS: {},
|
||||
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
||||
LOCALE: "unknown",
|
||||
|
||||
// gettext and ngettext don't access this so that the functions
|
||||
// can safely bound to a different name (_ = Documentation.gettext)
|
||||
gettext: (string) => {
|
||||
const translated = Documentation.TRANSLATIONS[string];
|
||||
switch (typeof translated) {
|
||||
case "undefined":
|
||||
return string; // no translation
|
||||
case "string":
|
||||
return translated; // translation exists
|
||||
default:
|
||||
return translated[0]; // (singular, plural) translation tuple exists
|
||||
}
|
||||
},
|
||||
|
||||
ngettext: (singular, plural, n) => {
|
||||
const translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated !== "undefined")
|
||||
return translated[Documentation.PLURAL_EXPR(n)];
|
||||
return n === 1 ? singular : plural;
|
||||
},
|
||||
|
||||
addTranslations: (catalog) => {
|
||||
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
||||
Documentation.PLURAL_EXPR = new Function(
|
||||
"n",
|
||||
`return (${catalog.plural_expr})`
|
||||
);
|
||||
Documentation.LOCALE = catalog.locale;
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to focus on search bar
|
||||
*/
|
||||
focusSearchBar: () => {
|
||||
document.querySelectorAll("input[name=q]")[0]?.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Initialise the domain index toggle buttons
|
||||
*/
|
||||
initDomainIndexTable: () => {
|
||||
const toggler = (el) => {
|
||||
const idNumber = el.id.substr(7);
|
||||
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
||||
if (el.src.substr(-9) === "minus.png") {
|
||||
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = "none"));
|
||||
} else {
|
||||
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = ""));
|
||||
}
|
||||
};
|
||||
|
||||
const togglerElements = document.querySelectorAll("img.toggler");
|
||||
togglerElements.forEach((el) =>
|
||||
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
||||
);
|
||||
togglerElements.forEach((el) => (el.style.display = ""));
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
||||
},
|
||||
|
||||
initOnKeyListeners: () => {
|
||||
// only install a listener if it is really needed
|
||||
if (
|
||||
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
||||
)
|
||||
return;
|
||||
|
||||
document.addEventListener("keydown", (event) => {
|
||||
// bail for input elements
|
||||
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||
// bail with special keys
|
||||
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
|
||||
if (!event.shiftKey) {
|
||||
switch (event.key) {
|
||||
case "ArrowLeft":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
const prevLink = document.querySelector('link[rel="prev"]');
|
||||
if (prevLink && prevLink.href) {
|
||||
window.location.href = prevLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
case "ArrowRight":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
const nextLink = document.querySelector('link[rel="next"]');
|
||||
if (nextLink && nextLink.href) {
|
||||
window.location.href = nextLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// some keyboard layouts may need Shift to get /
|
||||
switch (event.key) {
|
||||
case "/":
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
||||
Documentation.focusSearchBar();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
// quick alias for translations
|
||||
const _ = Documentation.gettext;
|
||||
|
||||
_ready(Documentation.init);
|
||||
@@ -1,13 +0,0 @@
|
||||
const DOCUMENTATION_OPTIONS = {
|
||||
VERSION: '0.1.0',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
LINK_SUFFIX: '.html',
|
||||
HAS_SOURCE: false,
|
||||
SOURCELINK_SUFFIX: '.txt',
|
||||
NAVIGATION_WITH_KEYS: false,
|
||||
SHOW_SEARCH_SUMMARY: true,
|
||||
ENABLE_SEARCH_SHORTCUTS: true,
|
||||
};
|
||||
|
Before Width: | Height: | Size: 437 B |
|
Before Width: | Height: | Size: 286 B |
@@ -1,199 +0,0 @@
|
||||
/*
|
||||
* language_data.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* This script contains the language-specific data used by searchtools.js,
|
||||
* namely the list of stopwords, stemmer, scorer and splitter.
|
||||
*
|
||||
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
|
||||
|
||||
|
||||
/* Non-minified version is copied as a separate JS file, if available */
|
||||
|
||||
/**
|
||||
* Porter Stemmer
|
||||
*/
|
||||
var Stemmer = function() {
|
||||
|
||||
var step2list = {
|
||||
ational: 'ate',
|
||||
tional: 'tion',
|
||||
enci: 'ence',
|
||||
anci: 'ance',
|
||||
izer: 'ize',
|
||||
bli: 'ble',
|
||||
alli: 'al',
|
||||
entli: 'ent',
|
||||
eli: 'e',
|
||||
ousli: 'ous',
|
||||
ization: 'ize',
|
||||
ation: 'ate',
|
||||
ator: 'ate',
|
||||
alism: 'al',
|
||||
iveness: 'ive',
|
||||
fulness: 'ful',
|
||||
ousness: 'ous',
|
||||
aliti: 'al',
|
||||
iviti: 'ive',
|
||||
biliti: 'ble',
|
||||
logi: 'log'
|
||||
};
|
||||
|
||||
var step3list = {
|
||||
icate: 'ic',
|
||||
ative: '',
|
||||
alize: 'al',
|
||||
iciti: 'ic',
|
||||
ical: 'ic',
|
||||
ful: '',
|
||||
ness: ''
|
||||
};
|
||||
|
||||
var c = "[^aeiou]"; // consonant
|
||||
var v = "[aeiouy]"; // vowel
|
||||
var C = c + "[^aeiouy]*"; // consonant sequence
|
||||
var V = v + "[aeiou]*"; // vowel sequence
|
||||
|
||||
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
|
||||
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
|
||||
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
|
||||
var s_v = "^(" + C + ")?" + v; // vowel in stem
|
||||
|
||||
this.stemWord = function (w) {
|
||||
var stem;
|
||||
var suffix;
|
||||
var firstch;
|
||||
var origword = w;
|
||||
|
||||
if (w.length < 3)
|
||||
return w;
|
||||
|
||||
var re;
|
||||
var re2;
|
||||
var re3;
|
||||
var re4;
|
||||
|
||||
firstch = w.substr(0,1);
|
||||
if (firstch == "y")
|
||||
w = firstch.toUpperCase() + w.substr(1);
|
||||
|
||||
// Step 1a
|
||||
re = /^(.+?)(ss|i)es$/;
|
||||
re2 = /^(.+?)([^s])s$/;
|
||||
|
||||
if (re.test(w))
|
||||
w = w.replace(re,"$1$2");
|
||||
else if (re2.test(w))
|
||||
w = w.replace(re2,"$1$2");
|
||||
|
||||
// Step 1b
|
||||
re = /^(.+?)eed$/;
|
||||
re2 = /^(.+?)(ed|ing)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(fp[1])) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
}
|
||||
else if (re2.test(w)) {
|
||||
var fp = re2.exec(w);
|
||||
stem = fp[1];
|
||||
re2 = new RegExp(s_v);
|
||||
if (re2.test(stem)) {
|
||||
w = stem;
|
||||
re2 = /(at|bl|iz)$/;
|
||||
re3 = new RegExp("([^aeiouylsz])\\1$");
|
||||
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||
if (re2.test(w))
|
||||
w = w + "e";
|
||||
else if (re3.test(w)) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
else if (re4.test(w))
|
||||
w = w + "e";
|
||||
}
|
||||
}
|
||||
|
||||
// Step 1c
|
||||
re = /^(.+?)y$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(s_v);
|
||||
if (re.test(stem))
|
||||
w = stem + "i";
|
||||
}
|
||||
|
||||
// Step 2
|
||||
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
suffix = fp[2];
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(stem))
|
||||
w = stem + step2list[suffix];
|
||||
}
|
||||
|
||||
// Step 3
|
||||
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
suffix = fp[2];
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(stem))
|
||||
w = stem + step3list[suffix];
|
||||
}
|
||||
|
||||
// Step 4
|
||||
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
|
||||
re2 = /^(.+?)(s|t)(ion)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(mgr1);
|
||||
if (re.test(stem))
|
||||
w = stem;
|
||||
}
|
||||
else if (re2.test(w)) {
|
||||
var fp = re2.exec(w);
|
||||
stem = fp[1] + fp[2];
|
||||
re2 = new RegExp(mgr1);
|
||||
if (re2.test(stem))
|
||||
w = stem;
|
||||
}
|
||||
|
||||
// Step 5
|
||||
re = /^(.+?)e$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(mgr1);
|
||||
re2 = new RegExp(meq1);
|
||||
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
|
||||
w = stem;
|
||||
}
|
||||
re = /ll$/;
|
||||
re2 = new RegExp(mgr1);
|
||||
if (re.test(w) && re2.test(w)) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
|
||||
// and turn initial Y back to y
|
||||
if (firstch == "y")
|
||||
w = firstch.toLowerCase() + w.substr(1);
|
||||
return w;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,197 +0,0 @@
|
||||
/**
|
||||
* Enhanced Search Main Entry Point
|
||||
* Loads search engine and page manager for enhanced search page
|
||||
* Does NOT interfere with default search behavior
|
||||
*/
|
||||
|
||||
// Prevent multiple initializations
|
||||
if (typeof window.EnhancedSearch !== 'undefined') {
|
||||
} else {
|
||||
|
||||
// Import modules (will be loaded dynamically)
|
||||
class EnhancedSearch {
|
||||
constructor(options = {}) {
|
||||
this.options = {
|
||||
placeholder: options.placeholder || 'Search documentation...',
|
||||
maxResults: options.maxResults || 20,
|
||||
minQueryLength: 2,
|
||||
highlightClass: 'search-highlight',
|
||||
...options
|
||||
};
|
||||
|
||||
this.isLoaded = false;
|
||||
|
||||
// Module instances
|
||||
this.documentLoader = null;
|
||||
this.searchEngine = null;
|
||||
this.searchPageManager = null;
|
||||
this.utils = null;
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
async init() {
|
||||
try {
|
||||
// Load required modules
|
||||
await this.loadModules();
|
||||
|
||||
// Initialize core modules
|
||||
this.utils = new Utils();
|
||||
this.documentLoader = new DocumentLoader();
|
||||
this.searchEngine = new SearchEngine(this.utils);
|
||||
|
||||
// Load documents and initialize search engine (always needed)
|
||||
await this.documentLoader.loadDocuments();
|
||||
await this.searchEngine.initialize(this.documentLoader.getDocuments());
|
||||
|
||||
// Check if we're on the search page
|
||||
const isSearchPage = this.isSearchPage();
|
||||
|
||||
if (isSearchPage) {
|
||||
this.searchPageManager = new SearchPageManager();
|
||||
}
|
||||
|
||||
this.isLoaded = true;
|
||||
} catch (error) {
|
||||
this.fallbackToDefaultSearch();
|
||||
}
|
||||
}
|
||||
|
||||
isSearchPage() {
|
||||
return window.location.pathname.includes('/search') ||
|
||||
window.location.pathname.includes('/search.html') ||
|
||||
window.location.pathname.endsWith('search/') ||
|
||||
document.querySelector('#enhanced-search-page-input') !== null ||
|
||||
document.querySelector('#enhanced-search-page-results') !== null;
|
||||
}
|
||||
|
||||
async loadModules() {
|
||||
const moduleNames = [
|
||||
'Utils',
|
||||
'DocumentLoader',
|
||||
'SearchEngine',
|
||||
'SearchPageManager'
|
||||
];
|
||||
|
||||
// Load modules with smart path resolution
|
||||
const modulePromises = moduleNames.map(name =>
|
||||
this.loadModuleWithFallback(name)
|
||||
);
|
||||
|
||||
await Promise.all(modulePromises);
|
||||
}
|
||||
|
||||
async loadModuleWithFallback(moduleName) {
|
||||
const possiblePaths = this.getModulePaths(moduleName);
|
||||
|
||||
for (const path of possiblePaths) {
|
||||
try {
|
||||
await this.loadModule(path);
|
||||
return;
|
||||
} catch (error) {
|
||||
// Continue to next path
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error(`Failed to load module ${moduleName} from any path`);
|
||||
}
|
||||
|
||||
getModulePaths(moduleName) {
|
||||
const fileName = `${moduleName}.js`;
|
||||
|
||||
// Calculate nesting level to determine correct _static path
|
||||
const pathParts = window.location.pathname.split('/').filter(part => part.length > 0);
|
||||
const htmlFile = pathParts[pathParts.length - 1];
|
||||
|
||||
// Remove the HTML file from the count if it exists
|
||||
let nestingLevel = pathParts.length;
|
||||
if (htmlFile && htmlFile.endsWith('.html')) {
|
||||
nestingLevel--;
|
||||
}
|
||||
|
||||
// Build the correct _static path based on nesting level
|
||||
const staticPrefix = nestingLevel > 0 ? '../'.repeat(nestingLevel) : './';
|
||||
const staticPath = `${staticPrefix}_static`;
|
||||
|
||||
// Search assets only has modules directory
|
||||
const moduleDir = 'modules';
|
||||
|
||||
// Generate paths in order of likelihood
|
||||
const paths = [];
|
||||
|
||||
// 1. Most likely path based on calculated nesting
|
||||
paths.push(`${staticPath}/${moduleDir}/${fileName}`);
|
||||
|
||||
// 2. Fallback static paths (for different nesting scenarios)
|
||||
paths.push(`_static/${moduleDir}/${fileName}`);
|
||||
paths.push(`./_static/${moduleDir}/${fileName}`);
|
||||
if (nestingLevel > 1) {
|
||||
paths.push(`../_static/${moduleDir}/${fileName}`);
|
||||
}
|
||||
|
||||
// 3. Legacy fallback paths
|
||||
paths.push(`./modules/${fileName}`);
|
||||
paths.push(`../modules/${fileName}`);
|
||||
paths.push(`modules/${fileName}`);
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
async loadModule(src) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const script = document.createElement('script');
|
||||
script.src = src;
|
||||
script.onload = resolve;
|
||||
script.onerror = () => reject(new Error(`Failed to load module: ${src}`));
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
}
|
||||
|
||||
// Public API methods
|
||||
search(query) {
|
||||
if (!this.searchEngine) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this.searchEngine.search(query);
|
||||
}
|
||||
|
||||
renderResults(results, query) {
|
||||
// Use SearchPageManager for search page rendering
|
||||
return '';
|
||||
}
|
||||
|
||||
fallbackToDefaultSearch() {
|
||||
// Don't interfere with default search - just fallback
|
||||
}
|
||||
|
||||
getDocuments() {
|
||||
return this.documentLoader ? this.documentLoader.getDocuments() : [];
|
||||
}
|
||||
|
||||
get documents() {
|
||||
return this.getDocuments();
|
||||
}
|
||||
|
||||
getSearchEngine() {
|
||||
return this.searchEngine;
|
||||
}
|
||||
|
||||
getOptions() {
|
||||
return this.options;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the enhanced search system
|
||||
window.EnhancedSearch = EnhancedSearch;
|
||||
|
||||
// Auto-initialize
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Create the global instance
|
||||
window.enhancedSearchInstance = new EnhancedSearch({
|
||||
placeholder: 'Search NVIDIA documentation...',
|
||||
maxResults: 50
|
||||
});
|
||||
});
|
||||
|
||||
} // End of duplicate prevention check
|
||||
|
Before Width: | Height: | Size: 90 B |
@@ -1,239 +0,0 @@
|
||||
/**
|
||||
* DocumentLoader Module
|
||||
* Handles loading and managing search documents from JSON index
|
||||
*/
|
||||
|
||||
class DocumentLoader {
|
||||
constructor() {
|
||||
this.documents = {};
|
||||
this.isLoaded = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load documents from JSON index files
|
||||
*/
|
||||
async loadDocuments() {
|
||||
try {
|
||||
const data = await this.fetchDocumentData();
|
||||
this.processDocuments(data);
|
||||
this.isLoaded = true;
|
||||
console.log(`✅ Document loader initialized with ${Object.keys(this.documents).length} documents`);
|
||||
} catch (error) {
|
||||
console.error('Failed to load search documents:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch document data from various possible paths
|
||||
*/
|
||||
async fetchDocumentData() {
|
||||
// Try different paths to account for different page depths
|
||||
const possiblePaths = [
|
||||
'./index.json',
|
||||
'../index.json',
|
||||
'../../index.json',
|
||||
'../../../index.json'
|
||||
];
|
||||
|
||||
for (const path of possiblePaths) {
|
||||
try {
|
||||
const response = await fetch(path);
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
console.log(`✅ Loaded search index from: ${path}`);
|
||||
return data;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`❌ Failed to load from ${path}: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error('Failed to load search data from any path');
|
||||
}
|
||||
|
||||
/**
|
||||
* Process and filter documents from raw data
|
||||
* Supports three formats:
|
||||
* 1. Array of documents (new format): [{ id, title, ... }, ...]
|
||||
* 2. Object with children (legacy): { children: [...] }
|
||||
* 3. Single document (fallback): { id, title, ... }
|
||||
*/
|
||||
processDocuments(data) {
|
||||
let allDocs;
|
||||
if (Array.isArray(data)) {
|
||||
// New format: root is an array of documents
|
||||
allDocs = data;
|
||||
} else if (data.children) {
|
||||
// Legacy format: object with children array
|
||||
allDocs = data.children;
|
||||
} else {
|
||||
// Fallback: single document
|
||||
allDocs = [data];
|
||||
}
|
||||
|
||||
// Filter out problematic documents
|
||||
const filteredDocs = allDocs.filter(doc => this.isValidDocument(doc));
|
||||
|
||||
// Store documents by ID
|
||||
filteredDocs.forEach(doc => {
|
||||
this.documents[doc.id] = this.sanitizeDocument(doc);
|
||||
});
|
||||
|
||||
console.log(`Processed ${filteredDocs.length} documents (filtered from ${allDocs.length} total)`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a document is valid for indexing
|
||||
*/
|
||||
isValidDocument(doc) {
|
||||
const docId = doc.id || '';
|
||||
return !docId.toLowerCase().includes('readme') &&
|
||||
!docId.startsWith('_') &&
|
||||
doc.title &&
|
||||
doc.content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize document content for safe indexing
|
||||
* Supports both new schema fields and legacy fields
|
||||
* Preserves dynamic facets as-is
|
||||
*/
|
||||
sanitizeDocument(doc) {
|
||||
const sanitized = {
|
||||
...doc,
|
||||
title: this.sanitizeText(doc.title, 200),
|
||||
// Add description as separate indexed field (for improved search relevance)
|
||||
description: this.sanitizeText(doc.description, 300),
|
||||
content: this.sanitizeText(doc.content, 5000),
|
||||
summary: this.sanitizeText(doc.summary, 500),
|
||||
headings: this.sanitizeHeadings(doc.headings),
|
||||
headings_text: this.sanitizeText(doc.headings_text, 1000),
|
||||
keywords: this.sanitizeArray(doc.keywords, 300),
|
||||
tags: this.sanitizeArray(doc.tags, 200),
|
||||
// Support both topics (new) and categories (legacy)
|
||||
topics: this.sanitizeArray(doc.topics || doc.categories, 200),
|
||||
// Support both audience (new) and personas (legacy)
|
||||
audience: this.sanitizeArray(doc.audience || doc.personas, 200),
|
||||
// Content type and difficulty
|
||||
content_type: this.sanitizeText(doc.content_type, 50),
|
||||
difficulty: this.sanitizeText(doc.difficulty, 50),
|
||||
doc_type: this.sanitizeText(doc.doc_type, 50),
|
||||
section_path: this.sanitizeArray(doc.section_path, 200),
|
||||
author: this.sanitizeText(doc.author, 100)
|
||||
};
|
||||
|
||||
// Preserve facets object (dynamic, user-defined keys)
|
||||
if (doc.facets && typeof doc.facets === 'object') {
|
||||
sanitized.facets = this.sanitizeFacets(doc.facets);
|
||||
}
|
||||
|
||||
// Preserve legacy flat modality if present and no facets.modality
|
||||
if (doc.modality && (!doc.facets || !doc.facets.modality)) {
|
||||
sanitized.modality = this.sanitizeText(doc.modality, 50);
|
||||
}
|
||||
|
||||
return sanitized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize facets object (dynamic keys with string or array values)
|
||||
*/
|
||||
sanitizeFacets(facets) {
|
||||
const sanitized = {};
|
||||
Object.entries(facets).forEach(([key, value]) => {
|
||||
if (Array.isArray(value)) {
|
||||
sanitized[key] = value.map(v => String(v).substring(0, 100));
|
||||
} else if (value) {
|
||||
sanitized[key] = String(value).substring(0, 100);
|
||||
}
|
||||
});
|
||||
return sanitized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize text content with length limits
|
||||
*/
|
||||
sanitizeText(text, maxLength) {
|
||||
if (!text || typeof text !== 'string') return '';
|
||||
return text.substring(0, maxLength);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize array content
|
||||
*/
|
||||
sanitizeArray(arr, maxLength) {
|
||||
if (!Array.isArray(arr)) return [];
|
||||
return arr.map(item => String(item)).join(' ').substring(0, maxLength);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize headings array
|
||||
*/
|
||||
sanitizeHeadings(headings) {
|
||||
if (!Array.isArray(headings)) return [];
|
||||
return headings.map(heading => ({
|
||||
text: this.sanitizeText(heading.text, 200),
|
||||
level: Number(heading.level) || 1
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all loaded documents
|
||||
*/
|
||||
getDocuments() {
|
||||
return this.documents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific document by ID
|
||||
*/
|
||||
getDocument(id) {
|
||||
return this.documents[id];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get document count
|
||||
*/
|
||||
getDocumentCount() {
|
||||
return Object.keys(this.documents).length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if documents are loaded
|
||||
*/
|
||||
isReady() {
|
||||
return this.isLoaded && Object.keys(this.documents).length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get documents as array for indexing
|
||||
*/
|
||||
getDocumentsArray() {
|
||||
return Object.values(this.documents);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter documents by criteria
|
||||
*/
|
||||
filterDocuments(filterFn) {
|
||||
return this.getDocumentsArray().filter(filterFn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get document statistics
|
||||
*/
|
||||
getStatistics() {
|
||||
const docs = this.getDocumentsArray();
|
||||
return {
|
||||
totalDocuments: docs.length,
|
||||
documentsWithSummary: docs.filter(d => d.summary).length,
|
||||
documentsWithHeadings: docs.filter(d => d.headings && d.headings.length > 0).length,
|
||||
documentsWithTags: docs.filter(d => d.tags && d.tags.length > 0).length,
|
||||
averageContentLength: docs.reduce((sum, d) => sum + (d.content?.length || 0), 0) / docs.length
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Make DocumentLoader available globally
|
||||
window.DocumentLoader = DocumentLoader;
|
||||
@@ -1,298 +0,0 @@
|
||||
/**
|
||||
* EventHandler Module
|
||||
* Handles keyboard shortcuts and event management for the search interface
|
||||
*/
|
||||
|
||||
class EventHandler {
|
||||
constructor(enhancedSearch) {
|
||||
this.enhancedSearch = enhancedSearch;
|
||||
this.searchInterface = enhancedSearch.searchInterface;
|
||||
this.resultRenderer = enhancedSearch.resultRenderer;
|
||||
this.searchEngine = enhancedSearch.searchEngine;
|
||||
this.utils = enhancedSearch.utils;
|
||||
|
||||
// Track bound event listeners for cleanup
|
||||
this.boundListeners = new Map();
|
||||
|
||||
// Debounced search function
|
||||
this.debouncedSearch = this.utils.debounce(this.handleSearch.bind(this), 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind all event listeners
|
||||
*/
|
||||
bindEvents() {
|
||||
this.bindInputEvents();
|
||||
this.bindModalEvents();
|
||||
this.bindGlobalEvents();
|
||||
console.log('✅ Event handlers bound');
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind input-related events
|
||||
*/
|
||||
bindInputEvents() {
|
||||
const input = this.searchInterface.getInput();
|
||||
if (!input) return;
|
||||
|
||||
// Search input
|
||||
const inputHandler = (e) => this.debouncedSearch(e);
|
||||
input.addEventListener('input', inputHandler);
|
||||
this.boundListeners.set('input', inputHandler);
|
||||
|
||||
// Keyboard navigation
|
||||
const keydownHandler = (e) => this.handleKeyDown(e);
|
||||
input.addEventListener('keydown', keydownHandler);
|
||||
this.boundListeners.set('keydown', keydownHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind page-specific events (replaces modal events)
|
||||
*/
|
||||
bindModalEvents() {
|
||||
// Check if we're on the search page
|
||||
if (!this.searchInterface.isSearchPage()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get query parameter if we're on search page
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const query = urlParams.get('q');
|
||||
|
||||
if (query) {
|
||||
// Perform search immediately with the query from URL
|
||||
setTimeout(() => {
|
||||
const input = this.searchInterface.getInput();
|
||||
if (input) {
|
||||
input.value = query;
|
||||
this.handleSearch({ target: input });
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind global keyboard shortcuts
|
||||
*/
|
||||
bindGlobalEvents() {
|
||||
const globalKeyHandler = (e) => {
|
||||
// Ctrl+K or Cmd+K to focus search input
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'k') {
|
||||
e.preventDefault();
|
||||
// Focus the search input if we're on the search page
|
||||
const searchInput = this.searchInterface.getInput();
|
||||
if (searchInput) {
|
||||
searchInput.focus();
|
||||
} else {
|
||||
// If not on search page, redirect to search page
|
||||
window.location.href = 'search.html';
|
||||
}
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('keydown', globalKeyHandler);
|
||||
this.boundListeners.set('global', globalKeyHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle search input
|
||||
*/
|
||||
async handleSearch(event) {
|
||||
const query = event.target.value.trim();
|
||||
const resultsContainer = this.searchInterface.getResultsContainer();
|
||||
|
||||
if (query.length < this.enhancedSearch.options.minQueryLength) {
|
||||
this.searchInterface.showEmptyState();
|
||||
this.searchInterface.clearStats();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Show loading state
|
||||
this.resultRenderer.renderLoading(resultsContainer);
|
||||
|
||||
// Perform search
|
||||
const results = this.searchEngine.search(query, this.enhancedSearch.options.maxResults);
|
||||
const count = results.length;
|
||||
|
||||
// Render results
|
||||
this.resultRenderer.render(results, query, resultsContainer);
|
||||
|
||||
// Update stats
|
||||
this.searchInterface.updateStats(query, count);
|
||||
|
||||
// Emit search event for AI Assistant extension if available
|
||||
this.emitSearchEvent(query, results, count);
|
||||
|
||||
} catch (error) {
|
||||
console.error('Search error:', error);
|
||||
this.resultRenderer.renderError(resultsContainer, 'Search temporarily unavailable');
|
||||
this.searchInterface.clearStats();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle keyboard navigation
|
||||
*/
|
||||
handleKeyDown(event) {
|
||||
const resultsContainer = this.searchInterface.getResultsContainer();
|
||||
|
||||
switch (event.key) {
|
||||
case 'ArrowDown':
|
||||
event.preventDefault();
|
||||
this.resultRenderer.selectNext(resultsContainer);
|
||||
break;
|
||||
|
||||
case 'ArrowUp':
|
||||
event.preventDefault();
|
||||
this.resultRenderer.selectPrevious(resultsContainer);
|
||||
break;
|
||||
|
||||
case 'Enter':
|
||||
event.preventDefault();
|
||||
this.resultRenderer.activateSelected(resultsContainer);
|
||||
break;
|
||||
|
||||
case 'Escape':
|
||||
event.preventDefault();
|
||||
this.enhancedSearch.hide();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit search event for other extensions
|
||||
*/
|
||||
emitSearchEvent(query, results, count) {
|
||||
if (window.AIAssistant && window.aiAssistantInstance) {
|
||||
const searchEvent = new CustomEvent('enhanced-search-results', {
|
||||
detail: { query, results, count }
|
||||
});
|
||||
document.dispatchEvent(searchEvent);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle window resize
|
||||
*/
|
||||
handleResize() {
|
||||
// Adjust modal positioning if needed
|
||||
const modal = this.searchInterface.getModal();
|
||||
if (modal && this.searchInterface.isModalVisible()) {
|
||||
// Could add responsive adjustments here
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle focus management
|
||||
*/
|
||||
handleFocus(event) {
|
||||
// Trap focus within modal when visible
|
||||
if (this.searchInterface.isModalVisible()) {
|
||||
const modal = this.searchInterface.getModal();
|
||||
const focusableElements = modal.querySelectorAll(
|
||||
'button, input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
||||
);
|
||||
|
||||
const firstFocusable = focusableElements[0];
|
||||
const lastFocusable = focusableElements[focusableElements.length - 1];
|
||||
|
||||
if (event.key === 'Tab') {
|
||||
if (event.shiftKey) {
|
||||
// Shift + Tab
|
||||
if (document.activeElement === firstFocusable) {
|
||||
event.preventDefault();
|
||||
lastFocusable.focus();
|
||||
}
|
||||
} else {
|
||||
// Tab
|
||||
if (document.activeElement === lastFocusable) {
|
||||
event.preventDefault();
|
||||
firstFocusable.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind additional event listeners
|
||||
*/
|
||||
bindAdditionalEvents() {
|
||||
// Window resize
|
||||
const resizeHandler = this.utils.debounce(() => this.handleResize(), 100);
|
||||
window.addEventListener('resize', resizeHandler);
|
||||
this.boundListeners.set('resize', resizeHandler);
|
||||
|
||||
// Focus trap
|
||||
const focusHandler = (e) => this.handleFocus(e);
|
||||
document.addEventListener('keydown', focusHandler);
|
||||
this.boundListeners.set('focus', focusHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unbind all event listeners
|
||||
*/
|
||||
unbindEvents() {
|
||||
// Remove input events
|
||||
const input = this.searchInterface.getInput();
|
||||
if (input && this.boundListeners.has('input')) {
|
||||
input.removeEventListener('input', this.boundListeners.get('input'));
|
||||
input.removeEventListener('keydown', this.boundListeners.get('keydown'));
|
||||
}
|
||||
|
||||
// Remove modal events
|
||||
const closeBtn = this.searchInterface.getCloseButton();
|
||||
if (closeBtn && this.boundListeners.has('close')) {
|
||||
closeBtn.removeEventListener('click', this.boundListeners.get('close'));
|
||||
}
|
||||
|
||||
const backdrop = this.searchInterface.getBackdrop();
|
||||
if (backdrop && this.boundListeners.has('backdrop')) {
|
||||
backdrop.removeEventListener('click', this.boundListeners.get('backdrop'));
|
||||
}
|
||||
|
||||
// Remove global events
|
||||
if (this.boundListeners.has('global')) {
|
||||
document.removeEventListener('keydown', this.boundListeners.get('global'));
|
||||
}
|
||||
|
||||
if (this.boundListeners.has('resize')) {
|
||||
window.removeEventListener('resize', this.boundListeners.get('resize'));
|
||||
}
|
||||
|
||||
if (this.boundListeners.has('focus')) {
|
||||
document.removeEventListener('keydown', this.boundListeners.get('focus'));
|
||||
}
|
||||
|
||||
// Clear listeners map
|
||||
this.boundListeners.clear();
|
||||
|
||||
console.log('✅ Event handlers unbound');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get event handler statistics
|
||||
*/
|
||||
getStatistics() {
|
||||
return {
|
||||
boundListeners: this.boundListeners.size,
|
||||
modalVisible: this.searchInterface.isModalVisible(),
|
||||
hasInput: !!this.searchInterface.getInput(),
|
||||
hasModal: !!this.searchInterface.getModal()
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if events are properly bound
|
||||
*/
|
||||
isReady() {
|
||||
return this.boundListeners.size > 0 &&
|
||||
this.searchInterface.getInput() !== null &&
|
||||
this.searchInterface.getModal() !== null;
|
||||
}
|
||||
}
|
||||
|
||||
// Make EventHandler available globally
|
||||
window.EventHandler = EventHandler;
|
||||
@@ -1,263 +0,0 @@
|
||||
/**
|
||||
* ResultRenderer Module
|
||||
* Handles rendering of search results in the interface
|
||||
*/
|
||||
|
||||
class ResultRenderer {
|
||||
constructor(options, utils) {
|
||||
this.options = options;
|
||||
this.utils = utils;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render search results
|
||||
*/
|
||||
render(results, query, container) {
|
||||
if (!container) {
|
||||
console.warn('No container provided for rendering results');
|
||||
return;
|
||||
}
|
||||
|
||||
if (results.length === 0) {
|
||||
container.innerHTML = this.renderNoResults(query);
|
||||
return;
|
||||
}
|
||||
|
||||
const html = results.map((result, index) => {
|
||||
const isSelected = index === 0;
|
||||
return this.renderResultItem(result, query, isSelected);
|
||||
}).join('');
|
||||
|
||||
container.innerHTML = `<div class="search-results-list">${html}</div>`;
|
||||
|
||||
// Bind click events
|
||||
this.bindResultEvents(container, results);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a single result item
|
||||
*/
|
||||
renderResultItem(result, query, isSelected = false) {
|
||||
const title = this.utils.highlightText(result.title || 'Untitled', query);
|
||||
const summary = this.utils.highlightText(result.summary || result.content?.substring(0, 200) || '', query);
|
||||
const breadcrumb = this.utils.generateBreadcrumb(result.id);
|
||||
|
||||
// Render matching sections
|
||||
const sectionsHtml = this.renderMatchingSections(result, query);
|
||||
|
||||
// Show multiple matches indicator
|
||||
const multipleMatchesIndicator = result.totalMatches > 1
|
||||
? `<span class="search-result-matches-count">${result.totalMatches} matches</span>`
|
||||
: '';
|
||||
|
||||
return `
|
||||
<div class="search-result-item ${isSelected ? 'selected' : ''}" tabindex="0" data-url="${this.utils.getDocumentUrl(result)}">
|
||||
<div class="search-result-content">
|
||||
<div class="search-result-title">${title} ${multipleMatchesIndicator}</div>
|
||||
<div class="search-result-summary">${summary}...</div>
|
||||
${sectionsHtml}
|
||||
<div class="search-result-meta">
|
||||
<span class="search-result-breadcrumb">${breadcrumb}</span>
|
||||
${result.tags ? `<span class="search-result-tags">${this.utils.safeArray(result.tags).slice(0, 3).map(tag => `<span class="tag">${tag}</span>`).join('')}</span>` : ''}
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-result-score">
|
||||
<i class="fa-solid fa-arrow-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render matching sections within a result
|
||||
*/
|
||||
renderMatchingSections(result, query) {
|
||||
if (!result.matchingSections || result.matchingSections.length <= 1) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Show only the first few sections to avoid overwhelming
|
||||
const sectionsToShow = result.matchingSections.slice(0, 4);
|
||||
const hasMore = result.matchingSections.length > 4;
|
||||
|
||||
const sectionsHtml = sectionsToShow.map(section => {
|
||||
const icon = this.utils.getSectionIcon(section.type, section.level);
|
||||
const sectionText = this.utils.highlightText(section.text, query);
|
||||
const anchor = section.anchor ? `#${section.anchor}` : '';
|
||||
|
||||
return `
|
||||
<div class="search-result-section" data-anchor="${anchor}">
|
||||
${icon} <span class="section-text">${sectionText}</span>
|
||||
</div>
|
||||
`;
|
||||
}).join('');
|
||||
|
||||
const moreIndicator = hasMore
|
||||
? `<div class="search-result-section-more">+${result.matchingSections.length - 4} more sections</div>`
|
||||
: '';
|
||||
|
||||
return `
|
||||
<div class="search-result-sections">
|
||||
${sectionsHtml}
|
||||
${moreIndicator}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render no results state
|
||||
*/
|
||||
renderNoResults(query) {
|
||||
return `
|
||||
<div class="search-no-results">
|
||||
<i class="fa-solid fa-search-minus"></i>
|
||||
<p>No results found for "<strong>${this.utils.escapeHtml(query)}</strong>"</p>
|
||||
<div class="search-suggestions">
|
||||
<strong>Try:</strong>
|
||||
<ul>
|
||||
<li>Checking for typos</li>
|
||||
<li>Using different or more general terms</li>
|
||||
<li>Using fewer keywords</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind click events to result items
|
||||
*/
|
||||
bindResultEvents(container, results) {
|
||||
container.querySelectorAll('.search-result-item').forEach((item, index) => {
|
||||
const result = results[index];
|
||||
|
||||
// Main item click - go to document
|
||||
item.addEventListener('click', (e) => {
|
||||
// Don't trigger if clicking on a section
|
||||
if (e.target.closest('.search-result-section')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const url = item.dataset.url;
|
||||
window.location.href = url;
|
||||
});
|
||||
|
||||
// Section clicks - go to specific section
|
||||
item.querySelectorAll('.search-result-section').forEach(sectionEl => {
|
||||
sectionEl.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
const anchor = sectionEl.dataset.anchor;
|
||||
const baseUrl = item.dataset.url;
|
||||
window.location.href = baseUrl + anchor;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get result items from container
|
||||
*/
|
||||
getResultItems(container) {
|
||||
return container.querySelectorAll('.search-result-item');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get selected result item
|
||||
*/
|
||||
getSelectedResult(container) {
|
||||
return container.querySelector('.search-result-item.selected');
|
||||
}
|
||||
|
||||
/**
|
||||
* Select next result item
|
||||
*/
|
||||
selectNext(container) {
|
||||
const results = this.getResultItems(container);
|
||||
const selected = this.getSelectedResult(container);
|
||||
|
||||
if (results.length === 0) return;
|
||||
|
||||
if (!selected) {
|
||||
results[0].classList.add('selected');
|
||||
return;
|
||||
}
|
||||
|
||||
const currentIndex = Array.from(results).indexOf(selected);
|
||||
selected.classList.remove('selected');
|
||||
|
||||
const nextIndex = (currentIndex + 1) % results.length;
|
||||
results[nextIndex].classList.add('selected');
|
||||
results[nextIndex].scrollIntoView({ block: 'nearest' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Select previous result item
|
||||
*/
|
||||
selectPrevious(container) {
|
||||
const results = this.getResultItems(container);
|
||||
const selected = this.getSelectedResult(container);
|
||||
|
||||
if (results.length === 0) return;
|
||||
|
||||
if (!selected) {
|
||||
results[results.length - 1].classList.add('selected');
|
||||
return;
|
||||
}
|
||||
|
||||
const currentIndex = Array.from(results).indexOf(selected);
|
||||
selected.classList.remove('selected');
|
||||
|
||||
const prevIndex = currentIndex === 0 ? results.length - 1 : currentIndex - 1;
|
||||
results[prevIndex].classList.add('selected');
|
||||
results[prevIndex].scrollIntoView({ block: 'nearest' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate selected result
|
||||
*/
|
||||
activateSelected(container) {
|
||||
const selected = this.getSelectedResult(container);
|
||||
if (selected) {
|
||||
selected.click();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all selections
|
||||
*/
|
||||
clearSelection(container) {
|
||||
const results = this.getResultItems(container);
|
||||
results.forEach(result => result.classList.remove('selected'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render loading state
|
||||
*/
|
||||
renderLoading(container) {
|
||||
if (container) {
|
||||
container.innerHTML = `
|
||||
<div class="search-loading">
|
||||
<i class="fa-solid fa-spinner fa-spin"></i>
|
||||
<p>Searching...</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render error state
|
||||
*/
|
||||
renderError(container, message = 'Search error occurred') {
|
||||
if (container) {
|
||||
container.innerHTML = `
|
||||
<div class="search-error">
|
||||
<i class="fa-solid fa-exclamation-triangle"></i>
|
||||
<p>${this.utils.escapeHtml(message)}</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make ResultRenderer available globally
|
||||
window.ResultRenderer = ResultRenderer;
|
||||
@@ -1,817 +0,0 @@
|
||||
/**
|
||||
* SearchEngine Module
|
||||
* Handles Lunr.js integration and search logic with filtering and grouping
|
||||
*/
|
||||
|
||||
class SearchEngine {
|
||||
constructor(utils) {
|
||||
this.utils = utils;
|
||||
this.index = null;
|
||||
this.documents = {};
|
||||
this.isInitialized = false;
|
||||
// Support both new schema (topics, audience) and legacy (categories, personas)
|
||||
this.topics = new Set();
|
||||
this.tags = new Set();
|
||||
this.documentTypes = new Set();
|
||||
this.audience = new Set();
|
||||
this.difficulties = new Set();
|
||||
// Dynamic facets - discovered from documents, not predefined
|
||||
this.facets = {}; // { facetKey: Set of values }
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the search engine with documents
|
||||
*/
|
||||
async initialize(documents) {
|
||||
try {
|
||||
await this.loadLunr();
|
||||
this.documents = documents;
|
||||
this.collectMetadata();
|
||||
this.buildIndex();
|
||||
this.isInitialized = true;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect metadata for filtering using actual frontmatter values
|
||||
* Supports both new schema (topics, audience) and legacy (categories, personas)
|
||||
* Dynamically discovers all facet keys from documents
|
||||
*/
|
||||
collectMetadata() {
|
||||
// Clear existing sets
|
||||
this.topics = new Set();
|
||||
this.tags = new Set();
|
||||
this.documentTypes = new Set();
|
||||
this.audience = new Set();
|
||||
this.difficulties = new Set();
|
||||
this.facets = {}; // Reset dynamic facets
|
||||
|
||||
Object.values(this.documents).forEach(doc => {
|
||||
// Collect topics (new schema) or categories (legacy)
|
||||
const topicsField = doc.topics || doc.categories;
|
||||
if (topicsField) {
|
||||
if (Array.isArray(topicsField)) {
|
||||
topicsField.forEach(topic => this.topics.add(topic));
|
||||
} else if (typeof topicsField === 'string') {
|
||||
topicsField.split(',').forEach(topic => this.topics.add(topic.trim()));
|
||||
}
|
||||
}
|
||||
|
||||
// Collect actual frontmatter tags
|
||||
if (doc.tags) {
|
||||
if (Array.isArray(doc.tags)) {
|
||||
doc.tags.forEach(tag => {
|
||||
// Split space-separated tags and add individually
|
||||
if (typeof tag === 'string' && tag.includes(' ')) {
|
||||
tag.split(' ').forEach(individualTag => {
|
||||
if (individualTag.trim()) {
|
||||
this.tags.add(individualTag.trim());
|
||||
}
|
||||
});
|
||||
} else if (tag && tag.trim()) {
|
||||
this.tags.add(tag.trim());
|
||||
}
|
||||
});
|
||||
} else if (typeof doc.tags === 'string') {
|
||||
// Handle both comma-separated and space-separated tags
|
||||
const allTags = doc.tags.includes(',')
|
||||
? doc.tags.split(',')
|
||||
: doc.tags.split(' ');
|
||||
|
||||
allTags.forEach(tag => {
|
||||
if (tag && tag.trim()) {
|
||||
this.tags.add(tag.trim());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Use actual content_type from frontmatter (not calculated doc_type)
|
||||
if (doc.content_type) {
|
||||
this.documentTypes.add(doc.content_type);
|
||||
}
|
||||
|
||||
// Collect audience (new schema) or personas (legacy)
|
||||
const audienceField = doc.audience || doc.personas;
|
||||
if (audienceField) {
|
||||
if (Array.isArray(audienceField)) {
|
||||
audienceField.forEach(aud => this.audience.add(aud));
|
||||
} else if (typeof audienceField === 'string') {
|
||||
this.audience.add(audienceField);
|
||||
}
|
||||
}
|
||||
|
||||
if (doc.difficulty) {
|
||||
this.difficulties.add(doc.difficulty);
|
||||
}
|
||||
|
||||
// Dynamically discover all facets from documents
|
||||
if (doc.facets && typeof doc.facets === 'object') {
|
||||
Object.entries(doc.facets).forEach(([facetKey, facetValue]) => {
|
||||
// Initialize Set for this facet if not exists
|
||||
if (!this.facets[facetKey]) {
|
||||
this.facets[facetKey] = new Set();
|
||||
}
|
||||
// Add value(s) to the facet Set
|
||||
if (Array.isArray(facetValue)) {
|
||||
facetValue.forEach(v => this.facets[facetKey].add(v));
|
||||
} else if (facetValue) {
|
||||
this.facets[facetKey].add(facetValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Also check for flat facet fields (legacy modality, etc.)
|
||||
// These get added to facets dynamically
|
||||
if (doc.modality && !this.facets.modality) {
|
||||
this.facets.modality = new Set();
|
||||
}
|
||||
if (doc.modality) {
|
||||
this.facets.modality.add(doc.modality);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get available filter options using actual frontmatter taxonomy
|
||||
* Returns both new field names and legacy names for backwards compatibility
|
||||
* Includes dynamically discovered facets
|
||||
*/
|
||||
getFilterOptions() {
|
||||
// Convert dynamic facets from Sets to sorted arrays
|
||||
const facetOptions = {};
|
||||
Object.entries(this.facets).forEach(([facetKey, facetSet]) => {
|
||||
facetOptions[facetKey] = Array.from(facetSet).sort();
|
||||
});
|
||||
|
||||
return {
|
||||
// New schema names
|
||||
topics: Array.from(this.topics).sort(),
|
||||
audience: Array.from(this.audience).sort(),
|
||||
// Legacy names (aliases for backwards compatibility)
|
||||
categories: Array.from(this.topics).sort(),
|
||||
personas: Array.from(this.audience).sort(),
|
||||
// Common fields
|
||||
tags: Array.from(this.tags).sort(),
|
||||
documentTypes: Array.from(this.documentTypes).sort(),
|
||||
difficulties: Array.from(this.difficulties).sort(),
|
||||
// Dynamic facets (user-defined, discovered from documents)
|
||||
facets: facetOptions
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Lunr.js library if not already loaded
|
||||
*/
|
||||
async loadLunr() {
|
||||
if (typeof lunr === 'undefined') {
|
||||
await this.utils.loadScript('https://unpkg.com/lunr@2.3.9/lunr.min.js');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Lunr search index
|
||||
* Supports both new schema (topics, audience) and legacy (categories, personas)
|
||||
*
|
||||
* Field boosting rationale:
|
||||
* - Title matches are almost always what users want (highest boost)
|
||||
* - Description (from frontmatter) is hand-crafted summary (high boost)
|
||||
* - Headings provide structural relevance (medium-high boost)
|
||||
* - Content gets lowest boost to prevent long documents from dominating
|
||||
* - Hierarchy: title > description > headings/keywords > tags > content
|
||||
*/
|
||||
buildIndex() {
|
||||
const documentsArray = Object.values(this.documents);
|
||||
const self = this;
|
||||
|
||||
this.index = lunr(function() {
|
||||
// Define fields with optimized boosting for documentation search patterns
|
||||
this.ref('id');
|
||||
|
||||
// Primary fields - highest relevance
|
||||
this.field('title', { boost: 10 }); // Title matches most important
|
||||
this.field('description', { boost: 8 }); // Frontmatter description (hand-crafted)
|
||||
|
||||
// Secondary fields - structural relevance
|
||||
this.field('keywords', { boost: 7 }); // Explicit keywords
|
||||
this.field('headings_text', { boost: 5 }); // Section headings
|
||||
this.field('headings', { boost: 5 }); // Section headings (legacy format)
|
||||
this.field('tags', { boost: 4 }); // Taxonomy tags
|
||||
|
||||
// Tertiary fields - content matching
|
||||
this.field('summary', { boost: 3 }); // Summary field
|
||||
this.field('topics', { boost: 2 }); // Topic categorization
|
||||
this.field('content', { boost: 1 }); // Full content (low to prevent long docs dominating)
|
||||
|
||||
// Metadata fields - filtering support
|
||||
this.field('content_type', { boost: 1 });
|
||||
this.field('audience', { boost: 1 });
|
||||
this.field('difficulty', { boost: 1 });
|
||||
this.field('modality', { boost: 1 });
|
||||
this.field('section_path', { boost: 1 });
|
||||
this.field('author', { boost: 1 });
|
||||
|
||||
// Add documents to index
|
||||
documentsArray.forEach((doc) => {
|
||||
try {
|
||||
this.add({
|
||||
id: doc.id,
|
||||
title: doc.title || '',
|
||||
description: doc.description || '', // NEW: separate indexed field
|
||||
content: (doc.content || '').substring(0, 5000), // Limit content length
|
||||
summary: doc.summary || '',
|
||||
headings: self.extractHeadingsText(doc.headings),
|
||||
headings_text: doc.headings_text || '',
|
||||
keywords: self.arrayToString(doc.keywords),
|
||||
tags: self.arrayToString(doc.tags),
|
||||
// Support both topics (new) and categories (legacy)
|
||||
topics: self.arrayToString(doc.topics || doc.categories),
|
||||
content_type: doc.content_type || '',
|
||||
// Support both audience (new) and personas (legacy)
|
||||
audience: self.arrayToString(doc.audience || doc.personas),
|
||||
difficulty: doc.difficulty || '',
|
||||
modality: doc.modality || '',
|
||||
section_path: self.arrayToString(doc.section_path),
|
||||
author: doc.author || ''
|
||||
});
|
||||
} catch (docError) {
|
||||
// Skip documents that fail to index
|
||||
}
|
||||
}, this);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert array to string for indexing
|
||||
*/
|
||||
arrayToString(arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
return arr.join(' ');
|
||||
}
|
||||
return arr || '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract text from headings array
|
||||
*/
|
||||
extractHeadingsText(headings) {
|
||||
if (!Array.isArray(headings)) return '';
|
||||
return headings.map(h => h.text || '').join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform search with query and optional filters
|
||||
*/
|
||||
search(query, filters = {}, maxResults = 20) {
|
||||
if (!this.isInitialized || !this.index) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!query || query.trim().length < 2) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
// Enhanced search with multiple strategies
|
||||
const results = this.performMultiStrategySearch(query);
|
||||
|
||||
// Process and enhance results
|
||||
const enhancedResults = this.enhanceResults(results, query);
|
||||
|
||||
// Apply filters
|
||||
const filteredResults = this.applyFilters(enhancedResults, filters);
|
||||
|
||||
// Group and rank results
|
||||
const groupedResults = this.groupResultsByDocument(filteredResults, query);
|
||||
|
||||
return groupedResults.slice(0, maxResults);
|
||||
|
||||
} catch (error) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply filters to search results
|
||||
* Supports both new schema (topic, audience) and legacy (category, persona) filter names
|
||||
* Handles dynamic facet filters
|
||||
*/
|
||||
applyFilters(results, filters) {
|
||||
return results.filter(result => {
|
||||
// Topic filter (new) or category filter (legacy)
|
||||
const topicFilter = filters.topic || filters.category;
|
||||
if (topicFilter && topicFilter !== '') {
|
||||
const docTopics = this.getDocumentTopics(result);
|
||||
if (!docTopics.includes(topicFilter)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Tag filter
|
||||
if (filters.tag && filters.tag !== '') {
|
||||
const docTags = this.getDocumentTags(result);
|
||||
if (!docTags.includes(filters.tag)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Document type filter (using actual frontmatter content_type)
|
||||
if (filters.type && filters.type !== '') {
|
||||
if (result.content_type !== filters.type) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Audience filter (new) or persona filter (legacy)
|
||||
const audienceFilter = filters.audience || filters.persona;
|
||||
if (audienceFilter && audienceFilter !== '') {
|
||||
const docAudience = this.getDocumentAudience(result);
|
||||
if (!docAudience.includes(audienceFilter)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Difficulty filter
|
||||
if (filters.difficulty && filters.difficulty !== '') {
|
||||
if (result.difficulty !== filters.difficulty) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Dynamic facet filters (e.g., filters.facets = { modality: 'text-only', framework: 'pytorch' })
|
||||
if (filters.facets && typeof filters.facets === 'object') {
|
||||
for (const [facetKey, facetValue] of Object.entries(filters.facets)) {
|
||||
if (facetValue && facetValue !== '') {
|
||||
const docFacetValue = this.getDocumentFacet(result, facetKey);
|
||||
if (!docFacetValue.includes(facetValue)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Legacy flat facet filters (e.g., filters.modality directly)
|
||||
// Check for any filter key that matches a known facet
|
||||
for (const facetKey of Object.keys(this.facets)) {
|
||||
if (filters[facetKey] && filters[facetKey] !== '') {
|
||||
const docFacetValue = this.getDocumentFacet(result, facetKey);
|
||||
if (!docFacetValue.includes(filters[facetKey])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific facet value for a document
|
||||
*/
|
||||
getDocumentFacet(doc, facetKey) {
|
||||
// Check nested facets object first
|
||||
if (doc.facets && doc.facets[facetKey]) {
|
||||
const value = doc.facets[facetKey];
|
||||
return Array.isArray(value) ? value : [value];
|
||||
}
|
||||
// Check flat field (legacy)
|
||||
if (doc[facetKey]) {
|
||||
const value = doc[facetKey];
|
||||
return Array.isArray(value) ? value : [value];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get topics for a document (supports new schema and legacy categories)
|
||||
*/
|
||||
getDocumentTopics(doc) {
|
||||
const topics = [];
|
||||
|
||||
// From explicit topics (new schema) or categories (legacy)
|
||||
const topicsField = doc.topics || doc.categories;
|
||||
if (topicsField) {
|
||||
if (Array.isArray(topicsField)) {
|
||||
topics.push(...topicsField);
|
||||
} else {
|
||||
topics.push(...topicsField.split(',').map(t => t.trim()));
|
||||
}
|
||||
}
|
||||
|
||||
// From section path
|
||||
if (doc.section_path && Array.isArray(doc.section_path)) {
|
||||
topics.push(...doc.section_path);
|
||||
}
|
||||
|
||||
// From document ID path
|
||||
if (doc.id) {
|
||||
const pathParts = doc.id.split('/').filter(part => part && part !== 'index');
|
||||
topics.push(...pathParts);
|
||||
}
|
||||
|
||||
return [...new Set(topics)]; // Remove duplicates
|
||||
}
|
||||
|
||||
/**
|
||||
* Get categories for a document (legacy alias for getDocumentTopics)
|
||||
*/
|
||||
getDocumentCategories(doc) {
|
||||
return this.getDocumentTopics(doc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tags for a document
|
||||
*/
|
||||
getDocumentTags(doc) {
|
||||
if (!doc.tags) return [];
|
||||
|
||||
if (Array.isArray(doc.tags)) {
|
||||
// Handle array of tags that might contain space-separated strings
|
||||
const flatTags = [];
|
||||
doc.tags.forEach(tag => {
|
||||
if (typeof tag === 'string' && tag.includes(' ')) {
|
||||
// Split space-separated tags
|
||||
tag.split(' ').forEach(individualTag => {
|
||||
if (individualTag.trim()) {
|
||||
flatTags.push(individualTag.trim());
|
||||
}
|
||||
});
|
||||
} else if (tag && tag.trim()) {
|
||||
flatTags.push(tag.trim());
|
||||
}
|
||||
});
|
||||
return flatTags;
|
||||
}
|
||||
|
||||
// Handle string tags - check for both comma and space separation
|
||||
if (typeof doc.tags === 'string') {
|
||||
const allTags = [];
|
||||
const tagString = doc.tags.trim();
|
||||
|
||||
if (tagString.includes(',')) {
|
||||
// Comma-separated tags
|
||||
tagString.split(',').forEach(tag => {
|
||||
if (tag.trim()) {
|
||||
allTags.push(tag.trim());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Space-separated tags
|
||||
tagString.split(' ').forEach(tag => {
|
||||
if (tag.trim()) {
|
||||
allTags.push(tag.trim());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return allTags;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get audience for a document (supports new schema and legacy personas)
|
||||
*/
|
||||
getDocumentAudience(doc) {
|
||||
// Support both audience (new) and personas (legacy)
|
||||
const audienceField = doc.audience || doc.personas;
|
||||
if (!audienceField) return [];
|
||||
|
||||
if (Array.isArray(audienceField)) {
|
||||
return audienceField;
|
||||
}
|
||||
|
||||
return [audienceField];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get personas for a document (legacy alias for getDocumentAudience)
|
||||
*/
|
||||
getDocumentPersonas(doc) {
|
||||
return this.getDocumentAudience(doc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform search with multiple strategies
|
||||
*/
|
||||
performMultiStrategySearch(query) {
|
||||
const strategies = [
|
||||
// Exact phrase search with wildcards
|
||||
`"${query}" ${query}*`,
|
||||
// Fuzzy search with wildcards
|
||||
`${query}* ${query}~2`,
|
||||
// Individual terms with boost
|
||||
query.split(/\s+/).map(term => `${term}*`).join(' '),
|
||||
// Fallback: just the query
|
||||
query
|
||||
];
|
||||
|
||||
let allResults = [];
|
||||
const seenIds = new Set();
|
||||
|
||||
for (const strategy of strategies) {
|
||||
try {
|
||||
const results = this.index.search(strategy);
|
||||
|
||||
// Add new results (avoid duplicates)
|
||||
results.forEach(result => {
|
||||
if (!seenIds.has(result.ref)) {
|
||||
seenIds.add(result.ref);
|
||||
allResults.push({
|
||||
...result,
|
||||
strategy: strategy
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// If we have enough good results, stop
|
||||
if (allResults.length >= 30) break;
|
||||
|
||||
} catch (strategyError) {
|
||||
console.warn(`Search strategy failed: ${strategy}`, strategyError);
|
||||
}
|
||||
}
|
||||
|
||||
return allResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enhance search results with document data and apply re-ranking
|
||||
*/
|
||||
enhanceResults(results, query) {
|
||||
const queryLower = query.toLowerCase().trim();
|
||||
const queryTerms = queryLower.split(/\s+/);
|
||||
|
||||
return results.map(result => {
|
||||
const doc = this.documents[result.ref];
|
||||
if (!doc) {
|
||||
console.warn(`Document not found: ${result.ref}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Calculate additional relevance boost for title matches
|
||||
const titleBoost = this.calculateTitleBoost(doc, queryLower, queryTerms);
|
||||
const keywordBoost = this.calculateKeywordBoost(doc, queryTerms);
|
||||
const descriptionBoost = this.calculateDescriptionBoost(doc, queryTerms);
|
||||
|
||||
// Apply boosts to base score
|
||||
const enhancedScore = result.score * (1 + titleBoost + keywordBoost + descriptionBoost);
|
||||
|
||||
return {
|
||||
...doc,
|
||||
score: enhancedScore,
|
||||
baseScore: result.score,
|
||||
titleBoost,
|
||||
keywordBoost,
|
||||
descriptionBoost,
|
||||
matchedTerms: Object.keys(result.matchData?.metadata || {}),
|
||||
matchData: result.matchData,
|
||||
strategy: result.strategy
|
||||
};
|
||||
}).filter(Boolean); // Remove null results
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate boost for title matches
|
||||
* Heavily rewards exact and partial title matches
|
||||
*/
|
||||
calculateTitleBoost(doc, queryLower, queryTerms) {
|
||||
if (!doc.title) return 0;
|
||||
|
||||
const titleLower = doc.title.toLowerCase();
|
||||
let boost = 0;
|
||||
|
||||
// Exact title match (highest boost)
|
||||
if (titleLower === queryLower) {
|
||||
boost += 10;
|
||||
}
|
||||
// Title starts with query
|
||||
else if (titleLower.startsWith(queryLower)) {
|
||||
boost += 8;
|
||||
}
|
||||
// Query is a significant part of title (e.g., "audit" in "Documentation Audit Guide")
|
||||
else if (titleLower.includes(queryLower)) {
|
||||
// Boost more if query is a larger portion of the title
|
||||
const ratio = queryLower.length / titleLower.length;
|
||||
boost += 5 * ratio + 3;
|
||||
}
|
||||
// All query terms appear in title
|
||||
else if (queryTerms.every(term => titleLower.includes(term))) {
|
||||
boost += 4;
|
||||
}
|
||||
// Some query terms appear in title
|
||||
else {
|
||||
const matchingTerms = queryTerms.filter(term => titleLower.includes(term));
|
||||
if (matchingTerms.length > 0) {
|
||||
boost += 2 * (matchingTerms.length / queryTerms.length);
|
||||
}
|
||||
}
|
||||
|
||||
// Additional boost if title contains query as a distinct word
|
||||
const titleWords = titleLower.split(/[\s\-_:]+/);
|
||||
if (titleWords.some(word => word === queryLower || word.startsWith(queryLower))) {
|
||||
boost += 2;
|
||||
}
|
||||
|
||||
return boost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate boost for keyword matches
|
||||
*/
|
||||
calculateKeywordBoost(doc, queryTerms) {
|
||||
if (!doc.keywords) return 0;
|
||||
|
||||
const keywords = Array.isArray(doc.keywords)
|
||||
? doc.keywords.map(k => k.toLowerCase())
|
||||
: doc.keywords.toLowerCase().split(/[\s,]+/);
|
||||
|
||||
let boost = 0;
|
||||
|
||||
queryTerms.forEach(term => {
|
||||
if (keywords.some(kw => kw === term || kw.startsWith(term))) {
|
||||
boost += 1.5;
|
||||
}
|
||||
});
|
||||
|
||||
return boost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate boost for description matches
|
||||
*/
|
||||
calculateDescriptionBoost(doc, queryTerms) {
|
||||
if (!doc.description) return 0;
|
||||
|
||||
const descLower = doc.description.toLowerCase();
|
||||
let boost = 0;
|
||||
|
||||
// Check if query terms appear early in description
|
||||
queryTerms.forEach(term => {
|
||||
const pos = descLower.indexOf(term);
|
||||
if (pos !== -1) {
|
||||
// Boost more if term appears early
|
||||
boost += pos < 50 ? 1 : 0.5;
|
||||
}
|
||||
});
|
||||
|
||||
return boost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Group results by document and find matching sections
|
||||
*/
|
||||
groupResultsByDocument(results, query) {
|
||||
const grouped = new Map();
|
||||
|
||||
results.forEach(result => {
|
||||
const docId = result.id;
|
||||
|
||||
if (!grouped.has(docId)) {
|
||||
// Find matching sections within this document
|
||||
const matchingSections = this.findMatchingSections(result, query);
|
||||
|
||||
grouped.set(docId, {
|
||||
...result,
|
||||
matchingSections,
|
||||
totalMatches: 1,
|
||||
combinedScore: result.score
|
||||
});
|
||||
} else {
|
||||
// Document already exists, combine scores and sections
|
||||
const existing = grouped.get(docId);
|
||||
const additionalSections = this.findMatchingSections(result, query);
|
||||
|
||||
existing.matchingSections = this.mergeSections(existing.matchingSections, additionalSections);
|
||||
existing.totalMatches += 1;
|
||||
existing.combinedScore = Math.max(existing.combinedScore, result.score);
|
||||
}
|
||||
});
|
||||
|
||||
// Convert map to array and sort by combined score
|
||||
return Array.from(grouped.values())
|
||||
.sort((a, b) => b.combinedScore - a.combinedScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find matching sections within a document
|
||||
*/
|
||||
findMatchingSections(result, query) {
|
||||
const matchingSections = [];
|
||||
const queryTerms = query.toLowerCase().split(/\s+/);
|
||||
|
||||
// Check if title matches
|
||||
if (result.title) {
|
||||
const titleText = result.title.toLowerCase();
|
||||
const hasMatch = queryTerms.some(term => titleText.includes(term));
|
||||
|
||||
if (hasMatch) {
|
||||
matchingSections.push({
|
||||
type: 'title',
|
||||
text: result.title,
|
||||
level: 1,
|
||||
anchor: ''
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Check headings for matches
|
||||
if (result.headings && Array.isArray(result.headings)) {
|
||||
result.headings.forEach(heading => {
|
||||
const headingText = heading.text?.toLowerCase() || '';
|
||||
const hasMatch = queryTerms.some(term => headingText.includes(term));
|
||||
|
||||
if (hasMatch) {
|
||||
matchingSections.push({
|
||||
type: 'heading',
|
||||
text: heading.text,
|
||||
level: heading.level || 2,
|
||||
anchor: this.generateAnchor(heading.text)
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// If no specific sections found, add a general content match
|
||||
if (matchingSections.length === 0) {
|
||||
matchingSections.push({
|
||||
type: 'content',
|
||||
text: 'Content match',
|
||||
level: 0,
|
||||
anchor: ''
|
||||
});
|
||||
}
|
||||
|
||||
return matchingSections;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate anchor link similar to how Sphinx does it
|
||||
*/
|
||||
generateAnchor(headingText) {
|
||||
if (!headingText) return '';
|
||||
|
||||
return headingText
|
||||
.toLowerCase()
|
||||
.replace(/[^\w\s-]/g, '') // Remove special chars
|
||||
.replace(/\s+/g, '-') // Replace spaces with hyphens
|
||||
.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge sections, avoiding duplicates
|
||||
*/
|
||||
mergeSections(existing, additional) {
|
||||
const merged = [...existing];
|
||||
|
||||
additional.forEach(section => {
|
||||
const isDuplicate = existing.some(existingSection =>
|
||||
existingSection.text === section.text &&
|
||||
existingSection.type === section.type
|
||||
);
|
||||
|
||||
if (!isDuplicate) {
|
||||
merged.push(section);
|
||||
}
|
||||
});
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get search statistics
|
||||
*/
|
||||
getStatistics() {
|
||||
// Count facet keys and total values
|
||||
const facetStats = {};
|
||||
Object.entries(this.facets).forEach(([key, valueSet]) => {
|
||||
facetStats[key] = valueSet.size;
|
||||
});
|
||||
|
||||
return {
|
||||
documentsIndexed: Object.keys(this.documents).length,
|
||||
topicsAvailable: this.topics.size,
|
||||
tagsAvailable: this.tags.size,
|
||||
documentTypesAvailable: this.documentTypes.size,
|
||||
audienceAvailable: this.audience.size,
|
||||
difficultiesAvailable: this.difficulties.size,
|
||||
facetsDiscovered: Object.keys(this.facets).length,
|
||||
facetStats: facetStats,
|
||||
isInitialized: this.isInitialized
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the search engine is ready
|
||||
*/
|
||||
isReady() {
|
||||
return this.isInitialized && this.index !== null;
|
||||
}
|
||||
}
|
||||
|
||||
// Make SearchEngine available globally
|
||||
window.SearchEngine = SearchEngine;
|
||||
@@ -1,615 +0,0 @@
|
||||
/**
|
||||
* SearchInterface Module
|
||||
* Handles the creation and management of the search UI
|
||||
*/
|
||||
|
||||
class SearchInterface {
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
this.isVisible = false;
|
||||
this.modal = null;
|
||||
this.input = null;
|
||||
this.resultsContainer = null;
|
||||
this.statsContainer = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the search interface elements
|
||||
*/
|
||||
create() {
|
||||
// Check if we're on the search page
|
||||
if (this.isSearchPage()) {
|
||||
this.enhanceSearchPage();
|
||||
} else {
|
||||
// On other pages, create the modal for search functionality
|
||||
this.createModal();
|
||||
this.enhanceSearchButton();
|
||||
}
|
||||
console.log('✅ Search interface created');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if we're on the search page
|
||||
*/
|
||||
isSearchPage() {
|
||||
return window.location.pathname.includes('/search') ||
|
||||
window.location.pathname.includes('/search.html') ||
|
||||
window.location.pathname.endsWith('search/') ||
|
||||
document.querySelector('#search-results') !== null ||
|
||||
document.querySelector('.search-page') !== null ||
|
||||
document.querySelector('form[action*="search"]') !== null ||
|
||||
document.title.toLowerCase().includes('search') ||
|
||||
document.querySelector('h1')?.textContent.toLowerCase().includes('search');
|
||||
}
|
||||
|
||||
/**
|
||||
* Enhance the existing search page using the template structure
|
||||
*/
|
||||
enhanceSearchPage() {
|
||||
console.log('🔍 Enhancing search page using existing template...');
|
||||
console.log('📄 Page URL:', window.location.href);
|
||||
console.log('📋 Page title:', document.title);
|
||||
|
||||
// Use the template's existing elements
|
||||
this.input = document.querySelector('#enhanced-search-page-input');
|
||||
this.resultsContainer = document.querySelector('#enhanced-search-page-results');
|
||||
|
||||
console.log('🔎 Template search input found:', !!this.input);
|
||||
console.log('📦 Template results container found:', !!this.resultsContainer);
|
||||
|
||||
if (this.input && this.resultsContainer) {
|
||||
console.log('✅ Using existing template structure - no additional setup needed');
|
||||
// The template's JavaScript will handle everything
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback for non-template pages
|
||||
console.log('⚠️ Template elements not found, falling back to generic search page detection');
|
||||
this.fallbackToGenericSearchPage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fallback for pages that don't use the template
|
||||
*/
|
||||
fallbackToGenericSearchPage() {
|
||||
// Find existing search elements on generic pages
|
||||
this.input = document.querySelector('#searchbox input[type="text"]') ||
|
||||
document.querySelector('input[name="q"]') ||
|
||||
document.querySelector('.search input[type="text"]');
|
||||
|
||||
// Find or create results container
|
||||
this.resultsContainer = document.querySelector('#search-results') ||
|
||||
document.querySelector('.search-results') ||
|
||||
this.createResultsContainer();
|
||||
|
||||
// Create stats container
|
||||
this.statsContainer = this.createStatsContainer();
|
||||
|
||||
// Hide default Sphinx search results if they exist
|
||||
this.hideDefaultResults();
|
||||
|
||||
// Initialize with empty state
|
||||
this.showEmptyState();
|
||||
|
||||
console.log('✅ Generic search page enhanced');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create results container if it doesn't exist
|
||||
*/
|
||||
createResultsContainer() {
|
||||
const container = document.createElement('div');
|
||||
container.id = 'enhanced-search-results';
|
||||
container.className = 'enhanced-search-results';
|
||||
|
||||
// Add basic styling to ensure proper positioning
|
||||
container.style.cssText = `
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
margin: 1rem 0;
|
||||
clear: both;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
`;
|
||||
|
||||
// Find the best place to insert it within the main content area
|
||||
const insertLocation = this.findBestInsertLocation();
|
||||
|
||||
if (insertLocation.parent && insertLocation.method === 'append') {
|
||||
insertLocation.parent.appendChild(container);
|
||||
console.log(`✅ Results container added to: ${insertLocation.parent.className || insertLocation.parent.tagName}`);
|
||||
} else if (insertLocation.parent && insertLocation.method === 'after') {
|
||||
insertLocation.parent.insertAdjacentElement('afterend', container);
|
||||
console.log(`✅ Results container added after: ${insertLocation.parent.className || insertLocation.parent.tagName}`);
|
||||
} else {
|
||||
// Last resort - create a wrapper in main content
|
||||
this.createInMainContent(container);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the best location to insert search results
|
||||
*/
|
||||
findBestInsertLocation() {
|
||||
// Try to find existing search-related elements first
|
||||
let searchResults = document.querySelector('.search-results, #search-results');
|
||||
if (searchResults) {
|
||||
return { parent: searchResults, method: 'append' };
|
||||
}
|
||||
|
||||
// Look for search form and place results after it
|
||||
let searchForm = document.querySelector('#searchbox, .search form, form[action*="search"]');
|
||||
if (searchForm) {
|
||||
return { parent: searchForm, method: 'after' };
|
||||
}
|
||||
|
||||
// Look for main content containers (common Sphinx/theme classes)
|
||||
const mainSelectors = [
|
||||
'.document .body',
|
||||
'.document .documentwrapper',
|
||||
'.content',
|
||||
'.main-content',
|
||||
'.page-content',
|
||||
'main',
|
||||
'.container .row .col',
|
||||
'.rst-content',
|
||||
'.body-content'
|
||||
];
|
||||
|
||||
for (const selector of mainSelectors) {
|
||||
const element = document.querySelector(selector);
|
||||
if (element) {
|
||||
return { parent: element, method: 'append' };
|
||||
}
|
||||
}
|
||||
|
||||
// Try to find any container that's not the body
|
||||
const anyContainer = document.querySelector('.container, .wrapper, .page, #content');
|
||||
if (anyContainer) {
|
||||
return { parent: anyContainer, method: 'append' };
|
||||
}
|
||||
|
||||
return { parent: null, method: null };
|
||||
}
|
||||
|
||||
/**
|
||||
* Create container in main content as last resort
|
||||
*/
|
||||
createInMainContent(container) {
|
||||
// Create a wrapper section
|
||||
const wrapper = document.createElement('section');
|
||||
wrapper.className = 'search-page-content';
|
||||
wrapper.style.cssText = `
|
||||
max-width: 800px;
|
||||
margin: 2rem auto;
|
||||
padding: 0 1rem;
|
||||
`;
|
||||
|
||||
// Add a title
|
||||
const title = document.createElement('h1');
|
||||
title.textContent = 'Search Results';
|
||||
title.style.cssText = 'margin-bottom: 1rem;';
|
||||
wrapper.appendChild(title);
|
||||
|
||||
// Add the container
|
||||
wrapper.appendChild(container);
|
||||
|
||||
// Insert into body, but with proper styling
|
||||
document.body.appendChild(wrapper);
|
||||
|
||||
console.log('⚠️ Created search results in body with wrapper - consider improving page structure');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create stats container
|
||||
*/
|
||||
createStatsContainer() {
|
||||
const container = document.createElement('div');
|
||||
container.className = 'enhanced-search-stats';
|
||||
container.style.cssText = 'margin: 1rem 0; font-size: 0.9rem; color: #666;';
|
||||
|
||||
// Insert before results
|
||||
if (this.resultsContainer && this.resultsContainer.parentNode) {
|
||||
this.resultsContainer.parentNode.insertBefore(container, this.resultsContainer);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide default Sphinx search results
|
||||
*/
|
||||
hideDefaultResults() {
|
||||
// Hide default search results that Sphinx might show
|
||||
const defaultResults = document.querySelectorAll(
|
||||
'.search-summary, .search li, #search-results .search, .searchresults'
|
||||
);
|
||||
defaultResults.forEach(el => {
|
||||
el.style.display = 'none';
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the main search modal (legacy - kept for compatibility)
|
||||
*/
|
||||
createModal() {
|
||||
// Enhanced search modal
|
||||
const modal = document.createElement('div');
|
||||
modal.id = 'enhanced-search-modal';
|
||||
modal.className = 'enhanced-search-modal';
|
||||
modal.innerHTML = `
|
||||
<div class="enhanced-search-backdrop"></div>
|
||||
<div class="enhanced-search-container">
|
||||
<div class="enhanced-search-header">
|
||||
<div class="enhanced-search-input-wrapper">
|
||||
<i class="fa-solid fa-magnifying-glass search-icon"></i>
|
||||
<input
|
||||
type="text"
|
||||
id="enhanced-search-input"
|
||||
class="enhanced-search-input"
|
||||
placeholder="${this.options.placeholder}"
|
||||
autofocus
|
||||
>
|
||||
<button class="enhanced-search-close" title="Close search">
|
||||
<i class="fa-solid fa-xmark"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="enhanced-search-stats"></div>
|
||||
</div>
|
||||
<div class="enhanced-search-results"></div>
|
||||
<div class="enhanced-search-footer">
|
||||
<div class="enhanced-search-shortcuts">
|
||||
<span><kbd>↵</kbd> Open</span>
|
||||
<span><kbd>↑</kbd><kbd>↓</kbd> Navigate</span>
|
||||
<span><kbd>Esc</kbd> Close</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
document.body.appendChild(modal);
|
||||
|
||||
// Cache references
|
||||
this.modal = modal;
|
||||
this.input = modal.querySelector('#enhanced-search-input');
|
||||
this.resultsContainer = modal.querySelector('.enhanced-search-results');
|
||||
this.statsContainer = modal.querySelector('.enhanced-search-stats');
|
||||
|
||||
// Add event handlers for closing the modal
|
||||
const closeButton = modal.querySelector('.enhanced-search-close');
|
||||
const backdrop = modal.querySelector('.enhanced-search-backdrop');
|
||||
|
||||
if (closeButton) {
|
||||
closeButton.addEventListener('click', () => this.hideModal());
|
||||
}
|
||||
|
||||
if (backdrop) {
|
||||
backdrop.addEventListener('click', () => this.hideModal());
|
||||
}
|
||||
|
||||
// Hide modal by default
|
||||
modal.style.display = 'none';
|
||||
|
||||
// Initialize with empty state
|
||||
this.showEmptyState();
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace or enhance existing search button to show modal
|
||||
*/
|
||||
enhanceSearchButton() {
|
||||
// Find existing search button/form
|
||||
const searchForm = document.querySelector('#searchbox form') ||
|
||||
document.querySelector('.search form') ||
|
||||
document.querySelector('form[action*="search"]');
|
||||
|
||||
if (searchForm) {
|
||||
// Prevent form submission and show modal instead
|
||||
searchForm.addEventListener('submit', (e) => {
|
||||
e.preventDefault();
|
||||
this.showModal();
|
||||
});
|
||||
console.log('✅ Search form enhanced to show modal');
|
||||
}
|
||||
|
||||
// Find search button specifically and enhance it
|
||||
const existingButton = document.querySelector('.search-button-field, .search-button__button');
|
||||
if (existingButton) {
|
||||
existingButton.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
this.showModal();
|
||||
});
|
||||
console.log('✅ Search button enhanced to show modal');
|
||||
}
|
||||
|
||||
// Also look for search input fields and enhance them
|
||||
const searchInput = document.querySelector('#searchbox input[type="text"]') ||
|
||||
document.querySelector('.search input[type="text"]');
|
||||
if (searchInput) {
|
||||
searchInput.addEventListener('focus', () => {
|
||||
this.showModal();
|
||||
});
|
||||
console.log('✅ Search input enhanced to show modal on focus');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the search interface (focus input or show modal)
|
||||
*/
|
||||
show() {
|
||||
if (this.modal) {
|
||||
this.showModal();
|
||||
} else if (this.input) {
|
||||
this.input.focus();
|
||||
this.input.select();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the search interface (hide modal or blur input)
|
||||
*/
|
||||
hide() {
|
||||
if (this.modal) {
|
||||
this.hideModal();
|
||||
} else if (this.input) {
|
||||
this.input.blur();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the modal
|
||||
*/
|
||||
showModal() {
|
||||
if (this.modal) {
|
||||
this.modal.style.display = 'flex';
|
||||
this.modal.classList.add('visible');
|
||||
this.isVisible = true;
|
||||
// Focus the input after a brief delay to ensure modal is visible
|
||||
setTimeout(() => {
|
||||
if (this.input) {
|
||||
this.input.focus();
|
||||
this.input.select();
|
||||
}
|
||||
}, 100);
|
||||
console.log('🔍 Search modal shown');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the modal
|
||||
*/
|
||||
hideModal() {
|
||||
if (this.modal) {
|
||||
this.modal.classList.remove('visible');
|
||||
this.isVisible = false;
|
||||
// Hide after animation completes
|
||||
setTimeout(() => {
|
||||
if (this.modal) {
|
||||
this.modal.style.display = 'none';
|
||||
}
|
||||
}, 200);
|
||||
// Clear any search results
|
||||
this.showEmptyState();
|
||||
console.log('🔍 Search modal hidden');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the search input element
|
||||
*/
|
||||
getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the results container
|
||||
*/
|
||||
getResultsContainer() {
|
||||
return this.resultsContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the stats container
|
||||
*/
|
||||
getStatsContainer() {
|
||||
return this.statsContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the modal element
|
||||
*/
|
||||
getModal() {
|
||||
return this.modal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if modal is visible
|
||||
*/
|
||||
isModalVisible() {
|
||||
return this.isVisible && this.modal && this.modal.style.display !== 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show empty state in results
|
||||
*/
|
||||
showEmptyState() {
|
||||
if (this.resultsContainer) {
|
||||
this.resultsContainer.innerHTML = `
|
||||
<div class="search-empty-state">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<p>Start typing to search documentation...</p>
|
||||
<div class="search-tips">
|
||||
<strong>Search tips:</strong>
|
||||
<ul>
|
||||
<li>Use specific terms for better results</li>
|
||||
<li>Try different keywords if you don't find what you're looking for</li>
|
||||
<li>Search includes titles, content, headings, and tags</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show no results state
|
||||
*/
|
||||
showNoResults(query) {
|
||||
if (this.resultsContainer) {
|
||||
this.resultsContainer.innerHTML = `
|
||||
<div class="search-no-results">
|
||||
<i class="fa-solid fa-search-minus"></i>
|
||||
<p>No results found for "<strong>${this.escapeHtml(query)}</strong>"</p>
|
||||
<div class="search-suggestions">
|
||||
<strong>Try:</strong>
|
||||
<ul>
|
||||
<li>Checking for typos</li>
|
||||
<li>Using different or more general terms</li>
|
||||
<li>Using fewer keywords</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show error state
|
||||
*/
|
||||
showError(message = 'Search temporarily unavailable') {
|
||||
if (this.resultsContainer) {
|
||||
this.resultsContainer.innerHTML = `
|
||||
<div class="search-error">
|
||||
<i class="fa-solid fa-exclamation-triangle"></i>
|
||||
<p>${this.escapeHtml(message)}</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update search statistics
|
||||
*/
|
||||
updateStats(query, count) {
|
||||
if (this.statsContainer) {
|
||||
if (count > 0) {
|
||||
this.statsContainer.innerHTML = `${count} result${count !== 1 ? 's' : ''} for "${this.escapeHtml(query)}"`;
|
||||
} else {
|
||||
this.statsContainer.innerHTML = `No results for "${this.escapeHtml(query)}"`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear search statistics
|
||||
*/
|
||||
clearStats() {
|
||||
if (this.statsContainer) {
|
||||
this.statsContainer.innerHTML = '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current search query
|
||||
*/
|
||||
getQuery() {
|
||||
return this.input ? this.input.value.trim() : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set search query
|
||||
*/
|
||||
setQuery(query) {
|
||||
if (this.input) {
|
||||
this.input.value = query;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear search query
|
||||
*/
|
||||
clearQuery() {
|
||||
if (this.input) {
|
||||
this.input.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Focus the search input
|
||||
*/
|
||||
focusInput() {
|
||||
if (this.input) {
|
||||
this.input.focus();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get close button for event binding
|
||||
*/
|
||||
getCloseButton() {
|
||||
return this.modal ? this.modal.querySelector('.enhanced-search-close') : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get backdrop for event binding
|
||||
*/
|
||||
getBackdrop() {
|
||||
return this.modal ? this.modal.querySelector('.enhanced-search-backdrop') : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape HTML to prevent XSS
|
||||
*/
|
||||
escapeHtml(unsafe) {
|
||||
return unsafe
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Add CSS class to modal
|
||||
*/
|
||||
addModalClass(className) {
|
||||
if (this.modal) {
|
||||
this.modal.classList.add(className);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove CSS class from modal
|
||||
*/
|
||||
removeModalClass(className) {
|
||||
if (this.modal) {
|
||||
this.modal.classList.remove(className);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if modal has class
|
||||
*/
|
||||
hasModalClass(className) {
|
||||
return this.modal ? this.modal.classList.contains(className) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the search interface
|
||||
*/
|
||||
destroy() {
|
||||
if (this.modal) {
|
||||
this.modal.remove();
|
||||
this.modal = null;
|
||||
this.input = null;
|
||||
this.resultsContainer = null;
|
||||
this.statsContainer = null;
|
||||
}
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Make SearchInterface available globally
|
||||
window.SearchInterface = SearchInterface;
|
||||
@@ -1,148 +0,0 @@
|
||||
/**
|
||||
* Utils Module
|
||||
* Contains utility functions used across the enhanced search system
|
||||
*/
|
||||
|
||||
class Utils {
|
||||
constructor() {
|
||||
// Utility class - no initialization needed
|
||||
}
|
||||
|
||||
/**
|
||||
* Debounce function to limit rapid function calls
|
||||
*/
|
||||
debounce(func, wait) {
|
||||
let timeout;
|
||||
return function executedFunction(...args) {
|
||||
const later = () => {
|
||||
clearTimeout(timeout);
|
||||
func(...args);
|
||||
};
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(later, wait);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape special regex characters
|
||||
*/
|
||||
escapeRegex(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape HTML to prevent XSS attacks
|
||||
*/
|
||||
escapeHtml(unsafe) {
|
||||
return unsafe
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Highlight search terms in text
|
||||
*/
|
||||
highlightText(text, query, highlightClass = 'search-highlight') {
|
||||
if (!query || !text) return text;
|
||||
|
||||
const terms = query.toLowerCase().split(/\s+/);
|
||||
let highlighted = text;
|
||||
|
||||
terms.forEach(term => {
|
||||
if (term.length > 1) {
|
||||
const regex = new RegExp(`(${this.escapeRegex(term)})`, 'gi');
|
||||
highlighted = highlighted.replace(regex, `<mark class="${highlightClass}">$1</mark>`);
|
||||
}
|
||||
});
|
||||
|
||||
return highlighted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate breadcrumb from document ID
|
||||
*/
|
||||
generateBreadcrumb(docId) {
|
||||
const parts = docId.split('/').filter(part => part && part !== 'index');
|
||||
return parts.length > 0 ? parts.join(' › ') : 'Home';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate anchor link from heading text (Sphinx-style)
|
||||
*/
|
||||
generateAnchor(headingText) {
|
||||
return headingText
|
||||
.toLowerCase()
|
||||
.replace(/[^\w\s-]/g, '') // Remove special chars
|
||||
.replace(/\s+/g, '-') // Replace spaces with hyphens
|
||||
.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get document URL from result object
|
||||
*/
|
||||
getDocumentUrl(result) {
|
||||
if (result.url) {
|
||||
return result.url;
|
||||
}
|
||||
return `${result.id.replace(/^\/+/, '')}.html`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get appropriate icon for section type
|
||||
*/
|
||||
getSectionIcon(type, level) {
|
||||
switch (type) {
|
||||
case 'title':
|
||||
return '<i class="fa-solid fa-file-lines section-icon title-icon"></i>';
|
||||
case 'heading':
|
||||
if (level <= 2) return '<i class="fa-solid fa-heading section-icon h1-icon"></i>';
|
||||
if (level <= 4) return '<i class="fa-solid fa-heading section-icon h2-icon"></i>';
|
||||
return '<i class="fa-solid fa-heading section-icon h3-icon"></i>';
|
||||
case 'content':
|
||||
return '<i class="fa-solid fa-align-left section-icon content-icon"></i>';
|
||||
default:
|
||||
return '<i class="fa-solid fa-circle section-icon"></i>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load external script (like Lunr.js)
|
||||
*/
|
||||
async loadScript(src) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const script = document.createElement('script');
|
||||
script.src = src;
|
||||
script.onload = resolve;
|
||||
script.onerror = reject;
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Safe substring with fallback
|
||||
*/
|
||||
safeSubstring(str, maxLength = 200, fallback = '') {
|
||||
if (!str) return fallback;
|
||||
return str.length > maxLength ? str.substring(0, maxLength) : str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if string is valid and not empty
|
||||
*/
|
||||
isValidString(str) {
|
||||
return typeof str === 'string' && str.trim().length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Safe array access with fallback
|
||||
*/
|
||||
safeArray(arr, fallback = []) {
|
||||
return Array.isArray(arr) ? arr : fallback;
|
||||
}
|
||||
}
|
||||
|
||||
// Make Utils available globally
|
||||
window.Utils = Utils;
|
||||
@@ -1 +0,0 @@
|
||||
<svg id="Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3096.56 1065.98"><title>nvidia-logo-horiz-rgb-1c-blk-for-screen</title><g id="NVIDIA_Logo" data-name="NVIDIA Logo"><path id="Eye_Mark" data-name="Eye Mark" d="M562.33,440.33V398.81c4-.28,8.1-.5,12.25-.63,113.55-3.57,188,97.56,188,97.56S682.16,607.49,595.9,607.49a104.51,104.51,0,0,1-33.57-5.37V476.24c44.21,5.34,53.09,24.86,79.68,69.16l59.1-49.84S658,439,585.24,439a214.88,214.88,0,0,0-22.91,1.35m0-137.14v62c4.08-.32,8.16-.58,12.25-.73C732.49,359.15,835.35,494,835.35,494S717.19,637.65,594.1,637.65a181.36,181.36,0,0,1-31.77-2.8v38.33a208.94,208.94,0,0,0,26.46,1.72c114.55,0,197.39-58.5,277.62-127.74,13.29,10.65,67.74,36.55,78.94,47.91-76.28,63.85-254,115.31-354.8,115.31-9.71,0-19-.58-28.22-1.46v53.87H997.74V303.19Zm0,298.93v32.73C456.38,616,427,505.83,427,505.83s50.87-56.37,135.36-65.5v35.91l-.16,0c-44.34-5.33-79,36.1-79,36.1s19.41,69.73,79.14,89.8M374.15,501.05S437,408.39,562.33,398.81V365.2C423.46,376.35,303.19,494,303.19,494S371.3,690.89,562.33,708.92V673.18C422.15,655.55,374.15,501.05,374.15,501.05Z"/><path id="NVIDIA" d="M1782,390l0,301.68h85.2V390Zm-670.22-.41V691.71h86V462.33l66.59,0c22.06,0,37.77,5.48,48.4,16.83,13.48,14.36,19,37.51,19,79.87V691.71l83.27,0V524.81c0-119.12-75.93-135.19-150.21-135.19h-153m807.4.43V691.71h138.19c73.63,0,97.66-12.25,123.65-39.7,18.37-19.27,30.24-61.58,30.24-107.82,0-42.4-10.05-80.23-27.58-103.78-31.56-42.13-77-50.36-144.92-50.36Zm84.52,65.68h36.63c53.14,0,87.51,23.87,87.51,85.79s-34.37,85.8-87.51,85.8h-36.63Zm-344.54-65.68-71.1,239.08-68.14-239.07h-92l97.31,301.66h122.79l98.07-301.66Zm591.74,301.66h85.21V390.06h-85.23Zm238.84-301.56-119,301.46h84l18.82-53.29h140.8l17.82,53.29h91.21L2603.56,390.13Zm55.31,55,51.61,141.23H2491.82Z"/><path d="M2767.13,700.91a26.61,26.61,0,1,1,26.61-26.61A26.6,26.6,0,0,1,2767.13,700.91Zm0-48.11c-11.94,0-21.12,9.18-21.12,21.5s9.18,21.5,21.12,21.5,21.12-9.18,21.12-21.5S2779.06,652.8,2767.13,652.8Zm4.77,35.62-5.14-11h-3v11h-6.32V660.11H2769c5.74,0,9.41,4.19,9.41,8.9a8,8,0,0,1-5.22,7.5l6,11.91Zm-3.75-23.09h-4.41v7.35h4.41a3.68,3.68,0,1,0,0-7.35Z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1 +0,0 @@
|
||||
<svg id="Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3096.56 1065.98"><defs><style>.cls-1{fill:#fff;}</style></defs><title>nvidia-logo-horiz-rgb-1c-wht-for-screen</title><g id="NVIDIA_Logo" data-name="NVIDIA Logo"><path id="Eye_Mark" data-name="Eye Mark" class="cls-1" d="M562.33,440.33V398.81c4-.28,8.1-.5,12.25-.63,113.55-3.57,188,97.56,188,97.56S682.16,607.49,595.9,607.49a104.51,104.51,0,0,1-33.57-5.37V476.24c44.21,5.34,53.09,24.86,79.68,69.16l59.1-49.84S658,439,585.24,439a214.88,214.88,0,0,0-22.91,1.35m0-137.14v62c4.08-.32,8.16-.58,12.25-.73C732.49,359.15,835.35,494,835.35,494S717.19,637.65,594.1,637.65a181.36,181.36,0,0,1-31.77-2.8v38.33a208.94,208.94,0,0,0,26.46,1.72c114.55,0,197.39-58.5,277.62-127.74,13.29,10.65,67.74,36.55,78.94,47.91-76.28,63.85-254,115.31-354.8,115.31-9.71,0-19-.58-28.22-1.46v53.87H997.74V303.19Zm0,298.93v32.73C456.38,616,427,505.83,427,505.83s50.87-56.37,135.36-65.5v35.91l-.16,0c-44.34-5.33-79,36.1-79,36.1s19.41,69.73,79.14,89.8M374.15,501.05S437,408.39,562.33,398.81V365.2C423.46,376.35,303.19,494,303.19,494S371.3,690.89,562.33,708.92V673.18C422.15,655.55,374.15,501.05,374.15,501.05Z"/><path id="NVIDIA" class="cls-1" d="M1782,390l0,301.68h85.2V390Zm-670.22-.41V691.71h86V462.33l66.59,0c22.06,0,37.77,5.48,48.4,16.83,13.48,14.36,19,37.51,19,79.87V691.71l83.27,0V524.81c0-119.12-75.93-135.19-150.21-135.19h-153m807.4.43V691.71h138.19c73.63,0,97.66-12.25,123.65-39.7,18.37-19.27,30.24-61.58,30.24-107.82,0-42.4-10.05-80.23-27.58-103.78-31.56-42.13-77-50.36-144.92-50.36Zm84.52,65.68h36.63c53.14,0,87.51,23.87,87.51,85.79s-34.37,85.8-87.51,85.8h-36.63Zm-344.54-65.68-71.1,239.08-68.14-239.07h-92l97.31,301.66h122.79l98.07-301.66Zm591.74,301.66h85.21V390.06h-85.23Zm238.84-301.56-119,301.46h84l18.82-53.29h140.8l17.82,53.29h91.21L2603.56,390.13Zm55.31,55,51.61,141.23H2491.82Z"/><path class="cls-1" d="M2767.13,700.91a26.61,26.61,0,1,1,26.61-26.61A26.6,26.6,0,0,1,2767.13,700.91Zm0-48.11c-11.94,0-21.12,9.18-21.12,21.5s9.18,21.5,21.12,21.5,21.12-9.18,21.12-21.5S2779.06,652.8,2767.13,652.8Zm4.77,35.62-5.14-11h-3v11h-6.32V660.11H2769c5.74,0,9.41,4.19,9.41,8.9a8,8,0,0,1-5.22,7.5l6,11.91Zm-3.75-23.09h-4.41v7.35h4.41a3.68,3.68,0,1,0,0-7.35Z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1 +0,0 @@
|
||||
<svg id="Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3096.56 1065.98"><defs><style>.cls-1{fill:#76b900;}</style></defs><title>nvidia-logo-horiz-rgb-blk-for-screen</title><g id="NVIDIA_Logo" data-name="NVIDIA Logo"><path id="Eye_Mark" data-name="Eye Mark" class="cls-1" d="M562.33,440.33V398.81c4-.28,8.1-.5,12.25-.63,113.55-3.57,188,97.56,188,97.56S682.16,607.49,595.9,607.49a104.51,104.51,0,0,1-33.57-5.37V476.24c44.21,5.34,53.09,24.86,79.68,69.16l59.1-49.84S658,439,585.24,439a214.88,214.88,0,0,0-22.91,1.35m0-137.14v62c4.08-.32,8.16-.58,12.25-.73C732.49,359.15,835.35,494,835.35,494S717.19,637.65,594.1,637.65a181.36,181.36,0,0,1-31.77-2.8v38.33a208.94,208.94,0,0,0,26.46,1.72c114.55,0,197.39-58.5,277.62-127.74,13.29,10.65,67.74,36.55,78.94,47.91-76.28,63.85-254,115.31-354.8,115.31-9.71,0-19-.58-28.22-1.46v53.87H997.74V303.19Zm0,298.93v32.73C456.38,616,427,505.83,427,505.83s50.87-56.37,135.36-65.5v35.91l-.16,0c-44.34-5.33-79,36.1-79,36.1s19.41,69.73,79.14,89.8M374.15,501.05S437,408.39,562.33,398.81V365.2C423.46,376.35,303.19,494,303.19,494S371.3,690.89,562.33,708.92V673.18C422.15,655.55,374.15,501.05,374.15,501.05Z"/><path id="NVIDIA" d="M1782,390l0,301.68h85.2V390Zm-670.22-.41V691.71h86V462.33l66.59,0c22.06,0,37.77,5.48,48.4,16.83,13.48,14.36,19,37.51,19,79.87V691.71l83.27,0V524.81c0-119.12-75.93-135.19-150.21-135.19h-153m807.4.43V691.71h138.19c73.63,0,97.66-12.25,123.65-39.7,18.37-19.27,30.24-61.58,30.24-107.82,0-42.4-10.05-80.23-27.58-103.78-31.56-42.13-77-50.36-144.92-50.36Zm84.52,65.68h36.63c53.14,0,87.51,23.87,87.51,85.79s-34.37,85.8-87.51,85.8h-36.63Zm-344.54-65.68-71.1,239.08-68.14-239.07h-92l97.31,301.66h122.79l98.07-301.66Zm591.74,301.66h85.21V390.06h-85.23Zm238.84-301.56-119,301.46h84l18.82-53.29h140.8l17.82,53.29h91.21L2603.56,390.13Zm55.31,55,51.61,141.23H2491.82Z"/><path d="M2767.13,700.91a26.61,26.61,0,1,1,26.61-26.61A26.6,26.6,0,0,1,2767.13,700.91Zm0-48.11c-11.94,0-21.12,9.18-21.12,21.5s9.18,21.5,21.12,21.5,21.12-9.18,21.12-21.5S2779.06,652.8,2767.13,652.8Zm4.77,35.62-5.14-11h-3v11h-6.32V660.11H2769c5.74,0,9.41,4.19,9.41,8.9a8,8,0,0,1-5.22,7.5l6,11.91Zm-3.75-23.09h-4.41v7.35h4.41a3.68,3.68,0,1,0,0-7.35Z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1 +0,0 @@
|
||||
<svg id="Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3096.56 1065.98"><defs><style>.cls-1{fill:#76b900;}.cls-2{fill:#fff;}</style></defs><title>nvidia-logo-horiz-rgb-wht-for-screen</title><g id="NVIDIA_Logo" data-name="NVIDIA Logo"><path id="Eye_Mark" data-name="Eye Mark" class="cls-1" d="M562.33,440.33V398.81c4-.28,8.1-.5,12.25-.63,113.55-3.57,188,97.56,188,97.56S682.16,607.49,595.9,607.49a104.51,104.51,0,0,1-33.57-5.37V476.24c44.21,5.34,53.09,24.86,79.68,69.16l59.1-49.84S658,439,585.24,439a214.88,214.88,0,0,0-22.91,1.35m0-137.14v62c4.08-.32,8.16-.58,12.25-.73C732.49,359.15,835.35,494,835.35,494S717.19,637.65,594.1,637.65a181.36,181.36,0,0,1-31.77-2.8v38.33a208.94,208.94,0,0,0,26.46,1.72c114.55,0,197.39-58.5,277.62-127.74,13.29,10.65,67.74,36.55,78.94,47.91-76.28,63.85-254,115.31-354.8,115.31-9.71,0-19-.58-28.22-1.46v53.87H997.74V303.19Zm0,298.93v32.73C456.38,616,427,505.83,427,505.83s50.87-56.37,135.36-65.5v35.91l-.16,0c-44.34-5.33-79,36.1-79,36.1s19.41,69.73,79.14,89.8M374.15,501.05S437,408.39,562.33,398.81V365.2C423.46,376.35,303.19,494,303.19,494S371.3,690.89,562.33,708.92V673.18C422.15,655.55,374.15,501.05,374.15,501.05Z"/><path id="NVIDIA" class="cls-2" d="M1782,390l0,301.68h85.2V390Zm-670.22-.41V691.71h86V462.33l66.59,0c22.06,0,37.77,5.48,48.4,16.83,13.48,14.36,19,37.51,19,79.87V691.71l83.27,0V524.81c0-119.12-75.93-135.19-150.21-135.19h-153m807.4.43V691.71h138.19c73.63,0,97.66-12.25,123.65-39.7,18.37-19.27,30.24-61.58,30.24-107.82,0-42.4-10.05-80.23-27.58-103.78-31.56-42.13-77-50.36-144.92-50.36Zm84.52,65.68h36.63c53.14,0,87.51,23.87,87.51,85.79s-34.37,85.8-87.51,85.8h-36.63Zm-344.54-65.68-71.1,239.08-68.14-239.07h-92l97.31,301.66h122.79l98.07-301.66Zm591.74,301.66h85.21V390.06h-85.23Zm238.84-301.56-119,301.46h84l18.82-53.29h140.8l17.82,53.29h91.21L2603.56,390.13Zm55.31,55,51.61,141.23H2491.82Z"/><path class="cls-2" d="M2767.13,700.91a26.61,26.61,0,1,1,26.61-26.61A26.6,26.6,0,0,1,2767.13,700.91Zm0-48.11c-11.94,0-21.12,9.18-21.12,21.5s9.18,21.5,21.12,21.5,21.12-9.18,21.12-21.5S2779.06,652.8,2767.13,652.8Zm4.77,35.62-5.14-11h-3v11h-6.32V660.11H2769c5.74,0,9.41,4.19,9.41,8.9a8,8,0,0,1-5.22,7.5l6,11.91Zm-3.75-23.09h-4.41v7.35h4.41a3.68,3.68,0,1,0,0-7.35Z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 90 B |
@@ -1,154 +0,0 @@
|
||||
html[data-theme="light"] .highlight pre { line-height: 125%; }
|
||||
html[data-theme="light"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="light"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="light"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="light"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="light"] .highlight .hll { background-color: #0969da4a }
|
||||
html[data-theme="light"] .highlight { background: #ffffff; color: #24292F }
|
||||
html[data-theme="light"] .highlight .c { color: #66707B } /* Comment */
|
||||
html[data-theme="light"] .highlight .err { color: #A0111F } /* Error */
|
||||
html[data-theme="light"] .highlight .k { color: #A0111F } /* Keyword */
|
||||
html[data-theme="light"] .highlight .l { color: #702C00 } /* Literal */
|
||||
html[data-theme="light"] .highlight .n { color: #622CBC } /* Name */
|
||||
html[data-theme="light"] .highlight .o { color: #024C1A } /* Operator */
|
||||
html[data-theme="light"] .highlight .p { color: #24292F } /* Punctuation */
|
||||
html[data-theme="light"] .highlight .ch { color: #66707B } /* Comment.Hashbang */
|
||||
html[data-theme="light"] .highlight .cm { color: #66707B } /* Comment.Multiline */
|
||||
html[data-theme="light"] .highlight .cp { color: #66707B } /* Comment.Preproc */
|
||||
html[data-theme="light"] .highlight .cpf { color: #66707B } /* Comment.PreprocFile */
|
||||
html[data-theme="light"] .highlight .c1 { color: #66707B } /* Comment.Single */
|
||||
html[data-theme="light"] .highlight .cs { color: #66707B } /* Comment.Special */
|
||||
html[data-theme="light"] .highlight .gd { color: #023B95 } /* Generic.Deleted */
|
||||
html[data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
html[data-theme="light"] .highlight .gr { color: #A0111F } /* Generic.Error */
|
||||
html[data-theme="light"] .highlight .gh { color: #023B95 } /* Generic.Heading */
|
||||
html[data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
html[data-theme="light"] .highlight .gu { color: #023B95 } /* Generic.Subheading */
|
||||
html[data-theme="light"] .highlight .kc { color: #023B95 } /* Keyword.Constant */
|
||||
html[data-theme="light"] .highlight .kd { color: #A0111F } /* Keyword.Declaration */
|
||||
html[data-theme="light"] .highlight .kn { color: #A0111F } /* Keyword.Namespace */
|
||||
html[data-theme="light"] .highlight .kp { color: #A0111F } /* Keyword.Pseudo */
|
||||
html[data-theme="light"] .highlight .kr { color: #A0111F } /* Keyword.Reserved */
|
||||
html[data-theme="light"] .highlight .kt { color: #A0111F } /* Keyword.Type */
|
||||
html[data-theme="light"] .highlight .ld { color: #702C00 } /* Literal.Date */
|
||||
html[data-theme="light"] .highlight .m { color: #702C00 } /* Literal.Number */
|
||||
html[data-theme="light"] .highlight .s { color: #023B95 } /* Literal.String */
|
||||
html[data-theme="light"] .highlight .na { color: #702C00 } /* Name.Attribute */
|
||||
html[data-theme="light"] .highlight .nb { color: #702C00 } /* Name.Builtin */
|
||||
html[data-theme="light"] .highlight .nc { color: #023B95 } /* Name.Class */
|
||||
html[data-theme="light"] .highlight .no { color: #023B95 } /* Name.Constant */
|
||||
html[data-theme="light"] .highlight .nd { color: #702C00 } /* Name.Decorator */
|
||||
html[data-theme="light"] .highlight .ni { color: #024C1A } /* Name.Entity */
|
||||
html[data-theme="light"] .highlight .ne { color: #622CBC } /* Name.Exception */
|
||||
html[data-theme="light"] .highlight .nf { color: #023B95 } /* Name.Function */
|
||||
html[data-theme="light"] .highlight .nl { color: #702C00 } /* Name.Label */
|
||||
html[data-theme="light"] .highlight .nn { color: #24292F } /* Name.Namespace */
|
||||
html[data-theme="light"] .highlight .nx { color: #622CBC } /* Name.Other */
|
||||
html[data-theme="light"] .highlight .py { color: #023B95 } /* Name.Property */
|
||||
html[data-theme="light"] .highlight .nt { color: #024C1A } /* Name.Tag */
|
||||
html[data-theme="light"] .highlight .nv { color: #702C00 } /* Name.Variable */
|
||||
html[data-theme="light"] .highlight .ow { color: #622CBC } /* Operator.Word */
|
||||
html[data-theme="light"] .highlight .pm { color: #24292F } /* Punctuation.Marker */
|
||||
html[data-theme="light"] .highlight .w { color: #24292F } /* Text.Whitespace */
|
||||
html[data-theme="light"] .highlight .mb { color: #702C00 } /* Literal.Number.Bin */
|
||||
html[data-theme="light"] .highlight .mf { color: #702C00 } /* Literal.Number.Float */
|
||||
html[data-theme="light"] .highlight .mh { color: #702C00 } /* Literal.Number.Hex */
|
||||
html[data-theme="light"] .highlight .mi { color: #702C00 } /* Literal.Number.Integer */
|
||||
html[data-theme="light"] .highlight .mo { color: #702C00 } /* Literal.Number.Oct */
|
||||
html[data-theme="light"] .highlight .sa { color: #023B95 } /* Literal.String.Affix */
|
||||
html[data-theme="light"] .highlight .sb { color: #023B95 } /* Literal.String.Backtick */
|
||||
html[data-theme="light"] .highlight .sc { color: #023B95 } /* Literal.String.Char */
|
||||
html[data-theme="light"] .highlight .dl { color: #023B95 } /* Literal.String.Delimiter */
|
||||
html[data-theme="light"] .highlight .sd { color: #023B95 } /* Literal.String.Doc */
|
||||
html[data-theme="light"] .highlight .s2 { color: #023B95 } /* Literal.String.Double */
|
||||
html[data-theme="light"] .highlight .se { color: #023B95 } /* Literal.String.Escape */
|
||||
html[data-theme="light"] .highlight .sh { color: #023B95 } /* Literal.String.Heredoc */
|
||||
html[data-theme="light"] .highlight .si { color: #023B95 } /* Literal.String.Interpol */
|
||||
html[data-theme="light"] .highlight .sx { color: #023B95 } /* Literal.String.Other */
|
||||
html[data-theme="light"] .highlight .sr { color: #023B95 } /* Literal.String.Regex */
|
||||
html[data-theme="light"] .highlight .s1 { color: #023B95 } /* Literal.String.Single */
|
||||
html[data-theme="light"] .highlight .ss { color: #023B95 } /* Literal.String.Symbol */
|
||||
html[data-theme="light"] .highlight .bp { color: #702C00 } /* Name.Builtin.Pseudo */
|
||||
html[data-theme="light"] .highlight .fm { color: #023B95 } /* Name.Function.Magic */
|
||||
html[data-theme="light"] .highlight .vc { color: #702C00 } /* Name.Variable.Class */
|
||||
html[data-theme="light"] .highlight .vg { color: #702C00 } /* Name.Variable.Global */
|
||||
html[data-theme="light"] .highlight .vi { color: #702C00 } /* Name.Variable.Instance */
|
||||
html[data-theme="light"] .highlight .vm { color: #702C00 } /* Name.Variable.Magic */
|
||||
html[data-theme="light"] .highlight .il { color: #702C00 } /* Literal.Number.Integer.Long */
|
||||
html[data-theme="dark"] .highlight pre { line-height: 125%; }
|
||||
html[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
html[data-theme="dark"] .highlight .hll { background-color: #58a6ff70 }
|
||||
html[data-theme="dark"] .highlight { background: #0d1117; color: #C9D1D9 }
|
||||
html[data-theme="dark"] .highlight .c { color: #D9DEE3 } /* Comment */
|
||||
html[data-theme="dark"] .highlight .err { color: #FF9492 } /* Error */
|
||||
html[data-theme="dark"] .highlight .k { color: #FF9492 } /* Keyword */
|
||||
html[data-theme="dark"] .highlight .l { color: #FFB757 } /* Literal */
|
||||
html[data-theme="dark"] .highlight .n { color: #DBB7FF } /* Name */
|
||||
html[data-theme="dark"] .highlight .o { color: #72F088 } /* Operator */
|
||||
html[data-theme="dark"] .highlight .p { color: #C9D1D9 } /* Punctuation */
|
||||
html[data-theme="dark"] .highlight .ch { color: #D9DEE3 } /* Comment.Hashbang */
|
||||
html[data-theme="dark"] .highlight .cm { color: #D9DEE3 } /* Comment.Multiline */
|
||||
html[data-theme="dark"] .highlight .cp { color: #D9DEE3 } /* Comment.Preproc */
|
||||
html[data-theme="dark"] .highlight .cpf { color: #D9DEE3 } /* Comment.PreprocFile */
|
||||
html[data-theme="dark"] .highlight .c1 { color: #D9DEE3 } /* Comment.Single */
|
||||
html[data-theme="dark"] .highlight .cs { color: #D9DEE3 } /* Comment.Special */
|
||||
html[data-theme="dark"] .highlight .gd { color: #91CBFF } /* Generic.Deleted */
|
||||
html[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
html[data-theme="dark"] .highlight .gr { color: #FF9492 } /* Generic.Error */
|
||||
html[data-theme="dark"] .highlight .gh { color: #91CBFF } /* Generic.Heading */
|
||||
html[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
html[data-theme="dark"] .highlight .gu { color: #91CBFF } /* Generic.Subheading */
|
||||
html[data-theme="dark"] .highlight .kc { color: #91CBFF } /* Keyword.Constant */
|
||||
html[data-theme="dark"] .highlight .kd { color: #FF9492 } /* Keyword.Declaration */
|
||||
html[data-theme="dark"] .highlight .kn { color: #FF9492 } /* Keyword.Namespace */
|
||||
html[data-theme="dark"] .highlight .kp { color: #FF9492 } /* Keyword.Pseudo */
|
||||
html[data-theme="dark"] .highlight .kr { color: #FF9492 } /* Keyword.Reserved */
|
||||
html[data-theme="dark"] .highlight .kt { color: #FF9492 } /* Keyword.Type */
|
||||
html[data-theme="dark"] .highlight .ld { color: #FFB757 } /* Literal.Date */
|
||||
html[data-theme="dark"] .highlight .m { color: #FFB757 } /* Literal.Number */
|
||||
html[data-theme="dark"] .highlight .s { color: #91CBFF } /* Literal.String */
|
||||
html[data-theme="dark"] .highlight .na { color: #FFB757 } /* Name.Attribute */
|
||||
html[data-theme="dark"] .highlight .nb { color: #FFB757 } /* Name.Builtin */
|
||||
html[data-theme="dark"] .highlight .nc { color: #91CBFF } /* Name.Class */
|
||||
html[data-theme="dark"] .highlight .no { color: #91CBFF } /* Name.Constant */
|
||||
html[data-theme="dark"] .highlight .nd { color: #FFB757 } /* Name.Decorator */
|
||||
html[data-theme="dark"] .highlight .ni { color: #72F088 } /* Name.Entity */
|
||||
html[data-theme="dark"] .highlight .ne { color: #DBB7FF } /* Name.Exception */
|
||||
html[data-theme="dark"] .highlight .nf { color: #91CBFF } /* Name.Function */
|
||||
html[data-theme="dark"] .highlight .nl { color: #FFB757 } /* Name.Label */
|
||||
html[data-theme="dark"] .highlight .nn { color: #C9D1D9 } /* Name.Namespace */
|
||||
html[data-theme="dark"] .highlight .nx { color: #DBB7FF } /* Name.Other */
|
||||
html[data-theme="dark"] .highlight .py { color: #91CBFF } /* Name.Property */
|
||||
html[data-theme="dark"] .highlight .nt { color: #72F088 } /* Name.Tag */
|
||||
html[data-theme="dark"] .highlight .nv { color: #FFB757 } /* Name.Variable */
|
||||
html[data-theme="dark"] .highlight .ow { color: #DBB7FF } /* Operator.Word */
|
||||
html[data-theme="dark"] .highlight .pm { color: #C9D1D9 } /* Punctuation.Marker */
|
||||
html[data-theme="dark"] .highlight .w { color: #C9D1D9 } /* Text.Whitespace */
|
||||
html[data-theme="dark"] .highlight .mb { color: #FFB757 } /* Literal.Number.Bin */
|
||||
html[data-theme="dark"] .highlight .mf { color: #FFB757 } /* Literal.Number.Float */
|
||||
html[data-theme="dark"] .highlight .mh { color: #FFB757 } /* Literal.Number.Hex */
|
||||
html[data-theme="dark"] .highlight .mi { color: #FFB757 } /* Literal.Number.Integer */
|
||||
html[data-theme="dark"] .highlight .mo { color: #FFB757 } /* Literal.Number.Oct */
|
||||
html[data-theme="dark"] .highlight .sa { color: #91CBFF } /* Literal.String.Affix */
|
||||
html[data-theme="dark"] .highlight .sb { color: #91CBFF } /* Literal.String.Backtick */
|
||||
html[data-theme="dark"] .highlight .sc { color: #91CBFF } /* Literal.String.Char */
|
||||
html[data-theme="dark"] .highlight .dl { color: #91CBFF } /* Literal.String.Delimiter */
|
||||
html[data-theme="dark"] .highlight .sd { color: #91CBFF } /* Literal.String.Doc */
|
||||
html[data-theme="dark"] .highlight .s2 { color: #91CBFF } /* Literal.String.Double */
|
||||
html[data-theme="dark"] .highlight .se { color: #91CBFF } /* Literal.String.Escape */
|
||||
html[data-theme="dark"] .highlight .sh { color: #91CBFF } /* Literal.String.Heredoc */
|
||||
html[data-theme="dark"] .highlight .si { color: #91CBFF } /* Literal.String.Interpol */
|
||||
html[data-theme="dark"] .highlight .sx { color: #91CBFF } /* Literal.String.Other */
|
||||
html[data-theme="dark"] .highlight .sr { color: #91CBFF } /* Literal.String.Regex */
|
||||
html[data-theme="dark"] .highlight .s1 { color: #91CBFF } /* Literal.String.Single */
|
||||
html[data-theme="dark"] .highlight .ss { color: #91CBFF } /* Literal.String.Symbol */
|
||||
html[data-theme="dark"] .highlight .bp { color: #FFB757 } /* Name.Builtin.Pseudo */
|
||||
html[data-theme="dark"] .highlight .fm { color: #91CBFF } /* Name.Function.Magic */
|
||||
html[data-theme="dark"] .highlight .vc { color: #FFB757 } /* Name.Variable.Class */
|
||||
html[data-theme="dark"] .highlight .vg { color: #FFB757 } /* Name.Variable.Global */
|
||||
html[data-theme="dark"] .highlight .vi { color: #FFB757 } /* Name.Variable.Instance */
|
||||
html[data-theme="dark"] .highlight .vm { color: #FFB757 } /* Name.Variable.Magic */
|
||||
html[data-theme="dark"] .highlight .il { color: #FFB757 } /* Literal.Number.Integer.Long */
|
||||
@@ -1,5 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@@ -1,5 +0,0 @@
|
||||
/*!
|
||||
* Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
* Copyright 2024 Fonticons, Inc.
|
||||
*/
|
||||
@@ -1,620 +0,0 @@
|
||||
/*
|
||||
* searchtools.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for the full-text search.
|
||||
*
|
||||
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Simple result scoring code.
|
||||
*/
|
||||
if (typeof Scorer === "undefined") {
|
||||
var Scorer = {
|
||||
// Implement the following function to further tweak the score for each result
|
||||
// The function takes a result array [docname, title, anchor, descr, score, filename]
|
||||
// and returns the new score.
|
||||
/*
|
||||
score: result => {
|
||||
const [docname, title, anchor, descr, score, filename] = result
|
||||
return score
|
||||
},
|
||||
*/
|
||||
|
||||
// query matches the full name of an object
|
||||
objNameMatch: 11,
|
||||
// or matches in the last dotted part of the object name
|
||||
objPartialMatch: 6,
|
||||
// Additive scores depending on the priority of the object
|
||||
objPrio: {
|
||||
0: 15, // used to be importantResults
|
||||
1: 5, // used to be objectResults
|
||||
2: -5, // used to be unimportantResults
|
||||
},
|
||||
// Used when the priority is not in the mapping.
|
||||
objPrioDefault: 0,
|
||||
|
||||
// query found in title
|
||||
title: 15,
|
||||
partialTitle: 7,
|
||||
// query found in terms
|
||||
term: 5,
|
||||
partialTerm: 2,
|
||||
};
|
||||
}
|
||||
|
||||
const _removeChildren = (element) => {
|
||||
while (element && element.lastChild) element.removeChild(element.lastChild);
|
||||
};
|
||||
|
||||
/**
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
|
||||
*/
|
||||
const _escapeRegExp = (string) =>
|
||||
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
||||
|
||||
const _displayItem = (item, searchTerms, highlightTerms) => {
|
||||
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
|
||||
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
|
||||
const contentRoot = document.documentElement.dataset.content_root;
|
||||
|
||||
const [docName, title, anchor, descr, score, _filename] = item;
|
||||
|
||||
let listItem = document.createElement("li");
|
||||
let requestUrl;
|
||||
let linkUrl;
|
||||
if (docBuilder === "dirhtml") {
|
||||
// dirhtml builder
|
||||
let dirname = docName + "/";
|
||||
if (dirname.match(/\/index\/$/))
|
||||
dirname = dirname.substring(0, dirname.length - 6);
|
||||
else if (dirname === "index/") dirname = "";
|
||||
requestUrl = contentRoot + dirname;
|
||||
linkUrl = requestUrl;
|
||||
} else {
|
||||
// normal html builders
|
||||
requestUrl = contentRoot + docName + docFileSuffix;
|
||||
linkUrl = docName + docLinkSuffix;
|
||||
}
|
||||
let linkEl = listItem.appendChild(document.createElement("a"));
|
||||
linkEl.href = linkUrl + anchor;
|
||||
linkEl.dataset.score = score;
|
||||
linkEl.innerHTML = title;
|
||||
if (descr) {
|
||||
listItem.appendChild(document.createElement("span")).innerHTML =
|
||||
" (" + descr + ")";
|
||||
// highlight search terms in the description
|
||||
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
|
||||
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
|
||||
}
|
||||
else if (showSearchSummary)
|
||||
fetch(requestUrl)
|
||||
.then((responseData) => responseData.text())
|
||||
.then((data) => {
|
||||
if (data)
|
||||
listItem.appendChild(
|
||||
Search.makeSearchSummary(data, searchTerms, anchor)
|
||||
);
|
||||
// highlight search terms in the summary
|
||||
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
|
||||
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
|
||||
});
|
||||
Search.output.appendChild(listItem);
|
||||
};
|
||||
const _finishSearch = (resultCount) => {
|
||||
Search.stopPulse();
|
||||
Search.title.innerText = _("Search Results");
|
||||
if (!resultCount)
|
||||
Search.status.innerText = Documentation.gettext(
|
||||
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
|
||||
);
|
||||
else
|
||||
Search.status.innerText = _(
|
||||
"Search finished, found ${resultCount} page(s) matching the search query."
|
||||
).replace('${resultCount}', resultCount);
|
||||
};
|
||||
const _displayNextItem = (
|
||||
results,
|
||||
resultCount,
|
||||
searchTerms,
|
||||
highlightTerms,
|
||||
) => {
|
||||
// results left, load the summary and display it
|
||||
// this is intended to be dynamic (don't sub resultsCount)
|
||||
if (results.length) {
|
||||
_displayItem(results.pop(), searchTerms, highlightTerms);
|
||||
setTimeout(
|
||||
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
|
||||
5
|
||||
);
|
||||
}
|
||||
// search finished, update title and status message
|
||||
else _finishSearch(resultCount);
|
||||
};
|
||||
// Helper function used by query() to order search results.
|
||||
// Each input is an array of [docname, title, anchor, descr, score, filename].
|
||||
// Order the results by score (in opposite order of appearance, since the
|
||||
// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically.
|
||||
const _orderResultsByScoreThenName = (a, b) => {
|
||||
const leftScore = a[4];
|
||||
const rightScore = b[4];
|
||||
if (leftScore === rightScore) {
|
||||
// same score: sort alphabetically
|
||||
const leftTitle = a[1].toLowerCase();
|
||||
const rightTitle = b[1].toLowerCase();
|
||||
if (leftTitle === rightTitle) return 0;
|
||||
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
|
||||
}
|
||||
return leftScore > rightScore ? 1 : -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
|
||||
* custom function per language.
|
||||
*
|
||||
* The regular expression works by splitting the string on consecutive characters
|
||||
* that are not Unicode letters, numbers, underscores, or emoji characters.
|
||||
* This is the same as ``\W+`` in Python, preserving the surrogate pair area.
|
||||
*/
|
||||
if (typeof splitQuery === "undefined") {
|
||||
var splitQuery = (query) => query
|
||||
.split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
|
||||
.filter(term => term) // remove remaining empty strings
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Module
|
||||
*/
|
||||
const Search = {
|
||||
_index: null,
|
||||
_queued_query: null,
|
||||
_pulse_status: -1,
|
||||
|
||||
htmlToText: (htmlString, anchor) => {
|
||||
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
|
||||
for (const removalQuery of [".headerlink", "script", "style"]) {
|
||||
htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
|
||||
}
|
||||
if (anchor) {
|
||||
const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`);
|
||||
if (anchorContent) return anchorContent.textContent;
|
||||
|
||||
console.warn(
|
||||
`Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`
|
||||
);
|
||||
}
|
||||
|
||||
// if anchor not specified or not found, fall back to main content
|
||||
const docContent = htmlElement.querySelector('[role="main"]');
|
||||
if (docContent) return docContent.textContent;
|
||||
|
||||
console.warn(
|
||||
"Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template."
|
||||
);
|
||||
return "";
|
||||
},
|
||||
|
||||
init: () => {
|
||||
const query = new URLSearchParams(window.location.search).get("q");
|
||||
document
|
||||
.querySelectorAll('input[name="q"]')
|
||||
.forEach((el) => (el.value = query));
|
||||
if (query) Search.performSearch(query);
|
||||
},
|
||||
|
||||
loadIndex: (url) =>
|
||||
(document.body.appendChild(document.createElement("script")).src = url),
|
||||
|
||||
setIndex: (index) => {
|
||||
Search._index = index;
|
||||
if (Search._queued_query !== null) {
|
||||
const query = Search._queued_query;
|
||||
Search._queued_query = null;
|
||||
Search.query(query);
|
||||
}
|
||||
},
|
||||
|
||||
hasIndex: () => Search._index !== null,
|
||||
|
||||
deferQuery: (query) => (Search._queued_query = query),
|
||||
|
||||
stopPulse: () => (Search._pulse_status = -1),
|
||||
|
||||
startPulse: () => {
|
||||
if (Search._pulse_status >= 0) return;
|
||||
|
||||
const pulse = () => {
|
||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||
Search.dots.innerText = ".".repeat(Search._pulse_status);
|
||||
if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
|
||||
};
|
||||
pulse();
|
||||
},
|
||||
|
||||
/**
|
||||
* perform a search for something (or wait until index is loaded)
|
||||
*/
|
||||
performSearch: (query) => {
|
||||
// create the required interface elements
|
||||
const searchText = document.createElement("h2");
|
||||
searchText.textContent = _("Searching");
|
||||
const searchSummary = document.createElement("p");
|
||||
searchSummary.classList.add("search-summary");
|
||||
searchSummary.innerText = "";
|
||||
const searchList = document.createElement("ul");
|
||||
searchList.classList.add("search");
|
||||
|
||||
const out = document.getElementById("search-results");
|
||||
Search.title = out.appendChild(searchText);
|
||||
Search.dots = Search.title.appendChild(document.createElement("span"));
|
||||
Search.status = out.appendChild(searchSummary);
|
||||
Search.output = out.appendChild(searchList);
|
||||
|
||||
const searchProgress = document.getElementById("search-progress");
|
||||
// Some themes don't use the search progress node
|
||||
if (searchProgress) {
|
||||
searchProgress.innerText = _("Preparing search...");
|
||||
}
|
||||
Search.startPulse();
|
||||
|
||||
// index already loaded, the browser was quick!
|
||||
if (Search.hasIndex()) Search.query(query);
|
||||
else Search.deferQuery(query);
|
||||
},
|
||||
|
||||
_parseQuery: (query) => {
|
||||
// stem the search terms and add them to the correct list
|
||||
const stemmer = new Stemmer();
|
||||
const searchTerms = new Set();
|
||||
const excludedTerms = new Set();
|
||||
const highlightTerms = new Set();
|
||||
const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
|
||||
splitQuery(query.trim()).forEach((queryTerm) => {
|
||||
const queryTermLower = queryTerm.toLowerCase();
|
||||
|
||||
// maybe skip this "word"
|
||||
// stopwords array is from language_data.js
|
||||
if (
|
||||
stopwords.indexOf(queryTermLower) !== -1 ||
|
||||
queryTerm.match(/^\d+$/)
|
||||
)
|
||||
return;
|
||||
|
||||
// stem the word
|
||||
let word = stemmer.stemWord(queryTermLower);
|
||||
// select the correct list
|
||||
if (word[0] === "-") excludedTerms.add(word.substr(1));
|
||||
else {
|
||||
searchTerms.add(word);
|
||||
highlightTerms.add(queryTermLower);
|
||||
}
|
||||
});
|
||||
|
||||
if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
|
||||
localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
|
||||
}
|
||||
|
||||
// console.debug("SEARCH: searching for:");
|
||||
// console.info("required: ", [...searchTerms]);
|
||||
// console.info("excluded: ", [...excludedTerms]);
|
||||
|
||||
return [query, searchTerms, excludedTerms, highlightTerms, objectTerms];
|
||||
},
|
||||
|
||||
/**
|
||||
* execute search (requires search index to be loaded)
|
||||
*/
|
||||
_performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => {
|
||||
const filenames = Search._index.filenames;
|
||||
const docNames = Search._index.docnames;
|
||||
const titles = Search._index.titles;
|
||||
const allTitles = Search._index.alltitles;
|
||||
const indexEntries = Search._index.indexentries;
|
||||
|
||||
// Collect multiple result groups to be sorted separately and then ordered.
|
||||
// Each is an array of [docname, title, anchor, descr, score, filename].
|
||||
const normalResults = [];
|
||||
const nonMainIndexResults = [];
|
||||
|
||||
_removeChildren(document.getElementById("search-progress"));
|
||||
|
||||
const queryLower = query.toLowerCase().trim();
|
||||
for (const [title, foundTitles] of Object.entries(allTitles)) {
|
||||
if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
|
||||
for (const [file, id] of foundTitles) {
|
||||
const score = Math.round(Scorer.title * queryLower.length / title.length);
|
||||
const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
|
||||
normalResults.push([
|
||||
docNames[file],
|
||||
titles[file] !== title ? `${titles[file]} > ${title}` : title,
|
||||
id !== null ? "#" + id : "",
|
||||
null,
|
||||
score + boost,
|
||||
filenames[file],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// search for explicit entries in index directives
|
||||
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
|
||||
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
|
||||
for (const [file, id, isMain] of foundEntries) {
|
||||
const score = Math.round(100 * queryLower.length / entry.length);
|
||||
const result = [
|
||||
docNames[file],
|
||||
titles[file],
|
||||
id ? "#" + id : "",
|
||||
null,
|
||||
score,
|
||||
filenames[file],
|
||||
];
|
||||
if (isMain) {
|
||||
normalResults.push(result);
|
||||
} else {
|
||||
nonMainIndexResults.push(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// lookup as object
|
||||
objectTerms.forEach((term) =>
|
||||
normalResults.push(...Search.performObjectSearch(term, objectTerms))
|
||||
);
|
||||
|
||||
// lookup as search terms in fulltext
|
||||
normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms));
|
||||
|
||||
// let the scorer override scores with a custom scoring function
|
||||
if (Scorer.score) {
|
||||
normalResults.forEach((item) => (item[4] = Scorer.score(item)));
|
||||
nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item)));
|
||||
}
|
||||
|
||||
// Sort each group of results by score and then alphabetically by name.
|
||||
normalResults.sort(_orderResultsByScoreThenName);
|
||||
nonMainIndexResults.sort(_orderResultsByScoreThenName);
|
||||
|
||||
// Combine the result groups in (reverse) order.
|
||||
// Non-main index entries are typically arbitrary cross-references,
|
||||
// so display them after other results.
|
||||
let results = [...nonMainIndexResults, ...normalResults];
|
||||
|
||||
// remove duplicate search results
|
||||
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
|
||||
let seen = new Set();
|
||||
results = results.reverse().reduce((acc, result) => {
|
||||
let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
|
||||
if (!seen.has(resultStr)) {
|
||||
acc.push(result);
|
||||
seen.add(resultStr);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
return results.reverse();
|
||||
},
|
||||
|
||||
query: (query) => {
|
||||
const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query);
|
||||
const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms);
|
||||
|
||||
// for debugging
|
||||
//Search.lastresults = results.slice(); // a copy
|
||||
// console.info("search results:", Search.lastresults);
|
||||
|
||||
// print the results
|
||||
_displayNextItem(results, results.length, searchTerms, highlightTerms);
|
||||
},
|
||||
|
||||
/**
|
||||
* search for object names
|
||||
*/
|
||||
performObjectSearch: (object, objectTerms) => {
|
||||
const filenames = Search._index.filenames;
|
||||
const docNames = Search._index.docnames;
|
||||
const objects = Search._index.objects;
|
||||
const objNames = Search._index.objnames;
|
||||
const titles = Search._index.titles;
|
||||
|
||||
const results = [];
|
||||
|
||||
const objectSearchCallback = (prefix, match) => {
|
||||
const name = match[4]
|
||||
const fullname = (prefix ? prefix + "." : "") + name;
|
||||
const fullnameLower = fullname.toLowerCase();
|
||||
if (fullnameLower.indexOf(object) < 0) return;
|
||||
|
||||
let score = 0;
|
||||
const parts = fullnameLower.split(".");
|
||||
|
||||
// check for different match types: exact matches of full name or
|
||||
// "last name" (i.e. last dotted part)
|
||||
if (fullnameLower === object || parts.slice(-1)[0] === object)
|
||||
score += Scorer.objNameMatch;
|
||||
else if (parts.slice(-1)[0].indexOf(object) > -1)
|
||||
score += Scorer.objPartialMatch; // matches in last name
|
||||
|
||||
const objName = objNames[match[1]][2];
|
||||
const title = titles[match[0]];
|
||||
|
||||
// If more than one term searched for, we require other words to be
|
||||
// found in the name/title/description
|
||||
const otherTerms = new Set(objectTerms);
|
||||
otherTerms.delete(object);
|
||||
if (otherTerms.size > 0) {
|
||||
const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
|
||||
if (
|
||||
[...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
|
||||
)
|
||||
return;
|
||||
}
|
||||
|
||||
let anchor = match[3];
|
||||
if (anchor === "") anchor = fullname;
|
||||
else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
|
||||
|
||||
const descr = objName + _(", in ") + title;
|
||||
|
||||
// add custom score for some objects according to scorer
|
||||
if (Scorer.objPrio.hasOwnProperty(match[2]))
|
||||
score += Scorer.objPrio[match[2]];
|
||||
else score += Scorer.objPrioDefault;
|
||||
|
||||
results.push([
|
||||
docNames[match[0]],
|
||||
fullname,
|
||||
"#" + anchor,
|
||||
descr,
|
||||
score,
|
||||
filenames[match[0]],
|
||||
]);
|
||||
};
|
||||
Object.keys(objects).forEach((prefix) =>
|
||||
objects[prefix].forEach((array) =>
|
||||
objectSearchCallback(prefix, array)
|
||||
)
|
||||
);
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* search for full-text terms in the index
|
||||
*/
|
||||
performTermsSearch: (searchTerms, excludedTerms) => {
|
||||
// prepare search
|
||||
const terms = Search._index.terms;
|
||||
const titleTerms = Search._index.titleterms;
|
||||
const filenames = Search._index.filenames;
|
||||
const docNames = Search._index.docnames;
|
||||
const titles = Search._index.titles;
|
||||
|
||||
const scoreMap = new Map();
|
||||
const fileMap = new Map();
|
||||
|
||||
// perform the search on the required terms
|
||||
searchTerms.forEach((word) => {
|
||||
const files = [];
|
||||
const arr = [
|
||||
{ files: terms[word], score: Scorer.term },
|
||||
{ files: titleTerms[word], score: Scorer.title },
|
||||
];
|
||||
// add support for partial matches
|
||||
if (word.length > 2) {
|
||||
const escapedWord = _escapeRegExp(word);
|
||||
if (!terms.hasOwnProperty(word)) {
|
||||
Object.keys(terms).forEach((term) => {
|
||||
if (term.match(escapedWord))
|
||||
arr.push({ files: terms[term], score: Scorer.partialTerm });
|
||||
});
|
||||
}
|
||||
if (!titleTerms.hasOwnProperty(word)) {
|
||||
Object.keys(titleTerms).forEach((term) => {
|
||||
if (term.match(escapedWord))
|
||||
arr.push({ files: titleTerms[term], score: Scorer.partialTitle });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// no match but word was a required one
|
||||
if (arr.every((record) => record.files === undefined)) return;
|
||||
|
||||
// found search word in contents
|
||||
arr.forEach((record) => {
|
||||
if (record.files === undefined) return;
|
||||
|
||||
let recordFiles = record.files;
|
||||
if (recordFiles.length === undefined) recordFiles = [recordFiles];
|
||||
files.push(...recordFiles);
|
||||
|
||||
// set score for the word in each file
|
||||
recordFiles.forEach((file) => {
|
||||
if (!scoreMap.has(file)) scoreMap.set(file, {});
|
||||
scoreMap.get(file)[word] = record.score;
|
||||
});
|
||||
});
|
||||
|
||||
// create the mapping
|
||||
files.forEach((file) => {
|
||||
if (!fileMap.has(file)) fileMap.set(file, [word]);
|
||||
else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word);
|
||||
});
|
||||
});
|
||||
|
||||
// now check if the files don't contain excluded terms
|
||||
const results = [];
|
||||
for (const [file, wordList] of fileMap) {
|
||||
// check if all requirements are matched
|
||||
|
||||
// as search terms with length < 3 are discarded
|
||||
const filteredTermCount = [...searchTerms].filter(
|
||||
(term) => term.length > 2
|
||||
).length;
|
||||
if (
|
||||
wordList.length !== searchTerms.size &&
|
||||
wordList.length !== filteredTermCount
|
||||
)
|
||||
continue;
|
||||
|
||||
// ensure that none of the excluded terms is in the search result
|
||||
if (
|
||||
[...excludedTerms].some(
|
||||
(term) =>
|
||||
terms[term] === file ||
|
||||
titleTerms[term] === file ||
|
||||
(terms[term] || []).includes(file) ||
|
||||
(titleTerms[term] || []).includes(file)
|
||||
)
|
||||
)
|
||||
break;
|
||||
|
||||
// select one (max) score for the file.
|
||||
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
|
||||
// add result to the result list
|
||||
results.push([
|
||||
docNames[file],
|
||||
titles[file],
|
||||
"",
|
||||
null,
|
||||
score,
|
||||
filenames[file],
|
||||
]);
|
||||
}
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to return a node containing the
|
||||
* search summary for a given text. keywords is a list
|
||||
* of stemmed words.
|
||||
*/
|
||||
makeSearchSummary: (htmlText, keywords, anchor) => {
|
||||
const text = Search.htmlToText(htmlText, anchor);
|
||||
if (text === "") return null;
|
||||
|
||||
const textLower = text.toLowerCase();
|
||||
const actualStartPosition = [...keywords]
|
||||
.map((k) => textLower.indexOf(k.toLowerCase()))
|
||||
.filter((i) => i > -1)
|
||||
.slice(-1)[0];
|
||||
const startWithContext = Math.max(actualStartPosition - 120, 0);
|
||||
|
||||
const top = startWithContext === 0 ? "" : "...";
|
||||
const tail = startWithContext + 240 < text.length ? "..." : "";
|
||||
|
||||
let summary = document.createElement("p");
|
||||
summary.classList.add("context");
|
||||
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
|
||||
|
||||
return summary;
|
||||
},
|
||||
};
|
||||
|
||||
_ready(Search.init);
|
||||
@@ -1,154 +0,0 @@
|
||||
/* Highlighting utilities for Sphinx HTML documentation. */
|
||||
"use strict";
|
||||
|
||||
const SPHINX_HIGHLIGHT_ENABLED = true
|
||||
|
||||
/**
|
||||
* highlight a given string on a node by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
const _highlight = (node, addItems, text, className) => {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
const val = node.nodeValue;
|
||||
const parent = node.parentNode;
|
||||
const pos = val.toLowerCase().indexOf(text);
|
||||
if (
|
||||
pos >= 0 &&
|
||||
!parent.classList.contains(className) &&
|
||||
!parent.classList.contains("nohighlight")
|
||||
) {
|
||||
let span;
|
||||
|
||||
const closestNode = parent.closest("body, svg, foreignObject");
|
||||
const isInSVG = closestNode && closestNode.matches("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.classList.add(className);
|
||||
}
|
||||
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
const rest = document.createTextNode(val.substr(pos + text.length));
|
||||
parent.insertBefore(
|
||||
span,
|
||||
parent.insertBefore(
|
||||
rest,
|
||||
node.nextSibling
|
||||
)
|
||||
);
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
/* There may be more occurrences of search term in this node. So call this
|
||||
* function recursively on the remaining fragment.
|
||||
*/
|
||||
_highlight(rest, addItems, text, className);
|
||||
|
||||
if (isInSVG) {
|
||||
const rect = document.createElementNS(
|
||||
"http://www.w3.org/2000/svg",
|
||||
"rect"
|
||||
);
|
||||
const bbox = parent.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute("class", className);
|
||||
addItems.push({ parent: parent, target: rect });
|
||||
}
|
||||
}
|
||||
} else if (node.matches && !node.matches("button, select, textarea")) {
|
||||
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
|
||||
}
|
||||
};
|
||||
const _highlightText = (thisNode, text, className) => {
|
||||
let addItems = [];
|
||||
_highlight(thisNode, addItems, text, className);
|
||||
addItems.forEach((obj) =>
|
||||
obj.parent.insertAdjacentElement("beforebegin", obj.target)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
const SphinxHighlight = {
|
||||
|
||||
/**
|
||||
* highlight the search words provided in localstorage in the text
|
||||
*/
|
||||
highlightSearchWords: () => {
|
||||
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
|
||||
|
||||
// get and clear terms from localstorage
|
||||
const url = new URL(window.location);
|
||||
const highlight =
|
||||
localStorage.getItem("sphinx_highlight_terms")
|
||||
|| url.searchParams.get("highlight")
|
||||
|| "";
|
||||
localStorage.removeItem("sphinx_highlight_terms")
|
||||
url.searchParams.delete("highlight");
|
||||
window.history.replaceState({}, "", url);
|
||||
|
||||
// get individual terms from highlight string
|
||||
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
|
||||
if (terms.length === 0) return; // nothing to do
|
||||
|
||||
// There should never be more than one element matching "div.body"
|
||||
const divBody = document.querySelectorAll("div.body");
|
||||
const body = divBody.length ? divBody[0] : document.querySelector("body");
|
||||
window.setTimeout(() => {
|
||||
terms.forEach((term) => _highlightText(body, term, "highlighted"));
|
||||
}, 10);
|
||||
|
||||
const searchBox = document.getElementById("searchbox");
|
||||
if (searchBox === null) return;
|
||||
searchBox.appendChild(
|
||||
document
|
||||
.createRange()
|
||||
.createContextualFragment(
|
||||
'<p class="highlight-link">' +
|
||||
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
|
||||
_("Hide Search Matches") +
|
||||
"</a></p>"
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to hide the search marks again
|
||||
*/
|
||||
hideSearchWords: () => {
|
||||
document
|
||||
.querySelectorAll("#searchbox .highlight-link")
|
||||
.forEach((el) => el.remove());
|
||||
document
|
||||
.querySelectorAll("span.highlighted")
|
||||
.forEach((el) => el.classList.remove("highlighted"));
|
||||
localStorage.removeItem("sphinx_highlight_terms")
|
||||
},
|
||||
|
||||
initEscapeListener: () => {
|
||||
// only install a listener if it is really needed
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
|
||||
|
||||
document.addEventListener("keydown", (event) => {
|
||||
// bail for input elements
|
||||
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||
// bail with special keys
|
||||
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
|
||||
SphinxHighlight.hideSearchWords();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
_ready(() => {
|
||||
/* Do not call highlightSearchWords() when we are on the search page.
|
||||
* It will highlight words from the *previous* search query.
|
||||
*/
|
||||
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
|
||||
SphinxHighlight.initEscapeListener();
|
||||
});
|
||||
@@ -1,2 +0,0 @@
|
||||
/* Provided by Sphinx's 'basic' theme, and included in the final set of assets */
|
||||
@import "../basic.css";
|
||||
@@ -1,24 +0,0 @@
|
||||
<!--
|
||||
AUTO-GENERATED from webpack.config.js, do **NOT** edit by hand.
|
||||
These are re-used in layout.html
|
||||
-->
|
||||
|
||||
{% macro head_pre_assets() %}
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="{{ pathto('_static/styles/theme.css', 1) }}?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="{{ pathto('_static/styles/pydata-sphinx-theme.css', 1) }}?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
{% endmacro %}
|
||||
|
||||
{% macro head_js_preload() %}
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="{{ pathto('_static/scripts/fontawesome.js', 1) }}?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="{{ pathto('_static/scripts/bootstrap.js', 1) }}?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="{{ pathto('_static/scripts/pydata-sphinx-theme.js', 1) }}?digest=8878045cc6db502f8baf" />
|
||||
{% endmacro %}
|
||||
|
||||
{% macro body_post() %}
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="{{ pathto('_static/scripts/bootstrap.js', 1) }}?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="{{ pathto('_static/scripts/pydata-sphinx-theme.js', 1) }}?digest=8878045cc6db502f8baf"></script>
|
||||
{% endmacro %}
|
||||
@@ -1,629 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>How OpenShell Works — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'about/architecture';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="NVIDIA OpenShell Release Notes" href="release-notes.html" />
|
||||
<link rel="prev" title="Overview of NVIDIA OpenShell" href="overview.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">How OpenShell Works</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="how-openshell-works">
|
||||
<h1>How OpenShell Works<a class="headerlink" href="#how-openshell-works" title="Link to this heading">#</a></h1>
|
||||
<p>OpenShell runs as a <a class="reference external" href="https://k3s.io/" rel="noreferer noopener" target="_blank">K3s</a> Kubernetes cluster inside a Docker container. Each sandbox is an isolated Kubernetes pod managed through the gateway. Four components work together to keep agents secure.</p>
|
||||
<figure class="align-center">
|
||||
<a class="reference external image-reference" href="../_images/architecture.svg"><img alt="OpenShell architecture diagram showing the component layout" src="../_images/architecture.svg" />
|
||||
</a>
|
||||
</figure>
|
||||
<section id="components">
|
||||
<h2>Components<a class="headerlink" href="#components" title="Link to this heading">#</a></h2>
|
||||
<p>The following table describes each component and its role in the system:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Component</p></th>
|
||||
<th class="head"><p>Role</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><strong>Gateway</strong></p></td>
|
||||
<td><p>Control-plane API that coordinates sandbox lifecycle and state, acts as the auth boundary, and brokers requests across the platform.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><strong>Sandbox</strong></p></td>
|
||||
<td><p>Isolated runtime that includes container supervision and policy-enforced egress routing.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><strong>Policy Engine</strong></p></td>
|
||||
<td><p>Policy definition and enforcement layer for filesystem, network, and process constraints. Defense in depth enforces policies from the application layer down to infrastructure and kernel layers.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><strong>Privacy Router</strong></p></td>
|
||||
<td><p>Privacy-aware LLM routing layer that keeps sensitive context on sandbox compute and routes based on cost and privacy policy.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="how-a-request-flows">
|
||||
<h2>How a Request Flows<a class="headerlink" href="#how-a-request-flows" title="Link to this heading">#</a></h2>
|
||||
<p>Every outbound connection from agent code passes through the same decision path:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>The agent process opens an outbound connection (API call, package install, git clone, and so on).</p></li>
|
||||
<li><p>The proxy inside the sandbox intercepts the connection and identifies which binary opened it.</p></li>
|
||||
<li><p>The proxy queries the policy engine with the destination, port, and calling binary.</p></li>
|
||||
<li><p>The policy engine returns one of three decisions:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Allow</strong> — the destination and binary match a policy block. Traffic flows directly to the external service.</p></li>
|
||||
<li><p><strong>Route for inference</strong> — no policy block matched, but inference routing is configured. The privacy router intercepts the request, strips the original credentials, injects the configured backend credentials, and forwards to the managed model endpoint.</p></li>
|
||||
<li><p><strong>Deny</strong> — no match and no inference route. The connection is blocked and logged.</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>For REST endpoints with TLS termination enabled, the proxy also decrypts TLS and checks each HTTP request against per-method, per-path rules before allowing it through.</p>
|
||||
</section>
|
||||
<section id="deployment-modes">
|
||||
<h2>Deployment Modes<a class="headerlink" href="#deployment-modes" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell can run locally or on a remote host. The architecture is identical in both cases — only the Docker container location changes.</p>
|
||||
<ul>
|
||||
<li><p><strong>Local</strong>: the k3s cluster runs inside Docker on your workstation. The CLI provisions it automatically on first use.</p></li>
|
||||
<li><p><strong>Remote</strong>: the cluster runs on a remote host. Deploy with <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">start</span> <span class="pre">--remote</span> <span class="pre">user@host</span></code>. For example, connect to your DGX Spark.</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>gateway<span class="w"> </span>start<span class="w"> </span>--remote<span class="w"> </span><username>@<spark-ssid>.local
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>status
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Continue with one of the following:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To create your first sandbox, refer to the <a class="reference internal" href="../get-started/quickstart.html"><span class="std std-doc">Quickstart</span></a>.</p></li>
|
||||
<li><p>To learn how OpenShell enforces isolation across all protection layers, refer to <a class="reference internal" href="../sandboxes/index.html"><span class="std std-doc">Sandboxes</span></a>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="overview.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Overview of NVIDIA OpenShell</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="release-notes.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">NVIDIA OpenShell Release Notes</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#components">Components</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#how-a-request-flows">How a Request Flows</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#deployment-modes">Deployment Modes</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"about/architecture","title":"How OpenShell Works","url":"about/architecture.html","last_modified":"2026-03-11T19:51:18.148876+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"OpenShell architecture overview covering the gateway, sandbox, policy engine, and privacy router.","tags":["AI Agents","Sandboxing","Security","Architecture"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"How OpenShell Works OpenShell runs as a K3s Kubernetes cluster inside a Docker container. Each sandbox is an isolated Kubernetes pod managed through the gateway. Four components work together to keep agents secure. Components The following table describes each component and its role in the system: Component Role Gateway Control-plane API that coordinates sandbox lifecycle and state, acts as the auth boundary, and brokers requests across the platform. Sandbox Isolated runtime that includes container supervision and policy-enforced egress routing. Policy Engine Policy definition and enforcement layer for filesystem, network, and process constraints. Defense in depth enforces policies from the application layer down to infrastructure and kernel layers. Privacy Router Privacy-aware LLM routing layer that keeps sensitive context on sandbox compute and routes based on cost and privacy policy. How a Request Flows Every outbound connection from agent code passes through the same decision path: The agent process opens an outbound connection (API call, package install, git clone, and so on). The proxy inside the sandbox intercepts the connection and identifies which binary opened it. The proxy queries the policy engine with the destination, port, and calling binary. The policy engine returns one of three decisions: Allow — the destination and binary match a policy block. Traffic flows directly to the external service. Route for inference — no policy block matched, but inference routing is configured. The privacy router intercepts the request, strips the original credentials, injects the configured backend credentials, and forwards to the managed model endpoint. Deny — no match and no inference route. The connection is blocked and logged. For REST endpoints with TLS termination enabled, the proxy also decrypts TLS and checks each HTTP request against per-method, per-path rules before allowing it through. Deployment Modes OpenShell can run locally or on a remote host. The architecture is identical in both cases — only the Docker container location changes. Local : the k3s cluster runs inside Docker on your workstation. The CLI provisions it automatically on first use. Remote : the cluster runs on a remote host. Deploy with openshell gateway start --remote user@host . For example, connect to your DGX Spark. $ openshell gateway start --remote <username>@<spark-ssid>.local\nopenshell status\nNext Steps Continue with one of the following: To create your first sandbox, refer to the Quickstart . To learn how OpenShell enforces isolation across all protection layers, refer to Sandboxes","format":"text","summary":"OpenShell runs as a K3s Kubernetes cluster inside a Docker container. Each sandbox is an isolated Kubernetes pod managed through the gateway. Four components work together to keep agents secure.","headings":[{"text":"How OpenShell Works","level":1},{"text":"Components","level":2},{"text":"How a Request Flows","level":2},{"text":"Deployment Modes","level":2},{"text":"Next Steps","level":2}]}
|
||||
@@ -1,665 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Overview of NVIDIA OpenShell — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'about/overview';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="How OpenShell Works" href="architecture.html" />
|
||||
<link rel="prev" title="NVIDIA OpenShell" href="../index.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Overview of NVIDIA OpenShell</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="overview-of-nvidia-openshell">
|
||||
<h1>Overview of NVIDIA OpenShell<a class="headerlink" href="#overview-of-nvidia-openshell" title="Link to this heading">#</a></h1>
|
||||
<p>NVIDIA OpenShell is an open-source runtime for executing autonomous AI agents in sandboxed environments with kernel-level isolation. It combines sandbox runtime controls and a declarative YAML policy so teams can run agents without giving them unrestricted access to local files, credentials, and external networks.</p>
|
||||
<section id="why-openshell-exists">
|
||||
<h2>Why OpenShell Exists<a class="headerlink" href="#why-openshell-exists" title="Link to this heading">#</a></h2>
|
||||
<p>AI agents are most useful when they can read files, install packages, call APIs, and use credentials. That same access can create material risk. OpenShell is designed for this tradeoff: preserve agent capability while enforcing explicit controls over what the agent can access.</p>
|
||||
</section>
|
||||
<section id="common-risks-and-controls">
|
||||
<h2>Common Risks and Controls<a class="headerlink" href="#common-risks-and-controls" title="Link to this heading">#</a></h2>
|
||||
<p>The table below summarizes common failure modes and how OpenShell mitigates them.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Threat</p></th>
|
||||
<th class="head"><p>Without controls</p></th>
|
||||
<th class="head"><p>With OpenShell</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Data exfiltration</p></td>
|
||||
<td><p>Agent uploads source code or internal files to unauthorized endpoints.</p></td>
|
||||
<td><p>Network policies allow only approved destinations; other outbound traffic is denied.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Credential theft</p></td>
|
||||
<td><p>Agent reads local secrets such as SSH keys or cloud credentials.</p></td>
|
||||
<td><p>Filesystem restrictions (Landlock) confine access to declared paths only.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Unauthorized API usage</p></td>
|
||||
<td><p>Agent sends prompts or data to unapproved model providers.</p></td>
|
||||
<td><p>Privacy routing and network policies control where inference traffic can go.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Privilege escalation</p></td>
|
||||
<td><p>Agent attempts <code class="docutils literal notranslate"><span class="pre">sudo</span></code>, setuid paths, or dangerous syscall behavior.</p></td>
|
||||
<td><p>Unprivileged process identity and seccomp restrictions block escalation paths.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="protection-layers-at-a-glance">
|
||||
<h2>Protection Layers at a Glance<a class="headerlink" href="#protection-layers-at-a-glance" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell applies defense in depth across the following policy domains.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Layer</p></th>
|
||||
<th class="head"><p>What it protects</p></th>
|
||||
<th class="head"><p>When it applies</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Filesystem</p></td>
|
||||
<td><p>Prevents reads/writes outside allowed paths.</p></td>
|
||||
<td><p>Locked at sandbox creation.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Network</p></td>
|
||||
<td><p>Blocks unauthorized outbound connections.</p></td>
|
||||
<td><p>Hot-reloadable at runtime.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Process</p></td>
|
||||
<td><p>Blocks privilege escalation and dangerous syscalls.</p></td>
|
||||
<td><p>Locked at sandbox creation.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Inference</p></td>
|
||||
<td><p>Reroutes model API calls to controlled backends.</p></td>
|
||||
<td><p>Hot-reloadable at runtime.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>For details, refer to <a class="reference internal" href="../sandboxes/index.html#built-in-default-policy"><span class="std std-ref">Built-in Default Policy</span></a> and <a class="reference internal" href="../sandboxes/policies.html"><span class="std std-doc">Customize Sandbox Policies</span></a>.</p>
|
||||
</section>
|
||||
<section id="common-use-cases">
|
||||
<h2>Common Use Cases<a class="headerlink" href="#common-use-cases" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell supports a range of agent deployment patterns.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Use Case</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Secure coding agents</p></td>
|
||||
<td><p>Run Claude Code, OpenCode, or OpenClaw with constrained file and network access.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Private enterprise development</p></td>
|
||||
<td><p>Route inference to self-hosted or private backends while keeping sensitive context under your control.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Compliance and audit</p></td>
|
||||
<td><p>Treat policy YAML as version-controlled security controls that can be reviewed and audited.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Reusable environments</p></td>
|
||||
<td><p>Use community sandbox images or bring your own containerized runtime.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<hr class="docutils" />
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Explore these topics to go deeper:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To understand the components that make up the OpenShell runtime, refer to the <a class="reference internal" href="architecture.html"><span class="std std-doc">Architecture Overview</span></a>.</p></li>
|
||||
<li><p>To install the CLI and create your first sandbox, refer to the <a class="reference internal" href="../get-started/quickstart.html"><span class="std std-doc">Quickstart</span></a>.</p></li>
|
||||
<li><p>To learn how OpenShell enforces isolation across all protection layers, refer to <a class="reference internal" href="../sandboxes/index.html"><span class="std std-doc">Sandboxes</span></a>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="../index.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">NVIDIA OpenShell</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="architecture.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">How OpenShell Works</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#why-openshell-exists">Why OpenShell Exists</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#common-risks-and-controls">Common Risks and Controls</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#protection-layers-at-a-glance">Protection Layers at a Glance</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#common-use-cases">Common Use Cases</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"about/overview","title":"Overview of NVIDIA OpenShell","url":"about/overview.html","last_modified":"2026-03-11T19:51:18.112976+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"OpenShell is the safe, private runtime for autonomous AI agents. Run agents in sandboxed environments that protect your data, credentials, and infrastructure.","tags":["AI Agents","Sandboxing","Security","Privacy","Inference Routing"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Overview of NVIDIA OpenShell NVIDIA OpenShell is an open-source runtime for executing autonomous AI agents in sandboxed environments with kernel-level isolation. It combines sandbox runtime controls and a declarative YAML policy so teams can run agents without giving them unrestricted access to local files, credentials, and external networks. Why OpenShell Exists AI agents are most useful when they can read files, install packages, call APIs, and use credentials. That same access can create material risk. OpenShell is designed for this tradeoff: preserve agent capability while enforcing explicit controls over what the agent can access. Common Risks and Controls The table below summarizes common failure modes and how OpenShell mitigates them. Threat Without controls With OpenShell Data exfiltration Agent uploads source code or internal files to unauthorized endpoints. Network policies allow only approved destinations; other outbound traffic is denied. Credential theft Agent reads local secrets such as SSH keys or cloud credentials. Filesystem restrictions (Landlock) confine access to declared paths only. Unauthorized API usage Agent sends prompts or data to unapproved model providers. Privacy routing and network policies control where inference traffic can go. Privilege escalation Agent attempts sudo , setuid paths, or dangerous syscall behavior. Unprivileged process identity and seccomp restrictions block escalation paths. Protection Layers at a Glance OpenShell applies defense in depth across the following policy domains. Layer What it protects When it applies Filesystem Prevents reads/writes outside allowed paths. Locked at sandbox creation. Network Blocks unauthorized outbound connections. Hot-reloadable at runtime. Process Blocks privilege escalation and dangerous syscalls. Locked at sandbox creation. Inference Reroutes model API calls to controlled backends. Hot-reloadable at runtime. For details, refer to Built-in Default Policy and Customize Sandbox Policies . Common Use Cases OpenShell supports a range of agent deployment patterns. Use Case Description Secure coding agents Run Claude Code, OpenCode, or OpenClaw with constrained file and network access. Private enterprise development Route inference to self-hosted or private backends while keeping sensitive context under your control. Compliance and audit Treat policy YAML as version-controlled security controls that can be reviewed and audited. Reusable environments Use community sandbox images or bring your own containerized runtime. Next Steps Explore these topics to go deeper: To understand the components that make up the OpenShell runtime, refer to the Architecture Overview . To install the CLI and create your first sandbox, refer to the Quickstart . To learn how OpenShell enforces isolation across all protection layers, refer to Sandboxes","format":"text","summary":"NVIDIA OpenShell is an open-source runtime for executing autonomous AI agents in sandboxed environments with kernel-level isolation. It combines sandbox runtime controls and a declarative YAML policy so teams can run agents without giving them unrestricted access to local files, credentials, and ...","headings":[{"text":"Overview of NVIDIA OpenShell","level":1},{"text":"Why OpenShell Exists","level":2},{"text":"Common Risks and Controls","level":2},{"text":"Protection Layers at a Glance","level":2},{"text":"Common Use Cases","level":2},{"text":"Next Steps","level":2}]}
|
||||
@@ -1,576 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>NVIDIA OpenShell Release Notes — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'about/release-notes';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Quickstart" href="../get-started/quickstart.html" />
|
||||
<link rel="prev" title="How OpenShell Works" href="architecture.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">NVIDIA OpenShell Release Notes</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="nvidia-openshell-release-notes">
|
||||
<h1>NVIDIA OpenShell Release Notes<a class="headerlink" href="#nvidia-openshell-release-notes" title="Link to this heading">#</a></h1>
|
||||
<p>Track the latest changes and improvements to NVIDIA OpenShell.
|
||||
This page covers the highlights of the release.
|
||||
For more details, refer to the <a class="reference external" href="https://github.com/NVIDIA/OpenShell/releases" rel="noreferer noopener" target="_blank">OpenShell GitHub Releases</a>.</p>
|
||||
<section id="id1">
|
||||
<h2>0.1.0<a class="headerlink" href="#id1" title="Link to this heading">#</a></h2>
|
||||
<p>This is the first release of NVIDIA OpenShell. It introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management.</p>
|
||||
<section id="highlights">
|
||||
<h3>Highlights<a class="headerlink" href="#highlights" title="Link to this heading">#</a></h3>
|
||||
<ul class="simple">
|
||||
<li><p>Introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management.</p></li>
|
||||
<li><p>Introduces the <code class="docutils literal notranslate"><span class="pre">openshell</span></code> CLI for creating, managing, and customizing sandboxes.</p></li>
|
||||
<li><p>Introduces the <code class="docutils literal notranslate"><span class="pre">openshell-gateway</span></code> service for managing the gateway and sandboxes.</p></li>
|
||||
<li><p>Introduces the <code class="docutils literal notranslate"><span class="pre">openshell-sandbox</span></code> service for running the sandboxed agent.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="architecture.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">How OpenShell Works</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="../get-started/quickstart.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Quickstart</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id1">0.1.0</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#highlights">Highlights</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"about/release-notes","title":"NVIDIA OpenShell Release Notes","url":"about/release-notes.html","last_modified":"2026-03-11T19:51:18.116964+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Track the latest changes and improvements to NVIDIA OpenShell.","tags":["Release Notes","Changelog","AI Agents"],"topics":["Generative AI","Cybersecurity"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"NVIDIA OpenShell Release Notes Track the latest changes and improvements to NVIDIA OpenShell\nThis page covers the highlights of the release\nFor more details, refer to the OpenShell GitHub Releases . 0.1.0 This is the first release of NVIDIA OpenShell. It introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management. Highlights Introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management. Introduces the openshell CLI for creating, managing, and customizing sandboxes. Introduces the openshell-gateway service for managing the gateway and sandboxes. Introduces the openshell-sandbox service for running the sandboxed agent","format":"text","summary":"Track the latest changes and improvements to NVIDIA OpenShell. This page covers the highlights of the release. For more details, refer to the OpenShell GitHub Releases.","headings":[{"text":"NVIDIA OpenShell Release Notes","level":1},{"text":"0.1.0","level":2},{"text":"Highlights","level":3}]}
|
||||
@@ -1,665 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Quickstart — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'get-started/quickstart';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Set Up a Sandbox of Claude Code with a Custom GitHub Policy" href="../tutorials/github-sandbox.html" />
|
||||
<link rel="prev" title="NVIDIA OpenShell Release Notes" href="../about/release-notes.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Quickstart</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="quickstart">
|
||||
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading">#</a></h1>
|
||||
<p>This page gets you from zero to a running, policy-enforced sandbox in two commands.</p>
|
||||
<section id="prerequisites">
|
||||
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Link to this heading">#</a></h2>
|
||||
<p>Before you begin, make sure you have:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Python 3.12 or later</p></li>
|
||||
<li><p><a class="reference external" href="https://docs.astral.sh/uv/" rel="noreferer noopener" target="_blank">uv</a> installed</p></li>
|
||||
<li><p>Docker Desktop running on your machine</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="install-the-openshell-cli">
|
||||
<h2>Install the OpenShell CLI<a class="headerlink" href="#install-the-openshell-cli" title="Link to this heading">#</a></h2>
|
||||
<p>Install the <code class="docutils literal notranslate"><span class="pre">openshell</span></code> package into a virtual environment.</p>
|
||||
<p>Activate your virtual environment:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>uv<span class="w"> </span>venv<span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="nb">source</span><span class="w"> </span>.venv/bin/activate
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Install the CLI:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>uv<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>openshell
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="connect-to-a-remote-gateway-optional">
|
||||
<h2>Connect to a Remote Gateway (Optional)<a class="headerlink" href="#connect-to-a-remote-gateway-optional" title="Link to this heading">#</a></h2>
|
||||
<p>If you’re running locally, skip this step. The OpenShell CLI creates a gateway automatically when you create your first sandbox.</p>
|
||||
<div class="sd-tab-set docutils">
|
||||
<input checked="checked" id="sd-tab-item-0" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-0">
|
||||
Brev</label><div class="sd-tab-content docutils">
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>Deploy an OpenShell gateway on Brev by hitting <strong>Deploy</strong> on the <a class="reference external" href="https://brev.nvidia.com/launchable/deploy/now?launchableID=env-3AaK9NmCzWp3pVyUDNNFBt805FT" rel="noreferer noopener" target="_blank">OpenShell Launchable</a>.</p>
|
||||
</div>
|
||||
<p>After the instance is running, find the gateway URL in the Brev console under <strong>Using Secure Links</strong>. Copy the shareable URL for <strong>port 8080</strong> — this is the gateway endpoint.</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>gateway<span class="w"> </span>add<span class="w"> </span>https://<your-port-8080-url>.brevlab.com
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>status
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<input id="sd-tab-item-1" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-1">
|
||||
DGX Spark</label><div class="sd-tab-content docutils">
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>Set up your Spark with NVIDIA Sync first, or make sure SSH access is configured (such as SSH keys added to the host).</p>
|
||||
</div>
|
||||
<p>Deploy to a DGX Spark machine over SSH:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>gateway<span class="w"> </span>start<span class="w"> </span>--remote<span class="w"> </span><username>@<spark-ssid>.local
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>status
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>After <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">status</span></code> shows the gateway as healthy, all subsequent commands route through the SSH tunnel.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="create-your-first-openshell-sandbox">
|
||||
<h2>Create Your First OpenShell Sandbox<a class="headerlink" href="#create-your-first-openshell-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p>Choose the tab that matches your agent:</p>
|
||||
<div class="sd-tab-set docutils">
|
||||
<input checked="checked" id="sd-tab-item-2" name="sd-tab-set-1" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-2">
|
||||
Claude Code</label><div class="sd-tab-content docutils">
|
||||
<p>Run the following command to create a sandbox with Claude Code:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--<span class="w"> </span>claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The CLI prompts you to create a provider from local credentials — type <code class="docutils literal notranslate"><span class="pre">yes</span></code> to continue. If <code class="docutils literal notranslate"><span class="pre">ANTHROPIC_API_KEY</span></code> is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches.</p>
|
||||
</div>
|
||||
<input id="sd-tab-item-3" name="sd-tab-set-1" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-3">
|
||||
OpenCode</label><div class="sd-tab-content docutils">
|
||||
<p>Run the following command to create a sandbox with OpenCode:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--<span class="w"> </span>opencode
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The CLI prompts you to create a provider from local credentials. Type <code class="docutils literal notranslate"><span class="pre">yes</span></code> to continue. If <code class="docutils literal notranslate"><span class="pre">OPENAI_API_KEY</span></code> or <code class="docutils literal notranslate"><span class="pre">OPENROUTER_API_KEY</span></code> is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches.</p>
|
||||
</div>
|
||||
<input id="sd-tab-item-4" name="sd-tab-set-1" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-4">
|
||||
Codex</label><div class="sd-tab-content docutils">
|
||||
<p>Run the following command to create a sandbox with Codex:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--<span class="w"> </span>codex
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The CLI prompts you to create a provider from local credentials. Type <code class="docutils literal notranslate"><span class="pre">yes</span></code> to continue. If <code class="docutils literal notranslate"><span class="pre">OPENAI_API_KEY</span></code> is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches.</p>
|
||||
</div>
|
||||
<input id="sd-tab-item-5" name="sd-tab-set-1" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-5">
|
||||
OpenClaw</label><div class="sd-tab-content docutils">
|
||||
<p>Run the following command to create a sandbox with OpenClaw:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>openclaw
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">--from</span></code> flag pulls a pre-built sandbox definition from the <a class="reference external" href="https://github.com/NVIDIA/OpenShell-Community" rel="noreferer noopener" target="_blank">OpenShell Community</a> catalog. Each definition bundles a container image, a tailored policy, and optional skills into a single package.</p>
|
||||
</div>
|
||||
<input id="sd-tab-item-6" name="sd-tab-set-1" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-6">
|
||||
Community Sandbox</label><div class="sd-tab-content docutils">
|
||||
<p>You can use the <code class="docutils literal notranslate"><span class="pre">--from</span></code> flag to pull other OpenShell sandbox images from the <a class="reference external" href="https://registry.nvidia.com/" rel="noreferer noopener" target="_blank">NVIDIA Container Registry</a>. For example, to pull the <code class="docutils literal notranslate"><span class="pre">base</span></code> image, run the following command:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>base
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="../about/release-notes.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">NVIDIA OpenShell Release Notes</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="../tutorials/github-sandbox.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Set Up a Sandbox of Claude Code with a Custom GitHub Policy</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#prerequisites">Prerequisites</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#install-the-openshell-cli">Install the OpenShell CLI</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#connect-to-a-remote-gateway-optional">Connect to a Remote Gateway (Optional)</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#create-your-first-openshell-sandbox">Create Your First OpenShell Sandbox</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"get-started/quickstart","title":"Quickstart","url":"get-started/quickstart.html","last_modified":"2026-03-11T19:51:18.121538+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Install the OpenShell CLI and create your first sandboxed AI agent in two commands.","tags":["AI Agents","Sandboxing","Installation","Quickstart"],"topics":["Generative AI","Cybersecurity"],"content_type":"get_started","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Quickstart This page gets you from zero to a running, policy-enforced sandbox in two commands. Prerequisites Before you begin, make sure you have: Python 3.12 or later uv installed Docker Desktop running on your machine Install the OpenShell CLI Install the openshell package into a virtual environment. Activate your virtual environment: uv venv && source .venv/bin/activate\nInstall the CLI: uv pip install openshell\nConnect to a Remote Gateway (Optional) If you’re running locally, skip this step. The OpenShell CLI creates a gateway automatically when you create your first sandbox. Brev Deploy an OpenShell gateway on Brev by hitting Deploy on the OpenShell Launchable . After the instance is running, find the gateway URL in the Brev console under Using Secure Links . Copy the shareable URL for port 8080 — this is the gateway endpoint. $ openshell gateway add https://<your-port-8080-url>.brevlab.com\nopenshell status\nDGX Spark Set up your Spark with NVIDIA Sync first, or make sure SSH access is configured (such as SSH keys added to the host). Deploy to a DGX Spark machine over SSH: $ openshell gateway start --remote <username>@<spark-ssid>.local\nopenshell status\nAfter openshell status shows the gateway as healthy, all subsequent commands route through the SSH tunnel. Create Your First OpenShell Sandbox Choose the tab that matches your agent: Claude Code Run the following command to create a sandbox with Claude Code: $ openshell sandbox create -- claude\nThe CLI prompts you to create a provider from local credentials — type yes to continue. If ANTHROPIC_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. OpenCode Run the following command to create a sandbox with OpenCode: $ openshell sandbox create -- opencode\nThe CLI prompts you to create a provider from local credentials. Type yes to continue. If OPENAI_API_KEY or OPENROUTER_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. Codex Run the following command to create a sandbox with Codex: $ openshell sandbox create -- codex\nThe CLI prompts you to create a provider from local credentials. Type yes to continue. If OPENAI_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. OpenClaw Run the following command to create a sandbox with OpenClaw: $ openshell sandbox create --from openclaw\nThe --from flag pulls a pre-built sandbox definition from the OpenShell Community catalog. Each definition bundles a container image, a tailored policy, and optional skills into a single package. Community Sandbox You can use the --from flag to pull other OpenShell sandbox images from the NVIDIA Container Registry . For example, to pull the base image, run the following command: $ openshell sandbox create --from base","format":"text","summary":"This page gets you from zero to a running, policy-enforced sandbox in two commands.","headings":[{"text":"Quickstart","level":1},{"text":"Prerequisites","level":2},{"text":"Install the OpenShell CLI","level":2},{"text":"Connect to a Remote Gateway (Optional)","level":2},{"text":"Create Your First OpenShell Sandbox","level":2}]}
|
||||
@@ -1,696 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="./" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>NVIDIA OpenShell — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'index';</script>
|
||||
|
||||
<link rel="icon" href="_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Overview of NVIDIA OpenShell" href="about/overview.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="#">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="#">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="nvidia-openshell">
|
||||
<h1>NVIDIA OpenShell<a class="headerlink" href="#nvidia-openshell" title="Link to this heading">#</a></h1>
|
||||
<p><a class="reference external" href="https://github.com/NVIDIA/OpenShell" rel="noreferer noopener" target="_blank"><img alt="GitHub" src="https://img.shields.io/badge/github-repo-green?logo=github" /></a>
|
||||
<a class="reference external" href="https://github.com/NVIDIA/OpenShell/blob/main/LICENSE" rel="noreferer noopener" target="_blank"><img alt="License" src="https://img.shields.io/badge/License-Apache_2.0-blue" /></a>
|
||||
<a class="reference external" href="https://pypi.org/project/openshell/" rel="noreferer noopener" target="_blank"><img alt="PyPI" src="https://img.shields.io/badge/PyPI-openshell-orange?logo=pypi" /></a></p>
|
||||
<p>NVIDIA OpenShell is the safe, private runtime for autonomous AI agents. It provides sandboxed execution environments
|
||||
that protect your data, credentials, and infrastructure. Agents run with exactly the permissions they need and
|
||||
nothing more, governed by declarative policies that prevent unauthorized file access, data exfiltration, and
|
||||
uncontrolled network activity.</p>
|
||||
<section id="get-started">
|
||||
<h2>Get Started<a class="headerlink" href="#get-started" title="Link to this heading">#</a></h2>
|
||||
<p>Install the CLI and create your first sandbox in two commands.</p>
|
||||
<style>
|
||||
.nc-term {
|
||||
background: #1a1a2e;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
margin: 1.5em 0;
|
||||
box-shadow: 0 4px 16px rgba(0,0,0,0.25);
|
||||
font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
|
||||
font-size: 0.875em;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.nc-term-bar {
|
||||
background: #252545;
|
||||
padding: 10px 14px;
|
||||
display: flex;
|
||||
gap: 7px;
|
||||
align-items: center;
|
||||
}
|
||||
.nc-term-dot { width: 12px; height: 12px; border-radius: 50%; }
|
||||
.nc-term-dot-r { background: #ff5f56; }
|
||||
.nc-term-dot-y { background: #ffbd2e; }
|
||||
.nc-term-dot-g { background: #27c93f; }
|
||||
.nc-term-body { padding: 16px 20px; color: #d4d4d8; }
|
||||
.nc-term-body .nc-ps { color: #76b900; user-select: none; }
|
||||
.nc-swap {
|
||||
display: inline-grid;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.nc-swap > span {
|
||||
grid-area: 1 / 1;
|
||||
white-space: nowrap;
|
||||
opacity: 0;
|
||||
animation: nc-cycle 12s ease-in-out infinite;
|
||||
}
|
||||
.nc-swap > span:nth-child(2) { animation-delay: 3s; }
|
||||
.nc-swap > span:nth-child(3) { animation-delay: 6s; }
|
||||
.nc-swap > span:nth-child(4) { animation-delay: 9s; }
|
||||
@keyframes nc-cycle {
|
||||
0%, 3% { opacity: 0; }
|
||||
5%, 20% { opacity: 1; }
|
||||
25%, 100% { opacity: 0; }
|
||||
}
|
||||
.nc-hl { color: #76b900; font-weight: 600; }
|
||||
.nc-cursor {
|
||||
display: inline-block;
|
||||
width: 2px;
|
||||
height: 1.1em;
|
||||
background: #d4d4d8;
|
||||
vertical-align: text-bottom;
|
||||
margin-left: 1px;
|
||||
animation: nc-blink 1s step-end infinite;
|
||||
}
|
||||
@keyframes nc-blink { 50% { opacity: 0; } }
|
||||
</style>
|
||||
<div class="nc-term">
|
||||
<div class="nc-term-bar">
|
||||
<span class="nc-term-dot nc-term-dot-r"></span>
|
||||
<span class="nc-term-dot nc-term-dot-y"></span>
|
||||
<span class="nc-term-dot nc-term-dot-g"></span>
|
||||
</div>
|
||||
<div class="nc-term-body">
|
||||
<div><span class="nc-ps">$ </span>uv pip install openshell</div>
|
||||
<div><span class="nc-ps">$ </span>openshell sandbox create <span class="nc-swap"><span>-- <span class="nc-hl">claude</span></span><span>--from <span class="nc-hl">openclaw</span></span><span>-- <span class="nc-hl">opencode</span></span><span>-- <span class="nc-hl">codex</span></span></span><span class="nc-cursor"></span></div>
|
||||
</div>
|
||||
</div><p>Refer to the <a class="reference internal" href="get-started/quickstart.html"><span class="std std-doc">Quickstart</span></a> for more details.</p>
|
||||
</section>
|
||||
<hr class="docutils" />
|
||||
<section id="explore">
|
||||
<h2>Explore<a class="headerlink" href="#explore" title="Link to this heading">#</a></h2>
|
||||
<div class="sd-container-fluid sd-sphinx-override sd-mb-4 docutils">
|
||||
<div class="sd-row sd-row-cols-2 sd-row-cols-xs-2 sd-row-cols-sm-2 sd-row-cols-md-3 sd-row-cols-lg-3 sd-g-3 sd-g-xs-3 sd-g-sm-3 sd-g-md-3 sd-g-lg-3 docutils">
|
||||
<div class="sd-col sd-d-flex-row docutils">
|
||||
<div class="sd-card sd-sphinx-override sd-w-100 sd-shadow-sm sd-card-hover docutils">
|
||||
<div class="sd-card-body docutils">
|
||||
<div class="sd-card-title sd-font-weight-bold docutils">
|
||||
About OpenShell</div>
|
||||
<p class="sd-card-text">Learn about OpenShell and its capabilities.</p>
|
||||
</div>
|
||||
<div class="sd-card-footer docutils">
|
||||
<p class="sd-card-text"><span class="sd-sphinx-override sd-badge sd-bg-secondary sd-bg-text-secondary">Concept</span></p>
|
||||
</div>
|
||||
<a class="sd-stretched-link sd-hide-link-text reference internal" href="about/overview.html"><span class="doc">Overview of NVIDIA OpenShell</span></a></div>
|
||||
</div>
|
||||
<div class="sd-col sd-d-flex-row docutils">
|
||||
<div class="sd-card sd-sphinx-override sd-w-100 sd-shadow-sm sd-card-hover docutils">
|
||||
<div class="sd-card-body docutils">
|
||||
<div class="sd-card-title sd-font-weight-bold docutils">
|
||||
Quickstart</div>
|
||||
<p class="sd-card-text">Install the CLI and create your first sandbox in two commands.</p>
|
||||
</div>
|
||||
<div class="sd-card-footer docutils">
|
||||
<p class="sd-card-text"><span class="sd-sphinx-override sd-badge sd-bg-secondary sd-bg-text-secondary">Tutorial</span></p>
|
||||
</div>
|
||||
<a class="sd-stretched-link sd-hide-link-text reference internal" href="get-started/quickstart.html"><span class="doc">Quickstart</span></a></div>
|
||||
</div>
|
||||
<div class="sd-col sd-d-flex-row docutils">
|
||||
<div class="sd-card sd-sphinx-override sd-w-100 sd-shadow-sm sd-card-hover docutils">
|
||||
<div class="sd-card-body docutils">
|
||||
<div class="sd-card-title sd-font-weight-bold docutils">
|
||||
Set Up a Sandbox with GitHub Repo Access</div>
|
||||
<p class="sd-card-text">End-to-end guides: GitHub repo access, custom policies, and more.</p>
|
||||
</div>
|
||||
<div class="sd-card-footer docutils">
|
||||
<p class="sd-card-text"><span class="sd-sphinx-override sd-badge sd-bg-secondary sd-bg-text-secondary">Tutorial</span></p>
|
||||
</div>
|
||||
<a class="sd-stretched-link sd-hide-link-text reference internal" href="tutorials/github-sandbox.html"><span class="doc">Set Up a Sandbox of Claude Code with a Custom GitHub Policy</span></a></div>
|
||||
</div>
|
||||
<div class="sd-col sd-d-flex-row docutils">
|
||||
<div class="sd-card sd-sphinx-override sd-w-100 sd-shadow-sm sd-card-hover docutils">
|
||||
<div class="sd-card-body docutils">
|
||||
<div class="sd-card-title sd-font-weight-bold docutils">
|
||||
Sandboxes</div>
|
||||
<p class="sd-card-text">Create, manage, and customize sandboxes. Configure policies, providers, and community images.</p>
|
||||
</div>
|
||||
<div class="sd-card-footer docutils">
|
||||
<p class="sd-card-text"><span class="sd-sphinx-override sd-badge sd-bg-secondary sd-bg-text-secondary">Concept</span></p>
|
||||
</div>
|
||||
<a class="sd-stretched-link sd-hide-link-text reference internal" href="sandboxes/index.html"><span class="doc">About Sandboxes</span></a></div>
|
||||
</div>
|
||||
<div class="sd-col sd-d-flex-row docutils">
|
||||
<div class="sd-card sd-sphinx-override sd-w-100 sd-shadow-sm sd-card-hover docutils">
|
||||
<div class="sd-card-body docutils">
|
||||
<div class="sd-card-title sd-font-weight-bold docutils">
|
||||
Inference Routing</div>
|
||||
<p class="sd-card-text">Keep inference traffic private by routing API calls to local or self-hosted backends.</p>
|
||||
</div>
|
||||
<div class="sd-card-footer docutils">
|
||||
<p class="sd-card-text"><span class="sd-sphinx-override sd-badge sd-bg-secondary sd-bg-text-secondary">Concept</span></p>
|
||||
</div>
|
||||
<a class="sd-stretched-link sd-hide-link-text reference internal" href="inference/index.html"><span class="doc">About Inference Routing</span></a></div>
|
||||
</div>
|
||||
<div class="sd-col sd-d-flex-row docutils">
|
||||
<div class="sd-card sd-sphinx-override sd-w-100 sd-shadow-sm sd-card-hover docutils">
|
||||
<div class="sd-card-body docutils">
|
||||
<div class="sd-card-title sd-font-weight-bold docutils">
|
||||
Reference</div>
|
||||
<p class="sd-card-text">CLI commands, policy schema, environment variables, and system architecture.</p>
|
||||
</div>
|
||||
<div class="sd-card-footer docutils">
|
||||
<p class="sd-card-text"><span class="sd-sphinx-override sd-badge sd-bg-secondary sd-bg-text-secondary">Reference</span></p>
|
||||
</div>
|
||||
<a class="sd-stretched-link sd-hide-link-text reference internal" href="reference/cli.html"><span class="doc">CLI Reference</span></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="right-next"
|
||||
href="about/overview.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Overview of NVIDIA OpenShell</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#get-started">Get Started</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#explore">Explore</a><ul class="nav section-nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,693 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Configure Inference Routing — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'inference/configure';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="CLI Reference" href="../reference/cli.html" />
|
||||
<link rel="prev" title="About Inference Routing" href="index.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Configure Inference Routing</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="configure-inference-routing">
|
||||
<h1>Configure Inference Routing<a class="headerlink" href="#configure-inference-routing" title="Link to this heading">#</a></h1>
|
||||
<p>This page covers the managed local inference endpoint (<code class="docutils literal notranslate"><span class="pre">https://inference.local</span></code>). External inference endpoints go through sandbox <code class="docutils literal notranslate"><span class="pre">network_policies</span></code> — refer to <a class="reference internal" href="../sandboxes/index.html#network-access-rules"><span class="std std-ref">Network Access Rules</span></a> for details.</p>
|
||||
<p>The configuration consists of two values:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Value</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Provider record</p></td>
|
||||
<td><p>The credential backend OpenShell uses to authenticate with the upstream model host.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Model ID</p></td>
|
||||
<td><p>The model to use for generation requests.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<section id="step-1-create-a-provider">
|
||||
<h2>Step 1: Create a Provider<a class="headerlink" href="#step-1-create-a-provider" title="Link to this heading">#</a></h2>
|
||||
<p>Create a provider that holds the backend credentials you want OpenShell to use.</p>
|
||||
<div class="sd-tab-set docutils">
|
||||
<input checked="checked" id="sd-tab-item-0" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-0">
|
||||
NVIDIA API Catalog</label><div class="sd-tab-content docutils">
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>create<span class="w"> </span>--name<span class="w"> </span>nvidia-prod<span class="w"> </span>--type<span class="w"> </span>nvidia<span class="w"> </span>--from-existing
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This reads <code class="docutils literal notranslate"><span class="pre">NVIDIA_API_KEY</span></code> from your environment.</p>
|
||||
</div>
|
||||
<input id="sd-tab-item-1" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-1">
|
||||
Local / self-hosted endpoint</label><div class="sd-tab-content docutils">
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>create<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--name<span class="w"> </span>my-local-model<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--type<span class="w"> </span>openai<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--credential<span class="w"> </span><span class="nv">OPENAI_API_KEY</span><span class="o">=</span>empty-if-not-required<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--config<span class="w"> </span><span class="nv">OPENAI_BASE_URL</span><span class="o">=</span>http://192.168.10.15/v1
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">--config</span> <span class="pre">OPENAI_BASE_URL</span></code> to point to any OpenAI-compatible server running on your network. Set <code class="docutils literal notranslate"><span class="pre">OPENAI_API_KEY</span></code> to a dummy value if the server does not require authentication.</p>
|
||||
</div>
|
||||
<input id="sd-tab-item-2" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-2">
|
||||
Anthropic</label><div class="sd-tab-content docutils">
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>create<span class="w"> </span>--name<span class="w"> </span>anthropic-prod<span class="w"> </span>--type<span class="w"> </span>anthropic<span class="w"> </span>--from-existing
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This reads <code class="docutils literal notranslate"><span class="pre">ANTHROPIC_API_KEY</span></code> from your environment.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="step-2-set-inference-routing">
|
||||
<h2>Step 2: Set Inference Routing<a class="headerlink" href="#step-2-set-inference-routing" title="Link to this heading">#</a></h2>
|
||||
<p>Point <code class="docutils literal notranslate"><span class="pre">inference.local</span></code> at that provider and choose the model to use:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>inference<span class="w"> </span><span class="nb">set</span><span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--provider<span class="w"> </span>nvidia-prod<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--model<span class="w"> </span>nvidia/nemotron-3-nano-30b-a3b
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="step-3-verify-the-active-config">
|
||||
<h2>Step 3: Verify the Active Config<a class="headerlink" href="#step-3-verify-the-active-config" title="Link to this heading">#</a></h2>
|
||||
<p>Confirm that the provider and model are set correctly:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>inference<span class="w"> </span>get
|
||||
<span class="go">provider: nvidia-prod</span>
|
||||
<span class="go">model: nvidia/nemotron-3-nano-30b-a3b</span>
|
||||
<span class="go">version: 1</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="step-4-update-part-of-the-config">
|
||||
<h2>Step 4: Update Part of the Config<a class="headerlink" href="#step-4-update-part-of-the-config" title="Link to this heading">#</a></h2>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">update</span></code> when you want to change only one field:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>inference<span class="w"> </span>update<span class="w"> </span>--model<span class="w"> </span>nvidia/nemotron-3-nano-30b-a3b
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Or switch providers without repeating the current model:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>inference<span class="w"> </span>update<span class="w"> </span>--provider<span class="w"> </span>openai-prod
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="use-it-from-a-sandbox">
|
||||
<h2>Use It from a Sandbox<a class="headerlink" href="#use-it-from-a-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p>After inference is configured, code inside any sandbox can call <code class="docutils literal notranslate"><span class="pre">https://inference.local</span></code> directly:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">openai</span><span class="w"> </span><span class="kn">import</span> <span class="n">OpenAI</span>
|
||||
|
||||
<span class="n">client</span> <span class="o">=</span> <span class="n">OpenAI</span><span class="p">(</span><span class="n">base_url</span><span class="o">=</span><span class="s2">"https://inference.local/v1"</span><span class="p">,</span> <span class="n">api_key</span><span class="o">=</span><span class="s2">"dummy"</span><span class="p">)</span>
|
||||
|
||||
<span class="n">response</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">chat</span><span class="o">.</span><span class="n">completions</span><span class="o">.</span><span class="n">create</span><span class="p">(</span>
|
||||
<span class="n">model</span><span class="o">=</span><span class="s2">"anything"</span><span class="p">,</span>
|
||||
<span class="n">messages</span><span class="o">=</span><span class="p">[{</span><span class="s2">"role"</span><span class="p">:</span> <span class="s2">"user"</span><span class="p">,</span> <span class="s2">"content"</span><span class="p">:</span> <span class="s2">"Hello"</span><span class="p">}],</span>
|
||||
<span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The client-supplied model is ignored for generation requests. OpenShell rewrites it to the configured model before forwarding upstream.</p>
|
||||
<p>Use this endpoint when inference should stay local to the host for privacy and security reasons. External providers that should be reached directly belong in <code class="docutils literal notranslate"><span class="pre">network_policies</span></code> instead.</p>
|
||||
<section id="verify-the-endpoint-from-a-sandbox">
|
||||
<h3>Verify the Endpoint from a Sandbox<a class="headerlink" href="#verify-the-endpoint-from-a-sandbox" title="Link to this heading">#</a></h3>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span> <span class="pre">get</span></code> confirms the configuration was saved, but does not verify the upstream endpoint is reachable. To confirm end-to-end connectivity, connect to a sandbox and run:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>curl<span class="w"> </span>https://inference.local/v1/responses<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>-H<span class="w"> </span><span class="s2">"Content-Type: application/json"</span><span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>-d<span class="w"> </span><span class="s1">'{</span>
|
||||
<span class="s1"> "instructions": "You are a helpful assistant.",</span>
|
||||
<span class="s1"> "input": "Hello!"</span>
|
||||
<span class="s1"> }'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A successful response confirms the privacy router can reach the configured backend and the model is serving requests.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Gateway-scoped</strong> — every sandbox on the active gateway sees the same <code class="docutils literal notranslate"><span class="pre">inference.local</span></code> backend.</p></li>
|
||||
<li><p><strong>HTTPS only</strong> — <code class="docutils literal notranslate"><span class="pre">inference.local</span></code> is intercepted only for HTTPS traffic.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Explore related topics:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To understand the inference routing flow and supported API patterns, refer to <a class="reference internal" href="index.html"><span class="doc">About Inference Routing</span></a>.</p></li>
|
||||
<li><p>To control external endpoints, refer to <a class="reference internal" href="../sandboxes/index.html#network-access-rules"><span class="std std-ref">Network Access Rules</span></a>.</p></li>
|
||||
<li><p>To manage provider records, refer to <a class="reference internal" href="../sandboxes/providers.html"><span class="doc">Providers</span></a>.</p></li>
|
||||
<li><p>To view <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span></code> commands, refer to <a class="reference internal" href="../reference/cli.html"><span class="doc">CLI Reference</span></a>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="index.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">About Inference Routing</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="../reference/cli.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">CLI Reference</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#step-1-create-a-provider">Step 1: Create a Provider</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#step-2-set-inference-routing">Step 2: Set Inference Routing</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#step-3-verify-the-active-config">Step 3: Verify the Active Config</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#step-4-update-part-of-the-config">Step 4: Update Part of the Config</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#use-it-from-a-sandbox">Use It from a Sandbox</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#verify-the-endpoint-from-a-sandbox">Verify the Endpoint from a Sandbox</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"inference/configure","title":"Configure Inference Routing","url":"inference/configure.html","last_modified":"2026-03-11T19:51:18.127818+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Set up the managed local inference endpoint with provider credentials and model configuration.","tags":["Inference Routing","Configuration","Privacy","LLM","Provider"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Configure Inference Routing This page covers the managed local inference endpoint ( https://inference.local ). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details. The configuration consists of two values: Value Description Provider record The credential backend OpenShell uses to authenticate with the upstream model host. Model ID The model to use for generation requests. Step 1: Create a Provider Create a provider that holds the backend credentials you want OpenShell to use. NVIDIA API Catalog $ openshell provider create --name nvidia-prod --type nvidia --from-existing\nThis reads NVIDIA_API_KEY from your environment. Local / self-hosted endpoint $ openshell provider create\nname my-local-model\ntype openai\ncredential OPENAI_API_KEY=empty-if-not-required\nconfig OPENAI_BASE_URL=http://192.168.10.15/v1\nUse --config OPENAI_BASE_URL to point to any OpenAI-compatible server running on your network. Set OPENAI_API_KEY to a dummy value if the server does not require authentication. Anthropic $ openshell provider create --name anthropic-prod --type anthropic --from-existing\nThis reads ANTHROPIC_API_KEY from your environment. Step 2: Set Inference Routing Point inference.local at that provider and choose the model to use: $ openshell inference set\nprovider nvidia-prod\nmodel nvidia/nemotron-3-nano-30b-a3b\nStep 3: Verify the Active Config Confirm that the provider and model are set correctly: $ openshell inference get\nprovider: nvidia-prod\nmodel: nvidia/nemotron-3-nano-30b-a3b\nversion: 1\nStep 4: Update Part of the Config Use update when you want to change only one field: $ openshell inference update --model nvidia/nemotron-3-nano-30b-a3b\nOr switch providers without repeating the current model: $ openshell inference update --provider openai-prod\nUse It from a Sandbox After inference is configured, code inside any sandbox can call https://inference.local directly: from openai import OpenAI\nclient = OpenAI(base_url=\"https://inference.local/v1\", api_key=\"dummy\nresponse = client.chat.completions.create\nmodel=\"anything\nmessages=[{\"role\": \"user\", \"content\": \"Hello\nThe client-supplied model is ignored for generation requests. OpenShell rewrites it to the configured model before forwarding upstream. Use this endpoint when inference should stay local to the host for privacy and security reasons. External providers that should be reached directly belong in network_policies instead. Verify the Endpoint from a Sandbox openshell inference get confirms the configuration was saved, but does not verify the upstream endpoint is reachable. To confirm end-to-end connectivity, connect to a sandbox and run: curl https://inference.local/v1/responses\nH \"Content-Type: application/json\"\nd\ninstructions\": \"You are a helpful assistant\ninput\": \"Hello\nA successful response confirms the privacy router can reach the configured backend and the model is serving requests. Gateway-scoped — every sandbox on the active gateway sees the same inference.local backend. HTTPS only — inference.local is intercepted only for HTTPS traffic. Next Steps Explore related topics: To understand the inference routing flow and supported API patterns, refer to index . To control external endpoints, refer to Network Access Rules . To manage provider records, refer to ../sandboxes/providers . To view openshell inference commands, refer to ../reference/cli","format":"text","summary":"This page covers the managed local inference endpoint (https://inference.local). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details.","headings":[{"text":"Configure Inference Routing","level":1},{"text":"Step 1: Create a Provider","level":2},{"text":"Step 2: Set Inference Routing","level":2},{"text":"Step 3: Verify the Active Config","level":2},{"text":"Step 4: Update Part of the Config","level":2},{"text":"Use It from a Sandbox","level":2},{"text":"Verify the Endpoint from a Sandbox","level":3},{"text":"Next Steps","level":2}]}
|
||||
@@ -1,672 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>About Inference Routing — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'inference/index';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Configure Inference Routing" href="configure.html" />
|
||||
<link rel="prev" title="Community Sandboxes" href="../sandboxes/community-sandboxes.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">About Inference Routing</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="about-inference-routing">
|
||||
<h1>About Inference Routing<a class="headerlink" href="#about-inference-routing" title="Link to this heading">#</a></h1>
|
||||
<p>OpenShell handles inference in two ways:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Path</p></th>
|
||||
<th class="head"><p>How It Works</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><strong>External endpoints</strong></p></td>
|
||||
<td><p>Traffic to hosts like <code class="docutils literal notranslate"><span class="pre">api.openai.com</span></code> or <code class="docutils literal notranslate"><span class="pre">api.anthropic.com</span></code> is treated like any other outbound request — allowed or denied by <code class="docutils literal notranslate"><span class="pre">network_policies</span></code>. Refer to <a class="reference internal" href="../sandboxes/index.html#network-access-rules"><span class="std std-ref">Network Access Rules</span></a>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><strong><code class="docutils literal notranslate"><span class="pre">inference.local</span></code></strong></p></td>
|
||||
<td><p>A special endpoint exposed inside every sandbox for inference that should stay local to the host for privacy and security. The <a class="reference internal" href="../about/architecture.html"><span class="doc">privacy router</span></a> strips the original credentials, injects the configured backend credentials, and forwards to the managed model endpoint.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<section id="how-inference-local-works">
|
||||
<h2>How <code class="docutils literal notranslate"><span class="pre">inference.local</span></code> Works<a class="headerlink" href="#how-inference-local-works" title="Link to this heading">#</a></h2>
|
||||
<p>When code inside a sandbox calls <code class="docutils literal notranslate"><span class="pre">https://inference.local</span></code>, the privacy router routes the request to the configured backend for that gateway. The configured model is applied to generation requests, and provider credentials are supplied by OpenShell rather than by code inside the sandbox.</p>
|
||||
<p>If code calls an external inference host directly, that traffic is evaluated only by <code class="docutils literal notranslate"><span class="pre">network_policies</span></code>.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Property</p></th>
|
||||
<th class="head"><p>Detail</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Credentials</p></td>
|
||||
<td><p>No sandbox API keys needed — credentials come from the configured provider record.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Configuration</p></td>
|
||||
<td><p>One provider and one model define sandbox inference.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Provider support</p></td>
|
||||
<td><p>OpenAI, Anthropic, and NVIDIA providers all work through the same endpoint.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Hot-refresh</p></td>
|
||||
<td><p>Provider credential changes and inference updates are picked up without recreating sandboxes.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="supported-api-patterns">
|
||||
<h2>Supported API Patterns<a class="headerlink" href="#supported-api-patterns" title="Link to this heading">#</a></h2>
|
||||
<p>Supported request patterns depend on the provider configured for <code class="docutils literal notranslate"><span class="pre">inference.local</span></code>.</p>
|
||||
<div class="sd-tab-set docutils">
|
||||
<input checked="checked" id="sd-tab-item-0" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-0">
|
||||
OpenAI-compatible</label><div class="sd-tab-content docutils">
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Pattern</p></th>
|
||||
<th class="head"><p>Method</p></th>
|
||||
<th class="head"><p>Path</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Chat Completions</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">POST</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/v1/chat/completions</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Completions</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">POST</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/v1/completions</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Responses</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">POST</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/v1/responses</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Model Discovery</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">GET</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/v1/models</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Model Discovery</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">GET</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/v1/models/*</span></code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<input id="sd-tab-item-1" name="sd-tab-set-0" type="radio">
|
||||
<label class="sd-tab-label" for="sd-tab-item-1">
|
||||
Anthropic-compatible</label><div class="sd-tab-content docutils">
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Pattern</p></th>
|
||||
<th class="head"><p>Method</p></th>
|
||||
<th class="head"><p>Path</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Messages</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">POST</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/v1/messages</span></code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Requests to <code class="docutils literal notranslate"><span class="pre">inference.local</span></code> that do not match the configured provider’s supported patterns are denied.</p>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Continue with one of the following:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To set up the backend behind <code class="docutils literal notranslate"><span class="pre">inference.local</span></code>, refer to <a class="reference internal" href="configure.html"><span class="doc">Configure Inference Routing</span></a>.</p></li>
|
||||
<li><p>To control external endpoints, refer to <a class="reference internal" href="../sandboxes/index.html#network-access-rules"><span class="std std-ref">Network Access Rules</span></a>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="../sandboxes/community-sandboxes.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Community Sandboxes</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="configure.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Configure Inference Routing</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#how-inference-local-works">How <code class="docutils literal notranslate"><span class="pre">inference.local</span></code> Works</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#supported-api-patterns">Supported API Patterns</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
# Sphinx inventory version 2
|
||||
# Project: NVIDIA OpenShell Developer Guide
|
||||
# Version:
|
||||
# The remainder of this file is compressed using zlib.
|
||||
xÚ••KoÛ0ÇïþÖ«ìÚ[Ñk€>²ÛΊÌÄBdÉ“¨<öé§„R⇲a— âŸü‘i[¬lÀ™p²Qƒæ±¾¯düõsƒfÏvÏÞ;0Ë´f?ÛúŠ|íÜNÁ~JÉ
|
||||
Þ³Ÿ]³·ó§ùØP4ÜX?å␍d‚ŽAìƒ|ØÛɧªa-‚FÞY䑯=×ÂÔÚÊ-à)‹+Ч<ÖàÀH˜␍#ÏÉ>Ý1>&À}¼:*øoÜŒ25†qÙJ=ÎO£'r�Â!Ô³_AÉíùп¤²1¾]ÎÕ5_Šë¥šÌE™Ü�´f6£m)Èz¼xϳûˆ3TfÓcJHÄz8␍¿Àim]¸»îȳ@᯶Ò-öÔ„-ŽØX3Œ¾ÎSjÕ¯{ ¤x™ÇeLæêÖ&”!…maOdcŠ+¡ÓNzÙ@+Êä�Kj”€KŠ*q}è:ë�·�:”ÁC"/ÉÆ^϶ô6¸øÐÍ èQ}}…‚_”ã¡òñ�]ÙCÔ¤mÛ`Æò³ù«cÞÊ$°eú|�Çsìˆ␍Ü �ÝûlfÑû=G—rL6~$õ7¾?xÏLYM�¶U¿/•ШÕèìNÕàn³œv%+§oÄð"[š=é‹x´N íg…MXå±ôSÞòÉ4dß;&.�ÄoÈ£¡†8Óø³�1Q¥ŽÙW…Ïa•»ú£Ï†ã
|
||||
@@ -1,964 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>CLI Reference — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'reference/cli';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Default Policy Reference" href="default-policy.html" />
|
||||
<link rel="prev" title="Configure Inference Routing" href="../inference/configure.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">CLI Reference</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="cli-reference">
|
||||
<h1>CLI Reference<a class="headerlink" href="#cli-reference" title="Link to this heading">#</a></h1>
|
||||
<p>Complete command reference for the <code class="docutils literal notranslate"><span class="pre">openshell</span></code> CLI. Every subcommand, flag, and option is documented here.</p>
|
||||
<section id="command-tree">
|
||||
<h2>Command Tree<a class="headerlink" href="#command-tree" title="Link to this heading">#</a></h2>
|
||||
<p>The full hierarchy of <code class="docutils literal notranslate"><span class="pre">openshell</span></code> subcommands:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>openshell
|
||||
├── status
|
||||
├── logs [name]
|
||||
├── term
|
||||
├── forward
|
||||
│ ├── start <port> <name>
|
||||
│ ├── stop <port> <name>
|
||||
│ └── list
|
||||
├── gateway
|
||||
│ ├── start
|
||||
│ ├── stop
|
||||
│ ├── destroy
|
||||
│ ├── info
|
||||
│ ├── add <url>
|
||||
│ ├── tunnel
|
||||
│ └── select [name]
|
||||
├── sandbox
|
||||
│ ├── create
|
||||
│ ├── get [name]
|
||||
│ ├── list
|
||||
│ ├── delete <name...> [--all]
|
||||
│ ├── connect [name]
|
||||
│ ├── upload [name]
|
||||
│ ├── download [name]
|
||||
│ └── ssh-config <name>
|
||||
├── policy
|
||||
│ ├── set <name>
|
||||
│ ├── get <name>
|
||||
│ └── list <name>
|
||||
├── provider
|
||||
│ ├── create
|
||||
│ ├── get <name>
|
||||
│ ├── list
|
||||
│ ├── update <name>
|
||||
│ └── delete <name>
|
||||
├── inference
|
||||
│ ├── set
|
||||
│ ├── update
|
||||
│ └── get
|
||||
└── completions <shell>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
<p>Commands that accept an optional <code class="docutils literal notranslate"><span class="pre">[name]</span></code> argument — such as <code class="docutils literal notranslate"><span class="pre">get</span></code>, <code class="docutils literal notranslate"><span class="pre">connect</span></code>, <code class="docutils literal notranslate"><span class="pre">upload</span></code>, <code class="docutils literal notranslate"><span class="pre">download</span></code>, and <code class="docutils literal notranslate"><span class="pre">logs</span></code> — fall back to the last-used sandbox when the name is omitted. The CLI records the sandbox name each time you create or connect, and prints a hint showing which sandbox was selected.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="status-logs-and-terminal">
|
||||
<h2>Status, Logs, and Terminal<a class="headerlink" href="#status-logs-and-terminal" title="Link to this heading">#</a></h2>
|
||||
<p>Check gateway health, stream sandbox logs, and launch the terminal dashboard:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Command</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">status</span></code></p></td>
|
||||
<td><p>Show the health and status of the active gateway.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">logs</span> <span class="pre">[name]</span></code></p></td>
|
||||
<td><p>View sandbox logs. Use <code class="docutils literal notranslate"><span class="pre">--tail</span></code> for streaming, <code class="docutils literal notranslate"><span class="pre">--source</span></code> and <code class="docutils literal notranslate"><span class="pre">--level</span></code> to filter.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">term</span></code></p></td>
|
||||
<td><p>Launch the OpenShell Terminal — a dashboard showing sandbox status, live logs, and policy decisions in a single view. Navigate with <code class="docutils literal notranslate"><span class="pre">j</span></code>/<code class="docutils literal notranslate"><span class="pre">k</span></code>, press <code class="docutils literal notranslate"><span class="pre">f</span></code> to follow live output, <code class="docutils literal notranslate"><span class="pre">s</span></code> to filter by source, and <code class="docutils literal notranslate"><span class="pre">q</span></code> to quit.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Refer to <a class="reference internal" href="../sandboxes/create-and-manage.html"><span class="doc">Create and Manage Sandboxes</span></a> for more on monitoring sandboxes and reading log entries.</p>
|
||||
</section>
|
||||
<section id="gateway-commands">
|
||||
<h2>Gateway Commands<a class="headerlink" href="#gateway-commands" title="Link to this heading">#</a></h2>
|
||||
<p>Manage the OpenShell runtime cluster.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Command</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">start</span></code></p></td>
|
||||
<td><p>Deploy a new cluster. Add <code class="docutils literal notranslate"><span class="pre">--remote</span> <span class="pre">user@host</span></code> for remote deployment.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">stop</span></code></p></td>
|
||||
<td><p>Stop the active cluster, preserving state.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">destroy</span></code></p></td>
|
||||
<td><p>Permanently remove the cluster and all its data.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">info</span></code></p></td>
|
||||
<td><p>Show detailed information about the cluster.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">add</span> <span class="pre"><url></span></code></p></td>
|
||||
<td><p>Register an existing remote gateway by URL.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">tunnel</span></code></p></td>
|
||||
<td><p>Set up a kubectl tunnel to a remote cluster.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">select</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Set the active cluster. All subsequent commands target this cluster.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">select</span></code></p></td>
|
||||
<td><p>List all registered clusters (when called without a name).</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="sandbox-commands">
|
||||
<h2>Sandbox Commands<a class="headerlink" href="#sandbox-commands" title="Link to this heading">#</a></h2>
|
||||
<p>Create and manage isolated agent execution environments.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Command</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">create</span></code></p></td>
|
||||
<td><p>Create a new sandbox. Refer to the flag reference below.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">get</span> <span class="pre">[name]</span></code></p></td>
|
||||
<td><p>Show detailed information about a sandbox.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">list</span></code></p></td>
|
||||
<td><p>List all sandboxes in the active cluster.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">delete</span> <span class="pre"><name...></span></code></p></td>
|
||||
<td><p>Delete one or more sandboxes by name. Use <code class="docutils literal notranslate"><span class="pre">--all</span></code> to delete every sandbox in the active gateway.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">connect</span> <span class="pre">[name]</span></code></p></td>
|
||||
<td><p>Open an interactive SSH session into a running sandbox.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">upload</span> <span class="pre">[name]</span></code></p></td>
|
||||
<td><p>Upload files from the host into a sandbox.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">download</span> <span class="pre">[name]</span></code></p></td>
|
||||
<td><p>Download files from a sandbox to the host.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">ssh-config</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Print SSH config for a sandbox. Append to <code class="docutils literal notranslate"><span class="pre">~/.ssh/config</span></code> for VS Code Remote-SSH.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<section id="sandbox-create-flags">
|
||||
<h3>Sandbox Create Flags<a class="headerlink" href="#sandbox-create-flags" title="Link to this heading">#</a></h3>
|
||||
<p>The following flags control sandbox creation:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Flag</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--name</span></code></p></td>
|
||||
<td><p>Assign a human-readable name to the sandbox. Auto-generated if omitted.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--provider</span></code></p></td>
|
||||
<td><p>Attach a credential provider. Repeatable for multiple providers.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--policy</span></code></p></td>
|
||||
<td><p>Path to a policy YAML file to apply at creation time.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--upload</span></code></p></td>
|
||||
<td><p>Upload local files into the sandbox before running.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--keep</span></code></p></td>
|
||||
<td><p>Keep the sandbox alive after the trailing command exits.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--forward</span></code></p></td>
|
||||
<td><p>Forward a local port into the sandbox at startup.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--from</span></code></p></td>
|
||||
<td><p>Build from a community sandbox name, local Dockerfile directory, or container image reference.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--</span> <span class="pre"><command></span></code></p></td>
|
||||
<td><p>The command to run inside the sandbox. Everything after <code class="docutils literal notranslate"><span class="pre">--</span></code> is passed as the agent command.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="policy-commands">
|
||||
<h2>Policy Commands<a class="headerlink" href="#policy-commands" title="Link to this heading">#</a></h2>
|
||||
<p>Apply and inspect sandbox policies at runtime.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Command</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">policy</span> <span class="pre">set</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Apply or update a policy on a running sandbox. Pass <code class="docutils literal notranslate"><span class="pre">--policy</span> <span class="pre"><file></span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">policy</span> <span class="pre">get</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Show the active policy for a sandbox. Add <code class="docutils literal notranslate"><span class="pre">--full</span></code> for the complete policy with metadata.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">policy</span> <span class="pre">list</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>List all policy versions applied to a sandbox, with status.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="port-forwarding-commands">
|
||||
<h2>Port Forwarding Commands<a class="headerlink" href="#port-forwarding-commands" title="Link to this heading">#</a></h2>
|
||||
<p>Forward sandbox ports to the host for local access.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Command</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">forward</span> <span class="pre">start</span> <span class="pre"><port></span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Forward a sandbox port to the host. Add <code class="docutils literal notranslate"><span class="pre">-d</span></code> for background mode.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">forward</span> <span class="pre">stop</span> <span class="pre"><port></span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Stop an active port forward.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">forward</span> <span class="pre">list</span></code></p></td>
|
||||
<td><p>List all active port forwards.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="provider-commands">
|
||||
<h2>Provider Commands<a class="headerlink" href="#provider-commands" title="Link to this heading">#</a></h2>
|
||||
<p>Manage credential providers that inject secrets into sandboxes.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Command</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">provider</span> <span class="pre">create</span></code></p></td>
|
||||
<td><p>Create a new credential provider. Refer to the flag reference below.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">provider</span> <span class="pre">get</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Show details of a provider.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">provider</span> <span class="pre">list</span></code></p></td>
|
||||
<td><p>List all providers in the active cluster.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">provider</span> <span class="pre">update</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Update a provider’s credentials or configuration.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">provider</span> <span class="pre">delete</span> <span class="pre"><name></span></code></p></td>
|
||||
<td><p>Delete a provider.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<section id="provider-create-flags">
|
||||
<h3>Provider Create Flags<a class="headerlink" href="#provider-create-flags" title="Link to this heading">#</a></h3>
|
||||
<p>The following flags control provider creation:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Flag</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--name</span></code></p></td>
|
||||
<td><p>Name for the provider.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--type</span></code></p></td>
|
||||
<td><p>Provider type: <code class="docutils literal notranslate"><span class="pre">claude</span></code>, <code class="docutils literal notranslate"><span class="pre">codex</span></code>, <code class="docutils literal notranslate"><span class="pre">opencode</span></code>, <code class="docutils literal notranslate"><span class="pre">github</span></code>, <code class="docutils literal notranslate"><span class="pre">gitlab</span></code>, <code class="docutils literal notranslate"><span class="pre">nvidia</span></code>, <code class="docutils literal notranslate"><span class="pre">generic</span></code>, <code class="docutils literal notranslate"><span class="pre">outlook</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--from-existing</span></code></p></td>
|
||||
<td><p>Discover credentials from your current shell environment variables.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--credential</span></code></p></td>
|
||||
<td><p>Set a credential explicitly. Format: <code class="docutils literal notranslate"><span class="pre">KEY=VALUE</span></code> or bare <code class="docutils literal notranslate"><span class="pre">KEY</span></code> to read from env. Repeatable.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--config</span></code></p></td>
|
||||
<td><p>Set a configuration value. Format: <code class="docutils literal notranslate"><span class="pre">KEY=VALUE</span></code>. Repeatable.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="inference-commands">
|
||||
<h2>Inference Commands<a class="headerlink" href="#inference-commands" title="Link to this heading">#</a></h2>
|
||||
<p>Configure the backend used by <code class="docutils literal notranslate"><span class="pre">https://inference.local</span></code>.</p>
|
||||
<section id="openshell-inference-set">
|
||||
<h3><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span> <span class="pre">set</span></code><a class="headerlink" href="#openshell-inference-set" title="Link to this heading">#</a></h3>
|
||||
<p>Set the provider and model for managed inference. Both flags are required.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Flag</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--provider</span></code></p></td>
|
||||
<td><p>Provider record name to use for injected credentials.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--model</span></code></p></td>
|
||||
<td><p>Model identifier to force on generation requests.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="openshell-inference-update">
|
||||
<h3><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span> <span class="pre">update</span></code><a class="headerlink" href="#openshell-inference-update" title="Link to this heading">#</a></h3>
|
||||
<p>Update only the fields you specify.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Flag</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--provider</span></code></p></td>
|
||||
<td><p>Replace the current provider record.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--model</span></code></p></td>
|
||||
<td><p>Replace the current model ID.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="openshell-inference-get">
|
||||
<h3><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span> <span class="pre">get</span></code><a class="headerlink" href="#openshell-inference-get" title="Link to this heading">#</a></h3>
|
||||
<p>Show the current inference configuration, including provider, model, and version.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="environment-variables">
|
||||
<h2>Environment Variables<a class="headerlink" href="#environment-variables" title="Link to this heading">#</a></h2>
|
||||
<p>The following environment variables override CLI defaults:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Variable</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">OPENSHELL_GATEWAY</span></code></p></td>
|
||||
<td><p>Name of the gateway to operate on. Overrides the active gateway set by <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">select</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">OPENSHELL_SANDBOX_POLICY</span></code></p></td>
|
||||
<td><p>Default path to a policy YAML file. When set, <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">create</span></code> uses this policy if no <code class="docutils literal notranslate"><span class="pre">--policy</span></code> flag is provided.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="shell-completions">
|
||||
<h2>Shell Completions<a class="headerlink" href="#shell-completions" title="Link to this heading">#</a></h2>
|
||||
<p>Generate shell completion scripts for tab completion:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>completions<span class="w"> </span>bash
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>completions<span class="w"> </span>zsh
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>completions<span class="w"> </span>fish
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Pipe the output to your shell’s config file:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>completions<span class="w"> </span>zsh<span class="w"> </span>>><span class="w"> </span>~/.zshrc
|
||||
<span class="gp">$ </span><span class="nb">source</span><span class="w"> </span>~/.zshrc
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="built-in-help">
|
||||
<h2>Built-in Help<a class="headerlink" href="#built-in-help" title="Link to this heading">#</a></h2>
|
||||
<p>Every command and subcommand includes built-in help. Use <code class="docutils literal notranslate"><span class="pre">--help</span></code> at any level to see available subcommands, flags, and usage examples:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>--help
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>--help
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--help
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>gateway<span class="w"> </span>--help
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Help output groups flags under distinct headings: <code class="docutils literal notranslate"><span class="pre">FLAGS</span></code> for command-specific options, <code class="docutils literal notranslate"><span class="pre">GATEWAY</span> <span class="pre">FLAGS</span></code> for <code class="docutils literal notranslate"><span class="pre">--gateway</span></code> and <code class="docutils literal notranslate"><span class="pre">--gateway-endpoint</span></code>, and <code class="docutils literal notranslate"><span class="pre">GLOBAL</span> <span class="pre">FLAGS</span></code> for <code class="docutils literal notranslate"><span class="pre">--verbose</span></code>, <code class="docutils literal notranslate"><span class="pre">--help</span></code>, and <code class="docutils literal notranslate"><span class="pre">--version</span></code>.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="../inference/configure.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Configure Inference Routing</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="default-policy.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Default Policy Reference</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#command-tree">Command Tree</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#status-logs-and-terminal">Status, Logs, and Terminal</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#gateway-commands">Gateway Commands</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#sandbox-commands">Sandbox Commands</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#sandbox-create-flags">Sandbox Create Flags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#policy-commands">Policy Commands</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#port-forwarding-commands">Port Forwarding Commands</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#provider-commands">Provider Commands</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#provider-create-flags">Provider Create Flags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#inference-commands">Inference Commands</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#openshell-inference-set"><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span> <span class="pre">set</span></code></a></li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#openshell-inference-update"><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span> <span class="pre">update</span></code></a></li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#openshell-inference-get"><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">inference</span> <span class="pre">get</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#environment-variables">Environment Variables</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#shell-completions">Shell Completions</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#built-in-help">Built-in Help</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,809 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Default Policy Reference — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'reference/default-policy';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Policy Schema Reference" href="policy-schema.html" />
|
||||
<link rel="prev" title="CLI Reference" href="cli.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Default Policy Reference</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="default-policy-reference">
|
||||
<h1>Default Policy Reference<a class="headerlink" href="#default-policy-reference" title="Link to this heading">#</a></h1>
|
||||
<p>The default policy is the policy applied when you create an OpenShell sandbox without <code class="docutils literal notranslate"><span class="pre">--policy</span></code>. It is defined in the <a class="reference external" href="https://github.com/NVIDIA/OpenShell/blob/main/deploy/docker/sandbox/dev-sandbox-policy.yaml" rel="noreferer noopener" target="_blank"><code class="docutils literal notranslate"><span class="pre">deploy/docker/sandbox/dev-sandbox-policy.yaml</span></code></a> file.</p>
|
||||
<section id="agent-compatibility">
|
||||
<h2>Agent Compatibility<a class="headerlink" href="#agent-compatibility" title="Link to this heading">#</a></h2>
|
||||
<p>The following table shows the coverage of the default policy for common agents.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Agent</p></th>
|
||||
<th class="head"><p>Coverage</p></th>
|
||||
<th class="head"><p>Action Required</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Claude Code</p></td>
|
||||
<td><p>Full</p></td>
|
||||
<td><p>None. Works out of the box.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>OpenCode</p></td>
|
||||
<td><p>Partial</p></td>
|
||||
<td><p>Add <code class="docutils literal notranslate"><span class="pre">opencode.ai</span></code> endpoint and OpenCode binary paths.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Codex</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p>Provide a complete custom policy with OpenAI endpoints and Codex binary paths.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>If you run a non-Claude agent without a custom policy, the agent’s API calls are denied by the proxy. You must provide a policy that declares the agent’s endpoints and binaries.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="default-policy-blocks">
|
||||
<h2>Default Policy Blocks<a class="headerlink" href="#default-policy-blocks" title="Link to this heading">#</a></h2>
|
||||
<p>The following tables show the default policy blocks pre-configured in the file.</p>
|
||||
<h2>Filesystem, Landlock, and Process</h2>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Section</p></th>
|
||||
<th class="head"><p>Setting</p></th>
|
||||
<th class="head"><p>Value</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><strong>Filesystem</strong></p></td>
|
||||
<td><p>Read-only</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/usr</span></code>, <code class="docutils literal notranslate"><span class="pre">/lib</span></code>, <code class="docutils literal notranslate"><span class="pre">/proc</span></code>, <code class="docutils literal notranslate"><span class="pre">/dev/urandom</span></code>, <code class="docutils literal notranslate"><span class="pre">/app</span></code>, <code class="docutils literal notranslate"><span class="pre">/etc</span></code>, <code class="docutils literal notranslate"><span class="pre">/var/log</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p></p></td>
|
||||
<td><p>Read-write</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">/sandbox</span></code>, <code class="docutils literal notranslate"><span class="pre">/tmp</span></code>, <code class="docutils literal notranslate"><span class="pre">/dev/null</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p></p></td>
|
||||
<td><p>Workdir included</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><strong>Landlock</strong></p></td>
|
||||
<td><p>Compatibility</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">best_effort</span></code> (uses the highest ABI the host kernel supports)</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><strong>Process</strong></p></td>
|
||||
<td><p>User / Group</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">sandbox</span></code> / <code class="docutils literal notranslate"><span class="pre">sandbox</span></code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h2>Network Policy Blocks</h2>
|
||||
<p>Each block pairs a set of endpoints (host and port) with a set of binaries (executable paths inside the sandbox). The proxy identifies the calling binary by resolving the socket to a PID through <code class="docutils literal notranslate"><span class="pre">/proc/net/tcp</span></code> and reading <code class="docutils literal notranslate"><span class="pre">/proc/{pid}/exe</span></code>. A connection is allowed only when both the destination and the calling binary match an entry in the same block. All other outbound traffic is denied.</p>
|
||||
<h3>Anthropic API and Telemetry</h3>
|
||||
<p>Allows Claude Code to reach its API, feature-flagging (Statsig), error reporting (Sentry), release notes, and the Claude platform dashboard.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Endpoint</p></th>
|
||||
<th class="head"><p>Port</p></th>
|
||||
<th class="head"><p>TLS</p></th>
|
||||
<th class="head"><p>Access</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">api.anthropic.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>terminate</p></td>
|
||||
<td><p>full</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">statsig.anthropic.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">sentry.io</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">raw.githubusercontent.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">platform.claude.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Only the following binaries can use these endpoints: <code class="docutils literal notranslate"><span class="pre">/usr/local/bin/claude</span></code>, <code class="docutils literal notranslate"><span class="pre">/usr/bin/node</span></code>.</p>
|
||||
<h3>Git Clone and Fetch</h3>
|
||||
<p>Allows <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span></code>, <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">fetch</span></code>, and <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">pull</span></code> over HTTPS via Git Smart HTTP. Push (<code class="docutils literal notranslate"><span class="pre">git-receive-pack</span></code>) is disabled by default.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Endpoint</p></th>
|
||||
<th class="head"><p>Port</p></th>
|
||||
<th class="head"><p>TLS</p></th>
|
||||
<th class="head"><p>Rules</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">github.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>terminate</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/**/info/refs*</span></code>, <code class="docutils literal notranslate"><span class="pre">POST</span> <span class="pre">/**/git-upload-pack</span></code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Only the following binaries can use these endpoints: <code class="docutils literal notranslate"><span class="pre">/usr/bin/git</span></code>.</p>
|
||||
<h3>NVIDIA API Catalog</h3>
|
||||
<p>Allows outbound calls to the NVIDIA hosted inference API. Used by agents that route LLM requests through <code class="docutils literal notranslate"><span class="pre">integrate.api.nvidia.com</span></code>.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Endpoint</p></th>
|
||||
<th class="head"><p>Port</p></th>
|
||||
<th class="head"><p>TLS</p></th>
|
||||
<th class="head"><p>Access</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">integrate.api.nvidia.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Only the following binaries can use these endpoints: <code class="docutils literal notranslate"><span class="pre">/usr/bin/curl</span></code>, <code class="docutils literal notranslate"><span class="pre">/bin/bash</span></code>, <code class="docutils literal notranslate"><span class="pre">/usr/local/bin/opencode</span></code>.</p>
|
||||
<h3>GitHub API (Read-Only)</h3>
|
||||
<p>Grants read-only access to the GitHub REST API. Enables issue reads, PR listing, and repository metadata lookups without allowing mutations.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Endpoint</p></th>
|
||||
<th class="head"><p>Port</p></th>
|
||||
<th class="head"><p>TLS</p></th>
|
||||
<th class="head"><p>Access</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">api.github.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>terminate</p></td>
|
||||
<td><p>read-only</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Only the following binaries can use these endpoints: <code class="docutils literal notranslate"><span class="pre">/usr/local/bin/claude</span></code>, <code class="docutils literal notranslate"><span class="pre">/usr/bin/gh</span></code>.</p>
|
||||
<h3>Python Package Installation</h3>
|
||||
<p>Allows <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> and <code class="docutils literal notranslate"><span class="pre">uv</span> <span class="pre">pip</span> <span class="pre">install</span></code> to reach PyPI, python-build-standalone releases on GitHub, and <code class="docutils literal notranslate"><span class="pre">downloads.python.org</span></code>.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Endpoint</p></th>
|
||||
<th class="head"><p>Port</p></th>
|
||||
<th class="head"><p>TLS</p></th>
|
||||
<th class="head"><p>Access</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">pypi.org</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">files.pythonhosted.org</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">github.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">objects.githubusercontent.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">api.github.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">downloads.python.org</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Only the following binaries can use these endpoints: <code class="docutils literal notranslate"><span class="pre">/sandbox/.venv/bin/python</span></code>, <code class="docutils literal notranslate"><span class="pre">/sandbox/.venv/bin/python3</span></code>, <code class="docutils literal notranslate"><span class="pre">/sandbox/.venv/bin/pip</span></code>, <code class="docutils literal notranslate"><span class="pre">/app/.venv/bin/python</span></code>, <code class="docutils literal notranslate"><span class="pre">/app/.venv/bin/python3</span></code>, <code class="docutils literal notranslate"><span class="pre">/app/.venv/bin/pip</span></code>, <code class="docutils literal notranslate"><span class="pre">/usr/local/bin/uv</span></code>, <code class="docutils literal notranslate"><span class="pre">/sandbox/.uv/python/**</span></code>.</p>
|
||||
<h3>VS Code Remote and Marketplace</h3>
|
||||
<p>Allows VS Code Server, Remote Containers, and extension marketplace traffic so remote development sessions can download updates and extensions.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Endpoint</p></th>
|
||||
<th class="head"><p>Port</p></th>
|
||||
<th class="head"><p>TLS</p></th>
|
||||
<th class="head"><p>Access</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">update.code.visualstudio.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">*.vo.msecnd.net</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">vscode.download.prss.microsoft.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">marketplace.visualstudio.com</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">*.gallerycdn.vsassets.io</span></code></p></td>
|
||||
<td><p>443</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>L4 passthrough</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Only the following binaries can use these endpoints: <code class="docutils literal notranslate"><span class="pre">/usr/bin/curl</span></code>, <code class="docutils literal notranslate"><span class="pre">/usr/bin/wget</span></code>, <code class="docutils literal notranslate"><span class="pre">/sandbox/.vscode-server/**</span></code>, <code class="docutils literal notranslate"><span class="pre">/sandbox/.vscode-remote-containers/**</span></code>.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="cli.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">CLI Reference</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="policy-schema.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Policy Schema Reference</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#agent-compatibility">Agent Compatibility</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#default-policy-blocks">Default Policy Blocks</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,963 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Policy Schema Reference — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'reference/policy-schema';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Support Matrix" href="support-matrix.html" />
|
||||
<link rel="prev" title="Default Policy Reference" href="default-policy.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Policy Schema Reference</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="policy-schema-reference">
|
||||
<h1>Policy Schema Reference<a class="headerlink" href="#policy-schema-reference" title="Link to this heading">#</a></h1>
|
||||
<p>Complete field reference for the sandbox policy YAML. Each field is documented with its type, whether it is required, and whether it is static (locked at sandbox creation) or dynamic (hot-reloadable on a running sandbox).</p>
|
||||
<section id="top-level-structure">
|
||||
<h2>Top-Level Structure<a class="headerlink" href="#top-level-structure" title="Link to this heading">#</a></h2>
|
||||
<p>A policy YAML file contains the following top-level fields:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
|
||||
<span class="nt">filesystem_policy</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="w"> </span><span class="nv">...</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="nt">landlock</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="w"> </span><span class="nv">...</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="nt">process</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="w"> </span><span class="nv">...</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="nt">network_policies</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="w"> </span><span class="nv">...</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Category</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">version</span></code></p></td>
|
||||
<td><p>integer</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>–</p></td>
|
||||
<td><p>Policy schema version. Must be <code class="docutils literal notranslate"><span class="pre">1</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">filesystem_policy</span></code></p></td>
|
||||
<td><p>object</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Static</p></td>
|
||||
<td><p>Controls which directories the agent can read and write.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">landlock</span></code></p></td>
|
||||
<td><p>object</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Static</p></td>
|
||||
<td><p>Configures Landlock LSM enforcement behavior.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">process</span></code></p></td>
|
||||
<td><p>object</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Static</p></td>
|
||||
<td><p>Sets the user and group the agent process runs as.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">network_policies</span></code></p></td>
|
||||
<td><p>map</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Dynamic</p></td>
|
||||
<td><p>Declares which binaries can reach which network endpoints.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Static fields are set at sandbox creation time. Changing them requires destroying and recreating the sandbox. Dynamic fields can be updated on a running sandbox with <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">policy</span> <span class="pre">set</span></code> and take effect without restarting.</p>
|
||||
</section>
|
||||
<section id="version">
|
||||
<h2>Version<a class="headerlink" href="#version" title="Link to this heading">#</a></h2>
|
||||
<p>The version field identifies which schema the policy uses:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">version</span></code></p></td>
|
||||
<td><p>integer</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>Schema version number. Currently must be <code class="docutils literal notranslate"><span class="pre">1</span></code>.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="filesystem-policy">
|
||||
<h2>Filesystem Policy<a class="headerlink" href="#filesystem-policy" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Category:</strong> Static</p>
|
||||
<p>Controls filesystem access inside the sandbox. Paths not listed in either <code class="docutils literal notranslate"><span class="pre">read_only</span></code> or <code class="docutils literal notranslate"><span class="pre">read_write</span></code> are inaccessible.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">include_workdir</span></code></p></td>
|
||||
<td><p>bool</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>When <code class="docutils literal notranslate"><span class="pre">true</span></code>, automatically adds the agent’s working directory to <code class="docutils literal notranslate"><span class="pre">read_write</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">read_only</span></code></p></td>
|
||||
<td><p>list of strings</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Paths the agent can read but not modify. Typically system directories like <code class="docutils literal notranslate"><span class="pre">/usr</span></code>, <code class="docutils literal notranslate"><span class="pre">/lib</span></code>, <code class="docutils literal notranslate"><span class="pre">/etc</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">read_write</span></code></p></td>
|
||||
<td><p>list of strings</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Paths the agent can read and write. Typically <code class="docutils literal notranslate"><span class="pre">/sandbox</span></code> (working directory) and <code class="docutils literal notranslate"><span class="pre">/tmp</span></code>.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p><strong>Validation constraints:</strong></p>
|
||||
<ul class="simple">
|
||||
<li><p>Every path must be absolute (start with <code class="docutils literal notranslate"><span class="pre">/</span></code>).</p></li>
|
||||
<li><p>Paths must not contain <code class="docutils literal notranslate"><span class="pre">..</span></code> traversal components. The server normalizes paths before storage, but rejects policies where traversal would escape the intended scope.</p></li>
|
||||
<li><p>Read-write paths must not be overly broad (for example, <code class="docutils literal notranslate"><span class="pre">/</span></code> alone is rejected).</p></li>
|
||||
<li><p>Each individual path must not exceed 4096 characters.</p></li>
|
||||
<li><p>The combined total of <code class="docutils literal notranslate"><span class="pre">read_only</span></code> and <code class="docutils literal notranslate"><span class="pre">read_write</span></code> paths must not exceed 256.</p></li>
|
||||
</ul>
|
||||
<p>Policies that violate these constraints are rejected with <code class="docutils literal notranslate"><span class="pre">INVALID_ARGUMENT</span></code> at creation or update time. Disk-loaded YAML policies that fail validation fall back to a restrictive default.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">filesystem_policy</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">include_workdir</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
||||
<span class="w"> </span><span class="nt">read_only</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/lib</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/proc</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/dev/urandom</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/etc</span>
|
||||
<span class="w"> </span><span class="nt">read_write</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/sandbox</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/tmp</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/dev/null</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="landlock">
|
||||
<h2>Landlock<a class="headerlink" href="#landlock" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Category:</strong> Static</p>
|
||||
<p>Configures <a class="reference external" href="https://docs.kernel.org/security/landlock.html" rel="noreferer noopener" target="_blank">Landlock LSM</a> enforcement at the kernel level. Landlock provides mandatory filesystem access control below what UNIX permissions allow.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Values</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">compatibility</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">best_effort</span></code>, <code class="docutils literal notranslate"><span class="pre">hard_requirement</span></code></p></td>
|
||||
<td><p>How OpenShell handles kernel ABI differences. <code class="docutils literal notranslate"><span class="pre">best_effort</span></code> uses the highest Landlock ABI the host kernel supports. <code class="docutils literal notranslate"><span class="pre">hard_requirement</span></code> fails if the required ABI is unavailable.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">landlock</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">compatibility</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">best_effort</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="process">
|
||||
<h2>Process<a class="headerlink" href="#process" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Category:</strong> Static</p>
|
||||
<p>Sets the OS-level identity for the agent process inside the sandbox.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">run_as_user</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>The user name or UID the agent process runs as. Default: <code class="docutils literal notranslate"><span class="pre">sandbox</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">run_as_group</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>The group name or GID the agent process runs as. Default: <code class="docutils literal notranslate"><span class="pre">sandbox</span></code>.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p><strong>Validation constraint:</strong> Neither <code class="docutils literal notranslate"><span class="pre">run_as_user</span></code> nor <code class="docutils literal notranslate"><span class="pre">run_as_group</span></code> may be set to <code class="docutils literal notranslate"><span class="pre">root</span></code> or <code class="docutils literal notranslate"><span class="pre">0</span></code>. Policies that request root process identity are rejected at creation or update time.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">process</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">run_as_user</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sandbox</span>
|
||||
<span class="w"> </span><span class="nt">run_as_group</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sandbox</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="network-policies">
|
||||
<h2>Network Policies<a class="headerlink" href="#network-policies" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Category:</strong> Dynamic</p>
|
||||
<p>A map of named network policy entries. Each entry declares a set of endpoints and a set of binaries. Only the listed binaries are permitted to connect to the listed endpoints. The map key is a logical identifier. The <code class="docutils literal notranslate"><span class="pre">name</span></code> field inside the entry is the display name used in logs.</p>
|
||||
<section id="network-policy-entry">
|
||||
<h3>Network Policy Entry<a class="headerlink" href="#network-policy-entry" title="Link to this heading">#</a></h3>
|
||||
<p>Each entry in the <code class="docutils literal notranslate"><span class="pre">network_policies</span></code> map has the following fields:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">name</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Display name for the policy entry. Used in log output. Defaults to the map key.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">endpoints</span></code></p></td>
|
||||
<td><p>list of endpoint objects</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>Hosts and ports this entry permits.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">binaries</span></code></p></td>
|
||||
<td><p>list of binary objects</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>Executables allowed to connect to these endpoints.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="endpoint-object">
|
||||
<h3>Endpoint Object<a class="headerlink" href="#endpoint-object" title="Link to this heading">#</a></h3>
|
||||
<p>Each endpoint defines a reachable destination and optional inspection rules.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">host</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>Hostname or IP address. Supports wildcards: <code class="docutils literal notranslate"><span class="pre">*.example.com</span></code> matches any subdomain.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">port</span></code></p></td>
|
||||
<td><p>integer</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>TCP port number.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">protocol</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Set to <code class="docutils literal notranslate"><span class="pre">rest</span></code> to enable HTTP request inspection. Omit for TCP passthrough.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">tls</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>TLS handling mode. <code class="docutils literal notranslate"><span class="pre">terminate</span></code> decrypts TLS at the proxy for inspection. <code class="docutils literal notranslate"><span class="pre">passthrough</span></code> forwards encrypted traffic without inspection. Only relevant when <code class="docutils literal notranslate"><span class="pre">protocol</span></code> is <code class="docutils literal notranslate"><span class="pre">rest</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">enforcement</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">enforce</span></code> actively blocks disallowed requests. <code class="docutils literal notranslate"><span class="pre">audit</span></code> logs violations but allows traffic through.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">access</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>HTTP access level. One of <code class="docutils literal notranslate"><span class="pre">read-only</span></code>, <code class="docutils literal notranslate"><span class="pre">read-write</span></code>, or <code class="docutils literal notranslate"><span class="pre">full</span></code>. Mutually exclusive with <code class="docutils literal notranslate"><span class="pre">rules</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">rules</span></code></p></td>
|
||||
<td><p>list of rule objects</p></td>
|
||||
<td><p>No</p></td>
|
||||
<td><p>Fine-grained per-method, per-path allow rules. Mutually exclusive with <code class="docutils literal notranslate"><span class="pre">access</span></code>.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<section id="access-levels">
|
||||
<h4>Access Levels<a class="headerlink" href="#access-levels" title="Link to this heading">#</a></h4>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">access</span></code> field accepts one of the following values:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Value</p></th>
|
||||
<th class="head"><p>Allowed HTTP Methods</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">full</span></code></p></td>
|
||||
<td><p>All methods and paths.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">read-only</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">GET</span></code>, <code class="docutils literal notranslate"><span class="pre">HEAD</span></code>, <code class="docutils literal notranslate"><span class="pre">OPTIONS</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">read-write</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">GET</span></code>, <code class="docutils literal notranslate"><span class="pre">HEAD</span></code>, <code class="docutils literal notranslate"><span class="pre">OPTIONS</span></code>, <code class="docutils literal notranslate"><span class="pre">POST</span></code>, <code class="docutils literal notranslate"><span class="pre">PUT</span></code>, <code class="docutils literal notranslate"><span class="pre">PATCH</span></code>.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="rule-object">
|
||||
<h4>Rule Object<a class="headerlink" href="#rule-object" title="Link to this heading">#</a></h4>
|
||||
<p>Used when <code class="docutils literal notranslate"><span class="pre">access</span></code> is not set. Each rule explicitly allows a method and path combination.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">allow.method</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>HTTP method to allow (for example, <code class="docutils literal notranslate"><span class="pre">GET</span></code>, <code class="docutils literal notranslate"><span class="pre">POST</span></code>).</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">allow.path</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>URL path pattern. Supports <code class="docutils literal notranslate"><span class="pre">*</span></code> and <code class="docutils literal notranslate"><span class="pre">**</span></code> glob syntax.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>Example with rules:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">rules</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">allow</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">GET</span>
|
||||
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/**/info/refs*</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">allow</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">POST</span>
|
||||
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/**/git-upload-pack</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="binary-object">
|
||||
<h3>Binary Object<a class="headerlink" href="#binary-object" title="Link to this heading">#</a></h3>
|
||||
<p>Identifies an executable that is permitted to use the associated endpoints.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Field</p></th>
|
||||
<th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Required</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">path</span></code></p></td>
|
||||
<td><p>string</p></td>
|
||||
<td><p>Yes</p></td>
|
||||
<td><p>Filesystem path to the executable. Supports glob patterns with <code class="docutils literal notranslate"><span class="pre">*</span></code> and <code class="docutils literal notranslate"><span class="pre">**</span></code>. For example, <code class="docutils literal notranslate"><span class="pre">/sandbox/.vscode-server/**</span></code> matches any executable under that directory tree.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="full-example">
|
||||
<h3>Full Example<a class="headerlink" href="#full-example" title="Link to this heading">#</a></h3>
|
||||
<p>The following policy grants read-only GitHub API access and npm registry access:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">network_policies</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">github_rest_api</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">github-rest-api</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">api.github.com</span>
|
||||
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">443</span>
|
||||
<span class="w"> </span><span class="nt">protocol</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">rest</span>
|
||||
<span class="w"> </span><span class="nt">tls</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">terminate</span>
|
||||
<span class="w"> </span><span class="nt">enforcement</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">enforce</span>
|
||||
<span class="w"> </span><span class="nt">access</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">read-only</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr/local/bin/claude</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr/bin/node</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr/bin/gh</span>
|
||||
<span class="w"> </span><span class="nt">npm_registry</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">npm-registry</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">registry.npmjs.org</span>
|
||||
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">443</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr/bin/npm</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr/bin/node</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="default-policy.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Default Policy Reference</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="support-matrix.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Support Matrix</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#top-level-structure">Top-Level Structure</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#version">Version</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#filesystem-policy">Filesystem Policy</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#landlock">Landlock</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#process">Process</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#network-policies">Network Policies</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#network-policy-entry">Network Policy Entry</a></li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#endpoint-object">Endpoint Object</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#access-levels">Access Levels</a></li>
|
||||
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#rule-object">Rule Object</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#binary-object">Binary Object</a></li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#full-example">Full Example</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,745 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Support Matrix — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'reference/support-matrix';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="License" href="../resources/eula.html" />
|
||||
<link rel="prev" title="Policy Schema Reference" href="policy-schema.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Support Matrix</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="support-matrix">
|
||||
<h1>Support Matrix<a class="headerlink" href="#support-matrix" title="Link to this heading">#</a></h1>
|
||||
<p>This page lists the platform, software, runtime, and kernel requirements for running OpenShell.</p>
|
||||
<section id="supported-platforms">
|
||||
<h2>Supported Platforms<a class="headerlink" href="#supported-platforms" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell publishes multi-architecture container images for <code class="docutils literal notranslate"><span class="pre">linux/amd64</span></code> and <code class="docutils literal notranslate"><span class="pre">linux/arm64</span></code>. The CLI is supported on the following host platforms:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Platform</p></th>
|
||||
<th class="head"><p>Architecture</p></th>
|
||||
<th class="head"><p>Status</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Linux (Debian/Ubuntu)</p></td>
|
||||
<td><p>x86_64 (amd64)</p></td>
|
||||
<td><p>Supported</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Linux (Debian/Ubuntu)</p></td>
|
||||
<td><p>aarch64 (arm64)</p></td>
|
||||
<td><p>Supported</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>macOS (Docker Desktop)</p></td>
|
||||
<td><p>Apple Silicon (arm64)</p></td>
|
||||
<td><p>Supported</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>macOS (Docker Desktop)</p></td>
|
||||
<td><p>Intel (amd64)</p></td>
|
||||
<td><p>Supported</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Windows (WSL 2 + Docker Desktop)</p></td>
|
||||
<td><p>x86_64</p></td>
|
||||
<td><p>Untested</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="software-prerequisites">
|
||||
<h2>Software Prerequisites<a class="headerlink" href="#software-prerequisites" title="Link to this heading">#</a></h2>
|
||||
<p>The following software must be installed on the host before using the OpenShell CLI:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Component</p></th>
|
||||
<th class="head"><p>Minimum Version</p></th>
|
||||
<th class="head"><p>Notes</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Python</p></td>
|
||||
<td><p>3.12</p></td>
|
||||
<td><p>Python 3.12 and 3.13 are supported.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.astral.sh/uv/" rel="noreferer noopener" target="_blank">uv</a></p></td>
|
||||
<td><p>0.9</p></td>
|
||||
<td><p>Used to install the CLI (<code class="docutils literal notranslate"><span class="pre">uv</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">openshell</span></code>).</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Docker Desktop or Docker Engine</p></td>
|
||||
<td><p>—</p></td>
|
||||
<td><p>Must be running before any <code class="docutils literal notranslate"><span class="pre">openshell</span></code> command. No minimum version is enforced.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="sandbox-runtime-versions">
|
||||
<h2>Sandbox Runtime Versions<a class="headerlink" href="#sandbox-runtime-versions" title="Link to this heading">#</a></h2>
|
||||
<p>The base sandbox container image ships the following components. These versions apply to sandboxes created with the default image (<code class="docutils literal notranslate"><span class="pre">ghcr.io/nvidia/openshell/sandbox</span></code>).</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Component</p></th>
|
||||
<th class="head"><p>Version</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Base OS</p></td>
|
||||
<td><p>Debian Bookworm</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Python</p></td>
|
||||
<td><p>3.12.13</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Node.js</p></td>
|
||||
<td><p>22.22.1</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>npm</p></td>
|
||||
<td><p>11.11.0</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>uv</p></td>
|
||||
<td><p>0.10.8</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Claude Code</p></td>
|
||||
<td><p>Latest (installed at image build time)</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>OpenCode</p></td>
|
||||
<td><p>1.2.18</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Codex</p></td>
|
||||
<td><p>0.111.0</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="container-images">
|
||||
<h2>Container Images<a class="headerlink" href="#container-images" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell uses several container images that are pulled automatically during gateway startup and sandbox creation. All images are published for <code class="docutils literal notranslate"><span class="pre">linux/amd64</span></code> and <code class="docutils literal notranslate"><span class="pre">linux/arm64</span></code>.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Image</p></th>
|
||||
<th class="head"><p>Registry</p></th>
|
||||
<th class="head"><p>Reference</p></th>
|
||||
<th class="head"><p>Pulled When</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Cluster</p></td>
|
||||
<td><p>ghcr.io</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">ghcr.io/nvidia/openshell/cluster:latest</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">gateway</span> <span class="pre">start</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Server</p></td>
|
||||
<td><p>ghcr.io</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">ghcr.io/nvidia/openshell/server:latest</span></code></p></td>
|
||||
<td><p>Cluster startup (via Helm chart)</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Sandbox</p></td>
|
||||
<td><p>ghcr.io</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">ghcr.io/nvidia/openshell/sandbox:latest</span></code></p></td>
|
||||
<td><p>First sandbox creation (via Helm chart)</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Community sandboxes</p></td>
|
||||
<td><p>GHCR</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">ghcr.io/nvidia/openshell-community/sandboxes/{name}:latest</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">create</span> <span class="pre">--from</span> <span class="pre"><name></span></code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>The cluster image is based on <code class="docutils literal notranslate"><span class="pre">rancher/k3s:v1.35.2-k3s1</span></code> and bundles the Helm charts and Kubernetes manifests required to bootstrap the control plane. The server and sandbox images are pulled separately at runtime.</p>
|
||||
<p>To override the default image references, set the following environment variables:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Variable</p></th>
|
||||
<th class="head"><p>Purpose</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">OPENSHELL_CLUSTER_IMAGE</span></code></p></td>
|
||||
<td><p>Override the cluster image reference.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">OPENSHELL_COMMUNITY_REGISTRY</span></code></p></td>
|
||||
<td><p>Override the registry for community sandbox images.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="kernel-requirements">
|
||||
<h2>Kernel Requirements<a class="headerlink" href="#kernel-requirements" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell enforces sandbox isolation through two Linux kernel security modules:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Module</p></th>
|
||||
<th class="head"><p>Requirement</p></th>
|
||||
<th class="head"><p>Details</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><a class="reference external" href="https://docs.kernel.org/security/landlock.html" rel="noreferer noopener" target="_blank">Landlock LSM</a></p></td>
|
||||
<td><p>Recommended</p></td>
|
||||
<td><p>Enforces filesystem access restrictions at the kernel level. The <code class="docutils literal notranslate"><span class="pre">best_effort</span></code> compatibility mode uses the highest Landlock ABI the host kernel supports. The <code class="docutils literal notranslate"><span class="pre">hard_requirement</span></code> mode fails sandbox creation if the required ABI is unavailable.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>seccomp</p></td>
|
||||
<td><p>Required</p></td>
|
||||
<td><p>Filters dangerous system calls. Available on all modern Linux kernels (3.17+).</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>On macOS, these kernel modules run inside the Docker Desktop Linux VM, not on the host kernel.</p>
|
||||
</section>
|
||||
<section id="agent-compatibility">
|
||||
<h2>Agent Compatibility<a class="headerlink" href="#agent-compatibility" title="Link to this heading">#</a></h2>
|
||||
<p>For the full list of supported agents and their default policy coverage, refer to the <a class="reference internal" href="../sandboxes/index.html#supported-agents"><span class="std std-ref">Supported Agents</span></a> table.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="policy-schema.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Policy Schema Reference</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="../resources/eula.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">License</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#supported-platforms">Supported Platforms</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#software-prerequisites">Software Prerequisites</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#sandbox-runtime-versions">Sandbox Runtime Versions</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#container-images">Container Images</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#kernel-requirements">Kernel Requirements</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#agent-compatibility">Agent Compatibility</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"reference/support-matrix","title":"Support Matrix","url":"reference/support-matrix.html","last_modified":"2026-03-11T19:51:18.153363+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"content":"Support Matrix This page lists the platform, software, runtime, and kernel requirements for running OpenShell. Supported Platforms OpenShell publishes multi-architecture container images for linux/amd64 and linux/arm64 . The CLI is supported on the following host platforms: Platform Architecture Status Linux (Debian/Ubuntu) x86_64 (amd64) Supported Linux (Debian/Ubuntu) aarch64 (arm64) Supported macOS (Docker Desktop) Apple Silicon (arm64) Supported macOS (Docker Desktop) Intel (amd64) Supported Windows (WSL 2 + Docker Desktop) x86_64 Untested Software Prerequisites The following software must be installed on the host before using the OpenShell CLI: Component Minimum Version Notes Python 3.12 Python 3.12 and 3.13 are supported. uv 0.9 Used to install the CLI ( uv pip install openshell ). Docker Desktop or Docker Engine — Must be running before any openshell command. No minimum version is enforced. Sandbox Runtime Versions The base sandbox container image ships the following components. These versions apply to sandboxes created with the default image ( ghcr.io/nvidia/openshell/sandbox ). Component Version Base OS Debian Bookworm Python 3.12.13 Node.js 22.22.1 npm 11.11.0 uv 0.10.8 Claude Code Latest (installed at image build time) OpenCode 1.2.18 Codex 0.111.0 Container Images OpenShell uses several container images that are pulled automatically during gateway startup and sandbox creation. All images are published for linux/amd64 and linux/arm64 . Image Registry Reference Pulled When Cluster ghcr.io ghcr.io/nvidia/openshell/cluster:latest openshell gateway start Server ghcr.io ghcr.io/nvidia/openshell/server:latest Cluster startup (via Helm chart) Sandbox ghcr.io ghcr.io/nvidia/openshell/sandbox:latest First sandbox creation (via Helm chart) Community sandboxes GHCR ghcr.io/nvidia/openshell-community/sandboxes/{name}:latest openshell sandbox create --from <name> The cluster image is based on rancher/k3s:v1.35.2-k3s1 and bundles the Helm charts and Kubernetes manifests required to bootstrap the control plane. The server and sandbox images are pulled separately at runtime. To override the default image references, set the following environment variables: Variable Purpose OPENSHELL_CLUSTER_IMAGE Override the cluster image reference. OPENSHELL_COMMUNITY_REGISTRY Override the registry for community sandbox images. Kernel Requirements OpenShell enforces sandbox isolation through two Linux kernel security modules: Module Requirement Details Landlock LSM Recommended Enforces filesystem access restrictions at the kernel level. The best_effort compatibility mode uses the highest Landlock ABI the host kernel supports. The hard_requirement mode fails sandbox creation if the required ABI is unavailable. seccomp Required Filters dangerous system calls. Available on all modern Linux kernels (3.17+). On macOS, these kernel modules run inside the Docker Desktop Linux VM, not on the host kernel. Agent Compatibility For the full list of supported agents and their default policy coverage, refer to the Supported Agents table","format":"text","summary":"This page lists the platform, software, runtime, and kernel requirements for running OpenShell.","headings":[{"text":"Support Matrix","level":1},{"text":"Supported Platforms","level":2},{"text":"Software Prerequisites","level":2},{"text":"Sandbox Runtime Versions","level":2},{"text":"Container Images","level":2},{"text":"Kernel Requirements","level":2},{"text":"Agent Compatibility","level":2}]}
|
||||
@@ -1,527 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>License — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'resources/eula';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="prev" title="Support Matrix" href="../reference/support-matrix.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">License</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="license">
|
||||
<h1>License<a class="headerlink" href="#license" title="Link to this heading">#</a></h1>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="../reference/support-matrix.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Support Matrix</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="bd-sidebar-secondary"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"resources/eula","title":"License","url":"resources/eula.html","last_modified":"2026-03-11T19:51:18.298383+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"NVIDIA OpenShell license agreement and terms of use.","tags":["License","EULA"],"topics":["Legal"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"License","format":"text","summary":"<!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0 --> License","headings":[{"text":"License","level":1}]}
|
||||
@@ -1,667 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Community Sandboxes — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'sandboxes/community-sandboxes';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="About Inference Routing" href="../inference/index.html" />
|
||||
<link rel="prev" title="Customize Sandbox Policies" href="policies.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Community Sandboxes</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="community-sandboxes">
|
||||
<h1>Community Sandboxes<a class="headerlink" href="#community-sandboxes" title="Link to this heading">#</a></h1>
|
||||
<p>Use pre-built sandboxes from the OpenShell Community catalog, or contribute your
|
||||
own.</p>
|
||||
<section id="what-are-community-sandboxes">
|
||||
<h2>What Are Community Sandboxes<a class="headerlink" href="#what-are-community-sandboxes" title="Link to this heading">#</a></h2>
|
||||
<p>Community sandboxes are ready-to-use environments published in the
|
||||
<a class="reference external" href="https://github.com/NVIDIA/OpenShell-Community" rel="noreferer noopener" target="_blank">OpenShell Community</a> repository.
|
||||
Each sandbox bundles a Dockerfile, policy, optional skills, and startup scripts
|
||||
into a single package that you can launch with one command.</p>
|
||||
</section>
|
||||
<section id="current-catalog">
|
||||
<h2>Current Catalog<a class="headerlink" href="#current-catalog" title="Link to this heading">#</a></h2>
|
||||
<p>The following community sandboxes are available in the catalog.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Sandbox</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">base</span></code></p></td>
|
||||
<td><p>Foundational image with system tools and dev environment</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">openclaw</span></code></p></td>
|
||||
<td><p>Open agent manipulation and control</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">sdg</span></code></p></td>
|
||||
<td><p>Synthetic data generation workflows</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">simulation</span></code></p></td>
|
||||
<td><p>General-purpose simulation sandboxes</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="use-a-community-sandbox">
|
||||
<h2>Use a Community Sandbox<a class="headerlink" href="#use-a-community-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p>Launch a community sandbox by name with the <code class="docutils literal notranslate"><span class="pre">--from</span></code> flag:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>openclaw
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>When you pass <code class="docutils literal notranslate"><span class="pre">--from</span></code> with a community sandbox name, the CLI:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Resolves the name against the
|
||||
<a class="reference external" href="https://github.com/NVIDIA/OpenShell-Community" rel="noreferer noopener" target="_blank">OpenShell Community</a> repository.</p></li>
|
||||
<li><p>Pulls the Dockerfile, policy, skills, and any startup scripts.</p></li>
|
||||
<li><p>Builds the container image locally.</p></li>
|
||||
<li><p>Creates the sandbox with the bundled configuration applied.</p></li>
|
||||
</ol>
|
||||
<p>You end up with a running sandbox whose image, policy, and tooling are all
|
||||
preconfigured by the community package.</p>
|
||||
<section id="other-sources">
|
||||
<h3>Other Sources<a class="headerlink" href="#other-sources" title="Link to this heading">#</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">--from</span></code> flag also accepts:</p>
|
||||
<ul>
|
||||
<li><p>Local directory paths: Point to a directory on disk that contains a
|
||||
Dockerfile and optional policy/skills:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>./my-sandbox-dir
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p>Container image references: Use an existing container image directly:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>my-registry.example.com/my-image:latest
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section id="contribute-a-community-sandbox">
|
||||
<h2>Contribute a Community Sandbox<a class="headerlink" href="#contribute-a-community-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p>Each community sandbox is a directory under <code class="docutils literal notranslate"><span class="pre">sandboxes/</span></code> in the
|
||||
<a class="reference external" href="https://github.com/NVIDIA/OpenShell-Community" rel="noreferer noopener" target="_blank">OpenShell Community</a> repository.
|
||||
At minimum, a sandbox directory must contain:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>: Defines the container image</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">README.md</span></code>: Describes the sandbox and how to use it</p></li>
|
||||
</ul>
|
||||
<p>Optional files:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">policy.yaml</span></code>: Default policy applied when the sandbox launches</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">skills/</span></code>: Agent skill definitions bundled with the sandbox</p></li>
|
||||
<li><p>Startup scripts: Any scripts the Dockerfile or entrypoint invokes</p></li>
|
||||
</ul>
|
||||
<p>To contribute, fork the repository, add your sandbox directory, and open a pull
|
||||
request. Refer to the repository’s
|
||||
<a class="reference external" href="https://github.com/NVIDIA/OpenShell-Community/blob/main/CONTRIBUTING.md" rel="noreferer noopener" target="_blank">CONTRIBUTING.md</a>
|
||||
for submission guidelines.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>The community catalog is designed to grow. If you have built a sandbox that
|
||||
supports a particular workflow (data processing, simulation, code review,
|
||||
or anything else), consider contributing it back so others can use it.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Explore related topics:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Need to supply API keys or tokens?</strong> Set up <a class="reference internal" href="providers.html"><span class="doc">Providers</span></a> for credential management.</p></li>
|
||||
<li><p><strong>Want to customize the sandbox policy?</strong> Write custom rules in <a class="reference internal" href="policies.html"><span class="doc">Customize Sandbox Policies</span></a>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="policies.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Customize Sandbox Policies</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="../inference/index.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">About Inference Routing</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#what-are-community-sandboxes">What Are Community Sandboxes</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#current-catalog">Current Catalog</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#use-a-community-sandbox">Use a Community Sandbox</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#other-sources">Other Sources</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#contribute-a-community-sandbox">Contribute a Community Sandbox</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"sandboxes/community-sandboxes","title":"Community Sandboxes","url":"sandboxes/community-sandboxes.html","last_modified":"2026-03-11T19:51:18.178854+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Use pre-built sandboxes from the OpenShell Community catalog or contribute your own.","tags":["Community","Sandbox","Container Image","Open Source"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Community Sandboxes Use pre-built sandboxes from the OpenShell Community catalog, or contribute your\nown. What Are Community Sandboxes Community sandboxes are ready-to-use environments published in the\nOpenShell Community repository\nEach sandbox bundles a Dockerfile, policy, optional skills, and startup scripts\ninto a single package that you can launch with one command. Current Catalog The following community sandboxes are available in the catalog. Sandbox Description base Foundational image with system tools and dev environment openclaw Open agent manipulation and control sdg Synthetic data generation workflows simulation General-purpose simulation sandboxes Use a Community Sandbox Launch a community sandbox by name with the --from flag: $ openshell sandbox create --from openclaw\nWhen you pass --from with a community sandbox name, the CLI: Resolves the name against the\nOpenShell Community repository. Pulls the Dockerfile, policy, skills, and any startup scripts. Builds the container image locally. Creates the sandbox with the bundled configuration applied. You end up with a running sandbox whose image, policy, and tooling are all\npreconfigured by the community package. Other Sources The --from flag also accepts: Local directory paths: Point to a directory on disk that contains a\nDockerfile and optional policy/skills: $ openshell sandbox create --from ./my-sandbox-dir\nContainer image references: Use an existing container image directly: $ openshell sandbox create --from my-registry.example.com/my-image:latest\nContribute a Community Sandbox Each community sandbox is a directory under sandboxes/ in the\nOpenShell Community repository\nAt minimum, a sandbox directory must contain: Dockerfile : Defines the container image README.md : Describes the sandbox and how to use it Optional files: policy.yaml : Default policy applied when the sandbox launches skills/ : Agent skill definitions bundled with the sandbox Startup scripts: Any scripts the Dockerfile or entrypoint invokes To contribute, fork the repository, add your sandbox directory, and open a pull\nrequest. Refer to the repository’s\nCONTRIBUTING.md\nfor submission guidelines. The community catalog is designed to grow. If you have built a sandbox that\nsupports a particular workflow (data processing, simulation, code review\nor anything else), consider contributing it back so others can use it. Next Steps Explore related topics: Need to supply API keys or tokens? Set up providers for credential management. Want to customize the sandbox policy? Write custom rules in policies","format":"text","summary":"Use pre-built sandboxes from the OpenShell Community catalog, or contribute your own.","headings":[{"text":"Community Sandboxes","level":1},{"text":"What Are Community Sandboxes","level":2},{"text":"Current Catalog","level":2},{"text":"Use a Community Sandbox","level":2},{"text":"Other Sources","level":3},{"text":"Contribute a Community Sandbox","level":2},{"text":"Next Steps","level":2}]}
|
||||
@@ -1,723 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Create and Manage Sandboxes — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'sandboxes/create-and-manage';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Providers" href="providers.html" />
|
||||
<link rel="prev" title="About Sandboxes" href="index.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Create and Manage Sandboxes</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="create-and-manage-sandboxes">
|
||||
<h1>Create and Manage Sandboxes<a class="headerlink" href="#create-and-manage-sandboxes" title="Link to this heading">#</a></h1>
|
||||
<p>This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to <a class="reference internal" href="index.html"><span class="std std-doc">About Sandboxes</span></a>.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>Docker must be running before you create a sandbox. If it is not, the CLI
|
||||
returns a connection-refused error (<code class="docutils literal notranslate"><span class="pre">os</span> <span class="pre">error</span> <span class="pre">61</span></code>) without explaining
|
||||
the cause. Start Docker and try again.</p>
|
||||
</div>
|
||||
<section id="create-a-sandbox">
|
||||
<h2>Create a Sandbox<a class="headerlink" href="#create-a-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p>Run a single command to create a sandbox and launch your agent:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--<span class="w"> </span>claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If you have an existing gateway, the sandbox is created in it. Otherwise, a gateway is created automatically.</p>
|
||||
<p>A fully specified creation command might look like:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--name<span class="w"> </span>dev<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--provider<span class="w"> </span>my-claude<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--policy<span class="w"> </span>policy.yaml<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--upload<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--keep<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--<span class="w"> </span>claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">--keep</span></code> to keep the sandbox running after the trailing command exits.
|
||||
This is especially useful when you are iterating on a policy or want to
|
||||
reconnect later from another terminal or VS Code.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="create-from-a-community-sandbox-or-custom-image">
|
||||
<h2>Create from a Community Sandbox or Custom Image<a class="headerlink" href="#create-from-a-community-sandbox-or-custom-image" title="Link to this heading">#</a></h2>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">--from</span></code> to create a sandbox from a pre-built community package, a local directory, or a container image:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>openclaw
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The CLI resolves the name against the <a class="reference external" href="https://github.com/NVIDIA/OpenShell-Community" rel="noreferer noopener" target="_blank">OpenShell Community</a> catalog, pulls the bundled Dockerfile and policy, builds the image locally, and creates the sandbox. For the full catalog and how to contribute your own, refer to <a class="reference internal" href="community-sandboxes.html"><span class="doc">Community Sandboxes</span></a>.</p>
|
||||
<p>You can also point <code class="docutils literal notranslate"><span class="pre">--from</span></code> at a local directory or a container image reference:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>./my-sandbox-dir
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--from<span class="w"> </span>my-registry.example.com/my-image:latest
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="list-and-inspect-sandboxes">
|
||||
<h2>List and Inspect Sandboxes<a class="headerlink" href="#list-and-inspect-sandboxes" title="Link to this heading">#</a></h2>
|
||||
<p>Check the status of your sandboxes and retrieve detailed information about individual ones.</p>
|
||||
<p>List all sandboxes:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>list
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Get detailed information about a specific sandbox:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>get<span class="w"> </span>my-sandbox
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="connect-to-a-sandbox">
|
||||
<h2>Connect to a Sandbox<a class="headerlink" href="#connect-to-a-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p>Access a running sandbox through an interactive SSH session or VS Code Remote-SSH.</p>
|
||||
<section id="interactive-ssh">
|
||||
<h3>Interactive SSH<a class="headerlink" href="#interactive-ssh" title="Link to this heading">#</a></h3>
|
||||
<p>Open an SSH session into a running sandbox:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>connect<span class="w"> </span>my-sandbox
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="view-logs">
|
||||
<h2>View Logs<a class="headerlink" href="#view-logs" title="Link to this heading">#</a></h2>
|
||||
<p>Stream and filter sandbox logs to monitor agent activity and diagnose policy decisions.</p>
|
||||
<p>Stream sandbox logs:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>logs<span class="w"> </span>my-sandbox
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Use flags to filter and follow output:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Flag</p></th>
|
||||
<th class="head"><p>Purpose</p></th>
|
||||
<th class="head"><p>Example</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--tail</span></code></p></td>
|
||||
<td><p>Stream logs in real time</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">logs</span> <span class="pre">my-sandbox</span> <span class="pre">--tail</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--source</span></code></p></td>
|
||||
<td><p>Filter by log source</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">--source</span> <span class="pre">sandbox</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--level</span></code></p></td>
|
||||
<td><p>Filter by severity</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">--level</span> <span class="pre">warn</span></code></p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--since</span></code></p></td>
|
||||
<td><p>Show logs from a time window</p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">--since</span> <span class="pre">5m</span></code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="monitor-your-sandbox">
|
||||
<h2>Monitor Your Sandbox<a class="headerlink" href="#monitor-your-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell Terminal is a real-time dashboard that combines sandbox status and live logs in a single view.</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>term
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The dashboard shows the following information.</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Sandbox status</strong>: Name, phase, image, attached providers, age, and active port forwards.</p></li>
|
||||
<li><p><strong>Live log stream</strong>: Omutbound connections, policy decisions, and inference interceptions as they happen. Logs are labeled by source: <code class="docutils literal notranslate"><span class="pre">sandbox</span></code> (proxy and policy events) or <code class="docutils literal notranslate"><span class="pre">gateway</span></code> (lifecycle events).</p></li>
|
||||
</ul>
|
||||
<p>Use the terminal to spot blocked connections (<code class="docutils literal notranslate"><span class="pre">action=deny</span></code> entries) and inference interceptions (<code class="docutils literal notranslate"><span class="pre">action=inspect_for_inference</span></code> entries). If a connection is blocked unexpectedly, add the host to your network policy — refer to <a class="reference internal" href="policies.html"><span class="doc">Customize Sandbox Policies</span></a> for the workflow.</p>
|
||||
</section>
|
||||
<section id="transfer-files">
|
||||
<h2>Transfer Files<a class="headerlink" href="#transfer-files" title="Link to this heading">#</a></h2>
|
||||
<p>Transfer files between your host machine and a running sandbox.</p>
|
||||
<p>Upload files from your host into the sandbox:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>upload<span class="w"> </span>my-sandbox<span class="w"> </span>./src<span class="w"> </span>/sandbox/src
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Download files from the sandbox to your host:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>download<span class="w"> </span>my-sandbox<span class="w"> </span>/sandbox/output<span class="w"> </span>./local
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>You can also upload files at creation time with the <code class="docutils literal notranslate"><span class="pre">--upload</span></code> flag on
|
||||
<code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">create</span></code>.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="delete-sandboxes">
|
||||
<h2>Delete Sandboxes<a class="headerlink" href="#delete-sandboxes" title="Link to this heading">#</a></h2>
|
||||
<p>Remove sandboxes when they are no longer needed. Deleting a sandbox stops all processes, releases cluster resources, and purges injected credentials.</p>
|
||||
<p>Delete a sandbox by name:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>delete<span class="w"> </span>my-sandbox
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Delete all sandboxes in the active gateway:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>delete<span class="w"> </span>--all
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Explore related topics:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To follow a complete end-to-end example, refer to the <a class="reference internal" href="../tutorials/github-sandbox.html"><span class="doc">Set Up a Sandbox of Claude Code with a Custom GitHub Policy</span></a> tutorial.</p></li>
|
||||
<li><p>To supply API keys or tokens, refer to <a class="reference internal" href="providers.html"><span class="doc">Providers</span></a>.</p></li>
|
||||
<li><p>To control what the agent can access, refer to <a class="reference internal" href="policies.html"><span class="doc">Customize Sandbox Policies</span></a>.</p></li>
|
||||
<li><p>To use a pre-built environment, refer to the <a class="reference internal" href="community-sandboxes.html"><span class="doc">Community Sandboxes</span></a> catalog.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="index.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">About Sandboxes</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="providers.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Providers</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#create-a-sandbox">Create a Sandbox</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#create-from-a-community-sandbox-or-custom-image">Create from a Community Sandbox or Custom Image</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#list-and-inspect-sandboxes">List and Inspect Sandboxes</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#connect-to-a-sandbox">Connect to a Sandbox</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#interactive-ssh">Interactive SSH</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#view-logs">View Logs</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#monitor-your-sandbox">Monitor Your Sandbox</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#transfer-files">Transfer Files</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#delete-sandboxes">Delete Sandboxes</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,716 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>About Sandboxes — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'sandboxes/index';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Create and Manage Sandboxes" href="create-and-manage.html" />
|
||||
<link rel="prev" title="Set Up a Sandbox of Claude Code with a Custom GitHub Policy" href="../tutorials/github-sandbox.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">About Sandboxes</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="about-sandboxes">
|
||||
<h1>About Sandboxes<a class="headerlink" href="#about-sandboxes" title="Link to this heading">#</a></h1>
|
||||
<p>An OpenShell sandbox is a safe, private execution environment for an AI agent. Each sandbox runs with multiple layers of protection that prevent unauthorized data access, credential exposure, and network exfiltration. Protection layers include filesystem restrictions (Landlock), system call filtering (seccomp), network namespace isolation, and a privacy-enforcing HTTP CONNECT proxy.</p>
|
||||
<section id="sandbox-lifecycle">
|
||||
<h2>Sandbox Lifecycle<a class="headerlink" href="#sandbox-lifecycle" title="Link to this heading">#</a></h2>
|
||||
<p>Every sandbox moves through a defined set of phases:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Phase</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Provisioning</p></td>
|
||||
<td><p>The runtime is setting up the sandbox environment, injecting credentials, and applying your policy.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Ready</p></td>
|
||||
<td><p>The sandbox is running. The agent process is active and all isolation layers are enforced. You can connect, sync files, and view logs.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Error</p></td>
|
||||
<td><p>Something went wrong during provisioning or execution. Check logs with <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">logs</span></code> for details.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Deleting</p></td>
|
||||
<td><p>The sandbox is being torn down. The system releases resources and purges credentials.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section id="supported-agents">
|
||||
<h2>Supported Agents<a class="headerlink" href="#supported-agents" title="Link to this heading">#</a></h2>
|
||||
<p>The following table summarizes the agents that run in OpenShell sandboxes. Built-in agents are pre-installed in the OpenShell base sandbox image and auto-configured when passed as the trailing command to <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">create</span></code>. More community agent sandboxes are available in the <a class="reference internal" href="community-sandboxes.html"><span class="doc">Community Sandboxes</span></a> catalog.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Agent</p></th>
|
||||
<th class="head"><p>Source</p></th>
|
||||
<th class="head"><p>Default Policy</p></th>
|
||||
<th class="head"><p>Notes</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><a class="reference external" href="https://docs.anthropic.com/en/docs/claude-code" rel="noreferer noopener" target="_blank">Claude Code</a></p></td>
|
||||
<td><p>Built-in</p></td>
|
||||
<td><p>Full coverage</p></td>
|
||||
<td><p>Works out of the box. Requires <code class="docutils literal notranslate"><span class="pre">ANTHROPIC_API_KEY</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><a class="reference external" href="https://opencode.ai/" rel="noreferer noopener" target="_blank">OpenCode</a></p></td>
|
||||
<td><p>Built-in</p></td>
|
||||
<td><p>Partial coverage</p></td>
|
||||
<td><p>Pre-installed. Add <code class="docutils literal notranslate"><span class="pre">opencode.ai</span></code> endpoint and OpenCode binary paths to the policy for full functionality.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><a class="reference external" href="https://developers.openai.com/codex" rel="noreferer noopener" target="_blank">Codex</a></p></td>
|
||||
<td><p>Built-in</p></td>
|
||||
<td><p>No coverage</p></td>
|
||||
<td><p>Pre-installed. Requires a custom policy with OpenAI endpoints and Codex binary paths. Requires <code class="docutils literal notranslate"><span class="pre">OPENAI_API_KEY</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><a class="reference external" href="https://openclaw.ai/" rel="noreferer noopener" target="_blank">OpenClaw</a></p></td>
|
||||
<td><p><a class="reference external" href="https://github.com/NVIDIA/OpenShell-Community/tree/main/sandboxes/openclaw" rel="noreferer noopener" target="_blank">OpenShell Community</a></p></td>
|
||||
<td><p>Bundled</p></td>
|
||||
<td><p>Agent orchestration layer. Launch with <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">create</span> <span class="pre">--from</span> <span class="pre">openclaw</span></code>.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- | [NemoClaw](https://github.com/NVIDIA/OpenShell-Community) | [OpenShell Community](https://github.com/NVIDIA/OpenShell-Community/tree/main/sandboxes/nemoclaw) | Bundled | OpenClaw with NVIDIA DevX UI extension. Launch with `openshell sandbox create --from nemoclaw`. | -->
|
||||
</section>
|
||||
<section id="built-in-default-policy">
|
||||
<h2>Built-in Default Policy<a class="headerlink" href="#built-in-default-policy" title="Link to this heading">#</a></h2>
|
||||
<p>OpenShell ships a built-in policy that covers common agent workflows out of the box.
|
||||
When you create a sandbox without <code class="docutils literal notranslate"><span class="pre">--policy</span></code>, the default policy is applied. It controls three things:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Layer</p></th>
|
||||
<th class="head"><p>What It Controls</p></th>
|
||||
<th class="head"><p>How It Works</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>Filesystem</p></td>
|
||||
<td><p>What the agent can access on disk</p></td>
|
||||
<td><p>Paths are split into read-only and read-write sets. <a class="reference external" href="https://docs.kernel.org/security/landlock.html" rel="noreferer noopener" target="_blank">Landlock LSM</a> enforces these restrictions at the kernel level.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>Network</p></td>
|
||||
<td><p>What the agent can reach on the network</p></td>
|
||||
<td><p>Each policy block pairs allowed destinations (host and port) with allowed binaries (executable paths). The proxy matches every outbound connection to the binary that opened it. Both must match or the connection is denied.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>Process</p></td>
|
||||
<td><p>What privileges the agent has</p></td>
|
||||
<td><p>The agent runs as an unprivileged user with seccomp filters that block dangerous system calls. No <code class="docutils literal notranslate"><span class="pre">sudo</span></code>, no <code class="docutils literal notranslate"><span class="pre">setuid</span></code>, no path to elevated privileges.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>For the full breakdown of each default policy block and agent compatibility details, refer to <a class="reference internal" href="../reference/default-policy.html"><span class="doc">Default Policy Reference</span></a>.</p>
|
||||
</section>
|
||||
<section id="policy-structure">
|
||||
<h2>Policy Structure<a class="headerlink" href="#policy-structure" title="Link to this heading">#</a></h2>
|
||||
<p>A policy has static sections (<code class="docutils literal notranslate"><span class="pre">filesystem_policy</span></code>, <code class="docutils literal notranslate"><span class="pre">landlock</span></code>, <code class="docutils literal notranslate"><span class="pre">process</span></code>) that are locked at sandbox creation, and dynamic sections (<code class="docutils literal notranslate"><span class="pre">network_policies</span></code>, <code class="docutils literal notranslate"><span class="pre">inference</span></code>) that are hot-reloadable on a running sandbox.</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
|
||||
|
||||
<span class="c1"># Static: locked at sandbox creation. Paths the agent can read vs read/write.</span>
|
||||
<span class="nt">filesystem_policy</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">read_only</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">/usr</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">/lib</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">/etc</span><span class="p p-Indicator">]</span>
|
||||
<span class="w"> </span><span class="nt">read_write</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">/sandbox</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">/tmp</span><span class="p p-Indicator">]</span>
|
||||
|
||||
<span class="c1"># Static: Landlock LSM kernel enforcement. best_effort uses highest ABI the host supports.</span>
|
||||
<span class="nt">landlock</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">compatibility</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">best_effort</span>
|
||||
|
||||
<span class="c1"># Static: Unprivileged user/group the agent process runs as.</span>
|
||||
<span class="nt">process</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">run_as_user</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sandbox</span>
|
||||
<span class="w"> </span><span class="nt">run_as_group</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sandbox</span>
|
||||
|
||||
<span class="c1"># Dynamic: hot-reloadable. Named blocks of endpoints + binaries allowed to reach them.</span>
|
||||
<span class="nt">network_policies</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">my_api</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-api</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">api.example.com</span>
|
||||
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">443</span>
|
||||
<span class="w"> </span><span class="nt">protocol</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">rest</span>
|
||||
<span class="w"> </span><span class="nt">tls</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">terminate</span>
|
||||
<span class="w"> </span><span class="nt">enforcement</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">enforce</span>
|
||||
<span class="w"> </span><span class="nt">access</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">full</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr/bin/curl</span>
|
||||
|
||||
<span class="c1"># Dynamic: hot-reloadable. Routing hints this sandbox can use for inference (e.g. local, nvidia).</span>
|
||||
<span class="nt">inference</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">allowed_routes</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">local</span><span class="p p-Indicator">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>For the complete structure and every field, refer to the <a class="reference internal" href="../reference/policy-schema.html"><span class="std std-doc">Policy Schema Reference</span></a>.</p>
|
||||
</section>
|
||||
<section id="network-access-rules">
|
||||
<h2>Network Access Rules<a class="headerlink" href="#network-access-rules" title="Link to this heading">#</a></h2>
|
||||
<p>Network access is controlled by policy blocks under <code class="docutils literal notranslate"><span class="pre">network_policies</span></code>. Each block has a name, a list of endpoints (host, port, protocol, and optional rules), and a list of binaries that are allowed to use those endpoints.</p>
|
||||
<p>Every outbound connection from the sandbox goes through the proxy:</p>
|
||||
<ul class="simple">
|
||||
<li><p>The proxy queries the <a class="reference internal" href="../about/architecture.html"><span class="doc">policy engine</span></a> with the destination (host and port) and the calling binary. A connection is allowed only when both match an entry in the same policy block.</p></li>
|
||||
<li><p>For endpoints with <code class="docutils literal notranslate"><span class="pre">protocol:</span> <span class="pre">rest</span></code> and <code class="docutils literal notranslate"><span class="pre">tls:</span> <span class="pre">terminate</span></code>, each HTTP request is checked against that endpoint’s <code class="docutils literal notranslate"><span class="pre">rules</span></code> (method and path).</p></li>
|
||||
<li><p>If no endpoint matches and inference routes are configured, the request may be rerouted for inference.</p></li>
|
||||
<li><p>Otherwise the connection is denied. Endpoints without <code class="docutils literal notranslate"><span class="pre">protocol</span></code> or <code class="docutils literal notranslate"><span class="pre">tls</span></code> allow the TCP stream through without inspecting payloads.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Continue with one of the following:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To create your first sandbox, refer to <a class="reference internal" href="create-and-manage.html"><span class="doc">Create and Manage Sandboxes</span></a>.</p></li>
|
||||
<li><p>To supply API keys or tokens, refer to <a class="reference internal" href="providers.html"><span class="doc">Providers</span></a>.</p></li>
|
||||
<li><p>To control what the agent can access, refer to <a class="reference internal" href="policies.html"><span class="doc">Customize Sandbox Policies</span></a>.</p></li>
|
||||
<li><p>To use a pre-built environment, refer to the <a class="reference internal" href="community-sandboxes.html"><span class="doc">Community Sandboxes</span></a> catalog.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="../tutorials/github-sandbox.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Set Up a Sandbox of Claude Code with a Custom GitHub Policy</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="create-and-manage.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Create and Manage Sandboxes</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#sandbox-lifecycle">Sandbox Lifecycle</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#supported-agents">Supported Agents</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#built-in-default-policy">Built-in Default Policy</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#policy-structure">Policy Structure</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#network-access-rules">Network Access Rules</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,708 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Providers — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'sandboxes/providers';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Customize Sandbox Policies" href="policies.html" />
|
||||
<link rel="prev" title="Create and Manage Sandboxes" href="create-and-manage.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Providers</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="providers">
|
||||
<h1>Providers<a class="headerlink" href="#providers" title="Link to this heading">#</a></h1>
|
||||
<p>AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called <em>providers</em>.</p>
|
||||
<p>Create and manage providers that supply credentials to sandboxes.</p>
|
||||
<section id="create-a-provider">
|
||||
<h2>Create a Provider<a class="headerlink" href="#create-a-provider" title="Link to this heading">#</a></h2>
|
||||
<p>Providers can be created from local environment variables or with explicit credential values.</p>
|
||||
<section id="from-local-credentials">
|
||||
<h3>From Local Credentials<a class="headerlink" href="#from-local-credentials" title="Link to this heading">#</a></h3>
|
||||
<p>The fastest way to create a provider is to let the CLI discover credentials from
|
||||
your shell environment:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>create<span class="w"> </span>--name<span class="w"> </span>my-claude<span class="w"> </span>--type<span class="w"> </span>claude<span class="w"> </span>--from-existing
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This reads <code class="docutils literal notranslate"><span class="pre">ANTHROPIC_API_KEY</span></code> or <code class="docutils literal notranslate"><span class="pre">CLAUDE_API_KEY</span></code> from your current environment
|
||||
and stores them in the provider.</p>
|
||||
</section>
|
||||
<section id="with-explicit-credentials">
|
||||
<h3>With Explicit Credentials<a class="headerlink" href="#with-explicit-credentials" title="Link to this heading">#</a></h3>
|
||||
<p>Supply a credential value directly:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>create<span class="w"> </span>--name<span class="w"> </span>my-api<span class="w"> </span>--type<span class="w"> </span>generic<span class="w"> </span>--credential<span class="w"> </span><span class="nv">API_KEY</span><span class="o">=</span>sk-abc123
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="bare-key-form">
|
||||
<h3>Bare Key Form<a class="headerlink" href="#bare-key-form" title="Link to this heading">#</a></h3>
|
||||
<p>Pass a key name without a value to read the value from the environment variable
|
||||
of that name:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>create<span class="w"> </span>--name<span class="w"> </span>my-api<span class="w"> </span>--type<span class="w"> </span>generic<span class="w"> </span>--credential<span class="w"> </span>API_KEY
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This looks up the current value of <code class="docutils literal notranslate"><span class="pre">$API_KEY</span></code> in your shell and stores it.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="manage-providers">
|
||||
<h2>Manage Providers<a class="headerlink" href="#manage-providers" title="Link to this heading">#</a></h2>
|
||||
<p>List, inspect, update, and delete providers from the active cluster.</p>
|
||||
<p>List all providers:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>list
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Inspect a provider:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>get<span class="w"> </span>my-claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Update a provider’s credentials:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>update<span class="w"> </span>my-claude<span class="w"> </span>--type<span class="w"> </span>claude<span class="w"> </span>--from-existing
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Delete a provider:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>delete<span class="w"> </span>my-claude
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="attach-providers-to-sandboxes">
|
||||
<h2>Attach Providers to Sandboxes<a class="headerlink" href="#attach-providers-to-sandboxes" title="Link to this heading">#</a></h2>
|
||||
<p>Pass one or more <code class="docutils literal notranslate"><span class="pre">--provider</span></code> flags when creating a sandbox:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--provider<span class="w"> </span>my-claude<span class="w"> </span>--provider<span class="w"> </span>my-github<span class="w"> </span>--<span class="w"> </span>claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Each <code class="docutils literal notranslate"><span class="pre">--provider</span></code> flag attaches one provider. The sandbox receives all
|
||||
credentials from every attached provider at runtime.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>Providers cannot be added to a running sandbox. If you need to attach an
|
||||
additional provider, delete the sandbox and recreate it with all required
|
||||
providers specified.</p>
|
||||
</div>
|
||||
<section id="auto-discovery-shortcut">
|
||||
<h3>Auto-Discovery Shortcut<a class="headerlink" href="#auto-discovery-shortcut" title="Link to this heading">#</a></h3>
|
||||
<p>When the trailing command in <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">sandbox</span> <span class="pre">create</span></code> is a recognized tool name (<code class="docutils literal notranslate"><span class="pre">claude</span></code>, <code class="docutils literal notranslate"><span class="pre">codex</span></code>, or <code class="docutils literal notranslate"><span class="pre">opencode</span></code>), the CLI auto-creates the required
|
||||
provider from your local credentials if one does not already exist. You do not
|
||||
need to create the provider separately:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--<span class="w"> </span>claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This detects <code class="docutils literal notranslate"><span class="pre">claude</span></code> as a known tool, finds your <code class="docutils literal notranslate"><span class="pre">ANTHROPIC_API_KEY</span></code>, creates
|
||||
a provider, attaches it to the sandbox, and launches Claude Code.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="supported-provider-types">
|
||||
<h2>Supported Provider Types<a class="headerlink" href="#supported-provider-types" title="Link to this heading">#</a></h2>
|
||||
<p>The following provider types are supported.</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Type</p></th>
|
||||
<th class="head"><p>Environment Variables Injected</p></th>
|
||||
<th class="head"><p>Typical Use</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">claude</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">ANTHROPIC_API_KEY</span></code>, <code class="docutils literal notranslate"><span class="pre">CLAUDE_API_KEY</span></code></p></td>
|
||||
<td><p>Claude Code, Anthropic API</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">codex</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">OPENAI_API_KEY</span></code></p></td>
|
||||
<td><p>OpenAI Codex</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">opencode</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">OPENCODE_API_KEY</span></code>, <code class="docutils literal notranslate"><span class="pre">OPENROUTER_API_KEY</span></code>, <code class="docutils literal notranslate"><span class="pre">OPENAI_API_KEY</span></code></p></td>
|
||||
<td><p>opencode tool</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">github</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">GITHUB_TOKEN</span></code>, <code class="docutils literal notranslate"><span class="pre">GH_TOKEN</span></code></p></td>
|
||||
<td><p>GitHub API, <code class="docutils literal notranslate"><span class="pre">gh</span></code> CLI — refer to <a class="reference internal" href="../tutorials/github-sandbox.html"><span class="doc">Set Up a Sandbox of Claude Code with a Custom GitHub Policy</span></a></p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">gitlab</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">GITLAB_TOKEN</span></code>, <code class="docutils literal notranslate"><span class="pre">GLAB_TOKEN</span></code>, <code class="docutils literal notranslate"><span class="pre">CI_JOB_TOKEN</span></code></p></td>
|
||||
<td><p>GitLab API, <code class="docutils literal notranslate"><span class="pre">glab</span></code> CLI</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">nvidia</span></code></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">NVIDIA_API_KEY</span></code></p></td>
|
||||
<td><p>NVIDIA API Catalog</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">generic</span></code></p></td>
|
||||
<td><p>User-defined</p></td>
|
||||
<td><p>Any service with custom credentials</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">outlook</span></code></p></td>
|
||||
<td><p><em>(none: no auto-discovery)</em></p></td>
|
||||
<td><p>Microsoft Outlook integration</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
<p>Use the <code class="docutils literal notranslate"><span class="pre">generic</span></code> type for any service not listed above. You define the
|
||||
environment variable names and values yourself with <code class="docutils literal notranslate"><span class="pre">--credential</span></code>.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>Explore related topics:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To control what the agent can access, refer to <a class="reference internal" href="policies.html"><span class="doc">Customize Sandbox Policies</span></a>.</p></li>
|
||||
<li><p>To use a pre-built environment, refer to the <a class="reference internal" href="community-sandboxes.html"><span class="doc">Community Sandboxes</span></a> catalog.</p></li>
|
||||
<li><p>To view the complete field reference for the policy YAML, refer to the <a class="reference internal" href="../reference/policy-schema.html"><span class="std std-doc">Policy Schema Reference</span></a>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="create-and-manage.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Create and Manage Sandboxes</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="policies.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">Customize Sandbox Policies</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#create-a-provider">Create a Provider</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#from-local-credentials">From Local Credentials</a></li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#with-explicit-credentials">With Explicit Credentials</a></li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#bare-key-form">Bare Key Form</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#manage-providers">Manage Providers</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#attach-providers-to-sandboxes">Attach Providers to Sandboxes</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#auto-discovery-shortcut">Auto-Discovery Shortcut</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#supported-provider-types">Supported Provider Types</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"sandboxes/providers","title":"Providers","url":"sandboxes/providers.html","last_modified":"2026-03-11T19:51:18.203118+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create and manage credential providers that inject API keys and tokens into OpenShell sandboxes.","tags":["Providers","Credentials","API Keys","Sandbox","Security"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Providers AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers . Create and manage providers that supply credentials to sandboxes. Create a Provider Providers can be created from local environment variables or with explicit credential values. From Local Credentials The fastest way to create a provider is to let the CLI discover credentials from\nyour shell environment: $ openshell provider create --name my-claude --type claude --from-existing\nThis reads ANTHROPIC_API_KEY or CLAUDE_API_KEY from your current environment\nand stores them in the provider. With Explicit Credentials Supply a credential value directly: $ openshell provider create --name my-api --type generic --credential API_KEY=sk-abc123\nBare Key Form Pass a key name without a value to read the value from the environment variable\nof that name: $ openshell provider create --name my-api --type generic --credential API_KEY\nThis looks up the current value of $API_KEY in your shell and stores it. Manage Providers List, inspect, update, and delete providers from the active cluster. List all providers: $ openshell provider list\nInspect a provider: $ openshell provider get my-claude\nUpdate a provider’s credentials: $ openshell provider update my-claude --type claude --from-existing\nDelete a provider: $ openshell provider delete my-claude\nAttach Providers to Sandboxes Pass one or more --provider flags when creating a sandbox: $ openshell sandbox create --provider my-claude --provider my-github -- claude\nEach --provider flag attaches one provider. The sandbox receives all\ncredentials from every attached provider at runtime. Providers cannot be added to a running sandbox. If you need to attach an\nadditional provider, delete the sandbox and recreate it with all required\nproviders specified. Auto-Discovery Shortcut When the trailing command in openshell sandbox create is a recognized tool name ( claude , codex , or opencode ), the CLI auto-creates the required\nprovider from your local credentials if one does not already exist. You do not\nneed to create the provider separately: $ openshell sandbox create -- claude\nThis detects claude as a known tool, finds your ANTHROPIC_API_KEY , creates\na provider, attaches it to the sandbox, and launches Claude Code. Supported Provider Types The following provider types are supported. Type Environment Variables Injected Typical Use claude ANTHROPIC_API_KEY , CLAUDE_API_KEY Claude Code, Anthropic API codex OPENAI_API_KEY OpenAI Codex opencode OPENCODE_API_KEY , OPENROUTER_API_KEY , OPENAI_API_KEY opencode tool github GITHUB_TOKEN , GH_TOKEN GitHub API, gh CLI — refer to /tutorials/github-sandbox gitlab GITLAB_TOKEN , GLAB_TOKEN , CI_JOB_TOKEN GitLab API, glab CLI nvidia NVIDIA_API_KEY NVIDIA API Catalog generic User-defined Any service with custom credentials outlook (none: no auto-discovery) Microsoft Outlook integration Use the generic type for any service not listed above. You define the\nenvironment variable names and values yourself with --credential . Next Steps Explore related topics: To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog. To view the complete field reference for the policy YAML, refer to the Policy Schema Reference","format":"text","summary":"AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers.","headings":[{"text":"Providers","level":1},{"text":"Create a Provider","level":2},{"text":"From Local Credentials","level":3},{"text":"With Explicit Credentials","level":3},{"text":"Bare Key Form","level":3},{"text":"Manage Providers","level":2},{"text":"Attach Providers to Sandboxes","level":2},{"text":"Auto-Discovery Shortcut","level":3},{"text":"Supported Provider Types","level":2},{"text":"Next Steps","level":2}]}
|
||||
@@ -1,945 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="./" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Search - NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);</script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'search';</script>
|
||||
|
||||
|
||||
<link rel="icon" href="_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="#" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="#"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tutorials/github-sandbox.html">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none"></div>
|
||||
|
||||
|
||||
<div class="bd-search-container">
|
||||
<h1>Search</h1>
|
||||
|
||||
<noscript>
|
||||
<div class="alert alert-error">
|
||||
<p class="alert-title">Error</p>
|
||||
<p>Please activate JavaScript to enable the search functionality.</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
|
||||
<div class="search-controls-container mb-4">
|
||||
<input type="search" class="form-control" id="enhanced-search-page-input"
|
||||
placeholder="Search NVIDIA documentation..." autocomplete="off" spellcheck="false"
|
||||
aria-label="Search documentation">
|
||||
</div>
|
||||
|
||||
|
||||
<div id="enhanced-search-page-results">
|
||||
<div class="search-empty-state text-center py-4">
|
||||
<i class="fa-solid fa-magnifying-glass fa-2x mb-3 search-icon-primary"></i>
|
||||
<h4 class="search-empty-title">Search Documentation</h4>
|
||||
<p class="search-empty-text">Start typing to search across all documentation pages...</p>
|
||||
<div class="mt-3">
|
||||
<small class="search-empty-tips">
|
||||
<i class="fa-solid fa-lightbulb search-icon-primary"></i>
|
||||
<strong>Search Tips:</strong> Use specific terms for better results • Search includes titles, content, and
|
||||
headings
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="bd-sidebar-secondary"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,855 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html lang="en" data-content_root="../" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Set Up a Sandbox of Claude Code with a Custom GitHub Policy — NVIDIA OpenShell Developer Guide</title>
|
||||
|
||||
|
||||
|
||||
<script data-cfasync="false">
|
||||
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
|
||||
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
|
||||
</script>
|
||||
<!--
|
||||
this give us a css class that will be invisible only if js is disabled
|
||||
-->
|
||||
<noscript>
|
||||
<style>
|
||||
.pst-js-only { display: none !important; }
|
||||
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
<!-- Loaded before other Sphinx assets -->
|
||||
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/nvidia-sphinx-theme.css?v=933278ad" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/enhanced-search.css?v=2e2db37d" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
|
||||
|
||||
<!-- So that users can add custom icons -->
|
||||
<script src="../_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
|
||||
<!-- Pre-loaded scripts that we'll load fully later -->
|
||||
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
|
||||
|
||||
|
||||
|
||||
<script src="../_static/documentation_options.js?v=2caa9db7"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||||
<script src="../_static/copybutton.js?v=6dbb43f8"></script>
|
||||
<script src="../_static/search-assets.bundle.js?v=00e3e057"></script>
|
||||
<script src="../_static/design-tabs.js?v=f930bc37"></script>
|
||||
<script>DOCUMENTATION_OPTIONS.pagename = 'tutorials/github-sandbox';</script>
|
||||
|
||||
<link rel="icon" href="../_static/favicon.png"/>
|
||||
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="About Sandboxes" href="../sandboxes/index.html" />
|
||||
<link rel="prev" title="Quickstart" href="../get-started/quickstart.html" />
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="docsearch:language" content="en"/>
|
||||
<meta name="docsearch:version" content="" />
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
|
||||
|
||||
|
||||
|
||||
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
|
||||
|
||||
|
||||
|
||||
<div id="pst-scroll-pixel-helper"></div>
|
||||
|
||||
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
|
||||
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
|
||||
|
||||
|
||||
<dialog id="pst-search-dialog">
|
||||
|
||||
<form class="bd-search d-flex align-items-center"
|
||||
action="../search.html"
|
||||
method="get">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
name="q"
|
||||
placeholder="Search the docs ..."
|
||||
aria-label="Search the docs ..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"/>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="pst-async-banner-revealer d-none">
|
||||
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
|
||||
</div>
|
||||
|
||||
|
||||
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
|
||||
<div class="bd-header__inner bd-page-width">
|
||||
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
|
||||
<span class="fa-solid fa-bars"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="col-lg-3 navbar-header-items__start">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 navbar-header-items">
|
||||
|
||||
|
||||
<div class="navbar-header-items__end">
|
||||
|
||||
<div class="navbar-item navbar-persistent--container">
|
||||
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="navbar-persistent--mobile">
|
||||
|
||||
<button class="btn search-button-field search-button__button pst-js-only" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-magnifying-glass"></i>
|
||||
<span class="search-button__default-text">Search</span>
|
||||
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
|
||||
<span class="fa-solid fa-outdent"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="bd-container">
|
||||
<div class="bd-container__inner bd-page-width">
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-primary-sidebar-modal"></dialog>
|
||||
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand logo" href="../index.html">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-wht-for-screen.svg" class="logo__image only-dark pst-js-only" alt="NVIDIA OpenShell Developer Guide - Home"/>
|
||||
|
||||
|
||||
<p class="title logo__title">NVIDIA OpenShell Developer Guide</p>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items sidebar-primary__section">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sidebar-header-items__end">
|
||||
|
||||
<div class="navbar-item">
|
||||
|
||||
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" aria-label="Color mode" data-bs-title="Color mode" data-bs-placement="bottom" data-bs-toggle="tooltip">
|
||||
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
|
||||
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
|
||||
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
|
||||
</button></div>
|
||||
|
||||
<div class="navbar-item"><ul class="navbar-icon-links"
|
||||
aria-label="Icon Links">
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/NVIDIA/OpenShell" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-github fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">GitHub</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://pypi.org/project/openshell/" title="PyPI" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-python fa-lg" aria-hidden="true"></i>
|
||||
<span class="sr-only">PyPI</span></a>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar-primary-items__start sidebar-primary__section">
|
||||
<div class="sidebar-primary-item">
|
||||
|
||||
|
||||
|
||||
<nav class="bd-docs-nav bd-links"
|
||||
aria-label="Table of Contents">
|
||||
<p class="bd-links__title" role="heading" aria-level="1">Table of Contents</p>
|
||||
<div class="bd-toc-item navbar-nav"><ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">About NVIDIA OpenShell</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/architecture.html">How It Works</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../about/release-notes.html">Release Notes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get Started</span></p>
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../get-started/quickstart.html">Quickstart</a></li>
|
||||
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Tutorial: GitHub Policy Iteration</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Sandboxes</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/index.html">About Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/create-and-manage.html">Create and Manage Sandboxes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/providers.html">Providers</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/policies.html">Customize Sandbox Policies</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../sandboxes/community-sandboxes.html">Community Sandboxes</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Inference Routing</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/index.html">About Inference Routing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../inference/configure.html">Configure Inference Routing</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/cli.html">CLI Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/default-policy.html">Default Policy Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/policy-schema.html">Policy Schema Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../reference/support-matrix.html">Support Matrix</a></li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Resources</span></p>
|
||||
<ul class="nav bd-sidenav">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../resources/eula.html">License</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar-primary-items__end sidebar-primary__section">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<main id="main-content" class="bd-main" role="main">
|
||||
|
||||
|
||||
<div class="bd-content">
|
||||
<div class="bd-article-container">
|
||||
|
||||
<div class="bd-header-article d-print-none">
|
||||
<div class="header-article-items header-article__inner">
|
||||
|
||||
<div class="header-article-items__start">
|
||||
|
||||
<div class="header-article-item">
|
||||
|
||||
<nav aria-label="Breadcrumb" class="d-print-none">
|
||||
<ul class="bd-breadcrumbs">
|
||||
|
||||
<li class="breadcrumb-item breadcrumb-home">
|
||||
<a href="../index.html" class="nav-link" aria-label="Home">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">Set Up a Sandbox of Claude Code with a Custom GitHub Policy</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="searchbox"></div>
|
||||
<article class="bd-article">
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<section class="tex2jax_ignore mathjax_ignore" id="set-up-a-sandbox-of-claude-code-with-a-custom-github-policy">
|
||||
<h1>Set Up a Sandbox of Claude Code with a Custom GitHub Policy<a class="headerlink" href="#set-up-a-sandbox-of-claude-code-with-a-custom-github-policy" title="Link to this heading">#</a></h1>
|
||||
<p>This tutorial walks through the iterative policy workflow. You launch a sandbox, ask Claude Code to push code to GitHub, get blocked by the default network policy, diagnose the denial from two angles — the OpenShell Terminal on your laptop and the sandbox logs from inside — and then apply a custom policy to fix it, all without recreating the sandbox.</p>
|
||||
<p>After completing this tutorial, you will have:</p>
|
||||
<ul class="simple">
|
||||
<li><p>A running sandbox with Claude Code that can push to a GitHub repository.</p></li>
|
||||
<li><p>A custom network policy that grants GitHub access for a specific repository.</p></li>
|
||||
<li><p>Experience with the policy iteration workflow: fail, diagnose, update, verify.</p></li>
|
||||
</ul>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>This tutorial shows example prompts and responses from Claude Code. The exact wording you see may differ between sessions — use the examples as a guide for the type of interaction, not as expected output.</p>
|
||||
</div>
|
||||
<section id="prerequisites">
|
||||
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Link to this heading">#</a></h2>
|
||||
<p>This tutorial requires the following:</p>
|
||||
<ul>
|
||||
<li><p>Completed the <a class="reference internal" href="../get-started/quickstart.html"><span class="doc">Quickstart</span></a> tutorial.</p></li>
|
||||
<li><p>A GitHub personal access token (PAT) with <code class="docutils literal notranslate"><span class="pre">repo</span></code> scope. To create one, go to <a class="reference external" href="https://github.com/settings/tokens" rel="noreferer noopener" target="_blank">GitHub Settings > Developer settings > Personal access tokens</a>, select <strong>Generate new token (classic)</strong>, check the <code class="docutils literal notranslate"><span class="pre">repo</span></code> scope, and copy the token.</p>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
<p>Instead of pasting the token into Claude during the tutorial, use a <a class="reference internal" href="../sandboxes/providers.html"><span class="doc">credential provider</span></a> to inject it into the sandbox automatically at startup:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>provider<span class="w"> </span>create<span class="w"> </span>--name<span class="w"> </span>my-github<span class="w"> </span>--type<span class="w"> </span>github<span class="w"> </span>--from-existing
|
||||
<span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--provider<span class="w"> </span>my-github<span class="w"> </span>--keep<span class="w"> </span>--<span class="w"> </span>claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The provider reads <code class="docutils literal notranslate"><span class="pre">GITHUB_TOKEN</span></code> from your host environment and sets it as an environment variable inside the sandbox so Claude can use it directly.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li><p>Your own <a class="reference external" href="https://console.anthropic.com/" rel="noreferer noopener" target="_blank">Anthropic account</a> for Claude Code. OpenShell provides the sandbox, not the agent — you need your own account to log in to Claude Code.</p></li>
|
||||
<li><p>A public GitHub repository you own (used as the push target). A scratch or test repository works well — the tutorial pushes a small file to it. You can <a class="reference external" href="https://github.com/new" rel="noreferer noopener" target="_blank">create a new repository</a> with a README if you do not have one handy.</p></li>
|
||||
</ul>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>This tutorial uses two terminals throughout:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Terminal 1 (sandbox)</strong> — The terminal where you launch the sandbox. Claude Code runs here. You interact with the agent in this terminal.</p></li>
|
||||
<li><p><strong>Terminal 2 (laptop)</strong> — A separate terminal on your laptop. You use this for <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">term</span></code>, <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">policy</span> <span class="pre">set</span></code>, and other CLI commands that manage the sandbox from the outside.</p></li>
|
||||
</ul>
|
||||
<p>Each section below indicates which terminal to use.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="launch-the-sandbox">
|
||||
<h2>Launch the Sandbox<a class="headerlink" href="#launch-the-sandbox" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Terminal 1 (sandbox)</strong> — Create a sandbox and start Claude Code. No custom policy is needed yet — the <a class="reference internal" href="../reference/default-policy.html"><span class="doc">default policy</span></a> is applied automatically:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>sandbox<span class="w"> </span>create<span class="w"> </span>--keep<span class="w"> </span>--<span class="w"> </span>claude
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">--keep</span></code> flag keeps the sandbox running after Claude Code exits, so you can apply policy updates later without recreating the environment.</p>
|
||||
<p>Claude Code starts inside the sandbox. Log in through your preferred authentication method and trust the <code class="docutils literal notranslate"><span class="pre">/sandbox</span></code> workspace when prompted.</p>
|
||||
</section>
|
||||
<section id="push-code-to-github">
|
||||
<h2>Push Code to GitHub<a class="headerlink" href="#push-code-to-github" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Terminal 1 (sandbox)</strong> — Ask Claude Code to write a simple script and push it to your repository:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Write a hello_world.py script and push it to https://github.com/<org>/<repo>.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Claude recognizes that it needs GitHub credentials. It asks how you want to authenticate. Provide your GitHub personal access token by pasting it into the conversation. Claude configures authentication and attempts the push.</p>
|
||||
<p>The push fails. Claude reports an error — but the failure is not an authentication problem. The default sandbox policy does not permit outbound requests to GitHub, so the proxy blocks the connection before the request reaches GitHub’s servers.</p>
|
||||
</section>
|
||||
<section id="diagnose-the-denial">
|
||||
<h2>Diagnose the Denial<a class="headerlink" href="#diagnose-the-denial" title="Link to this heading">#</a></h2>
|
||||
<section id="view-the-logs-from-your-laptop">
|
||||
<h3>View the logs from your laptop<a class="headerlink" href="#view-the-logs-from-your-laptop" title="Link to this heading">#</a></h3>
|
||||
<p><strong>Terminal 2 (laptop)</strong> — Open a separate terminal on your laptop and launch the OpenShell Terminal:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>term
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The dashboard shows sandbox status and a live stream of policy decisions. Look for entries with <code class="docutils literal notranslate"><span class="pre">l7_decision=deny</span></code>. Select a deny entry to see the full detail:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>l7_action: PUT
|
||||
l7_target: /repos/<org>/<repo>/contents/hello_world.py
|
||||
l7_decision: deny
|
||||
dst_host: api.github.com
|
||||
dst_port: 443
|
||||
l7_protocol: rest
|
||||
policy: github_rest_api
|
||||
l7_deny_reason: PUT /repos/<org>/<repo>/contents/hello_world.py not permitted by policy
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The log shows that the sandbox proxy intercepted an outbound <code class="docutils literal notranslate"><span class="pre">PUT</span></code> request to <code class="docutils literal notranslate"><span class="pre">api.github.com</span></code> and denied it. The <code class="docutils literal notranslate"><span class="pre">github_rest_api</span></code> policy allows read operations (GET) but blocks write operations (PUT, POST, DELETE) to the GitHub API. A similar denial appears for <code class="docutils literal notranslate"><span class="pre">github.com</span></code> if Claude attempted a git push over HTTPS.</p>
|
||||
</section>
|
||||
<section id="ask-claude-to-check-the-sandbox-logs">
|
||||
<h3>Ask Claude to check the sandbox logs<a class="headerlink" href="#ask-claude-to-check-the-sandbox-logs" title="Link to this heading">#</a></h3>
|
||||
<p><strong>Terminal 1 (sandbox)</strong> — Switch back to Claude Code. Ask it to check the sandbox logs for denied requests:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Check the sandbox logs for any denied network requests. What is blocking the push?
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Claude reads the deny entries and identifies the root cause. It explains that the failure is a sandbox network policy restriction, not a token permissions issue:</p>
|
||||
<blockquote>
|
||||
<div><p>The sandbox runs a proxy that enforces policies on outbound traffic. The
|
||||
<code class="docutils literal notranslate"><span class="pre">github_rest_api</span></code> policy allows GET requests (used to read the file) but blocks
|
||||
PUT/write requests to GitHub. This is a sandbox-level restriction, not a token
|
||||
issue — no matter what token you provide, pushes via the API will be blocked
|
||||
until the policy is updated.</p>
|
||||
</div></blockquote>
|
||||
<p>Both perspectives confirm the same thing: the proxy is doing its job. The default policy is designed to be restrictive. To allow GitHub pushes, you need to update the network policy.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="update-the-policy-from-your-laptop">
|
||||
<h2>Update the Policy from Your Laptop<a class="headerlink" href="#update-the-policy-from-your-laptop" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Terminal 2 (laptop)</strong> — Ask your coding agent (for example, Claude Code or Cursor running on your laptop) to recommend a policy update based on the denied requests and apply it to the running sandbox.</p>
|
||||
<p>The agent inspects the deny reasons, writes an updated policy that adds <code class="docutils literal notranslate"><span class="pre">github_git</span></code> and <code class="docutils literal notranslate"><span class="pre">github_api</span></code> blocks for your repository, and runs <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">policy</span> <span class="pre">set</span></code> to apply it:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>openshell<span class="w"> </span>policy<span class="w"> </span><span class="nb">set</span><span class="w"> </span><sandbox-name><span class="w"> </span>--policy<span class="w"> </span>/tmp/sandbox-policy-update.yaml<span class="w"> </span>--wait
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Your coding agent generates both the policy file and this command. Network policies are hot-reloadable — the <code class="docutils literal notranslate"><span class="pre">--wait</span></code> flag blocks until the policy engine confirms the new revision loaded, and the update takes effect immediately without restarting the sandbox or reconnecting Claude Code.</p>
|
||||
<details class="sd-sphinx-override sd-dropdown sd-card sd-mb-3">
|
||||
<summary class="sd-summary-title sd-card-header">
|
||||
<span class="sd-summary-text">Full reference policy</span><span class="sd-summary-state-marker sd-summary-chevron-right"><svg version="1.1" width="1.5em" height="1.5em" class="sd-octicon sd-octicon-chevron-right" viewBox="0 0 24 24" aria-hidden="true"><path d="M8.72 18.78a.75.75 0 0 1 0-1.06L14.44 12 8.72 6.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018l6.25 6.25a.75.75 0 0 1 0 1.06l-6.25 6.25a.75.75 0 0 1-1.06 0Z"></path></svg></span></summary><div class="sd-summary-content sd-card-body docutils">
|
||||
<p class="sd-card-text">The following YAML shows a complete policy that extends the <a class="reference internal" href="../reference/default-policy.html"><span class="doc">default policy</span></a> with GitHub access for a single repository. This is representative of what a coding agent generates when asked to unblock GitHub pushes. Replace <code class="docutils literal notranslate"><span class="pre"><org></span></code> with your GitHub organization or username and <code class="docutils literal notranslate"><span class="pre"><repo></span></code> with your repository name.</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
|
||||
|
||||
<span class="c1"># ── Static (locked at sandbox creation) ──────────────────────────</span>
|
||||
|
||||
<span class="nt">filesystem_policy</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">include_workdir</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
||||
<span class="w"> </span><span class="nt">read_only</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/usr</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/lib</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/proc</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/dev/urandom</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/app</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/etc</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/var/log</span>
|
||||
<span class="w"> </span><span class="nt">read_write</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/sandbox</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/tmp</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/dev/null</span>
|
||||
|
||||
<span class="nt">landlock</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">compatibility</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">best_effort</span>
|
||||
|
||||
<span class="nt">process</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">run_as_user</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sandbox</span>
|
||||
<span class="w"> </span><span class="nt">run_as_group</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sandbox</span>
|
||||
|
||||
<span class="c1"># ── Dynamic (hot-reloadable) ─────────────────────────────────────</span>
|
||||
|
||||
<span class="nt">network_policies</span><span class="p">:</span>
|
||||
|
||||
<span class="w"> </span><span class="c1"># Claude Code ↔ Anthropic API</span>
|
||||
<span class="w"> </span><span class="nt">claude_code</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">claude-code</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">api.anthropic.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="p p-Indicator">,</span><span class="nt"> protocol</span><span class="p">:</span><span class="w"> </span><span class="nv">rest</span><span class="p p-Indicator">,</span><span class="nt"> enforcement</span><span class="p">:</span><span class="w"> </span><span class="nv">enforce</span><span class="p p-Indicator">,</span><span class="nt"> access</span><span class="p">:</span><span class="w"> </span><span class="nv">full</span><span class="p p-Indicator">,</span><span class="nt"> tls</span><span class="p">:</span><span class="w"> </span><span class="nv">terminate</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">statsig.anthropic.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">sentry.io</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">raw.githubusercontent.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">platform.claude.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/local/bin/claude</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/bin/node</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
|
||||
<span class="w"> </span><span class="c1"># NVIDIA inference endpoint</span>
|
||||
<span class="w"> </span><span class="nt">nvidia_inference</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nvidia-inference</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">integrate.api.nvidia.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/bin/curl</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/bin/bash</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/local/bin/opencode</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
|
||||
<span class="w"> </span><span class="c1"># ── GitHub: git operations (clone, fetch, push) ──────────────</span>
|
||||
|
||||
<span class="w"> </span><span class="nt">github_git</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">github-git</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">github.com</span>
|
||||
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">443</span>
|
||||
<span class="w"> </span><span class="nt">protocol</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">rest</span>
|
||||
<span class="w"> </span><span class="nt">tls</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">terminate</span>
|
||||
<span class="w"> </span><span class="nt">enforcement</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">enforce</span>
|
||||
<span class="w"> </span><span class="nt">rules</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">allow</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">GET</span>
|
||||
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="s">"/<org>/<repo>.git/info/refs*"</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">allow</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">POST</span>
|
||||
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="s">"/<org>/<repo>.git/git-upload-pack"</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">allow</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">POST</span>
|
||||
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="s">"/<org>/<repo>.git/git-receive-pack"</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/bin/git</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
|
||||
<span class="w"> </span><span class="c1"># ── GitHub: REST API ─────────────────────────────────────────</span>
|
||||
|
||||
<span class="w"> </span><span class="nt">github_api</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">github-api</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">api.github.com</span>
|
||||
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">443</span>
|
||||
<span class="w"> </span><span class="nt">protocol</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">rest</span>
|
||||
<span class="w"> </span><span class="nt">tls</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">terminate</span>
|
||||
<span class="w"> </span><span class="nt">enforcement</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">enforce</span>
|
||||
<span class="w"> </span><span class="nt">rules</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="c1"># GraphQL API (used by gh CLI)</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">allow</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">POST</span>
|
||||
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="s">"/graphql"</span>
|
||||
<span class="w"> </span><span class="c1"># Full read-write access to the repository</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">allow</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="s">"*"</span>
|
||||
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="s">"/repos/<org>/<repo>/**"</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/local/bin/claude</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/local/bin/opencode</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/bin/gh</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/bin/curl</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
|
||||
<span class="w"> </span><span class="c1"># ── Package managers ─────────────────────────────────────────</span>
|
||||
|
||||
<span class="w"> </span><span class="nt">pypi</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">pypi</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">pypi.org</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">files.pythonhosted.org</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">github.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">objects.githubusercontent.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">api.github.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">downloads.python.org</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/sandbox/.venv/bin/python</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/sandbox/.venv/bin/python3</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/sandbox/.venv/bin/pip</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/app/.venv/bin/python</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/app/.venv/bin/python3</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/app/.venv/bin/pip</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/local/bin/uv</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="s">"/sandbox/.uv/python/**"</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
|
||||
<span class="w"> </span><span class="c1"># ── VS Code Remote ──────────────────────────────────────────</span>
|
||||
|
||||
<span class="w"> </span><span class="nt">vscode</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">vscode</span>
|
||||
<span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">update.code.visualstudio.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="s">"*.vo.msecnd.net"</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">vscode.download.prss.microsoft.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="nv">marketplace.visualstudio.com</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> host</span><span class="p">:</span><span class="w"> </span><span class="s">"*.gallerycdn.vsassets.io"</span><span class="p p-Indicator">,</span><span class="nt"> port</span><span class="p">:</span><span class="w"> </span><span class="nv">443</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="nt">binaries</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/bin/curl</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="nv">/usr/bin/wget</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="s">"/sandbox/.vscode-server/**"</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nt"> path</span><span class="p">:</span><span class="w"> </span><span class="s">"/sandbox/.vscode-remote-containers/**"</span><span class="w"> </span><span class="p p-Indicator">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p class="sd-card-text">The following table summarizes the two GitHub-specific blocks:</p>
|
||||
<div class="pst-scrollable-table-container"><table class="table">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p class="sd-card-text">Block</p></th>
|
||||
<th class="head"><p class="sd-card-text">Endpoint</p></th>
|
||||
<th class="head"><p class="sd-card-text">Behavior</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p class="sd-card-text"><code class="docutils literal notranslate"><span class="pre">github_git</span></code></p></td>
|
||||
<td><p class="sd-card-text"><code class="docutils literal notranslate"><span class="pre">github.com:443</span></code></p></td>
|
||||
<td><p class="sd-card-text">Git Smart HTTP protocol with TLS termination. Permits <code class="docutils literal notranslate"><span class="pre">info/refs</span></code> (clone/fetch), <code class="docutils literal notranslate"><span class="pre">git-upload-pack</span></code> (fetch data), and <code class="docutils literal notranslate"><span class="pre">git-receive-pack</span></code> (push) for the specified repository. Denies all operations on unlisted repositories.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p class="sd-card-text"><code class="docutils literal notranslate"><span class="pre">github_api</span></code></p></td>
|
||||
<td><p class="sd-card-text"><code class="docutils literal notranslate"><span class="pre">api.github.com:443</span></code></p></td>
|
||||
<td><p class="sd-card-text">REST API with TLS termination. Permits all HTTP methods for the specified repository and GraphQL queries. Denies API access to unlisted repositories.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="sd-card-text">The remaining blocks (<code class="docutils literal notranslate"><span class="pre">claude_code</span></code>, <code class="docutils literal notranslate"><span class="pre">nvidia_inference</span></code>, <code class="docutils literal notranslate"><span class="pre">pypi</span></code>, <code class="docutils literal notranslate"><span class="pre">vscode</span></code>) are identical to the <a class="reference internal" href="../reference/default-policy.html"><span class="doc">default policy</span></a>. Sandbox behavior outside of GitHub operations is unchanged.</p>
|
||||
<p class="sd-card-text">For details on policy block structure, refer to <a class="reference internal" href="../sandboxes/index.html#network-access-rules"><span class="std std-ref">Network Access Rules</span></a>.</p>
|
||||
</div>
|
||||
</details></section>
|
||||
<section id="retry-the-push">
|
||||
<h2>Retry the Push<a class="headerlink" href="#retry-the-push" title="Link to this heading">#</a></h2>
|
||||
<p><strong>Terminal 1 (sandbox)</strong> — Switch back to Claude Code and ask it to retry the push:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>The sandbox policy has been updated. Try pushing to the repository again.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The push completes successfully. The <code class="docutils literal notranslate"><span class="pre">openshell</span> <span class="pre">term</span></code> dashboard now shows <code class="docutils literal notranslate"><span class="pre">l7_decision=allow</span></code> entries for <code class="docutils literal notranslate"><span class="pre">api.github.com</span></code> and <code class="docutils literal notranslate"><span class="pre">github.com</span></code> where it previously showed denials.</p>
|
||||
</section>
|
||||
<section id="next-steps">
|
||||
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Link to this heading">#</a></h2>
|
||||
<p>The following resources cover related topics in greater depth:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To add per-repository access levels (read-write vs read-only) or restrict to specific API methods, refer to the <a class="reference internal" href="../reference/policy-schema.html"><span class="std std-doc">Policy Schema Reference</span></a>.</p></li>
|
||||
<li><p>To learn the full policy iteration workflow (pull, edit, push, verify), refer to <a class="reference internal" href="../sandboxes/policies.html"><span class="doc">Customize Sandbox Policies</span></a>.</p></li>
|
||||
<li><p>To inject credentials automatically instead of pasting tokens, refer to <a class="reference internal" href="../sandboxes/providers.html"><span class="doc">Providers</span></a>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<footer class="prev-next-footer d-print-none">
|
||||
|
||||
<div class="prev-next-area">
|
||||
<a class="left-prev"
|
||||
href="../get-started/quickstart.html"
|
||||
title="previous page">
|
||||
<i class="fa-solid fa-angle-left"></i>
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">previous</p>
|
||||
<p class="prev-next-title">Quickstart</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="right-next"
|
||||
href="../sandboxes/index.html"
|
||||
title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title">About Sandboxes</p>
|
||||
</div>
|
||||
<i class="fa-solid fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dialog id="pst-secondary-sidebar-modal"></dialog>
|
||||
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
|
||||
|
||||
|
||||
<div class="sidebar-secondary-item">
|
||||
<div
|
||||
id="pst-page-navigation-heading-2"
|
||||
class="page-toc tocsection onthispage">
|
||||
<i class="fa-solid fa-list"></i> On this page
|
||||
</div>
|
||||
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#prerequisites">Prerequisites</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#launch-the-sandbox">Launch the Sandbox</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#push-code-to-github">Push Code to GitHub</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#diagnose-the-denial">Diagnose the Denial</a><ul class="nav section-nav flex-column">
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#view-the-logs-from-your-laptop">View the logs from your laptop</a></li>
|
||||
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#ask-claude-to-check-the-sandbox-logs">Ask Claude to check the sandbox logs</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#update-the-policy-from-your-laptop">Update the Policy from Your Laptop</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#retry-the-push">Retry the Push</a></li>
|
||||
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#next-steps">Next Steps</a></li>
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<footer class="bd-footer-content">
|
||||
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Scripts loaded after <body> so the DOM is not blocked -->
|
||||
<script defer src="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
|
||||
<script defer src="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
|
||||
|
||||
|
||||
<footer class="bd-footer">
|
||||
<div class="bd-footer__inner bd-page-width">
|
||||
|
||||
<div class="footer-items__start">
|
||||
|
||||
<div class="footer-item">
|
||||
<a class="footer-brand logo" href="https://www.nvidia.com">
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-blk-for-screen.svg" class="logo__image only-light" alt="NVIDIA"/>
|
||||
<img src="../_static/nvidia-logo-horiz-rgb-1c-wht-for-screen.svg" class="logo__image only-dark" alt="NVIDIA"/>
|
||||
</a></div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
<div class="footer-links">
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-policy/">Privacy Policy</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/privacy-center/">Your Privacy Choices</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/terms-of-service/">Terms of Service</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/accessibility/">Accessibility</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/about-nvidia/company-policies/">Corporate Policies</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/product-security/">Product Security</a>
|
||||
|
|
||||
|
||||
|
||||
|
||||
<a class="external" href="https://www.nvidia.com/en-us/contact/">Contact</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-item">
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="copyright">
|
||||
|
||||
Copyright © 2025-2026, NVIDIA Corporation.
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||