@lssm/lib.contracts 0.0.0-canary-20251220041653 → 0.0.0-canary-20251221132705

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +4 -4
  2. package/dist/_virtual/rolldown_runtime.js +37 -0
  3. package/dist/app-config/contracts.d.ts +60 -60
  4. package/dist/app-config/contracts.js +1 -1
  5. package/dist/app-config/events.d.ts +27 -27
  6. package/dist/app-config/lifecycle-contracts.d.ts +90 -90
  7. package/dist/app-config/lifecycle-contracts.js +1 -1
  8. package/dist/data-views.d.ts +11 -0
  9. package/dist/data-views.js +26 -0
  10. package/dist/docs/tech/contracts/README.docblock.js +2 -2
  11. package/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
  12. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +2 -2
  13. package/dist/docs/tech/contracts/tests.docblock.js +2 -2
  14. package/dist/experiments/spec-resolver.d.ts +2 -2
  15. package/dist/features.d.ts +16 -5
  16. package/dist/features.js +26 -0
  17. package/dist/forms.d.ts +11 -0
  18. package/dist/forms.js +26 -0
  19. package/dist/index.d.ts +7 -5
  20. package/dist/index.js +10 -4
  21. package/dist/install.d.ts +16 -16
  22. package/dist/integrations/contracts.d.ts +111 -111
  23. package/dist/integrations/contracts.js +1 -1
  24. package/dist/integrations/openbanking/contracts/accounts.d.ts +73 -73
  25. package/dist/integrations/openbanking/contracts/accounts.js +1 -1
  26. package/dist/integrations/openbanking/contracts/balances.d.ts +40 -40
  27. package/dist/integrations/openbanking/contracts/balances.js +1 -1
  28. package/dist/integrations/openbanking/contracts/index.d.ts +2 -2
  29. package/dist/integrations/openbanking/contracts/transactions.d.ts +54 -54
  30. package/dist/integrations/openbanking/contracts/transactions.js +1 -1
  31. package/dist/integrations/openbanking/models.d.ts +55 -55
  32. package/dist/jsonschema.d.ts +5 -5
  33. package/dist/knowledge/contracts.d.ts +75 -75
  34. package/dist/knowledge/contracts.js +1 -1
  35. package/dist/llm/exporters.d.ts +8 -8
  36. package/dist/llm/exporters.js +1 -1
  37. package/dist/llm/prompts.d.ts +7 -7
  38. package/dist/llm/types.d.ts +3 -3
  39. package/dist/markdown.d.ts +3 -3
  40. package/dist/markdown.js +1 -1
  41. package/dist/onboarding-base.d.ts +32 -32
  42. package/dist/onboarding-base.js +1 -1
  43. package/dist/openapi.d.ts +2 -2
  44. package/dist/{spec.d.ts → operation.d.ts} +12 -12
  45. package/dist/{spec.js → operation.js} +1 -1
  46. package/dist/policy/docs/policy.docblock.js +1 -1
  47. package/dist/presentations.d.ts +14 -3
  48. package/dist/presentations.js +25 -0
  49. package/dist/registry-utils.d.ts +107 -0
  50. package/dist/registry-utils.js +122 -0
  51. package/dist/registry.d.ts +46 -14
  52. package/dist/registry.js +61 -5
  53. package/dist/server/graphql-pothos.d.ts +6 -6
  54. package/dist/server/graphql-pothos.js +4 -4
  55. package/dist/server/mcp/createMcpServer.d.ts +3 -3
  56. package/dist/server/mcp/createMcpServer.js +1 -1
  57. package/dist/server/mcp/registerTools.d.ts +2 -2
  58. package/dist/server/rest-elysia.d.ts +2 -2
  59. package/dist/server/rest-express.d.ts +2 -2
  60. package/dist/server/rest-generic.d.ts +3 -3
  61. package/dist/server/rest-generic.js +1 -1
  62. package/dist/server/rest-next-app.d.ts +4 -4
  63. package/dist/server/rest-next-app.js +2 -2
  64. package/dist/server/rest-next-mcp.d.ts +2 -2
  65. package/dist/server/rest-next-pages.d.ts +2 -2
  66. package/dist/telemetry/docs/telemetry.docblock.js +1 -1
  67. package/dist/tests/runner.d.ts +2 -2
  68. package/dist/tests/spec.d.ts +1 -1
  69. package/dist/workflow/spec.d.ts +11 -1
  70. package/dist/workflow/spec.js +26 -0
  71. package/dist/workflow/validation.d.ts +2 -2
  72. package/dist/workspace-config/contractsrc-schema.d.ts +298 -0
  73. package/dist/workspace-config/contractsrc-schema.js +139 -0
  74. package/dist/workspace-config/index.d.ts +2 -0
  75. package/dist/workspace-config/index.js +3 -0
  76. package/package.json +14 -13
  77. package/dist/presentations.backcompat.d.ts +0 -7
  78. package/dist/presentations.backcompat.js +0 -47
  79. package/dist/types/all.d.ts +0 -60
  80. package/dist/types/all.js +0 -0
@@ -4,7 +4,7 @@ import { registerDocBlocks } from "../../registry.js";
4
4
  const tech_contracts_tests_DocBlocks = [{
5
5
  id: "docs.tech.contracts.tests",
6
6
  title: "TestSpec & TestRunner",
7
- summary: "Use `TestSpec` to describe end-to-end scenarios for contracts and workflows. Specs live alongside your contracts and exercise the same SpecRegistry handlers the app uses.",
7
+ summary: "Use `TestSpec` to describe end-to-end scenarios for contracts and workflows. Specs live alongside your contracts and exercise the same OperationSpecRegistry handlers the app uses.",
8
8
  kind: "reference",
9
9
  visibility: "public",
10
10
  route: "/docs/tech/contracts/tests",
@@ -13,7 +13,7 @@ const tech_contracts_tests_DocBlocks = [{
13
13
  "contracts",
14
14
  "tests"
15
15
  ],
16
- body: "## TestSpec & TestRunner\n\nUse `TestSpec` to describe end-to-end scenarios for contracts and workflows. Specs live alongside your contracts and exercise the same SpecRegistry handlers the app uses.\n\n- Types & registry: `packages/libs/contracts/src/tests/spec.ts`\n- Runtime runner: `packages/libs/contracts/src/tests/runner.ts`\n- CLI: `contractspec test`\n\n### Structure\n\n```ts\nexport interface TestSpec {\n meta: TestSpecMeta;\n target: TestTarget; // contract or workflow\n fixtures?: Fixture[]; // optional shared setup before each scenario\n scenarios: TestScenario[];\n coverage?: CoverageRequirement;\n}\n```\n\n- `Fixture`: run an operation before the scenario (`operation`, optional `input`)\n- `Action`: operation input that the scenario exercises\n- `Assertion`:\n - `expectOutput` `{ match }` deep-equals the handler output\n - `expectError` `{ messageIncludes? }` ensures an error was thrown\n - `expectEvents` `{ events: [{ name, version, min?, max? }] }` checks emitted events\n\n### Example\n\n```ts\nimport { defineCommand, type TestSpec } from '@lssm/lib.contracts';\n\nexport const AddNumbersSpec = defineCommand({\n meta: { name: 'math.add', version: 1, /* … */ },\n io: {\n input: AddNumbersInput,\n output: AddNumbersOutput,\n },\n policy: { auth: 'user' },\n});\n\nexport const MathAddTests: TestSpec = {\n meta: {\n name: 'math.add.tests',\n version: 1,\n title: 'Math add scenarios',\n owners: ['@team.math'],\n tags: ['math'],\n stability: StabilityEnum.Experimental,\n },\n target: { type: 'contract', operation: { name: 'math.add' } },\n scenarios: [\n {\n name: 'adds positive numbers',\n when: {\n operation: { name: 'math.add' },\n input: { a: 2, b: 3 },\n },\n then: [\n { type: 'expectOutput', match: { sum: 5 } },\n {\n type: 'expectEvents',\n events: [{ name: 'math.sum_calculated', version: 1, min: 1 }],\n },\n ],\n },\n ],\n};\n```\n\n### Running tests\n\n1. Register the contract handlers in a `SpecRegistry`:\n\n```ts\nexport function createRegistry() {\n const registry = new SpecRegistry();\n registry.register(AddNumbersSpec);\n registry.bind(AddNumbersSpec, addNumbersHandler);\n return registry;\n}\n```\n\n2. Run the CLI:\n\n```\ncontractspec test apps/math/tests/math.add.tests.ts \\\n --registry apps/math/tests/registry.ts\n```\n\n- The CLI loads the TestSpec, instantiates the registry (via the provided module), and executes each scenario via `TestRunner`.\n- `--json` outputs machine-readable results.\n\n### Programmatic usage\n\n```ts\nconst runner = new TestRunner({\n registry,\n createContext: () => ({ actor: 'user', organizationId: 'tenant-1' }),\n});\n\nconst result = await runner.run(MathAddTests);\nconsole.log(result.passed, result.failed);\n```\n\n- `createContext` can supply default `HandlerCtx` values.\n- `beforeEach` / `afterEach` hooks let you seed databases or reset state.\n\n### Best practices\n\n- Keep fixtures idempotent so scenarios can run in parallel in the future.\n- Use `expectEvents` to guard analytics/telemetry expectations.\n- Add specs to `TestRegistry` for discovery and documentation.\n- `coverage` captures desired coverage metrics (enforced by future tooling).\n- Pair TestSpec files with CI using `contractspec test --json` and fail builds when `failed > 0`.\n\n### Mocking with Bun's `vi`\n\n- Pass a single function type to `vi.fn<TFunction>()` so calls retain typed arguments:\n\n```ts\nconst handler = vi.fn<typeof fetch>();\nconst fetchImpl: typeof fetch = ((...args) => handler(...args)) as typeof fetch;\nObject.defineProperty(fetchImpl, 'preconnect', {\n value: vi.fn<typeof fetch.preconnect>(),\n});\n```\n\n- When you need to inspect calls, use the typed mock (`handler.mock.calls`) rather than casting to `any`.\n- Narrow optional request data defensively (e.g., check for headers before reading them) so tests remain type-safe under strict `tsconfig` settings.\n\n"
16
+ body: "## TestSpec & TestRunner\n\nUse `TestSpec` to describe end-to-end scenarios for contracts and workflows. Specs live alongside your contracts and exercise the same OperationSpecRegistry handlers the app uses.\n\n- Types & registry: `packages/libs/contracts/src/tests/spec.ts`\n- Runtime runner: `packages/libs/contracts/src/tests/runner.ts`\n- CLI: `contractspec test`\n\n### Structure\n\n```ts\nexport interface TestSpec {\n meta: TestSpecMeta;\n target: TestTarget; // contract or workflow\n fixtures?: Fixture[]; // optional shared setup before each scenario\n scenarios: TestScenario[];\n coverage?: CoverageRequirement;\n}\n```\n\n- `Fixture`: run an operation before the scenario (`operation`, optional `input`)\n- `Action`: operation input that the scenario exercises\n- `Assertion`:\n - `expectOutput` `{ match }` deep-equals the handler output\n - `expectError` `{ messageIncludes? }` ensures an error was thrown\n - `expectEvents` `{ events: [{ name, version, min?, max? }] }` checks emitted events\n\n### Example\n\n```ts\nimport { defineCommand, type TestSpec } from '@lssm/lib.contracts';\n\nexport const AddNumbersSpec = defineCommand({\n meta: { name: 'math.add', version: 1, /* … */ },\n io: {\n input: AddNumbersInput,\n output: AddNumbersOutput,\n },\n policy: { auth: 'user' },\n});\n\nexport const MathAddTests: TestSpec = {\n meta: {\n name: 'math.add.tests',\n version: 1,\n title: 'Math add scenarios',\n owners: ['@team.math'],\n tags: ['math'],\n stability: StabilityEnum.Experimental,\n },\n target: { type: 'contract', operation: { name: 'math.add' } },\n scenarios: [\n {\n name: 'adds positive numbers',\n when: {\n operation: { name: 'math.add' },\n input: { a: 2, b: 3 },\n },\n then: [\n { type: 'expectOutput', match: { sum: 5 } },\n {\n type: 'expectEvents',\n events: [{ name: 'math.sum_calculated', version: 1, min: 1 }],\n },\n ],\n },\n ],\n};\n```\n\n### Running tests\n\n1. Register the contract handlers in a `OperationSpecRegistry`:\n\n```ts\nexport function createRegistry() {\n const registry = new OperationSpecRegistry();\n registry.register(AddNumbersSpec);\n registry.bind(AddNumbersSpec, addNumbersHandler);\n return registry;\n}\n```\n\n2. Run the CLI:\n\n```\ncontractspec test apps/math/tests/math.add.tests.ts \\\n --registry apps/math/tests/registry.ts\n```\n\n- The CLI loads the TestSpec, instantiates the registry (via the provided module), and executes each scenario via `TestRunner`.\n- `--json` outputs machine-readable results.\n\n### Programmatic usage\n\n```ts\nconst runner = new TestRunner({\n registry,\n createContext: () => ({ actor: 'user', organizationId: 'tenant-1' }),\n});\n\nconst result = await runner.run(MathAddTests);\nconsole.log(result.passed, result.failed);\n```\n\n- `createContext` can supply default `HandlerCtx` values.\n- `beforeEach` / `afterEach` hooks let you seed databases or reset state.\n\n### Best practices\n\n- Keep fixtures idempotent so scenarios can run in parallel in the future.\n- Use `expectEvents` to guard analytics/telemetry expectations.\n- Add specs to `TestRegistry` for discovery and documentation.\n- `coverage` captures desired coverage metrics (enforced by future tooling).\n- Pair TestSpec files with CI using `contractspec test --json` and fail builds when `failed > 0`.\n\n### Mocking with Bun's `vi`\n\n- Pass a single function type to `vi.fn<TFunction>()` so calls retain typed arguments:\n\n```ts\nconst handler = vi.fn<typeof fetch>();\nconst fetchImpl: typeof fetch = ((...args) => handler(...args)) as typeof fetch;\nObject.defineProperty(fetchImpl, 'preconnect', {\n value: vi.fn<typeof fetch.preconnect>(),\n});\n```\n\n- When you need to inspect calls, use the typed mock (`handler.mock.calls`) rather than casting to `any`.\n- Narrow optional request data defensively (e.g., check for headers before reading them) so tests remain type-safe under strict `tsconfig` settings.\n\n"
17
17
  }];
18
18
  registerDocBlocks(tech_contracts_tests_DocBlocks);
19
19
 
@@ -1,10 +1,10 @@
1
1
  import { ResourceRefDescriptor } from "../resources.js";
2
- import { ContractSpec, OpKind } from "../spec.js";
2
+ import { OpKind, OperationSpec } from "../operation.js";
3
3
  import { HandlerCtx } from "../types.js";
4
4
  import { AnySchemaModel } from "@lssm/lib.schema";
5
5
 
6
6
  //#region src/experiments/spec-resolver.d.ts
7
- type RuntimeContract = ContractSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>;
7
+ type RuntimeContract = OperationSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>;
8
8
  interface SpecVariantResolver {
9
9
  resolve(operation: {
10
10
  name: string;
@@ -1,11 +1,12 @@
1
1
  import { OwnerShipMeta } from "./ownership.js";
2
+ import { GroupKeyFn, RegistryFilter } from "./registry-utils.js";
2
3
  import { PresentationDescriptorV2, PresentationTarget } from "./presentations.v2.js";
3
4
  import { PresentationRegistry } from "./presentations.js";
4
5
  import { DocId } from "./docs/registry.js";
5
- import { ImplementationRef } from "./spec.js";
6
+ import { ImplementationRef } from "./operation.js";
6
7
  import { CapabilityRef, CapabilityRegistry, CapabilityRequirement } from "./capabilities.js";
7
8
  import { ExperimentRef } from "./experiments/spec.js";
8
- import { SpecRegistry } from "./registry.js";
9
+ import { OperationSpecRegistry } from "./registry.js";
9
10
 
10
11
  //#region src/features.d.ts
11
12
  /** Minimal metadata to identify and categorize a feature module. */
@@ -16,9 +17,9 @@ interface FeatureModuleMeta extends OwnerShipMeta {
16
17
  docId?: DocId;
17
18
  }
18
19
  interface OpRef {
19
- /** Operation name (ContractSpec.meta.name). */
20
+ /** Operation name (OperationSpec.meta.name). */
20
21
  name: string;
21
- /** Operation version (ContractSpec.meta.version). */
22
+ /** Operation version (OperationSpec.meta.version). */
22
23
  version: number;
23
24
  }
24
25
  interface EventRef {
@@ -81,11 +82,21 @@ declare class FeatureRegistry {
81
82
  list(): FeatureModuleSpec[];
82
83
  /** Get a feature by its key (slug). */
83
84
  get(key: string): FeatureModuleSpec | undefined;
85
+ /** Filter features by criteria. */
86
+ filter(criteria: RegistryFilter): FeatureModuleSpec[];
87
+ /** List features with specific tag. */
88
+ listByTag(tag: string): FeatureModuleSpec[];
89
+ /** List features by owner. */
90
+ listByOwner(owner: string): FeatureModuleSpec[];
91
+ /** Group features by key function. */
92
+ groupBy(keyFn: GroupKeyFn<FeatureModuleSpec>): Map<string, FeatureModuleSpec[]>;
93
+ /** Get unique tags from all features. */
94
+ getUniqueTags(): string[];
84
95
  }
85
96
  /** Validate and register a feature against optional registries/descriptors. */
86
97
  declare function installFeature(feature: FeatureModuleSpec, deps: {
87
98
  features: FeatureRegistry;
88
- ops?: SpecRegistry;
99
+ ops?: OperationSpecRegistry;
89
100
  presentations?: PresentationRegistry;
90
101
  descriptorsV2?: PresentationDescriptorV2[];
91
102
  capabilities?: CapabilityRegistry;
package/dist/features.js CHANGED
@@ -1,3 +1,6 @@
1
+ import { __toCommonJS } from "./_virtual/rolldown_runtime.js";
2
+ import { init_registry_utils, registry_utils_exports } from "./registry-utils.js";
3
+
1
4
  //#region src/features.ts
2
5
  function keyOf(f) {
3
6
  return f.meta.key;
@@ -20,6 +23,29 @@ var FeatureRegistry = class {
20
23
  get(key) {
21
24
  return this.items.get(key);
22
25
  }
26
+ /** Filter features by criteria. */
27
+ filter(criteria) {
28
+ const { filterBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
29
+ return filterBy(this.list(), criteria);
30
+ }
31
+ /** List features with specific tag. */
32
+ listByTag(tag) {
33
+ return this.list().filter((f) => f.meta.tags?.includes(tag));
34
+ }
35
+ /** List features by owner. */
36
+ listByOwner(owner) {
37
+ return this.list().filter((f) => f.meta.owners?.includes(owner));
38
+ }
39
+ /** Group features by key function. */
40
+ groupBy(keyFn) {
41
+ const { groupBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
42
+ return groupBy(this.list(), keyFn);
43
+ }
44
+ /** Get unique tags from all features. */
45
+ getUniqueTags() {
46
+ const { getUniqueTags } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
47
+ return getUniqueTags(this.list());
48
+ }
23
49
  };
24
50
  /** Validate and register a feature against optional registries/descriptors. */
25
51
  function installFeature(feature, deps) {
package/dist/forms.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { OwnerShipMeta } from "./ownership.js";
2
+ import { GroupKeyFn, RegistryFilter } from "./registry-utils.js";
2
3
  import { AnySchemaModel, ZodSchemaModel } from "@lssm/lib.schema";
3
4
 
4
5
  //#region src/forms.d.ts
@@ -161,6 +162,16 @@ declare class FormRegistry {
161
162
  register(spec: FormSpec): this;
162
163
  list(): FormSpec[];
163
164
  get(key: string, version?: number): FormSpec<AnySchemaModel> | undefined;
165
+ /** Filter forms by criteria. */
166
+ filter(criteria: RegistryFilter): FormSpec[];
167
+ /** List forms with specific tag. */
168
+ listByTag(tag: string): FormSpec[];
169
+ /** List forms by owner. */
170
+ listByOwner(owner: string): FormSpec[];
171
+ /** Group forms by key function. */
172
+ groupBy(keyFn: GroupKeyFn<FormSpec>): Map<string, FormSpec[]>;
173
+ /** Get unique tags from all forms. */
174
+ getUniqueTags(): string[];
164
175
  }
165
176
  declare function evalPredicate(values: unknown, pred?: Predicate): boolean;
166
177
  type ConstraintHandler = (values: Record<string, unknown>, paths: string[], args?: Record<string, unknown>) => {
package/dist/forms.js CHANGED
@@ -1,3 +1,6 @@
1
+ import { __toCommonJS } from "./_virtual/rolldown_runtime.js";
2
+ import { init_registry_utils, registry_utils_exports } from "./registry-utils.js";
3
+
1
4
  //#region src/forms.ts
2
5
  function formKey(meta) {
3
6
  return `${meta.key}.v${meta.version}`;
@@ -26,6 +29,29 @@ var FormRegistry = class {
26
29
  }
27
30
  return candidate;
28
31
  }
32
+ /** Filter forms by criteria. */
33
+ filter(criteria) {
34
+ const { filterBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
35
+ return filterBy(this.list(), criteria);
36
+ }
37
+ /** List forms with specific tag. */
38
+ listByTag(tag) {
39
+ return this.list().filter((f) => f.meta.tags?.includes(tag));
40
+ }
41
+ /** List forms by owner. */
42
+ listByOwner(owner) {
43
+ return this.list().filter((f) => f.meta.owners?.includes(owner));
44
+ }
45
+ /** Group forms by key function. */
46
+ groupBy(keyFn) {
47
+ const { groupBy } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
48
+ return groupBy(this.list(), keyFn);
49
+ }
50
+ /** Get unique tags from all forms. */
51
+ getUniqueTags() {
52
+ const { getUniqueTags } = (init_registry_utils(), __toCommonJS(registry_utils_exports));
53
+ return getUniqueTags(this.list());
54
+ }
29
55
  };
30
56
  function getAtPath(values, path) {
31
57
  if (!path) return void 0;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Owner, OwnerShipMeta, Owners, OwnersEnum, Stability, StabilityEnum, Tag, Tags, TagsEnum } from "./ownership.js";
2
+ import { FilterableItem, GroupKeyFn, GroupedItems, GroupingStrategies, RegistryFilter, filterBy, getUniqueDomains, getUniqueOwners, getUniqueTags, groupBy, groupByMultiple, groupByToArray } from "./registry-utils.js";
2
3
  import { ComponentMap, PresentationDescriptorV2, PresentationRenderer, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationTarget, PresentationV2Meta, PresentationValidator, ReactRenderDescriptor, RenderContext, TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer } from "./presentations.v2.js";
3
4
  import { DataPresentation, MarkdownPresentation, PresentationContent, PresentationKind, PresentationMeta, PresentationPolicy, PresentationRegistry, PresentationSpec, WebComponentPresentation, jsonSchemaForPresentation } from "./presentations.js";
4
5
  import { DocBlock, DocBlockLink, DocKind, DocVisibility } from "./docs/types.js";
@@ -8,7 +9,7 @@ import { EventEnvelope, EventKey, EventSpec, defineEvent, eventKey } from "./eve
8
9
  import { ResourceMeta, ResourceRefDescriptor, ResourceRegistry, ResourceTemplateSpec, defineResourceTemplate, isResourceRef, resourceRef } from "./resources.js";
9
10
  import { AttributeMatcher, ConsentDefinition, FieldPolicyRule, PIIPolicy, PolicyCondition, PolicyEffect, PolicyMeta, PolicyOPAConfig, PolicyRef, PolicyRegistry, PolicyRule, PolicySpec, RateLimitDefinition, RelationshipDefinition, RelationshipMatcher, ResourceMatcher, SubjectMatcher, makePolicyKey } from "./policy/spec.js";
10
11
  import { Action, Assertion, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, TestRegistry, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, makeTestKey } from "./tests/spec.js";
11
- import { AnyContractSpec, ContractSpec, EmitDecl, EmitDeclInline, EmitDeclRef, ImplementationRef, ImplementationType, OpKind, TelemetryTrigger, defineCommand, defineQuery, isEmitDeclRef } from "./spec.js";
12
+ import { AnyOperationSpec, EmitDecl, EmitDeclInline, EmitDeclRef, ImplementationRef, ImplementationType, OpKind, OperationSpec, TelemetryTrigger, defineCommand, defineQuery, isEmitDeclRef } from "./operation.js";
12
13
  import { TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyThreshold, TelemetryConfig, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySpec, makeTelemetryKey } from "./telemetry/spec.js";
13
14
  import { TelemetryAnomalyEvent, TelemetryAnomalyMonitor, TelemetryAnomalyMonitorOptions } from "./telemetry/anomaly.js";
14
15
  import { RuntimeTelemetryProvider, TelemetryDispatch, TelemetryEventContext, TelemetryTracker, TelemetryTrackerOptions } from "./telemetry/tracker.js";
@@ -28,8 +29,8 @@ import { AppBlueprintMeta, AppBlueprintRegistry, AppBlueprintSpec, AppIntegratio
28
29
  import { AppComposition, AppCompositionDeps, ComposeOptions, MissingReference, ResolveAppConfigDeps, ResolvedAppConfig, ResolvedIntegration, ResolvedKnowledge, ResolvedTranslation, composeAppConfig, resolveAppConfig } from "./app-config/runtime.js";
29
30
  import { RuntimeContract, SpecVariantResolver } from "./experiments/spec-resolver.js";
30
31
  import { Actor, Channel, EventPublisher, FieldLevelDecision, HandlerCtx, PolicyDecider, PolicyDeciderInput, PolicyDecision, RateLimiter, TranslationResolver } from "./types.js";
31
- import { EventParam, HandlerFor, RuntimeSpecOutput, SpecInput, SpecOutput, ZodSpecInput, installOp, makeEmit, op } from "./install.js";
32
- import { OperationKey, SpecRegistry, opKey } from "./registry.js";
32
+ import { EventParam, HandlerForOperationSpec, OperationSpecInput, OperationSpecOutput, RuntimeSpecOutput, ZodOperationSpecInput, installOp, makeEmit, op } from "./install.js";
33
+ import { OperationKey, OperationSpecRegistry, opKey } from "./registry.js";
33
34
  import { EventRef, FeatureModuleMeta, FeatureModuleSpec, FeatureRef, FeatureRegistry, OpRef, PresentationRef, installFeature, validateFeatureTargetsV2 } from "./features.js";
34
35
  import { createEngineWithDefaults, createFeatureModule, registerFeature, renderFeaturePresentation } from "./client/react/feature-render.js";
35
36
  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.js";
@@ -52,7 +53,6 @@ import { ContractRegistryFileSchema, ContractRegistryItemParsed, ContractRegistr
52
53
  import "./contract-registry/index.js";
53
54
  import { defaultGqlField, defaultMcpTool, defaultRestPath, jsonSchemaForSpec } from "./jsonschema.js";
54
55
  import { OpenApiDocument, OpenApiExportOptions, OpenApiServer, openApiForRegistry } from "./openapi.js";
55
- import { toV2FromV1 } from "./presentations.backcompat.js";
56
56
  import { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from "./onboarding-base.js";
57
57
  import { openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, registerOpenBankingCapabilities } from "./capabilities/openbanking.js";
58
58
  import { DecisionContext, PolicyEngine, ResourceContext, SubjectContext, SubjectRelationship } from "./policy/engine.js";
@@ -107,6 +107,8 @@ import { behaviorToEnvelope, errorToEnvelope, telemetryToEnvelope } from "./rege
107
107
  import { ExecutorProposalSink, ExecutorResultPayload, ExecutorSinkLogger, ExecutorSinkOptions } from "./regenerator/sinks.js";
108
108
  import "./regenerator/index.js";
109
109
  import { TenantTranslationOverride } from "./translations/tenant.js";
110
+ import { ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema } from "./workspace-config/contractsrc-schema.js";
111
+ import "./workspace-config/index.js";
110
112
  import { ValidateWorkflowSpecOptions, WorkflowValidationError, WorkflowValidationIssue, WorkflowValidationLevel, assertWorkflowSpecValid, validateWorkflowSpec } from "./workflow/validation.js";
111
113
  import { StateStore, StepExecution, WorkflowState, WorkflowStateFilters } from "./workflow/state.js";
112
114
  import { GuardContext, GuardEvaluator, OperationExecutor, OperationExecutorContext, WorkflowPreFlightError, WorkflowPreFlightIssue, WorkflowPreFlightIssueSeverity, WorkflowPreFlightIssueType, WorkflowPreFlightResult, WorkflowRunner, WorkflowRunnerConfig } from "./workflow/runner.js";
@@ -124,4 +126,4 @@ import { docBlockToMarkdown, eventToMarkdown, exportFeature, exportSpec, feature
124
126
  import { AGENT_SYSTEM_PROMPTS, formatPlanForAgent, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt } from "./llm/prompts.js";
125
127
  import "./llm/index.js";
126
128
  import { defineSchemaModel } from "@lssm/lib.schema";
127
- export { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, Action, ActionExecutionResult, Actor, AgentPrompt, AgentType, AllocationStrategy, AnyContractSpec, 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, ContractSpec, CoverageRequirement, CreateCustomerInput, CreateIntegrationConnection, CreateKnowledgeSource, CreatePaymentIntentInput, CreateRendererOptions, DataMigrationStep, DataPresentation, DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, 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, EventSpec, 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, Fixture, FormAction, FormOption, FormRef, FormRegistry, FormSpec, FormValuesFor, GetObjectResult, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupFieldSpec, GuardCondition, GuardConditionKind, GuardContext, GuardEvaluator, HandlerCtx, HandlerFor, ImplementationPlan, ImplementationRef, ImplementationType, InMemoryStateStore, 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, MarkdownPresentation, MessageKey, MetricAggregation, MigrationCheck, MigrationExecutor, MigrationMeta, MigrationPlan, MigrationRegistry, MigrationSpec, MigrationStep, MigrationStepBase, MigrationStepKind, MissingReference, Money, OPAAdapterOptions, OPAClient, OPAEvaluationResult, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, ObjectStorageProvider, OpKind, OpRef, OpenApiDocument, OpenApiExportOptions, OpenApiServer, 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, 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, PresentationContent, PresentationDescriptorV2, PresentationKind, PresentationMeta, PresentationPolicy, PresentationRef, PresentationRegistry, PresentationRenderer, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationSpec, PresentationTarget, PresentationV2Meta, 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, 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, SchemaMarkdownOptions, SchemaMigrationStep, SelectFieldSpec, SendSmsInput, ShadcnDriver, SignalAdapters, SignedUrlOptions, SmsDeliveryStatus, SmsMessage, SmsProvider, SpecChangeProposal, SpecExportOptions, SpecExportResult, SpecInput, SpecLookup, SpecOutput, SpecPointer, SpecRegistry, 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, ValidationMigrationStep, VectorDeleteRequest, VectorDocument, VectorSearchQuery, VectorSearchResult, VectorStoreProvider, VectorUpsertRequest, VerificationIssue, VerificationReport, VerificationTier, Voice, VoiceProvider, VoiceSynthesisInput, VoiceSynthesisResult, WebComponentPresentation, WhenClause, WorkflowDefinition, WorkflowMeta, WorkflowPreFlightError, WorkflowPreFlightIssue, WorkflowPreFlightIssueSeverity, WorkflowPreFlightIssueType, WorkflowPreFlightResult, WorkflowRegistry, WorkflowRunner, WorkflowRunnerConfig, WorkflowSpec, WorkflowState, WorkflowStateFilters, WorkflowStatus, WorkflowTargetRef, WorkflowValidationError, WorkflowValidationIssue, WorkflowValidationLevel, ZodSpecInput, assertPrimaryOpenBankingReady, assertWorkflowSpecValid, behaviorToEnvelope, buildOPAInput, buildZodWithRelations, capabilityKey, composeAppConfig, createDefaultIntegrationSpecRegistry, createDefaultTransformEngine, createEngineWithDefaults, createFeatureModule, createFetchHandler, createFileStateStore, createFormRenderer, createMcpServer, dataViewKey, defaultDocRegistry, defaultGqlField, defaultMcpTool, defaultRestPath, defineCapability, defineCommand, defineEvent, defineFormSpec, definePrompt, defineQuery, defineResourceTemplate, defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, gmailIntegrationSpec, googleCalendarIntegrationSpec, installFeature, installOp, integrationContracts, isEmitDeclRef, isResourceRef, jsonSchemaForPresentation, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makePolicyKey, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, 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, specToAgentPrompt, specToContextMarkdown, specToFullMarkdown, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, toV2FromV1, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateFeatureTargetsV2, validateWorkflowSpec };
129
+ export { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, Action, ActionExecutionResult, Actor, AgentPrompt, AgentType, AllocationStrategy, 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, ContractsrcConfig, ContractsrcSchema, CoverageRequirement, CreateCustomerInput, CreateIntegrationConnection, CreateKnowledgeSource, CreatePaymentIntentInput, CreateRendererOptions, DEFAULT_CONTRACTSRC, DataMigrationStep, DataPresentation, DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, 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, EventSpec, 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, GetObjectResult, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupFieldSpec, GroupKeyFn, GroupedItems, GroupingStrategies, GuardCondition, GuardConditionKind, GuardContext, GuardEvaluator, HandlerCtx, HandlerForOperationSpec, ImplementationPlan, ImplementationRef, ImplementationType, InMemoryStateStore, 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, MarkdownPresentation, MessageKey, MetricAggregation, MigrationCheck, MigrationExecutor, MigrationMeta, MigrationPlan, MigrationRegistry, MigrationSpec, MigrationStep, MigrationStepBase, MigrationStepKind, MissingReference, 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, 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, PresentationContent, PresentationDescriptorV2, PresentationKind, PresentationMeta, PresentationPolicy, PresentationRef, PresentationRegistry, PresentationRenderer, PresentationSource, PresentationSourceBlocknotejs, PresentationSourceComponentReact, PresentationSpec, PresentationTarget, PresentationV2Meta, 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, 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, ValidationMigrationStep, VectorDeleteRequest, VectorDocument, VectorSearchQuery, VectorSearchResult, VectorStoreProvider, VectorUpsertRequest, VerificationIssue, VerificationReport, VerificationTier, Voice, VoiceProvider, VoiceSynthesisInput, VoiceSynthesisResult, WebComponentPresentation, 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, defineEvent, defineFormSpec, 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, jsonSchemaForPresentation, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makePolicyKey, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, 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, specToAgentPrompt, specToContextMarkdown, specToFullMarkdown, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateFeatureTargetsV2, validateWorkflowSpec };
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { CapabilityRegistry, capabilityKey, defineCapability } from "./capabilities.js";
2
+ import { GroupingStrategies, filterBy, getUniqueDomains, getUniqueOwners, getUniqueTags, groupBy, groupByMultiple, groupByToArray, init_registry_utils } from "./registry-utils.js";
2
3
  import { DataViewRegistry, dataViewKey } from "./data-views.js";
3
4
  import { K5 } from "./schema/dist/index.js";
4
5
  import { defineEvent, eventKey } from "./events.js";
@@ -21,10 +22,10 @@ import { expressRouter } from "./server/rest-express.js";
21
22
  import { makeNextAppHandler } from "./server/rest-next-app.js";
22
23
  import { makeNextPagesHandler } from "./server/rest-next-pages.js";
23
24
  import "./server/index.js";
24
- import { defineCommand, defineQuery, isEmitDeclRef } from "./spec.js";
25
+ import { defineCommand, defineQuery, isEmitDeclRef } from "./operation.js";
25
26
  import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes } from "./docs/presentations.js";
26
27
  import { DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks } from "./docs/registry.js";
27
- import { SpecRegistry, opKey } from "./registry.js";
28
+ import { OperationSpecRegistry, opKey } from "./registry.js";
28
29
  import { Owners, OwnersEnum, StabilityEnum, Tags, TagsEnum } from "./ownership.js";
29
30
  import { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema } from "./contract-registry/schemas.js";
30
31
  import "./contract-registry/index.js";
@@ -33,7 +34,6 @@ import { openApiForRegistry } from "./openapi.js";
33
34
  import { definePrompt } from "./prompt.js";
34
35
  import { PromptRegistry } from "./promptRegistry.js";
35
36
  import { ResourceRegistry, defineResourceTemplate, isResourceRef, resourceRef } from "./resources.js";
36
- import { toV2FromV1 } from "./presentations.backcompat.js";
37
37
  import { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from "./onboarding-base.js";
38
38
  import { openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, registerOpenBankingCapabilities } from "./capabilities/openbanking.js";
39
39
  import { PolicyRegistry, makePolicyKey } from "./policy/spec.js";
@@ -88,6 +88,8 @@ import { RegeneratorService } from "./regenerator/service.js";
88
88
  import { ProposalExecutor } from "./regenerator/executor.js";
89
89
  import { ExecutorProposalSink } from "./regenerator/sinks.js";
90
90
  import "./regenerator/index.js";
91
+ import { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema } from "./workspace-config/contractsrc-schema.js";
92
+ import "./workspace-config/index.js";
91
93
  import { WorkflowRegistry } from "./workflow/spec.js";
92
94
  import { WorkflowValidationError, assertWorkflowSpecValid, validateWorkflowSpec } from "./workflow/validation.js";
93
95
  import { evaluateExpression } from "./workflow/expression.js";
@@ -103,4 +105,8 @@ import { docBlockToMarkdown, eventToMarkdown, exportFeature, exportSpec, feature
103
105
  import { AGENT_SYSTEM_PROMPTS, formatPlanForAgent, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt } from "./llm/prompts.js";
104
106
  import "./llm/index.js";
105
107
 
106
- export { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, AppBlueprintRegistry, BankAccountRecord, BankTransactionRecord, CapabilityRegistry, CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema, CreateIntegrationConnection, CreateKnowledgeSource, DataViewRegistry, DeleteIntegrationConnection, DeleteKnowledgeSource, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, DocRegistry, ExecutorProposalSink, ExperimentEvaluator, ExperimentRegistry, FeatureRegistry, FormRegistry, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, InMemoryStateStore, IntegrationSpecRegistry, KnowledgeSpaceRegistry, ListIntegrationConnections, ListKnowledgeSources, MigrationRegistry, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetBalances, OpenBankingListAccounts, OpenBankingListTransactions, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, Owners, OwnersEnum, PolicyEngine, PolicyRegistry, PresentationRegistry, PrismaStateStore, PromptRegistry, ProposalExecutor, RegeneratorService, ResourceRegistry, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput, SpecRegistry, 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, defineEvent, defineFormSpec, definePrompt, defineQuery, defineResourceTemplate, K5 as defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, gmailIntegrationSpec, googleCalendarIntegrationSpec, installFeature, installOp, integrationContracts, isEmitDeclRef, isResourceRef, jsonSchemaForPresentation, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makePolicyKey, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, 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, specToAgentPrompt, specToContextMarkdown, specToFullMarkdown, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, toV2FromV1, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateFeatureTargetsV2, validateWorkflowSpec };
108
+ //#region src/index.ts
109
+ init_registry_utils();
110
+
111
+ //#endregion
112
+ 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, ExecutorProposalSink, ExperimentEvaluator, ExperimentRegistry, FeatureRegistry, FolderConventionsSchema, FormRegistry, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupingStrategies, InMemoryStateStore, IntegrationSpecRegistry, KnowledgeSpaceRegistry, ListIntegrationConnections, ListKnowledgeSources, MigrationRegistry, 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, 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, defineEvent, defineFormSpec, definePrompt, defineQuery, defineResourceTemplate, K5 as 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, jsonSchemaForPresentation, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makePolicyKey, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, 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, specToAgentPrompt, specToContextMarkdown, specToFullMarkdown, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateFeatureTargetsV2, validateWorkflowSpec };
package/dist/install.d.ts CHANGED
@@ -1,23 +1,23 @@
1
1
  import { EventSpec } from "./events.js";
2
2
  import { ResourceRefDescriptor } from "./resources.js";
3
- import { AnyContractSpec, ContractSpec, EmitDecl } from "./spec.js";
3
+ import { AnyOperationSpec, EmitDecl, OperationSpec } from "./operation.js";
4
4
  import { HandlerCtx } from "./types.js";
5
- import { SpecRegistry } from "./registry.js";
5
+ import { OperationSpecRegistry } from "./registry.js";
6
6
  import * as z$1 from "zod";
7
7
  import { AnySchemaModel, ZodSchemaModel } from "@lssm/lib.schema";
8
8
 
9
9
  //#region src/install.d.ts
10
- /** Infer input/output types from a ContractSpec */
11
- type SpecInput<Spec extends AnyContractSpec> = Spec['io']['input'];
12
- type ZodSpecInput<Spec extends AnyContractSpec> = ZodSchemaModel<SpecInput<Spec> extends null ? AnySchemaModel : NonNullable<SpecInput<Spec>>>;
13
- type SpecOutput<Spec extends AnyContractSpec> = Spec['io']['output'];
10
+ /** Infer input/output types from a OperationSpec */
11
+ type OperationSpecInput<Spec extends AnyOperationSpec> = Spec['io']['input'];
12
+ type ZodOperationSpecInput<Spec extends AnyOperationSpec> = ZodSchemaModel<OperationSpecInput<Spec> extends null ? AnySchemaModel : NonNullable<OperationSpecInput<Spec>>>;
13
+ type OperationSpecOutput<Spec extends AnyOperationSpec> = Spec['io']['output'];
14
14
  type ResourceItem<O extends ResourceRefDescriptor<boolean>> = Record<O['varName'] extends string ? O['varName'] : 'id', string | number>;
15
15
  type ResourceRefOut<O> = O extends ResourceRefDescriptor<boolean> ? O['many'] extends true ? ResourceItem<O>[] : ResourceItem<O> : never;
16
- type RuntimeSpecOutput<Spec extends AnyContractSpec> = SpecOutput<Spec> extends AnySchemaModel ? ZodSchemaModel<SpecOutput<Spec>> : ResourceRefOut<SpecOutput<Spec>>;
16
+ type RuntimeSpecOutput<Spec extends AnyOperationSpec> = OperationSpecOutput<Spec> extends AnySchemaModel ? ZodSchemaModel<OperationSpecOutput<Spec>> : ResourceRefOut<OperationSpecOutput<Spec>>;
17
17
  /** Handler signature derived from the Spec */
18
- type HandlerFor<Spec extends AnyContractSpec> = (args: ZodSpecInput<Spec>, ctx: HandlerCtx) => Promise<RuntimeSpecOutput<Spec>>;
18
+ type HandlerForOperationSpec<Spec extends AnyOperationSpec> = (args: ZodOperationSpecInput<Spec>, ctx: HandlerCtx) => Promise<RuntimeSpecOutput<Spec>>;
19
19
  /** Typed event param from Spec.sideEffects.emits */
20
- type EventParam<S extends ContractSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>> = S extends {
20
+ type EventParam<S extends OperationSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>> = S extends {
21
21
  sideEffects?: {
22
22
  emits?: readonly (infer E)[];
23
23
  };
@@ -31,7 +31,7 @@ type EventParam<S extends ContractSpec<AnySchemaModel, AnySchemaModel | Resource
31
31
  payload: z$1.infer<ReturnType<E['payload']['getZod']>>;
32
32
  } : never : never;
33
33
  /** Build a type union of allowed events for a spec */
34
- type AllowedEventUnion<S extends ContractSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>> = S['sideEffects'] extends {
34
+ type AllowedEventUnion<S extends OperationSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>> = S['sideEffects'] extends {
35
35
  emits: readonly EmitDecl[];
36
36
  } ? { [K in keyof S['sideEffects']['emits']]: S['sideEffects']['emits'][K] extends {
37
37
  ref: EventSpec<infer P>;
@@ -49,7 +49,7 @@ type AllowedEventUnion<S extends ContractSpec<AnySchemaModel, AnySchemaModel | R
49
49
  payload: z$1.infer<ReturnType<Q['getZod']>>;
50
50
  } : never }[number] : never;
51
51
  /** Typed emit for a given spec (validates at runtime through ctx.__emitGuard__). */
52
- declare function makeEmit<S extends AnyContractSpec>(_spec: S, ctx: HandlerCtx): {
52
+ declare function makeEmit<S extends AnyOperationSpec>(_spec: S, ctx: HandlerCtx): {
53
53
  /** Le plus sûr : typé via EventSpec (pas besoin de tuple dans le spec) */
54
54
  ref: <T extends AnySchemaModel>(ev: EventSpec<T>, payload: ZodSchemaModel<T>) => Promise<void>;
55
55
  /** Nom/version explicites (runtime-checked par la guard) */
@@ -61,16 +61,16 @@ declare function makeEmit<S extends AnyContractSpec>(_spec: S, ctx: HandlerCtx):
61
61
  * Register the Spec and bind the handler in one call, with full type inference.
62
62
  * Returns the registry for chaining.
63
63
  */
64
- declare function installOp<S extends AnyContractSpec>(reg: SpecRegistry, spec: S, handler: HandlerFor<S>): SpecRegistry;
64
+ declare function installOp<S extends AnyOperationSpec>(reg: OperationSpecRegistry, spec: S, handler: HandlerForOperationSpec<S>): OperationSpecRegistry;
65
65
  /**
66
66
  * Curried variant if you prefer building a module installer.
67
67
  * const install = op(BeginSignupSpec, handler);
68
68
  * install(reg);
69
69
  */
70
- declare function op<S extends AnyContractSpec>(spec: S, handler: HandlerFor<AnyContractSpec>): {
70
+ declare function op<S extends AnyOperationSpec>(spec: S, handler: HandlerForOperationSpec<AnyOperationSpec>): {
71
71
  spec: S;
72
- handler: HandlerFor<AnyContractSpec>;
73
- install: (reg: SpecRegistry) => SpecRegistry;
72
+ handler: HandlerForOperationSpec<AnyOperationSpec>;
73
+ install: (reg: OperationSpecRegistry) => OperationSpecRegistry;
74
74
  };
75
75
  //#endregion
76
- export { EventParam, HandlerFor, RuntimeSpecOutput, SpecInput, SpecOutput, ZodSpecInput, installOp, makeEmit, op };
76
+ export { EventParam, HandlerForOperationSpec, OperationSpecInput, OperationSpecOutput, RuntimeSpecOutput, ZodOperationSpecInput, installOp, makeEmit, op };