import { C as SPAN_NAMES, E as UNKNOWN_VALUE, S as SPAN_KEYS, T as TRANSFER_TO_SUB_AGENT_ID, _ as AI_OPERATIONS, a as OPERATORS, b as DELEGATION_ID, c as QUERY_DEFAULTS, d as QUERY_TYPES, f as REDUCE_OPERATIONS, g as AGENT_IDS, h as ACTIVITY_TYPES, i as FIELD_TYPES, l as QUERY_EXPRESSIONS, m as ACTIVITY_STATUS, n as DATA_SOURCES, o as ORDER_DIRECTIONS, p as ACTIVITY_NAMES, r as DATA_TYPES, s as PANEL_TYPES, t as AGGREGATE_OPERATORS, u as QUERY_FIELD_CONFIGS, v as AI_TOOL_TYPES, w as TRANSFER_FROM_SUB_AGENT_ID, x as DELEGATION_TO_SUB_AGENT_ID, y as DELEGATION_FROM_SUB_AGENT_ID } from "./signoz-queries.js";
import { t as schemaValidationDefaults } from "./defaults.js";
import "./auth-schema.js";
import "./schema.js";
import { r as MCPTransportType, t as CredentialStoreType } from "./utility.js";
import { C as ArtifactComponentApiInsertSchema$1, Ht as FunctionApiInsertSchema, Lr as SubAgentStopWhenSchema, Ut as FunctionApiSelectSchema, Wt as FunctionApiUpdateSchema, Xn as StopWhenSchema, kn as ModelSettingsSchema, l as AgentStopWhenSchema, t as validatePropsAsJsonSchema, zt as FullAgentAgentInsertSchema } from "./props-validation.js";
import { t as detectAuthenticationRequired } from "./auth-detection.js";
import { t as DEFAULT_NANGO_STORE_ID } from "./default-constants.js";
import { z } from "@hono/zod-openapi";

//#region src/client-exports.ts
/**
* Client-Safe Schema Exports
*
* This file exports only the Zod schemas and types that are safe to use
* in client-side applications (like Next.js builds) without importing
* server-side database dependencies.
*/
const { AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } = schemaValidationDefaults;
const TenantParamsSchema = z.object({ tenantId: z.string() });
const TenantProjectParamsSchema = TenantParamsSchema.extend({ projectId: z.string() });
const TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({ id: z.string() });
const IdParamsSchema = z.object({ id: z.string() });
const PaginationSchema = z.object({
	page: z.coerce.number().min(1).default(1),
	limit: z.coerce.number().min(1).max(100).default(10),
	total: z.number(),
	pages: z.number()
});
const ListResponseSchema = (itemSchema) => z.object({
	data: z.array(itemSchema),
	pagination: PaginationSchema
});
const SingleResponseSchema = (itemSchema) => z.object({ data: itemSchema });
const ErrorResponseSchema = z.object({
	error: z.string(),
	message: z.string().optional(),
	details: z.unknown().optional()
});
const AgentApiInsertSchema = z.object({
	id: z.string().optional(),
	name: z.string(),
	description: z.string().optional(),
	prompt: z.string().optional(),
	model: ModelSettingsSchema.optional(),
	tools: z.array(z.string()).optional(),
	dataComponents: z.array(z.string()).optional(),
	artifactComponents: z.array(z.string()).optional(),
	canTransferTo: z.array(z.string()).optional(),
	canDelegateTo: z.array(z.string()).optional(),
	type: z.enum(["internal", "external"]).optional()
});
const ToolApiInsertSchema = z.object({
	id: z.string().optional(),
	name: z.string(),
	description: z.string().optional(),
	type: z.enum(["mcp", "hosted"]),
	config: z.record(z.string(), z.unknown()),
	credentialReferenceId: z.string().optional()
});
const ApiKeyApiSelectSchema = z.object({
	id: z.string(),
	tenantId: z.string(),
	projectId: z.string(),
	agentId: z.string(),
	publicId: z.string(),
	keyHash: z.string(),
	keyPrefix: z.string(),
	name: z.string().optional(),
	lastUsedAt: z.string().optional(),
	expiresAt: z.string().optional(),
	createdAt: z.string(),
	updatedAt: z.string()
});
const ApiKeyApiCreationResponseSchema = z.object({ data: z.object({
	apiKey: ApiKeyApiSelectSchema,
	key: z.string()
}) });
const CredentialReferenceApiInsertSchema = z.object({
	id: z.string(),
	tenantId: z.string().optional(),
	projectId: z.string().optional(),
	name: z.string(),
	type: z.enum(CredentialStoreType),
	credentialStoreId: z.string(),
	retrievalParams: z.record(z.string(), z.unknown()).nullish(),
	createdAt: z.string().optional(),
	updatedAt: z.string().optional(),
	userId: z.string().nullish(),
	toolId: z.string().nullish(),
	createdBy: z.string().nullish()
});
const DataComponentApiInsertSchema = z.object({
	id: z.string(),
	name: z.string(),
	description: z.string().optional(),
	props: z.record(z.string(), z.unknown()),
	render: z.object({
		component: z.string(),
		mockData: z.record(z.string(), z.unknown())
	}).nullable().optional()
});
const ArtifactComponentApiInsertSchema = ArtifactComponentApiInsertSchema$1;
const ContextConfigApiInsertSchema = z.object({
	id: z.string().optional(),
	name: z.string().optional(),
	description: z.string().optional(),
	type: z.string().optional(),
	config: z.record(z.string(), z.unknown()).optional()
});
const ExternalAgentApiInsertSchema = z.object({
	id: z.string().optional(),
	name: z.string(),
	description: z.string().optional(),
	baseUrl: z.string(),
	headers: z.record(z.string(), z.string()).nullable().optional(),
	credentialReferenceId: z.string().nullable().optional(),
	type: z.literal("external").optional()
});
const AgentAgentApiInsertSchema = z.object({
	id: z.string().optional(),
	name: z.string(),
	description: z.string().optional(),
	defaultSubAgentId: z.string().optional()
});
const FullAgentDefinitionSchema = AgentAgentApiInsertSchema.extend({
	subAgents: z.record(z.string(), z.union([FullAgentAgentInsertSchema])),
	contextConfig: z.optional(ContextConfigApiInsertSchema),
	models: z.object({
		base: z.object({
			model: z.string(),
			providerOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
		}).optional(),
		structuredOutput: z.object({
			model: z.string(),
			providerOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
		}).optional(),
		summarizer: z.object({
			model: z.string(),
			providerOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
		}).optional()
	}).optional(),
	stopWhen: z.object({ transferCountIs: z.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX).optional() }).optional(),
	prompt: z.string().max(VALIDATION_AGENT_PROMPT_MAX_CHARS).optional(),
	statusUpdates: z.object({
		enabled: z.boolean().optional(),
		numEvents: z.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS).optional(),
		timeInSeconds: z.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS).optional(),
		prompt: z.string().max(VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS).optional(),
		statusComponents: z.array(z.object({
			type: z.string(),
			description: z.string().optional(),
			detailsSchema: z.object({
				type: z.literal("object"),
				properties: z.record(z.string(), z.any()),
				required: z.array(z.string()).optional()
			}).optional()
		})).optional()
	}).optional()
});
const MIN_ID_LENGTH = 1;
const MAX_ID_LENGTH = 255;
const URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
const resourceIdSchema = z.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(URL_SAFE_ID_PATTERN, { message: "ID must contain only letters, numbers, hyphens, underscores, and dots" });
function generateIdFromName(name) {
	return name.toLowerCase().replace(/[^a-zA-Z0-9]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").slice(0, MAX_ID_LENGTH);
}

//#endregion
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, AgentAgentApiInsertSchema, AgentApiInsertSchema, AgentStopWhenSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiSelectSchema, ArtifactComponentApiInsertSchema, ContextConfigApiInsertSchema, CredentialReferenceApiInsertSchema, CredentialStoreType, DATA_SOURCES, DATA_TYPES, DEFAULT_NANGO_STORE_ID, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, DataComponentApiInsertSchema, ErrorResponseSchema, ExternalAgentApiInsertSchema, FIELD_TYPES, FullAgentDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, IdParamsSchema, ListResponseSchema, MAX_ID_LENGTH, MCPTransportType, MIN_ID_LENGTH, ModelSettingsSchema, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, PaginationSchema, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, SingleResponseSchema, StopWhenSchema, SubAgentStopWhenSchema, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, UNKNOWN_VALUE, URL_SAFE_ID_PATTERN, detectAuthenticationRequired, generateIdFromName, resourceIdSchema, validatePropsAsJsonSchema };
//# sourceMappingURL=client-exports.js.map