@theokit/sdk 2.15.1 → 2.15.2
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/CHANGELOG.md +6 -0
- package/dist/a2a/index.cjs +106 -10
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +106 -10
- package/dist/a2a/index.js.map +1 -1
- package/dist/cron.cjs +105 -9
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.js +105 -9
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +105 -9
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +105 -9
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +105 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +105 -9
- package/dist/index.js.map +1 -1
- package/dist/internal/llm/openai.d.ts +9 -0
- package/package.json +1 -1
|
@@ -75,6 +75,9 @@ declare class OpenAIStreamAccumulator {
|
|
|
75
75
|
private cacheWriteTokens?;
|
|
76
76
|
private reasoningTokens?;
|
|
77
77
|
private readonly toolCalls;
|
|
78
|
+
/** R7: present only when recovery is enabled AND the request declares tools — holds suspected
|
|
79
|
+
* leaked-dialect content back from the `text_delta` stream. `undefined` ⇒ stream immediately. */
|
|
80
|
+
private readonly suppress?;
|
|
78
81
|
/**
|
|
79
82
|
* @param extractFromContent opt-in leaked-dialect safe-parse (theokit#58). Default false.
|
|
80
83
|
* @param providerName provider id, used only to label the recovery log line.
|
|
@@ -84,9 +87,15 @@ declare class OpenAIStreamAccumulator {
|
|
|
84
87
|
*/
|
|
85
88
|
constructor(extractFromContent?: boolean, providerName?: string, allowedToolNames?: ReadonlySet<string> | undefined);
|
|
86
89
|
consume(chunk: OpenAIDeltaChunk): LlmEvent[];
|
|
90
|
+
private applyChoice;
|
|
87
91
|
private applyReasoningDelta;
|
|
88
92
|
private applyUsage;
|
|
89
93
|
private applyContentDelta;
|
|
94
|
+
/** R7 held-buffer finalizer, called at the `finish_reason` chunk (in `applyChoice`) AND after the
|
|
95
|
+
* SSE loop in `stream()` — so a stream that omits a `finish_reason` terminal never silently drops
|
|
96
|
+
* held text. `toolCalls.size > 0` (native calls present) makes `finish()` skip recovery, so the
|
|
97
|
+
* buffer streams the held text whole. Idempotent once drained. */
|
|
98
|
+
finalizeHeldText(): LlmEvent | undefined;
|
|
90
99
|
private mergeToolCallDeltas;
|
|
91
100
|
private applyFinishReason;
|
|
92
101
|
finish(): LlmFinish;
|
package/package.json
CHANGED