From ca8c9e3ba0525d5c38cb66d7580305d072d7af05 Mon Sep 17 00:00:00 2001 From: dr-frmr Date: Thu, 19 Dec 2024 15:42:46 -0500 Subject: [PATCH] WIT cleanups --- kinode/packages/chess/api/chess:sys-v0.wit | 1 - .../packages/contacts/api/contacts:sys-v0.wit | 26 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/kinode/packages/chess/api/chess:sys-v0.wit b/kinode/packages/chess/api/chess:sys-v0.wit index bbf93504..742c60b8 100644 --- a/kinode/packages/chess/api/chess:sys-v0.wit +++ b/kinode/packages/chess/api/chess:sys-v0.wit @@ -1,7 +1,6 @@ interface chess { /// Our "chess protocol" request/response format. We'll always serialize these /// to a byte vector and send them over IPC. - variant request { /// lazy-load-blob: none. new-game(new-game-request), diff --git a/kinode/packages/contacts/api/contacts:sys-v0.wit b/kinode/packages/contacts/api/contacts:sys-v0.wit index 76e36e30..ef64744b 100644 --- a/kinode/packages/contacts/api/contacts:sys-v0.wit +++ b/kinode/packages/contacts/api/contacts:sys-v0.wit @@ -7,24 +7,29 @@ interface contacts { } variant request { + /// requires ReadNameOnly capability /// lazy-load-blob: none. - get-names, // requires read-names-only + get-names, + /// requires Read capability /// lazy-load-blob: none. - get-all-contacts, // requires read + get-all-contacts, + /// requires Read capability /// lazy-load-blob: none. - get-contact(string), // requires read + get-contact(string), + /// requires Add capability + /// lazy-load-blob: none. + add-contact(string), + /// requires Add capability /// lazy-load-blob: none. - add-contact(string), // requires add /// tuple - /// + add-field(tuple), + /// requires Remove capability /// lazy-load-blob: none. - add-field(tuple), // requires add + remove-contact(string), + /// requires Remove capability /// lazy-load-blob: none. - remove-contact(string), // requires remove /// tuple - /// - /// lazy-load-blob: none. - remove-field(tuple), // requires remove + remove-field(tuple), } variant response { @@ -43,7 +48,6 @@ interface contacts { /// lazy-load-blob: none. remove-field, /// any failed request will receive this response - /// /// lazy-load-blob: none. err(string), }