@vedangiitb/qwintly-core 1.0.2
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.md +8 -0
- package/dist/ai/ai.d.ts +2 -0
- package/dist/ai/ai.d.ts.map +1 -0
- package/dist/ai/ai.js +2 -0
- package/dist/ai/ai.js.map +1 -0
- package/dist/ai/generate/gemini.client.d.ts +15 -0
- package/dist/ai/generate/gemini.client.d.ts.map +1 -0
- package/dist/ai/generate/gemini.client.js +39 -0
- package/dist/ai/generate/gemini.client.js.map +1 -0
- package/dist/ai/generate/generateClient.d.ts +3 -0
- package/dist/ai/generate/generateClient.d.ts.map +1 -0
- package/dist/ai/generate/generateClient.js +8 -0
- package/dist/ai/generate/generateClient.js.map +1 -0
- package/dist/ai/toolLoop/toolLoopContext.d.ts +33 -0
- package/dist/ai/toolLoop/toolLoopContext.d.ts.map +1 -0
- package/dist/ai/toolLoop/toolLoopContext.js +112 -0
- package/dist/ai/toolLoop/toolLoopContext.js.map +1 -0
- package/dist/ai/toolLoop/toolLoopRunner.d.ts +43 -0
- package/dist/ai/toolLoop/toolLoopRunner.d.ts.map +1 -0
- package/dist/ai/toolLoop/toolLoopRunner.js +227 -0
- package/dist/ai/toolLoop/toolLoopRunner.js.map +1 -0
- package/dist/ai/toolLoop/toolLoopRunnerUtils.d.ts +51 -0
- package/dist/ai/toolLoop/toolLoopRunnerUtils.d.ts.map +1 -0
- package/dist/ai/toolLoop/toolLoopRunnerUtils.js +164 -0
- package/dist/ai/toolLoop/toolLoopRunnerUtils.js.map +1 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.d.ts +36 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.d.ts.map +1 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.js +307 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.js.map +1 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.test.d.ts +2 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.test.d.ts.map +1 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.test.js +50 -0
- package/dist/ai/tools/helpers/applyPatch.helpers.test.js.map +1 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.d.ts +2 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.d.ts.map +1 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.js +45 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.js.map +1 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.test.d.ts +2 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.test.d.ts.map +1 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.test.js +15 -0
- package/dist/ai/tools/helpers/fileSystem.helpers.test.js.map +1 -0
- package/dist/ai/tools/helpers/format.helpers.d.ts +2 -0
- package/dist/ai/tools/helpers/format.helpers.d.ts.map +1 -0
- package/dist/ai/tools/helpers/format.helpers.js +14 -0
- package/dist/ai/tools/helpers/format.helpers.js.map +1 -0
- package/dist/ai/tools/helpers/nextRouteFilePolicy.d.ts +8 -0
- package/dist/ai/tools/helpers/nextRouteFilePolicy.d.ts.map +1 -0
- package/dist/ai/tools/helpers/nextRouteFilePolicy.js +26 -0
- package/dist/ai/tools/helpers/nextRouteFilePolicy.js.map +1 -0
- package/dist/ai/tools/implementations/applyPatch.impl.d.ts +53 -0
- package/dist/ai/tools/implementations/applyPatch.impl.d.ts.map +1 -0
- package/dist/ai/tools/implementations/applyPatch.impl.js +242 -0
- package/dist/ai/tools/implementations/applyPatch.impl.js.map +1 -0
- package/dist/ai/tools/implementations/applyPatch.impl.test.d.ts +2 -0
- package/dist/ai/tools/implementations/applyPatch.impl.test.d.ts.map +1 -0
- package/dist/ai/tools/implementations/applyPatch.impl.test.js +72 -0
- package/dist/ai/tools/implementations/applyPatch.impl.test.js.map +1 -0
- package/dist/ai/tools/implementations/factories.d.ts +90 -0
- package/dist/ai/tools/implementations/factories.d.ts.map +1 -0
- package/dist/ai/tools/implementations/factories.js +26 -0
- package/dist/ai/tools/implementations/factories.js.map +1 -0
- package/dist/ai/tools/implementations/listDir.impl.d.ts +3 -0
- package/dist/ai/tools/implementations/listDir.impl.d.ts.map +1 -0
- package/dist/ai/tools/implementations/listDir.impl.js +47 -0
- package/dist/ai/tools/implementations/listDir.impl.js.map +1 -0
- package/dist/ai/tools/implementations/readFile.impl.d.ts +3 -0
- package/dist/ai/tools/implementations/readFile.impl.d.ts.map +1 -0
- package/dist/ai/tools/implementations/readFile.impl.js +23 -0
- package/dist/ai/tools/implementations/readFile.impl.js.map +1 -0
- package/dist/ai/tools/implementations/search.impl.d.ts +18 -0
- package/dist/ai/tools/implementations/search.impl.d.ts.map +1 -0
- package/dist/ai/tools/implementations/search.impl.js +74 -0
- package/dist/ai/tools/implementations/search.impl.js.map +1 -0
- package/dist/ai/tools/implementations/workspaceDeps.d.ts +22 -0
- package/dist/ai/tools/implementations/workspaceDeps.d.ts.map +1 -0
- package/dist/ai/tools/implementations/workspaceDeps.js +2 -0
- package/dist/ai/tools/implementations/workspaceDeps.js.map +1 -0
- package/dist/ai/tools/implementations/writeFile.impl.d.ts +27 -0
- package/dist/ai/tools/implementations/writeFile.impl.d.ts.map +1 -0
- package/dist/ai/tools/implementations/writeFile.impl.js +62 -0
- package/dist/ai/tools/implementations/writeFile.impl.js.map +1 -0
- package/dist/ai/tools/schemas/applyPatch.schema.d.ts +16 -0
- package/dist/ai/tools/schemas/applyPatch.schema.d.ts.map +1 -0
- package/dist/ai/tools/schemas/applyPatch.schema.js +17 -0
- package/dist/ai/tools/schemas/applyPatch.schema.js.map +1 -0
- package/dist/ai/tools/schemas/listDir.schema.d.ts +22 -0
- package/dist/ai/tools/schemas/listDir.schema.d.ts.map +1 -0
- package/dist/ai/tools/schemas/listDir.schema.js +22 -0
- package/dist/ai/tools/schemas/listDir.schema.js.map +1 -0
- package/dist/ai/tools/schemas/readFile.schema.d.ts +26 -0
- package/dist/ai/tools/schemas/readFile.schema.d.ts.map +1 -0
- package/dist/ai/tools/schemas/readFile.schema.js +26 -0
- package/dist/ai/tools/schemas/readFile.schema.js.map +1 -0
- package/dist/ai/tools/schemas/search.schema.d.ts +16 -0
- package/dist/ai/tools/schemas/search.schema.d.ts.map +1 -0
- package/dist/ai/tools/schemas/search.schema.js +16 -0
- package/dist/ai/tools/schemas/search.schema.js.map +1 -0
- package/dist/ai/tools/schemas/submitCodegenDone.schema.d.ts +16 -0
- package/dist/ai/tools/schemas/submitCodegenDone.schema.d.ts.map +1 -0
- package/dist/ai/tools/schemas/submitCodegenDone.schema.js +16 -0
- package/dist/ai/tools/schemas/submitCodegenDone.schema.js.map +1 -0
- package/dist/ai/tools/schemas/submitPlannerTasks.schema.d.ts +33 -0
- package/dist/ai/tools/schemas/submitPlannerTasks.schema.d.ts.map +1 -0
- package/dist/ai/tools/schemas/submitPlannerTasks.schema.js +31 -0
- package/dist/ai/tools/schemas/submitPlannerTasks.schema.js.map +1 -0
- package/dist/ai/tools/schemas/writeFile.schema.d.ts +20 -0
- package/dist/ai/tools/schemas/writeFile.schema.d.ts.map +1 -0
- package/dist/ai/tools/schemas/writeFile.schema.js +23 -0
- package/dist/ai/tools/schemas/writeFile.schema.js.map +1 -0
- package/dist/ai/tools/toolsets/codegenTools.d.ts +3 -0
- package/dist/ai/tools/toolsets/codegenTools.d.ts.map +1 -0
- package/dist/ai/tools/toolsets/codegenTools.js +17 -0
- package/dist/ai/tools/toolsets/codegenTools.js.map +1 -0
- package/dist/ai/tools/toolsets/plannerTools.d.ts +3 -0
- package/dist/ai/tools/toolsets/plannerTools.d.ts.map +1 -0
- package/dist/ai/tools/toolsets/plannerTools.js +17 -0
- package/dist/ai/tools/toolsets/plannerTools.js.map +1 -0
- package/dist/core.d.ts +44 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +80 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/indexer/codegenIndex.d.ts +3 -0
- package/dist/indexer/codegenIndex.d.ts.map +1 -0
- package/dist/indexer/codegenIndex.js +17 -0
- package/dist/indexer/codegenIndex.js.map +1 -0
- package/dist/indexer/data/configs.constants.d.ts +85 -0
- package/dist/indexer/data/configs.constants.d.ts.map +1 -0
- package/dist/indexer/data/configs.constants.js +136 -0
- package/dist/indexer/data/configs.constants.js.map +1 -0
- package/dist/indexer/helpers/buildFolderTree.d.ts +2 -0
- package/dist/indexer/helpers/buildFolderTree.d.ts.map +1 -0
- package/dist/indexer/helpers/buildFolderTree.js +40 -0
- package/dist/indexer/helpers/buildFolderTree.js.map +1 -0
- package/dist/indexer/plannerIndex.d.ts +3 -0
- package/dist/indexer/plannerIndex.d.ts.map +1 -0
- package/dist/indexer/plannerIndex.js +20 -0
- package/dist/indexer/plannerIndex.js.map +1 -0
- package/dist/indexer/projectInfoIndex.d.ts +3 -0
- package/dist/indexer/projectInfoIndex.d.ts.map +1 -0
- package/dist/indexer/projectInfoIndex.js +257 -0
- package/dist/indexer/projectInfoIndex.js.map +1 -0
- package/dist/indexer/validatorIndex.d.ts +3 -0
- package/dist/indexer/validatorIndex.d.ts.map +1 -0
- package/dist/indexer/validatorIndex.js +14 -0
- package/dist/indexer/validatorIndex.js.map +1 -0
- package/dist/lib/redis.d.ts +3 -0
- package/dist/lib/redis.d.ts.map +1 -0
- package/dist/lib/redis.js +7 -0
- package/dist/lib/redis.js.map +1 -0
- package/dist/lib/supabase.d.ts +2 -0
- package/dist/lib/supabase.d.ts.map +1 -0
- package/dist/lib/supabase.js +4 -0
- package/dist/lib/supabase.js.map +1 -0
- package/dist/logging/genStatus.service.d.ts +14 -0
- package/dist/logging/genStatus.service.d.ts.map +1 -0
- package/dist/logging/genStatus.service.js +36 -0
- package/dist/logging/genStatus.service.js.map +1 -0
- package/dist/logging/logging.utils.d.ts +12 -0
- package/dist/logging/logging.utils.d.ts.map +1 -0
- package/dist/logging/logging.utils.js +15 -0
- package/dist/logging/logging.utils.js.map +1 -0
- package/dist/logging/redis.service.d.ts +11 -0
- package/dist/logging/redis.service.d.ts.map +1 -0
- package/dist/logging/redis.service.js +26 -0
- package/dist/logging/redis.service.js.map +1 -0
- package/dist/repository/context.repository.d.ts +8 -0
- package/dist/repository/context.repository.d.ts.map +1 -0
- package/dist/repository/context.repository.js +59 -0
- package/dist/repository/context.repository.js.map +1 -0
- package/dist/repository/genStatus.repository.d.ts +13 -0
- package/dist/repository/genStatus.repository.d.ts.map +1 -0
- package/dist/repository/genStatus.repository.js +18 -0
- package/dist/repository/genStatus.repository.js.map +1 -0
- package/dist/repository/planTasks.repository.d.ts +9 -0
- package/dist/repository/planTasks.repository.d.ts.map +1 -0
- package/dist/repository/planTasks.repository.js +24 -0
- package/dist/repository/planTasks.repository.js.map +1 -0
- package/dist/repository/repository.d.ts +5 -0
- package/dist/repository/repository.d.ts.map +1 -0
- package/dist/repository/repository.js +7 -0
- package/dist/repository/repository.js.map +1 -0
- package/dist/types/context.types.d.ts +64 -0
- package/dist/types/context.types.d.ts.map +1 -0
- package/dist/types/context.types.js +55 -0
- package/dist/types/context.types.js.map +1 -0
- package/dist/types/events.d.ts +16 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +14 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/index/configs.types.d.ts +28 -0
- package/dist/types/index/configs.types.d.ts.map +1 -0
- package/dist/types/index/configs.types.js +2 -0
- package/dist/types/index/configs.types.js.map +1 -0
- package/dist/types/index/conventions.types.d.ts +40 -0
- package/dist/types/index/conventions.types.d.ts.map +1 -0
- package/dist/types/index/conventions.types.js +2 -0
- package/dist/types/index/conventions.types.js.map +1 -0
- package/dist/types/index/index.types.d.ts +16 -0
- package/dist/types/index/index.types.d.ts.map +1 -0
- package/dist/types/index/index.types.js +2 -0
- package/dist/types/index/index.types.js.map +1 -0
- package/dist/types/index/indexing.types.d.ts +9 -0
- package/dist/types/index/indexing.types.d.ts.map +1 -0
- package/dist/types/index/indexing.types.js +2 -0
- package/dist/types/index/indexing.types.js.map +1 -0
- package/dist/types/projectInfo.types.d.ts +16 -0
- package/dist/types/projectInfo.types.d.ts.map +1 -0
- package/dist/types/projectInfo.types.js +2 -0
- package/dist/types/projectInfo.types.js.map +1 -0
- package/dist/types/updatePlan.types.d.ts +34 -0
- package/dist/types/updatePlan.types.d.ts.map +1 -0
- package/dist/types/updatePlan.types.js +18 -0
- package/dist/types/updatePlan.types.js.map +1 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +6 -0
- package/dist/utils/utils.js.map +1 -0
- package/dist/utils/workspace.d.ts +13 -0
- package/dist/utils/workspace.d.ts.map +1 -0
- package/dist/utils/workspace.js +92 -0
- package/dist/utils/workspace.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export declare const ListDirSchema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type;
|
|
7
|
+
properties: {
|
|
8
|
+
path: {
|
|
9
|
+
type: Type;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
depth: {
|
|
13
|
+
type: Type;
|
|
14
|
+
description: string;
|
|
15
|
+
minimum: number;
|
|
16
|
+
maximum: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
required: string[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=listDir.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listDir.schema.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/listDir.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;CAmBzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export const ListDirSchema = {
|
|
3
|
+
name: "list_dir",
|
|
4
|
+
description: "Lists directory/folder structure for a given path.",
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type.OBJECT,
|
|
7
|
+
properties: {
|
|
8
|
+
path: {
|
|
9
|
+
type: Type.STRING,
|
|
10
|
+
description: "Absolute path of the directory to list.",
|
|
11
|
+
},
|
|
12
|
+
depth: {
|
|
13
|
+
type: Type.INTEGER,
|
|
14
|
+
description: "Max depth to traverse (maximum 3).",
|
|
15
|
+
minimum: 1,
|
|
16
|
+
maximum: 3,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ["path", "depth"],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=listDir.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listDir.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/listDir.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,oDAAoD;IACjE,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,WAAW,EAAE,yCAAyC;aACvD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,IAAI,CAAC,OAAO;gBAClB,WAAW,EAAE,oCAAoC;gBACjD,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,CAAC;aACX;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;KAC5B;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\n\nexport const ListDirSchema = {\n name: \"list_dir\",\n description: \"Lists directory/folder structure for a given path.\",\n parameters: {\n type: Type.OBJECT,\n properties: {\n path: {\n type: Type.STRING,\n description: \"Absolute path of the directory to list.\",\n },\n depth: {\n type: Type.INTEGER,\n description: \"Max depth to traverse (maximum 3).\",\n minimum: 1,\n maximum: 3,\n },\n },\n required: [\"path\", \"depth\"],\n },\n};\n\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export declare const ReadFileSchema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type;
|
|
7
|
+
properties: {
|
|
8
|
+
path: {
|
|
9
|
+
type: Type;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
start_line: {
|
|
13
|
+
type: Type;
|
|
14
|
+
description: string;
|
|
15
|
+
minimum: number;
|
|
16
|
+
};
|
|
17
|
+
end_line: {
|
|
18
|
+
type: Type;
|
|
19
|
+
description: string;
|
|
20
|
+
minimum: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=readFile.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readFile.schema.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/readFile.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CA2B1B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export const ReadFileSchema = {
|
|
3
|
+
name: "read_file",
|
|
4
|
+
description: "Reads a specific text file from the local codebase and returns its contents. Supports partial reading via line ranges. If end_line is omitted, the response is capped to ~200 lines; request additional ranges with start_line/end_line for more context.",
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type.OBJECT,
|
|
7
|
+
properties: {
|
|
8
|
+
path: {
|
|
9
|
+
type: Type.STRING,
|
|
10
|
+
description: "The relative path to the file from the project root (e.g., 'src/index.ts').",
|
|
11
|
+
},
|
|
12
|
+
start_line: {
|
|
13
|
+
type: Type.INTEGER,
|
|
14
|
+
description: "The 1-based line number to start reading from. Defaults to the beginning of the file.",
|
|
15
|
+
minimum: 1,
|
|
16
|
+
},
|
|
17
|
+
end_line: {
|
|
18
|
+
type: Type.INTEGER,
|
|
19
|
+
description: "The 1-based line number to stop reading at (inclusive). If omitted, reads until the end of the file.",
|
|
20
|
+
minimum: 1,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
required: ["path"],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=readFile.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readFile.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/readFile.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,2PAA2P;IAC7P,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,WAAW,EACT,6EAA6E;aAChF;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,IAAI,CAAC,OAAO;gBAClB,WAAW,EACT,uFAAuF;gBACzF,OAAO,EAAE,CAAC;aACX;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,IAAI,CAAC,OAAO;gBAClB,WAAW,EACT,sGAAsG;gBACxG,OAAO,EAAE,CAAC;aACX;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\n\nexport const ReadFileSchema = {\n name: \"read_file\",\n description:\n \"Reads a specific text file from the local codebase and returns its contents. Supports partial reading via line ranges. If end_line is omitted, the response is capped to ~200 lines; request additional ranges with start_line/end_line for more context.\",\n parameters: {\n type: Type.OBJECT,\n properties: {\n path: {\n type: Type.STRING,\n description:\n \"The relative path to the file from the project root (e.g., 'src/index.ts').\",\n },\n start_line: {\n type: Type.INTEGER,\n description:\n \"The 1-based line number to start reading from. Defaults to the beginning of the file.\",\n minimum: 1,\n },\n end_line: {\n type: Type.INTEGER,\n description:\n \"The 1-based line number to stop reading at (inclusive). If omitted, reads until the end of the file.\",\n minimum: 1,\n },\n },\n required: [\"path\"],\n },\n};\n\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export declare const SearchSchema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type;
|
|
7
|
+
properties: {
|
|
8
|
+
search_query: {
|
|
9
|
+
type: Type;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
required: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=search.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.schema.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/search.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAaxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export const SearchSchema = {
|
|
3
|
+
name: "search",
|
|
4
|
+
description: "Search the codebase using ripgrep (rg).",
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type.OBJECT,
|
|
7
|
+
properties: {
|
|
8
|
+
search_query: {
|
|
9
|
+
type: Type.STRING,
|
|
10
|
+
description: "The search query passed to rg (e.g., 'fetchChatMessages\\(').",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
required: ["search_query"],
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=search.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/search.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,yCAAyC;IACtD,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,WAAW,EAAE,+DAA+D;aAC7E;SACF;QACD,QAAQ,EAAE,CAAC,cAAc,CAAC;KAC3B;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\n\nexport const SearchSchema = {\n name: \"search\",\n description: \"Search the codebase using ripgrep (rg).\",\n parameters: {\n type: Type.OBJECT,\n properties: {\n search_query: {\n type: Type.STRING,\n description: \"The search query passed to rg (e.g., 'fetchChatMessages\\\\(').\",\n },\n },\n required: [\"search_query\"],\n },\n};\n\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export declare const SubmitCodegenDoneSchema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type;
|
|
7
|
+
properties: {
|
|
8
|
+
summary: {
|
|
9
|
+
type: Type;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
required: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=submitCodegenDone.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitCodegenDone.schema.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/submitCodegenDone.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;CAcnC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export const SubmitCodegenDoneSchema = {
|
|
3
|
+
name: "submit_codegen_done",
|
|
4
|
+
description: "Signals the code-generation agent is finished implementing the task. Calling this tool ends the codegen phase.",
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type.OBJECT,
|
|
7
|
+
properties: {
|
|
8
|
+
summary: {
|
|
9
|
+
type: Type.STRING,
|
|
10
|
+
description: "Short summary of what changed.",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
required: ["summary"],
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=submitCodegenDone.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitCodegenDone.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/submitCodegenDone.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACT,gHAAgH;IAClH,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,WAAW,EAAE,gCAAgC;aAC9C;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\n\nexport const SubmitCodegenDoneSchema = {\n name: \"submit_codegen_done\",\n description:\n \"Signals the code-generation agent is finished implementing the task. Calling this tool ends the codegen phase.\",\n parameters: {\n type: Type.OBJECT,\n properties: {\n summary: {\n type: Type.STRING,\n description: \"Short summary of what changed.\",\n },\n },\n required: [\"summary\"],\n },\n};\n\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export declare const SubmitPlannerTasksSchema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type;
|
|
7
|
+
properties: {
|
|
8
|
+
planner_tasks: {
|
|
9
|
+
type: Type;
|
|
10
|
+
description: string;
|
|
11
|
+
items: {
|
|
12
|
+
type: Type;
|
|
13
|
+
properties: {
|
|
14
|
+
description: {
|
|
15
|
+
type: Type;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
targets: {
|
|
19
|
+
type: Type;
|
|
20
|
+
description: string;
|
|
21
|
+
items: {
|
|
22
|
+
type: Type;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
required: string[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
required: string[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=submitPlannerTasks.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitPlannerTasks.schema.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/submitPlannerTasks.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BpC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export const SubmitPlannerTasksSchema = {
|
|
3
|
+
name: "submit_planner_tasks",
|
|
4
|
+
description: "Finalizes and returns the planner tasks for the code-generation agent. Calling this tool ends the planning phase.",
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type.OBJECT,
|
|
7
|
+
properties: {
|
|
8
|
+
planner_tasks: {
|
|
9
|
+
type: Type.ARRAY,
|
|
10
|
+
description: "Ordered list of atomic tasks. Each task must include a clear description and a list of workspace paths to modify or reference.",
|
|
11
|
+
items: {
|
|
12
|
+
type: Type.OBJECT,
|
|
13
|
+
properties: {
|
|
14
|
+
description: {
|
|
15
|
+
type: Type.STRING,
|
|
16
|
+
description: "Atomic, unambiguous instruction for the code-generation agent.",
|
|
17
|
+
},
|
|
18
|
+
targets: {
|
|
19
|
+
type: Type.ARRAY,
|
|
20
|
+
description: "Workspace-relative file paths that the code-generation agent should modify or reference for this task.",
|
|
21
|
+
items: { type: Type.STRING },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
required: ["description", "targets"],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
required: ["planner_tasks"],
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=submitPlannerTasks.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitPlannerTasks.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/submitPlannerTasks.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,mHAAmH;IACrH,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,aAAa,EAAE;gBACb,IAAI,EAAE,IAAI,CAAC,KAAK;gBAChB,WAAW,EACT,gIAAgI;gBAClI,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,CAAC,MAAM;oBACjB,UAAU,EAAE;wBACV,WAAW,EAAE;4BACX,IAAI,EAAE,IAAI,CAAC,MAAM;4BACjB,WAAW,EAAE,gEAAgE;yBAC9E;wBACD,OAAO,EAAE;4BACP,IAAI,EAAE,IAAI,CAAC,KAAK;4BAChB,WAAW,EACT,wGAAwG;4BAC1G,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;yBAC7B;qBACF;oBACD,QAAQ,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC;iBACrC;aACF;SACF;QACD,QAAQ,EAAE,CAAC,eAAe,CAAC;KAC5B;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\n\nexport const SubmitPlannerTasksSchema = {\n name: \"submit_planner_tasks\",\n description:\n \"Finalizes and returns the planner tasks for the code-generation agent. Calling this tool ends the planning phase.\",\n parameters: {\n type: Type.OBJECT,\n properties: {\n planner_tasks: {\n type: Type.ARRAY,\n description:\n \"Ordered list of atomic tasks. Each task must include a clear description and a list of workspace paths to modify or reference.\",\n items: {\n type: Type.OBJECT,\n properties: {\n description: {\n type: Type.STRING,\n description: \"Atomic, unambiguous instruction for the code-generation agent.\",\n },\n targets: {\n type: Type.ARRAY,\n description:\n \"Workspace-relative file paths that the code-generation agent should modify or reference for this task.\",\n items: { type: Type.STRING },\n },\n },\n required: [\"description\", \"targets\"],\n },\n },\n },\n required: [\"planner_tasks\"],\n },\n};\n\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export declare const WriteFileSchema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: Type;
|
|
7
|
+
properties: {
|
|
8
|
+
path: {
|
|
9
|
+
type: Type;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
content: {
|
|
13
|
+
type: Type;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
required: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=writeFile.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeFile.schema.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/writeFile.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CAuB3B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Type } from "@google/genai";
|
|
2
|
+
export const WriteFileSchema = {
|
|
3
|
+
name: "write_file",
|
|
4
|
+
description: 'Writes full file content to the given path within the workspace (overwrites existing file). ' +
|
|
5
|
+
'Policy: only "page.config.ts" and "page.tsx" route files are allowed. ' +
|
|
6
|
+
'"page.tsx" can only be created with the exact required template and must never be edited after creation.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: Type.OBJECT,
|
|
9
|
+
properties: {
|
|
10
|
+
path: {
|
|
11
|
+
type: Type.STRING,
|
|
12
|
+
description: 'Absolute or workspace-relative path to the file to write (must be within the workspace). ' +
|
|
13
|
+
'Must end with "page.config.ts" or "page.tsx".',
|
|
14
|
+
},
|
|
15
|
+
content: {
|
|
16
|
+
type: Type.STRING,
|
|
17
|
+
description: 'Complete file contents to write. For "page.tsx" creation, this must match the required template exactly.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
required: ["path", "content"],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=writeFile.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeFile.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/writeFile.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,8FAA8F;QAC9F,wEAAwE;QACxE,0GAA0G;IAC5G,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,WAAW,EACT,2FAA2F;oBAC3F,+CAA+C;aAClD;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,WAAW,EACT,0GAA0G;aAC7G;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;KAC9B;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\n\nexport const WriteFileSchema = {\n name: \"write_file\",\n description:\n 'Writes full file content to the given path within the workspace (overwrites existing file). ' +\n 'Policy: only \"page.config.ts\" and \"page.tsx\" route files are allowed. ' +\n '\"page.tsx\" can only be created with the exact required template and must never be edited after creation.',\n parameters: {\n type: Type.OBJECT,\n properties: {\n path: {\n type: Type.STRING,\n description:\n 'Absolute or workspace-relative path to the file to write (must be within the workspace). ' +\n 'Must end with \"page.config.ts\" or \"page.tsx\".',\n },\n content: {\n type: Type.STRING,\n description:\n 'Complete file contents to write. For \"page.tsx\" creation, this must match the required template exactly.',\n },\n },\n required: [\"path\", \"content\"],\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegenTools.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/toolsets/codegenTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMrC,eAAO,MAAM,YAAY,QAAO,IAAI,EAWnC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReadFileSchema } from "../schemas/readFile.schema.js";
|
|
2
|
+
import { ApplyPatchSchema } from "../schemas/applyPatch.schema.js";
|
|
3
|
+
import { WriteFileSchema } from "../schemas/writeFile.schema.js";
|
|
4
|
+
import { SubmitCodegenDoneSchema } from "../schemas/submitCodegenDone.schema.js";
|
|
5
|
+
export const codegenTools = () => {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
functionDeclarations: [
|
|
9
|
+
ReadFileSchema,
|
|
10
|
+
ApplyPatchSchema,
|
|
11
|
+
WriteFileSchema,
|
|
12
|
+
SubmitCodegenDoneSchema,
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=codegenTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegenTools.js","sourceRoot":"","sources":["../../../../src/ai/tools/toolsets/codegenTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAW,EAAE;IACvC,OAAO;QACL;YACE,oBAAoB,EAAE;gBACpB,cAAc;gBACd,gBAAgB;gBAChB,eAAe;gBACf,uBAAuB;aACxB;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Tool } from \"@google/genai\";\nimport { ReadFileSchema } from \"../schemas/readFile.schema.js\";\nimport { ApplyPatchSchema } from \"../schemas/applyPatch.schema.js\";\nimport { WriteFileSchema } from \"../schemas/writeFile.schema.js\";\nimport { SubmitCodegenDoneSchema } from \"../schemas/submitCodegenDone.schema.js\";\n\nexport const codegenTools = (): Tool[] => {\n return [\n {\n functionDeclarations: [\n ReadFileSchema,\n ApplyPatchSchema,\n WriteFileSchema,\n SubmitCodegenDoneSchema,\n ],\n },\n ];\n};\n\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plannerTools.d.ts","sourceRoot":"","sources":["../../../../src/ai/tools/toolsets/plannerTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMrC,eAAO,MAAM,YAAY,QAAO,IAAI,EAWnC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReadFileSchema } from "../schemas/readFile.schema.js";
|
|
2
|
+
import { SearchSchema } from "../schemas/search.schema.js";
|
|
3
|
+
import { ListDirSchema } from "../schemas/listDir.schema.js";
|
|
4
|
+
import { SubmitPlannerTasksSchema } from "../schemas/submitPlannerTasks.schema.js";
|
|
5
|
+
export const plannerTools = () => {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
functionDeclarations: [
|
|
9
|
+
ReadFileSchema,
|
|
10
|
+
SearchSchema,
|
|
11
|
+
ListDirSchema,
|
|
12
|
+
SubmitPlannerTasksSchema,
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=plannerTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plannerTools.js","sourceRoot":"","sources":["../../../../src/ai/tools/toolsets/plannerTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAW,EAAE;IACvC,OAAO;QACL;YACE,oBAAoB,EAAE;gBACpB,cAAc;gBACd,YAAY;gBACZ,aAAa;gBACb,wBAAwB;aACzB;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Tool } from \"@google/genai\";\nimport { ReadFileSchema } from \"../schemas/readFile.schema.js\";\nimport { SearchSchema } from \"../schemas/search.schema.js\";\nimport { ListDirSchema } from \"../schemas/listDir.schema.js\";\nimport { SubmitPlannerTasksSchema } from \"../schemas/submitPlannerTasks.schema.js\";\n\nexport const plannerTools = (): Tool[] => {\n return [\n {\n functionDeclarations: [\n ReadFileSchema,\n SearchSchema,\n ListDirSchema,\n SubmitPlannerTasksSchema,\n ],\n },\n ];\n};\n\n"]}
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Tool } from "@google/genai";
|
|
2
|
+
import { ToolHandler, ToolLoopResult } from "./ai/toolLoop/toolLoopRunner.js";
|
|
3
|
+
import { EventType, GenStep } from "./types/events.js";
|
|
4
|
+
import { CodegenIndex, PlannerIndex, ValidatorIndex } from "./types/index/index.types.js";
|
|
5
|
+
import type { ProjectInfo } from "./types/projectInfo.types.js";
|
|
6
|
+
export type QwintlyCoreOptions = {
|
|
7
|
+
chatId: string;
|
|
8
|
+
sessionId: string;
|
|
9
|
+
workspacePath: string;
|
|
10
|
+
source: string;
|
|
11
|
+
step: GenStep;
|
|
12
|
+
supabase: {
|
|
13
|
+
endpoint: string;
|
|
14
|
+
secret: string;
|
|
15
|
+
};
|
|
16
|
+
upstash: {
|
|
17
|
+
url: string;
|
|
18
|
+
token: string;
|
|
19
|
+
};
|
|
20
|
+
gemini: {
|
|
21
|
+
apiKey: string;
|
|
22
|
+
model?: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare class QwintlyCore {
|
|
26
|
+
readonly chatId: string;
|
|
27
|
+
readonly sessionId: string;
|
|
28
|
+
readonly workspacePath: string;
|
|
29
|
+
readonly source: string;
|
|
30
|
+
readonly step: GenStep;
|
|
31
|
+
private readonly aiClient;
|
|
32
|
+
private readonly statusRepo;
|
|
33
|
+
private readonly ctxRepo;
|
|
34
|
+
private readonly redisStatusPublisher;
|
|
35
|
+
constructor(options: QwintlyCoreOptions);
|
|
36
|
+
runAiFlow(initialContents: any[], tools: Tool[], handlers: Record<string, ToolHandler>, maxSteps: number, terminalToolNames: string[]): Promise<ToolLoopResult>;
|
|
37
|
+
streamLog(message: string, eventType: EventType): Promise<void>;
|
|
38
|
+
buildProjectInfoIdx(): Promise<ProjectInfo>;
|
|
39
|
+
private buildIndex;
|
|
40
|
+
buildPlannerIdx(): Promise<PlannerIndex>;
|
|
41
|
+
buildCodegenIdx(): Promise<CodegenIndex>;
|
|
42
|
+
buildValidatorIdx(): Promise<ValidatorIndex>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,IAAI,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAGL,WAAW,EACX,cAAc,EACf,MAAM,iCAAiC,CAAC;AASzC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C,CAAC;AAiBF,qBAAa,WAAW;IACtB,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,IAAI,EAAE,OAAO,CAAC;IAE9B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAoB;gBAE7C,OAAO,EAAE,kBAAkB;IA0C1B,SAAS,CACpB,eAAe,EAAE,GAAG,EAAE,EACtB,KAAK,EAAE,IAAI,EAAE,EACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACrC,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EAAE,GAC1B,OAAO,CAAC,cAAc,CAAC;IAmBb,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB/D,mBAAmB,IAAI,OAAO,CAAC,WAAW,CAAC;YAQ1C,UAAU;IAMX,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC;IAIxC,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC;IAIxC,iBAAiB,IAAI,OAAO,CAAC,cAAc,CAAC;CAG1D"}
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { getClient } from "./ai/generate/generateClient.js";
|
|
2
|
+
import { runToolLoop, } from "./ai/toolLoop/toolLoopRunner.js";
|
|
3
|
+
import { buildCodegenIndex } from "./indexer/codegenIndex.js";
|
|
4
|
+
import { buildPlannerIndex } from "./indexer/plannerIndex.js";
|
|
5
|
+
import { computeProjectInfo } from "./indexer/projectInfoIndex.js";
|
|
6
|
+
import { buildValidatorIndex } from "./indexer/validatorIndex.js";
|
|
7
|
+
import { statusService } from "./logging/genStatus.service.js";
|
|
8
|
+
import { SendStatusToRedis } from "./logging/redis.service.js";
|
|
9
|
+
import { ContextRepository } from "./repository/context.repository.js";
|
|
10
|
+
import { GenStatusRepository } from "./repository/genStatus.repository.js";
|
|
11
|
+
import { assertNonEmptyString } from "./utils/utils.js";
|
|
12
|
+
export class QwintlyCore {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
assertNonEmptyString(options.chatId, "chatId");
|
|
15
|
+
assertNonEmptyString(options.sessionId, "sessionId");
|
|
16
|
+
assertNonEmptyString(options.workspacePath, "workspacePath");
|
|
17
|
+
assertNonEmptyString(options.source, "source");
|
|
18
|
+
assertNonEmptyString(options.step, "step");
|
|
19
|
+
assertNonEmptyString(options.supabase?.endpoint, "supabase.endpoint");
|
|
20
|
+
assertNonEmptyString(options.supabase?.secret, "supabase.secret");
|
|
21
|
+
assertNonEmptyString(options.upstash?.url, "upstash.url");
|
|
22
|
+
assertNonEmptyString(options.upstash?.token, "upstash.token");
|
|
23
|
+
assertNonEmptyString(options.gemini?.apiKey, "gemini.apiKey");
|
|
24
|
+
this.chatId = options.chatId;
|
|
25
|
+
this.sessionId = options.sessionId;
|
|
26
|
+
this.workspacePath = options.workspacePath;
|
|
27
|
+
this.source = options.source;
|
|
28
|
+
this.step = options.step;
|
|
29
|
+
this.aiClient = getClient("gemini", options.gemini.apiKey, options.gemini.model);
|
|
30
|
+
this.statusRepo = new GenStatusRepository(options.supabase.endpoint, options.supabase.secret);
|
|
31
|
+
this.ctxRepo = new ContextRepository(options.supabase.endpoint, options.supabase.secret);
|
|
32
|
+
this.redisStatusPublisher = new SendStatusToRedis(options.upstash.url, options.upstash.token);
|
|
33
|
+
console.log(`QwintlyCore initialized (chatId=${this.chatId}, sessionId=${this.sessionId})`);
|
|
34
|
+
}
|
|
35
|
+
async runAiFlow(initialContents, tools, handlers, maxSteps, terminalToolNames) {
|
|
36
|
+
const toolLoopOptions = {
|
|
37
|
+
initialContents: initialContents,
|
|
38
|
+
tools: tools,
|
|
39
|
+
handlers: handlers,
|
|
40
|
+
maxSteps: maxSteps,
|
|
41
|
+
terminalToolNames: terminalToolNames,
|
|
42
|
+
aiCall: (request, options) => this.aiClient.aiResponse(request, {
|
|
43
|
+
tools: options.tools,
|
|
44
|
+
toolCallingMode: options.toolCallingMode,
|
|
45
|
+
}),
|
|
46
|
+
logger: this.streamLog.bind(this),
|
|
47
|
+
};
|
|
48
|
+
const result = await runToolLoop(toolLoopOptions);
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
async streamLog(message, eventType) {
|
|
52
|
+
assertNonEmptyString(message, "message");
|
|
53
|
+
await statusService(this.chatId, this.sessionId, eventType, this.step, message, this.source, {
|
|
54
|
+
repository: {
|
|
55
|
+
persist: this.statusRepo.persistStatusMessage.bind(this.statusRepo),
|
|
56
|
+
},
|
|
57
|
+
publisher: {
|
|
58
|
+
publish: this.redisStatusPublisher.sendStatusToRedis.bind(this.redisStatusPublisher),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async buildProjectInfoIdx() {
|
|
63
|
+
const projectInfo = await computeProjectInfo(this.workspacePath);
|
|
64
|
+
await this.ctxRepo.updateProjectInfo(this.chatId, projectInfo);
|
|
65
|
+
return projectInfo;
|
|
66
|
+
}
|
|
67
|
+
async buildIndex(builder) {
|
|
68
|
+
return builder(this.workspacePath);
|
|
69
|
+
}
|
|
70
|
+
async buildPlannerIdx() {
|
|
71
|
+
return this.buildIndex(buildPlannerIndex);
|
|
72
|
+
}
|
|
73
|
+
async buildCodegenIdx() {
|
|
74
|
+
return this.buildIndex(buildCodegenIndex);
|
|
75
|
+
}
|
|
76
|
+
async buildValidatorIdx() {
|
|
77
|
+
return this.buildIndex(buildValidatorIndex);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"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","sourcesContent":["import { FunctionCallingConfigMode, Tool } from \"@google/genai\";\nimport { getClient } from \"./ai/generate/generateClient.js\";\nimport {\n runToolLoop,\n RunToolLoopOptions,\n ToolHandler,\n ToolLoopResult,\n} from \"./ai/toolLoop/toolLoopRunner.js\";\nimport { buildCodegenIndex } from \"./indexer/codegenIndex.js\";\nimport { buildPlannerIndex } from \"./indexer/plannerIndex.js\";\nimport { computeProjectInfo } from \"./indexer/projectInfoIndex.js\";\nimport { buildValidatorIndex } from \"./indexer/validatorIndex.js\";\nimport { statusService } from \"./logging/genStatus.service.js\";\nimport { SendStatusToRedis } from \"./logging/redis.service.js\";\nimport { ContextRepository } from \"./repository/context.repository.js\";\nimport { GenStatusRepository } from \"./repository/genStatus.repository.js\";\nimport { EventType, GenStep } from \"./types/events.js\";\nimport {\n CodegenIndex,\n PlannerIndex,\n ValidatorIndex,\n} from \"./types/index/index.types.js\";\nimport type { ProjectInfo } from \"./types/projectInfo.types.js\";\nimport { assertNonEmptyString } from \"./utils/utils.js\";\n\nexport type QwintlyCoreOptions = {\n chatId: string;\n sessionId: string;\n workspacePath: string;\n source: string;\n step: GenStep;\n supabase: { endpoint: string; secret: string };\n upstash: { url: string; token: string };\n gemini: { apiKey: string; model?: string };\n};\n\ntype AiResponseOptions = {\n tools?: Tool[];\n toolCallingMode?: FunctionCallingConfigMode;\n};\n\ntype AiClient = {\n aiResponse: (\n request: unknown,\n options?: AiResponseOptions,\n ) => Promise<{\n functionCalls?: any[];\n text?: string;\n }>;\n};\n\nexport class QwintlyCore {\n public readonly chatId: string;\n public readonly sessionId: string;\n public readonly workspacePath: string;\n public readonly source: string;\n public readonly step: GenStep;\n\n private readonly aiClient: AiClient;\n private readonly statusRepo: GenStatusRepository;\n private readonly ctxRepo: ContextRepository;\n private readonly redisStatusPublisher: SendStatusToRedis;\n\n constructor(options: QwintlyCoreOptions) {\n assertNonEmptyString(options.chatId, \"chatId\");\n assertNonEmptyString(options.sessionId, \"sessionId\");\n assertNonEmptyString(options.workspacePath, \"workspacePath\");\n assertNonEmptyString(options.source, \"source\");\n assertNonEmptyString(options.step, \"step\");\n assertNonEmptyString(options.supabase?.endpoint, \"supabase.endpoint\");\n assertNonEmptyString(options.supabase?.secret, \"supabase.secret\");\n assertNonEmptyString(options.upstash?.url, \"upstash.url\");\n assertNonEmptyString(options.upstash?.token, \"upstash.token\");\n assertNonEmptyString(options.gemini?.apiKey, \"gemini.apiKey\");\n\n this.chatId = options.chatId;\n this.sessionId = options.sessionId;\n this.workspacePath = options.workspacePath;\n this.source = options.source;\n this.step = options.step;\n\n this.aiClient = getClient(\n \"gemini\",\n options.gemini.apiKey,\n options.gemini.model,\n ) as AiClient;\n\n this.statusRepo = new GenStatusRepository(\n options.supabase.endpoint,\n options.supabase.secret,\n );\n this.ctxRepo = new ContextRepository(\n options.supabase.endpoint,\n options.supabase.secret,\n );\n this.redisStatusPublisher = new SendStatusToRedis(\n options.upstash.url,\n options.upstash.token,\n );\n\n console.log(\n `QwintlyCore initialized (chatId=${this.chatId}, sessionId=${this.sessionId})`,\n );\n }\n\n public async runAiFlow(\n initialContents: any[],\n tools: Tool[],\n handlers: Record<string, ToolHandler>,\n maxSteps: number,\n terminalToolNames: string[],\n ): Promise<ToolLoopResult> {\n const toolLoopOptions: RunToolLoopOptions = {\n initialContents: initialContents,\n tools: tools,\n handlers: handlers,\n maxSteps: maxSteps,\n terminalToolNames: terminalToolNames,\n aiCall: (request, options) =>\n this.aiClient.aiResponse(request, {\n tools: options.tools,\n toolCallingMode: options.toolCallingMode,\n }),\n logger: this.streamLog.bind(this),\n };\n\n const result = await runToolLoop(toolLoopOptions);\n return result;\n }\n\n public async streamLog(message: string, eventType: EventType): Promise<void> {\n assertNonEmptyString(message, \"message\");\n await statusService(\n this.chatId,\n this.sessionId,\n eventType,\n this.step,\n message,\n this.source,\n {\n repository: {\n persist: this.statusRepo.persistStatusMessage.bind(this.statusRepo),\n },\n publisher: {\n publish: this.redisStatusPublisher.sendStatusToRedis.bind(\n this.redisStatusPublisher,\n ),\n },\n },\n );\n }\n\n public async buildProjectInfoIdx(): Promise<ProjectInfo> {\n const projectInfo = await computeProjectInfo(this.workspacePath);\n\n await this.ctxRepo.updateProjectInfo(this.chatId, projectInfo);\n\n return projectInfo;\n }\n\n private async buildIndex<T>(\n builder: (path: string) => Promise<T>,\n ): Promise<T> {\n return builder(this.workspacePath);\n }\n\n public async buildPlannerIdx(): Promise<PlannerIndex> {\n return this.buildIndex(buildPlannerIndex);\n }\n\n public async buildCodegenIdx(): Promise<CodegenIndex> {\n return this.buildIndex(buildCodegenIndex);\n }\n\n public async buildValidatorIdx(): Promise<ValidatorIndex> {\n return this.buildIndex(buildValidatorIndex);\n }\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC","sourcesContent":["// src/index.ts\r\nexport {QwintlyCore} from \"./core.js\";"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegenIndex.d.ts","sourceRoot":"","sources":["../../src/indexer/codegenIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAO7D,eAAO,MAAM,iBAAiB,GAC5B,SAAS,MAAM,KACd,OAAO,CAAC,YAAY,CActB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { projectConfigs, projectConventions, } from "./data/configs.constants.js";
|
|
2
|
+
import { buildFolderTree } from "./helpers/buildFolderTree.js";
|
|
3
|
+
export const buildCodegenIndex = async (rootDir) => {
|
|
4
|
+
const folderTree = await buildFolderTree(rootDir);
|
|
5
|
+
return {
|
|
6
|
+
folderTree,
|
|
7
|
+
projectConfigs: {
|
|
8
|
+
frameworkConfig: projectConfigs.frameworkConfig,
|
|
9
|
+
runtimeConfig: projectConfigs.runtimeConfig,
|
|
10
|
+
},
|
|
11
|
+
projectConventions: {
|
|
12
|
+
importsConventions: projectConventions.importsConventions,
|
|
13
|
+
uiArchitecture: projectConventions.uiArchitecture,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=codegenIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegenIndex.js","sourceRoot":"","sources":["../../src/indexer/codegenIndex.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EACpC,OAAe,EACQ,EAAE;IACzB,MAAM,UAAU,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;IAElD,OAAO;QACL,UAAU;QACV,cAAc,EAAE;YACd,eAAe,EAAE,cAAc,CAAC,eAAe;YAC/C,aAAa,EAAE,cAAc,CAAC,aAAa;SAC5C;QACD,kBAAkB,EAAE;YAClB,kBAAkB,EAAE,kBAAkB,CAAC,kBAAkB;YACzD,cAAc,EAAE,kBAAkB,CAAC,cAAc;SAClD;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { CodegenIndex } from \"../types/index/index.types.js\";\nimport {\n projectConfigs,\n projectConventions,\n} from \"./data/configs.constants.js\";\nimport { buildFolderTree } from \"./helpers/buildFolderTree.js\";\n\nexport const buildCodegenIndex = async (\n rootDir: string,\n): Promise<CodegenIndex> => {\n const folderTree = await buildFolderTree(rootDir);\n\n return {\n folderTree,\n projectConfigs: {\n frameworkConfig: projectConfigs.frameworkConfig,\n runtimeConfig: projectConfigs.runtimeConfig,\n },\n projectConventions: {\n importsConventions: projectConventions.importsConventions,\n uiArchitecture: projectConventions.uiArchitecture,\n },\n };\n};\n"]}
|