Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/hyperspell-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -41,7 +41,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -57,7 +57,7 @@ jobs:
- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/hyperspell-typescript'
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -83,7 +83,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/hyperspell-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
if: github.repository == 'hyperspell/node-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.HYPERSPELL_NPM_TOKEN || secrets.NPM_TOKEN }}

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.30.0"
".": "0.31.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: 23
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a73c73c4848db6cc0b836219f2ace7bc9f6b4611d36f9daa2158f8bd5a7d0864.yml
openapi_spec_hash: 4ef2aeca3ffe2c6e6fbca0770a69c6fb
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-34d6c3c2efa9b9b88d95ff49ff64f45440720b14a046edf3fac953d6eb0d13a1.yml
openapi_spec_hash: 80ce00b9f30af244e0a331c3430ed5e4
config_hash: bd77d0b7029518c697756456d6854f07
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.31.0 (2026-01-24)

Full Changelog: [v0.30.0...v0.31.0](https://github.com/hyperspell/node-sdk/compare/v0.30.0...v0.31.0)

### Features

* **api:** api update ([a0df1be](https://github.com/hyperspell/node-sdk/commit/a0df1be8d411efda7d9c06ba663e64a72e308de0))


### Chores

* **ci:** upgrade `actions/github-script` ([090b5c1](https://github.com/hyperspell/node-sdk/commit/090b5c1a28992d318a2904cabe73556f61e76edf))
* **internal:** update `actions/checkout` version ([954ce30](https://github.com/hyperspell/node-sdk/commit/954ce3099c58efa8c5071b6830dad969401a050a))
* **internal:** update lock file ([e192aa3](https://github.com/hyperspell/node-sdk/commit/e192aa3c9ac16fb38cad2e56f2e46498eb11f8ee))

## 0.30.0 (2026-01-16)

Full Changelog: [v0.29.0...v0.30.0](https://github.com/hyperspell/node-sdk/compare/v0.29.0...v0.30.0)
Expand Down
8 changes: 4 additions & 4 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ The `for await` syntax **is not affected**. This still works as-is:

```ts
// Automatically fetches more pages as needed.
for await (const memory of client.memories.list()) {
console.log(memory);
for await (const memoryListResponse of client.memories.list()) {
console.log(memoryListResponse);
}
```

Expand All @@ -257,10 +257,10 @@ Page classes for individual methods are now type aliases:

```ts
// Before
export class MemoriesCursorPage extends CursorPage<Memory> {}
export class MemoryListResponsesCursorPage extends CursorPage<MemoryListResponse> {}

// After
export type MemoriesCursorPage = CursorPage<Memory>;
export type MemoryListResponsesCursorPage = CursorPage<MemoryListResponse>;
```

If you were importing these classes at runtime, you'll need to switch to importing the base class or only import them at the type-level.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,22 @@ List methods in the Hyperspell API are paginated.
You can use the `for await … of` syntax to iterate through items across all pages:

```ts
async function fetchAllMemories(params) {
const allMemories = [];
async function fetchAllMemoryListResponses(params) {
const allMemoryListResponses = [];
// Automatically fetches more pages as needed.
for await (const memory of client.memories.list({ collection: 'REPLACE_ME' })) {
allMemories.push(memory);
for await (const memoryListResponse of client.memories.list({ collection: 'REPLACE_ME' })) {
allMemoryListResponses.push(memoryListResponse);
}
return allMemories;
return allMemoryListResponses;
}
```

Alternatively, you can request a single page at a time:

```ts
let page = await client.memories.list({ collection: 'REPLACE_ME' });
for (const memory of page.items) {
console.log(memory);
for (const memoryListResponse of page.items) {
console.log(memoryListResponse);
}

// Convenience methods are provided for manually paginating:
Expand Down
7 changes: 4 additions & 3 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,21 @@ Methods:

Types:

- <code><a href="./src/resources/memories.ts">Memory</a></code>
- <code><a href="./src/resources/memories.ts">MemoryStatus</a></code>
- <code><a href="./src/resources/memories.ts">MemoryListResponse</a></code>
- <code><a href="./src/resources/memories.ts">MemoryDeleteResponse</a></code>
- <code><a href="./src/resources/memories.ts">MemoryAddBulkResponse</a></code>
- <code><a href="./src/resources/memories.ts">MemoryGetResponse</a></code>
- <code><a href="./src/resources/memories.ts">MemoryStatusResponse</a></code>

Methods:

- <code title="post /memories/update/{source}/{resource_id}">client.memories.<a href="./src/resources/memories.ts">update</a>(resourceID, { ...params }) -> MemoryStatus</code>
- <code title="get /memories/list">client.memories.<a href="./src/resources/memories.ts">list</a>({ ...params }) -> MemoriesCursorPage</code>
- <code title="get /memories/list">client.memories.<a href="./src/resources/memories.ts">list</a>({ ...params }) -> MemoryListResponsesCursorPage</code>
- <code title="delete /memories/delete/{source}/{resource_id}">client.memories.<a href="./src/resources/memories.ts">delete</a>(resourceID, { ...params }) -> MemoryDeleteResponse</code>
- <code title="post /memories/add">client.memories.<a href="./src/resources/memories.ts">add</a>({ ...params }) -> MemoryStatus</code>
- <code title="post /memories/add/bulk">client.memories.<a href="./src/resources/memories.ts">addBulk</a>({ ...params }) -> MemoryAddBulkResponse</code>
- <code title="get /memories/get/{source}/{resource_id}">client.memories.<a href="./src/resources/memories.ts">get</a>(resourceID, { ...params }) -> Memory</code>
- <code title="get /memories/get/{source}/{resource_id}">client.memories.<a href="./src/resources/memories.ts">get</a>(resourceID, { ...params }) -> MemoryGetResponse</code>
- <code title="post /memories/query">client.memories.<a href="./src/resources/memories.ts">search</a>({ ...params }) -> QueryResult</code>
- <code title="get /memories/status">client.memories.<a href="./src/resources/memories.ts">status</a>() -> MemoryStatusResponse</code>
- <code title="post /memories/upload">client.memories.<a href="./src/resources/memories.ts">upload</a>({ ...params }) -> MemoryStatus</code>
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": "hyperspell",
"version": "0.30.0",
"version": "0.31.0",
"description": "The official TypeScript library for the Hyperspell API",
"author": "Hyperspell <hello@hyperspell.com>",
"types": "dist/index.d.ts",
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": "hyperspell-mcp",
"version": "0.30.0",
"version": "0.31.0",
"description": "The official MCP Server for the Hyperspell API",
"author": "Hyperspell <hello@hyperspell.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'hyperspell_api',
version: '0.30.0',
version: '0.31.0',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
3 changes: 0 additions & 3 deletions packages/mcp-server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3302,9 +3302,6 @@ readable-stream@^3.4.0:
string_decoder "^1.1.1"
util-deprecate "^1.0.1"

"replicate@file:../../dist":
version "2.0.0-alpha.74"

require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
Expand Down
10 changes: 6 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ import {
} from './resources/evaluate';
import {
Memories,
MemoriesCursorPage,
Memory,
MemoryAddBulkParams,
MemoryAddBulkResponse,
MemoryAddParams,
MemoryDeleteParams,
MemoryDeleteResponse,
MemoryGetParams,
MemoryGetResponse,
MemoryListParams,
MemoryListResponse,
MemoryListResponsesCursorPage,
MemorySearchParams,
MemoryStatus,
MemoryStatusResponse,
Expand Down Expand Up @@ -810,12 +811,13 @@ export declare namespace Hyperspell {

export {
Memories as Memories,
type Memory as Memory,
type MemoryStatus as MemoryStatus,
type MemoryListResponse as MemoryListResponse,
type MemoryDeleteResponse as MemoryDeleteResponse,
type MemoryAddBulkResponse as MemoryAddBulkResponse,
type MemoryGetResponse as MemoryGetResponse,
type MemoryStatusResponse as MemoryStatusResponse,
type MemoriesCursorPage as MemoriesCursorPage,
type MemoryListResponsesCursorPage as MemoryListResponsesCursorPage,
type MemoryUpdateParams as MemoryUpdateParams,
type MemoryListParams as MemoryListParams,
type MemoryDeleteParams as MemoryDeleteParams,
Expand Down
5 changes: 3 additions & 2 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ export {
} from './integrations/integrations';
export {
Memories,
type Memory,
type MemoryStatus,
type MemoryListResponse,
type MemoryDeleteResponse,
type MemoryAddBulkResponse,
type MemoryGetResponse,
type MemoryStatusResponse,
type MemoryUpdateParams,
type MemoryListParams,
Expand All @@ -37,7 +38,7 @@ export {
type MemoryGetParams,
type MemorySearchParams,
type MemoryUploadParams,
type MemoriesCursorPage,
type MemoryListResponsesCursorPage,
} from './memories';
export {
Vaults,
Expand Down
Loading