OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Retrieves all logs for a specific run.
Goal
Debug and audit run execution.
Context
Run details page - logs tab.
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
import { GranularityEnum, LogLevelEnum, RunStatusEnum } from './run.enum';
import {
RunInputModel,
RunLogModel,
RunModel,
RunStepModel,
RunSummaryModel,
TimelineDataPointModel,
} from './run.schema';
export const GetRunLogsQuery = defineQuery({
meta: {
key: 'agent.run.getLogs',
version: '1.0.0',
stability: 'stable',
owners: ['@agent-console-team'],
tags: ['run', 'logs'],
description: 'Retrieves all logs for a specific run.',
goal: 'Debug and audit run execution.',
context: 'Run details page - logs tab.',
},
io: {
input: defineSchemaModel({
name: 'GetRunLogsInput',
fields: {
runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
level: { type: LogLevelEnum, isOptional: true },
stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
limit: {
type: ScalarTypeEnum.Int_unsecure(),
isOptional: true,
defaultValue: 100,
},
offset: {
type: ScalarTypeEnum.Int_unsecure(),
isOptional: true,
defaultValue: 0,
},
},
}),
output: defineSchemaModel({
name: 'GetRunLogsOutput',
fields: {
items: { type: RunLogModel, isArray: true, isOptional: false },
total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },
},
}),
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'get-run-logs-happy-path',
given: ['Run exists with logs'],
when: ['User requests logs'],
then: ['Paginated logs list is returned'],
},
],
examples: [
{
key: 'get-logs-filtered',
input: { runId: 'run-456', level: 'error', limit: 50 },
output: { items: [], total: 0, hasMore: false },
},
],
},
});