summaryrefslogtreecommitdiff
path: root/makima/frontend/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'makima/frontend/src/lib')
-rw-r--r--makima/frontend/src/lib/api.ts110
1 files changed, 2 insertions, 108 deletions
diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts
index e8b3d8a..f148d76 100644
--- a/makima/frontend/src/lib/api.ts
+++ b/makima/frontend/src/lib/api.ts
@@ -1659,45 +1659,9 @@ export interface DeliverableDefinition {
priority: "required" | "recommended" | "optional";
}
-/** Request to create a custom contract type template */
-export interface CreateTemplateRequest {
- name: string;
- description?: string;
- phases: PhaseDefinition[];
- defaultPhase: string;
- deliverables?: Record<string, DeliverableDefinition[]>;
-}
-
-/** Request to update a custom contract type template */
-export interface UpdateTemplateRequest {
- name?: string;
- description?: string;
- phases?: PhaseDefinition[];
- defaultPhase?: string;
- deliverables?: Record<string, DeliverableDefinition[]>;
- version?: number;
-}
-
-/** Custom template record from the API */
-export interface ContractTypeTemplateRecord {
- id: string;
- name: string;
- description: string | null;
- phases: PhaseDefinition[];
- defaultPhase: string;
- isBuiltin: boolean;
- version: number;
- createdAt: string;
-}
-
-/** Response for single template operations */
-export interface TemplateResponse {
- template: ContractTypeTemplateRecord;
-}
-
/**
- * List available contract types/templates.
- * Returns built-in types (simple, specification) and any custom types.
+ * List available contract types.
+ * Returns built-in types only (simple, specification, execute).
*/
export async function listContractTypes(): Promise<ListContractTypesResponse> {
const res = await authFetch(`${API_BASE}/api/v1/contract-types`);
@@ -1707,66 +1671,6 @@ export async function listContractTypes(): Promise<ListContractTypesResponse> {
return res.json();
}
-/**
- * Create a new custom contract type template.
- */
-export async function createContractTemplate(
- req: CreateTemplateRequest
-): Promise<TemplateResponse> {
- const res = await authFetch(`${API_BASE}/api/v1/contract-types`, {
- method: "POST",
- headers: { "Content-Type": "application/json" },
- body: JSON.stringify(req),
- });
- if (!res.ok) {
- const err = await res.json().catch(() => ({ message: res.statusText }));
- throw new Error(err.message || `Failed to create template: ${res.statusText}`);
- }
- return res.json();
-}
-
-/**
- * Get a custom contract type template by ID.
- */
-export async function getContractTemplate(id: string): Promise<TemplateResponse> {
- const res = await authFetch(`${API_BASE}/api/v1/contract-types/${id}`);
- if (!res.ok) {
- throw new Error(`Failed to get template: ${res.statusText}`);
- }
- return res.json();
-}
-
-/**
- * Update a custom contract type template.
- */
-export async function updateContractTemplate(
- id: string,
- req: UpdateTemplateRequest
-): Promise<TemplateResponse> {
- const res = await authFetch(`${API_BASE}/api/v1/contract-types/${id}`, {
- method: "PUT",
- headers: { "Content-Type": "application/json" },
- body: JSON.stringify(req),
- });
- if (!res.ok) {
- const err = await res.json().catch(() => ({ message: res.statusText }));
- throw new Error(err.message || `Failed to update template: ${res.statusText}`);
- }
- return res.json();
-}
-
-/**
- * Delete a custom contract type template.
- */
-export async function deleteContractTemplate(id: string): Promise<void> {
- const res = await authFetch(`${API_BASE}/api/v1/contract-types/${id}`, {
- method: "DELETE",
- });
- if (!res.ok) {
- throw new Error(`Failed to delete template: ${res.statusText}`);
- }
-}
-
export interface ContractRepository {
id: string;
contractId: string;
@@ -1792,8 +1696,6 @@ export interface ContractSummary {
supervisorTaskId: string | null;
/** When true, tasks won't auto-push or create PRs - use patch files instead */
localOnly: boolean;
- /** When true, a red team task monitors work output for quality */
- redTeamEnabled: boolean;
fileCount: number;
taskCount: number;
repositoryCount: number;
@@ -1818,10 +1720,6 @@ export interface Contract {
phaseGuard: boolean;
/** When true, tasks won't auto-push or create PRs - use patch files instead */
localOnly: boolean;
- /** When true, a red team task monitors work output for quality */
- redTeamEnabled: boolean;
- /** Custom criteria for the red team to evaluate */
- redTeamPrompt: string | null;
version: number;
createdAt: string;
updatedAt: string;
@@ -1859,10 +1757,6 @@ export interface CreateContractRequest {
initialPhase?: ContractPhase | string;
/** When true, tasks won't auto-push or create PRs - use patch files instead */
localOnly?: boolean;
- /** When true, spawn a red team task to monitor work output */
- redTeamEnabled?: boolean;
- /** Custom criteria for the red team to evaluate */
- redTeamPrompt?: string;
}
export interface UpdateContractRequest {