@actuarial-ts/agents 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +4 -2
  2. package/dist/advisor.d.ts +2 -1
  3. package/dist/advisor.d.ts.map +1 -1
  4. package/dist/advisor.js +3 -1
  5. package/dist/advisor.js.map +1 -1
  6. package/dist/divergence.d.ts +267 -0
  7. package/dist/divergence.d.ts.map +1 -0
  8. package/dist/divergence.js +414 -0
  9. package/dist/divergence.js.map +1 -0
  10. package/dist/errors.d.ts +1 -1
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +20 -0
  13. package/dist/errors.js.map +1 -1
  14. package/dist/index.d.ts +4 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +4 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/judgment.d.ts +26 -0
  19. package/dist/judgment.d.ts.map +1 -1
  20. package/dist/judgment.js +21 -0
  21. package/dist/judgment.js.map +1 -1
  22. package/dist/mcp.d.ts +165 -0
  23. package/dist/mcp.d.ts.map +1 -0
  24. package/dist/mcp.js +155 -0
  25. package/dist/mcp.js.map +1 -0
  26. package/dist/promotion.d.ts +295 -0
  27. package/dist/promotion.d.ts.map +1 -0
  28. package/dist/promotion.js +824 -0
  29. package/dist/promotion.js.map +1 -0
  30. package/dist/remote.d.ts +221 -0
  31. package/dist/remote.d.ts.map +1 -0
  32. package/dist/remote.js +295 -0
  33. package/dist/remote.js.map +1 -0
  34. package/dist/tools.d.ts +87 -6
  35. package/dist/tools.d.ts.map +1 -1
  36. package/dist/tools.js +182 -15
  37. package/dist/tools.js.map +1 -1
  38. package/package.json +11 -4
  39. package/src/advisor.ts +141 -0
  40. package/src/divergence.ts +642 -0
  41. package/src/errors.ts +62 -0
  42. package/src/evals.ts +162 -0
  43. package/src/index.ts +9 -0
  44. package/src/judgment.ts +458 -0
  45. package/src/mcp.ts +274 -0
  46. package/src/promotion.ts +1240 -0
  47. package/src/remote.ts +371 -0
  48. package/src/tools.ts +561 -0
@@ -0,0 +1,295 @@
1
+ /**
2
+ * promoteStudy: notebook study -> governed judgment (interchange spec rev 2.1,
3
+ * Section 6). A four-gate judgment chain built on createJudgmentChain:
4
+ *
5
+ * Gate 1 "study-intake" - schema/integrity validation via interchange
6
+ * parseDocument, ASOP 23 data review on the study's
7
+ * triangles, selection coherence (spec 3.2 rule),
8
+ * segment resolution (v1: one selection per
9
+ * segment), and the tolerance ceiling.
10
+ * Gate 2 "replay-verify" - table-exact intents replayed through
11
+ * interchange/core; approx/value-only targets
12
+ * labeled verified-by-value; supportingResults
13
+ * refereed via crosscheck at the effective
14
+ * tolerance; a "disagree" verdict HARD-BLOCKS.
15
+ * Gate 3 "rationale" - a DRAFT rationale (template-assembled from the
16
+ * study narrative; options.draftRationale is the
17
+ * injection hook for future agent drafting); resume
18
+ * REQUIRES a non-blank rationale AND attestation.
19
+ * Gate 4 "apply" - deps.applySelections per selection,
20
+ * deps.runAnalysis, ledger entries carrying the
21
+ * Gate 3 rationale + attestation verbatim, and
22
+ * deps.persistNote with the trail + ledger JSON.
23
+ *
24
+ * Architecture decisions (each is load-bearing):
25
+ *
26
+ * - EAGER, DETERMINISTIC INTAKE. All Gate 1/2 computation (parse, review,
27
+ * coherence, segment resolution, replay, crosschecks) runs synchronously at
28
+ * chain-CONSTRUCTION time. Everything is a pure function of the study
29
+ * document plus deps.resolveSegment, so a host that reconstructs the chain
30
+ * after a restart (promoteStudy again with the same study) gets IDENTICAL
31
+ * gates and resume schemas - which is what makes the Gate 2 hard-block
32
+ * structural: when any referee verdict is "disagree", the replay-verify
33
+ * resume schema literally only admits { decision: "abort" }. Mastra's own
34
+ * resume validation rejects an accept; no runtime flag to lose across a
35
+ * snapshot rehydration, no advisory check an agent could talk its way past.
36
+ *
37
+ * - STUDY-CONTENT FAILURES SURFACE AS GATE FAILURES. A malformed study
38
+ * (BAD_INTERCHANGE), a tolerance above the host ceiling
39
+ * (TOLERANCE_CEILING_EXCEEDED), an unresolvable or ambiguous segment
40
+ * (SEGMENT_UNRESOLVED / SEGMENT_AMBIGUOUS), an incoherent selection under
41
+ * refuse strictness (INCOHERENT_SELECTION), or an empty study (EMPTY_STUDY)
42
+ * never throws out of promoteStudy itself: the captured error is thrown
43
+ * from Gate 1's gatherEvidence, so the run fails AT the study-intake gate
44
+ * with the named error, where the host's gate UI can render it.
45
+ * promoteStudy throws synchronously only for programmer errors
46
+ * (BAD_PROMOTION_OPTIONS: missing deps, non-positive ceiling, ...).
47
+ *
48
+ * - DATA REVIEW CHOICE (documented per plan task B2): where a segment group
49
+ * contains exactly one paid and one incurred triangle, the full
50
+ * @actuarial-ts/data reviewTriangles pair review runs (it includes the
51
+ * per-triangle monotonicity and interior-missing checks). Every other core
52
+ * loss triangle gets the per-triangle STRUCTURAL subset of those checks
53
+ * (non-decreasing cumulative rows, interior missing cells), reported in the
54
+ * same DataReviewReport shape. Non-core measures (earnedPremium, custom:*)
55
+ * are exposure/reference data, not loss triangles: their review is reported
56
+ * "not-evaluated" rather than silently passed - unless a selection
57
+ * references one, which fails intake (BAD_INTERCHANGE from the converter).
58
+ * Review findings, including fail-status checks, are EVIDENCE for the human
59
+ * intake decision, not automatic blocks; only the named error classes above
60
+ * block mechanically. The recommendation says so when checks fail.
61
+ *
62
+ * - PURITY. This module never reads a clock; options.now supplies every
63
+ * timestamp (envelope createdAt at construction, ledger timestamps at
64
+ * resume). The tenant seam is untouched: deps close over the host's own
65
+ * authenticated context, and nothing model-facing exists here at all.
66
+ *
67
+ * FOOTGUN (inherited from createJudgmentChain): the returned workflow exposes
68
+ * .then(step), making it an ACCIDENTAL THENABLE. Never await promoteStudy's
69
+ * return value and never return it from an async function - assign it
70
+ * synchronously and register it on a Mastra instance.
71
+ */
72
+ import { type LdfSelections } from "@actuarial-ts/core";
73
+ import { type CoherenceCheck, type CrosscheckReportDoc, type SelectionDoc, type StudyBody } from "@actuarial-ts/interchange";
74
+ import { type DataReviewReport } from "@actuarial-ts/data";
75
+ import { type JudgmentChainWorkflow } from "./judgment.js";
76
+ /**
77
+ * The host-adapter seam (spec 6 Gate 4; the workbench adapter arrives with
78
+ * plan task B4). resolveSegment is SYNCHRONOUS so promoteStudy can stay
79
+ * synchronous (the accidental-thenable footgun forbids async construction);
80
+ * the mutation hooks may be async - they run inside gate execution.
81
+ */
82
+ export interface PromoteStudyDeps {
83
+ /**
84
+ * Maps a selection's triangle segment labels to exactly one host workspace
85
+ * target, or null when nothing matches (v1: no fuzzy matching). A
86
+ * single-segment host returns its only target regardless of labels.
87
+ */
88
+ resolveSegment(labels: Record<string, string>): string | null;
89
+ /**
90
+ * Applies one promoted selection through the host's service layer.
91
+ * `replayedSelections` is the core LdfSelections the replay verified;
92
+ * `segmentTarget` is the resolved workspace target (a two-parameter
93
+ * implementation that closes over its single segment may ignore it).
94
+ */
95
+ applySelections(selectionDoc: SelectionDoc, replayedSelections: LdfSelections, segmentTarget: string): Promise<void> | void;
96
+ /** Reruns the host analysis after the selections are applied. */
97
+ runAnalysis(label: string): Promise<void> | void;
98
+ /** Persists a completion note (called twice: trail, then ledger JSON). */
99
+ persistNote(text: string, author: string): Promise<void> | void;
100
+ }
101
+ /** Context handed to the rationale-drafting hook. */
102
+ export interface DraftRationaleContext {
103
+ study: StudyBody;
104
+ studyIntegrity: string;
105
+ intake: StudyIntakeEvidence;
106
+ replay: ReplayVerifyEvidence;
107
+ }
108
+ export interface PromoteStudyOptions {
109
+ /**
110
+ * The host's replay-tolerance ceiling. The EFFECTIVE tolerance is
111
+ * min(study replayTolerance, ceiling); a study STATING a tolerance above
112
+ * the ceiling fails intake (tolerance editing is not an escape hatch).
113
+ */
114
+ toleranceCeiling: number;
115
+ /** Actor recorded when a resume payload names none. Default "actuary". */
116
+ actorDefault?: string;
117
+ /** Host-injected clock (purity: this package never reads Date). */
118
+ now: () => string;
119
+ /**
120
+ * Coherence/integrity strictness for intake. Default "refuse" (promotion
121
+ * is a refuse-mode consumer per spec 3.2); "warn" downgrades divergence
122
+ * to evidence warnings.
123
+ */
124
+ strictness?: "warn" | "refuse";
125
+ /**
126
+ * Injection hook for agent-assisted rationale drafting (spec 9.2 arrives
127
+ * later); the default assembles a template from the study narrative. The
128
+ * human always owns the final text - this drafts, never decides.
129
+ */
130
+ draftRationale?: (ctx: DraftRationaleContext) => Promise<string> | string;
131
+ }
132
+ /** Prominent tolerance block (spec 6 Gate 1). */
133
+ export interface ReplayToleranceEvidence {
134
+ /** expectations.replayTolerance as stated, or null when the study omits it. */
135
+ stated: number | null;
136
+ /** The convention-profile default the 10x flag is measured against. */
137
+ profileId: string;
138
+ profileDefault: number;
139
+ /** true when the stated tolerance exceeds 10x the profile default. */
140
+ exceedsTenTimesProfileDefault: boolean;
141
+ /** The host ceiling from options. */
142
+ ceiling: number;
143
+ /** min(stated ?? profileDefault, ceiling): what Gate 2 referees at. */
144
+ effective: number;
145
+ }
146
+ export interface TriangleReviewEvidence {
147
+ /** paired-asop23 = reviewTriangles on a paid/incurred pair; structural =
148
+ * per-triangle checks; not-evaluated = non-core measure. */
149
+ mode: "paired-asop23" | "structural" | "not-evaluated";
150
+ triangles: {
151
+ integrity: string;
152
+ measure: string;
153
+ }[];
154
+ report: DataReviewReport;
155
+ }
156
+ export interface SegmentResolutionEvidence {
157
+ selectionIntegrity: string;
158
+ labels: Record<string, string>;
159
+ target: string;
160
+ }
161
+ export interface SelectionCoherenceEvidence {
162
+ selectionIntegrity: string;
163
+ triangleIntegrity: string;
164
+ coherence: CoherenceCheck;
165
+ }
166
+ export interface StudyIntakeEvidence {
167
+ study: {
168
+ title: string;
169
+ analyst: string | null;
170
+ sourceRef: string | null;
171
+ summary: string;
172
+ integrity: string;
173
+ };
174
+ /** FIRST, on purpose: the spec requires prominent display. */
175
+ replayTolerance: ReplayToleranceEvidence;
176
+ dataReview: TriangleReviewEvidence[];
177
+ coherence: SelectionCoherenceEvidence[];
178
+ segments: SegmentResolutionEvidence[];
179
+ warnings: string[];
180
+ /**
181
+ * ALWAYS populated: the verification-scope disclosure. Coherence, replay,
182
+ * and referee all verify the study against its OWN embedded triangle;
183
+ * whether that triangle IS the host workspace's book of business is not
184
+ * machine-verified anywhere in the chain. Stating this in the evidence
185
+ * keeps the gates honest about what they checked - the data-binding
186
+ * judgment belongs to the reviewing actuary, and the UI must say so
187
+ * rather than let "verified" read wider than it is.
188
+ */
189
+ workspaceBindingNote: string;
190
+ }
191
+ /** Per replay target: how this shore verified it (spec 3.2 capabilities). */
192
+ export interface ReplayTargetLabel {
193
+ /** "12-24" for a development interval, or "tail". */
194
+ target: string;
195
+ /** exact = independently recomputed; value-only = applied as stated. */
196
+ capability: "exact" | "value-only";
197
+ /** The disclosure-honest label: replayed-exact or verified-by-value. */
198
+ label: "replayed-exact" | "verified-by-value";
199
+ note?: string;
200
+ }
201
+ export interface SelectionReplayEvidence {
202
+ selectionIntegrity: string;
203
+ triangleIntegrity: string;
204
+ segmentTarget: string;
205
+ targets: ReplayTargetLabel[];
206
+ /** Every intent judgmental/external: the whole replay is value transport. */
207
+ verifiedByValueOnly: boolean;
208
+ replayTotals: {
209
+ ultimate: number;
210
+ unpaid: number;
211
+ };
212
+ }
213
+ export interface SupportingCrosscheckEvidence {
214
+ resultIntegrity: string;
215
+ engine: {
216
+ name: string;
217
+ version: string;
218
+ };
219
+ /** null when the result could not be refereed (see reason). */
220
+ verdict: "agree" | "disagree" | "not-comparable" | "verified-by-value" | null;
221
+ report: CrosscheckReportDoc | null;
222
+ reason?: string;
223
+ }
224
+ export interface ReplayVerifyEvidence {
225
+ effectiveTolerance: number;
226
+ replays: SelectionReplayEvidence[];
227
+ crosschecks: SupportingCrosscheckEvidence[];
228
+ /** Any crosscheck verdict "disagree": the gate cannot accept (spec 6). */
229
+ hardBlocked: boolean;
230
+ /** States exactly what the verification consisted of - including, when the
231
+ * study carried no supportingResults, that it was coherence + replay only. */
232
+ verification: string;
233
+ }
234
+ /**
235
+ * A supporting result the study carries that is NOT reproducible (spec 16).
236
+ *
237
+ * A `witnessed` result attests what an engine produced on one run; re-running
238
+ * it does not reproduce the number. That is legitimate evidence, but it is a
239
+ * materially different thing from a replayable derivation, and the actuary
240
+ * whose attestation goes on the ledger has to know which one they are relying
241
+ * on. Surfacing it here is what makes the attestation informed rather than
242
+ * nominal — the promotion is not blocked, it is disclosed.
243
+ */
244
+ export interface WitnessedResultNotice {
245
+ method: string;
246
+ engine: string;
247
+ seed: number | null;
248
+ /** The engine's own repeat-run self-check, when it performed one. */
249
+ stability: {
250
+ repeats: number;
251
+ byteIdentical: boolean;
252
+ maxRelativeDeviation: number | null;
253
+ } | null;
254
+ }
255
+ export interface RationaleEvidence {
256
+ draftRationale: string;
257
+ attestationRequired: true;
258
+ study: {
259
+ title: string;
260
+ sourceRef: string | null;
261
+ analyst: string | null;
262
+ };
263
+ /**
264
+ * Non-reproducible supporting results, empty when every result is
265
+ * deterministic or seeded-reproducible.
266
+ */
267
+ witnessedResults: WitnessedResultNotice[];
268
+ }
269
+ export interface ApplyEvidence {
270
+ applications: {
271
+ segmentTarget: string;
272
+ selectionIntegrity: string;
273
+ developmentCount: number;
274
+ tailFactor: number;
275
+ }[];
276
+ analysisLabel: string;
277
+ ledgerSource: string;
278
+ }
279
+ /** The workflow id promoteStudy builds its chain with. */
280
+ export declare const PROMOTION_CHAIN_ID = "promote-study";
281
+ /** See StudyIntakeEvidence.workspaceBindingNote; one constant so every
282
+ * intake states the same scope, verbatim. */
283
+ export declare const WORKSPACE_BINDING_NOTE: string;
284
+ /**
285
+ * Builds the promotion judgment chain for one study. SYNCHRONOUS by design
286
+ * (see the accidental-thenable footgun in the module doc): assign the return
287
+ * value and register it on a Mastra instance, exactly like any
288
+ * createJudgmentChain workflow; then createRun/start/resume drive the gates.
289
+ *
290
+ * Reconstruction contract: promoteStudy(deps, studyDoc, options) is
291
+ * deterministic given the study document and deps.resolveSegment, so a host
292
+ * resuming a snapshot after a restart rebuilds the identical chain.
293
+ */
294
+ export declare function promoteStudy(deps: PromoteStudyDeps, studyDoc: unknown, options: PromoteStudyOptions): JudgmentChainWorkflow;
295
+ //# sourceMappingURL=promotion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promotion.d.ts","sourceRoot":"","sources":["../src/promotion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAEH,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAWL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAGxB,KAAK,YAAY,EACjB,KAAK,SAAS,EAGf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAEL,KAAK,qBAAqB,EAG3B,MAAM,eAAe,CAAC;AAKvB;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9D;;;;;OAKG;IACH,eAAe,CACb,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,aAAa,EACjC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACxB,iEAAiE;IACjE,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjD,0EAA0E;IAC1E,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACjE;AAED,qDAAqD;AACrD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,SAAS,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,mBAAmB,CAA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