@slopus/happy-providers 0.0.41 → 0.0.42
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/VENDOR_ANTHROPIC_BEDROCK.md +31 -0
- package/dist/protocol/anthropic/anthropicToolReferences.d.ts +18 -0
- package/dist/protocol/anthropic/anthropicToolReferences.d.ts.map +1 -0
- package/dist/protocol/anthropic/anthropicToolReferences.js +73 -0
- package/dist/protocol/anthropic/anthropicToolReferences.js.map +1 -0
- package/dist/protocol/anthropic/createAnthropicRequest.d.ts.map +1 -1
- package/dist/protocol/anthropic/createAnthropicRequest.js +5 -3
- package/dist/protocol/anthropic/createAnthropicRequest.js.map +1 -1
- package/package.json +1 -1
|
@@ -100,6 +100,34 @@ against that same request's tools. Sending an empty tool list makes an otherwise
|
|
|
100
100
|
fail with `Tool reference 'web_fetch' not found in available tools`. Keep the definitions and the
|
|
101
101
|
opaque historical results intact; `pause_after_compaction` still stops at the native checkpoint.
|
|
102
102
|
|
|
103
|
+
### References to withdrawn tools
|
|
104
|
+
|
|
105
|
+
Keeping the caller's definitions is not enough when the tool set shrinks. An MCP server that fails
|
|
106
|
+
to reconnect, or a model whose tool set lacks a tool an earlier search found, removes a definition
|
|
107
|
+
that stored `tool_search_tool_result` blocks still reference, and every later inference and
|
|
108
|
+
compaction then fails with that same 400. Nothing in the transcript can recover from it.
|
|
109
|
+
|
|
110
|
+
So while serializing each request, inference and compaction alike, the adapter collects every
|
|
111
|
+
`tool_reference` the outgoing messages replay and compares it with the request's `tools`:
|
|
112
|
+
|
|
113
|
+
- With native tool search in the request, each missing tool is declared after the caller's tools,
|
|
114
|
+
in order of first reference, as a deferred placeholder: the referenced name, the description
|
|
115
|
+
`Unavailable: an earlier search found this tool, but it is no longer offered. Calls to it fail.`,
|
|
116
|
+
an empty object schema, and `defer_loading: true`. The history is sent byte for byte. If the
|
|
117
|
+
model calls the placeholder, the call reaches the caller as a tool it does not have, and the
|
|
118
|
+
agent loop answers it with an error tool result.
|
|
119
|
+
- Without native tool search, `defer_loading` is not valid, so only the dangling references are
|
|
120
|
+
left out of that request's copy of the result. The rest of the result keeps its position.
|
|
121
|
+
|
|
122
|
+
Neither path changes caller-owned history. Once the tool is offered again, its real definition
|
|
123
|
+
replaces the placeholder and the stored reference resolves normally. The placeholder is a
|
|
124
|
+
request-local projection of a name the caller's own history already contains, not a tool the
|
|
125
|
+
adapter adds to the session; it is the only way to send that history unchanged.
|
|
126
|
+
|
|
127
|
+
Both Mantle and Runtime build requests through the same `createAnthropicRequest`, so both carry
|
|
128
|
+
this behavior. The direct Anthropic API goes through the Claude Code SDK, which owns its own
|
|
129
|
+
request history.
|
|
130
|
+
|
|
103
131
|
### Server tools across client-tool results
|
|
104
132
|
|
|
105
133
|
An Anthropic `tool_use` response can contain both a client call and an unfinished native server
|
|
@@ -155,6 +183,9 @@ and tools, and the captured Claude golden response stream.
|
|
|
155
183
|
`tests/anthropicBedrockCompactionTools.test.ts` exercises tool-search inference, native compaction,
|
|
156
184
|
and checkpoint continuation through the real SDK with scripted HTTP responses. It verifies both
|
|
157
185
|
session-level and selected-model tool definitions and leaves the caller's history unchanged.
|
|
186
|
+
`tests/anthropicBedrockToolReferences.test.ts` replays a search result that references a tool the
|
|
187
|
+
session no longer offers, with and without native tool search, through inference and compaction,
|
|
188
|
+
against a scripted endpoint that rejects dangling references the way Bedrock does.
|
|
158
189
|
`tests/anthropicBedrock.live.test.ts` performs a real preferred-endpoint turn and a real native
|
|
159
190
|
compaction followed by a checkpoint-replay turn when `RIG_LIVE_TEST=1` and a bearer token are
|
|
160
191
|
available.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BetaMessageParam, BetaToolUnion } from "@anthropic-ai/sdk/resources/beta/messages/messages";
|
|
2
|
+
/** Description of a tool that history found through native search but the request no longer offers. */
|
|
3
|
+
export declare const UNAVAILABLE_ANTHROPIC_TOOL_DESCRIPTION = "Unavailable: an earlier search found this tool, but it is no longer offered. Calls to it fail.";
|
|
4
|
+
/**
|
|
5
|
+
* Anthropic validates every replayed `tool_reference` against the same request's `tools`, so a
|
|
6
|
+
* tool found by an earlier native search and later withdrawn — an MCP server that failed to
|
|
7
|
+
* reconnect, or a model whose tool set differs — would make every later request fail.
|
|
8
|
+
*
|
|
9
|
+
* With native tool search, the withdrawn tool is declared as a deferred placeholder so the
|
|
10
|
+
* caller's history is sent byte for byte; a call to it reaches the caller as an unknown tool.
|
|
11
|
+
* Without tool search `defer_loading` is invalid, so the dangling references alone are left out
|
|
12
|
+
* of this request's copy. Neither path touches caller-owned history.
|
|
13
|
+
*/
|
|
14
|
+
export declare function withAnthropicToolReferences(messages: readonly BetaMessageParam[], tools: readonly BetaToolUnion[], hasToolSearch: boolean): {
|
|
15
|
+
messages: BetaMessageParam[];
|
|
16
|
+
tools: BetaToolUnion[];
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=anthropicToolReferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropicToolReferences.d.ts","sourceRoot":"","sources":["../../../sources/protocol/anthropic/anthropicToolReferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,gBAAgB,EAChB,aAAa,EAChB,MAAM,oDAAoD,CAAC;AAgB5D,uGAAuG;AACvG,eAAO,MAAM,sCAAsC,mGACiD,CAAC;AAErG;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACvC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,aAAa,EAAE,OAAO,GACvB;IAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,CA+B1D"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { Value } from "@sinclair/typebox/value";
|
|
3
|
+
const toolReference = Type.Object({
|
|
4
|
+
type: Type.Literal("tool_reference"),
|
|
5
|
+
tool_name: Type.String(),
|
|
6
|
+
});
|
|
7
|
+
const toolSearchResult = Type.Object({
|
|
8
|
+
type: Type.Literal("tool_search_tool_result"),
|
|
9
|
+
content: Type.Object({
|
|
10
|
+
type: Type.Literal("tool_search_tool_search_result"),
|
|
11
|
+
tool_references: Type.Array(Type.Unknown()),
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
/** Description of a tool that history found through native search but the request no longer offers. */
|
|
15
|
+
export const UNAVAILABLE_ANTHROPIC_TOOL_DESCRIPTION = "Unavailable: an earlier search found this tool, but it is no longer offered. Calls to it fail.";
|
|
16
|
+
/**
|
|
17
|
+
* Anthropic validates every replayed `tool_reference` against the same request's `tools`, so a
|
|
18
|
+
* tool found by an earlier native search and later withdrawn — an MCP server that failed to
|
|
19
|
+
* reconnect, or a model whose tool set differs — would make every later request fail.
|
|
20
|
+
*
|
|
21
|
+
* With native tool search, the withdrawn tool is declared as a deferred placeholder so the
|
|
22
|
+
* caller's history is sent byte for byte; a call to it reaches the caller as an unknown tool.
|
|
23
|
+
* Without tool search `defer_loading` is invalid, so the dangling references alone are left out
|
|
24
|
+
* of this request's copy. Neither path touches caller-owned history.
|
|
25
|
+
*/
|
|
26
|
+
export function withAnthropicToolReferences(messages, tools, hasToolSearch) {
|
|
27
|
+
const offered = new Set(tools.flatMap((tool) => ("name" in tool ? [tool.name] : [])));
|
|
28
|
+
const missing = [...new Set(messages.flatMap(referencedToolNames))].filter((name) => !offered.has(name));
|
|
29
|
+
if (missing.length === 0)
|
|
30
|
+
return { messages: [...messages], tools: [...tools] };
|
|
31
|
+
if (hasToolSearch) {
|
|
32
|
+
return {
|
|
33
|
+
messages: [...messages],
|
|
34
|
+
tools: [
|
|
35
|
+
...tools,
|
|
36
|
+
...missing.map((name) => ({
|
|
37
|
+
name,
|
|
38
|
+
description: UNAVAILABLE_ANTHROPIC_TOOL_DESCRIPTION,
|
|
39
|
+
input_schema: { type: "object" },
|
|
40
|
+
defer_loading: true,
|
|
41
|
+
})),
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
messages: messages.map((message) => typeof message.content === "string"
|
|
47
|
+
? message
|
|
48
|
+
: {
|
|
49
|
+
...message,
|
|
50
|
+
content: message.content.map((block) => withoutReferences(block, offered)),
|
|
51
|
+
}),
|
|
52
|
+
tools: [...tools],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function referencedToolNames(message) {
|
|
56
|
+
if (typeof message.content === "string")
|
|
57
|
+
return [];
|
|
58
|
+
return message.content.flatMap((block) => Value.Check(toolSearchResult, block)
|
|
59
|
+
? block.content.tool_references.flatMap((reference) => Value.Check(toolReference, reference) ? [reference.tool_name] : [])
|
|
60
|
+
: []);
|
|
61
|
+
}
|
|
62
|
+
function withoutReferences(block, offered) {
|
|
63
|
+
if (!Value.Check(toolSearchResult, block))
|
|
64
|
+
return block;
|
|
65
|
+
return {
|
|
66
|
+
...block,
|
|
67
|
+
content: {
|
|
68
|
+
...block.content,
|
|
69
|
+
tool_references: block.content.tool_references.filter((reference) => !Value.Check(toolReference, reference) || offered.has(reference.tool_name)),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=anthropicToolReferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropicToolReferences.js","sourceRoot":"","sources":["../../../sources/protocol/anthropic/anthropicToolReferences.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACpC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AACH,MAAM,gBAAgB,GAA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AAK,CAAC,OAAO;YAChB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CACjD,CAAC,SAAS,EAAE,EAAE,CACV,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,CACjF;SACJ;KACqB,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAnthropicRequest.d.ts","sourceRoot":"","sources":["../../../sources/protocol/anthropic/createAnthropicRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAEvG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACnG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"createAnthropicRequest.d.ts","sourceRoot":"","sources":["../../../sources/protocol/anthropic/createAnthropicRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAEvG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACnG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AASzD,MAAM,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAE5D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC5C,UAAU,CAAC,EAAE;QACT,YAAY,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CACjC,GAAG,gBAAgB,CAqEnB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { withAnthropicToolReferences } from "../../protocol/anthropic/anthropicToolReferences.js";
|
|
1
2
|
import { toAnthropicMessages } from "../../protocol/anthropic/toAnthropicMessages.js";
|
|
2
3
|
import { toAnthropicSystem } from "../../protocol/anthropic/toAnthropicSystem.js";
|
|
3
4
|
import { isAnthropicToolSearchTool, toAnthropicTools, } from "../../protocol/anthropic/toAnthropicTools.js";
|
|
4
5
|
export function createAnthropicRequest(options) {
|
|
5
6
|
const effort = resolveEffort(options.effort);
|
|
6
7
|
const system = toAnthropicSystem(options);
|
|
7
|
-
const
|
|
8
|
+
const hasToolSearch = options.tools.some(isAnthropicToolSearchTool);
|
|
9
|
+
const { messages, tools } = withAnthropicToolReferences(toAnthropicMessages(options.context.messages), toAnthropicTools(options.tools), hasToolSearch);
|
|
8
10
|
const hasCompaction = options.context.messages.some((message) => message.role === "compaction");
|
|
9
11
|
const requestsCompaction = options.compaction !== undefined;
|
|
10
12
|
const usesCompaction = requestsCompaction || hasCompaction;
|
|
@@ -13,7 +15,7 @@ export function createAnthropicRequest(options) {
|
|
|
13
15
|
betas.push("compact-2026-01-12");
|
|
14
16
|
if (options.structuredOutput !== undefined)
|
|
15
17
|
betas.push("structured-outputs-2025-12-15");
|
|
16
|
-
if (
|
|
18
|
+
if (hasToolSearch) {
|
|
17
19
|
betas.push("tool-search-tool-2025-10-19");
|
|
18
20
|
}
|
|
19
21
|
return {
|
|
@@ -45,7 +47,7 @@ export function createAnthropicRequest(options) {
|
|
|
45
47
|
},
|
|
46
48
|
}),
|
|
47
49
|
max_tokens: 64_000,
|
|
48
|
-
messages
|
|
50
|
+
messages,
|
|
49
51
|
model: options.model,
|
|
50
52
|
stream: true,
|
|
51
53
|
...(system.length === 0 ? {} : { system }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAnthropicRequest.js","sourceRoot":"","sources":["../../../sources/protocol/anthropic/createAnthropicRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EACH,yBAAyB,EACzB,gBAAgB,GACnB,MAAM,0CAA0C,CAAC;AAIlD,MAAM,UAAU,sBAAsB,CAAC,OAStC;IACG,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"createAnthropicRequest.js","sourceRoot":"","sources":["../../../sources/protocol/anthropic/createAnthropicRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EACH,yBAAyB,EACzB,gBAAgB,GACnB,MAAM,0CAA0C,CAAC;AAIlD,MAAM,UAAU,sBAAsB,CAAC,OAStC;IACG,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IACpE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,2BAA2B,CACnD,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EA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