@easbot/types 0.3.29 → 0.3.32
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.
- package/README.en.md +162 -1
- package/README.md +158 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2185 -1617
- package/dist/index.d.ts +2185 -1617
- package/dist/index.mjs +2 -2
- package/package.json +5 -6
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r,{z}from'zod';var E={id:"easbot",displayName:"EASBot",description:"\u591A Agent \u534F\u4F5C\u751F\u6001\u7CFB\u7EDF\uFF08\u81EA\u5B66\u4E60 / \u81EA\u8FDB\u5316 / \u6301\u7EED\u6539\u8FDB\u7684 AI Agent \u5E73\u53F0\uFF09",url:"https://www.easbot.cn",domain:"easbot.cn",xdgAppName:"easbot",envPrefix:"EASBOT",dataDirName:"easbot",cacheDirName:"easbot",configDirName:"easbot"};function W(t){return `${E.envPrefix}_${t}`}var m=r.enum(["ask","allow","deny"]).meta({ref:"PermissionActionConfig"}),x=r.record(r.string(),m).meta({ref:"PermissionObjectConfig"}),n=r.union([m,x]).meta({ref:"PermissionRuleConfig"}),H=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?{__originalKeys:Object.keys(t),...t}:t,V=t=>{if(typeof t=="string")return {"*":t};let c=t,{__originalKeys:b,...u}=c;if(!b)return u;let h={};for(let i of b)i in u&&(h[i]=u[i]);return h},S=r.preprocess(H,r.object({__originalKeys:r.string().array().optional(),read:n.optional(),edit:n.optional(),glob:n.optional(),grep:n.optional(),list:n.optional(),bash:n.optional(),task:n.optional(),external_directory:n.optional(),todo:m.optional(),question:m.optional(),webfetch:m.optional(),websearch:m.optional(),codesearch:n.optional(),lsp:n.optional(),doom_loop:m.optional(),skill:n.optional(),pty_session:n.optional(),pty_manage:n.optional(),write:n.optional(),multiedit:n.optional(),note:n.optional(),memory:n.optional(),codebase:n.optional(),agent_client:n.optional(),gateway:n.optional(),apply_patch:n.optional(),batch:n.optional(),plan:n.optional()}).catchall(n).or(m)).transform(V).meta({ref:"PermissionConfig"}),A=r.object({read:n.optional(),edit:n.optional(),write:n.optional(),glob:n.optional(),grep:n.optional(),list:n.optional(),bash:n.optional(),webfetch:n.optional(),websearch:n.optional(),task:n.optional(),todo:m.optional(),question:m.optional(),skill:n.optional(),memory:n.optional(),note:n.optional(),pty_session:n.optional(),pty_manage:n.optional(),external_directory:n.optional(),doom_loop:m.optional()}).catchall(n).meta({ref:"AgentPermission"}),C=r.object({permission:r.string(),pattern:r.string(),action:m}).meta({ref:"PermissionRuntimeRule"}),y=r.array(C).meta({ref:"PermissionRuleset"}),Y={Action:m,Object:x,Rule:n,AgentPermissionSchema:A,Config:S,RuntimeRule:C,Ruleset:y};var T=(i=>(i.HTTP="http",i.WEBSOCKET="websocket",i.GRPC="grpc",i.TCP="tcp",i.UDP="udp",i))(T||{}),P=(g=>(g.GET="GET",g.POST="POST",g.PUT="PUT",g.DELETE="DELETE",g.PATCH="PATCH",g.HEAD="HEAD",g.OPTIONS="OPTIONS",g))(P||{}),k=(s=>(s[s.OK=200]="OK",s[s.CREATED=201]="CREATED",s[s.NO_CONTENT=204]="NO_CONTENT",s[s.BAD_REQUEST=400]="BAD_REQUEST",s[s.UNAUTHORIZED=401]="UNAUTHORIZED",s[s.FORBIDDEN=403]="FORBIDDEN",s[s.NOT_FOUND=404]="NOT_FOUND",s[s.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",s[s.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",s[s.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",s))(k||{}),N=(i=>(i.CONNECTING="connecting",i.OPEN="open",i.CLOSING="closing",i.CLOSED="closed",i.ERROR="error",i))(N||{}),v=(i=>(i.TEXT="text",i.BINARY="binary",i.JSON="json",i.PING="ping",i.PONG="pong",i))(v||{}),D=(o=>(o[o.OK=200]="OK",o[o.CREATED=201]="CREATED",o[o.NO_CONTENT=204]="NO_CONTENT",o[o.BAD_REQUEST=400]="BAD_REQUEST",o[o.UNAUTHORIZED=401]="UNAUTHORIZED",o[o.FORBIDDEN=403]="FORBIDDEN",o[o.NOT_FOUND=404]="NOT_FOUND",o[o.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",o[o.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",o[o.CONFLICT=409]="CONFLICT",o[o.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",o[o.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",o[o.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",o[o.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",o[o.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",o[o.BAD_GATEWAY=502]="BAD_GATEWAY",o[o.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",o[o.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",o[o.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",o))(D||{});var w=(g=>(g.INITIALIZING="initializing",g.IDLE="idle",g.RUNNING="running",g.SUSPENDED="suspended",g.STOPPING="stopping",g.STOPPED="stopped",g.ERROR="error",g))(w||{});var M=(f=>(f.TEXT="text",f.IMAGE="image",f.FILE="file",f.AUDIO="audio",f.VIDEO="video",f.SYSTEM="system",f))(M||{}),O=(u=>(u.USER="user",u.AGENT="agent",u.SYSTEM="system",u))(O||{});var Q={};var Z=r.object({url:r.string().optional(),override:r.string().optional(),color:r.string().optional()}).meta({ref:"ProjectIcon"}),X=r.object({start:r.string().optional().describe("Startup script to run when creating a new workspace (worktree)")}).meta({ref:"ProjectCommands"}),J=r.object({created:r.number(),updated:r.number(),initialized:r.number().optional()}).meta({ref:"ProjectTime"}),_=r.object({id:r.string(),worktree:r.string(),vcs:r.literal("git").optional(),name:r.string().optional(),icon:Z.optional(),commands:X.optional(),time:J,sandboxes:r.array(r.string())}).meta({ref:"Project"});var L=r.string().meta({ref:"SessionId"}),$=r.enum(["general","coder"]).meta({ref:"ContextMode"}),ee=["general","coder"],te=r.object({file:r.string(),before:r.string(),after:r.string(),additions:r.number(),deletions:r.number(),status:r.enum(["added","deleted","modified","renamed"]).optional(),oldPath:r.string().optional()}).meta({ref:"FileDiff"}),U=r.object({id:L,slug:r.string(),providerId:r.string(),directory:r.string(),parentId:L.optional(),contextMode:$.optional(),summary:r.object({additions:r.number(),deletions:r.number(),files:r.number(),diffs:r.array(te).optional(),noSnapshotReason:r.enum(["no-messages","missing-from","missing-to"]).optional()}).optional(),share:r.object({url:r.string()}).optional(),title:r.string(),version:r.string(),time:r.object({created:r.number(),updated:r.number(),compacting:r.number().optional(),archived:r.number().optional()}),permission:y.optional(),revert:r.object({messageId:r.string(),partId:r.string().optional(),snapshot:r.string().regex(/^[0-9a-f]{40}$/,"invalid snapshot hash").optional(),diff:r.string().optional(),backups:r.array(r.object({original:r.string(),backup:r.string().optional()})).optional()}).optional()}).meta({ref:"Session"}),ne=U.extend({project:_.nullable()}).meta({ref:"GlobalSession"}),re=r.object({secret:r.string(),url:r.string()}).meta({ref:"SessionShare"}),oe={ContextModeValues:ee,Info:U,GlobalInfo:ne,ShareInfo:re};var G={General:"general",Coder:"coder"},Ve=Object.values(G),Ye=G.General,B={General:"general",Coder:"coder",All:"all"},Qe=Object.values(B),Ze=B.All;function tt(t){return {description:t.description,args:t.args,execute:t.execute}}var nt=z;function rt(t){return z.object(t)}var ie={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},se={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},ae={onBoot:false,onSearch:false,onSessionStart:false,intervalMs:1e3*60*60},ce={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},ge={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true},me=[{type:"person",rule:"A human individual, role holder, or named actor."},{type:"organization",rule:"A company, team, institution, or formal group."},{type:"location",rule:"A place, region, site, facility, or spatial scope."},{type:"concept",rule:"An abstract idea, theme, method, policy, or principle."},{type:"object",rule:"A tangible or digital thing, product, artifact, or resource."},{type:"document",rule:"A report, note, page, paper, guideline, or formal text artifact."},{type:"process",rule:"A workflow, procedure, lifecycle, or repeatable sequence of steps."},{type:"task",rule:"A specific action item, issue, requirement, or objective."},{type:"metric",rule:"A measurable quantity, KPI, target value, or indicator."},{type:"time",rule:"A date, period, schedule marker, deadline, or temporal reference."},{type:"event",rule:"A notable milestone, release, incident, meeting, or time-bounded activity."},{type:"keyword",rule:"A compact fallback term when no stronger category applies."}],ue=[{type:"is_a",rule:"Source is a subtype or instance of target."},{type:"part_of",rule:"Source is a component/subset of target."},{type:"has_attribute",rule:"Source has target as a key property or characteristic."},{type:"located_in",rule:"Source is physically or logically located in target."},{type:"occurs_in",rule:"Source event/process happens during or within target context/time/place."},{type:"causes",rule:"Source contributes to or causes target."},{type:"influences",rule:"Source affects target without strict causality."},{type:"owned_by",rule:"Source belongs to or is controlled by target."},{type:"member_of",rule:"Source person/entity is a member of target group."},{type:"uses",rule:"Source uses target as a dependency or tool."},{type:"depends_on",rule:"Source requires target to work or complete."},{type:"related_to",rule:"Weak but useful semantic relation when others do not fit."},{type:"defines",rule:"Source document or concept defines target entity."},{type:"referenced_in",rule:"Source entity is referenced or mentioned in target document."},{type:"used_by",rule:"Source entity is used by target process or concept."},{type:"relates_to",rule:"Source concept is semantically related to target concept."}],pe=["database","fts","vector","schema","lock","disk_space","orphan","backend"],le="embeddingDims_consistency";var de=(u=>(u.STDIO="stdio",u.HTTP="http",u.WS="websocket",u))(de||{});function fe(t){return t==="local"?"stdio":t}var j=z.object({command:z.string(),args:z.array(z.string())}),K=z.object({baseUrl:z.string().url(),timeout:z.number().positive().default(6e4)}),F=z.object({url:z.string().url(),timeout:z.number().positive().default(3e4),batchSize:z.number().positive().default(10),batchInterval:z.number().positive().default(50),heartbeatInterval:z.number().positive().default(3e4)}),be=z.object({stdio:j.optional(),http:K.optional(),ws:F.optional()});function ye(t){if(!t||t.trim()==="")return false;let c=/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$/;return !(t.startsWith("-")||t.endsWith("-")||!c.test(t))}var xe=z.object({id:z.string().min(1),options:z.record(z.string(),z.unknown()).optional()}),Ce=z.object({agent:z.string().optional(),model:xe.optional()}),R=z.object({directory:z.string().default(process.cwd()),enabled:z.boolean().default(true),channel:z.preprocess(fe,z.enum(["stdio","http","websocket"])).default("websocket"),port:z.number().int().min(1).max(65535).default(3e3),hostname:z.string().min(1).default("localhost"),timeout:z.number().positive().default(3e4),name:z.string().optional(),agentId:z.string().optional(),stdio:j.optional(),http:K.optional(),ws:F.optional(),agent:Ce.optional()}).refine(t=>ye(t.hostname),{message:"Invalid hostname format",path:["hostname"]}).transform(t=>{let b={stdio:"stdio",http:"http",websocket:"websocket"}[t.channel]??"websocket";return {...t,channel:b}}),Se=z.object({id:z.string().min(1),type:z.enum(["easbot","custom"]),name:z.string().optional(),agentId:z.string().optional(),channel:z.enum(["stdio","http","websocket"]).optional(),connection:be,autoConnect:z.boolean().default(false),priority:z.number().int().nonnegative().default(0)}).transform(t=>{let c=t.channel;c||(t.connection.ws?c="websocket":t.connection.http?c="http":t.connection.stdio?c="stdio":c="websocket");let u={stdio:"stdio",http:"http",websocket:"websocket"}[c]??"websocket";return {...t,channel:u}}),q=z.object({clients:z.array(Se).min(1),defaultClientId:z.string().optional()}),gt=z.object({server:R}),mt=z.object({clients:q}),Ae=z.object({autoRegister:z.boolean().default(true),gatewayUrl:z.url().optional()}).optional(),I=z.object({server:R.optional(),clients:q.optional(),client:Ae.optional()}).transform(t=>({...t,server:t.server??R.parse({})})),ut={enabled:true,directory:process.cwd(),channel:"websocket",port:3e3,hostname:"localhost",timeout:3e4},pt={type:"custom",channel:"websocket",autoConnect:false,priority:0};function lt(t){let c=I.safeParse(t);return c.success?c.data:I.parse({})}function dt(t){return I.parse(t)}
|
|
2
|
-
export{
|
|
1
|
+
import*as t from'zod';import t__default,{z as z$1}from'zod';var G={id:"easbot",displayName:"EASBot",description:"\u591A Agent \u534F\u4F5C\u751F\u6001\u7CFB\u7EDF\uFF08\u81EA\u5B66\u4E60 / \u81EA\u8FDB\u5316 / \u6301\u7EED\u6539\u8FDB\u7684 AI Agent \u5E73\u53F0\uFF09",url:"https://www.easbot.cn",domain:"easbot.cn",xdgAppName:"easbot",envPrefix:"EASBOT",dataDirName:"easbot",cacheDirName:"easbot",configDirName:"easbot"};function Pe(c){return `${G.envPrefix}_${c}`}var y=t__default.enum(["ask","allow","deny"]).meta({ref:"PermissionActionConfig"}),k=t__default.record(t__default.string(),y).meta({ref:"PermissionObjectConfig"}),r=t__default.union([y,k]).meta({ref:"PermissionRuleConfig"}),Re=c=>typeof c=="object"&&c!==null&&!Array.isArray(c)?{__originalKeys:Object.keys(c),...c}:c,we=c=>{if(typeof c=="string")return {"*":c};let T=c,{__originalKeys:j,...v}=T;if(!j)return v;let D={};for(let a of j)a in v&&(D[a]=v[a]);return D},M=t__default.preprocess(Re,t__default.object({__originalKeys:t__default.string().array().optional(),read:r.optional(),edit:r.optional(),glob:r.optional(),grep:r.optional(),list:r.optional(),bash:r.optional(),task:r.optional(),external_directory:r.optional(),todo:y.optional(),question:y.optional(),webfetch:y.optional(),websearch:y.optional(),codesearch:r.optional(),lsp:r.optional(),doom_loop:y.optional(),skill:r.optional(),pty_session:r.optional(),pty_manage:r.optional(),write:r.optional(),multiedit:r.optional(),note:r.optional(),memory:r.optional(),codebase:r.optional(),agent_client:r.optional(),gateway:r.optional(),apply_patch:r.optional(),batch:r.optional(),plan:r.optional(),scheduler:r.optional(),worktree:r.optional()}).catchall(r).or(y)).transform(we).meta({ref:"PermissionConfig"}),z=t__default.object({read:r.optional(),edit:r.optional(),write:r.optional(),glob:r.optional(),grep:r.optional(),list:r.optional(),bash:r.optional(),webfetch:r.optional(),websearch:r.optional(),task:r.optional(),todo:y.optional(),question:y.optional(),skill:r.optional(),memory:r.optional(),note:r.optional(),pty_session:r.optional(),pty_manage:r.optional(),external_directory:r.optional(),doom_loop:y.optional()}).strict().meta({ref:"AgentPermission"}),E=t__default.object({permission:t__default.string(),pattern:t__default.string(),action:y}).meta({ref:"PermissionRuntimeRule"}),P=t__default.array(E).meta({ref:"PermissionRuleset"}),Te={Action:y,Object:k,Rule:r,AgentPermissionSchema:z,Config:M,RuntimeRule:E,Ruleset:P};var O=(a=>(a.HTTP="http",a.WEBSOCKET="websocket",a.GRPC="grpc",a.TCP="tcp",a.UDP="udp",a))(O||{}),_=(I=>(I.GET="GET",I.POST="POST",I.PUT="PUT",I.DELETE="DELETE",I.PATCH="PATCH",I.HEAD="HEAD",I.OPTIONS="OPTIONS",I))(_||{}),L=(f=>(f[f.OK=200]="OK",f[f.CREATED=201]="CREATED",f[f.NO_CONTENT=204]="NO_CONTENT",f[f.BAD_REQUEST=400]="BAD_REQUEST",f[f.UNAUTHORIZED=401]="UNAUTHORIZED",f[f.FORBIDDEN=403]="FORBIDDEN",f[f.NOT_FOUND=404]="NOT_FOUND",f[f.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",f[f.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",f[f.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",f))(L||{}),F=(a=>(a.CONNECTING="connecting",a.OPEN="open",a.CLOSING="closing",a.CLOSED="closed",a.ERROR="error",a))(F||{}),U=(a=>(a.TEXT="text",a.BINARY="binary",a.JSON="json",a.PING="ping",a.PONG="pong",a))(U||{}),K=(i=>(i[i.OK=200]="OK",i[i.CREATED=201]="CREATED",i[i.NO_CONTENT=204]="NO_CONTENT",i[i.BAD_REQUEST=400]="BAD_REQUEST",i[i.UNAUTHORIZED=401]="UNAUTHORIZED",i[i.FORBIDDEN=403]="FORBIDDEN",i[i.NOT_FOUND=404]="NOT_FOUND",i[i.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",i[i.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",i[i.CONFLICT=409]="CONFLICT",i[i.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",i[i.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",i[i.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",i[i.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",i[i.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",i[i.BAD_GATEWAY=502]="BAD_GATEWAY",i[i.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",i[i.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",i[i.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",i))(K||{});var B=t__default.object({id:t__default.string(),name:t__default.string(),cron:t__default.string(),enabled:t__default.boolean(),createdAt:t__default.number(),updatedAt:t__default.number(),lastFiredAt:t__default.number().optional(),nextFireAt:t__default.number().optional(),timezone:t__default.string().optional()}).meta({ref:"SchedulerTask"}),ke=t__default.array(B),Ee=t__default.object({status:t__default.string()}),ve=t__default.object({initialized:t__default.boolean()}),Q=(S=>(S.PENDING="pending",S.RUNNING="running",S.PAUSED="paused",S.COMPLETED="completed",S.FAILED="failed",S.CANCELLED="cancelled",S.TIMEOUT="timeout",S.SKIPPED="skipped",S))(Q||{}),q=(a=>(a[a.LOW=0]="LOW",a[a.NORMAL=1]="NORMAL",a[a.HIGH=2]="HIGH",a[a.URGENT=3]="URGENT",a[a.CRITICAL=4]="CRITICAL",a))(q||{});var pn=z$1.enum(["telegram","slack","feishu","wechat","weixin","webchat","signal","nostr","dingtalk"]),ln=z$1.enum(["low","medium","high","critical"]),Me=z$1.object({enabled:z$1.boolean().default(true),botToken:z$1.string().describe("Telegram Bot Token"),webhookUrl:z$1.string().optional().describe("Webhook URL for receiving updates"),polling:z$1.object({enabled:z$1.boolean().default(true),interval:z$1.number().int().positive().optional().describe("Polling interval in ms"),timeout:z$1.number().int().positive().optional().default(30).describe("Long polling timeout in seconds")}).refine(c=>c===void 0||c.enabled,{message:"polling.enabled must be true when polling is configured"}).optional(),maxConnections:z$1.number().int().positive().optional().default(100),timeout:z$1.number().int().positive().optional().default(3e4)}),ze=z$1.object({enabled:z$1.boolean().default(true),botToken:z$1.string().describe("Slack Bot Token (xoxb-*)"),appToken:z$1.string().optional().describe("Slack App Token (xapp-*) for Socket Mode"),signingSecret:z$1.string().optional().describe("Slack Signing Secret for webhook verification"),maxConnections:z$1.number().int().positive().optional().default(100),timeout:z$1.number().int().positive().optional().default(3e4)}),Ne=z$1.object({enabled:z$1.boolean().default(true),appId:z$1.string().describe("Feishu App ID"),appSecret:z$1.string().describe("Feishu App Secret"),encryptKey:z$1.string().optional().describe("Feishu Encrypt Key for message encryption"),verificationToken:z$1.string().optional().describe("Feishu Verification Token"),maxConnections:z$1.number().int().positive().optional().default(100),timeout:z$1.number().int().positive().optional().default(3e4)}),je=z$1.object({enabled:z$1.boolean().default(true),mode:z$1.enum(["official","wecom"]).default("official"),appId:z$1.string().describe("WeChat App ID"),appSecret:z$1.string().describe("WeChat App Secret"),token:z$1.string().optional().describe("WeChat Token for message verification"),encodingAESKey:z$1.string().optional().describe("WeChat Encoding AES Key"),agentId:z$1.string().optional().describe("WeCom Agent ID"),maxConnections:z$1.number().int().positive().optional().default(100),timeout:z$1.number().int().positive().optional().default(3e4)}),De=z$1.object({enabled:z$1.boolean().default(true),stateDir:z$1.string().optional().describe("Override the default account persistence directory (default: ~/.easbot/channels/weixin)"),baseUrl:z$1.string().optional().describe("Override the iLink API baseUrl (default: https://ilinkai.weixin.qq.com)"),cdnBaseUrl:z$1.string().optional().describe("Override the CDN baseUrl (default: https://novac2c.cdn.weixin.qq.com/c2c)"),maxMessageLength:z$1.number().int().positive().optional().default(4e3),timeout:z$1.number().int().positive().optional().default(3e4)}),Ge=z$1.object({enabled:z$1.boolean().default(true),path:z$1.string().optional().default("/"),heartbeatInterval:z$1.number().int().positive().optional().default(3e4),connectionTimeout:z$1.number().int().positive().optional().default(36e5),maxConnections:z$1.number().int().positive().optional().default(1e3),cors:z$1.boolean().optional().default(true)}),Oe=z$1.object({enabled:z$1.boolean().default(true),serviceUrl:z$1.string().optional().default("https://chat.signal.org"),phoneNumber:z$1.string().describe("Signal phone number"),password:z$1.string().optional().describe("Signal account password"),maxConnections:z$1.number().int().positive().optional().default(100),timeout:z$1.number().int().positive().optional().default(3e4)}),_e=z$1.object({enabled:z$1.boolean().default(true),relays:z$1.array(z$1.string()).optional().default([]).describe("Nostr relay URLs"),privateKey:z$1.string().optional().describe("Nostr private key (hex)"),publicKey:z$1.string().optional().describe("Nostr public key (hex)"),maxConnections:z$1.number().int().positive().optional().default(100),timeout:z$1.number().int().positive().optional().default(3e4)}),Le=z$1.object({enabled:z$1.boolean().default(true),appKey:z$1.string().describe("DingTalk AppKey"),appSecret:z$1.string().describe("DingTalk AppSecret"),token:z$1.string().optional().describe("DingTalk token for signature verification"),encryptKey:z$1.string().optional().describe("DingTalk encrypt key for message encryption"),webhook:z$1.object({enabled:z$1.boolean().default(true),path:z$1.string().optional().default("/dingtalk/webhook"),port:z$1.number().int().positive().optional().describe("Webhook server port")}).optional(),maxConnections:z$1.number().int().positive().optional().default(100),timeout:z$1.number().int().positive().optional().default(3e4)}),Fe=z$1.object({telegram:Me.optional(),slack:ze.optional(),feishu:Ne.optional(),wechat:je.optional(),weixin:De.optional(),webchat:Ge.optional(),signal:Oe.optional(),nostr:_e.optional(),dingtalk:Le.optional()}),Ue=z$1.object({enabled:z$1.boolean().default(false),cert:z$1.string().optional().describe("Path to SSL certificate file (or certPath)"),key:z$1.string().optional().describe("Path to SSL key file (or keyPath)"),certPath:z$1.string().optional().describe("Path to SSL certificate file (alias of cert)"),keyPath:z$1.string().optional().describe("Path to SSL key file (alias of key)"),ca:z$1.string().optional().describe("Path to CA certificate file"),forceRedirect:z$1.boolean().optional().default(false).describe("Force redirect HTTP to HTTPS"),httpPort:z$1.number().int().positive().optional().default(80).describe("HTTP redirect port")}),Ke=z$1.object({name:z$1.string().describe("Token name/description"),value:z$1.string().describe("Token value"),permissions:z$1.array(z$1.string()).default(["*"]).describe("Associated permissions"),expiresAt:z$1.number().int().positive().optional().describe("Expiration timestamp (Unix timestamp)"),description:z$1.string().optional().describe("Token description")}),Be=z$1.object({enabled:z$1.boolean().default(true),tokens:z$1.array(Ke).default([]).describe("List of valid tokens"),onInvalid:z$1.enum(["reject","anonymous"]).default("reject").describe("Behavior when token validation fails"),allowAnonymous:z$1.boolean().default(false).describe("Allow anonymous access"),defaultPermissions:z$1.array(z$1.string()).default([]).describe("Default permissions for anonymous users")}),Qe=z$1.object({enabled:z$1.boolean().default(false),authorizationServer:z$1.string().describe("OAuth2 authorization server URL"),clientId:z$1.string().describe("OAuth2 client clientId"),clientSecret:z$1.string().describe("OAuth2 authorization server client secret"),tokenValidationEndpoint:z$1.string().describe("OAuth2 token validation endpoint"),scope:z$1.array(z$1.string()).default([]).describe("OAuth2 scopes")}),qe=z$1.object({type:z$1.enum(["token","oauth2"]).default("token"),token:Be.optional(),oauth2:Qe.optional()}),We=z$1.object({mode:z$1.enum(["pull","push","both"]).default("both"),interval:z$1.number().int().positive().default(3e4),pushEvents:z$1.array(z$1.enum(["register","deregister","heartbeat","status_change"])).default(["register","deregister","status_change"]),conflictResolution:z$1.enum(["latest","local","remote"]).default("latest"),remoteNodes:z$1.array(z$1.object({id:z$1.string().describe("Node ID"),address:z$1.string().describe("Node address"),port:z$1.number().int().positive().describe("Node port")})).default([]).describe("Remote node list")}),Ve=z$1.object({id:z$1.string().describe("Gateway node ID"),address:z$1.string().describe("Gateway node address (e.g., http://localhost:3001)"),enabled:z$1.boolean().default(true),metadata:z$1.record(z$1.string(),z$1.any()).optional()}),Ye=z$1.object({nodeId:z$1.string().describe("Current gateway node ID"),nodes:z$1.array(Ve).default([]).describe("Other gateway nodes in the cluster"),sync:We.optional()}),Ze=z$1.object({maxConnectionsPerChannel:z$1.number().int().positive().default(100),idleTimeout:z$1.number().int().positive().default(3e5),reuseStrategy:z$1.enum(["lru","fifo","random"]).default("lru"),healthCheckInterval:z$1.number().int().positive().default(6e4),acquireTimeout:z$1.number().int().positive().default(5e3),warmupCount:z$1.number().int().nonnegative().default(0).describe("Number of connections to warm up")}),$e=z$1.object({maxLength:z$1.number().int().positive().default(1e4),concurrency:z$1.number().int().positive().default(100),batchSize:z$1.number().int().positive().default(10),batchTimeout:z$1.number().int().positive().default(100),priorityLevels:z$1.number().int().positive().default(4)}),Xe=z$1.object({failureThreshold:z$1.number().int().positive().default(5),successThreshold:z$1.number().int().positive().default(3),timeout:z$1.number().int().positive().default(3e4),halfOpenDuration:z$1.number().int().positive().default(15e3)}),He=z$1.object({heartbeatInterval:z$1.number().int().positive().default(6e4),heartbeatTimeout:z$1.number().int().positive().default(3e5),heartbeatCheckInterval:z$1.number().int().positive().default(3e5),autoDeregisterTimeout:z$1.number().int().positive().default(6e5),maxAgents:z$1.number().int().positive().default(100),persistenceFile:z$1.string().optional().describe("Path to persist agent registrations"),maxRegistrations:z$1.number().int().positive().default(1e3)}),Je=z$1.object({sessionTimeout:z$1.number().int().positive().default(18e5),resumeGracePeriod:z$1.number().int().positive().default(3e5),maxSessions:z$1.number().int().positive().default(1e4),persistenceFile:z$1.string().optional().describe("Path to persist sessions")}),et=z$1.object({enabled:z$1.boolean().default(true),port:z$1.number().int().positive().default(8080),hostname:z$1.string().default("localhost"),path:z$1.string().optional().default("/"),maxConnections:z$1.number().int().positive().optional().default(1e3),connectionTimeout:z$1.number().int().positive().optional().default(36e5),heartbeatInterval:z$1.number().int().positive().optional().default(3e4),sessionExpireMs:z$1.number().int().positive().optional().default(36e5),https:Ue.optional(),auth:qe.optional(),cors:z$1.boolean().default(true),corsOrigins:z$1.array(z$1.string()).optional(),mdns:z$1.boolean().default(false),mdnsDomain:z$1.string().optional().default("gateway.easbot.local")}),tt=z$1.object({channel:z$1.string().optional().describe("Default channel ID, used when multiple channels are configured"),fallbackChannels:z$1.array(z$1.string()).optional().describe("Fallback channel list, sorted by priority, used for degraded channel selection")}),nt=z$1.enum(["localAgent","subAgent","both"]),ot=z$1.object({mode:nt.default("localAgent").describe("Agent processing mode: localAgent, subAgent, or both"),localAgentPriority:z$1.number().int().min(1).max(10).default(1).describe("Priority for localAgent (lower = higher priority)"),subAgentPriority:z$1.number().int().min(1).max(10).default(2).describe("Priority for subAgent (lower = higher priority)"),timeout:z$1.number().int().positive().optional().default(3e5).describe("Timeout for agent execution in milliseconds"),retryOnFailure:z$1.boolean().default(true).describe("Retry with subAgent when localAgent fails")}),rt=z$1.object({autoRegister:z$1.boolean().default(true).describe("Whether to auto-register agent on startup"),heartbeatInterval:z$1.number().int().positive().default(3e4).describe("Heartbeat interval in milliseconds"),maxReconnectAttempts:z$1.number().int().min(0).default(5).describe("Maximum reconnect attempts"),reconnectDelay:z$1.number().int().positive().default(3e3).describe("Reconnect delay in milliseconds"),heartbeatTimeout:z$1.number().int().positive().default(9e4).describe("Heartbeat timeout in milliseconds")}),mn=z$1.object({server:et.optional(),channels:Fe.optional(),cluster:Ye.optional(),connectionPool:Ze.optional(),messageQueue:$e.optional(),circuitBreaker:Xe.optional(),agentRegistry:He.optional(),session:Je.optional(),defaults:tt.optional(),agentProcessing:ot.optional(),client:rt.optional().describe("Gateway client config for agent registration"),defaultAgent:z$1.string().optional().describe("Default agent ID for routing"),logLevel:z$1.enum(["DEBUG","INFO","WARN","ERROR"]).optional()}).catchall(z$1.unknown());var it=t__default.object({url:t__default.string().optional(),override:t__default.string().optional(),color:t__default.string().optional()}).meta({ref:"ProjectIcon"}),at=t__default.object({start:t__default.string().optional().describe("Startup script to run when creating a new workspace (worktree)")}).meta({ref:"ProjectCommands"}),st=t__default.object({created:t__default.number(),updated:t__default.number(),initialized:t__default.number().optional()}).meta({ref:"ProjectTime"}),W=t__default.object({id:t__default.string(),worktree:t__default.string(),vcs:t__default.literal("git").optional(),name:t__default.string().optional(),icon:it.optional(),commands:at.optional(),time:st,sandboxes:t__default.array(t__default.string())}).meta({ref:"Project"});var N=t.object({file:t.string(),before:t.string(),after:t.string(),additions:t.number(),deletions:t.number(),status:t.enum(["added","deleted","modified","renamed"]).optional(),oldPath:t.string().optional()}).meta({ref:"FileDiff"}),ct=t.object({start:t.object({line:t.number(),character:t.number()}),end:t.object({line:t.number(),character:t.number()})}).meta({ref:"Range"}),pt=t.object({path:t.string(),added:t.number().int(),removed:t.number().int(),status:t.enum(["added","deleted","modified"])}).meta({ref:"File"}),lt=t.object({name:t.string(),path:t.string(),absolute:t.string(),type:t.enum(["file","directory"]),ignored:t.boolean()}).meta({ref:"FileNode"}),mt=t.object({type:t.enum(["text","binary"]),content:t.string(),diff:t.string().optional(),patch:t.object({oldFileName:t.string(),newFileName:t.string(),oldHeader:t.string().optional(),newHeader:t.string().optional(),hunks:t.array(t.object({oldStart:t.number(),oldLines:t.number(),newStart:t.number(),newLines:t.number(),lines:t.array(t.string())})),index:t.string().optional()}).optional(),encoding:t.literal("base64").optional(),mimeType:t.string().optional()}).meta({ref:"FileContent"});var V={event:"evt",session:"ses",message:"msg",permission:"per",question:"que",user:"usr",part:"prt",pty:"pty",tool:"tool",workspace:"wrk",command:"cmd",task:"task",heartbeat:"hb",agent:"ag",subagent:"sub",hook:"hok",compaction:"cmp",context:"ctx",experience:"exp",pattern:"pat",knowledge:"knw",evolution:"evo",result:"res",stream:"stm"};function C(c){return t__default.string().startsWith(V[c])}var Y=C("session").meta({ref:"SessionId"}),Z=t__default.enum(["general","coder"]).meta({ref:"ContextMode"}),dt=["general","coder"],$=t__default.object({id:Y,slug:t__default.string(),providerId:t__default.string(),directory:t__default.string(),parentId:Y.optional(),contextMode:Z.optional(),summary:t__default.object({additions:t__default.number(),deletions:t__default.number(),files:t__default.number(),diffs:t__default.array(N).optional(),noSnapshotReason:t__default.enum(["no-messages","missing-from","missing-to"]).optional()}).optional(),share:t__default.object({url:t__default.string()}).optional(),title:t__default.string(),version:t__default.string(),time:t__default.object({created:t__default.number(),updated:t__default.number(),compacting:t__default.number().optional(),archived:t__default.number().optional()}),permission:P.optional(),revert:t__default.object({messageId:t__default.string(),partId:t__default.string().optional(),snapshot:t__default.string().regex(/^[0-9a-f]{40}$/,"invalid snapshot hash").optional(),diff:t__default.string().optional(),backups:t__default.array(t__default.object({original:t__default.string(),backup:t__default.string().optional()})).optional()}).optional()}).meta({ref:"Session"}),ut=$.extend({project:W.nullable()}).meta({ref:"GlobalSession"}),ft=t__default.object({secret:t__default.string(),url:t__default.string()}).meta({ref:"SessionShare"}),bt={ContextModeValues:dt,Info:$,GlobalInfo:ut,ShareInfo:ft};var X={General:"general",Coder:"coder"},En=Object.values(X),vn=X.General,H={General:"general",Coder:"coder",All:"all"},R=Object.values(H),Mn=H.All;function Gn(c){return {description:c.description,args:c.args,execute:c.execute}}var On=z$1;function _n(c){return z$1.object(c)}var ee=t__default.object({type:t__default.literal("local").describe("Type of MCP server connection"),command:t__default.string().describe("Command to run the MCP server"),args:t__default.string().array().optional().describe("Arguments to pass to the command"),env:t__default.record(t__default.string(),t__default.string()).optional().describe("Environment variables to set when running the MCP server"),enabled:t__default.boolean().optional().describe("Enable or disable the MCP server on startup"),timeout:t__default.number().int().positive().optional().describe("Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."),description:t__default.string().optional().describe("Description of the MCP server"),scope:t__default.enum(R).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpLocalConfig"}),te=t__default.object({clientId:t__default.string().optional().describe("OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted."),clientSecret:t__default.string().optional().describe("OAuth client secret (if required by the authorization server)"),scope:t__default.string().optional().describe("OAuth scopes to request during authorization")}).strict().meta({ref:"McpOAuthConfig"}),ne=t__default.object({type:t__default.literal("remote").describe("Type of MCP server connection"),url:t__default.string().describe("URL of the remote MCP server"),enabled:t__default.boolean().optional().describe("Enable or disable the MCP server on startup"),headers:t__default.record(t__default.string(),t__default.string()).optional().describe("Headers to send with the request"),oauth:t__default.union([te,t__default.literal(false)]).optional().describe("OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."),timeout:t__default.number().int().positive().optional().describe("Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."),description:t__default.string().optional().describe("Description of the MCP server"),scope:t__default.enum(R).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpRemoteConfig"}),yt=t__default.discriminatedUnion("type",[ee,ne]);var ht=t__default.object({template:t__default.string(),description:t__default.string().optional(),agent:t__default.string().optional(),model:t__default.string().optional().describe("Model identifier in provider/model format, e.g. anthropic/claude-3-5-sonnet"),subtask:t__default.boolean().optional(),scope:t__default.enum(R).optional().describe("Context mode scope")}).meta({ref:"CommandConfig"}),oe=t__default.enum(["command","mcp","skill"]).describe("Command source"),xt=t__default.object({name:t__default.string().describe("Command name"),description:t__default.string().describe("Command description"),scope:t__default.enum(["general","coder","all"]).optional().describe("Context mode scope"),agent:t__default.string().optional().describe("Specified agent name"),model:t__default.string().optional().describe("Specified model in provider/model format"),hints:t__default.array(t__default.string()).optional().describe("Argument hints"),commandType:t__default.enum(["prompt","local"]).optional().describe("Command type"),hidden:t__default.boolean().optional().describe("Whether hidden")}),re=t__default.union([t__default.string(),t__default.record(t__default.string(),t__default.unknown())]).describe("Command arguments"),ie=t__default.discriminatedUnion("type",[t__default.object({type:t__default.literal("text"),text:t__default.string().describe("Text content")}),t__default.object({type:t__default.literal("image"),source:t__default.object({type:t__default.enum(["base64","url"]),mime:t__default.string().describe("File mime type"),data:t__default.string().describe("File base64 encoding data or url")})}),t__default.object({type:t__default.literal("file"),url:t__default.string().describe("File path"),filename:t__default.string().describe("File name"),mime:t__default.string().optional().describe("File mime type")})]),Ct=t__default.object({sessionId:t__default.string().describe("Session ID"),directory:t__default.string().describe("Working directory"),model:t__default.string().optional().describe("Model identifier in provider/model format"),agent:t__default.string().optional().describe("Agent name"),arguments:re.describe("Command arguments")}),ae=t__default.record(t__default.string(),t__default.unknown()).describe("Result metadata"),St=t__default.object({title:t__default.string().describe("Result title"),metadata:ae.describe("Result metadata"),output:t__default.string().describe("Result output"),parts:t__default.array(ie).optional().describe("Result parts"),success:t__default.boolean().describe("Whether execution succeeded"),error:t__default.string().optional().describe("Error message if failed")}),At=t__default.object({agent:t__default.object({name:t__default.string().describe("Agent name"),model:t__default.string().optional().describe("Agent model in provider/model format")}).optional().describe("Agent context")}),It=t__default.object({isEnabled:t__default.boolean().optional().describe("Is enabled check result")}),Pt=t__default.object({name:t__default.string(),description:t__default.string().optional(),agent:t__default.string().optional(),model:t__default.string().optional().describe("Model identifier in provider/model format"),source:oe.optional(),subtask:t__default.boolean().optional(),hints:t__default.array(t__default.string()).optional(),commandType:t__default.enum(["prompt","local"]).optional(),hidden:t__default.boolean().optional(),isEnabled:t__default.custom().optional(),execute:t__default.custom().optional()}).meta({ref:"Command"});var Rt={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},wt={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},Tt={onBoot:false,onSearch:false,onSessionStart:false,intervalMs:1e3*60*60},kt={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},Et={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true},vt=[{type:"person",rule:"A human individual, role holder, or named actor."},{type:"organization",rule:"A company, team, institution, or formal group."},{type:"location",rule:"A place, region, site, facility, or spatial scope."},{type:"concept",rule:"An abstract idea, theme, method, policy, or principle."},{type:"object",rule:"A tangible or digital thing, product, artifact, or resource."},{type:"document",rule:"A report, note, page, paper, guideline, or formal text artifact."},{type:"process",rule:"A workflow, procedure, lifecycle, or repeatable sequence of steps."},{type:"task",rule:"A specific action item, issue, requirement, or objective."},{type:"metric",rule:"A measurable quantity, KPI, target value, or indicator."},{type:"time",rule:"A date, period, schedule marker, deadline, or temporal reference."},{type:"event",rule:"A notable milestone, release, incident, meeting, or time-bounded activity."},{type:"keyword",rule:"A compact fallback term when no stronger category applies."}],Mt=[{type:"is_a",rule:"Source is a subtype or instance of target."},{type:"part_of",rule:"Source is a component/subset of target."},{type:"has_attribute",rule:"Source has target as a key property or characteristic."},{type:"located_in",rule:"Source is physically or logically located in target."},{type:"occurs_in",rule:"Source event/process happens during or within target context/time/place."},{type:"causes",rule:"Source contributes to or causes target."},{type:"influences",rule:"Source affects target without strict causality."},{type:"owned_by",rule:"Source belongs to or is controlled by target."},{type:"member_of",rule:"Source person/entity is a member of target group."},{type:"uses",rule:"Source uses target as a dependency or tool."},{type:"depends_on",rule:"Source requires target to work or complete."},{type:"related_to",rule:"Weak but useful semantic relation when others do not fit."},{type:"defines",rule:"Source document or concept defines target entity."},{type:"referenced_in",rule:"Source entity is referenced or mentioned in target document."},{type:"used_by",rule:"Source entity is used by target process or concept."},{type:"relates_to",rule:"Source concept is semantically related to target concept."}],zt=["database","fts","vector","schema","lock","disk_space","orphan","backend"],Nt="embeddingDims_consistency";var se={STDIO:"stdio",HTTP:"http",WS:"websocket"},ce=z$1.enum(["stdio","http","websocket"]),pe=z$1.object({command:z$1.string(),args:z$1.array(z$1.string())}),le=z$1.object({baseUrl:z$1.string().url(),timeout:z$1.number().positive().default(6e4)}),me=z$1.object({url:z$1.string().url(),timeout:z$1.number().positive().default(3e4),batchSize:z$1.number().positive().default(10),batchInterval:z$1.number().positive().default(50),heartbeatInterval:z$1.number().positive().default(3e4)}),jt=z$1.object({stdio:pe.optional(),http:le.optional(),ws:me.optional()}),Dt=z$1.object({id:z$1.string().min(1),options:z$1.record(z$1.string(),z$1.unknown()).optional()}),Gt=z$1.object({agent:z$1.string().optional(),model:Dt.optional()}),ge=z$1.object({directory:z$1.string().default(process.cwd()),enabled:z$1.boolean().default(true),channel:ce.default("websocket"),port:z$1.number().int().min(1).max(65535).default(3e3),hostname:z$1.hostname().default("localhost"),timeout:z$1.number().positive().default(3e4),name:z$1.string().optional(),agentId:z$1.string().optional(),stdio:pe.optional(),http:le.optional(),ws:me.optional(),agent:Gt.optional()}),Ot=z$1.object({id:z$1.string().min(1),type:z$1.enum(["easbot","custom"]),name:z$1.string().optional(),agentId:z$1.string().optional(),channel:ce.optional(),connection:jt,autoConnect:z$1.boolean().default(false),priority:z$1.number().int().nonnegative().default(0)}),de=z$1.object({clients:z$1.array(Ot).min(1),defaultClientId:z$1.string().optional()}),Hn=z$1.object({server:ge}),Jn=z$1.object({clients:de}),_t=z$1.object({autoRegister:z$1.boolean().default(true),gatewayUrl:z$1.url().optional()}).optional(),eo=z$1.object({server:ge.optional(),clients:de.optional(),client:_t.optional()}),to={enabled:true,directory:process.cwd(),channel:se.WS,port:3e3,hostname:"localhost",timeout:3e4},no={type:"custom",channel:se.WS,autoConnect:false,priority:0};var Lt=t__default.enum(["text_processing","code_generation","data_analysis","task_execution","workflow_management","monitoring","communication"]),ue=t__default.object({modelId:t__default.string().min(1).describe("Model ID"),providerId:t__default.string().min(1).describe("Provider ID")}).meta({ref:"AgentModel"}),Ft=t__default.object({name:t__default.string().min(1).describe("Agent name (unique identifier)"),description:t__default.string().optional().describe("When to use this agent"),mode:t__default.enum(["subagent","primary","all"]).optional().describe("Agent mode"),native:t__default.boolean().optional().describe("Whether this is a built-in agent"),hidden:t__default.boolean().optional().describe("Hide from @ autocomplete menu and agent list"),topP:t__default.number().optional().describe("Top-p sampling"),temperature:t__default.number().optional().describe("Sampling temperature"),color:t__default.union([t__default.string().regex(/^#[0-9a-fA-F]{6}$/,"Invalid hex color format"),t__default.enum(["primary","secondary","accent","success","warning","error","info"])]).optional().describe("Hex color code (e.g., #FF5733) or theme color (e.g., primary)"),permission:P.optional().describe("Flattened permission ruleset"),scope:t__default.enum(R).optional().describe("Agent scope (context mode)"),model:ue.optional().describe("Model: { providerId, modelId }"),variant:t__default.string().optional().describe("Default model variant"),prompt:t__default.string().optional().describe("Agent system prompt"),options:t__default.record(t__default.string(),t__default.any()).optional().describe("Additional agent options"),steps:t__default.number().int().positive().optional().describe("Maximum number of agentic iterations before forcing text-only response"),disable:t__default.boolean().optional().describe("Disable this built-in agent")}).catchall(t__default.unknown()).meta({ref:"Agent"});var Ut=t__default.object({id:C("pty"),title:t__default.string(),command:t__default.string(),args:t__default.array(t__default.string()),cwd:t__default.string(),status:t__default.enum(["running","exited"]),pid:t__default.number()}).meta({ref:"Pty"}),Kt=t__default.object({command:t__default.string().optional(),args:t__default.array(t__default.string()).optional(),cwd:t__default.string().optional(),title:t__default.string().optional(),env:t__default.record(t__default.string(),t__default.string()).optional(),persistent:t__default.boolean().optional().default(true)}),Bt=t__default.object({title:t__default.string().optional(),size:t__default.object({rows:t__default.number(),cols:t__default.number()}).optional()});var fe=t__default.object({label:t__default.string().describe("Display text (1-5 words, concise)"),description:t__default.string().describe("Explanation of choice")}).meta({ref:"QuestionOption"}),be=t__default.object({question:t__default.string().describe("Complete question"),header:t__default.string().describe("Very short label (max 30 chars)"),options:t__default.array(fe).describe("Available choices"),multiple:t__default.boolean().optional().describe("Allow selecting multiple choices"),custom:t__default.boolean().optional().describe("Allow typing a custom answer (default: true)")}).meta({ref:"QuestionInfo"}),ye=t__default.object({id:C("question"),sessionId:C("session"),questions:t__default.array(be).describe("Questions to ask"),tool:t__default.object({messageId:t__default.string(),callId:t__default.string()}).optional()}).meta({ref:"QuestionRequest"}),Qt=t__default.array(ye),he=t__default.array(t__default.string()).meta({ref:"QuestionAnswer"}),qt=t__default.object({answers:t__default.array(he).describe("User answers in order of questions (each answer is an array of selected labels)")}),Wt=t__default.object({requestId:C("question")}),Vt=t__default.enum(["user","timeout"]);var Yt=z$1.preprocess(c=>{if(typeof c!="string")return c;let T=c.trim().toLowerCase();return ["true","1","yes","on","y","enabled"].includes(T)?true:["false","0","no","off","n","disabled"].includes(T)?false:c},z$1.boolean());var Ce=t__default.enum(["pending","in_progress","completed","cancelled"]),Se=t__default.enum(["high","medium","low"]),Ae=t__default.object({content:t__default.string().describe("Brief description of the task"),status:Ce.describe("Current status of the task: pending, in_progress, completed, cancelled"),priority:Se.describe("Priority level of the task: high, medium, low"),id:t__default.string().describe("Unique identifier for the todo item")}).meta({ref:"Todo"}),Zt=t__default.array(Ae);var Ie=t__default.object({read:t__default.number(),write:t__default.number()}).meta({ref:"UsageCache"}),$t=t__default.object({total:t__default.number().optional(),input:t__default.number(),output:t__default.number(),reasoning:t__default.number(),cache:Ie}).meta({ref:"Usage"});
|
|
2
|
+
export{Gt as ACPAgentRuntimeConfigSchema,ce as ACPChannelTypeSchema,Ot as ACPClientConfigSchema,_t as ACPClientRegisterConfigSchema,de as ACPClientsConfigSchema,jt as ACPConnectionConfigSchema,le as ACPHttpConnectionConfigSchema,Jn as ACPInfoACPClientsConfigSchema,eo as ACPInfoACPConfigSchema,Hn as ACPInfoACPServerConfigSchema,Dt as ACPModelConfigSchema,ge as ACPServerConfigSchema,pe as ACPStdioConnectionConfigSchema,me as ACPWebSocketConnectionConfigSchema,no as ACP_DEFAULT_CLIENT_CONFIG,to as ACP_DEFAULT_SERVER_CONFIG,Lt as AgentCapabilitySchema,Ft as AgentInfoSchema,nt as AgentModeSchema,ue as AgentModelSchema,z as AgentPermission,z as AgentPermissionSchema,ot as AgentProcessingConfigSchema,He as AgentRegistryConfigSchema,We as AgentSyncConfigSchema,qe as AuthConfigSchema,Yt as BooleanQuerySchema,G as Brand,Fe as ChannelConfigSchema,se as ChannelType,Xe as CircuitBreakerConfigSchema,re as CommandArgumentsSchema,ht as CommandConfigInfoSchema,ae as CommandExecuteResultMetadataSchema,St as CommandExecuteResultSchema,Ct as CommandExecutionContextSchema,Pt as CommandInfoSchema,At as CommandInitContextSchema,It as CommandInitResultSchema,xt as CommandMetadataSchema,ie as CommandPromptPartSchema,oe as CommandSourceSchema,Ze as ConnectionPoolConfigSchema,X as ContextModeEnum,Z as ContextModeSchema,En as ContextModeValues,Rt as DEFAULT_EMBEDDING_CONFIG,kt as DEFAULT_INDEXER_CONFIG,Et as DEFAULT_PARSER_CONFIG,wt as DEFAULT_SEARCH_CONFIG,Tt as DEFAULT_SYNC_CONFIG,vn as DefaultContextMode,Mn as DefaultScope,tt as DefaultsConfigSchema,Le as DingTalkChannelConfigSchema,Nt as EMBEDDING_DIMS_CONSISTENCY_CHECK,Ne as FeishuChannelConfigSchema,mt as FileContentSchema,N as FileDiffSchema,pt as FileInfoSchema,lt as FileNodeSchema,vt as GRAPH_ENTITY_TYPE_DEFINITIONS,Mt as GRAPH_RELATION_TYPE_DEFINITIONS,pn as GatewayChannelTypeSchema,rt as GatewayClientConfigSchema,Ye as GatewayClusterConfigSchema,mn as GatewayConfigSchema,ln as GatewayMessagePrioritySchema,Ve as GatewayNodeConfigSchema,et as GatewayServerConfigSchema,_ as HTTPMethod,Ue as HTTPSConfigSchema,L as HTTPStatusCode,K as HttpStatus,zt as KNOWLEDGE_DOCTOR_PUBLIC_CHECKS,ee as McpLocalConfigSchema,te as McpOAuthConfigSchema,ne as McpRemoteConfigSchema,yt as McpSchema,$e as MessageQueueConfigSchema,_e as NostrChannelConfigSchema,Qe as OAuth2AuthConfigSchema,Te as Permission,y as PermissionAction,y as PermissionActionSchema,M as PermissionConfig,M as PermissionConfigSchema,k as PermissionObject,k as PermissionObjectSchema,r as PermissionRule,r as PermissionRuleSchema,P as PermissionRuleset,P as PermissionRulesetSchema,E as PermissionRuntimeRule,E as PermissionRuntimeRuleSchema,at as ProjectCommandsSchema,it as ProjectIconSchema,W as ProjectInfoSchema,st as ProjectTimeSchema,O as Protocol,Kt as PtyCreateInputSchema,Ut as PtyInfoSchema,Bt as PtyUpdateInputSchema,he as QuestionAnswerSchema,be as QuestionInfoSchema,fe as QuestionOptionSchema,Wt as QuestionParamSchema,qt as QuestionReplySchema,Vt as QuestionReplySourceSchema,Qt as QuestionRequestListSchema,ye as QuestionRequestSchema,ct as RangeSchema,ve as SchedulerInitializedSchema,Ee as SchedulerStatusSchema,ke as SchedulerTaskListSchema,B as SchedulerTaskSchema,H as ScopeEnum,R as ScopeValues,Je as SessionConfigSchema,bt as SessionTypes,Oe as SignalChannelConfigSchema,ze as SlackChannelConfigSchema,q as TaskPriority,Q as TaskStatus,Me as TelegramChannelConfigSchema,Zt as TodoListSchema,Se as TodoPrioritySchema,Ae as TodoSchema,Ce as TodoStatusSchema,Be as TokenAuthConfigSchema,Ke as TokenAuthItemSchema,Ie as UsageCacheSchema,$t as UsageSchema,je as WeChatChannelConfigSchema,Ge as WebChatChannelConfigSchema,U as WebSocketMessageType,F as WebSocketState,De as WeixinChannelConfigSchema,Pe as brandEnv,_n as buildToolArgs,Gn as createTool,V as idPrefixes,C as idSchema,On as toolSchema};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easbot/types",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.32",
|
|
4
4
|
"description": "Shared types library for EASBOT ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
"@ai-sdk/provider": "^3.0.15",
|
|
45
45
|
"@ai-sdk/provider-utils": "^4.0.45",
|
|
46
46
|
"ai": "^6.0.253",
|
|
47
|
-
"zod": "^4.4.3"
|
|
48
|
-
"@easbot/sdk": "0.3.29"
|
|
47
|
+
"zod": "^4.4.3"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"@types/node": "^25.9.5",
|
|
@@ -62,9 +61,9 @@
|
|
|
62
61
|
"scripts": {
|
|
63
62
|
"dev": "tsup --watch --env.NODE_ENV development",
|
|
64
63
|
"build": "tsup --env.NODE_ENV production",
|
|
65
|
-
"test": "
|
|
66
|
-
"test:run": "
|
|
67
|
-
"test:coverage": "
|
|
64
|
+
"test": "vitest",
|
|
65
|
+
"test:run": "vitest run",
|
|
66
|
+
"test:coverage": "vitest run --coverage",
|
|
68
67
|
"lint": "biome check .",
|
|
69
68
|
"lint:fix": "biome check --write .",
|
|
70
69
|
"lint:report": "biome check --reporter=summary .",
|