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