@myagentroam/node 0.9.112 → 0.9.114
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/dist/terminal.js +2 -1
- package/dist/workspace.js +13 -3
- package/package.json +4 -4
package/dist/terminal.js
CHANGED
|
@@ -6,6 +6,7 @@ import { spawn } from 'node-pty';
|
|
|
6
6
|
import { terminalDataFrameSchema } from '@myagentroam/protocol';
|
|
7
7
|
import { terminateProcessTree } from './process-tree.js';
|
|
8
8
|
const MAX_FRAME_CHARACTERS = 65_536;
|
|
9
|
+
const TERMINAL_COMMAND_MAX_BYTES = 64 * 1024;
|
|
9
10
|
const DEFAULT_MAX_TERMINALS = 10;
|
|
10
11
|
const DEFAULT_MAX_TERMINALS_PER_WORKSPACE = 5;
|
|
11
12
|
const DEFAULT_MAX_REPLAY_BYTES = 512 * 1024;
|
|
@@ -83,7 +84,7 @@ export class TerminalManager {
|
|
|
83
84
|
openCommand(input, command) {
|
|
84
85
|
if (typeof command !== 'string' ||
|
|
85
86
|
command.trim().length === 0 ||
|
|
86
|
-
Buffer.byteLength(command, 'utf8') >
|
|
87
|
+
Buffer.byteLength(command, 'utf8') > TERMINAL_COMMAND_MAX_BYTES ||
|
|
87
88
|
command.includes('\0'))
|
|
88
89
|
throw new Error('TERMINAL_COMMAND_INVALID');
|
|
89
90
|
return this.openInternal(input, command);
|
package/dist/workspace.js
CHANGED
|
@@ -385,7 +385,18 @@ class RankedCandidateHeap {
|
|
|
385
385
|
}
|
|
386
386
|
function fuzzyPathScore(path, query) {
|
|
387
387
|
const source = path.toLocaleLowerCase();
|
|
388
|
-
const
|
|
388
|
+
const terms = query.trim().toLocaleLowerCase().split(/\s+/u);
|
|
389
|
+
const name = source.slice(source.lastIndexOf('/') + 1);
|
|
390
|
+
let total = 0;
|
|
391
|
+
for (const needle of terms) {
|
|
392
|
+
const score = fuzzyTermScore(source, name, needle);
|
|
393
|
+
if (score < 0)
|
|
394
|
+
return -1;
|
|
395
|
+
total += score;
|
|
396
|
+
}
|
|
397
|
+
return total - path.length / 1_000;
|
|
398
|
+
}
|
|
399
|
+
function fuzzyTermScore(source, name, needle) {
|
|
389
400
|
let cursor = 0;
|
|
390
401
|
let score = 0;
|
|
391
402
|
let previous = -2;
|
|
@@ -399,12 +410,11 @@ function fuzzyPathScore(path, query) {
|
|
|
399
410
|
previous = index;
|
|
400
411
|
cursor = index + 1;
|
|
401
412
|
}
|
|
402
|
-
const name = path.slice(path.lastIndexOf('/') + 1).toLocaleLowerCase();
|
|
403
413
|
if (name.includes(needle))
|
|
404
414
|
score += 40;
|
|
405
415
|
else if (source.includes(needle))
|
|
406
416
|
score += 16;
|
|
407
|
-
return score
|
|
417
|
+
return score;
|
|
408
418
|
}
|
|
409
419
|
/**
|
|
410
420
|
* Lists directory names only for the Workspace picker. Browsing begins at the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.114",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"npm": "11.12.1",
|
|
31
31
|
"ws": "^8.21.3",
|
|
32
32
|
"zod": "4.4.3",
|
|
33
|
-
"@myagentroam/agent": "0.9.
|
|
34
|
-
"@myagentroam/
|
|
35
|
-
"@myagentroam/
|
|
33
|
+
"@myagentroam/agent": "0.9.114",
|
|
34
|
+
"@myagentroam/code-navigation": "0.9.114",
|
|
35
|
+
"@myagentroam/protocol": "0.9.114"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/ws": "^8.18.1"
|