diff --git a/go/seatlist/bootstrap/mesh-watchdogs.json b/go/seatlist/bootstrap/mesh-watchdogs.json index 35a4341..1efe7a8 100644 --- a/go/seatlist/bootstrap/mesh-watchdogs.json +++ b/go/seatlist/bootstrap/mesh-watchdogs.json @@ -43,7 +43,7 @@ }, { "name": "presence", - "description": "Every machine and tool runner the watchman sees connected, with its last word, and those it says silent; a machine that said it sleeps is shown as sleeping, not silent.", + "description": "Every machine and tool runner the watchman sees connected, with its last word, and those it says silent; a machine that said it sleeps is shown as sleeping, not silent. With machine, that machine's presence alone: whether the watchman hears it and since when.", "input": { "properties": { "machine": { @@ -55,7 +55,54 @@ }, "answer": { "type": "object", - "description": "who is connected and who is silent" + "description": "with machine, that machine: online and since; without, every key of the state presence", + "properties": { + "machine": { + "type": "string", + "description": "the machine asked, with machine" + }, + "online": { + "type": "boolean", + "description": "with machine: whether the watchman hears the machine now; false for a machine it holds no word of" + }, + "since": { + "type": "string", + "description": "with machine: when its presence last changed, RFC 3339; empty for a machine the watchman holds no word of" + }, + "state": { + "type": "string", + "description": "without machine: the state read, presence" + }, + "holds": { + "type": "integer", + "description": "without machine: how many keys the state holds" + }, + "keys": { + "type": "array", + "description": "without machine: each key of the state presence, or part.., with its value", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": " or part.." + }, + "value": { + "type": "object", + "description": "the key's value, online and its layout's version" + }, + "revision": { + "type": "integer", + "description": "the key's revision" + } + }, + "required": [ + "key", + "value" + ] + } + } + } } }, { diff --git a/go/seatlist/bootstrap/operator-channel.json b/go/seatlist/bootstrap/operator-channel.json index 3f33532..2043c1d 100644 --- a/go/seatlist/bootstrap/operator-channel.json +++ b/go/seatlist/bootstrap/operator-channel.json @@ -116,15 +116,65 @@ }, { "name": "asks", - "description": "The asks the router holds: open first, then the last month's, each with how it ended.", + "description": "The asks the router holds: open first, then the last month's, each with how it ended. With no argument only the open asks, within its default bound; key for one ask, state, since and bound narrow or widen it, and the answer says what it cut.", "input": { "type": "object", - "properties": {}, - "description": "no arguments" + "properties": { + "key": { + "type": "string", + "description": "one ask, by its key (.); none for the open asks" + }, + "state": { + "type": "string", + "description": "open (open and held), ended or all; none is open when no key or since is given, else all" + }, + "since": { + "type": "string", + "description": "only the asks opened at or after this time, RFC 3339" + }, + "bound": { + "type": "integer", + "description": "the most bytes of the asks in the answer; said when it cuts the answer short" + } + } }, "answer": { "type": "object", - "description": "the asks" + "description": "the asks, open first", + "properties": { + "asks": { + "type": "array", + "description": "each ask the router holds, as its state asks holds it", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "." + }, + "state": { + "type": "string", + "description": "how the ask stands: open, held, or how it ended (answered, expired, cancelled)" + } + }, + "required": [ + "key", + "state" + ] + } + }, + "cut": { + "type": "string", + "description": "what the bound cut, and how to ask for more; empty when nothing was cut" + }, + "matched": { + "type": "integer", + "description": "how many asks the arguments matched" + } + }, + "required": [ + "asks" + ] } } ], diff --git a/go/seatlist/seatlisttest/seats/mesh-watchdogs.json b/go/seatlist/seatlisttest/seats/mesh-watchdogs.json index 35a4341..1efe7a8 100644 --- a/go/seatlist/seatlisttest/seats/mesh-watchdogs.json +++ b/go/seatlist/seatlisttest/seats/mesh-watchdogs.json @@ -43,7 +43,7 @@ }, { "name": "presence", - "description": "Every machine and tool runner the watchman sees connected, with its last word, and those it says silent; a machine that said it sleeps is shown as sleeping, not silent.", + "description": "Every machine and tool runner the watchman sees connected, with its last word, and those it says silent; a machine that said it sleeps is shown as sleeping, not silent. With machine, that machine's presence alone: whether the watchman hears it and since when.", "input": { "properties": { "machine": { @@ -55,7 +55,54 @@ }, "answer": { "type": "object", - "description": "who is connected and who is silent" + "description": "with machine, that machine: online and since; without, every key of the state presence", + "properties": { + "machine": { + "type": "string", + "description": "the machine asked, with machine" + }, + "online": { + "type": "boolean", + "description": "with machine: whether the watchman hears the machine now; false for a machine it holds no word of" + }, + "since": { + "type": "string", + "description": "with machine: when its presence last changed, RFC 3339; empty for a machine the watchman holds no word of" + }, + "state": { + "type": "string", + "description": "without machine: the state read, presence" + }, + "holds": { + "type": "integer", + "description": "without machine: how many keys the state holds" + }, + "keys": { + "type": "array", + "description": "without machine: each key of the state presence, or part.., with its value", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": " or part.." + }, + "value": { + "type": "object", + "description": "the key's value, online and its layout's version" + }, + "revision": { + "type": "integer", + "description": "the key's revision" + } + }, + "required": [ + "key", + "value" + ] + } + } + } } }, { diff --git a/go/seatlist/seatlisttest/seats/operator-channel.json b/go/seatlist/seatlisttest/seats/operator-channel.json index 3f33532..2043c1d 100644 --- a/go/seatlist/seatlisttest/seats/operator-channel.json +++ b/go/seatlist/seatlisttest/seats/operator-channel.json @@ -116,15 +116,65 @@ }, { "name": "asks", - "description": "The asks the router holds: open first, then the last month's, each with how it ended.", + "description": "The asks the router holds: open first, then the last month's, each with how it ended. With no argument only the open asks, within its default bound; key for one ask, state, since and bound narrow or widen it, and the answer says what it cut.", "input": { "type": "object", - "properties": {}, - "description": "no arguments" + "properties": { + "key": { + "type": "string", + "description": "one ask, by its key (.); none for the open asks" + }, + "state": { + "type": "string", + "description": "open (open and held), ended or all; none is open when no key or since is given, else all" + }, + "since": { + "type": "string", + "description": "only the asks opened at or after this time, RFC 3339" + }, + "bound": { + "type": "integer", + "description": "the most bytes of the asks in the answer; said when it cuts the answer short" + } + } }, "answer": { "type": "object", - "description": "the asks" + "description": "the asks, open first", + "properties": { + "asks": { + "type": "array", + "description": "each ask the router holds, as its state asks holds it", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "." + }, + "state": { + "type": "string", + "description": "how the ask stands: open, held, or how it ended (answered, expired, cancelled)" + } + }, + "required": [ + "key", + "state" + ] + } + }, + "cut": { + "type": "string", + "description": "what the bound cut, and how to ask for more; empty when nothing was cut" + }, + "matched": { + "type": "integer", + "description": "how many asks the arguments matched" + } + }, + "required": [ + "asks" + ] } } ], diff --git a/go/testdata/beside/CAPTURED b/go/testdata/beside/CAPTURED index 7a281f0..1d2bfe7 100644 --- a/go/testdata/beside/CAPTURED +++ b/go/testdata/beside/CAPTURED @@ -12,6 +12,7 @@ repositories; before that it was mesh-controller's copy, which still held two mo mesh-catalog b5dbfbb784507e211372a7c9640d91f7d6dadd84 modules/*/module.json, modules/*/files/**, modules/*/templates/**, predefined.json mesh-contracts 70fe186d7f5743e61f3ce2bbd97a8bfabc5b596e the seat files of the eight bootstrapped seats held there (seats/, health-and-repair/seats/, operator-and-conversation/seats/), as seat.json.captured +mesh-contracts bb16f99e2d5e854bb8f6552ce4b256e7c10e8ea0 of those, health-and-repair/seats/mesh-watchdogs and operator-and-conversation/seats/operator-channel (issue 1966) mesh-delivery 932e7ccf025513ec4fce38a534c2c38defbc6701 contracts/seats/mesh-catalog and mesh-delivery-checker, as seat.json.captured (go/seatlist's bootstrap test) mesh-host cdcba9ca73755854d21e4e657d7e46c32b9b5265 internal/apply/placement_guard.go diff --git a/go/testdata/beside/mesh-contracts/health-and-repair/seats/mesh-watchdogs/seat.json.captured b/go/testdata/beside/mesh-contracts/health-and-repair/seats/mesh-watchdogs/seat.json.captured index 35a4341..1efe7a8 100644 --- a/go/testdata/beside/mesh-contracts/health-and-repair/seats/mesh-watchdogs/seat.json.captured +++ b/go/testdata/beside/mesh-contracts/health-and-repair/seats/mesh-watchdogs/seat.json.captured @@ -43,7 +43,7 @@ }, { "name": "presence", - "description": "Every machine and tool runner the watchman sees connected, with its last word, and those it says silent; a machine that said it sleeps is shown as sleeping, not silent.", + "description": "Every machine and tool runner the watchman sees connected, with its last word, and those it says silent; a machine that said it sleeps is shown as sleeping, not silent. With machine, that machine's presence alone: whether the watchman hears it and since when.", "input": { "properties": { "machine": { @@ -55,7 +55,54 @@ }, "answer": { "type": "object", - "description": "who is connected and who is silent" + "description": "with machine, that machine: online and since; without, every key of the state presence", + "properties": { + "machine": { + "type": "string", + "description": "the machine asked, with machine" + }, + "online": { + "type": "boolean", + "description": "with machine: whether the watchman hears the machine now; false for a machine it holds no word of" + }, + "since": { + "type": "string", + "description": "with machine: when its presence last changed, RFC 3339; empty for a machine the watchman holds no word of" + }, + "state": { + "type": "string", + "description": "without machine: the state read, presence" + }, + "holds": { + "type": "integer", + "description": "without machine: how many keys the state holds" + }, + "keys": { + "type": "array", + "description": "without machine: each key of the state presence, or part.., with its value", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": " or part.." + }, + "value": { + "type": "object", + "description": "the key's value, online and its layout's version" + }, + "revision": { + "type": "integer", + "description": "the key's revision" + } + }, + "required": [ + "key", + "value" + ] + } + } + } } }, { diff --git a/go/testdata/beside/mesh-contracts/operator-and-conversation/seats/operator-channel/seat.json.captured b/go/testdata/beside/mesh-contracts/operator-and-conversation/seats/operator-channel/seat.json.captured index 3f33532..2043c1d 100644 --- a/go/testdata/beside/mesh-contracts/operator-and-conversation/seats/operator-channel/seat.json.captured +++ b/go/testdata/beside/mesh-contracts/operator-and-conversation/seats/operator-channel/seat.json.captured @@ -116,15 +116,65 @@ }, { "name": "asks", - "description": "The asks the router holds: open first, then the last month's, each with how it ended.", + "description": "The asks the router holds: open first, then the last month's, each with how it ended. With no argument only the open asks, within its default bound; key for one ask, state, since and bound narrow or widen it, and the answer says what it cut.", "input": { "type": "object", - "properties": {}, - "description": "no arguments" + "properties": { + "key": { + "type": "string", + "description": "one ask, by its key (.); none for the open asks" + }, + "state": { + "type": "string", + "description": "open (open and held), ended or all; none is open when no key or since is given, else all" + }, + "since": { + "type": "string", + "description": "only the asks opened at or after this time, RFC 3339" + }, + "bound": { + "type": "integer", + "description": "the most bytes of the asks in the answer; said when it cuts the answer short" + } + } }, "answer": { "type": "object", - "description": "the asks" + "description": "the asks, open first", + "properties": { + "asks": { + "type": "array", + "description": "each ask the router holds, as its state asks holds it", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "." + }, + "state": { + "type": "string", + "description": "how the ask stands: open, held, or how it ended (answered, expired, cancelled)" + } + }, + "required": [ + "key", + "state" + ] + } + }, + "cut": { + "type": "string", + "description": "what the bound cut, and how to ask for more; empty when nothing was cut" + }, + "matched": { + "type": "integer", + "description": "how many asks the arguments matched" + } + }, + "required": [ + "asks" + ] } } ],