Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions api/traces.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@
// @public
export const DEFAULT_TRACE_DIR = ".lousho/traces";

// @public
export interface EvaluatorTrace {
agent_id: string | null;
duration_ms: number | null;
end: number | null;
error_message: string | null;
input: string | null;
name: string | null;
observations: ObservationRow[];
output: string | null;
start: number;
status: string | null;
trace_id: string;
}

// @public
export function evaluatorTraceFrom(traceId: string, observations: readonly ObservationRow[]): EvaluatorTrace | undefined;

// @public
export function fanOutExporters(exporters: readonly (TraceExporter | undefined | null)[]): TraceExporter | undefined;

Expand All @@ -27,6 +45,32 @@ export interface ListTracesOptions {
limit?: number;
}

// @public
export interface ObservationRow {
agent_id: string | null;
attrs: Record<string, unknown> | null;
cost_partial: boolean | null;
cost_usd: number | null;
end: number | null;
input: string | null;
kind: string;
model: string | null;
name: string | null;
obs_id: string;
output: string | null;
parent_obs_id: string | null;
session_id: string | null;
start: number;
status: string | null;
trace_id: string;
truncated: boolean;
usage_cached_tokens: number | null;
usage_estimated: boolean | null;
usage_input_tokens: number | null;
usage_output_tokens: number | null;
usage_reasoning_tokens: number | null;
}

// @public
export function observeExporter(options?: ObserveExporterOptions): ObserveReporter;

Expand Down
6 changes: 6 additions & 0 deletions apps/agent-forge/e2e/revamp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ const FILTERS: Record<ScreenId, string> = {
scores: '?eval=e2e-eval&agent=orders-bot&source=eval&range=7d&open=e2e-eval',
// The only URL state Datasets keeps is the server-side page (`offset`).
datasets: '?offset=50',
// Queues pages server-side the same way (`?offset=`).
queues: '?offset=50',
evals: '',
prompts: '?diff=1,2',
hub: '?agent=triage-bot&scope=fleet',
Expand Down Expand Up @@ -195,6 +197,9 @@ const CONTROLS: Record<string, (main: Locator, page: Page) => Promise<void>> = {
'/evals/datasets/:name': async (main) => {
await expectPreviousPage(main);
},
'/evals/queues': async (main) => {
await expectPreviousPage(main);
},
'/prompts/:name': async (main) => {
await expect(main.getByRole('combobox', { name: 'Compare version A' })).toHaveValue('1');
await expect(main.getByRole('combobox', { name: 'Compare version B' })).toHaveValue('2');
Expand All @@ -218,6 +223,7 @@ const NO_CONTROLS = new Set([
'/threads/:sessionId', // a thread's turns; the list's filters only ride along in the URL
'/evals/:section', // evaluators / annotation placeholder screen
'/evals/:section/:id', // evaluators / annotation placeholder screen
'/evals/queues/:id', // one queue's review pane; no URL-backed controls beyond the id
'/prompts', // the registry list has no filters
'/settings', // no URL state
]);
Expand Down
2 changes: 2 additions & 0 deletions apps/agent-forge/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export default defineConfig({
BASE_DIR: baseDir,
LOUSHO_STUDIO_TOKEN: E2E_STUDIO_TOKEN,
LOUSHO_OBSERVE_URL: E2E_OBSERVE_URL,
// No daemon here: keep the LLM-judge loop (server/judge.ts) from polling it.
LOUSHO_STUDIO_JUDGE: '0',
},
url: `http://127.0.0.1:${port}/health`,
reuseExistingServer: false,
Expand Down
Loading
Loading