@maheidem/pi-delegate 0.7.2 → 0.7.3
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/ask.ts +8 -0
- package/index.ts +7 -0
- package/package.json +2 -2
package/ask.ts
CHANGED
|
@@ -116,6 +116,14 @@ export function registerAskParentTool(pi: ExtensionAPI, env: AskEnv): void {
|
|
|
116
116
|
"Ask the delegating parent agent a question (you block until it answers or the budget expires) or file a non-blocking note. " +
|
|
117
117
|
"Ask only when you are genuinely blocked or a wrong guess is expensive; for cheap decisions proceed with a stated assumption instead. " +
|
|
118
118
|
"Prefer notes for risks and observations — they never stall your run.",
|
|
119
|
+
// Pi >= 1.0 lists an extension tool in the system prompt's <tools> section
|
|
120
|
+
// only when it has a promptSnippet. Without one, small models read that
|
|
121
|
+
// list, say "I don't have an ask_parent tool" and never call it, even
|
|
122
|
+
// though the tool is declared to the provider.
|
|
123
|
+
promptSnippet: "Ask the delegating parent agent a question (blocks until it answers) or file a non-blocking note",
|
|
124
|
+
promptGuidelines: [
|
|
125
|
+
"ask_parent is a real tool in this session. When the user or task tells you to ask the parent, call ask_parent; do not say it is unavailable.",
|
|
126
|
+
],
|
|
119
127
|
parameters: AskParentParams,
|
|
120
128
|
async execute(toolCallId: string, params): Promise<AskToolResult> {
|
|
121
129
|
const validation = validateAskSubmission(params);
|
package/index.ts
CHANGED
|
@@ -150,6 +150,13 @@ function registerChildHandoffTool(pi: ExtensionAPI): void {
|
|
|
150
150
|
"MANDATORY final report for this delegated run. Your run does not complete until this tool " +
|
|
151
151
|
"has been called with a valid submission; free-text endings are rejected and you will be re-prompted. " +
|
|
152
152
|
"When terminated mid-work, call it immediately with outcome=partial.",
|
|
153
|
+
// Pi >= 1.0 lists an extension tool in the system prompt's <tools> section
|
|
154
|
+
// only when it has a promptSnippet. Without one, small models read that
|
|
155
|
+
// list, say "I don't have a handoff tool" and end with free text instead.
|
|
156
|
+
promptSnippet: "Submit the mandatory structured final report for this delegated run",
|
|
157
|
+
promptGuidelines: [
|
|
158
|
+
"handoff is a real tool in this session. End the run by calling handoff; do not end with free text or say the tool is unavailable.",
|
|
159
|
+
],
|
|
153
160
|
parameters: HandoffToolParams,
|
|
154
161
|
async execute(_toolCallId, params): Promise<{
|
|
155
162
|
content: Array<{ type: "text"; text: string }>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maheidem/pi-delegate",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Foreground isolated delegation and strict coordinator mode for the Pi coding agent.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
"./index.ts"
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|