Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=1.35.8-2
version=1.37.5-1
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
13 changes: 6 additions & 7 deletions src/main/proto/cel/expr/conformance/conformance_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package cel.expr.conformance;
import "cel/expr/checked.proto";
import "cel/expr/eval.proto";
import "cel/expr/syntax.proto";
import "google/rpc/status.proto";

option cc_enable_arenas = true;
option go_package = "cel.dev/expr/conformance";
Expand Down Expand Up @@ -69,7 +68,7 @@ message ParseResponse {
cel.expr.ParsedExpr parsed_expr = 1;

// Any number of issues with [StatusDetails][] as the details.
repeated google.rpc.Status issues = 2;
cel.expr.ErrorSet issues = 2;
}

// Request message for the Check method.
Expand All @@ -86,7 +85,7 @@ message CheckRequest {
// Language Definition.
string container = 3;

// If true, use only the declarations in [type_env][google.api.expr.conformance.v1alpha1.CheckRequest.type_env]. If false (default),
// If true, use only the declarations in [type_env][cel.expr.conformance.CheckRequest.type_env]. If false (default),
// add declarations for the standard definitions to the type environment. See
// "Standard Definitions" in the Language Definition.
bool no_std_env = 4;
Expand All @@ -98,7 +97,7 @@ message CheckResponse {
cel.expr.CheckedExpr checked_expr = 1;

// Any number of issues with [StatusDetails][] as the details.
repeated google.rpc.Status issues = 2;
cel.expr.ErrorSet issues = 2;
}

// Request message for the Eval method.
Expand All @@ -113,10 +112,10 @@ message EvalRequest {
}

// Bindings for the external variables. The types SHOULD be compatible
// with the type environment in [CheckRequest][google.api.expr.conformance.v1alpha1.CheckRequest], if checked.
// with the type environment in [CheckRequest][cel.expr.conformance.CheckRequest], if checked.
map<string, cel.expr.ExprValue> bindings = 3;

// SHOULD be the same container as used in [CheckRequest][google.api.expr.conformance.v1alpha1.CheckRequest], if checked.
// SHOULD be the same container as used in [CheckRequest][cel.expr.conformance.CheckRequest], if checked.
string container = 4;
}

Expand All @@ -129,7 +128,7 @@ message EvalResponse {
// Note that CEL execution errors are reified into [ExprValue][].
// Nevertheless, we'll allow out-of-band issues to be raised,
// which also makes the replies more regular.
repeated google.rpc.Status issues = 2;
cel.expr.ErrorSet issues = 2;
}

// A specific position in source.
Expand Down
19 changes: 19 additions & 0 deletions src/main/proto/cel/expr/conformance/proto2/test_all_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,25 @@ message TestAllTypes {
optional string single_name = 405;
}

// Field names formerly defined as reserved CEL identifiers.
optional bool as = 500;
optional bool break = 501;
optional bool const = 502;
optional bool continue = 503;
optional bool else = 504;
optional bool for = 505;
optional bool function = 506;
optional bool if = 507;
optional bool import = 508;
optional bool let = 509;
optional bool loop = 510;
optional bool package = 511;
optional bool namespace = 512;
optional bool return = 513;
optional bool var = 514;
optional bool void = 515;
optional bool while = 516;

extensions 1000 to max;
}

Expand Down
19 changes: 19 additions & 0 deletions src/main/proto/cel/expr/conformance/proto3/test_all_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,25 @@ message TestAllTypes {
NestedMessage oneof_msg = 401;
bool oneof_bool = 402;
}

// Field names formerly defined as reserved CEL identifiers.
bool as = 500;
bool break = 501;
bool const = 502;
bool continue = 503;
bool else = 504;
bool for = 505;
bool function = 506;
bool if = 507;
bool import = 508;
bool let = 509;
bool loop = 510;
bool package = 511;
bool namespace = 512;
bool return = 513;
bool var = 514;
bool void = 515;
bool while = 516;
}

// This proto includes a recursively nested message.
Expand Down
80 changes: 80 additions & 0 deletions src/main/proto/cel/policy/policy.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package cel.policy;

option cc_enable_arenas = true;
option go_package = "cel.dev/policy";
option java_multiple_files = true;
option java_package = "dev.cel.policy";

message PolicySpec {
message Import {
string name = 1;
}

message Variable {
string name = 1;

string description = 2;

string expression = 3;
}

message Rule {
string id = 1;

string description = 2;

repeated Variable variables = 3;

repeated Match match = 4;
}

message Match {
// If unset, the default is "true".
optional string condition = 1;

oneof action {
string output = 2;

Rule rule = 3;
}

string explanation = 4;
}

string name = 1;

repeated Import imports = 2;

// If set, [PolicySpec][match] and [PolicySpec][rule] must be unset.
repeated Variable variables = 3;
// If set, [PolicySpec][match] and [PolicySpec][rule] must be unset.
optional string output = 4;
// If set, [PolicySpec][match] and [PolicySpec][rule] must be unset.
optional string description = 5;
// If set, [PolicySpec][match] and [PolicySpec][rule] must be unset.
optional string explanation = 6;

// If set, [PolicySpec][variables], [PolicySpec][output], [PolicySpec][description],
// [PolicySpec][explanation], and [PolicySpec][rule] must be unset.
repeated Match match = 7;

// If set, [PolicySpec][variables], [PolicySpec][output], [PolicySpec][description],
// [PolicySpec][explanation], and [PolicySpec][match] must be unset.
Rule rule = 8;
}
Loading
Loading