@ljoukov/llm 7.0.7 → 7.0.8
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/dist/index.cjs +11 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10512,9 +10512,11 @@ var subagentInputItemSchema = import_zod4.z.object({
|
|
|
10512
10512
|
}).passthrough();
|
|
10513
10513
|
var spawnAgentInputSchema = import_zod4.z.object({
|
|
10514
10514
|
prompt: import_zod4.z.string().nullish().describe("Alias for message. Initial plain-text task for the new agent."),
|
|
10515
|
-
message: import_zod4.z.string().nullish().describe(
|
|
10515
|
+
message: import_zod4.z.string().nullish().describe(
|
|
10516
|
+
"Initial plain-text task for the new agent. Combined with items when both are provided."
|
|
10517
|
+
),
|
|
10516
10518
|
items: import_zod4.z.array(subagentInputItemSchema).nullish().describe(
|
|
10517
|
-
"Structured input items. Use this to pass explicit mentions (for example app:// connector paths)."
|
|
10519
|
+
"Structured input items. Use this to pass explicit mentions (for example app:// connector paths). Combined with message/input when both are provided."
|
|
10518
10520
|
),
|
|
10519
10521
|
agent_type: import_zod4.z.string().nullish().describe(SPAWN_AGENT_TYPE_DESCRIPTION),
|
|
10520
10522
|
fork_context: import_zod4.z.boolean().nullish().describe(
|
|
@@ -10673,7 +10675,6 @@ function createSubagentToolController(options) {
|
|
|
10673
10675
|
const initialPrompt = resolveCollabInputText({
|
|
10674
10676
|
textCandidates: [{ value: input.prompt }, { value: input.message }],
|
|
10675
10677
|
items: input.items,
|
|
10676
|
-
bothError: "Provide either prompt/message or items, but not both.",
|
|
10677
10678
|
missingError: "Provide one of: prompt/message or items.",
|
|
10678
10679
|
emptyTextError: "Empty message can't be sent to an agent.",
|
|
10679
10680
|
emptyItemsError: "Items can't be empty."
|
|
@@ -10726,7 +10727,6 @@ function createSubagentToolController(options) {
|
|
|
10726
10727
|
const nextInput = resolveCollabInputText({
|
|
10727
10728
|
textCandidates: [{ value: input.input }, { value: input.message }],
|
|
10728
10729
|
items: input.items,
|
|
10729
|
-
bothError: "Provide either input/message or items, but not both.",
|
|
10730
10730
|
missingError: "Provide one of: input/message or items.",
|
|
10731
10731
|
emptyTextError: "Empty message can't be sent to an agent.",
|
|
10732
10732
|
emptyItemsError: "Items can't be empty."
|
|
@@ -10880,18 +10880,19 @@ function resolveCollabInputText(params) {
|
|
|
10880
10880
|
);
|
|
10881
10881
|
const hasText = Boolean(textCandidate);
|
|
10882
10882
|
const hasItems = params.items !== void 0 && params.items !== null;
|
|
10883
|
-
if (hasText && hasItems) {
|
|
10884
|
-
throw new Error(params.bothError);
|
|
10885
|
-
}
|
|
10886
10883
|
if (!hasText && !hasItems) {
|
|
10887
10884
|
throw new Error(params.missingError);
|
|
10888
10885
|
}
|
|
10886
|
+
const blocks = [];
|
|
10889
10887
|
if (hasText) {
|
|
10890
10888
|
const value = textCandidate?.value?.trim();
|
|
10891
10889
|
if (!value) {
|
|
10892
10890
|
throw new Error(params.emptyTextError);
|
|
10893
10891
|
}
|
|
10894
|
-
|
|
10892
|
+
blocks.push(value);
|
|
10893
|
+
}
|
|
10894
|
+
if (!hasItems) {
|
|
10895
|
+
return blocks.join("\n\n");
|
|
10895
10896
|
}
|
|
10896
10897
|
if (!params.items || params.items.length === 0) {
|
|
10897
10898
|
throw new Error(params.emptyItemsError);
|
|
@@ -10900,7 +10901,8 @@ function resolveCollabInputText(params) {
|
|
|
10900
10901
|
if (!itemText) {
|
|
10901
10902
|
throw new Error(params.emptyItemsError);
|
|
10902
10903
|
}
|
|
10903
|
-
|
|
10904
|
+
blocks.push(itemText);
|
|
10905
|
+
return blocks.join("\n\n");
|
|
10904
10906
|
}
|
|
10905
10907
|
function resolveInputItemsText(items) {
|
|
10906
10908
|
if (!items || items.length === 0) {
|