@contractspec/lib.contracts 1.44.1 → 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.
- package/README.md +1 -1
- package/dist/app-config/app-config.feature.js +6 -6
- package/dist/app-config/contracts.d.ts +1 -1
- package/dist/app-config/contracts.js +13 -13
- package/dist/app-config/events.d.ts +8 -8
- package/dist/app-config/events.js +12 -12
- package/dist/app-config/lifecycle-contracts.d.ts +11 -11
- package/dist/app-config/lifecycle-contracts.js +19 -19
- package/dist/app-config/lifecycle.d.ts +2 -2
- package/dist/app-config/runtime.d.ts +3 -3
- package/dist/app-config/spec.d.ts +10 -12
- package/dist/app-config/spec.js +5 -26
- package/dist/capabilities/capabilities.d.ts +4 -11
- package/dist/capabilities/capabilities.js +3 -5
- package/dist/capabilities/openbanking.js +10 -10
- package/dist/client/react/form-render.js +1 -0
- package/dist/contract-registry/schemas.d.ts +8 -8
- package/dist/contract-registry/schemas.js +1 -1
- package/dist/contract-registry/types.d.ts +1 -1
- package/dist/data-views/data-views.js +1 -0
- package/dist/data-views/registry.d.ts +3 -37
- package/dist/data-views/registry.js +4 -66
- package/dist/data-views/runtime.d.ts +1 -1
- package/dist/data-views/runtime.js +2 -0
- package/dist/data-views/spec.d.ts +2 -2
- package/dist/docs/index.d.ts +2 -2
- package/dist/docs/index.js +2 -2
- package/dist/docs/presentations.d.ts +2 -4
- package/dist/docs/presentations.js +2 -4
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +1 -1
- package/dist/docs/tech/contracts/tests.docblock.js +1 -1
- package/dist/docs/tech-contracts.docs.js +1 -1
- package/dist/docs/types.d.ts +1 -1
- package/dist/events.d.ts +3 -3
- package/dist/examples/docs/examples.docblock.d.ts +6 -0
- package/dist/examples/docs/examples.docblock.js +165 -0
- package/dist/examples/index.d.ts +5 -0
- package/dist/examples/index.js +6 -0
- package/dist/examples/registry.d.ts +65 -0
- package/dist/examples/registry.js +144 -0
- package/dist/examples/schema.d.ts +282 -0
- package/dist/examples/schema.js +125 -0
- package/dist/examples/types.d.ts +167 -0
- package/dist/examples/types.js +43 -0
- package/dist/examples/validation.d.ts +65 -0
- package/dist/examples/validation.js +144 -0
- package/dist/experiments/docs/experiments.docblock.js +1 -1
- package/dist/experiments/evaluator.d.ts +1 -1
- package/dist/experiments/spec-resolver.d.ts +2 -2
- package/dist/experiments/spec.d.ts +6 -8
- package/dist/experiments/spec.js +5 -23
- package/dist/features/index.d.ts +9 -1
- package/dist/features/index.js +8 -1
- package/dist/features/install.js +2 -2
- package/dist/features/types.d.ts +7 -7
- package/dist/forms/forms.d.ts +2 -2
- package/dist/forms/forms.js +3 -6
- package/dist/index.d.ts +13 -8
- package/dist/index.js +11 -2
- package/dist/install.d.ts +9 -9
- package/dist/integrations/connection.d.ts +1 -1
- package/dist/integrations/integrations.feature.js +8 -8
- package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
- package/dist/integrations/openbanking/contracts/accounts.js +3 -3
- package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
- package/dist/integrations/openbanking/contracts/balances.js +2 -2
- package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
- package/dist/integrations/openbanking/contracts/transactions.js +2 -2
- package/dist/integrations/openbanking/models.d.ts +55 -55
- package/dist/integrations/openbanking/openbanking.feature.js +10 -10
- package/dist/integrations/operations.d.ts +102 -102
- package/dist/integrations/operations.js +10 -10
- package/dist/integrations/providers/elevenlabs.js +2 -2
- package/dist/integrations/providers/gcs-storage.js +2 -2
- package/dist/integrations/providers/gmail.js +3 -3
- package/dist/integrations/providers/google-calendar.js +2 -2
- package/dist/integrations/providers/mistral.js +3 -3
- package/dist/integrations/providers/postmark.js +2 -2
- package/dist/integrations/providers/powens.js +4 -4
- package/dist/integrations/providers/qdrant.js +3 -3
- package/dist/integrations/providers/stripe.js +2 -2
- package/dist/integrations/providers/twilio-sms.js +2 -2
- package/dist/integrations/runtime.d.ts +5 -5
- package/dist/integrations/spec.d.ts +3 -5
- package/dist/integrations/spec.js +5 -26
- package/dist/jobs/gcp-cloud-tasks.js +1 -1
- package/dist/jobs/gcp-pubsub.js +1 -1
- package/dist/jobs/handlers/ping-handler.d.ts +3 -3
- package/dist/jobs/handlers/ping-handler.js +2 -2
- package/dist/jobs/memory-queue.js +1 -1
- package/dist/jobs/queue.d.ts +4 -4
- package/dist/jobs/scaleway-sqs-queue.js +2 -2
- package/dist/jsonschema.d.ts +4 -4
- package/dist/knowledge/binding.d.ts +1 -1
- package/dist/knowledge/knowledge.feature.js +8 -8
- package/dist/knowledge/operations.d.ts +66 -66
- package/dist/knowledge/operations.js +12 -12
- package/dist/knowledge/source.d.ts +1 -1
- package/dist/knowledge/spaces/email-threads.js +2 -2
- package/dist/knowledge/spaces/financial-docs.js +2 -2
- package/dist/knowledge/spaces/financial-overview.js +2 -2
- package/dist/knowledge/spaces/product-canon.js +2 -2
- package/dist/knowledge/spaces/support-faq.js +2 -2
- package/dist/knowledge/spaces/uploaded-docs.js +2 -2
- package/dist/knowledge/spec.d.ts +3 -5
- package/dist/knowledge/spec.js +6 -28
- package/dist/llm/exporters.js +2 -2
- package/dist/llm/types.d.ts +4 -4
- package/dist/markdown.js +1 -1
- package/dist/migrations.d.ts +2 -2
- package/dist/migrations.js +7 -9
- package/dist/onboarding-base.d.ts +29 -29
- package/dist/onboarding-base.js +4 -4
- package/dist/openapi.js +9 -2
- package/dist/operations/operation.d.ts +3 -3
- package/dist/operations/registry.d.ts +9 -58
- package/dist/operations/registry.js +17 -93
- package/dist/ownership.d.ts +1 -1
- package/dist/policy/docs/policy.docblock.js +1 -1
- package/dist/policy/engine.js +2 -0
- package/dist/policy/spec.d.ts +1 -1
- package/dist/prompt.d.ts +6 -6
- package/dist/promptRegistry.d.ts +4 -4
- package/dist/promptRegistry.js +2 -5
- package/dist/regenerator/docs/regenerator.docblock.js +1 -1
- package/dist/regenerator/types.d.ts +1 -1
- package/dist/registry.d.ts +3 -2
- package/dist/registry.js +5 -5
- package/dist/resources.d.ts +5 -5
- package/dist/server/graphql-pothos.js +2 -2
- package/dist/server/mcp/registerTools.js +1 -1
- package/dist/server/rest-elysia.d.ts +1 -1
- package/dist/server/rest-elysia.js +1 -1
- package/dist/server/rest-express.d.ts +1 -1
- package/dist/server/rest-express.js +1 -1
- package/dist/server/rest-generic.d.ts +1 -1
- package/dist/server/rest-generic.js +1 -1
- package/dist/server/rest-next-app.d.ts +1 -1
- package/dist/server/rest-next-mcp.d.ts +1 -1
- package/dist/server/rest-next-mcp.js +1 -1
- package/dist/server/rest-next-pages.d.ts +1 -1
- package/dist/telemetry/docs/telemetry.docblock.js +1 -1
- package/dist/telemetry/spec.d.ts +7 -7
- package/dist/telemetry/spec.js +17 -44
- package/dist/telemetry/tracker.d.ts +2 -2
- package/dist/tests/runner.d.ts +1 -1
- package/dist/tests/spec.d.ts +5 -5
- package/dist/tests/spec.js +3 -5
- package/dist/themes.d.ts +4 -6
- package/dist/themes.js +5 -27
- package/dist/translations/catalog.d.ts +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/workflow/adapters/db-adapter.js +3 -3
- package/dist/workflow/runner.d.ts +4 -2
- package/dist/workflow/spec.d.ts +4 -17
- package/dist/workflow/spec.js +4 -48
- package/dist/workflow/state.d.ts +1 -1
- package/dist/workflow/validation.js +1 -1
- package/dist/workspace-config/contractsrc-schema.d.ts +419 -419
- package/dist/workspace-config/contractsrc-schema.js +86 -86
- package/package.json +19 -12
package/dist/features/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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 };
|
package/dist/features/index.js
CHANGED
|
@@ -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
|
-
|
|
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 };
|
package/dist/features/install.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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}`);
|
package/dist/features/types.d.ts
CHANGED
|
@@ -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:
|
|
16
|
+
version: string;
|
|
17
17
|
}
|
|
18
18
|
interface EventRef {
|
|
19
19
|
/** Event key. */
|
|
20
20
|
key: string;
|
|
21
21
|
/** Event version. */
|
|
22
|
-
version:
|
|
22
|
+
version: string;
|
|
23
23
|
}
|
|
24
24
|
interface PresentationRef {
|
|
25
25
|
/** Presentation key. */
|
|
26
26
|
key: string;
|
|
27
27
|
/** Presentation version. */
|
|
28
|
-
version:
|
|
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:
|
|
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:
|
|
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:
|
|
70
|
+
version: string;
|
|
71
71
|
/** Required targets that must be supported by the descriptor. */
|
|
72
72
|
targets: PresentationTarget[];
|
|
73
73
|
}[];
|
package/dist/forms/forms.d.ts
CHANGED
|
@@ -123,7 +123,7 @@ interface FormAction {
|
|
|
123
123
|
labelI18n: string;
|
|
124
124
|
op?: {
|
|
125
125
|
name: string;
|
|
126
|
-
version:
|
|
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?:
|
|
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. */
|
package/dist/forms/forms.js
CHANGED
|
@@ -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 (
|
|
25
|
-
if (v.meta.version >
|
|
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,
|
|
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,
|
|
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,
|
|
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$
|
|
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:
|
|
27
|
+
version: string;
|
|
28
28
|
payload: AnySchemaModel;
|
|
29
29
|
} ? {
|
|
30
30
|
key: E['key'];
|
|
31
31
|
version: E['version'];
|
|
32
|
-
payload: z$
|
|
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$
|
|
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
|
|
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$
|
|
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:
|
|
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:
|
|
26
|
+
integrationVersion: string;
|
|
27
27
|
/** Human-readable label (e.g., "Production Stripe"). */
|
|
28
28
|
label: string;
|
|
29
29
|
environment?: string;
|
|
@@ -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
|
};
|