Fix the verbs in Sandstorm activity events

@0xbbbe049af795122e;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
	# The package definition. Note that the spk tool looks specifically for the
	# "pkgdef" constant.

	id = "vfnwptfn02ty21w715snyyczw0nqxkv3jvawcah10c6z7hj1hnu0",
	# Your app ID is actually its public key. The private key was placed in
	# your keyring. All updates must be signed with the same key.

	manifest = (
		# This manifest is included in your app package to tell Sandstorm
		# about your app.

		appTitle = (defaultText = "Rocket.Chat"),

		appVersion = 38,  # Increment this for every release.

		appMarketingVersion = (defaultText = "0.37.1"),
		# Human-readable representation of appVersion. Should match the way you
		# identify versions of your app in documentation and marketing.

		actions = [
			# Define your "new document" handlers here.
			( title = (defaultText = "New Rocket.Chat"),
				command = .myCommand
				# The command to run when starting for the first time. (".myCommand"
				# is just a constant defined at the bottom of the file.)
			)
		],

		continueCommand = .myCommand,
		# This is the command called to start your app back up after it has been
		# shut down for inactivity. Here we're using the same command as for
		# starting a new instance, but you could use different commands for each
		# case.

		metadata = (
			icons = (
				appGrid = (svg = embed "rocket.chat-128.svg"),
				grain = (svg = embed "rocket.chat-24.svg"),
				market = (svg = embed "rocket.chat-150.svg"),
			),

			website = "https://rocket.chat",
			codeUrl = "https://github.com/RocketChat/Rocket.Chat",
			license = (openSource = mit),
			categories = [communications, productivity, office, social, developerTools],

			author = (
				contactEmail = "team@rocket.chat",
				pgpSignature = embed "pgp-signature",
				upstreamAuthor = "Rocket.Chat",
			),
			pgpKeyring = embed "pgp-keyring",

			description = (defaultText = embed "description.md"),
			shortDescription = (defaultText = "Chat app"),

			screenshots = [
				(width = 1024, height = 696, png = embed "screenshot1.png"),
				(width = 1024, height = 696, png = embed "screenshot2.png"),
				(width = 1024, height = 696, png = embed "screenshot3.png"),
				(width = 1024, height = 696, png = embed "screenshot4.png")
			],

			changeLog = (defaultText = embed "CHANGELOG.md"),
		),

	),

	sourceMap = (
		# The following directories will be copied into your package.
		searchPath = [
			( sourcePath = "/home/vagrant/bundle" ),
			( sourcePath = "/opt/meteor-spk/meteor-spk.deps" )
		]
	),

	alwaysInclude = [ "." ],
	# This says that we always want to include all files from the source map.
	# (An alternative is to automatically detect dependencies by watching what
	# the app opens while running in dev mode. To see what that looks like,
	# run `spk init` without the -A option.)

  bridgeConfig = (
    viewInfo = (
      eventTypes = [
				(name = "message", verbPhrase = (defaultText = "message sent")),
				(name = "privateMessage", verbPhrase = (defaultText = "private message sent"), requiredPermission = (explicitList = void)),
			]
    ),

    saveIdentityCaps = true,
  ),
);

const myCommand :Spk.Manifest.Command = (
	# Here we define the command used to start up your server.
	argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"],
	environ = [
		# Note that this defines the *entire* environment seen by your app.
		(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
		(key = "SANDSTORM", value = "1"),
		(key = "Statistics_reporting", value = "false"),
		(key = "Accounts_AllowUserAvatarChange", value = "false"),
		(key = "Accounts_AllowUserProfileChange", value = "false")
	]
);

@0xbbbe049af795122e;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
	# The package definition. Note that the spk tool looks specifically for the
	# "pkgdef" constant.

	id = "vfnwptfn02ty21w715snyyczw0nqxkv3jvawcah10c6z7hj1hnu0",
	# Your app ID is actually its public key. The private key was placed in
	# your keyring. All updates must be signed with the same key.

	manifest = (
		# This manifest is included in your app package to tell Sandstorm
		# about your app.

		appTitle = (defaultText = "Rocket.Chat"),

		appVersion = 38,  # Increment this for every release.

		appMarketingVersion = (defaultText = "0.37.1"),
		# Human-readable representation of appVersion. Should match the way you
		# identify versions of your app in documentation and marketing.

		actions = [
			# Define your "new document" handlers here.
			( title = (defaultText = "New Rocket.Chat"),
				command = .myCommand
				# The command to run when starting for the first time. (".myCommand"
				# is just a constant defined at the bottom of the file.)
			)
		],

		continueCommand = .myCommand,
		# This is the command called to start your app back up after it has been
		# shut down for inactivity. Here we're using the same command as for
		# starting a new instance, but you could use different commands for each
		# case.

		metadata = (
			icons = (
				appGrid = (svg = embed "rocket.chat-128.svg"),
				grain = (svg = embed "rocket.chat-24.svg"),
				market = (svg = embed "rocket.chat-150.svg"),
			),

			website = "https://rocket.chat",
			codeUrl = "https://github.com/RocketChat/Rocket.Chat",
			license = (openSource = mit),
			categories = [communications, productivity, office, social, developerTools],

			author = (
				contactEmail = "team@rocket.chat",
				pgpSignature = embed "pgp-signature",
				upstreamAuthor = "Rocket.Chat",
			),
			pgpKeyring = embed "pgp-keyring",

			description = (defaultText = embed "description.md"),
			shortDescription = (defaultText = "Chat app"),

			screenshots = [
				(width = 1024, height = 696, png = embed "screenshot1.png"),
				(width = 1024, height = 696, png = embed "screenshot2.png"),
				(width = 1024, height = 696, png = embed "screenshot3.png"),
				(width = 1024, height = 696, png = embed "screenshot4.png")
			],

			changeLog = (defaultText = embed "CHANGELOG.md"),
		),

	),

	sourceMap = (
		# The following directories will be copied into your package.
		searchPath = [
			( sourcePath = "/home/vagrant/bundle" ),
			( sourcePath = "/opt/meteor-spk/meteor-spk.deps" )
		]
	),

	alwaysInclude = [ "." ],
	# This says that we always want to include all files from the source map.
	# (An alternative is to automatically detect dependencies by watching what
	# the app opens while running in dev mode. To see what that looks like,
	# run `spk init` without the -A option.)

  bridgeConfig = (
    viewInfo = (
      eventTypes = [
				(name = "message", verbPhrase = (defaultText = "message received")),
				(name = "privateMessage", verbPhrase = (defaultText = "private message received"), requiredPermission = (explicitList = void)),
			]
    ),

    saveIdentityCaps = true,
  ),
);

const myCommand :Spk.Manifest.Command = (
	# Here we define the command used to start up your server.
	argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"],
	environ = [
		# Note that this defines the *entire* environment seen by your app.
		(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
		(key = "SANDSTORM", value = "1"),
		(key = "Statistics_reporting", value = "false"),
		(key = "Accounts_AllowUserAvatarChange", value = "false"),
		(key = "Accounts_AllowUserProfileChange", value = "false")
	]
);


sandstorm package screenshots

sandstorm package screenshots

@0xe102d2c131b69f04;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "u1pa4174jqhvn93fkgr6u07mfgpk53dtgvfqqz9hec0pxk6c8nuh",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "Neuron Catalog"),

    appVersion = 0,  # Increment this for every release.

    appMarketingVersion = (defaultText = "0.0.0"),
    # Human-readable representation of appVersion. Should match the way you
    # identify versions of your app in documentation and marketing.

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Neuron Catalog"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand,
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.

    metadata = (
      # Data which is not needed specifically to execute the app, but is useful
      # for purposes like marketing and display.  These fields are documented at
      # https://docs.sandstorm.io/en/latest/developing/publishing-apps/#add-required-metadata
      # and (in deeper detail) in the sandstorm source code, in the Metadata section of
      # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/package.capnp
      icons = (
        # Various icons to represent the app in various contexts.
        appGrid = (svg = embed "icons/appGrid.svg"),
        grain = (svg = embed "icons/grain.svg"),
        market = (svg = embed "icons/market.svg"),
        # marketBig = (svg = embed "path/to/market-big-300x300.svg"),
      ),

      website = "https://strawlab.org/neuron-catalog",

      codeUrl = "https://github.com/strawlab/neuron-catalog",
      # URL of the app's source code repository, e.g. a GitHub URL.
      # Required if you specify a license requiring redistributing code, but optional otherwise.

      license = (openSource = agpl3),

      categories = [science, productivity],
      # A list of categories/genres to which this app belongs, sorted with best fit first.
      # See the list of categories at
      # https://docs.sandstorm.io/en/latest/developing/publishing-apps/#categories

      author = (
        # Fields relating to the author of this app.

        contactEmail = "strawman@astraw.com",

        pgpSignature = embed "pgp-signature",
        # PGP signature attesting responsibility for the app ID. This is a binary-format detached
        # signature of the following ASCII message (not including the quotes, no newlines, and
        # replacing <app-id> with the standard base-32 text format of the app's ID):
        #
        # "I am the author of the Sandstorm.io app with the following ID: <app-id>"
        #
        # You can create a signature file using `gpg` like so:
        #
        #     echo -n "I am the author of the Sandstorm.io app with the following ID: <app-id>" | gpg --sign > pgp-signature
        #
        # Further details including how to set up GPG and how to use keybase.io can be found
        # at https://docs.sandstorm.io/en/latest/developing/publishing-apps/#verify-your-identity

        # upstreamAuthor = "Andrew Straw",
        # Name of the original primary author of this app, if it is different from the person who
        # produced the Sandstorm package. Setting this implies that the author connected to the PGP
        # signature only "packaged" the app for Sandstorm, rather than developing the app.
        # Remove this line if you consider yourself as the author of the app.
      ),

      pgpKeyring = embed "pgp-keyring",
      # A keyring in GPG keyring format containing all public keys needed to verify PGP signatures in
      # this manifest (as of this writing, there is only one: `author.pgpSignature`).
      #
      # To generate a keyring containing just your public key, do:
      #
      #     gpg --export <key-id> > keyring
      #
      # Where `<key-id>` is a PGP key ID or email address associated with the key.

      description = (defaultText = embed "description.md"),
      # The app's description in Github-flavored Markdown format, to be displayed e.g.
      # in an app store. Note that the Markdown is not permitted to contain HTML nor image tags (but
      # you can include a list of screenshots separately).

      shortDescription = (defaultText = "Record keeping"),
      # A very short (one-to-three words) description of what the app does. For example,
      # "Document editor", or "Notetaking", or "Email client". This will be displayed under the app
      # title in the grid view in the app market.

      screenshots = [
        # Screenshots to use for marketing purposes.  Examples below.
        # Sizes are given in device-independent pixels, so if you took these
        # screenshots on a Retina-style high DPI screen, divide each dimension by two.

        (width = 823, height = 478, png = embed "screenshots/binary-data.png"),
        (width = 822, height = 703, png = embed "screenshots/neuron-types.png"),
      ],
      #changeLog = (defaultText = embed "path/to/sandstorm-specific/changelog.md"),
      # Documents the history of changes in Github-flavored markdown format (with the same restrictions
      # as govern `description`). We recommend formatting this with an H1 heading for each version
      # followed by a bullet list of changes.
    ),
  ),

  sourceMap = (
    # The following directories will be copied into your package.
    searchPath = [
      ( sourcePath = "/home/vagrant/bundle" ),
      ( sourcePath = "/opt/meteor-spk/meteor-spk.deps" )
    ]
  ),

  alwaysInclude = [ "." ],
  # This says that we always want to include all files from the source map.
  # (An alternative is to automatically detect dependencies by watching what
  # the app opens while running in dev mode. To see what that looks like,
  # run `spk init` without the -A option.)

  bridgeConfig = (
    viewInfo = (
      permissions = [(name = "read"), (name = "write"), (name = "admin")],
      roles = [(title = (defaultText = "reader"),
                permissions = [true, false, false]),
               (title = (defaultText = "writer"),
                permissions = [true, true, false]),
               (title = (defaultText = "admin"),
                permissions = [true, true, true])]
    )
  )
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "SANDSTORM", value = "1"),
    # Export SANDSTORM=1 into the environment, so that apps running within Sandstorm
    # can detect if $SANDSTORM="1" at runtime, switching UI and/or backend to use
    # the app's Sandstorm-specific integration code.
  ]
);

@0xe102d2c131b69f04;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "u1pa4174jqhvn93fkgr6u07mfgpk53dtgvfqqz9hec0pxk6c8nuh",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "Neuron Catalog"),

    appVersion = 0,  # Increment this for every release.

    appMarketingVersion = (defaultText = "0.0.0"),
    # Human-readable representation of appVersion. Should match the way you
    # identify versions of your app in documentation and marketing.

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Neuron Catalog"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand,
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.

    metadata = (
      # Data which is not needed specifically to execute the app, but is useful
      # for purposes like marketing and display.  These fields are documented at
      # https://docs.sandstorm.io/en/latest/developing/publishing-apps/#add-required-metadata
      # and (in deeper detail) in the sandstorm source code, in the Metadata section of
      # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/package.capnp
      icons = (
        # Various icons to represent the app in various contexts.
        appGrid = (svg = embed "icons/appGrid.svg"),
        grain = (svg = embed "icons/grain.svg"),
        market = (svg = embed "icons/market.svg"),
        # marketBig = (svg = embed "path/to/market-big-300x300.svg"),
      ),

      website = "https://strawlab.org/neuron-catalog",

      codeUrl = "https://github.com/strawlab/neuron-catalog",
      # URL of the app's source code repository, e.g. a GitHub URL.
      # Required if you specify a license requiring redistributing code, but optional otherwise.

      license = (openSource = agpl3),

      categories = [science, productivity],
      # A list of categories/genres to which this app belongs, sorted with best fit first.
      # See the list of categories at
      # https://docs.sandstorm.io/en/latest/developing/publishing-apps/#categories

      author = (
        # Fields relating to the author of this app.

        contactEmail = "strawman@astraw.com",

        pgpSignature = embed "pgp-signature",
        # PGP signature attesting responsibility for the app ID. This is a binary-format detached
        # signature of the following ASCII message (not including the quotes, no newlines, and
        # replacing <app-id> with the standard base-32 text format of the app's ID):
        #
        # "I am the author of the Sandstorm.io app with the following ID: <app-id>"
        #
        # You can create a signature file using `gpg` like so:
        #
        #     echo -n "I am the author of the Sandstorm.io app with the following ID: <app-id>" | gpg --sign > pgp-signature
        #
        # Further details including how to set up GPG and how to use keybase.io can be found
        # at https://docs.sandstorm.io/en/latest/developing/publishing-apps/#verify-your-identity

        # upstreamAuthor = "Andrew Straw",
        # Name of the original primary author of this app, if it is different from the person who
        # produced the Sandstorm package. Setting this implies that the author connected to the PGP
        # signature only "packaged" the app for Sandstorm, rather than developing the app.
        # Remove this line if you consider yourself as the author of the app.
      ),

      pgpKeyring = embed "pgp-keyring",
      # A keyring in GPG keyring format containing all public keys needed to verify PGP signatures in
      # this manifest (as of this writing, there is only one: `author.pgpSignature`).
      #
      # To generate a keyring containing just your public key, do:
      #
      #     gpg --export <key-id> > keyring
      #
      # Where `<key-id>` is a PGP key ID or email address associated with the key.

      description = (defaultText = embed "description.md"),
      # The app's description in Github-flavored Markdown format, to be displayed e.g.
      # in an app store. Note that the Markdown is not permitted to contain HTML nor image tags (but
      # you can include a list of screenshots separately).

      shortDescription = (defaultText = "Record keeping"),
      # A very short (one-to-three words) description of what the app does. For example,
      # "Document editor", or "Notetaking", or "Email client". This will be displayed under the app
      # title in the grid view in the app market.

      screenshots = [
        # Screenshots to use for marketing purposes.  Examples below.
        # Sizes are given in device-independent pixels, so if you took these
        # screenshots on a Retina-style high DPI screen, divide each dimension by two.

        #(width = 746, height = 795, jpeg = embed "path/to/screenshot-1.jpeg"),
        #(width = 640, height = 480, png = embed "path/to/screenshot-2.png"),
      ],
      #changeLog = (defaultText = embed "path/to/sandstorm-specific/changelog.md"),
      # Documents the history of changes in Github-flavored markdown format (with the same restrictions
      # as govern `description`). We recommend formatting this with an H1 heading for each version
      # followed by a bullet list of changes.
    ),
  ),

  sourceMap = (
    # The following directories will be copied into your package.
    searchPath = [
      ( sourcePath = "/home/vagrant/bundle" ),
      ( sourcePath = "/opt/meteor-spk/meteor-spk.deps" )
    ]
  ),

  alwaysInclude = [ "." ],
  # This says that we always want to include all files from the source map.
  # (An alternative is to automatically detect dependencies by watching what
  # the app opens while running in dev mode. To see what that looks like,
  # run `spk init` without the -A option.)

  bridgeConfig = (
    viewInfo = (
      permissions = [(name = "read"), (name = "write"), (name = "admin")],
      roles = [(title = (defaultText = "reader"),
                permissions = [true, false, false]),
               (title = (defaultText = "writer"),
                permissions = [true, true, false]),
               (title = (defaultText = "admin"),
                permissions = [true, true, true])]
    )
  )
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "SANDSTORM", value = "1"),
    # Export SANDSTORM=1 into the environment, so that apps running within Sandstorm
    # can detect if $SANDSTORM="1" at runtime, switching UI and/or backend to use
    # the app's Sandstorm-specific integration code.
  ]
);


Switch to absolute import paths for capnp.

@0xaf55f2dcb92e4304;

# TODO: Use absolute path
using import "/nupic/math/SparseBinaryMatrixProto.capnp".SparseBinaryMatrixProto;
using import "/nupic/math/SparseMatrixProto.capnp".SparseMatrixProto;
using import "/nupic/utils/RandomProto.capnp".RandomProto;

# Next ID: 37
struct SpatialPoolerProto {
  random @0 :RandomProto;
  numInputs @1 :UInt32;
  numColumns @2 :UInt32;
  columnDimensions @3 :List(UInt32);
  inputDimensions @4 :List(UInt32);
  potentialRadius @5 :UInt32;
  potentialPct @6 :Float32;
  inhibitionRadius @35 :UInt32;
  globalInhibition @7 :Bool;
  numActiveColumnsPerInhArea @8 :UInt32;
  localAreaDensity @9 :Float32;
  stimulusThreshold @10 :UInt32;
  synPermInactiveDec @11 :Float32;
  synPermActiveInc @12 :Float32;
  synPermBelowStimulusInc @13 :Float32;
  synPermConnected @14 :Float32;
  minPctOverlapDutyCycles @15 :Float32;
  minPctActiveDutyCycles @16 :Float32;
  dutyCyclePeriod @17 :UInt16;
  maxBoost @18 :Float32;
  wrapAround @36 :Bool;
  spVerbosity @19 :UInt8;

  synPermMin @20 :Float32;
  synPermMax @21 :Float32;
  synPermTrimThreshold @22 :Float32;
  updatePeriod @23 :UInt16;

  version @24 :UInt16;
  iterationNum @25 :UInt32;
  iterationLearnNum @26 :UInt32;

  # List length equals number of columns, elements are indices of input bits
  # in potential pool
  potentialPools @27 :SparseBinaryMatrixProto;

  # List length equals number of columns, elements are SparseFloat instances with
  # an input bit index and the permanence value for all non-zero permanences.
  permanences @28 :SparseMatrixProto;

  # Tie break float values for each column to break ties
  tieBreaker @29 :List(Float32);

  overlapDutyCycles @30 :List(Float32);
  activeDutyCycles @31 :List(Float32);
  minOverlapDutyCycles @32 :List(Float32);
  minActiveDutyCycles @33 :List(Float32);
  boostFactors @34 :List(Float32);
}

@0xaf55f2dcb92e4304;

# TODO: Use absolute path
using import "../math/SparseBinaryMatrixProto.capnp".SparseBinaryMatrixProto;
using import "../math/SparseMatrixProto.capnp".SparseMatrixProto;
using import "../utils/RandomProto.capnp".RandomProto;

# Next ID: 37
struct SpatialPoolerProto {
  random @0 :RandomProto;
  numInputs @1 :UInt32;
  numColumns @2 :UInt32;
  columnDimensions @3 :List(UInt32);
  inputDimensions @4 :List(UInt32);
  potentialRadius @5 :UInt32;
  potentialPct @6 :Float32;
  inhibitionRadius @35 :UInt32;
  globalInhibition @7 :Bool;
  numActiveColumnsPerInhArea @8 :UInt32;
  localAreaDensity @9 :Float32;
  stimulusThreshold @10 :UInt32;
  synPermInactiveDec @11 :Float32;
  synPermActiveInc @12 :Float32;
  synPermBelowStimulusInc @13 :Float32;
  synPermConnected @14 :Float32;
  minPctOverlapDutyCycles @15 :Float32;
  minPctActiveDutyCycles @16 :Float32;
  dutyCyclePeriod @17 :UInt16;
  maxBoost @18 :Float32;
  wrapAround @36 :Bool;
  spVerbosity @19 :UInt8;

  synPermMin @20 :Float32;
  synPermMax @21 :Float32;
  synPermTrimThreshold @22 :Float32;
  updatePeriod @23 :UInt16;

  version @24 :UInt16;
  iterationNum @25 :UInt32;
  iterationLearnNum @26 :UInt32;

  # List length equals number of columns, elements are indices of input bits
  # in potential pool
  potentialPools @27 :SparseBinaryMatrixProto;

  # List length equals number of columns, elements are SparseFloat instances with
  # an input bit index and the permanence value for all non-zero permanences.
  permanences @28 :SparseMatrixProto;

  # Tie break float values for each column to break ties
  tieBreaker @29 :List(Float32);

  overlapDutyCycles @30 :List(Float32);
  activeDutyCycles @31 :List(Float32);
  minOverlapDutyCycles @32 :List(Float32);
  minActiveDutyCycles @33 :List(Float32);
  boostFactors @34 :List(Float32);
}


Bump version.

Bump version.

@0x93020f652e8a8459;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "h37dm17aa89yrd8zuqpdn36p6zntumtv08fjpu8a8zrte7q1cn60",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "Etherpad"),

    appVersion = 10,  # Increment this for every release.

    appMarketingVersion = (defaultText = "2015.08.01 (1.5.6+)"),

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Etherpad Document"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = ["src"],
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.

  bridgeConfig = (
    viewInfo = (
      permissions = [(name = "modify", title = (defaultText = "modify"),
                      description = (defaultText = "allows modifying the document")),
                     (name = "comment", title = (defaultText = "comment"),
                      description = (defaultText = "allows adding comments"))],
      roles = [(title = (defaultText = "editor"),
                permissions = [true, true],
                verbPhrase = (defaultText = "can edit"),
                default = true),
               (title = (defaultText = "viewer"),
                permissions = [false, false],
                verbPhrase = (defaultText = "can view")),
               (title = (defaultText = "commenter"),
                permissions = [false, true],
                verbPhrase = (defaultText = "can comment"))]
    )
  )
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "9001", "--", "bin/run.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);

@0x93020f652e8a8459;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "h37dm17aa89yrd8zuqpdn36p6zntumtv08fjpu8a8zrte7q1cn60",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "Etherpad"),

    appVersion = 9,  # Increment this for every release.

    appMarketingVersion = (defaultText = "2015.06.18 (1.5.6+)"),

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Etherpad Document"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = ["src"],
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.

  bridgeConfig = (
    viewInfo = (
      permissions = [(name = "modify", title = (defaultText = "modify"),
                      description = (defaultText = "allows modifying the document")),
                     (name = "comment", title = (defaultText = "comment"),
                      description = (defaultText = "allows adding comments"))],
      roles = [(title = (defaultText = "editor"),
                permissions = [true, true],
                verbPhrase = (defaultText = "can edit"),
                default = true),
               (title = (defaultText = "viewer"),
                permissions = [false, false],
                verbPhrase = (defaultText = "can view")),
               (title = (defaultText = "commenter"),
                permissions = [false, true],
                verbPhrase = (defaultText = "can comment"))]
    )
  )
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "9001", "--", "bin/run.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);


Revise comments following feedback in anticipation of merge

@0xfa7d16f86048a6e4;

# Next ID: 10
struct ScalarEncoderProto {
  w @0 :UInt32;
  minval @1 :Float32;
  maxval @2 :Float32;
  periodic @3 :Bool;
  n @4 :UInt32;
  radius @5 :Float32;
  resolution @6 :Float32;
  name @7 :Text;
  verbosity @8 :UInt8;
  clipInput @9 :Bool;
}

@0xfa7d16f86048a6e4;

struct ScalarEncoderProto {
  # ScalarEncoder() constructor signature

  w @0 :UInt32;
  minval @1 :Float32;
  maxval @2 :Float32;
  periodic @3 :Bool;
  n @4 :UInt32;
  radius @5 :Float32;
  resolution @6 :Float32;
  name @7 :Text;
  verbosity @8 :UInt8;
  clipInput @9 :Bool;
}


Removed variable field from SetExpr (should not have been added)

# The MIT License (MIT)
#
# Copyright (c) 2015 Andrey Bernstein and Niek J. Bouman
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
@0xdb1b4800e80dbd2d;
using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("msg");
#
# COMMELEC message format v1.0
#
# Specified in Cap'n Proto's schema language (Requires Cap'n Proto v0.5
#   [ http://kentonv.github.io/capnproto/language.html ]
#
# Copyright (c) 2015 by Andrey Bernstein & Niek J. Bouman
#
# EPFL - Swiss Federal Institute of Technology Lausanne

#=====================================================
# Top-Level "Message" Type, Request and Advertisement
#=====================================================

struct Message {
    agentId                   @0 :UInt32;
    union {
      request                 @1 :Request;
      advertisement           @2 :Advertisement;
    }
}

struct Request {
    setpoint                  @0 :List(Float64);
}

struct Advertisement {
    pQProfile                 @0 :SetExpr;
    beliefFunction            @1 :SetExpr;
    costFunction              @2 :RealExpr;
    implementedSetpoint       @3 :List(Float64);
}

#==============================================
# Definition of RealExpr and its child structs
#==============================================

struct RealExpr {
    name                      @0 :Text;
    union {
      real                    @1 :Float64;
      polynomial              @2 :Polynomial;
      unaryOperation          @3 :UnaryOperation;
      binaryOperation         @4 :BinaryOperation;
      listOperation           @5 :ListOperation;
      caseDistinction         @6 :CaseDistinction(RealExpr);
      reference               @7 :Text;
      variable                @8 :Text;
    }
}

struct UnaryOperation {
    arg                       @0 :RealExpr;
    operation :union {
      negate                  @1  :Void;
      abs                     @2  :Void;
      sign                    @3  :Void;
      multInv                 @4  :Void;
      square                  @5  :Void;
      sqrt                    @6  :Void;
      sin                     @7  :Void;
      cos                     @8  :Void;
      tan                     @9  :Void;
      exp                     @10 :Void;
      ln                      @11 :Void;
      log10                   @12 :Void;
      round                   @13 :Void;
      floor                   @14 :Void;
      ceil                    @15 :Void;
    }
}

struct BinaryOperation {
    argA                      @0 :RealExpr;
    argB                      @1 :RealExpr;
    operation :union {
      sum                     @2 :Void;
      prod                    @3 :Void;
      pow                     @4 :Void;
      min                     @5 :Void;
      max                     @6 :Void;
      lessEqThan              @7 :Void; # expression yields a boolean
      greaterThan             @8 :Void; # expression yields a boolean
    }
}

struct ListOperation {
    args                      @0 :List(RealExpr);
    operation :union {
      sum                     @1 :Void;
      prod                    @2 :Void;
    }
}

struct Polynomial {
    variables                 @0 :List(Text);
    maxVarDegree              @1 :UInt8;
    coefficients              @2 :List(SparseCoeff);
}

struct SparseCoeff {
    offset                    @0 :UInt32;
    value                     @1 :Float64;
}

struct CaseDistinction(CaseType) {
    variables                 @0 :List(Text);
    cases                     @1 :List(ExprCase(CaseType));
}

struct ExprCase(CaseType) {
    # Representation of a single case for use in CaseDistinction
    # (order of evaluation follows List ordering)
    set                       @0 :SetExpr;
    expression                @1 :CaseType;
}

#=============================================
# Definition of SetExpr and its child structs
#=============================================

struct SetExpr {
    name                      @0 :Text;
    union {
      singleton               @1  :List(RealExpr); # dimension of the point equals the length of the list
      ball                    @2  :Ball;
      rectangle               @3  :List(BoundaryPair);
      convexPolytope          @4  :ConvexPolytope;
      intersection            @5  :List(SetExpr);
      caseDistinction         @6  :CaseDistinction(SetExpr);
      reference               @7  :Text;
    }
}

struct Ball {
    center                    @0 :List(RealExpr);
    radius                    @1 :RealExpr;
}

struct BoundaryPair {
    boundA                    @0 :RealExpr; # the "interpreter" is responsible for sorting
    boundB                    @1 :RealExpr; # the bounds, i.e., which bound is min and max
}

struct ConvexPolytope {
    # A convex polytope formed by linear constraints
    # In case of a polygon, i.e., a two-dimensional polytope, the
    # length of the inner list of field 'a' will be equal to two.
    a                         @0 :List(List(RealExpr));
    b                         @1 :List(RealExpr);
}

# The MIT License (MIT)
#
# Copyright (c) 2015 Andrey Bernstein and Niek J. Bouman
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
@0xdb1b4800e80dbd2d;
using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("msg");
#
# COMMELEC message format v1.0
#
# Specified in Cap'n Proto's schema language (Requires Cap'n Proto v0.5
#   [ http://kentonv.github.io/capnproto/language.html ]
#
# Copyright (c) 2015 by Andrey Bernstein & Niek J. Bouman
#
# EPFL - Swiss Federal Institute of Technology Lausanne

#=====================================================
# Top-Level "Message" Type, Request and Advertisement
#=====================================================

struct Message {
    agentId                   @0 :UInt32;
    union {
      request                 @1 :Request;
      advertisement           @2 :Advertisement;
    }
}

struct Request {
    setpoint                  @0 :List(Float64);
}

struct Advertisement {
    pQProfile                 @0 :SetExpr;
    beliefFunction            @1 :SetExpr;
    costFunction              @2 :RealExpr;
    implementedSetpoint       @3 :List(Float64);
}

#==============================================
# Definition of RealExpr and its child structs
#==============================================

struct RealExpr {
    name                      @0 :Text;
    union {
      real                    @1 :Float64;
      polynomial              @2 :Polynomial;
      unaryOperation          @3 :UnaryOperation;
      binaryOperation         @4 :BinaryOperation;
      listOperation           @5 :ListOperation;
      caseDistinction         @6 :CaseDistinction(RealExpr);
      reference               @7 :Text;
      variable                @8 :Text;
     }
}

struct UnaryOperation {
    arg                       @0 :RealExpr;
    operation :union {
      negate                  @1  :Void;
      abs                     @2  :Void;
      sign                    @3  :Void;
      multInv                 @4  :Void;
      square                  @5  :Void;
      sqrt                    @6  :Void;
      sin                     @7  :Void;
      cos                     @8  :Void;
      tan                     @9  :Void;
      exp                     @10 :Void;
      ln                      @11 :Void;
      log10                   @12 :Void;
      round                   @13 :Void;
      floor                   @14 :Void;
      ceil                    @15 :Void;
    }
}

struct BinaryOperation {
    argA                      @0 :RealExpr;
    argB                      @1 :RealExpr;
    operation :union {
      sum                     @2 :Void;
      prod                    @3 :Void;
      pow                     @4 :Void;
      min                     @5 :Void;
      max                     @6 :Void;
      lessEqThan              @7 :Void; # expression yields a boolean
      greaterThan             @8 :Void; # expression yields a boolean
    }
}

struct ListOperation {
    args                      @0 :List(RealExpr);
    operation :union {
      sum                     @1 :Void;
      prod                    @2 :Void;
    }
}

struct Polynomial {
    variables                 @0 :List(Text);
    maxVarDegree              @1 :UInt8;
    coefficients              @2 :List(SparseCoeff);
}

struct SparseCoeff {
    offset                    @0 :UInt32;
    value                     @1 :Float64;
}

struct CaseDistinction(CaseType) {
    variables                 @0 :List(Text);
    cases                     @1 :List(ExprCase(CaseType));
}

struct ExprCase(CaseType) {
    # Representation of a single case for use in CaseDistinction
    # (order of evaluation follows List ordering)
    set                       @0 :SetExpr;
    expression                @1 :CaseType;
}

#=============================================
# Definition of SetExpr and its child structs
#=============================================

struct SetExpr {
    name                      @0 :Text;
    union {
      singleton               @1  :List(RealExpr); # dimension of the point equals the length of the list
      ball                    @2  :Ball;
      rectangle               @3  :List(BoundaryPair);
      convexPolytope          @4  :ConvexPolytope;
      intersection            @5  :List(SetExpr);
      caseDistinction         @6  :CaseDistinction(SetExpr);
      reference               @7  :Text;
      variable                @8  :Text;
    }
}

struct Ball {
    center                    @0 :List(RealExpr);
    radius                    @1 :RealExpr;
}

struct BoundaryPair {
    boundA                    @0 :RealExpr; # the "interpreter" is responsible for sorting
    boundB                    @1 :RealExpr; # the bounds, i.e., which bound is min and max
}

struct ConvexPolytope {
    # A convex polytope formed by linear constraints
    # In case of a polygon, i.e., a two-dimensional polytope, the
    # length of the inner list of field 'a' will be equal to two.
    a                         @0 :List(List(RealExpr));
    b                         @1 :List(RealExpr);
}


change paramter name in temporal memory proto

@0xc5bf8243b0c10764;

# TODO: Use absolute path
using import "ConnectionsProto.capnp".ConnectionsProto;
using import "RandomProto.capnp".RandomProto;

# Next ID: 19
struct TemporalMemoryProto {

  columnDimensions @0 :List(UInt32);
  cellsPerColumn @1 :UInt32;
  activationThreshold @2 :UInt32;
  learningRadius @3 :UInt32;
  initialPermanence @4 :Float32;
  connectedPermanence @5 :Float32;
  minThreshold @6 :UInt32;
  maxNewSynapseCount @7 :UInt32;
  permanenceIncrement @8 :Float32;
  permanenceDecrement @9 :Float32;

  connections @10 :ConnectionsProto;
  random @11 :RandomProto;

  # Lists of indices
  activeCells @12 :List(UInt32);
  predictiveCells @13 :List(UInt32);
  activeSegments @14 :List(UInt32);
  winnerCells @15 :List(UInt32);
  matchingSegments @16 :List(UInt32);
  matchingCells @17 :List(UInt32);
  predictedSegmentDecrement @18 :Float32;
}

@0xc5bf8243b0c10764;

# TODO: Use absolute path
using import "ConnectionsProto.capnp".ConnectionsProto;
using import "RandomProto.capnp".RandomProto;

# Next ID: 19
struct TemporalMemoryProto {

  columnDimensions @0 :List(UInt32);
  cellsPerColumn @1 :UInt32;
  activationThreshold @2 :UInt32;
  learningRadius @3 :UInt32;
  initialPermanence @4 :Float32;
  connectedPermanence @5 :Float32;
  minThreshold @6 :UInt32;
  maxNewSynapseCount @7 :UInt32;
  permanenceIncrement @8 :Float32;
  permanenceDecrement @9 :Float32;

  connections @10 :ConnectionsProto;
  random @11 :RandomProto;

  # Lists of indices
  activeCells @12 :List(UInt32);
  predictiveCells @13 :List(UInt32);
  activeSegments @14 :List(UInt32);
  winnerCells @15 :List(UInt32);
  matchingSegments @16 :List(UInt32);
  matchingCells @17 :List(UInt32);
  permanenceOrphanDecrement @18 :Float32;
}


Update marketing version.

Update marketing version.

@0x93020f652e8a8459;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "h37dm17aa89yrd8zuqpdn36p6zntumtv08fjpu8a8zrte7q1cn60",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "Etherpad"),

    appVersion = 7,  # Increment this for every release.

    appMarketingVersion = (defaultText = "2012.05.31 (1.5.6+)"),

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Etherpad Document"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = ["src"],
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.

  bridgeConfig = (
    viewInfo = (
      permissions = [(name = "modify", title = (defaultText = "modify"),
                      description = (defaultText = "allows modifying the document")),
                     (name = "comment", title = (defaultText = "comment"),
                      description = (defaultText = "allows adding comments"))],
      roles = [(title = (defaultText = "editor"),
                permissions = [true, true],
                verbPhrase = (defaultText = "can edit"),
                default = true),
               (title = (defaultText = "viewer"),
                permissions = [false, false],
                verbPhrase = (defaultText = "can view")),
               (title = (defaultText = "commenter"),
                permissions = [false, true],
                verbPhrase = (defaultText = "can comment"))]
    )
  )
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "9001", "--", "bin/run.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);

@0x93020f652e8a8459;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "h37dm17aa89yrd8zuqpdn36p6zntumtv08fjpu8a8zrte7q1cn60",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "Etherpad"),

    appVersion = 7,  # Increment this for every release.

    appMarketingVersion = (defaultText = "1.5.6"),

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Etherpad Document"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = ["src"],
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.

  bridgeConfig = (
    viewInfo = (
      permissions = [(name = "modify", title = (defaultText = "modify"),
                      description = (defaultText = "allows modifying the document")),
                     (name = "comment", title = (defaultText = "comment"),
                      description = (defaultText = "allows adding comments"))],
      roles = [(title = (defaultText = "editor"),
                permissions = [true, true],
                verbPhrase = (defaultText = "can edit"),
                default = true),
               (title = (defaultText = "viewer"),
                permissions = [false, false],
                verbPhrase = (defaultText = "can view")),
               (title = (defaultText = "commenter"),
                permissions = [false, true],
                verbPhrase = (defaultText = "can comment"))]
    )
  )
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "9001", "--", "bin/run.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);


update sandstorm metadata for appVersion 19 release

# Use use the meteor-spk tool to generate a sandstorm package (spk) from this
# meteor application source code. https://github.com/sandstorm-io/meteor-spk
@0xa5275bd3ad124e12;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h",
  # The app ID is actually its public key. The private key was placed in your
  # keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in our app package to tell Sandstorm about our
    # app.

    appTitle = (defaultText = "Wekan"),
    # The name of the app as it is displayed to the user.

    appVersion = 19,
    # Increment this for every release.

    appMarketingVersion = (defaultText = "0.16.0~2017-03-21"),
    # Human-readable presentation of the app version.

    minUpgradableAppVersion = 0,
    # The minimum version of the app which can be safely replaced by this app
    # package without data loss.  This might be non-zero if the app's data store
    # format changed drastically in the past and the app is no longer able to
    # read the old format.

    actions = [
      # Define your "new document" handlers here.
      (
        title = (defaultText = "New board"),
        command = .myCommand,
        # The command to run when starting for the first time. (".myCommand" is
        # just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand,
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.

    metadata = (
      icons = (
        appGrid = (svg = embed "meta/icons/wekan-128.svg"),
        grain = (svg = embed "meta/icons/wekan-24.svg"),
        market = (svg = embed "meta/icons/wekan-150.svg"),
      ),

      website = "https://wekan.io",
      codeUrl = "https://github.com/wefork/wekan",
      license = (openSource = mit),
      categories = [productivity, office],

      author = (
        upstreamAuthor = "Maxime Quandalle",
        contactEmail = "david@sandstorm.io",
        pgpSignature = embed "meta/dwrensha-pgp-sig",
      ),

      pgpKeyring = embed "meta/keyring",

      description = (defaultText = embed "meta/description.md"),

      shortDescription = (defaultText = "Kanban board"),

      screenshots = [
        (
          width = 512,
          height = 330,
          jpeg = embed "meta/screenshots/board-view.jpg"
        ),
        # XXX The screenshots should have a standard width and height.
      ],

      changeLog = (
        defaultText = embed "CHANGELOG.md",
        localizations = [
          (locale = "fr", text = embed "meta/t9n-changelog/fr.md"),
        ],
      )
    )
  ),

  sourceMap = (
    # The following directories will be copied into your package.
    searchPath = [
      (sourcePath = ".meteor-spk/deps"),
      (sourcePath = ".meteor-spk/bundle"),
    ]
  ),

  alwaysInclude = [ "." ],
  # This says that we always want to include all files from the source map. (An
  # alternative is to automatically detect dependencies by watching what the app
  # opens while running in dev mode. To see what that looks like, run `spk init`
  # without the -A option.)

  bridgeConfig = (
    viewInfo = (
      permissions = [(
        name = "participate",
        title = (
          defaultText = "participate",
          localizations = [
            (locale = "fr", text = "participer"),
          ],
        ),
        description = (
          defaultText = "allows participating in the board",
          localizations = [
            (locale = "fr", text = "permet de participer dans le tableau"),
          ],
        )
      ), (
        name = "configure",
        title = (
          defaultText = "configure",
          localizations = [
            (locale = "fr", text = "configurer"),
          ],
        ),
        description = (
          defaultText = "allows configuring the board",
          localizations = [
            (locale = "fr", text = "permet de configurer le tableau"),
          ],
        )
      )],

      roles = [(
        title = (
          defaultText = "observer",
          localizations = [
            (locale = "fr", text = "observateur"),
          ],
        ),
        permissions = [false, false],
        verbPhrase = (
          defaultText = "can read",
          localizations = [
            (locale = "fr", text = "peut lire"),
          ],
        )
      ), (
        title = (
          defaultText = "member",
          localizations = [
            (locale = "fr", text = "membre"),
          ],
        ),
        permissions = [true, false],
        verbPhrase = (
          defaultText = "can edit",
          localizations = [
            (locale = "fr", text = "peut éditer"),
          ],
        ),
        default = true,
      # ), (
      #   title = (defaultText = "administrator"),
      #   permissions = [true, true],
      #   verbPhrase = (defaultText = "can configure")
      #
      # XXX Administrators configuration options aren’t implemented yet, so this
      # role is currently useless.
      )],

      eventTypes = [(
         name = "addBoardMember",
         verbPhrase = (defaultText = "added to board"),
      ), (
        name = "createList",
        verbPhrase = (defaultText = "created new list"),
      ), (
        name = "archivedList",
        verbPhrase = (defaultText = "archived list"),
      ), (
        name = "restoredList",
        verbPhrase = (defaultText = "restored list"),
      ), (
        name = "createCard",
        verbPhrase = (defaultText = "created new card"),
      ), (
        name = "moveCard",
        verbPhrase = (defaultText = "moved card"),
      ), (
        name = "archivedCard",
        verbPhrase = (defaultText = "archived card"),
      ), (
        name = "restoredCard",
        verbPhrase = (defaultText = "restored card"),
      ), (
        name = "addComment",
        verbPhrase = (defaultText = "added comment"),
      ), (
        name = "addAttachement",
        verbPhrase = (defaultText = "added attachment"),
      ), (
        name = "joinMember",
        verbPhrase = (defaultText = "added to card"),
      ), (
        name = "unjoinMember",
        verbPhrase = (defaultText = "removed from card"),
      ), ],
    ),

    saveIdentityCaps = true,
  ),
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "4000", "--", "node", "start.js"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "SANDSTORM", value = "1"),
    (key = "METEOR_SETTINGS", value = "{\"public\": {\"sandstorm\": true}}")
  ]
);

# Use use the meteor-spk tool to generate a sandstorm package (spk) from this
# meteor application source code. https://github.com/sandstorm-io/meteor-spk
@0xa5275bd3ad124e12;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h",
  # The app ID is actually its public key. The private key was placed in your
  # keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in our app package to tell Sandstorm about our
    # app.

    appTitle = (defaultText = "Wekan"),
    # The name of the app as it is displayed to the user.

    appVersion = 17,
    # Increment this for every release.

    appMarketingVersion = (defaultText = "0.11.0~2016-11-28"),
    # Human-readable presentation of the app version.

    minUpgradableAppVersion = 0,
    # The minimum version of the app which can be safely replaced by this app
    # package without data loss.  This might be non-zero if the app's data store
    # format changed drastically in the past and the app is no longer able to
    # read the old format.

    actions = [
      # Define your "new document" handlers here.
      (
        title = (defaultText = "New board"),
        command = .myCommand,
        # The command to run when starting for the first time. (".myCommand" is
        # just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand,
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.

    metadata = (
      icons = (
        appGrid = (svg = embed "meta/icons/wekan-128.svg"),
        grain = (svg = embed "meta/icons/wekan-24.svg"),
        market = (svg = embed "meta/icons/wekan-150.svg"),
      ),

      website = "https://wekan.io",
      codeUrl = "https://github.com/wefork/wekan",
      license = (openSource = mit),
      categories = [productivity, office],

      author = (
        upstreamAuthor = "Maxime Quandalle",
        contactEmail = "david@sandstorm.io",
        pgpSignature = embed "meta/dwrensha-pgp-sig",
      ),

      pgpKeyring = embed "meta/keyring",

      description = (defaultText = embed "meta/description.md"),

      shortDescription = (defaultText = "Kanban board"),

      screenshots = [
        (
          width = 512,
          height = 330,
          jpeg = embed "meta/screenshots/board-view.jpg"
        ),
        # XXX The screenshots should have a standard width and height.
      ],

      changeLog = (
        defaultText = embed "CHANGELOG.md",
        localizations = [
          (locale = "fr", text = embed "meta/t9n-changelog/fr.md"),
        ],
      )
    )
  ),

  sourceMap = (
    # The following directories will be copied into your package.
    searchPath = [
      (sourcePath = ".meteor-spk/deps"),
      (sourcePath = ".meteor-spk/bundle"),
    ]
  ),

  alwaysInclude = [ "." ],
  # This says that we always want to include all files from the source map. (An
  # alternative is to automatically detect dependencies by watching what the app
  # opens while running in dev mode. To see what that looks like, run `spk init`
  # without the -A option.)

  bridgeConfig = (
    viewInfo = (
      permissions = [(
        name = "participate",
        title = (
          defaultText = "participate",
          localizations = [
            (locale = "fr", text = "participer"),
          ],
        ),
        description = (
          defaultText = "allows participating in the board",
          localizations = [
            (locale = "fr", text = "permet de participer dans le tableau"),
          ],
        )
      ), (
        name = "configure",
        title = (
          defaultText = "configure",
          localizations = [
            (locale = "fr", text = "configurer"),
          ],
        ),
        description = (
          defaultText = "allows configuring the board",
          localizations = [
            (locale = "fr", text = "permet de configurer le tableau"),
          ],
        )
      )],

      roles = [(
        title = (
          defaultText = "observer",
          localizations = [
            (locale = "fr", text = "observateur"),
          ],
        ),
        permissions = [false, false],
        verbPhrase = (
          defaultText = "can read",
          localizations = [
            (locale = "fr", text = "peut lire"),
          ],
        )
      ), (
        title = (
          defaultText = "member",
          localizations = [
            (locale = "fr", text = "membre"),
          ],
        ),
        permissions = [true, false],
        verbPhrase = (
          defaultText = "can edit",
          localizations = [
            (locale = "fr", text = "peut éditer"),
          ],
        ),
        default = true,
      # ), (
      #   title = (defaultText = "administrator"),
      #   permissions = [true, true],
      #   verbPhrase = (defaultText = "can configure")
      #
      # XXX Administrators configuration options aren’t implemented yet, so this
      # role is currently useless.
      )],

      eventTypes = [(
         name = "addBoardMember",
         verbPhrase = (defaultText = "added to board"),
      ), (
        name = "createList",
        verbPhrase = (defaultText = "created new list"),
      ), (
        name = "archivedList",
        verbPhrase = (defaultText = "archived list"),
      ), (
        name = "restoredList",
        verbPhrase = (defaultText = "restored list"),
      ), (
        name = "createCard",
        verbPhrase = (defaultText = "created new card"),
      ), (
        name = "moveCard",
        verbPhrase = (defaultText = "moved card"),
      ), (
        name = "archivedCard",
        verbPhrase = (defaultText = "archived card"),
      ), (
        name = "restoredCard",
        verbPhrase = (defaultText = "restored card"),
      ), (
        name = "addComment",
        verbPhrase = (defaultText = "added comment"),
      ), (
        name = "addAttachement",
        verbPhrase = (defaultText = "added attachment"),
      ), (
        name = "joinMember",
        verbPhrase = (defaultText = "added to card"),
      ), (
        name = "unjoinMember",
        verbPhrase = (defaultText = "removed from card"),
      ), ],
    ),

    saveIdentityCaps = true,
  ),
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "4000", "--", "node", "start.js"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "SANDSTORM", value = "1"),
    (key = "METEOR_SETTINGS", value = "{\"public\": {\"sandstorm\": true}}")
  ]
);


replaced the MatchOpen with MatchStatus which is more useful

@0xc6f85ffb87e200e2;

using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("robocup2Dsim::common");

using Entity = import "entity.capnp";
using Metadata = import "metadata.capnp";
using Physics = import "physics.capnp";
using Rule = import "rule.capnp";

struct Registration
{
    version @0 :Metadata.Version;
    teamName @1 :Entity.TeamName;
    uniform @2 :Entity.UniformNumber;
    playerType @3 :Entity.PlayerType;
}

struct MatchStatus
{
    playMode @0 :Rule.PlayMode;
    score @1 :Rule.Score;
    gameTime @2 :Physics.NanoSecond;
}

struct MatchClose
{
    finalScore @0 :Rule.Score;
}

enum AbortReason
{
    registrationTimeOut @0;
    otherTeamDisconnect @1;
}

struct MatchAbort
{
    reason @0 :AbortReason;
    score @1 :Rule.Score;
}

@0xc6f85ffb87e200e2;

using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("robocup2Dsim::common");

using Entity = import "entity.capnp";
using Metadata = import "metadata.capnp";
using Rule = import "rule.capnp";

struct Registration
{
    version @0 :Metadata.Version;
    teamName @1 :Entity.TeamName;
    uniform @2 :Entity.UniformNumber;
    playerType @3 :Entity.PlayerType;
}

struct MatchOpen
{
    playMode @0 :Rule.PlayMode;
}

struct MatchClose
{
    finalScore @0 :Rule.Score;
}

enum AbortReason
{
    registrationTimeOut @0;
    otherTeamDisconnect @1;
}

struct MatchAbort
{
    reason @0 :AbortReason;
    score @1 :Rule.Score;
}


Add 'next id' comment to LinkProto schema.

@0x9d7ec2149bcaf713;

# Next ID: 6
struct LinkProto {
  type @0 :Text;
  params @1 :Text;

  srcRegion @2 :Text;
  srcOutput @3 :Text;

  destRegion @4 :Text;
  destInput @5 :Text;
}

@0x9d7ec2149bcaf713;

struct LinkProto {
  type @0 :Text;
  params @1 :Text;

  srcRegion @2 :Text;
  srcOutput @3 :Text;

  destRegion @4 :Text;
  destInput @5 :Text;
}


catalog.capnp: add symlink type to file

catalog.capnp: add symlink type to file

using Cxx = import "/third_party/capnproto/c++/src/capnp/c++.capnp";
using Go = import "/third_party/golang/capnproto/std/go.capnp";

@0x88881ae7af33bcb5;
$Cxx.namespace("mcm");
$Go.package("catalog");
$Go.import("github.com/zombiezen/mcm/catalog");

struct Catalog {
  # The root struct in a catalog file.

  resources @0 :List(Resource);
}

using ResourceId = UInt64;

struct Resource {
  id @0 :ResourceId $Go.name("ID");
  # The resource's identifier, used for dependencies.
  # The identifier should be unique within a catalog.

  comment @1 :Text;
  # An optional human-readable description of the resource for use in
  # error and progress messages.

  dependencies @2 :List(ResourceId);
  # Resources that must be applied before this resource can be applied.

  union {
    noop @3 :Void;
    # Does nothing.  Mainly to give the resource a safe default.

    file @4 :File;
    exec @5 :Exec;
  }
}

struct File @0x8dc4ac52b2962163 {
  # An entry on the filesystem.

  path @0 :Text;
  # An absolute OS-specific file path.

  union {
    plain :group {
      content @1 :Data;
      # Byte content of the file.  If null, then file content is
      # untouched by the executor, but it is an error if the file does
      # not exist.

      mode @2 :Mode;
    }
    directory :group {
      mode @3 :Mode;
    }
    symlink :group {
      target @5 :Text;
      # Where the link should point to.  This may be an absolute path or
      # a path relative to the link.
    }

    absent @4 :Void;
  }

  struct Mode {
    user @0 :UserRef;
    group @1 :GroupRef;
  }
}

struct UserRef {
  # A reference to a OS user.

  union {
    id @0 :Int32;
    name @1 :Text;
  }
}

struct GroupRef {
  # A reference to an OS group.

  union {
    id @0 :Int32;
    name @1 :Text;
  }
}

struct Exec @0x984c97311006f1ca {
  # An execution of an arbitrary program.

  struct Command {
    # An individual program invocation.

    union {
      argv @0 :List(Text);
      # A list of arguments as passed to exec.
      # There must be at least one argument, which must be an absolute
      # path to the executable.

      bash @1 :Text;
      # A script as passed to bash.
    }

    struct EnvVar {
      # A single environment variable.

      name @0 :Text;
      value @1 :Text;
    }

    environment @2 :List(EnvVar);
    # The subprocess's environment.
    # An empty or null list is an empty environment.

    workingDirectory @3 :Text;
    # The subprocess's working directory.
    # An empty or null string is the root.
  }

  command @0 :Command;
  # Command to run if the condition is met.

  condition :union {
    always @1 :Void;
    # Command will always be run.  Used if the command is idempotent.
    onlyIf @2 :Command;
    # Command will be run only if another command returns a successful exit code.
    # It is assumed that this command does not do anything destructive and may be run multiple times.
    unless @3 :Command;
    # Command will be run only if another command returns a failure exit code.
    # It is assumed that this command does not do anything destructive and may be run multiple times.
    fileAbsent @4 :Text;
    # Command will be run only if the OS file path does not exist.
  }
}

using Cxx = import "/third_party/capnproto/c++/src/capnp/c++.capnp";
using Go = import "/third_party/golang/capnproto/std/go.capnp";

@0x88881ae7af33bcb5;
$Cxx.namespace("mcm");
$Go.package("catalog");
$Go.import("github.com/zombiezen/mcm/catalog");

struct Catalog {
  # The root struct in a catalog file.

  resources @0 :List(Resource);
}

using ResourceId = UInt64;

struct Resource {
  id @0 :ResourceId $Go.name("ID");
  # The resource's identifier, used for dependencies.
  # The identifier should be unique within a catalog.

  comment @1 :Text;
  # An optional human-readable description of the resource for use in
  # error and progress messages.

  dependencies @2 :List(ResourceId);
  # Resources that must be applied before this resource can be applied.

  union {
    noop @3 :Void;
    # Does nothing.  Mainly to give the resource a safe default.

    file @4 :File;
    exec @5 :Exec;
  }
}

struct File @0x8dc4ac52b2962163 {
  # An entry on the filesystem.

  path @0 :Text;
  # An absolute OS-specific file path.

  union {
    plain :group {
      content @1 :Data;
      # Byte content of the file.  If null, then file content is
      # untouched by the executor, but it is an error if the file does
      # not exist.

      mode @2 :Mode;
    }
    directory :group {
      mode @3 :Mode;
    }

    absent @4 :Void;
  }

  struct Mode {
    user @0 :UserRef;
    group @1 :GroupRef;
  }
}

struct UserRef {
  # A reference to a OS user.

  union {
    id @0 :Int32;
    name @1 :Text;
  }
}

struct GroupRef {
  # A reference to an OS group.

  union {
    id @0 :Int32;
    name @1 :Text;
  }
}

struct Exec @0x984c97311006f1ca {
  # An execution of an arbitrary program.

  struct Command {
    # An individual program invocation.

    union {
      argv @0 :List(Text);
      # A list of arguments as passed to exec.
      # There must be at least one argument, which must be an absolute
      # path to the executable.

      bash @1 :Text;
      # A script as passed to bash.
    }

    struct EnvVar {
      # A single environment variable.

      name @0 :Text;
      value @1 :Text;
    }

    environment @2 :List(EnvVar);
    # The subprocess's environment.
    # An empty or null list is an empty environment.

    workingDirectory @3 :Text;
    # The subprocess's working directory.
    # An empty or null string is the root.
  }

  command @0 :Command;
  # Command to run if the condition is met.

  condition :union {
    always @1 :Void;
    # Command will always be run.  Used if the command is idempotent.
    onlyIf @2 :Command;
    # Command will be run only if another command returns a successful exit code.
    # It is assumed that this command does not do anything destructive and may be run multiple times.
    unless @3 :Command;
    # Command will be run only if another command returns a failure exit code.
    # It is assumed that this command does not do anything destructive and may be run multiple times.
    fileAbsent @4 :Text;
    # Command will be run only if the OS file path does not exist.
  }
}


Add appMarketingVersion

Add appMarketingVersion

@0x8b8d9e21789be80e;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "1gda5n8p8zsc0r9pcana2yjgtvsq169068k4ve8mk68z4x9fvzuh",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "EtherDraw"),

    appVersion = 0,  # Increment this for every release.
	appMarketingVersion = (defaultText = "0.1"),

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New EtherDraw"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys",
                      "etc/passwd", "etc/hosts", "etc/host.conf",
                      "etc/nsswitch.conf", "etc/resolv.conf" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = []
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "9002", "--", "bin/run.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);

@0x8b8d9e21789be80e;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "1gda5n8p8zsc0r9pcana2yjgtvsq169068k4ve8mk68z4x9fvzuh",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appTitle = (defaultText = "EtherDraw"),

    appVersion = 0,  # Increment this for every release.

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New EtherDraw"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys",
                      "etc/passwd", "etc/hosts", "etc/host.conf",
                      "etc/nsswitch.conf", "etc/resolv.conf" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = []
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "9002", "--", "bin/run.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);


.sandstorm: add icons to pkgdef

.sandstorm: add icons to pkgdef

@0xba54be93d5898b97;

using Spk = import "/sandstorm/package.capnp";

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "rq41p170hcs5rzg66axggv8r90fjcssdky8891kq5s7jcpm1813h",
  manifest = (
    appTitle = (defaultText = "Sandpass"),
    appVersion = 1,  # Increment this for every release.
    appMarketingVersion = (defaultText = "0.2.1"),

    actions = [
      ( title = (defaultText = "New database"),
        nounPhrase = (defaultText = "database"),
        command = .launcher
      )
    ],
    continueCommand = .launcher,

    metadata = (
      icons = (
        appGrid = (svg = embed "../icons/appGrid.svg"),
        appGrid = (svg = embed "../icons/appGrid.svg"),
        grain = (svg = embed "../icons/grain.svg"),
        market = (svg = embed "../icons/market.svg"),
      ),

      website = "https://github.com/zombiezen/sandpass",
      codeUrl = "https://github.com/zombiezen/sandpass",

      license = (openSource = apache2,
                 notices = (defaultText = embed "notices.txt")),

      categories = [productivity],

      author = (
        contactEmail = "ross@zombiezen.com",

        pgpSignature = embed "pgp-signature",
      ),

      pgpKeyring = embed "pgp-keyring",

      #description = (defaultText = embed "path/to/description.md"),
      # The app's description in Github-flavored Markdown format, to be displayed e.g.
      # in an app store. Note that the Markdown is not permitted to contain HTML nor image tags (but
      # you can include a list of screenshots separately).

      shortDescription = (defaultText = "Password manager"),

      screenshots = [
        # Screenshots to use for marketing purposes.  Examples below.
        # Sizes are given in device-independent pixels, so if you took these
        # screenshots on a Retina-style high DPI screen, divide each dimension by two.

        #(width = 746, height = 795, jpeg = embed "path/to/screenshot-1.jpeg"),
        #(width = 640, height = 480, png = embed "path/to/screenshot-2.png"),
      ],
      changeLog = (defaultText = embed "../CHANGELOG.md"),
    ),
  ),

  sourceMap = (
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys",
                      "etc/passwd", "etc/hosts", "etc/host.conf",
                      "etc/nsswitch.conf", "etc/resolv.conf",
                      "etc/ld.so.cache" ]
      )
    ]
  ),

  fileList = "sandstorm-files.list",

  alwaysInclude = [
    "opt/app/js",
    "opt/app/sandpass",
    "opt/app/templates",
  ],

  bridgeConfig = (
    viewInfo = (
      permissions = [
        ( name = "read",
          title = (defaultText = "Read from database")
        ),
        ( name = "write",
          title = (defaultText = "Write to database")
        )
      ],
      roles = [
        ( title = (defaultText = "viewer"),
          verbPhrase = (defaultText = "can read"),
          permissions = [true, false]
        ),
        ( title = (defaultText = "editor"),
          verbPhrase = (defaultText = "can read and write"),
          permissions = [true, true]
        )
      ]
    )
  )
);

const launcher :Spk.Manifest.Command = (
  argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"],
  environ = [
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "SANDSTORM", value = "1"),
  ]
);

@0xba54be93d5898b97;

using Spk = import "/sandstorm/package.capnp";

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "rq41p170hcs5rzg66axggv8r90fjcssdky8891kq5s7jcpm1813h",
  manifest = (
    appTitle = (defaultText = "Sandpass"),
    appVersion = 1,  # Increment this for every release.
    appMarketingVersion = (defaultText = "0.2.1"),

    actions = [
      ( title = (defaultText = "New database"),
        nounPhrase = (defaultText = "database"),
        command = .launcher
      )
    ],
    continueCommand = .launcher,

    metadata = (
      icons = (
        # Various icons to represent the app in various contexts.
        #appGrid = (svg = embed "path/to/appgrid-128x128.svg"),
        #grain = (svg = embed "path/to/grain-24x24.svg"),
        #market = (svg = embed "path/to/market-150x150.svg"),
        #marketBig = (svg = embed "path/to/market-big-300x300.svg"),
      ),

      website = "https://github.com/zombiezen/sandpass",
      codeUrl = "https://github.com/zombiezen/sandpass",

      license = (openSource = apache2,
                 notices = (defaultText = embed "notices.txt")),

      categories = [productivity],

      author = (
        contactEmail = "ross@zombiezen.com",

        pgpSignature = embed "pgp-signature",
      ),

      pgpKeyring = embed "pgp-keyring",

      #description = (defaultText = embed "path/to/description.md"),
      # The app's description in Github-flavored Markdown format, to be displayed e.g.
      # in an app store. Note that the Markdown is not permitted to contain HTML nor image tags (but
      # you can include a list of screenshots separately).

      shortDescription = (defaultText = "Password manager"),

      screenshots = [
        # Screenshots to use for marketing purposes.  Examples below.
        # Sizes are given in device-independent pixels, so if you took these
        # screenshots on a Retina-style high DPI screen, divide each dimension by two.

        #(width = 746, height = 795, jpeg = embed "path/to/screenshot-1.jpeg"),
        #(width = 640, height = 480, png = embed "path/to/screenshot-2.png"),
      ],
      changeLog = (defaultText = embed "../CHANGELOG.md"),
    ),
  ),

  sourceMap = (
    searchPath = [
      ( sourcePath = "." ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys",
                      "etc/passwd", "etc/hosts", "etc/host.conf",
                      "etc/nsswitch.conf", "etc/resolv.conf",
                      "etc/ld.so.cache" ]
      )
    ]
  ),

  fileList = "sandstorm-files.list",

  alwaysInclude = [
    "opt/app/js",
    "opt/app/sandpass",
    "opt/app/templates",
  ],

  bridgeConfig = (
    viewInfo = (
      permissions = [
        ( name = "read",
          title = (defaultText = "Read from database")
        ),
        ( name = "write",
          title = (defaultText = "Write to database")
        )
      ],
      roles = [
        ( title = (defaultText = "viewer"),
          verbPhrase = (defaultText = "can read"),
          permissions = [true, false]
        ),
        ( title = (defaultText = "editor"),
          verbPhrase = (defaultText = "can read and write"),
          permissions = [true, true]
        )
      ]
    )
  )
);

const launcher :Spk.Manifest.Command = (
  argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"],
  environ = [
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "SANDSTORM", value = "1"),
  ]
);


increment appVersion

increment appVersion

@0x87742b8004358e72;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "7qvcjh7gk0rzdx1s3c8gufd288sesf6vvdt297756xcv4q8xxvhh",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appVersion = 1,  # Increment this for every release.

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New HackerSlides"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = ".", hidePaths = [".git", ".vagrant"] ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys", "vagrant", "*.pyc",
                      "etc/passwd", "etc/hosts", "etc/host.conf",
                      "etc/nsswitch.conf", "etc/resolv.conf" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = []
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "8000", "--", "./main.py"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "HOME", value = "/var")
  ]
);

@0x87742b8004358e72;

using Spk = import "/sandstorm/package.capnp";
# This imports:
#   $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.

const pkgdef :Spk.PackageDefinition = (
  # The package definition. Note that the spk tool looks specifically for the
  # "pkgdef" constant.

  id = "7qvcjh7gk0rzdx1s3c8gufd288sesf6vvdt297756xcv4q8xxvhh",
  # Your app ID is actually its public key. The private key was placed in
  # your keyring. All updates must be signed with the same key.

  manifest = (
    # This manifest is included in your app package to tell Sandstorm
    # about your app.

    appVersion = 0,  # Increment this for every release.

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New HackerSlides"),
        command = .myCommand
        # The command to run when starting for the first time. (".myCommand"
        # is just a constant defined at the bottom of the file.)
      )
    ],

    continueCommand = .myCommand
    # This is the command called to start your app back up after it has been
    # shut down for inactivity. Here we're using the same command as for
    # starting a new instance, but you could use different commands for each
    # case.
  ),

  sourceMap = (
    # Here we defined where to look for files to copy into your package. The
    # `spk dev` command actually figures out what files your app needs
    # automatically by running it on a FUSE filesystem. So, the mappings
    # here are only to tell it where to find files that the app wants.
    searchPath = [
      ( sourcePath = ".", hidePaths = [".git", ".vagrant"] ),  # Search this directory first.
      ( sourcePath = "/",    # Then search the system root directory.
        hidePaths = [ "home", "proc", "sys", "vagrant", "*.pyc",
                      "etc/passwd", "etc/hosts", "etc/host.conf",
                      "etc/nsswitch.conf", "etc/resolv.conf" ]
        # You probably don't want the app pulling files from these places,
        # so we hide them. Note that /dev, /var, and /tmp are implicitly
        # hidden because Sandstorm itself provides them.
      )
    ]
  ),

  fileList = "sandstorm-files.list",
  # `spk dev` will write a list of all the files your app uses to this file.
  # You should review it later, before shipping your app.

  alwaysInclude = []
  # Fill this list with more names of files or directories that should be
  # included in your package, even if not listed in sandstorm-files.list.
  # Use this to force-include stuff that you know you need but which may
  # not have been detected as a dependency during `spk dev`. If you list
  # a directory here, its entire contents will be included recursively.
);

const myCommand :Spk.Manifest.Command = (
  # Here we define the command used to start up your server.
  argv = ["/sandstorm-http-bridge", "8000", "--", "./main.py"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "HOME", value = "/var")
  ]
);