@kalenkevich/agent_007 0.0.1
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/dist/agent/agent.d.ts +17 -0
- package/dist/agent/agent.js +6 -0
- package/dist/agent/agent.js.map +1 -0
- package/dist/agent/agent_event.d.ts +108 -0
- package/dist/agent/agent_event.js +56 -0
- package/dist/agent/agent_event.js.map +1 -0
- package/dist/agent/agent_event_utils.d.ts +5 -0
- package/dist/agent/agent_event_utils.js +66 -0
- package/dist/agent/agent_event_utils.js.map +1 -0
- package/dist/agent/cli_agent/cli_agent.d.ts +41 -0
- package/dist/agent/cli_agent/cli_agent.js +324 -0
- package/dist/agent/cli_agent/cli_agent.js.map +1 -0
- package/dist/agent/cli_agent/system_prompt.d.ts +1 -0
- package/dist/agent/cli_agent/system_prompt.js +58 -0
- package/dist/agent/cli_agent/system_prompt.js.map +1 -0
- package/dist/agent/cli_agent.d.ts +34 -0
- package/dist/agent/cli_agent.js +91 -0
- package/dist/agent/cli_agent.js.map +1 -0
- package/dist/agent/planner_agent/planner_agent.d.ts +28 -0
- package/dist/agent/planner_agent/planner_agent.js +102 -0
- package/dist/agent/planner_agent/planner_agent.js.map +1 -0
- package/dist/agent/request_processor/basic_request_processor.d.ts +17 -0
- package/dist/agent/request_processor/basic_request_processor.js +28 -0
- package/dist/agent/request_processor/basic_request_processor.js.map +1 -0
- package/dist/agent/request_processor/compaction_processor.d.ts +17 -0
- package/dist/agent/request_processor/compaction_processor.js +118 -0
- package/dist/agent/request_processor/compaction_processor.js.map +1 -0
- package/dist/agent/request_processor/request_processor.d.ts +11 -0
- package/dist/agent/request_processor/request_processor.js +2 -0
- package/dist/agent/request_processor/request_processor.js.map +1 -0
- package/dist/cli/init_project_command_handler.d.ts +3 -0
- package/dist/cli/init_project_command_handler.js +58 -0
- package/dist/cli/init_project_command_handler.js.map +1 -0
- package/dist/cli/loader.d.ts +6 -0
- package/dist/cli/loader.js +27 -0
- package/dist/cli/loader.js.map +1 -0
- package/dist/cli/prompt_utils.d.ts +11 -0
- package/dist/cli/prompt_utils.js +18 -0
- package/dist/cli/prompt_utils.js.map +1 -0
- package/dist/cli/run_command.d.ts +6 -0
- package/dist/cli/run_command.js +72 -0
- package/dist/cli/run_command.js.map +1 -0
- package/dist/cli/run_interactive_command.d.ts +6 -0
- package/dist/cli/run_interactive_command.js +282 -0
- package/dist/cli/run_interactive_command.js.map +1 -0
- package/dist/cli/run_noninteractive_command.d.ts +6 -0
- package/dist/cli/run_noninteractive_command.js +60 -0
- package/dist/cli/run_noninteractive_command.js.map +1 -0
- package/dist/cli_entrypoint.d.ts +2 -0
- package/dist/cli_entrypoint.js +110 -0
- package/dist/cli_entrypoint.js.map +1 -0
- package/dist/command/commnad_handler.d.ts +3 -0
- package/dist/command/commnad_handler.js +2 -0
- package/dist/command/commnad_handler.js.map +1 -0
- package/dist/command/init_project_command_handler.d.ts +4 -0
- package/dist/command/init_project_command_handler.js +58 -0
- package/dist/command/init_project_command_handler.js.map +1 -0
- package/dist/config/app_dir.d.ts +1 -0
- package/dist/config/app_dir.js +4 -0
- package/dist/config/app_dir.js.map +1 -0
- package/dist/config/config.d.ts +21 -0
- package/dist/config/config.js +2 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/config_loader.d.ts +2 -0
- package/dist/config/config_loader.js +47 -0
- package/dist/config/config_loader.js.map +1 -0
- package/dist/config/config_store.d.ts +10 -0
- package/dist/config/config_store.js +44 -0
- package/dist/config/config_store.js.map +1 -0
- package/dist/content.d.ts +51 -0
- package/dist/content.js +16 -0
- package/dist/content.js.map +1 -0
- package/dist/core/functions.d.ts +1 -0
- package/dist/core/functions.js +6 -0
- package/dist/core/functions.js.map +1 -0
- package/dist/core/loop.d.ts +20 -0
- package/dist/core/loop.js +121 -0
- package/dist/core/loop.js.map +1 -0
- package/dist/core/project_service.d.ts +11 -0
- package/dist/core/project_service.js +26 -0
- package/dist/core/project_service.js.map +1 -0
- package/dist/core/run.d.ts +6 -0
- package/dist/core/run.js +25 -0
- package/dist/core/run.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +27 -0
- package/dist/logger.js +98 -0
- package/dist/logger.js.map +1 -0
- package/dist/model/adaptive_model.d.ts +16 -0
- package/dist/model/adaptive_model.js +57 -0
- package/dist/model/adaptive_model.js.map +1 -0
- package/dist/model/google/gemini_model.d.ts +15 -0
- package/dist/model/google/gemini_model.js +131 -0
- package/dist/model/google/gemini_model.js.map +1 -0
- package/dist/model/google/gemini_response_utils.d.ts +3 -0
- package/dist/model/google/gemini_response_utils.js +36 -0
- package/dist/model/google/gemini_response_utils.js.map +1 -0
- package/dist/model/google/gemini_streaming_utils.d.ts +28 -0
- package/dist/model/google/gemini_streaming_utils.js +235 -0
- package/dist/model/google/gemini_streaming_utils.js.map +1 -0
- package/dist/model/google/gen_ai_convert_utils.d.ts +6 -0
- package/dist/model/google/gen_ai_convert_utils.js +117 -0
- package/dist/model/google/gen_ai_convert_utils.js.map +1 -0
- package/dist/model/model.d.ts +11 -0
- package/dist/model/model.js +2 -0
- package/dist/model/model.js.map +1 -0
- package/dist/model/registry.d.ts +19 -0
- package/dist/model/registry.js +47 -0
- package/dist/model/registry.js.map +1 -0
- package/dist/model/request.d.ts +13 -0
- package/dist/model/request.js +2 -0
- package/dist/model/request.js.map +1 -0
- package/dist/model/request_builder_utils.d.ts +19 -0
- package/dist/model/request_builder_utils.js +43 -0
- package/dist/model/request_builder_utils.js.map +1 -0
- package/dist/model/response.d.ts +60 -0
- package/dist/model/response.js +2 -0
- package/dist/model/response.js.map +1 -0
- package/dist/model/util_llm.d.ts +10 -0
- package/dist/model/util_llm.js +149 -0
- package/dist/model/util_llm.js.map +1 -0
- package/dist/session/session.d.ts +14 -0
- package/dist/session/session.js +2 -0
- package/dist/session/session.js.map +1 -0
- package/dist/session/session_file_service.d.ts +23 -0
- package/dist/session/session_file_service.js +147 -0
- package/dist/session/session_file_service.js.map +1 -0
- package/dist/skills/skill.d.ts +23 -0
- package/dist/skills/skill.js +12 -0
- package/dist/skills/skill.js.map +1 -0
- package/dist/tools/build_in/find.d.ts +3 -0
- package/dist/tools/build_in/find.js +71 -0
- package/dist/tools/build_in/find.js.map +1 -0
- package/dist/tools/build_in/grep.d.ts +3 -0
- package/dist/tools/build_in/grep.js +97 -0
- package/dist/tools/build_in/grep.js.map +1 -0
- package/dist/tools/build_in/index.d.ts +1 -0
- package/dist/tools/build_in/index.js +13 -0
- package/dist/tools/build_in/index.js.map +1 -0
- package/dist/tools/build_in/list_dir.d.ts +3 -0
- package/dist/tools/build_in/list_dir.js +46 -0
- package/dist/tools/build_in/list_dir.js.map +1 -0
- package/dist/tools/build_in/view_file.d.ts +3 -0
- package/dist/tools/build_in/view_file.js +44 -0
- package/dist/tools/build_in/view_file.js.map +1 -0
- package/dist/tools/build_in/write_file.d.ts +3 -0
- package/dist/tools/build_in/write_file.js +50 -0
- package/dist/tools/build_in/write_file.js.map +1 -0
- package/dist/tools/functional_tool.d.ts +18 -0
- package/dist/tools/functional_tool.js +20 -0
- package/dist/tools/functional_tool.js.map +1 -0
- package/dist/tools/schema.d.ts +86 -0
- package/dist/tools/schema.js +37 -0
- package/dist/tools/schema.js.map +1 -0
- package/dist/tools/tool.d.ts +30 -0
- package/dist/tools/tool.js +9 -0
- package/dist/tools/tool.js.map +1 -0
- package/dist/tools/tool_call_policy.d.ts +4 -0
- package/dist/tools/tool_call_policy.js +4 -0
- package/dist/tools/tool_call_policy.js.map +1 -0
- package/dist/tools/tool_policy.d.ts +4 -0
- package/dist/tools/tool_policy.js +4 -0
- package/dist/tools/tool_policy.js.map +1 -0
- package/dist/ui/ui.d.ts +1 -0
- package/dist/ui/ui.js +2 -0
- package/dist/ui/ui.js.map +1 -0
- package/dist/user_input.d.ts +20 -0
- package/dist/user_input.js +21 -0
- package/dist/user_input.js.map +1 -0
- package/package.json +44 -0
- package/src/agent/agent.ts +18 -0
- package/src/agent/agent_event.ts +171 -0
- package/src/agent/agent_event_utils.ts +87 -0
- package/src/agent/cli_agent/cli_agent.ts +418 -0
- package/src/agent/cli_agent/system_prompt.ts +57 -0
- package/src/agent/planner_agent/planner_agent.ts +136 -0
- package/src/agent/request_processor/basic_request_processor.ts +46 -0
- package/src/agent/request_processor/compaction_processor.ts +164 -0
- package/src/agent/request_processor/request_processor.ts +13 -0
- package/src/cli/loader.ts +27 -0
- package/src/cli/prompt_utils.ts +19 -0
- package/src/cli/run_interactive_command.ts +337 -0
- package/src/cli/run_noninteractive_command.ts +74 -0
- package/src/cli_entrypoint.ts +128 -0
- package/src/command/commnad_handler.ts +3 -0
- package/src/command/init_project_command_handler.ts +66 -0
- package/src/config/app_dir.ts +4 -0
- package/src/config/config.ts +24 -0
- package/src/config/config_loader.ts +57 -0
- package/src/config/config_store.ts +50 -0
- package/src/content.ts +87 -0
- package/src/core/functions.ts +7 -0
- package/src/core/loop.ts +165 -0
- package/src/core/project_service.ts +38 -0
- package/src/core/run.ts +36 -0
- package/src/index.ts +1 -0
- package/src/logger.ts +128 -0
- package/src/model/adaptive_model.ts +77 -0
- package/src/model/google/gemini_model.ts +194 -0
- package/src/model/google/gemini_response_utils.ts +46 -0
- package/src/model/google/gemini_streaming_utils.ts +294 -0
- package/src/model/google/gen_ai_convert_utils.ts +149 -0
- package/src/model/model.ts +18 -0
- package/src/model/registry.ts +61 -0
- package/src/model/request.ts +15 -0
- package/src/model/request_builder_utils.ts +79 -0
- package/src/model/response.ts +66 -0
- package/src/model/util_llm.ts +167 -0
- package/src/session/session.ts +16 -0
- package/src/session/session_file_service.ts +207 -0
- package/src/skills/skill.ts +38 -0
- package/src/tools/build_in/find.ts +80 -0
- package/src/tools/build_in/grep.ts +101 -0
- package/src/tools/build_in/index.ts +13 -0
- package/src/tools/build_in/list_dir.ts +50 -0
- package/src/tools/build_in/view_file.ts +47 -0
- package/src/tools/build_in/write_file.ts +53 -0
- package/src/tools/functional_tool.ts +59 -0
- package/src/tools/schema.ts +87 -0
- package/src/tools/tool.ts +68 -0
- package/src/tools/tool_call_policy.ts +7 -0
- package/src/ui/ui.ts +0 -0
- package/src/user_input.ts +51 -0
- package/tests/integration/util_llm_test.ts +42 -0
- package/tests/unit/adaptive_model_test.ts +122 -0
- package/tests/unit/agent/request_processor/compaction_processor_test.ts +121 -0
- package/tests/unit/cli/prompt_utils_test.ts +47 -0
- package/tests/unit/cli_agent_test.ts +476 -0
- package/tests/unit/content_test.ts +56 -0
- package/tests/unit/logger_test.ts +109 -0
- package/tests/unit/loop_test.ts +141 -0
- package/tests/unit/model/gemini_model_test.ts +111 -0
- package/tests/unit/planner_agent_test.ts +52 -0
- package/tests/unit/project_service_test.ts +102 -0
- package/tests/unit/session_file_service_test.ts +160 -0
- package/tests/unit/tools/find_test.ts +40 -0
- package/tests/unit/tools/grep_test.ts +43 -0
- package/tests/unit/tools/list_dir_test.ts +32 -0
- package/tests/unit/tools/view_file_test.ts +32 -0
- package/tests/unit/tools/write_file_test.ts +44 -0
- package/tests/unit/user_input_test.ts +55 -0
- package/tests/unit/util_llm_test.ts +61 -0
- package/todo.md +29 -0
- package/tsconfig.json +33 -0
- package/vitest.config.ts +33 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from "vitest";
|
|
2
|
+
import { VIEW_FILE_TOOL } from "../../../src/tools/build_in/view_file.js";
|
|
3
|
+
import * as fs from "node:fs/promises";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
|
|
6
|
+
vi.mock("node:fs/promises");
|
|
7
|
+
|
|
8
|
+
describe("ViewFileTool", () => {
|
|
9
|
+
it("should read file content", async () => {
|
|
10
|
+
const mockContent = "hello world";
|
|
11
|
+
vi.mocked(fs.readFile).mockResolvedValue(mockContent as any);
|
|
12
|
+
|
|
13
|
+
const result = await VIEW_FILE_TOOL.execute({ path: "test.txt" });
|
|
14
|
+
|
|
15
|
+
expect(result).toEqual({ content: mockContent });
|
|
16
|
+
expect(fs.readFile).toHaveBeenCalledWith(path.resolve("test.txt"), "utf-8");
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("should throw error if path is outside project", async () => {
|
|
20
|
+
await expect(
|
|
21
|
+
VIEW_FILE_TOOL.execute({ path: "../outside.txt" }),
|
|
22
|
+
).rejects.toThrow(/Access denied/);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("should handle readFile errors", async () => {
|
|
26
|
+
vi.mocked(fs.readFile).mockRejectedValue(new Error("Read error") as any);
|
|
27
|
+
|
|
28
|
+
await expect(VIEW_FILE_TOOL.execute({ path: "test.txt" })).rejects.toThrow(
|
|
29
|
+
/Failed to read file/,
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from "vitest";
|
|
2
|
+
import { WRITE_FILE_TOOL } from "../../../src/tools/build_in/write_file.js";
|
|
3
|
+
import * as fs from "node:fs/promises";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
|
|
6
|
+
vi.mock("node:fs/promises");
|
|
7
|
+
|
|
8
|
+
describe("WriteFileTool", () => {
|
|
9
|
+
it("should write file content", async () => {
|
|
10
|
+
vi.mocked(fs.writeFile).mockResolvedValue(undefined as any);
|
|
11
|
+
vi.mocked(fs.mkdir).mockResolvedValue(undefined as any);
|
|
12
|
+
|
|
13
|
+
const result = await WRITE_FILE_TOOL.execute({
|
|
14
|
+
path: "test.txt",
|
|
15
|
+
content: "hello",
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
expect(result).toEqual({ success: true });
|
|
19
|
+
expect(fs.mkdir).toHaveBeenCalledWith(
|
|
20
|
+
path.dirname(path.resolve("test.txt")),
|
|
21
|
+
{ recursive: true },
|
|
22
|
+
);
|
|
23
|
+
expect(fs.writeFile).toHaveBeenCalledWith(
|
|
24
|
+
path.resolve("test.txt"),
|
|
25
|
+
"hello",
|
|
26
|
+
"utf-8",
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("should throw error if path is outside project", async () => {
|
|
31
|
+
await expect(
|
|
32
|
+
WRITE_FILE_TOOL.execute({ path: "../outside.txt", content: "hello" }),
|
|
33
|
+
).rejects.toThrow(/Access denied/);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("should handle writeFile errors", async () => {
|
|
37
|
+
vi.mocked(fs.mkdir).mockResolvedValue(undefined as any);
|
|
38
|
+
vi.mocked(fs.writeFile).mockRejectedValue(new Error("Write error") as any);
|
|
39
|
+
|
|
40
|
+
await expect(
|
|
41
|
+
WRITE_FILE_TOOL.execute({ path: "test.txt", content: "hello" }),
|
|
42
|
+
).rejects.toThrow(/Failed to write file/);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
isUserCommand,
|
|
4
|
+
toContentParts,
|
|
5
|
+
UserCommandType,
|
|
6
|
+
UserInput,
|
|
7
|
+
} from "../../src/user_input";
|
|
8
|
+
import { Content, ContentPart } from "../../src/content";
|
|
9
|
+
|
|
10
|
+
describe("user_input utils", () => {
|
|
11
|
+
describe("isUserCommand", () => {
|
|
12
|
+
it("should return true for valid command", () => {
|
|
13
|
+
const input: UserInput = {
|
|
14
|
+
command: UserCommandType.SET_MODEL,
|
|
15
|
+
modelName: "gemini-1.5-pro",
|
|
16
|
+
};
|
|
17
|
+
expect(isUserCommand(input)).toBe(true);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("should return false for non-command", () => {
|
|
21
|
+
expect(isUserCommand("string input")).toBe(false);
|
|
22
|
+
expect(
|
|
23
|
+
isUserCommand({ type: "text", text: "part" } as unknown as UserInput),
|
|
24
|
+
).toBe(false);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe("toContentParts", () => {
|
|
29
|
+
it("should convert string to text part", () => {
|
|
30
|
+
const result = toContentParts("hello");
|
|
31
|
+
expect(result).toEqual([{ type: "text", text: "hello" }]);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("should return array as is", () => {
|
|
35
|
+
const parts: ContentPart[] = [{ type: "text", text: "hello" }];
|
|
36
|
+
const result = toContentParts(parts);
|
|
37
|
+
expect(result).toBe(parts);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("should return parts from Content object", () => {
|
|
41
|
+
const content: Content = {
|
|
42
|
+
role: "user",
|
|
43
|
+
parts: [{ type: "text", text: "hello" }],
|
|
44
|
+
};
|
|
45
|
+
const result = toContentParts(content);
|
|
46
|
+
expect(result).toBe(content.parts);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("should wrap single ContentPart in array", () => {
|
|
50
|
+
const part: ContentPart = { type: "text", text: "hello" };
|
|
51
|
+
const result = toContentParts(part as unknown as ContentPart);
|
|
52
|
+
expect(result).toEqual([part]);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from "vitest";
|
|
2
|
+
import { UtilLlm } from "../../src/model/util_llm.js";
|
|
3
|
+
import {
|
|
4
|
+
AgentEventType,
|
|
5
|
+
type AgentEvent,
|
|
6
|
+
} from "../../src/agent/agent_event.js";
|
|
7
|
+
|
|
8
|
+
describe("UtilLlm", () => {
|
|
9
|
+
it("should generate a session title", async () => {
|
|
10
|
+
const mockModel = {
|
|
11
|
+
run: vi.fn().mockImplementation(async function* () {
|
|
12
|
+
yield {
|
|
13
|
+
content: {
|
|
14
|
+
role: "agent",
|
|
15
|
+
parts: [{ type: "text", text: "Generated Title" }],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const utilLlm = new UtilLlm(mockModel as any);
|
|
22
|
+
|
|
23
|
+
const events: AgentEvent[] = [
|
|
24
|
+
{
|
|
25
|
+
id: "1",
|
|
26
|
+
streamId: "s1",
|
|
27
|
+
timestamp: "...",
|
|
28
|
+
role: "user",
|
|
29
|
+
type: AgentEventType.MESSAGE,
|
|
30
|
+
parts: [{ type: "text", text: "Hello" }],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "2",
|
|
34
|
+
streamId: "s1",
|
|
35
|
+
timestamp: "...",
|
|
36
|
+
role: "agent",
|
|
37
|
+
type: AgentEventType.MESSAGE,
|
|
38
|
+
parts: [{ type: "text", text: "Hi there" }],
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
const title = await utilLlm.generateSessionTitle(events);
|
|
43
|
+
|
|
44
|
+
expect(title).toBe("Generated Title");
|
|
45
|
+
expect(mockModel.run).toHaveBeenCalled();
|
|
46
|
+
|
|
47
|
+
const callArgs = mockModel.run.mock.calls[0][0];
|
|
48
|
+
expect(callArgs.contents[0].parts[0].text).toContain("[User]: Hello");
|
|
49
|
+
expect(callArgs.contents[0].parts[0].text).toContain("[Agent]: Hi there");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("should return default title if no conversation text", async () => {
|
|
53
|
+
const mockModel = {
|
|
54
|
+
run: vi.fn(),
|
|
55
|
+
};
|
|
56
|
+
const utilLlm = new UtilLlm(mockModel as any);
|
|
57
|
+
const title = await utilLlm.generateSessionTitle([]);
|
|
58
|
+
expect(title).toBe("New Session");
|
|
59
|
+
expect(mockModel.run).not.toHaveBeenCalled();
|
|
60
|
+
});
|
|
61
|
+
});
|
package/todo.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
To do:
|
|
2
|
+
|
|
3
|
+
- [x] Basic Agent loop
|
|
4
|
+
- [x] User command execution
|
|
5
|
+
- [x] Tool execution
|
|
6
|
+
- [x] Tool call approval
|
|
7
|
+
- [x] Sessions
|
|
8
|
+
- [x] Chat history
|
|
9
|
+
- [x] Dynamic model support
|
|
10
|
+
- [/] Planning agent
|
|
11
|
+
- [x] Ask user for approval
|
|
12
|
+
- [ ] Plan execution
|
|
13
|
+
- [x] Define project constants by scaning the codebase:
|
|
14
|
+
- language, framework, package managers, build tools
|
|
15
|
+
- project structure
|
|
16
|
+
- coding style, rules and conventions
|
|
17
|
+
- [ ] Skills
|
|
18
|
+
- [ ] Other models support (OpenAI, Anthropic, etc)
|
|
19
|
+
- [ ] TUI with ink
|
|
20
|
+
- [ ] Web/Native UI?
|
|
21
|
+
- [ ] Personality (aggresive, polite, casual)
|
|
22
|
+
- [ ] Web search
|
|
23
|
+
- [ ] Code execution
|
|
24
|
+
- [x] Context compaction
|
|
25
|
+
- [ ] Memory facts
|
|
26
|
+
- [ ] Index project for Llm (LllWiki)
|
|
27
|
+
- [ ] Conenct to Telegram
|
|
28
|
+
- [ ] Voice support
|
|
29
|
+
- [ ] i18n (en, russian)
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowUnreachableCode": false,
|
|
4
|
+
"allowUnusedLabels": false,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"noEmitOnError": true,
|
|
8
|
+
"noFallthroughCasesInSwitch": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"pretty": true,
|
|
11
|
+
"sourceMap": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"target": "ES2020",
|
|
14
|
+
"module": "nodenext",
|
|
15
|
+
"lib": ["ES2022", "DOM"],
|
|
16
|
+
"moduleResolution": "nodenext",
|
|
17
|
+
"esModuleInterop": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"experimentalDecorators": true,
|
|
20
|
+
"noImplicitAny": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"strictBindCallApply": true,
|
|
23
|
+
"strictFunctionTypes": true,
|
|
24
|
+
"strictNullChecks": true,
|
|
25
|
+
"allowSyntheticDefaultImports": true,
|
|
26
|
+
"strictPropertyInitialization": true,
|
|
27
|
+
"verbatimModuleSyntax": true,
|
|
28
|
+
"rootDir": "src",
|
|
29
|
+
"outDir": "dist"
|
|
30
|
+
},
|
|
31
|
+
"include": ["src/**/*"],
|
|
32
|
+
"exclude": ["node_modules", "dist"]
|
|
33
|
+
}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
projects: [
|
|
6
|
+
{
|
|
7
|
+
test: {
|
|
8
|
+
name: "unit",
|
|
9
|
+
environment: "node",
|
|
10
|
+
include: ["tests/unit/**/*_test.ts"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
test: {
|
|
15
|
+
name: "integration",
|
|
16
|
+
environment: "node",
|
|
17
|
+
include: ["tests/integration/**/*_test.ts"],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
test: {
|
|
22
|
+
name: "e2e",
|
|
23
|
+
environment: "node",
|
|
24
|
+
include: ["tests/e2e/**/*_test.ts"],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
coverage: {
|
|
29
|
+
provider: "v8",
|
|
30
|
+
reporter: ["text", "json"],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|