@linnlabs/linnkit 0.37.1 → 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 +9 -0
- package/dist/cli.cjs +2 -10
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -10
- 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/contracts/agentSpec.d.cts +30 -30
- package/dist/contracts/agentSpec.d.ts +30 -30
- package/dist/contracts/audit.d.cts +32 -32
- package/dist/contracts/audit.d.ts +32 -32
- package/dist/contracts/contextPolicy.d.cts +36 -36
- package/dist/contracts/contextPolicy.d.ts +36 -36
- package/dist/contracts/events.d.cts +1113 -1113
- package/dist/contracts/events.d.ts +1113 -1113
- package/dist/contracts/execution.d.cts +8 -8
- package/dist/contracts/execution.d.ts +8 -8
- package/dist/contracts/messages.d.cts +1178 -1178
- package/dist/contracts/messages.d.ts +1178 -1178
- package/dist/contracts/provider-continuation.d.cts +28 -28
- package/dist/contracts/provider-continuation.d.ts +28 -28
- package/dist/contracts/sse.d.cts +897 -897
- package/dist/contracts/sse.d.ts +897 -897
- package/dist/contracts/sub-run-trace-payload.d.cts +26 -26
- package/dist/contracts/sub-run-trace-payload.d.ts +26 -26
- package/dist/contracts/token-accounting.d.cts +38 -38
- package/dist/contracts/token-accounting.d.ts +38 -38
- package/dist/index.cjs +2 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -10
- package/dist/index.js.map +1 -1
- package/dist/quickstart.cjs +2 -10
- package/dist/quickstart.cjs.map +1 -1
- package/dist/quickstart.js +2 -10
- package/dist/quickstart.js.map +1 -1
- package/dist/runtime-kernel/events/agentEvents.d.cts +172 -172
- package/dist/runtime-kernel/events/agentEvents.d.ts +172 -172
- 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 +2 -10
- package/dist/runtime-kernel.cjs.map +1 -1
- package/dist/runtime-kernel.js +2 -10
- package/dist/runtime-kernel.js.map +1 -1
- package/dist/testkit.cjs +2 -10
- package/dist/testkit.cjs.map +1 -1
- package/dist/testkit.js +2 -10
- package/dist/testkit.js.map +1 -1
- package/docs/integration/llm-provider.md +1 -0
- package/docs/integration/realtime.md +5 -0
- package/package.json +2 -2
|
@@ -15,6 +15,7 @@ interface GraphExecutorOutputProcessor {
|
|
|
15
15
|
* runtime-kernel 调用时必须保留对象接收者,不要拆成裸函数传递。
|
|
16
16
|
*/
|
|
17
17
|
processResponse?(this: GraphExecutorOutputProcessor, rawResponse: string): string;
|
|
18
|
+
/** 返回空串只隐藏当前正文;已经分配的 chunk identity/seq 仍原样进入 Graph 与实时通道。 */
|
|
18
19
|
processStreamChunk?(this: GraphExecutorOutputProcessor, chunk: string): string;
|
|
19
20
|
}
|
|
20
21
|
interface GraphExecutorContextBuildInput {
|
|
@@ -15,6 +15,7 @@ interface GraphExecutorOutputProcessor {
|
|
|
15
15
|
* runtime-kernel 调用时必须保留对象接收者,不要拆成裸函数传递。
|
|
16
16
|
*/
|
|
17
17
|
processResponse?(this: GraphExecutorOutputProcessor, rawResponse: string): string;
|
|
18
|
+
/** 返回空串只隐藏当前正文;已经分配的 chunk identity/seq 仍原样进入 Graph 与实时通道。 */
|
|
18
19
|
processStreamChunk?(this: GraphExecutorOutputProcessor, chunk: string): string;
|
|
19
20
|
}
|
|
20
21
|
interface GraphExecutorContextBuildInput {
|
package/dist/runtime-kernel.cjs
CHANGED
|
@@ -5032,10 +5032,7 @@ function createExecuteLlmStage(dependencies) {
|
|
|
5032
5032
|
const promptBudget = ctx.promptBudget;
|
|
5033
5033
|
const promptUsageMeasurementPolicy = ctx.promptUsageMeasurementPolicy;
|
|
5034
5034
|
const streamEventHandler = ctx.input.stream && ctx.eventHandler ? (event) => {
|
|
5035
|
-
|
|
5036
|
-
if (processedEvent) {
|
|
5037
|
-
ctx.eventHandler?.(processedEvent);
|
|
5038
|
-
}
|
|
5035
|
+
ctx.eventHandler?.(processStreamEvent(event, ctx.outputProcessor));
|
|
5039
5036
|
} : void 0;
|
|
5040
5037
|
const llmCallStartedAt = Date.now();
|
|
5041
5038
|
let llmResp;
|
|
@@ -5191,9 +5188,6 @@ function processStreamEvent(event, outputProcessor) {
|
|
|
5191
5188
|
return event;
|
|
5192
5189
|
}
|
|
5193
5190
|
const processedContent = outputProcessor.processStreamChunk(event.content);
|
|
5194
|
-
if (processedContent.length === 0) {
|
|
5195
|
-
return null;
|
|
5196
|
-
}
|
|
5197
5191
|
return {
|
|
5198
5192
|
...event,
|
|
5199
5193
|
content: processedContent
|
|
@@ -6764,9 +6758,7 @@ function mapToolProgressToRuntime(toolEvent, context, options, id, timestamp) {
|
|
|
6764
6758
|
return event;
|
|
6765
6759
|
}
|
|
6766
6760
|
function mapStreamChunkToRuntime(streamEvent, context, id, timestamp) {
|
|
6767
|
-
const
|
|
6768
|
-
if (!text) return null;
|
|
6769
|
-
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, text, {
|
|
6761
|
+
const chunkEvent = createFinalAnswerChunkEvent(id, context.conversationId, context.turnId, streamEvent.answer_id, streamEvent.seq, streamEvent.content, {
|
|
6770
6762
|
timestamp,
|
|
6771
6763
|
is_last: streamEvent.is_last === true
|
|
6772
6764
|
});
|