@lssm/example.workflow-system 0.0.0-canary-20251217083314 → 1.41.1

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 (187) hide show
  1. package/dist/approval/approval.contracts.js +1 -250
  2. package/dist/approval/approval.enum.js +1 -29
  3. package/dist/approval/approval.event.js +1 -186
  4. package/dist/approval/approval.handler.js +1 -71
  5. package/dist/approval/approval.schema.js +1 -111
  6. package/dist/approval/index.js +1 -6
  7. package/dist/docs/index.js +1 -1
  8. package/dist/docs/workflow-system.docblock.js +5 -61
  9. package/dist/entities/approval.js +1 -128
  10. package/dist/entities/index.js +1 -31
  11. package/dist/entities/instance.js +1 -168
  12. package/dist/entities/step.js +1 -135
  13. package/dist/entities/workflow.js +1 -102
  14. package/dist/example.js +1 -50
  15. package/dist/index.js +1 -19
  16. package/dist/instance/index.js +1 -6
  17. package/dist/instance/instance.contracts.js +1 -334
  18. package/dist/instance/instance.enum.js +1 -20
  19. package/dist/instance/instance.event.js +1 -214
  20. package/dist/instance/instance.handler.js +1 -93
  21. package/dist/instance/instance.schema.js +1 -173
  22. package/dist/presentations/index.js +1 -291
  23. package/dist/shared/index.js +1 -3
  24. package/dist/shared/mock-data.js +1 -11
  25. package/dist/state-machine/index.js +1 -157
  26. package/dist/workflow/index.js +1 -6
  27. package/dist/workflow/workflow.contracts.js +1 -239
  28. package/dist/workflow/workflow.enum.js +1 -47
  29. package/dist/workflow/workflow.event.js +1 -116
  30. package/dist/workflow/workflow.handler.js +1 -65
  31. package/dist/workflow/workflow.schema.js +1 -250
  32. package/dist/workflow-system.feature.js +1 -337
  33. package/package.json +44 -44
  34. package/dist/approval/approval.contracts.d.ts +0 -534
  35. package/dist/approval/approval.enum.d.ts +0 -13
  36. package/dist/approval/approval.event.d.ts +0 -130
  37. package/dist/approval/approval.handler.d.ts +0 -22
  38. package/dist/approval/approval.schema.d.ts +0 -99
  39. package/dist/approval/index.d.ts +0 -5
  40. package/dist/docs/index.d.ts +0 -1
  41. package/dist/docs/workflow-system.docblock.d.ts +0 -1
  42. package/dist/entities/approval.d.ts +0 -57
  43. package/dist/entities/index.d.ts +0 -138
  44. package/dist/entities/instance.d.ts +0 -68
  45. package/dist/entities/step.d.ts +0 -49
  46. package/dist/entities/workflow.d.ts +0 -40
  47. package/dist/example.d.ts +0 -39
  48. package/dist/index.d.ts +0 -16
  49. package/dist/instance/index.d.ts +0 -5
  50. package/dist/instance/instance.contracts.d.ts +0 -1023
  51. package/dist/instance/instance.enum.d.ts +0 -9
  52. package/dist/instance/instance.event.d.ts +0 -355
  53. package/dist/instance/instance.handler.d.ts +0 -26
  54. package/dist/instance/instance.schema.d.ts +0 -222
  55. package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -88
  56. package/dist/libs/contracts/dist/client/index.js +0 -5
  57. package/dist/libs/contracts/dist/client/react/feature-render.js +0 -2
  58. package/dist/libs/contracts/dist/client/react/form-render.js +0 -4
  59. package/dist/libs/contracts/dist/client/react/index.js +0 -4
  60. package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
  61. package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -60
  62. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  63. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  64. package/dist/libs/contracts/dist/docs/index.js +0 -29
  65. package/dist/libs/contracts/dist/docs/presentations.js +0 -71
  66. package/dist/libs/contracts/dist/docs/registry.js +0 -44
  67. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  68. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  69. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  70. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  71. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  72. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  73. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  74. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  75. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  76. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  77. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  78. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  79. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  80. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  81. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  82. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  83. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  84. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  85. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
  86. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  87. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  88. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  89. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  90. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  91. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  92. package/dist/libs/contracts/dist/events.js +0 -10
  93. package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
  94. package/dist/libs/contracts/dist/index.js +0 -71
  95. package/dist/libs/contracts/dist/install.js +0 -2
  96. package/dist/libs/contracts/dist/integrations/contracts.js +0 -377
  97. package/dist/libs/contracts/dist/integrations/index.js +0 -18
  98. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
  99. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
  100. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  101. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
  102. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -242
  103. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -13
  104. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
  105. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
  106. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
  107. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
  108. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
  109. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
  110. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
  111. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
  112. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
  113. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
  114. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
  115. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
  116. package/dist/libs/contracts/dist/jsonschema.js +0 -1
  117. package/dist/libs/contracts/dist/knowledge/contracts.js +0 -306
  118. package/dist/libs/contracts/dist/knowledge/index.js +0 -7
  119. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -34
  120. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
  121. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
  122. package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
  123. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -34
  124. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -37
  125. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
  126. package/dist/libs/contracts/dist/llm/exporters.js +0 -19
  127. package/dist/libs/contracts/dist/llm/index.js +0 -2
  128. package/dist/libs/contracts/dist/llm/prompts.js +0 -1
  129. package/dist/libs/contracts/dist/onboarding-base.js +0 -196
  130. package/dist/libs/contracts/dist/openapi.js +0 -1
  131. package/dist/libs/contracts/dist/ownership.js +0 -21
  132. package/dist/libs/contracts/dist/presentations.js +0 -1
  133. package/dist/libs/contracts/dist/presentations.v2.js +0 -11
  134. package/dist/libs/contracts/dist/prompt.js +0 -1
  135. package/dist/libs/contracts/dist/promptRegistry.js +0 -1
  136. package/dist/libs/contracts/dist/regenerator/index.js +0 -1
  137. package/dist/libs/contracts/dist/regenerator/service.js +0 -6
  138. package/dist/libs/contracts/dist/registry.js +0 -2
  139. package/dist/libs/contracts/dist/resources.js +0 -1
  140. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  141. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  142. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  143. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -39
  144. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  145. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  146. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  147. package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
  148. package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
  149. package/dist/libs/contracts/dist/server/index.js +0 -8
  150. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
  151. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -2
  152. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
  153. package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
  154. package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
  155. package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
  156. package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
  157. package/dist/libs/contracts/dist/server/rest-express.js +0 -1
  158. package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
  159. package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
  160. package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
  161. package/dist/libs/contracts/dist/spec.js +0 -34
  162. package/dist/libs/contracts/dist/telemetry/index.js +0 -1
  163. package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
  164. package/dist/libs/contracts/dist/tests/index.js +0 -1
  165. package/dist/libs/contracts/dist/tests/runner.js +0 -2
  166. package/dist/libs/contracts/dist/workflow/index.js +0 -1
  167. package/dist/libs/contracts/dist/workflow/runner.js +0 -1
  168. package/dist/libs/schema/dist/EnumType.js +0 -56
  169. package/dist/libs/schema/dist/FieldType.js +0 -49
  170. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  171. package/dist/libs/schema/dist/SchemaModel.js +0 -39
  172. package/dist/libs/schema/dist/entity/defineEntity.js +0 -236
  173. package/dist/libs/schema/dist/entity/index.js +0 -2
  174. package/dist/libs/schema/dist/entity/types.js +0 -1
  175. package/dist/libs/schema/dist/index.js +0 -6
  176. package/dist/presentations/index.d.ts +0 -63
  177. package/dist/shared/index.d.ts +0 -3
  178. package/dist/shared/mock-data.d.ts +0 -18
  179. package/dist/shared/types.d.ts +0 -80
  180. package/dist/state-machine/index.d.ts +0 -147
  181. package/dist/workflow/index.d.ts +0 -5
  182. package/dist/workflow/workflow.contracts.d.ts +0 -1010
  183. package/dist/workflow/workflow.enum.d.ts +0 -21
  184. package/dist/workflow/workflow.event.d.ts +0 -134
  185. package/dist/workflow/workflow.handler.d.ts +0 -28
  186. package/dist/workflow/workflow.schema.d.ts +0 -264
  187. package/dist/workflow-system.feature.d.ts +0 -11
@@ -1,291 +1 @@
1
- import { WorkflowDefinitionModel } from "../workflow/workflow.schema.js";
2
- import { WorkflowInstanceModel } from "../instance/instance.schema.js";
3
- import { ApprovalRequestModel } from "../approval/approval.schema.js";
4
-
5
- //#region src/presentations/index.ts
6
- /**
7
- * Workflow designer canvas for building workflows.
8
- */
9
- const WorkflowDesignerPresentation = {
10
- meta: {
11
- name: "workflow.designer",
12
- version: 1,
13
- description: "Visual workflow designer with drag-and-drop steps",
14
- domain: "workflow-system",
15
- owners: ["@workflow-team"],
16
- tags: [
17
- "workflow",
18
- "designer",
19
- "admin"
20
- ]
21
- },
22
- source: {
23
- type: "component",
24
- framework: "react",
25
- componentKey: "WorkflowDesigner",
26
- props: WorkflowDefinitionModel
27
- },
28
- targets: ["react"],
29
- policy: { flags: ["workflow.designer.enabled"] }
30
- };
31
- /**
32
- * List of workflow definitions.
33
- */
34
- const WorkflowListPresentation = {
35
- meta: {
36
- name: "workflow.definition.list",
37
- version: 1,
38
- description: "List of workflow definitions with status and actions",
39
- domain: "workflow-system",
40
- owners: ["@workflow-team"],
41
- tags: [
42
- "workflow",
43
- "list",
44
- "admin"
45
- ]
46
- },
47
- source: {
48
- type: "component",
49
- framework: "react",
50
- componentKey: "WorkflowDefinitionList",
51
- props: WorkflowDefinitionModel
52
- },
53
- targets: ["react", "markdown"],
54
- policy: { flags: ["workflow.enabled"] }
55
- };
56
- /**
57
- * Workflow definition detail view.
58
- */
59
- const WorkflowDetailPresentation = {
60
- meta: {
61
- name: "workflow.definition.detail",
62
- version: 1,
63
- description: "Detailed view of a workflow definition with steps",
64
- domain: "workflow-system",
65
- owners: ["@workflow-team"],
66
- tags: ["workflow", "detail"]
67
- },
68
- source: {
69
- type: "component",
70
- framework: "react",
71
- componentKey: "WorkflowDefinitionDetail",
72
- props: WorkflowDefinitionModel
73
- },
74
- targets: ["react", "markdown"],
75
- policy: { flags: ["workflow.enabled"] }
76
- };
77
- /**
78
- * List of running workflow instances.
79
- */
80
- const InstanceListPresentation = {
81
- meta: {
82
- name: "workflow.instance.list",
83
- version: 1,
84
- description: "List of workflow instances with status and progress",
85
- domain: "workflow-system",
86
- owners: ["@workflow-team"],
87
- tags: [
88
- "workflow",
89
- "instance",
90
- "list"
91
- ]
92
- },
93
- source: {
94
- type: "component",
95
- framework: "react",
96
- componentKey: "WorkflowInstanceList",
97
- props: WorkflowInstanceModel
98
- },
99
- targets: ["react", "markdown"],
100
- policy: { flags: ["workflow.enabled"] }
101
- };
102
- /**
103
- * Workflow instance detail view with timeline.
104
- */
105
- const InstanceDetailPresentation = {
106
- meta: {
107
- name: "workflow.instance.detail",
108
- version: 1,
109
- description: "Detailed view of a workflow instance with step timeline",
110
- domain: "workflow-system",
111
- owners: ["@workflow-team"],
112
- tags: [
113
- "workflow",
114
- "instance",
115
- "detail",
116
- "timeline"
117
- ]
118
- },
119
- source: {
120
- type: "component",
121
- framework: "react",
122
- componentKey: "WorkflowInstanceDetail",
123
- props: WorkflowInstanceModel
124
- },
125
- targets: ["react", "markdown"],
126
- policy: { flags: ["workflow.enabled"] }
127
- };
128
- /**
129
- * Workflow progress tracker widget.
130
- */
131
- const ProgressTrackerPresentation = {
132
- meta: {
133
- name: "workflow.instance.progress",
134
- version: 1,
135
- description: "Visual progress tracker showing current step in workflow",
136
- domain: "workflow-system",
137
- owners: ["@workflow-team"],
138
- tags: [
139
- "workflow",
140
- "progress",
141
- "widget"
142
- ]
143
- },
144
- source: {
145
- type: "component",
146
- framework: "react",
147
- componentKey: "WorkflowProgressTracker",
148
- props: WorkflowInstanceModel
149
- },
150
- targets: ["react"],
151
- policy: { flags: ["workflow.enabled"] }
152
- };
153
- /**
154
- * Approval inbox - list of pending approvals.
155
- */
156
- const ApprovalInboxPresentation = {
157
- meta: {
158
- name: "workflow.approval.inbox",
159
- version: 1,
160
- description: "Inbox showing pending approval requests for current user",
161
- domain: "workflow-system",
162
- owners: ["@workflow-team"],
163
- tags: [
164
- "workflow",
165
- "approval",
166
- "inbox"
167
- ]
168
- },
169
- source: {
170
- type: "component",
171
- framework: "react",
172
- componentKey: "ApprovalInbox",
173
- props: ApprovalRequestModel
174
- },
175
- targets: ["react", "markdown"],
176
- policy: { flags: ["workflow.approvals.enabled"] }
177
- };
178
- /**
179
- * Approval request detail view.
180
- */
181
- const ApprovalDetailPresentation = {
182
- meta: {
183
- name: "workflow.approval.detail",
184
- version: 1,
185
- description: "Detailed approval request view with context and actions",
186
- domain: "workflow-system",
187
- owners: ["@workflow-team"],
188
- tags: [
189
- "workflow",
190
- "approval",
191
- "detail"
192
- ]
193
- },
194
- source: {
195
- type: "component",
196
- framework: "react",
197
- componentKey: "ApprovalRequestDetail",
198
- props: ApprovalRequestModel
199
- },
200
- targets: ["react", "markdown"],
201
- policy: { flags: ["workflow.approvals.enabled"] }
202
- };
203
- /**
204
- * Approval decision form.
205
- */
206
- const ApprovalFormPresentation = {
207
- meta: {
208
- name: "workflow.approval.form",
209
- version: 1,
210
- description: "Form for submitting approval decisions",
211
- domain: "workflow-system",
212
- owners: ["@workflow-team"],
213
- tags: [
214
- "workflow",
215
- "approval",
216
- "form"
217
- ]
218
- },
219
- source: {
220
- type: "component",
221
- framework: "react",
222
- componentKey: "ApprovalDecisionForm"
223
- },
224
- targets: ["react"],
225
- policy: { flags: ["workflow.approvals.enabled"] }
226
- };
227
- /**
228
- * Pending approvals count badge.
229
- */
230
- const PendingApprovalsBadgePresentation = {
231
- meta: {
232
- name: "workflow.approval.badge",
233
- version: 1,
234
- description: "Badge showing count of pending approvals",
235
- domain: "workflow-system",
236
- owners: ["@workflow-team"],
237
- tags: [
238
- "workflow",
239
- "approval",
240
- "badge",
241
- "widget"
242
- ]
243
- },
244
- source: {
245
- type: "component",
246
- framework: "react",
247
- componentKey: "PendingApprovalsBadge"
248
- },
249
- targets: ["react"],
250
- policy: { flags: ["workflow.approvals.enabled"] }
251
- };
252
- /**
253
- * Workflow metrics dashboard widget.
254
- */
255
- const WorkflowMetricsPresentation = {
256
- meta: {
257
- name: "workflow.metrics",
258
- version: 1,
259
- description: "Dashboard widget showing workflow metrics and statistics",
260
- domain: "workflow-system",
261
- owners: ["@workflow-team"],
262
- tags: [
263
- "workflow",
264
- "metrics",
265
- "dashboard"
266
- ]
267
- },
268
- source: {
269
- type: "component",
270
- framework: "react",
271
- componentKey: "WorkflowMetricsDashboard"
272
- },
273
- targets: ["react", "markdown"],
274
- policy: { flags: ["workflow.metrics.enabled"] }
275
- };
276
- const WorkflowSystemPresentations = {
277
- WorkflowDesignerPresentation,
278
- WorkflowListPresentation,
279
- WorkflowDetailPresentation,
280
- InstanceListPresentation,
281
- InstanceDetailPresentation,
282
- ProgressTrackerPresentation,
283
- ApprovalInboxPresentation,
284
- ApprovalDetailPresentation,
285
- ApprovalFormPresentation,
286
- PendingApprovalsBadgePresentation,
287
- WorkflowMetricsPresentation
288
- };
289
-
290
- //#endregion
291
- export { ApprovalDetailPresentation, ApprovalFormPresentation, ApprovalInboxPresentation, InstanceDetailPresentation, InstanceListPresentation, PendingApprovalsBadgePresentation, ProgressTrackerPresentation, WorkflowDesignerPresentation, WorkflowDetailPresentation, WorkflowListPresentation, WorkflowMetricsPresentation, WorkflowSystemPresentations };
1
+ import{WorkflowDefinitionModel as e}from"../workflow/workflow.schema.js";import{WorkflowInstanceModel as t}from"../instance/instance.schema.js";import{ApprovalRequestModel as n}from"../approval/approval.schema.js";const r={meta:{name:`workflow.designer`,version:1,description:`Visual workflow designer with drag-and-drop steps`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`designer`,`admin`]},source:{type:`component`,framework:`react`,componentKey:`WorkflowDesigner`,props:e},targets:[`react`],policy:{flags:[`workflow.designer.enabled`]}},i={meta:{name:`workflow.definition.list`,version:1,description:`List of workflow definitions with status and actions`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`list`,`admin`]},source:{type:`component`,framework:`react`,componentKey:`WorkflowDefinitionList`,props:e},targets:[`react`,`markdown`],policy:{flags:[`workflow.enabled`]}},a={meta:{name:`workflow.definition.detail`,version:1,description:`Detailed view of a workflow definition with steps`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`detail`]},source:{type:`component`,framework:`react`,componentKey:`WorkflowDefinitionDetail`,props:e},targets:[`react`,`markdown`],policy:{flags:[`workflow.enabled`]}},o={meta:{name:`workflow.instance.list`,version:1,description:`List of workflow instances with status and progress`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`instance`,`list`]},source:{type:`component`,framework:`react`,componentKey:`WorkflowInstanceList`,props:t},targets:[`react`,`markdown`],policy:{flags:[`workflow.enabled`]}},s={meta:{name:`workflow.instance.detail`,version:1,description:`Detailed view of a workflow instance with step timeline`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`instance`,`detail`,`timeline`]},source:{type:`component`,framework:`react`,componentKey:`WorkflowInstanceDetail`,props:t},targets:[`react`,`markdown`],policy:{flags:[`workflow.enabled`]}},c={meta:{name:`workflow.instance.progress`,version:1,description:`Visual progress tracker showing current step in workflow`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`progress`,`widget`]},source:{type:`component`,framework:`react`,componentKey:`WorkflowProgressTracker`,props:t},targets:[`react`],policy:{flags:[`workflow.enabled`]}},l={meta:{name:`workflow.approval.inbox`,version:1,description:`Inbox showing pending approval requests for current user`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`approval`,`inbox`]},source:{type:`component`,framework:`react`,componentKey:`ApprovalInbox`,props:n},targets:[`react`,`markdown`],policy:{flags:[`workflow.approvals.enabled`]}},u={meta:{name:`workflow.approval.detail`,version:1,description:`Detailed approval request view with context and actions`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`approval`,`detail`]},source:{type:`component`,framework:`react`,componentKey:`ApprovalRequestDetail`,props:n},targets:[`react`,`markdown`],policy:{flags:[`workflow.approvals.enabled`]}},d={meta:{name:`workflow.approval.form`,version:1,description:`Form for submitting approval decisions`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`approval`,`form`]},source:{type:`component`,framework:`react`,componentKey:`ApprovalDecisionForm`},targets:[`react`],policy:{flags:[`workflow.approvals.enabled`]}},f={meta:{name:`workflow.approval.badge`,version:1,description:`Badge showing count of pending approvals`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`approval`,`badge`,`widget`]},source:{type:`component`,framework:`react`,componentKey:`PendingApprovalsBadge`},targets:[`react`],policy:{flags:[`workflow.approvals.enabled`]}},p={meta:{name:`workflow.metrics`,version:1,description:`Dashboard widget showing workflow metrics and statistics`,domain:`workflow-system`,owners:[`@workflow-team`],tags:[`workflow`,`metrics`,`dashboard`]},source:{type:`component`,framework:`react`,componentKey:`WorkflowMetricsDashboard`},targets:[`react`,`markdown`],policy:{flags:[`workflow.metrics.enabled`]}},m={WorkflowDesignerPresentation:r,WorkflowListPresentation:i,WorkflowDetailPresentation:a,InstanceListPresentation:o,InstanceDetailPresentation:s,ProgressTrackerPresentation:c,ApprovalInboxPresentation:l,ApprovalDetailPresentation:u,ApprovalFormPresentation:d,PendingApprovalsBadgePresentation:f,WorkflowMetricsPresentation:p};export{u as ApprovalDetailPresentation,d as ApprovalFormPresentation,l as ApprovalInboxPresentation,s as InstanceDetailPresentation,o as InstanceListPresentation,f as PendingApprovalsBadgePresentation,c as ProgressTrackerPresentation,r as WorkflowDesignerPresentation,a as WorkflowDetailPresentation,i as WorkflowListPresentation,p as WorkflowMetricsPresentation,m as WorkflowSystemPresentations};
@@ -1,3 +1 @@
1
- import { mockDataStore } from "./mock-data.js";
2
-
3
- export { mockDataStore };
1
+ import{mockDataStore as e}from"./mock-data.js";export{e as mockDataStore};
@@ -1,11 +1 @@
1
- //#region src/shared/mock-data.ts
2
- const mockDataStore = {
3
- workflows: /* @__PURE__ */ new Map(),
4
- steps: /* @__PURE__ */ new Map(),
5
- instances: /* @__PURE__ */ new Map(),
6
- approvals: /* @__PURE__ */ new Map(),
7
- stepExecutions: /* @__PURE__ */ new Map()
8
- };
9
-
10
- //#endregion
11
- export { mockDataStore };
1
+ const e={workflows:new Map,steps:new Map,instances:new Map,approvals:new Map,stepExecutions:new Map};export{e as mockDataStore};
@@ -1,157 +1 @@
1
- //#region src/state-machine/index.ts
2
- /**
3
- * Basic state machine engine implementation.
4
- * This is a reference implementation for spec validation.
5
- */
6
- var BasicStateMachineEngine = class {
7
- canTransition(definition, state, action, context) {
8
- if (state.status !== "RUNNING" && state.status !== "WAITING") return {
9
- allowed: false,
10
- reason: `Workflow is ${state.status}, cannot transition`
11
- };
12
- const currentStep = definition.steps[state.currentStepKey];
13
- if (!currentStep) return {
14
- allowed: false,
15
- reason: `Step ${state.currentStepKey} not found`
16
- };
17
- const transition = currentStep.transitions[action];
18
- if (!transition) return {
19
- allowed: false,
20
- reason: `Action ${action} not available in step ${state.currentStepKey}`
21
- };
22
- if (currentStep.allowedRoles && currentStep.allowedRoles.length > 0) {
23
- if (!currentStep.allowedRoles.some((role) => context.userRoles.includes(role))) return {
24
- allowed: false,
25
- reason: `User lacks required role for this action`
26
- };
27
- }
28
- if (typeof transition === "object" && transition.allowedRoles && transition.allowedRoles.length > 0) {
29
- if (!transition.allowedRoles.some((role) => context.userRoles.includes(role))) return {
30
- allowed: false,
31
- reason: `User lacks required role for action ${action}`
32
- };
33
- }
34
- return { allowed: true };
35
- }
36
- getAvailableActions(definition, state, context) {
37
- if (state.status !== "RUNNING" && state.status !== "WAITING") return [];
38
- const currentStep = definition.steps[state.currentStepKey];
39
- if (!currentStep) return [];
40
- return Object.keys(currentStep.transitions).filter((action) => {
41
- return this.canTransition(definition, state, action, context).allowed;
42
- });
43
- }
44
- transition(definition, state, action, context) {
45
- const validation = this.canTransition(definition, state, action, context);
46
- if (!validation.allowed) return {
47
- success: false,
48
- previousStepKey: state.currentStepKey,
49
- currentStepKey: state.currentStepKey,
50
- status: state.status,
51
- error: validation.reason
52
- };
53
- const currentStep = definition.steps[state.currentStepKey];
54
- if (!currentStep) return {
55
- success: false,
56
- previousStepKey: state.currentStepKey,
57
- currentStepKey: state.currentStepKey,
58
- status: state.status,
59
- error: `Current step ${state.currentStepKey} not found`
60
- };
61
- const transition = currentStep.transitions[action];
62
- if (!transition) return {
63
- success: false,
64
- previousStepKey: state.currentStepKey,
65
- currentStepKey: state.currentStepKey,
66
- status: state.status,
67
- error: `Transition for action ${action} not found`
68
- };
69
- const targetStepKey = typeof transition === "string" ? transition : transition.targetStepKey;
70
- const targetStep = definition.steps[targetStepKey];
71
- if (!targetStep) return {
72
- success: false,
73
- previousStepKey: state.currentStepKey,
74
- currentStepKey: state.currentStepKey,
75
- status: state.status,
76
- error: `Target step ${targetStepKey} not found`
77
- };
78
- let newStatus = "RUNNING";
79
- if (targetStep.type === "END") newStatus = "COMPLETED";
80
- else if (targetStep.type === "APPROVAL" || targetStep.type === "WAIT") newStatus = "WAITING";
81
- return {
82
- success: true,
83
- previousStepKey: state.currentStepKey,
84
- currentStepKey: targetStepKey,
85
- status: newStatus
86
- };
87
- }
88
- evaluateCondition(expression, contextData) {
89
- try {
90
- const match = expression.match(/^(\w+)\s*(>=|<=|>|<|===|!==|==|!=)\s*(.+)$/);
91
- if (match) {
92
- const [, prop, operator, value] = match;
93
- if (!prop || !operator || value === void 0) return false;
94
- const propValue = contextData[prop];
95
- const compareValue = JSON.parse(value);
96
- switch (operator) {
97
- case ">": return Number(propValue) > Number(compareValue);
98
- case "<": return Number(propValue) < Number(compareValue);
99
- case ">=": return Number(propValue) >= Number(compareValue);
100
- case "<=": return Number(propValue) <= Number(compareValue);
101
- case "===":
102
- case "==": return propValue === compareValue;
103
- case "!==":
104
- case "!=": return propValue !== compareValue;
105
- }
106
- }
107
- if (expression in contextData) return Boolean(contextData[expression]);
108
- return false;
109
- } catch {
110
- return false;
111
- }
112
- }
113
- };
114
- /**
115
- * Create a new state machine engine instance.
116
- */
117
- function createStateMachineEngine() {
118
- return new BasicStateMachineEngine();
119
- }
120
- /**
121
- * Build a state machine definition from workflow entities.
122
- */
123
- function buildStateMachineDefinition(workflow, steps) {
124
- const stepMap = {};
125
- for (const step of steps) stepMap[step.key] = {
126
- key: step.key,
127
- name: step.name,
128
- type: step.type,
129
- transitions: step.transitions,
130
- approvalMode: step.approvalMode,
131
- allowedRoles: step.approverRoles,
132
- timeoutSeconds: step.timeoutSeconds,
133
- conditionExpression: step.conditionExpression
134
- };
135
- const initialStepKey = steps.find((s) => s.type === "START")?.key ?? steps[0]?.key ?? "";
136
- return {
137
- key: workflow.key,
138
- name: workflow.name,
139
- version: workflow.version,
140
- initialStepKey,
141
- steps: stepMap
142
- };
143
- }
144
- /**
145
- * Create initial state for a new workflow instance.
146
- */
147
- function createInitialState(definition, contextData = {}) {
148
- return {
149
- currentStepKey: definition.initialStepKey,
150
- status: "RUNNING",
151
- contextData,
152
- history: []
153
- };
154
- }
155
-
156
- //#endregion
157
- export { BasicStateMachineEngine, buildStateMachineDefinition, createInitialState, createStateMachineEngine };
1
+ var e=class{canTransition(e,t,n,r){if(t.status!==`RUNNING`&&t.status!==`WAITING`)return{allowed:!1,reason:`Workflow is ${t.status}, cannot transition`};let i=e.steps[t.currentStepKey];if(!i)return{allowed:!1,reason:`Step ${t.currentStepKey} not found`};let a=i.transitions[n];return a?i.allowedRoles&&i.allowedRoles.length>0&&!i.allowedRoles.some(e=>r.userRoles.includes(e))?{allowed:!1,reason:`User lacks required role for this action`}:typeof a==`object`&&a.allowedRoles&&a.allowedRoles.length>0&&!a.allowedRoles.some(e=>r.userRoles.includes(e))?{allowed:!1,reason:`User lacks required role for action ${n}`}:{allowed:!0}:{allowed:!1,reason:`Action ${n} not available in step ${t.currentStepKey}`}}getAvailableActions(e,t,n){if(t.status!==`RUNNING`&&t.status!==`WAITING`)return[];let r=e.steps[t.currentStepKey];return r?Object.keys(r.transitions).filter(r=>this.canTransition(e,t,r,n).allowed):[]}transition(e,t,n,r){let i=this.canTransition(e,t,n,r);if(!i.allowed)return{success:!1,previousStepKey:t.currentStepKey,currentStepKey:t.currentStepKey,status:t.status,error:i.reason};let a=e.steps[t.currentStepKey];if(!a)return{success:!1,previousStepKey:t.currentStepKey,currentStepKey:t.currentStepKey,status:t.status,error:`Current step ${t.currentStepKey} not found`};let o=a.transitions[n];if(!o)return{success:!1,previousStepKey:t.currentStepKey,currentStepKey:t.currentStepKey,status:t.status,error:`Transition for action ${n} not found`};let s=typeof o==`string`?o:o.targetStepKey,c=e.steps[s];if(!c)return{success:!1,previousStepKey:t.currentStepKey,currentStepKey:t.currentStepKey,status:t.status,error:`Target step ${s} not found`};let l=`RUNNING`;return c.type===`END`?l=`COMPLETED`:(c.type===`APPROVAL`||c.type===`WAIT`)&&(l=`WAITING`),{success:!0,previousStepKey:t.currentStepKey,currentStepKey:s,status:l}}evaluateCondition(e,t){try{let n=e.match(/^(\w+)\s*(>=|<=|>|<|===|!==|==|!=)\s*(.+)$/);if(n){let[,e,r,i]=n;if(!e||!r||i===void 0)return!1;let a=t[e],o=JSON.parse(i);switch(r){case`>`:return Number(a)>Number(o);case`<`:return Number(a)<Number(o);case`>=`:return Number(a)>=Number(o);case`<=`:return Number(a)<=Number(o);case`===`:case`==`:return a===o;case`!==`:case`!=`:return a!==o}}return e in t?!!t[e]:!1}catch{return!1}}};function t(){return new e}function n(e,t){let n={};for(let e of t)n[e.key]={key:e.key,name:e.name,type:e.type,transitions:e.transitions,approvalMode:e.approvalMode,allowedRoles:e.approverRoles,timeoutSeconds:e.timeoutSeconds,conditionExpression:e.conditionExpression};let r=t.find(e=>e.type===`START`)?.key??t[0]?.key??``;return{key:e.key,name:e.name,version:e.version,initialStepKey:r,steps:n}}function r(e,t={}){return{currentStepKey:e.initialStepKey,status:`RUNNING`,contextData:t,history:[]}}export{e as BasicStateMachineEngine,n as buildStateMachineDefinition,r as createInitialState,t as createStateMachineEngine};
@@ -1,6 +1 @@
1
- import { ApprovalModeEnum, StepTypeEnum, TriggerTypeEnum, WorkflowStatusEnum } from "./workflow.enum.js";
2
- import { AddStepInputModel, CreateWorkflowInputModel, UpdateWorkflowInputModel, WorkflowDefinitionModel, WorkflowStepModel } from "./workflow.schema.js";
3
- import { AddStepContract, CreateWorkflowContract, GetWorkflowContract, ListWorkflowsContract, PublishWorkflowContract, UpdateWorkflowContract } from "./workflow.contracts.js";
4
- import { StepAddedEvent, WorkflowCreatedEvent, WorkflowPublishedEvent, WorkflowUpdatedEvent } from "./workflow.event.js";
5
-
6
- export { AddStepContract, AddStepInputModel, ApprovalModeEnum, CreateWorkflowContract, CreateWorkflowInputModel, GetWorkflowContract, ListWorkflowsContract, PublishWorkflowContract, StepAddedEvent, StepTypeEnum, TriggerTypeEnum, UpdateWorkflowContract, UpdateWorkflowInputModel, WorkflowCreatedEvent, WorkflowDefinitionModel, WorkflowPublishedEvent, WorkflowStatusEnum, WorkflowStepModel, WorkflowUpdatedEvent };
1
+ import{ApprovalModeEnum as e,StepTypeEnum as t,TriggerTypeEnum as n,WorkflowStatusEnum as r}from"./workflow.enum.js";import{AddStepInputModel as i,CreateWorkflowInputModel as a,UpdateWorkflowInputModel as o,WorkflowDefinitionModel as s,WorkflowStepModel as c}from"./workflow.schema.js";import{AddStepContract as l,CreateWorkflowContract as u,GetWorkflowContract as d,ListWorkflowsContract as f,PublishWorkflowContract as p,UpdateWorkflowContract as m}from"./workflow.contracts.js";import{StepAddedEvent as h,WorkflowCreatedEvent as g,WorkflowPublishedEvent as _,WorkflowUpdatedEvent as v}from"./workflow.event.js";export{l as AddStepContract,i as AddStepInputModel,e as ApprovalModeEnum,u as CreateWorkflowContract,a as CreateWorkflowInputModel,d as GetWorkflowContract,f as ListWorkflowsContract,p as PublishWorkflowContract,h as StepAddedEvent,t as StepTypeEnum,n as TriggerTypeEnum,m as UpdateWorkflowContract,o as UpdateWorkflowInputModel,g as WorkflowCreatedEvent,s as WorkflowDefinitionModel,_ as WorkflowPublishedEvent,r as WorkflowStatusEnum,c as WorkflowStepModel,v as WorkflowUpdatedEvent};