@altopelago/aeon-aes 0.12.1 → 0.13.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.
- package/README.md +13 -1
- package/dist/film-internal.d.ts +137 -0
- package/dist/film-internal.d.ts.map +1 -0
- package/dist/film-internal.js +702 -0
- package/dist/film-internal.js.map +1 -0
- package/dist/film.d.ts +64 -0
- package/dist/film.d.ts.map +1 -0
- package/dist/film.js +22 -0
- package/dist/film.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/telex-incremental-internal.d.ts +50 -0
- package/dist/telex-incremental-internal.d.ts.map +1 -0
- package/dist/telex-incremental-internal.js +422 -0
- package/dist/telex-incremental-internal.js.map +1 -0
- package/dist/telex-internal.d.ts +31 -5
- package/dist/telex-internal.d.ts.map +1 -1
- package/dist/telex-internal.js +77 -44
- package/dist/telex-internal.js.map +1 -1
- package/dist/telex.d.ts +2 -0
- package/dist/telex.d.ts.map +1 -1
- package/dist/telex.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# @altopelago/aeon-aes
|
|
2
2
|
|
|
3
|
-
Assignment Event Stream emission, portable projection,
|
|
3
|
+
Assignment Event Stream emission, portable projection, Telex v1 codec, and
|
|
4
|
+
reader-only Film v1 decoding.
|
|
4
5
|
|
|
5
6
|
## Installation
|
|
6
7
|
|
|
@@ -26,6 +27,8 @@ if (result.errors.length === 0) {
|
|
|
26
27
|
- formats and works with canonical AEON paths
|
|
27
28
|
- exposes event-level data used by AEOS validation, finalization, and tooling
|
|
28
29
|
- parses, validates, encodes, and canonicalizes `telex.aes` v1 streams
|
|
30
|
+
- decodes one-shot and incremental `film.aes` v1 streams, withholding complete
|
|
31
|
+
acceptance until portable AES validation succeeds
|
|
29
32
|
- splits compact Telex datatypes into `datatype`, `generics`, and `clarifiers`
|
|
30
33
|
|
|
31
34
|
## API
|
|
@@ -43,6 +46,9 @@ if (result.errors.length === 0) {
|
|
|
43
46
|
- `canonicalizeTelex(input, options?)`
|
|
44
47
|
- `validateTelex(input, options?)`
|
|
45
48
|
- `validateTelexRecords(records, options?)`
|
|
49
|
+
- `decodeFilmSyntax(input, options?)` for provisional inspection
|
|
50
|
+
- `decodeFilm(input, options?)` for complete validated reads
|
|
51
|
+
- `IncrementalFilmDecoder`
|
|
46
52
|
- canonical path helpers
|
|
47
53
|
- Assignment Event Stream types
|
|
48
54
|
- emitted native events carry `sourcePlane: 'header' | 'body'`; consumers
|
|
@@ -65,5 +71,11 @@ If you want the stable application-facing entry point, prefer `@altopelago/aeon-
|
|
|
65
71
|
- Candidate AES types describe reconstructed validation input for speculative
|
|
66
72
|
post-commit state. They do not define substrate materialization policy.
|
|
67
73
|
- This package does not materialize application objects.
|
|
74
|
+
- Film support is reader-only. No Film encoder or durable-writer surface is
|
|
75
|
+
exported.
|
|
76
|
+
- Film byte limits (`maxInputBytes`, `maxRecordBytes`, `maxFieldBytes`, and
|
|
77
|
+
`maxBufferedBytes`) are format-local. Shared event and structural limits may
|
|
78
|
+
be supplied flat or through `aesLimits`; Telex framing limits are never
|
|
79
|
+
imported as Film byte policy.
|
|
68
80
|
- Schema validation belongs in `@altopelago/aeos-core`.
|
|
69
81
|
- JSON or map materialization belongs in `@altopelago/aeon-finalize`.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export declare const FILM_VERSION = "1";
|
|
2
|
+
export declare const FILM_V1_PREAMBLE: readonly number[];
|
|
3
|
+
export declare const DEFAULT_FILM_LIMITS: Readonly<{
|
|
4
|
+
maxInputBytes: 67108864;
|
|
5
|
+
maxRecordBytes: 16777216;
|
|
6
|
+
maxFieldBytes: 4194304;
|
|
7
|
+
maxBufferedBytes: 16777216;
|
|
8
|
+
}>;
|
|
9
|
+
export declare class FilmDecodeError extends Error {
|
|
10
|
+
constructor(code: any, message: any, details?: {});
|
|
11
|
+
}
|
|
12
|
+
/** Normalize the Film-local limits selected by the consumer. */
|
|
13
|
+
export declare function normalizeFilmLimits(options?: {}): Readonly<{
|
|
14
|
+
maxInputBytes: any;
|
|
15
|
+
maxRecordBytes: any;
|
|
16
|
+
maxFieldBytes: any;
|
|
17
|
+
maxBufferedBytes: any;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Decode canonical Film framing and records into owned JavaScript values.
|
|
21
|
+
* The result is provisional: portable AES semantics have not yet been
|
|
22
|
+
* accepted. Use decodeFilm for replay, ingestion, or mutation inputs.
|
|
23
|
+
*/
|
|
24
|
+
export declare function decodeFilmSyntax(input: any, options?: {}): {
|
|
25
|
+
profile: string;
|
|
26
|
+
profileExplicit: boolean;
|
|
27
|
+
projection: string | null;
|
|
28
|
+
projectionExplicit: boolean;
|
|
29
|
+
records: {
|
|
30
|
+
[x: string]: string;
|
|
31
|
+
kind: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
/** Decode Film and return an owned stream only after complete AES validation. */
|
|
35
|
+
export declare function decodeFilm(input: any, options?: {}): {
|
|
36
|
+
profile: string;
|
|
37
|
+
profileExplicit: boolean;
|
|
38
|
+
projection: string | null;
|
|
39
|
+
projectionExplicit: boolean;
|
|
40
|
+
records: {
|
|
41
|
+
[x: string]: string;
|
|
42
|
+
kind: string;
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Incremental Film decoder. Complete records may be inspected provisionally,
|
|
47
|
+
* but only a successful push with `{ final: true }` returns `status=complete`.
|
|
48
|
+
*/
|
|
49
|
+
export declare class IncrementalFilmDecoder {
|
|
50
|
+
constructor(options?: {});
|
|
51
|
+
push(input: any, options?: {}): {
|
|
52
|
+
records: any[];
|
|
53
|
+
status?: any;
|
|
54
|
+
stream?: {
|
|
55
|
+
profile: any;
|
|
56
|
+
profileExplicit: any;
|
|
57
|
+
projection: any;
|
|
58
|
+
projectionExplicit: any;
|
|
59
|
+
records: any;
|
|
60
|
+
} | null;
|
|
61
|
+
bufferedBytes?: any;
|
|
62
|
+
inputBytes?: any;
|
|
63
|
+
} | {
|
|
64
|
+
status: any;
|
|
65
|
+
records: any;
|
|
66
|
+
stream: {
|
|
67
|
+
profile: any;
|
|
68
|
+
profileExplicit: any;
|
|
69
|
+
projection: any;
|
|
70
|
+
projectionExplicit: any;
|
|
71
|
+
records: any;
|
|
72
|
+
} | null;
|
|
73
|
+
bufferedBytes: any;
|
|
74
|
+
inputBytes: any;
|
|
75
|
+
};
|
|
76
|
+
pushBounded(input: any, final: any): {
|
|
77
|
+
status: any;
|
|
78
|
+
records: any;
|
|
79
|
+
stream: {
|
|
80
|
+
profile: any;
|
|
81
|
+
profileExplicit: any;
|
|
82
|
+
projection: any;
|
|
83
|
+
projectionExplicit: any;
|
|
84
|
+
records: any;
|
|
85
|
+
} | null;
|
|
86
|
+
bufferedBytes: any;
|
|
87
|
+
inputBytes: any;
|
|
88
|
+
};
|
|
89
|
+
finish(): {
|
|
90
|
+
records: any[];
|
|
91
|
+
status?: any;
|
|
92
|
+
stream?: {
|
|
93
|
+
profile: any;
|
|
94
|
+
profileExplicit: any;
|
|
95
|
+
projection: any;
|
|
96
|
+
projectionExplicit: any;
|
|
97
|
+
records: any;
|
|
98
|
+
} | null;
|
|
99
|
+
bufferedBytes?: any;
|
|
100
|
+
inputBytes?: any;
|
|
101
|
+
} | {
|
|
102
|
+
status: any;
|
|
103
|
+
records: any;
|
|
104
|
+
stream: {
|
|
105
|
+
profile: any;
|
|
106
|
+
profileExplicit: any;
|
|
107
|
+
projection: any;
|
|
108
|
+
projectionExplicit: any;
|
|
109
|
+
records: any;
|
|
110
|
+
} | null;
|
|
111
|
+
bufferedBytes: any;
|
|
112
|
+
inputBytes: any;
|
|
113
|
+
};
|
|
114
|
+
consume(length: any): void;
|
|
115
|
+
retainIncompleteBuffer(): void;
|
|
116
|
+
bufferLimitDetails(): {
|
|
117
|
+
offset: any;
|
|
118
|
+
record: any;
|
|
119
|
+
component: string;
|
|
120
|
+
};
|
|
121
|
+
currentStream(): any;
|
|
122
|
+
result(status: any, records: any): {
|
|
123
|
+
status: any;
|
|
124
|
+
records: any;
|
|
125
|
+
stream: {
|
|
126
|
+
profile: any;
|
|
127
|
+
profileExplicit: any;
|
|
128
|
+
projection: any;
|
|
129
|
+
projectionExplicit: any;
|
|
130
|
+
records: any;
|
|
131
|
+
} | null;
|
|
132
|
+
bufferedBytes: any;
|
|
133
|
+
inputBytes: any;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export declare function filmV1IsDraft(): boolean;
|
|
137
|
+
//# sourceMappingURL=film-internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"film-internal.d.ts","sourceRoot":"","sources":["../src/film-internal.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,gBAAgB,mBAAgD,CAAC;AAE9E,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAC;AA8CH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,KAAK,EAStC;CACF;AAED,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,OAAO,KAAK;;;;;GAQ/C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,EAAE,OAAO,KAAK;;;;;;;;;EAqEnD;AAED,iFAAiF;AACjF,wBAAgB,UAAU,CAAC,KAAK,KAAA,EAAE,OAAO,KAAK;;;;;;;;;EAI7C;AAED;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,YAAY,OAAO,KAAK,EAYvB;IAED,IAAI,CAAC,KAAK,KAAA,EAAE,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;MAwCvB;IAED,WAAW,CAAC,KAAK,KAAA,EAAE,KAAK,KAAA;;;;;;;;;;;;MAiIvB;IAED,MAAM;;;;;;;;;;;;;;;;;;;;;;;;MAEL;IAED,OAAO,CAAC,MAAM,KAAA,QAKb;IAED,sBAAsB,SAQrB;IAED,kBAAkB;;;;MAMjB;IAED,aAAa,QAKZ;IAED,MAAM,CAAC,MAAM,KAAA,EAAE,OAAO,KAAA;;;;;;;;;;;;MAQrB;CACF;AAyHD,wBAAgB,aAAa,YAE5B"}
|