@runtypelabs/persona 3.33.0 → 3.34.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.
@@ -1681,12 +1681,44 @@ type AgentToolsConfig = {
1681
1681
  mcpServers?: Array<Record<string, unknown>>;
1682
1682
  /** Maximum number of tool invocations per execution */
1683
1683
  maxToolCalls?: number;
1684
+ /** How the model is steered toward tools: let it decide, force a call, or disable */
1685
+ toolCallStrategy?: "auto" | "required" | "none";
1686
+ /** Per-tool invocation limits / requirements keyed by tool name */
1687
+ perToolLimits?: Record<string, {
1688
+ maxCalls?: number;
1689
+ required?: boolean;
1690
+ }>;
1684
1691
  /** Tool approval configuration for human-in-the-loop workflows */
1685
1692
  approval?: {
1686
1693
  /** Tool names/patterns to require approval for, or true for all tools */
1687
1694
  require: string[] | boolean;
1688
1695
  /** Approval timeout in milliseconds (default: 300000 / 5 minutes) */
1689
1696
  timeout?: number;
1697
+ /** Ask the agent to state its intent alongside approval requests (default: true) */
1698
+ requestReason?: boolean;
1699
+ };
1700
+ /**
1701
+ * Enables the synthesized `spawn_subagent` tool: the model can spin up
1702
+ * ad-hoc child agents at runtime, restricted to `toolPool` (tool IDs /
1703
+ * runtime-tool names already granted to the parent agent).
1704
+ */
1705
+ subagentConfig?: {
1706
+ toolPool: string[];
1707
+ defaultMaxTurns?: number;
1708
+ maxTurnsLimit?: number;
1709
+ maxSpawnsPerRun?: number;
1710
+ defaultModel?: string;
1711
+ allowNesting?: boolean;
1712
+ defaultTimeoutMs?: number;
1713
+ };
1714
+ /**
1715
+ * Enables the synthesized `code_mode` tool: the model writes JS that calls
1716
+ * pool tools inside a sandbox instead of issuing individual tool calls.
1717
+ */
1718
+ codeModeConfig?: {
1719
+ toolPool: string[];
1720
+ description?: string;
1721
+ timeoutMs?: number;
1690
1722
  };
1691
1723
  };
1692
1724
  /** Artifact kinds for the Persona sidebar and dispatch payload */
@@ -1681,12 +1681,44 @@ type AgentToolsConfig = {
1681
1681
  mcpServers?: Array<Record<string, unknown>>;
1682
1682
  /** Maximum number of tool invocations per execution */
1683
1683
  maxToolCalls?: number;
1684
+ /** How the model is steered toward tools: let it decide, force a call, or disable */
1685
+ toolCallStrategy?: "auto" | "required" | "none";
1686
+ /** Per-tool invocation limits / requirements keyed by tool name */
1687
+ perToolLimits?: Record<string, {
1688
+ maxCalls?: number;
1689
+ required?: boolean;
1690
+ }>;
1684
1691
  /** Tool approval configuration for human-in-the-loop workflows */
1685
1692
  approval?: {
1686
1693
  /** Tool names/patterns to require approval for, or true for all tools */
1687
1694
  require: string[] | boolean;
1688
1695
  /** Approval timeout in milliseconds (default: 300000 / 5 minutes) */
1689
1696
  timeout?: number;
1697
+ /** Ask the agent to state its intent alongside approval requests (default: true) */
1698
+ requestReason?: boolean;
1699
+ };
1700
+ /**
1701
+ * Enables the synthesized `spawn_subagent` tool: the model can spin up
1702
+ * ad-hoc child agents at runtime, restricted to `toolPool` (tool IDs /
1703
+ * runtime-tool names already granted to the parent agent).
1704
+ */
1705
+ subagentConfig?: {
1706
+ toolPool: string[];
1707
+ defaultMaxTurns?: number;
1708
+ maxTurnsLimit?: number;
1709
+ maxSpawnsPerRun?: number;
1710
+ defaultModel?: string;
1711
+ allowNesting?: boolean;
1712
+ defaultTimeoutMs?: number;
1713
+ };
1714
+ /**
1715
+ * Enables the synthesized `code_mode` tool: the model writes JS that calls
1716
+ * pool tools inside a sandbox instead of issuing individual tool calls.
1717
+ */
1718
+ codeModeConfig?: {
1719
+ toolPool: string[];
1720
+ description?: string;
1721
+ timeoutMs?: number;
1690
1722
  };
1691
1723
  };
1692
1724
  /** Artifact kinds for the Persona sidebar and dispatch payload */