@easbot/types 0.3.32 → 0.3.36
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 +1 -1
- package/README.md +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +167 -9
- package/dist/index.d.ts +167 -9
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/README.en.md
CHANGED
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var t=require('zod');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);var D={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 Ie(c){return `${D.envPrefix}_${c}`}var b=t__namespace.default.enum(["ask","allow","deny"]).meta({ref:"PermissionActionConfig"}),T=t__namespace.default.record(t__namespace.default.string(),b).meta({ref:"PermissionObjectConfig"}),r=t__namespace.default.union([b,T]).meta({ref:"PermissionRuleConfig"}),Pe=c=>typeof c=="object"&&c!==null&&!Array.isArray(c)?{__originalKeys:Object.keys(c),...c}:c,Re=c=>{if(typeof c=="string")return {"*":c};let w=c,{__originalKeys:N,...E}=w;if(!N)return E;let j={};for(let a of N)a in E&&(j[a]=E[a]);return j},v=t__namespace.default.preprocess(Pe,t__namespace.default.object({__originalKeys:t__namespace.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:b.optional(),question:b.optional(),webfetch:b.optional(),websearch:b.optional(),codesearch:r.optional(),lsp:r.optional(),doom_loop:b.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(b)).transform(Re).meta({ref:"PermissionConfig"}),M=t__namespace.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:b.optional(),question:b.optional(),skill:r.optional(),memory:r.optional(),note:r.optional(),pty_session:r.optional(),pty_manage:r.optional(),external_directory:r.optional(),doom_loop:b.optional()}).strict().meta({ref:"AgentPermission"}),k=t__namespace.default.object({permission:t__namespace.default.string(),pattern:t__namespace.default.string(),action:b}).meta({ref:"PermissionRuntimeRule"}),I=t__namespace.default.array(k).meta({ref:"PermissionRuleset"}),we={Action:b,Object:T,Rule:r,AgentPermissionSchema:M,Config:v,RuntimeRule:k,Ruleset:I};var G=(a=>(a.HTTP="http",a.WEBSOCKET="websocket",a.GRPC="grpc",a.TCP="tcp",a.UDP="udp",a))(G||{}),O=(A=>(A.GET="GET",A.POST="POST",A.PUT="PUT",A.DELETE="DELETE",A.PATCH="PATCH",A.HEAD="HEAD",A.OPTIONS="OPTIONS",A))(O||{}),_=(u=>(u[u.OK=200]="OK",u[u.CREATED=201]="CREATED",u[u.NO_CONTENT=204]="NO_CONTENT",u[u.BAD_REQUEST=400]="BAD_REQUEST",u[u.UNAUTHORIZED=401]="UNAUTHORIZED",u[u.FORBIDDEN=403]="FORBIDDEN",u[u.NOT_FOUND=404]="NOT_FOUND",u[u.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",u[u.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",u[u.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",u))(_||{}),L=(a=>(a.CONNECTING="connecting",a.OPEN="open",a.CLOSING="closing",a.CLOSED="closed",a.ERROR="error",a))(L||{}),F=(a=>(a.TEXT="text",a.BINARY="binary",a.JSON="json",a.PING="ping",a.PONG="pong",a))(F||{}),U=(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))(U||{});var K=t__namespace.default.object({id:t__namespace.default.string(),name:t__namespace.default.string(),cron:t__namespace.default.string(),enabled:t__namespace.default.boolean(),createdAt:t__namespace.default.number(),updatedAt:t__namespace.default.number(),lastFiredAt:t__namespace.default.number().optional(),nextFireAt:t__namespace.default.number().optional(),timezone:t__namespace.default.string().optional()}).meta({ref:"SchedulerTask"}),Te=t__namespace.default.array(K),ke=t__namespace.default.object({status:t__namespace.default.string()}),Ee=t__namespace.default.object({initialized:t__namespace.default.boolean()}),B=(C=>(C.PENDING="pending",C.RUNNING="running",C.PAUSED="paused",C.COMPLETED="completed",C.FAILED="failed",C.CANCELLED="cancelled",C.TIMEOUT="timeout",C.SKIPPED="skipped",C))(B||{}),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 cn=t.z.enum(["telegram","slack","feishu","wechat","weixin","webchat","signal","nostr","dingtalk"]),pn=t.z.enum(["low","medium","high","critical"]),ve=t.z.object({enabled:t.z.boolean().default(true),botToken:t.z.string().describe("Telegram Bot Token"),webhookUrl:t.z.string().optional().describe("Webhook URL for receiving updates"),polling:t.z.object({enabled:t.z.boolean().default(true),interval:t.z.number().int().positive().optional().describe("Polling interval in ms"),timeout:t.z.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:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),Me=t.z.object({enabled:t.z.boolean().default(true),botToken:t.z.string().describe("Slack Bot Token (xoxb-*)"),appToken:t.z.string().optional().describe("Slack App Token (xapp-*) for Socket Mode"),signingSecret:t.z.string().optional().describe("Slack Signing Secret for webhook verification"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),ze=t.z.object({enabled:t.z.boolean().default(true),appId:t.z.string().describe("Feishu App ID"),appSecret:t.z.string().describe("Feishu App Secret"),encryptKey:t.z.string().optional().describe("Feishu Encrypt Key for message encryption"),verificationToken:t.z.string().optional().describe("Feishu Verification Token"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),Ne=t.z.object({enabled:t.z.boolean().default(true),mode:t.z.enum(["official","wecom"]).default("official"),appId:t.z.string().describe("WeChat App ID"),appSecret:t.z.string().describe("WeChat App Secret"),token:t.z.string().optional().describe("WeChat Token for message verification"),encodingAESKey:t.z.string().optional().describe("WeChat Encoding AES Key"),agentId:t.z.string().optional().describe("WeCom Agent ID"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),je=t.z.object({enabled:t.z.boolean().default(true),stateDir:t.z.string().optional().describe("Override the default account persistence directory (default: ~/.easbot/channels/weixin)"),baseUrl:t.z.string().optional().describe("Override the iLink API baseUrl (default: https://ilinkai.weixin.qq.com)"),cdnBaseUrl:t.z.string().optional().describe("Override the CDN baseUrl (default: https://novac2c.cdn.weixin.qq.com/c2c)"),maxMessageLength:t.z.number().int().positive().optional().default(4e3),timeout:t.z.number().int().positive().optional().default(3e4)}),De=t.z.object({enabled:t.z.boolean().default(true),path:t.z.string().optional().default("/"),heartbeatInterval:t.z.number().int().positive().optional().default(3e4),connectionTimeout:t.z.number().int().positive().optional().default(36e5),maxConnections:t.z.number().int().positive().optional().default(1e3),cors:t.z.boolean().optional().default(true)}),Ge=t.z.object({enabled:t.z.boolean().default(true),serviceUrl:t.z.string().optional().default("https://chat.signal.org"),phoneNumber:t.z.string().describe("Signal phone number"),password:t.z.string().optional().describe("Signal account password"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),Oe=t.z.object({enabled:t.z.boolean().default(true),relays:t.z.array(t.z.string()).optional().default([]).describe("Nostr relay URLs"),privateKey:t.z.string().optional().describe("Nostr private key (hex)"),publicKey:t.z.string().optional().describe("Nostr public key (hex)"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),_e=t.z.object({enabled:t.z.boolean().default(true),appKey:t.z.string().describe("DingTalk AppKey"),appSecret:t.z.string().describe("DingTalk AppSecret"),token:t.z.string().optional().describe("DingTalk token for signature verification"),encryptKey:t.z.string().optional().describe("DingTalk encrypt key for message encryption"),webhook:t.z.object({enabled:t.z.boolean().default(true),path:t.z.string().optional().default("/dingtalk/webhook"),port:t.z.number().int().positive().optional().describe("Webhook server port")}).optional(),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),Le=t.z.object({telegram:ve.optional(),slack:Me.optional(),feishu:ze.optional(),wechat:Ne.optional(),weixin:je.optional(),webchat:De.optional(),signal:Ge.optional(),nostr:Oe.optional(),dingtalk:_e.optional()}),Fe=t.z.object({enabled:t.z.boolean().default(false),cert:t.z.string().optional().describe("Path to SSL certificate file (or certPath)"),key:t.z.string().optional().describe("Path to SSL key file (or keyPath)"),certPath:t.z.string().optional().describe("Path to SSL certificate file (alias of cert)"),keyPath:t.z.string().optional().describe("Path to SSL key file (alias of key)"),ca:t.z.string().optional().describe("Path to CA certificate file"),forceRedirect:t.z.boolean().optional().default(false).describe("Force redirect HTTP to HTTPS"),httpPort:t.z.number().int().positive().optional().default(80).describe("HTTP redirect port")}),Ue=t.z.object({name:t.z.string().describe("Token name/description"),value:t.z.string().describe("Token value"),permissions:t.z.array(t.z.string()).default(["*"]).describe("Associated permissions"),expiresAt:t.z.number().int().positive().optional().describe("Expiration timestamp (Unix timestamp)"),description:t.z.string().optional().describe("Token description")}),Ke=t.z.object({enabled:t.z.boolean().default(true),tokens:t.z.array(Ue).default([]).describe("List of valid tokens"),onInvalid:t.z.enum(["reject","anonymous"]).default("reject").describe("Behavior when token validation fails"),allowAnonymous:t.z.boolean().default(false).describe("Allow anonymous access"),defaultPermissions:t.z.array(t.z.string()).default([]).describe("Default permissions for anonymous users")}),Be=t.z.object({enabled:t.z.boolean().default(false),authorizationServer:t.z.string().describe("OAuth2 authorization server URL"),clientId:t.z.string().describe("OAuth2 client clientId"),clientSecret:t.z.string().describe("OAuth2 authorization server client secret"),tokenValidationEndpoint:t.z.string().describe("OAuth2 token validation endpoint"),scope:t.z.array(t.z.string()).default([]).describe("OAuth2 scopes")}),Qe=t.z.object({type:t.z.enum(["token","oauth2"]).default("token"),token:Ke.optional(),oauth2:Be.optional()}),qe=t.z.object({mode:t.z.enum(["pull","push","both"]).default("both"),interval:t.z.number().int().positive().default(3e4),pushEvents:t.z.array(t.z.enum(["register","deregister","heartbeat","status_change"])).default(["register","deregister","status_change"]),conflictResolution:t.z.enum(["latest","local","remote"]).default("latest"),remoteNodes:t.z.array(t.z.object({id:t.z.string().describe("Node ID"),address:t.z.string().describe("Node address"),port:t.z.number().int().positive().describe("Node port")})).default([]).describe("Remote node list")}),We=t.z.object({id:t.z.string().describe("Gateway node ID"),address:t.z.string().describe("Gateway node address (e.g., http://localhost:3001)"),enabled:t.z.boolean().default(true),metadata:t.z.record(t.z.string(),t.z.any()).optional()}),Ve=t.z.object({nodeId:t.z.string().describe("Current gateway node ID"),nodes:t.z.array(We).default([]).describe("Other gateway nodes in the cluster"),sync:qe.optional()}),Ye=t.z.object({maxConnectionsPerChannel:t.z.number().int().positive().default(100),idleTimeout:t.z.number().int().positive().default(3e5),reuseStrategy:t.z.enum(["lru","fifo","random"]).default("lru"),healthCheckInterval:t.z.number().int().positive().default(6e4),acquireTimeout:t.z.number().int().positive().default(5e3),warmupCount:t.z.number().int().nonnegative().default(0).describe("Number of connections to warm up")}),Ze=t.z.object({maxLength:t.z.number().int().positive().default(1e4),concurrency:t.z.number().int().positive().default(100),batchSize:t.z.number().int().positive().default(10),batchTimeout:t.z.number().int().positive().default(100),priorityLevels:t.z.number().int().positive().default(4)}),$e=t.z.object({failureThreshold:t.z.number().int().positive().default(5),successThreshold:t.z.number().int().positive().default(3),timeout:t.z.number().int().positive().default(3e4),halfOpenDuration:t.z.number().int().positive().default(15e3)}),Xe=t.z.object({heartbeatInterval:t.z.number().int().positive().default(6e4),heartbeatTimeout:t.z.number().int().positive().default(3e5),heartbeatCheckInterval:t.z.number().int().positive().default(3e5),autoDeregisterTimeout:t.z.number().int().positive().default(6e5),maxAgents:t.z.number().int().positive().default(100),persistenceFile:t.z.string().optional().describe("Path to persist agent registrations"),maxRegistrations:t.z.number().int().positive().default(1e3)}),He=t.z.object({sessionTimeout:t.z.number().int().positive().default(18e5),resumeGracePeriod:t.z.number().int().positive().default(3e5),maxSessions:t.z.number().int().positive().default(1e4),persistenceFile:t.z.string().optional().describe("Path to persist sessions")}),Je=t.z.object({enabled:t.z.boolean().default(true),port:t.z.number().int().positive().default(8080),hostname:t.z.string().default("localhost"),path:t.z.string().optional().default("/"),maxConnections:t.z.number().int().positive().optional().default(1e3),connectionTimeout:t.z.number().int().positive().optional().default(36e5),heartbeatInterval:t.z.number().int().positive().optional().default(3e4),sessionExpireMs:t.z.number().int().positive().optional().default(36e5),https:Fe.optional(),auth:Qe.optional(),cors:t.z.boolean().default(true),corsOrigins:t.z.array(t.z.string()).optional(),mdns:t.z.boolean().default(false),mdnsDomain:t.z.string().optional().default("gateway.easbot.local")}),et=t.z.object({channel:t.z.string().optional().describe("Default channel ID, used when multiple channels are configured"),fallbackChannels:t.z.array(t.z.string()).optional().describe("Fallback channel list, sorted by priority, used for degraded channel selection")}),tt=t.z.enum(["localAgent","subAgent","both"]),nt=t.z.object({mode:tt.default("localAgent").describe("Agent processing mode: localAgent, subAgent, or both"),localAgentPriority:t.z.number().int().min(1).max(10).default(1).describe("Priority for localAgent (lower = higher priority)"),subAgentPriority:t.z.number().int().min(1).max(10).default(2).describe("Priority for subAgent (lower = higher priority)"),timeout:t.z.number().int().positive().optional().default(3e5).describe("Timeout for agent execution in milliseconds"),retryOnFailure:t.z.boolean().default(true).describe("Retry with subAgent when localAgent fails")}),ot=t.z.object({autoRegister:t.z.boolean().default(true).describe("Whether to auto-register agent on startup"),heartbeatInterval:t.z.number().int().positive().default(3e4).describe("Heartbeat interval in milliseconds"),maxReconnectAttempts:t.z.number().int().min(0).default(5).describe("Maximum reconnect attempts"),reconnectDelay:t.z.number().int().positive().default(3e3).describe("Reconnect delay in milliseconds"),heartbeatTimeout:t.z.number().int().positive().default(9e4).describe("Heartbeat timeout in milliseconds")}),ln=t.z.object({server:Je.optional(),channels:Le.optional(),cluster:Ve.optional(),connectionPool:Ye.optional(),messageQueue:Ze.optional(),circuitBreaker:$e.optional(),agentRegistry:Xe.optional(),session:He.optional(),defaults:et.optional(),agentProcessing:nt.optional(),client:ot.optional().describe("Gateway client config for agent registration"),defaultAgent:t.z.string().optional().describe("Default agent ID for routing"),logLevel:t.z.enum(["DEBUG","INFO","WARN","ERROR"]).optional()}).catchall(t.z.unknown());var rt=t__namespace.default.object({url:t__namespace.default.string().optional(),override:t__namespace.default.string().optional(),color:t__namespace.default.string().optional()}).meta({ref:"ProjectIcon"}),it=t__namespace.default.object({start:t__namespace.default.string().optional().describe("Startup script to run when creating a new workspace (worktree)")}).meta({ref:"ProjectCommands"}),at=t__namespace.default.object({created:t__namespace.default.number(),updated:t__namespace.default.number(),initialized:t__namespace.default.number().optional()}).meta({ref:"ProjectTime"}),q=t__namespace.default.object({id:t__namespace.default.string(),worktree:t__namespace.default.string(),vcs:t__namespace.default.literal("git").optional(),name:t__namespace.default.string().optional(),icon:rt.optional(),commands:it.optional(),time:at,sandboxes:t__namespace.default.array(t__namespace.default.string())}).meta({ref:"Project"});var z=t__namespace.object({file:t__namespace.string(),before:t__namespace.string(),after:t__namespace.string(),additions:t__namespace.number(),deletions:t__namespace.number(),status:t__namespace.enum(["added","deleted","modified","renamed"]).optional(),oldPath:t__namespace.string().optional()}).meta({ref:"FileDiff"}),st=t__namespace.object({start:t__namespace.object({line:t__namespace.number(),character:t__namespace.number()}),end:t__namespace.object({line:t__namespace.number(),character:t__namespace.number()})}).meta({ref:"Range"}),ct=t__namespace.object({path:t__namespace.string(),added:t__namespace.number().int(),removed:t__namespace.number().int(),status:t__namespace.enum(["added","deleted","modified"])}).meta({ref:"File"}),pt=t__namespace.object({name:t__namespace.string(),path:t__namespace.string(),absolute:t__namespace.string(),type:t__namespace.enum(["file","directory"]),ignored:t__namespace.boolean()}).meta({ref:"FileNode"}),lt=t__namespace.object({type:t__namespace.enum(["text","binary"]),content:t__namespace.string(),diff:t__namespace.string().optional(),patch:t__namespace.object({oldFileName:t__namespace.string(),newFileName:t__namespace.string(),oldHeader:t__namespace.string().optional(),newHeader:t__namespace.string().optional(),hunks:t__namespace.array(t__namespace.object({oldStart:t__namespace.number(),oldLines:t__namespace.number(),newStart:t__namespace.number(),newLines:t__namespace.number(),lines:t__namespace.array(t__namespace.string())})),index:t__namespace.string().optional()}).optional(),encoding:t__namespace.literal("base64").optional(),mimeType:t__namespace.string().optional()}).meta({ref:"FileContent"});var W={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 x(c){return t__namespace.default.string().startsWith(W[c])}var V=x("session").meta({ref:"SessionId"}),Y=t__namespace.default.enum(["general","coder"]).meta({ref:"ContextMode"}),gt=["general","coder"],Z=t__namespace.default.object({id:V,slug:t__namespace.default.string(),providerId:t__namespace.default.string(),directory:t__namespace.default.string(),parentId:V.optional(),contextMode:Y.optional(),summary:t__namespace.default.object({additions:t__namespace.default.number(),deletions:t__namespace.default.number(),files:t__namespace.default.number(),diffs:t__namespace.default.array(z).optional(),noSnapshotReason:t__namespace.default.enum(["no-messages","missing-from","missing-to"]).optional()}).optional(),share:t__namespace.default.object({url:t__namespace.default.string()}).optional(),title:t__namespace.default.string(),version:t__namespace.default.string(),time:t__namespace.default.object({created:t__namespace.default.number(),updated:t__namespace.default.number(),compacting:t__namespace.default.number().optional(),archived:t__namespace.default.number().optional()}),permission:I.optional(),revert:t__namespace.default.object({messageId:t__namespace.default.string(),partId:t__namespace.default.string().optional(),snapshot:t__namespace.default.string().regex(/^[0-9a-f]{40}$/,"invalid snapshot hash").optional(),diff:t__namespace.default.string().optional(),backups:t__namespace.default.array(t__namespace.default.object({original:t__namespace.default.string(),backup:t__namespace.default.string().optional()})).optional()}).optional()}).meta({ref:"Session"}),dt=Z.extend({project:q.nullable()}).meta({ref:"GlobalSession"}),ut=t__namespace.default.object({secret:t__namespace.default.string(),url:t__namespace.default.string()}).meta({ref:"SessionShare"}),ft={ContextModeValues:gt,Info:Z,GlobalInfo:dt,ShareInfo:ut};var $={General:"general",Coder:"coder"},kn=Object.values($),En=$.General,X={General:"general",Coder:"coder",All:"all"},P=Object.values(X),vn=X.All;function Dn(c){return {description:c.description,args:c.args,execute:c.execute}}var Gn=t.z;function On(c){return t.z.object(c)}var J=t__namespace.default.object({type:t__namespace.default.literal("local").describe("Type of MCP server connection"),command:t__namespace.default.string().describe("Command to run the MCP server"),args:t__namespace.default.string().array().optional().describe("Arguments to pass to the command"),env:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).optional().describe("Environment variables to set when running the MCP server"),enabled:t__namespace.default.boolean().optional().describe("Enable or disable the MCP server on startup"),timeout:t__namespace.default.number().int().positive().optional().describe("Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."),description:t__namespace.default.string().optional().describe("Description of the MCP server"),scope:t__namespace.default.enum(P).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpLocalConfig"}),ee=t__namespace.default.object({clientId:t__namespace.default.string().optional().describe("OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted."),clientSecret:t__namespace.default.string().optional().describe("OAuth client secret (if required by the authorization server)"),scope:t__namespace.default.string().optional().describe("OAuth scopes to request during authorization")}).strict().meta({ref:"McpOAuthConfig"}),te=t__namespace.default.object({type:t__namespace.default.literal("remote").describe("Type of MCP server connection"),url:t__namespace.default.string().describe("URL of the remote MCP server"),enabled:t__namespace.default.boolean().optional().describe("Enable or disable the MCP server on startup"),headers:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).optional().describe("Headers to send with the request"),oauth:t__namespace.default.union([ee,t__namespace.default.literal(false)]).optional().describe("OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."),timeout:t__namespace.default.number().int().positive().optional().describe("Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."),description:t__namespace.default.string().optional().describe("Description of the MCP server"),scope:t__namespace.default.enum(P).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpRemoteConfig"}),bt=t__namespace.default.discriminatedUnion("type",[J,te]);var yt=t__namespace.default.object({template:t__namespace.default.string(),description:t__namespace.default.string().optional(),agent:t__namespace.default.string().optional(),model:t__namespace.default.string().optional().describe("Model identifier in provider/model format, e.g. anthropic/claude-3-5-sonnet"),subtask:t__namespace.default.boolean().optional(),scope:t__namespace.default.enum(P).optional().describe("Context mode scope")}).meta({ref:"CommandConfig"}),ne=t__namespace.default.enum(["command","mcp","skill"]).describe("Command source"),ht=t__namespace.default.object({name:t__namespace.default.string().describe("Command name"),description:t__namespace.default.string().describe("Command description"),scope:t__namespace.default.enum(["general","coder","all"]).optional().describe("Context mode scope"),agent:t__namespace.default.string().optional().describe("Specified agent name"),model:t__namespace.default.string().optional().describe("Specified model in provider/model format"),hints:t__namespace.default.array(t__namespace.default.string()).optional().describe("Argument hints"),commandType:t__namespace.default.enum(["prompt","local"]).optional().describe("Command type"),hidden:t__namespace.default.boolean().optional().describe("Whether hidden")}),oe=t__namespace.default.union([t__namespace.default.string(),t__namespace.default.record(t__namespace.default.string(),t__namespace.default.unknown())]).describe("Command arguments"),re=t__namespace.default.discriminatedUnion("type",[t__namespace.default.object({type:t__namespace.default.literal("text"),text:t__namespace.default.string().describe("Text content")}),t__namespace.default.object({type:t__namespace.default.literal("image"),source:t__namespace.default.object({type:t__namespace.default.enum(["base64","url"]),mime:t__namespace.default.string().describe("File mime type"),data:t__namespace.default.string().describe("File base64 encoding data or url")})}),t__namespace.default.object({type:t__namespace.default.literal("file"),url:t__namespace.default.string().describe("File path"),filename:t__namespace.default.string().describe("File name"),mime:t__namespace.default.string().optional().describe("File mime type")})]),xt=t__namespace.default.object({sessionId:t__namespace.default.string().describe("Session ID"),directory:t__namespace.default.string().describe("Working directory"),model:t__namespace.default.string().optional().describe("Model identifier in provider/model format"),agent:t__namespace.default.string().optional().describe("Agent name"),arguments:oe.describe("Command arguments")}),ie=t__namespace.default.record(t__namespace.default.string(),t__namespace.default.unknown()).describe("Result metadata"),Ct=t__namespace.default.object({title:t__namespace.default.string().describe("Result title"),metadata:ie.describe("Result metadata"),output:t__namespace.default.string().describe("Result output"),parts:t__namespace.default.array(re).optional().describe("Result parts"),success:t__namespace.default.boolean().describe("Whether execution succeeded"),error:t__namespace.default.string().optional().describe("Error message if failed")}),St=t__namespace.default.object({agent:t__namespace.default.object({name:t__namespace.default.string().describe("Agent name"),model:t__namespace.default.string().optional().describe("Agent model in provider/model format")}).optional().describe("Agent context")}),At=t__namespace.default.object({isEnabled:t__namespace.default.boolean().optional().describe("Is enabled check result")}),It=t__namespace.default.object({name:t__namespace.default.string(),description:t__namespace.default.string().optional(),agent:t__namespace.default.string().optional(),model:t__namespace.default.string().optional().describe("Model identifier in provider/model format"),source:ne.optional(),subtask:t__namespace.default.boolean().optional(),hints:t__namespace.default.array(t__namespace.default.string()).optional(),commandType:t__namespace.default.enum(["prompt","local"]).optional(),hidden:t__namespace.default.boolean().optional(),isEnabled:t__namespace.default.custom().optional(),execute:t__namespace.default.custom().optional()}).meta({ref:"Command"});var Pt={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},Rt={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},wt={onBoot:false,onSearch:false,onSessionStart:false,intervalMs:1e3*60*60},Tt={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},kt={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true},Et=[{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."}],vt=[{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."}],Mt=["database","fts","vector","schema","lock","disk_space","orphan","backend"],zt="embeddingDims_consistency";var ae={STDIO:"stdio",HTTP:"http",WS:"websocket"},se=t.z.enum(["stdio","http","websocket"]),ce=t.z.object({command:t.z.string(),args:t.z.array(t.z.string())}),pe=t.z.object({baseUrl:t.z.string().url(),timeout:t.z.number().positive().default(6e4)}),le=t.z.object({url:t.z.string().url(),timeout:t.z.number().positive().default(3e4),batchSize:t.z.number().positive().default(10),batchInterval:t.z.number().positive().default(50),heartbeatInterval:t.z.number().positive().default(3e4)}),Nt=t.z.object({stdio:ce.optional(),http:pe.optional(),ws:le.optional()}),jt=t.z.object({id:t.z.string().min(1),options:t.z.record(t.z.string(),t.z.unknown()).optional()}),Dt=t.z.object({agent:t.z.string().optional(),model:jt.optional()}),me=t.z.object({directory:t.z.string().default(process.cwd()),enabled:t.z.boolean().default(true),channel:se.default("websocket"),port:t.z.number().int().min(1).max(65535).default(3e3),hostname:t.z.hostname().default("localhost"),timeout:t.z.number().positive().default(3e4),name:t.z.string().optional(),agentId:t.z.string().optional(),stdio:ce.optional(),http:pe.optional(),ws:le.optional(),agent:Dt.optional()}),Gt=t.z.object({id:t.z.string().min(1),type:t.z.enum(["easbot","custom"]),name:t.z.string().optional(),agentId:t.z.string().optional(),channel:se.optional(),connection:Nt,autoConnect:t.z.boolean().default(false),priority:t.z.number().int().nonnegative().default(0)}),ge=t.z.object({clients:t.z.array(Gt).min(1),defaultClientId:t.z.string().optional()}),Xn=t.z.object({server:me}),Hn=t.z.object({clients:ge}),Ot=t.z.object({autoRegister:t.z.boolean().default(true),gatewayUrl:t.z.url().optional()}).optional(),Jn=t.z.object({server:me.optional(),clients:ge.optional(),client:Ot.optional()}),eo={enabled:true,directory:process.cwd(),channel:ae.WS,port:3e3,hostname:"localhost",timeout:3e4},to={type:"custom",channel:ae.WS,autoConnect:false,priority:0};var _t=t__namespace.default.enum(["text_processing","code_generation","data_analysis","task_execution","workflow_management","monitoring","communication"]),de=t__namespace.default.object({modelId:t__namespace.default.string().min(1).describe("Model ID"),providerId:t__namespace.default.string().min(1).describe("Provider ID")}).meta({ref:"AgentModel"}),Lt=t__namespace.default.object({name:t__namespace.default.string().min(1).describe("Agent name (unique identifier)"),description:t__namespace.default.string().optional().describe("When to use this agent"),mode:t__namespace.default.enum(["subagent","primary","all"]).optional().describe("Agent mode"),native:t__namespace.default.boolean().optional().describe("Whether this is a built-in agent"),hidden:t__namespace.default.boolean().optional().describe("Hide from @ autocomplete menu and agent list"),topP:t__namespace.default.number().optional().describe("Top-p sampling"),temperature:t__namespace.default.number().optional().describe("Sampling temperature"),color:t__namespace.default.union([t__namespace.default.string().regex(/^#[0-9a-fA-F]{6}$/,"Invalid hex color format"),t__namespace.default.enum(["primary","secondary","accent","success","warning","error","info"])]).optional().describe("Hex color code (e.g., #FF5733) or theme color (e.g., primary)"),permission:I.optional().describe("Flattened permission ruleset"),scope:t__namespace.default.enum(P).optional().describe("Agent scope (context mode)"),model:de.optional().describe("Model: { providerId, modelId }"),variant:t__namespace.default.string().optional().describe("Default model variant"),prompt:t__namespace.default.string().optional().describe("Agent system prompt"),options:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.any()).optional().describe("Additional agent options"),steps:t__namespace.default.number().int().positive().optional().describe("Maximum number of agentic iterations before forcing text-only response"),disable:t__namespace.default.boolean().optional().describe("Disable this built-in agent")}).catchall(t__namespace.default.unknown()).meta({ref:"Agent"});var Ft=t__namespace.default.object({id:x("pty"),title:t__namespace.default.string(),command:t__namespace.default.string(),args:t__namespace.default.array(t__namespace.default.string()),cwd:t__namespace.default.string(),status:t__namespace.default.enum(["running","exited"]),pid:t__namespace.default.number()}).meta({ref:"Pty"}),Ut=t__namespace.default.object({command:t__namespace.default.string().optional(),args:t__namespace.default.array(t__namespace.default.string()).optional(),cwd:t__namespace.default.string().optional(),title:t__namespace.default.string().optional(),env:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).optional(),persistent:t__namespace.default.boolean().optional().default(true)}),Kt=t__namespace.default.object({title:t__namespace.default.string().optional(),size:t__namespace.default.object({rows:t__namespace.default.number(),cols:t__namespace.default.number()}).optional()});var ue=t__namespace.default.object({label:t__namespace.default.string().describe("Display text (1-5 words, concise)"),description:t__namespace.default.string().describe("Explanation of choice")}).meta({ref:"QuestionOption"}),fe=t__namespace.default.object({question:t__namespace.default.string().describe("Complete question"),header:t__namespace.default.string().describe("Very short label (max 30 chars)"),options:t__namespace.default.array(ue).describe("Available choices"),multiple:t__namespace.default.boolean().optional().describe("Allow selecting multiple choices"),custom:t__namespace.default.boolean().optional().describe("Allow typing a custom answer (default: true)")}).meta({ref:"QuestionInfo"}),be=t__namespace.default.object({id:x("question"),sessionId:x("session"),questions:t__namespace.default.array(fe).describe("Questions to ask"),tool:t__namespace.default.object({messageId:t__namespace.default.string(),callId:t__namespace.default.string()}).optional()}).meta({ref:"QuestionRequest"}),Bt=t__namespace.default.array(be),ye=t__namespace.default.array(t__namespace.default.string()).meta({ref:"QuestionAnswer"}),Qt=t__namespace.default.object({answers:t__namespace.default.array(ye).describe("User answers in order of questions (each answer is an array of selected labels)")}),qt=t__namespace.default.object({requestId:x("question")}),Wt=t__namespace.default.enum(["user","timeout"]);var Vt=t.z.preprocess(c=>{if(typeof c!="string")return c;let w=c.trim().toLowerCase();return ["true","1","yes","on","y","enabled"].includes(w)?true:["false","0","no","off","n","disabled"].includes(w)?false:c},t.z.boolean());var xe=t__namespace.default.enum(["pending","in_progress","completed","cancelled"]),Ce=t__namespace.default.enum(["high","medium","low"]),Se=t__namespace.default.object({content:t__namespace.default.string().describe("Brief description of the task"),status:xe.describe("Current status of the task: pending, in_progress, completed, cancelled"),priority:Ce.describe("Priority level of the task: high, medium, low"),id:t__namespace.default.string().describe("Unique identifier for the todo item")}).meta({ref:"Todo"}),Yt=t__namespace.default.array(Se);var Ae=t__namespace.default.object({read:t__namespace.default.number(),write:t__namespace.default.number()}).meta({ref:"UsageCache"}),Zt=t__namespace.default.object({total:t__namespace.default.number().optional(),input:t__namespace.default.number(),output:t__namespace.default.number(),reasoning:t__namespace.default.number(),cache:Ae}).meta({ref:"Usage"});
|
|
2
|
-
exports.ACPAgentRuntimeConfigSchema=
|
|
1
|
+
'use strict';var t=require('zod');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);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 Ee(p){return `${G.envPrefix}_${p}`}var h=t__namespace.default.enum(["ask","allow","deny"]).meta({ref:"PermissionActionConfig"}),k=t__namespace.default.record(t__namespace.default.string(),h).meta({ref:"PermissionObjectConfig"}),r=t__namespace.default.union([h,k]).meta({ref:"PermissionRuleConfig"}),ze=p=>typeof p=="object"&&p!==null&&!Array.isArray(p)?{__originalKeys:Object.keys(p),...p}:p,je=p=>{if(typeof p=="string")return {"*":p};let R=p,{__originalKeys:D,...v}=R;if(!D)return v;let O={};for(let c of D)c in v&&(O[c]=v[c]);return O},E=t__namespace.default.preprocess(ze,t__namespace.default.object({__originalKeys:t__namespace.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:h.optional(),question:h.optional(),webfetch:h.optional(),websearch:h.optional(),codesearch:r.optional(),lsp:r.optional(),doom_loop:h.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(h)).transform(je).meta({ref:"PermissionConfig"}),z=t__namespace.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:h.optional(),question:h.optional(),skill:r.optional(),memory:r.optional(),note:r.optional(),pty_session:r.optional(),pty_manage:r.optional(),external_directory:r.optional(),doom_loop:h.optional()}).strict().meta({ref:"AgentPermission"}),T=t__namespace.default.object({permission:t__namespace.default.string(),pattern:t__namespace.default.string(),action:h}).meta({ref:"PermissionRuntimeRule"}),w=t__namespace.default.array(T).meta({ref:"PermissionRuleset"}),Ne={Action:h,Object:k,Rule:r,AgentPermissionSchema:z,Config:E,RuntimeRule:T,Ruleset:w};var L=(c=>(c.HTTP="http",c.WEBSOCKET="websocket",c.GRPC="grpc",c.TCP="tcp",c.UDP="udp",c))(L||{}),_=(I=>(I.GET="GET",I.POST="POST",I.PUT="PUT",I.DELETE="DELETE",I.PATCH="PATCH",I.HEAD="HEAD",I.OPTIONS="OPTIONS",I))(_||{}),F=(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))(F||{}),U=(c=>(c.CONNECTING="connecting",c.OPEN="open",c.CLOSING="closing",c.CLOSED="closed",c.ERROR="error",c))(U||{}),K=(c=>(c.TEXT="text",c.BINARY="binary",c.JSON="json",c.PING="ping",c.PONG="pong",c))(K||{}),B=(a=>(a[a.OK=200]="OK",a[a.CREATED=201]="CREATED",a[a.NO_CONTENT=204]="NO_CONTENT",a[a.BAD_REQUEST=400]="BAD_REQUEST",a[a.UNAUTHORIZED=401]="UNAUTHORIZED",a[a.FORBIDDEN=403]="FORBIDDEN",a[a.NOT_FOUND=404]="NOT_FOUND",a[a.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",a[a.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",a[a.CONFLICT=409]="CONFLICT",a[a.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",a[a.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",a[a.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",a[a.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",a[a.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",a[a.BAD_GATEWAY=502]="BAD_GATEWAY",a[a.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",a[a.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",a[a.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",a))(B||{});var Q=t__namespace.default.object({id:t__namespace.default.string(),name:t__namespace.default.string(),cron:t__namespace.default.string(),enabled:t__namespace.default.boolean(),createdAt:t__namespace.default.number(),updatedAt:t__namespace.default.number(),lastFiredAt:t__namespace.default.number().optional(),nextFireAt:t__namespace.default.number().optional(),timezone:t__namespace.default.string().optional()}).meta({ref:"SchedulerTask"}),De=t__namespace.default.array(Q),Oe=t__namespace.default.object({status:t__namespace.default.string()}),Ge=t__namespace.default.object({initialized:t__namespace.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||{}),W=(c=>(c[c.LOW=0]="LOW",c[c.NORMAL=1]="NORMAL",c[c.HIGH=2]="HIGH",c[c.URGENT=3]="URGENT",c[c.CRITICAL=4]="CRITICAL",c))(W||{});var An=t.z.enum(["telegram","slack","feishu","wechat","weixin","webchat","signal","nostr","dingtalk"]),In=t.z.enum(["low","medium","high","critical"]),Le=t.z.object({enabled:t.z.boolean().default(true),botToken:t.z.string().describe("Telegram Bot Token"),webhookUrl:t.z.string().optional().describe("Webhook URL for receiving updates"),polling:t.z.object({enabled:t.z.boolean().default(true),interval:t.z.number().int().positive().optional().describe("Polling interval in ms"),timeout:t.z.number().int().positive().optional().default(30).describe("Long polling timeout in seconds")}).refine(p=>p===void 0||p.enabled,{message:"polling.enabled must be true when polling is configured"}).optional(),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),_e=t.z.object({enabled:t.z.boolean().default(true),botToken:t.z.string().describe("Slack Bot Token (xoxb-*)"),appToken:t.z.string().optional().describe("Slack App Token (xapp-*) for Socket Mode"),signingSecret:t.z.string().optional().describe("Slack Signing Secret for webhook verification"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),Fe=t.z.object({enabled:t.z.boolean().default(true),appId:t.z.string().describe("Feishu App ID"),appSecret:t.z.string().describe("Feishu App Secret"),encryptKey:t.z.string().optional().describe("Feishu Encrypt Key for message encryption"),verificationToken:t.z.string().optional().describe("Feishu Verification Token"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),Ue=t.z.object({enabled:t.z.boolean().default(true),mode:t.z.enum(["official","wecom"]).default("official"),appId:t.z.string().describe("WeChat App ID"),appSecret:t.z.string().describe("WeChat App Secret"),token:t.z.string().optional().describe("WeChat Token for message verification"),encodingAESKey:t.z.string().optional().describe("WeChat Encoding AES Key"),agentId:t.z.string().optional().describe("WeCom Agent ID"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),Ke=t.z.object({enabled:t.z.boolean().default(true),stateDir:t.z.string().optional().describe("Override the default account persistence directory (default: ~/.easbot/channels/weixin)"),baseUrl:t.z.string().optional().describe("Override the iLink API baseUrl (default: https://ilinkai.weixin.qq.com)"),cdnBaseUrl:t.z.string().optional().describe("Override the CDN baseUrl (default: https://novac2c.cdn.weixin.qq.com/c2c)"),maxMessageLength:t.z.number().int().positive().optional().default(4e3),timeout:t.z.number().int().positive().optional().default(3e4)}),Be=t.z.object({enabled:t.z.boolean().default(true),path:t.z.string().optional().default("/"),heartbeatInterval:t.z.number().int().positive().optional().default(3e4),connectionTimeout:t.z.number().int().positive().optional().default(36e5),maxConnections:t.z.number().int().positive().optional().default(1e3),cors:t.z.boolean().optional().default(true)}),Qe=t.z.object({enabled:t.z.boolean().default(true),serviceUrl:t.z.string().optional().default("https://chat.signal.org"),phoneNumber:t.z.string().describe("Signal phone number"),password:t.z.string().optional().describe("Signal account password"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),qe=t.z.object({enabled:t.z.boolean().default(true),relays:t.z.array(t.z.string()).optional().default([]).describe("Nostr relay URLs"),privateKey:t.z.string().optional().describe("Nostr private key (hex)"),publicKey:t.z.string().optional().describe("Nostr public key (hex)"),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),We=t.z.object({enabled:t.z.boolean().default(true),appKey:t.z.string().describe("DingTalk AppKey"),appSecret:t.z.string().describe("DingTalk AppSecret"),token:t.z.string().optional().describe("DingTalk token for signature verification"),encryptKey:t.z.string().optional().describe("DingTalk encrypt key for message encryption"),webhook:t.z.object({enabled:t.z.boolean().default(true),path:t.z.string().optional().default("/dingtalk/webhook"),port:t.z.number().int().positive().optional().describe("Webhook server port")}).optional(),maxConnections:t.z.number().int().positive().optional().default(100),timeout:t.z.number().int().positive().optional().default(3e4)}),He=t.z.object({telegram:Le.optional(),slack:_e.optional(),feishu:Fe.optional(),wechat:Ue.optional(),weixin:Ke.optional(),webchat:Be.optional(),signal:Qe.optional(),nostr:qe.optional(),dingtalk:We.optional()}),Ve=t.z.object({enabled:t.z.boolean().default(false),cert:t.z.string().optional().describe("Path to SSL certificate file (or certPath)"),key:t.z.string().optional().describe("Path to SSL key file (or keyPath)"),certPath:t.z.string().optional().describe("Path to SSL certificate file (alias of cert)"),keyPath:t.z.string().optional().describe("Path to SSL key file (alias of key)"),ca:t.z.string().optional().describe("Path to CA certificate file"),forceRedirect:t.z.boolean().optional().default(false).describe("Force redirect HTTP to HTTPS"),httpPort:t.z.number().int().positive().optional().default(80).describe("HTTP redirect port")}),Ye=t.z.object({name:t.z.string().describe("Token name/description"),value:t.z.string().describe("Token value"),permissions:t.z.array(t.z.string()).default(["*"]).describe("Associated permissions"),expiresAt:t.z.number().int().positive().optional().describe("Expiration timestamp (Unix timestamp)"),description:t.z.string().optional().describe("Token description")}),Ze=t.z.object({enabled:t.z.boolean().default(true),tokens:t.z.array(Ye).default([]).describe("List of valid tokens"),onInvalid:t.z.enum(["reject","anonymous"]).default("reject").describe("Behavior when token validation fails"),allowAnonymous:t.z.boolean().default(false).describe("Allow anonymous access"),defaultPermissions:t.z.array(t.z.string()).default([]).describe("Default permissions for anonymous users")}),$e=t.z.object({enabled:t.z.boolean().default(false),authorizationServer:t.z.string().describe("OAuth2 authorization server URL"),clientId:t.z.string().describe("OAuth2 client clientId"),clientSecret:t.z.string().describe("OAuth2 authorization server client secret"),tokenValidationEndpoint:t.z.string().describe("OAuth2 token validation endpoint"),scope:t.z.array(t.z.string()).default([]).describe("OAuth2 scopes")}),Xe=t.z.object({type:t.z.enum(["token","oauth2"]).default("token"),token:Ze.optional(),oauth2:$e.optional()}),Je=t.z.object({mode:t.z.enum(["pull","push","both"]).default("both"),interval:t.z.number().int().positive().default(3e4),pushEvents:t.z.array(t.z.enum(["register","deregister","heartbeat","status_change"])).default(["register","deregister","status_change"]),conflictResolution:t.z.enum(["latest","local","remote"]).default("latest"),remoteNodes:t.z.array(t.z.object({id:t.z.string().describe("Node ID"),address:t.z.string().describe("Node address"),port:t.z.number().int().positive().describe("Node port")})).default([]).describe("Remote node list")}),et=t.z.object({id:t.z.string().describe("Gateway node ID"),address:t.z.string().describe("Gateway node address (e.g., http://localhost:3001)"),enabled:t.z.boolean().default(true),metadata:t.z.record(t.z.string(),t.z.any()).optional()}),tt=t.z.object({nodeId:t.z.string().describe("Current gateway node ID"),nodes:t.z.array(et).default([]).describe("Other gateway nodes in the cluster"),sync:Je.optional()}),nt=t.z.object({maxConnectionsPerChannel:t.z.number().int().positive().default(100),idleTimeout:t.z.number().int().positive().default(3e5),reuseStrategy:t.z.enum(["lru","fifo","random"]).default("lru"),healthCheckInterval:t.z.number().int().positive().default(6e4),acquireTimeout:t.z.number().int().positive().default(5e3),warmupCount:t.z.number().int().nonnegative().default(0).describe("Number of connections to warm up")}),ot=t.z.object({maxLength:t.z.number().int().positive().default(1e4),concurrency:t.z.number().int().positive().default(100),batchSize:t.z.number().int().positive().default(10),batchTimeout:t.z.number().int().positive().default(100),priorityLevels:t.z.number().int().positive().default(4)}),rt=t.z.object({failureThreshold:t.z.number().int().positive().default(5),successThreshold:t.z.number().int().positive().default(3),timeout:t.z.number().int().positive().default(3e4),halfOpenDuration:t.z.number().int().positive().default(15e3)}),it=t.z.object({heartbeatInterval:t.z.number().int().positive().default(6e4),heartbeatTimeout:t.z.number().int().positive().default(3e5),heartbeatCheckInterval:t.z.number().int().positive().default(3e5),autoDeregisterTimeout:t.z.number().int().positive().default(6e5),maxAgents:t.z.number().int().positive().default(100),persistenceFile:t.z.string().optional().describe("Path to persist agent registrations"),maxRegistrations:t.z.number().int().positive().default(1e3)}),at=t.z.object({sessionTimeout:t.z.number().int().positive().default(18e5),resumeGracePeriod:t.z.number().int().positive().default(3e5),maxSessions:t.z.number().int().positive().default(1e4),persistenceFile:t.z.string().optional().describe("Path to persist sessions")}),st=t.z.object({enabled:t.z.boolean().default(true),port:t.z.number().int().positive().default(8080),hostname:t.z.string().default("localhost"),path:t.z.string().optional().default("/"),maxConnections:t.z.number().int().positive().optional().default(1e3),connectionTimeout:t.z.number().int().positive().optional().default(36e5),heartbeatInterval:t.z.number().int().positive().optional().default(3e4),sessionExpireMs:t.z.number().int().positive().optional().default(36e5),https:Ve.optional(),auth:Xe.optional(),cors:t.z.boolean().default(true),corsOrigins:t.z.array(t.z.string()).optional(),mdns:t.z.boolean().default(false),mdnsDomain:t.z.string().optional().default("gateway.easbot.local")}),ct=t.z.object({channel:t.z.string().optional().describe("Default channel ID, used when multiple channels are configured"),fallbackChannels:t.z.array(t.z.string()).optional().describe("Fallback channel list, sorted by priority, used for degraded channel selection")}),pt=t.z.enum(["localAgent","subAgent","both"]),lt=t.z.object({mode:pt.default("localAgent").describe("Agent processing mode: localAgent, subAgent, or both"),localAgentPriority:t.z.number().int().min(1).max(10).default(1).describe("Priority for localAgent (lower = higher priority)"),subAgentPriority:t.z.number().int().min(1).max(10).default(2).describe("Priority for subAgent (lower = higher priority)"),timeout:t.z.number().int().positive().optional().default(3e5).describe("Timeout for agent execution in milliseconds"),retryOnFailure:t.z.boolean().default(true).describe("Retry with subAgent when localAgent fails")}),mt=t.z.object({autoRegister:t.z.boolean().default(true).describe("Whether to auto-register agent on startup"),heartbeatInterval:t.z.number().int().positive().default(3e4).describe("Heartbeat interval in milliseconds"),maxReconnectAttempts:t.z.number().int().min(0).default(5).describe("Maximum reconnect attempts"),reconnectDelay:t.z.number().int().positive().default(3e3).describe("Reconnect delay in milliseconds"),heartbeatTimeout:t.z.number().int().positive().default(9e4).describe("Heartbeat timeout in milliseconds")}),wn=t.z.object({server:st.optional(),channels:He.optional(),cluster:tt.optional(),connectionPool:nt.optional(),messageQueue:ot.optional(),circuitBreaker:rt.optional(),agentRegistry:it.optional(),session:at.optional(),defaults:ct.optional(),agentProcessing:lt.optional(),client:mt.optional().describe("Gateway client config for agent registration"),defaultAgent:t.z.string().optional().describe("Default agent ID for routing"),logLevel:t.z.enum(["DEBUG","INFO","WARN","ERROR"]).optional()}).catchall(t.z.unknown());var gt=t__namespace.default.object({url:t__namespace.default.string().optional(),override:t__namespace.default.string().optional(),color:t__namespace.default.string().optional()}).meta({ref:"ProjectIcon"}),dt=t__namespace.default.object({start:t__namespace.default.string().optional().describe("Startup script to run when creating a new workspace (worktree)")}).meta({ref:"ProjectCommands"}),ut=t__namespace.default.object({created:t__namespace.default.number(),updated:t__namespace.default.number(),initialized:t__namespace.default.number().optional()}).meta({ref:"ProjectTime"}),H=t__namespace.default.object({id:t__namespace.default.string(),worktree:t__namespace.default.string(),vcs:t__namespace.default.literal("git").optional(),name:t__namespace.default.string().optional(),icon:gt.optional(),commands:dt.optional(),time:ut,sandboxes:t__namespace.default.array(t__namespace.default.string())}).meta({ref:"Project"});var j=t__namespace.object({file:t__namespace.string(),before:t__namespace.string(),after:t__namespace.string(),additions:t__namespace.number(),deletions:t__namespace.number(),status:t__namespace.enum(["added","deleted","modified","renamed"]).optional(),oldPath:t__namespace.string().optional()}).meta({ref:"FileDiff"}),ft=t__namespace.object({start:t__namespace.object({line:t__namespace.number(),character:t__namespace.number()}),end:t__namespace.object({line:t__namespace.number(),character:t__namespace.number()})}).meta({ref:"Range"}),bt=t__namespace.object({path:t__namespace.string(),added:t__namespace.number().int(),removed:t__namespace.number().int(),status:t__namespace.enum(["added","deleted","modified"])}).meta({ref:"File"}),ht=t__namespace.object({name:t__namespace.string(),path:t__namespace.string(),absolute:t__namespace.string(),type:t__namespace.enum(["file","directory"]),ignored:t__namespace.boolean()}).meta({ref:"FileNode"}),yt=t__namespace.object({type:t__namespace.enum(["text","binary"]),content:t__namespace.string(),diff:t__namespace.string().optional(),patch:t__namespace.object({oldFileName:t__namespace.string(),newFileName:t__namespace.string(),oldHeader:t__namespace.string().optional(),newHeader:t__namespace.string().optional(),hunks:t__namespace.array(t__namespace.object({oldStart:t__namespace.number(),oldLines:t__namespace.number(),newStart:t__namespace.number(),newLines:t__namespace.number(),lines:t__namespace.array(t__namespace.string())})),index:t__namespace.string().optional()}).optional(),encoding:t__namespace.literal("base64").optional(),mimeType:t__namespace.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(p){return t__namespace.default.string().startsWith(V[p])}var Y=C("session").meta({ref:"SessionId"}),Z=t__namespace.default.enum(["general","coder"]).meta({ref:"ContextMode"}),Ct=["general","coder"],$=t__namespace.default.object({id:Y,slug:t__namespace.default.string(),providerId:t__namespace.default.string(),directory:t__namespace.default.string(),parentId:Y.optional(),contextMode:Z.optional(),summary:t__namespace.default.object({additions:t__namespace.default.number(),deletions:t__namespace.default.number(),files:t__namespace.default.number(),diffs:t__namespace.default.array(j).optional(),noSnapshotReason:t__namespace.default.enum(["no-messages","missing-from","missing-to"]).optional()}).optional(),share:t__namespace.default.object({url:t__namespace.default.string()}).optional(),title:t__namespace.default.string(),version:t__namespace.default.string(),time:t__namespace.default.object({created:t__namespace.default.number(),updated:t__namespace.default.number(),compacting:t__namespace.default.number().optional(),archived:t__namespace.default.number().optional()}),permission:w.optional(),revert:t__namespace.default.object({messageId:t__namespace.default.string().optional(),partId:t__namespace.default.string().optional(),snapshot:t__namespace.default.string().regex(/^[0-9a-f]{40}$/,"invalid snapshot hash").optional(),diff:t__namespace.default.string().optional(),scope:t__namespace.default.enum(["session","message","part","file","hunk"]).optional(),files:t__namespace.default.array(t__namespace.default.string()).optional(),backups:t__namespace.default.array(t__namespace.default.object({original:t__namespace.default.string(),backup:t__namespace.default.string().optional()})).optional()}).optional()}).meta({ref:"Session"}),St=$.extend({project:H.nullable()}).meta({ref:"GlobalSession"}),At=t__namespace.default.object({secret:t__namespace.default.string(),url:t__namespace.default.string()}).meta({ref:"SessionShare"}),It={ContextModeValues:Ct,Info:$,GlobalInfo:St,ShareInfo:At};var X={General:"general",Coder:"coder"},Kn=Object.values(X),Bn=X.General,J={General:"general",Coder:"coder",All:"all"},P=Object.values(J),Qn=J.All;function Yn(p){return {description:p.description,args:p.args,execute:p.execute}}var Zn=t.z;function $n(p){return t.z.object(p)}var te=t__namespace.default.object({type:t__namespace.default.literal("local").describe("Type of MCP server connection"),command:t__namespace.default.string().describe("Command to run the MCP server"),args:t__namespace.default.string().array().optional().describe("Arguments to pass to the command"),env:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).optional().describe("Environment variables to set when running the MCP server"),enabled:t__namespace.default.boolean().optional().describe("Enable or disable the MCP server on startup"),timeout:t__namespace.default.number().int().positive().optional().describe("Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."),description:t__namespace.default.string().optional().describe("Description of the MCP server"),scope:t__namespace.default.enum(P).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpLocalConfig"}),ne=t__namespace.default.object({clientId:t__namespace.default.string().optional().describe("OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted."),clientSecret:t__namespace.default.string().optional().describe("OAuth client secret (if required by the authorization server)"),scope:t__namespace.default.string().optional().describe("OAuth scopes to request during authorization")}).strict().meta({ref:"McpOAuthConfig"}),oe=t__namespace.default.object({type:t__namespace.default.literal("remote").describe("Type of MCP server connection"),url:t__namespace.default.string().describe("URL of the remote MCP server"),enabled:t__namespace.default.boolean().optional().describe("Enable or disable the MCP server on startup"),headers:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).optional().describe("Headers to send with the request"),oauth:t__namespace.default.union([ne,t__namespace.default.literal(false)]).optional().describe("OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."),timeout:t__namespace.default.number().int().positive().optional().describe("Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."),description:t__namespace.default.string().optional().describe("Description of the MCP server"),scope:t__namespace.default.enum(P).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpRemoteConfig"}),wt=t__namespace.default.discriminatedUnion("type",[te,oe]);var Pt=t__namespace.default.object({template:t__namespace.default.string(),description:t__namespace.default.string().optional(),agent:t__namespace.default.string().optional(),model:t__namespace.default.string().optional().describe("Model identifier in provider/model format, e.g. anthropic/claude-3-5-sonnet"),subtask:t__namespace.default.boolean().optional(),scope:t__namespace.default.enum(P).optional().describe("Context mode scope")}).meta({ref:"CommandConfig"}),re=t__namespace.default.enum(["command","mcp","skill"]).describe("Command source"),Mt=t__namespace.default.object({name:t__namespace.default.string().describe("Command name"),description:t__namespace.default.string().describe("Command description"),scope:t__namespace.default.enum(["general","coder","all"]).optional().describe("Context mode scope"),agent:t__namespace.default.string().optional().describe("Specified agent name"),model:t__namespace.default.string().optional().describe("Specified model in provider/model format"),hints:t__namespace.default.array(t__namespace.default.string()).optional().describe("Argument hints"),commandType:t__namespace.default.enum(["prompt","local"]).optional().describe("Command type"),hidden:t__namespace.default.boolean().optional().describe("Whether hidden")}),ie=t__namespace.default.union([t__namespace.default.string(),t__namespace.default.record(t__namespace.default.string(),t__namespace.default.unknown())]).describe("Command arguments"),ae=t__namespace.default.discriminatedUnion("type",[t__namespace.default.object({type:t__namespace.default.literal("text"),text:t__namespace.default.string().describe("Text content")}),t__namespace.default.object({type:t__namespace.default.literal("image"),source:t__namespace.default.object({type:t__namespace.default.enum(["base64","url"]),mime:t__namespace.default.string().describe("File mime type"),data:t__namespace.default.string().describe("File base64 encoding data or url")})}),t__namespace.default.object({type:t__namespace.default.literal("file"),url:t__namespace.default.string().describe("File path"),filename:t__namespace.default.string().describe("File name"),mime:t__namespace.default.string().optional().describe("File mime type")})]),Rt=t__namespace.default.object({sessionId:t__namespace.default.string().describe("Session ID"),directory:t__namespace.default.string().describe("Working directory"),model:t__namespace.default.string().optional().describe("Model identifier in provider/model format"),agent:t__namespace.default.string().optional().describe("Agent name"),arguments:ie.describe("Command arguments")}),se=t__namespace.default.record(t__namespace.default.string(),t__namespace.default.unknown()).describe("Result metadata"),kt=t__namespace.default.object({title:t__namespace.default.string().describe("Result title"),metadata:se.describe("Result metadata"),output:t__namespace.default.string().describe("Result output"),parts:t__namespace.default.array(ae).optional().describe("Result parts"),success:t__namespace.default.boolean().describe("Whether execution succeeded"),error:t__namespace.default.string().optional().describe("Error message if failed")}),Tt=t__namespace.default.object({agent:t__namespace.default.object({name:t__namespace.default.string().describe("Agent name"),model:t__namespace.default.string().optional().describe("Agent model in provider/model format")}).optional().describe("Agent context")}),vt=t__namespace.default.object({isEnabled:t__namespace.default.boolean().optional().describe("Is enabled check result")}),Et=t__namespace.default.object({name:t__namespace.default.string(),description:t__namespace.default.string().optional(),agent:t__namespace.default.string().optional(),model:t__namespace.default.string().optional().describe("Model identifier in provider/model format"),source:re.optional(),subtask:t__namespace.default.boolean().optional(),hints:t__namespace.default.array(t__namespace.default.string()).optional(),commandType:t__namespace.default.enum(["prompt","local"]).optional(),hidden:t__namespace.default.boolean().optional(),isEnabled:t__namespace.default.custom().optional(),execute:t__namespace.default.custom().optional()}).meta({ref:"Command"});var zt={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},jt={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},Nt={onBoot:false,onSearch:false,onSessionStart:false,intervalMs:1e3*60*60},Dt={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},Ot={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true},Gt=[{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."}],Lt=[{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."}],_t=["database","fts","vector","schema","lock","disk_space","orphan","backend"],Ft="embeddingDims_consistency";var ce={STDIO:"stdio",HTTP:"http",WS:"websocket"},pe=t.z.enum(["stdio","http","websocket"]),le=t.z.object({command:t.z.string(),args:t.z.array(t.z.string())}),me=t.z.object({baseUrl:t.z.string().url(),timeout:t.z.number().positive().default(6e4)}),ge=t.z.object({url:t.z.string().url(),timeout:t.z.number().positive().default(3e4),batchSize:t.z.number().positive().default(10),batchInterval:t.z.number().positive().default(50),heartbeatInterval:t.z.number().positive().default(3e4)}),Ut=t.z.object({stdio:le.optional(),http:me.optional(),ws:ge.optional()}),Kt=t.z.object({id:t.z.string().min(1),options:t.z.record(t.z.string(),t.z.unknown()).optional()}),Bt=t.z.object({agent:t.z.string().optional(),model:Kt.optional()}),de=t.z.object({directory:t.z.string().default(process.cwd()),enabled:t.z.boolean().default(true),channel:pe.default("websocket"),port:t.z.number().int().min(1).max(65535).default(3e3),hostname:t.z.hostname().default("localhost"),timeout:t.z.number().positive().default(3e4),name:t.z.string().optional(),agentId:t.z.string().optional(),stdio:le.optional(),http:me.optional(),ws:ge.optional(),agent:Bt.optional()}),Qt=t.z.object({id:t.z.string().min(1),type:t.z.enum(["easbot","custom"]),name:t.z.string().optional(),agentId:t.z.string().optional(),channel:pe.optional(),connection:Ut,autoConnect:t.z.boolean().default(false),priority:t.z.number().int().nonnegative().default(0)}),ue=t.z.object({clients:t.z.array(Qt).min(1),defaultClientId:t.z.string().optional()}),mo=t.z.object({server:de}),go=t.z.object({clients:ue}),qt=t.z.object({autoRegister:t.z.boolean().default(true),gatewayUrl:t.z.url().optional()}).optional(),uo=t.z.object({server:de.optional(),clients:ue.optional(),client:qt.optional()}),fo={enabled:true,directory:process.cwd(),channel:ce.WS,port:3e3,hostname:"localhost",timeout:3e4},bo={type:"custom",channel:ce.WS,autoConnect:false,priority:0};var Wt=t__namespace.default.enum(["text_processing","code_generation","data_analysis","task_execution","workflow_management","monitoring","communication"]),fe=t__namespace.default.object({modelId:t__namespace.default.string().min(1).describe("Model ID"),providerId:t__namespace.default.string().min(1).describe("Provider ID")}).meta({ref:"AgentModel"}),Ht=t__namespace.default.object({name:t__namespace.default.string().min(1).describe("Agent name (unique identifier)"),description:t__namespace.default.string().optional().describe("When to use this agent"),mode:t__namespace.default.enum(["subagent","primary","all"]).optional().describe("Agent mode"),native:t__namespace.default.boolean().optional().describe("Whether this is a built-in agent"),hidden:t__namespace.default.boolean().optional().describe("Hide from @ autocomplete menu and agent list"),topP:t__namespace.default.number().optional().describe("Top-p sampling"),temperature:t__namespace.default.number().optional().describe("Sampling temperature"),color:t__namespace.default.union([t__namespace.default.string().regex(/^#[0-9a-fA-F]{6}$/,"Invalid hex color format"),t__namespace.default.enum(["primary","secondary","accent","success","warning","error","info"])]).optional().describe("Hex color code (e.g., #FF5733) or theme color (e.g., primary)"),permission:w.optional().describe("Flattened permission ruleset"),scope:t__namespace.default.enum(P).optional().describe("Agent scope (context mode)"),model:fe.optional().describe("Model: { providerId, modelId }"),variant:t__namespace.default.string().optional().describe("Default model variant"),prompt:t__namespace.default.string().optional().describe("Agent system prompt"),options:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.any()).optional().describe("Additional agent options"),steps:t__namespace.default.number().int().positive().optional().describe("Maximum number of agentic iterations before forcing text-only response"),disable:t__namespace.default.boolean().optional().describe("Disable this built-in agent")}).catchall(t__namespace.default.unknown()).meta({ref:"Agent"});var Vt=t__namespace.default.object({id:C("pty"),title:t__namespace.default.string(),command:t__namespace.default.string(),args:t__namespace.default.array(t__namespace.default.string()),cwd:t__namespace.default.string(),status:t__namespace.default.enum(["running","exited"]),pid:t__namespace.default.number()}).meta({ref:"Pty"}),Yt=t__namespace.default.object({command:t__namespace.default.string().optional(),args:t__namespace.default.array(t__namespace.default.string()).optional(),cwd:t__namespace.default.string().optional(),title:t__namespace.default.string().optional(),env:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).optional(),persistent:t__namespace.default.boolean().optional().default(true)}),Zt=t__namespace.default.object({title:t__namespace.default.string().optional(),size:t__namespace.default.object({rows:t__namespace.default.number(),cols:t__namespace.default.number()}).optional()});var be=t__namespace.default.object({label:t__namespace.default.string().describe("Display text (1-5 words, concise)"),description:t__namespace.default.string().describe("Explanation of choice")}).meta({ref:"QuestionOption"}),he=t__namespace.default.object({question:t__namespace.default.string().describe("Complete question"),header:t__namespace.default.string().describe("Very short label (max 30 chars)"),options:t__namespace.default.array(be).describe("Available choices"),multiple:t__namespace.default.boolean().optional().describe("Allow selecting multiple choices"),custom:t__namespace.default.boolean().optional().describe("Allow typing a custom answer (default: true)")}).meta({ref:"QuestionInfo"}),ye=t__namespace.default.object({id:C("question"),sessionId:C("session"),questions:t__namespace.default.array(he).describe("Questions to ask"),tool:t__namespace.default.object({messageId:t__namespace.default.string(),callId:t__namespace.default.string()}).optional()}).meta({ref:"QuestionRequest"}),$t=t__namespace.default.array(ye),xe=t__namespace.default.array(t__namespace.default.string()).meta({ref:"QuestionAnswer"}),Xt=t__namespace.default.object({answers:t__namespace.default.array(xe).describe("User answers in order of questions (each answer is an array of selected labels)")}),Jt=t__namespace.default.object({requestId:C("question")}),en=t__namespace.default.enum(["user","timeout"]);var N=t__namespace.default.enum(["counter","gauge","histogram","summary"]),Ce=t__namespace.default.enum(["healthy","degraded","unhealthy"]),Se=t__namespace.default.enum(["pass","warn","fail"]),Ae=t__namespace.default.object({value:t__namespace.default.number().describe("Sample value of the metric"),labels:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).describe("Label key-value pairs attached to this sample")}).meta({ref:"MonitorMetricValue"}),Ie=t__namespace.default.object({name:t__namespace.default.string().min(1).describe("Metric name following the Prometheus naming convention"),type:N.describe("Metric type: counter, gauge, histogram or summary"),help:t__namespace.default.string().describe("Human readable description of the metric"),values:t__namespace.default.array(Ae).describe("Samples of this metric, one per label combination")}).meta({ref:"MonitorMetric"}),tn=t__namespace.default.array(Ie),we=t__namespace.default.object({name:t__namespace.default.string().min(1).describe("Unique name of the health check"),state:Se.describe("Check outcome: pass, warn or fail"),durationMs:t__namespace.default.number().describe("Duration of the check execution in milliseconds"),message:t__namespace.default.string().describe("Short explanation of the outcome"),checkedAt:t__namespace.default.number().describe("Timestamp of the check execution in epoch milliseconds")}).meta({ref:"MonitorHealthCheck"}),Pe=t__namespace.default.object({name:t__namespace.default.string().describe("Unique name of the health check"),description:t__namespace.default.string().describe("Human readable description of what the check verifies"),timeoutMs:t__namespace.default.number().describe("Per-execution timeout in milliseconds")}).meta({ref:"MonitorHealthCheckInfo"}),nn=t__namespace.default.array(Pe),on=t__namespace.default.object({state:Ce.describe("Overall health state aggregated from all checks"),checks:t__namespace.default.array(we).describe("Per-check results"),timestamp:t__namespace.default.number().describe("Timestamp of the aggregation in epoch milliseconds")}).meta({ref:"MonitorHealth"}),rn=t__namespace.default.object({name:t__namespace.default.string().min(1).describe("Metric name to register or write to"),type:N.optional().describe("Metric type, only used when registering a new metric"),help:t__namespace.default.string().optional().describe("Metric description, only used when registering a new metric"),labelNames:t__namespace.default.array(t__namespace.default.string()).optional().describe("Declared label names, only used when registering a new metric"),labels:t__namespace.default.record(t__namespace.default.string(),t__namespace.default.string()).optional().describe("Label key-value pairs attached to this write"),value:t__namespace.default.number().optional().describe("Value to write; defaults to 1 for counters")}).meta({ref:"MonitorMetricInput"}),an=t__namespace.default.object({name:t__namespace.default.string().min(1).describe("Unique name of the health check to register"),description:t__namespace.default.string().optional().describe("Human readable description of what the check verifies"),timeoutMs:t__namespace.default.number().optional().describe("Per-execution timeout in milliseconds")}).meta({ref:"MonitorHealthCheckInput"}),sn=t__namespace.default.object({uptimeMs:t__namespace.default.number().describe("Process uptime in milliseconds"),metricCount:t__namespace.default.number().describe("Number of registered metrics"),checkCount:t__namespace.default.number().describe("Number of registered health checks"),timestamp:t__namespace.default.number().describe("Timestamp of the status snapshot in epoch milliseconds")}).meta({ref:"MonitorStatus"});var cn=t.z.preprocess(p=>{if(typeof p!="string")return p;let R=p.trim().toLowerCase();return ["true","1","yes","on","y","enabled"].includes(R)?true:["false","0","no","off","n","disabled"].includes(R)?false:p},t.z.boolean());var Re=t__namespace.default.enum(["pending","in_progress","completed","cancelled"]),ke=t__namespace.default.enum(["high","medium","low"]),Te=t__namespace.default.object({content:t__namespace.default.string().describe("Brief description of the task"),status:Re.describe("Current status of the task: pending, in_progress, completed, cancelled"),priority:ke.describe("Priority level of the task: high, medium, low"),id:t__namespace.default.string().describe("Unique identifier for the todo item")}).meta({ref:"Todo"}),pn=t__namespace.default.array(Te);var ve=t__namespace.default.object({read:t__namespace.default.number(),write:t__namespace.default.number()}).meta({ref:"UsageCache"}),ln=t__namespace.default.object({total:t__namespace.default.number().optional(),input:t__namespace.default.number(),output:t__namespace.default.number(),reasoning:t__namespace.default.number(),cache:ve}).meta({ref:"Usage"});
|
|
2
|
+
exports.ACPAgentRuntimeConfigSchema=Bt;exports.ACPChannelTypeSchema=pe;exports.ACPClientConfigSchema=Qt;exports.ACPClientRegisterConfigSchema=qt;exports.ACPClientsConfigSchema=ue;exports.ACPConnectionConfigSchema=Ut;exports.ACPHttpConnectionConfigSchema=me;exports.ACPInfoACPClientsConfigSchema=go;exports.ACPInfoACPConfigSchema=uo;exports.ACPInfoACPServerConfigSchema=mo;exports.ACPModelConfigSchema=Kt;exports.ACPServerConfigSchema=de;exports.ACPStdioConnectionConfigSchema=le;exports.ACPWebSocketConnectionConfigSchema=ge;exports.ACP_DEFAULT_CLIENT_CONFIG=bo;exports.ACP_DEFAULT_SERVER_CONFIG=fo;exports.AgentCapabilitySchema=Wt;exports.AgentInfoSchema=Ht;exports.AgentModeSchema=pt;exports.AgentModelSchema=fe;exports.AgentPermission=z;exports.AgentPermissionSchema=z;exports.AgentProcessingConfigSchema=lt;exports.AgentRegistryConfigSchema=it;exports.AgentSyncConfigSchema=Je;exports.AuthConfigSchema=Xe;exports.BooleanQuerySchema=cn;exports.Brand=G;exports.ChannelConfigSchema=He;exports.ChannelType=ce;exports.CircuitBreakerConfigSchema=rt;exports.CommandArgumentsSchema=ie;exports.CommandConfigInfoSchema=Pt;exports.CommandExecuteResultMetadataSchema=se;exports.CommandExecuteResultSchema=kt;exports.CommandExecutionContextSchema=Rt;exports.CommandInfoSchema=Et;exports.CommandInitContextSchema=Tt;exports.CommandInitResultSchema=vt;exports.CommandMetadataSchema=Mt;exports.CommandPromptPartSchema=ae;exports.CommandSourceSchema=re;exports.ConnectionPoolConfigSchema=nt;exports.ContextModeEnum=X;exports.ContextModeSchema=Z;exports.ContextModeValues=Kn;exports.DEFAULT_EMBEDDING_CONFIG=zt;exports.DEFAULT_INDEXER_CONFIG=Dt;exports.DEFAULT_PARSER_CONFIG=Ot;exports.DEFAULT_SEARCH_CONFIG=jt;exports.DEFAULT_SYNC_CONFIG=Nt;exports.DefaultContextMode=Bn;exports.DefaultScope=Qn;exports.DefaultsConfigSchema=ct;exports.DingTalkChannelConfigSchema=We;exports.EMBEDDING_DIMS_CONSISTENCY_CHECK=Ft;exports.FeishuChannelConfigSchema=Fe;exports.FileContentSchema=yt;exports.FileDiffSchema=j;exports.FileInfoSchema=bt;exports.FileNodeSchema=ht;exports.GRAPH_ENTITY_TYPE_DEFINITIONS=Gt;exports.GRAPH_RELATION_TYPE_DEFINITIONS=Lt;exports.GatewayChannelTypeSchema=An;exports.GatewayClientConfigSchema=mt;exports.GatewayClusterConfigSchema=tt;exports.GatewayConfigSchema=wn;exports.GatewayMessagePrioritySchema=In;exports.GatewayNodeConfigSchema=et;exports.GatewayServerConfigSchema=st;exports.HTTPMethod=_;exports.HTTPSConfigSchema=Ve;exports.HTTPStatusCode=F;exports.HttpStatus=B;exports.KNOWLEDGE_DOCTOR_PUBLIC_CHECKS=_t;exports.McpLocalConfigSchema=te;exports.McpOAuthConfigSchema=ne;exports.McpRemoteConfigSchema=oe;exports.McpSchema=wt;exports.MessageQueueConfigSchema=ot;exports.MonitorCheckStateSchema=Se;exports.MonitorHealthCheckInfoListSchema=nn;exports.MonitorHealthCheckInfoSchema=Pe;exports.MonitorHealthCheckInputSchema=an;exports.MonitorHealthCheckSchema=we;exports.MonitorHealthSchema=on;exports.MonitorHealthStateSchema=Ce;exports.MonitorMetricInputSchema=rn;exports.MonitorMetricListSchema=tn;exports.MonitorMetricSchema=Ie;exports.MonitorMetricTypeSchema=N;exports.MonitorMetricValueSchema=Ae;exports.MonitorStatusSchema=sn;exports.NostrChannelConfigSchema=qe;exports.OAuth2AuthConfigSchema=$e;exports.Permission=Ne;exports.PermissionAction=h;exports.PermissionActionSchema=h;exports.PermissionConfig=E;exports.PermissionConfigSchema=E;exports.PermissionObject=k;exports.PermissionObjectSchema=k;exports.PermissionRule=r;exports.PermissionRuleSchema=r;exports.PermissionRuleset=w;exports.PermissionRulesetSchema=w;exports.PermissionRuntimeRule=T;exports.PermissionRuntimeRuleSchema=T;exports.ProjectCommandsSchema=dt;exports.ProjectIconSchema=gt;exports.ProjectInfoSchema=H;exports.ProjectTimeSchema=ut;exports.Protocol=L;exports.PtyCreateInputSchema=Yt;exports.PtyInfoSchema=Vt;exports.PtyUpdateInputSchema=Zt;exports.QuestionAnswerSchema=xe;exports.QuestionInfoSchema=he;exports.QuestionOptionSchema=be;exports.QuestionParamSchema=Jt;exports.QuestionReplySchema=Xt;exports.QuestionReplySourceSchema=en;exports.QuestionRequestListSchema=$t;exports.QuestionRequestSchema=ye;exports.RangeSchema=ft;exports.SchedulerInitializedSchema=Ge;exports.SchedulerStatusSchema=Oe;exports.SchedulerTaskListSchema=De;exports.SchedulerTaskSchema=Q;exports.ScopeEnum=J;exports.ScopeValues=P;exports.SessionConfigSchema=at;exports.SessionTypes=It;exports.SignalChannelConfigSchema=Qe;exports.SlackChannelConfigSchema=_e;exports.TaskPriority=W;exports.TaskStatus=q;exports.TelegramChannelConfigSchema=Le;exports.TodoListSchema=pn;exports.TodoPrioritySchema=ke;exports.TodoSchema=Te;exports.TodoStatusSchema=Re;exports.TokenAuthConfigSchema=Ze;exports.TokenAuthItemSchema=Ye;exports.UsageCacheSchema=ve;exports.UsageSchema=ln;exports.WeChatChannelConfigSchema=Ue;exports.WebChatChannelConfigSchema=Be;exports.WebSocketMessageType=K;exports.WebSocketState=U;exports.WeixinChannelConfigSchema=Ke;exports.brandEnv=Ee;exports.buildToolArgs=$n;exports.createTool=Yn;exports.idPrefixes=V;exports.idSchema=C;exports.toolSchema=Zn;
|
package/dist/index.d.cts
CHANGED
|
@@ -644,7 +644,7 @@ declare const PermissionConfigSchema: z__default.ZodPipe<z__default.ZodPreproces
|
|
|
644
644
|
ask: "ask";
|
|
645
645
|
allow: "allow";
|
|
646
646
|
deny: "deny";
|
|
647
|
-
}>]
|
|
647
|
+
}>]>, unknown>, z__default.ZodTransform<Record<string, "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">>, "ask" | "allow" | "deny" | {
|
|
648
648
|
[x: string]: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">;
|
|
649
649
|
__originalKeys?: string[] | undefined;
|
|
650
650
|
read?: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny"> | undefined;
|
|
@@ -1306,7 +1306,7 @@ declare const Permission: {
|
|
|
1306
1306
|
ask: "ask";
|
|
1307
1307
|
allow: "allow";
|
|
1308
1308
|
deny: "deny";
|
|
1309
|
-
}>]
|
|
1309
|
+
}>]>, unknown>, z__default.ZodTransform<Record<string, "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">>, "ask" | "allow" | "deny" | {
|
|
1310
1310
|
[x: string]: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">;
|
|
1311
1311
|
__originalKeys?: string[] | undefined;
|
|
1312
1312
|
read?: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny"> | undefined;
|
|
@@ -2565,10 +2565,18 @@ declare const SessionInfoSchema: z__default.ZodObject<{
|
|
|
2565
2565
|
}>;
|
|
2566
2566
|
}, z__default.core.$strip>>>;
|
|
2567
2567
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2568
|
-
messageId: z__default.ZodString
|
|
2568
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2569
2569
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2570
2570
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2571
2571
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2572
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2573
|
+
file: "file";
|
|
2574
|
+
message: "message";
|
|
2575
|
+
session: "session";
|
|
2576
|
+
part: "part";
|
|
2577
|
+
hunk: "hunk";
|
|
2578
|
+
}>>;
|
|
2579
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2572
2580
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2573
2581
|
original: z__default.ZodString;
|
|
2574
2582
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2631,10 +2639,18 @@ declare const GlobalSessionInfoSchema: z__default.ZodObject<{
|
|
|
2631
2639
|
}>;
|
|
2632
2640
|
}, z__default.core.$strip>>>;
|
|
2633
2641
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2634
|
-
messageId: z__default.ZodString
|
|
2642
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2635
2643
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2636
2644
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2637
2645
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2646
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2647
|
+
file: "file";
|
|
2648
|
+
message: "message";
|
|
2649
|
+
session: "session";
|
|
2650
|
+
part: "part";
|
|
2651
|
+
hunk: "hunk";
|
|
2652
|
+
}>>;
|
|
2653
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2638
2654
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2639
2655
|
original: z__default.ZodString;
|
|
2640
2656
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2724,10 +2740,18 @@ declare const Session: {
|
|
|
2724
2740
|
}>;
|
|
2725
2741
|
}, z__default.core.$strip>>>;
|
|
2726
2742
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2727
|
-
messageId: z__default.ZodString
|
|
2743
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2728
2744
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2729
2745
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2730
2746
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2747
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2748
|
+
file: "file";
|
|
2749
|
+
message: "message";
|
|
2750
|
+
session: "session";
|
|
2751
|
+
part: "part";
|
|
2752
|
+
hunk: "hunk";
|
|
2753
|
+
}>>;
|
|
2754
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2731
2755
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2732
2756
|
original: z__default.ZodString;
|
|
2733
2757
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2789,10 +2813,18 @@ declare const Session: {
|
|
|
2789
2813
|
}>;
|
|
2790
2814
|
}, z__default.core.$strip>>>;
|
|
2791
2815
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2792
|
-
messageId: z__default.ZodString
|
|
2816
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2793
2817
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2794
2818
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2795
2819
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2820
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2821
|
+
file: "file";
|
|
2822
|
+
message: "message";
|
|
2823
|
+
session: "session";
|
|
2824
|
+
part: "part";
|
|
2825
|
+
hunk: "hunk";
|
|
2826
|
+
}>>;
|
|
2827
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2796
2828
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2797
2829
|
original: z__default.ZodString;
|
|
2798
2830
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2944,7 +2976,7 @@ type ToolFunction = {
|
|
|
2944
2976
|
interface ToolDefinition {
|
|
2945
2977
|
description: string;
|
|
2946
2978
|
args: Record<string, z$1.ZodTypeAny>;
|
|
2947
|
-
execute
|
|
2979
|
+
execute(args: Record<string, unknown>, context: ToolContext): Promise<string>;
|
|
2948
2980
|
}
|
|
2949
2981
|
declare function createTool<Args extends Record<string, z$1.ZodTypeAny>>(input: {
|
|
2950
2982
|
description: string;
|
|
@@ -4047,6 +4079,132 @@ declare const QuestionReplySourceSchema: z__default.ZodEnum<{
|
|
|
4047
4079
|
}>;
|
|
4048
4080
|
type QuestionReplySource = z__default.infer<typeof QuestionReplySourceSchema>;
|
|
4049
4081
|
|
|
4082
|
+
declare const MonitorMetricTypeSchema: z__default.ZodEnum<{
|
|
4083
|
+
summary: "summary";
|
|
4084
|
+
counter: "counter";
|
|
4085
|
+
gauge: "gauge";
|
|
4086
|
+
histogram: "histogram";
|
|
4087
|
+
}>;
|
|
4088
|
+
type MonitorMetricType = z__default.infer<typeof MonitorMetricTypeSchema>;
|
|
4089
|
+
declare const MonitorHealthStateSchema: z__default.ZodEnum<{
|
|
4090
|
+
healthy: "healthy";
|
|
4091
|
+
unhealthy: "unhealthy";
|
|
4092
|
+
degraded: "degraded";
|
|
4093
|
+
}>;
|
|
4094
|
+
type MonitorHealthState = z__default.infer<typeof MonitorHealthStateSchema>;
|
|
4095
|
+
declare const MonitorCheckStateSchema: z__default.ZodEnum<{
|
|
4096
|
+
warn: "warn";
|
|
4097
|
+
pass: "pass";
|
|
4098
|
+
fail: "fail";
|
|
4099
|
+
}>;
|
|
4100
|
+
type MonitorCheckState = z__default.infer<typeof MonitorCheckStateSchema>;
|
|
4101
|
+
declare const MonitorMetricValueSchema: z__default.ZodObject<{
|
|
4102
|
+
value: z__default.ZodNumber;
|
|
4103
|
+
labels: z__default.ZodRecord<z__default.ZodString, z__default.ZodString>;
|
|
4104
|
+
}, z__default.core.$strip>;
|
|
4105
|
+
type MonitorMetricValue = z__default.infer<typeof MonitorMetricValueSchema>;
|
|
4106
|
+
declare const MonitorMetricSchema: z__default.ZodObject<{
|
|
4107
|
+
name: z__default.ZodString;
|
|
4108
|
+
type: z__default.ZodEnum<{
|
|
4109
|
+
summary: "summary";
|
|
4110
|
+
counter: "counter";
|
|
4111
|
+
gauge: "gauge";
|
|
4112
|
+
histogram: "histogram";
|
|
4113
|
+
}>;
|
|
4114
|
+
help: z__default.ZodString;
|
|
4115
|
+
values: z__default.ZodArray<z__default.ZodObject<{
|
|
4116
|
+
value: z__default.ZodNumber;
|
|
4117
|
+
labels: z__default.ZodRecord<z__default.ZodString, z__default.ZodString>;
|
|
4118
|
+
}, z__default.core.$strip>>;
|
|
4119
|
+
}, z__default.core.$strip>;
|
|
4120
|
+
type MonitorMetric = z__default.infer<typeof MonitorMetricSchema>;
|
|
4121
|
+
declare const MonitorMetricListSchema: z__default.ZodArray<z__default.ZodObject<{
|
|
4122
|
+
name: z__default.ZodString;
|
|
4123
|
+
type: z__default.ZodEnum<{
|
|
4124
|
+
summary: "summary";
|
|
4125
|
+
counter: "counter";
|
|
4126
|
+
gauge: "gauge";
|
|
4127
|
+
histogram: "histogram";
|
|
4128
|
+
}>;
|
|
4129
|
+
help: z__default.ZodString;
|
|
4130
|
+
values: z__default.ZodArray<z__default.ZodObject<{
|
|
4131
|
+
value: z__default.ZodNumber;
|
|
4132
|
+
labels: z__default.ZodRecord<z__default.ZodString, z__default.ZodString>;
|
|
4133
|
+
}, z__default.core.$strip>>;
|
|
4134
|
+
}, z__default.core.$strip>>;
|
|
4135
|
+
type MonitorMetricList = z__default.infer<typeof MonitorMetricListSchema>;
|
|
4136
|
+
declare const MonitorHealthCheckSchema: z__default.ZodObject<{
|
|
4137
|
+
name: z__default.ZodString;
|
|
4138
|
+
state: z__default.ZodEnum<{
|
|
4139
|
+
warn: "warn";
|
|
4140
|
+
pass: "pass";
|
|
4141
|
+
fail: "fail";
|
|
4142
|
+
}>;
|
|
4143
|
+
durationMs: z__default.ZodNumber;
|
|
4144
|
+
message: z__default.ZodString;
|
|
4145
|
+
checkedAt: z__default.ZodNumber;
|
|
4146
|
+
}, z__default.core.$strip>;
|
|
4147
|
+
type MonitorHealthCheck = z__default.infer<typeof MonitorHealthCheckSchema>;
|
|
4148
|
+
declare const MonitorHealthCheckInfoSchema: z__default.ZodObject<{
|
|
4149
|
+
name: z__default.ZodString;
|
|
4150
|
+
description: z__default.ZodString;
|
|
4151
|
+
timeoutMs: z__default.ZodNumber;
|
|
4152
|
+
}, z__default.core.$strip>;
|
|
4153
|
+
type MonitorHealthCheckInfo = z__default.infer<typeof MonitorHealthCheckInfoSchema>;
|
|
4154
|
+
declare const MonitorHealthCheckInfoListSchema: z__default.ZodArray<z__default.ZodObject<{
|
|
4155
|
+
name: z__default.ZodString;
|
|
4156
|
+
description: z__default.ZodString;
|
|
4157
|
+
timeoutMs: z__default.ZodNumber;
|
|
4158
|
+
}, z__default.core.$strip>>;
|
|
4159
|
+
type MonitorHealthCheckInfoList = z__default.infer<typeof MonitorHealthCheckInfoListSchema>;
|
|
4160
|
+
declare const MonitorHealthSchema: z__default.ZodObject<{
|
|
4161
|
+
state: z__default.ZodEnum<{
|
|
4162
|
+
healthy: "healthy";
|
|
4163
|
+
unhealthy: "unhealthy";
|
|
4164
|
+
degraded: "degraded";
|
|
4165
|
+
}>;
|
|
4166
|
+
checks: z__default.ZodArray<z__default.ZodObject<{
|
|
4167
|
+
name: z__default.ZodString;
|
|
4168
|
+
state: z__default.ZodEnum<{
|
|
4169
|
+
warn: "warn";
|
|
4170
|
+
pass: "pass";
|
|
4171
|
+
fail: "fail";
|
|
4172
|
+
}>;
|
|
4173
|
+
durationMs: z__default.ZodNumber;
|
|
4174
|
+
message: z__default.ZodString;
|
|
4175
|
+
checkedAt: z__default.ZodNumber;
|
|
4176
|
+
}, z__default.core.$strip>>;
|
|
4177
|
+
timestamp: z__default.ZodNumber;
|
|
4178
|
+
}, z__default.core.$strip>;
|
|
4179
|
+
type MonitorHealth = z__default.infer<typeof MonitorHealthSchema>;
|
|
4180
|
+
declare const MonitorMetricInputSchema: z__default.ZodObject<{
|
|
4181
|
+
name: z__default.ZodString;
|
|
4182
|
+
type: z__default.ZodOptional<z__default.ZodEnum<{
|
|
4183
|
+
summary: "summary";
|
|
4184
|
+
counter: "counter";
|
|
4185
|
+
gauge: "gauge";
|
|
4186
|
+
histogram: "histogram";
|
|
4187
|
+
}>>;
|
|
4188
|
+
help: z__default.ZodOptional<z__default.ZodString>;
|
|
4189
|
+
labelNames: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
4190
|
+
labels: z__default.ZodOptional<z__default.ZodRecord<z__default.ZodString, z__default.ZodString>>;
|
|
4191
|
+
value: z__default.ZodOptional<z__default.ZodNumber>;
|
|
4192
|
+
}, z__default.core.$strip>;
|
|
4193
|
+
type MonitorMetricInput = z__default.infer<typeof MonitorMetricInputSchema>;
|
|
4194
|
+
declare const MonitorHealthCheckInputSchema: z__default.ZodObject<{
|
|
4195
|
+
name: z__default.ZodString;
|
|
4196
|
+
description: z__default.ZodOptional<z__default.ZodString>;
|
|
4197
|
+
timeoutMs: z__default.ZodOptional<z__default.ZodNumber>;
|
|
4198
|
+
}, z__default.core.$strip>;
|
|
4199
|
+
type MonitorHealthCheckInput = z__default.infer<typeof MonitorHealthCheckInputSchema>;
|
|
4200
|
+
declare const MonitorStatusSchema: z__default.ZodObject<{
|
|
4201
|
+
uptimeMs: z__default.ZodNumber;
|
|
4202
|
+
metricCount: z__default.ZodNumber;
|
|
4203
|
+
checkCount: z__default.ZodNumber;
|
|
4204
|
+
timestamp: z__default.ZodNumber;
|
|
4205
|
+
}, z__default.core.$strip>;
|
|
4206
|
+
type MonitorStatus = z__default.infer<typeof MonitorStatusSchema>;
|
|
4207
|
+
|
|
4050
4208
|
declare const idPrefixes: {
|
|
4051
4209
|
readonly event: "evt";
|
|
4052
4210
|
readonly session: "ses";
|
|
@@ -4076,7 +4234,7 @@ declare const idPrefixes: {
|
|
|
4076
4234
|
type IdPrefixName = keyof typeof idPrefixes;
|
|
4077
4235
|
declare function idSchema(name: IdPrefixName): z__default.ZodString;
|
|
4078
4236
|
|
|
4079
|
-
declare const BooleanQuerySchema: z$1.ZodPreprocess<z$1.ZodBoolean>;
|
|
4237
|
+
declare const BooleanQuerySchema: z$1.ZodPreprocess<z$1.ZodBoolean, unknown>;
|
|
4080
4238
|
type BooleanQuery = z$1.output<typeof BooleanQuerySchema>;
|
|
4081
4239
|
|
|
4082
4240
|
declare const TodoStatusSchema: z__default.ZodEnum<{
|
|
@@ -4125,4 +4283,4 @@ declare const TodoListSchema: z__default.ZodArray<z__default.ZodObject<{
|
|
|
4125
4283
|
}, z__default.core.$strip>>;
|
|
4126
4284
|
type TodoList = z__default.infer<typeof TodoListSchema>;
|
|
4127
4285
|
|
|
4128
|
-
export { type ACPAgentRuntimeConfig, ACPAgentRuntimeConfigSchema, type ACPChannelType, ACPChannelTypeSchema, type ACPClientConfig, ACPClientConfigSchema, type ACPClientRegisterConfig, ACPClientRegisterConfigSchema, type ACPClientsConfig, ACPClientsConfigSchema, type ACPConnectionConfig, ACPConnectionConfigSchema, type ACPHttpConnectionConfig, ACPHttpConnectionConfigSchema, type ACPInfoACPClientsConfig, ACPInfoACPClientsConfigSchema, type ACPInfoACPConfig, ACPInfoACPConfigSchema, type ACPInfoACPServerConfig, ACPInfoACPServerConfigSchema, type ACPModelConfig, ACPModelConfigSchema, type ACPServerConfig, ACPServerConfigSchema, type ACPStdioConnectionConfig, ACPStdioConnectionConfigSchema, type ACPWebSocketConnectionConfig, ACPWebSocketConnectionConfigSchema, ACP_DEFAULT_CLIENT_CONFIG, ACP_DEFAULT_SERVER_CONFIG, type AgentCallback, type AgentCapability, AgentCapabilitySchema, type AgentInfo, AgentInfoSchema, type AgentInput, type AgentMessage, type AgentMode, AgentModeSchema, type AgentModel, AgentModelSchema, AgentPermissionSchema as AgentPermission, AgentPermissionSchema, type AgentPermissionType, type AgentProcessingConfig, AgentProcessingConfigSchema, type AgentPromptPart, type AgentRegistryConfig, AgentRegistryConfigSchema, type AgentResult, type AgentResultMetadata, type AgentSyncConfig, AgentSyncConfigSchema, type AgentToolCall, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthConfig, AuthConfigSchema, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type BooleanQuery, BooleanQuerySchema, Brand, Brand as BrandType, type ChannelConfig, ChannelConfigSchema, ChannelType, type CircuitBreakerConfig, CircuitBreakerConfigSchema, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, type CodebaseStatus, type CommandArguments, CommandArgumentsSchema, type CommandConfigInfo, CommandConfigInfoSchema, type CommandDefinition, type CommandExecuteFn, type CommandExecuteResult, type CommandExecuteResultMetadata, CommandExecuteResultMetadataSchema, CommandExecuteResultSchema, type CommandExecutionContext, CommandExecutionContextSchema, type CommandInfo, CommandInfoSchema, type CommandInitContext, CommandInitContextSchema, type CommandInitFn, type CommandInitResult, CommandInitResultSchema, type CommandIsEnabledFn, type CommandMetadata, CommandMetadataSchema, type CommandPromptPart, CommandPromptPartSchema, type CommandSource, CommandSourceSchema, type ConnectionPoolConfig, ConnectionPoolConfigSchema, type ContextMode, ContextModeEnum, ContextModeSchema, ContextModeValues, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, DefaultContextMode, DefaultScope, type DefaultsConfig, DefaultsConfigSchema, type DingTalkChannelConfig, DingTalkChannelConfigSchema, EMBEDDING_DIMS_CONSISTENCY_CHECK, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type EmbeddingModelRef, type ErrorDetails, type ErrorInfo, type ErrorMessageMode, type ErrorResponse, type FeishuChannelConfig, FeishuChannelConfigSchema, type FileContent, FileContentSchema, type FileDiff, FileDiffSchema, type FileInfo, FileInfoSchema, type FileNode, FileNodeSchema, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayAgentDeregisterMessage, type GatewayAgentHealthStatus, type GatewayAgentHeartbeat, type GatewayAgentHeartbeatSyncMessage, type GatewayAgentListRequestMessage, type GatewayAgentListResponseMessage, type GatewayAgentRegisterMessage, type GatewayAgentRegistration, type GatewayAgentRegistrationRequest, type GatewayAgentRegistryStats, type GatewayAgentSelectionOptions, type GatewayAgentSelectionRecord, type GatewayAgentSelectionStrategy, type GatewayAgentStatusChangeMessage, type GatewayAgentSyncConflictResolutionStrategy, type GatewayAgentSyncInfo, type GatewayAgentSyncMessage, type GatewayAgentSyncMode, type GatewayAgentSyncPushEventType, type GatewayAgentSyncState, type GatewayAgentSyncStats, type GatewayChannelInfo, type GatewayChannelListResponse, type GatewayChannelPluginInfo, type GatewayChannelType, GatewayChannelTypeSchema, type GatewayClientConfig, GatewayClientConfigSchema, type GatewayClusterConfig, GatewayClusterConfigSchema, type GatewayConfig, GatewayConfigSchema, type GatewayMessage, type GatewayMessageContext, type GatewayMessageDeliveredInput, type GatewayMessageMetadata, type GatewayMessagePriority, GatewayMessagePrioritySchema, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayMessageStorage, type GatewayMessageType, type GatewayNodeConfig, GatewayNodeConfigSchema, type GatewayNodeInfo, type GatewayPlatformType, type GatewayServerConfig, GatewayServerConfigSchema, type GatewaySubscriberType, type GlobalSessionInfo, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, type HTTPSConfig, HTTPSConfigSchema, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IInstance, type ISubAgentRunner, type ITool, type IdPrefixName, type IndexerConfig, KNOWLEDGE_DOCTOR_PUBLIC_CHECKS, type KnowledgeBackend, type KnowledgeDoctorCheck, type KnowledgeDoctorPublicCheck, type KnowledgeDoctorResult, type KnowledgeIndexState, type KnowledgeIssue, type KnowledgeLlmCapabilities, type KnowledgeLlmStatus, type KnowledgeSearchOptions, type KnowledgeSearchSource, type KnowledgeSeverity, type KnowledgeStatus, type Language, type LanguageModelRef, type LlmConfig, type Mcp, type McpLocalConfig, McpLocalConfigSchema, type McpOAuthConfig, McpOAuthConfigSchema, type McpRemoteConfig, McpRemoteConfigSchema, McpSchema, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MemoryStatus, type MessageQueueConfig, MessageQueueConfigSchema, type ModelIdentifier, type ModelRef, type NostrChannelConfig, NostrChannelConfigSchema, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type NoteStatus, type OAuth2AuthConfig, OAuth2AuthConfigSchema, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, Permission, PermissionActionSchema as PermissionAction, PermissionActionSchema, type PermissionActionType, PermissionConfigSchema as PermissionConfig, PermissionConfigSchema, type PermissionConfigType, PermissionObjectSchema as PermissionObject, PermissionObjectSchema, type PermissionObjectType, PermissionRuleSchema as PermissionRule, PermissionRuleSchema, type PermissionRuleType, PermissionRulesetSchema as PermissionRuleset, PermissionRulesetSchema, type PermissionRulesetType, PermissionRuntimeRuleSchema as PermissionRuntimeRule, PermissionRuntimeRuleSchema, type PermissionRuntimeRuleType, Permission as PermissionType, type ProjectCommands, ProjectCommandsSchema, type ProjectIcon, ProjectIconSchema, type ProjectInfo, ProjectInfoSchema, type ProjectTime, ProjectTimeSchema, Protocol, type ProtocolConfig, type ProtocolMetadata, type PtyCreateInput, PtyCreateInputSchema, type PtyInfo, PtyInfoSchema, type PtyUpdateInput, PtyUpdateInputSchema, type QuestionAnswer, QuestionAnswerSchema, type QuestionInfo, QuestionInfoSchema, type QuestionOption, QuestionOptionSchema, type QuestionParam, QuestionParamSchema, type QuestionReply, QuestionReplySchema, type QuestionReplySource, QuestionReplySourceSchema, type QuestionRequest, type QuestionRequestList, QuestionRequestListSchema, QuestionRequestSchema, type Range, RangeSchema, type RequestOptions, type RerankLlmConfig, type RerankingModelRef, type RetryRequest, type RunMode, type SchedulerInitialized, SchedulerInitializedSchema, type SchedulerStatus, SchedulerStatusSchema, type SchedulerTask, type SchedulerTaskList, SchedulerTaskListSchema, SchedulerTaskSchema, type Scope, ScopeEnum, ScopeValues, type SearchConfig, type SessionConfig, SessionConfigSchema, type SessionInfo, type SessionShareInfo, Session as SessionTypes, type ShellExpression, type ShellFunction, type SignalChannelConfig, SignalChannelConfigSchema, type SlackChannelConfig, SlackChannelConfigSchema, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentExecuteOptions, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type TelegramChannelConfig, TelegramChannelConfigSchema, type Todo, type TodoList, TodoListSchema, type TodoPriority, TodoPrioritySchema, TodoSchema, type TodoStatus, TodoStatusSchema, type TokenAuthConfig, TokenAuthConfigSchema, type TokenAuthItem, TokenAuthItemSchema, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type Usage, type UsageCache, UsageCacheSchema, UsageSchema, type WeChatChannelConfig, WeChatChannelConfigSchema, type WebChatChannelConfig, WebChatChannelConfigSchema, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, type WeixinChannelConfig, WeixinChannelConfigSchema, brandEnv, buildToolArgs, createTool, idPrefixes, idSchema, toolSchema };
|
|
4286
|
+
export { type ACPAgentRuntimeConfig, ACPAgentRuntimeConfigSchema, type ACPChannelType, ACPChannelTypeSchema, type ACPClientConfig, ACPClientConfigSchema, type ACPClientRegisterConfig, ACPClientRegisterConfigSchema, type ACPClientsConfig, ACPClientsConfigSchema, type ACPConnectionConfig, ACPConnectionConfigSchema, type ACPHttpConnectionConfig, ACPHttpConnectionConfigSchema, type ACPInfoACPClientsConfig, ACPInfoACPClientsConfigSchema, type ACPInfoACPConfig, ACPInfoACPConfigSchema, type ACPInfoACPServerConfig, ACPInfoACPServerConfigSchema, type ACPModelConfig, ACPModelConfigSchema, type ACPServerConfig, ACPServerConfigSchema, type ACPStdioConnectionConfig, ACPStdioConnectionConfigSchema, type ACPWebSocketConnectionConfig, ACPWebSocketConnectionConfigSchema, ACP_DEFAULT_CLIENT_CONFIG, ACP_DEFAULT_SERVER_CONFIG, type AgentCallback, type AgentCapability, AgentCapabilitySchema, type AgentInfo, AgentInfoSchema, type AgentInput, type AgentMessage, type AgentMode, AgentModeSchema, type AgentModel, AgentModelSchema, AgentPermissionSchema as AgentPermission, AgentPermissionSchema, type AgentPermissionType, type AgentProcessingConfig, AgentProcessingConfigSchema, type AgentPromptPart, type AgentRegistryConfig, AgentRegistryConfigSchema, type AgentResult, type AgentResultMetadata, type AgentSyncConfig, AgentSyncConfigSchema, type AgentToolCall, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthConfig, AuthConfigSchema, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type BooleanQuery, BooleanQuerySchema, Brand, Brand as BrandType, type ChannelConfig, ChannelConfigSchema, ChannelType, type CircuitBreakerConfig, CircuitBreakerConfigSchema, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, type CodebaseStatus, type CommandArguments, CommandArgumentsSchema, type CommandConfigInfo, CommandConfigInfoSchema, type CommandDefinition, type CommandExecuteFn, type CommandExecuteResult, type CommandExecuteResultMetadata, CommandExecuteResultMetadataSchema, CommandExecuteResultSchema, type CommandExecutionContext, CommandExecutionContextSchema, type CommandInfo, CommandInfoSchema, type CommandInitContext, CommandInitContextSchema, type CommandInitFn, type CommandInitResult, CommandInitResultSchema, type CommandIsEnabledFn, type CommandMetadata, CommandMetadataSchema, type CommandPromptPart, CommandPromptPartSchema, type CommandSource, CommandSourceSchema, type ConnectionPoolConfig, ConnectionPoolConfigSchema, type ContextMode, ContextModeEnum, ContextModeSchema, ContextModeValues, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, DefaultContextMode, DefaultScope, type DefaultsConfig, DefaultsConfigSchema, type DingTalkChannelConfig, DingTalkChannelConfigSchema, EMBEDDING_DIMS_CONSISTENCY_CHECK, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type EmbeddingModelRef, type ErrorDetails, type ErrorInfo, type ErrorMessageMode, type ErrorResponse, type FeishuChannelConfig, FeishuChannelConfigSchema, type FileContent, FileContentSchema, type FileDiff, FileDiffSchema, type FileInfo, FileInfoSchema, type FileNode, FileNodeSchema, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayAgentDeregisterMessage, type GatewayAgentHealthStatus, type GatewayAgentHeartbeat, type GatewayAgentHeartbeatSyncMessage, type GatewayAgentListRequestMessage, type GatewayAgentListResponseMessage, type GatewayAgentRegisterMessage, type GatewayAgentRegistration, type GatewayAgentRegistrationRequest, type GatewayAgentRegistryStats, type GatewayAgentSelectionOptions, type GatewayAgentSelectionRecord, type GatewayAgentSelectionStrategy, type GatewayAgentStatusChangeMessage, type GatewayAgentSyncConflictResolutionStrategy, type GatewayAgentSyncInfo, type GatewayAgentSyncMessage, type GatewayAgentSyncMode, type GatewayAgentSyncPushEventType, type GatewayAgentSyncState, type GatewayAgentSyncStats, type GatewayChannelInfo, type GatewayChannelListResponse, type GatewayChannelPluginInfo, type GatewayChannelType, GatewayChannelTypeSchema, type GatewayClientConfig, GatewayClientConfigSchema, type GatewayClusterConfig, GatewayClusterConfigSchema, type GatewayConfig, GatewayConfigSchema, type GatewayMessage, type GatewayMessageContext, type GatewayMessageDeliveredInput, type GatewayMessageMetadata, type GatewayMessagePriority, GatewayMessagePrioritySchema, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayMessageStorage, type GatewayMessageType, type GatewayNodeConfig, GatewayNodeConfigSchema, type GatewayNodeInfo, type GatewayPlatformType, type GatewayServerConfig, GatewayServerConfigSchema, type GatewaySubscriberType, type GlobalSessionInfo, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, type HTTPSConfig, HTTPSConfigSchema, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IInstance, type ISubAgentRunner, type ITool, type IdPrefixName, type IndexerConfig, KNOWLEDGE_DOCTOR_PUBLIC_CHECKS, type KnowledgeBackend, type KnowledgeDoctorCheck, type KnowledgeDoctorPublicCheck, type KnowledgeDoctorResult, type KnowledgeIndexState, type KnowledgeIssue, type KnowledgeLlmCapabilities, type KnowledgeLlmStatus, type KnowledgeSearchOptions, type KnowledgeSearchSource, type KnowledgeSeverity, type KnowledgeStatus, type Language, type LanguageModelRef, type LlmConfig, type Mcp, type McpLocalConfig, McpLocalConfigSchema, type McpOAuthConfig, McpOAuthConfigSchema, type McpRemoteConfig, McpRemoteConfigSchema, McpSchema, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MemoryStatus, type MessageQueueConfig, MessageQueueConfigSchema, type ModelIdentifier, type ModelRef, type MonitorCheckState, MonitorCheckStateSchema, type MonitorHealth, type MonitorHealthCheck, type MonitorHealthCheckInfo, type MonitorHealthCheckInfoList, MonitorHealthCheckInfoListSchema, MonitorHealthCheckInfoSchema, type MonitorHealthCheckInput, MonitorHealthCheckInputSchema, MonitorHealthCheckSchema, MonitorHealthSchema, type MonitorHealthState, MonitorHealthStateSchema, type MonitorMetric, type MonitorMetricInput, MonitorMetricInputSchema, type MonitorMetricList, MonitorMetricListSchema, MonitorMetricSchema, type MonitorMetricType, MonitorMetricTypeSchema, type MonitorMetricValue, MonitorMetricValueSchema, type MonitorStatus, MonitorStatusSchema, type NostrChannelConfig, NostrChannelConfigSchema, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type NoteStatus, type OAuth2AuthConfig, OAuth2AuthConfigSchema, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, Permission, PermissionActionSchema as PermissionAction, PermissionActionSchema, type PermissionActionType, PermissionConfigSchema as PermissionConfig, PermissionConfigSchema, type PermissionConfigType, PermissionObjectSchema as PermissionObject, PermissionObjectSchema, type PermissionObjectType, PermissionRuleSchema as PermissionRule, PermissionRuleSchema, type PermissionRuleType, PermissionRulesetSchema as PermissionRuleset, PermissionRulesetSchema, type PermissionRulesetType, PermissionRuntimeRuleSchema as PermissionRuntimeRule, PermissionRuntimeRuleSchema, type PermissionRuntimeRuleType, Permission as PermissionType, type ProjectCommands, ProjectCommandsSchema, type ProjectIcon, ProjectIconSchema, type ProjectInfo, ProjectInfoSchema, type ProjectTime, ProjectTimeSchema, Protocol, type ProtocolConfig, type ProtocolMetadata, type PtyCreateInput, PtyCreateInputSchema, type PtyInfo, PtyInfoSchema, type PtyUpdateInput, PtyUpdateInputSchema, type QuestionAnswer, QuestionAnswerSchema, type QuestionInfo, QuestionInfoSchema, type QuestionOption, QuestionOptionSchema, type QuestionParam, QuestionParamSchema, type QuestionReply, QuestionReplySchema, type QuestionReplySource, QuestionReplySourceSchema, type QuestionRequest, type QuestionRequestList, QuestionRequestListSchema, QuestionRequestSchema, type Range, RangeSchema, type RequestOptions, type RerankLlmConfig, type RerankingModelRef, type RetryRequest, type RunMode, type SchedulerInitialized, SchedulerInitializedSchema, type SchedulerStatus, SchedulerStatusSchema, type SchedulerTask, type SchedulerTaskList, SchedulerTaskListSchema, SchedulerTaskSchema, type Scope, ScopeEnum, ScopeValues, type SearchConfig, type SessionConfig, SessionConfigSchema, type SessionInfo, type SessionShareInfo, Session as SessionTypes, type ShellExpression, type ShellFunction, type SignalChannelConfig, SignalChannelConfigSchema, type SlackChannelConfig, SlackChannelConfigSchema, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentExecuteOptions, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type TelegramChannelConfig, TelegramChannelConfigSchema, type Todo, type TodoList, TodoListSchema, type TodoPriority, TodoPrioritySchema, TodoSchema, type TodoStatus, TodoStatusSchema, type TokenAuthConfig, TokenAuthConfigSchema, type TokenAuthItem, TokenAuthItemSchema, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type Usage, type UsageCache, UsageCacheSchema, UsageSchema, type WeChatChannelConfig, WeChatChannelConfigSchema, type WebChatChannelConfig, WebChatChannelConfigSchema, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, type WeixinChannelConfig, WeixinChannelConfigSchema, brandEnv, buildToolArgs, createTool, idPrefixes, idSchema, toolSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -644,7 +644,7 @@ declare const PermissionConfigSchema: z__default.ZodPipe<z__default.ZodPreproces
|
|
|
644
644
|
ask: "ask";
|
|
645
645
|
allow: "allow";
|
|
646
646
|
deny: "deny";
|
|
647
|
-
}>]
|
|
647
|
+
}>]>, unknown>, z__default.ZodTransform<Record<string, "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">>, "ask" | "allow" | "deny" | {
|
|
648
648
|
[x: string]: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">;
|
|
649
649
|
__originalKeys?: string[] | undefined;
|
|
650
650
|
read?: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny"> | undefined;
|
|
@@ -1306,7 +1306,7 @@ declare const Permission: {
|
|
|
1306
1306
|
ask: "ask";
|
|
1307
1307
|
allow: "allow";
|
|
1308
1308
|
deny: "deny";
|
|
1309
|
-
}>]
|
|
1309
|
+
}>]>, unknown>, z__default.ZodTransform<Record<string, "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">>, "ask" | "allow" | "deny" | {
|
|
1310
1310
|
[x: string]: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny">;
|
|
1311
1311
|
__originalKeys?: string[] | undefined;
|
|
1312
1312
|
read?: "ask" | "allow" | "deny" | Record<string, "ask" | "allow" | "deny"> | undefined;
|
|
@@ -2565,10 +2565,18 @@ declare const SessionInfoSchema: z__default.ZodObject<{
|
|
|
2565
2565
|
}>;
|
|
2566
2566
|
}, z__default.core.$strip>>>;
|
|
2567
2567
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2568
|
-
messageId: z__default.ZodString
|
|
2568
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2569
2569
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2570
2570
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2571
2571
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2572
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2573
|
+
file: "file";
|
|
2574
|
+
message: "message";
|
|
2575
|
+
session: "session";
|
|
2576
|
+
part: "part";
|
|
2577
|
+
hunk: "hunk";
|
|
2578
|
+
}>>;
|
|
2579
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2572
2580
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2573
2581
|
original: z__default.ZodString;
|
|
2574
2582
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2631,10 +2639,18 @@ declare const GlobalSessionInfoSchema: z__default.ZodObject<{
|
|
|
2631
2639
|
}>;
|
|
2632
2640
|
}, z__default.core.$strip>>>;
|
|
2633
2641
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2634
|
-
messageId: z__default.ZodString
|
|
2642
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2635
2643
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2636
2644
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2637
2645
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2646
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2647
|
+
file: "file";
|
|
2648
|
+
message: "message";
|
|
2649
|
+
session: "session";
|
|
2650
|
+
part: "part";
|
|
2651
|
+
hunk: "hunk";
|
|
2652
|
+
}>>;
|
|
2653
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2638
2654
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2639
2655
|
original: z__default.ZodString;
|
|
2640
2656
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2724,10 +2740,18 @@ declare const Session: {
|
|
|
2724
2740
|
}>;
|
|
2725
2741
|
}, z__default.core.$strip>>>;
|
|
2726
2742
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2727
|
-
messageId: z__default.ZodString
|
|
2743
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2728
2744
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2729
2745
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2730
2746
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2747
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2748
|
+
file: "file";
|
|
2749
|
+
message: "message";
|
|
2750
|
+
session: "session";
|
|
2751
|
+
part: "part";
|
|
2752
|
+
hunk: "hunk";
|
|
2753
|
+
}>>;
|
|
2754
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2731
2755
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2732
2756
|
original: z__default.ZodString;
|
|
2733
2757
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2789,10 +2813,18 @@ declare const Session: {
|
|
|
2789
2813
|
}>;
|
|
2790
2814
|
}, z__default.core.$strip>>>;
|
|
2791
2815
|
revert: z__default.ZodOptional<z__default.ZodObject<{
|
|
2792
|
-
messageId: z__default.ZodString
|
|
2816
|
+
messageId: z__default.ZodOptional<z__default.ZodString>;
|
|
2793
2817
|
partId: z__default.ZodOptional<z__default.ZodString>;
|
|
2794
2818
|
snapshot: z__default.ZodOptional<z__default.ZodString>;
|
|
2795
2819
|
diff: z__default.ZodOptional<z__default.ZodString>;
|
|
2820
|
+
scope: z__default.ZodOptional<z__default.ZodEnum<{
|
|
2821
|
+
file: "file";
|
|
2822
|
+
message: "message";
|
|
2823
|
+
session: "session";
|
|
2824
|
+
part: "part";
|
|
2825
|
+
hunk: "hunk";
|
|
2826
|
+
}>>;
|
|
2827
|
+
files: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
2796
2828
|
backups: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
2797
2829
|
original: z__default.ZodString;
|
|
2798
2830
|
backup: z__default.ZodOptional<z__default.ZodString>;
|
|
@@ -2944,7 +2976,7 @@ type ToolFunction = {
|
|
|
2944
2976
|
interface ToolDefinition {
|
|
2945
2977
|
description: string;
|
|
2946
2978
|
args: Record<string, z$1.ZodTypeAny>;
|
|
2947
|
-
execute
|
|
2979
|
+
execute(args: Record<string, unknown>, context: ToolContext): Promise<string>;
|
|
2948
2980
|
}
|
|
2949
2981
|
declare function createTool<Args extends Record<string, z$1.ZodTypeAny>>(input: {
|
|
2950
2982
|
description: string;
|
|
@@ -4047,6 +4079,132 @@ declare const QuestionReplySourceSchema: z__default.ZodEnum<{
|
|
|
4047
4079
|
}>;
|
|
4048
4080
|
type QuestionReplySource = z__default.infer<typeof QuestionReplySourceSchema>;
|
|
4049
4081
|
|
|
4082
|
+
declare const MonitorMetricTypeSchema: z__default.ZodEnum<{
|
|
4083
|
+
summary: "summary";
|
|
4084
|
+
counter: "counter";
|
|
4085
|
+
gauge: "gauge";
|
|
4086
|
+
histogram: "histogram";
|
|
4087
|
+
}>;
|
|
4088
|
+
type MonitorMetricType = z__default.infer<typeof MonitorMetricTypeSchema>;
|
|
4089
|
+
declare const MonitorHealthStateSchema: z__default.ZodEnum<{
|
|
4090
|
+
healthy: "healthy";
|
|
4091
|
+
unhealthy: "unhealthy";
|
|
4092
|
+
degraded: "degraded";
|
|
4093
|
+
}>;
|
|
4094
|
+
type MonitorHealthState = z__default.infer<typeof MonitorHealthStateSchema>;
|
|
4095
|
+
declare const MonitorCheckStateSchema: z__default.ZodEnum<{
|
|
4096
|
+
warn: "warn";
|
|
4097
|
+
pass: "pass";
|
|
4098
|
+
fail: "fail";
|
|
4099
|
+
}>;
|
|
4100
|
+
type MonitorCheckState = z__default.infer<typeof MonitorCheckStateSchema>;
|
|
4101
|
+
declare const MonitorMetricValueSchema: z__default.ZodObject<{
|
|
4102
|
+
value: z__default.ZodNumber;
|
|
4103
|
+
labels: z__default.ZodRecord<z__default.ZodString, z__default.ZodString>;
|
|
4104
|
+
}, z__default.core.$strip>;
|
|
4105
|
+
type MonitorMetricValue = z__default.infer<typeof MonitorMetricValueSchema>;
|
|
4106
|
+
declare const MonitorMetricSchema: z__default.ZodObject<{
|
|
4107
|
+
name: z__default.ZodString;
|
|
4108
|
+
type: z__default.ZodEnum<{
|
|
4109
|
+
summary: "summary";
|
|
4110
|
+
counter: "counter";
|
|
4111
|
+
gauge: "gauge";
|
|
4112
|
+
histogram: "histogram";
|
|
4113
|
+
}>;
|
|
4114
|
+
help: z__default.ZodString;
|
|
4115
|
+
values: z__default.ZodArray<z__default.ZodObject<{
|
|
4116
|
+
value: z__default.ZodNumber;
|
|
4117
|
+
labels: z__default.ZodRecord<z__default.ZodString, z__default.ZodString>;
|
|
4118
|
+
}, z__default.core.$strip>>;
|
|
4119
|
+
}, z__default.core.$strip>;
|
|
4120
|
+
type MonitorMetric = z__default.infer<typeof MonitorMetricSchema>;
|
|
4121
|
+
declare const MonitorMetricListSchema: z__default.ZodArray<z__default.ZodObject<{
|
|
4122
|
+
name: z__default.ZodString;
|
|
4123
|
+
type: z__default.ZodEnum<{
|
|
4124
|
+
summary: "summary";
|
|
4125
|
+
counter: "counter";
|
|
4126
|
+
gauge: "gauge";
|
|
4127
|
+
histogram: "histogram";
|
|
4128
|
+
}>;
|
|
4129
|
+
help: z__default.ZodString;
|
|
4130
|
+
values: z__default.ZodArray<z__default.ZodObject<{
|
|
4131
|
+
value: z__default.ZodNumber;
|
|
4132
|
+
labels: z__default.ZodRecord<z__default.ZodString, z__default.ZodString>;
|
|
4133
|
+
}, z__default.core.$strip>>;
|
|
4134
|
+
}, z__default.core.$strip>>;
|
|
4135
|
+
type MonitorMetricList = z__default.infer<typeof MonitorMetricListSchema>;
|
|
4136
|
+
declare const MonitorHealthCheckSchema: z__default.ZodObject<{
|
|
4137
|
+
name: z__default.ZodString;
|
|
4138
|
+
state: z__default.ZodEnum<{
|
|
4139
|
+
warn: "warn";
|
|
4140
|
+
pass: "pass";
|
|
4141
|
+
fail: "fail";
|
|
4142
|
+
}>;
|
|
4143
|
+
durationMs: z__default.ZodNumber;
|
|
4144
|
+
message: z__default.ZodString;
|
|
4145
|
+
checkedAt: z__default.ZodNumber;
|
|
4146
|
+
}, z__default.core.$strip>;
|
|
4147
|
+
type MonitorHealthCheck = z__default.infer<typeof MonitorHealthCheckSchema>;
|
|
4148
|
+
declare const MonitorHealthCheckInfoSchema: z__default.ZodObject<{
|
|
4149
|
+
name: z__default.ZodString;
|
|
4150
|
+
description: z__default.ZodString;
|
|
4151
|
+
timeoutMs: z__default.ZodNumber;
|
|
4152
|
+
}, z__default.core.$strip>;
|
|
4153
|
+
type MonitorHealthCheckInfo = z__default.infer<typeof MonitorHealthCheckInfoSchema>;
|
|
4154
|
+
declare const MonitorHealthCheckInfoListSchema: z__default.ZodArray<z__default.ZodObject<{
|
|
4155
|
+
name: z__default.ZodString;
|
|
4156
|
+
description: z__default.ZodString;
|
|
4157
|
+
timeoutMs: z__default.ZodNumber;
|
|
4158
|
+
}, z__default.core.$strip>>;
|
|
4159
|
+
type MonitorHealthCheckInfoList = z__default.infer<typeof MonitorHealthCheckInfoListSchema>;
|
|
4160
|
+
declare const MonitorHealthSchema: z__default.ZodObject<{
|
|
4161
|
+
state: z__default.ZodEnum<{
|
|
4162
|
+
healthy: "healthy";
|
|
4163
|
+
unhealthy: "unhealthy";
|
|
4164
|
+
degraded: "degraded";
|
|
4165
|
+
}>;
|
|
4166
|
+
checks: z__default.ZodArray<z__default.ZodObject<{
|
|
4167
|
+
name: z__default.ZodString;
|
|
4168
|
+
state: z__default.ZodEnum<{
|
|
4169
|
+
warn: "warn";
|
|
4170
|
+
pass: "pass";
|
|
4171
|
+
fail: "fail";
|
|
4172
|
+
}>;
|
|
4173
|
+
durationMs: z__default.ZodNumber;
|
|
4174
|
+
message: z__default.ZodString;
|
|
4175
|
+
checkedAt: z__default.ZodNumber;
|
|
4176
|
+
}, z__default.core.$strip>>;
|
|
4177
|
+
timestamp: z__default.ZodNumber;
|
|
4178
|
+
}, z__default.core.$strip>;
|
|
4179
|
+
type MonitorHealth = z__default.infer<typeof MonitorHealthSchema>;
|
|
4180
|
+
declare const MonitorMetricInputSchema: z__default.ZodObject<{
|
|
4181
|
+
name: z__default.ZodString;
|
|
4182
|
+
type: z__default.ZodOptional<z__default.ZodEnum<{
|
|
4183
|
+
summary: "summary";
|
|
4184
|
+
counter: "counter";
|
|
4185
|
+
gauge: "gauge";
|
|
4186
|
+
histogram: "histogram";
|
|
4187
|
+
}>>;
|
|
4188
|
+
help: z__default.ZodOptional<z__default.ZodString>;
|
|
4189
|
+
labelNames: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
4190
|
+
labels: z__default.ZodOptional<z__default.ZodRecord<z__default.ZodString, z__default.ZodString>>;
|
|
4191
|
+
value: z__default.ZodOptional<z__default.ZodNumber>;
|
|
4192
|
+
}, z__default.core.$strip>;
|
|
4193
|
+
type MonitorMetricInput = z__default.infer<typeof MonitorMetricInputSchema>;
|
|
4194
|
+
declare const MonitorHealthCheckInputSchema: z__default.ZodObject<{
|
|
4195
|
+
name: z__default.ZodString;
|
|
4196
|
+
description: z__default.ZodOptional<z__default.ZodString>;
|
|
4197
|
+
timeoutMs: z__default.ZodOptional<z__default.ZodNumber>;
|
|
4198
|
+
}, z__default.core.$strip>;
|
|
4199
|
+
type MonitorHealthCheckInput = z__default.infer<typeof MonitorHealthCheckInputSchema>;
|
|
4200
|
+
declare const MonitorStatusSchema: z__default.ZodObject<{
|
|
4201
|
+
uptimeMs: z__default.ZodNumber;
|
|
4202
|
+
metricCount: z__default.ZodNumber;
|
|
4203
|
+
checkCount: z__default.ZodNumber;
|
|
4204
|
+
timestamp: z__default.ZodNumber;
|
|
4205
|
+
}, z__default.core.$strip>;
|
|
4206
|
+
type MonitorStatus = z__default.infer<typeof MonitorStatusSchema>;
|
|
4207
|
+
|
|
4050
4208
|
declare const idPrefixes: {
|
|
4051
4209
|
readonly event: "evt";
|
|
4052
4210
|
readonly session: "ses";
|
|
@@ -4076,7 +4234,7 @@ declare const idPrefixes: {
|
|
|
4076
4234
|
type IdPrefixName = keyof typeof idPrefixes;
|
|
4077
4235
|
declare function idSchema(name: IdPrefixName): z__default.ZodString;
|
|
4078
4236
|
|
|
4079
|
-
declare const BooleanQuerySchema: z$1.ZodPreprocess<z$1.ZodBoolean>;
|
|
4237
|
+
declare const BooleanQuerySchema: z$1.ZodPreprocess<z$1.ZodBoolean, unknown>;
|
|
4080
4238
|
type BooleanQuery = z$1.output<typeof BooleanQuerySchema>;
|
|
4081
4239
|
|
|
4082
4240
|
declare const TodoStatusSchema: z__default.ZodEnum<{
|
|
@@ -4125,4 +4283,4 @@ declare const TodoListSchema: z__default.ZodArray<z__default.ZodObject<{
|
|
|
4125
4283
|
}, z__default.core.$strip>>;
|
|
4126
4284
|
type TodoList = z__default.infer<typeof TodoListSchema>;
|
|
4127
4285
|
|
|
4128
|
-
export { type ACPAgentRuntimeConfig, ACPAgentRuntimeConfigSchema, type ACPChannelType, ACPChannelTypeSchema, type ACPClientConfig, ACPClientConfigSchema, type ACPClientRegisterConfig, ACPClientRegisterConfigSchema, type ACPClientsConfig, ACPClientsConfigSchema, type ACPConnectionConfig, ACPConnectionConfigSchema, type ACPHttpConnectionConfig, ACPHttpConnectionConfigSchema, type ACPInfoACPClientsConfig, ACPInfoACPClientsConfigSchema, type ACPInfoACPConfig, ACPInfoACPConfigSchema, type ACPInfoACPServerConfig, ACPInfoACPServerConfigSchema, type ACPModelConfig, ACPModelConfigSchema, type ACPServerConfig, ACPServerConfigSchema, type ACPStdioConnectionConfig, ACPStdioConnectionConfigSchema, type ACPWebSocketConnectionConfig, ACPWebSocketConnectionConfigSchema, ACP_DEFAULT_CLIENT_CONFIG, ACP_DEFAULT_SERVER_CONFIG, type AgentCallback, type AgentCapability, AgentCapabilitySchema, type AgentInfo, AgentInfoSchema, type AgentInput, type AgentMessage, type AgentMode, AgentModeSchema, type AgentModel, AgentModelSchema, AgentPermissionSchema as AgentPermission, AgentPermissionSchema, type AgentPermissionType, type AgentProcessingConfig, AgentProcessingConfigSchema, type AgentPromptPart, type AgentRegistryConfig, AgentRegistryConfigSchema, type AgentResult, type AgentResultMetadata, type AgentSyncConfig, AgentSyncConfigSchema, type AgentToolCall, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthConfig, AuthConfigSchema, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type BooleanQuery, BooleanQuerySchema, Brand, Brand as BrandType, type ChannelConfig, ChannelConfigSchema, ChannelType, type CircuitBreakerConfig, CircuitBreakerConfigSchema, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, type CodebaseStatus, type CommandArguments, CommandArgumentsSchema, type CommandConfigInfo, CommandConfigInfoSchema, type CommandDefinition, type CommandExecuteFn, type CommandExecuteResult, type CommandExecuteResultMetadata, CommandExecuteResultMetadataSchema, CommandExecuteResultSchema, type CommandExecutionContext, CommandExecutionContextSchema, type CommandInfo, CommandInfoSchema, type CommandInitContext, CommandInitContextSchema, type CommandInitFn, type CommandInitResult, CommandInitResultSchema, type CommandIsEnabledFn, type CommandMetadata, CommandMetadataSchema, type CommandPromptPart, CommandPromptPartSchema, type CommandSource, CommandSourceSchema, type ConnectionPoolConfig, ConnectionPoolConfigSchema, type ContextMode, ContextModeEnum, ContextModeSchema, ContextModeValues, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, DefaultContextMode, DefaultScope, type DefaultsConfig, DefaultsConfigSchema, type DingTalkChannelConfig, DingTalkChannelConfigSchema, EMBEDDING_DIMS_CONSISTENCY_CHECK, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type EmbeddingModelRef, type ErrorDetails, type ErrorInfo, type ErrorMessageMode, type ErrorResponse, type FeishuChannelConfig, FeishuChannelConfigSchema, type FileContent, FileContentSchema, type FileDiff, FileDiffSchema, type FileInfo, FileInfoSchema, type FileNode, FileNodeSchema, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayAgentDeregisterMessage, type GatewayAgentHealthStatus, type GatewayAgentHeartbeat, type GatewayAgentHeartbeatSyncMessage, type GatewayAgentListRequestMessage, type GatewayAgentListResponseMessage, type GatewayAgentRegisterMessage, type GatewayAgentRegistration, type GatewayAgentRegistrationRequest, type GatewayAgentRegistryStats, type GatewayAgentSelectionOptions, type GatewayAgentSelectionRecord, type GatewayAgentSelectionStrategy, type GatewayAgentStatusChangeMessage, type GatewayAgentSyncConflictResolutionStrategy, type GatewayAgentSyncInfo, type GatewayAgentSyncMessage, type GatewayAgentSyncMode, type GatewayAgentSyncPushEventType, type GatewayAgentSyncState, type GatewayAgentSyncStats, type GatewayChannelInfo, type GatewayChannelListResponse, type GatewayChannelPluginInfo, type GatewayChannelType, GatewayChannelTypeSchema, type GatewayClientConfig, GatewayClientConfigSchema, type GatewayClusterConfig, GatewayClusterConfigSchema, type GatewayConfig, GatewayConfigSchema, type GatewayMessage, type GatewayMessageContext, type GatewayMessageDeliveredInput, type GatewayMessageMetadata, type GatewayMessagePriority, GatewayMessagePrioritySchema, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayMessageStorage, type GatewayMessageType, type GatewayNodeConfig, GatewayNodeConfigSchema, type GatewayNodeInfo, type GatewayPlatformType, type GatewayServerConfig, GatewayServerConfigSchema, type GatewaySubscriberType, type GlobalSessionInfo, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, type HTTPSConfig, HTTPSConfigSchema, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IInstance, type ISubAgentRunner, type ITool, type IdPrefixName, type IndexerConfig, KNOWLEDGE_DOCTOR_PUBLIC_CHECKS, type KnowledgeBackend, type KnowledgeDoctorCheck, type KnowledgeDoctorPublicCheck, type KnowledgeDoctorResult, type KnowledgeIndexState, type KnowledgeIssue, type KnowledgeLlmCapabilities, type KnowledgeLlmStatus, type KnowledgeSearchOptions, type KnowledgeSearchSource, type KnowledgeSeverity, type KnowledgeStatus, type Language, type LanguageModelRef, type LlmConfig, type Mcp, type McpLocalConfig, McpLocalConfigSchema, type McpOAuthConfig, McpOAuthConfigSchema, type McpRemoteConfig, McpRemoteConfigSchema, McpSchema, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MemoryStatus, type MessageQueueConfig, MessageQueueConfigSchema, type ModelIdentifier, type ModelRef, type NostrChannelConfig, NostrChannelConfigSchema, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type NoteStatus, type OAuth2AuthConfig, OAuth2AuthConfigSchema, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, Permission, PermissionActionSchema as PermissionAction, PermissionActionSchema, type PermissionActionType, PermissionConfigSchema as PermissionConfig, PermissionConfigSchema, type PermissionConfigType, PermissionObjectSchema as PermissionObject, PermissionObjectSchema, type PermissionObjectType, PermissionRuleSchema as PermissionRule, PermissionRuleSchema, type PermissionRuleType, PermissionRulesetSchema as PermissionRuleset, PermissionRulesetSchema, type PermissionRulesetType, PermissionRuntimeRuleSchema as PermissionRuntimeRule, PermissionRuntimeRuleSchema, type PermissionRuntimeRuleType, Permission as PermissionType, type ProjectCommands, ProjectCommandsSchema, type ProjectIcon, ProjectIconSchema, type ProjectInfo, ProjectInfoSchema, type ProjectTime, ProjectTimeSchema, Protocol, type ProtocolConfig, type ProtocolMetadata, type PtyCreateInput, PtyCreateInputSchema, type PtyInfo, PtyInfoSchema, type PtyUpdateInput, PtyUpdateInputSchema, type QuestionAnswer, QuestionAnswerSchema, type QuestionInfo, QuestionInfoSchema, type QuestionOption, QuestionOptionSchema, type QuestionParam, QuestionParamSchema, type QuestionReply, QuestionReplySchema, type QuestionReplySource, QuestionReplySourceSchema, type QuestionRequest, type QuestionRequestList, QuestionRequestListSchema, QuestionRequestSchema, type Range, RangeSchema, type RequestOptions, type RerankLlmConfig, type RerankingModelRef, type RetryRequest, type RunMode, type SchedulerInitialized, SchedulerInitializedSchema, type SchedulerStatus, SchedulerStatusSchema, type SchedulerTask, type SchedulerTaskList, SchedulerTaskListSchema, SchedulerTaskSchema, type Scope, ScopeEnum, ScopeValues, type SearchConfig, type SessionConfig, SessionConfigSchema, type SessionInfo, type SessionShareInfo, Session as SessionTypes, type ShellExpression, type ShellFunction, type SignalChannelConfig, SignalChannelConfigSchema, type SlackChannelConfig, SlackChannelConfigSchema, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentExecuteOptions, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type TelegramChannelConfig, TelegramChannelConfigSchema, type Todo, type TodoList, TodoListSchema, type TodoPriority, TodoPrioritySchema, TodoSchema, type TodoStatus, TodoStatusSchema, type TokenAuthConfig, TokenAuthConfigSchema, type TokenAuthItem, TokenAuthItemSchema, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type Usage, type UsageCache, UsageCacheSchema, UsageSchema, type WeChatChannelConfig, WeChatChannelConfigSchema, type WebChatChannelConfig, WebChatChannelConfigSchema, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, type WeixinChannelConfig, WeixinChannelConfigSchema, brandEnv, buildToolArgs, createTool, idPrefixes, idSchema, toolSchema };
|
|
4286
|
+
export { type ACPAgentRuntimeConfig, ACPAgentRuntimeConfigSchema, type ACPChannelType, ACPChannelTypeSchema, type ACPClientConfig, ACPClientConfigSchema, type ACPClientRegisterConfig, ACPClientRegisterConfigSchema, type ACPClientsConfig, ACPClientsConfigSchema, type ACPConnectionConfig, ACPConnectionConfigSchema, type ACPHttpConnectionConfig, ACPHttpConnectionConfigSchema, type ACPInfoACPClientsConfig, ACPInfoACPClientsConfigSchema, type ACPInfoACPConfig, ACPInfoACPConfigSchema, type ACPInfoACPServerConfig, ACPInfoACPServerConfigSchema, type ACPModelConfig, ACPModelConfigSchema, type ACPServerConfig, ACPServerConfigSchema, type ACPStdioConnectionConfig, ACPStdioConnectionConfigSchema, type ACPWebSocketConnectionConfig, ACPWebSocketConnectionConfigSchema, ACP_DEFAULT_CLIENT_CONFIG, ACP_DEFAULT_SERVER_CONFIG, type AgentCallback, type AgentCapability, AgentCapabilitySchema, type AgentInfo, AgentInfoSchema, type AgentInput, type AgentMessage, type AgentMode, AgentModeSchema, type AgentModel, AgentModelSchema, AgentPermissionSchema as AgentPermission, AgentPermissionSchema, type AgentPermissionType, type AgentProcessingConfig, AgentProcessingConfigSchema, type AgentPromptPart, type AgentRegistryConfig, AgentRegistryConfigSchema, type AgentResult, type AgentResultMetadata, type AgentSyncConfig, AgentSyncConfigSchema, type AgentToolCall, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthConfig, AuthConfigSchema, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type BooleanQuery, BooleanQuerySchema, Brand, Brand as BrandType, type ChannelConfig, ChannelConfigSchema, ChannelType, type CircuitBreakerConfig, CircuitBreakerConfigSchema, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, type CodebaseStatus, type CommandArguments, CommandArgumentsSchema, type CommandConfigInfo, CommandConfigInfoSchema, type CommandDefinition, type CommandExecuteFn, type CommandExecuteResult, type CommandExecuteResultMetadata, CommandExecuteResultMetadataSchema, CommandExecuteResultSchema, type CommandExecutionContext, CommandExecutionContextSchema, type CommandInfo, CommandInfoSchema, type CommandInitContext, CommandInitContextSchema, type CommandInitFn, type CommandInitResult, CommandInitResultSchema, type CommandIsEnabledFn, type CommandMetadata, CommandMetadataSchema, type CommandPromptPart, CommandPromptPartSchema, type CommandSource, CommandSourceSchema, type ConnectionPoolConfig, ConnectionPoolConfigSchema, type ContextMode, ContextModeEnum, ContextModeSchema, ContextModeValues, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, DefaultContextMode, DefaultScope, type DefaultsConfig, DefaultsConfigSchema, type DingTalkChannelConfig, DingTalkChannelConfigSchema, EMBEDDING_DIMS_CONSISTENCY_CHECK, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type EmbeddingModelRef, type ErrorDetails, type ErrorInfo, type ErrorMessageMode, type ErrorResponse, type FeishuChannelConfig, FeishuChannelConfigSchema, type FileContent, FileContentSchema, type FileDiff, FileDiffSchema, type FileInfo, FileInfoSchema, type FileNode, FileNodeSchema, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayAgentDeregisterMessage, type GatewayAgentHealthStatus, type GatewayAgentHeartbeat, type GatewayAgentHeartbeatSyncMessage, type GatewayAgentListRequestMessage, type GatewayAgentListResponseMessage, type GatewayAgentRegisterMessage, type GatewayAgentRegistration, type GatewayAgentRegistrationRequest, type GatewayAgentRegistryStats, type GatewayAgentSelectionOptions, type GatewayAgentSelectionRecord, type GatewayAgentSelectionStrategy, type GatewayAgentStatusChangeMessage, type GatewayAgentSyncConflictResolutionStrategy, type GatewayAgentSyncInfo, type GatewayAgentSyncMessage, type GatewayAgentSyncMode, type GatewayAgentSyncPushEventType, type GatewayAgentSyncState, type GatewayAgentSyncStats, type GatewayChannelInfo, type GatewayChannelListResponse, type GatewayChannelPluginInfo, type GatewayChannelType, GatewayChannelTypeSchema, type GatewayClientConfig, GatewayClientConfigSchema, type GatewayClusterConfig, GatewayClusterConfigSchema, type GatewayConfig, GatewayConfigSchema, type GatewayMessage, type GatewayMessageContext, type GatewayMessageDeliveredInput, type GatewayMessageMetadata, type GatewayMessagePriority, GatewayMessagePrioritySchema, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayMessageStorage, type GatewayMessageType, type GatewayNodeConfig, GatewayNodeConfigSchema, type GatewayNodeInfo, type GatewayPlatformType, type GatewayServerConfig, GatewayServerConfigSchema, type GatewaySubscriberType, type GlobalSessionInfo, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, type HTTPSConfig, HTTPSConfigSchema, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IInstance, type ISubAgentRunner, type ITool, type IdPrefixName, type IndexerConfig, KNOWLEDGE_DOCTOR_PUBLIC_CHECKS, type KnowledgeBackend, type KnowledgeDoctorCheck, type KnowledgeDoctorPublicCheck, type KnowledgeDoctorResult, type KnowledgeIndexState, type KnowledgeIssue, type KnowledgeLlmCapabilities, type KnowledgeLlmStatus, type KnowledgeSearchOptions, type KnowledgeSearchSource, type KnowledgeSeverity, type KnowledgeStatus, type Language, type LanguageModelRef, type LlmConfig, type Mcp, type McpLocalConfig, McpLocalConfigSchema, type McpOAuthConfig, McpOAuthConfigSchema, type McpRemoteConfig, McpRemoteConfigSchema, McpSchema, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MemoryStatus, type MessageQueueConfig, MessageQueueConfigSchema, type ModelIdentifier, type ModelRef, type MonitorCheckState, MonitorCheckStateSchema, type MonitorHealth, type MonitorHealthCheck, type MonitorHealthCheckInfo, type MonitorHealthCheckInfoList, MonitorHealthCheckInfoListSchema, MonitorHealthCheckInfoSchema, type MonitorHealthCheckInput, MonitorHealthCheckInputSchema, MonitorHealthCheckSchema, MonitorHealthSchema, type MonitorHealthState, MonitorHealthStateSchema, type MonitorMetric, type MonitorMetricInput, MonitorMetricInputSchema, type MonitorMetricList, MonitorMetricListSchema, MonitorMetricSchema, type MonitorMetricType, MonitorMetricTypeSchema, type MonitorMetricValue, MonitorMetricValueSchema, type MonitorStatus, MonitorStatusSchema, type NostrChannelConfig, NostrChannelConfigSchema, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type NoteStatus, type OAuth2AuthConfig, OAuth2AuthConfigSchema, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, Permission, PermissionActionSchema as PermissionAction, PermissionActionSchema, type PermissionActionType, PermissionConfigSchema as PermissionConfig, PermissionConfigSchema, type PermissionConfigType, PermissionObjectSchema as PermissionObject, PermissionObjectSchema, type PermissionObjectType, PermissionRuleSchema as PermissionRule, PermissionRuleSchema, type PermissionRuleType, PermissionRulesetSchema as PermissionRuleset, PermissionRulesetSchema, type PermissionRulesetType, PermissionRuntimeRuleSchema as PermissionRuntimeRule, PermissionRuntimeRuleSchema, type PermissionRuntimeRuleType, Permission as PermissionType, type ProjectCommands, ProjectCommandsSchema, type ProjectIcon, ProjectIconSchema, type ProjectInfo, ProjectInfoSchema, type ProjectTime, ProjectTimeSchema, Protocol, type ProtocolConfig, type ProtocolMetadata, type PtyCreateInput, PtyCreateInputSchema, type PtyInfo, PtyInfoSchema, type PtyUpdateInput, PtyUpdateInputSchema, type QuestionAnswer, QuestionAnswerSchema, type QuestionInfo, QuestionInfoSchema, type QuestionOption, QuestionOptionSchema, type QuestionParam, QuestionParamSchema, type QuestionReply, QuestionReplySchema, type QuestionReplySource, QuestionReplySourceSchema, type QuestionRequest, type QuestionRequestList, QuestionRequestListSchema, QuestionRequestSchema, type Range, RangeSchema, type RequestOptions, type RerankLlmConfig, type RerankingModelRef, type RetryRequest, type RunMode, type SchedulerInitialized, SchedulerInitializedSchema, type SchedulerStatus, SchedulerStatusSchema, type SchedulerTask, type SchedulerTaskList, SchedulerTaskListSchema, SchedulerTaskSchema, type Scope, ScopeEnum, ScopeValues, type SearchConfig, type SessionConfig, SessionConfigSchema, type SessionInfo, type SessionShareInfo, Session as SessionTypes, type ShellExpression, type ShellFunction, type SignalChannelConfig, SignalChannelConfigSchema, type SlackChannelConfig, SlackChannelConfigSchema, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentExecuteOptions, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type TelegramChannelConfig, TelegramChannelConfigSchema, type Todo, type TodoList, TodoListSchema, type TodoPriority, TodoPrioritySchema, TodoSchema, type TodoStatus, TodoStatusSchema, type TokenAuthConfig, TokenAuthConfigSchema, type TokenAuthItem, TokenAuthItemSchema, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type Usage, type UsageCache, UsageCacheSchema, UsageSchema, type WeChatChannelConfig, WeChatChannelConfigSchema, type WebChatChannelConfig, WebChatChannelConfigSchema, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, type WeixinChannelConfig, WeixinChannelConfigSchema, brandEnv, buildToolArgs, createTool, idPrefixes, idSchema, toolSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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{
|
|
1
|
+
import*as t from'zod';import t__default,{z as z$1}from'zod';var L={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 ze(p){return `${L.envPrefix}_${p}`}var y=t__default.enum(["ask","allow","deny"]).meta({ref:"PermissionActionConfig"}),T=t__default.record(t__default.string(),y).meta({ref:"PermissionObjectConfig"}),r=t__default.union([y,T]).meta({ref:"PermissionRuleConfig"}),je=p=>typeof p=="object"&&p!==null&&!Array.isArray(p)?{__originalKeys:Object.keys(p),...p}:p,Ne=p=>{if(typeof p=="string")return {"*":p};let k=p,{__originalKeys:O,...E}=k;if(!O)return E;let G={};for(let c of O)c in E&&(G[c]=E[c]);return G},z=t__default.preprocess(je,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(Ne).meta({ref:"PermissionConfig"}),j=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"}),v=t__default.object({permission:t__default.string(),pattern:t__default.string(),action:y}).meta({ref:"PermissionRuntimeRule"}),P=t__default.array(v).meta({ref:"PermissionRuleset"}),De={Action:y,Object:T,Rule:r,AgentPermissionSchema:j,Config:z,RuntimeRule:v,Ruleset:P};var _=(c=>(c.HTTP="http",c.WEBSOCKET="websocket",c.GRPC="grpc",c.TCP="tcp",c.UDP="udp",c))(_||{}),F=(w=>(w.GET="GET",w.POST="POST",w.PUT="PUT",w.DELETE="DELETE",w.PATCH="PATCH",w.HEAD="HEAD",w.OPTIONS="OPTIONS",w))(F||{}),U=(b=>(b[b.OK=200]="OK",b[b.CREATED=201]="CREATED",b[b.NO_CONTENT=204]="NO_CONTENT",b[b.BAD_REQUEST=400]="BAD_REQUEST",b[b.UNAUTHORIZED=401]="UNAUTHORIZED",b[b.FORBIDDEN=403]="FORBIDDEN",b[b.NOT_FOUND=404]="NOT_FOUND",b[b.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",b[b.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",b[b.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",b))(U||{}),K=(c=>(c.CONNECTING="connecting",c.OPEN="open",c.CLOSING="closing",c.CLOSED="closed",c.ERROR="error",c))(K||{}),B=(c=>(c.TEXT="text",c.BINARY="binary",c.JSON="json",c.PING="ping",c.PONG="pong",c))(B||{}),Q=(a=>(a[a.OK=200]="OK",a[a.CREATED=201]="CREATED",a[a.NO_CONTENT=204]="NO_CONTENT",a[a.BAD_REQUEST=400]="BAD_REQUEST",a[a.UNAUTHORIZED=401]="UNAUTHORIZED",a[a.FORBIDDEN=403]="FORBIDDEN",a[a.NOT_FOUND=404]="NOT_FOUND",a[a.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",a[a.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",a[a.CONFLICT=409]="CONFLICT",a[a.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",a[a.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",a[a.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",a[a.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",a[a.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",a[a.BAD_GATEWAY=502]="BAD_GATEWAY",a[a.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",a[a.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",a[a.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",a))(Q||{});var q=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"}),Oe=t__default.array(q),Ge=t__default.object({status:t__default.string()}),Le=t__default.object({initialized:t__default.boolean()}),W=(A=>(A.PENDING="pending",A.RUNNING="running",A.PAUSED="paused",A.COMPLETED="completed",A.FAILED="failed",A.CANCELLED="cancelled",A.TIMEOUT="timeout",A.SKIPPED="skipped",A))(W||{}),H=(c=>(c[c.LOW=0]="LOW",c[c.NORMAL=1]="NORMAL",c[c.HIGH=2]="HIGH",c[c.URGENT=3]="URGENT",c[c.CRITICAL=4]="CRITICAL",c))(H||{});var In=z$1.enum(["telegram","slack","feishu","wechat","weixin","webchat","signal","nostr","dingtalk"]),wn=z$1.enum(["low","medium","high","critical"]),_e=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(p=>p===void 0||p.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)}),Fe=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)}),Ue=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)}),Ke=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)}),Be=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)}),Qe=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)}),qe=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)}),We=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)}),He=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)}),Ve=z$1.object({telegram:_e.optional(),slack:Fe.optional(),feishu:Ue.optional(),wechat:Ke.optional(),weixin:Be.optional(),webchat:Qe.optional(),signal:qe.optional(),nostr:We.optional(),dingtalk:He.optional()}),Ye=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")}),Ze=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")}),$e=z$1.object({enabled:z$1.boolean().default(true),tokens:z$1.array(Ze).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")}),Xe=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")}),Je=z$1.object({type:z$1.enum(["token","oauth2"]).default("token"),token:$e.optional(),oauth2:Xe.optional()}),et=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")}),tt=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()}),nt=z$1.object({nodeId:z$1.string().describe("Current gateway node ID"),nodes:z$1.array(tt).default([]).describe("Other gateway nodes in the cluster"),sync:et.optional()}),ot=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")}),rt=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)}),it=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)}),at=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)}),st=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")}),ct=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:Ye.optional(),auth:Je.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")}),pt=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")}),lt=z$1.enum(["localAgent","subAgent","both"]),mt=z$1.object({mode:lt.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")}),gt=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")}),Pn=z$1.object({server:ct.optional(),channels:Ve.optional(),cluster:nt.optional(),connectionPool:ot.optional(),messageQueue:rt.optional(),circuitBreaker:it.optional(),agentRegistry:at.optional(),session:st.optional(),defaults:pt.optional(),agentProcessing:mt.optional(),client:gt.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 dt=t__default.object({url:t__default.string().optional(),override:t__default.string().optional(),color:t__default.string().optional()}).meta({ref:"ProjectIcon"}),ut=t__default.object({start:t__default.string().optional().describe("Startup script to run when creating a new workspace (worktree)")}).meta({ref:"ProjectCommands"}),ft=t__default.object({created:t__default.number(),updated:t__default.number(),initialized:t__default.number().optional()}).meta({ref:"ProjectTime"}),V=t__default.object({id:t__default.string(),worktree:t__default.string(),vcs:t__default.literal("git").optional(),name:t__default.string().optional(),icon:dt.optional(),commands:ut.optional(),time:ft,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"}),bt=t.object({start:t.object({line:t.number(),character:t.number()}),end:t.object({line:t.number(),character:t.number()})}).meta({ref:"Range"}),ht=t.object({path:t.string(),added:t.number().int(),removed:t.number().int(),status:t.enum(["added","deleted","modified"])}).meta({ref:"File"}),yt=t.object({name:t.string(),path:t.string(),absolute:t.string(),type:t.enum(["file","directory"]),ignored:t.boolean()}).meta({ref:"FileNode"}),xt=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 Y={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 S(p){return t__default.string().startsWith(Y[p])}var Z=S("session").meta({ref:"SessionId"}),$=t__default.enum(["general","coder"]).meta({ref:"ContextMode"}),St=["general","coder"],X=t__default.object({id:Z,slug:t__default.string(),providerId:t__default.string(),directory:t__default.string(),parentId:Z.optional(),contextMode:$.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().optional(),partId:t__default.string().optional(),snapshot:t__default.string().regex(/^[0-9a-f]{40}$/,"invalid snapshot hash").optional(),diff:t__default.string().optional(),scope:t__default.enum(["session","message","part","file","hunk"]).optional(),files:t__default.array(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"}),At=X.extend({project:V.nullable()}).meta({ref:"GlobalSession"}),It=t__default.object({secret:t__default.string(),url:t__default.string()}).meta({ref:"SessionShare"}),wt={ContextModeValues:St,Info:X,GlobalInfo:At,ShareInfo:It};var J={General:"general",Coder:"coder"},Bn=Object.values(J),Qn=J.General,ee={General:"general",Coder:"coder",All:"all"},M=Object.values(ee),qn=ee.All;function Zn(p){return {description:p.description,args:p.args,execute:p.execute}}var $n=z$1;function Xn(p){return z$1.object(p)}var ne=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(M).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpLocalConfig"}),oe=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"}),re=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([oe,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(M).optional().describe("Context mode scope for the MCP server: all/general/coder. Defaults to all.")}).strict().meta({ref:"McpRemoteConfig"}),Pt=t__default.discriminatedUnion("type",[ne,re]);var Mt=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(M).optional().describe("Context mode scope")}).meta({ref:"CommandConfig"}),ie=t__default.enum(["command","mcp","skill"]).describe("Command source"),Rt=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")}),ae=t__default.union([t__default.string(),t__default.record(t__default.string(),t__default.unknown())]).describe("Command arguments"),se=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")})]),kt=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:ae.describe("Command arguments")}),ce=t__default.record(t__default.string(),t__default.unknown()).describe("Result metadata"),Tt=t__default.object({title:t__default.string().describe("Result title"),metadata:ce.describe("Result metadata"),output:t__default.string().describe("Result output"),parts:t__default.array(se).optional().describe("Result parts"),success:t__default.boolean().describe("Whether execution succeeded"),error:t__default.string().optional().describe("Error message if failed")}),vt=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")}),Et=t__default.object({isEnabled:t__default.boolean().optional().describe("Is enabled check result")}),zt=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:ie.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 jt={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},Nt={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},Dt={onBoot:false,onSearch:false,onSessionStart:false,intervalMs:1e3*60*60},Ot={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},Gt={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true},Lt=[{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."}],_t=[{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."}],Ft=["database","fts","vector","schema","lock","disk_space","orphan","backend"],Ut="embeddingDims_consistency";var pe={STDIO:"stdio",HTTP:"http",WS:"websocket"},le=z$1.enum(["stdio","http","websocket"]),me=z$1.object({command:z$1.string(),args:z$1.array(z$1.string())}),ge=z$1.object({baseUrl:z$1.string().url(),timeout:z$1.number().positive().default(6e4)}),de=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)}),Kt=z$1.object({stdio:me.optional(),http:ge.optional(),ws:de.optional()}),Bt=z$1.object({id:z$1.string().min(1),options:z$1.record(z$1.string(),z$1.unknown()).optional()}),Qt=z$1.object({agent:z$1.string().optional(),model:Bt.optional()}),ue=z$1.object({directory:z$1.string().default(process.cwd()),enabled:z$1.boolean().default(true),channel:le.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:me.optional(),http:ge.optional(),ws:de.optional(),agent:Qt.optional()}),qt=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:le.optional(),connection:Kt,autoConnect:z$1.boolean().default(false),priority:z$1.number().int().nonnegative().default(0)}),fe=z$1.object({clients:z$1.array(qt).min(1),defaultClientId:z$1.string().optional()}),go=z$1.object({server:ue}),uo=z$1.object({clients:fe}),Wt=z$1.object({autoRegister:z$1.boolean().default(true),gatewayUrl:z$1.url().optional()}).optional(),fo=z$1.object({server:ue.optional(),clients:fe.optional(),client:Wt.optional()}),bo={enabled:true,directory:process.cwd(),channel:pe.WS,port:3e3,hostname:"localhost",timeout:3e4},ho={type:"custom",channel:pe.WS,autoConnect:false,priority:0};var Ht=t__default.enum(["text_processing","code_generation","data_analysis","task_execution","workflow_management","monitoring","communication"]),be=t__default.object({modelId:t__default.string().min(1).describe("Model ID"),providerId:t__default.string().min(1).describe("Provider ID")}).meta({ref:"AgentModel"}),Vt=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(M).optional().describe("Agent scope (context mode)"),model:be.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 Yt=t__default.object({id:S("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"}),Zt=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)}),$t=t__default.object({title:t__default.string().optional(),size:t__default.object({rows:t__default.number(),cols:t__default.number()}).optional()});var he=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"}),ye=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(he).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"}),xe=t__default.object({id:S("question"),sessionId:S("session"),questions:t__default.array(ye).describe("Questions to ask"),tool:t__default.object({messageId:t__default.string(),callId:t__default.string()}).optional()}).meta({ref:"QuestionRequest"}),Xt=t__default.array(xe),Ce=t__default.array(t__default.string()).meta({ref:"QuestionAnswer"}),Jt=t__default.object({answers:t__default.array(Ce).describe("User answers in order of questions (each answer is an array of selected labels)")}),en=t__default.object({requestId:S("question")}),tn=t__default.enum(["user","timeout"]);var D=t__default.enum(["counter","gauge","histogram","summary"]),Se=t__default.enum(["healthy","degraded","unhealthy"]),Ae=t__default.enum(["pass","warn","fail"]),Ie=t__default.object({value:t__default.number().describe("Sample value of the metric"),labels:t__default.record(t__default.string(),t__default.string()).describe("Label key-value pairs attached to this sample")}).meta({ref:"MonitorMetricValue"}),we=t__default.object({name:t__default.string().min(1).describe("Metric name following the Prometheus naming convention"),type:D.describe("Metric type: counter, gauge, histogram or summary"),help:t__default.string().describe("Human readable description of the metric"),values:t__default.array(Ie).describe("Samples of this metric, one per label combination")}).meta({ref:"MonitorMetric"}),nn=t__default.array(we),Pe=t__default.object({name:t__default.string().min(1).describe("Unique name of the health check"),state:Ae.describe("Check outcome: pass, warn or fail"),durationMs:t__default.number().describe("Duration of the check execution in milliseconds"),message:t__default.string().describe("Short explanation of the outcome"),checkedAt:t__default.number().describe("Timestamp of the check execution in epoch milliseconds")}).meta({ref:"MonitorHealthCheck"}),Me=t__default.object({name:t__default.string().describe("Unique name of the health check"),description:t__default.string().describe("Human readable description of what the check verifies"),timeoutMs:t__default.number().describe("Per-execution timeout in milliseconds")}).meta({ref:"MonitorHealthCheckInfo"}),on=t__default.array(Me),rn=t__default.object({state:Se.describe("Overall health state aggregated from all checks"),checks:t__default.array(Pe).describe("Per-check results"),timestamp:t__default.number().describe("Timestamp of the aggregation in epoch milliseconds")}).meta({ref:"MonitorHealth"}),an=t__default.object({name:t__default.string().min(1).describe("Metric name to register or write to"),type:D.optional().describe("Metric type, only used when registering a new metric"),help:t__default.string().optional().describe("Metric description, only used when registering a new metric"),labelNames:t__default.array(t__default.string()).optional().describe("Declared label names, only used when registering a new metric"),labels:t__default.record(t__default.string(),t__default.string()).optional().describe("Label key-value pairs attached to this write"),value:t__default.number().optional().describe("Value to write; defaults to 1 for counters")}).meta({ref:"MonitorMetricInput"}),sn=t__default.object({name:t__default.string().min(1).describe("Unique name of the health check to register"),description:t__default.string().optional().describe("Human readable description of what the check verifies"),timeoutMs:t__default.number().optional().describe("Per-execution timeout in milliseconds")}).meta({ref:"MonitorHealthCheckInput"}),cn=t__default.object({uptimeMs:t__default.number().describe("Process uptime in milliseconds"),metricCount:t__default.number().describe("Number of registered metrics"),checkCount:t__default.number().describe("Number of registered health checks"),timestamp:t__default.number().describe("Timestamp of the status snapshot in epoch milliseconds")}).meta({ref:"MonitorStatus"});var pn=z$1.preprocess(p=>{if(typeof p!="string")return p;let k=p.trim().toLowerCase();return ["true","1","yes","on","y","enabled"].includes(k)?true:["false","0","no","off","n","disabled"].includes(k)?false:p},z$1.boolean());var ke=t__default.enum(["pending","in_progress","completed","cancelled"]),Te=t__default.enum(["high","medium","low"]),ve=t__default.object({content:t__default.string().describe("Brief description of the task"),status:ke.describe("Current status of the task: pending, in_progress, completed, cancelled"),priority:Te.describe("Priority level of the task: high, medium, low"),id:t__default.string().describe("Unique identifier for the todo item")}).meta({ref:"Todo"}),ln=t__default.array(ve);var Ee=t__default.object({read:t__default.number(),write:t__default.number()}).meta({ref:"UsageCache"}),mn=t__default.object({total:t__default.number().optional(),input:t__default.number(),output:t__default.number(),reasoning:t__default.number(),cache:Ee}).meta({ref:"Usage"});
|
|
2
|
+
export{Qt as ACPAgentRuntimeConfigSchema,le as ACPChannelTypeSchema,qt as ACPClientConfigSchema,Wt as ACPClientRegisterConfigSchema,fe as ACPClientsConfigSchema,Kt as ACPConnectionConfigSchema,ge as ACPHttpConnectionConfigSchema,uo as ACPInfoACPClientsConfigSchema,fo as ACPInfoACPConfigSchema,go as ACPInfoACPServerConfigSchema,Bt as ACPModelConfigSchema,ue as ACPServerConfigSchema,me as ACPStdioConnectionConfigSchema,de as ACPWebSocketConnectionConfigSchema,ho as ACP_DEFAULT_CLIENT_CONFIG,bo as ACP_DEFAULT_SERVER_CONFIG,Ht as AgentCapabilitySchema,Vt as AgentInfoSchema,lt as AgentModeSchema,be as AgentModelSchema,j as AgentPermission,j as AgentPermissionSchema,mt as AgentProcessingConfigSchema,at as AgentRegistryConfigSchema,et as AgentSyncConfigSchema,Je as AuthConfigSchema,pn as BooleanQuerySchema,L as Brand,Ve as ChannelConfigSchema,pe as ChannelType,it as CircuitBreakerConfigSchema,ae as CommandArgumentsSchema,Mt as CommandConfigInfoSchema,ce as CommandExecuteResultMetadataSchema,Tt as CommandExecuteResultSchema,kt as CommandExecutionContextSchema,zt as CommandInfoSchema,vt as CommandInitContextSchema,Et as CommandInitResultSchema,Rt as CommandMetadataSchema,se as CommandPromptPartSchema,ie as CommandSourceSchema,ot as ConnectionPoolConfigSchema,J as ContextModeEnum,$ as ContextModeSchema,Bn as ContextModeValues,jt as DEFAULT_EMBEDDING_CONFIG,Ot as DEFAULT_INDEXER_CONFIG,Gt as DEFAULT_PARSER_CONFIG,Nt as DEFAULT_SEARCH_CONFIG,Dt as DEFAULT_SYNC_CONFIG,Qn as DefaultContextMode,qn as DefaultScope,pt as DefaultsConfigSchema,He as DingTalkChannelConfigSchema,Ut as EMBEDDING_DIMS_CONSISTENCY_CHECK,Ue as FeishuChannelConfigSchema,xt as FileContentSchema,N as FileDiffSchema,ht as FileInfoSchema,yt as FileNodeSchema,Lt as GRAPH_ENTITY_TYPE_DEFINITIONS,_t as GRAPH_RELATION_TYPE_DEFINITIONS,In as GatewayChannelTypeSchema,gt as GatewayClientConfigSchema,nt as GatewayClusterConfigSchema,Pn as GatewayConfigSchema,wn as GatewayMessagePrioritySchema,tt as GatewayNodeConfigSchema,ct as GatewayServerConfigSchema,F as HTTPMethod,Ye as HTTPSConfigSchema,U as HTTPStatusCode,Q as HttpStatus,Ft as KNOWLEDGE_DOCTOR_PUBLIC_CHECKS,ne as McpLocalConfigSchema,oe as McpOAuthConfigSchema,re as McpRemoteConfigSchema,Pt as McpSchema,rt as MessageQueueConfigSchema,Ae as MonitorCheckStateSchema,on as MonitorHealthCheckInfoListSchema,Me as MonitorHealthCheckInfoSchema,sn as MonitorHealthCheckInputSchema,Pe as MonitorHealthCheckSchema,rn as MonitorHealthSchema,Se as MonitorHealthStateSchema,an as MonitorMetricInputSchema,nn as MonitorMetricListSchema,we as MonitorMetricSchema,D as MonitorMetricTypeSchema,Ie as MonitorMetricValueSchema,cn as MonitorStatusSchema,We as NostrChannelConfigSchema,Xe as OAuth2AuthConfigSchema,De as Permission,y as PermissionAction,y as PermissionActionSchema,z as PermissionConfig,z as PermissionConfigSchema,T as PermissionObject,T as PermissionObjectSchema,r as PermissionRule,r as PermissionRuleSchema,P as PermissionRuleset,P as PermissionRulesetSchema,v as PermissionRuntimeRule,v as PermissionRuntimeRuleSchema,ut as ProjectCommandsSchema,dt as ProjectIconSchema,V as ProjectInfoSchema,ft as ProjectTimeSchema,_ as Protocol,Zt as PtyCreateInputSchema,Yt as PtyInfoSchema,$t as PtyUpdateInputSchema,Ce as QuestionAnswerSchema,ye as QuestionInfoSchema,he as QuestionOptionSchema,en as QuestionParamSchema,Jt as QuestionReplySchema,tn as QuestionReplySourceSchema,Xt as QuestionRequestListSchema,xe as QuestionRequestSchema,bt as RangeSchema,Le as SchedulerInitializedSchema,Ge as SchedulerStatusSchema,Oe as SchedulerTaskListSchema,q as SchedulerTaskSchema,ee as ScopeEnum,M as ScopeValues,st as SessionConfigSchema,wt as SessionTypes,qe as SignalChannelConfigSchema,Fe as SlackChannelConfigSchema,H as TaskPriority,W as TaskStatus,_e as TelegramChannelConfigSchema,ln as TodoListSchema,Te as TodoPrioritySchema,ve as TodoSchema,ke as TodoStatusSchema,$e as TokenAuthConfigSchema,Ze as TokenAuthItemSchema,Ee as UsageCacheSchema,mn as UsageSchema,Ke as WeChatChannelConfigSchema,Qe as WebChatChannelConfigSchema,B as WebSocketMessageType,K as WebSocketState,Be as WeixinChannelConfigSchema,ze as brandEnv,Xn as buildToolArgs,Zn as createTool,Y as idPrefixes,S as idSchema,$n 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.36",
|
|
4
4
|
"description": "Shared types library for EASBOT ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -44,13 +44,13 @@
|
|
|
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.
|
|
47
|
+
"zod": "^4.6.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^25.9.5",
|
|
51
51
|
"tsup": "^8.5.1",
|
|
52
52
|
"typescript": "^6.0.3",
|
|
53
|
-
"vitest": "^
|
|
53
|
+
"vitest": "^5.0.5"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=22.22.2"
|