[FEATURE] Asset-type taxonomy: detect and route diverse targets (mobile/cloud/web3/binary/identity) to methodology skills
Problem
infer_target_type only resolves targets into the core code / file / url / network / identifier buckets. Targets that are valid attack surface but don't fit those buckets — mobile bundles (APK/IPA), cloud resources (S3 buckets, blob stores, serverless functions), web3 (smart contracts, RPC endpoints, wallets), binaries/firmware, and identity/auth endpoints — are classified generically, so the root agent receives no asset-specific methodology and treats, say, an .apk like an opaque file.
Proposal
A small, frozen AssetType taxonomy with detection (prefix, file extension, URL scheme) and routing that maps each recognized asset to a methodology skill. The recommended skill is surfaced in the root task only when that skill is available, so the engine degrades gracefully and ships independently of the skill corpus (tracked separately).
Known pitfalls (from prior exploration in the now-closed #533)
- Keep the source dict type-coherent for
mypy --strict. Aboolis_dirflag stored in adict[str, str]makesget("is_dir") is Falsea non-overlapping identity check. Either use a string sentinel ("is_dir": "false") and keep the dict homogeneous, or threaddict[str, str | bool]through every consumer — includingruntime/session_manager.create_or_reuse, which was missed. - Every
AssetType.skillstem must resolve to a real skill file. The prior draft routed source code to a non-existentsource_code_reviewstem (the real stems aresource_aware_sast/source_aware_whitebox).
Acceptance
- Detection/routing unit tests for representative targets of each kind.
- Existing core target types (
local_code,repository,url,domain,subdomain,ip_address) behave exactly as before. ruff,mypy --strict, andbanditgreen.
Depends-on: the per-asset methodology skills corpus (separate issue). Related: #287.
Skills corpus tracked in #551 (routing here must reference skill stems that exist there).