feat: Campo model en impresoras y guías de formato MCP
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 36s

- Agregar campo model a interface Printer
- Nuevas tools: get_printing_guide, list_models
- Guías de formato para TM-U220 (matricial) y TM-T88 (térmica)
- list_printers ahora incluye el modelo
This commit is contained in:
2025-11-25 13:31:02 -06:00
parent f20acbd1dd
commit 84249a3565
2 changed files with 166 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ export interface Printer {
name: string
host: string
deviceId: string
model?: string // Modelo de impresora (ej: "TM-U220", "TM-T88VI")
timeout: number
isDefault: boolean
createdAt: string
@@ -94,6 +95,7 @@ export async function createPrinter(data: {
name: string
host: string
deviceId: string
model?: string
timeout?: number
isDefault?: boolean
}): Promise<Printer> {
@@ -105,6 +107,7 @@ export async function createPrinter(data: {
name: data.name,
host: data.host,
deviceId: data.deviceId,
model: data.model,
timeout: data.timeout || 60000,
isDefault: data.isDefault || store.printers.length === 0, // Primera impresora es default
createdAt: now,
@@ -131,6 +134,7 @@ export async function updatePrinter(id: string, data: Partial<{
name: string
host: string
deviceId: string
model: string
timeout: number
isDefault: boolean
}>): Promise<Printer | null> {