@contractspec/lib.contracts 1.46.1 → 1.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/app-config/app-config.capability.d.ts +7 -0
  2. package/dist/app-config/app-config.capability.js +23 -0
  3. package/dist/app-config/app-config.feature.d.ts +1 -2
  4. package/dist/app-config/app-config.feature.js +9 -2
  5. package/dist/app-config/contracts.d.ts +50 -50
  6. package/dist/app-config/events.d.ts +27 -27
  7. package/dist/app-config/index.d.ts +4 -3
  8. package/dist/app-config/index.js +3 -2
  9. package/dist/app-config/lifecycle-contracts.d.ts +55 -55
  10. package/dist/app-config/runtime.d.ts +6 -6
  11. package/dist/app-config/spec.d.ts +9 -5
  12. package/dist/app-config/spec.js +5 -1
  13. package/dist/contract-registry/schemas.d.ts +2 -2
  14. package/dist/data-views/runtime.d.ts +5 -1
  15. package/dist/data-views/runtime.js +34 -7
  16. package/dist/data-views/spec.d.ts +1 -1
  17. package/dist/docs/index.js +2 -1
  18. package/dist/docs/tech/cli.docblock.d.ts +6 -0
  19. package/dist/docs/tech/cli.docblock.js +138 -0
  20. package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +106 -1
  21. package/dist/docs/tech/studio/project-access-teams.docblock.js +3 -1
  22. package/dist/examples/index.d.ts +9 -1
  23. package/dist/examples/index.js +8 -1
  24. package/dist/examples/registry.d.ts +3 -25
  25. package/dist/examples/registry.js +4 -60
  26. package/dist/examples/schema.d.ts +17 -17
  27. package/dist/examples/types.d.ts +1 -1
  28. package/dist/features/types.d.ts +1 -1
  29. package/dist/index.d.ts +27 -26
  30. package/dist/index.js +6 -6
  31. package/dist/install.d.ts +1 -1
  32. package/dist/integrations/index.d.ts +2 -2
  33. package/dist/integrations/index.js +2 -2
  34. package/dist/integrations/integrations.capability.d.ts +7 -0
  35. package/dist/integrations/integrations.capability.js +17 -0
  36. package/dist/integrations/integrations.feature.d.ts +1 -2
  37. package/dist/integrations/integrations.feature.js +9 -2
  38. package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
  39. package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
  40. package/dist/integrations/openbanking/models.d.ts +55 -55
  41. package/dist/integrations/openbanking/openbanking.capability.d.ts +7 -0
  42. package/dist/integrations/openbanking/openbanking.capability.js +21 -0
  43. package/dist/integrations/openbanking/openbanking.feature.d.ts +1 -2
  44. package/dist/integrations/openbanking/openbanking.feature.js +9 -2
  45. package/dist/integrations/operations.d.ts +102 -102
  46. package/dist/integrations/providers/elevenlabs.d.ts +1 -0
  47. package/dist/integrations/providers/elevenlabs.js +3 -2
  48. package/dist/integrations/providers/gcs-storage.d.ts +1 -0
  49. package/dist/integrations/providers/gcs-storage.js +3 -2
  50. package/dist/integrations/providers/gmail.d.ts +1 -0
  51. package/dist/integrations/providers/gmail.js +3 -2
  52. package/dist/integrations/providers/google-calendar.d.ts +1 -0
  53. package/dist/integrations/providers/google-calendar.js +3 -2
  54. package/dist/integrations/providers/impls/provider-factory.js +2 -1
  55. package/dist/integrations/providers/mistral.d.ts +1 -0
  56. package/dist/integrations/providers/mistral.js +3 -2
  57. package/dist/integrations/providers/postmark.d.ts +1 -0
  58. package/dist/integrations/providers/postmark.js +3 -2
  59. package/dist/integrations/providers/powens.d.ts +1 -0
  60. package/dist/integrations/providers/powens.js +3 -2
  61. package/dist/integrations/providers/qdrant.d.ts +1 -0
  62. package/dist/integrations/providers/qdrant.js +3 -2
  63. package/dist/integrations/providers/stripe.d.ts +1 -0
  64. package/dist/integrations/providers/stripe.js +3 -2
  65. package/dist/integrations/providers/twilio-sms.d.ts +1 -0
  66. package/dist/integrations/providers/twilio-sms.js +3 -2
  67. package/dist/integrations/spec.d.ts +5 -1
  68. package/dist/integrations/spec.js +5 -1
  69. package/dist/knowledge/knowledge.capability.d.ts +7 -0
  70. package/dist/knowledge/knowledge.capability.js +21 -0
  71. package/dist/knowledge/knowledge.feature.d.ts +1 -2
  72. package/dist/knowledge/knowledge.feature.js +9 -2
  73. package/dist/knowledge/operations.d.ts +66 -66
  74. package/dist/llm/exporters.d.ts +1 -1
  75. package/dist/llm/types.d.ts +1 -1
  76. package/dist/onboarding-base.d.ts +29 -29
  77. package/dist/operations/operation.d.ts +1 -1
  78. package/dist/server/mcp/createMcpServer.js +1 -1
  79. package/dist/server/mcp/mcpTypes.d.ts +1 -1
  80. package/dist/server/mcp/registerPresentations.js +1 -1
  81. package/dist/server/mcp/registerResources.js +2 -2
  82. package/dist/tests/index.d.ts +2 -2
  83. package/dist/tests/index.js +2 -2
  84. package/dist/tests/spec.d.ts +2 -1
  85. package/dist/tests/spec.js +4 -1
  86. package/dist/types.d.ts +2 -2
  87. package/dist/workflow/index.d.ts +8 -1
  88. package/dist/workflow/index.js +8 -1
  89. package/dist/workflow/runner.d.ts +2 -2
  90. package/dist/workflow/spec.d.ts +1 -1
  91. package/dist/workflow/validation.d.ts +1 -1
  92. package/dist/workspace-config/contractsrc-schema.d.ts +45 -974
  93. package/dist/workspace-config/contractsrc-schema.js +89 -55
  94. package/dist/workspace-config/contractsrc-types.d.ts +346 -0
  95. package/dist/workspace-config/contractsrc-types.js +0 -0
  96. package/dist/workspace-config/index.d.ts +3 -2
  97. package/package.json +27 -25
  98. package/dist/docs/tech/contracts/create-subscription.docblock.d.ts +0 -6
  99. package/dist/docs/tech/contracts/create-subscription.docblock.js +0 -21
  100. package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.d.ts +0 -6
  101. package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.js +0 -21
  102. package/dist/docs/tech/templates/runtime.docblock.d.ts +0 -6
  103. package/dist/docs/tech/templates/runtime.docblock.js +0 -21
@@ -1,136 +1,136 @@
1
1
  import { OperationSpec } from "./operations/operation.js";
2
2
  import "./index.js";
3
- import * as _contractspec_lib_schema165 from "@contractspec/lib.schema";
3
+ import * as _contractspec_lib_schema97 from "@contractspec/lib.schema";
4
4
  import { SchemaModel } from "@contractspec/lib.schema";
5
5
 
6
6
  //#region src/onboarding-base.d.ts
7
7
  /** Save/update onboarding draft (auto-save during flow) */
8
8
  declare const SaveOnboardingDraftInput: SchemaModel<{
9
9
  data: {
10
- type: _contractspec_lib_schema165.FieldType<unknown, unknown>;
10
+ type: _contractspec_lib_schema97.FieldType<unknown, unknown>;
11
11
  isOptional: false;
12
12
  };
13
13
  }>;
14
14
  declare const SaveOnboardingDraftOutput: SchemaModel<{
15
15
  id: {
16
- type: _contractspec_lib_schema165.FieldType<string, string>;
16
+ type: _contractspec_lib_schema97.FieldType<string, string>;
17
17
  isOptional: false;
18
18
  };
19
19
  organizationId: {
20
- type: _contractspec_lib_schema165.FieldType<string, string>;
20
+ type: _contractspec_lib_schema97.FieldType<string, string>;
21
21
  isOptional: false;
22
22
  };
23
23
  }>;
24
24
  declare const SaveOnboardingDraftBaseSpec: OperationSpec<SchemaModel<{
25
25
  data: {
26
- type: _contractspec_lib_schema165.FieldType<unknown, unknown>;
26
+ type: _contractspec_lib_schema97.FieldType<unknown, unknown>;
27
27
  isOptional: false;
28
28
  };
29
29
  }>, SchemaModel<{
30
30
  id: {
31
- type: _contractspec_lib_schema165.FieldType<string, string>;
31
+ type: _contractspec_lib_schema97.FieldType<string, string>;
32
32
  isOptional: false;
33
33
  };
34
34
  organizationId: {
35
- type: _contractspec_lib_schema165.FieldType<string, string>;
35
+ type: _contractspec_lib_schema97.FieldType<string, string>;
36
36
  isOptional: false;
37
37
  };
38
38
  }>, undefined>;
39
39
  /** Get current onboarding draft (on mount/restore) */
40
40
  declare const GetOnboardingDraftOutput: SchemaModel<{
41
41
  id: {
42
- type: _contractspec_lib_schema165.FieldType<string, string>;
42
+ type: _contractspec_lib_schema97.FieldType<string, string>;
43
43
  isOptional: true;
44
44
  };
45
45
  organizationId: {
46
- type: _contractspec_lib_schema165.FieldType<string, string>;
46
+ type: _contractspec_lib_schema97.FieldType<string, string>;
47
47
  isOptional: true;
48
48
  };
49
49
  data: {
50
- type: _contractspec_lib_schema165.FieldType<unknown, unknown>;
50
+ type: _contractspec_lib_schema97.FieldType<unknown, unknown>;
51
51
  isOptional: true;
52
52
  };
53
53
  createdAt: {
54
- type: _contractspec_lib_schema165.FieldType<Date, string>;
54
+ type: _contractspec_lib_schema97.FieldType<Date, string>;
55
55
  isOptional: true;
56
56
  };
57
57
  updatedAt: {
58
- type: _contractspec_lib_schema165.FieldType<Date, string>;
58
+ type: _contractspec_lib_schema97.FieldType<Date, string>;
59
59
  isOptional: true;
60
60
  };
61
61
  }>;
62
- declare const GetOnboardingDraftBaseSpec: OperationSpec<_contractspec_lib_schema165.AnySchemaModel, SchemaModel<{
62
+ declare const GetOnboardingDraftBaseSpec: OperationSpec<_contractspec_lib_schema97.AnySchemaModel, SchemaModel<{
63
63
  id: {
64
- type: _contractspec_lib_schema165.FieldType<string, string>;
64
+ type: _contractspec_lib_schema97.FieldType<string, string>;
65
65
  isOptional: true;
66
66
  };
67
67
  organizationId: {
68
- type: _contractspec_lib_schema165.FieldType<string, string>;
68
+ type: _contractspec_lib_schema97.FieldType<string, string>;
69
69
  isOptional: true;
70
70
  };
71
71
  data: {
72
- type: _contractspec_lib_schema165.FieldType<unknown, unknown>;
72
+ type: _contractspec_lib_schema97.FieldType<unknown, unknown>;
73
73
  isOptional: true;
74
74
  };
75
75
  createdAt: {
76
- type: _contractspec_lib_schema165.FieldType<Date, string>;
76
+ type: _contractspec_lib_schema97.FieldType<Date, string>;
77
77
  isOptional: true;
78
78
  };
79
79
  updatedAt: {
80
- type: _contractspec_lib_schema165.FieldType<Date, string>;
80
+ type: _contractspec_lib_schema97.FieldType<Date, string>;
81
81
  isOptional: true;
82
82
  };
83
83
  }>, undefined>;
84
84
  /** Delete onboarding draft (cleanup after completion or cancel) */
85
85
  declare const DeleteOnboardingDraftOutput: SchemaModel<{
86
86
  ok: {
87
- type: _contractspec_lib_schema165.FieldType<boolean, boolean>;
87
+ type: _contractspec_lib_schema97.FieldType<boolean, boolean>;
88
88
  isOptional: false;
89
89
  };
90
90
  }>;
91
- declare const DeleteOnboardingDraftBaseSpec: OperationSpec<_contractspec_lib_schema165.AnySchemaModel, SchemaModel<{
91
+ declare const DeleteOnboardingDraftBaseSpec: OperationSpec<_contractspec_lib_schema97.AnySchemaModel, SchemaModel<{
92
92
  ok: {
93
- type: _contractspec_lib_schema165.FieldType<boolean, boolean>;
93
+ type: _contractspec_lib_schema97.FieldType<boolean, boolean>;
94
94
  isOptional: false;
95
95
  };
96
96
  }>, undefined>;
97
97
  /** Complete onboarding (final submit, creates entities) */
98
98
  declare const CompleteOnboardingBaseInput: SchemaModel<{
99
99
  data: {
100
- type: _contractspec_lib_schema165.FieldType<unknown, unknown>;
100
+ type: _contractspec_lib_schema97.FieldType<unknown, unknown>;
101
101
  isOptional: false;
102
102
  };
103
103
  }>;
104
104
  declare const CompleteOnboardingBaseOutput: SchemaModel<{
105
105
  success: {
106
- type: _contractspec_lib_schema165.FieldType<boolean, boolean>;
106
+ type: _contractspec_lib_schema97.FieldType<boolean, boolean>;
107
107
  isOptional: false;
108
108
  };
109
109
  userId: {
110
- type: _contractspec_lib_schema165.FieldType<string, string>;
110
+ type: _contractspec_lib_schema97.FieldType<string, string>;
111
111
  isOptional: true;
112
112
  };
113
113
  organizationId: {
114
- type: _contractspec_lib_schema165.FieldType<string, string>;
114
+ type: _contractspec_lib_schema97.FieldType<string, string>;
115
115
  isOptional: true;
116
116
  };
117
117
  }>;
118
118
  declare const CompleteOnboardingBaseSpec: OperationSpec<SchemaModel<{
119
119
  data: {
120
- type: _contractspec_lib_schema165.FieldType<unknown, unknown>;
120
+ type: _contractspec_lib_schema97.FieldType<unknown, unknown>;
121
121
  isOptional: false;
122
122
  };
123
123
  }>, SchemaModel<{
124
124
  success: {
125
- type: _contractspec_lib_schema165.FieldType<boolean, boolean>;
125
+ type: _contractspec_lib_schema97.FieldType<boolean, boolean>;
126
126
  isOptional: false;
127
127
  };
128
128
  userId: {
129
- type: _contractspec_lib_schema165.FieldType<string, string>;
129
+ type: _contractspec_lib_schema97.FieldType<string, string>;
130
130
  isOptional: true;
131
131
  };
132
132
  organizationId: {
133
- type: _contractspec_lib_schema165.FieldType<string, string>;
133
+ type: _contractspec_lib_schema97.FieldType<string, string>;
134
134
  isOptional: true;
135
135
  };
136
136
  }>, undefined>;
@@ -1,8 +1,8 @@
1
1
  import { OwnerShipMeta } from "../ownership.js";
2
2
  import { PolicyRef } from "../policy/spec.js";
3
- import { EventSpec } from "../events.js";
4
3
  import { ResourceRefDescriptor } from "../resources.js";
5
4
  import { TestSpecRef } from "../tests/spec.js";
5
+ import { EventSpec } from "../events.js";
6
6
  import { AnySchemaModel } from "@contractspec/lib.schema";
7
7
 
8
8
  //#region src/operations/operation.d.ts
@@ -9,7 +9,7 @@ import { registerMcpPresentations } from "./registerPresentations.js";
9
9
  * and (optionally) presentations.\n+ *
10
10
  * ContractSpec exposes:\n+ * - Tools: `command` operations from `OperationSpecRegistry`.\n+ * - Resources: templates from `ResourceRegistry`.\n+ * - Prompts: templates from `PromptRegistry`.\n+ * - Presentations: V1 registry and/or V2 descriptors as read-only resources.\n+ */
11
11
  function createMcpServer(server, ops, resources, prompts, ctxFactories) {
12
- ctxFactories.logger.info("Creating MCP server");
12
+ ctxFactories.logger.debug("Creating MCP server");
13
13
  registerMcpTools(server, ops, { toolCtx: ctxFactories.toolCtx });
14
14
  registerMcpResources(server, resources, {
15
15
  logger: ctxFactories.logger,
@@ -1,6 +1,6 @@
1
- import { HandlerCtx } from "../../types.js";
2
1
  import { PresentationRegistry } from "../../presentations/registry.js";
3
2
  import "../../presentations/index.js";
3
+ import { HandlerCtx } from "../../types.js";
4
4
  import { Logger } from "@contractspec/lib.logger";
5
5
 
6
6
  //#region src/server/mcp/mcpTypes.d.ts
@@ -13,7 +13,7 @@ function registerMcpPresentations(server, ctx) {
13
13
  for (const presentationSpec of ctx.presentations.list()) {
14
14
  const baseKey = sanitizeMcpName(`presentation_${presentationSpec.meta.key}_v${presentationSpec.meta.version}`);
15
15
  const baseUri = `presentation://${presentationSpec.meta.key}/v${presentationSpec.meta.version}`;
16
- ctx.logger.info(`Registering presentation ${baseUri} for ${baseKey}`);
16
+ ctx.logger.debug(`Registering presentation ${baseUri} for ${baseKey}`);
17
17
  server.registerResource(baseKey, baseUri, {
18
18
  title: `${presentationSpec.meta.key} v${presentationSpec.meta.version}`,
19
19
  description: presentationSpec.meta.description ?? "Presentation",
@@ -12,7 +12,7 @@ function mcpResourceMeta(resource) {
12
12
  }
13
13
  function registerMcpResources(server, resources, ctx) {
14
14
  for (const resource of resources.listTemplates()) {
15
- ctx.logger.info("Registering resource: " + resource.meta.uriTemplate);
15
+ ctx.logger.debug("Registering resource: " + resource.meta.uriTemplate);
16
16
  server.registerResource(resource.meta.uriTemplate, new ResourceTemplate(resource.meta.uriTemplate, { list: void 0 }), mcpResourceMeta(resource), async (_uri, variables) => {
17
17
  const parsedArgs = resource.input.parse(variables);
18
18
  const out = await resource.resolve(parsedArgs, ctx.resourceCtx());
@@ -27,7 +27,7 @@ function registerMcpResources(server, resources, ctx) {
27
27
  blob: Buffer.from(out.data).toString("base64")
28
28
  }] };
29
29
  });
30
- ctx.logger.info("Registered resource: " + resource.meta.uriTemplate);
30
+ ctx.logger.debug("Registered resource: " + resource.meta.uriTemplate);
31
31
  }
32
32
  }
33
33
 
@@ -1,3 +1,3 @@
1
- import { Action, Assertion, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, TestRegistry, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, makeTestKey } from "./spec.js";
1
+ import { Action, Assertion, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, TestRegistry, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, defineTestSpec, makeTestKey } from "./spec.js";
2
2
  import { AssertionResult, ScenarioRunResult, TestRunResult, TestRunner, TestRunnerConfig } from "./runner.js";
3
- export { Action, Assertion, AssertionResult, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, ScenarioRunResult, TestRegistry, TestRunResult, TestRunner, TestRunnerConfig, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, makeTestKey };
3
+ export { Action, Assertion, AssertionResult, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, ScenarioRunResult, TestRegistry, TestRunResult, TestRunner, TestRunnerConfig, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, defineTestSpec, makeTestKey };
@@ -1,4 +1,4 @@
1
- import { TestRegistry, makeTestKey } from "./spec.js";
1
+ import { TestRegistry, defineTestSpec, makeTestKey } from "./spec.js";
2
2
  import { TestRunner } from "./runner.js";
3
3
 
4
- export { TestRegistry, TestRunner, makeTestKey };
4
+ export { TestRegistry, TestRunner, defineTestSpec, makeTestKey };
@@ -77,5 +77,6 @@ declare class TestRegistry {
77
77
  get(name: string, version?: string): TestSpec | undefined;
78
78
  }
79
79
  declare function makeTestKey(meta: TestSpecMeta): string;
80
+ declare function defineTestSpec(spec: TestSpec): TestSpec;
80
81
  //#endregion
81
- export { Action, Assertion, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, TestRegistry, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, makeTestKey };
82
+ export { Action, Assertion, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, TestRegistry, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, defineTestSpec, makeTestKey };
@@ -26,6 +26,9 @@ var TestRegistry = class {
26
26
  function makeTestKey(meta) {
27
27
  return testKey(meta);
28
28
  }
29
+ function defineTestSpec(spec) {
30
+ return spec;
31
+ }
29
32
 
30
33
  //#endregion
31
- export { TestRegistry, makeTestKey };
34
+ export { TestRegistry, defineTestSpec, makeTestKey };
package/dist/types.d.ts CHANGED
@@ -5,8 +5,8 @@ import { ResolvedBranding } from "./app-config/branding.js";
5
5
  import { Locale, MessageKey } from "./translations/catalog.js";
6
6
  import { ResolvedAppConfig, ResolvedIntegration, ResolvedKnowledge, ResolvedTranslation } from "./app-config/runtime.js";
7
7
  import { SecretProvider } from "./integrations/secrets/provider.js";
8
- import { EventRegistry } from "./events.js";
9
8
  import { SpecVariantResolver } from "./experiments/spec-resolver.js";
9
+ import { EventRegistry } from "./events.js";
10
10
 
11
11
  //#region src/types.d.ts
12
12
  /**
@@ -14,7 +14,7 @@ import { SpecVariantResolver } from "./experiments/spec-resolver.js";
14
14
  */
15
15
  type Actor = 'anonymous' | 'user' | 'admin';
16
16
  type Channel = 'web' | 'mobile' | 'job' | 'agent';
17
- type ContractSpecType = 'app-config' | 'agent' | 'operation' | 'event' | 'presentation' | 'capability' | 'integration' | 'data-view' | 'feature' | 'workflow' | 'policy' | 'theme' | 'telemetry' | 'experiment' | 'knowledge-space';
17
+ type ContractSpecType = 'app-config' | 'agent' | 'operation' | 'example' | 'event' | 'presentation' | 'capability' | 'integration' | 'data-view' | 'feature' | 'workflow' | 'policy' | 'theme' | 'telemetry' | 'experiment' | 'knowledge-space';
18
18
  interface FieldLevelDecision {
19
19
  field: string;
20
20
  effect: 'allow' | 'deny';
@@ -7,4 +7,11 @@ import { InMemoryStateStore } from "./adapters/memory-store.js";
7
7
  import { PrismaStateStore } from "./adapters/db-adapter.js";
8
8
  import { FileStateStoreOptions, createFileStateStore } from "./adapters/file-adapter.js";
9
9
  import "./adapters/index.js";
10
- export { CompensationStep, CompensationStrategy, ExpressionContext, FileStateStoreOptions, FormRef, GuardCondition, GuardConditionKind, GuardContext, GuardEvaluator, InMemoryStateStore, OperationExecutor, OperationExecutorContext, PrismaStateStore, RetryPolicy, SLA, StateStore, Step, StepAction, StepExecution, StepType, Transition, ValidateWorkflowSpecOptions, WorkflowDefinition, WorkflowMeta, WorkflowPreFlightError, WorkflowPreFlightIssue, WorkflowPreFlightIssueSeverity, WorkflowPreFlightIssueType, WorkflowPreFlightResult, WorkflowRegistry, WorkflowRunner, WorkflowRunnerConfig, WorkflowSpec, WorkflowState, WorkflowStateFilters, WorkflowStatus, WorkflowValidationError, WorkflowValidationIssue, WorkflowValidationLevel, assertWorkflowSpecValid, createFileStateStore, evaluateExpression, validateWorkflowSpec };
10
+
11
+ //#region src/workflow/index.d.ts
12
+ /**
13
+ * Helper to define a Workflow.
14
+ */
15
+ declare const defineWorkflow: (spec: WorkflowSpec) => WorkflowSpec;
16
+ //#endregion
17
+ export { CompensationStep, CompensationStrategy, ExpressionContext, FileStateStoreOptions, FormRef, GuardCondition, GuardConditionKind, GuardContext, GuardEvaluator, InMemoryStateStore, OperationExecutor, OperationExecutorContext, PrismaStateStore, RetryPolicy, SLA, StateStore, Step, StepAction, StepExecution, StepType, Transition, ValidateWorkflowSpecOptions, WorkflowDefinition, WorkflowMeta, WorkflowPreFlightError, WorkflowPreFlightIssue, WorkflowPreFlightIssueSeverity, WorkflowPreFlightIssueType, WorkflowPreFlightResult, WorkflowRegistry, WorkflowRunner, WorkflowRunnerConfig, WorkflowSpec, WorkflowState, WorkflowStateFilters, WorkflowStatus, WorkflowValidationError, WorkflowValidationIssue, WorkflowValidationLevel, assertWorkflowSpecValid, createFileStateStore, defineWorkflow, evaluateExpression, validateWorkflowSpec };
@@ -6,4 +6,11 @@ import { InMemoryStateStore } from "./adapters/memory-store.js";
6
6
  import { PrismaStateStore } from "./adapters/db-adapter.js";
7
7
  import { createFileStateStore } from "./adapters/file-adapter.js";
8
8
 
9
- export { InMemoryStateStore, PrismaStateStore, WorkflowPreFlightError, WorkflowRegistry, WorkflowRunner, WorkflowValidationError, assertWorkflowSpecValid, createFileStateStore, evaluateExpression, validateWorkflowSpec };
9
+ //#region src/workflow/index.ts
10
+ /**
11
+ * Helper to define a Workflow.
12
+ */
13
+ const defineWorkflow = (spec) => spec;
14
+
15
+ //#endregion
16
+ export { InMemoryStateStore, PrismaStateStore, WorkflowPreFlightError, WorkflowRegistry, WorkflowRunner, WorkflowValidationError, assertWorkflowSpecValid, createFileStateStore, defineWorkflow, evaluateExpression, validateWorkflowSpec };
@@ -1,10 +1,10 @@
1
+ import { OpRef } from "../features/types.js";
2
+ import "../features/index.js";
1
3
  import { GuardCondition, Step, WorkflowRegistry } from "./spec.js";
2
4
  import { ResolvedBranding } from "../app-config/branding.js";
3
5
  import { ResolvedAppConfig, ResolvedIntegration, ResolvedKnowledge, ResolvedTranslation } from "../app-config/runtime.js";
4
6
  import { SecretProvider } from "../integrations/secrets/provider.js";
5
7
  import { TranslationResolver } from "../types.js";
6
- import { OpRef } from "../features/types.js";
7
- import "../features/index.js";
8
8
  import { StateStore, WorkflowState } from "./state.js";
9
9
 
10
10
  //#region src/workflow/runner.d.ts
@@ -1,10 +1,10 @@
1
1
  import { OwnerShipMeta } from "../ownership.js";
2
2
  import { CapabilityRef } from "../capabilities/capabilities.js";
3
3
  import "../capabilities/index.js";
4
- import { SpecContractRegistry } from "../registry.js";
5
4
  import { ExperimentRef } from "../experiments/spec.js";
6
5
  import { OpRef } from "../features/types.js";
7
6
  import "../features/index.js";
7
+ import { SpecContractRegistry } from "../registry.js";
8
8
 
9
9
  //#region src/workflow/spec.d.ts
10
10
  /**
@@ -1,5 +1,5 @@
1
- import { WorkflowSpec } from "./spec.js";
2
1
  import { OperationSpecRegistry } from "../operations/registry.js";
2
+ import { WorkflowSpec } from "./spec.js";
3
3
  import { FormRegistry } from "../forms/forms.js";
4
4
  import "../forms/index.js";
5
5