Skip to content

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs

Comment 1, line 1

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:1

//! Detect pi and select its version: read the first line within limits, verify the

Comment 2, line 2

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:2

//! type=session header, then select an implementation through [super::versions].

Comment 3, line 3

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:3

//!

Comment 4, line 4

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:4

//! Rules: architecture.md#unknown-version, V30.

Comment 5, line 5

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:5

//! - A non-JSON/non-session first line is UnknownFormat; reject it rather than

Comment 6, line 6

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:6

//! guessing how to parse arbitrary files.

Comment 7, line 7

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:7

//! - Registered version 3 uses KnownVersion; unregistered integers such as 4

Comment 8, line 8

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:8

//! use LatestFallback with compatibility metadata.

Comment 9, line 9

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:9

//! - Source-verified incompatible versions 1/2 and missing versions from the

Comment 10, line 10

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:10

//! legacy v1/v2 format use UnsupportedVersion without fallback.

Comment 11, line 21

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:21

/// Detect a pi session file and select through the registry.

Comment 12, line 44

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:44

// Agent/input type is verified. Noninteger and absent versions both become None;

Comment 13, line 45

desktop/src-tauri/crates/core/src/adapters/pi/detect.rs:45

// registry dispatch rejects the verified incompatible legacy format that lacks version.