export default { id: "marcusgroup.legal-ai", apiVersion: 1, version: "0.1.0", displayName: "Ezer Mishpati - Legal AI", description: "Integration with legal decision drafting system — case management, semantic search, and workflow tracking", author: "Marcus Group", categories: ["connector"] as const, capabilities: [ "events.subscribe", "issues.read", "issues.create", "issues.update", "issue.comments.create", "agent.tools.register", "http.outbound", "plugin.state.read", "plugin.state.write", "jobs.schedule", "activity.log.write", "companies.read", "projects.read", "webhooks.receive", ] as const, entrypoints: { worker: "dist/worker.js", }, instanceConfigSchema: { type: "object" as const, properties: { legalApiBaseUrl: { type: "string" as const, default: "http://localhost:8085", description: "Base URL for the Ezer Mishpati API", }, }, }, tools: [ { toolKey: "legal_case_list", name: "legal_case_list", displayName: "List Legal Cases", description: "List all appeal cases in the legal system", parametersSchema: { type: "object" as const, properties: {} }, }, { toolKey: "legal_case_get", name: "legal_case_get", displayName: "Get Legal Case Details", description: "Get full details of a legal case including documents", parametersSchema: { type: "object" as const, properties: { case_number: { type: "string" as const, description: "Case number" }, }, required: ["case_number"], }, }, { toolKey: "legal_case_create", name: "legal_case_create", displayName: "Create Legal Case", description: "Create a new appeal case with linked Paperclip issue", parametersSchema: { type: "object" as const, properties: { case_number: { type: "string" as const }, title: { type: "string" as const }, appellants: { type: "array" as const, items: { type: "string" as const }, }, respondents: { type: "array" as const, items: { type: "string" as const }, }, subject: { type: "string" as const }, property_address: { type: "string" as const }, expected_outcome: { type: "string" as const }, }, required: ["case_number", "title"], }, }, { toolKey: "legal_case_update", name: "legal_case_update", displayName: "Update Legal Case", description: "Update a legal case status, title, or outcome", parametersSchema: { type: "object" as const, properties: { case_number: { type: "string" as const }, status: { type: "string" as const }, title: { type: "string" as const }, expected_outcome: { type: "string" as const }, }, required: ["case_number"], }, }, { toolKey: "legal_case_status", name: "legal_case_status", displayName: "Get Case Workflow Status", description: "Get full workflow status: documents, drafts, next steps", parametersSchema: { type: "object" as const, properties: { case_number: { type: "string" as const }, }, required: ["case_number"], }, }, { toolKey: "legal_search", name: "legal_search", displayName: "Search Legal Precedents", description: "Semantic RAG search across previous decisions", parametersSchema: { type: "object" as const, properties: { query: { type: "string" as const, description: "Search query in Hebrew", }, limit: { type: "number" as const }, section_type: { type: "string" as const }, }, required: ["query"], }, }, { toolKey: "legal_case_template", name: "legal_case_template", displayName: "Get Decision Template", description: "Get outcome-aware decision template for 12-block structure", parametersSchema: { type: "object" as const, properties: { case_number: { type: "string" as const }, }, required: ["case_number"], }, }, { toolKey: "legal_processing_status", name: "legal_processing_status", displayName: "Get Processing Status", description: "Get overall system processing status", parametersSchema: { type: "object" as const, properties: {} }, }, ], jobs: [ { jobKey: "sync-case-status", displayName: "Sync Legal Case Status", description: "Polls legal-ai for case status changes and updates Paperclip issues", schedule: "*/15 * * * *", }, { jobKey: "stale-case-reminder", displayName: "תזכורת תיקים תקועים", description: "מזהה תיקים שלא עודכנו 3+ ימים ומוסיף תגובה ל-issue", schedule: "0 8 * * *", }, { jobKey: "weekly-feedback-analysis", displayName: "ניתוח פידבק שבועי", description: 'מסכם פידבק יו"ר מהשבוע האחרון ומעדכן את decision-lessons.md', schedule: "0 19 * * 0", }, ], webhooks: [ { endpointKey: "case-status", displayName: "עדכון סטטוס תיק", description: "מקבל עדכוני סטטוס מ-legal-ai ומפרסם תגובה על ה-issue המקושר", }, ], };