@saber2pr/ai-agent 0.0.29 → 0.0.30

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.
@@ -14,10 +14,10 @@ const prompts_1 = require("@langchain/core/prompts");
14
14
  const langgraph_1 = require("@langchain/langgraph");
15
15
  const prebuilt_1 = require("@langchain/langgraph/prebuilt");
16
16
  const openai_1 = require("@langchain/openai");
17
- const builtin_1 = require("../tools/builtin");
18
- const convertToLangChainTool_1 = require("../utils/convertToLangChainTool");
19
17
  const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js");
20
18
  const stdio_js_1 = require("@modelcontextprotocol/sdk/client/stdio.js");
19
+ const builtin_1 = require("../tools/builtin");
20
+ const convertToLangChainTool_1 = require("../utils/convertToLangChainTool");
21
21
  const jsonSchemaToZod_1 = require("../utils/jsonSchemaToZod");
22
22
  exports.CONFIG_FILE = path_1.default.join(os_1.default.homedir(), ".saber2pr-agent.json");
23
23
  // ✅ 全局设置:修复 AbortSignal 监听器数量警告
package/lib/core/agent.js CHANGED
@@ -42,11 +42,11 @@ const openai_1 = __importDefault(require("openai"));
42
42
  const os_1 = __importDefault(require("os"));
43
43
  const path_1 = __importDefault(require("path"));
44
44
  const readline = __importStar(require("readline"));
45
+ const zod_to_json_schema_1 = require("zod-to-json-schema");
45
46
  const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js");
46
47
  const stdio_js_1 = require("@modelcontextprotocol/sdk/client/stdio.js");
47
48
  const config_1 = require("../config/config");
48
49
  const builtin_1 = require("../tools/builtin");
49
- const zod_to_json_schema_1 = require("zod-to-json-schema");
50
50
  const jsonSchemaToZod_1 = require("../utils/jsonSchemaToZod");
51
51
  class McpAgent {
52
52
  constructor(options) {
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTsLspTools = void 0;
4
+ const zod_1 = require("zod");
4
5
  const ts_context_mcp_1 = require("@saber2pr/ts-context-mcp");
5
6
  const createTool_1 = require("../../utils/createTool");
6
- const zod_1 = require("zod");
7
7
  const getTsLspTools = (targetDir) => {
8
8
  const engine = new ts_context_mcp_1.PromptEngine(targetDir);
9
9
  return [
@@ -1,5 +1,5 @@
1
- import { Client } from '@modelcontextprotocol/sdk/client/index';
2
1
  import { z } from 'zod';
2
+ import { Client } from '@modelcontextprotocol/sdk/client/index';
3
3
  import { AgentGraphModel } from '../model/AgentGraphModel';
4
4
  export interface ApiConfig {
5
5
  baseURL: string;
@@ -1,5 +1,5 @@
1
- import { DynamicStructuredTool } from "@langchain/core/tools";
2
- import { ToolInfo } from "../types/type";
1
+ import { DynamicStructuredTool } from '@langchain/core/tools';
2
+ import { ToolInfo } from '../types/type';
3
3
  export declare function convertToLangChainTool(info: ToolInfo): DynamicStructuredTool<import("zod").ZodObject<any, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
4
4
  [x: string]: any;
5
5
  }, {
@@ -1,5 +1,5 @@
1
- import { ToolInfo } from '../types/type';
2
1
  import { z } from 'zod';
2
+ import { ToolInfo } from '../types/type';
3
3
  export interface CreateToolOptions {
4
4
  name: string;
5
5
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saber2pr/ai-agent",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "AI Assistant CLI.",
5
5
  "author": "saber2pr",
6
6
  "license": "ISC",