runtime: own working directories

This commit is contained in:
2026-07-09 19:04:37 +09:00
parent afc43780a7
commit fa233ba025
9 changed files with 798 additions and 117 deletions
@@ -142,10 +142,12 @@
creatingWorkingDirectory = true;
submitError = null;
try {
const response = await fetch(workerApiPath('/working-directories'), {
const response = await fetch(
workerApiPath(`/runtimes/${encodeURIComponent(runtimeId)}/working-directories`), {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({
runtime_id: runtimeId,
repository_id: workingDirectoryRepositoryId,
selector: workingDirectorySelector || null,
policy: { dirty_state: 'clean_point_only', cleanup: 'manual_or_worker_stop' },
@@ -150,6 +150,7 @@ export type BrowserWorkerWorkingDirectorySelection = {
};
export type BrowserWorkingDirectoryCreateRequest = {
runtime_id: string;
repository_id: string;
selector?: string | null;
policy?: {