From d36511022f895d41951b57dbf1128f8224582a8b Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 27 Nov 2026 02:55:53 +0100 Subject: [PATCH] DC1b owed-verbs: mesh-wants gains the verbs owed, owed-say and owed-drop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit owed (read, no request fields) answers every owed event with its id, first-owed, tries and next; owed-say (an id) answers the event said; owed-drop (an id and a why) answers the events dropped. The new def OwedEvent carries id, first-owed, tries and next. Form stays 4. Regenerated Go and TypeScript contract; verb fixture rows. Builds: design 47 H2b §832 6., H-A-847 --- .../go/seats/meshwants/contract.go | 93 +++++++++++++- .../go/seats/meshwants/contract_test.go | 12 ++ .../seats/mesh-wants/fixtures/verbs.json | 60 +++++++++ .../seats/mesh-wants/seat.json | 119 ++++++++++++++++++ .../ts/seats/meshwants/index.d.ts | 56 +++++++++ .../ts/seats/meshwants/index.js | 3 + 6 files changed, 341 insertions(+), 2 deletions(-) diff --git a/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go b/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go index 5eb2ff978..dc3ce05af 100644 --- a/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go +++ b/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go @@ -20,7 +20,7 @@ const Form = 4 // whose fields changed while its forms did not (design 47 H2 §780). const ( generatedForms = "4" - generatedFieldsDigest = "Ask=6cb8b82e2fbe AskTakenEvent=6d5d3da7ac39 AsksByAssignmentsProposalValue=0bb5682c7b3b AsksByBackupNodeModuleFingerprintValue=0bb5682c7b3b AsksByHoldModuleFingerprintValue=0bb5682c7b3b AsksByOutsideNodeModuleFingerprintValue=0bb5682c7b3b AsksByRecordNodeModuleDigestValue=0bb5682c7b3b AsksByRestoreNodeModuleFingerprintValue=0bb5682c7b3b AsksByRevertNodeModuleFingerprintValue=0bb5682c7b3b AssignmentEntry=7d2549782eb2 AssignmentRevision=72c8701f7314 AssignmentRevisionCapabilitiesItem=0c89b0717762 AssignmentRevisionEvent=7faff968ce44 AssignmentRevisionsByCandidateGroupHeadsValue=8553b390118d AssignmentRevisionsByEntryDigestValue=4e5ee7a23e5b AssignmentRevisionsByTrunkRevisionValue=8553b390118d BusAnswer=7538f2f5e68e CatalogOf=7a4646fdbea7 Change=28d1f3c5cd32 ChangeAfterItem=30d718c21581 CompositionReader=5a943c1f8ef1 CompositionRun=2a08fc65e2d0 CompositionRunProgram=5a1202df3497 CompositionRunWaits=9cd147ddfc06 CompositionsAnswer=f8bca93c7f9c CompositionsByGroupHeadsValue=9428965fab8f CompositionsDropAnswer=52803700282a Difference=4011cff516b1 DifferenceAnswer=629237aa39f0 DifferenceEvent=49066d0dff6d DifferenceRefusedItem=0e9caa83ace7 DifferencesByNodeModuleValue=a22487ffadfd DropAnswer=7538f2f5e68e Edge=a71709025a08 EntryAnswer=05adebad70d6 Fill=80f442916429 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 Held=15abbd6a1a33 HeldCandidate=04872f6afbfa InputAnswer=cd41ee65565d KeepNowAnswer=9962ab9fc051 NodeEntryRef=3888ae847653 NotRunning=279b628db0ec PipelineWanted=e1e379c21e59 PipelineWantedEvent=59946b31ab7d PolicyChangedEvent=7538f2f5e68e RevisionAnswer=39002c770cbd RoomEvent=5bd4df78ed84 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 StepAccept=18efeefb6c34 StepEnded=edd08ab1a18b StepEndedEvent=207787118dac StepProgressEvent=8215e490ea8d StepRun=b975f402601a UpgradeAnswer=7538f2f5e68e ValidateAnswer=484ec1cfda14 ValidateAnswerProblemsItem=728518b4dc83 Wait=951500be820c WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 WantedEvent=fba5f15bf46d WantsByHeldModuleFingerprintValue=ff14aa998a5d WantsByWantNodeModuleValue=ab7c6799fd5d WantsByWantNodeNodeValue=a737a2108d53" + generatedFieldsDigest = "Ask=6cb8b82e2fbe AskTakenEvent=6d5d3da7ac39 AsksByAssignmentsProposalValue=0bb5682c7b3b AsksByBackupNodeModuleFingerprintValue=0bb5682c7b3b AsksByHoldModuleFingerprintValue=0bb5682c7b3b AsksByOutsideNodeModuleFingerprintValue=0bb5682c7b3b AsksByRecordNodeModuleDigestValue=0bb5682c7b3b AsksByRestoreNodeModuleFingerprintValue=0bb5682c7b3b AsksByRevertNodeModuleFingerprintValue=0bb5682c7b3b AssignmentEntry=7d2549782eb2 AssignmentRevision=72c8701f7314 AssignmentRevisionCapabilitiesItem=0c89b0717762 AssignmentRevisionEvent=7faff968ce44 AssignmentRevisionsByCandidateGroupHeadsValue=8553b390118d AssignmentRevisionsByEntryDigestValue=4e5ee7a23e5b AssignmentRevisionsByTrunkRevisionValue=8553b390118d BusAnswer=7538f2f5e68e CatalogOf=7a4646fdbea7 Change=28d1f3c5cd32 ChangeAfterItem=30d718c21581 CompositionReader=5a943c1f8ef1 CompositionRun=2a08fc65e2d0 CompositionRunProgram=5a1202df3497 CompositionRunWaits=9cd147ddfc06 CompositionsAnswer=f8bca93c7f9c CompositionsByGroupHeadsValue=9428965fab8f CompositionsDropAnswer=52803700282a Difference=4011cff516b1 DifferenceAnswer=629237aa39f0 DifferenceEvent=49066d0dff6d DifferenceRefusedItem=0e9caa83ace7 DifferencesByNodeModuleValue=a22487ffadfd DropAnswer=7538f2f5e68e Edge=a71709025a08 EntryAnswer=05adebad70d6 Fill=80f442916429 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 Held=15abbd6a1a33 HeldCandidate=04872f6afbfa InputAnswer=cd41ee65565d KeepNowAnswer=9962ab9fc051 NodeEntryRef=3888ae847653 NotRunning=279b628db0ec OwedAnswer=e77cff288ccc OwedDropAnswer=61c48a9eb982 OwedEvent=f03369beb6e7 OwedSayAnswer=958f6f7adf11 PipelineWanted=e1e379c21e59 PipelineWantedEvent=59946b31ab7d PolicyChangedEvent=7538f2f5e68e RevisionAnswer=39002c770cbd RoomEvent=5bd4df78ed84 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 StepAccept=18efeefb6c34 StepEnded=edd08ab1a18b StepEndedEvent=207787118dac StepProgressEvent=8215e490ea8d StepRun=b975f402601a UpgradeAnswer=7538f2f5e68e ValidateAnswer=484ec1cfda14 ValidateAnswerProblemsItem=728518b4dc83 Wait=951500be820c WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 WantedEvent=fba5f15bf46d WantsByHeldModuleFingerprintValue=ff14aa998a5d WantsByWantNodeModuleValue=ab7c6799fd5d WantsByWantNodeNodeValue=a737a2108d53" ) const ( @@ -35,6 +35,9 @@ const ( VerbValidate = "validate" VerbKeepNow = "keep-now" VerbDrop = "drop" + VerbOwed = "owed" + VerbOwedSay = "owed-say" + VerbOwedDrop = "owed-drop" ) const ( @@ -59,7 +62,7 @@ const ( // Verbs is every verb the seat serves, in its definition's order: a new copy each call. func Verbs() []string { - return []string{VerbUpgrade, VerbBus, VerbRevision, VerbEntry, VerbDifference, VerbInput, VerbCompositions, VerbCompositionsDrop, VerbValidate, VerbKeepNow, VerbDrop} + return []string{VerbUpgrade, VerbBus, VerbRevision, VerbEntry, VerbDifference, VerbInput, VerbCompositions, VerbCompositionsDrop, VerbValidate, VerbKeepNow, VerbDrop, VerbOwed, VerbOwedSay, VerbOwedDrop} } // VerbDescription is a verb's description as the seat's definition says it, "" for a verb the seat does not serve or @@ -88,6 +91,12 @@ func VerbDescription(verb string) string { return "Keep the assignment graph's revisions now, by hand (design 47 H2 §813 (2); H-A-417): written in the hand-act log first by the module's tool assigner_keep_now, then the keeping runs at once on the pass's newest computed revision; answers the revision kept, or the fault the keeping met." case VerbDrop: return "End an ask on the seat's work queue for a caller that no longer waits for it (its step ended by its bound): one waiting is ended dropped when it is pulled, one taken is cancelled; both end the step could-not-run, its why naming the drop and who asked it, so no holder works on it after (design 47 H2 §778; ADR 0664 §4)." + case VerbOwed: + return "Every event the assigner says on this seat that the bus refused or did not acknowledge and still owes (design 47 H2b §832 6.): its message id, when it was first owed, how many times it was said again and when it is said again next." + case VerbOwedSay: + return "Say the first owed event of one id's order now, its delay set back to the first pace (design 47 H2b §832 6.); the act is written in the hand-act log first." + case VerbOwedDrop: + return "Drop an owed event the bus will never take, with every event owed behind it in its order, doing for each what the bus taking it would have done, then clear its finding (design 47 H2b §832 6.); the act and why are written in the hand-act log first." } return "" } @@ -991,6 +1000,18 @@ type NotRunning struct { Module string `json:"module"` } +// OwedEvent is an event the assigner says on this seat that the bus refused or did not acknowledge, owed in order and said again under the same id (design 47 H2b section 832 1., 2.). +type OwedEvent struct { + // when the event was first owed + FirstOwed time.Time `json:"first-owed"` + // the event's message id, fixed when it was first owed + ID string `json:"id"` + // when it is said again + Next time.Time `json:"next"` + // how many times the assigner said it again + Tries int64 `json:"tries"` +} + // PipelineWanted is a pipeline's wants written to the end, said at most twice, tier-late then running: running when every tier's movers run on every present placing machine, tier-late when a tier passed tier-bound (design 47 H §751, H-A-56, H-A-72, H-A-75). type PipelineWanted struct { Branch string `json:"branch"` @@ -1373,6 +1394,47 @@ type DropInput struct { // DropAnswer is what drop answers. type DropAnswer = map[string]any +// OwedInput is what owed takes. +type OwedInput struct { +} + +// OwedAnswer is what owed answers. +type OwedAnswer struct { + Events []OwedEvent `json:"events"` + // is the form of what this value carries, left out while it is 1 (design 47 H2 §780). + Form int64 `json:"form,omitempty"` +} + +// OwedSayInput is what owed-say takes. +type OwedSayInput struct { + // the owed event's message id + ID string `json:"id"` +} + +// OwedSayAnswer is what owed-say answers. +type OwedSayAnswer struct { + // the event said + Event OwedEvent `json:"event"` + // is the form of what this value carries, left out while it is 1 (design 47 H2 §780). + Form int64 `json:"form,omitempty"` +} + +// OwedDropInput is what owed-drop takes. +type OwedDropInput struct { + // the owed event's message id + ID string `json:"id"` + // why, written with the caller the runtime proves in the hand-act log + Why string `json:"why"` +} + +// OwedDropAnswer is what owed-drop answers. +type OwedDropAnswer struct { + // the events dropped, the named one first + Dropped []OwedEvent `json:"dropped"` + // is the form of what this value carries, left out while it is 1 (design 47 H2 §780). + Form int64 `json:"form,omitempty"` +} + // StepAccept is the body of step. type StepAccept = StepRun @@ -1700,6 +1762,33 @@ func DecodeDropAnswer(raw []byte) (DropAnswer, int, error) { return v, formRead(raw), nil } +// DecodeOwedAnswer reads a OwedAnswer as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780). +func DecodeOwedAnswer(raw []byte) (OwedAnswer, int, error) { + var v OwedAnswer + if err := json.Unmarshal(raw, &v); err != nil { + return v, 0, err + } + return v, formRead(raw), nil +} + +// DecodeOwedSayAnswer reads a OwedSayAnswer as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780). +func DecodeOwedSayAnswer(raw []byte) (OwedSayAnswer, int, error) { + var v OwedSayAnswer + if err := json.Unmarshal(raw, &v); err != nil { + return v, 0, err + } + return v, formRead(raw), nil +} + +// DecodeOwedDropAnswer reads a OwedDropAnswer as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780). +func DecodeOwedDropAnswer(raw []byte) (OwedDropAnswer, int, error) { + var v OwedDropAnswer + if err := json.Unmarshal(raw, &v); err != nil { + return v, 0, err + } + return v, formRead(raw), nil +} + // DecodePolicyChangedEvent reads a PolicyChangedEvent as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780). func DecodePolicyChangedEvent(raw []byte) (PolicyChangedEvent, int, error) { var v PolicyChangedEvent diff --git a/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go b/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go index 48f3becc6..3297d93ca 100644 --- a/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go +++ b/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go @@ -171,6 +171,18 @@ func TestFixtures(t *testing.T) { decode: func(b []byte) (any, error) { var v ValidateAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, {name: "validate answers a run still running", subject: "", given: "{\"outcome\":\"running\",\"started\":\"2026-11-25T17:00:00Z\"}", wire: "{\"outcome\":\"running\",\"started\":\"2026-11-25T17:00:00Z\"}", decode: func(b []byte) (any, error) { var v ValidateAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, + {name: "owed asks every owed event", subject: "", given: "{}", wire: "{}", + decode: func(b []byte) (any, error) { var v OwedInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, + {name: "owed answers each owed event with its first-owed, tries and next", subject: "", given: "{\"events\":[{\"first-owed\":\"2026-11-27T10:00:05Z\",\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"next\":\"2026-11-27T10:00:13Z\",\"tries\":2}]}", wire: "{\"events\":[{\"first-owed\":\"2026-11-27T10:00:05Z\",\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"next\":\"2026-11-27T10:00:13Z\",\"tries\":2}]}", + decode: func(b []byte) (any, error) { var v OwedAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, + {name: "owed-say takes an id", subject: "", given: "{\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\"}", wire: "{\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\"}", + decode: func(b []byte) (any, error) { var v OwedSayInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, + {name: "owed-say answers the event said", subject: "", given: "{\"event\":{\"first-owed\":\"2026-11-27T10:00:05Z\",\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"next\":\"2026-11-27T10:00:13Z\",\"tries\":2}}", wire: "{\"event\":{\"first-owed\":\"2026-11-27T10:00:05Z\",\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"next\":\"2026-11-27T10:00:13Z\",\"tries\":2}}", + decode: func(b []byte) (any, error) { var v OwedSayAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, + {name: "owed-drop takes an id and why", subject: "", given: "{\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"why\":\"the bus will never take it\"}", wire: "{\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"why\":\"the bus will never take it\"}", + decode: func(b []byte) (any, error) { var v OwedDropInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, + {name: "owed-drop answers the events dropped", subject: "", given: "{\"dropped\":[{\"first-owed\":\"2026-11-27T10:00:05Z\",\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"next\":\"2026-11-27T10:00:13Z\",\"tries\":2}]}", wire: "{\"dropped\":[{\"first-owed\":\"2026-11-27T10:00:05Z\",\"id\":\"wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z\",\"next\":\"2026-11-27T10:00:13Z\",\"tries\":2}]}", + decode: func(b []byte) (any, error) { var v OwedDropAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, } for _, c := range cases { v, err := c.decode([]byte(c.given)) diff --git a/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json b/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json index 81a49b30f..90c0edf48 100644 --- a/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json +++ b/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json @@ -328,5 +328,65 @@ "outcome": "running", "started": "2026-11-25T17:00:00Z" } + }, + { + "name": "owed asks every owed event", + "of": "verb:owed.input", + "given": {} + }, + { + "name": "owed answers each owed event with its first-owed, tries and next", + "of": "verb:owed.answer", + "given": { + "events": [ + { + "id": "wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z", + "first-owed": "2026-11-27T10:00:05Z", + "tries": 2, + "next": "2026-11-27T10:00:13Z" + } + ] + } + }, + { + "name": "owed-say takes an id", + "of": "verb:owed-say.input", + "given": { + "id": "wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z" + } + }, + { + "name": "owed-say answers the event said", + "of": "verb:owed-say.answer", + "given": { + "event": { + "id": "wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z", + "first-owed": "2026-11-27T10:00:05Z", + "tries": 2, + "next": "2026-11-27T10:00:13Z" + } + } + }, + { + "name": "owed-drop takes an id and why", + "of": "verb:owed-drop.input", + "given": { + "id": "wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z", + "why": "the bus will never take it" + } + }, + { + "name": "owed-drop answers the events dropped", + "of": "verb:owed-drop.answer", + "given": { + "dropped": [ + { + "id": "wait-ended.n1.xclip.3b9f.ended.released.2026-11-27T10:00:00Z", + "first-owed": "2026-11-27T10:00:05Z", + "tries": 2, + "next": "2026-11-27T10:00:13Z" + } + ] + } } ] diff --git a/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json b/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json index 2b7b9d156..1d7bb0ccc 100644 --- a/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json +++ b/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json @@ -437,6 +437,95 @@ "description": "whether the ask was held here" }, "class": "act" + }, + { + "name": "owed", + "class": "read", + "description": "Every event the assigner says on this seat that the bus refused or did not acknowledge and still owes (design 47 H2b §832 6.): its message id, when it was first owed, how many times it was said again and when it is said again next.", + "input": { + "type": "object", + "properties": {} + }, + "answer": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/defs/OwedEvent" + } + } + }, + "required": [ + "events" + ] + } + }, + { + "name": "owed-say", + "class": "act", + "description": "Say the first owed event of one id's order now, its delay set back to the first pace (design 47 H2b §832 6.); the act is written in the hand-act log first.", + "input": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "the owed event's message id" + } + }, + "required": [ + "id" + ] + }, + "answer": { + "type": "object", + "properties": { + "event": { + "$ref": "#/defs/OwedEvent", + "description": "the event said" + } + }, + "required": [ + "event" + ] + } + }, + { + "name": "owed-drop", + "class": "act", + "description": "Drop an owed event the bus will never take, with every event owed behind it in its order, doing for each what the bus taking it would have done, then clear its finding (design 47 H2b §832 6.); the act and why are written in the hand-act log first.", + "input": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "the owed event's message id" + }, + "why": { + "type": "string", + "description": "why, written with the caller the runtime proves in the hand-act log" + } + }, + "required": [ + "id", + "why" + ] + }, + "answer": { + "type": "object", + "properties": { + "dropped": { + "type": "array", + "items": { + "$ref": "#/defs/OwedEvent" + }, + "description": "the events dropped, the named one first" + } + }, + "required": [ + "dropped" + ] + } } ], "accepts": [ @@ -2006,6 +2095,36 @@ "module", "machines" ] + }, + "OwedEvent": { + "type": "object", + "description": "an event the assigner says on this seat that the bus refused or did not acknowledge, owed in order and said again under the same id (design 47 H2b section 832 1., 2.)", + "properties": { + "id": { + "type": "string", + "description": "the event's message id, fixed when it was first owed" + }, + "first-owed": { + "type": "string", + "format": "date-time", + "description": "when the event was first owed" + }, + "tries": { + "type": "integer", + "description": "how many times the assigner said it again" + }, + "next": { + "type": "string", + "format": "date-time", + "description": "when it is said again" + } + }, + "required": [ + "id", + "first-owed", + "tries", + "next" + ] } }, "acts": [ diff --git a/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts b/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts index bf12e97a0..4172f61d7 100644 --- a/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts +++ b/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts @@ -16,6 +16,9 @@ export declare const verbs: { readonly validate: "validate"; readonly keepNow: "keep-now"; readonly drop: "drop"; + readonly owed: "owed"; + readonly owedSay: "owed-say"; + readonly owedDrop: "owed-drop"; }; export declare const accepts: { @@ -436,6 +439,18 @@ export interface NotRunning { "module": string; } +/** an event the assigner says on this seat that the bus refused or did not acknowledge, owed in order and said again under the same id (design 47 H2b section 832 1., 2.) */ +export interface OwedEvent { + /** when the event was first owed */ + "first-owed": string; + /** the event's message id, fixed when it was first owed */ + "id": string; + /** when it is said again */ + "next": string; + /** how many times the assigner said it again */ + "tries": number; +} + /** a pipeline's wants written to the end, said at most twice, tier-late then running: running when every tier's movers run on every present placing machine, tier-late when a tier passed tier-bound (design 47 H §751, H-A-56, H-A-72, H-A-75) */ export interface PipelineWanted { "branch": string; @@ -754,6 +769,47 @@ export interface DropInput { /** is what drop answers. */ export type DropAnswer = Record; +/** is what owed takes. */ +export interface OwedInput { +} + +/** is what owed answers. */ +export interface OwedAnswer { + "events": OwedEvent[]; + /** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */ + "form"?: number; +} + +/** is what owed-say takes. */ +export interface OwedSayInput { + /** the owed event's message id */ + "id": string; +} + +/** is what owed-say answers. */ +export interface OwedSayAnswer { + /** the event said */ + "event": OwedEvent; + /** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */ + "form"?: number; +} + +/** is what owed-drop takes. */ +export interface OwedDropInput { + /** the owed event's message id */ + "id": string; + /** why, written with the caller the runtime proves in the hand-act log */ + "why": string; +} + +/** is what owed-drop answers. */ +export interface OwedDropAnswer { + /** the events dropped, the named one first */ + "dropped": OwedEvent[]; + /** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */ + "form"?: number; +} + /** is the body of step. */ export type StepAccept = StepRun; diff --git a/modules/mesh-delivery-contracts/ts/seats/meshwants/index.js b/modules/mesh-delivery-contracts/ts/seats/meshwants/index.js index 0fc1c5010..aad00be54 100644 --- a/modules/mesh-delivery-contracts/ts/seats/meshwants/index.js +++ b/modules/mesh-delivery-contracts/ts/seats/meshwants/index.js @@ -16,6 +16,9 @@ export const verbs = { validate: "validate", keepNow: "keep-now", drop: "drop", + owed: "owed", + owedSay: "owed-say", + owedDrop: "owed-drop", }; export const accepts = {