@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,583 @@
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: helm/authority/v1/authority.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { makeGenericClientConstructor, } from "@grpc/grpc-js";
9
+ import { Timestamp } from "../../../google/protobuf/timestamp";
10
+ export const protobufPackage = "helm.authority.v1";
11
+ /**
12
+ * HELM Authority Protocol Buffer Definitions
13
+ *
14
+ * Canonical IDL for the authority evaluation types.
15
+ * Stability: v1 additive-only.
16
+ */
17
+ export var EvaluationResult;
18
+ (function (EvaluationResult) {
19
+ EvaluationResult[EvaluationResult["EVALUATION_RESULT_UNSPECIFIED"] = 0] = "EVALUATION_RESULT_UNSPECIFIED";
20
+ EvaluationResult[EvaluationResult["EVALUATION_RESULT_ALLOW"] = 1] = "EVALUATION_RESULT_ALLOW";
21
+ EvaluationResult[EvaluationResult["EVALUATION_RESULT_DENY"] = 2] = "EVALUATION_RESULT_DENY";
22
+ EvaluationResult[EvaluationResult["EVALUATION_RESULT_REQUIRE_APPROVAL"] = 3] = "EVALUATION_RESULT_REQUIRE_APPROVAL";
23
+ EvaluationResult[EvaluationResult["EVALUATION_RESULT_REQUIRE_EVIDENCE"] = 4] = "EVALUATION_RESULT_REQUIRE_EVIDENCE";
24
+ EvaluationResult[EvaluationResult["EVALUATION_RESULT_DEFER"] = 5] = "EVALUATION_RESULT_DEFER";
25
+ EvaluationResult[EvaluationResult["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
26
+ })(EvaluationResult || (EvaluationResult = {}));
27
+ export function evaluationResultFromJSON(object) {
28
+ switch (object) {
29
+ case 0:
30
+ case "EVALUATION_RESULT_UNSPECIFIED":
31
+ return EvaluationResult.EVALUATION_RESULT_UNSPECIFIED;
32
+ case 1:
33
+ case "EVALUATION_RESULT_ALLOW":
34
+ return EvaluationResult.EVALUATION_RESULT_ALLOW;
35
+ case 2:
36
+ case "EVALUATION_RESULT_DENY":
37
+ return EvaluationResult.EVALUATION_RESULT_DENY;
38
+ case 3:
39
+ case "EVALUATION_RESULT_REQUIRE_APPROVAL":
40
+ return EvaluationResult.EVALUATION_RESULT_REQUIRE_APPROVAL;
41
+ case 4:
42
+ case "EVALUATION_RESULT_REQUIRE_EVIDENCE":
43
+ return EvaluationResult.EVALUATION_RESULT_REQUIRE_EVIDENCE;
44
+ case 5:
45
+ case "EVALUATION_RESULT_DEFER":
46
+ return EvaluationResult.EVALUATION_RESULT_DEFER;
47
+ case -1:
48
+ case "UNRECOGNIZED":
49
+ default:
50
+ return EvaluationResult.UNRECOGNIZED;
51
+ }
52
+ }
53
+ export function evaluationResultToJSON(object) {
54
+ switch (object) {
55
+ case EvaluationResult.EVALUATION_RESULT_UNSPECIFIED:
56
+ return "EVALUATION_RESULT_UNSPECIFIED";
57
+ case EvaluationResult.EVALUATION_RESULT_ALLOW:
58
+ return "EVALUATION_RESULT_ALLOW";
59
+ case EvaluationResult.EVALUATION_RESULT_DENY:
60
+ return "EVALUATION_RESULT_DENY";
61
+ case EvaluationResult.EVALUATION_RESULT_REQUIRE_APPROVAL:
62
+ return "EVALUATION_RESULT_REQUIRE_APPROVAL";
63
+ case EvaluationResult.EVALUATION_RESULT_REQUIRE_EVIDENCE:
64
+ return "EVALUATION_RESULT_REQUIRE_EVIDENCE";
65
+ case EvaluationResult.EVALUATION_RESULT_DEFER:
66
+ return "EVALUATION_RESULT_DEFER";
67
+ case EvaluationResult.UNRECOGNIZED:
68
+ default:
69
+ return "UNRECOGNIZED";
70
+ }
71
+ }
72
+ function createBaseEvaluationRequest() {
73
+ return {
74
+ requestId: "",
75
+ principalId: "",
76
+ principalType: "",
77
+ effectTypes: [],
78
+ policyEpoch: "",
79
+ idempotencyKey: "",
80
+ context: {},
81
+ timestamp: undefined,
82
+ };
83
+ }
84
+ export const EvaluationRequest = {
85
+ encode(message, writer = new BinaryWriter()) {
86
+ if (message.requestId !== "") {
87
+ writer.uint32(10).string(message.requestId);
88
+ }
89
+ if (message.principalId !== "") {
90
+ writer.uint32(18).string(message.principalId);
91
+ }
92
+ if (message.principalType !== "") {
93
+ writer.uint32(26).string(message.principalType);
94
+ }
95
+ for (const v of message.effectTypes) {
96
+ writer.uint32(34).string(v);
97
+ }
98
+ if (message.policyEpoch !== "") {
99
+ writer.uint32(42).string(message.policyEpoch);
100
+ }
101
+ if (message.idempotencyKey !== "") {
102
+ writer.uint32(50).string(message.idempotencyKey);
103
+ }
104
+ globalThis.Object.entries(message.context).forEach(([key, value]) => {
105
+ EvaluationRequest_ContextEntry.encode({ key: key, value }, writer.uint32(58).fork()).join();
106
+ });
107
+ if (message.timestamp !== undefined) {
108
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(66).fork()).join();
109
+ }
110
+ return writer;
111
+ },
112
+ decode(input, length) {
113
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
114
+ const end = length === undefined ? reader.len : reader.pos + length;
115
+ const message = createBaseEvaluationRequest();
116
+ while (reader.pos < end) {
117
+ const tag = reader.uint32();
118
+ switch (tag >>> 3) {
119
+ case 1: {
120
+ if (tag !== 10) {
121
+ break;
122
+ }
123
+ message.requestId = reader.string();
124
+ continue;
125
+ }
126
+ case 2: {
127
+ if (tag !== 18) {
128
+ break;
129
+ }
130
+ message.principalId = reader.string();
131
+ continue;
132
+ }
133
+ case 3: {
134
+ if (tag !== 26) {
135
+ break;
136
+ }
137
+ message.principalType = reader.string();
138
+ continue;
139
+ }
140
+ case 4: {
141
+ if (tag !== 34) {
142
+ break;
143
+ }
144
+ message.effectTypes.push(reader.string());
145
+ continue;
146
+ }
147
+ case 5: {
148
+ if (tag !== 42) {
149
+ break;
150
+ }
151
+ message.policyEpoch = reader.string();
152
+ continue;
153
+ }
154
+ case 6: {
155
+ if (tag !== 50) {
156
+ break;
157
+ }
158
+ message.idempotencyKey = reader.string();
159
+ continue;
160
+ }
161
+ case 7: {
162
+ if (tag !== 58) {
163
+ break;
164
+ }
165
+ const entry7 = EvaluationRequest_ContextEntry.decode(reader, reader.uint32());
166
+ if (entry7.value !== undefined) {
167
+ message.context[entry7.key] = entry7.value;
168
+ }
169
+ continue;
170
+ }
171
+ case 8: {
172
+ if (tag !== 66) {
173
+ break;
174
+ }
175
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
176
+ continue;
177
+ }
178
+ }
179
+ if ((tag & 7) === 4 || tag === 0) {
180
+ break;
181
+ }
182
+ reader.skip(tag & 7);
183
+ }
184
+ return message;
185
+ },
186
+ fromJSON(object) {
187
+ return {
188
+ requestId: isSet(object.requestId)
189
+ ? globalThis.String(object.requestId)
190
+ : isSet(object.request_id)
191
+ ? globalThis.String(object.request_id)
192
+ : "",
193
+ principalId: isSet(object.principalId)
194
+ ? globalThis.String(object.principalId)
195
+ : isSet(object.principal_id)
196
+ ? globalThis.String(object.principal_id)
197
+ : "",
198
+ principalType: isSet(object.principalType)
199
+ ? globalThis.String(object.principalType)
200
+ : isSet(object.principal_type)
201
+ ? globalThis.String(object.principal_type)
202
+ : "",
203
+ effectTypes: globalThis.Array.isArray(object?.effectTypes)
204
+ ? object.effectTypes.map((e) => globalThis.String(e))
205
+ : globalThis.Array.isArray(object?.effect_types)
206
+ ? object.effect_types.map((e) => globalThis.String(e))
207
+ : [],
208
+ policyEpoch: isSet(object.policyEpoch)
209
+ ? globalThis.String(object.policyEpoch)
210
+ : isSet(object.policy_epoch)
211
+ ? globalThis.String(object.policy_epoch)
212
+ : "",
213
+ idempotencyKey: isSet(object.idempotencyKey)
214
+ ? globalThis.String(object.idempotencyKey)
215
+ : isSet(object.idempotency_key)
216
+ ? globalThis.String(object.idempotency_key)
217
+ : "",
218
+ context: isObject(object.context)
219
+ ? globalThis.Object.entries(object.context).reduce((acc, [key, value]) => {
220
+ acc[key] = globalThis.String(value);
221
+ return acc;
222
+ }, {})
223
+ : {},
224
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
225
+ };
226
+ },
227
+ toJSON(message) {
228
+ const obj = {};
229
+ if (message.requestId !== "") {
230
+ obj.requestId = message.requestId;
231
+ }
232
+ if (message.principalId !== "") {
233
+ obj.principalId = message.principalId;
234
+ }
235
+ if (message.principalType !== "") {
236
+ obj.principalType = message.principalType;
237
+ }
238
+ if (message.effectTypes?.length) {
239
+ obj.effectTypes = message.effectTypes;
240
+ }
241
+ if (message.policyEpoch !== "") {
242
+ obj.policyEpoch = message.policyEpoch;
243
+ }
244
+ if (message.idempotencyKey !== "") {
245
+ obj.idempotencyKey = message.idempotencyKey;
246
+ }
247
+ if (message.context) {
248
+ const entries = globalThis.Object.entries(message.context);
249
+ if (entries.length > 0) {
250
+ obj.context = {};
251
+ entries.forEach(([k, v]) => {
252
+ obj.context[k] = v;
253
+ });
254
+ }
255
+ }
256
+ if (message.timestamp !== undefined) {
257
+ obj.timestamp = message.timestamp.toISOString();
258
+ }
259
+ return obj;
260
+ },
261
+ create(base) {
262
+ return EvaluationRequest.fromPartial(base ?? {});
263
+ },
264
+ fromPartial(object) {
265
+ const message = createBaseEvaluationRequest();
266
+ message.requestId = object.requestId ?? "";
267
+ message.principalId = object.principalId ?? "";
268
+ message.principalType = object.principalType ?? "";
269
+ message.effectTypes = object.effectTypes?.map((e) => e) || [];
270
+ message.policyEpoch = object.policyEpoch ?? "";
271
+ message.idempotencyKey = object.idempotencyKey ?? "";
272
+ message.context = globalThis.Object.entries(object.context ?? {}).reduce((acc, [key, value]) => {
273
+ if (value !== undefined) {
274
+ acc[key] = globalThis.String(value);
275
+ }
276
+ return acc;
277
+ }, {});
278
+ message.timestamp = object.timestamp ?? undefined;
279
+ return message;
280
+ },
281
+ };
282
+ function createBaseEvaluationRequest_ContextEntry() {
283
+ return { key: "", value: "" };
284
+ }
285
+ export const EvaluationRequest_ContextEntry = {
286
+ encode(message, writer = new BinaryWriter()) {
287
+ if (message.key !== "") {
288
+ writer.uint32(10).string(message.key);
289
+ }
290
+ if (message.value !== "") {
291
+ writer.uint32(18).string(message.value);
292
+ }
293
+ return writer;
294
+ },
295
+ decode(input, length) {
296
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
297
+ const end = length === undefined ? reader.len : reader.pos + length;
298
+ const message = createBaseEvaluationRequest_ContextEntry();
299
+ while (reader.pos < end) {
300
+ const tag = reader.uint32();
301
+ switch (tag >>> 3) {
302
+ case 1: {
303
+ if (tag !== 10) {
304
+ break;
305
+ }
306
+ message.key = reader.string();
307
+ continue;
308
+ }
309
+ case 2: {
310
+ if (tag !== 18) {
311
+ break;
312
+ }
313
+ message.value = reader.string();
314
+ continue;
315
+ }
316
+ }
317
+ if ((tag & 7) === 4 || tag === 0) {
318
+ break;
319
+ }
320
+ reader.skip(tag & 7);
321
+ }
322
+ return message;
323
+ },
324
+ fromJSON(object) {
325
+ return {
326
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
327
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
328
+ };
329
+ },
330
+ toJSON(message) {
331
+ const obj = {};
332
+ if (message.key !== "") {
333
+ obj.key = message.key;
334
+ }
335
+ if (message.value !== "") {
336
+ obj.value = message.value;
337
+ }
338
+ return obj;
339
+ },
340
+ create(base) {
341
+ return EvaluationRequest_ContextEntry.fromPartial(base ?? {});
342
+ },
343
+ fromPartial(object) {
344
+ const message = createBaseEvaluationRequest_ContextEntry();
345
+ message.key = object.key ?? "";
346
+ message.value = object.value ?? "";
347
+ return message;
348
+ },
349
+ };
350
+ function createBaseEvaluationDecision() {
351
+ return {
352
+ decisionId: "",
353
+ requestId: "",
354
+ result: 0,
355
+ reasonCodes: [],
356
+ policyEpoch: "",
357
+ issuedAt: undefined,
358
+ expiresAt: undefined,
359
+ contentHash: "",
360
+ };
361
+ }
362
+ export const EvaluationDecision = {
363
+ encode(message, writer = new BinaryWriter()) {
364
+ if (message.decisionId !== "") {
365
+ writer.uint32(10).string(message.decisionId);
366
+ }
367
+ if (message.requestId !== "") {
368
+ writer.uint32(18).string(message.requestId);
369
+ }
370
+ if (message.result !== 0) {
371
+ writer.uint32(24).int32(message.result);
372
+ }
373
+ for (const v of message.reasonCodes) {
374
+ writer.uint32(34).string(v);
375
+ }
376
+ if (message.policyEpoch !== "") {
377
+ writer.uint32(42).string(message.policyEpoch);
378
+ }
379
+ if (message.issuedAt !== undefined) {
380
+ Timestamp.encode(toTimestamp(message.issuedAt), writer.uint32(50).fork()).join();
381
+ }
382
+ if (message.expiresAt !== undefined) {
383
+ Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(58).fork()).join();
384
+ }
385
+ if (message.contentHash !== "") {
386
+ writer.uint32(66).string(message.contentHash);
387
+ }
388
+ return writer;
389
+ },
390
+ decode(input, length) {
391
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
392
+ const end = length === undefined ? reader.len : reader.pos + length;
393
+ const message = createBaseEvaluationDecision();
394
+ while (reader.pos < end) {
395
+ const tag = reader.uint32();
396
+ switch (tag >>> 3) {
397
+ case 1: {
398
+ if (tag !== 10) {
399
+ break;
400
+ }
401
+ message.decisionId = reader.string();
402
+ continue;
403
+ }
404
+ case 2: {
405
+ if (tag !== 18) {
406
+ break;
407
+ }
408
+ message.requestId = reader.string();
409
+ continue;
410
+ }
411
+ case 3: {
412
+ if (tag !== 24) {
413
+ break;
414
+ }
415
+ message.result = reader.int32();
416
+ continue;
417
+ }
418
+ case 4: {
419
+ if (tag !== 34) {
420
+ break;
421
+ }
422
+ message.reasonCodes.push(reader.string());
423
+ continue;
424
+ }
425
+ case 5: {
426
+ if (tag !== 42) {
427
+ break;
428
+ }
429
+ message.policyEpoch = reader.string();
430
+ continue;
431
+ }
432
+ case 6: {
433
+ if (tag !== 50) {
434
+ break;
435
+ }
436
+ message.issuedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
437
+ continue;
438
+ }
439
+ case 7: {
440
+ if (tag !== 58) {
441
+ break;
442
+ }
443
+ message.expiresAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
444
+ continue;
445
+ }
446
+ case 8: {
447
+ if (tag !== 66) {
448
+ break;
449
+ }
450
+ message.contentHash = reader.string();
451
+ continue;
452
+ }
453
+ }
454
+ if ((tag & 7) === 4 || tag === 0) {
455
+ break;
456
+ }
457
+ reader.skip(tag & 7);
458
+ }
459
+ return message;
460
+ },
461
+ fromJSON(object) {
462
+ return {
463
+ decisionId: isSet(object.decisionId)
464
+ ? globalThis.String(object.decisionId)
465
+ : isSet(object.decision_id)
466
+ ? globalThis.String(object.decision_id)
467
+ : "",
468
+ requestId: isSet(object.requestId)
469
+ ? globalThis.String(object.requestId)
470
+ : isSet(object.request_id)
471
+ ? globalThis.String(object.request_id)
472
+ : "",
473
+ result: isSet(object.result) ? evaluationResultFromJSON(object.result) : 0,
474
+ reasonCodes: globalThis.Array.isArray(object?.reasonCodes)
475
+ ? object.reasonCodes.map((e) => globalThis.String(e))
476
+ : globalThis.Array.isArray(object?.reason_codes)
477
+ ? object.reason_codes.map((e) => globalThis.String(e))
478
+ : [],
479
+ policyEpoch: isSet(object.policyEpoch)
480
+ ? globalThis.String(object.policyEpoch)
481
+ : isSet(object.policy_epoch)
482
+ ? globalThis.String(object.policy_epoch)
483
+ : "",
484
+ issuedAt: isSet(object.issuedAt)
485
+ ? fromJsonTimestamp(object.issuedAt)
486
+ : isSet(object.issued_at)
487
+ ? fromJsonTimestamp(object.issued_at)
488
+ : undefined,
489
+ expiresAt: isSet(object.expiresAt)
490
+ ? fromJsonTimestamp(object.expiresAt)
491
+ : isSet(object.expires_at)
492
+ ? fromJsonTimestamp(object.expires_at)
493
+ : undefined,
494
+ contentHash: isSet(object.contentHash)
495
+ ? globalThis.String(object.contentHash)
496
+ : isSet(object.content_hash)
497
+ ? globalThis.String(object.content_hash)
498
+ : "",
499
+ };
500
+ },
501
+ toJSON(message) {
502
+ const obj = {};
503
+ if (message.decisionId !== "") {
504
+ obj.decisionId = message.decisionId;
505
+ }
506
+ if (message.requestId !== "") {
507
+ obj.requestId = message.requestId;
508
+ }
509
+ if (message.result !== 0) {
510
+ obj.result = evaluationResultToJSON(message.result);
511
+ }
512
+ if (message.reasonCodes?.length) {
513
+ obj.reasonCodes = message.reasonCodes;
514
+ }
515
+ if (message.policyEpoch !== "") {
516
+ obj.policyEpoch = message.policyEpoch;
517
+ }
518
+ if (message.issuedAt !== undefined) {
519
+ obj.issuedAt = message.issuedAt.toISOString();
520
+ }
521
+ if (message.expiresAt !== undefined) {
522
+ obj.expiresAt = message.expiresAt.toISOString();
523
+ }
524
+ if (message.contentHash !== "") {
525
+ obj.contentHash = message.contentHash;
526
+ }
527
+ return obj;
528
+ },
529
+ create(base) {
530
+ return EvaluationDecision.fromPartial(base ?? {});
531
+ },
532
+ fromPartial(object) {
533
+ const message = createBaseEvaluationDecision();
534
+ message.decisionId = object.decisionId ?? "";
535
+ message.requestId = object.requestId ?? "";
536
+ message.result = object.result ?? 0;
537
+ message.reasonCodes = object.reasonCodes?.map((e) => e) || [];
538
+ message.policyEpoch = object.policyEpoch ?? "";
539
+ message.issuedAt = object.issuedAt ?? undefined;
540
+ message.expiresAt = object.expiresAt ?? undefined;
541
+ message.contentHash = object.contentHash ?? "";
542
+ return message;
543
+ },
544
+ };
545
+ export const AuthorityServiceService = {
546
+ evaluate: {
547
+ path: "/helm.authority.v1.AuthorityService/Evaluate",
548
+ requestStream: false,
549
+ responseStream: false,
550
+ requestSerialize: (value) => Buffer.from(EvaluationRequest.encode(value).finish()),
551
+ requestDeserialize: (value) => EvaluationRequest.decode(value),
552
+ responseSerialize: (value) => Buffer.from(EvaluationDecision.encode(value).finish()),
553
+ responseDeserialize: (value) => EvaluationDecision.decode(value),
554
+ },
555
+ };
556
+ export const AuthorityServiceClient = makeGenericClientConstructor(AuthorityServiceService, "helm.authority.v1.AuthorityService");
557
+ function toTimestamp(date) {
558
+ const seconds = Math.trunc(date.getTime() / 1_000);
559
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
560
+ return { seconds, nanos };
561
+ }
562
+ function fromTimestamp(t) {
563
+ let millis = (t.seconds || 0) * 1_000;
564
+ millis += (t.nanos || 0) / 1_000_000;
565
+ return new globalThis.Date(millis);
566
+ }
567
+ function fromJsonTimestamp(o) {
568
+ if (o instanceof globalThis.Date) {
569
+ return o;
570
+ }
571
+ else if (typeof o === "string") {
572
+ return new globalThis.Date(o);
573
+ }
574
+ else {
575
+ return fromTimestamp(Timestamp.fromJSON(o));
576
+ }
577
+ }
578
+ function isObject(value) {
579
+ return typeof value === "object" && value !== null;
580
+ }
581
+ function isSet(value) {
582
+ return value !== null && value !== undefined;
583
+ }
@@ -0,0 +1,115 @@
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
+ import { Duration } from "../../../google/protobuf/duration";
4
+ export declare const protobufPackage = "helm.effects.v1";
5
+ /**
6
+ * HELM Effects Gateway Protocol Buffer Definitions
7
+ *
8
+ * Canonical IDL for EffectPermit and Gateway contract types.
9
+ * Stability: v1 additive-only.
10
+ */
11
+ export declare enum EffectType {
12
+ EFFECT_TYPE_UNSPECIFIED = 0,
13
+ EFFECT_TYPE_READ = 1,
14
+ EFFECT_TYPE_WRITE = 2,
15
+ EFFECT_TYPE_DELETE = 3,
16
+ EFFECT_TYPE_EXECUTE = 4,
17
+ EFFECT_TYPE_NETWORK = 5,
18
+ EFFECT_TYPE_FINANCE = 6,
19
+ UNRECOGNIZED = -1
20
+ }
21
+ export declare function effectTypeFromJSON(object: any): EffectType;
22
+ export declare function effectTypeToJSON(object: EffectType): string;
23
+ export interface EffectScope {
24
+ allowedAction: string;
25
+ allowedParams: string[];
26
+ denyPatterns: string[];
27
+ }
28
+ export interface EffectPermit {
29
+ permitId: string;
30
+ intentHash: string;
31
+ verdictHash: string;
32
+ planHash: string;
33
+ policyHash: string;
34
+ effectType: EffectType;
35
+ connectorId: string;
36
+ scope: EffectScope | undefined;
37
+ resourceRef: string;
38
+ expiresAt: Date | undefined;
39
+ singleUse: boolean;
40
+ nonce: string;
41
+ issuedAt: Date | undefined;
42
+ issuerId: string;
43
+ signature: string;
44
+ }
45
+ export interface GatewayEffectRequest {
46
+ requestId: string;
47
+ effectType: EffectType;
48
+ connectorId: string;
49
+ toolName: string;
50
+ /** JSON-encoded */
51
+ params: Uint8Array;
52
+ resourceRef: string;
53
+ planHash: string;
54
+ policyHash: string;
55
+ verdictHash: string;
56
+ requestedAt: Date | undefined;
57
+ }
58
+ export interface GatewayEffectOutcome {
59
+ requestId: string;
60
+ permitId: string;
61
+ success: boolean;
62
+ output: Uint8Array;
63
+ error: string;
64
+ outputHash: string;
65
+ duration: Duration | undefined;
66
+ completedAt: Date | undefined;
67
+ }
68
+ export declare const EffectScope: MessageFns<EffectScope>;
69
+ export declare const EffectPermit: MessageFns<EffectPermit>;
70
+ export declare const GatewayEffectRequest: MessageFns<GatewayEffectRequest>;
71
+ export declare const GatewayEffectOutcome: MessageFns<GatewayEffectOutcome>;
72
+ export type EffectsGatewayServiceService = typeof EffectsGatewayServiceService;
73
+ export declare const EffectsGatewayServiceService: {
74
+ readonly execute: {
75
+ readonly path: "/helm.effects.v1.EffectsGatewayService/Execute";
76
+ readonly requestStream: false;
77
+ readonly responseStream: false;
78
+ readonly requestSerialize: (value: GatewayEffectRequest) => Buffer;
79
+ readonly requestDeserialize: (value: Buffer) => GatewayEffectRequest;
80
+ readonly responseSerialize: (value: GatewayEffectOutcome) => Buffer;
81
+ readonly responseDeserialize: (value: Buffer) => GatewayEffectOutcome;
82
+ };
83
+ };
84
+ export interface EffectsGatewayServiceServer extends UntypedServiceImplementation {
85
+ execute: handleUnaryCall<GatewayEffectRequest, GatewayEffectOutcome>;
86
+ }
87
+ export interface EffectsGatewayServiceClient extends Client {
88
+ execute(request: GatewayEffectRequest, callback: (error: ServiceError | null, response: GatewayEffectOutcome) => void): ClientUnaryCall;
89
+ execute(request: GatewayEffectRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GatewayEffectOutcome) => void): ClientUnaryCall;
90
+ execute(request: GatewayEffectRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GatewayEffectOutcome) => void): ClientUnaryCall;
91
+ }
92
+ export declare const EffectsGatewayServiceClient: {
93
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): EffectsGatewayServiceClient;
94
+ service: typeof EffectsGatewayServiceService;
95
+ serviceName: string;
96
+ };
97
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
98
+ 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 {} ? {
99
+ [K in keyof T]?: DeepPartial<T[K]>;
100
+ } : Partial<T>;
101
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
102
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
103
+ [K in keyof P]: Exact<P[K], I[K]>;
104
+ } & {
105
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
106
+ };
107
+ export interface MessageFns<T> {
108
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
109
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
110
+ fromJSON(object: any): T;
111
+ toJSON(message: T): unknown;
112
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
113
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
114
+ }
115
+ export {};