import { type SourceProbe } from '../../managed/index.js'; import type { ManagedArtifactRecord } from '../../types/index.js'; /** * 探测一条受管记录**当前源**的状态(三态,喂 buildManagedListRow 判 drift / 生命周期)。 * - 远端 git(带 url):源身份钉不可变 SHA(install 时 pin),内容恒定 → 直接取 record.contentHash, * 不联网(快读命令不为 drift 检查发网络请求)。reachable。 * - 本地 git:locator `git::` 复用 resolveInstallSource 在**仓库对象库**内重物化重哈 * (读取受 git 边界约束,无任意文件读 DoS)。解析不到(常因 cwd 与 install 时不同、spec 随 cwd 漂) * → 抛错 → **reachable:false(未核,不当 stale)**,避免对未改动的 skill 误报漂移。 * - 本地 file:locator 是绝对路径,但受管 JSON **用户可手改 / 随仓库分发**(无 install、无 opt-in 即被 * loadAllManagedRecords 读到)。只读命令绝不盲读任意路径:**拒软链、只读常规文件 / 真目录、单文件 * 设 size cap**(挡 `evil.md → /dev/zero` 这类 readFileSync 无界 DoS 与项目外任意读)。守卫不过 → * reachable:false。目录-skill 整树哈本就跳软链(hashArtifactSource 用 isFile() 过滤)。 */ export declare function probeSourceState(record: ManagedArtifactRecord): SourceProbe;