@burdenoff/microfe-botmanor 2026.1120.11 → 2026.1120.12

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ExecutionsPage.js","names":["GqlExecutionStatus","SearchIcon","EXECUTION_STATUSES","ExecutionStatus","useStatusLabels","t","StatusIcon","status","CheckCircle","className","XCircle","RefreshCw","Hourglass","Activity","StatusBadge","variants","Badge","labels","ExecutionsPage","useTr","useBotlit","search","setSearch","useState","statusFilter","setStatusFilter","statusLabels","filter","useMemo","loadedExecutions","useExecutions","executions","useLiveExecutionList","refetch","rollup","summariseExecutions","PageLayout","LiveIndicator","live","Button","PagePurpose","Card","CardContent","formatNumber","TrendingUp","formatDuration","Clock","formatCurrency","DollarSign","Search","Input","prev","s","loading","i","error","ErrorState","Link","getPath","execution","Zap","formatRelativeTime","EmptyState","LoadMore","loadMore"],"sources":["../../../src/botlit/pages/ExecutionsPage.tsx"],"sourcesContent":["/**\n * Executions Page\n * @module botlit/pages\n */\n\nimport type { FC } from 'react';\nimport { useMemo, useState } from 'react';\nimport { Link } from 'react-router';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport {\n Search as SearchIcon,\n Activity,\n CheckCircle,\n XCircle,\n Clock,\n DollarSign,\n Zap,\n RefreshCw,\n TrendingUp,\n Hourglass,\n} from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\nimport { PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { Card, CardContent } from '../components/Card';\nimport { Button } from '../components/Button';\nimport { Input } from '../components/Input';\nimport { Badge } from '../components/Badge';\nimport { EmptyState } from '../components/EmptyState';\nimport { ErrorState } from '../components/ErrorState';\nimport { LoadMore } from '../components/LoadMore';\nimport { LiveIndicator } from '../components/LiveIndicator';\nimport { useLiveExecutionList } from '../hooks/useExecutionLiveUpdates';\nimport { useExecutions, summariseExecutions, type ExecutionRecord } from '../hooks';\nimport {\n formatNumber,\n formatRelativeTime,\n formatCurrency,\n formatDuration,\n MISSING_VALUE,\n} from '../utils/formatters';\nimport { ExecutionStatus as GqlExecutionStatus } from '../../generated/wspace-types';\n\n/**\n * The statuses wspace-botlit-svc actually reports. These MUST match the\n * `ExecutionStatus` enum in the supergraph — sending anything else fails\n * GraphQL validation at the gateway.\n */\nconst EXECUTION_STATUSES: GqlExecutionStatus[] = [\n GqlExecutionStatus.Completed,\n GqlExecutionStatus.Running,\n GqlExecutionStatus.Pending,\n GqlExecutionStatus.Failed,\n GqlExecutionStatus.Timeout,\n GqlExecutionStatus.Cancelled,\n];\n\nfunction useStatusLabels(t: ReturnType<typeof useTr>): Record<GqlExecutionStatus, string> {\n return {\n [GqlExecutionStatus.Completed]: t('botlit.executions.status.completed', 'Completed'),\n [GqlExecutionStatus.Running]: t('botlit.executions.status.running', 'Running'),\n [GqlExecutionStatus.Pending]: t('botlit.executions.status.pending', 'Pending'),\n [GqlExecutionStatus.Failed]: t('botlit.executions.status.failed', 'Failed'),\n [GqlExecutionStatus.Timeout]: t('botlit.executions.status.timedOut', 'Timed out'),\n [GqlExecutionStatus.Cancelled]: t('botlit.executions.status.cancelled', 'Cancelled'),\n };\n}\n\nconst StatusIcon: FC<{ status: string; className?: string }> = ({ status, className }) => {\n switch (status) {\n case GqlExecutionStatus.Completed:\n return <CheckCircle className={className ?? 'h-4 w-4 text-status-success-text'} />;\n case GqlExecutionStatus.Failed:\n case GqlExecutionStatus.Timeout:\n return <XCircle className={className ?? 'h-4 w-4 text-status-error-text'} />;\n case GqlExecutionStatus.Running:\n return (\n <RefreshCw\n className={className ?? 'h-4 w-4 text-status-info-text motion-safe:animate-spin'}\n />\n );\n case GqlExecutionStatus.Pending:\n return <Hourglass className={className ?? 'h-4 w-4 text-status-warning-text'} />;\n default:\n return <Activity className={className ?? 'h-4 w-4 text-text-secondary'} />;\n }\n};\n\nconst StatusBadge: FC<{ status: string; labels: Record<GqlExecutionStatus, string> }> = ({\n status,\n labels,\n}) => {\n const variants: Record<string, 'success' | 'destructive' | 'warning' | 'secondary' | 'default'> =\n {\n [GqlExecutionStatus.Completed]: 'success',\n [GqlExecutionStatus.Failed]: 'destructive',\n [GqlExecutionStatus.Timeout]: 'destructive',\n [GqlExecutionStatus.Running]: 'default',\n [GqlExecutionStatus.Pending]: 'warning',\n [GqlExecutionStatus.Cancelled]: 'secondary',\n };\n\n return (\n <Badge variant={variants[status] ?? 'secondary'} className=\"flex items-center gap-1\">\n <StatusIcon status={status} />\n {labels[status as GqlExecutionStatus] ?? status}\n </Badge>\n );\n};\n\nexport const ExecutionsPage: FC = () => {\n const t = useTr();\n const { getPath } = useBotlit();\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<GqlExecutionStatus[]>([]);\n const statusLabels = useStatusLabels(t);\n\n const filter = useMemo(\n () => ({ search, status: statusFilter as string[] }),\n [search, statusFilter]\n );\n const {\n data: loadedExecutions,\n loading,\n error,\n refetch,\n hasMore,\n loadingMore,\n loadMore,\n } = useExecutions(filter);\n // Live status changes over one workspace stream (BOFF-15360). New runs are\n // prepended only when no filter could exclude them.\n const { rows: executions, live } = useLiveExecutionList(loadedExecutions, {\n enabled: true,\n includeNew: search.trim() === '' && statusFilter.length === 0,\n onFallbackPoll: () => void refetch(),\n });\n\n // No server-side aggregate exists for executions — these numbers describe the\n // runs currently loaded, and the caption below says so.\n const rollup = useMemo(() => summariseExecutions(executions), [executions]);\n\n return (\n <PageLayout\n title={t('botlit.executions.title', 'Executions')}\n description={t(\n 'botlit.executions.description',\n 'Monitor agent execution history, performance, and costs'\n )}\n actions={\n <div className=\"flex items-center gap-2\">\n <LiveIndicator state={live} />\n <Button\n variant=\"outline\"\n leftIcon={<RefreshCw size={16} />}\n onClick={() => void refetch()}\n >\n {t('botlit.executions.actions.refresh', 'Refresh')}\n </Button>\n </div>\n }\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Activity size={18} />}>\n {t(\n 'botlit.executions.purpose',\n 'An execution is a single run of an agent — one request in, one response out. This page is your observability and cost dashboard: see which runs succeeded or failed, how long they took, how many tokens they burned and what they cost. Use it to spot failing agents, runaway spend and latency regressions, then open any run to inspect its full trace.'\n )}\n </PagePurpose>\n\n {/* Stats over the loaded runs */}\n {rollup.total > 0 && (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 md:grid-cols-4 gap-4\">\n <Card treatment=\"glass\" glow>\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.executions', 'Executions')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums\">\n {formatNumber(rollup.total)}\n </p>\n </div>\n <Activity className=\"h-8 w-8 text-text-secondary\" />\n </div>\n </CardContent>\n </Card>\n <Card treatment=\"metric\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.successRate', 'Success Rate')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums text-status-success-text\">\n {(rollup.successRate * 100).toFixed(1)}%\n </p>\n </div>\n <TrendingUp className=\"h-8 w-8 text-status-success-text\" />\n </div>\n </CardContent>\n </Card>\n <Card treatment=\"metric\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.avgDuration', 'Avg Duration')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums\">\n {formatDuration(rollup.avgDurationMs)}\n </p>\n </div>\n <Clock className=\"h-8 w-8 text-text-secondary\" />\n </div>\n </CardContent>\n </Card>\n <Card treatment=\"metric\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.totalCost', 'Total Cost')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums\">\n {formatCurrency(rollup.totalCost)}\n </p>\n </div>\n <DollarSign className=\"h-8 w-8 text-text-secondary\" />\n </div>\n </CardContent>\n </Card>\n </div>\n <p className=\"text-xs text-text-secondary\">\n {t(\n 'botlit.executions.rollup.calculatedAcross',\n 'Calculated across the {{count}} runs shown below.',\n {\n count: rollup.total,\n }\n )}\n </p>\n </div>\n )}\n\n {/* Filters */}\n <div className=\"flex flex-wrap items-center gap-4\">\n <div className=\"relative flex-1 max-w-md\">\n <SearchIcon className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder={t(\n 'botlit.executions.filters.searchPlaceholder',\n 'Search by run, agent, bot or input…'\n )}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"pl-9\"\n />\n </div>\n <div className=\"flex flex-wrap gap-2\">\n {EXECUTION_STATUSES.map((status) => (\n <Button\n key={status}\n variant={statusFilter.includes(status) ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() =>\n setStatusFilter((prev) =>\n prev.includes(status) ? prev.filter((s) => s !== status) : [...prev, status]\n )\n }\n >\n <StatusIcon status={status} />\n <span className=\"ml-1\">{statusLabels[status]}</span>\n </Button>\n ))}\n </div>\n </div>\n\n {/* Executions List */}\n {loading ? (\n <div className=\"space-y-4\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div\n key={i}\n className=\"h-20 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg\"\n />\n ))}\n </div>\n ) : error ? (\n <ErrorState resource=\"executions\" error={error} onRetry={() => void refetch()} />\n ) : executions.length > 0 ? (\n <div className=\"space-y-2\">\n {/* Table Header */}\n <div className=\"grid grid-cols-12 gap-4 px-4 py-2 text-sm font-medium text-text-secondary border-b border-border-subtle\">\n <div className=\"col-span-2\">{t('botlit.executions.table.status', 'Status')}</div>\n <div className=\"col-span-3\">\n {t('botlit.executions.table.botAgent', 'Bot / Agent')}\n </div>\n <div className=\"col-span-2\">{t('botlit.executions.table.duration', 'Duration')}</div>\n <div className=\"col-span-2\">{t('botlit.executions.table.tokens', 'Tokens')}</div>\n <div className=\"col-span-1\">{t('botlit.executions.table.cost', 'Cost')}</div>\n <div className=\"col-span-2\">{t('botlit.executions.table.started', 'Started')}</div>\n </div>\n\n {/* Table Rows */}\n {executions.map((execution: ExecutionRecord) => (\n <Link key={execution.id} to={getPath(`executions/${execution.id}`)}>\n <Card className=\"hover:border-primary/50 transition-colors cursor-pointer\">\n <CardContent className=\"py-3\">\n <div className=\"grid grid-cols-12 gap-4 items-center\">\n <div className=\"col-span-2\">\n <StatusBadge status={execution.status} labels={statusLabels} />\n </div>\n <div className=\"col-span-3\">\n <p className=\"font-medium truncate\">{execution.appId ?? MISSING_VALUE}</p>\n <p className=\"text-sm text-text-secondary truncate\">\n {execution.agentId ?? MISSING_VALUE}\n </p>\n </div>\n <div className=\"col-span-2\">\n <div className=\"flex items-center gap-1\">\n <Clock size={14} className=\"text-text-secondary\" />\n <span>{formatDuration(execution.duration)}</span>\n </div>\n </div>\n <div className=\"col-span-2\">\n <div className=\"flex items-center gap-1\">\n <Zap size={14} className=\"text-text-secondary\" />\n <span>{formatNumber(execution.tokensUsed)}</span>\n </div>\n </div>\n <div className=\"col-span-1\">\n <div className=\"flex items-center gap-1\">\n <DollarSign size={14} className=\"text-text-secondary\" />\n <span>{formatCurrency(execution.cost)}</span>\n </div>\n </div>\n <div className=\"col-span-2 text-sm text-text-secondary\">\n {formatRelativeTime(execution.createdAt)}\n </div>\n </div>\n </CardContent>\n </Card>\n </Link>\n ))}\n </div>\n ) : (\n <EmptyState\n illustration=\"empty-search\"\n title={t('botlit.executions.empty.title', 'No executions found')}\n description={\n statusFilter.length > 0 || search\n ? t(\n 'botlit.executions.empty.descriptionFiltered',\n 'No executions match your filters. Try adjusting your search.'\n )\n : t(\n 'botlit.executions.empty.descriptionNoData',\n 'Executions will appear here when agents process requests.'\n )\n }\n />\n )}\n <LoadMore\n hasMore={hasMore}\n loadingMore={loadingMore}\n onLoadMore={() => void loadMore()}\n loadedCount={executions.length}\n />\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ACzE,kBAAC,KAAD;YAAG,WAAU;YACV,UAAAA,EAAU,WAAA;WACV,CAAA,CACA;;UACL,kBAAC,OAAD;WAAK,WAAU;WACb,UAAA,kBAAC,OAAD;YAAK,WAAU;YAAf,UAAA,CACE,kBAACb,GAAD;aAAO,MAAM;aAAI,WAAU;YAAuB,CAAA,GAClD,kBAAC,QAAD,EAAA,UAAOD,EAAec,EAAU,QAAQ,EAAQ,CAAA,CAC7C;;UACF,CAAA;UACL,kBAAC,OAAD;WAAK,WAAU;WACb,UAAA,kBAAC,OAAD;YAAK,WAAU;YAAf,UAAA,CACE,kBAACC,GAAD;aAAK,MAAM;aAAI,WAAU;YAAuB,CAAA,GAChD,kBAAC,QAAD,EAAA,UAAOjB,EAAagB,EAAU,UAAU,EAAQ,CAAA,CAC7C;;UACF,CAAA;UACL,kBAAC,OAAD;WAAK,WAAU;WACb,UAAA,kBAAC,OAAD;YAAK,WAAU;YAAf,UAAA,CACE,kBAACX,GAAD;aAAY,MAAM;aAAI,WAAU;YAAuB,CAAA,GACvD,kBAAC,QAAD,EAAA,UAAOD,EAAeY,EAAU,IAAI,EAAQ,CAAA,CACzC;;UACF,CAAA;UACL,kBAAC,OAAD;WAAK,WAAU;WACZ,UAAAE,EAAmBF,EAAU,SAAS;UACpC,CAAA;SACF;;OACM,CAAA;MACT,CAAA;KACF,GArCKA,EAAU,EAqCf,CACP,CACE;IAEL,CAAA,IAAA,kBAACG,GAAD;KACE,cAAa;KACb,OAAOzD,EAAE,iCAAiC,qBAAqB;KAC/D,aACEmB,EAAa,SAAS,KAAKH,IACvBhB,EACE,+CACA,8DACF,IACAA,EACE,6CACA,2DACF;IAEP,CAAA;IAEH,kBAAC0D,GAAD;KACW;KACI;KACb,kBAAkB,KAAKC,EAAS;KAChC,aAAajC,EAAW;IACzB,CAAA;GACE;;CACK,CAAA;AAEhB"}
1
+ {"version":3,"file":"ExecutionsPage.js","names":["GqlExecutionStatus","_Fragment","SearchIcon","Fragment$1","EXECUTION_STATUSES","ExecutionStatus","SEARCH_DEBOUNCE_MS","useDebounced","settled","setSettled","useState","value","useEffect","timer","delayMs","startOfDayIso","day","date","endOfDayIso","StatusIcon","status","CheckCircle","className","XCircle","Timer","Ban","RefreshCw","Hourglass","Activity","StatusBadge","variants","Badge","labels","RunIdentity","bot","execution","noBot","agent","noAgent","ExecutionsPage","t","useTr","useBotlit","search","setSearch","statusFilter","setStatusFilter","agentId","setAgentId","appId","setAppId","fromDay","setFromDay","toDay","setToDay","statusLabels","executionStatusLabels","debouncedSearch","agents","useAgents","bots","useBots","filter","useMemo","loadedExecutions","useExecutions","summary","useExecutionSummary","rollup","filtered","executions","useLiveExecutionList","refetch","selectClass","PageLayout","LiveIndicator","live","Button","PagePurpose","Card","CardContent","formatNumber","TrendingUp","formatDuration","Clock","formatCurrency","DollarSign","Search","Input","prev","s","loading","i","error","ErrorState","Link","getPath","formatRelativeTime","Zap","EmptyState","LoadMore","loadMore"],"sources":["../../../src/botlit/pages/ExecutionsPage.tsx"],"sourcesContent":["/**\n * Executions Page\n * @module botlit/pages\n */\n\nimport type { FC } from 'react';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Link } from 'react-router';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport {\n Search as SearchIcon,\n Activity,\n CheckCircle,\n XCircle,\n Clock,\n DollarSign,\n Zap,\n RefreshCw,\n TrendingUp,\n Hourglass,\n Timer,\n Ban,\n} from 'lucide-react';\nimport { useTr } from '../../shared/hooks/useTr';\nimport { PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { Card, CardContent } from '../components/Card';\nimport { Button } from '../components/Button';\nimport { Input } from '../components/Input';\nimport { Badge } from '../components/Badge';\nimport { EmptyState } from '../components/EmptyState';\nimport { ErrorState } from '../components/ErrorState';\nimport { LoadMore } from '../components/LoadMore';\nimport { LiveIndicator } from '../components/LiveIndicator';\nimport { ORPHANED_ERROR_CODE, executionStatusLabels } from '../utils/executionStatus';\nimport { useLiveExecutionList } from '../hooks/useExecutionLiveUpdates';\nimport {\n useAgents,\n useBots,\n useExecutions,\n useExecutionSummary,\n type ExecutionRecord,\n type ExecutionsFilter,\n} from '../hooks';\nimport {\n formatNumber,\n formatRelativeTime,\n formatCurrency,\n formatDuration,\n MISSING_VALUE,\n} from '../utils/formatters';\nimport { ExecutionStatus as GqlExecutionStatus } from '../../generated/wspace-types';\n\n/**\n * The statuses the BotManor runtime produces, offered as filter chips\n * (BOFF-12621). `TIMEOUT` and `CANCELLED` exist in the API enum but no run\n * reaches them on its own, so they are labelled when present but not offered\n * as filters that would always come back empty.\n */\nconst EXECUTION_STATUSES: GqlExecutionStatus[] = [\n GqlExecutionStatus.Completed,\n GqlExecutionStatus.Running,\n GqlExecutionStatus.Pending,\n GqlExecutionStatus.Failed,\n];\n\nconst SEARCH_DEBOUNCE_MS = 300;\n\n/** `value`, settled for `delayMs` — the search box queries the service. */\nfunction useDebounced<T>(value: T, delayMs: number): T {\n const [settled, setSettled] = useState(value);\n useEffect(() => {\n const timer = setTimeout(() => setSettled(value), delayMs);\n return () => clearTimeout(timer);\n }, [value, delayMs]);\n return settled;\n}\n\n/** Start of the given local `yyyy-mm-dd` day, as an ISO timestamp. */\nfunction startOfDayIso(day: string): string | undefined {\n if (!day) return undefined;\n const date = new Date(`${day}T00:00:00`);\n return Number.isNaN(date.getTime()) ? undefined : date.toISOString();\n}\n\n/** End of the given local `yyyy-mm-dd` day, as an ISO timestamp. */\nfunction endOfDayIso(day: string): string | undefined {\n if (!day) return undefined;\n const date = new Date(`${day}T23:59:59.999`);\n return Number.isNaN(date.getTime()) ? undefined : date.toISOString();\n}\n\nconst StatusIcon: FC<{ status: string; className?: string }> = ({ status, className }) => {\n switch (status) {\n case GqlExecutionStatus.Completed:\n return <CheckCircle className={className ?? 'h-4 w-4 text-status-success-text'} />;\n case GqlExecutionStatus.Failed:\n return <XCircle className={className ?? 'h-4 w-4 text-status-error-text'} />;\n case GqlExecutionStatus.Timeout:\n return <Timer className={className ?? 'h-4 w-4 text-status-error-text'} />;\n case GqlExecutionStatus.Cancelled:\n return <Ban className={className ?? 'h-4 w-4 text-text-secondary'} />;\n case GqlExecutionStatus.Running:\n return (\n <RefreshCw\n className={className ?? 'h-4 w-4 text-status-info-text motion-safe:animate-spin'}\n />\n );\n case GqlExecutionStatus.Pending:\n return <Hourglass className={className ?? 'h-4 w-4 text-status-warning-text'} />;\n default:\n return <Activity className={className ?? 'h-4 w-4 text-text-secondary'} />;\n }\n};\n\nconst StatusBadge: FC<{ status: string; labels: Record<GqlExecutionStatus, string> }> = ({\n status,\n labels,\n}) => {\n const variants: Record<string, 'success' | 'destructive' | 'warning' | 'secondary' | 'default'> =\n {\n [GqlExecutionStatus.Completed]: 'success',\n [GqlExecutionStatus.Failed]: 'destructive',\n [GqlExecutionStatus.Timeout]: 'destructive',\n [GqlExecutionStatus.Running]: 'default',\n [GqlExecutionStatus.Pending]: 'warning',\n [GqlExecutionStatus.Cancelled]: 'secondary',\n };\n\n return (\n <Badge variant={variants[status] ?? 'secondary'} className=\"flex items-center gap-1\">\n <StatusIcon status={status} />\n {labels[status as GqlExecutionStatus] ?? status}\n </Badge>\n );\n};\n\n/** Bot and agent names, with the ID as secondary text when no name resolves. */\nconst RunIdentity: FC<{ execution: ExecutionRecord; noBot: string; noAgent: string }> = ({\n execution,\n noBot,\n noAgent,\n}) => {\n const bot = execution.appName ?? execution.appId ?? noBot;\n const agent = execution.agentName ?? execution.agentId ?? noAgent;\n return (\n <>\n <p className=\"font-medium truncate\" title={execution.appId ?? undefined}>\n {bot}\n </p>\n <p className=\"text-sm text-text-secondary truncate\" title={execution.agentId ?? undefined}>\n {agent}\n </p>\n </>\n );\n};\n\nexport const ExecutionsPage: FC = () => {\n const t = useTr();\n const { getPath } = useBotlit();\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<GqlExecutionStatus[]>([]);\n const [agentId, setAgentId] = useState('');\n const [appId, setAppId] = useState('');\n const [fromDay, setFromDay] = useState('');\n const [toDay, setToDay] = useState('');\n const statusLabels = executionStatusLabels(t);\n const debouncedSearch = useDebounced(search, SEARCH_DEBOUNCE_MS);\n const agents = useAgents();\n const bots = useBots();\n\n const filter = useMemo<ExecutionsFilter>(\n () => ({\n search: debouncedSearch,\n status: statusFilter,\n agentId: agentId || undefined,\n appId: appId || undefined,\n startDate: startOfDayIso(fromDay),\n endDate: endOfDayIso(toDay),\n }),\n [debouncedSearch, statusFilter, agentId, appId, fromDay, toDay]\n );\n const {\n data: loadedExecutions,\n loading,\n error,\n refetch,\n hasMore,\n loadingMore,\n loadMore,\n } = useExecutions(filter);\n // BOFF-12614 — totals over every matching run, computed by the service.\n const summary = useExecutionSummary(filter);\n const rollup = summary.data;\n const filtered =\n statusFilter.length > 0 ||\n Boolean(debouncedSearch.trim()) ||\n Boolean(agentId || appId || fromDay || toDay);\n // Live status changes over one workspace stream (BOFF-15360). New runs are\n // prepended only when no filter could exclude them.\n const { rows: executions, live } = useLiveExecutionList(loadedExecutions, {\n enabled: true,\n includeNew: !filtered,\n onFallbackPoll: () => {\n void refetch();\n void summary.refetch();\n },\n });\n const noBot = t('botlit.executions.table.noBot', 'No bot');\n const noAgent = t('botlit.executions.table.noAgent', 'No agent');\n const selectClass =\n 'h-9 rounded-md border border-border-default bg-bg-surface px-2 text-sm text-text-primary';\n\n return (\n <PageLayout\n title={t('botlit.executions.title', 'Executions')}\n description={t(\n 'botlit.executions.description',\n 'Monitor agent execution history, performance, and costs'\n )}\n actions={\n <div className=\"flex items-center gap-2\">\n <LiveIndicator state={live} />\n <Button\n variant=\"outline\"\n leftIcon={<RefreshCw size={16} />}\n onClick={() => {\n void refetch();\n void summary.refetch();\n }}\n >\n {t('botlit.executions.actions.refresh', 'Refresh')}\n </Button>\n </div>\n }\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Activity size={18} />}>\n {t(\n 'botlit.executions.purpose',\n 'An execution is a single run of an agent — one request in, one response out. See which runs succeeded or failed, how long they took, how many tokens they used and, where the model price is known, what they cost. Open a run to read its input and output, the model and agent version that answered, its token split, and the knowledge and policies that shaped it.'\n )}\n </PagePurpose>\n\n {/* Stats over every matching run (server aggregate) */}\n {rollup && rollup.total > 0 && (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 md:grid-cols-4 gap-4\">\n <Card treatment=\"glass\" glow>\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.executions', 'Executions')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums\">\n {formatNumber(rollup.total)}\n </p>\n </div>\n <Activity className=\"h-8 w-8 text-text-secondary\" />\n </div>\n </CardContent>\n </Card>\n <Card treatment=\"metric\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.successRate', 'Success Rate')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums text-status-success-text\">\n {((rollup.succeeded / rollup.total) * 100).toFixed(1)}%\n </p>\n </div>\n <TrendingUp className=\"h-8 w-8 text-status-success-text\" />\n </div>\n </CardContent>\n </Card>\n <Card treatment=\"metric\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.avgDuration', 'Avg Duration')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums\">\n {formatDuration(rollup.avgDurationMs)}\n </p>\n </div>\n <Clock className=\"h-8 w-8 text-text-secondary\" />\n </div>\n </CardContent>\n </Card>\n <Card treatment=\"metric\">\n <CardContent className=\"pt-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('botlit.executions.rollup.totalCost', 'Total Cost')}\n </p>\n <p className=\"text-2xl font-bold tabular-nums\">\n {formatCurrency(rollup.totalCost)}\n </p>\n {rollup.unpricedRuns > 0 && (\n <p className=\"text-xs text-text-secondary\">\n {t(\n 'botlit.executions.rollup.unpriced',\n '{{count}} runs have no known price',\n { count: rollup.unpricedRuns }\n )}\n </p>\n )}\n </div>\n <DollarSign className=\"h-8 w-8 text-text-secondary\" />\n </div>\n </CardContent>\n </Card>\n </div>\n <p className=\"text-xs text-text-secondary\">\n {t(\n 'botlit.executions.rollup.calculatedAcrossAll',\n 'Calculated across all {{count}} matching runs. Average duration covers the {{timed}} runs that recorded one.',\n { count: rollup.total, timed: rollup.timedRuns }\n )}\n </p>\n </div>\n )}\n\n {/* Filters */}\n <div className=\"flex flex-wrap items-center gap-4\">\n <div className=\"relative flex-1 max-w-md\">\n <SearchIcon className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder={t(\n 'botlit.executions.filters.searchPlaceholder',\n 'Search by run, agent, bot or input…'\n )}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"pl-9\"\n aria-label={t('botlit.executions.filters.searchLabel', 'Search executions')}\n />\n </div>\n <div\n className=\"flex flex-wrap gap-2\"\n role=\"group\"\n aria-label={t('botlit.executions.filters.statusGroup', 'Filter by status')}\n >\n {EXECUTION_STATUSES.map((status) => (\n <Button\n key={status}\n variant={statusFilter.includes(status) ? 'default' : 'outline'}\n size=\"sm\"\n aria-pressed={statusFilter.includes(status)}\n onClick={() =>\n setStatusFilter((prev) =>\n prev.includes(status) ? prev.filter((s) => s !== status) : [...prev, status]\n )\n }\n >\n <StatusIcon status={status} />\n <span className=\"ml-1\">{statusLabels[status]}</span>\n </Button>\n ))}\n </div>\n </div>\n <div className=\"flex flex-wrap items-end gap-4\">\n <label className=\"grid gap-1 text-xs text-text-secondary\">\n {t('botlit.executions.filters.agent', 'Agent')}\n <select\n className={selectClass}\n value={agentId}\n onChange={(e) => setAgentId(e.target.value)}\n >\n <option value=\"\">{t('botlit.executions.filters.allAgents', 'All agents')}</option>\n {agents.data.map((agent) => (\n <option key={agent.id} value={agent.id}>\n {agent.name}\n </option>\n ))}\n </select>\n </label>\n <label className=\"grid gap-1 text-xs text-text-secondary\">\n {t('botlit.executions.filters.bot', 'Bot')}\n <select\n className={selectClass}\n value={appId}\n onChange={(e) => setAppId(e.target.value)}\n >\n <option value=\"\">{t('botlit.executions.filters.allBots', 'All bots')}</option>\n {bots.data.map((bot) => (\n <option key={bot.id} value={bot.id}>\n {bot.name}\n </option>\n ))}\n </select>\n </label>\n <label className=\"grid gap-1 text-xs text-text-secondary\">\n {t('botlit.executions.filters.from', 'From')}\n <input\n type=\"date\"\n className={selectClass}\n value={fromDay}\n max={toDay || undefined}\n onChange={(e) => setFromDay(e.target.value)}\n />\n </label>\n <label className=\"grid gap-1 text-xs text-text-secondary\">\n {t('botlit.executions.filters.to', 'To')}\n <input\n type=\"date\"\n className={selectClass}\n value={toDay}\n min={fromDay || undefined}\n onChange={(e) => setToDay(e.target.value)}\n />\n </label>\n {filtered && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => {\n setSearch('');\n setStatusFilter([]);\n setAgentId('');\n setAppId('');\n setFromDay('');\n setToDay('');\n }}\n >\n {t('botlit.executions.filters.clear', 'Clear filters')}\n </Button>\n )}\n </div>\n\n {/* Executions List */}\n {loading ? (\n <div className=\"space-y-4\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div\n key={i}\n className=\"h-20 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg\"\n />\n ))}\n </div>\n ) : error ? (\n <ErrorState resource=\"executions\" error={error} onRetry={() => void refetch()} />\n ) : executions.length > 0 ? (\n <div className=\"space-y-2\">\n {/* Column captions; each row below names its own values for assistive technology. */}\n <div\n aria-hidden=\"true\"\n className=\"grid grid-cols-12 gap-4 px-4 py-2 text-sm font-medium text-text-secondary border-b border-border-subtle\"\n >\n <div className=\"col-span-2\">{t('botlit.executions.table.status', 'Status')}</div>\n <div className=\"col-span-3\">\n {t('botlit.executions.table.botAgent', 'Bot / Agent')}\n </div>\n <div className=\"col-span-2\">{t('botlit.executions.table.duration', 'Duration')}</div>\n <div className=\"col-span-2\">{t('botlit.executions.table.tokens', 'Tokens')}</div>\n <div className=\"col-span-1\">{t('botlit.executions.table.cost', 'Cost')}</div>\n <div className=\"col-span-2\">{t('botlit.executions.table.started', 'Started')}</div>\n </div>\n\n <ul className=\"space-y-2\" aria-label={t('botlit.executions.list.label', 'Executions')}>\n {executions.map((execution: ExecutionRecord) => (\n <li key={execution.id}>\n <Link\n to={getPath(`executions/${execution.id}`)}\n aria-label={t(\n 'botlit.executions.list.rowLabel',\n '{{status}} run of {{agent}}, started {{started}}',\n {\n status:\n statusLabels[execution.status as GqlExecutionStatus] ?? execution.status,\n agent: execution.agentName ?? execution.agentId ?? noAgent,\n started: formatRelativeTime(execution.createdAt),\n }\n )}\n >\n <Card className=\"hover:border-primary/50 transition-colors cursor-pointer\">\n <CardContent className=\"py-3\">\n <div className=\"grid grid-cols-12 gap-4 items-center\">\n <div className=\"col-span-2\">\n <StatusBadge status={execution.status} labels={statusLabels} />\n {execution.errorCode === ORPHANED_ERROR_CODE && (\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'botlit.executions.status.orphaned',\n 'Never finished (cleaned up)'\n )}\n </p>\n )}\n </div>\n <div className=\"col-span-3\">\n <RunIdentity execution={execution} noBot={noBot} noAgent={noAgent} />\n </div>\n <div className=\"col-span-2\">\n <div className=\"flex items-center gap-1\">\n <Clock size={14} className=\"text-text-secondary\" />\n <span>{formatDuration(execution.duration)}</span>\n </div>\n </div>\n <div className=\"col-span-2\">\n <div className=\"flex items-center gap-1\">\n <Zap size={14} className=\"text-text-secondary\" />\n <span>\n {execution.tokensUsed === null || execution.tokensUsed === undefined\n ? MISSING_VALUE\n : formatNumber(execution.tokensUsed)}\n </span>\n </div>\n </div>\n <div className=\"col-span-1\">\n <div className=\"flex items-center gap-1\">\n <DollarSign size={14} className=\"text-text-secondary\" />\n <span>{formatCurrency(execution.cost)}</span>\n </div>\n </div>\n <div className=\"col-span-2 text-sm text-text-secondary\">\n {formatRelativeTime(execution.createdAt)}\n </div>\n </div>\n </CardContent>\n </Card>\n </Link>\n </li>\n ))}\n </ul>\n </div>\n ) : (\n <EmptyState\n illustration=\"empty-search\"\n title={t('botlit.executions.empty.title', 'No executions found')}\n description={\n filtered\n ? t(\n 'botlit.executions.empty.descriptionFiltered',\n 'No executions match your filters. Try adjusting your search.'\n )\n : t(\n 'botlit.executions.empty.descriptionNoData',\n 'Executions will appear here when agents process requests.'\n )\n }\n />\n )}\n <LoadMore\n hasMore={hasMore}\n loadingMore={loadingMore}\n onLoadMore={() => void loadMore()}\n loadedCount={executions.length}\n />\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,IAAMI,KAA2C;CAC/CJ,EAAmB;CACnBA,EAAmB;CACnBA,EAAmB;CACnBA,EAAmB;AACrB,GAEMM,KAAqB;AAG3B,SAASC,GAAgB,GAAU,GAAoB;CACrD,IAAM,CAACC,GAASC,KAAcC,EAASC,CAAK;CAK5C,OAJAC,QAAgB;EACd,IAAMC,IAAQ,iBAAiBJ,EAAWE,CAAK,GAAGG,CAAO;EACzD,aAAa,aAAaD,CAAK;CACjC,GAAG,CAACF,GAAOG,CAAO,CAAC,GACZN;AACT;AAGA,SAASO,GAAc,GAAiC;CACtD,IAAI,CAACC,GAAK;CACV,IAAMC,oBAAO,IAAI,KAAK,GAAGD,EAAI,UAAU;CACvC,OAAO,OAAO,MAAMC,EAAK,QAAQ,CAAC,IAAI,KAAA,IAAYA,EAAK,YAAY;AACrE;AAGA,SAASC,EAAY,GAAiC;CACpD,IAAI,CAACF,GAAK;CACV,IAAMC,oBAAO,IAAI,KAAK,GAAGD,EAAI,cAAc;CAC3C,OAAO,OAAO,MAAMC,EAAK,QAAQ,CAAC,IAAI,KAAA,IAAYA,EAAK,YAAY;AACrE;AAEA,IAAME,KAA0D,EAAE,WAAQ,mBAAgB;CACxF,QAAQC,GAAR;EACE,KAAKpB,EAAmB,WACtB,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B,KAAKC,EAAS;KAChC,aAAa/B,EAAW;IACzB,CAAA;GACE;;CACK,CAAA;AAEhB"}
@@ -0,0 +1,16 @@
1
+ import { ExecutionStatus as GqlExecutionStatus } from '../../generated/wspace-types';
2
+ import { useTr } from '../../shared/hooks/useTr';
3
+ type Translate = ReturnType<typeof useTr>;
4
+ /** `errorCode` the stale-run reaper writes on a run that never finished. */
5
+ export declare const ORPHANED_ERROR_CODE = "ORPHANED";
6
+ /** Translated label for every execution status. */
7
+ export declare function executionStatusLabels(t: Translate): Record<GqlExecutionStatus, string>;
8
+ /** Translated label for one status; an unknown status is shown as stored. */
9
+ export declare function executionStatusLabel(t: Translate, status: string): string;
10
+ /**
11
+ * A stored payload as readable text (BOFF-12620): the `message` of the
12
+ * `{"message": …}` envelope the runtime writes, pretty JSON for any other
13
+ * JSON, and the raw text otherwise.
14
+ */
15
+ export declare function readablePayload(raw: string | null | undefined): string;
16
+ export {};
@@ -0,0 +1,32 @@
1
+ import { ExecutionStatus as e } from "../../generated/wspace-types.js";
2
+ // src/botlit/utils/executionStatus.ts
3
+ var t = "ORPHANED";
4
+ function n(t) {
5
+ return {
6
+ [e.Completed]: t("botlit.executions.status.completed", "Completed"),
7
+ [e.Running]: t("botlit.executions.status.running", "Running"),
8
+ [e.Pending]: t("botlit.executions.status.pending", "Pending"),
9
+ [e.Failed]: t("botlit.executions.status.failed", "Failed"),
10
+ [e.Timeout]: t("botlit.executions.status.timedOut", "Timed out"),
11
+ [e.Cancelled]: t("botlit.executions.status.cancelled", "Cancelled")
12
+ };
13
+ }
14
+ function r(e, t) {
15
+ return n(e)[t] ?? t;
16
+ }
17
+ function i(e) {
18
+ if (!e) return "";
19
+ try {
20
+ let t = JSON.parse(e);
21
+ if (t && typeof t == "object" && !Array.isArray(t)) {
22
+ let e = t, n = Object.keys(e);
23
+ if (typeof e.message == "string" && n.every((e) => e === "message")) return e.message;
24
+ }
25
+ return typeof t == "string" ? t : JSON.stringify(t, null, 2);
26
+ } catch {
27
+ return e;
28
+ }
29
+ }
30
+ export { t as ORPHANED_ERROR_CODE, r as executionStatusLabel, n as executionStatusLabels, i as readablePayload };
31
+
32
+ //# sourceMappingURL=executionStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executionStatus.js","names":["GqlExecutionStatus","ORPHANED_ERROR_CODE","executionStatusLabels","ExecutionStatus","executionStatusLabel","t","status","readablePayload","raw","parsed","record","keys","key"],"sources":["../../../src/botlit/utils/executionStatus.ts"],"sourcesContent":["/**\n * Execution status and payload helpers shared by the Executions list and run detail pages\n * (BOFF-12619, BOFF-12621).\n * @module botlit/utils\n */\n\nimport { ExecutionStatus as GqlExecutionStatus } from '../../generated/wspace-types';\nimport type { useTr } from '../../shared/hooks/useTr';\n\ntype Translate = ReturnType<typeof useTr>;\n\n/** `errorCode` the stale-run reaper writes on a run that never finished. */\nexport const ORPHANED_ERROR_CODE = 'ORPHANED';\n\n/** Translated label for every execution status. */\nexport function executionStatusLabels(t: Translate): Record<GqlExecutionStatus, string> {\n return {\n [GqlExecutionStatus.Completed]: t('botlit.executions.status.completed', 'Completed'),\n [GqlExecutionStatus.Running]: t('botlit.executions.status.running', 'Running'),\n [GqlExecutionStatus.Pending]: t('botlit.executions.status.pending', 'Pending'),\n [GqlExecutionStatus.Failed]: t('botlit.executions.status.failed', 'Failed'),\n [GqlExecutionStatus.Timeout]: t('botlit.executions.status.timedOut', 'Timed out'),\n [GqlExecutionStatus.Cancelled]: t('botlit.executions.status.cancelled', 'Cancelled'),\n };\n}\n\n/** Translated label for one status; an unknown status is shown as stored. */\nexport function executionStatusLabel(t: Translate, status: string): string {\n const labels: Record<string, string> = executionStatusLabels(t);\n return labels[status] ?? status;\n}\n\n/**\n * A stored payload as readable text (BOFF-12620): the `message` of the\n * `{\"message\": …}` envelope the runtime writes, pretty JSON for any other\n * JSON, and the raw text otherwise.\n */\nexport function readablePayload(raw: string | null | undefined): string {\n if (!raw) return '';\n try {\n const parsed: unknown = JSON.parse(raw);\n if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {\n const record = parsed as Record<string, unknown>;\n const keys = Object.keys(record);\n if (typeof record.message === 'string' && keys.every((key) => key === 'message')) {\n return record.message;\n }\n }\n return typeof parsed === 'string' ? parsed : JSON.stringify(parsed, null, 2);\n } catch {\n return raw;\n }\n}\n"],"mappings":";;AAYA,IAAaC,IAAsB;AAGnC,SAAgBC,EAAsB,GAAkD;CACtF,OAAO;GACJF,EAAmB,YAAY,EAAE,sCAAsC,WAAW;GAClFA,EAAmB,UAAU,EAAE,oCAAoC,SAAS;GAC5EA,EAAmB,UAAU,EAAE,oCAAoC,SAAS;GAC5EA,EAAmB,SAAS,EAAE,mCAAmC,QAAQ;GACzEA,EAAmB,UAAU,EAAE,qCAAqC,WAAW;GAC/EA,EAAmB,YAAY,EAAE,sCAAsC,WAAW;CACrF;AACF;AAGA,SAAgBI,EAAqB,GAAc,GAAwB;CAEzE,OADuCF,EAAsBG,CACtD,CAAA,CAAOC,MAAWA;AAC3B;AAOA,SAAgBC,EAAgB,GAAwC;CACtE,IAAI,CAACC,GAAK,OAAO;CACjB,IAAI;EACF,IAAMC,IAAkB,KAAK,MAAMD,CAAG;EACtC,IAAIC,KAAU,OAAOA,KAAW,YAAY,CAAC,MAAM,QAAQA,CAAM,GAAG;GAClE,IAAMC,IAASD,GACTE,IAAO,OAAO,KAAKD,CAAM;GAC/B,IAAI,OAAOA,EAAO,WAAY,YAAYC,EAAK,OAAO,MAAQC,MAAQ,SAAS,GAC7E,OAAOF,EAAO;EAElB;EACA,OAAO,OAAOD,KAAW,WAAWA,IAAS,KAAK,UAAUA,GAAQ,MAAM,CAAC;CAC7E,QAAQ;EACN,OAAOD;CACT;AACF"}
@@ -19,7 +19,8 @@ function n(e) {
19
19
  return (e ?? 0).toLocaleString("en-US");
20
20
  }
21
21
  function r(e) {
22
- let t = e ?? 0;
22
+ if (e == null || !Number.isFinite(e)) return "—";
23
+ let t = Math.round(e);
23
24
  return t < 1e3 ? `${t}ms` : t < 6e4 ? `${(t / 1e3).toFixed(1)}s` : `${Math.floor(t / 6e4)}m ${Math.floor(t % 6e4 / 1e3)}s`;
24
25
  }
25
26
  function i(e) {
@@ -27,7 +28,8 @@ function i(e) {
27
28
  return t < 1e3 ? t.toString() : t < 1e6 ? `${(t / 1e3).toFixed(1)}K` : `${(t / 1e6).toFixed(2)}M`;
28
29
  }
29
30
  function a(e, t = "USD") {
30
- let n = e ?? 0;
31
+ if (e == null || !Number.isFinite(e)) return "—";
32
+ let n = e;
31
33
  return new Intl.NumberFormat("en-US", {
32
34
  style: "currency",
33
35
  currency: t,
@@ -1 +1 @@
1
- {"version":3,"file":"formatters.js","names":["formatDate","dateString","date","options","formatRelativeTime","diffMs","diffSec","diffMin","diffHr","diffDays","diffWeeks","diffMonths","formatNumber","num","formatDuration","ms","msValue","formatTokens","tokens","tokensValue","formatCurrency","amount","amountValue"],"sources":["../../../src/botlit/utils/formatters.ts"],"sourcesContent":["/**\n * Formatting utilities\n * @module botlit/utils\n */\n\n/** Rendered in place of a value the service has not provided. */\nexport const MISSING_VALUE = '\\u2014';\n\n/**\n * Format a date string to a localized date format\n */\nexport function formatDate(\n dateString: string | null | undefined,\n options?: Intl.DateTimeFormatOptions\n): string {\n if (!dateString) return MISSING_VALUE;\n const date = new Date(dateString);\n if (Number.isNaN(date.getTime())) return MISSING_VALUE;\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...options,\n });\n}\n\n/**\n * Format a date string to a relative time (e.g., \"2 hours ago\")\n */\nexport function formatRelativeTime(dateString: string | null | undefined): string {\n if (!dateString) return MISSING_VALUE;\n const date = new Date(dateString);\n if (Number.isNaN(date.getTime())) return MISSING_VALUE;\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffSec = Math.floor(diffMs / 1000);\n const diffMin = Math.floor(diffSec / 60);\n const diffHr = Math.floor(diffMin / 60);\n const diffDays = Math.floor(diffHr / 24);\n const diffWeeks = Math.floor(diffDays / 7);\n const diffMonths = Math.floor(diffDays / 30);\n\n if (diffSec < 60) {\n return 'just now';\n } else if (diffMin < 60) {\n return `${diffMin} minute${diffMin === 1 ? '' : 's'} ago`;\n } else if (diffHr < 24) {\n return `${diffHr} hour${diffHr === 1 ? '' : 's'} ago`;\n } else if (diffDays < 7) {\n return `${diffDays} day${diffDays === 1 ? '' : 's'} ago`;\n } else if (diffWeeks < 4) {\n return `${diffWeeks} week${diffWeeks === 1 ? '' : 's'} ago`;\n } else if (diffMonths < 12) {\n return `${diffMonths} month${diffMonths === 1 ? '' : 's'} ago`;\n } else {\n return formatDate(dateString);\n }\n}\n\n/**\n * Format a number with commas\n */\nexport function formatNumber(num: number | null | undefined): string {\n return (num ?? 0).toLocaleString('en-US');\n}\n\n/**\n * Format bytes to human-readable size\n */\nexport function formatBytes(bytesValue: number | null | undefined): string {\n const bytes = bytesValue ?? 0;\n if (bytes === 0) return '0 B';\n const k = 1024;\n const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;\n}\n\n/**\n * Format duration in milliseconds to human-readable format\n */\nexport function formatDuration(msValue: number | null | undefined): string {\n const ms = msValue ?? 0;\n if (ms < 1000) {\n return `${ms}ms`;\n } else if (ms < 60000) {\n return `${(ms / 1000).toFixed(1)}s`;\n } else {\n const min = Math.floor(ms / 60000);\n const sec = Math.floor((ms % 60000) / 1000);\n return `${min}m ${sec}s`;\n }\n}\n\n/**\n * Format tokens count\n */\nexport function formatTokens(tokensValue: number | null | undefined): string {\n const tokens = tokensValue ?? 0;\n if (tokens < 1000) {\n return tokens.toString();\n } else if (tokens < 1000000) {\n return `${(tokens / 1000).toFixed(1)}K`;\n } else {\n return `${(tokens / 1000000).toFixed(2)}M`;\n }\n}\n\n/**\n * Format cost in USD\n */\nexport function formatCost(costValue: number | null | undefined): string {\n const cost = costValue ?? 0;\n if (cost < 0.01) {\n return `$${cost.toFixed(4)}`;\n } else if (cost < 1) {\n return `$${cost.toFixed(3)}`;\n } else {\n return `$${cost.toFixed(2)}`;\n }\n}\n\n/**\n * Format currency (alias for formatCost with more flexibility)\n */\nexport function formatCurrency(\n amountValue: number | null | undefined,\n currency: string = 'USD'\n): string {\n const amount = amountValue ?? 0;\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency,\n minimumFractionDigits: 2,\n maximumFractionDigits: amount < 1 ? 4 : 2,\n }).format(amount);\n}\n"],"mappings":"AAWA,SAAgBA,EACd,GACA,GACQ;CACR,IAAI,CAACC,GAAY,OAAA;CACjB,IAAMC,IAAO,IAAI,KAAKD,CAAU;CAEhC,OADI,OAAO,MAAMC,EAAK,QAAQ,CAAC,IAAG,MAC3BA,EAAK,mBAAmB,SAAS;EACtC,MAAM;EACN,OAAO;EACP,KAAK;EACL,GAAGC;CACL,CAAC;AACH;AAKA,SAAgBC,EAAmB,GAA+C;CAChF,IAAI,CAACH,GAAY,OAAA;CACjB,IAAMC,IAAO,IAAI,KAAKD,CAAU;CAChC,IAAI,OAAO,MAAMC,EAAK,QAAQ,CAAC,GAAG,OAAA;CAElC,IAAMG,qBAAS,IADC,KACD,EAAA,CAAI,QAAQ,IAAIH,EAAK,QAAQ,GACtCI,IAAU,KAAK,MAAMD,IAAS,GAAI,GAClCE,IAAU,KAAK,MAAMD,IAAU,EAAE,GACjCE,IAAS,KAAK,MAAMD,IAAU,EAAE,GAChCE,IAAW,KAAK,MAAMD,IAAS,EAAE,GACjCE,IAAY,KAAK,MAAMD,IAAW,CAAC,GACnCE,IAAa,KAAK,MAAMF,IAAW,EAAE;CAezC,OAbEH,IAAU,KACL,aACEC,IAAU,KACZ,GAAGA,EAAQ,SAASA,MAAY,IAAI,KAAK,IAAI,QAC3CC,IAAS,KACX,GAAGA,EAAO,OAAOA,MAAW,IAAI,KAAK,IAAI,QACvCC,IAAW,IACb,GAAGA,EAAS,MAAMA,MAAa,IAAI,KAAK,IAAI,QAC1CC,IAAY,IACd,GAAGA,EAAU,OAAOA,MAAc,IAAI,KAAK,IAAI,QAC7CC,IAAa,KACf,GAAGA,EAAW,QAAQA,MAAe,IAAI,KAAK,IAAI,QAElDX,EAAWC,CAAU;AAEhC;AAKA,SAAgBW,EAAa,GAAwC;CACnE,QAAQC,KAAO,EAAA,CAAG,eAAe,OAAO;AAC1C;AAiBA,SAAgBC,EAAe,GAA4C;CACzE,IAAMC,IAAKC,KAAW;CAQpB,OAPED,IAAK,MACA,GAAGA,EAAG,MACJA,IAAK,MACP,IAAIA,IAAK,IAAA,CAAM,QAAQ,CAAC,EAAE,KAI1B,GAFK,KAAK,MAAMA,IAAK,GAElB,EAAI,IADF,KAAK,MAAOA,IAAK,MAAS,GACpB,EAAI;AAE1B;AAKA,SAAgBE,EAAa,GAAgD;CAC3E,IAAMC,IAASC,KAAe;CAM5B,OALED,IAAS,MACJA,EAAO,SAAS,IACdA,IAAS,MACX,IAAIA,IAAS,IAAA,CAAM,QAAQ,CAAC,EAAE,KAE9B,IAAIA,IAAS,IAAA,CAAS,QAAQ,CAAC,EAAE;AAE5C;AAmBA,SAAgBE,EACd,GACA,IAAmB,OACX;CACR,IAAMC,IAASC,KAAe;CAC9B,OAAO,IAAI,KAAK,aAAa,SAAS;EACpC,OAAO;EACP;EACA,uBAAuB;EACvB,uBAAuBD,IAAS,IAAI,IAAI;CAC1C,CAAC,CAAC,CAAC,OAAOA,CAAM;AAClB"}
1
+ {"version":3,"file":"formatters.js","names":["formatDate","dateString","date","options","formatRelativeTime","diffMs","diffSec","diffMin","diffHr","diffDays","diffWeeks","diffMonths","formatNumber","num","formatDuration","msValue","ms","formatTokens","tokens","tokensValue","formatCurrency","amountValue","amount"],"sources":["../../../src/botlit/utils/formatters.ts"],"sourcesContent":["/**\n * Formatting utilities\n * @module botlit/utils\n */\n\n/** Rendered in place of a value the service has not provided. */\nexport const MISSING_VALUE = '\\u2014';\n\n/**\n * Format a date string to a localized date format\n */\nexport function formatDate(\n dateString: string | null | undefined,\n options?: Intl.DateTimeFormatOptions\n): string {\n if (!dateString) return MISSING_VALUE;\n const date = new Date(dateString);\n if (Number.isNaN(date.getTime())) return MISSING_VALUE;\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...options,\n });\n}\n\n/**\n * Format a date string to a relative time (e.g., \"2 hours ago\")\n */\nexport function formatRelativeTime(dateString: string | null | undefined): string {\n if (!dateString) return MISSING_VALUE;\n const date = new Date(dateString);\n if (Number.isNaN(date.getTime())) return MISSING_VALUE;\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffSec = Math.floor(diffMs / 1000);\n const diffMin = Math.floor(diffSec / 60);\n const diffHr = Math.floor(diffMin / 60);\n const diffDays = Math.floor(diffHr / 24);\n const diffWeeks = Math.floor(diffDays / 7);\n const diffMonths = Math.floor(diffDays / 30);\n\n if (diffSec < 60) {\n return 'just now';\n } else if (diffMin < 60) {\n return `${diffMin} minute${diffMin === 1 ? '' : 's'} ago`;\n } else if (diffHr < 24) {\n return `${diffHr} hour${diffHr === 1 ? '' : 's'} ago`;\n } else if (diffDays < 7) {\n return `${diffDays} day${diffDays === 1 ? '' : 's'} ago`;\n } else if (diffWeeks < 4) {\n return `${diffWeeks} week${diffWeeks === 1 ? '' : 's'} ago`;\n } else if (diffMonths < 12) {\n return `${diffMonths} month${diffMonths === 1 ? '' : 's'} ago`;\n } else {\n return formatDate(dateString);\n }\n}\n\n/**\n * Format a number with commas\n */\nexport function formatNumber(num: number | null | undefined): string {\n return (num ?? 0).toLocaleString('en-US');\n}\n\n/**\n * Format bytes to human-readable size\n */\nexport function formatBytes(bytesValue: number | null | undefined): string {\n const bytes = bytesValue ?? 0;\n if (bytes === 0) return '0 B';\n const k = 1024;\n const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;\n}\n\n/**\n * Format duration in milliseconds to human-readable format\n */\nexport function formatDuration(msValue: number | null | undefined): string {\n // BOFF-12617 — an unknown duration is not an instant run.\n if (msValue === null || msValue === undefined || !Number.isFinite(msValue)) return MISSING_VALUE;\n const ms = Math.round(msValue);\n if (ms < 1000) {\n return `${ms}ms`;\n } else if (ms < 60000) {\n return `${(ms / 1000).toFixed(1)}s`;\n } else {\n const min = Math.floor(ms / 60000);\n const sec = Math.floor((ms % 60000) / 1000);\n return `${min}m ${sec}s`;\n }\n}\n\n/**\n * Format tokens count\n */\nexport function formatTokens(tokensValue: number | null | undefined): string {\n const tokens = tokensValue ?? 0;\n if (tokens < 1000) {\n return tokens.toString();\n } else if (tokens < 1000000) {\n return `${(tokens / 1000).toFixed(1)}K`;\n } else {\n return `${(tokens / 1000000).toFixed(2)}M`;\n }\n}\n\n/**\n * Format cost in USD\n */\nexport function formatCost(costValue: number | null | undefined): string {\n // BOFF-12617 — an unknown cost is not a free run.\n if (costValue === null || costValue === undefined || !Number.isFinite(costValue))\n return MISSING_VALUE;\n const cost = costValue;\n if (cost < 0.01) {\n return `$${cost.toFixed(4)}`;\n } else if (cost < 1) {\n return `$${cost.toFixed(3)}`;\n } else {\n return `$${cost.toFixed(2)}`;\n }\n}\n\n/**\n * Format currency (alias for formatCost with more flexibility)\n */\nexport function formatCurrency(\n amountValue: number | null | undefined,\n currency: string = 'USD'\n): string {\n // BOFF-12617 — an unknown amount is not $0.00.\n if (amountValue === null || amountValue === undefined || !Number.isFinite(amountValue)) {\n return MISSING_VALUE;\n }\n const amount = amountValue;\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency,\n minimumFractionDigits: 2,\n maximumFractionDigits: amount < 1 ? 4 : 2,\n }).format(amount);\n}\n"],"mappings":"AAWA,SAAgBA,EACd,GACA,GACQ;CACR,IAAI,CAACC,GAAY,OAAA;CACjB,IAAMC,IAAO,IAAI,KAAKD,CAAU;CAEhC,OADI,OAAO,MAAMC,EAAK,QAAQ,CA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E,KAI1B,GAFK,KAAK,MAAMA,IAAK,GAElB,EAAI,IADF,KAAK,MAAOA,IAAK,MAAS,GACpB,EAAI;AAE1B;AAKA,SAAgBC,EAAa,GAAgD;CAC3E,IAAMC,IAASC,KAAe;CAM5B,OALED,IAAS,MACJA,EAAO,SAAS,IACdA,IAAS,MACX,IAAIA,IAAS,IAAA,CAAM,QAAQ,CAAC,EAAE,KAE9B,IAAIA,IAAS,IAAA,CAAS,QAAQ,CAAC,EAAE;AAE5C;AAsBA,SAAgBE,EACd,GACA,IAAmB,OACX;CAER,IAAIC,KAAgB,QAAqC,CAAC,OAAO,SAASA,CAAW,GACnF,OAAA;CAEF,IAAMC,IAASD;CACf,OAAO,IAAI,KAAK,aAAa,SAAS;EACpC,OAAO;EACP;EACA,uBAAuB;EACvB,uBAAuBC,IAAS,IAAI,IAAI;CAC1C,CAAC,CAAC,CAAC,OAAOA,CAAM;AAClB"}
@@ -435,7 +435,19 @@ export type ExecutionFilterInput = {
435
435
  agentId?: string | number | null | undefined;
436
436
  appId?: string | number | null | undefined;
437
437
  conversationId?: string | number | null | undefined;
438
+ /** Runs created at or before this time */
439
+ endDate?: string | null | undefined;
440
+ /**
441
+ * Case-insensitive text matched against the run id, the input, and the
442
+ * agent and bot names (BOFF-12618). At most 200 characters are used.
443
+ */
444
+ search?: string | null | undefined;
445
+ /** Runs created at or after this time */
446
+ startDate?: string | null | undefined;
447
+ /** Single status. Combined with `statuses` when both are given. */
438
448
  status?: ExecutionStatus | null | undefined;
449
+ /** Any of these statuses (BOFF-12618) */
450
+ statuses?: Array<ExecutionStatus> | null | undefined;
439
451
  type?: ExecutionType | null | undefined;
440
452
  workspaceId?: string | number | null | undefined;
441
453
  };
@@ -1837,6 +1849,17 @@ export type GetExecutionQuery = {
1837
1849
  tokensUsed: number | null;
1838
1850
  type: Types.ExecutionType;
1839
1851
  workspaceId: string;
1852
+ agentName: string | null;
1853
+ appName: string | null;
1854
+ metrics: {
1855
+ cost: number;
1856
+ executionId: string;
1857
+ inputTokens: number;
1858
+ outputTokens: number;
1859
+ ragChunks: number;
1860
+ toolCalls: number;
1861
+ totalTokens: number;
1862
+ } | null;
1840
1863
  } | null;
1841
1864
  };
1842
1865
  export type ListExecutionsQueryVariables = Exact<{
@@ -1863,6 +1886,8 @@ export type ListExecutionsQuery = {
1863
1886
  tokensUsed: number | null;
1864
1887
  type: Types.ExecutionType;
1865
1888
  workspaceId: string;
1889
+ agentName: string | null;
1890
+ appName: string | null;
1866
1891
  }>;
1867
1892
  };
1868
1893
  export type GetExecutionMetricsQueryVariables = Exact<{
@@ -1930,6 +1955,23 @@ export type UpdateExecutionStatusMutation = {
1930
1955
  workspaceId: string;
1931
1956
  };
1932
1957
  };
1958
+ export type GetExecutionSummaryQueryVariables = Exact<{
1959
+ filters?: Types.ExecutionFilterInput | null | undefined;
1960
+ }>;
1961
+ export type GetExecutionSummaryQuery = {
1962
+ getExecutionSummary: {
1963
+ avgDurationMs: number | null;
1964
+ failed: number;
1965
+ inProgress: number;
1966
+ pricedRuns: number;
1967
+ succeeded: number;
1968
+ timedRuns: number;
1969
+ total: number;
1970
+ totalCost: number | null;
1971
+ totalTokens: number;
1972
+ unpricedRuns: number;
1973
+ };
1974
+ };
1933
1975
  export type HandoffConfigQueryVariables = Exact<{
1934
1976
  agentId: string | number;
1935
1977
  }>;
@@ -5005,6 +5047,31 @@ export declare function useUpdateExecutionStatusMutation(baseOptions?: ApolloRea
5005
5047
  export type UpdateExecutionStatusMutationHookResult = ReturnType<typeof useUpdateExecutionStatusMutation>;
5006
5048
  export type UpdateExecutionStatusMutationResult = Apollo.MutationResult<Types.UpdateExecutionStatusMutation>;
5007
5049
  export type UpdateExecutionStatusMutationOptions = Apollo.BaseMutationOptions<Types.UpdateExecutionStatusMutation, Types.UpdateExecutionStatusMutationVariables>;
5050
+ export declare const GetExecutionSummaryDocument: Apollo.DocumentNode;
5051
+ /**
5052
+ * __useGetExecutionSummaryQuery__
5053
+ *
5054
+ * To run a query within a React component, call `useGetExecutionSummaryQuery` and pass it any options that fit your needs.
5055
+ * When your component renders, `useGetExecutionSummaryQuery` returns an object from Apollo Client that contains loading, error, and data properties
5056
+ * you can use to render your UI.
5057
+ *
5058
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
5059
+ *
5060
+ * @example
5061
+ * const { data, loading, error } = useGetExecutionSummaryQuery({
5062
+ * variables: {
5063
+ * filters: // value for 'filters'
5064
+ * },
5065
+ * });
5066
+ */
5067
+ export declare function useGetExecutionSummaryQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables>): ApolloReactHooks.useQuery.Result<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables, "empty" | "complete" | "streaming", Types.GetExecutionSummaryQueryVariables, undefined>;
5068
+ export declare function useGetExecutionSummaryLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables>): ApolloReactHooks.useLazyQuery.ResultTuple<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables, "empty" | "complete" | "streaming", undefined>;
5069
+ export declare function useGetExecutionSummarySuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables>;
5070
+ export declare function useGetExecutionSummarySuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetExecutionSummaryQuery | undefined, Types.GetExecutionSummaryQueryVariables>;
5071
+ export type GetExecutionSummaryQueryHookResult = ReturnType<typeof useGetExecutionSummaryQuery>;
5072
+ export type GetExecutionSummaryLazyQueryHookResult = ReturnType<typeof useGetExecutionSummaryLazyQuery>;
5073
+ export type GetExecutionSummarySuspenseQueryHookResult = ReturnType<typeof useGetExecutionSummarySuspenseQuery>;
5074
+ export type GetExecutionSummaryQueryResult = Apollo.QueryResult<Types.GetExecutionSummaryQuery, Types.GetExecutionSummaryQueryVariables>;
5008
5075
  export declare const HandoffConfigDocument: Apollo.DocumentNode;
5009
5076
  /**
5010
5077
  * __useHandoffConfigQuery__