diff options
Diffstat (limited to 'makima/frontend/src/lib/api.ts')
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index daa2b5c..78e52cd 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -1417,7 +1417,7 @@ export async function deleteAccount( // ============================================================================= /** Contract type determines the workflow and required documents */ -export type ContractType = "simple" | "specification" | "task"; +export type ContractType = "simple" | "specification"; export type ContractPhase = "research" | "specify" | "plan" | "execute" | "review"; export type ContractStatus = "active" | "completed" | "archived"; export type RepositorySourceType = "remote" | "local" | "managed"; @@ -1428,16 +1428,12 @@ export function getValidPhases(contractType: ContractType): ContractPhase[] { if (contractType === "simple") { return ["plan", "execute"]; } - if (contractType === "task") { - return ["execute"]; - } return ["research", "specify", "plan", "execute", "review"]; } /** Get default initial phase for a contract type */ export function getDefaultPhase(contractType: ContractType): ContractPhase { if (contractType === "simple") return "plan"; - if (contractType === "task") return "execute"; return "research"; } @@ -2081,47 +2077,6 @@ export async function deleteRepositoryHistory(id: string): Promise<void> { } // ============================================================================= -// Adhoc Task Types (for one-off tasks without supervisor overhead) -// ============================================================================= - -/** Request payload for creating an adhoc (one-off) task */ -export interface AdhocTaskRequest { - /** Name/description of the task */ - name: string; - /** The plan/instructions for the task */ - plan: string; - /** Repository URL (optional) */ - repositoryUrl?: string; - /** Base branch to work from */ - baseBranch?: string; -} - -/** Response for adhoc task creation */ -export interface AdhocTaskResponse { - contract: ContractSummary; - task: Task; -} - -/** - * Create an adhoc (one-off) task without supervisor overhead. - * This creates a minimal "task" type contract with a single task. - * The contract auto-archives when the task completes. - */ -export async function createAdhocTask( - data: AdhocTaskRequest -): Promise<AdhocTaskResponse> { - const res = await authFetch(`${API_BASE}/api/v1/tasks/adhoc`, { - method: "POST", - body: JSON.stringify(data), - }); - if (!res.ok) { - const errorText = await res.text(); - throw new Error(`Failed to create adhoc task: ${errorText || res.statusText}`); - } - return res.json(); -} - -// ============================================================================= // History Types // ============================================================================= |
