open-agreements
Version:
Open-source legal template filling CLI and library
68 lines • 2.88 kB
TypeScript
import { type TemplateMetadata } from '../metadata.js';
import { type RuleConfidence } from './jurisdiction-rules.js';
import { applyAdviceLanguageGuard, hasProhibitedAdviceLanguage } from '../memo/advice-language.js';
export { applyAdviceLanguageGuard, hasProhibitedAdviceLanguage };
export type FindingCategory = 'clause_presence' | 'baseline_variance' | 'jurisdiction_warning';
export type FindingSeverity = 'low' | 'medium' | 'high';
export type FindingConfidence = RuleConfidence;
export type MemoFormat = 'json' | 'markdown' | 'both';
export interface MemoEvidence {
type: 'field' | 'rule' | 'template';
reference: string;
value?: string;
}
export interface MemoCitation {
source: string;
source_date: string;
}
export interface EmploymentMemoFinding {
id: string;
category: FindingCategory;
severity: FindingSeverity;
confidence: FindingConfidence;
summary: string;
evidence: MemoEvidence[];
citations: MemoCitation[];
follow_up_questions: string[];
}
export interface EmploymentMemoCounselEscalation {
escalation_recommended: boolean;
reason: string;
high_risk_finding_ids: string[];
guidance: string;
follow_up_questions: string[];
}
export interface EmploymentMemo {
memo_version: string;
generated_at: string;
template_id: string;
baseline_template_id?: string;
jurisdiction: string;
disclaimer: string;
findings: EmploymentMemoFinding[];
counsel_escalation: EmploymentMemoCounselEscalation;
}
export interface GenerateEmploymentMemoOptions {
templateId: string;
templateMetadata: TemplateMetadata;
values: Record<string, unknown>;
generatedAt?: string;
jurisdiction?: string;
baselineTemplateId?: string;
}
export declare const EMPLOYMENT_MEMO_DISCLAIMER = "This employment memo provides operational information about template fields and cited sources. It is not legal advice, does not recommend legal strategy, and does not predict legal outcomes. Consult a licensed attorney for legal advice.";
/**
* True for every template the employment memo family covers, including the
* state projections of the offer letter and CIIAA. Membership is resolved by
* `resolveMemoDispatch` rather than a transcribed set, so a state variant is
* recognized the moment it ships (legal-explainer#2569).
*/
export declare function isEmploymentTemplateId(templateId: string): boolean;
/**
* The base template whose employment memo rules govern `templateId`. A state
* projection inherits its master's clause signals and source date.
*/
export declare function resolveEmploymentProfileId(templateId: string): string | undefined;
export declare function generateEmploymentMemo(options: GenerateEmploymentMemoOptions): EmploymentMemo;
export declare function renderEmploymentMemoMarkdown(memo: EmploymentMemo): string;
//# sourceMappingURL=memo.d.ts.map