export declare const ACTIVITY_TIMELINE_VERSION: 1; export declare const ENV_ACTIVITY_TIMELINE = "PI_DADDY_ACTIVITY_TIMELINE"; export declare const ENV_ACTIVITY_CONTENT = "PI_DADDY_ACTIVITY_CONTENT"; /** Per-child transport; these are observation identities, not capability authority. */ export declare const ENV_ACTIVITY_PATH = "PI_DADDY_ACTIVITY_PATH"; export declare const ENV_ACTIVITY_ROOT = "PI_DADDY_ACTIVITY_ROOT"; export declare const ENV_ACTIVITY_TASK = "PI_DADDY_ACTIVITY_TASK"; export declare const ENV_ACTIVITY_PARENT_TASK = "PI_DADDY_ACTIVITY_PARENT_TASK"; export type TimelineFilter = "everything" | "agents" | "skills" | "needs-you"; export interface ContentReference { digest: string; bytes: number; ref?: string; } export interface ActivitySkill { name: string; source: string; digest: string; } export interface ActivityEvent { version: 1; id: string; kind: string; at: string; rootId: string; taskId: string; parentTaskId?: string; agentId?: string; agent?: string; outcome?: string; model?: string; thinking?: string; prompt?: ContentReference; final?: ContentReference; skill?: ActivitySkill; } export interface TimelineSkill extends ActivitySkill { available: boolean; read: boolean; active: boolean; superseded: boolean; } export interface TimelineTask { id: string; rootId: string; parentTaskId?: string; agent?: string; startedAt: string; endedAt?: string; status: "active" | "finished" | "failed" | "cancelled" | "needs-you"; model?: string; thinking?: string; prompt?: ContentReference; final?: ContentReference; skills: TimelineSkill[]; agents: Array<{ id: string; parentTaskId?: string; agent: string; state: string; }>; } export interface ActivityTimeline { tasks: TimelineTask[]; refusals: string[]; } export interface ActivityIdentity { rootId: string; path: string; taskId?: string; parentTaskId?: string; } /** Stable, unambiguous local selector: encoded root identity and task id, separated once by `:`. */ export declare const activityTaskKey: (rootId: string, taskId: string) => string; export declare function parseActivityTimeline(text: string): ActivityTimeline; /** Session-local aliases never derive from private prompt text and never renumber after a refresh. */ export declare class ActivityTimelineAliases { private readonly roots; private readonly tasks; private readonly selectors; selector(task: Pick): string; resolve(selector: string): string | undefined; } export declare function resolveActivityTaskSelector(timeline: ActivityTimeline, selector: string, aliases?: ActivityTimelineAliases): string | undefined; interface ActivityRenderOptions { filter?: TimelineFilter; details?: boolean; history?: boolean; color?: boolean; width?: number; aliases?: ActivityTimelineAliases; content?: { taskKey: string; field: "prompt" | "final"; text: string; }; } /** Render only local observation. “Completed” and “ended” never mean accepted. */ export declare function renderActivityTimeline(timeline: ActivityTimeline, options?: ActivityRenderOptions): string; export declare const defaultActivityTimelinePath: (cwd: string) => string; export declare function activityIdentity(cwd: string, env?: NodeJS.ProcessEnv): ActivityIdentity; export declare class ActivityTimelineRecorder { readonly enabled: boolean; readonly contentEnabled: boolean; readonly path: string; readonly rootId: string; private taskId?; constructor(cwd: string, env?: NodeJS.ProcessEnv); get task(): string | undefined; attach(taskId: string): void; start(prompt: string, model?: string, thinking?: string, parentTaskId?: string): Promise; childStarted(taskId: string, parentTaskId: string | undefined, agent: string, prompt: string, model?: string, thinking?: string): Promise; childFinished(taskId: string, parentTaskId: string | undefined, agent: string, final: string, outcome: "completed" | "failed" | "cancelled"): Promise; finish(final: string | undefined, outcome?: "completed" | "failed" | "cancelled"): Promise; skill(kind: "skill_available" | "skill_read" | "skill_active" | "skill_finished" | "skill_superseded", skill: ActivitySkill): Promise; append(kind: string, fields: Omit, "version" | "id" | "kind" | "at" | "rootId" | "taskId">): Promise; private content; } export declare function readActivityContent(timelinePath: string, reference: ContentReference): Promise; export declare function detailForTimeline(timelinePath: string, taskKey: string, field: "prompt" | "final"): Promise<{ taskKey: string; field: "prompt" | "final"; text: string; }>; export {}; //# sourceMappingURL=activity-timeline.d.ts.map