🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@nimblebrain/mpak-sdk

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nimblebrain/mpak-sdk - npm Package Compare versions

Comparing version
0.7.0
to
0.8.0
+60
-0
dist/index.cjs

@@ -241,2 +241,62 @@ "use strict";

// ===========================================================================
// MCP Registry (ServerDetail) API
// ===========================================================================
/**
* Search servers by substring on name / displayName / description.
* Returns ServerDetail entries per the upstream MCP registry shape;
* pair with `metadata.next_cursor` for pagination.
*
* Note: this hits `/v1/servers/search`, the MCP-spec-aligned read
* surface. The `searchBundles` method targets the legacy
* `/v1/bundles/search` shape and is being deprecated server-side
* (responses now carry `Deprecation: true` + `Link: rel="successor-version"`).
*/
async searchServers(params = {}) {
const searchParams = new URLSearchParams();
if (params.q) searchParams.set("q", params.q);
if (params.limit) searchParams.set("limit", String(params.limit));
if (params.cursor) searchParams.set("cursor", params.cursor);
const queryString = searchParams.toString();
const url = `${this.registryUrl}/v1/servers/search${queryString ? `?${queryString}` : ""}`;
const response = await this.fetchWithTimeout(url);
if (response.status === 404) {
throw new MpakNotFoundError("servers/search endpoint");
}
if (!response.ok) {
throw new MpakNetworkError(`Failed to search servers: HTTP ${response.status}`);
}
return response.json();
}
/**
* Latest `ServerDetail` for a server. `name` accepts both the
* npm-style scoped name (`@scope/pkg`) and the reverse-DNS form
* (`ai.nimblebrain/echo`). Either form returns the same record.
*/
async getServer(name) {
const url = `${this.registryUrl}/v1/servers/${encodeURIComponent(name)}`;
const response = await this.fetchWithTimeout(url);
if (response.status === 404) {
throw new MpakNotFoundError(name);
}
if (!response.ok) {
throw new MpakNetworkError(`Failed to get server: HTTP ${response.status}`);
}
return response.json();
}
/**
* Version-specific `ServerDetail`. `version` accepts the literal
* `"latest"` to alias the most recent published version.
*/
async getServerVersion(name, version) {
const url = `${this.registryUrl}/v1/servers/${encodeURIComponent(name)}/versions/${encodeURIComponent(version)}`;
const response = await this.fetchWithTimeout(url);
if (response.status === 404) {
throw new MpakNotFoundError(`${name}@${version}`);
}
if (!response.ok) {
throw new MpakNetworkError(`Failed to get server version: HTTP ${response.status}`);
}
return response.json();
}
// ===========================================================================
// Skill API

@@ -243,0 +303,0 @@ // ===========================================================================

+34
-2

@@ -1,2 +0,2 @@

import { BundleSearchParamsInput, BundleSearchResponse, BundleDetail, VersionsResponse, VersionDetail, PlatformInfo, DownloadInfo, SkillSearchParamsInput, SkillSearchResponse, SkillDetail, SkillDownloadInfo, CacheMetadata, McpbManifest, CachedBundleInfo } from '@nimblebrain/mpak-schemas';
import { BundleSearchParamsInput, BundleSearchResponse, BundleDetail, VersionsResponse, VersionDetail, PlatformInfo, DownloadInfo, ServerListResponse, ServerDetail, SkillSearchParamsInput, SkillSearchResponse, SkillDetail, SkillDownloadInfo, CacheMetadata, McpbManifest, CachedBundleInfo } from '@nimblebrain/mpak-schemas';
import { z } from 'zod';

@@ -12,2 +12,12 @@

/**
* Query params for `MpakClient.searchServers`. Mirrors the
* `/v1/servers/search` query string. `cursor` is the registry's
* pagination handle returned in `metadata.next_cursor`.
*/
interface ServerSearchParams {
q?: string;
limit?: number;
cursor?: string;
}
/**
* Configuration options for MpakClient

@@ -64,2 +74,24 @@ */

/**
* Search servers by substring on name / displayName / description.
* Returns ServerDetail entries per the upstream MCP registry shape;
* pair with `metadata.next_cursor` for pagination.
*
* Note: this hits `/v1/servers/search`, the MCP-spec-aligned read
* surface. The `searchBundles` method targets the legacy
* `/v1/bundles/search` shape and is being deprecated server-side
* (responses now carry `Deprecation: true` + `Link: rel="successor-version"`).
*/
searchServers(params?: ServerSearchParams): Promise<ServerListResponse>;
/**
* Latest `ServerDetail` for a server. `name` accepts both the
* npm-style scoped name (`@scope/pkg`) and the reverse-DNS form
* (`ai.nimblebrain/echo`). Either form returns the same record.
*/
getServer(name: string): Promise<ServerDetail>;
/**
* Version-specific `ServerDetail`. `version` accepts the literal
* `"latest"` to alias the most recent published version.
*/
getServerVersion(name: string, version: string): Promise<ServerDetail>;
/**
* Search for skills

@@ -768,2 +800,2 @@ */

export { type ExtractZipOptions, MAX_UNCOMPRESSED_SIZE, type McpbValidationFailure, type McpbValidationResult, type McpbValidationSuccess, Mpak, MpakBundleCache, type MpakBundleCacheOptions, MpakCacheCorruptedError, MpakClient, type MpakClientConfig, MpakConfigCorruptedError, MpakConfigError, MpakConfigManager, type MpakConfigManagerOptions, MpakError, MpakIntegrityError, MpakInvalidBundleError, MpakNetworkError, MpakNotFoundError, type MpakOptions, type PackageConfig, type PrepareServerOptions, type PrepareServerSpec, type ServerCommand, extractZip, isSemverEqual, parsePackageSpec, validateMcpb };
export { type ExtractZipOptions, MAX_UNCOMPRESSED_SIZE, type McpbValidationFailure, type McpbValidationResult, type McpbValidationSuccess, Mpak, MpakBundleCache, type MpakBundleCacheOptions, MpakCacheCorruptedError, MpakClient, type MpakClientConfig, MpakConfigCorruptedError, MpakConfigError, MpakConfigManager, type MpakConfigManagerOptions, MpakError, MpakIntegrityError, MpakInvalidBundleError, MpakNetworkError, MpakNotFoundError, type MpakOptions, type PackageConfig, type PrepareServerOptions, type PrepareServerSpec, type ServerCommand, type ServerSearchParams, extractZip, isSemverEqual, parsePackageSpec, validateMcpb };

@@ -1,2 +0,2 @@

import { BundleSearchParamsInput, BundleSearchResponse, BundleDetail, VersionsResponse, VersionDetail, PlatformInfo, DownloadInfo, SkillSearchParamsInput, SkillSearchResponse, SkillDetail, SkillDownloadInfo, CacheMetadata, McpbManifest, CachedBundleInfo } from '@nimblebrain/mpak-schemas';
import { BundleSearchParamsInput, BundleSearchResponse, BundleDetail, VersionsResponse, VersionDetail, PlatformInfo, DownloadInfo, ServerListResponse, ServerDetail, SkillSearchParamsInput, SkillSearchResponse, SkillDetail, SkillDownloadInfo, CacheMetadata, McpbManifest, CachedBundleInfo } from '@nimblebrain/mpak-schemas';
import { z } from 'zod';

@@ -12,2 +12,12 @@

/**
* Query params for `MpakClient.searchServers`. Mirrors the
* `/v1/servers/search` query string. `cursor` is the registry's
* pagination handle returned in `metadata.next_cursor`.
*/
interface ServerSearchParams {
q?: string;
limit?: number;
cursor?: string;
}
/**
* Configuration options for MpakClient

@@ -64,2 +74,24 @@ */

/**
* Search servers by substring on name / displayName / description.
* Returns ServerDetail entries per the upstream MCP registry shape;
* pair with `metadata.next_cursor` for pagination.
*
* Note: this hits `/v1/servers/search`, the MCP-spec-aligned read
* surface. The `searchBundles` method targets the legacy
* `/v1/bundles/search` shape and is being deprecated server-side
* (responses now carry `Deprecation: true` + `Link: rel="successor-version"`).
*/
searchServers(params?: ServerSearchParams): Promise<ServerListResponse>;
/**
* Latest `ServerDetail` for a server. `name` accepts both the
* npm-style scoped name (`@scope/pkg`) and the reverse-DNS form
* (`ai.nimblebrain/echo`). Either form returns the same record.
*/
getServer(name: string): Promise<ServerDetail>;
/**
* Version-specific `ServerDetail`. `version` accepts the literal
* `"latest"` to alias the most recent published version.
*/
getServerVersion(name: string, version: string): Promise<ServerDetail>;
/**
* Search for skills

@@ -768,2 +800,2 @@ */

export { type ExtractZipOptions, MAX_UNCOMPRESSED_SIZE, type McpbValidationFailure, type McpbValidationResult, type McpbValidationSuccess, Mpak, MpakBundleCache, type MpakBundleCacheOptions, MpakCacheCorruptedError, MpakClient, type MpakClientConfig, MpakConfigCorruptedError, MpakConfigError, MpakConfigManager, type MpakConfigManagerOptions, MpakError, MpakIntegrityError, MpakInvalidBundleError, MpakNetworkError, MpakNotFoundError, type MpakOptions, type PackageConfig, type PrepareServerOptions, type PrepareServerSpec, type ServerCommand, extractZip, isSemverEqual, parsePackageSpec, validateMcpb };
export { type ExtractZipOptions, MAX_UNCOMPRESSED_SIZE, type McpbValidationFailure, type McpbValidationResult, type McpbValidationSuccess, Mpak, MpakBundleCache, type MpakBundleCacheOptions, MpakCacheCorruptedError, MpakClient, type MpakClientConfig, MpakConfigCorruptedError, MpakConfigError, MpakConfigManager, type MpakConfigManagerOptions, MpakError, MpakIntegrityError, MpakInvalidBundleError, MpakNetworkError, MpakNotFoundError, type MpakOptions, type PackageConfig, type PrepareServerOptions, type PrepareServerSpec, type ServerCommand, type ServerSearchParams, extractZip, isSemverEqual, parsePackageSpec, validateMcpb };

@@ -189,2 +189,62 @@ // src/mpakSDK.ts

// ===========================================================================
// MCP Registry (ServerDetail) API
// ===========================================================================
/**
* Search servers by substring on name / displayName / description.
* Returns ServerDetail entries per the upstream MCP registry shape;
* pair with `metadata.next_cursor` for pagination.
*
* Note: this hits `/v1/servers/search`, the MCP-spec-aligned read
* surface. The `searchBundles` method targets the legacy
* `/v1/bundles/search` shape and is being deprecated server-side
* (responses now carry `Deprecation: true` + `Link: rel="successor-version"`).
*/
async searchServers(params = {}) {
const searchParams = new URLSearchParams();
if (params.q) searchParams.set("q", params.q);
if (params.limit) searchParams.set("limit", String(params.limit));
if (params.cursor) searchParams.set("cursor", params.cursor);
const queryString = searchParams.toString();
const url = `${this.registryUrl}/v1/servers/search${queryString ? `?${queryString}` : ""}`;
const response = await this.fetchWithTimeout(url);
if (response.status === 404) {
throw new MpakNotFoundError("servers/search endpoint");
}
if (!response.ok) {
throw new MpakNetworkError(`Failed to search servers: HTTP ${response.status}`);
}
return response.json();
}
/**
* Latest `ServerDetail` for a server. `name` accepts both the
* npm-style scoped name (`@scope/pkg`) and the reverse-DNS form
* (`ai.nimblebrain/echo`). Either form returns the same record.
*/
async getServer(name) {
const url = `${this.registryUrl}/v1/servers/${encodeURIComponent(name)}`;
const response = await this.fetchWithTimeout(url);
if (response.status === 404) {
throw new MpakNotFoundError(name);
}
if (!response.ok) {
throw new MpakNetworkError(`Failed to get server: HTTP ${response.status}`);
}
return response.json();
}
/**
* Version-specific `ServerDetail`. `version` accepts the literal
* `"latest"` to alias the most recent published version.
*/
async getServerVersion(name, version) {
const url = `${this.registryUrl}/v1/servers/${encodeURIComponent(name)}/versions/${encodeURIComponent(version)}`;
const response = await this.fetchWithTimeout(url);
if (response.status === 404) {
throw new MpakNotFoundError(`${name}@${version}`);
}
if (!response.ok) {
throw new MpakNetworkError(`Failed to get server version: HTTP ${response.status}`);
}
return response.json();
}
// ===========================================================================
// Skill API

@@ -191,0 +251,0 @@ // ===========================================================================

+2
-2
{
"name": "@nimblebrain/mpak-sdk",
"version": "0.7.0",
"version": "0.8.0",
"description": "TypeScript SDK for mpak registry - MCPB bundles and Agent Skills",

@@ -55,3 +55,3 @@ "author": "NimbleBrain Inc <engineering@mpak.dev>",

"zod": "^4.3.6",
"@nimblebrain/mpak-schemas": "0.3.0"
"@nimblebrain/mpak-schemas": "0.4.0"
},

@@ -58,0 +58,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display