mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 04:03:31 +00:00
chore: update examples to use Alpine and improve test script
- Docker example uses Alpine for musl compatibility with 0.1.x releases - Update test script binary path and E2B provider - Minor example updates
This commit is contained in:
parent
cbd36eeca8
commit
9e9514f2e8
5 changed files with 6 additions and 7 deletions
|
|
@ -57,8 +57,8 @@ if (!hasSnapshot) {
|
|||
image: Image.base("ubuntu:22.04").runCommands(
|
||||
// Install dependencies
|
||||
"apt-get update && apt-get install -y curl ca-certificates",
|
||||
// Install sandbox-agent (0.1.0-rc.1 has install-agent command)
|
||||
"curl -fsSL https://releases.rivet.dev/sandbox-agent/0.1.0-rc.1/install.sh | sh",
|
||||
// Install sandbox-agent
|
||||
"curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh",
|
||||
// Install agents
|
||||
"sandbox-agent install-agent claude",
|
||||
"sandbox-agent install-agent codex",
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const container = await docker.createContainer({
|
|||
Cmd: ["sh", "-c", [
|
||||
// Install dependencies (Alpine uses apk, not apt-get)
|
||||
"apk add --no-cache curl ca-certificates libstdc++ libgcc bash",
|
||||
"curl -fsSL https://releases.rivet.dev/sandbox-agent/0.1.0-rc.1/install.sh | sh",
|
||||
"curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh",
|
||||
"sandbox-agent install-agent claude",
|
||||
"sandbox-agent install-agent codex",
|
||||
`sandbox-agent server --no-token --host 0.0.0.0 --port ${PORT}`,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const run = async (cmd: string) => {
|
|||
};
|
||||
|
||||
console.log("Installing sandbox-agent...");
|
||||
await run("curl -fsSL https://releases.rivet.dev/sandbox-agent/0.1.0-rc.1/install.sh | sh");
|
||||
await run("curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh");
|
||||
|
||||
console.log("Installing agents...");
|
||||
await run("sandbox-agent install-agent claude");
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ async function getLatestGitVersion(): Promise<string | null> {
|
|||
}
|
||||
|
||||
async function shouldTagAsLatest(newVersion: string): Promise<boolean> {
|
||||
// Check if version has prerelease identifier (e.g., 1.0.0-rc.1)
|
||||
// Check if version has prerelease identifier
|
||||
const parsedVersion = semver.parse(newVersion);
|
||||
if (!parsedVersion) {
|
||||
throw new Error(`Invalid semantic version: ${newVersion}`);
|
||||
|
|
|
|||
|
|
@ -286,9 +286,8 @@ async function installSandboxAgent(sandbox: Sandbox, binaryPath: string): Promis
|
|||
|
||||
if (binaryPath === "RELEASE") {
|
||||
log.info("Installing from releases.rivet.dev...");
|
||||
// Use 0.1.0-rc.1 which has install-agent command
|
||||
const result = await sandbox.exec(
|
||||
"curl -fsSL https://releases.rivet.dev/sandbox-agent/0.1.0-rc.1/install.sh | sh",
|
||||
"curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh",
|
||||
);
|
||||
log.debug(`Install output: ${result.stdout}`);
|
||||
if (result.exitCode !== 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue