@nirvana-labs/nirvana-mcp 1.69.1 → 1.71.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/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +2 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +2 -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 +62 -4
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +62 -4
- 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 +12 -0
- package/methods.js.map +1 -1
- package/methods.mjs +12 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +2 -0
- package/src/local-docs-search.ts +74 -4
- package/src/methods.ts +12 -0
- package/src/server.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nirvana-labs/nirvana-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.71.0",
|
|
4
4
|
"description": "The official MCP Server for the Nirvana Labs API",
|
|
5
5
|
"author": "Nirvana Labs <engineering@nirvanalabs.io>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@nirvana-labs/nirvana": "^1.
|
|
21
|
+
"@nirvana-labs/nirvana": "^1.71.0",
|
|
22
22
|
"ajv": "^8.18.0",
|
|
23
23
|
"@cloudflare/cabidela": "^0.2.4",
|
|
24
24
|
"@hono/node-server": "^1.19.10",
|
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: 'nirvana_labs_nirvana_api',
|
|
22
|
-
version: '1.
|
|
22
|
+
version: '1.71.0',
|
|
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: 'nirvana_labs_nirvana_api',
|
|
13
|
-
version: '1.
|
|
13
|
+
version: '1.71.0',
|
|
14
14
|
}, {
|
|
15
15
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|
|
16
16
|
capabilities: { tools: {}, logging: {} },
|
package/src/code-tool-worker.ts
CHANGED
|
@@ -189,6 +189,8 @@ const fuse = new Fuse(
|
|
|
189
189
|
'client.nks.clusters.update',
|
|
190
190
|
'client.nks.clusters.availability.create',
|
|
191
191
|
'client.nks.clusters.availability.update',
|
|
192
|
+
'client.nks.clusters.persistentVolumeClaims.get',
|
|
193
|
+
'client.nks.clusters.persistentVolumeClaims.list',
|
|
192
194
|
'client.nks.clusters.kubeconfig.get',
|
|
193
195
|
'client.nks.clusters.controllers.get',
|
|
194
196
|
'client.nks.clusters.controllers.list',
|
package/src/local-docs-search.ts
CHANGED
|
@@ -956,9 +956,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
956
956
|
qualified: 'client.instanceTypes.get',
|
|
957
957
|
params: ["region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1';", 'name: string;'],
|
|
958
958
|
response:
|
|
959
|
-
"{ chipset: string; created_at: string;
|
|
959
|
+
"{ chipset: string; created_at: string; family: string; memory_gb: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; series: string; updated_at: string; vcpu: number; }",
|
|
960
960
|
markdown:
|
|
961
|
-
"## get\n\n`client.instanceTypes.get(region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', name: string): { chipset: string; created_at: string;
|
|
961
|
+
"## get\n\n`client.instanceTypes.get(region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', name: string): { chipset: string; created_at: string; family: string; memory_gb: number; name: string; region: region_name; series: string; updated_at: string; vcpu: number; }`\n\n**get** `/v1/instance_types/{region}/{name}`\n\nGet an instance type by region and name\n\n### Parameters\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n\n- `name: string`\n\n### Returns\n\n- `{ chipset: string; created_at: string; family: string; memory_gb: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; series: string; updated_at: string; vcpu: number; }`\n Instance type.\n\n - `chipset: string`\n - `created_at: string`\n - `family: string`\n - `memory_gb: number`\n - `name: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `series: string`\n - `updated_at: string`\n - `vcpu: number`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType);\n```",
|
|
962
962
|
perLanguage: {
|
|
963
963
|
cli: {
|
|
964
964
|
method: 'instance_types get',
|
|
@@ -991,9 +991,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
991
991
|
qualified: 'client.instanceTypes.list',
|
|
992
992
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
993
993
|
response:
|
|
994
|
-
"{ chipset: string; created_at: string;
|
|
994
|
+
"{ chipset: string; created_at: string; family: string; memory_gb: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; series: string; updated_at: string; vcpu: number; }",
|
|
995
995
|
markdown:
|
|
996
|
-
"## list\n\n`client.instanceTypes.list(cursor?: string, limit?: number): { chipset: string; created_at: string;
|
|
996
|
+
"## list\n\n`client.instanceTypes.list(cursor?: string, limit?: number): { chipset: string; created_at: string; family: string; memory_gb: number; name: string; region: region_name; series: string; updated_at: string; vcpu: number; }`\n\n**get** `/v1/instance_types`\n\nList instance types\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ chipset: string; created_at: string; family: string; memory_gb: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; series: string; updated_at: string; vcpu: number; }`\n Instance type.\n\n - `chipset: string`\n - `created_at: string`\n - `family: string`\n - `memory_gb: number`\n - `name: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `series: string`\n - `updated_at: string`\n - `vcpu: number`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const instanceType of client.instanceTypes.list()) {\n console.log(instanceType);\n}\n```",
|
|
997
997
|
perLanguage: {
|
|
998
998
|
cli: {
|
|
999
999
|
method: 'instance_types list',
|
|
@@ -2931,6 +2931,76 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2931
2931
|
},
|
|
2932
2932
|
},
|
|
2933
2933
|
},
|
|
2934
|
+
{
|
|
2935
|
+
name: 'get',
|
|
2936
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/persistent_volume_claims/{persistent_volume_claim_id}',
|
|
2937
|
+
httpMethod: 'get',
|
|
2938
|
+
summary: 'Get NKS Persistent Volume Claim Details',
|
|
2939
|
+
description: 'Get details about an NKS persistent volume claim',
|
|
2940
|
+
stainlessPath: '(resource) nks.clusters.persistent_volume_claims > (method) get',
|
|
2941
|
+
qualified: 'client.nks.clusters.persistentVolumeClaims.get',
|
|
2942
|
+
params: ['cluster_id: string;', 'persistent_volume_claim_id: string;'],
|
|
2943
|
+
response:
|
|
2944
|
+
"{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2945
|
+
markdown:
|
|
2946
|
+
"## get\n\n`client.nks.clusters.persistentVolumeClaims.get(cluster_id: string, persistent_volume_claim_id: string): { id: string; cluster_id: string; created_at: string; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims/{persistent_volume_claim_id}`\n\nGet details about an NKS persistent volume claim\n\n### Parameters\n\n- `cluster_id: string`\n\n- `persistent_volume_claim_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS persistent volume claim details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get('persistent_volume_claim_id', { cluster_id: 'cluster_id' });\n\nconsole.log(persistentVolumeClaim);\n```",
|
|
2947
|
+
perLanguage: {
|
|
2948
|
+
cli: {
|
|
2949
|
+
method: 'persistent_volume_claims get',
|
|
2950
|
+
example:
|
|
2951
|
+
"nirvana nks:clusters:persistent-volume-claims get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --persistent-volume-claim-id persistent_volume_claim_id",
|
|
2952
|
+
},
|
|
2953
|
+
go: {
|
|
2954
|
+
method: 'client.NKS.Clusters.PersistentVolumeClaims.Get',
|
|
2955
|
+
example:
|
|
2956
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpersistentVolumeClaim, err := client.NKS.Clusters.PersistentVolumeClaims.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"persistent_volume_claim_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", persistentVolumeClaim.ID)\n}\n',
|
|
2957
|
+
},
|
|
2958
|
+
http: {
|
|
2959
|
+
example:
|
|
2960
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims/$PERSISTENT_VOLUME_CLAIM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2961
|
+
},
|
|
2962
|
+
typescript: {
|
|
2963
|
+
method: 'client.nks.clusters.persistentVolumeClaims.get',
|
|
2964
|
+
example:
|
|
2965
|
+
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get(\n 'persistent_volume_claim_id',\n { cluster_id: 'cluster_id' },\n);\n\nconsole.log(persistentVolumeClaim.id);",
|
|
2966
|
+
},
|
|
2967
|
+
},
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
name: 'list',
|
|
2971
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/persistent_volume_claims',
|
|
2972
|
+
httpMethod: 'get',
|
|
2973
|
+
summary: 'List NKS Persistent Volume Claims',
|
|
2974
|
+
description: 'List all persistent volume claims in an NKS cluster',
|
|
2975
|
+
stainlessPath: '(resource) nks.clusters.persistent_volume_claims > (method) list',
|
|
2976
|
+
qualified: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
2977
|
+
params: ['cluster_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
2978
|
+
response:
|
|
2979
|
+
"{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2980
|
+
markdown:
|
|
2981
|
+
"## list\n\n`client.nks.clusters.persistentVolumeClaims.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims`\n\nList all persistent volume claims in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS persistent volume claim details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list('cluster_id')) {\n console.log(persistentVolumeClaim);\n}\n```",
|
|
2982
|
+
perLanguage: {
|
|
2983
|
+
cli: {
|
|
2984
|
+
method: 'persistent_volume_claims list',
|
|
2985
|
+
example:
|
|
2986
|
+
"nirvana nks:clusters:persistent-volume-claims list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2987
|
+
},
|
|
2988
|
+
go: {
|
|
2989
|
+
method: 'client.NKS.Clusters.PersistentVolumeClaims.List',
|
|
2990
|
+
example:
|
|
2991
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.PersistentVolumeClaims.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPersistentVolumeClaimListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2992
|
+
},
|
|
2993
|
+
http: {
|
|
2994
|
+
example:
|
|
2995
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2996
|
+
},
|
|
2997
|
+
typescript: {
|
|
2998
|
+
method: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
2999
|
+
example:
|
|
3000
|
+
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list(\n 'cluster_id',\n)) {\n console.log(persistentVolumeClaim.id);\n}",
|
|
3001
|
+
},
|
|
3002
|
+
},
|
|
3003
|
+
},
|
|
2934
3004
|
{
|
|
2935
3005
|
name: 'get',
|
|
2936
3006
|
endpoint: '/v1/nks/clusters/{cluster_id}/kubeconfig',
|
package/src/methods.ts
CHANGED
|
@@ -496,6 +496,18 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
496
496
|
httpMethod: 'patch',
|
|
497
497
|
httpPath: '/v1/nks/clusters/{cluster_id}/availability',
|
|
498
498
|
},
|
|
499
|
+
{
|
|
500
|
+
clientCallName: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
501
|
+
fullyQualifiedName: 'nks.clusters.persistentVolumeClaims.list',
|
|
502
|
+
httpMethod: 'get',
|
|
503
|
+
httpPath: '/v1/nks/clusters/{cluster_id}/persistent_volume_claims',
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
clientCallName: 'client.nks.clusters.persistentVolumeClaims.get',
|
|
507
|
+
fullyQualifiedName: 'nks.clusters.persistentVolumeClaims.get',
|
|
508
|
+
httpMethod: 'get',
|
|
509
|
+
httpPath: '/v1/nks/clusters/{cluster_id}/persistent_volume_claims/{persistent_volume_claim_id}',
|
|
510
|
+
},
|
|
499
511
|
{
|
|
500
512
|
clientCallName: 'client.nks.clusters.kubeconfig.get',
|
|
501
513
|
fullyQualifiedName: 'nks.clusters.kubeconfig.get',
|
package/src/server.ts
CHANGED