CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-rest

tessl install tessl/npm-rest@2.0.0

RESTful HTTP client library with composable interceptor architecture for Node.js and browsers

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.29x

Baseline

Agent success rate without this tile

59%

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how well the engineer uses the rest.js package's advanced interceptor features, specifically the ComplexRequest pattern, to implement request deduplication. The focus is on proper use of the interceptor architecture, ComplexRequest for returning cached responses, and correct request lifecycle management.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses interceptor function",
      "description": "Uses the `require('rest/interceptor')` function to create a custom interceptor with proper handler structure",
      "max_score": 20
    },
    {
      "name": "Uses ComplexRequest pattern",
      "description": "Uses the `ComplexRequest` constructor (from 'rest/interceptor') to return cached responses for duplicate requests, passing an object with a `response` property containing the cached promise",
      "max_score": 30
    },
    {
      "name": "Implements request handler",
      "description": "Implements the `request` handler function in the interceptor to intercept and check for duplicate requests before they are sent",
      "max_score": 15
    },
    {
      "name": "Maintains request cache",
      "description": "Maintains a registry/cache that maps request paths to pending response promises, enabling request deduplication",
      "max_score": 15
    },
    {
      "name": "Cleans up cache",
      "description": "Properly cleans up the cache by removing completed requests (both successful and failed) from the registry after they resolve or reject",
      "max_score": 10
    },
    {
      "name": "Returns proper structure",
      "description": "Returns the correct structure from the request handler: either the original request object for new requests or a ComplexRequest object for duplicates",
      "max_score": 10
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/rest@2.0.x
tile.json