import { InstalledHomeContribution } from "./pluginRegistry.mjs"; import { RailSessionInput } from "./sessionRailModel.mjs"; import { DashboardTileData } from "@agimon-ai/po-core/web"; import { HomeSnapshot } from "@agimon-ai/po-core/sessionProtocol"; import { DotTone } from "@agimon-ai/po-web-components"; //#region src/web/lib/homeActivity.d.ts /** Rows per page of the Today timeline, so a busy day stays one screen tall. */ export declare const TODAY_PAGE_SIZE = 8; /** Rows per page of Waiting on you, so a hundred agents asking stay one glance tall. */ export declare const WAITING_PAGE_SIZE = 5; /** What a row opens: the session, and the Activity group that owns the item when there is one. */ export interface HomeTarget { sessionId: string; destination?: string; } export interface HomeActor { name: string; image?: string; } export interface HomeActivityItem { id: string; at: string; name: string; outcome: string; tone: DotTone; actor?: HomeActor; icon?: DashboardTileData['icon']; branch?: string; /** The contributing package's label, for a row that is not a session. */ source?: string; /** The computer the row came from, only while more than one is read. */ host?: string; target: HomeTarget; } export interface HomeWaitingItem { id: string; name: string; detail: string; /** How long it has waited, such as "14m". */ waited?: string; actor?: HomeActor; failed?: boolean; /** The computer the row came from, only while more than one is read. */ host?: string; target: HomeTarget; } export interface HomeSessionInput { id: string; entry: RailSessionInput; avatarUrl?: string; } /** One computer's Home read: absent until it answers, and absent for good where nothing can read it. */ export interface HomeHostRead { /** Undefined for the page's own host. */ hostId?: string; label: string; snapshot?: HomeSnapshot; loading: boolean; error?: string; /** The Home contributions this host's plugins declared and the page may show. */ contributions: readonly InstalledHomeContribution[]; } export interface HomeActivityModel { summary: string; activity: HomeActivityItem[]; /** Rows older than today are hidden behind "Show earlier". */ earlier: boolean; waiting: HomeWaitingItem[]; coverage: string; } /** "09:58" today, "Wed 14:30" this week, "3 Nov" before that. */ export declare function homeTime(at: number, now: number): string; /** * Home's timeline, asks, summary and coverage from typed facts only: rail session summaries and * each host's Home read. Every row is the latest state of one session, task or run. */ export declare function homeActivity({ now, sessions, hosts, showEarlier, place }: { now: number; sessions: readonly HomeSessionInput[]; hosts: readonly HomeHostRead[]; showEarlier: boolean; /** Where one host's sources live, as the reader sees it: the phone says "on this computer". */ place?: string; }): HomeActivityModel; /** One page of `rows`. Rows come and go live, so a page past the end shows the last one. */ export declare function pageOf(rows: readonly T[], requestedPage: number, size: number): { page: number; pages: number; first: number; shown: T[]; }; //#endregion //# sourceMappingURL=homeActivity.d.mts.map