@praneeth_54/agentdoctor 0.1.0-beta

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.
Files changed (112) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/LICENSE +21 -0
  3. package/README.md +348 -0
  4. package/dist/agents/claude/adapter.d.ts +1 -0
  5. package/dist/agents/claude/adapter.js +1 -0
  6. package/dist/agents/claude/detector.d.ts +16 -0
  7. package/dist/agents/claude/detector.js +225 -0
  8. package/dist/agents/codex/adapter.d.ts +1 -0
  9. package/dist/agents/codex/adapter.js +1 -0
  10. package/dist/agents/codex/detector.d.ts +17 -0
  11. package/dist/agents/codex/detector.js +151 -0
  12. package/dist/agents/cursor/adapter.d.ts +1 -0
  13. package/dist/agents/cursor/adapter.js +1 -0
  14. package/dist/agents/cursor/detector.d.ts +17 -0
  15. package/dist/agents/cursor/detector.js +198 -0
  16. package/dist/agents/detect-agents.d.ts +17 -0
  17. package/dist/agents/detect-agents.js +23 -0
  18. package/dist/agents/inspect.d.ts +36 -0
  19. package/dist/agents/inspect.js +165 -0
  20. package/dist/agents/registry.d.ts +7 -0
  21. package/dist/agents/registry.js +11 -0
  22. package/dist/agents/types.d.ts +52 -0
  23. package/dist/agents/types.js +15 -0
  24. package/dist/cli/commands/doctor.d.ts +5 -0
  25. package/dist/cli/commands/doctor.js +22 -0
  26. package/dist/cli/commands/explain.d.ts +5 -0
  27. package/dist/cli/commands/explain.js +51 -0
  28. package/dist/cli/commands/fix.d.ts +8 -0
  29. package/dist/cli/commands/fix.js +19 -0
  30. package/dist/cli/commands/scan.d.ts +10 -0
  31. package/dist/cli/commands/scan.js +59 -0
  32. package/dist/cli/index.d.ts +2 -0
  33. package/dist/cli/index.js +3 -0
  34. package/dist/cli/program.d.ts +3 -0
  35. package/dist/cli/program.js +124 -0
  36. package/dist/constants.d.ts +5 -0
  37. package/dist/constants.js +38 -0
  38. package/dist/core/mcp/parse.d.ts +7 -0
  39. package/dist/core/mcp/parse.js +303 -0
  40. package/dist/core/mcp/types.d.ts +33 -0
  41. package/dist/core/mcp/types.js +1 -0
  42. package/dist/core/rules/build-context.d.ts +10 -0
  43. package/dist/core/rules/build-context.js +31 -0
  44. package/dist/core/rules/context/generated-directory.d.ts +2 -0
  45. package/dist/core/rules/context/generated-directory.js +89 -0
  46. package/dist/core/rules/context/large-instruction-file.d.ts +2 -0
  47. package/dist/core/rules/context/large-instruction-file.js +56 -0
  48. package/dist/core/rules/context/large-log-file.d.ts +2 -0
  49. package/dist/core/rules/context/large-log-file.js +45 -0
  50. package/dist/core/rules/dedupe.d.ts +13 -0
  51. package/dist/core/rules/dedupe.js +53 -0
  52. package/dist/core/rules/ignore.d.ts +23 -0
  53. package/dist/core/rules/ignore.js +97 -0
  54. package/dist/core/rules/instructions/duplicate-content.d.ts +2 -0
  55. package/dist/core/rules/instructions/duplicate-content.js +99 -0
  56. package/dist/core/rules/instructions/empty-instructions.d.ts +2 -0
  57. package/dist/core/rules/instructions/empty-instructions.js +53 -0
  58. package/dist/core/rules/instructions/missing-path-reference.d.ts +2 -0
  59. package/dist/core/rules/instructions/missing-path-reference.js +131 -0
  60. package/dist/core/rules/mcp/mcp-rules.d.ts +3 -0
  61. package/dist/core/rules/mcp/mcp-rules.js +83 -0
  62. package/dist/core/rules/registry.d.ts +6 -0
  63. package/dist/core/rules/registry.js +31 -0
  64. package/dist/core/rules/run-rules.d.ts +16 -0
  65. package/dist/core/rules/run-rules.js +36 -0
  66. package/dist/core/rules/security/claude-bypass-permissions.d.ts +7 -0
  67. package/dist/core/rules/security/claude-bypass-permissions.js +52 -0
  68. package/dist/core/rules/security/env-file-exposure.d.ts +2 -0
  69. package/dist/core/rules/security/env-file-exposure.js +87 -0
  70. package/dist/core/rules/security/mcp-broad-filesystem.d.ts +2 -0
  71. package/dist/core/rules/security/mcp-broad-filesystem.js +42 -0
  72. package/dist/core/rules/security/private-key-file.d.ts +2 -0
  73. package/dist/core/rules/security/private-key-file.js +60 -0
  74. package/dist/core/rules/text-cache.d.ts +19 -0
  75. package/dist/core/rules/text-cache.js +112 -0
  76. package/dist/core/rules/thresholds.d.ts +13 -0
  77. package/dist/core/rules/thresholds.js +13 -0
  78. package/dist/core/rules/types.d.ts +57 -0
  79. package/dist/core/rules/types.js +23 -0
  80. package/dist/core/scanner/scan.d.ts +7 -0
  81. package/dist/core/scanner/scan.js +70 -0
  82. package/dist/core/scoring/placeholder.d.ts +7 -0
  83. package/dist/core/scoring/placeholder.js +29 -0
  84. package/dist/detectors/framework.d.ts +17 -0
  85. package/dist/detectors/framework.js +148 -0
  86. package/dist/detectors/language.d.ts +14 -0
  87. package/dist/detectors/language.js +122 -0
  88. package/dist/detectors/monorepo.d.ts +13 -0
  89. package/dist/detectors/monorepo.js +44 -0
  90. package/dist/detectors/package-manager.d.ts +14 -0
  91. package/dist/detectors/package-manager.js +78 -0
  92. package/dist/detectors/project.d.ts +10 -0
  93. package/dist/detectors/project.js +60 -0
  94. package/dist/discovery/files.d.ts +15 -0
  95. package/dist/discovery/files.js +118 -0
  96. package/dist/index.d.ts +8 -0
  97. package/dist/index.js +7 -0
  98. package/dist/reporters/json/report.d.ts +5 -0
  99. package/dist/reporters/json/report.js +84 -0
  100. package/dist/reporters/terminal/report.d.ts +8 -0
  101. package/dist/reporters/terminal/report.js +147 -0
  102. package/dist/security/redaction.d.ts +9 -0
  103. package/dist/security/redaction.js +26 -0
  104. package/dist/types/index.d.ts +137 -0
  105. package/dist/types/index.js +6 -0
  106. package/dist/utils/colors.d.ts +14 -0
  107. package/dist/utils/colors.js +26 -0
  108. package/dist/utils/fs.d.ts +17 -0
  109. package/dist/utils/fs.js +63 -0
  110. package/dist/utils/path.d.ts +17 -0
  111. package/dist/utils/path.js +37 -0
  112. package/package.json +80 -0
@@ -0,0 +1,52 @@
1
+ import type { AgentId, DiscoveredFile, DiscoveryResult } from "../types/index.js";
2
+ export type AgentConfigStatus = "absent" | "detected" | "configured" | "misconfigured";
3
+ export type AgentConfigFileKind = "cursor-rule-mdc" | "cursor-rule-ignored-md" | "cursor-legacy-cursorrules" | "agents-md" | "agents-override-md" | "claude-md" | "claude-local-md" | "claude-rule-md" | "claude-settings" | "claude-settings-local" | "codex-config" | "other";
4
+ export type AgentConfigScope = "root" | "nested" | "legacy";
5
+ export interface AgentConfigFile {
6
+ relativePath: string;
7
+ kind: AgentConfigFileKind;
8
+ sizeBytes: number;
9
+ empty: boolean;
10
+ readable: boolean;
11
+ legacy: boolean;
12
+ scope: AgentConfigScope;
13
+ /** Present when the file exists but could not be parsed (e.g. invalid JSON). */
14
+ parseError?: string;
15
+ }
16
+ export interface AgentDiagnostic {
17
+ code: string;
18
+ severity: "info" | "warning" | "error";
19
+ message: string;
20
+ file?: string;
21
+ }
22
+ export interface AgentDetectionResult {
23
+ id: AgentId;
24
+ displayName: string;
25
+ /** Any repository evidence that this agent is in use or configured. */
26
+ detected: boolean;
27
+ /** At least one non-empty, usable project instruction/config file. */
28
+ configured: boolean;
29
+ status: AgentConfigStatus;
30
+ /** Short human summary, e.g. "2 project rules". */
31
+ summary: string;
32
+ configFiles: AgentConfigFile[];
33
+ /** Convenience list derived from configFiles. */
34
+ configPaths: string[];
35
+ diagnostics: AgentDiagnostic[];
36
+ metadata: Record<string, unknown>;
37
+ }
38
+ export interface AgentDetectionContext {
39
+ root: string;
40
+ discovery: DiscoveryResult;
41
+ maxFileSizeBytes: number;
42
+ }
43
+ export interface AgentAdapter {
44
+ id: AgentId;
45
+ displayName: string;
46
+ detect(context: AgentDetectionContext): Promise<AgentDetectionResult>;
47
+ }
48
+ /** Map discovered files by relative path for O(1) lookups. */
49
+ export declare function indexDiscoveredFiles(files: DiscoveredFile[]): Map<string, DiscoveredFile>;
50
+ export declare function basenameOf(relativePath: string): string;
51
+ export declare function dirnameOf(relativePath: string): string;
52
+ export declare function isRootLevel(relativePath: string): boolean;
@@ -0,0 +1,15 @@
1
+ /** Map discovered files by relative path for O(1) lookups. */
2
+ export function indexDiscoveredFiles(files) {
3
+ return new Map(files.map((file) => [file.relativePath, file]));
4
+ }
5
+ export function basenameOf(relativePath) {
6
+ const parts = relativePath.split("/");
7
+ return parts[parts.length - 1] ?? relativePath;
8
+ }
9
+ export function dirnameOf(relativePath) {
10
+ const idx = relativePath.lastIndexOf("/");
11
+ return idx === -1 ? "" : relativePath.slice(0, idx);
12
+ }
13
+ export function isRootLevel(relativePath) {
14
+ return !relativePath.includes("/");
15
+ }
@@ -0,0 +1,5 @@
1
+ import { type ExitCode } from "../../types/index.js";
2
+ /**
3
+ * Self-check for the AgentDoctor installation (environment health).
4
+ */
5
+ export declare function runDoctorCommand(): Promise<ExitCode>;
@@ -0,0 +1,22 @@
1
+ import { PACKAGE_VERSION } from "../../constants.js";
2
+ import { EXIT_CODES } from "../../types/index.js";
3
+ import { colors, symbolOk } from "../../utils/colors.js";
4
+ /**
5
+ * Self-check for the AgentDoctor installation (environment health).
6
+ */
7
+ export async function runDoctorCommand() {
8
+ const lines = [];
9
+ lines.push("");
10
+ lines.push(colors.bold("AgentDoctor doctor"));
11
+ lines.push("");
12
+ lines.push(` ${symbolOk()} AgentDoctor v${PACKAGE_VERSION}`);
13
+ lines.push(` ${symbolOk()} Node.js ${process.version}`);
14
+ lines.push(` ${symbolOk()} Platform ${process.platform}-${process.arch}`);
15
+ lines.push(` ${symbolOk()} Core scan API available`);
16
+ lines.push("");
17
+ lines.push(colors.dim("Environment looks ready."));
18
+ lines.push(colors.dim("Readiness scoring and automatic fixes are not available yet."));
19
+ lines.push("");
20
+ process.stdout.write(lines.join("\n"));
21
+ return EXIT_CODES.SUCCESS;
22
+ }
@@ -0,0 +1,5 @@
1
+ import { type ExitCode } from "../../types/index.js";
2
+ /**
3
+ * Explain a rule by stable ID.
4
+ */
5
+ export declare function runExplainCommand(ruleId: string | undefined): Promise<ExitCode>;
@@ -0,0 +1,51 @@
1
+ import { getRuleById } from "../../core/rules/registry.js";
2
+ import { EXIT_CODES } from "../../types/index.js";
3
+ import { colors } from "../../utils/colors.js";
4
+ import { AGENT_DISPLAY_NAMES } from "../../constants.js";
5
+ /**
6
+ * Explain a rule by stable ID.
7
+ */
8
+ export async function runExplainCommand(ruleId) {
9
+ if (!ruleId || ruleId.trim() === "") {
10
+ console.error("Error: provide a rule id, e.g. agentdoctor explain security/env-file-exposure");
11
+ return EXIT_CODES.USAGE_ERROR;
12
+ }
13
+ const rule = getRuleById(ruleId.trim());
14
+ if (!rule) {
15
+ console.error(`Error: unknown rule id "${ruleId}"`);
16
+ console.error("Run agentdoctor explain with a documented rule from docs/rules.md");
17
+ return EXIT_CODES.USAGE_ERROR;
18
+ }
19
+ const agents = rule.affectedAgents?.map((id) => AGENT_DISPLAY_NAMES[id] ?? id).join(", ") ??
20
+ "Depends on finding evidence";
21
+ const lines = [];
22
+ lines.push("");
23
+ lines.push(colors.bold(`Explain: ${rule.id}`));
24
+ lines.push("");
25
+ lines.push(` Title: ${rule.title}`);
26
+ lines.push(` Category: ${rule.category}`);
27
+ lines.push(` Severity: ${rule.severity}`);
28
+ lines.push(` Fixability: ${rule.fixability}`);
29
+ lines.push(` Agents: ${agents}`);
30
+ lines.push("");
31
+ lines.push(colors.bold("What it detects"));
32
+ lines.push(` ${rule.description}`);
33
+ lines.push("");
34
+ lines.push(colors.bold("Why it matters"));
35
+ lines.push(` ${rule.rationale}`);
36
+ lines.push("");
37
+ lines.push(colors.bold("Recommended solution"));
38
+ lines.push(` ${rule.recommendation}`);
39
+ lines.push("");
40
+ lines.push(colors.bold("Can AgentDoctor safely fix it?"));
41
+ lines.push(rule.fixability === "safe"
42
+ ? " Potentially yes. Conservative auto-fix is planned but not applied today."
43
+ : rule.fixability === "review"
44
+ ? " Only with review. Automatic fixes are not applied today."
45
+ : rule.fixability === "manual"
46
+ ? " No automatic fix. Manual remediation required."
47
+ : " No fix available.");
48
+ lines.push("");
49
+ process.stdout.write(lines.join("\n"));
50
+ return EXIT_CODES.SUCCESS;
51
+ }
@@ -0,0 +1,8 @@
1
+ import { type ExitCode } from "../../types/index.js";
2
+ /**
3
+ * Safe automatic fixes are not implemented yet.
4
+ */
5
+ export declare function runFixCommand(options: {
6
+ dryRun?: boolean;
7
+ yes?: boolean;
8
+ }): Promise<ExitCode>;
@@ -0,0 +1,19 @@
1
+ import { EXIT_CODES } from "../../types/index.js";
2
+ import { colors } from "../../utils/colors.js";
3
+ /**
4
+ * Safe automatic fixes are not implemented yet.
5
+ */
6
+ export async function runFixCommand(options) {
7
+ const lines = [];
8
+ lines.push("");
9
+ lines.push(colors.bold("AgentDoctor fix"));
10
+ lines.push("");
11
+ if (options.dryRun) {
12
+ lines.push(" Dry-run mode requested.");
13
+ }
14
+ lines.push(" Fix mode is not implemented yet.");
15
+ lines.push(" No files were modified.");
16
+ lines.push("");
17
+ process.stdout.write(lines.join("\n"));
18
+ return EXIT_CODES.SUCCESS;
19
+ }
@@ -0,0 +1,10 @@
1
+ import { type ExitCode } from "../../types/index.js";
2
+ export interface ScanCommandOptions {
3
+ targetPath?: string;
4
+ json?: boolean;
5
+ ci?: boolean;
6
+ verbose?: boolean;
7
+ minScore?: number;
8
+ }
9
+ export declare function runScanCommand(options: ScanCommandOptions): Promise<ExitCode>;
10
+ export declare function resolveTargetArgument(pathArg: string | undefined, cwd?: string): string;
@@ -0,0 +1,59 @@
1
+ import path from "node:path";
2
+ import { scan } from "../../core/scanner/scan.js";
3
+ import { renderJsonReport } from "../../reporters/json/report.js";
4
+ import { renderTerminalReport } from "../../reporters/terminal/report.js";
5
+ import { EXIT_CODES } from "../../types/index.js";
6
+ import { resolveRepoRoot } from "../../utils/path.js";
7
+ import { isDirectory } from "../../utils/fs.js";
8
+ export async function runScanCommand(options) {
9
+ const target = resolveRepoRoot(options.targetPath ?? process.cwd());
10
+ if (!(await isDirectory(target))) {
11
+ console.error(`Error: not a directory: ${target}`);
12
+ return EXIT_CODES.USAGE_ERROR;
13
+ }
14
+ try {
15
+ const result = await scan({
16
+ cwd: target,
17
+ verbose: options.verbose ?? false,
18
+ });
19
+ if (options.json) {
20
+ process.stdout.write(renderJsonReport(result));
21
+ }
22
+ else {
23
+ process.stdout.write(renderTerminalReport(result, {
24
+ verbose: options.verbose === true,
25
+ }));
26
+ }
27
+ if (options.ci || options.minScore !== undefined) {
28
+ if (!result.scoringAvailable || result.scores === null) {
29
+ if (!options.json) {
30
+ console.error("Note: readiness scoring is not available in this release; --min-score was ignored.");
31
+ }
32
+ }
33
+ else {
34
+ const threshold = options.minScore ?? 0;
35
+ if (result.scores.overall < threshold) {
36
+ if (!options.json) {
37
+ console.error(`\nCI check failed: overall score ${result.scores.overall} is below --min-score ${threshold}`);
38
+ }
39
+ return EXIT_CODES.ISSUES_OR_THRESHOLD;
40
+ }
41
+ }
42
+ }
43
+ return EXIT_CODES.SUCCESS;
44
+ }
45
+ catch (error) {
46
+ const message = error instanceof Error ? error.message : String(error);
47
+ console.error(`Error: ${message}`);
48
+ if (options.verbose && error instanceof Error && error.stack) {
49
+ console.error(error.stack);
50
+ }
51
+ return EXIT_CODES.INTERNAL_ERROR;
52
+ }
53
+ }
54
+ export function resolveTargetArgument(pathArg, cwd = process.cwd()) {
55
+ if (!pathArg) {
56
+ return cwd;
57
+ }
58
+ return path.isAbsolute(pathArg) ? pathArg : path.resolve(cwd, pathArg);
59
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from "./program.js";
3
+ await runCli(process.argv);
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function createProgram(): Command;
3
+ export declare function runCli(argv?: string[]): Promise<void>;
@@ -0,0 +1,124 @@
1
+ import { Command } from "commander";
2
+ import { PACKAGE_VERSION } from "../constants.js";
3
+ import { runDoctorCommand } from "./commands/doctor.js";
4
+ import { runExplainCommand } from "./commands/explain.js";
5
+ import { runFixCommand } from "./commands/fix.js";
6
+ import { resolveTargetArgument, runScanCommand } from "./commands/scan.js";
7
+ import { EXIT_CODES } from "../types/index.js";
8
+ function parseMinScore(value) {
9
+ const parsed = Number(value);
10
+ if (!Number.isFinite(parsed) || parsed < 0 || parsed > 100) {
11
+ throw new Error("--min-score must be a number between 0 and 100");
12
+ }
13
+ return parsed;
14
+ }
15
+ function readMinScore(options) {
16
+ if (typeof options.minScore === "number") {
17
+ return options.minScore;
18
+ }
19
+ if (typeof options.minScore === "string") {
20
+ return parseMinScore(options.minScore);
21
+ }
22
+ return undefined;
23
+ }
24
+ export function createProgram() {
25
+ const program = new Command();
26
+ program
27
+ .name("agentdoctor")
28
+ .description("Audit AI coding agent configuration in a repository (local, deterministic, no API key).")
29
+ .version(PACKAGE_VERSION, "-V, --version", "Print AgentDoctor version")
30
+ .argument("[path]", "Repository path to scan (default: current directory)")
31
+ .option("--json", "Emit machine-readable JSON (no decorative output)", false)
32
+ .option("--ci", "CI mode (non-interactive; --min-score is ignored until scoring ships)", false)
33
+ .option("--verbose", "Show timing and extra diagnostics", false)
34
+ .option("--min-score <number>", "Fail when overall score is below this (no-op until scoring ships)", parseMinScore)
35
+ .action(async (pathArg, options) => {
36
+ const minScore = readMinScore(options);
37
+ const code = await runScanCommand({
38
+ targetPath: resolveTargetArgument(pathArg),
39
+ json: Boolean(options.json),
40
+ ci: Boolean(options.ci),
41
+ verbose: Boolean(options.verbose),
42
+ ...(minScore !== undefined ? { minScore } : {}),
43
+ });
44
+ process.exitCode = code;
45
+ });
46
+ program
47
+ .command("scan")
48
+ .description("Scan a repository for AI coding agent configuration issues (default command)")
49
+ .argument("[path]", "Repository path to scan")
50
+ .option("--json", "Emit machine-readable JSON", false)
51
+ .option("--ci", "CI mode (--min-score ignored until scoring ships)", false)
52
+ .option("--verbose", "Show timing and extra diagnostics", false)
53
+ .option("--min-score <number>", "Fail when overall score is below this (no-op until scoring ships)", parseMinScore)
54
+ .action(async (pathArg, options) => {
55
+ const minScore = readMinScore(options);
56
+ const code = await runScanCommand({
57
+ targetPath: resolveTargetArgument(pathArg),
58
+ json: Boolean(options.json),
59
+ ci: Boolean(options.ci),
60
+ verbose: Boolean(options.verbose),
61
+ ...(minScore !== undefined ? { minScore } : {}),
62
+ });
63
+ process.exitCode = code;
64
+ });
65
+ program
66
+ .command("fix")
67
+ .description("Apply safe automatic fixes (not implemented yet)")
68
+ .option("--dry-run", "Show proposed fixes without writing files", false)
69
+ .option("-y, --yes", "Skip confirmation prompts", false)
70
+ .action(async (options) => {
71
+ const code = await runFixCommand({
72
+ dryRun: Boolean(options.dryRun),
73
+ yes: Boolean(options.yes),
74
+ });
75
+ process.exitCode = code;
76
+ });
77
+ program
78
+ .command("explain")
79
+ .description("Explain a rule by id")
80
+ .argument("<rule>", "Rule id, e.g. security/env-file-exposure")
81
+ .action(async (rule) => {
82
+ const code = await runExplainCommand(rule);
83
+ process.exitCode = code;
84
+ });
85
+ program
86
+ .command("doctor")
87
+ .description("Check AgentDoctor installation health")
88
+ .action(async () => {
89
+ const code = await runDoctorCommand();
90
+ process.exitCode = code;
91
+ });
92
+ program.configureOutput({
93
+ outputError: (str, write) => write(str),
94
+ });
95
+ program.exitOverride();
96
+ return program;
97
+ }
98
+ export async function runCli(argv = process.argv) {
99
+ const program = createProgram();
100
+ try {
101
+ await program.parseAsync(argv);
102
+ }
103
+ catch (error) {
104
+ // Commander throws on --help / --version with exitOverride
105
+ if (error &&
106
+ typeof error === "object" &&
107
+ "code" in error &&
108
+ (error.code === "commander.helpDisplayed" || error.code === "commander.version")) {
109
+ process.exitCode = EXIT_CODES.SUCCESS;
110
+ return;
111
+ }
112
+ if (error &&
113
+ typeof error === "object" &&
114
+ "code" in error &&
115
+ typeof error.code === "string" &&
116
+ error.code.startsWith("commander.")) {
117
+ process.exitCode = EXIT_CODES.USAGE_ERROR;
118
+ return;
119
+ }
120
+ const message = error instanceof Error ? error.message : String(error);
121
+ console.error(`Error: ${message}`);
122
+ process.exitCode = EXIT_CODES.INTERNAL_ERROR;
123
+ }
124
+ }
@@ -0,0 +1,5 @@
1
+ export declare const PACKAGE_VERSION = "0.1.0-beta";
2
+ export declare const DEFAULT_MAX_FILE_SIZE_BYTES: number;
3
+ /** Directories skipped during normal discovery (unless a rule needs them later). */
4
+ export declare const DEFAULT_IGNORE_DIRECTORIES: Set<string>;
5
+ export declare const AGENT_DISPLAY_NAMES: Record<"cursor" | "claude-code" | "codex", string>;
@@ -0,0 +1,38 @@
1
+ export const PACKAGE_VERSION = "0.1.0-beta";
2
+ export const DEFAULT_MAX_FILE_SIZE_BYTES = 2 * 1024 * 1024; // 2 MiB
3
+ /** Directories skipped during normal discovery (unless a rule needs them later). */
4
+ export const DEFAULT_IGNORE_DIRECTORIES = new Set([
5
+ ".git",
6
+ "node_modules",
7
+ "vendor",
8
+ "dist",
9
+ "build",
10
+ "out",
11
+ ".next",
12
+ ".nuxt",
13
+ ".svelte-kit",
14
+ "coverage",
15
+ ".dart_tool",
16
+ "target",
17
+ ".turbo",
18
+ ".nx",
19
+ ".cache",
20
+ ".venv",
21
+ "venv",
22
+ "__pycache__",
23
+ ".pytest_cache",
24
+ ".mypy_cache",
25
+ ".gradle",
26
+ ".idea",
27
+ ".vscode",
28
+ "Pods",
29
+ "DerivedData",
30
+ ".parcel-cache",
31
+ ".yarn",
32
+ ".pnpm-store",
33
+ ]);
34
+ export const AGENT_DISPLAY_NAMES = {
35
+ cursor: "Cursor",
36
+ "claude-code": "Claude Code",
37
+ codex: "Codex",
38
+ };
@@ -0,0 +1,7 @@
1
+ import type { McpParseResult } from "./types.js";
2
+ export declare function parseProjectMcpConfigs(root: string, maxFileSizeBytes: number): Promise<McpParseResult>;
3
+ /**
4
+ * Classify whether a filesystem scope string is overly broad relative to the repo.
5
+ * Does not follow or read the path.
6
+ */
7
+ export declare function classifyFilesystemScope(scope: string, root: string): "broad" | "outside" | "ok" | "unknown";