is_docking_station_api 0.5.0
is_docking_station_api: ^0.5.0 copied to clipboard
The docking station's contract: what other parts of intersyntactic import to speak with it. The events a module translates for it, the decisions it records, and how both are encoded in the logbook.
Each version is tagged docking_station_api-vX.Y.Z on the commit it is
published from. Versions up to 0.3.0 were published as
is_admission_vocabulary and tagged admission_vocabulary-vX.Y.Z.
0.5.0 #
Breaking, in code and in the logbook: a start entry's reply endpoint changes shape, so 0.5.0 goes live only while the logbook holds no start entries.
- Where replies go is
ReplyEndpoint, sealed, one case for each way an external system takes replies:RepliesUnderWebAddress(prefix): replies go under a web address that names the conversation, as Teams' Bot Connector takes them. This is 0.4.0'sAddressPrefix, wrapped.RepliesInSlackConversation(origin, channel, thread?): Slack takes every reply at one address and names the conversation in the request's body, so the reply is confined bychannelandthread, andoriginis what a trajectory's rules allow it to reply through.SlackChannelIdandSlackThreadTimestampparse Slack's forms.
AddressedEvent.replyEndpoint,EventAdmittedToMission.replyEndpointand path_start'sEntryStartsTrajectory.replyEndpointareReplyEndpoint?. path_start exports the type.- In the entries it is
{"case": "under-web-address", "addressPrefix": {...}}or{"case": "in-slack-conversation", "origin", "channel", "thread"?}, read strictly bydecodeReplyEndpoint.
0.4.0 #
Breaking, in code and in the logbook. Published only into a fresh logbook: a reader on 0.4.0 refuses 0.3.0's entries, and a reader on 0.3.0 refuses 0.4.0's.
- A module's "reading" is its translator, since it turns each of its
relay's events into the docking station's terms, carrying state from one
event to the next:
ModuleReading<S>isTranslatesRelayedEvents<S>.EventReadingisTranslatedEvent.encodeReadinganddecodeReadingareencodeTranslatedEventanddecodeTranslatedEvent;readingNodeShapesistranslatedEventNodeShapes.NoReadingForSourceisNoTranslatorForSource, andReadingFoundNothingisTranslatorFoundNothing.EventAdmittedToMission.readingandTrajectoryClosedBecausePersonAsked.readingare.translatedEvent.
- A relayed event's source is its entry's kind, never its body, so the
logbook's sender table vouches for it: each relay records its events as
<source>-event(teams-event), and only that relay's user may write the kind.RelayedEventSourceis the source, with itskindandofKind.RelayedEvent.readtakes the entry's kind, and the body is{"at", "bytes"}alone; a body that names a source is refused.encodeRelayedEventwrites one, for a relay. The kindseventandarrivedare gone.TranslatesRelayedEvents.sourceis aRelayedEventSource. - A close names the trajectory it closes:
PersonAskedToCloseTrajectory.trajectory, the one the pressed reply was sent in, as the reply carries it ("trajectory"on the wire). So a close on an old reply closes that reply's trajectory, never whichever is open at the address now. It closes only the trajectory open at its address; any other isCloseAskedForTrajectoryNotOpenAtAddress(close-asked-for-trajectory-not-open-at-address), which replacesCloseAskedAtAddressWithNoTrajectory. - Every translated event names where replies to it go:
AddressedEvent.replyEndpoint, anAddressPrefixfrom is_web_address_vocabulary ^0.1.1, null when the module can't name one. It travels insidetranslatedEventasreplyEndpoint, written byencodeAddressPrefix. An admission that starts a mission or a trajectory copies it to the entry's top level besiderules(EventAdmittedToMission.replyEndpoint), and path_start reads it there (EntryStartsTrajectory.replyEndpoint), so the airlock has it without decoding the translated event. A copy that differs from the translated event's, or one on an entry that starts nothing, makes the entry unreadable. - In the entries: the
readingfield ofevent-admitted-to-missionandtrajectory-closedistranslatedEvent, and thewhysno-reading-for-sourceandreading-found-nothingareno-translator-for-sourceandtranslator-found-nothing.
0.3.0 #
-
Published as
is_docking_station_api, the same code asis_admission_vocabulary0.3.0. Imports becomepackage:is_docking_station_api/is_docking_station_api.dartandpackage:is_docking_station_api/path_start.dart. -
A trajectory can be closed by an operator, from outside its conversation:
TrajectoryClosedByOperator, with the operator'sOperatorNameand a reason, decided by a person and at no event. Its entry is atrajectory-closed, so the logbook closes the trajectory's chains as for any close:{"by": "person", "trajectory", "mission", "operator", "reason"}. -
TrajectoryClosedis sealed, holdingtrajectoryandmission; a close a person asked for at the address isTrajectoryClosedBecausePersonAsked, whose entry is unchanged. A reader matchingTrajectoryClosed(:trajectory)takes both cases with no change. -
Breaking:
eventmoved offAdmissionDecisionto the new sealedDecidedAtEvent, which every decision but the operator's close is. Read it withif (d case DecidedAtEvent(:final event)). A reader on 0.2.x reads an operator's close as no decision at all, so move to 0.3.0 before one is written.
0.2.0 #
- Depends on the logbook's formats alone:
Kindfrom is_logbook_format ^0.1.0 andObjectIdfrom is_content_id ^0.2.0. It no longer depends on is_logbook or is_logbook_client, so nothing that imports it carries the logbook's writer or its socket client.path_start.dartnow reaches no logbook package at all, and its import-graph test holds that. DecisionEntryKind.trajectoryClosedis the logbook's ownKind.trajectoryClosed.- Breaking only in that
Kindis now is_logbook_format's class: move to is_logbook_client ^0.3.0 (or is_logbook ^0.3.1), which share it.
0.1.1 #
- Docs only: the logbook is called the logbook throughout, never "the
record", and
PersonAskedToCloseTrajectorynames both ways a close is asked: the "Close trajectory" action on any message, and the Close button on the agent's card. Comments say what the code does, with no dated rulings or attributions. One test is renamed to "the logbook words are the ones promised to their readers". No type, name or wire change.
0.1.0 #
- The vocabulary other repos import to speak with the docking station, split
out of is_docking_station 0.3.0 with no change to any type or to the wire:
readings (
ModuleReading,EventReadingand its cases,RelayedEvent), decisions (AdmissionDecisionand its cases), their logbook encoding (encodeReading,decodeReading,encodeDecision,decodeDecision,DecisionEntryKind), andpath_start.dartfor the airlock. - How the docking station decides (
decide,DecidedSoFar, its rules andrunDockingStation) is not here: it lives in the docking station service, which nothing else imports.