"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),t=e.z.enum(["agent","spec"]),o=e.z.enum(["pending","awaiting_approval","approved","denied","executing","completed","failed"]),s=e.z.enum(["read","edit","execute","search","delete","move","fetch","think","switch_mode","other"]),a=e.z.object({name:e.z.string(),description:e.z.string().optional(),content:e.z.string(),uri:e.z.string().optional()}),n=e.z.object({type:e.z.literal("user"),content:e.z.string(),contextItems:e.z.array(a).optional(),source:e.z.enum(["chat","hook","api"]).optional(),images:e.z.array(e.z.object({data:e.z.string(),mimeType:e.z.string()})).optional(),documents:e.z.array(e.z.object({data:e.z.string(),name:e.z.string(),mimeType:e.z.string()})).optional()}),i=e.z.object({type:e.z.literal("assistant"),content:e.z.string(),operationType:e.z.enum(["Say","Reasoning","Print"]).optional(),executionId:e.z.string().optional(),subExecutionId:e.z.string().optional()}),r=e.z.object({type:e.z.literal("tool_call"),toolCallId:e.z.string(),toolName:e.z.string(),args:e.z.record(e.z.unknown()),status:o,title:e.z.string().optional(),kind:s.optional(),executionId:e.z.string().optional(),actionType:e.z.string().optional(),filePath:e.z.string().optional(),preSnapshotId:e.z.string().optional(),postSnapshotId:e.z.string().optional(),subExecutionId:e.z.string().optional()}),c=e.z.object({type:e.z.literal("tool_result"),toolCallId:e.z.string(),content:e.z.string(),success:e.z.boolean(),durationMs:e.z.number().optional(),executionId:e.z.string().optional(),metadata:e.z.record(e.z.unknown()).optional(),subExecutionId:e.z.string().optional()}),l=e.z.object({type:e.z.literal("system"),content:e.z.string()}),z=e.z.object({type:e.z.literal("error"),message:e.z.string(),code:e.z.string().optional(),details:e.z.record(e.z.unknown()).optional()}),d=e.z.object({type:e.z.literal("mode_change"),fromMode:t,toMode:t,reason:e.z.string().optional()}),g=e.z.object({type:e.z.literal("session_event"),category:e.z.enum(["session_start","session_restore","session_pause","session_resume"]),context:e.z.record(e.z.unknown()).optional()}),m=e.z.object({type:e.z.literal("sub_agent_start"),parentExecutionId:e.z.string(),subSessionId:e.z.string(),subAgentName:e.z.string(),prompt:e.z.string(),explanation:e.z.string()}),S=e.z.object({type:e.z.literal("sub_agent_complete"),parentExecutionId:e.z.string(),subSessionId:e.z.string(),response:e.z.string(),status:e.z.enum(["success","error","cancelled"]),errorMessage:e.z.string().optional()}),p=e.z.object({type:e.z.literal("sub_agent_progress"),parentExecutionId:e.z.string(),subSessionId:e.z.string(),message:e.z.string()}),u=e.z.object({type:e.z.literal("steering_inclusion"),documents:e.z.array(e.z.string()),executionId:e.z.string().optional(),subExecutionId:e.z.string().optional()}),h=e.z.discriminatedUnion("type",[n,i,r,c,l,z,d,g,m,S,p,u]),y=e.z.object({schemaVersion:e.z.string(),id:e.z.string(),title:e.z.string(),agentMode:t,workspacePaths:e.z.array(e.z.string()),createdAt:e.z.string(),lastModifiedAt:e.z.string(),lastCheckpointId:e.z.string().optional(),parentSessionId:e.z.string().optional(),parentExecutionId:e.z.string().optional()}),b=e.z.object({id:e.z.string(),timestamp:e.z.string(),payload:h}),M=e.z.object({metadata:y,messages:e.z.array(b)}),P=e.z.object({id:e.z.string(),title:e.z.string(),agentMode:t,createdAt:e.z.string(),lastModifiedAt:e.z.string(),workspacePaths:e.z.array(e.z.string())}),I=e.z.array(P),j=e.z.object({sessions:I}),x=e.z.object({limit:e.z.number().optional(),sortBy:e.z.enum(["createdAt","lastModifiedAt"]).optional(),sortOrder:e.z.enum(["asc","desc"]).optional()}),A="0.0.1";exports.AgentModeSchema=t;exports.AssistantMessagePayloadSchema=i;exports.ContextItemSchema=a;exports.ErrorPayloadSchema=z;exports.ListSessionsOptionsSchema=x;exports.ListSessionsResponseSchema=j;exports.MessagePayloadSchema=h;exports.ModeChangePayloadSchema=d;exports.PersistedMessageSchema=b;exports.PersistedSessionSchema=M;exports.SCHEMA_VERSION=A;exports.SessionEventPayloadSchema=g;exports.SessionMetadataSchema=y;exports.SessionSummariesSchema=I;exports.SessionSummarySchema=P;exports.SteeringInclusionPayloadSchema=u;exports.SubAgentCompletePayloadSchema=S;exports.SubAgentProgressPayloadSchema=p;exports.SubAgentStartPayloadSchema=m;exports.SystemMessagePayloadSchema=l;exports.ToolCallPayloadSchema=r;exports.ToolCallStatusSchema=o;exports.ToolKindSchema=s;exports.ToolResultPayloadSchema=c;exports.UserMessagePayloadSchema=n;
//# sourceMappingURL=index.cjs.map
