Skip to content

Instantly share code, notes, and snippets.

@metaweta
Last active April 26, 2023 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metaweta/6707192 to your computer and use it in GitHub Desktop.
Save metaweta/6707192 to your computer and use it in GitHub Desktop.
Individual Agent message set proposal

Message Set

Methods on Sessions

Ping and pong

  • sessionPing(sessionURI: URI)
  • sessionPong(sessionURI: URI)

Methods on Agents

createAgent

  • createAgentRequest(authType: String, authValue: String)
    • authType == "password" (case-insensitive)
  • createAgentError(reason: String)
    • returned synchronously
  • createAgentResponse(agentURI: URI)
    • returned synchronously

initializeSession

  • initializeSessionRequest(agentURI: URI)
  • initializeSessionError(agentURI: URI, reason: String)
    • returned synchronously
  • initializeSessionResponse(sessionURI: URI)
    • returned synchronously

External identities

addAgentExternalIdentity

  • addAgentExternalIdentityRequest(sessionURI: URI, id: ID)
    • ID(idType: IDType, idValue: String)
      • IDType = Email
    • We only support adding one identity per message because of need for confirmation
  • addAgentExternalIdentityError(sessionURI: URI, reason: String)
  • addAgentExternalIdentityWaiting(sessionURI: URI)
  • addAgentExternalIdentityToken(sessionURI: URI, token: String)
  • addAgentExternalIdentityResponse(sessionURI: URI)

removeAgentExternalIdentities

  • removeAgentExternalIdentitiesRequest(sessionURI: URI, ids: List[ID])
  • removeAgentExternalIdentitiesError(sessionURI: URI, reason: String)
  • removeAgentExternalIdentitiesResponse(sessionURI: URI)

getAgentExternalIdentities

  • getAgentExternalIdentitiesRequest(sessionURI: URI, idType: IDType)
    • One value of IDType is ANY
  • getAgentExternalIdentitiesError(sessionURI: URI, reason: String)
  • getAgentExternalIdentitiesResponse(sessionURI: URI, ids: List[ID])

Aliases

addAgentAliases

  • addAgentAliasesRequest(sessionURI: URI, aliases: List[Alias])
    • Alias = String
  • addAgentAliasesError(sessionURI: URI, reason: String)
  • addAgentAliasesResponse(sessionURI: URI)

removeAgentAliases

  • removeAgentAliasesRequest(sessionURI: URI, aliases: List[Alias])
  • removeAgentAliasesError(sessionURI: URI, reason: String)
  • removeAgentAliasesResponse(sessionURI: URI)

getAgentAliases

  • getAgentAliasesRequest(sessionURI: URI)
  • getAgentAliasesError(sessionURI: URI, reason: String)
  • getAgentAliasesResponse(sessionURI: URI, aliases: List[Alias])

getDefaultAlias

  • getDefaultAliasRequest(sessionURI: URI)
  • getDefaultAliasError(sessionURI: URI, reason: String)
  • getDefaultAliasResponse(sessionURI: URI, alias: Alias)

setDefaultAlias

  • setDefaultAliasRequest(sessionURI: URI, alias: Alias)
  • setDefaultAliasError(sessionURI: URI, reason: String)
  • setDefaultAliasResponse(sessionURI: URI)

Methods on Aliases

External identities

addAliasExternalIdentities

  • addAliasExternalIdentitiesRequest(sessionURI: URI, alias: Alias, ids: List[ID])
    • Only ids already on the agent are allowed
  • addAliasExternalIdentitiesError(sessionURI: URI, reason: String)
  • addAliasExternalIdentitiesResponse(sessionURI: URI)

removeAliasExternalIdentities

  • removeAliasExternalIdentitiesRequest(sessionURI: URI, alias: Alias, ids: List[ID])
  • removeAliasExternalIdentitiesError(sessionURI: URI, reason: String)
  • removeAliasExternalIdentitiesResponse(sessionURI: URI)

getAliasExternalIdentities

  • getAliasExternalIdentitiesRequest(sessionURI: URI, alias: Alias, idType: IDType)
    • One value of IDType is ANY
  • getAliasExternalIdentitiesError(sessionURI: URI, reason: String)
  • getAliasExternalIdentitiesResponse(sessionURI: URI, ids: List[(IDType, String)])

setAliasDefaultExternalIdentity

  • setAliasDefaultExternalIdentityRequest(sessionURI: URI, alias: Alias, id: ID)
  • setAliasDefaultExternalIdentityError(sessionURI: URI, reason: String)
  • setAliasDefaultExternalIdentityResponse(sessionURI: URI)

Connections

addAliasConnections

  • addAliasConnectionsRequest(sessionURI: URI, alias: Alias, cnxns: List[Cnxn])
    • Cnxn = (URI, FlatTerm, URI)
  • addAliasConnectionsError(sessionURI: URI, reason: String)
  • addAliasConnectionsResponse(sessionURI: URI)

removeAliasConnections

  • removeAliasConnectionsRequest(sessionURI: URI, alias: Alias, cnxns: List[Cnxn])
  • removeAliasConnectionsError(sessionURI: URI, reason: String)
  • removeAliasConnectionsResponse(sessionURI: URI)

getAliasConnections

  • getAliasConnectionsRequest(sessionURI: URI, alias: Alias)
  • getAliasConnectionsError(sessionURI: URI, reason: String)
  • getAliasConnectionsResponse(sessionURI: URI, cnxns: List[Cnxn])

setAliasDefaultConnection

  • setAliasDefaultConnectionRequest(sessionURI: URI, alias: Alias, cnxn: Cnxn)
  • setAliasDefaultConnectionError(sessionURI: URI, reason: String)
  • setAliasDefaultConnectionResponse(sessionURI: URI)

Labels

addAliasLabels

  • addAliasLabelsRequest(sessionURI: URI, alias: Alias, Labels: List[Label])
    • Label = String
  • addAliasLabelsError(sessionURI: URI, reason: String)
  • addAliasLabelsResponse(sessionURI: URI)

updateAliasLabels

  • updateAliasLabelsRequest(sessionURI: URI, alias: Alias, Labels: List[Label])
  • updateAliasLabelsError(sessionURI: URI, reason: String)
  • updateAliasLabelsResponse(sessionURI: URI)

getAliasLabels

  • getAliasLabelsRequest(sessionURI: URI, alias: Alias)
  • getAliasLabelsError(sessionURI: URI, reason: String)
  • getAliasLabelsResponse(sessionURI: URI, Labels: List[Labels])

setAliasDefaultLabel

  • setAliasDefaultLabelRequest(sessionURI: URI, alias: Alias, Label: Label)
  • setAliasDefaultLabelError(sessionURI: URI, reason: String)
  • setAliasDefaultLabelResponse(sessionURI: URI)

getAliasDefaultLabel

  • getAliasDefaultLabelRequest(sessionURI: URI, alias: Alias)
  • getAliasDefaultLabelError(sessionURI: URI, reason: String)
  • getAliasDefaultLabelResponse(sessionURI: URI, Label: Label)

DSL

evalSubscribe

  • evalSubscribeRequest(sessionURI: URI, expression: GloSExpr)
    • GlosExpr =
      • InsertContent(Labels: List[Label], cnxns: List[Cnxn], value: Value)
        • Value = String
      • FeedExpr(Labels: List[Label], cnxns: List[Cnxn])
      • ScoreExpr(Labels: List[Label], cnxns: List[Cnxn], staff: Staff
        • Staff =
          • List[Cnxn]
          • List[Label]
  • evalSubscribeError(sessionURI: URI, reason: String)
  • evalSubscribeResponse(sessionURI: URI, values: List[Value])
  • Can we know when we are done to send back an evalSubscribeComplete?

evalSubscribeCancel

  • evalSubscribeCancelRequest(sessionURI: URI)
  • evalSubscribeCancelError(sessionURI: URI, reason: String)
  • evalSubscribeCancelResponse(sessionURI: URI)
@renns
Copy link

renns commented Sep 27, 2013

Here is the data that needs to be passed between the UI and GLoSEval for the introduction protocol. The following assumes that Alice is introducing Bob to Charlie / Charlie to Bob.

BeginIntroductionRequest (get's sent from Alice):

  • Alice to Bob cnxn
  • Bob to Alice cnxn
  • Alice to Charlie cnxn
  • Charlie to Alice cnxn
  • Intro message to Bob
  • Intro message to Charlie

BeginIntroductionResponse (is received by Alice):

  • Accepted (true/false)
  • Bob's rejection reason (optional)
  • Charlie's rejection reason (optional)

IntroductionRequest (is received by Bob and Charlie):

  • Intro message from Alice
  • Shared profile from Charlie/Bob (hasn't been defined yet)

IntroductionResponse (is sent by Bob and Charlie):

  • Accepted (true/false)
  • Connection name (if accepted)
  • Rejected reason (if not accepted)

I haven't modeled it, but another message could be sent to Bob and Charlie after a successful connection to tell the UI to update its list of connections.

@metaweta
Copy link
Author

metaweta commented Oct 5, 2013

Emeris has asked that add/update responses contain the current state on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment