Files
plugin-legal-ai/src/manifest.ts
Chaim Marcus 06679bb061 feat: add stale-case-reminder and weekly-feedback-analysis jobs
Declare two new cron jobs in plugin.json and manifest.ts, and implement
their handlers in worker.ts. stale-case-reminder runs daily at 08:00 and
posts a warning comment on any Paperclip issue linked to a legal-ai case
that has not been updated in 3+ days. weekly-feedback-analysis runs every
Sunday at 19:00, fetches the weekly chair-feedback summary from legal-ai,
and invokes the CEO agent to update decision-lessons.md with new lessons.
2026-05-16 17:40:33 +00:00

183 lines
4.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 המקושר",
},
],
};