@cloudverse/gridx-mcp 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -13,3 +13,9 @@ Run:
13
13
  ```bash
14
14
  gridx-mcp --baseUrl http://127.0.0.1:4000 --key gx_sa_xxx
15
15
  ```
16
+
17
+ Example tools:
18
+
19
+ - `route_best_listing`
20
+ - `get_session`
21
+ - `execute_via_proxy`
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { homedir } from "node:os";
3
3
  import { resolve } from "node:path";
4
- import { GridxClient } from "@gridx/sdk";
4
+ import { GridxClient } from "@cloudverse/gridx-sdk";
5
5
  function parseArg(flag) {
6
6
  const index = process.argv.indexOf(flag);
7
7
  if (index === -1) {
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { homedir } from "node:os";
3
3
  import { resolve } from "node:path";
4
- import { GridxClient } from "@gridx/sdk";
4
+ import { GridxClient } from "@cloudverse/gridx-sdk";
5
5
  function parseArg(flag) {
6
6
  const index = process.argv.indexOf(flag);
7
7
  if (index === -1) {
@@ -13,7 +13,10 @@ export class GridxClient {
13
13
  serviceKey;
14
14
  constructor(options) {
15
15
  this.baseUrl = options.baseUrl.replace(/\/+$/, "");
16
- this.serviceKey = options.serviceKey;
16
+ this.serviceKey = options.serviceAccountKey ?? options.serviceKey ?? "";
17
+ if (!this.serviceKey) {
18
+ throw new GridxSdkError("A GridX service account key is required.", 401);
19
+ }
17
20
  }
18
21
  whoAmI() {
19
22
  return this.get("/v1/service-accounts/whoami");
@@ -30,6 +33,9 @@ export class GridxClient {
30
33
  getSession(sessionId) {
31
34
  return this.get(`/v1/sessions/${sessionId}`);
32
35
  }
36
+ getSessionTrace(sessionId) {
37
+ return this.get(`/v1/sessions/${sessionId}/trace`);
38
+ }
33
39
  listMarketplaceCandidates(filters) {
34
40
  return this.post("/v1/routes/candidates", filters ?? {});
35
41
  }
@@ -81,6 +87,9 @@ export class GridxClient {
81
87
  listWebhookEndpoints() {
82
88
  return this.get("/v1/webhooks");
83
89
  }
90
+ listWebhookDeliveries(webhookId) {
91
+ return this.get(`/v1/webhooks/${webhookId}/deliveries`);
92
+ }
84
93
  createWebhookEndpoint(body) {
85
94
  return this.post("/v1/webhooks", body);
86
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudverse/gridx-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "typecheck": "tsc -p tsconfig.json --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@gridx/sdk": "workspace:*"
24
+ "@cloudverse/gridx-sdk": "^0.1.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "tsx": "^4.20.5"