@skydiveai/pi-extensions 0.1.0-beta.402 → 0.1.0-beta.405

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 (2) hide show
  1. package/dist/index.mjs +9 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2764,8 +2764,14 @@ const TaskItem = Type.Object({
2764
2764
  maxLength: 120
2765
2765
  }),
2766
2766
  persona: Type.Optional(Type.String({ description: "Optional extra system prompt / role for this task, applied ON TOP of the child run's own default persona (your full identity and soul are still there underneath). Omit to run with just your default persona." })),
2767
- model: Type.Optional(Type.String({ description: "Optional model id to run this subagent on. PREFER A LOWER-COST, FASTER MODEL when the task is well-scoped and does not need your full reasoning depth — most delegated subtasks (searching, summarizing, mechanical edits, gathering or reformatting data, running a check) run just as well on a lighter model and cost far less. Reserve a top-tier model for subtasks that genuinely need deep reasoning or careful judgment. Must be a real catalogued model id. Omit to inherit your own model. If you are locked to a Google-compliant model, only compliant models are accepted." }))
2767
+ model: Type.Optional(Type.String({ description: "Optional model id to run this subagent on. PREFER A LOWER-COST, FASTER MODEL when the task is well-scoped and does not need your full reasoning depth — most delegated subtasks (searching, summarizing, mechanical edits, gathering or reformatting data, running a check) run just as well on a lighter model and cost far less. Reserve a top-tier model for subtasks that genuinely need deep reasoning or careful judgment. Must be a real catalogued model id. Omit to inherit your own model. If you are locked to a Google-compliant model, only compliant models are accepted." })),
2768
+ timeoutMinutes: Type.Optional(Type.Integer({
2769
+ description: "Optional wall-clock timeout for this subagent, in minutes. If the run is still going after this long it is ended and you are rewoken with a timeout result, so a hung subagent can never strand you. Omit for the default (30 minutes). Raise it for genuinely long work (a big migration, a large audit); lower it for a quick lookup. Range 1-360.",
2770
+ minimum: 1,
2771
+ maximum: 360
2772
+ }))
2768
2773
  });
2774
+ const DEFAULT_SUBAGENT_TIMEOUT_MS = 30 * 6e4;
2769
2775
  const SubagentParams = Type.Object({ tasks: Type.Array(TaskItem, {
2770
2776
  description: "One or more tasks to delegate. Each spawns an isolated subagent run linked to this conversation; they run in parallel and each rewakes you with its result when it finishes.",
2771
2777
  minItems: 1,
@@ -2798,7 +2804,8 @@ function buildTool(messageId) {
2798
2804
  task: t.task,
2799
2805
  title: t.title ?? null,
2800
2806
  persona: t.persona ?? null,
2801
- model: t.model ?? null
2807
+ model: t.model ?? null,
2808
+ timeoutMs: t.timeoutMinutes != null ? t.timeoutMinutes * 6e4 : DEFAULT_SUBAGENT_TIMEOUT_MS
2802
2809
  }));
2803
2810
  try {
2804
2811
  const { taskIds } = await postSubagentSpawn({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skydiveai/pi-extensions",
3
- "version": "0.1.0-beta.402",
3
+ "version": "0.1.0-beta.405",
4
4
  "homepage": "https://skydive.com",
5
5
  "license": "MIT",
6
6
  "author": "Create, Inc.",