@pratik7368patil/anchor-core 0.1.23 → 0.1.24

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
@@ -375,6 +375,8 @@ type OrgStatus = {
375
375
  org: string;
376
376
  root: string;
377
377
  databasePath: string;
378
+ statusReadError?: string;
379
+ activeRun?: OrgRunHeartbeatStatus;
378
380
  repoCount: number;
379
381
  enabledRepoCount: number;
380
382
  clonedRepoCount: number;
@@ -402,6 +404,99 @@ type OrgStatus = {
402
404
  lastError?: string;
403
405
  }>;
404
406
  };
407
+ type OrgRunHeartbeat = {
408
+ pid: number;
409
+ command: string;
410
+ org: string;
411
+ repo?: string;
412
+ repoIndex?: number;
413
+ repoTotal?: number;
414
+ phase: string;
415
+ startedAt: string;
416
+ updatedAt: string;
417
+ };
418
+ type OrgRunHeartbeatStatus = OrgRunHeartbeat & {
419
+ pidRunning: boolean;
420
+ stale: boolean;
421
+ elapsedSeconds: number;
422
+ lastUpdateAgeSeconds: number;
423
+ };
424
+ type OrgLifecycleProgress = {
425
+ stage: "org_sync_started";
426
+ org: string;
427
+ command: string;
428
+ totalRepos: number;
429
+ } | {
430
+ stage: "org_repo_started";
431
+ org: string;
432
+ command: string;
433
+ repo: string;
434
+ current: number;
435
+ total: number;
436
+ } | {
437
+ stage: "org_repo_phase";
438
+ org: string;
439
+ command: string;
440
+ repo: string;
441
+ current: number;
442
+ total: number;
443
+ phase: string;
444
+ detail?: string;
445
+ } | {
446
+ stage: "org_repo_skipped_history";
447
+ org: string;
448
+ command: string;
449
+ repo: string;
450
+ current: number;
451
+ total: number;
452
+ reason: string;
453
+ } | {
454
+ stage: "org_repo_skipped_code";
455
+ org: string;
456
+ command: string;
457
+ repo: string;
458
+ current: number;
459
+ total: number;
460
+ reason: string;
461
+ } | {
462
+ stage: "org_repo_finalizing";
463
+ org: string;
464
+ command: string;
465
+ repo: string;
466
+ current: number;
467
+ total: number;
468
+ } | {
469
+ stage: "org_repo_completed";
470
+ org: string;
471
+ command: string;
472
+ repo: string;
473
+ current: number;
474
+ total: number;
475
+ skippedHistory: boolean;
476
+ skippedCode: boolean;
477
+ prsIndexed: number;
478
+ codeFilesIndexed: number;
479
+ durationMs: number;
480
+ error?: string;
481
+ } | {
482
+ stage: "org_graph_skipped";
483
+ org: string;
484
+ command: string;
485
+ reason: string;
486
+ } | {
487
+ stage: "org_sync_completed";
488
+ org: string;
489
+ command: string;
490
+ totalRepos: number;
491
+ succeededRepos: number;
492
+ failedRepos: number;
493
+ durationMs: number;
494
+ } | {
495
+ stage: "org_sync_failed";
496
+ org: string;
497
+ command: string;
498
+ error: string;
499
+ };
405
500
  type OrgGraphProgress = {
406
501
  stage: "loading_package_manifests";
407
502
  org: string;
@@ -552,6 +647,13 @@ type FetchPullRequestsProgress = {
552
647
  matchedMergedPullRequests: number;
553
648
  pageSize: number;
554
649
  resetAt?: string | null;
650
+ } | {
651
+ stage: "github_graphql_retry";
652
+ repo: string;
653
+ attempt: number;
654
+ maxAttempts: number;
655
+ waitMs: number;
656
+ reason: string;
555
657
  } | {
556
658
  stage: "github_rate_limited";
557
659
  repo: string;
@@ -578,6 +680,7 @@ type IndexPullRequestsProgress = {
578
680
  total: number;
579
681
  prNumber: number;
580
682
  wisdomUnitsCreated: number;
683
+ regressionEventsCreated: number;
581
684
  };
582
685
  type CodeIndexProgress = {
583
686
  stage: "discovering_code_files";
@@ -606,6 +709,17 @@ type CodeIndexProgress = {
606
709
  components: number;
607
710
  patterns: number;
608
711
  imports: number;
712
+ } | {
713
+ stage: "completed_code_index";
714
+ repo: string;
715
+ files: number;
716
+ chunks: number;
717
+ skippedFiles: number;
718
+ testFiles: number;
719
+ testLinks: number;
720
+ architectureComponents: number;
721
+ architecturePatterns: number;
722
+ architectureImports: number;
609
723
  };
610
724
  type IndexSummary = {
611
725
  indexedPrs: number;
@@ -845,6 +959,7 @@ declare function redactedHistoricalText(text: string): string;
845
959
  type AnchorDatabase = Database.Database;
846
960
  declare function defaultDatabasePath(cwd: string): string;
847
961
  declare function openAnchorDatabase(cwd: string, databasePath?: string): AnchorDatabase;
962
+ declare function openAnchorDatabaseReadOnly(databasePath: string): AnchorDatabase;
848
963
  declare function initializeSchema(db: AnchorDatabase): void;
849
964
  declare function checkSchema(db: AnchorDatabase): boolean;
850
965
  declare function ensureRepository(db: AnchorDatabase, fullName: string): number;
@@ -1224,6 +1339,12 @@ type GitHubGraphQLResponse<T> = {
1224
1339
  data: T;
1225
1340
  headers: Record<string, string | number | undefined>;
1226
1341
  };
1342
+ type GitHubGraphQLTransientRetry = {
1343
+ attempt: number;
1344
+ maxAttempts: number;
1345
+ waitMs: number;
1346
+ reason: string;
1347
+ };
1227
1348
  declare class GitHubGraphQLError extends Error {
1228
1349
  readonly status: number;
1229
1350
  readonly response: {
@@ -1243,6 +1364,8 @@ declare function createGitHubGraphQLRequester(options: {
1243
1364
  controller: GitHubRateLimitController;
1244
1365
  requestName: string;
1245
1366
  maxRetries?: number;
1367
+ maxTransientRetries?: number;
1368
+ onTransientRetry?: (retry: GitHubGraphQLTransientRetry) => void;
1246
1369
  }) => Promise<GitHubGraphQLResponse<T>>;
1247
1370
 
1248
1371
  type FetchPullRequestsOptions = {
@@ -1318,6 +1441,7 @@ type OrgGraphState = {
1318
1441
  lastError?: string;
1319
1442
  };
1320
1443
  declare function openOrgDatabase(org: string, baseDir?: string): AnchorDatabase;
1444
+ declare function openOrgDatabaseReadOnly(org: string, baseDir?: string): AnchorDatabase;
1321
1445
  declare function syncOrgConfigToDatabase(db: AnchorDatabase, config: AnchorOrgConfig, baseDir?: string): void;
1322
1446
  declare function updateOrgRepoState(db: AnchorDatabase, state: OrgRepoCloneState): void;
1323
1447
  declare function getOrgRepoState(db: AnchorDatabase, org: string, repo: string): OrgRepoCloneState | undefined;
@@ -1348,7 +1472,16 @@ declare function getOrgGraphCounts(db: AnchorDatabase, org: string): {
1348
1472
  apiContracts: number;
1349
1473
  apiConsumers: number;
1350
1474
  };
1351
- declare function getOrgStatus(db: AnchorDatabase, config: AnchorOrgConfig, baseDir?: string): OrgStatus;
1475
+ declare function getOrgStatus(db: AnchorDatabase, config: AnchorOrgConfig, baseDir?: string, options?: {
1476
+ syncConfig?: boolean;
1477
+ activeRun?: OrgRunHeartbeatStatus;
1478
+ statusReadError?: string;
1479
+ }): OrgStatus;
1480
+
1481
+ declare function orgHeartbeatPath(org: string, baseDir?: string): string;
1482
+ declare function writeOrgHeartbeat(heartbeat: OrgRunHeartbeat, baseDir?: string): void;
1483
+ declare function clearOrgHeartbeat(org: string, baseDir?: string): void;
1484
+ declare function readOrgHeartbeat(org: string, baseDir?: string): OrgRunHeartbeatStatus | undefined;
1352
1485
 
1353
1486
  type GitCommandRunner = (command: string, args: string[], options: {
1354
1487
  cwd?: string;
@@ -1459,6 +1592,7 @@ type OrgIndexOptions = {
1459
1592
  onPrIndexProgress?: (progress: IndexPullRequestsProgress) => void;
1460
1593
  onCodeProgress?: (progress: CodeIndexProgress) => void;
1461
1594
  onGraphProgress?: (progress: OrgGraphProgress) => void;
1595
+ onLifecycleProgress?: (progress: OrgLifecycleProgress) => void;
1462
1596
  };
1463
1597
  declare function indexOrgRepos(db: AnchorDatabase, config: AnchorOrgConfig, options?: OrgIndexOptions): Promise<OrgIndexResult>;
1464
1598
 
@@ -1521,4 +1655,4 @@ declare function getAnchorIndexHealth(cwd: string): AnchorIndexHealth & {
1521
1655
  indexStatus: IndexStatus;
1522
1656
  };
1523
1657
 
1524
- export { ANCHOR_CURSOR_RULE, ANCHOR_EVALS_FILE, ANCHOR_PLAYBOOKS_FILE, type AnchorCiInput, type AnchorContextInput, type AnchorDatabase, type AnchorExplainFileInput, type AnchorIndexHealth, type AnchorOrgConfig, type AnchorOrgRepoConfig, type AnchorReviewDiffInput, type ArchitectureArea, type ArchitectureCheckInput, type ArchitectureComponent, type ArchitectureContextInput, type ArchitectureIndexData, type ArchitectureMap, type ArchitectureMapEdge, type ArchitectureMapFormat, type ArchitectureMapInput, type ArchitectureMapNode, type ArchitecturePattern, type ArchitectureQueryInput, type ChunkableCodeFile, type CodeChunk, type CodeFileDiscoveryResult, type CodeFileRecord, type CodeImport, type CodeIndexProgress, type CodeIndexSummary, type ConfidenceLevel, type CoverageGrade, type CoverageInput, type CoverageReport, type CurrentCodeSnapshot, type CursorMcpConfig, DEFAULT_MAX_CODE_FILE_BYTES, DEMO_CODE_FILES, DEMO_PULL_REQUESTS, DEMO_REPO, type DiscoveredCodeFile, type DoctorCheck, type DoctorOptions, type DoctorReport, type EvidenceRef, type FeedbackEvent, type FeedbackRating, type FetchMergedPullRequestsGraphQLOptions, type FetchPullRequestsOptions, type FetchPullRequestsProgress, type FormattedResult, type FreshnessResult, type FreshnessStatus, type GitCommandRunner, type GitHubFetchBackend, GitHubGraphQLError, type GitHubGraphQLFetch, type GitHubGraphQLFetchCheckpoint, type GitHubGraphQLRateLimitState, type GitHubGraphQLResponse, type GitHubRateLimitController, type GitHubRateLimitErrorLike, type GitHubRateLimitProgress, type GitHubRepo, type GitHubTokenResolution, type GitHubTokenResolverOptions, type GitHubTokenSource, type IndexPullRequestsProgress, type IndexRunRecord, type IndexStatus, type IndexSummary, type LocalEmbeddingProvider, type OnboardingInput, type OnboardingPack, type OrgAnomaly, type OrgAnomalyCategory, type OrgApiConsumer, type OrgCloneProgress, type OrgCloneResult, type OrgCrossRepoEdge, type OrgCrossRepoRelationship, type OrgFormattedResult, type OrgGraphProgress, type OrgGraphResult, type OrgGraphState, type OrgImpactResult, type OrgIndexOptions, type OrgIndexResult, type OrgRepoCloneState, type OrgRepoGroup, type OrgRepoIndexResult, type OrgStatus, type Playbook, type PullRequestComment, type PullRequestCommit, type PullRequestFile, type PullRequestPerson, type PullRequestRecord, type RankedArchitecturePattern, type RankedCodeChunk, type RankedRegressionEvent, type RankedTeamRule, type RankedTestFile, type RankedWisdomUnit, type RebuildOrgGraphOptions, type RegressionEvent, type ReliabilityGate, type ReliabilityGateRejection, type ReliabilityGateResult, type ReliabilityGateStatus, type RetrievalEvalCase, type RetrievalEvalResult, type RetrievalEvalRunResult, type RulesAddInput, type RulesAddResult, type RulesEvidenceCheckResult, type RulesInitResult, type RulesSuggestOptions, SCHEMA_SQL, type SearchHistoryInput, type SemanticStatus, type SourceType, type SuggestedPrompt, TEAM_RULES_FILE, type TaskPlan, type TeamRule, type TeamRuleSuggestion, type TeamRulesValidationResult, type TestCommand, type TestFileRecord, type TestLink, type WatchRefreshInput, type WisdomCategory, type WisdomUnit, addOrgRepoConfig, addRetrievalEval, addTeamRule, anchorMcpEntry, architectureFilesFromDiff, buildAnchorContextResult, buildArchitectureIndex, buildArchitectureMap, buildFtsQuery, buildOnboardingPack, buildOrgContextResult, buildQueryTerms, calculateCoverage, canonicalizeText, categorizeWisdom, checkArchitecture, checkOrgImpact, checkSchema, checkTeamRuleEvidence, chunkCodeFile, chunkHistoricalText, claimKeyFor, clampMaxResults, classifyArchitectureArea, clearGraphQLFetchCheckpoint, clipSentence, cloneOrPullOrgRepo, cloneOrgRepos, confidenceAtLeast, confidenceLevelFor, confidenceRank, confidenceReasonsFor, countValidTeamRules, createGitHubClient, createGitHubGraphQLRequester, defaultDatabasePath, defaultGitCommandRunner, defaultOrgBaseDir, defaultOrgCloneUrl, detectGitHubRepo, detectGitRoot, detectTestCommands, detectTestCommandsForFile, discoverCodeFiles, emptyCodeIndexSummary, ensureAnchorGitExclude, ensureCursorConfig, ensureCursorRule, ensureRepository, ensureTeamRulesFile, evaluateFreshness, evaluateIndexHealth, evaluateReliabilityGate, evidenceForWisdom, explainFile, extractCodeImports, extractCodeSymbols, extractRegressionEvents, extractSymbols, extractWisdomUnits, feedbackAdjustedScore, fetchMergedPullRequests, fetchMergedPullRequestsWithGraphQL, fetchPullRequestDetails, filesFromDiff, findOrgApiConsumers, formatAnchorContext, formatIndexStatus, formatSearchHistory, getAnchorIndexHealth, getArchitectureContext, getArchitectureMapContext, getGitHubRateLimitDelayMs, getGraphQLFetchCheckpoint, getIndexStatus, getLastSyncTime, getOrgArchitectureMap, getOrgGraphCounts, getOrgGraphState, getOrgRepoState, getOrgStatus, getPlaybook, getSemanticStatus, getSuggestedPromptTexts, getSuggestedPrompts, getWisdomCategoryCounts, githubAuthFixMessage, graphQLFetchCheckpointScope, hasHighSignalLanguage, indexCodebase, indexOrgRepos, indexPullRequests, inferTestAwareness, initOrgConfig, initPlaybooks, initRetrievalEvals, initializeSchema, isGitHubGraphQLResourceLimitError, isGitHubRateLimitError, isHardExcludedCodePath, isTestFilePath, listFeedbackEvents, listOrgNames, listPlaybooks, loadCurrentCodeSnapshot, loadOrgConfig, loadTeamRulesFile, maybeLoadOrgConfig, mergeAnchorMcpConfig, normalizePullRequest, openAnchorDatabase, openOrgDatabase, orgCloneStateFromResult, orgConfigPath, orgDatabasePath, orgRepoLocalPath, orgReposRoot, orgRoot, paginateWithGitHubRateLimit, parseGitHubRemote, planTask, plannedOrgCloneCommands, rankArchitecturePatterns, rankCodeChunks, rankRegressionEvents, rankRelevantTests, rankTeamRules, rankWisdomUnits, rebuildOrgGraph, recordFeedback, recordIndexRun, recordOrgGraphState, recordOrgIndexRun, redactSecrets, redactedHistoricalText, refreshTestCommands, refreshWatchIndex, removeOrgRepoConfig, replaceCodeIndex, repoAliasFromFullName, requestWithGitHubRateLimit, resolveGitHubToken, resolveOrgForTool, resolvePullRequestDetailConcurrency, resolvePullRequestFetchLimit, reviewDiff, runAnchorCi, runDoctor, runRetrievalEvals, sanitizeHistoricalText, saveGraphQLFetchCheckpoint, saveOrgConfig, shouldFallbackToRestAfterGraphQLError, shouldSyncSince, sourceTypeLabel, stripPromptInjection, suggestPlaybooks, suggestTeamRules, syncOrgConfigToDatabase, syncPlaybooksToDatabase, tokenizeSearchText, truncateText, uniqueStrings, updateGitHubGraphQLRateLimitState, updateOrgRepoState, updateSyncState, upsertPullRequest, validateOrgName, validateOrgRepoFullName, validateOrgRepoGroup, validateTeamRulesFile, watchCodebase };
1658
+ export { ANCHOR_CURSOR_RULE, ANCHOR_EVALS_FILE, ANCHOR_PLAYBOOKS_FILE, type AnchorCiInput, type AnchorContextInput, type AnchorDatabase, type AnchorExplainFileInput, type AnchorIndexHealth, type AnchorOrgConfig, type AnchorOrgRepoConfig, type AnchorReviewDiffInput, type ArchitectureArea, type ArchitectureCheckInput, type ArchitectureComponent, type ArchitectureContextInput, type ArchitectureIndexData, type ArchitectureMap, type ArchitectureMapEdge, type ArchitectureMapFormat, type ArchitectureMapInput, type ArchitectureMapNode, type ArchitecturePattern, type ArchitectureQueryInput, type ChunkableCodeFile, type CodeChunk, type CodeFileDiscoveryResult, type CodeFileRecord, type CodeImport, type CodeIndexProgress, type CodeIndexSummary, type ConfidenceLevel, type CoverageGrade, type CoverageInput, type CoverageReport, type CurrentCodeSnapshot, type CursorMcpConfig, DEFAULT_MAX_CODE_FILE_BYTES, DEMO_CODE_FILES, DEMO_PULL_REQUESTS, DEMO_REPO, type DiscoveredCodeFile, type DoctorCheck, type DoctorOptions, type DoctorReport, type EvidenceRef, type FeedbackEvent, type FeedbackRating, type FetchMergedPullRequestsGraphQLOptions, type FetchPullRequestsOptions, type FetchPullRequestsProgress, type FormattedResult, type FreshnessResult, type FreshnessStatus, type GitCommandRunner, type GitHubFetchBackend, GitHubGraphQLError, type GitHubGraphQLFetch, type GitHubGraphQLFetchCheckpoint, type GitHubGraphQLRateLimitState, type GitHubGraphQLResponse, type GitHubGraphQLTransientRetry, type GitHubRateLimitController, type GitHubRateLimitErrorLike, type GitHubRateLimitProgress, type GitHubRepo, type GitHubTokenResolution, type GitHubTokenResolverOptions, type GitHubTokenSource, type IndexPullRequestsProgress, type IndexRunRecord, type IndexStatus, type IndexSummary, type LocalEmbeddingProvider, type OnboardingInput, type OnboardingPack, type OrgAnomaly, type OrgAnomalyCategory, type OrgApiConsumer, type OrgCloneProgress, type OrgCloneResult, type OrgCrossRepoEdge, type OrgCrossRepoRelationship, type OrgFormattedResult, type OrgGraphProgress, type OrgGraphResult, type OrgGraphState, type OrgImpactResult, type OrgIndexOptions, type OrgIndexResult, type OrgLifecycleProgress, type OrgRepoCloneState, type OrgRepoGroup, type OrgRepoIndexResult, type OrgRunHeartbeat, type OrgRunHeartbeatStatus, type OrgStatus, type Playbook, type PullRequestComment, type PullRequestCommit, type PullRequestFile, type PullRequestPerson, type PullRequestRecord, type RankedArchitecturePattern, type RankedCodeChunk, type RankedRegressionEvent, type RankedTeamRule, type RankedTestFile, type RankedWisdomUnit, type RebuildOrgGraphOptions, type RegressionEvent, type ReliabilityGate, type ReliabilityGateRejection, type ReliabilityGateResult, type ReliabilityGateStatus, type RetrievalEvalCase, type RetrievalEvalResult, type RetrievalEvalRunResult, type RulesAddInput, type RulesAddResult, type RulesEvidenceCheckResult, type RulesInitResult, type RulesSuggestOptions, SCHEMA_SQL, type SearchHistoryInput, type SemanticStatus, type SourceType, type SuggestedPrompt, TEAM_RULES_FILE, type TaskPlan, type TeamRule, type TeamRuleSuggestion, type TeamRulesValidationResult, type TestCommand, type TestFileRecord, type TestLink, type WatchRefreshInput, type WisdomCategory, type WisdomUnit, addOrgRepoConfig, addRetrievalEval, addTeamRule, anchorMcpEntry, architectureFilesFromDiff, buildAnchorContextResult, buildArchitectureIndex, buildArchitectureMap, buildFtsQuery, buildOnboardingPack, buildOrgContextResult, buildQueryTerms, calculateCoverage, canonicalizeText, categorizeWisdom, checkArchitecture, checkOrgImpact, checkSchema, checkTeamRuleEvidence, chunkCodeFile, chunkHistoricalText, claimKeyFor, clampMaxResults, classifyArchitectureArea, clearGraphQLFetchCheckpoint, clearOrgHeartbeat, clipSentence, cloneOrPullOrgRepo, cloneOrgRepos, confidenceAtLeast, confidenceLevelFor, confidenceRank, confidenceReasonsFor, countValidTeamRules, createGitHubClient, createGitHubGraphQLRequester, defaultDatabasePath, defaultGitCommandRunner, defaultOrgBaseDir, defaultOrgCloneUrl, detectGitHubRepo, detectGitRoot, detectTestCommands, detectTestCommandsForFile, discoverCodeFiles, emptyCodeIndexSummary, ensureAnchorGitExclude, ensureCursorConfig, ensureCursorRule, ensureRepository, ensureTeamRulesFile, evaluateFreshness, evaluateIndexHealth, evaluateReliabilityGate, evidenceForWisdom, explainFile, extractCodeImports, extractCodeSymbols, extractRegressionEvents, extractSymbols, extractWisdomUnits, feedbackAdjustedScore, fetchMergedPullRequests, fetchMergedPullRequestsWithGraphQL, fetchPullRequestDetails, filesFromDiff, findOrgApiConsumers, formatAnchorContext, formatIndexStatus, formatSearchHistory, getAnchorIndexHealth, getArchitectureContext, getArchitectureMapContext, getGitHubRateLimitDelayMs, getGraphQLFetchCheckpoint, getIndexStatus, getLastSyncTime, getOrgArchitectureMap, getOrgGraphCounts, getOrgGraphState, getOrgRepoState, getOrgStatus, getPlaybook, getSemanticStatus, getSuggestedPromptTexts, getSuggestedPrompts, getWisdomCategoryCounts, githubAuthFixMessage, graphQLFetchCheckpointScope, hasHighSignalLanguage, indexCodebase, indexOrgRepos, indexPullRequests, inferTestAwareness, initOrgConfig, initPlaybooks, initRetrievalEvals, initializeSchema, isGitHubGraphQLResourceLimitError, isGitHubRateLimitError, isHardExcludedCodePath, isTestFilePath, listFeedbackEvents, listOrgNames, listPlaybooks, loadCurrentCodeSnapshot, loadOrgConfig, loadTeamRulesFile, maybeLoadOrgConfig, mergeAnchorMcpConfig, normalizePullRequest, openAnchorDatabase, openAnchorDatabaseReadOnly, openOrgDatabase, openOrgDatabaseReadOnly, orgCloneStateFromResult, orgConfigPath, orgDatabasePath, orgHeartbeatPath, orgRepoLocalPath, orgReposRoot, orgRoot, paginateWithGitHubRateLimit, parseGitHubRemote, planTask, plannedOrgCloneCommands, rankArchitecturePatterns, rankCodeChunks, rankRegressionEvents, rankRelevantTests, rankTeamRules, rankWisdomUnits, readOrgHeartbeat, rebuildOrgGraph, recordFeedback, recordIndexRun, recordOrgGraphState, recordOrgIndexRun, redactSecrets, redactedHistoricalText, refreshTestCommands, refreshWatchIndex, removeOrgRepoConfig, replaceCodeIndex, repoAliasFromFullName, requestWithGitHubRateLimit, resolveGitHubToken, resolveOrgForTool, resolvePullRequestDetailConcurrency, resolvePullRequestFetchLimit, reviewDiff, runAnchorCi, runDoctor, runRetrievalEvals, sanitizeHistoricalText, saveGraphQLFetchCheckpoint, saveOrgConfig, shouldFallbackToRestAfterGraphQLError, shouldSyncSince, sourceTypeLabel, stripPromptInjection, suggestPlaybooks, suggestTeamRules, syncOrgConfigToDatabase, syncPlaybooksToDatabase, tokenizeSearchText, truncateText, uniqueStrings, updateGitHubGraphQLRateLimitState, updateOrgRepoState, updateSyncState, upsertPullRequest, validateOrgName, validateOrgRepoFullName, validateOrgRepoGroup, validateTeamRulesFile, watchCodebase, writeOrgHeartbeat };