@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/index.js
CHANGED
|
@@ -13012,10 +13012,10 @@ var ChildRunInvoker = class {
|
|
|
13012
13012
|
runtimeEventSink,
|
|
13013
13013
|
runtimeEventCommitPort,
|
|
13014
13014
|
seedHistoryEvents,
|
|
13015
|
-
maxSteps = 8,
|
|
13016
13015
|
modelId,
|
|
13017
13016
|
abortSignal
|
|
13018
13017
|
} = config;
|
|
13018
|
+
const maxSteps = config.initialInput?.request.maxSteps ?? config.maxSteps ?? 8;
|
|
13019
13019
|
const childRunId = runId ?? generateRunId();
|
|
13020
13020
|
const internalCheckpointKey = childRunId;
|
|
13021
13021
|
const resolvedParentRunId = parentRunId ?? parentToolContext.runId;
|
|
@@ -13060,7 +13060,8 @@ var ChildRunInvoker = class {
|
|
|
13060
13060
|
if (config.persistence?.expectedRevision !== void 0) {
|
|
13061
13061
|
return this.continueChild(config, childRunId, runtimeConversationId);
|
|
13062
13062
|
}
|
|
13063
|
-
const turnId = generateTurnId();
|
|
13063
|
+
const turnId = config.initialInput?.turnId ?? generateTurnId();
|
|
13064
|
+
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");
|
|
13064
13065
|
logger17.info(`\u542F\u52A8 child-run: ${agentConfig.id}`, {
|
|
13065
13066
|
conversationId: runtimeConversationId,
|
|
13066
13067
|
checkpointKey: internalCheckpointKey,
|
|
@@ -13077,11 +13078,14 @@ var ChildRunInvoker = class {
|
|
|
13077
13078
|
});
|
|
13078
13079
|
const admittedChildUserInput = runtimeEventSink(childUserInput, "ChildRunInvoker.user_input");
|
|
13079
13080
|
const childModelId = resolveChildRunModelId({
|
|
13080
|
-
explicitModelId: modelId,
|
|
13081
|
+
explicitModelId: config.initialInput?.request.model_id ?? modelId,
|
|
13081
13082
|
agentConfig,
|
|
13082
13083
|
resolveDefaultModelId: () => this.modelResolver.resolveModelId()
|
|
13083
13084
|
});
|
|
13084
|
-
const request = {
|
|
13085
|
+
const request = config.initialInput ? {
|
|
13086
|
+
...config.initialInput.request,
|
|
13087
|
+
currentUserEventId: admittedChildUserInput.id
|
|
13088
|
+
} : {
|
|
13085
13089
|
query: userMessage,
|
|
13086
13090
|
currentUserEventId: admittedChildUserInput.id,
|
|
13087
13091
|
promptKey: agentConfig.promptKey,
|
|
@@ -14992,6 +14996,7 @@ var DefaultRunSupervisor = class {
|
|
|
14992
14996
|
metadata: { ...record.metadata, executionId: input.executionId }
|
|
14993
14997
|
});
|
|
14994
14998
|
const controller = new AbortController();
|
|
14999
|
+
forwardParentAbortSignal(controller, input.parentSignal);
|
|
14995
15000
|
handle.replaceExecutionAbortController(controller, input.executionId);
|
|
14996
15001
|
handle.attachTransportEventBus(input.eventBus);
|
|
14997
15002
|
this.controllers.set(input.runId, controller);
|