@burtson-labs/agent-core 1.6.94 → 1.6.95
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/LICENSE +11 -11
- package/dist/tools/core-tools.d.ts +51 -0
- package/dist/tools/core-tools.d.ts.map +1 -1
- package/dist/tools/core-tools.js +416 -142
- package/dist/tools/core-tools.js.map +1 -1
- package/dist/tools/language-adapters.d.ts.map +1 -1
- package/dist/tools/language-adapters.js +5 -1
- package/dist/tools/language-adapters.js.map +1 -1
- package/dist/tools/loop/llmStream.d.ts +37 -0
- package/dist/tools/loop/llmStream.d.ts.map +1 -1
- package/dist/tools/loop/llmStream.js +155 -3
- package/dist/tools/loop/llmStream.js.map +1 -1
- package/dist/tools/loop/loopShared.d.ts +12 -0
- package/dist/tools/loop/loopShared.d.ts.map +1 -1
- package/dist/tools/loop/loopShared.js +24 -0
- package/dist/tools/loop/loopShared.js.map +1 -1
- package/dist/tools/skill-loader.d.ts.map +1 -1
- package/dist/tools/skill-loader.js +11 -0
- package/dist/tools/skill-loader.js.map +1 -1
- package/dist/tools/skills/test-gen-skill.d.ts.map +1 -1
- package/dist/tools/skills/test-gen-skill.js +11 -0
- package/dist/tools/skills/test-gen-skill.js.map +1 -1
- package/dist/tools/tool-registry.d.ts.map +1 -1
- package/dist/tools/tool-registry.js +10 -0
- package/dist/tools/tool-registry.js.map +1 -1
- package/dist/tools/tool-types.d.ts +16 -0
- package/dist/tools/tool-types.d.ts.map +1 -1
- package/dist/tools/tool-use-loop.d.ts +6 -0
- package/dist/tools/tool-use-loop.d.ts.map +1 -1
- package/dist/tools/tool-use-loop.js +56 -3
- package/dist/tools/tool-use-loop.js.map +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -137,8 +137,8 @@
|
|
|
137
137
|
|
|
138
138
|
6. Trademarks. This License does not grant permission to use the trade
|
|
139
139
|
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for
|
|
141
|
-
reproducing the content of the NOTICE file.
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
142
|
|
|
143
143
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
144
|
agreed to in writing, Licensor provides the Work (and each
|
|
@@ -163,15 +163,15 @@
|
|
|
163
163
|
has been advised of the possibility of such damages.
|
|
164
164
|
|
|
165
165
|
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may
|
|
167
|
-
fee for acceptance of support, warranty, indemnity,
|
|
168
|
-
obligations and/or rights consistent with this
|
|
169
|
-
accepting such obligations, You may act only
|
|
170
|
-
and on Your sole responsibility, not on behalf
|
|
171
|
-
and only if You agree to indemnify,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
additional liability.
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
175
|
|
|
176
176
|
END OF TERMS AND CONDITIONS
|
|
177
177
|
|
|
@@ -6,16 +6,67 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { AgentTool } from './tool-types';
|
|
8
8
|
import { ToolRegistry } from './tool-registry';
|
|
9
|
+
/**
|
|
10
|
+
* File text whose escapes were written twice: `\n`, `\t`, `\"`, `\'` and
|
|
11
|
+
* `\\` as two characters where the file needs one. gemma4:12b does this in
|
|
12
|
+
* native tool arguments (2026-10-20 benchmark: every edit in all three runs
|
|
13
|
+
* of a Python task carried `\"\"\"docstring\"\"\"` and `\n\n\ndef`, each
|
|
14
|
+
* rejected by the syntax check, 7 to 27 times per run until the run ended).
|
|
15
|
+
* Returns the decoded text, or null when there is nothing to decode. The
|
|
16
|
+
* edit tools use it only after the literal text has FAILED validation, and
|
|
17
|
+
* keep the decoded text only when it passes — legitimate escapes inside
|
|
18
|
+
* string literals (`"a\nb"`) parse as written and are never touched.
|
|
19
|
+
*/
|
|
20
|
+
export declare function decodeOverEscaped(text: string): string | null;
|
|
9
21
|
declare const readFileTool: AgentTool;
|
|
10
22
|
declare const writeFileTool: AgentTool;
|
|
11
23
|
declare const deleteFileTool: AgentTool;
|
|
12
24
|
declare const applyEditTool: AgentTool;
|
|
13
25
|
declare const replaceRangeTool: AgentTool;
|
|
26
|
+
type PatchHunkItem = {
|
|
27
|
+
kind: 'context' | 'removed' | 'added';
|
|
28
|
+
text: string;
|
|
29
|
+
};
|
|
30
|
+
/** Body lines of an `*** Add File:` block (text after the `+`). */
|
|
31
|
+
export declare function addFileLines(rawLines: string[]): string[];
|
|
32
|
+
export interface ResolvedPatchHunk {
|
|
33
|
+
find: string;
|
|
34
|
+
replace: string;
|
|
35
|
+
/** Exact occurrences of `find` in the file. */
|
|
36
|
+
occurrences: number;
|
|
37
|
+
/** Which reading of the marker produced `find`/`replace`. */
|
|
38
|
+
spelling: 'one-char' | 'marker-space';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Turn one hunk into a find/replace against `file`. The one-character
|
|
42
|
+
* reading wins when its find text is in the file. When it is not and the
|
|
43
|
+
* "marker + space" reading of the removed and added lines is, the model
|
|
44
|
+
* wrote that form and both sides use it. A hunk with no removed lines
|
|
45
|
+
* cannot be told apart by matching (its context matches either way), so
|
|
46
|
+
* its added lines use the marker-space reading only when every one of
|
|
47
|
+
* them is indented by an odd number of spaces and the context is not.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolvePatchHunk(hunk: PatchHunkItem[], file: string): ResolvedPatchHunk;
|
|
14
50
|
declare const applyPatchTool: AgentTool;
|
|
15
51
|
declare const listFilesTool: AgentTool;
|
|
52
|
+
/**
|
|
53
|
+
* A path as the model should see it: relative to the workspace root when it
|
|
54
|
+
* is inside it (read_file, apply_edit and search take those), absolute
|
|
55
|
+
* otherwise. Hosts return absolute paths; repeating a temp-dir root such as
|
|
56
|
+
* `/private/var/folders/.../T/<run>/` on every line cost ~20 tokens a file
|
|
57
|
+
* and nothing the model could use.
|
|
58
|
+
*/
|
|
59
|
+
export declare function workspaceDisplayPath(filePath: string, workspaceRoot: string | undefined): string;
|
|
16
60
|
declare const lsTool: AgentTool;
|
|
17
61
|
declare const findDirectoryTool: AgentTool;
|
|
18
62
|
declare const searchCodeTool: AgentTool;
|
|
63
|
+
/**
|
|
64
|
+
* The run_command allow-list and blocked patterns, as one check other
|
|
65
|
+
* command-running tools can apply before they call `ctx.runCommand`. Returns
|
|
66
|
+
* the refusal message, or null when the command may run. A workspace skill's
|
|
67
|
+
* `command` used to bypass both — `sh`, `bash` and friends included.
|
|
68
|
+
*/
|
|
69
|
+
export declare function runCommandRefusal(cmd: string, args: string[]): string | null;
|
|
19
70
|
declare const runCommandTool: AgentTool;
|
|
20
71
|
/**
|
|
21
72
|
* Directive hint for a failed run_command, or '' when nothing recognized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-tools.d.ts","sourceRoot":"","sources":["../../src/tools/core-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAoC,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"core-tools.d.ts","sourceRoot":"","sources":["../../src/tools/core-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAoC,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAkG/C;;;;;;;;;;GAUG;AACH,wBAAg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