orbitx 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/{src/core/ai-provider.ts → dist/core/ai-provider.d.ts} +19 -25
  2. package/dist/core/ai-provider.d.ts.map +1 -0
  3. package/dist/core/ai-provider.js +4 -0
  4. package/dist/core/ai-provider.js.map +1 -0
  5. package/dist/core/base-agent.d.ts +53 -0
  6. package/dist/core/base-agent.d.ts.map +1 -0
  7. package/{src/core/base-agent.ts → dist/core/base-agent.js} +197 -269
  8. package/dist/core/base-agent.js.map +1 -0
  9. package/dist/core/deepseek-provider.d.ts +9 -0
  10. package/dist/core/deepseek-provider.d.ts.map +1 -0
  11. package/{src/core/deepseek-provider.ts → dist/core/deepseek-provider.js} +60 -71
  12. package/dist/core/deepseek-provider.js.map +1 -0
  13. package/dist/core/mcp-client.d.ts +21 -0
  14. package/dist/core/mcp-client.d.ts.map +1 -0
  15. package/{src/core/mcp-client.ts → dist/core/mcp-client.js} +90 -113
  16. package/dist/core/mcp-client.js.map +1 -0
  17. package/dist/core/mcp-computer.d.ts +4 -0
  18. package/dist/core/mcp-computer.d.ts.map +1 -0
  19. package/{src/core/mcp-computer.ts → dist/core/mcp-computer.js} +5 -5
  20. package/dist/core/mcp-computer.js.map +1 -0
  21. package/dist/core/mcp-connection.d.ts +6 -0
  22. package/dist/core/mcp-connection.d.ts.map +1 -0
  23. package/dist/core/mcp-connection.js +10 -0
  24. package/dist/core/mcp-connection.js.map +1 -0
  25. package/dist/core/mcp-ipc-connection.d.ts +20 -0
  26. package/dist/core/mcp-ipc-connection.d.ts.map +1 -0
  27. package/{src/core/mcp-ipc-connection.ts → dist/core/mcp-ipc-connection.js} +126 -153
  28. package/dist/core/mcp-ipc-connection.js.map +1 -0
  29. package/dist/core/mcp-server.d.ts +9 -0
  30. package/dist/core/mcp-server.d.ts.map +1 -0
  31. package/{src/core/mcp-server.ts → dist/core/mcp-server.js} +45 -49
  32. package/dist/core/mcp-server.js.map +1 -0
  33. package/dist/core/mcp.d.ts +29 -0
  34. package/dist/core/mcp.d.ts.map +1 -0
  35. package/dist/core/mcp.js +11 -0
  36. package/dist/core/mcp.js.map +1 -0
  37. package/dist/core/ollama-provider.d.ts +9 -0
  38. package/dist/core/ollama-provider.d.ts.map +1 -0
  39. package/{src/core/ollama-provider.ts → dist/core/ollama-provider.js} +59 -70
  40. package/dist/core/ollama-provider.js.map +1 -0
  41. package/dist/core/skill.d.ts +15 -0
  42. package/dist/core/skill.d.ts.map +1 -0
  43. package/dist/core/skill.js +11 -0
  44. package/dist/core/skill.js.map +1 -0
  45. package/dist/index.d.ts +18 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/{src/index.ts → dist/index.js} +16 -17
  48. package/dist/index.js.map +1 -0
  49. package/dist/templates/researcher.d.ts +27 -0
  50. package/dist/templates/researcher.d.ts.map +1 -0
  51. package/dist/templates/researcher.js +70 -0
  52. package/dist/templates/researcher.js.map +1 -0
  53. package/dist/templates/simple.d.ts +27 -0
  54. package/dist/templates/simple.d.ts.map +1 -0
  55. package/dist/templates/simple.js +35 -0
  56. package/dist/templates/simple.js.map +1 -0
  57. package/dist/tests/mcp.test.d.ts +2 -0
  58. package/dist/tests/mcp.test.d.ts.map +1 -0
  59. package/{src/tests/mcp.test.ts → dist/tests/mcp.test.js} +55 -73
  60. package/dist/tests/mcp.test.js.map +1 -0
  61. package/dist/tools/fs/index.d.ts +3 -0
  62. package/dist/tools/fs/index.d.ts.map +1 -0
  63. package/dist/tools/fs/index.js +3 -0
  64. package/dist/tools/fs/index.js.map +1 -0
  65. package/dist/tools/fs/read-file.d.ts +4 -0
  66. package/dist/tools/fs/read-file.d.ts.map +1 -0
  67. package/{src/tools/fs/read-file.ts → dist/tools/fs/read-file.js} +49 -54
  68. package/dist/tools/fs/read-file.js.map +1 -0
  69. package/dist/tools/fs/write-file.d.ts +4 -0
  70. package/dist/tools/fs/write-file.d.ts.map +1 -0
  71. package/{src/tools/fs/write-file.ts → dist/tools/fs/write-file.js} +68 -73
  72. package/dist/tools/fs/write-file.js.map +1 -0
  73. package/dist/tools/utils/get-current-time.d.ts +4 -0
  74. package/dist/tools/utils/get-current-time.d.ts.map +1 -0
  75. package/{src/tools/utils/get-current-time.ts → dist/tools/utils/get-current-time.js} +40 -45
  76. package/dist/tools/utils/get-current-time.js.map +1 -0
  77. package/dist/tools/utils/index.d.ts +2 -0
  78. package/dist/tools/utils/index.d.ts.map +1 -0
  79. package/dist/tools/utils/index.js +2 -0
  80. package/dist/tools/utils/index.js.map +1 -0
  81. package/dist/tools/www/fetch.d.ts +4 -0
  82. package/dist/tools/www/fetch.d.ts.map +1 -0
  83. package/{src/tools/www/fetch.ts → dist/tools/www/fetch.js} +147 -161
  84. package/dist/tools/www/fetch.js.map +1 -0
  85. package/dist/tools/www/index.d.ts +4 -0
  86. package/dist/tools/www/index.d.ts.map +1 -0
  87. package/dist/tools/www/index.js +4 -0
  88. package/dist/tools/www/index.js.map +1 -0
  89. package/dist/tools/www/read-web-page.d.ts +4 -0
  90. package/dist/tools/www/read-web-page.d.ts.map +1 -0
  91. package/{src/tools/www/read-web-page.ts → dist/tools/www/read-web-page.js} +330 -350
  92. package/dist/tools/www/read-web-page.js.map +1 -0
  93. package/dist/tools/www/web-search.d.ts +4 -0
  94. package/dist/tools/www/web-search.d.ts.map +1 -0
  95. package/{src/tools/www/web-search.ts → dist/tools/www/web-search.js} +82 -102
  96. package/dist/tools/www/web-search.js.map +1 -0
  97. package/package.json +19 -5
  98. package/.env.example +0 -1
  99. package/orbitx.png +0 -0
  100. package/public/index.html +0 -397
  101. package/src/core/mcp-connection.ts +0 -12
  102. package/src/core/mcp.ts +0 -23
  103. package/src/core/skill.ts +0 -16
  104. package/src/templates/researcher.ts +0 -73
  105. package/src/templates/simple.ts +0 -64
  106. package/src/tools/fs/index.ts +0 -2
  107. package/src/tools/utils/index.ts +0 -1
  108. package/src/tools/www/index.ts +0 -3
  109. package/tsconfig.json +0 -34
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.js","sourceRoot":"","sources":["../../src/core/skill.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,KAAK;IACd,MAAM,CAAC;IACP,YAAY,KAIX;QACG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,18 @@
1
+ export { AIProvider } from "./core/ai-provider";
2
+ export type { ChatResponse, Message, StreamCallback } from "./core/ai-provider";
3
+ export { BaseAgent } from "./core/base-agent";
4
+ export type { ExtractedSegment, ParsedToolCall } from "./core/base-agent";
5
+ export { DeepSeekProvider } from "./core/deepseek-provider";
6
+ export { MCPClient } from "./core/mcp-client";
7
+ export { MCPConnection } from "./core/mcp-connection";
8
+ export { MCPIPCConnection } from "./core/mcp-ipc-connection";
9
+ export { MCPServer } from "./core/mcp-server";
10
+ export { MCPTool } from "./core/mcp";
11
+ export { OllamaProvider } from "./core/ollama-provider";
12
+ export { Skill } from "./core/skill";
13
+ export { ResearcherAgent } from "./templates/researcher";
14
+ export { SimpleAgent } from "./templates/simple";
15
+ export { ReadFileTool, WriteFileTool } from "./tools/fs";
16
+ export { GetCurrentTimeTool } from "./tools/utils";
17
+ export { FetchTool, ReadWebPageTool, WebSearchTool } from "./tools/www";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -1,17 +1,16 @@
1
- export { AIProvider } from "./core/ai-provider";
2
- export { BaseAgent } from "./core/base-agent";
3
- export { DeepSeekProvider } from "./core/deepseek-provider";
4
- export { MCPClient } from "./core/mcp-client";
5
- export { MCPConnection } from "./core/mcp-connection";
6
- export { MCPIPCConnection } from "./core/mcp-ipc-connection";
7
- export { MCPServer } from "./core/mcp-server";
8
- export { MCPTool } from "./core/mcp";
9
- export { OllamaProvider } from "./core/ollama-provider";
10
- export { Skill } from "./core/skill";
11
-
12
- export { ResearcherAgent } from "./templates/researcher";
13
- export { SimpleAgent } from "./templates/simple";
14
-
15
- export { ReadFileTool, WriteFileTool } from "./tools/fs";
16
- export { GetCurrentTimeTool } from "./tools/utils";
17
- export { FetchTool, ReadWebPageTool, WebSearchTool } from "./tools/www";
1
+ export { AIProvider } from "./core/ai-provider";
2
+ export { BaseAgent } from "./core/base-agent";
3
+ export { DeepSeekProvider } from "./core/deepseek-provider";
4
+ export { MCPClient } from "./core/mcp-client";
5
+ export { MCPConnection } from "./core/mcp-connection";
6
+ export { MCPIPCConnection } from "./core/mcp-ipc-connection";
7
+ export { MCPServer } from "./core/mcp-server";
8
+ export { MCPTool } from "./core/mcp";
9
+ export { OllamaProvider } from "./core/ollama-provider";
10
+ export { Skill } from "./core/skill";
11
+ export { ResearcherAgent } from "./templates/researcher";
12
+ export { SimpleAgent } from "./templates/simple";
13
+ export { ReadFileTool, WriteFileTool } from "./tools/fs";
14
+ export { GetCurrentTimeTool } from "./tools/utils";
15
+ export { FetchTool, ReadWebPageTool, WebSearchTool } from "./tools/www";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { Message } from "../core/ai-provider";
2
+ import type AIProvider from "../core/ai-provider";
3
+ import BaseAgent from "../core/base-agent";
4
+ import type MCPTool from "../core/mcp";
5
+ import type Skill from "../core/skill";
6
+ export declare class ResearcherAgent extends BaseAgent {
7
+ constructor({ aiProvider, instruction, tools, skills, maxMemorizeToken, initData }: {
8
+ instruction?: string;
9
+ tools?: MCPTool[];
10
+ aiProvider: AIProvider;
11
+ skills?: Skill[];
12
+ maxMemorizeToken?: number;
13
+ initData?: {
14
+ memory: string;
15
+ messagesFull: Message[];
16
+ fullInputMissTokens: number;
17
+ fullInputHitTokens: number;
18
+ fullOutputTokens: number;
19
+ messagesCompact: Message[];
20
+ currentInputMissTokens: number;
21
+ currentInputHitTokens: number;
22
+ currentOutputTokens: number;
23
+ };
24
+ });
25
+ }
26
+ export default ResearcherAgent;
27
+ //# sourceMappingURL=researcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"researcher.d.ts","sourceRoot":"","sources":["../../src/templates/researcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AAIvC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAIvC,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,EACR,UAAU,EACV,WA6BwI,EACxI,KAIC,EACD,MAAW,EACX,gBAAwB,EACxB,QAUC,EACJ,EAAE;QACC,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;QAClB,UAAU,EAAE,UAAU,CAAC;QACvB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;QACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,EAAE;YACP,MAAM,EAAE,MAAM,CAAC;YACf,YAAY,EAAE,OAAO,EAAE,CAAC;YACxB,mBAAmB,EAAE,MAAM,CAAC;YAC5B,kBAAkB,EAAE,MAAM,CAAC;YAC3B,gBAAgB,EAAE,MAAM,CAAC;YACzB,eAAe,EAAE,OAAO,EAAE,CAAC;YAC3B,sBAAsB,EAAE,MAAM,CAAC;YAC/B,qBAAqB,EAAE,MAAM,CAAC;YAC9B,mBAAmB,EAAE,MAAM,CAAC;SAC/B,CAAA;KACJ;CAiBJ;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,70 @@
1
+ import BaseAgent from "../core/base-agent";
2
+ import MCPClient from "../core/mcp-client";
3
+ import MCPConnection from "../core/mcp-connection";
4
+ import MCPServer from "../core/mcp-server";
5
+ import { GetCurrentTimeTool } from "../tools/utils";
6
+ import { ReadWebPageTool, WebSearchTool } from "../tools/www";
7
+ export class ResearcherAgent extends BaseAgent {
8
+ constructor({ aiProvider, instruction = `You are an expert research agent. Your defining rule: never answer from memory alone — always search first, then synthesize.
9
+
10
+ ## BEFORE ANY SEARCH
11
+ Call GetCurrentTimeTool FIRST. You need the current date to:
12
+ - Write accurate, time-anchored search queries (e.g. "2025" not a stale year)
13
+ - Know if cached/training knowledge is outdated
14
+ - Anchor relative terms like "latest", "recent", "current"
15
+
16
+ Do not call WebSearchTool until GetCurrentTimeTool has returned a result.
17
+
18
+ ## RESEARCH DEPTH
19
+ Scale cycles to query complexity:
20
+ - Simple fact: 1 cycle minimum
21
+ - Standard topic: 3 cycles minimum
22
+ - Deep research: 5+ cycles minimum
23
+
24
+ ## SEARCH CYCLE
25
+ After you have the current time, repeat this pattern:
26
+
27
+ SEARCH → then immediately → READ (4 URLs in parallel, same turn)
28
+
29
+ Never run a search without reading its results. Never read fewer than 4 URLs unless fewer exist. Never reuse the same query — refine each time.
30
+
31
+ ## STOP CONDITION
32
+ After each cycle ask: Do I have enough to fully answer the question with no unresolved gaps?
33
+ - No → refine query, run another cycle
34
+ - Yes → synthesize and respond
35
+
36
+ ## OUTPUT
37
+ Cite sources. Match length to need — brief for simple queries, comprehensive for deep research. Use the user's language for all search queries.`, tools = [
38
+ WebSearchTool,
39
+ ReadWebPageTool,
40
+ GetCurrentTimeTool
41
+ ], skills = [], maxMemorizeToken = 30000, initData = {
42
+ memory: "",
43
+ messagesFull: [],
44
+ fullInputMissTokens: 0,
45
+ fullInputHitTokens: 0,
46
+ fullOutputTokens: 0,
47
+ messagesCompact: [],
48
+ currentInputMissTokens: 0,
49
+ currentInputHitTokens: 0,
50
+ currentOutputTokens: 0,
51
+ } }) {
52
+ const conn = new MCPConnection();
53
+ const mcpServer = new MCPServer(conn);
54
+ tools.forEach(tool => {
55
+ mcpServer.registerTool(tool);
56
+ });
57
+ const mcpClient = new MCPClient("DEFAULT_ENV", conn);
58
+ super({
59
+ aiProvider,
60
+ instruction,
61
+ mcpClient,
62
+ allowedTools: tools,
63
+ skills,
64
+ maxMemorizeToken,
65
+ initData,
66
+ });
67
+ }
68
+ }
69
+ export default ResearcherAgent;
70
+ //# sourceMappingURL=researcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"researcher.js","sourceRoot":"","sources":["../../src/templates/researcher.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC1C,YAAY,EACR,UAAU,EACV,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gJA6B0H,EACxI,KAAK,GAAG;QACJ,aAAa;QACb,eAAe;QACf,kBAAkB;KACrB,EACD,MAAM,GAAG,EAAE,EACX,gBAAgB,GAAG,KAAK,EACxB,QAAQ,GAAG;QACP,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,mBAAmB,EAAE,CAAC;QACtB,kBAAkB,EAAE,CAAC;QACrB,gBAAgB,EAAE,CAAC;QACnB,eAAe,EAAE,EAAE;QACnB,sBAAsB,EAAE,CAAC;QACzB,qBAAqB,EAAE,CAAC;QACxB,mBAAmB,EAAE,CAAC;KACzB,EAkBJ;QACG,MAAM,IAAI,GAAG,IAAI,aAAa,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACjB,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QACrD,KAAK,CAAC;YACF,UAAU;YACV,WAAW;YACX,SAAS;YACT,YAAY,EAAE,KAAK;YACnB,MAAM;YACN,gBAAgB;YAChB,QAAQ;SACX,CAAC,CAAC;IACP,CAAC;CACJ;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { Message } from "../core/ai-provider";
2
+ import type AIProvider from "../core/ai-provider";
3
+ import BaseAgent from "../core/base-agent";
4
+ import type MCPTool from "../core/mcp";
5
+ import type Skill from "../core/skill";
6
+ export declare class SimpleAgent extends BaseAgent {
7
+ constructor({ aiProvider, instruction, tools, skills, maxMemorizeToken, initData }: {
8
+ instruction: string;
9
+ tools: MCPTool[];
10
+ aiProvider: AIProvider;
11
+ skills?: Skill[];
12
+ maxMemorizeToken?: number;
13
+ initData?: {
14
+ memory: string;
15
+ messagesFull: Message[];
16
+ fullInputMissTokens: number;
17
+ fullInputHitTokens: number;
18
+ fullOutputTokens: number;
19
+ messagesCompact: Message[];
20
+ currentInputMissTokens: number;
21
+ currentInputHitTokens: number;
22
+ currentOutputTokens: number;
23
+ };
24
+ });
25
+ }
26
+ export default SimpleAgent;
27
+ //# sourceMappingURL=simple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple.d.ts","sourceRoot":"","sources":["../../src/templates/simple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AAIvC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,qBAAa,WAAY,SAAQ,SAAS;gBAC1B,EACR,UAAU,EACV,WAAgB,EAChB,KAAU,EACV,MAAW,EACX,gBAAwB,EACxB,QAUC,EACJ,EAAE;QACC,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,OAAO,EAAE,CAAC;QACjB,UAAU,EAAE,UAAU,CAAC;QACvB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;QACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,EAAE;YACP,MAAM,EAAE,MAAM,CAAC;YACf,YAAY,EAAE,OAAO,EAAE,CAAC;YACxB,mBAAmB,EAAE,MAAM,CAAC;YAC5B,kBAAkB,EAAE,MAAM,CAAC;YAC3B,gBAAgB,EAAE,MAAM,CAAC;YACzB,eAAe,EAAE,OAAO,EAAE,CAAC;YAC3B,sBAAsB,EAAE,MAAM,CAAC;YAC/B,qBAAqB,EAAE,MAAM,CAAC;YAC9B,mBAAmB,EAAE,MAAM,CAAC;SAC/B,CAAA;KACJ;CAiBJ;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,35 @@
1
+ import BaseAgent from "../core/base-agent";
2
+ import MCPClient from "../core/mcp-client";
3
+ import MCPConnection from "../core/mcp-connection";
4
+ import MCPServer from "../core/mcp-server";
5
+ export class SimpleAgent extends BaseAgent {
6
+ constructor({ aiProvider, instruction = "", tools = [], skills = [], maxMemorizeToken = 16000, initData = {
7
+ memory: "",
8
+ messagesFull: [],
9
+ fullInputMissTokens: 0,
10
+ fullInputHitTokens: 0,
11
+ fullOutputTokens: 0,
12
+ messagesCompact: [],
13
+ currentInputMissTokens: 0,
14
+ currentInputHitTokens: 0,
15
+ currentOutputTokens: 0,
16
+ } }) {
17
+ const conn = new MCPConnection();
18
+ const mcpServer = new MCPServer(conn);
19
+ tools.forEach(tool => {
20
+ mcpServer.registerTool(tool);
21
+ });
22
+ const mcpClient = new MCPClient("DEFAULT_ENV", conn);
23
+ super({
24
+ aiProvider,
25
+ instruction,
26
+ mcpClient,
27
+ allowedTools: tools,
28
+ skills,
29
+ maxMemorizeToken,
30
+ initData,
31
+ });
32
+ }
33
+ }
34
+ export default SimpleAgent;
35
+ //# sourceMappingURL=simple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple.js","sourceRoot":"","sources":["../../src/templates/simple.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACtC,YAAY,EACR,UAAU,EACV,WAAW,GAAG,EAAE,EAChB,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,EACX,gBAAgB,GAAG,KAAK,EACxB,QAAQ,GAAG;QACP,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,mBAAmB,EAAE,CAAC;QACtB,kBAAkB,EAAE,CAAC;QACrB,gBAAgB,EAAE,CAAC;QACnB,eAAe,EAAE,EAAE;QACnB,sBAAsB,EAAE,CAAC;QACzB,qBAAqB,EAAE,CAAC;QACxB,mBAAmB,EAAE,CAAC;KACzB,EAkBJ;QACG,MAAM,IAAI,GAAG,IAAI,aAAa,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACjB,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QACrD,KAAK,CAAC;YACF,UAAU;YACV,WAAW;YACX,SAAS;YACT,YAAY,EAAE,KAAK;YACnB,MAAM;YACN,gBAAgB;YAChB,QAAQ;SACX,CAAC,CAAC;IACP,CAAC;CACJ;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mcp.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.test.d.ts","sourceRoot":"","sources":["../../src/tests/mcp.test.ts"],"names":[],"mappings":""}
@@ -1,73 +1,55 @@
1
- import { describe, test } from "node:test";
2
- import assert from "node:assert/strict";
3
- import os from "os";
4
- import MCPIPCConnection from "../core/mcp-ipc-connection";
5
- import MCPServer from "../core/mcp-server";
6
- import MCPClient from "../core/mcp-client";
7
- import { GetCurrentTimeTool } from "../tools/utils";
8
- import { FetchTool, WebSearchTool } from "../tools/www";
9
-
10
- describe("MCP Client and Server", async () => {
11
- const path1 = os.platform() == "win32" ? `\\\\.\\pipe\\test${Math.random() * 1000}` : `/tmp/mcp_test${Math.random() * 1000}.sock`;
12
- const path2 = os.platform() == "win32" ? `\\\\.\\pipe\\test${Math.random() * 1000}` : `/tmp/mcp_test${Math.random() * 1000}.sock`;
13
-
14
- const ipcConnection11 = new MCPIPCConnection(path1);
15
- const ipcConnection21 = new MCPIPCConnection(path2);
16
-
17
- const ipcConnection12 = new MCPIPCConnection(path1);
18
- const ipcConnection22 = new MCPIPCConnection(path2);
19
-
20
- let mcpServer1: MCPServer;
21
- let mcpServer2: MCPServer;
22
- let mcpClient: MCPClient;
23
-
24
- await test("should connect MCP Client to Servers and get empty tools", async () => {
25
- mcpServer1 = new MCPServer(ipcConnection11);
26
- mcpServer2 = new MCPServer(ipcConnection21);
27
- mcpClient = new MCPClient("DEFAULT_ENV", [ipcConnection12, ipcConnection22]);
28
- const result = await mcpClient.getTools();
29
- assert.equal(result.length, 0);
30
- });
31
-
32
- await test("should register tool on client side", async () => {
33
- mcpClient.registerTool(GetCurrentTimeTool);
34
- const result = await mcpClient.getTools();
35
-
36
- assert.equal(result.length, 1);
37
- });
38
-
39
- await test("should register tool on server1 side", async () => {
40
- mcpServer1.registerTool(FetchTool);
41
- const result = await mcpClient.getTools();
42
-
43
- assert.equal(result.length, 2);
44
- });
45
-
46
- await test("should register tool on server2 side", async () => {
47
- mcpServer2.registerTool(WebSearchTool);
48
- const result = await mcpClient.getTools();
49
-
50
- assert.equal(result.length, 3);
51
- });
52
-
53
- await test("should call tool on client side", async () => {
54
- const result = await mcpClient.callTool(GetCurrentTimeTool.getOptions().name, {});
55
-
56
- assert.ok(typeof result == "string");
57
- });
58
-
59
- await test("should call tool on server1 side", async () => {
60
- const result = await mcpClient.callTool(FetchTool.getOptions().name, { url: "https://google.com" });
61
-
62
- assert.ok(typeof result == "string");
63
- });
64
-
65
- await test("should call tool on server2 side", async () => {
66
- const result = await mcpClient.callTool(WebSearchTool.getOptions().name, { query: "test" });
67
-
68
- assert.ok(typeof result == "string");
69
- });
70
-
71
-
72
- // Need Close Connections
73
- });
1
+ import { describe, test } from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import os from "os";
4
+ import MCPIPCConnection from "../core/mcp-ipc-connection";
5
+ import MCPServer from "../core/mcp-server";
6
+ import MCPClient from "../core/mcp-client";
7
+ import { GetCurrentTimeTool } from "../tools/utils";
8
+ import { FetchTool, WebSearchTool } from "../tools/www";
9
+ describe("MCP Client and Server", async () => {
10
+ const path1 = os.platform() == "win32" ? `\\\\.\\pipe\\test${Math.random() * 1000}` : `/tmp/mcp_test${Math.random() * 1000}.sock`;
11
+ const path2 = os.platform() == "win32" ? `\\\\.\\pipe\\test${Math.random() * 1000}` : `/tmp/mcp_test${Math.random() * 1000}.sock`;
12
+ const ipcConnection11 = new MCPIPCConnection(path1);
13
+ const ipcConnection21 = new MCPIPCConnection(path2);
14
+ const ipcConnection12 = new MCPIPCConnection(path1);
15
+ const ipcConnection22 = new MCPIPCConnection(path2);
16
+ let mcpServer1;
17
+ let mcpServer2;
18
+ let mcpClient;
19
+ await test("should connect MCP Client to Servers and get empty tools", async () => {
20
+ mcpServer1 = new MCPServer(ipcConnection11);
21
+ mcpServer2 = new MCPServer(ipcConnection21);
22
+ mcpClient = new MCPClient("DEFAULT_ENV", [ipcConnection12, ipcConnection22]);
23
+ const result = await mcpClient.getTools();
24
+ assert.equal(result.length, 0);
25
+ });
26
+ await test("should register tool on client side", async () => {
27
+ mcpClient.registerTool(GetCurrentTimeTool);
28
+ const result = await mcpClient.getTools();
29
+ assert.equal(result.length, 1);
30
+ });
31
+ await test("should register tool on server1 side", async () => {
32
+ mcpServer1.registerTool(FetchTool);
33
+ const result = await mcpClient.getTools();
34
+ assert.equal(result.length, 2);
35
+ });
36
+ await test("should register tool on server2 side", async () => {
37
+ mcpServer2.registerTool(WebSearchTool);
38
+ const result = await mcpClient.getTools();
39
+ assert.equal(result.length, 3);
40
+ });
41
+ await test("should call tool on client side", async () => {
42
+ const result = await mcpClient.callTool(GetCurrentTimeTool.getOptions().name, {});
43
+ assert.ok(typeof result == "string");
44
+ });
45
+ await test("should call tool on server1 side", async () => {
46
+ const result = await mcpClient.callTool(FetchTool.getOptions().name, { url: "https://google.com" });
47
+ assert.ok(typeof result == "string");
48
+ });
49
+ await test("should call tool on server2 side", async () => {
50
+ const result = await mcpClient.callTool(WebSearchTool.getOptions().name, { query: "test" });
51
+ assert.ok(typeof result == "string");
52
+ });
53
+ // Need Close Connections
54
+ });
55
+ //# sourceMappingURL=mcp.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.test.js","sourceRoot":"","sources":["../../src/tests/mcp.test.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export { ReadFileTool } from "./read-file";
2
+ export { WriteFileTool } from "./write-file";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/fs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ReadFileTool } from "./read-file";
2
+ export { WriteFileTool } from "./write-file";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/fs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import MCPTool from "../../core/mcp";
2
+ export declare const ReadFileTool: MCPTool;
3
+ export default ReadFileTool;
4
+ //# sourceMappingURL=read-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-file.d.ts","sourceRoot":"","sources":["../../../src/tools/fs/read-file.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,eAAO,MAAM,YAAY,SA+CvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -1,54 +1,49 @@
1
- import MCPTool from "../../core/mcp";
2
- import fs from "fs/promises";
3
- import path from "path";
4
-
5
- export const ReadFileTool = new MCPTool({
6
- name: "read-file",
7
- description: "Reads text content from a file at the specified path.",
8
- inputs: [{
9
- name: "filePath",
10
- type: "string",
11
- description: `Absolute or relative path to the file (e.g., "/home/user/doc.txt" or "./file.txt")`,
12
- required: true,
13
- }],
14
- execute: async (_: string, inputs: Record<string, any>): Promise<any> => {
15
- try {
16
- const { filePath } = inputs;
17
-
18
- if (!filePath || typeof filePath !== "string") {
19
- throw new Error("filePath must be a non-empty string");
20
- }
21
-
22
- const normalizedPath = path.normalize(filePath);
23
-
24
- const data = await fs.readFile(normalizedPath, "utf-8");
25
-
26
- return {
27
- message: `File read successfully: ${normalizedPath}`,
28
- path: normalizedPath,
29
- content: data,
30
- size: data.length
31
- };
32
-
33
- } catch (error) {
34
- let errorMessage = error instanceof Error ? error.message : String(error);
35
-
36
- if (error instanceof Error && "code" in error) {
37
- const err = error as NodeJS.ErrnoException;
38
- if (err.code === "ENOENT") {
39
- errorMessage = `File not found: ${inputs.filePath}`;
40
- } else if (err.code === "EACCES") {
41
- errorMessage = `Permission denied: ${inputs.filePath}`;
42
- } else if (err.code === "EISDIR") {
43
- errorMessage = `Path is a directory, not a file: ${inputs.filePath}`;
44
- }
45
- }
46
-
47
- return {
48
- error: errorMessage
49
- };
50
- }
51
- }
52
- });
53
-
54
- export default ReadFileTool;
1
+ import MCPTool from "../../core/mcp";
2
+ import fs from "fs/promises";
3
+ import path from "path";
4
+ export const ReadFileTool = new MCPTool({
5
+ name: "read-file",
6
+ description: "Reads text content from a file at the specified path.",
7
+ inputs: [{
8
+ name: "filePath",
9
+ type: "string",
10
+ description: `Absolute or relative path to the file (e.g., "/home/user/doc.txt" or "./file.txt")`,
11
+ required: true,
12
+ }],
13
+ execute: async (_, inputs) => {
14
+ try {
15
+ const { filePath } = inputs;
16
+ if (!filePath || typeof filePath !== "string") {
17
+ throw new Error("filePath must be a non-empty string");
18
+ }
19
+ const normalizedPath = path.normalize(filePath);
20
+ const data = await fs.readFile(normalizedPath, "utf-8");
21
+ return {
22
+ message: `File read successfully: ${normalizedPath}`,
23
+ path: normalizedPath,
24
+ content: data,
25
+ size: data.length
26
+ };
27
+ }
28
+ catch (error) {
29
+ let errorMessage = error instanceof Error ? error.message : String(error);
30
+ if (error instanceof Error && "code" in error) {
31
+ const err = error;
32
+ if (err.code === "ENOENT") {
33
+ errorMessage = `File not found: ${inputs.filePath}`;
34
+ }
35
+ else if (err.code === "EACCES") {
36
+ errorMessage = `Permission denied: ${inputs.filePath}`;
37
+ }
38
+ else if (err.code === "EISDIR") {
39
+ errorMessage = `Path is a directory, not a file: ${inputs.filePath}`;
40
+ }
41
+ }
42
+ return {
43
+ error: errorMessage
44
+ };
45
+ }
46
+ }
47
+ });
48
+ export default ReadFileTool;
49
+ //# sourceMappingURL=read-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-file.js","sourceRoot":"","sources":["../../../src/tools/fs/read-file.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC;IACpC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,uDAAuD;IACpE,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oFAAoF;YACjG,QAAQ,EAAE,IAAI;SACjB,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,CAAS,EAAE,MAA2B,EAAgB,EAAE;QACpE,IAAI,CAAC;YACD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;YAE5B,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBAC5C,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;YAC3D,CAAC;YAED,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAEhD,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAExD,OAAO;gBACH,OAAO,EAAE,2BAA2B,cAAc,EAAE;gBACpD,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC;QAEN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAE1E,IAAI,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;gBAC5C,MAAM,GAAG,GAAG,KAA8B,CAAC;gBAC3C,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACxB,YAAY,GAAG,mBAAmB,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC;qBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBAC/B,YAAY,GAAG,sBAAsB,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAC3D,CAAC;qBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBAC/B,YAAY,GAAG,oCAAoC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACzE,CAAC;YACL,CAAC;YAED,OAAO;gBACH,KAAK,EAAE,YAAY;aACtB,CAAC;QACN,CAAC;IACL,CAAC;CACJ,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import MCPTool from "../../core/mcp";
2
+ export declare const WriteFileTool: MCPTool;
3
+ export default WriteFileTool;
4
+ //# sourceMappingURL=write-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-file.d.ts","sourceRoot":"","sources":["../../../src/tools/fs/write-file.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,eAAO,MAAM,aAAa,SAkExB,CAAC;AAEH,eAAe,aAAa,CAAC"}