@meetkai/mka1 0.48.23 → 0.48.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +87 -186
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,235 +1,143 @@
1
- # openapi
1
+ # MKA1 TypeScript SDK
2
2
 
3
- Developer-friendly & type-safe Typescript SDK specifically catered to leverage *openapi* API.
3
+ Official TypeScript SDK for the MKA1 API.
4
4
 
5
- <div align="left">
6
- <a href="https://www.speakeasy.com/?utm_source=openapi&utm_campaign=typescript"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
7
- </div>
5
+ Use `@meetkai/mka1` to call MKA1 from Node.js, browsers, React apps, and agent tooling. The SDK includes typed clients for responses, agents, files, vector stores, evals, usage, model registry operations, guardrails, sandbox APIs, and more.
8
6
 
7
+ Full product and API documentation lives at [docs.mka1.com](https://docs.mka1.com).
9
8
 
10
- <!-- Start Summary [summary] -->
11
- ## Summary
12
-
13
- MKA1 API: The MKA1 API is a RESTful API that provides access to the MKA1 platform. Learn how to get started with the API and the TypeScript SDK [here](https://mka1.apidocumentation.com/guides/getting-started).
14
- <!-- End Summary [summary] -->
15
-
16
- <!-- Start Table of Contents [toc] -->
17
- ## Table of Contents
18
- <!-- $toc-max-depth=2 -->
19
- * [openapi](#openapi)
20
- * [SDK Installation](#sdk-installation)
21
- * [Requirements](#requirements)
22
- * [SDK Example Usage](#sdk-example-usage)
23
- * [Authentication](#authentication)
24
- * [Available Resources and Operations](#available-resources-and-operations)
25
- * [Standalone functions](#standalone-functions)
26
- * [React hooks with TanStack Query](#react-hooks-with-tanstack-query)
27
- * [Server-sent event streaming](#server-sent-event-streaming)
28
- * [File uploads](#file-uploads)
29
- * [Retries](#retries)
30
- * [Error Handling](#error-handling)
31
- * [Server Selection](#server-selection)
32
- * [Custom HTTP Client](#custom-http-client)
33
- * [Debugging](#debugging)
34
- * [Development](#development)
35
- * [Maturity](#maturity)
36
- * [Contributions](#contributions)
37
-
38
- <!-- End Table of Contents [toc] -->
39
-
40
- <!-- Start SDK Installation [installation] -->
41
- ## SDK Installation
42
-
43
- The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
44
-
45
- ### NPM
9
+ ## Install
46
10
 
47
11
  ```bash
48
12
  npm add @meetkai/mka1
49
- # Install optional peer dependencies if you plan to use React hooks
50
- npm add @tanstack/react-query react react-dom
51
13
  ```
52
14
 
53
- ### PNPM
54
-
55
15
  ```bash
56
16
  pnpm add @meetkai/mka1
57
- # Install optional peer dependencies if you plan to use React hooks
58
- pnpm add @tanstack/react-query react react-dom
59
17
  ```
60
18
 
61
- ### Bun
62
-
63
19
  ```bash
64
20
  bun add @meetkai/mka1
65
- # Install optional peer dependencies if you plan to use React hooks
66
- bun add @tanstack/react-query react react-dom
67
21
  ```
68
22
 
69
- ### Yarn
70
-
71
23
  ```bash
72
24
  yarn add @meetkai/mka1
73
- # Install optional peer dependencies if you plan to use React hooks
74
- yarn add @tanstack/react-query react react-dom
75
25
  ```
76
26
 
77
- > [!NOTE]
78
- > This package is published with CommonJS and ES Modules (ESM) support.
79
-
80
-
81
- ### Model Context Protocol (MCP) Server
27
+ The package ships both ESM and CommonJS builds. For supported runtimes, see [RUNTIMES.md](RUNTIMES.md).
82
28
 
83
- This SDK is also an installable MCP server where the various SDK methods are
84
- exposed as tools that can be invoked by AI applications.
29
+ ## Quick Start
85
30
 
86
- > Node.js v20 or greater is required to run the MCP server from npm.
31
+ ```typescript
32
+ import { SDK } from "@meetkai/mka1";
87
33
 
88
- <details>
89
- <summary>Claude installation steps</summary>
34
+ const mka1 = new SDK({
35
+ bearerAuth: process.env.MKA1_API_KEY,
36
+ });
90
37
 
91
- Add the following server definition to your `claude_desktop_config.json` file:
38
+ const models = await mka1.llm.models.list({});
92
39
 
93
- ```json
94
- {
95
- "mcpServers": {
96
- "SDK": {
97
- "command": "npx",
98
- "args": [
99
- "-y", "--package", "@meetkai/mka1",
100
- "--",
101
- "mcp", "start",
102
- "--bearer-auth", "..."
103
- ]
104
- }
105
- }
106
- }
40
+ console.log(models.data.map((model) => model.id));
107
41
  ```
108
42
 
109
- </details>
110
-
111
- <details>
112
- <summary>Cursor installation steps</summary>
113
-
114
- Create a `.cursor/mcp.json` file in your project root with the following content:
43
+ Most write APIs use the same client:
115
44
 
116
- ```json
117
- {
118
- "mcpServers": {
119
- "SDK": {
120
- "command": "npx",
121
- "args": [
122
- "-y", "--package", "@meetkai/mka1",
123
- "--",
124
- "mcp", "start",
125
- "--bearer-auth", "..."
126
- ]
127
- }
128
- }
129
- }
130
- ```
45
+ ```typescript
46
+ import { SDK } from "@meetkai/mka1";
131
47
 
132
- </details>
48
+ const mka1 = new SDK({
49
+ bearerAuth: process.env.MKA1_API_KEY,
50
+ });
133
51
 
134
- You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases:
52
+ const response = await mka1.llm.responses.create({
53
+ responsesCreateRequest: {
54
+ model: "<MODEL_ID>",
55
+ input: "Summarize the latest MKA1 eval run.",
56
+ },
57
+ });
135
58
 
136
- ```bash
137
- curl -L -o mcp-server \
138
- https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \
139
- chmod +x mcp-server
59
+ console.log(response);
140
60
  ```
141
61
 
142
- If the repo is a private repo you must add your Github PAT to download a release `-H "Authorization: Bearer {GITHUB_PAT}"`.
62
+ ## Authentication
143
63
 
64
+ Pass an MKA1 API key or bearer token when constructing the client:
144
65
 
145
- ```json
146
- {
147
- "mcpServers": {
148
- "Todos": {
149
- "command": "./DOWNLOAD/PATH/mcp-server",
150
- "args": [
151
- "start"
152
- ]
153
- }
154
- }
155
- }
66
+ ```typescript
67
+ const mka1 = new SDK({
68
+ bearerAuth: process.env.MKA1_API_KEY,
69
+ });
156
70
  ```
157
71
 
158
- For a full list of server arguments, run:
72
+ You can also provide an async token resolver:
159
73
 
160
- ```sh
161
- npx -y --package @meetkai/mka1 -- mcp start --help
74
+ ```typescript
75
+ const mka1 = new SDK({
76
+ bearerAuth: async () => refreshMka1Token(),
77
+ });
162
78
  ```
163
- <!-- End SDK Installation [installation] -->
164
79
 
165
- <!-- Start Requirements [requirements] -->
166
- ## Requirements
80
+ For account setup, API keys, and endpoint-specific examples, see [docs.mka1.com](https://docs.mka1.com).
167
81
 
168
- For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
169
- <!-- End Requirements [requirements] -->
170
-
171
- <!-- Start SDK Example Usage [usage] -->
172
- ## SDK Example Usage
173
-
174
- ### Example
82
+ ## Common Entry Points
175
83
 
176
84
  ```typescript
177
- import { SDK } from "@meetkai/mka1";
85
+ mka1.llm.responses
86
+ mka1.llm.conversations
87
+ mka1.llm.files
88
+ mka1.llm.vectorStores
89
+ mka1.llm.evals
90
+ mka1.llm.models
91
+ mka1.llm.usage
92
+ mka1.agents
93
+ mka1.agentRuns
94
+ mka1.sandbox
95
+ mka1.permissions
96
+ ```
178
97
 
179
- const sdk = new SDK({
180
- bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
181
- });
98
+ The generated method reference below lists every resource and operation included in this SDK.
182
99
 
183
- async function run() {
184
- await sdk.permissions.llm.grant({
185
- grantPermissionRequest: {
186
- resourceType: "completion",
187
- resourceId: "my-completion-123",
188
- userId: "user-abc456",
189
- role: "writer",
190
- },
191
- });
192
- }
100
+ ## React Query
193
101
 
194
- run();
102
+ React hooks are available from `@meetkai/mka1/react-query`. Install the optional peer dependencies only if you plan to use those hooks:
195
103
 
104
+ ```bash
105
+ npm add @tanstack/react-query react react-dom
196
106
  ```
197
- <!-- End SDK Example Usage [usage] -->
198
107
 
199
- <!-- Start Authentication [security] -->
200
- ## Authentication
108
+ See [REACT_QUERY.md](REACT_QUERY.md) for provider setup, suspense hooks, invalidation helpers, and mutation examples.
201
109
 
202
- ### Per-Client Security Schemes
110
+ ## MCP Server
203
111
 
204
- This SDK supports the following security scheme globally:
112
+ This package also exposes the MKA1 API as an installable Model Context Protocol server.
205
113
 
206
- | Name | Type | Scheme |
207
- | ------------ | ---- | ----------- |
208
- | `bearerAuth` | http | HTTP Bearer |
209
-
210
- To authenticate with the API the `bearerAuth` parameter must be set when initializing the SDK client instance. For example:
211
- ```typescript
212
- import { SDK } from "@meetkai/mka1";
114
+ Node.js v20 or newer is required for the MCP server.
213
115
 
214
- const sdk = new SDK({
215
- bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
216
- });
217
-
218
- async function run() {
219
- await sdk.permissions.llm.grant({
220
- grantPermissionRequest: {
221
- resourceType: "completion",
222
- resourceId: "my-completion-123",
223
- userId: "user-abc456",
224
- role: "writer",
225
- },
226
- });
116
+ ```json
117
+ {
118
+ "mcpServers": {
119
+ "mka1": {
120
+ "command": "npx",
121
+ "args": [
122
+ "-y",
123
+ "--package",
124
+ "@meetkai/mka1",
125
+ "--",
126
+ "mcp",
127
+ "start",
128
+ "--bearer-auth",
129
+ "..."
130
+ ]
131
+ }
132
+ }
227
133
  }
134
+ ```
228
135
 
229
- run();
136
+ For available server flags:
230
137
 
138
+ ```bash
139
+ npx -y --package @meetkai/mka1 -- mcp start --help
231
140
  ```
232
- <!-- End Authentication [security] -->
233
141
 
234
142
  <!-- Start Available Resources and Operations [operations] -->
235
143
  ## Available Resources and Operations
@@ -1412,19 +1320,12 @@ const sdk = new SDK({ debugLogger: console });
1412
1320
  ```
1413
1321
  <!-- End Debugging [debug] -->
1414
1322
 
1415
- <!-- Placeholder for Future Speakeasy SDK Sections -->
1416
-
1417
- # Development
1418
-
1419
- ## Maturity
1323
+ ## Versioning
1420
1324
 
1421
- This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
1422
- to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
1423
- looking for the latest version.
1325
+ The SDK is generated from the MKA1 OpenAPI schema and may gain new endpoints frequently. Pin an exact package version when deploying production applications, then upgrade intentionally after reviewing the generated type changes.
1424
1326
 
1425
- ## Contributions
1327
+ ## Generated Code
1426
1328
 
1427
- While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
1428
- We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
1329
+ Most files under `src/`, `docs/`, and the generated reference sections in this README are produced from the API schema. Changes to generated implementation files are likely to be overwritten by the next SDK generation. For API behavior questions, integration support, or documentation issues, use the support channels listed at [docs.mka1.com](https://docs.mka1.com).
1429
1330
 
1430
- ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=openapi&utm_campaign=typescript)
1331
+ Generated with [Speakeasy](https://www.speakeasy.com/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetkai/mka1",
3
- "version": "0.48.23",
3
+ "version": "0.48.24",
4
4
  "author": "Daniel Wilder <dauncy@gmail.com>",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "publishConfig": {