@atolis-hq/wake 0.3.49 → 0.3.50

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.
@@ -78,7 +78,10 @@ function projectWork(view, event, occurredAt) {
78
78
  event.eventType === WorkEventType.ItemCancelled) {
79
79
  return {
80
80
  ...view,
81
- cards: { ...view.cards, [id]: { ...current, condition: BoardCondition.Finished } },
81
+ cards: {
82
+ ...view.cards,
83
+ [id]: { ...withoutAwaitingApproval(current), condition: BoardCondition.Finished },
84
+ },
82
85
  };
83
86
  }
84
87
  // Deletion is a purge, not a lifecycle outcome — the card must disappear
@@ -265,7 +268,10 @@ function projectRunTerminal(view, event, workId, card) {
265
268
  ...withoutLegacyActiveRun(card),
266
269
  activeRuns: withoutActiveRun(activeRuns, event.stream.id),
267
270
  ...(terminal === undefined ? {} : { lastRunOutcome: terminal.lastRunOutcome }),
268
- ...(terminal === undefined || isChildRun || terminal.condition === undefined
271
+ ...(terminal === undefined ||
272
+ isChildRun ||
273
+ card.condition === BoardCondition.Finished ||
274
+ terminal.condition === undefined
269
275
  ? {}
270
276
  : { condition: terminal.condition }),
271
277
  totalDurationMs: card.totalDurationMs + runDurationMs,
@@ -295,7 +301,7 @@ function projectRunStarted(view, event) {
295
301
  ? withoutLegacyActiveRun(card)
296
302
  : withoutLegacyActiveRun(withoutLastRunOutcome(withoutAwaitingApproval(card)))),
297
303
  runCount: card.runCount + 1,
298
- ...(isChildRun ? {} : { condition: BoardCondition.Active }),
304
+ ...(shouldSetCardActive(card, isChildRun) ? { condition: BoardCondition.Active } : {}),
299
305
  lastRunAt: event.payload.startedAt,
300
306
  activeRuns: {
301
307
  ...activeRuns,
@@ -311,6 +317,9 @@ function projectRunStarted(view, event) {
311
317
  },
312
318
  };
313
319
  }
320
+ function shouldSetCardActive(card, isChildRun) {
321
+ return !isChildRun && card.condition !== BoardCondition.Finished;
322
+ }
314
323
  function projectRunnerResult(view, workId, card, metadata) {
315
324
  const usage = agentTokenUsage(metadata);
316
325
  return {
@@ -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 = "g2b6df21";
111
+ export const wakeVersion = "g562f222";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.3.49",
3
+ "version": "0.3.50",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {