@contractspec/lib.contracts 1.44.0 → 1.45.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 (163) hide show
  1. package/README.md +1 -1
  2. package/dist/app-config/app-config.feature.js +6 -6
  3. package/dist/app-config/contracts.d.ts +50 -50
  4. package/dist/app-config/contracts.js +13 -13
  5. package/dist/app-config/events.d.ts +27 -27
  6. package/dist/app-config/events.js +12 -12
  7. package/dist/app-config/lifecycle-contracts.d.ts +54 -54
  8. package/dist/app-config/lifecycle-contracts.js +19 -19
  9. package/dist/app-config/lifecycle.d.ts +2 -2
  10. package/dist/app-config/runtime.d.ts +3 -3
  11. package/dist/app-config/spec.d.ts +10 -12
  12. package/dist/app-config/spec.js +5 -26
  13. package/dist/capabilities/capabilities.d.ts +4 -11
  14. package/dist/capabilities/capabilities.js +3 -5
  15. package/dist/capabilities/openbanking.js +10 -10
  16. package/dist/client/react/form-render.js +1 -0
  17. package/dist/contract-registry/schemas.d.ts +8 -8
  18. package/dist/contract-registry/schemas.js +1 -1
  19. package/dist/contract-registry/types.d.ts +1 -1
  20. package/dist/data-views/data-views.js +1 -0
  21. package/dist/data-views/registry.d.ts +3 -37
  22. package/dist/data-views/registry.js +4 -66
  23. package/dist/data-views/runtime.d.ts +1 -1
  24. package/dist/data-views/runtime.js +2 -0
  25. package/dist/data-views/spec.d.ts +2 -2
  26. package/dist/docs/index.d.ts +2 -2
  27. package/dist/docs/index.js +2 -2
  28. package/dist/docs/presentations.d.ts +2 -4
  29. package/dist/docs/presentations.js +2 -4
  30. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +1 -1
  31. package/dist/docs/tech/contracts/tests.docblock.js +1 -1
  32. package/dist/docs/tech/lifecycle-stage-system.docblock.js +1 -1
  33. package/dist/docs/tech-contracts.docs.js +1 -1
  34. package/dist/docs/types.d.ts +1 -1
  35. package/dist/events.d.ts +3 -3
  36. package/dist/examples/docs/examples.docblock.d.ts +6 -0
  37. package/dist/examples/docs/examples.docblock.js +165 -0
  38. package/dist/examples/index.d.ts +5 -0
  39. package/dist/examples/index.js +6 -0
  40. package/dist/examples/registry.d.ts +65 -0
  41. package/dist/examples/registry.js +144 -0
  42. package/dist/examples/schema.d.ts +282 -0
  43. package/dist/examples/schema.js +125 -0
  44. package/dist/examples/types.d.ts +167 -0
  45. package/dist/examples/types.js +43 -0
  46. package/dist/examples/validation.d.ts +65 -0
  47. package/dist/examples/validation.js +144 -0
  48. package/dist/experiments/docs/experiments.docblock.js +1 -1
  49. package/dist/experiments/evaluator.d.ts +1 -1
  50. package/dist/experiments/spec-resolver.d.ts +2 -2
  51. package/dist/experiments/spec.d.ts +6 -8
  52. package/dist/experiments/spec.js +5 -23
  53. package/dist/features/index.d.ts +9 -1
  54. package/dist/features/index.js +8 -1
  55. package/dist/features/install.js +2 -2
  56. package/dist/features/types.d.ts +7 -7
  57. package/dist/forms/forms.d.ts +2 -2
  58. package/dist/forms/forms.js +3 -6
  59. package/dist/index.d.ts +13 -8
  60. package/dist/index.js +11 -2
  61. package/dist/install.d.ts +9 -9
  62. package/dist/integrations/connection.d.ts +1 -1
  63. package/dist/integrations/docs/integrations.docblock.js +1 -1
  64. package/dist/integrations/integrations.feature.js +8 -8
  65. package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
  66. package/dist/integrations/openbanking/contracts/accounts.js +3 -3
  67. package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
  68. package/dist/integrations/openbanking/contracts/balances.js +2 -2
  69. package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
  70. package/dist/integrations/openbanking/contracts/transactions.js +2 -2
  71. package/dist/integrations/openbanking/models.d.ts +55 -55
  72. package/dist/integrations/openbanking/openbanking.feature.js +10 -10
  73. package/dist/integrations/operations.d.ts +102 -102
  74. package/dist/integrations/operations.js +10 -10
  75. package/dist/integrations/providers/elevenlabs.js +2 -2
  76. package/dist/integrations/providers/gcs-storage.js +2 -2
  77. package/dist/integrations/providers/gmail.js +3 -3
  78. package/dist/integrations/providers/google-calendar.js +2 -2
  79. package/dist/integrations/providers/mistral.js +3 -3
  80. package/dist/integrations/providers/postmark.js +2 -2
  81. package/dist/integrations/providers/powens.js +4 -4
  82. package/dist/integrations/providers/qdrant.js +3 -3
  83. package/dist/integrations/providers/stripe.js +2 -2
  84. package/dist/integrations/providers/twilio-sms.js +2 -2
  85. package/dist/integrations/runtime.d.ts +5 -5
  86. package/dist/integrations/spec.d.ts +3 -5
  87. package/dist/integrations/spec.js +5 -26
  88. package/dist/jobs/gcp-cloud-tasks.js +1 -1
  89. package/dist/jobs/gcp-pubsub.js +1 -1
  90. package/dist/jobs/handlers/ping-handler.d.ts +3 -3
  91. package/dist/jobs/handlers/ping-handler.js +2 -2
  92. package/dist/jobs/memory-queue.js +1 -1
  93. package/dist/jobs/queue.d.ts +4 -4
  94. package/dist/jobs/scaleway-sqs-queue.js +2 -2
  95. package/dist/jsonschema.d.ts +4 -4
  96. package/dist/knowledge/binding.d.ts +1 -1
  97. package/dist/knowledge/knowledge.feature.js +8 -8
  98. package/dist/knowledge/operations.d.ts +66 -66
  99. package/dist/knowledge/operations.js +12 -12
  100. package/dist/knowledge/source.d.ts +1 -1
  101. package/dist/knowledge/spaces/email-threads.js +2 -2
  102. package/dist/knowledge/spaces/financial-docs.js +2 -2
  103. package/dist/knowledge/spaces/financial-overview.js +2 -2
  104. package/dist/knowledge/spaces/product-canon.js +2 -2
  105. package/dist/knowledge/spaces/support-faq.js +2 -2
  106. package/dist/knowledge/spaces/uploaded-docs.js +2 -2
  107. package/dist/knowledge/spec.d.ts +3 -5
  108. package/dist/knowledge/spec.js +6 -28
  109. package/dist/llm/exporters.js +2 -2
  110. package/dist/llm/types.d.ts +4 -4
  111. package/dist/markdown.js +1 -1
  112. package/dist/migrations.d.ts +2 -2
  113. package/dist/migrations.js +7 -9
  114. package/dist/onboarding-base.d.ts +29 -29
  115. package/dist/onboarding-base.js +4 -4
  116. package/dist/openapi.js +9 -2
  117. package/dist/operations/operation.d.ts +3 -3
  118. package/dist/operations/registry.d.ts +9 -58
  119. package/dist/operations/registry.js +17 -93
  120. package/dist/ownership.d.ts +1 -1
  121. package/dist/policy/docs/policy.docblock.js +1 -1
  122. package/dist/policy/engine.js +2 -0
  123. package/dist/policy/spec.d.ts +1 -1
  124. package/dist/prompt.d.ts +6 -6
  125. package/dist/promptRegistry.d.ts +4 -4
  126. package/dist/promptRegistry.js +2 -5
  127. package/dist/regenerator/docs/regenerator.docblock.js +1 -1
  128. package/dist/regenerator/types.d.ts +1 -1
  129. package/dist/registry.d.ts +3 -2
  130. package/dist/registry.js +5 -5
  131. package/dist/resources.d.ts +5 -5
  132. package/dist/server/graphql-pothos.js +2 -2
  133. package/dist/server/mcp/registerTools.js +1 -1
  134. package/dist/server/rest-elysia.d.ts +1 -1
  135. package/dist/server/rest-elysia.js +1 -1
  136. package/dist/server/rest-express.d.ts +1 -1
  137. package/dist/server/rest-express.js +1 -1
  138. package/dist/server/rest-generic.d.ts +1 -1
  139. package/dist/server/rest-generic.js +1 -1
  140. package/dist/server/rest-next-app.d.ts +1 -1
  141. package/dist/server/rest-next-mcp.d.ts +1 -1
  142. package/dist/server/rest-next-mcp.js +1 -1
  143. package/dist/server/rest-next-pages.d.ts +1 -1
  144. package/dist/telemetry/docs/telemetry.docblock.js +1 -1
  145. package/dist/telemetry/spec.d.ts +7 -7
  146. package/dist/telemetry/spec.js +17 -44
  147. package/dist/telemetry/tracker.d.ts +2 -2
  148. package/dist/tests/runner.d.ts +1 -1
  149. package/dist/tests/spec.d.ts +5 -5
  150. package/dist/tests/spec.js +3 -5
  151. package/dist/themes.d.ts +4 -6
  152. package/dist/themes.js +5 -27
  153. package/dist/translations/catalog.d.ts +1 -1
  154. package/dist/types.d.ts +5 -5
  155. package/dist/workflow/adapters/db-adapter.js +3 -3
  156. package/dist/workflow/runner.d.ts +4 -2
  157. package/dist/workflow/spec.d.ts +4 -17
  158. package/dist/workflow/spec.js +4 -48
  159. package/dist/workflow/state.d.ts +1 -1
  160. package/dist/workflow/validation.js +1 -1
  161. package/dist/workspace-config/contractsrc-schema.d.ts +419 -419
  162. package/dist/workspace-config/contractsrc-schema.js +86 -86
  163. package/package.json +28 -12
@@ -2,4 +2,12 @@ import { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, OpRef, Pres
2
2
  import { FeatureRegistry } from "./registry.js";
3
3
  import { InstallFeatureDeps, installFeature } from "./install.js";
4
4
  import { validateFeatureTargetsV2 } from "./validation.js";
5
- export { type EventRef, type FeatureModuleMeta, type FeatureModuleSpec, type FeatureRef, FeatureRegistry, type InstallFeatureDeps, type OpRef, type PresentationRef, installFeature, validateFeatureTargetsV2 };
5
+
6
+ //#region src/features/index.d.ts
7
+
8
+ /**
9
+ * Helper to define a Feature.
10
+ */
11
+ declare const defineFeature: (spec: FeatureModuleSpec) => FeatureModuleSpec;
12
+ //#endregion
13
+ export { type EventRef, type FeatureModuleMeta, type FeatureModuleSpec, type FeatureRef, FeatureRegistry, type InstallFeatureDeps, type OpRef, type PresentationRef, defineFeature, installFeature, validateFeatureTargetsV2 };
@@ -2,4 +2,11 @@ import { FeatureRegistry } from "./registry.js";
2
2
  import { installFeature } from "./install.js";
3
3
  import { validateFeatureTargetsV2 } from "./validation.js";
4
4
 
5
- export { FeatureRegistry, installFeature, validateFeatureTargetsV2 };
5
+ //#region src/features/index.ts
6
+ /**
7
+ * Helper to define a Feature.
8
+ */
9
+ const defineFeature = (spec) => spec;
10
+
11
+ //#endregion
12
+ export { FeatureRegistry, defineFeature, installFeature, validateFeatureTargetsV2 };
@@ -2,7 +2,7 @@
2
2
  /** Validate and register a feature against optional registries/descriptors. */
3
3
  function installFeature(feature, deps) {
4
4
  if (deps.ops && feature.operations) {
5
- for (const o of feature.operations) if (!deps.ops.getSpec(o.key, o.version)) throw new Error(`installFeature: operation not found ${o.key}.v${o.version}`);
5
+ for (const o of feature.operations) if (!deps.ops.get(o.key, o.version)) throw new Error(`installFeature: operation not found ${o.key}.v${o.version}`);
6
6
  }
7
7
  if (deps.presentations && feature.presentations) {
8
8
  for (const p of feature.presentations) if (!deps.presentations.get(p.key, p.version)) throw new Error(`installFeature: presentation not found ${p.key}.v${p.version}`);
@@ -14,7 +14,7 @@ function installFeature(feature, deps) {
14
14
  }
15
15
  if (feature.opToPresentation && feature.opToPresentation.length > 0) for (const link of feature.opToPresentation) {
16
16
  if (deps.ops) {
17
- if (!deps.ops.getSpec(link.op.key, link.op.version)) throw new Error(`installFeature: linked op not found ${link.op.key}.v${link.op.version}`);
17
+ if (!deps.ops.get(link.op.key, link.op.version)) throw new Error(`installFeature: linked op not found ${link.op.key}.v${link.op.version}`);
18
18
  }
19
19
  if (deps.presentations) {
20
20
  if (!deps.presentations.get(link.pres.key, link.pres.version)) throw new Error(`installFeature: linked presentation not found ${link.pres.key}.v${link.pres.version}`);
@@ -2,9 +2,9 @@ import { PresentationTarget } from "../presentations/presentations.js";
2
2
  import { OwnerShipMeta } from "../ownership.js";
3
3
  import { CapabilityRef, CapabilityRequirement } from "../capabilities/capabilities.js";
4
4
  import "../capabilities/index.js";
5
- import { ExperimentRef } from "../experiments/spec.js";
6
5
  import { ImplementationRef } from "../operations/operation.js";
7
6
  import "../operations/index.js";
7
+ import { ExperimentRef } from "../experiments/spec.js";
8
8
 
9
9
  //#region src/features/types.d.ts
10
10
  /** Minimal metadata to identify and categorize a feature module. */
@@ -13,33 +13,33 @@ interface OpRef {
13
13
  /** Operation key (OperationSpec.meta.key). */
14
14
  key: string;
15
15
  /** Operation version (OperationSpec.meta.version). */
16
- version: number;
16
+ version: string;
17
17
  }
18
18
  interface EventRef {
19
19
  /** Event key. */
20
20
  key: string;
21
21
  /** Event version. */
22
- version: number;
22
+ version: string;
23
23
  }
24
24
  interface PresentationRef {
25
25
  /** Presentation key. */
26
26
  key: string;
27
27
  /** Presentation version. */
28
- version: number;
28
+ version: string;
29
29
  }
30
30
  /**
31
31
  * Reference to a data view spec.
32
32
  */
33
33
  interface DataViewRef {
34
34
  key: string;
35
- version: number;
35
+ version: string;
36
36
  }
37
37
  /**
38
38
  * Reference to a form spec.
39
39
  */
40
40
  interface FormRef {
41
41
  key: string;
42
- version: number;
42
+ version: string;
43
43
  }
44
44
  /** Group operations/events/presentations into an installable feature. */
45
45
  interface FeatureModuleSpec {
@@ -67,7 +67,7 @@ interface FeatureModuleSpec {
67
67
  /** Presentation key. */
68
68
  key: string;
69
69
  /** Presentation version. */
70
- version: number;
70
+ version: string;
71
71
  /** Required targets that must be supported by the descriptor. */
72
72
  targets: PresentationTarget[];
73
73
  }[];
@@ -123,7 +123,7 @@ interface FormAction {
123
123
  labelI18n: string;
124
124
  op?: {
125
125
  name: string;
126
- version: number;
126
+ version: string;
127
127
  };
128
128
  success?: {
129
129
  navigateTo?: string;
@@ -158,7 +158,7 @@ declare class FormRegistry {
158
158
  private items;
159
159
  register(spec: FormSpec): this;
160
160
  list(): FormSpec[];
161
- get(key: string, version?: number): FormSpec<AnySchemaModel> | undefined;
161
+ get(key: string, version?: string): FormSpec<AnySchemaModel> | undefined;
162
162
  /** Filter forms by criteria. */
163
163
  filter(criteria: RegistryFilter): FormSpec[];
164
164
  /** List forms with specific tag. */
@@ -1,5 +1,6 @@
1
1
  import { __toCommonJS } from "../_virtual/rolldown_runtime.js";
2
2
  import { init_registry_utils, registry_utils_exports } from "../registry-utils.js";
3
+ import { compareVersions } from "compare-versions";
3
4
 
4
5
  //#region src/forms/forms.ts
5
6
  function formKey(meta) {
@@ -19,13 +20,9 @@ var FormRegistry = class {
19
20
  get(key, version) {
20
21
  if (version != null) return this.items.get(`${key}.v${version}`);
21
22
  let candidate;
22
- let max = -Infinity;
23
23
  for (const [k, v] of this.items.entries()) {
24
- if (!k.startsWith(`${key}.v`)) continue;
25
- if (v.meta.version > max) {
26
- max = v.meta.version;
27
- candidate = v;
28
- }
24
+ if (v.meta.key !== key) continue;
25
+ if (!candidate || compareVersions(v.meta.version, candidate.meta.version) > 0) candidate = v;
29
26
  }
30
27
  return candidate;
31
28
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DocBlock, DocBlockLink, DocKind, DocVisibility } from "./docs/types.js";
2
2
  import { PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationSpec, PresentationSpecMeta, PresentationTarget, definePresentation } from "./presentations/presentations.js";
3
- import { DocPresentationOptions, DocPresentationRoute, docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes } from "./docs/presentations.js";
3
+ import { DocPresentationOptions, DocPresentationRoute, docBlockToPresentationSpec, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes } from "./docs/presentations.js";
4
4
  import { DocId, DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks } from "./docs/registry.js";
5
5
  import { techContractsDocs } from "./docs/tech-contracts.docs.js";
6
6
  import { metaDocs } from "./docs/meta.docs.js";
@@ -10,9 +10,8 @@ import { CapabilityKind, CapabilityMeta, CapabilityRef, CapabilityRegistry, Capa
10
10
  import { openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, registerOpenBankingCapabilities } from "./capabilities/openbanking.js";
11
11
  import "./capabilities/index.js";
12
12
  import { AttributeMatcher, ConsentDefinition, FieldPolicyRule, PIIPolicy, PolicyCondition, PolicyEffect, PolicyMeta, PolicyOPAConfig, PolicyRef, PolicyRule, PolicySpec, RateLimitDefinition, RelationshipDefinition, RelationshipMatcher, ResourceMatcher, SubjectMatcher } from "./policy/spec.js";
13
- import { TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyThreshold, TelemetryConfig, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySpec, makeTelemetryKey } from "./telemetry/spec.js";
14
- import { AllocationStrategy, ExperimentMeta, ExperimentOverride, ExperimentOverrideType, ExperimentRef, ExperimentRegistry, ExperimentSpec, ExperimentVariant, MetricAggregation, SuccessMetric, TargetingRule, makeExperimentKey } from "./experiments/spec.js";
15
13
  import { FilterableItem, GroupKeyFn, GroupedItems, GroupingStrategies, RegistryFilter, filterBy, getUniqueDomains, getUniqueOwners, getUniqueTags, groupBy, groupByMultiple, groupByToArray } from "./registry-utils.js";
14
+ import { TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyThreshold, TelemetryConfig, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySpec, makeTelemetryKey } from "./telemetry/spec.js";
16
15
  import { TelemetryAnomalyEvent, TelemetryAnomalyMonitor, TelemetryAnomalyMonitorOptions } from "./telemetry/anomaly.js";
17
16
  import { RuntimeTelemetryProvider, TelemetryDispatch, TelemetryEventContext, TelemetryTracker, TelemetryTrackerOptions } from "./telemetry/tracker.js";
18
17
  import "./telemetry/index.js";
@@ -32,15 +31,16 @@ import { AppKnowledgeBinding } from "./knowledge/binding.js";
32
31
  import { BlueprintTranslationCatalog, Locale, MessageKey, PlatformTranslationCatalog, TranslationCatalogMeta, TranslationEntry } from "./translations/catalog.js";
33
32
  import { AppBlueprintMeta, AppBlueprintRegistry, AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TenantAppConfig, TenantAppConfigMeta, TenantRouteOverride, TenantSpecOverride, TranslationCatalogPointer, makeAppBlueprintKey } from "./app-config/spec.js";
34
33
  import { AppComposition, AppCompositionDeps, ComposeOptions, MissingReference, ResolveAppConfigDeps, ResolvedAppConfig, ResolvedIntegration, ResolvedKnowledge, ResolvedTranslation, composeAppConfig, resolveAppConfig } from "./app-config/runtime.js";
35
- import { ResourceMeta, ResourceRefDescriptor, ResourceRegistry, ResourceTemplateSpec, defineResourceTemplate, isResourceRef, resourceRef } from "./resources.js";
36
- import { RuntimeContract, SpecVariantResolver } from "./experiments/spec-resolver.js";
37
- import { Actor, Channel, ContractSpecType, EventPublisher, FieldLevelDecision, HandlerCtx, PolicyDecider, PolicyDeciderInput, PolicyDecision, RateLimiter, TranslationResolver } from "./types.js";
38
34
  import { AnyEventSpec, EventEnvelope, EventKey, EventRegistry, EventSpec, EventSpecMeta, defineEvent, eventKey } from "./events.js";
35
+ import { ResourceMeta, ResourceRefDescriptor, ResourceRegistry, ResourceTemplateSpec, defineResourceTemplate, isResourceRef, resourceRef } from "./resources.js";
39
36
  import { Action, Assertion, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, TestRegistry, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, makeTestKey } from "./tests/spec.js";
40
37
  import { AnyOperationSpec, EmitDecl, EmitDeclInline, EmitDeclRef, ImplementationRef, ImplementationType, OpKind, OperationSpec, OperationSpecMeta, TelemetryTrigger, defineCommand, defineQuery, isEmitDeclRef } from "./operations/operation.js";
41
38
  import { EventParam, HandlerForOperationSpec, OperationSpecInput, OperationSpecOutput, RuntimeSpecOutput, ZodOperationSpecInput, installOp, makeEmit, op } from "./install.js";
42
39
  import { OperationKey, OperationSpecRegistry, opKey } from "./operations/registry.js";
43
40
  import "./operations/index.js";
41
+ import { RuntimeContract, SpecVariantResolver } from "./experiments/spec-resolver.js";
42
+ import { Actor, Channel, ContractSpecType, EventPublisher, FieldLevelDecision, HandlerCtx, PolicyDecider, PolicyDeciderInput, PolicyDecision, RateLimiter, TranslationResolver } from "./types.js";
43
+ import { AllocationStrategy, ExperimentMeta, ExperimentOverride, ExperimentOverrideType, ExperimentRef, ExperimentRegistry, ExperimentSpec, ExperimentVariant, MetricAggregation, SuccessMetric, TargetingRule, makeExperimentKey } from "./experiments/spec.js";
44
44
  import { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, OpRef, PresentationRef } from "./features/types.js";
45
45
  import { FeatureRegistry } from "./features/registry.js";
46
46
  import { ComponentMap, PresentationRenderer, PresentationValidator, ReactRenderDescriptor, RenderContext, TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer } from "./presentations/transform-engine.js";
@@ -48,7 +48,7 @@ import { PresentationRegistry } from "./presentations/registry.js";
48
48
  import "./presentations/index.js";
49
49
  import { InstallFeatureDeps, installFeature } from "./features/install.js";
50
50
  import { validateFeatureTargetsV2 } from "./features/validation.js";
51
- import "./features/index.js";
51
+ import { defineFeature } from "./features/index.js";
52
52
  import { createEngineWithDefaults, createFeatureModule, registerFeature, renderFeaturePresentation } from "./client/react/feature-render.js";
53
53
  import { ArrayFieldSpec, BaseFieldSpec, CheckboxFieldSpec, ConstraintDecl, ConstraintHandler, EnhanceFields, FieldSpec, FormAction, FormOption, FormRegistry, FormSpec, FormValuesFor, GroupFieldSpec, OptionsSource, Predicate, PredicateOp, RadioFieldSpec, SelectFieldSpec, SwitchFieldSpec, TextFieldSpec, TextareaFieldSpec, TypedOptionsSource, TypedPredicate, TypedWhenClause, WhenClause, buildZodWithRelations, defineFormSpec, evalPredicate } from "./forms/forms.js";
54
54
  import "./forms/index.js";
@@ -143,5 +143,10 @@ import { docBlockToMarkdown, eventToMarkdown, exportFeature, exportSpec, feature
143
143
  import { AGENT_SYSTEM_PROMPTS, formatPlanForAgent, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt } from "./llm/prompts.js";
144
144
  import "./llm/index.js";
145
145
  import { ValidationContext, ValidationIssue, ValidationResult, ValidationSeverity, validateBlueprint, validateConfig, validateResolvedConfig, validateTenantConfig } from "./app-config/validation.js";
146
+ import { ExampleDocumentation, ExampleEntrypoints, ExampleKind, ExampleKindEnum, ExampleMcpSupport, ExampleMeta, ExampleSandboxMode, ExampleSandboxModeEnum, ExampleSandboxSupport, ExampleSpec, ExampleStudioSupport, ExampleSurfaces, ExampleVisibility, ExampleVisibilityEnum, isExampleKind, isExampleVisibility, isFeatureRef, isSpecPointer } from "./examples/types.js";
147
+ import { ExampleDocumentationSchema, ExampleEntrypointsSchema, ExampleKindSchema, ExampleMetaSchema, ExampleSandboxModeSchema, ExampleSpecSchema, ExampleSurfacesSchema, ExampleVisibilitySchema, parseExampleDocumentation, parseExampleEntrypoints, parseExampleMeta, parseExampleSpec, parseExampleSurfaces, safeParseExampleSpec } from "./examples/schema.js";
148
+ import { ExampleRegistry } from "./examples/registry.js";
149
+ import { CrossValidationContext, ExampleValidationError, ExampleValidationWarning, ValidateExampleResult, ValidateExamplesResult, validateExample, validateExampleReferences, validateExamples } from "./examples/validation.js";
150
+ import "./examples/index.js";
146
151
  import { defineSchemaModel } from "@contractspec/lib.schema";
147
- export { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, Action, ActionExecutionResult, Actor, AgentPrompt, AgentType, AllocationStrategy, AnyEventSpec, AnyOperationSpec, AppBlueprintMeta, AppBlueprintRegistry, AppBlueprintSpec, AppComposition, AppCompositionDeps, AppIntegrationBinding, AppIntegrationSlot, AppKnowledgeBinding, AppRouteConfig, AppThemeBinding, ArrayFieldSpec, Assertion, AssertionResult, AttributeMatcher, BankAccountRecord, BankTransactionRecord, BaseFieldSpec, BatchExportOptions, BehaviorSignal, BehaviorSignalEnvelope, BehaviorSignalProvider, BlueprintTranslationCatalog, BlueprintUpdater, CalendarAttendee, CalendarEvent, CalendarEventInput, CalendarEventUpdateInput, CalendarListEventsQuery, CalendarListEventsResult, CalendarProvider, CalendarReminder, CapabilityKind, CapabilityMeta, CapabilityRef, CapabilityRegistry, CapabilityRequirement, CapabilitySpec, CapabilitySurface, CapabilitySurfaceRef, CapturePaymentInput, Channel, CheckboxFieldSpec, CompensationStep, CompensationStrategy, CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, ComponentMap, ComponentVariantDefinition, ComponentVariantSpec, ComposeOptions, ComputationMap, ConnectionStatus, ConsentDefinition, ConstraintDecl, ConstraintHandler, ContractRegistryFile, ContractRegistryFileSchema, ContractRegistryItem, ContractRegistryItemParsed, ContractRegistryItemSchema, ContractRegistryItemType, ContractRegistryItemTypeSchema, ContractRegistryManifest, ContractRegistryManifestParsed, ContractRegistryManifestSchema, ContractSpecType, ContractsrcConfig, ContractsrcSchema, CoverageRequirement, CreateCustomerInput, CreateIntegrationConnection, CreateKnowledgeSource, CreatePaymentIntentInput, CreateRendererOptions, DEFAULT_CONTRACTSRC, DataMigrationStep, DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, DataViewRef, DataViewRegistry, DataViewSections, DataViewSource, DataViewSpec, DataViewStates, DataViewTableColumn, DataViewTableConfig, DecisionContext, DeleteIntegrationConnection, DeleteKnowledgeSource, DeleteObjectInput, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, DocBlock, DocBlockLink, DocId, DocKind, DocPresentationOptions, DocPresentationRoute, DocRegistry, DocVisibility, DriverSlots, EmailAddress, EmailAttachment, EmailInboundProvider, EmailMessage, EmailMessagesSinceQuery, EmailOutboundMessage, EmailOutboundProvider, EmailOutboundResult, EmailThread, EmailThreadListQuery, EmbeddingDocument, EmbeddingProvider, EmbeddingResult, EmbeddingVector, EmitDecl, EmitDeclInline, EmitDeclRef, EnhanceFields, ErrorSignal, ErrorSignalEnvelope, ErrorSignalProvider, EventEnvelope, EventKey, EventParam, EventPublisher, EventRef, EventRegistry, EventSpec, EventSpecMeta, ExecutionStatus, ExecutorProposalSink, ExecutorResultPayload, ExecutorSinkLogger, ExecutorSinkOptions, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, ExperimentContext, ExperimentEvaluation, ExperimentEvaluator, ExperimentEvaluatorConfig, ExperimentMeta, ExperimentOverride, ExperimentOverrideType, ExperimentRef, ExperimentRegistry, ExperimentSpec, ExperimentVariant, ExportableItem, ExpressionContext, FeatureExportOptions, FeatureExportResult, FeatureFlagState, FeatureLookup, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, FeatureRegistry, FieldLevelDecision, FieldPolicyRule, FieldSpec, FileStateStoreOptions, FilterableItem, Fixture, FolderConventions, FolderConventionsSchema, FormAction, FormOption, FormRef, FormRegistry, FormSpec, FormValuesFor, FormatterConfig, FormatterConfigSchema, FormatterType, FormatterTypeSchema, GetObjectResult, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupFieldSpec, GroupKeyFn, GroupedItems, GroupingStrategies, GuardCondition, GuardConditionKind, GuardContext, GuardEvaluator, HandlerCtx, HandlerForOperationSpec, ImplementationPlan, ImplementationRef, ImplementationType, InMemoryStateStore, InstallFeatureDeps, IntegrationByokSetup, IntegrationCapabilityMapping, IntegrationCategory, IntegrationConfigSchema, IntegrationConnection, IntegrationConnectionHealth, IntegrationConnectionMeta, IntegrationHealthCheck, IntegrationMeta, IntegrationOwnershipMode, IntegrationSecretSchema, IntegrationSpec, IntegrationSpecRegistry, IntegrationUsageMetrics, JsonSchema, KnowledgeAccessPolicy, KnowledgeCategory, KnowledgeIndexingConfig, KnowledgeRetentionPolicy, KnowledgeSourceConfig, KnowledgeSourceMeta, KnowledgeSourceType, KnowledgeSpaceMeta, KnowledgeSpaceRegistry, KnowledgeSpaceSpec, LLMChatOptions, LLMContentPart, LLMExportFormat, LLMMessage, LLMProvider, LLMResponse, LLMRole, LLMStreamChunk, LLMTextPart, LLMTokenUsage, LLMToolCallPart, LLMToolDefinition, LLMToolResultPart, ListIntegrationConnections, ListInvoicesQuery, ListKnowledgeSources, ListObjectsQuery, ListObjectsResult, ListTransactionsQuery, Locale, MessageKey, MetricAggregation, MigrationCheck, MigrationExecutor, MigrationMeta, MigrationPlan, MigrationRegistry, MigrationSpec, MigrationStep, MigrationStepBase, MigrationStepKind, MissingReference, ModelRegistry, Money, OPAAdapterOptions, OPAClient, OPAEvaluationResult, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, ObjectStorageProvider, OpKind, OpRef, OpenApiConfig, OpenApiConfigSchema, OpenApiDocument, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiExportOptions, OpenApiServer, OpenApiSourceConfig, OpenApiSourceConfigSchema, OpenBankingAccountBalance, OpenBankingAccountDetails, OpenBankingAccountOwnership, OpenBankingAccountSummary, OpenBankingBalanceType, OpenBankingConnectionStatus, OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetAccountDetailsParams, OpenBankingGetBalances, OpenBankingGetBalancesParams, OpenBankingGetConnectionStatusParams, OpenBankingGuardResult, OpenBankingListAccounts, OpenBankingListAccountsParams, OpenBankingListAccountsResult, OpenBankingListTransactions, OpenBankingListTransactionsParams, OpenBankingListTransactionsResult, OpenBankingProvider, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, OpenBankingTelemetryEvent, OpenBankingTransaction, OperationExecutor, OperationExecutorContext, OperationKey, OperationSpec, OperationSpecInput, OperationSpecMeta, OperationSpecOutput, OperationSpecRegistry, OperationTargetRef, OptionsSource, Owner, OwnerShipMeta, Owners, OwnersEnum, PIIPolicy, PaymentCustomer, PaymentIntent, PaymentIntentStatus, PaymentInvoice, PaymentRefund, PaymentTransaction, PaymentsProvider, PlatformTranslationCatalog, PolicyCondition, PolicyDecider, PolicyDeciderInput, PolicyDecision, PolicyEffect, PolicyEngine, PolicyMeta, PolicyOPAConfig, PolicyRef, PolicyRegistry, PolicyRule, PolicySpec, Predicate, PredicateOp, PresentationRef, PresentationRegistry, PresentationRenderer, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationSpec, PresentationSpecMeta, PresentationTarget, PresentationValidator, PrismaStateStore, PromptArg, PromptContentPart, PromptMeta, PromptPolicy, PromptRegistry, PromptSpec, PromptStability, ProposalAction, ProposalBlocker, ProposalConfidence, ProposalExecutionResult, ProposalExecutor, ProposalExecutorDeps, ProposalExecutorOptions, ProposalSink, ProposalTarget, PutObjectInput, RadioFieldSpec, RateLimitDefinition, RateLimiter, ReactRenderDescriptor, RefundPaymentInput, RegenerationContext, RegenerationRule, RegenerationTrigger, RegeneratorOptions, RegeneratorService, RegeneratorSignal, RegistryFilter, RelationshipDefinition, RelationshipMatcher, RenderContext, RenderOptions, ResolveAppConfigDeps, ResolvedAppConfig, ResolvedIntegration, ResolvedKnowledge, ResolvedTranslation, ResolverMap, ResourceContext, ResourceMatcher, ResourceMeta, ResourceRefDescriptor, ResourceRegistry, ResourceTemplateSpec, RestOptions, RetryPolicy, RnReusablesDriver, RunMigrationsAction, RunTestsAction, RuntimeContract, RuntimeSpecOutput, RuntimeTelemetryProvider, SLA, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput, ScenarioRunResult, SchemaFormat, SchemaFormatSchema, SchemaMarkdownOptions, SchemaMigrationStep, SelectFieldSpec, SendSmsInput, ShadcnDriver, SignalAdapters, SignedUrlOptions, SmsDeliveryStatus, SmsMessage, SmsProvider, SpecChangeProposal, SpecExportOptions, SpecExportResult, SpecLookup, SpecPointer, SpecVariantResolver, Stability, StabilityEnum, StateStore, Step, StepAction, StepExecution, StepType, StorageObjectBody, StorageObjectMetadata, SubjectContext, SubjectMatcher, SubjectRelationship, SuccessMetric, SwitchFieldSpec, Tag, Tags, TagsEnum, TargetingRule, TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyEvent, TelemetryAnomalyMonitor, TelemetryAnomalyMonitorOptions, TelemetryAnomalyThreshold, TelemetryBinding, TelemetryConfig, TelemetryDispatch, TelemetryEventContext, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySignal, TelemetrySignalEnvelope, TelemetrySignalProvider, TelemetrySpec, TelemetryTracker, TelemetryTrackerOptions, TelemetryTrigger, TenantAppConfig, TenantAppConfigMeta, TenantConfigUpdater, TenantRouteOverride, TenantSpecOverride, TenantTranslationOverride, TestExecutor, TestIntegrationConnection, TestRegistry, TestRunResult, TestRunner, TestRunnerConfig, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, TextFieldSpec, TextareaFieldSpec, ThemeMeta, ThemeOverride, ThemeRef, ThemeRegistry, ThemeScope, ThemeSpec, ThemeToken, ThemeTokens, TokenCountResult, TransformEngine, Transition, TranslationCatalogMeta, TranslationCatalogPointer, TranslationEntry, TranslationResolver, TriggerKnowledgeSourceSync, TriggerRegenerationAction, TypedOptionsSource, TypedPredicate, TypedWhenClause, UpdateBlueprintAction, UpdateIntegrationConnection, UpdateKnowledgeSource, UpdateTenantConfigAction, ValidateWorkflowSpecOptions, ValidationContext, ValidationIssue, ValidationMigrationStep, ValidationResult, ValidationSeverity, VectorDeleteRequest, VectorDocument, VectorSearchQuery, VectorSearchResult, VectorStoreProvider, VectorUpsertRequest, VerificationIssue, VerificationReport, VerificationTier, Voice, VoiceProvider, VoiceSynthesisInput, VoiceSynthesisResult, WhenClause, WorkflowDefinition, WorkflowMeta, WorkflowPreFlightError, WorkflowPreFlightIssue, WorkflowPreFlightIssueSeverity, WorkflowPreFlightIssueType, WorkflowPreFlightResult, WorkflowRegistry, WorkflowRunner, WorkflowRunnerConfig, WorkflowSpec, WorkflowState, WorkflowStateFilters, WorkflowStatus, WorkflowTargetRef, WorkflowValidationError, WorkflowValidationIssue, WorkflowValidationLevel, ZodOperationSpecInput, assertPrimaryOpenBankingReady, assertWorkflowSpecValid, behaviorToEnvelope, buildOPAInput, buildZodWithRelations, capabilityKey, composeAppConfig, createDefaultIntegrationSpecRegistry, createDefaultTransformEngine, createEngineWithDefaults, createFeatureModule, createFetchHandler, createFileStateStore, createFormRenderer, createMcpServer, dataViewKey, defaultDocRegistry, defaultGqlField, defaultMcpTool, defaultRestPath, defineCapability, defineCommand, defineDataView, defineEvent, defineFormSpec, definePresentation, definePrompt, defineQuery, defineResourceTemplate, defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, filterBy, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, getUniqueDomains, getUniqueOwners, getUniqueTags, gmailIntegrationSpec, googleCalendarIntegrationSpec, groupBy, groupByMultiple, groupByToArray, installFeature, installOp, integrationContracts, isEmitDeclRef, isResourceRef, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, operationSpecToAgentPrompt, operationSpecToContextMarkdown, operationSpecToFullMarkdown, postmarkIntegrationSpec, powensIntegrationSpec, presentationToMarkdown, productCanonKnowledgeSpace, qdrantIntegrationSpec, redactOpenBankingTelemetryPayload, registerBasicValidation, registerContractsOnBuilder, registerDefaultReactRenderer, registerDocBlocks, registerElevenLabsIntegration, registerEmailThreadsKnowledgeSpace, registerFeature, registerFinancialDocsKnowledgeSpace, registerFinancialOverviewKnowledgeSpace, registerGcsStorageIntegration, registerGmailIntegration, registerGoogleCalendarIntegration, registerIntegrationContracts, registerKnowledgeContracts, registerMistralIntegration, registerOpenBankingCapabilities, registerOpenBankingContracts, registerPostmarkIntegration, registerPowensIntegration, registerProductCanonKnowledgeSpace, registerQdrantIntegration, registerReactToMarkdownRenderer, registerStripeIntegration, registerSupportFaqKnowledgeSpace, registerTwilioSmsIntegration, registerUploadedDocsKnowledgeSpace, renderFeaturePresentation, resolveAppConfig, resourceRef, rnReusablesDriver, schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable, shadcnDriver, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateBlueprint, validateConfig, validateFeatureTargetsV2, validateResolvedConfig, validateTenantConfig, validateWorkflowSpec };
152
+ export { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, Action, ActionExecutionResult, Actor, AgentPrompt, AgentType, AllocationStrategy, AnyEventSpec, AnyOperationSpec, AppBlueprintMeta, AppBlueprintRegistry, AppBlueprintSpec, AppComposition, AppCompositionDeps, AppIntegrationBinding, AppIntegrationSlot, AppKnowledgeBinding, AppRouteConfig, AppThemeBinding, ArrayFieldSpec, Assertion, AssertionResult, AttributeMatcher, BankAccountRecord, BankTransactionRecord, BaseFieldSpec, BatchExportOptions, BehaviorSignal, BehaviorSignalEnvelope, BehaviorSignalProvider, BlueprintTranslationCatalog, BlueprintUpdater, CalendarAttendee, CalendarEvent, CalendarEventInput, CalendarEventUpdateInput, CalendarListEventsQuery, CalendarListEventsResult, CalendarProvider, CalendarReminder, CapabilityKind, CapabilityMeta, CapabilityRef, CapabilityRegistry, CapabilityRequirement, CapabilitySpec, CapabilitySurface, CapabilitySurfaceRef, CapturePaymentInput, Channel, CheckboxFieldSpec, CompensationStep, CompensationStrategy, CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, ComponentMap, ComponentVariantDefinition, ComponentVariantSpec, ComposeOptions, ComputationMap, ConnectionStatus, ConsentDefinition, ConstraintDecl, ConstraintHandler, ContractRegistryFile, ContractRegistryFileSchema, ContractRegistryItem, ContractRegistryItemParsed, ContractRegistryItemSchema, ContractRegistryItemType, ContractRegistryItemTypeSchema, ContractRegistryManifest, ContractRegistryManifestParsed, ContractRegistryManifestSchema, ContractSpecType, ContractsrcConfig, ContractsrcSchema, CoverageRequirement, CreateCustomerInput, CreateIntegrationConnection, CreateKnowledgeSource, CreatePaymentIntentInput, CreateRendererOptions, CrossValidationContext, DEFAULT_CONTRACTSRC, DataMigrationStep, DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, DataViewRef, DataViewRegistry, DataViewSections, DataViewSource, DataViewSpec, DataViewStates, DataViewTableColumn, DataViewTableConfig, DecisionContext, DeleteIntegrationConnection, DeleteKnowledgeSource, DeleteObjectInput, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, DocBlock, DocBlockLink, DocId, DocKind, DocPresentationOptions, DocPresentationRoute, DocRegistry, DocVisibility, DriverSlots, EmailAddress, EmailAttachment, EmailInboundProvider, EmailMessage, EmailMessagesSinceQuery, EmailOutboundMessage, EmailOutboundProvider, EmailOutboundResult, EmailThread, EmailThreadListQuery, EmbeddingDocument, EmbeddingProvider, EmbeddingResult, EmbeddingVector, EmitDecl, EmitDeclInline, EmitDeclRef, EnhanceFields, ErrorSignal, ErrorSignalEnvelope, ErrorSignalProvider, EventEnvelope, EventKey, EventParam, EventPublisher, EventRef, EventRegistry, EventSpec, EventSpecMeta, ExampleDocumentation, ExampleDocumentationSchema, ExampleEntrypoints, ExampleEntrypointsSchema, ExampleKind, ExampleKindEnum, ExampleKindSchema, ExampleMcpSupport, ExampleMeta, ExampleMetaSchema, ExampleRegistry, ExampleSandboxMode, ExampleSandboxModeEnum, ExampleSandboxModeSchema, ExampleSandboxSupport, ExampleSpec, ExampleSpecSchema, ExampleStudioSupport, ExampleSurfaces, ExampleSurfacesSchema, ExampleValidationError, ExampleValidationWarning, ExampleVisibility, ExampleVisibilityEnum, ExampleVisibilitySchema, ExecutionStatus, ExecutorProposalSink, ExecutorResultPayload, ExecutorSinkLogger, ExecutorSinkOptions, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, ExperimentContext, ExperimentEvaluation, ExperimentEvaluator, ExperimentEvaluatorConfig, ExperimentMeta, ExperimentOverride, ExperimentOverrideType, ExperimentRef, ExperimentRegistry, ExperimentSpec, ExperimentVariant, ExportableItem, ExpressionContext, FeatureExportOptions, FeatureExportResult, FeatureFlagState, FeatureLookup, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, FeatureRegistry, FieldLevelDecision, FieldPolicyRule, FieldSpec, FileStateStoreOptions, FilterableItem, Fixture, FolderConventions, FolderConventionsSchema, FormAction, FormOption, FormRef, FormRegistry, FormSpec, FormValuesFor, FormatterConfig, FormatterConfigSchema, FormatterType, FormatterTypeSchema, GetObjectResult, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupFieldSpec, GroupKeyFn, GroupedItems, GroupingStrategies, GuardCondition, GuardConditionKind, GuardContext, GuardEvaluator, HandlerCtx, HandlerForOperationSpec, ImplementationPlan, ImplementationRef, ImplementationType, InMemoryStateStore, InstallFeatureDeps, IntegrationByokSetup, IntegrationCapabilityMapping, IntegrationCategory, IntegrationConfigSchema, IntegrationConnection, IntegrationConnectionHealth, IntegrationConnectionMeta, IntegrationHealthCheck, IntegrationMeta, IntegrationOwnershipMode, IntegrationSecretSchema, IntegrationSpec, IntegrationSpecRegistry, IntegrationUsageMetrics, JsonSchema, KnowledgeAccessPolicy, KnowledgeCategory, KnowledgeIndexingConfig, KnowledgeRetentionPolicy, KnowledgeSourceConfig, KnowledgeSourceMeta, KnowledgeSourceType, KnowledgeSpaceMeta, KnowledgeSpaceRegistry, KnowledgeSpaceSpec, LLMChatOptions, LLMContentPart, LLMExportFormat, LLMMessage, LLMProvider, LLMResponse, LLMRole, LLMStreamChunk, LLMTextPart, LLMTokenUsage, LLMToolCallPart, LLMToolDefinition, LLMToolResultPart, ListIntegrationConnections, ListInvoicesQuery, ListKnowledgeSources, ListObjectsQuery, ListObjectsResult, ListTransactionsQuery, Locale, MessageKey, MetricAggregation, MigrationCheck, MigrationExecutor, MigrationMeta, MigrationPlan, MigrationRegistry, MigrationSpec, MigrationStep, MigrationStepBase, MigrationStepKind, MissingReference, ModelRegistry, Money, OPAAdapterOptions, OPAClient, OPAEvaluationResult, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, ObjectStorageProvider, OpKind, OpRef, OpenApiConfig, OpenApiConfigSchema, OpenApiDocument, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiExportOptions, OpenApiServer, OpenApiSourceConfig, OpenApiSourceConfigSchema, OpenBankingAccountBalance, OpenBankingAccountDetails, OpenBankingAccountOwnership, OpenBankingAccountSummary, OpenBankingBalanceType, OpenBankingConnectionStatus, OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetAccountDetailsParams, OpenBankingGetBalances, OpenBankingGetBalancesParams, OpenBankingGetConnectionStatusParams, OpenBankingGuardResult, OpenBankingListAccounts, OpenBankingListAccountsParams, OpenBankingListAccountsResult, OpenBankingListTransactions, OpenBankingListTransactionsParams, OpenBankingListTransactionsResult, OpenBankingProvider, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, OpenBankingTelemetryEvent, OpenBankingTransaction, OperationExecutor, OperationExecutorContext, OperationKey, OperationSpec, OperationSpecInput, OperationSpecMeta, OperationSpecOutput, OperationSpecRegistry, OperationTargetRef, OptionsSource, Owner, OwnerShipMeta, Owners, OwnersEnum, PIIPolicy, PaymentCustomer, PaymentIntent, PaymentIntentStatus, PaymentInvoice, PaymentRefund, PaymentTransaction, PaymentsProvider, PlatformTranslationCatalog, PolicyCondition, PolicyDecider, PolicyDeciderInput, PolicyDecision, PolicyEffect, PolicyEngine, PolicyMeta, PolicyOPAConfig, PolicyRef, PolicyRegistry, PolicyRule, PolicySpec, Predicate, PredicateOp, PresentationRef, PresentationRegistry, PresentationRenderer, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationSpec, PresentationSpecMeta, PresentationTarget, PresentationValidator, PrismaStateStore, PromptArg, PromptContentPart, PromptMeta, PromptPolicy, PromptRegistry, PromptSpec, PromptStability, ProposalAction, ProposalBlocker, ProposalConfidence, ProposalExecutionResult, ProposalExecutor, ProposalExecutorDeps, ProposalExecutorOptions, ProposalSink, ProposalTarget, PutObjectInput, RadioFieldSpec, RateLimitDefinition, RateLimiter, ReactRenderDescriptor, RefundPaymentInput, RegenerationContext, RegenerationRule, RegenerationTrigger, RegeneratorOptions, RegeneratorService, RegeneratorSignal, RegistryFilter, RelationshipDefinition, RelationshipMatcher, RenderContext, RenderOptions, ResolveAppConfigDeps, ResolvedAppConfig, ResolvedIntegration, ResolvedKnowledge, ResolvedTranslation, ResolverMap, ResourceContext, ResourceMatcher, ResourceMeta, ResourceRefDescriptor, ResourceRegistry, ResourceTemplateSpec, RestOptions, RetryPolicy, RnReusablesDriver, RunMigrationsAction, RunTestsAction, RuntimeContract, RuntimeSpecOutput, RuntimeTelemetryProvider, SLA, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput, ScenarioRunResult, SchemaFormat, SchemaFormatSchema, SchemaMarkdownOptions, SchemaMigrationStep, SelectFieldSpec, SendSmsInput, ShadcnDriver, SignalAdapters, SignedUrlOptions, SmsDeliveryStatus, SmsMessage, SmsProvider, SpecChangeProposal, SpecExportOptions, SpecExportResult, SpecLookup, SpecPointer, SpecVariantResolver, Stability, StabilityEnum, StateStore, Step, StepAction, StepExecution, StepType, StorageObjectBody, StorageObjectMetadata, SubjectContext, SubjectMatcher, SubjectRelationship, SuccessMetric, SwitchFieldSpec, Tag, Tags, TagsEnum, TargetingRule, TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyEvent, TelemetryAnomalyMonitor, TelemetryAnomalyMonitorOptions, TelemetryAnomalyThreshold, TelemetryBinding, TelemetryConfig, TelemetryDispatch, TelemetryEventContext, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySignal, TelemetrySignalEnvelope, TelemetrySignalProvider, TelemetrySpec, TelemetryTracker, TelemetryTrackerOptions, TelemetryTrigger, TenantAppConfig, TenantAppConfigMeta, TenantConfigUpdater, TenantRouteOverride, TenantSpecOverride, TenantTranslationOverride, TestExecutor, TestIntegrationConnection, TestRegistry, TestRunResult, TestRunner, TestRunnerConfig, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, TextFieldSpec, TextareaFieldSpec, ThemeMeta, ThemeOverride, ThemeRef, ThemeRegistry, ThemeScope, ThemeSpec, ThemeToken, ThemeTokens, TokenCountResult, TransformEngine, Transition, TranslationCatalogMeta, TranslationCatalogPointer, TranslationEntry, TranslationResolver, TriggerKnowledgeSourceSync, TriggerRegenerationAction, TypedOptionsSource, TypedPredicate, TypedWhenClause, UpdateBlueprintAction, UpdateIntegrationConnection, UpdateKnowledgeSource, UpdateTenantConfigAction, ValidateExampleResult, ValidateExamplesResult, ValidateWorkflowSpecOptions, ValidationContext, ValidationIssue, ValidationMigrationStep, ValidationResult, ValidationSeverity, VectorDeleteRequest, VectorDocument, VectorSearchQuery, VectorSearchResult, VectorStoreProvider, VectorUpsertRequest, VerificationIssue, VerificationReport, VerificationTier, Voice, VoiceProvider, VoiceSynthesisInput, VoiceSynthesisResult, WhenClause, WorkflowDefinition, WorkflowMeta, WorkflowPreFlightError, WorkflowPreFlightIssue, WorkflowPreFlightIssueSeverity, WorkflowPreFlightIssueType, WorkflowPreFlightResult, WorkflowRegistry, WorkflowRunner, WorkflowRunnerConfig, WorkflowSpec, WorkflowState, WorkflowStateFilters, WorkflowStatus, WorkflowTargetRef, WorkflowValidationError, WorkflowValidationIssue, WorkflowValidationLevel, ZodOperationSpecInput, assertPrimaryOpenBankingReady, assertWorkflowSpecValid, behaviorToEnvelope, buildOPAInput, buildZodWithRelations, capabilityKey, composeAppConfig, createDefaultIntegrationSpecRegistry, createDefaultTransformEngine, createEngineWithDefaults, createFeatureModule, createFetchHandler, createFileStateStore, createFormRenderer, createMcpServer, dataViewKey, defaultDocRegistry, defaultGqlField, defaultMcpTool, defaultRestPath, defineCapability, defineCommand, defineDataView, defineEvent, defineFeature, defineFormSpec, definePresentation, definePrompt, defineQuery, defineResourceTemplate, defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, filterBy, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, getUniqueDomains, getUniqueOwners, getUniqueTags, gmailIntegrationSpec, googleCalendarIntegrationSpec, groupBy, groupByMultiple, groupByToArray, installFeature, installOp, integrationContracts, isEmitDeclRef, isExampleKind, isExampleVisibility, isFeatureRef, isResourceRef, isSpecPointer, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, operationSpecToAgentPrompt, operationSpecToContextMarkdown, operationSpecToFullMarkdown, parseExampleDocumentation, parseExampleEntrypoints, parseExampleMeta, parseExampleSpec, parseExampleSurfaces, postmarkIntegrationSpec, powensIntegrationSpec, presentationToMarkdown, productCanonKnowledgeSpace, qdrantIntegrationSpec, redactOpenBankingTelemetryPayload, registerBasicValidation, registerContractsOnBuilder, registerDefaultReactRenderer, registerDocBlocks, registerElevenLabsIntegration, registerEmailThreadsKnowledgeSpace, registerFeature, registerFinancialDocsKnowledgeSpace, registerFinancialOverviewKnowledgeSpace, registerGcsStorageIntegration, registerGmailIntegration, registerGoogleCalendarIntegration, registerIntegrationContracts, registerKnowledgeContracts, registerMistralIntegration, registerOpenBankingCapabilities, registerOpenBankingContracts, registerPostmarkIntegration, registerPowensIntegration, registerProductCanonKnowledgeSpace, registerQdrantIntegration, registerReactToMarkdownRenderer, registerStripeIntegration, registerSupportFaqKnowledgeSpace, registerTwilioSmsIntegration, registerUploadedDocsKnowledgeSpace, renderFeaturePresentation, resolveAppConfig, resourceRef, rnReusablesDriver, safeParseExampleSpec, schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable, shadcnDriver, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateBlueprint, validateConfig, validateExample, validateExampleReferences, validateExamples, validateFeatureTargetsV2, validateResolvedConfig, validateTenantConfig, validateWorkflowSpec };
package/dist/index.js CHANGED
@@ -8,8 +8,10 @@ import "./presentations/index.js";
8
8
  import { FeatureRegistry } from "./features/registry.js";
9
9
  import { installFeature } from "./features/install.js";
10
10
  import { validateFeatureTargetsV2 } from "./features/validation.js";
11
+ import { defineFeature } from "./features/index.js";
11
12
  import { createEngineWithDefaults, createFeatureModule, registerFeature, renderFeaturePresentation } from "./client/react/feature-render.js";
12
13
  import { FormRegistry, buildZodWithRelations, defineFormSpec, evalPredicate } from "./forms/forms.js";
14
+ import "./forms/index.js";
13
15
  import { createFormRenderer } from "./client/react/form-render.js";
14
16
  import { shadcnDriver } from "./client/react/drivers/shadcn.js";
15
17
  import { rnReusablesDriver } from "./client/react/drivers/rn-reusables.js";
@@ -41,9 +43,11 @@ import { ModelRegistry } from "./model-registry.js";
41
43
  import { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from "./onboarding-base.js";
42
44
  import { defineDataView } from "./data-views/spec.js";
43
45
  import { DataViewRegistry, dataViewKey } from "./data-views/registry.js";
46
+ import "./data-views/index.js";
44
47
  import { PolicyRegistry } from "./policy/registry.js";
45
48
  import { PolicyEngine } from "./policy/engine.js";
46
49
  import { OPAPolicyAdapter, buildOPAInput } from "./policy/opa-adapter.js";
50
+ import "./policy/index.js";
47
51
  import { ThemeRegistry, makeThemeRef } from "./themes.js";
48
52
  import { MigrationRegistry } from "./migrations.js";
49
53
  import { TelemetryRegistry, makeTelemetryKey } from "./telemetry/spec.js";
@@ -103,7 +107,7 @@ import { InMemoryStateStore } from "./workflow/adapters/memory-store.js";
103
107
  import { PrismaStateStore } from "./workflow/adapters/db-adapter.js";
104
108
  import { createFileStateStore } from "./workflow/adapters/file-adapter.js";
105
109
  import "./workflow/index.js";
106
- import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes } from "./docs/presentations.js";
110
+ import { docBlockToPresentationSpec, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes } from "./docs/presentations.js";
107
111
  import { DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks } from "./docs/registry.js";
108
112
  import { techContractsDocs } from "./docs/tech-contracts.docs.js";
109
113
  import { metaDocs } from "./docs/meta.docs.js";
@@ -112,10 +116,15 @@ import { docBlockToMarkdown, eventToMarkdown, exportFeature, exportSpec, feature
112
116
  import { AGENT_SYSTEM_PROMPTS, formatPlanForAgent, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt } from "./llm/prompts.js";
113
117
  import "./llm/index.js";
114
118
  import { validateBlueprint, validateConfig, validateResolvedConfig, validateTenantConfig } from "./app-config/validation.js";
119
+ import { ExampleKindEnum, ExampleSandboxModeEnum, ExampleVisibilityEnum, isExampleKind, isExampleVisibility, isFeatureRef, isSpecPointer } from "./examples/types.js";
120
+ import { ExampleDocumentationSchema, ExampleEntrypointsSchema, ExampleKindSchema, ExampleMetaSchema, ExampleSandboxModeSchema, ExampleSpecSchema, ExampleSurfacesSchema, ExampleVisibilitySchema, parseExampleDocumentation, parseExampleEntrypoints, parseExampleMeta, parseExampleSpec, parseExampleSurfaces, safeParseExampleSpec } from "./examples/schema.js";
121
+ import { ExampleRegistry } from "./examples/registry.js";
122
+ import { validateExample, validateExampleReferences, validateExamples } from "./examples/validation.js";
123
+ import "./examples/index.js";
115
124
  import { defineSchemaModel } from "@contractspec/lib.schema";
116
125
 
117
126
  //#region src/index.ts
118
127
  init_registry_utils();
119
128
 
120
129
  //#endregion
121
- export { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, AppBlueprintRegistry, BankAccountRecord, BankTransactionRecord, CapabilityRegistry, CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema, ContractsrcSchema, CreateIntegrationConnection, CreateKnowledgeSource, DEFAULT_CONTRACTSRC, DataViewRegistry, DeleteIntegrationConnection, DeleteKnowledgeSource, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, DocRegistry, EventRegistry, ExecutorProposalSink, ExperimentEvaluator, ExperimentRegistry, FeatureRegistry, FolderConventionsSchema, FormRegistry, FormatterConfigSchema, FormatterTypeSchema, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupingStrategies, InMemoryStateStore, IntegrationSpecRegistry, KnowledgeSpaceRegistry, ListIntegrationConnections, ListKnowledgeSources, MigrationRegistry, ModelRegistry, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetBalances, OpenBankingListAccounts, OpenBankingListTransactions, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, OperationSpecRegistry, Owners, OwnersEnum, PolicyEngine, PolicyRegistry, PresentationRegistry, PrismaStateStore, PromptRegistry, ProposalExecutor, RegeneratorService, ResourceRegistry, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput, SchemaFormatSchema, StabilityEnum, Tags, TagsEnum, TelemetryAnomalyMonitor, TelemetryRegistry, TelemetryTracker, TestIntegrationConnection, TestRegistry, TestRunner, ThemeRegistry, TransformEngine, TriggerKnowledgeSourceSync, UpdateIntegrationConnection, UpdateKnowledgeSource, WorkflowPreFlightError, WorkflowRegistry, WorkflowRunner, WorkflowValidationError, assertPrimaryOpenBankingReady, assertWorkflowSpecValid, behaviorToEnvelope, buildOPAInput, buildZodWithRelations, capabilityKey, composeAppConfig, createDefaultIntegrationSpecRegistry, createDefaultTransformEngine, createEngineWithDefaults, createFeatureModule, createFetchHandler, createFileStateStore, createFormRenderer, createMcpServer, dataViewKey, defaultDocRegistry, defaultGqlField, defaultMcpTool, defaultRestPath, defineCapability, defineCommand, defineDataView, defineEvent, defineFormSpec, definePresentation, definePrompt, defineQuery, defineResourceTemplate, defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, filterBy, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, getUniqueDomains, getUniqueOwners, getUniqueTags, gmailIntegrationSpec, googleCalendarIntegrationSpec, groupBy, groupByMultiple, groupByToArray, installFeature, installOp, integrationContracts, isEmitDeclRef, isResourceRef, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, operationSpecToAgentPrompt, operationSpecToContextMarkdown, operationSpecToFullMarkdown, postmarkIntegrationSpec, powensIntegrationSpec, presentationToMarkdown, productCanonKnowledgeSpace, qdrantIntegrationSpec, redactOpenBankingTelemetryPayload, registerBasicValidation, registerContractsOnBuilder, registerDefaultReactRenderer, registerDocBlocks, registerElevenLabsIntegration, registerEmailThreadsKnowledgeSpace, registerFeature, registerFinancialDocsKnowledgeSpace, registerFinancialOverviewKnowledgeSpace, registerGcsStorageIntegration, registerGmailIntegration, registerGoogleCalendarIntegration, registerIntegrationContracts, registerKnowledgeContracts, registerMistralIntegration, registerOpenBankingCapabilities, registerOpenBankingContracts, registerPostmarkIntegration, registerPowensIntegration, registerProductCanonKnowledgeSpace, registerQdrantIntegration, registerReactToMarkdownRenderer, registerStripeIntegration, registerSupportFaqKnowledgeSpace, registerTwilioSmsIntegration, registerUploadedDocsKnowledgeSpace, renderFeaturePresentation, resolveAppConfig, resourceRef, rnReusablesDriver, schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable, shadcnDriver, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateBlueprint, validateConfig, validateFeatureTargetsV2, validateResolvedConfig, validateTenantConfig, validateWorkflowSpec };
130
+ export { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, AppBlueprintRegistry, BankAccountRecord, BankTransactionRecord, CapabilityRegistry, CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema, ContractsrcSchema, CreateIntegrationConnection, CreateKnowledgeSource, DEFAULT_CONTRACTSRC, DataViewRegistry, DeleteIntegrationConnection, DeleteKnowledgeSource, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, DocRegistry, EventRegistry, ExampleDocumentationSchema, ExampleEntrypointsSchema, ExampleKindEnum, ExampleKindSchema, ExampleMetaSchema, ExampleRegistry, ExampleSandboxModeEnum, ExampleSandboxModeSchema, ExampleSpecSchema, ExampleSurfacesSchema, ExampleVisibilityEnum, ExampleVisibilitySchema, ExecutorProposalSink, ExperimentEvaluator, ExperimentRegistry, FeatureRegistry, FolderConventionsSchema, FormRegistry, FormatterConfigSchema, FormatterTypeSchema, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupingStrategies, InMemoryStateStore, IntegrationSpecRegistry, KnowledgeSpaceRegistry, ListIntegrationConnections, ListKnowledgeSources, MigrationRegistry, ModelRegistry, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetBalances, OpenBankingListAccounts, OpenBankingListTransactions, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, OperationSpecRegistry, Owners, OwnersEnum, PolicyEngine, PolicyRegistry, PresentationRegistry, PrismaStateStore, PromptRegistry, ProposalExecutor, RegeneratorService, ResourceRegistry, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput, SchemaFormatSchema, StabilityEnum, Tags, TagsEnum, TelemetryAnomalyMonitor, TelemetryRegistry, TelemetryTracker, TestIntegrationConnection, TestRegistry, TestRunner, ThemeRegistry, TransformEngine, TriggerKnowledgeSourceSync, UpdateIntegrationConnection, UpdateKnowledgeSource, WorkflowPreFlightError, WorkflowRegistry, WorkflowRunner, WorkflowValidationError, assertPrimaryOpenBankingReady, assertWorkflowSpecValid, behaviorToEnvelope, buildOPAInput, buildZodWithRelations, capabilityKey, composeAppConfig, createDefaultIntegrationSpecRegistry, createDefaultTransformEngine, createEngineWithDefaults, createFeatureModule, createFetchHandler, createFileStateStore, createFormRenderer, createMcpServer, dataViewKey, defaultDocRegistry, defaultGqlField, defaultMcpTool, defaultRestPath, defineCapability, defineCommand, defineDataView, defineEvent, defineFeature, defineFormSpec, definePresentation, definePrompt, defineQuery, defineResourceTemplate, defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, filterBy, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, getUniqueDomains, getUniqueOwners, getUniqueTags, gmailIntegrationSpec, googleCalendarIntegrationSpec, groupBy, groupByMultiple, groupByToArray, installFeature, installOp, integrationContracts, isEmitDeclRef, isExampleKind, isExampleVisibility, isFeatureRef, isResourceRef, isSpecPointer, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, operationSpecToAgentPrompt, operationSpecToContextMarkdown, operationSpecToFullMarkdown, parseExampleDocumentation, parseExampleEntrypoints, parseExampleMeta, parseExampleSpec, parseExampleSurfaces, postmarkIntegrationSpec, powensIntegrationSpec, presentationToMarkdown, productCanonKnowledgeSpace, qdrantIntegrationSpec, redactOpenBankingTelemetryPayload, registerBasicValidation, registerContractsOnBuilder, registerDefaultReactRenderer, registerDocBlocks, registerElevenLabsIntegration, registerEmailThreadsKnowledgeSpace, registerFeature, registerFinancialDocsKnowledgeSpace, registerFinancialOverviewKnowledgeSpace, registerGcsStorageIntegration, registerGmailIntegration, registerGoogleCalendarIntegration, registerIntegrationContracts, registerKnowledgeContracts, registerMistralIntegration, registerOpenBankingCapabilities, registerOpenBankingContracts, registerPostmarkIntegration, registerPowensIntegration, registerProductCanonKnowledgeSpace, registerQdrantIntegration, registerReactToMarkdownRenderer, registerStripeIntegration, registerSupportFaqKnowledgeSpace, registerTwilioSmsIntegration, registerUploadedDocsKnowledgeSpace, renderFeaturePresentation, resolveAppConfig, resourceRef, rnReusablesDriver, safeParseExampleSpec, schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable, shadcnDriver, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateBlueprint, validateConfig, validateExample, validateExampleReferences, validateExamples, validateFeatureTargetsV2, validateResolvedConfig, validateTenantConfig, validateWorkflowSpec };
package/dist/install.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { ResourceRefDescriptor } from "./resources.js";
2
- import { HandlerCtx } from "./types.js";
3
1
  import { EventSpec } from "./events.js";
2
+ import { ResourceRefDescriptor } from "./resources.js";
4
3
  import { AnyOperationSpec, EmitDecl, OperationSpec } from "./operations/operation.js";
5
4
  import { OperationSpecRegistry } from "./operations/registry.js";
6
5
  import "./operations/index.js";
6
+ import { HandlerCtx } from "./types.js";
7
7
  import { AnySchemaModel, ZodSchemaModel } from "@contractspec/lib.schema";
8
- import * as z$1 from "zod";
8
+ import * as z$2 from "zod";
9
9
 
10
10
  //#region src/install.d.ts
11
11
  /** Infer input/output types from a OperationSpec */
@@ -24,12 +24,12 @@ type EventParam<S extends OperationSpec<AnySchemaModel, AnySchemaModel | Resourc
24
24
  };
25
25
  } ? E extends {
26
26
  key: string;
27
- version: number;
27
+ version: string;
28
28
  payload: AnySchemaModel;
29
29
  } ? {
30
30
  key: E['key'];
31
31
  version: E['version'];
32
- payload: z$1.infer<ReturnType<E['payload']['getZod']>>;
32
+ payload: z$2.infer<ReturnType<E['payload']['getZod']>>;
33
33
  } : never : never;
34
34
  /** Build a type union of allowed events for a spec */
35
35
  type AllowedEventUnion<S extends OperationSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>> = S['sideEffects'] extends {
@@ -39,22 +39,22 @@ type AllowedEventUnion<S extends OperationSpec<AnySchemaModel, AnySchemaModel |
39
39
  } ? {
40
40
  key: S['sideEffects']['emits'][K]['ref']['meta']['key'];
41
41
  version: S['sideEffects']['emits'][K]['ref']['meta']['version'];
42
- payload: z$1.infer<ReturnType<P['getZod']>>;
42
+ payload: z$2.infer<ReturnType<P['getZod']>>;
43
43
  } : S['sideEffects']['emits'][K] extends {
44
44
  key: infer N extends string;
45
- version: infer V extends number;
45
+ version: infer V extends string;
46
46
  payload: infer Q extends AnySchemaModel;
47
47
  } ? {
48
48
  key: N;
49
49
  version: V;
50
- payload: z$1.infer<ReturnType<Q['getZod']>>;
50
+ payload: z$2.infer<ReturnType<Q['getZod']>>;
51
51
  } : never }[number] : never;
52
52
  /** Typed emit for a given spec (validates at runtime through ctx.__emitGuard__). */
53
53
  declare function makeEmit<S extends AnyOperationSpec>(_spec: S, ctx: HandlerCtx): {
54
54
  /** Le plus sûr : typé via EventSpec (pas besoin de tuple dans le spec) */
55
55
  ref: <T extends AnySchemaModel>(ev: EventSpec<T>, payload: ZodSchemaModel<T>) => Promise<void>;
56
56
  /** Nom/version explicites (runtime-checked par la guard) */
57
- key: (key: string, version: number, payload: unknown) => Promise<void>;
57
+ key: (key: string, version: string, payload: unknown) => Promise<void>;
58
58
  /** Compat : objet (bénéficie du typing si votre spec a un tuple `as const`) */
59
59
  object: (evt: AllowedEventUnion<S>) => Promise<void>;
60
60
  };
@@ -23,7 +23,7 @@ interface IntegrationConnectionMeta {
23
23
  tenantId: string;
24
24
  /** Reference to IntegrationSpec. */
25
25
  integrationKey: string;
26
- integrationVersion: number;
26
+ integrationVersion: string;
27
27
  /** Human-readable label (e.g., "Production Stripe"). */
28
28
  label: string;
29
29
  environment?: string;
@@ -85,7 +85,7 @@ The manager attempts providers in priority order (environment first, then cloud
85
85
 
86
86
  ## Studio persistence (ContractSpec Studio)
87
87
 
88
- ContractSpec Studio persists tenant \`IntegrationConnection\` records in Postgres (Prisma model \`IntegrationConnection\` in \`@contractspec/lib.database-contractspec-studio\`) and exposes a platform-admin management surface (see the Studio platform admin panel).
88
+ ContractSpec Studio persists tenant \`IntegrationConnection\` records in Postgres (Prisma model \`IntegrationConnection\` in \`@contractspec/lib.database-studio\`) and exposes a platform-admin management surface (see the Studio platform admin panel).
89
89
  `
90
90
  }];
91
91
  registerDocBlocks(tech_contracts_integrations_DocBlocks);
@@ -6,7 +6,7 @@
6
6
  const IntegrationsFeature = {
7
7
  meta: {
8
8
  key: "platform.integrations",
9
- version: 1,
9
+ version: "1.0.0",
10
10
  title: "Platform Integrations",
11
11
  description: "Manage integration connections to external providers (e.g., Stripe, Qdrant)",
12
12
  domain: "platform",
@@ -21,23 +21,23 @@ const IntegrationsFeature = {
21
21
  operations: [
22
22
  {
23
23
  key: "integrations.connection.create",
24
- version: 1
24
+ version: "1.0.0"
25
25
  },
26
26
  {
27
27
  key: "integrations.connection.update",
28
- version: 1
28
+ version: "1.0.0"
29
29
  },
30
30
  {
31
31
  key: "integrations.connection.delete",
32
- version: 1
32
+ version: "1.0.0"
33
33
  },
34
34
  {
35
35
  key: "integrations.connection.list",
36
- version: 1
36
+ version: "1.0.0"
37
37
  },
38
38
  {
39
39
  key: "integrations.connection.test",
40
- version: 1
40
+ version: "1.0.0"
41
41
  }
42
42
  ],
43
43
  events: [],
@@ -47,11 +47,11 @@ const IntegrationsFeature = {
47
47
  capabilities: {
48
48
  provides: [{
49
49
  key: "integrations",
50
- version: 1
50
+ version: "1.0.0"
51
51
  }],
52
52
  requires: [{
53
53
  key: "identity",
54
- version: 1
54
+ version: "1.0.0"
55
55
  }]
56
56
  }
57
57
  };