diff --git a/apiclient/types/toolreference.go b/apiclient/types/toolreference.go index 1303b06df..80a0a716a 100644 --- a/apiclient/types/toolreference.go +++ b/apiclient/types/toolreference.go @@ -21,6 +21,7 @@ type ToolReferenceManifest struct { type ToolReference struct { Metadata ToolReferenceManifest + Resolved bool `json:"resolved,omitempty"` Error string `json:"error,omitempty"` Builtin bool `json:"builtin,omitempty"` Description string `json:"description,omitempty"` diff --git a/pkg/api/handlers/toolreferences.go b/pkg/api/handlers/toolreferences.go index 2c6397374..e832c246f 100644 --- a/pkg/api/handlers/toolreferences.go +++ b/pkg/api/handlers/toolreferences.go @@ -29,8 +29,9 @@ func convertToolReference(toolRef v1.ToolReference) types.ToolReference { ToolType: toolRef.Spec.Type, Reference: toolRef.Spec.Reference, }, - Builtin: toolRef.Spec.Builtin, - Error: toolRef.Status.Error, + Builtin: toolRef.Spec.Builtin, + Error: toolRef.Status.Error, + Resolved: toolRef.Generation == toolRef.Status.ObservedGeneration, } if toolRef.Spec.Active == nil { tf.Active = true diff --git a/pkg/storage/openapi/generated/openapi_generated.go b/pkg/storage/openapi/generated/openapi_generated.go index aec10d7bf..3189f204f 100644 --- a/pkg/storage/openapi/generated/openapi_generated.go +++ b/pkg/storage/openapi/generated/openapi_generated.go @@ -3286,6 +3286,12 @@ func schema_otto8_ai_otto8_apiclient_types_ToolReference(ref common.ReferenceCal Ref: ref("github.com/otto8-ai/otto8/apiclient/types.ToolReferenceManifest"), }, }, + "resolved": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, "error": { SchemaProps: spec.SchemaProps{ Type: []string{"string"},