@atolis-hq/wake 0.3.67 → 0.3.68

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 = "g4f11fc5";
111
+ export const wakeVersion = "gdf02688";
@@ -17,10 +17,16 @@ export class RunRepository {
17
17
  return events.map(decodeRunExecutionEvent);
18
18
  }
19
19
  async list(activationId) {
20
- const ids = new Set((await this.journal.readAll(0))
21
- .filter((event) => isRunStream(event.stream))
22
- .map((event) => runId(event.stream.id)));
23
- const runs = (await Promise.all([...ids].map(async (id) => (await this.load(id)).view))).filter((run) => run !== null);
20
+ const grouped = new Map();
21
+ for (const event of await this.journal.readAll(0)) {
22
+ if (!isRunStream(event.stream))
23
+ continue;
24
+ const id = runId(event.stream.id);
25
+ const events = grouped.get(id) ?? [];
26
+ events.push(decodeRunExecutionEvent(event));
27
+ grouped.set(id, events);
28
+ }
29
+ const runs = (await Promise.all([...grouped.values()].map(foldRun))).filter((run) => run !== null);
24
30
  return activationId === undefined
25
31
  ? runs
26
32
  : runs.filter((run) => run.activationId === activationId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.3.67",
3
+ "version": "0.3.68",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {