@linnlabs/linnkit 0.34.0 → 0.35.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 +9 -0
- package/dist/cli.cjs +1 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/quickstart.cjs +1 -0
- package/dist/quickstart.cjs.map +1 -1
- package/dist/quickstart.js +1 -0
- package/dist/quickstart.js.map +1 -1
- package/dist/runtime-kernel/child-runs/childRunInvoker.d.cts +5 -0
- package/dist/runtime-kernel/child-runs/childRunInvoker.d.ts +5 -0
- package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.cts +1 -0
- package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.ts +1 -0
- package/dist/runtime-kernel.cjs +9 -4
- package/dist/runtime-kernel.cjs.map +1 -1
- package/dist/runtime-kernel.js +9 -4
- package/dist/runtime-kernel.js.map +1 -1
- package/dist/testkit.cjs +9 -4
- package/dist/testkit.cjs.map +1 -1
- package/dist/testkit.js +9 -4
- package/dist/testkit.js.map +1 -1
- package/docs/integration/child-runs.md +8 -0
- package/package.json +1 -1
package/dist/runtime-kernel.js
CHANGED
|
@@ -12005,10 +12005,10 @@ var ChildRunInvoker = class {
|
|
|
12005
12005
|
runtimeEventSink,
|
|
12006
12006
|
runtimeEventCommitPort,
|
|
12007
12007
|
seedHistoryEvents,
|
|
12008
|
-
maxSteps = 8,
|
|
12009
12008
|
modelId,
|
|
12010
12009
|
abortSignal
|
|
12011
12010
|
} = config;
|
|
12011
|
+
const maxSteps = config.initialInput?.request.maxSteps ?? config.maxSteps ?? 8;
|
|
12012
12012
|
const childRunId = runId ?? generateRunId();
|
|
12013
12013
|
const internalCheckpointKey = childRunId;
|
|
12014
12014
|
const resolvedParentRunId = parentRunId ?? parentToolContext.runId;
|
|
@@ -12053,7 +12053,8 @@ var ChildRunInvoker = class {
|
|
|
12053
12053
|
if (config.persistence?.expectedRevision !== void 0) {
|
|
12054
12054
|
return this.continueChild(config, childRunId, runtimeConversationId);
|
|
12055
12055
|
}
|
|
12056
|
-
const turnId = generateTurnId();
|
|
12056
|
+
const turnId = config.initialInput?.turnId ?? generateTurnId();
|
|
12057
|
+
if (config.initialInput && (!turnId.trim() || config.initialInput.request.query !== userMessage || config.initialInput.request.promptKey !== agentConfig.promptKey || !config.initialInput.request.model_id)) throw new Error("Child initial input does not match the admitted invocation");
|
|
12057
12058
|
logger17.info(`\u542F\u52A8 child-run: ${agentConfig.id}`, {
|
|
12058
12059
|
conversationId: runtimeConversationId,
|
|
12059
12060
|
checkpointKey: internalCheckpointKey,
|
|
@@ -12070,11 +12071,14 @@ var ChildRunInvoker = class {
|
|
|
12070
12071
|
});
|
|
12071
12072
|
const admittedChildUserInput = runtimeEventSink(childUserInput, "ChildRunInvoker.user_input");
|
|
12072
12073
|
const childModelId = resolveChildRunModelId({
|
|
12073
|
-
explicitModelId: modelId,
|
|
12074
|
+
explicitModelId: config.initialInput?.request.model_id ?? modelId,
|
|
12074
12075
|
agentConfig,
|
|
12075
12076
|
resolveDefaultModelId: () => this.modelResolver.resolveModelId()
|
|
12076
12077
|
});
|
|
12077
|
-
const request = {
|
|
12078
|
+
const request = config.initialInput ? {
|
|
12079
|
+
...config.initialInput.request,
|
|
12080
|
+
currentUserEventId: admittedChildUserInput.id
|
|
12081
|
+
} : {
|
|
12078
12082
|
query: userMessage,
|
|
12079
12083
|
currentUserEventId: admittedChildUserInput.id,
|
|
12080
12084
|
promptKey: agentConfig.promptKey,
|
|
@@ -13985,6 +13989,7 @@ var DefaultRunSupervisor = class {
|
|
|
13985
13989
|
metadata: { ...record.metadata, executionId: input.executionId }
|
|
13986
13990
|
});
|
|
13987
13991
|
const controller = new AbortController();
|
|
13992
|
+
forwardParentAbortSignal(controller, input.parentSignal);
|
|
13988
13993
|
handle.replaceExecutionAbortController(controller, input.executionId);
|
|
13989
13994
|
handle.attachTransportEventBus(input.eventBus);
|
|
13990
13995
|
this.controllers.set(input.runId, controller);
|