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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user