@lokascript/framework 2.3.1 → 2.4.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 (54) hide show
  1. package/dist/api/index.js +29 -516
  2. package/dist/api/index.js.map +1 -1
  3. package/dist/core/index.js +20 -128
  4. package/dist/core/index.js.map +1 -1
  5. package/dist/core/pattern-matching/index.js +19 -12
  6. package/dist/core/pattern-matching/index.js.map +1 -1
  7. package/dist/core/tokenization/index.js.map +1 -1
  8. package/dist/core/types.d.ts +7 -354
  9. package/dist/core/types.d.ts.map +1 -1
  10. package/dist/core/types.js +21 -129
  11. package/dist/core/types.js.map +1 -1
  12. package/dist/generation/diagnostics.d.ts +5 -115
  13. package/dist/generation/diagnostics.d.ts.map +1 -1
  14. package/dist/generation/index.js +20 -77
  15. package/dist/generation/index.js.map +1 -1
  16. package/dist/index.cjs +189 -1458
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +108 -1347
  19. package/dist/index.js.map +1 -1
  20. package/dist/interfaces/value-extractor.d.ts +20 -0
  21. package/dist/interfaces/value-extractor.d.ts.map +1 -1
  22. package/dist/ir/explicit-parser.d.ts +2 -83
  23. package/dist/ir/explicit-parser.d.ts.map +1 -1
  24. package/dist/ir/explicit-renderer.d.ts +2 -31
  25. package/dist/ir/explicit-renderer.d.ts.map +1 -1
  26. package/dist/ir/index.js +89 -1260
  27. package/dist/ir/index.js.map +1 -1
  28. package/dist/ir/protocol-json.d.ts +2 -70
  29. package/dist/ir/protocol-json.d.ts.map +1 -1
  30. package/dist/ir/references.d.ts +2 -16
  31. package/dist/ir/references.d.ts.map +1 -1
  32. package/dist/ir/types.d.ts +2 -148
  33. package/dist/ir/types.d.ts.map +1 -1
  34. package/dist/parsing/index.js +19 -12
  35. package/dist/parsing/index.js.map +1 -1
  36. package/dist/schema/command-schema.d.ts +3 -92
  37. package/dist/schema/command-schema.d.ts.map +1 -1
  38. package/dist/schema/index.js +3 -20
  39. package/dist/schema/index.js.map +1 -1
  40. package/dist/testing/index.js +1066 -712
  41. package/dist/testing/index.js.map +1 -1
  42. package/package.json +6 -2
  43. package/src/core/types.ts +71 -600
  44. package/src/generation/diagnostics.ts +12 -233
  45. package/src/interfaces/value-extractor.ts +32 -0
  46. package/src/ir/explicit-parser.ts +12 -792
  47. package/src/ir/explicit-renderer.ts +2 -195
  48. package/src/ir/from-interchange.test.ts +91 -4
  49. package/src/ir/from-interchange.ts +59 -0
  50. package/src/ir/protocol-json.test.ts +16 -7
  51. package/src/ir/protocol-json.ts +9 -748
  52. package/src/ir/references.ts +2 -30
  53. package/src/ir/types.ts +18 -190
  54. package/src/schema/command-schema.ts +3 -134
@@ -1,73 +1,5 @@
1
1
  /**
2
- * Protocol JSON Serialization
3
- *
4
- * Converts between TypeScript SemanticNode (internal representation) and
5
- * the protocol wire format defined in protocol/spec/wire-format.md.
6
- *
7
- * `kind` is optional and defaults to `"command"` when absent.
8
- * `trigger` is accepted as convenience sugar for wrapping a command in an
9
- * event handler (e.g., `{ action: "toggle", trigger: { event: "click" } }`).
10
- *
11
- * The TypeScript layer is a superset of the protocol spec:
12
- * - TS has 5 node kinds; protocol has 3 (command, event-handler, compound)
13
- * - TS uses ReadonlyMap<SemanticRole, SemanticValue>; protocol uses plain Record
14
- * - TS SelectorValue has optional selectorKind; protocol preserves it when present (v1.1)
15
- * - TS has PropertyPathValue; protocol flattens it to expression
16
- * - TS conditional/loop nodes are losslessly encoded as command nodes with
17
- * thenBranch/elseBranch/loopVariant/loopBody/loopVariable/indexVariable fields (v1.1)
18
- * - v1.2 adds: annotations, diagnostics, try/catch/finally, async all/race,
19
- * match/arms, pipe chainType, and LSEEnvelope
20
- *
21
- * Use toProtocolJSON() to serialize for tool-to-tool interchange.
22
- * Use fromProtocolJSON() to deserialize from protocol-conformant sources.
2
+ * Protocol JSON Serialization — re-exported from @lokascript/intent
23
3
  */
24
- import type { SemanticNode, LSEEnvelope } from '../core/types';
25
- import type { ProtocolNodeJSON, IRDiagnostic, LSEEnvelopeJSON } from './types';
26
- /**
27
- * Serialize a SemanticNode to the protocol full-fidelity JSON wire format.
28
- *
29
- * TS-only node kinds are losslessly encoded as command nodes (v1.1):
30
- * - `conditional` → `command` with thenBranch/elseBranch arrays
31
- * - `loop` → `command` with loopVariant/loopBody/loopVariable/indexVariable fields
32
- *
33
- * v1.2 fields (annotations, diagnostics, try/catch/finally, async, match)
34
- * are serialized when present on the source node.
35
- *
36
- * TS-only value fields:
37
- * - `property-path` flattened to `expression` using extractValue()
38
- */
39
- export declare function toProtocolJSON(node: SemanticNode): ProtocolNodeJSON;
40
- /**
41
- * Deserialize a protocol wire format JSON object into a SemanticNode.
42
- *
43
- * Produces all 5 node kinds — detects v1.1/v1.2 fields on command nodes to
44
- * reconstruct appropriate node types:
45
- * - thenBranch present → `conditional` node via createConditionalNode()
46
- * - loopVariant present → `loop` node via createLoopNode()
47
- * - catchBranch/finallyBranch → try node via createTryNode() (v1.2)
48
- * - asyncVariant → async node via createAsyncNode() (v1.2)
49
- * - arms → match node via createMatchNode() (v1.2)
50
- *
51
- * Annotations and diagnostics (v1.2) are preserved on all node kinds.
52
- */
53
- export declare function fromProtocolJSON(json: ProtocolNodeJSON): SemanticNode;
54
- /**
55
- * Serialize an LSEEnvelope to its JSON wire format.
56
- */
57
- export declare function toEnvelopeJSON(envelope: LSEEnvelope): LSEEnvelopeJSON;
58
- /**
59
- * Deserialize an LSEEnvelopeJSON into an LSEEnvelope.
60
- */
61
- export declare function fromEnvelopeJSON(json: LSEEnvelopeJSON): LSEEnvelope;
62
- /**
63
- * Check whether an unknown JSON value is an LSE envelope (has lseVersion + nodes).
64
- */
65
- export declare function isEnvelope(json: unknown): json is LSEEnvelopeJSON;
66
- /**
67
- * Validate that an unknown value conforms to the protocol JSON format.
68
- * `kind` is optional (defaults to `"command"`). `trigger` is accepted as
69
- * convenience sugar for wrapping a command in an event handler.
70
- * Returns an array of diagnostics (empty array = valid).
71
- */
72
- export declare function validateProtocolJSON(json: unknown): IRDiagnostic[];
4
+ export { toProtocolJSON, fromProtocolJSON, validateProtocolJSON, toEnvelopeJSON, fromEnvelopeJSON, isEnvelope, } from '@lokascript/intent';
73
5
  //# sourceMappingURL=protocol-json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol-json.d.ts","sourceRoot":"","sources":["../../src/ir/protocol-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EACV,YAAY,EAUZ,WAAW,EACZ,MAAM,eAAe,CAAC;AAiBvB,OAAO,KAAK,EACV,gBAAgB,EAIhB,YAAY,EACZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAMjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAuGnE;AAsDD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,CA8GrE;AA8DD;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,eAAe,CASrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAMnE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,eAAe,CAQjE;AAmBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,EAAE,CA4QlE"}
1
+ {"version":3,"file":"protocol-json.d.ts","sourceRoot":"","sources":["../../src/ir/protocol-json.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,UAAU,GACX,MAAM,oBAAoB,CAAC"}
@@ -1,19 +1,5 @@
1
1
  /**
2
- * Reference Validation
3
- *
4
- * Configurable validation for reference values (me, you, it, result, etc.).
5
- * Domain DSLs can provide custom reference sets.
2
+ * Reference Validation — re-exported from @lokascript/intent
6
3
  */
7
- /**
8
- * Default set of valid references.
9
- * Covers the common hyperscript references; domain DSLs can extend or replace.
10
- */
11
- export declare const DEFAULT_REFERENCES: ReadonlySet<string>;
12
- /**
13
- * Check if a value is a valid reference name.
14
- *
15
- * @param value - The string to check
16
- * @param referenceSet - Custom reference set (defaults to DEFAULT_REFERENCES)
17
- */
18
- export declare function isValidReference(value: string, referenceSet?: ReadonlySet<string>): boolean;
4
+ export { DEFAULT_REFERENCES, isValidReference } from '@lokascript/intent';
19
5
  //# sourceMappingURL=references.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../src/ir/references.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAQjD,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,WAAW,CAAC,MAAM,CAAsB,GACrD,OAAO,CAET"}
1
+ {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../src/ir/references.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,151 +1,5 @@
1
1
  /**
2
- * IR (Intermediate Representation) Types
3
- *
4
- * Types for the explicit bracket syntax, LLM JSON format, and
5
- * schema-based validation. These are domain-agnostic — they work
6
- * for any DSL built on the framework.
2
+ * IR Types — re-exported from @lokascript/intent
7
3
  */
8
- import type { CommandSchema } from '../schema/command-schema';
9
- /**
10
- * Structured input format for LLMs.
11
- * No parsing ambiguity — action and roles are explicitly typed.
12
- *
13
- * @example
14
- * ```json
15
- * {
16
- * "action": "toggle",
17
- * "roles": { "patient": { "type": "selector", "value": ".active" } },
18
- * "trigger": { "event": "click" }
19
- * }
20
- * ```
21
- */
22
- export interface SemanticJSON {
23
- /** The command/action name */
24
- action: string;
25
- /** Named semantic roles with typed values */
26
- roles: Record<string, SemanticJSONValue>;
27
- /** Optional event trigger (wraps command in event handler) */
28
- trigger?: {
29
- event: string;
30
- modifiers?: Record<string, unknown>;
31
- };
32
- }
33
- /**
34
- * A typed value in the LLM JSON format.
35
- */
36
- export interface SemanticJSONValue {
37
- type: 'selector' | 'literal' | 'reference' | 'expression' | 'property-path' | 'flag';
38
- value: string | number | boolean;
39
- }
40
- /**
41
- * Interface for optional schema-based role validation in the explicit parser.
42
- * Consumers provide this to validate roles against command definitions.
43
- *
44
- * When not provided, the parser accepts any role names.
45
- */
46
- export interface SchemaLookup {
47
- getSchema(action: string): CommandSchema | undefined;
48
- }
49
- /**
50
- * Options for parseExplicit().
51
- */
52
- export interface ParseExplicitOptions {
53
- /** Optional schema lookup for role validation */
54
- schemaLookup?: SchemaLookup;
55
- /** Custom set of valid reference names (defaults to DEFAULT_REFERENCES) */
56
- referenceSet?: ReadonlySet<string>;
57
- /**
58
- * When true, validation errors are collected as diagnostics on the
59
- * returned node instead of throwing. Fatal parse errors (missing brackets,
60
- * empty input) still throw. Default: false.
61
- */
62
- collectDiagnostics?: boolean;
63
- }
64
- /**
65
- * A diagnostic message from IR validation.
66
- *
67
- * Uses required `code` field (compatible with both framework Diagnostic
68
- * and compilation-service Diagnostic types via structural typing).
69
- */
70
- export interface IRDiagnostic {
71
- severity: 'error' | 'warning' | 'info';
72
- code: string;
73
- message: string;
74
- suggestion?: string;
75
- }
76
- export type ProtocolNodeKind = 'command' | 'event-handler' | 'compound';
77
- export type ProtocolChainType = 'then' | 'and' | 'async' | 'sequential' | 'pipe';
78
- /**
79
- * A typed semantic value in the protocol full-fidelity JSON format.
80
- * Matches protocol/spec/wire-format.md "Value Shapes" table.
81
- */
82
- export interface ProtocolValueJSON {
83
- type: 'selector' | 'literal' | 'reference' | 'expression' | 'property-path' | 'flag';
84
- value?: string | number | boolean;
85
- dataType?: 'string' | 'number' | 'boolean' | 'duration';
86
- raw?: string;
87
- name?: string;
88
- enabled?: boolean;
89
- selectorKind?: 'id' | 'class' | 'attribute' | 'element' | 'complex';
90
- }
91
- /**
92
- * Protocol JSON node — matches protocol/spec/wire-format.md.
93
- * Produced by toProtocolJSON() and consumed by fromProtocolJSON().
94
- *
95
- * `kind` defaults to `"command"` when omitted.
96
- * `trigger` is convenience sugar that wraps a command in an event handler.
97
- */
98
- export interface ProtocolNodeJSON {
99
- kind?: ProtocolNodeKind;
100
- action: string;
101
- roles: Record<string, ProtocolValueJSON>;
102
- trigger?: {
103
- event: string;
104
- modifiers?: Record<string, unknown>;
105
- };
106
- body?: ProtocolNodeJSON[];
107
- statements?: ProtocolNodeJSON[];
108
- chainType?: ProtocolChainType;
109
- thenBranch?: ProtocolNodeJSON[];
110
- elseBranch?: ProtocolNodeJSON[];
111
- loopVariant?: 'forever' | 'times' | 'for' | 'while' | 'until';
112
- loopBody?: ProtocolNodeJSON[];
113
- loopVariable?: string;
114
- indexVariable?: string;
115
- diagnostics?: ProtocolDiagnosticJSON[];
116
- annotations?: AnnotationJSON[];
117
- catchBranch?: ProtocolNodeJSON[];
118
- finallyBranch?: ProtocolNodeJSON[];
119
- asyncVariant?: 'all' | 'race';
120
- asyncBody?: ProtocolNodeJSON[];
121
- arms?: MatchArmJSON[];
122
- defaultArm?: ProtocolNodeJSON[];
123
- }
124
- /** A diagnostic in protocol wire format (v1.2, extended v1.2.1). */
125
- export interface ProtocolDiagnosticJSON {
126
- level: 'error' | 'warning' | 'info';
127
- role?: string;
128
- message: string;
129
- code?: string;
130
- /** v1.2.1: source parser/stage that produced this diagnostic. */
131
- source?: string;
132
- /** v1.2.1: actionable fix suggestions. */
133
- suggestions?: string[];
134
- }
135
- /** A metadata annotation in protocol wire format (v1.2). */
136
- export interface AnnotationJSON {
137
- name: string;
138
- value?: string;
139
- }
140
- /** A match arm in protocol wire format (v1.2). */
141
- export interface MatchArmJSON {
142
- pattern: ProtocolValueJSON;
143
- body: ProtocolNodeJSON[];
144
- }
145
- /** Versioned envelope for multi-node LSE documents (v1.2). */
146
- export interface LSEEnvelopeJSON {
147
- lseVersion: string;
148
- features?: string[];
149
- nodes: ProtocolNodeJSON[];
150
- }
4
+ export type { SemanticJSON, SemanticJSONValue, SchemaLookup, ParseExplicitOptions, IRDiagnostic, ProtocolNodeKind, ProtocolChainType, ProtocolValueJSON, ProtocolNodeJSON, ProtocolDiagnosticJSON, AnnotationJSON, MatchArmJSON, LSEEnvelopeJSON, } from '@lokascript/intent';
151
5
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ir/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAM9D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACzC,8DAA8D;IAC9D,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,GAAG,MAAM,CAAC;IACrF,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAClC;AAMD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,YAAY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K,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,gBAAgB,EAAE,CAAC;CAC1B;AAED,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ir/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
@@ -1,16 +1,23 @@
1
1
  // src/core/types.ts
2
- function createLiteral(value, dataType) {
3
- return dataType ? { type: "literal", value, dataType } : { type: "literal", value };
4
- }
5
- function createSelector(value, selectorKind) {
6
- return selectorKind ? { type: "selector", value, selectorKind } : { type: "selector", value };
7
- }
8
- function createReference(value) {
9
- return { type: "reference", value };
10
- }
11
- function createPropertyPath(object, property) {
12
- return { type: "property-path", object, property };
13
- }
2
+ import {
3
+ createLiteral,
4
+ createSelector,
5
+ createReference,
6
+ createPropertyPath,
7
+ createExpression,
8
+ createFlag,
9
+ createCommandNode,
10
+ createEventHandlerNode,
11
+ createConditionalNode,
12
+ createCompoundNode,
13
+ createLoopNode,
14
+ createTryNode,
15
+ createAsyncNode,
16
+ createMatchNode,
17
+ extractValue,
18
+ extractRoleValue,
19
+ getRoleValue
20
+ } from "@lokascript/intent";
14
21
 
15
22
  // src/core/logger.ts
16
23
  var DebugLogger = class {