1
0
mirror of https://github.com/docker/docs.git synced 2026-10-23 18:09:02 +03:00
Files
docs/layouts/_partials/sidebar/sections.html
David Karlsson bed22bda81 docs: Cloud Sandboxes API and SDK (#26168)
## Description

Add an experimental Sandboxes API and SDK section alongside Docker
Sandboxes under AI and agents, at `/ai/sandboxes-api/`. Cover
installation of `@docker/sandboxes`, browser and PAT authentication, and
a TypeScript walkthrough that launches the shell kit, runs a command,
and deletes the sandbox. Explain kits and image choices with examples,
along with compute sizes, quotas, permissions, resource lifecycle,
errors, and retries. Link subscription setup and billing to the shared
Docker Agentic Platform guide. Preserve the previous
`/ai/sandboxes/api/` URLs with redirects.

Uses the shared Docker Agentic Platform documentation merged in #26142.
Sibling to #26158, which introduces CLI-side Cloud Sandboxes
documentation.

Include 36 SDK cookbook recipes at `/ai/sandboxes-api/cookbook/` and the
public REST API reference at `/reference/api/sandboxes/`. Import the
generated export from `docker/sbx-api` commit `60d79c1d` (source
`1a7f4026`). Overview and installation remain maintained here. The
reference uses the shared API renderer from main, with separate
operation and schema pages, streaming and WebSocket details, and a
downloadable OpenAPI spec. An API reference link appears in the API/SDK
sidebar. A pinned manifest and import script provide the basis for later
release automation.

Examples are optional in the shared renderer; supplied examples still
have to pass schema validation. Requests without body examples use a
request-body file with instructions to prepare it. The import copies all
selected recipes and the OpenAPI specification byte for byte from the
corrected upstream export, without patches or link rewrites. The broken
naming recipe remains temporarily excluded.

This remains a draft pending validation against the published npm SDK.
The imported cookbook contains the TypeScript-only guidance, five-minute
request deadlines, kit-readiness explanation, active-policy status
requirement, and snapshot-deletion and lifetime-renewal restrictions.

Validation: scoped Markdown and Vale checks, full Hugo build, rendered
navigation, redirects, and internal links, and TypeScript type-checking
against the generated public SDK from `docker/sbx-api` commit
`68f214b9`. Import validation also covers all 60 REST operations and 188
schema definitions, 1,198 imported-page links and anchors,
desktop/mobile rendering, Markdown output, spec delivery, and a repeat
import. The shared renderer tests, strict generation for all five APIs
(zero diagnostics), full Hugo build, and verification of 453
HTML/Markdown page pairs and API links pass. No live sandbox execution.
The corrected export passes strict generation for all five APIs with
zero diagnostics, scoped Markdown/Vale lint, a full Hugo build, and
verification of 453 HTML/Markdown page pairs and API links. A repeat
import produces identical files. The spec update changes examples only;
schemas and operations are unchanged.

@netlify /ai/sandboxes-api/

Generated by Codex

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-24 18:06:30 +02:00

179 lines
6.0 KiB
HTML

{{- /*
This template recursively renders the sidebar navigation, grouping pages by `Params.sidebar.groups`.
Highlights:
- Supports hierarchical navigation with collapsible sections (`renderList` template).
- Dynamically applies current page highlighting and expanded states.
- Handles external links via `Params.sidebar.goto` in `renderSingle`.
- Requires `Params.sitemap` and `Params.sidebar` for filtering and behavior.
*/
-}}
<!-- section tree -->
<nav class="navbar-font mx-1 mt-1 flex flex-col">
<ul>
{{ template "renderChildren" (dict "section" .FirstSection "revealHidden" false) }}
</ul>
</nav>
{{ define "renderChildren" }}
{{- $section := .section }}
{{- $revealHidden := .revealHidden }}
{{- $sourcePages := $section.Pages }}
{{- if $section.Params.sidebar.reverse }}
{{ $sourcePages = $sourcePages.Reverse }}
{{- end }}
{{- $pages := slice }}
{{- range $sourcePages }}
{{- $isActive := or (eq page .) (page.IsDescendant .) }}
{{- if and (or (not $section.Params.sidebar.activeChildrenOnly) $isActive) (or (ne .Params.sitemap false) $isActive $revealHidden) }}
{{- $pages = $pages | append . }}
{{- end }}
{{- end }}
{{- $ungrouped := where $pages "Params.sidebar.group" "==" nil }}
{{- if $section.Params.sidebar.activeChildrenOnly }}
{{- $ungrouped = $pages }}
{{- end }}
{{- range $ungrouped }}
{{- if and .IsSection (not .Params.apiID) }}
{{- template "renderList" (dict "section" . "revealHidden" $revealHidden) }}
{{- else }}
{{- template "renderSingle" . }}
{{- end }}
{{- end }}
{{- $groups := $section.Params.sidebar.groups }}
{{- if $section.Params.sidebar.activeChildrenOnly }}
{{- $groups = slice }}
{{- end }}
{{- range $groups }}
<!-- Main titles -->
<div class="navbar-group">
<li class="navbar-group-font-title">
{{ . }}
</li>
{{- range where $pages "Params.sidebar.group" . }}
{{- if and .IsSection (not .Params.apiID) }}
{{- template "renderList" (dict "section" . "revealHidden" $revealHidden) }}
{{- else }}
{{- template "renderSingle" . }}
{{- end }}
{{- end }}
</div>
{{- end }}
{{ end }}
{{/* Recursive template for sidebar items */}}
{{ define "renderList" }}
{{- $section := .section }}
{{- $isCurrent := eq page $section }}
{{- $expanded := or $isCurrent (page.IsDescendant $section) }}
{{- $revealHidden := or .revealHidden (and (eq $section.Params.sitemap false) $expanded) }}
<li class="" x-data="{ expanded: {{ $expanded }} }">
<div
class="{{ if $isCurrent }}
navbar-entry-background-current
{{ end }} flex w-full items-center justify-between rounded-sm"
>
<div class="navbar-entry-margin w-full truncate">
{{- if $section.Permalink }}
{{/* If the link is not empty, use it */}}
<!-- Sections that have children and linking to a page -->
<a
{{ if $isCurrent }}
aria-current="page" id="sidebar-current-page"
{{ end }}
class="hover:text-blue block select-none hover:dark:text-blue-400"
href="{{ $section.Permalink }}"
>
{{ template "renderTitle" $section }}
</a>
{{- else }}
{{/* Otherwise, just expand the section */}}
<!-- Sections that have children and do not link to a page -->
<button
@click="expanded = !expanded"
class="hover:text-blue w-full text-left select-none hover:dark:text-blue-400"
>
{{ template "renderTitle" $section }}
</button>
{{- end }}
</div>
{{/* Only show expand group button if section has children */}}
{{- $children := slice }}
{{- range $section.Pages }}
{{- $isActive := or (eq page .) (page.IsDescendant .) }}
{{- if and (or (not $section.Params.sidebar.activeChildrenOnly) $isActive) (or (ne .Params.sitemap false) $isActive $revealHidden) }}
{{- $children = $children | append . }}
{{- end }}
{{- end }}
{{- $hasChildren := gt (len $children) 0 }}
{{- if $hasChildren }}
<!-- Expand group button -->
<button
@click="expanded = !expanded"
class="rounded-sm px-1 hover:bg-gray-200 hover:dark:bg-gray-800"
>
<span
:class="{ 'hidden' : expanded }"
class="icon-svg icon-sm {{ if $expanded }}hidden{{ end }}"
>
{{ partialCached "icon" "chevron-down" "chevron-down" }}
</span>
<span
:class="{ 'hidden' : !expanded }"
class="icon-svg icon-sm {{ if not $expanded }}hidden{{ end }}"
>
{{ partialCached "icon" "chevron-up" "chevron-up" }}
</span>
</button>
{{- end }}
</div>
<ul
:class="{ 'hidden' : !expanded }"
class="{{ if not $expanded }}hidden{{ end }} ml-3"
>
{{ template "renderChildren" (dict "section" $section "revealHidden" $revealHidden) }}
</ul>
</li>
{{ end }}
{{ define "renderSingle" }}
{{- if .Params.sidebar.goto }}
<li class="navbar-entry-margin hover:text-blue hover:dark:text-blue-400">
<a
class="block w-full truncate"
href="{{ .Params.sidebar.goto }}"
title="{{ .LinkTitle }}"
>
{{ template "renderTitle" . }}
</a>
</li>
{{- else }}
{{ $isCurrent := eq page . }}
<li
class="navbar-entry-margin hover:text-blue {{ if $isCurrent }}
navbar-entry-background-current
{{ end }} rounded-sm hover:dark:text-blue-400"
>
<a
{{ if $isCurrent }}
aria-current="page" id="sidebar-current-page"
{{ end }}
class="block w-full truncate"
href="{{ .Permalink }}"
title="{{ .LinkTitle }}"
>
{{ template "renderTitle" . }}
</a>
</li>
{{- end }}
{{ end }}
{{ define "renderTitle" }}
{{ .LinkTitle }}
{{- with .Params.sidebar.badge }}
<span>
{{- partial "components/badge.html" (dict "color" .color "content" .text) }}
</span>
{{- end }}
{{ end }}