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-8/

{
  "context": "This criteria evaluates how well the engineer uses the rest.js package's interceptor composition and chaining capabilities to implement a logging system. The focus is entirely on proper usage of the package's interceptor architecture, including creating interceptors that hook into the request/response lifecycle and composing them correctly.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Interceptor structure",
      "description": "Implementation returns an interceptor object or function that follows the rest.js interceptor pattern, with appropriate lifecycle methods (e.g., request, response, success, error phases).",
      "max_score": 25
    },
    {
      "name": "Request phase hook",
      "description": "Uses the interceptor's request phase (or equivalent) to access and log request details (method, path, headers, timestamp) before the request is sent. Properly returns or passes through the request object to continue the chain.",
      "max_score": 20
    },
    {
      "name": "Response phase hook",
      "description": "Uses the interceptor's response phase (or success/error phases) to access and log response details (status code, headers, duration). Properly returns or passes through the response to continue the chain.",
      "max_score": 20
    },
    {
      "name": "Client wrapping",
      "description": "Uses rest.js's wrap() method or equivalent mechanism to compose the logging interceptor with a base client, demonstrating proper interceptor composition.",
      "max_score": 15
    },
    {
      "name": "Configuration handling",
      "description": "Correctly uses the interceptor configuration pattern to accept and apply config options (logRequests, logResponses, logger function), following rest.js conventions for interceptor configuration.",
      "max_score": 10
    },
    {
      "name": "Timing measurement",
      "description": "Properly measures and logs request duration by capturing timing information across request and response phases, leveraging the interceptor lifecycle appropriately.",
      "max_score": 10
    }
  ]
}

Version

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