@atolis-hq/wake 0.3.60 → 0.3.62

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.
@@ -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 = "gbbe428e";
111
+ export const wakeVersion = "g8095980";
@@ -1,6 +1,6 @@
1
1
  import { ActivationClaimConflictError, RunStatus, WorkspaceMode } from '../../execution/index.js';
2
2
  import { correlationId, EventActorKind, } from '../../kernel/index.js';
3
- import { WorkflowStatus } from '../../orchestration/index.js';
3
+ import { isAmbiguityResolutionBlock, WorkflowStatus } from '../../orchestration/index.js';
4
4
  import { WorkStatus } from '../../work/index.js';
5
5
  import { ControlStreamKind } from '../contracts/streams.js';
6
6
  import { DispatchPolicy } from '../domain/dispatch-policy.js';
@@ -84,7 +84,9 @@ export function createAdvanceOnce(orchestration, execution, resources, clock, de
84
84
  (options.workItemId === undefined || workflow.workItemId === options.workItemId)
85
85
  ? [{ workflow, activation: workflow.pendingActivation }]
86
86
  : []);
87
+ const ambiguityBlocked = blocked.filter((item) => isAmbiguityResolutionBlock(item.workflow.blockReason));
87
88
  const recovery = (await findUnresolvedTerminal(pending, execution)) ??
89
+ (await findUnresolvedTerminal(ambiguityBlocked, execution)) ??
88
90
  (await findUnresolvedSucceededTerminal(blocked, execution));
89
91
  if (recovery !== undefined) {
90
92
  if (await isDispatchPaused())
@@ -17,5 +17,5 @@ export async function findUnresolvedSucceededTerminal(pending, execution) {
17
17
  return undefined;
18
18
  }
19
19
  export function isExecutionFailureTerminal(status) {
20
- return (status === RunStatus.Failed || status === RunStatus.Cancelled || status === RunStatus.Ambiguous);
20
+ return status === RunStatus.Failed || status === RunStatus.Cancelled;
21
21
  }
@@ -1,4 +1,8 @@
1
1
  import { execa } from 'execa';
2
+ // Agent CLIs can emit arbitrarily large machine-readable transcripts. Wake
3
+ // retains their complete result only after the process exits, so cap capture
4
+ // below the resident's heap limit and surface the existing output-limit failure.
5
+ const maximumCapturedProcessOutputBytes = 1024 * 1024;
2
6
  export function runProcess(command, args, cwd, signal, timeoutMs) {
3
7
  const child = execa(command, args, {
4
8
  ...(cwd === undefined ? {} : { cwd }),
@@ -6,6 +10,7 @@ export function runProcess(command, args, cwd, signal, timeoutMs) {
6
10
  stdin: 'ignore',
7
11
  stdout: 'pipe',
8
12
  stderr: 'pipe',
13
+ maxBuffer: maximumCapturedProcessOutputBytes,
9
14
  cancelSignal: signal,
10
15
  ...(timeoutMs === undefined ? {} : { timeout: timeoutMs }),
11
16
  reject: false,
@@ -204,6 +204,6 @@ export class AdvanceWorkflow {
204
204
  return matchWatches(await this.listAllLoaded(), event, this.workflows, context);
205
205
  }
206
206
  }
207
- function isAmbiguityResolutionBlock(reason) {
207
+ export function isAmbiguityResolutionBlock(reason) {
208
208
  return reason !== undefined && /^run-ambiguous-after-\d+-attempts$/.test(reason);
209
209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.3.60",
3
+ "version": "0.3.62",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {