Skip to main content

heddle_object_model/object/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2//! Core object primitives extracted from the monolith.
3
4#[macro_use]
5mod versioned_blob;
6
7mod action_id;
8mod action_operation;
9mod action_struct;
10mod annotated_tag;
11mod audience_tier;
12mod blob;
13pub mod check_evidence;
14pub mod collaboration;
15mod diff;
16mod discussion;
17mod entry_redactions;
18mod entry_visibility;
19mod facet_kind;
20mod frontier_ref;
21mod git_note;
22mod hash;
23mod identifiers;
24mod key_binding;
25pub mod manifest;
26mod operation_id;
27pub mod original_boundary_acceptance;
28mod redaction;
29mod risk_signal;
30mod semantic_change;
31mod semantic_edges;
32mod semantic_graph_query;
33mod semantic_index;
34mod semantic_reverse_deps;
35mod session;
36mod source;
37pub mod source_target;
38pub mod source_target_map;
39mod spool_id;
40mod staleness_core;
41mod state_attachment;
42mod state_attribution;
43mod state_context;
44mod state_core;
45mod state_provenance;
46mod state_review;
47mod state_visibility;
48mod structured_conflict;
49#[cfg(test)]
50mod structured_conflict_tests;
51mod suggestion_core;
52pub mod thread_authority_admission;
53pub mod thread_genesis_admission;
54mod timeline;
55mod tree;
56mod tree_canonical;
57mod tree_diff;
58mod tree_path;
59mod tree_source;
60mod tree_stream;
61pub mod tree_walk;
62mod visibility_tier;
63
64pub use action_id::ActionId;
65pub use action_operation::Operation;
66pub use action_struct::Action;
67pub use annotated_tag::{AnnotatedTag, AnnotatedTagError, AnnotatedTagMarker};
68pub use audience_tier::{AudienceParseError, AudienceTier, visible};
69pub use blob::Blob;
70pub use collaboration::*;
71pub use diff::{DiffKind, FileChange, FileChangeSet};
72pub use discussion::{
73    Discussion, DiscussionError, DiscussionId, DiscussionReference, DiscussionReferenceKind,
74    DiscussionResolution, DiscussionTurn, DiscussionsBlob, generate_discussion_id,
75};
76pub use entry_redactions::EntryRedactions;
77pub use entry_visibility::{EntryVisibility, EntryVisibilityEntry, EntryVisibilityError};
78pub use facet_kind::{FacetKind, SourceHistoryLaws};
79pub use frontier_ref::{
80    GIT_SYNTHETIC_FRONTIER_PREFIX, SYNTHETIC_FRONTIER_PREFIX, SyntheticFrontierName,
81    SyntheticFrontierNameError,
82};
83pub use git_note::{HeddleNote, NoteAttribution, OmittedBreakdown, SignalCounts};
84pub use hash::{ChangeId, ChangeIdParseError, ContentHash, StateId, StateIdParseError};
85pub use identifiers::{
86    MarkerName, RESERVED_REF_SEGMENT, ReservedRefNameError, Scope, ThreadName,
87    is_reserved_heddle_namespace,
88};
89pub use key_binding::{
90    KEY_BINDING_REGISTRY_SIGNING_PAYLOAD_VERSION_TAG, KEY_BINDING_SIGNING_PAYLOAD_VERSION_TAG,
91    KeyBinding, KeyBindingError, KeyBindingRegistry, KeyRole,
92};
93pub use manifest::{
94    BuiltManifest, FsckFinding, FsckOptions, FsckReport, FsckRule, ManifestBinding,
95    ManifestBuildError, ManifestFacet, ManifestKey, ManifestNode, ManifestNodeSource,
96    ManifestObject, ManifestObjectKind, ManifestOwnerKind, PackRangeAudit, PackRangeClaim,
97    PackRecord, build_manifest, expand_manifest, fsck_manifest, fsck_manifest_with,
98    fsck_pack_range,
99};
100pub use operation_id::{OperationId, OperationIdParseError};
101pub use redaction::{
102    PURGE_SIGNING_PAYLOAD_VERSION_TAG, PurgeEvidence, REDACTION_SIGNING_PAYLOAD_VERSION_TAG,
103    Redaction, RedactionError, RedactionsBlob,
104};
105pub use risk_signal::{
106    MAX_REASON_LEN, ProducerId, RiskSignal, RiskSignalBlob, RiskSignalError, RiskSignalKind,
107    SignalAnchor,
108};
109pub use semantic_change::{ChangeImportance, ModificationKind, SemanticChange};
110pub use semantic_edges::{BindingDelta, FileBindingDelta, ResolvedSemanticEdge, SemanticEdgeKind};
111pub use semantic_graph_query::{
112    SemanticGraphQueryKind, SemanticGraphQueryRequest, SemanticGraphQueryResponse, SemanticGraphRef,
113};
114pub use semantic_index::{
115    ByteSpan, ImportBinding, ImportEntry, ImportKindTag, OccurrenceEntry, OccurrenceRole,
116    ScopeEntry, ScopeKind, SemanticEntryKind, SemanticFileFacts, SemanticFileNode,
117    SemanticIndexError, SemanticIndexRoot, SemanticTreeEntry, SemanticTreeNode, SymbolEntry,
118    SymbolKindTag, SymbolNamespace, compute_dir_semantic_digest, compute_file_scaffold_hash,
119    compute_file_semantic_digest, compute_symbol_semantic_hash,
120};
121pub use semantic_reverse_deps::ReverseDependencyIndex;
122pub use session::{Session, SessionSegment, generate_session_id};
123#[cfg(feature = "async-source")]
124pub use source::AsyncObjectSource;
125pub use source::ObjectSource;
126pub use spool_id::{SpoolId, SpoolIdParseError};
127pub use staleness_core::{
128    StalenessStatus, annotation_status_for_source,
129    annotation_status_for_source_with_symbol_resolver, extract_line_range, resolve_current_symbol,
130};
131pub use state_attachment::{
132    StateAttachment, StateAttachmentBody, StateAttachmentId, StateAttachmentKind,
133};
134pub use state_attribution::{Agent, Attribution, Principal};
135pub use state_context::{
136    Annotation, AnnotationAnchorStatus, AnnotationKind, AnnotationRevision, AnnotationScope,
137    AnnotationStatus, ContextBlob, ContextError, ContextTarget,
138};
139pub use state_core::{
140    ChangeLineage, ChangeLineageKind, SignatureStatus, State, StateSignature, Status, Verification,
141    parse_commit_extension_headers,
142};
143pub use state_provenance::{FileProvenance, LineSpan, Origin, OriginSet, ProvenanceError};
144pub use state_review::{
145    ReviewKind, ReviewScope, ReviewSignature, ReviewSignatureError, ReviewSignaturesBlob,
146    SymbolAnchor, signing_payload,
147};
148pub use state_visibility::{
149    STATE_VISIBILITY_SIGNING_PAYLOAD_VERSION_TAG, StateVisibility, StateVisibilityBlob,
150    StateVisibilityError,
151};
152pub use structured_conflict::{
153    ConflictError, ConflictRange, ConflictRegion, ConflictSide, StructuredConflict,
154};
155pub use suggestion_core::{
156    ContextSuggestion, ContextSuggestionTier, HIGH_SUGGESTION_THRESHOLD,
157    MAJOR_REWRITE_THRESHOLD_PCT, MEDIUM_SUGGESTION_THRESHOLD, SUGGESTION_WINDOW, SuggestionInputs,
158    SuggestionSignal, score_suggestions,
159};
160pub use timeline::{
161    BranchCreatedV1, CursorMovedV1, NativeToolCallRefV1, TIMELINE_OPERATION_SCHEMA_VERSION,
162    TimelineBranchId, TimelineBranchReason, TimelineCodecError, TimelineCursorMoveReason,
163    TimelineLabel, TimelineOperationBodyV1, TimelineOperationEnvelope, TimelineOperationId,
164    TimelineOperationIdParseError, TimelineOperationKind, TimelineStepId, TimelineToolCallStatus,
165    TimelineToolPayloadMetadata, ToolCallFinishedV1, ToolCallStartedV1,
166};
167pub use tree::{
168    EntryType, FileMode, PartialTree, PartialTreeLeaf, Tree, TreeDecodeError, TreeEntry,
169    TreeEntryTarget, TreeError, TreeScheme, validate_name as validate_tree_entry_name,
170};
171pub use tree_canonical::{
172    TREE_BLOCK_ENCODING_VERSION, TREE_BLOCK_MIN_ENTRIES, TREE_CANONICAL_MAGIC,
173    TREE_DELTA_ANCHOR_INTERVAL, TREE_DELTA_ENCODING_VERSION, TREE_DELTA_HEADER_LEN,
174    TREE_DELTA_MAGIC, TREE_DELTA_MAX_OPS, TREE_ENCODING_VERSION, TREE_HEADER_LEN,
175    TREE_LEAN_ENCODING_VERSION, TREE_LEAN_MAGIC, TREE_REDACTED_ENCODING_VERSION,
176    TREE_REDACTED_HEADER_LEN, TREE_REDACTED_MAGIC, TREE_SALTED_ENCODING_VERSION, TREE_SALTED_MAGIC,
177    TreeDeltaHeader, TreeDeltaOp, TreeHeader, apply_tree_delta, decode_header, decode_lean_prefix,
178    decode_redacted_projection, decode_salted_v4, decode_tree_delta, decode_tree_delta_header,
179    decode_tree_delta_header_prefix, decode_tree_delta_ops, decode_tree_delta_ops_prefix,
180    encode_lean_entry, encode_redacted_projection, encode_tree_delta, is_canonical_tree,
181    is_delta_tree, is_lean_tree, is_redacted_tree, is_salted_tree, is_streamable_tree, tree_delta,
182};
183#[cfg(feature = "async-source")]
184pub use tree_diff::diff_trees_visit_async;
185pub use tree_diff::{diff_trees, diff_trees_visit};
186#[cfg(feature = "async-source")]
187pub use tree_path::resolve_tree_path_async;
188pub use tree_path::{
189    LeafPolicy, ResolvedTreeTarget, TreePathResolveError, resolve_tree_path, split_path,
190};
191pub use tree_source::{
192    BytesTreeSource, FileTreeSource, OpenedTreeBody, TreeBodyIntegrity, TreeByteSource,
193};
194pub use tree_stream::{
195    TreeEntryReader, TreePage, TreePageLimits, TreeResumeCursor, TreeStreamError,
196};
197pub use tree_walk::{TreeIntegrityEvent, walk_tree_integrity};
198pub use visibility_tier::VisibilityTier;
199
200pub mod thread_replication;