@pratik7368patil/anchor-core 0.1.37 → 0.1.39
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 +42 -2
- package/dist/index.js +621 -214
- package/dist/index.js.map +1 -1
- package/package.json +10 -2
package/dist/index.d.ts
CHANGED
|
@@ -1083,6 +1083,44 @@ declare function ensureAnchorGitExclude(gitRoot: string): {
|
|
|
1083
1083
|
updated: boolean;
|
|
1084
1084
|
};
|
|
1085
1085
|
|
|
1086
|
+
declare const ANCHOR_AGENT_TARGETS: readonly ["cursor", "claude-code", "codex", "vscode", "antigravity", "generic-mcp"];
|
|
1087
|
+
type AnchorAgentTarget = (typeof ANCHOR_AGENT_TARGETS)[number];
|
|
1088
|
+
type AnchorAgentScope = "project" | "user";
|
|
1089
|
+
type AgentConfigFileResult = {
|
|
1090
|
+
path: string;
|
|
1091
|
+
created: boolean;
|
|
1092
|
+
updated: boolean;
|
|
1093
|
+
};
|
|
1094
|
+
type AgentConfigResult = {
|
|
1095
|
+
target: AnchorAgentTarget;
|
|
1096
|
+
label: string;
|
|
1097
|
+
files: AgentConfigFileResult[];
|
|
1098
|
+
skipped: boolean;
|
|
1099
|
+
message: string;
|
|
1100
|
+
manualConfig?: string;
|
|
1101
|
+
};
|
|
1102
|
+
type AgentConfigCheck = {
|
|
1103
|
+
target: AnchorAgentTarget;
|
|
1104
|
+
label: string;
|
|
1105
|
+
ok: boolean;
|
|
1106
|
+
message: string;
|
|
1107
|
+
fix?: string;
|
|
1108
|
+
};
|
|
1109
|
+
type ConfigureAgentTargetsOptions = {
|
|
1110
|
+
cwd: string;
|
|
1111
|
+
targets: AnchorAgentTarget[];
|
|
1112
|
+
scope?: AnchorAgentScope;
|
|
1113
|
+
anchorEntry?: Record<string, unknown>;
|
|
1114
|
+
};
|
|
1115
|
+
declare function isAnchorAgentTarget(value: string): value is AnchorAgentTarget;
|
|
1116
|
+
declare function parseAnchorAgentTargets(value: string): AnchorAgentTarget[];
|
|
1117
|
+
declare function agentTargetLabel(target: AnchorAgentTarget): string;
|
|
1118
|
+
declare function renderAnchorAgentInstructions(target: AnchorAgentTarget): string;
|
|
1119
|
+
declare function configureAgentTargets({ cwd, targets, scope, anchorEntry, }: ConfigureAgentTargetsOptions): AgentConfigResult[];
|
|
1120
|
+
declare function detectConfiguredAgentTargets(cwd: string): AnchorAgentTarget[];
|
|
1121
|
+
declare function checkAgentTargetConfig(cwd: string, target: AnchorAgentTarget): AgentConfigCheck;
|
|
1122
|
+
declare function renderGenericMcpConfig(anchorEntry?: Record<string, unknown>): string;
|
|
1123
|
+
|
|
1086
1124
|
type GitHubTokenSource = "GITHUB_TOKEN" | "GH_TOKEN" | "gh";
|
|
1087
1125
|
type GitHubTokenResolution = {
|
|
1088
1126
|
token?: string;
|
|
@@ -1446,7 +1484,8 @@ type SuggestedPrompt = {
|
|
|
1446
1484
|
title: string;
|
|
1447
1485
|
prompt: string;
|
|
1448
1486
|
};
|
|
1449
|
-
|
|
1487
|
+
type PromptTarget = "cursor" | "claude-code" | "codex" | "vscode" | "antigravity" | "generic";
|
|
1488
|
+
declare function getSuggestedPrompts(target?: PromptTarget): SuggestedPrompt[];
|
|
1450
1489
|
declare function getSuggestedPromptTexts(): string[];
|
|
1451
1490
|
|
|
1452
1491
|
declare const ANCHOR_EVALS_FILE = "anchor.evals.json";
|
|
@@ -1877,6 +1916,7 @@ type DoctorOptions = {
|
|
|
1877
1916
|
githubClientFactory?: (token: string) => Pick<Octokit, "repos">;
|
|
1878
1917
|
githubGraphQLCheck?: (token: string) => Promise<boolean> | boolean;
|
|
1879
1918
|
mcpServerCheck?: () => Promise<boolean> | boolean;
|
|
1919
|
+
targets?: AnchorAgentTarget[];
|
|
1880
1920
|
};
|
|
1881
1921
|
declare function runDoctor(options: DoctorOptions): Promise<DoctorReport>;
|
|
1882
1922
|
|
|
@@ -1885,4 +1925,4 @@ declare function getAnchorIndexHealth(cwd: string): AnchorIndexHealth & {
|
|
|
1885
1925
|
indexStatus: IndexStatus;
|
|
1886
1926
|
};
|
|
1887
1927
|
|
|
1888
|
-
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 CodeIndexChangePlan, 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 OrgEdgeConfidenceBucket, type OrgFormattedResult, type OrgGraphLayer, type OrgGraphProgress, type OrgGraphQualityStats, type OrgGraphResult, type OrgGraphState, type OrgImpactResult, type OrgIndexOptions, type OrgIndexResult, type OrgLifecycleProgress, type OrgRepoCloneState, type OrgRepoGroup, type OrgRepoIndexResult, type OrgRunHeartbeat, type OrgRunHeartbeatStatus, type OrgRunTimelineRepoSummary, type OrgRunTimelineSnapshot, type OrgRunTimelineStep, type OrgRunTimelineStepStatus, 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 RepoCodeIndexState, 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, buildArchitectureFromIndexedData, 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, discoverCodeFilesByPaths, 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, getCodeIndexStateForRepo, getGitHubRateLimitDelayMs, getGraphQLFetchCheckpoint, getIndexStatus, getLastSyncTime, getOrgArchitectureMap, getOrgGraphCounts, getOrgGraphState, getOrgRepoState, getOrgStatus, getPlaybook, getRepoCodeChunkSymbols, getRepoCodeCounts, getRepoCodeFileHashes, getRepoCodeFiles, getRepoCodeImports, getRepoTestChunks, getSemanticStatus, getSuggestedPromptTexts, getSuggestedPrompts, getWisdomCategoryCounts, githubAuthFixMessage, graphQLFetchCheckpointScope, hasDirtyWorkingTree, 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, planIncrementalCodeIndex, planTask, plannedOrgCloneCommands, rankArchitecturePatterns, rankCodeChunks, rankRegressionEvents, rankRelevantTests, rankTeamRules, rankWisdomUnits, readDiscoveredCodeFileContent, readGitHeadCommit, readOrgHeartbeat, rebuildOrgGraph, recordFeedback, recordIndexRun, recordOrgGraphState, recordOrgIndexRun, redactSecrets, redactedHistoricalText, refreshTestCommands, refreshWatchIndex, removeOrgRepoConfig, replaceCodeIndex, repoAliasFromFullName, requestWithGitHubRateLimit, resolveGitHubToken, resolveOrgForTool, resolvePullRequestDetailConcurrency, resolvePullRequestFetchLimit, reviewDiff, runAnchorCi, runDatabaseMaintenance, runDoctor, runRetrievalEvals, sanitizeHistoricalText, saveGraphQLFetchCheckpoint, saveOrgConfig, shouldFallbackToRestAfterGraphQLError, shouldSyncSince, sourceTypeLabel, stripPromptInjection, suggestPlaybooks, suggestTeamRules, syncOrgConfigToDatabase, syncPlaybooksToDatabase, tokenizeSearchText, touchCodeIndexState, truncateText, uniqueStrings, updateGitHubGraphQLRateLimitState, updateOrgRepoState, updateSyncState, upsertPullRequest, validateOrgName, validateOrgRepoFullName, validateOrgRepoGroup, validateTeamRulesFile, watchCodebase, writeOrgHeartbeat };
|
|
1928
|
+
export { ANCHOR_AGENT_TARGETS, ANCHOR_CURSOR_RULE, ANCHOR_EVALS_FILE, ANCHOR_PLAYBOOKS_FILE, type AgentConfigCheck, type AgentConfigFileResult, type AgentConfigResult, type AnchorAgentScope, type AnchorAgentTarget, 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 CodeIndexChangePlan, type CodeIndexProgress, type CodeIndexSummary, type ConfidenceLevel, type ConfigureAgentTargetsOptions, 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 OrgEdgeConfidenceBucket, type OrgFormattedResult, type OrgGraphLayer, type OrgGraphProgress, type OrgGraphQualityStats, type OrgGraphResult, type OrgGraphState, type OrgImpactResult, type OrgIndexOptions, type OrgIndexResult, type OrgLifecycleProgress, type OrgRepoCloneState, type OrgRepoGroup, type OrgRepoIndexResult, type OrgRunHeartbeat, type OrgRunHeartbeatStatus, type OrgRunTimelineRepoSummary, type OrgRunTimelineSnapshot, type OrgRunTimelineStep, type OrgRunTimelineStepStatus, type OrgStatus, type Playbook, type PromptTarget, 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 RepoCodeIndexState, 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, agentTargetLabel, anchorMcpEntry, architectureFilesFromDiff, buildAnchorContextResult, buildArchitectureFromIndexedData, buildArchitectureIndex, buildArchitectureMap, buildFtsQuery, buildOnboardingPack, buildOrgContextResult, buildQueryTerms, calculateCoverage, canonicalizeText, categorizeWisdom, checkAgentTargetConfig, checkArchitecture, checkOrgImpact, checkSchema, checkTeamRuleEvidence, chunkCodeFile, chunkHistoricalText, claimKeyFor, clampMaxResults, classifyArchitectureArea, clearGraphQLFetchCheckpoint, clearOrgHeartbeat, clipSentence, cloneOrPullOrgRepo, cloneOrgRepos, confidenceAtLeast, confidenceLevelFor, confidenceRank, confidenceReasonsFor, configureAgentTargets, countValidTeamRules, createGitHubClient, createGitHubGraphQLRequester, defaultDatabasePath, defaultGitCommandRunner, defaultOrgBaseDir, defaultOrgCloneUrl, detectConfiguredAgentTargets, detectGitHubRepo, detectGitRoot, detectTestCommands, detectTestCommandsForFile, discoverCodeFiles, discoverCodeFilesByPaths, 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, getCodeIndexStateForRepo, getGitHubRateLimitDelayMs, getGraphQLFetchCheckpoint, getIndexStatus, getLastSyncTime, getOrgArchitectureMap, getOrgGraphCounts, getOrgGraphState, getOrgRepoState, getOrgStatus, getPlaybook, getRepoCodeChunkSymbols, getRepoCodeCounts, getRepoCodeFileHashes, getRepoCodeFiles, getRepoCodeImports, getRepoTestChunks, getSemanticStatus, getSuggestedPromptTexts, getSuggestedPrompts, getWisdomCategoryCounts, githubAuthFixMessage, graphQLFetchCheckpointScope, hasDirtyWorkingTree, hasHighSignalLanguage, indexCodebase, indexOrgRepos, indexPullRequests, inferTestAwareness, initOrgConfig, initPlaybooks, initRetrievalEvals, initializeSchema, isAnchorAgentTarget, 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, parseAnchorAgentTargets, parseGitHubRemote, planIncrementalCodeIndex, planTask, plannedOrgCloneCommands, rankArchitecturePatterns, rankCodeChunks, rankRegressionEvents, rankRelevantTests, rankTeamRules, rankWisdomUnits, readDiscoveredCodeFileContent, readGitHeadCommit, readOrgHeartbeat, rebuildOrgGraph, recordFeedback, recordIndexRun, recordOrgGraphState, recordOrgIndexRun, redactSecrets, redactedHistoricalText, refreshTestCommands, refreshWatchIndex, removeOrgRepoConfig, renderAnchorAgentInstructions, renderGenericMcpConfig, replaceCodeIndex, repoAliasFromFullName, requestWithGitHubRateLimit, resolveGitHubToken, resolveOrgForTool, resolvePullRequestDetailConcurrency, resolvePullRequestFetchLimit, reviewDiff, runAnchorCi, runDatabaseMaintenance, runDoctor, runRetrievalEvals, sanitizeHistoricalText, saveGraphQLFetchCheckpoint, saveOrgConfig, shouldFallbackToRestAfterGraphQLError, shouldSyncSince, sourceTypeLabel, stripPromptInjection, suggestPlaybooks, suggestTeamRules, syncOrgConfigToDatabase, syncPlaybooksToDatabase, tokenizeSearchText, touchCodeIndexState, truncateText, uniqueStrings, updateGitHubGraphQLRateLimitState, updateOrgRepoState, updateSyncState, upsertPullRequest, validateOrgName, validateOrgRepoFullName, validateOrgRepoGroup, validateTeamRulesFile, watchCodebase, writeOrgHeartbeat };
|