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.

agent.run.getLogs

Retrieves all logs for a specific run.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @agent-console-team
  • Tags: run, logs
  • File: packages/examples/agent-console/src/run/run.operation.ts
  • field.key.label
    agent.run.getLogs
    field.version.label
    1.0.0
    field.type.label
    operation (query)
    field.title.label
    agent.run.getLogs
    field.description.label

    Retrieves all logs for a specific run.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @agent-console-team
  • Tags: run, logs
  • File: packages/examples/agent-console/src/run/run.operation.ts
  • field.tags.label
    run,logs
    field.owners.label
    @agent-console-team
    field.stability.label
    stable

    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 },
    			},
    		],
    	},
    });