@sentry/mcp-server 0.11.0 → 0.12.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/dist/api-client/client.cjs +2 -2
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +2 -2
- package/dist/api-client/client.test.js +2 -2
- package/dist/api-client/index.cjs +3 -2
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +3 -3
- package/dist/api-client/schema.cjs +2 -1
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/client-4jq_wVgn.d.ts +522 -0
- package/dist/client-4jq_wVgn.d.ts.map +1 -0
- package/dist/client-B7vZ6JMk.cjs +572 -0
- package/dist/client-B7vZ6JMk.cjs.map +1 -0
- package/dist/client-CAoHZbyK.js +561 -0
- package/dist/client-CAoHZbyK.js.map +1 -0
- package/dist/client-DkY0ifZf.d.cts +522 -0
- package/dist/client-DkY0ifZf.d.cts.map +1 -0
- package/dist/formatting-BaARL2gT.js.map +1 -1
- package/dist/formatting-C2kN0ok6.cjs.map +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.d.cts +4 -3
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +4 -3
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/issue-helpers.cjs +1 -1
- package/dist/internal/issue-helpers.d.cts +8 -0
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +8 -0
- package/dist/internal/issue-helpers.d.ts.map +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/issue-helpers.test.cjs +1 -1
- package/dist/internal/issue-helpers.test.js +1 -1
- package/dist/{issue-helpers-CSNNO03f.js → issue-helpers-BMVLc3mR.js} +9 -1
- package/dist/issue-helpers-BMVLc3mR.js.map +1 -0
- package/dist/{issue-helpers-71XgJVXC.cjs → issue-helpers-D712fGT2.cjs} +9 -1
- package/dist/issue-helpers-D712fGT2.cjs.map +1 -0
- package/dist/logging-ByvSjT6V.cjs.map +1 -1
- package/dist/logging-CXLD0FFB.js.map +1 -1
- package/dist/logging.d.cts +30 -1
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +30 -1
- package/dist/logging.d.ts.map +1 -1
- package/dist/{promptDefinitions-D3ll3qCd.cjs → promptDefinitions-BTLIBcGt.cjs} +9 -2
- package/dist/promptDefinitions-BTLIBcGt.cjs.map +1 -0
- package/dist/{promptDefinitions-H0q1_X-K.d.ts → promptDefinitions-CF2VWdQ6.d.cts} +9 -1
- package/dist/promptDefinitions-CF2VWdQ6.d.cts.map +1 -0
- package/dist/{promptDefinitions-DMucOchd.d.cts → promptDefinitions-D5FSQckL.d.ts} +9 -1
- package/dist/promptDefinitions-D5FSQckL.d.ts.map +1 -0
- package/dist/{promptDefinitions-aKmUZWWO.js → promptDefinitions-D8yow1m0.js} +9 -2
- package/dist/promptDefinitions-D8yow1m0.js.map +1 -0
- package/dist/promptDefinitions.cjs +2 -2
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +2 -2
- package/dist/{prompts-DMwoay8l.cjs → prompts-CDbQrutV.cjs} +3 -2
- package/dist/prompts-CDbQrutV.cjs.map +1 -0
- package/dist/{prompts-CzD0yl7Z.js → prompts-Dt3A8Qfl.js} +4 -2
- package/dist/prompts-Dt3A8Qfl.js.map +1 -0
- package/dist/prompts.cjs +2 -1
- package/dist/prompts.d.cts +3 -3
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +3 -3
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +2 -1
- package/dist/{resources-x-GaokG8.js → resources-Bol20Xuo.js} +13 -1
- package/dist/resources-Bol20Xuo.js.map +1 -0
- package/dist/{resources-D6TW2ER0.cjs → resources-DNyoutxH.cjs} +13 -1
- package/dist/resources-DNyoutxH.cjs.map +1 -0
- package/dist/resources.cjs +1 -1
- package/dist/resources.d.cts +9 -0
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +9 -0
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/{schema-C-MLkWMc.d.ts → schema-BJv7kREf.d.cts} +178 -66
- package/dist/schema-BJv7kREf.d.cts.map +1 -0
- package/dist/{schema-B8lT632E.cjs → schema-BTfISwFu.cjs} +29 -2
- package/dist/schema-BTfISwFu.cjs.map +1 -0
- package/dist/{schema-DqxkW9Tx.d.cts → schema-BnxGHL_i.d.ts} +178 -66
- package/dist/schema-BnxGHL_i.d.ts.map +1 -0
- package/dist/{schema-DkyWSqp_.cjs → schema-BsvGMALe.cjs} +37 -6
- package/dist/schema-BsvGMALe.cjs.map +1 -0
- package/dist/{schema-CewAKS9A.js → schema-C_hp0BR7.js} +32 -7
- package/dist/schema-C_hp0BR7.js.map +1 -0
- package/dist/schema-Dv6aLZgz.js +32 -0
- package/dist/schema-Dv6aLZgz.js.map +1 -0
- package/dist/schema.cjs +3 -1
- package/dist/schema.d.cts +13 -3
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +13 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/{server-qpWdf-ST.js → server-C7cHq_pc.js} +57 -9
- package/dist/server-C7cHq_pc.js.map +1 -0
- package/dist/{server-pGtEIwE3.cjs → server-DeutbO8v.cjs} +57 -9
- package/dist/server-DeutbO8v.cjs.map +1 -0
- package/dist/server.cjs +10 -10
- package/dist/server.d.cts +23 -4
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +23 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +10 -10
- package/dist/stdio-B73CCTly.cjs +47 -0
- package/dist/stdio-B73CCTly.cjs.map +1 -0
- package/dist/stdio-ZQLC-i5Q.js +41 -0
- package/dist/stdio-ZQLC-i5Q.js.map +1 -0
- package/dist/test-setup.cjs +420 -257
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +420 -257
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-Dp13BpEu.d.cts → toolDefinitions-BOMF-zIC.d.ts} +115 -17
- package/dist/toolDefinitions-BOMF-zIC.d.ts.map +1 -0
- package/dist/{toolDefinitions-BtHN8t_d.cjs → toolDefinitions-CUegGcWU.cjs} +117 -6
- package/dist/toolDefinitions-CUegGcWU.cjs.map +1 -0
- package/dist/{toolDefinitions-BSC2D_S-.js → toolDefinitions-DFAxp3nr.js} +117 -6
- package/dist/toolDefinitions-DFAxp3nr.js.map +1 -0
- package/dist/{toolDefinitions-fQrpWznJ.d.ts → toolDefinitions-Ipvr4Acw.d.cts} +115 -17
- package/dist/toolDefinitions-Ipvr4Acw.d.cts.map +1 -0
- package/dist/toolDefinitions.cjs +2 -2
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/toolDefinitions.test.cjs +2 -2
- package/dist/toolDefinitions.test.js +2 -2
- package/dist/{tools-4Rtn4WEf.js → tools-DpiQwSTY.js} +137 -11
- package/dist/tools-DpiQwSTY.js.map +1 -0
- package/dist/{tools-DHHqAqP9.cjs → tools-DyOqlsCW.cjs} +137 -11
- package/dist/tools-DyOqlsCW.cjs.map +1 -0
- package/dist/tools.cjs +4 -4
- package/dist/tools.d.cts +91 -7
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +91 -7
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +4 -4
- package/dist/tools.test.cjs +290 -10
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +290 -10
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +11 -11
- package/dist/transports/stdio.d.cts +26 -4
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +26 -4
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +11 -11
- package/dist/{types-CfJ51LyL.d.ts → types-D5TPcOfv.d.ts} +4 -3
- package/dist/types-D5TPcOfv.d.ts.map +1 -0
- package/dist/{types-CbLyQvVe.d.cts → types-DRF2IoP_.d.cts} +4 -3
- package/dist/types-DRF2IoP_.d.cts.map +1 -0
- package/dist/{types-DuUmV9zh.d.ts → types-Daq2fm0E.d.ts} +5 -3
- package/dist/types-Daq2fm0E.d.ts.map +1 -0
- package/dist/{types-CcffrLXB.d.cts → types-NIQW7KyF.d.cts} +5 -3
- package/dist/types-NIQW7KyF.d.cts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/{version-CRzAHHGZ.cjs → version-BNmubeQI.cjs} +2 -2
- package/dist/{version-CRzAHHGZ.cjs.map → version-BNmubeQI.cjs.map} +1 -1
- package/dist/version-CRto5Sn_.js +6 -0
- package/dist/{version-BT9r_3jm.js.map → version-CRto5Sn_.js.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/client-Bxf4MxOz.d.cts +0 -179
- package/dist/client-Bxf4MxOz.d.cts.map +0 -1
- package/dist/client-D5xFZtxK.js +0 -224
- package/dist/client-D5xFZtxK.js.map +0 -1
- package/dist/client-DOhBiaMJ.d.ts +0 -179
- package/dist/client-DOhBiaMJ.d.ts.map +0 -1
- package/dist/client-GKHZSXgV.cjs +0 -235
- package/dist/client-GKHZSXgV.cjs.map +0 -1
- package/dist/issue-helpers-71XgJVXC.cjs.map +0 -1
- package/dist/issue-helpers-CSNNO03f.js.map +0 -1
- package/dist/promptDefinitions-D3ll3qCd.cjs.map +0 -1
- package/dist/promptDefinitions-DMucOchd.d.cts.map +0 -1
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +0 -1
- package/dist/promptDefinitions-aKmUZWWO.js.map +0 -1
- package/dist/prompts-CzD0yl7Z.js.map +0 -1
- package/dist/prompts-DMwoay8l.cjs.map +0 -1
- package/dist/resources-D6TW2ER0.cjs.map +0 -1
- package/dist/resources-x-GaokG8.js.map +0 -1
- package/dist/schema-B8lT632E.cjs.map +0 -1
- package/dist/schema-BkHf97d7.js +0 -17
- package/dist/schema-BkHf97d7.js.map +0 -1
- package/dist/schema-C-MLkWMc.d.ts.map +0 -1
- package/dist/schema-CewAKS9A.js.map +0 -1
- package/dist/schema-DkyWSqp_.cjs.map +0 -1
- package/dist/schema-DqxkW9Tx.d.cts.map +0 -1
- package/dist/server-pGtEIwE3.cjs.map +0 -1
- package/dist/server-qpWdf-ST.js.map +0 -1
- package/dist/stdio-D8u2W847.js +0 -19
- package/dist/stdio-D8u2W847.js.map +0 -1
- package/dist/stdio-DydB2Pxu.cjs +0 -25
- package/dist/stdio-DydB2Pxu.cjs.map +0 -1
- package/dist/toolDefinitions-BSC2D_S-.js.map +0 -1
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +0 -1
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +0 -1
- package/dist/toolDefinitions-fQrpWznJ.d.ts.map +0 -1
- package/dist/tools-4Rtn4WEf.js.map +0 -1
- package/dist/tools-DHHqAqP9.cjs.map +0 -1
- package/dist/types-CbLyQvVe.d.cts.map +0 -1
- package/dist/types-CcffrLXB.d.cts.map +0 -1
- package/dist/types-CfJ51LyL.d.ts.map +0 -1
- package/dist/types-DuUmV9zh.d.ts.map +0 -1
- package/dist/version-BT9r_3jm.js +0 -6
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server-qpWdf-ST.js","names":["error: unknown","args: Record<string, any>"],"sources":["../src/server.ts"],"sourcesContent":["import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { TOOL_HANDLERS } from \"./tools\";\nimport { TOOL_DEFINITIONS } from \"./toolDefinitions\";\nimport type { ServerContext } from \"./types\";\nimport { setTag, setUser, startNewTrace, startSpan } from \"@sentry/core\";\nimport { logError } from \"./logging\";\nimport { RESOURCES } from \"./resources\";\nimport { PROMPT_DEFINITIONS } from \"./promptDefinitions\";\nimport { PROMPT_HANDLERS } from \"./prompts\";\nimport { ApiError } from \"./api-client\";\nimport { UserInputError } from \"./errors\";\n\nfunction isApiError(error: unknown) {\n return error instanceof ApiError || Object.hasOwn(error as any, \"status\");\n}\n\nfunction isUserInputError(error: unknown) {\n return error instanceof UserInputError;\n}\n\nasync function logAndFormatError(error: unknown) {\n if (isUserInputError(error)) {\n const typedError = error as UserInputError;\n return [\n \"**Input Error**\",\n \"It looks like there was a problem with the input you provided.\",\n typedError.message,\n `You may be able to resolve the issue by addressing the concern and trying again.`,\n ].join(\"\\n\\n\");\n }\n\n if (isApiError(error)) {\n const typedError = error as ApiError;\n return [\n \"**Error**\",\n `There was an HTTP ${typedError.status} error with the your request to the Sentry API.`,\n `${typedError.message}`,\n `You may be able to resolve the issue by addressing the concern and trying again.`,\n ].join(\"\\n\\n\");\n }\n\n const eventId = logError(error);\n\n return [\n \"**Error**\",\n \"It looks like there was a problem communicating with the Sentry API.\",\n \"Please report the following to the user for the Sentry team:\",\n `**Event ID**: ${eventId}`,\n process.env.NODE_ENV !== \"production\"\n ? error instanceof Error\n ? error.message\n : String(error)\n : \"\",\n ].join(\"\\n\\n\");\n}\n\n/**\n * Take the arguments from something like an MCP tool call and format\n * them in an OTel-safe way.\n */\nfunction extractMcpParameters(args: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(args).map(([key, value]) => {\n return [`mcp.param.${key}`, JSON.stringify(value)];\n }),\n );\n}\n\nexport async function configureServer({\n server,\n context,\n onToolComplete,\n}: { server: McpServer; context: ServerContext; onToolComplete?: () => void }) {\n server.server.onerror = (error) => {\n logError(error);\n };\n\n for (const resource of RESOURCES) {\n server.resource(\n resource.name,\n resource.uri,\n {\n description: resource.description,\n mimeType: resource.mimeType,\n },\n // TODO: this doesnt support any error handling afaict via the spec\n async (url) => {\n return await startNewTrace(async () => {\n return await startSpan(\n { name: `mcp.resource/${resource.name}` },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n if (context.clientId) {\n setTag(\"client.id\", context.clientId);\n }\n\n return resource.handler(url);\n },\n );\n });\n },\n );\n }\n\n for (const prompt of PROMPT_DEFINITIONS) {\n const handler = PROMPT_HANDLERS[prompt.name];\n\n server.prompt(\n prompt.name,\n prompt.description,\n prompt.paramsSchema ? prompt.paramsSchema : {},\n async (...args) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n {\n name: `mcp.prompt/${prompt.name}`,\n attributes: extractMcpParameters(args),\n },\n async (span) => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n if (context.clientId) {\n setTag(\"client.id\", context.clientId);\n }\n try {\n // TODO(dcramer): I'm too dumb to figure this out\n // @ts-ignore\n const output = await handler(context, ...args);\n span.setStatus({\n code: 1, // ok\n });\n return {\n messages: [\n {\n role: \"user\",\n content: {\n type: \"text\",\n text: output,\n },\n },\n ],\n };\n } catch (error) {\n span.setStatus({\n code: 2, // error\n });\n throw error;\n }\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n\n for (const tool of TOOL_DEFINITIONS) {\n const handler = TOOL_HANDLERS[tool.name];\n\n server.tool(\n tool.name as string,\n tool.description,\n tool.paramsSchema ? tool.paramsSchema : {},\n async (...args) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n {\n name: `mcp.tool/${tool.name}`,\n attributes: extractMcpParameters(args),\n },\n async (span) => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n if (context.clientId) {\n setTag(\"client.id\", context.clientId);\n }\n\n try {\n // TODO(dcramer): I'm too dumb to figure this out\n // @ts-ignore\n const output = await handler(context, ...args);\n span.setStatus({\n code: 1, // ok\n });\n return {\n content: [\n {\n type: \"text\",\n text: output,\n },\n ],\n };\n } catch (error) {\n span.setStatus({\n code: 2, // error\n });\n return {\n content: [\n {\n type: \"text\",\n text: await logAndFormatError(error),\n },\n ],\n isError: true,\n };\n }\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n}\n"],"mappings":";;;;;;;;;;;AAYA,SAAS,WAAWA,OAAgB;AAClC,QAAO,iBAAiB,YAAY,OAAO,OAAO,OAAc,SAAS;AAC1E;AAED,SAAS,iBAAiBA,OAAgB;AACxC,QAAO,iBAAiB;AACzB;AAED,eAAe,kBAAkBA,OAAgB;AAC/C,KAAI,iBAAiB,MAAM,EAAE;EAC3B,MAAM,aAAa;AACnB,SAAO;GACL;GACA;GACA,WAAW;IACV;EACF,EAAC,KAAK,OAAO;CACf;AAED,KAAI,WAAW,MAAM,EAAE;EACrB,MAAM,aAAa;AACnB,SAAO;GACL;IACC,oBAAoB,WAAW,OAAO;IACtC,EAAE,WAAW,QAAQ;IACrB;EACF,EAAC,KAAK,OAAO;CACf;CAED,MAAM,UAAU,SAAS,MAAM;AAE/B,QAAO;EACL;EACA;EACA;GACC,gBAAgB,QAAQ;EACzB,QAAQ,IAAI,aAAa,eACrB,iBAAiB,QACf,MAAM,UACN,OAAO,MAAM,GACf;CACL,EAAC,KAAK,OAAO;AACf;;;;;AAMD,SAAS,qBAAqBC,MAA2B;AACvD,QAAO,OAAO,YACZ,OAAO,QAAQ,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,MAAM,KAAK;AACzC,SAAO,EAAE,YAAY,IAAI,GAAG,KAAK,UAAU,MAAM,AAAC;CACnD,EAAC,CACH;AACF;AAED,eAAsB,gBAAgB,EACpC,QACA,SACA,gBAC2E,EAAE;AAC7E,QAAO,OAAO,UAAU,CAAC,UAAU;AACjC,WAAS,MAAM;CAChB;AAED,MAAK,MAAM,YAAY,UACrB,QAAO,SACL,SAAS,MACT,SAAS,KACT;EACE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B,OAAI;AACF,WAAO,MAAM,cAAc,YAAY;AACrC,YAAO,MAAM,UACX;MACE,OAAO,WAAW,KAAK,KAAK;MAC5B,YAAY,qBAAqB,KAAK;KACvC,GACD,OAAO,SAAS;AACd,UAAI,QAAQ,OACV,SAAQ,EACN,IAAI,QAAQ,OACb,EAAC;AAEJ,UAAI,QAAQ,SACV,QAAO,aAAa,QAAQ,SAAS;AAGvC,UAAI;OAGF,MAAM,SAAS,MAAM,QAAQ,SAAS,GAAG,KAAK;AAC9C,YAAK,UAAU,EACb,MAAM,EACP,EAAC;AACF,cAAO,EACL,SAAS,CACP;QACE,MAAM;QACN,MAAM;OACP,CACF,EACF;MACF,SAAQ,OAAO;AACd,YAAK,UAAU,EACb,MAAM,EACP,EAAC;AACF,cAAO;QACL,SAAS,CACP;SACE,MAAM;SACN,MAAM,MAAM,kBAAkB,MAAM;QACrC,CACF;QACD,SAAS;OACV;MACF;KACF,EACF;IACF,EAAC;GACH,UAAS;AACR,sBAAkB;GACnB;EACF,EACF;CACF;AACF"}
|
package/dist/stdio-D8u2W847.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { configureServer } from "./server-qpWdf-ST.js";
|
|
2
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
-
import * as Sentry from "@sentry/node";
|
|
4
|
-
|
|
5
|
-
//#region src/transports/stdio.ts
|
|
6
|
-
async function startStdio(server, context) {
|
|
7
|
-
await Sentry.startNewTrace(async () => {
|
|
8
|
-
const transport = new StdioServerTransport();
|
|
9
|
-
await configureServer({
|
|
10
|
-
server,
|
|
11
|
-
context
|
|
12
|
-
});
|
|
13
|
-
await server.connect(transport);
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
export { startStdio };
|
|
19
|
-
//# sourceMappingURL=stdio-D8u2W847.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stdio-D8u2W847.js","names":["server: McpServer","context: ServerContext"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["import { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { configureServer } from \"../server\";\nimport type { ServerContext } from \"../types\";\nimport * as Sentry from \"@sentry/node\";\n\nexport async function startStdio(server: McpServer, context: ServerContext) {\n await Sentry.startNewTrace(async () => {\n const transport = new StdioServerTransport();\n await configureServer({ server, context });\n await server.connect(transport);\n });\n}\n"],"mappings":";;;;;AAMA,eAAsB,WAAWA,QAAmBC,SAAwB;AAC1E,OAAM,OAAO,cAAc,YAAY;EACrC,MAAM,YAAY,IAAI;AACtB,QAAM,gBAAgB;GAAE;GAAQ;EAAS,EAAC;AAC1C,QAAM,OAAO,QAAQ,UAAU;CAChC,EAAC;AACH"}
|
package/dist/stdio-DydB2Pxu.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
-
const require_server = require('./server-pGtEIwE3.cjs');
|
|
3
|
-
const __modelcontextprotocol_sdk_server_stdio_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/stdio.js"));
|
|
4
|
-
const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
|
|
5
|
-
|
|
6
|
-
//#region src/transports/stdio.ts
|
|
7
|
-
async function startStdio(server, context) {
|
|
8
|
-
await __sentry_node.startNewTrace(async () => {
|
|
9
|
-
const transport = new __modelcontextprotocol_sdk_server_stdio_js.StdioServerTransport();
|
|
10
|
-
await require_server.configureServer({
|
|
11
|
-
server,
|
|
12
|
-
context
|
|
13
|
-
});
|
|
14
|
-
await server.connect(transport);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
Object.defineProperty(exports, 'startStdio', {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return startStdio;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=stdio-DydB2Pxu.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stdio-DydB2Pxu.cjs","names":["server: McpServer","context: ServerContext","StdioServerTransport"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["import { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { configureServer } from \"../server\";\nimport type { ServerContext } from \"../types\";\nimport * as Sentry from \"@sentry/node\";\n\nexport async function startStdio(server: McpServer, context: ServerContext) {\n await Sentry.startNewTrace(async () => {\n const transport = new StdioServerTransport();\n await configureServer({ server, context });\n await server.connect(transport);\n });\n}\n"],"mappings":";;;;;;AAMA,eAAsB,WAAWA,QAAmBC,SAAwB;AAC1E,OAAM,cAAO,cAAc,YAAY;EACrC,MAAM,YAAY,IAAIC;AACtB,QAAM,+BAAgB;GAAE;GAAQ;EAAS,EAAC;AAC1C,QAAM,OAAO,QAAQ,UAAU;CAChC,EAAC;AACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolDefinitions-BSC2D_S-.js","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":["// TODO: this gets imported by the client code and thus is separated from server code\n// to avoid bundling issues. We'd like to find a better solution that isnt so brittle and keeps this code co-located w/ its tool calls.\nimport {\n ParamOrganizationSlug,\n ParamIssueShortId,\n ParamPlatform,\n ParamProjectSlug,\n ParamQuery,\n ParamTransaction,\n ParamRegionUrl,\n ParamProjectSlugOrAll,\n ParamIssueUrl,\n ParamTeamSlug,\n} from \"./schema\";\nimport { z } from \"zod\";\n\nexport const TOOL_DEFINITIONS = [\n {\n name: \"whoami\" as const,\n description: [\n \"Identify the authenticated user in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the user's name and email address.\",\n ].join(\"\\n\"),\n paramsSchema: {\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_organizations\" as const,\n description: [\n \"Find organizations that the user has access to in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all organizations in Sentry\",\n \"- Find an organization's slug to aid other tool requests\",\n ].join(\"\\n\"),\n paramsSchema: {\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_teams\" as const,\n description: [\n \"Find teams in an organization in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all teams in a Sentry organization\",\n \"- Find a team's slug to aid other tool requests\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_projects\" as const,\n description: [\n \"Find projects in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all projects in a Sentry organization\",\n \"- Find a project's slug to aid other tool requests\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_issues\" as const,\n description: [\n \"Find issues in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all issues in a Sentry organization\",\n \"\",\n \"If you're looking for more granular data beyond a summary of identified problems, you should use the `find_errors()` or `find_transactions()` tools instead.\",\n \"\",\n \"<examples>\",\n \"### Find the newest unresolved issues across 'my-organization'\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', query='is:unresolved', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"### Find the most frequently occurring crashes in the 'my-project' project\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', projectSlug='my-project', query='is:unresolved error.handled:false', sortBy='count')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"first_seen\", \"count\", \"userCount\"])\n .describe(\n \"Sort the results either by the last time they occurred, the first time they occurred, the count of occurrences, or the number of users affected.\",\n )\n .optional(),\n },\n },\n {\n name: \"find_releases\" as const,\n description: [\n \"Find releases in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find recent releases in a Sentry organization\",\n \"- Find the most recent version released of a specific project\",\n \"- Determine when a release was deployed to an environment\",\n \"\",\n \"<examples>\",\n \"### Find the most recent releases in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"find_releases(organizationSlug='my-organization')\",\n \"```\",\n \"\",\n \"### Find releases matching '2ce6a27' in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"find_releases(organizationSlug='my-organization', query='2ce6a27')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlugOrAll.optional(),\n query: z\n .string()\n .trim()\n .describe(\"Search for versions which contain the provided string.\")\n .optional(),\n },\n },\n {\n name: \"find_tags\" as const,\n description: [\n \"Find tags in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find tags available to use in search queries (such as `find_issues()` or `find_errors()`)\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"get_issue_details\" as const,\n description: [\n \"Retrieve issue details from Sentry for a specific Issue ID, including the stacktrace and error message if available. Either issueId or issueUrl MUST be provided.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Investigate a specific production error\",\n \"- Access detailed error information and stacktraces from Sentry\",\n \"\",\n \"<examples>\",\n \"### Get details for issue ID 'CLOUDFLARE-MCP-41'\",\n \"\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')\",\n \"```\",\n \"\",\n \"### Get details for event ID 'c49541c747cb4d8aa3efb70ca5aba243'\",\n \"\",\n \"```\",\n \"get_event_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"</examples>\",\n\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other parameters.\",\n \"- If the user provides `issueId` or `eventId` (only one is needed), `organizationSlug` is required.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n eventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n {\n name: \"find_errors\" as const,\n description: [\n \"Find errors in Sentry using advanced search syntax.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production errors in a specific file.\",\n \"- Analyze error patterns and frequencies.\",\n \"- Find recent or frequently occurring errors.\",\n \"\",\n \"<examples>\",\n \"### Find common errors within a file\",\n \"\",\n \"To find common errors within a file, you can use the `filename` parameter. This is a suffix based search, so only using the filename or the direct parent folder of the file. The parent folder is preferred when the filename is in a subfolder or a common filename. If you provide generic filenames like `index.js` you're going to end up finding errors that are might be from completely different projects.\",\n \"\",\n \"```\",\n \"find_errors(organizationSlug='my-organization', filename='index.js', sortBy='count')\",\n \"```\",\n \"\",\n \"### Find recent crashes from the 'peated' project\",\n \"\",\n \"```\",\n \"find_errors(organizationSlug='my-organization', query='is:unresolved error.handled:false', projectSlug='peated', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `find_organizations()` first.\",\n \"- If you are looking for issues, in a way that you might be looking for something like 'unresolved errors', you should use the `find_issues()` tool\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlugOrAll.optional(),\n filename: z\n .string()\n .trim()\n .describe(\"The filename to search for errors in.\")\n .optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"count\"])\n .optional()\n .default(\"last_seen\")\n .describe(\n \"Sort the results either by the last time they occurred or the count of occurrences.\",\n ),\n },\n },\n {\n name: \"find_transactions\" as const,\n description: [\n \"Find transactions in Sentry using advanced search syntax.\",\n \"\",\n \"Transactions are segments of traces that are associated with a specific route or endpoint.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production transaction data to understand performance.\",\n \"- Analyze traces and latency patterns.\",\n \"- Find examples of recent requests to endpoints.\",\n \"\",\n \"<examples>\",\n \"### Find slow requests to a route\",\n \"\",\n \"...\",\n \"\",\n \"```\",\n \"find_transactions(organizationSlug='my-organization', transaction='/checkout', sortBy='latency')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `find_organizations()` first.\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlugOrAll.optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"timestamp\", \"duration\"])\n .optional()\n .default(\"timestamp\")\n .describe(\n \"Sort the results either by the timestamp of the request (most recent first) or the duration of the request (longest first).\",\n ),\n },\n },\n {\n name: \"create_team\" as const,\n description: [\n \"Create a new team in Sentry.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new team in a Sentry organization\",\n \"\",\n \"<hints>\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n name: z.string().trim().describe(\"The name of the team to create.\"),\n },\n },\n {\n name: \"create_project\" as const,\n description: [\n \"Create a new project in Sentry, giving you access to a new SENTRY_DSN.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new project in a Sentry organization\",\n \"\",\n \"<examples>\",\n \"### Create a new javascript project in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"create_project(organizationSlug='my-organization', teamSlug='my-team', name='my-project', platform='javascript')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<teamSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n teamSlug: ParamTeamSlug,\n name: z\n .string()\n .trim()\n .describe(\n \"The name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.\",\n ),\n platform: ParamPlatform.optional(),\n },\n },\n {\n name: \"create_dsn\" as const,\n description: [\n \"Create a new Sentry DSN for a specific project.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new DSN for a specific project\",\n \"\",\n \"<examples>\",\n \"### Create a new DSN for the 'my-project' project\",\n \"\",\n \"```\",\n \"create_dsn(organizationSlug='my-organization', projectSlug='my-project', name='Production')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z\n .string()\n .trim()\n .describe(\"The name of the DSN to create, for example 'Production'.\"),\n },\n },\n {\n name: \"find_dsns\" as const,\n description: [\n \"List all Sentry DSNs for a specific project.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Retrieve a SENTRY_DSN for a specific project\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `find_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n },\n },\n {\n name: \"begin_seer_issue_fix\" as const,\n description: [\n \"Use Seer to analyze an issue in Sentry, identify a root cause, and suggest a fix for it.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Determine the root cause of an issue.\",\n \"- Generate a plan for fixing an issue.\",\n \"- Implement a fix for an issue.\",\n \"\",\n \"This operation may take some time, so you should call `get_seer_issue_fix_status()` to check the status of the analysis after you begin it.\",\n \"\",\n \"<examples>\",\n \"### Analyze and propose a fix for 'ISSUE-123' in Sentry\",\n \"\",\n \"```\",\n \"begin_seer_issue_fix(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Always check to see if an issue fix is already in progress for before calling this tool by using `get_seer_issue_fix_status()`.\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n {\n name: \"get_seer_issue_fix_status\" as const,\n description: [\n \"Get the status of a root cause analysis for an issue in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the root cause analysis for an issue.\",\n \"- Get the status of a fix for an issue.\",\n \"\",\n \"<examples>\",\n \"### Get the status of a fix for the 'ISSUE-123' issue\",\n \"\",\n \"```\",\n \"get_seer_issue_fix_status(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n];\n"],"mappings":";;;;AAgBA,MAAa,mBAAmB;CAC9B;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc,EACZ,WAAW,eAAe,UAAU,CACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc,EACZ,WAAW,eAAe,UAAU,CACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,aAAa,iBAAiB,UAAU;GACxC,OAAO,WAAW,UAAU;GAC5B,QAAQ,EACL,KAAK;IAAC;IAAa;IAAc;IAAS;GAAY,EAAC,CACvD,SACC,mJACD,CACA,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,aAAa,sBAAsB,UAAU;GAC7C,OAAO,EACJ,QAAQ,CACR,MAAM,CACN,SAAS,yDAAyD,CAClE,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,uBAAuB,CAAC,UAAU;GACtE,UAAU,cAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,aAAa,sBAAsB,UAAU;GAC7C,UAAU,EACP,QAAQ,CACR,MAAM,CACN,SAAS,wCAAwC,CACjD,UAAU;GACb,aAAa,iBAAiB,UAAU;GACxC,OAAO,WAAW,UAAU;GAC5B,QAAQ,EACL,KAAK,CAAC,aAAa,OAAQ,EAAC,CAC5B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,sFACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,aAAa,sBAAsB,UAAU;GAC7C,aAAa,iBAAiB,UAAU;GACxC,OAAO,WAAW,UAAU;GAC5B,QAAQ,EACL,KAAK,CAAC,aAAa,UAAW,EAAC,CAC/B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,8HACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,kCAAkC;EACpE;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,UAAU;GACV,MAAM,EACH,QAAQ,CACR,MAAM,CACN,SACC,oJACD;GACH,UAAU,cAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,aAAa;GACb,MAAM,EACH,QAAQ,CACR,MAAM,CACN,SAAS,2DAA2D;EACxE;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB;GAClB,WAAW,eAAe,UAAU;GACpC,aAAa;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,UAAU,cAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,UAAU,cAAc,UAAU;EACnC;CACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolDefinitions-BtHN8t_d.cjs","names":["ParamOrganizationSlug","ParamTeamSlug","ParamProjectSlug"],"sources":["../src/toolDefinitions.ts"],"sourcesContent":["// TODO: this gets imported by the client code and thus is separated from server code\n// to avoid bundling issues. We'd like to find a better solution that isnt so brittle and keeps this code co-located w/ its tool calls.\nimport {\n ParamOrganizationSlug,\n ParamIssueShortId,\n ParamPlatform,\n ParamProjectSlug,\n ParamQuery,\n ParamTransaction,\n ParamRegionUrl,\n ParamProjectSlugOrAll,\n ParamIssueUrl,\n ParamTeamSlug,\n} from \"./schema\";\nimport { z } from \"zod\";\n\nexport const TOOL_DEFINITIONS = [\n {\n name: \"whoami\" as const,\n description: [\n \"Identify the authenticated user in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the user's name and email address.\",\n ].join(\"\\n\"),\n paramsSchema: {\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_organizations\" as const,\n description: [\n \"Find organizations that the user has access to in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all organizations in Sentry\",\n \"- Find an organization's slug to aid other tool requests\",\n ].join(\"\\n\"),\n paramsSchema: {\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_teams\" as const,\n description: [\n \"Find teams in an organization in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all teams in a Sentry organization\",\n \"- Find a team's slug to aid other tool requests\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_projects\" as const,\n description: [\n \"Find projects in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all projects in a Sentry organization\",\n \"- Find a project's slug to aid other tool requests\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"find_issues\" as const,\n description: [\n \"Find issues in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all issues in a Sentry organization\",\n \"\",\n \"If you're looking for more granular data beyond a summary of identified problems, you should use the `find_errors()` or `find_transactions()` tools instead.\",\n \"\",\n \"<examples>\",\n \"### Find the newest unresolved issues across 'my-organization'\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', query='is:unresolved', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"### Find the most frequently occurring crashes in the 'my-project' project\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', projectSlug='my-project', query='is:unresolved error.handled:false', sortBy='count')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"first_seen\", \"count\", \"userCount\"])\n .describe(\n \"Sort the results either by the last time they occurred, the first time they occurred, the count of occurrences, or the number of users affected.\",\n )\n .optional(),\n },\n },\n {\n name: \"find_releases\" as const,\n description: [\n \"Find releases in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find recent releases in a Sentry organization\",\n \"- Find the most recent version released of a specific project\",\n \"- Determine when a release was deployed to an environment\",\n \"\",\n \"<examples>\",\n \"### Find the most recent releases in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"find_releases(organizationSlug='my-organization')\",\n \"```\",\n \"\",\n \"### Find releases matching '2ce6a27' in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"find_releases(organizationSlug='my-organization', query='2ce6a27')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlugOrAll.optional(),\n query: z\n .string()\n .trim()\n .describe(\"Search for versions which contain the provided string.\")\n .optional(),\n },\n },\n {\n name: \"find_tags\" as const,\n description: [\n \"Find tags in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find tags available to use in search queries (such as `find_issues()` or `find_errors()`)\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"get_issue_details\" as const,\n description: [\n \"Retrieve issue details from Sentry for a specific Issue ID, including the stacktrace and error message if available. Either issueId or issueUrl MUST be provided.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Investigate a specific production error\",\n \"- Access detailed error information and stacktraces from Sentry\",\n \"\",\n \"<examples>\",\n \"### Get details for issue ID 'CLOUDFLARE-MCP-41'\",\n \"\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')\",\n \"```\",\n \"\",\n \"### Get details for event ID 'c49541c747cb4d8aa3efb70ca5aba243'\",\n \"\",\n \"```\",\n \"get_event_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"</examples>\",\n\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other parameters.\",\n \"- If the user provides `issueId` or `eventId` (only one is needed), `organizationSlug` is required.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n eventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n {\n name: \"find_errors\" as const,\n description: [\n \"Find errors in Sentry using advanced search syntax.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production errors in a specific file.\",\n \"- Analyze error patterns and frequencies.\",\n \"- Find recent or frequently occurring errors.\",\n \"\",\n \"<examples>\",\n \"### Find common errors within a file\",\n \"\",\n \"To find common errors within a file, you can use the `filename` parameter. This is a suffix based search, so only using the filename or the direct parent folder of the file. The parent folder is preferred when the filename is in a subfolder or a common filename. If you provide generic filenames like `index.js` you're going to end up finding errors that are might be from completely different projects.\",\n \"\",\n \"```\",\n \"find_errors(organizationSlug='my-organization', filename='index.js', sortBy='count')\",\n \"```\",\n \"\",\n \"### Find recent crashes from the 'peated' project\",\n \"\",\n \"```\",\n \"find_errors(organizationSlug='my-organization', query='is:unresolved error.handled:false', projectSlug='peated', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `find_organizations()` first.\",\n \"- If you are looking for issues, in a way that you might be looking for something like 'unresolved errors', you should use the `find_issues()` tool\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlugOrAll.optional(),\n filename: z\n .string()\n .trim()\n .describe(\"The filename to search for errors in.\")\n .optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"count\"])\n .optional()\n .default(\"last_seen\")\n .describe(\n \"Sort the results either by the last time they occurred or the count of occurrences.\",\n ),\n },\n },\n {\n name: \"find_transactions\" as const,\n description: [\n \"Find transactions in Sentry using advanced search syntax.\",\n \"\",\n \"Transactions are segments of traces that are associated with a specific route or endpoint.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production transaction data to understand performance.\",\n \"- Analyze traces and latency patterns.\",\n \"- Find examples of recent requests to endpoints.\",\n \"\",\n \"<examples>\",\n \"### Find slow requests to a route\",\n \"\",\n \"...\",\n \"\",\n \"```\",\n \"find_transactions(organizationSlug='my-organization', transaction='/checkout', sortBy='latency')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `find_organizations()` first.\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlugOrAll.optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"timestamp\", \"duration\"])\n .optional()\n .default(\"timestamp\")\n .describe(\n \"Sort the results either by the timestamp of the request (most recent first) or the duration of the request (longest first).\",\n ),\n },\n },\n {\n name: \"create_team\" as const,\n description: [\n \"Create a new team in Sentry.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new team in a Sentry organization\",\n \"\",\n \"<hints>\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n name: z.string().trim().describe(\"The name of the team to create.\"),\n },\n },\n {\n name: \"create_project\" as const,\n description: [\n \"Create a new project in Sentry, giving you access to a new SENTRY_DSN.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new project in a Sentry organization\",\n \"\",\n \"<examples>\",\n \"### Create a new javascript project in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"create_project(organizationSlug='my-organization', teamSlug='my-team', name='my-project', platform='javascript')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<teamSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n teamSlug: ParamTeamSlug,\n name: z\n .string()\n .trim()\n .describe(\n \"The name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.\",\n ),\n platform: ParamPlatform.optional(),\n },\n },\n {\n name: \"create_dsn\" as const,\n description: [\n \"Create a new Sentry DSN for a specific project.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new DSN for a specific project\",\n \"\",\n \"<examples>\",\n \"### Create a new DSN for the 'my-project' project\",\n \"\",\n \"```\",\n \"create_dsn(organizationSlug='my-organization', projectSlug='my-project', name='Production')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z\n .string()\n .trim()\n .describe(\"The name of the DSN to create, for example 'Production'.\"),\n },\n },\n {\n name: \"find_dsns\" as const,\n description: [\n \"List all Sentry DSNs for a specific project.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Retrieve a SENTRY_DSN for a specific project\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `find_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n },\n },\n {\n name: \"begin_seer_issue_fix\" as const,\n description: [\n \"Use Seer to analyze an issue in Sentry, identify a root cause, and suggest a fix for it.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Determine the root cause of an issue.\",\n \"- Generate a plan for fixing an issue.\",\n \"- Implement a fix for an issue.\",\n \"\",\n \"This operation may take some time, so you should call `get_seer_issue_fix_status()` to check the status of the analysis after you begin it.\",\n \"\",\n \"<examples>\",\n \"### Analyze and propose a fix for 'ISSUE-123' in Sentry\",\n \"\",\n \"```\",\n \"begin_seer_issue_fix(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Always check to see if an issue fix is already in progress for before calling this tool by using `get_seer_issue_fix_status()`.\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n {\n name: \"get_seer_issue_fix_status\" as const,\n description: [\n \"Get the status of a root cause analysis for an issue in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the root cause analysis for an issue.\",\n \"- Get the status of a fix for an issue.\",\n \"\",\n \"<examples>\",\n \"### Get the status of a fix for the 'ISSUE-123' issue\",\n \"\",\n \"```\",\n \"get_seer_issue_fix_status(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n];\n"],"mappings":";;;;;AAgBA,MAAa,mBAAmB;CAC9B;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc,EACZ,WAAW,8BAAe,UAAU,CACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc,EACZ,WAAW,8BAAe,UAAU,CACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;GACpC,aAAa,gCAAiB,UAAU;GACxC,OAAO,0BAAW,UAAU;GAC5B,QAAQ,MACL,KAAK;IAAC;IAAa;IAAc;IAAS;GAAY,EAAC,CACvD,SACC,mJACD,CACA,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;GACpC,aAAa,qCAAsB,UAAU;GAC7C,OAAO,MACJ,QAAQ,CACR,MAAM,CACN,SAAS,yDAAyD,CAClE,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,SAAS,MAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,uBAAuB,CAAC,UAAU;GACtE,UAAU,6BAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;GACpC,aAAa,qCAAsB,UAAU;GAC7C,UAAU,MACP,QAAQ,CACR,MAAM,CACN,SAAS,wCAAwC,CACjD,UAAU;GACb,aAAa,gCAAiB,UAAU;GACxC,OAAO,0BAAW,UAAU;GAC5B,QAAQ,MACL,KAAK,CAAC,aAAa,OAAQ,EAAC,CAC5B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,sFACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;GACpC,aAAa,qCAAsB,UAAU;GAC7C,aAAa,gCAAiB,UAAU;GACxC,OAAO,0BAAW,UAAU;GAC5B,QAAQ,MACL,KAAK,CAAC,aAAa,UAAW,EAAC,CAC/B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,8HACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;GACpC,MAAM,MAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,kCAAkC;EACpE;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBA;GAClB,WAAW,8BAAe,UAAU;GACpC,UAAUC;GACV,MAAM,MACH,QAAQ,CACR,MAAM,CACN,SACC,oJACD;GACH,UAAU,6BAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBD;GAClB,WAAW,8BAAe,UAAU;GACpC,aAAaE;GACb,MAAM,MACH,QAAQ,CACR,MAAM,CACN,SAAS,2DAA2D;EACxE;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkBF;GAClB,WAAW,8BAAe,UAAU;GACpC,aAAaE;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,UAAU,6BAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,UAAU,6BAAc,UAAU;EACnC;CACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolDefinitions-Dp13BpEu.d.cts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":[],"mappings":";;;cAgBa;;EAAA,WAAA,EAAA,MAscZ;EAAA,YAAA,EAAA;IAAA,SAAA,eAAA,CAAA,CAAA,CAAA,SAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolDefinitions-fQrpWznJ.d.ts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":[],"mappings":";;;cAgBa;;EAAA,WAAA,EAAA,MAscZ;EAAA,YAAA,EAAA;IAAA,SAAA,eAAA,CAAA,CAAA,CAAA,SAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tools-4Rtn4WEf.js","names":["context: ServerContext","opts: { regionUrl?: string }","orgSlug","issue","event","clientKey: ClientKey | null","step: z.infer<typeof AutofixRunStepSchema>","typedStep"],"sources":["../src/tools.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport {\n type AutofixRunStepDefaultSchema,\n type AutofixRunStepRootCauseAnalysisSchema,\n type AutofixRunStepSchema,\n type AutofixRunStepSolutionSchema,\n type ClientKey,\n SentryApiService,\n} from \"./api-client/index\";\nimport { formatIssueOutput } from \"./internal/formatting\";\nimport { parseIssueParams } from \"./internal/issue-helpers\";\nimport { logError } from \"./logging\";\nimport type { ServerContext, ToolHandlers } from \"./types\";\nimport { setTag } from \"@sentry/core\";\nimport { UserInputError } from \"./errors\";\n\nfunction apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.host;\n\n if (opts.regionUrl) {\n try {\n host = new URL(opts.regionUrl).host;\n } catch (error) {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`,\n );\n }\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n\nexport const TOOL_HANDLERS = {\n whoami: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const user = await apiService.getAuthenticatedUser();\n return `You are authenticated as ${user.name} (${user.email}).\\n\\nYour Sentry User ID is ${user.id}.`;\n },\n find_organizations: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizations = await apiService.listOrganizations();\n\n let output = \"# Organizations\\n\\n\";\n\n if (organizations.length === 0) {\n output += \"You don't appear to be a member of any organizations.\\n\";\n return output;\n }\n\n output += organizations\n .map((org) =>\n [\n `## **${org.slug}**`,\n \"\",\n `**Web URL:** ${org.links.organizationUrl}`,\n `**Region URL:** ${org.links.regionUrl}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n\n output += \"\\n\\n# Using this information\\n\\n\";\n output += `- The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\\n`;\n output += `- If a tool supports passing in the \\`regionUrl\\`, you MUST pass in the correct value there.\\n`;\n\n return output;\n },\n find_teams: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const teams = await apiService.listTeams(organizationSlug);\n let output = `# Teams in **${organizationSlug}**\\n\\n`;\n if (teams.length === 0) {\n output += \"No teams found.\\n\";\n return output;\n }\n output += teams.map((team) => `- ${team.slug}\\n`).join(\"\");\n return output;\n },\n find_projects: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const projects = await apiService.listProjects(organizationSlug);\n let output = `# Projects in **${organizationSlug}**\\n\\n`;\n if (projects.length === 0) {\n output += \"No projects found.\\n\";\n return output;\n }\n output += projects.map((project) => `- **${project.slug}**\\n`).join(\"\");\n return output;\n },\n find_issues: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const sortByMap = {\n last_seen: \"date\" as const,\n first_seen: \"new\" as const,\n count: \"freq\" as const,\n userCount: \"user\" as const,\n };\n const issues = await apiService.listIssues({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n sortBy: params.sortBy\n ? sortByMap[params.sortBy as keyof typeof sortByMap]\n : undefined,\n });\n let output = `# Issues in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (issues.length === 0) {\n output += \"No issues found.\\n\";\n return output;\n }\n output += issues\n .map((issue) =>\n [\n `## ${issue.shortId}`,\n \"\",\n `**Description**: ${issue.title}`,\n `**Culprit**: ${issue.culprit}`,\n `**First Seen**: ${new Date(issue.firstSeen).toISOString()}`,\n `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}`,\n `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n find_releases: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n\n const releases = await apiService.listReleases({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n });\n let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (releases.length === 0) {\n output += \"No releases found.\\n\";\n return output;\n }\n output += releases\n .map((release) => {\n const releaseInfo = [\n `## ${release.shortVersion}`,\n \"\",\n `**Created**: ${new Date(release.dateCreated).toISOString()}`,\n ];\n if (release.dateReleased) {\n releaseInfo.push(\n `**Released**: ${new Date(release.dateReleased).toISOString()}`,\n );\n }\n if (release.firstEvent) {\n releaseInfo.push(\n `**First Event**: ${new Date(release.firstEvent).toISOString()}`,\n );\n }\n if (release.lastEvent) {\n releaseInfo.push(\n `**Last Event**: ${new Date(release.lastEvent).toISOString()}`,\n );\n }\n if (release.newGroups !== undefined) {\n releaseInfo.push(`**New Issues**: ${release.newGroups}`);\n }\n if (release.projects && release.projects.length > 0) {\n releaseInfo.push(\n `**Projects**: ${release.projects.map((p) => p.name).join(\", \")}`,\n );\n }\n if (release.lastCommit) {\n releaseInfo.push(\"\", `### Last Commit`, \"\");\n releaseInfo.push(`**Commit ID**: ${release.lastCommit.id}`);\n releaseInfo.push(`**Commit Message**: ${release.lastCommit.message}`);\n releaseInfo.push(\n `**Commit Author**: ${release.lastCommit.author.name}`,\n );\n releaseInfo.push(\n `**Commit Date**: ${new Date(release.lastCommit.dateCreated).toISOString()}`,\n );\n }\n if (release.lastDeploy) {\n releaseInfo.push(\"\", `### Last Deploy`, \"\");\n releaseInfo.push(`**Deploy ID**: ${release.lastDeploy.id}`);\n releaseInfo.push(\n `**Environment**: ${release.lastDeploy.environment}`,\n );\n if (release.lastDeploy.dateStarted) {\n releaseInfo.push(\n `**Deploy Started**: ${new Date(release.lastDeploy.dateStarted).toISOString()}`,\n );\n }\n if (release.lastDeploy.dateFinished) {\n releaseInfo.push(\n `**Deploy Finished**: ${new Date(release.lastDeploy.dateFinished).toISOString()}`,\n );\n }\n }\n return releaseInfo.join(\"\\n\");\n })\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Release version in commit messages or documentation.\\n`;\n output += `- You can search for issues in a specific release using the \\`find_errors()\\` tool with the query \\`release:${releases.length ? releases[0]!.version : \"VERSION\"}\\`.\\n`;\n return output;\n },\n find_tags: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n\n const tagList = await apiService.listTags({ organizationSlug }, {});\n let output = `# Tags in **${organizationSlug}**\\n\\n`;\n if (tagList.length === 0) {\n output += \"No tags found.\\n\";\n return output;\n }\n output += tagList.map((tag) => [`- ${tag.key}`].join(\"\\n\")).join(\"\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\\n`;\n return output;\n },\n get_issue_details: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug;\n if (!orgSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `eventId`\",\n );\n }\n\n setTag(\"organization.slug\", orgSlug);\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: params.eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${params.eventId}`;\n }\n const event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId: params.eventId,\n });\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n }\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n\n const [issue, event] = await Promise.all([\n apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n ]);\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n },\n find_errors: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n if (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\n const eventList = await apiService.searchErrors({\n organizationSlug,\n projectSlug: params.projectSlug,\n filename: params.filename,\n query: params.query,\n transaction: params.transaction,\n sortBy: params.sortBy as \"last_seen\" | \"count\" | undefined,\n });\n let output = `# Errors in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These errors match the query \\`${params.query}\\`\\n`;\n if (params.filename)\n output += `These errors are limited to the file suffix \\`${params.filename}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.issue}\\n\\n`;\n output += `**Description**: ${eventSummary.title}\\n`;\n output += `**Issue ID**: ${eventSummary.issue}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, eventSummary.issue)}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**Last Seen**: ${eventSummary[\"last_seen()\"]}\\n`;\n output += `**Occurrences**: ${eventSummary[\"count()\"]}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n find_transactions: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n if (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\n const eventList = await apiService.searchSpans({\n organizationSlug,\n projectSlug: params.projectSlug,\n transaction: params.transaction,\n query: params.query,\n sortBy: params.sortBy as \"timestamp\" | \"duration\" | undefined,\n });\n let output = `# Transactions in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These spans match the query \\`${params.query}\\`\\n`;\n if (params.transaction)\n output += `These spans are limited to the transaction \\`${params.transaction}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.transaction}\\n\\n`;\n output += `**Span ID**: ${eventSummary.id}\\n`;\n output += `**Trace ID**: ${eventSummary.trace}\\n`;\n output += `**Span Operation**: ${eventSummary[\"span.op\"]}\\n`;\n output += `**Span Description**: ${eventSummary[\"span.description\"]}\\n`;\n output += `**Duration**: ${eventSummary[\"span.duration\"]}\\n`;\n output += `**Timestamp**: ${eventSummary.timestamp}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**URL**: ${apiService.getTraceUrl(organizationSlug, eventSummary.trace)}\\n\\n`;\n }\n return output;\n },\n create_team: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n\n const team = await apiService.createTeam({\n organizationSlug,\n name: params.name,\n });\n let output = `# New Team in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${team.id}\\n`;\n output += `**Slug**: ${team.slug}\\n`;\n output += `**Name**: ${team.name}\\n`;\n output += \"# Using this information\\n\\n\";\n output += `- You should always inform the user of the Team Slug value.\\n`;\n return output;\n },\n create_project: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"team.slug\", params.teamSlug);\n\n const project = await apiService.createProject({\n organizationSlug,\n teamSlug: params.teamSlug,\n name: params.name,\n platform: params.platform,\n });\n let clientKey: ClientKey | null = null;\n try {\n clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: project.slug,\n name: \"Default\",\n });\n } catch (err) {\n logError(err);\n }\n let output = `# New Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (clientKey) {\n output += `**SENTRY_DSN**: ${clientKey?.dsn.public}\\n\\n`;\n } else {\n output += \"**SENTRY_DSN**: There was an error fetching this value.\\n\\n\";\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\\n`;\n output += `- You should always inform the user of the **SENTRY_DSN** and Project Slug values.\\n`;\n return output;\n },\n create_dsn: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n const clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n });\n let output = `# New DSN in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n`;\n output += `**Name**: ${clientKey.name}\\n\\n`;\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n find_dsns: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n const clientKeys = await apiService.listClientKeys({\n organizationSlug,\n projectSlug: params.projectSlug,\n });\n let output = `# DSNs in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n if (clientKeys.length === 0) {\n output +=\n \"No DSNs were found.\\n\\nYou can create new one using the `create_dsn` tool.\";\n return output;\n }\n for (const clientKey of clientKeys) {\n output += `## ${clientKey.name}\\n`;\n output += `**ID**: ${clientKey.id}\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n begin_seer_issue_fix: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n const data = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n return [\n `# Issue Fix Started for Issue ${parsedIssueId}`,\n \"\",\n `**Run ID:**: ${data.run_id}`,\n \"\",\n \"This operation may take some time, so you should call `get_seer_issue_fix_status()` to check the status of the analysis, and repeat the process until its finished.\",\n \"\",\n \"You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..\",\n \"\",\n \"```\",\n params.issueUrl\n ? `get_seer_issue_fix_status(issueUrl=\"${params.issueUrl}\")`\n : `get_seer_issue_fix_status(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`,\n \"```\",\n ].join(\"\\n\");\n },\n get_seer_issue_fix_status: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n const { autofix } = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n let output = `# Issue Fix Status for Issue ${parsedIssueId}\\n\\n`;\n if (!autofix) {\n output += `No issue fix process found for ${parsedIssueId}.\\n\\nYou can initiate a new issue fix execution using the \\`begin_seer_issue_fix\\` tool.`;\n return output;\n }\n for (const step of autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n return output;\n },\n} satisfies ToolHandlers;\n\nfunction getOutputForAutofixStep(step: z.infer<typeof AutofixRunStepSchema>) {\n let output = `## ${step.title}\\n\\n`;\n\n if (step.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n return output;\n }\n\n if (step.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step. Please check back in a minute.**\\n\\n`;\n return output;\n }\n\n if (step.type === \"root_cause_analysis\") {\n const typedStep = step as z.infer<\n typeof AutofixRunStepRootCauseAnalysisSchema\n >;\n\n for (const cause of typedStep.causes) {\n if (typedStep.description) {\n output += `${typedStep.description}\\n\\n`;\n }\n for (const entry of cause.root_cause_reproduction) {\n output += `**${entry.title}**\\n\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n }\n return output;\n }\n\n if (step.type === \"solution\") {\n const typedStep = step as z.infer<typeof AutofixRunStepSolutionSchema>;\n output += `${typedStep.description}\\n\\n`;\n for (const entry of typedStep.solution) {\n output += `**${entry.title}**\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n\n if (typedStep.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n } else if (typedStep.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step.**\\n\\n`;\n }\n\n return output;\n }\n\n const typedStep = step as z.infer<typeof AutofixRunStepDefaultSchema>;\n if (typedStep.insights && typedStep.insights.length > 0) {\n for (const entry of typedStep.insights) {\n output += `**${entry.insight}**\\n`;\n output += `${entry.justification}\\n\\n`;\n }\n } else if (step.output_stream) {\n output += `${step.output_stream}\\n`;\n }\n\n return output;\n}\n"],"mappings":";;;;;;;;AAgBA,SAAS,sBACPA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,UACP,KAAI;AACF,SAAO,IAAI,IAAI,KAAK,WAAW;CAChC,SAAQ,OAAO;AACd,QAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;CAEjD;AAGH,QAAO,IAAI,iBAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;AAED,MAAa,gBAAgB;CAC3B,QAAQ,OAAO,SAAS,WAAW;EACjC,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,OAAO,MAAM,WAAW,sBAAsB;AACpD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I,KAAK,SAAS,YAAY;EAC5B,MAAMA,cAAY;AAClB,aAAW,EAAEA,YAAU,YAAY;AACnC,OAAK,MAAM,SAASA,YAAU,UAAU;AACtC,cAAW,IAAI,MAAM,MAAM;AAC3B,cAAW,EAAE,MAAM,0BAA0B;EAC9C;AAED,MAAIA,YAAU,WAAW,SACvB,YAAW;WACFA,YAAU,WAAW,YAC9B,YAAW;AAGb,SAAO;CACR;CAED,MAAM,YAAY;AAClB,KAAI,UAAU,YAAY,UAAU,SAAS,SAAS,EACpD,MAAK,MAAM,SAAS,UAAU,UAAU;AACtC,aAAW,IAAI,MAAM,QAAQ;AAC7B,aAAW,EAAE,MAAM,cAAc;CAClC;UACQ,KAAK,cACd,YAAW,EAAE,KAAK,cAAc;AAGlC,QAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tools-DHHqAqP9.cjs","names":["context: ServerContext","opts: { regionUrl?: string }","UserInputError","SentryApiService","orgSlug","issue","event","clientKey: ClientKey | null","step: z.infer<typeof AutofixRunStepSchema>","typedStep"],"sources":["../src/tools.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport {\n type AutofixRunStepDefaultSchema,\n type AutofixRunStepRootCauseAnalysisSchema,\n type AutofixRunStepSchema,\n type AutofixRunStepSolutionSchema,\n type ClientKey,\n SentryApiService,\n} from \"./api-client/index\";\nimport { formatIssueOutput } from \"./internal/formatting\";\nimport { parseIssueParams } from \"./internal/issue-helpers\";\nimport { logError } from \"./logging\";\nimport type { ServerContext, ToolHandlers } from \"./types\";\nimport { setTag } from \"@sentry/core\";\nimport { UserInputError } from \"./errors\";\n\nfunction apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.host;\n\n if (opts.regionUrl) {\n try {\n host = new URL(opts.regionUrl).host;\n } catch (error) {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`,\n );\n }\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n\nexport const TOOL_HANDLERS = {\n whoami: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const user = await apiService.getAuthenticatedUser();\n return `You are authenticated as ${user.name} (${user.email}).\\n\\nYour Sentry User ID is ${user.id}.`;\n },\n find_organizations: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizations = await apiService.listOrganizations();\n\n let output = \"# Organizations\\n\\n\";\n\n if (organizations.length === 0) {\n output += \"You don't appear to be a member of any organizations.\\n\";\n return output;\n }\n\n output += organizations\n .map((org) =>\n [\n `## **${org.slug}**`,\n \"\",\n `**Web URL:** ${org.links.organizationUrl}`,\n `**Region URL:** ${org.links.regionUrl}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n\n output += \"\\n\\n# Using this information\\n\\n\";\n output += `- The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\\n`;\n output += `- If a tool supports passing in the \\`regionUrl\\`, you MUST pass in the correct value there.\\n`;\n\n return output;\n },\n find_teams: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const teams = await apiService.listTeams(organizationSlug);\n let output = `# Teams in **${organizationSlug}**\\n\\n`;\n if (teams.length === 0) {\n output += \"No teams found.\\n\";\n return output;\n }\n output += teams.map((team) => `- ${team.slug}\\n`).join(\"\");\n return output;\n },\n find_projects: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const projects = await apiService.listProjects(organizationSlug);\n let output = `# Projects in **${organizationSlug}**\\n\\n`;\n if (projects.length === 0) {\n output += \"No projects found.\\n\";\n return output;\n }\n output += projects.map((project) => `- **${project.slug}**\\n`).join(\"\");\n return output;\n },\n find_issues: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const sortByMap = {\n last_seen: \"date\" as const,\n first_seen: \"new\" as const,\n count: \"freq\" as const,\n userCount: \"user\" as const,\n };\n const issues = await apiService.listIssues({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n sortBy: params.sortBy\n ? sortByMap[params.sortBy as keyof typeof sortByMap]\n : undefined,\n });\n let output = `# Issues in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (issues.length === 0) {\n output += \"No issues found.\\n\";\n return output;\n }\n output += issues\n .map((issue) =>\n [\n `## ${issue.shortId}`,\n \"\",\n `**Description**: ${issue.title}`,\n `**Culprit**: ${issue.culprit}`,\n `**First Seen**: ${new Date(issue.firstSeen).toISOString()}`,\n `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}`,\n `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n find_releases: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n\n const releases = await apiService.listReleases({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n });\n let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (releases.length === 0) {\n output += \"No releases found.\\n\";\n return output;\n }\n output += releases\n .map((release) => {\n const releaseInfo = [\n `## ${release.shortVersion}`,\n \"\",\n `**Created**: ${new Date(release.dateCreated).toISOString()}`,\n ];\n if (release.dateReleased) {\n releaseInfo.push(\n `**Released**: ${new Date(release.dateReleased).toISOString()}`,\n );\n }\n if (release.firstEvent) {\n releaseInfo.push(\n `**First Event**: ${new Date(release.firstEvent).toISOString()}`,\n );\n }\n if (release.lastEvent) {\n releaseInfo.push(\n `**Last Event**: ${new Date(release.lastEvent).toISOString()}`,\n );\n }\n if (release.newGroups !== undefined) {\n releaseInfo.push(`**New Issues**: ${release.newGroups}`);\n }\n if (release.projects && release.projects.length > 0) {\n releaseInfo.push(\n `**Projects**: ${release.projects.map((p) => p.name).join(\", \")}`,\n );\n }\n if (release.lastCommit) {\n releaseInfo.push(\"\", `### Last Commit`, \"\");\n releaseInfo.push(`**Commit ID**: ${release.lastCommit.id}`);\n releaseInfo.push(`**Commit Message**: ${release.lastCommit.message}`);\n releaseInfo.push(\n `**Commit Author**: ${release.lastCommit.author.name}`,\n );\n releaseInfo.push(\n `**Commit Date**: ${new Date(release.lastCommit.dateCreated).toISOString()}`,\n );\n }\n if (release.lastDeploy) {\n releaseInfo.push(\"\", `### Last Deploy`, \"\");\n releaseInfo.push(`**Deploy ID**: ${release.lastDeploy.id}`);\n releaseInfo.push(\n `**Environment**: ${release.lastDeploy.environment}`,\n );\n if (release.lastDeploy.dateStarted) {\n releaseInfo.push(\n `**Deploy Started**: ${new Date(release.lastDeploy.dateStarted).toISOString()}`,\n );\n }\n if (release.lastDeploy.dateFinished) {\n releaseInfo.push(\n `**Deploy Finished**: ${new Date(release.lastDeploy.dateFinished).toISOString()}`,\n );\n }\n }\n return releaseInfo.join(\"\\n\");\n })\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Release version in commit messages or documentation.\\n`;\n output += `- You can search for issues in a specific release using the \\`find_errors()\\` tool with the query \\`release:${releases.length ? releases[0]!.version : \"VERSION\"}\\`.\\n`;\n return output;\n },\n find_tags: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n\n const tagList = await apiService.listTags({ organizationSlug }, {});\n let output = `# Tags in **${organizationSlug}**\\n\\n`;\n if (tagList.length === 0) {\n output += \"No tags found.\\n\";\n return output;\n }\n output += tagList.map((tag) => [`- ${tag.key}`].join(\"\\n\")).join(\"\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\\n`;\n return output;\n },\n get_issue_details: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug;\n if (!orgSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `eventId`\",\n );\n }\n\n setTag(\"organization.slug\", orgSlug);\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: params.eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${params.eventId}`;\n }\n const event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId: params.eventId,\n });\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n }\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n\n const [issue, event] = await Promise.all([\n apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n ]);\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n },\n find_errors: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n if (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\n const eventList = await apiService.searchErrors({\n organizationSlug,\n projectSlug: params.projectSlug,\n filename: params.filename,\n query: params.query,\n transaction: params.transaction,\n sortBy: params.sortBy as \"last_seen\" | \"count\" | undefined,\n });\n let output = `# Errors in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These errors match the query \\`${params.query}\\`\\n`;\n if (params.filename)\n output += `These errors are limited to the file suffix \\`${params.filename}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.issue}\\n\\n`;\n output += `**Description**: ${eventSummary.title}\\n`;\n output += `**Issue ID**: ${eventSummary.issue}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, eventSummary.issue)}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**Last Seen**: ${eventSummary[\"last_seen()\"]}\\n`;\n output += `**Occurrences**: ${eventSummary[\"count()\"]}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n find_transactions: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n if (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\n const eventList = await apiService.searchSpans({\n organizationSlug,\n projectSlug: params.projectSlug,\n transaction: params.transaction,\n query: params.query,\n sortBy: params.sortBy as \"timestamp\" | \"duration\" | undefined,\n });\n let output = `# Transactions in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These spans match the query \\`${params.query}\\`\\n`;\n if (params.transaction)\n output += `These spans are limited to the transaction \\`${params.transaction}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.transaction}\\n\\n`;\n output += `**Span ID**: ${eventSummary.id}\\n`;\n output += `**Trace ID**: ${eventSummary.trace}\\n`;\n output += `**Span Operation**: ${eventSummary[\"span.op\"]}\\n`;\n output += `**Span Description**: ${eventSummary[\"span.description\"]}\\n`;\n output += `**Duration**: ${eventSummary[\"span.duration\"]}\\n`;\n output += `**Timestamp**: ${eventSummary.timestamp}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**URL**: ${apiService.getTraceUrl(organizationSlug, eventSummary.trace)}\\n\\n`;\n }\n return output;\n },\n create_team: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n\n const team = await apiService.createTeam({\n organizationSlug,\n name: params.name,\n });\n let output = `# New Team in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${team.id}\\n`;\n output += `**Slug**: ${team.slug}\\n`;\n output += `**Name**: ${team.name}\\n`;\n output += \"# Using this information\\n\\n\";\n output += `- You should always inform the user of the Team Slug value.\\n`;\n return output;\n },\n create_project: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"team.slug\", params.teamSlug);\n\n const project = await apiService.createProject({\n organizationSlug,\n teamSlug: params.teamSlug,\n name: params.name,\n platform: params.platform,\n });\n let clientKey: ClientKey | null = null;\n try {\n clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: project.slug,\n name: \"Default\",\n });\n } catch (err) {\n logError(err);\n }\n let output = `# New Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (clientKey) {\n output += `**SENTRY_DSN**: ${clientKey?.dsn.public}\\n\\n`;\n } else {\n output += \"**SENTRY_DSN**: There was an error fetching this value.\\n\\n\";\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\\n`;\n output += `- You should always inform the user of the **SENTRY_DSN** and Project Slug values.\\n`;\n return output;\n },\n create_dsn: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n const clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n });\n let output = `# New DSN in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n`;\n output += `**Name**: ${clientKey.name}\\n\\n`;\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n find_dsns: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n const clientKeys = await apiService.listClientKeys({\n organizationSlug,\n projectSlug: params.projectSlug,\n });\n let output = `# DSNs in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n if (clientKeys.length === 0) {\n output +=\n \"No DSNs were found.\\n\\nYou can create new one using the `create_dsn` tool.\";\n return output;\n }\n for (const clientKey of clientKeys) {\n output += `## ${clientKey.name}\\n`;\n output += `**ID**: ${clientKey.id}\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n begin_seer_issue_fix: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n const data = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n return [\n `# Issue Fix Started for Issue ${parsedIssueId}`,\n \"\",\n `**Run ID:**: ${data.run_id}`,\n \"\",\n \"This operation may take some time, so you should call `get_seer_issue_fix_status()` to check the status of the analysis, and repeat the process until its finished.\",\n \"\",\n \"You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..\",\n \"\",\n \"```\",\n params.issueUrl\n ? `get_seer_issue_fix_status(issueUrl=\"${params.issueUrl}\")`\n : `get_seer_issue_fix_status(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`,\n \"```\",\n ].join(\"\\n\");\n },\n get_seer_issue_fix_status: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n const { autofix } = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n let output = `# Issue Fix Status for Issue ${parsedIssueId}\\n\\n`;\n if (!autofix) {\n output += `No issue fix process found for ${parsedIssueId}.\\n\\nYou can initiate a new issue fix execution using the \\`begin_seer_issue_fix\\` tool.`;\n return output;\n }\n for (const step of autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n return output;\n },\n} satisfies ToolHandlers;\n\nfunction getOutputForAutofixStep(step: z.infer<typeof AutofixRunStepSchema>) {\n let output = `## ${step.title}\\n\\n`;\n\n if (step.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n return output;\n }\n\n if (step.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step. Please check back in a minute.**\\n\\n`;\n return output;\n }\n\n if (step.type === \"root_cause_analysis\") {\n const typedStep = step as z.infer<\n typeof AutofixRunStepRootCauseAnalysisSchema\n >;\n\n for (const cause of typedStep.causes) {\n if (typedStep.description) {\n output += `${typedStep.description}\\n\\n`;\n }\n for (const entry of cause.root_cause_reproduction) {\n output += `**${entry.title}**\\n\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n }\n return output;\n }\n\n if (step.type === \"solution\") {\n const typedStep = step as z.infer<typeof AutofixRunStepSolutionSchema>;\n output += `${typedStep.description}\\n\\n`;\n for (const entry of typedStep.solution) {\n output += `**${entry.title}**\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n\n if (typedStep.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n } else if (typedStep.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step.**\\n\\n`;\n }\n\n return output;\n }\n\n const typedStep = step as z.infer<typeof AutofixRunStepDefaultSchema>;\n if (typedStep.insights && typedStep.insights.length > 0) {\n for (const entry of typedStep.insights) {\n output += `**${entry.insight}**\\n`;\n output += `${entry.justification}\\n\\n`;\n }\n } else if (step.output_stream) {\n output += `${step.output_stream}\\n`;\n }\n\n return output;\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAS,sBACPA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,UACP,KAAI;AACF,SAAO,IAAI,IAAI,KAAK,WAAW;CAChC,SAAQ,OAAO;AACd,QAAM,IAAIC,+BACP,8BAA8B,KAAK,UAAU;CAEjD;AAGH,QAAO,IAAIC,gCAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;AAED,MAAa,gBAAgB;CAC3B,QAAQ,OAAO,SAAS,WAAW;EACjC,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,OAAO,MAAM,WAAW,sBAAsB;AACpD,UAAQ,2BAA2B,KAAK,KAAK,IAAI,KAAK,MAAM,+BAA+B,KAAK,GAAG;CACpG;CACD,oBAAoB,OAAO,SAAS,WAAW;EAC7C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,gBAAgB,MAAM,WAAW,mBAAmB;EAE1D,IAAI,SAAS;AAEb,MAAI,cAAc,WAAW,GAAG;AAC9B,aAAU;AACV,UAAO;EACR;AAED,YAAU,cACP,IAAI,CAAC,QACJ;IACG,OAAO,IAAI,KAAK;GACjB;IACC,eAAe,IAAI,MAAM,gBAAgB;IACzC,kBAAkB,IAAI,MAAM,UAAU;EACxC,EAAC,KAAK,KAAK,CACb,CACA,KAAK,OAAO;AAEf,YAAU;AACV,aAAW;AACX,aAAW;AAEX,SAAO;CACR;CACD,YAAY,OAAO,SAAS,WAAW;EACrC,MAAM,aAAa,sBA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