diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b90b92eb..ca5b3dd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 10 name: lint 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 + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -43,7 +43,7 @@ jobs: timeout-minutes: 5 name: build 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 + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') permissions: contents: read id-token: write diff --git a/.gitignore b/.gitignore index d62bea50..b7d4f6b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .prism.log +.stdy.log node_modules yarn-error.log codegen.log diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3a39fd8c..811a88ee 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.35.0" + ".": "0.35.1" } diff --git a/.stats.yml b/.stats.yml index fa467814..4f7805b6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-b1f2b7cb843e6f4e6123e838ce29cbbaea0a48b1a72057632de1d0d21727c5d8.yml -openapi_spec_hash: 21a354f587a2fe19797860c7b6da81a9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-8b0df513ca50dcaf708a82dec12d9cbbf4ac615203208373ea9b5394add77b17.yml +openapi_spec_hash: 3514190bfcbb5f804d631c0fd3bc0505 config_hash: 0ed970a9634b33d0af471738b478740d diff --git a/CHANGELOG.md b/CHANGELOG.md index 559535f2..be8f7d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.35.1 (2026-03-25) + +Full Changelog: [v0.35.0...v0.35.1](https://github.com/hyperspell/node-sdk/compare/v0.35.0...v0.35.1) + +### Features + +* **api:** api update ([a768bf6](https://github.com/hyperspell/node-sdk/commit/a768bf6fbd1eaa82a414535224da3f19f123907b)) +* **api:** api update ([c684933](https://github.com/hyperspell/node-sdk/commit/c684933f087a8e23948c932180ead79e01bec4b4)) + + +### Chores + +* **ci:** skip lint on metadata-only changes ([07b1ee8](https://github.com/hyperspell/node-sdk/commit/07b1ee87033ed506b9ff3500ce9467eabf639dcf)) +* **internal:** fix MCP server TS errors that occur with required client options ([028a8ad](https://github.com/hyperspell/node-sdk/commit/028a8ad398b22454643dd4ddf8fec700fb6dfb5b)) +* **internal:** update gitignore ([4949619](https://github.com/hyperspell/node-sdk/commit/4949619e1a3fd9e7c6c30eab4603b72f94c476c8)) +* **tests:** bump steady to v0.19.4 ([60d723b](https://github.com/hyperspell/node-sdk/commit/60d723b2005ee840ec27fbe4be01b2d363cd2227)) +* **tests:** bump steady to v0.19.5 ([be42038](https://github.com/hyperspell/node-sdk/commit/be42038d3d1aa652e8552bba11cb1d31bcaa08a6)) +* **tests:** bump steady to v0.19.6 ([7241e1e](https://github.com/hyperspell/node-sdk/commit/7241e1e18f60733bd2101470a65387dc839c837a)) +* **tests:** bump steady to v0.19.7 ([9d6b23b](https://github.com/hyperspell/node-sdk/commit/9d6b23b6c5254f9651d129b0e3c9f3b4ec8bfcea)) + + +### Refactors + +* **tests:** switch from prism to steady ([489061f](https://github.com/hyperspell/node-sdk/commit/489061f36a798209f7ea49566f0f47f5b8964f44)) + ## 0.35.0 (2026-03-18) Full Changelog: [v0.34.0...v0.35.0](https://github.com/hyperspell/node-sdk/compare/v0.34.0...v0.35.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0bc80117..7b6dc765 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,7 @@ $ pnpm link --global hyperspell ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. +Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests. ```sh $ ./scripts/mock diff --git a/package.json b/package.json index ffd3a789..fdc1def3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hyperspell", - "version": "0.35.0", + "version": "0.35.1", "description": "The official TypeScript library for the Hyperspell API", "author": "Hyperspell ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index 27cc620b..e47427ad 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "hyperspell-mcp", - "version": "0.35.0", + "version": "0.35.1", "description": "The official MCP Server for the Hyperspell API", "author": { "name": "Hyperspell", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index c23553db..9254990e 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "hyperspell-mcp", - "version": "0.35.0", + "version": "0.35.1", "description": "The official MCP Server for the Hyperspell API", "author": "Hyperspell ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/code-tool.ts b/packages/mcp-server/src/code-tool.ts index 0b85b1d6..b26fc4cc 100644 --- a/packages/mcp-server/src/code-tool.ts +++ b/packages/mcp-server/src/code-tool.ts @@ -285,16 +285,14 @@ const localDenoHandler = async ({ // Strip null/undefined values so that the worker SDK client can fall back to // reading from environment variables (including any upstreamClientEnvs). - const opts: ClientOptions = Object.fromEntries( - Object.entries({ - baseURL: client.baseURL, - apiKey: client.apiKey, - userID: client.userID, - defaultHeaders: { - 'X-Stainless-MCP': 'true', - }, - }).filter(([_, v]) => v != null), - ) as ClientOptions; + const opts = { + ...(client.baseURL != null ? { baseURL: client.baseURL } : undefined), + ...(client.apiKey != null ? { apiKey: client.apiKey } : undefined), + ...(client.userID != null ? { userID: client.userID } : undefined), + defaultHeaders: { + 'X-Stainless-MCP': 'true', + }, + } satisfies Partial as ClientOptions; const req = worker.request( 'http://localhost', diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index cd8f82e7..8ca1736e 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -21,7 +21,7 @@ export const newMcpServer = async (stainlessApiKey: string | undefined) => new McpServer( { name: 'hyperspell_api', - version: '0.35.0', + version: '0.35.1', }, { instructions: await getInstructions(stainlessApiKey), diff --git a/scripts/mock b/scripts/mock index bcf3b392..09eb49f6 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,34 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & - # Wait for server to come online (max 30s) + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi attempts=$((attempts + 1)) if [ "$attempts" -ge 300 ]; then echo - echo "Timed out waiting for Prism server to start" - cat .prism.log + echo "Timed out waiting for Steady server to start" + cat .stdy.log exit 1 fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 7bce0516..a7cf5615 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,8 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -25,7 +25,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -36,19 +36,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi diff --git a/src/resources/actions.ts b/src/resources/actions.ts index 2f48ff9d..5098e227 100644 --- a/src/resources/actions.ts +++ b/src/resources/actions.ts @@ -75,7 +75,8 @@ export interface ActionAddReactionParams { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; /** * Message timestamp to react to @@ -105,7 +106,8 @@ export interface ActionSendMessageParams { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; /** * Message text diff --git a/src/resources/auth.ts b/src/resources/auth.ts index 09b75e96..4ec2f96e 100644 --- a/src/resources/auth.ts +++ b/src/resources/auth.ts @@ -68,6 +68,7 @@ export interface AuthMeResponse { | 'web_crawler' | 'trace' | 'microsoft_teams' + | 'gmail_actions' >; /** @@ -87,6 +88,7 @@ export interface AuthMeResponse { | 'web_crawler' | 'trace' | 'microsoft_teams' + | 'gmail_actions' >; /** diff --git a/src/resources/connections.ts b/src/resources/connections.ts index 529d7559..3fdfa103 100644 --- a/src/resources/connections.ts +++ b/src/resources/connections.ts @@ -59,7 +59,8 @@ export namespace ConnectionListResponse { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; } } diff --git a/src/resources/integrations/integrations.ts b/src/resources/integrations/integrations.ts index 34236d5d..4d5f80fe 100644 --- a/src/resources/integrations/integrations.ts +++ b/src/resources/integrations/integrations.ts @@ -94,7 +94,13 @@ export namespace IntegrationListResponse { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; + + /** + * Whether this integration only supports write actions (no sync) + */ + actions_only?: boolean; } } diff --git a/src/resources/integrations/web-crawler.ts b/src/resources/integrations/web-crawler.ts index 1b4919bb..be1abe0f 100644 --- a/src/resources/integrations/web-crawler.ts +++ b/src/resources/integrations/web-crawler.ts @@ -36,7 +36,8 @@ export interface WebCrawlerIndexResponse { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; } diff --git a/src/resources/memories.ts b/src/resources/memories.ts index ca9f6a7d..830927ed 100644 --- a/src/resources/memories.ts +++ b/src/resources/memories.ts @@ -202,7 +202,8 @@ export interface Memory { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; /** * The type of document (e.g. Document, Website, Email) @@ -242,7 +243,8 @@ export interface MemoryStatus { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; status: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped'; } @@ -267,7 +269,8 @@ export interface MemoryDeleteResponse { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; success: boolean; } @@ -312,7 +315,8 @@ export interface MemoryUpdateParams { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; /** * @deprecated Body param: The collection to move the document to — deprecated, set @@ -368,6 +372,7 @@ export interface MemoryListParams extends CursorPageParams { | 'web_crawler' | 'trace' | 'microsoft_teams' + | 'gmail_actions' | null; /** @@ -390,7 +395,8 @@ export interface MemoryDeleteParams { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; } export interface MemoryAddParams { @@ -492,7 +498,8 @@ export interface MemoryGetParams { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; } export interface MemorySearchParams { @@ -533,6 +540,7 @@ export interface MemorySearchParams { | 'web_crawler' | 'trace' | 'microsoft_teams' + | 'gmail_actions' >; } diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 9ebcbd7e..6c469452 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -68,7 +68,8 @@ export interface Resource { | 'vault' | 'web_crawler' | 'trace' - | 'microsoft_teams'; + | 'microsoft_teams' + | 'gmail_actions'; /** * Provider folder ID this resource belongs to diff --git a/src/version.ts b/src/version.ts index 3f1d4329..c585ef4b 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.35.0'; // x-release-please-version +export const VERSION = '0.35.1'; // x-release-please-version