Skip to content

Conversation

@miguelangaranocurrents
Copy link
Collaborator

This commit implements all missing API endpoints from the Currents REST API OpenAPI specification (v1.0.0) to achieve full parity between the OpenAPI spec and the MCP server implementation.

Changes:

  1. Actions API (7 new tools) - OpenAPI paths /actions/*

    • currents-list-actions: List all actions with filtering (GET /actions)
    • currents-create-action: Create new test rules (POST /actions)
    • currents-get-action: Get single action details (GET /actions/{actionId})
    • currents-update-action: Modify existing actions (PUT /actions/{actionId})
    • currents-delete-action: Archive actions (DELETE /actions/{actionId})
    • currents-enable-action: Activate disabled actions (PUT /actions/{actionId}/enable)
    • currents-disable-action: Deactivate actions (PUT /actions/{actionId}/disable)
  2. Projects API (2 new tools) - OpenAPI paths /projects/*

    • currents-get-project: Get single project by ID (GET /projects/{projectId})
    • currents-get-project-insights: Get aggregated metrics with time-series data (GET /projects/{projectId}/insights)
  3. Runs API (6 new tools) - OpenAPI paths /runs/*

    • currents-delete-run: Permanently remove runs (DELETE /runs/{runId})
    • currents-update-run: Modify run metadata and tags (PUT /runs/{runId})
    • currents-cancel-run: Stop in-progress runs (PUT /runs/{runId}/cancel)
    • currents-reset-run: Reset failed specs for re-execution (PUT /runs/{runId}/reset)
    • currents-find-run: Lookup runs by CI build ID (POST /runs/find)
    • currents-cancel-ci-github: Cancel GitHub Actions workflows (POST /runs/cancel-ci/github)
  4. Request Library Enhancements

    • Added putApi() method for PUT requests with optional body
    • Added deleteApi() method for DELETE requests
    • Maintains consistent error handling and logging patterns

All implementations:

  • Follow OpenAPI spec exactly for endpoints, parameters, and schemas
  • Use zod for runtime type validation matching OpenAPI schemas
  • Include comprehensive JSDoc descriptions from OpenAPI spec
  • Support all query parameters, filters, and request bodies per spec
  • Maintain backward compatibility with existing 8 tools
  • Pass all existing tests (16 tests, 2 test suites)

OpenAPI Spec Reference:

Previous Coverage: 8/18 API endpoint groups (44%)
New Coverage: 18/18 API endpoint groups (100%)

Total New Files: 15
Total Modified Files: 3
Total Lines Added: 1,066

This commit implements all missing API endpoints from the Currents REST API
OpenAPI specification (v1.0.0) to achieve full parity between the OpenAPI spec
and the MCP server implementation.

Changes:

1. **Actions API (7 new tools)** - OpenAPI paths /actions/*
   - currents-list-actions: List all actions with filtering (GET /actions)
   - currents-create-action: Create new test rules (POST /actions)
   - currents-get-action: Get single action details (GET /actions/{actionId})
   - currents-update-action: Modify existing actions (PUT /actions/{actionId})
   - currents-delete-action: Archive actions (DELETE /actions/{actionId})
   - currents-enable-action: Activate disabled actions (PUT /actions/{actionId}/enable)
   - currents-disable-action: Deactivate actions (PUT /actions/{actionId}/disable)

2. **Projects API (2 new tools)** - OpenAPI paths /projects/*
   - currents-get-project: Get single project by ID (GET /projects/{projectId})
   - currents-get-project-insights: Get aggregated metrics with time-series data
     (GET /projects/{projectId}/insights)

3. **Runs API (6 new tools)** - OpenAPI paths /runs/*
   - currents-delete-run: Permanently remove runs (DELETE /runs/{runId})
   - currents-update-run: Modify run metadata and tags (PUT /runs/{runId})
   - currents-cancel-run: Stop in-progress runs (PUT /runs/{runId}/cancel)
   - currents-reset-run: Reset failed specs for re-execution (PUT /runs/{runId}/reset)
   - currents-find-run: Lookup runs by CI build ID (POST /runs/find)
   - currents-cancel-ci-github: Cancel GitHub Actions workflows (POST /runs/cancel-ci/github)

4. **Request Library Enhancements**
   - Added putApi() method for PUT requests with optional body
   - Added deleteApi() method for DELETE requests
   - Maintains consistent error handling and logging patterns

All implementations:
- Follow OpenAPI spec exactly for endpoints, parameters, and schemas
- Use zod for runtime type validation matching OpenAPI schemas
- Include comprehensive JSDoc descriptions from OpenAPI spec
- Support all query parameters, filters, and request bodies per spec
- Maintain backward compatibility with existing 8 tools
- Pass all existing tests (16 tests, 2 test suites)

OpenAPI Spec Reference:
- Base URL: https://api.currents.dev/v1
- Spec URL: https://api.currents.dev/v1/docs/openapi.json
- Version: 1.0.0

Previous Coverage: 8/18 API endpoint groups (44%)
New Coverage: 18/18 API endpoint groups (100%)

Total New Files: 15
Total Modified Files: 3
Total Lines Added: 1,066
@miguelangaranocurrents miguelangaranocurrents deleted the ai/feat/openapi-spec-full-parity branch January 9, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants