@agent-api/sdk 1.4.2 → 1.4.3
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/dist/local/core.d.ts +2 -4
- package/dist/local/core.js +8 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/dist-cjs/local/core.js +8 -1
- package/dist-cjs/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/local/core.d.ts
CHANGED
|
@@ -229,10 +229,8 @@ export interface LocalWorkdirEditPlan {
|
|
|
229
229
|
}
|
|
230
230
|
export interface LocalWorkdirEditResult {
|
|
231
231
|
applied: LocalFileLinesPatch[];
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
content: string;
|
|
235
|
-
}>;
|
|
232
|
+
changed_files: string[];
|
|
233
|
+
edit_count: number;
|
|
236
234
|
}
|
|
237
235
|
export type LocalPathSensitivity = "normal" | "sensitive" | "secret";
|
|
238
236
|
export interface LocalPathSensitivityInfo {
|
package/dist/local/core.js
CHANGED
|
@@ -647,7 +647,11 @@ export class LocalWorkdir {
|
|
|
647
647
|
}
|
|
648
648
|
throw error;
|
|
649
649
|
}
|
|
650
|
-
return {
|
|
650
|
+
return {
|
|
651
|
+
applied,
|
|
652
|
+
changed_files: uniqueStrings(applied.map((patch) => patch.path)),
|
|
653
|
+
edit_count: applied.length,
|
|
654
|
+
};
|
|
651
655
|
}
|
|
652
656
|
classifyPath(relativePath) {
|
|
653
657
|
return classifyLocalPathSensitivity(relativePath);
|
|
@@ -1092,6 +1096,9 @@ function selectLineRange(lines, startLine, endLine) {
|
|
|
1092
1096
|
}
|
|
1093
1097
|
return { lines: lines.slice(startLine - 1, end), endLine: end };
|
|
1094
1098
|
}
|
|
1099
|
+
function uniqueStrings(values) {
|
|
1100
|
+
return Array.from(new Set(values));
|
|
1101
|
+
}
|
|
1095
1102
|
function patchLineRange(content, startLine, endLine, replacement) {
|
|
1096
1103
|
const lines = splitLines(content);
|
|
1097
1104
|
const selected = selectLineRange(lines, startLine, endLine);
|
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.3";
|
|
2
|
+
export declare const USER_AGENT = "@agent-api/sdk/1.4.3";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "1.4.
|
|
1
|
+
export const VERSION = "1.4.3";
|
|
2
2
|
export const USER_AGENT = `@agent-api/sdk/${VERSION}`;
|
package/dist-cjs/local/core.js
CHANGED
|
@@ -665,7 +665,11 @@ class LocalWorkdir {
|
|
|
665
665
|
}
|
|
666
666
|
throw error;
|
|
667
667
|
}
|
|
668
|
-
return {
|
|
668
|
+
return {
|
|
669
|
+
applied,
|
|
670
|
+
changed_files: uniqueStrings(applied.map((patch) => patch.path)),
|
|
671
|
+
edit_count: applied.length,
|
|
672
|
+
};
|
|
669
673
|
}
|
|
670
674
|
classifyPath(relativePath) {
|
|
671
675
|
return classifyLocalPathSensitivity(relativePath);
|
|
@@ -1112,6 +1116,9 @@ function selectLineRange(lines, startLine, endLine) {
|
|
|
1112
1116
|
}
|
|
1113
1117
|
return { lines: lines.slice(startLine - 1, end), endLine: end };
|
|
1114
1118
|
}
|
|
1119
|
+
function uniqueStrings(values) {
|
|
1120
|
+
return Array.from(new Set(values));
|
|
1121
|
+
}
|
|
1115
1122
|
function patchLineRange(content, startLine, endLine, replacement) {
|
|
1116
1123
|
const lines = splitLines(content);
|
|
1117
1124
|
const selected = selectLineRange(lines, startLine, endLine);
|
package/dist-cjs/version.js
CHANGED