696
return { status, skipReason, promptPath: this.withPromptPathMetadata(promptPath, agent.name, agent.description), agent };
697
} catch (e) {
699
>
if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
700
>
this.logger.warn(`[computeAgentDiscoveryInfo] Skipping agent file that does not exist: ${uri}`, error.message);
701
>
} else if (!isCancellationError(e)) {
702
this.logger.error(`[computeAgentDiscoveryInfo] Failed to parse agent file: ${uri}`, error);
703
}
705
>
status: 'skipped',
706
>
skipReason: 'parse-error',
707
>
errorMessage: error.message,
708
>
promptPath,
709
>
};
710
>
}
711
}));
712