File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,6 @@ func ResolveSources(agentsPath string) (Sources, error) {
109109// Resolve resolves an agent file reference (local file, URL, or OCI image) to a source
110110// For OCI references, always checks remote for updates but falls back to local cache if offline
111111func Resolve (agentFilename string ) (Source , error ) {
112- // Handle URL references first (before resolve() which converts to absolute path)
113- if IsURLReference (agentFilename ) {
114- return NewURLSource (agentFilename ), nil
115- }
116-
117112 resolvedPath , err := resolve (agentFilename )
118113 if err != nil {
119114 if IsOCIReference (agentFilename ) {
@@ -125,9 +120,15 @@ func Resolve(agentFilename string) (Source, error) {
125120 if resolvedPath == "default" {
126121 return NewBytesSource (resolvedPath , defaultAgent ), nil
127122 }
123+
124+ if IsURLReference (resolvedPath ) {
125+ return NewURLSource (resolvedPath ), nil
126+ }
127+
128128 if isLocalFile (resolvedPath ) {
129129 return NewFileSource (resolvedPath ), nil
130130 }
131+
131132 return NewOCISource (resolvedPath ), nil
132133}
133134
You can’t perform that action at this time.
0 commit comments