@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/index.cjs
CHANGED
|
@@ -6032,10 +6032,7 @@ function createExecuteLlmStage(dependencies) {
|
|
|
6032
6032
|
const promptBudget = ctx.promptBudget;
|
|
6033
6033
|
const promptUsageMeasurementPolicy = ctx.promptUsageMeasurementPolicy;
|
|
6034
6034
|
const streamEventHandler = ctx.input.stream && ctx.eventHandler ? (event) => {
|
|
6035
|
-
|
|
6036
|
-
if (processedEvent) {
|
|
6037
|
-
ctx.eventHandler?.(processedEvent);
|
|
6038
|
-
}
|
|
6035
|
+
ctx.eventHandler?.(processStreamEvent(event, ctx.outputProcessor));
|
|
6039
6036
|
} : void 0;
|
|
6040
6037
|
const llmCallStartedAt = Date.now();
|
|
6041
6038
|
let llmResp;
|
|
@@ -6191,9 +6188,6 @@ function processStreamEvent(event, outputProcessor) {
|
|
|
6191
6188
|
return event;
|
|
6192
6189
|
}
|
|
6193
6190
|
const processedContent = outputProcessor.processStreamChunk(event.content);
|
|
6194
|
-
if (processedContent.length === 0) {
|
|
6195
|
-
return null;
|
|
6196
|
-
}
|
|
6197
6191
|
return {
|
|
6198
6192
|
...event,
|
|
6199
6193
|
content: processedContent
|
|
@@ -7764,9 +7758,7 @@ function mapToolProgressToRuntime(toolEvent, context, options, id, timestamp) {
|
|
|
7764
7758
|
return event;
|
|
7765
7759
|
}
|
|
7766
7760
|
function mapStreamChunkToRuntime(streamEvent, context, id, timestamp) {
|
|
7767
|
-
const
|
|
7768
|
-
if (!text) return null;
|
|
7769
|
-
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, text, {
|
|
7761
|
+
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, streamEvent.content, {
|
|
7770
7762
|
timestamp,
|
|
7771
7763
|
is_last: streamEvent.is_last === true
|
|
7772
7764
|
});
|
|
@@ -9730,6 +9722,14 @@ var ToolNode = class {
|
|
|
9730
9722
|
error.name = "AbortError";
|
|
9731
9723
|
throw error;
|
|
9732
9724
|
}
|
|
9725
|
+
if (result.kind === "interrupted") {
|
|
9726
|
+
await commitToolBoundary(state, {
|
|
9727
|
+
kind: "route",
|
|
9728
|
+
nextNodeId: "llm",
|
|
9729
|
+
events: result.events
|
|
9730
|
+
});
|
|
9731
|
+
throw result.error;
|
|
9732
|
+
}
|
|
9733
9733
|
await commitToolBoundary(state, result);
|
|
9734
9734
|
if (Array.isArray(result.events) && result.events.length > 0) {
|
|
9735
9735
|
events.push(...result.events);
|
|
@@ -10170,7 +10170,11 @@ var ToolNode = class {
|
|
|
10170
10170
|
nextProtocolErrorCount: fuse.nextCount
|
|
10171
10171
|
});
|
|
10172
10172
|
if (fuse.shouldFuse && remainingCalls.length === 0) {
|
|
10173
|
-
|
|
10173
|
+
return {
|
|
10174
|
+
kind: "interrupted",
|
|
10175
|
+
error: createToolProtocolFuseError(fuse.nextCount, context.exec.error),
|
|
10176
|
+
events: context.bridge.getRuntimeEvents()
|
|
10177
|
+
};
|
|
10174
10178
|
}
|
|
10175
10179
|
if (remainingCalls.length === 0 && context.local.toolBatchCompletionMode === "yield_after_batch") {
|
|
10176
10180
|
return { kind: "yield", events: context.bridge.getRuntimeEvents() };
|