Skip to main content

agentstatedeveloper_core/
lib.rs

1//! agentstatedeveloper-core — Core traits, schema, and ASG-backed
2//! implementations for AgentStateDeveloper.
3//!
4//! This crate is language-agnostic. Language adapters live in sibling
5//! crates (e.g., `agentstatedeveloper-python`).
6
7pub mod adapter;
8pub mod audit;
9pub mod brief;
10pub mod calibration;
11pub mod candidates;
12pub mod community;
13pub mod conclusions_export;
14pub mod context;
15pub mod cross_service;
16pub mod dataflow;
17pub mod doc_adapters;
18pub mod edge_confidence;
19pub mod effects;
20pub mod engine;
21pub mod error;
22pub mod feedback;
23pub mod gc;
24pub mod help;
25pub mod index;
26pub mod index_pipeline;
27pub mod ledger;
28mod ledger_dupes;
29pub mod ledger_integrity;
30pub mod map;
31pub mod overview;
32pub mod paths;
33pub mod policy;
34pub mod prepare_change;
35pub mod rebind;
36pub mod recipes;
37pub mod registry;
38pub mod repair;
39pub mod schema;
40pub mod scorecard;
41pub mod scratch;
42pub mod search_fts;
43pub mod ser_helpers;
44pub mod sidecar;
45pub mod sidecar_config;
46mod stale;
47mod subtree;
48pub mod symbol;
49pub mod test_summary;
50pub mod thinking;
51pub mod transitive;
52pub mod trust;
53pub mod workflow;
54
55pub use adapter::{
56    CallEdge, DynamicDispatchHint, LanguageAdapter, ParsedSymbol, UnresolvedCall, WorkspaceSymbols,
57};
58pub use audit::{
59    AuditEvent, AuditSink, HASH_PREFIX, NullSink, emit_audit, event_types, read_jsonl,
60};
61pub use candidates::{
62    FeedbackImpact, FeedbackMetrics, FeedbackState, RecoverySuggestion, UncertaintyReason,
63    UncertaintyReport, apply_feedback_adjustments, apply_file_scope_feedback, build_feedback_state,
64    build_feedback_state_from_entries, compute_uncertainty, confidence_reason, confidence_scores,
65    detect_ambiguous_tokens, detect_confidence_warnings, detect_possible_misses,
66    explain_feedback_impacts, explain_match, find_candidates, glob_match, in_memory_score,
67    in_memory_score_with_text, in_memory_scored_symbols, kind_str, load_exclude_sets,
68    load_scope_aliases, matches_any_path_glob, parse_query, query_tokens, resolve_exclude_set,
69    resolve_scope, result_bucket, suggest_better_queries, suggest_scoped_queries,
70};
71pub use community::detect_communities;
72pub use context::assemble_symbol_context;
73pub use cross_service::{
74    CrossServiceEdge, DetectedEndpoint, Direction, EndpointRef, ServiceEndpoint, ServiceManifest,
75    Transport, contract_hash, endpoints_from_tree, federated_edges, http_contract, match_edges,
76    normalize_repo_id, pubsub_contract, resolve_repo_id,
77};
78pub use dataflow::{
79    DataFlowEdge, DataFlowKind, DetectedDataFlow, edges_from_tree, parse_params, resolve_edge,
80};
81pub use doc_adapters::{adapt_document, is_doc_file};
82pub use edge_confidence::EdgeEvidence;
83pub use effects::{AsgEffectStore, EffectStore, list_all_effect_decls};
84pub use engine::{CacheWarmSummary, Engine};
85pub use error::{AsdError, Result};
86pub use feedback::{
87    AsgFeedbackStore, DEFAULT_FEEDBACK_HALF_LIFE_DAYS, FeedbackStore, decay_factor, decay_for_entry,
88};
89pub use index::{AsgIndexStore, IndexStore};
90pub use index_pipeline::{CollectResult, IndexSummary, collect_source_files, run_index};
91pub use ledger::{
92    ApprovalOutcome, AsgLedgerStore, LedgerStore, RatifyOps, ReviewOutcome, detect_orphaned_entries,
93};
94pub use ledger_integrity::{
95    LedgerCounts, LedgerRestoreReport, ledger_counts, missing_ledger_entries,
96    restore_missing_ledger_entries,
97};
98pub use overview::{architecture_overview, build_id_map, dead_code_report, endpoints_report};
99pub use policy::{
100    Decision, FilePolicyGate, PermissivePolicyGate, PolicyFile, PolicyGate, PolicyRule, Situation,
101    actions,
102};
103pub use prepare_change::{
104    CLIFF_RATIO_THRESHOLD, CandidateAggregates, FILE_SCORE_FLOOR_RATIO, FileScoreTuple,
105    aggregate_candidate_data, cliff_cutoff_index, dirty_files_for_change, explain_conflict_risk,
106    file_score_floor, finalize_file_scores, propagate_caller_invariants,
107};
108pub use rebind::{RebindOutcome, rebind_ledger};
109pub use repair::{
110    IssueSeverity, RepairIssue, RepairReport, drop_orphaned_edge_refs, repair_asg,
111    repair_asg_with_cache, scan_asg, scan_sidecar,
112};
113pub use schema::{
114    ASD_PATH_PREFIX, ASD_SCHEMA_VERSION, Author, AuthorKind, ConclusionClass, Effect,
115    EffectCategory, EffectDecl, Evidence, FeedbackEntry, FeedbackVerdict, LedgerEntry, LedgerKind,
116    Mismatch, Position, Rebind, RoleTag, RuntimeEvidence, ScratchEntry, ScratchStatus, Symbol,
117    SymbolKind, TransitiveEffect, Verification, VerificationSource, VerificationStatus,
118};
119pub use scratch::{AsgScratchStore, CleanFilter, ScratchFilter, ScratchStore};
120pub use search_fts::{
121    AGENT_DEFAULT_BUDGET, AnnotatedOwner, CoveringTest, FileRecency, FtsFilters, FtsHit,
122    OwnerSignalSource, OwnershipSignal, ResolvedSymbol, SearchFtsDb, SymbolMeta, SymbolTier,
123    classify_file_role, classify_layer, classify_layer_sym, derive_cold_hints,
124    discover_symbol_ownership, estimate_tokens, extract_summary, fetch_all_test_file_paths,
125    find_covering_tests, find_indexed_test_files, gather_recency, git_dirty_files, hybrid_boost,
126    intent_focus, intent_layer_order, is_stopword, load_layer_overrides, parse_intent,
127    propose_test_path, propose_test_stub, symbol_tier, test_files_for_source, trim_for_agent,
128};
129pub use search_fts::{DocHit, DocKind, SearchDoc, SearchDocsDb};
130pub use search_fts::{
131    SOFT_STALE_THRESHOLD_SECS, StaleSeverity, StaleWarning, compute_index_consistency,
132    effect_detail_reason, format_age, stale_warning, stale_warning_classified,
133};
134pub use ser_helpers::{drop_empty_recursive, drop_empty_top_level};
135pub use sidecar::{
136    HydrateSummary, SidecarState, SyncSummary, hydrate_from_dir, hydrate_from_dir_with_cache,
137    mark_fresh_reset, outdated_hooks, prune_sidecar, sidecar_lifecycle_state, sync_to_dir,
138};
139pub use symbol::{canonical_symbol_id, symbol_fingerprint};
140pub use transitive::{declared_effect_blast_radius, propagate_transitive};
141pub use trust::{DataQuality, TrustScore, TrustSignals, compute_trust_score};
142pub use workflow::{
143    EvidenceQuality, WorkflowSummary, append_workflow_session, detect_workflow,
144    score_evidence_quality,
145};