mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 07:04:48 +00:00
Surface aggregate status (error, provisioning, running, ready, no sandbox) as a colored pill in the transcript panel header. Integrates task runtime status, session status, and sandbox availability via the sandboxProcesses interest topic so the pill accurately reflects unreachable sandboxes. Includes mock tasks demonstrating error, provisioning, and running states, unit tests for deriveHeaderStatus, and workspace-dashboard integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
export type ActorKey = string[];
|
|
|
|
export function workspaceKey(workspaceId: string): ActorKey {
|
|
return ["ws", workspaceId];
|
|
}
|
|
|
|
export function authUserKey(userId: string): ActorKey {
|
|
return ["ws", "app", "user", userId];
|
|
}
|
|
|
|
export function projectKey(workspaceId: string, repoId: string): ActorKey {
|
|
return ["ws", workspaceId, "project", repoId];
|
|
}
|
|
|
|
export function taskKey(workspaceId: string, repoId: string, taskId: string): ActorKey {
|
|
return ["ws", workspaceId, "project", repoId, "task", taskId];
|
|
}
|
|
|
|
export function taskSandboxKey(workspaceId: string, sandboxId: string): ActorKey {
|
|
return ["ws", workspaceId, "sandbox", sandboxId];
|
|
}
|
|
|
|
export function historyKey(workspaceId: string, repoId: string): ActorKey {
|
|
return ["ws", workspaceId, "project", repoId, "history"];
|
|
}
|
|
|
|
export function projectPrSyncKey(workspaceId: string, repoId: string): ActorKey {
|
|
return ["ws", workspaceId, "project", repoId, "pr-sync"];
|
|
}
|
|
|
|
export function projectBranchSyncKey(workspaceId: string, repoId: string): ActorKey {
|
|
return ["ws", workspaceId, "project", repoId, "branch-sync"];
|
|
}
|