Task 007 add agent job admin runner follow-up

This commit is contained in:
2026-05-21 19:33:24 +03:00
parent 4fd837349f
commit 8aa92ea728
16 changed files with 826 additions and 29 deletions
+23 -4
View File
@@ -3,6 +3,10 @@
export type AgentJobErrorCategory = "FAILED_SCHEMA_VALIDATION" | "CLI_EXIT_CODE_FAILURE" | "TIMEOUT" | "MISSING_OUTPUT_FILE" | "UNSUPPORTED_CLAIMS_FOUND" | "SOURCE_RETRIEVAL_FAILED" | "RESEARCH_ARTIFACT_UPLOAD_FAILED" | "PUBLISH_DRY_RUN_FAILED" | "GIT_CHECKOUT_FAILED" | "GIT_COMMIT_FAILED" | "GIT_PUSH_NON_FAST_FORWARD" | "PUBLISH_VERIFICATION_FAILED";
export type AgentJobListResponse = {
jobs: AgentJobSummary[];
};
export type AgentJobOutput = {
artifacts?: ResearchArtifactSummary[];
error_category?: AgentJobErrorCategory | null;
@@ -12,23 +16,38 @@ export type AgentJobOutput = {
status: AgentJobStatus;
};
export type AgentJobResponse = {
job: AgentJobSummary;
};
export type AgentJobStatus = "QUEUED" | "RUNNING" | "SUCCEEDED" | "FAILED" | "CANCELLED";
export type AgentJobSummary = {
agent_profile: string;
article_id: string;
article_id?: string | null;
attempt?: number;
duration_ms?: number | null;
error_category?: AgentJobErrorCategory | null;
error_message?: string | null;
exit_code?: number | null;
finished_at?: string | null;
id: string;
input_files?: RunnerFileRef[];
job_type: AgentJobType;
output_files?: RunnerFileRef[];
parent_job_id?: string | null;
queued_at: string;
started_at?: string | null;
status: AgentJobStatus;
stderr?: string;
stdout?: string;
workspace_path?: string | null;
};
export type AgentJobTestCodexRequest = {
fake_result?: string;
};
export type AgentJobType = "BOUNDARY_QUESTIONS" | "PLAN_GENERATION" | "RESEARCH" | "EVIDENCE_MATRIX" | "SECTION_SCAFFOLD" | "DRAFT_ASSEMBLY" | "SEO_REVIEW" | "LANGUAGE_REVIEW" | "PUBLISH_DRY_RUN" | "PUBLISH_COMMIT" | "TEST_CODEX";
export type ArticleCreateRequest = {
@@ -266,15 +285,15 @@ export type ScriptConfigVersionResponse = {
export type ScriptConfigVersionStatus = "DRAFT" | "ACTIVE" | "DEPRECATED";
export type ScriptConfigVersionSummary = {
activated_at?: string | null;
created_at: string;
created_by: string;
activated_at?: string | null;
diff: Record<string, unknown>;
diff?: Record<string, unknown>;
id: string;
publishing_yaml_hash: string;
rollback_target_version_id?: string | null;
status: ScriptConfigVersionStatus;
target_site_id: string;
rollback_target_version_id?: string | null;
transform_script_hash: string;
version: number;
};