@slopus/happy-providers 0.0.62 → 0.0.65

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 (76) hide show
  1. package/README.md +4 -2
  2. package/VENDOR_ANTHROPIC_BEDROCK.md +66 -0
  3. package/VENDOR_CLAUDE.md +17 -0
  4. package/VENDOR_CODEX.md +6 -0
  5. package/dist/core/SessionEvent.d.ts +7 -1
  6. package/dist/core/SessionEvent.d.ts.map +1 -1
  7. package/dist/core/SessionEvent.js.map +1 -1
  8. package/dist/core/happyProvidersVersion.d.ts +1 -1
  9. package/dist/core/happyProvidersVersion.js +1 -1
  10. package/dist/core/hiddenChildProcess.d.ts +15 -0
  11. package/dist/core/hiddenChildProcess.d.ts.map +1 -0
  12. package/dist/core/hiddenChildProcess.js +45 -0
  13. package/dist/core/hiddenChildProcess.js.map +1 -0
  14. package/dist/protocol/acp/impl/acpConnectionSpawn.d.ts.map +1 -1
  15. package/dist/protocol/acp/impl/acpConnectionSpawn.js +2 -3
  16. package/dist/protocol/acp/impl/acpConnectionSpawn.js.map +1 -1
  17. package/dist/protocol/acp/impl/processTree.d.ts +1 -1
  18. package/dist/protocol/acp/impl/processTree.d.ts.map +1 -1
  19. package/dist/protocol/acp/impl/processTree.js +3 -4
  20. package/dist/protocol/acp/impl/processTree.js.map +1 -1
  21. package/dist/protocol/anthropic/createAnthropicRequest.d.ts +8 -0
  22. package/dist/protocol/anthropic/createAnthropicRequest.d.ts.map +1 -1
  23. package/dist/protocol/anthropic/createAnthropicRequest.js +14 -1
  24. package/dist/protocol/anthropic/createAnthropicRequest.js.map +1 -1
  25. package/dist/vendors/bedrock/AnthropicBedrockSession.d.ts +26 -0
  26. package/dist/vendors/bedrock/AnthropicBedrockSession.d.ts.map +1 -1
  27. package/dist/vendors/bedrock/AnthropicBedrockSession.js +117 -14
  28. package/dist/vendors/bedrock/AnthropicBedrockSession.js.map +1 -1
  29. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingBinding.d.ts +27 -0
  30. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingBinding.d.ts.map +1 -0
  31. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingBinding.js +54 -0
  32. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingBinding.js.map +1 -0
  33. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingHeal.d.ts +35 -0
  34. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingHeal.d.ts.map +1 -0
  35. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingHeal.js +133 -0
  36. package/dist/vendors/bedrock/impl/anthropicBedrockThinkingHeal.js.map +1 -0
  37. package/dist/vendors/bedrock/impl/resolveBedrockModelId.d.ts.map +1 -1
  38. package/dist/vendors/bedrock/impl/resolveBedrockModelId.js +2 -0
  39. package/dist/vendors/bedrock/impl/resolveBedrockModelId.js.map +1 -1
  40. package/dist/vendors/claude/ClaudeSession.d.ts.map +1 -1
  41. package/dist/vendors/claude/ClaudeSession.js +13 -1
  42. package/dist/vendors/claude/ClaudeSession.js.map +1 -1
  43. package/dist/vendors/claude/errors/claudeErrors.d.ts +8 -1
  44. package/dist/vendors/claude/errors/claudeErrors.d.ts.map +1 -1
  45. package/dist/vendors/claude/errors/claudeErrors.js +27 -0
  46. package/dist/vendors/claude/errors/claudeErrors.js.map +1 -1
  47. package/dist/vendors/claude/impl/auth.js +2 -2
  48. package/dist/vendors/claude/impl/auth.js.map +1 -1
  49. package/dist/vendors/claude/impl/spawnClaudeCodeChild.d.ts +27 -0
  50. package/dist/vendors/claude/impl/spawnClaudeCodeChild.d.ts.map +1 -0
  51. package/dist/vendors/claude/impl/spawnClaudeCodeChild.js +157 -0
  52. package/dist/vendors/claude/impl/spawnClaudeCodeChild.js.map +1 -0
  53. package/dist/vendors/claude/impl/toClaudeRetryEvent.d.ts.map +1 -1
  54. package/dist/vendors/claude/impl/toClaudeRetryEvent.js +2 -0
  55. package/dist/vendors/claude/impl/toClaudeRetryEvent.js.map +1 -1
  56. package/dist/vendors/claude/impl/toClaudeSdkOptions.d.ts.map +1 -1
  57. package/dist/vendors/claude/impl/toClaudeSdkOptions.js +11 -0
  58. package/dist/vendors/claude/impl/toClaudeSdkOptions.js.map +1 -1
  59. package/dist/vendors/claudeAgent/claudeAgentConnect.d.ts.map +1 -1
  60. package/dist/vendors/claudeAgent/claudeAgentConnect.js +10 -13
  61. package/dist/vendors/claudeAgent/claudeAgentConnect.js.map +1 -1
  62. package/dist/vendors/codex/CodexProvider.js +1 -1
  63. package/dist/vendors/codex/CodexProvider.js.map +1 -1
  64. package/dist/vendors/codex/impl/codexUserAgent.js +2 -2
  65. package/dist/vendors/codex/impl/codexUserAgent.js.map +1 -1
  66. package/dist/vendors/codex/impl/getCodexModelProperties.d.ts.map +1 -1
  67. package/dist/vendors/codex/impl/getCodexModelProperties.js +15 -0
  68. package/dist/vendors/codex/impl/getCodexModelProperties.js.map +1 -1
  69. package/dist/vendors/codexAppServer/codexAppServerConnect.js +2 -3
  70. package/dist/vendors/codexAppServer/codexAppServerConnect.js.map +1 -1
  71. package/dist/vendors/foreignAgents/antigravityAgent.js +2 -2
  72. package/dist/vendors/foreignAgents/antigravityAgent.js.map +1 -1
  73. package/dist/vendors/foreignAgents/codexCliAgent.d.ts.map +1 -1
  74. package/dist/vendors/foreignAgents/codexCliAgent.js +2 -0
  75. package/dist/vendors/foreignAgents/codexCliAgent.js.map +1 -1
  76. package/package.json +1 -1
package/README.md CHANGED
@@ -546,7 +546,9 @@ block_start -> replacement deltas -> block_stop -> done
546
546
 
547
547
  - `block_start` begins tentative output for an attempt.
548
548
  - `block_reset` retracts everything since the matching `block_start`.
549
- - `retrying` reports the next provider-owned retry and its reason.
549
+ - `retrying` reports the next provider-owned retry and its reason. When the provider knows what
550
+ failed, `providerError` classifies it in the same vocabulary as a terminal error, so a UI can
551
+ say "signing in again" rather than "overloaded" while the provider retries.
550
552
  - `block_stop` commits the current block; its output is now safe to persist as the response.
551
553
 
552
554
  `block_reset` may also precede cancellation or a terminal error when no retry follows. It rewinds
@@ -1027,7 +1029,7 @@ type SessionEvent =
1027
1029
  incomplete?: boolean;
1028
1030
  }
1029
1031
  // Progress.
1030
- | { type: "retrying"; attempt: number; reason: string }
1032
+ | { type: "retrying"; attempt: number; reason: string; providerError?: SessionProviderError }
1031
1033
  | { type: "token_usage"; usage: SessionUsage }
1032
1034
  // Exactly one done event ends every started stream.
1033
1035
  | { type: "done"; state: "cancelled" }
@@ -26,6 +26,68 @@ disabled. The replay edit's trigger sits beyond the 1M context window so the pro
26
26
  compacts mid-run; only `compact()` sends the edit with a real trigger and
27
27
  `pause_after_compaction` to ask the provider for a new checkpoint.
28
28
 
29
+ On Runtime, a request for a model that checks the prefix of replayed thinking (Fable 5.2,
30
+ Mythos 5.2, Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5) additionally carries the
31
+ `thinking-binding-controls-2026-08-01` beta and
32
+ `thinking: { type: "adaptive", block_binding: { prefix_mismatch_behavior: "drop_block" } }`.
33
+ These models tie each signed thinking block to the system prompt, the tools, and every message
34
+ before it. When any of them changed, the API otherwise rejects the request with `Invalid signature
35
+ in thinking block. The block is bound to a different conversation`, and the conversation cannot
36
+ recover, because the caller's stored history still holds that thinking. A caller's system prompt
37
+ and tools do change during a conversation, so the adapter asks the API to drop the blocks that
38
+ fail the check, and every later thinking block, for that request. The history is sent byte for
39
+ byte and stays the caller's; the drop is the server's own projection. It costs the prompt cache
40
+ from the first dropped block onward and the model its earlier reasoning, so a caller should still
41
+ keep its prefix stable. Inference and compaction both carry the control. It is left out with
42
+ thinking disabled, where the API refuses the field, for every other model, for a model named only
43
+ by an opaque ARN, and on Mantle.
44
+
45
+ The control follows the AWS Bedrock user guide's "Preserved thinking" page, which documents it for
46
+ `InvokeModel`, and Claude Code, which sends the same beta and field on Bedrock. It shipped without
47
+ a live Bedrock request. If an endpoint refuses it (a gateway, region, or account that does not
48
+ take the beta), the session resends that request once without it and leaves it out from then on,
49
+ as Claude Code does. A refusal is a 400 that says `block_binding: Extra inputs are not permitted`,
50
+ names the beta, or says `invalid beta flag`; those three matches come from Claude Code rather than
51
+ from recorded responses. A prefix mismatch is never treated as a refusal.
52
+
53
+ When the rejection arrives anyway, on Runtime or Mantle and whether or not the control was sent,
54
+ the session removes the rejected thinking from the request and asks again. That is the repair
55
+ Anthropic documents under "Remove the invalid thinking by hand" and the third layer Claude Code
56
+ keeps behind a stable prefix and the control. A rejection is a 400 whose message says
57
+ `bound to a different conversation` or `not created in this conversation`; the rest of the message
58
+ is documented as free to change and is not matched.
59
+
60
+ - The first rejection of a request removes the block the API names and every `thinking` and
61
+ `redacted_thinking` block after it. The position comes from the
62
+ `anthropic-thinking-prefix-mismatch` response header (`block=messages.N.content.M` among
63
+ `;`-separated pairs, ignored beyond 2048 characters) and otherwise from the
64
+ `messages.N.content.M` path in the error message. The API counts two adjacent messages of one
65
+ role as one, so its position can be lower than the adapter's; a position that does not land on a
66
+ thinking block of the request is not used, and all thinking is removed instead, as it is when
67
+ the API names no position.
68
+ - If the request is rejected the same way again, all remaining thinking is removed and it is sent
69
+ once more. There is no third step: one request costs at most two extra round trips, and a
70
+ rejection with nothing left to remove is reported as it is.
71
+ - Every other block is sent unchanged. An assistant message that held only thinking is sent with
72
+ the text `[Thinking removed]`, as Claude Code does, because the API refuses an empty assistant
73
+ message and leaving the message out would join two user turns. The adapter requests adaptive
74
+ thinking, which does not require an assistant turn to start with a thinking block; manual
75
+ (`enabled`) thinking does, and the adapter never sends it.
76
+ - The caller's history is never changed. The session remembers which blocks were rejected, by a
77
+ digest of their signature, and leaves them out of every later inference and compaction request,
78
+ so the failed round trip is paid once. Thinking produced after a removal is bound to the history
79
+ without those blocks, so they must stay out. A block is forgotten once the history no longer
80
+ holds it. The memory belongs to the session object: a new session for the same conversation (a
81
+ restarted process, or a caller that rebuilds its session) pays the failed round trip once more.
82
+ - Neither this nor giving up the control is a failed attempt, and neither changes how ordinary
83
+ failures are retried. Within one request the order is fixed: a refused control is given up
84
+ first, at most once per session, and rejected thinking is removed after that, at most twice.
85
+ - Nothing is removed once response content has started.
86
+
87
+ Removal costs the prompt cache from the first removed block and the model that reasoning. Like the
88
+ control, it shipped without a live Bedrock request: the matched phrases, the header, and the
89
+ `[Thinking removed]` text follow Claude Code and Anthropic's documentation, not recorded responses.
90
+
29
91
  The transcript must end with a user turn, a tool result, or that native compaction checkpoint.
30
92
  Claude models from 4.6 onward reject a trailing assistant message ("This model does not support
31
93
  assistant message prefill"), and the adapter does not add or drop a turn to work around it:
@@ -201,6 +263,10 @@ session-level and selected-model tool definitions and leaves the caller's histor
201
263
  `tests/anthropicBedrockToolReferences.test.ts` replays a search result that references a tool the
202
264
  session no longer offers, with and without native tool search, through inference and compaction,
203
265
  against a scripted endpoint that rejects dangling references the way Bedrock does.
266
+ `tests/anthropicBedrockThinkingBinding.test.ts` replays signed thinking through the real Runtime
267
+ SDK client against a scripted endpoint: the control on inference and compaction for a
268
+ prefix-checked model, its absence elsewhere, and the one-time renegotiation when an endpoint
269
+ refuses it.
204
270
  `tests/anthropicBedrock.live.test.ts` performs a real preferred-endpoint turn and a real native
205
271
  compaction followed by a checkpoint-replay turn when `RIG_LIVE_TEST=1` and a bearer token are
206
272
  available.
package/VENDOR_CLAUDE.md CHANGED
@@ -367,6 +367,23 @@ results. The listener is removed on normal completion, error, synchronous query-
367
367
  failure, or cancellation. The same resources are also closed by `destroy()`, or when model,
368
368
  effort, tools, prompt, or compaction mode changes.
369
369
 
370
+ A child using a stored Claude Code sign-in renews it itself: it spends the refresh token at the
371
+ token endpoint, then saves the new pair. The SDK stops a closed child with SIGTERM two seconds
372
+ after closing its input, so a stop landing between those steps used to leave a spent refresh
373
+ token in the store. The next renewal by any process was refused, and Claude Code then cleared the
374
+ sign-in shared by every session on that account until the person signed in again.
375
+ `impl/spawnClaudeCodeChild.ts` therefore spawns these children and holds every stop of one child
376
+ while that child is renewing. Claude Code names the holder of `.oauth_refresh.lock` in
377
+ `.oauth_refresh.lock.owner`, so a lock held by the terminal `claude` or another session does not
378
+ delay the stop; until the record names a holder, the child is assumed to be it. The stops of one
379
+ child share a single wait of 32 seconds, Claude Code 2.1.321's 30-second token request timeout plus
380
+ a margin. Claude Code touches a held lock every five seconds, so a lock untouched for ten seconds
381
+ counts as abandoned. The wait uses unreferenced timers and never delays daemon exit; a child left
382
+ behind still saves its renewal and exits once it sees its input closed. Tokens Rig passes in are
383
+ never renewed by the child, so those children use the SDK's own spawn. The Claude Code harness
384
+ spawns its children the same way and also defers its process-tree stop with
385
+ `afterClaudeCodeRenewal`.
386
+
370
387
  ## Trace and test coverage
371
388
 
372
389
  `tests/vendors/captureClaudeTrace.mjs` captures vanilla CLI behavior with real inference,
package/VENDOR_CODEX.md CHANGED
@@ -129,6 +129,12 @@ The reviewed model contracts are:
129
129
  - `gpt-5.5`: ordinary Responses request shape, compaction hash `2911`, default medium effort;
130
130
  - `gpt-6-astra`: Responses Lite by default and ordinary Responses for parallel tool calls,
131
131
  compaction hash `3000`, default low effort, and API efforts low through max;
132
+ - `gpt-6.2-astra` and `gpt-6.2-sol`: Codex subscription windows of 272,000 and 500,000 tokens
133
+ from OpenAI's Codex models page; Codex's `models.json` has no 6.2 entry yet, so the rest of the
134
+ contract (Responses Lite, hash `3000`, default low effort) follows GPT-6.1 Sol. The API rejects
135
+ effort `none`. Bedrock IDs follow the GPT-6 pattern (`openai.gpt-6.2-astra` on Mantle,
136
+ `global.openai.gpt-6.2-astra` on Runtime by default) before AWS documents them; not yet
137
+ verified live;
132
138
  - `gpt-6.1-sol`: same contract as Astra with default low effort, as Codex's `models.json` lists
133
139
  it; not served by Bedrock, which documents no GPT-6.1 model, and not yet verified live;
134
140
  - `gpt-6-sol`: same contract as Astra with default low effort; live tool-less inference verified
@@ -78,10 +78,16 @@ export type SessionEvent = {
78
78
  content: readonly SessionOutputBlock[];
79
79
  isError?: boolean;
80
80
  incomplete?: boolean;
81
- } | {
81
+ }
82
+ /**
83
+ * A provider-owned retry is about to start. `providerError` classifies the failure being
84
+ * retried when the provider knows it, in the same vocabulary as a terminal error.
85
+ */
86
+ | {
82
87
  type: "retrying";
83
88
  attempt: number;
84
89
  reason: string;
90
+ providerError?: SessionProviderError;
85
91
  } | {
86
92
  type: "token_usage";
87
93
  usage: SessionUsage;
@@ -1 +1 @@
1
- {"version":3,"file":"SessionEvent.d.ts","sourceRoot":"","sources":["../../sources/core/SessionEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,YAAY,EACR,oBAAoB,EACpB,+BAA+B,GAClC,MAAM,gCAAgC,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,eAAe,GAAG,SAAS,CAAC;AAEnG,MAAM,WAAW,aAAa;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AAED,4DAA4D;AAC5D,MAAM,MAAM,YAAY,GAClB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAA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AM,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GACxD;IACI,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACxC,CAAC;AAER,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;AAExD,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,YAAY,GACpB,KAAK,IAAI,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAElD;AAED,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,YAAY,GACpB,KAAK,IAAI,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAElE"}
@@ -1 +1 @@
1
- {"version":3,"file":"SessionEvent.js","sourceRoot":"","sources":["../../sources/core/SessionEvent.ts"],"names":[],"mappings":"AAsFA,MAAM,UAAU,kBAAkB,CAC9B,KAAmB;IAEnB,OAAO,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAC9B,KAAmB;IAEnB,OAAO,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,CAAC;AAC5D,CAAC"}
1
+ {"version":3,"file":"SessionEvent.js","sourceRoot":"","sources":["../../sources/core/SessionEvent.ts"],"names":[],"mappings":"AA0FA,MAAM,UAAU,kBAAkB,CAC9B,KAAmB;IAEnB,OAAO,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAC9B,KAAmB;IAEnB,OAAO,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,CAAC;AAC5D,CAAC"}
@@ -3,5 +3,5 @@
3
3
  * where a compiled binary has no `package.json` to read. A test keeps it equal to the package's own
4
4
  * version, so a release that bumps one without the other fails before it publishes.
5
5
  */
6
- export declare const HAPPY_PROVIDERS_VERSION = "0.0.62";
6
+ export declare const HAPPY_PROVIDERS_VERSION = "0.0.65";
7
7
  //# sourceMappingURL=happyProvidersVersion.d.ts.map
@@ -3,5 +3,5 @@
3
3
  * where a compiled binary has no `package.json` to read. A test keeps it equal to the package's own
4
4
  * version, so a release that bumps one without the other fails before it publishes.
5
5
  */
6
- export const HAPPY_PROVIDERS_VERSION = "0.0.62";
6
+ export const HAPPY_PROVIDERS_VERSION = "0.0.65";
7
7
  //# sourceMappingURL=happyProvidersVersion.js.map
@@ -0,0 +1,15 @@
1
+ import * as childProcess from "node:child_process";
2
+ /** `child_process.spawn` that never opens a console window on Windows. */
3
+ export declare const spawnHidden: typeof childProcess.spawn;
4
+ /** `child_process.spawnSync` that never opens a console window on Windows. */
5
+ export declare const spawnSyncHidden: typeof childProcess.spawnSync;
6
+ /** `child_process.execFile` that never opens a console window on Windows, `promisify` included. */
7
+ export declare const execFileHidden: typeof childProcess.execFile;
8
+ /** `child_process.execFileSync` that never opens a console window on Windows. */
9
+ export declare const execFileSyncHidden: typeof childProcess.execFileSync;
10
+ /**
11
+ * Node's launchers all take `(file, args?, options?, callback?)`, where `args` is the only array
12
+ * and the options may be left out, `undefined`, or `null` before a callback.
13
+ */
14
+ export declare function withHiddenWindow(rest: readonly unknown[]): unknown[];
15
+ //# sourceMappingURL=hiddenChildProcess.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hiddenChildProcess.d.ts","sourceRoot":"","sources":["../../sources/core/hiddenChildProcess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AAenD,0EAA0E;AAC1E,eAAO,MAAM,WAAW,2BAAsB,CAAC;AAE/C,8EAA8E;AAC9E,eAAO,MAAM,eAAe,+BAA0B,CAAC;AAEvD,mGAAmG;AACnG,eAAO,MAAM,cAAc,EAAE,OAAO,YAAY,CAAC,QAE/C,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,kCAA6B,CAAC;AAc7D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CASpE"}
@@ -0,0 +1,45 @@
1
+ import * as childProcess from "node:child_process";
2
+ import { promisify } from "node:util";
3
+ /*
4
+ * Every program Happy Agent starts is started through these, never through `node:child_process`
5
+ * directly. On Windows a console program started without `windowsHide` gets a console window of
6
+ * its own whenever the process starting it has none, which is always true of the detached daemon,
7
+ * so the person sees a window flash open. These always pass `windowsHide: true`, and no caller can
8
+ * turn it off. Everywhere else they behave exactly like the Node functions they wrap.
9
+ *
10
+ * This file is copied verbatim into each package that starts programs, because the published
11
+ * packages cannot share code with one another; `scripts/windows` checks the copies stay identical
12
+ * and that nothing else starts a program.
13
+ */
14
+ /** `child_process.spawn` that never opens a console window on Windows. */
15
+ export const spawnHidden = hideWindow("spawn");
16
+ /** `child_process.spawnSync` that never opens a console window on Windows. */
17
+ export const spawnSyncHidden = hideWindow("spawnSync");
18
+ /** `child_process.execFile` that never opens a console window on Windows, `promisify` included. */
19
+ export const execFileHidden = Object.assign(hideWindow("execFile"), {
20
+ [promisify.custom]: withHiddenWindowCall(() => promisify(childProcess.execFile)),
21
+ });
22
+ /** `child_process.execFileSync` that never opens a console window on Windows. */
23
+ export const execFileSyncHidden = hideWindow("execFileSync");
24
+ function hideWindow(name) {
25
+ return withHiddenWindowCall(() => childProcess[name]);
26
+ }
27
+ /** The Node function is looked up on each call, so one replaced in a test is the one called. */
28
+ function withHiddenWindowCall(launcher) {
29
+ return (file, ...rest) => launcher()(file, ...withHiddenWindow(rest));
30
+ }
31
+ /**
32
+ * Node's launchers all take `(file, args?, options?, callback?)`, where `args` is the only array
33
+ * and the options may be left out, `undefined`, or `null` before a callback.
34
+ */
35
+ export function withHiddenWindow(rest) {
36
+ const at = Array.isArray(rest[0]) ? 1 : 0;
37
+ const options = rest[at];
38
+ const before = rest.slice(0, at);
39
+ if (typeof options === "object" && options !== null) {
40
+ return [...before, { ...options, windowsHide: true }, ...rest.slice(at + 1)];
41
+ }
42
+ const after = options === undefined || options === null ? rest.slice(at + 1) : rest.slice(at);
43
+ return [...before, { windowsHide: true }, ...after];
44
+ }
45
+ //# sourceMappingURL=hiddenChildProcess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hiddenChildProcess.js","sourceRoot":"","sources":["../../sources/core/hiddenChildProcess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;;;;;;;GAUG;AAEH,0EAA0E;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;AAE/C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AAEvD,mGAAmG;AACnG,MAAM,CAAC,MAAM,cAAc,GAAiC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;IAC9F,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,oBAAoB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;CACnF,CAAC,CAAC;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAI7D,SAAS,UAAU,CAAwB,IAAU;IACjD,OAAO,oBAAoB,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAA2C,CAAC;AACpG,CAAC;AAED,gGAAgG;AAChG,SAAS,oBAAoB,CAAC,QAAuB;IACjD,OAAO,CAAC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EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAKrE;;;GAGG;AACH,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,GAAG,CAAC,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CA+DxB"}
1
+ {"version":3,"file":"acpConnectionSpawn.d.ts","sourceRoot":"","sources":["../../../../sources/protocol/acp/impl/acpConnectionSpawn.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAKrE;;;GAGG;AACH,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,GAAG,CAAC,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CA8DxB"}
@@ -1,4 +1,4 @@
1
- import { spawn } from "node:child_process";
1
+ import { spawnHidden } from "../../../core/hiddenChildProcess.js";
2
2
  import { Readable, Writable } from "node:stream";
3
3
  import * as acp from "@agentclientprotocol/sdk";
4
4
  import { processTreeGroups, terminateProcessTree } from "../../../protocol/acp/impl/processTree.js";
@@ -9,12 +9,11 @@ const INITIALIZE_TIMEOUT_MS = 60_000;
9
9
  */
10
10
  export async function acpConnectionSpawn(launch, cwd, client) {
11
11
  // The agent leads its own process group so it does not die with the daemon's terminal.
12
- const child = spawn(launch.command, [...(launch.args ?? [])], {
12
+ const child = spawnHidden(launch.command, [...(launch.args ?? [])], {
13
13
  cwd,
14
14
  detached: process.platform !== "win32",
15
15
  env: { ...process.env, ...launch.env },
16
16
  stdio: ["pipe", "pipe", "pipe"],
17
- windowsHide: true,
18
17
  });
19
18
  // Agents leave a running command alive when their turn is cancelled, and some start each
20
19
  // command in a process group of its own, so stopping ends every group in the agent's tree.
@@ -1 +1 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EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;IAClF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,SAAS,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAC3B,MAAM,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;YAChD,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClF,CAAC;AACL,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type ChildProcess } from "node:child_process";
1
+ import type { ChildProcess } from "node:child_process";
2
2
  /**
3
3
  * End a detached agent process and everything below it. Agents leave a running command alive
4
4
  * when their turn is cancelled, and some start each command in a process group of its own, so
@@ -1 +1 @@
1
- {"version":3,"file":"processTree.d.ts","sourceRoot":"","sources":["../../../../sources/protocol/acp/impl/processTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC,EACrE,MAAM,GAAE,SAAS,MAAM,EAAO,GAC/B,IAAI,CAqBN;AAeD,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CA4BpE"}
1
+ {"version":3,"file":"processTree.d.ts","sourceRoot":"","sources":["../../../../sources/protocol/acp/impl/processTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC,EACrE,MAAM,GAAE,SAAS,MAAM,EAAO,GAC/B,IAAI,CAoBN;AAeD,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CA4BpE"}
@@ -1,4 +1,4 @@
1
- import { execFileSync } from "node:child_process";
1
+ import { execFileSyncHidden } from "../../../core/hiddenChildProcess.js";
2
2
  /**
3
3
  * End a detached agent process and everything below it. Agents leave a running command alive
4
4
  * when their turn is cancelled, and some start each command in a process group of its own, so
@@ -10,9 +10,8 @@ export function terminateProcessTree(child, groups = []) {
10
10
  // Windows has no process groups; taskkill ends the whole tree below the agent.
11
11
  if (child.pid !== undefined) {
12
12
  try {
13
- execFileSync("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
13
+ execFileSyncHidden("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
14
14
  stdio: "ignore",
15
- windowsHide: true,
16
15
  });
17
16
  }
18
17
  catch {
@@ -49,7 +48,7 @@ export function processTreeGroups(root) {
49
48
  return [];
50
49
  let table;
51
50
  try {
52
- table = execFileSync("ps", ["-A", "-o", "pid=,ppid=,pgid="], { encoding: "utf8" });
51
+ table = execFileSyncHidden("ps", ["-A", "-o", "pid=,ppid=,pgid="], { encoding: "utf8" });
53
52
  }
54
53
  catch {
55
54
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"processTree.js","sourceRoot":"","sources":["../../../../sources/protocol/acp/impl/processTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAErE;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAChC,KAAqE,EACrE,MAAM,GAAsB,EAAE;IAE9B,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;QAC/B,IAAI,KAAK,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;IACD,mEAAmE;IACnE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;AACvB,CAAC"}
@@ -3,11 +3,19 @@ import type { SessionContext } from "../../core/SessionContext.js";
3
3
  import type { SessionReasoningEffort, SessionStructuredOutput } from "../../core/SessionRunRequest.js";
4
4
  import type { SessionTool } from "../../core/SessionTool.js";
5
5
  export type AnthropicRequest = MessageCreateParamsStreaming;
6
+ /** The beta that makes `thinking.block_binding` a legal request field. */
7
+ export declare const ANTHROPIC_THINKING_BINDING_BETA = "thinking-binding-controls-2026-08-01";
6
8
  export declare function createAnthropicRequest(options: {
7
9
  compaction?: {
8
10
  instructions?: string;
9
11
  };
10
12
  context: SessionContext;
13
+ /**
14
+ * Ask the API to drop replayed thinking blocks that fail its prefix check instead of
15
+ * rejecting the whole request. The caller says whether the model and endpoint accept the
16
+ * control; it is never sent with thinking disabled, where the API refuses the field.
17
+ */
18
+ dropMismatchedThinking?: boolean;
11
19
  effort?: SessionReasoningEffort;
12
20
  model: string;
13
21
  structuredOutput?: SessionStructuredOutput;
@@ -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;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
+ {"version":3,"file":"createAnthropicRequest.d.ts","sourceRoot":"","sources":["../../../sources/protocol/anthropic/createAnthropicRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,4BAA4B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,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,0EAA0E;AAC1E,eAAO,MAAM,+BAA+B,yCAAyC,CAAC;AAEtF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC5C,UAAU,CAAC,EAAE;QACT,YAAY,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,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,CAiFnB"}
@@ -2,6 +2,8 @@ import { withAnthropicToolReferences } from "../../protocol/anthropic/anthropicT
2
2
  import { toAnthropicMessages } from "../../protocol/anthropic/toAnthropicMessages.js";
3
3
  import { toAnthropicSystem } from "../../protocol/anthropic/toAnthropicSystem.js";
4
4
  import { isAnthropicToolSearchTool, toAnthropicTools, } from "../../protocol/anthropic/toAnthropicTools.js";
5
+ /** The beta that makes `thinking.block_binding` a legal request field. */
6
+ export const ANTHROPIC_THINKING_BINDING_BETA = "thinking-binding-controls-2026-08-01";
5
7
  export function createAnthropicRequest(options) {
6
8
  const effort = resolveEffort(options.effort);
7
9
  const system = toAnthropicSystem(options);
@@ -18,6 +20,9 @@ export function createAnthropicRequest(options) {
18
20
  if (hasToolSearch) {
19
21
  betas.push("tool-search-tool-2025-10-19");
20
22
  }
23
+ const dropsMismatchedThinking = options.dropMismatchedThinking === true && options.effort !== "off";
24
+ if (dropsMismatchedThinking)
25
+ betas.push(ANTHROPIC_THINKING_BINDING_BETA);
21
26
  return {
22
27
  betas,
23
28
  ...(!usesCompaction
@@ -51,7 +56,15 @@ export function createAnthropicRequest(options) {
51
56
  model: options.model,
52
57
  stream: true,
53
58
  ...(system.length === 0 ? {} : { system }),
54
- thinking: options.effort === "off" ? { type: "disabled" } : { type: "adaptive" },
59
+ thinking: options.effort === "off"
60
+ ? { type: "disabled" }
61
+ : dropsMismatchedThinking
62
+ ? // The SDK does not type `block_binding` yet; the wire shape is the API's.
63
+ {
64
+ type: "adaptive",
65
+ block_binding: { prefix_mismatch_behavior: "drop_block" },
66
+ }
67
+ : { type: "adaptive" },
55
68
  ...(options.effort === "off" && options.structuredOutput === undefined
56
69
  ? {}
57
70
  : {
@@ -1 +1 @@
1
- {"version":3,"file":"createAnthropicRequest.js","sourceRoot":"","sources":["../../../sources/protocol/anthropic/createAnthropicRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,2BA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AAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;oBAC/C,GAAG,CAAC,OAAO,CAAC,gBAAgB,KAAK,SAAS;wBACtC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC;4BACI,MAAM,EAAE;gCACJ,IAAI,EAAE,aAAsB;gCAC5B,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM;6BAC1C;yBACJ,CAAC;iBACX;aACJ,CAAC;QACR,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;KAC3C,CAAC;AACN,CAAC;AAED,SAAS,aAAa,CAClB,MAA0C;IAE1C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC3D,OAAO,MAAM,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"createAnthropicRequest.js","sourceRoot":"","sources":["../../../sources/protocol/anthropic/createAnthropicRequest.ts"],"names":[],"mappings":"AAQA,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,0EAA0E;AAC1E,MAAM,CAAC,MAAM,+BAA+B,GAAG,sCAAsC,CAAC;AAEtF,MAAM,UAAU,sBAAsB,CAAC,OAetC;IACG,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,aAAa,GAAG,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C;oBAC/C,GAAG,CAAC,OAAO,CAAC,gBAAgB,KAAK,SAAS;wBACtC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC;4BACI,MAAM,EAAE;gCACJ,IAAI,EAAE,aAAsB;gCAC5B,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM;6BAC1C;yBACJ,CAAC;iBACX;aACJ,CAAC;QACR,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;KAC3C,CAAC;AACN,CAAC;AAED,SAAS,aAAa,CAClB,MAA0C;IAE1C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC3D,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -43,6 +43,15 @@ export declare class AnthropicBedrockSession extends BaseSession {
43
43
  private context;
44
44
  private readonly modelConfigurations;
45
45
  private readonly resolveInferenceMaxRetries;
46
+ /** Set once the endpoint refuses the thinking-binding control; it is not sent again. */
47
+ private thinkingBindingRefused;
48
+ /**
49
+ * Thinking blocks the API rejected as bound to a different conversation, by identity. They
50
+ * stay in the caller's history, so every later request of this session leaves them out again:
51
+ * thinking produced since is bound to a history without them, and putting them back would
52
+ * fail it too. An identity is forgotten once the history no longer holds its block.
53
+ */
54
+ private readonly removedThinking;
46
55
  private readonly emptyResponseRetryWait;
47
56
  constructor(id: string, options: AnthropicBedrockSessionOptions);
48
57
  run(ctx: Context, request: SessionRunRequest): SessionStream;
@@ -51,6 +60,23 @@ export declare class AnthropicBedrockSession extends BaseSession {
51
60
  private streamRun;
52
61
  private streamQuery;
53
62
  private createRequest;
63
+ /**
64
+ * The request to send instead after the API rejected replayed thinking as bound to a
65
+ * different conversation, or `undefined` when the rejection is something else or nothing is
66
+ * left to remove.
67
+ *
68
+ * The first rejection of a request removes the block the API named and all thinking after
69
+ * it, which is the API's documented repair; when it names none, or the name does not land on
70
+ * a thinking block, all thinking goes. A second rejection removes whatever thinking is left.
71
+ * There is no third step, so one request costs at most two extra round trips. What was
72
+ * removed is remembered for the session, so later requests do not send it and fail again.
73
+ */
74
+ private withoutRejectedThinking;
75
+ /**
76
+ * Whether this failure is the endpoint refusing the thinking-binding control the request
77
+ * carried. Remembers a refusal, so the session's later requests leave the control out.
78
+ */
79
+ private refusesThinkingBinding;
54
80
  private resolveTools;
55
81
  }
56
82
  //# sourceMappingURL=AnthropicBedrockSession.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnthropicBedrockSession.d.ts","sourceRoot":"","sources":["../../../sources/vendors/bedrock/AnthropicBedrockSession.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAEH,KAAK,qBAAqB,EAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAG/F,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,KAAK,EAA0B,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAehG,OAAO,KAAK,EAAE,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,wDAAwD,CAAC;AAOtI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEnE,MAAM,WAAW,8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