@aqajooon/mcp-server-azure-devops 0.0.0-stage → 0.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +318 -2
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +501 -0
- package/dist/clients/azure-devops.js.map +1 -0
- package/dist/features/environments/feature.d.ts +24 -0
- package/dist/features/environments/feature.js +48 -0
- package/dist/features/environments/feature.js.map +1 -0
- package/dist/features/environments/index.d.ts +10 -0
- package/dist/features/environments/index.js +42 -0
- package/dist/features/environments/index.js.map +1 -0
- package/dist/features/environments/schema.d.ts +7 -0
- package/dist/features/environments/schema.js +28 -0
- package/dist/features/environments/schema.js.map +1 -0
- package/dist/features/libraries/feature.d.ts +27 -0
- package/dist/features/libraries/feature.js +47 -0
- package/dist/features/libraries/feature.js.map +1 -0
- package/dist/features/libraries/index.d.ts +10 -0
- package/dist/features/libraries/index.js +42 -0
- package/dist/features/libraries/index.js.map +1 -0
- package/dist/features/libraries/schema.d.ts +7 -0
- package/dist/features/libraries/schema.js +27 -0
- package/dist/features/libraries/schema.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +38 -0
- package/dist/features/organizations/__test__/test-helpers.js.map +1 -0
- package/dist/features/organizations/index.d.ts +13 -0
- package/dist/features/organizations/index.js +63 -0
- package/dist/features/organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.d.ts +13 -0
- package/dist/features/organizations/list-organizations/feature.js +101 -0
- package/dist/features/organizations/list-organizations/feature.js.map +1 -0
- package/dist/features/organizations/list-organizations/index.d.ts +2 -0
- package/dist/features/organizations/list-organizations/index.js +19 -0
- package/dist/features/organizations/list-organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/schema.d.ts +2 -0
- package/dist/features/organizations/list-organizations/schema.js +6 -0
- package/dist/features/organizations/list-organizations/schema.js.map +1 -0
- package/dist/features/organizations/schemas.d.ts +6 -0
- package/dist/features/organizations/schemas.js +10 -0
- package/dist/features/organizations/schemas.js.map +1 -0
- package/dist/features/organizations/tool-definitions.d.ts +5 -0
- package/dist/features/organizations/tool-definitions.js +16 -0
- package/dist/features/organizations/tool-definitions.js.map +1 -0
- package/dist/features/organizations/types.d.ts +21 -0
- package/dist/features/organizations/types.js +8 -0
- package/dist/features/organizations/types.js.map +1 -0
- package/dist/features/pipelines/artifacts.d.ts +11 -0
- package/dist/features/pipelines/artifacts.js +288 -0
- package/dist/features/pipelines/artifacts.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.d.ts +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js +222 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.d.ts +2 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js +19 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.d.ts +7 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js +23 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/get-pipeline/feature.js +46 -0
- package/dist/features/pipelines/get-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline/index.js +19 -0
- package/dist/features/pipelines/get-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/schema.d.ts +9 -0
- package/dist/features/pipelines/get-pipeline/schema.js +29 -0
- package/dist/features/pipelines/get-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js +57 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-log/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-log/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/schema.d.ts +13 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js +40 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js +76 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.d.ts +26 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js +105 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.d.ts +47 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js +185 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.d.ts +7 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js +21 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.d.ts +41 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js +450 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js.map +1 -0
- package/dist/features/pipelines/helpers.d.ts +3 -0
- package/dist/features/pipelines/helpers.js +29 -0
- package/dist/features/pipelines/helpers.js.map +1 -0
- package/dist/features/pipelines/index.d.ts +22 -0
- package/dist/features/pipelines/index.js +216 -0
- package/dist/features/pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.d.ts +3 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js +98 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js +19 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.d.ts +28 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js +50 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.d.ts +10 -0
- package/dist/features/pipelines/list-pipelines/feature.js +42 -0
- package/dist/features/pipelines/list-pipelines/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipelines/index.js +19 -0
- package/dist/features/pipelines/list-pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/schema.d.ts +9 -0
- package/dist/features/pipelines/list-pipelines/schema.js +23 -0
- package/dist/features/pipelines/list-pipelines/schema.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.d.ts +3 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js +95 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/index.d.ts +2 -0
- package/dist/features/pipelines/pipeline-timeline/index.js +19 -0
- package/dist/features/pipelines/pipeline-timeline/index.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/schema.d.ts +31 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js +51 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js.map +1 -0
- package/dist/features/pipelines/tool-definitions.d.ts +5 -0
- package/dist/features/pipelines/tool-definitions.js +87 -0
- package/dist/features/pipelines/tool-definitions.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js +65 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/trigger-pipeline/index.js +8 -0
- package/dist/features/pipelines/trigger-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/schema.d.ts +15 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js +45 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/types.d.ts +122 -0
- package/dist/features/pipelines/types.js +3 -0
- package/dist/features/pipelines/types.js.map +1 -0
- package/dist/features/projects/__test__/test-helpers.d.ts +13 -0
- package/dist/features/projects/__test__/test-helpers.js +35 -0
- package/dist/features/projects/__test__/test-helpers.js.map +1 -0
- package/dist/features/projects/get-project/feature.d.ts +11 -0
- package/dist/features/projects/get-project/feature.js +29 -0
- package/dist/features/projects/get-project/feature.js.map +1 -0
- package/dist/features/projects/get-project/index.d.ts +2 -0
- package/dist/features/projects/get-project/index.js +19 -0
- package/dist/features/projects/get-project/index.js.map +1 -0
- package/dist/features/projects/get-project/schema.d.ts +2 -0
- package/dist/features/projects/get-project/schema.js +6 -0
- package/dist/features/projects/get-project/schema.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.d.ts +78 -0
- package/dist/features/projects/get-project-details/feature.js +185 -0
- package/dist/features/projects/get-project-details/feature.js.map +1 -0
- package/dist/features/projects/get-project-details/index.d.ts +2 -0
- package/dist/features/projects/get-project-details/index.js +8 -0
- package/dist/features/projects/get-project-details/index.js.map +1 -0
- package/dist/features/projects/get-project-details/schema.d.ts +2 -0
- package/dist/features/projects/get-project-details/schema.js +6 -0
- package/dist/features/projects/get-project-details/schema.js.map +1 -0
- package/dist/features/projects/index.d.ts +15 -0
- package/dist/features/projects/index.js +80 -0
- package/dist/features/projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/feature.d.ts +10 -0
- package/dist/features/projects/list-projects/feature.js +25 -0
- package/dist/features/projects/list-projects/feature.js.map +1 -0
- package/dist/features/projects/list-projects/index.d.ts +2 -0
- package/dist/features/projects/list-projects/index.js +19 -0
- package/dist/features/projects/list-projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/schema.d.ts +2 -0
- package/dist/features/projects/list-projects/schema.js +6 -0
- package/dist/features/projects/list-projects/schema.js.map +1 -0
- package/dist/features/projects/schemas.d.ts +30 -0
- package/dist/features/projects/schemas.js +76 -0
- package/dist/features/projects/schemas.js.map +1 -0
- package/dist/features/projects/tool-definitions.d.ts +5 -0
- package/dist/features/projects/tool-definitions.js +26 -0
- package/dist/features/projects/tool-definitions.js.map +1 -0
- package/dist/features/projects/types.d.ts +11 -0
- package/dist/features/projects/types.js +3 -0
- package/dist/features/projects/types.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.d.ts +13 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js +161 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js +18 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.d.ts +12 -0
- package/dist/features/pull-requests/create-pull-request/feature.js +99 -0
- package/dist/features/pull-requests/create-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/index.js +19 -0
- package/dist/features/pull-requests/create-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/schema.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/create-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.d.ts +6 -0
- package/dist/features/pull-requests/get-pull-request/feature.js +22 -0
- package/dist/features/pull-requests/get-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/get-pull-request/index.js +19 -0
- package/dist/features/pull-requests/get-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/get-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.d.ts +22 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js +60 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.d.ts +51 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js +259 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.d.ts +13 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js +88 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js.map +1 -0
- package/dist/features/pull-requests/index.d.ts +21 -0
- package/dist/features/pull-requests/index.js +167 -0
- package/dist/features/pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.d.ts +17 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js +81 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/index.d.ts +2 -0
- package/dist/features/pull-requests/list-pull-requests/index.js +19 -0
- package/dist/features/pull-requests/list-pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js +6 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js.map +1 -0
- package/dist/features/pull-requests/schemas.d.ts +157 -0
- package/dist/features/pull-requests/schemas.js +337 -0
- package/dist/features/pull-requests/schemas.js.map +1 -0
- package/dist/features/pull-requests/tool-definitions.d.ts +5 -0
- package/dist/features/pull-requests/tool-definitions.js +60 -0
- package/dist/features/pull-requests/tool-definitions.js.map +1 -0
- package/dist/features/pull-requests/types.d.ts +118 -0
- package/dist/features/pull-requests/types.js +3 -0
- package/dist/features/pull-requests/types.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.d.ts +9 -0
- package/dist/features/pull-requests/update-pull-request/feature.js +250 -0
- package/dist/features/pull-requests/update-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.d.ts +14 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js +87 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js.map +1 -0
- package/dist/features/repositories/__test__/test-helpers.d.ts +13 -0
- package/dist/features/repositories/__test__/test-helpers.js +35 -0
- package/dist/features/repositories/__test__/test-helpers.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.d.ts +6 -0
- package/dist/features/repositories/create-branch/feature.js +33 -0
- package/dist/features/repositories/create-branch/feature.js.map +1 -0
- package/dist/features/repositories/create-branch/index.d.ts +1 -0
- package/dist/features/repositories/create-branch/index.js +18 -0
- package/dist/features/repositories/create-branch/index.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.d.ts +6 -0
- package/dist/features/repositories/create-commit/feature.js +122 -0
- package/dist/features/repositories/create-commit/feature.js.map +1 -0
- package/dist/features/repositories/create-commit/index.d.ts +1 -0
- package/dist/features/repositories/create-commit/index.js +18 -0
- package/dist/features/repositories/create-commit/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.d.ts +22 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js +303 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/index.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js +19 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js +6 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.d.ts +23 -0
- package/dist/features/repositories/get-file-content/feature.js +96 -0
- package/dist/features/repositories/get-file-content/feature.js.map +1 -0
- package/dist/features/repositories/get-file-content/index.d.ts +2 -0
- package/dist/features/repositories/get-file-content/index.js +19 -0
- package/dist/features/repositories/get-file-content/index.js.map +1 -0
- package/dist/features/repositories/get-file-content/schema.d.ts +2 -0
- package/dist/features/repositories/get-file-content/schema.js +6 -0
- package/dist/features/repositories/get-file-content/schema.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.d.ts +12 -0
- package/dist/features/repositories/get-repository/feature.js +30 -0
- package/dist/features/repositories/get-repository/feature.js.map +1 -0
- package/dist/features/repositories/get-repository/index.d.ts +2 -0
- package/dist/features/repositories/get-repository/index.js +19 -0
- package/dist/features/repositories/get-repository/index.js.map +1 -0
- package/dist/features/repositories/get-repository/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository/schema.js +6 -0
- package/dist/features/repositories/get-repository/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.d.ts +11 -0
- package/dist/features/repositories/get-repository-details/feature.js +67 -0
- package/dist/features/repositories/get-repository-details/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-details/index.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/index.js +19 -0
- package/dist/features/repositories/get-repository-details/index.js.map +1 -0
- package/dist/features/repositories/get-repository-details/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/schema.js +6 -0
- package/dist/features/repositories/get-repository-details/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.d.ts +6 -0
- package/dist/features/repositories/get-repository-tree/feature.js +65 -0
- package/dist/features/repositories/get-repository-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/index.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/index.js +18 -0
- package/dist/features/repositories/get-repository-tree/index.js.map +1 -0
- package/dist/features/repositories/index.d.ts +23 -0
- package/dist/features/repositories/index.js +207 -0
- package/dist/features/repositories/index.js.map +1 -0
- package/dist/features/repositories/list-branches/feature.d.ts +14 -0
- package/dist/features/repositories/list-branches/feature.js +56 -0
- package/dist/features/repositories/list-branches/feature.js.map +1 -0
- package/dist/features/repositories/list-branches/index.d.ts +2 -0
- package/dist/features/repositories/list-branches/index.js +19 -0
- package/dist/features/repositories/list-branches/index.js.map +1 -0
- package/dist/features/repositories/list-branches/schema.d.ts +8 -0
- package/dist/features/repositories/list-branches/schema.js +28 -0
- package/dist/features/repositories/list-branches/schema.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.d.ts +6 -0
- package/dist/features/repositories/list-commits/feature.js +75 -0
- package/dist/features/repositories/list-commits/feature.js.map +1 -0
- package/dist/features/repositories/list-commits/index.d.ts +1 -0
- package/dist/features/repositories/list-commits/index.js +18 -0
- package/dist/features/repositories/list-commits/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.d.ts +10 -0
- package/dist/features/repositories/list-repositories/feature.js +25 -0
- package/dist/features/repositories/list-repositories/feature.js.map +1 -0
- package/dist/features/repositories/list-repositories/index.d.ts +2 -0
- package/dist/features/repositories/list-repositories/index.js +19 -0
- package/dist/features/repositories/list-repositories/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/schema.d.ts +2 -0
- package/dist/features/repositories/list-repositories/schema.js +6 -0
- package/dist/features/repositories/list-repositories/schema.js.map +1 -0
- package/dist/features/repositories/list-tags/feature.d.ts +13 -0
- package/dist/features/repositories/list-tags/feature.js +52 -0
- package/dist/features/repositories/list-tags/feature.js.map +1 -0
- package/dist/features/repositories/list-tags/index.d.ts +2 -0
- package/dist/features/repositories/list-tags/index.js +19 -0
- package/dist/features/repositories/list-tags/index.js.map +1 -0
- package/dist/features/repositories/list-tags/schema.d.ts +8 -0
- package/dist/features/repositories/list-tags/schema.js +28 -0
- package/dist/features/repositories/list-tags/schema.js.map +1 -0
- package/dist/features/repositories/schemas.d.ts +101 -0
- package/dist/features/repositories/schemas.js +306 -0
- package/dist/features/repositories/schemas.js.map +1 -0
- package/dist/features/repositories/tool-definitions.d.ts +5 -0
- package/dist/features/repositories/tool-definitions.js +106 -0
- package/dist/features/repositories/tool-definitions.js.map +1 -0
- package/dist/features/repositories/types.d.ts +167 -0
- package/dist/features/repositories/types.js +3 -0
- package/dist/features/repositories/types.js.map +1 -0
- package/dist/features/search/index.d.ts +15 -0
- package/dist/features/search/index.js +65 -0
- package/dist/features/search/index.js.map +1 -0
- package/dist/features/search/schemas.d.ts +58 -0
- package/dist/features/search/schemas.js +159 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/search-code/feature.d.ts +10 -0
- package/dist/features/search/search-code/feature.js +178 -0
- package/dist/features/search/search-code/feature.js.map +1 -0
- package/dist/features/search/search-code/index.d.ts +2 -0
- package/dist/features/search/search-code/index.js +19 -0
- package/dist/features/search/search-code/index.js.map +1 -0
- package/dist/features/search/search-wiki/feature.d.ts +10 -0
- package/dist/features/search/search-wiki/feature.js +133 -0
- package/dist/features/search/search-wiki/feature.js.map +1 -0
- package/dist/features/search/search-wiki/index.d.ts +1 -0
- package/dist/features/search/search-wiki/index.js +18 -0
- package/dist/features/search/search-wiki/index.js.map +1 -0
- package/dist/features/search/search-work-items/feature.d.ts +10 -0
- package/dist/features/search/search-work-items/feature.js +119 -0
- package/dist/features/search/search-work-items/feature.js.map +1 -0
- package/dist/features/search/search-work-items/index.d.ts +1 -0
- package/dist/features/search/search-work-items/index.js +18 -0
- package/dist/features/search/search-work-items/index.js.map +1 -0
- package/dist/features/search/tool-definitions.d.ts +5 -0
- package/dist/features/search/tool-definitions.js +26 -0
- package/dist/features/search/tool-definitions.js.map +1 -0
- package/dist/features/search/types.d.ts +537 -0
- package/dist/features/search/types.js +3 -0
- package/dist/features/search/types.js.map +1 -0
- package/dist/features/service-connections/feature.d.ts +21 -0
- package/dist/features/service-connections/feature.js +51 -0
- package/dist/features/service-connections/feature.js.map +1 -0
- package/dist/features/service-connections/index.d.ts +10 -0
- package/dist/features/service-connections/index.js +42 -0
- package/dist/features/service-connections/index.js.map +1 -0
- package/dist/features/service-connections/schema.d.ts +8 -0
- package/dist/features/service-connections/schema.js +28 -0
- package/dist/features/service-connections/schema.js.map +1 -0
- package/dist/features/users/get-me/feature.d.ts +12 -0
- package/dist/features/users/get-me/feature.js +96 -0
- package/dist/features/users/get-me/feature.js.map +1 -0
- package/dist/features/users/get-me/index.d.ts +2 -0
- package/dist/features/users/get-me/index.js +19 -0
- package/dist/features/users/get-me/index.js.map +1 -0
- package/dist/features/users/get-me/schema.d.ts +2 -0
- package/dist/features/users/get-me/schema.js +6 -0
- package/dist/features/users/get-me/schema.js.map +1 -0
- package/dist/features/users/index.d.ts +17 -0
- package/dist/features/users/index.js +52 -0
- package/dist/features/users/index.js.map +1 -0
- package/dist/features/users/schemas.d.ts +5 -0
- package/dist/features/users/schemas.js +9 -0
- package/dist/features/users/schemas.js.map +1 -0
- package/dist/features/users/tool-definitions.d.ts +5 -0
- package/dist/features/users/tool-definitions.js +16 -0
- package/dist/features/users/tool-definitions.js.map +1 -0
- package/dist/features/users/types.d.ts +17 -0
- package/dist/features/users/types.js +3 -0
- package/dist/features/users/types.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.d.ts +49 -0
- package/dist/features/wikis/create-wiki/feature.js +56 -0
- package/dist/features/wikis/create-wiki/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki/index.js +9 -0
- package/dist/features/wikis/create-wiki/index.js.map +1 -0
- package/dist/features/wikis/create-wiki/schema.d.ts +25 -0
- package/dist/features/wikis/create-wiki/schema.js +60 -0
- package/dist/features/wikis/create-wiki/schema.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.d.ts +18 -0
- package/dist/features/wikis/create-wiki-page/feature.js +95 -0
- package/dist/features/wikis/create-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki-page/index.js +8 -0
- package/dist/features/wikis/create-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/create-wiki-page/schema.js +36 -0
- package/dist/features/wikis/create-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.d.ts +33 -0
- package/dist/features/wikis/get-wiki-page/feature.js +68 -0
- package/dist/features/wikis/get-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/get-wiki-page/index.js +8 -0
- package/dist/features/wikis/get-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/schema.d.ts +10 -0
- package/dist/features/wikis/get-wiki-page/schema.js +23 -0
- package/dist/features/wikis/get-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.d.ts +25 -0
- package/dist/features/wikis/get-wikis/feature.js +37 -0
- package/dist/features/wikis/get-wikis/feature.js.map +1 -0
- package/dist/features/wikis/get-wikis/index.d.ts +2 -0
- package/dist/features/wikis/get-wikis/index.js +8 -0
- package/dist/features/wikis/get-wikis/index.js.map +1 -0
- package/dist/features/wikis/get-wikis/schema.d.ts +8 -0
- package/dist/features/wikis/get-wikis/schema.js +21 -0
- package/dist/features/wikis/get-wikis/schema.js.map +1 -0
- package/dist/features/wikis/index.d.ts +16 -0
- package/dist/features/wikis/index.js +141 -0
- package/dist/features/wikis/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.d.ts +20 -0
- package/dist/features/wikis/list-wiki-pages/feature.js +79 -0
- package/dist/features/wikis/list-wiki-pages/feature.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/index.d.ts +2 -0
- package/dist/features/wikis/list-wiki-pages/index.js +8 -0
- package/dist/features/wikis/list-wiki-pages/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/schema.d.ts +10 -0
- package/dist/features/wikis/list-wiki-pages/schema.js +22 -0
- package/dist/features/wikis/list-wiki-pages/schema.js.map +1 -0
- package/dist/features/wikis/tool-definitions.d.ts +5 -0
- package/dist/features/wikis/tool-definitions.js +46 -0
- package/dist/features/wikis/tool-definitions.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/feature.js +63 -0
- package/dist/features/wikis/update-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/update-wiki-page/index.js +8 -0
- package/dist/features/wikis/update-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/schema.js +32 -0
- package/dist/features/wikis/update-wiki-page/schema.js.map +1 -0
- package/dist/features/work-items/__test__/fixtures.d.ts +9 -0
- package/dist/features/work-items/__test__/fixtures.js +28 -0
- package/dist/features/work-items/__test__/fixtures.js.map +1 -0
- package/dist/features/work-items/__test__/test-helpers.d.ts +13 -0
- package/dist/features/work-items/__test__/test-helpers.js +35 -0
- package/dist/features/work-items/__test__/test-helpers.js.map +1 -0
- package/dist/features/work-items/__test__/test-utils.d.ts +17 -0
- package/dist/features/work-items/__test__/test-utils.js +39 -0
- package/dist/features/work-items/__test__/test-utils.js.map +1 -0
- package/dist/features/work-items/attachment-schemas.d.ts +24 -0
- package/dist/features/work-items/attachment-schemas.js +46 -0
- package/dist/features/work-items/attachment-schemas.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/create-work-item/feature.js +107 -0
- package/dist/features/work-items/create-work-item/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item/index.js +19 -0
- package/dist/features/work-items/create-work-item/index.js.map +1 -0
- package/dist/features/work-items/create-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item/schema.js +6 -0
- package/dist/features/work-items/create-work-item/schema.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/feature.d.ts +11 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js +107 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/create-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js +51 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/get-work-item/feature.js +69 -0
- package/dist/features/work-items/get-work-item/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item/index.js +19 -0
- package/dist/features/work-items/get-work-item/index.js.map +1 -0
- package/dist/features/work-items/get-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item/schema.js +6 -0
- package/dist/features/work-items/get-work-item/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js +108 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/get-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-comments/feature.js +78 -0
- package/dist/features/work-items/get-work-item-comments/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/index.js +19 -0
- package/dist/features/work-items/get-work-item-comments/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/schema.js +6 -0
- package/dist/features/work-items/get-work-item-comments/schema.js.map +1 -0
- package/dist/features/work-items/index.d.ts +21 -0
- package/dist/features/work-items/index.js +181 -0
- package/dist/features/work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.d.ts +10 -0
- package/dist/features/work-items/list-work-items/feature.js +92 -0
- package/dist/features/work-items/list-work-items/feature.js.map +1 -0
- package/dist/features/work-items/list-work-items/index.d.ts +2 -0
- package/dist/features/work-items/list-work-items/index.js +19 -0
- package/dist/features/work-items/list-work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/schema.d.ts +2 -0
- package/dist/features/work-items/list-work-items/schema.js +6 -0
- package/dist/features/work-items/list-work-items/schema.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.d.ts +24 -0
- package/dist/features/work-items/manage-work-item-link/feature.js +91 -0
- package/dist/features/work-items/manage-work-item-link/feature.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/index.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/index.js +8 -0
- package/dist/features/work-items/manage-work-item-link/index.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/schema.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/schema.js +6 -0
- package/dist/features/work-items/manage-work-item-link/schema.js.map +1 -0
- package/dist/features/work-items/schemas.d.ts +99 -0
- package/dist/features/work-items/schemas.js +181 -0
- package/dist/features/work-items/schemas.js.map +1 -0
- package/dist/features/work-items/tool-definitions.d.ts +5 -0
- package/dist/features/work-items/tool-definitions.js +56 -0
- package/dist/features/work-items/tool-definitions.js.map +1 -0
- package/dist/features/work-items/types.d.ts +87 -0
- package/dist/features/work-items/types.js +3 -0
- package/dist/features/work-items/types.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/update-work-item/feature.js +155 -0
- package/dist/features/work-items/update-work-item/feature.js.map +1 -0
- package/dist/features/work-items/update-work-item/index.d.ts +2 -0
- package/dist/features/work-items/update-work-item/index.js +19 -0
- package/dist/features/work-items/update-work-item/index.js.map +1 -0
- package/dist/features/work-items/update-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/update-work-item/schema.js +6 -0
- package/dist/features/work-items/update-work-item/schema.js.map +1 -0
- package/dist/http-server.d.ts +22 -0
- package/dist/http-server.js +137 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +138 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +379 -0
- package/dist/server.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +242 -0
- package/dist/shared/api/client.js.map +1 -0
- package/dist/shared/api/index.d.ts +1 -0
- package/dist/shared/api/index.js +18 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/auth/auth-factory.d.ts +53 -0
- package/dist/shared/auth/auth-factory.js +194 -0
- package/dist/shared/auth/auth-factory.js.map +1 -0
- package/dist/shared/auth/client-factory.d.ts +109 -0
- package/dist/shared/auth/client-factory.js +272 -0
- package/dist/shared/auth/client-factory.js.map +1 -0
- package/dist/shared/auth/index.d.ts +11 -0
- package/dist/shared/auth/index.js +18 -0
- package/dist/shared/auth/index.js.map +1 -0
- package/dist/shared/azure-devops-url.d.ts +17 -0
- package/dist/shared/azure-devops-url.js +120 -0
- package/dist/shared/azure-devops-url.js.map +1 -0
- package/dist/shared/config/index.d.ts +1 -0
- package/dist/shared/config/index.js +18 -0
- package/dist/shared/config/index.js.map +1 -0
- package/dist/shared/config/version.d.ts +4 -0
- package/dist/shared/config/version.js +8 -0
- package/dist/shared/config/version.js.map +1 -0
- package/dist/shared/enums/index.d.ts +40 -0
- package/dist/shared/enums/index.js +87 -0
- package/dist/shared/enums/index.js.map +1 -0
- package/dist/shared/errors/azure-devops-errors.d.ts +107 -0
- package/dist/shared/errors/azure-devops-errors.js +161 -0
- package/dist/shared/errors/azure-devops-errors.js.map +1 -0
- package/dist/shared/errors/handle-request-error.d.ts +32 -0
- package/dist/shared/errors/handle-request-error.js +121 -0
- package/dist/shared/errors/handle-request-error.js.map +1 -0
- package/dist/shared/errors/index.d.ts +1 -0
- package/dist/shared/errors/index.js +18 -0
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/shared/test/test-helpers.d.ts +20 -0
- package/dist/shared/test/test-helpers.js +57 -0
- package/dist/shared/test/test-helpers.js.map +1 -0
- package/dist/shared/test/text-content.d.ts +10 -0
- package/dist/shared/test/text-content.js +20 -0
- package/dist/shared/test/text-content.js.map +1 -0
- package/dist/shared/types/config.d.ts +27 -0
- package/dist/shared/types/config.js +3 -0
- package/dist/shared/types/config.js.map +1 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.js +18 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/request-handler.d.ts +21 -0
- package/dist/shared/types/request-handler.js +3 -0
- package/dist/shared/types/request-handler.js.map +1 -0
- package/dist/shared/types/tool-definition.d.ts +9 -0
- package/dist/shared/types/tool-definition.js +3 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/to-json-schema.d.ts +6 -0
- package/dist/shared/utils/to-json-schema.js +12 -0
- package/dist/shared/utils/to-json-schema.js.map +1 -0
- package/dist/utils/environment.d.ts +21 -0
- package/dist/utils/environment.js +58 -0
- package/dist/utils/environment.js.map +1 -0
- package/docs/SOLUTION_SUMMARY.md +145 -0
- package/docs/authentication.md +293 -0
- package/docs/azure-identity-authentication.md +187 -0
- package/docs/ci-setup.md +61 -0
- package/docs/docker.md +135 -0
- package/docs/examples/README.md +33 -0
- package/docs/examples/azure-cli-authentication.env +25 -0
- package/docs/examples/azure-identity-authentication.env +33 -0
- package/docs/examples/pat-authentication.env +24 -0
- package/docs/important-knowledge/azure-devops-rest-api-research.md +88 -0
- package/docs/important-knowledge/llm-tldr-cli.md +37 -0
- package/docs/npm-trusted-publishers-migration.md +142 -0
- package/docs/release-troubleshooting.md +153 -0
- package/docs/testing/README.md +140 -0
- package/docs/testing/setup.md +72 -0
- package/docs/tools/README.md +76 -0
- package/docs/tools/core-navigation.md +114 -0
- package/docs/tools/organizations.md +73 -0
- package/docs/tools/pipelines.md +532 -0
- package/docs/tools/projects.md +114 -0
- package/docs/tools/pull-requests.md +1110 -0
- package/docs/tools/repositories.md +610 -0
- package/docs/tools/resources.md +133 -0
- package/docs/tools/search.md +165 -0
- package/docs/tools/user-tools.md +39 -0
- package/docs/tools/wiki.md +192 -0
- package/docs/tools/work-items.md +244 -0
- package/package.json +125 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { UpdateWorkItemOptions, WorkItem } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Update a work item
|
|
5
|
+
*
|
|
6
|
+
* @param connection The Azure DevOps WebApi connection
|
|
7
|
+
* @param workItemId The ID of the work item to update
|
|
8
|
+
* @param options Options for updating the work item
|
|
9
|
+
* @returns The updated work item
|
|
10
|
+
* @throws {AzureDevOpsResourceNotFoundError} If the work item is not found
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateWorkItem(connection: WebApi, workItemId: number, options: UpdateWorkItemOptions): Promise<WorkItem>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateWorkItem = updateWorkItem;
|
|
4
|
+
const WorkItemTrackingInterfaces_1 = require("azure-devops-node-api/interfaces/WorkItemTrackingInterfaces");
|
|
5
|
+
const errors_1 = require("../../../shared/errors");
|
|
6
|
+
/**
|
|
7
|
+
* Update a work item
|
|
8
|
+
*
|
|
9
|
+
* @param connection The Azure DevOps WebApi connection
|
|
10
|
+
* @param workItemId The ID of the work item to update
|
|
11
|
+
* @param options Options for updating the work item
|
|
12
|
+
* @returns The updated work item
|
|
13
|
+
* @throws {AzureDevOpsResourceNotFoundError} If the work item is not found
|
|
14
|
+
*/
|
|
15
|
+
async function updateWorkItem(connection, workItemId, options) {
|
|
16
|
+
try {
|
|
17
|
+
const witApi = await connection.getWorkItemTrackingApi();
|
|
18
|
+
// Create the JSON patch document
|
|
19
|
+
const document = [];
|
|
20
|
+
// Add optional fields if provided
|
|
21
|
+
if (options.title) {
|
|
22
|
+
document.push({
|
|
23
|
+
op: 'add',
|
|
24
|
+
path: '/fields/System.Title',
|
|
25
|
+
value: options.title,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (options.description) {
|
|
29
|
+
document.push({
|
|
30
|
+
op: 'add',
|
|
31
|
+
path: '/fields/System.Description',
|
|
32
|
+
value: options.description,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (options.assignedTo) {
|
|
36
|
+
document.push({
|
|
37
|
+
op: 'add',
|
|
38
|
+
path: '/fields/System.AssignedTo',
|
|
39
|
+
value: options.assignedTo,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (options.areaPath) {
|
|
43
|
+
document.push({
|
|
44
|
+
op: 'add',
|
|
45
|
+
path: '/fields/System.AreaPath',
|
|
46
|
+
value: options.areaPath,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (options.iterationPath) {
|
|
50
|
+
document.push({
|
|
51
|
+
op: 'add',
|
|
52
|
+
path: '/fields/System.IterationPath',
|
|
53
|
+
value: options.iterationPath,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (options.priority) {
|
|
57
|
+
document.push({
|
|
58
|
+
op: 'add',
|
|
59
|
+
path: '/fields/Microsoft.VSTS.Common.Priority',
|
|
60
|
+
value: options.priority,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (options.state) {
|
|
64
|
+
document.push({
|
|
65
|
+
op: 'add',
|
|
66
|
+
path: '/fields/System.State',
|
|
67
|
+
value: options.state,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
// Add tags logic
|
|
71
|
+
// Azure DevOps treats op:'add' on System.Tags as additive (merge) rather
|
|
72
|
+
// than a full replacement. Use op:'replace' to truly overwrite when the
|
|
73
|
+
// field already has a value; fall back to op:'add' when it is empty
|
|
74
|
+
// (JSON-Patch 'replace' fails on a missing/empty field).
|
|
75
|
+
if (options.tags !== undefined) {
|
|
76
|
+
const currentWorkItem = await witApi.getWorkItem(workItemId, [
|
|
77
|
+
'System.Tags',
|
|
78
|
+
]);
|
|
79
|
+
if (!currentWorkItem) {
|
|
80
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Work item '${workItemId}' not found`);
|
|
81
|
+
}
|
|
82
|
+
const currentTagsStr = currentWorkItem.fields?.['System.Tags'] || '';
|
|
83
|
+
document.push({
|
|
84
|
+
op: currentTagsStr ? 'replace' : 'add',
|
|
85
|
+
path: '/fields/System.Tags',
|
|
86
|
+
value: options.tags.length > 0 ? options.tags.join('; ') : '',
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else if ((options.tagsToAdd && options.tagsToAdd.length > 0) ||
|
|
90
|
+
(options.tagsToRemove && options.tagsToRemove.length > 0)) {
|
|
91
|
+
const currentWorkItem = await witApi.getWorkItem(workItemId, [
|
|
92
|
+
'System.Tags',
|
|
93
|
+
]);
|
|
94
|
+
if (!currentWorkItem) {
|
|
95
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Work item '${workItemId}' not found`);
|
|
96
|
+
}
|
|
97
|
+
const currentTagsStr = currentWorkItem.fields?.['System.Tags'] || '';
|
|
98
|
+
let tagsList = currentTagsStr
|
|
99
|
+
.split(';')
|
|
100
|
+
.map((t) => t.trim())
|
|
101
|
+
.filter((t) => t.length > 0);
|
|
102
|
+
if (options.tagsToAdd) {
|
|
103
|
+
for (const tag of options.tagsToAdd) {
|
|
104
|
+
const trimmed = tag.trim();
|
|
105
|
+
const trimmedLower = trimmed.toLowerCase();
|
|
106
|
+
if (trimmed &&
|
|
107
|
+
!tagsList.some((t) => t.toLowerCase() === trimmedLower)) {
|
|
108
|
+
tagsList.push(trimmed);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (options.tagsToRemove) {
|
|
113
|
+
const toRemove = new Set(options.tagsToRemove.map((t) => t.trim().toLowerCase()));
|
|
114
|
+
tagsList = tagsList.filter((t) => !toRemove.has(t.toLowerCase()));
|
|
115
|
+
}
|
|
116
|
+
document.push({
|
|
117
|
+
op: currentTagsStr ? 'replace' : 'add',
|
|
118
|
+
path: '/fields/System.Tags',
|
|
119
|
+
value: tagsList.length > 0 ? tagsList.join('; ') : '',
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
// Add any additional fields
|
|
123
|
+
if (options.additionalFields) {
|
|
124
|
+
for (const [key, value] of Object.entries(options.additionalFields)) {
|
|
125
|
+
document.push({
|
|
126
|
+
op: 'add',
|
|
127
|
+
path: `/fields/${key}`,
|
|
128
|
+
value: value,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// If no fields to update, throw an error
|
|
133
|
+
if (document.length === 0) {
|
|
134
|
+
throw new Error('At least one field must be provided for update');
|
|
135
|
+
}
|
|
136
|
+
// Update the work item
|
|
137
|
+
const updatedWorkItem = await witApi.updateWorkItem({}, // customHeaders
|
|
138
|
+
document, workItemId, undefined, // project
|
|
139
|
+
false, // validateOnly
|
|
140
|
+
false, // bypassRules
|
|
141
|
+
false, // suppressNotifications
|
|
142
|
+
WorkItemTrackingInterfaces_1.WorkItemExpand.All);
|
|
143
|
+
if (!updatedWorkItem) {
|
|
144
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Work item '${workItemId}' not found`);
|
|
145
|
+
}
|
|
146
|
+
return updatedWorkItem;
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
throw new Error(`Failed to update work item: ${error instanceof Error ? error.message : String(error)}`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/work-items/update-work-item/feature.ts"],"names":[],"mappings":";;;AACA,4GAA6F;AAC7F,mDAGgC;AAGhC;;;;;;;;GAQG;AACI,KAAK,yBACV,UAAkB,EAClB,UAAkB,EAClB,OAA8B;IAE9B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,sBAAsB,EAAE,CAAC;QAEzD,iCAAiC;QACjC,MAAM,QAAQ,GAAG,EAAE,CAAC;QAEpB,kCAAkC;QAClC,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,QAAQ,CAAC,IAAI,CAAC;gBACZ,EAAE,EAAE,KAAK;gBACT,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,OAAO,CA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, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema"), exports);
|
|
18
|
+
__exportStar(require("./feature"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/work-items/update-work-item/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateWorkItemSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
Object.defineProperty(exports, "UpdateWorkItemSchema", { enumerable: true, get: function () { return schemas_1.UpdateWorkItemSchema; } });
|
|
6
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/work-items/update-work-item/schema.ts"],"names":[],"mappings":";;;AAAA,wCAAkD;qGAAzC,8BAAoB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* HTTP / Streamable-HTTP entry point for the Azure DevOps MCP Server.
|
|
4
|
+
*
|
|
5
|
+
* Run this instead of src/index.ts (stdio) when you want to expose the server
|
|
6
|
+
* over HTTP – for example inside a Docker container or when testing via raw
|
|
7
|
+
* JSON-RPC over HTTP.
|
|
8
|
+
*
|
|
9
|
+
* Transport: MCP Streamable HTTP (spec 2025-03-26 / SDK ≥ 1.7)
|
|
10
|
+
* POST <MCP_PATH> – JSON-RPC request body → JSON-RPC response
|
|
11
|
+
* GET /healthz – liveness probe
|
|
12
|
+
*
|
|
13
|
+
* Environment variables:
|
|
14
|
+
* PORT HTTP port (default: 3000)
|
|
15
|
+
* MCP_PATH URL path for the MCP endpoint (default: /mcp)
|
|
16
|
+
* AZURE_DEVOPS_ORG_URL (required) e.g. https://dev.azure.com/my-org
|
|
17
|
+
* AZURE_DEVOPS_AUTH_METHOD pat | azure-identity | azure-cli (default: pat)
|
|
18
|
+
* AZURE_DEVOPS_PAT Personal access token (required when auth=pat)
|
|
19
|
+
* AZURE_DEVOPS_DEFAULT_PROJECT
|
|
20
|
+
* AZURE_DEVOPS_API_VERSION
|
|
21
|
+
*/
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* HTTP / Streamable-HTTP entry point for the Azure DevOps MCP Server.
|
|
5
|
+
*
|
|
6
|
+
* Run this instead of src/index.ts (stdio) when you want to expose the server
|
|
7
|
+
* over HTTP – for example inside a Docker container or when testing via raw
|
|
8
|
+
* JSON-RPC over HTTP.
|
|
9
|
+
*
|
|
10
|
+
* Transport: MCP Streamable HTTP (spec 2025-03-26 / SDK ≥ 1.7)
|
|
11
|
+
* POST <MCP_PATH> – JSON-RPC request body → JSON-RPC response
|
|
12
|
+
* GET /healthz – liveness probe
|
|
13
|
+
*
|
|
14
|
+
* Environment variables:
|
|
15
|
+
* PORT HTTP port (default: 3000)
|
|
16
|
+
* MCP_PATH URL path for the MCP endpoint (default: /mcp)
|
|
17
|
+
* AZURE_DEVOPS_ORG_URL (required) e.g. https://dev.azure.com/my-org
|
|
18
|
+
* AZURE_DEVOPS_AUTH_METHOD pat | azure-identity | azure-cli (default: pat)
|
|
19
|
+
* AZURE_DEVOPS_PAT Personal access token (required when auth=pat)
|
|
20
|
+
* AZURE_DEVOPS_DEFAULT_PROJECT
|
|
21
|
+
* AZURE_DEVOPS_API_VERSION
|
|
22
|
+
*/
|
|
23
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
24
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
const server_1 = require("./server");
|
|
28
|
+
const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
|
|
29
|
+
const http_1 = __importDefault(require("http"));
|
|
30
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
31
|
+
const auth_factory_1 = require("./shared/auth/auth-factory");
|
|
32
|
+
dotenv_1.default.config({ quiet: true });
|
|
33
|
+
// ─── helpers ────────────────────────────────────────────────────────────────
|
|
34
|
+
function normalizeAuthMethod(s) {
|
|
35
|
+
const lower = (s ?? '').toLowerCase();
|
|
36
|
+
if (lower === auth_factory_1.AuthenticationMethod.PersonalAccessToken.toLowerCase())
|
|
37
|
+
return auth_factory_1.AuthenticationMethod.PersonalAccessToken;
|
|
38
|
+
if (lower === auth_factory_1.AuthenticationMethod.AzureIdentity.toLowerCase())
|
|
39
|
+
return auth_factory_1.AuthenticationMethod.AzureIdentity;
|
|
40
|
+
if (lower === auth_factory_1.AuthenticationMethod.AzureCli.toLowerCase())
|
|
41
|
+
return auth_factory_1.AuthenticationMethod.AzureCli;
|
|
42
|
+
if (s) {
|
|
43
|
+
process.stderr.write(`WARNING: Unknown auth method '${s}'. Falling back to ${auth_factory_1.AuthenticationMethod.AzureIdentity}.\n`);
|
|
44
|
+
}
|
|
45
|
+
return auth_factory_1.AuthenticationMethod.AzureIdentity;
|
|
46
|
+
}
|
|
47
|
+
function getConfig() {
|
|
48
|
+
return {
|
|
49
|
+
organizationUrl: process.env.AZURE_DEVOPS_ORG_URL ?? '',
|
|
50
|
+
authMethod: normalizeAuthMethod(process.env.AZURE_DEVOPS_AUTH_METHOD),
|
|
51
|
+
personalAccessToken: process.env.AZURE_DEVOPS_PAT,
|
|
52
|
+
defaultProject: process.env.AZURE_DEVOPS_DEFAULT_PROJECT,
|
|
53
|
+
apiVersion: process.env.AZURE_DEVOPS_API_VERSION,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** Collect all chunks from an IncomingMessage and return as a string. */
|
|
57
|
+
function readBody(req) {
|
|
58
|
+
return new Promise((resolve, reject) => {
|
|
59
|
+
const chunks = [];
|
|
60
|
+
req.on('data', (chunk) => chunks.push(chunk));
|
|
61
|
+
req.on('end', () => resolve(Buffer.concat(chunks).toString('utf-8')));
|
|
62
|
+
req.on('error', reject);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// ─── server ─────────────────────────────────────────────────────────────────
|
|
66
|
+
async function main() {
|
|
67
|
+
const port = parseInt(process.env.PORT ?? '3000', 10);
|
|
68
|
+
const mcpPath = process.env.MCP_PATH ?? '/mcp';
|
|
69
|
+
const mcpServer = (0, server_1.createAzureDevOpsServer)(getConfig());
|
|
70
|
+
const httpServer = http_1.default.createServer(async (req, res) => {
|
|
71
|
+
try {
|
|
72
|
+
// ── health check ──────────────────────────────────────────────────────
|
|
73
|
+
if (req.method === 'GET' && req.url === '/healthz') {
|
|
74
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
75
|
+
res.end(JSON.stringify({ status: 'ok' }));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// ── MCP endpoint ──────────────────────────────────────────────────────
|
|
79
|
+
if (req.url !== mcpPath) {
|
|
80
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
81
|
+
res.end('Not Found');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (req.method !== 'POST') {
|
|
85
|
+
res.writeHead(405, { Allow: 'POST', 'Content-Type': 'text/plain' });
|
|
86
|
+
res.end('Method Not Allowed');
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
// Parse body
|
|
90
|
+
const rawBody = await readBody(req);
|
|
91
|
+
let body;
|
|
92
|
+
try {
|
|
93
|
+
body = JSON.parse(rawBody);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
97
|
+
res.end(JSON.stringify({ error: 'Invalid JSON' }));
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
// Create a fresh transport per request (stateless mode – safe behind a
|
|
101
|
+
// load balancer; also prevents request-ID collisions between clients).
|
|
102
|
+
const transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
|
|
103
|
+
sessionIdGenerator: undefined, // stateless
|
|
104
|
+
enableJsonResponse: true, // respond with JSON rather than SSE
|
|
105
|
+
});
|
|
106
|
+
// Clean up when the client disconnects
|
|
107
|
+
res.on('close', () => transport.close());
|
|
108
|
+
await mcpServer.connect(transport);
|
|
109
|
+
await transport.handleRequest(req, res, body);
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
process.stderr.write(`HTTP handler error: ${err}\n`);
|
|
113
|
+
if (!res.headersSent) {
|
|
114
|
+
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
115
|
+
}
|
|
116
|
+
if (!res.writableEnded) {
|
|
117
|
+
res.end(JSON.stringify({ error: 'Internal server error' }));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
httpServer.listen(port, () => {
|
|
122
|
+
process.stderr.write(`Azure DevOps MCP Server (HTTP) running on port ${port}\n`);
|
|
123
|
+
process.stderr.write(` Health: GET http://localhost:${port}/healthz\n`);
|
|
124
|
+
process.stderr.write(` MCP (JSON-RPC): POST http://localhost:${port}${mcpPath}\n`);
|
|
125
|
+
});
|
|
126
|
+
const shutdown = (sig) => {
|
|
127
|
+
process.stderr.write(`${sig} received – shutting down\n`);
|
|
128
|
+
httpServer.close(() => process.exit(0));
|
|
129
|
+
};
|
|
130
|
+
process.on('SIGTERM', () => shutdown('SIGTERM'));
|
|
131
|
+
process.on('SIGINT', () => shutdown('SIGINT'));
|
|
132
|
+
}
|
|
133
|
+
main().catch((err) => {
|
|
134
|
+
process.stderr.write(`Fatal error: ${err}\n`);
|
|
135
|
+
process.exit(1);
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=http-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-server.js","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;AAEH,qCAAmD;AACnD,0FAAmG;AACnG,gDAAwB;AACxB,oDAA4B;AAE5B,6DAAkE;AAElE,gBAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAE/B,+EAA+E;AAE/E,SAAS,mBAAmB,CAAC,CAAU;IACrC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACtC,IAAI,KAAK,KAAK,mCAAoB,CAAC,mBAAmB,CAAC,WAAW,EAAE;QAClE,OAAO,mCAAoB,CAAC,mBAAmB,CAAC;IAClD,IAAI,KAAK,KAAK,mCAAoB,CAAC,aAAa,CAAC,WAAW,EAAE;QAC5D,OAAO,mCAAoB,CAAC,aAAa,CAAC;IAC5C,IAAI,KAAK,KAAK,mCAAoB,CAAC,QAAQ,CAAC,WAAW,EAAE;QACvD,OAAO,mCAAoB,CAAC,QAAQ,CAAC;IACvC,IAAI,CAAC,EAAE,CAAC;QACN,OAAO,CAAC,MA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C;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,2CAA2C,IAAI,GAAG,OAAO,IAAI,CAC9D,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;QAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,6BAA6B,CAAC,CAAC;QAC1D,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Entry point for the Azure DevOps MCP Server
|
|
4
|
+
*/
|
|
5
|
+
import { AuthenticationMethod } from './shared/auth/auth-factory';
|
|
6
|
+
/**
|
|
7
|
+
* Normalize auth method string to a valid AuthenticationMethod enum value
|
|
8
|
+
* in a case-insensitive manner
|
|
9
|
+
*
|
|
10
|
+
* @param authMethodStr The auth method string from environment variable
|
|
11
|
+
* @returns A valid AuthenticationMethod value
|
|
12
|
+
*/
|
|
13
|
+
export declare function normalizeAuthMethod(authMethodStr?: string): AuthenticationMethod;
|
|
14
|
+
export * from './server';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Entry point for the Azure DevOps MCP Server
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.normalizeAuthMethod = normalizeAuthMethod;
|
|
25
|
+
const server_1 = require("./server");
|
|
26
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
27
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
28
|
+
const auth_factory_1 = require("./shared/auth/auth-factory");
|
|
29
|
+
/**
|
|
30
|
+
* Normalize auth method string to a valid AuthenticationMethod enum value
|
|
31
|
+
* in a case-insensitive manner
|
|
32
|
+
*
|
|
33
|
+
* @param authMethodStr The auth method string from environment variable
|
|
34
|
+
* @returns A valid AuthenticationMethod value
|
|
35
|
+
*/
|
|
36
|
+
function normalizeAuthMethod(authMethodStr) {
|
|
37
|
+
if (!authMethodStr) {
|
|
38
|
+
return auth_factory_1.AuthenticationMethod.AzureIdentity; // Default
|
|
39
|
+
}
|
|
40
|
+
// Convert to lowercase for case-insensitive comparison
|
|
41
|
+
const normalizedMethod = authMethodStr.toLowerCase();
|
|
42
|
+
// Check against known enum values (as lowercase strings)
|
|
43
|
+
if (normalizedMethod === auth_factory_1.AuthenticationMethod.PersonalAccessToken.toLowerCase()) {
|
|
44
|
+
return auth_factory_1.AuthenticationMethod.PersonalAccessToken;
|
|
45
|
+
}
|
|
46
|
+
else if (normalizedMethod === auth_factory_1.AuthenticationMethod.AzureIdentity.toLowerCase()) {
|
|
47
|
+
return auth_factory_1.AuthenticationMethod.AzureIdentity;
|
|
48
|
+
}
|
|
49
|
+
else if (normalizedMethod === auth_factory_1.AuthenticationMethod.AzureCli.toLowerCase()) {
|
|
50
|
+
return auth_factory_1.AuthenticationMethod.AzureCli;
|
|
51
|
+
}
|
|
52
|
+
// If not recognized, log a warning and use the default
|
|
53
|
+
process.stderr.write(`WARNING: Unrecognized auth method '${authMethodStr}'. Using default (${auth_factory_1.AuthenticationMethod.AzureIdentity}).\n`);
|
|
54
|
+
return auth_factory_1.AuthenticationMethod.AzureIdentity;
|
|
55
|
+
}
|
|
56
|
+
// Load environment variables
|
|
57
|
+
dotenv_1.default.config({ quiet: true });
|
|
58
|
+
/**
|
|
59
|
+
* Format org URL for logs: host + pathname only (no secrets).
|
|
60
|
+
*/
|
|
61
|
+
function formatOrgUrlForLog(organizationUrl) {
|
|
62
|
+
try {
|
|
63
|
+
const url = new URL(organizationUrl);
|
|
64
|
+
const path = url.pathname.replace(/\/$/, '');
|
|
65
|
+
return `${url.host}${path}` || url.host;
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return organizationUrl ? '(invalid org URL)' : '(not set)';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Describe how AZURE_DEVOPS_DEFAULT_PROJECT was provided.
|
|
73
|
+
*/
|
|
74
|
+
function describeDefaultProject(envValue) {
|
|
75
|
+
if (envValue === undefined) {
|
|
76
|
+
return 'omitted';
|
|
77
|
+
}
|
|
78
|
+
if (envValue === '') {
|
|
79
|
+
return 'empty string';
|
|
80
|
+
}
|
|
81
|
+
return `set (${envValue})`;
|
|
82
|
+
}
|
|
83
|
+
function isDebugLoggingEnabled() {
|
|
84
|
+
const level = (process.env.AZURE_DEVOPS_LOG_LEVEL ||
|
|
85
|
+
process.env.LOG_LEVEL ||
|
|
86
|
+
'').toLowerCase();
|
|
87
|
+
return level === 'debug';
|
|
88
|
+
}
|
|
89
|
+
function getConfig() {
|
|
90
|
+
const organizationUrl = process.env.AZURE_DEVOPS_ORG_URL || '';
|
|
91
|
+
const orgDisplay = formatOrgUrlForLog(organizationUrl);
|
|
92
|
+
const authMethod = normalizeAuthMethod(process.env.AZURE_DEVOPS_AUTH_METHOD);
|
|
93
|
+
const apiVersionEnv = process.env.AZURE_DEVOPS_API_VERSION;
|
|
94
|
+
const patPresent = Boolean(process.env.AZURE_DEVOPS_PAT);
|
|
95
|
+
// Always-on one-liner (stdio-safe)
|
|
96
|
+
process.stderr.write(`Azure DevOps MCP Server starting (org=${orgDisplay})\n`);
|
|
97
|
+
// Verbose dump only when debug logging is enabled
|
|
98
|
+
if (isDebugLoggingEnabled()) {
|
|
99
|
+
process.stderr.write(`DEBUG - Config:
|
|
100
|
+
org: ${orgDisplay}
|
|
101
|
+
authMethod: ${authMethod}
|
|
102
|
+
patPresent: ${patPresent}
|
|
103
|
+
defaultProject: ${describeDefaultProject(process.env.AZURE_DEVOPS_DEFAULT_PROJECT)}
|
|
104
|
+
apiVersion: ${apiVersionEnv ? `set (${apiVersionEnv})` : 'default'}
|
|
105
|
+
\n`);
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
organizationUrl,
|
|
109
|
+
authMethod,
|
|
110
|
+
personalAccessToken: process.env.AZURE_DEVOPS_PAT,
|
|
111
|
+
defaultProject: process.env.AZURE_DEVOPS_DEFAULT_PROJECT,
|
|
112
|
+
apiVersion: process.env.AZURE_DEVOPS_API_VERSION,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
async function main() {
|
|
116
|
+
try {
|
|
117
|
+
// Create the server with configuration
|
|
118
|
+
const server = (0, server_1.createAzureDevOpsServer)(getConfig());
|
|
119
|
+
// Connect to stdio transport
|
|
120
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
121
|
+
await server.connect(transport);
|
|
122
|
+
process.stderr.write('Azure DevOps MCP Server running on stdio\n');
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
process.stderr.write(`Error starting server: ${error}\n`);
|
|
126
|
+
process.exit(1);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// Start the server when this script is run directly
|
|
130
|
+
if (require.main === module) {
|
|
131
|
+
main().catch((error) => {
|
|
132
|
+
process.stderr.write(`Fatal error in main(): ${error}\n`);
|
|
133
|
+
process.exit(1);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// Export the server and related components
|
|
137
|
+
__exportStar(require("./server"), exports);
|
|
138
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;GAEG;;;;;;;;;;;;;;;;;;;;AAEH,qCAAmD;AACnD,wEAAiF;AACjF,oDAA4B;AAE5B,6DAAkE;AAElE;;;;;;GAMG;AACH,6BACE,aAAsB;IAEtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,mCAAoB,CAAC,aAAa,CAAC,CAAC,UAAU;IACvD,CAAC;IAED,uDAAuD;IACvD,MAAM,gBAAgB,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;IAErD,yDAAyD;IACzD,IACE,gBAAgB,KAAK,mCAAoB,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAC3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jB,IAAI,CAAC;QACH,uCAAuC;QACvC,MAAM,MAAM,GAAG,IAAA,gCAAuB,EAAC,SAAS,EAAE,CAAC,CAAC;QAEpD,6BAA6B;QAC7B,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;QAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAEhC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;IACrE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,KAAK,IAAI,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,oDAAoD;AACpD,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,KAAK,IAAI,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,2CAA2C;AAC3C,2CAAyB"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
3
|
+
import { AzureDevOpsConfig } from './shared/types';
|
|
4
|
+
/**
|
|
5
|
+
* Type definition for the Azure DevOps MCP Server
|
|
6
|
+
*/
|
|
7
|
+
export type AzureDevOpsServer = Server;
|
|
8
|
+
/**
|
|
9
|
+
* Create an Azure DevOps MCP Server
|
|
10
|
+
*
|
|
11
|
+
* @param config The Azure DevOps configuration
|
|
12
|
+
* @returns A configured MCP server instance
|
|
13
|
+
*/
|
|
14
|
+
export declare function createAzureDevOpsServer(config: AzureDevOpsConfig): Server;
|
|
15
|
+
/**
|
|
16
|
+
* Create a connection to Azure DevOps
|
|
17
|
+
*
|
|
18
|
+
* @param config The configuration to use
|
|
19
|
+
* @returns A WebApi connection
|
|
20
|
+
*/
|
|
21
|
+
export declare function getConnection(config: AzureDevOpsConfig): Promise<WebApi>;
|