Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.13.0"
".": "2.14.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 41
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-2c3f4e4b357ca78c019a3aacd006e2bb8b332d4172a300ee6c46c076a216ed3f.yml
openapi_spec_hash: b89be415cf6ee594b521885a9deb25ac
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-dc61df29e1b6282f9df685fadd65f3683afe352deccae94d0c080092e0eae4b3.yml
openapi_spec_hash: 258caa98cd0de5f7149f6937d071c912
config_hash: 0fb0ceca5946298c416cec0cca5260c7
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 2.14.0 (2026-08-27)

Full Changelog: [v2.13.0...v2.14.0](https://github.com/context-dot-dev/context-typescript-sdk/compare/v2.13.0...v2.14.0)

### Features

* **api:** api update ([2bac956](https://github.com/context-dot-dev/context-typescript-sdk/commit/2bac9560e6409ddddc31648fc8c6e8a1f3ac0da3))
* **api:** api update ([5809c3c](https://github.com/context-dot-dev/context-typescript-sdk/commit/5809c3c4842f3e4e2a32fe5c3992bf5eb45a0d8e))

## 2.13.0 (2026-08-23)

Full Changelog: [v2.12.0...v2.13.0](https://github.com/context-dot-dev/context-typescript-sdk/compare/v2.12.0...v2.13.0)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const client = new ContextDev({

const brand = await client.brand.retrieve({ domain: 'REPLACE_ME', type: 'by_domain' });

console.log(brand.brand);
console.log(brand.cache_metadata);
```

### Request & Response types
Expand Down Expand Up @@ -158,7 +158,7 @@ const { data: brand, response: raw } = await client.brand
.retrieve({ domain: 'REPLACE_ME', type: 'by_domain' })
.withResponse();
console.log(raw.headers.get('X-My-Header'));
console.log(brand.brand);
console.log(brand.cache_metadata);
```

### Logging
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context.dev",
"version": "2.13.0",
"version": "2.14.0",
"description": "The official TypeScript library for the Context Dev API",
"author": "Context Dev <hello@context.dev>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "context.dev-mcp",
"version": "2.13.0",
"version": "2.14.0",
"description": "The official MCP Server for the Context Dev API",
"author": {
"name": "Context Dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context.dev-mcp",
"version": "2.13.0",
"version": "2.14.0",
"description": "The official MCP Server for the Context Dev API",
"author": "Context Dev <hello@context.dev>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/code-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For example:
async function run(client) {
const brand = await client.brand.retrieve({ domain: 'REPLACE_ME', type: 'by_domain' });

console.log(brand.brand);
console.log(brand.cache_metadata);
}
\`\`\`

Expand Down
132 changes: 66 additions & 66 deletions packages/mcp-server/src/local-docs-search.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const newMcpServer = async ({
new McpServer(
{
name: 'context_dev_api',
version: '2.13.0',
version: '2.14.0',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
50 changes: 50 additions & 0 deletions src/resources/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ export class AI extends APIResource {
}

export interface AIExtractProductResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
cache_metadata: AIExtractProductResponse.CacheMetadata;

/**
* Whether the given URL is a product detail page
*/
Expand All @@ -67,6 +74,24 @@ export interface AIExtractProductResponse {
}

export namespace AIExtractProductResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
export interface CacheMetadata {
/**
* Age of the cached data in milliseconds. Zero for miss and zdr responses.
*/
age_ms: number;

/**
* Whether the response was served from cache, required fresh work, or honored
* zero-data-retention cache bypass.
*/
status: 'hit' | 'miss' | 'zdr';
}

/**
* Metadata about the API key used for the request. Included in every response
* whenever a valid API key is provided, even when the response status is not 200.
Expand Down Expand Up @@ -183,6 +208,13 @@ export namespace AIExtractProductResponse {
}

export interface AIExtractProductsResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
cache_metadata: AIExtractProductsResponse.CacheMetadata;

/**
* Metadata about the API key used for the request. Included in every response
* whenever a valid API key is provided, even when the response status is not 200.
Expand All @@ -196,6 +228,24 @@ export interface AIExtractProductsResponse {
}

export namespace AIExtractProductsResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
export interface CacheMetadata {
/**
* Age of the cached data in milliseconds. Zero for miss and zdr responses.
*/
age_ms: number;

/**
* Whether the response was served from cache, required fresh work, or honored
* zero-data-retention cache bypass.
*/
status: 'hit' | 'miss' | 'zdr';
}

/**
* Metadata about the API key used for the request. Included in every response
* whenever a valid API key is provided, even when the response status is not 200.
Expand Down
50 changes: 50 additions & 0 deletions src/resources/batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,13 @@ export namespace BatchGetResultsResponse {
* A page the batch fetched successfully.
*/
export interface Ok {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
cache_metadata: Ok.CacheMetadata;

/**
* URL the content was read from, after redirects.
*/
Expand Down Expand Up @@ -925,6 +932,24 @@ export namespace BatchGetResultsResponse {
}

export namespace Ok {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
export interface CacheMetadata {
/**
* Age of the cached data in milliseconds. Zero for miss and zdr responses.
*/
age_ms: number;

/**
* Whether the response was served from cache, required fresh work, or honored
* zero-data-retention cache bypass.
*/
status: 'hit' | 'miss' | 'zdr';
}

/**
* Metadata extracted from the scraped page HTML.
*/
Expand Down Expand Up @@ -1127,6 +1152,13 @@ export interface BatchSubmitResponse {
*/
id: string;

/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
cache_metadata: BatchSubmitResponse.CacheMetadata;

/**
* The crawl controls as submitted, so the limits requested can be compared against
* what the crawl reached.
Expand Down Expand Up @@ -1186,6 +1218,24 @@ export interface BatchSubmitResponse {
}

export namespace BatchSubmitResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
export interface CacheMetadata {
/**
* Age of the cached data in milliseconds. Zero for miss and zdr responses.
*/
age_ms: number;

/**
* Whether the response was served from cache, required fresh work, or honored
* zero-data-retention cache bypass.
*/
status: 'hit' | 'miss' | 'zdr';
}

/**
* What accepting this batch cost.
*/
Expand Down
54 changes: 53 additions & 1 deletion src/resources/brand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ export class Brand extends APIResource {
}

export interface BrandRetrieveResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
cache_metadata: BrandRetrieveResponse.CacheMetadata;

/**
* Detailed brand information
*/
Expand All @@ -80,6 +87,24 @@ export interface BrandRetrieveResponse {
}

export namespace BrandRetrieveResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
export interface CacheMetadata {
/**
* Age of the cached data in milliseconds. Zero for miss and zdr responses.
*/
age_ms: number;

/**
* Whether the response was served from cache, required fresh work, or honored
* zero-data-retention cache bypass.
*/
status: 'hit' | 'miss' | 'zdr';
}

/**
* Detailed brand information
*/
Expand Down Expand Up @@ -135,7 +160,9 @@ export namespace BrandRetrieveResponse {
links?: Brand.Links;

/**
* An array of logos associated with the brand
* An array of logos associated with the brand. When a similarly shaped SVG variant
* exists, it is returned ahead of its raster equivalent; otherwise relevance order
* is preserved
*/
logos?: Array<Brand.Logo>;

Expand Down Expand Up @@ -870,6 +897,13 @@ export namespace BrandRetrieveResponse {
}

export interface BrandRetrieveSimplifiedResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
cache_metadata: BrandRetrieveSimplifiedResponse.CacheMetadata;

/**
* Simplified brand information
*/
Expand All @@ -893,6 +927,24 @@ export interface BrandRetrieveSimplifiedResponse {
}

export namespace BrandRetrieveSimplifiedResponse {
/**
* Cache outcome for this response. Composite responses are hits only when every
* cache-controlled fetch contributing to the output was a hit; age_ms is the
* oldest contributing hit.
*/
export interface CacheMetadata {
/**
* Age of the cached data in milliseconds. Zero for miss and zdr responses.
*/
age_ms: number;

/**
* Whether the response was served from cache, required fresh work, or honored
* zero-data-retention cache bypass.
*/
status: 'hit' | 'miss' | 'zdr';
}

/**
* Simplified brand information
*/
Expand Down
Loading
Loading