@jsonstudio/llms 0.6.3685 → 0.6.3686
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/compat/actions/antigravity-thought-signature-cache.js +2 -22
- package/dist/conversion/compat/actions/deepseek-web-response.js +7 -0
- package/dist/conversion/compat/actions/field-mapping.js +153 -2
- package/dist/conversion/compat/actions/lmstudio-responses-input-stringify.js +104 -3
- package/dist/conversion/hub/node-support.js +1 -1
- package/dist/conversion/hub/operation-table/semantic-mappers/anthropic-mapper.js +1 -9
- package/dist/conversion/hub/operation-table/semantic-mappers/responses-mapper.js +28 -35
- package/dist/conversion/hub/pipeline/hub-pipeline.js +121 -197
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage1_format_parse/index.d.ts +4 -4
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage1_format_parse/index.js +37 -20
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.d.ts +7 -6
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.js +41 -69
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-capture-orchestration.d.ts +0 -3
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-capture-orchestration.js +1 -2
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-factories.js +0 -2
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/index.js +0 -1
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/responses-context-snapshot.d.ts +2 -3
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/responses-context-snapshot.js +5 -18
- package/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/context-merge.d.ts +2 -1
- package/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/context-merge.js +16 -0
- package/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/index.d.ts +1 -1
- package/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/index.js +52 -27
- package/dist/conversion/hub/pipeline/stages/req_process/req_process_stage1_tool_governance/index.d.ts +0 -1
- package/dist/conversion/hub/pipeline/stages/req_process/req_process_stage1_tool_governance/index.js +1 -1
- package/dist/conversion/hub/pipeline/stages/req_process/req_process_stage2_route_select/index.d.ts +1 -1
- package/dist/conversion/hub/pipeline/stages/req_process/req_process_stage2_route_select/index.js +5 -9
- package/dist/conversion/hub/process/chat-process-continue-execution.js +3 -0
- package/dist/conversion/hub/process/chat-process-media.d.ts +2 -1
- package/dist/conversion/hub/process/chat-process-media.js +63 -9
- package/dist/conversion/hub/process/chat-process-session-usage.d.ts +6 -24
- package/dist/conversion/hub/process/chat-process-session-usage.js +101 -200
- package/dist/conversion/hub/response/provider-response.js +13 -13
- package/dist/conversion/hub/types/chat-envelope.d.ts +0 -1
- package/dist/conversion/pipeline/codecs/v2/openai-openai-pipeline.js +4 -0
- package/dist/conversion/responses/responses-openai-bridge.d.ts +0 -1
- package/dist/conversion/responses/responses-openai-bridge.js +34 -28
- package/dist/conversion/shared/anthropic-message-utils.js +1 -14
- package/dist/conversion/shared/reasoning-normalizer.js +22 -41
- package/dist/conversion/shared/responses-tool-utils.js +2 -3
- package/dist/conversion/shared/tool-governor.js +4 -2
- package/dist/native/router_hotpath_napi.node +0 -0
- package/dist/router/virtual-router/engine/routing-state/store.js +2 -21
- package/dist/router/virtual-router/engine-selection/native-chat-process-governed-filter-semantics.d.ts +0 -1
- package/dist/router/virtual-router/engine-selection/native-chat-process-governed-filter-semantics.js +0 -1
- package/dist/router/virtual-router/engine-selection/native-compat-action-semantics.d.ts +0 -3
- package/dist/router/virtual-router/engine-selection/native-compat-action-semantics.js +0 -72
- package/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.d.ts +1 -1
- package/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.js +1 -1
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-edge-stage-semantics.d.ts +2 -2
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-edge-stage-semantics.js +96 -80
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-inbound-outbound-semantics.d.ts +1 -0
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-inbound-outbound-semantics.js +29 -0
- package/dist/router/virtual-router/engine-selection/native-router-hotpath-loader.js +2 -6
- package/dist/router/virtual-router/engine.js +6 -9
- package/dist/router/virtual-router/routing-instructions/state.js +27 -37
- package/dist/router/virtual-router/routing-instructions/types.d.ts +4 -6
- package/dist/router/virtual-router/token-estimator.js +0 -21
- package/dist/servertool/handlers/stop-message-auto.js +1 -11
- package/dist/tools/apply-patch/execution-capturer.d.ts +1 -1
- package/dist/tools/apply-patch/execution-capturer.js +2 -1
- package/dist/tools/apply-patch/regression-capturer.js +1 -2
- package/dist/tools/tool-registry.js +2 -1
- package/package.json +1 -1
|
@@ -215,10 +215,7 @@ const handler = async (ctx) => {
|
|
|
215
215
|
let stickyState = stickyKey ? loadRoutingInstructionStateSync(stickyKey) : null;
|
|
216
216
|
let snapshot = resolveStopMessageSnapshot(stickyState);
|
|
217
217
|
const stickyMode = readStopMessageStageMode(stickyState);
|
|
218
|
-
const
|
|
219
|
-
const runtimeSnapshot = resolveStopMessageSnapshot(runtimeStopState);
|
|
220
|
-
const runtimeMode = readStopMessageStageMode(runtimeStopState);
|
|
221
|
-
const explicitMode = stickyMode ?? runtimeMode;
|
|
218
|
+
const explicitMode = stickyMode;
|
|
222
219
|
if (!snapshot && explicitMode === 'off') {
|
|
223
220
|
debugLog('skip_explicit_mode_off', { stickyKey });
|
|
224
221
|
return markSkip('skip_explicit_mode_off', {
|
|
@@ -230,13 +227,6 @@ const handler = async (ctx) => {
|
|
|
230
227
|
used: 0
|
|
231
228
|
});
|
|
232
229
|
}
|
|
233
|
-
if (!snapshot && runtimeSnapshot) {
|
|
234
|
-
snapshot = runtimeSnapshot;
|
|
235
|
-
if (stickyKey) {
|
|
236
|
-
stickyState = createStopMessageState(snapshot);
|
|
237
|
-
persistStopMessageState(stickyKey, stickyState);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
230
|
if (!snapshot) {
|
|
241
231
|
const implicit = STOPMESSAGE_IMPLICIT_GEMINI
|
|
242
232
|
? resolveImplicitGeminiStopMessageSnapshot(ctx, record)
|
|
@@ -10,4 +10,4 @@ export declare function captureApplyPatchExecutionFailure(content: string, conte
|
|
|
10
10
|
toolCallId?: string;
|
|
11
11
|
toolCallArgs?: string;
|
|
12
12
|
}): void;
|
|
13
|
-
export declare function captureApplyPatchExecutionFailuresFromProcessedRequest(processedRequest: unknown
|
|
13
|
+
export declare function captureApplyPatchExecutionFailuresFromProcessedRequest(processedRequest: unknown): void;
|
|
@@ -120,7 +120,7 @@ export function captureApplyPatchExecutionFailure(content, context) {
|
|
|
120
120
|
// Silently fail to avoid disrupting runtime
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
export function captureApplyPatchExecutionFailuresFromProcessedRequest(processedRequest
|
|
123
|
+
export function captureApplyPatchExecutionFailuresFromProcessedRequest(processedRequest) {
|
|
124
124
|
try {
|
|
125
125
|
if (!EXEC_ERRORSAMPLES_ENABLED)
|
|
126
126
|
return;
|
|
@@ -133,6 +133,7 @@ export function captureApplyPatchExecutionFailuresFromProcessedRequest(processed
|
|
|
133
133
|
const entryEndpoint = typeof metadata?.originalEndpoint === 'string' ? metadata.originalEndpoint : undefined;
|
|
134
134
|
const providerKey = typeof metadata?.providerKey === 'string' ? metadata.providerKey : undefined;
|
|
135
135
|
const model = typeof anyReq?.model === 'string' ? anyReq.model : undefined;
|
|
136
|
+
const applyPatchToolMode = typeof metadata?.applyPatchToolMode === 'string' ? String(metadata.applyPatchToolMode).trim().toLowerCase() : '';
|
|
136
137
|
const resolvedMode = applyPatchToolMode === 'schema' ? 'schema' : 'freeform';
|
|
137
138
|
const toolCallArgsById = new Map();
|
|
138
139
|
for (const msg of messages) {
|
|
@@ -73,9 +73,8 @@ function isContextError(error) {
|
|
|
73
73
|
}
|
|
74
74
|
function stableSampleId(sample) {
|
|
75
75
|
const mode = String(sample.meta?.applyPatchToolMode || '').trim();
|
|
76
|
-
const source = String(sample.source || '').trim();
|
|
77
76
|
const key = `${String(sample.errorType || 'unknown')}:${String(sample.originalArgs ?? '')}:` +
|
|
78
|
-
`${String(sample.normalizedArgs ?? '')}:${String(sample.fixerResult ?? '')}:${String(sample.validationError ?? '')}:${mode}
|
|
77
|
+
`${String(sample.normalizedArgs ?? '')}:${String(sample.fixerResult ?? '')}:${String(sample.validationError ?? '')}:${mode}`;
|
|
79
78
|
return createHash('sha1').update(key).digest('hex').slice(0, 16);
|
|
80
79
|
}
|
|
81
80
|
export function captureApplyPatchRegression(sample) {
|
|
@@ -129,7 +129,8 @@ export function validateToolCall(name, argsString, options) {
|
|
|
129
129
|
originalArgs: typeof argsString === 'string' ? argsString : String(argsString ?? ''),
|
|
130
130
|
normalizedArgs: typeof argsString === 'string' ? argsString : String(argsString ?? ''),
|
|
131
131
|
validationError: reason,
|
|
132
|
-
source: 'tool-registry.validateToolCall'
|
|
132
|
+
source: 'tool-registry.validateToolCall',
|
|
133
|
+
meta: { applyPatchToolMode: 'freeform' }
|
|
133
134
|
});
|
|
134
135
|
return { ok: false, reason };
|
|
135
136
|
}
|