forked from forthfate/openorbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.ts
More file actions
33 lines (33 loc) · 8.55 KB
/
Copy pathmodels.ts
File metadata and controls
33 lines (33 loc) · 8.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
export type Page = 'dashboard' | 'assets' | 'builds' | 'runs' | 'improvements' | 'settings'
export type TestCase = { id:string; name:string; prompt:string; acceptance:string; path?:string; expected_text?:string }
export type TargetTestCaseSet = { id:string; name:string; description:string; cases:TestCase[]; created_at?:string }
export type ExecutionEnvironment = {id:string;name:string;executor:{type:'local'|'remote-http';endpoint?:string;method?:'GET'|'POST'|'PUT';timeout_seconds?:number;headers?:Record<string,string>};browser_executable_path?:string;browser_library_path?:string;environment_variables?:Record<string,string>;created_at?:string}
export type TargetEnvironment = {id:string;name:string;repository:string;browser_base_url?:string;managed_prompt_path?:string;created_at?:string}
export type Build = { id:string; name:string; enabled:boolean; runner_id:string; execution_environment_id?:string;target_environment_id?:string; repository:string; repository_name?:string; repository_is_git?:boolean; repository_error?:string; purpose:string;manager_template_id?:string;model_profile_name?:string;test_case_set_id?:string;test_cases?:TestCase[];browser_base_url?:string;browser_executable_path?:string;browser_library_path?:string;timezone:string;repeat_interval_minutes:number;run_limit:number;cadence_mode?:'after_completion'|'fixed';overrun_policy?:'wait'|'interrupt_eval';schedule_enabled?:boolean;schedule_weekdays?:number[];schedule_start_time?:string;schedule_end_time?:string;iteration_strategy?:'linear'|'score_select';candidates_per_iteration?:number;approval_score:number;require_human_approval_before_apply?:boolean;created_at?:string;last_run_at?:string;executor?:{type?:'local'|'remote-http';endpoint?:string;method?:'GET'|'POST'|'PUT';timeout_seconds?:number;headers?:Record<string,string>} }
export type PromptTemplate = { id:string; name:string; version:number; content:string; versions?:{version:number;content:string}[];created_at?:string }
export type SavedDataFile = { label?:string; filename:string; path:string; relative_path?:string; sha256?:string; size?:number; content_type?:string }
export type RunStepResult = { step_id:string; phase?:'before_all'|'before_each'|'execute'|'verify'|'after_each'|'after_all'; loop_index?:number; candidate_id?:string|null; name?:string; command?:string[]; working_directory?:string; started_at?:string; ended_at?:string; exit_code?:number; output?:string; error?:string; log_lines?:{timestamp:string;value:string}[]; target_logs?:{timestamp?:string;level?:string;source?:string;message:string;run_id?:string;iteration?:number;phase?:string}[]; data_files?:SavedDataFile[]; result?:Record<string,unknown> }
export type BehaviorTrace = { purpose:string; rationale:string; observation:string; decision:string; next_action:string }
export type SupervisorEvaluation = { score:number; approval:'approved'|'rejected'|'pending'; behavior_summary?:string; behavior_trace?:BehaviorTrace; summary:string }
export type SupervisorResult = { evaluation?:SupervisorEvaluation; improvements:Record<string,unknown>[]; reported_issues:Record<string,unknown>[] }
export type SupervisorRecord = { iteration:number; candidate_id?:string|null; status:'pending'|'completed'|'not_configured'|'invalid_response'|'failed'; prompt?:string; response?:SupervisorResult; error?:string; recorded_at?:string }
export type Run = { id:string; workflow_id:string; workflow_name:string; build_id?:string; build_name?:string; execution_mode?:'run'|'test'; execution_type?:'pipeline'|'invoke'; loop_limit?:number;start_iteration?:number;retry_of_run_id?:string;retry_mode?:'restart'|'resume';iteration_strategy?:'linear'|'score_select';candidates_per_iteration?:number;iteration_candidates?:{id:string;iteration:number;score?:number;status:string;selected?:boolean}[]; status:string; created_at?:string; updated_at?:string; finished_at?:string; current_phase?:string; pid?:number; last_pid?:number; telemetry_trace_id?:string; prompt_source?:string; prompt_snapshot?:string; supervisor_status?:'pending'|'completed'|'not_configured'|'invalid_response'|'failed'; supervisor_response?:SupervisorResult; supervisor_error?:string; supervisor_results?:SupervisorRecord[]; step_results?:RunStepResult[]; proposed_improvements?:number; approved_improvements?:number; reported_issues?:number; approval_score?:number }
export type TelemetrySpan = { name:string; traceId:string; spanId:string; parentSpanId?:string|null; startTime?:number; endTime?:number; attributes?:Record<string,unknown>; status?:string; events?:{name:string;attributes?:Record<string,unknown>}[] }
export type RunTelemetry = { trace_id?:string; spans:TelemetrySpan[] }
export type PromptRevision = { iteration?:number; phase?:string; path:string; status:'initial'|'applied'|'blocked'|'rolled_back'|'unchanged'; reason?:string|null; recorded_at?:string; version_id?:string|null; run_id?:string|null; before?:string|null; after?:string|null; before_sha256?:string|null; after_sha256?:string|null }
export type CommitChange = { iteration?:number; phase?:string; recorded_at?:string; before:string; after:string; changed_paths:string[]; commits:{sha:string;subject:string}[]; diff?:string|null; diff_artifact?:{relative_path?:string;path?:string;sha256?:string;size?:number;content_type?:string}|null }
export type Improvement = { id:string; title:string; baseline_score:number; current_score:number; success_delta:number; pdca:string; feedback:string; commit?:string }
export type CycleIntervention = { id:string;build_id?:string;build_name?:string;run_id?:string;iteration?:number;diagnosis?:string;target:string;title:string;rationale:string;proposed_change:string;risk:'low'|'medium'|'high';validation:string;rollback:string;status:string;created_at:string }
export type ProposalEvent = {id:string;event_type?:'decision';proposal_id:string;decision?:'pending'|'accepted'|'rejected';rationale?:string;recorded_at:string;iteration?:number;phase?:string;run_id?:string}
export type ProposalLifecycle = {proposal_id:string;title:string;target:string;proposal:Record<string,unknown>;decision:'pending'|'accepted'|'rejected';decision_rationale:string;status:'proposed'|'accepted'|'rejected';score?:number|null;build_id?:string;build_name?:string;run_id?:string;iteration?:number;recorded_at?:string;data_files?:SavedDataFile[];events:ProposalEvent[]}
export type ImprovementIterationData = { build_id?:string; build_name?:string; run_id:string; iteration:number; recorded_at:string; data_files:SavedDataFile[] }
export type ImprovementAnalytics = { window_hours:number; operational_summary:{feedback:number;accepted:number;issues:number;average_score:number|null;score_delta:number|null}; feedback_by_build:{build_id:string;name:string;feedback_count:number}[]; iteration_trends:{build_id:string;name:string;points:{run_id:string;iteration:number;recorded_at:string;accepted_count:number;feedback_count:number;score:number|null}[]}[]; active_evaluations:{time:string;count:number}[]; feedback_status:{build_id:string;name:string;proposed:number;adopted:number;rejected:number}[]; issue_severity:{time:string;low:number;medium:number;high:number;critical:number}[]; run_health:{build_id:string;name:string;succeeded:number;failed:number;cancelled:number;running:number}[] }
export type OrbitLog = { time:string; name:string; status:string; message:string }
export type Settings = { profile_name:string; provider:string; model:string; endpoint:string; region:string; secret_env:string; aws_profile?:string;created_at?:string }
export type WorkflowStep = { id:string; phase:'before_all'|'before_each'|'execute'|'verify'|'after_each'|'after_all'; name:string; command:string[]; working_directory:string; timeout_seconds:number; approval:'not_required'|'required'; on_failure:'stop'|'continue'; minimum_interval_seconds?:number }
export type Workflow = { id:string; name:string; description:string; kind:string; enabled:boolean; risk:string; steps?:WorkflowStep[] }
export type RunnerAsset = { id:string; name:string; description:string; template_id:string; source:string;created_at?:string }
export type RunnerTemplate = { id:string; name:string; description:string; source:string; origin?:'built-in'|'user' }
export type QuickStartParameter = {key:string;label:string;type:'string'|'workspace'|'url'|'model_profile'|'select';required?:boolean;default?:string;description?:string;placeholder?:string;options?:{value:string;label:string}[]}
export type QuickStart = {schema_version:number;id:string;version:string;name:string;description:string;publisher?:{name:string;url?:string};parameters:QuickStartParameter[]}
export type Dashboard = { active_builds:Build[]; active_runs:Run[]; recent_runs?:Run[]; metrics:{builds:number;completed_evaluations:number;commits:number} }