@mastra/server 1.35.0 → 1.36.0-alpha.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/CHANGELOG.md +27 -0
- package/dist/{api-schema-manifest-HTSK7CWD.js → api-schema-manifest-AUYKZJAA.js} +3 -3
- package/dist/{api-schema-manifest-HTSK7CWD.js.map → api-schema-manifest-AUYKZJAA.js.map} +1 -1
- package/dist/{api-schema-manifest-WVM7QABS.cjs → api-schema-manifest-FWK7OIXL.cjs} +4 -4
- package/dist/{api-schema-manifest-WVM7QABS.cjs.map → api-schema-manifest-FWK7OIXL.cjs.map} +1 -1
- package/dist/{chunk-4UPPXNWW.js → chunk-2M7CLYTM.js} +3 -3
- package/dist/{chunk-4UPPXNWW.js.map → chunk-2M7CLYTM.js.map} +1 -1
- package/dist/{chunk-N63KDS6D.js → chunk-2OEEHCXR.js} +3 -3
- package/dist/{chunk-N63KDS6D.js.map → chunk-2OEEHCXR.js.map} +1 -1
- package/dist/{chunk-FLVMO2FZ.js → chunk-3Y7SOTAS.js} +3 -3
- package/dist/chunk-3Y7SOTAS.js.map +1 -0
- package/dist/{chunk-CUMEATMZ.cjs → chunk-5JX72ECO.cjs} +7 -7
- package/dist/{chunk-CUMEATMZ.cjs.map → chunk-5JX72ECO.cjs.map} +1 -1
- package/dist/{chunk-35DMDUVM.js → chunk-72Q6PR4Q.js} +3 -3
- package/dist/{chunk-35DMDUVM.js.map → chunk-72Q6PR4Q.js.map} +1 -1
- package/dist/{chunk-DBG7BFWZ.cjs → chunk-7GX35QLL.cjs} +4 -4
- package/dist/{chunk-DBG7BFWZ.cjs.map → chunk-7GX35QLL.cjs.map} +1 -1
- package/dist/{chunk-2GEO7VUJ.cjs → chunk-AFVKVAJZ.cjs} +3 -3
- package/dist/{chunk-2GEO7VUJ.cjs.map → chunk-AFVKVAJZ.cjs.map} +1 -1
- package/dist/{chunk-3T7LIPHA.cjs → chunk-CXI6IIFZ.cjs} +4 -4
- package/dist/{chunk-3T7LIPHA.cjs.map → chunk-CXI6IIFZ.cjs.map} +1 -1
- package/dist/{chunk-M7EB2X7Q.cjs → chunk-FIWR56T7.cjs} +24 -24
- package/dist/{chunk-M7EB2X7Q.cjs.map → chunk-FIWR56T7.cjs.map} +1 -1
- package/dist/{chunk-TXKPEOUP.js → chunk-HDBLTBJ4.js} +4 -4
- package/dist/{chunk-TXKPEOUP.js.map → chunk-HDBLTBJ4.js.map} +1 -1
- package/dist/{chunk-KDZIZ3LV.cjs → chunk-JMFAOQYF.cjs} +4 -4
- package/dist/{chunk-KDZIZ3LV.cjs.map → chunk-JMFAOQYF.cjs.map} +1 -1
- package/dist/{chunk-TTGG4FBC.js → chunk-KD46CAJV.js} +3 -3
- package/dist/{chunk-TTGG4FBC.js.map → chunk-KD46CAJV.js.map} +1 -1
- package/dist/{chunk-WUXXEGDS.js → chunk-KWJC4MNT.js} +3 -3
- package/dist/{chunk-WUXXEGDS.js.map → chunk-KWJC4MNT.js.map} +1 -1
- package/dist/{chunk-HPSSFPDP.js → chunk-KWREVMMS.js} +22 -105
- package/dist/chunk-KWREVMMS.js.map +1 -0
- package/dist/{chunk-U7A3FCF3.js → chunk-M5H6F2QB.js} +4 -4
- package/dist/{chunk-U7A3FCF3.js.map → chunk-M5H6F2QB.js.map} +1 -1
- package/dist/{chunk-YSC2EP5G.cjs → chunk-MFBQYZP2.cjs} +3 -3
- package/dist/chunk-MFBQYZP2.cjs.map +1 -0
- package/dist/{chunk-2SYGQRXY.cjs → chunk-NIX5VQJ6.cjs} +90 -90
- package/dist/{chunk-2SYGQRXY.cjs.map → chunk-NIX5VQJ6.cjs.map} +1 -1
- package/dist/{chunk-H5FPSS2N.js → chunk-NONHI6TJ.js} +12 -12
- package/dist/{chunk-H5FPSS2N.js.map → chunk-NONHI6TJ.js.map} +1 -1
- package/dist/{chunk-W3FAEXOQ.cjs → chunk-PCOJOGO5.cjs} +25 -25
- package/dist/{chunk-W3FAEXOQ.cjs.map → chunk-PCOJOGO5.cjs.map} +1 -1
- package/dist/{chunk-TMLOBNMN.js → chunk-SBGAKEDX.js} +3 -3
- package/dist/{chunk-TMLOBNMN.js.map → chunk-SBGAKEDX.js.map} +1 -1
- package/dist/{chunk-BE7IP4ZJ.js → chunk-TINX42C4.js} +4 -4
- package/dist/{chunk-BE7IP4ZJ.js.map → chunk-TINX42C4.js.map} +1 -1
- package/dist/{chunk-MFBVMCPB.cjs → chunk-ULDCHPOZ.cjs} +17 -17
- package/dist/{chunk-MFBVMCPB.cjs.map → chunk-ULDCHPOZ.cjs.map} +1 -1
- package/dist/{chunk-NKE73E6M.js → chunk-XAHATWVE.js} +4 -4
- package/dist/{chunk-NKE73E6M.js.map → chunk-XAHATWVE.js.map} +1 -1
- package/dist/{chunk-3SPUSGBT.cjs → chunk-XL55VCXM.cjs} +7 -7
- package/dist/{chunk-3SPUSGBT.cjs.map → chunk-XL55VCXM.cjs.map} +1 -1
- package/dist/{chunk-7BDWHV3B.cjs → chunk-Y344MAUV.cjs} +93 -93
- package/dist/{chunk-7BDWHV3B.cjs.map → chunk-Y344MAUV.cjs.map} +1 -1
- package/dist/{chunk-QZFOSTJU.cjs → chunk-ZRU7KWNW.cjs} +22 -105
- package/dist/chunk-ZRU7KWNW.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/handlers/a2a.cjs +14 -14
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agents.cjs +41 -41
- package/dist/server/handlers/agents.d.ts +28 -28
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/auth.cjs +11 -11
- package/dist/server/handlers/auth.js +1 -1
- package/dist/server/handlers/conversations.cjs +5 -5
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.d.ts +6 -6
- package/dist/server/handlers/processors.d.ts +6 -6
- package/dist/server/handlers/responses.cjs +4 -4
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/scores.cjs +7 -7
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/system.cjs +3 -3
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers/tools.cjs +6 -6
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/voice.cjs +8 -8
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflows.cjs +26 -26
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +18 -18
- package/dist/server/handlers.js +9 -9
- package/dist/server/schemas/agents.d.ts +47 -1191
- package/dist/server/schemas/agents.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +48 -48
- package/dist/server/schemas/index.js +1 -1
- package/dist/server/schemas/processors.d.ts +3 -3
- package/dist/server/server-adapter/index.cjs +13 -13
- package/dist/server/server-adapter/index.js +2 -2
- package/dist/server/server-adapter/routes/observability.d.ts +3 -3
- package/dist/server/server-adapter/routes/processors.d.ts +6 -6
- package/package.json +4 -4
- package/dist/chunk-FLVMO2FZ.js.map +0 -1
- package/dist/chunk-HPSSFPDP.js.map +0 -1
- package/dist/chunk-QZFOSTJU.cjs.map +0 -1
- package/dist/chunk-YSC2EP5G.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server/handlers/auth.ts"],"names":["createPublicRoute","capabilitiesResponseSchema","supportsSessionRefresh","handleError","currentUserResponseSchema","ssoLoginQuerySchema","HTTPException","ssoCallbackQuerySchema","refreshResponseSchema","credentialsSignInBodySchema","credentialsSignUpBodySchema","mastra"],"mappings":";;;;;;;;;AAuCA,IAAI,yBAAA;AACJ,SAAS,qBAAA,GAAkE;AACzE,EAAA,IAAI,CAAC,yBAAA,EAA2B;AAC9B,IAAA,yBAAA,GAA4B,OAAO,sBAAsB,CAAA,CACtD,IAAA,CAAK,OAAK,CAAA,CAAE,iBAA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AAA;AAAA,IAC5D,SAAS,KAAA,EAAO;AACd,MAAA,IAAI,KAAA,YAAiBA,iCAAe,MAAM,KAAA;AAC1C,MAAA,MAAMK,UAAU,GAAA,CAAY,MAAA;AAC5B,MAAAA,OAAAA,EAAQ,SAAA,IAAY,EAAG,KAAA,CAAM,eAAA,EAAiB;AAAA,QAC5C,KAAA,EAAO,KAAA,YAAiB,KAAA,GAAQ,EAAE,OAAA,EAAS,MAAM,OAAA,EAAS,KAAA,EAAO,KAAA,CAAM,KAAA,EAAM,GAAI;AAAA,OAClF,CAAA;AACD,MAAA,MAAM,IAAIL,+BAAA,CAAc,GAAA,EAAK,EAAE,OAAA,EAAS,4BAA4B,CAAA;AAAA,IACtE;AAAA,EACF;AACF,CAAC;AAMM,IAAM,WAAA,GAAc;AAAA,EACzB,2BAAA;AAAA,EACA,sBAAA;AAAA,EACA,mBAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,kBAAA;AAAA,EACA,8BAAA;AAAA,EACA;AACF","file":"chunk-MFBQYZP2.cjs","sourcesContent":["/**\n * Auth handlers for EE authentication capabilities.\n *\n * These routes enable Studio to:\n * - Detect available auth capabilities\n * - Initiate SSO login flows\n * - Handle OAuth callbacks\n * - Logout users\n */\n\nimport type {\n IUserProvider,\n ISessionProvider,\n ISSOProvider,\n ICredentialsProvider,\n SSOCallbackResult,\n} from '@mastra/core/auth';\nimport type { IRBACProvider, IFGAProvider, EEUser } from '@mastra/core/auth/ee';\nimport type { MastraAuthProvider } from '@mastra/core/server';\n\nimport { supportsSessionRefresh } from '../auth/helpers';\nimport { HTTPException } from '../http-exception';\nimport {\n capabilitiesResponseSchema,\n ssoLoginQuerySchema,\n ssoCallbackQuerySchema,\n currentUserResponseSchema,\n credentialsSignInBodySchema,\n credentialsSignUpBodySchema,\n refreshResponseSchema,\n} from '../schemas/auth';\nimport { createPublicRoute } from '../server-adapter/routes/route-builder';\nimport { handleError } from './error';\n\ntype BuildCapabilitiesFn = (\n auth: any,\n request: Request,\n options?: { rbac?: any; fga?: any; apiPrefix?: string },\n) => Promise<any>;\nlet _buildCapabilitiesPromise: Promise<BuildCapabilitiesFn | undefined> | undefined;\nfunction loadBuildCapabilities(): Promise<BuildCapabilitiesFn | undefined> {\n if (!_buildCapabilitiesPromise) {\n _buildCapabilitiesPromise = import('@mastra/core/auth/ee')\n .then(m => m.buildCapabilities as BuildCapabilitiesFn)\n .catch(() => {\n console.error(\n '[@mastra/server] EE auth features require @mastra/core >= 1.6.0. Please upgrade: npm install @mastra/core@latest',\n );\n return undefined;\n });\n }\n return _buildCapabilitiesPromise;\n}\n\n/**\n * Helper to get auth provider from Mastra instance.\n */\nfunction getAuthProvider(mastra: any): MastraAuthProvider | null {\n const serverConfig = mastra.getServer?.();\n if (!serverConfig?.auth) return null;\n\n // Auth can be either MastraAuthConfig or MastraAuthProvider\n // If it has authenticateToken method, it's a provider\n if (typeof serverConfig.auth.authenticateToken === 'function') {\n return serverConfig.auth as MastraAuthProvider;\n }\n\n return null;\n}\n\n/**\n * Get the public-facing origin from a request, respecting reverse proxy headers.\n * Behind a proxy (e.g. edge router), request.url contains the internal hostname,\n * so we rely on forwarded headers to reconstruct the real public origin.\n *\n * Assumes the server is behind a trusted proxy (or running locally). When\n * exposed directly to untrusted clients, the Host header is attacker-controlled\n * and must be validated upstream.\n *\n * Priority:\n * 1. X-Forwarded-Host (traditional reverse proxy) → always HTTPS. Knative's\n * queue-proxy overwrites X-Forwarded-Proto based on the internal HTTP\n * connection, so X-Forwarded-Proto is ignored here.\n * 2. Host header with X-Forwarded-Proto (AWS ALB, some proxies) → respect proto.\n * 3. Host header alone → use the scheme from request.url (covers both direct\n * HTTP access and proxies that preserve Host but don't set a proto header).\n * 4. No Host header → fall back to request.url.origin (local dev / direct access).\n */\nexport function getPublicOrigin(request: Request): string {\n const forwardedHost = request.headers.get('x-forwarded-host')?.split(',')[0]?.trim();\n if (forwardedHost) {\n return `https://${forwardedHost}`;\n }\n\n const host = request.headers.get('host');\n if (host) {\n const forwardedProto = request.headers.get('x-forwarded-proto')?.split(',')[0]?.trim();\n const proto = forwardedProto || new URL(request.url).protocol.replace(':', '');\n return `${proto}://${host}`;\n }\n\n return new URL(request.url).origin;\n}\n\n/**\n * Helper to get RBAC provider from Mastra server config.\n */\nfunction getRBACProvider(mastra: any): IRBACProvider<EEUser> | undefined {\n const serverConfig = mastra.getServer?.();\n return serverConfig?.rbac as IRBACProvider<EEUser> | undefined;\n}\n\n/**\n * Helper to get FGA provider from Mastra server config.\n */\nfunction getFGAProvider(mastra: any): IFGAProvider<EEUser> | undefined {\n const serverConfig = mastra.getServer?.();\n return serverConfig?.fga as IFGAProvider<EEUser> | undefined;\n}\n\n/**\n * Type guard to check if auth provider implements an interface.\n */\nfunction implementsInterface<T>(auth: unknown, method: keyof T): auth is T {\n return auth !== null && typeof auth === 'object' && typeof (auth as any)[method] === 'function';\n}\n\n// ============================================================================\n// GET /auth/capabilities\n// ============================================================================\n\nexport const GET_AUTH_CAPABILITIES_ROUTE = createPublicRoute({\n method: 'GET',\n path: '/auth/capabilities',\n responseType: 'json',\n responseSchema: capabilitiesResponseSchema,\n summary: 'Get auth capabilities',\n description:\n 'Returns authentication capabilities and current user info. Used by Studio to determine available features and user state.',\n tags: ['Auth'],\n handler: async ctx => {\n try {\n const { mastra, request, routePrefix } = ctx as any;\n\n const auth = getAuthProvider(mastra);\n\n if (!auth) {\n return { enabled: false, login: null };\n }\n\n const rbac = getRBACProvider(mastra);\n const fga = getFGAProvider(mastra);\n\n const buildCapabilities = await loadBuildCapabilities();\n if (!buildCapabilities) {\n return { enabled: false, login: null };\n }\n const capabilities = await buildCapabilities(auth, request, { rbac, fga, apiPrefix: routePrefix });\n\n // If capabilities came back without a user, the session may have expired.\n // Attempt a transparent refresh (same logic as coreAuthMiddleware) and retry.\n if (!('user' in capabilities) && supportsSessionRefresh(auth)) {\n try {\n const sessionId = await auth.getSessionIdFromRequest(request);\n if (sessionId) {\n const refreshedSession = await auth.refreshSession(sessionId);\n if (refreshedSession) {\n const sessionHeaders = await auth.getSessionHeaders(refreshedSession);\n const cookieValue = extractCookieFromHeaders(sessionHeaders);\n if (cookieValue) {\n // Rebuild capabilities with the refreshed cookie\n const refreshedRequest = new Request(request.url, {\n method: request.method,\n headers: new Headers(request.headers),\n });\n refreshedRequest.headers.set('Cookie', cookieValue);\n const refreshedCapabilities = await buildCapabilities(auth, refreshedRequest, {\n rbac,\n apiPrefix: routePrefix,\n });\n\n // Attach refresh headers so the adapter can set the new cookie\n if ('user' in refreshedCapabilities) {\n (refreshedCapabilities as any).__refreshHeaders = sessionHeaders;\n }\n return refreshedCapabilities;\n }\n }\n }\n } catch {\n // Refresh failed — return original unauthenticated capabilities\n }\n }\n\n return capabilities;\n } catch (error) {\n return handleError(error, 'Error getting auth capabilities');\n }\n },\n});\n\n/**\n * Extract a full cookie string from session headers (e.g. Set-Cookie → Cookie).\n */\nfunction extractCookieFromHeaders(headers: Record<string, string>): string | null {\n const setCookie = headers['Set-Cookie'] || headers['set-cookie'];\n if (!setCookie) return null;\n // Set-Cookie value is \"name=value; Path=/; ...\" — extract \"name=value\"\n const match = setCookie.match(/^([^;]+)/);\n return match ? (match[1] ?? null) : null;\n}\n\n// ============================================================================\n// GET /auth/me\n// ============================================================================\n\nexport const GET_CURRENT_USER_ROUTE = createPublicRoute({\n method: 'GET',\n path: '/auth/me',\n responseType: 'json',\n responseSchema: currentUserResponseSchema,\n summary: 'Get current user',\n description: 'Returns the currently authenticated user, or null if not authenticated.',\n tags: ['Auth'],\n handler: async ctx => {\n try {\n const { mastra, request } = ctx as any;\n const auth = getAuthProvider(mastra);\n const rbac = getRBACProvider(mastra);\n\n if (!auth || !implementsInterface<IUserProvider>(auth, 'getCurrentUser')) {\n return null;\n }\n\n const user = await auth.getCurrentUser(request);\n if (!user) return null;\n\n // Get roles/permissions from RBAC provider if available\n let roles: string[] | undefined;\n let permissions: string[] | undefined;\n\n if (rbac) {\n try {\n roles = await rbac.getRoles(user);\n permissions = await rbac.getPermissions(user);\n } catch {\n // RBAC not available or failed\n }\n }\n\n return {\n id: user.id,\n email: user.email,\n name: user.name,\n avatarUrl: user.avatarUrl,\n roles,\n permissions,\n };\n } catch (error) {\n return handleError(error, 'Error getting current user');\n }\n },\n});\n\n// ============================================================================\n// GET /auth/sso/login\n// ============================================================================\n\nexport const GET_SSO_LOGIN_ROUTE = createPublicRoute({\n method: 'GET',\n path: '/auth/sso/login',\n responseType: 'datastream-response',\n queryParamSchema: ssoLoginQuerySchema,\n summary: 'Initiate SSO login',\n description: 'Returns the SSO login URL and sets PKCE cookies if needed.',\n tags: ['Auth'],\n handler: async ctx => {\n try {\n const { mastra, redirect_uri, request, routePrefix } = ctx as any;\n const auth = getAuthProvider(mastra);\n\n if (!auth || !implementsInterface<ISSOProvider>(auth, 'getLoginUrl')) {\n throw new HTTPException(404, { message: 'SSO not configured' });\n }\n\n // Build OAuth callback URI using the configured route prefix\n const origin = getPublicOrigin(request);\n const raw = ((routePrefix as string) || '/api').trim();\n const withSlash = raw.startsWith('/') ? raw : `/${raw}`;\n const prefix = withSlash.endsWith('/') ? withSlash.slice(0, -1) : withSlash;\n const oauthCallbackUri = `${origin}${prefix}/auth/sso/callback`;\n\n // Encode the post-login redirect in state (where user goes after auth completes)\n // State format: uuid|postLoginRedirect\n // Validate redirect_uri to prevent open-redirect attacks: allow relative paths,\n // same-origin URLs, and localhost URLs (for dev setups where Studio runs on a\n // different port).\n let postLoginRedirect = '/';\n if (redirect_uri) {\n if (!redirect_uri.startsWith('http')) {\n // Relative path — always safe\n postLoginRedirect = redirect_uri;\n } else {\n try {\n const redirectUrl = new URL(redirect_uri);\n const requestOrigin = new URL(origin);\n const isHttps = redirectUrl.protocol === 'http:' || redirectUrl.protocol === 'https:';\n const isSameOrigin = redirectUrl.origin === requestOrigin.origin;\n const isLocalhost =\n redirectUrl.hostname === 'localhost' ||\n redirectUrl.hostname === '127.0.0.1' ||\n redirectUrl.hostname === '[::1]';\n if (isHttps && (isSameOrigin || isLocalhost)) {\n postLoginRedirect = redirect_uri;\n }\n } catch {\n // Malformed URL — fall back to /\n }\n }\n }\n const stateId = crypto.randomUUID();\n const state = `${stateId}|${encodeURIComponent(postLoginRedirect)}`;\n\n const loginUrl = auth.getLoginUrl(oauthCallbackUri, state);\n\n // Build response with optional PKCE cookies\n const headers = new Headers({ 'Content-Type': 'application/json' });\n\n // Check for PKCE cookies (e.g., MastraCloudAuthProvider)\n if (implementsInterface<ISSOProvider>(auth, 'getLoginCookies') && auth.getLoginCookies) {\n const cookies = auth.getLoginCookies(oauthCallbackUri, state);\n if (cookies?.length) {\n // PKCE cookies set for SSO state management\n for (const cookie of cookies) {\n headers.append('Set-Cookie', cookie);\n }\n }\n }\n\n return new Response(JSON.stringify({ url: loginUrl }), { status: 200, headers });\n } catch (error) {\n return handleError(error, 'Error initiating SSO login');\n }\n },\n});\n\n// ============================================================================\n// GET /auth/sso/callback\n// ============================================================================\n\nexport const GET_SSO_CALLBACK_ROUTE = createPublicRoute({\n method: 'GET',\n path: '/auth/sso/callback',\n responseType: 'datastream-response',\n queryParamSchema: ssoCallbackQuerySchema,\n summary: 'Handle SSO callback',\n description: 'Handles the OAuth callback, exchanges code for session, and redirects to the app.',\n tags: ['Auth'],\n handler: async ctx => {\n const { mastra, code, state, request } = ctx as any;\n\n // Build base URL for redirects (Response.redirect requires absolute URL)\n const baseUrl = getPublicOrigin(request);\n\n // Extract post-login redirect from state (format: uuid|encodedRedirect)\n let redirectTo = '/';\n let stateId = state || '';\n if (state && state.includes('|')) {\n const [id, encodedRedirect] = state.split('|', 2);\n stateId = id;\n try {\n redirectTo = decodeURIComponent(encodedRedirect);\n } catch {\n redirectTo = '/';\n }\n }\n\n // Build absolute redirect URL.\n // The redirect_uri was validated at the login endpoint (same-origin or localhost\n // only), so the state should only contain safe URLs. We still apply defense-in-depth\n // checks here: allow http(s) same-origin or localhost, reject everything else.\n let absoluteRedirect: string;\n if (redirectTo.startsWith('http')) {\n try {\n const parsed = new URL(redirectTo);\n const baseOrigin = new URL(baseUrl);\n const isHttps = parsed.protocol === 'http:' || parsed.protocol === 'https:';\n const isSameOrigin = parsed.origin === baseOrigin.origin;\n const isLocalhost =\n parsed.hostname === 'localhost' || parsed.hostname === '127.0.0.1' || parsed.hostname === '[::1]';\n absoluteRedirect = isHttps && (isSameOrigin || isLocalhost) ? redirectTo : `${baseUrl}/`;\n } catch {\n absoluteRedirect = `${baseUrl}/`;\n }\n } else {\n absoluteRedirect = `${baseUrl}${redirectTo}`;\n }\n\n try {\n const auth = getAuthProvider(mastra);\n\n if (!auth || !implementsInterface<ISSOProvider>(auth, 'handleCallback')) {\n return Response.redirect(`${absoluteRedirect}?error=sso_not_configured`, 302);\n }\n\n // Pass cookie header to provider for PKCE validation (if supported)\n const reqCookieHeader = request.headers.get('cookie');\n if (typeof (auth as any).setCallbackCookieHeader === 'function') {\n (auth as any).setCallbackCookieHeader(reqCookieHeader);\n }\n\n const result = (await auth.handleCallback(code, stateId)) as SSOCallbackResult<EEUser>;\n const user = result.user as EEUser;\n\n // Build response headers (session cookies, etc.)\n const headers = new Headers();\n headers.set('Location', absoluteRedirect);\n\n // Set session cookies from the SSO result\n if (result.cookies?.length) {\n for (const cookie of result.cookies) {\n headers.append('Set-Cookie', cookie);\n }\n } else if (implementsInterface<ISessionProvider>(auth, 'createSession') && result.tokens) {\n // Fallback: Create session manually for providers without cookie support\n const session = await auth.createSession(user.id, {\n accessToken: result.tokens.accessToken,\n refreshToken: result.tokens.refreshToken,\n expiresAt: result.tokens.expiresAt,\n organizationId: (user as any).organizationId,\n });\n const sessionHeaders = auth.getSessionHeaders(session);\n for (const [key, value] of Object.entries(sessionHeaders)) {\n headers.append(key, value);\n }\n }\n\n return new Response(null, {\n status: 302,\n headers,\n });\n } catch (error) {\n // Redirect with error (use absolute URL)\n const errorMessage = encodeURIComponent(error instanceof Error ? error.message : 'Unknown error');\n return Response.redirect(`${absoluteRedirect}?error=${errorMessage}`, 302);\n }\n },\n});\n\n// ============================================================================\n// POST /auth/logout\n// ============================================================================\n\nexport const POST_LOGOUT_ROUTE = createPublicRoute({\n method: 'POST',\n path: '/auth/logout',\n responseType: 'datastream-response',\n summary: 'Logout',\n description: 'Destroys the current session and returns logout redirect URL if available.',\n tags: ['Auth'],\n handler: async ctx => {\n const { mastra, request } = ctx as any;\n\n try {\n const auth = getAuthProvider(mastra);\n\n if (!auth) {\n return new Response(JSON.stringify({ success: true }), {\n status: 200,\n headers: { 'Content-Type': 'application/json' },\n });\n }\n\n // Get session ID and destroy it\n if (implementsInterface<ISessionProvider>(auth, 'getSessionIdFromRequest')) {\n const sessionId = auth.getSessionIdFromRequest(request);\n if (sessionId && implementsInterface<ISessionProvider>(auth, 'destroySession')) {\n await auth.destroySession(sessionId);\n }\n }\n\n // Get logout URL if available\n let redirectTo: string | undefined;\n if (implementsInterface<ISSOProvider>(auth, 'getLogoutUrl') && auth.getLogoutUrl) {\n // Use public origin (respects X-Forwarded-Host behind reverse proxy)\n const origin = getPublicOrigin(request);\n const logoutUrl = await auth.getLogoutUrl(origin, request);\n redirectTo = logoutUrl ?? undefined;\n }\n\n // Build response with session clearing headers\n const headers = new Headers({ 'Content-Type': 'application/json' });\n\n // Clear session cookie\n if (implementsInterface<ISessionProvider>(auth, 'getClearSessionHeaders')) {\n const clearHeaders = auth.getClearSessionHeaders();\n for (const [key, value] of Object.entries(clearHeaders)) {\n headers.append(key, value);\n }\n }\n\n return new Response(JSON.stringify({ success: true, redirectTo }), {\n status: 200,\n headers,\n });\n } catch (error) {\n return handleError(error, 'Error logging out');\n }\n },\n});\n\n// ============================================================================\n// POST /auth/refresh\n// ============================================================================\n\nexport const POST_REFRESH_ROUTE = createPublicRoute({\n method: 'POST',\n path: '/auth/refresh',\n responseType: 'datastream-response',\n responseSchema: refreshResponseSchema,\n summary: 'Refresh session',\n description: 'Refreshes the current session, extending its expiry. Sets a new session cookie on success.',\n tags: ['Auth'],\n handler: async ctx => {\n const { mastra, request } = ctx as any;\n\n try {\n const auth = getAuthProvider(mastra);\n\n if (\n !auth ||\n !implementsInterface<ISessionProvider>(auth, 'refreshSession') ||\n !implementsInterface<ISessionProvider>(auth, 'getSessionIdFromRequest')\n ) {\n throw new HTTPException(404, { message: 'Session refresh not configured' });\n }\n\n // Get session ID from request\n const sessionId = auth.getSessionIdFromRequest(request);\n if (!sessionId) {\n throw new HTTPException(401, { message: 'No session' });\n }\n\n // Refresh the session\n const newSession = await auth.refreshSession(sessionId);\n if (!newSession) {\n throw new HTTPException(401, { message: 'Session expired' });\n }\n\n // Build response with new session headers\n const headers = new Headers({ 'Content-Type': 'application/json' });\n if (implementsInterface<ISessionProvider>(auth, 'getSessionHeaders')) {\n const sessionHeaders = auth.getSessionHeaders(newSession);\n for (const [key, value] of Object.entries(sessionHeaders)) {\n headers.append(key, value);\n }\n }\n\n return new Response(JSON.stringify({ success: true }), {\n status: 200,\n headers,\n });\n } catch (error) {\n if (error instanceof HTTPException) throw error;\n return handleError(error, 'Error refreshing session');\n }\n },\n});\n\n// ============================================================================\n// POST /auth/credentials/sign-in\n// ============================================================================\n\nexport const POST_CREDENTIALS_SIGN_IN_ROUTE = createPublicRoute({\n method: 'POST',\n path: '/auth/credentials/sign-in',\n responseType: 'datastream-response',\n bodySchema: credentialsSignInBodySchema,\n summary: 'Sign in with credentials',\n description: 'Authenticates a user with email and password.',\n tags: ['Auth'],\n handler: async ctx => {\n const { mastra, request, email, password } = ctx as any;\n\n try {\n const auth = getAuthProvider(mastra);\n\n if (!auth || !implementsInterface<ICredentialsProvider>(auth, 'signIn')) {\n throw new HTTPException(404, { message: 'Credentials authentication not configured' });\n }\n\n const result = await auth.signIn(email, password, request);\n const user = result.user as EEUser;\n\n const responseBody = JSON.stringify({\n user: {\n id: user.id,\n email: user.email,\n name: user.name,\n avatarUrl: user.avatarUrl,\n },\n token: result.token,\n });\n\n // Build response headers, including cookies from the auth provider\n const headers = new Headers({\n 'Content-Type': 'application/json',\n });\n\n // Forward session cookies from the auth provider\n if (result.cookies?.length) {\n for (const cookie of result.cookies) {\n headers.append('Set-Cookie', cookie);\n }\n }\n\n return new Response(responseBody, { status: 200, headers });\n } catch (error) {\n if (error instanceof HTTPException) throw error;\n // Return a generic error for auth failures to avoid leaking info\n throw new HTTPException(401, { message: 'Invalid email or password' });\n }\n },\n});\n\n// ============================================================================\n// POST /auth/credentials/sign-up\n// ============================================================================\n\nexport const POST_CREDENTIALS_SIGN_UP_ROUTE = createPublicRoute({\n method: 'POST',\n path: '/auth/credentials/sign-up',\n responseType: 'datastream-response',\n bodySchema: credentialsSignUpBodySchema,\n summary: 'Sign up with credentials',\n description: 'Creates a new user account with email and password.',\n tags: ['Auth'],\n handler: async ctx => {\n const { mastra, request, email, password, name } = ctx as any;\n\n try {\n const auth = getAuthProvider(mastra);\n\n if (!auth || !implementsInterface<ICredentialsProvider>(auth, 'signUp')) {\n throw new HTTPException(404, { message: 'Credentials authentication not configured' });\n }\n\n const result = await auth.signUp(email, password, name, request);\n const user = result.user as EEUser;\n\n const responseBody = JSON.stringify({\n user: {\n id: user.id,\n email: user.email,\n name: user.name,\n avatarUrl: user.avatarUrl,\n },\n token: result.token,\n });\n\n // Build response headers, including cookies from the auth provider\n const headers = new Headers({\n 'Content-Type': 'application/json',\n });\n\n // Forward session cookies from the auth provider\n if (result.cookies?.length) {\n for (const cookie of result.cookies) {\n headers.append('Set-Cookie', cookie);\n }\n }\n\n return new Response(responseBody, { status: 200, headers });\n } catch (error) {\n if (error instanceof HTTPException) throw error;\n const mastra = (ctx as any).mastra;\n mastra?.getLogger?.()?.error('Sign-up error', {\n error: error instanceof Error ? { message: error.message, stack: error.stack } : error,\n });\n throw new HTTPException(400, { message: 'Failed to create account' });\n }\n },\n});\n\n// ============================================================================\n// Export all auth routes\n// ============================================================================\n\nexport const AUTH_ROUTES = [\n GET_AUTH_CAPABILITIES_ROUTE,\n GET_CURRENT_USER_ROUTE,\n GET_SSO_LOGIN_ROUTE,\n GET_SSO_CALLBACK_ROUTE,\n POST_LOGOUT_ROUTE,\n POST_REFRESH_ROUTE,\n POST_CREDENTIALS_SIGN_IN_ROUTE,\n POST_CREDENTIALS_SIGN_UP_ROUTE,\n] as const;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkHXICAUTW_cjs = require('./chunk-HXICAUTW.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkZRU7KWNW_cjs = require('./chunk-ZRU7KWNW.cjs');
|
|
5
5
|
var chunkLTYRUL3Q_cjs = require('./chunk-LTYRUL3Q.cjs');
|
|
6
6
|
var chunkRUKCZLXN_cjs = require('./chunk-RUKCZLXN.cjs');
|
|
7
7
|
var chunk5XW4MKE6_cjs = require('./chunk-5XW4MKE6.cjs');
|
|
@@ -650,7 +650,7 @@ var LIST_AGENTS_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
650
650
|
queryParamSchema: v4.z.object({
|
|
651
651
|
partial: v4.z.string().optional()
|
|
652
652
|
}),
|
|
653
|
-
responseSchema:
|
|
653
|
+
responseSchema: chunkZRU7KWNW_cjs.listAgentsResponseSchema,
|
|
654
654
|
summary: "List all agents",
|
|
655
655
|
description: "Returns a list of all available agents in the system (both code-defined and stored)",
|
|
656
656
|
tags: ["Agents"],
|
|
@@ -746,9 +746,9 @@ var GET_AGENT_BY_ID_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
746
746
|
method: "GET",
|
|
747
747
|
path: "/agents/:agentId",
|
|
748
748
|
responseType: "json",
|
|
749
|
-
pathParamSchema:
|
|
750
|
-
queryParamSchema:
|
|
751
|
-
responseSchema:
|
|
749
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
750
|
+
queryParamSchema: chunkZRU7KWNW_cjs.agentVersionQuerySchema,
|
|
751
|
+
responseSchema: chunkZRU7KWNW_cjs.serializedAgentSchema,
|
|
752
752
|
summary: "Get agent by ID",
|
|
753
753
|
description: "Returns details for a specific agent including configuration, tools, and memory settings. Use query params to control which stored config version is used for overrides: ?status=published (active version, default), ?status=draft (latest draft), or ?versionId=<id> (specific version). Use either status or versionId, not both.",
|
|
754
754
|
tags: ["Agents"],
|
|
@@ -775,7 +775,7 @@ var CLONE_AGENT_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
775
775
|
method: "POST",
|
|
776
776
|
path: "/agents/:agentId/clone",
|
|
777
777
|
responseType: "json",
|
|
778
|
-
pathParamSchema:
|
|
778
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
779
779
|
bodySchema: v4.z.object({
|
|
780
780
|
newId: v4.z.string().optional().describe("ID for the cloned agent. If not provided, derived from agent ID."),
|
|
781
781
|
newName: v4.z.string().optional().describe('Name for the cloned agent. Defaults to "{name} (Clone)".'),
|
|
@@ -816,9 +816,9 @@ var GENERATE_AGENT_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
816
816
|
method: "POST",
|
|
817
817
|
path: "/agents/:agentId/generate",
|
|
818
818
|
responseType: "json",
|
|
819
|
-
pathParamSchema:
|
|
820
|
-
bodySchema:
|
|
821
|
-
responseSchema:
|
|
819
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
820
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
821
|
+
responseSchema: chunkZRU7KWNW_cjs.generateResponseSchema,
|
|
822
822
|
summary: "Generate agent response",
|
|
823
823
|
description: "Executes an agent with the provided messages and returns the complete response",
|
|
824
824
|
tags: ["Agents"],
|
|
@@ -885,9 +885,9 @@ var GENERATE_LEGACY_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
885
885
|
method: "POST",
|
|
886
886
|
path: "/agents/:agentId/generate-legacy",
|
|
887
887
|
responseType: "json",
|
|
888
|
-
pathParamSchema:
|
|
889
|
-
bodySchema:
|
|
890
|
-
responseSchema:
|
|
888
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
889
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionLegacyBodySchema,
|
|
890
|
+
responseSchema: chunkZRU7KWNW_cjs.generateResponseSchema,
|
|
891
891
|
summary: "[DEPRECATED] Generate with legacy format",
|
|
892
892
|
description: "Legacy endpoint for generating agent responses. Use /agents/:agentId/generate instead.",
|
|
893
893
|
tags: ["Agents", "Legacy"],
|
|
@@ -941,9 +941,9 @@ var STREAM_GENERATE_LEGACY_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
941
941
|
method: "POST",
|
|
942
942
|
path: "/agents/:agentId/stream-legacy",
|
|
943
943
|
responseType: "datastream-response",
|
|
944
|
-
pathParamSchema:
|
|
945
|
-
bodySchema:
|
|
946
|
-
responseSchema:
|
|
944
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
945
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionLegacyBodySchema,
|
|
946
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
947
947
|
summary: "[DEPRECATED] Stream with legacy format",
|
|
948
948
|
description: "Legacy endpoint for streaming agent responses. Use /agents/:agentId/stream instead.",
|
|
949
949
|
tags: ["Agents", "Legacy"],
|
|
@@ -1004,7 +1004,7 @@ var GET_PROVIDERS_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1004
1004
|
method: "GET",
|
|
1005
1005
|
path: "/agents/providers",
|
|
1006
1006
|
responseType: "json",
|
|
1007
|
-
responseSchema:
|
|
1007
|
+
responseSchema: chunkZRU7KWNW_cjs.providersResponseSchema,
|
|
1008
1008
|
summary: "List AI providers",
|
|
1009
1009
|
description: "Returns a list of all configured AI model providers",
|
|
1010
1010
|
tags: ["Agents"],
|
|
@@ -1054,9 +1054,9 @@ var GENERATE_AGENT_VNEXT_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1054
1054
|
method: "POST",
|
|
1055
1055
|
path: "/agents/:agentId/generate/vnext",
|
|
1056
1056
|
responseType: "json",
|
|
1057
|
-
pathParamSchema:
|
|
1058
|
-
bodySchema:
|
|
1059
|
-
responseSchema:
|
|
1057
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1058
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
1059
|
+
responseSchema: chunkZRU7KWNW_cjs.generateResponseSchema,
|
|
1060
1060
|
summary: "Generate a response from an agent",
|
|
1061
1061
|
description: "Generate a response from an agent",
|
|
1062
1062
|
tags: ["Agents"],
|
|
@@ -1068,9 +1068,9 @@ var STREAM_GENERATE_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1068
1068
|
path: "/agents/:agentId/stream",
|
|
1069
1069
|
responseType: "stream",
|
|
1070
1070
|
streamFormat: "sse",
|
|
1071
|
-
pathParamSchema:
|
|
1072
|
-
bodySchema:
|
|
1073
|
-
responseSchema:
|
|
1071
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1072
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
1073
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1074
1074
|
summary: "Stream agent response",
|
|
1075
1075
|
description: "Executes an agent with the provided messages and streams the response in real-time",
|
|
1076
1076
|
tags: ["Agents"],
|
|
@@ -1141,8 +1141,8 @@ var SEND_AGENT_SIGNAL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1141
1141
|
method: "POST",
|
|
1142
1142
|
path: "/agents/:agentId/signals",
|
|
1143
1143
|
responseType: "json",
|
|
1144
|
-
pathParamSchema:
|
|
1145
|
-
bodySchema:
|
|
1144
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1145
|
+
bodySchema: chunkZRU7KWNW_cjs.sendAgentSignalBodySchema,
|
|
1146
1146
|
responseSchema: sendAgentSignalResponseSchema,
|
|
1147
1147
|
summary: "Send agent signal",
|
|
1148
1148
|
description: "Sends a signal to an active agent run or starts a memory thread run when the thread is idle",
|
|
@@ -1211,9 +1211,9 @@ var SUBSCRIBE_AGENT_THREAD_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1211
1211
|
path: "/agents/:agentId/threads/subscribe",
|
|
1212
1212
|
responseType: "stream",
|
|
1213
1213
|
streamFormat: "sse",
|
|
1214
|
-
pathParamSchema:
|
|
1215
|
-
bodySchema:
|
|
1216
|
-
responseSchema:
|
|
1214
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1215
|
+
bodySchema: chunkZRU7KWNW_cjs.subscribeAgentThreadBodySchema,
|
|
1216
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1217
1217
|
summary: "Subscribe to agent thread runs",
|
|
1218
1218
|
description: "Subscribes to future and active stream runs for a memory thread",
|
|
1219
1219
|
tags: ["Agents", "Streaming"],
|
|
@@ -1286,9 +1286,9 @@ var STREAM_UNTIL_IDLE_GENERATE_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1286
1286
|
path: "/agents/:agentId/stream-until-idle",
|
|
1287
1287
|
responseType: "stream",
|
|
1288
1288
|
streamFormat: "sse",
|
|
1289
|
-
pathParamSchema:
|
|
1290
|
-
bodySchema:
|
|
1291
|
-
responseSchema:
|
|
1289
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1290
|
+
bodySchema: chunkZRU7KWNW_cjs.streamUntilIdleBodySchema,
|
|
1291
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1292
1292
|
summary: "Stream agent response until idle",
|
|
1293
1293
|
description: "Executes an agent with the provided messages and streams the response in real-time, also listens for background task completions and streams them in real-time",
|
|
1294
1294
|
tags: ["Agents"],
|
|
@@ -1345,9 +1345,9 @@ var STREAM_GENERATE_VNEXT_DEPRECATED_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1345
1345
|
method: "POST",
|
|
1346
1346
|
path: "/agents/:agentId/stream/vnext",
|
|
1347
1347
|
responseType: "stream",
|
|
1348
|
-
pathParamSchema:
|
|
1349
|
-
bodySchema:
|
|
1350
|
-
responseSchema:
|
|
1348
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1349
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
1350
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1351
1351
|
summary: "Stream a response from an agent",
|
|
1352
1352
|
description: "[DEPRECATED] This endpoint is deprecated. Please use /stream instead.",
|
|
1353
1353
|
tags: ["Agents"],
|
|
@@ -1360,9 +1360,9 @@ var OBSERVE_AGENT_STREAM_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1360
1360
|
path: "/agents/:agentId/observe",
|
|
1361
1361
|
responseType: "stream",
|
|
1362
1362
|
streamFormat: "sse",
|
|
1363
|
-
pathParamSchema:
|
|
1364
|
-
bodySchema:
|
|
1365
|
-
responseSchema:
|
|
1363
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1364
|
+
bodySchema: chunkZRU7KWNW_cjs.observeAgentBodySchema,
|
|
1365
|
+
responseSchema: chunkZRU7KWNW_cjs.observeAgentResponseSchema,
|
|
1366
1366
|
summary: "Observe agent stream",
|
|
1367
1367
|
description: "Reconnect to an existing agent stream to receive missed events. Supports position-based resume with offset for efficient reconnection.",
|
|
1368
1368
|
tags: ["Agents", "Streaming"],
|
|
@@ -1447,9 +1447,9 @@ var APPROVE_TOOL_CALL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1447
1447
|
path: "/agents/:agentId/approve-tool-call",
|
|
1448
1448
|
responseType: "stream",
|
|
1449
1449
|
streamFormat: "sse",
|
|
1450
|
-
pathParamSchema:
|
|
1451
|
-
bodySchema:
|
|
1452
|
-
responseSchema:
|
|
1450
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1451
|
+
bodySchema: chunkZRU7KWNW_cjs.approveToolCallBodySchema,
|
|
1452
|
+
responseSchema: chunkZRU7KWNW_cjs.toolCallResponseSchema,
|
|
1453
1453
|
summary: "Approve tool call",
|
|
1454
1454
|
description: "Approves a pending tool call and continues agent execution",
|
|
1455
1455
|
tags: ["Agents", "Tools"],
|
|
@@ -1484,9 +1484,9 @@ var DECLINE_TOOL_CALL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1484
1484
|
path: "/agents/:agentId/decline-tool-call",
|
|
1485
1485
|
responseType: "stream",
|
|
1486
1486
|
streamFormat: "sse",
|
|
1487
|
-
pathParamSchema:
|
|
1488
|
-
bodySchema:
|
|
1489
|
-
responseSchema:
|
|
1487
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1488
|
+
bodySchema: chunkZRU7KWNW_cjs.declineToolCallBodySchema,
|
|
1489
|
+
responseSchema: chunkZRU7KWNW_cjs.toolCallResponseSchema,
|
|
1490
1490
|
summary: "Decline tool call",
|
|
1491
1491
|
description: "Declines a pending tool call and continues agent execution without executing the tool",
|
|
1492
1492
|
tags: ["Agents", "Tools"],
|
|
@@ -1521,9 +1521,9 @@ var RESUME_STREAM_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1521
1521
|
path: "/agents/:agentId/resume-stream",
|
|
1522
1522
|
responseType: "stream",
|
|
1523
1523
|
streamFormat: "sse",
|
|
1524
|
-
pathParamSchema:
|
|
1525
|
-
bodySchema:
|
|
1526
|
-
responseSchema:
|
|
1524
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1525
|
+
bodySchema: chunkZRU7KWNW_cjs.resumeStreamBodySchema,
|
|
1526
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1527
1527
|
summary: "Resume agent stream",
|
|
1528
1528
|
description: "Resumes a suspended agent stream with custom resume data",
|
|
1529
1529
|
tags: ["Agents"],
|
|
@@ -1605,9 +1605,9 @@ var RESUME_STREAM_UNTIL_IDLE_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1605
1605
|
path: "/agents/:agentId/resume-stream-until-idle",
|
|
1606
1606
|
responseType: "stream",
|
|
1607
1607
|
streamFormat: "sse",
|
|
1608
|
-
pathParamSchema:
|
|
1609
|
-
bodySchema:
|
|
1610
|
-
responseSchema:
|
|
1608
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1609
|
+
bodySchema: chunkZRU7KWNW_cjs.resumeStreamUntilIdleBodySchema,
|
|
1610
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1611
1611
|
summary: "Resume agent stream until idle",
|
|
1612
1612
|
description: "Resumes a suspended agent stream until idle with custom resume data, also listens for background task completions and streams them in real-time",
|
|
1613
1613
|
tags: ["Agents"],
|
|
@@ -1694,9 +1694,9 @@ var APPROVE_TOOL_CALL_GENERATE_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1694
1694
|
method: "POST",
|
|
1695
1695
|
path: "/agents/:agentId/approve-tool-call-generate",
|
|
1696
1696
|
responseType: "json",
|
|
1697
|
-
pathParamSchema:
|
|
1698
|
-
bodySchema:
|
|
1699
|
-
responseSchema:
|
|
1697
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1698
|
+
bodySchema: chunkZRU7KWNW_cjs.approveToolCallBodySchema,
|
|
1699
|
+
responseSchema: chunkZRU7KWNW_cjs.generateResponseSchema,
|
|
1700
1700
|
summary: "Approve tool call (non-streaming)",
|
|
1701
1701
|
description: "Approves a pending tool call and returns the complete response",
|
|
1702
1702
|
tags: ["Agents", "Tools"],
|
|
@@ -1730,9 +1730,9 @@ var DECLINE_TOOL_CALL_GENERATE_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1730
1730
|
method: "POST",
|
|
1731
1731
|
path: "/agents/:agentId/decline-tool-call-generate",
|
|
1732
1732
|
responseType: "json",
|
|
1733
|
-
pathParamSchema:
|
|
1734
|
-
bodySchema:
|
|
1735
|
-
responseSchema:
|
|
1733
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1734
|
+
bodySchema: chunkZRU7KWNW_cjs.declineToolCallBodySchema,
|
|
1735
|
+
responseSchema: chunkZRU7KWNW_cjs.generateResponseSchema,
|
|
1736
1736
|
summary: "Decline tool call (non-streaming)",
|
|
1737
1737
|
description: "Declines a pending tool call and returns the complete response",
|
|
1738
1738
|
tags: ["Agents", "Tools"],
|
|
@@ -1767,9 +1767,9 @@ var STREAM_NETWORK_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1767
1767
|
path: "/agents/:agentId/network",
|
|
1768
1768
|
responseType: "stream",
|
|
1769
1769
|
streamFormat: "sse",
|
|
1770
|
-
pathParamSchema:
|
|
1771
|
-
bodySchema:
|
|
1772
|
-
responseSchema:
|
|
1770
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1771
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
1772
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1773
1773
|
summary: "Stream agent network",
|
|
1774
1774
|
description: "Executes an agent network with multiple agents and streams the response",
|
|
1775
1775
|
tags: ["Agents"],
|
|
@@ -1797,9 +1797,9 @@ var APPROVE_NETWORK_TOOL_CALL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1797
1797
|
path: "/agents/:agentId/approve-network-tool-call",
|
|
1798
1798
|
responseType: "stream",
|
|
1799
1799
|
streamFormat: "sse",
|
|
1800
|
-
pathParamSchema:
|
|
1801
|
-
bodySchema:
|
|
1802
|
-
responseSchema:
|
|
1800
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1801
|
+
bodySchema: chunkZRU7KWNW_cjs.approveNetworkToolCallBodySchema,
|
|
1802
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1803
1803
|
summary: "Approve network tool call",
|
|
1804
1804
|
description: "Approves a pending network tool call and continues network agent execution",
|
|
1805
1805
|
tags: ["Agents", "Tools"],
|
|
@@ -1829,9 +1829,9 @@ var DECLINE_NETWORK_TOOL_CALL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1829
1829
|
path: "/agents/:agentId/decline-network-tool-call",
|
|
1830
1830
|
responseType: "stream",
|
|
1831
1831
|
streamFormat: "sse",
|
|
1832
|
-
pathParamSchema:
|
|
1833
|
-
bodySchema:
|
|
1834
|
-
responseSchema:
|
|
1832
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1833
|
+
bodySchema: chunkZRU7KWNW_cjs.declineNetworkToolCallBodySchema,
|
|
1834
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
1835
1835
|
summary: "Decline network tool call",
|
|
1836
1836
|
description: "Declines a pending network tool call and continues network agent execution without executing the tool",
|
|
1837
1837
|
tags: ["Agents", "Tools"],
|
|
@@ -1860,9 +1860,9 @@ var UPDATE_AGENT_MODEL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1860
1860
|
method: "POST",
|
|
1861
1861
|
path: "/agents/:agentId/model",
|
|
1862
1862
|
responseType: "json",
|
|
1863
|
-
pathParamSchema:
|
|
1864
|
-
bodySchema:
|
|
1865
|
-
responseSchema:
|
|
1863
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1864
|
+
bodySchema: chunkZRU7KWNW_cjs.updateAgentModelBodySchema,
|
|
1865
|
+
responseSchema: chunkZRU7KWNW_cjs.modelManagementResponseSchema,
|
|
1866
1866
|
summary: "Update agent model",
|
|
1867
1867
|
description: "Updates the AI model used by the agent",
|
|
1868
1868
|
tags: ["Agents", "Models"],
|
|
@@ -1882,8 +1882,8 @@ var RESET_AGENT_MODEL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1882
1882
|
method: "POST",
|
|
1883
1883
|
path: "/agents/:agentId/model/reset",
|
|
1884
1884
|
responseType: "json",
|
|
1885
|
-
pathParamSchema:
|
|
1886
|
-
responseSchema:
|
|
1885
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1886
|
+
responseSchema: chunkZRU7KWNW_cjs.modelManagementResponseSchema,
|
|
1887
1887
|
summary: "Reset agent model",
|
|
1888
1888
|
description: "Resets the agent model to its original configuration",
|
|
1889
1889
|
tags: ["Agents", "Models"],
|
|
@@ -1902,9 +1902,9 @@ var REORDER_AGENT_MODEL_LIST_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1902
1902
|
method: "POST",
|
|
1903
1903
|
path: "/agents/:agentId/models/reorder",
|
|
1904
1904
|
responseType: "json",
|
|
1905
|
-
pathParamSchema:
|
|
1906
|
-
bodySchema:
|
|
1907
|
-
responseSchema:
|
|
1905
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
1906
|
+
bodySchema: chunkZRU7KWNW_cjs.reorderAgentModelListBodySchema,
|
|
1907
|
+
responseSchema: chunkZRU7KWNW_cjs.modelManagementResponseSchema,
|
|
1908
1908
|
summary: "Reorder agent model list",
|
|
1909
1909
|
description: "Reorders the model list for agents with multiple model configurations",
|
|
1910
1910
|
tags: ["Agents", "Models"],
|
|
@@ -1927,9 +1927,9 @@ var UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
1927
1927
|
method: "POST",
|
|
1928
1928
|
path: "/agents/:agentId/models/:modelConfigId",
|
|
1929
1929
|
responseType: "json",
|
|
1930
|
-
pathParamSchema:
|
|
1931
|
-
bodySchema:
|
|
1932
|
-
responseSchema:
|
|
1930
|
+
pathParamSchema: chunkZRU7KWNW_cjs.modelConfigIdPathParams,
|
|
1931
|
+
bodySchema: chunkZRU7KWNW_cjs.updateAgentModelInModelListBodySchema,
|
|
1932
|
+
responseSchema: chunkZRU7KWNW_cjs.modelManagementResponseSchema,
|
|
1933
1933
|
summary: "Update model in model list",
|
|
1934
1934
|
description: "Updates a specific model configuration in the agent model list",
|
|
1935
1935
|
tags: ["Agents", "Models"],
|
|
@@ -2030,9 +2030,9 @@ var ENHANCE_INSTRUCTIONS_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
2030
2030
|
method: "POST",
|
|
2031
2031
|
path: "/agents/:agentId/instructions/enhance",
|
|
2032
2032
|
responseType: "json",
|
|
2033
|
-
pathParamSchema:
|
|
2034
|
-
bodySchema:
|
|
2035
|
-
responseSchema:
|
|
2033
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
2034
|
+
bodySchema: chunkZRU7KWNW_cjs.enhanceInstructionsBodySchema,
|
|
2035
|
+
responseSchema: chunkZRU7KWNW_cjs.enhanceInstructionsResponseSchema,
|
|
2036
2036
|
summary: "Enhance agent instructions",
|
|
2037
2037
|
description: "Uses AI to enhance or modify agent instructions based on user feedback",
|
|
2038
2038
|
tags: ["Agents"],
|
|
@@ -2058,7 +2058,7 @@ Current: ${instructions}
|
|
|
2058
2058
|
${comment ? `User feedback: ${comment}` : ""}`,
|
|
2059
2059
|
{
|
|
2060
2060
|
structuredOutput: {
|
|
2061
|
-
schema:
|
|
2061
|
+
schema: chunkZRU7KWNW_cjs.enhanceInstructionsResponseSchema
|
|
2062
2062
|
}
|
|
2063
2063
|
}
|
|
2064
2064
|
);
|
|
@@ -2072,9 +2072,9 @@ var STREAM_VNEXT_DEPRECATED_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
2072
2072
|
method: "POST",
|
|
2073
2073
|
path: "/agents/:agentId/streamVNext",
|
|
2074
2074
|
responseType: "stream",
|
|
2075
|
-
pathParamSchema:
|
|
2076
|
-
bodySchema:
|
|
2077
|
-
responseSchema:
|
|
2075
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
2076
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
2077
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
2078
2078
|
summary: "Stream a response from an agent",
|
|
2079
2079
|
description: "[DEPRECATED] This endpoint is deprecated. Please use /stream instead.",
|
|
2080
2080
|
tags: ["Agents"],
|
|
@@ -2088,9 +2088,9 @@ var STREAM_UI_MESSAGE_VNEXT_DEPRECATED_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
2088
2088
|
method: "POST",
|
|
2089
2089
|
path: "/agents/:agentId/stream/vnext/ui",
|
|
2090
2090
|
responseType: "stream",
|
|
2091
|
-
pathParamSchema:
|
|
2092
|
-
bodySchema:
|
|
2093
|
-
responseSchema:
|
|
2091
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
2092
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
2093
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
2094
2094
|
summary: "Stream UI messages from an agent",
|
|
2095
2095
|
description: "[DEPRECATED] This endpoint is deprecated. Please use the @mastra/ai-sdk package for uiMessage transformations",
|
|
2096
2096
|
tags: ["Agents"],
|
|
@@ -2113,9 +2113,9 @@ var STREAM_UI_MESSAGE_DEPRECATED_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
2113
2113
|
method: "POST",
|
|
2114
2114
|
path: "/agents/:agentId/stream/ui",
|
|
2115
2115
|
responseType: "stream",
|
|
2116
|
-
pathParamSchema:
|
|
2117
|
-
bodySchema:
|
|
2118
|
-
responseSchema:
|
|
2116
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentIdPathParams,
|
|
2117
|
+
bodySchema: chunkZRU7KWNW_cjs.agentExecutionBodySchema,
|
|
2118
|
+
responseSchema: chunkZRU7KWNW_cjs.streamResponseSchema,
|
|
2119
2119
|
summary: "Stream UI messages from an agent",
|
|
2120
2120
|
description: "[DEPRECATED] This endpoint is deprecated. Please use the @mastra/ai-sdk package for uiMessage transformations",
|
|
2121
2121
|
tags: ["Agents"],
|
|
@@ -2127,7 +2127,7 @@ var GET_AGENT_SKILL_ROUTE = chunkAZORAK4H_cjs.createRoute({
|
|
|
2127
2127
|
method: "GET",
|
|
2128
2128
|
path: "/agents/:agentId/skills/:skillName",
|
|
2129
2129
|
responseType: "json",
|
|
2130
|
-
pathParamSchema:
|
|
2130
|
+
pathParamSchema: chunkZRU7KWNW_cjs.agentSkillPathParams,
|
|
2131
2131
|
queryParamSchema: chunkHXICAUTW_cjs.skillDisambiguationQuerySchema,
|
|
2132
2132
|
responseSchema: chunkHXICAUTW_cjs.getAgentSkillResponseSchema,
|
|
2133
2133
|
summary: "Get agent skill",
|
|
@@ -2208,5 +2208,5 @@ exports.getSerializedProcessors = getSerializedProcessors;
|
|
|
2208
2208
|
exports.getSerializedSkillsFromAgent = getSerializedSkillsFromAgent;
|
|
2209
2209
|
exports.getWorkspaceToolsFromAgent = getWorkspaceToolsFromAgent;
|
|
2210
2210
|
exports.isProviderConnected = isProviderConnected;
|
|
2211
|
-
//# sourceMappingURL=chunk-
|
|
2212
|
-
//# sourceMappingURL=chunk-
|
|
2211
|
+
//# sourceMappingURL=chunk-NIX5VQJ6.cjs.map
|
|
2212
|
+
//# sourceMappingURL=chunk-NIX5VQJ6.cjs.map
|