@jsonstudio/llms 0.6.3275 → 0.6.3379
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/dist/conversion/bridge-message-utils.d.ts +4 -4
- package/dist/conversion/bridge-message-utils.js +28 -538
- package/dist/conversion/compat/profiles/responses-crs.json +15 -0
- package/dist/conversion/hub/operation-table/semantic-mappers/chat-mapper.js +16 -5
- package/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage1_tool_governance/index.js +1 -6
- package/dist/conversion/hub/response/response-runtime.js +14 -6
- package/dist/conversion/responses/responses-openai-bridge/response-payload.js +11 -11
- package/dist/conversion/shared/anthropic-message-utils.js +2 -12
- package/dist/conversion/shared/chat-request-filters.js +2 -61
- package/dist/conversion/shared/reasoning-mapping.js +3 -0
- package/dist/conversion/shared/reasoning-normalizer.d.ts +1 -0
- package/dist/conversion/shared/reasoning-normalizer.js +35 -388
- package/dist/conversion/shared/reasoning-tool-normalizer.js +8 -15
- package/dist/conversion/shared/reasoning-utils.js +13 -35
- package/dist/conversion/shared/responses-tool-utils.d.ts +1 -1
- package/dist/conversion/shared/responses-tool-utils.js +63 -65
- package/dist/conversion/shared/streaming-text-extractor.d.ts +0 -5
- package/dist/conversion/shared/streaming-text-extractor.js +18 -111
- package/dist/conversion/shared/text-markup-normalizer/normalize.d.ts +1 -1
- package/dist/conversion/shared/text-markup-normalizer/normalize.js +3 -91
- package/dist/conversion/shared/thought-signature-validator.js +19 -133
- package/dist/conversion/shared/tool-argument-repairer.js +16 -19
- package/dist/conversion/shared/tool-call-id-manager.d.ts +1 -5
- package/dist/conversion/shared/tool-call-id-manager.js +74 -98
- package/dist/conversion/shared/tool-harvester.js +19 -382
- package/dist/conversion/shared/tool-mapping.d.ts +2 -3
- package/dist/conversion/shared/tool-mapping.js +28 -184
- package/dist/conversion/shared/tooling.js +20 -151
- package/dist/filters/special/response-tool-arguments-stringify.js +9 -1
- package/dist/guidance/index.js +2 -2
- package/dist/native/router_hotpath_napi.node +0 -0
- package/dist/router/virtual-router/engine-legacy/helpers.js +1 -1
- package/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.d.ts +39 -0
- package/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.js +196 -0
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-inbound-semantics.d.ts +1 -0
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-inbound-semantics.js +27 -0
- package/dist/router/virtual-router/engine-selection/native-router-hotpath-loader.js +34 -0
- package/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.d.ts +65 -1
- package/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.js +836 -35
- package/dist/router/virtual-router/engine.js +3 -2
- package/dist/router/virtual-router/routing-instructions/parse.js +30 -3
- package/dist/sse/sse-to-json/builders/anthropic-response-builder.js +28 -3
- package/dist/sse/types/anthropic-types.d.ts +3 -1
- package/dist/tools/apply-patch/args-normalizer/extract-patch.js +2 -2
- package/dist/tools/apply-patch/patch-text/looks-like-patch.js +3 -6
- package/dist/tools/apply-patch/patch-text/normalize.js +14 -3
- package/dist/tools/tool-registry.js +12 -0
- package/package.json +6 -1
|
@@ -4,10 +4,51 @@ export declare function extractToolCallsFromReasoningTextWithNative(text: string
|
|
|
4
4
|
cleanedText: string;
|
|
5
5
|
toolCalls: Array<Record<string, unknown>>;
|
|
6
6
|
};
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function extractReasoningSegmentsWithNative(source: string): {
|
|
8
|
+
text: string;
|
|
9
|
+
segments: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare function normalizeAssistantTextToToolCallsWithNative(message: Record<string, unknown>, options?: Record<string, unknown>): Record<string, unknown>;
|
|
12
|
+
export declare function normalizeReasoningInChatPayloadWithNative(payload: unknown): unknown;
|
|
13
|
+
export declare function normalizeReasoningInResponsesPayloadWithNative(payload: unknown, options?: Record<string, unknown>): unknown;
|
|
14
|
+
export declare function normalizeReasoningInGeminiPayloadWithNative(payload: unknown): unknown;
|
|
15
|
+
export declare function normalizeReasoningInAnthropicPayloadWithNative(payload: unknown): unknown;
|
|
16
|
+
export declare function normalizeReasoningInOpenAIPayloadWithNative(payload: unknown): unknown;
|
|
17
|
+
export declare function bridgeToolToChatDefinitionWithNative(tool: Record<string, unknown>, options?: {
|
|
18
|
+
sanitizeMode?: string;
|
|
19
|
+
}): Record<string, unknown> | null;
|
|
20
|
+
export declare function chatToolToBridgeDefinitionWithNative(tool: Record<string, unknown>, options?: {
|
|
21
|
+
sanitizeMode?: string;
|
|
22
|
+
}): Record<string, unknown> | null;
|
|
23
|
+
export declare function mapBridgeToolsToChatWithNative(rawTools: unknown, options?: {
|
|
24
|
+
sanitizeMode?: string;
|
|
25
|
+
}): Array<Record<string, unknown>>;
|
|
26
|
+
export declare function mapChatToolsToBridgeWithNative(rawTools: unknown, options?: {
|
|
27
|
+
sanitizeMode?: string;
|
|
28
|
+
}): Array<Record<string, unknown>>;
|
|
29
|
+
export declare function hasValidThoughtSignatureWithNative(block: unknown, options?: Record<string, unknown>): boolean;
|
|
30
|
+
export declare function sanitizeThinkingBlockWithNative(block: unknown): Record<string, unknown>;
|
|
31
|
+
export declare function filterInvalidThinkingBlocksWithNative(messages: unknown, options?: Record<string, unknown>): unknown[];
|
|
32
|
+
export declare function removeTrailingUnsignedThinkingBlocksWithNative(blocks: unknown, options?: Record<string, unknown>): unknown[];
|
|
8
33
|
export declare function sanitizeReasoningTaggedTextWithNative(text: string): string;
|
|
9
34
|
export declare function ensureBridgeInstructionsWithNative(payload: Record<string, unknown>): Record<string, unknown>;
|
|
35
|
+
export declare function repairFindMetaWithNative(script: string): string;
|
|
36
|
+
export declare function splitCommandStringWithNative(input: string): string[];
|
|
37
|
+
export declare function packShellArgsWithNative(input: Record<string, unknown>): Record<string, unknown>;
|
|
38
|
+
export declare function flattenByCommaWithNative(items: string[]): string[];
|
|
39
|
+
export declare function chunkStringWithNative(s: string, minParts?: number, maxParts?: number, targetChunk?: number): string[];
|
|
10
40
|
export declare function deriveToolCallKeyWithNative(call: Record<string, unknown> | null | undefined): string | null;
|
|
41
|
+
export declare function normalizeIdValueWithNative(value: unknown, forceGenerate?: boolean): string;
|
|
42
|
+
export declare function extractToolCallIdWithNative(obj: unknown): string | undefined;
|
|
43
|
+
export declare function createToolCallIdTransformerWithNative(style: string): Record<string, unknown>;
|
|
44
|
+
export declare function transformToolCallIdWithNative(state: Record<string, unknown>, id: string): {
|
|
45
|
+
id: string;
|
|
46
|
+
state: Record<string, unknown>;
|
|
47
|
+
};
|
|
48
|
+
export declare function enforceToolCallIdStyleWithNative(messages: unknown[], state: Record<string, unknown>): {
|
|
49
|
+
messages: unknown[];
|
|
50
|
+
state: Record<string, unknown>;
|
|
51
|
+
};
|
|
11
52
|
export declare function buildProviderProtocolErrorWithNative(input: {
|
|
12
53
|
message: string;
|
|
13
54
|
code: string;
|
|
@@ -76,7 +117,30 @@ export declare function mapReasoningContentToResponsesOutputWithNative(reasoning
|
|
|
76
117
|
type: 'reasoning';
|
|
77
118
|
content: string;
|
|
78
119
|
}>;
|
|
120
|
+
export declare function validateToolArgumentsWithNative(toolName: string | undefined, args: unknown): {
|
|
121
|
+
repaired: string;
|
|
122
|
+
success: boolean;
|
|
123
|
+
error?: string;
|
|
124
|
+
};
|
|
125
|
+
export declare function repairToolCallsWithNative(toolCalls: Array<{
|
|
126
|
+
name?: string;
|
|
127
|
+
arguments?: unknown;
|
|
128
|
+
}>): Array<{
|
|
129
|
+
name?: string;
|
|
130
|
+
arguments: string;
|
|
131
|
+
}>;
|
|
79
132
|
export declare function isImagePathWithNative(pathValue: unknown): boolean;
|
|
133
|
+
export declare function extractStreamingToolCallsWithNative(input: {
|
|
134
|
+
buffer: string;
|
|
135
|
+
text: string;
|
|
136
|
+
idPrefix: string;
|
|
137
|
+
idCounter: number;
|
|
138
|
+
nowMs: number;
|
|
139
|
+
}): {
|
|
140
|
+
buffer: string;
|
|
141
|
+
idCounter: number;
|
|
142
|
+
toolCalls: Array<Record<string, unknown>>;
|
|
143
|
+
};
|
|
80
144
|
export declare function isCompactionRequestWithNative(payload: unknown): boolean;
|
|
81
145
|
export declare function encodeMetadataPassthroughWithNative(parameters: unknown, prefix: string, keys: readonly string[]): Record<string, string> | undefined;
|
|
82
146
|
export declare function extractMetadataPassthroughWithNative(metadataField: unknown, prefix: string, keys: readonly string[]): {
|