Milestone 47 G: mesh-sdk's part of the one release #189

Merged
mesh-tools merged 166 commits from feat/47-G-join11 into main 2026-11-13 10:00:28 +00:00
2 changed files with 8 additions and 0 deletions
Showing only changes of commit effdc0936e - Show all commits
+5
View File
@@ -221,6 +221,9 @@ type Verb struct {
// NeedsApproval marks the verb for every holder: the operator approves a call of it first (design 46 *The approval
// mark* §2).
NeedsApproval bool `json:"needs-approval,omitempty"`
// ByCaller says the holder's process answers the verb itself and tells callers apart by the account the bus proved
// (design 47 G §554, §621, §656).
ByCaller bool `json:"by-caller,omitempty"`
}
// The streams an accepted kind may ride (design 47 G §415).
@@ -407,6 +410,8 @@ type State struct {
History int `json:"history,omitempty"`
MaxAgeDays int `json:"max-age-days,omitempty"`
Description string `json:"description,omitempty"`
// View is true when the seat offers the state as a view for a module to follow by `consumes` (design 47 G §699).
View bool `json:"view,omitempty"`
}
// KeyForm is one form a state's key takes: a pattern of named parts (`<asker>.<id>`, a part between angle brackets,
+3
View File
@@ -86,6 +86,9 @@ func TestADefinitionIsReadStrictlyNamingWhatIsWrong(t *testing.T) {
`"domain":"Core","decision":"ADR 1","records":[{"name":"asks"}],`, 1), "records: a field the format does not know"},
{"a state with a key form and a value", withState(whole, `{"name":"asks","template":"state","writer":"caller",
"history":3,"key-forms":[{"key":"<asker>.<id>","value":{"type":"object"}}]}`), ""},
{"a state offered as a view (design 47 G 699)", withState(whole, `{"name":"asks","template":"state","view":true,
"key-forms":[{"key":"<id>","value":{"type":"object"}}]}`), ""},
{"a verb answered by the holder's process by caller (design 47 G 656)", strings.Replace(whole, `"name":"list",`, `"name":"list","by-caller":true,`, 1), ""},
{"a stream state with an age", withState(whole, `{"name":"placement","template":"events","max-age-days":7,
"key-forms":[{"key":"changed.<node>","value":{"type":"object"}}]}`), ""},
{"a state of an unknown template", withState(whole, `{"name":"asks","template":"bucket",