mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-19 22:01:43 +00:00
Rename Factory to Foundry
This commit is contained in:
parent
0a8fda040b
commit
324de36577
256 changed files with 605 additions and 603 deletions
44
foundry/packages/client/src/keys.ts
Normal file
44
foundry/packages/client/src/keys.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
export type ActorKey = string[];
|
||||
|
||||
export function workspaceKey(workspaceId: string): ActorKey {
|
||||
return ["ws", workspaceId];
|
||||
}
|
||||
|
||||
export function repoKey(workspaceId: string, repoId: string): ActorKey {
|
||||
return ["ws", workspaceId, "repo", repoId];
|
||||
}
|
||||
|
||||
export function taskKey(workspaceId: string, taskId: string): ActorKey {
|
||||
return ["ws", workspaceId, "task", taskId];
|
||||
}
|
||||
|
||||
export function sandboxInstanceKey(
|
||||
workspaceId: string,
|
||||
providerId: string,
|
||||
sandboxId: string,
|
||||
): ActorKey {
|
||||
return ["ws", workspaceId, "provider", providerId, "sandbox", sandboxId];
|
||||
}
|
||||
|
||||
export function historyKey(workspaceId: string, repoId: string): ActorKey {
|
||||
return ["ws", workspaceId, "repo", repoId, "history"];
|
||||
}
|
||||
|
||||
export function repoPrSyncKey(workspaceId: string, repoId: string): ActorKey {
|
||||
return ["ws", workspaceId, "repo", repoId, "pr-sync"];
|
||||
}
|
||||
|
||||
export function repoBranchSyncKey(workspaceId: string, repoId: string): ActorKey {
|
||||
return ["ws", workspaceId, "repo", repoId, "branch-sync"];
|
||||
}
|
||||
|
||||
export function taskStatusSyncKey(
|
||||
workspaceId: string,
|
||||
repoId: string,
|
||||
taskId: string,
|
||||
sandboxId: string,
|
||||
sessionId: string,
|
||||
): ActorKey {
|
||||
// Include sandbox + session so multiple sandboxes/sessions can be tracked per task.
|
||||
return ["ws", workspaceId, "task", taskId, "status-sync", repoId, sandboxId, sessionId];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue