UNPKG

@mastra/core

Version:
27 lines 1.23 kB
import type { MastraUnion } from '../../action/index.js'; import type { RequestContext } from '../../request-context/index.js'; interface GoalActivityTarget { mastra: MastraUnion | undefined; agentId: string; threadId: string | undefined; runId: string; requestContext?: RequestContext; now?: () => number; } /** Begin an in-process active-pursuit segment for an active thread objective. */ export declare function beginGoalActivity({ mastra, agentId, threadId, runId, requestContext, now, }: GoalActivityTarget): Promise<void>; /** * Stop and durably checkpoint an active-pursuit segment. Calling this for an * already-stopped run is a no-op. */ export declare function stopGoalActivity({ agentId, runId, now, }: Pick<GoalActivityTarget, 'agentId' | 'runId' | 'now'>): Promise<void>; /** Read the persisted duration plus all live core-owned segments for display. */ export declare function getGoalActivityDurationMs({ agentId, threadId, objectiveId, activeDurationMs, now, }: { agentId: string; threadId: string | undefined; objectiveId: string | undefined; activeDurationMs: number | undefined; now?: () => number; }): number; export {}; //# sourceMappingURL=activity.d.ts.map