@harness-engineering/core 0.21.1 → 0.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Result, SessionSectionName, SessionEntry, SessionSections, WorkflowStep, WorkflowStepResult, Workflow, WorkflowResult, SkillLifecycleHooks, SkillContext, SkillResult, TurnContext, CICheckName, CIFailOnSeverity, CICheckReport, Roadmap, FeatureStatus, RoadmapFeature, ExternalTicket, ExternalTicketState, TrackerSyncConfig, SyncResult, ModelPricing, UsageRecord, DailyUsage, SessionUsage } from '@harness-engineering/types';
1
+ import { Result, SessionSectionName, SessionEntry, SessionSections, WorkflowStep, WorkflowStepResult, Workflow, WorkflowResult, SkillLifecycleHooks, SkillContext, SkillResult, TurnContext, CICheckName, CIFailOnSeverity, CICheckReport, Roadmap, FeatureStatus, RoadmapFeature, ExternalTicket, ExternalTicketState, TrackerSyncConfig, SyncResult, ModelPricing, UsageRecord, DailyUsage, SessionUsage, SkillInvocationRecord, SkillAdoptionSummary, StabilityTier, TelemetryIdentity, TelemetryConfig, ConsentState, TelemetryEvent } from '@harness-engineering/types';
2
2
  export * from '@harness-engineering/types';
3
3
  import { z } from 'zod';
4
4
  import { C as Collector, A as ArchConfig, a as ConstraintRule, M as MetricResult, b as ArchMetricCategory, c as ArchBaseline, d as ArchDiffResult, T as ThresholdConfig } from './matchers-D20x48U9.js';
@@ -1728,25 +1728,21 @@ declare class EntropyAnalyzer {
1728
1728
  */
1729
1729
  declare function buildSnapshot(config: EntropyConfig): Promise<Result<CodebaseSnapshot, EntropyError>>;
1730
1730
 
1731
- /**
1732
- * Detect documentation drift in a codebase.
1733
- * When graphDriftData is provided, uses graph-derived edges instead of snapshot-based analysis.
1734
- */
1735
- declare function detectDocDrift(snapshot: CodebaseSnapshot, config?: Partial<DriftConfig>, graphDriftData?: {
1731
+ type GraphDriftData = {
1736
1732
  staleEdges: Array<{
1737
1733
  docNodeId: string;
1738
1734
  codeNodeId: string;
1739
1735
  edgeType: string;
1740
1736
  }>;
1741
1737
  missingTargets: string[];
1742
- }): Promise<Result<DriftReport, EntropyError>>;
1743
-
1738
+ };
1744
1739
  /**
1745
- * Detect dead code in a codebase snapshot.
1746
- * Analyzes exports, files, imports, and internal symbols to find unused code.
1747
- * When graphDeadCodeData is provided, uses graph-derived reachability instead of snapshot-based BFS.
1740
+ * Detect documentation drift in a codebase.
1741
+ * When graphDriftData is provided, uses graph-derived edges instead of snapshot-based analysis.
1748
1742
  */
1749
- declare function detectDeadCode(snapshot: CodebaseSnapshot, graphDeadCodeData?: {
1743
+ declare function detectDocDrift(snapshot: CodebaseSnapshot, config?: Partial<DriftConfig>, graphDriftData?: GraphDriftData): Promise<Result<DriftReport, EntropyError>>;
1744
+
1745
+ type GraphDeadCodeData = {
1750
1746
  reachableNodeIds: Set<string> | string[];
1751
1747
  unreachableNodes: Array<{
1752
1748
  id: string;
@@ -1754,7 +1750,8 @@ declare function detectDeadCode(snapshot: CodebaseSnapshot, graphDeadCodeData?:
1754
1750
  name: string;
1755
1751
  path?: string;
1756
1752
  }>;
1757
- }): Promise<Result<DeadCodeReport, EntropyError>>;
1753
+ };
1754
+ declare function detectDeadCode(snapshot: CodebaseSnapshot, graphDeadCodeData?: GraphDeadCodeData): Promise<Result<DeadCodeReport, EntropyError>>;
1758
1755
 
1759
1756
  /**
1760
1757
  * Detect pattern violations across a codebase
@@ -2796,6 +2793,7 @@ declare class CriticalPathResolver {
2796
2793
  resolve(graphData?: GraphCriticalPathData): Promise<CriticalPathSet>;
2797
2794
  private scanAnnotations;
2798
2795
  private walkDir;
2796
+ private resolveFunctionName;
2799
2797
  private scanFile;
2800
2798
  }
2801
2799
 
@@ -3235,6 +3233,8 @@ declare class ModuleSizeCollector implements Collector {
3235
3233
  declare class DepDepthCollector implements Collector {
3236
3234
  readonly category: "dependency-depth";
3237
3235
  getRules(config: ArchConfig, _rootDir: string): ConstraintRule[];
3236
+ private buildImportGraph;
3237
+ private buildModuleMap;
3238
3238
  collect(config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3239
3239
  }
3240
3240
 
@@ -3333,21 +3333,6 @@ declare class ArchBaselineManager {
3333
3333
 
3334
3334
  declare function diff(current: MetricResult[], baseline: ArchBaseline): ArchDiffResult;
3335
3335
 
3336
- /**
3337
- * Resolve effective thresholds for a given scope.
3338
- *
3339
- * When scope is 'project' or has no matching module entry, returns
3340
- * project-wide thresholds. Otherwise, merges project thresholds
3341
- * with module-level overrides (module wins per-category).
3342
- *
3343
- * For object-valued thresholds (e.g. coupling: { maxFanIn, maxFanOut }),
3344
- * performs a shallow merge at the category level:
3345
- * project { maxFanIn: 10, maxFanOut: 8 } + module { maxFanOut: 5 }
3346
- * => { maxFanIn: 10, maxFanOut: 5 }
3347
- *
3348
- * When either side is a scalar, the module value replaces the project
3349
- * value entirely (no merge across scalar/object boundaries).
3350
- */
3351
3336
  declare function resolveThresholds(scope: string, config: ArchConfig): ThresholdConfig;
3352
3337
 
3353
3338
  declare const CategorySnapshotSchema: z.ZodObject<{
@@ -4579,6 +4564,8 @@ declare class PredictionEngine {
4579
4564
  * Throws if fewer than 3 snapshots are available.
4580
4565
  */
4581
4566
  predict(options?: Partial<PredictionOptions>): PredictionResult;
4567
+ private loadValidatedSnapshots;
4568
+ private computeTimeOffsets;
4582
4569
  private resolveOptions;
4583
4570
  private resolveThresholds;
4584
4571
  private computeBaselines;
@@ -4602,6 +4589,7 @@ declare class PredictionEngine {
4602
4589
  * - info: threshold crossing <= 12w, any confidence
4603
4590
  */
4604
4591
  private generateWarnings;
4592
+ private buildCategoryWarning;
4605
4593
  /**
4606
4594
  * Compute composite stability forecast by projecting per-category values
4607
4595
  * forward and computing stability scores at each horizon.
@@ -4858,6 +4846,57 @@ declare const DEFAULT_STATE: HarnessState;
4858
4846
  declare function loadState(projectPath: string, stream?: string, session?: string): Promise<Result<HarnessState, Error>>;
4859
4847
  declare function saveState(projectPath: string, state: HarnessState, stream?: string, session?: string): Promise<Result<void, Error>>;
4860
4848
 
4849
+ /**
4850
+ * PackedEnvelope — the structured result of applying a compaction pipeline
4851
+ * to one or more tool responses or content sections.
4852
+ *
4853
+ * Serialized as structured markdown for readability by AI agents.
4854
+ * Example output:
4855
+ *
4856
+ * <!-- packed: structural+truncate | 4200→1100 tokens (-74%) -->
4857
+ * ### [gather_context]
4858
+ * ...compacted content...
4859
+ *
4860
+ * ### [docs/changes/spec.md]
4861
+ * ...compacted content...
4862
+ */
4863
+ interface PackedEnvelope {
4864
+ meta: {
4865
+ /** Ordered list of strategy names applied. */
4866
+ strategy: string[];
4867
+ /** Estimated token count of the original input (chars / 4). */
4868
+ originalTokenEstimate: number;
4869
+ /** Estimated token count after compaction. */
4870
+ compactedTokenEstimate: number;
4871
+ /** Reduction percentage: (1 - compacted/original) * 100, rounded. */
4872
+ reductionPct: number;
4873
+ /** Whether this result was served from cache. */
4874
+ cached: boolean;
4875
+ /** Prompt cache read tokens (from provider response), if available. */
4876
+ cacheReadTokens?: number;
4877
+ /** Total input tokens sent to provider, if available. */
4878
+ cacheInputTokens?: number;
4879
+ };
4880
+ sections: Array<{
4881
+ /** Tool name, file path, or section label — used as the section heading. */
4882
+ source: string;
4883
+ /** Compacted content for this section. */
4884
+ content: string;
4885
+ }>;
4886
+ }
4887
+ /**
4888
+ * Estimates token count using the chars/4 heuristic from the spec.
4889
+ */
4890
+ declare function estimateTokens(content: string): number;
4891
+ /**
4892
+ * Serializes a PackedEnvelope to the spec's structured markdown format:
4893
+ *
4894
+ * <!-- packed: structural+truncate | 4200→1100 tokens (-74%) [cached] -->
4895
+ * ### [source-name]
4896
+ * content
4897
+ */
4898
+ declare function serializeEnvelope(envelope: PackedEnvelope): string;
4899
+
4861
4900
  interface LearningsFrontmatter {
4862
4901
  hash: string;
4863
4902
  tags: string[];
@@ -5338,6 +5377,12 @@ declare class SecurityScanner {
5338
5377
  scanContent(content: string, filePath: string, startLine?: number): SecurityFinding[];
5339
5378
  scanFile(filePath: string): Promise<SecurityFinding[]>;
5340
5379
  private scanContentForFile;
5380
+ /** Build a finding for a suppression comment that is missing its justification. */
5381
+ private buildSuppressionFinding;
5382
+ /** Check one line against a rule's patterns; return a finding or null. */
5383
+ private matchRuleLine;
5384
+ /** Scan a single line against a resolved rule; push any findings into the array. */
5385
+ private scanLineForRule;
5341
5386
  /**
5342
5387
  * Core scanning loop shared by scanContent and scanContentForFile.
5343
5388
  * Evaluates each rule against each line, handling suppression (FP gate)
@@ -6483,6 +6528,9 @@ declare class GitHubIssuesSyncAdapter implements TrackerSyncAdapter {
6483
6528
  createTicket(feature: RoadmapFeature, milestone: string): Promise<Result<ExternalTicket>>;
6484
6529
  updateTicket(externalId: string, changes: Partial<RoadmapFeature>, milestone?: string): Promise<Result<ExternalTicket>>;
6485
6530
  fetchTicketState(externalId: string): Promise<Result<ExternalTicketState>>;
6531
+ private buildLabelsParam;
6532
+ private issueToTicketState;
6533
+ private fetchIssuePage;
6486
6534
  fetchAllTickets(): Promise<Result<ExternalTicketState[]>>;
6487
6535
  assignTicket(externalId: string, assignee: string): Promise<Result<void>>;
6488
6536
  }
@@ -6741,10 +6789,6 @@ declare class BlueprintGenerator {
6741
6789
  generate(data: BlueprintData, options: BlueprintOptions): Promise<void>;
6742
6790
  }
6743
6791
 
6744
- declare class ContentPipeline {
6745
- generateModuleContent(module: BlueprintModule): Promise<Content>;
6746
- }
6747
-
6748
6792
  interface UpdateCheckState {
6749
6793
  lastCheckTime: number;
6750
6794
  latestVersion: string | null;
@@ -6900,7 +6944,7 @@ declare function aggregateBySession(records: UsageRecord[]): SessionUsage[];
6900
6944
  * Aggregates an array of UsageRecords into per-day summaries.
6901
6945
  * Groups by calendar date (UTC) derived from the record timestamp.
6902
6946
  */
6903
- declare function aggregateByDay(records: UsageRecord[]): DailyUsage[];
6947
+ declare function aggregateByDay$1(records: UsageRecord[]): DailyUsage[];
6904
6948
 
6905
6949
  /**
6906
6950
  * Reads .harness/metrics/costs.jsonl and normalizes snake_case hook output
@@ -6923,24 +6967,297 @@ declare function readCostRecords(projectRoot: string): UsageRecord[];
6923
6967
  declare function parseCCRecords(): UsageRecord[];
6924
6968
 
6925
6969
  /**
6926
- * @harness-engineering/core
6970
+ * Reads .harness/metrics/adoption.jsonl and returns parsed SkillInvocationRecord[].
6927
6971
  *
6928
- * Core library for Harness Engineering toolkit.
6929
- * This library provides the fundamental building blocks for codebase analysis,
6930
- * validation, entropy management, and agent-driven workflows.
6972
+ * - Returns empty array if the file does not exist
6973
+ * - Skips malformed lines with a warning to stderr
6974
+ * - Skips blank lines silently
6975
+ */
6976
+ declare function readAdoptionRecords(projectRoot: string): SkillInvocationRecord[];
6977
+
6978
+ /**
6979
+ * Return type for daily aggregation.
6980
+ */
6981
+ interface DailyAdoption {
6982
+ /** Calendar date (YYYY-MM-DD) */
6983
+ date: string;
6984
+ /** Number of invocations on this date */
6985
+ invocations: number;
6986
+ /** Count of distinct skills invoked on this date */
6987
+ uniqueSkills: number;
6988
+ }
6989
+ /**
6990
+ * Aggregates records by skill name into SkillAdoptionSummary[].
6991
+ * Sorted by invocation count descending.
6931
6992
  */
6993
+ declare function aggregateBySkill(records: SkillInvocationRecord[]): SkillAdoptionSummary[];
6932
6994
  /**
6933
- * Re-export all fundamental types from the types package.
6995
+ * Aggregates records by calendar date (derived from startedAt).
6996
+ * Sorted by date descending (most recent first).
6934
6997
  */
6998
+ declare function aggregateByDay(records: SkillInvocationRecord[]): DailyAdoption[];
6999
+ /**
7000
+ * Returns the top N skills by invocation count.
7001
+ * Convenience wrapper over aggregateBySkill.
7002
+ */
7003
+ declare function topSkills(records: SkillInvocationRecord[], n: number): SkillAdoptionSummary[];
6935
7004
 
6936
7005
  /**
6937
- * The current version of the Harness Engineering core library.
7006
+ * CompactionStrategy the shared interface for all compaction strategies.
7007
+ * Defined here in structural.ts as the foundation type; re-exported from
7008
+ * packages/core/src/compaction/index.ts.
7009
+ */
7010
+ interface CompactionStrategy {
7011
+ name: 'structural' | 'truncate' | 'pack' | 'semantic';
7012
+ lossy: boolean;
7013
+ apply(content: string, budget?: number): string;
7014
+ }
7015
+ /**
7016
+ * Lossless structural compressor.
7017
+ *
7018
+ * For valid JSON input:
7019
+ * - Removes null, undefined, empty-string, empty-array, and empty-object fields
7020
+ * - Collapses single-item arrays to scalar values
7021
+ * - Strips redundant whitespace from string values (leading/trailing and internal runs)
7022
+ * - Normalizes output to compact JSON (no pretty-printing)
6938
7023
  *
6939
- * @deprecated Read the CLI version from `@harness-engineering/cli/package.json`
6940
- * instead. This hardcoded constant drifts from the actual CLI version on each
6941
- * release. Kept only as a fallback for consumers that cannot resolve the CLI
6942
- * package at runtime.
7024
+ * For non-JSON input: returns the string unchanged.
6943
7025
  */
6944
- declare const VERSION = "0.15.0";
7026
+ declare class StructuralStrategy implements CompactionStrategy {
7027
+ readonly name: "structural";
7028
+ readonly lossy = false;
7029
+ apply(content: string, _budget?: number): string;
7030
+ }
7031
+
7032
+ declare const DEFAULT_TOKEN_BUDGET = 4000;
7033
+ /**
7034
+ * Prioritized budget truncation.
7035
+ *
7036
+ * Splits content into lines, scores each line for semantic priority, and
7037
+ * rebuilds output within the token budget by including the highest-priority
7038
+ * lines first. A truncation marker is appended when lines are cut.
7039
+ *
7040
+ * Default budget: 4000 tokens (4000 * 4 = 16 000 chars).
7041
+ */
7042
+ declare class TruncationStrategy implements CompactionStrategy {
7043
+ readonly name: "truncate";
7044
+ readonly lossy = false;
7045
+ apply(content: string, budget?: number): string;
7046
+ }
7047
+
7048
+ /**
7049
+ * CompactionPipeline composes an ordered list of CompactionStrategy instances
7050
+ * and applies them in sequence, passing the output of each strategy as the
7051
+ * input to the next.
7052
+ *
7053
+ * Budget is forwarded to every strategy unchanged — each strategy applies
7054
+ * its own interpretation of the budget.
7055
+ */
7056
+ declare class CompactionPipeline {
7057
+ private readonly strategies;
7058
+ constructor(strategies: CompactionStrategy[]);
7059
+ /** The ordered list of strategy names in this pipeline. */
7060
+ get strategyNames(): string[];
7061
+ /**
7062
+ * Apply all strategies in order.
7063
+ * @param content — input string
7064
+ * @param budget — optional token budget forwarded to each strategy
7065
+ */
7066
+ apply(content: string, budget?: number): string;
7067
+ }
7068
+
7069
+ /**
7070
+ * Resolve the stability tier for a content type or graph node type.
7071
+ *
7072
+ * Accepts both PascalCase display names (e.g., 'SkillDefinition') and
7073
+ * lowercase NodeType enum values (e.g., 'file', 'packed_summary').
7074
+ *
7075
+ * Returns 'ephemeral' for any unrecognized type.
7076
+ */
7077
+ declare function resolveStability(contentType: string): StabilityTier;
7078
+
7079
+ /**
7080
+ * A content block tagged with its stability classification.
7081
+ * Used by CacheAdapter.orderContent() to sort blocks for optimal cache hits.
7082
+ */
7083
+ interface StabilityTaggedBlock {
7084
+ /** Stability classification of this content */
7085
+ stability: StabilityTier;
7086
+ /** The content payload (system prompt text, tool output, etc.) */
7087
+ content: string;
7088
+ /** The role this block serves in the message (system, user, assistant) */
7089
+ role: 'system' | 'user' | 'assistant';
7090
+ }
7091
+ /**
7092
+ * Provider-formatted system prompt block.
7093
+ * Shape varies by provider -- may include cache_control (Anthropic),
7094
+ * cachedContentRef (Gemini), or plain text (OpenAI).
7095
+ */
7096
+ interface ProviderSystemBlock {
7097
+ type: 'text';
7098
+ text: string;
7099
+ /** Anthropic cache control directive */
7100
+ cache_control?: {
7101
+ type: 'ephemeral';
7102
+ ttl?: string;
7103
+ };
7104
+ /** Gemini cached content reference */
7105
+ cachedContentRef?: string;
7106
+ }
7107
+ /**
7108
+ * A tool definition as passed to provider APIs.
7109
+ * Minimal shape -- provider adapters may extend individual entries.
7110
+ */
7111
+ interface ToolDefinition {
7112
+ name: string;
7113
+ description: string;
7114
+ input_schema: Record<string, unknown>;
7115
+ /** Anthropic cache control directive (added by adapter) */
7116
+ cache_control?: {
7117
+ type: 'ephemeral';
7118
+ ttl?: string;
7119
+ };
7120
+ }
7121
+ /**
7122
+ * Provider-formatted tool block wrapping an array of tool definitions.
7123
+ */
7124
+ interface ProviderToolBlock {
7125
+ tools: ToolDefinition[];
7126
+ }
7127
+ /**
7128
+ * Unified interface for provider-specific prompt cache behavior.
7129
+ *
7130
+ * Each provider has different mechanisms for prompt caching:
7131
+ * - Anthropic: explicit cache_control breakpoints
7132
+ * - OpenAI: automatic prefix-matching (content ordering matters)
7133
+ * - Gemini: cachedContents resource for static content
7134
+ *
7135
+ * Adapters translate stability tiers into provider-native directives.
7136
+ */
7137
+ interface CacheAdapter {
7138
+ /** Provider identifier */
7139
+ provider: 'claude' | 'openai' | 'gemini';
7140
+ /** Wrap a system prompt block with provider-specific cache directives */
7141
+ wrapSystemBlock(content: string, stability: StabilityTier): ProviderSystemBlock;
7142
+ /** Wrap tool definitions with provider-specific cache directives */
7143
+ wrapTools(tools: ToolDefinition[], stability: StabilityTier): ProviderToolBlock;
7144
+ /** Order message content blocks for optimal cache hit rates */
7145
+ orderContent(blocks: StabilityTaggedBlock[]): StabilityTaggedBlock[];
7146
+ /** Extract cache token counts from a provider API response */
7147
+ parseCacheUsage(response: unknown): {
7148
+ cacheCreationTokens: number;
7149
+ cacheReadTokens: number;
7150
+ };
7151
+ }
7152
+
7153
+ /**
7154
+ * Anthropic cache adapter.
7155
+ *
7156
+ * Uses explicit `cache_control` breakpoints on content blocks:
7157
+ * - static: cache_control with type "ephemeral" and ttl "1h"
7158
+ * - session: cache_control with type "ephemeral" (default 5m TTL)
7159
+ * - ephemeral: no cache_control (not cached)
7160
+ *
7161
+ * Tool definitions get cache_control on the last entry (Anthropic's
7162
+ * breakpoint model caches everything up to and including the marked block).
7163
+ */
7164
+ declare class AnthropicCacheAdapter implements CacheAdapter {
7165
+ readonly provider: "claude";
7166
+ wrapSystemBlock(content: string, stability: StabilityTier): ProviderSystemBlock;
7167
+ wrapTools(tools: ToolDefinition[], stability: StabilityTier): ProviderToolBlock;
7168
+ orderContent(blocks: StabilityTaggedBlock[]): StabilityTaggedBlock[];
7169
+ parseCacheUsage(response: unknown): {
7170
+ cacheCreationTokens: number;
7171
+ cacheReadTokens: number;
7172
+ };
7173
+ }
7174
+
7175
+ /**
7176
+ * OpenAI cache adapter.
7177
+ *
7178
+ * OpenAI uses automatic prefix-matching for prompt caching -- no explicit
7179
+ * cache directives are needed. The only optimization is content ordering:
7180
+ * static content first, then session, then ephemeral. This maximizes the
7181
+ * stable prefix length that OpenAI's automatic caching can match.
7182
+ *
7183
+ * wrapSystemBlock and wrapTools are passthroughs.
7184
+ */
7185
+ declare class OpenAICacheAdapter implements CacheAdapter {
7186
+ readonly provider: "openai";
7187
+ wrapSystemBlock(content: string, _stability: StabilityTier): ProviderSystemBlock;
7188
+ wrapTools(tools: ToolDefinition[], _stability: StabilityTier): ProviderToolBlock;
7189
+ orderContent(blocks: StabilityTaggedBlock[]): StabilityTaggedBlock[];
7190
+ parseCacheUsage(response: unknown): {
7191
+ cacheCreationTokens: number;
7192
+ cacheReadTokens: number;
7193
+ };
7194
+ }
7195
+
7196
+ /**
7197
+ * Gemini cache adapter.
7198
+ *
7199
+ * Gemini uses explicit `cachedContents` resources for static content:
7200
+ * - static: marked with cachedContentRef for the orchestrator to resolve
7201
+ * into a real cachedContents/{id} via the Gemini API
7202
+ * - session: passthrough (relies on implicit caching in Gemini 2.5+)
7203
+ * - ephemeral: passthrough
7204
+ *
7205
+ * Tools are passed through unchanged -- Gemini caches tools as part
7206
+ * of the cachedContents resource when applicable.
7207
+ */
7208
+ declare class GeminiCacheAdapter implements CacheAdapter {
7209
+ readonly provider: "gemini";
7210
+ wrapSystemBlock(content: string, stability: StabilityTier): ProviderSystemBlock;
7211
+ wrapTools(tools: ToolDefinition[], _stability: StabilityTier): ProviderToolBlock;
7212
+ orderContent(blocks: StabilityTaggedBlock[]): StabilityTaggedBlock[];
7213
+ parseCacheUsage(response: unknown): {
7214
+ cacheCreationTokens: number;
7215
+ cacheReadTokens: number;
7216
+ };
7217
+ }
7218
+
7219
+ /**
7220
+ * Reads optional identity fields from `.harness/telemetry.json`.
7221
+ * Returns empty object if the file is missing or malformed.
7222
+ */
7223
+ declare function readIdentity(projectRoot: string): TelemetryIdentity;
7224
+ /**
7225
+ * Resolves telemetry consent by checking (in order):
7226
+ * 1. DO_NOT_TRACK=1 env var (ecosystem standard)
7227
+ * 2. HARNESS_TELEMETRY_OPTOUT=1 env var
7228
+ * 3. config.enabled (from harness.config.json telemetry section)
7229
+ *
7230
+ * If allowed, reads install ID and optional identity fields.
7231
+ */
7232
+ declare function resolveConsent(projectRoot: string, config: TelemetryConfig | undefined): ConsentState;
7233
+
7234
+ /**
7235
+ * Reads or creates a persistent UUIDv4 install ID at `.harness/.install-id`.
7236
+ *
7237
+ * The ID is anonymous -- it correlates events from the same machine without
7238
+ * containing any PII. Created on first telemetry call, reused thereafter.
7239
+ */
7240
+ declare function getOrCreateInstallId(projectRoot: string): string;
7241
+
7242
+ /**
7243
+ * Reads adoption.jsonl records and formats them as TelemetryEvent payloads.
7244
+ *
7245
+ * Requires an allowed ConsentState (discriminated union with allowed: true).
7246
+ * Populates OS, Node version, harness version, and optional identity fields.
7247
+ */
7248
+ declare function collectEvents(projectRoot: string, consent: ConsentState & {
7249
+ allowed: true;
7250
+ }): TelemetryEvent[];
7251
+
7252
+ /**
7253
+ * Sends telemetry events to PostHog HTTP /batch endpoint.
7254
+ *
7255
+ * - 3 attempts with linear backoff (1s, 2s)
7256
+ * - 5s timeout per attempt via AbortSignal.timeout
7257
+ * - Silent failure: never throws, never blocks session teardown
7258
+ */
7259
+ declare function send(events: TelemetryEvent[], apiKey: string): Promise<void>;
7260
+
7261
+ declare const VERSION = "0.21.3";
6945
7262
 
6946
- export { AGENT_DESCRIPTORS, ARCHITECTURE_DESCRIPTOR, type AST, type ActionContext, type ActionEvent, type ActionEventHandler, type ActionEventType, type ActionResult, type ActionSink, type ActionTracker, type ActionType, type AdjustedForecast, AdjustedForecastSchema, type AgentAction, AgentActionEmitter, type AgentExecutor, type AgentMapLink, type AgentMapSection, type AgentMapValidation, type AgentProcess, type AgentReviewResult, type AgentType, type AgentsMapConfig, ArchBaseline, ArchBaselineManager, ArchConfig, ArchDiffResult, ArchMetricCategory, BUG_DETECTION_DESCRIPTOR, type BaseError, type Baseline, BaselineManager, type BaselinesFile, type BenchmarkResult, type BenchmarkRunOptions, BenchmarkRunner, type BlueprintData, BlueprintGenerator, type BlueprintModule, type BlueprintOptions, type BoundaryDefinition, type BoundaryValidation, type BoundaryValidator, type BoundaryViolation, type BrokenLink, type BudgetedLearningsOptions, type Bundle, type BundleConstraints, BundleConstraintsSchema, BundleSchema, CACHE_TTL_MS, COMPLIANCE_DESCRIPTOR, type CategoryForecast, CategoryForecastSchema, CategorySnapshotSchema, type ChangeType, type ChangedFile, ChecklistBuilder, type CircularDependency, CircularDepsCollector, type CircularDepsResult, type CleanupFinding, type CodeBlock, type CodeChanges, type CodePattern, type CodeReference, type CodeSymbol, type CodebaseSnapshot, Collector, type CommentedCodeBlock, type CommitFormat, type CommitHistoryEntry, type CommitValidation, ComplexityCollector, type ComplexityConfig, type ComplexityReport, type ComplexityThresholds, type ComplexityViolation, type ConfidenceTier, ConfidenceTierSchema, type ConfigError, type ConfigPattern, type Confirmation, ConfirmationSchema, type ConflictReport, ConsoleSink, type ConstraintError, type ConstraintNodeStore, ConstraintRule, type Content, ContentPipeline, type ContextBundle, type ContextError, type ContextFile, type ContextFilterResult, type ContextScopeOptions, ContributingFeatureSchema, type Contributions, ContributionsSchema, type Convention, CouplingCollector, type CouplingConfig, type CouplingReport, type CouplingThresholds, type CouplingViolation, type CoverageOptions, type CoverageReport, type CriticalPathEntry, CriticalPathResolver, type CriticalPathSet, type CustomRule, type CustomRuleResult, DEFAULT_PROVIDER_TIERS, DEFAULT_SECURITY_CONFIG, DEFAULT_STABILITY_THRESHOLDS, DEFAULT_STATE, DEFAULT_STREAM_INDEX, DESTRUCTIVE_BASH, type DataPoint, type DeadCodeConfig, type DeadCodeReport, type DeadExport, type DeadFile, type DeadInternal, type DeduplicateFindingsOptions, DepDepthCollector, type DependencyEdge, type DependencyGraph, type DependencyValidation, type DependencyViolation, type DetectStaleResult, type DiffInfo, type Direction, DirectionSchema, type DocumentationDrift, type DocumentationFile, type DocumentationGap, type DriftConfig, type DriftReport, EXTENSION_MAP, type EligibilityResult, type EmitEventInput, type EmitEventOptions, type EmitEventResult, type EmitInteractionInput, EmitInteractionInputSchema, EntropyAnalyzer, type EntropyConfig, EntropyConfigSchema, type EntropyError, type EntropyReport, type EstimatorCoefficients, type EventType, type EvidenceCoverageReport, ExclusionSet, type ExecutorHealth, type Export, type ExportMap, type ExternalSyncOptions, type FailureEntry, FailureEntrySchema, type FallbackPricingFile, type FanOutOptions, type FeedbackAgentConfig, type FeedbackConfig, type FeedbackError$1 as FeedbackError, type FileCategory, FileSink, type FindingSeverity, type Fix, type FixConfig, type FixResult, type FixType, ForbiddenImportCollector, type ForbiddenImportViolation, type ForbiddenPattern, type GateConfig, GateConfigSchema, type GateResult, GateResultSchema, type GenerationSection, type GitHubInlineComment, GitHubIssuesSyncAdapter, type GraphAdapter, type GraphComplexityData, type GraphCouplingData, type GraphCoverageData, type GraphCriticalPathData, type GraphDependencyData, type GraphHarnessCheckData, type GraphImpactData, type Handoff, HandoffSchema, type HarnessState, HarnessStateSchema, type HealthCheckResult, type Hotspot, type HotspotContext, type Import, type InjectionFinding, type InjectionPattern, type InjectionSeverity, type InlineReference, type IntegrityReport, type InteractionType, InteractionTypeSchema, type InternalSymbol, type JSDocComment, LITELLM_PRICING_URL, type LanguageParser, type Layer, type LayerConfig, LayerViolationCollector, type LearningPattern, type LearningsFrontmatter, type LearningsIndexEntry, type LiteLLMModelEntry, type LiteLLMPricingData, type LoadEventsOptions, type Lockfile, type LockfilePackage, LockfilePackageSchema, LockfileSchema, type LogEntry, type LogFilter, type Manifest, ManifestSchema, type MechanicalCheckOptions, type MechanicalCheckResult, type MechanicalCheckStatus, type MechanicalFinding, type MergeResult, type Metric, MetricResult, type ModelProvider, type ModelTier, type ModelTierConfig, type ModuleDependency, ModuleSizeCollector, NoOpExecutor, NoOpSink, NoOpTelemetryAdapter, type OrphanedDep, type OutlineResult, type ParseError, type ParsedFile, type PatternConfig, PatternConfigSchema, type PatternMatch, type PatternReport, type PatternViolation, type PeerReview, type PeerReviewOptions, type PilotScoringOptions, type PipelineContext, type PipelineFlags, type PipelineOptions, type PipelineResult, type PrMetadata, PredictionEngine, type PredictionOptions, PredictionOptionsSchema, type RegressionResult as PredictionRegressionResult, RegressionResultSchema as PredictionRegressionResultSchema, type PredictionResult, PredictionResultSchema, type PredictionWarning, PredictionWarningSchema, type PricingCacheFile, type PricingDataset, type PriorReview, ProjectScanner, type PromoteResult, type ProviderDefaults, type PruneResult, type Question, QuestionSchema, REQUIRED_SECTIONS, type ReachabilityNode, RegressionDetector, type RegressionFit, type RegressionReport, type RegressionResult$1 as RegressionResult, type ReviewAgentDescriptor, type ReviewAssessment, type ReviewChecklist, type ReviewComment, type ReviewContext, type ReviewDomain, type ReviewFinding, type ReviewItem, type ReviewOutputOptions, type ReviewPipelineResult, type ReviewStrength, type RuleOverride, RuleRegistry, type RunCIChecksInput, type RunPipelineOptions, SECURITY_DESCRIPTOR, STALENESS_WARNING_DAYS, STATUS_RANK, type SafetyLevel, type ScanConfigFileResult, type ScanConfigFinding, type ScanConfigResult, type ScanResult, type ScoredCandidate, type SearchMatch, type SearchResult, type SecurityCategory, type SecurityConfidence, type SecurityConfig, SecurityConfigSchema, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type SelfReviewConfig, type SessionSummaryData, SharableBoundaryConfigSchema, SharableForbiddenImportSchema, SharableLayerSchema, SharableSecurityRulesSchema, type SizeBudgetConfig, type SizeBudgetReport, type SizeBudgetViolation, type SkillEvent, SkillEventSchema, type SkillExecutor, type SourceFile, type Span, type SpanEvent, type SpecImpactEstimate, SpecImpactEstimateSchema, SpecImpactEstimator, SpecImpactSignalsSchema, type StabilityForecast, StabilityForecastSchema, type StaleConstraint, type StepExecutor, type StreamIndex, StreamIndexSchema, type StreamInfo, StreamInfoSchema, type StructureValidation, type Suggestion, type SuggestionReport, type SupportedLanguage, type SuppressionRecord, type SymbolKind, type SyncChange, type SyncOptions, type TaintCheckResult, type TaintFinding, type TaintState, type TelemetryAdapter, type TelemetryHealth, ThresholdConfig, type TimeRange, type CategorySnapshot as TimelineCategorySnapshot, type TimelineFile, TimelineFileSchema, TimelineManager, type TimelineSnapshot, TimelineSnapshotSchema, type TokenBudget, type TokenBudgetOverrides, type Trace, type TrackerSyncAdapter, type Transition, TransitionSchema, type TrendLine, TrendLineSchema, type TrendResult, TrendResultSchema, type TurnExecutor, TypeScriptParser, type UnfoldResult, type UnusedImport, type UpdateCheckState, VERSION, type ValidateFindingsOptions, type ValidationError, type WorkflowPhase, addProvenance, agentConfigRules, aggregateByDay, aggregateBySession, analyzeDiff, analyzeLearningPatterns, appendFailure, appendLearning, appendSessionEntry, applyFixes, applyHotspotDowngrade, applyRecencyWeights, applySyncChanges, archiveFailures, archiveLearnings, archiveSession, archiveStream, assignFeature, buildDependencyGraph, buildExclusionSet, buildSnapshot, calculateCost, checkDocCoverage, checkEligibility, checkEvidenceCoverage, checkTaint, classifyConfidence, classifyFinding, clearEventHashCache, clearFailuresCache, clearLearningsCache, clearTaint, computeContentHash, computeOverallSeverity, computeScanExitCode, configureFeedback, constraintRuleId, contextBudget, contextFilter, countLearningEntries, createBoundaryValidator, createCommentedCodeFixes, createError, createFixes, createForbiddenImportFixes, createOrphanedDepFixes, createParseError, createSelfReview, createStream, cryptoRules, deduplicateCleanupFindings, deduplicateFindings, deepMergeConstraints, defaultCollectors, defineLayer, deserializationRules, detectChangeType, detectCircularDeps, detectCircularDepsInFiles, detectComplexityViolations, detectCouplingViolations, detectDeadCode, detectDocDrift, detectLanguage, detectPatternViolations, detectSizeBudgetViolations, detectStack, detectStaleConstraints, determineAssessment, diff, emitEvent, executeWorkflow, expressRules, extractBundle, extractIndexEntry, extractMarkdownLinks, extractSections, fanOutReview, formatEventTimeline, formatFindingBlock, formatGitHubComment, formatGitHubSummary, formatOutline, formatTerminalOutput, fullSync, generateAgentsMap, generateSuggestions, getActionEmitter, getExitCode, getFeedbackConfig, getInjectionPatterns, getModelPrice, getOutline, getParser, getPhaseCategories, getStreamForBranch, getTaintFilePath, getUpdateNotification, goRules, injectionRules, insecureDefaultsRules, isDuplicateFinding, isRegression, isSmallSuggestion, isUpdateCheckEnabled, listActiveSessions, listStreams, listTaintedSessions, loadBudgetedLearnings, loadEvents, loadFailures, loadHandoff, loadIndexEntries, loadPricingData, loadRelevantLearnings, loadSessionSummary, loadState, loadStreamIndex, logAgentAction, mapInjectionFindings, mapSecurityFindings, mapSecuritySeverity, mcpRules, migrateToStreams, networkRules, nodeRules, normalizeLearningContent, parseCCRecords, parseDateFromEntry, parseDiff, parseFile, parseFrontmatter, parseHarnessIgnore, parseLiteLLMData, parseManifest, parseRoadmap, parseSecurityConfig, parseSize, pathTraversalRules, previewFix, projectValue, promoteSessionLearnings, pruneLearnings, reactRules, readCheckState, readCostRecords, readLockfile, readSessionSection, readSessionSections, readTaint, removeContributions, removeProvenance, requestMultiplePeerReviews, requestPeerReview, resetFeedbackConfig, resetParserCache, resolveFileToLayer, resolveModelTier, resolveReverseStatus, resolveRuleSeverity, resolveSessionDir, resolveStreamPath, resolveThresholds, runAll, runArchitectureAgent, runBugDetectionAgent, runCIChecks, runComplianceAgent, runMechanicalChecks, runMechanicalGate, runMultiTurnPipeline, runPipeline, runReviewPipeline, runSecurityAgent, saveHandoff, saveState, saveStreamIndex, scanForInjection, scopeContext, scoreRoadmapCandidates, searchSymbols, secretRules, serializeRoadmap, setActiveStream, sharpEdgesRules, shouldRunCheck, spawnBackgroundCheck, syncConstraintNodes, syncFromExternal, syncRoadmap, syncToExternal, tagUncitedFindings, touchStream, trackAction, unfoldRange, unfoldSymbol, updateSessionEntryStatus, updateSessionIndex, validateAgentsMap, validateBoundaries, validateCommitMessage, validateConfig, validateDependencies, validateFileStructure, validateFindings, validateKnowledgeMap, validatePatternConfig, violationId, weeksUntilThreshold, weightedLinearRegression, writeConfig, writeLockfile, writeSessionSummary, writeTaint, xssRules };
7263
+ export { AGENT_DESCRIPTORS, ARCHITECTURE_DESCRIPTOR, type AST, type ActionContext, type ActionEvent, type ActionEventHandler, type ActionEventType, type ActionResult, type ActionSink, type ActionTracker, type ActionType, type AdjustedForecast, AdjustedForecastSchema, type AgentAction, AgentActionEmitter, type AgentExecutor, type AgentMapLink, type AgentMapSection, type AgentMapValidation, type AgentProcess, type AgentReviewResult, type AgentType, type AgentsMapConfig, AnthropicCacheAdapter, ArchBaseline, ArchBaselineManager, ArchConfig, ArchDiffResult, ArchMetricCategory, BUG_DETECTION_DESCRIPTOR, type BaseError, type Baseline, BaselineManager, type BaselinesFile, type BenchmarkResult, type BenchmarkRunOptions, BenchmarkRunner, type BlueprintData, BlueprintGenerator, type BlueprintModule, type BlueprintOptions, type BoundaryDefinition, type BoundaryValidation, type BoundaryValidator, type BoundaryViolation, type BrokenLink, type BudgetedLearningsOptions, type Bundle, type BundleConstraints, BundleConstraintsSchema, BundleSchema, CACHE_TTL_MS, COMPLIANCE_DESCRIPTOR, type CacheAdapter, type CategoryForecast, CategoryForecastSchema, CategorySnapshotSchema, type ChangeType, type ChangedFile, ChecklistBuilder, type CircularDependency, CircularDepsCollector, type CircularDepsResult, type CleanupFinding, type CodeBlock, type CodeChanges, type CodePattern, type CodeReference, type CodeSymbol, type CodebaseSnapshot, Collector, type CommentedCodeBlock, type CommitFormat, type CommitHistoryEntry, type CommitValidation, CompactionPipeline, type CompactionStrategy, ComplexityCollector, type ComplexityConfig, type ComplexityReport, type ComplexityThresholds, type ComplexityViolation, type ConfidenceTier, ConfidenceTierSchema, type ConfigError, type ConfigPattern, type Confirmation, ConfirmationSchema, type ConflictReport, ConsoleSink, type ConstraintError, type ConstraintNodeStore, ConstraintRule, type Content, type ContextBundle, type ContextError, type ContextFile, type ContextFilterResult, type ContextScopeOptions, ContributingFeatureSchema, type Contributions, ContributionsSchema, type Convention, CouplingCollector, type CouplingConfig, type CouplingReport, type CouplingThresholds, type CouplingViolation, type CoverageOptions, type CoverageReport, type CriticalPathEntry, CriticalPathResolver, type CriticalPathSet, type CustomRule, type CustomRuleResult, DEFAULT_PROVIDER_TIERS, DEFAULT_SECURITY_CONFIG, DEFAULT_STABILITY_THRESHOLDS, DEFAULT_STATE, DEFAULT_STREAM_INDEX, DEFAULT_TOKEN_BUDGET, DESTRUCTIVE_BASH, type DailyAdoption, type DataPoint, type DeadCodeConfig, type DeadCodeReport, type DeadExport, type DeadFile, type DeadInternal, type DeduplicateFindingsOptions, DepDepthCollector, type DependencyEdge, type DependencyGraph, type DependencyValidation, type DependencyViolation, type DetectStaleResult, type DiffInfo, type Direction, DirectionSchema, type DocumentationDrift, type DocumentationFile, type DocumentationGap, type DriftConfig, type DriftReport, EXTENSION_MAP, type EligibilityResult, type EmitEventInput, type EmitEventOptions, type EmitEventResult, type EmitInteractionInput, EmitInteractionInputSchema, EntropyAnalyzer, type EntropyConfig, EntropyConfigSchema, type EntropyError, type EntropyReport, type EstimatorCoefficients, type EventType, type EvidenceCoverageReport, ExclusionSet, type ExecutorHealth, type Export, type ExportMap, type ExternalSyncOptions, type FailureEntry, FailureEntrySchema, type FallbackPricingFile, type FanOutOptions, type FeedbackAgentConfig, type FeedbackConfig, type FeedbackError$1 as FeedbackError, type FileCategory, FileSink, type FindingSeverity, type Fix, type FixConfig, type FixResult, type FixType, ForbiddenImportCollector, type ForbiddenImportViolation, type ForbiddenPattern, type GateConfig, GateConfigSchema, type GateResult, GateResultSchema, GeminiCacheAdapter, type GenerationSection, type GitHubInlineComment, GitHubIssuesSyncAdapter, type GraphAdapter, type GraphComplexityData, type GraphCouplingData, type GraphCoverageData, type GraphCriticalPathData, type GraphDependencyData, type GraphHarnessCheckData, type GraphImpactData, type Handoff, HandoffSchema, type HarnessState, HarnessStateSchema, type HealthCheckResult, type Hotspot, type HotspotContext, type Import, type InjectionFinding, type InjectionPattern, type InjectionSeverity, type InlineReference, type IntegrityReport, type InteractionType, InteractionTypeSchema, type InternalSymbol, type JSDocComment, LITELLM_PRICING_URL, type LanguageParser, type Layer, type LayerConfig, LayerViolationCollector, type LearningPattern, type LearningsFrontmatter, type LearningsIndexEntry, type LiteLLMModelEntry, type LiteLLMPricingData, type LoadEventsOptions, type Lockfile, type LockfilePackage, LockfilePackageSchema, LockfileSchema, type LogEntry, type LogFilter, type Manifest, ManifestSchema, type MechanicalCheckOptions, type MechanicalCheckResult, type MechanicalCheckStatus, type MechanicalFinding, type MergeResult, type Metric, MetricResult, type ModelProvider, type ModelTier, type ModelTierConfig, type ModuleDependency, ModuleSizeCollector, NoOpExecutor, NoOpSink, NoOpTelemetryAdapter, OpenAICacheAdapter, type OrphanedDep, type OutlineResult, type PackedEnvelope, type ParseError, type ParsedFile, type PatternConfig, PatternConfigSchema, type PatternMatch, type PatternReport, type PatternViolation, type PeerReview, type PeerReviewOptions, type PilotScoringOptions, type PipelineContext, type PipelineFlags, type PipelineOptions, type PipelineResult, type PrMetadata, PredictionEngine, type PredictionOptions, PredictionOptionsSchema, type RegressionResult as PredictionRegressionResult, RegressionResultSchema as PredictionRegressionResultSchema, type PredictionResult, PredictionResultSchema, type PredictionWarning, PredictionWarningSchema, type PricingCacheFile, type PricingDataset, type PriorReview, ProjectScanner, type PromoteResult, type ProviderDefaults, type ProviderSystemBlock, type ProviderToolBlock, type PruneResult, type Question, QuestionSchema, REQUIRED_SECTIONS, type ReachabilityNode, RegressionDetector, type RegressionFit, type RegressionReport, type RegressionResult$1 as RegressionResult, type ReviewAgentDescriptor, type ReviewAssessment, type ReviewChecklist, type ReviewComment, type ReviewContext, type ReviewDomain, type ReviewFinding, type ReviewItem, type ReviewOutputOptions, type ReviewPipelineResult, type ReviewStrength, type RuleOverride, RuleRegistry, type RunCIChecksInput, type RunPipelineOptions, SECURITY_DESCRIPTOR, STALENESS_WARNING_DAYS, STATUS_RANK, type SafetyLevel, type ScanConfigFileResult, type ScanConfigFinding, type ScanConfigResult, type ScanResult, type ScoredCandidate, type SearchMatch, type SearchResult, type SecurityCategory, type SecurityConfidence, type SecurityConfig, SecurityConfigSchema, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type SelfReviewConfig, type SessionSummaryData, SharableBoundaryConfigSchema, SharableForbiddenImportSchema, SharableLayerSchema, SharableSecurityRulesSchema, type SizeBudgetConfig, type SizeBudgetReport, type SizeBudgetViolation, type SkillEvent, SkillEventSchema, type SkillExecutor, type SourceFile, type Span, type SpanEvent, type SpecImpactEstimate, SpecImpactEstimateSchema, SpecImpactEstimator, SpecImpactSignalsSchema, type StabilityForecast, StabilityForecastSchema, type StabilityTaggedBlock, type StaleConstraint, type StepExecutor, type StreamIndex, StreamIndexSchema, type StreamInfo, StreamInfoSchema, StructuralStrategy, type StructureValidation, type Suggestion, type SuggestionReport, type SupportedLanguage, type SuppressionRecord, type SymbolKind, type SyncChange, type SyncOptions, type TaintCheckResult, type TaintFinding, type TaintState, type TelemetryAdapter, type TelemetryHealth, ThresholdConfig, type TimeRange, type CategorySnapshot as TimelineCategorySnapshot, type TimelineFile, TimelineFileSchema, TimelineManager, type TimelineSnapshot, TimelineSnapshotSchema, type TokenBudget, type TokenBudgetOverrides, type ToolDefinition, type Trace, type TrackerSyncAdapter, type Transition, TransitionSchema, type TrendLine, TrendLineSchema, type TrendResult, TrendResultSchema, TruncationStrategy, type TurnExecutor, TypeScriptParser, type UnfoldResult, type UnusedImport, type UpdateCheckState, VERSION, type ValidateFindingsOptions, type ValidationError, type WorkflowPhase, addProvenance, agentConfigRules, aggregateByDay as aggregateAdoptionByDay, aggregateByDay$1 as aggregateByDay, aggregateBySession, aggregateBySkill, analyzeDiff, analyzeLearningPatterns, appendFailure, appendLearning, appendSessionEntry, applyFixes, applyHotspotDowngrade, applyRecencyWeights, applySyncChanges, archiveFailures, archiveLearnings, archiveSession, archiveStream, assignFeature, buildDependencyGraph, buildExclusionSet, buildSnapshot, calculateCost, checkDocCoverage, checkEligibility, checkEvidenceCoverage, checkTaint, classifyConfidence, classifyFinding, clearEventHashCache, clearFailuresCache, clearLearningsCache, clearTaint, collectEvents, computeContentHash, computeOverallSeverity, computeScanExitCode, configureFeedback, constraintRuleId, contextBudget, contextFilter, countLearningEntries, createBoundaryValidator, createCommentedCodeFixes, createError, createFixes, createForbiddenImportFixes, createOrphanedDepFixes, createParseError, createSelfReview, createStream, cryptoRules, deduplicateCleanupFindings, deduplicateFindings, deepMergeConstraints, defaultCollectors, defineLayer, deserializationRules, detectChangeType, detectCircularDeps, detectCircularDepsInFiles, detectComplexityViolations, detectCouplingViolations, detectDeadCode, detectDocDrift, detectLanguage, detectPatternViolations, detectSizeBudgetViolations, detectStack, detectStaleConstraints, determineAssessment, diff, emitEvent, estimateTokens, executeWorkflow, expressRules, extractBundle, extractIndexEntry, extractMarkdownLinks, extractSections, fanOutReview, formatEventTimeline, formatFindingBlock, formatGitHubComment, formatGitHubSummary, formatOutline, formatTerminalOutput, fullSync, generateAgentsMap, generateSuggestions, getActionEmitter, getExitCode, getFeedbackConfig, getInjectionPatterns, getModelPrice, getOrCreateInstallId, getOutline, getParser, getPhaseCategories, getStreamForBranch, getTaintFilePath, getUpdateNotification, goRules, injectionRules, insecureDefaultsRules, isDuplicateFinding, isRegression, isSmallSuggestion, isUpdateCheckEnabled, listActiveSessions, listStreams, listTaintedSessions, loadBudgetedLearnings, loadEvents, loadFailures, loadHandoff, loadIndexEntries, loadPricingData, loadRelevantLearnings, loadSessionSummary, loadState, loadStreamIndex, logAgentAction, mapInjectionFindings, mapSecurityFindings, mapSecuritySeverity, mcpRules, migrateToStreams, networkRules, nodeRules, normalizeLearningContent, parseCCRecords, parseDateFromEntry, parseDiff, parseFile, parseFrontmatter, parseHarnessIgnore, parseLiteLLMData, parseManifest, parseRoadmap, parseSecurityConfig, parseSize, pathTraversalRules, previewFix, projectValue, promoteSessionLearnings, pruneLearnings, reactRules, readAdoptionRecords, readCheckState, readCostRecords, readIdentity, readLockfile, readSessionSection, readSessionSections, readTaint, removeContributions, removeProvenance, requestMultiplePeerReviews, requestPeerReview, resetFeedbackConfig, resetParserCache, resolveConsent, resolveFileToLayer, resolveModelTier, resolveReverseStatus, resolveRuleSeverity, resolveSessionDir, resolveStability, resolveStreamPath, resolveThresholds, runAll, runArchitectureAgent, runBugDetectionAgent, runCIChecks, runComplianceAgent, runMechanicalChecks, runMechanicalGate, runMultiTurnPipeline, runPipeline, runReviewPipeline, runSecurityAgent, saveHandoff, saveState, saveStreamIndex, scanForInjection, scopeContext, scoreRoadmapCandidates, searchSymbols, secretRules, send, serializeEnvelope, serializeRoadmap, setActiveStream, sharpEdgesRules, shouldRunCheck, spawnBackgroundCheck, syncConstraintNodes, syncFromExternal, syncRoadmap, syncToExternal, tagUncitedFindings, topSkills, touchStream, trackAction, unfoldRange, unfoldSymbol, updateSessionEntryStatus, updateSessionIndex, validateAgentsMap, validateBoundaries, validateCommitMessage, validateConfig, validateDependencies, validateFileStructure, validateFindings, validateKnowledgeMap, validatePatternConfig, violationId, weeksUntilThreshold, weightedLinearRegression, writeConfig, writeLockfile, writeSessionSummary, writeTaint, xssRules };