@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 CHANGED
@@ -12,6 +12,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
 
13
13
  ---
14
14
 
15
+ ## [Unreleased]
16
+
17
+ ## [0.37.2] - 2026-09-12
18
+
19
+ ### Fixed
20
+
21
+ - Preserve allocated answer chunk identities and sequence numbers when a Host output
22
+ processor filters text to an empty string. Graph, realtime mapping and durable answer
23
+ assembly now stay aligned across filtered chunks and retries, without relaxing strict
24
+ sequence validation or canonical Provider delta admission.
25
+
26
+ ## [0.37.1] - 2026-09-12
27
+
28
+ ### Fixed
29
+
30
+ - Commit the complete tool batch before raising a protocol fuse. Atomic checkpoint Hosts
31
+ retain every admitted tool's terminal output when closing the execution, and explicit
32
+ continuation consumes the committed error history without repeating rejected calls.
33
+ A failed checkpoint commit remains a storage error rather than a falsely settled fuse.
34
+
15
35
  ## [0.37.0] - 2026-09-12
16
36
 
17
37
  ### Added
package/dist/cli.cjs CHANGED
@@ -4910,10 +4910,7 @@ function createExecuteLlmStage(dependencies) {
4910
4910
  const promptBudget = ctx.promptBudget;
4911
4911
  const promptUsageMeasurementPolicy = ctx.promptUsageMeasurementPolicy;
4912
4912
  const streamEventHandler = ctx.input.stream && ctx.eventHandler ? (event) => {
4913
- const processedEvent = processStreamEvent(event, ctx.outputProcessor);
4914
- if (processedEvent) {
4915
- ctx.eventHandler?.(processedEvent);
4916
- }
4913
+ ctx.eventHandler?.(processStreamEvent(event, ctx.outputProcessor));
4917
4914
  } : void 0;
4918
4915
  const llmCallStartedAt = Date.now();
4919
4916
  let llmResp;
@@ -5069,9 +5066,6 @@ function processStreamEvent(event, outputProcessor) {
5069
5066
  return event;
5070
5067
  }
5071
5068
  const processedContent = outputProcessor.processStreamChunk(event.content);
5072
- if (processedContent.length === 0) {
5073
- return null;
5074
- }
5075
5069
  return {
5076
5070
  ...event,
5077
5071
  content: processedContent
@@ -6642,9 +6636,7 @@ function mapToolProgressToRuntime(toolEvent, context, options, id, timestamp) {
6642
6636
  return event;
6643
6637
  }
6644
6638
  function mapStreamChunkToRuntime(streamEvent, context, id, timestamp) {
6645
- const text = streamEvent.content ?? "";
6646
- if (!text) return null;
6647
- const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, text, {
6639
+ const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, streamEvent.content, {
6648
6640
  timestamp,
6649
6641
  is_last: streamEvent.is_last === true
6650
6642
  });
@@ -8540,6 +8532,14 @@ var ToolNode = class {
8540
8532
  error.name = "AbortError";
8541
8533
  throw error;
8542
8534
  }
8535
+ if (result.kind === "interrupted") {
8536
+ await commitToolBoundary(state, {
8537
+ kind: "route",
8538
+ nextNodeId: "llm",
8539
+ events: result.events
8540
+ });
8541
+ throw result.error;
8542
+ }
8543
8543
  await commitToolBoundary(state, result);
8544
8544
  if (Array.isArray(result.events) && result.events.length > 0) {
8545
8545
  events.push(...result.events);
@@ -8980,7 +8980,11 @@ var ToolNode = class {
8980
8980
  nextProtocolErrorCount: fuse.nextCount
8981
8981
  });
8982
8982
  if (fuse.shouldFuse && remainingCalls.length === 0) {
8983
- throw createToolProtocolFuseError(fuse.nextCount, context.exec.error);
8983
+ return {
8984
+ kind: "interrupted",
8985
+ error: createToolProtocolFuseError(fuse.nextCount, context.exec.error),
8986
+ events: context.bridge.getRuntimeEvents()
8987
+ };
8984
8988
  }
8985
8989
  if (remainingCalls.length === 0 && context.local.toolBatchCompletionMode === "yield_after_batch") {
8986
8990
  return { kind: "yield", events: context.bridge.getRuntimeEvents() };