@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.
@@ -1412,12 +1412,44 @@ type AgentToolsConfig = {
1412
1412
  mcpServers?: Array<Record<string, unknown>>;
1413
1413
  /** Maximum number of tool invocations per execution */
1414
1414
  maxToolCalls?: number;
1415
+ /** How the model is steered toward tools: let it decide, force a call, or disable */
1416
+ toolCallStrategy?: "auto" | "required" | "none";
1417
+ /** Per-tool invocation limits / requirements keyed by tool name */
1418
+ perToolLimits?: Record<string, {
1419
+ maxCalls?: number;
1420
+ required?: boolean;
1421
+ }>;
1415
1422
  /** Tool approval configuration for human-in-the-loop workflows */
1416
1423
  approval?: {
1417
1424
  /** Tool names/patterns to require approval for, or true for all tools */
1418
1425
  require: string[] | boolean;
1419
1426
  /** Approval timeout in milliseconds (default: 300000 / 5 minutes) */
1420
1427
  timeout?: number;
1428
+ /** Ask the agent to state its intent alongside approval requests (default: true) */
1429
+ requestReason?: boolean;
1430
+ };
1431
+ /**
1432
+ * Enables the synthesized `spawn_subagent` tool: the model can spin up
1433
+ * ad-hoc child agents at runtime, restricted to `toolPool` (tool IDs /
1434
+ * runtime-tool names already granted to the parent agent).
1435
+ */
1436
+ subagentConfig?: {
1437
+ toolPool: string[];
1438
+ defaultMaxTurns?: number;
1439
+ maxTurnsLimit?: number;
1440
+ maxSpawnsPerRun?: number;
1441
+ defaultModel?: string;
1442
+ allowNesting?: boolean;
1443
+ defaultTimeoutMs?: number;
1444
+ };
1445
+ /**
1446
+ * Enables the synthesized `code_mode` tool: the model writes JS that calls
1447
+ * pool tools inside a sandbox instead of issuing individual tool calls.
1448
+ */
1449
+ codeModeConfig?: {
1450
+ toolPool: string[];
1451
+ description?: string;
1452
+ timeoutMs?: number;
1421
1453
  };
1422
1454
  };
1423
1455
  /** Artifact kinds for the Persona sidebar and dispatch payload */
@@ -1412,12 +1412,44 @@ type AgentToolsConfig = {
1412
1412
  mcpServers?: Array<Record<string, unknown>>;
1413
1413
  /** Maximum number of tool invocations per execution */
1414
1414
  maxToolCalls?: number;
1415
+ /** How the model is steered toward tools: let it decide, force a call, or disable */
1416
+ toolCallStrategy?: "auto" | "required" | "none";
1417
+ /** Per-tool invocation limits / requirements keyed by tool name */
1418
+ perToolLimits?: Record<string, {
1419
+ maxCalls?: number;
1420
+ required?: boolean;
1421
+ }>;
1415
1422
  /** Tool approval configuration for human-in-the-loop workflows */
1416
1423
  approval?: {
1417
1424
  /** Tool names/patterns to require approval for, or true for all tools */
1418
1425
  require: string[] | boolean;
1419
1426
  /** Approval timeout in milliseconds (default: 300000 / 5 minutes) */
1420
1427
  timeout?: number;
1428
+ /** Ask the agent to state its intent alongside approval requests (default: true) */
1429
+ requestReason?: boolean;
1430
+ };
1431
+ /**
1432
+ * Enables the synthesized `spawn_subagent` tool: the model can spin up
1433
+ * ad-hoc child agents at runtime, restricted to `toolPool` (tool IDs /
1434
+ * runtime-tool names already granted to the parent agent).
1435
+ */
1436
+ subagentConfig?: {
1437
+ toolPool: string[];
1438
+ defaultMaxTurns?: number;
1439
+ maxTurnsLimit?: number;
1440
+ maxSpawnsPerRun?: number;
1441
+ defaultModel?: string;
1442
+ allowNesting?: boolean;
1443
+ defaultTimeoutMs?: number;
1444
+ };
1445
+ /**
1446
+ * Enables the synthesized `code_mode` tool: the model writes JS that calls
1447
+ * pool tools inside a sandbox instead of issuing individual tool calls.
1448
+ */
1449
+ codeModeConfig?: {
1450
+ toolPool: string[];
1451
+ description?: string;
1452
+ timeoutMs?: number;
1421
1453
  };
1422
1454
  };
1423
1455
  /** Artifact kinds for the Persona sidebar and dispatch payload */