@atolis-hq/wake 0.2.9 → 0.2.11

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.
@@ -104,6 +104,7 @@ export function classifyCursorCliFailure(input) {
104
104
  }
105
105
  const text = `${input.stderr}\n${input.stdout}`.toLowerCase();
106
106
  if (text.includes('rate limit') ||
107
+ text.includes('usage limit') ||
107
108
  text.includes('quota') ||
108
109
  text.includes('billing') ||
109
110
  text.includes('unauthorized') ||
@@ -1,5 +1,7 @@
1
1
  import { waitForActiveRuns } from './stop-command.js';
2
2
  const HEALTHCHECK_WAKE_ROOT = '/tmp/wake-self-update-healthcheck';
3
+ const START_PROCESS_CHECK_ATTEMPTS = 15;
4
+ const START_PROCESS_CHECK_INTERVAL_MS = 1000;
3
5
  const START_PROCESS_CHECK = [
4
6
  'sh',
5
7
  '-lc',
@@ -28,8 +30,22 @@ async function verifyResidentStart(input) {
28
30
  input.logger.error(`[self-update] wake start auto-start is disabled; resident loop will not be running after ${input.context}`);
29
31
  return;
30
32
  }
31
- await input.docker.exec(input.containerName, START_PROCESS_CHECK);
32
- input.logger.info(`[self-update] verified wake start is running after ${input.context}`);
33
+ let lastError;
34
+ for (let attempt = 1; attempt <= START_PROCESS_CHECK_ATTEMPTS; attempt += 1) {
35
+ try {
36
+ await input.docker.exec(input.containerName, START_PROCESS_CHECK);
37
+ input.logger.info(`[self-update] verified wake start is running after ${input.context}`);
38
+ return;
39
+ }
40
+ catch (error) {
41
+ lastError = error;
42
+ if (attempt === START_PROCESS_CHECK_ATTEMPTS) {
43
+ break;
44
+ }
45
+ await input.sleep(START_PROCESS_CHECK_INTERVAL_MS);
46
+ }
47
+ }
48
+ throw lastError instanceof Error ? lastError : new Error(String(lastError));
33
49
  }
34
50
  export async function runSelfUpdateCommand(input) {
35
51
  const force = hasFlag('--force', input.args);
@@ -76,6 +92,7 @@ export async function runSelfUpdateCommand(input) {
76
92
  containerName: input.containerName,
77
93
  start: input.start,
78
94
  logger: input.logger,
95
+ sleep: input.sleep,
79
96
  context: 'rollout',
80
97
  });
81
98
  await input.docker.exec(input.containerName, [
@@ -99,6 +116,7 @@ export async function runSelfUpdateCommand(input) {
99
116
  containerName: input.containerName,
100
117
  start: input.start,
101
118
  logger: input.logger,
119
+ sleep: input.sleep,
102
120
  context: 'rollback',
103
121
  });
104
122
  input.logger.info(`[self-update] rolled back to ${ledger.lastKnownGoodTag}`);
@@ -1 +1 @@
1
- export const wakeVersion = "0.2.9+g7458f72";
1
+ export const wakeVersion = "0.2.11+gb8bdb82";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {