@codebolt/codeboltjs 2.2.1 → 2.2.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.
Files changed (70) hide show
  1. package/Readme.md +3 -0
  2. package/dist/core/Codebolt.d.ts +179 -166
  3. package/dist/core/Codebolt.js +224 -7
  4. package/dist/core/websocket.js +9 -11
  5. package/dist/index.d.ts +1 -1
  6. package/dist/modules/agent.d.ts +2 -16
  7. package/dist/modules/agent.js +15 -33
  8. package/dist/modules/browser.d.ts +1 -1
  9. package/dist/modules/browser.js +52 -51
  10. package/dist/modules/chat.d.ts +2 -2
  11. package/dist/modules/chat.js +20 -18
  12. package/dist/modules/codeutils.d.ts +1 -9
  13. package/dist/modules/codeutils.js +13 -111
  14. package/dist/modules/dbmemory.d.ts +3 -3
  15. package/dist/modules/dbmemory.js +8 -7
  16. package/dist/modules/debug.d.ts +1 -1
  17. package/dist/modules/fs.d.ts +59 -28
  18. package/dist/modules/fs.js +86 -45
  19. package/dist/modules/git.d.ts +1 -1
  20. package/dist/modules/git.js +31 -30
  21. package/dist/modules/history.d.ts +1 -1
  22. package/dist/modules/history.js +7 -6
  23. package/dist/modules/llm.d.ts +13 -20
  24. package/dist/modules/llm.js +16 -15
  25. package/dist/modules/mcp.d.ts +4 -4
  26. package/dist/modules/mcp.js +25 -25
  27. package/dist/modules/outputparsers.d.ts +22 -22
  28. package/dist/modules/outputparsers.js +7 -5
  29. package/dist/modules/project.d.ts +1 -1
  30. package/dist/modules/project.js +15 -13
  31. package/dist/modules/state.d.ts +1 -1
  32. package/dist/modules/state.js +16 -15
  33. package/dist/modules/task.d.ts +1 -138
  34. package/dist/modules/task.js +555 -287
  35. package/dist/modules/terminal.d.ts +1 -1
  36. package/dist/modules/terminal.js +12 -11
  37. package/dist/modules/tokenizer.d.ts +1 -1
  38. package/dist/modules/tokenizer.js +7 -6
  39. package/dist/modules/user-message-manager.d.ts +165 -0
  40. package/dist/modules/user-message-manager.js +308 -0
  41. package/dist/modules/user-message-utilities.d.ts +111 -0
  42. package/dist/modules/user-message-utilities.js +115 -0
  43. package/dist/modules/utils.d.ts +1 -1
  44. package/dist/modules/utils.js +4 -3
  45. package/dist/modules/vectordb.d.ts +1 -1
  46. package/dist/modules/vectordb.js +13 -12
  47. package/dist/notificationfunctions/agent.js +7 -6
  48. package/dist/notificationfunctions/browser.js +9 -8
  49. package/dist/notificationfunctions/chat.js +9 -8
  50. package/dist/notificationfunctions/codeutils.js +9 -8
  51. package/dist/notificationfunctions/crawler.js +9 -8
  52. package/dist/notificationfunctions/dbmemory.js +9 -8
  53. package/dist/notificationfunctions/fs.js +45 -44
  54. package/dist/notificationfunctions/git.d.ts +2 -2
  55. package/dist/notificationfunctions/git.js +111 -51
  56. package/dist/notificationfunctions/history.js +9 -8
  57. package/dist/notificationfunctions/llm.js +9 -8
  58. package/dist/notificationfunctions/mcp.js +17 -16
  59. package/dist/notificationfunctions/search.js +13 -12
  60. package/dist/notificationfunctions/system.js +5 -4
  61. package/dist/notificationfunctions/terminal.js +5 -4
  62. package/dist/notificationfunctions/todo.js +13 -12
  63. package/dist/types/commonTypes.d.ts +4 -0
  64. package/dist/types/index.d.ts +1 -1
  65. package/dist/types/libFunctionTypes.d.ts +918 -29
  66. package/dist/types/libFunctionTypes.js +33 -0
  67. package/dist/types/notificationFunctions/git.d.ts +40 -1
  68. package/dist/types/notificationFunctions/index.d.ts +1 -0
  69. package/dist/types/notificationFunctions/index.js +1 -0
  70. package/package.json +4 -12
@@ -9,3 +9,36 @@
9
9
  * - User-facing data structures
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ // ================================
13
+ // Summary Section
14
+ // ================================
15
+ /**
16
+ * This file contains comprehensive TypeScript types for the codeboltjs library API.
17
+ *
18
+ * Key sections include:
19
+ * - Message Types for Library API
20
+ * - File System API Types and Response Types
21
+ * - Browser API Types
22
+ * - Terminal API Types
23
+ * - Git API Types
24
+ * - LLM API Types
25
+ * - Vector Database API Types
26
+ * - Agent API Types
27
+ * - Memory API Types
28
+ * - Task API Types
29
+ * - Code Utils API Types
30
+ * - Debug API Types
31
+ * - Project API Types
32
+ * - Crawler API Types
33
+ * - MCP Tools API Types
34
+ * - State Management API Types
35
+ * - Chat API Types
36
+ * - Notification API Types
37
+ * - Utility Types for API
38
+ * - Event Types for API
39
+ * - Configuration Types for Library
40
+ * - Callback Types
41
+ *
42
+ * All types are designed to be user-friendly and provide comprehensive
43
+ * type safety for the codeboltjs library functions.
44
+ */
@@ -1,3 +1,42 @@
1
+ /**
2
+ * Git diff file schema with comprehensive metadata
3
+ */
4
+ export interface GitDiffFile {
5
+ file: string;
6
+ changes: number;
7
+ insertions: number;
8
+ deletions: number;
9
+ binary?: boolean;
10
+ status?: 'added' | 'modified' | 'deleted' | 'renamed' | 'copied';
11
+ oldFile?: string;
12
+ }
13
+ /**
14
+ * Comprehensive git diff result schema
15
+ */
16
+ export interface GitDiffResult {
17
+ files: GitDiffFile[];
18
+ insertions: number;
19
+ deletions: number;
20
+ changed: number;
21
+ diff?: string;
22
+ stats?: string;
23
+ metadata?: {
24
+ totalChanges: number;
25
+ additions: number;
26
+ deletions: number;
27
+ commitHash?: string;
28
+ parentCommit?: string;
29
+ };
30
+ }
31
+ /**
32
+ * Git diff response content (wrapped format)
33
+ */
34
+ export interface GitDiffResponseContent {
35
+ success: boolean;
36
+ data: string | GitDiffResult;
37
+ commitHash?: string;
38
+ message?: string;
39
+ }
1
40
  /**
2
41
  * Interface for git notification functions
3
42
  */
@@ -21,7 +60,7 @@ export interface GitNotifications {
21
60
  GitLogsRequestNotify(path?: string, toolUseId?: string): void;
22
61
  GitLogsResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
23
62
  GitDiffRequestNotify(path?: string, toolUseId?: string): void;
24
- GitDiffResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
63
+ GitDiffResponseNotify(content: string | GitDiffResult | GitDiffResponseContent, isError?: boolean, toolUseId?: string): void;
25
64
  GitRemoteAddRequestNotify(remoteName: string, remoteUrl: string, path?: string, toolUseId?: string): void;
26
65
  GitRemoteAddResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
27
66
  GitCloneRequestNotify(repoUrl: string, targetPath?: string, toolUseId?: string): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebolt/codeboltjs",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -22,7 +22,6 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@codebolt/globby": "^1.0.1",
26
25
  "@types/uuid": "^10.0.0",
27
26
  "buffer": "^6.0.3",
28
27
  "execa": "^9.5.2",
@@ -35,10 +34,7 @@
35
34
  "uuid": "^11.1.0",
36
35
  "ws": "^8.17.0",
37
36
  "yargs": "^17.7.2",
38
- "@codebolt/codeparser": "1.2.1",
39
- "@codebolt/mcp": "1.2.1",
40
- "@codebolt/types": "1.0.15",
41
- "@codebolt/utils": "1.2.1"
37
+ "@codebolt/types": "1.0.16"
42
38
  },
43
39
  "devDependencies": {
44
40
  "@types/events": "^3.0.3",
@@ -63,10 +59,6 @@
63
59
  ".": {
64
60
  "types": "./dist/index.d.ts",
65
61
  "default": "./dist/index.js"
66
- },
67
- "./utils": {
68
- "types": "./dist/utils.d.ts",
69
- "default": "./dist/utils.js"
70
62
  }
71
63
  },
72
64
  "scripts": {
@@ -76,7 +68,7 @@
76
68
  "build:docs": "typedoc --plugin typedoc-plugin-missing-exports",
77
69
  "build:jsondocs": "typedoc --plugin typedoc-plugin-missing-exports --json out.json --pretty",
78
70
  "test": "echo \"Integration tests require WebSocket server - skipping for release\" && exit 0",
79
- "clean": "rm -rf dist build",
80
- "lint": "tsc --noEmit"
71
+ "clean": "powershell -Command \"Remove-Item -Path 'dist' -Recurse -Force -ErrorAction SilentlyContinue; Remove-Item -Path 'build' -Recurse -Force -ErrorAction SilentlyContinue\"",
72
+ "lint": "eslint src/**/*.ts && tsc --noEmit"
81
73
  }
82
74
  }