sarif

module
v0.0.0-...-0dfd57a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2020 License: MIT

README

sarif

Build Coverage API Documentation MIT License

Sarif is an experimental personal assistant and data analysis platform, bolted onto a distributed network of microservices. Seriously. This project pursues to provide the following things some time in the future:

  • A very simple network protocol based on JSON (see SPEC.md)
  • A network of extensible, interconnected services across devices
  • A natural user interface, via text and/or voice
  • A personal data analysis platform for quantified self tracking
  • Full commandline access and data export, and open source forever!
  • Hopefully in the future something that can be called an AI -- definitely not a GoogleTwitterWeatherBot

This is the message spec and reference implementation, written in Go. Since the project is currently in a prototype stage, it has a limited set of features out of the box and there may be lots of breaking changes. There is currently no documentation. Here be dragons. That said, the core functionality is there.

"A distributed AI with access to all your personal data and computers? What could possibly go wrong?"

Check Out The Demo!

Thanks to the awesome GopherJS, part of this project is continuously compiled into an enormous blob of JavaScript. Yeah, I know. This way, you can try the Web Dashboard. Currently, only a minimal set of modules is available there. And still no documentation.

In Detail

Sarif aspires to be a personal helper that has access to a range of different tools to aid in automating everyday life, an "intranet of apps". For example, your phone tracks your location and when Sarif notices that you are coming home, it boots your desktop pc for you and starts the music. Or reacts to chat commands, or displays notifications on your watch.

A microservice could be anything, e.g. a location publisher on your phone, a database server, a media player control, a webservice, a voice assistant / chatbot, or your personal context-aware artifical intelligence robot overlord.

Getting Started
$ go install github.com/sarifsystems/sarif/cmd/sarifd
$ go install github.com/sarifsystems/sarif/cmd/tars

$ sarifd -v
$ tars
> .ping
> remind me in 10 seconds that this thing works
> .full
> .cmd/catfacts

And take a look at cmd/examples/sarifping.

Design Goals

Interface-agnostic: Sarif should work "everywhere" and degrade gracefully. If you are on your phone, it should react to text messages. If you use your computer, it should display a dashboard, system notifications and rich controls. If you are at the commandline, Sarif should provide scripting and easy data access. If you are at home, a voice assistant could listen for commands. All these can be implemented as separate services.

Simple: Adding services should be as easy and future-proof as possible. Your service should not depend on a big Sarif library, a specific programming language or a complicated message format. That is why a Sarif message is a simple JSON object sent over TCP/TLS. Ideally, you could connect your application to the Sarif network in under 100 lines of code, from scratch without any libraries.

Modular: There should be no overarching core service that handles everything, all services should be exchangeable and stand on equal footing. For example, it should be possible to remove the NLP service that understands your text commands and replace it with your own voice-controlled robot. Hey, you could even take the message specification and write your own server.

Inspired by:

  • Google Now / Siri / Cortana
  • The Internet of Things
  • If This Then That
  • JARVIS, TARS, GERTY, Samaritan and Skynet

Directories

Path Synopsis
cmd
examples/sarifping
A simple sarif client that pings the network every second and prints the results.
A simple sarif client that pings the network every second and prints the results.
sarifd
A simple server that can host different sarif services.
A simple server that can host different sarif services.
tars
A commandline client acting as swiss army knife.
A commandline client acting as swiss army knife.
util/js
A limited GopherJS demo version.
A limited GopherJS demo version.
util/kipp
KIPP is a desktop daemon that serves notifications and provides local access.
KIPP is a desktop daemon that serves notifications and provides local access.
util/soji
A client for presenting a statusbar in the shell/tmux.
A client for presenting a statusbar in the shell/tmux.
Package core handles most of the common db, config and proto initialization.
Package core handles most of the common db, config and proto initialization.
apphost
Package apphost provides a modular host for microservices.
Package apphost provides a modular host for microservices.
server
Package server provides a broker and modular host for microservices.
Package server provides a broker and modular host for microservices.
pkg
content
Package content provides an interface to exchange content via messages.
Package content provides an interface to exchange content via messages.
datasets/commands
Package commands contains a dataset of common user commands.
Package commands contains a dataset of common user commands.
datasets/en
Package en contains a dataset of english words and phrases.
Package en contains a dataset of english words and phrases.
datasets/twpos
Package twpos contains the Twitter Part-of-Speech Annotated Data.
Package twpos contains the Twitter Part-of-Speech Annotated Data.
fddb
Package fddb implements part of the API of http://fddb.info
Package fddb implements part of the API of http://fddb.info
inject
Package inject provides a simple dependency injector.
Package inject provides a simple dependency injector.
luareflect
Package luareflect implements simple mappings from Go to Gopher-Lua types.
Package luareflect implements simple mappings from Go to Gopher-Lua types.
mapq
Package mapq provides aggregation and filtering functions for generic maps
Package mapq provides aggregation and filtering functions for generic maps
mlearning
Package mlearning provides a few abstracted machine learning algorithms.
Package mlearning provides a few abstracted machine learning algorithms.
natural
Package natural contains a multitude of natural language parsers.
Package natural contains a multitude of natural language parsers.
renderer
Package renderer generates info card images from data templates.
Package renderer generates info card images from data templates.
schema
Package schema provides simple JSON-LD type annotations for structs.
Package schema provides simple JSON-LD type annotations for structs.
selfspy
Package selfspy provides access to the selfspy database.
Package selfspy provides access to the selfspy database.
sparql
Package sparql implements a simple SPARQL client and query builder.
Package sparql implements a simple SPARQL client and query builder.
Package sarif implements the sarif protocol, including client and broker.
Package sarif implements the sarif protocol, including client and broker.
auth
Service auth provides token and challenge based auth.
Service auth provides token and challenge based auth.
commands
Service commands provides a variety of simple functions.
Service commands provides a variety of simple functions.
dbus
Service dbus provides access to DBUS notifications and system state.
Service dbus provides access to DBUS notifications and system state.
events
Service events stores and manipulates timeseries data.
Service events stores and manipulates timeseries data.
hostscan
Service hostscan scans the local network for devices and provides status updates.
Service hostscan scans the local network for devices and provides status updates.
js
Service js provides JavaScript scripting for the sarif network.
Service js provides JavaScript scripting for the sarif network.
jsonapi
Service jsonapi provides a simple REST client
Service jsonapi provides a simple REST client
know
Service know answers questions by asking multiple knowledge providers.
Service know answers questions by asking multiple knowledge providers.
lastfm
Service lastfm provides access to Last.FM API and stores the user library.
Service lastfm provides access to Last.FM API and stores the user library.
location
Service location stores the user location and provides automatic checkins and geocoding.
Service location stores the user location and provides automatic checkins and geocoding.
logger
Service logger logs matching messages to file or stdout.
Service logger logs matching messages to file or stdout.
lua
Service lua provides Lua scripting for the sarif network.
Service lua provides Lua scripting for the sarif network.
meals
Service meals tracks calories and imports them from fddb.
Service meals tracks calories and imports them from fddb.
mock
Service mock provides examples and testing data.
Service mock provides examples and testing data.
mpd
Service mpd can control the Music Player Daemon.
Service mpd can control the Music Player Daemon.
natural
Service natural provides a conversational interface to the sarif network.
Service natural provides a conversational interface to the sarif network.
pushgateway
Service pushgateway provides notifications to FCM
Service pushgateway provides notifications to FCM
reasoner
Service reasoner provides a knowledge base and inference engine.
Service reasoner provides a knowledge base and inference engine.
scheduler
Service scheduler provides reminders and scheduled task messages.
Service scheduler provides reminders and scheduled task messages.
scrobbler
Service scrobbler scrobbles tracks to Last.fm
Service scrobbler scrobbles tracks to Last.fm
store
Service store provides a key-value store to the sarif network.
Service store provides a key-value store to the sarif network.
store/bolt
BoltDB driver for the store service.
BoltDB driver for the store service.
store/es7
Elasticsearch 7 driver for the store service.
Elasticsearch 7 driver for the store service.
store/replicate
Replicate driver for writing to two drivers
Replicate driver for writing to two drivers
vdir
Service vdir provides access to VCard contacts and VCal calendars.
Service vdir provides access to VCard contacts and VCal calendars.
web
Service web provides a web dashboard and communication between sarif and HTTP.
Service web provides a web dashboard and communication between sarif and HTTP.
xmpp
Service xmpp provides access to the sarif network over XMPP.
Service xmpp provides access to the sarif network over XMPP.
transports

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL