core/

directory
v0.1.6 Latest Latest
Warning

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

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

README

WindShare core

This page outlines the core subtree's shape and boundaries. Package sources, docs/protocol.md, and docs/validation.md are the sources of truth for specifics.

github.com/windshare/windshare/core/... is WindShare's network-free package subtree inside the root production Go module. It owns protocol identities, sealed object formats, directory/authority verification, catalog and content contracts, session state, transfer orchestration, and shared capacity and observability primitives. Concrete transports (connectivity/, transport/) and native filesystem implementations (osfs/, adapters/filesystem/) live outside core and are composed by engine/ and hosts.

The pre-v1 package API makes no compatibility promise; a separate module would only be reconsidered when external consumers require an independent release lifecycle.

Package layout

Packages Responsibility
link/, urlhost/, networkendpoint/ Capability links, IDNA host normalization, relay/STUN/WebSocket endpoint normalization
nodedirectory/, serviceauthority/ Signed network directory, account ticket, and node descriptor verification (no I/O)
senderobject/, senderauth/ Sealed sender-object envelopes and canonical Ed25519 signature acceptance
catalog/ Directory generations/pages, bounded in-memory catalog store, path policy, source errors/omissions
content/, content/records/ File revisions, range leases, key tree, authenticated records, single-lock handle pool
framechannel/, session/ Transport-neutral channels, sendersession/receiversession runtimes, catalogflow/contentflow, peer path controls
transfer/ Receive contracts (receivecontract/, ordinaryoutput/), job lifecycle, BlockBroker, lanes/ scheduling, fault/
liveshare/ Composition of sender and receiver runtimes (PrepareSender, PrepareReceiver, ReceiveCapacity)
capacityledger/, observationstream/, diagnostics/, diagnosticerror/, downloadmetrics/ Scalar capacity ledgers, bounded observation queues, source diagnostics, download metrics
testvectors/, internal/ Go/TypeScript/Rust interoperability vectors (inventory.txt), HKDF, pinned Unicode 15, contract harnesses

Ownership and boundaries

  • Dependency gates: CI (_coreboundary) blocks non-core WindShare imports in production (allowing osfs only in test-graph deltas) and concrete networking or transport capabilities, and enforces isolation across session/ role packages (sendersession, receiversession, sessioncore, observation).
  • File sources: liveshare.PrepareSender consumes an injected FileSourceFactory (natively osfs.SelectedFileSource via adapters/filesystem). Acquisition reads selected-root metadata on demand without traversing descendants; catalog.SourceReference stays private to the adapter, and content.StableFile owns handle lifetimes.
  • Budgets: The application supplies process-wide sender budgets (content.HandlePool, catalog.BudgetAccount, contentflow.ProcessCacheBudget) and receiver capacity (liveshare.ReceiveCapacity); shares and receivers retain and release their own reservations.
  • Transfer: transfer owns receive jobs, BlockBroker, and output settlement contracts; transfer/lanes owns lane admission, block attempts, cancellation, and lane settlement. Brokers consume BlockFetcher, receiversession binds downloadmetrics.Metrics to both producers, and both layers normalize failures through transfer/fault.

Validate

From the repository root (see docs/validation.md for full make ci / make ci-parallel gates):

GOWORK=off go test ./core/...
make short-go
make vectors
make hygiene

testvectors/ 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 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.
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 suite-0x02 HKDF-SHA256 derivation.
Package keyderiv owns suite-0x02 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 seals and authenticates the suite-0x02 bootstrap descriptor.
Package senderobject seals and authenticates the suite-0x02 bootstrap descriptor.
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 handles the share descriptor and progressive LIST_CHILDREN.
Package catalogflow handles the share descriptor and progressive LIST_CHILDREN.
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.
turngrant
Package turngrant defines the session's network-independent credential issuance contract.
Package turngrant defines the session's network-independent credential issuance contract.
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.
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 sender capacity backpressure.
Package revisionwait owns receiver-side scheduling for authenticated sender capacity backpressure.
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