@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/testkit.cjs
CHANGED
|
@@ -12195,10 +12195,10 @@ var ChildRunInvoker = class {
|
|
|
12195
12195
|
runtimeEventSink,
|
|
12196
12196
|
runtimeEventCommitPort,
|
|
12197
12197
|
seedHistoryEvents,
|
|
12198
|
-
maxSteps = 8,
|
|
12199
12198
|
modelId,
|
|
12200
12199
|
abortSignal
|
|
12201
12200
|
} = config;
|
|
12201
|
+
const maxSteps = config.initialInput?.request.maxSteps ?? config.maxSteps ?? 8;
|
|
12202
12202
|
const childRunId = runId ?? generateRunId();
|
|
12203
12203
|
const internalCheckpointKey = childRunId;
|
|
12204
12204
|
const resolvedParentRunId = parentRunId ?? parentToolContext.runId;
|
|
@@ -12243,7 +12243,8 @@ var ChildRunInvoker = class {
|
|
|
12243
12243
|
if (config.persistence?.expectedRevision !== void 0) {
|
|
12244
12244
|
return this.continueChild(config, childRunId, runtimeConversationId);
|
|
12245
12245
|
}
|
|
12246
|
-
const turnId = generateTurnId();
|
|
12246
|
+
const turnId = config.initialInput?.turnId ?? generateTurnId();
|
|
12247
|
+
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");
|
|
12247
12248
|
logger17.info(`\u542F\u52A8 child-run: ${agentConfig.id}`, {
|
|
12248
12249
|
conversationId: runtimeConversationId,
|
|
12249
12250
|
checkpointKey: internalCheckpointKey,
|
|
@@ -12260,11 +12261,14 @@ var ChildRunInvoker = class {
|
|
|
12260
12261
|
});
|
|
12261
12262
|
const admittedChildUserInput = runtimeEventSink(childUserInput, "ChildRunInvoker.user_input");
|
|
12262
12263
|
const childModelId = resolveChildRunModelId({
|
|
12263
|
-
explicitModelId: modelId,
|
|
12264
|
+
explicitModelId: config.initialInput?.request.model_id ?? modelId,
|
|
12264
12265
|
agentConfig,
|
|
12265
12266
|
resolveDefaultModelId: () => this.modelResolver.resolveModelId()
|
|
12266
12267
|
});
|
|
12267
|
-
const request = {
|
|
12268
|
+
const request = config.initialInput ? {
|
|
12269
|
+
...config.initialInput.request,
|
|
12270
|
+
currentUserEventId: admittedChildUserInput.id
|
|
12271
|
+
} : {
|
|
12268
12272
|
query: userMessage,
|
|
12269
12273
|
currentUserEventId: admittedChildUserInput.id,
|
|
12270
12274
|
promptKey: agentConfig.promptKey,
|
|
@@ -14175,6 +14179,7 @@ var DefaultRunSupervisor = class {
|
|
|
14175
14179
|
metadata: { ...record.metadata, executionId: input.executionId }
|
|
14176
14180
|
});
|
|
14177
14181
|
const controller = new AbortController();
|
|
14182
|
+
forwardParentAbortSignal(controller, input.parentSignal);
|
|
14178
14183
|
handle.replaceExecutionAbortController(controller, input.executionId);
|
|
14179
14184
|
handle.attachTransportEventBus(input.eventBus);
|
|
14180
14185
|
this.controllers.set(input.runId, controller);
|