const require_chunk = require('./chunk-DWy1uDak.cjs');
const require_utils = require('./utils-DUJcA3eH.cjs');
const zod = require_chunk.__toESM(require("zod"));

//#region src/internal/agents/tools/whoami.ts
/**
* Get the current authenticated user's information from Sentry API
*/
async function getCurrentUser(apiService) {
	const user = await apiService.getAuthenticatedUser();
	return {
		id: user.id,
		name: user.name,
		email: user.email
	};
}
/**
* Create a tool for getting current user information
* The tool is pre-bound with the API service configured for the appropriate region
*/
function createWhoamiTool(options) {
	const { apiService } = options;
	return require_utils.agentTool({
		description: "Get the current authenticated user's information",
		parameters: zod.z.object({}),
		execute: async () => {
			const user = await getCurrentUser(apiService);
			return `Current user: ${user.name || "Unknown"} (${user.email}, ID: ${user.id})`;
		}
	});
}

//#endregion
Object.defineProperty(exports, 'createWhoamiTool', {
  enumerable: true,
  get: function () {
    return createWhoamiTool;
  }
});
Object.defineProperty(exports, 'getCurrentUser', {
  enumerable: true,
  get: function () {
    return getCurrentUser;
  }
});
//# sourceMappingURL=whoami-DBSqcCGl.cjs.map