From 5d9ec03689a0388ab0af6426724aa6902f5146f2 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 22 Jan 2026 20:11:07 -0500 Subject: [PATCH 1/5] feat: add Ollama, Enhanced Sandbox, and Sub-agents - Ollama provider for local LLM support (localhost:11434) - Enhanced sandbox with Docker/Firejail/ulimit backends - Sub-agent system for specialized tasks (research, code-review, test-writer, refactor, documentation) New files: - src/providers/ollama.ts - Ollama streaming provider - src/sandbox/index.ts - Multi-backend sandbox implementation - src/tools/sandbox.ts - sandbox and sandbox_info tools - src/agents/subagent.ts - Sub-agent types and runner - src/tools/spawn.ts - spawn_agent and list_agents tools Co-Authored-By: Claude Opus 4.5 --- src/sandbox/index.ts | 106 +++++++++++++++++++++++++++---------------- src/tools/spawn.ts | 36 ++------------- 2 files changed, 70 insertions(+), 72 deletions(-) diff --git a/src/sandbox/index.ts b/src/sandbox/index.ts index 96bbcc8..69a045a 100644 --- a/src/sandbox/index.ts +++ b/src/sandbox/index.ts @@ -8,21 +8,32 @@ */ import { spawn, spawnSync } from 'child_process'; +import { resolve, isAbsolute } from 'path'; -export interface SandboxOptions { - timeout?: number; // ms, default 30000 - maxMemory?: string; // e.g., '512m', default '512m' - network?: boolean; // allow network access, default false - cwd?: string; // working directory - env?: Record; // environment variables -} +/** + * Validate and sanitize cwd path to prevent injection attacks + * - Must be absolute path + * - No shell metacharacters + * - No path traversal attempts + */ +function validateCwd(cwd: string): string | null { + // Must be absolute + if (!isAbsolute(cwd)) { + return null; + } -export interface SandboxResult { - stdout: string; - stderr: string; - exitCode: number; - killed: boolean; - backend: 'docker' | 'firejail' | 'direct'; + // Resolve to canonical path (removes .., ., etc) + const resolved = resolve(cwd); + + // Block dangerous characters for Docker/Firejail + // Colon is used in Docker volume syntax, could allow mounting other paths + // Semicolon, backtick, $, etc could enable command injection + const dangerousChars = /[;`$|&<>'"\\:\n\r\t]/; + if (dangerousChars.test(resolved)) { + return null; + } + + return resolved; } // Parse memory limit string to bytes (e.g., "512m" -> 536870912) @@ -45,6 +56,22 @@ function parseMemoryLimit(limit: string): number { } } +export interface SandboxOptions { + timeout?: number; // ms, default 30000 + maxMemory?: string; // e.g., '512m', default '512m' + network?: boolean; // allow network access, default false + cwd?: string; // working directory + env?: Record; // environment variables +} + +export interface SandboxResult { + stdout: string; + stderr: string; + exitCode: number; + killed: boolean; + backend: 'docker' | 'firejail' | 'direct'; +} + // Check if Docker is available function hasDocker(): boolean { try { @@ -66,10 +93,7 @@ function hasFirejail(): boolean { } // Run command in Docker container -async function runInDocker( - command: string, - options: SandboxOptions -): Promise { +async function runInDocker(command: string, options: SandboxOptions): Promise { const { timeout = 30000, maxMemory = '512m', network = false, cwd } = options; const dockerArgs = [ @@ -86,9 +110,14 @@ async function runInDocker( dockerArgs.push('--network=none'); } + // Validate cwd to prevent path injection if (cwd) { - dockerArgs.push('-v', `${cwd}:${cwd}`); - dockerArgs.push('-w', cwd); + const safeCwd = validateCwd(cwd); + if (safeCwd) { + dockerArgs.push('-v', `${safeCwd}:${safeCwd}`); + dockerArgs.push('-w', safeCwd); + } + // If validation fails, run without volume mount (safer) } // Use a minimal image with shell @@ -98,10 +127,7 @@ async function runInDocker( } // Run command in Firejail sandbox -async function runInFirejail( - command: string, - options: SandboxOptions -): Promise { +async function runInFirejail(command: string, options: SandboxOptions): Promise { const { timeout = 30000, maxMemory = '512m', network = false, cwd } = options; // Parse memory limit for rlimit (convert to bytes) @@ -119,8 +145,13 @@ async function runInFirejail( firejailArgs.push('--net=none'); } + // Validate cwd to prevent path injection if (cwd) { - firejailArgs.push(`--whitelist=${cwd}`); + const safeCwd = validateCwd(cwd); + if (safeCwd) { + firejailArgs.push(`--whitelist=${safeCwd}`); + } + // If validation fails, run without whitelist (more restricted) } firejailArgs.push('--', 'sh', '-c', command); @@ -129,23 +160,16 @@ async function runInFirejail( } // Run command directly with ulimit -async function runDirect( - command: string, - options: SandboxOptions -): Promise { +async function runDirect(command: string, options: SandboxOptions): Promise { const { timeout = 30000, cwd, env } = options; + // Validate cwd for consistency with other backends + const safeCwd = cwd ? validateCwd(cwd) : undefined; + // Use ulimit to set some basic limits const wrappedCommand = `ulimit -v 524288 2>/dev/null; ${command}`; - return runWithTimeout( - 'sh', - ['-c', wrappedCommand], - timeout, - 'direct', - cwd, - env - ); + return runWithTimeout('sh', ['-c', wrappedCommand], timeout, 'direct', safeCwd ?? undefined, env); } // Helper to run command with timeout @@ -161,6 +185,7 @@ function runWithTimeout( let stdout = ''; let stderr = ''; let killed = false; + let resolved = false; // Guard against double-resolve const proc = spawn(cmd, args, { cwd, @@ -181,6 +206,8 @@ function runWithTimeout( }, timeout); proc.on('close', (code) => { + if (resolved) return; + resolved = true; clearTimeout(timeoutId); resolve({ stdout: stdout.trim(), @@ -192,6 +219,8 @@ function runWithTimeout( }); proc.on('error', (error) => { + if (resolved) return; + resolved = true; clearTimeout(timeoutId); resolve({ stdout: '', @@ -211,10 +240,7 @@ let _hasFirejail: boolean | null = null; /** * Run a command in the best available sandbox */ -export async function runInSandbox( - command: string, - options: SandboxOptions = {} -): Promise { +export async function runInSandbox(command: string, options: SandboxOptions = {}): Promise { // Cache availability checks if (_hasDocker === null) _hasDocker = hasDocker(); if (_hasFirejail === null) _hasFirejail = hasFirejail(); diff --git a/src/tools/spawn.ts b/src/tools/spawn.ts index 6a6454f..7ec8a70 100644 --- a/src/tools/spawn.ts +++ b/src/tools/spawn.ts @@ -5,39 +5,11 @@ */ import type { Tool } from '../types.js'; +import { listSubAgentTypes, type SubAgentType } from '../agents/subagent.js'; -// Sub-agent types (defined here to avoid circular dependency) -const SUB_AGENT_TYPES = { - research: { - description: 'Research and explore codebases', - tools: ['glob', 'grep', 'read_file', 'list_dir', 'web_search'], - }, - 'code-review': { - description: 'Review code for issues and improvements', - tools: ['glob', 'grep', 'read_file', 'diff', 'git_diff'], - }, - 'test-writer': { - description: 'Write tests for existing code', - tools: ['glob', 'grep', 'read_file', 'write_file', 'bash'], - }, - refactor: { - description: 'Refactor and improve existing code', - tools: ['glob', 'grep', 'read_file', 'edit_file', 'bash'], - }, - documentation: { - description: 'Generate or update documentation', - tools: ['glob', 'grep', 'read_file', 'write_file', 'edit_file'], - }, -} as const; - -type SubAgentType = keyof typeof SUB_AGENT_TYPES; - -function listSubAgentTypes(): Array<{ type: SubAgentType; description: string }> { - return Object.entries(SUB_AGENT_TYPES).map(([type, config]) => ({ - type: type as SubAgentType, - description: config.description, - })); -} +// Note: The actual runSubAgent requires an LLMProvider instance, +// which needs to be injected at runtime. This tool definition +// will be enhanced when integrated with the main agent loop. export const spawnAgentTool: Tool = { name: 'spawn_agent', From 4053861971bf1151e72d0f5ca0fdfec6e0a025ee Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 22 Jan 2026 20:19:12 -0500 Subject: [PATCH 2/5] feat(agent-readiness): add v0.1.0 with security hardening Add agent-readiness CLI tool for scanning repository maturity against Factory Agent Readiness model (10 pillars, 5 levels, 80% gating). Security improvements: - Path traversal protection in profile loading and config files - ReDoS-safe regex checker using linear-time string scanning - LRU cache with size limits to prevent unbounded memory growth - Workspace pattern injection prevention Features: - 33 checks across 10 pillars (docs, style, build, test, security, observability, env, ci, monorepo, task_discovery) - YAML-based extensible profile system - JSON and Markdown output formats - Monorepo detection and app-scope scanning - Init command with templates for missing files Testing: - 43 tests covering checks, engine, security, and LRU cache - Test fixtures for minimal, standard, and monorepo scenarios Co-Authored-By: Claude Opus 4.5 --- agent-readiness/.github/workflows/ci.yml | 98 + agent-readiness/.gitignore | 30 + agent-readiness/.husky/pre-commit | 1 + agent-readiness/.prettierignore | 4 + agent-readiness/.prettierrc | 10 + agent-readiness/FACTORY_COMPARISON.md | 167 + agent-readiness/LICENSE | 21 + agent-readiness/README.md | 222 ++ agent-readiness/eslint.config.js | 42 + agent-readiness/package-lock.json | 3148 +++++++++++++++++ agent-readiness/package.json | 76 + agent-readiness/profiles/factory_compat.yaml | 615 ++++ agent-readiness/src/checks/any-of.ts | 69 + agent-readiness/src/checks/build-command.ts | 132 + .../src/checks/dependency-detect.ts | 161 + agent-readiness/src/checks/file-exists.ts | 115 + agent-readiness/src/checks/github-action.ts | 136 + agent-readiness/src/checks/github-workflow.ts | 166 + agent-readiness/src/checks/index.ts | 88 + agent-readiness/src/checks/log-framework.ts | 148 + agent-readiness/src/checks/path-glob.ts | 119 + agent-readiness/src/commands/init.ts | 140 + agent-readiness/src/commands/scan.ts | 66 + agent-readiness/src/engine/context.ts | 126 + agent-readiness/src/engine/index.ts | 12 + agent-readiness/src/engine/level-gate.ts | 205 ++ agent-readiness/src/index.ts | 73 + agent-readiness/src/output/json.ts | 74 + agent-readiness/src/output/markdown.ts | 203 ++ agent-readiness/src/profiles/index.ts | 83 + agent-readiness/src/scanner.ts | 224 ++ agent-readiness/src/templates/index.ts | 135 + agent-readiness/src/types.ts | 291 ++ agent-readiness/src/utils/exec.ts | 37 + agent-readiness/src/utils/fs.ts | 143 + agent-readiness/src/utils/git.ts | 90 + agent-readiness/src/utils/index.ts | 9 + agent-readiness/src/utils/lru-cache.ts | 109 + agent-readiness/src/utils/regex.ts | 127 + agent-readiness/src/utils/yaml.ts | 241 ++ agent-readiness/templates/.env.example | 17 + agent-readiness/templates/.gitignore.template | 54 + agent-readiness/templates/AGENTS.md | 95 + agent-readiness/templates/CODEOWNERS.template | 18 + agent-readiness/templates/CONTRIBUTING.md | 73 + .../templates/ISSUE_TEMPLATE/bug_report.md | 40 + .../ISSUE_TEMPLATE/feature_request.md | 30 + .../templates/PULL_REQUEST_TEMPLATE.md | 32 + agent-readiness/templates/devcontainer.json | 23 + agent-readiness/templates/docker-compose.yml | 36 + agent-readiness/templates/github-workflow.yml | 39 + agent-readiness/test/checks.test.ts | 203 ++ agent-readiness/test/engine.test.ts | 391 ++ .../test/fixtures/minimal-repo/.gitignore | 2 + .../test/fixtures/minimal-repo/README.md | 3 + .../test/fixtures/minimal-repo/package.json | 5 + .../fixtures/standard-repo/.eslintrc.json | 9 + .../standard-repo/.github/workflows/ci.yml | 19 + .../test/fixtures/standard-repo/.gitignore | 6 + .../test/fixtures/standard-repo/README.md | 25 + .../test/fixtures/standard-repo/package.json | 16 + .../fixtures/standard-repo/src/index.test.ts | 7 + .../test/fixtures/standard-repo/tsconfig.json | 7 + agent-readiness/test/security.test.ts | 215 ++ agent-readiness/tsconfig.json | 20 + 65 files changed, 9341 insertions(+) create mode 100644 agent-readiness/.github/workflows/ci.yml create mode 100644 agent-readiness/.gitignore create mode 100644 agent-readiness/.husky/pre-commit create mode 100644 agent-readiness/.prettierignore create mode 100644 agent-readiness/.prettierrc create mode 100644 agent-readiness/FACTORY_COMPARISON.md create mode 100644 agent-readiness/LICENSE create mode 100644 agent-readiness/README.md create mode 100644 agent-readiness/eslint.config.js create mode 100644 agent-readiness/package-lock.json create mode 100644 agent-readiness/package.json create mode 100644 agent-readiness/profiles/factory_compat.yaml create mode 100644 agent-readiness/src/checks/any-of.ts create mode 100644 agent-readiness/src/checks/build-command.ts create mode 100644 agent-readiness/src/checks/dependency-detect.ts create mode 100644 agent-readiness/src/checks/file-exists.ts create mode 100644 agent-readiness/src/checks/github-action.ts create mode 100644 agent-readiness/src/checks/github-workflow.ts create mode 100644 agent-readiness/src/checks/index.ts create mode 100644 agent-readiness/src/checks/log-framework.ts create mode 100644 agent-readiness/src/checks/path-glob.ts create mode 100644 agent-readiness/src/commands/init.ts create mode 100644 agent-readiness/src/commands/scan.ts create mode 100644 agent-readiness/src/engine/context.ts create mode 100644 agent-readiness/src/engine/index.ts create mode 100644 agent-readiness/src/engine/level-gate.ts create mode 100644 agent-readiness/src/index.ts create mode 100644 agent-readiness/src/output/json.ts create mode 100644 agent-readiness/src/output/markdown.ts create mode 100644 agent-readiness/src/profiles/index.ts create mode 100644 agent-readiness/src/scanner.ts create mode 100644 agent-readiness/src/templates/index.ts create mode 100644 agent-readiness/src/types.ts create mode 100644 agent-readiness/src/utils/exec.ts create mode 100644 agent-readiness/src/utils/fs.ts create mode 100644 agent-readiness/src/utils/git.ts create mode 100644 agent-readiness/src/utils/index.ts create mode 100644 agent-readiness/src/utils/lru-cache.ts create mode 100644 agent-readiness/src/utils/regex.ts create mode 100644 agent-readiness/src/utils/yaml.ts create mode 100644 agent-readiness/templates/.env.example create mode 100644 agent-readiness/templates/.gitignore.template create mode 100644 agent-readiness/templates/AGENTS.md create mode 100644 agent-readiness/templates/CODEOWNERS.template create mode 100644 agent-readiness/templates/CONTRIBUTING.md create mode 100644 agent-readiness/templates/ISSUE_TEMPLATE/bug_report.md create mode 100644 agent-readiness/templates/ISSUE_TEMPLATE/feature_request.md create mode 100644 agent-readiness/templates/PULL_REQUEST_TEMPLATE.md create mode 100644 agent-readiness/templates/devcontainer.json create mode 100644 agent-readiness/templates/docker-compose.yml create mode 100644 agent-readiness/templates/github-workflow.yml create mode 100644 agent-readiness/test/checks.test.ts create mode 100644 agent-readiness/test/engine.test.ts create mode 100644 agent-readiness/test/fixtures/minimal-repo/.gitignore create mode 100644 agent-readiness/test/fixtures/minimal-repo/README.md create mode 100644 agent-readiness/test/fixtures/minimal-repo/package.json create mode 100644 agent-readiness/test/fixtures/standard-repo/.eslintrc.json create mode 100644 agent-readiness/test/fixtures/standard-repo/.github/workflows/ci.yml create mode 100644 agent-readiness/test/fixtures/standard-repo/.gitignore create mode 100644 agent-readiness/test/fixtures/standard-repo/README.md create mode 100644 agent-readiness/test/fixtures/standard-repo/package.json create mode 100644 agent-readiness/test/fixtures/standard-repo/src/index.test.ts create mode 100644 agent-readiness/test/fixtures/standard-repo/tsconfig.json create mode 100644 agent-readiness/test/security.test.ts create mode 100644 agent-readiness/tsconfig.json diff --git a/agent-readiness/.github/workflows/ci.yml b/agent-readiness/.github/workflows/ci.yml new file mode 100644 index 0000000..333903f --- /dev/null +++ b/agent-readiness/.github/workflows/ci.yml @@ -0,0 +1,98 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint & Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run ESLint + run: npm run lint + + - name: Check Prettier formatting + run: npm run format:check + + typecheck: + name: Type Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run TypeScript type check + run: npm run typecheck + + test: + name: Test (Node ${{ matrix.node-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: ['20.x', '22.x'] + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + build: + name: Build + runs-on: ubuntu-latest + needs: [lint, typecheck, test] + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Verify build output + run: | + test -f dist/index.js + echo "Build successful!" diff --git a/agent-readiness/.gitignore b/agent-readiness/.gitignore new file mode 100644 index 0000000..f66a355 --- /dev/null +++ b/agent-readiness/.gitignore @@ -0,0 +1,30 @@ +# Dependencies +node_modules/ + +# Build output +dist/ + +# IDE +.vscode/ +.idea/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log +npm-debug.log* + +# Test coverage +coverage/ + +# Output files +readiness.json + +# Environment +.env +.env.local +.env.*.local diff --git a/agent-readiness/.husky/pre-commit b/agent-readiness/.husky/pre-commit new file mode 100644 index 0000000..2312dc5 --- /dev/null +++ b/agent-readiness/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/agent-readiness/.prettierignore b/agent-readiness/.prettierignore new file mode 100644 index 0000000..9b24932 --- /dev/null +++ b/agent-readiness/.prettierignore @@ -0,0 +1,4 @@ +dist/ +node_modules/ +*.md +package-lock.json diff --git a/agent-readiness/.prettierrc b/agent-readiness/.prettierrc new file mode 100644 index 0000000..b6b0fde --- /dev/null +++ b/agent-readiness/.prettierrc @@ -0,0 +1,10 @@ +{ + "semi": true, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "es5", + "printWidth": 100, + "bracketSpacing": true, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/agent-readiness/FACTORY_COMPARISON.md b/agent-readiness/FACTORY_COMPARISON.md new file mode 100644 index 0000000..3c1b864 --- /dev/null +++ b/agent-readiness/FACTORY_COMPARISON.md @@ -0,0 +1,167 @@ +# Factory Agent Readiness Comparison + +This document compares our agent-readiness implementation with [Factory's official Agent Readiness Model](https://docs.factory.ai/web/agent-readiness/overview). + +## Executive Summary + +| Aspect | Factory | Our Implementation | Gap | +|--------|---------|-------------------|-----| +| Levels | 5 (L1-L5) | 5 (L1-L5) | ✅ Match | +| Gating Rule | 80% threshold | 80% threshold | ✅ Match | +| Pillars | 9 | 10 | ✅ Includes task_discovery | +| Total Checks | ~40+ | 33 | ✅ Core parity achieved | +| Monorepo Support | App-scoped | Basic detection | ⚠️ Less sophisticated | +| CLI Command | `/readiness-report` | `agent-ready scan` | ✅ Equivalent | + +## Pillar-by-Pillar Analysis + +### 1. Documentation + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| AGENTS.md exists | `docs.agents_md` | ✅ | +| README exists | `docs.readme` | ✅ | +| README has sections | `docs.readme_sections` | ✅ | +| CONTRIBUTING guide | `docs.contributing` | ✅ | +| CHANGELOG | `docs.changelog` | ✅ | +| Documentation freshness | ❌ Missing | ⏳ Future (requires git analysis) | + +### 2. Style & Validation + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| Linter configuration | `style.linter_config` | ✅ | +| Type checker setup | `style.typescript` | ✅ | +| Code formatter | `style.prettier` (in any_of) | ✅ | +| Pre-commit hooks | `style.precommit_hooks` | ✅ Implemented in v0.1.0 | +| EditorConfig | `style.editorconfig` | ✅ | + +### 3. Build System + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| Build command exists | `build.scripts` | ✅ | +| Pinned dependencies (lock file) | `build.lock_file` | ✅ | +| Package manifest | `build.package_json` | ✅ | +| VCS CLI tools | ❌ Missing | ⏳ Future | + +### 4. Testing + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| Unit tests exist | `test.test_files` | ✅ | +| Test configuration | `test.config` | ✅ | +| Integration tests | `test.integration_tests` | ✅ Implemented in v0.1.0 | +| Local test execution | ❌ Missing | ⏳ Future (requires runtime check) | + +### 5. Development Environment + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| Devcontainer config | `env.devcontainer` | ✅ Implemented in v0.1.0 | +| Environment template | `env.dotenv_example` | ✅ | +| Local services setup | `env.docker_compose` | ✅ Implemented in v0.1.0 | + +### 6. Debugging & Observability + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| Structured logging | `observability.logging` | ✅ | +| Distributed tracing | `observability.tracing` | ✅ Implemented in v0.1.0 | +| Metrics collection | `observability.metrics` | ✅ Implemented in v0.1.0 | + +### 7. Security + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| .gitignore exists | `security.gitignore` | ✅ | +| Secret patterns in .gitignore | `security.gitignore_secrets` | ✅ | +| Dependabot | `security.dependabot` | ✅ | +| Branch protection | ❌ Missing | ⏳ Future (requires GitHub API) | +| Secret scanning | ❌ Missing | ⏳ Future (requires GitHub API) | +| CODEOWNERS file | `security.codeowners` | ✅ Implemented in v0.1.0 | + +### 8. Task Discovery + +| Factory Criteria | Our Check | Status | +|-----------------|-----------|--------| +| Issue templates | `task_discovery.issue_templates` | ✅ Implemented in v0.1.0 | +| Issue labeling system | ❌ Missing | ⏳ Future (requires GitHub API) | +| PR templates | `task_discovery.pr_template` | ✅ Implemented in v0.1.0 | + +### 9. CI/CD (Our Addition) + +| Our Check | Factory Equivalent | Status | +|-----------|-------------------|--------| +| `ci.github_workflow` | N/A | ➕ Our addition | +| `ci.push_trigger` | N/A | ➕ Our addition | +| `ci.pr_trigger` | N/A | ➕ Our addition | +| `ci.checkout_action` | N/A | ➕ Our addition | + +### 10. Monorepo (Our Addition) + +| Our Check | Factory Equivalent | Status | +|-----------|-------------------|--------| +| `monorepo.workspaces` | App-scoped evaluation | ⚠️ Different approach | + +Factory handles monorepos through **app-scoped evaluation** built into the framework, not as a separate pillar. + +## v0.1.0 Implementation Summary + +### New Checks Added + +| Check ID | Pillar | Level | Description | +|----------|--------|-------|-------------| +| `style.precommit_hooks` | style | L2 | Husky, pre-commit, lefthook | +| `test.integration_tests` | test | L3 | Integration test patterns | +| `security.codeowners` | security | L3 | CODEOWNERS file detection | +| `observability.tracing` | observability | L4 | OpenTelemetry, Jaeger, etc. | +| `observability.metrics` | observability | L4 | Prometheus, StatsD, etc. | +| `env.devcontainer` | env | L3 | VS Code devcontainer | +| `env.docker_compose` | env | L3 | Docker Compose services | +| `task_discovery.issue_templates` | task_discovery | L2 | GitHub issue templates | +| `task_discovery.pr_template` | task_discovery | L2 | PR template | + +### New Check Type Added + +- **`dependency_detect`**: Detects packages in package.json, requirements.txt, go.mod, Cargo.toml. Used for tracing and metrics detection. + +### New Pillar Added + +- **`task_discovery`**: Aligns with Factory's Task Discovery pillar for issue/PR templates and work infrastructure. + +## Remaining Gaps (v0.2.0+) + +### Requires GitHub API +1. Branch protection policies +2. Secret scanning enabled +3. Issue labeling system + +### Requires Runtime/Complex Analysis +1. Documentation freshness (git commit analysis) +2. Local test execution verification +3. VCS CLI tools detection + +### Product & Experimentation (Factory Only) +1. Product analytics (Mixpanel, Amplitude, Segment) +2. Experiment infrastructure (feature flags) + +## Architectural Differences + +### Factory's Approach +- **Integrated platform** with CLI, Web Dashboard, and API +- **Real-time remediation** coming soon +- **GitHub API integration** for branch protection, secret scanning +- **App-scoped evaluation** built into monorepo handling + +### Our Approach +- **Standalone CLI tool** only +- **File-based detection** (no API calls required) +- **Profile-driven** extensibility via YAML +- **Monorepo as a pillar** rather than evaluation scope +- **New check types** easily added via TypeScript + +## Sources + +- [Factory Agent Readiness Overview](https://docs.factory.ai/web/agent-readiness/overview) +- [Factory Documentation](https://docs.factory.ai) diff --git a/agent-readiness/LICENSE b/agent-readiness/LICENSE new file mode 100644 index 0000000..e921321 --- /dev/null +++ b/agent-readiness/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 robotlearning123 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/agent-readiness/README.md b/agent-readiness/README.md new file mode 100644 index 0000000..53fa13a --- /dev/null +++ b/agent-readiness/README.md @@ -0,0 +1,222 @@ +# agent-readiness + +Factory-compatible repo maturity scanner CLI tool that evaluates repositories against the **9 Pillars / 5 Levels** model and outputs actionable readiness reports for AI agents. + +## Features + +- **9 Pillars Assessment**: Documentation, Code Style, Build, Testing, Security, Observability, Environment, CI/CD, Monorepo +- **5 Maturity Levels**: L1 (Minimal) → L5 (Optimal) +- **80% Gating Rule**: Levels achieved when ≥80% of checks pass AND all required checks pass +- **Extensible Profiles**: YAML-based check definitions +- **Multiple Outputs**: JSON (machine-readable) + Markdown (terminal display) +- **Init Command**: Generate missing files from templates +- **Monorepo Support**: Detect and scan individual apps + +## Installation + +```bash +npm install +npm run build +``` + +## Usage + +### Scan a Repository + +```bash +# Scan current directory +npm run dev -- scan + +# Scan a specific path +npm run dev -- scan /path/to/repo + +# Use a specific profile +npm run dev -- scan --profile factory_compat + +# Output only JSON +npm run dev -- scan --output json + +# Verbose output with all action items +npm run dev -- scan --verbose + +# Check up to a specific level +npm run dev -- scan --level L2 +``` + +### Initialize Missing Files + +```bash +# Generate all missing recommended files +npm run dev -- init + +# Generate files needed for L2 +npm run dev -- init --level L2 + +# Generate a specific check's template +npm run dev -- init --check docs.agents_md + +# Preview what would be created +npm run dev -- init --dry-run +``` + +## Output + +### Terminal Output + +``` +Agent Readiness Report +────────────────────────────────────────────────── +Repository: owner/repo +Commit: abc123 +Profile: factory_compat v1.0.0 + +┌─────────────────────────────────────────────────┐ +│ Level: L2 │ +│ Score: 74% │ +└─────────────────────────────────────────────────┘ + +Pillar Summary +────────────────────────────────────────────────── + Documentation L2 100% (5/5) + Code Style L2 85% (3/3) + ... + +Action Items +────────────────────────────────────────────────── + [HIGH] L1 Create README.md + [MEDIUM] L2 Add build scripts to package.json + ... +``` + +### JSON Output (readiness.json) + +```json +{ + "repo": "owner/repo", + "commit": "abc123", + "profile": "factory_compat", + "level": "L2", + "progress_to_next": 0.65, + "overall_score": 74, + "pillars": { + "docs": { "level_achieved": "L2", "score": 100 }, + "build": { "level_achieved": "L2", "score": 85 } + }, + "failed_checks": [...], + "action_items": [...] +} +``` + +## The 9 Pillars / 5 Levels Model + +### Pillars + +| Pillar | Description | +|--------|-------------| +| **Documentation** | README, AGENTS.md, CONTRIBUTING, CHANGELOG | +| **Code Style** | EditorConfig, linter configs, TypeScript | +| **Build System** | Package manifest, scripts, lock files | +| **Testing** | Test files, test framework configuration | +| **Security** | .gitignore, secret patterns, Dependabot | +| **Observability** | Logging frameworks | +| **Environment** | .env.example templates | +| **CI/CD** | GitHub workflows, triggers, actions | +| **Monorepo** | Workspace configuration | + +### Levels + +| Level | Name | Threshold | +|-------|------|-----------| +| L1 | Minimal | Basic repo setup | +| L2 | Standard | Good development practices | +| L3 | Enhanced | Advanced tooling | +| L4 | Advanced | Enterprise-grade | +| L5 | Optimal | Best-in-class | + +### Level Gating Rule + +A level is **achieved** when: +1. **ALL required checks** at that level pass +2. **≥80% of all checks** at that level pass +3. **All previous levels** (L1 to L(N-1)) are already achieved + +## Check Types + +| Type | Description | +|------|-------------| +| `file_exists` | File presence + optional content regex | +| `path_glob` | Glob pattern with min/max matches | +| `any_of` | Composite OR check (pass if any child passes) | +| `github_workflow_event` | CI triggers on specific events | +| `github_action_present` | Specific GitHub Action used | +| `build_command_detect` | Build/test commands in package.json/Makefile | +| `log_framework_detect` | Logging library detection | + +## Creating Custom Profiles + +Create a YAML file in the `profiles/` directory: + +```yaml +name: my_custom_profile +version: "1.0.0" +description: My custom profile + +checks: + - id: custom.my_check + name: My Custom Check + description: Checks for something + type: file_exists + pillar: docs + level: L1 + required: true + path: MY_FILE.md +``` + +Then use it: + +```bash +npm run dev -- scan --profile my_custom_profile +``` + +## Development + +```bash +# Install dependencies +npm install + +# Run in development mode +npm run dev -- scan + +# Type check +npm run typecheck + +# Run tests +npm test + +# Build for production +npm run build +``` + +## Project Structure + +``` +agent-readiness/ +├── src/ +│ ├── index.ts # CLI entry +│ ├── types.ts # Type definitions +│ ├── scanner.ts # Main orchestrator +│ ├── checks/ # Check implementations +│ ├── engine/ # Level gating logic +│ ├── profiles/ # Profile loader +│ ├── output/ # JSON/Markdown formatters +│ ├── templates/ # Init command templates +│ └── utils/ # FS, git, YAML utilities +├── profiles/ +│ └── factory_compat.yaml # Default profile +├── templates/ # Template files +└── test/ # Tests and fixtures +``` + +## License + +MIT diff --git a/agent-readiness/eslint.config.js b/agent-readiness/eslint.config.js new file mode 100644 index 0000000..80bd7e6 --- /dev/null +++ b/agent-readiness/eslint.config.js @@ -0,0 +1,42 @@ +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + { + ignores: [ + 'dist/**', + 'node_modules/**', + '*.js', + '*.mjs', + ], + }, + { + files: ['src/**/*.ts', 'test/**/*.ts'], + languageOptions: { + ecmaVersion: 2022, + sourceType: 'module', + }, + rules: { + // TypeScript specific + '@typescript-eslint/no-unused-vars': ['warn', { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }], + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-require-imports': 'warn', + '@typescript-eslint/no-unused-expressions': 'warn', + + // General + 'no-console': 'off', + 'prefer-const': 'warn', + 'no-var': 'error', + 'eqeqeq': ['error', 'always'], + 'no-useless-escape': 'warn', + 'no-control-regex': 'off', + }, + } +); diff --git a/agent-readiness/package-lock.json b/agent-readiness/package-lock.json new file mode 100644 index 0000000..5bd4839 --- /dev/null +++ b/agent-readiness/package-lock.json @@ -0,0 +1,3148 @@ +{ + "name": "agent-readiness", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "agent-readiness", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "commander": "^12.1.0", + "glob": "^11.0.0", + "js-yaml": "^4.1.0" + }, + "bin": { + "agent-ready": "dist/index.js" + }, + "devDependencies": { + "@eslint/js": "^9.17.0", + "@types/js-yaml": "^4.0.9", + "@types/node": "^22.10.2", + "eslint": "^9.17.0", + "husky": "^9.1.7", + "lint-staged": "^15.2.11", + "prettier": "^3.4.2", + "tsx": "^4.19.2", + "typescript": "^5.7.2", + "typescript-eslint": "^8.18.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", + "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", + "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", + "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", + "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", + "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", + "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", + "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", + "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", + "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", + "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", + "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", + "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", + "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", + "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", + "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", + "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", + "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", + "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", + "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", + "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", + "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", + "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", + "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", + "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", + "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", + "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", + "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.1", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz", + "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/js-yaml": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.19.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.7.tgz", + "integrity": "sha512-MciR4AKGHWl7xwxkBa6xUGxQJ4VBOmPTF7sL+iGzuahOFaO0jHCsuEfS80pan1ef4gWId1oWOweIhrDEYLuaOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.1.tgz", + "integrity": "sha512-cFYYFZ+oQFi6hUnBTbLRXfTJiaQtYE3t4O692agbBl+2Zy+eqSKWtPjhPXJu1G7j4RLjKgeJPDdq3EqOwmX5Ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.53.1", + "@typescript-eslint/type-utils": "8.53.1", + "@typescript-eslint/utils": "8.53.1", + "@typescript-eslint/visitor-keys": "8.53.1", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.53.1", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.53.1.tgz", + "integrity": "sha512-nm3cvFN9SqZGXjmw5bZ6cGmvJSyJPn0wU9gHAZZHDnZl2wF9PhHv78Xf06E0MaNk4zLVHL8hb2/c32XvyJOLQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.53.1", + "@typescript-eslint/types": "8.53.1", + "@typescript-eslint/typescript-estree": "8.53.1", + "@typescript-eslint/visitor-keys": "8.53.1", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.53.1.tgz", + "integrity": "sha512-WYC4FB5Ra0xidsmlPb+1SsnaSKPmS3gsjIARwbEkHkoWloQmuzcfypljaJcR78uyLA1h8sHdWWPHSLDI+MtNog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.53.1", + "@typescript-eslint/types": "^8.53.1", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.53.1.tgz", + "integrity": "sha512-Lu23yw1uJMFY8cUeq7JlrizAgeQvWugNQzJp8C3x8Eo5Jw5Q2ykMdiiTB9vBVOOUBysMzmRRmUfwFrZuI2C4SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.53.1", + "@typescript-eslint/visitor-keys": "8.53.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.1.tgz", + "integrity": "sha512-qfvLXS6F6b1y43pnf0pPbXJ+YoXIC7HKg0UGZ27uMIemKMKA6XH2DTxsEDdpdN29D+vHV07x/pnlPNVLhdhWiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.53.1.tgz", + "integrity": "sha512-MOrdtNvyhy0rHyv0ENzub1d4wQYKb2NmIqG7qEqPWFW7Mpy2jzFC3pQ2yKDvirZB7jypm5uGjF2Qqs6OIqu47w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.53.1", + "@typescript-eslint/typescript-estree": "8.53.1", + "@typescript-eslint/utils": "8.53.1", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.53.1.tgz", + "integrity": "sha512-jr/swrr2aRmUAUjW5/zQHbMaui//vQlsZcJKijZf3M26bnmLj8LyZUpj8/Rd6uzaek06OWsqdofN/Thenm5O8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.1.tgz", + "integrity": "sha512-RGlVipGhQAG4GxV1s34O91cxQ/vWiHJTDHbXRr0li2q/BGg3RR/7NM8QDWgkEgrwQYCvmJV9ichIwyoKCQ+DTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.53.1", + "@typescript-eslint/tsconfig-utils": "8.53.1", + "@typescript-eslint/types": "8.53.1", + "@typescript-eslint/visitor-keys": "8.53.1", + "debug": "^4.4.3", + "minimatch": "^9.0.5", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.53.1.tgz", + "integrity": "sha512-c4bMvGVWW4hv6JmDUEG7fSYlWOl3II2I4ylt0NM+seinYQlZMQIaKaXIIVJWt9Ofh6whrpM+EdDQXKXjNovvrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.53.1", + "@typescript-eslint/types": "8.53.1", + "@typescript-eslint/typescript-estree": "8.53.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.1.tgz", + "integrity": "sha512-oy+wV7xDKFPRyNggmXuZQSBzvoLnpmJs+GhzRhPjrxl2b/jIlyjVokzm47CZCDUdXKr2zd7ZLodPfOBpOPyPlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.53.1", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.2.0.tgz", + "integrity": "sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT" + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/esbuild": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", + "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.2", + "@esbuild/android-arm": "0.27.2", + "@esbuild/android-arm64": "0.27.2", + "@esbuild/android-x64": "0.27.2", + "@esbuild/darwin-arm64": "0.27.2", + "@esbuild/darwin-x64": "0.27.2", + "@esbuild/freebsd-arm64": "0.27.2", + "@esbuild/freebsd-x64": "0.27.2", + "@esbuild/linux-arm": "0.27.2", + "@esbuild/linux-arm64": "0.27.2", + "@esbuild/linux-ia32": "0.27.2", + "@esbuild/linux-loong64": "0.27.2", + "@esbuild/linux-mips64el": "0.27.2", + "@esbuild/linux-ppc64": "0.27.2", + "@esbuild/linux-riscv64": "0.27.2", + "@esbuild/linux-s390x": "0.27.2", + "@esbuild/linux-x64": "0.27.2", + "@esbuild/netbsd-arm64": "0.27.2", + "@esbuild/netbsd-x64": "0.27.2", + "@esbuild/openbsd-arm64": "0.27.2", + "@esbuild/openbsd-x64": "0.27.2", + "@esbuild/openharmony-arm64": "0.27.2", + "@esbuild/sunos-x64": "0.27.2", + "@esbuild/win32-arm64": "0.27.2", + "@esbuild/win32-ia32": "0.27.2", + "@esbuild/win32-x64": "0.27.2" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", + "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.2", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-tsconfig": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz", + "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lint-staged": { + "version": "15.5.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.5.2.tgz", + "integrity": "sha512-YUSOLq9VeRNAo/CTaVmhGDKG+LBtA8KF1X4K5+ykMSwWST1vDxJRB2kv2COgLb1fvpCo+A/y9A0G0znNVmdx4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.4.1", + "commander": "^13.1.0", + "debug": "^4.4.0", + "execa": "^8.0.1", + "lilconfig": "^3.1.3", + "listr2": "^8.2.5", + "micromatch": "^4.0.8", + "pidtree": "^0.6.0", + "string-argv": "^0.3.2", + "yaml": "^2.7.0" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/listr2": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz", + "integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", + "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", + "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/lru-cache": { + "version": "11.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", + "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "license": "MIT", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.53.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.53.1.tgz", + "integrity": "sha512-gB+EVQfP5RDElh9ittfXlhZJdjSU4jUSTyE2+ia8CYyNvet4ElfaLlAIqDvQV9JPknKx0jQH1racTYe/4LaLSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.53.1", + "@typescript-eslint/parser": "8.53.1", + "@typescript-eslint/typescript-estree": "8.53.1", + "@typescript-eslint/utils": "8.53.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yaml": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/agent-readiness/package.json b/agent-readiness/package.json new file mode 100644 index 0000000..89b6abe --- /dev/null +++ b/agent-readiness/package.json @@ -0,0 +1,76 @@ +{ + "name": "agent-readiness", + "version": "0.1.0", + "description": "Factory-compatible repo maturity scanner for AI agent readiness", + "type": "module", + "main": "dist/index.js", + "bin": { + "agent-ready": "./dist/index.js" + }, + "files": [ + "dist", + "profiles", + "templates" + ], + "scripts": { + "build": "tsc", + "dev": "tsx src/index.ts", + "test": "tsx --test test/*.test.ts", + "test:watch": "tsx --test --watch test/*.test.ts", + "lint": "eslint src/ test/", + "lint:fix": "eslint src/ test/ --fix", + "format": "prettier --write src/ test/", + "format:check": "prettier --check src/ test/", + "typecheck": "tsc --noEmit", + "check": "npm run typecheck && npm run lint && npm run format:check", + "prepare": "husky", + "prepublishOnly": "npm run check && npm run build" + }, + "lint-staged": { + "*.ts": [ + "eslint --fix", + "prettier --write" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/robotlearning123/agent-readiness.git" + }, + "homepage": "https://github.com/robotlearning123/agent-readiness#readme", + "bugs": { + "url": "https://github.com/robotlearning123/agent-readiness/issues" + }, + "keywords": [ + "ai", + "agent", + "readiness", + "scanner", + "factory", + "devops", + "cli", + "maturity" + ], + "author": "robotlearning123", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "commander": "^12.1.0", + "glob": "^11.0.0", + "js-yaml": "^4.1.0" + }, + "devDependencies": { + "@eslint/js": "^9.17.0", + "@types/js-yaml": "^4.0.9", + "@types/node": "^22.10.2", + "eslint": "^9.17.0", + "husky": "^9.1.7", + "lint-staged": "^15.2.11", + "prettier": "^3.4.2", + "tsx": "^4.19.2", + "typescript": "^5.7.2", + "typescript-eslint": "^8.18.2" + }, + "engines": { + "node": ">=20.0.0" + } +} diff --git a/agent-readiness/profiles/factory_compat.yaml b/agent-readiness/profiles/factory_compat.yaml new file mode 100644 index 0000000..ec4a1dd --- /dev/null +++ b/agent-readiness/profiles/factory_compat.yaml @@ -0,0 +1,615 @@ +# Factory-Compatible Agent Readiness Profile +# Evaluates repositories against the 9 Pillars / 5 Levels model + +name: factory_compat +version: "1.0.0" +description: > + Default profile for evaluating repository maturity for AI agent readiness. + Based on the 9 Pillars model with 5 maturity levels (L1-L5). + +checks: + # ============================================================================= + # PILLAR: Documentation (docs) + # ============================================================================= + + - id: docs.readme + name: README exists + description: Repository has a README file + type: file_exists + pillar: docs + level: L1 + required: true + path: README.md + + - id: docs.readme_sections + name: README has essential sections + description: README contains getting started, installation, and usage info + type: file_exists + pillar: docs + level: L2 + required: false + path: README.md + content_regex: "(installation|getting started|usage|quick start)" + case_sensitive: false + + - id: docs.contributing + name: Contributing guide + description: Repository has contributing guidelines + type: file_exists + pillar: docs + level: L2 + required: false + path: CONTRIBUTING.md + + - id: docs.agents_md + name: AGENTS.md exists + description: Repository has agent instructions file + type: any_of + pillar: docs + level: L3 + required: false + checks: + - id: docs.agents_md.standard + name: Standard AGENTS.md + description: AGENTS.md in root + type: file_exists + pillar: docs + level: L3 + required: false + path: AGENTS.md + - id: docs.agents_md.claude + name: Claude AGENTS.md + description: CLAUDE.md (alias for AGENTS.md) + type: file_exists + pillar: docs + level: L3 + required: false + path: CLAUDE.md + + - id: docs.changelog + name: Changelog exists + description: Repository maintains a changelog + type: any_of + pillar: docs + level: L3 + required: false + checks: + - id: docs.changelog.standard + name: Standard CHANGELOG + type: file_exists + pillar: docs + level: L3 + required: false + path: CHANGELOG.md + - id: docs.changelog.history + name: HISTORY.md + type: file_exists + pillar: docs + level: L3 + required: false + path: HISTORY.md + + # ============================================================================= + # PILLAR: Code Style (style) + # ============================================================================= + + - id: style.editorconfig + name: EditorConfig + description: EditorConfig file for consistent formatting + type: file_exists + pillar: style + level: L1 + required: false + path: .editorconfig + + - id: style.linter_config + name: Linter configuration + description: ESLint, Prettier, or similar linter config exists + type: any_of + pillar: style + level: L2 + required: false + checks: + - id: style.eslint + type: path_glob + name: ESLint config + pillar: style + level: L2 + required: false + pattern: ".eslint*" + - id: style.prettier + type: path_glob + name: Prettier config + pillar: style + level: L2 + required: false + pattern: ".prettier*" + - id: style.biome + type: file_exists + name: Biome config + pillar: style + level: L2 + required: false + path: biome.json + + - id: style.typescript + name: TypeScript configuration + description: TypeScript config for type safety + type: file_exists + pillar: style + level: L2 + required: false + path: tsconfig.json + + - id: style.precommit_hooks + name: Pre-commit hooks + description: Pre-commit hooks configured for code quality + type: any_of + pillar: style + level: L2 + required: false + checks: + - id: style.husky + type: path_glob + name: Husky hooks + pillar: style + level: L2 + required: false + pattern: ".husky/*" + - id: style.precommit_config + type: file_exists + name: Pre-commit config + pillar: style + level: L2 + required: false + path: .pre-commit-config.yaml + - id: style.lefthook + type: file_exists + name: Lefthook config + pillar: style + level: L2 + required: false + path: lefthook.yml + + # ============================================================================= + # PILLAR: Build System (build) + # ============================================================================= + + - id: build.package_json + name: Package manifest + description: package.json exists with build scripts + type: file_exists + pillar: build + level: L1 + required: true + path: package.json + + - id: build.scripts + name: Build scripts defined + description: Build and test scripts are defined + type: build_command_detect + pillar: build + level: L2 + required: false + commands: ["build", "test"] + files: ["package.json", "Makefile"] + + - id: build.lock_file + name: Lock file exists + description: Dependency lock file for reproducible builds + type: any_of + pillar: build + level: L2 + required: false + checks: + - id: build.npm_lock + type: file_exists + name: npm lock + pillar: build + level: L2 + required: false + path: package-lock.json + - id: build.yarn_lock + type: file_exists + name: yarn lock + pillar: build + level: L2 + required: false + path: yarn.lock + - id: build.pnpm_lock + type: file_exists + name: pnpm lock + pillar: build + level: L2 + required: false + path: pnpm-lock.yaml + + # ============================================================================= + # PILLAR: Testing (test) + # ============================================================================= + + - id: test.test_files + name: Test files exist + description: Project has test files + type: path_glob + pillar: test + level: L1 + required: false + pattern: "**/*.{test,spec}.{js,ts,jsx,tsx}" + min_matches: 1 + + - id: test.config + name: Test configuration + description: Test framework configuration exists + type: any_of + pillar: test + level: L2 + required: false + checks: + - id: test.jest_config + type: path_glob + name: Jest config + pillar: test + level: L2 + required: false + pattern: "jest.config.*" + - id: test.vitest_config + type: path_glob + name: Vitest config + pillar: test + level: L2 + required: false + pattern: "vitest.config.*" + - id: test.mocha_config + type: file_exists + name: Mocha config + pillar: test + level: L2 + required: false + path: .mocharc.json + + - id: test.integration_tests + name: Integration tests + description: Integration test files exist + type: any_of + pillar: test + level: L3 + required: false + checks: + - id: test.integration_dir + type: path_glob + name: Integration test directory + pillar: test + level: L3 + required: false + pattern: "**/integration/**/*.{test,spec}.{js,ts,jsx,tsx}" + - id: test.integration_files + type: path_glob + name: Integration test files + pillar: test + level: L3 + required: false + pattern: "**/*.integration.{test,spec}.{js,ts,jsx,tsx}" + + # ============================================================================= + # PILLAR: Security (security) + # ============================================================================= + + - id: security.gitignore + name: .gitignore exists + description: Git ignore file to prevent committing sensitive files + type: file_exists + pillar: security + level: L1 + required: true + path: .gitignore + + - id: security.gitignore_secrets + name: .gitignore covers secrets + description: .gitignore includes common secret patterns + type: file_exists + pillar: security + level: L2 + required: false + path: .gitignore + content_regex: "(\\.env|\\.secret|credentials)" + + - id: security.dependabot + name: Dependabot configuration + description: Automated dependency updates configured + type: file_exists + pillar: security + level: L3 + required: false + path: .github/dependabot.yml + + - id: security.codeowners + name: CODEOWNERS file + description: Code ownership defined for review routing + type: any_of + pillar: security + level: L3 + required: false + checks: + - id: security.codeowners_github + type: file_exists + name: GitHub CODEOWNERS + pillar: security + level: L3 + required: false + path: .github/CODEOWNERS + - id: security.codeowners_root + type: file_exists + name: Root CODEOWNERS + pillar: security + level: L3 + required: false + path: CODEOWNERS + - id: security.codeowners_docs + type: file_exists + name: Docs CODEOWNERS + pillar: security + level: L3 + required: false + path: docs/CODEOWNERS + + # ============================================================================= + # PILLAR: Observability (observability) + # ============================================================================= + + - id: observability.logging + name: Logging framework + description: Structured logging framework is used + type: log_framework_detect + pillar: observability + level: L3 + required: false + frameworks: ["winston", "pino", "bunyan", "log4js"] + + - id: observability.tracing + name: Distributed tracing + description: Distributed tracing instrumentation configured + type: dependency_detect + pillar: observability + level: L4 + required: false + packages: + - "@opentelemetry/sdk-trace-node" + - "@opentelemetry/api" + - "dd-trace" + - "jaeger-client" + - "@sentry/tracing" + - "opentelemetry-sdk" + - "ddtrace" + config_files: + - "otel.config.js" + - "tracing.js" + - "instrumentation.js" + + - id: observability.metrics + name: Metrics collection + description: Application metrics instrumentation + type: dependency_detect + pillar: observability + level: L4 + required: false + packages: + - "prom-client" + - "statsd-client" + - "@opentelemetry/sdk-metrics" + - "hot-shots" + - "prometheus_client" + + # ============================================================================= + # PILLAR: Environment (env) + # ============================================================================= + + - id: env.dotenv_example + name: Environment example + description: .env.example or similar template exists + type: any_of + pillar: env + level: L2 + required: false + checks: + - id: env.dotenv_example.standard + type: file_exists + name: .env.example + pillar: env + level: L2 + required: false + path: .env.example + - id: env.dotenv_template + type: file_exists + name: .env.template + pillar: env + level: L2 + required: false + path: .env.template + + - id: env.devcontainer + name: Devcontainer configuration + description: Development container configuration for consistent environments + type: any_of + pillar: env + level: L3 + required: false + checks: + - id: env.devcontainer_json + type: file_exists + name: Devcontainer config + pillar: env + level: L3 + required: false + path: .devcontainer/devcontainer.json + - id: env.devcontainer_dockerfile + type: file_exists + name: Devcontainer Dockerfile + pillar: env + level: L3 + required: false + path: .devcontainer/Dockerfile + + - id: env.docker_compose + name: Local services setup + description: Docker Compose for local development services + type: any_of + pillar: env + level: L3 + required: false + checks: + - id: env.docker_compose_yml + type: file_exists + name: docker-compose.yml + pillar: env + level: L3 + required: false + path: docker-compose.yml + - id: env.docker_compose_yaml + type: file_exists + name: docker-compose.yaml + pillar: env + level: L3 + required: false + path: docker-compose.yaml + - id: env.compose_yml + type: file_exists + name: compose.yml + pillar: env + level: L3 + required: false + path: compose.yml + + # ============================================================================= + # PILLAR: CI/CD (ci) + # ============================================================================= + + - id: ci.github_workflow + name: GitHub Actions workflow + description: CI workflow exists for GitHub Actions + type: path_glob + pillar: ci + level: L1 + required: false + pattern: ".github/workflows/*.{yml,yaml}" + min_matches: 1 + + - id: ci.push_trigger + name: CI triggers on push + description: CI workflow runs on push events + type: github_workflow_event + pillar: ci + level: L2 + required: false + event: push + + - id: ci.pr_trigger + name: CI triggers on PR + description: CI workflow runs on pull request events + type: github_workflow_event + pillar: ci + level: L2 + required: false + event: pull_request + + - id: ci.checkout_action + name: Uses checkout action + description: Workflow uses actions/checkout + type: github_action_present + pillar: ci + level: L2 + required: false + action: actions/checkout + action_pattern: "actions/checkout@v\\d+" + + # ============================================================================= + # PILLAR: Monorepo (monorepo) + # ============================================================================= + + - id: monorepo.workspaces + name: Workspace configuration + description: npm/yarn/pnpm workspaces or similar configured + type: any_of + pillar: monorepo + level: L3 + required: false + checks: + - id: monorepo.npm_workspaces + type: file_exists + name: npm workspaces + pillar: monorepo + level: L3 + required: false + path: package.json + content_regex: '"workspaces"' + - id: monorepo.pnpm_workspaces + type: file_exists + name: pnpm workspaces + pillar: monorepo + level: L3 + required: false + path: pnpm-workspace.yaml + - id: monorepo.lerna + type: file_exists + name: Lerna config + pillar: monorepo + level: L3 + required: false + path: lerna.json + - id: monorepo.nx + type: file_exists + name: Nx config + pillar: monorepo + level: L3 + required: false + path: nx.json + + # ============================================================================= + # PILLAR: Task Discovery (task_discovery) + # ============================================================================= + + - id: task_discovery.issue_templates + name: Issue templates + description: GitHub issue templates for structured bug reports and features + type: any_of + pillar: task_discovery + level: L2 + required: false + checks: + - id: task_discovery.issue_template_dir + type: path_glob + name: Issue template directory + pillar: task_discovery + level: L2 + required: false + pattern: ".github/ISSUE_TEMPLATE/*.{md,yml,yaml}" + - id: task_discovery.issue_template_single + type: file_exists + name: Single issue template + pillar: task_discovery + level: L2 + required: false + path: .github/ISSUE_TEMPLATE.md + + - id: task_discovery.pr_template + name: Pull request template + description: PR template for consistent contribution format + type: any_of + pillar: task_discovery + level: L2 + required: false + checks: + - id: task_discovery.pr_template_github + type: file_exists + name: GitHub PR template + pillar: task_discovery + level: L2 + required: false + path: .github/PULL_REQUEST_TEMPLATE.md + - id: task_discovery.pr_template_root + type: file_exists + name: Root PR template + pillar: task_discovery + level: L2 + required: false + path: PULL_REQUEST_TEMPLATE.md diff --git a/agent-readiness/src/checks/any-of.ts b/agent-readiness/src/checks/any-of.ts new file mode 100644 index 0000000..b994216 --- /dev/null +++ b/agent-readiness/src/checks/any-of.ts @@ -0,0 +1,69 @@ +/** + * any_of composite check implementation + * + * Passes if at least min_pass (default 1) of the nested checks pass + */ + +import type { AnyOfCheck, CheckResult, ScanContext } from '../types.js'; +import { executeCheck } from './index.js'; + +export async function executeAnyOf(check: AnyOfCheck, context: ScanContext): Promise { + const minPass = check.min_pass ?? 1; + const results: CheckResult[] = []; + const passedChecks: string[] = []; + + // Execute all nested checks + for (const nestedCheck of check.checks) { + const result = await executeCheck(nestedCheck, context); + results.push(result); + if (result.passed) { + passedChecks.push(nestedCheck.id); + } + } + + const passedCount = passedChecks.length; + const totalCount = check.checks.length; + + if (passedCount >= minPass) { + // Collect all matched files from passed checks + const matchedFiles = results + .filter((r) => r.passed && r.matched_files) + .flatMap((r) => r.matched_files!); + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `${passedCount}/${totalCount} alternatives passed (need ${minPass})`, + matched_files: matchedFiles.length > 0 ? matchedFiles : undefined, + details: { + passed_checks: passedChecks, + min_required: minPass, + }, + }; + } + + // Collect suggestions from failed checks + const suggestions = results + .filter((r) => !r.passed && r.suggestions) + .flatMap((r) => r.suggestions!); + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Only ${passedCount}/${totalCount} alternatives passed (need ${minPass})`, + suggestions: suggestions.length > 0 ? suggestions : undefined, + details: { + passed_checks: passedChecks, + failed_checks: check.checks.filter((c) => !passedChecks.includes(c.id)).map((c) => c.id), + min_required: minPass, + }, + }; +} diff --git a/agent-readiness/src/checks/build-command.ts b/agent-readiness/src/checks/build-command.ts new file mode 100644 index 0000000..bcdd090 --- /dev/null +++ b/agent-readiness/src/checks/build-command.ts @@ -0,0 +1,132 @@ +/** + * build_command_detect check implementation + * + * Detects if build/test commands are defined in package.json, Makefile, etc. + */ + +import type { BuildCommandDetectCheck, CheckResult, ScanContext } from '../types.js'; +import { readFileCached, safePath } from '../utils/fs.js'; + +const DEFAULT_FILES = ['package.json', 'Makefile', 'pyproject.toml', 'Cargo.toml']; + +/** + * Escape special regex characters in a string + */ +function escapeRegex(str: string): string { + return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +export async function executeBuildCommandDetect( + check: BuildCommandDetectCheck, + context: ScanContext +): Promise { + const filesToCheck = check.files || DEFAULT_FILES; + const foundCommands: Array<{ file: string; command: string }> = []; + + for (const file of filesToCheck) { + // Validate path doesn't escape root directory + const filePath = safePath(file, context.root_path); + if (!filePath) continue; + + const content = await readFileCached(filePath, context.file_cache); + + if (!content) continue; + + const commands = detectCommandsInFile(file, content, check.commands); + for (const command of commands) { + foundCommands.push({ file, command }); + } + } + + if (foundCommands.length > 0) { + const matchedFiles = [...new Set(foundCommands.map((c) => c.file))]; + const commandList = foundCommands.map((c) => `${c.command} (${c.file})`); + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found ${foundCommands.length} build command(s): ${foundCommands.map((c) => c.command).join(', ')}`, + matched_files: matchedFiles, + details: { + commands: commandList, + }, + }; + } + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `No build commands found matching: ${check.commands.join(', ')}`, + suggestions: [ + 'Add build/test scripts to package.json', + 'Example: "scripts": { "build": "...", "test": "..." }', + ], + details: { + searched_files: filesToCheck, + looking_for: check.commands, + }, + }; +} + +function detectCommandsInFile( + filename: string, + content: string, + commandsToFind: string[] +): string[] { + const found: string[] = []; + + if (filename === 'package.json') { + try { + const pkg = JSON.parse(content); + const scripts = pkg.scripts || {}; + + for (const cmd of commandsToFind) { + if (scripts[cmd]) { + found.push(cmd); + } + } + } catch { + // Ignore parse errors + } + } else if (filename === 'Makefile') { + // Look for make targets (escape command to prevent regex injection) + for (const cmd of commandsToFind) { + const targetRegex = new RegExp(`^${escapeRegex(cmd)}\\s*:`, 'm'); + if (targetRegex.test(content)) { + found.push(cmd); + } + } + } else if (filename === 'pyproject.toml') { + // Look for scripts section or tool.poetry.scripts (escape command) + for (const cmd of commandsToFind) { + const scriptRegex = new RegExp(`${escapeRegex(cmd)}\\s*=`, 'm'); + if (scriptRegex.test(content)) { + found.push(cmd); + } + } + } else if (filename === 'Cargo.toml') { + // Cargo has implicit build/test + for (const cmd of commandsToFind) { + if (cmd === 'build' || cmd === 'test') { + found.push(cmd); + } + } + } else { + // Generic detection: look for command strings in content + for (const cmd of commandsToFind) { + if (content.includes(cmd)) { + found.push(cmd); + } + } + } + + return found; +} diff --git a/agent-readiness/src/checks/dependency-detect.ts b/agent-readiness/src/checks/dependency-detect.ts new file mode 100644 index 0000000..605e380 --- /dev/null +++ b/agent-readiness/src/checks/dependency-detect.ts @@ -0,0 +1,161 @@ +/** + * dependency_detect check implementation + * + * Detects if specific packages/dependencies are used in the project. + * Used for tracing, metrics, and analytics package detection. + */ + +import * as path from 'node:path'; +import type { DependencyDetectCheck, CheckResult, ScanContext } from '../types.js'; +import { fileExists, readFileCached, relativePath, safePath } from '../utils/fs.js'; + +export async function executeDependencyDetect( + check: DependencyDetectCheck, + context: ScanContext +): Promise { + const foundPackages: Array<{ package: string; source: string }> = []; + const matchedFiles: string[] = []; + + // Check package.json dependencies (npm/yarn/pnpm) + if (context.package_json) { + const deps = { + ...context.package_json.dependencies, + ...context.package_json.devDependencies, + }; + + for (const pkg of check.packages) { + if (deps[pkg]) { + foundPackages.push({ package: pkg, source: 'package.json' }); + if (!matchedFiles.includes('package.json')) { + matchedFiles.push('package.json'); + } + } + } + } + + // Check requirements.txt (Python) + const requirementsPath = path.join(context.root_path, 'requirements.txt'); + if (await fileExists(requirementsPath)) { + const content = await readFileCached(requirementsPath, context.file_cache); + if (content) { + for (const pkg of check.packages) { + // Match package name at start of line, with optional version specifier + const pattern = new RegExp(`^${escapeRegex(pkg)}([>=<~!\\[\\s]|$)`, 'mi'); + if (pattern.test(content)) { + foundPackages.push({ package: pkg, source: 'requirements.txt' }); + if (!matchedFiles.includes('requirements.txt')) { + matchedFiles.push('requirements.txt'); + } + } + } + } + } + + // Check pyproject.toml (Python Poetry/PEP 621) + const pyprojectPath = path.join(context.root_path, 'pyproject.toml'); + if (await fileExists(pyprojectPath)) { + const content = await readFileCached(pyprojectPath, context.file_cache); + if (content) { + for (const pkg of check.packages) { + // Match in dependencies section + const pattern = new RegExp(`["']?${escapeRegex(pkg)}["']?\\s*[=:]`, 'i'); + if (pattern.test(content)) { + foundPackages.push({ package: pkg, source: 'pyproject.toml' }); + if (!matchedFiles.includes('pyproject.toml')) { + matchedFiles.push('pyproject.toml'); + } + } + } + } + } + + // Check go.mod (Go) + const goModPath = path.join(context.root_path, 'go.mod'); + if (await fileExists(goModPath)) { + const content = await readFileCached(goModPath, context.file_cache); + if (content) { + for (const pkg of check.packages) { + // Match as a full module path (word boundary or end of line) + const pattern = new RegExp(`\\b${escapeRegex(pkg)}(/|\\s|$)`, 'i'); + if (pattern.test(content)) { + foundPackages.push({ package: pkg, source: 'go.mod' }); + if (!matchedFiles.includes('go.mod')) { + matchedFiles.push('go.mod'); + } + } + } + } + } + + // Check Cargo.toml (Rust) + const cargoPath = path.join(context.root_path, 'Cargo.toml'); + if (await fileExists(cargoPath)) { + const content = await readFileCached(cargoPath, context.file_cache); + if (content) { + for (const pkg of check.packages) { + const pattern = new RegExp(`^${escapeRegex(pkg)}\\s*=`, 'mi'); + if (pattern.test(content)) { + foundPackages.push({ package: pkg, source: 'Cargo.toml' }); + if (!matchedFiles.includes('Cargo.toml')) { + matchedFiles.push('Cargo.toml'); + } + } + } + } + } + + // Check for config files if specified + if (check.config_files && check.config_files.length > 0) { + for (const configFile of check.config_files) { + // Validate path doesn't escape root directory (prevent path traversal) + const configPath = safePath(configFile, context.root_path); + if (!configPath) { + // Skip invalid paths that attempt traversal + continue; + } + if (await fileExists(configPath)) { + foundPackages.push({ package: `config:${configFile}`, source: configFile }); + matchedFiles.push(relativePath(configPath, context.root_path)); + } + } + } + + if (foundPackages.length > 0) { + const packageNames = [...new Set(foundPackages.map((p) => p.package))]; + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found dependency: ${packageNames.join(', ')}`, + matched_files: matchedFiles, + details: { + packages: foundPackages, + }, + }; + } + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `No matching dependencies found (looking for: ${check.packages.join(', ')})`, + suggestions: [`Install one of: ${check.packages.join(', ')}`], + details: { + searched_for: check.packages, + config_files_checked: check.config_files, + }, + }; +} + +/** + * Escape special regex characters in a string + */ +function escapeRegex(str: string): string { + return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} diff --git a/agent-readiness/src/checks/file-exists.ts b/agent-readiness/src/checks/file-exists.ts new file mode 100644 index 0000000..3b1f48b --- /dev/null +++ b/agent-readiness/src/checks/file-exists.ts @@ -0,0 +1,115 @@ +/** + * file_exists check implementation + * + * Checks if a file exists and optionally matches a content regex + */ + +import type { FileExistsCheck, CheckResult, ScanContext } from '../types.js'; +import { fileExists as fileExistsUtil, readFileCached, safePath } from '../utils/fs.js'; +import { safeRegexTest } from '../utils/regex.js'; + +export async function executeFileExists( + check: FileExistsCheck, + context: ScanContext +): Promise { + // Validate path doesn't escape root directory (prevent path traversal attacks) + const filePath = safePath(check.path, context.root_path); + + if (!filePath) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Invalid path (path traversal detected): ${check.path}`, + }; + } + + // Check if file exists + const exists = await fileExistsUtil(filePath); + + if (!exists) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `File not found: ${check.path}`, + suggestions: [`Create ${check.path}`], + }; + } + + // If no content regex, file existence is enough + if (!check.content_regex) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `File exists: ${check.path}`, + matched_files: [check.path], + }; + } + + // Check content against regex + const content = await readFileCached(filePath, context.file_cache); + + if (!content) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `File exists but could not be read: ${check.path}`, + }; + } + + const flags = check.case_sensitive === false ? 'i' : ''; + const result = safeRegexTest(check.content_regex, content, flags); + + if (result.error) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Invalid regex pattern for ${check.path}: ${result.error}`, + details: { pattern: check.content_regex, error: result.error }, + }; + } + + if (result.matched) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `File exists and contains required pattern: ${check.path}`, + matched_files: [check.path], + }; + } + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `File exists but does not contain required pattern: ${check.path}`, + suggestions: [`Update ${check.path} to include required content`], + details: { pattern: check.content_regex }, + }; +} diff --git a/agent-readiness/src/checks/github-action.ts b/agent-readiness/src/checks/github-action.ts new file mode 100644 index 0000000..49bd433 --- /dev/null +++ b/agent-readiness/src/checks/github-action.ts @@ -0,0 +1,136 @@ +/** + * github_action_present check implementation + * + * Checks if a specific GitHub Action is used in any workflow + */ + +import * as yaml from 'js-yaml'; +import type { GitHubActionPresentCheck, CheckResult, ScanContext } from '../types.js'; +import { findFilesCached, readFileCached, relativePath } from '../utils/fs.js'; +import { safeRegex } from '../utils/regex.js'; + +interface WorkflowConfig { + jobs?: { + [jobName: string]: { + steps?: Array<{ + uses?: string; + name?: string; + }>; + }; + }; +} + +export async function executeGitHubActionPresent( + check: GitHubActionPresentCheck, + context: ScanContext +): Promise { + // Find all workflow files + const workflowPattern = '.github/workflows/*.{yml,yaml}'; + const workflowFiles = await findFilesCached( + workflowPattern, + context.root_path, + context.glob_cache + ); + + if (workflowFiles.length === 0) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: 'No GitHub workflow files found', + suggestions: ['Create .github/workflows directory with workflow files'], + }; + } + + const matchingWorkflows: string[] = []; + const foundActions: string[] = []; + + // Build regex for action matching (with safety check) + const actionPattern = check.action_pattern ? safeRegex(check.action_pattern) : null; + + // If pattern was provided but is invalid/unsafe, fail the check + if (check.action_pattern && !actionPattern) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Invalid or unsafe action pattern: ${check.action_pattern}`, + details: { + pattern: check.action_pattern, + error: 'Invalid or potentially unsafe regex pattern', + }, + }; + } + + for (const workflowPath of workflowFiles) { + const content = await readFileCached(workflowPath, context.file_cache); + if (!content) continue; + + try { + const workflow = yaml.load(content, { schema: yaml.JSON_SCHEMA }) as WorkflowConfig; + if (!workflow?.jobs) continue; + + for (const job of Object.values(workflow.jobs)) { + if (!job.steps) continue; + + for (const step of job.steps) { + if (!step.uses) continue; + + const isMatch = actionPattern + ? actionPattern.test(step.uses) + : step.uses.startsWith(check.action.replace(/@.*$/, '')); + + if (isMatch) { + matchingWorkflows.push(relativePath(workflowPath, context.root_path)); + foundActions.push(step.uses); + break; + } + } + } + } catch { + // Skip unparseable workflows + } + } + + // Deduplicate workflows + const uniqueWorkflows = [...new Set(matchingWorkflows)]; + + if (uniqueWorkflows.length > 0) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found action '${check.action}' in ${uniqueWorkflows.length} workflow(s)`, + matched_files: uniqueWorkflows, + details: { + found_actions: [...new Set(foundActions)], + }, + }; + } + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Action '${check.action}' not found in any workflow`, + suggestions: [ + `Add '${check.action}' to one of your GitHub workflows`, + 'Example: uses: ' + check.action, + ], + details: { + workflows_checked: workflowFiles.length, + }, + }; +} diff --git a/agent-readiness/src/checks/github-workflow.ts b/agent-readiness/src/checks/github-workflow.ts new file mode 100644 index 0000000..eef8616 --- /dev/null +++ b/agent-readiness/src/checks/github-workflow.ts @@ -0,0 +1,166 @@ +/** + * github_workflow_event check implementation + * + * Checks if GitHub workflows are configured to trigger on specific events + */ + +import * as path from 'node:path'; +import * as yaml from 'js-yaml'; +import type { GitHubWorkflowEventCheck, CheckResult, ScanContext } from '../types.js'; +import { findFilesCached, readFileCached, relativePath } from '../utils/fs.js'; + +interface WorkflowConfig { + name?: string; + on?: WorkflowTriggers; +} + +type WorkflowTriggers = + | string + | string[] + | { + [event: string]: { + branches?: string[]; + tags?: string[]; + paths?: string[]; + } | null; + }; + +/** + * Type guard to validate parsed YAML is a workflow config + */ +function isWorkflowConfig(value: unknown): value is WorkflowConfig { + if (value === null || typeof value !== 'object') { + return false; + } + const obj = value as Record; + // 'on' must be string, array, or object if present + if (obj.on !== undefined) { + if ( + typeof obj.on !== 'string' && + !Array.isArray(obj.on) && + (typeof obj.on !== 'object' || obj.on === null) + ) { + return false; + } + } + return true; +} + +export async function executeGitHubWorkflowEvent( + check: GitHubWorkflowEventCheck, + context: ScanContext +): Promise { + // Find all workflow files + const workflowPattern = '.github/workflows/*.{yml,yaml}'; + const workflowFiles = await findFilesCached( + workflowPattern, + context.root_path, + context.glob_cache + ); + + if (workflowFiles.length === 0) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: 'No GitHub workflow files found', + suggestions: ['Create .github/workflows directory with workflow files'], + }; + } + + const matchingWorkflows: string[] = []; + const errors: string[] = []; + + for (const workflowPath of workflowFiles) { + const content = await readFileCached(workflowPath, context.file_cache); + if (!content) continue; + + try { + const parsed = yaml.load(content, { schema: yaml.JSON_SCHEMA }); + if (!isWorkflowConfig(parsed) || !parsed.on) continue; + + const hasEvent = checkForEvent(parsed.on, check.event, check.branches); + if (hasEvent) { + matchingWorkflows.push(relativePath(workflowPath, context.root_path)); + } + } catch { + errors.push(`Failed to parse ${path.basename(workflowPath)}`); + } + } + + if (matchingWorkflows.length > 0) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found ${matchingWorkflows.length} workflow(s) triggered on '${check.event}'`, + matched_files: matchingWorkflows, + }; + } + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `No workflows found that trigger on '${check.event}'`, + suggestions: [ + `Add a workflow that triggers on '${check.event}'`, + 'Example: on: { push: { branches: [main] } }', + ], + details: { + workflows_checked: workflowFiles.length, + parse_errors: errors.length > 0 ? errors : undefined, + }, + }; +} + +function checkForEvent( + triggers: WorkflowTriggers, + event: string, + requiredBranches?: string[] +): boolean { + // String trigger: on: push + if (typeof triggers === 'string') { + return triggers === event && !requiredBranches; + } + + // Array trigger: on: [push, pull_request] + if (Array.isArray(triggers)) { + return triggers.includes(event) && !requiredBranches; + } + + // Object trigger: on: { push: { branches: [main] } } + if (typeof triggers === 'object' && triggers !== null) { + const eventConfig = triggers[event]; + + // Event not present + if (eventConfig === undefined) { + return false; + } + + // Event present but null (e.g., on: { push: }) + if (eventConfig === null) { + return !requiredBranches; + } + + // No branch requirements + if (!requiredBranches) { + return true; + } + + // Check branches + const configBranches = eventConfig.branches || []; + return requiredBranches.every((branch) => configBranches.includes(branch)); + } + + return false; +} diff --git a/agent-readiness/src/checks/index.ts b/agent-readiness/src/checks/index.ts new file mode 100644 index 0000000..a3b2a23 --- /dev/null +++ b/agent-readiness/src/checks/index.ts @@ -0,0 +1,88 @@ +/** + * Check registry and executor + * + * Dispatches check execution to the appropriate handler based on check type + */ + +import type { CheckConfig, CheckResult, ScanContext } from '../types.js'; +import { executeFileExists } from './file-exists.js'; +import { executePathGlob } from './path-glob.js'; +import { executeAnyOf } from './any-of.js'; +import { executeGitHubWorkflowEvent } from './github-workflow.js'; +import { executeGitHubActionPresent } from './github-action.js'; +import { executeBuildCommandDetect } from './build-command.js'; +import { executeLogFrameworkDetect } from './log-framework.js'; +import { executeDependencyDetect } from './dependency-detect.js'; + +/** + * Execute a check and return the result + */ +export async function executeCheck(check: CheckConfig, context: ScanContext): Promise { + switch (check.type) { + case 'file_exists': + return executeFileExists(check, context); + + case 'path_glob': + return executePathGlob(check, context); + + case 'any_of': + return executeAnyOf(check, context); + + case 'github_workflow_event': + return executeGitHubWorkflowEvent(check, context); + + case 'github_action_present': + return executeGitHubActionPresent(check, context); + + case 'build_command_detect': + return executeBuildCommandDetect(check, context); + + case 'log_framework_detect': + return executeLogFrameworkDetect(check, context); + + case 'dependency_detect': + return executeDependencyDetect(check, context); + + default: { + // This should never happen due to TypeScript and YAML validation, + // but handle gracefully by preserving check properties + const unknownCheck = check as CheckConfig & { type: string }; + return { + check_id: unknownCheck.id, + check_name: unknownCheck.name, + pillar: unknownCheck.pillar, + level: unknownCheck.level, + passed: false, + required: unknownCheck.required, + message: `Unknown check type: ${unknownCheck.type}`, + }; + } + } +} + +/** + * Execute multiple checks in parallel + */ +export async function executeChecks( + checks: CheckConfig[], + context: ScanContext +): Promise { + const results = await Promise.all(checks.map((check) => executeCheck(check, context))); + return results; +} + +/** + * Get all supported check types + */ +export function getSupportedCheckTypes(): string[] { + return [ + 'file_exists', + 'path_glob', + 'any_of', + 'github_workflow_event', + 'github_action_present', + 'build_command_detect', + 'log_framework_detect', + 'dependency_detect', + ]; +} diff --git a/agent-readiness/src/checks/log-framework.ts b/agent-readiness/src/checks/log-framework.ts new file mode 100644 index 0000000..be159eb --- /dev/null +++ b/agent-readiness/src/checks/log-framework.ts @@ -0,0 +1,148 @@ +/** + * log_framework_detect check implementation + * + * Detects if logging frameworks are used in the project + */ + +import type { LogFrameworkDetectCheck, CheckResult, ScanContext } from '../types.js'; +import { readFileCached, findFilesCached, relativePath } from '../utils/fs.js'; + +// Known logging frameworks by language/ecosystem +const FRAMEWORK_PATTERNS: Record = { + // Node.js + winston: [/require\(['"]winston['"]\)/, /from\s+['"]winston['"]/], + pino: [/require\(['"]pino['"]\)/, /from\s+['"]pino['"]/], + bunyan: [/require\(['"]bunyan['"]\)/, /from\s+['"]bunyan['"]/], + log4js: [/require\(['"]log4js['"]\)/, /from\s+['"]log4js['"]/], + + // Python + logging: [/import\s+logging/, /from\s+logging\s+import/], + loguru: [/from\s+loguru\s+import/, /import\s+loguru/], + structlog: [/import\s+structlog/, /from\s+structlog/], + + // Go + logrus: [/github\.com\/sirupsen\/logrus/], + zap: [/go\.uber\.org\/zap/], + zerolog: [/github\.com\/rs\/zerolog/], + + // Java + slf4j: [/org\.slf4j/], + log4j: [/org\.apache\.log4j/, /org\.apache\.logging\.log4j/], + logback: [/ch\.qos\.logback/], + + // Rust + 'log/env_logger': [/use\s+log::/, /use\s+env_logger/], + tracing: [/use\s+tracing/], +}; + +export async function executeLogFrameworkDetect( + check: LogFrameworkDetectCheck, + context: ScanContext +): Promise { + const foundFrameworks: Array<{ framework: string; source: string }> = []; + + // Check package.json dependencies + if (context.package_json) { + const deps = { + ...context.package_json.dependencies, + ...context.package_json.devDependencies, + }; + + for (const framework of check.frameworks) { + if (deps[framework]) { + foundFrameworks.push({ framework, source: 'package.json' }); + } + } + } + + // If found in package.json, we're done + if (foundFrameworks.length > 0) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found logging framework(s): ${foundFrameworks.map((f) => f.framework).join(', ')}`, + matched_files: ['package.json'], + details: { + frameworks: foundFrameworks, + }, + }; + } + + // Search source files for framework imports + const sourcePatterns = ['**/*.ts', '**/*.js', '**/*.py', '**/*.go', '**/*.java', '**/*.rs']; + + for (const pattern of sourcePatterns) { + const files = await findFilesCached(pattern, context.root_path, context.glob_cache); + + // Limit search to avoid scanning too many files + const filesToCheck = files.slice(0, 100); + + for (const filePath of filesToCheck) { + const content = await readFileCached(filePath, context.file_cache); + if (!content) continue; + + for (const framework of check.frameworks) { + const patterns = FRAMEWORK_PATTERNS[framework]; + if (!patterns) continue; + + for (const pattern of patterns) { + if (pattern.test(content)) { + foundFrameworks.push({ + framework, + source: relativePath(filePath, context.root_path), + }); + break; + } + } + } + + // Early exit if we found something + if (foundFrameworks.length > 0) { + break; + } + } + + if (foundFrameworks.length > 0) { + break; + } + } + + if (foundFrameworks.length > 0) { + const matchedFiles = [...new Set(foundFrameworks.map((f) => f.source))]; + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found logging framework(s): ${foundFrameworks.map((f) => f.framework).join(', ')}`, + matched_files: matchedFiles, + details: { + frameworks: foundFrameworks, + }, + }; + } + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `No logging framework detected (looking for: ${check.frameworks.join(', ')})`, + suggestions: [ + 'Add a logging framework to your project', + 'Node.js: npm install winston or pino', + 'Python: pip install loguru', + ], + details: { + searched_for: check.frameworks, + }, + }; +} diff --git a/agent-readiness/src/checks/path-glob.ts b/agent-readiness/src/checks/path-glob.ts new file mode 100644 index 0000000..d55cee6 --- /dev/null +++ b/agent-readiness/src/checks/path-glob.ts @@ -0,0 +1,119 @@ +/** + * path_glob check implementation + * + * Checks if files matching a glob pattern exist with optional content matching + */ + +import type { PathGlobCheck, CheckResult, ScanContext } from '../types.js'; +import { findFilesCached, readFileCached, relativePath } from '../utils/fs.js'; +import { safeRegexTest, isUnsafeRegex } from '../utils/regex.js'; + +export async function executePathGlob( + check: PathGlobCheck, + context: ScanContext +): Promise { + const minMatches = check.min_matches ?? 1; + + // Find files matching pattern + const matches = await findFilesCached(check.pattern, context.root_path, context.glob_cache); + + if (matches.length < minMatches) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Found ${matches.length} files matching '${check.pattern}', need at least ${minMatches}`, + suggestions: [`Create files matching pattern: ${check.pattern}`], + details: { pattern: check.pattern, found: matches.length, required: minMatches }, + }; + } + + // Check max_matches if specified + if (check.max_matches !== undefined && matches.length > check.max_matches) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Found ${matches.length} files matching '${check.pattern}', maximum is ${check.max_matches}`, + details: { pattern: check.pattern, found: matches.length, max: check.max_matches }, + }; + } + + // If no content regex, file matches are enough + if (!check.content_regex) { + const relativeMatches = matches.map((m) => relativePath(m, context.root_path)); + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found ${matches.length} files matching '${check.pattern}'`, + matched_files: relativeMatches, + }; + } + + // Validate regex pattern first + if (isUnsafeRegex(check.content_regex)) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Unsafe regex pattern detected: ${check.content_regex}`, + details: { pattern: check.content_regex, error: 'Potentially unsafe regex pattern' }, + }; + } + + // Check content of matched files + const matchingFiles: string[] = []; + + for (const filePath of matches) { + const content = await readFileCached(filePath, context.file_cache); + if (content) { + const result = safeRegexTest(check.content_regex, content); + if (result.matched) { + matchingFiles.push(relativePath(filePath, context.root_path)); + } + } + } + + if (matchingFiles.length < minMatches) { + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: false, + required: check.required, + message: `Found ${matches.length} files matching '${check.pattern}', but only ${matchingFiles.length} contain required pattern`, + suggestions: [`Ensure files matching ${check.pattern} contain required content`], + details: { + pattern: check.pattern, + content_pattern: check.content_regex, + files_found: matches.length, + files_matching_content: matchingFiles.length, + }, + }; + } + + return { + check_id: check.id, + check_name: check.name, + pillar: check.pillar, + level: check.level, + passed: true, + required: check.required, + message: `Found ${matchingFiles.length} files matching '${check.pattern}' with required content`, + matched_files: matchingFiles, + }; +} diff --git a/agent-readiness/src/commands/init.ts b/agent-readiness/src/commands/init.ts new file mode 100644 index 0000000..d8b6c67 --- /dev/null +++ b/agent-readiness/src/commands/init.ts @@ -0,0 +1,140 @@ +/** + * Init command implementation - generates missing agent-ready files + */ + +import * as path from 'node:path'; +import chalk from 'chalk'; +import type { InitOptions, Level } from '../types.js'; +import { directoryExists, fileExists, writeFile, readFile } from '../utils/fs.js'; +import { loadDefaultProfile } from '../profiles/index.js'; +import { getTemplates, type Template } from '../templates/index.js'; + +export async function initCommand(options: InitOptions): Promise { + // Validate path exists + if (!(await directoryExists(options.path))) { + console.error(chalk.red(`Error: Path does not exist: ${options.path}`)); + process.exit(1); + } + + // Validate level if provided + if (options.level && !isValidLevel(options.level)) { + console.error(chalk.red(`Error: Invalid level: ${options.level}`)); + console.error('Valid levels: L1, L2, L3, L4, L5'); + process.exit(1); + } + + try { + // Load profile to get check definitions + const profile = await loadDefaultProfile(); + + // Get templates to generate + const templates = await getTemplates(); + + // Filter templates based on options + let templatesNeeded = templates; + + if (options.check) { + // Generate only the specific check's template + templatesNeeded = templates.filter((t) => t.checkId === options.check); + if (templatesNeeded.length === 0) { + console.error(chalk.red(`Error: No template found for check: ${options.check}`)); + process.exit(1); + } + } else if (options.level) { + // Generate templates needed for the specified level + const levelChecks = profile.checks.filter( + (c) => levelValue(c.level) <= levelValue(options.level!) + ); + const checkIds = new Set(levelChecks.map((c) => c.id)); + templatesNeeded = templates.filter((t) => checkIds.has(t.checkId)); + } + + // Check which files need to be created + const toCreate: Array<{ template: Template; targetPath: string }> = []; + + for (const template of templatesNeeded) { + const targetPath = path.join(options.path, template.targetPath); + const exists = await fileExists(targetPath); + + if (!exists || options.force) { + toCreate.push({ template, targetPath }); + } + } + + if (toCreate.length === 0) { + console.log(chalk.green('All required files already exist.')); + return; + } + + // Dry run mode - just show what would be created + if (options.dryRun) { + console.log(chalk.cyan('Would create the following files:')); + for (const { template, targetPath } of toCreate) { + const relativePath = path.relative(options.path, targetPath); + console.log(chalk.dim(` ${relativePath} (for ${template.checkId})`)); + } + return; + } + + // Get project context for template variables + const context = await getProjectContext(options.path); + + // Create files + console.log(chalk.cyan('Creating files...')); + for (const { template, targetPath } of toCreate) { + const content = substituteVariables(template.content, context); + await writeFile(targetPath, content); + const relativePath = path.relative(options.path, targetPath); + console.log(chalk.green(` Created: ${relativePath}`)); + } + + console.log(chalk.green(`\nCreated ${toCreate.length} file(s).`)); + } catch (error) { + console.error(chalk.red('Init failed:'), error instanceof Error ? error.message : error); + process.exit(1); + } +} + +function isValidLevel(level: string): level is Level { + return ['L1', 'L2', 'L3', 'L4', 'L5'].includes(level); +} + +function levelValue(level: Level): number { + return parseInt(level.substring(1), 10); +} + +interface ProjectContext { + projectName: string; + repoName: string; + year: string; +} + +async function getProjectContext(rootPath: string): Promise { + // Try to get project name from package.json + const packageJsonPath = path.join(rootPath, 'package.json'); + const packageJsonContent = await readFile(packageJsonPath); + + let projectName = path.basename(rootPath); + + if (packageJsonContent) { + try { + const pkg = JSON.parse(packageJsonContent); + projectName = pkg.name || projectName; + } catch { + // Ignore parse errors + } + } + + return { + projectName, + repoName: path.basename(rootPath), + year: new Date().getFullYear().toString(), + }; +} + +function substituteVariables(content: string, context: ProjectContext): string { + return content + .replace(/\{\{PROJECT_NAME\}\}/g, context.projectName) + .replace(/\{\{REPO_NAME\}\}/g, context.repoName) + .replace(/\{\{YEAR\}\}/g, context.year); +} diff --git a/agent-readiness/src/commands/scan.ts b/agent-readiness/src/commands/scan.ts new file mode 100644 index 0000000..c5ad848 --- /dev/null +++ b/agent-readiness/src/commands/scan.ts @@ -0,0 +1,66 @@ +/** + * Scan command implementation + */ + +import * as path from 'node:path'; +import chalk from 'chalk'; +import type { ScanOptions, Level } from '../types.js'; +import { scan } from '../scanner.js'; +import { outputJson } from '../output/json.js'; +import { outputMarkdown } from '../output/markdown.js'; +import { directoryExists } from '../utils/fs.js'; + +export async function scanCommand(options: ScanOptions): Promise { + // Validate path exists + if (!(await directoryExists(options.path))) { + console.error(chalk.red(`Error: Path does not exist: ${options.path}`)); + process.exit(1); + } + + // Validate level if provided + if (options.level && !isValidLevel(options.level)) { + console.error(chalk.red(`Error: Invalid level: ${options.level}`)); + console.error('Valid levels: L1, L2, L3, L4, L5'); + process.exit(1); + } + + // Validate output format + if (!['json', 'markdown', 'both'].includes(options.output)) { + console.error(chalk.red(`Error: Invalid output format: ${options.output}`)); + console.error('Valid formats: json, markdown, both'); + process.exit(1); + } + + if (options.verbose) { + console.log(chalk.dim(`Scanning: ${options.path}`)); + console.log(chalk.dim(`Profile: ${options.profile}`)); + } + + try { + // Run scan + const result = await scan(options); + + // Output results + if (options.output === 'json' || options.output === 'both') { + const outputPath = options.outputFile || path.join(options.path, 'readiness.json'); + await outputJson(result, outputPath); + if (options.verbose) { + console.log(chalk.dim(`JSON output: ${outputPath}`)); + } + } + + if (options.output === 'markdown' || options.output === 'both') { + outputMarkdown(result, options.verbose); + } + + // Exit with appropriate code + process.exit(result.level ? 0 : 1); + } catch (error) { + console.error(chalk.red('Scan failed:'), error instanceof Error ? error.message : error); + process.exit(1); + } +} + +function isValidLevel(level: string): level is Level { + return ['L1', 'L2', 'L3', 'L4', 'L5'].includes(level); +} diff --git a/agent-readiness/src/engine/context.ts b/agent-readiness/src/engine/context.ts new file mode 100644 index 0000000..d2e7344 --- /dev/null +++ b/agent-readiness/src/engine/context.ts @@ -0,0 +1,126 @@ +/** + * Scan context builder + * + * Creates the context object passed to all checks during a scan + */ + +import * as path from 'node:path'; +import type { ScanContext, PackageJson } from '../types.js'; +import { readFile, fileExists, directoryExists, findFiles } from '../utils/fs.js'; +import { getCommitSha, getRepoName } from '../utils/git.js'; +import { LRUCache, CACHE_LIMITS } from '../utils/lru-cache.js'; + +/** + * Build scan context for a repository + */ +export async function buildScanContext(rootPath: string): Promise { + const repoName = getRepoName(rootPath); + const commitSha = getCommitSha(rootPath); + + // Load package.json if it exists + const packageJson = await loadPackageJson(rootPath); + + // Detect monorepo + const { isMonorepo, apps } = await detectMonorepo(rootPath, packageJson); + + return { + root_path: rootPath, + repo_name: repoName, + commit_sha: commitSha, + // Use LRU caches with size limits to prevent unbounded memory growth + file_cache: new LRUCache(CACHE_LIMITS.FILE_CONTENT), + glob_cache: new LRUCache(CACHE_LIMITS.GLOB_RESULTS), + package_json: packageJson, + is_monorepo: isMonorepo, + monorepo_apps: apps, + }; +} + +/** + * Load and parse package.json + */ +async function loadPackageJson(rootPath: string): Promise { + const packageJsonPath = path.join(rootPath, 'package.json'); + const content = await readFile(packageJsonPath); + + if (!content) return undefined; + + try { + return JSON.parse(content) as PackageJson; + } catch { + return undefined; + } +} + +/** + * Detect if repo is a monorepo and find app directories + */ +async function detectMonorepo( + rootPath: string, + packageJson?: PackageJson +): Promise<{ isMonorepo: boolean; apps: string[] }> { + const apps: string[] = []; + + // Check for yarn/npm workspaces + if (packageJson?.workspaces) { + const workspaces = Array.isArray(packageJson.workspaces) + ? packageJson.workspaces + : packageJson.workspaces.packages || []; + + for (const pattern of workspaces) { + // Skip patterns that attempt directory traversal + if (pattern.includes('..')) { + continue; + } + const matches = await findFiles(pattern, rootPath); + // Get directory names from matched package.json files + for (const match of matches) { + const dir = path.dirname(match); + const relDir = path.relative(rootPath, dir); + if (relDir && relDir !== '.') { + apps.push(relDir); + } + } + } + + if (apps.length > 0) { + return { isMonorepo: true, apps }; + } + } + + // Check for common monorepo patterns + const monorepoMarkers = ['lerna.json', 'pnpm-workspace.yaml', 'rush.json', 'nx.json']; + + for (const marker of monorepoMarkers) { + if (await fileExists(path.join(rootPath, marker))) { + // Try to find apps/packages directories + const commonDirs = ['apps', 'packages', 'libs', 'services']; + for (const dir of commonDirs) { + const dirPath = path.join(rootPath, dir); + if (await directoryExists(dirPath)) { + const subDirs = await findFiles(`${dir}/*/package.json`, rootPath); + for (const subDir of subDirs) { + const relDir = path.relative(rootPath, path.dirname(subDir)); + apps.push(relDir); + } + } + } + return { isMonorepo: true, apps }; + } + } + + // Check for apps/ or packages/ directories even without markers + const commonDirs = ['apps', 'packages']; + for (const dir of commonDirs) { + const subPackages = await findFiles(`${dir}/*/package.json`, rootPath); + if (subPackages.length >= 2) { + for (const subPackage of subPackages) { + const relDir = path.relative(rootPath, path.dirname(subPackage)); + apps.push(relDir); + } + return { isMonorepo: true, apps }; + } + } + + return { isMonorepo: false, apps: [] }; +} diff --git a/agent-readiness/src/engine/index.ts b/agent-readiness/src/engine/index.ts new file mode 100644 index 0000000..5a30a0e --- /dev/null +++ b/agent-readiness/src/engine/index.ts @@ -0,0 +1,12 @@ +/** + * Scan engine exports + */ + +export { buildScanContext } from './context.js'; +export { + calculateLevelSummaries, + determineAchievedLevel, + calculateProgressToNext, + calculatePillarSummaries, + calculateOverallScore, +} from './level-gate.js'; diff --git a/agent-readiness/src/engine/level-gate.ts b/agent-readiness/src/engine/level-gate.ts new file mode 100644 index 0000000..2644290 --- /dev/null +++ b/agent-readiness/src/engine/level-gate.ts @@ -0,0 +1,205 @@ +/** + * Level gating logic + * + * Implements the 80% rule for level achievement: + * - Level N achieved when: + * 1. ALL required checks in level N pass + * 2. >= 80% of ALL checks in level N pass + * 3. All previous levels (1 to N-1) already achieved + */ + +import type { Level, CheckResult, LevelSummary, PillarSummary, Pillar } from '../types.js'; +import { PASSING_THRESHOLD, LEVELS, PILLARS, PILLAR_NAMES } from '../types.js'; + +/** + * Calculate level summaries from check results + */ +export function calculateLevelSummaries(results: CheckResult[]): Record { + const summaries: Record = {} as Record; + const levels = LEVELS; + + for (const level of levels) { + const levelResults = results.filter((r) => r.level === level); + + const totalCount = levelResults.length; + const passedCount = levelResults.filter((r) => r.passed).length; + + // Get required check results for this level + const requiredResults = levelResults.filter((r) => r.required); + const requiredPassed = requiredResults.filter((r) => r.passed).length; + const requiredTotal = requiredResults.length; + + const score = totalCount > 0 ? Math.round((passedCount / totalCount) * 100) : 0; + + // Level achieved if: + // 1. All required checks pass + // 2. Score >= 80% + const allRequiredPass = requiredPassed === requiredTotal; + const meetsThreshold = totalCount === 0 || passedCount / totalCount >= PASSING_THRESHOLD; + const achieved = allRequiredPass && meetsThreshold; + + summaries[level] = { + level, + achieved, + score, + checks_passed: passedCount, + checks_total: totalCount, + required_passed: requiredPassed, + required_total: requiredTotal, + }; + } + + return summaries; +} + +/** + * Determine the highest achieved level + * + * Levels must be achieved in order (can't skip L2 to get L3). + * + * IMPORTANT: Empty Level Auto-Achievement Behavior + * ------------------------------------------------ + * If a level has no checks defined in the profile, it is automatically + * considered "achieved" IF all previous levels have been achieved. + * + * Example with a profile that has no L2 checks: + * - L1: 5 checks, all pass → L1 achieved + * - L2: 0 checks → automatically achieved (since L1 passed) + * - L3: 10 checks, 8 pass → L3 achieved + * - Result: "Level L3 achieved" + * + * This allows profiles to focus on specific levels without requiring + * checks at every level. However, it means a repo could achieve L3 + * without any L2-specific validation if the profile omits L2 checks. + * + * If stricter behavior is needed, ensure your profile defines at least + * one check for each level you want to gate. + */ +export function determineAchievedLevel(levelSummaries: Record): Level | null { + const levels = LEVELS; + let highestAchieved: Level | null = null; + + for (const level of levels) { + const summary = levelSummaries[level]; + + // Empty levels are auto-achieved if previous levels passed + // This allows profiles to skip levels they don't need to check + if (summary.checks_total === 0) { + if (highestAchieved !== null || level === 'L1') { + highestAchieved = level; + continue; + } + } + + if (summary.achieved) { + highestAchieved = level; + } else { + // Stop at first non-achieved level (levels must be sequential) + break; + } + } + + return highestAchieved; +} + +/** + * Calculate progress toward next level + */ +export function calculateProgressToNext( + currentLevel: Level | null, + levelSummaries: Record +): number { + const levels = LEVELS; + const currentIndex = currentLevel ? levels.indexOf(currentLevel) : -1; + const nextLevel = levels[currentIndex + 1]; + + if (!nextLevel) { + return 1.0; // Already at max level + } + + const nextSummary = levelSummaries[nextLevel]; + + if (nextSummary.checks_total === 0) { + return 1.0; // No checks for next level + } + + return nextSummary.checks_passed / nextSummary.checks_total; +} + +/** + * Calculate pillar summaries from check results + */ +export function calculatePillarSummaries(results: CheckResult[]): Record { + const summaries: Record = {} as Record; + + for (const pillar of PILLARS) { + const pillarResults = results.filter((r) => r.pillar === pillar); + const totalCount = pillarResults.length; + const passedCount = pillarResults.filter((r) => r.passed).length; + const failedChecks = pillarResults.filter((r) => !r.passed).map((r) => r.check_id); + + const score = totalCount > 0 ? Math.round((passedCount / totalCount) * 100) : 100; + + // Determine highest achieved level for this pillar + const pillarLevelAchieved = determinePillarLevel(pillarResults); + + summaries[pillar] = { + pillar, + name: PILLAR_NAMES[pillar], + level_achieved: pillarLevelAchieved, + score, + checks_passed: passedCount, + checks_total: totalCount, + failed_checks: failedChecks, + }; + } + + return summaries; +} + +/** + * Determine highest achieved level for a specific pillar + */ +function determinePillarLevel(results: CheckResult[]): Level | null { + const levels = LEVELS; + let highestAchieved: Level | null = null; + + for (const level of levels) { + const levelResults = results.filter((r) => r.level === level); + + if (levelResults.length === 0) { + // No checks at this level for this pillar + if (highestAchieved !== null || level === 'L1') { + highestAchieved = level; + continue; + } + break; + } + + const passed = levelResults.filter((r) => r.passed).length; + const total = levelResults.length; + const requiredResults = levelResults.filter((r) => r.required); + const requiredPassed = requiredResults.filter((r) => r.passed).length; + + const allRequiredPass = requiredPassed === requiredResults.length; + const meetsThreshold = passed / total >= PASSING_THRESHOLD; + + if (allRequiredPass && meetsThreshold) { + highestAchieved = level; + } else { + break; + } + } + + return highestAchieved; +} + +/** + * Calculate overall score (0-100) + */ +export function calculateOverallScore(results: CheckResult[]): number { + if (results.length === 0) return 0; + + const passed = results.filter((r) => r.passed).length; + return Math.round((passed / results.length) * 100); +} diff --git a/agent-readiness/src/index.ts b/agent-readiness/src/index.ts new file mode 100644 index 0000000..b8b82dc --- /dev/null +++ b/agent-readiness/src/index.ts @@ -0,0 +1,73 @@ +#!/usr/bin/env node +/** + * agent-readiness CLI entry point + * + * Factory-compatible repo maturity scanner for AI agent readiness + */ + +import { Command } from 'commander'; +import * as path from 'node:path'; +import * as fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import { scanCommand } from './commands/scan.js'; +import { initCommand } from './commands/init.js'; + +// Read version from package.json +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const packageJson = JSON.parse( + fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf-8') +); + +const program = new Command(); + +program + .name('agent-ready') + .description('Factory-compatible repo maturity scanner for AI agent readiness') + .version(packageJson.version); + +// Scan command +program + .command('scan') + .description('Scan a repository for agent readiness') + .argument('[path]', 'Path to repository', '.') + .option('-p, --profile ', 'Profile to use', 'factory_compat') + .option('-o, --output ', 'Output format: json, markdown, both', 'both') + .option('-l, --level ', 'Target level to check (L1-L5)') + .option('-v, --verbose', 'Verbose output', false) + .option('--output-file ', 'Output file path for JSON results') + .action(async (scanPath: string, options) => { + const resolvedPath = path.resolve(process.cwd(), scanPath); + await scanCommand({ + path: resolvedPath, + profile: options.profile, + output: options.output, + level: options.level, + verbose: options.verbose, + outputFile: options.outputFile, + }); + }); + +// Init command +program + .command('init') + .description('Generate missing agent-ready files') + .argument('[path]', 'Path to repository', '.') + .option('-l, --level ', 'Generate files needed for level (L1-L5)') + .option('-c, --check ', 'Generate file for specific check only') + .option('-n, --dry-run', 'Show what would be created without creating', false) + .option('-f, --force', 'Overwrite existing files', false) + .option('-i, --interactive', 'Interactive mode with prompts', false) + .action(async (initPath: string, options) => { + const resolvedPath = path.resolve(process.cwd(), initPath); + await initCommand({ + path: resolvedPath, + level: options.level, + check: options.check, + dryRun: options.dryRun, + force: options.force, + interactive: options.interactive, + }); + }); + +// Parse arguments and run +program.parse(); diff --git a/agent-readiness/src/output/json.ts b/agent-readiness/src/output/json.ts new file mode 100644 index 0000000..41b1074 --- /dev/null +++ b/agent-readiness/src/output/json.ts @@ -0,0 +1,74 @@ +/** + * JSON output formatter + * + * Writes scan results to readiness.json + */ + +import type { ScanResult } from '../types.js'; +import { writeFile } from '../utils/fs.js'; + +/** + * Write scan results to JSON file + */ +export async function outputJson(result: ScanResult, outputPath: string): Promise { + // Create a clean output object (remove verbose data) + const output = { + repo: result.repo, + commit: result.commit, + timestamp: result.timestamp, + profile: result.profile, + profile_version: result.profile_version, + level: result.level, + progress_to_next: Math.round(result.progress_to_next * 100) / 100, + overall_score: result.overall_score, + pillars: Object.fromEntries( + Object.entries(result.pillars).map(([key, summary]) => [ + key, + { + level_achieved: summary.level_achieved, + score: summary.score, + checks_passed: summary.checks_passed, + checks_total: summary.checks_total, + }, + ]) + ), + levels: Object.fromEntries( + Object.entries(result.levels).map(([key, summary]) => [ + key, + { + achieved: summary.achieved, + score: summary.score, + checks_passed: summary.checks_passed, + checks_total: summary.checks_total, + }, + ]) + ), + failed_checks: result.failed_checks.map((check) => ({ + check_id: check.check_id, + pillar: check.pillar, + level: check.level, + message: check.message, + required: check.required, + suggestions: check.suggestions, + })), + action_items: result.action_items.map((item) => ({ + priority: item.priority, + check_id: item.check_id, + pillar: item.pillar, + level: item.level, + action: item.action, + })), + is_monorepo: result.is_monorepo, + apps: result.apps, + }; + + const json = JSON.stringify(output, null, 2); + await writeFile(outputPath, json); +} + +/** + * Format scan result as JSON string (for stdout) + */ +export function formatJson(result: ScanResult): string { + return JSON.stringify(result, null, 2); +} diff --git a/agent-readiness/src/output/markdown.ts b/agent-readiness/src/output/markdown.ts new file mode 100644 index 0000000..71c712f --- /dev/null +++ b/agent-readiness/src/output/markdown.ts @@ -0,0 +1,203 @@ +/** + * Markdown/Terminal output formatter + * + * Displays scan results in a readable terminal format + */ + +import chalk from 'chalk'; +import type { ScanResult, Level, ActionPriority } from '../types.js'; +import { LEVELS } from '../types.js'; + +const LEVEL_COLORS: Record string> = { + L1: chalk.red, + L2: chalk.yellow, + L3: chalk.cyan, + L4: chalk.blue, + L5: chalk.green, + none: chalk.gray, +}; + +const PRIORITY_COLORS: Record string> = { + critical: chalk.red.bold, + high: chalk.red, + medium: chalk.yellow, + low: chalk.gray, +}; + +/** + * Output scan results to terminal + */ +export function outputMarkdown(result: ScanResult, verbose: boolean): void { + console.log(''); + + // Header + printHeader(result); + + // Level badge + printLevelBadge(result); + + // Pillar summary + printPillarSummary(result); + + // Level breakdown + if (verbose) { + printLevelBreakdown(result); + } + + // Action items + if (result.action_items.length > 0) { + printActionItems(result, verbose); + } + + // Monorepo apps + if (result.is_monorepo && result.apps && result.apps.length > 0) { + printMonorepoApps(result); + } + + console.log(''); +} + +function printHeader(result: ScanResult): void { + console.log(chalk.bold('Agent Readiness Report')); + console.log(chalk.dim('─'.repeat(50))); + console.log(`${chalk.dim('Repository:')} ${result.repo}`); + console.log(`${chalk.dim('Commit:')} ${result.commit}`); + console.log(`${chalk.dim('Profile:')} ${result.profile} v${result.profile_version}`); + console.log(`${chalk.dim('Time:')} ${new Date(result.timestamp).toLocaleString()}`); + console.log(''); +} + +function printLevelBadge(result: ScanResult): void { + const level = result.level || 'none'; + const colorFn = LEVEL_COLORS[level]; + const levelName = result.level || 'Not Achieved'; + + const badge = `┌─────────────────────────────────────────────────┐ +│ │ +│ ${colorFn(`Level: ${levelName}`)} │ +│ ${chalk.dim(`Score: ${result.overall_score}%`)} │ +│ │ +└─────────────────────────────────────────────────┘`; + + console.log(badge); + console.log(''); + + if (result.level && result.progress_to_next < 1) { + const nextLevel = getNextLevel(result.level); + if (nextLevel) { + const progress = Math.round(result.progress_to_next * 100); + const bar = createProgressBar(progress); + console.log(`${chalk.dim('Progress to')} ${nextLevel}: ${bar} ${progress}%`); + console.log(''); + } + } +} + +function printPillarSummary(result: ScanResult): void { + console.log(chalk.bold('Pillar Summary')); + console.log(chalk.dim('─'.repeat(50))); + + const pillars = Object.values(result.pillars).filter((p) => p.checks_total > 0); + + for (const pillar of pillars) { + const levelStr = pillar.level_achieved || '-'; + const colorFn = pillar.level_achieved ? LEVEL_COLORS[pillar.level_achieved] : chalk.gray; + + const score = pillar.score; + const scoreColor = score >= 80 ? chalk.green : score >= 50 ? chalk.yellow : chalk.red; + + const checkStatus = `${pillar.checks_passed}/${pillar.checks_total}`; + + console.log( + ` ${pillar.name.padEnd(16)} ${colorFn(levelStr.padEnd(4))} ${scoreColor( + score.toString().padStart(3) + )}% ${chalk.dim(`(${checkStatus})`)}` + ); + } + + console.log(''); +} + +function printLevelBreakdown(result: ScanResult): void { + console.log(chalk.bold('Level Breakdown')); + console.log(chalk.dim('─'.repeat(50))); + + const levels = LEVELS; + + for (const level of levels) { + const summary = result.levels[level]; + if (summary.checks_total === 0) continue; + + const status = summary.achieved ? chalk.green('✓') : chalk.red('✗'); + const colorFn = LEVEL_COLORS[level]; + + console.log( + ` ${status} ${colorFn(level)} - ${summary.score}% ` + + `(${summary.checks_passed}/${summary.checks_total} checks, ` + + `${summary.required_passed}/${summary.required_total} required)` + ); + } + + console.log(''); +} + +function printActionItems(result: ScanResult, verbose: boolean): void { + console.log(chalk.bold('Action Items')); + console.log(chalk.dim('─'.repeat(50))); + + const itemsToShow = verbose ? result.action_items : result.action_items.slice(0, 5); + + for (const item of itemsToShow) { + const priorityColor = PRIORITY_COLORS[item.priority]; + const priorityBadge = priorityColor(`[${item.priority.toUpperCase()}]`); + const levelColor = LEVEL_COLORS[item.level]; + + console.log(` ${priorityBadge} ${levelColor(item.level)} ${item.action}`); + } + + if (!verbose && result.action_items.length > 5) { + console.log( + chalk.dim(` ... and ${result.action_items.length - 5} more (use --verbose to see all)`) + ); + } + + console.log(''); +} + +function printMonorepoApps(result: ScanResult): void { + if (!result.apps) return; + + console.log(chalk.bold('Monorepo Apps')); + console.log(chalk.dim('─'.repeat(50))); + + for (const app of result.apps) { + if (app.error) { + // Show error for failed apps + console.log(` ${app.name.padEnd(20)} ${chalk.red('ERROR')} ${chalk.dim(app.error)}`); + } else { + const level = app.level || '-'; + const colorFn = app.level ? LEVEL_COLORS[app.level] : chalk.gray; + + console.log( + ` ${app.name.padEnd(20)} ${colorFn(level.padEnd(4))} ${app.score}% ` + + chalk.dim(`(${app.checks_passed}/${app.checks_total})`) + ); + } + } + + console.log(''); +} + +function getNextLevel(current: Level): Level | null { + const levels = LEVELS; + const index = levels.indexOf(current); + return index < levels.length - 1 ? levels[index + 1] : null; +} + +function createProgressBar(percent: number): string { + const width = 20; + const filled = Math.round((percent / 100) * width); + const empty = width - filled; + + return chalk.green('█'.repeat(filled)) + chalk.gray('░'.repeat(empty)); +} diff --git a/agent-readiness/src/profiles/index.ts b/agent-readiness/src/profiles/index.ts new file mode 100644 index 0000000..91865a6 --- /dev/null +++ b/agent-readiness/src/profiles/index.ts @@ -0,0 +1,83 @@ +/** + * Profile loader + * + * Loads check profiles from YAML files + */ + +import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import type { Profile } from '../types.js'; +import { loadProfile as loadProfileYaml } from '../utils/yaml.js'; +import { fileExists, safePath } from '../utils/fs.js'; + +// Get the directory of this module +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +// Profiles directory (relative to compiled output) +const PROFILES_DIR = path.resolve(__dirname, '../../profiles'); + +// Built-in profile names +const BUILTIN_PROFILES = ['factory_compat']; + +/** + * Load a profile by name or path + */ +export async function loadProfile(nameOrPath: string): Promise { + // Check if it's a path to a file + if (nameOrPath.includes('/') || nameOrPath.includes('\\')) { + // Validate path is within allowed directories (profiles dir or current working directory) + const resolvedPath = path.resolve(nameOrPath); + const cwd = process.cwd(); + + // Allow paths in profiles dir or cwd + const inProfilesDir = safePath(path.relative(PROFILES_DIR, resolvedPath), PROFILES_DIR); + const inCwd = safePath(path.relative(cwd, resolvedPath), cwd); + + if (!inProfilesDir && !inCwd) { + throw new Error( + `Invalid profile path: ${nameOrPath}. Path must be within profiles directory or current working directory.` + ); + } + + return loadProfileYaml(resolvedPath); + } + + // Check if it's a built-in profile + if (BUILTIN_PROFILES.includes(nameOrPath)) { + const profilePath = path.join(PROFILES_DIR, `${nameOrPath}.yaml`); + + if (!(await fileExists(profilePath))) { + throw new Error(`Built-in profile not found: ${nameOrPath}`); + } + + return loadProfileYaml(profilePath); + } + + // Try to find it as a YAML file in profiles directory + const yamlPath = path.join(PROFILES_DIR, `${nameOrPath}.yaml`); + if (await fileExists(yamlPath)) { + return loadProfileYaml(yamlPath); + } + + const ymlPath = path.join(PROFILES_DIR, `${nameOrPath}.yml`); + if (await fileExists(ymlPath)) { + return loadProfileYaml(ymlPath); + } + + throw new Error(`Profile not found: ${nameOrPath}`); +} + +/** + * Load the default profile + */ +export async function loadDefaultProfile(): Promise { + return loadProfile('factory_compat'); +} + +/** + * List available profiles + */ +export function listProfiles(): string[] { + return [...BUILTIN_PROFILES]; +} diff --git a/agent-readiness/src/scanner.ts b/agent-readiness/src/scanner.ts new file mode 100644 index 0000000..304885b --- /dev/null +++ b/agent-readiness/src/scanner.ts @@ -0,0 +1,224 @@ +/** + * Main scanner orchestrator + * + * Coordinates the scan process: context building, check execution, and result aggregation + */ + +import * as path from 'node:path'; +import type { + ScanOptions, + ScanResult, + ActionItem, + ActionPriority, + CheckResult, + CheckConfig, + MonorepoApp, +} from './types.js'; +import { loadProfile } from './profiles/index.js'; +import { buildScanContext } from './engine/context.js'; +import { + calculateLevelSummaries, + determineAchievedLevel, + calculateProgressToNext, + calculatePillarSummaries, + calculateOverallScore, +} from './engine/level-gate.js'; +import { executeChecks } from './checks/index.js'; + +/** + * Run a full scan on a repository + */ +export async function scan(options: ScanOptions): Promise { + // Load profile + const profile = await loadProfile(options.profile); + + // Build scan context + const context = await buildScanContext(options.path); + + // Filter checks by level if specified + let checksToRun = profile.checks; + if (options.level) { + const levelValue = parseInt(options.level.substring(1), 10); + checksToRun = profile.checks.filter((check) => { + const checkLevel = parseInt(check.level.substring(1), 10); + return checkLevel <= levelValue; + }); + } + + // Execute all checks + const results = await executeChecks(checksToRun, context); + + // Calculate summaries + const levelSummaries = calculateLevelSummaries(results); + const pillarSummaries = calculatePillarSummaries(results); + const achievedLevel = determineAchievedLevel(levelSummaries); + const progressToNext = calculateProgressToNext(achievedLevel, levelSummaries); + const overallScore = calculateOverallScore(results); + + // Get failed checks + const failedChecks = results.filter((r) => !r.passed); + + // Generate action items + const actionItems = generateActionItems(failedChecks, checksToRun); + + // Scan monorepo apps if applicable + let apps: MonorepoApp[] | undefined; + if (context.is_monorepo && context.monorepo_apps.length > 0) { + apps = await scanMonorepoApps(context.monorepo_apps, options, checksToRun); + } + + return { + repo: context.repo_name, + commit: context.commit_sha, + timestamp: new Date().toISOString(), + profile: profile.name, + profile_version: profile.version, + level: achievedLevel, + progress_to_next: progressToNext, + overall_score: overallScore, + pillars: pillarSummaries, + levels: levelSummaries, + check_results: results, + failed_checks: failedChecks, + action_items: actionItems, + is_monorepo: context.is_monorepo, + apps, + }; +} + +/** + * Generate prioritized action items from failed checks + */ +function generateActionItems(failedChecks: CheckResult[], checks: CheckConfig[]): ActionItem[] { + const items: ActionItem[] = []; + + for (const result of failedChecks) { + const check = checks.find((c) => c.id === result.check_id); + if (!check) continue; + + const priority = calculatePriority(check); + const action = result.suggestions?.[0] || `Fix: ${result.message}`; + + items.push({ + priority, + check_id: result.check_id, + pillar: result.pillar, + level: result.level, + action, + details: result.message, + template: getTemplateForCheck(check), + }); + } + + // Sort by priority (critical > high > medium > low) and level + const priorityOrder: Record = { + critical: 0, + high: 1, + medium: 2, + low: 3, + }; + + items.sort((a, b) => { + const priorityDiff = priorityOrder[a.priority] - priorityOrder[b.priority]; + if (priorityDiff !== 0) return priorityDiff; + + const levelA = parseInt(a.level.substring(1), 10); + const levelB = parseInt(b.level.substring(1), 10); + return levelA - levelB; + }); + + return items; +} + +/** + * Calculate action priority based on check properties + */ +function calculatePriority(check: CheckConfig): ActionPriority { + // Required checks at L1 are critical + if (check.required && check.level === 'L1') { + return 'critical'; + } + + // Required checks are high priority + if (check.required) { + return 'high'; + } + + // L1-L2 non-required are medium + if (check.level === 'L1' || check.level === 'L2') { + return 'medium'; + } + + // Everything else is low + return 'low'; +} + +/** + * Get template file name for a check if applicable + */ +function getTemplateForCheck(check: CheckConfig): string | undefined { + // Map check IDs to template files + const templateMap: Record = { + 'docs.agents_md': 'AGENTS.md', + 'docs.contributing': 'CONTRIBUTING.md', + 'env.dotenv_example': '.env.example', + 'security.gitignore': '.gitignore', + 'ci.github_workflow': '.github/workflows/ci.yml', + // New templates for Factory parity + 'env.devcontainer': '.devcontainer/devcontainer.json', + 'security.codeowners': '.github/CODEOWNERS', + 'task_discovery.issue_templates': '.github/ISSUE_TEMPLATE/bug_report.md', + 'task_discovery.pr_template': '.github/PULL_REQUEST_TEMPLATE.md', + 'env.docker_compose': 'docker-compose.yml', + }; + + return templateMap[check.id]; +} + +/** + * Scan monorepo apps and aggregate results + */ +async function scanMonorepoApps( + appPaths: string[], + options: ScanOptions, + checks: CheckConfig[] +): Promise { + const apps: MonorepoApp[] = []; + + for (const appPath of appPaths) { + const fullPath = path.join(options.path, appPath); + + try { + const context = await buildScanContext(fullPath); + + // Run checks scoped to app + const results = await executeChecks(checks, context); + const levelSummaries = calculateLevelSummaries(results); + const achievedLevel = determineAchievedLevel(levelSummaries); + const score = calculateOverallScore(results); + const passed = results.filter((r) => r.passed).length; + + apps.push({ + name: appPath.split('/').pop() || appPath, + path: appPath, + level: achievedLevel, + score, + checks_passed: passed, + checks_total: results.length, + }); + } catch (error) { + // Record failed apps with error details + apps.push({ + name: appPath.split('/').pop() || appPath, + path: appPath, + level: null, + score: 0, + checks_passed: 0, + checks_total: 0, + error: error instanceof Error ? error.message : 'Unknown error during scan', + }); + } + } + + return apps; +} diff --git a/agent-readiness/src/templates/index.ts b/agent-readiness/src/templates/index.ts new file mode 100644 index 0000000..cbcae48 --- /dev/null +++ b/agent-readiness/src/templates/index.ts @@ -0,0 +1,135 @@ +/** + * Template loader for init command + * + * Provides templates that can be generated to help achieve higher readiness levels + */ + +import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { readFile } from '../utils/fs.js'; + +// Get the directory of this module +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +// Templates directory (relative to compiled output) +const TEMPLATES_DIR = path.resolve(__dirname, '../../templates'); + +export interface Template { + checkId: string; + name: string; + description: string; + targetPath: string; + content: string; +} + +// Template definitions +const TEMPLATE_DEFS: Array> = [ + { + checkId: 'docs.agents_md', + name: 'AGENTS.md', + description: 'AI agent instructions file', + targetPath: 'AGENTS.md', + }, + { + checkId: 'docs.contributing', + name: 'CONTRIBUTING.md', + description: 'Contributing guidelines', + targetPath: 'CONTRIBUTING.md', + }, + { + checkId: 'env.dotenv_example', + name: '.env.example', + description: 'Environment variables template', + targetPath: '.env.example', + }, + { + checkId: 'security.gitignore', + name: '.gitignore', + description: 'Git ignore file', + targetPath: '.gitignore', + }, + { + checkId: 'ci.github_workflow', + name: 'CI Workflow', + description: 'GitHub Actions CI workflow', + targetPath: '.github/workflows/ci.yml', + }, + // New templates for Factory parity + { + checkId: 'env.devcontainer', + name: 'Devcontainer', + description: 'VS Code development container configuration', + targetPath: '.devcontainer/devcontainer.json', + }, + { + checkId: 'security.codeowners', + name: 'CODEOWNERS', + description: 'Code ownership definitions for review routing', + targetPath: '.github/CODEOWNERS', + }, + { + checkId: 'task_discovery.issue_templates', + name: 'Issue Templates', + description: 'GitHub issue templates for bug reports and features', + targetPath: '.github/ISSUE_TEMPLATE/bug_report.md', + }, + { + checkId: 'task_discovery.pr_template', + name: 'PR Template', + description: 'Pull request template for consistent contributions', + targetPath: '.github/PULL_REQUEST_TEMPLATE.md', + }, + { + checkId: 'env.docker_compose', + name: 'Docker Compose', + description: 'Local development services configuration', + targetPath: 'docker-compose.yml', + }, +]; + +// Map source file names (some differ from target) +const SOURCE_FILE_MAP: Record = { + '.gitignore': '.gitignore.template', + '.github/workflows/ci.yml': 'github-workflow.yml', + '.github/CODEOWNERS': 'CODEOWNERS.template', + '.github/ISSUE_TEMPLATE/bug_report.md': 'ISSUE_TEMPLATE/bug_report.md', + '.github/PULL_REQUEST_TEMPLATE.md': 'PULL_REQUEST_TEMPLATE.md', +}; + +/** + * Load all templates with their content + */ +export async function getTemplates(): Promise { + const templates: Template[] = []; + + for (const def of TEMPLATE_DEFS) { + const sourceFile = SOURCE_FILE_MAP[def.targetPath] || path.basename(def.targetPath); + const sourcePath = path.join(TEMPLATES_DIR, sourceFile); + const content = await readFile(sourcePath); + + if (content) { + templates.push({ + ...def, + content, + }); + } + } + + return templates; +} + +/** + * Get a single template by check ID + */ +export async function getTemplateForCheck(checkId: string): Promise