@wrongstack/cli 0.276.2 → 0.276.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/dist/index.js CHANGED
@@ -36105,34 +36105,41 @@ var MultiAgentHost = class _MultiAgentHost {
36105
36105
  async runShadowPass(reason) {
36106
36106
  try {
36107
36107
  if (!this.director) return;
36108
+ if (this.director.isWorkComplete()) return;
36108
36109
  if (this.shadowObservedWorkDepth > 0) {
36109
36110
  this.shadowQueuedProblem = this.shadowQueuedProblem ? `${this.shadowQueuedProblem}; ${reason}` : reason;
36110
36111
  return;
36111
36112
  }
36112
36113
  const liveConfig = this.deps.configStore.get();
36113
- await this._spawnAndAssign(
36114
- {
36115
- name: "shadow",
36116
- role: "shadow-agent",
36117
- provider: liveConfig.provider,
36118
- model: liveConfig.model,
36119
- tools: [
36120
- "fleet",
36121
- "fleet",
36122
- "fleet",
36123
- "mailbox",
36124
- "mail_inbox",
36125
- "mail_send",
36126
- "terminate_subagent"
36127
- ]
36128
- },
36129
- buildShadowAgentTaskDescription(reason),
36130
- {
36131
- internalTask: true,
36132
- stopShadowAfterTask: true,
36133
- shadowIntervalMs: this.shadowHeartbeatIntervalMs
36114
+ try {
36115
+ await this._spawnAndAssign(
36116
+ {
36117
+ name: "shadow",
36118
+ role: "shadow-agent",
36119
+ provider: liveConfig.provider,
36120
+ model: liveConfig.model,
36121
+ tools: [
36122
+ "fleet",
36123
+ "fleet",
36124
+ "fleet",
36125
+ "mailbox",
36126
+ "mail_inbox",
36127
+ "mail_send",
36128
+ "terminate_subagent"
36129
+ ]
36130
+ },
36131
+ buildShadowAgentTaskDescription(reason),
36132
+ {
36133
+ internalTask: true,
36134
+ stopShadowAfterTask: true,
36135
+ shadowIntervalMs: this.shadowHeartbeatIntervalMs
36136
+ }
36137
+ );
36138
+ } catch (err) {
36139
+ if (err?.name !== "FleetSpawnBudgetError") {
36140
+ throw err;
36134
36141
  }
36135
- );
36142
+ }
36136
36143
  } finally {
36137
36144
  this.shadowPassInFlight = false;
36138
36145
  if (this.shadowObservedWorkDepth === 0 && this.shadowQueuedProblem) {