opencode-azure-devops-pr-review 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +122 -80
  3. package/package.json +2 -11
  4. package/src/attribution.mjs +2 -2
  5. package/AGENTS.md +0 -164
  6. package/CODE_OF_CONDUCT.md +0 -83
  7. package/CONTRIBUTING.md +0 -84
  8. package/SECURITY.md +0 -38
  9. package/config/settings.example.json +0 -55
  10. package/config/settings.schema.json +0 -316
  11. package/docs/ARCHITECTURE.md +0 -414
  12. package/docs/AZURE_DEVOPS.md +0 -217
  13. package/docs/COMMENTING.md +0 -399
  14. package/docs/DEBUGGING.md +0 -146
  15. package/docs/DEMO.md +0 -195
  16. package/docs/ENTERPRISE.md +0 -236
  17. package/docs/QUICKSTART.md +0 -238
  18. package/docs/RELEASING.md +0 -95
  19. package/docs/ROADMAP.md +0 -241
  20. package/docs/VALIDATION.md +0 -2127
  21. package/docs/VALIDATION_HISTORY.md +0 -1845
  22. package/docs/VERIFICATION.md +0 -42
  23. package/docs/assets/RECORDING.md +0 -131
  24. package/docs/assets/adjust-findings-teaser.gif +0 -0
  25. package/docs/assets/adjust-preview.png +0 -0
  26. package/docs/assets/adjust-publication.png +0 -0
  27. package/docs/assets/example-comments.md +0 -38
  28. package/docs/assets/generate-demo-gif.py +0 -25
  29. package/docs/assets/generate-demo.mjs +0 -141
  30. package/docs/assets/live-azure-readback.png +0 -0
  31. package/docs/assets/live-preview.png +0 -0
  32. package/docs/assets/live-review-teaser.gif +0 -0
  33. package/docs/assets/live-review.png +0 -0
  34. package/docs/assets/quick-review-demo.gif +0 -0
  35. package/docs/assets/record-terminal.py +0 -124
  36. package/docs/assets/render-terminal-demo.py +0 -168
  37. package/docs/assets/review-example.svg +0 -1
  38. package/docs/assets/walkthrough.svg +0 -1
  39. package/docs/releases/v0.1.0.md +0 -74
  40. package/docs/releases/v0.2.0.md +0 -107
  41. package/docs/releases/v0.2.1.md +0 -65
  42. package/docs/releases/v0.2.2.md +0 -76
  43. package/docs/releases/v0.2.3.md +0 -93
  44. package/docs/releases/v0.3.0.md +0 -125
  45. package/docs/releases/v0.3.1.md +0 -87
  46. package/install.sh +0 -171
  47. package/scripts/merge-settings.py +0 -120
  48. package/uninstall.sh +0 -50
@@ -1,83 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
- * Trolling, insulting or derogatory comments, and personal or political attacks
23
- * Public or private harassment
24
- * Publishing others' private information, such as a physical or email address, without their explicit permission
25
- * Other conduct which could reasonably be considered inappropriate in a professional setting
26
-
27
- ## Enforcement Responsibilities
28
-
29
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
-
31
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
-
33
- ## Scope
34
-
35
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
-
37
- ## Enforcement
38
-
39
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at weiting.lai.code@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
40
-
41
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
-
43
- ## Enforcement Guidelines
44
-
45
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
-
47
- ### 1. Correction
48
-
49
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
-
51
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
-
53
- ### 2. Warning
54
-
55
- **Community Impact**: A violation through a single incident or series of actions.
56
-
57
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
-
59
- ### 3. Temporary Ban
60
-
61
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
-
63
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
-
65
- ### 4. Permanent Ban
66
-
67
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
-
69
- **Consequence**: A permanent ban from any sort of public interaction within the community.
70
-
71
- ## Attribution
72
-
73
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
-
75
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
-
77
- For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
-
79
- [homepage]: https://www.contributor-covenant.org
80
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
- [Mozilla CoC]: https://github.com/mozilla/diversity
82
- [FAQ]: https://www.contributor-covenant.org/faq
83
- [translations]: https://www.contributor-covenant.org/translations
package/CONTRIBUTING.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributing
2
-
3
- Bug reports, focused fixes and documentation improvements are welcome. Start
4
- with the [quickstart](docs/QUICKSTART.md), [architecture](docs/ARCHITECTURE.md)
5
- and [roadmap](docs/ROADMAP.md). Public source and documentation use English.
6
- Everyone taking part follows the [code of conduct](CODE_OF_CONDUCT.md), which
7
- also says where to report a conduct problem.
8
-
9
- ## Report a problem or suggest a change
10
-
11
- Use the [issue forms](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/issues/new/choose).
12
- Include the AZPR tag or commit, OpenCode version, operating system, command and
13
- a small reproduction. For a review failure, the sanitized error and relevant
14
- receipt stage are usually enough to start. Describe the PR's approximate file
15
- and changed-line counts if its size matters. You do not need to share a company
16
- repository or run a paid review again to file a report.
17
-
18
- Issues are public. Never attach raw settings, PATs, provider credentials,
19
- proxy URLs containing credentials, `.local/`, state directories or complete
20
- diagnostics. Receipts and screenshots can also contain private organization,
21
- repository and source details; inspect and redact excerpts before sharing.
22
- See [debugging](docs/DEBUGGING.md) and [data handling](docs/ENTERPRISE.md).
23
- Report suspected security vulnerabilities through [private reporting](SECURITY.md).
24
-
25
- For a larger feature, describe the use case and proposed behavior in an issue
26
- before investing in an implementation. A documentation fix or small bug fix
27
- can go straight to a pull request.
28
-
29
- ## Work locally
30
-
31
- Use Node.js 22.12 or later, POSIX `sh`, Python 3 and Git. The current host
32
- acceptance target is OpenCode V2 `@opencode/cli@2.1.4` on Ubuntu 22.04; other
33
- environments are not yet validated. The runtime has no npm dependencies or
34
- build step. From your checkout:
35
-
36
- ```sh
37
- npm run check
38
- npm test
39
- ```
40
-
41
- Read [AGENTS.md](AGENTS.md) for the design rules and change-specific checks.
42
- Keep deterministic PR facts and Azure writes in the runtime; models supply
43
- review judgment and comment text. Preserve the distinction between quick
44
- findings and independently verified findings. Add a focused regression test
45
- when fixing behavior, and update the relevant documentation when it changes.
46
-
47
- Changes to hooks, sessions, tools, Azure access or publication also need all
48
- five host fixture runs. Install the tested host into a disposable local directory
49
- without changing your everyday OpenCode installation:
50
-
51
- ```sh
52
- npm install --prefix "$PWD/.local/contributor-host" --no-audit --no-fund @opencode/cli@2.1.4
53
- AZPR_TEST_HOST="$PWD/.local/contributor-host/node_modules/.bin/opencode"
54
- node tests/host-v2-smoke.mjs "$AZPR_TEST_HOST"
55
- node tests/host-v2-smoke.mjs "$AZPR_TEST_HOST" --replace
56
- node tests/host-v2-smoke.mjs "$AZPR_TEST_HOST" --native
57
- node tests/host-v2-comment-scale.mjs "$AZPR_TEST_HOST"
58
- node tests/host-v2-background-compaction.mjs "$AZPR_TEST_HOST"
59
- ```
60
-
61
- The fixtures need `openssl` and use isolated configuration, a fake model
62
- provider and fake Azure services. They do not need your PAT or provider account,
63
- consume paid model quota, or post real comments. Their records stay under the
64
- ignored `.local/` directory. Passing them establishes host integration, not
65
- real-model review quality or live Azure acceptance.
66
-
67
- Installer changes must preserve unrelated files and private settings, reject
68
- conflicts, and cover rollback and archival uninstall. Keep the README's
69
- manual-copy file list accurate. Never replace your personal configuration or
70
- run live models or Azure publication as an incidental test; use a designated
71
- test environment with explicit permission for those actions.
72
-
73
- ## Open a pull request
74
-
75
- Keep the change focused. Explain the problem, resulting behavior and checks
76
- run; name anything you could not verify. A short title such as
77
- `fix: preserve comment recovery after restart` is useful, but no special commit
78
- format is required. Do not include generated private records or credentials.
79
-
80
- For host compatibility or live acceptance evidence, record exact versions,
81
- environment and limitations in [current validation](docs/VALIDATION.md), and
82
- preserve superseded results in [validation history](docs/VALIDATION_HISTORY.md).
83
- Keep fake-service and live results distinct. Documentation-only changes need
84
- link and example checks; they do not require live reviews or publication.
package/SECURITY.md DELETED
@@ -1,38 +0,0 @@
1
- # Security policy
2
-
3
- ## Report a vulnerability privately
4
-
5
- Use GitHub's [private vulnerability reporting](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/security/advisories/new)
6
- for suspected credential exposure, unauthorized model or Azure requests,
7
- private-session permission bypasses, or other security defects. Do not open a
8
- public issue or pull request containing an exploit or sensitive evidence.
9
-
10
- Include:
11
-
12
- - The affected AZPR tag or commit, OpenCode version and operating system.
13
- - The affected component, expected boundary and observed impact.
14
- - Minimal reproduction steps using synthetic source and dummy credentials,
15
- where possible.
16
- - A proposed fix or mitigation, if you have one.
17
-
18
- Even a private report should not contain live PATs, provider tokens, complete
19
- settings, company source or raw diagnostic archives. Share the smallest
20
- redacted excerpt that demonstrates the problem. If a credential was exposed,
21
- revoke or rotate it through its issuer rather than sharing it for reproduction.
22
-
23
- The [validation record](docs/VALIDATION.md) identifies the currently tested
24
- host and environment. Include reports from other versions too, with their
25
- exact versions so the affected behavior can be reproduced.
26
-
27
- ## Understand the boundaries
28
-
29
- AZPR runs inside OpenCode with your account's authority. Allowed shell commands
30
- are not sandboxed. Review source and discussion text can reach the configured
31
- model providers, and local review records can contain that source. See
32
- [team setup and data handling](docs/ENTERPRISE.md) and
33
- [authorization and isolation](docs/ARCHITECTURE.md#authorization-and-isolation)
34
- for the intended boundaries and defaults.
35
-
36
- For ordinary failures or incorrect findings without a security impact, use the
37
- [public bug form](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/issues/new?template=bug_report.yml)
38
- with sanitized evidence.
@@ -1,55 +0,0 @@
1
- {
2
- "$schema": "./settings.schema.json",
3
- "version": 2,
4
- "models": {
5
- "review": {
6
- "functional": "REPLACE_PROVIDER/REPLACE_FUNCTIONAL",
7
- "risk": "REPLACE_PROVIDER/REPLACE_RISK",
8
- "verifier": "REPLACE_PROVIDER/REPLACE_VERIFIER"
9
- },
10
- "deep": {
11
- "functional": "",
12
- "risk": "",
13
- "verifier": ""
14
- },
15
- "quick": {
16
- "reviewer": ""
17
- }
18
- },
19
- "enabled": true,
20
- "returnReport": "receipt",
21
- "debug": {
22
- "enabled": false,
23
- "directory": "",
24
- "keepRuns": 20
25
- },
26
- "outputLanguage": "en",
27
- "runTimeoutSeconds": null,
28
- "shell": "deny",
29
- "progressNotices": true,
30
- "deletePrivateSessions": true,
31
- "afterReview": {
32
- "quick": "none",
33
- "review": "none",
34
- "deep": "none"
35
- },
36
- "azure": {
37
- "organization": "",
38
- "pat": "",
39
- "patFile": "",
40
- "concurrency": 3,
41
- "callTimeoutSeconds": 120,
42
- "archiveMegabytes": 100,
43
- "proxy": "",
44
- "caFile": "",
45
- "verifyTls": true
46
- },
47
- "workflow": {
48
- "shardFiles": 25,
49
- "shardFindings": 15,
50
- "parallelSessions": 4,
51
- "repairAttempts": 2,
52
- "stageRetries": 1,
53
- "stageIdleSeconds": 600
54
- }
55
- }
@@ -1,316 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "Azure PR Review for OpenCode V2 settings",
4
- "type": "object",
5
- "additionalProperties": false,
6
- "required": [
7
- "version",
8
- "models"
9
- ],
10
- "properties": {
11
- "$schema": {
12
- "type": "string"
13
- },
14
- "version": {
15
- "const": 2
16
- },
17
- "models": {
18
- "type": "object",
19
- "additionalProperties": false,
20
- "required": [
21
- "review"
22
- ],
23
- "properties": {
24
- "_help": {
25
- "type": "object",
26
- "additionalProperties": false,
27
- "deprecated": true,
28
- "description": "Legacy documentation only, accepted for existing files. Omitted from new settings and removed during installation. Read README model-selection guidance instead; this field never affects model instructions.",
29
- "properties": {
30
- "functional": {
31
- "type": "string"
32
- },
33
- "risk": {
34
- "type": "string"
35
- },
36
- "verifier": {
37
- "type": "string"
38
- }
39
- }
40
- },
41
- "review": {
42
- "type": "object",
43
- "additionalProperties": false,
44
- "required": [
45
- "functional",
46
- "risk",
47
- "verifier"
48
- ],
49
- "properties": {
50
- "functional": {
51
- "type": "string",
52
- "description": "Exact provider/model ID for independent correctness review. Select for code comprehension, project language, boundary behavior, and regressions."
53
- },
54
- "risk": {
55
- "type": "string",
56
- "description": "Exact provider/model ID for independent risk review and comment planning. Select for cross-path failure analysis and reliable MCP tool use."
57
- },
58
- "verifier": {
59
- "type": "string",
60
- "description": "Exact provider/model ID for source-based verification, counterevidence, duplicate merging, and the final report. Select for evidence judgment, long context, and instruction following, not just summarization."
61
- }
62
- }
63
- },
64
- "deep": {
65
- "type": "object",
66
- "additionalProperties": false,
67
- "description": "Optional models for /pr-deep, which runs the same review as /pr-review with them: choose models stronger than models.review for the PRs that need them. Missing or empty roles disable deep mode; it never falls back to review models.",
68
- "properties": {
69
- "functional": {
70
- "type": "string",
71
- "description": "Exact provider/model ID for independent correctness review. Select for code comprehension, project language, boundary behavior, and regressions. May be empty; deep runs only when all three IDs are configured."
72
- },
73
- "risk": {
74
- "type": "string",
75
- "description": "Exact provider/model ID for independent risk review and comment planning. Select for cross-path failure analysis and reliable MCP tool use. May be empty; deep runs only when all three IDs are configured."
76
- },
77
- "verifier": {
78
- "type": "string",
79
- "description": "Exact provider/model ID for source-based verification, counterevidence, duplicate merging, and the final report. Select for evidence judgment, long context, and instruction following, not just summarization. May be empty; deep runs only when all three IDs are configured."
80
- }
81
- }
82
- },
83
- "quick": {
84
- "type": "object",
85
- "additionalProperties": false,
86
- "description": "Optional quick profile for /pr-quick: one reviewer per shard covers functional and risk focus, with no independent verification. An empty reviewer disables /pr-quick; it never falls back to other models.",
87
- "properties": {
88
- "reviewer": {
89
- "type": "string",
90
- "description": "Exact provider/model ID (optionally provider/model#variant) for the quick reviewer, which also plans comments for quick reviews. Select for code comprehension, evidence judgment and reliable tool use. May be empty."
91
- }
92
- }
93
- }
94
- }
95
- },
96
- "enabled": {
97
- "type": "boolean",
98
- "default": true
99
- },
100
- "outputLanguage": {
101
- "type": "string",
102
- "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
103
- "maxLength": 63,
104
- "default": "en",
105
- "examples": [
106
- "en",
107
- "zh-TW",
108
- "zh-CN",
109
- "ja",
110
- "zh-Hant-TW"
111
- ],
112
- "description": "Language for human-facing initial and final reviews, comment bodies, skip reasons and AI attribution. IDs, JSON keys, code, paths, source quotes and severity tokens remain unchanged."
113
- },
114
- "returnReport": {
115
- "enum": [
116
- "receipt",
117
- "full"
118
- ],
119
- "default": "receipt"
120
- },
121
- "debug": {
122
- "type": "object",
123
- "additionalProperties": false,
124
- "required": [
125
- "enabled"
126
- ],
127
- "properties": {
128
- "enabled": {
129
- "type": "boolean",
130
- "default": false,
131
- "description": "Save private stage inputs, visible answers, errors, and results locally. May contain confidential source or model-echoed secrets. Only the newest debug.keepRuns run directories are kept."
132
- },
133
- "directory": {
134
- "type": "string",
135
- "default": "",
136
- "description": "Empty uses XDG_STATE_HOME/opencode/azpr-v2-debug (default ~/.local/state/opencode/azpr-v2-debug). Otherwise an absolute path or path relative to the active OpenCode project directory. No tilde expansion."
137
- },
138
- "keepRuns": {
139
- "type": "integer",
140
- "minimum": 0,
141
- "maximum": 1000,
142
- "default": 20,
143
- "description": "Run directories kept in the debug directory. When a run starts, older AZPR run directories beyond this count are deleted (never a run still active in this OpenCode process, and nothing AZPR did not create). 0 keeps every run directory."
144
- }
145
- }
146
- },
147
- "runTimeoutSeconds": {
148
- "type": [
149
- "integer",
150
- "null"
151
- ],
152
- "minimum": 10,
153
- "maximum": 7200,
154
- "default": null,
155
- "description": "Optional whole-command timeout covering all stages. Null or omitted disables it; an integer from 10 to 7200 enables it. The deadline is not reset between stages. Manual /pr-stop and per-call MCP timeouts remain available. This is not a spending cap."
156
- },
157
- "shell": {
158
- "enum": [
159
- "deny",
160
- "ask",
161
- "inherit"
162
- ],
163
- "default": "deny",
164
- "description": "Shell access for private reviewers and the comment planner. deny (default): shell is hidden and refused, so reviewers never run commands while reading untrusted PR content. ask: every command needs user approval in OpenCode (a background review waits for it). inherit: host permission rules decide."
165
- },
166
- "progressNotices": {
167
- "type": "boolean",
168
- "default": true,
169
- "description": "Queue short PROGRESS notices to the invoking conversation during long reviews and publication. They never start a model response."
170
- },
171
- "deletePrivateSessions": {
172
- "type": "boolean",
173
- "default": true,
174
- "description": "Delete AZPR's private reviewer sessions when they are no longer needed: a completed review's sessions when the review is evicted (the newest 20 are kept, as /pr-comment needs them), and the sessions of an unfinished review at once except the one holding its report or draft (all of them while debug is enabled); those kept sessions follow the same 20-run limit. false keeps every session."
175
- },
176
- "afterReview": {
177
- "type": "object",
178
- "additionalProperties": false,
179
- "description": "What AZPR does after a COMPLETE review of each mode. none (default): nothing; run /pr-comment yourself. preview: plan a comment preview as a separate command with its own receipt; planning uses a model and nothing is posted. publish: plan the comments and post them as the PAT owner; a comment whose text has an @mention, or outside literal code an image, HTML that embeds content, runs a script or hides text, or a javascript:, vbscript:, data: or file:// link, waits in the preview for a person, and nothing is posted when every finding is already discussed on the PR. Quick review comments are posted with their not-independently-verified disclosure. A review without findings to comment on gets neither. A flag right after the PR URL (--preview, --publish or --no-comment) overrides this for one run.",
180
- "properties": {
181
- "quick": {
182
- "enum": ["none", "preview", "publish"],
183
- "default": "none",
184
- "description": "After /pr-quick."
185
- },
186
- "review": {
187
- "enum": ["none", "preview", "publish"],
188
- "default": "none",
189
- "description": "After /pr-review."
190
- },
191
- "deep": {
192
- "enum": ["none", "preview", "publish"],
193
- "default": "none",
194
- "description": "After /pr-deep; its comments are planned with models.deep.risk."
195
- }
196
- }
197
- },
198
- "azure": {
199
- "type": "object",
200
- "additionalProperties": false,
201
- "required": [
202
- "organization",
203
- "pat"
204
- ],
205
- "description": "Azure DevOps REST access (api-version 7.1) shared by all AZPR workflows in one OpenCode process. No MCP server is used.",
206
- "properties": {
207
- "organization": {
208
- "type": "string",
209
- "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,49}$",
210
- "description": "Azure DevOps organization name: the <org> in https://dev.azure.com/<org>. PR URLs of other organizations are refused."
211
- },
212
- "pat": {
213
- "type": "string",
214
- "description": "Personal access token for that organization (scopes: Code Read; Pull Request Threads Read & write), or empty when azure.patFile names a file that holds it. Sent only to https://dev.azure.com/<org> and never logged. Keep this file private (mode 600)."
215
- },
216
- "patFile": {
217
- "type": "string",
218
- "description": "Recommended: the absolute path of a file that holds only the PAT, so settings.json holds no secret. AZPR refuses the file unless you own it, it is a regular file (not a symbolic link) and only you may access it (mode 600). Leave azure.pat empty when you use it, and restart OpenCode after replacing the file."
219
- },
220
- "concurrency": {
221
- "type": "integer",
222
- "minimum": 1,
223
- "maximum": 8,
224
- "default": 3,
225
- "description": "Simultaneous Azure DevOps calls across all AZPR workflows. This limits parallelism, never total work."
226
- },
227
- "callTimeoutSeconds": {
228
- "type": "integer",
229
- "minimum": 10,
230
- "maximum": 1800,
231
- "default": 120,
232
- "description": "Per-call timeout. A hung call is aborted and its slot released so other reviews keep running; reads are retried."
233
- },
234
- "archiveMegabytes": {
235
- "type": "integer",
236
- "minimum": 1,
237
- "maximum": 1024,
238
- "default": 100,
239
- "description": "Largest repository zip that content search (azpr_search_code) downloads per run and commit. A larger repository is not searched; the rest of the review is unaffected. The archive is held in memory while a review runs."
240
- },
241
- "proxy": {
242
- "type": "string",
243
- "maxLength": 2048,
244
- "default": "",
245
- "description": "Forward proxy for AZPR's Azure DevOps calls only, e.g. http://proxy.example.com:8080; credentials go in the URL as http://user:password@host:port (percent-encoded) and are never shown. HTTPS requests are tunnelled with CONNECT, so the proxy sees the host name but not the PAT unless it inspects TLS. Empty: no AZPR proxy; HTTPS_PROXY and NO_PROXY in OpenCode's environment still apply."
246
- },
247
- "caFile": {
248
- "type": "string",
249
- "default": "",
250
- "description": "Absolute path of a PEM file with CA certificates that AZPR trusts in addition to the built-in roots, for a proxy that inspects HTTPS. Read when OpenCode loads AZPR; restart OpenCode after changing it."
251
- },
252
- "verifyTls": {
253
- "type": "boolean",
254
- "default": true,
255
- "description": "false turns off certificate checks for AZPR's Azure DevOps calls (like curl -k): anyone who can intercept the connection can then read the PAT. Last resort when the proxy's CA certificate cannot be obtained; prefer caFile. /pr-check shows a warning while it is off."
256
- }
257
- }
258
- },
259
- "workflow": {
260
- "type": "object",
261
- "additionalProperties": false,
262
- "description": "Review sharding, repair and retry behavior.",
263
- "properties": {
264
- "shardFiles": {
265
- "type": "integer",
266
- "minimum": 1,
267
- "maximum": 1000,
268
- "default": 25,
269
- "description": "Changed files per initial-review session. A shard that hits its context limit is split automatically."
270
- },
271
- "shardFindings": {
272
- "type": "integer",
273
- "minimum": 1,
274
- "maximum": 500,
275
- "default": 15,
276
- "description": "Candidate findings per verification session."
277
- },
278
- "parallelSessions": {
279
- "type": "integer",
280
- "minimum": 1,
281
- "maximum": 16,
282
- "default": 4,
283
- "description": "Reviewer sessions running at the same time within one command."
284
- },
285
- "repairAttempts": {
286
- "type": "integer",
287
- "minimum": 0,
288
- "maximum": 3,
289
- "default": 2,
290
- "description": "Correction turns in the same session when an answer does not meet the output contract. Remaining problems degrade per item."
291
- },
292
- "stageRetries": {
293
- "type": "integer",
294
- "minimum": 0,
295
- "maximum": 2,
296
- "default": 1,
297
- "description": "New-session retries after a transient execution failure (provider 429/5xx, interrupted stream) or a stop by the inactivity watchdog."
298
- },
299
- "stageIdleSeconds": {
300
- "type": "integer",
301
- "anyOf": [
302
- {
303
- "const": 0
304
- },
305
- {
306
- "minimum": 60,
307
- "maximum": 7200
308
- }
309
- ],
310
- "default": 600,
311
- "description": "Stage inactivity watchdog: a reviewer stage that shows no activity (prompt admission, model request, streamed output, tool start or end, approval request, announced host retry) for this many seconds while it waits on OpenCode is stopped with an error that says so (failure=idle) and retried in a new session (stageRetries). Any activity restarts the window, so long stages that keep working, including a long answer that keeps streaming, are never cut. 0 turns it off. With shell allowed, an approval or a command that takes longer counts as inactivity."
312
- }
313
- }
314
- }
315
- }
316
- }