@burtson-labs/agent-core 1.6.93 → 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.
Files changed (57) hide show
  1. package/LICENSE +11 -11
  2. package/dist/tools/core-tools.d.ts +51 -0
  3. package/dist/tools/core-tools.d.ts.map +1 -1
  4. package/dist/tools/core-tools.js +466 -142
  5. package/dist/tools/core-tools.js.map +1 -1
  6. package/dist/tools/grep-glob.d.ts +35 -0
  7. package/dist/tools/grep-glob.d.ts.map +1 -0
  8. package/dist/tools/grep-glob.js +115 -0
  9. package/dist/tools/grep-glob.js.map +1 -0
  10. package/dist/tools/index.d.ts +1 -0
  11. package/dist/tools/index.d.ts.map +1 -1
  12. package/dist/tools/index.js +1 -0
  13. package/dist/tools/index.js.map +1 -1
  14. package/dist/tools/language-adapters.d.ts +15 -1
  15. package/dist/tools/language-adapters.d.ts.map +1 -1
  16. package/dist/tools/language-adapters.js +58 -4
  17. package/dist/tools/language-adapters.js.map +1 -1
  18. package/dist/tools/loop/llmStream.d.ts +37 -0
  19. package/dist/tools/loop/llmStream.d.ts.map +1 -1
  20. package/dist/tools/loop/llmStream.js +155 -3
  21. package/dist/tools/loop/llmStream.js.map +1 -1
  22. package/dist/tools/loop/loopShared.d.ts +12 -0
  23. package/dist/tools/loop/loopShared.d.ts.map +1 -1
  24. package/dist/tools/loop/loopShared.js +24 -0
  25. package/dist/tools/loop/loopShared.js.map +1 -1
  26. package/dist/tools/loop/toolCallNormalize.d.ts +2 -0
  27. package/dist/tools/loop/toolCallNormalize.d.ts.map +1 -1
  28. package/dist/tools/loop/toolCallNormalize.js +3 -0
  29. package/dist/tools/loop/toolCallNormalize.js.map +1 -1
  30. package/dist/tools/skill-loader.d.ts.map +1 -1
  31. package/dist/tools/skill-loader.js +11 -0
  32. package/dist/tools/skill-loader.js.map +1 -1
  33. package/dist/tools/skills/semantic-search-skill.d.ts +3 -2
  34. package/dist/tools/skills/semantic-search-skill.d.ts.map +1 -1
  35. package/dist/tools/skills/semantic-search-skill.js +22 -2
  36. package/dist/tools/skills/semantic-search-skill.js.map +1 -1
  37. package/dist/tools/skills/test-gen-skill.d.ts.map +1 -1
  38. package/dist/tools/skills/test-gen-skill.js +11 -0
  39. package/dist/tools/skills/test-gen-skill.js.map +1 -1
  40. package/dist/tools/tool-registry.d.ts.map +1 -1
  41. package/dist/tools/tool-registry.js +10 -0
  42. package/dist/tools/tool-registry.js.map +1 -1
  43. package/dist/tools/tool-types.d.ts +16 -0
  44. package/dist/tools/tool-types.d.ts.map +1 -1
  45. package/dist/tools/tool-use-loop.d.ts +6 -0
  46. package/dist/tools/tool-use-loop.d.ts.map +1 -1
  47. package/dist/tools/tool-use-loop.js +105 -12
  48. package/dist/tools/tool-use-loop.js.map +1 -1
  49. package/dist/tools/tool-use-parser.d.ts +15 -0
  50. package/dist/tools/tool-use-parser.d.ts.map +1 -1
  51. package/dist/tools/tool-use-parser.js +80 -1
  52. package/dist/tools/tool-use-parser.js.map +1 -1
  53. package/dist/tools/unified-patch.d.ts +17 -0
  54. package/dist/tools/unified-patch.d.ts.map +1 -1
  55. package/dist/tools/unified-patch.js +62 -1
  56. package/dist/tools/unified-patch.js.map +1 -1
  57. 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 describing the origin of the Work and
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 accept and charge a
167
- fee for acceptance of support, warranty, indemnity, or other liability
168
- obligations and/or rights consistent with this License. However, in
169
- accepting such obligations, You may act only on Your own behalf
170
- and on Your sole responsibility, not on behalf of any other Contributor,
171
- and only if You agree to indemnify, defend, and hold each Contributor
172
- harmless for any liability incurred by, or claims asserted against,
173
- such Contributor by reason of your accepting any such warranty or
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,C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