@qontinui/shared-types 0.2.1 → 0.2.3

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 @@
1
+ //# sourceMappingURL=tauri-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -294,6 +294,58 @@ interface IRTransition {
294
294
  * way. The adapter rejects documents whose version it does not understand.
295
295
  */
296
296
  type IRVersion = "1.0";
297
+ /**
298
+ * Axes that the spec <-> IR pairing gate compares. A document's
299
+ * `pairingPolicy.acceptDrift.axes` lists which of these are
300
+ * intentionally allowed to diverge between the legacy spec and the
301
+ * IR's forward projection.
302
+ */
303
+ type IRPairingAxis = "groupCount" | "groupIds" | "assertionCount";
304
+ /**
305
+ * Per-document opt-out for specific spec<->IR pairing axes.
306
+ *
307
+ * The canonical use case is a hand-authored IR that uses a different
308
+ * grouping convention than the legacy spec. Without an explicit policy
309
+ * the pairing gate flags it as a mismatch on every PR, which trains
310
+ * reviewers to ignore the gate. The policy makes the divergence
311
+ * explicit and audit-friendly:
312
+ *
313
+ * - `axes` — which fingerprint comparisons to skip
314
+ * - `reason` — human-readable justification (required, surfaced in
315
+ * `check-spec-pairing` summary output)
316
+ * - `since` — ISO date (YYYY-MM-DD) the exemption was added
317
+ * - `expiresAt` — optional ISO date (YYYY-MM-DD) after which the
318
+ * exemption stops applying. Forces periodic
319
+ * re-justification: the pairing gate downgrades
320
+ * expired exemptions back to ordinary mismatches.
321
+ *
322
+ * Mismatches NOT covered by the listed `axes` still fail the gate as
323
+ * usual — you can accept drift on `groupCount` while still requiring
324
+ * the assertion total to match.
325
+ */
326
+ interface IRAcceptDriftPolicy {
327
+ /** Fingerprint axes whose mismatches are tolerated. */
328
+ axes: IRPairingAxis[];
329
+ /** Human-readable justification for the exemption. */
330
+ reason: string;
331
+ /** ISO date (YYYY-MM-DD) the exemption was added. */
332
+ since: string;
333
+ /**
334
+ * Optional ISO date (YYYY-MM-DD) after which the exemption stops
335
+ * applying. The pairing gate then surfaces the document as an
336
+ * ordinary mismatch.
337
+ */
338
+ expiresAt?: string;
339
+ }
340
+ /**
341
+ * Per-document pairing policy block. Currently only carries
342
+ * `acceptDrift`; future policies (e.g. assertion-shape exemptions)
343
+ * can extend this without breaking the IR schema.
344
+ */
345
+ interface IRPairingPolicy {
346
+ /** Opt-out from specific spec<->IR pairing mismatch axes. */
347
+ acceptDrift?: IRAcceptDriftPolicy;
348
+ }
297
349
  /**
298
350
  * Top-level IR document.
299
351
  */
@@ -310,6 +362,12 @@ interface IRDocument {
310
362
  metadata?: IRMetadata;
311
363
  /** Where this document came from. */
312
364
  provenance?: IRProvenance;
365
+ /**
366
+ * Per-document policy block — opt-out from specific spec<->IR
367
+ * pairing mismatches. Used by hand-authored IRs that intentionally
368
+ * diverge from the legacy spec shape.
369
+ */
370
+ pairingPolicy?: IRPairingPolicy;
313
371
  /** State declarations within this document. */
314
372
  states: IRState[];
315
373
  /** Transition declarations within this document. */
@@ -817,4 +875,4 @@ interface ProjectLegacyToIROptions {
817
875
  */
818
876
  declare function projectLegacyToIR(legacy: LegacySpec, opts?: ProjectLegacyToIROptions): IRDocument;
819
877
 
820
- export { type AdaptedState, type AdaptedTransition, type AdaptedTransitionAction, type AdaptedWaitAfter, type AdaptedWorkflowConfig, type IRCrossRef, type IRDocument, type IREffect, type IRElementCriteria, type IRMetadata, type IRProvenance, type IRState, type IRStateCondition, type IRTransition, type IRTransitionAction, type IRVersion, type IRVisualRef, type IRWaitSpec, type LegacyAssertion, type LegacyAssertionTarget, type LegacyCriteria, type LegacyGroup, type LegacyMetadata, type LegacyProcessStep, type LegacySpec, type LegacyStateMachine, type LegacyStateMachineState, type LegacyTransition, type ProjectLegacyToIROptions, adaptIRDocumentToWorkflowConfig, adaptIRState, adaptIRTransition, adaptIRTransitionAction, projectIRToBundledPage, projectLegacyToIR, projectionVersion };
878
+ export { type AdaptedState, type AdaptedTransition, type AdaptedTransitionAction, type AdaptedWaitAfter, type AdaptedWorkflowConfig, type IRAcceptDriftPolicy, type IRCrossRef, type IRDocument, type IREffect, type IRElementCriteria, type IRMetadata, type IRPairingAxis, type IRPairingPolicy, type IRProvenance, type IRState, type IRStateCondition, type IRTransition, type IRTransitionAction, type IRVersion, type IRVisualRef, type IRWaitSpec, type LegacyAssertion, type LegacyAssertionTarget, type LegacyCriteria, type LegacyGroup, type LegacyMetadata, type LegacyProcessStep, type LegacySpec, type LegacyStateMachine, type LegacyStateMachineState, type LegacyTransition, type ProjectLegacyToIROptions, adaptIRDocumentToWorkflowConfig, adaptIRState, adaptIRTransition, adaptIRTransitionAction, projectIRToBundledPage, projectLegacyToIR, projectionVersion };
@@ -294,6 +294,58 @@ interface IRTransition {
294
294
  * way. The adapter rejects documents whose version it does not understand.
295
295
  */
296
296
  type IRVersion = "1.0";
297
+ /**
298
+ * Axes that the spec <-> IR pairing gate compares. A document's
299
+ * `pairingPolicy.acceptDrift.axes` lists which of these are
300
+ * intentionally allowed to diverge between the legacy spec and the
301
+ * IR's forward projection.
302
+ */
303
+ type IRPairingAxis = "groupCount" | "groupIds" | "assertionCount";
304
+ /**
305
+ * Per-document opt-out for specific spec<->IR pairing axes.
306
+ *
307
+ * The canonical use case is a hand-authored IR that uses a different
308
+ * grouping convention than the legacy spec. Without an explicit policy
309
+ * the pairing gate flags it as a mismatch on every PR, which trains
310
+ * reviewers to ignore the gate. The policy makes the divergence
311
+ * explicit and audit-friendly:
312
+ *
313
+ * - `axes` — which fingerprint comparisons to skip
314
+ * - `reason` — human-readable justification (required, surfaced in
315
+ * `check-spec-pairing` summary output)
316
+ * - `since` — ISO date (YYYY-MM-DD) the exemption was added
317
+ * - `expiresAt` — optional ISO date (YYYY-MM-DD) after which the
318
+ * exemption stops applying. Forces periodic
319
+ * re-justification: the pairing gate downgrades
320
+ * expired exemptions back to ordinary mismatches.
321
+ *
322
+ * Mismatches NOT covered by the listed `axes` still fail the gate as
323
+ * usual — you can accept drift on `groupCount` while still requiring
324
+ * the assertion total to match.
325
+ */
326
+ interface IRAcceptDriftPolicy {
327
+ /** Fingerprint axes whose mismatches are tolerated. */
328
+ axes: IRPairingAxis[];
329
+ /** Human-readable justification for the exemption. */
330
+ reason: string;
331
+ /** ISO date (YYYY-MM-DD) the exemption was added. */
332
+ since: string;
333
+ /**
334
+ * Optional ISO date (YYYY-MM-DD) after which the exemption stops
335
+ * applying. The pairing gate then surfaces the document as an
336
+ * ordinary mismatch.
337
+ */
338
+ expiresAt?: string;
339
+ }
340
+ /**
341
+ * Per-document pairing policy block. Currently only carries
342
+ * `acceptDrift`; future policies (e.g. assertion-shape exemptions)
343
+ * can extend this without breaking the IR schema.
344
+ */
345
+ interface IRPairingPolicy {
346
+ /** Opt-out from specific spec<->IR pairing mismatch axes. */
347
+ acceptDrift?: IRAcceptDriftPolicy;
348
+ }
297
349
  /**
298
350
  * Top-level IR document.
299
351
  */
@@ -310,6 +362,12 @@ interface IRDocument {
310
362
  metadata?: IRMetadata;
311
363
  /** Where this document came from. */
312
364
  provenance?: IRProvenance;
365
+ /**
366
+ * Per-document policy block — opt-out from specific spec<->IR
367
+ * pairing mismatches. Used by hand-authored IRs that intentionally
368
+ * diverge from the legacy spec shape.
369
+ */
370
+ pairingPolicy?: IRPairingPolicy;
313
371
  /** State declarations within this document. */
314
372
  states: IRState[];
315
373
  /** Transition declarations within this document. */
@@ -817,4 +875,4 @@ interface ProjectLegacyToIROptions {
817
875
  */
818
876
  declare function projectLegacyToIR(legacy: LegacySpec, opts?: ProjectLegacyToIROptions): IRDocument;
819
877
 
820
- export { type AdaptedState, type AdaptedTransition, type AdaptedTransitionAction, type AdaptedWaitAfter, type AdaptedWorkflowConfig, type IRCrossRef, type IRDocument, type IREffect, type IRElementCriteria, type IRMetadata, type IRProvenance, type IRState, type IRStateCondition, type IRTransition, type IRTransitionAction, type IRVersion, type IRVisualRef, type IRWaitSpec, type LegacyAssertion, type LegacyAssertionTarget, type LegacyCriteria, type LegacyGroup, type LegacyMetadata, type LegacyProcessStep, type LegacySpec, type LegacyStateMachine, type LegacyStateMachineState, type LegacyTransition, type ProjectLegacyToIROptions, adaptIRDocumentToWorkflowConfig, adaptIRState, adaptIRTransition, adaptIRTransitionAction, projectIRToBundledPage, projectLegacyToIR, projectionVersion };
878
+ export { type AdaptedState, type AdaptedTransition, type AdaptedTransitionAction, type AdaptedWaitAfter, type AdaptedWorkflowConfig, type IRAcceptDriftPolicy, type IRCrossRef, type IRDocument, type IREffect, type IRElementCriteria, type IRMetadata, type IRPairingAxis, type IRPairingPolicy, type IRProvenance, type IRState, type IRStateCondition, type IRTransition, type IRTransitionAction, type IRVersion, type IRVisualRef, type IRWaitSpec, type LegacyAssertion, type LegacyAssertionTarget, type LegacyCriteria, type LegacyGroup, type LegacyMetadata, type LegacyProcessStep, type LegacySpec, type LegacyStateMachine, type LegacyStateMachineState, type LegacyTransition, type ProjectLegacyToIROptions, adaptIRDocumentToWorkflowConfig, adaptIRState, adaptIRTransition, adaptIRTransitionAction, projectIRToBundledPage, projectLegacyToIR, projectionVersion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qontinui/shared-types",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Shared TypeScript types for the Qontinui ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -92,7 +92,12 @@
92
92
  "import": "./dist/ui-bridge-ir.js",
93
93
  "require": "./dist/ui-bridge-ir.cjs"
94
94
  },
95
- "./ui-bridge-ir/schema": "./src/ui-bridge-ir/ir.schema.json"
95
+ "./ui-bridge-ir/schema": "./src/ui-bridge-ir/ir.schema.json",
96
+ "./tauri-events": {
97
+ "types": "./dist/tauri-events.d.ts",
98
+ "import": "./dist/tauri-events.js",
99
+ "require": "./dist/tauri-events.cjs"
100
+ }
96
101
  },
97
102
  "files": [
98
103
  "dist",