@roarkanalytics/sdk-mcp 4.17.0 → 4.18.0
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.
- package/CHANGELOG.md +7 -0
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +3 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +3 -0
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +81 -0
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +81 -0
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +18 -0
- package/methods.js.map +1 -1
- package/methods.mjs +18 -0
- package/methods.mjs.map +1 -1
- package/package.json +1 -1
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +3 -0
- package/src/local-docs-search.ts +98 -0
- package/src/methods.ts +18 -0
- package/src/server.ts +1 -1
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -19,7 +19,7 @@ const instructions_1 = require("./instructions.js");
|
|
|
19
19
|
const methods_1 = require("./methods.js");
|
|
20
20
|
const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new mcp_js_1.McpServer({
|
|
21
21
|
name: 'roarkanalytics_sdk_api',
|
|
22
|
-
version: '4.
|
|
22
|
+
version: '4.18.0', // x-release-please-version
|
|
23
23
|
}, {
|
|
24
24
|
instructions: await (0, instructions_1.getInstructions)({ stainlessApiKey, customInstructionsPath }),
|
|
25
25
|
capabilities: { tools: {}, logging: {} },
|
package/server.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { getInstructions } from "./instructions.mjs";
|
|
|
10
10
|
import { blockedMethodsForCodeTool } from "./methods.mjs";
|
|
11
11
|
export const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new McpServer({
|
|
12
12
|
name: 'roarkanalytics_sdk_api',
|
|
13
|
-
version: '4.
|
|
13
|
+
version: '4.18.0', // x-release-please-version
|
|
14
14
|
}, {
|
|
15
15
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|
|
16
16
|
capabilities: { tools: {}, logging: {} },
|
package/src/code-tool-worker.ts
CHANGED
|
@@ -109,7 +109,10 @@ function getTSDiagnostics(code: string): string[] {
|
|
|
109
109
|
const fuse = new Fuse(
|
|
110
110
|
[
|
|
111
111
|
'client.health.get',
|
|
112
|
+
'client.me.createAPIKey',
|
|
112
113
|
'client.me.get',
|
|
114
|
+
'client.me.listAPIKeys',
|
|
115
|
+
'client.me.revokeAPIKey',
|
|
113
116
|
'client.project.list',
|
|
114
117
|
'client.call.appendToolInvocations',
|
|
115
118
|
'client.call.create',
|
package/src/local-docs-search.ts
CHANGED
|
@@ -108,6 +108,104 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
|
+
{
|
|
112
|
+
name: 'listApiKeys',
|
|
113
|
+
endpoint: '/v1/me/api-keys',
|
|
114
|
+
httpMethod: 'get',
|
|
115
|
+
summary: 'List your personal credentials',
|
|
116
|
+
description:
|
|
117
|
+
'Returns the credentials that act as you: the ones created in the dashboard, from `roark auth login`, and MCP connectors. Requires a personal credential; a project API key is refused. Defaults to ACTIVE, pass ?status=REVOKED to see revoked ones. The key value itself is never returned.',
|
|
118
|
+
stainlessPath: '(resource) me > (method) listApiKeys',
|
|
119
|
+
qualified: 'client.me.listAPIKeys',
|
|
120
|
+
params: ["status?: 'ACTIVE' | 'REVOKED';"],
|
|
121
|
+
response:
|
|
122
|
+
"{ data: { apiKeys: { id: string; createdAt: string; defaultProjectId: string; expiresAt: string; lastUsedAt: string; name: string; organizationId: string; permissions: string[]; scopes: string[]; status: 'ACTIVE' | 'REVOKED'; }[]; }; }",
|
|
123
|
+
markdown:
|
|
124
|
+
"## listApiKeys\n\n`client.me.listAPIKeys(status?: 'ACTIVE' | 'REVOKED'): { data: object; }`\n\n**get** `/v1/me/api-keys`\n\nReturns the credentials that act as you: the ones created in the dashboard, from `roark auth login`, and MCP connectors. Requires a personal credential; a project API key is refused. Defaults to ACTIVE, pass ?status=REVOKED to see revoked ones. The key value itself is never returned.\n\n### Parameters\n\n- `status?: 'ACTIVE' | 'REVOKED'`\n Filter by status. Defaults to ACTIVE.\n\n### Returns\n\n- `{ data: { apiKeys: { id: string; createdAt: string; defaultProjectId: string; expiresAt: string; lastUsedAt: string; name: string; organizationId: string; permissions: string[]; scopes: string[]; status: 'ACTIVE' | 'REVOKED'; }[]; }; }`\n\n - `data: { apiKeys: { id: string; createdAt: string; defaultProjectId: string; expiresAt: string; lastUsedAt: string; name: string; organizationId: string; permissions: string[]; scopes: string[]; status: 'ACTIVE' | 'REVOKED'; }[]; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.me.listAPIKeys();\n\nconsole.log(response);\n```",
|
|
125
|
+
perLanguage: {
|
|
126
|
+
typescript: {
|
|
127
|
+
method: 'client.me.listAPIKeys',
|
|
128
|
+
example:
|
|
129
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.me.listAPIKeys();\n\nconsole.log(response.data);",
|
|
130
|
+
},
|
|
131
|
+
python: {
|
|
132
|
+
method: 'me.list_api_keys',
|
|
133
|
+
example:
|
|
134
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.me.list_api_keys()\nprint(response.data)',
|
|
135
|
+
},
|
|
136
|
+
http: {
|
|
137
|
+
example:
|
|
138
|
+
'curl https://api.roark.ai/v1/me/api-keys \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'createApiKey',
|
|
144
|
+
endpoint: '/v1/me/api-keys',
|
|
145
|
+
httpMethod: 'post',
|
|
146
|
+
summary: 'Create a personal credential',
|
|
147
|
+
description:
|
|
148
|
+
'Mints a credential that acts as you, for a CLI or an automation. The key value is returned exactly once, in the `key` field: capture it now, it is unreadable afterwards. Requires a personal credential (a project API key is refused) and admin on the project the credential defaults to. The new credential can never exceed the one that created it: not in scope, not in permissions, and not in lifetime. Omit a field to copy it from the calling credential.',
|
|
149
|
+
stainlessPath: '(resource) me > (method) createApiKey',
|
|
150
|
+
qualified: 'client.me.createAPIKey',
|
|
151
|
+
params: [
|
|
152
|
+
'name: string;',
|
|
153
|
+
'expiresAt?: string;',
|
|
154
|
+
'permissions?: string[];',
|
|
155
|
+
'projectId?: string;',
|
|
156
|
+
"scopes?: 'READ' | 'WRITE'[];",
|
|
157
|
+
],
|
|
158
|
+
response:
|
|
159
|
+
"{ data: { id: string; createdAt: string; defaultProjectId: string; expiresAt: string; key: string; lastUsedAt: string; name: string; organizationId: string; permissions: string[]; scopes: string[]; status: 'ACTIVE' | 'REVOKED'; }; }",
|
|
160
|
+
markdown:
|
|
161
|
+
"## createApiKey\n\n`client.me.createAPIKey(name: string, expiresAt?: string, permissions?: string[], projectId?: string, scopes?: 'READ' | 'WRITE'[]): { data: object; }`\n\n**post** `/v1/me/api-keys`\n\nMints a credential that acts as you, for a CLI or an automation. The key value is returned exactly once, in the `key` field: capture it now, it is unreadable afterwards. Requires a personal credential (a project API key is refused) and admin on the project the credential defaults to. The new credential can never exceed the one that created it: not in scope, not in permissions, and not in lifetime. Omit a field to copy it from the calling credential.\n\n### Parameters\n\n- `name: string`\n A label you will recognise later. It is the only thing that tells two credentials apart in the list you revoke from.\n\n- `expiresAt?: string`\n ISO 8601 expiry. Defaults to the calling credential's own expiry (no expiry, for a `roark auth login` credential) and may not outlive it, so a short-lived connector credential cannot mint a permanent one.\n\n- `permissions?: string[]`\n Granular 'resource:action' permissions. Defaults to the calling credential's own set, and can never exceed it. A ceiling, not an entitlement: the holder still only reaches what their project membership allows.\n\n- `projectId?: string`\n Project the credential assumes when a request sends no X-Roark-Project-Id header. Defaults to the calling credential's own default project. You must be an admin of whichever project is used.\n\n- `scopes?: 'READ' | 'WRITE'[]`\n Coarse tier. Defaults to the calling credential's own tier, and can never exceed it: a READ credential cannot mint a WRITE one.\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; defaultProjectId: string; expiresAt: string; key: string; lastUsedAt: string; name: string; organizationId: string; permissions: string[]; scopes: string[]; status: 'ACTIVE' | 'REVOKED'; }; }`\n\n - `data: { id: string; createdAt: string; defaultProjectId: string; expiresAt: string; key: string; lastUsedAt: string; name: string; organizationId: string; permissions: string[]; scopes: string[]; status: 'ACTIVE' | 'REVOKED'; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.me.createAPIKey({ name: 'CI deploy gate' });\n\nconsole.log(response);\n```",
|
|
162
|
+
perLanguage: {
|
|
163
|
+
typescript: {
|
|
164
|
+
method: 'client.me.createAPIKey',
|
|
165
|
+
example:
|
|
166
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.me.createAPIKey({ name: 'CI deploy gate' });\n\nconsole.log(response.data);",
|
|
167
|
+
},
|
|
168
|
+
python: {
|
|
169
|
+
method: 'me.create_api_key',
|
|
170
|
+
example:
|
|
171
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.me.create_api_key(\n name="CI deploy gate",\n)\nprint(response.data)',
|
|
172
|
+
},
|
|
173
|
+
http: {
|
|
174
|
+
example:
|
|
175
|
+
'curl https://api.roark.ai/v1/me/api-keys \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "name": "CI deploy gate",\n "expiresAt": "2026-12-31T23:59:59.000Z",\n "permissions": [\n "call:read",\n "metric:read"\n ],\n "scopes": [\n "READ"\n ]\n }\'',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'revokeApiKey',
|
|
181
|
+
endpoint: '/v1/me/api-keys/{id}',
|
|
182
|
+
httpMethod: 'delete',
|
|
183
|
+
summary: 'Revoke one of your personal credentials',
|
|
184
|
+
description:
|
|
185
|
+
'Revokes a credential that acts as you. It stops working immediately. A credential may revoke itself, which is what `roark auth logout` does. Repeating the call is safe; an unknown id, or one belonging to someone else, answers 404.',
|
|
186
|
+
stainlessPath: '(resource) me > (method) revokeApiKey',
|
|
187
|
+
qualified: 'client.me.revokeAPIKey',
|
|
188
|
+
params: ['id: string;'],
|
|
189
|
+
response: '{ data: { id: string; deleted: true; }; }',
|
|
190
|
+
markdown:
|
|
191
|
+
"## revokeApiKey\n\n`client.me.revokeAPIKey(id: string): { data: object; }`\n\n**delete** `/v1/me/api-keys/{id}`\n\nRevokes a credential that acts as you. It stops working immediately. A credential may revoke itself, which is what `roark auth logout` does. Repeating the call is safe; an unknown id, or one belonging to someone else, answers 404.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; deleted: true; }; }`\n\n - `data: { id: string; deleted: true; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.me.revokeAPIKey('id');\n\nconsole.log(response);\n```",
|
|
192
|
+
perLanguage: {
|
|
193
|
+
typescript: {
|
|
194
|
+
method: 'client.me.revokeAPIKey',
|
|
195
|
+
example:
|
|
196
|
+
"import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.me.revokeAPIKey('id');\n\nconsole.log(response.data);",
|
|
197
|
+
},
|
|
198
|
+
python: {
|
|
199
|
+
method: 'me.revoke_api_key',
|
|
200
|
+
example:
|
|
201
|
+
'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.me.revoke_api_key(\n "id",\n)\nprint(response.data)',
|
|
202
|
+
},
|
|
203
|
+
http: {
|
|
204
|
+
example:
|
|
205
|
+
'curl https://api.roark.ai/v1/me/api-keys/$ID \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
111
209
|
{
|
|
112
210
|
name: 'list',
|
|
113
211
|
endpoint: '/v1/projects',
|
package/src/methods.ts
CHANGED
|
@@ -16,12 +16,30 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
16
16
|
httpMethod: 'get',
|
|
17
17
|
httpPath: '/health',
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
clientCallName: 'client.me.createAPIKey',
|
|
21
|
+
fullyQualifiedName: 'me.createAPIKey',
|
|
22
|
+
httpMethod: 'post',
|
|
23
|
+
httpPath: '/v1/me/api-keys',
|
|
24
|
+
},
|
|
19
25
|
{
|
|
20
26
|
clientCallName: 'client.me.get',
|
|
21
27
|
fullyQualifiedName: 'me.get',
|
|
22
28
|
httpMethod: 'get',
|
|
23
29
|
httpPath: '/v1/me',
|
|
24
30
|
},
|
|
31
|
+
{
|
|
32
|
+
clientCallName: 'client.me.listAPIKeys',
|
|
33
|
+
fullyQualifiedName: 'me.listAPIKeys',
|
|
34
|
+
httpMethod: 'get',
|
|
35
|
+
httpPath: '/v1/me/api-keys',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
clientCallName: 'client.me.revokeAPIKey',
|
|
39
|
+
fullyQualifiedName: 'me.revokeAPIKey',
|
|
40
|
+
httpMethod: 'delete',
|
|
41
|
+
httpPath: '/v1/me/api-keys/{id}',
|
|
42
|
+
},
|
|
25
43
|
{
|
|
26
44
|
clientCallName: 'client.project.list',
|
|
27
45
|
fullyQualifiedName: 'project.list',
|
package/src/server.ts
CHANGED
|
@@ -28,7 +28,7 @@ export const newMcpServer = async ({
|
|
|
28
28
|
new McpServer(
|
|
29
29
|
{
|
|
30
30
|
name: 'roarkanalytics_sdk_api',
|
|
31
|
-
version: '4.
|
|
31
|
+
version: '4.18.0', // x-release-please-version
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|