@open-agent-toolkit/cli 0.1.24 → 0.1.25
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../src/commands/local/expand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../src/commands/local/expand.ts"],"names":[],"mappings":"AAqHA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzE;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,YAAY,CAAC,CA4BvB"}
|
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
import { readdir } from 'node:fs/promises';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
const GLOB_CHARS = /[*?[]/;
|
|
4
|
+
const PRUNED_CANDIDATE_DIRECTORIES = new Set([
|
|
5
|
+
'.cache',
|
|
6
|
+
'.git',
|
|
7
|
+
'.gradle',
|
|
8
|
+
'.next',
|
|
9
|
+
'.nuxt',
|
|
10
|
+
'.output',
|
|
11
|
+
'.parcel-cache',
|
|
12
|
+
'.pnpm-store',
|
|
13
|
+
'.pytest_cache',
|
|
14
|
+
'.ruff_cache',
|
|
15
|
+
'.turbo',
|
|
16
|
+
'.venv',
|
|
17
|
+
'.vite',
|
|
18
|
+
'.worktrees',
|
|
19
|
+
'.yarn',
|
|
20
|
+
'__pycache__',
|
|
21
|
+
'build',
|
|
22
|
+
'coverage',
|
|
23
|
+
'dist',
|
|
24
|
+
'node_modules',
|
|
25
|
+
'out',
|
|
26
|
+
'target',
|
|
27
|
+
'tmp',
|
|
28
|
+
]);
|
|
4
29
|
function normalizePattern(path) {
|
|
5
30
|
return path.replaceAll('\\', '/').replace(/^\.\//, '').replace(/\/+$/, '');
|
|
6
31
|
}
|
|
@@ -40,15 +65,30 @@ function globToRegExp(pattern) {
|
|
|
40
65
|
regex += '$';
|
|
41
66
|
return new RegExp(regex);
|
|
42
67
|
}
|
|
68
|
+
function isOatStatePath(path) {
|
|
69
|
+
return path === '.oat' || path.startsWith('.oat/');
|
|
70
|
+
}
|
|
71
|
+
function shouldPruneCandidateDirectory(path, name) {
|
|
72
|
+
return !isOatStatePath(path) && PRUNED_CANDIDATE_DIRECTORIES.has(name);
|
|
73
|
+
}
|
|
43
74
|
async function collectRelativePaths(root, current = '') {
|
|
44
|
-
const dirPath = current === '' ? root : join(root, current);
|
|
45
|
-
const entries = await readdir(dirPath, { withFileTypes: true });
|
|
46
75
|
const paths = [];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
76
|
+
const pendingDirectories = [current];
|
|
77
|
+
while (pendingDirectories.length > 0) {
|
|
78
|
+
const directory = pendingDirectories.pop();
|
|
79
|
+
const dirPath = directory === '' ? root : join(root, directory);
|
|
80
|
+
const entries = await readdir(dirPath, { withFileTypes: true });
|
|
81
|
+
for (const entry of entries) {
|
|
82
|
+
const relativePath = directory === '' ? entry.name : `${directory}/${entry.name}`;
|
|
83
|
+
const shouldPrune = entry.isDirectory() &&
|
|
84
|
+
shouldPruneCandidateDirectory(relativePath, entry.name);
|
|
85
|
+
if (shouldPrune) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
paths.push(relativePath);
|
|
89
|
+
if (entry.isDirectory()) {
|
|
90
|
+
pendingDirectories.push(relativePath);
|
|
91
|
+
}
|
|
52
92
|
}
|
|
53
93
|
}
|
|
54
94
|
return paths;
|
|
@@ -76,7 +116,9 @@ export async function expandLocalPaths(root, localPaths) {
|
|
|
76
116
|
missingGlobs.push(localPath);
|
|
77
117
|
}
|
|
78
118
|
else {
|
|
79
|
-
|
|
119
|
+
for (const match of matches.sort()) {
|
|
120
|
+
resolved.push(match);
|
|
121
|
+
}
|
|
80
122
|
}
|
|
81
123
|
}
|
|
82
124
|
return { resolved, missingGlobs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.1.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.1.25"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|