@kkeve/suite 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.
Files changed (63) hide show
  1. package/dist/agent/factory.d.ts +25 -0
  2. package/dist/agent/factory.js +99 -0
  3. package/dist/agent/index.d.ts +3 -0
  4. package/dist/agent/index.js +7 -0
  5. package/dist/agent/loader.d.ts +22 -0
  6. package/dist/agent/loader.js +117 -0
  7. package/dist/agent/types.d.ts +9 -0
  8. package/dist/agent/types.js +2 -0
  9. package/dist/agent-loop/complete-task.d.ts +28 -0
  10. package/dist/agent-loop/complete-task.js +70 -0
  11. package/dist/agent-loop/index.d.ts +16 -0
  12. package/dist/agent-loop/index.js +26 -0
  13. package/dist/agent-loop/loop.d.ts +42 -0
  14. package/dist/agent-loop/loop.js +282 -0
  15. package/dist/agent-loop/runtime.d.ts +40 -0
  16. package/dist/agent-loop/runtime.js +163 -0
  17. package/dist/agent-loop/types.d.ts +161 -0
  18. package/dist/agent-loop/types.js +105 -0
  19. package/dist/context/index.d.ts +8 -0
  20. package/dist/context/index.js +29 -0
  21. package/dist/context/tokenCalculation.d.ts +55 -0
  22. package/dist/context/tokenCalculation.js +95 -0
  23. package/dist/context/truncation.d.ts +67 -0
  24. package/dist/context/truncation.js +142 -0
  25. package/dist/context/types.d.ts +7 -0
  26. package/dist/context/types.js +27 -0
  27. package/dist/index.d.ts +23 -0
  28. package/dist/index.js +45 -0
  29. package/dist/llm/OpenAIClient.d.ts +31 -0
  30. package/dist/llm/OpenAIClient.js +455 -0
  31. package/dist/llm/constants.d.ts +2 -0
  32. package/dist/llm/constants.js +6 -0
  33. package/dist/llm/errors.d.ts +25 -0
  34. package/dist/llm/errors.js +51 -0
  35. package/dist/llm/index.d.ts +49 -0
  36. package/dist/llm/index.js +158 -0
  37. package/dist/llm/types.d.ts +124 -0
  38. package/dist/llm/types.js +2 -0
  39. package/dist/llm/utils.d.ts +29 -0
  40. package/dist/llm/utils.js +284 -0
  41. package/dist/skill/frontmatter-parser.d.ts +50 -0
  42. package/dist/skill/frontmatter-parser.js +152 -0
  43. package/dist/skill/index.d.ts +12 -0
  44. package/dist/skill/index.js +17 -0
  45. package/dist/skill/loader.d.ts +96 -0
  46. package/dist/skill/loader.js +256 -0
  47. package/dist/tools/ask-user.d.ts +8 -0
  48. package/dist/tools/ask-user.js +47 -0
  49. package/dist/tools/bash.d.ts +47 -0
  50. package/dist/tools/bash.js +213 -0
  51. package/dist/tools/edit-file.d.ts +9 -0
  52. package/dist/tools/edit-file.js +76 -0
  53. package/dist/tools/glob.d.ts +8 -0
  54. package/dist/tools/glob.js +101 -0
  55. package/dist/tools/grep.d.ts +10 -0
  56. package/dist/tools/grep.js +76 -0
  57. package/dist/tools/index.d.ts +24 -0
  58. package/dist/tools/index.js +47 -0
  59. package/dist/tools/read-files.d.ts +8 -0
  60. package/dist/tools/read-files.js +81 -0
  61. package/dist/tools/write-file.d.ts +8 -0
  62. package/dist/tools/write-file.js +63 -0
  63. package/package.json +59 -0
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.writeFileTool = exports.WriteFileInputSchema = void 0;
37
+ /**
38
+ * write_file tool — write content to a file
39
+ *
40
+ * Reference: gemini-cli WriteFileTool
41
+ */
42
+ const fs = __importStar(require("node:fs/promises"));
43
+ const path = __importStar(require("node:path"));
44
+ const v4_1 = require("zod/v4");
45
+ exports.WriteFileInputSchema = v4_1.z.object({
46
+ path: v4_1.z.string().describe('File path (relative to cwd or absolute)'),
47
+ content: v4_1.z.string().describe('Content to write to the file'),
48
+ createDirs: v4_1.z.boolean().default(true).describe('Automatically create parent directories'),
49
+ });
50
+ exports.writeFileTool = {
51
+ name: 'write_file',
52
+ description: 'Write content to a file. Overwrites if exists, creates if not. Auto-creates parent directories.',
53
+ inputSchema: exports.WriteFileInputSchema,
54
+ execute: async (args, context) => {
55
+ const cwd = context?.cwd ?? process.cwd();
56
+ const filePath = path.isAbsolute(args.path) ? args.path : path.resolve(cwd, args.path);
57
+ if (args.createDirs) {
58
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
59
+ }
60
+ await fs.writeFile(filePath, args.content, 'utf-8');
61
+ return { ok: true, path: filePath, bytes: Buffer.byteLength(args.content, 'utf-8') };
62
+ },
63
+ };
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@kkeve/suite",
3
+ "version": "0.0.1",
4
+ "description": "EVE agent core runtime infrastructure — LLM client, agent loop, skill loader, context management",
5
+ "license": "MIT",
6
+ "main": "./dist/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./llm": {
13
+ "types": "./dist/llm/index.d.ts",
14
+ "default": "./dist/llm/index.js"
15
+ },
16
+ "./context": {
17
+ "types": "./dist/context/index.d.ts",
18
+ "default": "./dist/context/index.js"
19
+ },
20
+ "./agent-loop": {
21
+ "types": "./dist/agent-loop/index.d.ts",
22
+ "default": "./dist/agent-loop/index.js"
23
+ },
24
+ "./skill": {
25
+ "types": "./dist/skill/index.d.ts",
26
+ "default": "./dist/skill/index.js"
27
+ },
28
+ "./agent": {
29
+ "types": "./dist/agent/index.d.ts",
30
+ "default": "./dist/agent/index.js"
31
+ },
32
+ "./tools": {
33
+ "types": "./dist/tools/index.d.ts",
34
+ "default": "./dist/tools/index.js"
35
+ }
36
+ },
37
+ "files": [
38
+ "dist"
39
+ ],
40
+ "scripts": {
41
+ "build": "tsc -p tsconfig.json",
42
+ "typecheck": "tsc --noEmit",
43
+ "prepublishOnly": "pnpm build"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/bubblem1029-tech/EVE.git"
48
+ },
49
+ "dependencies": {
50
+ "glob": "^13.0.6",
51
+ "jsonrepair": "^3.14.0",
52
+ "yaml": "^2.9.0",
53
+ "zod": "^4.4.3"
54
+ },
55
+ "devDependencies": {
56
+ "@types/node": "^25.6.0",
57
+ "typescript": "^6.0.2"
58
+ }
59
+ }