@agent-api/sdk 1.4.4 → 1.4.5
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/local/core.d.ts +1 -0
- package/dist/local/core.js +1 -1
- package/dist/local/tools.js +3 -0
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/dist-cjs/local/core.js +1 -1
- package/dist-cjs/local/tools.js +3 -0
- package/dist-cjs/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -219,7 +219,7 @@ await workdir.patchLines("src/index.ts", {
|
|
|
219
219
|
replacement: "console.log('patched');",
|
|
220
220
|
});
|
|
221
221
|
|
|
222
|
-
const summary = await workdir.summarize();
|
|
222
|
+
const summary = await workdir.summarize({ maxDepth: 3, maxFiles: 500 });
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
For project/workdir roots, prefer `local.workdir()` so SDK defaults protect common generated directories such as `.git`, `node_modules`, `dist`, and build caches.
|
package/dist/local/core.d.ts
CHANGED
package/dist/local/core.js
CHANGED
|
@@ -374,7 +374,7 @@ export class LocalFileStore {
|
|
|
374
374
|
const maxPreviews = positiveInt(params.maxPreviews, 20);
|
|
375
375
|
const previewBytes = positiveInt(params.previewBytes, 4096);
|
|
376
376
|
const topPaths = positiveInt(params.topPaths, 20);
|
|
377
|
-
const stats = await this.list(params.path ?? ".", { recursive: true, ignore: params.ignore });
|
|
377
|
+
const stats = await this.list(params.path ?? ".", { recursive: true, maxDepth: params.maxDepth, ignore: params.ignore });
|
|
378
378
|
const files = stats.filter((item) => item.type === "file").slice(0, maxFiles);
|
|
379
379
|
const scanTruncated = stats.filter((item) => item.type === "file").length > files.length;
|
|
380
380
|
const totalBytes = files.reduce((sum, item) => sum + item.size, 0);
|
package/dist/local/tools.js
CHANGED
|
@@ -202,6 +202,9 @@ function summaryArgs(args) {
|
|
|
202
202
|
path: optionalStringArg(args, "path"),
|
|
203
203
|
maxFiles: optionalNumberArg(args, "maxFiles", "max_files"),
|
|
204
204
|
maxPreviews: optionalNumberArg(args, "maxPreviews", "max_previews"),
|
|
205
|
+
previewBytes: optionalNumberArg(args, "previewBytes", "preview_bytes"),
|
|
206
|
+
topPaths: optionalNumberArg(args, "topPaths", "top_paths"),
|
|
207
|
+
maxDepth: optionalNumberArg(args, "maxDepth", "max_depth"),
|
|
205
208
|
};
|
|
206
209
|
}
|
|
207
210
|
function grepArgs(args) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.4.
|
|
2
|
-
export declare const USER_AGENT = "@agent-api/sdk/1.4.
|
|
1
|
+
export declare const VERSION = "1.4.5";
|
|
2
|
+
export declare const USER_AGENT = "@agent-api/sdk/1.4.5";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "1.4.
|
|
1
|
+
export const VERSION = "1.4.5";
|
|
2
2
|
export const USER_AGENT = `@agent-api/sdk/${VERSION}`;
|
package/dist-cjs/local/core.js
CHANGED
|
@@ -389,7 +389,7 @@ class LocalFileStore {
|
|
|
389
389
|
const maxPreviews = positiveInt(params.maxPreviews, 20);
|
|
390
390
|
const previewBytes = positiveInt(params.previewBytes, 4096);
|
|
391
391
|
const topPaths = positiveInt(params.topPaths, 20);
|
|
392
|
-
const stats = await this.list(params.path ?? ".", { recursive: true, ignore: params.ignore });
|
|
392
|
+
const stats = await this.list(params.path ?? ".", { recursive: true, maxDepth: params.maxDepth, ignore: params.ignore });
|
|
393
393
|
const files = stats.filter((item) => item.type === "file").slice(0, maxFiles);
|
|
394
394
|
const scanTruncated = stats.filter((item) => item.type === "file").length > files.length;
|
|
395
395
|
const totalBytes = files.reduce((sum, item) => sum + item.size, 0);
|
package/dist-cjs/local/tools.js
CHANGED
|
@@ -209,6 +209,9 @@ function summaryArgs(args) {
|
|
|
209
209
|
path: optionalStringArg(args, "path"),
|
|
210
210
|
maxFiles: optionalNumberArg(args, "maxFiles", "max_files"),
|
|
211
211
|
maxPreviews: optionalNumberArg(args, "maxPreviews", "max_previews"),
|
|
212
|
+
previewBytes: optionalNumberArg(args, "previewBytes", "preview_bytes"),
|
|
213
|
+
topPaths: optionalNumberArg(args, "topPaths", "top_paths"),
|
|
214
|
+
maxDepth: optionalNumberArg(args, "maxDepth", "max_depth"),
|
|
212
215
|
};
|
|
213
216
|
}
|
|
214
217
|
function grepArgs(args) {
|
package/dist-cjs/version.js
CHANGED