@continuum-dev/contract 0.1.1-alpha.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.
@@ -0,0 +1,349 @@
1
+ # Continuum Contract Reference
2
+
3
+ This is the canonical deep reference for `@continuum-dev/contract`.
4
+
5
+ `@continuum-dev/contract` is intentionally a zero-dependency package of shared contracts and constants. It defines the type system used by Continuum packages to preserve user state while views evolve.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Package Surface](#package-surface)
10
+ - [Core Domain Model](#core-domain-model)
11
+ - [Relationship Map](#relationship-map)
12
+ - [Lifecycle Context](#lifecycle-context)
13
+ - [View Contracts AST](#view-contracts-ast)
14
+ - [Data Contracts State](#data-contracts-state)
15
+ - [Interaction and Intent Contracts](#interaction-and-intent-contracts)
16
+ - [Constants](#constants)
17
+ - [Invariants](#invariants)
18
+ - [Import Pattern](#import-pattern)
19
+
20
+ ## Package Surface
21
+
22
+ Public exports are re-exported from `src/index.ts`:
23
+
24
+ - `./lib/continuity-snapshot.js`
25
+ - `./lib/view-definition.js`
26
+ - `./lib/data-snapshot.js`
27
+ - `./lib/interactions.js`
28
+ - `./lib/constants.js`
29
+
30
+ ## Core Domain Model
31
+
32
+ - `ViewDefinition` defines the versioned UI structure.
33
+ - `DataSnapshot` stores user-owned runtime values and lineage.
34
+ - `ContinuitySnapshot` is the atomic pairing of `view` and `data`.
35
+ - `Interaction`, `PendingIntent`, and `Checkpoint` describe events and recoverability.
36
+ - constants in `constants.ts` provide stable vocabularies.
37
+
38
+ ## Relationship Map
39
+
40
+ How the contracts connect in practice:
41
+
42
+ ```text
43
+ ContinuitySnapshot
44
+ |- view: ViewDefinition
45
+ | `- nodes: ViewNode[]
46
+ | |- FieldNode (data-bearing)
47
+ | |- GroupNode -> children: ViewNode[]
48
+ | |- CollectionNode -> template: ViewNode
49
+ | |- RowNode -> children: ViewNode[]
50
+ | |- GridNode -> children: ViewNode[]
51
+ | |- ActionNode (intent trigger)
52
+ | `- PresentationNode (read-only content)
53
+ `- data: DataSnapshot
54
+ |- values: Record<nodeId, NodeValue>
55
+ |- detachedValues: Record<nodeId, DetachedValue>
56
+ |- lineage: SnapshotLineage
57
+ |- valueLineage: Record<nodeId, ValueLineage>
58
+ `- viewContext: Record<nodeId, ViewportState>
59
+
60
+ Checkpoint
61
+ `- snapshot: ContinuitySnapshot
62
+
63
+ Interaction
64
+ `- type: InteractionType
65
+
66
+ PendingIntent
67
+ `- status: IntentStatus
68
+ ```
69
+
70
+ Identity rules that make the model work:
71
+
72
+ - `ViewDefinition.nodes[*].id` is the primary key for `DataSnapshot.values`.
73
+ - `key` is optional at the type level, but should be adopted as a production convention for stable semantic identity across versions/migrations.
74
+ - `viewId` + `version` identify one concrete shape of the view.
75
+ - `DataSnapshot.lineage.viewVersion` ties captured data back to the view revision.
76
+
77
+ Example of `id` vs `key` in action:
78
+
79
+ - prior view node: `{ id: "email_input", key: "user.email", type: "field" }`
80
+ - new view node: `{ id: "row_1/email_input", key: "user.email", type: "field" }`
81
+
82
+ Even though the structural `id` changed, the stable `key` allows continuity logic to carry the existing user value to the new node.
83
+
84
+ `key` adoption guidance:
85
+
86
+ - treat `key` as required-by-convention for continuity-critical nodes
87
+ - use stable semantic keys (for example `applicant.fullName`) rather than layout-derived keys
88
+ - keep `key` stable across restructures and only change it when semantics truly change
89
+ - prefer `id` for per-version addressing and `key` for cross-version matching
90
+
91
+ ## Lifecycle Context
92
+
93
+ Typical runtime sequence:
94
+
95
+ 1. The system receives or generates a `ViewDefinition`.
96
+ 2. User edits are stored in `DataSnapshot.values[nodeId]` as `NodeValue`.
97
+ 3. Current structure + state are persisted/transferred as one `ContinuitySnapshot`.
98
+ 4. User/system actions are recorded as `Interaction` events.
99
+ 5. Deferred commands are tracked as `PendingIntent` and moved through `INTENT_STATUS`.
100
+ 6. Durable restore points are captured as `Checkpoint` objects.
101
+ 7. When the view changes:
102
+ - compatible values stay in `values`
103
+ - migrated values are transformed using consumer logic
104
+ - incompatible or removed values move to `detachedValues` instead of being lost
105
+
106
+ Why this separation matters:
107
+
108
+ - the AI can safely mutate layout (`ViewDefinition`) without directly mutating user data
109
+ - user intent remains auditable via lineage and interaction history
110
+ - data survives hallucinated or transient schema changes through detachment/restoration
111
+
112
+ ## View Contracts AST
113
+
114
+ `ViewDefinition`:
115
+
116
+ ```ts
117
+ interface ViewDefinition {
118
+ viewId: string;
119
+ version: string;
120
+ nodes: ViewNode[];
121
+ }
122
+ ```
123
+
124
+ `ViewNode` is a discriminated union:
125
+
126
+ ```ts
127
+ type ViewNode =
128
+ | FieldNode
129
+ | GroupNode
130
+ | CollectionNode
131
+ | ActionNode
132
+ | PresentationNode
133
+ | RowNode
134
+ | GridNode;
135
+ ```
136
+
137
+ Shared node shape:
138
+
139
+ ```ts
140
+ interface BaseNode {
141
+ id: string;
142
+ type: string;
143
+ key?: string;
144
+ hidden?: boolean;
145
+ hash?: string;
146
+ migrations?: MigrationRule[];
147
+ }
148
+ ```
149
+
150
+ ```ts
151
+ interface FieldOption {
152
+ value: string;
153
+ label: string;
154
+ }
155
+ ```
156
+
157
+ BaseNode properties and why they matter:
158
+
159
+ - `id`: required structural identifier used for per-version addressing.
160
+ - `key`: semantic identity for cross-version matching; optional by type, recommended by convention.
161
+ - `hash`: node fingerprint for compatibility checks when structure or constraints change.
162
+ - `migrations`: allowed hash transitions and strategy hints for safe data transformation.
163
+
164
+ Traversal helper:
165
+
166
+ ```ts
167
+ function getChildNodes(node: ViewNode): ViewNode[];
168
+ ```
169
+
170
+ ## Data Contracts State
171
+
172
+ ```ts
173
+ interface DataSnapshot {
174
+ values: Record<string, NodeValue>;
175
+ viewContext?: Record<string, ViewContext>;
176
+ lineage: SnapshotLineage;
177
+ valueLineage?: Record<string, ValueLineage>;
178
+ detachedValues?: Record<string, DetachedValue>;
179
+ }
180
+ ```
181
+
182
+ ```ts
183
+ interface NodeValue<T = unknown> {
184
+ value: T;
185
+ suggestion?: T;
186
+ isDirty?: boolean;
187
+ isValid?: boolean;
188
+ }
189
+ ```
190
+
191
+ ```ts
192
+ interface CollectionItemState {
193
+ values: Record<string, NodeValue>;
194
+ }
195
+
196
+ interface CollectionNodeState {
197
+ items: CollectionItemState[];
198
+ }
199
+ ```
200
+
201
+ ```ts
202
+ interface ViewportState {
203
+ scrollX?: number;
204
+ scrollY?: number;
205
+ zoom?: number;
206
+ offsetX?: number;
207
+ offsetY?: number;
208
+ isExpanded?: boolean;
209
+ isFocused?: boolean;
210
+ }
211
+ ```
212
+
213
+ ```ts
214
+ type ViewContext = ViewportState;
215
+ ```
216
+
217
+ ```ts
218
+ interface DetachedValue {
219
+ value: unknown;
220
+ previousNodeType: string;
221
+ key?: string;
222
+ detachedAt: number;
223
+ viewVersion: string;
224
+ reason: 'node-removed' | 'type-mismatch' | 'migration-failed';
225
+ pushesSinceDetach?: number;
226
+ }
227
+ ```
228
+
229
+ ```ts
230
+ interface DetachedValuePolicy {
231
+ maxAge?: number;
232
+ maxCount?: number;
233
+ pushCount?: number;
234
+ }
235
+ ```
236
+
237
+ ```ts
238
+ interface ProposedValue {
239
+ nodeId: string;
240
+ proposedValue: NodeValue;
241
+ currentValue: NodeValue;
242
+ proposedAt: number;
243
+ source?: string;
244
+ }
245
+ ```
246
+
247
+ ```ts
248
+ interface ActionRegistration {
249
+ label: string;
250
+ description?: string;
251
+ icon?: string;
252
+ }
253
+ ```
254
+
255
+ ```ts
256
+ interface ActionContext {
257
+ intentId: string;
258
+ snapshot: DataSnapshot;
259
+ nodeId: string;
260
+ }
261
+ ```
262
+
263
+ ```ts
264
+ type ActionHandler = (context: ActionContext) => void | Promise<void>;
265
+ ```
266
+
267
+ How these state types are typically used:
268
+
269
+ - `ViewportState` tracks UI-only state and is aliased by `ViewContext`.
270
+ - `DetachedValuePolicy` configures cleanup of detached data by age, count, or push count.
271
+ - `ProposedValue` models AI suggestions versus current user values for conflict-aware UX.
272
+ - `ActionRegistration`, `ActionContext`, and `ActionHandler` define action metadata and execution context.
273
+
274
+ ## Interaction and Intent Contracts
275
+
276
+ ```ts
277
+ interface Interaction {
278
+ interactionId: string;
279
+ sessionId: string;
280
+ nodeId: string;
281
+ type: InteractionType;
282
+ payload: unknown;
283
+ timestamp: number;
284
+ viewVersion: string;
285
+ }
286
+ ```
287
+
288
+ ```ts
289
+ interface PendingIntent {
290
+ intentId: string;
291
+ nodeId: string;
292
+ intentName: string;
293
+ payload: unknown;
294
+ queuedAt: number;
295
+ viewVersion: string;
296
+ status: IntentStatus;
297
+ }
298
+ ```
299
+
300
+ ```ts
301
+ interface Checkpoint {
302
+ checkpointId: string;
303
+ sessionId: string;
304
+ snapshot: ContinuitySnapshot;
305
+ eventIndex: number;
306
+ timestamp: number;
307
+ trigger: 'auto' | 'manual';
308
+ }
309
+ ```
310
+
311
+ ## Constants
312
+
313
+ The package exports `as const` vocabularies and derived unions:
314
+
315
+ - `ISSUE_CODES` / `IssueCode`
316
+ - `DATA_RESOLUTIONS` / `DataResolution`
317
+ - `VIEW_DIFFS` / `ViewDiff`
318
+ - `ISSUE_SEVERITY` / `IssueSeverity`
319
+ - `INTERACTION_TYPES` / `InteractionType`
320
+ - `INTENT_STATUS` / `IntentStatus`
321
+
322
+ ## Invariants
323
+
324
+ - `DataSnapshot.values` keys should map to active nodes unless detached.
325
+ - `id` is required for all nodes; `key` remains optional in the schema but is recommended for production continuity guarantees.
326
+ - `PendingIntent.status` must be from `INTENT_STATUS`.
327
+ - `DetachedValue.reason` must be one of `node-removed`, `type-mismatch`, `migration-failed`.
328
+ - `ViewNode.type` must match the concrete node shape.
329
+
330
+ ## Import Pattern
331
+
332
+ Import from the package root only:
333
+
334
+ ```ts
335
+ import {
336
+ ViewDefinition,
337
+ DataSnapshot,
338
+ ContinuitySnapshot,
339
+ NodeValue,
340
+ DetachedValue,
341
+ ISSUE_CODES,
342
+ } from '@continuum-dev/contract';
343
+ ```
344
+
345
+ ## Related Docs
346
+
347
+ - Package overview and examples: `README.md`
348
+ - Source type modules: `src/lib/*.ts`
349
+
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CooperContinuum
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # @continuum-dev/contract
2
+
3
+ **The foundational type system for AI-generated UI continuity.**
4
+
5
+ When building agentic UIs, teams eventually hit the re-render problem: when an AI agent streams a new schema or layout, the frontend remounts and local user input gets lost.
6
+
7
+ `@continuum-dev/contract` defines a strict boundary between **View** (AI-owned structure) and **Data** (user-owned state). This package is zero-dependency and contains the shared TypeScript contracts used across the Continuum ecosystem.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @continuum-dev/contract
13
+ ```
14
+
15
+ ## The Mental Model
16
+
17
+ Continuum uses three core contracts:
18
+
19
+ - `ViewDefinition` (AI-owned): a versioned tree describing UI structure.
20
+ - `DataSnapshot` (user-owned): a flat dictionary of user state keyed by node id.
21
+ - `ContinuitySnapshot`: the atomic pairing of `view` and `data`.
22
+
23
+ Because data is flat and separate from the tree, views can be restructured without losing user input.
24
+
25
+ ## Node Identity Guidance (`id` and `key`)
26
+
27
+ - `id` is required and is the primary lookup key for `DataSnapshot.values`.
28
+ - `key` is optional in the type system, but should be adopted in production for stable semantic identity across view versions.
29
+ - If AI-generated views can rename or regenerate node ids, `key` is what allows reliable matching and data carry/migration.
30
+ - Recommended practice: include `key` on all data-bearing nodes (`FieldNode`) and on structural nodes that need continuity-aware matching.
31
+
32
+ ## The Secret Sauce: `NodeValue`
33
+
34
+ In Continuum, values are collaborative, not raw primitives:
35
+
36
+ ```ts
37
+ interface NodeValue<T = unknown> {
38
+ value: T;
39
+ suggestion?: T;
40
+ isDirty?: boolean;
41
+ isValid?: boolean;
42
+ }
43
+ ```
44
+
45
+ - `suggestion` lets AI propose alternatives.
46
+ - `isDirty` protects user-edited values from accidental overwrite.
47
+ - `isValid` tracks compatibility with current constraints.
48
+
49
+ ## No Data Left Behind: `DetachedValue`
50
+
51
+ If a view update removes or changes a node incompatibly, data is preserved in `detachedValues`:
52
+
53
+ ```ts
54
+ interface DetachedValue {
55
+ value: unknown;
56
+ previousNodeType: string;
57
+ reason: 'node-removed' | 'type-mismatch' | 'migration-failed';
58
+ }
59
+ ```
60
+
61
+ If the node returns in a compatible form, data can be restored.
62
+
63
+ ## Minimal Example
64
+
65
+ ```ts
66
+ import {
67
+ ViewDefinition,
68
+ DataSnapshot,
69
+ ContinuitySnapshot,
70
+ } from '@continuum-dev/contract';
71
+
72
+ const view: ViewDefinition = {
73
+ viewId: 'loan-application',
74
+ version: '2.1.0',
75
+ nodes: [
76
+ {
77
+ id: 'fullName',
78
+ type: 'field',
79
+ dataType: 'string',
80
+ label: 'Full Name',
81
+ key: 'applicant.fullName',
82
+ constraints: { required: true, minLength: 2 },
83
+ },
84
+ ],
85
+ };
86
+
87
+ const data: DataSnapshot = {
88
+ values: {
89
+ fullName: {
90
+ value: 'Jordan Lee',
91
+ isDirty: true,
92
+ isValid: true,
93
+ },
94
+ },
95
+ lineage: {
96
+ timestamp: 1740700800000,
97
+ sessionId: 'sess-123',
98
+ viewId: view.viewId,
99
+ viewVersion: view.version,
100
+ },
101
+ };
102
+
103
+ const snapshot: ContinuitySnapshot = {
104
+ view,
105
+ data,
106
+ };
107
+ ```
108
+
109
+ ## API Quick Reference
110
+
111
+ Import everything from the package root:
112
+
113
+ ```ts
114
+ import {
115
+ ViewDefinition,
116
+ ViewNode,
117
+ DataSnapshot,
118
+ ContinuitySnapshot,
119
+ NodeValue,
120
+ ProposedValue,
121
+ DetachedValue,
122
+ ViewportState,
123
+ ActionHandler,
124
+ ActionContext,
125
+ ISSUE_CODES,
126
+ DATA_RESOLUTIONS,
127
+ VIEW_DIFFS,
128
+ INTERACTION_TYPES,
129
+ INTENT_STATUS,
130
+ } from '@continuum-dev/contract';
131
+ ```
132
+
133
+ **Core types:**
134
+
135
+ * `ViewDefinition`: root AST for generated UI.
136
+ * `ViewNode`: discriminated union of supported node types.
137
+ * `DataSnapshot`: user-owned runtime state.
138
+ * `ContinuitySnapshot`: atomic `ViewDefinition + DataSnapshot`.
139
+
140
+ **State primitives:**
141
+
142
+ * `NodeValue<T>`: value wrapper with collaboration metadata.
143
+ * `ProposedValue`: models AI suggestions alongside current user values for conflict resolution.
144
+ * `DetachedValue`: preserved state for removed or incompatible nodes.
145
+ * `ViewportState`: UI interaction state (scroll/focus/zoom/offset).
146
+
147
+ **Actions:**
148
+
149
+ * `ActionHandler`: execution contract for UI intents (`(context: ActionContext) => void | Promise<void>`).
150
+ * `ActionContext`: runtime context passed to handlers containing the intent ID, node ID, and current snapshot.
151
+
152
+ **Constants:**
153
+
154
+ * `ISSUE_CODES`: reconciliation issue taxonomy.
155
+ * `DATA_RESOLUTIONS`: value reconciliation outcomes.
156
+ * `VIEW_DIFFS`: structural diff labels.
157
+ * `INTERACTION_TYPES`: canonical interaction event categories.
158
+ * `INTENT_STATUS`: pending intent lifecycle states.
159
+
160
+ ## Deep Dive Reference
161
+
162
+ For the complete breakdown of all node types, constraints, constants, and migration contracts, see [Comprehensive Contract Reference](./CONTRACT_REFERENCE.md).
163
+
164
+ ## Ecosystem
165
+
166
+ This package defines the vocabulary. Other Continuum packages provide runtime behavior:
167
+
168
+ - `@continuum-dev/runtime`: stateless reconciliation engine.
169
+ - `@continuum-dev/session`: stateful session memory, history, and checkpoints.
170
+ - `@continuum-dev/react`: headless React layer for UI binding.
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from './lib/continuity-snapshot.js';
2
+ export * from './lib/view-definition.js';
3
+ export * from './lib/data-snapshot.js';
4
+ export * from './lib/interactions.js';
5
+ export * from './lib/constants.js';
6
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/contract/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './lib/continuity-snapshot.js';
2
+ export * from './lib/view-definition.js';
3
+ export * from './lib/data-snapshot.js';
4
+ export * from './lib/interactions.js';
5
+ export * from './lib/constants.js';
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Canonical issue taxonomy for reconciliation, validation, and view analysis.
3
+ */
4
+ export declare const ISSUE_CODES: {
5
+ readonly NO_PRIOR_DATA: "NO_PRIOR_DATA";
6
+ readonly NO_PRIOR_VIEW: "NO_PRIOR_VIEW";
7
+ readonly TYPE_MISMATCH: "TYPE_MISMATCH";
8
+ readonly NODE_REMOVED: "NODE_REMOVED";
9
+ readonly MIGRATION_FAILED: "MIGRATION_FAILED";
10
+ readonly UNVALIDATED_CARRY: "UNVALIDATED_CARRY";
11
+ readonly VALIDATION_FAILED: "VALIDATION_FAILED";
12
+ readonly UNKNOWN_NODE: "UNKNOWN_NODE";
13
+ readonly DUPLICATE_NODE_ID: "DUPLICATE_NODE_ID";
14
+ readonly DUPLICATE_NODE_KEY: "DUPLICATE_NODE_KEY";
15
+ readonly VIEW_CHILD_CYCLE_DETECTED: "VIEW_CHILD_CYCLE_DETECTED";
16
+ readonly VIEW_MAX_DEPTH_EXCEEDED: "VIEW_MAX_DEPTH_EXCEEDED";
17
+ readonly COLLECTION_CONSTRAINT_VIOLATED: "COLLECTION_CONSTRAINT_VIOLATED";
18
+ readonly SCOPE_COLLISION: "SCOPE_COLLISION";
19
+ };
20
+ /**
21
+ * Union of all supported issue code literals.
22
+ */
23
+ export type IssueCode = (typeof ISSUE_CODES)[keyof typeof ISSUE_CODES];
24
+ /**
25
+ * Outcomes for how a value was handled during reconciliation.
26
+ */
27
+ export declare const DATA_RESOLUTIONS: {
28
+ readonly CARRIED: "carried";
29
+ readonly MIGRATED: "migrated";
30
+ readonly DETACHED: "detached";
31
+ readonly ADDED: "added";
32
+ readonly RESTORED: "restored";
33
+ };
34
+ /**
35
+ * Union of all supported data resolution literals.
36
+ */
37
+ export type DataResolution = (typeof DATA_RESOLUTIONS)[keyof typeof DATA_RESOLUTIONS];
38
+ /**
39
+ * Node-level structural change classifications between view revisions.
40
+ */
41
+ export declare const VIEW_DIFFS: {
42
+ readonly ADDED: "added";
43
+ readonly REMOVED: "removed";
44
+ readonly MIGRATED: "migrated";
45
+ readonly TYPE_CHANGED: "type-changed";
46
+ readonly RESTORED: "restored";
47
+ };
48
+ /**
49
+ * Union of all supported view diff literals.
50
+ */
51
+ export type ViewDiff = (typeof VIEW_DIFFS)[keyof typeof VIEW_DIFFS];
52
+ /**
53
+ * Severity levels for reported issues.
54
+ */
55
+ export declare const ISSUE_SEVERITY: {
56
+ readonly ERROR: "error";
57
+ readonly WARNING: "warning";
58
+ readonly INFO: "info";
59
+ };
60
+ /**
61
+ * Union of all supported issue severity literals.
62
+ */
63
+ export type IssueSeverity = (typeof ISSUE_SEVERITY)[keyof typeof ISSUE_SEVERITY];
64
+ /**
65
+ * Canonical interaction categories for event producers/consumers.
66
+ */
67
+ export declare const INTERACTION_TYPES: {
68
+ readonly DATA_UPDATE: "data-update";
69
+ readonly VALUE_CHANGE: "value-change";
70
+ readonly VIEW_CONTEXT_CHANGE: "view-context-change";
71
+ };
72
+ /**
73
+ * Union of all supported interaction type literals.
74
+ */
75
+ export type InteractionType = (typeof INTERACTION_TYPES)[keyof typeof INTERACTION_TYPES];
76
+ /**
77
+ * Runtime type guard for {@link InteractionType}.
78
+ */
79
+ export declare function isInteractionType(value: unknown): value is InteractionType;
80
+ /**
81
+ * Lifecycle states for queued intents.
82
+ */
83
+ export declare const INTENT_STATUS: {
84
+ readonly PENDING: "pending";
85
+ readonly VALIDATED: "validated";
86
+ readonly STALE: "stale";
87
+ readonly CANCELLED: "cancelled";
88
+ };
89
+ /**
90
+ * Union of all supported intent status literals.
91
+ */
92
+ export type IntentStatus = (typeof INTENT_STATUS)[keyof typeof INTENT_STATUS];
93
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../packages/contract/src/lib/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;CAed,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAEtF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEjF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAIzF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC"}