UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

96 lines (95 loc) 3.68 kB
/** * AI-specific span types and data structures * Following OpenTelemetry GenAI semantic conventions */ /** * Span types for AI operations * Following OTel GenAI conventions for span categorization */ export var SpanType; (function (SpanType) { /** Agent execution run (reserved for future multi-agent support) */ SpanType["AGENT_RUN"] = "agent.run"; /** Workflow step execution (reserved for future workflow engine) */ SpanType["WORKFLOW_STEP"] = "workflow.step"; /** Tool/function call */ SpanType["TOOL_CALL"] = "tool.call"; /** LLM generation request */ SpanType["MODEL_GENERATION"] = "model.generation"; /** Embedding generation (reserved for future embedding API) */ SpanType["EMBEDDING"] = "embedding"; /** Retrieval operation (reserved for future RAG support) */ SpanType["RETRIEVAL"] = "retrieval"; /** Memory operation */ SpanType["MEMORY"] = "memory"; /** Context compaction operation */ SpanType["CONTEXT_COMPACTION"] = "context.compaction"; /** RAG pipeline operation */ SpanType["RAG"] = "rag"; /** Evaluation/scoring operation */ SpanType["EVALUATION"] = "evaluation"; /** MCP transport operation */ SpanType["MCP_TRANSPORT"] = "mcp.transport"; /** Media generation (image/video) */ SpanType["MEDIA_GENERATION"] = "media.generation"; /** PPT/presentation generation */ SpanType["PPT_GENERATION"] = "ppt.generation"; /** Workflow execution */ SpanType["WORKFLOW"] = "workflow"; /** TTS synthesis */ SpanType["TTS"] = "tts"; /** STT transcription */ SpanType["STT"] = "stt"; /** Server adapter request */ SpanType["SERVER_REQUEST"] = "server.request"; /** Custom span */ SpanType["CUSTOM"] = "custom"; })(SpanType || (SpanType = {})); /** * Span status codes (following OTel conventions) */ export var SpanStatus; (function (SpanStatus) { SpanStatus[SpanStatus["UNSET"] = 0] = "UNSET"; SpanStatus[SpanStatus["OK"] = 1] = "OK"; SpanStatus[SpanStatus["ERROR"] = 2] = "ERROR"; SpanStatus[SpanStatus["WARNING"] = 3] = "WARNING"; })(SpanStatus || (SpanStatus = {})); /** * OpenTelemetry GenAI semantic conventions * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/ */ export const GENAI_ATTRIBUTES = { // System and model identification GEN_AI_SYSTEM: "gen_ai.system", GEN_AI_REQUEST_MODEL: "gen_ai.request.model", GEN_AI_RESPONSE_MODEL: "gen_ai.response.model", // Token usage GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens", GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens", GEN_AI_USAGE_TOTAL_TOKENS: "gen_ai.usage.total_tokens", // Request parameters GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature", GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p", GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens", GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences", // Response metadata GEN_AI_RESPONSE_FINISH_REASON: "gen_ai.response.finish_reasons", GEN_AI_RESPONSE_ID: "gen_ai.response.id", // Tool/function calling GEN_AI_TOOL_NAME: "gen_ai.tool.name", GEN_AI_TOOL_CALL_ID: "gen_ai.tool.call_id", // Prompts and completions (optional, privacy-sensitive) GEN_AI_PROMPT: "gen_ai.prompt", GEN_AI_COMPLETION: "gen_ai.completion", }; /** * Agent-specific conventions (emerging standard) */ export const AGENT_ATTRIBUTES = { AGENT_NAME: "gen_ai.agent.name", AGENT_STEP_TYPE: "gen_ai.agent.step_type", AGENT_TOOL_CALLS: "gen_ai.agent.tool_calls", AGENT_MEMORY_ACCESS: "gen_ai.agent.memory_access", AGENT_REASONING_TRACE: "gen_ai.agent.reasoning_trace", };