{"action":"created","comment":{"url":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/comments/242752226","pull_request_review_id":186339736,"id":242752226,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mjc1MjIyNg==","diff_hunk":"@@ -0,0 +1,198 @@\n+- Name: agent-protocols\n+- Author: Daniel Hardman\n+- Start Date: 2018-12-17\n+\n+# HIPE 00??-agent-protocols\n+[summary]: #summary\n+\n+Describes how agents can query one another to find out what protocols\n+they support.\n+\n+# Motivation\n+[motivation]: #motivation\n+\n+Though some agents will support just one protocol and will be\n+statically configured to interact with just one other party, many\n+exciting uses of agents are more dynamic and unpredictable. When\n+Alice and Bob meet, they won't know in advance what features are\n+supported by one another's agents. They need a way to find out.\n+\n+# Tutorial\n+[tutorial]: #tutorial\n+\n+This HIPE introduces a protocol for discussing the protocols an agent\n+can handle. The identifier for the message family used by this protocol is\n+`agprot`, and the fully qualified URI for its definition is:\n+\n+    did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/agprot/1.0\n+    \n+You might wonder about a broader formulation -- agent *features* or\n+*capabilities* instead of agent *protocols*. The reason we're protocol-focused\n+here is that the only way agent features manifest to a remote party is via a\n+message-exchanging protocol. While agents might have interesting private\n+features, no remote party has a need to know about them unless they influence\n+protocols in some way.\n+\n+### Roles\n+\n+There are two roles in the `agprot` protocol: `requester` and\n+`responder`. The requester asks the responder about the protocols it\n+ supports, and the responder answers. Each role uses a single message type.\n+This is a classic two-step request~response interaction.\n+\n+### `request` Message Type\n+\n+An `agprot/request` message looks like this:\n+\n+[![request](request.png)](request.json)\n+\n+The `query` field is a regular expression and could be quite complex.\n+Often, however, it will be used as shown here, to identify a protocol\n+(message family) with just the version portion wildcarded. The regex\n+must match the entire name of a protocol family, from beginning to end.\n+In other words, what you put in the regex has an implicit `^` at the\n+beginning and `$` at the end.\n+\n+Reuqest messages say, \"Please tell me what your capabilities are with\n+respect to the protocols with message family identifiers that match this\n+regex.\" This particular example asks if another agent knows any 1.x\n+versions of the [tictactoe protocol](x).\n+\n+Any agent may send another agent this message type at any time.\n+Implementers of agents that intend to support dynamic relationships\n+and rich features are *strongly* encouraged to implement support\n+for this message, as it is likely to be among the first messages\n+exchanged with a stranger.\n+\n+### `response` Message Type\n+\n+An `agprot/response` message looks like this:\n+\n+[![response](response.png)](response.json)\n+\n+The `protocols` field is a JSON object that contains zero or more keys that\n+match the query. Each key is a protocol version (fully qualified message\n+family identifier such as `did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/tictactoe/1.0`).\n+Its value is a JSON object that enumerates the roles the responding agent\n+can play in the associated protocol, and the message types it can *receive*\n+(not send).\n+","path":"text/agent-protocols/README.md","position":79,"original_position":79,"commit_id":"fef188fe02dbda406380cf518b422a7fdc71598f","original_commit_id":"fef188fe02dbda406380cf518b422a7fdc71598f","user":{"login":"swcurran","id":1018050,"node_id":"MDQ6VXNlcjEwMTgwNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1018050?v=4","gravatar_id":"","url":"https://api.github.com/users/swcurran","html_url":"https://github.com/swcurran","followers_url":"https://api.github.com/users/swcurran/followers","following_url":"https://api.github.com/users/swcurran/following{/other_user}","gists_url":"https://api.github.com/users/swcurran/gists{/gist_id}","starred_url":"https://api.github.com/users/swcurran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swcurran/subscriptions","organizations_url":"https://api.github.com/users/swcurran/orgs","repos_url":"https://api.github.com/users/swcurran/repos","events_url":"https://api.github.com/users/swcurran/events{/privacy}","received_events_url":"https://api.github.com/users/swcurran/received_events","type":"User","site_admin":false},"body":"Good argument for the need for roles and agree that because the spec just talks about the interface - messages and parameters - there is not a formal place for roles. Just as there is not a formal place for expected behaviour and for state machine.  So maybe we should add more formalism to the tictactoe HIPE (or maybe I just didn't pay enough attention). For example, maybe we define some JSON for the roles and (possibly - seems hard) for the state machine that can make generating a message skeleton and tests easier.\r\n\r\nAs to the roles for tictactoe - another interesting question. My gut is that there should be just \"player\" and whomever it is that goes first is \"x\", other player is \"o\" - I think that's the protocol used by (most) humans.  Of course, on the rematch, that might change :-), but perhaps that's just getting unnecessarily into the weeds :-).","created_at":"2018-12-19T00:09:53Z","updated_at":"2018-12-19T00:09:53Z","html_url":"https://github.com/hyperledger/indy-hipe/pull/73#discussion_r242752226","pull_request_url":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/comments/242752226"},"html":{"href":"https://github.com/hyperledger/indy-hipe/pull/73#discussion_r242752226"},"pull_request":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73"}},"in_reply_to_id":242611713},"pull_request":{"url":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73","id":239341591,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MzQxNTkx","html_url":"https://github.com/hyperledger/indy-hipe/pull/73","diff_url":"https://github.com/hyperledger/indy-hipe/pull/73.diff","patch_url":"https://github.com/hyperledger/indy-hipe/pull/73.patch","issue_url":"https://api.github.com/repos/hyperledger/indy-hipe/issues/73","number":73,"state":"open","locked":false,"title":"propose HIPE: protocol to see what protocols (message families) an agent supports","user":{"login":"dhh1128","id":2208904,"node_id":"MDQ6VXNlcjIyMDg5MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2208904?v=4","gravatar_id":"","url":"https://api.github.com/users/dhh1128","html_url":"https://github.com/dhh1128","followers_url":"https://api.github.com/users/dhh1128/followers","following_url":"https://api.github.com/users/dhh1128/following{/other_user}","gists_url":"https://api.github.com/users/dhh1128/gists{/gist_id}","starred_url":"https://api.github.com/users/dhh1128/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhh1128/subscriptions","organizations_url":"https://api.github.com/users/dhh1128/orgs","repos_url":"https://api.github.com/users/dhh1128/repos","events_url":"https://api.github.com/users/dhh1128/events{/privacy}","received_events_url":"https://api.github.com/users/dhh1128/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>","created_at":"2018-12-18T02:00:18Z","updated_at":"2018-12-19T00:09:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c11e4996070530cb83acb5d10b039d2807faf96","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73/commits","review_comments_url":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73/comments","review_comment_url":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperledger/indy-hipe/issues/73/comments","statuses_url":"https://api.github.com/repos/hyperledger/indy-hipe/statuses/fef188fe02dbda406380cf518b422a7fdc71598f","head":{"label":"dhh1128:agent-protocols","ref":"agent-protocols","sha":"fef188fe02dbda406380cf518b422a7fdc71598f","user":{"login":"dhh1128","id":2208904,"node_id":"MDQ6VXNlcjIyMDg5MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2208904?v=4","gravatar_id":"","url":"https://api.github.com/users/dhh1128","html_url":"https://github.com/dhh1128","followers_url":"https://api.github.com/users/dhh1128/followers","following_url":"https://api.github.com/users/dhh1128/following{/other_user}","gists_url":"https://api.github.com/users/dhh1128/gists{/gist_id}","starred_url":"https://api.github.com/users/dhh1128/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhh1128/subscriptions","organizations_url":"https://api.github.com/users/dhh1128/orgs","repos_url":"https://api.github.com/users/dhh1128/repos","events_url":"https://api.github.com/users/dhh1128/events{/privacy}","received_events_url":"https://api.github.com/users/dhh1128/received_events","type":"User","site_admin":false},"repo":{"id":130754186,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA3NTQxODY=","name":"indy-hipe","full_name":"dhh1128/indy-hipe","private":false,"owner":{"login":"dhh1128","id":2208904,"node_id":"MDQ6VXNlcjIyMDg5MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2208904?v=4","gravatar_id":"","url":"https://api.github.com/users/dhh1128","html_url":"https://github.com/dhh1128","followers_url":"https://api.github.com/users/dhh1128/followers","following_url":"https://api.github.com/users/dhh1128/following{/other_user}","gists_url":"https://api.github.com/users/dhh1128/gists{/gist_id}","starred_url":"https://api.github.com/users/dhh1128/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhh1128/subscriptions","organizations_url":"https://api.github.com/users/dhh1128/orgs","repos_url":"https://api.github.com/users/dhh1128/repos","events_url":"https://api.github.com/users/dhh1128/events{/privacy}","received_events_url":"https://api.github.com/users/dhh1128/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dhh1128/indy-hipe","description":null,"fork":true,"url":"https://api.github.com/repos/dhh1128/indy-hipe","forks_url":"https://api.github.com/repos/dhh1128/indy-hipe/forks","keys_url":"https://api.github.com/repos/dhh1128/indy-hipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhh1128/indy-hipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhh1128/indy-hipe/teams","hooks_url":"https://api.github.com/repos/dhh1128/indy-hipe/hooks","issue_events_url":"https://api.github.com/repos/dhh1128/indy-hipe/issues/events{/number}","events_url":"https://api.github.com/repos/dhh1128/indy-hipe/events","assignees_url":"https://api.github.com/repos/dhh1128/indy-hipe/assignees{/user}","branches_url":"https://api.github.com/repos/dhh1128/indy-hipe/branches{/branch}","tags_url":"https://api.github.com/repos/dhh1128/indy-hipe/tags","blobs_url":"https://api.github.com/repos/dhh1128/indy-hipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhh1128/indy-hipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhh1128/indy-hipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhh1128/indy-hipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhh1128/indy-hipe/statuses/{sha}","languages_url":"https://api.github.com/repos/dhh1128/indy-hipe/languages","stargazers_url":"https://api.github.com/repos/dhh1128/indy-hipe/stargazers","contributors_url":"https://api.github.com/repos/dhh1128/indy-hipe/contributors","subscribers_url":"https://api.github.com/repos/dhh1128/indy-hipe/subscribers","subscription_url":"https://api.github.com/repos/dhh1128/indy-hipe/subscription","commits_url":"https://api.github.com/repos/dhh1128/indy-hipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhh1128/indy-hipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhh1128/indy-hipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhh1128/indy-hipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhh1128/indy-hipe/contents/{+path}","compare_url":"https://api.github.com/repos/dhh1128/indy-hipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhh1128/indy-hipe/merges","archive_url":"https://api.github.com/repos/dhh1128/indy-hipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhh1128/indy-hipe/downloads","issues_url":"https://api.github.com/repos/dhh1128/indy-hipe/issues{/number}","pulls_url":"https://api.github.com/repos/dhh1128/indy-hipe/pulls{/number}","milestones_url":"https://api.github.com/repos/dhh1128/indy-hipe/milestones{/number}","notifications_url":"https://api.github.com/repos/dhh1128/indy-hipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhh1128/indy-hipe/labels{/name}","releases_url":"https://api.github.com/repos/dhh1128/indy-hipe/releases{/id}","deployments_url":"https://api.github.com/repos/dhh1128/indy-hipe/deployments","created_at":"2018-04-23T20:40:52Z","updated_at":"2018-12-15T08:39:48Z","pushed_at":"2018-12-18T02:04:49Z","git_url":"git://github.com/dhh1128/indy-hipe.git","ssh_url":"git@github.com:dhh1128/indy-hipe.git","clone_url":"https://github.com/dhh1128/indy-hipe.git","svn_url":"https://github.com/dhh1128/indy-hipe","homepage":null,"size":6662,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hyperledger:master","ref":"master","sha":"e23ab00e9ac72cbe960dfdd6cea31a5a5ab086de","user":{"login":"hyperledger","id":7657900,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NTc5MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":121789977,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE3ODk5Nzc=","name":"indy-hipe","full_name":"hyperledger/indy-hipe","private":false,"owner":{"login":"hyperledger","id":7657900,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NTc5MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hyperledger/indy-hipe","description":"Hyperledger Indy Project Enhancements","fork":false,"url":"https://api.github.com/repos/hyperledger/indy-hipe","forks_url":"https://api.github.com/repos/hyperledger/indy-hipe/forks","keys_url":"https://api.github.com/repos/hyperledger/indy-hipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/indy-hipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/indy-hipe/teams","hooks_url":"https://api.github.com/repos/hyperledger/indy-hipe/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/indy-hipe/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/indy-hipe/events","assignees_url":"https://api.github.com/repos/hyperledger/indy-hipe/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/indy-hipe/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/indy-hipe/tags","blobs_url":"https://api.github.com/repos/hyperledger/indy-hipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/indy-hipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/indy-hipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/indy-hipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/indy-hipe/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/indy-hipe/languages","stargazers_url":"https://api.github.com/repos/hyperledger/indy-hipe/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/indy-hipe/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/indy-hipe/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/indy-hipe/subscription","commits_url":"https://api.github.com/repos/hyperledger/indy-hipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/indy-hipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/indy-hipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/indy-hipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/indy-hipe/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/indy-hipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/indy-hipe/merges","archive_url":"https://api.github.com/repos/hyperledger/indy-hipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/indy-hipe/downloads","issues_url":"https://api.github.com/repos/hyperledger/indy-hipe/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/indy-hipe/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/indy-hipe/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/indy-hipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/indy-hipe/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/indy-hipe/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/indy-hipe/deployments","created_at":"2018-02-16T19:11:11Z","updated_at":"2018-12-17T16:43:24Z","pushed_at":"2018-12-18T19:34:45Z","git_url":"git://github.com/hyperledger/indy-hipe.git","ssh_url":"git@github.com:hyperledger/indy-hipe.git","clone_url":"https://github.com/hyperledger/indy-hipe.git","svn_url":"https://github.com/hyperledger/indy-hipe","homepage":"","size":2610,"stargazers_count":17,"watchers_count":17,"language":null,"has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":44,"open_issues":22,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73"},"html":{"href":"https://github.com/hyperledger/indy-hipe/pull/73"},"issue":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/issues/73"},"comments":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/hyperledger/indy-hipe/statuses/fef188fe02dbda406380cf518b422a7fdc71598f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"swcurran"}}