Documentation
¶
Overview ¶
Package ingestion defines snapshot contracts, pure identity rules and HTTP clients. It contains no collector filesystem or server persistence behavior.
Index ¶
Constants ¶
const MaxRequestBytes = 64 << 20
const ProtocolVersion = 4
Variables ¶
This section is empty.
Functions ¶
func ComparisonPolicy ¶
ComparisonPolicy identifies a stream independently of resolved commit tips.
func ContentIdentity ¶
ContentIdentity preserves the established observation identity algorithm. Unknown full content identities remain independent unless all scopes are empty.
Types ¶
type AgentSession ¶
type AgentSession struct {
Harness string `json:"harness"`
ID string `json:"id"`
Name string `json:"name,omitempty"`
}
AgentSession identifies the session observing a capture, never its authorship.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ObservationCurrent ¶
ObservationCurrent checks the durable stream head before suppressing a sync. Another collector can supersede an acknowledged observation in this checkout.
type Comparison ¶
type Comparison struct {
Kind string `json:"kind"`
BaseRef string `json:"baseRef"`
BaseCommit string `json:"baseCommit,omitempty"`
MergeBase string `json:"mergeBase,omitempty"`
}
Comparison records the interpretation and resolved Git baseline of a capture. Kind is working-tree or branch; absent comparisons retain legacy HEAD semantics.
type Health ¶
type Health struct {
IngestionEnabled bool `json:"ingestionEnabled"`
QueuedIngestion bool `json:"queuedIngestion"`
StateID string `json:"stateId"`
ProtocolVersion int `json:"protocolVersion"`
}
Health identifies the durable destination, including replacement databases.
type Metadata ¶
type Metadata struct {
SourceID string `json:"sourceId"`
Hostname string `json:"hostname"`
RunID string `json:"runId"`
Agent string `json:"agent"`
Trigger string `json:"trigger"`
RepositoryKey string `json:"repositoryKey"`
RepositoryName string `json:"repositoryName"`
RemoteURL string `json:"remoteUrl"`
CheckoutKey string `json:"checkoutKey"`
Root string `json:"root"`
WorktreeName string `json:"worktreeName"`
LinkedWorktree *bool `json:"linkedWorktree,omitempty"`
Branch string `json:"branch"`
BranchID string `json:"branchId,omitempty"`
Head *string `json:"head"`
CollectedAt int64 `json:"collectedAt"`
CollectorVersion string `json:"collectorVersion"`
Comparison *Comparison `json:"comparison,omitempty"`
AgentSession *AgentSession `json:"agentSession,omitempty"`
TriggerRoot string `json:"triggerRoot,omitempty"`
}
Metadata records facts at collection time. Paths and hostnames are labels, not globally unique identities. Account identity comes from the server.
type Request ¶
type Request struct {
ProtocolVersion int `json:"protocolVersion"`
SubmissionID string `json:"submissionId"`
ContentHash string `json:"contentHash,omitempty"`
Metadata Metadata `json:"metadata"`
Scopes []Scope `json:"scopes"`
}
Request is one immutable observation. Replays retain the submission ID; fresh observations may reuse an existing review when ContentHash matches.