@theokit/sdk 2.15.0 → 2.15.1
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 +30 -7
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +30 -7
- package/dist/a2a/index.js.map +1 -1
- package/dist/cron.cjs +30 -7
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.js +30 -7
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +30 -7
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +30 -7
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +30 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -7
- package/dist/index.js.map +1 -1
- package/dist/internal/llm/hermes-tool-extract.d.ts +5 -1
- package/dist/internal/llm/openai.d.ts +5 -1
- package/package.json +1 -1
|
@@ -2,6 +2,10 @@ import type { LlmToolCallPart } from "./types.js";
|
|
|
2
2
|
export interface HermesExtractResult {
|
|
3
3
|
/** Recovered tool calls (empty when none matched). */
|
|
4
4
|
toolCalls: LlmToolCallPart[];
|
|
5
|
-
/** Content with every
|
|
5
|
+
/** Content with every PROMOTED block removed + trimmed; gated-out and unmatched blocks stay visible. */
|
|
6
6
|
residualText: string;
|
|
7
|
+
/** Names of well-formed leaked blocks that WERE dropped by the request-scoped allowlist (R5) — a
|
|
8
|
+
* block whose name is not a tool in the current request. Empty when no allowlist was applied or
|
|
9
|
+
* nothing was gated out. The caller logs these so a guard firing is observable in production. */
|
|
10
|
+
droppedNames: string[];
|
|
7
11
|
}
|
|
@@ -66,6 +66,7 @@ export declare class OpenAIClient implements LlmClient {
|
|
|
66
66
|
declare class OpenAIStreamAccumulator {
|
|
67
67
|
private readonly extractFromContent;
|
|
68
68
|
private readonly providerName;
|
|
69
|
+
private readonly allowedToolNames?;
|
|
69
70
|
private text;
|
|
70
71
|
private stopReason;
|
|
71
72
|
private inputTokens?;
|
|
@@ -77,8 +78,11 @@ declare class OpenAIStreamAccumulator {
|
|
|
77
78
|
/**
|
|
78
79
|
* @param extractFromContent opt-in leaked-dialect safe-parse (theokit#58). Default false.
|
|
79
80
|
* @param providerName provider id, used only to label the recovery log line.
|
|
81
|
+
* @param allowedToolNames R5 request-scoped allowlist — built from `request.tools` at `stream()`;
|
|
82
|
+
* leaked recovery in `finish()` only promotes a block whose name is in this set. `undefined`
|
|
83
|
+
* (direct construction) recovers all (back-compat); an empty set recovers nothing.
|
|
80
84
|
*/
|
|
81
|
-
constructor(extractFromContent?: boolean, providerName?: string);
|
|
85
|
+
constructor(extractFromContent?: boolean, providerName?: string, allowedToolNames?: ReadonlySet<string> | undefined);
|
|
82
86
|
consume(chunk: OpenAIDeltaChunk): LlmEvent[];
|
|
83
87
|
private applyReasoningDelta;
|
|
84
88
|
private applyUsage;
|
package/package.json
CHANGED