@atolis-hq/wake 0.2.8 → 0.2.10
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.
|
@@ -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
|
-
|
|
32
|
-
|
|
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}`);
|
|
@@ -41,9 +41,12 @@ async function defaultLoadPrompt(action, mode, promptsRoot) {
|
|
|
41
41
|
...(promptsRoot === undefined ? {} : { promptsRoot }),
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
export function buildRunnerCommandProbeArgs(kind) {
|
|
45
|
+
return kind === 'cursor' ? ['agent', '--version'] : ['--version'];
|
|
46
|
+
}
|
|
44
47
|
async function defaultCheckRunnerCommand(runnerName, entry) {
|
|
45
48
|
try {
|
|
46
|
-
await execFile(entry.command,
|
|
49
|
+
await execFile(entry.command, buildRunnerCommandProbeArgs(entry.kind), {
|
|
47
50
|
env: process.env,
|
|
48
51
|
timeout: runnerVersionProbeTimeoutMs,
|
|
49
52
|
windowsHide: true,
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const wakeVersion = "0.2.
|
|
1
|
+
export const wakeVersion = "0.2.10+gc34a38e";
|
package/docker/log-command.sh
CHANGED
|
@@ -94,7 +94,7 @@ emit_check "repos-root" test -d "${container_mount}/repos"
|
|
|
94
94
|
emit_check "gh-auth-status" gh auth status
|
|
95
95
|
emit_check "claude-auth-status" claude auth status
|
|
96
96
|
emit_check "codex-auth-status" codex login status
|
|
97
|
-
emit_check "cursor-auth-status" cursor status
|
|
97
|
+
emit_check "cursor-auth-status" cursor agent status
|
|
98
98
|
|
|
99
99
|
set +e
|
|
100
100
|
"$@" \
|