@myassis/gateway 1.0.70 → 1.0.71

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.
@@ -197,7 +197,7 @@ exports.execTool = {
197
197
  },
198
198
  cwd: {
199
199
  type: 'string',
200
- description: '命令执行的工作目录(可选)。',
200
+ description: '命令执行的工作目录',
201
201
  },
202
202
  timeout: {
203
203
  type: 'number',
@@ -216,6 +216,14 @@ exports.execTool = {
216
216
  return new Promise(async (resolve) => {
217
217
  const { cwd, timeout = 60000, approved, isUserAsk = false } = args;
218
218
  let command = args.command;
219
+ // 没有指定工作目录,直接返回错误信息给大模型
220
+ if (!cwd || (typeof cwd === 'string' && cwd.trim() === '')) {
221
+ resolve({
222
+ success: false,
223
+ errorMessage: '执行命令必须指定工作目录(cwd),请提供 cwd 参数后重试。',
224
+ });
225
+ return;
226
+ }
219
227
  // 检查危险命令(如果已批准或用户主动要求则跳过拦截)
220
228
  if (!approved && isDangerousCommand(command)) {
221
229
  if (isUserAsk) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myassis/gateway",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "description": "我的助手 Gateway Service - 本地 AI 网关服务,支持认证、WebSocket 实时通信和任务调度",
5
5
  "main": "dist/index.js",
6
6
  "bin": {