windowscallback

package
v1.48.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package windowscallback owns the retained Windows callback contract. It does not install a generation or qualify a route for notification delivery.

Index

Constants

View Source
const (
	ReaderVersion   uint16 = 1
	MaxEnvelope            = 64 * 1024
	VendorName             = "OpenAI.Codex"
	VendorPublisher        = "CN=50BDFD77-8903-4850-9FFE-6E8522F64D5B"
	VendorFamily           = "OpenAI.Codex_2p2nqsd0c76g0"
)

Variables

View Source
var ErrEnvelope = errors.New("invalid WinEnvelope1")
View Source
var ErrUnavailable = errors.New("windows callback installed qualification unavailable")

Functions

func ActivationArgument

func ActivationArgument(reference string) (string, error)

func EncodeRecord

func EncodeRecord(r Record) ([]byte, error)

func EncodeSnapshot

func EncodeSnapshot(s Snapshot) ([]byte, error)

func ThreadURI

func ThreadURI(id string) (string, error)

ThreadURI escapes UTF-8 bytes, including percent, slash, query and fragment. Existing percent sequences are opaque input, never decoded or trusted.

func TrustedAsset

func TrustedAsset() ([]byte, string, error)

TrustedAsset is a defensive copy of bytes generated by the release build. No caller-supplied hash, PATH lookup or runtime download can supply provenance.

Types

type Binding

type Binding struct{ SnapshotPath, SHA256 string }

type NativePort

type NativePort interface {
	CheckReadiness(context.Context, Binding, uint64) error
}

type Outcome

type Outcome string
const (
	Unavailable Outcome = "unavailable"
	Declined    Outcome = "declined"
	Accepted    Outcome = "accepted"
	Unknown     Outcome = "unknown"
)

type Port

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

Port is intentionally inert until checkpoint B installs and qualifies the actual custody/readiness/submission contract. Even present release bytes do not enable this adapter. Construction and calls perform no native probes.

func NewPort

func NewPort() Port

NewPort captures release bytes without inspecting them or any installed state. The Windows session retains this value as the future explicit setup seam.

func (Port) CheckReadiness

func (Port) CheckReadiness(ctx context.Context, _ Binding, _ uint64) error

func (Port) TrustedAsset

func (p Port) TrustedAsset() ([]byte, string, error)

TrustedAsset validates the captured immutable bytes only when explicit setup asks for extraction. Construction and CheckReadiness never call this method.

type Record

type Record struct {
	Generation, Reference, Provider, ThreadID, SnapshotSHA256 string
}

func DecodeRecord

func DecodeRecord(b []byte) (Record, error)

func (Record) BoundTo

func (r Record) BoundTo(s Snapshot, digest string) error

func (Record) Validate

func (r Record) Validate() error

type Result

type Result struct {
	Outcome         Outcome
	EffectEntered   bool
	TargetConfirmed bool
}

Result does not expose HRESULT or claim focus/render or an exact FullName lock.

type Snapshot

type Snapshot struct {
	Generation, CanonicalRoot, OwnerSID, HelperSHA256, AUMID, CLSID string
	VendorName, Publisher, Family, FullName                         string
}

Snapshot is an immutable generation binding, not proof of installed readiness.

func DecodeSnapshot

func DecodeSnapshot(b []byte) (Snapshot, error)

func (Snapshot) Validate

func (s Snapshot) Validate() error

Jump to

Keyboard shortcuts

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