@linnlabs/linnkit 0.31.1 → 0.32.0
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 +8 -0
- package/dist/cli.cjs +14 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +14 -1
- package/dist/cli.js.map +1 -1
- package/dist/{defaultGraphExecutor-CO3ztZdG.d.cts → defaultGraphExecutor-Chr16eYO.d.cts} +10 -1
- package/dist/{defaultGraphExecutor-B2kGX0iA.d.ts → defaultGraphExecutor-hT7dchpC.d.ts} +10 -1
- package/dist/{index-CZtZq3T1.d.cts → index-C2PSqU1I.d.cts} +8 -3
- package/dist/{index-CMUnmxhM.d.ts → index-CZMXtw4h.d.ts} +8 -3
- package/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/quickstart.cjs +14 -1
- package/dist/quickstart.cjs.map +1 -1
- package/dist/quickstart.js +14 -1
- package/dist/quickstart.js.map +1 -1
- package/dist/runtime-kernel.cjs +14 -1
- package/dist/runtime-kernel.cjs.map +1 -1
- package/dist/runtime-kernel.d.cts +2 -2
- package/dist/runtime-kernel.d.ts +2 -2
- package/dist/runtime-kernel.js +14 -1
- package/dist/runtime-kernel.js.map +1 -1
- package/dist/testkit.cjs +14 -1
- package/dist/testkit.cjs.map +1 -1
- package/dist/testkit.d.cts +2 -2
- package/dist/testkit.d.ts +2 -2
- package/dist/testkit.js +14 -1
- package/dist/testkit.js.map +1 -1
- package/docs/integration/host-originated-tools.md +9 -0
- package/package.json +2 -2
package/dist/testkit.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as CanonicalLlmUsage } from './reasoning-bffu9R2B.cjs';
|
|
2
2
|
import { P as ProviderContinuation, A as AiMessage } from './provider-continuation-CTZdCB--.cjs';
|
|
3
3
|
import { m as CanonicalInferenceRequest, r as LlmCallOptions, v as LlmInputMaterializerPort, i as CanonicalInferenceFinishReason, w as LlmRequestMessage } from './llm-input-materialization-r-V3n9U-.cjs';
|
|
4
|
-
import { d as LlmCaller, a as ModelCatalogLike,
|
|
5
|
-
export {
|
|
4
|
+
import { d as LlmCaller, a as ModelCatalogLike, ab as TelemetryEvent$2, Q as DefaultRunSupervisor, X as MemoryRunRegistryStore, o as MemoryEventStore, Z as RunExecutorPort$1, _ as RunOutcome$1, r as ToolContextPatch$1 } from './defaultGraphExecutor-Chr16eYO.cjs';
|
|
5
|
+
export { ad as DefaultGraphExecutorOptions, ae as GraphLoopHarness, af as GraphLoopHarnessOptions, ag as GraphLoopHarnessRunResult, ah as GraphLoopLlmNodeFactoryParams, ai as createDefaultGraphExecutor, aj as createGraphLoopHarness } from './defaultGraphExecutor-Chr16eYO.cjs';
|
|
6
6
|
import { R as RuntimeEvent, f as RoutedRuntimeEvent } from './final-answer-B0_kx5_U.cjs';
|
|
7
7
|
import { b as ContextTrace } from './base-DRRrRhxS.cjs';
|
|
8
8
|
import { d as AgentSpecContextPolicy, c as AgentSpec } from './token-accounting-19cXG7hM.cjs';
|
package/dist/testkit.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as CanonicalLlmUsage } from './reasoning-bffu9R2B.js';
|
|
2
2
|
import { P as ProviderContinuation, A as AiMessage } from './provider-continuation-CTZdCB--.js';
|
|
3
3
|
import { m as CanonicalInferenceRequest, r as LlmCallOptions, v as LlmInputMaterializerPort, i as CanonicalInferenceFinishReason, w as LlmRequestMessage } from './llm-input-materialization-Vce5Swvc.js';
|
|
4
|
-
import { d as LlmCaller, a as ModelCatalogLike,
|
|
5
|
-
export {
|
|
4
|
+
import { d as LlmCaller, a as ModelCatalogLike, ab as TelemetryEvent$2, Q as DefaultRunSupervisor, X as MemoryRunRegistryStore, o as MemoryEventStore, Z as RunExecutorPort$1, _ as RunOutcome$1, r as ToolContextPatch$1 } from './defaultGraphExecutor-hT7dchpC.js';
|
|
5
|
+
export { ad as DefaultGraphExecutorOptions, ae as GraphLoopHarness, af as GraphLoopHarnessOptions, ag as GraphLoopHarnessRunResult, ah as GraphLoopLlmNodeFactoryParams, ai as createDefaultGraphExecutor, aj as createGraphLoopHarness } from './defaultGraphExecutor-hT7dchpC.js';
|
|
6
6
|
import { R as RuntimeEvent, f as RoutedRuntimeEvent } from './final-answer-oOQ_7nPt.js';
|
|
7
7
|
import { b as ContextTrace } from './base-DVyQIl_d.js';
|
|
8
8
|
import { d as AgentSpecContextPolicy, c as AgentSpec } from './token-accounting-CVW37Uri.js';
|
package/dist/testkit.js
CHANGED
|
@@ -9069,6 +9069,15 @@ var ToolNode = class {
|
|
|
9069
9069
|
});
|
|
9070
9070
|
return { kind: "yield", events: context.bridge.getRuntimeEvents() };
|
|
9071
9071
|
}
|
|
9072
|
+
if (remainingCalls.length === 0 && context.local.toolBatchCompletionMode === "yield_after_batch") {
|
|
9073
|
+
logger11.info("[ToolNode] \u5DE5\u5177\u6279\u6B21\u5DF2\u7ED3\u7B97\uFF0C\u6309 Host \u7B56\u7565\u76F4\u63A5 yield", {
|
|
9074
|
+
toolName: context.toolName,
|
|
9075
|
+
toolCallId: context.toolCallId,
|
|
9076
|
+
conversationId: context.conversationId,
|
|
9077
|
+
turnId: context.turnId
|
|
9078
|
+
});
|
|
9079
|
+
return { kind: "yield", events: context.bridge.getRuntimeEvents() };
|
|
9080
|
+
}
|
|
9072
9081
|
return {
|
|
9073
9082
|
kind: "route",
|
|
9074
9083
|
nextNodeId: remainingCalls.length > 0 ? "tool" : "llm",
|
|
@@ -9151,6 +9160,9 @@ var ToolNode = class {
|
|
|
9151
9160
|
if (fuse.shouldFuse && remainingCalls.length === 0) {
|
|
9152
9161
|
throw createToolProtocolFuseError(fuse.nextCount, context.exec.error);
|
|
9153
9162
|
}
|
|
9163
|
+
if (remainingCalls.length === 0 && context.local.toolBatchCompletionMode === "yield_after_batch") {
|
|
9164
|
+
return { kind: "yield", events: context.bridge.getRuntimeEvents() };
|
|
9165
|
+
}
|
|
9154
9166
|
return {
|
|
9155
9167
|
kind: "route",
|
|
9156
9168
|
// 同一个 assistant.tool_calls batch 必须为每个 call 产出 tool_output。
|
|
@@ -9675,7 +9687,8 @@ function createHostToolCallBootstrap(input) {
|
|
|
9675
9687
|
conversationId,
|
|
9676
9688
|
turnId,
|
|
9677
9689
|
history: [...input.history ?? [], decisionEvent],
|
|
9678
|
-
pendingToolCalls: [toolCall]
|
|
9690
|
+
pendingToolCalls: [toolCall],
|
|
9691
|
+
...input.completionMode === void 0 ? {} : { toolBatchCompletionMode: input.completionMode }
|
|
9679
9692
|
}
|
|
9680
9693
|
};
|
|
9681
9694
|
}
|