@signalridge/pi-workflows 1.7.1 → 1.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.2
4
+ ### Patch Changes
5
+
6
+ - 919655f: Yield before live agent dispatch so synchronous managed-spawn setup cannot be interrupted by the script bootstrap watchdog before promise tracking is attached. Preserve lexical call identity and reservations, check cancellation after yielding, and retain the 1000ms script watchdog. Add real Node process regressions for slow setup, runaway scripts, and pending-spawn cleanup.
7
+
3
8
  ## 1.7.1
4
9
  ### Patch Changes
5
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalridge/pi-workflows",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Deterministic JavaScript orchestration workflows backed by pi-subagents managed spawning.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
  name: workflow-authoring
3
3
  description: Design, write, review, and debug Pi JavaScript workflows that coordinate multiple subagents. Use when a request needs named dependencies, bounded fan-out, per-item pipelines, quality gates, saved or nested workflows, pause/resume, or workflow progress; do not use it merely to run an existing named workflow.
4
4
  metadata:
5
- version: "1.7.1"
5
+ version: "1.7.2"
6
6
  ---
7
7
 
8
8
  # Workflow authoring
@@ -2,7 +2,7 @@
2
2
  # Workflow capability index
3
3
 
4
4
  Contract format: `2.0.0`<br>
5
- Contract content / skill / extension: `1.7.1`
5
+ Contract content / skill / extension: `1.7.2`
6
6
 
7
7
  This compact generated index covers supported runtime globals and workflow-tool inputs. For constraints, compatibility behavior, internal boundaries, and dynamic-reference ownership, follow the [exhaustive generated facts](capability-details.md).
8
8
 
@@ -2,7 +2,7 @@
2
2
  # Exhaustive workflow capability facts
3
3
 
4
4
  Contract format: `2.0.0`<br>
5
- Contract content / skill / extension: `1.7.1`
5
+ Contract content / skill / extension: `1.7.2`
6
6
 
7
7
  Every exact fact below is projected from the installed extension's capability contract. Explanatory judgment belongs in the hand-written references next to this file.
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: workflow-patterns
3
3
  description: Choose and run one of Pi's built-in multi-agent workflows for research, adversarial review, code review, multi-perspective analysis, or codebase auditing. Use when the request matches a named pattern; use workflow-authoring instead for a new script or custom topology.
4
4
  metadata:
5
- version: "1.7.1"
5
+ version: "1.7.2"
6
6
  ---
7
7
 
8
8
  # Built-in workflow patterns
@@ -2,7 +2,7 @@
2
2
  name: workflow-review
3
3
  description: Audit an existing Pi JavaScript workflow for topology, prompt/data flow, limits, failure handling, cancellation, resume safety, and publication compatibility. Use when reviewing or debugging a workflow script or saved run; do not use to run a standard named workflow.
4
4
  metadata:
5
- version: "1.7.1"
5
+ version: "1.7.2"
6
6
  ---
7
7
 
8
8
  # Workflow review
package/src/runtime.ts CHANGED
@@ -1606,6 +1606,16 @@ export async function runWorkflow<T = unknown>(
1606
1606
  shared.physicalAgentCount++;
1607
1607
 
1608
1608
  return limiter(async () => {
1609
+ // Keep lexical identity, scope, thread ownership and cap reservations above
1610
+ // synchronous, but leave the timed VM bootstrap before invoking host code.
1611
+ // Even an immediately available limiter slot must yield: synchronous spawn
1612
+ // setup can outlast the script watchdog and interrupt RPC promise creation
1613
+ // before its callers attach rejection/cleanup handlers. The returned call
1614
+ // is now tracked before dispatch, and a bootstrap timeout cancels it here.
1615
+ await Promise.resolve();
1616
+ throwIfAborted();
1617
+ if (batch?.cancelled) throw agentLimitError();
1618
+
1609
1619
  const timeout = agentOptions.timeoutMs !== undefined ? agentOptions.timeoutMs : agentTimeoutMs;
1610
1620
  const retryAttempts = normalizeAgentRetries(agentOptions.retries ?? options.agentRetries ?? 0);
1611
1621
  const maxAttempts = retryAttempts + 1;