@adecore/agents 0.25.5 → 0.25.6
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/tasks/task-store.js
CHANGED
|
@@ -143,10 +143,14 @@ export class TaskStore {
|
|
|
143
143
|
const ids = this.ofParent(parentId).flatMap((task) => (task.status === 'open' && task.batchId !== undefined ? [task.batchId] : []));
|
|
144
144
|
return [...new Set(ids)];
|
|
145
145
|
}
|
|
146
|
-
/*
|
|
146
|
+
/*
|
|
147
|
+
* A parent nobody can wake any more: its settled tasks stop waiting for it. Each record is read again
|
|
148
|
+
* just before its write, since a task may settle while an earlier write of this loop waits.
|
|
149
|
+
*/
|
|
147
150
|
async dropWake(parentId) {
|
|
148
|
-
for (const
|
|
149
|
-
|
|
151
|
+
for (const { id } of this.ofParent(parentId)) {
|
|
152
|
+
const task = this.tasks.get(id);
|
|
153
|
+
if (task && task.wake === 'pending') {
|
|
150
154
|
await this.write({ ...task, wake: 'none' });
|
|
151
155
|
}
|
|
152
156
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agents",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.6",
|
|
4
4
|
"description": "Node-compatible agent chat hosts, providers, accounts, usage and durable task coordination.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"test": "bun --conditions=source test"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@adecore/agent-contracts": "0.25.
|
|
85
|
-
"@adecore/intelligent-ui": "0.25.
|
|
84
|
+
"@adecore/agent-contracts": "0.25.6",
|
|
85
|
+
"@adecore/intelligent-ui": "0.25.6",
|
|
86
86
|
"zod": "^4.6.5"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
package/src/tasks/task-store.ts
CHANGED
|
@@ -187,10 +187,14 @@ export class TaskStore {
|
|
|
187
187
|
return [...new Set(ids)];
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
/*
|
|
190
|
+
/*
|
|
191
|
+
* A parent nobody can wake any more: its settled tasks stop waiting for it. Each record is read again
|
|
192
|
+
* just before its write, since a task may settle while an earlier write of this loop waits.
|
|
193
|
+
*/
|
|
191
194
|
async dropWake(parentId: string): Promise<void> {
|
|
192
|
-
for (const
|
|
193
|
-
|
|
195
|
+
for (const { id } of this.ofParent(parentId)) {
|
|
196
|
+
const task = this.tasks.get(id);
|
|
197
|
+
if (task && task.wake === 'pending') {
|
|
194
198
|
await this.write({ ...task, wake: 'none' });
|
|
195
199
|
}
|
|
196
200
|
}
|