conductor-node-mcp 14.24.4 → 15.0.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/README.md +2 -2
- package/agent-errors.d.mts +3 -0
- package/agent-errors.d.mts.map +1 -0
- package/agent-errors.d.ts +3 -0
- package/agent-errors.d.ts.map +1 -0
- package/agent-errors.js +97 -0
- package/agent-errors.js.map +1 -0
- package/agent-errors.mjs +93 -0
- package/agent-errors.mjs.map +1 -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/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +73 -14
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +73 -14
- package/code-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +38 -22
- package/http.js.map +1 -1
- package/http.mjs +37 -21
- package/http.mjs.map +1 -1
- package/local-docs-search.js +3 -3
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +3 -3
- package/local-docs-search.mjs.map +1 -1
- package/oauth.d.mts +26 -0
- package/oauth.d.mts.map +1 -0
- package/oauth.d.ts +26 -0
- package/oauth.d.ts.map +1 -0
- package/oauth.js +446 -0
- package/oauth.js.map +1 -0
- package/oauth.mjs +433 -0
- package/oauth.mjs.map +1 -0
- package/package.json +32 -2
- package/server.d.mts +2 -1
- package/server.d.mts.map +1 -1
- package/server.d.ts +2 -1
- package/server.d.ts.map +1 -1
- package/server.js +7 -3
- package/server.js.map +1 -1
- package/server.mjs +7 -3
- package/server.mjs.map +1 -1
- package/src/agent-errors.ts +98 -0
- package/src/code-tool-worker.ts +3 -0
- package/src/code-tool.ts +78 -18
- package/src/http.ts +35 -30
- package/src/local-docs-search.ts +3 -3
- package/src/oauth.ts +540 -0
- package/src/server.ts +8 -3
- package/src/telemetry.ts +110 -0
- package/src/types.ts +4 -0
- package/telemetry.d.mts +18 -0
- package/telemetry.d.mts.map +1 -0
- package/telemetry.d.ts +18 -0
- package/telemetry.d.ts.map +1 -0
- package/telemetry.js +105 -0
- package/telemetry.js.map +1 -0
- package/telemetry.mjs +96 -0
- package/telemetry.mjs.map +1 -0
- package/types.d.mts +2 -0
- package/types.d.mts.map +1 -1
- package/types.d.ts +2 -0
- package/types.d.ts.map +1 -1
- package/types.js.map +1 -1
- package/types.mjs.map +1 -1
package/src/telemetry.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Conductor patch: shared helpers for the execute tool's abort-on-disconnect, its per-call telemetry, and
|
|
2
|
+
// the OAuth gate's rejection logging. Custom file (not generated), imported by code-tool.ts, http.ts and
|
|
3
|
+
// oauth.ts.
|
|
4
|
+
import type { ToolCallResult } from './types';
|
|
5
|
+
|
|
6
|
+
// Thrown inside the execute tool's race when the MCP request's abort signal fires (the client closed its
|
|
7
|
+
// HTTP request). Caught in code-tool.ts, never leaves it.
|
|
8
|
+
export class CodeExecutionAbortedError extends Error {}
|
|
9
|
+
|
|
10
|
+
export const CLIENT_CLOSED_MESSAGE =
|
|
11
|
+
'The client closed the connection, so execution stopped. Requests already sent may have completed, so check any records the code created or changed before running it again.';
|
|
12
|
+
|
|
13
|
+
// Request header values built from client-sent strings (the User-Agent, the mcp-session-id) are reduced
|
|
14
|
+
// to printable ASCII, because one non-ASCII byte makes fetch throw on every request of that execute call,
|
|
15
|
+
// and cut to a fixed length so a hostile value cannot bloat headers or logs. Returns undefined for an
|
|
16
|
+
// empty or absent value so callers omit the field.
|
|
17
|
+
export function asciiHeaderValue(value: unknown, maxLength: number): string | undefined {
|
|
18
|
+
if (typeof value !== 'string') return undefined;
|
|
19
|
+
const ascii = value
|
|
20
|
+
.replace(/[^\x20-\x7E]/g, '')
|
|
21
|
+
.trim()
|
|
22
|
+
.slice(0, maxLength);
|
|
23
|
+
return ascii === '' ? undefined : ascii;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// The MCP request's User-Agent as sent to the API (Conductor-MCP-Client) and written to log lines;
|
|
27
|
+
// sanitized once where it enters, in http.ts.
|
|
28
|
+
export function sanitizeUserAgent(value: unknown, maxLength = 120): string | undefined {
|
|
29
|
+
return asciiHeaderValue(value, maxLength);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// The headers the sandbox's SDK client adds to every API request of one execute call, so Better Stack
|
|
33
|
+
// (source 214704 logs every non-secret request header) can join each relayed request to its execute call,
|
|
34
|
+
// MCP session and client. Header names contain none of the API's redaction patterns (token, secret,
|
|
35
|
+
// password, credential, authorization).
|
|
36
|
+
export function executeTelemetryHeaders(params: {
|
|
37
|
+
callId: string;
|
|
38
|
+
mcpSessionId: string | undefined;
|
|
39
|
+
userAgent: string | undefined;
|
|
40
|
+
}): Record<string, string> {
|
|
41
|
+
const headers: Record<string, string> = { 'Conductor-MCP-Call-Id': params.callId };
|
|
42
|
+
// The session id is whatever the client sent as mcp-session-id (or the UUID http.ts minted), so it is
|
|
43
|
+
// sanitized like the User-Agent.
|
|
44
|
+
const session = asciiHeaderValue(params.mcpSessionId, 128);
|
|
45
|
+
if (session) headers['Conductor-MCP-Session-Id'] = session;
|
|
46
|
+
const client = sanitizeUserAgent(params.userAgent);
|
|
47
|
+
if (client) headers['Conductor-MCP-Client'] = client;
|
|
48
|
+
return headers;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// The JSON-RPC method (or 'batch') and, for tools/call, the tool name, from a parsed request body. Logged
|
|
52
|
+
// on every request line and gate rejection, so execute versus search_docs and initialize versus tools/call
|
|
53
|
+
// are visible for clients that send no mcp-method or mcp-name header. Never reads params beyond the name.
|
|
54
|
+
export function rpcMethodProps(body: unknown): { rpcMethod?: string; tool?: string } {
|
|
55
|
+
if (Array.isArray(body)) return { rpcMethod: 'batch' };
|
|
56
|
+
if (typeof body !== 'object' || body === null) return {};
|
|
57
|
+
const { method, params } = body as { method?: unknown; params?: { name?: unknown } };
|
|
58
|
+
if (typeof method !== 'string') return {};
|
|
59
|
+
const props: { rpcMethod?: string; tool?: string } = { rpcMethod: method.slice(0, 64) };
|
|
60
|
+
if (
|
|
61
|
+
method === 'tools/call' &&
|
|
62
|
+
typeof params === 'object' &&
|
|
63
|
+
params !== null &&
|
|
64
|
+
typeof params.name === 'string'
|
|
65
|
+
) {
|
|
66
|
+
props.tool = params.name.slice(0, 64);
|
|
67
|
+
}
|
|
68
|
+
return props;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type ExecuteErrorKind =
|
|
72
|
+
| 'blocked_method'
|
|
73
|
+
| 'client_closed'
|
|
74
|
+
| 'timeout'
|
|
75
|
+
| 'no_deno'
|
|
76
|
+
| 'no_run_function'
|
|
77
|
+
| 'ts_diagnostics'
|
|
78
|
+
| `api_error:${string}`
|
|
79
|
+
| 'api_error'
|
|
80
|
+
| 'api_connection_error'
|
|
81
|
+
| 'runtime_error'
|
|
82
|
+
| 'unknown';
|
|
83
|
+
|
|
84
|
+
// A fixed label for a failed execute result, derived from the shape of its first text block and never
|
|
85
|
+
// carrying the text itself: TypeScript diagnostics and runtime errors echo lines of the agent's code,
|
|
86
|
+
// which can hold customer names and amounts, and the MCP logs carry no code, intent or results.
|
|
87
|
+
export function classifyExecuteError(result: ToolCallResult): ExecuteErrorKind {
|
|
88
|
+
const first = result.content.find((block) => block.type === 'text');
|
|
89
|
+
const text = first && first.type === 'text' ? first.text : '';
|
|
90
|
+
if (text.startsWith('The following methods have been blocked')) return 'blocked_method';
|
|
91
|
+
if (text.startsWith('The client closed the connection')) return 'client_closed';
|
|
92
|
+
if (text.startsWith('Code execution timed out')) return 'timeout';
|
|
93
|
+
if (text.startsWith('Deno is required')) return 'no_deno';
|
|
94
|
+
if (text.startsWith('The code is missing a top-level') || text.startsWith('The code argument is missing')) {
|
|
95
|
+
return 'no_run_function';
|
|
96
|
+
}
|
|
97
|
+
if (text.startsWith('The code contains TypeScript diagnostics')) return 'ts_diagnostics';
|
|
98
|
+
// The worker prints `${error.name}: ${error.message}` (the SDK's classes leave name as 'Error');
|
|
99
|
+
// src/agent-errors.ts makes the message `<CODE>: <message> ...`, without it the SDK's own text is
|
|
100
|
+
// `<status> <body>`.
|
|
101
|
+
// The SDK's own connection failures (no response at all) come before any API code.
|
|
102
|
+
if (/^[A-Za-z]*Error: (Connection error\.|Request timed out\.)/.test(text)) return 'api_connection_error';
|
|
103
|
+
// A rewritten API error carries the code and, on the same line, the HTTP status; a runtime throw whose
|
|
104
|
+
// message merely starts with an upper-case word and a colon does not.
|
|
105
|
+
const apiError = text.match(/^[A-Za-z]*Error: ([A-Z][A-Z0-9_]+): .*\((?:HTTP \d{3}|no HTTP status)/);
|
|
106
|
+
if (apiError) return `api_error:${apiError[1]}`;
|
|
107
|
+
if (/^[A-Za-z]*Error: \d{3} /.test(text)) return 'api_error';
|
|
108
|
+
if (/^[A-Za-z]*Error: /.test(text) || text.startsWith('Error output:')) return 'runtime_error';
|
|
109
|
+
return 'unknown';
|
|
110
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -48,6 +48,10 @@ export type McpRequestContext = {
|
|
|
48
48
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
49
49
|
mcpSessionId?: string | undefined;
|
|
50
50
|
mcpClientInfo?: { name: string; version: string } | undefined;
|
|
51
|
+
// Conductor patch: the MCP request's abort signal (the SDK fires it when http.ts closes the transport on
|
|
52
|
+
// the client's socket close) and the HTTP User-Agent, for the execute tool's abort racer and telemetry.
|
|
53
|
+
signal?: AbortSignal | undefined;
|
|
54
|
+
userAgent?: string | undefined;
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
export type HandlerFunction = ({
|
package/telemetry.d.mts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ToolCallResult } from "./types.mjs";
|
|
2
|
+
export declare class CodeExecutionAbortedError extends Error {
|
|
3
|
+
}
|
|
4
|
+
export declare const CLIENT_CLOSED_MESSAGE = "The client closed the connection, so execution stopped. Requests already sent may have completed, so check any records the code created or changed before running it again.";
|
|
5
|
+
export declare function asciiHeaderValue(value: unknown, maxLength: number): string | undefined;
|
|
6
|
+
export declare function sanitizeUserAgent(value: unknown, maxLength?: number): string | undefined;
|
|
7
|
+
export declare function executeTelemetryHeaders(params: {
|
|
8
|
+
callId: string;
|
|
9
|
+
mcpSessionId: string | undefined;
|
|
10
|
+
userAgent: string | undefined;
|
|
11
|
+
}): Record<string, string>;
|
|
12
|
+
export declare function rpcMethodProps(body: unknown): {
|
|
13
|
+
rpcMethod?: string;
|
|
14
|
+
tool?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ExecuteErrorKind = 'blocked_method' | 'client_closed' | 'timeout' | 'no_deno' | 'no_run_function' | 'ts_diagnostics' | `api_error:${string}` | 'api_error' | 'api_connection_error' | 'runtime_error' | 'unknown';
|
|
17
|
+
export declare function classifyExecuteError(result: ToolCallResult): ExecuteErrorKind;
|
|
18
|
+
//# sourceMappingURL=telemetry.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.mts","sourceRoot":"","sources":["src/telemetry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAgB;AAI9C,qBAAa,yBAA0B,SAAQ,KAAK;CAAG;AAEvD,eAAO,MAAM,qBAAqB,gLAC6I,CAAC;AAMhL,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOtF;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,SAAM,GAAG,MAAM,GAAG,SAAS,CAErF;AAMD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASzB;AAKD,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAenF;AAED,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,eAAe,GACf,SAAS,GACT,SAAS,GACT,iBAAiB,GACjB,gBAAgB,GAChB,aAAa,MAAM,EAAE,GACrB,WAAW,GACX,sBAAsB,GACtB,eAAe,GACf,SAAS,CAAC;AAKd,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,gBAAgB,CAuB7E"}
|
package/telemetry.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ToolCallResult } from "./types.js";
|
|
2
|
+
export declare class CodeExecutionAbortedError extends Error {
|
|
3
|
+
}
|
|
4
|
+
export declare const CLIENT_CLOSED_MESSAGE = "The client closed the connection, so execution stopped. Requests already sent may have completed, so check any records the code created or changed before running it again.";
|
|
5
|
+
export declare function asciiHeaderValue(value: unknown, maxLength: number): string | undefined;
|
|
6
|
+
export declare function sanitizeUserAgent(value: unknown, maxLength?: number): string | undefined;
|
|
7
|
+
export declare function executeTelemetryHeaders(params: {
|
|
8
|
+
callId: string;
|
|
9
|
+
mcpSessionId: string | undefined;
|
|
10
|
+
userAgent: string | undefined;
|
|
11
|
+
}): Record<string, string>;
|
|
12
|
+
export declare function rpcMethodProps(body: unknown): {
|
|
13
|
+
rpcMethod?: string;
|
|
14
|
+
tool?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ExecuteErrorKind = 'blocked_method' | 'client_closed' | 'timeout' | 'no_deno' | 'no_run_function' | 'ts_diagnostics' | `api_error:${string}` | 'api_error' | 'api_connection_error' | 'runtime_error' | 'unknown';
|
|
17
|
+
export declare function classifyExecuteError(result: ToolCallResult): ExecuteErrorKind;
|
|
18
|
+
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["src/telemetry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAgB;AAI9C,qBAAa,yBAA0B,SAAQ,KAAK;CAAG;AAEvD,eAAO,MAAM,qBAAqB,gLAC6I,CAAC;AAMhL,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOtF;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,SAAM,GAAG,MAAM,GAAG,SAAS,CAErF;AAMD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASzB;AAKD,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAenF;AAED,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,eAAe,GACf,SAAS,GACT,SAAS,GACT,iBAAiB,GACjB,gBAAgB,GAChB,aAAa,MAAM,EAAE,GACrB,WAAW,GACX,sBAAsB,GACtB,eAAe,GACf,SAAS,CAAC;AAKd,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,gBAAgB,CAuB7E"}
|
package/telemetry.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLIENT_CLOSED_MESSAGE = exports.CodeExecutionAbortedError = void 0;
|
|
4
|
+
exports.asciiHeaderValue = asciiHeaderValue;
|
|
5
|
+
exports.sanitizeUserAgent = sanitizeUserAgent;
|
|
6
|
+
exports.executeTelemetryHeaders = executeTelemetryHeaders;
|
|
7
|
+
exports.rpcMethodProps = rpcMethodProps;
|
|
8
|
+
exports.classifyExecuteError = classifyExecuteError;
|
|
9
|
+
// Thrown inside the execute tool's race when the MCP request's abort signal fires (the client closed its
|
|
10
|
+
// HTTP request). Caught in code-tool.ts, never leaves it.
|
|
11
|
+
class CodeExecutionAbortedError extends Error {
|
|
12
|
+
}
|
|
13
|
+
exports.CodeExecutionAbortedError = CodeExecutionAbortedError;
|
|
14
|
+
exports.CLIENT_CLOSED_MESSAGE = 'The client closed the connection, so execution stopped. Requests already sent may have completed, so check any records the code created or changed before running it again.';
|
|
15
|
+
// Request header values built from client-sent strings (the User-Agent, the mcp-session-id) are reduced
|
|
16
|
+
// to printable ASCII, because one non-ASCII byte makes fetch throw on every request of that execute call,
|
|
17
|
+
// and cut to a fixed length so a hostile value cannot bloat headers or logs. Returns undefined for an
|
|
18
|
+
// empty or absent value so callers omit the field.
|
|
19
|
+
function asciiHeaderValue(value, maxLength) {
|
|
20
|
+
if (typeof value !== 'string')
|
|
21
|
+
return undefined;
|
|
22
|
+
const ascii = value
|
|
23
|
+
.replace(/[^\x20-\x7E]/g, '')
|
|
24
|
+
.trim()
|
|
25
|
+
.slice(0, maxLength);
|
|
26
|
+
return ascii === '' ? undefined : ascii;
|
|
27
|
+
}
|
|
28
|
+
// The MCP request's User-Agent as sent to the API (Conductor-MCP-Client) and written to log lines;
|
|
29
|
+
// sanitized once where it enters, in http.ts.
|
|
30
|
+
function sanitizeUserAgent(value, maxLength = 120) {
|
|
31
|
+
return asciiHeaderValue(value, maxLength);
|
|
32
|
+
}
|
|
33
|
+
// The headers the sandbox's SDK client adds to every API request of one execute call, so Better Stack
|
|
34
|
+
// (source 214704 logs every non-secret request header) can join each relayed request to its execute call,
|
|
35
|
+
// MCP session and client. Header names contain none of the API's redaction patterns (token, secret,
|
|
36
|
+
// password, credential, authorization).
|
|
37
|
+
function executeTelemetryHeaders(params) {
|
|
38
|
+
const headers = { 'Conductor-MCP-Call-Id': params.callId };
|
|
39
|
+
// The session id is whatever the client sent as mcp-session-id (or the UUID http.ts minted), so it is
|
|
40
|
+
// sanitized like the User-Agent.
|
|
41
|
+
const session = asciiHeaderValue(params.mcpSessionId, 128);
|
|
42
|
+
if (session)
|
|
43
|
+
headers['Conductor-MCP-Session-Id'] = session;
|
|
44
|
+
const client = sanitizeUserAgent(params.userAgent);
|
|
45
|
+
if (client)
|
|
46
|
+
headers['Conductor-MCP-Client'] = client;
|
|
47
|
+
return headers;
|
|
48
|
+
}
|
|
49
|
+
// The JSON-RPC method (or 'batch') and, for tools/call, the tool name, from a parsed request body. Logged
|
|
50
|
+
// on every request line and gate rejection, so execute versus search_docs and initialize versus tools/call
|
|
51
|
+
// are visible for clients that send no mcp-method or mcp-name header. Never reads params beyond the name.
|
|
52
|
+
function rpcMethodProps(body) {
|
|
53
|
+
if (Array.isArray(body))
|
|
54
|
+
return { rpcMethod: 'batch' };
|
|
55
|
+
if (typeof body !== 'object' || body === null)
|
|
56
|
+
return {};
|
|
57
|
+
const { method, params } = body;
|
|
58
|
+
if (typeof method !== 'string')
|
|
59
|
+
return {};
|
|
60
|
+
const props = { rpcMethod: method.slice(0, 64) };
|
|
61
|
+
if (method === 'tools/call' &&
|
|
62
|
+
typeof params === 'object' &&
|
|
63
|
+
params !== null &&
|
|
64
|
+
typeof params.name === 'string') {
|
|
65
|
+
props.tool = params.name.slice(0, 64);
|
|
66
|
+
}
|
|
67
|
+
return props;
|
|
68
|
+
}
|
|
69
|
+
// A fixed label for a failed execute result, derived from the shape of its first text block and never
|
|
70
|
+
// carrying the text itself: TypeScript diagnostics and runtime errors echo lines of the agent's code,
|
|
71
|
+
// which can hold customer names and amounts, and the MCP logs carry no code, intent or results.
|
|
72
|
+
function classifyExecuteError(result) {
|
|
73
|
+
const first = result.content.find((block) => block.type === 'text');
|
|
74
|
+
const text = first && first.type === 'text' ? first.text : '';
|
|
75
|
+
if (text.startsWith('The following methods have been blocked'))
|
|
76
|
+
return 'blocked_method';
|
|
77
|
+
if (text.startsWith('The client closed the connection'))
|
|
78
|
+
return 'client_closed';
|
|
79
|
+
if (text.startsWith('Code execution timed out'))
|
|
80
|
+
return 'timeout';
|
|
81
|
+
if (text.startsWith('Deno is required'))
|
|
82
|
+
return 'no_deno';
|
|
83
|
+
if (text.startsWith('The code is missing a top-level') || text.startsWith('The code argument is missing')) {
|
|
84
|
+
return 'no_run_function';
|
|
85
|
+
}
|
|
86
|
+
if (text.startsWith('The code contains TypeScript diagnostics'))
|
|
87
|
+
return 'ts_diagnostics';
|
|
88
|
+
// The worker prints `${error.name}: ${error.message}` (the SDK's classes leave name as 'Error');
|
|
89
|
+
// src/agent-errors.ts makes the message `<CODE>: <message> ...`, without it the SDK's own text is
|
|
90
|
+
// `<status> <body>`.
|
|
91
|
+
// The SDK's own connection failures (no response at all) come before any API code.
|
|
92
|
+
if (/^[A-Za-z]*Error: (Connection error\.|Request timed out\.)/.test(text))
|
|
93
|
+
return 'api_connection_error';
|
|
94
|
+
// A rewritten API error carries the code and, on the same line, the HTTP status; a runtime throw whose
|
|
95
|
+
// message merely starts with an upper-case word and a colon does not.
|
|
96
|
+
const apiError = text.match(/^[A-Za-z]*Error: ([A-Z][A-Z0-9_]+): .*\((?:HTTP \d{3}|no HTTP status)/);
|
|
97
|
+
if (apiError)
|
|
98
|
+
return `api_error:${apiError[1]}`;
|
|
99
|
+
if (/^[A-Za-z]*Error: \d{3} /.test(text))
|
|
100
|
+
return 'api_error';
|
|
101
|
+
if (/^[A-Za-z]*Error: /.test(text) || text.startsWith('Error output:'))
|
|
102
|
+
return 'runtime_error';
|
|
103
|
+
return 'unknown';
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=telemetry.js.map
|
package/telemetry.js.map
ADDED
|
@@ -0,0 +1 @@
|
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AAC;IAC9D,IAAI,IAAI,CAAC,UAAU,CAAC,yCAAyC,CAAC;QAAE,OAAO,gBAAgB,CAAC;IACxF,IAAI,IAAI,CAAC,UAAU,CAAC,kCAAkC,CAAC;QAAE,OAAO,eAAe,CAAC;IAChF,IAAI,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC;QAAE,OAAO,SAAS,CAAC;IAClE,IAAI,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1D,IAAI,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,8BAA8B,CAAC,EAAE,CAAC;QAC1G,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,IAAI,IAAI,CAAC,UAAU,CAAC,0CAA0C,CAAC;QAAE,OAAO,gBAAgB,CAAC;IACzF,iGAAiG;IACjG,kGAAkG;IAClG,qBAAqB;IACrB,mFAAmF;IACnF,IAAI,2DAA2D,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,sBAAsB,CAAC;IAC1G,uGAAuG;IACvG,sEAAsE;IACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;IACrG,IAAI,QAAQ;QAAE,OAAO,aAAa,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,IAAI,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,WAAW,CAAC;IAC7D,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;QAAE,OAAO,eAAe,CAAC;IAC/F,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/telemetry.mjs
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Thrown inside the execute tool's race when the MCP request's abort signal fires (the client closed its
|
|
2
|
+
// HTTP request). Caught in code-tool.ts, never leaves it.
|
|
3
|
+
export class CodeExecutionAbortedError extends Error {
|
|
4
|
+
}
|
|
5
|
+
export const CLIENT_CLOSED_MESSAGE = 'The client closed the connection, so execution stopped. Requests already sent may have completed, so check any records the code created or changed before running it again.';
|
|
6
|
+
// Request header values built from client-sent strings (the User-Agent, the mcp-session-id) are reduced
|
|
7
|
+
// to printable ASCII, because one non-ASCII byte makes fetch throw on every request of that execute call,
|
|
8
|
+
// and cut to a fixed length so a hostile value cannot bloat headers or logs. Returns undefined for an
|
|
9
|
+
// empty or absent value so callers omit the field.
|
|
10
|
+
export function asciiHeaderValue(value, maxLength) {
|
|
11
|
+
if (typeof value !== 'string')
|
|
12
|
+
return undefined;
|
|
13
|
+
const ascii = value
|
|
14
|
+
.replace(/[^\x20-\x7E]/g, '')
|
|
15
|
+
.trim()
|
|
16
|
+
.slice(0, maxLength);
|
|
17
|
+
return ascii === '' ? undefined : ascii;
|
|
18
|
+
}
|
|
19
|
+
// The MCP request's User-Agent as sent to the API (Conductor-MCP-Client) and written to log lines;
|
|
20
|
+
// sanitized once where it enters, in http.ts.
|
|
21
|
+
export function sanitizeUserAgent(value, maxLength = 120) {
|
|
22
|
+
return asciiHeaderValue(value, maxLength);
|
|
23
|
+
}
|
|
24
|
+
// The headers the sandbox's SDK client adds to every API request of one execute call, so Better Stack
|
|
25
|
+
// (source 214704 logs every non-secret request header) can join each relayed request to its execute call,
|
|
26
|
+
// MCP session and client. Header names contain none of the API's redaction patterns (token, secret,
|
|
27
|
+
// password, credential, authorization).
|
|
28
|
+
export function executeTelemetryHeaders(params) {
|
|
29
|
+
const headers = { 'Conductor-MCP-Call-Id': params.callId };
|
|
30
|
+
// The session id is whatever the client sent as mcp-session-id (or the UUID http.ts minted), so it is
|
|
31
|
+
// sanitized like the User-Agent.
|
|
32
|
+
const session = asciiHeaderValue(params.mcpSessionId, 128);
|
|
33
|
+
if (session)
|
|
34
|
+
headers['Conductor-MCP-Session-Id'] = session;
|
|
35
|
+
const client = sanitizeUserAgent(params.userAgent);
|
|
36
|
+
if (client)
|
|
37
|
+
headers['Conductor-MCP-Client'] = client;
|
|
38
|
+
return headers;
|
|
39
|
+
}
|
|
40
|
+
// The JSON-RPC method (or 'batch') and, for tools/call, the tool name, from a parsed request body. Logged
|
|
41
|
+
// on every request line and gate rejection, so execute versus search_docs and initialize versus tools/call
|
|
42
|
+
// are visible for clients that send no mcp-method or mcp-name header. Never reads params beyond the name.
|
|
43
|
+
export function rpcMethodProps(body) {
|
|
44
|
+
if (Array.isArray(body))
|
|
45
|
+
return { rpcMethod: 'batch' };
|
|
46
|
+
if (typeof body !== 'object' || body === null)
|
|
47
|
+
return {};
|
|
48
|
+
const { method, params } = body;
|
|
49
|
+
if (typeof method !== 'string')
|
|
50
|
+
return {};
|
|
51
|
+
const props = { rpcMethod: method.slice(0, 64) };
|
|
52
|
+
if (method === 'tools/call' &&
|
|
53
|
+
typeof params === 'object' &&
|
|
54
|
+
params !== null &&
|
|
55
|
+
typeof params.name === 'string') {
|
|
56
|
+
props.tool = params.name.slice(0, 64);
|
|
57
|
+
}
|
|
58
|
+
return props;
|
|
59
|
+
}
|
|
60
|
+
// A fixed label for a failed execute result, derived from the shape of its first text block and never
|
|
61
|
+
// carrying the text itself: TypeScript diagnostics and runtime errors echo lines of the agent's code,
|
|
62
|
+
// which can hold customer names and amounts, and the MCP logs carry no code, intent or results.
|
|
63
|
+
export function classifyExecuteError(result) {
|
|
64
|
+
const first = result.content.find((block) => block.type === 'text');
|
|
65
|
+
const text = first && first.type === 'text' ? first.text : '';
|
|
66
|
+
if (text.startsWith('The following methods have been blocked'))
|
|
67
|
+
return 'blocked_method';
|
|
68
|
+
if (text.startsWith('The client closed the connection'))
|
|
69
|
+
return 'client_closed';
|
|
70
|
+
if (text.startsWith('Code execution timed out'))
|
|
71
|
+
return 'timeout';
|
|
72
|
+
if (text.startsWith('Deno is required'))
|
|
73
|
+
return 'no_deno';
|
|
74
|
+
if (text.startsWith('The code is missing a top-level') || text.startsWith('The code argument is missing')) {
|
|
75
|
+
return 'no_run_function';
|
|
76
|
+
}
|
|
77
|
+
if (text.startsWith('The code contains TypeScript diagnostics'))
|
|
78
|
+
return 'ts_diagnostics';
|
|
79
|
+
// The worker prints `${error.name}: ${error.message}` (the SDK's classes leave name as 'Error');
|
|
80
|
+
// src/agent-errors.ts makes the message `<CODE>: <message> ...`, without it the SDK's own text is
|
|
81
|
+
// `<status> <body>`.
|
|
82
|
+
// The SDK's own connection failures (no response at all) come before any API code.
|
|
83
|
+
if (/^[A-Za-z]*Error: (Connection error\.|Request timed out\.)/.test(text))
|
|
84
|
+
return 'api_connection_error';
|
|
85
|
+
// A rewritten API error carries the code and, on the same line, the HTTP status; a runtime throw whose
|
|
86
|
+
// message merely starts with an upper-case word and a colon does not.
|
|
87
|
+
const apiError = text.match(/^[A-Za-z]*Error: ([A-Z][A-Z0-9_]+): .*\((?:HTTP \d{3}|no HTTP status)/);
|
|
88
|
+
if (apiError)
|
|
89
|
+
return `api_error:${apiError[1]}`;
|
|
90
|
+
if (/^[A-Za-z]*Error: \d{3} /.test(text))
|
|
91
|
+
return 'api_error';
|
|
92
|
+
if (/^[A-Za-z]*Error: /.test(text) || text.startsWith('Error output:'))
|
|
93
|
+
return 'runtime_error';
|
|
94
|
+
return 'unknown';
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=telemetry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.mjs","sourceRoot":"","sources":["src/telemetry.ts"],"names":[],"mappings":"AAKA,yGAAyG;AACzG,0DAA0D;AAC1D,MAAM,OAAO,yBAA0B,SAAQ,KAAK;CAAG;AAEvD,MAAM,CAAC,MAAM,qBAAqB,GAChC,6KAA6K,CAAC;AAEhL,wGAAwG;AACxG,0GAA0G;AAC1G,sGAAsG;AACtG,mDAAmD;AACnD,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,SAAiB;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;I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,CAAC,GAAG,SAAS,CAAC;CAC3C,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;AAE9B,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc,CASnE;AAED,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CA2BvF;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAU7D;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAgEtF,kDASC;AAED,sDA2BC;AAED,sCAUC;AAlDD,SAAgB,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtE,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE;wBACR,uEAAuE;wBACvE,GAAG,EAAE,0BAA0B;wBAC/B,QAAQ;wBACR,IAAI,EAAE,IAAI;qBACX;iBACF;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
package/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAgEtF,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,I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