@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/cli.js
CHANGED
|
@@ -4907,10 +4907,7 @@ function createExecuteLlmStage(dependencies) {
|
|
|
4907
4907
|
const promptBudget = ctx.promptBudget;
|
|
4908
4908
|
const promptUsageMeasurementPolicy = ctx.promptUsageMeasurementPolicy;
|
|
4909
4909
|
const streamEventHandler = ctx.input.stream && ctx.eventHandler ? (event) => {
|
|
4910
|
-
|
|
4911
|
-
if (processedEvent) {
|
|
4912
|
-
ctx.eventHandler?.(processedEvent);
|
|
4913
|
-
}
|
|
4910
|
+
ctx.eventHandler?.(processStreamEvent(event, ctx.outputProcessor));
|
|
4914
4911
|
} : void 0;
|
|
4915
4912
|
const llmCallStartedAt = Date.now();
|
|
4916
4913
|
let llmResp;
|
|
@@ -5066,9 +5063,6 @@ function processStreamEvent(event, outputProcessor) {
|
|
|
5066
5063
|
return event;
|
|
5067
5064
|
}
|
|
5068
5065
|
const processedContent = outputProcessor.processStreamChunk(event.content);
|
|
5069
|
-
if (processedContent.length === 0) {
|
|
5070
|
-
return null;
|
|
5071
|
-
}
|
|
5072
5066
|
return {
|
|
5073
5067
|
...event,
|
|
5074
5068
|
content: processedContent
|
|
@@ -6639,9 +6633,7 @@ function mapToolProgressToRuntime(toolEvent, context, options, id, timestamp) {
|
|
|
6639
6633
|
return event;
|
|
6640
6634
|
}
|
|
6641
6635
|
function mapStreamChunkToRuntime(streamEvent, context, id, timestamp) {
|
|
6642
|
-
const
|
|
6643
|
-
if (!text) return null;
|
|
6644
|
-
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, text, {
|
|
6636
|
+
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, streamEvent.content, {
|
|
6645
6637
|
timestamp,
|
|
6646
6638
|
is_last: streamEvent.is_last === true
|
|
6647
6639
|
});
|
|
@@ -8537,6 +8529,14 @@ var ToolNode = class {
|
|
|
8537
8529
|
error.name = "AbortError";
|
|
8538
8530
|
throw error;
|
|
8539
8531
|
}
|
|
8532
|
+
if (result.kind === "interrupted") {
|
|
8533
|
+
await commitToolBoundary(state, {
|
|
8534
|
+
kind: "route",
|
|
8535
|
+
nextNodeId: "llm",
|
|
8536
|
+
events: result.events
|
|
8537
|
+
});
|
|
8538
|
+
throw result.error;
|
|
8539
|
+
}
|
|
8540
8540
|
await commitToolBoundary(state, result);
|
|
8541
8541
|
if (Array.isArray(result.events) && result.events.length > 0) {
|
|
8542
8542
|
events.push(...result.events);
|
|
@@ -8977,7 +8977,11 @@ var ToolNode = class {
|
|
|
8977
8977
|
nextProtocolErrorCount: fuse.nextCount
|
|
8978
8978
|
});
|
|
8979
8979
|
if (fuse.shouldFuse && remainingCalls.length === 0) {
|
|
8980
|
-
|
|
8980
|
+
return {
|
|
8981
|
+
kind: "interrupted",
|
|
8982
|
+
error: createToolProtocolFuseError(fuse.nextCount, context.exec.error),
|
|
8983
|
+
events: context.bridge.getRuntimeEvents()
|
|
8984
|
+
};
|
|
8981
8985
|
}
|
|
8982
8986
|
if (remainingCalls.length === 0 && context.local.toolBatchCompletionMode === "yield_after_batch") {
|
|
8983
8987
|
return { kind: "yield", events: context.bridge.getRuntimeEvents() };
|