@aggrega-ai/aggrega-abi 0.0.0-stage → 0.9.0

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.
Files changed (41) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +23 -2
  3. package/dist/abi_version_enums_gen.d.ts +1 -0
  4. package/dist/abi_version_enums_gen.js +33 -0
  5. package/dist/annotationtransform_gen.d.ts +56 -0
  6. package/dist/annotationtransform_gen.js +385 -0
  7. package/dist/cbor_gen.d.ts +28 -0
  8. package/dist/cbor_gen.js +413 -0
  9. package/dist/cli_gen.d.ts +11 -0
  10. package/dist/cli_gen.js +75 -0
  11. package/dist/describe_gen.d.ts +165 -0
  12. package/dist/describe_gen.js +1154 -0
  13. package/dist/diagnostic_enums_gen.d.ts +3 -0
  14. package/dist/diagnostic_enums_gen.js +27 -0
  15. package/dist/diagnostic_gen.d.ts +45 -0
  16. package/dist/diagnostic_gen.js +309 -0
  17. package/dist/frp_gen.d.ts +97 -0
  18. package/dist/frp_gen.js +731 -0
  19. package/dist/hostfunc_error_enums_gen.d.ts +13 -0
  20. package/dist/hostfunc_error_enums_gen.js +35 -0
  21. package/dist/import_gen.d.ts +159 -0
  22. package/dist/import_gen.js +1050 -0
  23. package/dist/index.d.ts +33 -0
  24. package/dist/index.js +51 -0
  25. package/dist/ir_gen.d.ts +180 -0
  26. package/dist/ir_gen.js +1640 -0
  27. package/dist/linter_gen.d.ts +45 -0
  28. package/dist/linter_gen.js +374 -0
  29. package/dist/mutator_gen.d.ts +64 -0
  30. package/dist/mutator_gen.js +448 -0
  31. package/dist/orderedmap_gen.d.ts +5 -0
  32. package/dist/orderedmap_gen.js +186 -0
  33. package/dist/parse_gen.d.ts +60 -0
  34. package/dist/parse_gen.js +364 -0
  35. package/dist/policy_gen.d.ts +69 -0
  36. package/dist/policy_gen.js +461 -0
  37. package/dist/providerrender_gen.d.ts +495 -0
  38. package/dist/providerrender_gen.js +3756 -0
  39. package/dist/servewire_gen.d.ts +1643 -0
  40. package/dist/servewire_gen.js +3035 -0
  41. package/package.json +30 -4
@@ -0,0 +1,60 @@
1
+ import { type Diagnostic } from "./diagnostic_gen.ts";
2
+ import { CborDec } from "./cbor_gen.ts";
3
+ export interface ParseInput {
4
+ format: string;
5
+ bytes: string;
6
+ options?: unknown;
7
+ }
8
+ export interface ParseOutput {
9
+ tree: unknown;
10
+ diagnostics?: Diagnostic[];
11
+ spans?: NodeSpan[];
12
+ error?: string;
13
+ }
14
+ export interface NodeSpan {
15
+ pointer: string;
16
+ span: SourceSpan;
17
+ }
18
+ export interface SourceSpan {
19
+ start_offset: number;
20
+ end_offset: number;
21
+ start_line: number;
22
+ start_column: number;
23
+ end_line: number;
24
+ end_column: number;
25
+ }
26
+ export interface ParseSourceResponse {
27
+ tree?: unknown;
28
+ error?: string;
29
+ hostfunc_error_code?: string;
30
+ }
31
+ export declare function encodeParseInput(v: ParseInput): string;
32
+ export declare function decodeParseInput(data: string): ParseInput;
33
+ export declare function encodeParseOutput(v: ParseOutput): string;
34
+ export declare function decodeParseOutput(data: string): ParseOutput;
35
+ export declare function encodeNodeSpan(v: NodeSpan): string;
36
+ export declare function decodeNodeSpan(data: string): NodeSpan;
37
+ export declare function encodeSourceSpan(v: SourceSpan): string;
38
+ export declare function decodeSourceSpan(data: string): SourceSpan;
39
+ export declare function encodeParseSourceResponse(v: ParseSourceResponse): string;
40
+ export declare function decodeParseSourceResponse(data: string): ParseSourceResponse;
41
+ export declare function encodeCBORParseInput(v: ParseInput): Uint8Array;
42
+ export declare function appendCBORParseInput(out: number[], v: ParseInput): void;
43
+ export declare function decodeCBORParseInput(data: Uint8Array): ParseInput;
44
+ export declare function decodeCBORParseInputFrom(dec: CborDec): ParseInput;
45
+ export declare function encodeCBORParseOutput(v: ParseOutput): Uint8Array;
46
+ export declare function appendCBORParseOutput(out: number[], v: ParseOutput): void;
47
+ export declare function decodeCBORParseOutput(data: Uint8Array): ParseOutput;
48
+ export declare function decodeCBORParseOutputFrom(dec: CborDec): ParseOutput;
49
+ export declare function encodeCBORNodeSpan(v: NodeSpan): Uint8Array;
50
+ export declare function appendCBORNodeSpan(out: number[], v: NodeSpan): void;
51
+ export declare function decodeCBORNodeSpan(data: Uint8Array): NodeSpan;
52
+ export declare function decodeCBORNodeSpanFrom(dec: CborDec): NodeSpan;
53
+ export declare function encodeCBORSourceSpan(v: SourceSpan): Uint8Array;
54
+ export declare function appendCBORSourceSpan(out: number[], v: SourceSpan): void;
55
+ export declare function decodeCBORSourceSpan(data: Uint8Array): SourceSpan;
56
+ export declare function decodeCBORSourceSpanFrom(dec: CborDec): SourceSpan;
57
+ export declare function encodeCBORParseSourceResponse(v: ParseSourceResponse): Uint8Array;
58
+ export declare function appendCBORParseSourceResponse(out: number[], v: ParseSourceResponse): void;
59
+ export declare function decodeCBORParseSourceResponse(data: Uint8Array): ParseSourceResponse;
60
+ export declare function decodeCBORParseSourceResponseFrom(dec: CborDec): ParseSourceResponse;
@@ -0,0 +1,364 @@
1
+ "use strict";
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // Copyright 2026 Cognitio s.r.l.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.encodeParseInput = encodeParseInput;
6
+ exports.decodeParseInput = decodeParseInput;
7
+ exports.encodeParseOutput = encodeParseOutput;
8
+ exports.decodeParseOutput = decodeParseOutput;
9
+ exports.encodeNodeSpan = encodeNodeSpan;
10
+ exports.decodeNodeSpan = decodeNodeSpan;
11
+ exports.encodeSourceSpan = encodeSourceSpan;
12
+ exports.decodeSourceSpan = decodeSourceSpan;
13
+ exports.encodeParseSourceResponse = encodeParseSourceResponse;
14
+ exports.decodeParseSourceResponse = decodeParseSourceResponse;
15
+ exports.encodeCBORParseInput = encodeCBORParseInput;
16
+ exports.appendCBORParseInput = appendCBORParseInput;
17
+ exports.decodeCBORParseInput = decodeCBORParseInput;
18
+ exports.decodeCBORParseInputFrom = decodeCBORParseInputFrom;
19
+ exports.encodeCBORParseOutput = encodeCBORParseOutput;
20
+ exports.appendCBORParseOutput = appendCBORParseOutput;
21
+ exports.decodeCBORParseOutput = decodeCBORParseOutput;
22
+ exports.decodeCBORParseOutputFrom = decodeCBORParseOutputFrom;
23
+ exports.encodeCBORNodeSpan = encodeCBORNodeSpan;
24
+ exports.appendCBORNodeSpan = appendCBORNodeSpan;
25
+ exports.decodeCBORNodeSpan = decodeCBORNodeSpan;
26
+ exports.decodeCBORNodeSpanFrom = decodeCBORNodeSpanFrom;
27
+ exports.encodeCBORSourceSpan = encodeCBORSourceSpan;
28
+ exports.appendCBORSourceSpan = appendCBORSourceSpan;
29
+ exports.decodeCBORSourceSpan = decodeCBORSourceSpan;
30
+ exports.decodeCBORSourceSpanFrom = decodeCBORSourceSpanFrom;
31
+ exports.encodeCBORParseSourceResponse = encodeCBORParseSourceResponse;
32
+ exports.appendCBORParseSourceResponse = appendCBORParseSourceResponse;
33
+ exports.decodeCBORParseSourceResponse = decodeCBORParseSourceResponse;
34
+ exports.decodeCBORParseSourceResponseFrom = decodeCBORParseSourceResponseFrom;
35
+ // Code generated by internal/tools/typegen from
36
+ // aggrega-schemas/json/wasm-parse-v1beta1.schema.json. DO NOT EDIT.
37
+ // Regenerate with `go generate ./internal/tools/typegen` from the
38
+ // aggrega-cli checkout.
39
+ const diagnostic_gen_ts_1 = require("./diagnostic_gen.js");
40
+ const cbor_gen_ts_1 = require("./cbor_gen.js");
41
+ const diagnostic_gen_ts_2 = require("./diagnostic_gen.js");
42
+ function jstr(s) {
43
+ return JSON.stringify(s);
44
+ }
45
+ // encodeOpaque carries an opaque (`any` / RawMessage) value VERBATIM: the
46
+ // key order from JSON.parse is preserved, matching the Go and Rust codecs'
47
+ // byte-carry of opaque values. Opaque values are never sorted.
48
+ function encodeOpaque(v) {
49
+ return JSON.stringify(v);
50
+ }
51
+ function encodeParseInput(v) {
52
+ const parts = [];
53
+ parts.push(`${jstr("format")}:${jstr(v.format)}`);
54
+ parts.push(`${jstr("bytes")}:${jstr(v.bytes)}`);
55
+ if (v.options !== undefined && v.options !== null)
56
+ parts.push(`${jstr("options")}:${encodeOpaque(v.options)}`);
57
+ return `{${parts.join(",")}}`;
58
+ }
59
+ function decodeParseInput(data) {
60
+ return JSON.parse(data);
61
+ }
62
+ function encodeParseOutput(v) {
63
+ const parts = [];
64
+ parts.push(`${jstr("tree")}:${encodeOpaque(v.tree)}`);
65
+ if (v.diagnostics !== undefined && v.diagnostics.length > 0)
66
+ parts.push(`${jstr("diagnostics")}:${`[${v.diagnostics.map((e0) => (0, diagnostic_gen_ts_1.encodeDiagnostic)(e0)).join(",")}]`}`);
67
+ if (v.spans !== undefined && v.spans.length > 0)
68
+ parts.push(`${jstr("spans")}:${`[${v.spans.map((e0) => encodeNodeSpan(e0)).join(",")}]`}`);
69
+ if (v.error !== undefined && v.error !== "")
70
+ parts.push(`${jstr("error")}:${jstr(v.error)}`);
71
+ return `{${parts.join(",")}}`;
72
+ }
73
+ function decodeParseOutput(data) {
74
+ return JSON.parse(data);
75
+ }
76
+ function encodeNodeSpan(v) {
77
+ const parts = [];
78
+ parts.push(`${jstr("pointer")}:${jstr(v.pointer)}`);
79
+ parts.push(`${jstr("span")}:${encodeSourceSpan(v.span)}`);
80
+ return `{${parts.join(",")}}`;
81
+ }
82
+ function decodeNodeSpan(data) {
83
+ return JSON.parse(data);
84
+ }
85
+ function encodeSourceSpan(v) {
86
+ const parts = [];
87
+ parts.push(`${jstr("start_offset")}:${String(v.start_offset)}`);
88
+ parts.push(`${jstr("end_offset")}:${String(v.end_offset)}`);
89
+ parts.push(`${jstr("start_line")}:${String(v.start_line)}`);
90
+ parts.push(`${jstr("start_column")}:${String(v.start_column)}`);
91
+ parts.push(`${jstr("end_line")}:${String(v.end_line)}`);
92
+ parts.push(`${jstr("end_column")}:${String(v.end_column)}`);
93
+ return `{${parts.join(",")}}`;
94
+ }
95
+ function decodeSourceSpan(data) {
96
+ return JSON.parse(data);
97
+ }
98
+ function encodeParseSourceResponse(v) {
99
+ const parts = [];
100
+ if (v.tree !== undefined && v.tree !== null)
101
+ parts.push(`${jstr("tree")}:${encodeOpaque(v.tree)}`);
102
+ if (v.error !== undefined && v.error !== "")
103
+ parts.push(`${jstr("error")}:${jstr(v.error)}`);
104
+ if (v.hostfunc_error_code !== undefined && v.hostfunc_error_code !== "")
105
+ parts.push(`${jstr("hostfunc_error_code")}:${jstr(v.hostfunc_error_code)}`);
106
+ return `{${parts.join(",")}}`;
107
+ }
108
+ function decodeParseSourceResponse(data) {
109
+ return JSON.parse(data);
110
+ }
111
+ function encodeCBORParseInput(v) {
112
+ const out = [];
113
+ appendCBORParseInput(out, v);
114
+ return new Uint8Array(out);
115
+ }
116
+ function appendCBORParseInput(out, v) {
117
+ let n = 2;
118
+ if (v.options !== undefined && v.options !== null)
119
+ n++;
120
+ (0, cbor_gen_ts_1.writeHead)(out, 5, n);
121
+ (0, cbor_gen_ts_1.writeText)(out, "bytes");
122
+ (0, cbor_gen_ts_1.writeBytes)(out, (0, cbor_gen_ts_1.b64decode)(v.bytes));
123
+ (0, cbor_gen_ts_1.writeText)(out, "format");
124
+ (0, cbor_gen_ts_1.writeText)(out, v.format);
125
+ if (v.options !== undefined && v.options !== null) {
126
+ (0, cbor_gen_ts_1.writeText)(out, "options");
127
+ (0, cbor_gen_ts_1.writeBytes)(out, (0, cbor_gen_ts_1.utf8Encode)(JSON.stringify(v.options)));
128
+ }
129
+ }
130
+ function decodeCBORParseInput(data) {
131
+ const dec = new cbor_gen_ts_1.CborDec(data);
132
+ return decodeCBORParseInputFrom(dec);
133
+ }
134
+ function decodeCBORParseInputFrom(dec) {
135
+ const o = {};
136
+ const n = dec.readMapHeader();
137
+ for (let i = 0; i < n; i++) {
138
+ const k = dec.readText();
139
+ switch (k) {
140
+ case "format":
141
+ o["format"] = dec.readText();
142
+ break;
143
+ case "bytes":
144
+ o["bytes"] = (0, cbor_gen_ts_1.b64encode)(dec.readBytes());
145
+ break;
146
+ case "options":
147
+ o["options"] = JSON.parse((0, cbor_gen_ts_1.utf8Decode)(dec.readBytes()));
148
+ break;
149
+ default: dec.skip();
150
+ }
151
+ }
152
+ return o;
153
+ }
154
+ function encodeCBORParseOutput(v) {
155
+ const out = [];
156
+ appendCBORParseOutput(out, v);
157
+ return new Uint8Array(out);
158
+ }
159
+ function appendCBORParseOutput(out, v) {
160
+ let n = 1;
161
+ if (v.error !== undefined && v.error !== "")
162
+ n++;
163
+ if (v.spans !== undefined && v.spans.length > 0)
164
+ n++;
165
+ if (v.diagnostics !== undefined && v.diagnostics.length > 0)
166
+ n++;
167
+ (0, cbor_gen_ts_1.writeHead)(out, 5, n);
168
+ (0, cbor_gen_ts_1.writeText)(out, "tree");
169
+ (0, cbor_gen_ts_1.writeBytes)(out, (0, cbor_gen_ts_1.utf8Encode)(JSON.stringify(v.tree)));
170
+ if (v.error !== undefined && v.error !== "") {
171
+ (0, cbor_gen_ts_1.writeText)(out, "error");
172
+ (0, cbor_gen_ts_1.writeText)(out, v.error);
173
+ }
174
+ if (v.spans !== undefined && v.spans.length > 0) {
175
+ (0, cbor_gen_ts_1.writeText)(out, "spans");
176
+ {
177
+ const a0 = v.spans;
178
+ (0, cbor_gen_ts_1.writeHead)(out, 4, a0.length);
179
+ for (const ee0 of a0) {
180
+ appendCBORNodeSpan(out, ee0);
181
+ }
182
+ }
183
+ }
184
+ if (v.diagnostics !== undefined && v.diagnostics.length > 0) {
185
+ (0, cbor_gen_ts_1.writeText)(out, "diagnostics");
186
+ {
187
+ const a0 = v.diagnostics;
188
+ (0, cbor_gen_ts_1.writeHead)(out, 4, a0.length);
189
+ for (const ee0 of a0) {
190
+ (0, diagnostic_gen_ts_2.appendCBORDiagnostic)(out, ee0);
191
+ }
192
+ }
193
+ }
194
+ }
195
+ function decodeCBORParseOutput(data) {
196
+ const dec = new cbor_gen_ts_1.CborDec(data);
197
+ return decodeCBORParseOutputFrom(dec);
198
+ }
199
+ function decodeCBORParseOutputFrom(dec) {
200
+ const o = {};
201
+ const n = dec.readMapHeader();
202
+ for (let i = 0; i < n; i++) {
203
+ const k = dec.readText();
204
+ switch (k) {
205
+ case "tree":
206
+ o["tree"] = JSON.parse((0, cbor_gen_ts_1.utf8Decode)(dec.readBytes()));
207
+ break;
208
+ case "diagnostics":
209
+ o["diagnostics"] = (() => { const a = []; const sn = dec.readArrayHeader(); for (let j = 0; j < sn; j++) {
210
+ a.push((0, diagnostic_gen_ts_2.decodeCBORDiagnosticFrom)(dec));
211
+ } return a; })();
212
+ break;
213
+ case "spans":
214
+ o["spans"] = (() => { const a = []; const sn = dec.readArrayHeader(); for (let j = 0; j < sn; j++) {
215
+ a.push(decodeCBORNodeSpanFrom(dec));
216
+ } return a; })();
217
+ break;
218
+ case "error":
219
+ o["error"] = dec.readText();
220
+ break;
221
+ default: dec.skip();
222
+ }
223
+ }
224
+ return o;
225
+ }
226
+ function encodeCBORNodeSpan(v) {
227
+ const out = [];
228
+ appendCBORNodeSpan(out, v);
229
+ return new Uint8Array(out);
230
+ }
231
+ function appendCBORNodeSpan(out, v) {
232
+ let n = 2;
233
+ (0, cbor_gen_ts_1.writeHead)(out, 5, n);
234
+ (0, cbor_gen_ts_1.writeText)(out, "span");
235
+ appendCBORSourceSpan(out, v.span);
236
+ (0, cbor_gen_ts_1.writeText)(out, "pointer");
237
+ (0, cbor_gen_ts_1.writeText)(out, v.pointer);
238
+ }
239
+ function decodeCBORNodeSpan(data) {
240
+ const dec = new cbor_gen_ts_1.CborDec(data);
241
+ return decodeCBORNodeSpanFrom(dec);
242
+ }
243
+ function decodeCBORNodeSpanFrom(dec) {
244
+ const o = {};
245
+ const n = dec.readMapHeader();
246
+ for (let i = 0; i < n; i++) {
247
+ const k = dec.readText();
248
+ switch (k) {
249
+ case "pointer":
250
+ o["pointer"] = dec.readText();
251
+ break;
252
+ case "span":
253
+ o["span"] = decodeCBORSourceSpanFrom(dec);
254
+ break;
255
+ default: dec.skip();
256
+ }
257
+ }
258
+ return o;
259
+ }
260
+ function encodeCBORSourceSpan(v) {
261
+ const out = [];
262
+ appendCBORSourceSpan(out, v);
263
+ return new Uint8Array(out);
264
+ }
265
+ function appendCBORSourceSpan(out, v) {
266
+ let n = 6;
267
+ (0, cbor_gen_ts_1.writeHead)(out, 5, n);
268
+ (0, cbor_gen_ts_1.writeText)(out, "end_line");
269
+ (0, cbor_gen_ts_1.writeInt)(out, v.end_line);
270
+ (0, cbor_gen_ts_1.writeText)(out, "end_column");
271
+ (0, cbor_gen_ts_1.writeInt)(out, v.end_column);
272
+ (0, cbor_gen_ts_1.writeText)(out, "end_offset");
273
+ (0, cbor_gen_ts_1.writeInt)(out, v.end_offset);
274
+ (0, cbor_gen_ts_1.writeText)(out, "start_line");
275
+ (0, cbor_gen_ts_1.writeInt)(out, v.start_line);
276
+ (0, cbor_gen_ts_1.writeText)(out, "start_column");
277
+ (0, cbor_gen_ts_1.writeInt)(out, v.start_column);
278
+ (0, cbor_gen_ts_1.writeText)(out, "start_offset");
279
+ (0, cbor_gen_ts_1.writeInt)(out, v.start_offset);
280
+ }
281
+ function decodeCBORSourceSpan(data) {
282
+ const dec = new cbor_gen_ts_1.CborDec(data);
283
+ return decodeCBORSourceSpanFrom(dec);
284
+ }
285
+ function decodeCBORSourceSpanFrom(dec) {
286
+ const o = {};
287
+ const n = dec.readMapHeader();
288
+ for (let i = 0; i < n; i++) {
289
+ const k = dec.readText();
290
+ switch (k) {
291
+ case "start_offset":
292
+ o["start_offset"] = dec.readInt();
293
+ break;
294
+ case "end_offset":
295
+ o["end_offset"] = dec.readInt();
296
+ break;
297
+ case "start_line":
298
+ o["start_line"] = dec.readInt();
299
+ break;
300
+ case "start_column":
301
+ o["start_column"] = dec.readInt();
302
+ break;
303
+ case "end_line":
304
+ o["end_line"] = dec.readInt();
305
+ break;
306
+ case "end_column":
307
+ o["end_column"] = dec.readInt();
308
+ break;
309
+ default: dec.skip();
310
+ }
311
+ }
312
+ return o;
313
+ }
314
+ function encodeCBORParseSourceResponse(v) {
315
+ const out = [];
316
+ appendCBORParseSourceResponse(out, v);
317
+ return new Uint8Array(out);
318
+ }
319
+ function appendCBORParseSourceResponse(out, v) {
320
+ let n = 0;
321
+ if (v.tree !== undefined && v.tree !== null)
322
+ n++;
323
+ if (v.error !== undefined && v.error !== "")
324
+ n++;
325
+ if (v.hostfunc_error_code !== undefined && v.hostfunc_error_code !== "")
326
+ n++;
327
+ (0, cbor_gen_ts_1.writeHead)(out, 5, n);
328
+ if (v.tree !== undefined && v.tree !== null) {
329
+ (0, cbor_gen_ts_1.writeText)(out, "tree");
330
+ (0, cbor_gen_ts_1.writeBytes)(out, (0, cbor_gen_ts_1.utf8Encode)(JSON.stringify(v.tree)));
331
+ }
332
+ if (v.error !== undefined && v.error !== "") {
333
+ (0, cbor_gen_ts_1.writeText)(out, "error");
334
+ (0, cbor_gen_ts_1.writeText)(out, v.error);
335
+ }
336
+ if (v.hostfunc_error_code !== undefined && v.hostfunc_error_code !== "") {
337
+ (0, cbor_gen_ts_1.writeText)(out, "hostfunc_error_code");
338
+ (0, cbor_gen_ts_1.writeText)(out, v.hostfunc_error_code);
339
+ }
340
+ }
341
+ function decodeCBORParseSourceResponse(data) {
342
+ const dec = new cbor_gen_ts_1.CborDec(data);
343
+ return decodeCBORParseSourceResponseFrom(dec);
344
+ }
345
+ function decodeCBORParseSourceResponseFrom(dec) {
346
+ const o = {};
347
+ const n = dec.readMapHeader();
348
+ for (let i = 0; i < n; i++) {
349
+ const k = dec.readText();
350
+ switch (k) {
351
+ case "tree":
352
+ o["tree"] = JSON.parse((0, cbor_gen_ts_1.utf8Decode)(dec.readBytes()));
353
+ break;
354
+ case "error":
355
+ o["error"] = dec.readText();
356
+ break;
357
+ case "hostfunc_error_code":
358
+ o["hostfunc_error_code"] = dec.readText();
359
+ break;
360
+ default: dec.skip();
361
+ }
362
+ }
363
+ return o;
364
+ }
@@ -0,0 +1,69 @@
1
+ import { type IRGraph } from "./ir_gen.ts";
2
+ import { type Diagnostic } from "./diagnostic_gen.ts";
3
+ import { CborDec } from "./cbor_gen.ts";
4
+ export interface PolicyInput {
5
+ graph: IRGraph;
6
+ precalculated_paths: PrecalculatedPath[];
7
+ sources?: PolicySource[];
8
+ settings?: unknown;
9
+ }
10
+ export interface PolicyOutput {
11
+ results: Diagnostic[];
12
+ error?: string;
13
+ }
14
+ export interface RenderPolicyInput {
15
+ artifacts: RenderedArtifact[];
16
+ sources?: PolicySource[];
17
+ settings?: unknown;
18
+ }
19
+ export interface RenderedArtifact {
20
+ path: string;
21
+ content: string;
22
+ tree?: unknown;
23
+ format?: string;
24
+ }
25
+ export interface PolicySource {
26
+ path: string;
27
+ content: string;
28
+ }
29
+ export interface PrecalculatedPath {
30
+ path_id: string;
31
+ nodes: string[];
32
+ attached_features: string[];
33
+ }
34
+ export declare function encodePolicyInput(v: PolicyInput): string;
35
+ export declare function decodePolicyInput(data: string): PolicyInput;
36
+ export declare function encodePolicyOutput(v: PolicyOutput): string;
37
+ export declare function decodePolicyOutput(data: string): PolicyOutput;
38
+ export declare function encodeRenderPolicyInput(v: RenderPolicyInput): string;
39
+ export declare function decodeRenderPolicyInput(data: string): RenderPolicyInput;
40
+ export declare function encodeRenderedArtifact(v: RenderedArtifact): string;
41
+ export declare function decodeRenderedArtifact(data: string): RenderedArtifact;
42
+ export declare function encodePolicySource(v: PolicySource): string;
43
+ export declare function decodePolicySource(data: string): PolicySource;
44
+ export declare function encodePrecalculatedPath(v: PrecalculatedPath): string;
45
+ export declare function decodePrecalculatedPath(data: string): PrecalculatedPath;
46
+ export declare function encodeCBORPolicyInput(v: PolicyInput): Uint8Array;
47
+ export declare function appendCBORPolicyInput(out: number[], v: PolicyInput): void;
48
+ export declare function decodeCBORPolicyInput(data: Uint8Array): PolicyInput;
49
+ export declare function decodeCBORPolicyInputFrom(dec: CborDec): PolicyInput;
50
+ export declare function encodeCBORPolicyOutput(v: PolicyOutput): Uint8Array;
51
+ export declare function appendCBORPolicyOutput(out: number[], v: PolicyOutput): void;
52
+ export declare function decodeCBORPolicyOutput(data: Uint8Array): PolicyOutput;
53
+ export declare function decodeCBORPolicyOutputFrom(dec: CborDec): PolicyOutput;
54
+ export declare function encodeCBORRenderPolicyInput(v: RenderPolicyInput): Uint8Array;
55
+ export declare function appendCBORRenderPolicyInput(out: number[], v: RenderPolicyInput): void;
56
+ export declare function decodeCBORRenderPolicyInput(data: Uint8Array): RenderPolicyInput;
57
+ export declare function decodeCBORRenderPolicyInputFrom(dec: CborDec): RenderPolicyInput;
58
+ export declare function encodeCBORRenderedArtifact(v: RenderedArtifact): Uint8Array;
59
+ export declare function appendCBORRenderedArtifact(out: number[], v: RenderedArtifact): void;
60
+ export declare function decodeCBORRenderedArtifact(data: Uint8Array): RenderedArtifact;
61
+ export declare function decodeCBORRenderedArtifactFrom(dec: CborDec): RenderedArtifact;
62
+ export declare function encodeCBORPolicySource(v: PolicySource): Uint8Array;
63
+ export declare function appendCBORPolicySource(out: number[], v: PolicySource): void;
64
+ export declare function decodeCBORPolicySource(data: Uint8Array): PolicySource;
65
+ export declare function decodeCBORPolicySourceFrom(dec: CborDec): PolicySource;
66
+ export declare function encodeCBORPrecalculatedPath(v: PrecalculatedPath): Uint8Array;
67
+ export declare function appendCBORPrecalculatedPath(out: number[], v: PrecalculatedPath): void;
68
+ export declare function decodeCBORPrecalculatedPath(data: Uint8Array): PrecalculatedPath;
69
+ export declare function decodeCBORPrecalculatedPathFrom(dec: CborDec): PrecalculatedPath;