@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/quickstart.cjs
CHANGED
|
@@ -5023,10 +5023,7 @@ function createExecuteLlmStage(dependencies) {
|
|
|
5023
5023
|
const promptBudget = ctx.promptBudget;
|
|
5024
5024
|
const promptUsageMeasurementPolicy = ctx.promptUsageMeasurementPolicy;
|
|
5025
5025
|
const streamEventHandler = ctx.input.stream && ctx.eventHandler ? (event) => {
|
|
5026
|
-
|
|
5027
|
-
if (processedEvent) {
|
|
5028
|
-
ctx.eventHandler?.(processedEvent);
|
|
5029
|
-
}
|
|
5026
|
+
ctx.eventHandler?.(processStreamEvent(event, ctx.outputProcessor));
|
|
5030
5027
|
} : void 0;
|
|
5031
5028
|
const llmCallStartedAt = Date.now();
|
|
5032
5029
|
let llmResp;
|
|
@@ -5182,9 +5179,6 @@ function processStreamEvent(event, outputProcessor) {
|
|
|
5182
5179
|
return event;
|
|
5183
5180
|
}
|
|
5184
5181
|
const processedContent = outputProcessor.processStreamChunk(event.content);
|
|
5185
|
-
if (processedContent.length === 0) {
|
|
5186
|
-
return null;
|
|
5187
|
-
}
|
|
5188
5182
|
return {
|
|
5189
5183
|
...event,
|
|
5190
5184
|
content: processedContent
|
|
@@ -6755,9 +6749,7 @@ function mapToolProgressToRuntime(toolEvent, context, options, id, timestamp) {
|
|
|
6755
6749
|
return event;
|
|
6756
6750
|
}
|
|
6757
6751
|
function mapStreamChunkToRuntime(streamEvent, context, id, timestamp) {
|
|
6758
|
-
const
|
|
6759
|
-
if (!text) return null;
|
|
6760
|
-
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, text, {
|
|
6752
|
+
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, streamEvent.content, {
|
|
6761
6753
|
timestamp,
|
|
6762
6754
|
is_last: streamEvent.is_last === true
|
|
6763
6755
|
});
|
|
@@ -8653,6 +8645,14 @@ var ToolNode = class {
|
|
|
8653
8645
|
error.name = "AbortError";
|
|
8654
8646
|
throw error;
|
|
8655
8647
|
}
|
|
8648
|
+
if (result.kind === "interrupted") {
|
|
8649
|
+
await commitToolBoundary(state, {
|
|
8650
|
+
kind: "route",
|
|
8651
|
+
nextNodeId: "llm",
|
|
8652
|
+
events: result.events
|
|
8653
|
+
});
|
|
8654
|
+
throw result.error;
|
|
8655
|
+
}
|
|
8656
8656
|
await commitToolBoundary(state, result);
|
|
8657
8657
|
if (Array.isArray(result.events) && result.events.length > 0) {
|
|
8658
8658
|
events.push(...result.events);
|
|
@@ -9093,7 +9093,11 @@ var ToolNode = class {
|
|
|
9093
9093
|
nextProtocolErrorCount: fuse.nextCount
|
|
9094
9094
|
});
|
|
9095
9095
|
if (fuse.shouldFuse && remainingCalls.length === 0) {
|
|
9096
|
-
|
|
9096
|
+
return {
|
|
9097
|
+
kind: "interrupted",
|
|
9098
|
+
error: createToolProtocolFuseError(fuse.nextCount, context.exec.error),
|
|
9099
|
+
events: context.bridge.getRuntimeEvents()
|
|
9100
|
+
};
|
|
9097
9101
|
}
|
|
9098
9102
|
if (remainingCalls.length === 0 && context.local.toolBatchCompletionMode === "yield_after_batch") {
|
|
9099
9103
|
return { kind: "yield", events: context.bridge.getRuntimeEvents() };
|