@sema-agent/core 1.327.0 → 1.329.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.
Files changed (41) hide show
  1. package/dist/agents/subagent.d.ts.map +1 -1
  2. package/dist/agents/subagent.js +45 -10
  3. package/dist/agents/subagent.js.map +1 -1
  4. package/dist/core/runner/prepare-task.d.ts +2 -0
  5. package/dist/core/runner/prepare-task.d.ts.map +1 -1
  6. package/dist/core/runner/prepare-task.js +19 -0
  7. package/dist/core/runner/prepare-task.js.map +1 -1
  8. package/dist/core/tools.d.ts.map +1 -1
  9. package/dist/core/tools.js +1 -0
  10. package/dist/core/tools.js.map +1 -1
  11. package/dist/core/types.d.ts +3 -0
  12. package/dist/core/types.d.ts.map +1 -1
  13. package/dist/engine/llm/types.d.ts +1 -0
  14. package/dist/engine/llm/types.d.ts.map +1 -1
  15. package/dist/orchestration/run-workflow-tool.d.ts +1 -0
  16. package/dist/orchestration/run-workflow-tool.d.ts.map +1 -1
  17. package/dist/orchestration/run-workflow-tool.js +3 -2
  18. package/dist/orchestration/run-workflow-tool.js.map +1 -1
  19. package/dist/prompt-assembly/assemble.d.ts.map +1 -1
  20. package/dist/prompt-assembly/assemble.js +12 -2
  21. package/dist/prompt-assembly/assemble.js.map +1 -1
  22. package/dist/prompt-assembly/packs/sema-default.d.ts.map +1 -1
  23. package/dist/prompt-assembly/packs/sema-default.js +10 -0
  24. package/dist/prompt-assembly/packs/sema-default.js.map +1 -1
  25. package/dist/prompt-assembly/types.d.ts +2 -0
  26. package/dist/prompt-assembly/types.d.ts.map +1 -1
  27. package/dist/prompts/default.d.ts +2 -0
  28. package/dist/prompts/default.d.ts.map +1 -1
  29. package/dist/prompts/default.js +14 -0
  30. package/dist/prompts/default.js.map +1 -1
  31. package/dist/prompts/simple-sections.d.ts +11 -0
  32. package/dist/prompts/simple-sections.d.ts.map +1 -0
  33. package/dist/prompts/simple-sections.js +31 -0
  34. package/dist/prompts/simple-sections.js.map +1 -0
  35. package/dist/tools/fs/index.d.ts.map +1 -1
  36. package/dist/tools/fs/index.js +20 -0
  37. package/dist/tools/fs/index.js.map +1 -1
  38. package/dist/tools/todo.d.ts.map +1 -1
  39. package/dist/tools/todo.js +6 -1
  40. package/dist/tools/todo.js.map +1 -1
  41. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"subagent.d.ts","sourceRoot":"","sources":["../../src/agents/subagent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAa7F,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAoB5E,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAiB5E,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GACvC,YAAY,CAAC,wBAAwB,CAAC,CAuBxC;AAGD,eAAO,MAAM,0BAA0B,UAAU,CAAC;AAClD,eAAO,MAAM,yBAAyB,SAAS,CAAC;AAUhD,eAAO,MAAM,sCAAsC,KAAK,CAAC;AAQzD,eAAO,MAAM,uBAAuB,gGAA2F,CAAC;AAEhI,eAAO,MAAM,uBAAuB,0JAA4L,CAAC;AAajO,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAA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,WAAW,GAAG,IAAI,CAOnJ;AAcD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,sBAAsB;;;;aAgTjE;AAGD,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAK5D,MAAM,WAAW,0BAA0B;IAEzC,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,OAAO,0BAA0B,EAAE,YAAY,CAAC;IAE1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,0BAA0B;;;aAoEzE"}
@@ -735,7 +735,28 @@ function makeSubagentTool(opts, depth, excluded, extraToolsBudget) {
735
735
  executionMode: "parallel",
736
736
  ...(!opts.name ? { aliases: [LEGACY_SUBAGENT_TOOL_NAME] } : {}),
737
737
  contract: { contractId: "core.agent@1", implementationRevision: "1" },
738
- description: `Launch a new agent. Delegate a self-contained subtask to an isolated sub-agent and get back a single report. ` +
738
+ description: `Launch a new agent to handle complex, multi-step tasks. Each agent type has specific capabilities and tools available to it.\n` +
739
+ (opts.purpose ? `\nThis sub-agent is for: ${opts.purpose}.\n` : "") +
740
+ (hasAgents ? `\nAvailable agent types are listed in <system-reminder> messages in the conversation.\n` : "") +
741
+ `\n` +
742
+ (forkOffered
743
+ ? `When using the ${opts.name ?? DEFAULT_SUBAGENT_TOOL_NAME} tool, specify a subagent_type to select an agent: \`"${FORK_SUBAGENT_TYPE}"\` forks yourself (the fork inherits your full conversation context and always runs on your model — a \`model\` override is ignored); any other type — or omitting it — starts a fresh agent (general-purpose by default).`
744
+ : `When using the ${opts.name ?? DEFAULT_SUBAGENT_TOOL_NAME} tool, specify a subagent_type parameter to select which agent type to use. If omitted, the general-purpose agent is used. Note: this deployment defines its own "${FORK_SUBAGENT_TYPE}" agent type, which overrides the built-in context-inheriting fork routing.`) +
745
+ `\n\n## When to use\n\n` +
746
+ `Reach for this when the task matches an available agent type, when you have independent work to run in parallel, or when answering would mean reading across several files — delegate it and you keep the conclusion, not the file dumps. For a single-fact lookup where you already know the file, symbol, or value, search directly. Once you've delegated a search, don't also run it yourself — wait for the result.` +
747
+ (forkOffered ? `\n\nA fork keeps its tool output out of your context. If you are the fork, execute directly — don't re-delegate.` : "") +
748
+ (opts.background
749
+ ? `\n\n- A synchronous run's final message is returned to you as the tool result; a background launch returns a RECEIPT (task_id), not the report. Neither is shown to the user — relay what matters when it arrives.\n`
750
+ : `\n\n- The agent's final message is returned to you as the tool result; it is not shown to the user — relay what matters.\n`) +
751
+ (rosterNames !== undefined && rosterNames.length > 0
752
+ ? `- Each agent type's model, thinking level, and tools come from its agent definition; the \`model\` parameter here overrides it for this one call.\n`
753
+ : `- Each agent type's model, thinking level, and tools come from its agent definition.\n`) +
754
+ `- \`isolation: "worktree"\` gives the agent its own git worktree (auto-cleaned if unchanged).` +
755
+ (opts.background
756
+ ? `\n- Subagents run in the background by default${opts.background.notify ? "; you'll be notified when one completes" : "; the receipt's task_id retrieves progress and results via the TaskOutput tool where mounted"}. Pass \`run_in_background: false\` for a synchronous run when you need the result before continuing. Never fabricate or predict a pending agent's results — ${opts.background.notify ? "the notification is never something you write yourself; " : ""}if the user asks before it arrives, say it's still running.\n` +
757
+ `- Where the SendMessage tool is mounted, use it with the agent's ID or name to message a RUNNING agent, or — when session retention is enabled — to continue a COMPLETED one with its context intact; a new ${opts.name ?? DEFAULT_SUBAGENT_TOOL_NAME} call starts fresh${forkOffered ? ` (except subagent_type: "${FORK_SUBAGENT_TYPE}", which inherits your context)` : ""}.`
758
+ : `\n- \`run_in_background\` is unavailable here — only synchronous subagents.`),
759
+ descriptionClassic: `Launch a new agent. Delegate a self-contained subtask to an isolated sub-agent and get back a single report. ` +
739
760
  (opts.purpose ? `This sub-agent is for: ${opts.purpose}. ` : "") +
740
761
  (hasAgents ? `Available agent types are listed in <system-reminder> messages in the conversation. If \`subagent_type\` is omitted, a general-purpose sub-agent is used.\n` : "") +
741
762
  `The sub-agent starts with a clean context (it does NOT see this conversation), so put everything it needs in 'prompt'. ` +
@@ -760,9 +781,11 @@ function makeSubagentTool(opts, depth, excluded, extraToolsBudget) {
760
781
  `\nSet isolation: "worktree" to give the agent its own detached git worktree (auto-removed if it made no changes; kept for you to inspect/merge when it did).` +
761
782
  (opts.background
762
783
  ?
763
- `\n\nAgents run in the background by default. When an agent runs in the background, you will be automatically notified when it completes — do NOT sleep, poll, or proactively check on its progress. Continue with other work or respond to the user instead. Pass \`run_in_background: false\` for a synchronous run when you need the result before continuing.` +
784
+ (opts.background.notify
785
+ ? `\n\nAgents run in the background by default. When an agent runs in the background, you will be automatically notified when it completes — do NOT sleep, poll, or proactively check on its progress. Continue with other work or respond to the user instead. Pass \`run_in_background: false\` for a synchronous run when you need the result before continuing.`
786
+ : `\n\nAgents run in the background by default. A background agent's result is not pushed automatically — the launch receipt's task_id retrieves progress and results via the TaskOutput tool where mounted. Pass \`run_in_background: false\` for a synchronous run when you need the result before continuing.`) +
764
787
  ` Use SendMessage with a completed agent's ID to continue it with its context intact; a new ${opts.name ?? DEFAULT_SUBAGENT_TOOL_NAME} call starts fresh.` +
765
- `\n\n**Don't race.** After launching, you know nothing about what the agent found. Never fabricate or predict agent results in any format — not as prose, summary, or structured output. The notification arrives as a user-role message in a later turn; it is never something you write yourself.`
788
+ `\n\n**Don't race.** After launching, you know nothing about what the agent found. Never fabricate or predict agent results in any format — not as prose, summary, or structured output. ${opts.background.notify ? "The notification arrives as a user-role message in a later turn; it is never something you write yourself." : "The result exists only when you retrieve it; it is never something you write yourself."}`
766
789
  : `\n\nThe run_in_background parameter is not available in this context. Only synchronous subagents are supported.`),
767
790
  parameters: Type.Object({
768
791
  subagent_type: Type.Optional(Type.String({ description: "The type of specialized agent to use for this task" })),
@@ -771,20 +794,26 @@ function makeSubagentTool(opts, depth, excluded, extraToolsBudget) {
771
794
  name: Type.Optional(Type.String({
772
795
  maxLength: 64,
773
796
  pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
774
- description: 'Name for the spawned agent. Makes a background agent addressable via SendMessage({to: name}). "main" is reserved.',
797
+ description: 'Name for the spawned agent. Where the SendMessage tool is mounted, it makes a background agent addressable via SendMessage({to: name}). "main" is reserved.',
775
798
  })),
776
799
  cwd: Type.Optional(Type.String({
777
800
  description: 'Absolute path to run the agent in. Overrides the working directory for all filesystem and shell operations within this agent. Mutually exclusive with isolation: "worktree".',
778
801
  })),
779
802
  model: Type.Optional(Type.String({
780
- description: `Optional model override for this agent. Takes precedence over the agent definition's model. If omitted, uses the agent definition's model, or inherits from the parent. Ignored for subagent_type: "${FORK_SUBAGENT_TYPE}" — forks always inherit the parent model.`,
803
+ description: rosterNames !== undefined && rosterNames.length > 0
804
+ ? `Optional model override for this agent. Takes precedence over the agent definition's model. If omitted, uses the agent definition's model, or inherits from the parent. Ignored for subagent_type: "${FORK_SUBAGENT_TYPE}" — forks always inherit the parent model.`
805
+ : `Optional model override request. No model catalog is configured here, so a requested name cannot be resolved — the agent runs its definition's model (or inherits from the parent) and the result notes the override was not applied. Ignored for subagent_type: "${FORK_SUBAGENT_TYPE}".`,
781
806
  })),
782
807
  isolation: Type.Optional(Type.Literal("worktree", {
783
808
  description: 'Isolation mode. "worktree" runs the agent in its own detached git worktree (auto-removed if unchanged, kept when the agent made changes).',
784
809
  })),
785
810
  ...(opts.background
786
811
  ? {
787
- run_in_background: Type.Optional(Type.Boolean({ description: "Agents run in the background by default; you will be notified when one completes. Set to false to run this agent synchronously when you need its result before continuing." })),
812
+ run_in_background: Type.Optional(Type.Boolean({
813
+ description: opts.background.notify
814
+ ? "Agents run in the background by default; you will be notified when one completes. Set to false to run this agent synchronously when you need its result before continuing."
815
+ : "Agents run in the background by default; the launch receipt's task_id retrieves progress and results via the TaskOutput tool where mounted. Set to false to run this agent synchronously when you need its result before continuing.",
816
+ })),
788
817
  }
789
818
  : {}),
790
819
  }),
@@ -1069,6 +1098,7 @@ function makeSubagentTool(opts, depth, excluded, extraToolsBudget) {
1069
1098
  tools: [reportTool],
1070
1099
  ...(ctx.excludeTools !== undefined ? { excludeTools: [...ctx.excludeTools] } : {}),
1071
1100
  ...(ctx.deferTools !== undefined ? { deferTools: [...ctx.deferTools] } : {}),
1101
+ ...(ctx.promptProfile !== undefined ? { promptProfile: ctx.promptProfile } : {}),
1072
1102
  enableBlockedReport: false,
1073
1103
  limits: { maxTurns: observerDef.maxTurns ?? 8, timeoutSec: 120 },
1074
1104
  });
@@ -1211,6 +1241,7 @@ function makeSubagentTool(opts, depth, excluded, extraToolsBudget) {
1211
1241
  ...(ctx.clientContext !== undefined ? { clientContext: ctx.clientContext } : {}),
1212
1242
  ...(ctx.excludeTools !== undefined ? { excludeTools: [...ctx.excludeTools] } : {}),
1213
1243
  ...(ctx.deferTools !== undefined ? { deferTools: [...ctx.deferTools] } : {}),
1244
+ ...(ctx.promptProfile !== undefined ? { promptProfile: ctx.promptProfile } : {}),
1214
1245
  ...(ctx.getApiKeyAndHeaders !== undefined ? { getApiKeyAndHeaders: ctx.getApiKeyAndHeaders } : {}),
1215
1246
  enableBlockedReport: true,
1216
1247
  limits: childLimits,
@@ -1549,7 +1580,7 @@ function makeSubagentTool(opts, depth, excluded, extraToolsBudget) {
1549
1580
  content: `Async agent launched successfully.
1550
1581
  task_id: ${taskId}
1551
1582
  ` +
1552
- `The forked agent inherits your full current context and works on its prompt in the background. You will be notified automatically when it completes.
1583
+ `The forked agent inherits your full current context and works on its prompt in the background. ${notify ? "You will be notified automatically when it completes." : "Its result is NOT pushed automatically — retrieve progress and results with TaskOutput(task_id) where mounted."}
1553
1584
  ` +
1554
1585
  (modelNote ? `${modelNote}\n` : "") +
1555
1586
  (extraToolsNote ? `${extraToolsNote}\n` : "") +
@@ -1562,7 +1593,9 @@ task_id: ${taskId}
1562
1593
  `
1563
1594
  : `Note: it is stopped automatically (killed) if still running when this task ends — do not promise the user results beyond this task.
1564
1595
  `) +
1565
- `Briefly tell the user what you launched and end your response. Do not generate any other text — agent results will arrive in a subsequent message.`,
1596
+ (notify
1597
+ ? `Briefly tell the user what you launched and end your response. Do not generate any other text — agent results will arrive in a subsequent message.`
1598
+ : `Briefly tell the user what you launched. The result will NOT arrive on its own — retrieve it with TaskOutput(task_id) where mounted before relying on it.`),
1566
1599
  details: { type: "agent", subagent_type: FORK_SUBAGENT_TYPE, status: "async_launched", isAsync: true, task_id: taskId, description: shortDesc, prompt },
1567
1600
  };
1568
1601
  }
@@ -1875,7 +1908,7 @@ task_id: ${taskId}
1875
1908
  content: `Async agent launched successfully.
1876
1909
  task_id: ${taskId}
1877
1910
  ` +
1878
- `The agent is working in the background. You will be notified automatically when it completes.
1911
+ `The agent is working in the background. ${notify ? "You will be notified automatically when it completes." : "Its result is NOT pushed automatically — retrieve progress and results with TaskOutput(task_id) where mounted."}
1879
1912
  ` +
1880
1913
  (modelNote ? `${modelNote}\n` : "") +
1881
1914
  (extraToolsNote ? `${extraToolsNote}\n` : "") +
@@ -1888,7 +1921,9 @@ task_id: ${taskId}
1888
1921
  `
1889
1922
  : `Note: it is stopped automatically (killed) if still running when this task ends — do not promise the user results beyond this task.
1890
1923
  `) +
1891
- `Briefly tell the user what you launched and end your response. Do not generate any other text — agent results will arrive in a subsequent message.`,
1924
+ (notify
1925
+ ? `Briefly tell the user what you launched and end your response. Do not generate any other text — agent results will arrive in a subsequent message.`
1926
+ : `Briefly tell the user what you launched. The result will NOT arrive on its own — retrieve it with TaskOutput(task_id) where mounted before relying on it.`),
1892
1927
  details: { type: "agent", status: "async_launched", isAsync: true, task_id: taskId, description: shortDesc, prompt },
1893
1928
  };
1894
1929
  }