@altopelago/aeon-profiles 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 (38) hide show
  1. package/README.md +107 -0
  2. package/dist/compile.d.ts +3 -0
  3. package/dist/compile.d.ts.map +1 -0
  4. package/dist/compile.js +122 -0
  5. package/dist/compile.js.map +1 -0
  6. package/dist/index.d.ts +14 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +13 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/processors/resolve-refs.d.ts +3 -0
  11. package/dist/processors/resolve-refs.d.ts.map +1 -0
  12. package/dist/processors/resolve-refs.js +33 -0
  13. package/dist/processors/resolve-refs.js.map +1 -0
  14. package/dist/profiles/aeon-gp-core.d.ts +3 -0
  15. package/dist/profiles/aeon-gp-core.d.ts.map +1 -0
  16. package/dist/profiles/aeon-gp-core.js +7 -0
  17. package/dist/profiles/aeon-gp-core.js.map +1 -0
  18. package/dist/profiles/altopelago-core.d.ts +3 -0
  19. package/dist/profiles/altopelago-core.d.ts.map +1 -0
  20. package/dist/profiles/altopelago-core.js +7 -0
  21. package/dist/profiles/altopelago-core.js.map +1 -0
  22. package/dist/profiles/core-compile.d.ts +4 -0
  23. package/dist/profiles/core-compile.d.ts.map +1 -0
  24. package/dist/profiles/core-compile.js +34 -0
  25. package/dist/profiles/core-compile.js.map +1 -0
  26. package/dist/profiles/json.d.ts +3 -0
  27. package/dist/profiles/json.d.ts.map +1 -0
  28. package/dist/profiles/json.js +11 -0
  29. package/dist/profiles/json.js.map +1 -0
  30. package/dist/registry.d.ts +4 -0
  31. package/dist/registry.d.ts.map +1 -0
  32. package/dist/registry.js +31 -0
  33. package/dist/registry.js.map +1 -0
  34. package/dist/types.d.ts +64 -0
  35. package/dist/types.d.ts.map +1 -0
  36. package/dist/types.js +2 -0
  37. package/dist/types.js.map +1 -0
  38. package/package.json +32 -0
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # @altopelago/aeon-profiles
2
+
3
+ Minimal profile compiler engine for AEON.
4
+
5
+ Implementation docs:
6
+
7
+ - [`docs/implementations/typescript/api/profiles.md`](../../../../docs/implementations/typescript/api/profiles.md)
8
+
9
+ This package provides a single entry point, `compile(...)`, which emits the
10
+ Assignment Event Stream (AES) plus optional diagnostics metadata. Profiles are
11
+ registered in a registry and are responsible for emitting AES only.
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { compile } from '@altopelago/aeon-profiles';
17
+
18
+ const result = compile('key = "value"', {
19
+ profile: 'altopelago.core.v1',
20
+ mode: 'strict',
21
+ });
22
+
23
+ if (!result.meta?.errors?.length) {
24
+ console.log(result.aes);
25
+ }
26
+ ```
27
+
28
+ ## API
29
+
30
+ - `compile(input, options)`
31
+ - `createRegistry()` / `createDefaultRegistry()`
32
+ - `altopelagoCoreProfile`
33
+ - `jsonProfile`
34
+
35
+ Type contract:
36
+
37
+ ```ts
38
+ export type CompileOptions = {
39
+ profile: ProfileRef;
40
+ registry?: ProfileRegistry;
41
+ mode?: 'strict' | 'loose';
42
+ datatypePolicy?: 'reserved_only' | 'allow_custom';
43
+ maxInputBytes?: number;
44
+ maxAttributeDepth?: number;
45
+ maxSeparatorDepth?: number;
46
+ };
47
+
48
+ export type CompileResult = {
49
+ aes: readonly AssignmentEvent[];
50
+ meta?: {
51
+ errors?: readonly Diagnostic[];
52
+ warnings?: readonly Diagnostic[];
53
+ profileId?: string;
54
+ version?: string;
55
+ };
56
+ };
57
+ ```
58
+
59
+ Processor contract:
60
+
61
+ ```ts
62
+ export interface Processor {
63
+ id: string;
64
+ order?: number;
65
+ apply(aes: readonly AssignmentEvent[], ctx: ProcessorCtx): readonly AssignmentEvent[];
66
+ }
67
+
68
+ export interface Profile {
69
+ id: string;
70
+ version?: string;
71
+ compile(input: unknown, ctx: CompileCtx): readonly AssignmentEvent[] | void;
72
+ processors?: readonly Processor[];
73
+ }
74
+ ```
75
+
76
+ Processor ordering:
77
+ - Sorted by `order` (default `0`)
78
+ - Ties resolved by `id` (lexicographic)
79
+
80
+ Built-in processors:
81
+ - `createResolveRefsProcessor(mode?)` — resolves clone refs `~` to terminal values and
82
+ preserves pointer refs `~>`. This is optional and not enabled by default.
83
+
84
+ Built-in profiles:
85
+ - `altopelago.core.v1` — form-only AES output
86
+ - `aeon.gp.core.v1` — AEON GP core profile
87
+ - `json` — resolves references for JSON interoperability
88
+
89
+ ## Tests
90
+
91
+ Integration tests are guarded to avoid requiring local workspace installs.
92
+ Run with:
93
+
94
+ ```bash
95
+ AEON_PROFILES_INTEGRATION=1 pnpm -r test
96
+ ```
97
+
98
+ ## Profile Discovery Policy
99
+
100
+ - Default: static, code-registered profiles via `createRegistry()` / `register()`.
101
+ - Optional: runtime registration is allowed, but the engine does not scan config
102
+ files or perform dynamic discovery. Host apps can wire profiles explicitly.
103
+
104
+ ## Notes
105
+
106
+ - AES is the only output. No interpretation or object materialization occurs here.
107
+ - Profiles are deterministic and should not perform I/O.
@@ -0,0 +1,3 @@
1
+ import type { CompileOptions, CompileResult } from './types.js';
2
+ export declare function compile(input: unknown, options: CompileOptions): CompileResult;
3
+ //# sourceMappingURL=compile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../src/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,cAAc,EACd,aAAa,EAKhB,MAAM,YAAY,CAAC;AA8BpB,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,aAAa,CAyG9E"}
@@ -0,0 +1,122 @@
1
+ import { createDefaultRegistry } from './registry.js';
2
+ function normalizeDiagnostic(level, diag) {
3
+ return {
4
+ level,
5
+ message: diag.message,
6
+ ...(diag.code !== undefined ? { code: diag.code } : {}),
7
+ ...(diag.span !== undefined ? { span: diag.span } : {}),
8
+ ...(diag.path !== undefined ? { path: diag.path } : {}),
9
+ };
10
+ }
11
+ function resolveProfile(profileRef, registry) {
12
+ if (typeof profileRef === 'string') {
13
+ return registry.get(profileRef) ?? null;
14
+ }
15
+ return profileRef;
16
+ }
17
+ function sortProcessors(processors) {
18
+ return [...processors].sort((a, b) => {
19
+ const orderA = a.order ?? 0;
20
+ const orderB = b.order ?? 0;
21
+ if (orderA !== orderB)
22
+ return orderA - orderB;
23
+ return a.id.localeCompare(b.id);
24
+ });
25
+ }
26
+ export function compile(input, options) {
27
+ const registry = options.registry ?? createDefaultRegistry();
28
+ const strict = (options.mode ?? 'strict') === 'strict';
29
+ const datatypePolicy = options.datatypePolicy;
30
+ const maxInputBytes = options.maxInputBytes;
31
+ const errors = [];
32
+ const warnings = [];
33
+ const emitted = [];
34
+ if (typeof input === 'string' && maxInputBytes !== undefined) {
35
+ const actualBytes = Buffer.byteLength(input, 'utf8');
36
+ if (actualBytes > maxInputBytes) {
37
+ errors.push({
38
+ level: 'error',
39
+ message: `Input size ${actualBytes} bytes exceeds configured limit of ${maxInputBytes} bytes`,
40
+ code: 'INPUT_SIZE_EXCEEDED',
41
+ });
42
+ return {
43
+ aes: [],
44
+ meta: {
45
+ errors,
46
+ },
47
+ };
48
+ }
49
+ }
50
+ const ctx = {
51
+ strict,
52
+ ...(datatypePolicy ? { datatypePolicy } : {}),
53
+ maxAttributeDepth: options.maxAttributeDepth ?? 1,
54
+ maxSeparatorDepth: options.maxSeparatorDepth ?? 1,
55
+ maxGenericDepth: options.maxGenericDepth ?? 1,
56
+ emit(event) {
57
+ emitted.push(event);
58
+ },
59
+ warn(diag) {
60
+ warnings.push(normalizeDiagnostic('warning', diag));
61
+ },
62
+ error(diag) {
63
+ errors.push(normalizeDiagnostic('error', diag));
64
+ },
65
+ };
66
+ const profile = resolveProfile(options.profile, registry);
67
+ if (!profile) {
68
+ errors.push({
69
+ level: 'error',
70
+ message: `Unknown profile: ${String(options.profile)}`,
71
+ code: 'PROFILE_NOT_FOUND',
72
+ });
73
+ return {
74
+ aes: [],
75
+ meta: {
76
+ errors,
77
+ },
78
+ };
79
+ }
80
+ const profileResult = profile.compile(input, ctx);
81
+ let aes = Array.isArray(profileResult) ? profileResult : emitted;
82
+ if (profile.processors && profile.processors.length > 0) {
83
+ const processorCtx = {
84
+ strict,
85
+ warn(diag) {
86
+ warnings.push(normalizeDiagnostic('warning', diag));
87
+ },
88
+ error(diag) {
89
+ errors.push(normalizeDiagnostic('error', diag));
90
+ },
91
+ };
92
+ for (const processor of sortProcessors(profile.processors)) {
93
+ const next = processor.apply(aes, processorCtx);
94
+ if (!Array.isArray(next)) {
95
+ errors.push({
96
+ level: 'error',
97
+ message: `Processor '${processor.id}' returned invalid result`,
98
+ code: 'PROCESSOR_INVALID_RESULT',
99
+ });
100
+ break;
101
+ }
102
+ aes = next;
103
+ }
104
+ }
105
+ const hasErrors = errors.length > 0;
106
+ const meta = {
107
+ ...(errors.length > 0 ? { errors } : {}),
108
+ ...(warnings.length > 0 ? { warnings } : {}),
109
+ ...(profile.id ? { profileId: profile.id } : {}),
110
+ ...(profile.version ? { version: profile.version } : {}),
111
+ };
112
+ if (Object.keys(meta).length > 0) {
113
+ return {
114
+ aes: strict && hasErrors ? [] : aes,
115
+ meta,
116
+ };
117
+ }
118
+ return {
119
+ aes: strict && hasErrors ? [] : aes,
120
+ };
121
+ }
122
+ //# sourceMappingURL=compile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile.js","sourceRoot":"","sources":["../src/compile.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,SAAS,mBAAmB,CAAC,KAA0B,EAAE,IAA+B;IACpF,OAAO;QACH,KAAK;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC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AAC;YACD,GAAG,GAAG,IAAI,CAAC;QACf,CAAC;IACL,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAEpC,MAAM,IAAI,GAAG;QACT,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5C,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3D,CAAC;IACF,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG;YACnC,IAAI;SACP,CAAC;IACN,CAAC;IAED,OAAO;QACH,GAAG,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG;KACtC,CAAC;AACN,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @altopelago/aeon-profiles - Profile Compiler Engine
3
+ *
4
+ * Provides profile registration and a single compile entry point that
5
+ * emits AES (Assignment Event Stream) with optional diagnostics metadata.
6
+ */
7
+ export { compile } from './compile.js';
8
+ export { createRegistry, createDefaultRegistry } from './registry.js';
9
+ export { altopelagoCoreProfile } from './profiles/altopelago-core.js';
10
+ export { aeonGpCoreProfile } from './profiles/aeon-gp-core.js';
11
+ export { jsonProfile } from './profiles/json.js';
12
+ export { createResolveRefsProcessor } from './processors/resolve-refs.js';
13
+ export type { CompileCtx, CompileOptions, CompileResult, CompileMeta, Diagnostic, DiagnosticLevel, Processor, ProcessorCtx, Profile, ProfileRef, ProfileRegistry, } from './types.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,YAAY,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,SAAS,EACT,YAAY,EACZ,OAAO,EACP,UAAU,EACV,eAAe,GAClB,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @altopelago/aeon-profiles - Profile Compiler Engine
3
+ *
4
+ * Provides profile registration and a single compile entry point that
5
+ * emits AES (Assignment Event Stream) with optional diagnostics metadata.
6
+ */
7
+ export { compile } from './compile.js';
8
+ export { createRegistry, createDefaultRegistry } from './registry.js';
9
+ export { altopelagoCoreProfile } from './profiles/altopelago-core.js';
10
+ export { aeonGpCoreProfile } from './profiles/aeon-gp-core.js';
11
+ export { jsonProfile } from './profiles/json.js';
12
+ export { createResolveRefsProcessor } from './processors/resolve-refs.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Processor } from '../types.js';
2
+ export declare function createResolveRefsProcessor(mode?: 'strict' | 'loose'): Processor;
3
+ //# sourceMappingURL=resolve-refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-refs.d.ts","sourceRoot":"","sources":["../../src/processors/resolve-refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,wBAAgB,0BAA0B,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CA8B/E"}
@@ -0,0 +1,33 @@
1
+ import { resolveRefs } from '@altopelago/aeon-aes';
2
+ export function createResolveRefsProcessor(mode) {
3
+ return {
4
+ id: 'resolve.refs.v1',
5
+ order: 100,
6
+ apply(aes, ctx) {
7
+ const resolveMode = mode ?? (ctx.strict ? 'strict' : 'loose');
8
+ const result = resolveRefs(aes, { mode: resolveMode });
9
+ if (result.meta?.errors) {
10
+ for (const err of result.meta.errors) {
11
+ ctx.error({
12
+ message: err.message,
13
+ ...(err.code ? { code: err.code } : {}),
14
+ ...(err.span ? { span: err.span } : {}),
15
+ ...(err.path ? { path: err.path } : {}),
16
+ });
17
+ }
18
+ }
19
+ if (result.meta?.warnings) {
20
+ for (const warn of result.meta.warnings) {
21
+ ctx.warn({
22
+ message: warn.message,
23
+ ...(warn.code ? { code: warn.code } : {}),
24
+ ...(warn.span ? { span: warn.span } : {}),
25
+ ...(warn.path ? { path: warn.path } : {}),
26
+ });
27
+ }
28
+ }
29
+ return result.aes;
30
+ },
31
+ };
32
+ }
33
+ //# sourceMappingURL=resolve-refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-refs.js","sourceRoot":"","sources":["../../src/processors/resolve-refs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,UAAU,0BAA0B,CAAC,IAAyB;IAChE,OAAO;QACH,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,GAAG;QACV,KAAK,CAAC,GAAG,EAAE,GAAG;YACV,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YAC9D,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;YACvD,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;gBACtB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;oBACnC,GAAG,CAAC,KAAK,CAAC;wBACN,OAAO,EAAE,GAAG,CAAC,OAAO;wBACpB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;wBACvC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;wBACvC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qBAC1C,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YACD,IAAI,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC;gBACxB,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACtC,GAAG,CAAC,IAAI,CAAC;wBACL,OAAO,EAAE,IAAI,CAAC,OAAO;wBACrB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;wBACzC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;wBACzC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qBAC5C,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YACD,OAAO,MAAM,CAAC,GAAG,CAAC;QACtB,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Profile } from '../types.js';
2
+ export declare const aeonGpCoreProfile: Profile;
3
+ //# sourceMappingURL=aeon-gp-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aeon-gp-core.d.ts","sourceRoot":"","sources":["../../src/profiles/aeon-gp-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,aAAa,CAAC;AAGvD,eAAO,MAAM,iBAAiB,EAAE,OAI/B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { compileWithCore } from './core-compile.js';
2
+ export const aeonGpCoreProfile = {
3
+ id: 'aeon.gp.profile.v1',
4
+ version: '1',
5
+ compile: (input, ctx) => compileWithCore(input, ctx),
6
+ };
7
+ //# sourceMappingURL=aeon-gp-core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aeon-gp-core.js","sourceRoot":"","sources":["../../src/profiles/aeon-gp-core.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAY;IACtC,EAAE,EAAE,oBAAoB;IACxB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,CAAC,KAAK,EAAE,GAAe,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,CAAC;CACnE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Profile } from '../types.js';
2
+ export declare const altopelagoCoreProfile: Profile;
3
+ //# sourceMappingURL=altopelago-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"altopelago-core.d.ts","sourceRoot":"","sources":["../../src/profiles/altopelago-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,aAAa,CAAC;AAGvD,eAAO,MAAM,qBAAqB,EAAE,OAInC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { compileWithCore } from './core-compile.js';
2
+ export const altopelagoCoreProfile = {
3
+ id: 'altopelago.core.v1',
4
+ version: '1',
5
+ compile: (input, ctx) => compileWithCore(input, ctx),
6
+ };
7
+ //# sourceMappingURL=altopelago-core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"altopelago-core.js","sourceRoot":"","sources":["../../src/profiles/altopelago-core.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,qBAAqB,GAAY;IAC1C,EAAE,EAAE,oBAAoB;IACxB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,CAAC,KAAK,EAAE,GAAe,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,CAAC;CACnE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AssignmentEvent } from '@altopelago/aeon-aes';
2
+ import type { CompileCtx } from '../types.js';
3
+ export declare function compileWithCore(input: unknown, ctx: CompileCtx): readonly AssignmentEvent[];
4
+ //# sourceMappingURL=core-compile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-compile.d.ts","sourceRoot":"","sources":["../../src/profiles/core-compile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAsB1D,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,SAAS,eAAe,EAAE,CAuB3F"}
@@ -0,0 +1,34 @@
1
+ import { compile as compileAeon } from '@altopelago/aeon-core';
2
+ function errorToDiagnostic(error) {
3
+ const anyError = error;
4
+ const path = anyError.path ?? anyError.sourcePath ?? anyError.targetPath;
5
+ return {
6
+ message: anyError.message,
7
+ ...(typeof anyError.code === 'string' ? { code: anyError.code } : {}),
8
+ ...(anyError.span !== undefined ? { span: anyError.span } : {}),
9
+ ...(path !== undefined ? { path } : {}),
10
+ };
11
+ }
12
+ export function compileWithCore(input, ctx) {
13
+ if (typeof input !== 'string') {
14
+ ctx.error({
15
+ message: 'Input must be AEON source text (string).',
16
+ code: 'INVALID_INPUT',
17
+ });
18
+ return [];
19
+ }
20
+ const result = compileAeon(input, {
21
+ recovery: !ctx.strict,
22
+ ...(ctx.datatypePolicy ? { datatypePolicy: ctx.datatypePolicy } : {}),
23
+ maxAttributeDepth: ctx.maxAttributeDepth,
24
+ maxSeparatorDepth: ctx.maxSeparatorDepth,
25
+ maxGenericDepth: ctx.maxGenericDepth,
26
+ });
27
+ if (result.errors.length > 0) {
28
+ for (const err of result.errors) {
29
+ ctx.error(errorToDiagnostic(err));
30
+ }
31
+ }
32
+ return result.events;
33
+ }
34
+ //# sourceMappingURL=core-compile.js.map
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E,CAAC;QACrE,iBAAiB,EAAE,GAAG,CAAC,iBAAiB;QACxC,iBAAiB,EAAE,GAAG,CAAC,iBAAiB;QACxC,eAAe,EAAE,GAAG,CAAC,eAAe;KACvC,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAC9B,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;QACtC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC;AACzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Profile } from '../types.js';
2
+ export declare const jsonProfile: Profile;
3
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/profiles/json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,aAAa,CAAC;AAIvD,eAAO,MAAM,WAAW,EAAE,OAOzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { createResolveRefsProcessor } from '../processors/resolve-refs.js';
2
+ import { compileWithCore } from './core-compile.js';
3
+ export const jsonProfile = {
4
+ id: 'json',
5
+ version: '1',
6
+ compile: (input, ctx) => compileWithCore(input, ctx),
7
+ processors: [
8
+ createResolveRefsProcessor(),
9
+ ],
10
+ };
11
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/profiles/json.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,WAAW,GAAY;IAChC,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,CAAC,KAAK,EAAE,GAAe,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,CAAC;IAChE,UAAU,EAAE;QACR,0BAA0B,EAAE;KAC/B;CACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ProfileRegistry } from './types.js';
2
+ export declare function createRegistry(): ProfileRegistry;
3
+ export declare function createDefaultRegistry(): ProfileRegistry;
4
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,YAAY,CAAC;AAwB3D,wBAAgB,cAAc,IAAI,eAAe,CAEhD;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CAevD"}
@@ -0,0 +1,31 @@
1
+ import { createRequire } from 'node:module';
2
+ class Registry {
3
+ profiles = new Map();
4
+ register(profile) {
5
+ this.profiles.set(profile.id, profile);
6
+ return this;
7
+ }
8
+ get(id) {
9
+ return this.profiles.get(id);
10
+ }
11
+ has(id) {
12
+ return this.profiles.has(id);
13
+ }
14
+ list() {
15
+ return Array.from(this.profiles.values());
16
+ }
17
+ }
18
+ export function createRegistry() {
19
+ return new Registry();
20
+ }
21
+ export function createDefaultRegistry() {
22
+ const require = createRequire(import.meta.url);
23
+ const { altopelagoCoreProfile } = require('./profiles/altopelago-core.js');
24
+ const { aeonGpCoreProfile } = require('./profiles/aeon-gp-core.js');
25
+ const { jsonProfile } = require('./profiles/json.js');
26
+ return createRegistry()
27
+ .register(altopelagoCoreProfile)
28
+ .register(aeonGpCoreProfile)
29
+ .register(jsonProfile);
30
+ }
31
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,QAAQ;IACO,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAEvD,QAAQ,CAAC,OAAgB;QACrB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,GAAG,CAAC,EAAU;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,GAAG,CAAC,EAAU;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,IAAI;QACA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC;CACJ;AAED,MAAM,UAAU,cAAc;IAC1B,OAAO,IAAI,QAAQ,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,qBAAqB;IACjC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,EAAE,qBAAqB,EAAE,GAAG,OAAO,CAAC,+BAA+B,CAExE,CAAC;IACF,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAEjE,CAAC;IACF,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAEnD,CAAC;IACF,OAAO,cAAc,EAAE;SAClB,QAAQ,CAAC,qBAAqB,CAAC;SAC/B,QAAQ,CAAC,iBAAiB,CAAC;SAC3B,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { AssignmentEvent } from '@altopelago/aeon-aes';
2
+ import type { Span } from '@altopelago/aeon-lexer';
3
+ export type DiagnosticLevel = 'error' | 'warning';
4
+ export interface Diagnostic {
5
+ readonly level: DiagnosticLevel;
6
+ readonly message: string;
7
+ readonly code?: string;
8
+ readonly span?: Span;
9
+ readonly path?: string;
10
+ }
11
+ export interface CompileMeta {
12
+ readonly errors?: readonly Diagnostic[];
13
+ readonly warnings?: readonly Diagnostic[];
14
+ readonly profileId?: string;
15
+ readonly version?: string;
16
+ }
17
+ export interface CompileResult {
18
+ readonly aes: readonly AssignmentEvent[];
19
+ readonly meta?: CompileMeta;
20
+ }
21
+ export interface CompileOptions {
22
+ readonly profile: ProfileRef;
23
+ readonly registry?: ProfileRegistry;
24
+ readonly mode?: 'strict' | 'loose';
25
+ readonly datatypePolicy?: 'reserved_only' | 'allow_custom';
26
+ readonly maxInputBytes?: number;
27
+ readonly maxAttributeDepth?: number;
28
+ readonly maxSeparatorDepth?: number;
29
+ readonly maxGenericDepth?: number;
30
+ }
31
+ export interface CompileCtx {
32
+ readonly strict: boolean;
33
+ readonly datatypePolicy?: 'reserved_only' | 'allow_custom';
34
+ readonly maxAttributeDepth: number;
35
+ readonly maxSeparatorDepth: number;
36
+ readonly maxGenericDepth: number;
37
+ emit(event: AssignmentEvent): void;
38
+ warn(diag: Omit<Diagnostic, 'level'>): void;
39
+ error(diag: Omit<Diagnostic, 'level'>): void;
40
+ }
41
+ export interface ProcessorCtx {
42
+ readonly strict: boolean;
43
+ warn(diag: Omit<Diagnostic, 'level'>): void;
44
+ error(diag: Omit<Diagnostic, 'level'>): void;
45
+ }
46
+ export interface Processor {
47
+ readonly id: string;
48
+ readonly order?: number;
49
+ apply(aes: readonly AssignmentEvent[], ctx: ProcessorCtx): readonly AssignmentEvent[];
50
+ }
51
+ export interface Profile {
52
+ readonly id: string;
53
+ readonly version?: string;
54
+ compile(input: unknown, ctx: CompileCtx): readonly AssignmentEvent[] | void;
55
+ readonly processors?: readonly Processor[];
56
+ }
57
+ export type ProfileRef = string | Profile;
58
+ export interface ProfileRegistry {
59
+ register(profile: Profile): ProfileRegistry;
60
+ get(id: string): Profile | undefined;
61
+ has(id: string): boolean;
62
+ list(): readonly Profile[];
63
+ }
64
+ //# sourceMappingURL=types.d.ts.map
@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,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,SAAS,eAAe,EAAE,GAAG,IAAI,CAAC;IAC5E,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;CAC9C;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1C,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC;IAC5C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,IAAI,IAAI,SAAS,OAAO,EAAE,CAAC;CAC9B"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@altopelago/aeon-profiles",
3
+ "version": "0.9.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "!dist/**/*.test.d.ts",
16
+ "!dist/**/*.test.d.ts.map",
17
+ "!dist/**/*.test.js",
18
+ "!dist/**/*.test.js.map"
19
+ ],
20
+ "dependencies": {
21
+ "@altopelago/aeon-core": "0.9.0",
22
+ "@altopelago/aeon-lexer": "0.9.0",
23
+ "@altopelago/aeon-aes": "0.9.0"
24
+ },
25
+ "scripts": {
26
+ "build": "tsc -p tsconfig.json",
27
+ "test": "node --test dist/*.test.js",
28
+ "test:integration": "AEON_PROFILES_INTEGRATION=1 node --test dist/**/*.test.js",
29
+ "clean": "rm -rf dist",
30
+ "typecheck": "tsc -p tsconfig.json --noEmit"
31
+ }
32
+ }