@mindburn/helm-ai-kernel 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,89 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.6
4
+ // protoc v7.34.1
5
+ // source: google/protobuf/timestamp.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ export const protobufPackage = "google.protobuf";
9
+ function createBaseTimestamp() {
10
+ return { seconds: 0, nanos: 0 };
11
+ }
12
+ export const Timestamp = {
13
+ encode(message, writer = new BinaryWriter()) {
14
+ if (message.seconds !== 0) {
15
+ writer.uint32(8).int64(message.seconds);
16
+ }
17
+ if (message.nanos !== 0) {
18
+ writer.uint32(16).int32(message.nanos);
19
+ }
20
+ return writer;
21
+ },
22
+ decode(input, length) {
23
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24
+ const end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBaseTimestamp();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1: {
30
+ if (tag !== 8) {
31
+ break;
32
+ }
33
+ message.seconds = longToNumber(reader.int64());
34
+ continue;
35
+ }
36
+ case 2: {
37
+ if (tag !== 16) {
38
+ break;
39
+ }
40
+ message.nanos = reader.int32();
41
+ continue;
42
+ }
43
+ }
44
+ if ((tag & 7) === 4 || tag === 0) {
45
+ break;
46
+ }
47
+ reader.skip(tag & 7);
48
+ }
49
+ return message;
50
+ },
51
+ fromJSON(object) {
52
+ return {
53
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
54
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
55
+ };
56
+ },
57
+ toJSON(message) {
58
+ const obj = {};
59
+ if (message.seconds !== 0) {
60
+ obj.seconds = Math.round(message.seconds);
61
+ }
62
+ if (message.nanos !== 0) {
63
+ obj.nanos = Math.round(message.nanos);
64
+ }
65
+ return obj;
66
+ },
67
+ create(base) {
68
+ return Timestamp.fromPartial(base ?? {});
69
+ },
70
+ fromPartial(object) {
71
+ const message = createBaseTimestamp();
72
+ message.seconds = object.seconds ?? 0;
73
+ message.nanos = object.nanos ?? 0;
74
+ return message;
75
+ },
76
+ };
77
+ function longToNumber(int64) {
78
+ const num = globalThis.Number(int64.toString());
79
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
80
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
81
+ }
82
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
83
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
84
+ }
85
+ return num;
86
+ }
87
+ function isSet(value) {
88
+ return value !== null && value !== undefined;
89
+ }
@@ -0,0 +1,93 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
3
+ export declare const protobufPackage = "helm.authority.v1";
4
+ /**
5
+ * HELM Authority Protocol Buffer Definitions
6
+ *
7
+ * Canonical IDL for the authority evaluation types.
8
+ * Stability: v1 additive-only.
9
+ */
10
+ export declare enum EvaluationResult {
11
+ EVALUATION_RESULT_UNSPECIFIED = 0,
12
+ EVALUATION_RESULT_ALLOW = 1,
13
+ EVALUATION_RESULT_DENY = 2,
14
+ EVALUATION_RESULT_REQUIRE_APPROVAL = 3,
15
+ EVALUATION_RESULT_REQUIRE_EVIDENCE = 4,
16
+ EVALUATION_RESULT_DEFER = 5,
17
+ UNRECOGNIZED = -1
18
+ }
19
+ export declare function evaluationResultFromJSON(object: any): EvaluationResult;
20
+ export declare function evaluationResultToJSON(object: EvaluationResult): string;
21
+ export interface EvaluationRequest {
22
+ requestId: string;
23
+ principalId: string;
24
+ principalType: string;
25
+ effectTypes: string[];
26
+ policyEpoch: string;
27
+ idempotencyKey: string;
28
+ context: {
29
+ [key: string]: string;
30
+ };
31
+ timestamp: Date | undefined;
32
+ }
33
+ export interface EvaluationRequest_ContextEntry {
34
+ key: string;
35
+ value: string;
36
+ }
37
+ export interface EvaluationDecision {
38
+ decisionId: string;
39
+ requestId: string;
40
+ result: EvaluationResult;
41
+ reasonCodes: string[];
42
+ policyEpoch: string;
43
+ issuedAt: Date | undefined;
44
+ expiresAt: Date | undefined;
45
+ contentHash: string;
46
+ }
47
+ export declare const EvaluationRequest: MessageFns<EvaluationRequest>;
48
+ export declare const EvaluationRequest_ContextEntry: MessageFns<EvaluationRequest_ContextEntry>;
49
+ export declare const EvaluationDecision: MessageFns<EvaluationDecision>;
50
+ export type AuthorityServiceService = typeof AuthorityServiceService;
51
+ export declare const AuthorityServiceService: {
52
+ readonly evaluate: {
53
+ readonly path: "/helm.authority.v1.AuthorityService/Evaluate";
54
+ readonly requestStream: false;
55
+ readonly responseStream: false;
56
+ readonly requestSerialize: (value: EvaluationRequest) => Buffer;
57
+ readonly requestDeserialize: (value: Buffer) => EvaluationRequest;
58
+ readonly responseSerialize: (value: EvaluationDecision) => Buffer;
59
+ readonly responseDeserialize: (value: Buffer) => EvaluationDecision;
60
+ };
61
+ };
62
+ export interface AuthorityServiceServer extends UntypedServiceImplementation {
63
+ evaluate: handleUnaryCall<EvaluationRequest, EvaluationDecision>;
64
+ }
65
+ export interface AuthorityServiceClient extends Client {
66
+ evaluate(request: EvaluationRequest, callback: (error: ServiceError | null, response: EvaluationDecision) => void): ClientUnaryCall;
67
+ evaluate(request: EvaluationRequest, metadata: Metadata, callback: (error: ServiceError | null, response: EvaluationDecision) => void): ClientUnaryCall;
68
+ evaluate(request: EvaluationRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: EvaluationDecision) => void): ClientUnaryCall;
69
+ }
70
+ export declare const AuthorityServiceClient: {
71
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): AuthorityServiceClient;
72
+ service: typeof AuthorityServiceService;
73
+ serviceName: string;
74
+ };
75
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
76
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
77
+ [K in keyof T]?: DeepPartial<T[K]>;
78
+ } : Partial<T>;
79
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
80
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
81
+ [K in keyof P]: Exact<P[K], I[K]>;
82
+ } & {
83
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
84
+ };
85
+ export interface MessageFns<T> {
86
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
87
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
88
+ fromJSON(object: any): T;
89
+ toJSON(message: T): unknown;
90
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
91
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
92
+ }
93
+ export {};