{"_id":"@charlietango/az-pipeline-codex-review-agent","name":"@charlietango/az-pipeline-codex-review-agent","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@charlietango/az-pipeline-codex-review-agent","version":"0.1.0","description":"Codex-based pull request review agent that posts feedback to Azure DevOps","license":"MIT","type":"module","main":"dist/reviewPr.js","types":"dist/reviewPr.d.ts","bin":{"codex-azure-review":"dist/reviewPr.js"},"dependencies":{"@openai/codex-sdk":"^0.50.0","azure-devops-node-api":"^15.1.1","yargs":"^17.7.2","zod":"^4.0.0"},"devDependencies":{"@biomejs/biome":"^1.7.0","@types/node":"^20.12.7","@types/yargs":"^17.0.32","bumpp":"^9.2.0","lint-staged":"^15.2.7","simple-git-hooks":"^2.13.1","tsx":"^4.19.1","typescript":"^5.4.4"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"lint-staged":{"*":"pnpm exec biome lint --staged --write --no-errors-on-unmatched"},"simple-git-hooks":{"pre-commit":"pnpm exec lint-staged"},"scripts":{"build":"tsc","dev":"pnpm exec tsx src/reviewPr.ts --diff-file mocks/sample.diff --dry-run --debug","review:local":"pnpm exec tsx src/reviewPr.ts --diff-file mocks/sample.diff --dry-run --debug","lint":"pnpm exec biome check .","release":"pnpm run lint && pnpm run typecheck && bumpp && pnpm publish --access public","test":"echo 'No tests defined'","typecheck":"tsc --noEmit"},"_id":"@charlietango/az-pipeline-codex-review-agent@0.1.0","_integrity":"sha512-M8eXwmJSyMcltNBvkOAUBEkZUbJdcnsXpne3+Hyzb1/QYghb42IFtptT82he2wY/5uZuLrVQlTT2eSfTEow5Yw==","_resolved":"/private/var/folders/2p/9hk4b2yx0wdckt43n_4g2wbc0000gn/T/c56b3e9d1219eb12fefe1a24cd1edc43/charlietango-az-pipeline-codex-review-agent-0.1.0.tgz","_from":"file:charlietango-az-pipeline-codex-review-agent-0.1.0.tgz","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-M8eXwmJSyMcltNBvkOAUBEkZUbJdcnsXpne3+Hyzb1/QYghb42IFtptT82he2wY/5uZuLrVQlTT2eSfTEow5Yw==","shasum":"c4ac48c8a82be198d069d5f3fd6e22aab2272fd3","tarball":"https://registry.npmjs.org/@charlietango/az-pipeline-codex-review-agent/-/az-pipeline-codex-review-agent-0.1.0.tgz","fileCount":4,"unpackedSize":32950,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCE65Cg8g0RVmFTqgwyQ9Yw78lWt9Yp4Y2KZwxcMtFicAIgCU+ep6OY8xq9Smu+txxCJDDwZvDYUvL/jfTyzFJfmps="}]},"_npmUser":{"name":"frederik_bosch","email":"frederik@bosch.dev"},"directories":{},"maintainers":[{"name":"thebuilder","email":"dsc@charlietango.dk"},{"name":"frederik_bosch","email":"frederik@bosch.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/az-pipeline-codex-review-agent_0.1.0_1761654099019_0.14584571779559652"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-28T12:21:38.912Z","0.1.0":"2025-10-28T12:21:39.190Z","modified":"2025-10-28T12:21:39.472Z"},"maintainers":[{"name":"thebuilder","email":"dsc@charlietango.dk"},{"name":"frederik_bosch","email":"frederik@bosch.dev"}],"description":"Codex-based pull request review agent that posts feedback to Azure DevOps","license":"MIT","readme":"# Codex Azure Review Agent\n\nCLI that diffs a branch, asks Codex for a structured review, and posts summary + inline `suggestion` comments back to Azure DevOps.\n\n## Usage\n\n```bash\npnpm exec codex-azure-review \\\n  --target-branch refs/heads/main \\\n  --pr-id 123 \\\n  --organization https://dev.azure.com/my-org \\\n  --project MyProject \\\n  --repository MyRepo\n```\n\nKey flags:\n- `--diff-file patch.diff` run locally against mocked changes\n- `--review-time-budget 20` remind Codex to wrap within ~20 minutes\n- `--dry-run` only log results; skip Azure comments\n\nLocal dry run:\n```bash\npnpm run review:local\n```\n\nSimulate the Azure Pipelines job locally:\n\n```bash\n./scripts/run_pipeline_local.sh\n```\n\nAzure Pipelines YAML (`azure-pipelines.yml`) runs the same steps on an agent. Set secrets `OPENAI_API_KEY` and `AZURE_DEVOPS_PAT`, and optionally `REVIEW_TIME_BUDGET`.\n\n### Azure Pipelines template\n\nCopy this minimal pipeline into your project to invoke the included template:\n\n```yaml\nextends:\n  template: templates/codex-review.yml\n  parameters:\n    reviewTimeBudget: '20'\n    packageVersion: 'latest'\n    dryRun: false\n\n# grant the System.AccessToken to scripts for Azure DevOps REST access\n# in the pipeline UI: Settings → \"Allow scripts to access the OAuth token\"\n```\n\nSecrets `OPENAI_API_KEY` and `AZURE_DEVOPS_PAT` must be defined in the pipeline. Set `dryRun: true` if you want logs only without posting review comments.\n\n## Codex contract\n\nCodex returns JSON matching this schema (enforced with Zod):\n```json\n{\n  \"summary\": \"...\",\n  \"findings\": [{\n    \"severity\": \"major\",\n    \"file\": \"src/file.ts\",\n    \"line\": 12,\n    \"title\": \"Issue title\",\n    \"details\": \"Explanation\",\n    \"suggestion\": {\n      \"file\": \"src/file.ts\",\n      \"start_line\": 10,\n      \"end_line\": 14,\n      \"comment\": \"Context\",\n      \"replacement\": \"New code\"\n    }\n  }],\n  \"suggestions\": [{\n    \"file\": \"src/file.ts\",\n    \"start_line\": 20,\n    \"end_line\": 22,\n    \"comment\": \"Context\",\n    \"replacement\": \"New code\"\n  }]\n}\n```\n\nEach finding suggestion (and top-level suggestion) becomes a PR comment with a `suggestion` block, so fixes can be applied inline.\n\n## Notes\n- Requires `OPENAI_API_KEY` (for Codex) and an Azure DevOps PAT (`AZURE_DEVOPS_PAT` or `SYSTEM_ACCESSTOKEN`).\n- Runs as ESM (`moduleResolution: NodeNext`); use `pnpm exec tsx` locally.\n- Biome + husky/lint-staged keep formatting/linting consistent.\n","readmeFilename":"README.md","_rev":"1-cbf5216aeefc0796df12b519e1806318"}