@zachwill/pi-orchestrate 0.4.1 → 0.4.2
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/README.md +2 -2
- package/extension/contract.ts +2 -1
- package/extension/tools.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Pi Orchestrate adds exactly five tools:
|
|
|
28
28
|
|
|
29
29
|
Each `orchestrate` call validates its input, worker definition, and model before allocating IDs or starting a session. Calls are admitted independently: a rejected sibling does not block valid siblings. After admission, a startup or prompt failure settles only that worker as `failed`.
|
|
30
30
|
|
|
31
|
-
Pi executes sibling tool calls concurrently, with no extension-level group limit or hidden throttle.
|
|
31
|
+
Pi executes sibling tool calls concurrently, with no extension-level group limit or hidden throttle. Before yielding, send every known independent task as sibling `orchestrate` calls in one assistant message. Finish dispatching the whole wave without waiting for any sibling's acceptance or completion; if one call is emitted separately, continue dispatching the remaining known siblings.
|
|
32
32
|
|
|
33
33
|
Execution mode depends on the complete tool-call group:
|
|
34
34
|
|
|
@@ -67,7 +67,7 @@ Pi Orchestrate injects the authoritative orchestration contract and trusted cata
|
|
|
67
67
|
|
|
68
68
|
1. Keep trivial or tightly coupled work in the parent. Divide broad work into bounded, independent scopes and dispatch all currently independent scopes in parallel.
|
|
69
69
|
2. Give every worker a thorough, self-contained brief with the objective, paths and scope, context, success criteria, and expected output. State forbidden actions explicitly.
|
|
70
|
-
3.
|
|
70
|
+
3. Before yielding, dispatch every currently known independent scope. Never stop after one call while another known scope remains, and never wait for one sibling's acceptance or completion before dispatching the rest.
|
|
71
71
|
4. As results expose new independent work, dispatch another parallel wave and continue until the whole task is complete.
|
|
72
72
|
5. Review evidence and changes, resolve conflicts, integrate deliberately, and verify the result.
|
|
73
73
|
6. Produce the final answer from the parent session.
|
package/extension/contract.ts
CHANGED
|
@@ -30,12 +30,13 @@ function buildContract(catalog: WorkerCatalog): string {
|
|
|
30
30
|
You are the parent orchestrator and own the task end to end.
|
|
31
31
|
|
|
32
32
|
- Keep trivial or tightly coupled work in the parent. Divide broad work into bounded, independent scopes and dispatch all currently independent scopes in parallel.
|
|
33
|
+
- Before dispatching, finish enumerating the current parallel wave. Dispatch every currently known independent scope before yielding. Never stop after one \`orchestrate\` call while another known independent scope remains, and do not wait for one sibling's acceptance or completion before dispatching the rest.
|
|
33
34
|
- Delegate each independent scope with its own \`orchestrate\` call using \`{ worker, title, instructions }\`. Emit sibling \`orchestrate\` calls in one assistant message so Pi executes them concurrently.
|
|
34
35
|
- Give every worker a thorough, self-contained brief with the objective, paths and scope, context, success criteria, and expected output. State forbidden actions explicitly.
|
|
35
36
|
- Input, catalog, and model preflight is atomic per call before that worker starts. Sibling calls are admitted independently, so one rejected call does not prevent valid siblings from starting.
|
|
36
37
|
- A sole \`orchestrate\` call or a pure group of sibling \`orchestrate\` calls runs asynchronously. Pi accepts a pure group concurrently, yields the parent turn, delivers each result as it settles, and starts synthesis only after the whole group settles. Mixing \`orchestrate\` with another tool makes it inline and blocking. \`worker_send\` is asynchronous only as the sole tool call in its assistant message.
|
|
37
38
|
- Exact worker instructions remain visible in the tool call and can be expanded; titles are labels, not substitutes for complete messages.
|
|
38
|
-
- After
|
|
39
|
+
- After every currently known sibling has been dispatched, yield the parent turn once their admissions have resolved; a rejected sibling does not block yielding. Worker responses arrive individually as each worker settles, and the final response starts parent synthesis. Do not duplicate delegated work, poll \`orchestration_status\`, or use it as a normal completion mechanism.
|
|
39
40
|
- As results expose new independent work, dispatch another parallel wave. Continue until the whole task is complete.
|
|
40
41
|
- The parent synthesizes worker results, reviews their evidence and changes, resolves conflicts, integrates the final result, and runs the relevant verification before declaring completion.
|
|
41
42
|
- Prefer one-shot workers. Use \`worker_send\` for follow-up work on a ready reusable worker, \`worker_close\` when that ready worker is finished, and \`worker_abort\` only when active work must stop.
|
package/extension/tools.ts
CHANGED
|
@@ -115,6 +115,7 @@ export function registerOrchestrationTools(
|
|
|
115
115
|
promptSnippet: "Dispatch one fully briefed worker task",
|
|
116
116
|
promptGuidelines: [
|
|
117
117
|
"Use sibling orchestrate calls for independent tasks, with one complete brief per call.",
|
|
118
|
+
"Before yielding, dispatch every currently known independent task; never wait for one sibling's acceptance or completion before dispatching the rest.",
|
|
118
119
|
],
|
|
119
120
|
executionMode: "parallel",
|
|
120
121
|
parameters: orchestrateSchema,
|