@chatpanel/events 0.83.0 → 0.83.1
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/package.json +1 -1
- package/team-run.js +9 -0
- package/team-trail.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/events",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.1",
|
|
4
4
|
"description": "The canonical ChatPanel event-log and capability contracts \u2014 typed durable facts, clock-free deterministic linearization, schema upcasting, and the invariants the replay harness asserts. Pure, dependency-free ESM shared by the ChatPanel extension, gateway and bridge.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
package/team-run.js
CHANGED
|
@@ -239,6 +239,15 @@ export async function runTeam({
|
|
|
239
239
|
// once, the run merged nothing, and the caller ran the team again. It is treated
|
|
240
240
|
// like an unavailable model, so the next one on the roster gets the task.
|
|
241
241
|
if (res?.ok && String(res?.text || '').trim()) { text = String(res.text); break; }
|
|
242
|
+
// A member that wrote on the board and then ran out of turn has still answered:
|
|
243
|
+
// what it posted in its own thread during this attempt is its answer. A relayed
|
|
244
|
+
// agent that posted its assessment and kept searching past the cap was being
|
|
245
|
+
// failed for the searching.
|
|
246
|
+
if (res?.ok) {
|
|
247
|
+
const th = board.threadForTask(task.id);
|
|
248
|
+
const mine = th ? board.posts(th.id).filter((p) => p.by === role.id && p.at >= t0 && ['note', 'draft', 'finding'].includes(p.kind)) : [];
|
|
249
|
+
if (mine.length) { text = mine.map((p) => p.text).join('\n\n'); say('task.note', { taskId: task.id, role: role.id, text: 'answered from its board posts' }); break; }
|
|
250
|
+
}
|
|
242
251
|
const err = res?.ok ? 'the model returned no answer' : (res?.error || 'the model did not answer');
|
|
243
252
|
if (attempt >= MAX_APPOINTMENTS || stopped() || !isModelUnavailable(err)) throw new Error(err);
|
|
244
253
|
exclude.add(m.model); runExclude.add(m.model); lastErr = err;
|
package/team-trail.js
CHANGED
|
@@ -35,6 +35,7 @@ export function teamLanes(prev, ev) {
|
|
|
35
35
|
case 'task.started': lanes.tasks[ev.taskId] = { ...(lanes.tasks[ev.taskId] || { id: ev.taskId, role: ev.role, title: ev.title }), status: 'running' }; break;
|
|
36
36
|
case 'task.delta': if (lanes.tasks[ev.taskId]) lanes.tasks[ev.taskId] = { ...lanes.tasks[ev.taskId], text: ev.text }; break;
|
|
37
37
|
case 'task.finding': lanes.findings += 1; if (lanes.tasks[ev.taskId]) lanes.tasks[ev.taskId] = { ...lanes.tasks[ev.taskId], findings: (lanes.tasks[ev.taskId].findings || 0) + 1 }; break;
|
|
38
|
+
case 'task.note': return { type: 'status', text: `${role}: ${ev.text}` };
|
|
38
39
|
case 'task.model': if (lanes.tasks[ev.taskId]) lanes.tasks[ev.taskId] = { ...lanes.tasks[ev.taskId], model: ev.model }; break;
|
|
39
40
|
case 'task.tool': if (lanes.tasks[ev.taskId]) lanes.tasks[ev.taskId] = { ...lanes.tasks[ev.taskId], tools: (lanes.tasks[ev.taskId].tools || 0) + 1, lastTool: ev.text ? `${ev.name} ${ev.text}` : ev.name }; break;
|
|
40
41
|
case 'run.usage': lanes.usage = ev.usage; break;
|