@contractspec/example.personalization 1.48.1 → 1.50.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 (27) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +73 -69
  2. package/.turbo/turbo-build.log +326 -321
  3. package/CHANGELOG.md +30 -0
  4. package/dist/libs/contracts/src/capabilities/capabilities.d.ts +17 -4
  5. package/dist/libs/contracts/src/capabilities/capabilities.d.ts.map +1 -1
  6. package/dist/libs/contracts/src/data-views/index.d.ts +1 -0
  7. package/dist/libs/contracts/src/data-views/spec.d.ts +1 -0
  8. package/dist/libs/contracts/src/experiments/spec.d.ts +6 -4
  9. package/dist/libs/contracts/src/experiments/spec.d.ts.map +1 -1
  10. package/dist/libs/contracts/src/features/index.d.ts +1 -1
  11. package/dist/libs/contracts/src/features/types.d.ts +26 -30
  12. package/dist/libs/contracts/src/features/types.d.ts.map +1 -1
  13. package/dist/libs/contracts/src/index.d.ts +5 -3
  14. package/dist/libs/contracts/src/ownership.d.ts +111 -8
  15. package/dist/libs/contracts/src/ownership.d.ts.map +1 -1
  16. package/dist/libs/contracts/src/policy/spec.d.ts +7 -4
  17. package/dist/libs/contracts/src/policy/spec.d.ts.map +1 -1
  18. package/dist/libs/contracts/src/serialization/index.d.ts +1 -0
  19. package/dist/libs/contracts/src/serialization/serializers.d.ts +5 -0
  20. package/dist/libs/contracts/src/themes.d.ts +6 -4
  21. package/dist/libs/contracts/src/themes.d.ts.map +1 -1
  22. package/dist/libs/contracts/src/versioning/refs.d.ts +60 -0
  23. package/dist/libs/contracts/src/versioning/refs.d.ts.map +1 -0
  24. package/dist/libs/contracts/src/workflow/index.d.ts +2 -1
  25. package/dist/libs/contracts/src/workflow/spec.d.ts +2 -9
  26. package/dist/libs/contracts/src/workflow/spec.d.ts.map +1 -1
  27. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @contractspec/example.personalization
2
2
 
3
+ ## 1.50.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5325d6b: feat: improve seo
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [5325d6b]
12
+ - @contractspec/lib.contracts@1.50.0
13
+ - @contractspec/lib.logger@1.50.0
14
+ - @contractspec/lib.overlay-engine@1.50.0
15
+ - @contractspec/lib.personalization@1.50.0
16
+ - @contractspec/lib.workflow-composer@1.50.0
17
+
18
+ ## 1.49.0
19
+
20
+ ### Minor Changes
21
+
22
+ - cafd041: fix: impact report comments within github action
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [cafd041]
27
+ - @contractspec/lib.workflow-composer@1.49.0
28
+ - @contractspec/lib.personalization@1.49.0
29
+ - @contractspec/lib.overlay-engine@1.49.0
30
+ - @contractspec/lib.contracts@1.49.0
31
+ - @contractspec/lib.logger@1.49.0
32
+
3
33
  ## 1.48.1
4
34
 
5
35
  ### Patch Changes
@@ -1,16 +1,29 @@
1
+ import { VersionedSpecRef } from "../versioning/refs.js";
2
+
1
3
  //#region ../../libs/contracts/src/capabilities/capabilities.d.ts
4
+ /** Classification of capability types. */
2
5
  type CapabilityKind = 'api' | 'event' | 'data' | 'ui' | 'integration';
6
+ /**
7
+ * Requirement for a capability dependency.
8
+ * Used to declare what capabilities a spec needs.
9
+ */
3
10
  interface CapabilityRequirement {
11
+ /** Unique key of the required capability. */
4
12
  key: string;
13
+ /** Optional specific version required. */
5
14
  version?: string;
15
+ /** Optional kind filter for the requirement. */
6
16
  kind?: CapabilityKind;
17
+ /** If true, the requirement is optional and won't block if missing. */
7
18
  optional?: boolean;
19
+ /** Human-readable reason why this capability is required. */
8
20
  reason?: string;
9
21
  }
10
- interface CapabilityRef {
11
- key: string;
12
- version: string;
13
- }
22
+ /**
23
+ * Reference to a capability spec.
24
+ * Uses key and version to identify a specific capability.
25
+ */
26
+ type CapabilityRef = VersionedSpecRef;
14
27
  //#endregion
15
28
  export { CapabilityKind, CapabilityRef, CapabilityRequirement };
16
29
  //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/capabilities/capabilities.ts"],"sourcesContent":[],"mappings":";AAGY,KAAA,cAAA,GAAc,KAAA,GAAA,OAAA,GAAA,MAAA,GAAA,IAAA,GAAA,aAAA;UAoBT,qBAAA;;;SAGR;;;;UAKQ,aAAA"}
1
+ {"version":3,"file":"capabilities.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/capabilities/capabilities.ts"],"sourcesContent":[],"mappings":";;;;AAKY,KAAA,cAAA,GAAc,KAAA,GAAA,OAAA,GAAA,MAAA,GAAA,IAAA,GAAA,aAAA;;;;;UAmCT,qBAAA;;;;;;SAMR;;;;;;;;;;KAWG,aAAA,GAAgB"}
@@ -1,3 +1,4 @@
1
+ import { DataViewRef } from "../features/types.js";
1
2
  import "./types.js";
2
3
  import "./spec.js";
3
4
  import "./registry.js";
@@ -1 +1,2 @@
1
+ import { DataViewRef } from "../features/types.js";
1
2
  import "./types.js";
@@ -1,11 +1,13 @@
1
+ import { OptionalVersionedSpecRef } from "../versioning/refs.js";
1
2
  import "../registry.js";
2
3
 
3
4
  //#region ../../libs/contracts/src/experiments/spec.d.ts
4
5
 
5
- interface ExperimentRef {
6
- key: string;
7
- version?: string;
8
- }
6
+ /**
7
+ * Reference to an experiment spec.
8
+ * Version is optional; when omitted, refers to the latest version.
9
+ */
10
+ type ExperimentRef = OptionalVersionedSpecRef;
9
11
  //#endregion
10
12
  export { ExperimentRef };
11
13
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/experiments/spec.ts"],"sourcesContent":[],"mappings":";;;;UAOiB,aAAA"}
1
+ {"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/experiments/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAaY,aAAA,GAAgB"}
@@ -1,4 +1,4 @@
1
- import { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, OpRef, PresentationRef } from "./types.js";
1
+ import { DataViewRef, EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, FormRef, OpRef, PresentationRef } from "./types.js";
2
2
  import "./registry.js";
3
3
  import "./install.js";
4
4
  import "./validation.js";
@@ -1,5 +1,6 @@
1
1
  import { PresentationTarget } from "../presentations/presentations.js";
2
2
  import { OwnerShipMeta } from "../ownership.js";
3
+ import { SpecKeyRef, VersionedSpecRef } from "../versioning/refs.js";
3
4
  import { CapabilityRef, CapabilityRequirement } from "../capabilities/capabilities.js";
4
5
  import { ExperimentRef } from "../experiments/spec.js";
5
6
  import { ImplementationRef } from "../operations/operation.js";
@@ -8,38 +9,31 @@ import "../operations/index.js";
8
9
  //#region ../../libs/contracts/src/features/types.d.ts
9
10
  /** Minimal metadata to identify and categorize a feature module. */
10
11
  type FeatureModuleMeta = OwnerShipMeta;
11
- interface OpRef {
12
- /** Operation key (OperationSpec.meta.key). */
13
- key: string;
14
- /** Operation version (OperationSpec.meta.version). */
15
- version: string;
16
- }
17
- interface EventRef {
18
- /** Event key. */
19
- key: string;
20
- /** Event version. */
21
- version: string;
22
- }
23
- interface PresentationRef {
24
- /** Presentation key. */
25
- key: string;
26
- /** Presentation version. */
27
- version: string;
28
- }
12
+ /**
13
+ * Reference to an operation spec.
14
+ * Uses key (OperationSpec.meta.key) and version (OperationSpec.meta.version).
15
+ */
16
+ type OpRef = VersionedSpecRef;
17
+ /**
18
+ * Reference to an event spec.
19
+ * Uses key (EventSpec.meta.key) and version (EventSpec.meta.version).
20
+ */
21
+ type EventRef = VersionedSpecRef;
22
+ /**
23
+ * Reference to a presentation spec.
24
+ * Uses key (PresentationSpec.meta.key) and version (PresentationSpec.meta.version).
25
+ */
26
+ type PresentationRef = VersionedSpecRef;
29
27
  /**
30
28
  * Reference to a data view spec.
29
+ * Uses key (DataViewSpec.meta.key) and version (DataViewSpec.meta.version).
31
30
  */
32
- interface DataViewRef {
33
- key: string;
34
- version: string;
35
- }
31
+ type DataViewRef = VersionedSpecRef;
36
32
  /**
37
33
  * Reference to a form spec.
34
+ * Uses key (FormSpec.meta.key) and version (FormSpec.meta.version).
38
35
  */
39
- interface FormRef {
40
- key: string;
41
- version: string;
42
- }
36
+ type FormRef = VersionedSpecRef;
43
37
  /** Group operations/events/presentations into an installable feature. */
44
38
  interface FeatureModuleSpec {
45
39
  meta: FeatureModuleMeta;
@@ -80,9 +74,11 @@ interface FeatureModuleSpec {
80
74
  /** Forms associated with this feature. */
81
75
  forms?: FormRef[];
82
76
  }
83
- interface FeatureRef {
84
- key: string;
85
- }
77
+ /**
78
+ * Reference to a feature (unversioned).
79
+ * Features are identified by key only, without version pinning.
80
+ */
81
+ type FeatureRef = SpecKeyRef;
86
82
  //#endregion
87
- export { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, OpRef, PresentationRef };
83
+ export { DataViewRef, EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, FormRef, OpRef, PresentationRef };
88
84
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/features/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAOY,iBAAA,GAAoB;UAEf,KAAA;EAFL;EAEK,GAAA,EAAA,MAAK;EAOL;EAOA,OAAA,EAAA,MAAA;AAUjB;AAQiB,UAzBA,QAAA,CAyBO;EAMP;EACT,GAAA,EAAA,MAAA;EAEO;EAEJ,OAAA,EAAA,MAAA;;AAIK,UAjCC,eAAA,CAiCD;EAGD;EACA,GAAA,EAAA,MAAA;EAGY;EAAa,OAAA,EAAA,MAAA;;;;;AAqBvB,UAnDA,WAAA,CAmDA;EAGA,GAAA,EAAA,MAAA;;;;;;UA9CA,OAAA;;;;;UAMA,iBAAA;QACT;;eAEO;;WAEJ;;kBAEO;;gBAEF;;;eAGD;eACA;;;;QAGY;UAAa;;;;;;;;;aAQ3B;;;;;;oBAOO;;cAGN;;UAGJ;;UAGO,UAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/features/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAQY,iBAAA,GAAoB;;AAAhC;AAMA;AAMA;AAMY,KAZA,KAAA,GAAQ,gBAYU;AAM9B;AAMA;AAGA;;AAGe,KAxBH,QAAA,GAAW,gBAwBR;;;;;AAUA,KA5BH,eAAA,GAAkB,gBA4Bf;;;;;AAqBD,KA3CF,WAAA,GAAc,gBA2CZ;;;AAUd;;KA/CY,OAAA,GAAU;;UAGL,iBAAA;QACT;;eAEO;;WAEJ;;kBAEO;;gBAEF;;;eAGD;eACA;;;;QAGY;UAAa;;;;;;;;;aAQ3B;;;;;;oBAOO;;cAGN;;UAGJ;;;;;;KAOE,UAAA,GAAa"}
@@ -1,6 +1,7 @@
1
1
  import { PresentationTarget } from "./presentations/presentations.js";
2
2
  import { DocId } from "./docs/registry.js";
3
3
  import { Owner, OwnerShipMeta, OwnersEnum, Stability, StabilityEnum, Tag, TagsEnum } from "./ownership.js";
4
+ import { OptionalVersionedSpecRef, SpecKeyRef, VersionedSpecRef } from "./versioning/refs.js";
4
5
  import { PolicyRef } from "./policy/spec.js";
5
6
  import { CapabilityKind, CapabilityRef, CapabilityRequirement } from "./capabilities/capabilities.js";
6
7
  import { ExperimentRef } from "./experiments/spec.js";
@@ -8,11 +9,11 @@ import "./resources.js";
8
9
  import { ImplementationRef, ImplementationType } from "./operations/operation.js";
9
10
  import "./install.js";
10
11
  import "./operations/index.js";
11
- import { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, OpRef, PresentationRef } from "./features/types.js";
12
+ import { DataViewRef, EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, FormRef, OpRef, PresentationRef } from "./features/types.js";
12
13
  import "./presentations/index.js";
13
14
  import "./features/index.js";
14
15
  import "./data-views/index.js";
15
- import { CompensationStep, CompensationStrategy, FormRef, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowSpec } from "./workflow/spec.js";
16
+ import { CompensationStep, CompensationStrategy, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowSpec } from "./workflow/spec.js";
16
17
  import { ThemeRef } from "./themes.js";
17
18
  import { IntegrationCategory, IntegrationOwnershipMode } from "./integrations/spec.js";
18
19
  import { AppBlueprintMeta, AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TranslationCatalogPointer } from "./app-config/spec.js";
@@ -40,4 +41,5 @@ import "./workflow/index.js";
40
41
  import "./llm/index.js";
41
42
  import "./app-config/validation.js";
42
43
  import { ExampleDocumentation, ExampleEntrypoints, ExampleKind, ExampleMcpSupport, ExampleMeta, ExampleSandboxMode, ExampleSandboxSupport, ExampleSpec, ExampleStudioSupport, ExampleSurfaces, ExampleVisibility } from "./examples/types.js";
43
- import "./examples/index.js";
44
+ import "./examples/index.js";
45
+ import "./serialization/index.js";
@@ -1,58 +1,161 @@
1
1
  import { DocId } from "./docs/registry.js";
2
2
 
3
3
  //#region ../../libs/contracts/src/ownership.d.ts
4
+
5
+ /**
6
+ * Lifecycle stability stages for specs.
7
+ *
8
+ * Specs progress through these stages as they mature:
9
+ * - `idea`: Initial concept, not implemented
10
+ * - `in_creation`: Currently being built
11
+ * - `experimental`: Working but may change significantly
12
+ * - `beta`: Feature-complete, seeking feedback
13
+ * - `stable`: Production-ready, breaking changes require major version bump
14
+ * - `deprecated`: Scheduled for removal, use alternatives
15
+ */
4
16
  declare const StabilityEnum: {
17
+ /** Initial concept, not yet implemented. */
5
18
  readonly Idea: "idea";
19
+ /** Currently being built, not ready for use. */
6
20
  readonly InCreation: "in_creation";
21
+ /** Working but unstable, may change significantly. */
7
22
  readonly Experimental: "experimental";
23
+ /** Feature-complete, seeking feedback before stabilization. */
8
24
  readonly Beta: "beta";
25
+ /** Production-ready, follows semantic versioning. */
9
26
  readonly Stable: "stable";
27
+ /** Scheduled for removal, use alternatives. */
10
28
  readonly Deprecated: "deprecated";
11
29
  };
30
+ /** Stability level for a spec's lifecycle stage. */
12
31
  type Stability = (typeof StabilityEnum)[keyof typeof StabilityEnum];
32
+ /**
33
+ * Curated owner identifiers for business/product ownership.
34
+ *
35
+ * Used for CODEOWNERS, on-call routing, and approval workflows.
36
+ * Custom owner strings are also allowed for flexibility.
37
+ */
13
38
  declare const OwnersEnum: {
39
+ /** Core platform team. */
14
40
  readonly PlatformCore: "platform.core";
41
+ /** Sigil/auth team. */
15
42
  readonly PlatformSigil: "platform.sigil";
43
+ /** Marketplace team. */
16
44
  readonly PlatformMarketplace: "platform.marketplace";
45
+ /** Messaging/notifications team. */
17
46
  readonly PlatformMessaging: "platform.messaging";
47
+ /** Content/CMS team. */
18
48
  readonly PlatformContent: "platform.content";
49
+ /** Feature flags team. */
19
50
  readonly PlatformFeatureFlags: "platform.featureflags";
51
+ /** Finance/billing team. */
20
52
  readonly PlatformFinance: "platform.finance";
21
53
  };
54
+ /**
55
+ * Owner identifier for a spec.
56
+ * Can be a predefined OwnersEnum value or any custom string.
57
+ */
22
58
  type Owner = (typeof OwnersEnum)[keyof typeof OwnersEnum] | (string & {});
59
+ /**
60
+ * Common tags for categorizing specs.
61
+ *
62
+ * Used for search, grouping, and documentation navigation.
63
+ * Custom tag strings are also allowed for flexibility.
64
+ */
23
65
  declare const TagsEnum: {
66
+ /** Spots/locations domain. */
24
67
  readonly Spots: "spots";
68
+ /** Collectivity/community domain. */
25
69
  readonly Collectivity: "collectivity";
70
+ /** Marketplace domain. */
26
71
  readonly Marketplace: "marketplace";
72
+ /** Seller-related features. */
27
73
  readonly Sellers: "sellers";
74
+ /** Authentication features. */
28
75
  readonly Auth: "auth";
76
+ /** Login flows. */
29
77
  readonly Login: "login";
78
+ /** Signup flows. */
30
79
  readonly Signup: "signup";
80
+ /** Onboarding/guides. */
31
81
  readonly Guide: "guide";
82
+ /** Documentation. */
32
83
  readonly Docs: "docs";
84
+ /** Internationalization. */
33
85
  readonly I18n: "i18n";
86
+ /** Incident management. */
34
87
  readonly Incident: "incident";
88
+ /** Automation/workflows. */
35
89
  readonly Automation: "automation";
90
+ /** Code hygiene/maintenance. */
36
91
  readonly Hygiene: "hygiene";
37
92
  };
93
+ /**
94
+ * Tag for categorizing a spec.
95
+ * Can be a predefined TagsEnum value or any custom string.
96
+ */
38
97
  type Tag = (typeof TagsEnum)[keyof typeof TagsEnum] | (string & {});
98
+ /**
99
+ * Common metadata interface for all ContractSpec specifications.
100
+ *
101
+ * Every spec type (operations, events, presentations, etc.) extends this
102
+ * interface to provide consistent ownership, versioning, and discoverability.
103
+ *
104
+ * @example
105
+ * ```typescript
106
+ * const meta: OwnerShipMeta = {
107
+ * key: 'auth.login',
108
+ * version: '1.0.0',
109
+ * description: 'Authenticates a user with email and password',
110
+ * stability: StabilityEnum.Stable,
111
+ * owners: [OwnersEnum.PlatformSigil],
112
+ * tags: [TagsEnum.Auth, TagsEnum.Login],
113
+ * };
114
+ * ```
115
+ */
39
116
  interface OwnerShipMeta {
40
- /** Breaking changes => bump version */
117
+ /**
118
+ * Semantic version string (e.g., "1.0.0").
119
+ * Bump for breaking changes according to semver rules.
120
+ */
41
121
  version: string;
42
- /** Fully-qualified spec key (e.g., "sigil.beginSignup") */
122
+ /**
123
+ * Fully-qualified spec key (e.g., "sigil.beginSignup", "user.created").
124
+ * Must be unique within the spec type.
125
+ */
43
126
  key: string;
44
- /** Human-friendly spec title (e.g., "Signup begin") */
127
+ /**
128
+ * Human-friendly title (e.g., "Begin Signup").
129
+ * Used in documentation and UI.
130
+ */
45
131
  title?: string;
46
- /** Short human-friendly summary */
132
+ /**
133
+ * Short human-friendly summary of what this spec does.
134
+ * Should be concise (1-2 sentences).
135
+ */
47
136
  description: string;
137
+ /**
138
+ * Business domain this spec belongs to (e.g., "auth", "marketplace").
139
+ * Used for grouping and discovery.
140
+ */
48
141
  domain?: string;
49
- /** Lifecycle marker for comms & tooling */
142
+ /**
143
+ * Lifecycle stability marker.
144
+ * Indicates maturity level and change expectations.
145
+ */
50
146
  stability: Stability;
51
- /** Owners for CODEOWNERS / on-call / approvals */
147
+ /**
148
+ * Team/individual owners responsible for this spec.
149
+ * Used for CODEOWNERS, on-call routing, and approvals.
150
+ */
52
151
  owners: Owner[];
53
- /** Search tags, grouping, docs navigation */
152
+ /**
153
+ * Tags for search, grouping, and documentation navigation.
154
+ */
54
155
  tags: Tag[];
55
- /** Doc block(s) for this operation. */
156
+ /**
157
+ * Associated DocBlock identifiers for documentation linkage.
158
+ */
56
159
  docId?: DocId[];
57
160
  }
58
161
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"ownership.d.ts","names":[],"sources":["../../../../../../libs/contracts/src/ownership.ts"],"sourcesContent":[],"mappings":";;;cAIa;;EAAA,SAAA,UAOH,EAAA,aAAA;EACE,SAAA,YAAS,EAAA,cAAW;EAGnB,SAAA,IAQH,EAAA,MAAA;EACE,SAAK,MAAA,EAAA,QACL;EAMC,SAAA,UAcH,EAAA,YAAA;AACV,CAAA;AAIiB,KAtCL,SAAA,GAsCkB,CAAA,OAtCE,aAsCF,CAAA,CAAA,MAAA,OAtC8B,aAsC9B,CAAA;AAWjB,cA9CA,UA8CA,EAAA;EAEH,SAAA,YAAA,EAAA,eAAA;EAEF,SAAA,aAAA,EAAA,gBAAA;EAGE,SAAA,mBAAA,EAAA,sBAAA;EAAK,SAAA,iBAAA,EAAA,oBAAA;;;;;KA5CH,KAAA,WACA,yBAAyB;cAMxB;;;;;;;;;;;;;;;KAeD,GAAA,WAAc,uBAAuB;UAIhC,aAAA;;;;;;;;;;;aAWJ;;UAEH;;QAEF;;UAGE"}
1
+ {"version":3,"file":"ownership.d.ts","names":[],"sources":["../../../../../../libs/contracts/src/ownership.ts"],"sourcesContent":[],"mappings":";;;;AAwJA;;;;;;;;;;;cA9Ha;;;;;;;;;;;;;;;KAgBD,SAAA,WAAoB,4BAA4B;;;;;;;cAY/C;;;;;;;;;;;;;;;;;;;;KAqBD,KAAA,WACA,yBAAyB;;;;;;;cAgBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCD,GAAA,WAAc,uBAAuB;;;;;;;;;;;;;;;;;;;UA2BhC,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAmCJ;;;;;UAMH;;;;QAKF;;;;UAKE"}
@@ -1,9 +1,12 @@
1
+ import { VersionedSpecRef } from "../versioning/refs.js";
2
+
1
3
  //#region ../../libs/contracts/src/policy/spec.d.ts
2
4
 
3
- interface PolicyRef {
4
- key: string;
5
- version: string;
6
- }
5
+ /**
6
+ * Reference to a policy spec.
7
+ * Uses key and version to identify a specific policy.
8
+ */
9
+ type PolicyRef = VersionedSpecRef;
7
10
  //#endregion
8
11
  export { PolicyRef };
9
12
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/policy/spec.ts"],"sourcesContent":[],"mappings":";;UAmHiB,SAAA"}
1
+ {"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/policy/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAyHY,SAAA,GAAY"}
@@ -0,0 +1 @@
1
+ import "./serializers.js";
@@ -0,0 +1,5 @@
1
+ import "../resources.js";
2
+ import "../operations/index.js";
3
+ import "../presentations/index.js";
4
+ import "../data-views/index.js";
5
+ import "../events.js";
@@ -1,11 +1,13 @@
1
+ import { VersionedSpecRef } from "./versioning/refs.js";
1
2
  import "./registry.js";
2
3
 
3
4
  //#region ../../libs/contracts/src/themes.d.ts
4
5
 
5
- interface ThemeRef {
6
- key: string;
7
- version: string;
8
- }
6
+ /**
7
+ * Reference to a theme spec.
8
+ * Uses key and version to identify a specific theme.
9
+ */
10
+ type ThemeRef = VersionedSpecRef;
9
11
  //#endregion
10
12
  export { ThemeRef };
11
13
  //# sourceMappingURL=themes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"themes.d.ts","names":[],"sources":["../../../../../../libs/contracts/src/themes.ts"],"sourcesContent":[],"mappings":";;;;UAgDiB,QAAA"}
1
+ {"version":3,"file":"themes.d.ts","names":[],"sources":["../../../../../../libs/contracts/src/themes.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAsDY,QAAA,GAAW"}
@@ -0,0 +1,60 @@
1
+ //#region ../../libs/contracts/src/versioning/refs.d.ts
2
+ /**
3
+ * Base reference types for ContractSpec versioning.
4
+ *
5
+ * Provides canonical reference types for linking between specs.
6
+ * Domain-specific refs (OpRef, EventRef, etc.) should alias these
7
+ * base types for consistency and maintainability.
8
+ *
9
+ * @module versioning/refs
10
+ */
11
+ /**
12
+ * Base reference type for versioned specs.
13
+ * Used to reference any spec by its key and version.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const opRef: VersionedSpecRef = { key: 'auth.login', version: '1.0.0' };
18
+ * ```
19
+ */
20
+ interface VersionedSpecRef {
21
+ /** Unique key identifying the spec (e.g., "auth.login", "user.created"). */
22
+ key: string;
23
+ /** Semantic version of the spec (e.g., "1.0.0", "2.1.0"). */
24
+ version: string;
25
+ }
26
+ /**
27
+ * Base reference type for specs with optional version.
28
+ * When version is omitted, typically refers to the latest version.
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * // Reference to latest version
33
+ * const latestRef: OptionalVersionedSpecRef = { key: 'auth.login' };
34
+ *
35
+ * // Reference to specific version
36
+ * const specificRef: OptionalVersionedSpecRef = { key: 'auth.login', version: '1.0.0' };
37
+ * ```
38
+ */
39
+ interface OptionalVersionedSpecRef {
40
+ /** Unique key identifying the spec. */
41
+ key: string;
42
+ /** Optional semantic version. When omitted, refers to the latest version. */
43
+ version?: string;
44
+ }
45
+ /**
46
+ * Base reference type for unversioned spec keys.
47
+ * Used when only the key is needed without version information.
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * const featureRef: SpecKeyRef = { key: 'premium-features' };
52
+ * ```
53
+ */
54
+ interface SpecKeyRef {
55
+ /** Unique key identifying the spec. */
56
+ key: string;
57
+ }
58
+ //#endregion
59
+ export { OptionalVersionedSpecRef, SpecKeyRef, VersionedSpecRef };
60
+ //# sourceMappingURL=refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/versioning/refs.ts"],"sourcesContent":[],"mappings":";;AAuBA;AAoBA;AAgBA;;;;;;;;;;;;;;;UApCiB,gBAAA;;;;;;;;;;;;;;;;;;;UAoBA,wBAAA;;;;;;;;;;;;;;;UAgBA,UAAA"}
@@ -1,4 +1,5 @@
1
- import { CompensationStep, CompensationStrategy, FormRef, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowSpec } from "./spec.js";
1
+ import { FormRef } from "../features/types.js";
2
+ import { CompensationStep, CompensationStrategy, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowSpec } from "./spec.js";
2
3
  import "./validation.js";
3
4
  import "./state.js";
4
5
  import "./runner.js";
@@ -1,18 +1,11 @@
1
1
  import { OwnerShipMeta } from "../ownership.js";
2
2
  import { CapabilityRef } from "../capabilities/capabilities.js";
3
3
  import { ExperimentRef } from "../experiments/spec.js";
4
- import { OpRef } from "../features/types.js";
4
+ import { FormRef, OpRef } from "../features/types.js";
5
5
  import "../features/index.js";
6
6
  import "../registry.js";
7
7
 
8
8
  //#region ../../libs/contracts/src/workflow/spec.d.ts
9
- /**
10
- * Reference to a form spec declared in {@link FormRegistry}.
11
- */
12
- interface FormRef {
13
- key: string;
14
- version: string;
15
- }
16
9
  type StepType = 'human' | 'automation' | 'decision';
17
10
  type GuardConditionKind = 'policy' | 'expression';
18
11
  interface GuardCondition {
@@ -85,5 +78,5 @@ interface WorkflowSpec {
85
78
  experiments?: ExperimentRef[];
86
79
  }
87
80
  //#endregion
88
- export { CompensationStep, CompensationStrategy, FormRef, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowSpec };
81
+ export { CompensationStep, CompensationStrategy, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowSpec };
89
82
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/workflow/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AASiB,UAAA,OAAA,CAAO;EAKZ,GAAA,EAAA,MAAQ;EASR,OAAA,EAAA,MAAA;AAEZ;AAMiB,KAjBL,QAAA,GAiBgB,OAAA,GAAA,YAAA,GAAA,UAAA;AAeX,KAvBL,kBAAA,GAuBS,QAAA,GAAA,YAAA;AAEb,UAvBS,cAAA,CAuBT;EAGG,IAAA,EAzBH,kBAyBG;EACD;EAEA,KAAA,EAAA,MAAA;;AAI4B,UA3BrB,WAAA,CA2BqB;EAGrB,WAAA,EAAU,MAAA;EAQV,OAAG,EAAA,QAAA,GAED,aAAM;EAGR,OAAA,EAAA,MAAA;EAMA;EAKA,UAAA,CAAA,EAAA,MAAA;;AAEF,UAhDE,UAAA,CAgDF;EAGP;EACS,SAAA,CAAA,EAlDH,KAkDG;EAAoB;EAGzB,IAAA,CAAA,EAnDH,OAmDG;AAEZ;AACQ,UAnDS,IAAA,CAmDT;EACM,EAAA,EAAA,MAAA;EAEE,IAAA,EApDR,QAoDQ;EAAa,KAAA,EAAA,MAAA;;WAjDlB;UACD;;UAEA;;;;yBAIe;;UAGR,UAAA;;;;;;;UAQA,GAAA;;mBAEE;;UAGF,gBAAA;;aAEJ;;;UAII,oBAAA;;SAER;;UAGQ,kBAAA;SACR;eACM;;;QAGP;iBACS;;KAGL,YAAA,GAAe;UAEV,YAAA;QACT;cACM;;;;gBAEE"}
1
+ {"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/workflow/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;KASY,QAAA;AAAA,KASA,kBAAA,GATQ,QAAA,GAAA,YAAA;AASR,UAEK,cAAA,CAFa;EAEb,IAAA,EACT,kBADuB;EAMd;EAQA,KAAA,EAAA,MAAU;AAO3B;AAEQ,UAjBS,WAAA,CAiBT;EAGG,WAAA,EAAA,MAAA;EACD,OAAA,EAAA,QAAA,GAAA,aAAA;EAEA,OAAA,EAAA,MAAA;EAIe;EAAa,UAAA,CAAA,EAAA,MAAA;AAGtC;AAQiB,UA9BA,UAAA,CAgCE;EAGF;EAMA,SAAA,CAAA,EAvCH,KAuCG;EAKA;EACR,IAAA,CAAA,EA3CA,OA2CA;;AAID,UA5CS,IAAA,CA4CT;EACS,EAAA,EAAA,MAAA;EAAoB,IAAA,EA3C7B,QA2C6B;EAGzB,KAAA,EAAA,MAAA;EAEK,WAAA,CAAA,EAAA,MAAY;EACrB,MAAA,CAAA,EA9CG,UA8CH;EACM,KAAA,CAAA,EA9CJ,cA8CI;EAEE,SAAA,CAAA,EAAA,MAAA;EAAa,KAAA,CAAA,EA9CnB,WA8CmB;;;;yBA1CJ;;UAGR,UAAA;;;;;;;UAQA,GAAA;;mBAEE;;UAGF,gBAAA;;aAEJ;;;UAII,oBAAA;;SAER;;UAGQ,kBAAA;SACR;eACM;;;QAGP;iBACS;;KAGL,YAAA,GAAe;UAEV,YAAA;QACT;cACM;;;;gBAEE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.personalization",
3
- "version": "1.48.1",
3
+ "version": "1.50.0",
4
4
  "description": "Personalization examples: behavior tracking, overlay customization, workflow extension.",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -28,15 +28,15 @@
28
28
  "test": "bun test"
29
29
  },
30
30
  "dependencies": {
31
- "@contractspec/lib.personalization": "1.48.1",
32
- "@contractspec/lib.overlay-engine": "1.48.1",
33
- "@contractspec/lib.workflow-composer": "1.48.1",
34
- "@contractspec/lib.contracts": "1.48.1",
35
- "@contractspec/lib.logger": "1.48.0"
31
+ "@contractspec/lib.personalization": "1.50.0",
32
+ "@contractspec/lib.overlay-engine": "1.50.0",
33
+ "@contractspec/lib.workflow-composer": "1.50.0",
34
+ "@contractspec/lib.contracts": "1.50.0",
35
+ "@contractspec/lib.logger": "1.50.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@contractspec/tool.tsdown": "1.48.0",
39
- "@contractspec/tool.typescript": "1.48.0",
38
+ "@contractspec/tool.tsdown": "1.50.0",
39
+ "@contractspec/tool.typescript": "1.50.0",
40
40
  "tsdown": "^0.19.0",
41
41
  "typescript": "^5.9.3"
42
42
  },