@skydiveai/pi-extensions 0.1.0-beta.73 → 0.1.0-beta.74
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.mjs +7 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2785,6 +2785,10 @@ const COLD_START_FLAG_WAIT_MS = 750;
|
|
|
2785
2785
|
const MAX_TASKS = 8;
|
|
2786
2786
|
const TaskItem = Type.Object({
|
|
2787
2787
|
task: Type.String({ description: "The task to delegate to a subagent run." }),
|
|
2788
|
+
title: Type.String({
|
|
2789
|
+
description: "A SHORT name for this task — 3-6 words, sentence case, no trailing period. This is what the person in the chat sees as the row for this subagent, so name the work, do not restate the prompt. Good: \"Audit the billing gate\", \"Compare competitor pricing\", \"Draft the migration\". Bad: \"You are looking at apps/anyone/web and should check every component…\".",
|
|
2790
|
+
maxLength: 120
|
|
2791
|
+
}),
|
|
2788
2792
|
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." })),
|
|
2789
2793
|
model: Type.Optional(Type.String({ description: "Optional model id to run this subagent on (e.g. \"anthropic/claude-opus-4-8\"). Must be a real catalogued model. Omit to run on your own model. If you are locked to a Google-compliant model, only compliant models are accepted." }))
|
|
2790
2794
|
});
|
|
@@ -2802,7 +2806,7 @@ function buildTool(messageId) {
|
|
|
2802
2806
|
"Delegate one or more tasks to subagent runs — fresh isolated copies of yourself, each with its own context window, linked to this conversation.",
|
|
2803
2807
|
"Use it to parallelize independent work, to keep a large or noisy subtask out of your own context, or to run a task under a specialized persona.",
|
|
2804
2808
|
"Fire-and-forget: this returns immediately after queueing. It does NOT wait for results. Each subagent runs on its own and, when it finishes, sends you its result on this thread — so queue the work, then keep going or end your turn. To chain, re-delegate after a result lands.",
|
|
2805
|
-
"Pass tasks: [{ task, persona?, model? }]. persona is an optional extra system prompt layered ON TOP of your default persona for that task (it adds to, it does not replace, your identity); omit it to run with just your default persona. model is an optional model id for that task; omit it to run on your own model."
|
|
2809
|
+
"Pass tasks: [{ task, title, persona?, model? }]. title is a short 3-6 word name for the task — it is shown to the person in the chat as that subagent's row, so name the work rather than restating the prompt. persona is an optional extra system prompt layered ON TOP of your default persona for that task (it adds to, it does not replace, your identity); omit it to run with just your default persona. model is an optional model id for that task; omit it to run on your own model."
|
|
2806
2810
|
].join(" "),
|
|
2807
2811
|
promptSnippet: "subagent — delegate tasks to isolated subagent runs; each rewakes you with its result when done",
|
|
2808
2812
|
parameters: SubagentParams,
|
|
@@ -2818,6 +2822,7 @@ function buildTool(messageId) {
|
|
|
2818
2822
|
};
|
|
2819
2823
|
const spawnTasks = tasks.map((t) => ({
|
|
2820
2824
|
task: t.task,
|
|
2825
|
+
title: t.title ?? null,
|
|
2821
2826
|
persona: t.persona ?? null,
|
|
2822
2827
|
model: t.model ?? null
|
|
2823
2828
|
}));
|
|
@@ -2830,7 +2835,7 @@ function buildTool(messageId) {
|
|
|
2830
2835
|
event: "subagent_spawned",
|
|
2831
2836
|
count: taskIds.length
|
|
2832
2837
|
}, "subagent tasks queued");
|
|
2833
|
-
const lines = taskIds.map((id, i) => `- ${id}: ${spawnTasks[i]?.task ?? ""}`).join("\n");
|
|
2838
|
+
const lines = taskIds.map((id, i) => `- ${id}: ${spawnTasks[i]?.title ?? spawnTasks[i]?.task ?? ""}`).join("\n");
|
|
2834
2839
|
return {
|
|
2835
2840
|
content: [{
|
|
2836
2841
|
type: "text",
|