@agent-earth/shared 0.0.4

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.
Files changed (43) hide show
  1. package/dist/index.d.ts +10 -0
  2. package/dist/index.js +1 -0
  3. package/dist/schemas/agent-system.schema.d.ts +11661 -0
  4. package/dist/schemas/agent-system.schema.js +1 -0
  5. package/dist/schemas/agent.schema.d.ts +901 -0
  6. package/dist/schemas/agent.schema.js +1 -0
  7. package/dist/schemas/cesium.schema.d.ts +517 -0
  8. package/dist/schemas/cesium.schema.js +1 -0
  9. package/dist/schemas/index.d.ts +10 -0
  10. package/dist/schemas/index.js +1 -0
  11. package/dist/schemas/mcp.schema.d.ts +1791 -0
  12. package/dist/schemas/mcp.schema.js +1 -0
  13. package/dist/schemas/service-config.schema.d.ts +1302 -0
  14. package/dist/schemas/service-config.schema.js +1 -0
  15. package/dist/schemas/skill.schema.d.ts +392 -0
  16. package/dist/schemas/skill.schema.js +1 -0
  17. package/dist/schemas/store.schema.d.ts +1242 -0
  18. package/dist/schemas/store.schema.js +1 -0
  19. package/dist/schemas/user.schema.d.ts +541 -0
  20. package/dist/schemas/user.schema.js +1 -0
  21. package/dist/schemas/websocket.schema.d.ts +1186 -0
  22. package/dist/schemas/websocket.schema.js +1 -0
  23. package/dist/schemas/wiki.schema.d.ts +865 -0
  24. package/dist/schemas/wiki.schema.js +1 -0
  25. package/dist/types/agent.d.ts +45 -0
  26. package/dist/types/agent.js +1 -0
  27. package/dist/types/at-file.d.ts +42 -0
  28. package/dist/types/at-file.js +1 -0
  29. package/dist/types/cesium.d.ts +116 -0
  30. package/dist/types/cesium.js +1 -0
  31. package/dist/types/hermes.d.ts +95 -0
  32. package/dist/types/hermes.js +1 -0
  33. package/dist/types/mcp.d.ts +202 -0
  34. package/dist/types/mcp.js +1 -0
  35. package/dist/types/skill.d.ts +29 -0
  36. package/dist/types/skill.js +1 -0
  37. package/dist/types/slash-command.d.ts +26 -0
  38. package/dist/types/slash-command.js +1 -0
  39. package/dist/types/websocket.d.ts +301 -0
  40. package/dist/types/websocket.js +1 -0
  41. package/dist/types/wiki.d.ts +66 -0
  42. package/dist/types/wiki.js +1 -0
  43. package/package.json +33 -0
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";export const WebSocketConfigSchema=e.object({enabled:e.boolean(),port:e.number(),host:e.string(),path:e.string(),messageFormat:e.enum(["json","binary"]),heartbeatInterval:e.number(),maxConnections:e.number()});export const WSMessageSchema=e.object({type:e.enum(["client_register","user_input","text_reply","tool_choice_required","cesium_command","workspace_command","workspace_connector_request","workspace_connector_result","command_result","action_feedback","agent_status","error","heartbeat","status","workspace_mode_change","workspace_mode_changed","profile_switched"]),id:e.string(),timestamp:e.string(),payload:e.any()});export const AgentRoleSchema=e.enum(["default","sub-agent","orchestrator"]);export const ProfileSwitchTriggerSchema=e.enum(["intent-gate","mention","manual"]);export const ClientRegisterPayloadSchema=e.object({clientType:e.enum(["nl_component","smart_earth","workspace_ui","workspace_connector"]),sessionId:e.string().optional(),userId:e.string().optional(),metadata:e.record(e.any()).optional()});export const ClientRegisterMessageSchema=WSMessageSchema.extend({type:e.literal("client_register"),payload:ClientRegisterPayloadSchema});export const UserInputPayloadSchema=e.object({text:e.string(),sessionId:e.string(),context:e.record(e.any()).optional(),voiceInput:e.boolean().optional(),targetProfile:e.string().optional(),orchestratorMode:e.boolean().optional()});export const UserInputMessageSchema=WSMessageSchema.extend({type:e.literal("user_input"),payload:UserInputPayloadSchema});export const HermesActionSchema=e.object({type:e.string(),interface:e.string().optional(),params:e.record(e.any()),id:e.string().optional()});export const TextReplyPayloadSchema=e.object({text:e.string(),agentId:e.string(),sessionId:e.string(),actions:e.array(HermesActionSchema).optional(),isStreaming:e.boolean().optional(),isFinal:e.boolean().optional(),agentDisplayName:e.string().optional(),agentRole:AgentRoleSchema.optional()});export const TextReplyMessageSchema=WSMessageSchema.extend({type:e.literal("text_reply"),payload:TextReplyPayloadSchema});export const ToolChoiceRequiredPayloadSchema=e.object({agentId:e.string(),sessionId:e.string(),conflict:e.object({id:e.string(),originalMessage:e.string(),options:e.array(e.object({index:e.number(),source:e.enum(["mcp","skill","flowise","auto"]),toolName:e.string().optional(),label:e.string(),description:e.string().optional()})),conflictingToolNames:e.array(e.string()),prompt:e.string()})});export const ToolChoiceRequiredMessageSchema=WSMessageSchema.extend({type:e.literal("tool_choice_required"),payload:ToolChoiceRequiredPayloadSchema});export const CesiumCommandPayloadSchema=e.object({command:e.any(),agentId:e.string(),sessionId:e.string()});export const CesiumCommandMessageSchema=WSMessageSchema.extend({type:e.literal("cesium_command"),payload:CesiumCommandPayloadSchema});export const WorkspaceCommandPayloadSchema=e.object({command:e.string(),targetMessageId:e.string().optional(),workspaceId:e.string().optional(),sessionId:e.string().optional(),agentId:e.string().optional()}).catchall(e.any());export const WorkspaceCommandMessageSchema=WSMessageSchema.extend({type:e.literal("workspace_command"),payload:WorkspaceCommandPayloadSchema});export const CommandResultPayloadSchema=e.object({targetMessageId:e.string(),commandType:e.string(),success:e.boolean(),data:e.record(e.any()).optional(),error:e.string().optional()});export const CommandResultMessageSchema=WSMessageSchema.extend({type:e.literal("command_result"),payload:CommandResultPayloadSchema});export const ActionFeedbackPayloadSchema=e.object({targetMessageId:e.string(),actionId:e.string().optional(),actionType:e.string().optional(),result:e.enum(["success","failure","partial"]),data:e.record(e.any()).optional(),error:e.string().optional()});export const ActionFeedbackMessageSchema=WSMessageSchema.extend({type:e.literal("action_feedback"),payload:ActionFeedbackPayloadSchema});export const AgentStatusPayloadSchema=e.object({agentId:e.string(),status:e.enum(["idle","processing","waiting_for_tool","error"]),sessionId:e.string().optional(),currentActivity:e.string().optional(),processingTime:e.number().optional()});export const AgentStatusMessageSchema=WSMessageSchema.extend({type:e.literal("agent_status"),payload:AgentStatusPayloadSchema});export const ErrorPayloadSchema=e.object({code:e.string(),message:e.string(),details:e.any().optional()});export const ErrorMessageSchema=WSMessageSchema.extend({type:e.literal("error"),payload:ErrorPayloadSchema});export const HeartbeatPayloadSchema=e.object({status:e.enum(["alive","busy","idle"]),activeAgents:e.array(e.string()),memoryUsage:e.number().optional()});export const HeartbeatMessageSchema=WSMessageSchema.extend({type:e.literal("heartbeat"),payload:HeartbeatPayloadSchema});export const StatusPayloadSchema=e.object({instanceId:e.string(),status:e.enum(["running","stopped","error"]),activeConnections:e.number(),activeSessions:e.number(),version:e.string()});export const StatusMessageSchema=WSMessageSchema.extend({type:e.literal("status"),payload:StatusPayloadSchema});export const WorkspaceModeChangePayloadSchema=e.object({mode:e.enum(["mcp","llm-direct"])});export const WorkspaceModeChangeMessageSchema=WSMessageSchema.extend({type:e.literal("workspace_mode_change"),payload:WorkspaceModeChangePayloadSchema});export const WorkspaceModeChangedPayloadSchema=e.object({mode:e.enum(["mcp","llm-direct"])});export const WorkspaceModeChangedMessageSchema=WSMessageSchema.extend({type:e.literal("workspace_mode_changed"),payload:WorkspaceModeChangedPayloadSchema});export const ProfileSwitchedPayloadSchema=e.object({activeProfile:e.string(),displayName:e.string(),role:AgentRoleSchema,trigger:ProfileSwitchTriggerSchema,sessionId:e.string()});export const ProfileSwitchedMessageSchema=WSMessageSchema.extend({type:e.literal("profile_switched"),payload:ProfileSwitchedPayloadSchema});