@owasp-aghast/aghast 0.8.0-beta.0 → 0.8.0-beta.1

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.js CHANGED
@@ -65,58 +65,58 @@ async function createMockProvider() {
65
65
  await provider.initialize({});
66
66
  return provider;
67
67
  }
68
- const SCAN_HELP = `Usage: aghast scan <repo-path> --config-dir <path> [options]
69
-
70
- Run security checks against a repository.
71
-
72
- Arguments:
73
- <repo-path> Path to the repository to scan
74
-
75
- General options:
76
- --config-dir <path> Config directory containing checks-config.json,
77
- checks/ folder, and optionally runtime-config.json.
78
- Required unless AGHAST_CONFIG_DIR is set.
79
- --output <path> Output file path for results
80
- (default: <repo-path>/security_checks_results.<ext>)
81
- --output-format json|sarif Output format (default: json)
82
- --fail-on-check-failure Exit with code 1 if any check FAILs or ERRORs
83
- --debug Shorthand for --log-level debug
84
- --log-level <level> Console log level: error, warn, info, debug, trace
85
- (default: info)
86
- --log-file <path> Write all log output to a file (always at trace level
87
- unless overridden by --log-type)
88
- --log-type <type> Log file handler type (default: file).
89
- Available types: file
90
- --model <model> AI model override (e.g. claude-sonnet-4-20250514)
91
- --agent-provider <name> Agent provider name (default: claude-code)
92
- --generic-prompt <file> Generic prompt template filename in prompts/ dir
93
- --diff-ref <ref> Git ref to diff against (e.g. HEAD~1, main, SHA).
94
- Auto-activates diff filtering on every check whose
95
- discovery supports it, unless the check opts out
96
- via checkTarget.diffFilter: false.
97
- --diff-file <path> Path to pre-generated unified diff file
98
- (alternative to --diff-ref)
99
- --budget-limit-cost <usd> Abort the scan when accumulated cost exceeds this
100
- USD value. Warns at 80%, aborts at 100%
101
- --budget-limit-tokens <n> Abort the scan when accumulated tokens exceed n.
102
- Warns at 80%, aborts at 100%
103
-
104
- Environment variables:
105
- ANTHROPIC_API_KEY API key for Claude (required for AI-based checks)
106
- AGHAST_CONFIG_DIR Default config directory (CLI --config-dir takes precedence)
107
- AGHAST_AI_MODEL AI model override (CLI --model takes precedence)
108
- AGHAST_GENERIC_PROMPT Generic prompt template filename (CLI --generic-prompt takes precedence)
109
- AGHAST_DEBUG Set to "true" to enable debug output (same as --debug)
110
- AGHAST_LOG_LEVEL Console log level (CLI --log-level takes precedence)
111
- AGHAST_LOG_FILE Log file path (CLI --log-file takes precedence)
112
- AGHAST_LOG_TYPE Log file handler type (CLI --log-type takes precedence)
113
- AGHAST_DIFF_REF Git ref to diff against (CLI --diff-ref takes precedence)
114
-
115
- Examples:
116
- aghast scan ./my-repo --config-dir ./my-checks
117
- aghast scan ./my-repo --config-dir ./my-checks --output results.sarif --output-format sarif
118
- aghast scan ./my-repo --config-dir ./my-checks --fail-on-check-failure --debug
119
- aghast scan ./my-repo --config-dir ./my-checks --log-file scan.log --log-level warn
68
+ const SCAN_HELP = `Usage: aghast scan <repo-path> --config-dir <path> [options]
69
+
70
+ Run security checks against a repository.
71
+
72
+ Arguments:
73
+ <repo-path> Path to the repository to scan
74
+
75
+ General options:
76
+ --config-dir <path> Config directory containing checks-config.json,
77
+ checks/ folder, and optionally runtime-config.json.
78
+ Required unless AGHAST_CONFIG_DIR is set.
79
+ --output <path> Output file path for results
80
+ (default: <repo-path>/security_checks_results.<ext>)
81
+ --output-format json|sarif Output format (default: json)
82
+ --fail-on-check-failure Exit with code 1 if any check FAILs or ERRORs
83
+ --debug Shorthand for --log-level debug
84
+ --log-level <level> Console log level: error, warn, info, debug, trace
85
+ (default: info)
86
+ --log-file <path> Write all log output to a file (always at trace level
87
+ unless overridden by --log-type)
88
+ --log-type <type> Log file handler type (default: file).
89
+ Available types: file
90
+ --model <model> AI model override (e.g. claude-sonnet-4-20250514)
91
+ --agent-provider <name> Agent provider name (default: claude-code)
92
+ --generic-prompt <file> Generic prompt template filename in prompts/ dir
93
+ --diff-ref <ref> Git ref to diff against (e.g. HEAD~1, main, SHA).
94
+ Auto-activates diff filtering on every check whose
95
+ discovery supports it, unless the check opts out
96
+ via checkTarget.diffFilter: false.
97
+ --diff-file <path> Path to pre-generated unified diff file
98
+ (alternative to --diff-ref)
99
+ --budget-limit-cost <usd> Abort the scan when accumulated cost exceeds this
100
+ USD value. Warns at 80%, aborts at 100%
101
+ --budget-limit-tokens <n> Abort the scan when accumulated tokens exceed n.
102
+ Warns at 80%, aborts at 100%
103
+
104
+ Environment variables:
105
+ ANTHROPIC_API_KEY API key for Claude (required for AI-based checks)
106
+ AGHAST_CONFIG_DIR Default config directory (CLI --config-dir takes precedence)
107
+ AGHAST_AI_MODEL AI model override (CLI --model takes precedence)
108
+ AGHAST_GENERIC_PROMPT Generic prompt template filename (CLI --generic-prompt takes precedence)
109
+ AGHAST_DEBUG Set to "true" to enable debug output (same as --debug)
110
+ AGHAST_LOG_LEVEL Console log level (CLI --log-level takes precedence)
111
+ AGHAST_LOG_FILE Log file path (CLI --log-file takes precedence)
112
+ AGHAST_LOG_TYPE Log file handler type (CLI --log-type takes precedence)
113
+ AGHAST_DIFF_REF Git ref to diff against (CLI --diff-ref takes precedence)
114
+
115
+ Examples:
116
+ aghast scan ./my-repo --config-dir ./my-checks
117
+ aghast scan ./my-repo --config-dir ./my-checks --output results.sarif --output-format sarif
118
+ aghast scan ./my-repo --config-dir ./my-checks --fail-on-check-failure --debug
119
+ aghast scan ./my-repo --config-dir ./my-checks --log-file scan.log --log-level warn
120
120
  aghast scan ./my-repo --config-dir ./my-checks --model claude-sonnet-4-20250514`;
121
121
  function parseArgs(args) {
122
122
  if (args.length < 1 || args[0] === '--help' || args[0] === '-h') {
package/dist/new-check.js CHANGED
@@ -267,25 +267,25 @@ async function checkFileExists(path) {
267
267
  function generateSemgrepRule(checkId, language) {
268
268
  const langInfo = SUPPORTED_LANGUAGES[language];
269
269
  const semgrepLang = langInfo ? langInfo.semgrepId : 'javascript';
270
- return `rules:
271
- - id: ${checkId}
272
- pattern: |
273
- # TODO: Replace with your Semgrep pattern
274
- ...
275
- message: >
276
- TODO: Describe the issue this rule detects.
277
- languages: [${semgrepLang}]
278
- severity: WARNING
270
+ return `rules:
271
+ - id: ${checkId}
272
+ pattern: |
273
+ # TODO: Replace with your Semgrep pattern
274
+ ...
275
+ message: >
276
+ TODO: Describe the issue this rule detects.
277
+ languages: [${semgrepLang}]
278
+ severity: WARNING
279
279
  `;
280
280
  }
281
281
  function generateSemgrepTestFile(checkId, language) {
282
282
  const langInfo = SUPPORTED_LANGUAGES[language];
283
283
  const comment = langInfo ? langInfo.commentPrefix : '#';
284
- return `${comment} ruleid: ${checkId}
285
- ${comment} TODO: Add code that SHOULD be matched by the rule
286
-
287
- ${comment} ok: ${checkId}
288
- ${comment} TODO: Add code that should NOT be matched by the rule
284
+ return `${comment} ruleid: ${checkId}
285
+ ${comment} TODO: Add code that SHOULD be matched by the rule
286
+
287
+ ${comment} ok: ${checkId}
288
+ ${comment} TODO: Add code that should NOT be matched by the rule
289
289
  `;
290
290
  }
291
291
  // --- File Generation ---
@@ -299,16 +299,16 @@ function generateMarkdown(inputs) {
299
299
  if (inputs.flagCondition) {
300
300
  resultLines += `\n- **FLAG**: ${inputs.flagCondition}`;
301
301
  }
302
- return `### ${inputs.name}
303
-
304
- #### Overview
305
- ${inputs.checkOverview}
306
-
307
- #### What to Check
308
- ${itemLines}
309
-
310
- #### Result
311
- ${resultLines}
302
+ return `### ${inputs.name}
303
+
304
+ #### Overview
305
+ ${inputs.checkOverview}
306
+
307
+ #### What to Check
308
+ ${itemLines}
309
+
310
+ #### Result
311
+ ${resultLines}
312
312
  `;
313
313
  }
314
314
  function generateCheckDefinition(inputs) {
@@ -369,58 +369,58 @@ function generateRegistryEntry(inputs) {
369
369
  };
370
370
  }
371
371
  // --- Main ---
372
- const NEW_CHECK_HELP = `Usage: aghast new-check --config-dir <path> [options]
373
-
374
- Scaffold a new security check. Runs interactively by default, prompting for any
375
- values not provided via flags. If the config directory does not exist, it will be
376
- created with an empty checks-config.json.
377
-
378
- Options:
379
- --config-dir <path> Config directory containing checks-config.json and
380
- checks/ folder. Created if it does not exist.
381
- Required unless AGHAST_CONFIG_DIR is set.
382
- --id <id> Check ID (will be prefixed with "aghast-" if needed)
383
- --name <name> Human-readable check name (e.g. "XSS Prevention")
384
- --severity <level> Severity: critical, high, medium, low, informational
385
- --confidence <level> Confidence: high, medium, low
386
- --model <model> AI model override for this check (e.g. claude-sonnet-4-6)
387
- --repositories <urls> Comma-separated repository URLs (empty = all repos)
388
- --check-overview <text> Description of what this check does
389
- --check-items <items> Comma-separated list of things to check
390
- --pass-condition <text> Condition for a PASS result
391
- --fail-condition <text> Condition for a FAIL result
392
- --flag-condition <text> Condition for a FLAG result (optional)
393
- --check-type <type> Check type (default: targeted). See 'Check types' below
394
- --discovery <name> Discovery mechanism for targeted/static checks. See below
395
- --semgrep-rules <paths> Comma-separated Semgrep rule file paths (for semgrep discovery)
396
- --sarif-file <path> SARIF file path in check definition, relative to repo (for sarif discovery)
397
- --analysis-mode <mode> Analysis mode for targeted checks (default: custom). See below
398
- --max-targets <n> Maximum number of targets to analyze
399
- --language <lang> Language for Semgrep template: python, javascript, typescript
400
- -h, --help Show this help message
401
-
402
- Environment variables:
403
- AGHAST_CONFIG_DIR Default config directory (CLI --config-dir takes precedence)
404
-
405
- Check types:
406
- repository AI analyzes the whole repository
407
- targeted Discovery finds specific targets, AI analyzes each one
408
- static Discovery finds targets, mapped directly to issues (no AI)
409
-
410
- Discovery mechanisms:
411
- semgrep Semgrep rules find targets (targeted or static)
412
- openant OpenAnt code analysis finds units (targeted only)
413
- sarif External SARIF file provides findings (targeted only)
414
-
415
- Analysis modes (targeted checks only):
416
- custom Use a custom instructions markdown file (default)
417
- false-positive-validation AI validates each finding as true/false positive (semgrep, sarif)
418
- general-vuln-discovery AI scans each target for general security vulnerabilities (all)
419
-
420
- Examples:
421
- aghast new-check --config-dir ./my-checks
422
- aghast new-check --config-dir ./my-checks --id xss --name "XSS Prevention"
423
- aghast new-check --config-dir ./my-checks --check-type targeted --discovery semgrep --language typescript
372
+ const NEW_CHECK_HELP = `Usage: aghast new-check --config-dir <path> [options]
373
+
374
+ Scaffold a new security check. Runs interactively by default, prompting for any
375
+ values not provided via flags. If the config directory does not exist, it will be
376
+ created with an empty checks-config.json.
377
+
378
+ Options:
379
+ --config-dir <path> Config directory containing checks-config.json and
380
+ checks/ folder. Created if it does not exist.
381
+ Required unless AGHAST_CONFIG_DIR is set.
382
+ --id <id> Check ID (will be prefixed with "aghast-" if needed)
383
+ --name <name> Human-readable check name (e.g. "XSS Prevention")
384
+ --severity <level> Severity: critical, high, medium, low, informational
385
+ --confidence <level> Confidence: high, medium, low
386
+ --model <model> AI model override for this check (e.g. claude-sonnet-4-6)
387
+ --repositories <urls> Comma-separated repository URLs (empty = all repos)
388
+ --check-overview <text> Description of what this check does
389
+ --check-items <items> Comma-separated list of things to check
390
+ --pass-condition <text> Condition for a PASS result
391
+ --fail-condition <text> Condition for a FAIL result
392
+ --flag-condition <text> Condition for a FLAG result (optional)
393
+ --check-type <type> Check type (default: targeted). See 'Check types' below
394
+ --discovery <name> Discovery mechanism for targeted/static checks. See below
395
+ --semgrep-rules <paths> Comma-separated Semgrep rule file paths (for semgrep discovery)
396
+ --sarif-file <path> SARIF file path in check definition, relative to repo (for sarif discovery)
397
+ --analysis-mode <mode> Analysis mode for targeted checks (default: custom). See below
398
+ --max-targets <n> Maximum number of targets to analyze
399
+ --language <lang> Language for Semgrep template: python, javascript, typescript
400
+ -h, --help Show this help message
401
+
402
+ Environment variables:
403
+ AGHAST_CONFIG_DIR Default config directory (CLI --config-dir takes precedence)
404
+
405
+ Check types:
406
+ repository AI analyzes the whole repository
407
+ targeted Discovery finds specific targets, AI analyzes each one
408
+ static Discovery finds targets, mapped directly to issues (no AI)
409
+
410
+ Discovery mechanisms:
411
+ semgrep Semgrep rules find targets (targeted or static)
412
+ openant OpenAnt code analysis finds units (targeted only)
413
+ sarif External SARIF file provides findings (targeted only)
414
+
415
+ Analysis modes (targeted checks only):
416
+ custom Use a custom instructions markdown file (default)
417
+ false-positive-validation AI validates each finding as true/false positive (semgrep, sarif)
418
+ general-vuln-discovery AI scans each target for general security vulnerabilities (all)
419
+
420
+ Examples:
421
+ aghast new-check --config-dir ./my-checks
422
+ aghast new-check --config-dir ./my-checks --id xss --name "XSS Prevention"
423
+ aghast new-check --config-dir ./my-checks --check-type targeted --discovery semgrep --language typescript
424
424
  aghast new-check --config-dir ./my-checks --check-type targeted --discovery sarif --sarif-file ./sast-results.sarif`;
425
425
  export async function runNewCheck(args) {
426
426
  if (args.includes('--help') || args.includes('-h')) {
package/dist/stats.js CHANGED
@@ -10,25 +10,25 @@ import 'dotenv/config';
10
10
  import { ERROR_CODES, formatError } from './error-codes.js';
11
11
  import { queryScanHistory } from './scan-history.js';
12
12
  import { formatCostSourceLabel } from './cost-calculator.js';
13
- const STATS_HELP = `Usage: aghast stats [options]
14
-
15
- Print a cost summary from the scan history (~/.aghast/history.json).
16
-
17
- Options:
18
- --repo <substring> Filter to scans whose repository path or URL contains
19
- the substring. Matches loosely — "alpha" matches both
20
- "/repos/alpha" and "/repos/alpha2".
21
- --model <substring> Filter to scans that used a model containing the
22
- substring (loose match).
23
- --since <iso-time> Only include scans started at or after this timestamp
24
- --until <iso-time> Only include scans started at or before this timestamp
25
- --json Output raw JSON instead of a formatted table
26
- --history-file <path> Override the history file path (default: ~/.aghast/history.json)
27
- --help Show this help message
28
-
29
- Examples:
30
- aghast stats
31
- aghast stats --repo my-org/my-repo --since 2026-01-01
13
+ const STATS_HELP = `Usage: aghast stats [options]
14
+
15
+ Print a cost summary from the scan history (~/.aghast/history.json).
16
+
17
+ Options:
18
+ --repo <substring> Filter to scans whose repository path or URL contains
19
+ the substring. Matches loosely — "alpha" matches both
20
+ "/repos/alpha" and "/repos/alpha2".
21
+ --model <substring> Filter to scans that used a model containing the
22
+ substring (loose match).
23
+ --since <iso-time> Only include scans started at or after this timestamp
24
+ --until <iso-time> Only include scans started at or before this timestamp
25
+ --json Output raw JSON instead of a formatted table
26
+ --history-file <path> Override the history file path (default: ~/.aghast/history.json)
27
+ --help Show this help message
28
+
29
+ Examples:
30
+ aghast stats
31
+ aghast stats --repo my-org/my-repo --since 2026-01-01
32
32
  aghast stats --model claude-sonnet --json`;
33
33
  function parseStatsArgs(args) {
34
34
  if (args.includes('--help') || args.includes('-h')) {
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "@owasp-aghast/aghast",
3
- "version": "0.8.0-beta.0",
4
- "description": "AI Guided Hybrid Application Static Testing",
5
- "type": "module",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/owasp-aghast/aghast.git"
9
- },
10
- "bin": {
11
- "aghast": "dist/cli.js"
12
- },
13
- "files": [
14
- "dist/",
15
- "config/",
16
- "assets/"
17
- ],
18
- "scripts": {
19
- "prepare": "tsc",
20
- "build": "tsc",
21
- "test": "node --import tsx --test tests/*.test.ts",
22
- "test:coverage": "node --experimental-test-coverage --import tsx --test tests/*.test.ts",
23
- "test:ci": "node --import tsx --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml tests/*.test.ts",
24
- "test:semgrep": "node --import tsx --test tests/semgrep-integration.itest.ts",
25
- "test:openant": "node --import tsx --test tests/openant-integration.itest.ts",
26
- "test:opencode": "node --import tsx --test --test-force-exit tests/opencode-integration.itest.ts",
27
- "lint": "eslint src/ tests/",
28
- "lint:fix": "eslint --fix src/ tests/",
29
- "scan": "tsx src/cli.ts scan",
30
- "new-check": "tsx src/cli.ts new-check",
31
- "build-config": "tsx src/cli.ts build-config"
32
- },
33
- "keywords": [],
34
- "author": "",
35
- "license": "AGPL-3.0-or-later",
36
- "engines": {
37
- "node": ">=20.0.0"
38
- },
39
- "packageManager": "npm@10.9.2",
40
- "devDependencies": {
41
- "@eslint/js": "^10.0.1",
42
- "@types/node": "^25.5.0",
43
- "@types/picomatch": "^4.0.2",
44
- "eslint": "^10.0.3",
45
- "fast-check": "^4.6.0",
46
- "tsx": "^4.21.0",
47
- "typescript": "~6.0.2",
48
- "typescript-eslint": "^8.57.1"
49
- },
50
- "dependencies": {
51
- "@anthropic-ai/claude-agent-sdk": "^0.3.144",
52
- "@opencode-ai/sdk": "^1.4.6",
53
- "dotenv": "^17.3.1",
54
- "picocolors": "^1.1.1",
55
- "picomatch": "^4.0.4"
56
- },
57
- "overrides": {
58
- "minimatch@<10.2.3": ">=10.2.3",
59
- "@anthropic-ai/sdk@<0.91.1": ">=0.91.1"
60
- }
61
- }
1
+ {
2
+ "name": "@owasp-aghast/aghast",
3
+ "version": "0.8.0-beta.1",
4
+ "description": "AI Guided Hybrid Application Static Testing",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/owasp-aghast/aghast.git"
9
+ },
10
+ "bin": {
11
+ "aghast": "dist/cli.js"
12
+ },
13
+ "files": [
14
+ "dist/",
15
+ "config/",
16
+ "assets/"
17
+ ],
18
+ "scripts": {
19
+ "prepare": "tsc",
20
+ "build": "tsc",
21
+ "test": "node --import tsx --test tests/*.test.ts",
22
+ "test:coverage": "node --experimental-test-coverage --import tsx --test tests/*.test.ts",
23
+ "test:ci": "node --import tsx --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml tests/*.test.ts",
24
+ "test:semgrep": "node --import tsx --test tests/semgrep-integration.itest.ts",
25
+ "test:openant": "node --import tsx --test tests/openant-integration.itest.ts",
26
+ "test:opencode": "node --import tsx --test --test-force-exit tests/opencode-integration.itest.ts",
27
+ "lint": "eslint src/ tests/",
28
+ "lint:fix": "eslint --fix src/ tests/",
29
+ "scan": "tsx src/cli.ts scan",
30
+ "new-check": "tsx src/cli.ts new-check",
31
+ "build-config": "tsx src/cli.ts build-config"
32
+ },
33
+ "keywords": [],
34
+ "author": "",
35
+ "license": "AGPL-3.0-or-later",
36
+ "engines": {
37
+ "node": ">=20.0.0"
38
+ },
39
+ "packageManager": "npm@10.9.2",
40
+ "devDependencies": {
41
+ "@eslint/js": "^10.0.1",
42
+ "@types/node": "^25.5.0",
43
+ "@types/picomatch": "^4.0.2",
44
+ "eslint": "^10.0.3",
45
+ "fast-check": "^4.6.0",
46
+ "tsx": "^4.21.0",
47
+ "typescript": "~6.0.2",
48
+ "typescript-eslint": "^8.57.1"
49
+ },
50
+ "dependencies": {
51
+ "@anthropic-ai/claude-agent-sdk": "^0.3.144",
52
+ "@opencode-ai/sdk": "^1.4.6",
53
+ "dotenv": "^17.3.1",
54
+ "picocolors": "^1.1.1",
55
+ "picomatch": "^4.0.4"
56
+ },
57
+ "overrides": {
58
+ "minimatch@<10.2.3": ">=10.2.3",
59
+ "@anthropic-ai/sdk@<0.91.1": ">=0.91.1"
60
+ }
61
+ }
@@ -1,21 +0,0 @@
1
- /**
2
- * Lightweight mock AI provider for CLI `AGHAST_MOCK_AI` mode.
3
- *
4
- * Returns a fixed raw response without calling any AI API.
5
- * This is shipped with the package (unlike the full test mock in tests/mocks/).
6
- */
7
- import type { AIProvider, AIResponse, ProviderConfig } from './types.js';
8
- export declare class MockAIProvider implements AIProvider {
9
- private rawResponse;
10
- constructor(options: {
11
- rawResponse: string;
12
- });
13
- initialize(_config: ProviderConfig): Promise<void>;
14
- executeCheck(_instructions: string, _repositoryPath: string, _logPrefix?: string, _options?: {
15
- maxTurns?: number;
16
- }): Promise<AIResponse>;
17
- validateConfig(): Promise<boolean>;
18
- setModel(_model: string): void;
19
- enableDebug(): void;
20
- }
21
- //# sourceMappingURL=mock-ai-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-ai-provider.d.ts","sourceRoot":"","sources":["../src/mock-ai-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzE,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,WAAW,CAAS;gBAEhB,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE;IAItC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD,YAAY,CAChB,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAC/B,OAAO,CAAC,UAAU,CAAC;IAOhB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAIxC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI9B,WAAW,IAAI,IAAI;CAGpB"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Lightweight mock AI provider for CLI `AGHAST_MOCK_AI` mode.
3
- *
4
- * Returns a fixed raw response without calling any AI API.
5
- * This is shipped with the package (unlike the full test mock in tests/mocks/).
6
- */
7
- export class MockAIProvider {
8
- rawResponse;
9
- constructor(options) {
10
- this.rawResponse = options.rawResponse;
11
- }
12
- async initialize(_config) {
13
- // No-op
14
- }
15
- async executeCheck(_instructions, _repositoryPath, _logPrefix, _options) {
16
- return {
17
- raw: this.rawResponse,
18
- parsed: undefined,
19
- };
20
- }
21
- async validateConfig() {
22
- return true;
23
- }
24
- setModel(_model) {
25
- // No-op for mock provider
26
- }
27
- enableDebug() {
28
- // No-op
29
- }
30
- }
31
- //# sourceMappingURL=mock-ai-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-ai-provider.js","sourceRoot":"","sources":["../src/mock-ai-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,OAAO,cAAc;IACjB,WAAW,CAAS;IAE5B,YAAY,OAAgC;QAC1C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAAuB;QACtC,QAAQ;IACV,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,aAAqB,EACrB,eAAuB,EACvB,UAAmB,EACnB,QAAgC;QAEhC,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,WAAW;YACrB,MAAM,EAAE,SAAS;SAClB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,MAAc;QACrB,0BAA0B;IAC5B,CAAC;IAED,WAAW;QACT,QAAQ;IACV,CAAC;CACF"}