bare-agent 0.46.6 → 0.48.0
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/bareagent.context.md +23 -4
- package/examples/with-bareguard.mjs +23 -22
- package/package.json +4 -4
- package/primitives.json +13 -4
- package/src/bareguard-adapter.d.ts +33 -8
- package/src/bareguard-adapter.js +98 -15
- package/src/loop.d.ts +6 -2
- package/src/loop.js +2 -2
- package/src/provider-ollama.d.ts +12 -0
- package/src/provider-ollama.js +7 -1
- package/src/provider-openai.d.ts +14 -0
- package/src/provider-openai.js +8 -1
- package/src/provider-toolcalls.d.ts +15 -3
- package/src/provider-toolcalls.js +28 -8
- package/src/retry.d.ts +1 -1
- package/src/retry.js +1 -1
- package/src/tools.d.ts +2 -1
- package/src/tools.js +2 -1
- package/tools/shell.d.ts +136 -6
- package/tools/shell.js +406 -59
- package/types/index.d.ts +6 -1
package/types/index.d.ts
CHANGED
|
@@ -142,8 +142,13 @@ export interface GenerateResult {
|
|
|
142
142
|
* tool call" and retries; `usage`/`model` still flow so the round is metered. The JSON is NEVER
|
|
143
143
|
* repaired. Absent on a clean round. OpenAI-compatible + Ollama string-arguments only; Anthropic
|
|
144
144
|
* arrives pre-parsed and cannot hit this.
|
|
145
|
+
*
|
|
146
|
+
* `rawArguments`/`rawTruncated` (BA-27 follow-up) are present only when the provider was
|
|
147
|
+
* constructed with `exposeMalformedArgs: true` (default off, mirrors `exposeErrorBody`) AND the
|
|
148
|
+
* raw `function.arguments` was a string: the raw value verbatim, capped at 500 chars, with
|
|
149
|
+
* `rawTruncated: true` added only when it was longer.
|
|
145
150
|
*/
|
|
146
|
-
malformedToolCall?: { name: string | undefined; error: string };
|
|
151
|
+
malformedToolCall?: { name: string | undefined; error: string; rawArguments?: string; rawTruncated?: true };
|
|
147
152
|
/**
|
|
148
153
|
* BA-7 — provider-native content blocks the normalized `{text, toolCalls}` shape cannot express
|
|
149
154
|
* (Anthropic `thinking` / `redacted_thinking`), captured opaquely so the Loop can put them on the
|