@atolis-hq/wake 0.3.83 → 0.3.85
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.
- package/dist/src/activities/agent/agent-activity.js +7 -1
- package/dist/src/activities/agent/agent-result.js +5 -1
- package/dist/src/activities/contracts/vocabulary.js +1 -0
- package/dist/src/bootstrap/self-update-failure-log.js +8 -0
- package/dist/src/bootstrap/surface-api-applications.js +13 -3
- package/dist/src/bootstrap/surface-cli-applications.js +18 -2
- package/dist/src/bootstrap/version.js +1 -1
- package/dist/src/control-plane/application/advance-once-dispatch.js +55 -9
- package/dist/src/control-plane/application/advance-once.js +24 -6
- package/dist/src/execution/application/execution-activity.js +3 -1
- package/dist/src/execution/contracts/runner.js +1 -0
- package/dist/src/execution/infrastructure/runners/claude.js +33 -8
- package/dist/src/execution/infrastructure/runners/codex.js +37 -0
- package/dist/src/execution/infrastructure/runners/cursor.js +15 -0
- package/dist/src/execution/infrastructure/runners/registry.js +9 -1
- package/dist/src/orchestration/application/advance-workflow.js +24 -1
- package/dist/src/orchestration/application/orchestration-service.js +3 -0
- package/dist/src/orchestration/contracts/event-decoder.js +8 -0
- package/dist/src/orchestration/contracts/events.js +1 -0
- package/dist/src/orchestration/domain/interpreter.js +1 -0
- package/dist/src/orchestration/domain/runner-quota-retry-policy.js +41 -0
- package/dist/src/orchestration/domain/workflow-instance-events.js +5 -0
- package/dist/src/persistence/filesystem/file-event-journal.js +20 -1
- package/dist/src/surfaces/cli/commands/sandbox-entrypoint.js +14 -0
- package/dist/src/surfaces/web-assets/assets/index-Ck6q_lgp.js +1090 -0
- package/dist/src/surfaces/web-assets/index.html +1 -1
- package/package.json +1 -1
- package/dist/src/surfaces/web-assets/assets/index-DPstcTxm.js +0 -1090
|
@@ -15,6 +15,15 @@ export class FileEventJournal {
|
|
|
15
15
|
return this.changeSignalSource;
|
|
16
16
|
}
|
|
17
17
|
cached;
|
|
18
|
+
// Every read (readStream/readAll/readLatest/latestGlobalPosition) reaches
|
|
19
|
+
// scan(), and the resident host's tick loop calls those many times a
|
|
20
|
+
// second while work is progressing. Without coalescing, calls that land
|
|
21
|
+
// concurrently each independently decide the cache is stale and each
|
|
22
|
+
// re-read and re-parse the entire on-disk journal — under I/O pressure
|
|
23
|
+
// (e.g. a concurrently running build/test process competing for disk),
|
|
24
|
+
// enough of these can overlap at once to exhaust the heap. Sharing one
|
|
25
|
+
// in-flight decode among concurrent callers makes that impossible.
|
|
26
|
+
inFlightScan;
|
|
18
27
|
async append(stream, expectedSequence, drafts) {
|
|
19
28
|
return withFileLock(join(this.root, 'locks', 'event-journal.lock'), async () => {
|
|
20
29
|
const current = await this.scan();
|
|
@@ -97,7 +106,17 @@ export class FileEventJournal {
|
|
|
97
106
|
: [...priorEntries, updatedEntry];
|
|
98
107
|
this.cached = { entries, events: [...priorEvents, ...newEnvelopes] };
|
|
99
108
|
}
|
|
100
|
-
|
|
109
|
+
scan() {
|
|
110
|
+
if (this.inFlightScan !== undefined)
|
|
111
|
+
return this.inFlightScan;
|
|
112
|
+
const run = this.scanUncoalesced().finally(() => {
|
|
113
|
+
if (this.inFlightScan === run)
|
|
114
|
+
this.inFlightScan = undefined;
|
|
115
|
+
});
|
|
116
|
+
this.inFlightScan = run;
|
|
117
|
+
return run;
|
|
118
|
+
}
|
|
119
|
+
async scanUncoalesced() {
|
|
101
120
|
const directory = join(this.root, 'events');
|
|
102
121
|
let files;
|
|
103
122
|
try {
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Never resolves, and never lets the process exit either. The supervised
|
|
3
|
+
* child is spawned detached and unref'd (see spawnDetached), so an
|
|
4
|
+
* unresolved Promise alone is not enough here — a Promise executor registers
|
|
5
|
+
* no libuv handle, and once other pending I/O quiets down Node treats the
|
|
6
|
+
* still-pending top-level await as unsettled and exits anyway. A ref'd
|
|
7
|
+
* timer is a real handle, so it keeps the process alive for as long as this
|
|
8
|
+
* Promise is meant to.
|
|
9
|
+
*/
|
|
10
|
+
export function waitForever() {
|
|
11
|
+
return new Promise(() => {
|
|
12
|
+
setInterval(() => { }, 1 << 30);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
1
15
|
/**
|
|
2
16
|
* Restarts `wake start` on every exit — a first-boot crash (e.g. missing
|
|
3
17
|
* sandbox auth) must not stop the retry loop, since the operator's only path
|