@saber2pr/ai-agent 0.0.18 → 0.0.19
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/lib/config/config.js +1 -1
- package/lib/core/agent.js +1 -1
- package/lib/model/AgentChainModel.d.ts +2 -2
- package/lib/tools/filesystem/index.js +3 -3
- package/lib/tools/filesystem/lib.js +2 -2
- package/lib/tools/filesystem/path-utils.js +1 -1
- package/lib/tools/filesystem/roots-utils.js +1 -1
- package/lib/types/type.d.ts +1 -1
- package/lib/utils/createTool.d.ts +1 -1
- package/lib/utils/jsonSchemaToZod.d.ts +1 -1
- package/package.json +1 -1
package/lib/config/config.js
CHANGED
|
@@ -4,6 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CONFIG_FILE = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
7
|
const os_1 = __importDefault(require("os"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
9
|
exports.CONFIG_FILE = path_1.default.join(os_1.default.homedir(), ".saber2pr-agent.json");
|
package/lib/core/agent.js
CHANGED
|
@@ -44,8 +44,8 @@ const path_1 = __importDefault(require("path"));
|
|
|
44
44
|
const readline = __importStar(require("readline"));
|
|
45
45
|
const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js");
|
|
46
46
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/client/stdio.js");
|
|
47
|
-
const builtin_1 = require("../tools/builtin");
|
|
48
47
|
const config_1 = require("../config/config");
|
|
48
|
+
const builtin_1 = require("../tools/builtin");
|
|
49
49
|
class McpAgent {
|
|
50
50
|
constructor(options) {
|
|
51
51
|
this.modelName = "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseChatModel } from
|
|
2
|
-
import { AIMessage, MessageFieldWithRole } from
|
|
1
|
+
import { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
|
2
|
+
import { AIMessage, MessageFieldWithRole } from '@langchain/core/messages';
|
|
3
3
|
interface AgentChainModelImpl {
|
|
4
4
|
generateAgentChainResponse: (messages: MessageFieldWithRole[]) => Promise<string>;
|
|
5
5
|
}
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getFilesystemTools = void 0;
|
|
7
|
-
const zod_1 = require("zod");
|
|
8
7
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
|
+
const minimatch_1 = require("minimatch");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const zod_1 = require("zod");
|
|
10
11
|
const createTool_1 = require("../../utils/createTool");
|
|
11
|
-
const minimatch_1 = require("minimatch");
|
|
12
|
-
const lib_1 = require("./lib");
|
|
13
12
|
const jsonSchemaToZod_1 = require("../../utils/jsonSchemaToZod");
|
|
13
|
+
const lib_1 = require("./lib");
|
|
14
14
|
// Schema definitions
|
|
15
15
|
const ReadTextFileArgsSchema = zod_1.z.object({
|
|
16
16
|
path: zod_1.z.string(),
|
|
@@ -16,11 +16,11 @@ exports.applyFileEdits = applyFileEdits;
|
|
|
16
16
|
exports.tailFile = tailFile;
|
|
17
17
|
exports.headFile = headFile;
|
|
18
18
|
exports.searchFilesWithValidation = searchFilesWithValidation;
|
|
19
|
-
const promises_1 = __importDefault(require("fs/promises"));
|
|
20
|
-
const path_1 = __importDefault(require("path"));
|
|
21
19
|
const crypto_1 = require("crypto");
|
|
22
20
|
const diff_1 = require("diff");
|
|
21
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
23
22
|
const minimatch_1 = require("minimatch");
|
|
23
|
+
const path_1 = __importDefault(require("path"));
|
|
24
24
|
const path_utils_js_1 = require("./path-utils.js");
|
|
25
25
|
const path_validation_js_1 = require("./path-validation.js");
|
|
26
26
|
// Global allowed directories - set by the main module
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.convertToWindowsPath = convertToWindowsPath;
|
|
7
7
|
exports.normalizePath = normalizePath;
|
|
8
8
|
exports.expandHome = expandHome;
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
9
|
const os_1 = __importDefault(require("os"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
11
|
/**
|
|
12
12
|
* Converts WSL or Unix-style Windows paths to Windows format
|
|
13
13
|
* @param p The path to convert
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getValidRootDirectories = getValidRootDirectories;
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
8
|
const os_1 = __importDefault(require("os"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const path_utils_js_1 = require("./path-utils.js");
|
|
11
11
|
/**
|
|
12
12
|
* Converts a root URI to a normalized directory path with basic security validation.
|
package/lib/types/type.d.ts
CHANGED