Proto commits in PolymerLabs/arcs

These 75 commits are when the Protocol Buffers files have changed:

Commit:d044d61
Author:Alex Rosengarten
Committer:Arcs C3PO

Updating encoders to support converting Recipes to manifest protos. - updated tests - added 'query' direction types to proto. PiperOrigin-RevId: 376070231

The documentation is generated from this commit.

Commit:17526ed
Author:Alex Rosengarten
Committer:Arcs C3PO

`mediapipe_arcs` converts HandleProtos from mediapipe graphs. PiperOrigin-RevId: 376055453

The documentation is generated from this commit.

Commit:e60e4d8
Author:Shane Stephens
Committer:Arcs C3PO

Rename storage/Reference to RawReference and provide some comments describing the difference between RawReference and entity/Reference. PiperOrigin-RevId: 360596882

Commit:e410c0f
Author:Filippo Galgani
Committer:Arcs C3PO

add writeOnly boolean to StoreOptions, to signal to storage service that it can instantiate a write-only optimized stack PiperOrigin-RevId: 360583783

Commit:3370c5d
Author:J Pratt
Committer:Arcs C3PO

Nullable proto parcelable (#6938) Implements the core of Nullable support in Kotlin (conversion to/from Referencable, to/from Proto and Kotlin, Parcelable and Proto representations of Nullable Types). Also turns on Nullable Support TypeScript flag (needed to ensure parsing and code generation of Nullable is available for Kotlin testing). This should not have an impact on Kotlin runtime behaviour and so is deemed safe. Closes #6938 PiperOrigin-RevId: 359628137

Commit:1c19fd8
Author:Maria Mandlis
Committer:Arcs C3PO

Add support for FieldType Annotations in DefaultSchemaSerializer PiperOrigin-RevId: 357249282

Commit:7742e39
Author:Michael Martin
Committer:Arcs C3PO

Remove CrdtOperation interface and rename CrdtOperationAtTime to CrdtOperation PiperOrigin-RevId: 357097811

Commit:bf49e5a
Author:J Pratt
Committer:Arcs C3PO

[low precision] Duration support for Kotlin (#6881) Added both Shane and Cameron with the intent of dividing the review workload Shane for review of Typescript changes Cameron for review of Kotlin changes Note: @shans I think this is all the different places that currently need to be updated to add a type. I'm planning to come back to this to try to reduce the workload (per type added). Closes #6881 PiperOrigin-RevId: 355328215

Commit:f400ae4
Author:Filippo Galgani
Committer:Arcs C3PO

Propagate the cause message when serializing CrdtException to proto. Before this change, only the CrdtException message and stack trace were printed. After this change also the cause message is printed which is normally the underlying problem we want to address. PiperOrigin-RevId: 343936408

Commit:90a4765
Author:Sarah Heimlich
Committer:Arcs C3PO

Devtools proto (#6453) - Add blanket DevToolsMessage proto - Only send across DevToolsMessageProtos - Refactor creation of protos to simplify cc: @piotrswigon @jasonwyatt Closes #6453 COPYBARA_INTEGRATE_REVIEW=https://github.com/polymerlabs/arcs/pull/6453 from SHeimlich:devtools-proto d7161b1736ab9c084f06ba751c5e1cb15fbd9376 PiperOrigin-RevId: 339168407

Commit:f724178
Author:Sarah Heimlich
Committer:Arcs C3PO

Init DevTools Proto (#6450) - Create DevTools Init Proto - Send a DevTools Init Proto when a websocket is connected. cc: @piotrswigon @jasonwyatt Closes #6450 COPYBARA_INTEGRATE_REVIEW=https://github.com/polymerlabs/arcs/pull/6450 from SHeimlich:devtools-protos2 32df92baa3f4c2b6a2429f55d5564ed0cf91f3a4 PiperOrigin-RevId: 339155446

Commit:6f03590
Author:Sarah Heimlich
Committer:Arcs C3PO

Add initial ProtoBuf for DevToolsMessages. (#6438) - Add devtools_message.proto file - Create and send message in DevToolsService with the new ProtoBuf. cc: @piotrswigon @jasonwyatt Closes #6438 COPYBARA_INTEGRATE_REVIEW=https://github.com/polymerlabs/arcs/pull/6438 from SHeimlich:devtools-protos 226b0ab0a62e6ca2216389b3b89f636a7850b9b7 PiperOrigin-RevId: 339127009

Commit:4c38954
Author:Cameron Silvestrini
Committer:Arcs C3PO

Defines StoreOptionsProto and converter functions for StoreOptions. Will be used for the upcoming IMuxedStorageService AIDL interface. Also updated some existing proto conversion tests to use the JUnit4 runner instead of the AndroidJUnit4 runner. These tests did not really need any Android-specific functionality, and swapping the test runners reduces test times from ~25s down to ~4s. PiperOrigin-RevId: 335738979

Commit:ad8732a
Author:Cameron Silvestrini
Committer:Arcs C3PO

Defines an AIDL interface for IMuxedStorageService, and provides the shell for the implementation. This service is for proxying MuxedStorageProxyMessages to/from the storage service. It doesn't follow the old StorageService's format for registering callbacks, etc. and instead shows a new path forward involving "channel" objects, i.e. a way of communicating with a store (or DirectStoreMuxer in this case) without binding to it every time. Will migrate the old service to this new format too if it looks good. PiperOrigin-RevId: 335518145

Commit:52b9c75
Author:Cameron Silvestrini
Committer:Arcs C3PO

Define MuxedProxyMessageProto for serialising MuxedProxyMessages Will be used to transport these messages over AIDL PiperOrigin-RevId: 334804120

Commit:64c582c
Author:Filippo Galgani
Committer:Arcs C3PO

add an overload for the collection remove function that just takes the id. Afterwards we should migrate all usages of remove and retire the old method. This changes the crdt operation to just have the id as well. PiperOrigin-RevId: 334742337

Commit:adba572
Author:Joshua Pratt
Committer:GitHub

Add Instant primitive type (#5829) * Add support for Instant to Kotlin * Update the parser and ast types to better support numbers and units, also add a function for viewing source code locations * Make entity internals available to refinement expressions without creating cycles * Update code generation for Instant and other number types * Add tests for sql Instant generation and rename some tests with non-standard naming patterns * Update sql refinement generator for Instant * Update goldens for Instant * Check cgtest results one by one so that test failures print the diffs line by line * Add sanity checks on creation & expiration time to test refinement generator * Add platform independent facades for BigInt, Instant and Duration * Supress unused args * Suppress issues with minAPI level * Introduce explicit drop function

Commit:c40970a
Author:galganif
Committer:GitHub

Add an hard reference boolean field to references. This is set by Ent… (#6091) * Add an hard reference boolean field to references. This is set by EntityBase if the schema field has the @hardRef annotation, and persisted in the database in the entity_refs table. It will be later used to bulk delete those entities. * fix db migration * review comments, upgrade test

Commit:5327a97
Author:Cameron Silvestrini
Committer:GitHub

Deletes PolicyOptions, it's not needed anymore. (#6012) It has been replaced by the `@ingress` annotation.

Commit:22ce933
Author:Cameron Silvestrini
Committer:GitHub

Uses the `@ingress` annotation to identify ingress handles. (#6001) * Uses the `@ingress` annotation to identify ingress handles. No longer needs to use the PolicyOptions object to identify ingress handles (via store IDs). Now the ingress points are computed by looking at the particle specs that are marked as having ingress. PolicyOptions will be deleted in a follow up PR. Also updated PolicyConstraints to talk about schemas instead of store IDs, which meant updating the proto representation too. * Deletes unmarkedProtectedStoresRestrictUsage * `map` handles are ingress, unannotated ingress-like particles are an error * More tests, removed error for unannotated ingress * TypeClaim -> SchemaClaim, PartialClaim -> SelectorClaim * lint

Commit:4b90b83
Author:Alex Rosengarten
Committer:GitHub

Encoding / Decoding Max Type Variables via Protos (#5893) * Squashed commit of the following: commit f12f0cb46b0f15bdba263d2430074f6c56720871 Author: Alex Rosengarten <alxr@google.com> Date: Fri Aug 7 15:21:55 2020 -0700 Increase maxType tests commit 94843029ea535e39bac723993d171988ba624f4b Author: Alex Rosengarten <alxr@google.com> Date: Fri Aug 7 15:09:07 2020 -0700 Added `maxType` field to manifest.proto. Impl TS --> proto serialization * Added maxType flag to dataclass * Updated proto --> Kt * Squashed commit of the following: commit 546019a9cac74ba54c15240b8ec87b18c65d7c86 Author: Alex Rosengarten <alxr@google.com> Date: Mon Aug 10 12:07:07 2020 -0700 var { maxType } --> var { constraint { unconstrained } } commit 65160327486fc30cd4a82520fd8b7ec5e9e8fab8 Author: Alex Rosengarten <alxr@google.com> Date: Fri Aug 7 16:49:32 2020 -0700 cleaned up indentation commit f12f0cb46b0f15bdba263d2430074f6c56720871 Author: Alex Rosengarten <alxr@google.com> Date: Fri Aug 7 15:21:55 2020 -0700 Increase maxType tests commit 94843029ea535e39bac723993d171988ba624f4b Author: Alex Rosengarten <alxr@google.com> Date: Fri Aug 7 15:09:07 2020 -0700 Added `maxType` field to manifest.proto. Impl TS --> proto serialization * Updated proto decode to support new representation * rm extra cruft from merge * maxAccess: ts --> proto * maxAccess: proto --> kt * adding require to tv decoding * nit, fixed compile * Impl nits

Commit:71a3d48
Author:Cameron Silvestrini
Committer:GitHub

Define PolicyOptionsProto with encode/decode functions (#5876) We'll need this to serialise PolicyOptions to disk for compile-time verifications. PolicyOptions is still just a temporary measure, we'll replace it with some annotations later on.

Commit:fa9a0c8
Author:Cameron Silvestrini
Committer:GitHub

Deletes policy EgressType enums and allows it to be an arbitrary string (#5856)

Commit:962fe81
Author:Cameron Silvestrini
Committer:GitHub

Adds an egress type parameter to the `@egress` particle annotation (#5828) * Adds an egress type parameter to the `@egress` particle annotation * Kotlin egressType decoding * TS boolean getters renamed from foo to isFoo, store annotations in proto, compute getters * Undelete deprecated arcId * fix test

Commit:0ab774d
Author:Ray Cromwell
Committer:GitHub

Allow refinements and queries to use DSL by default (#5696) * Allow refinments and queries to use DSL by default * add doc * lint * rebase * rebased * add type widening/narrowing to operations * rebase and add tests for widening * fix merge issue * fix tests * remove type * buildifier * strictdeps/buildifier * add DSL library to SDK * strictdeps * strictdeps * strictdeps

Commit:89c48d8
Author:Piotr Swigon
Committer:GitHub

Plumbs serialized particle expression through data structures (#5827)

Commit:bb84ad4
Author:Gogul Balakrishnan
Committer:GitHub

Policy Verification: allow egresses of policy to be explicitly specified (#5807) Adds a map to the PolicyOptions data class that specifies the allowed egresses of a policy. We also remove the PolicyOptions from policy.proto as we may not serialize PolicyOptions in it current form..

Commit:2dfb2d0
Author:Cameron Silvestrini
Committer:GitHub

Proto encoding/decoding for Policy and PolicyConstraints classes (#5717) * Proto encoding/decoding for Policy and PolicyConstraints classes * deps * Revert

Commit:f6e2075
Author:Cameron Silvestrini
Committer:GitHub

Add AccessPath.Root.Store to proto file (#5783)

Commit:6b57627
Author:Cameron Silvestrini
Committer:GitHub

Proto encoding for Type, FieldType, Schema (#5709) * Rename TypeProtoDecoders.kt to TypeProto.kt, since it is about to get some encoder functions * Encode Type and Schema to proto A lot of proto decoding functionality already exists, but most encoding functionality is missing. We're going to need to be able to encode lots of things to proto in order to serialise PolicyConstraints properly. This is the first step in adding that proto encoding, starting at the bottom of the stack (types) and working upwards. * Missing changes to SchemaProto.kt * Re-renamed files

Commit:7a7c633
Author:Cameron Silvestrini
Committer:GitHub

Policy Translation: Defines a new PolicyOptions class and corresponding proto. (#5769) This is used to customise the policy enforcement algorithm. Customers will define their own config textproto file and use that when invoking the policy algorithm. Currently this just has the storeMap field, but we can add things in future (e.g. whitelist of particle specs). Co-authored-by: Gogul Balakrishnan <bgogul@google.com>

Commit:169c4c7
Author:Piotr Swigon
Committer:GitHub

encode kotlin types to proto and back (#5742)

Commit:40eec09
Author:Cameron Silvestrini
Committer:GitHub

Add proto encoding and decoding for ordered lists and inline entities (#5715)

Commit:43fa3ad
Author:shans
Committer:GitHub

End-to-end Inline entities test (#5686)

Commit:f516683
Author:Joshua Pratt
Committer:GitHub

Support both Number and BigInt refinements (#5480) * Use operator functions instead of statics * Enforce type safety (i.e. avoid autocasting) * Support BigInt refinements * Update to newer chrome driver to allow tests to pass with up-to-date chrome * Expose segments for testing * Update goldens with BigInteger imports * Fix language name in schema2cpp s/kotlin/cpp/ * Add BigInteger imports to schema2kotlin * Add BigInteger support to kotlin geneators * Using golden_kt to test bigint codegen and refinement support * Test support for refinements that containing subexpressions using both bigint and number * Open up SchemaUnionType and SchemaTupleType types * Add some more tests and de-duplicate some code

Commit:6f79aab
Author:mykmartin
Committer:GitHub

Add a CrdtSet.Clear operation. (#5630) * Add a CrdtSet.Clear operation. This allows collection.clear() to execute without needing to read the current contents of the collection, which in turn will allow write-only handles to avoid syncing any data. * Fix import ordering * Review comments * Use constant for unitialised timestamp in unit test

Commit:5e084fe
Author:Cameron Silvestrini
Committer:GitHub

Plumb ParticleSpec.isolated property through ParticleSpecProto to Kotlin (#5618)

Commit:698ec0a
Author:Alex Rosengarten
Committer:GitHub

manifest2proto: Added type to handle connection instance (contained in particle instance within a recipe). (#5613) * Handle connection instance has type * writing handle connection instance to proto * Updating textproto -- kotlin proto deserialization works * lint issues * Impl feedback

Commit:1145452
Author:Maria Mandlis
Committer:GitHub

pass handle annotations (instead of capabilities) to KT classes and protos (#5556) * pass handle annotations (instead of capabilities) to KT classes and protos * address comments: rename method, add test * address comments

Commit:929767b
Author:Alex Rosengarten
Committer:GitHub

Encoding constraints on type variable protos. (#5536) * update jsdoc * Type vars have constraint info: TS --> proto * updated m2p: handles unconstrained type variables * kotlin can decode type variables * lint fixes * fixing test * Fixed type variable data class * Passing proto test * comment clarifying constraint * right level of variable resolution + tests passing * impl suggestsions * minor mistake * random lint issue * cleanup (lint) * minor fix * updating textproto * update kt side * json formatting for readability * copy editing * tidying up * simplification * undo

Commit:554dd5c
Author:Maria Mandlis
Committer:GitHub

use annotations for arcId in recipe and policy protos (#5538) * replace recipe arcId with annotations in protos merge policy and manifest annotations * fix build * address comments

Commit:1e94f07
Author:shans
Committer:GitHub

Implement database support for ordered lists (#5503)

Commit:36f43d3
Author:shans
Committer:GitHub

Support for converting ReferencableLists to/from protos (#5467)

Commit:75624ad
Author:Cameron Silvestrini
Committer:GitHub

Define AnnotationRefProto and use it in PolicyProto. (#5415) Annotation definitions themselves aren't encoded in protos, yet. Also the only parameter type supported so far is strings. This is just to unblock work on policy2proto, the other features will be added later.

Commit:4590b3f
Author:Cameron Silvestrini
Committer:GitHub

Policy proto definition (#5390) * Policy proto representation This is a proto representation of the policy specification language. It will be used to serialize policies after being parsed from a manifest file, to be used in Kotlin. * Review comments * More review * Fix tests * Fix more tests

Commit:e834aac
Author:Cameron Silvestrini
Committer:GitHub

Adds "implication" DFA checks, of the form `(A => B)` (#5360) e.g. `check input (derives from store 'x' => is redacted)` means the `redacted` tag is required if the input derives from store 'x'. This PR includes support for DFA implications in both the manifest language and in the DFA algorithm, and also in the manifest proto output.

Commit:dd2d59d
Author:galganif
Committer:GitHub

fix a problem with ReferenceProto, timestamps were being lost during the roundtrip (#5315)

Commit:b08335a
Author:Alex Rosengarten
Committer:GitHub

Updates to proto pathway for Schemas (#5302) * impl hash decode * proto encoding of refinement * Schema normalizeForHash supports tuples * Fix test (queries) + added tuple test * reverting refinementexpression on schema proto * simplified test -- inlined schema * Impl + tested Schema Decoding * lint * impl feedback * ParcelableSchemaFields supports Tuples (iter 0) * Builds; added TODOs * better comments in tests * fixed funky merge * proto text is more compact

Commit:bbe0b01
Author:Gogul Balakrishnan
Committer:GitHub

Decode ClaimProto in Kotlin. (#5299)

Commit:8cd0b6d
Author:Gogul Balakrishnan
Committer:GitHub

Add Checks and Claims to manifest.proto and serialize claims. (#5294) * Create a proto for checks & claims and convert checks to protos. * Remove Literal message type from Predicate.

Commit:dfd2e00
Author:Alex Rosengarten
Committer:GitHub

Furthering manifest.proto to Kotlin conversion (#5272) * serializing more types * encodes tuple * Proto Type for Count * TypeProto Decoding w/ Tests * minor fix: err msg

Commit:8de973d
Author:Alex Rosengarten
Committer:GitHub

Adding query to manifest.proto (#5257)

Commit:6fc28c9
Author:Piotr Swigon
Committer:GitHub

Kill RecipeEvelopeProto with Fire (#5237)

Commit:95b65f0
Author:Cameron Silvestrini
Committer:GitHub

Replaces ParcelableCrdtException with a proto (#5230)

Commit:ee48195
Author:Cameron Silvestrini
Committer:GitHub

Convert ParcelableProxyMessage to protos (#5187) * Convert ParcelableProxyMessage to protos I've left the ParcelableProxyMessage class around as a thin wrapper for now. It's used in a few AIDL functions, which I'll migrate in a follow-up. * fix * strict deps * Delete crdtType param * Comment

Commit:9d0b645
Author:Piotr Swigon
Committer:GitHub

Manifest to proto serializer (#5170)

Commit:9233db8
Author:Cameron Silvestrini
Committer:GitHub

Replace ParcelableCrdtData and ParcelableCrdtOperation with protos (#5186) * Replace ParcelableCrdtData and ParcelableCrdtOperation with protos This means I can finally delete all the Parcelable classes for all the crdt subtypes * Review * lint

Commit:7fc647c
Author:Cameron Silvestrini
Committer:GitHub

Convert ParcelableCrdtEntity to protos (#5175) * Convert ParcelableCrdtEntity to protos * Review

Commit:44aff15
Author:Cameron Silvestrini
Committer:GitHub

Convert ParcelableCrdtSingleton to protos (#5174)

Commit:97395bc
Author:Cameron Silvestrini
Committer:GitHub

Convert ParcelableCrdtCount to protos (#5173)

Commit:de00631
Author:Cameron Silvestrini
Committer:GitHub

Convert ParcelableCrdtSet classes to protobufs (#5145)

Commit:e2c5d50
Author:Piotr Swigon
Committer:GitHub

Adds some missing fields to recipe.proto and reuses HandleMode (#5128)

Commit:72ad7f0
Author:Cameron Silvestrini
Committer:GitHub

Convert all ParcelableReferencable implementations to protobufs (#5115) * Convert all ParcelableReferencable implementations to protobufs * strict deps * Review comments * Revert VersionMapProto.toVersionMap() to fromProto(VersionMapProto)

Commit:3acb7e7
Author:Alex Rosengarten
Committer:GitHub

XXS CL to add a hash field to the Schema proto (#4752)

Commit:8a56d69
Author:Gogul Balakrishnan
Committer:GitHub

Move recipe.proto to java/arcs/core/data/proto/ (#4789)

Commit:e8430f5
Author:Piotr Swigon
Committer:GitHub

A proto encoding for an example recipe utilizing joins feature (#4786)

Commit:1d64b20
Author:Gogul Balakrishnan
Committer:GitHub

Fix a typo in an comment in the recipe.proto file. (#4784)

Commit:d7132d7
Author:Piotr Swigon
Committer:GitHub

Makes it possible to decode a proto from the text format (#4768)

Commit:6182826
Author:Piotr Swigon
Committer:GitHub

Add a simple serialization of refinement expressions into a proto (#4766)

Commit:7dde335
Author:Gogul Balakrishnan
Committer:GitHub

[Cleanup] Remove a trailing whitespace in recipe.proto. (#4739)

Commit:749de2f
Author:Piotr Swigon
Committer:GitHub

Introduces a proto to store a Recipe (#4713)

Commit:e82a66b
Author:Piotr Swigon
Committer:GitHub

Add example and tests for TS -> Proto -> Kotlin path (#4702)

Commit:e39fe6c
Author:Cameron Silvestrini
Committer:GitHub

Add VersionMap proto (#4637) * Add VersionMap proto This proto will be used in the SQLite database to store serialized version maps as BLOBs. I've also deleted the ParcelableVersionMap class and have replaced it with proto serialisation. This has reduced a ton of code. I'm hoping to replace the other handwritten Parcelable classes with protos too, assuming we like this new approach. * Fixes * unused deps * Make nullable and non-nullable versions of readProto * lint fix

Commit:9603dc4
Author:Walter Korman
Committer:GitHub

Remove early asylo exploration. (#2242)

This commit does not contain any .proto files.

Commit:3258f2e
Author:Matt Small
Committer:GitHub

secure storage PoC (enclaved via Asylo) (#1504) A small PoC of a secure storage mechanism For more information see enclave/README.md.