{"action":"created","comment":{"url":"https://api.github.com/repos/hegemone/kore-poc/pulls/comments/136702264","pull_request_review_id":60282037,"id":136702264,"diff_hunk":"@@ -0,0 +1,77 @@\n+# nelsk-kore\n+\n+POC demo illustrating a number of key pieces of `kore-comm`, the server responsible\n+for IO between various platforms and the plugins that implement features.\n+\n+## Usage\n+\n+`bundle install` and make sure you've got the deps installed. Then just `./run`.\n+\n+Expects commands as input in the form of `<adapter> !<plugin> content`, example:\n+\n+```\n+{> dev/kore-poc/nelsk-kore|kore-comm+  <}\n+# ./run\n+[2017-08-27T22:28:39] DEBUG Engine#initialize\n+[2017-08-27T22:28:39] DEBUG Engine#start\n+[2017-08-27T22:28:39] DEBUG DiscordAdapter#listen\n+[2017-08-27T22:28:39] DEBUG IRCAdapter#listen\n+irc !bacon buddy\n+[2017-08-27T22:29:11] DEBUG IRCAdapter#message_handler\n+[2017-08-27T22:29:11] DEBUG PlatformAdapter#message_received\n+[2017-08-27T22:29:11] DEBUG   identity: irc_duder\n+[2017-08-27T22:29:11] DEBUG   raw: !bacon buddy\n+[2017-08-27T22:29:11] DEBUG Command matched, parsing...\n+[2017-08-27T22:29:11] INFO  Engine#route_ingress\n+PlatformClient[irc] KoreBot: gives buddy a strip of delicious bacon as a gift from irc_duder.\n+```\n+\n+### Points of note\n+* EM based reactor at the heart of the Engine. Enables parallelized work and evented\n+triggers.\n+* `Kore::Comm::PlatformAdapter` - implement to define how the engine can speak to\n+arbirary text communcation platforms like irc, discord, telegram, etc.\n+* `Kore::Comm::Plugin` - implement to extend JBot behaviors\n+* Dependency injection thanks to `dry-container` + `dry-auto_inject`. Makes for\n+very testable components that have a lot of external dependencies like adapters.\n+* `client` injection into the adapters. Adapters will almost surely be using\n+some kind of service-specific client to talk to them. Adapters should expect for\n+them to be injected.\n+* Master dependencies like logger and config managers can be inherited for free\n+by subclassing `Kore::Machinery::Base`.\n+\n+### Faux pieces\n+* Pretty much everything in `Kore::Mock`.\n+* `PlatformClient` - is a simple, fake client for talking with an \"external\"\n+service. In reality, these would be completely distinct clients for things like\n+discord that the adapters use to translate between `$PLATFORM` and `Kore`.\n+* `InputDemux` - Demultiplexes STDIN and sends messages to the appropriate clients.\n+Not at all relevant in a real environment.\n+\n+### Next steps\n+* Integration with `kore-data`, which doesn't exist yet. Good demo would be\n+to build a basic OpenAPI definition and generate server/client libs. Fire up the\n+data server with a sqlite db backing it. Demonstrate CRUD against the `kore-data`\n+server using the client, say `Kore::Data::User`. Example:\n+\n+```ruby\n+match /^suggest\\s+(\\S+)/i, :method => :command_foo\n+\n+def command_foo(suggestion)\n+  Kore::Data::Suggestion.new({\n+    user_id: Kore::Data::User.find_id_by_platform(platform, originator[:identity]),\n+    suggestion: suggestion,\n+  })\n+end\n+```\n+\n+* Authentication and authorization between `kore-comm` to `kore-data` remains\n+a big question, and one that absolutely has to be solved if users can take\n+privileged actions from platforms.. The comm server needs to\n+*act on the behalf* of a user. Somehow the comm server needs to delegate to\n+the adapters and ask `\"Do we really trust this person is who thye appear to be?\"`\n+If the answer is yes, how do we masquerade as that user when performing CRUD\n+against the backend?","path":"nelsk-kore/README.md","position":74,"original_position":74,"commit_id":"7a98640fd33e10bbce851cab13f6c11eeab7f07d","original_commit_id":"151e41c7c5bb628a0a666564f83d24034cdfbce4","user":{"login":"thefirstofthe300","id":3161330,"avatar_url":"https://avatars3.githubusercontent.com/u/3161330?v=4","gravatar_id":"","url":"https://api.github.com/users/thefirstofthe300","html_url":"https://github.com/thefirstofthe300","followers_url":"https://api.github.com/users/thefirstofthe300/followers","following_url":"https://api.github.com/users/thefirstofthe300/following{/other_user}","gists_url":"https://api.github.com/users/thefirstofthe300/gists{/gist_id}","starred_url":"https://api.github.com/users/thefirstofthe300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefirstofthe300/subscriptions","organizations_url":"https://api.github.com/users/thefirstofthe300/orgs","repos_url":"https://api.github.com/users/thefirstofthe300/repos","events_url":"https://api.github.com/users/thefirstofthe300/events{/privacy}","received_events_url":"https://api.github.com/users/thefirstofthe300/received_events","type":"User","site_admin":false},"body":"Isn't this exactly what we are doing when we run the API server over HTTPS?","created_at":"2017-09-02T19:26:14Z","updated_at":"2017-09-02T19:26:14Z","html_url":"https://github.com/hegemone/kore-poc/pull/3#discussion_r136702264","pull_request_url":"https://api.github.com/repos/hegemone/kore-poc/pulls/3","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/hegemone/kore-poc/pulls/comments/136702264"},"html":{"href":"https://github.com/hegemone/kore-poc/pull/3#discussion_r136702264"},"pull_request":{"href":"https://api.github.com/repos/hegemone/kore-poc/pulls/3"}},"in_reply_to_id":135434204},"pull_request":{"url":"https://api.github.com/repos/hegemone/kore-poc/pulls/3","id":137861830,"html_url":"https://github.com/hegemone/kore-poc/pull/3","diff_url":"https://github.com/hegemone/kore-poc/pull/3.diff","patch_url":"https://github.com/hegemone/kore-poc/pull/3.patch","issue_url":"https://api.github.com/repos/hegemone/kore-poc/issues/3","number":3,"state":"open","locked":false,"title":"[RFC] kore-comm demo","user":{"login":"eriknelson","id":410933,"avatar_url":"https://avatars3.githubusercontent.com/u/410933?v=4","gravatar_id":"","url":"https://api.github.com/users/eriknelson","html_url":"https://github.com/eriknelson","followers_url":"https://api.github.com/users/eriknelson/followers","following_url":"https://api.github.com/users/eriknelson/following{/other_user}","gists_url":"https://api.github.com/users/eriknelson/gists{/gist_id}","starred_url":"https://api.github.com/users/eriknelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriknelson/subscriptions","organizations_url":"https://api.github.com/users/eriknelson/orgs","repos_url":"https://api.github.com/users/eriknelson/repos","events_url":"https://api.github.com/users/eriknelson/events{/privacy}","received_events_url":"https://api.github.com/users/eriknelson/received_events","type":"User","site_admin":false},"body":"Demo illustrating the core idea's we've been talking about. Dropped it into `nelsk-kore` just to separate my workspace.","created_at":"2017-08-28T02:37:43Z","updated_at":"2017-09-02T19:26:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3196a631be5b629546b9cb41402ea08e24e097fe","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rikai","id":515221,"avatar_url":"https://avatars2.githubusercontent.com/u/515221?v=4","gravatar_id":"","url":"https://api.github.com/users/rikai","html_url":"https://github.com/rikai","followers_url":"https://api.github.com/users/rikai/followers","following_url":"https://api.github.com/users/rikai/following{/other_user}","gists_url":"https://api.github.com/users/rikai/gists{/gist_id}","starred_url":"https://api.github.com/users/rikai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rikai/subscriptions","organizations_url":"https://api.github.com/users/rikai/orgs","repos_url":"https://api.github.com/users/rikai/repos","events_url":"https://api.github.com/users/rikai/events{/privacy}","received_events_url":"https://api.github.com/users/rikai/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hegemone/kore-poc/pulls/3/commits","review_comments_url":"https://api.github.com/repos/hegemone/kore-poc/pulls/3/comments","review_comment_url":"https://api.github.com/repos/hegemone/kore-poc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hegemone/kore-poc/issues/3/comments","statuses_url":"https://api.github.com/repos/hegemone/kore-poc/statuses/7a98640fd33e10bbce851cab13f6c11eeab7f07d","head":{"label":"eriknelson:kore-comm","ref":"kore-comm","sha":"7a98640fd33e10bbce851cab13f6c11eeab7f07d","user":{"login":"eriknelson","id":410933,"avatar_url":"https://avatars3.githubusercontent.com/u/410933?v=4","gravatar_id":"","url":"https://api.github.com/users/eriknelson","html_url":"https://github.com/eriknelson","followers_url":"https://api.github.com/users/eriknelson/followers","following_url":"https://api.github.com/users/eriknelson/following{/other_user}","gists_url":"https://api.github.com/users/eriknelson/gists{/gist_id}","starred_url":"https://api.github.com/users/eriknelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriknelson/subscriptions","organizations_url":"https://api.github.com/users/eriknelson/orgs","repos_url":"https://api.github.com/users/eriknelson/repos","events_url":"https://api.github.com/users/eriknelson/events{/privacy}","received_events_url":"https://api.github.com/users/eriknelson/received_events","type":"User","site_admin":false},"repo":{"id":101497841,"name":"kore-poc","full_name":"eriknelson/kore-poc","owner":{"login":"eriknelson","id":410933,"avatar_url":"https://avatars3.githubusercontent.com/u/410933?v=4","gravatar_id":"","url":"https://api.github.com/users/eriknelson","html_url":"https://github.com/eriknelson","followers_url":"https://api.github.com/users/eriknelson/followers","following_url":"https://api.github.com/users/eriknelson/following{/other_user}","gists_url":"https://api.github.com/users/eriknelson/gists{/gist_id}","starred_url":"https://api.github.com/users/eriknelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriknelson/subscriptions","organizations_url":"https://api.github.com/users/eriknelson/orgs","repos_url":"https://api.github.com/users/eriknelson/repos","events_url":"https://api.github.com/users/eriknelson/events{/privacy}","received_events_url":"https://api.github.com/users/eriknelson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eriknelson/kore-poc","description":null,"fork":true,"url":"https://api.github.com/repos/eriknelson/kore-poc","forks_url":"https://api.github.com/repos/eriknelson/kore-poc/forks","keys_url":"https://api.github.com/repos/eriknelson/kore-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eriknelson/kore-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eriknelson/kore-poc/teams","hooks_url":"https://api.github.com/repos/eriknelson/kore-poc/hooks","issue_events_url":"https://api.github.com/repos/eriknelson/kore-poc/issues/events{/number}","events_url":"https://api.github.com/repos/eriknelson/kore-poc/events","assignees_url":"https://api.github.com/repos/eriknelson/kore-poc/assignees{/user}","branches_url":"https://api.github.com/repos/eriknelson/kore-poc/branches{/branch}","tags_url":"https://api.github.com/repos/eriknelson/kore-poc/tags","blobs_url":"https://api.github.com/repos/eriknelson/kore-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eriknelson/kore-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eriknelson/kore-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/eriknelson/kore-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eriknelson/kore-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/eriknelson/kore-poc/languages","stargazers_url":"https://api.github.com/repos/eriknelson/kore-poc/stargazers","contributors_url":"https://api.github.com/repos/eriknelson/kore-poc/contributors","subscribers_url":"https://api.github.com/repos/eriknelson/kore-poc/subscribers","subscription_url":"https://api.github.com/repos/eriknelson/kore-poc/subscription","commits_url":"https://api.github.com/repos/eriknelson/kore-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/eriknelson/kore-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/eriknelson/kore-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/eriknelson/kore-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/eriknelson/kore-poc/contents/{+path}","compare_url":"https://api.github.com/repos/eriknelson/kore-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eriknelson/kore-poc/merges","archive_url":"https://api.github.com/repos/eriknelson/kore-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eriknelson/kore-poc/downloads","issues_url":"https://api.github.com/repos/eriknelson/kore-poc/issues{/number}","pulls_url":"https://api.github.com/repos/eriknelson/kore-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/eriknelson/kore-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/eriknelson/kore-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eriknelson/kore-poc/labels{/name}","releases_url":"https://api.github.com/repos/eriknelson/kore-poc/releases{/id}","deployments_url":"https://api.github.com/repos/eriknelson/kore-poc/deployments","created_at":"2017-08-26T16:23:25Z","updated_at":"2017-08-27T10:49:18Z","pushed_at":"2017-08-28T04:29:40Z","git_url":"git://github.com/eriknelson/kore-poc.git","ssh_url":"git@github.com:eriknelson/kore-poc.git","clone_url":"https://github.com/eriknelson/kore-poc.git","svn_url":"https://github.com/eriknelson/kore-poc","homepage":null,"size":249,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hegemone:master","ref":"master","sha":"ff6cb5f0b55d7a009eba37da3d9307f7eb247f8b","user":{"login":"hegemone","id":31334501,"avatar_url":"https://avatars3.githubusercontent.com/u/31334501?v=4","gravatar_id":"","url":"https://api.github.com/users/hegemone","html_url":"https://github.com/hegemone","followers_url":"https://api.github.com/users/hegemone/followers","following_url":"https://api.github.com/users/hegemone/following{/other_user}","gists_url":"https://api.github.com/users/hegemone/gists{/gist_id}","starred_url":"https://api.github.com/users/hegemone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hegemone/subscriptions","organizations_url":"https://api.github.com/users/hegemone/orgs","repos_url":"https://api.github.com/users/hegemone/repos","events_url":"https://api.github.com/users/hegemone/events{/privacy}","received_events_url":"https://api.github.com/users/hegemone/received_events","type":"Organization","site_admin":false},"repo":{"id":101367865,"name":"kore-poc","full_name":"hegemone/kore-poc","owner":{"login":"hegemone","id":31334501,"avatar_url":"https://avatars3.githubusercontent.com/u/31334501?v=4","gravatar_id":"","url":"https://api.github.com/users/hegemone","html_url":"https://github.com/hegemone","followers_url":"https://api.github.com/users/hegemone/followers","following_url":"https://api.github.com/users/hegemone/following{/other_user}","gists_url":"https://api.github.com/users/hegemone/gists{/gist_id}","starred_url":"https://api.github.com/users/hegemone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hegemone/subscriptions","organizations_url":"https://api.github.com/users/hegemone/orgs","repos_url":"https://api.github.com/users/hegemone/repos","events_url":"https://api.github.com/users/hegemone/events{/privacy}","received_events_url":"https://api.github.com/users/hegemone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hegemone/kore-poc","description":null,"fork":false,"url":"https://api.github.com/repos/hegemone/kore-poc","forks_url":"https://api.github.com/repos/hegemone/kore-poc/forks","keys_url":"https://api.github.com/repos/hegemone/kore-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hegemone/kore-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hegemone/kore-poc/teams","hooks_url":"https://api.github.com/repos/hegemone/kore-poc/hooks","issue_events_url":"https://api.github.com/repos/hegemone/kore-poc/issues/events{/number}","events_url":"https://api.github.com/repos/hegemone/kore-poc/events","assignees_url":"https://api.github.com/repos/hegemone/kore-poc/assignees{/user}","branches_url":"https://api.github.com/repos/hegemone/kore-poc/branches{/branch}","tags_url":"https://api.github.com/repos/hegemone/kore-poc/tags","blobs_url":"https://api.github.com/repos/hegemone/kore-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hegemone/kore-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hegemone/kore-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/hegemone/kore-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hegemone/kore-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/hegemone/kore-poc/languages","stargazers_url":"https://api.github.com/repos/hegemone/kore-poc/stargazers","contributors_url":"https://api.github.com/repos/hegemone/kore-poc/contributors","subscribers_url":"https://api.github.com/repos/hegemone/kore-poc/subscribers","subscription_url":"https://api.github.com/repos/hegemone/kore-poc/subscription","commits_url":"https://api.github.com/repos/hegemone/kore-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/hegemone/kore-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/hegemone/kore-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/hegemone/kore-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/hegemone/kore-poc/contents/{+path}","compare_url":"https://api.github.com/repos/hegemone/kore-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hegemone/kore-poc/merges","archive_url":"https://api.github.com/repos/hegemone/kore-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hegemone/kore-poc/downloads","issues_url":"https://api.github.com/repos/hegemone/kore-poc/issues{/number}","pulls_url":"https://api.github.com/repos/hegemone/kore-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/hegemone/kore-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/hegemone/kore-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hegemone/kore-poc/labels{/name}","releases_url":"https://api.github.com/repos/hegemone/kore-poc/releases{/id}","deployments_url":"https://api.github.com/repos/hegemone/kore-poc/deployments","created_at":"2017-08-25T05:03:42Z","updated_at":"2017-08-26T17:54:53Z","pushed_at":"2017-09-02T19:25:25Z","git_url":"git://github.com/hegemone/kore-poc.git","ssh_url":"git@github.com:hegemone/kore-poc.git","clone_url":"https://github.com/hegemone/kore-poc.git","svn_url":"https://github.com/hegemone/kore-poc","homepage":null,"size":321,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hegemone/kore-poc/pulls/3"},"html":{"href":"https://github.com/hegemone/kore-poc/pull/3"},"issue":{"href":"https://api.github.com/repos/hegemone/kore-poc/issues/3"},"comments":{"href":"https://api.github.com/repos/hegemone/kore-poc/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/hegemone/kore-poc/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/hegemone/kore-poc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hegemone/kore-poc/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/hegemone/kore-poc/statuses/7a98640fd33e10bbce851cab13f6c11eeab7f07d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"thefirstofthe300"}}