@statelyai/mcp 0.8.3 → 0.8.6
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 +66 -6
- package/dist/index.cjs +99 -61
- package/dist/index.d.cts +20 -1
- package/dist/index.d.mts +20 -1
- package/dist/index.mjs +97 -62
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -169,7 +169,26 @@ type StatelyMcpServerOptions = {
|
|
|
169
169
|
* Omitted by default; observer failures never affect tool results.
|
|
170
170
|
*/
|
|
171
171
|
onToolCall?: StatelyMcpToolCallObserver;
|
|
172
|
+
/**
|
|
173
|
+
* How this server identifies itself to the analysis API, sent as
|
|
174
|
+
* `x-stately-client` on every `callApi` request.
|
|
175
|
+
*
|
|
176
|
+
* The tools are HTTP calls against `apiBaseUrl`, so the API is the only
|
|
177
|
+
* place local usage can be counted — but a request from the stdio binary
|
|
178
|
+
* and a request from a hosted server are otherwise indistinguishable there.
|
|
179
|
+
* This header is the distinction, and it carries no user or machine content.
|
|
180
|
+
*
|
|
181
|
+
* A customer running the analysis API inside their own network sends this
|
|
182
|
+
* to their own deployment and nothing reaches us, which is the intended
|
|
183
|
+
* behaviour, not a gap.
|
|
184
|
+
*/
|
|
185
|
+
clientId?: string;
|
|
172
186
|
};
|
|
187
|
+
/** Sent when the host does not identify itself; see `clientId`. */
|
|
188
|
+
declare const DEFAULT_CLIENT_ID = "stately-mcp/embedded";
|
|
189
|
+
/** Sent by the `stately-mcp` stdio binary. */
|
|
190
|
+
declare const STDIO_CLIENT_ID = "stately-mcp/stdio";
|
|
191
|
+
declare const CLIENT_ID_HEADER = "x-stately-client";
|
|
173
192
|
type StatelyCredential = {
|
|
174
193
|
type: 'api_key';
|
|
175
194
|
token: string;
|
|
@@ -228,4 +247,4 @@ declare function getDefaultCredential(): Promise<{
|
|
|
228
247
|
} | undefined>;
|
|
229
248
|
declare function createStatelyMcpServer$1(options?: StatelyMcpServerOptions): McpServer;
|
|
230
249
|
//#endregion
|
|
231
|
-
export { type HttpResourceClientOptions, type ResourceCallOptions, type ResourceClient, ResourceClientError, type ResourceClientResolver, type StatelyMcpServerOptions, type StatelyMcpToolCallEvent, type StatelyMcpToolCallObserver, type StatelyMcpToolName, type StatelyResourceToolOptions, createStatelyMcpServer as createHostedStatelyMcpServer, createHttpResourceClient, createStatelyMcpServer$1 as createStatelyMcpServer, formatForPath, getDefaultCredential, isCandidate, isResourceClientError, readOnlyAnnotations, readWorkspaceMachine, registerStatelyMcpTools, registerStatelyResourceTools, reportVisualizationRenderedToolName, resourceApiV1BaseUrl, resourceReadOnlyAnnotations, statelyMcpToolNames, visualizeMachineAppUri, walkWorkspace, workspaceFromArgv };
|
|
250
|
+
export { CLIENT_ID_HEADER, DEFAULT_CLIENT_ID, type HttpResourceClientOptions, type ResourceCallOptions, type ResourceClient, ResourceClientError, type ResourceClientResolver, STDIO_CLIENT_ID, type StatelyMcpServerOptions, type StatelyMcpToolCallEvent, type StatelyMcpToolCallObserver, type StatelyMcpToolName, type StatelyResourceToolOptions, createStatelyMcpServer as createHostedStatelyMcpServer, createHttpResourceClient, createStatelyMcpServer$1 as createStatelyMcpServer, formatForPath, getDefaultCredential, isCandidate, isResourceClientError, readOnlyAnnotations, readWorkspaceMachine, registerStatelyMcpTools, registerStatelyResourceTools, reportVisualizationRenderedToolName, resourceApiV1BaseUrl, resourceReadOnlyAnnotations, statelyMcpToolNames, visualizeMachineAppUri, walkWorkspace, workspaceFromArgv };
|
package/dist/index.d.mts
CHANGED
|
@@ -169,7 +169,26 @@ type StatelyMcpServerOptions = {
|
|
|
169
169
|
* Omitted by default; observer failures never affect tool results.
|
|
170
170
|
*/
|
|
171
171
|
onToolCall?: StatelyMcpToolCallObserver;
|
|
172
|
+
/**
|
|
173
|
+
* How this server identifies itself to the analysis API, sent as
|
|
174
|
+
* `x-stately-client` on every `callApi` request.
|
|
175
|
+
*
|
|
176
|
+
* The tools are HTTP calls against `apiBaseUrl`, so the API is the only
|
|
177
|
+
* place local usage can be counted — but a request from the stdio binary
|
|
178
|
+
* and a request from a hosted server are otherwise indistinguishable there.
|
|
179
|
+
* This header is the distinction, and it carries no user or machine content.
|
|
180
|
+
*
|
|
181
|
+
* A customer running the analysis API inside their own network sends this
|
|
182
|
+
* to their own deployment and nothing reaches us, which is the intended
|
|
183
|
+
* behaviour, not a gap.
|
|
184
|
+
*/
|
|
185
|
+
clientId?: string;
|
|
172
186
|
};
|
|
187
|
+
/** Sent when the host does not identify itself; see `clientId`. */
|
|
188
|
+
declare const DEFAULT_CLIENT_ID = "stately-mcp/embedded";
|
|
189
|
+
/** Sent by the `stately-mcp` stdio binary. */
|
|
190
|
+
declare const STDIO_CLIENT_ID = "stately-mcp/stdio";
|
|
191
|
+
declare const CLIENT_ID_HEADER = "x-stately-client";
|
|
173
192
|
type StatelyCredential = {
|
|
174
193
|
type: 'api_key';
|
|
175
194
|
token: string;
|
|
@@ -228,4 +247,4 @@ declare function getDefaultCredential(): Promise<{
|
|
|
228
247
|
} | undefined>;
|
|
229
248
|
declare function createStatelyMcpServer$1(options?: StatelyMcpServerOptions): McpServer;
|
|
230
249
|
//#endregion
|
|
231
|
-
export { type HttpResourceClientOptions, type ResourceCallOptions, type ResourceClient, ResourceClientError, type ResourceClientResolver, type StatelyMcpServerOptions, type StatelyMcpToolCallEvent, type StatelyMcpToolCallObserver, type StatelyMcpToolName, type StatelyResourceToolOptions, createStatelyMcpServer as createHostedStatelyMcpServer, createHttpResourceClient, createStatelyMcpServer$1 as createStatelyMcpServer, formatForPath, getDefaultCredential, isCandidate, isResourceClientError, readOnlyAnnotations, readWorkspaceMachine, registerStatelyMcpTools, registerStatelyResourceTools, reportVisualizationRenderedToolName, resourceApiV1BaseUrl, resourceReadOnlyAnnotations, statelyMcpToolNames, visualizeMachineAppUri, walkWorkspace, workspaceFromArgv };
|
|
250
|
+
export { CLIENT_ID_HEADER, DEFAULT_CLIENT_ID, type HttpResourceClientOptions, type ResourceCallOptions, type ResourceClient, ResourceClientError, type ResourceClientResolver, STDIO_CLIENT_ID, type StatelyMcpServerOptions, type StatelyMcpToolCallEvent, type StatelyMcpToolCallObserver, type StatelyMcpToolName, type StatelyResourceToolOptions, createStatelyMcpServer as createHostedStatelyMcpServer, createHttpResourceClient, createStatelyMcpServer$1 as createStatelyMcpServer, formatForPath, getDefaultCredential, isCandidate, isResourceClientError, readOnlyAnnotations, readWorkspaceMachine, registerStatelyMcpTools, registerStatelyResourceTools, reportVisualizationRenderedToolName, resourceApiV1BaseUrl, resourceReadOnlyAnnotations, statelyMcpToolNames, visualizeMachineAppUri, walkWorkspace, workspaceFromArgv };
|