platform

package
v0.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package platform verifies the locked platform probe contract without selecting, downloading, or implementing a PDF engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyPlatformToolchain

func VerifyPlatformToolchain(lockPath string, runnerID RunnerID) error

VerifyPlatformToolchain validates a selected runner against a strict lock. Missing or unavailable host evidence fails closed without downloading it.

Types

type ProbeResult

type ProbeResult struct {
	RunnerID       RunnerID
	ExitCode       int
	Stdout         string
	Stderr         string
	SDKVersion     string
	RuntimeVersion string
	SourceDigest   string
}

ProbeResult records process evidence without exposing mutable byte slices.

func Bootstrap

func Bootstrap(ctx context.Context, lockPath, contractsPath string, runnerID RunnerID, workingDirectory string) (ProbeResult, error)

Bootstrap verifies host evidence and the lock-bound probe mapping before it executes one package-local probe with download paths disabled.

type RunnerContract

type RunnerContract struct {
	Command          []string `json:"command"`
	ExpectedExitCode int      `json:"expectedExitCode"`
	OwnedSourcePaths []string `json:"ownedSourcePaths"`
	OwnedProbePaths  []string `json:"ownedProbePaths"`
}

RunnerContract describes one reviewed probe command. Slices returned by Runner are copies, so callers cannot mutate the loaded contract.

type RunnerContracts

type RunnerContracts struct {
	// contains filtered or unexported fields
}

RunnerContracts is an immutable set of validated runner contracts.

func LoadRunnerContracts

func LoadRunnerContracts(contractsPath string) (RunnerContracts, error)

LoadRunnerContracts strictly decodes and validates no-download probe commands. Only package-local Go tests are executable probe commands in v1.

func (RunnerContracts) Runner

func (contracts RunnerContracts) Runner(id RunnerID) (RunnerContract, bool)

Runner returns a defensive copy of a validated runner contract.

type RunnerID

type RunnerID string

RunnerID is one locked native or installed-browser probe identity.

const (
	RunnerWindowsWebView2 RunnerID = "windows-webview2/v2"
	RunnerDarwinWKWebView RunnerID = "darwin-wkwebview/v2"
	RunnerLinuxWebKitGTK  RunnerID = "linux-webkitgtk/v2"
	RunnerChromiumCDP     RunnerID = "chromium-cdp/v2"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL