feat(rectification): pass ayanamsa per request
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createTool } from "@mastra/core/tools";
|
||||
import { createHash } from "node:crypto";
|
||||
import { z } from "zod";
|
||||
import { resolveAyanamsa, type AyanamsaName } from "../lib/ayanamsa.ts";
|
||||
import { dateRangeFromDeclared } from "../lib/rectification-agentic/date-range.ts";
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,7 @@ export type AgenticRectificationBirth = Readonly<{
|
||||
lat: number;
|
||||
lon: number;
|
||||
tz: number;
|
||||
ayanamsa?: AyanamsaName | string | null;
|
||||
}>;
|
||||
|
||||
export type AgenticRectificationCandidateRange = Readonly<{
|
||||
@@ -250,6 +252,8 @@ function v5Request(
|
||||
lat: ctx.birth.lat,
|
||||
lon: ctx.birth.lon,
|
||||
tz: ctx.birth.tz,
|
||||
ayanamsa: resolveAyanamsa(ctx.birth),
|
||||
node_mode: "mean",
|
||||
events: events.map(toV5Event),
|
||||
};
|
||||
}
|
||||
@@ -425,6 +429,8 @@ export function createAgenticRectificationTools(ctx: AgenticRectificationContext
|
||||
lat: ctx.birth.lat,
|
||||
lon: ctx.birth.lon,
|
||||
tz: ctx.birth.tz,
|
||||
ayanamsa: resolveAyanamsa(ctx.birth),
|
||||
node_mode: "mean",
|
||||
time_uncertainty_minutes: scanWindow.uncertaintyMinutes,
|
||||
step_minutes: input.step_minutes,
|
||||
};
|
||||
@@ -533,6 +539,8 @@ export function createAgenticRectificationTools(ctx: AgenticRectificationContext
|
||||
lat: ctx.birth.lat,
|
||||
lon: ctx.birth.lon,
|
||||
tz: ctx.birth.tz,
|
||||
ayanamsa: resolveAyanamsa(ctx.birth),
|
||||
node_mode: "mean",
|
||||
events: [],
|
||||
});
|
||||
const snapshot = (data.candidate_feature_snapshot && typeof data.candidate_feature_snapshot === "object")
|
||||
@@ -568,6 +576,8 @@ export function createAgenticRectificationTools(ctx: AgenticRectificationContext
|
||||
lat: ctx.birth.lat,
|
||||
lon: ctx.birth.lon,
|
||||
tz: ctx.birth.tz,
|
||||
ayanamsa: resolveAyanamsa(ctx.birth),
|
||||
node_mode: "mean",
|
||||
events: input.events.map(toV3Event),
|
||||
high_rigor: true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user