is_docking_station_api 0.12.0
is_docking_station_api: ^0.12.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.12.0 #
Breaking for imports only; the wire doesn't change.
AddressInExternalSystemnow comes from is_conversation_vocabulary (^0.2.1), which declares it once for every package. This package no longer declares or re-exports it: import it frompackage:is_conversation_vocabulary/is_conversation_vocabulary.dart. It parses exactly the addresses it did before.RelayedEvent.atis documented as when the event happened, as its source reports it. It is hashed with the rest of the entry, so a relay that stamped its own clock would turn every redelivery into a new entry.
0.11.0 #
Breaking. Every entry already in a logbook still reads, but a 0.10 reader
refuses an entry 0.11 writes, since it doesn't know "forTheAgent".
- Every decision entry names its format:
"decisionFormat": 1. An entry with none is one written before the field existed, and reads as before. Both readers (decodeDecisionand path_start'sreadTrajectoryStart) refuse any other format. This lets the next field land reader first: readers learn format 2, and only once every live reader knows it does the docking station write it, so no more all-readers windows for a new field or value. MessageSaidtakes a requiredforTheAgent, aWhetherForTheAgent: every message where it was said is for the agent (a one-to-one chat, or a place that delivers only what is for the agent, as Teams delivers only @mentions), it mentions the agent, it replies to the agent (to a message of the agent's, or in a thread the agent has posted in), it does none of these, or not known. It is what decides whether a message starts a turn, and only the module can tell it: one kind of conversation delivers differently in different external systems, as a Teams group chat delivers only @mentions while a WhatsApp group delivers everything. On the wire it is"forTheAgent"inside amessage-saidtranslated event. An entry written before it existed reads as not known, as a missingconversationKinddoes. A value it doesn't know is refused.TranslatesRelayedEventsdocuments that the docking station discards the state a translator returns for a redelivered event (an address and key already translated).
0.10.0 #
Breaking. Every entry already in a logbook still reads.
-
MessageSaidtakes a requiredconversationKind, aConversationKindfrom is_conversation_vocabulary: one-to-one, group chat, public channel, private channel, or not known. An agent answers only where its owner can see, so every translator states the place, and "not known" is a case, never a silent default. On the wire it is"conversationKind"inside amessage-saidtranslated event. An entry written before the field existed has none, and reads as not known (Nick, 28 Nov). Such an entry is only ever history, never decided again. A kind it doesn't know is refused. -
On is_conversation_vocabulary ^0.2.0. A reply endpoint is now one of two general cases, named for how a reply is kept to its conversation:
RepliesUnderWebAddress(by where it is sent) orRepliesWithPinnedBodyFields(by fields its body must equal, may not carry, or alone may carry). The Slack-specificRepliesInSlackConversationis gone. A decision recorded with the oldin-slack-conversationendpoint still reads, as the pinned fields it meant: a threaded one pins itsthread_ts, and an unthreaded one requiresthread_tsto be absent. A test holds that for both readers. -
On checked_json ^0.4.0, where a
JsonObjectcan't be changed at any depth andJsonObject.ofcopies its map, so it is neverconst. -
On is_annotation_shapes ^0.5.0, its release on checked_json ^0.4.0.
-
A test holds
readTrajectoryStartanddecodeDecisionto the same pinned-fields endpoint.path_start.dartreaches the vocabulary's renamedreply_endpoint_case.dart, allowed by name.
0.9.0 #
Breaking in code only. The logbook's JSON is unchanged.
- Depends on is_conversation_vocabulary ^0.1.1 in place of both
is_conversation_shapes and is_conversation_reply_vocabulary, which it
merges.
UserSaid,WhatChanged,SourceMessageIdandReplyEndpointnow come from it, as different Dart types from the old packages' ones, so a program that builds aTranslatedEventmoves to is_conversation_vocabulary in the same change. - On checked_json ^0.3.0. Every entry is decoded refusing an object that
names a field twice, where
jsonDecodekept the last value without a word. Such an entry now reads as one this package does not write. - On is_annotation_shapes ^0.4.0, its release on checked_json ^0.3.0.
VerdictOnShownMessageis unchanged. path_start.dart, which the airlock imports, takesReplyEndpointfrom is_conversation_vocabulary'sreply_endpoint.dartalone, and a test holds that it reaches none of that package's stranger-facing files (UserSaid,Quote,WhatChanged).RelayedEventSource,encodeRelayedEvent,RelayedEventand the relayed entry's{"at","bytes"}are unchanged.- Loads the is_lint_rules analyzer plugin. Each decoder reads its entry
through a
JsonObjectinstead of a map. A not-admitted decision'swhyand a translated event'scaseare now enums, each parsed once, and every switch on a sealed decision names each of its cases. The wire is unchanged.readTrajectoryStartstill accepts acaseit doesn't know, as before.
0.8.0 #
Breaking in code only. The logbook's JSON is unchanged.
- Depends on is_conversation_reply_vocabulary ^0.1.0, is_reply_vocabulary's
new name, instead of the old name.
ReplyEndpointand the other reply types now come from the new package. Dart treats them as different types from is_reply_vocabulary's, so a program that still reaches is_reply_vocabulary, directly or through another package, must move to is_conversation_reply_vocabulary as well. - No longer re-exports the reply types.
ReplyEndpoint,RepliesUnderWebAddress,RepliesInSlackConversation,SlackChannelId,SlackMessageTimestamp,encodeReplyEndpointanddecodeReplyEndpointare imported from is_conversation_reply_vocabulary, which a consumer depends on directly.
0.7.0 #
Breaking in code only. The logbook's JSON is unchanged.
- On is_reply_vocabulary ^0.2.0, so the re-exported
encodeReplyEndpointreturns a checked_jsonJsonObjectinstead of aMap. - path_start may reach checked_json, which is trusted: it reads fields of a value already decoded as JSON and decodes nothing a stranger shaped.
0.6.0 #
Breaking in code only. The logbook's JSON is unchanged, so 0.5.0 and 0.6.0 read each other's entries.
ReplyEndpoint, its cases,SlackChannelIdandencodeReplyEndpoint/decodeReplyEndpointare now declared in is_reply_vocabulary and re-exported from both libraries here, so drivers and the airlock share one type without depending on this package. A package that also imports is_reply_vocabulary needs this version: 0.5.0 declares its own copy, which is a different type.SlackThreadTimestampis nowSlackMessageTimestamp, since a Slack timestamp names any message. The field is stillthread.RelayedEvent.bytesis what the source's relay recorded: the bytes as they came, or only the fields its translator reads, where the rest can carry credentials.
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.