Structs§
- Confidence
Score - Compatibility confidence score (0..=100).
- Extension
Trust Tracker - Mutable trust lifecycle tracker for a single extension.
- Install
Time Risk Report - Composite install-time risk classification report that synthesizes signals from both the compatibility preflight and the security scanner into a single deterministic verdict.
- Preflight
Analyzer - Analyzes an extension for compatibility before loading.
- Preflight
Finding - A single finding from preflight analysis.
- Preflight
Report - Complete preflight analysis report for an extension.
- Preflight
Summary - Counts by severity.
- Preflight
Summary Brief - Abbreviated preflight summary for embedding in the composite report.
- Security
Evidence Ledger Entry - A single evidence entry for the security ledger. Designed for JSONL serialization so it can be correlated with runtime hostcall telemetry.
- Security
Finding - A single security finding from static analysis.
- Security
Scan Report - Aggregate risk classification for an extension.
- Security
Scanner - Scans extension source for security-sensitive patterns and produces a deterministic risk classification report.
- Security
Summary Brief - Abbreviated security summary for embedding in the composite report.
- Security
Tier Counts - Counts by risk tier.
- Trust
Transition Event - A recorded trust state transition event for the audit trail.
Enums§
- Extension
Trust State - Extension trust lifecycle states.
- Finding
Category - Category of a preflight finding.
- Finding
Severity - Severity level for a preflight finding.
- Install
Recommendation - Install-time recommendation.
- Module
Support - How well the Pi JS runtime supports a given module.
- Preflight
Verdict - Overall verdict from preflight analysis.
- Risk
Tier - Risk tier for security findings. Ordered from most to least severe so
the
Ordderive gives the correct comparison direction. - Security
Rule Id - Stable rule identifiers. Each variant is a versioned detection rule whose semantics are frozen once shipped. Add new variants; never rename or redefine existing ones.
- Trust
Transition Error - Errors that can occur during trust state transitions.
- Trust
Transition Kind - Direction of a trust state transition.
Constants§
- INSTALL_
TIME_ RISK_ SCHEMA - Schema version for the install-time risk classification report.
- PREFLIGHT_
SCHEMA - SECURITY_
EVIDENCE_ LEDGER_ SCHEMA - Schema version for the security evidence ledger.
- SECURITY_
RULEBOOK_ VERSION - Current rulebook version. Bump when rules are added or changed.
- SECURITY_
SCAN_ SCHEMA - Schema version for security scan reports. Bump minor on new rules, major on breaking structural changes.
- TRUST_
LIFECYCLE_ SCHEMA - Schema version for trust lifecycle transition events.
Functions§
- classify_
extension_ path - Run both the preflight analyzer and security scanner on extension files at a given path and produce a composite install-time risk report.
- classify_
extension_ source - Convenience function: run both the preflight analyzer and security scanner on raw source text and produce a composite install-time risk report.
- initial_
trust_ state - Determine the initial trust state for a newly installed extension based on its install-time risk report.
- is_
hostcall_ allowed_ for_ trust - Check whether a hostcall category is allowed for the given trust state.
- known_
module_ support - Returns the known support level for a module specifier, or
Noneif the module is not in our registry (likely a relative import or external npm). - module_
remediation - Remediation suggestion for a module at a given support level.
- security_
evidence_ ledger_ jsonl - Produce a JSONL evidence ledger from a security scan report.