ado-sync 0.1.65 → 0.1.68

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 (67) hide show
  1. package/README.md +15 -15
  2. package/dist/__tests__/regressions.test.js +1133 -1
  3. package/dist/__tests__/regressions.test.js.map +1 -1
  4. package/dist/ai/summarizer.d.ts +2 -1
  5. package/dist/ai/summarizer.js +6 -1
  6. package/dist/ai/summarizer.js.map +1 -1
  7. package/dist/azure/test-cases.d.ts +11 -1
  8. package/dist/azure/test-cases.js +286 -43
  9. package/dist/azure/test-cases.js.map +1 -1
  10. package/dist/cli-diagnostics.d.ts +66 -0
  11. package/dist/cli-diagnostics.js +75 -0
  12. package/dist/cli-diagnostics.js.map +1 -0
  13. package/dist/cli.js +335 -23
  14. package/dist/cli.js.map +1 -1
  15. package/dist/config.js +194 -9
  16. package/dist/config.js.map +1 -1
  17. package/dist/extensions.d.ts +8 -0
  18. package/dist/extensions.js +86 -0
  19. package/dist/extensions.js.map +1 -0
  20. package/dist/id-markers.d.ts +1 -0
  21. package/dist/id-markers.js +13 -0
  22. package/dist/id-markers.js.map +1 -1
  23. package/dist/sync/cache.d.ts +2 -0
  24. package/dist/sync/cache.js.map +1 -1
  25. package/dist/sync/engine.d.ts +29 -2
  26. package/dist/sync/engine.js +270 -41
  27. package/dist/sync/engine.js.map +1 -1
  28. package/dist/sync/publish-results.d.ts +25 -0
  29. package/dist/sync/publish-results.js +81 -2
  30. package/dist/sync/publish-results.js.map +1 -1
  31. package/dist/types.d.ts +98 -2
  32. package/llms.txt +11 -11
  33. package/package.json +9 -1
  34. package/docs/advanced.md +0 -989
  35. package/docs/agent-setup.md +0 -204
  36. package/docs/capability-roadmap.md +0 -280
  37. package/docs/cli.md +0 -614
  38. package/docs/configuration.md +0 -322
  39. package/docs/examples/csharp-mstest-local-llm.yaml +0 -35
  40. package/docs/examples/csharp-mstest.yaml +0 -21
  41. package/docs/examples/csharp-nunit.yaml +0 -21
  42. package/docs/examples/csharp-specflow.yaml +0 -16
  43. package/docs/examples/cypress.yaml +0 -21
  44. package/docs/examples/detox-react-native.yaml +0 -21
  45. package/docs/examples/espresso-android.yaml +0 -21
  46. package/docs/examples/flutter-dart.yaml +0 -21
  47. package/docs/examples/java-junit.yaml +0 -21
  48. package/docs/examples/java-testng.yaml +0 -21
  49. package/docs/examples/js-jasmine-wdio.yaml +0 -21
  50. package/docs/examples/js-jest.yaml +0 -21
  51. package/docs/examples/playwright-js.yaml +0 -21
  52. package/docs/examples/playwright-ts.yaml +0 -21
  53. package/docs/examples/puppeteer.yaml +0 -21
  54. package/docs/examples/python-pytest.yaml +0 -21
  55. package/docs/examples/robot-framework.yaml +0 -19
  56. package/docs/examples/testcafe.yaml +0 -21
  57. package/docs/examples/xcuitest-ios.yaml +0 -21
  58. package/docs/mcp-server.md +0 -312
  59. package/docs/publish-test-results.md +0 -947
  60. package/docs/spec-formats.md +0 -1357
  61. package/docs/troubleshooting.md +0 -101
  62. package/docs/vscode-extension.md +0 -139
  63. package/docs/work-item-links.md +0 -115
  64. package/docs/workflows.md +0 -457
  65. package/mkdocs.yml +0 -40
  66. package/requirements-docs.txt +0 -4
  67. package/scripts/build_site.sh +0 -6
@@ -1,19 +0,0 @@
1
- orgUrl: https://dev.azure.com/your-org
2
- project: YourProject
3
- auth:
4
- type: pat
5
- token: $AZURE_DEVOPS_TOKEN
6
- testPlan:
7
- id: 12345 # replace with your test plan ID
8
- suiteId: 12346 # replace with your root suite ID
9
- suiteMapping: flat
10
- local:
11
- type: robot
12
- include: tests/**/*.robot
13
- exclude:
14
- - tests/resources/**
15
- - tests/keywords/**
16
- sync:
17
- tagPrefix: tc
18
- titleField: System.Title
19
- markAutomated: true
@@ -1,21 +0,0 @@
1
- orgUrl: https://dev.azure.com/your-org
2
- project: YourProject
3
- auth:
4
- type: pat
5
- token: $AZURE_DEVOPS_TOKEN
6
- testPlan:
7
- id: 12345 # replace with your test plan ID
8
- suiteId: 12346 # replace with your root suite ID
9
- suiteMapping: flat
10
- local:
11
- type: testcafe
12
- include: tests/**/*.test.js
13
- sync:
14
- tagPrefix: tc
15
- titleField: System.Title
16
- markAutomated: true
17
- ai:
18
- provider: openai
19
- baseUrl: https://router.huggingface.co/v1
20
- apiKey: $HF_TOKEN
21
- model: Qwen/Qwen2.5-Coder-7B-Instruct
@@ -1,21 +0,0 @@
1
- orgUrl: https://dev.azure.com/your-org
2
- project: YourProject
3
- auth:
4
- type: pat
5
- token: $AZURE_DEVOPS_TOKEN
6
- testPlan:
7
- id: 12345 # replace with your test plan ID
8
- suiteId: 12346 # replace with your root suite ID
9
- suiteMapping: flat
10
- local:
11
- type: xcuitest
12
- include: Tests/**/*.swift
13
- sync:
14
- tagPrefix: tc
15
- titleField: System.Title
16
- markAutomated: true
17
- ai:
18
- provider: openai
19
- baseUrl: https://router.huggingface.co/v1
20
- apiKey: $HF_TOKEN
21
- model: Qwen/Qwen2.5-Coder-7B-Instruct
@@ -1,312 +0,0 @@
1
- # MCP Server
2
-
3
- `ado-sync` ships a built-in MCP (Model Context Protocol) server that exposes its sync operations as **structured tools** for AI agents — Claude Code, GitHub Copilot, Cursor, and any other MCP-compatible host.
4
-
5
- Using the MCP server instead of spawning the CLI gives agents:
6
- - Typed JSON responses (no output parsing)
7
- - Structured error objects with status codes
8
- - Fine-grained tool calls (get one test case, push a subset, etc.)
9
-
10
- ---
11
-
12
- ## Installation
13
-
14
- No separate install needed. `ado-sync-mcp` ships inside the `ado-sync` npm package.
15
-
16
- **Option A — Global install (recommended, fastest startup)**
17
- ```bash
18
- npm install -g ado-sync
19
- ```
20
-
21
- **Option B — npx (no install, always latest)**
22
-
23
- Use `npx --yes --package=ado-sync ado-sync-mcp` as the command in all configs below.
24
- npx downloads and runs the package automatically on first use.
25
-
26
- ---
27
-
28
- ## Claude Code — one-liner registration
29
-
30
- ```bash
31
- # With global install
32
- claude mcp add ado-sync \
33
- --env AZURE_DEVOPS_TOKEN="$AZURE_DEVOPS_TOKEN" \
34
- --env ADO_SYNC_CONFIG="$(pwd)/ado-sync.json" \
35
- -- ado-sync-mcp
36
-
37
- # With npx (no global install required)
38
- claude mcp add ado-sync \
39
- --env AZURE_DEVOPS_TOKEN="$AZURE_DEVOPS_TOKEN" \
40
- --env ADO_SYNC_CONFIG="$(pwd)/ado-sync.json" \
41
- -- npx --yes --package=ado-sync ado-sync-mcp
42
- ```
43
-
44
- Verify it registered: run `/mcp` in Claude Code — `ado-sync` should appear in the list.
45
-
46
- **Manual config** — `~/.claude/claude_desktop_config.json`:
47
- ```json
48
- {
49
- "mcpServers": {
50
- "ado-sync": {
51
- "command": "npx",
52
- "args": ["--yes", "--package=ado-sync", "ado-sync-mcp"],
53
- "env": {
54
- "AZURE_DEVOPS_TOKEN": "<your-pat>",
55
- "ADO_SYNC_CONFIG": "/absolute/path/to/ado-sync.json"
56
- }
57
- }
58
- }
59
- }
60
- ```
61
-
62
- ---
63
-
64
- ## Claude Desktop
65
-
66
- Config file location:
67
- - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
68
- - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
69
-
70
- ```json
71
- {
72
- "mcpServers": {
73
- "ado-sync": {
74
- "command": "npx",
75
- "args": ["--yes", "--package=ado-sync", "ado-sync-mcp"],
76
- "env": {
77
- "AZURE_DEVOPS_TOKEN": "<your-pat>",
78
- "ADO_SYNC_CONFIG": "/absolute/path/to/ado-sync.json"
79
- }
80
- }
81
- }
82
- }
83
- ```
84
-
85
- Restart Claude Desktop after saving.
86
-
87
- ---
88
-
89
- ## VS Code (GitHub Copilot agent mode)
90
-
91
- Create `.vscode/mcp.json` in your workspace root:
92
-
93
- ```json
94
- {
95
- "servers": {
96
- "ado-sync": {
97
- "type": "stdio",
98
- "command": "npx",
99
- "args": ["--yes", "--package=ado-sync", "ado-sync-mcp"],
100
- "env": {
101
- "AZURE_DEVOPS_TOKEN": "${env:AZURE_DEVOPS_TOKEN}",
102
- "ADO_SYNC_CONFIG": "${workspaceFolder}/ado-sync.json"
103
- }
104
- }
105
- }
106
- }
107
- ```
108
-
109
- `${env:AZURE_DEVOPS_TOKEN}` reads the variable from your shell environment — no hardcoded secrets.
110
-
111
- ---
112
-
113
- ## Cursor
114
-
115
- `~/.cursor/mcp.json`:
116
-
117
- ```json
118
- {
119
- "mcpServers": {
120
- "ado-sync": {
121
- "command": "npx",
122
- "args": ["--yes", "--package=ado-sync", "ado-sync-mcp"],
123
- "env": {
124
- "AZURE_DEVOPS_TOKEN": "<your-pat>",
125
- "ADO_SYNC_CONFIG": "/absolute/path/to/ado-sync.json"
126
- }
127
- }
128
- }
129
- }
130
- ```
131
-
132
- ---
133
-
134
- ## Verify it works
135
-
136
- After registration, ask your AI assistant:
137
-
138
- ```
139
- "Call ado-sync validate_config and tell me what it returns"
140
- ```
141
-
142
- Expected response includes config validity, Azure connection status, and test plan confirmation.
143
-
144
- ---
145
-
146
- ## Available tools
147
-
148
- | Tool | Description |
149
- |------|-------------|
150
- | `validate_config` | Check config validity and Azure DevOps connectivity |
151
- | `get_test_cases` | List all Test Cases in a suite |
152
- | `get_test_case` | Get a single Test Case by ID |
153
- | `push_specs` | Push local spec files to Azure DevOps |
154
- | `pull_specs` | Pull Azure DevOps changes into local files |
155
- | `status` | Show diff between local and Azure without making changes |
156
- | `diff` | Show field-level diff (richer than status) |
157
- | `generate_specs` | Generate local spec files from ADO User Stories (AI-powered or template) |
158
- | `get_work_items` | Fetch ADO User Stories / work items |
159
- | `publish_test_results` | Publish TRX / JUnit / Playwright JSON / CTRF results; optionally file issues for failures |
160
- | `create_issue` | File a single GitHub Issue or ADO Bug for a test failure (for healer agents) |
161
- | `get_story_context` | Planner-agent feed: AC items, suggested tags, actors, linked TC IDs |
162
- | `generate_manifest` | Write `.ai-workflow-manifest-{id}.json` for the full Planner→CI cycle |
163
- | `find_tagged_items` | Find work items where a tag was added in the last N hours/days (exact timestamp via revisions API) |
164
-
165
- ---
166
-
167
- ## Tool parameters
168
-
169
- All tools accept these optional base parameters:
170
-
171
- | Parameter | Type | Description |
172
- |-----------|------|-------------|
173
- | `configPath` | string | Absolute path to `ado-sync.json` (overrides `ADO_SYNC_CONFIG`) |
174
- | `configOverrides` | string[] | Runtime overrides in `key=value` format (same as `--config-override`) |
175
-
176
- ### `push_specs`
177
-
178
- ```json
179
- {
180
- "dryRun": false,
181
- "tags": "@smoke and not @wip",
182
- "aiProvider": "heuristic"
183
- }
184
- ```
185
-
186
- ### `generate_specs`
187
-
188
- ```json
189
- {
190
- "storyIds": [1234, 5678],
191
- "format": "gherkin",
192
- "outputFolder": "specs/generated",
193
- "dryRun": false,
194
- "force": false,
195
- "aiProvider": "anthropic",
196
- "aiModel": "claude-sonnet-4-6",
197
- "aiKey": "$ANTHROPIC_API_KEY",
198
- "aiContext": ["src/orders/**", "tests/orders/**", "docs/orders.md"]
199
- }
200
- ```
201
-
202
- AI provider options: `local`, `ollama`, `openai`, `anthropic`, `huggingface`, `bedrock`, `azureai`. Falls back to `sync.ai` config when not supplied. When `dryRun: true` and an AI provider is set, the first 20 lines of generated content are included in the tool response as a preview.
203
-
204
- `aiContext` is optional and accepts files, folders, or globs. Prefer a small feature-specific slice of the repo: relevant app code, existing automation, and one or two docs files. Avoid the whole workspace.
205
-
206
- ### `publish_test_results`
207
-
208
- ```json
209
- {
210
- "testResult": "results/playwright.json",
211
- "attachmentsFolder": "test-results/",
212
- "createIssuesOnFailure": true,
213
- "issueProvider": "github",
214
- "githubRepo": "myorg/myrepo",
215
- "githubToken": "$GITHUB_TOKEN",
216
- "bugThreshold": 20,
217
- "maxIssues": 50
218
- }
219
- ```
220
-
221
- ### `create_issue`
222
-
223
- ```json
224
- {
225
- "title": "[FAILED] Login with valid credentials",
226
- "body": "Error: Expected 200 but got 401\n\nStack: ...",
227
- "provider": "github",
228
- "githubRepo": "myorg/myrepo",
229
- "githubToken": "$GITHUB_TOKEN",
230
- "testCaseId": 1234
231
- }
232
- ```
233
-
234
- ### `get_story_context`
235
-
236
- ```json
237
- { "storyId": 1234 }
238
- ```
239
-
240
- Returns: AC items as a bullet list, inferred tags (`@smoke`, `@auth`, …), extracted actors, and IDs of any Test Cases already linked via TestedBy relation.
241
-
242
- ### `generate_manifest`
243
-
244
- ```json
245
- {
246
- "storyIds": [1234, 5678],
247
- "outputFolder": "e2e/bdd",
248
- "format": "gherkin",
249
- "dryRun": false
250
- }
251
- ```
252
-
253
- Writes `.ai-workflow-manifest-1234.json` in `outputFolder`. The manifest contains the ordered 8-step workflow, AC items, required documents checklist, and validation steps.
254
-
255
- ### `find_tagged_items`
256
-
257
- ```json
258
- {
259
- "tag": "regression",
260
- "hours": 24
261
- }
262
- ```
263
-
264
- ```json
265
- {
266
- "tag": "sprint-42",
267
- "days": 7,
268
- "workItemType": "Bug"
269
- }
270
- ```
271
-
272
- | Parameter | Type | Description |
273
- |-----------|------|-------------|
274
- | `tag` | string | **Required.** Tag to search for |
275
- | `hours` | number | Time window in hours |
276
- | `days` | number | Time window in days (mutually exclusive with `hours`) |
277
- | `workItemType` | string | Work item type (default: `"User Story"`) |
278
-
279
- Returns per item: `id`, `title`, `state`, `tagAddedAt` (ISO timestamp), `tagAddedBy`, `tagAddedRevision`, `currentTags`, `url`.
280
-
281
- Uses the revisions API — finds the exact revision where the tag first appeared, not just when the item was last changed.
282
-
283
- ---
284
-
285
- ## Example agent workflow
286
-
287
- Once registered, an AI agent can orchestrate the full test lifecycle without any human CLI invocation:
288
-
289
- ```
290
- Agent: "Set up ado-sync for this repo"
291
- → calls validate_config to check connectivity
292
- → calls push_specs({ dryRun: true }) to preview
293
- → calls push_specs({}) to create Test Cases
294
-
295
- Agent: "Generate spec files for User Story 1234"
296
- → calls generate_specs({ storyIds: [1234], format: "gherkin" })
297
-
298
- Agent: "Publish the latest test results and file issues for failures"
299
- → calls publish_test_results({ testResult: "results/playwright.json", createIssuesOnFailure: true, githubRepo: "myorg/myrepo", githubToken: "$GITHUB_TOKEN" })
300
- → returns issue URLs for any failures → healer agent opens fix PRs
301
- ```
302
-
303
- ---
304
-
305
- ## Environment variables
306
-
307
- | Variable | Description |
308
- |----------|-------------|
309
- | `ADO_SYNC_CONFIG` | Absolute path to config file (default: `ado-sync.json` in cwd) |
310
- | `AZURE_DEVOPS_TOKEN` | PAT or access token (referenced by `auth.token` in config) |
311
-
312
- > **Important:** `ADO_SYNC_CONFIG` must be an **absolute path**. The MCP server process does not inherit the shell's working directory the same way as a CLI call.