@superblocksteam/gateway 2.0.157-next.5 → 2.0.157
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 +3 -30
- package/dist/capabilities/lifecycle.d.ts +1 -12
- package/dist/capabilities/lifecycle.js +51 -99
- package/dist/capabilities/lifecycle.js.map +1 -1
- package/dist/capabilities/types.d.ts +0 -5
- package/dist/capabilities/types.js.map +1 -1
- package/dist/deps.d.ts +0 -2
- package/dist/integrations/map.d.ts +0 -1
- package/dist/integrations/map.js +1 -1
- package/dist/integrations/map.js.map +1 -1
- package/dist/sabs/editor-client-methods.js +5 -4
- package/dist/sabs/editor-client-methods.js.map +1 -1
- package/dist/sabs/session-peer.d.ts +0 -4
- package/dist/sabs/websocket-session-peer.d.ts +1 -2
- package/dist/sabs/websocket-session-peer.js +11 -21
- package/dist/sabs/websocket-session-peer.js.map +1 -1
- package/dist/server/client.d.ts +4 -10
- package/dist/server/client.js +4 -13
- package/dist/server/client.js.map +1 -1
- package/dist/start.d.ts +0 -10
- package/dist/start.js +2 -5
- package/dist/start.js.map +1 -1
- package/dist/transports/mcp/admin-tools.d.ts +1 -3
- package/dist/transports/mcp/admin-tools.js +1 -12
- package/dist/transports/mcp/admin-tools.js.map +1 -1
- package/dist/transports/mcp/app-status-html.d.ts +2 -2
- package/dist/transports/mcp/app-status-html.js +8 -139
- package/dist/transports/mcp/app-status-html.js.map +1 -1
- package/dist/transports/mcp/mount.js +24 -89
- package/dist/transports/mcp/mount.js.map +1 -1
- package/package.json +4 -5
- package/dist/capabilities/integration-metadata.d.ts +0 -28
- package/dist/capabilities/integration-metadata.js +0 -174
- package/dist/capabilities/integration-metadata.js.map +0 -1
- package/dist/telemetry/mcp-client.d.ts +0 -22
- package/dist/telemetry/mcp-client.js +0 -129
- package/dist/telemetry/mcp-client.js.map +0 -1
- package/dist/telemetry/runtime.d.ts +0 -9
- package/dist/telemetry/runtime.js +0 -121
- package/dist/telemetry/runtime.js.map +0 -1
|
@@ -3,7 +3,6 @@ import { registerAppResource, registerAppTool, RESOURCE_MIME_TYPE, } from "@mode
|
|
|
3
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
4
|
import { ElicitResultSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import { getIntegrationMetadata } from "../../capabilities/integration-metadata.js";
|
|
7
6
|
import { checkAppProgress, editApp, getApp, importApp, previewApp, publishApp, startApp, } from "../../capabilities/lifecycle.js";
|
|
8
7
|
import { IMPORT_ZIP_BASE64_MAX_CHARS } from "../../capabilities/types.js";
|
|
9
8
|
import { BROWSER_DRIVER_INSTRUCTIONS } from "../../capture/browser-instructions.js";
|
|
@@ -17,24 +16,6 @@ import { APP_STATUS_HTML, APP_STATUS_RESOURCE_URI } from "./app-status-html.js";
|
|
|
17
16
|
import { clientSupportsFormElicitation, pendingDecision, resolveDecisionByElicitation, } from "./decision-elicitation.js";
|
|
18
17
|
import { formatMcpToolContent } from "./format-tool-content.js";
|
|
19
18
|
import { createProgressNotifier } from "./progress-notifier.js";
|
|
20
|
-
const DESTRUCTIVE_TOOL_ANNOTATIONS = {
|
|
21
|
-
destructiveHint: true,
|
|
22
|
-
idempotentHint: false,
|
|
23
|
-
openWorldHint: true,
|
|
24
|
-
readOnlyHint: false,
|
|
25
|
-
};
|
|
26
|
-
const NON_DESTRUCTIVE_WRITE_TOOL_ANNOTATIONS = {
|
|
27
|
-
destructiveHint: false,
|
|
28
|
-
idempotentHint: false,
|
|
29
|
-
openWorldHint: true,
|
|
30
|
-
readOnlyHint: false,
|
|
31
|
-
};
|
|
32
|
-
const READ_ONLY_TOOL_ANNOTATIONS = {
|
|
33
|
-
destructiveHint: false,
|
|
34
|
-
idempotentHint: true,
|
|
35
|
-
openWorldHint: true,
|
|
36
|
-
readOnlyHint: true,
|
|
37
|
-
};
|
|
38
19
|
/**
|
|
39
20
|
* Optional composite progress cursor a host may hand back on
|
|
40
21
|
* `check_app_progress`.
|
|
@@ -95,11 +76,10 @@ Name the builder "Superblocks" in every word you write. Users sometimes call it
|
|
|
95
76
|
Use these tools whenever the user asks to build, change, import, or ship an app, whichever of those names they reach for.
|
|
96
77
|
|
|
97
78
|
- start_app: create a new application and hand a prompt to Superblocks. Returns as soon as Superblocks accepts, with status "building". Superblocks names it unless a name is given.
|
|
98
|
-
- import_app: import an existing app from a ZIP (or .tgz/.gz) into Superblocks and start a Superblocks migration. Pass the archive's file name as zipPath — the gateway opens the file on this machine itself. Archives larger than 1 MB are rejected — they almost certainly include node_modules; re-export without install artifacts. Optional prompt carries extra intent (e.g. "make it more secure"). Returns like start_app with status "building".
|
|
79
|
+
- import_app: import an existing app from a ZIP (or .tgz/.gz) into Superblocks and start a Superblocks migration. Pass the archive's file name as zipPath — the gateway opens the file on this machine itself. Archives larger than 1 MB are rejected — they almost certainly include node_modules; re-export without install artifacts. Optional prompt carries extra intent (e.g. "make it more secure"). Returns like start_app with status "building".
|
|
99
80
|
- edit_app: send a follow-up prompt (including the answer when Superblocks asked a question) for an existing application. Also returns at status "building". Defaults to the most recent app, so an applicationId is only needed to target a different app.
|
|
100
81
|
- check_app_progress: wait for the next thing Superblocks does and return it. It returns the moment Superblocks says anything, and after ~10 seconds of silence at the latest. "activity" holds Superblocks' own words since the previous call, in order; a quiet poll still returns a short heartbeat with elapsedSeconds.
|
|
101
|
-
- get_app: return editor and preview URLs for the recent or specified app (builds a private preview when needed). Prefer this after status "ready" so the user can open the live app. Hosts that support MCP Apps show the status card (Open editor / Open preview) on this call — not on check_app_progress or preview_app — so only one card opens. When Superblocks has written code the tool includes a screenshot: the live Vite canvas (library peer) if a held session exists, otherwise the signed-in preview. Never open canvas.doNotOpen (the edit URL) to take that screenshot. It refuses to build a preview of an app Superblocks has not written yet: while a plan or question is outstanding it returns status "needs_decision" with "pendingAction", while a turn is running it returns status "building", and when the last turn ended without writing anything it returns that turn's status ("timeout", "live_edit_terminated", "no_changes" or "cancelled") with pendingAction "retry_build"
|
|
102
|
-
- get_integration_metadata: inspect the tables, columns, and types in a connected integration. It needs no application and never executes an integration action, so do not call start_app or hunt through list_applications to satisfy it. Pass applicationId only for an integration that belongs to one application, such as a Native DB. Use search, limit, and offset to page large results. get_integration_config_schema is the JSON form for create_integration; it does not inspect connected data.
|
|
82
|
+
- get_app: return editor and preview URLs for the recent or specified app (builds a private preview when needed). Prefer this after status "ready" so the user can open the live app. Hosts that support MCP Apps show the status card (Open editor / Open preview) on this call — not on check_app_progress or preview_app — so only one card opens. When Superblocks has written code the tool includes a screenshot: the live Vite canvas (library peer) if a held session exists, otherwise the signed-in preview. Never open canvas.doNotOpen (the edit URL) to take that screenshot. It refuses to build a preview of an app Superblocks has not written yet: while a plan or question is outstanding it returns status "needs_decision" with "pendingAction", while a turn is running it returns status "building", and when the last turn ended without writing anything it returns that turn's status ("timeout", "live_edit_terminated", "no_changes" or "cancelled") with pendingAction "retry_build". In each case there are no preview URLs and no screenshot — do the pendingAction first rather than calling get_app again.
|
|
103
83
|
- preview_app: build the application's current work and return a URL that runs it, without deploying it — the editor's Preview button. Nobody else can reach a preview. Text/markdown only (no MCP Apps widget); use get_app instead when you want the status card.
|
|
104
84
|
- publish_app: deploy an application and wait until it is live. It commits the current work first, so a commitId is only needed to publish an earlier commit.
|
|
105
85
|
|
|
@@ -107,25 +87,21 @@ A build takes two to four minutes, and start_app/edit_app/import_app return with
|
|
|
107
87
|
|
|
108
88
|
The user sees nothing at all while a tool call is outstanding, so between two calls always write out the new "activity" lines as a short message in your own reply — quote or paraphrase them, oldest first, before calling check_app_progress again. Do not batch them up for a summary at the end, and do not go two calls in a row without writing something: the point of the loop is that the user watches the build happen. When a call comes back with only a heartbeat (no new Superblocks words), say Superblocks is still working and how long it has been going, then poll again.
|
|
109
89
|
|
|
110
|
-
status "ready" means the turn finished: report the "reply" field, then call get_app (not preview_app as well — calling both used to open two widgets) so the user gets Open preview / an https link or a screenshot. status "needs_decision" means Superblocks is waiting — often with a plan — so stop polling and put the decision to the user. When "decision.kind" is "plan", show the plan markdown, then invite them to build it as written or say what to change — the same fork the editor's Build-it button offers. Ask that as an ordinary closing question in your own words; do not turn it into a numbered or bulleted menu, and do not wrap the choices in quotation marks. When they say "Build it", "approve", "looks good", or "go ahead", you MUST call edit_app with planAction "approve" and omit prompt (do not re-send the plan, and do not put "approve" or "Build it" in the prompt field — that is refine feedback to Superblocks, not the editor Build-it path). When they want changes, call edit_app with planAction "refine" and their feedback as prompt. When "decision.kind" is "multi_choice", relay the question and options and send their answer with edit_app. Do not claim the app is built while status is "needs_decision". status "no_changes" means the Superblocks job ended without building anything: relay reply, say no app was built, and do not present the edit URL as a finished app. status "live_edit_terminated" means the live-edit session that was to run the turn died before it built anything, or never opened at all — relay reply, tell the user the session did not survive, and
|
|
111
|
-
|
|
112
|
-
When get_app returns a screenshot, inspect it yourself before reporting that the app looks correct. If it shows skeletons, spinners, empty tables or charts, or "Loading...", call get_app again a few seconds later instead of treating that as a defect. If it shows a problem the user would plainly recognize as wrong, call edit_app once with a concrete correction, follow that turn to completion, and inspect the next get_app screenshot. Otherwise describe what you see and ask the user whether to fix it.
|
|
90
|
+
status "ready" means the turn finished: report the "reply" field, then call get_app (not preview_app as well — calling both used to open two widgets) so the user gets Open preview / an https link or a screenshot. status "needs_decision" means Superblocks is waiting — often with a plan — so stop polling and put the decision to the user. When "decision.kind" is "plan", show the plan markdown, then invite them to build it as written or say what to change — the same fork the editor's Build-it button offers. Ask that as an ordinary closing question in your own words; do not turn it into a numbered or bulleted menu, and do not wrap the choices in quotation marks. When they say "Build it", "approve", "looks good", or "go ahead", you MUST call edit_app with planAction "approve" and omit prompt (do not re-send the plan, and do not put "approve" or "Build it" in the prompt field — that is refine feedback to Superblocks, not the editor Build-it path). When they want changes, call edit_app with planAction "refine" and their feedback as prompt. When "decision.kind" is "multi_choice", relay the question and options and send their answer with edit_app. Do not claim the app is built while status is "needs_decision". status "no_changes" means the Superblocks job ended without building anything: relay reply, say no app was built, and do not present the edit URL as a finished app. status "live_edit_terminated" means the live-edit session that was to run the turn died before it built anything, or never opened at all — the prompt was fine and nothing timed out, so relay reply, tell the user the session did not survive, and offer to send the same instruction again with edit_app. status "detached" means Superblocks is still working but the gateway can no longer see it — usually because the app is open in a browser editor, which takes over Superblocks updates. Stop polling, say so, and point the user at the edit URL. status "unknown" means nothing is in flight for that app. A checkpointCommitId means Superblocks work is saved and the edit URL opens the finished app; when viewStatus is unknown, say the app may still be finishing in the editor.
|
|
113
91
|
|
|
114
92
|
start_app, edit_app, and import_app default to Plan mode (Superblocks proposes a plan before writing). Pass mode "BUILD" only when the user asks to skip planning and build immediately. Approving a plan after start_app or import_app is always a follow-up edit_app with planAction "approve" — never a second start_app/import_app with prompt "approve". Once the app has run in Build mode, later edit_app calls stay in Build mode on their own: you do not need to re-send mode "BUILD", and a new instruction is not a fresh planning round. Send mode "PLAN" only when the user explicitly asks to plan again before building. Every start_app / edit_app / import_app result reports the "mode" the turn ran in, so you can tell the user whether Superblocks is planning or building rather than guessing — and if a result comes back "PLAN" after a long gap, the build session was recycled rather than the user asking to plan, so pass mode "BUILD" again to carry on building. editUrl / previewUrl / publishUrl may appear in structured JSON for openLink buttons — do not dump raw URLs (especially preview JWTs) into the chat. Prefer the MCP Apps Open editor / Open preview buttons from get_app. Claude Desktop can only openLink https URLs; when previewUrl is http, say so briefly and rely on any screenshot image the tool returned rather than pasting the URL.
|
|
115
93
|
|
|
116
94
|
Once a build reaches "ready", call get_app so the user can open the app, then offer publish_app to deploy for their organization when they ask. Prefer get_app over preview_app after a build — get_app already ensures a private preview and is the only tool that opens the MCP Apps status card. Only publish when the user asks. If preview_app or get_app comes back with status "building", the URL is already correct; tell the user it is still building and call again to check.
|
|
117
95
|
|
|
118
|
-
There is nothing to preview until Superblocks has written code, so get_app is not the way out of a plan, a question, or a turn that failed. When it answers status "needs_decision" (pendingAction "approve_plan" or "answer_question"), the app is still the empty starter template: put the decision to the user, send their answer with edit_app, and only call get_app once a turn has finished. When it answers "timeout", "live_edit_terminated", "no_changes" or "cancelled" with pendingAction "retry_build", that turn built nothing: tell the user so plainly, and send the instruction again with edit_app if they want to retry.
|
|
96
|
+
There is nothing to preview until Superblocks has written code, so get_app is not the way out of a plan, a question, or a turn that failed. When it answers status "needs_decision" (pendingAction "approve_plan" or "answer_question"), the app is still the empty starter template: put the decision to the user, send their answer with edit_app, and only call get_app once a turn has finished. When it answers "timeout", "live_edit_terminated", "no_changes" or "cancelled" with pendingAction "retry_build", that turn built nothing: tell the user so plainly, and send the instruction again with edit_app if they want to retry. Repeating get_app instead opens another status card and tells the user nothing new.
|
|
119
97
|
|
|
120
98
|
Superblocks tests what it builds: it opens the app in a browser and runs its APIs, and the test run arrives as ordinary "activity" lines ("Testing the orders page", "Test passed: …", "Tests failed: …"). Relay those lines like any other activity, and say which cases passed and which failed — a test run is the only evidence the user has that the app actually works. A failing test is a build signal, not an auth problem: it means the app has a bug Superblocks is about to work on, so keep polling and never tell the user to sign in again or re-enter credentials over one.
|
|
121
99
|
|
|
122
|
-
A failed call still names the application it was working on. start_app and import_app create the application before the build can start, so an error from either one leaves an application that exists and belongs to this conversation, and the error says which: read the "applicationId" field, never a UUID out of the message text. Never take an error to mean nothing happened. Do not answer a failed start_app with a second start_app — that abandons the app you already have and creates a duplicate. When the error carries pendingAction "retry_build" — a "live_edit_unavailable" session that would not open, or a turn that ran out of budget — send the same prompt again with edit_app and that applicationId.
|
|
123
|
-
|
|
124
|
-
A cancelled call does not stop the build, and it is not permission to start over. Cancelling only ends the waiting — Superblocks carries on, and the "cancelled" error names the application it was driving in "applicationId". Read that id, call check_app_progress or get_app on it, and act on what comes back. When the user then asks to redo, retry, or resume an import, that is a request to finish the application you already have: never answer it with an import_app that omits applicationId, which builds a second app and strands the first. The same holds when no pendingAction is in front of you — after a cancel, or in a later session. If the app came from an import, the way back in is import_app with the same archive and that applicationId; if you cannot tell which application the user means, ask rather than create one.
|
|
100
|
+
A failed call still names the application it was working on. start_app and import_app create the application before the build can start, so an error from either one leaves an application that exists and belongs to this conversation, and the error says which: read the "applicationId" field, never a UUID out of the message text. Never take an error to mean nothing happened. Do not answer a failed start_app with a second start_app — that abandons the app you already have and creates a duplicate. When the error carries pendingAction "retry_build" — a "live_edit_unavailable" session that would not open, or a turn that ran out of budget — send the same prompt again with edit_app and that applicationId. A failed import_app carries no such recovery, because edit_app cannot resupply the archive the migration prompt reads: that application is empty and nothing can continue it in place, so name it to the user and let them decide whether to import again. Every edit_app error names its applicationId too, which is the one place to see which app a call that omitted the id actually ran on.
|
|
125
101
|
|
|
126
102
|
Prompts are forwarded to Superblocks verbatim — pass the user's wording rather than a summary.
|
|
127
103
|
|
|
128
|
-
This connector is the single Superblocks MCP: Builder tools (start_app, import_app, edit_app, check_app_progress, get_app,
|
|
104
|
+
This connector is the single Superblocks MCP: Builder tools (start_app, import_app, edit_app, check_app_progress, get_app, preview_app, publish_app) and Admin tools (integrations, apps, users, folders, deploy_application, and the rest of the customer Admin surface) share this endpoint. Prefer create_integration / update_integration / list_integrations here when Superblocks needs a missing Postgres, REST, or other datasource — do not send the user to a second MCP. create_integration is Admin CRUD for org datasources; start_app creates a new application and hands a prompt to Superblocks. deploy_application is Admin deploy of an existing commit; publish_app is the Builder path that commits current work and waits until the app is live. Omit base_url on Admin tools unless targeting a different control plane — the gateway injects its configured Server URL. checkout_application is not exposed on this network surface (host filesystem writes); use the CLI/workspace checkout path instead.
|
|
129
105
|
|
|
130
106
|
This connection is already authenticated and already pointed at one Superblocks Server, so there is no setup, login, or auth-status call to make first. Call the tool that does the job — list_integrations to see the org's datasources, start_app to create an application — and read its error if something is genuinely wrong. Do not look for a tool that reports credentials or environments; there is none, and asking for one costs the user a turn.
|
|
131
107
|
|
|
@@ -151,9 +127,6 @@ export function createMcpServer(deps) {
|
|
|
151
127
|
progress.push(event);
|
|
152
128
|
notify?.(event.message);
|
|
153
129
|
},
|
|
154
|
-
onPrincipalResolved: (principal) => {
|
|
155
|
-
deps.mcpTelemetry?.setOrganizationId(principal.organizationId);
|
|
156
|
-
},
|
|
157
130
|
principal: principalFrom(deps),
|
|
158
131
|
progressCursors: deps.progressCursors,
|
|
159
132
|
recentApps: deps.recentApps,
|
|
@@ -172,18 +145,19 @@ export function createMcpServer(deps) {
|
|
|
172
145
|
gatewayDebugStack("tool started", { "tool.name": toolName });
|
|
173
146
|
const progress = [];
|
|
174
147
|
const notify = createProgressNotifier(extra);
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
148
|
+
let result;
|
|
149
|
+
if (!deps.cliApiKey) {
|
|
150
|
+
gatewayDebug("tool short-circuited", {
|
|
151
|
+
"tool.name": toolName,
|
|
152
|
+
"tool.reason": "missing_cli_session",
|
|
153
|
+
});
|
|
154
|
+
result = {
|
|
155
|
+
kind: "error",
|
|
156
|
+
code: "unauthenticated",
|
|
157
|
+
message: "This Gateway has no CLI session. Run: superblocks login",
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
187
161
|
try {
|
|
188
162
|
// The SDK aborts this on `notifications/cancelled` and on a dropped
|
|
189
163
|
// connection. Handing it to the capability is what turns "the host
|
|
@@ -191,7 +165,7 @@ export function createMcpServer(deps) {
|
|
|
191
165
|
// and a waiter running for an answer nobody will read.
|
|
192
166
|
const signal = extra?.signal;
|
|
193
167
|
const capabilityContext = await context(progress, notify, signal);
|
|
194
|
-
|
|
168
|
+
result = await capability(capabilityContext, () => {
|
|
195
169
|
for (let index = progress.length - 1; index >= 0; index -= 1) {
|
|
196
170
|
if (progress[index]?.type === "completed") {
|
|
197
171
|
progress.splice(index, 1);
|
|
@@ -201,7 +175,7 @@ export function createMcpServer(deps) {
|
|
|
201
175
|
}
|
|
202
176
|
catch (error) {
|
|
203
177
|
console.error("gateway capability failed", error);
|
|
204
|
-
|
|
178
|
+
result = {
|
|
205
179
|
kind: "error",
|
|
206
180
|
code: "capability_failed",
|
|
207
181
|
message: error instanceof Error
|
|
@@ -209,21 +183,7 @@ export function createMcpServer(deps) {
|
|
|
209
183
|
: "The gateway failed for an unknown reason.",
|
|
210
184
|
};
|
|
211
185
|
}
|
|
212
|
-
}
|
|
213
|
-
const client = server.server.getClientVersion();
|
|
214
|
-
const result = deps.mcpTelemetry
|
|
215
|
-
? await deps.mcpTelemetry.runTool({
|
|
216
|
-
...(client
|
|
217
|
-
? {
|
|
218
|
-
client: {
|
|
219
|
-
name: client.name,
|
|
220
|
-
version: client.version,
|
|
221
|
-
},
|
|
222
|
-
}
|
|
223
|
-
: {}),
|
|
224
|
-
toolName,
|
|
225
|
-
}, execute)
|
|
226
|
-
: await execute();
|
|
186
|
+
}
|
|
227
187
|
const resultStatus = result.kind === "ok" &&
|
|
228
188
|
result.value &&
|
|
229
189
|
typeof result.value === "object" &&
|
|
@@ -334,24 +294,7 @@ export function createMcpServer(deps) {
|
|
|
334
294
|
});
|
|
335
295
|
}
|
|
336
296
|
function registerBuilderTools() {
|
|
337
|
-
server.registerTool("get_integration_metadata", {
|
|
338
|
-
annotations: READ_ONLY_TOOL_ANNOTATIONS,
|
|
339
|
-
description: "Inspect the tables, columns, and types in a connected Superblocks integration. Needs no application and never executes an integration action. Pass integrationId, which list_integrations returns. A large result comes back paged: narrow it with search, take more or fewer entries with limit, and continue from nextOffset with offset. Requires build permission on the integration. Do not use this to learn how to create an integration; that is get_integration_config_schema.",
|
|
340
|
-
inputSchema: {
|
|
341
|
-
applicationId: z
|
|
342
|
-
.string()
|
|
343
|
-
.uuid()
|
|
344
|
-
.optional()
|
|
345
|
-
.describe("Only for an integration owned by a single application, such as a Native DB. Leave unset otherwise; do not go looking for an application to supply."),
|
|
346
|
-
integrationId: z.string().uuid(),
|
|
347
|
-
limit: z.number().int().min(1).max(200).optional(),
|
|
348
|
-
offset: z.number().int().min(0).optional(),
|
|
349
|
-
search: z.string().min(1).optional(),
|
|
350
|
-
},
|
|
351
|
-
title: "Get Integration Metadata",
|
|
352
|
-
}, async (input, extra) => run("get_integration_metadata", (context) => getIntegrationMetadata(context, input), extra));
|
|
353
297
|
server.registerTool("start_app", {
|
|
354
|
-
annotations: NON_DESTRUCTIVE_WRITE_TOOL_ANNOTATIONS,
|
|
355
298
|
description: 'Create a Superblocks application and hand a prompt to Superblocks in Plan mode by default. Returns as soon as Superblocks accepts, with status "building" and an edit URL; follow with check_app_progress until status is no longer "building". When Superblocks returns needs_decision with a plan and the user says "Build it", call edit_app with planAction "approve" (omit prompt) — do not call start_app again with prompt "approve". Pass mode "BUILD" to skip planning. Superblocks names the application unless name is given. An error from this tool does not mean nothing happened: the application is created before the build starts, so the error names it in "applicationId". Retry that app with edit_app rather than calling start_app another time, which would leave the first one abandoned.',
|
|
356
299
|
inputSchema: {
|
|
357
300
|
branch: z.string().optional(),
|
|
@@ -376,10 +319,8 @@ export function createMcpServer(deps) {
|
|
|
376
319
|
wait: "ack",
|
|
377
320
|
}), extra));
|
|
378
321
|
server.registerTool("import_app", {
|
|
379
|
-
|
|
380
|
-
description: 'Import an existing app from a ZIP/.tgz/.gz archive into Superblocks and start a Superblocks migration. Pass the archive\'s file name (or its full path on this machine) as zipPath: the gateway reads the file itself, so a path from your own sandbox is fine as long as the name matches the file the user has. Never encode the archive as base64 — zipBase64 only carries test fixtures. Archives larger than 1 MB are rejected — exclude node_modules. Optional prompt adds intent such as hardening security. Returns status "building"; follow with check_app_progress. Defaults to Plan mode — when Superblocks returns a plan and the user says "Build it", call edit_app with planAction "approve" (omit prompt); do not call import_app again with prompt "approve". An error from this tool does not mean nothing happened: the application is created before the migration starts, so the error names it in "applicationId". When it returns pendingAction "retry_import", call import_app again with the same archive and applicationId to resume that application instead of creating another one.',
|
|
322
|
+
description: 'Import an existing app from a ZIP/.tgz/.gz archive into Superblocks and start a Superblocks migration. Pass the archive\'s file name (or its full path on this machine) as zipPath: the gateway reads the file itself, so a path from your own sandbox is fine as long as the name matches the file the user has. Never encode the archive as base64 — zipBase64 only carries test fixtures. Archives larger than 1 MB are rejected — exclude node_modules. Optional prompt adds intent such as hardening security. Returns status "building"; follow with check_app_progress. Defaults to Plan mode — when Superblocks returns a plan and the user says "Build it", call edit_app with planAction "approve" (omit prompt); do not call import_app again with prompt "approve". An error from this tool does not mean nothing happened: the application is created before the migration starts, so the error names it in "applicationId". That application is empty — the migration never ran — and nothing can continue it in place, so say it exists and let the user decide whether to import again rather than silently retrying.',
|
|
381
323
|
inputSchema: {
|
|
382
|
-
applicationId: z.string().uuid().optional(),
|
|
383
324
|
branch: z.string().optional(),
|
|
384
325
|
idempotencyKey: z.string().optional(),
|
|
385
326
|
mode: z.enum(["BUILD", "PLAN"]).optional(),
|
|
@@ -405,8 +346,7 @@ export function createMcpServer(deps) {
|
|
|
405
346
|
zipPath: z.string().min(1).optional(),
|
|
406
347
|
},
|
|
407
348
|
title: "Import App",
|
|
408
|
-
}, async ({
|
|
409
|
-
applicationId,
|
|
349
|
+
}, async ({ branch, idempotencyKey, mode, name, prompt, source, zipBase64, zipPath, }, extra) => run("import_app", (context) => importApp(context, {
|
|
410
350
|
branch,
|
|
411
351
|
idempotencyKey: idempotencyKey ?? `mcp-import:${randomUUID()}`,
|
|
412
352
|
mode,
|
|
@@ -418,7 +358,6 @@ export function createMcpServer(deps) {
|
|
|
418
358
|
zipPath,
|
|
419
359
|
}), extra));
|
|
420
360
|
server.registerTool("edit_app", {
|
|
421
|
-
annotations: DESTRUCTIVE_TOOL_ANNOTATIONS,
|
|
422
361
|
description: 'Forward a prompt to Superblocks for the recent or specified application. Defaults to Plan mode until the app has run in Build mode; after that later edits keep building directly — you do not need to pass mode again. Pass mode "PLAN" only when the user explicitly asks to plan before building. The result reports the "mode" the turn ran in; a "PLAN" result after a long gap means the build session was recycled, so pass mode "BUILD" again rather than treating it as a new planning round. When status was needs_decision with a plan and the user says "Build it" / approve / go ahead, call edit_app with planAction "approve" and omit prompt — do not put "approve" or "Build it" in prompt (that is refine feedback, not the Build-it path). Use planAction "refine" with their feedback as prompt to change the plan. Also use edit_app to answer multi_choice questions. Returns status "building"; follow with check_app_progress.',
|
|
423
362
|
inputSchema: {
|
|
424
363
|
applicationId: z.string().uuid().optional(),
|
|
@@ -439,7 +378,6 @@ export function createMcpServer(deps) {
|
|
|
439
378
|
wait: "ack",
|
|
440
379
|
}), extra));
|
|
441
380
|
server.registerTool("check_app_progress", {
|
|
442
|
-
annotations: NON_DESTRUCTIVE_WRITE_TOOL_ANNOTATIONS,
|
|
443
381
|
description: 'Wait for the next thing Superblocks does on the recent or specified application and return it: "activity" carries Superblocks\' words since the previous call (or a short heartbeat when Superblocks is quiet), and status is "building" while the app is still being generated. Returns as soon as Superblocks says anything, and after ~10 seconds of silence at the latest. Call within about 10 seconds of start_app, import_app, or edit_app so a plan or question surfaces quickly. Once the plan is approved and Superblocks is building, space later polls about 30 seconds apart (honor "nextPollAfterMs" when present) until status is no longer "building" — a 10-second cadence on a multi-minute build burns through the host\'s tool-call budget. Relay each new activity line to the user between calls. When status becomes "needs_decision", stop polling and put the decision to the user — for a plan, show it and ask whether to build it or say what to change; for multi_choice, relay the question and options. Hosts that support form elicitation get a native picker instead, and this tool then returns the answered turn. When status becomes "ready", follow with get_app so the user can open the preview. Progress is text-only (no MCP Apps widget) so each poll does not reopen a blank card. Optional "cursor" from a prior result resumes from that composite position (per producer, no global sequence); omit it to use the gateway\'s stored place for this caller.',
|
|
444
382
|
inputSchema: {
|
|
445
383
|
applicationId: z.string().uuid().optional(),
|
|
@@ -460,7 +398,6 @@ export function createMcpServer(deps) {
|
|
|
460
398
|
}, extra, forgetFinishedTurn);
|
|
461
399
|
}, extra));
|
|
462
400
|
registerAppTool(server, "get_app", {
|
|
463
|
-
annotations: READ_ONLY_TOOL_ANNOTATIONS,
|
|
464
401
|
description: 'Return editor and preview URLs for the recent or specified Superblocks application. Ensures a private preview build by default (same as preview_app), but only once Superblocks has something to show: while a plan or question is outstanding it returns status "needs_decision" with the "decision" and a "pendingAction" of "approve_plan" or "answer_question", while a turn is running it returns status "building", and when the last turn ended without writing anything it returns "timeout", "live_edit_terminated", "no_changes" or "cancelled" with pendingAction "retry_build" — no preview URLs and no screenshot in any of those cases, because the app is still the empty starter template. Act on "pendingAction" through edit_app instead of calling this again. Prefer this after check_app_progress reaches status "ready". Also the right call when you do not know where a build stands — after a reconnect, when no turn of yours is running, or when the conversation moved to another channel: pass wait false and read "status" and "cursor" from the result rather than guessing. Hosts that support MCP Apps show Open editor / Open preview buttons. When Superblocks has written code the result includes a screenshot of the live Vite canvas if a held session exists, otherwise the signed-in preview — never the edit URL.',
|
|
465
402
|
inputSchema: {
|
|
466
403
|
applicationId: z.string().uuid().optional(),
|
|
@@ -477,7 +414,6 @@ export function createMcpServer(deps) {
|
|
|
477
414
|
},
|
|
478
415
|
}, async ({ applicationId, branch, ensurePreview, wait }, extra) => run("get_app", (context) => getApp(context, { applicationId, branch, ensurePreview, wait }), extra));
|
|
479
416
|
server.registerTool("preview_app", {
|
|
480
|
-
annotations: READ_ONLY_TOOL_ANNOTATIONS,
|
|
481
417
|
description: 'Build the recent or specified Superblocks application\'s current work and return a URL that runs it, without deploying it — the same thing the editor\'s Preview button does. Only the user can open it. Status "ready" means the URL works now; "building" means the build is still running and calling again resumes watching it. Prefer get_app when you want the MCP Apps status card (Open editor / Open preview); this tool returns the same URLs as text/markdown without opening a second widget.',
|
|
482
418
|
inputSchema: {
|
|
483
419
|
applicationId: z.string().uuid().optional(),
|
|
@@ -503,7 +439,6 @@ export function createMcpServer(deps) {
|
|
|
503
439
|
],
|
|
504
440
|
}));
|
|
505
441
|
server.registerTool("publish_app", {
|
|
506
|
-
annotations: DESTRUCTIVE_TOOL_ANNOTATIONS,
|
|
507
442
|
description: "Publish/deploy the recent or specified Superblocks application and wait until it is live. Commits the application's current work first, so commitId is only needed to publish an earlier commit.",
|
|
508
443
|
inputSchema: {
|
|
509
444
|
applicationId: z.string().uuid().optional(),
|
|
@@ -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,eAAe,UAAU,EAAE,EAAE;YAC/D,MAAM;SACP,CAAC,EACJ,KAAK,CACN,CACJ,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,sEAAsE;IACtE,gEAAgE;IAChE,kBAAkB,CAAC,MAAM,EAAE;QACzB,MAAM,EAAE,IAAI,CAAC,SAAS;QACtB,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc;QAC1C,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS;KACjC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/gateway",
|
|
3
|
-
"version": "2.0.157
|
|
3
|
+
"version": "2.0.157",
|
|
4
4
|
"description": "Gateway v0 — MCP entry for app start/edit/publish",
|
|
5
5
|
"license": "Superblocks Community Software License",
|
|
6
6
|
"bin": {
|
|
@@ -25,10 +25,9 @@
|
|
|
25
25
|
"playwright": "1.56.0",
|
|
26
26
|
"ws": "8.21.0",
|
|
27
27
|
"zod": "^4.3.6",
|
|
28
|
-
"@superblocksteam/
|
|
29
|
-
"@superblocksteam/
|
|
30
|
-
"@superblocksteam/
|
|
31
|
-
"@superblocksteam/telemetry": "2.0.157-next.5"
|
|
28
|
+
"@superblocksteam/shared": "0.9608.5",
|
|
29
|
+
"@superblocksteam/library-shared": "2.0.157",
|
|
30
|
+
"@superblocksteam/mcp-server": "2.0.157"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@eslint/js": "^9.39.2",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type CapabilityContext } from "./lifecycle.js";
|
|
2
|
-
import type { CapabilityResult } from "./types.js";
|
|
3
|
-
export type GetIntegrationMetadataInput = {
|
|
4
|
-
applicationId?: string;
|
|
5
|
-
integrationId: string;
|
|
6
|
-
limit?: number;
|
|
7
|
-
offset?: number;
|
|
8
|
-
search?: string;
|
|
9
|
-
};
|
|
10
|
-
type MetadataEntry = {
|
|
11
|
-
path: string;
|
|
12
|
-
value: boolean | null | number | string;
|
|
13
|
-
};
|
|
14
|
-
export type GetIntegrationMetadataResult = {
|
|
15
|
-
/** Absent when the metadata was read through an integration-scoped token. */
|
|
16
|
-
applicationId?: string;
|
|
17
|
-
entries: MetadataEntry[];
|
|
18
|
-
hasMore: boolean;
|
|
19
|
-
integrationId: string;
|
|
20
|
-
integrationName: string;
|
|
21
|
-
nextOffset: number | null;
|
|
22
|
-
offset: number;
|
|
23
|
-
pluginId: string;
|
|
24
|
-
returnedCount: number;
|
|
25
|
-
totalCount: number;
|
|
26
|
-
};
|
|
27
|
-
export declare function getIntegrationMetadata(context: CapabilityContext, input: GetIntegrationMetadataInput): Promise<CapabilityResult<GetIntegrationMetadataResult>>;
|
|
28
|
-
export {};
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { pickOrchestratorBaseUrl } from "../agents/resolve-orchestrator-url.js";
|
|
2
|
-
import { integrationIsToolSupported } from "../integrations/filters.js";
|
|
3
|
-
import { hasBuildPermission } from "../integrations/map.js";
|
|
4
|
-
import { pickEditorProfileKey } from "../integrations/profile-key.js";
|
|
5
|
-
import { HttpOrchestratorClient } from "../orchestrator/client.js";
|
|
6
|
-
import { sanitizeAgentFacingText, sanitizeAgentFacingValue, } from "../sabs/agent-facing-text.js";
|
|
7
|
-
import { ensurePrincipal, resolveApplicationId, } from "./lifecycle.js";
|
|
8
|
-
const DEFAULT_LIMIT = 100;
|
|
9
|
-
function labelPart(value) {
|
|
10
|
-
return typeof value === "string"
|
|
11
|
-
? value.trim().replaceAll(/[.[\]]/g, "_")
|
|
12
|
-
: "";
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* A table name alone is ambiguous: `public.users` and `analytics.users` are
|
|
16
|
-
* different tables, so qualify with the schema whenever the row carries one.
|
|
17
|
-
*/
|
|
18
|
-
function arrayEntryLabel(value, index) {
|
|
19
|
-
if (value && typeof value === "object") {
|
|
20
|
-
const row = value;
|
|
21
|
-
const name = labelPart(row.name);
|
|
22
|
-
if (name) {
|
|
23
|
-
const schema = labelPart(row.schema);
|
|
24
|
-
return schema ? `${schema}.${name}` : name;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return String(index);
|
|
28
|
-
}
|
|
29
|
-
function metadataEntries(value, path = "", entries = []) {
|
|
30
|
-
if (value === null ||
|
|
31
|
-
typeof value === "boolean" ||
|
|
32
|
-
typeof value === "number" ||
|
|
33
|
-
typeof value === "string") {
|
|
34
|
-
entries.push({ path, value });
|
|
35
|
-
return entries;
|
|
36
|
-
}
|
|
37
|
-
if (Array.isArray(value)) {
|
|
38
|
-
const seen = new Set();
|
|
39
|
-
value.forEach((entry, index) => {
|
|
40
|
-
const label = arrayEntryLabel(entry, index);
|
|
41
|
-
// Two rows that still label identically would be indistinguishable, so
|
|
42
|
-
// fall back to the index for the later one.
|
|
43
|
-
const unique = seen.has(label) ? `${label}#${index}` : label;
|
|
44
|
-
seen.add(unique);
|
|
45
|
-
metadataEntries(entry, `${path}[${unique}]`, entries);
|
|
46
|
-
});
|
|
47
|
-
return entries;
|
|
48
|
-
}
|
|
49
|
-
if (value && typeof value === "object") {
|
|
50
|
-
for (const [key, entry] of Object.entries(value)) {
|
|
51
|
-
metadataEntries(entry, path ? `${path}.${key}` : key, entries);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return entries;
|
|
55
|
-
}
|
|
56
|
-
export async function getIntegrationMetadata(context, input) {
|
|
57
|
-
const principal = await ensurePrincipal(context);
|
|
58
|
-
if (principal.kind !== "ok") {
|
|
59
|
-
return principal;
|
|
60
|
-
}
|
|
61
|
-
let applicationId;
|
|
62
|
-
// Named for the agent before the integration resolves, so a failure on the
|
|
63
|
-
// way to the metadata still reports which integration it was reaching for.
|
|
64
|
-
let label = sanitizeAgentFacingText(input.integrationId);
|
|
65
|
-
try {
|
|
66
|
-
// An app is preferred but not required. App-owned integrations (Native DB
|
|
67
|
-
// among them) are only visible through an app-scoped token, so use one
|
|
68
|
-
// whenever an app is in play and fall back to the integration-scoped token
|
|
69
|
-
// rather than making the caller invent an application.
|
|
70
|
-
const resolved = await resolveApplicationId(context, principal.value, input.applicationId);
|
|
71
|
-
applicationId = resolved.kind === "ok" ? resolved.value : undefined;
|
|
72
|
-
// The RBAC-annotated list, not the org-wide lookup by id: only this one
|
|
73
|
-
// carries the permissions that say whether the caller may build with the
|
|
74
|
-
// integration at all.
|
|
75
|
-
const rows = await context.server.getSupersetIntegrations({
|
|
76
|
-
apiKey: principal.value.apiKey,
|
|
77
|
-
...(applicationId && { applicationId }),
|
|
78
|
-
organizationId: principal.value.organizationId,
|
|
79
|
-
});
|
|
80
|
-
const integration = rows.find((row) => row.id === input.integrationId);
|
|
81
|
-
if (!integration) {
|
|
82
|
-
return {
|
|
83
|
-
...(applicationId && { applicationId }),
|
|
84
|
-
kind: "error",
|
|
85
|
-
code: "integration_not_accessible",
|
|
86
|
-
message: `Integration ${label} was not found or is not accessible.`,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
const integrationName = sanitizeAgentFacingText(integration.name);
|
|
90
|
-
const pluginId = sanitizeAgentFacingText(integration.pluginId);
|
|
91
|
-
label = integrationName;
|
|
92
|
-
if (!hasBuildPermission(integration)) {
|
|
93
|
-
return {
|
|
94
|
-
...(applicationId && { applicationId }),
|
|
95
|
-
kind: "error",
|
|
96
|
-
code: "integration_not_permitted",
|
|
97
|
-
message: `You do not have build permission on ${integrationName}.`,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
if (!integrationIsToolSupported(integration.pluginId)) {
|
|
101
|
-
return {
|
|
102
|
-
...(applicationId && { applicationId }),
|
|
103
|
-
kind: "error",
|
|
104
|
-
code: "integration_not_supported",
|
|
105
|
-
message: `${integrationName} is a ${pluginId} integration, which this tool cannot inspect.`,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
const profiles = await context.server.getOrganizationProfiles({
|
|
109
|
-
apiKey: principal.value.apiKey,
|
|
110
|
-
organizationId: principal.value.organizationId,
|
|
111
|
-
});
|
|
112
|
-
const profileKey = pickEditorProfileKey(context.config.profileKey, profiles);
|
|
113
|
-
const inventory = await context.server.getAgentInventory({
|
|
114
|
-
apiKey: principal.value.apiKey,
|
|
115
|
-
organizationId: principal.value.organizationId,
|
|
116
|
-
});
|
|
117
|
-
const orchestratorUrl = pickOrchestratorBaseUrl({
|
|
118
|
-
agentType: inventory.agentType,
|
|
119
|
-
agents: inventory.agents,
|
|
120
|
-
profileKey,
|
|
121
|
-
});
|
|
122
|
-
const scopedToken = await context.server.issueScopedToken(applicationId
|
|
123
|
-
? {
|
|
124
|
-
apiKey: principal.value.apiKey,
|
|
125
|
-
applicationId,
|
|
126
|
-
scope: "apps:update",
|
|
127
|
-
}
|
|
128
|
-
: {
|
|
129
|
-
apiKey: principal.value.apiKey,
|
|
130
|
-
integrationId: input.integrationId,
|
|
131
|
-
scope: "integrations:build",
|
|
132
|
-
});
|
|
133
|
-
const metadata = await new HttpOrchestratorClient(orchestratorUrl).getMetadata({
|
|
134
|
-
apiKey: principal.value.apiKey,
|
|
135
|
-
integrationId: input.integrationId,
|
|
136
|
-
profileKey,
|
|
137
|
-
scopedToken,
|
|
138
|
-
});
|
|
139
|
-
const sanitized = sanitizeAgentFacingValue(metadata);
|
|
140
|
-
const search = input.search?.trim().toLowerCase();
|
|
141
|
-
const matched = metadataEntries(sanitized).filter((entry) => !search ||
|
|
142
|
-
entry.path.toLowerCase().includes(search) ||
|
|
143
|
-
String(entry.value).toLowerCase().includes(search));
|
|
144
|
-
const limit = input.limit ?? DEFAULT_LIMIT;
|
|
145
|
-
const offset = input.offset ?? 0;
|
|
146
|
-
const entries = matched.slice(offset, offset + limit);
|
|
147
|
-
const nextOffset = offset + entries.length < matched.length ? offset + entries.length : null;
|
|
148
|
-
return {
|
|
149
|
-
kind: "ok",
|
|
150
|
-
value: {
|
|
151
|
-
...(applicationId && { applicationId }),
|
|
152
|
-
entries,
|
|
153
|
-
hasMore: nextOffset !== null,
|
|
154
|
-
integrationId: integration.id,
|
|
155
|
-
integrationName,
|
|
156
|
-
nextOffset,
|
|
157
|
-
offset,
|
|
158
|
-
pluginId,
|
|
159
|
-
returnedCount: entries.length,
|
|
160
|
-
totalCount: matched.length,
|
|
161
|
-
},
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
catch (error) {
|
|
165
|
-
const detail = sanitizeAgentFacingText(error instanceof Error ? error.message : "Unknown metadata error").replaceAll("\u2014", "-");
|
|
166
|
-
return {
|
|
167
|
-
...(applicationId && { applicationId }),
|
|
168
|
-
kind: "error",
|
|
169
|
-
code: "integration_metadata_unavailable",
|
|
170
|
-
message: `Could not load metadata for ${label}: ${detail}`,
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
//# sourceMappingURL=integration-metadata.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-metadata.js","sourceRoot":"","sources":["../../src/capabilities/integration-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,oBAAoB,GAErB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,aAAa,GAAG,GAAG,CAAC;AA6B1B,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC9B,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE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AK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAClE,CAAC,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC5B,OAAO;YACL,GAAG,CAAC,aAAa,IAAI,EAAE,aAAa,EAAE,CAAC;YACvC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,kCAAkC;YACxC,OAAO,EAAE,+BAA+B,KAAK,KAAK,MAAM,EAAE;SAC3D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type Tracer } from "@opentelemetry/api";
|
|
2
|
-
import type { CapabilityResult } from "../capabilities/types.js";
|
|
3
|
-
export type McpClientInfo = {
|
|
4
|
-
name: string;
|
|
5
|
-
version?: string;
|
|
6
|
-
};
|
|
7
|
-
export type McpToolCall = {
|
|
8
|
-
client?: McpClientInfo;
|
|
9
|
-
toolName: string;
|
|
10
|
-
};
|
|
11
|
-
export declare class McpClientTelemetry {
|
|
12
|
-
private readonly tracer;
|
|
13
|
-
private ended;
|
|
14
|
-
private hadError;
|
|
15
|
-
private organizationId;
|
|
16
|
-
private readonly sessionContext;
|
|
17
|
-
private readonly sessionSpan;
|
|
18
|
-
constructor(tracer: Tracer);
|
|
19
|
-
setOrganizationId(organizationId: string): void;
|
|
20
|
-
runTool<T>(call: McpToolCall, operation: () => Promise<CapabilityResult<T>>): Promise<CapabilityResult<T>>;
|
|
21
|
-
endSession(): void;
|
|
22
|
-
}
|