ai_co_discuss 0.2.69 → 0.2.70
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/.agents/skills/discuss-participant/references/free.md +1 -1
- package/backend/free_room.py +163 -19
- package/backend/schema.sql +12 -1
- package/backend/server.py +19 -3
- package/docs/architecture.md +279 -277
- package/docs/cli.md +197 -196
- package/docs/workflow.md +5 -3
- package/package.json +1 -1
- package/runner/discuss.py +1001 -991
- package/runner/discussion_adapters.mjs +11 -4
- package/runner/free_runner.mjs +1 -1
- package/web/app.js +3382 -3370
- package/web/modern.css +1 -1
- package/web/modern.js +1623 -1417
|
@@ -253,6 +253,15 @@ export function kill_process_tree(child, plain_kill, platform = process.platform
|
|
|
253
253
|
return plain_kill();
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
/** Make a delivered process's kill end its whole tree on Windows, so a stopped turn leaves no tool commands running. */
|
|
257
|
+
function tree_killable(child) {
|
|
258
|
+
if (typeof child.kill === 'function') {
|
|
259
|
+
const plain_kill = child.kill.bind(child);
|
|
260
|
+
child.kill = () => kill_process_tree(child, plain_kill);
|
|
261
|
+
}
|
|
262
|
+
return child;
|
|
263
|
+
}
|
|
264
|
+
|
|
256
265
|
async function claude_delivery(config, binding, task, spawn_process = spawn) {
|
|
257
266
|
const session_id = binding.session_id || randomUUID();
|
|
258
267
|
try { bind_access(task.access_path, session_id); }
|
|
@@ -266,10 +275,7 @@ async function claude_delivery(config, binding, task, spawn_process = spawn) {
|
|
|
266
275
|
env: { ...standalone_claude_env(), DISCUSS_ACCESS_FILE: task.access_path },
|
|
267
276
|
});
|
|
268
277
|
} catch (error) { throw not_sent(error); }
|
|
269
|
-
|
|
270
|
-
const plain_kill = child.kill.bind(child);
|
|
271
|
-
child.kill = () => kill_process_tree(child, plain_kill);
|
|
272
|
-
}
|
|
278
|
+
tree_killable(child);
|
|
273
279
|
let spawned = false;
|
|
274
280
|
const log_path = resolve(task.directory, `claude-${task.id}.log`);
|
|
275
281
|
let output = '';
|
|
@@ -497,6 +503,7 @@ async function cli_delivery(config, binding, task, spawn_process, user_home) {
|
|
|
497
503
|
env: { ...process.env, DISCUSS_ACCESS_FILE: task.access_path },
|
|
498
504
|
});
|
|
499
505
|
} catch (error) { throw not_sent(error); }
|
|
506
|
+
tree_killable(child);
|
|
500
507
|
const state = monitor_cli(child, config, binding, task);
|
|
501
508
|
task.on_process(child);
|
|
502
509
|
await new Promise((resolve_spawn, reject) => {
|
package/runner/free_runner.mjs
CHANGED
|
@@ -164,7 +164,7 @@ export class FreeRoomRunner {
|
|
|
164
164
|
async tick() {
|
|
165
165
|
const inbox = await api(this.config, '/inbox');
|
|
166
166
|
const room = await api(this.config, '');
|
|
167
|
-
// Smart scheduling runs beside delivery: the host
|
|
167
|
+
// Smart scheduling runs beside delivery: the host waits for its answer (or failure) before starting, see `routing`.
|
|
168
168
|
if (this.config.scheduler && !inbox.archived) this.recommend_unnamed(inbox, room);
|
|
169
169
|
this.room_title = room.title;
|
|
170
170
|
const active = new Map(inbox.executions.map(item => [item.id, item]));
|