chore(gitignore): 🔧 add missing .turbo/ pattern to .gitignore

Patterns added: .turbo/
This commit is contained in:
Claude Code 2026-04-03 12:26:29 -07:00
parent 7d1ab8a669
commit d977a1c58a
5 changed files with 3 additions and 187 deletions

3
.gitignore vendored
View file

@ -73,3 +73,6 @@ SESSION_SUMMARY.md
# Auto-added by auto-commit-service # Auto-added by auto-commit-service
.output/ .output/
# Auto-added by auto-commit-service
.turbo/

View file

@ -1,134 +0,0 @@
// src/index.ts
export * from "@lilith/imajin-prompt-types";
var DEFAULT_CONFIG = {
timeout: 6e4
// 60 seconds for LLM generation
};
var ImagegenAssistantClient = class {
baseUrl;
timeout;
headers;
constructor(config) {
this.baseUrl = config.baseUrl.replace(/\/$/, "");
this.timeout = config.timeout ?? DEFAULT_CONFIG.timeout;
this.headers = {
"Content-Type": "application/json",
...config.headers
};
}
/**
* Check service health and Ollama availability.
*/
async healthCheck() {
const response = await this.fetch("/health");
return response;
}
/**
* List all available pipelines.
*/
async listPipelines() {
return this.fetch("/pipelines");
}
/**
* Get a specific pipeline by ID.
*/
async getPipeline(pipelineId) {
return this.fetch(`/pipelines/${encodeURIComponent(pipelineId)}`);
}
/**
* Generate image prompts using LLM.
*
* @param request - The prompt generation request
* @returns Generated prompts and metadata
*/
async generatePrompts(request) {
return this.fetch("/generate-prompts", {
method: "POST",
body: JSON.stringify({
pipeline_id: request.pipelineId,
user_input: request.userInput,
context: request.context
})
});
}
/**
* Generate prompts with a specific pipeline.
* Convenience method that combines getPipeline and generatePrompts.
*
* @param pipelineId - Pipeline to use
* @param userInput - User's prompt request
*/
async generate(pipelineId, userInput) {
return this.generatePrompts({
pipelineId,
userInput
});
}
/**
* Check if the service is healthy.
*/
async isHealthy() {
try {
const health = await this.healthCheck();
return health.status === "healthy" && health.ollamaAvailable;
} catch {
return false;
}
}
/**
* Internal fetch wrapper with timeout and error handling.
*/
async fetch(path, init) {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
try {
const response = await fetch(`${this.baseUrl}${path}`, {
...init,
headers: {
...this.headers,
...init?.headers
},
signal: controller.signal
});
if (!response.ok) {
const error = await response.text();
throw new ImagegenAssistantError(
`HTTP ${response.status}: ${error}`,
response.status
);
}
return response.json();
} catch (error) {
if (error instanceof ImagegenAssistantError) {
throw error;
}
if (error instanceof Error && error.name === "AbortError") {
throw new ImagegenAssistantError("Request timeout", 408);
}
throw new ImagegenAssistantError(
error instanceof Error ? error.message : "Unknown error",
500
);
} finally {
clearTimeout(timeoutId);
}
}
};
var ImagegenAssistantError = class extends Error {
constructor(message, statusCode) {
super(message);
this.statusCode = statusCode;
this.name = "ImagegenAssistantError";
}
};
function createLocalClient() {
return new ImagegenAssistantClient({
baseUrl: "http://localhost:8003"
});
}
export {
ImagegenAssistantClient,
ImagegenAssistantError,
createLocalClient
};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,51 +0,0 @@
// src/index.ts
import { z } from "zod";
var ParsedPromptSchema = z.object({
name: z.string().min(1),
prompt: z.string().min(1),
negativePrompt: z.string().default("")
});
var GeneratePromptsRequestSchema = z.object({
pipelineId: z.string().min(1),
userInput: z.string().min(1),
context: z.record(z.unknown()).optional()
});
var GeneratePromptsResponseSchema = z.object({
rawResponse: z.string(),
prompts: z.array(ParsedPromptSchema),
model: z.string(),
durationMs: z.number()
});
var PipelineInfoSchema = z.object({
id: z.string(),
name: z.string(),
description: z.string(),
category: z.string(),
model: z.enum(["photorealistic", "anime"]),
families: z.array(z.string()),
examplePrompts: z.array(z.string())
});
var HealthResponseSchema = z.object({
status: z.enum(["healthy", "degraded", "unhealthy"]),
service: z.string(),
version: z.string(),
ollamaAvailable: z.boolean(),
model: z.string()
});
function isValidPrompt(prompt) {
const result = ParsedPromptSchema.safeParse(prompt);
return result.success;
}
function isHealthy(response) {
return response.status === "healthy" && response.ollamaAvailable;
}
export {
GeneratePromptsRequestSchema,
GeneratePromptsResponseSchema,
HealthResponseSchema,
ParsedPromptSchema,
PipelineInfoSchema,
isHealthy,
isValidPrompt
};
//# sourceMappingURL=index.js.map

View file

@ -1 +0,0 @@
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @lilith/imajin-prompt-types\n *\n * TypeScript types for the imagegen-assistant service.\n */\n\nimport { z } from 'zod';\n\n// ============================================================================\n// Core Types\n// ============================================================================\n\n/** Available image generation models */\nexport type ImageModel = 'photorealistic' | 'anime';\n\n/** Parsed prompt from LLM response */\nexport interface ParsedPrompt {\n name: string;\n prompt: string;\n negativePrompt: string;\n}\n\n/** Pipeline configuration */\nexport interface PipelineInfo {\n id: string;\n name: string;\n description: string;\n category: string;\n model: ImageModel;\n families: string[];\n examplePrompts: string[];\n}\n\n// ============================================================================\n// Request Types\n// ============================================================================\n\n/** Request to generate prompts */\nexport interface GeneratePromptsRequest {\n pipelineId: string;\n userInput: string;\n context?: Record<string, unknown>;\n}\n\n// ============================================================================\n// Response Types\n// ============================================================================\n\n/** Response from prompt generation */\nexport interface GeneratePromptsResponse {\n rawResponse: string;\n prompts: ParsedPrompt[];\n model: string;\n durationMs: number;\n}\n\n/** Health check response */\nexport interface HealthResponse {\n status: 'healthy' | 'degraded' | 'unhealthy';\n service: string;\n version: string;\n ollamaAvailable: boolean;\n model: string;\n}\n\n// ============================================================================\n// Zod Schemas\n// ============================================================================\n\nexport const ParsedPromptSchema = z.object({\n name: z.string().min(1),\n prompt: z.string().min(1),\n negativePrompt: z.string().default(''),\n});\n\nexport const GeneratePromptsRequestSchema = z.object({\n pipelineId: z.string().min(1),\n userInput: z.string().min(1),\n context: z.record(z.unknown()).optional(),\n});\n\nexport const GeneratePromptsResponseSchema = z.object({\n rawResponse: z.string(),\n prompts: z.array(ParsedPromptSchema),\n model: z.string(),\n durationMs: z.number(),\n});\n\nexport const PipelineInfoSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string(),\n category: z.string(),\n model: z.enum(['photorealistic', 'anime']),\n families: z.array(z.string()),\n examplePrompts: z.array(z.string()),\n});\n\nexport const HealthResponseSchema = z.object({\n status: z.enum(['healthy', 'degraded', 'unhealthy']),\n service: z.string(),\n version: z.string(),\n ollamaAvailable: z.boolean(),\n model: z.string(),\n});\n\n// ============================================================================\n// Type Guards\n// ============================================================================\n\nexport function isValidPrompt(prompt: unknown): prompt is ParsedPrompt {\n const result = ParsedPromptSchema.safeParse(prompt);\n return result.success;\n}\n\nexport function isHealthy(response: HealthResponse): boolean {\n return response.status === 'healthy' && response.ollamaAvailable;\n}\n"],"mappings":";AAMA,SAAS,SAAS;AA+DX,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACxB,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE;AACvC,CAAC;AAEM,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACnD,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC5B,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC3B,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,SAAS;AAC1C,CAAC;AAEM,IAAM,gCAAgC,EAAE,OAAO;AAAA,EACpD,aAAa,EAAE,OAAO;AAAA,EACtB,SAAS,EAAE,MAAM,kBAAkB;AAAA,EACnC,OAAO,EAAE,OAAO;AAAA,EAChB,YAAY,EAAE,OAAO;AACvB,CAAC;AAEM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,OAAO;AAAA,EACf,aAAa,EAAE,OAAO;AAAA,EACtB,UAAU,EAAE,OAAO;AAAA,EACnB,OAAO,EAAE,KAAK,CAAC,kBAAkB,OAAO,CAAC;AAAA,EACzC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC;AAAA,EAC5B,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;AACpC,CAAC;AAEM,IAAM,uBAAuB,EAAE,OAAO;AAAA,EAC3C,QAAQ,EAAE,KAAK,CAAC,WAAW,YAAY,WAAW,CAAC;AAAA,EACnD,SAAS,EAAE,OAAO;AAAA,EAClB,SAAS,EAAE,OAAO;AAAA,EAClB,iBAAiB,EAAE,QAAQ;AAAA,EAC3B,OAAO,EAAE,OAAO;AAClB,CAAC;AAMM,SAAS,cAAc,QAAyC;AACrE,QAAM,SAAS,mBAAmB,UAAU,MAAM;AAClD,SAAO,OAAO;AAChB;AAEO,SAAS,UAAU,UAAmC;AAC3D,SAAO,SAAS,WAAW,aAAa,SAAS;AACnD;","names":[]}