mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 15:02:39 +00:00
parent
400f9a214e
commit
99abb9d42e
171 changed files with 7260 additions and 7342 deletions
|
|
@ -37,7 +37,7 @@ function healthyMetadataResponse(): { ok: boolean; json: () => Promise<unknown>
|
|||
json: async () => ({
|
||||
runtime: "rivetkit",
|
||||
actorNames: {
|
||||
workspace: {},
|
||||
organization: {},
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
|
@ -58,7 +58,7 @@ describe("backend manager", () => {
|
|||
const config: AppConfig = ConfigSchema.parse({
|
||||
auto_submit: true,
|
||||
notify: ["terminal"],
|
||||
workspace: { default: "default" },
|
||||
organization: { default: "default" },
|
||||
backend: {
|
||||
host: "127.0.0.1",
|
||||
port: 7741,
|
||||
|
|
@ -68,7 +68,7 @@ describe("backend manager", () => {
|
|||
backup_interval_secs: 3600,
|
||||
backup_retention_days: 7,
|
||||
},
|
||||
providers: {
|
||||
sandboxProviders: {
|
||||
local: {},
|
||||
e2b: {},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { ConfigSchema } from "@sandbox-agent/foundry-shared";
|
||||
import { resolveWorkspace } from "../src/workspace/config.js";
|
||||
import { resolveOrganization } from "../src/organization/config.js";
|
||||
|
||||
describe("cli workspace resolution", () => {
|
||||
it("uses default workspace when no flag", () => {
|
||||
describe("cli organization resolution", () => {
|
||||
it("uses default organization when no flag", () => {
|
||||
const config = ConfigSchema.parse({
|
||||
auto_submit: true as const,
|
||||
notify: ["terminal" as const],
|
||||
workspace: { default: "team" },
|
||||
organization: { default: "team" },
|
||||
backend: {
|
||||
host: "127.0.0.1",
|
||||
port: 7741,
|
||||
|
|
@ -17,13 +17,13 @@ describe("cli workspace resolution", () => {
|
|||
backup_interval_secs: 3600,
|
||||
backup_retention_days: 7,
|
||||
},
|
||||
providers: {
|
||||
sandboxProviders: {
|
||||
local: {},
|
||||
e2b: {},
|
||||
},
|
||||
});
|
||||
|
||||
expect(resolveWorkspace(undefined, config)).toBe("team");
|
||||
expect(resolveWorkspace("alpha", config)).toBe("alpha");
|
||||
expect(resolveOrganization(undefined, config)).toBe("team");
|
||||
expect(resolveOrganization("alpha", config)).toBe("alpha");
|
||||
});
|
||||
});
|
||||
|
|
@ -21,7 +21,7 @@ describe("resolveTuiTheme", () => {
|
|||
const baseConfig: AppConfig = ConfigSchema.parse({
|
||||
auto_submit: true,
|
||||
notify: ["terminal"],
|
||||
workspace: { default: "default" },
|
||||
organization: { default: "default" },
|
||||
backend: {
|
||||
host: "127.0.0.1",
|
||||
port: 7741,
|
||||
|
|
@ -31,7 +31,7 @@ describe("resolveTuiTheme", () => {
|
|||
backup_interval_secs: 3600,
|
||||
backup_retention_days: 7,
|
||||
},
|
||||
providers: {
|
||||
sandboxProviders: {
|
||||
local: {},
|
||||
e2b: {},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ import { filterTasks, fuzzyMatch } from "@sandbox-agent/foundry-client";
|
|||
import { formatRows } from "../src/tui.js";
|
||||
|
||||
const sample: TaskRecord = {
|
||||
workspaceId: "default",
|
||||
organizationId: "default",
|
||||
repoId: "repo-a",
|
||||
repoRemote: "https://example.com/repo-a.git",
|
||||
taskId: "task-1",
|
||||
branchName: "feature/test",
|
||||
title: "Test Title",
|
||||
task: "Do test",
|
||||
providerId: "local",
|
||||
sandboxProviderId: "local",
|
||||
status: "running",
|
||||
statusMessage: null,
|
||||
activeSandboxId: "sandbox-1",
|
||||
|
|
@ -19,7 +19,7 @@ const sample: TaskRecord = {
|
|||
sandboxes: [
|
||||
{
|
||||
sandboxId: "sandbox-1",
|
||||
providerId: "local",
|
||||
sandboxProviderId: "local",
|
||||
switchTarget: "sandbox://local/sandbox-1",
|
||||
cwd: null,
|
||||
createdAt: 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue