feat: parliament daemon, login gate, peer context sync (0.9.13)
Login claims the chair, writes a session ticket, and starts a background service for discovery plus revision-based context sync. Password Realm opens require --login (or CST_REALM_PASSWORD); --service/--service-stop manage the resident agent. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -44,6 +44,8 @@ int main(void) {
|
||||
assert(cst_parliament_load(&m) == 0);
|
||||
assert(!strcmp(m.chair_instance, "laptop-2"));
|
||||
|
||||
assert(cst_parliament_session_ok(NULL, 0));
|
||||
|
||||
assert(cst_parliament_new_project("proj-b") == 0);
|
||||
char *ctx = cst_parliament_context_get();
|
||||
assert(ctx && ctx[0] == 0);
|
||||
@@ -51,6 +53,16 @@ int main(void) {
|
||||
assert(cst_parliament_load(&m) == 0);
|
||||
assert(!strcmp(m.project_id, "proj-b"));
|
||||
assert(m.chair_instance[0] == 0);
|
||||
assert(!cst_parliament_session_ok(NULL, 0));
|
||||
|
||||
assert(cst_parliament_apply_sync(9, "parl-x", "proj-c", "chair-z",
|
||||
"synced-body") == 0);
|
||||
ctx = cst_parliament_context_get();
|
||||
assert(ctx && strstr(ctx, "synced-body"));
|
||||
free(ctx);
|
||||
assert(cst_parliament_load(&m) == 0);
|
||||
assert(m.revision == 9);
|
||||
assert(!strcmp(m.chair_instance, "chair-z"));
|
||||
|
||||
test_rmrf(dir);
|
||||
puts("test_parliament: OK");
|
||||
|
||||
Reference in New Issue
Block a user