Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cyrano/src/engines/workflow/drafting-mode-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,15 @@ export async function executeModeA(context: DraftingContext): Promise<DraftingRe
currentState,
error: 'Unexpected state in Mode A workflow',
};
catch (error) {
} catch (error) {
return {
success: false,
documentId: context.documentId,
currentState: 'ingested',
error: error instanceof Error ? error.message : String(error),
};
}
}

/**
* Execute Mode B: Summarize → Discuss → Draft
Expand Down Expand Up @@ -353,6 +354,5 @@ export async function executeModeBDraft(context: DraftingContext, summary: strin
currentState: 'analysis_complete',
error: error instanceof Error ? error.message : String(error),
};
}
}
}
}
3 changes: 1 addition & 2 deletions Cyrano/src/integrations/potemkin-clio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export async function analyzeClioDocument(
return { result };
}
);
catch (error) {
} catch (error) {
return {
result: {} as DocumentAnalysisResult,
error: `Document analysis error: ${error instanceof Error ? error.message : String(error)}`
Expand Down Expand Up @@ -231,4 +231,3 @@ export async function batchAnalyzeClioDocuments(

return { results, errors };
}
}
3 changes: 3 additions & 0 deletions Cyrano/src/services/legal-research-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export class LegalResearchService {
console.error('Google Scholar search error:', error);
return [];
}
}

/**
* Search Justia (free legal research)
Expand Down Expand Up @@ -214,6 +215,8 @@ export class LegalResearchService {
console.error('Justia search error:', error);
return [];
}
}

/**
* Search Michigan Legal Help (free Michigan-specific resources)
*/
Expand Down
2 changes: 1 addition & 1 deletion Cyrano/src/tools/compliance-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,4 +283,4 @@ export const complianceChecker = new (class extends BaseTool {
return !document.toLowerCase().includes('accessibility') &&
!document.toLowerCase().includes('ada');
}
}();
})();
4 changes: 2 additions & 2 deletions Cyrano/src/tools/document-drafter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class DocumentDrafterTool extends BaseTool {
};
}
provider = validated.aiProvider as AIProvider;
}

// Use AI to generate document content
const aiService = new AIService();
Expand Down Expand Up @@ -249,8 +250,7 @@ export class DocumentDrafterTool extends BaseTool {
);
}
}
}

// Export pre-instantiated tool instance (standard pattern)
export const documentDrafterTool = new DocumentDrafterTool();
}
}
2 changes: 1 addition & 1 deletion Cyrano/src/tools/fact-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,4 +917,4 @@ export const factChecker: BaseTool = new (class extends BaseTool {
const supportScores = sources.map(source => this.calculateSourceConfidence(claim, source));
return supportScores.reduce((sum, score) => sum + score, 0) / supportScores.length;
}
();
})();
8 changes: 4 additions & 4 deletions Cyrano/src/tools/legal-email-drafter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ Ensure the email is clear, concise, and professionally appropriate for a ${reque

return recommendations[recipientType] || [];
}
();
})();

/**
* Refine Email Tone Tool
Expand Down Expand Up @@ -593,6 +593,7 @@ Provide only the refined email without additional commentary.`;
} catch (error) {
throw new Error(`AI call failed: ${error instanceof Error ? error.message : String(error)}`);
}
}

/**
* Get tone guidelines (shared with main tool)
Expand Down Expand Up @@ -626,7 +627,8 @@ Provide only the refined email without additional commentary.`;

return guidelines[tone] || guidelines.professional;
}
();
})();

/**
* Validate Legal Language Tool
* Validates that legal language in the email is accurate and avoids unnecessary jargon
Expand Down Expand Up @@ -723,5 +725,3 @@ export const validateLegalLanguage = new (class extends BaseTool {
};
}
})();
}
}
2 changes: 1 addition & 1 deletion Cyrano/src/tools/legal-reviewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -923,4 +923,4 @@ export const legalReviewer = new (class extends BaseTool {
document.toLowerCase().includes('osha') ||
document.toLowerCase().includes('workplace');
}
}();
})();
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ export class MichiganCitationValidator {
errors,
warnings,
};
}

/**
* Parse public domain citation
Expand Down
Loading