@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,269 @@
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.kernel.v1";
4
+ /**
5
+ * HELM Kernel Protocol Buffer Service Definitions
6
+ *
7
+ * Canonical IDL for the core HELM types that cross language boundaries.
8
+ * These are the wire-format definitions for Receipt, DecisionRecord,
9
+ * AuthorizedExecutionIntent, PDP, and EffectBoundary.
10
+ *
11
+ * Stability: v1 additive-only.
12
+ */
13
+ export declare enum Verdict {
14
+ VERDICT_UNSPECIFIED = 0,
15
+ VERDICT_ALLOW = 1,
16
+ VERDICT_DENY = 2,
17
+ VERDICT_ESCALATE = 3,
18
+ UNRECOGNIZED = -1
19
+ }
20
+ export declare function verdictFromJSON(object: any): Verdict;
21
+ export declare function verdictToJSON(object: Verdict): string;
22
+ export declare enum ReasonCode {
23
+ REASON_CODE_UNSPECIFIED = 0,
24
+ REASON_CODE_POLICY_VIOLATION = 1,
25
+ REASON_CODE_NO_POLICY_DEFINED = 2,
26
+ REASON_CODE_PRG_EVALUATION_ERROR = 3,
27
+ REASON_CODE_MISSING_REQUIREMENT = 4,
28
+ REASON_CODE_PDP_DENY = 5,
29
+ REASON_CODE_PDP_ERROR = 6,
30
+ REASON_CODE_BUDGET_EXCEEDED = 7,
31
+ REASON_CODE_BUDGET_ERROR = 8,
32
+ REASON_CODE_ENVELOPE_INVALID = 9,
33
+ REASON_CODE_SCHEMA_VIOLATION = 10,
34
+ REASON_CODE_TEMPORAL_INTERVENTION = 11,
35
+ REASON_CODE_TEMPORAL_THROTTLE = 12,
36
+ REASON_CODE_SANDBOX_VIOLATION = 13,
37
+ REASON_CODE_PROVENANCE_FAILURE = 14,
38
+ REASON_CODE_VERIFICATION_FAILURE = 15,
39
+ REASON_CODE_TENANT_ISOLATION = 16,
40
+ REASON_CODE_JURISDICTION_VIOLATION = 17,
41
+ UNRECOGNIZED = -1
42
+ }
43
+ export declare function reasonCodeFromJSON(object: any): ReasonCode;
44
+ export declare function reasonCodeToJSON(object: ReasonCode): string;
45
+ export interface Effect {
46
+ effectType: string;
47
+ effectId: string;
48
+ /** JSON-encoded parameters */
49
+ params: Uint8Array;
50
+ budgetId: string;
51
+ }
52
+ export interface DecisionRecord {
53
+ id: string;
54
+ timestamp: Date | undefined;
55
+ verdict: Verdict;
56
+ reason: string;
57
+ reasonCode: ReasonCode;
58
+ effectDigest: string;
59
+ requirementSetHash: string;
60
+ signature: string;
61
+ signerKeyId: string;
62
+ policyRef: string;
63
+ policyDecisionHash: string;
64
+ inputContext: Uint8Array;
65
+ }
66
+ export interface AuthorizedExecutionIntent {
67
+ intentId: string;
68
+ decisionId: string;
69
+ effectId: string;
70
+ issuedAt: Date | undefined;
71
+ expiresAt: Date | undefined;
72
+ signature: string;
73
+ signerKeyId: string;
74
+ principal: string;
75
+ }
76
+ export interface Receipt {
77
+ receiptVersion: string;
78
+ receiptId: string;
79
+ decisionId: string;
80
+ effectId: string;
81
+ verdict: Verdict;
82
+ principal: string;
83
+ tool: string;
84
+ action: string;
85
+ timestamp: Date | undefined;
86
+ lamport: number;
87
+ proofgraphNode: string;
88
+ signature: string;
89
+ signerKeyId: string;
90
+ payloadHash: string;
91
+ reasonCode: ReasonCode;
92
+ metadata: {
93
+ [key: string]: string;
94
+ };
95
+ }
96
+ export interface Receipt_MetadataEntry {
97
+ key: string;
98
+ value: string;
99
+ }
100
+ export interface PDPRequest {
101
+ effect: Effect | undefined;
102
+ subject: SubjectDescriptor | undefined;
103
+ context: ContextDescriptor | undefined;
104
+ }
105
+ export interface SubjectDescriptor {
106
+ principal: string;
107
+ tenant: string;
108
+ roles: string[];
109
+ }
110
+ export interface ContextDescriptor {
111
+ jurisdiction: string;
112
+ environment: string;
113
+ timeWindowStart: Date | undefined;
114
+ timeWindowEnd: Date | undefined;
115
+ }
116
+ export interface PDPResponse {
117
+ allow: boolean;
118
+ reasonCode: ReasonCode;
119
+ policyRef: string;
120
+ decisionHash: string;
121
+ obligations: Obligation[];
122
+ }
123
+ export interface Obligation {
124
+ id: string;
125
+ type: string;
126
+ description: string;
127
+ deadline: Date | undefined;
128
+ }
129
+ export interface EffectRequest {
130
+ effect: Effect | undefined;
131
+ principal: string;
132
+ context: {
133
+ [key: string]: string;
134
+ };
135
+ }
136
+ export interface EffectRequest_ContextEntry {
137
+ key: string;
138
+ value: string;
139
+ }
140
+ export interface EffectResponse {
141
+ verdict: Verdict;
142
+ reasonCode: ReasonCode;
143
+ reason: string;
144
+ receipt: Receipt | undefined;
145
+ intent: AuthorizedExecutionIntent | undefined;
146
+ }
147
+ export interface ExecutionResult {
148
+ intentId: string;
149
+ success: boolean;
150
+ output: Uint8Array;
151
+ errorMessage: string;
152
+ completedAt: Date | undefined;
153
+ }
154
+ export interface CompletionReceipt {
155
+ receipt: Receipt | undefined;
156
+ proofgraphNode: string;
157
+ }
158
+ export declare const Effect: MessageFns<Effect>;
159
+ export declare const DecisionRecord: MessageFns<DecisionRecord>;
160
+ export declare const AuthorizedExecutionIntent: MessageFns<AuthorizedExecutionIntent>;
161
+ export declare const Receipt: MessageFns<Receipt>;
162
+ export declare const Receipt_MetadataEntry: MessageFns<Receipt_MetadataEntry>;
163
+ export declare const PDPRequest: MessageFns<PDPRequest>;
164
+ export declare const SubjectDescriptor: MessageFns<SubjectDescriptor>;
165
+ export declare const ContextDescriptor: MessageFns<ContextDescriptor>;
166
+ export declare const PDPResponse: MessageFns<PDPResponse>;
167
+ export declare const Obligation: MessageFns<Obligation>;
168
+ export declare const EffectRequest: MessageFns<EffectRequest>;
169
+ export declare const EffectRequest_ContextEntry: MessageFns<EffectRequest_ContextEntry>;
170
+ export declare const EffectResponse: MessageFns<EffectResponse>;
171
+ export declare const ExecutionResult: MessageFns<ExecutionResult>;
172
+ export declare const CompletionReceipt: MessageFns<CompletionReceipt>;
173
+ export type PolicyDecisionPointServiceService = typeof PolicyDecisionPointServiceService;
174
+ export declare const PolicyDecisionPointServiceService: {
175
+ readonly evaluate: {
176
+ readonly path: "/helm.kernel.v1.PolicyDecisionPointService/Evaluate";
177
+ readonly requestStream: false;
178
+ readonly responseStream: false;
179
+ readonly requestSerialize: (value: PDPRequest) => Buffer;
180
+ readonly requestDeserialize: (value: Buffer) => PDPRequest;
181
+ readonly responseSerialize: (value: PDPResponse) => Buffer;
182
+ readonly responseDeserialize: (value: Buffer) => PDPResponse;
183
+ };
184
+ };
185
+ export interface PolicyDecisionPointServiceServer extends UntypedServiceImplementation {
186
+ evaluate: handleUnaryCall<PDPRequest, PDPResponse>;
187
+ }
188
+ export interface PolicyDecisionPointServiceClient extends Client {
189
+ evaluate(request: PDPRequest, callback: (error: ServiceError | null, response: PDPResponse) => void): ClientUnaryCall;
190
+ evaluate(request: PDPRequest, metadata: Metadata, callback: (error: ServiceError | null, response: PDPResponse) => void): ClientUnaryCall;
191
+ evaluate(request: PDPRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: PDPResponse) => void): ClientUnaryCall;
192
+ }
193
+ export declare const PolicyDecisionPointServiceClient: {
194
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): PolicyDecisionPointServiceClient;
195
+ service: typeof PolicyDecisionPointServiceService;
196
+ serviceName: string;
197
+ };
198
+ export type EffectBoundaryServiceService = typeof EffectBoundaryServiceService;
199
+ export declare const EffectBoundaryServiceService: {
200
+ /**
201
+ * Submit submits an effect for governance evaluation.
202
+ * Returns a verdict, receipt, and (if ALLOW) an authorized execution intent.
203
+ */
204
+ readonly submit: {
205
+ readonly path: "/helm.kernel.v1.EffectBoundaryService/Submit";
206
+ readonly requestStream: false;
207
+ readonly responseStream: false;
208
+ readonly requestSerialize: (value: EffectRequest) => Buffer;
209
+ readonly requestDeserialize: (value: Buffer) => EffectRequest;
210
+ readonly responseSerialize: (value: EffectResponse) => Buffer;
211
+ readonly responseDeserialize: (value: Buffer) => EffectResponse;
212
+ };
213
+ /** Complete reports the execution result and receives a completion receipt. */
214
+ readonly complete: {
215
+ readonly path: "/helm.kernel.v1.EffectBoundaryService/Complete";
216
+ readonly requestStream: false;
217
+ readonly responseStream: false;
218
+ readonly requestSerialize: (value: ExecutionResult) => Buffer;
219
+ readonly requestDeserialize: (value: Buffer) => ExecutionResult;
220
+ readonly responseSerialize: (value: CompletionReceipt) => Buffer;
221
+ readonly responseDeserialize: (value: Buffer) => CompletionReceipt;
222
+ };
223
+ };
224
+ export interface EffectBoundaryServiceServer extends UntypedServiceImplementation {
225
+ /**
226
+ * Submit submits an effect for governance evaluation.
227
+ * Returns a verdict, receipt, and (if ALLOW) an authorized execution intent.
228
+ */
229
+ submit: handleUnaryCall<EffectRequest, EffectResponse>;
230
+ /** Complete reports the execution result and receives a completion receipt. */
231
+ complete: handleUnaryCall<ExecutionResult, CompletionReceipt>;
232
+ }
233
+ export interface EffectBoundaryServiceClient extends Client {
234
+ /**
235
+ * Submit submits an effect for governance evaluation.
236
+ * Returns a verdict, receipt, and (if ALLOW) an authorized execution intent.
237
+ */
238
+ submit(request: EffectRequest, callback: (error: ServiceError | null, response: EffectResponse) => void): ClientUnaryCall;
239
+ submit(request: EffectRequest, metadata: Metadata, callback: (error: ServiceError | null, response: EffectResponse) => void): ClientUnaryCall;
240
+ submit(request: EffectRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: EffectResponse) => void): ClientUnaryCall;
241
+ /** Complete reports the execution result and receives a completion receipt. */
242
+ complete(request: ExecutionResult, callback: (error: ServiceError | null, response: CompletionReceipt) => void): ClientUnaryCall;
243
+ complete(request: ExecutionResult, metadata: Metadata, callback: (error: ServiceError | null, response: CompletionReceipt) => void): ClientUnaryCall;
244
+ complete(request: ExecutionResult, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CompletionReceipt) => void): ClientUnaryCall;
245
+ }
246
+ export declare const EffectBoundaryServiceClient: {
247
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): EffectBoundaryServiceClient;
248
+ service: typeof EffectBoundaryServiceService;
249
+ serviceName: string;
250
+ };
251
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
252
+ 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 {} ? {
253
+ [K in keyof T]?: DeepPartial<T[K]>;
254
+ } : Partial<T>;
255
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
256
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
257
+ [K in keyof P]: Exact<P[K], I[K]>;
258
+ } & {
259
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
260
+ };
261
+ export interface MessageFns<T> {
262
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
263
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
264
+ fromJSON(object: any): T;
265
+ toJSON(message: T): unknown;
266
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
267
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
268
+ }
269
+ export {};