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