feat: parliament seat collaboration loop (0.9.19)

Seats publish via parliament_note, sync pushes on write, member join without
stealing the chair, and worker tools are hard-gated when parliament is active.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
WHC
2026-10-29 11:29:38 +08:00
co-authored by Cursor
parent 1605d74f17
commit 812e3ee265
15 changed files with 532 additions and 83 deletions
+5 -1
View File
@@ -281,7 +281,9 @@ int cst_parliament_daemon_run(const char *password, const char *instance_id,
sync_on_session(&sess);
cst_peer_close(&sess);
}
if (++tick % 10 == 0 && disc) {
int push = cst_parliament_sync_pending();
tick++;
if ((push || tick % 10 == 0) && disc) {
cst_peer_info_t peers[16];
int n = cst_discover_peers(disc, peers, 16);
for (int i = 0; i < n; i++) {
@@ -293,6 +295,8 @@ int cst_parliament_daemon_run(const char *password, const char *instance_id,
cst_peer_close(&sess);
}
}
if (push)
cst_parliament_sync_ack();
}
sleep_ms(200);
}