@linnlabs/linnkit 0.37.0 → 0.37.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 +20 -0
- package/dist/cli.cjs +15 -11
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +15 -11
- package/dist/cli.js.map +1 -1
- package/dist/context-manager.cjs +1 -3
- package/dist/context-manager.cjs.map +1 -1
- package/dist/context-manager.js +1 -3
- package/dist/context-manager.js.map +1 -1
- package/dist/index.cjs +15 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/dist/quickstart.cjs +15 -11
- package/dist/quickstart.cjs.map +1 -1
- package/dist/quickstart.js +15 -11
- package/dist/quickstart.js.map +1 -1
- package/dist/runtime-kernel/events.cjs +1 -3
- package/dist/runtime-kernel/events.cjs.map +1 -1
- package/dist/runtime-kernel/events.js +1 -3
- package/dist/runtime-kernel/events.js.map +1 -1
- package/dist/runtime-kernel/graph-engine/executorContextBuilder.d.cts +1 -0
- package/dist/runtime-kernel/graph-engine/executorContextBuilder.d.ts +1 -0
- package/dist/runtime-kernel.cjs +15 -11
- package/dist/runtime-kernel.cjs.map +1 -1
- package/dist/runtime-kernel.js +15 -11
- package/dist/runtime-kernel.js.map +1 -1
- package/dist/testkit.cjs +15 -11
- package/dist/testkit.cjs.map +1 -1
- package/dist/testkit.js +15 -11
- package/dist/testkit.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/integration/llm-provider.md +1 -0
- package/docs/integration/persistence.md +10 -0
- package/docs/integration/realtime.md +5 -0
- package/docs/integration/tools.md +12 -0
- package/package.json +2 -2
package/dist/testkit.cjs
CHANGED
|
@@ -5220,10 +5220,7 @@ function createExecuteLlmStage(dependencies) {
|
|
|
5220
5220
|
const promptBudget = ctx.promptBudget;
|
|
5221
5221
|
const promptUsageMeasurementPolicy = ctx.promptUsageMeasurementPolicy;
|
|
5222
5222
|
const streamEventHandler = ctx.input.stream && ctx.eventHandler ? (event) => {
|
|
5223
|
-
|
|
5224
|
-
if (processedEvent) {
|
|
5225
|
-
ctx.eventHandler?.(processedEvent);
|
|
5226
|
-
}
|
|
5223
|
+
ctx.eventHandler?.(processStreamEvent(event, ctx.outputProcessor));
|
|
5227
5224
|
} : void 0;
|
|
5228
5225
|
const llmCallStartedAt = Date.now();
|
|
5229
5226
|
let llmResp;
|
|
@@ -5379,9 +5376,6 @@ function processStreamEvent(event, outputProcessor) {
|
|
|
5379
5376
|
return event;
|
|
5380
5377
|
}
|
|
5381
5378
|
const processedContent = outputProcessor.processStreamChunk(event.content);
|
|
5382
|
-
if (processedContent.length === 0) {
|
|
5383
|
-
return null;
|
|
5384
|
-
}
|
|
5385
5379
|
return {
|
|
5386
5380
|
...event,
|
|
5387
5381
|
content: processedContent
|
|
@@ -6952,9 +6946,7 @@ function mapToolProgressToRuntime(toolEvent, context, options, id, timestamp) {
|
|
|
6952
6946
|
return event;
|
|
6953
6947
|
}
|
|
6954
6948
|
function mapStreamChunkToRuntime(streamEvent, context, id, timestamp) {
|
|
6955
|
-
const
|
|
6956
|
-
if (!text) return null;
|
|
6957
|
-
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, text, {
|
|
6949
|
+
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, streamEvent.content, {
|
|
6958
6950
|
timestamp,
|
|
6959
6951
|
is_last: streamEvent.is_last === true
|
|
6960
6952
|
});
|
|
@@ -8911,6 +8903,14 @@ var ToolNode = class {
|
|
|
8911
8903
|
error.name = "AbortError";
|
|
8912
8904
|
throw error;
|
|
8913
8905
|
}
|
|
8906
|
+
if (result.kind === "interrupted") {
|
|
8907
|
+
await commitToolBoundary(state, {
|
|
8908
|
+
kind: "route",
|
|
8909
|
+
nextNodeId: "llm",
|
|
8910
|
+
events: result.events
|
|
8911
|
+
});
|
|
8912
|
+
throw result.error;
|
|
8913
|
+
}
|
|
8914
8914
|
await commitToolBoundary(state, result);
|
|
8915
8915
|
if (Array.isArray(result.events) && result.events.length > 0) {
|
|
8916
8916
|
events.push(...result.events);
|
|
@@ -9351,7 +9351,11 @@ var ToolNode = class {
|
|
|
9351
9351
|
nextProtocolErrorCount: fuse.nextCount
|
|
9352
9352
|
});
|
|
9353
9353
|
if (fuse.shouldFuse && remainingCalls.length === 0) {
|
|
9354
|
-
|
|
9354
|
+
return {
|
|
9355
|
+
kind: "interrupted",
|
|
9356
|
+
error: createToolProtocolFuseError(fuse.nextCount, context.exec.error),
|
|
9357
|
+
events: context.bridge.getRuntimeEvents()
|
|
9358
|
+
};
|
|
9355
9359
|
}
|
|
9356
9360
|
if (remainingCalls.length === 0 && context.local.toolBatchCompletionMode === "yield_after_batch") {
|
|
9357
9361
|
return { kind: "yield", events: context.bridge.getRuntimeEvents() };
|