From cc81f538f473dd05299282931572ab02c08d4db4 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Fri, 1 May 2026 21:16:56 -0400 Subject: [PATCH] refactor(api): type StageState JSON-blob fields so the TS client stops emitting any provider_used, script_invocation, and script_timing become object | null; parallel_results becomes Array | null. The Rust StageState type is unaffected because fabro-api/build.rs replaces it with fabro_types::StageState. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/public/api-reference/fabro-api.yaml | 18 +++++++++++++---- .../fabro-api-client/src/models/model.ts | 3 ++- .../src/models/stage-state.ts | 20 +++++++++++++++---- .../src/models/stage-status.ts | 5 ++++- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/docs/public/api-reference/fabro-api.yaml b/docs/public/api-reference/fabro-api.yaml index 9061603c4..bae632f8e 100644 --- a/docs/public/api-reference/fabro-api.yaml +++ b/docs/public/api-reference/fabro-api.yaml @@ -5137,12 +5137,22 @@ components: oneOf: - $ref: "#/components/schemas/NodeStatusRecord" - type: "null" - provider_used: {} + provider_used: + type: ["object", "null"] + description: Provider and model metadata recorded for the stage attempt. diff: type: ["string", "null"] - script_invocation: {} - script_timing: {} - parallel_results: {} + script_invocation: + type: ["object", "null"] + description: Command and environment recorded when the stage script ran. + script_timing: + type: ["object", "null"] + description: Wall-clock and step timing metadata for the stage script. + parallel_results: + type: ["array", "null"] + items: + type: object + description: Per-branch result objects produced by a parallel stage. stdout: type: ["string", "null"] stderr: diff --git a/lib/packages/fabro-api-client/src/models/model.ts b/lib/packages/fabro-api-client/src/models/model.ts index 45751f7e9..779786680 100644 --- a/lib/packages/fabro-api-client/src/models/model.ts +++ b/lib/packages/fabro-api-client/src/models/model.ts @@ -67,9 +67,10 @@ export interface Model { */ 'default': boolean; /** - * Whether credential material is present for this model\'s provider on the server (vault entry or environment variable). Does NOT imply the credential is valid or that requests will succeed; call `POST /models/{id}/test` to verify usability. + * Whether credential material is present for this model\'s provider on the server (vault entry or environment variable). Does NOT imply the credential is valid or that requests will succeed; call `POST /models/{id}/test` to verify usability. */ 'configured': boolean; } + diff --git a/lib/packages/fabro-api-client/src/models/stage-state.ts b/lib/packages/fabro-api-client/src/models/stage-state.ts index c7b3e35de..7838a276c 100644 --- a/lib/packages/fabro-api-client/src/models/stage-state.ts +++ b/lib/packages/fabro-api-client/src/models/stage-state.ts @@ -31,11 +31,23 @@ export interface StageState { 'prompt'?: string | null; 'response'?: string | null; 'status'?: NodeStatusRecord | null; - 'provider_used'?: any; + /** + * Provider and model metadata recorded for the stage attempt. + */ + 'provider_used'?: object | null; 'diff'?: string | null; - 'script_invocation'?: any; - 'script_timing'?: any; - 'parallel_results'?: any; + /** + * Command and environment recorded when the stage script ran. + */ + 'script_invocation'?: object | null; + /** + * Wall-clock and step timing metadata for the stage script. + */ + 'script_timing'?: object | null; + /** + * Per-branch result objects produced by a parallel stage. + */ + 'parallel_results'?: Array | null; 'stdout'?: string | null; 'stderr'?: string | null; 'stdout_bytes'?: number | null; diff --git a/lib/packages/fabro-api-client/src/models/stage-status.ts b/lib/packages/fabro-api-client/src/models/stage-status.ts index 33e31f774..0756f0150 100644 --- a/lib/packages/fabro-api-client/src/models/stage-status.ts +++ b/lib/packages/fabro-api-client/src/models/stage-status.ts @@ -5,7 +5,7 @@ * HTTP API for managing Fabro workflow run executions. * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -30,3 +30,6 @@ export const StageStatus = { } as const; export type StageStatus = typeof StageStatus[keyof typeof StageStatus]; + + +