@atolis-hq/wake 0.3.90 → 0.3.91

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.
@@ -167,7 +167,7 @@ function projectWorkflowUpdate(view, event, occurredAt) {
167
167
  ...(event.eventType === OrchestrationEventType.InstanceBlocked
168
168
  ? card
169
169
  : withoutBlockReason(card)),
170
- condition: boardConditionForStatus(status),
170
+ condition: boardConditionForStatus(status, card),
171
171
  ...(event.eventType === OrchestrationEventType.InstanceBlocked
172
172
  ? { blockReason: event.payload.reason }
173
173
  : {}),
@@ -184,21 +184,27 @@ function projectWorkflowUpdate(view, event, occurredAt) {
184
184
  return { ...view, cards: { ...view.cards, [workId]: withoutAwaitingApproval(withCondition) } };
185
185
  return { ...view, cards: { ...view.cards, [workId]: withCondition } };
186
186
  }
187
- function boardConditionForStatus(status) {
187
+ function boardConditionForStatus(status, card) {
188
188
  switch (status) {
189
189
  // Orchestration "active" means outstanding work, not a run in flight —
190
190
  // the board's Active condition is reserved for RunStarted (below).
191
191
  case WorkflowStatus.Active:
192
192
  return BoardCondition.Ready;
193
193
  case WorkflowStatus.Waiting:
194
- case WorkflowStatus.Blocked:
195
194
  return BoardCondition.NeedsInput;
195
+ case WorkflowStatus.Blocked:
196
+ return failedOrAmbiguousRun(card.lastRunOutcome)
197
+ ? BoardCondition.Error
198
+ : BoardCondition.NeedsInput;
196
199
  case WorkflowStatus.Completed:
197
200
  return BoardCondition.Finished;
198
201
  case WorkflowStatus.Superseded:
199
202
  return BoardCondition.Error;
200
203
  }
201
204
  }
205
+ function failedOrAmbiguousRun(outcome) {
206
+ return outcome === RunStatus.Failed || outcome === RunStatus.Ambiguous;
207
+ }
202
208
  function lookupWorkflowCard(view, streamId) {
203
209
  const workId = view.workflows[streamId];
204
210
  if (workId === undefined)
@@ -108,4 +108,4 @@ export function resolveWakeVersion(options = {}) {
108
108
  return `g${headHash.slice(0, 7)}`;
109
109
  return '0.1.0-dev';
110
110
  }
111
- export const wakeVersion = "g7f8e7fb";
111
+ export const wakeVersion = "gf7beeaa";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.3.90",
3
+ "version": "0.3.91",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {