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 a run by its ID with optional details.
Goal
View detailed run information.
Context
Run details page or monitoring.
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 GetRunQuery = defineQuery({
meta: {
key: 'agent.run.get',
version: '1.0.0',
stability: 'stable',
owners: ['@agent-console-team'],
tags: ['run', 'get'],
description: 'Retrieves a run by its ID with optional details.',
goal: 'View detailed run information.',
context: 'Run details page or monitoring.',
},
io: {
input: defineSchemaModel({
name: 'GetRunInput',
fields: {
runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
includeSteps: { type: ScalarTypeEnum.Boolean(), isOptional: true },
includeLogs: { type: ScalarTypeEnum.Boolean(), isOptional: true },
},
}),
output: RunModel,
errors: {
RUN_NOT_FOUND: {
description: 'The specified run does not exist',
http: 404,
gqlCode: 'RUN_NOT_FOUND',
when: 'Run ID is invalid',
},
},
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'get-run-happy-path',
given: ['Run exists'],
when: ['User requests run by ID'],
then: ['Run details are returned'],
},
],
examples: [
{
key: 'get-with-steps',
input: { runId: 'run-456', includeSteps: true, includeLogs: false },
output: { id: 'run-456', status: 'completed', steps: [] },
},
],
},
});