neoagent 2.5.2-beta.12 → 2.5.2-beta.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.5.2-beta.12",
3
+ "version": "2.5.2-beta.13",
4
4
  "description": "Proactive personal AI agent with no limits",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "server/index.js",
@@ -1 +1 @@
1
- 72a942e4fb37f5f2c49ac77a01ef383d
1
+ ff1f1758f0de6cf5e52022f2490651ab
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"77e2e94772b6eb43759e34ed1ad7da4674e19c
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "2886813404" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "3310591106" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });
@@ -134794,7 +134794,7 @@ r===$&&A.b()
134794
134794
  p.push(A.jP(q,A.j9(!1,new A.a_(B.uG,A.d8(new A.cA(B.jt,new A.a7N(r,q),q),q,q),q),!1,B.H,!0),q,q,0,0,0,q))}r=!1
134795
134795
  if(!s.ay)if(!s.ch){r=s.e
134796
134796
  r===$&&A.b()
134797
- r=B.b.u("mqgairk8-ba9fc75").length!==0&&r.b}if(r){r=s.d
134797
+ r=B.b.u("mqgb2cwv-c182f46").length!==0&&r.b}if(r){r=s.d
134798
134798
  r===$&&A.b()
134799
134799
  r=r.aP&&!r.ai?84:0
134800
134800
  s=s.e
@@ -140506,7 +140506,7 @@ $S:0}
140506
140506
  A.a_6.prototype={}
140507
140507
  A.SQ.prototype={
140508
140508
  nb(a){var s=this
140509
- if(B.b.u("mqgairk8-ba9fc75").length===0||s.a!=null)return
140509
+ if(B.b.u("mqgb2cwv-c182f46").length===0||s.a!=null)return
140510
140510
  s.AU()
140511
140511
  s.a=A.on(B.RH,new A.bc8(s))},
140512
140512
  AU(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f
@@ -140524,7 +140524,7 @@ if(!t.f.b(k)){s=1
140524
140524
  break}i=J.a3(k,"buildId")
140525
140525
  h=i==null?null:B.b.u(J.p(i))
140526
140526
  j=h==null?"":h
140527
- if(J.bi(j)===0||J.d(j,"mqgairk8-ba9fc75")){s=1
140527
+ if(J.bi(j)===0||J.d(j,"mqgb2cwv-c182f46")){s=1
140528
140528
  break}n.b=!0
140529
140529
  n.F()
140530
140530
  p=2
@@ -140541,7 +140541,7 @@ case 2:return A.i(o.at(-1),r)}})
140541
140541
  return A.k($async$AU,r)},
140542
140542
  vE(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1
140543
140543
  var $async$vE=A.h(function(a2,a3){if(a2===1){o.push(a3)
140544
- s=p}for(;;)switch(s){case 0:if(B.b.u("mqgairk8-ba9fc75").length===0||n.c){s=1
140544
+ s=p}for(;;)switch(s){case 0:if(B.b.u("mqgb2cwv-c182f46").length===0||n.c){s=1
140545
140545
  break}n.c=!0
140546
140546
  n.F()
140547
140547
  p=4
@@ -881,16 +881,19 @@ function getAvailableTools(app, options = {}) {
881
881
  },
882
882
  {
883
883
  name: 'read_file',
884
- description: 'Read a file from the filesystem. Supports reading specific line ranges for large files.',
884
+ description: 'Read a file from the per-user workspace filesystem. Supports reading specific line ranges for large files. This cannot read VM /tmp files created by execute_command; use execute_command with `cat /tmp/...` for those paths.',
885
885
  parameters: {
886
886
  type: 'object',
887
887
  properties: {
888
- path: { type: 'string', description: 'Absolute or relative file path' },
888
+ path: { type: 'string', description: 'Absolute or relative path inside the per-user workspace' },
889
+ file_path: { type: 'string', description: 'Alias for path; accepted for compatibility with model tool calls' },
889
890
  start_line: { type: 'number', description: 'Starting line number (1-indexed, inclusive)' },
890
891
  end_line: { type: 'number', description: 'Ending line number (1-indexed, inclusive)' },
892
+ line_start: { type: 'number', description: 'Alias for start_line; accepted for compatibility with model tool calls' },
893
+ line_count: { type: 'number', description: 'Number of lines to read starting at start_line/line_start' },
891
894
  encoding: { type: 'string', description: 'File encoding (default utf-8)' }
892
895
  },
893
- required: ['path']
896
+ required: []
894
897
  }
895
898
  },
896
899
  {
@@ -1500,6 +1503,33 @@ function getAvailableTools(app, options = {}) {
1500
1503
  return compacted;
1501
1504
  }
1502
1505
 
1506
+ function firstStringArg(args = {}, names = []) {
1507
+ for (const name of names) {
1508
+ const value = args?.[name];
1509
+ if (typeof value === 'string' && value.trim()) return value;
1510
+ }
1511
+ return '';
1512
+ }
1513
+
1514
+ function normalizeReadFileArgs(args = {}) {
1515
+ const startLine = args.start_line ?? args.line_start ?? args.startLine ?? args.lineStart;
1516
+ let endLine = args.end_line ?? args.line_end ?? args.endLine ?? args.lineEnd;
1517
+ const lineCount = args.line_count ?? args.lineCount;
1518
+ if (endLine == null && startLine != null && lineCount != null) {
1519
+ const start = Number(startLine);
1520
+ const count = Number(lineCount);
1521
+ if (Number.isInteger(start) && Number.isInteger(count) && count > 0) {
1522
+ endLine = start + count - 1;
1523
+ }
1524
+ }
1525
+ return {
1526
+ path: firstStringArg(args, ['path', 'file_path', 'filePath', 'filename']),
1527
+ encoding: args.encoding || 'utf-8',
1528
+ start_line: startLine,
1529
+ end_line: endLine,
1530
+ };
1531
+ }
1532
+
1503
1533
  /**
1504
1534
  * Executes a tool by name.
1505
1535
  * @param {string} toolName - Name of the tool.
@@ -2297,12 +2327,13 @@ async function executeTool(toolName, args, context, engine) {
2297
2327
  try {
2298
2328
  const workspace = wc();
2299
2329
  if (!workspace) return { error: 'Workspace service is unavailable.' };
2300
- return workspace.readFile(userId, {
2301
- path: args.path,
2302
- encoding: args.encoding || 'utf-8',
2303
- start_line: args.start_line,
2304
- end_line: args.end_line,
2305
- });
2330
+ const normalizedArgs = normalizeReadFileArgs(args);
2331
+ if (!normalizedArgs.path) {
2332
+ return {
2333
+ error: 'read_file requires path or file_path. Use execute_command with `cat /tmp/...` for VM /tmp files.',
2334
+ };
2335
+ }
2336
+ return workspace.readFile(userId, normalizedArgs);
2306
2337
  } catch (err) {
2307
2338
  return { error: err.message };
2308
2339
  }
@@ -730,6 +730,14 @@ const githubToolDefinitions = [
730
730
  type: 'string',
731
731
  description: 'API path or full URL.',
732
732
  },
733
+ endpoint: {
734
+ type: 'string',
735
+ description: 'Alias for path; accepted for compatibility with model tool calls.',
736
+ },
737
+ url: {
738
+ type: 'string',
739
+ description: 'Alias for path when passing a full GitHub API URL.',
740
+ },
733
741
  query: {
734
742
  type: 'object',
735
743
  description: 'Optional query parameters.',
@@ -739,7 +747,7 @@ const githubToolDefinitions = [
739
747
  description: 'Optional JSON request body.',
740
748
  },
741
749
  },
742
- required: ['method', 'path'],
750
+ required: ['method'],
743
751
  },
744
752
  },
745
753
  ];
@@ -749,6 +757,14 @@ function parseCommaSeparatedList(value) {
749
757
  return String(value).split(',').map((s) => s.trim()).filter(Boolean);
750
758
  }
751
759
 
760
+ function resolveApiRequestPath(args = {}) {
761
+ for (const key of ['path', 'endpoint', 'url']) {
762
+ const value = args?.[key];
763
+ if (typeof value === 'string' && value.trim()) return value.trim();
764
+ }
765
+ return '';
766
+ }
767
+
752
768
  async function executeGithubTool(toolName, args, auth) {
753
769
  switch (toolName) {
754
770
  case 'github_get_auth_user': {
@@ -1085,7 +1101,10 @@ async function executeGithubTool(toolName, args, auth) {
1085
1101
 
1086
1102
  case 'github_api_request': {
1087
1103
  let baseUrl = 'https://api.github.com';
1088
- let path = String(args.path || '');
1104
+ let path = resolveApiRequestPath(args);
1105
+ if (!path) {
1106
+ throw new Error('github_api_request requires path, endpoint, or url.');
1107
+ }
1089
1108
  let query = args.query || null;
1090
1109
  if (path.startsWith('http')) {
1091
1110
  const url = new URL(path);
@@ -1121,4 +1140,4 @@ async function executeGithubTool(toolName, args, auth) {
1121
1140
  module.exports = {
1122
1141
  executeGithubTool,
1123
1142
  githubToolDefinitions,
1124
- };
1143
+ };