Any projectItem with a path ending in .aep is a likely candidate.
Our forthcoming version provides better iteration of clips in a sequence; you can get to the projectItem of any clip, which should give you what you need.
Looking forward to the release of that next version. What I was looking for is not whether a projectItem is an After Effects Comp -- though that's valuable -- but what the AE-side Comp name is. In other words the goal is to be able to read, write and distinguish between
a) The name of an instance of an AE Comp in Premiere (which would be a Premiere object -- a projectItem)
b) The name of the actual Comp in After Effects (i.e. an AE object)
a) When I import Comp1 from projectname.aep into PPro, the projectItem is named 'Comp 1/projectname.aep'.
b) Parsing the projectItem.name will give you the Comp name.
But that name does not remain technically linked to the AE comp name.
So if you subsequently rename the Comp over in AE, the name of its counterpart in Premiere will not automatically update.
That's to be expected -- An AE Comp in Premiere is an instance of a Comp from After Effects. You can change the name of either without automatically affecting the name of the other. In this way you can have multiple instances of the same AE Comp in Premiere, naming each one differently -- which is exactly what you'll want to do if you're taking advantage of Live Text Templates.
But what I'm trying to do is develop a way to quickly, efficiently rename (even batch-rename) Premiere-side AE Comp names to match their AE-side counterparts.
Reason: I've got thousands of sources in Premiere, I'm processing hundreds of them through AE Comps, and I want to maintain a rigorous naming convention between the two.
You can drive AE ExtendScript from within PProPanel; why not walk across the AE project, sniffing for comp names, then update the PPro projectItem.name for those which match?
Can certainly do that, but it's based on a string match, requires parsing, and would fall apart in cases where someone (there are multiple people people working on these projects) does a typo.
So ideally I'd be looking for a projectItem property or function in Premiere that can retrieve the name of its AE-side counterpart.