@easbot/types 0.1.13 → 0.1.15

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 ADDED
@@ -0,0 +1,56 @@
1
+ [中文](./README.md) | English
2
+
3
+ # @easbot/types
4
+
5
+ A modern, lightweight, and fast library for shared types in the EASBOT ecosystem.
6
+
7
+ ## Features
8
+
9
+ - **Type Safety**: Complete TypeScript type definitions
10
+ - **AI SDK Compatible**: Based on AI SDK v2 standards
11
+ - **Zod Validation**: Runtime type validation support
12
+ - **Tree-shakeable**: Only import what you need
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ pnpm add @easbot/types
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```typescript
23
+ import type {
24
+ AgentConfig,
25
+ TaskStatus,
26
+ MessageRole,
27
+ GenerateOptions
28
+ } from '@easbot/types';
29
+
30
+ // Use type definitions in your code
31
+ const config: AgentConfig = {
32
+ id: 'agent-001',
33
+ name: 'My Agent',
34
+ model: 'gpt-4',
35
+ };
36
+ ```
37
+
38
+ ## Development
39
+
40
+ ```bash
41
+ # Install dependencies
42
+ pnpm install
43
+
44
+ # Build
45
+ pnpm build
46
+
47
+ # Test
48
+ pnpm test
49
+
50
+ # Type check
51
+ pnpm type-check
52
+ ```
53
+
54
+ ## License
55
+
56
+ MIT
package/README.md CHANGED
@@ -1,81 +1,23 @@
1
- # @easbot/types
2
-
3
- [中文](#中文) | [English](#english)
1
+ [English](./README.en.md) | 中文
4
2
 
5
- ---
6
-
7
- ## 中文
3
+ # @easbot/types
8
4
 
9
5
  EASBOT 生态系统的共享类型库,现代化、轻量且高效。
10
6
 
11
- ### 安装
12
-
13
- ```bash
14
- npm install @easbot/types
15
- # 或
16
- pnpm add @easbot/types
17
- ```
18
-
19
- ### 使用
20
-
21
- ```typescript
22
- import type {
23
- AgentConfig,
24
- TaskStatus,
25
- MessageRole,
26
- GenerateOptions
27
- } from '@easbot/types';
28
-
29
- // 在代码中使用类型定义
30
- const config: AgentConfig = {
31
- id: 'agent-001',
32
- name: 'My Agent',
33
- model: 'gpt-4',
34
- };
35
- ```
36
-
37
- ### 特性
7
+ ## 特性
38
8
 
39
9
  - **类型安全**: 完整的 TypeScript 类型定义
40
10
  - **AI SDK 兼容**: 基于 AI SDK v2 标准
41
11
  - **Zod 验证**: 支持运行时类型验证
42
12
  - **Tree-shakeable**: 按需导入
43
13
 
44
- ### 开发
45
-
46
- ```bash
47
- # 安装依赖
48
- pnpm install
49
-
50
- # 构建
51
- pnpm build
52
-
53
- # 测试
54
- pnpm test
55
-
56
- # 类型检查
57
- pnpm type-check
58
- ```
59
-
60
- ### 许可证
61
-
62
- MIT
63
-
64
- ---
65
-
66
- ## English
67
-
68
- A modern, lightweight, and fast library for shared types in the EASBOT ecosystem.
69
-
70
- ### Installation
14
+ ## 安装
71
15
 
72
16
  ```bash
73
- npm install @easbot/types
74
- # or
75
17
  pnpm add @easbot/types
76
18
  ```
77
19
 
78
- ### Usage
20
+ ## 使用
79
21
 
80
22
  ```typescript
81
23
  import type {
@@ -85,7 +27,7 @@ import type {
85
27
  GenerateOptions
86
28
  } from '@easbot/types';
87
29
 
88
- // Use type definitions in your code
30
+ // 在代码中使用类型定义
89
31
  const config: AgentConfig = {
90
32
  id: 'agent-001',
91
33
  name: 'My Agent',
@@ -93,29 +35,22 @@ const config: AgentConfig = {
93
35
  };
94
36
  ```
95
37
 
96
- ### Features
97
-
98
- - **Type Safety**: Complete TypeScript type definitions
99
- - **AI SDK Compatible**: Based on AI SDK v2 standards
100
- - **Zod Validation**: Runtime type validation support
101
- - **Tree-shakeable**: Only import what you need
102
-
103
- ### Development
38
+ ## 开发
104
39
 
105
40
  ```bash
106
- # Install dependencies
41
+ # 安装依赖
107
42
  pnpm install
108
43
 
109
- # Build
44
+ # 构建
110
45
  pnpm build
111
46
 
112
- # Test
47
+ # 测试
113
48
  pnpm test
114
49
 
115
- # Type check
50
+ # 类型检查
116
51
  pnpm type-check
117
52
  ```
118
53
 
119
- ### License
54
+ ## 许可证
120
55
 
121
56
  MIT
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var zod=require('zod');var m=(n=>(n.HTTP="http",n.WEBSOCKET="websocket",n.GRPC="grpc",n.TCP="tcp",n.UDP="udp",n))(m||{}),d=(t=>(t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t))(d||{}),l=(r=>(r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r))(l||{}),p=(n=>(n.CONNECTING="connecting",n.OPEN="open",n.CLOSING="closing",n.CLOSED="closed",n.ERROR="error",n))(p||{}),b=(n=>(n.TEXT="text",n.BINARY="binary",n.JSON="json",n.PING="ping",n.PONG="pong",n))(b||{}),f=(e=>(e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e))(f||{});var x=(t=>(t.INITIALIZING="initializing",t.IDLE="idle",t.RUNNING="running",t.SUSPENDED="suspended",t.STOPPING="stopping",t.STOPPED="stopped",t.ERROR="error",t))(x||{});var y=(a=>(a.TEXT="text",a.IMAGE="image",a.FILE="file",a.AUDIO="audio",a.VIDEO="video",a.SYSTEM="system",a))(y||{}),E=(c=>(c.USER="user",c.AGENT="agent",c.SYSTEM="system",c))(E||{});var A={};function Q(i){return {description:i.description,args:i.args,execute:i.execute}}var H=zod.z;function X(i){return zod.z.object(i)}var S={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},h={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},k={onBoot:true,onSearch:true,onSessionStart:true,intervalMs:3e5},N={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},v={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true};function D(i,g){return `${i}/easbot/${g}`}function O(i,g){return `${i}/.easbot/${g}`}var M=[{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."}],P=[{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."}];var I=(u=>(u.Ephemeral="ephemeral",u.Persistent="persistent",u))(I||{}),T=(o=>(o.StdIO="stdio",o.HTTP="http",o.WebSocket="websocket",o.CLI="cli",o))(T||{}),C=(t=>(t.Idle="idle",t.Starting="starting",t.Running="running",t.Busy="busy",t.Stopping="stopping",t.Stopped="stopped",t.Error="error",t))(C||{});exports.AgentState=x;exports.DEFAULT_EMBEDDING_CONFIG=S;exports.DEFAULT_INDEXER_CONFIG=N;exports.DEFAULT_PARSER_CONFIG=v;exports.DEFAULT_SEARCH_CONFIG=h;exports.DEFAULT_SYNC_CONFIG=k;exports.GRAPH_ENTITY_TYPE_DEFINITIONS=M;exports.GRAPH_RELATION_TYPE_DEFINITIONS=P;exports.GatewayTypes=A;exports.HTTPMethod=d;exports.HTTPStatusCode=l;exports.HttpStatus=f;exports.MessageSender=E;exports.MessageType=y;exports.Protocol=m;exports.RunMode=I;exports.SubAgentStatus=C;exports.TransportType=T;exports.WebSocketMessageType=b;exports.WebSocketState=p;exports.buildToolArgs=X;exports.createTool=Q;exports.getDefaultDatabasePath=D;exports.getWorkspaceDatabasePath=O;exports.toolSchema=H;
1
+ 'use strict';var zod=require('zod');var m=(n=>(n.HTTP="http",n.WEBSOCKET="websocket",n.GRPC="grpc",n.TCP="tcp",n.UDP="udp",n))(m||{}),d=(t=>(t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t))(d||{}),l=(r=>(r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r))(l||{}),p=(n=>(n.CONNECTING="connecting",n.OPEN="open",n.CLOSING="closing",n.CLOSED="closed",n.ERROR="error",n))(p||{}),b=(n=>(n.TEXT="text",n.BINARY="binary",n.JSON="json",n.PING="ping",n.PONG="pong",n))(b||{}),f=(e=>(e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e))(f||{});var x=(t=>(t.INITIALIZING="initializing",t.IDLE="idle",t.RUNNING="running",t.SUSPENDED="suspended",t.STOPPING="stopping",t.STOPPED="stopped",t.ERROR="error",t))(x||{});var y=(a=>(a.TEXT="text",a.IMAGE="image",a.FILE="file",a.AUDIO="audio",a.VIDEO="video",a.SYSTEM="system",a))(y||{}),E=(c=>(c.USER="user",c.AGENT="agent",c.SYSTEM="system",c))(E||{});var A={};function H(i){return {description:i.description,args:i.args,execute:i.execute}}var X=zod.z;function Z(i){return zod.z.object(i)}var S={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},h={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},k={onBoot:true,onSearch:true,onSessionStart:true,intervalMs:3e5},N={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},v={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true},D={chunkSize:1024,chunkOverlap:102,minChunkLength:100};function O(i,g){return `${i}/easbot/${g}`}function M(i,g){return `${i}/.easbot/${g}`}var P=[{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."}],_=[{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."}];var I=(u=>(u.Ephemeral="ephemeral",u.Persistent="persistent",u))(I||{}),T=(o=>(o.StdIO="stdio",o.HTTP="http",o.WebSocket="websocket",o.CLI="cli",o))(T||{}),C=(t=>(t.Idle="idle",t.Starting="starting",t.Running="running",t.Busy="busy",t.Stopping="stopping",t.Stopped="stopped",t.Error="error",t))(C||{});exports.AgentState=x;exports.DEFAULT_EMBEDDING_CONFIG=S;exports.DEFAULT_INDEXER_CONFIG=N;exports.DEFAULT_NOTE_CHUNK_CONFIG=D;exports.DEFAULT_PARSER_CONFIG=v;exports.DEFAULT_SEARCH_CONFIG=h;exports.DEFAULT_SYNC_CONFIG=k;exports.GRAPH_ENTITY_TYPE_DEFINITIONS=P;exports.GRAPH_RELATION_TYPE_DEFINITIONS=_;exports.GatewayTypes=A;exports.HTTPMethod=d;exports.HTTPStatusCode=l;exports.HttpStatus=f;exports.MessageSender=E;exports.MessageType=y;exports.Protocol=m;exports.RunMode=I;exports.SubAgentStatus=C;exports.TransportType=T;exports.WebSocketMessageType=b;exports.WebSocketState=p;exports.buildToolArgs=Z;exports.createTool=H;exports.getDefaultDatabasePath=O;exports.getWorkspaceDatabasePath=M;exports.toolSchema=X;
package/dist/index.d.cts CHANGED
@@ -584,11 +584,13 @@ interface SubAgentInput {
584
584
  source: string;
585
585
  title: string;
586
586
  agent: string;
587
+ sessionId?: string;
587
588
  model?: SubAgentModel;
588
589
  parts?: AgentPromptPart[];
589
590
  system?: string;
590
591
  tools?: Record<string, boolean>;
591
592
  syncMessages?: boolean;
593
+ config?: Partial<SubAgentConfig>;
592
594
  }
593
595
  interface SubAgentResult {
594
596
  title: string;
@@ -938,17 +940,23 @@ interface MemoryKnowledgeConfigWithModels extends MemoryKnowledgeConfig {
938
940
  embeddingLlm?: EmbeddingModel;
939
941
  graphLlm?: LanguageModel;
940
942
  }
941
- type NoteKnowledgeSource = 'docs' | 'local' | 'upload';
943
+ type NoteKnowledgeSource = string;
942
944
  interface NoteKnowledgeConfig extends BaseKnowledgeConfig {
943
945
  vectorDims: number;
944
946
  chunkSize: number;
945
947
  chunkOverlap: number;
948
+ minChunkLength?: number;
946
949
  extraPaths?: string[];
947
950
  sources?: NoteKnowledgeSource[];
948
951
  sync?: SyncConfig;
949
952
  graph?: GraphLlmConfig;
950
953
  rerank?: RerankLlmConfig;
951
954
  }
955
+ declare const DEFAULT_NOTE_CHUNK_CONFIG: {
956
+ readonly chunkSize: 1024;
957
+ readonly chunkOverlap: 102;
958
+ readonly minChunkLength: 100;
959
+ };
952
960
  interface NoteKnowledgeConfigWithModels extends NoteKnowledgeConfig {
953
961
  embeddingLlm: EmbeddingModel;
954
962
  graphLlm?: LanguageModel;
@@ -957,6 +965,7 @@ interface NoteKnowledgeConfigWithModels extends NoteKnowledgeConfig {
957
965
  interface CodebaseKnowledgeConfig extends BaseKnowledgeConfig {
958
966
  parser: ParserConfig;
959
967
  embedding: EmbeddingConfig;
968
+ sync?: SyncConfig;
960
969
  }
961
970
  interface CodebaseKnowledgeConfigWithModels extends CodebaseKnowledgeConfig {
962
971
  embeddingLlm: EmbeddingModel;
@@ -973,6 +982,7 @@ interface KnowledgeSearchOptions {
973
982
  includeEdges?: boolean;
974
983
  edgesLimit?: number;
975
984
  candidateChunkIds?: number[];
985
+ enableEmbedding?: boolean;
976
986
  }
977
987
  interface BaseSearchResult {
978
988
  score: number;
@@ -1052,6 +1062,18 @@ declare const GRAPH_RELATION_TYPE_DEFINITIONS: readonly [{
1052
1062
  }, {
1053
1063
  readonly type: "related_to";
1054
1064
  readonly rule: "Weak but useful semantic relation when others do not fit.";
1065
+ }, {
1066
+ readonly type: "defines";
1067
+ readonly rule: "Source document or concept defines target entity.";
1068
+ }, {
1069
+ readonly type: "referenced_in";
1070
+ readonly rule: "Source entity is referenced or mentioned in target document.";
1071
+ }, {
1072
+ readonly type: "used_by";
1073
+ readonly rule: "Source entity is used by target process or concept.";
1074
+ }, {
1075
+ readonly type: "relates_to";
1076
+ readonly rule: "Source concept is semantically related to target concept.";
1055
1077
  }];
1056
1078
 
1057
1079
  type PromptPart = {
@@ -1065,4 +1087,4 @@ type PromptPart = {
1065
1087
  mime?: string;
1066
1088
  };
1067
1089
 
1068
- export { type AgentAction, type AgentAdapter, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentPromptPart, type AgentQuery, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessagePromptPart, type GatewayMessageReceiveInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IConfigLoader, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentModel, type SubAgentResult, SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
1090
+ export { type AgentAction, type AgentAdapter, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentPromptPart, type AgentQuery, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_NOTE_CHUNK_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessagePromptPart, type GatewayMessageReceiveInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IConfigLoader, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentModel, type SubAgentResult, SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
package/dist/index.d.ts CHANGED
@@ -584,11 +584,13 @@ interface SubAgentInput {
584
584
  source: string;
585
585
  title: string;
586
586
  agent: string;
587
+ sessionId?: string;
587
588
  model?: SubAgentModel;
588
589
  parts?: AgentPromptPart[];
589
590
  system?: string;
590
591
  tools?: Record<string, boolean>;
591
592
  syncMessages?: boolean;
593
+ config?: Partial<SubAgentConfig>;
592
594
  }
593
595
  interface SubAgentResult {
594
596
  title: string;
@@ -938,17 +940,23 @@ interface MemoryKnowledgeConfigWithModels extends MemoryKnowledgeConfig {
938
940
  embeddingLlm?: EmbeddingModel;
939
941
  graphLlm?: LanguageModel;
940
942
  }
941
- type NoteKnowledgeSource = 'docs' | 'local' | 'upload';
943
+ type NoteKnowledgeSource = string;
942
944
  interface NoteKnowledgeConfig extends BaseKnowledgeConfig {
943
945
  vectorDims: number;
944
946
  chunkSize: number;
945
947
  chunkOverlap: number;
948
+ minChunkLength?: number;
946
949
  extraPaths?: string[];
947
950
  sources?: NoteKnowledgeSource[];
948
951
  sync?: SyncConfig;
949
952
  graph?: GraphLlmConfig;
950
953
  rerank?: RerankLlmConfig;
951
954
  }
955
+ declare const DEFAULT_NOTE_CHUNK_CONFIG: {
956
+ readonly chunkSize: 1024;
957
+ readonly chunkOverlap: 102;
958
+ readonly minChunkLength: 100;
959
+ };
952
960
  interface NoteKnowledgeConfigWithModels extends NoteKnowledgeConfig {
953
961
  embeddingLlm: EmbeddingModel;
954
962
  graphLlm?: LanguageModel;
@@ -957,6 +965,7 @@ interface NoteKnowledgeConfigWithModels extends NoteKnowledgeConfig {
957
965
  interface CodebaseKnowledgeConfig extends BaseKnowledgeConfig {
958
966
  parser: ParserConfig;
959
967
  embedding: EmbeddingConfig;
968
+ sync?: SyncConfig;
960
969
  }
961
970
  interface CodebaseKnowledgeConfigWithModels extends CodebaseKnowledgeConfig {
962
971
  embeddingLlm: EmbeddingModel;
@@ -973,6 +982,7 @@ interface KnowledgeSearchOptions {
973
982
  includeEdges?: boolean;
974
983
  edgesLimit?: number;
975
984
  candidateChunkIds?: number[];
985
+ enableEmbedding?: boolean;
976
986
  }
977
987
  interface BaseSearchResult {
978
988
  score: number;
@@ -1052,6 +1062,18 @@ declare const GRAPH_RELATION_TYPE_DEFINITIONS: readonly [{
1052
1062
  }, {
1053
1063
  readonly type: "related_to";
1054
1064
  readonly rule: "Weak but useful semantic relation when others do not fit.";
1065
+ }, {
1066
+ readonly type: "defines";
1067
+ readonly rule: "Source document or concept defines target entity.";
1068
+ }, {
1069
+ readonly type: "referenced_in";
1070
+ readonly rule: "Source entity is referenced or mentioned in target document.";
1071
+ }, {
1072
+ readonly type: "used_by";
1073
+ readonly rule: "Source entity is used by target process or concept.";
1074
+ }, {
1075
+ readonly type: "relates_to";
1076
+ readonly rule: "Source concept is semantically related to target concept.";
1055
1077
  }];
1056
1078
 
1057
1079
  type PromptPart = {
@@ -1065,4 +1087,4 @@ type PromptPart = {
1065
1087
  mime?: string;
1066
1088
  };
1067
1089
 
1068
- export { type AgentAction, type AgentAdapter, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentPromptPart, type AgentQuery, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessagePromptPart, type GatewayMessageReceiveInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IConfigLoader, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentModel, type SubAgentResult, SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
1090
+ export { type AgentAction, type AgentAdapter, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentPromptPart, type AgentQuery, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_NOTE_CHUNK_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessagePromptPart, type GatewayMessageReceiveInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IConfigLoader, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentModel, type SubAgentResult, SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import {z}from'zod';var d=(n=>(n.HTTP="http",n.WEBSOCKET="websocket",n.GRPC="grpc",n.TCP="tcp",n.UDP="udp",n))(d||{}),l=(t=>(t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t))(l||{}),p=(r=>(r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r))(p||{}),b=(n=>(n.CONNECTING="connecting",n.OPEN="open",n.CLOSING="closing",n.CLOSED="closed",n.ERROR="error",n))(b||{}),f=(n=>(n.TEXT="text",n.BINARY="binary",n.JSON="json",n.PING="ping",n.PONG="pong",n))(f||{}),x=(e=>(e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e))(x||{});var y=(t=>(t.INITIALIZING="initializing",t.IDLE="idle",t.RUNNING="running",t.SUSPENDED="suspended",t.STOPPING="stopping",t.STOPPED="stopped",t.ERROR="error",t))(y||{});var E=(o=>(o.TEXT="text",o.IMAGE="image",o.FILE="file",o.AUDIO="audio",o.VIDEO="video",o.SYSTEM="system",o))(E||{}),R=(u=>(u.USER="user",u.AGENT="agent",u.SYSTEM="system",u))(R||{});var S={};function H(i){return {description:i.description,args:i.args,execute:i.execute}}var X=z;function Z(i){return z.object(i)}var h={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},k={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},N={onBoot:true,onSearch:true,onSessionStart:true,intervalMs:3e5},v={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},D={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true};function O(i,c){return `${i}/easbot/${c}`}function M(i,c){return `${i}/.easbot/${c}`}var P=[{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."}],_=[{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."}];var T=(m=>(m.Ephemeral="ephemeral",m.Persistent="persistent",m))(T||{}),C=(g=>(g.StdIO="stdio",g.HTTP="http",g.WebSocket="websocket",g.CLI="cli",g))(C||{}),A=(t=>(t.Idle="idle",t.Starting="starting",t.Running="running",t.Busy="busy",t.Stopping="stopping",t.Stopped="stopped",t.Error="error",t))(A||{});export{y as AgentState,h as DEFAULT_EMBEDDING_CONFIG,v as DEFAULT_INDEXER_CONFIG,D as DEFAULT_PARSER_CONFIG,k as DEFAULT_SEARCH_CONFIG,N as DEFAULT_SYNC_CONFIG,P as GRAPH_ENTITY_TYPE_DEFINITIONS,_ as GRAPH_RELATION_TYPE_DEFINITIONS,S as GatewayTypes,l as HTTPMethod,p as HTTPStatusCode,x as HttpStatus,R as MessageSender,E as MessageType,d as Protocol,T as RunMode,A as SubAgentStatus,C as TransportType,f as WebSocketMessageType,b as WebSocketState,Z as buildToolArgs,H as createTool,O as getDefaultDatabasePath,M as getWorkspaceDatabasePath,X as toolSchema};
1
+ import {z}from'zod';var d=(n=>(n.HTTP="http",n.WEBSOCKET="websocket",n.GRPC="grpc",n.TCP="tcp",n.UDP="udp",n))(d||{}),l=(t=>(t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t))(l||{}),p=(r=>(r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r))(p||{}),b=(n=>(n.CONNECTING="connecting",n.OPEN="open",n.CLOSING="closing",n.CLOSED="closed",n.ERROR="error",n))(b||{}),f=(n=>(n.TEXT="text",n.BINARY="binary",n.JSON="json",n.PING="ping",n.PONG="pong",n))(f||{}),x=(e=>(e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e))(x||{});var y=(t=>(t.INITIALIZING="initializing",t.IDLE="idle",t.RUNNING="running",t.SUSPENDED="suspended",t.STOPPING="stopping",t.STOPPED="stopped",t.ERROR="error",t))(y||{});var E=(o=>(o.TEXT="text",o.IMAGE="image",o.FILE="file",o.AUDIO="audio",o.VIDEO="video",o.SYSTEM="system",o))(E||{}),R=(u=>(u.USER="user",u.AGENT="agent",u.SYSTEM="system",u))(R||{});var S={};function X(i){return {description:i.description,args:i.args,execute:i.execute}}var Z=z;function J(i){return z.object(i)}var h={provider:"easbot-local",model:"bge-base-zh-v1.5",batchSize:32},k={maxResults:3,minScore:.1,hybrid:{enabled:true,vectorWeight:.7,textWeight:.3}},N={onBoot:true,onSearch:true,onSessionStart:true,intervalMs:3e5},v={batchSize:50,ignorePatterns:["node_modules/**","dist/**","build/**",".git/**","__pycache__/**","*.min.js","*.min.ts"],incremental:true},D={languages:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"],lazyLoad:true},O={chunkSize:1024,chunkOverlap:102,minChunkLength:100};function M(i,c){return `${i}/easbot/${c}`}function P(i,c){return `${i}/.easbot/${c}`}var _=[{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."}],L=[{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."}];var T=(m=>(m.Ephemeral="ephemeral",m.Persistent="persistent",m))(T||{}),C=(g=>(g.StdIO="stdio",g.HTTP="http",g.WebSocket="websocket",g.CLI="cli",g))(C||{}),A=(t=>(t.Idle="idle",t.Starting="starting",t.Running="running",t.Busy="busy",t.Stopping="stopping",t.Stopped="stopped",t.Error="error",t))(A||{});export{y as AgentState,h as DEFAULT_EMBEDDING_CONFIG,v as DEFAULT_INDEXER_CONFIG,O as DEFAULT_NOTE_CHUNK_CONFIG,D as DEFAULT_PARSER_CONFIG,k as DEFAULT_SEARCH_CONFIG,N as DEFAULT_SYNC_CONFIG,_ as GRAPH_ENTITY_TYPE_DEFINITIONS,L as GRAPH_RELATION_TYPE_DEFINITIONS,S as GatewayTypes,l as HTTPMethod,p as HTTPStatusCode,x as HttpStatus,R as MessageSender,E as MessageType,d as Protocol,T as RunMode,A as SubAgentStatus,C as TransportType,f as WebSocketMessageType,b as WebSocketState,J as buildToolArgs,X as createTool,M as getDefaultDatabasePath,P as getWorkspaceDatabasePath,Z as toolSchema};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easbot/types",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Shared types library for EASBOT ecosystem",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -14,6 +14,23 @@
14
14
  },
15
15
  "./package.json": "./package.json"
16
16
  },
17
+ "scripts": {
18
+ "dev": "tsup --watch --env.NODE_ENV development",
19
+ "build": "tsup --env.NODE_ENV production",
20
+ "test": "vitest",
21
+ "test:run": "vitest run",
22
+ "lint": "biome check .",
23
+ "lint:fix": "biome check --write .",
24
+ "lint:report": "biome check --reporter=summary .",
25
+ "format": "biome format .",
26
+ "format:fix": "biome format --write .",
27
+ "type-check": "tsc --noEmit",
28
+ "clean": "npx rimraf dist node_modules",
29
+ "prepare": "echo norun",
30
+ "prepublishOnly": "pnpm build",
31
+ "publish:npm": "bash scripts/publish.sh",
32
+ "publish:npm:win": "powershell -ExecutionPolicy Bypass -File scripts/publish.ps1"
33
+ },
17
34
  "keywords": [
18
35
  "ai",
19
36
  "agent",
@@ -59,20 +76,5 @@
59
76
  },
60
77
  "publishConfig": {
61
78
  "access": "public"
62
- },
63
- "scripts": {
64
- "dev": "tsup --watch --env.NODE_ENV development",
65
- "build": "tsup --env.NODE_ENV production",
66
- "test": "vitest",
67
- "test:run": "vitest run",
68
- "lint": "biome check .",
69
- "lint:fix": "biome check --write .",
70
- "lint:report": "biome check --reporter=summary .",
71
- "format": "biome format .",
72
- "format:fix": "biome format --write .",
73
- "type-check": "tsc --noEmit",
74
- "clean": "npx rimraf dist node_modules",
75
- "publish:npm": "bash scripts/publish.sh",
76
- "publish:npm:win": "powershell -ExecutionPolicy Bypass -File scripts/publish.ps1"
77
79
  }
78
- }
80
+ }