"use client" import { useEffect, useMemo, useState } from "react" import ActivityPanel from "./ActivityPanel" import SandboxHealthPanel from "./SandboxHealthPanel" import type { SandboxInventoryItem } from "../hooks/useSandboxInventory" const helpSections = [ { title: "Daily Flow", items: [ "Select a sandbox to reveal operations, file transfer, inference routes, policy, and archive tools.", "Use Operator Terminal after selecting a sandbox; the terminal opens in a separate tab for that sandbox session.", "Use Refresh Inventory when a create, restore, restart, or destroy operation is still settling.", ], }, { title: "Create And Clone", items: [ "Create Sandbox builds a new sandbox from a blueprint or custom OpenShell sandbox template.", "Restore from Backup can hydrate a fresh sandbox immediately after it reaches Ready.", "Wizards includes a guided Clone Sandbox workflow that creates a target sandbox and restores a source backup into it.", "For cloning, keep Replace target contents enabled and restore into /sandbox.", ], }, { title: "Files", items: [ "File Transfer uploads local files into /sandbox or /tmp and downloads regular files back out.", "The file browser lists one directory at a time; select a directory to enter it or use Up to move back.", "Large file transfers are limited by SANDBOX_FILE_TRANSFER_MAX_BYTES, currently defaulting to 128 MiB.", ], }, { title: "Backup / Restore", items: [ "Backup downloads a compressed .tar.gz archive from a sandbox directory, usually /sandbox.", "Save to Catalog stores a backup on the controller host for later cloning or redeploying.", "Restore extracts a .tar.gz archive into the selected sandbox path.", "Replace target contents deletes existing files in the target directory before extraction; merge leaves existing files in place.", ], }, { title: "Policy And Network", items: [ "Sandbox Policy is where pending network permission requests appear for approval or rejection.", "Dynamic network policy changes can apply live; static filesystem policy changes may require recreating the sandbox.", "Inference Routes configure model/provider routing for the selected sandbox.", ], }, { title: "Safety", items: [ "Destroy Sandbox is permanent. Back up anything important first.", "Restore rejects unsafe archive paths, but only restore archives you trust.", "If the UI looks stale after code changes, hard refresh the browser; the dev server is on 192.168.50.81:3000.", ], }, ] function HealthAccordion({ sandboxes }: { sandboxes: SandboxInventoryItem[] }) { const [open, setOpen] = useState(true) const [selectedSandboxId, setSelectedSandboxId] = useState("") const selectedSandbox = useMemo( () => sandboxes.find((sandbox) => sandbox.id === selectedSandboxId) || sandboxes[0] || null, [sandboxes, selectedSandboxId], ) useEffect(() => { if (!selectedSandboxId && sandboxes[0]) { setSelectedSandboxId(sandboxes[0].id) } }, [sandboxes, selectedSandboxId]) return (
{open && (
{sandboxes.length > 1 && ( )} {selectedSandbox ? ( ) : (
No sandboxes are available for health checks yet.
)}
)}
) } export default function HelpPanel({ sandboxes }: { sandboxes: SandboxInventoryItem[] }) { return (

Operator Guide

Help

Quick reference for running sandboxes, moving files, preserving work, and cloning a prepared environment.

Open Swagger

API Reference

Swagger opens the controller-node API reference in a separate page, including OpenAPI JSON, endpoint details, schemas, and example payloads.

Swagger Page OpenAPI JSON
{helpSections.map((section) => (

{section.title}

    {section.items.map((item) => (
  • {item}
  • ))}
))}

Common Paths

{[ ["/sandbox", "Primary writable workspace for persisted sandbox contents."], ["/tmp", "Scratch space for short-lived files and transfer staging."], ["Backup .tar.gz", "Portable archive for cold storage, cloning, and redeploying."], ].map(([label, body]) => (

{label}

{body}

))}
) }