Workaround re: name collisions in schema output.

@0x832bcc6686a26d56;
# A schema with useful declarations for testing.
#
# This was originally copied from the Go implementation:
#
# https://github.com/zombiezen/go-capnproto2
#
# For now, a default values for pointer types have been commented out,
# so that the compiler plugin will not reject the schema in light of
# issue #28. These are marked with 'TODO#28' in the source.

const constDate :Zdate = (year = 2015, month = 8, day = 27);
const constList :List(Zdate) = [(year = 2015, month = 8, day = 27), (year = 2015, month = 8, day = 28)];
const constEnum :Airport = jfk;

struct Zdate {
  year  @0   :Int16;
  month @1   :UInt8;
  day   @2   :UInt8;
}

struct Zdata {
  data @0 :Data;
}

enum Airport {
  none @0;
  jfk @1;
  lax @2;
  sfo @3;
  luv @4;
  dfw @5;
  test @6;
  # test must be last because we use it to count
  # the number of elements in the Airport enum.
}

struct PlaneBase {
  name       @0: Text;
  homes      @1: List(Airport);
  rating     @2: Int64;
  canFly     @3: Bool;
  capacity   @4: Int64;
  maxSpeed   @5: Float64;
}

struct B737 {
  base @0: PlaneBase;
}

struct A320 {
  base @0: PlaneBase;
}

struct F16 {
  base @0: PlaneBase;
}

# need a struct with at least two pointers to catch certain bugs
struct Regression {
  base     @0: PlaneBase;
  b0       @1: Float64; # intercept
  beta     @2: List(Float64);
  planes   @3: List(Aircraft);
  ymu      @4: Float64; # y-mean in original space
  ysd      @5: Float64; # y-standard deviation in original space
}

struct Aircraft {
  #  so we can restrict
  #  and specify a Plane is required in
  #  certain places.

  union {
    void      @0: Void; # @0 will be the default, so always make @0 a Void.
    b737      @1: B737;
    a320      @2: A320;
    f16       @3: F16;
  }
}

struct Z {
  # Z must contain all types, as this is our
  # runtime type identification. It is a thin shim.

  union {
    void              @0: Void; # always first in any union.
    zz                @1: Z;    # any. fyi, this can't be 'z' alone.

    f64               @2: Float64;
    f32               @3: Float32;

    i64               @4: Int64;
    i32               @5: Int32;
    i16               @6: Int16;
    i8                @7: Int8;

    u64               @8:  UInt64;
    u32               @9:  UInt32;
    u16               @10: UInt16;
    u8                @11: UInt8;

    bool              @12: Bool;
    text              @13: Text;
    blob              @14: Data;

    f64vec            @15: List(Float64);
    f32vec            @16: List(Float32);

    i64vec            @17: List(Int64);
    i32vec            @18: List(Int32);
    i16vec            @19: List(Int16);
    i8vec             @20: List(Int8);

    u64vec            @21: List(UInt64);
    u32vec            @22: List(UInt32);
    u16vec            @23: List(UInt16);
    u8vec             @24: List(UInt8);

    boolvec           @39: List(Bool);
    datavec           @40: List(Data);
    textvec           @41: List(Text);

    zvec              @25: List(Z);
    zvecvec           @26: List(List(Z));

    zdate             @27: Zdate;
    zdata             @28: Zdata;

    aircraftvec       @29: List(Aircraft);
    aircraft          @30: Aircraft;
    regression        @31: Regression;
    planebase         @32: PlaneBase;
    airport           @33: Airport;
    b737              @34: B737;
    a320              @35: A320;
    f16               @36: F16;
    zdatevec          @37: List(Zdate);
    zdatavec          @38: List(Zdata);

    grp               :group {
      first           @42 :UInt64;
      second          @43 :UInt64;
    }

    echo              @44 :Echo;
    echoBases         @45 :EchoBases;
  }
}

# tests for Text/List(Text) recusion handling

struct Counter {
  size  @0: Int64;
  words @1: Text;
  wordlist @2: List(Text);
}

struct Bag {
  counter  @0: Counter;
}

struct Zserver {
   waitingjobs       @0: List(Zjob);
}

struct Zjob {
    cmd        @0: Text;
    args       @1: List(Text);
}

# versioning test structs

struct VerEmpty {
}

struct VerOneData {
    val @0: Int16;
}

struct VerTwoData {
    val @0: Int16;
    duo @1: Int64;
}

struct VerOnePtr {
    ptr @0: VerOneData;
}

struct VerTwoPtr {
       ptr1 @0: VerOneData;
       ptr2 @1: VerOneData;
}

struct VerTwoDataTwoPtr {
    val @0: Int16;
    duo @1: Int64;
    ptr1 @2: VerOneData;
    ptr2 @3: VerOneData;
}

struct HoldsVerEmptyList {
  mylist @0: List(VerEmpty);
}

struct HoldsVerOneDataList {
  mylist @0: List(VerOneData);
}

struct HoldsVerTwoDataList {
  mylist @0: List(VerTwoData);
}

struct HoldsVerOnePtrList {
  mylist @0: List(VerOnePtr);
}

struct HoldsVerTwoPtrList {
  mylist @0: List(VerTwoPtr);
}

struct HoldsVerTwoTwoList {
  mylist @0: List(VerTwoDataTwoPtr);
}

struct HoldsVerTwoTwoPlus {
  mylist @0: List(VerTwoTwoPlus);
}

struct VerTwoTwoPlus {
    val @0: Int16;
    duo @1: Int64;
    ptr1 @2: VerTwoDataTwoPtr;
    ptr2 @3: VerTwoDataTwoPtr;
    tre  @4: Int64;
    lst3 @5: List(Int64);
}

# text handling

struct HoldsText {
       txt @0: Text;
       lst @1: List(Text);
       lstlst @2: List(List(Text));
}

# test that we avoid unnecessary truncation

struct WrapEmpty {
   mightNotBeReallyEmpty @0: VerEmpty;
}

struct Wrap2x2 {
   mightNotBeReallyEmpty @0: VerTwoDataTwoPtr;
}

struct Wrap2x2plus {
   mightNotBeReallyEmpty @0: VerTwoTwoPlus;
}

# test voids in a union

struct VoidUnion {
  union {
    a @0 :Void;
    b @1 :Void;
  }
}

# test List(List(Struct(List)))

struct Nester1Capn {
   strs  @0:   List(Text);
}

struct RWTestCapn {
   nestMatrix  @0:   List(List(Nester1Capn));
}

struct ListStructCapn {
   vec  @0:   List(Nester1Capn);
}

# test interfaces

interface Echo {
  echo @0 (in :Text) -> (out :Text);
}

struct Hoth {
  base @0 :EchoBase;
}

struct EchoBase {
  echo @0 :Echo;
}

# test List(Struct(Interface))

struct EchoBases {
	bases @0 :List(EchoBase);
}

# test transforms

struct StackingRoot {
  a @1 :StackingA;
  aWithDefault @0 :StackingA ;#TODO#28 = (num = 42);
}

struct StackingA {
  num @0 :Int32;
  b @1 :StackingB;
}

struct StackingB {
  num @0 :Int32;
}

interface CallSequence {
  getNumber @0 () -> (n :UInt32);
}

interface CounterFactory {
  newCounter @0 (start :UInt32) -> (counter :CallSequence);
}

interface CounterAcceptor {
  accept @0 (counter :CallSequence);
}

# test inheritance
#
# The *I suffixes are to work around a bug where generated names can collide
# with things defined int he prelude; Left and Right cause problems here.

interface TopI {
	top @0 ();
}

interface LeftI extends(TopI) {
	left @0 ();
}

interface RightI extends(TopI) {
	right @0 ();
}

interface BottomI extends(LeftI, RightI) {
	bottom @0 ();
}

# test defaults

struct Defaults {
  text @0 :Text ;#TODO#28 = "foo";
  data @1 :Data ;#TODO#28 = "bar";
  float @2 :Float32 = 3.14;
  int @3 :Int32 = -123;
  uint @4 :UInt32 = 42;
}

# benchmarks

struct BenchmarkA {
  name     @0 :Text;
  birthDay @1 :Int64;
  phone    @2 :Text;
  siblings @3 :Int32;
  spouse   @4 :Bool;
  money    @5 :Float64;
}

@0x832bcc6686a26d56;
# A schema with useful declarations for testing.
#
# This was originally copied from the Go implementation:
#
# https://github.com/zombiezen/go-capnproto2
#
# For now, a default values for pointer types have been commented out,
# so that the compiler plugin will not reject the schema in light of
# issue #28. These are marked with 'TODO#28' in the source.

const constDate :Zdate = (year = 2015, month = 8, day = 27);
const constList :List(Zdate) = [(year = 2015, month = 8, day = 27), (year = 2015, month = 8, day = 28)];
const constEnum :Airport = jfk;

struct Zdate {
  year  @0   :Int16;
  month @1   :UInt8;
  day   @2   :UInt8;
}

struct Zdata {
  data @0 :Data;
}

enum Airport {
  none @0;
  jfk @1;
  lax @2;
  sfo @3;
  luv @4;
  dfw @5;
  test @6;
  # test must be last because we use it to count
  # the number of elements in the Airport enum.
}

struct PlaneBase {
  name       @0: Text;
  homes      @1: List(Airport);
  rating     @2: Int64;
  canFly     @3: Bool;
  capacity   @4: Int64;
  maxSpeed   @5: Float64;
}

struct B737 {
  base @0: PlaneBase;
}

struct A320 {
  base @0: PlaneBase;
}

struct F16 {
  base @0: PlaneBase;
}

# need a struct with at least two pointers to catch certain bugs
struct Regression {
  base     @0: PlaneBase;
  b0       @1: Float64; # intercept
  beta     @2: List(Float64);
  planes   @3: List(Aircraft);
  ymu      @4: Float64; # y-mean in original space
  ysd      @5: Float64; # y-standard deviation in original space
}

struct Aircraft {
  #  so we can restrict
  #  and specify a Plane is required in
  #  certain places.

  union {
    void      @0: Void; # @0 will be the default, so always make @0 a Void.
    b737      @1: B737;
    a320      @2: A320;
    f16       @3: F16;
  }
}

struct Z {
  # Z must contain all types, as this is our
  # runtime type identification. It is a thin shim.

  union {
    void              @0: Void; # always first in any union.
    zz                @1: Z;    # any. fyi, this can't be 'z' alone.

    f64               @2: Float64;
    f32               @3: Float32;

    i64               @4: Int64;
    i32               @5: Int32;
    i16               @6: Int16;
    i8                @7: Int8;

    u64               @8:  UInt64;
    u32               @9:  UInt32;
    u16               @10: UInt16;
    u8                @11: UInt8;

    bool              @12: Bool;
    text              @13: Text;
    blob              @14: Data;

    f64vec            @15: List(Float64);
    f32vec            @16: List(Float32);

    i64vec            @17: List(Int64);
    i32vec            @18: List(Int32);
    i16vec            @19: List(Int16);
    i8vec             @20: List(Int8);

    u64vec            @21: List(UInt64);
    u32vec            @22: List(UInt32);
    u16vec            @23: List(UInt16);
    u8vec             @24: List(UInt8);

    boolvec           @39: List(Bool);
    datavec           @40: List(Data);
    textvec           @41: List(Text);

    zvec              @25: List(Z);
    zvecvec           @26: List(List(Z));

    zdate             @27: Zdate;
    zdata             @28: Zdata;

    aircraftvec       @29: List(Aircraft);
    aircraft          @30: Aircraft;
    regression        @31: Regression;
    planebase         @32: PlaneBase;
    airport           @33: Airport;
    b737              @34: B737;
    a320              @35: A320;
    f16               @36: F16;
    zdatevec          @37: List(Zdate);
    zdatavec          @38: List(Zdata);

    grp               :group {
      first           @42 :UInt64;
      second          @43 :UInt64;
    }

    echo              @44 :Echo;
    echoBases         @45 :EchoBases;
  }
}

# tests for Text/List(Text) recusion handling

struct Counter {
  size  @0: Int64;
  words @1: Text;
  wordlist @2: List(Text);
}

struct Bag {
  counter  @0: Counter;
}

struct Zserver {
   waitingjobs       @0: List(Zjob);
}

struct Zjob {
    cmd        @0: Text;
    args       @1: List(Text);
}

# versioning test structs

struct VerEmpty {
}

struct VerOneData {
    val @0: Int16;
}

struct VerTwoData {
    val @0: Int16;
    duo @1: Int64;
}

struct VerOnePtr {
    ptr @0: VerOneData;
}

struct VerTwoPtr {
       ptr1 @0: VerOneData;
       ptr2 @1: VerOneData;
}

struct VerTwoDataTwoPtr {
    val @0: Int16;
    duo @1: Int64;
    ptr1 @2: VerOneData;
    ptr2 @3: VerOneData;
}

struct HoldsVerEmptyList {
  mylist @0: List(VerEmpty);
}

struct HoldsVerOneDataList {
  mylist @0: List(VerOneData);
}

struct HoldsVerTwoDataList {
  mylist @0: List(VerTwoData);
}

struct HoldsVerOnePtrList {
  mylist @0: List(VerOnePtr);
}

struct HoldsVerTwoPtrList {
  mylist @0: List(VerTwoPtr);
}

struct HoldsVerTwoTwoList {
  mylist @0: List(VerTwoDataTwoPtr);
}

struct HoldsVerTwoTwoPlus {
  mylist @0: List(VerTwoTwoPlus);
}

struct VerTwoTwoPlus {
    val @0: Int16;
    duo @1: Int64;
    ptr1 @2: VerTwoDataTwoPtr;
    ptr2 @3: VerTwoDataTwoPtr;
    tre  @4: Int64;
    lst3 @5: List(Int64);
}

# text handling

struct HoldsText {
       txt @0: Text;
       lst @1: List(Text);
       lstlst @2: List(List(Text));
}

# test that we avoid unnecessary truncation

struct WrapEmpty {
   mightNotBeReallyEmpty @0: VerEmpty;
}

struct Wrap2x2 {
   mightNotBeReallyEmpty @0: VerTwoDataTwoPtr;
}

struct Wrap2x2plus {
   mightNotBeReallyEmpty @0: VerTwoTwoPlus;
}

# test voids in a union

struct VoidUnion {
  union {
    a @0 :Void;
    b @1 :Void;
  }
}

# test List(List(Struct(List)))

struct Nester1Capn {
   strs  @0:   List(Text);
}

struct RWTestCapn {
   nestMatrix  @0:   List(List(Nester1Capn));
}

struct ListStructCapn {
   vec  @0:   List(Nester1Capn);
}

# test interfaces

interface Echo {
  echo @0 (in :Text) -> (out :Text);
}

struct Hoth {
  base @0 :EchoBase;
}

struct EchoBase {
  echo @0 :Echo;
}

# test List(Struct(Interface))

struct EchoBases {
	bases @0 :List(EchoBase);
}

# test transforms

struct StackingRoot {
  a @1 :StackingA;
  aWithDefault @0 :StackingA ;#TODO#28 = (num = 42);
}

struct StackingA {
  num @0 :Int32;
  b @1 :StackingB;
}

struct StackingB {
  num @0 :Int32;
}

interface CallSequence {
  getNumber @0 () -> (n :UInt32);
}

interface CounterFactory {
  newCounter @0 (start :UInt32) -> (counter :CallSequence);
}

interface CounterAcceptor {
  accept @0 (counter :CallSequence);
}

# test inheritance

interface Top {
	top @0 ();
}

interface Left extends(Top) {
	left @0 ();
}

interface Right extends(Top) {
	right @0 ();
}

interface Bottom extends(Left, Right) {
	bottom @0 ();
}

# test defaults

struct Defaults {
  text @0 :Text ;#TODO#28 = "foo";
  data @1 :Data ;#TODO#28 = "bar";
  float @2 :Float32 = 3.14;
  int @3 :Int32 = -123;
  uint @4 :UInt32 = 42;
}

# benchmarks

struct BenchmarkA {
  name     @0 :Text;
  birthDay @1 :Int64;
  phone    @2 :Text;
  siblings @3 :Int32;
  spouse   @4 :Bool;
  money    @5 :Float64;
}


Bumped ordinal number (the right one this time - doh) in date.capnp

@0x9b23d989c61ef9e5;

using import "/nupic/encoders/scalar.capnp".ScalarEncoderProto;

struct DateEncoderProto {
  name @0 :Text;
  seasonEncoder @1 :ScalarEncoderProto;
  dayOfWeekEncoder @2 :ScalarEncoderProto;
  weekendEncoder @3 :ScalarEncoderProto;
  customDaysEncoder @4 :ScalarEncoderProto;
  holidayEncoder @5 :ScalarEncoderProto;
  timeOfDayEncoder @6 :ScalarEncoderProto;
  hourOfWeekEncoder @7 :ScalarEncoderProto;
}

@0x9b23d989c61ef9e6;

using import "/nupic/encoders/scalar.capnp".ScalarEncoderProto;

struct DateEncoderProto {
  name @0 :Text;
  seasonEncoder @1 :ScalarEncoderProto;
  dayOfWeekEncoder @2 :ScalarEncoderProto;
  weekendEncoder @3 :ScalarEncoderProto;
  customDaysEncoder @4 :ScalarEncoderProto;
  holidayEncoder @5 :ScalarEncoderProto;
  timeOfDayEncoder @6 :ScalarEncoderProto;
  hourOfWeekEncoder @6 :ScalarEncoderProto;
}


Remove proto namespace that SWIG doesn't pick up.

@0x88eaee6db8e1f67c;

struct RandomProto {
  seed @0 :UInt64;
  impl @1 :RandomImplProto;
}

struct RandomImplProto {
  state @0 :List(Int64);
  rptr @1 :Int64;
  fptr @2 :Int64;
}

@0x88eaee6db8e1f67c;

using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("nupic");

struct RandomProto {
  seed @0 :UInt64;
  impl @1 :RandomImplProto;
}

struct RandomImplProto {
  state @0 :List(Int64);
  rptr @1 :Int64;
  fptr @2 :Int64;
}


Added hourOfWeek encoder to date.capnp

Added hourOfWeek encoder to date.capnp

@0x9b23d989c61ef9e5;

using import "/nupic/encoders/scalar.capnp".ScalarEncoderProto;

struct DateEncoderProto {
  name @0 :Text;
  seasonEncoder @1 :ScalarEncoderProto;
  dayOfWeekEncoder @2 :ScalarEncoderProto;
  weekendEncoder @3 :ScalarEncoderProto;
  customDaysEncoder @4 :ScalarEncoderProto;
  holidayEncoder @5 :ScalarEncoderProto;
  timeOfDayEncoder @6 :ScalarEncoderProto;
  hourOfWeekEncoder @6 :ScalarEncoderProto;
}

@0x9b23d989c61ef9e5;

using import "/nupic/encoders/scalar.capnp".ScalarEncoderProto;

struct DateEncoderProto {
  name @0 :Text;
  seasonEncoder @1 :ScalarEncoderProto;
  dayOfWeekEncoder @2 :ScalarEncoderProto;
  weekendEncoder @3 :ScalarEncoderProto;
  customDaysEncoder @4 :ScalarEncoderProto;
  holidayEncoder @5 :ScalarEncoderProto;
  timeOfDayEncoder @6 :ScalarEncoderProto;
}


Bump version

Bump version

@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 = 1,  # 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.
	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")
  ]
);


remove quota field

remove quota field

@0xa9101b1fec595220;
using import "/blackrock/master.capnp".MasterConfig;
const gce :MasterConfig = (
  workerCount = 1,
  frontendCount = 1,
  frontendConfig = (
    baseUrl = "http://pdis.rocks",
    wildcardHost = "*.pdis.rocks",
    allowDemoAccounts = true,
    isTesting = true,
    outOfBeta = true,
    allowUninvited = true,
    replicasPerMachine = 2
  ),

  gce = (
        project = "blackrock-mark",
        zone = "asia-east1-a",
        instanceTypes = (
                storage = "n1-standard-1",
                worker = "n1-standard-1",
                frontend = "g1-small",
                mongo = "g1-small"
        )
  )
);

@0xa9101b1fec595220;
using import "/blackrock/master.capnp".MasterConfig;
const gce :MasterConfig = (
  workerCount = 1,
  frontendCount = 1,
  frontendConfig = (
    baseUrl = "http://pdis.rocks",
    wildcardHost = "*.pdis.rocks",
    allowDemoAccounts = true,
    quotaEnabled = false,
    isTesting = true,
    outOfBeta = true,
    allowUninvited = true,
    replicasPerMachine = 2
  ),

  gce = (
        project = "blackrock-mark",
        zone = "asia-east1-a",
        instanceTypes = (
                storage = "n1-standard-1",
                worker = "n1-standard-1",
                frontend = "g1-small",
                mongo = "g1-small"
        )
  )
);


adding in a sequence number type

adding in a sequence number type

@0xc61bac6a340f9df1;

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

using ChannelId = UInt8;
using FrameNumber = UInt32;
using SequenceNumber = UInt16;

struct Version
{
    numberA @0 :UInt8;
    numberB @1 :UInt8;
    numberC @2 :UInt8;
    numberD @3 :UInt8;
}

@0xc61bac6a340f9df1;

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

using SequenceNumber = UInt16;
using FrameNumber = UInt32;

struct Version
{
    numberA @0 :UInt8;
    numberB @1 :UInt8;
    numberC @2 :UInt8;
    numberD @3 :UInt8;
}


Fix VPATH build.

Fix VPATH build.

# Copyright (c) 2013, Kenton Varda <temporal@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@0xc64a3bf0338a124a;

using Import1 = import "/capnp/schema.capnp";
using Import2 = import "test-import.capnp";
using Import3 = import "test.capnp";

struct TestImport2 {
  foo @0 :Import3.TestAllTypes;
  bar @1 :Import1.Node;
  baz @2 :Import2.TestImport;
}

# Copyright (c) 2013, Kenton Varda <temporal@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@0xc64a3bf0338a124a;

using Import1 = import "schema.capnp";
using Import2 = import "test-import.capnp";
using Import3 = import "test.capnp";

struct TestImport2 {
  foo @0 :Import3.TestAllTypes;
  bar @1 :Import1.Node;
  baz @2 :Import2.TestImport;
}


Remove unused code

Remove unused code

@0xa7e0ba9e3ca0988d;

using Lua = import "lua.capnp";

enum EnumType2 $Lua.naming("lower_underscore") {
    enum5 @0;
    enum6 @1;
    enum7 @2;
    upperDash @3 $Lua.naming("upper_dash");
    lowerUnderScore @4 $Lua.naming("lower_underscore");
    upperUnderScore @5 $Lua.naming("upper_underscore");
}

@0xa7e0ba9e3ca0988d;

using Lua = import "lua.capnp";

enum EnumType2 $Lua.naming("lower_underscore") {
    enum5 @0;
    enum6 @1;
    enum7 @2;
}
enum EnumType3 $Lua.naming("lower_underscore") {
    enum5 @0;
    enum6 @1;
    enum7 @2;
    upperDash @3 $Lua.naming("upper_dash");
    lowerUnderScore @4 $Lua.naming("lower_underscore");
    upperUnderScore @5 $Lua.naming("upper_underscore");
}


thinking about Entry extensions

thinking about Entry extensions

@0xb3afa6ab952b49de;

struct Entry {
    magic @0 :UInt32;

    # the number of bytes of file content; typically following this header
    len @1 :UInt64;

    # the name of this file (paths[0]), and the things it is in.
    # Read as: main.c (0) is in code.tar (1) is in code.tar.gz (2) is in ...
    paths @2 :List(Text);

    # the access, modification, change and birth times of the file,
    # in nanoseconds since the UNIX epoch
    atime @3 :UInt64;
    mtime @4 :UInt64;
    ctime @5 :UInt64;
    btime @6 :UInt64;

    ownership :union {
        unknown   @7 :Void;

        posix :group {
            user  @8 :PosixEntity;
            group @9 :PosixEntity;
            mode  @10 :UInt32;
        }
    }

    type :union {
        normal      @11 :Void;
        directory   @12 :Void;
        fifo        @13 :Void;
        softLinkTo  @14 :Text;
        hardLinkTo  @15 :Text;
        charDevice  @16 :DeviceNumbers;
        blockDevice @17 :DeviceNumbers;
    }

    content :union {
        absent  @18 :Void;
        follows @19 :Void;
    }

    container :union {
        # we didn't expect to be able to unpack this,
        # we couldn't identify it as any supported type of archive
        unrecognised @20 :Void;

        # we successfully unpacked this, but included it anyway
        # in the stream, the entries for it will probably appear elsewhere too
        included     @21 :Void;

        # we expected to open this, but failed to parse its header or metadata;
        # so it's included as if it's unrecognised, and no entries were read from it.
        # e.g. a zip file with a corrupt central directory (~= header)
        openError    @22 :Text;

        # we opened this in a way that we thought was successful, but, after
        # reading it, we discovered there was a problem. Some or all of the entries
        # may be present in the stream, and they may individually be corrupt.
        # e.g. gzip with a checksum at the end, we detect the failure after emitting
        # all of the entries, which may be corrupt.
        readError    @23 :Text;
    }

    # Intended to carry filesystem xattrs, like acls and capabilities,
    # but I'm not going to stop you ramming crap in here.
    # For the filesystem, 'name' should be of the format namespace.name, or namespace.name.sub_name
    # The namespaces "user.", "system.", "trusted.", and "security." are defined in man:attr(5).
    # Note: Real (2017) filesystems support only around 5kb of attributes total,
    # including their names, data, and overhead.
    xattrs @24 :List(ExtendedAttribute);
}

struct PosixEntity {
    id   @0 :UInt32;
    name @1 :Text;
}

struct DeviceNumbers {
    # Even though I've never seen a device number over ~255,
    # man:mknod(2) defines these as mode_t and dev_t respectively,
    # which the current kernel has as:
    # mode_t: "unsigned short" (16-bits on all Debian platforms)
    # dev_t: "u32" (much less ambiguous)

    major @0 :UInt16;
    minor @1 :UInt32;
}

struct ExtendedAttribute {
    name  @0 :Text;
    value @1 :Data;
}

@0xb3afa6ab952b49de;

struct Entry {
    magic @0 :UInt32;

    # the number of bytes of file content; typically following this header
    len @1 :UInt64;

    # the name of this file (paths[0]), and the things it is in.
    # Read as: main.c (0) is in code.tar (1) is in code.tar.gz (2) is in ...
    paths @2 :List(Text);

    # the access, modification, change and birth times of the file,
    # in nanoseconds since the UNIX epoch
    atime @3 :UInt64;
    mtime @4 :UInt64;
    ctime @5 :UInt64;
    btime @6 :UInt64;

    ownership :union {
        unknown   @7 :Void;

        posix :group {
            user  @8 :PosixEntity;
            group @9 :PosixEntity;
            mode  @10 :UInt32;
        }
    }

    type :union {
        normal      @11 :Void;
        directory   @12 :Void;
        fifo        @13 :Void;
        softLinkTo  @14 :Text;
        hardLinkTo  @15 :Text;
        charDevice  @16 :DeviceNumbers;
        blockDevice @17 :DeviceNumbers;
    }

    content :union {
        absent  @18 :Void;
        follows @19 :Void;
    }
}

struct PosixEntity {
    id   @0 :UInt32;
    name @1 :Text;
}

struct DeviceNumbers {
    # Even though I've never seen a device number over ~255,
    # man:mknod(2) defines these as mode_t and dev_t respectively,
    # which the current kernel has as:
    # mode_t: "unsigned short" (16-bits on all Debian platforms)
    # dev_t: "u32" (much less ambiguous)

    major @0 :UInt16;
    minor @1 :UInt32;
}


Bump to v9

Bump to v9

@0xb4bf81c2da517923;

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 = "mkqyz71cc96e8gmq2h4dhnfm56k90t2055muv33h2ptw1q6h8n4h",
  # 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 = 9,  # Increment this for every release.

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Ghost Blog or Website"),
        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 = "/opt/sandstorm/latest/usr/include/sandstorm", packagePath = "node_modules" ),
      ( 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.
      ),
      ( sourcePath = "/usr/local/lib/libkj-0.6-dev.so", packagePath = "usr/lib/libkj-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libkj-async-0.6-dev.so", packagePath = "usr/lib/libkj-async-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libcapnp-0.6-dev.so", packagePath = "usr/lib/libcapnp-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libcapnpc-0.6-dev.so", packagePath = "usr/lib/libcapnpc-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libcapnp-rpc-0.6-dev.so", packagePath = "usr/lib/libcapnp-rpc-0.6-dev.so" ),
      ( sourcePath = "/opt/sandstorm/latest/usr/include", packagePath = "usr/include" )
    ]
  ),

  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 = ["themes", "core", "node_modules"]
  # 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", "8080", "--", "./run-ghost.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);

@0xb4bf81c2da517923;

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 = "mkqyz71cc96e8gmq2h4dhnfm56k90t2055muv33h2ptw1q6h8n4h",
  # 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 = 7,  # Increment this for every release.

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Ghost Blog or Website"),
        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 = "/opt/sandstorm/latest/usr/include/sandstorm", packagePath = "node_modules" ),
      ( 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.
      ),
      ( sourcePath = "/usr/local/lib/libkj-0.6-dev.so", packagePath = "usr/lib/libkj-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libkj-async-0.6-dev.so", packagePath = "usr/lib/libkj-async-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libcapnp-0.6-dev.so", packagePath = "usr/lib/libcapnp-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libcapnpc-0.6-dev.so", packagePath = "usr/lib/libcapnpc-0.6-dev.so" ),
      ( sourcePath = "/usr/local/lib/libcapnp-rpc-0.6-dev.so", packagePath = "usr/lib/libcapnp-rpc-0.6-dev.so" ),
      ( sourcePath = "/opt/sandstorm/latest/usr/include", packagePath = "usr/include" )
    ]
  ),

  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 = ["themes", "core", "node_modules"]
  # 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", "8080", "--", "./run-ghost.sh"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  ]
);


formatting for explorers.capnp

formatting for explorers.capnp

@0xee82762a0e12b9f0;

struct Observation {
    timestamp  @0 : Int64;          # seconds
    x          @1 : Float32;
    y          @2 : Float32;
    red        @3 : UInt8;
    green      @4 : UInt8;
    blue       @5 : UInt8;

    diagnostic : union {
       ok @6 : Void;
       warning @7 : Text;
    }
}

struct Grid {
   cells @0 : List(List(Cell));
   numberOfUpdates @1 : UInt32;
   latestTimestamp @2 : Int64;

   struct Cell {
      latestTimestamp @0 : Int64;
      numberOfUpdates @1 : UInt32;
      meanRed         @2 : Float32;
      meanGreen       @3 : Float32;
      meanBlue        @4 : Float32;
   }
}

@0xee82762a0e12b9f0;

struct Observation {
    timestamp  @0 : Int64;
    x          @1 : Float32;
    y          @2 : Float32;
    red        @3 : UInt8;
    green      @4 : UInt8;
    blue       @5 : UInt8;

    diagnostic : union {
       ok @6 : Void;
       warning @7 : Text;
    }
}

struct Grid {
   struct Cell {
      latestTimestamp @0 : Int64;
      numberOfUpdates @1 : UInt32;
      meanRed         @2 : Float32;
      meanGreen       @3 : Float32;
      meanBlue        @4 : Float32;
   }

   cells @0 : List(List(Cell));
   numberOfUpdates @1 : UInt32;
   latestTimestamp @2 : Int64;
}


always include usr/share/texmf-dist

always include usr/share/texmf-dist

@0xb1ad881ac0baba9f;

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 = "5vuv7v0w7gu20z72m78n83rx9qqtqpmtk32f39823wh967z226qh",
  # 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 ShareLaTeX Instance"),
        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 = "/home/david/appdev/sharelatex"),
      ( 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 = ["usr/share/texmf-dist"]
  # 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", "2999", "--", "/start.bash"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "USER", value="sandstorm-user")
  ]
);

@0xb1ad881ac0baba9f;

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 = "5vuv7v0w7gu20z72m78n83rx9qqtqpmtk32f39823wh967z226qh",
  # 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 ShareLaTeX Instance"),
        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 = "/home/david/appdev/sharelatex"),
      ( 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 = []
  # 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", "2999", "--", "/start.bash"],
  environ = [
    # Note that this defines the *entire* environment seen by your app.
    (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
    (key = "USER", value="sandstorm-user")
  ]
);


Going to need to bump app version.

Going to need to bump app 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 = 6,  # 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"))],
      roles = [(title = (defaultText = "editor"),
                permissions = [true],
                verbPhrase = (defaultText = "can edit"),
                default = true),
               (title = (defaultText = "reader"),
                permissions = [false],
                verbPhrase = (defaultText = "can read"))]
    )
  )
);

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 = 5,  # 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"))],
      roles = [(title = (defaultText = "editor"),
                permissions = [true],
                verbPhrase = (defaultText = "can edit"),
                default = true),
               (title = (defaultText = "reader"),
                permissions = [false],
                verbPhrase = (defaultText = "can read"))]
    )
  )
);

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")
  ]
);


Create sandstorm-pkgdef.capnp

Create sandstorm-pkgdef.capnp

@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 = 22,  # Increment this for every release.

    appMarketingVersion = (defaultText = "1.6.1~2017-03-07"),

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Etherpad Document"),
        nounPhrase = (defaultText = "pad"),
        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 "app-graphics/etherpad-128.svg"),
        grain = (svg = embed "app-graphics/etherpad-24.svg"),
        market = (svg = embed "app-graphics/etherpad-150.svg"),
      ),

      website = "http://etherpad.org/",
      codeUrl = "https://github.com/kentonv/etherpad-lite",
      license = (openSource = apache2),
      categories = [office, productivity],

      author = (
        contactEmail = "kenton@sandstorm.io",
        pgpSignature = embed "pgp-signature",
        upstreamAuthor = "Etherpad Foundation",
      ),
      pgpKeyring = embed "pgp-keyring",

      description = (defaultText = embed "description.md"),
      shortDescription = (defaultText = "Document editor"),

      screenshots = [
        (width = 1280, height = 614, png = embed "screenshot_etherpad_index.png"),
        (width = 1280, height = 614, png = embed "screenshot_etherpad_history.png")
      ],

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

  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" ]
        # 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.
      ),
      ( sourcePath = "/opt/sandstorm/latest/usr/include",
        packagePath = "usr/include" )
    ]
  ),

  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", "node_modules", "cache"],
  # 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"))],
      eventTypes = [
        (name = "edit", verbPhrase = (defaultText = "edited pad"),
            notifySubscribers = false, autoSubscribeToGrain = true),
        (name = "comment", verbPhrase = (defaultText = "added comment"),
            notifySubscribers = true, autoSubscribeToThread = true),
        (name = "reply", verbPhrase = (defaultText = "replied to comment"),
            notifySubscribers = true, autoSubscribeToThread = true)
      ],
    ),

    saveIdentityCaps = true,
  )
);

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"),
    (key = "SANDSTORM", value = "1"),
    (key = "HOME", value = "/var"),  # Etherpad imports `npm` which crashes on start without this.
  ]
);

@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 = 22,  # Increment this for every release.

    appMarketingVersion = (defaultText = "1.6.1~2017-03-07"),

    actions = [
      # Define your "new document" handlers here.
      ( title = (defaultText = "New Etherpad Document"),
        nounPhrase = (defaultText = "pad"),
        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 "app-graphics/etherpad-128.svg"),
        grain = (svg = embed "app-graphics/etherpad-24.svg"),
        market = (svg = embed "app-graphics/etherpad-150.svg"),
      ),

      website = "http://etherpad.org/",
      codeUrl = "https://github.com/kentonv/etherpad-lite",
      license = (openSource = apache2),
      categories = [office, productivity],

      author = (
        contactEmail = "kenton@sandstorm.io",
        pgpSignature = embed "pgp-signature",
        upstreamAuthor = "Etherpad Foundation",
      ),
      pgpKeyring = embed "pgp-keyring",

      description = (defaultText = embed "description.md"),
      shortDescription = (defaultText = "Document editor"),

      screenshots = [
        (width = 448, height = 343, png = embed "sandstorm-screenshot.png")
      ],

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

  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" ]
        # 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.
      ),
      ( sourcePath = "/opt/sandstorm/latest/usr/include",
        packagePath = "usr/include" )
    ]
  ),

  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", "node_modules", "cache"],
  # 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"))],
      eventTypes = [
        (name = "edit", verbPhrase = (defaultText = "edited pad"),
            notifySubscribers = false, autoSubscribeToGrain = true),
        (name = "comment", verbPhrase = (defaultText = "added comment"),
            notifySubscribers = true, autoSubscribeToThread = true),
        (name = "reply", verbPhrase = (defaultText = "replied to comment"),
            notifySubscribers = true, autoSubscribeToThread = true)
      ],
    ),

    saveIdentityCaps = true,
  )
);

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"),
    (key = "SANDSTORM", value = "1"),
    (key = "HOME", value = "/var"),  # Etherpad imports `npm` which crashes on start without this.
  ]
);