@contractspec/example.personalization 0.0.0-canary-20260113170453
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/.turbo/turbo-build$colon$bundle.log +319 -0
- package/.turbo/turbo-build.log +321 -0
- package/CHANGELOG.md +408 -0
- package/LICENSE +21 -0
- package/dist/behavior-tracking.d.ts +5 -0
- package/dist/behavior-tracking.d.ts.map +1 -0
- package/dist/behavior-tracking.js +48 -0
- package/dist/behavior-tracking.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/personalization.docblock.d.ts +1 -0
- package/dist/docs/personalization.docblock.js +30 -0
- package/dist/docs/personalization.docblock.js.map +1 -0
- package/dist/example.d.ts +8 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +46 -0
- package/dist/example.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/libs/contracts/src/app-config/branding.d.ts +20 -0
- package/dist/libs/contracts/src/app-config/branding.d.ts.map +1 -0
- package/dist/libs/contracts/src/app-config/lifecycle.d.ts +1 -0
- package/dist/libs/contracts/src/app-config/runtime.d.ts +9 -0
- package/dist/libs/contracts/src/app-config/spec.d.ts +92 -0
- package/dist/libs/contracts/src/app-config/spec.d.ts.map +1 -0
- package/dist/libs/contracts/src/app-config/validation.d.ts +7 -0
- package/dist/libs/contracts/src/capabilities/capabilities.d.ts +16 -0
- package/dist/libs/contracts/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/libs/contracts/src/client/index.d.ts +1 -0
- package/dist/libs/contracts/src/client/react/drivers/rn-reusables.d.ts +1 -0
- package/dist/libs/contracts/src/client/react/drivers/shadcn.d.ts +1 -0
- package/dist/libs/contracts/src/client/react/feature-render.d.ts +3 -0
- package/dist/libs/contracts/src/client/react/form-render.d.ts +2 -0
- package/dist/libs/contracts/src/client/react/index.d.ts +4 -0
- package/dist/libs/contracts/src/contract-registry/index.d.ts +1 -0
- package/dist/libs/contracts/src/contract-registry/schemas.d.ts +1 -0
- package/dist/libs/contracts/src/data-views/index.d.ts +3 -0
- package/dist/libs/contracts/src/data-views/registry.d.ts +2 -0
- package/dist/libs/contracts/src/data-views/spec.d.ts +1 -0
- package/dist/libs/contracts/src/data-views/types.d.ts +1 -0
- package/dist/libs/contracts/src/docs/registry.d.ts +8 -0
- package/dist/libs/contracts/src/docs/registry.d.ts.map +1 -0
- package/dist/libs/contracts/src/events.d.ts +1 -0
- package/dist/libs/contracts/src/examples/index.d.ts +4 -0
- package/dist/libs/contracts/src/examples/registry.d.ts +2 -0
- package/dist/libs/contracts/src/examples/schema.d.ts +2 -0
- package/dist/libs/contracts/src/examples/types.d.ts +138 -0
- package/dist/libs/contracts/src/examples/types.d.ts.map +1 -0
- package/dist/libs/contracts/src/examples/validation.d.ts +1 -0
- package/dist/libs/contracts/src/experiments/spec-resolver.d.ts +3 -0
- package/dist/libs/contracts/src/experiments/spec.d.ts +11 -0
- package/dist/libs/contracts/src/experiments/spec.d.ts.map +1 -0
- package/dist/libs/contracts/src/features/index.d.ts +4 -0
- package/dist/libs/contracts/src/features/install.d.ts +4 -0
- package/dist/libs/contracts/src/features/registry.d.ts +1 -0
- package/dist/libs/contracts/src/features/types.d.ts +88 -0
- package/dist/libs/contracts/src/features/types.d.ts.map +1 -0
- package/dist/libs/contracts/src/features/validation.d.ts +1 -0
- package/dist/libs/contracts/src/index.d.ts +43 -0
- package/dist/libs/contracts/src/install.d.ts +6 -0
- package/dist/libs/contracts/src/integrations/connection.d.ts +1 -0
- package/dist/libs/contracts/src/integrations/index.d.ts +5 -0
- package/dist/libs/contracts/src/integrations/openbanking/contracts/accounts.d.ts +3 -0
- package/dist/libs/contracts/src/integrations/openbanking/contracts/balances.d.ts +3 -0
- package/dist/libs/contracts/src/integrations/openbanking/contracts/index.d.ts +5 -0
- package/dist/libs/contracts/src/integrations/openbanking/contracts/transactions.d.ts +3 -0
- package/dist/libs/contracts/src/integrations/openbanking/guards.d.ts +1 -0
- package/dist/libs/contracts/src/integrations/openbanking/openbanking.feature.d.ts +1 -0
- package/dist/libs/contracts/src/integrations/operations.d.ts +3 -0
- package/dist/libs/contracts/src/integrations/providers/elevenlabs.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/gcs-storage.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/gmail.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/google-calendar.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/index.d.ts +11 -0
- package/dist/libs/contracts/src/integrations/providers/mistral.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/postmark.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/powens.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/qdrant.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/registry.d.ts +1 -0
- package/dist/libs/contracts/src/integrations/providers/stripe.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/providers/twilio-sms.d.ts +2 -0
- package/dist/libs/contracts/src/integrations/spec.d.ts +8 -0
- package/dist/libs/contracts/src/integrations/spec.d.ts.map +1 -0
- package/dist/libs/contracts/src/jsonschema.d.ts +2 -0
- package/dist/libs/contracts/src/knowledge/index.d.ts +2 -0
- package/dist/libs/contracts/src/knowledge/operations.d.ts +3 -0
- package/dist/libs/contracts/src/knowledge/spaces/email-threads.d.ts +1 -0
- package/dist/libs/contracts/src/knowledge/spaces/financial-docs.d.ts +1 -0
- package/dist/libs/contracts/src/knowledge/spaces/financial-overview.d.ts +1 -0
- package/dist/libs/contracts/src/knowledge/spaces/index.d.ts +6 -0
- package/dist/libs/contracts/src/knowledge/spaces/product-canon.d.ts +1 -0
- package/dist/libs/contracts/src/knowledge/spaces/support-faq.d.ts +1 -0
- package/dist/libs/contracts/src/knowledge/spaces/uploaded-docs.d.ts +1 -0
- package/dist/libs/contracts/src/knowledge/spec.d.ts +1 -0
- package/dist/libs/contracts/src/llm/exporters.d.ts +6 -0
- package/dist/libs/contracts/src/llm/index.d.ts +3 -0
- package/dist/libs/contracts/src/llm/prompts.d.ts +2 -0
- package/dist/libs/contracts/src/llm/types.d.ts +3 -0
- package/dist/libs/contracts/src/onboarding-base.d.ts +1 -0
- package/dist/libs/contracts/src/openapi.d.ts +1 -0
- package/dist/libs/contracts/src/operations/index.d.ts +2 -0
- package/dist/libs/contracts/src/operations/operation.d.ts +24 -0
- package/dist/libs/contracts/src/operations/operation.d.ts.map +1 -0
- package/dist/libs/contracts/src/operations/registry.d.ts +5 -0
- package/dist/libs/contracts/src/ownership.d.ts +60 -0
- package/dist/libs/contracts/src/ownership.d.ts.map +1 -0
- package/dist/libs/contracts/src/policy/engine.d.ts +2 -0
- package/dist/libs/contracts/src/policy/index.d.ts +4 -0
- package/dist/libs/contracts/src/policy/opa-adapter.d.ts +2 -0
- package/dist/libs/contracts/src/policy/registry.d.ts +1 -0
- package/dist/libs/contracts/src/policy/spec.d.ts +9 -0
- package/dist/libs/contracts/src/policy/spec.d.ts.map +1 -0
- package/dist/libs/contracts/src/presentations/index.d.ts +3 -0
- package/dist/libs/contracts/src/presentations/presentations.d.ts +7 -0
- package/dist/libs/contracts/src/presentations/presentations.d.ts.map +1 -0
- package/dist/libs/contracts/src/presentations/registry.d.ts +1 -0
- package/dist/libs/contracts/src/presentations/transform-engine.d.ts +1 -0
- package/dist/libs/contracts/src/prompt.d.ts +1 -0
- package/dist/libs/contracts/src/promptRegistry.d.ts +2 -0
- package/dist/libs/contracts/src/regenerator/adapters.d.ts +1 -0
- package/dist/libs/contracts/src/regenerator/executor.d.ts +1 -0
- package/dist/libs/contracts/src/regenerator/index.d.ts +6 -0
- package/dist/libs/contracts/src/regenerator/service.d.ts +2 -0
- package/dist/libs/contracts/src/regenerator/sinks.d.ts +2 -0
- package/dist/libs/contracts/src/regenerator/types.d.ts +2 -0
- package/dist/libs/contracts/src/regenerator/utils.d.ts +1 -0
- package/dist/libs/contracts/src/registry.d.ts +1 -0
- package/dist/libs/contracts/src/resources.d.ts +1 -0
- package/dist/libs/contracts/src/server/graphql-pothos.d.ts +7 -0
- package/dist/libs/contracts/src/server/index.d.ts +7 -0
- package/dist/libs/contracts/src/server/mcp/createMcpServer.d.ts +5 -0
- package/dist/libs/contracts/src/server/mcp/mcpTypes.d.ts +3 -0
- package/dist/libs/contracts/src/server/provider-mcp.d.ts +1 -0
- package/dist/libs/contracts/src/server/rest-elysia.d.ts +3 -0
- package/dist/libs/contracts/src/server/rest-express.d.ts +3 -0
- package/dist/libs/contracts/src/server/rest-generic.d.ts +2 -0
- package/dist/libs/contracts/src/server/rest-next-app.d.ts +3 -0
- package/dist/libs/contracts/src/server/rest-next-pages.d.ts +3 -0
- package/dist/libs/contracts/src/tests/index.d.ts +1 -0
- package/dist/libs/contracts/src/tests/runner.d.ts +2 -0
- package/dist/libs/contracts/src/themes.d.ts +11 -0
- package/dist/libs/contracts/src/themes.d.ts.map +1 -0
- package/dist/libs/contracts/src/types.d.ts +3 -0
- package/dist/libs/contracts/src/workflow/adapters/db-adapter.d.ts +1 -0
- package/dist/libs/contracts/src/workflow/adapters/file-adapter.d.ts +1 -0
- package/dist/libs/contracts/src/workflow/adapters/index.d.ts +3 -0
- package/dist/libs/contracts/src/workflow/adapters/memory-store.d.ts +1 -0
- package/dist/libs/contracts/src/workflow/index.d.ts +5 -0
- package/dist/libs/contracts/src/workflow/runner.d.ts +5 -0
- package/dist/libs/contracts/src/workflow/spec.d.ts +89 -0
- package/dist/libs/contracts/src/workflow/spec.d.ts.map +1 -0
- package/dist/libs/contracts/src/workflow/state.d.ts +1 -0
- package/dist/libs/contracts/src/workflow/validation.d.ts +2 -0
- package/dist/libs/contracts/src/workspace-config/contractsrc-schema.d.ts +1 -0
- package/dist/libs/contracts/src/workspace-config/index.d.ts +1 -0
- package/dist/overlay-customization.d.ts +5 -0
- package/dist/overlay-customization.d.ts.map +1 -0
- package/dist/overlay-customization.js +50 -0
- package/dist/overlay-customization.js.map +1 -0
- package/dist/workflow-extension.d.ts +8 -0
- package/dist/workflow-extension.d.ts.map +1 -0
- package/dist/workflow-extension.js +67 -0
- package/dist/workflow-extension.js.map +1 -0
- package/package.json +64 -0
- package/src/behavior-tracking.ts +47 -0
- package/src/docs/index.ts +1 -0
- package/src/docs/personalization.docblock.ts +28 -0
- package/src/example.ts +32 -0
- package/src/index.ts +5 -0
- package/src/overlay-customization.ts +57 -0
- package/src/workflow-extension.ts +63 -0
- package/tsconfig.json +17 -0
- package/tsdown.config.js +6 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { OwnerShipMeta } from "../ownership.js";
|
|
2
|
+
import { PolicyRef } from "../policy/spec.js";
|
|
3
|
+
import { CapabilityRef } from "../capabilities/capabilities.js";
|
|
4
|
+
import { ExperimentRef } from "../experiments/spec.js";
|
|
5
|
+
import { FeatureRef } from "../features/types.js";
|
|
6
|
+
import "../features/index.js";
|
|
7
|
+
import { ThemeRef } from "../themes.js";
|
|
8
|
+
import { IntegrationCategory, IntegrationOwnershipMode } from "../integrations/spec.js";
|
|
9
|
+
import { BrandingDefaults } from "./branding.js";
|
|
10
|
+
import "./lifecycle.js";
|
|
11
|
+
import "../registry.js";
|
|
12
|
+
|
|
13
|
+
//#region ../../libs/contracts/src/app-config/spec.d.ts
|
|
14
|
+
interface SpecPointer {
|
|
15
|
+
key: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
}
|
|
18
|
+
interface AppRouteConfig {
|
|
19
|
+
path: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
dataView?: string;
|
|
22
|
+
workflow?: string;
|
|
23
|
+
guard?: PolicyRef;
|
|
24
|
+
featureFlag?: string;
|
|
25
|
+
experiment?: ExperimentRef;
|
|
26
|
+
}
|
|
27
|
+
interface TranslationCatalogPointer {
|
|
28
|
+
key: string;
|
|
29
|
+
version: string;
|
|
30
|
+
}
|
|
31
|
+
interface AppIntegrationSlot {
|
|
32
|
+
/** Slot identifier unique within the blueprint (e.g., "primaryPayments"). */
|
|
33
|
+
slotId: string;
|
|
34
|
+
/** Integration category required to satisfy this slot. */
|
|
35
|
+
requiredCategory: IntegrationCategory;
|
|
36
|
+
/** Ownership modes allowed for this slot (defaults to any supported mode). */
|
|
37
|
+
allowedModes?: IntegrationOwnershipMode[];
|
|
38
|
+
/** Capabilities that must be provided by the integration spec. */
|
|
39
|
+
requiredCapabilities?: CapabilityRef[];
|
|
40
|
+
/** Whether this slot must be satisfied for the app to function. */
|
|
41
|
+
required?: boolean;
|
|
42
|
+
/** Description for App Studio UX. */
|
|
43
|
+
description?: string;
|
|
44
|
+
}
|
|
45
|
+
interface FeatureFlagState {
|
|
46
|
+
key: string;
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
variant?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
}
|
|
51
|
+
interface TelemetryBinding {
|
|
52
|
+
spec?: SpecPointer;
|
|
53
|
+
disabledEvents?: string[];
|
|
54
|
+
samplingOverrides?: Record<string, number>;
|
|
55
|
+
}
|
|
56
|
+
interface AppThemeBinding {
|
|
57
|
+
primary: ThemeRef;
|
|
58
|
+
fallbacks?: ThemeRef[];
|
|
59
|
+
}
|
|
60
|
+
interface AppBlueprintMeta extends OwnerShipMeta {
|
|
61
|
+
/** Logical application id (e.g. "artisan"). */
|
|
62
|
+
appId: string;
|
|
63
|
+
}
|
|
64
|
+
interface AppBlueprintSpec {
|
|
65
|
+
meta: AppBlueprintMeta;
|
|
66
|
+
capabilities?: {
|
|
67
|
+
enabled?: CapabilityRef[];
|
|
68
|
+
disabled?: CapabilityRef[];
|
|
69
|
+
};
|
|
70
|
+
features?: {
|
|
71
|
+
include?: FeatureRef[];
|
|
72
|
+
exclude?: FeatureRef[];
|
|
73
|
+
};
|
|
74
|
+
integrationSlots?: AppIntegrationSlot[];
|
|
75
|
+
branding?: BrandingDefaults;
|
|
76
|
+
translationCatalog?: TranslationCatalogPointer;
|
|
77
|
+
dataViews?: Record<string, SpecPointer>;
|
|
78
|
+
workflows?: Record<string, SpecPointer>;
|
|
79
|
+
policies?: PolicyRef[];
|
|
80
|
+
theme?: AppThemeBinding;
|
|
81
|
+
telemetry?: TelemetryBinding;
|
|
82
|
+
experiments?: {
|
|
83
|
+
active?: ExperimentRef[];
|
|
84
|
+
paused?: ExperimentRef[];
|
|
85
|
+
};
|
|
86
|
+
featureFlags?: FeatureFlagState[];
|
|
87
|
+
routes?: AppRouteConfig[];
|
|
88
|
+
notes?: string;
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { AppBlueprintMeta, AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TranslationCatalogPointer };
|
|
92
|
+
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/app-config/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;AAiBiB,UAAA,WAAA,CAAW;EAKX,GAAA,EAAA,MAAA;EAUA,OAAA,CAAA,EAAA,MAAA;AAKjB;AAIoB,UAnBH,cAAA,CAmBG;EAEH,IAAA,EAAA,MAAA;EAEQ,KAAA,CAAA,EAAA,MAAA;EAAa,QAAA,CAAA,EAAA,MAAA;EAOrB,QAAA,CAAA,EAAA,MAAA;EAOA,KAAA,CAAA,EAhCP,SAgCO;EAMA,WAAA,CAAA,EAAA,MAAe;EAKf,UAAA,CAAA,EAzCF,aAyCmB;AAKlC;AACQ,UA5CS,yBAAA,CA4CT;EAEM,GAAA,EAAA,MAAA;EACC,OAAA,EAAA,MAAA;;AAID,UA9CG,kBAAA,CA8CH;EAEO;EACR,MAAA,EAAA,MAAA;EACU;EACM,gBAAA,EA/CT,mBA+CS;EAAf;EACe,YAAA,CAAA,EA9CZ,wBA8CY,EAAA;EAAf;EACD,oBAAA,CAAA,EA7CY,aA6CZ,EAAA;EACH;EACI,QAAA,CAAA,EAAA,OAAA;EAED;EACA,WAAA,CAAA,EAAA,MAAA;;AAGF,UA9CM,gBAAA,CA8CN;EAAc,GAAA,EAAA,MAAA;;;;;UAvCR,gBAAA;SACR;;sBAEa;;UAGL,eAAA;WACN;cACG;;UAGG,gBAAA,SAAyB;;;;UAKzB,gBAAA;QACT;;cAEM;eACC;;;cAGD;cACA;;qBAEO;aACR;uBACU;cACT,eAAe;cACf,eAAe;aAChB;UACH;cACI;;aAED;aACA;;iBAEI;WACN"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region ../../libs/contracts/src/capabilities/capabilities.d.ts
|
|
2
|
+
type CapabilityKind = 'api' | 'event' | 'data' | 'ui' | 'integration';
|
|
3
|
+
interface CapabilityRequirement {
|
|
4
|
+
key: string;
|
|
5
|
+
version?: string;
|
|
6
|
+
kind?: CapabilityKind;
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
reason?: string;
|
|
9
|
+
}
|
|
10
|
+
interface CapabilityRef {
|
|
11
|
+
key: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { CapabilityKind, CapabilityRef, CapabilityRequirement };
|
|
16
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/capabilities/capabilities.ts"],"sourcesContent":[],"mappings":";AAGY,KAAA,cAAA,GAAc,KAAA,GAAA,OAAA,GAAA,MAAA,GAAA,IAAA,GAAA,aAAA;UAoBT,qBAAA;;;SAGR;;;;UAKQ,aAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./react/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../form-render.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../form-render.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./schemas.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "zod";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../features/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/docs/registry.ts"],"sourcesContent":[],"mappings":";;KASY,KAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./registry.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExampleDocumentation, ExampleEntrypoints, ExampleKind, ExampleMcpSupport, ExampleMeta, ExampleSandboxMode, ExampleSandboxSupport, ExampleSpec, ExampleStudioSupport, ExampleSurfaces, ExampleVisibility } from "./types.js";
|
|
2
|
+
import "./schema.js";
|
|
3
|
+
import "./registry.js";
|
|
4
|
+
import "./validation.js";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { OwnerShipMeta } from "../ownership.js";
|
|
2
|
+
import { FeatureModuleSpec, FeatureRef } from "../features/types.js";
|
|
3
|
+
import "../features/index.js";
|
|
4
|
+
import { AppBlueprintSpec, SpecPointer } from "../app-config/spec.js";
|
|
5
|
+
|
|
6
|
+
//#region ../../libs/contracts/src/examples/types.d.ts
|
|
7
|
+
/** Kind of example - determines how it's presented in catalogs */
|
|
8
|
+
type ExampleKind = 'template' | 'workflow' | 'integration' | 'knowledge' | 'blueprint' | 'ui' | 'script' | 'library';
|
|
9
|
+
/** Visibility level for examples */
|
|
10
|
+
type ExampleVisibility = 'public' | 'internal' | 'experimental';
|
|
11
|
+
/** Sandbox modes supported by examples */
|
|
12
|
+
type ExampleSandboxMode = 'playground' | 'specs' | 'builder' | 'markdown' | 'evolution';
|
|
13
|
+
/** Documentation references for the example */
|
|
14
|
+
interface ExampleDocumentation {
|
|
15
|
+
/** Root documentation block ID */
|
|
16
|
+
rootDocId?: string;
|
|
17
|
+
/** Goal/purpose documentation */
|
|
18
|
+
goalDocId?: string;
|
|
19
|
+
/** Usage/quickstart documentation */
|
|
20
|
+
usageDocId?: string;
|
|
21
|
+
/** API/reference documentation */
|
|
22
|
+
referenceDocId?: string;
|
|
23
|
+
/** Constraints/limitations documentation */
|
|
24
|
+
constraintsDocId?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Surface support configuration for sandbox */
|
|
27
|
+
interface ExampleSandboxSupport {
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
modes: readonly ExampleSandboxMode[];
|
|
30
|
+
}
|
|
31
|
+
/** Surface support configuration for Studio */
|
|
32
|
+
interface ExampleStudioSupport {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
/** If true, Studio can create a real project from this example via API. */
|
|
35
|
+
installable: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Surface support configuration for MCP */
|
|
38
|
+
interface ExampleMcpSupport {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Surface support configuration - where the example can be used */
|
|
42
|
+
interface ExampleSurfaces {
|
|
43
|
+
/** Available as a template for new projects */
|
|
44
|
+
templates: boolean;
|
|
45
|
+
/** Sandbox/playground support */
|
|
46
|
+
sandbox: ExampleSandboxSupport;
|
|
47
|
+
/** ContractSpec Studio support */
|
|
48
|
+
studio: ExampleStudioSupport;
|
|
49
|
+
/** MCP (Model Context Protocol) support */
|
|
50
|
+
mcp: ExampleMcpSupport;
|
|
51
|
+
}
|
|
52
|
+
/** Package entrypoints for the example - maps to package.json exports */
|
|
53
|
+
interface ExampleEntrypoints {
|
|
54
|
+
/** Package name in the workspace (e.g., @contractspec/example.saas-boilerplate) */
|
|
55
|
+
packageName: string;
|
|
56
|
+
/** Feature module entrypoint (e.g., ./saas-boilerplate.feature) */
|
|
57
|
+
feature?: string;
|
|
58
|
+
/** Blueprint entrypoint (e.g., ./blueprint) */
|
|
59
|
+
blueprint?: string;
|
|
60
|
+
/** Presentations entrypoint (e.g., ./presentations) */
|
|
61
|
+
presentations?: string;
|
|
62
|
+
/** Contracts/operations entrypoint (e.g., ./contracts) */
|
|
63
|
+
contracts?: string;
|
|
64
|
+
/** Handlers entrypoint (e.g., ./handlers) */
|
|
65
|
+
handlers?: string;
|
|
66
|
+
/** UI components entrypoint (e.g., ./ui) */
|
|
67
|
+
ui?: string;
|
|
68
|
+
/** Documentation entrypoint (e.g., ./docs) */
|
|
69
|
+
docs?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Example metadata extending OwnerShipMeta.
|
|
73
|
+
* Provides standard spec identification plus example-specific fields.
|
|
74
|
+
*/
|
|
75
|
+
interface ExampleMeta extends OwnerShipMeta {
|
|
76
|
+
/** Example kind for categorization */
|
|
77
|
+
kind: ExampleKind;
|
|
78
|
+
/** Visibility level */
|
|
79
|
+
visibility: ExampleVisibility;
|
|
80
|
+
/** Short marketing summary (distinct from technical description) */
|
|
81
|
+
summary?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* ExampleSpec - Complete specification for a ContractSpec example.
|
|
85
|
+
*
|
|
86
|
+
* Integrates with AppBlueprintSpec for app configuration and
|
|
87
|
+
* FeatureModuleSpec for feature definitions.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* const example: ExampleSpec = {
|
|
92
|
+
* meta: {
|
|
93
|
+
* key: 'saas-boilerplate',
|
|
94
|
+
* version: '1.0.0',
|
|
95
|
+
* title: 'SaaS Boilerplate',
|
|
96
|
+
* description: 'Multi-tenant SaaS foundation.',
|
|
97
|
+
* kind: 'template',
|
|
98
|
+
* visibility: 'public',
|
|
99
|
+
* stability: 'experimental',
|
|
100
|
+
* owners: ['@saas-team'],
|
|
101
|
+
* tags: ['saas', 'multi-tenant'],
|
|
102
|
+
* },
|
|
103
|
+
* surfaces: {
|
|
104
|
+
* templates: true,
|
|
105
|
+
* sandbox: { enabled: true, modes: ['playground', 'specs'] },
|
|
106
|
+
* studio: { enabled: true, installable: true },
|
|
107
|
+
* mcp: { enabled: true },
|
|
108
|
+
* },
|
|
109
|
+
* entrypoints: {
|
|
110
|
+
* packageName: '@contractspec/example.saas-boilerplate',
|
|
111
|
+
* feature: './saas-boilerplate.feature',
|
|
112
|
+
* },
|
|
113
|
+
* };
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
interface ExampleSpec {
|
|
117
|
+
/** Example metadata (identification, ownership, categorization) */
|
|
118
|
+
meta: ExampleMeta;
|
|
119
|
+
/** Documentation references */
|
|
120
|
+
docs?: ExampleDocumentation;
|
|
121
|
+
/** Surface support configuration */
|
|
122
|
+
surfaces: ExampleSurfaces;
|
|
123
|
+
/** Package entrypoints */
|
|
124
|
+
entrypoints: ExampleEntrypoints;
|
|
125
|
+
/**
|
|
126
|
+
* Inline or referenced AppBlueprintSpec.
|
|
127
|
+
* Use SpecPointer for external reference to a registered blueprint.
|
|
128
|
+
*/
|
|
129
|
+
blueprint?: AppBlueprintSpec | SpecPointer;
|
|
130
|
+
/**
|
|
131
|
+
* Features included in this example.
|
|
132
|
+
* Can be inline FeatureModuleSpec objects or FeatureRef references.
|
|
133
|
+
*/
|
|
134
|
+
features?: (FeatureModuleSpec | FeatureRef)[];
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
export { ExampleDocumentation, ExampleEntrypoints, ExampleKind, ExampleMcpSupport, ExampleMeta, ExampleSandboxMode, ExampleSandboxSupport, ExampleSpec, ExampleStudioSupport, ExampleSurfaces, ExampleVisibility };
|
|
138
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/examples/types.ts"],"sourcesContent":[],"mappings":";;;;;;;KASY,WAAA;;AA+FL,KAzEK,iBAAA,GAyEL,QAAA,GAAA,UAAA,GAAA,cAAA;;AAmC2C,KAnGtC,kBAAA,GAmGsC,YAAA,GAAA,OAAA,GAAA,SAAA,GAAA,UAAA,GAAA,WAAA;;AAqEhB,UApJjB,oBAAA,CAoJiB;EAAU;;;;;;;;;;;;UAlI3B,qBAAA;;kBAEC;;;UAID,oBAAA;;;;;;UAOA,iBAAA;;;;UAKA,eAAA;;;;WAIN;;UAED;;OAEH;;;UAQU,kBAAA;;;;;;;;;;;;;;;;;;;;;;UA2BA,WAAA,SAAoB;;QAE7B;;cAEM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0CG,WAAA;;QAET;;SAGC;;YAGG;;eAGG;;;;;cAMD,mBAAmB;;;;;cAMnB,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/experiments/spec.ts"],"sourcesContent":[],"mappings":";;;;UAOiB,aAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types.js";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { PresentationTarget } from "../presentations/presentations.js";
|
|
2
|
+
import { OwnerShipMeta } from "../ownership.js";
|
|
3
|
+
import { CapabilityRef, CapabilityRequirement } from "../capabilities/capabilities.js";
|
|
4
|
+
import { ExperimentRef } from "../experiments/spec.js";
|
|
5
|
+
import { ImplementationRef } from "../operations/operation.js";
|
|
6
|
+
import "../operations/index.js";
|
|
7
|
+
|
|
8
|
+
//#region ../../libs/contracts/src/features/types.d.ts
|
|
9
|
+
/** Minimal metadata to identify and categorize a feature module. */
|
|
10
|
+
type FeatureModuleMeta = OwnerShipMeta;
|
|
11
|
+
interface OpRef {
|
|
12
|
+
/** Operation key (OperationSpec.meta.key). */
|
|
13
|
+
key: string;
|
|
14
|
+
/** Operation version (OperationSpec.meta.version). */
|
|
15
|
+
version: string;
|
|
16
|
+
}
|
|
17
|
+
interface EventRef {
|
|
18
|
+
/** Event key. */
|
|
19
|
+
key: string;
|
|
20
|
+
/** Event version. */
|
|
21
|
+
version: string;
|
|
22
|
+
}
|
|
23
|
+
interface PresentationRef {
|
|
24
|
+
/** Presentation key. */
|
|
25
|
+
key: string;
|
|
26
|
+
/** Presentation version. */
|
|
27
|
+
version: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reference to a data view spec.
|
|
31
|
+
*/
|
|
32
|
+
interface DataViewRef {
|
|
33
|
+
key: string;
|
|
34
|
+
version: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Reference to a form spec.
|
|
38
|
+
*/
|
|
39
|
+
interface FormRef {
|
|
40
|
+
key: string;
|
|
41
|
+
version: string;
|
|
42
|
+
}
|
|
43
|
+
/** Group operations/events/presentations into an installable feature. */
|
|
44
|
+
interface FeatureModuleSpec {
|
|
45
|
+
meta: FeatureModuleMeta;
|
|
46
|
+
/** Contract operations included in this feature. */
|
|
47
|
+
operations?: OpRef[];
|
|
48
|
+
/** Events declared/emitted by this feature. */
|
|
49
|
+
events?: EventRef[];
|
|
50
|
+
/** Presentations associated to this feature. */
|
|
51
|
+
presentations?: PresentationRef[];
|
|
52
|
+
/** Experiments related to this feature. */
|
|
53
|
+
experiments?: ExperimentRef[];
|
|
54
|
+
/** Capability bindings exposed/required by this feature. */
|
|
55
|
+
capabilities?: {
|
|
56
|
+
provides?: CapabilityRef[];
|
|
57
|
+
requires?: CapabilityRequirement[];
|
|
58
|
+
};
|
|
59
|
+
/** Optional: link ops to presentations for traceability (e.g., ui for op) */
|
|
60
|
+
opToPresentation?: {
|
|
61
|
+
op: OpRef;
|
|
62
|
+
pres: PresentationRef;
|
|
63
|
+
}[];
|
|
64
|
+
/** Optional: declare per-presentation target requirements (V2 descriptors) */
|
|
65
|
+
presentationsTargets?: {
|
|
66
|
+
/** Presentation key. */
|
|
67
|
+
key: string;
|
|
68
|
+
/** Presentation version. */
|
|
69
|
+
version: string;
|
|
70
|
+
/** Required targets that must be supported by the descriptor. */
|
|
71
|
+
targets: PresentationTarget[];
|
|
72
|
+
}[];
|
|
73
|
+
/**
|
|
74
|
+
* Explicit implementation file mappings for the entire feature module.
|
|
75
|
+
* Used for tracking and verifying that this feature is correctly implemented.
|
|
76
|
+
*/
|
|
77
|
+
implementations?: ImplementationRef[];
|
|
78
|
+
/** Data views associated with this feature. */
|
|
79
|
+
dataViews?: DataViewRef[];
|
|
80
|
+
/** Forms associated with this feature. */
|
|
81
|
+
forms?: FormRef[];
|
|
82
|
+
}
|
|
83
|
+
interface FeatureRef {
|
|
84
|
+
key: string;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, OpRef, PresentationRef };
|
|
88
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../../../libs/contracts/src/features/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAOY,iBAAA,GAAoB;UAEf,KAAA;EAFL;EAEK,GAAA,EAAA,MAAK;EAOL;EAOA,OAAA,EAAA,MAAA;AAUjB;AAQiB,UAzBA,QAAA,CAyBO;EAMP;EACT,GAAA,EAAA,MAAA;EAEO;EAEJ,OAAA,EAAA,MAAA;;AAIK,UAjCC,eAAA,CAiCD;EAGD;EACA,GAAA,EAAA,MAAA;EAGY;EAAa,OAAA,EAAA,MAAA;;;;;AAqBvB,UAnDA,WAAA,CAmDA;EAGA,GAAA,EAAA,MAAA;;;;;;UA9CA,OAAA;;;;;UAMA,iBAAA;QACT;;eAEO;;WAEJ;;kBAEO;;gBAEF;;;eAGD;eACA;;;;QAGY;UAAa;;;;;;;;;aAQ3B;;;;;;oBAOO;;cAGN;;UAGJ;;UAGO,UAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PresentationTarget } from "./presentations/presentations.js";
|
|
2
|
+
import { DocId } from "./docs/registry.js";
|
|
3
|
+
import { Owner, OwnerShipMeta, OwnersEnum, Stability, StabilityEnum, Tag, TagsEnum } from "./ownership.js";
|
|
4
|
+
import { PolicyRef } from "./policy/spec.js";
|
|
5
|
+
import { CapabilityKind, CapabilityRef, CapabilityRequirement } from "./capabilities/capabilities.js";
|
|
6
|
+
import { ExperimentRef } from "./experiments/spec.js";
|
|
7
|
+
import "./resources.js";
|
|
8
|
+
import { ImplementationRef, ImplementationType } from "./operations/operation.js";
|
|
9
|
+
import "./install.js";
|
|
10
|
+
import "./operations/index.js";
|
|
11
|
+
import { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, OpRef, PresentationRef } from "./features/types.js";
|
|
12
|
+
import "./presentations/index.js";
|
|
13
|
+
import "./features/index.js";
|
|
14
|
+
import "./data-views/index.js";
|
|
15
|
+
import { CompensationStep, CompensationStrategy, FormRef, GuardCondition, GuardConditionKind, RetryPolicy, SLA, Step, StepAction, StepType, Transition, WorkflowDefinition, WorkflowMeta, WorkflowSpec } from "./workflow/spec.js";
|
|
16
|
+
import { ThemeRef } from "./themes.js";
|
|
17
|
+
import { IntegrationCategory, IntegrationOwnershipMode } from "./integrations/spec.js";
|
|
18
|
+
import { AppBlueprintMeta, AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TranslationCatalogPointer } from "./app-config/spec.js";
|
|
19
|
+
import "./app-config/runtime.js";
|
|
20
|
+
import "./experiments/spec-resolver.js";
|
|
21
|
+
import "./types.js";
|
|
22
|
+
import "./events.js";
|
|
23
|
+
import "./client/index.js";
|
|
24
|
+
import "./prompt.js";
|
|
25
|
+
import "./promptRegistry.js";
|
|
26
|
+
import "./server/index.js";
|
|
27
|
+
import "./contract-registry/index.js";
|
|
28
|
+
import "./jsonschema.js";
|
|
29
|
+
import "./openapi.js";
|
|
30
|
+
import "./onboarding-base.js";
|
|
31
|
+
import "./policy/index.js";
|
|
32
|
+
import "./tests/index.js";
|
|
33
|
+
import "./integrations/index.js";
|
|
34
|
+
import "./knowledge/index.js";
|
|
35
|
+
import "./integrations/operations.js";
|
|
36
|
+
import "./knowledge/operations.js";
|
|
37
|
+
import "./regenerator/index.js";
|
|
38
|
+
import "./workspace-config/index.js";
|
|
39
|
+
import "./workflow/index.js";
|
|
40
|
+
import "./llm/index.js";
|
|
41
|
+
import "./app-config/validation.js";
|
|
42
|
+
import { ExampleDocumentation, ExampleEntrypoints, ExampleKind, ExampleMcpSupport, ExampleMeta, ExampleSandboxMode, ExampleSandboxSupport, ExampleSpec, ExampleStudioSupport, ExampleSurfaces, ExampleVisibility } from "./examples/types.js";
|
|
43
|
+
import "./examples/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./spec.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../../app-config/runtime.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../../index.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./stripe.js";
|
|
2
|
+
import "./postmark.js";
|
|
3
|
+
import "./qdrant.js";
|
|
4
|
+
import "./mistral.js";
|
|
5
|
+
import "./elevenlabs.js";
|
|
6
|
+
import "./gmail.js";
|
|
7
|
+
import "./google-calendar.js";
|
|
8
|
+
import "./twilio-sms.js";
|
|
9
|
+
import "./gcs-storage.js";
|
|
10
|
+
import "./powens.js";
|
|
11
|
+
import "./registry.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../spec.js";
|