core/

directory
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0, AGPL-3.0

README

WindShare core

github.com/windshare/windshare/core/... is WindShare's network-free package subtree inside the single production Go module. It owns capability links, catalog and content contracts, authenticated session state, transfer orchestration, and root-confined filesystem adapters. The native application engine owns task lifecycles and composes core with signaling and concrete transports outside this package boundary.

An explicit dependency-graph gate prevents core packages from importing non-core WindShare packages or concrete networking and transport capabilities. The project may reconsider a separate core module after real external consumers exist and need an independent compatibility and release lifecycle; the current pre-v1 package API makes no compatibility promise for that possible split.

File sources and ownership

liveshare.PrepareSender consumes a FileSourceFactory. Each acquired source owns one share's selection and combines selected-root metadata, catalog.DirectoryScanner, content.RevisionSource, and Close. The native osfs.SelectedFileSource adapter accepts paths; other adapters can use provider object IDs. catalog.SourceReference stores bounded opaque private references; only the source adapter interprets them. Catalog names and protocol identities remain independent of host lookup. Native selections stay bound to their acquired root handles and cannot expand a selected file's authority to its siblings.

Acquisition reads selected-root metadata without traversing descendants or reading file content. Catalog and content work finish before the sender closes the source; each content.StableFile owns its own handle lifetime. Adapters must preserve optional content.RevisionContinuitySource semantics, including sources that prove stability only while a handle remains open. catalog.SourceError distinguishes missing objects, access denial, unsupported capability, and stale evidence while retaining the underlying error.

The application supplies the revision coordinator, process catalog account, and process content-cache budget. Shares retain their own quotas and release their own reservations; the native engine owns the aggregate budgets across tasks.

Transfer ownership

transfer owns receive jobs, block brokering, and output settlement. transfer/lanes owns lane admission, block attempts, cancellation, and lane settlement under one lifecycle. Brokers consume BlockFetcher; they cannot access lane state or locks. The receiver runtime binds availability and delivery metrics to their respective producers. Both layers share closed failure normalization in transfer/internal/failurestate.

Validate

From the repository root:

GOWORK=off go test ./core/...
make ci

testvectors/ is the single canonical Go↔TypeScript protocol-vector inventory and is included in the root module release archive.

Licensed under AGPL-3.0-or-later. See LICENSE and NOTICE.

Directories

Path Synopsis
Package capacityledger accounts for retained capacity without choosing admission, eviction, or scheduling policy.
Package capacityledger accounts for retained capacity without choosing admission, eviction, or scheduling policy.
Package catalog models an incrementally materialized hierarchy of share nodes.
Package catalog models an incrementally materialized hierarchy of share nodes.
Package connectionpath defines transport-neutral path lifecycle facts.
Package connectionpath defines transport-neutral path lifecycle facts.
Package content models file-local revisions, byte ranges, stable-source leases, and the v2 per-file key hierarchy.
Package content models file-local revisions, byte ranges, stable-source leases, and the v2 per-file key hierarchy.
records
Package records encodes and authenticates the transport-neutral file-revision and block-record objects used by the v2 content plane.
Package records encodes and authenticates the transport-neutral file-revision and block-record objects used by the v2 content plane.
revisioncapacity
Package revisioncapacity owns process-wide stable-revision and active-lease accounting.
Package revisioncapacity owns process-wide stable-revision and active-lease accounting.
Package diagnosticerror freezes bounded error evidence without retaining errors.
Package diagnosticerror freezes bounded error evidence without retaining errors.
Package diagnostics carries source-owned execution evidence independently of application state.
Package diagnostics carries source-owned execution evidence independently of application state.
Package downloadmetrics accounts for unique authenticated content over one download.
Package downloadmetrics accounts for unique authenticated content over one download.
Package framechannel defines the transport-neutral byte channel consumed by suite-02 protocol sessions.
Package framechannel defines the transport-neutral byte channel consumed by suite-02 protocol sessions.
internal
keyderiv
Package keyderiv owns version-separated HKDF-SHA256 derivation.
Package keyderiv owns version-separated HKDF-SHA256 derivation.
testvec
Package testvec reads the canonical cross-runtime fixtures in core/testvectors.
Package testvec reads the canonical cross-runtime fixtures in core/testvectors.
unicode15
Package unicode15 provides the frozen Unicode primitives used by versioned protocol identities.
Package unicode15 provides the frozen Unicode primitives used by versioned protocol identities.
Package link constructs and parses sender-authenticated capability URLs:
Package link constructs and parses sender-authenticated capability URLs:
Package liveshare composes network-free suite-02 catalog, content, and session runtimes.
Package liveshare composes network-free suite-02 catalog, content, and session runtimes.
Package nodedirectory verifies deployment configuration without performing I/O.
Package nodedirectory verifies deployment configuration without performing I/O.
Package observationstream provides a bounded, producer-owned observation queue without executing consumer code.
Package observationstream provides a bounded, producer-owned observation queue without executing consumer code.
Package senderauth defines the sender-signature acceptance policy shared by native and browser receivers, independently of their cryptographic backends.
Package senderauth defines the sender-signature acceptance policy shared by native and browser receivers, independently of their cryptographic backends.
Package senderobject implements the transport-neutral suite-0x02 object envelope.
Package senderobject implements the transport-neutral suite-0x02 object envelope.
Package serviceauthority verifies account authority records without I/O.
Package serviceauthority verifies account authority records without I/O.
Package session defines shared session errors, limits and lane identities.
Package session defines shared session errors, limits and lane identities.
catalogflow
Package catalogflow provides the progressive LIST_CHILDREN service and client above an authenticated protocol session.
Package catalogflow provides the progressive LIST_CHILDREN service and client above an authenticated protocol session.
channeltest
Package channeltest defines the transport-neutral FrameChannel behavior matrix.
Package channeltest defines the transport-neutral FrameChannel behavior matrix.
contentflow
Package contentflow implements the v2 revision and file-local block operation semantics above protocolsession's authenticated opaque-message boundary.
Package contentflow implements the v2 revision and file-local block operation semantics above protocolsession's authenticated opaque-message boundary.
internal/admissiongate
Package admissiongate joins short-lived work before its owner's resources are released.
Package admissiongate joins short-lived work before its owner's resources are released.
internal/sessioncore
Package sessioncore owns encrypted lanes, exact-generation operation routing, and role-neutral session termination.
Package sessioncore owns encrypted lanes, exact-generation operation routing, and role-neutral session termination.
observation
Package sessionobs defines transport-neutral session observations and bounded diagnostic snapshots.
Package sessionobs defines transport-neutral session observations and bounded diagnostic snapshots.
peerslot
Package peerslot owns bounded negotiation identities for one receiver session.
Package peerslot owns bounded negotiation identities for one receiver session.
protocolsession
Package protocolsession implements the authenticated end-to-end session primitives shared by protocol roles.
Package protocolsession implements the authenticated end-to-end session primitives shared by protocol roles.
receivercontinuation
Package receivercontinuation retains transfer dependencies across authenticated protocol generations without extending the lifetime of any session authority.
Package receivercontinuation retains transfer dependencies across authenticated protocol generations without extending the lifetime of any session authority.
receiversession
Package receiversession owns download-side catalog, revision, block and peer operations.
Package receiversession owns download-side catalog, revision, block and peer operations.
requestlane
Package requestlane estimates control-response completion independently of content throughput, transport providers, and operation delivery authority.
Package requestlane estimates control-response completion independently of content throughput, transport providers, and operation delivery authority.
revisionaccess
Package revisionaccess keeps a receiver's immutable file identity independent of the expiring wire capabilities used to read it.
Package revisionaccess keeps a receiver's immutable file identity independent of the expiring wire capabilities used to read it.
sendersession
Package sendersession owns sharing-side session admission, catalog and content services, and orderly shutdown.
Package sendersession owns sharing-side session admission, catalog and content services, and orderly shutdown.
turncontrol
Package turncontrol defines session-authenticated TURN delegation messages.
Package turncontrol defines session-authenticated TURN delegation messages.
Package transfer coordinates receiver-scoped file-local block demand across authenticated protocol lanes.
Package transfer coordinates receiver-scoped file-local block demand across authenticated protocol lanes.
catalogwalk
Package catalogwalk owns streaming validation of authenticated terminal catalog generations.
Package catalogwalk owns streaming validation of authenticated terminal catalog generations.
fault
Package fault defines the transport-neutral failure values consumed by transfer settlement policy.
Package fault defines the transport-neutral failure values consumed by transfer settlement policy.
internal/failurestate
Package failurestate admits collaborator failures into closed policy values shared by transfer orchestration and lane scheduling.
Package failurestate admits collaborator failures into closed policy values shared by transfer orchestration and lane scheduling.
lanes
Package lanes owns authenticated block scheduling and the complete lifetime of admitted attempts.
Package lanes owns authenticated block scheduling and the complete lifetime of admitted attempts.
lanescheduling
Package lanescheduling implements the Go receiver's local delivery policy.
Package lanescheduling implements the Go receiver's local delivery policy.
ordinaryoutput
Package ordinaryoutput owns construction-time policy for ordinary native receive output.
Package ordinaryoutput owns construction-time policy for ordinary native receive output.
receivecontract
Package receivecontract defines selections and output promises for the Go transfer engine.
Package receivecontract defines selections and output promises for the Go transfer engine.
revisionwait
Package revisionwait owns receiver-side scheduling for authenticated revision capacity pressure.
Package revisionwait owns receiver-side scheduling for authenticated revision capacity pressure.
Package urlhost normalizes URL domain names without acquiring network capabilities.
Package urlhost normalizes URL domain names without acquiring network capabilities.

Jump to

Keyboard shortcuts

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