mirror of
https://github.com/prowler-cloud/prowler.git
synced 2025-12-19 05:17:47 +00:00
Co-authored-by: Chandrapal Badshah <12944530+Chan9390@users.noreply.github.com> Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com> Co-authored-by: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com> Co-authored-by: Alan Buscaglia <gentlemanprogramming@gmail.com> Co-authored-by: Adrián Jesús Peña Rodríguez <adrianjpr@gmail.com> Co-authored-by: Andoni Alonso <14891798+andoniaf@users.noreply.github.com> Co-authored-by: Rubén De la Torre Vico <ruben@prowler.com> Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com>
73 lines
2.0 KiB
TypeScript
73 lines
2.0 KiB
TypeScript
/**
|
|
* Shared constants for Lighthouse AI
|
|
* Used by both server-side (API routes) and client-side (components)
|
|
*/
|
|
|
|
export const META_TOOLS = {
|
|
DESCRIBE: "describe_tool",
|
|
EXECUTE: "execute_tool",
|
|
} as const;
|
|
|
|
export type MetaTool = (typeof META_TOOLS)[keyof typeof META_TOOLS];
|
|
|
|
export const CHAIN_OF_THOUGHT_ACTIONS = {
|
|
PLANNING: "tool_planning",
|
|
START: "tool_start",
|
|
COMPLETE: "tool_complete",
|
|
} as const;
|
|
|
|
export type ChainOfThoughtAction =
|
|
(typeof CHAIN_OF_THOUGHT_ACTIONS)[keyof typeof CHAIN_OF_THOUGHT_ACTIONS];
|
|
|
|
export const MESSAGE_STATUS = {
|
|
STREAMING: "streaming",
|
|
SUBMITTED: "submitted",
|
|
IDLE: "idle",
|
|
} as const;
|
|
|
|
export type MessageStatus =
|
|
(typeof MESSAGE_STATUS)[keyof typeof MESSAGE_STATUS];
|
|
|
|
export const MESSAGE_ROLES = {
|
|
USER: "user",
|
|
ASSISTANT: "assistant",
|
|
} as const;
|
|
|
|
export type MessageRole = (typeof MESSAGE_ROLES)[keyof typeof MESSAGE_ROLES];
|
|
|
|
export const STREAM_EVENT_TYPES = {
|
|
TEXT_START: "text-start",
|
|
TEXT_DELTA: "text-delta",
|
|
TEXT_END: "text-end",
|
|
DATA_CHAIN_OF_THOUGHT: "data-chain-of-thought",
|
|
} as const;
|
|
|
|
export type StreamEventType =
|
|
(typeof STREAM_EVENT_TYPES)[keyof typeof STREAM_EVENT_TYPES];
|
|
|
|
export const MESSAGE_PART_TYPES = {
|
|
TEXT: "text",
|
|
DATA_CHAIN_OF_THOUGHT: "data-chain-of-thought",
|
|
} as const;
|
|
|
|
export type MessagePartType =
|
|
(typeof MESSAGE_PART_TYPES)[keyof typeof MESSAGE_PART_TYPES];
|
|
|
|
export const CHAIN_OF_THOUGHT_STATUS = {
|
|
COMPLETE: "complete",
|
|
ACTIVE: "active",
|
|
PENDING: "pending",
|
|
} as const;
|
|
|
|
export type ChainOfThoughtStatus =
|
|
(typeof CHAIN_OF_THOUGHT_STATUS)[keyof typeof CHAIN_OF_THOUGHT_STATUS];
|
|
|
|
export const LIGHTHOUSE_AGENT_TAG = "lighthouse-agent";
|
|
|
|
export const STREAM_MESSAGE_ID = "msg-1";
|
|
|
|
export const ERROR_PREFIX = "[LIGHTHOUSE_ANALYST_ERROR]:";
|
|
|
|
export const TOOLS_UNAVAILABLE_MESSAGE =
|
|
"\nProwler tools are unavailable. You cannot access cloud accounts or security scan data. If asked about security status or scan results, inform the user that this data is currently inaccessible.\n";
|